@fabiocv/mcp 0.0.0-stage → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +62 -2
- package/dist/stdio.js +92 -0
- package/package.json +50 -3
package/dist/stdio.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire } from 'node:module';
|
|
3
|
+
const require = createRequire(import.meta.url);
|
|
4
|
+
var Sk=Object.defineProperty;var Kt=(e,t)=>{for(var r in t)Sk(e,r,{get:t[r],enumerable:!0})};var S1="ui/resourceUri",Nd="text/html;profile=mcp-app";function fi(e,t,r,i){let n=r._meta,o=n.ui,a=n[S1],s=n;return o?.resourceUri&&!a?s={...n,[S1]:o.resourceUri}:a&&!o?.resourceUri&&(s={...n,ui:{...o,resourceUri:a}}),e.registerTool(t,{...r,_meta:s},i)}function k1(e,t,r,i,n){return e.registerResource(t,r,{mimeType:Nd,...i},n)}var kk=Object.create,ps=Object.defineProperty,wk=Object.getOwnPropertyDescriptor,$k=Object.getOwnPropertyNames,xk=Object.getPrototypeOf,Tk=Object.prototype.hasOwnProperty,K=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),w1=(e,t)=>{let r={};for(var i in e)ps(r,i,{get:e[i],enumerable:!0});return t&&ps(r,Symbol.toStringTag,{value:"Module"}),r},Rk=(e,t,r,i)=>{if(t&&typeof t=="object"||typeof t=="function")for(var n=$k(t),o=0,a=n.length,s;o<a;o++)s=n[o],!Tk.call(e,s)&&s!==r&&ps(e,s,{get:(c=>t[c]).bind(null,s),enumerable:!(i=wk(t,s))||i.enumerable});return e},ms=(e,t,r)=>(r=e!=null?kk(xk(e)):{},Rk(t||!e||!e.__esModule?ps(r,"default",{value:e,enumerable:!0}):r,e));var Ik=new Set(["https://json-schema.org/draft/2020-12/schema","http://json-schema.org/draft/2020-12/schema"]),$1=new Set(["https://json-schema.org/draft/2019-09/schema","http://json-schema.org/draft/2019-09/schema"]),zk=new Set(["https://json-schema.org/draft-07/schema","http://json-schema.org/draft-07/schema"]),Ek=new Set(["https://json-schema.org/draft-06/schema","http://json-schema.org/draft-06/schema"]);function x1(e){return typeof e=="string"&&$1.has(e.replace(/#$/,""))}function T1(e,t){if(!("$schema"in e)||typeof e.$schema!="string")return"2020-12";let r=e.$schema.replace(/#$/,"");if(Ik.has(r))return"2020-12";if($1.has(r))return"2019-09";if(zk.has(r)||Ek.has(r))return"draft-7";throw new Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}var ze={};Kt(ze,{$brand:()=>Jd,$input:()=>_f,$output:()=>bf,INVALID:()=>dt,NEVER:()=>xi,TimePrecision:()=>Pf,ZodAny:()=>hg,ZodArray:()=>bg,ZodBase64:()=>ll,ZodBase64URL:()=>ul,ZodBigInt:()=>bo,ZodBigIntFormat:()=>ml,ZodBoolean:()=>yo,ZodCIDRv4:()=>sl,ZodCIDRv6:()=>cl,ZodCUID:()=>el,ZodCUID2:()=>tl,ZodCatch:()=>Mg,ZodCodec:()=>la,ZodCompileAsyncError:()=>Nt,ZodCompileUnsupportedError:()=>Te,ZodCreditCard:()=>ug,ZodCustom:()=>ua,ZodCustomStringFormat:()=>dr,ZodDate:()=>oa,ZodDefault:()=>Pg,ZodDiscriminatedUnion:()=>Sg,ZodE164:()=>dl,ZodEmail:()=>Kc,ZodEmoji:()=>Xc,ZodEnum:()=>fo,ZodError:()=>KT,ZodExactOptional:()=>vl,ZodFile:()=>Ig,ZodFirstPartyTypeKind:()=>Qg,ZodFunction:()=>Jg,ZodGUID:()=>Qc,ZodIBAN:()=>dg,ZodIPv4:()=>il,ZodIPv6:()=>al,ZodISODate:()=>$n,ZodISODateTime:()=>wn,ZodISODuration:()=>Tn,ZodISOTime:()=>xn,ZodInstanceOf:()=>Wg,ZodIntersection:()=>kg,ZodIssueCode:()=>Xg,ZodJWT:()=>pl,ZodKSUID:()=>ol,ZodLazy:()=>Zg,ZodLiteral:()=>Rg,ZodMAC:()=>lg,ZodMap:()=>xg,ZodNaN:()=>Lg,ZodNanoID:()=>Yc,ZodNever:()=>vg,ZodNonOptional:()=>yl,ZodNull:()=>fg,ZodNullable:()=>Cg,ZodNumber:()=>vo,ZodNumberFormat:()=>pr,ZodObject:()=>ia,ZodOptional:()=>sa,ZodPipe:()=>ca,ZodPrefault:()=>Ng,ZodPreprocess:()=>Dg,ZodPromise:()=>Gg,ZodReadonly:()=>Fg,ZodRealError:()=>bt,ZodRecord:()=>mo,ZodSet:()=>Tg,ZodString:()=>ho,ZodStringFormat:()=>je,ZodSuccess:()=>jg,ZodSymbol:()=>pg,ZodTemplateLiteral:()=>Hg,ZodTransform:()=>zg,ZodTuple:()=>wg,ZodType:()=>$e,ZodULID:()=>nl,ZodURL:()=>ra,ZodUUID:()=>Vt,ZodUndefined:()=>mg,ZodUnion:()=>aa,ZodUnknown:()=>gg,ZodVoid:()=>yg,ZodXID:()=>rl,ZodXor:()=>_g,_ZodString:()=>Bc,_default:()=>Og,_function:()=>Y_,any:()=>fl,array:()=>j,base64:()=>h_,base64url:()=>g_,bigint:()=>E_,boolean:()=>oe,catch:()=>qg,check:()=>eS,cidrv4:()=>m_,cidrv6:()=>f_,clone:()=>Ne,codec:()=>K_,coerce:()=>ma,compile:()=>$f,config:()=>He,core:()=>en,creditCard:()=>y_,cuid:()=>i_,cuid2:()=>a_,currencyCode:()=>$_,custom:()=>tS,date:()=>A_,decode:()=>ng,decodeAsync:()=>og,deepPartial:()=>mS,describe:()=>nS,discriminatedUnion:()=>Rn,e164:()=>v_,email:()=>Wc,emoji:()=>r_,encode:()=>tg,encodeAsync:()=>rg,endsWith:()=>to,enum:()=>he,exactOptional:()=>Eg,file:()=>Z_,flattenError:()=>Ti,float32:()=>T_,float64:()=>R_,formatError:()=>Ri,fromJSONSchema:()=>dS,function:()=>Y_,getDiscriminatedOption:()=>Gm,getErrorMap:()=>YT,globalRegistry:()=>nt,gt:()=>Dt,gte:()=>$t,guid:()=>Qb,hash:()=>x_,hex:()=>w_,hostname:()=>k_,httpUrl:()=>n_,iban:()=>b_,includes:()=>Yr,input:()=>hS,instanceof:()=>oS,int:()=>Gc,int32:()=>I_,int64:()=>C_,intersection:()=>At,invertCodec:()=>W_,ipv4:()=>u_,ipv6:()=>p_,iso:()=>Et,json:()=>aS,jwt:()=>__,keyof:()=>j_,ksuid:()=>l_,lazy:()=>In,length:()=>sr,literal:()=>q,locales:()=>Ji,looseObject:()=>me,looseRecord:()=>D_,lowercase:()=>Qr,lt:()=>Lt,lte:()=>wt,mac:()=>d_,map:()=>F_,maxLength:()=>ar,maxSize:()=>bn,memoizer:()=>Zi,meta:()=>rS,mime:()=>ro,minLength:()=>Yt,minSize:()=>Ft,multipleOf:()=>yn,nan:()=>B_,nanoid:()=>o_,nativeEnum:()=>H_,negative:()=>Ac,never:()=>hl,nonnegative:()=>Mc,nonoptional:()=>Ag,nonpositive:()=>jc,normalize:()=>oo,null:()=>Ht,nullable:()=>na,nullish:()=>G_,number:()=>W,object:()=>E,optional:()=>ce,output:()=>gS,overwrite:()=>Ut,parse:()=>Xh,parseAsync:()=>Yh,partialRecord:()=>L_,pipe:()=>Jc,positive:()=>Uc,prefault:()=>Ug,preprocess:()=>tn,prettifyError:()=>Xd,promise:()=>X_,properties:()=>no,property:()=>qc,readonly:()=>Vg,record:()=>re,refine:()=>Bg,regex:()=>Wr,regexes:()=>zt,registry:()=>uc,safeDecode:()=>ag,safeDecodeAsync:()=>cg,safeEncode:()=>ig,safeEncodeAsync:()=>sg,safeParse:()=>ta,safeParseAsync:()=>eg,set:()=>V_,setErrorMap:()=>XT,size:()=>ir,slugify:()=>co,startsWith:()=>eo,strictObject:()=>M_,string:()=>p,stringFormat:()=>S_,stringbool:()=>iS,success:()=>J_,superRefine:()=>Kg,symbol:()=>O_,templateLiteral:()=>Q_,toJSONSchema:()=>lr,toLowerCase:()=>ao,toUpperCase:()=>so,toZod:()=>hi,transform:()=>gl,treeifyError:()=>Qd,trim:()=>io,tuple:()=>$g,uint32:()=>z_,uint64:()=>P_,ulid:()=>s_,undefined:()=>N_,union:()=>ie,unknown:()=>le,uppercase:()=>Xr,url:()=>go,util:()=>H,uuid:()=>Xb,uuidv4:()=>Yb,uuidv6:()=>e_,uuidv7:()=>t_,validate:()=>Ii,validateAsync:()=>zi,void:()=>U_,withParser:()=>dc,xid:()=>c_,xor:()=>q_});var en={};Kt(en,{$ZodAny:()=>jm,$ZodArray:()=>Vm,$ZodAsyncError:()=>vt,$ZodBase64:()=>xm,$ZodBase64URL:()=>Tm,$ZodBigInt:()=>Ws,$ZodBigIntFormat:()=>Om,$ZodBoolean:()=>qi,$ZodCIDRv4:()=>wm,$ZodCIDRv6:()=>$m,$ZodCUID:()=>dm,$ZodCUID2:()=>pm,$ZodCatch:()=>lf,$ZodCheck:()=>Me,$ZodCheckBigIntFormat:()=>Mp,$ZodCheckEndsWith:()=>Wp,$ZodCheckGreaterThan:()=>Ns,$ZodCheckIncludes:()=>Bp,$ZodCheckLengthEquals:()=>Hp,$ZodCheckLessThan:()=>Os,$ZodCheckLowerCase:()=>Gp,$ZodCheckMaxLength:()=>Fp,$ZodCheckMaxSize:()=>qp,$ZodCheckMimeType:()=>Yp,$ZodCheckMinLength:()=>Vp,$ZodCheckMinSize:()=>Lp,$ZodCheckMultipleOf:()=>Ap,$ZodCheckNumberFormat:()=>jp,$ZodCheckOverwrite:()=>em,$ZodCheckProperties:()=>Xp,$ZodCheckProperty:()=>Qp,$ZodCheckRegex:()=>Zp,$ZodCheckSizeEquals:()=>Dp,$ZodCheckStartsWith:()=>Kp,$ZodCheckStringFormat:()=>Zr,$ZodCheckUpperCase:()=>Jp,$ZodCodec:()=>Di,$ZodCreditCard:()=>Im,$ZodCustom:()=>gf,$ZodCustomStringFormat:()=>Cm,$ZodCyclicError:()=>rc,$ZodDate:()=>Dm,$ZodDefault:()=>of,$ZodDiscriminatedUnion:()=>Jm,$ZodE164:()=>Rm,$ZodEmail:()=>im,$ZodEmoji:()=>lm,$ZodEncodeError:()=>gn,$ZodEnum:()=>Xm,$ZodError:()=>Wd,$ZodExactOptional:()=>nf,$ZodFile:()=>ef,$ZodFunction:()=>ff,$ZodGUID:()=>rm,$ZodIBAN:()=>zm,$ZodIPv4:()=>_m,$ZodIPv6:()=>Sm,$ZodISODate:()=>vm,$ZodISODateTime:()=>gm,$ZodISODuration:()=>bm,$ZodISOTime:()=>ym,$ZodIntersection:()=>Bm,$ZodJWT:()=>Em,$ZodKSUID:()=>hm,$ZodLazy:()=>Fi,$ZodLiteral:()=>Ym,$ZodMAC:()=>km,$ZodMap:()=>Wm,$ZodNaN:()=>uf,$ZodNanoID:()=>um,$ZodNever:()=>qm,$ZodNonOptional:()=>sf,$ZodNull:()=>Am,$ZodNullable:()=>rf,$ZodNumber:()=>Ks,$ZodNumberFormat:()=>Pm,$ZodObject:()=>sy,$ZodObjectJIT:()=>Hm,$ZodOptional:()=>Xs,$ZodPipe:()=>Ys,$ZodPrefault:()=>af,$ZodPreprocess:()=>df,$ZodPromise:()=>hf,$ZodReadonly:()=>pf,$ZodRealError:()=>yt,$ZodRecord:()=>Km,$ZodRegistry:()=>lc,$ZodSet:()=>Qm,$ZodString:()=>tr,$ZodStringFormat:()=>Ue,$ZodSuccess:()=>cf,$ZodSymbol:()=>Nm,$ZodTemplateLiteral:()=>mf,$ZodTransform:()=>tf,$ZodTuple:()=>Qs,$ZodType:()=>be,$ZodULID:()=>mm,$ZodURL:()=>cm,$ZodUUID:()=>om,$ZodUndefined:()=>Um,$ZodUnion:()=>Li,$ZodUnknown:()=>Mm,$ZodVoid:()=>Lm,$ZodXID:()=>fm,$ZodXor:()=>Zm,$brand:()=>Jd,$constructor:()=>N,$input:()=>_f,$output:()=>bf,Doc:()=>er,INVALID:()=>dt,JSONSchema:()=>Bb,JSONSchemaGenerator:()=>Vc,NEVER:()=>xi,TimePrecision:()=>Pf,URL_BAD_FORMAT:()=>am,URL_UNPARSEABLE:()=>Ni,ZodCompileAsyncError:()=>Nt,ZodCompileUnsupportedError:()=>Te,_any:()=>Kf,_array:()=>nh,_base64:()=>Cc,_base64url:()=>Pc,_bigint:()=>Ff,_boolean:()=>Lf,_catch:()=>jT,_check:()=>Pb,_cidrv4:()=>zc,_cidrv6:()=>Ec,_coercedBigint:()=>Vf,_coercedBoolean:()=>Df,_coercedDate:()=>eh,_coercedNumber:()=>Nf,_coercedString:()=>If,_creditCard:()=>Ef,_cuid:()=>kc,_cuid2:()=>wc,_custom:()=>oh,_date:()=>Yf,_decode:()=>ks,_decodeAsync:()=>$s,_default:()=>NT,_discriminatedUnion:()=>kT,_e164:()=>Oc,_email:()=>fc,_emoji:()=>_c,_encode:()=>Ss,_encodeAsync:()=>ws,_endsWith:()=>to,_enum:()=>IT,_file:()=>rh,_float32:()=>Af,_float64:()=>jf,_gt:()=>Dt,_gte:()=>$t,_guid:()=>hc,_iban:()=>Cf,_includes:()=>Yr,_int:()=>Uf,_int32:()=>Mf,_int64:()=>Hf,_intersection:()=>wT,_ipv4:()=>Rc,_ipv6:()=>Ic,_isoDate:()=>Wi,_isoDateTime:()=>Ki,_isoDuration:()=>Xi,_isoTime:()=>Qi,_jwt:()=>Nc,_ksuid:()=>Tc,_lazy:()=>DT,_length:()=>sr,_literal:()=>ET,_lowercase:()=>Qr,_lt:()=>Lt,_lte:()=>wt,_mac:()=>zf,_map:()=>TT,_max:()=>wt,_maxLength:()=>ar,_maxSize:()=>bn,_mime:()=>ro,_min:()=>$t,_minLength:()=>Yt,_minSize:()=>Ft,_multipleOf:()=>yn,_nan:()=>th,_nanoid:()=>Sc,_nativeEnum:()=>zT,_negative:()=>Ac,_never:()=>Qf,_nonnegative:()=>Mc,_nonoptional:()=>UT,_nonpositive:()=>jc,_normalize:()=>oo,_null:()=>Bf,_nullable:()=>OT,_number:()=>Of,_optional:()=>PT,_overwrite:()=>Ut,_parse:()=>Dr,_parseAsync:()=>Fr,_pipe:()=>MT,_positive:()=>Uc,_promise:()=>FT,_properties:()=>no,_property:()=>qc,_readonly:()=>qT,_record:()=>xT,_refine:()=>ih,_regex:()=>Wr,_safeDecode:()=>Ts,_safeDecodeAsync:()=>Is,_safeEncode:()=>xs,_safeEncodeAsync:()=>Rs,_safeParse:()=>Vr,_safeParseAsync:()=>Hr,_set:()=>RT,_size:()=>ir,_slugify:()=>co,_startsWith:()=>eo,_string:()=>Rf,_stringFormat:()=>cr,_stringbool:()=>lh,_success:()=>AT,_superRefine:()=>ah,_symbol:()=>Gf,_templateLiteral:()=>LT,_toLowerCase:()=>ao,_toUpperCase:()=>so,_transform:()=>CT,_trim:()=>io,_tuple:()=>$T,_uint32:()=>qf,_uint64:()=>Zf,_ulid:()=>$c,_undefined:()=>Jf,_union:()=>_T,_unknown:()=>Wf,_uppercase:()=>Xr,_url:()=>Bi,_uuid:()=>gc,_uuidv4:()=>vc,_uuidv6:()=>yc,_uuidv7:()=>bc,_void:()=>Xf,_xid:()=>xc,_xor:()=>ST,base64Charset:()=>Hs,base64urlCharset:()=>Mi,canParseURL:()=>sm,clone:()=>Ne,compile:()=>$f,compileFn:()=>pc,config:()=>He,createStandardJSONSchemaMethod:()=>lo,createToJSONSchemaMethod:()=>dh,decode:()=>Sw,decodeAsync:()=>ww,describe:()=>sh,encode:()=>_w,encodeAsync:()=>kw,extractDefs:()=>Sn,finalize:()=>kn,flattenError:()=>Ti,formatError:()=>Ri,getDiscriminatedOption:()=>Gm,globalConfig:()=>Xe,globalRegistry:()=>nt,handleUnrepresentable:()=>Ke,initializeContext:()=>_n,isBackEdge:()=>ic,isRecursiveSchema:()=>oc,isValidBase64:()=>ji,isValidBase64URL:()=>Zs,isValidCIDRv6:()=>Vs,isValidCreditCard:()=>Gs,isValidIBAN:()=>Js,isValidIPv6:()=>Ai,isValidJWT:()=>Bs,locales:()=>Ji,memoizer:()=>Zi,mergeValues:()=>Gr,meta:()=>ch,parse:()=>bs,parseAsync:()=>_s,parseURLObject:()=>oy,prettifyError:()=>Xd,process:()=>Ae,processSchema:()=>Ae,regexes:()=>zt,registry:()=>uc,safeDecode:()=>xw,safeDecodeAsync:()=>Rw,safeEncode:()=>$w,safeEncodeAsync:()=>Tw,safeParse:()=>hw,safeParseAsync:()=>gw,standardProps:()=>qs,stripTabAndNewline:()=>Ui,toDotPath:()=>j1,toJSONSchema:()=>lr,toZod:()=>hi,treeifyError:()=>Qd,urlHostnameOk:()=>Ds,urlProtocolOk:()=>Fs,util:()=>H,validate:()=>Ii,validateAsync:()=>zi,validateURL:()=>Ls,version:()=>tm,withParser:()=>dc});var H={};Kt(H,{BIGINT_FORMAT_RANGES:()=>_i,CONSTANT_CATCH:()=>vs,Class:()=>jd,NUMBER_FORMAT_RANGES:()=>bi,aborted:()=>ut,allowsEval:()=>Ld,assert:()=>Uk,assertEqual:()=>Ck,assertIs:()=>Ok,assertNever:()=>Nk,assertNotEqual:()=>Pk,assignProp:()=>tt,attachSchema:()=>Si,base64ToUint8Array:()=>C1,base64urlToUint8Array:()=>ew,cached:()=>jr,captureStackTrace:()=>hs,cleanEnum:()=>Yk,cleanRegex:()=>Qt,clone:()=>Ne,cloneDef:()=>Mk,codePointLength:()=>Xn,constantCatch:()=>Zd,createTransparentProxy:()=>Hk,defineLazy:()=>Md,defineLazyInternal:()=>xe,derived:()=>ow,esc:()=>lt,escapeRegex:()=>It,explicitlyAborted:()=>Vd,extend:()=>Jk,finalizeIssue:()=>gt,floatSafeRemainder:()=>gi,getElementAtPath:()=>qk,getEnumValues:()=>Ur,getLengthableOrigin:()=>wi,getParsedType:()=>Vk,getSizableOrigin:()=>ki,hexToUint8Array:()=>nw,hide:()=>$i,installLazyProp:()=>cw,isObject:()=>Qn,isPlainObject:()=>Rt,issue:()=>Lr,joinValues:()=>U,jsonStringifyReplacer:()=>Ar,members:()=>Hd,merge:()=>Kk,mergeDefs:()=>Ot,normalizeParams:()=>Q,nullish:()=>fs,numKeys:()=>Fk,objectClone:()=>Ak,omit:()=>Gk,optionalKeys:()=>Fd,own:()=>hn,parsedType:()=>G,partial:()=>Wk,pick:()=>Zk,prefixIssues:()=>ht,primitiveTypes:()=>Dd,promiseAllObject:()=>Lk,propertyKeyTypes:()=>yi,randomString:()=>Dk,rawShape:()=>Mr,required:()=>Qk,safeExtend:()=>Bk,shallowClone:()=>vi,sizeCaps:()=>qr,slugify:()=>qd,stringifyPrimitive:()=>Z,toZod:()=>hi,uint8ArrayToBase64:()=>P1,uint8ArrayToBase64url:()=>tw,uint8ArrayToHex:()=>rw,unwrapMessage:()=>Nr});function Ck(e){return e}function Pk(e){return e}function hi(){return e=>e}function Ok(e){}function Nk(e){throw new Error("Unexpected value in exhaustive check")}function Uk(e){}function Ur(e){let t=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,n])=>t.indexOf(+i)===-1).map(([i,n])=>n)}function U(e,t="|"){return e.map(r=>Z(r)).join(t)}function Ar(e,t){return typeof t=="bigint"?t.toString():t}var Ad=class{constructor(t){this._getter=t,this._value=void 0}get value(){let t=this._getter;return t!==void 0&&(this._value=t(),this._getter=void 0),this._value}};function jr(e){return new Ad(e)}function fs(e){return e==null}function Qt(e){let t=e.startsWith("^")?1:0,r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)}function gi(e,t){let r=e/t,i=Math.round(r),n=4*Number.EPSILON*Math.max(Math.abs(r),1);return Math.abs(r-i)<n?0:r-i}var R1=Symbol("evaluating");function Md(e,t,r){let i;Object.defineProperty(e,t,{get(){if(i!==R1)return i===void 0&&(i=R1,i=r()),i},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function Ak(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function tt(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}function Mr(e){let t=Object.getOwnPropertyDescriptor(e,"shape");return t?.get?t.get.raw:t?.value}function Wt(e){return Mr(e._zod.def)??e._zod.def.shape}function I1(e,t,r){Object.defineProperty(e,t,{get(){let i=r();return tt(this,t,i),i},enumerable:!0,configurable:!0})}function z1(e,t,r){t in e?tt(e,t,r):e[t]=r}function Wn(e,t,r,i){let n=Wt(t);for(let o of r){let a=Object.getOwnPropertyDescriptor(n,o);a.enumerable&&(a.get?I1(e,o,()=>{let s=t._zod.def.shape[o];return i?i(s,o):s}):z1(e,o,i?i(a.value,o):a.value))}}function jk(e,t){for(let r of Reflect.ownKeys(t)){let i=Object.getOwnPropertyDescriptor(t,r);i.enumerable&&(i.get?I1(e,r,()=>t[r]):z1(e,r,i.value))}}function Ot(...e){let t={};for(let r of e){let i=Object.getOwnPropertyDescriptors(r);Object.assign(t,i)}return Object.defineProperties({},t)}function Mk(e){return Ot(e._zod.def)}function qk(e,t){return t?t.reduce((r,i)=>r?.[i],e):e}function Lk(e){let t=Object.keys(e),r=t.map(i=>e[i]);return Promise.all(r).then(i=>{let n={};for(let o=0;o<t.length;o++)n[t[o]]=i[o];return n})}function Dk(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let i=0;i<e;i++)r+=t[Math.floor(Math.random()*t.length)];return r}function lt(e){return JSON.stringify(e)}function qd(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var hs="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Qn(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Ld=jr(()=>{if(Xe.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Rt(e){if(Qn(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let r=t.prototype;return!(Qn(r)===!1||Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")===!1)}function vi(e){return Rt(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Fk(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t}var Vk=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}`)}},yi=new Set(["string","number","symbol"]),Dd=new Set(["string","number","bigint","boolean","symbol","undefined"]);function It(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ne(e,t,r){let i=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(i._zod.parent=e),i}function Q(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 Hk(e){let t;return new Proxy({},{get(r,i,n){return t??(t=e()),Reflect.get(t,i,n)},set(r,i,n,o){return t??(t=e()),Reflect.set(t,i,n,o)},has(r,i){return t??(t=e()),Reflect.has(t,i)},deleteProperty(r,i){return t??(t=e()),Reflect.deleteProperty(t,i)},ownKeys(r){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(r,i){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,i)},defineProperty(r,i,n){return t??(t=e()),Reflect.defineProperty(t,i,n)}})}function Z(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Fd(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout==="optional")}var bi={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]},_i={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Zk(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o={};return Wn(o,e,gs(e,t)),Ne(e,Ot(r,{shape:o,checks:[]}))}function gs(e,t){let r=Wt(e),i=[];for(let n of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(r,n)?.enumerable)throw new Error(`Unrecognized key: "${String(n)}"`);t[n]&&i.push(n)}return i}function Gk(e,t){let r=e._zod.def,i=r.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=new Set(gs(e,t)),a={};return Wn(a,e,Reflect.ownKeys(Wt(e)).filter(s=>!o.has(s))),Ne(e,Ot(r,{shape:a,checks:[]}))}function Jk(e,t){if(!Rt(t))throw new Error("Invalid input to extend: expected a plain object");let r=e._zod.def.checks;if(r&&r.length>0){let n=Wt(e);for(let o of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return Ne(e,Ot(e._zod.def,{shape:E1(e,t)}))}function E1(e,t){let r={};return Wn(r,e,Reflect.ownKeys(Wt(e))),jk(r,t),r}function Bk(e,t){if(!Rt(t))throw new Error("Invalid input to safeExtend: expected a plain object");return Ne(e,Ot(e._zod.def,{shape:E1(e,t)}))}function Kk(e,t){if(!t?._zod?.def)throw new Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let r={};Wn(r,e,Reflect.ownKeys(Wt(e))),Wn(r,t,Reflect.ownKeys(Wt(t)));let i=Ot(e._zod.def,{shape:r,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return Ne(e,i)}function Wk(e,t,r,i="partial"){let o=t._zod.def.checks;if(o&&o.length>0)throw new Error(`.${i}() cannot be used on object schemas containing refinements`);let s=r?new Set(gs(t,r)):void 0,c={};return Wn(c,t,Reflect.ownKeys(Wt(t)),e&&((l,u)=>s&&!s.has(u)?l:new e({type:"optional",innerType:l}))),Ne(t,Ot(t._zod.def,{shape:c,checks:[]}))}function Qk(e,t,r){let i=r?new Set(gs(t,r)):void 0,n={};return Wn(n,t,Reflect.ownKeys(Wt(t)),(o,a)=>i&&!i.has(a)?o:new e({type:"nonoptional",innerType:o})),Ne(t,Ot(t._zod.def,{shape:n}))}function ut(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1}function Vd(e,t=0){if(e.aborted===!0)return!0;for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue===!1)return!0;return!1}function ht(e,t){return t.map(r=>{var i;return(i=r).path??(i.path=[]),r.path.unshift(e),r})}function Nr(e){return typeof e=="string"?e:e?.message}function qr(e){let t=[];for(let r of e??[]){let i=r._zod.def;if(!/_(length|size)$|_equals$/.test(i.check))break;let n=i.maximum??i.length??i.size;n>=0&&t.push([n,r])}return t}function Si(e,t,r){var i;for(let n=t;n<e.length;n++)(i=e[n]).schema??(i.schema=r)}function gt(e,t,r){var i;let n=e.inst?._zod?.traits;n?.has("$ZodType")&&(n.has("$ZodCheck")?(i=e).schema??(i.schema=e.inst):e.schema=e.inst);let o=e.schema!==e.inst?e.schema?._zod.def?.error:void 0,a=e.message?e.message:Nr(e.inst?._zod.def?.error?.(e))??Nr(o?.(e))??Nr(t?.error?.(e))??Nr(r.customError?.(e))??Nr(r.localeError?.(e))??"Invalid input",s={};for(let c of Object.keys(e))c==="inst"||c==="schema"||c==="continue"||c==="input"||c==="__proto__"||(s[c]=e[c]);return s.path??(s.path=[]),s.message=a,t?.reportInput&&(s.input=e.input),s}function ki(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}var Xk=/[\uD800-\uDBFF]/;function Xn(e){let t=e.length;if(!Xk.test(e))return t;let r=t;for(let i=0;i<t-1;i++)(e.charCodeAt(i)&64512)===55296&&(e.charCodeAt(i+1)&64512)===56320&&(r--,i++);return r}function wi(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 r=e;if(r&&Object.getPrototypeOf(r)!==Object.prototype&&"constructor"in r&&r.constructor)return r.constructor.name}}return t}function Lr(...e){let[t,r,i]=e;return typeof t=="string"?{message:t,code:"custom",input:r,inst:i}:{...t}}function Yk(e){return Object.entries(e).filter(([t,r])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function C1(e){let t=atob(e),r=new Uint8Array(t.length);for(let i=0;i<t.length;i++)r[i]=t.charCodeAt(i);return r}function P1(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function ew(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),r="=".repeat((4-t.length%4)%4);return C1(t+r)}function tw(e){return P1(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function nw(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let r=new Uint8Array(t.length/2);for(let i=0;i<t.length;i+=2)r[i/2]=Number.parseInt(t.slice(i,i+2),16);return r}function rw(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var jd=class{constructor(...t){}};function Hd(e,t){for(let r in t){let i=Object.getOwnPropertyDescriptor(t,r);i.get?Object.defineProperty(e,r,{...i,enumerable:!1}):iw(e,r,i.value)}}function hn(e,t,r,i=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:i,value:r}),r}function $i(e,t,r){return hn(e,t,r,!1)}function ow(e,t){for(let r in e){let i=e[r];Object.defineProperty(t,r,{configurable:!0,enumerable:!0,get(){return hn(this,r,i(this))},set(n){hn(this,r,n)}})}return t}function iw(e,t,r){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?r:hn(this,t,r.bind(this))},set(i){hn(this,t,i)}})}function aw(e,t){let r=Object.getPrototypeOf(e);return t in r?void 0:r}var Ud,fn=!1,sw={configurable:!0,get(){fn=!0}};function xe(e,t,r){let i=Object.getPrototypeOf(e._zod);if(t in i&&Ud!==e._zod){Ud=void 0;return}Ud=e._zod,Object.defineProperty(i,t,{configurable:!0,get(){Object.defineProperty(this,t,sw);let n=fn;fn=!1;try{let o=r(this);return fn?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:o}),fn=fn||n,o}catch(o){throw delete this[t],fn=fn||n,o}},set(n){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:n})}})}function cw(e,t,r,i){let n=aw(e,t);n&&Object.defineProperty(n,t,{configurable:!0,get(){let o={configurable:!0,writable:!0,enumerable:i,value:void 0};return Object.defineProperty(this,t,o),o.value=r(this),Object.defineProperty(this,t,o),o.value},set(o){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:i,value:o})}})}var vs="~constantCatch";function Zd(e){let t=()=>e;return t[vs]=!0,t}var O1,xi=Object.freeze({status:"aborted"}),Gd={value:void 0,enumerable:!1},N1="captureStackTrace"in Error?Error:null;function lw(e){let t=N1;if(t){let r=t.stackTraceLimit;if(typeof r=="number"){try{t.stackTraceLimit=0}catch{return N1=null,new e}try{return new e}finally{t.stackTraceLimit=r}}}return new e}function N(e,t,r,i){let n={};function o(f){this.def=f,this.constr=d,this.traits=new Set}o.prototype=n;let a=r,s=a&&new WeakSet;function c(f,h){if(f._zod){if(f._zod.traits.has(e))return}else{Gd.value=new o(h);try{Object.defineProperty(f,"_zod",Gd)}finally{Gd.value=void 0}}if(f._zod.traits.add(e),t(f,h),s){let b=Object.getPrototypeOf(f),S=f._zod.constr.prototype,y=b;for(;y&&y!==S;)y=Object.getPrototypeOf(y);let x=y??b;s.has(x)||(s.add(x),Hd(x,a))}let g=d.prototype;for(let b in g)Object.prototype.hasOwnProperty.call(g,b)&&(b in f||(f[b]=g[b].bind(f)))}let l=i?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(f){let h=i?.Parent?lw(u):this;c(h,f);let g=h._zod.deferred;if(g){for(let S of g)S();h._zod.deferred=void 0}let b=globalThis.__zod_globalConfig?.postProcessor;return b&&b(h),h}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:f=>i?.Parent&&f instanceof i.Parent?!0:f?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var Jd=Symbol("zod_brand"),vt=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},gn=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(O1=globalThis).__zod_globalConfig??(O1.__zod_globalConfig={});var Xe=globalThis.__zod_globalConfig;function He(e){return e&&Object.assign(Xe,e),Xe}function uw(){let e=this._zod;return e.message??(e.message=JSON.stringify(e.def,Ar,2)),e.message}function dw(e){this._zod.message=e}var pw={get:uw,set:dw,enumerable:!0,configurable:!0},Kd={value:void 0,enumerable:!1},U1=new WeakSet([Object.prototype,Error.prototype]),A1=(e,t)=>{e.name="$ZodError",Kd.value=t,Object.defineProperty(e,"issues",Kd),Kd.value=void 0,Object.defineProperty(e,"message",pw);let r=Object.getPrototypeOf(e);U1.has(r)||(U1.add(r),Object.defineProperty(r,"toString",{configurable:!0,enumerable:!1,get(){let i=()=>this.message;return Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,"toString",{value:i,configurable:!0,writable:!0})}}))},Wd=N("$ZodError",A1),yt=N("$ZodError",A1,void 0,{Parent:Error});function mw(e,t,r){return Object.prototype.hasOwnProperty.call(e,t)||(t==="__proto__"?Object.defineProperty(e,t,{value:r(),writable:!0,enumerable:!0,configurable:!0}):e[t]=r()),e[t]}function Ti(e,t=r=>r.message){let r={},i=[];for(let n of e.issues)n.path.length>0?mw(r,n.path[0],()=>[]).push(t(n)):i.push(t(n));return{formErrors:i,fieldErrors:r}}function Ri(e,t=r=>r.message){let r={_errors:[]},i=(n,o=[])=>{for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)r._errors.push(t(a));else{let c=r,l=0;for(;l<s.length;){let u=s[l],d=l===s.length-1;if(u==="_errors"){d&&c._errors.push(t(a)),l++;continue}Object.prototype.hasOwnProperty.call(c,u)||Object.defineProperty(c,u,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let f=c[u];d&&f._errors.push(t(a)),c=f,l++}}}};return i(e),r}function Qd(e,t=r=>r.message){let r={errors:[]},i=(n,o=[])=>{var a;for(let s of n.issues)if(s.code==="invalid_union"&&s.errors.length)s.errors.map(c=>i({issues:c},[...o,...s.path]));else if(s.code==="invalid_key")i({issues:s.issues},[...o,...s.path]);else if(s.code==="invalid_element")i({issues:s.issues},[...o,...s.path]);else{let c=[...o,...s.path];if(c.length===0){r.errors.push(t(s));continue}let l=r,u=0;for(;u<c.length;){let d=c[u],f=u===c.length-1;typeof d=="string"?(l.properties??(l.properties={}),Object.prototype.hasOwnProperty.call(l.properties,d)||Object.defineProperty(l.properties,d,{value:{errors:[]},enumerable:!0,writable:!0,configurable:!0}),l=l.properties[d]):(l.items??(l.items=[]),(a=l.items)[d]??(a[d]={errors:[]}),l=l.items[d]),f&&l.errors.push(t(s)),u++}}};return i(e),r}function j1(e){let t=[],r=e.map(i=>typeof i=="object"?i.key:i);for(let i of r)typeof i=="number"?t.push(`[${i}]`):typeof i=="symbol"?t.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?t.push(`[${JSON.stringify(i)}]`):(t.length&&t.push("."),t.push(i));return t.join("")}function Xd(e){let t=[],r=[...e.issues].sort((i,n)=>(i.path??[]).length-(n.path??[]).length);for(let i of r)t.push(`\u2716 ${i.message}`),i.path?.length&&t.push(` \u2192 at ${j1(i.path)}`);return t.join(`
|
|
5
|
+
`)}function ys(e,t){return{callee:t?.callee??e,Err:t?.Err}}var Dr=e=>{let t=(r,i,n,o)=>{let a=n?{...n,async:!1}:{async:!1},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise)throw new vt;if(s.issues.length){let c=new(o?.Err??e)(s.issues.map(l=>gt(l,a,He())));throw hs(c,o?.callee??t),c}return s.value};return t},bs=Dr(yt),Fr=e=>{let t=async(r,i,n,o)=>{let a=n?{...n,async:!0}:{async:!0},s=r._zod.run({value:i,issues:[]},a);if(s instanceof Promise&&(s=await s),s.issues.length){let c=new(o?.Err??e)(s.issues.map(l=>gt(l,a,He())));throw hs(c,o?.callee??t),c}return s.value};return t},_s=Fr(yt),Vr=e=>(t,r,i)=>{let n=i?{...i,async:!1}:{async:!1},o=t._zod.run({value:r,issues:[]},n);if(o instanceof Promise)throw new vt;return o.issues.length?M1(e,o.issues,n):{success:!0,data:o.value}},hw=Vr(yt);function M1(e,t,r){let i;return{success:!1,get error(){return i||(i=new e(t.map(n=>gt(n,r,He()))),t=void 0,r=void 0),i},set error(n){i=n,t=void 0,r=void 0}}}var Hr=e=>async(t,r,i)=>{let n=i?{...i,async:!0}:{async:!0},o=t._zod.run({value:r,issues:[]},n);return o instanceof Promise&&(o=await o),o.issues.length?M1(e,o.issues,n):{success:!0,data:o.value}},gw=Hr(yt),vw=Symbol.for("zod.compile.invalid"),yw=Symbol.for("zod.compile.fallback"),Ii=((e,t,r)=>{let i=e._zod.bag.validator;if(i!==void 0){if(i(t)!==vw)return!0;if(i.definite===!0&&r===void 0)return!1}return bw(e,t,r)});function bw(e,t,r){let i=r?{...r,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},n=e._zod.bag.fallbackRun,o;if(n?(i[yw]=!0,o=n({value:t,issues:[]},i)):o=e._zod.run({value:t,issues:[]},i),o instanceof Promise)throw new vt;return o.issues.length===0}var zi=async(e,t,r)=>{let i=r?{...r,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},n=e._zod.run({value:t,issues:[]},i);return n instanceof Promise&&(n=await n),n.issues.length===0},Ss=e=>{let t=Dr(e),r=(i,n,o,a)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return t(i,n,s,ys(r,a))};return r},_w=Ss(yt),ks=e=>{let t=Dr(e),r=(i,n,o,a)=>t(i,n,o,ys(r,a));return r},Sw=ks(yt),ws=e=>{let t=Fr(e),r=async(i,n,o,a)=>{let s=o?{...o,direction:"backward"}:{direction:"backward"};return await t(i,n,s,ys(r,a))};return r},kw=ws(yt),$s=e=>{let t=Fr(e),r=async(i,n,o,a)=>await t(i,n,o,ys(r,a));return r},ww=$s(yt),xs=e=>(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Vr(e)(t,r,n)},$w=xs(yt),Ts=e=>(t,r,i)=>Vr(e)(t,r,i),xw=Ts(yt),Rs=e=>async(t,r,i)=>{let n=i?{...i,direction:"backward"}:{direction:"backward"};return Hr(e)(t,r,n)},Tw=Rs(yt),Is=e=>async(t,r,i)=>Hr(e)(t,r,i),Rw=Is(yt);var zt={};Kt(zt,{anyString:()=>xp,base64:()=>gp,base64url:()=>vp,bigint:()=>Rp,boolean:()=>Ip,browserEmail:()=>Uw,cidrv4:()=>fp,cidrv6:()=>hp,creditCard:()=>zs,cuid:()=>ep,cuid2:()=>tp,currencyCode:()=>Sp,date:()=>kp,datetime:()=>$p,domain:()=>bp,duration:()=>sp,e164:()=>_p,email:()=>lp,emoji:()=>up,extendedDuration:()=>Iw,guid:()=>cp,hex:()=>Op,hostname:()=>yp,html5Email:()=>Pw,httpProtocol:()=>Ei,iban:()=>Es,idnEmail:()=>Nw,integer:()=>Ci,ipv4:()=>dp,ipv6:()=>pp,ksuid:()=>op,lowercase:()=>Cp,mac:()=>mp,md5_base64:()=>qw,md5_base64url:()=>Lw,md5_hex:()=>Mw,nanoid:()=>ip,nanoidOfLength:()=>ap,null:()=>zp,number:()=>Xt,rfc5322Email:()=>Ow,sha1_base64:()=>Fw,sha1_base64url:()=>Vw,sha1_hex:()=>Dw,sha256_base64:()=>Zw,sha256_base64url:()=>Gw,sha256_hex:()=>Hw,sha384_base64:()=>Bw,sha384_base64url:()=>Kw,sha384_hex:()=>Jw,sha512_base64:()=>Qw,sha512_base64url:()=>Xw,sha512_hex:()=>Ww,string:()=>Tp,time:()=>wp,ulid:()=>np,undefined:()=>Ep,unicodeEmail:()=>q1,uppercase:()=>Pp,uuid:()=>Yn,uuid4:()=>zw,uuid6:()=>Ew,uuid7:()=>Cw,xid:()=>rp});var ep=/^[cC][0-9a-z]{6,}$/,tp=/^[0-9a-z]+$/,np=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,rp=/^[0-9a-vA-V]{20}$/,op=/^[A-Za-z0-9]{27}$/,ip=/^[a-zA-Z0-9_-]{21}$/;function ap(e){return new RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var sp=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Iw=/^[-+]?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)?)??$/,cp=/^([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})$/,Yn=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)$/,zw=Yn(4),Ew=Yn(6),Cw=Yn(7),lp=/^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Pw=/^[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])?)*$/,Ow=/^(([^<>()\[\]\\.,;:\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,}))$/,q1=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Nw=q1,Uw=/^[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])?)*$/,Aw="^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";function up(){return new RegExp(Aw,"u")}var dp=/^(?:(?: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])$/,pp=/^(([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}|:))$/,mp=e=>{let t=It(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},fp=/^((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])$/,hp=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,gp=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,vp=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,yp=/^(?=.{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])?)*\.?$/,bp=/^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,63}$/,Ei=/^https?$/,_p=/^\+[1-9]\d{6,14}$/,zs=/^\d(?:[ -]?\d){11,18}$/,Sp=/^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/,Es=/^[A-Z]{2}(?!00|01|99)\d{2}[A-Z0-9]{11,30}$/,L1="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))";function jw(e){return new RegExp(`^${e}$`)}var kp=jw(L1);function Yd(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}}`:e.seconds?`${t}:[0-5]\\d(?:\\.\\d+)?`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function wp(e){return new RegExp(`^${Yd(e)}$`)}function $p(e){let t=["Z"];e.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${Yd({precision:e.precision,seconds:!0})}(?:${t.join("|")})`,i=e.local?`${r}|${Yd({precision:e.precision})}`:r;return new RegExp(`^${L1}T(?:${i})$`)}var xp=/^[\s\S]{0,}$/,Tp=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Rp=/^-?\d+n?$/,Ci=/^-?\d+$/,Xt=/^-?\d+(?:\.\d+)?$/,Ip=/^(?:true|false)$/i,zp=/^null$/i;var Ep=/^undefined$/i;var Cp=/^[^A-Z]*$/,Pp=/^[^a-z]*$/,Op=/^[0-9a-fA-F]*$/;function Pi(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Oi(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Mw=/^[0-9a-fA-F]{32}$/,qw=Pi(22,"=="),Lw=Oi(22),Dw=/^[0-9a-fA-F]{40}$/,Fw=Pi(27,"="),Vw=Oi(27),Hw=/^[0-9a-fA-F]{64}$/,Zw=Pi(43,"="),Gw=Oi(43),Jw=/^[0-9a-fA-F]{96}$/,Bw=Pi(64,""),Kw=Oi(64),Ww=/^[0-9a-fA-F]{128}$/,Qw=Pi(86,"=="),Xw=Oi(86);var Me=N("$ZodCheck",(e,t)=>{var r;e._zod??(e._zod={}),e._zod.def=t,(r=e._zod).onattach??(r.onattach=[])}),Np=e=>{let t=e.value;return!fs(t)&&t.size!==void 0},Up=e=>{let t=e.value;return!fs(t)&&t.length!==void 0},Cs={number:"number",bigint:"bigint",object:"date"},Os=N("$ZodCheckLessThan",(e,t)=>{Me.init(e,t);let r=Cs[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value<=t.value:i.value<t.value)||i.issues.push({origin:Cs[typeof i.value]??r,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ns=N("$ZodCheckGreaterThan",(e,t)=>{Me.init(e,t);let r=Cs[typeof t.value];e._zod.check=i=>{(t.inclusive?i.value>=t.value:i.value>t.value)||i.issues.push({origin:Cs[typeof i.value]??r,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:i.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Ap=N("$ZodCheckMultipleOf",(e,t)=>{Me.init(e,t),e._zod.check=r=>{if(typeof r.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof r.value=="bigint"?t.value!==BigInt(0)&&r.value%t.value===BigInt(0):gi(r.value,t.value)===0)||r.issues.push({origin:typeof r.value,code:"not_multiple_of",divisor:t.value,input:r.value,inst:e,continue:!t.abort})}}),jp=N("$ZodCheckNumberFormat",(e,t)=>{Me.init(e,t),t.format=t.format||"float64";let r=t.format?.includes("int"),i=r?"int":"number",[n,o]=bi[t.format];e._zod.check=a=>{let s=a.value;if(r){if(!Number.isInteger(s)){a.issues.push({expected:i,format:t.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!t.abort});return}}s<n&&a.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),s>o&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),Mp=N("$ZodCheckBigIntFormat",(e,t)=>{Me.init(e,t);let[r,i]=_i[t.format];e._zod.check=n=>{let o=n.value;o<r&&n.issues.push({origin:"bigint",input:o,code:"too_small",minimum:r,inclusive:!0,inst:e,continue:!t.abort}),o>i&&n.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!t.abort})}}),qp=N("$ZodCheckMaxSize",(e,t)=>{var r;Me.init(e,t),(r=e._zod.def).when??(r.when=Np),e._zod.check=i=>{let n=i.value;n.size<=t.maximum||i.issues.push({origin:ki(n),code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Lp=N("$ZodCheckMinSize",(e,t)=>{var r;Me.init(e,t),(r=e._zod.def).when??(r.when=Np),e._zod.check=i=>{let n=i.value;n.size>=t.minimum||i.issues.push({origin:ki(n),code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Dp=N("$ZodCheckSizeEquals",(e,t)=>{var r;Me.init(e,t),(r=e._zod.def).when??(r.when=Np),e._zod.check=i=>{let n=i.value,o=n.size;if(o===t.size)return;let a=o>t.size;i.issues.push({origin:ki(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Fp=N("$ZodCheckMaxLength",(e,t)=>{var r;Me.init(e,t),(r=e._zod.def).when??(r.when=Up),e._zod.check=i=>{let n=i.value,o=n.length;if((typeof n=="string"&&o>t.maximum?Xn(n):o)<=t.maximum)return;let s=wi(n);i.issues.push({origin:s,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Vp=N("$ZodCheckMinLength",(e,t)=>{var r;Me.init(e,t),(r=e._zod.def).when??(r.when=Up),e._zod.check=i=>{let n=i.value,o=n.length;if((typeof n=="string"&&o>=t.minimum&&o<t.minimum*2?Xn(n):o)>=t.minimum)return;let s=wi(n);i.issues.push({origin:s,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),Hp=N("$ZodCheckLengthEquals",(e,t)=>{var r;Me.init(e,t),(r=e._zod.def).when??(r.when=Up),e._zod.check=i=>{let n=i.value,o=n.length,a=typeof n=="string"&&o>=t.length&&o<=t.length*2?Xn(n):o;if(a===t.length)return;let s=wi(n),c=a>t.length;i.issues.push({origin:s,...c?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!t.abort})}}),Zr=N("$ZodCheckStringFormat",(e,t)=>{var r,i;Me.init(e,t),t.pattern?(r=e._zod).check??(r.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(i=e._zod).check??(i.check=()=>{})}),Zp=N("$ZodCheckRegex",(e,t)=>{Zr.init(e,t),e._zod.check=r=>{t.pattern.lastIndex=0,!t.pattern.test(r.value)&&r.issues.push({origin:"string",code:"invalid_format",format:"regex",input:r.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),Gp=N("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=Cp),Zr.init(e,t)}),Jp=N("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=Pp),Zr.init(e,t)}),Bp=N("$ZodCheckIncludes",(e,t)=>{Me.init(e,t);let r=It(t.includes),i=new RegExp(typeof t.position=="number"?`^.{${t.position},}${r}`:r);t.pattern=i,e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Kp=N("$ZodCheckStartsWith",(e,t)=>{Me.init(e,t);let r=new RegExp(`^${It(t.prefix)}.*`);t.pattern??(t.pattern=r),e._zod.check=i=>{i.value.startsWith(t.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:i.value,inst:e,continue:!t.abort})}}),Wp=N("$ZodCheckEndsWith",(e,t)=>{Me.init(e,t);let r=new RegExp(`.*${It(t.suffix)}$`);t.pattern??(t.pattern=r),e._zod.check=i=>{i.value.endsWith(t.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:i.value,inst:e,continue:!t.abort})}});function Ps(e,t,r){e.issues.length&&t.issues.push(...ht(r,e.issues))}var Qp=N("$ZodCheckProperty",(e,t)=>{Me.init(e,t),e._zod.check=r=>{let i=t.schema._zod.run({value:r.value[t.property],issues:[]},{});if(i instanceof Promise)return i.then(n=>Ps(n,r,t.property));Ps(i,r,t.property)}}),Xp=N("$ZodCheckProperties",(e,t)=>{Me.init(e,t),$i(e,Symbol.iterator,function*(){yield e});let r;e._zod.check=i=>{if(i.value==null){i.issues.push({expected:"object",code:"invalid_type",input:i.value,inst:e});return}r??(r=Reflect.ownKeys(t.shape).map(a=>[a,t.shape[a]]));let n=i.value,o;for(let[a,s]of r){let c=s._zod.run({value:n[a],issues:[]},{});c instanceof Promise?(o??(o=[]),o.push(c.then(l=>Ps(l,i,a)))):Ps(c,i,a)}if(o)return Promise.all(o).then(()=>{})}}),Yp=N("$ZodCheckMimeType",(e,t)=>{Me.init(e,t);let r=new Set(t.mime);e._zod.check=i=>{r.has(i.value.type)||i.issues.push({code:"invalid_value",values:t.mime,input:i.value.type,inst:e,continue:!t.abort})}}),em=N("$ZodCheckOverwrite",(e,t)=>{Me.init(e,t),e._zod.check=r=>{r.value=t.tx(r.value)}});var er=class{constructor(t=[],r={}){this.content=[],this.indent=0,this.args=t,this.closed=r}indented(t){this.indent+=1;try{t(this)}finally{this.indent-=1}}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let i=t.split(`
|
|
6
|
+
`).filter(a=>a),n=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(n)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let t=Function,r=this?.content??[""];return new t(...Object.keys(this.closed),`return function (${this.args.join(", ")}) {
|
|
7
|
+
${r.join(`
|
|
8
|
+
`)}
|
|
9
|
+
};`)(...Object.values(this.closed))}};var tm={major:4,minor:6,patch:7};var be=N("$ZodType",(e,t)=>{var r;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=tm;let i=e._zod.def.checks,n=e._zod.traits.has("$ZodCheck")?[e,...i??[]]:i?.length?[...i]:[];for(let o of n)for(let a of o._zod.onattach)a(e);if(n.length===0)(r=e._zod).deferred??(r.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let o=(s,c,l)=>{if(s.memo)return s;let u=ut(s),d;for(let f of c){if(f._zod.def.when){if(Vd(s)||!f._zod.def.when(s))continue}else if(u)continue;let h=s.issues.length,g=f._zod.check(s);if(g instanceof Promise&&l?.async===!1)throw new vt;if(d||g instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await g,s.issues.length!==h&&(Si(s.issues,h,e),u||(u=ut(s,h)))});else{if(s.issues.length===h)continue;Si(s.issues,h,e),u||(u=ut(s,h))}}return d?d.then(()=>s):s},a=(s,c,l)=>{if(ut(s))return s.aborted=!0,s;let u=o(c,n,l);if(u instanceof Promise){if(l.async===!1)throw new vt;return u.then(d=>e._zod.parse(d,l))}return e._zod.parse(u,l)};e._zod.run=(s,c)=>{if(c.skipChecks)return e._zod.parse(s,c);if(c.direction==="backward"){let u=e._zod.parse({value:s.value,issues:[]},{...c,skipChecks:!0});return u instanceof Promise?u.then(d=>a(d,s,c)):a(u,s,c)}let l=e._zod.parse(s,c);if(l instanceof Promise){if(c.async===!1)throw new vt;return l.then(u=>o(u,n,c))}return o(l,n,c)}}},{get"~standard"(){return $i(this,"~standard",qs(this))},set"~standard"(e){hn(this,"~standard",e)}}),ry=(e,t)=>e.issues.length?{issues:e.issues.map(r=>gt(r,t,He()))}:{value:e.value};async function Yw(e,t){let r={async:!0};return ry(await e._zod.run({value:t,issues:[]},r),r)}function qs(e){return{validate:t=>{let r={async:!1};try{let i=e._zod.run({value:t,issues:[]},r);if(!(i instanceof Promise))return ry(i,r)}catch{}return Yw(e,t)},vendor:"zod",version:1}}var tr=N("$ZodString",(e,t)=>{be.init(e,t),e._zod.pattern=t.pattern??xp,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=String(r.value)}catch{}return typeof r.value=="string"||r.issues.push({expected:"string",code:"invalid_type",input:r.value,inst:e}),r}}),Ue=N("$ZodStringFormat",(e,t)=>{Zr.init(e,t),tr.init(e,t)}),rm=N("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=cp),Ue.init(e,t)}),om=N("$ZodUUID",(e,t)=>{if(t.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(i===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Yn(i))}else t.pattern??(t.pattern=Yn());Ue.init(e,t)}),im=N("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=lp),Ue.init(e,t)}),am=1,Ni=2;function sm(e){try{return typeof URL<"u"&&typeof URL.canParse=="function"?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Ls(e,t){return!("normalize"in t)&&!("hostname"in t)&&!("protocol"in t)?sm(e)||Ni:oy(e,t)}function oy(e,t){if(!t.normalize&&t.protocol?.source===Ei.source&&!/^https?:\/\//i.test(e))return am;try{if(typeof URL<"u"){let r=URL;if(typeof r.parse=="function")return r.parse(e)??Ni}return new URL(e)}catch{return Ni}}var e$=/[\t\n\r]/g;function Ui(e){return e.replace(e$,"")}function Ds(e,t){return t.lastIndex=0,t.test(e.hostname)}function Fs(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)}var cm=N("$ZodURL",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{try{let i=r.value.trim(),n=Ls(i,t);if(n===am){r.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:r.value,inst:e,continue:!t.abort});return}if(n===Ni){r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort});return}if(n===!0){r.value=Ui(i);return}t.hostname&&!Ds(n,t.hostname)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:r.value,inst:e,continue:!t.abort}),t.protocol&&!Fs(n,t.protocol)&&r.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:r.value,inst:e,continue:!t.abort}),r.value=t.normalize?n.href:Ui(i);return}catch{r.issues.push({code:"invalid_format",format:"url",input:r.value,inst:e,continue:!t.abort})}}}),lm=N("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=up()),Ue.init(e,t)}),um=N("$ZodNanoID",(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw new Error(`Invalid nanoid length: ${t.length}`);t.pattern??(t.pattern=t.length===void 0?ip:ap(t.length)),Ue.init(e,t)}),dm=N("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=ep),Ue.init(e,t)}),pm=N("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=tp),Ue.init(e,t)}),mm=N("$ZodULID",(e,t)=>{t.pattern??(t.pattern=np),Ue.init(e,t)}),fm=N("$ZodXID",(e,t)=>{t.pattern??(t.pattern=rp),Ue.init(e,t)}),hm=N("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=op),Ue.init(e,t)}),gm=N("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=$p(t)),Ue.init(e,t)}),vm=N("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=kp),Ue.init(e,t)}),ym=N("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=wp(t)),Ue.init(e,t)}),bm=N("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=sp),Ue.init(e,t)}),_m=N("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=dp),Ue.init(e,t)}),t$=/^[0-9a-fA-F:.]+$/;function Ai(e){return t$.test(e)?sm(`http://[${e}]`):!1}var Sm=N("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=pp),Ue.init(e,t),e._zod.check=r=>{Ai(r.value)||r.issues.push({code:"invalid_format",format:"ipv6",input:r.value,inst:e,continue:!t.abort})}}),km=N("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=mp(t.delimiter)),Ue.init(e,t)}),wm=N("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=fp),Ue.init(e,t)});function Vs(e){let t=e.split("/");if(t.length!==2)return!1;let[r,i]=t;if(!i)return!1;let n=Number(i);return`${n}`!==i||n<0||n>128?!1:Ai(r)}var $m=N("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=hp),Ue.init(e,t),e._zod.check=r=>{Vs(r.value)||r.issues.push({code:"invalid_format",format:"cidrv6",input:r.value,inst:e,continue:!t.abort})}});function ji(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Hs=/^[0-9a-zA-Z+/]*={0,2}$/,xm=N("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Hs),Ue.init(e,t),e._zod.check=r=>{ji(r.value)||r.issues.push({code:"invalid_format",format:"base64",input:r.value,inst:e,continue:!t.abort})}}),Mi=/^[A-Za-z0-9_-]*$/;function Zs(e){if(!Mi.test(e))return!1;let t=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),r=t.padEnd(Math.ceil(t.length/4)*4,"=");return ji(r)}var Tm=N("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=Mi),Ue.init(e,t),e._zod.check=r=>{Zs(r.value)||r.issues.push({code:"invalid_format",format:"base64url",input:r.value,inst:e,continue:!t.abort})}}),Rm=N("$ZodE164",(e,t)=>{t.pattern??(t.pattern=_p),Ue.init(e,t)}),n$=/[- ]/g;function r$(e){let t=e.length,r=1,i=0;for(;t;){let n=e.charCodeAt(--t)-48;r^=1,i+=r?[0,2,4,6,8,1,3,5,7,9][n]:n}return i%10===0}function Gs(e){return zs.test(e)?r$(e.replace(n$,"")):!1}var Im=N("$ZodCreditCard",(e,t)=>{t.pattern??(t.pattern=zs),Ue.init(e,t),e._zod.check=r=>{Gs(r.value)||r.issues.push({code:"invalid_format",format:"credit_card",input:r.value,inst:e,continue:!t.abort})}});function o$(e){let t=0,r=e.length;for(let i=4;i<r;i++){let n=e.charCodeAt(i);t=(n>=65?t*100+(n-55):t*10+(n-48))%97}for(let i=0;i<4;i++){let n=e.charCodeAt(i);t=(n>=65?t*100+(n-55):t*10+(n-48))%97}return t===1}function Js(e){return Es.test(e)?o$(e):!1}var zm=N("$ZodIBAN",(e,t)=>{t.pattern??(t.pattern=Es),Ue.init(e,t),e._zod.check=r=>{Js(r.value)||r.issues.push({code:"invalid_format",format:"iban",input:r.value,inst:e,continue:!t.abort})}});function Bs(e,t=null){try{let r=e.split(".");if(r.length!==3)return!1;let[i]=r;if(!i)return!1;let n=JSON.parse(atob(i));return!("typ"in n&&n?.typ!=="JWT"||!n.alg||t&&(!("alg"in n)||n.alg!==t))}catch{return!1}}var Em=N("$ZodJWT",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{Bs(r.value,t.alg)||r.issues.push({code:"invalid_format",format:"jwt",input:r.value,inst:e,continue:!t.abort})}}),Cm=N("$ZodCustomStringFormat",(e,t)=>{Ue.init(e,t),e._zod.check=r=>{t.fn(r.value)||r.issues.push({code:"invalid_format",format:t.format,input:r.value,inst:e,continue:!t.abort})}}),Ks=N("$ZodNumber",(e,t)=>{be.init(e,t),e._zod.pattern=Xt,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=Number(r.value)}catch{}let n=r.value;if(typeof n=="number"&&!Number.isNaN(n)&&Number.isFinite(n))return r;let o=typeof n=="number"?Number.isNaN(n)?"NaN":Number.isFinite(n)?void 0:String(n):void 0;return r.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...o?{received:o}:{}}),r}}),Pm=N("$ZodNumberFormat",(e,t)=>{jp.init(e,t),Ks.init(e,t)}),qi=N("$ZodBoolean",(e,t)=>{be.init(e,t),e._zod.pattern=Ip,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=!!r.value}catch{}let n=r.value;return typeof n=="boolean"||r.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),r}}),Ws=N("$ZodBigInt",(e,t)=>{be.init(e,t),e._zod.pattern=Rp,e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=BigInt(r.value)}catch{}return typeof r.value=="bigint"||r.issues.push({expected:"bigint",code:"invalid_type",input:r.value,inst:e}),r}}),Om=N("$ZodBigIntFormat",(e,t)=>{Mp.init(e,t),Ws.init(e,t)}),Nm=N("$ZodSymbol",(e,t)=>{be.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n=="symbol"||r.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),r}}),Um=N("$ZodUndefined",(e,t)=>{be.init(e,t),e._zod.pattern=Ep,e._zod.values=new Set([void 0]),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),r}}),Am=N("$ZodNull",(e,t)=>{be.init(e,t),e._zod.pattern=zp,e._zod.values=new Set([null]),e._zod.parse=(r,i)=>{let n=r.value;return n===null||r.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),r}}),jm=N("$ZodAny",(e,t)=>{be.init(e,t),e._zod.parse=r=>r}),Mm=N("$ZodUnknown",(e,t)=>{be.init(e,t),e._zod.parse=r=>r}),qm=N("$ZodNever",(e,t)=>{be.init(e,t),e._zod.parse=(r,i)=>(r.issues.push({expected:"never",code:"invalid_type",input:r.value,inst:e}),r)}),Lm=N("$ZodVoid",(e,t)=>{be.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return typeof n>"u"||r.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),r}}),Dm=N("$ZodDate",(e,t)=>{be.init(e,t),e._zod.parse=(r,i)=>{if(t.coerce)try{r.value=new Date(r.value)}catch{}let n=r.value,o=n instanceof Date;return o&&!Number.isNaN(n.getTime())||r.issues.push({expected:"date",code:"invalid_type",input:n,...o?{received:"Invalid Date"}:{},inst:e}),r}});function Fm(e,t){let r=qr(e._zod.def.checks);if(!r.length)return;let i=Math.min(...r.map(o=>o[0])),n=e._zod.parse;e._zod.parse=(o,a)=>{let s=t(o.value);if(s>i&&!a?.skipChecks&&a?.direction!=="backward"){for(let[c,l]of qr(e._zod.def.checks))if(s>c&&l._zod.def.when(o)){let u=o.issues.length;return l._zod.check(o),o.issues[u].continue=!1,Si(o.issues,u,e),o}}return n(o,a)}}var i$=e=>Array.isArray(e)?e.length:-1,a$=e=>e instanceof Map?e.size:-1,s$=e=>e instanceof Set?e.size:-1;function F1(e,t,r){e.issues.length&&t.issues.push(...ht(r,e.issues)),t.value[r]=e.value}var Vm=N("$ZodArray",(e,t)=>{be.init(e,t);let r=Xe.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({expected:"array",code:"invalid_type",input:o,inst:e}),i;i.value=r?r.alloc(e,i,Array(o.length),n):Array(o.length);let a=[],s=n?.abortEarly;for(let c=0;c<o.length;c++){let l=o[c],u=t.element._zod.run({value:l,issues:[]},n);if(u instanceof Promise)a.push(u.then(d=>F1(d,i,c)));else if(F1(u,i,c),s&&u.issues.length!==0&&ut(u))break}return a.length?Promise.all(a).then(()=>i):i},Fm(e,i$)});function Ms(e,t,r,i,n,o){let a=r in i,s=o==="optional";if(!(!a&&s&&n==="optional")){if(e.issues.length){if(n!==void 0&&s&&!a)return;t.issues.push(...ht(r,e.issues))}if(!a&&n===void 0){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[r]});return}e.value===void 0?(a||n==="defaulted"&&!s)&&(t.value[r]=void 0):t.value[r]=e.value}}var c$=[];function iy(e){let t=Object.keys(e.shape),r=Object.getOwnPropertySymbols(e.shape),i=r.length?r:c$,n=i.length?[...t,...i]:t;for(let a of n)if(!e.shape?.[a]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${String(a)}": expected a Zod schema`);let o=Fd(e.shape);return{...e,allKeys:n,symbolKeys:i,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(o)}}function ay(e,t,r,i,n,o,a){let s=[],c=n.keySet,l=n.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,h=0;for(let g in t){if(a&&r.issues.length!==h){if(ut(r,h))break;h=r.issues.length}if(c.has(g))continue;if(g==="__proto__"){u==="never"&&s.push(g);continue}if(u==="never"){s.push(g);continue}let b=l.run({value:t[g],issues:[]},i);b instanceof Promise?e.push(b.then(S=>Ms(S,r,g,t,d,f))):Ms(b,r,g,t,d,f)}return s.length&&r.issues.push({code:"unrecognized_keys",keys:s,input:t,inst:o,continue:!0}),e.length?Promise.all(e).then(()=>r):r}var sy=N("$ZodObject",(e,t)=>{be.init(e,t);let r=Object.getOwnPropertyDescriptor(t,"shape"),i=r?.get?r.get.raw:t.shape??{};if(i){let l=()=>{let u={...i};return Object.defineProperty(t,"shape",{value:u}),l.raw=u,u};l.raw=i,Object.defineProperty(t,"shape",{get:l})}let n=jr(()=>iy(t));xe(e,"propValues",l=>{let u=l.def.shape,d={};for(let f in u){let h=u[f]._zod;if(h.values){Object.prototype.hasOwnProperty.call(d,f)||tt(d,f,new Set);for(let g of h.values)d[f].add(g);h.optin!==void 0&&d[f].add(void 0)}}return d});let o=Qn,a=t.catchall,s,c=Xe.memoizer;c?.attach(e),e._zod.parse=(l,u)=>{s??(s=n.value);let d=l.value;if(!o(d))return l.issues.push({expected:"object",code:"invalid_type",input:d,inst:e}),l;l.value=c?c.alloc(e,l,{},u):{};let f=[],h=s.shape,g=u?.abortEarly,b=l.issues.length;for(let S of s.allKeys){if(g&&l.issues.length!==b){if(ut(l,b))break;b=l.issues.length}if(S==="__proto__")continue;let y=h[S],x=y._zod.optin,k=y._zod.optout,I=y._zod.run({value:d[S],issues:[]},u);I instanceof Promise?f.push(I.then(O=>Ms(O,l,S,d,x,k))):Ms(I,l,S,d,x,k)}return a?ay(f,d,l,u,n.value,e,g===!0):f.length?Promise.all(f).then(()=>l):l}}),Hm=N("$ZodObjectJIT",(e,t)=>{sy.init(e,t);let r=e._zod.parse,i=jr(()=>iy(t)),n=Xe.memoizer,o=h=>{let g=i.value,b=g.symbolKeys,S=new er(["payload","ctx"],{shape:h,inst:e,memo:n,syms:b}),y=O=>`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`,x=(O,T)=>`
|
|
10
|
+
let ${O}_ab = false;
|
|
11
|
+
for (let i = 0; i < ${O}.issues.length; i++) {
|
|
12
|
+
const iss = ${O}.issues[i];
|
|
13
|
+
iss.path = iss.path ? [${T}, ...iss.path] : [${T}];
|
|
14
|
+
payload.issues.push(iss);
|
|
15
|
+
if (iss.continue !== true) ${O}_ab = true;
|
|
16
|
+
}
|
|
17
|
+
if (${O}_ab && ctx && ctx.abortEarly) {
|
|
18
|
+
payload.value = newResult;
|
|
19
|
+
return payload;
|
|
20
|
+
}`;S.write("const input = payload.value;");let k=Object.create(null),I=0;for(let O of g.allKeys)k[O]=`key_${I++}`;S.write(n?"const newResult = memo.alloc(inst, payload, {}, ctx);":"const newResult = {};");for(let O of g.allKeys){if(O==="__proto__")continue;let T=k[O],_=typeof O=="symbol"?`syms[${b.indexOf(O)}]`:lt(O),R=`${_} in input`,A=h[O],F=A?._zod?.optin,M=F!==void 0,V=A?._zod?.optout==="optional";if(S.write(`const ${T} = ${y(_)};`),M&&V){let te=F==="optional"?`${T}_present`:`${T}.value !== undefined || ${T}_present`;S.write(`
|
|
21
|
+
const ${T}_present = ${R};
|
|
22
|
+
if (!${T}.issues.length || ${T}_present) {
|
|
23
|
+
if (${T}.issues.length) {${x(T,_)}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (${te}) {
|
|
27
|
+
newResult[${_}] = ${T}.value;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
`)}else M?(S.write(`
|
|
32
|
+
if (${T}.issues.length) {${x(T,_)}
|
|
33
|
+
}
|
|
34
|
+
`),F==="defaulted"?S.write(`newResult[${_}] = ${T}.value;`):S.write(`
|
|
35
|
+
if (${T}.value !== undefined || ${R}) {
|
|
36
|
+
newResult[${_}] = ${T}.value;
|
|
37
|
+
}
|
|
38
|
+
`)):S.write(`
|
|
39
|
+
const ${T}_present = ${R};
|
|
40
|
+
if (${T}.issues.length) {${x(T,_)}
|
|
41
|
+
}
|
|
42
|
+
if (!${T}_present && !${T}.issues.length) {
|
|
43
|
+
payload.issues.push({
|
|
44
|
+
code: "invalid_type",
|
|
45
|
+
expected: "nonoptional",
|
|
46
|
+
input: undefined,
|
|
47
|
+
path: [${_}]
|
|
48
|
+
});
|
|
49
|
+
if (ctx && ctx.abortEarly) {
|
|
50
|
+
payload.value = newResult;
|
|
51
|
+
return payload;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (${T}_present) {
|
|
56
|
+
newResult[${_}] = ${T}.value;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
`)}return S.write("payload.value = newResult;"),S.write("return payload;"),S.compile()},a,s=Qn,c=!Xe.jitless,u=c&&Ld.value,d=t.catchall,f;e._zod.parse=(h,g)=>{f??(f=i.value);let b=h.value;return s(b)?c&&u&&g?.async===!1&&g.jitless!==!0?(a||(a=o(t.shape)),h=a(h,g),d?ay([],b,h,g,f,e,g?.abortEarly===!0):h):r(h,g):(h.issues.push({expected:"object",code:"invalid_type",input:b,inst:e}),h)}});function V1(e,t,r,i){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let n=e.filter(o=>!ut(o));return n.length===1?(t.value=n[0].value,n[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>gt(a,i,He())))}),t)}var Li=N("$ZodUnion",(e,t)=>{be.init(e,t),xe(e,"optin",i=>i.def.options.some(n=>n._zod.optin==="defaulted")?"defaulted":i.def.options.some(n=>n._zod.optin!==void 0)?"optional":void 0),xe(e,"optout",i=>i.def.options.some(n=>n._zod.optout==="optional")?"optional":void 0),xe(e,"values",i=>{if(i.def.options.every(n=>n._zod.values))return new Set(i.def.options.flatMap(n=>Array.from(n._zod.values)))}),xe(e,"pattern",i=>{if(i.def.options.every(n=>n._zod.pattern)){let n=i.def.options.map(o=>o._zod.pattern);return new RegExp(`^(${n.map(o=>Qt(o.source)).join("|")})$`)}});let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1,a=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},n);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(s=>V1(s,i,e,n)):V1(a,i,e,n)}});function H1(e,t,r,i){let n=[];for(let o=0;o<e.length;o++)e[o].issues.length===0&&n.push(o);return n.length===1?(t.value=e[n[0]].value,t):(n.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:e.map(o=>o.issues.map(a=>gt(a,i,He())))}):t.issues.push({code:"invalid_union",input:t.value,inst:r,errors:[],inclusive:!1,matches:n}),t)}var Zm=N("$ZodXor",(e,t)=>{Li.init(e,t),t.inclusive=!1;let r=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(i,n)=>{if(r)return r(i,n);let o=!1,a=[];for(let s of t.options){let c=s._zod.run({value:i.value,issues:[]},n);c instanceof Promise?(a.push(c),o=!0):a.push(c)}return o?Promise.all(a).then(s=>H1(s,i,e,n)):H1(a,i,e,n)}});function Gm(e,t){let r=e._zod,i=r.bag.optionsMap;i||(i=cy(r.def),r.bag.optionsMap=i);let n=i.get(t);if(n===null)throw new Error(`Ambiguous discriminator value "${String(t)}"`);return n}function cy(e){let t=new Map;for(let r of e.options){let i=r._zod.propValues?.[e.discriminator];if(!i||i.size===0)throw new Error(`Invalid discriminated union option at index "${e.options.indexOf(r)}"`);for(let n of i)if(t.has(n)){if(n!==void 0)throw new Error(`Duplicate discriminator value "${String(n)}"`);t.set(n,null)}else t.set(n,r)}return t}var Jm=N("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,Li.init(e,t);let r=e._zod.parse;xe(e,"propValues",n=>{let o={},a=0;for(let s of n.def.options){let c=s._zod.propValues;if(!c||Object.keys(c).length===0)throw new Error(`Invalid discriminated union option at index "${n.def.options.indexOf(s)}"`);c[n.def.discriminator]?.has(void 0)&&a++;for(let[l,u]of Object.entries(c)){Object.prototype.hasOwnProperty.call(o,l)||tt(o,l,new Set);for(let d of u)o[l].add(d)}}return!n.def.unionFallback&&a>1&&o[n.def.discriminator]?.delete(void 0),o}),t.options.forEach((n,o)=>{let a=Mr(n._zod.def);if(a&&!Object.prototype.hasOwnProperty.call(a,t.discriminator))throw new Error(`Invalid discriminated union option at index "${o}"`)});let i=jr(()=>cy(t));e._zod.parse=(n,o)=>{let a=n.value;if(!Qn(a))return n.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),n;let s=a?.[t.discriminator],c=i.value.get(s);return c&&(s!==void 0||o.direction!=="backward")?c._zod.run(n,o):t.unionFallback||o.direction==="backward"?r(n,o):(n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(i.value.keys()).filter(l=>i.value.get(l)!==null),input:a,path:[t.discriminator],inst:e}),n)}}),Bm=N("$ZodIntersection",(e,t)=>{be.init(e,t),e._zod.parse=(r,i)=>{let n=r.value,o=t.left._zod.run({value:n,issues:[]},i),a=t.right._zod.run({value:n,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,l])=>Z1(r,c,l)):Z1(r,o,a)}});function Gr(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Rt(e)&&Rt(t)){let r=Object.keys(t),i=Object.keys(e).filter(o=>r.indexOf(o)!==-1),n={...e,...t};Object.prototype.hasOwnProperty.call(n,"__proto__")&&delete n.__proto__;for(let o of i){if(o==="__proto__")continue;let a=Gr(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};n[o]=a.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let r=[];for(let i=0;i<e.length;i++){let n=e[i],o=t[i],a=Gr(n,o);if(!a.valid)return{valid:!1,mergeErrorPath:[i,...a.mergeErrorPath]};r.push(a.data)}return{valid:!0,data:r}}return{valid:!1,mergeErrorPath:[]}}function Z1(e,t,r){let i=new Map,n,o=new Map,a=(l,u)=>{let d;if(l.code==="unrecognized_keys"&&!l.path?.length)n??(n=l),d=l.keys;else if(l.code==="invalid_key"&&l.origin==="record"&&l.path?.length===1){let f=String(l.path[0]);o.has(f)||o.set(f,l),d=[f]}else return!1;for(let f of d)i.has(f)||i.set(f,{}),i.get(f)[u]=!0;return!0};for(let l of t.issues)a(l,"l")||e.issues.push(l);for(let l of r.issues)a(l,"r")||e.issues.push(l);let s=[...i].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(s.length){let l=n?s.filter(u=>n.keys.includes(u)):[];l.length&&e.issues.push({...n,keys:l});for(let u of s)!l.includes(u)&&o.has(u)&&e.issues.push(o.get(u))}let c=Gr(t.value,r.value);if(!c.valid){if(ut(e))return e;throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Qs=N("$ZodTuple",(e,t)=>{be.init(e,t);let r=t.items,i=Xe.memoizer;i?.attach(e),e._zod.parse=(n,o)=>{let a=n.value;if(!Array.isArray(a))return n.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),n;n.value=i?i.alloc(e,n,[],o):[];let s=[],c=G1(r,"optin"),l=G1(r,"optout");if(!t.rest){if(a.length<c)return n.issues.push({code:"too_small",minimum:c,inclusive:!0,input:a,inst:e,origin:"array"}),n;a.length>r.length&&n.issues.push({code:"too_big",maximum:r.length,inclusive:!0,input:a,inst:e,origin:"array"})}let u=new Array(r.length),d=t.rest?o?.abortEarly:void 0,f=!1;for(let h=0;h<r.length;h++){let g=r[h]._zod.run({value:a[h],issues:[]},o);g instanceof Promise?s.push(g.then(b=>{u[h]=b})):(u[h]=g,d&&!f&&g.issues.length&&(f=ut(g)))}if(t.rest&&!f){let h=r.length-1,g=a.slice(r.length),b=n.issues.length;for(let S of g){if(d&&n.issues.length!==b){if(ut(n,b))break;b=n.issues.length}h++;let y=t.rest._zod.run({value:S,issues:[]},o);y instanceof Promise?s.push(y.then(x=>J1(x,n,h))):J1(y,n,h)}}return s.length?Promise.all(s).then(()=>B1(u,n,r,a,l)):B1(u,n,r,a,l)}});function G1(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function J1(e,t,r){e.issues.length&&t.issues.push(...ht(r,e.issues)),t.value[r]=e.value}function B1(e,t,r,i,n){for(let o=0;o<r.length;o++){let a=e[o],s=o<i.length;if(!s&&o>=n&&r[o]._zod.optin==="optional"){t.value.length=o;break}if(a.issues.length){if(!s&&o>=n){t.value.length=o;break}t.issues.push(...ht(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=i.length&&(r[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}var Km=N("$ZodRecord",(e,t)=>{be.init(e,t);let r=Xe.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!Rt(o))return i.issues.push({expected:"record",code:"invalid_type",input:o,inst:e}),i;let a=[],s=t.keyType._zod.values;if(s&&!t.partial){i.value=r?r.alloc(e,i,{},n):{};let c=new Set;for(let u of s)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){if(c.add(typeof u=="number"?u.toString():u),u==="__proto__")continue;let d=t.keyType._zod.run({value:u,issues:[]},n);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(g=>gt(g,n,He())),input:u,path:[u],inst:e});continue}let f=d.value;if(f==="__proto__")continue;let h=t.valueType._zod.run({value:o[u],issues:[]},n);h instanceof Promise?a.push(h.then(g=>{g.issues.length&&i.issues.push(...ht(u,g.issues)),i.value[f]=g.value})):(h.issues.length&&i.issues.push(...ht(u,h.issues)),i.value[f]=h.value)}let l;for(let u in o)if(!c.has(u))if(t.mode==="loose"){if(u==="__proto__")continue;i.value[u]=o[u]}else l=l??[],l.push(u);l&&l.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:l,continue:!0})}else{i.value=r?r.alloc(e,i,{},n):{};let c;for(let l of Reflect.ownKeys(o)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(o,l))continue;let u=t.keyType._zod.run({value:l,issues:[]},n);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&Xt.test(l)&&u.issues.length){let g=t.keyType._zod.run({value:Number(l),issues:[]},n);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");g.issues.length===0&&(u=g)}if(u.issues.length){t.mode==="loose"?i.value[l]=o[l]:s?(c=c??[],c.push(l)):i.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(g=>gt(g,n,He())),input:l,path:[l],inst:e});continue}let f=u.value;if(f==="__proto__")continue;let h=t.valueType._zod.run({value:o[l],issues:[]},n);h instanceof Promise?a.push(h.then(g=>{g.issues.length&&i.issues.push(...ht(l,g.issues)),i.value[f]=g.value})):(h.issues.length&&i.issues.push(...ht(l,h.issues)),i.value[f]=h.value)}c&&c.length>0&&i.issues.push({code:"unrecognized_keys",input:o,inst:e,keys:c,continue:!0})}return a.length?Promise.all(a).then(()=>i):i}}),Wm=N("$ZodMap",(e,t)=>{be.init(e,t);let r=Xe.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!(o instanceof Map))return i.issues.push({expected:"map",code:"invalid_type",input:o,inst:e}),i;let a=[];i.value=r?r.alloc(e,i,new Map,n):new Map;let s=n?.abortEarly,c=i.issues.length;for(let[l,u]of o){if(s&&i.issues.length!==c){if(ut(i,c))break;c=i.issues.length}let d=t.keyType._zod.run({value:l,issues:[]},n),f=t.valueType._zod.run({value:u,issues:[]},n);d instanceof Promise||f instanceof Promise?a.push(Promise.all([d,f]).then(([h,g])=>{K1(h,g,i,l,o,e,n)})):K1(d,f,i,l,o,e,n)}return a.length?Promise.all(a).then(()=>i):i},Fm(e,a$)});function K1(e,t,r,i,n,o,a){e.issues.length&&(yi.has(typeof i)?r.issues.push(...ht(i,e.issues)):r.issues.push({code:"invalid_key",origin:"map",input:n,inst:o,issues:e.issues.map(s=>gt(s,a,He()))})),t.issues.length&&(yi.has(typeof i)?r.issues.push(...ht(i,t.issues)):r.issues.push({origin:"map",code:"invalid_element",input:n,inst:o,key:i,issues:t.issues.map(s=>gt(s,a,He()))})),r.value.set(e.value,t.value)}var Qm=N("$ZodSet",(e,t)=>{be.init(e,t);let r=Xe.memoizer;r?.attach(e),e._zod.parse=(i,n)=>{let o=i.value;if(!(o instanceof Set))return i.issues.push({input:o,inst:e,expected:"set",code:"invalid_type"}),i;let a=[];i.value=r?r.alloc(e,i,new Set,n):new Set;let s=n?.abortEarly,c=i.issues.length;for(let l of o){if(s&&i.issues.length!==c){if(ut(i,c))break;c=i.issues.length}let u=t.valueType._zod.run({value:l,issues:[]},n);u instanceof Promise?a.push(u.then(d=>W1(d,i))):W1(u,i)}return a.length?Promise.all(a).then(()=>i):i},Fm(e,s$)});function W1(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var Xm=N("$ZodEnum",(e,t)=>{be.init(e,t);let r=Ur(t.entries),i=new Set(r);e._zod.values=i,xe(e,"pattern",n=>{let o=Ur(n.def.entries).filter(a=>yi.has(typeof a));return new RegExp(o.length?`^(${o.map(a=>It(a.toString())).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(n,o)=>{let a=n.value;return i.has(a)||n.issues.push({code:"invalid_value",values:r,input:a,inst:e}),n}}),Ym=N("$ZodLiteral",(e,t)=>{be.init(e,t);let r=new Set(t.values);e._zod.values=r,xe(e,"pattern",i=>{let n=i.def.values;return new RegExp(n.length?`^(${n.map(o=>typeof o=="string"?It(o):o?It(o.toString()):String(o)).join("|")})$`:"^[^\\s\\S]$")}),e._zod.parse=(i,n)=>{let o=i.value;return r.has(o)||i.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),i}}),ef=N("$ZodFile",(e,t)=>{be.init(e,t),e._zod.parse=(r,i)=>{let n=r.value;return n instanceof File||r.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),r}}),tf=N("$ZodTransform",(e,t)=>{be.init(e,t),e._zod.optin="optional",Xe.memoizer?.guard(e),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new gn(e.constructor.name);let n=t.transform(r.value,r);if(i.async)return(n instanceof Promise?n:Promise.resolve(n)).then(a=>(r.value=a,r));if(n instanceof Promise)throw new vt;return r.value=n,r}});function Q1(e,t){return e.value=t.issues.length?void 0:t.value,e}var Xs=N("$ZodOptional",(e,t)=>{be.init(e,t),xe(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),e._zod.optout="optional",xe(e,"values",r=>{let i=r.def.innerType._zod.values;return i?new Set([...i,void 0]):void 0}),xe(e,"pattern",r=>{let i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${Qt(i.source)})?$`):void 0}),e._zod.parse=(r,i)=>{if(r.value===void 0){if(t.innerType._zod.optin!=="defaulted")return r;let n=t.innerType._zod.run({value:r.value,issues:[]},i);return n instanceof Promise?n.then(o=>Q1(r,o)):Q1(r,n)}return t.innerType._zod.run(r,i)}}),nf=N("$ZodExactOptional",(e,t)=>{Xs.init(e,t),xe(e,"values",r=>r.def.innerType._zod.values),xe(e,"pattern",r=>r.def.innerType._zod.pattern),e._zod.parse=(r,i)=>t.innerType._zod.run(r,i)}),rf=N("$ZodNullable",(e,t)=>{be.init(e,t),xe(e,"optin",r=>r.def.innerType._zod.optin),xe(e,"optout",r=>r.def.innerType._zod.optout),xe(e,"pattern",r=>{let i=r.def.innerType._zod.pattern;return i?new RegExp(`^(${Qt(i.source)}|null)$`):void 0}),xe(e,"values",r=>r.def.innerType._zod.values?new Set([...r.def.innerType._zod.values,null]):void 0),e._zod.parse=(r,i)=>r.value===null?r:t.innerType._zod.run(r,i)}),of=N("$ZodDefault",(e,t)=>{be.init(e,t),e._zod.optin="defaulted",xe(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);if(r.value===void 0)return r.value=t.defaultValue,r;let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>X1(o,t)):X1(n,t)}});function X1(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var af=N("$ZodPrefault",(e,t)=>{be.init(e,t),e._zod.optin="defaulted",xe(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>(i.direction==="backward"||r.value===void 0&&(r.value=t.defaultValue),t.innerType._zod.run(r,i))}),sf=N("$ZodNonOptional",(e,t)=>{be.init(e,t),xe(e,"values",r=>{let i=r.def.innerType._zod.values;return i?new Set([...i].filter(n=>n!==void 0)):void 0}),e._zod.parse=(r,i)=>{let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>Y1(o,e)):Y1(n,e)}});function Y1(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 cf=N("$ZodSuccess",(e,t)=>{be.init(e,t),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new gn("ZodSuccess");let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(o=>(r.value=o.issues.length===0,r)):(r.value=n.issues.length===0,r)}});function ey(e,t,r,i){return t.issues.length?(e.value=r.catchValue({...t,value:e.value,error:{issues:t.issues.map(n=>gt(n,i,He()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var lf=N("$ZodCatch",(e,t)=>{be.init(e,t),xe(e,"optin",r=>r.def.innerType._zod.optin==="defaulted"?"defaulted":"optional"),xe(e,"optout",r=>r.def.innerType._zod.optout),xe(e,"values",r=>r.def.innerType._zod.values),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run({value:r.value,issues:[]},i);return n instanceof Promise?n.then(o=>ey(r,o,t,i)):ey(r,n,t,i)}}),uf=N("$ZodNaN",(e,t)=>{be.init(e,t),e._zod.parse=(r,i)=>((typeof r.value!="number"||!Number.isNaN(r.value))&&r.issues.push({input:r.value,inst:e,expected:"nan",code:"invalid_type"}),r)}),Ys=N("$ZodPipe",(e,t)=>{be.init(e,t),xe(e,"values",r=>r.def.in._zod.values),xe(e,"optin",r=>r.def.in._zod.optin),xe(e,"optout",r=>r.def.out._zod.optout),xe(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,i)=>{if(i.direction==="backward"){let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>Us(a,t.in,i)):Us(o,t.in,i)}let n=t.in._zod.run(r,i);return n instanceof Promise?n.then(o=>Us(o,t.out,i)):Us(n,t.out,i)}});function Us(e,t,r){return e.issues.some(i=>i.code!=="unrecognized_keys")?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},r)}var Di=N("$ZodCodec",(e,t)=>{be.init(e,t),xe(e,"values",r=>r.def.in._zod.values),xe(e,"optin",r=>r.def.in._zod.optin),xe(e,"optout",r=>r.def.out._zod.optout),xe(e,"propValues",r=>r.def.in._zod.propValues),e._zod.parse=(r,i)=>{if((i.direction||"forward")==="forward"){let o=t.in._zod.run(r,i);return o instanceof Promise?o.then(a=>As(a,t,i)):As(o,t,i)}else{let o=t.out._zod.run(r,i);return o instanceof Promise?o.then(a=>As(a,t,i)):As(o,t,i)}}});function As(e,t,r){if(e.issues.length)return e.aborted=!0,e;if((r.direction||"forward")==="forward"){let n=t.transform(e.value,e);return n instanceof Promise?n.then(o=>js(e,o,t.out,r)):js(e,n,t.out,r)}else{let n=t.reverseTransform(e.value,e);return n instanceof Promise?n.then(o=>js(e,o,t.in,r)):js(e,n,t.in,r)}}function js(e,t,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:t,issues:e.issues},i)}var df=N("$ZodPreprocess",(e,t)=>{Ys.init(e,t)}),pf=N("$ZodReadonly",(e,t)=>{be.init(e,t),xe(e,"propValues",r=>r.def.innerType._zod.propValues),xe(e,"values",r=>r.def.innerType._zod.values),xe(e,"optin",r=>r.def.innerType?._zod?.optin),xe(e,"optout",r=>r.def.innerType?._zod?.optout),e._zod.parse=(r,i)=>{if(i.direction==="backward")return t.innerType._zod.run(r,i);let n=t.innerType._zod.run(r,i);return n instanceof Promise?n.then(ty):ty(n)}});function ty(e){return e.memo||(e.value=Object.freeze(e.value)),e}function l$(e){let t=e._zod.def,r=t.pattern,i=!!t.format?.includes("int"),n,o;for(let s of t.checks??[]){let c=s._zod.def;c.pattern&&(r=c.pattern),i||(i=!!c.format?.includes("int"));let l=c.minimum??c.length,u=c.maximum??c.length;l!==void 0&&(n===void 0||l>n)&&(n=l),u!==void 0&&(o===void 0||u<o)&&(o=u)}if(r)return r.source;if(n!==void 0&&o!==void 0&&n>o)return"(?!)";if(n!==void 0||o!==void 0)return Tp({minimum:n,maximum:o}).source;let a=e._zod.pattern;return(i&&a===Xt?Ci:a)?.source}function nm(e){let t=e._zod.def,r=e._zod.pattern?.source,i=t.innerType??e._zod.innerType;if(i){let n=i._zod.pattern?.source,o=nm(i);return r&&n&&o&&o!==n?r.replace(Qt(n),()=>Qt(o)):r}if(t.options){let n=t.options.map(nm);if(n.every(Boolean))return`^(${n.map(o=>Qt(o)).join("|")})$`}return l$(e)}var mf=N("$ZodTemplateLiteral",(e,t)=>{be.init(e,t);let r=[];for(let i of t.parts)if(typeof i=="object"&&i!==null){let n=nm(i);if(!n)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);r.push(Qt(n))}else if(i===null||Dd.has(typeof i))r.push(It(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${r.join("")}$`),e._zod.parse=(i,n)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),i)}),ff=N("$ZodFunction",(e,t)=>(be.init(e,t),Object.defineProperty(e,"_def",{value:t}),e._zod.def=t,e.implement=r=>{if(typeof r!="function")throw new Error("implement() must be called with a function");return Object.defineProperty(function(...i){let n=e._def.input?bs(e._def.input,i):i,o=Reflect.apply(r,this,n);return e._def.output?bs(e._def.output,o):o},"_zod",{value:e._zod,enumerable:!1})},e.implementAsync=r=>{if(typeof r!="function")throw new Error("implementAsync() must be called with a function");return Object.defineProperty(async function(...i){let n=e._def.input?await _s(e._def.input,i):i,o=await Reflect.apply(r,this,n);return e._def.output?await _s(e._def.output,o):o},"_zod",{value:e._zod,enumerable:!1})},e._zod.parse=(r,i)=>typeof r.value!="function"?(r.issues.push({code:"invalid_type",expected:"function",input:r.value,inst:e}),r):(e._def.output&&e._def.output._zod.def.type==="promise"?r.value=e.implementAsync(r.value):r.value=e.implement(r.value),r),e.input=(...r)=>{let i=e.constructor;return Array.isArray(r[0])?new i({type:"function",input:new Qs({type:"tuple",items:r[0],rest:r[1]}),output:e._def.output}):new i({type:"function",input:r[0],output:e._def.output})},e.output=r=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:r})},e)),hf=N("$ZodPromise",(e,t)=>{be.init(e,t),e._zod.parse=(r,i)=>Promise.resolve(r.value).then(n=>t.innerType._zod.run({value:n,issues:[]},i))}),Fi=N("$ZodLazy",(e,t)=>{be.init(e,t),Md(e._zod,"innerType",()=>{let r=t;return r._cachedInner||(r._cachedInner=t.getter()),r._cachedInner}),xe(e,"pattern",r=>r.innerType?._zod?.pattern),xe(e,"propValues",r=>r.innerType?._zod?.propValues),xe(e,"optin",r=>r.innerType?._zod?.optin??void 0),xe(e,"optout",r=>r.innerType?._zod?.optout??void 0),e._zod.parse=(r,i)=>e._zod.innerType._zod.run(r,i)}),gf=N("$ZodCustom",(e,t)=>{Me.init(e,t),be.init(e,t),e._zod.parse=(r,i)=>r,e._zod.check=r=>{let i=r.value,n=t.fn(i);if(n instanceof Promise)return n.then(o=>ny(o,r,i,e));ny(n,r,i,e)}});function ny(e,t,r,i){if(!e){let n={code:"custom",input:r,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(n.params=i._zod.def.params),t.issues.push(Lr(n))}}var rc=class extends Error{constructor(){super("Cannot parse a reference cycle that closes through a transform"),this.name="ZodCyclicError"}},yf="~memo",uy=[];function dy(e){return e!==null&&typeof e=="object"}function vf(e){return e.map(t=>t.path?{...t,path:t.path.slice()}:{...t})}var py=new WeakMap,Jr=0,nc=1,Vi=2;function Hi(e,t,r){let i=py.get(e);if(i!==void 0)return i?Vi:Jr;if(t.has(e))return Vi;t.add(e);let n=Jr,o=u=>{if(n!==Vi&&u?._zod){let d=Hi(u,t,r);d>n&&(n=d)}},a=(u,d)=>{let f=Jr;for(let h of Reflect.ownKeys(u)){let g=Object.getOwnPropertyDescriptor(u,h);if(d&&!g.enumerable)continue;let b=g.get?nc:g.value?._zod?Hi(g.value,t,r):Jr;b>f&&(f=b)}return f},s=u=>{u>n&&(n=u)},c=e._zod.def,l=c.type;switch(l){case"object":{let u=Mr(c);s(u?a(u,!0):nc),o(c.catchall);break}case"array":o(c.element);break;case"tuple":for(let u of c.items)o(u);o(c.rest);break;case"record":case"map":o(c.keyType),o(c.valueType);break;case"set":o(c.valueType);break;case"union":for(let u of c.options)o(u);break;case"intersection":o(c.left),o(c.right);break;case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":o(c.innerType);break;case"pipe":o(c.in),o(c.out);break;case"function":o(c.input),o(c.output);break;case"lazy":{let u=c._cachedInner??(r?e._zod.innerType:void 0);s(u?Hi(u,t,!1):nc);break}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":break;default:for(let u in c){let d=Object.getOwnPropertyDescriptor(c,u);if(!d||d.get)continue;let f=d.value;if(!(!f||typeof f!="object")){if(f._zod)o(f);else if(Array.isArray(f))for(let h of f)o(h)}}}return t.delete(e),u$(e,n)}function u$(e,t){return t!==nc&&py.set(e,t===Vi),t}function oc(e){return Hi(e,new Set,!0)!==Jr}function d$(e,t){let r=e.buckets.get(t);return r||(r=new WeakMap,e.buckets.set(t,r)),r}var ec,tc=[],p$={alloc(e,t,r){let i=ec;if(!i)return r;ec=void 0;let n={value:r,issues:null};return i.set(t.value,n),tc.push(n),r},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let r=e._zod.parse,i=(n,o)=>{if(o.direction!=="backward"&&ic(o,n.value))throw new rc;return r(n,o)};e._zod.parse=i,e._zod.run===r&&(e._zod.run=i)})},attach(e){var t;let r,i=!1,n,o;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let a=e._zod.parse,s=(c,l)=>{if(r===void 0){let y=Hi(e,new Set,!1);if(y===Jr)return e._zod.parse=a,e._zod.run===s&&(e._zod.run=a),a(c,l);y===Vi||i?r=!0:i=!0}let u=c.value;if(!dy(u))return a(c,l);let d=l[yf];d||(d={buckets:new WeakMap,backEdges:void 0},l[yf]=d);let f;n===l?f=o:(f=d$(d,e),n=l,o=f);let h=f.get(u);if(h)return c.value=h.value,h.issues?h.issues.length&&c.issues.push(...vf(h.issues)):(c.memo=!0,d.backEdges??(d.backEdges=new WeakSet),d.backEdges.add(h.value)),c;ec=f;let g=tc.length,b=a(c,l);ec=void 0;let S=tc.length>g?tc.pop():void 0;return b instanceof Promise?b.then(y=>(S&&(S.issues=y.issues.length?vf(y.issues):uy),y)):(S&&(S.issues=b.issues.length?vf(b.issues):uy),b)};e._zod.parse=s,e._zod.run===a&&(e._zod.run=s)})}};function Zi(){return p$}function ic(e,t){let r=e[yf]?.backEdges;return r!==void 0&&dy(t)&&r.has(t)}var Ji={};Kt(Ji,{ar:()=>my,az:()=>fy,be:()=>gy,bg:()=>vy,bn:()=>yy,ca:()=>by,ckb:()=>_y,cs:()=>Sy,da:()=>ky,de:()=>wy,el:()=>$y,en:()=>ac,eo:()=>xy,es:()=>Ty,fa:()=>Ry,fi:()=>Iy,fr:()=>zy,frCA:()=>Ey,gu:()=>Cy,he:()=>Py,hi:()=>Oy,hr:()=>Ny,hu:()=>Uy,hy:()=>jy,id:()=>My,is:()=>qy,it:()=>Ly,ja:()=>Dy,ka:()=>Fy,kh:()=>Vy,km:()=>sc,kn:()=>Hy,ko:()=>Zy,lt:()=>Jy,mk:()=>By,ms:()=>Ky,ne:()=>Wy,nl:()=>Qy,nn:()=>Xy,no:()=>Yy,ota:()=>eb,pl:()=>nb,ps:()=>tb,pt:()=>rb,ptBR:()=>ob,ro:()=>ib,ru:()=>sb,sk:()=>cb,sl:()=>lb,sv:()=>ub,ta:()=>db,tg:()=>pb,th:()=>mb,tk:()=>fb,tr:()=>hb,ua:()=>gb,uk:()=>cc,ur:()=>vb,uz:()=>yb,vi:()=>bb,yo:()=>kb,zhCN:()=>_b,zhTW:()=>Sb});var m$=()=>{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"},map:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",mac:"\u0639\u0646\u0648\u0627\u0646 MAC",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",credit_card:"\u0631\u0642\u0645 \u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0627\u0626\u062A\u0645\u0627\u0646",currency_code:"\u0631\u0645\u0632 \u0627\u0644\u0639\u0645\u0644\u0629",iban:"IBAN",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${n.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return n.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${Z(n.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${n.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${n.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${n.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${r[o.format]??n.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${n.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${n.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${n.keys.length>1?"\u0629":""}: ${U(n.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${n.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function my(){return{localeError:m$()}}var f$=()=>{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"},map:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",credit_card:"kredit kart\u0131 n\xF6mr\u0259si",currency_code:"valyuta kodu",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${n.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return n.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${Z(n.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${n.origin??"d\u0259y\u0259r"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${r[o.format]??n.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${n.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${n.keys.length>1?"lar":""}: ${U(n.keys,", ")}`;case"invalid_key":return`${n.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${n.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function fy(){return{localeError:f$()}}function hy(e,t,r,i){let n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}var h$=()=>{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"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",mac:"MAC \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",credit_card:"\u043D\u0443\u043C\u0430\u0440 \u043A\u0440\u044D\u0434\u044B\u0442\u043D\u0430\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${n.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${Z(n.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=hy(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${n.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=hy(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${n.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${n.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${n.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${U(n.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${n.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function gy(){return{localeError:h$()}}var g$=()=>{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"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${Z(n.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${n.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${n.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${n.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u043E\u0432\u0435":""}: ${U(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function vy(){return{localeError:g$()}}var v$=()=>{let e={string:{unit:"\u0985\u0995\u09CD\u09B7\u09B0",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},file:{unit:"\u09AC\u09BE\u0987\u099F",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},array:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},set:{unit:"\u0986\u0987\u099F\u09C7\u09AE",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"},map:{unit:"\u098F\u09A8\u09CD\u099F\u09CD\u09B0\u09BF",verb:"\u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7"}};function t(n){return e[n]??null}let r={regex:"\u0987\u09A8\u09AA\u09C1\u099F",email:"\u0987\u09AE\u09C7\u0987\u09B2 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",url:"URL",emoji:"\u0987\u09AE\u09CB\u099C\u09BF",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u09A4\u09BE\u09B0\u09BF\u0996 \u0993 \u09B8\u09AE\u09AF\u09BC",date:"ISO \u09A4\u09BE\u09B0\u09BF\u0996",time:"ISO \u09B8\u09AE\u09AF\u09BC",duration:"ISO \u09B8\u09AE\u09AF\u09BC\u0995\u09BE\u09B2",ipv4:"IPv4 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",ipv6:"IPv6 \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",mac:"MAC \u09A0\u09BF\u0995\u09BE\u09A8\u09BE",cidrv4:"IPv4 \u09B0\u09C7\u099E\u09CD\u099C",cidrv6:"IPv6 \u09B0\u09C7\u099E\u09CD\u099C",base64:"base64-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",base64url:"base64url-\u098F\u09A8\u0995\u09CB\u09A1\u09C7\u09A1 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",json_string:"JSON \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982",e164:"E.164 \u09A8\u09AE\u09CD\u09AC\u09B0",credit_card:"\u0995\u09CD\u09B0\u09C7\u09A1\u09BF\u099F \u0995\u09BE\u09B0\u09CD\u09A1 \u09A8\u09AE\u09CD\u09AC\u09B0",currency_code:"\u09AE\u09C1\u09A6\u09CD\u09B0\u09BE \u0995\u09CB\u09A1",iban:"IBAN",jwt:"JWT",template_literal:"\u0987\u09A8\u09AA\u09C1\u099F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${o}, \u09AA\u09CD\u09B0\u09BE\u09AA\u09CD\u09A4 ${s}`}case"invalid_value":return n.values.length===1?`\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F: \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${Z(n.values[0])}`:`\u0985\u09AC\u09C8\u09A7 \u0985\u09AA\u09B6\u09A8: ${U(n.values," | ")} \u098F\u09B0 \u09AE\u09A7\u09CD\u09AF\u09C7 \u098F\u0995\u099F\u09BF \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${n.origin??"\u09AE\u09BE\u09A8"} ${o}${n.maximum.toString()} ${a.unit??"\u098F\u09B2\u09BF\u09AE\u09C7\u09A8\u09CD\u099F"} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u09AC\u09A1\u09BC: ${n.origin??"\u09AE\u09BE\u09A8"} ${o}${n.maximum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${n.origin} ${o}${n.minimum.toString()} ${a.unit} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09A8\u09C7\u0995 \u099B\u09CB\u099F: ${n.origin} ${o}${n.minimum.toString()} \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.prefix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C1\u09B0\u09C1 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="ends_with"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.suffix}" \u09A6\u09BF\u09AF\u09BC\u09C7 \u09B6\u09C7\u09B7 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="includes"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: "${o.includes}" \u0985\u09A8\u09CD\u09A4\u09B0\u09CD\u09AD\u09C1\u0995\u09CD\u09A4 \u09A5\u09BE\u0995\u09A4\u09C7 \u09B9\u09AC\u09C7`:o.format==="regex"?`\u0985\u09AC\u09C8\u09A7 \u09B8\u09CD\u099F\u09CD\u09B0\u09BF\u0982: ${o.pattern} \u09AA\u09CD\u09AF\u09BE\u099F\u09BE\u09B0\u09CD\u09A8 \u09AE\u09BF\u09B2\u09A4\u09C7 \u09B9\u09AC\u09C7`:`\u0985\u09AC\u09C8\u09A7 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0985\u09AC\u09C8\u09A7 \u09A8\u09AE\u09CD\u09AC\u09B0: ${n.divisor} \u098F\u09B0 \u0997\u09C1\u09A3\u09BF\u09A4\u0995 \u09B9\u09A4\u09C7 \u09B9\u09AC\u09C7`;case"unrecognized_keys":return`\u0985\u099A\u09C7\u09A8\u09BE \u0995\u09C0${n.keys.length>1?"\u0997\u09C1\u09B2\u09CB":""}: ${U(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u0995\u09C0`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0985\u09AC\u09C8\u09A7 \u09A1\u09BF\u09B8\u0995\u09CD\u09B0\u09BF\u09AE\u09BF\u09A8\u09C7\u099F\u09B0 \u09AE\u09BE\u09A8\u0964 \u09AA\u09CD\u09B0\u09A4\u09CD\u09AF\u09BE\u09B6\u09BF\u09A4 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F";case"invalid_element":return`${n.origin} \u098F \u0985\u09AC\u09C8\u09A7 \u09AE\u09BE\u09A8`;default:return"\u0985\u09AC\u09C8\u09A7 \u0987\u09A8\u09AA\u09C1\u099F"}}};function yy(){return{localeError:v$()}}var y$=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"},map:{unit:"elements",verb:"contenir"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",mac:"adre\xE7a MAC",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de targeta de cr\xE8dit",currency_code:"codi de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${n.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return n.values.length===1?`Valor inv\xE0lid: s'esperava ${Z(n.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${U(n.values," o ")}`;case"too_big":{let o=n.inclusive?"com a m\xE0xim":"menys de",a=t(n.origin);return a?`Massa gran: s'esperava que ${n.origin??"el valor"} contingu\xE9s ${o} ${n.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${n.origin??"el valor"} fos ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(n.origin);return a?`Massa petit: s'esperava que ${n.origin} contingu\xE9s ${o} ${n.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${n.origin} fos ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${n.divisor}`;case"unrecognized_keys":return`Clau${n.keys.length>1?"s":""} no reconeguda${n.keys.length>1?"s":""}: ${U(n.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${n.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${n.origin}`;default:return"Entrada inv\xE0lida"}}};function by(){return{localeError:y$()}}var b$=()=>{let e={string:{unit:"\u067E\u06CC\u062A",verb:"\u0628\u06CE\u062A"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u0628\u06CE\u062A"},array:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},set:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"},map:{unit:"\u062F\u0627\u0646\u06D5",verb:"\u0628\u06CE\u062A"}};function t(n){return e[n]??null}let r={regex:"regex",email:"\u0626\u06CC\u0645\u06D5\u06CC\u06B5",url:"\u0628\u06D5\u0633\u062A\u06D5\u0631 (URL)",emoji:"\u0626\u06CC\u0645\u06C6\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0695\u06CE\u06A9\u06D5\u0648\u062A \u0648 \u06A9\u0627\u062A",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",time:"\u06A9\u0627\u062A",duration:"\u0645\u0627\u0648\u06D5",ipv4:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv4",ipv6:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC IPv6",mac:"\u0646\u0627\u0648\u0646\u06CC\u0634\u0627\u0646\u06CC MAC",cidrv4:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv4",cidrv6:"\u0645\u06D5\u0648\u062F\u0627\u06CC IPv6",base64:"\u062F\u06D5\u0642\u06CC base64",base64url:"\u062F\u06D5\u0642\u06CC base64url",json_string:"\u062F\u06D5\u0642\u06CC JSON",e164:"\u0698\u0645\u0627\u0631\u06D5\u06CC E.164",credit_card:"\u0698\u0645\u0627\u0631\u06D5\u06CC \u06A9\u0627\u0631\u062A\u06CC \u06A9\u0631\u06CE\u062F\u06CC\u062A",currency_code:"\u06A9\u06C6\u062F\u06CC \u062F\u0631\u0627\u0648",iban:"IBAN",jwt:"JWT",template_literal:"\u062A\u06CE\u06A9\u0631\u062F\u06D5"},i={nan:"NaN",string:"\u0646\u0648\u0648\u0633\u06CC\u0646",number:"\u0698\u0645\u0627\u0631\u06D5",boolean:"boolean",array:"array",object:"object",date:"\u0695\u06CE\u06A9\u06D5\u0648\u062A",integer:"\u0698\u0645\u0627\u0631\u06D5",float:"\u0698\u0645\u0627\u0631\u06D5",null:"null",undefined:"undefined",function:"function",symbol:"symbol",unknown:"unknown",promise:"promise",void:"void",never:"never",map:"map",set:"set"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a,c=["\u0627","\u0648","\u06C6","\u0648\u0648","\u06D5","\u06CC","\u06CE"].some(u=>s.endsWith(u))?"\u06CC\u06D5":"\u06D5",l=/^[a-zA-Z]+$/.test(s);return a==="null"||a==="undefined"?"\u062F\u0627\u0648\u0627\u06A9\u0631\u0627\u0648\u06D5":`\u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${o} \u0628\u06CE\u062A\u060C \u0628\u06D5\u06B5\u0627\u0645 ${s}${l?"":c}`}case"invalid_value":return n.values.length===1?`\u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0648\u0633\u062A\u06D5: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 ${Z(n.values[0])} \u0628\u06CE\u062A`:`\u0647\u06D5\u06B5\u0628\u0698\u0627\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648\u06D5 \u06CC\u06D5\u06A9\u06CE\u06A9 \u0628\u06CE\u062A \u0644\u06D5 ${U(n.values,"|")}`;case"too_big":{let o=t(n.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${n.maximum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u0632\u06C6\u0631\u06D5\u0648\u06D5 ${n.maximum.toString()} \u0628\u06CE\u062A`}case"too_small":{let o=t(n.origin);return o?`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${n.minimum.toString()} ${o.unit} ${o.verb}`:`\u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0628\u06D5 \u0644\u0627\u06CC\u06D5\u0646\u06CC \u06A9\u06D5\u0645\u06D5\u0648\u06D5 ${n.minimum.toString()} \u0628\u06CE\u062A`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u062F\u06D5\u0633\u062A\u067E\u06CE\u0628\u06A9\u0627\u062A \u0628\u06D5 "${o.prefix}"`:o.format==="ends_with"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u06A9\u06C6\u062A\u0627\u06CC\u06CC\u0628\u06CE\u062A \u0628\u06D5 "${o.suffix}"`:o.format==="includes"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 "${o.includes}" \u0644\u06D5\u062E\u06C6\u0628\u06AF\u0631\u06CE\u062A`:o.format==="regex"?`\u062F\u06D5\u0642\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u067E\u06CE\u0648\u06CC\u0633\u062A\u06D5 \u0644\u06D5\u06AF\u06D5\u06B5 \u067E\u0627\u062A\u06CE\u0631\u0646\u06CC ${o.pattern} \u0628\u06AF\u0648\u0646\u062C\u06CE\u062A`:`\u0628\u06D5\u0647\u0627\u06CC ${r[o.format]??n.format} \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`}case"not_multiple_of":return`\u0698\u0645\u0627\u0631\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A: \u062F\u06D5\u0628\u06CE\u062A \u0686\u06D5\u0646\u062F \u0647\u06CE\u0646\u062F\u06D5 \u0628\u06CE\u062A \u0628\u06C6 ${n.divisor}`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648: ${U(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u0644\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A \u0644\u06D5 ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0628\u06D5\u0647\u0627\u06CC \u0646\u06D5\u0646\u0627\u0633\u0631\u0627\u0648 \u0647\u06D5\u06CC\u06D5. \u0628\u06D5\u0647\u0627\u06CC \u0686\u0627\u0648\u06D5\u0695\u0648\u0627\u0646\u06A9\u0631\u0627\u0648: ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u06CC\u06D5\u06A9\u06AF\u0631\u062A\u0646\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A";case"invalid_element":return`${n.origin} \u0628\u06D5\u0647\u0627\u06A9\u06D5 \u0646\u0627\u062F\u0631\u0648\u0633\u062A\u06D5`;default:return"\u062A\u06CE\u06A9\u0631\u062F\u06D5\u06CC \u0646\u0627\u062F\u0631\u0648\u0633\u062A"}}};function _y(){return{localeError:b$()}}var _$=()=>{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"},map:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditn\xED karty",currency_code:"k\xF3d m\u011Bny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${n.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${Z(n.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED m\xEDt ${o}${n.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED b\xFDt ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${U(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function Sy(){return{localeError:_$()}}var S$=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"},map:{unit:"elementer",verb:"indeholdt"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kreditkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldigt input: forventede instanceof ${n.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig v\xE6rdi: forventede ${Z(n.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${n.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${U(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${n.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${n.origin}`;default:return"Ugyldigt input"}}};function ky(){return{localeError:S$()}}var k$=()=>{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"},map:{unit:"Elemente",verb:"zu haben"}};function t(n){return e[n]??null}let r={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",mac:"MAC-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",credit_card:"Kreditkartennummer",currency_code:"W\xE4hrungscode",iban:"IBAN",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${n.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return n.values.length===1?`Ung\xFCltige Eingabe: erwartet ${Z(n.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${n.origin??"Wert"} ${o}${n.maximum.toString()} ist`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${n.origin} ${o}${n.minimum.toString()} ist`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${n.divisor} sein`;case"unrecognized_keys":return`${n.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${U(n.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${n.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${n.origin}`;default:return"Ung\xFCltige Eingabe"}}};function wy(){return{localeError:k$()}}var w$=()=>{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(n){return e[n]??null}let r={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",credit_card:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 \u03C0\u03B9\u03C3\u03C4\u03C9\u03C4\u03B9\u03BA\u03AE\u03C2 \u03BA\u03AC\u03C1\u03C4\u03B1\u03C2",currency_code:"\u03BA\u03C9\u03B4\u03B9\u03BA\u03CC\u03C2 \u03BD\u03BF\u03BC\u03AF\u03C3\u03BC\u03B1\u03C4\u03BF\u03C2",iban:"IBAN",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return typeof n.expected=="string"&&/^[A-Z]/.test(n.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${n.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return n.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${Z(n.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${n.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${n.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${r[o.format]??n.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${n.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${n.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${n.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${U(n.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${n.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${n.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function $y(){return{localeError:w$()}}var $$=()=>{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(o){return e[o]??null}let r={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",currency_code:"currency code",credit_card:"credit card number",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};function n(o,a){return o==="number"&&typeof a=="number"&&!Number.isFinite(a)?String(a):i[o]??o}return o=>{switch(o.code){case"invalid_type":{let a=n(o.expected),s=G(o.input),c=n(s,o.input);return`Invalid input: expected ${a}, received ${c}`}case"invalid_value":return o.values.length===1?`Invalid input: expected ${Z(o.values[0])}`:`Invalid option: expected one of ${U(o.values,"|")}`;case"too_big":{let a=o.exact?"exactly ":o.inclusive?"<=":"<",s=t(o.origin);return s?`Too big: expected ${o.origin??"value"} to have ${a}${o.maximum.toString()} ${s.unit??"elements"}`:`Too big: expected ${o.origin??"value"} to be ${a}${o.maximum.toString()}`}case"too_small":{let a=o.exact?"exactly ":o.inclusive?">=":">",s=t(o.origin);return s?`Too small: expected ${o.origin} to have ${a}${o.minimum.toString()} ${s.unit}`:`Too small: expected ${o.origin} to be ${a}${o.minimum.toString()}`}case"invalid_format":{let a=o;return a.format==="starts_with"?`Invalid string: must start with "${a.prefix}"`:a.format==="ends_with"?`Invalid string: must end with "${a.suffix}"`:a.format==="includes"?`Invalid string: must include "${a.includes}"`:a.format==="regex"?`Invalid string: must match pattern ${a.pattern}`:`Invalid ${r[a.format]??o.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${o.divisor}`;case"unrecognized_keys":return`Unrecognized key${o.keys.length>1?"s":""}: ${U(o.keys,", ")}`;case"invalid_key":return`Invalid key in ${o.origin}`;case"invalid_union":return o.options&&Array.isArray(o.options)&&o.options.length>0?`Invalid discriminator value. Expected ${o.options.map(s=>`'${s}'`).join(" | ")}`:o.inclusive===!1?"Invalid input: more than one option matched":"Invalid input";case"invalid_element":return`Invalid value in ${o.origin}`;default:return"Invalid input"}}};function ac(){return{localeError:$$()}}var x$=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"},map:{unit:"elementojn",verb:"havi"}};function t(n){return e[n]??null}let r={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",mac:"MAC-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",credit_card:"kreditkarta numero",currency_code:"valuta kodo",iban:"IBAN",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${n.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return n.values.length===1?`Nevalida enigo: atendi\u011Dis ${Z(n.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${n.origin??"valoro"} havu ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Tro malgranda: atendi\u011Dis ke ${n.origin} havu ${o}${n.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${n.origin} estu ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${r[o.format]??n.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${n.divisor}`;case"unrecognized_keys":return`Nekonata${n.keys.length>1?"j":""} \u015Dlosilo${n.keys.length>1?"j":""}: ${U(n.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${n.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${n.origin}`;default:return"Nevalida enigo"}}};function xy(){return{localeError:x$()}}var T$=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(n){return e[n]??null}let r={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",mac:"direcci\xF3n MAC",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",credit_card:"n\xFAmero de tarjeta de cr\xE9dito",currency_code:"c\xF3digo de moneda",iban:"IBAN",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${n.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return n.values.length===1?`Entrada inv\xE1lida: se esperaba ${Z(n.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${n.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${n.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${n.divisor}`;case"unrecognized_keys":return`Llave${n.keys.length>1?"s":""} desconocida${n.keys.length>1?"s":""}: ${U(n.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[n.origin]??n.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[n.origin]??n.origin}`;default:return"Entrada inv\xE1lida"}}};function Ty(){return{localeError:T$()}}var R$=()=>{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"},map:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",mac:"MAC \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",credit_card:"\u0634\u0645\u0627\u0631\u0647 \u06A9\u0627\u0631\u062A \u0627\u0639\u062A\u0628\u0627\u0631\u06CC",currency_code:"\u06A9\u062F \u0627\u0631\u0632",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${n.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return n.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${Z(n.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${U(n.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${n.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${r[o.format]??n.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${n.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${n.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${U(n.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${n.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${n.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Ry(){return{localeError:R$()}}var I$=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},map:{unit:"alkiota",subject:"kuvauksen"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(n){return e[n]??null}let r={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",mac:"MAC-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",credit_card:"luottokortin numero",currency_code:"valuuttakoodi",iban:"IBAN",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Virheellinen tyyppi: odotettiin instanceof ${n.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return n.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${Z(n.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${n.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${n.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${r[o.format]??n.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${n.divisor} monikerta`;case"unrecognized_keys":return`${n.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${U(n.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Iy(){return{localeError:I$()}}var z$=()=>{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(n){return e[n]??null}let r={regex:"expression r\xE9guli\xE8re",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne de caract\xE8res encod\xE9e en base64",base64url:"cha\xEEne de caract\xE8res encod\xE9e en base64url",json_string:"cha\xEEne de caract\xE8res JSON",e164:"num\xE9ro au format E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne de caract\xE8res",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"record",map:"map",set:"ensemble",file:"fichier",nonoptional:"non optionnel",nan:"NaN",function:"fonction"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : instance de ${n.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : ${Z(n.values[0])} attendu`:`Option invalide : une valeur parmi ${U(n.values,"|")} attendue`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Trop grand : ${i[n.origin]??"valeur"} doit ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[n.origin]??"valeur"} doit \xEAtre ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Trop petit : ${i[n.origin]??"valeur"} doit ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : ${i[n.origin]??"valeur"} doit \xEAtre ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne de caract\xE8res invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne de caract\xE8res invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne de caract\xE8res invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne de caract\xE8res invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${U(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function zy(){return{localeError:z$()}}var E$=()=>{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"},map:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(n){return e[n]??null}let r={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",mac:"adresse MAC",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",credit_card:"num\xE9ro de carte de cr\xE9dit",currency_code:"code de devise",iban:"IBAN",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Entr\xE9e invalide : attendu instanceof ${n.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return n.values.length===1?`Entr\xE9e invalide : attendu ${Z(n.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u2264":"<",a=t(n.origin);return a?`Trop grand : attendu que ${n.origin??"la valeur"} ait ${o}${n.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${n.origin??"la valeur"} soit ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u2265":">",a=t(n.origin);return a?`Trop petit : attendu que ${n.origin} ait ${o}${n.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${n.origin} soit ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${r[o.format]??n.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${n.divisor}`;case"unrecognized_keys":return`Cl\xE9${n.keys.length>1?"s":""} non reconnue${n.keys.length>1?"s":""} : ${U(n.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${n.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${n.origin}`;default:return"Entr\xE9e invalide"}}};function Ey(){return{localeError:E$()}}var C$=()=>{let e={string:{unit:"\u0A85\u0A95\u0ACD\u0AB7\u0AB0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},file:{unit:"\u0AAC\u0ABE\u0AAF\u0A9F",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},array:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},set:{unit:"\u0A86\u0A87\u0A9F\u0AAE",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"},map:{unit:"\u0A8F\u0AA8\u0ACD\u0A9F\u0ACD\u0AB0\u0AC0",verb:"\u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F"}};function t(n){return e[n]??null}let r={regex:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F",email:"\u0A88\u0AAE\u0AC7\u0A87\u0AB2 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",url:"URL",emoji:"\u0A87\u0AAE\u0ACB\u0A9C\u0AC0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96 \u0A85\u0AA8\u0AC7 \u0AB8\u0AAE\u0AAF",date:"ISO \u0AA4\u0ABE\u0AB0\u0AC0\u0A96",time:"ISO \u0AB8\u0AAE\u0AAF",duration:"ISO \u0A85\u0AB5\u0AA7\u0ABF",ipv4:"IPv4 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",ipv6:"IPv6 \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",mac:"MAC \u0A8F\u0AA1\u0ACD\u0AB0\u0AC7\u0AB8",cidrv4:"IPv4 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",cidrv6:"IPv6 \u0AB6\u0ACD\u0AB0\u0AC7\u0AA3\u0AC0",base64:"base64-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",base64url:"base64url-\u0A8F\u0AA8\u0ACD\u0A95\u0ACB\u0AA1\u0AC7\u0AA1 \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",json_string:"JSON \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97",e164:"E.164 \u0AA8\u0A82\u0AAC\u0AB0",credit_card:"\u0A95\u0ACD\u0AB0\u0AC7\u0AA1\u0ABF\u0A9F \u0A95\u0ABE\u0AB0\u0ACD\u0AA1 \u0AA8\u0A82\u0AAC\u0AB0",currency_code:"\u0A9A\u0AB2\u0AA3 \u0A95\u0ACB\u0AA1",iban:"IBAN",jwt:"JWT",template_literal:"\u0A87\u0AA8\u0AAA\u0AC1\u0A9F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${o}, \u0AAA\u0ACD\u0AB0\u0ABE\u0AAA\u0ACD\u0AA4 ${s}`}case"invalid_value":return n.values.length===1?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F: \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${Z(n.values[0])}`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB5\u0ABF\u0A95\u0AB2\u0ACD\u0AAA: ${U(n.values," | ")} \u0AAE\u0ABE\u0AA7\u0ACD\u0AAF\u0AAE\u0AA5\u0AC0 \u0A8F\u0A95 \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${n.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${n.maximum.toString()} ${a.unit??"\u0A8F\u0AB2\u0ABF\u0AAE\u0AC7\u0AA8\u0ACD\u0A9F"} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AAE\u0ACB\u0A9F\u0AC1\u0A82: ${n.origin??"\u0AAE\u0AC2\u0AB2\u0ACD\u0AAF"} ${o}${n.maximum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${n.origin} ${o}${n.minimum.toString()} ${a.unit} \u0AB9\u0ACB\u0AB5\u0ABE \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A96\u0AC2\u0AAC \u0AA8\u0ABE\u0AA8\u0AC1\u0A82: ${n.origin} ${o}${n.minimum.toString()} \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.prefix}" \u0AA5\u0AC0 \u0AB6\u0AB0\u0AC2 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="ends_with"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.suffix}" \u0AAA\u0AB0 \u0AB8\u0AAE\u0ABE\u0AAA\u0ACD\u0AA4 \u0AA5\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="includes"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: "${o.includes}" \u0AB6\u0ABE\u0AAE\u0AC7\u0AB2 \u0AB9\u0ACB\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:o.format==="regex"?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AB8\u0ACD\u0A9F\u0ACD\u0AB0\u0ABF\u0A82\u0A97: \u0AAA\u0AC7\u0A9F\u0AB0\u0ACD\u0AA8 ${o.pattern} \u0AB8\u0ABE\u0AA5\u0AC7 \u0AAE\u0AC7\u0AB3 \u0A96\u0ABE\u0AB5\u0AC1\u0A82 \u0A9C\u0ACB\u0A88\u0A8F`:`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA8\u0A82\u0AAC\u0AB0: ${n.divisor} \u0AA8\u0ACB \u0A97\u0AC1\u0AA3\u0ABE\u0A82\u0A95 \u0AB9\u0ACB\u0AB5\u0ACB \u0A9C\u0ACB\u0A88\u0A8F`;case"unrecognized_keys":return`\u0A93\u0AB3\u0A96\u0AC0 \u0AB6\u0A95\u0ABE\u0AA4\u0ABE \u0AA8\u0AB9\u0AC0\u0A82 \u0AA4\u0AC7 \u0A95\u0AC0${n.keys.length>1?"\u0A93":""}: ${U(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A95\u0AC0`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AA1\u0ABF\u0AB8\u0ACD\u0A95\u0ACD\u0AB0\u0ABF\u0AAE\u0ABF\u0AA8\u0AC7\u0A9F\u0AB0 \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF. \u0A85\u0AAA\u0AC7\u0A95\u0ACD\u0AB7\u0ABF\u0AA4 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F";case"invalid_element":return`${n.origin} \u0AAE\u0ABE\u0A82 \u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0AAE\u0AC2\u0AB2\u0ACD\u0AAF`;default:return"\u0A85\u0AAE\u0ABE\u0AA8\u0ACD\u0AAF \u0A87\u0AA8\u0AAA\u0AC1\u0A9F"}}};function Cy(){return{localeError:C$()}}var P$=()=>{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"}},r=l=>l?e[l]:void 0,i=l=>{let u=r(l);return u?u.label:l??e.unknown.label},n=l=>`\u05D4${i(l)}`,o=l=>(r(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"},uuidv4:{label:"UUIDv4",gender:"m"},uuidv6:{label:"UUIDv6",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},mac:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA MAC",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},credit_card:{label:"\u05DE\u05E1\u05E4\u05E8 \u05DB\u05E8\u05D8\u05D9\u05E1 \u05D0\u05E9\u05E8\u05D0\u05D9",gender:"m"},currency_code:{label:"\u05E7\u05D5\u05D3 \u05DE\u05D8\u05D1\u05E2",gender:"m"},iban:{label:"IBAN",gender:"m"},jwt:{label:"JWT",gender:"m"},template_literal:{label:"\u05E7\u05DC\u05D8",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let u=l.expected,d=c[u??""]??i(u),f=G(l.input),h=c[f]??e[f]?.label??f;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 ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}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 ${Z(l.values[0])}`;let u=l.values.map(h=>Z(h));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 ${u[0]} \u05D0\u05D5 ${u[1]}`;let d=u[u.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 ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let u=a(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let g=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: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(l.origin==="array"||l.origin==="set"){let g=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",b=l.inclusive?`${l.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`.trim()}let f=l.inclusive?"<=":"<",h=o(l.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${h} ${f}${l.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${h} ${f}${l.maximum.toString()}`}case"too_small":{let u=a(l.origin),d=n(l.origin??"value");if(l.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let g=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: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${g}`}if(l.origin==="array"||l.origin==="set"){let g=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let S=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${S}`}let b=l.inclusive?`${l.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${g} \u05DC\u05D4\u05DB\u05D9\u05DC ${b}`.trim()}let f=l.inclusive?">=":">",h=o(l.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${h} ${f}${l.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${h} ${f}${l.minimum.toString()}`}case"invalid_format":{let u=l;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.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 ${u.pattern}`;let d=s[u.format],f=d?.label??u.format,g=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${g}`}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"}: ${U(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${n(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Py(){return{localeError:P$()}}var O$=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},file:{unit:"\u092C\u093E\u0907\u091F\u094D\u0938",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F\u092F\u093E\u0901",verb:"\u0930\u0916\u0928\u0947 \u0915\u0947 \u0932\u093F\u090F"}};function t(n){return e[n]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0908\u092E\u0947\u0932 \u092A\u0924\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0924\u093F\u0925\u093F \u0914\u0930 \u0938\u092E\u092F",date:"ISO \u0924\u093F\u0925\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u092A\u0924\u093E",ipv6:"IPv6 \u092A\u0924\u093E",mac:"MAC \u092A\u0924\u093E",cidrv4:"IPv4 \u0936\u094D\u0930\u0947\u0923\u0940",cidrv6:"IPv6 \u0936\u094D\u0930\u0947\u0923\u0940",base64:"Base64-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",base64url:"Base64URL-\u090F\u0928\u094D\u0915\u094B\u0921\u0947\u0921 \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917",e164:"E.164 \u0938\u0902\u0916\u094D\u092F\u093E",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0938\u0902\u0916\u094D\u092F\u093E",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return n.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${Z(n.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u094B\u0902 \u092E\u0947\u0902 \u0938\u0947 \u090F\u0915 ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin??"\u092E\u093E\u0928"} \u092E\u0947\u0902 ${o}${n.maximum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u092C\u0921\u093C\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin??"\u092E\u093E\u0928"} ${o}${n.maximum} \u0939\u094B`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin} \u092E\u0947\u0902 ${o}${n.minimum} ${a.unit} \u0939\u094B\u0902`:`\u092C\u0939\u0941\u0924 \u091B\u094B\u091F\u093E: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u0925\u093E \u0915\u093F ${n.origin} ${o}${n.minimum} \u0939\u094B`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.prefix}" \u0938\u0947 \u0936\u0941\u0930\u0942 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: "${o.suffix}" \u092A\u0930 \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u0907\u0938\u092E\u0947\u0902 "${o.includes}" \u0936\u093E\u092E\u093F\u0932 \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0902\u0917: \u092A\u0948\u091F\u0930\u094D\u0928 ${o.pattern} \u0938\u0947 \u092E\u0947\u0932 \u0916\u093E\u0928\u093E \u091A\u093E\u0939\u093F\u090F`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: \u092F\u0939 ${n.divisor} \u0915\u093E \u0917\u0941\u0923\u091C \u0939\u094B\u0928\u093E \u091A\u093E\u0939\u093F\u090F`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u0902\u091C\u0940${n.keys.length>1?"\u092F\u093E\u0901":""}: ${U(n.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u0902\u091C\u0940: ${n.origin} \u092E\u0947\u0902`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${n.origin} \u092E\u0947\u0902`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function Oy(){return{localeError:O$()}}var N$=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(n){return e[n]??null}let r={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",credit_card:"broj kreditne kartice",currency_code:"kod valute",iban:"IBAN",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${n.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return n.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${Z(n.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${n.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin),s=i[n.origin]??n.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${n.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${r[o.format]??n.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${n.divisor}`;case"unrecognized_keys":return`Neprepoznat${n.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${U(n.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[n.origin]??n.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[n.origin]??n.origin}`;default:return"Neispravan unos"}}};function Ny(){return{localeError:N$()}}var U$=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"},map:{unit:"elem",verb:"legyen"}};function t(n){return e[n]??null}let r={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",mac:"MAC c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",credit_card:"hitelk\xE1rtyasz\xE1m",currency_code:"p\xE9nznemk\xF3d",iban:"IBAN",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${n.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return n.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${Z(n.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xFAl nagy: ${n.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${n.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${n.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} m\xE9rete t\xFAl kicsi ${o}${n.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${n.origin} t\xFAl kicsi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${r[o.format]??n.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${n.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${n.keys.length>1?"s":""}: ${U(n.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${n.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${n.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Uy(){return{localeError:U$()}}function Ay(e,t,r){return Math.abs(e)===1?t:r}function Br(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],r=e[e.length-1];return e+(t.includes(r)?"\u0576":"\u0568")}var A$=()=>{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"},map:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(n){return e[n]??null}let r={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",mac:"MAC \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",credit_card:"\u056F\u0580\u0565\u0564\u056B\u057F \u0584\u0561\u0580\u057F\u056B \u0570\u0561\u0574\u0561\u0580",currency_code:"\u0561\u0580\u056A\u0578\u0582\u0575\u0569\u056B \u056F\u0578\u0564",iban:"IBAN",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${n.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return n.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${Z(n.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=Ay(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 ${Br(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Br(n.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=Ay(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 ${Br(n.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${n.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Br(n.origin)} \u056C\u056B\u0576\u056B ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${r[o.format]??n.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${n.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${n.keys.length>1?"\u0576\u0565\u0580":""}. ${U(n.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Br(n.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Br(n.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function jy(){return{localeError:A$()}}var j$=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"},map:{unit:"item",verb:"memiliki"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",credit_card:"nomor kartu kredit",currency_code:"kode mata uang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak valid: diharapkan instanceof ${n.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak valid: diharapkan ${Z(n.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: diharapkan ${n.origin??"value"} memiliki ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${n.origin??"value"} menjadi ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: diharapkan ${n.origin} memiliki ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${n.origin} menjadi ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${r[o.format]??n.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${n.keys.length>1?"s":""}: ${U(n.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${n.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${n.origin}`;default:return"Input tidak valid"}}};function My(){return{localeError:j$()}}var M$=()=>{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"},map:{unit:"hluti",verb:"a\xF0 hafa"}};function t(n){return e[n]??null}let r={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",credit_card:"kreditkortan\xFAmer",currency_code:"gjaldmi\xF0ilsk\xF3\xF0i",iban:"IBAN",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${n.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return n.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${Z(n.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} hafi ${o}${n.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin??"gildi"} s\xE9 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} hafi ${o}${n.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${n.origin} s\xE9 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${r[o.format]??n.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${n.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${n.keys.length>1?"ir lyklar":"ur lykill"}: ${U(n.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${n.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${n.origin}`;default:return"Rangt gildi"}}};function qy(){return{localeError:M$()}}var q$=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"},map:{unit:"elementi",verb:"avere"}};function t(n){return e[n]??null}let r={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",mac:"indirizzo MAC",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",credit_card:"numero di carta di credito",currency_code:"codice valuta",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input non valido: atteso instanceof ${n.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return n.values.length===1?`Input non valido: atteso ${Z(n.values[0])}`:`Opzione non valida: atteso uno tra ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Troppo grande: ${n.origin??"valore"} deve avere ${o}${n.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${n.origin??"valore"} deve essere ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Troppo piccolo: ${n.origin} deve avere ${o}${n.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${n.origin} deve essere ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${r[o.format]??n.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${n.divisor}`;case"unrecognized_keys":return`Chiav${n.keys.length>1?"i":"e"} non riconosciut${n.keys.length>1?"e":"a"}: ${U(n.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${n.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${n.origin}`;default:return"Input non valido"}}};function Ly(){return{localeError:q$()}}var L$=()=>{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"},map:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(n){return e[n]??null}let r={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",mac:"MAC\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",credit_card:"\u30AF\u30EC\u30B8\u30C3\u30C8\u30AB\u30FC\u30C9\u756A\u53F7",currency_code:"\u901A\u8CA8\u30B3\u30FC\u30C9",iban:"IBAN",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${n.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return n.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${Z(n.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${U(n.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=n.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(n.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${n.origin??"\u5024"}\u306F${n.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=n.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(n.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${n.origin}\u306F${n.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${n.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${n.keys.length>1?"\u7FA4":""}: ${U(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${n.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function Dy(){return{localeError:L$()}}var D$=()=>{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"},map:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(n){return e[n]??null}let r={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",mac:"MAC \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",credit_card:"\u10E1\u10D0\u10D9\u10E0\u10D4\u10D3\u10D8\u10E2\u10DD \u10D1\u10D0\u10E0\u10D0\u10D7\u10D8\u10E1 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",currency_code:"\u10D5\u10D0\u10DA\u10E3\u10E2\u10D8\u10E1 \u10D9\u10DD\u10D3\u10D8",iban:"IBAN",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${n.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return n.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${Z(n.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${U(n.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${n.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${n.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${U(n.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${n.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${n.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function Fy(){return{localeError:D$()}}var F$=()=>{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"},map:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(n){return e[n]??null}let r={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",mac:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 MAC",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",credit_card:"\u179B\u17C1\u1781\u1794\u17D0\u178E\u17D2\u178E\u17A5\u178E\u1791\u17B6\u1793",currency_code:"\u1780\u17BC\u178A\u179A\u17BC\u1794\u17B7\u1799\u1794\u17D0\u178E\u17D2\u178E",iban:"IBAN",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${n.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return n.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${Z(n.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${n.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${U(n.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${n.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function sc(){return{localeError:F$()}}function Vy(){return sc()}var V$=()=>{let e={string:{unit:"\u0C85\u0C95\u0CCD\u0CB7\u0CB0\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},file:{unit:"\u0CAC\u0CC8\u0C9F\u0CCD\u200C\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},array:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},set:{unit:"\u0CB5\u0CB8\u0CCD\u0CA4\u0CC1\u0C97\u0CB3\u0CC1",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"},map:{unit:"entries",verb:"\u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1"}};function t(n){return e[n]??null}let r={regex:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD",email:"email \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95\u0CA6 \u0CB8\u0CAE\u0CAF",date:"ISO \u0CA6\u0CBF\u0CA8\u0CBE\u0C82\u0C95",time:"ISO \u0CB8\u0CAE\u0CAF",duration:"ISO \u0C85\u0CB5\u0CA7\u0CBF",ipv4:"IPv4 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",ipv6:"IPv6 \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",mac:"MAC \u0CB5\u0CBF\u0CB3\u0CBE\u0CB8",cidrv4:"IPv4 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",cidrv6:"IPv6 \u0CB5\u0CCD\u0CAF\u0CBE\u0CAA\u0CCD\u0CA4\u0CBF\u0CAF",base64:"base64-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",base64url:"base64url-encoded\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",json_string:"JSON\u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD",e164:"E.164 \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",credit_card:"\u0C95\u0CCD\u0CB0\u0CC6\u0CA1\u0CBF\u0C9F\u0CCD \u0C95\u0CBE\u0CB0\u0CCD\u0CA1\u0CCD \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6",currency_code:"\u0C95\u0CB0\u0CC6\u0CA8\u0CCD\u0CB8\u0CBF \u0C95\u0CCB\u0CA1\u0CCD",iban:"IBAN",jwt:"JWT",template_literal:"\u0C87\u0CA8\u0CCD\u0CAA\u0CC1\u0C9F\u0CCD"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${o}, \u0CB8\u0CCD\u0CB5\u0CC0\u0C95\u0CB0\u0CBF\u0CB8\u0CBF\u0CA6\u0CA8\u0CC1 ${s}`}case"invalid_value":return n.values.length===1?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${Z(n.values[0])}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C86\u0CAF\u0CCD\u0C95\u0CC6: \u0C87\u0CB5\u0CC1\u0C97\u0CB3\u0CB2\u0CCD\u0CB2\u0CBF \u0C92\u0C82\u0CA6\u0CA8\u0CCD\u0CA8\u0CC1 \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin??"value"} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${n.maximum.toString()} ${a.unit??"\u0C85\u0C82\u0CB6\u0C97\u0CB3\u0CC1"}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0CA6\u0CCA\u0CA1\u0CCD\u0CA1\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin??"value"} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin} \u0CB9\u0CCA\u0C82\u0CA6\u0CB2\u0CC1 ${o}${n.minimum.toString()} ${a.unit}`:`\u0CA4\u0CC1\u0C82\u0CAC\u0CBE \u0C9A\u0CBF\u0C95\u0CCD\u0C95\u0CA6\u0CC1: \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.origin} \u0C8E\u0C82\u0CA6\u0CC1 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0CAA\u0CCD\u0CB0\u0CBE\u0CB0\u0C82\u0CAD\u0CBF\u0CB8\u0CAC\u0CC7\u0C95\u0CC1 "${o.prefix}"`:o.format==="ends_with"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C87\u0CA6\u0CB0\u0CCA\u0C82\u0CA6\u0CBF\u0C97\u0CC6 \u0C95\u0CCA\u0CA8\u0CC6\u0C97\u0CCA\u0CB3\u0CCD\u0CB3\u0CAC\u0CC7\u0C95\u0CC1 "${o.suffix}"`:o.format==="includes"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0C92\u0CB3\u0C97\u0CCA\u0C82\u0CA1\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 "${o.includes}"`:o.format==="regex"?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0CB8\u0CCD\u0C9F\u0CCD\u0CB0\u0CBF\u0C82\u0C97\u0CCD: \u0CAE\u0CBE\u0CA6\u0CB0\u0CBF\u0C97\u0CC6 \u0CB9\u0CCA\u0C82\u0CA6\u0CBF\u0C95\u0CC6\u0CAF\u0CBE\u0C97\u0CAC\u0CC7\u0C95\u0CC1 ${o.pattern}`:`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6: \u0CAC\u0CB9\u0CC1\u0CB8\u0C82\u0C96\u0CCD\u0CAF\u0CC6\u0CAF\u0CBE\u0C97\u0CBF\u0CB0\u0CAC\u0CC7\u0C95\u0CC1 ${n.divisor}`;case"unrecognized_keys":return`\u0C97\u0CC1\u0CB0\u0CC1\u0CA4\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CA6 \u0C95\u0CC0 ${n.keys.length>1?"s":""}: ${U(n.keys,", ")}`;case"invalid_key":return`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF\u0CB5\u0CBE\u0CA6 \u0C95\u0CC0 \u0C87\u0CA8\u0CCD ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CA4\u0CBE\u0CB0\u0CA4\u0CAE\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF. \u0CA8\u0CBF\u0CB0\u0CC0\u0C95\u0CCD\u0CB7\u0CBF\u0CB8\u0CB2\u0CBE\u0C97\u0CBF\u0CA6\u0CC6 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD";case"invalid_element":return`\u0CB0\u0CB2\u0CCD\u0CB2\u0CBF \u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0CAE\u0CCC\u0CB2\u0CCD\u0CAF ${n.origin}`;default:return"\u0C85\u0CAE\u0CBE\u0CA8\u0CCD\u0CAF \u0C87\u0CA8\u0CCD\u200C\u0CAA\u0CC1\u0C9F\u0CCD"}}};function Hy(){return{localeError:V$()}}var H$=()=>{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"},map:{unit:"\uAC1C",verb:"to have"}};function t(n){return e[n]??null}let r={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",mac:"MAC \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",credit_card:"\uC2E0\uC6A9\uCE74\uB4DC \uBC88\uD638",currency_code:"\uD1B5\uD654 \uCF54\uB4DC",iban:"IBAN",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${n.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return n.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${Z(n.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${U(n.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=n.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()}${c} ${o}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${n.maximum.toString()} ${o}${a}`}case"too_small":{let o=n.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=t(n.origin),c=s?.unit??"\uC694\uC18C";return s?`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()}${c} ${o}${a}`:`${n.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${n.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${r[o.format]??n.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${n.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${U(n.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${n.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${n.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function Zy(){return{localeError:H$()}}var Gi=e=>e.charAt(0).toUpperCase()+e.slice(1);function Gy(e){let t=Math.abs(e),r=t%10,i=t%100;return i>=11&&i<=19||r===0?"many":r===1?"one":"few"}var Z$=()=>{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(n,o,a,s){let c=e[n]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let r={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",mac:"MAC adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",credit_card:"kredito kortel\u0117s numeris",currency_code:"valiutos kodas",iban:"IBAN",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${n.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return n.values.length===1?`Privalo b\u016Bti ${Z(n.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${U(n.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[n.origin]??n.origin,a=t(n.origin,Gy(Number(n.maximum)),n.inclusive??!1,"smaller");if(a?.verb)return`${Gi(o??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.maximum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Gi(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[n.origin]??n.origin,a=t(n.origin,Gy(Number(n.minimum)),n.inclusive??!1,"bigger");if(a?.verb)return`${Gi(o??n.origin??"reik\u0161m\u0117")} ${a.verb} ${n.minimum.toString()} ${a.unit??"element\u0173"}`;let s=n.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Gi(o??n.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${n.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${r[o.format]??n.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${n.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${n.keys.length>1?"i":"as"} rakt${n.keys.length>1?"ai":"as"}: ${U(n.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[n.origin]??n.origin;return`${Gi(o??n.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function Jy(){return{localeError:Z$()}}var G$=()=>{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"},map:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(n){return e[n]??null}let r={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",mac:"MAC \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",credit_card:"\u0431\u0440\u043E\u0458 \u043D\u0430 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u0430 \u043A\u0430\u0440\u0442\u0438\u0447\u043A\u0430",currency_code:"\u043A\u043E\u0434 \u043D\u0430 \u0432\u0430\u043B\u0443\u0442\u0430",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${n.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`Invalid input: expected ${Z(n.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${n.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${U(n.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${n.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${n.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function By(){return{localeError:G$()}}var J$=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"},map:{unit:"elemen",verb:"mempunyai"}};function t(n){return e[n]??null}let r={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",mac:"alamat MAC",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",credit_card:"nombor kad kredit",currency_code:"kod mata wang",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Input tidak sah: dijangka instanceof ${n.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return n.values.length===1?`Input tidak sah: dijangka ${Z(n.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Terlalu besar: dijangka ${n.origin??"nilai"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${n.origin??"nilai"} adalah ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Terlalu kecil: dijangka ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${n.origin} adalah ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${r[o.format]??n.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${n.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${U(n.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${n.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${n.origin}`;default:return"Input tidak sah"}}};function Ky(){return{localeError:J$()}}var B$=()=>{let e={string:{unit:"\u0905\u0915\u094D\u0937\u0930",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},file:{unit:"\u092C\u093E\u0907\u091F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},array:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},set:{unit:"\u0924\u0924\u094D\u0935",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"},map:{unit:"\u092A\u094D\u0930\u0935\u093F\u0937\u094D\u091F\u093F",verb:"\u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B"}};function t(n){return e[n]??null}let r={regex:"\u0907\u0928\u092A\u0941\u091F",email:"\u0907\u092E\u0947\u0932 \u0920\u0947\u0917\u093E\u0928\u093E",url:"URL",emoji:"\u0907\u092E\u094B\u091C\u0940",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u092E\u093F\u0924\u093F \u0930 \u0938\u092E\u092F",date:"ISO \u092E\u093F\u0924\u093F",time:"ISO \u0938\u092E\u092F",duration:"ISO \u0905\u0935\u0927\u093F",ipv4:"IPv4 \u0920\u0947\u0917\u093E\u0928\u093E",ipv6:"IPv6 \u0920\u0947\u0917\u093E\u0928\u093E",mac:"MAC \u0920\u0947\u0917\u093E\u0928\u093E",cidrv4:"IPv4 \u0926\u093E\u092F\u0930\u093E",cidrv6:"IPv6 \u0926\u093E\u092F\u0930\u093E",base64:"base64-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",base64url:"base64url-\u0907\u0928\u094D\u0915\u094B\u0921 \u0917\u0930\u093F\u090F\u0915\u094B \u0938\u094D\u091F\u094D\u0930\u093F\u0919",json_string:"JSON \u0938\u094D\u091F\u094D\u0930\u093F\u0919",e164:"E.164 \u0928\u092E\u094D\u092C\u0930",credit_card:"\u0915\u094D\u0930\u0947\u0921\u093F\u091F \u0915\u093E\u0930\u094D\u0921 \u0928\u092E\u094D\u092C\u0930",currency_code:"\u092E\u0941\u0926\u094D\u0930\u093E \u0915\u094B\u0921",iban:"IBAN",jwt:"JWT",template_literal:"\u0907\u0928\u092A\u0941\u091F"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${o}, \u092A\u094D\u0930\u093E\u092A\u094D\u0924 ${s}`}case"invalid_value":return n.values.length===1?`\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${Z(n.values[0])}`:`\u0905\u092E\u093E\u0928\u094D\u092F \u0935\u093F\u0915\u0932\u094D\u092A: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 \u092E\u093E\u0928\u0939\u0930\u0942 \u092E\u0927\u094D\u092F\u0947 \u090F\u0915 ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${n.origin??"\u092E\u093E\u0928"} \u092E\u093E ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0920\u0942\u0932\u094B: ${n.origin??"\u092E\u093E\u0928"} ${o}${n.maximum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${n.origin} \u092E\u093E ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`\u0927\u0947\u0930\u0948 \u0938\u093E\u0928\u094B: ${n.origin} ${o}${n.minimum.toString()} \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.prefix}" \u092C\u093E\u091F \u0938\u0941\u0930\u0941 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="ends_with"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.suffix}" \u092E\u093E \u0938\u092E\u093E\u092A\u094D\u0924 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="includes"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: "${o.includes}" \u0938\u092E\u093E\u0935\u0947\u0936 \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`:o.format==="regex"?`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u094D\u091F\u094D\u0930\u093F\u0919: \u0922\u093E\u0901\u091A\u093E ${o.pattern} \u0938\u0901\u0917 \u092E\u0947\u0932 \u0916\u093E\u0928\u0941\u092A\u0930\u094D\u091B`:`\u0905\u092E\u093E\u0928\u094D\u092F ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0938\u0902\u0916\u094D\u092F\u093E: ${n.divisor} \u0915\u094B \u0917\u0941\u0923\u091C \u0939\u0941\u0928\u0941\u092A\u0930\u094D\u091B`;case"unrecognized_keys":return`\u0905\u092A\u0930\u093F\u091A\u093F\u0924 \u0915\u0941\u091E\u094D\u091C\u0940${n.keys.length>1?"\u0939\u0930\u0942":""}: ${U(n.keys,", ")}`;case"invalid_key":return`\u0905\u092E\u093E\u0928\u094D\u092F \u0915\u0941\u091E\u094D\u091C\u0940: ${n.origin} \u092E\u093E`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u0905\u092E\u093E\u0928\u094D\u092F \u0921\u093F\u0938\u094D\u0915\u094D\u0930\u093F\u092E\u093F\u0928\u0947\u091F\u0930 \u092E\u093E\u0928: \u0905\u092A\u0947\u0915\u094D\u0937\u093F\u0924 ${n.options.map(a=>`'${a}'`).join(" | ")}`:"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F";case"invalid_element":return`\u0905\u092E\u093E\u0928\u094D\u092F \u092E\u093E\u0928: ${n.origin} \u092E\u093E`;default:return"\u0905\u092E\u093E\u0928\u094D\u092F \u0907\u0928\u092A\u0941\u091F"}}};function Wy(){return{localeError:B$()}}var K$=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"},map:{unit:"elementen",verb:"heeft"}};function t(n){return e[n]??null}let r={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",mac:"MAC-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",credit_card:"creditcardnummer",currency_code:"valutacode",iban:"IBAN",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ongeldige invoer: verwacht instanceof ${n.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return n.values.length===1?`Ongeldige invoer: verwacht ${Z(n.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin),s=n.origin==="date"?"laat":n.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin??"waarde"} ${o}${n.maximum.toString()} is`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin),s=n.origin==="date"?"vroeg":n.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${n.origin} ${o}${n.minimum.toString()} is`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${r[o.format]??n.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${n.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${n.keys.length>1?"s":""}: ${U(n.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${n.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${n.origin}`;default:return"Ongeldige invoer"}}};function Qy(){return{localeError:K$()}}var W$=()=>{let e={string:{unit:"teikn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"element",verb:"\xE5 innehalde"},set:{unit:"element",verb:"\xE5 innehalde"},map:{unit:"element",verb:"\xE5 innehalde"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varigheit",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkoda streng",base64url:"base64url-enkoda streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tal",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventa instanceof ${n.expected}, fekk ${s}`:`Ugyldig input: forventa ${o}, fekk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventa ${Z(n.values[0])}`:`Ugyldig val: forventa eitt av ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventa ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`For stor(t): forventa ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventa ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventa ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 slutte med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 innehalde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tal: m\xE5 vere eit multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjende n\xF8klar":"Ukjend n\xF8kkel"}: ${U(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function Xy(){return{localeError:W$()}}var Q$=()=>{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"},map:{unit:"elementer",verb:"\xE5 inneholde"}};function t(n){return e[n]??null}let r={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-adresse",ipv6:"IPv6-adresse",mac:"MAC-adresse",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",credit_card:"kredittkortnummer",currency_code:"valutakode",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ugyldig input: forventet instanceof ${n.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return n.values.length===1?`Ugyldig verdi: forventet ${Z(n.values[0])}`:`Ugyldig valg: forventet en av ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${n.origin??"value"} til \xE5 ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${n.origin} til \xE5 ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${r[o.format]??n.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${U(n.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${n.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${n.origin}`;default:return"Ugyldig input"}}};function Yy(){return{localeError:Q$()}}var X$=()=>{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"},map:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(n){return e[n]??null}let r={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",mac:"MAC ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",credit_card:"i'tib\xE2r kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`F\xE2sit giren: umulan instanceof ${n.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`F\xE2sit giren: umulan ${Z(n.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${n.origin??"value"}, ${o}${n.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${n.origin}, ${o}${n.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=n;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${r[o.format]??n.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${n.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${n.keys.length>1?"s":""}: ${U(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${n.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function eb(){return{localeError:X$()}}var Y$=()=>{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"},map:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(n){return e[n]??null}let r={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",mac:"\u062F MAC \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",credit_card:"\u062F \u06A9\u0631\u06CC\u0689\u06CC\u067C \u06A9\u0627\u0631\u062A \u0634\u0645\u06CC\u0631\u0647",currency_code:"\u062F \u0627\u0633\u0639\u0627\u0631\u0648 \u06A9\u0648\u0689",iban:"IBAN",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${n.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return n.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${Z(n.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${U(n.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${n.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${n.maximum.toString()} \u0648\u064A`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${n.origin} \u0628\u0627\u06CC\u062F ${o}${n.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${r[o.format]??n.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${n.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${n.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${U(n.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${n.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${n.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function tb(){return{localeError:Y$()}}var ex=()=>{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"},map:{unit:"element\xF3w",verb:"mie\u0107"}};function t(n){return e[n]??null}let r={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",mac:"adres MAC",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",credit_card:"numer karty kredytowej",currency_code:"kod waluty",iban:"IBAN",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${n.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return n.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${Z(n.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${n.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${n.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${r[o.format]??n.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${n.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${n.keys.length>1?"s":""}: ${U(n.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${n.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${n.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function nb(){return{localeError:ex()}}var tx=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"o intervalo de endere\xE7os IPv4",cidrv6:"o intervalo de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tuplo",articles:i.masculine},record:{name:"registo",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"ficheiro",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){let c=n[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{let s=o(a.expected,"indefinite"),c=G(a.input),l=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${l}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${Z(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${U(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=t(a.origin);return c?`Demasiado grande: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Demasiado grande: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=t(a.origin);return c?`Demasiado pequeno: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Demasiado pequeno: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar por "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar em "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${U(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function rb(){return{localeError:tx()}}var nx=()=>{let e={string:{unit:"caracteres"},file:{unit:"bytes"},array:{unit:"elementos"},set:{unit:"elementos"},map:{unit:"entradas"}};function t(a){return e[a]??null}let r={regex:"a entrada",email:"o endere\xE7o de e-mail",url:"o URL",emoji:"o emoji",uuid:"o UUID",uuidv4:"o UUIDv4",uuidv6:"o UUIDv6",nanoid:"o nanoid",guid:"o GUID",cuid:"o cuid",cuid2:"o cuid2",ulid:"o ULID",xid:"o XID",ksuid:"o KSUID",datetime:"a data e hora ISO",date:"a data ISO",time:"a hora ISO",duration:"a dura\xE7\xE3o ISO",ipv4:"o endere\xE7o IPv4",ipv6:"o endere\xE7o IPv6",mac:"o endere\xE7o MAC",cidrv4:"a faixa de endere\xE7os IPv4",cidrv6:"a faixa de endere\xE7os IPv6",base64:"o texto codificado em base64",base64url:"o texto codificado em base64url",json_string:"o texto JSON",e164:"o n\xFAmero E.164",credit_card:"o n\xFAmero de cart\xE3o de cr\xE9dito",currency_code:"o c\xF3digo de moeda",iban:"o IBAN",jwt:"o JWT",template_literal:"a entrada"},i={masculine:{definite:"o",indefinite:"um"},feminine:{definite:"a",indefinite:"uma"}},n={string:{name:"texto",articles:i.masculine},number:{name:"n\xFAmero",articles:i.masculine},int:{name:"n\xFAmero inteiro",articles:i.masculine},boolean:{name:"valor booleano",articles:i.masculine},bigint:{name:"n\xFAmero bigint",articles:i.masculine},symbol:{name:"s\xEDmbolo",articles:i.masculine},undefined:{name:'valor "undefined"',articles:i.masculine},null:{name:'valor "nulo"',articles:i.masculine},never:{name:'valor "never"',articles:i.masculine},void:{name:'valor "void"',articles:i.masculine},date:{name:"data",articles:i.feminine},array:{name:"vetor",articles:i.masculine},object:{name:"objeto",articles:i.masculine},tuple:{name:"tupla",articles:i.feminine},record:{name:"registro",articles:i.masculine},map:{name:"mapa",articles:i.masculine},set:{name:"conjunto",articles:i.masculine},file:{name:"arquivo",articles:i.masculine},nonoptional:{name:"valor n\xE3o opcional",articles:i.masculine},nan:{name:'valor "NaN"',articles:i.masculine},function:{name:"fun\xE7\xE3o",articles:i.feminine}};function o(a,s){let c=n[a]??{name:`valor "${a}"`,articles:i.masculine};return`${c.articles[s]} ${c.name}`}return a=>{switch(a.code){case"invalid_type":{let s=o(a.expected,"indefinite"),c=G(a.input),l=o(c,"indefinite");return`Entrada inv\xE1lida: esperava ${s}, recebeu ${l}`}case"invalid_value":return a.values.length===1?`Entrada inv\xE1lida: esperava ${Z(a.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperava uma das seguintes op\xE7\xF5es: ${U(a.values,"|")}`;case"too_big":{let s=a.inclusive?"<=":"<",c=t(a.origin);return c?`Grande demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.maximum.toString()} ${c.unit??"elementos"}`:`Grande demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.maximum.toString()}`}case"too_small":{let s=a.inclusive?">=":">",c=t(a.origin);return c?`Pequeno demais: esperava que ${o(a.origin,"definite")} tivesse ${s} ${a.minimum.toString()} ${c.unit??"elementos"}`:`Pequeno demais: esperava que ${o(a.origin,"definite")} fosse ${s} ${a.minimum.toString()}`}case"invalid_format":{let s=a;return s.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${s.prefix}"`:s.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${s.suffix}"`:s.format==="includes"?`Texto inv\xE1lido: deve incluir "${s.includes}"`:s.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${s.pattern}`:`Formato d${r[s.format]??a.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${a.divisor}`;case"unrecognized_keys":{let s=a.keys.length>1?"s":"";return`Chave${s} inv\xE1lida${s}: ${U(a.keys,", ")}`}case"invalid_key":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;case"invalid_union":return a.options&&Array.isArray(a.options)&&a.options.length>0?`Valor de discrimina\xE7\xE3o inv\xE1lido. Esperava ${a.options.map(c=>`'${c}'`).join(" | ")}`:"Entrada inv\xE1lida";case"invalid_element":return`Entrada inv\xE1lida n${o(a.origin,"definite")}`;default:return"Entrada inv\xE1lida"}}};function ob(){return{localeError:nx()}}var rx=()=>{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(n){return e[n]??null}let r={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",credit_card:"num\u0103r de card de credit",currency_code:"cod valutar",iban:"IBAN",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return n.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${Z(n.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${n.origin??"valoarea"} s\u0103 fie ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Prea mic: a\u0219teptat ca ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${n.origin} s\u0103 fie ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${r[o.format]??n.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${n.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${U(n.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${n.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${n.origin}`;default:return"Intrare invalid\u0103"}}};function ib(){return{localeError:rx()}}function ab(e,t,r,i){let n=Math.abs(e),o=n%10,a=n%100;return a>=11&&a<=19?i:o===1?t:o>=2&&o<=4?r:i}var ox=()=>{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"},map:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",mac:"MAC \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0439 \u043A\u0430\u0440\u0442\u044B",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u044B",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${n.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${Z(n.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);if(a){let s=Number(n.maximum),c=ab(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);if(a){let s=Number(n.minimum),c=ab(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${n.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${n.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${n.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0438":""}: ${U(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${n.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function sb(){return{localeError:ox()}}var ix=()=>{let e={string:{unit:"znakov",verb:"ma\u0165"},file:{unit:"bajtov",verb:"ma\u0165"},array:{unit:"prvkov",verb:"ma\u0165"},set:{unit:"prvkov",verb:"ma\u0165"},map:{unit:"polo\u017Eiek",verb:"ma\u0165"}};function t(n){return e[n]??null}let r={regex:"regul\xE1rny v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"d\xE1tum a \u010Das vo form\xE1te ISO",date:"d\xE1tum vo form\xE1te ISO",time:"\u010Das vo form\xE1te ISO",duration:"doba trvania ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",mac:"MAC adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64",base64url:"re\u0165azec zak\xF3dovan\xFD vo form\xE1te base64url",json_string:"re\u0165azec vo form\xE1te JSON",e164:"\u010D\xEDslo E.164",credit_card:"\u010D\xEDslo kreditnej karty",currency_code:"k\xF3d meny",iban:"IBAN",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"re\u0165azec",function:"funkcia",array:"pole"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 instanceof ${n.expected}, obdr\u017Ean\xE9 ${s}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${o}, obdr\u017Ean\xE9 ${s}`}case"invalid_value":return n.values.length===1?`Neplatn\xFD vstup: o\u010Dak\xE1van\xE9 ${Z(n.values[0])}`:`Neplatn\xFD vstup: o\u010Dak\xE1van\xE1 jedna z hodn\xF4t ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${n.origin??"hodnota"} mus\xED ma\u0165 ${o}${n.maximum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 ve\u013Ek\xE1: ${n.origin??"hodnota"} mus\xED by\u0165 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Hodnota je pr\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED ma\u0165 ${o}${n.minimum.toString()} ${a.unit??"prvkov"}`:`Hodnota je pr\xEDli\u0161 mal\xE1: ${n.origin??"hodnota"} mus\xED by\u0165 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neplatn\xFD re\u0165azec: mus\xED za\u010D\xEDna\u0165 na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD re\u0165azec: mus\xED kon\u010Di\u0165 na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD re\u0165azec: mus\xED obsahova\u0165 "${o.includes}"`:o.format==="regex"?`Neplatn\xFD re\u0165azec: mus\xED zodpoveda\u0165 vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${r[o.format]??n.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED by\u0165 n\xE1sobkom ${n.divisor}`;case"unrecognized_keys":return`Nezn\xE1me kl\xFA\u010De: ${U(n.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xFA\u010D v ${n.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${n.origin}`;default:return"Neplatn\xFD vstup"}}};function cb(){return{localeError:ix()}}var ax=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"},map:{unit:"elementov",verb:"imeti"}};function t(n){return e[n]??null}let r={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",mac:"MAC naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",credit_card:"\u0161tevilka kreditne kartice",currency_code:"koda valute",iban:"IBAN",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${n.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return n.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${Z(n.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} imelo ${o}${n.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${n.origin??"vrednost"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${n.origin} imelo ${o}${n.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${r[o.format]??n.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${n.divisor}`;case"unrecognized_keys":return`Neprepoznan${n.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${U(n.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${n.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${n.origin}`;default:return"Neveljaven vnos"}}};function lb(){return{localeError:ax()}}var sx=()=>{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"},map:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(n){return e[n]??null}let r={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-adress",ipv6:"IPv6-adress",mac:"MAC-adress",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",credit_card:"kreditkortsnummer",currency_code:"valutakod",iban:"IBAN",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${n.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return n.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${Z(n.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${n.origin??"v\xE4rdet"} att ha ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${n.origin??"v\xE4rdet"} att ha ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${r[o.format]??n.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${n.divisor}`;case"unrecognized_keys":return`${n.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${U(n.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${n.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${n.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function ub(){return{localeError:sx()}}var cx=()=>{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"},map:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(n){return e[n]??null}let r={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",mac:"MAC \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",credit_card:"\u0B95\u0B9F\u0BA9\u0BCD \u0B85\u0B9F\u0BCD\u0B9F\u0BC8 \u0B8E\u0BA3\u0BCD",currency_code:"\u0BA8\u0BBE\u0BA3\u0BAF\u0B95\u0BCD \u0B95\u0BC1\u0BB1\u0BBF\u0BAF\u0BC0\u0B9F\u0BC1",iban:"IBAN",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${n.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return n.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${Z(n.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${U(n.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${n.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${o}${n.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n.origin} ${o}${n.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${n.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${n.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${U(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${n.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function db(){return{localeError:cx()}}var lx=()=>{let e={string:{unit:"\u0430\u043B\u043E\u043C\u0430\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},file:{unit:"\u0431\u0430\u0439\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},array:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},set:{unit:"\u0443\u043D\u0441\u0443\u0440",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"},map:{unit:"\u0441\u0430\u0431\u0442",verb:"\u0434\u043E\u0448\u0442\u0430 \u0431\u043E\u0448\u0430\u0434"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0443\u0440\u0443\u0434",email:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 email",url:"URL",emoji:"\u044D\u043C\u043E\u04B7\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0441\u0430\u043D\u0430\u0432\u0443 \u0432\u0430\u049B\u0442\u0438 ISO",date:"\u0441\u0430\u043D\u0430\u0438 ISO",time:"\u0432\u0430\u049B\u0442\u0438 ISO",duration:"\u0434\u0430\u0432\u043E\u043C\u043D\u043E\u043A\u0438\u0438 ISO",ipv4:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv4",ipv6:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 IPv6",mac:"\u0441\u0443\u0440\u043E\u0493\u0430\u0438 MAC",cidrv4:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv4",cidrv6:"\u043C\u0430\u04B3\u0434\u0443\u0434\u0430\u0438 IPv6",base64:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64",base64url:"\u0441\u0430\u0442\u0440\u0438 \u0434\u0430\u0440 \u0444\u043E\u0440\u043C\u0430\u0442\u0438 base64url",json_string:"\u0441\u0430\u0442\u0440\u0438 JSON",e164:"\u0440\u0430\u049B\u0430\u043C\u0438 E.164",credit_card:"\u0440\u0430\u049B\u0430\u043C\u0438 \u043A\u043E\u0440\u0442\u0438 \u043A\u0440\u0435\u0434\u0438\u0442\u04E3",currency_code:"\u0440\u0430\u043C\u0437\u0438 \u0430\u0441\u044A\u043E\u0440",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0443\u0440\u0443\u0434"},i={nan:"NaN",number:"\u0440\u0430\u049B\u0430\u043C",string:"\u0441\u0430\u0442\u0440",array:"\u043C\u0430\u0441\u0441\u0438\u0432",object:"\u043E\u0431\u044A\u0435\u043A\u0442",date:"\u0441\u0430\u043D\u0430"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${o} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442, ${s} \u0433\u0438\u0440\u0438\u0444\u0442\u0430 \u0448\u0443\u0434`}case"invalid_value":return n.values.length===1?`\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: ${Z(n.values[0])} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:`\u0418\u043D\u0442\u0438\u0445\u043E\u0431\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u044F\u043A\u0435 \u0430\u0437 ${U(n.values,"|")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${n.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u043A\u0430\u043B\u043E\u043D: ${n.origin??"\u049B\u0438\u043C\u0430\u0442"} \u0431\u043E\u044F\u0434 ${o}${n.maximum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${n.origin} \u0431\u043E\u044F\u0434 ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`\u0425\u0435\u043B\u0435 \u0445\u0443\u0440\u0434: ${n.origin} \u0431\u043E\u044F\u0434 ${o}${n.minimum.toString()} \u0431\u043E\u0448\u0430\u0434`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${o.prefix}" \u043E\u0493\u043E\u0437 \u0448\u0430\u0432\u0430\u0434`:o.format==="ends_with"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u043E "${o.suffix}" \u0430\u043D\u04B7\u043E\u043C \u0451\u0431\u0430\u0434`:o.format==="includes"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 "${o.includes}"-\u0440\u043E \u0434\u0430\u0440 \u0431\u0430\u0440 \u0433\u0438\u0440\u0430\u0434`:o.format==="regex"?`\u0421\u0430\u0442\u0440\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 \u043D\u0430\u043C\u0443\u043D\u0430\u0438 ${o.pattern} \u043C\u0443\u0432\u043E\u0444\u0438\u049B\u0430\u0442 \u043A\u0443\u043D\u0430\u0434`:`${r[o.format]??n.format}-\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442`}case"not_multiple_of":return`\u0420\u0430\u049B\u0430\u043C\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442: \u0431\u043E\u044F\u0434 \u0431\u0430 ${n.divisor} \u0431\u0435 \u0431\u0430\u049B\u0438\u044F \u0442\u0430\u049B\u0441\u0438\u043C \u0448\u0430\u0432\u0430\u0434`;case"unrecognized_keys":return`\u041A\u0430\u043B\u0438\u0434${n.keys.length>1?"\u04B3\u043E\u0438":"\u0438"} \u043D\u043E\u043C\u0430\u044A\u043B\u0443\u043C: ${U(n.keys,", ")}`;case"invalid_key":return`\u041A\u0430\u043B\u0438\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${n.origin}`;case"invalid_union":return n.options&&Array.isArray(n.options)&&n.options.length>0?`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442\u0438 \u0434\u0438\u0441\u043A\u0440\u0438\u043C\u0438\u043D\u0430\u0442\u043E\u0440: ${n.options.map(a=>`'${a}'`).join(" | ")} \u0438\u043D\u0442\u0438\u0437\u043E\u0440 \u043C\u0435\u0440\u0430\u0444\u0442`:"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442";case"invalid_element":return`\u049A\u0438\u043C\u0430\u0442\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442 \u0434\u0430\u0440 ${n.origin}`;default:return"\u0412\u0443\u0440\u0443\u0434\u0438 \u043D\u043E\u0434\u0443\u0440\u0443\u0441\u0442"}}};function pb(){return{localeError:lx()}}var ux=()=>{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"},map:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(n){return e[n]??null}let r={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",mac:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 MAC",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",credit_card:"\u0E2B\u0E21\u0E32\u0E22\u0E40\u0E25\u0E02\u0E1A\u0E31\u0E15\u0E23\u0E40\u0E04\u0E23\u0E14\u0E34\u0E15",currency_code:"\u0E23\u0E2B\u0E31\u0E2A\u0E2A\u0E01\u0E38\u0E25\u0E40\u0E07\u0E34\u0E19",iban:"IBAN",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${n.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return n.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${Z(n.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(n.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${n.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${r[o.format]??n.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${n.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${U(n.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${n.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function mb(){return{localeError:ux()}}var dx=()=>{let e={string:{unit:"simwol",verb:"bolmaly"},file:{unit:"ba\xFDt",verb:"bolmaly"},array:{unit:"elementler",verb:"bolmaly"},set:{unit:"elementler",verb:"bolmaly"},map:{unit:"elementler",verb:"bolmaly"}};function t(n){return e[n]??null}let r={regex:"giri\u015F",email:"e-po\xE7ta salgysy",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sene we wagt",date:"ISO sene",time:"ISO wagt",duration:"ISO wagt aralygy",ipv4:"IPv4 salgysy",ipv6:"IPv6 salgysy",mac:"MAC salgysy",cidrv4:"IPv4 aralygy",cidrv6:"IPv6 aralygy",base64:"base64 bilen \u015Fifrlenen setir",base64url:"base64url bilen \u015Fifrlenen setir",json_string:"JSON setiri",e164:"E.164 nomeri",credit_card:"kredit kartyny\u0148 nomeri",currency_code:"wal\xFDuta kody",iban:"IBAN",jwt:"JWT",template_literal:"\u015Fablon"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return`N\xE4dogry baha: gara\u015Fylan ${o} \xFDerine ${s} alyndy`}case"invalid_value":return n.values.length===1?`N\xE4dogry baha: ${Z(n.values[0])} bolmaly`:`N\xE4dogry sa\xFDlaw: a\u015Fakdakylardan biri bolmaly: ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Has uly: gara\u015Fyl\xFDan ${n.origin??"baha"} ${o} ${n.maximum.toString()} ${a.unit??"element"}`:`Has uly: gara\u015Fyl\xFDan ${n.origin??"baha"} ${o} ${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Has ki\xE7i: gara\u015Fyl\xFDan ${n.origin} ${o} ${n.minimum.toString()} ${a.unit}`:`Has ki\xE7i: gara\u015Fyl\xFDan ${n.origin} ${o} ${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`N\xE4dogry setir: "${o.prefix}" bilen ba\u015Flamaly`:o.format==="ends_with"?`N\xE4dogry setir: "${o.suffix}" bilen gutarmaly`:o.format==="includes"?`N\xE4dogry setir: "${o.includes}" saklamaly`:o.format==="regex"?`N\xE4dogry setir: ${o.pattern} nusga la\xFDyk bolmaly`:`N\xE4dogry ${r[o.format]??n.format}`}case"not_multiple_of":return`N\xE4dogry san: ${n.divisor} bilen galyndysyz b\xF6l\xFCnmeli`;case"unrecognized_keys":return`Tanalma\xFDan a\xE7ar${n.keys.length>1?"lar":""}: ${U(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde n\xE4dogry a\xE7ar`;case"invalid_union":return"N\xE4dogry baha";case"invalid_element":return`${n.origin} i\xE7inde n\xE4dogry baha`;default:return"N\xE4dogry baha"}}};function fb(){return{localeError:dx()}}var px=()=>{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"},map:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(n){return e[n]??null}let r={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",mac:"MAC adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",credit_card:"kredi kart\u0131 numaras\u0131",currency_code:"para birimi kodu",iban:"IBAN",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${n.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return n.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${Z(n.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${n.origin??"de\u011Fer"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${r[o.format]??n.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${n.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${n.keys.length>1?"lar":""}: ${U(n.keys,", ")}`;case"invalid_key":return`${n.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${n.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function hb(){return{localeError:px()}}var mx=()=>{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"},map:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(n){return e[n]??null}let r={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",mac:"\u0430\u0434\u0440\u0435\u0441\u0430 MAC",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",credit_card:"\u043D\u043E\u043C\u0435\u0440 \u043A\u0440\u0435\u0434\u0438\u0442\u043D\u043E\u0457 \u043A\u0430\u0440\u0442\u043A\u0438",currency_code:"\u043A\u043E\u0434 \u0432\u0430\u043B\u044E\u0442\u0438",iban:"IBAN",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${n.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return n.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${Z(n.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${n.origin} \u0431\u0443\u0434\u0435 ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${n.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${n.keys.length>1?"\u0456":""}: ${U(n.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${n.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${n.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function cc(){return{localeError:mx()}}function gb(){return cc()}var fx=()=>{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"},map:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(n){return e[n]??null}let r={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",mac:"\u0627\u06CC\u0645 \u0627\u06D2 \u0633\u06CC \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",credit_card:"\u06A9\u0631\u06CC\u0688\u0679 \u06A9\u0627\u0631\u0688 \u0646\u0645\u0628\u0631",currency_code:"\u06A9\u0631\u0646\u0633\u06CC \u06A9\u0648\u0688",iban:"IBAN",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${n.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return n.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${Z(n.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${U(n.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${n.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${n.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${n.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u06D2 ${o}${n.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${n.origin} \u06A9\u0627 ${o}${n.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${n.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${n.keys.length>1?"\u0632":""}: ${U(n.keys,"\u060C ")}`;case"invalid_key":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${n.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function vb(){return{localeError:fx()}}var hx=()=>{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(n){return e[n]??null}let r={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",credit_card:"kredit karta raqami",currency_code:"valyuta kodi",iban:"IBAN",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${n.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return n.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${Z(n.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${n.origin??"qiymat"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${r[o.format]??n.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${n.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${n.keys.length>1?"lar":""}: ${U(n.keys,", ")}`;case"invalid_key":return`${n.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${n.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function yb(){return{localeError:hx()}}var gx=()=>{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"},map:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(n){return e[n]??null}let r={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",mac:"\u0111\u1ECBa ch\u1EC9 MAC",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",credit_card:"s\u1ED1 th\u1EBB t\xEDn d\u1EE5ng",currency_code:"m\xE3 ti\u1EC1n t\u1EC7",iban:"IBAN",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${n.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return n.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${Z(n.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${n.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${n.origin??"gi\xE1 tr\u1ECB"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${a.verb} ${o}${n.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${r[o.format]??n.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${n.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${U(n.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${n.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function bb(){return{localeError:gx()}}var vx=()=>{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"},map:{unit:"\u9879",verb:"\u5305\u542B"}};function t(n){return e[n]??null}let r={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",mac:"MAC\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",credit_card:"\u4FE1\u7528\u5361\u53F7",currency_code:"\u8D27\u5E01\u4EE3\u7801",iban:"IBAN",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${n.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return n.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${Z(n.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${n.origin??"\u503C"} ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${n.origin} ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${r[o.format]??n.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${n.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${U(n.keys,", ")}`;case"invalid_key":return`${n.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${n.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function _b(){return{localeError:vx()}}var yx=()=>{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"},map:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(n){return e[n]??null}let r={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",mac:"MAC \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",credit_card:"\u4FE1\u7528\u5361\u865F",currency_code:"\u8CA8\u5E63\u4EE3\u78BC",iban:"IBAN",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${n.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return n.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${Z(n.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${n.origin??"\u503C"} \u61C9\u70BA ${o}${n.maximum.toString()}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${n.origin} \u61C9\u70BA ${o}${n.minimum.toString()}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${r[o.format]??n.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${n.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${n.keys.length>1?"\u5011":""}\uFF1A${U(n.keys,"\u3001")}`;case"invalid_key":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${n.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Sb(){return{localeError:yx()}}var bx=()=>{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"},map:{unit:"nkan",verb:"n\xED"}};function t(n){return e[n]??null}let r={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",mac:"\xE0d\xEDr\u1EB9\u0301s\xEC MAC",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",credit_card:"n\u1ECDmba kaadi gbese",currency_code:"koodu ow\xF3",iban:"IBAN",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return n=>{switch(n.code){case"invalid_type":{let o=i[n.expected]??n.expected,a=G(n.input),s=i[a]??a;return/^[A-Z]/.test(n.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${n.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return n.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${Z(n.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${U(n.values,"|")}`;case"too_big":{let o=n.inclusive?"<=":"<",a=t(n.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin??"iye"} ${a.verb} ${o}${n.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.maximum}`}case"too_small":{let o=n.inclusive?">=":">",a=t(n.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${n.origin} ${a.verb} ${o}${n.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${n.minimum}`}case"invalid_format":{let o=n;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${r[o.format]??n.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${n.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${U(n.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${n.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function kb(){return{localeError:bx()}}var wb,bf=Symbol("ZodOutput"),_f=Symbol("ZodInput"),lc=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...r){let i=r[0];return this._map.set(t,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let r=this._map.get(t);return r&&typeof r=="object"&&"id"in r&&this._idmap.delete(r.id),this._map.delete(t),this}get(t){let r=t._zod.parent;if(r){let i={...this.get(r)??{}};delete i.id;let n={...i,...this._map.get(t)};return Object.keys(n).length?n:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function uc(){return new lc}(wb=globalThis).__zod_globalRegistry??(wb.__zod_globalRegistry=uc());var nt=globalThis.__zod_globalRegistry;var dt=Symbol.for("zod.compile.invalid"),$b=Symbol.for("zod.compile.fallback"),Nt=class extends Error{constructor(t="z.compile does not support async refinements, transforms, or checks"){super(t),this.name="ZodCompileAsyncError"}},Te=class extends Error{constructor(t,r=!0){super(`z.compile does not support ${t}; this schema must use the runtime parser`),this.name="ZodCompileUnsupportedError",this.islandable=r}};function Sx(e,t){try{return pc(e,{assertOnly:!0})}catch{return t}}function $f(e,t){try{let r=pc(e),i=dc(e,r);return i._zod.bag.validator=Sx(e,r),i}catch(r){if(t?.strict)throw r;return e}}function dc(e,t){if(oc(e))throw new Te("a schema whose subtree contains a reference cycle");let r=Ne(e),i=e._zod.run,n=i.__originalRun??i,o=(a,s)=>{if(s?.async||s?.direction==="backward"||s?.skipChecks||s?.[$b]||s&&ic(s,a.value))return n(a,s);let c=t(a.value);return c!==dt?(a.value=c,a):(s&&(s[$b]=!0),n(a,s))};return o.__originalRun=n,r._zod.bag.fallbackRun=n,r._zod.bag.validator=t,r._zod.run=o,i.__originalRun||kx(r,e,t),r}function kx(e,t,r){let i=e,n=t;if(typeof n.safeParse=="function"){let o=n.safeParse;i.safeParse=(a,s)=>{let c=r(a);return c!==dt?{success:!0,data:c}:o(a,s)}}if(typeof n.parse=="function"){let o=n.parse;i.parse=(a,s)=>{let c=r(a);return c!==dt?c:o(a,s)}}}function pc(e,t){let r=!0;try{r=oc(e)}catch{}if(r)throw new Te("a schema whose subtree contains a reference cycle");let i={constants:new Map,constantCounter:0,varCounter:0,definite:!0},n=new er(["input"]),o=De(n,i,e,"input",!t?.assertOnly);n.write(o===null?"return true;":`return ${o};`);let a=["INVALID",...i.constants.keys()],s=[dt,...i.constants.values()],c=n.content.join(`
|
|
60
|
+
`),l=t?.debug?a.length>0?`// Constants: ${a.join(", ")}
|
|
61
|
+
${c}`:c:"",u=Function,d=`return (input) => {
|
|
62
|
+
${c}
|
|
63
|
+
}`,f;try{f=new u(...a,d)(...s)}catch(h){throw new Te(`this schema (generated code failed to evaluate: ${h.message})`)}return t?.debug&&(f.code=l),f.definite=i.definite,f}function ge(e,t){for(let[i,n]of e.constants)if(n===t)return i;let r=`c${e.constantCounter++}`;return e.constants.set(r,t),r}function rr(e,t){return e.definite=!1,ge(e,t)}function fe(e){return`v${e.varCounter++}`}function wx(e,t){let r=e._zod.run({value:t,issues:[]},{});if(r&&typeof r.then=="function")return dt;let i=r;return i.issues.length===0?i.value:dt}function it(e,t,r,i,n=!0){let o=e.content.length,a=t.constants.size,s=t.constantCounter,c=t.varCounter;try{return De(e,t,r,i,n)}catch(l){if(!(l instanceof Te)||!l.islandable)throw l;if(e.content.length=o,t.constants.size>a){let u=Array.from(t.constants.keys()).slice(a);for(let d of u)t.constants.delete(d)}return t.constantCounter=s,t.varCounter=c,$x(e,t,r,i)}}function $x(e,t,r,i){t.definite=!1;let n=ge(t,r),o=ge(t,wx),a=fe(t);return e.write(`const ${a} = ${o}(${n}, ${i});`),e.write(`if (${a} === INVALID) return INVALID;`),a}var xx=new Set(["max_size","min_size","size_equals","max_length","min_length","length_equals"]);function Tx(e,t,r,i){let n=r._zod.def.checks;if(!n||n.length===0)return i;let o=i;for(let a of n){let s=a._zod.def;if(s.when&&!xx.has(s.check))throw new Te('check with a custom "when" condition');switch(s.check){case"greater_than":Rx(e,t,s,o);break;case"less_than":Ix(e,t,s,o);break;case"multiple_of":zx(e,t,s,o);break;case"number_format":Eb(e,s,o);break;case"min_length":{let c=vn(s.minimum,"min_length"),l=Sf(e,t,o,`${o}.length >= ${c} && ${o}.length < ${s.minimum*2}`);e.write(`if (${l} < ${c}) return INVALID;`);break}case"max_length":{let c=vn(s.maximum,"max_length"),l=Sf(e,t,o,`${o}.length > ${c}`);e.write(`if (${l} > ${c}) return INVALID;`);break}case"length_equals":{let c=vn(s.length,"length_equals"),l=Sf(e,t,o,`${o}.length >= ${c} && ${o}.length <= ${s.length*2}`);e.write(`if (${l} !== ${c}) return INVALID;`);break}case"min_size":e.write(`if (${o}.size < ${vn(s.minimum,"min_size")}) return INVALID;`);break;case"max_size":e.write(`if (${o}.size > ${vn(s.maximum,"max_size")}) return INVALID;`);break;case"size_equals":e.write(`if (${o}.size !== ${vn(s.size,"size_equals")}) return INVALID;`);break;case"string_format":o=Cb(e,t,s,o);break;case"custom":o=Ux(e,t,a,o);break;case"bigint_format":Ex(e,s,o);break;case"mime_type":Cx(e,t,s,o);break;case"property":Ox(e,t,s,o);break;case"properties":Px(e,t,s,o);break;case"overwrite":{let c=fe(t);Nx(e,t,a,o,c),o=c;break}default:throw new Te(`check type ${s.check}`)}}return o}function Sf(e,t,r,i){let n=ge(t,Xn),o=fe(t);return e.write(`const ${o} = typeof ${r} === "string" && ${i} ? ${n}(${r}) : ${r}.length;`),o}function vn(e,t){if(typeof e!="number"||!Number.isFinite(e))throw new Te(`${t} bound of type ${typeof e}`);return`${e}`}function zb(e,t){if(typeof t=="bigint")return`${t}n`;if(typeof t=="number"){if(Number.isNaN(t))throw new Te("comparison check with NaN bound");return`${t}`}if(t instanceof Date){if(Number.isNaN(t.getTime()))throw new Te("comparison check with Invalid Date bound");return ge(e,t)}throw new Te(`comparison check bound of type ${typeof t}`)}function Rx(e,t,r,i){let n=r.inclusive?"<":"<=";e.write(`if (${i} ${n} ${zb(t,r.value)}) return INVALID;`)}function Ix(e,t,r,i){let n=r.inclusive?">":">=";e.write(`if (${i} ${n} ${zb(t,r.value)}) return INVALID;`)}function zx(e,t,r,i){if(typeof r.value=="bigint"){if(r.value===BigInt(0))throw new Te("multiple_of check with a zero divisor");e.write(`if (${i} % ${r.value}n !== 0n) return INVALID;`)}else{let n=ge(t,gi);e.write(`if (${n}(${i}, ${vn(r.value,"multiple_of")}) !== 0) return INVALID;`)}}function Eb(e,t,r){let i=t.format;switch(i){case"safeint":e.write(`if (!Number.isSafeInteger(${r})) return INVALID;`);break;case"int32":e.write(`if (!Number.isInteger(${r}) || ${r} < -2147483648 || ${r} > 2147483647) return INVALID;`);break;case"uint32":e.write(`if (!Number.isInteger(${r}) || ${r} < 0 || ${r} > 4294967295) return INVALID;`);break;case"float32":e.write(`if (!Number.isFinite(${r}) || ${r} < -3.4028234663852886e38 || ${r} > 3.4028234663852886e38) return INVALID;`);break;case"float64":e.write(`if (!Number.isFinite(${r})) return INVALID;`);break;default:throw new Te(`number format ${i}`)}}function Ex(e,t,r){let i=t.format;if(i)switch(i){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break;default:throw new Te(`bigint format ${i}`)}}function Cx(e,t,r,i){let n=r.mime;if(n&&n.length>0){let o=ge(t,new Set(n));e.write(`if (!${o}.has(${i}.type)) return INVALID;`)}}function Px(e,t,r,i){if(r.when)throw new Te('check with a custom "when" condition');e.write(`if (${i} == null) return INVALID;`);let n=r.shape;for(let o of Reflect.ownKeys(n)){let a=typeof o=="symbol"?ge(t,o):lt(o),s=fe(t);e.write(`const ${s} = ${i}[${a}];`),it(e,t,n[o],s,!1)}}function Ox(e,t,r,i){let n=`${i}[${JSON.stringify(r.property)}]`;De(e,t,r.schema,n)}function Nx(e,t,r,i,n){let o=r._zod.def.tx;if(!o)throw new Te("overwrite check without a transform function");if(or(o))throw new Nt("z.compile: async overwrite transforms are not supported");let a=ge(t,o);e.write(`const ${n} = ${a}(${i});`)}function kf(){throw new vt}function xf(e){this.issues.push(e)}function Ux(e,t,r,i){let n=r._zod.def;if(n.fn){if(or(n.fn))throw new Nt("z.compile: async .refine() predicates are not supported");let o=rr(t,n.fn),a=ge(t,kf),s=fe(t);return e.write(`const ${s} = ${o}(${i});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`),i}if(r._zod.check){if(or(r._zod.check))throw new Nt("z.compile: async .superRefine() / check functions are not supported");let o=r._zod.check,s=rr(t,l=>{let u={value:l,issues:[],addIssue:xf};return o(u)instanceof Promise&&kf(),u.issues.length===0?u.value:dt}),c=fe(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}throw new Te("custom check without a predicate or check function")}var Ax=new Set(["cidrv4","cuid","cuid2","date","datetime","duration","e164","email","emoji","ends_with","guid","includes","ipv4","ksuid","lowercase","mac","nanoid","regex","starts_with","time","ulid","uppercase","uuid","xid"]);function Cb(e,t,r,i,n=!0){let o=r.format;if(o==="base64"){let l=ge(t,ji);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="base64url"){let l=ge(t,Zs);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="jwt"){let l=ge(t,Bs),u=ge(t,r.alg??null);return e.write(`if (!${l}(${i}, ${u})) return INVALID;`),i}if(o==="ipv6"){let l=ge(t,Ai);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="cidrv6"){let l=ge(t,Vs);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="credit_card"){let l=ge(t,Gs);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(o==="iban"){let l=ge(t,Js);return e.write(`if (!${l}(${i})) return INVALID;`),i}let a=r;if(o==="url"||o==="httpurl"||a.normalize||a.hostname!==void 0||a.protocol!==void 0){let l=ge(t,Ls),u=ge(t,r),d=fe(t),f=fe(t);if(e.write(`const ${d} = ${i}.trim();`),e.write(`const ${f} = ${l}(${d}, ${u});`),e.write(`if (typeof ${f} === "number") return INVALID;`),a.hostname!==void 0){let b=ge(t,Ds);e.write(`if (!${b}(${f}, ${u}.hostname)) return INVALID;`)}if(a.protocol!==void 0){let b=ge(t,Fs);e.write(`if (!${b}(${f}, ${u}.protocol)) return INVALID;`)}if(!n)return null;let h=fe(t),g=a.normalize?`${f}.href`:`${ge(t,Ui)}(${d})`;return e.write(`const ${h} = ${g};`),h}let s=r.fn;if(s){if(or(s))throw new Te(`async string format ${o}`);let l=ge(t,s);return e.write(`if (!${l}(${i})) return INVALID;`),i}if(Ax.has(o)&&r.pattern){let l=ge(t,r.pattern);return e.write(`${l}.lastIndex = 0;`),e.write(`if (!${l}.test(${i})) return INVALID;`),i}let c=r.format;switch(c){case"regex":throw new Te("regex format without a pattern");case"lowercase":e.write(`if (${i} !== ${i}.toLowerCase()) return INVALID;`);break;case"uppercase":e.write(`if (${i} !== ${i}.toUpperCase()) return INVALID;`);break;case"includes":e.write(`if (!${i}.includes(${lt(r.includes)})) return INVALID;`);break;case"starts_with":{let l=r.prefix;e.write(`if (${i}.slice(0, ${l.length}) !== ${lt(l)}) return INVALID;`);break}case"ends_with":{let l=r.suffix;e.write(`if (${i}.slice(-${l.length}) !== ${lt(l)}) return INVALID;`);break}default:throw new Te(`string format ${c}`)}return i}function De(e,t,r,i,n=!0){let o=r._zod.def,a=o.type;if(o.coerce)throw new Te(`coercion (z.coerce.${a}())`);let s=n||!!o.checks?.length,c;switch(a){case"string":c=jx(e,t,r,i,s);break;case"number":c=Mx(e,r,i);break;case"boolean":c=qx(e,i);break;case"bigint":c=Lx(e,r,i);break;case"symbol":c=Dx(e,i);break;case"undefined":c=Fx(e,i);break;case"null":c=Vx(e,i);break;case"any":case"unknown":c=i;break;case"never":e.write("return INVALID;"),c=i;break;case"void":c=Hx(e,i);break;case"nan":c=Zx(e,i);break;case"date":c=Gx(e,i);break;case"object":c=Jx(e,t,r,i,s);break;case"optional":c=Bx(e,t,r,i,s);break;case"nullable":c=Qx(e,t,r,i,s);break;case"array":c=Xx(e,t,r,i,s);break;case"literal":c=Yx(e,t,r,i);break;case"enum":c=eT(e,t,r,i);break;case"readonly":{let l=Tb(e,t,r,i),u=fe(t);e.write(`const ${u} = Object.freeze(${l});`),c=u;break}case"success":Tb(e,t,r,i),c="true";break;case"default":case"prefault":c=tT(e,t,r,i);break;case"nonoptional":c=nT(e,t,r,i);break;case"tuple":c=rT(e,t,r,i);break;case"union":c=oT(e,t,r,i);break;case"intersection":c=sT(e,t,r,i);break;case"record":c=cT(e,t,r,i);break;case"map":c=uT(e,t,r,i);break;case"set":c=dT(e,t,r,i);break;case"file":c=pT(e,i);break;case"template_literal":c=mT(e,t,r,i);break;case"lazy":c=fT(e,t,r,i);break;case"pipe":c=hT(e,t,r,i);break;case"custom":c=gT(e,t,r,i);break;case"transform":c=bT(e,t,r,i);break;case"catch":c=yT(e,t,r,i);break;default:throw new Te(`schema type ${a}`)}return c===null?null:Tx(e,t,r,c)}function jx(e,t,r,i,n=!0){e.write(`if (typeof ${i} !== "string") return INVALID;`);let o=r._zod.def;return o.format===void 0?i:Cb(e,t,o,i,n)}function Mx(e,t,r){e.write(`if (typeof ${r} !== "number" || !Number.isFinite(${r})) return INVALID;`);let i=t._zod.def;return i.check==="number_format"&&i.format&&Eb(e,{format:i.format},r),r}function qx(e,t){return e.write(`if (typeof ${t} !== "boolean") return INVALID;`),t}function Lx(e,t,r){e.write(`if (typeof ${r} !== "bigint") return INVALID;`);let i=t._zod.def;if(i.format)switch(i.format){case"int64":e.write(`if (${r} < -9223372036854775808n || ${r} > 9223372036854775807n) return INVALID;`);break;case"uint64":e.write(`if (${r} < 0n || ${r} > 18446744073709551615n) return INVALID;`);break}return r}function Dx(e,t){return e.write(`if (typeof ${t} !== "symbol") return INVALID;`),t}function Fx(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function Vx(e,t){return e.write(`if (${t} !== null) return INVALID;`),t}function Hx(e,t){return e.write(`if (${t} !== undefined) return INVALID;`),t}function Zx(e,t){return e.write(`if (typeof ${t} !== "number" || !Number.isNaN(${t})) return INVALID;`),t}function Gx(e,t){return e.write(`if (!(${t} instanceof Date) || Number.isNaN(${t}.getTime())) return INVALID;`),t}function Jx(e,t,r,i,n=!0){let o=r._zod.def;e.write(`if (typeof ${i} !== "object" || ${i} === null || Array.isArray(${i})) return INVALID;`);let a=o.shape,s=Object.keys(a),c=Object.getOwnPropertySymbols(a),l=c.length?[...s,...c]:s,u=x=>typeof x=="symbol"?ge(t,x):lt(x),d=x=>typeof x=="symbol"?`[${u(x)}]`:lt(x),f=a;if(s.includes("__proto__"))throw new Te('object shape key "__proto__"');let h=new Map;for(let x of l){let k=f[x],I=u(x),O=fe(t);if(e.write(`const ${O} = ${i}[${I}];`),k._zod.optin!==void 0){let T=fe(t);e.write(`let ${T} = (() => {`),e.indented(_=>{let R=it(_,t,k,O);_.write(`return ${R};`)}),e.write("})();"),k._zod.optout==="optional"?(e.write(`if (${T} === INVALID) {`),e.indented(_=>{_.write(`if (${I} in ${i}) return INVALID;`),_.write(`${T} = undefined;`)}),e.write("}")):e.write(`if (${T} === INVALID) return INVALID;`),h.set(x,T)}else{Wx(k)&&e.write(`if (!(${I} in ${i})) return INVALID;`);let T=it(e,t,k,O,n);T!==null&&h.set(x,T)}}let g=o.catchall,b="none";if(g){let x=g._zod.def.type;if(x==="never"){let k=s.map(I=>`k !== ${lt(I)}`).join(" && ")||"true";e.write(`for (const k in ${i}) {`),e.indented(I=>{I.write(`if (${k}) return INVALID;`)}),e.write("}")}else(x==="unknown"||x==="any")&&!g._zod.def.checks?.length?b="passthrough":b="schema"}let S=fe(t),y=l.some(x=>xb(f[x])||wf(f[x]));if(!n){if(b==="schema"){let x=s.length>0?ge(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(k=>{k.write('if (k === "__proto__") continue;'),x&&k.write(`if (${x}.has(k)) continue;`);let I=fe(t);k.write(`const ${I} = ${i}[k];`),it(k,t,g,I,!1)}),e.write("}")}return null}if(y){e.write(`const ${S} = {};`);for(let x of l){let k=u(x),I=h.get(x);wf(f[x])?e.write(`if (${k} in ${i}) ${S}[${k}] = ${I};`):xb(f[x])?e.write(`if (${I} !== undefined || ${k} in ${i}) ${S}[${k}] = ${I};`):e.write(`${S}[${k}] = ${I};`)}}else{let x=l.map(k=>`${d(k)}: ${h.get(k)}`).join(", ");e.write(`const ${S} = { ${x} };`)}if(b!=="none"){let x=s.length>0?ge(t,new Set(s)):null;e.write(`for (const k in ${i}) {`),e.indented(k=>{if(k.write('if (k === "__proto__") continue;'),x&&k.write(`if (${x}.has(k)) continue;`),b==="passthrough")k.write(`${S}[k] = ${i}[k];`);else{let I=fe(t);k.write(`const ${I} = ${i}[k];`);let O=it(k,t,g,I);k.write(`${S}[k] = ${O};`)}}),e.write("}")}return S}function Bx(e,t,r,i,n=!0){let o=r._zod.def;if(Kx(r))return De(e,t,o.innerType,i,n);if(o.innerType._zod.optin==="defaulted"){let s=fe(t),c=fe(t);return e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(l=>{l.write(`const ${c} = (() => {`),l.indented(u=>{let d=De(u,t,o.innerType,i);u.write(`return ${d};`)}),l.write("})();"),l.write(`if (${c} !== INVALID) ${s} = ${c};`)}),e.write("} else {"),e.indented(l=>{let u=De(l,t,o.innerType,i);l.write(`${s} = ${u};`)}),e.write("}"),s}let a=n?fe(t):null;return a&&e.write(`let ${a};`),e.write(`if (${i} !== undefined) {`),e.indented(s=>{let c=De(s,t,o.innerType,i,n);a&&c!==null&&s.write(`${a} = ${c};`)}),e.write("}"),a}function Kx(e){return e._zod.traits?.has("$ZodExactOptional")===!0}function Wx(e){return e._zod.optin===void 0&&nr(e)}function nr(e){if(e._zod.def.coerce)return!0;let t=e._zod.def;switch(t.type){case"any":case"unknown":case"undefined":case"void":case"default":case"prefault":case"transform":case"custom":case"lazy":return!0;case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"never":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":return!1;case"nonoptional":return t.innerType?nr(t.innerType):!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":case"nullable":case"readonly":case"success":return t.innerType?nr(t.innerType):!0;case"catch":return!0;case"union":return t.options?t.options.some(nr):!0;case"intersection":return!t.left||!t.right?!0:nr(t.left)&&nr(t.right);case"pipe":return t.in?nr(t.in):!0;default:return!0}}function wf(e){return e._zod.optin==="optional"&&e._zod.optout==="optional"}function xb(e){return(e._zod.optin!=="defaulted"||e._zod.optout==="optional")&&Kr(e)}function Kr(e){let t=e._zod.def;switch(t.type){case"string":case"number":case"boolean":case"bigint":case"symbol":case"null":case"nan":case"date":case"object":case"array":case"tuple":case"record":case"map":case"set":case"file":case"template_literal":case"never":case"success":return!1;case"literal":return!!t.values?.includes(void 0);case"enum":return!!e._zod.values?.has(void 0);case"optional":return!0;case"nullable":case"readonly":case"nonoptional":return t.innerType?Kr(t.innerType):!0;case"union":return t.options?t.options.some(Kr):!0;case"intersection":return!t.left||!t.right||Kr(t.left)||Kr(t.right);case"pipe":return t.out?Kr(t.out):!0;default:return!0}}function Qx(e,t,r,i,n=!0){let o=r._zod.def,a=n?fe(t):null;return a&&e.write(`let ${a} = null;`),e.write(`if (${i} !== null) {`),e.indented(s=>{let c=De(s,t,o.innerType,i,n);a&&c!==null&&s.write(`${a} = ${c};`)}),e.write("}"),a}function Tf(e,t,r){for(let[i,n]of qr(t._zod.def.checks))e.write(`if (${r} > ${vn(i,n._zod.def.check)}) return INVALID;`)}function Xx(e,t,r,i,n=!0){let o=r._zod.def;e.write(`if (!Array.isArray(${i})) return INVALID;`),Tf(e,r,`${i}.length`);let a=n?fe(t):null,s=fe(t),c=fe(t);return a&&e.write(`const ${a} = new Array(${i}.length);`),e.write(`for (let ${s} = 0; ${s} < ${i}.length; ${s}++) {`),e.indented(l=>{l.write(`const ${c} = ${i}[${s}];`);let u=it(l,t,o.element,c,n);a&&u!==null&&l.write(`${a}[${s}] = ${u};`)}),e.write("}"),a}function Yx(e,t,r,i){let o=r._zod.def.values;if(o.length!==1){let s=ge(t,new Set(o));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}let a=o[0];if(typeof a=="number"&&Number.isNaN(a)){let s=ge(t,new Set(o));return e.write(`if (!${s}.has(${i})) return INVALID;`),i}if(typeof a=="string")e.write(`if (${i} !== ${lt(a)}) return INVALID;`);else if(typeof a=="number"||typeof a=="boolean")e.write(`if (${i} !== ${a}) return INVALID;`);else if(a===null)e.write(`if (${i} !== null) return INVALID;`);else if(a===void 0)e.write(`if (${i} !== undefined) return INVALID;`);else if(typeof a=="bigint")e.write(`if (${i} !== ${a}n) return INVALID;`);else throw new Te(`literal type ${typeof a}`);return i}function eT(e,t,r,i){let n=r._zod.values;if(!n)throw new Te("enum schema without enumerated values");let o=ge(t,n);return e.write(`if (!${o}.has(${i})) return INVALID;`),i}function Tb(e,t,r,i){let n=r._zod.def;return De(e,t,n.innerType,i)}function tT(e,t,r,i){let n=r._zod.def,a=Object.getOwnPropertyDescriptor(r._zod.def,"defaultValue")?()=>r._zod.def.defaultValue:void 0;if(r._zod.def.type==="prefault"){if(!a)return De(e,t,n.innerType,i);let c=ge(t,a),l=fe(t);return e.write(`let ${l} = ${i};`),e.write(`if (${i} === undefined) ${l} = ${c}();`),De(e,t,n.innerType,l)}let s=fe(t);if(a){let c=ge(t,a),l=ge(t,vi);e.write(`let ${s};`),e.write(`if (${i} === undefined) {`),e.indented(u=>{u.write(`${s} = ${l}(${c}());`)}),e.write("} else {"),e.indented(u=>{let d=De(u,t,n.innerType,i);u.write(`${s} = ${d} === undefined ? ${l}(${c}()) : ${d};`)}),e.write("}")}else e.write(`let ${s};`),e.write(`if (${i} !== undefined) {`),e.indented(c=>{let l=De(c,t,n.innerType,i);c.write(`${s} = ${l};`)}),e.write("}");return s}function nT(e,t,r,i){let n=r._zod.def,o=De(e,t,n.innerType,i),a=fe(t);return e.write(`const ${a} = ${o};`),e.write(`if (${a} === undefined) return INVALID;`),a}function rT(e,t,r,i){let n=r._zod.def,o=n.items,a=n.rest;e.write(`if (!Array.isArray(${i})) return INVALID;`);let s=Rb(o,"optin"),c=Rb(o,"optout");a?e.write(`if (${i}.length < ${s}) return INVALID;`):e.write(`if (${i}.length < ${s} || ${i}.length > ${o.length}) return INVALID;`);let l=fe(t);e.write(`const ${l} = [];`);for(let u=0;u<o.length;u++){let d=o[u];if(u>=c)e.write(`if (${l}.length === ${u}) {`),e.indented(f=>{f.write(`if (${u} < ${i}.length) {`),f.indented(h=>{let g=fe(t);h.write(`const ${g} = ${i}[${u}];`);let b=it(h,t,d,g);h.write(`${l}[${u}] = ${b};`)}),f.write("} else {"),f.indented(h=>{if(wf(d)){h.write(`${l}.length = ${u};`);return}let g=fe(t),b=fe(t);h.write(`const ${g} = undefined;`),h.write(`const ${b} = (() => {`),h.indented(S=>{let y=it(S,t,d,g);S.write(`return ${y};`)}),h.write("})();"),h.write(`if (${b} === INVALID || ${b} === undefined) ${l}.length = ${u};`),h.write(`else ${l}[${u}] = ${b};`)}),f.write("}")}),e.write("}");else{let f=fe(t);e.write(`const ${f} = ${i}[${u}];`);let h=it(e,t,d,f);e.write(`${l}[${u}] = ${h};`)}}if(a){let u=fe(t),d=fe(t);e.write(`for (let ${u} = ${o.length}; ${u} < ${i}.length; ${u}++) {`),e.indented(f=>{f.write(`const ${d} = ${i}[${u}];`);let h=it(f,t,a,d);f.write(`${l}[${u}] = ${h};`)}),e.write("}")}return l}function Rb(e,t){for(let r=e.length-1;r>=0;r--)if(!(t==="optin"?e[r]._zod.optin!==void 0:e[r]._zod.optout==="optional"))return r+1;return 0}function oT(e,t,r,i){let n=r._zod.def,o=n.options;if(n.discriminator)return iT(e,t,n,i);if(n.inclusive===!1)throw new Te("exclusive unions (z.xor)");if(o.length===0)return e.write("return INVALID;"),i;if(o.length===1)return De(e,t,o[0],i);if(o.every(c=>c._zod.def.type==="literal"&&!c._zod.def.checks?.length)){let c=new Set(o.flatMap(u=>u._zod.def.values)),l=ge(t,c);return e.write(`if (!${l}.has(${i})) return INVALID;`),i}let s=fe(t);e.write(`let ${s};`);for(let c=0;c<o.length;c++){let l=o[c];c===0?e.write(`${s} = (() => {`):e.write(`if (${s} === INVALID) ${s} = (() => {`),e.indented(u=>{let d=De(u,t,l,i);u.write(`return ${d};`)}),e.write("})();")}return e.write(`if (${s} === INVALID) return INVALID;`),s}function iT(e,t,r,i){if(r.unionFallback)throw new Te("discriminated union with unionFallback");if(r.options.length===0)return e.write("return INVALID;"),i;let n=fe(t),o=fe(t);e.write(`const ${n} = ${i}?.[${lt(r.discriminator)}];`),e.write(`let ${o};`);let a=!0,s=new Set;for(let c of r.options){let l=c._zod.propValues?.[r.discriminator];if(!l||l.size===0)throw new Te("discriminated union option without static discriminator values");for(let f of l){if(s.has(f))throw new Te(`duplicate discriminator value ${String(f)}`);s.add(f)}let u=Array.from(l,f=>aT(t,n,f)),d=a?"if":"else if";e.write(`${d} (${u.join(" || ")}) {`),e.indented(f=>{let h=De(f,t,c,i);f.write(`${o} = ${h};`)}),e.write("}"),a=!1}return e.write("else { return INVALID; }"),o}function aT(e,t,r){if(typeof r=="string")return`${t} === ${lt(r)}`;if(typeof r=="number")return Number.isNaN(r)?`Number.isNaN(${t})`:`${t} === ${r}`;if(typeof r=="boolean")return`${t} === ${r}`;if(r===null)return`${t} === null`;if(r===void 0)return`${t} === undefined`;if(typeof r=="bigint")return`${t} === ${r}n`;if(typeof r=="symbol"){let i=ge(e,r);return`${t} === ${i}`}throw new Te(`literal discriminator value ${String(r)}`)}function sT(e,t,r,i){let n=r._zod.def;t.definite=!1;let o=it(e,t,n.left,i),a=it(e,t,n.right,i),s=ge(t,Gr),c=fe(t);return e.write(`const ${c} = ${s}(${o}, ${a});`),e.write(`if (!${c}.valid) return INVALID;`),`${c}.data`}function cT(e,t,r,i){let n=r._zod.def,o=ge(t,Rt);e.write(`if (!${o}(${i})) return INVALID;`);let a=fe(t),s=fe(t),c=fe(t);e.write(`const ${a} = {};`);let l=n,u=l.partial?void 0:n.keyType._zod.values;if(u){let h=[];for(let b of u){if(!(typeof b=="string"||typeof b=="number"||typeof b=="symbol"))throw new Te(`record key value ${String(b)}`);let S=typeof b=="number"?b.toString():b;if(S==="__proto__")throw new Te('record key "__proto__"');h.push(S);let y=ge(t,b),x=De(e,t,n.keyType,y),k=fe(t);e.write(`const ${k} = ${i}[${lT(t,S)}];`);let I=it(e,t,n.valueType,k);e.write(`${a}[${x}] = ${I};`)}let g=ge(t,new Set(h));return e.write(`for (const ${s} in ${i}) {`),e.indented(b=>{b.write(`if (${g}.has(${s})) continue;`),l.mode==="loose"?b.write(`if (${s} !== "__proto__") ${a}[${s}] = ${i}[${s}];`):b.write("return INVALID;")}),e.write("}"),a}let d=n.keyType._zod.def;if(!(d.type==="string"&&d.format===void 0&&!d.coerce&&(d.checks?.length??0)===0)){let h=n.mode==="loose",g=pc(n.keyType);g.definite===!1&&(t.definite=!1);let b=ge(t,g),S=ge(t,Xt),y=fe(t);return Ib(e,t,i,s,x=>{x.write(`let ${y} = ${b}(${s});`),x.write(`if (${y} === INVALID && typeof ${s} === "string" && ${S}.test(${s})) ${y} = ${b}(Number(${s}));`),h?x.write(`if (${y} === INVALID) { ${a}[${s}] = ${i}[${s}]; continue; }`):x.write(`if (${y} === INVALID) return INVALID;`),x.write(`if (${y} === "__proto__") continue;`);let k=fe(t);x.write(`const ${k} = ${i}[${s}];`);let I=it(x,t,n.valueType,k);x.write(`${a}[${y}] = ${I};`)}),a}return Ib(e,t,i,s,h=>{h.write(`const ${c} = ${i}[${s}];`);let g=it(h,t,n.valueType,c);h.write(`${a}[${s}] = ${g};`)},"return INVALID;"),a}function Ib(e,t,r,i,n,o){let a=ge(t,Object.prototype.propertyIsEnumerable),s=fe(t),c=fe(t),l=fe(t);e.write(`const ${s} = Object.getOwnPropertySymbols(${r});`),e.write(`const ${c} = Object.getOwnPropertyNames(${r});`),e.write(`for (let ${l} = 0; ${l} < ${c}.length; ${l}++) {`),e.indented(u=>{u.write(`const ${i} = ${c}[${l}];`),u.write(`if (${i} === "__proto__" || !${a}.call(${r}, ${i})) continue;`),n(u)}),e.write("}"),e.write(`for (let ${l} = 0; ${l} < ${s}.length; ${l}++) {`),e.indented(u=>{u.write(`const ${i} = ${s}[${l}];`),u.write(`if (!${a}.call(${r}, ${i})) continue;`),o?u.write(o):n(u)}),e.write("}")}function lT(e,t){return typeof t=="string"?lt(t):ge(e,t)}function uT(e,t,r,i){let n=r._zod.def;e.write(`if (!(${i} instanceof Map)) return INVALID;`),Tf(e,r,`${i}.size`);let o=fe(t),a=fe(t),s=fe(t);return e.write(`const ${o} = new Map();`),e.write(`for (const [${a}, ${s}] of ${i}) {`),e.indented(c=>{let l=De(c,t,n.keyType,a),u=De(c,t,n.valueType,s);c.write(`${o}.set(${l}, ${u});`)}),e.write("}"),o}function dT(e,t,r,i){let n=r._zod.def;e.write(`if (!(${i} instanceof Set)) return INVALID;`),Tf(e,r,`${i}.size`);let o=fe(t),a=fe(t);return e.write(`const ${o} = new Set();`),e.write(`for (const ${a} of ${i}) {`),e.indented(s=>{let c=De(s,t,n.valueType,a);s.write(`${o}.add(${c});`)}),e.write("}"),o}function pT(e,t){return e.write(`if (!(${t} instanceof File)) return INVALID;`),t}function mT(e,t,r,i){e.write(`if (typeof ${i} !== "string") return INVALID;`);let n=r._zod.pattern;if(n){let o=ge(t,n);e.write(`${o}.lastIndex = 0;`),e.write(`if (!${o}.test(${i})) return INVALID;`)}return i}function fT(e,t,r,i){let n=r._zod.def,o=rr(t,n.getter),a=ge(t,{parser:null});e.write(`if (!${a}.parser) {`),e.indented(c=>{c.write(`const inner = ${o}();`),c.write(`${a}.parser = function(input) {`),c.indented(l=>{l.write("const result = inner._zod.run({ value: input, issues: [] }, {});"),l.write("return result.issues.length === 0 ? result.value : INVALID;")}),c.write("};")}),e.write("}");let s=fe(t);return e.write(`const ${s} = ${a}.parser(${i});`),e.write(`if (${s} === INVALID) return INVALID;`),s}function hT(e,t,r,i){let n=r._zod.def,o=De(e,t,n.in,i);if(n.transform){if(or(n.transform))throw new Nt("z.compile: async transforms in pipes are not supported");let a=n.transform,c=rr(t,u=>{let d={value:u,issues:[],addIssue:xf},f=a(u,d);return f instanceof Promise?dt:d.issues.length===0?f:dt}),l=fe(t);return e.write(`const ${l} = ${c}(${o});`),e.write(`if (${l} === INVALID) return INVALID;`),De(e,t,n.out,l)}else return De(e,t,n.out,o)}function or(e){return typeof e=="function"&&(e.constructor.name==="AsyncFunction"||e[Symbol.toStringTag]==="AsyncFunction")}function gT(e,t,r,i){let n=r._zod.def;if(n.fn){if(or(n.fn))throw new Nt("z.compile: async custom predicates are not supported");let o=rr(t,n.fn),a=ge(t,kf),s=fe(t);e.write(`const ${s} = ${o}(${i});`),e.write(`if (${s} instanceof Promise) ${a}();`),e.write(`if (!${s}) return INVALID;`)}else throw new Te("custom schema without a predicate function");return i}function vT(e,t,r){let i=e._zod.run({value:r,issues:[]},{});if(i&&typeof i.then=="function")return dt;let n=i;return n.issues.length===0?n.value:t()}function yT(e,t,r,i){let n=r._zod.def;if(!n.catchValue[vs])throw new Te("catch with a callback (only a constant catch value compiles)",!1);let o=fe(t);e.write(`let ${o} = (() => {`),e.indented(l=>{let u=it(l,t,n.innerType,i);l.write(`return ${u};`)}),e.write("})();");let a=ge(t,n.innerType),s=rr(t,n.catchValue),c=ge(t,vT);return e.write(`if (${o} === INVALID) {`),e.indented(l=>{l.write(`${o} = ${c}(${a}, ${s}, ${i});`),l.write(`if (${o} === INVALID) return INVALID;`)}),e.write("}"),o}function bT(e,t,r,i){let n=r._zod.def;if(n.transform){if(or(n.transform))throw new Nt("z.compile: async transforms are not supported");let o=n.transform,s=rr(t,l=>{let u={value:l,issues:[],addIssue:xf},d=o(l,u);return d instanceof Promise?dt:u.issues.length===0?d:dt}),c=fe(t);return e.write(`const ${c} = ${s}(${i});`),e.write(`if (${c} === INVALID) return INVALID;`),c}return i}function mc(e){return e.checks&&(e.checks=[...e.checks]),e}function Rf(e,t){return new e(mc({type:"string",...Q(t)}))}function If(e,t){return new e(mc({type:"string",coerce:!0,...Q(t)}))}function fc(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Q(t)})}function hc(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Q(t)})}function gc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Q(t)})}function vc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Q(t)})}function yc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Q(t)})}function bc(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Q(t)})}function Bi(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Q(t)})}function _c(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Q(t)})}function Sc(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Q(t)})}function kc(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Q(t)})}function wc(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Q(t)})}function $c(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Q(t)})}function xc(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Q(t)})}function Tc(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Q(t)})}function Rc(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Q(t)})}function Ic(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Q(t)})}function zf(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...Q(t)})}function zc(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Q(t)})}function Ec(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Q(t)})}function Cc(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Q(t)})}function Pc(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Q(t)})}function Oc(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Q(t)})}function Ef(e,t){return new e({type:"string",format:"credit_card",check:"string_format",abort:!1,...Q(t)})}function Cf(e,t){return new e({type:"string",format:"iban",check:"string_format",abort:!1,...Q(t)})}function Nc(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Q(t)})}var Pf={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Ki(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Q(t)})}function Wi(e,t){return new e({type:"string",format:"date",check:"string_format",...Q(t)})}function Qi(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Q(t)})}function Xi(e,t){return new e({type:"string",format:"duration",check:"string_format",...Q(t)})}function Of(e,t){return new e(mc({type:"number",checks:[],...Q(t)}))}function Nf(e,t){return new e(mc({type:"number",coerce:!0,checks:[],...Q(t)}))}function Uf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Q(t)})}function Af(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Q(t)})}function jf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Q(t)})}function Mf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Q(t)})}function qf(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Q(t)})}function Lf(e,t){return new e({type:"boolean",...Q(t)})}function Df(e,t){return new e({type:"boolean",coerce:!0,...Q(t)})}function Ff(e,t){return new e({type:"bigint",...Q(t)})}function Vf(e,t){return new e({type:"bigint",coerce:!0,...Q(t)})}function Hf(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Q(t)})}function Zf(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Q(t)})}function Gf(e,t){return new e({type:"symbol",...Q(t)})}function Jf(e,t){return new e({type:"undefined",...Q(t)})}function Bf(e,t){return new e({type:"null",...Q(t)})}function Kf(e){return new e({type:"any"})}function Wf(e){return new e({type:"unknown"})}function Qf(e,t){return new e({type:"never",...Q(t)})}function Xf(e,t){return new e({type:"void",...Q(t)})}function Yf(e,t){return new e({type:"date",...Q(t)})}function eh(e,t){return new e({type:"date",coerce:!0,...Q(t)})}function th(e,t){return new e({type:"nan",...Q(t)})}function Lt(e,t){return new Os({check:"less_than",...Q(t),value:e,inclusive:!1})}function wt(e,t){return new Os({check:"less_than",...Q(t),value:e,inclusive:!0})}function Dt(e,t){return new Ns({check:"greater_than",...Q(t),value:e,inclusive:!1})}function $t(e,t){return new Ns({check:"greater_than",...Q(t),value:e,inclusive:!0})}function Uc(e){return Dt(0,e)}function Ac(e){return Lt(0,e)}function jc(e){return wt(0,e)}function Mc(e){return $t(0,e)}function yn(e,t){return new Ap({check:"multiple_of",...Q(t),value:e})}function bn(e,t){return new qp({check:"max_size",...Q(t),maximum:e})}function Ft(e,t){return new Lp({check:"min_size",...Q(t),minimum:e})}function ir(e,t){return new Dp({check:"size_equals",...Q(t),size:e})}function ar(e,t){return new Fp({check:"max_length",...Q(t),maximum:e})}function Yt(e,t){return new Vp({check:"min_length",...Q(t),minimum:e})}function sr(e,t){return new Hp({check:"length_equals",...Q(t),length:e})}function Wr(e,t){return new Zp({check:"string_format",format:"regex",...Q(t),pattern:e})}function Qr(e){return new Gp({check:"string_format",format:"lowercase",...Q(e)})}function Xr(e){return new Jp({check:"string_format",format:"uppercase",...Q(e)})}function Yr(e,t){return new Bp({check:"string_format",format:"includes",...Q(t),includes:e})}function eo(e,t){return new Kp({check:"string_format",format:"starts_with",...Q(t),prefix:e})}function to(e,t){return new Wp({check:"string_format",format:"ends_with",...Q(t),suffix:e})}function qc(e,t,r){return new Qp({check:"property",property:e,schema:t,...Q(r)})}function no(e,t){return new Xp({check:"properties",shape:e,...Q(t)})}function ro(e,t){return new Yp({check:"mime_type",mime:e,...Q(t)})}function Ut(e){return new em({check:"overwrite",tx:e})}function oo(e){return Ut(t=>t.normalize(e))}function io(){return Ut(e=>e.trim())}function ao(){return Ut(e=>e.toLowerCase())}function so(){return Ut(e=>e.toUpperCase())}function co(){return Ut(e=>qd(e))}function nh(e,t,r){return new e({type:"array",element:t,...Q(r)})}function _T(e,t,r){return new e({type:"union",options:t,...Q(r)})}function ST(e,t,r){return new e({type:"union",options:t,inclusive:!1,...Q(r)})}function kT(e,t,r,i){return new e({type:"union",options:r,discriminator:t,...Q(i)})}function wT(e,t,r){return new e({type:"intersection",left:t,right:r})}function $T(e,t,r,i){let n=r instanceof be,o=n?i:r,a=n?r:null;return new e({type:"tuple",items:t,rest:a,...Q(o)})}function xT(e,t,r,i){return new e({type:"record",keyType:t,valueType:r,...Q(i)})}function TT(e,t,r,i){return new e({type:"map",keyType:t,valueType:r,...Q(i)})}function RT(e,t,r){return new e({type:"set",valueType:t,...Q(r)})}function IT(e,t,r){let i=Array.isArray(t)?Object.fromEntries(t.map(n=>[n,n])):t;return new e({type:"enum",entries:i,...Q(r)})}function zT(e,t,r){return new e({type:"enum",entries:t,...Q(r)})}function ET(e,t,r){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Q(r)})}function rh(e,t){return new e({type:"file",...Q(t)})}function CT(e,t){return new e({type:"transform",transform:t})}function PT(e,t){return new e({type:"optional",innerType:t})}function OT(e,t){return new e({type:"nullable",innerType:t})}function NT(e,t,r){return new e({type:"default",innerType:t,get defaultValue(){return typeof r=="function"?r():vi(r)}})}function UT(e,t,r){return new e({type:"nonoptional",innerType:t,...Q(r)})}function AT(e,t){return new e({type:"success",innerType:t})}function jT(e,t,r){return new e({type:"catch",innerType:t,catchValue:typeof r=="function"?r:Zd(r)})}function MT(e,t,r){return new e({type:"pipe",in:t,out:r})}function qT(e,t){return new e({type:"readonly",innerType:t})}function LT(e,t,r){return new e({type:"template_literal",parts:t,...Q(r)})}function DT(e,t){return new e({type:"lazy",getter:t})}function FT(e,t){return new e({type:"promise",innerType:t})}function oh(e,t,r){let i=Q(r);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:t,...i})}function ih(e,t,r){return new e({type:"custom",check:"custom",fn:t,...Q(r)})}function ah(e,t){let r=Pb(i=>(i.addIssue=n=>{if(typeof n=="string")i.issues.push(Lr(n,i.value,r._zod.def));else{let o=n;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),"input"in o||(o.input=i.value),o.inst??(o.inst=r),o.continue??(o.continue=!r._zod.def.abort),i.issues.push(Lr(o))}},e(i.value,i)),t);return r}function Pb(e,t){let r=new Me({check:"custom",...Q(t)});return r._zod.check=e,r}function sh(e){let t=new Me({check:"describe"});return t._zod.onattach=[r=>{let i=nt.get(r)??{};nt.add(r,{...i,description:e})}],t._zod.check=()=>{},t}function ch(e){let t=new Me({check:"meta"});return t._zod.onattach=[r=>{let i=nt.get(r)??{};nt.add(r,{...i,...e})}],t._zod.check=()=>{},t}function lh(e,t){let r=Q(t),i=r.truthy??["true","1","yes","on","y","enabled"],n=r.falsy??["false","0","no","off","n","disabled"];r.case!=="sensitive"&&(i=i.map(h=>typeof h=="string"?h.toLowerCase():h),n=n.map(h=>typeof h=="string"?h.toLowerCase():h));let o=new Set(i),a=new Set(n),s=e.Codec??Di,c=e.Boolean??qi,l=e.String??tr,u=new l({type:"string",error:r.error}),d=new c({type:"boolean",error:r.error}),f=new s({type:"pipe",in:u,out:d,transform:((h,g)=>{let b=h;return r.case!=="sensitive"&&(b=b.toLowerCase()),o.has(b)?!0:a.has(b)?!1:(g.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:g.value,inst:f,continue:!1}),{})}),reverseTransform:((h,g)=>h===!0?i[0]||"true":n[0]||"false"),error:r.error});return f._zod.bag.truthy=i,f._zod.bag.falsy=n,f._zod.bag.case=r.case??"insensitive",f}function cr(e,t,r,i={}){let n=Q(i),o={check:"string_format",type:"string",format:t,fn:typeof r=="function"?r:s=>r.test(s),...n};return r instanceof RegExp&&(o.pattern=r),new e(o)}function Yi(e,...t){for(let r of t)for(let i of Reflect.ownKeys(r))Object.prototype.propertyIsEnumerable.call(r,i)&&tt(e,i,r[i]);return e}function _n(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??nt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??"ref",reused:e?.reused??"inline",intersections:[],deferred:[],external:e?.external??void 0}}function Ke(e,t,r,i,n){let o=typeof t.unrepresentable=="function"?t.unrepresentable({zodSchema:e,path:i.path,message:n}):t.unrepresentable;if(o==="any")return!1;if(o===void 0||o==="throw")throw new Error(n);return Object.assign(r,o),!0}function Ae(e,t,r={path:[],schemaPath:[]}){var i;let n=e._zod.def,o=t.seen.get(e);if(o)return o.count++,r.schemaPath.includes(e)&&(o.cycle=r.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:r.path};t.seen.set(e,a),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let u={...r,schemaPath:[...r.schemaPath,e],path:r.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,u);else{let f=a.schema,h=t.processors[n.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${n.type}`);h(e,t,f,u)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),Ae(d,t,u),t.seen.get(d).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Yi(a.schema,c),t.io==="input"&&pt(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Ob(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}function Sn(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");if(e.external&&e.sharedDefsExtractedFor===e.external)return;let i=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=i.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,a[0])}}let n=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,f=e.external.uri??(g=>g);if(d)return{ref:f(d)};let h=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=h,{defId:h,ref:`${f("__shared")}#/${s}/${Ob(h)}`}}let c="#",l=`${c}/${s}/`;if(a[1]===r&&!a[1].schema.id)return{ref:c};let u=a[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:l+Ob(u)}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:l}=n(a);s.def={...s.schema},l&&(s.defId=l);let u=s.schema;for(let d in u)delete u[d];u.$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
|
+
|
|
65
|
+
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]){o(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(t!==a[0]&&l){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}s.count>1&&e.reused==="ref"&&o(a)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Ab(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let r=[];for(let i of t){if(!i||typeof i!="object")return;Ab(i);let n=Object.keys(i);if(n.length!==1||n[0]!=="type")return;let o=i.type;for(let a of Array.isArray(o)?o:[o]){if(typeof a!="string")return;r.includes(a)||r.push(a)}}delete e.anyOf,e.type=r.length===1?r[0]:r}var jb=new Set(["type","properties","required","additionalProperties"]),Nb=["oneOf","anyOf"];function Ub(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!="object"||t===null?null:Object.keys(t).length?t:null}function uh(e){let t=[];for(let o of e){if(typeof o!="object"||o.type!=="object")return null;for(let a in o)if(!jb.has(a))return null;t.push(o)}let r={},i=new Set;for(let o of t){for(let a in o.properties){if(Object.prototype.hasOwnProperty.call(r,a))continue;let s=[];for(let l of t){let u=l.properties?.[a]??Ub(l);u!=null&&(s.some(d=>JSON.stringify(d)===JSON.stringify(u))||s.push(u))}let c=s.length===1?s[0]:uh(s)??{allOf:s};tt(r,a,c)}for(let a of o.required??[])i.add(a)}let n={type:"object",properties:r};if(i.size&&(n.required=[...i]),t.every(o=>o.additionalProperties===!1))n.additionalProperties=!1;else{let o=[];for(let a of t){let s=Ub(a);s&&!o.some(c=>JSON.stringify(c)===JSON.stringify(s))&&o.push(s)}o.length===1?n.additionalProperties=o[0]:o.length>1&&(n.additionalProperties={allOf:o})}return n}function VT(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let n of jb)if(n in e)return;let r=t.filter(n=>Nb.some(o=>Array.isArray(n[o]))),i=null;if(!r.length)i=uh(t);else{let n=r[0],o=Nb.find(c=>Array.isArray(n[c]));if(Object.keys(n).length!==1)return;let a=t.filter(c=>c!==n),s=n[o].map(c=>uh([...a,c]));if(s.some(c=>!c))return;i={[o]:s}}i&&(delete e.allOf,Yi(e,i))}function kn(e,t){let r=e.seen.get(t);if(!r)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,u={...l},d=c.ref;if(c.ref=null,d){i(d);let h=e.seen.get(d),g=h.schema;if(g.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(g)):Yi(l,g),Yi(l,u),s._zod.parent===d)for(let S in l)S==="$ref"||S==="allOf"||S in u||delete l[S];if(g.$ref&&h.def)for(let S in l)S==="$ref"||S==="allOf"||S in h.def&&JSON.stringify(l[S])===JSON.stringify(h.def[S])&&delete l[S]}let f=s._zod.parent;if(f&&f!==d){i(f);let h=e.seen.get(f);if(h?.schema.$ref&&(l.$ref=h.schema.$ref,h.def))for(let g in l)g==="$ref"||g==="allOf"||g in h.def&&JSON.stringify(l[g])===JSON.stringify(h.def[g])&&delete l[g]}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let s of[...e.seen.entries()].reverse())i(s[0]);if(e.target!=="openapi-3.0")for(let s of e.seen.entries())Ab(s[1].def??s[1].schema);for(let s of e.deferred)s();if(e.intersections.length){let s=new Map;for(let c of e.seen.values())for(let l of[c.schema,c.def]){let u=l?.allOf;if(!Array.isArray(u))continue;let d=s.get(u);d?d.push(l):s.set(u,[l])}for(let c of e.intersections)for(let l of s.get(c)??[])VT(l)}}let n={};if(e.target==="draft-2020-12"?n.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?n.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?n.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(t)?.id;if(!s)throw new Error("Schema is missing an `id` property");n.$id=e.external.uri(s)}Yi(n,r.defId?r.schema:r.def??r.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&n.id===o&&delete n.id;let a=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,tt(a,c.defId,c.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?n.$defs=a:n.definitions=a);try{let s=JSON.parse(JSON.stringify(n));return Object.defineProperty(s,"~standard",{value:{...t["~standard"],jsonSchema:{input:lo(t,"input",e.processors),output:lo(t,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function pt(e,t){let r=t??{seen:new Set};if(r.seen.has(e))return!1;r.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return pt(i.element,r);if(i.type==="set")return pt(i.valueType,r);if(i.type==="lazy")return pt(i.getter(),r);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault"||i.type==="catch")return pt(i.innerType,r);if(i.type==="intersection")return pt(i.left,r)||pt(i.right,r);if(i.type==="record"||i.type==="map")return pt(i.keyType,r)||pt(i.valueType,r);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:pt(i.in,r)||pt(i.out,r);if(i.type==="object"){for(let n in i.shape)if(pt(i.shape[n],r))return!0;return!1}if(i.type==="union"){for(let n of i.options)if(pt(n,r))return!0;return!1}if(i.type==="tuple"){for(let n of i.items)if(pt(n,r))return!0;return!!(i.rest&&pt(i.rest,r))}return!1}var dh=(e,t={})=>r=>{let i=_n({...r,processors:t});return Ae(e,i),Sn(i,e),kn(i,e)},lo=(e,t,r={})=>i=>{let{libraryOptions:n,target:o}=i??{},a=_n({...n??{},target:o,io:t,processors:r});return Ae(e,a),Sn(a,e),kn(a,e)};var uo=(e,t,r)=>{(e[t]===void 0||r>e[t])&&(e[t]=r)},po=(e,t,r)=>{(e[t]===void 0||r<e[t])&&(e[t]=r)},Mb=(e,t)=>{uo(e,"minimum",t),po(e,"maximum",t)},Fb=(e,t)=>{e.multipleOf??(e.multipleOf=[]),e.multipleOf.includes(t)||e.multipleOf.push(t)},Vb=(e,t)=>{e.patterns??(e.patterns=new Set),e.patterns.add(t)},Hb=(e,t)=>{e.mime=e.mime?e.mime.filter(r=>t.includes(r)):[...t]},Zb=(e,t)=>{e.format=t,t.includes("int")&&(e.isInt=!0)},qb=(e,t)=>uo(e,"minimum",t.minimum),Lb=(e,t)=>po(e,"maximum",t.maximum),Db=e=>(t,r)=>{Zb(t,r.format);let[i,n]=e[r.format];uo(t,"minimum",i),po(t,"maximum",n)},HT={greater_than:(e,t)=>uo(e,t.inclusive?"minimum":"exclusiveMinimum",t.value),less_than:(e,t)=>po(e,t.inclusive?"maximum":"exclusiveMaximum",t.value),multiple_of:(e,t)=>Fb(e,t.value),number_format:Db(bi),bigint_format:Db(_i),min_length:qb,max_length:Lb,length_equals:(e,t)=>Mb(e,t.length),min_size:qb,max_size:Lb,size_equals:(e,t)=>Mb(e,t.size),string_format:(e,t)=>{Zb(e,t.format),t.pattern&&Vb(e,t.pattern),(t.format==="base64"||t.format==="base64url")&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Hb(e,t.mime)};function We(e){let t={},r=e._zod.def,i=e._zod.traits.has("$ZodCheck")?[e,...r.checks??[]]:r.checks??[];for(let o of i)HT[o._zod.def.check]?.(t,o._zod.def);let n=e._zod.bag;n.minimum!==void 0&&uo(t,"minimum",n.minimum),n.exclusiveMinimum!==void 0&&uo(t,"exclusiveMinimum",n.exclusiveMinimum),n.maximum!==void 0&&po(t,"maximum",n.maximum),n.exclusiveMaximum!==void 0&&po(t,"exclusiveMaximum",n.exclusiveMaximum),n.multipleOf!==void 0&&Fb(t,n.multipleOf),n.format!==void 0&&(t.format??(t.format=n.format),n.format.includes("int")&&(t.isInt=!0)),n.mime&&Hb(t,n.mime);for(let o of n.patterns??[])Vb(t,o);return t}var ZT={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},GT=new Map([[Hs,gp],[Mi,vp]]),Gb=e=>GT.get(e)??e,fh=(e,t,r,i)=>{let n=r;n.type="string";let{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:l,laxFormat:u}=We(e);if(typeof o=="number"&&(n.minLength=o),typeof a=="number"&&(n.maxLength=a),s&&(n.format=ZT[s]??s,n.format===""&&delete n.format,(s==="time"||u)&&delete n.format),l&&(n.contentEncoding=l),c&&c.size>0){let d=[...c].map(Gb);d.length===1?n.pattern=d[0].source:d.length>1&&(n.allOf=[...d.map(f=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:f.source}))])}},hh=(e,t,r,i)=>{let n=r,{minimum:o,maximum:a,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=We(e);n.type=u?"integer":"number";let d=typeof l=="number"&&l>=(o??Number.NEGATIVE_INFINITY),f=typeof c=="number"&&c<=(a??Number.POSITIVE_INFINITY),h=t.target==="draft-04"||t.target==="openapi-3.0";if(d?h?(n.minimum=l,n.exclusiveMinimum=!0):n.exclusiveMinimum=l:typeof o=="number"&&(n.minimum=o),f?h?(n.maximum=c,n.exclusiveMaximum=!0):n.exclusiveMaximum=c:typeof a=="number"&&(n.maximum=a),s){let g=new Set;for(let y of s)Number.isFinite(y)&&y!==0?g.add(Math.abs(y)):Ke(e,t,n,i,`A multipleOf divisor of ${y} cannot be represented in JSON Schema`);let[b,...S]=g;b!==void 0&&(n.multipleOf=b),S.length&&(n.allOf=[...n.allOf??[],...S.map(y=>({multipleOf:y}))])}},gh=(e,t,r,i)=>{r.type="boolean"},vh=(e,t,r,i)=>{Ke(e,t,r,i,"BigInt cannot be represented in JSON Schema")},yh=(e,t,r,i)=>{Ke(e,t,r,i,"Symbols cannot be represented in JSON Schema")},bh=(e,t,r,i)=>{t.target==="openapi-3.0"?(r.type="string",r.nullable=!0,r.enum=[null]):r.type="null"},_h=(e,t,r,i)=>{Ke(e,t,r,i,"Undefined cannot be represented in JSON Schema")},Sh=(e,t,r,i)=>{Ke(e,t,r,i,"Void cannot be represented in JSON Schema")},kh=(e,t,r,i)=>{r.not={}},wh=(e,t,r,i)=>{},$h=(e,t,r,i)=>{},xh=(e,t,r,i)=>{Ke(e,t,r,i,"Date cannot be represented in JSON Schema")},Th=(e,t,r,i)=>{let n=e._zod.def,o=Ur(n.entries);if(o.length===0){r.not={};return}o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),r.enum=o},Rh=(e,t,r,i)=>{let n=e._zod.def;if(n.values.length===0){r.not={};return}let o=[];for(let a of n.values)if(a===void 0){if(Ke(e,t,r,i,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof a=="bigint"){if(Ke(e,t,r,i,"BigInt literals cannot be represented in JSON Schema"))return;o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];r.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?r.enum=[a]:r.const=a}else o.every(a=>typeof a=="number")&&(r.type="number"),o.every(a=>typeof a=="string")&&(r.type="string"),o.every(a=>typeof a=="boolean")&&(r.type="boolean"),o.every(a=>a===null)&&(r.type="null"),r.enum=o},Ih=(e,t,r,i)=>{Ke(e,t,r,i,"NaN cannot be represented in JSON Schema")},zh=(e,t,r,i)=>{let n=r,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");n.type="string",n.pattern=o.source},Eh=(e,t,r,i)=>{let n=r;n.type="string",n.format="binary",n.contentEncoding="binary";let{minimum:o,maximum:a,mime:s}=We(e);o!==void 0&&(n.minLength=o),a!==void 0&&(n.maxLength=a),s&&(s.length===0?n.not={}:s.length===1?n.contentMediaType=s[0]:n.anyOf=s.map(c=>({contentMediaType:c})))},Ch=(e,t,r,i)=>{r.type="boolean"},Ph=(e,t,r,i)=>{Ke(e,t,r,i,"Custom types cannot be represented in JSON Schema")},Oh=(e,t,r,i)=>{Ke(e,t,r,i,"Function types cannot be represented in JSON Schema")},Nh=(e,t,r,i)=>{Ke(e,t,r,i,"Transforms cannot be represented in JSON Schema")},Uh=(e,t,r,i)=>{Ke(e,t,r,i,"Map cannot be represented in JSON Schema")},Ah=(e,t,r,i)=>{Ke(e,t,r,i,"Set cannot be represented in JSON Schema")},jh=(e,t,r,i)=>{let n=r,o=e._zod.def,{minimum:a,maximum:s}=We(e);typeof a=="number"&&(n.minItems=a),typeof s=="number"&&(n.maxItems=s),n.type="array",n.items=Ae(o.element,t,{...i,path:[...i.path,"items"]})};function ea(e){let t=e._zod.def;return t.type==="pipe"&&t.in._zod.traits.has("$ZodTransform")?ea(t.out):t.type==="catch"?ea(t.innerType):e._zod.optin}var Mh=(e,t,r,i)=>{let n=r,o=e._zod.def,a=o.shape;if(Object.getOwnPropertySymbols(a).length&&Ke(e,t,n,i,"Symbol keys cannot be represented in JSON Schema"))return;n.type="object",n.properties={};for(let l in a)tt(n.properties,l,Ae(a[l],t,{...i,path:[...i.path,"properties",l]}));let c=[];for(let l of Object.keys(a)){let u=o.shape[l];(t.io==="input"?ea(u)===void 0:u._zod.optout===void 0)&&c.push(l)}c.length>0&&(n.required=c),o.catchall?._zod.def.type==="never"?n.additionalProperties=!1:o.catchall?o.catchall&&(n.additionalProperties=Ae(o.catchall,t,{...i,path:[...i.path,"additionalProperties"]})):t.io==="output"&&(n.additionalProperties=!1)},Dc=(e,t,r,i)=>{let n=e._zod.def,o=n.inclusive===!1,a=n.options.map((s,c)=>Ae(s,t,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?r.oneOf=a:r.anyOf=a},qh=(e,t,r,i)=>{let n=e._zod.def,o=Ae(n.left,t,{...i,path:[...i.path,"allOf",0]}),a=Ae(n.right,t,{...i,path:[...i.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];r.allOf=c,t.intersections.push(c)},Lh=(e,t,r,i)=>{let n=r,o=e._zod.def;n.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=o.items.map((b,S)=>Ae(b,t,{...i,path:[...i.path,a,S]})),l=o.rest?Ae(o.rest,t,{...i,path:[...i.path,s,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null,u=o.items.length;for(;u>0;){let b=o.items[u-1];if(!(t.io==="input"?ea(b)!==void 0:b._zod.optout==="optional"))break;u--}let d=o.items.length,f=!o.rest;t.target==="draft-2020-12"?(n.prefixItems=c,f?n.items=!1:l&&(n.items=l),u>0&&(n.minItems=u),f&&(n.maxItems=d)):t.target==="openapi-3.0"?(n.items={anyOf:c},l&&n.items.anyOf.push(l),u>0&&(n.minItems=u),f&&(n.maxItems=d)):(n.items=c,f?n.additionalItems=!1:l&&(n.additionalItems=l),u>0&&(n.minItems=u),f&&(n.maxItems=d));let{minimum:h,maximum:g}=We(e);typeof h=="number"&&(n.minItems=h),typeof g=="number"&&(n.maxItems=g)};function ph(e,t,r){if(t.$ref){if(r.has(t))return t;r.add(t);let g=e.get(t)?.def;if(!g)return t;let b=ph(e,g,r);return b===g?t:b}for(let g of["anyOf","oneOf"]){let b=t[g];if(!Array.isArray(b))continue;let S=b.map(y=>ph(e,y,r));S.some((y,x)=>y!==b[x])&&(t={...t,[g]:S})}let i=Array.isArray(t.type)?t.type:[t.type],n=!i.includes("string")&&i.some(g=>g==="number"||g==="integer"),o=t.enum??(t.const!==void 0?[t.const]:void 0);if(!n&&!o?.some(g=>typeof g=="number"))return t;let{minimum:a,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...h}=t;return h.enum?h.enum=h.enum.map(g=>typeof g=="number"?String(g):g):typeof h.const=="number"&&(h.const=String(h.const)),n&&(h.type="string",o||(h.pattern=(i.includes("number")?Xt:Ci).source)),h}var mh=new WeakMap;function JT(e){let t=new Map;for(let i of e.seen.values())i.def&&!t.has(i.schema)&&t.set(i.schema,i);let r=new Map;for(let i of mh.get(e)??[]){let n=e.seen.get(i),o=(n?.def??n?.schema)?.propertyNames;if(!o||o===!0||r.has(o))continue;let a=ph(t,o,new Set);a!==o&&r.set(o,a)}if(r.size)for(let i of e.seen.values())for(let n of[i.schema,i.def]){let o=n&&r.get(n.propertyNames);o&&(n.propertyNames=o)}}var Dh=(e,t,r,i)=>{let n=r,o=e._zod.def;n.type="object";let a=o.keyType,s=We(a).patterns;if(o.mode==="loose"&&s&&s.size>0){let u=Ae(o.valueType,t,{...i,path:[...i.path,"patternProperties","*"]});n.patternProperties={};for(let d of s)tt(n.patternProperties,Gb(d).source,u)}else{if(t.target==="draft-07"||t.target==="draft-2020-12"){n.propertyNames=Ae(o.keyType,t,{...i,path:[...i.path,"propertyNames"]});let u=mh.get(t);u||(u=[],mh.set(t,u),t.deferred.push(()=>JT(t))),u.push(e)}n.additionalProperties=Ae(o.valueType,t,{...i,path:[...i.path,"additionalProperties"]})}let c=a._zod.values,l=t.io==="input"&&ea(o.valueType)!==void 0;if(c&&!o.partial&&!l){let u=[...c].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(n.required=u.map(String))}},Fh=(e,t,r,i)=>{let n=e._zod.def,o=Ae(n.innerType,t,i),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=n.innerType,r.nullable=!0):r.anyOf=[o,{type:"null"}]},Vh=(e,t,r,i)=>{let n=e._zod.def;Ae(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},Hh=Symbol();function Jb(e,t,r,i,n){let o=!1,a=JSON.stringify(e,(s,c)=>typeof c!="bigint"?c:(o=!0,null));return o?(Ke(t,r,i,n,"BigInt defaults cannot be represented in JSON Schema"),Hh):JSON.parse(a)}var Zh=(e,t,r,i)=>{let n=e._zod.def;Ae(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let a=Jb(n.defaultValue,e,t,r,i);a!==Hh&&(r.default=a)},Gh=(e,t,r,i)=>{let n=e._zod.def;Ae(n.innerType,t,i);let o=t.seen.get(e);if(o.ref=n.innerType,t.io!=="input")return;let a=Jb(n.defaultValue,e,t,r,i);a!==Hh&&(r._prefault=a)},Jh=(e,t,r,i)=>{let n=e._zod.def;Ae(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType;let a;try{a=n.catchValue(void 0)}catch{Ke(e,t,r,i,"Dynamic catch values are not supported in JSON Schema");return}r.default=a},Bh=(e,t,r,i)=>{let n=e._zod.def,o=n.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?n.out:n.in:n.out;Ae(a,t,i);let s=t.seen.get(e);s.ref=a},Kh=(e,t,r,i)=>{let n=e._zod.def;Ae(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType,r.readOnly=!0},Wh=(e,t,r,i)=>{let n=e._zod.def;Ae(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},Fc=(e,t,r,i)=>{let n=e._zod.def;Ae(n.innerType,t,i);let o=t.seen.get(e);o.ref=n.innerType},Qh=(e,t,r,i)=>{let n=e._zod.innerType;Ae(n,t,i);let o=t.seen.get(e);o.ref=n},Lc={string:fh,number:hh,boolean:gh,bigint:vh,symbol:yh,null:bh,undefined:_h,void:Sh,never:kh,any:wh,unknown:$h,date:xh,enum:Th,literal:Rh,nan:Ih,template_literal:zh,file:Eh,success:Ch,custom:Ph,function:Oh,transform:Nh,map:Uh,set:Ah,array:jh,object:Mh,union:Dc,intersection:qh,tuple:Lh,record:Dh,nullable:Fh,nonoptional:Vh,default:Zh,prefault:Gh,catch:Jh,pipe:Bh,readonly:Kh,promise:Wh,optional:Fc,lazy:Qh};function lr(e,t){if("_idmap"in e){let i=e,n=_n({...t,processors:Lc}),o={};for(let c of i._idmap.entries()){let[l,u]=c;Ae(u,n)}let a={},s={registry:i,uri:t?.uri,defs:o};n.external=s;for(let c of i._idmap.entries()){let[l,u]=c;Sn(n,u),tt(a,l,kn(n,u))}if(Object.keys(o).length>0){let c=n.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}let r=_n({...t,processors:Lc});return Ae(e,r),Sn(r,e),kn(r,e)}var Vc=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 r=t?.target??"draft-2020-12";r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),this.ctx=_n({processors:Lc,target:r,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,r={path:[],schemaPath:[]}){return Ae(t,this.ctx,r)}emit(t,r){r&&(r.cycles&&(this.ctx.cycles=r.cycles),r.reused&&(this.ctx.reused=r.reused),r.external&&(this.ctx.external=r.external)),this.ctx.sharedDefsExtractedFor=void 0,this.ctx.sharedEmitDoneFor=void 0,Sn(this.ctx,t);let i=kn(this.ctx,t),{"~standard":n,...o}=i;return o}};var Bb={};var _o={};Kt(_o,{ZodAny:()=>hg,ZodArray:()=>bg,ZodBase64:()=>ll,ZodBase64URL:()=>ul,ZodBigInt:()=>bo,ZodBigIntFormat:()=>ml,ZodBoolean:()=>yo,ZodCIDRv4:()=>sl,ZodCIDRv6:()=>cl,ZodCUID:()=>el,ZodCUID2:()=>tl,ZodCatch:()=>Mg,ZodCodec:()=>la,ZodCreditCard:()=>ug,ZodCustom:()=>ua,ZodCustomStringFormat:()=>dr,ZodDate:()=>oa,ZodDefault:()=>Pg,ZodDiscriminatedUnion:()=>Sg,ZodE164:()=>dl,ZodEmail:()=>Kc,ZodEmoji:()=>Xc,ZodEnum:()=>fo,ZodExactOptional:()=>vl,ZodFile:()=>Ig,ZodFunction:()=>Jg,ZodGUID:()=>Qc,ZodIBAN:()=>dg,ZodIPv4:()=>il,ZodIPv6:()=>al,ZodISODate:()=>$n,ZodISODateTime:()=>wn,ZodISODuration:()=>Tn,ZodISOTime:()=>xn,ZodInstanceOf:()=>Wg,ZodIntersection:()=>kg,ZodJWT:()=>pl,ZodKSUID:()=>ol,ZodLazy:()=>Zg,ZodLiteral:()=>Rg,ZodMAC:()=>lg,ZodMap:()=>xg,ZodNaN:()=>Lg,ZodNanoID:()=>Yc,ZodNever:()=>vg,ZodNonOptional:()=>yl,ZodNull:()=>fg,ZodNullable:()=>Cg,ZodNumber:()=>vo,ZodNumberFormat:()=>pr,ZodObject:()=>ia,ZodOptional:()=>sa,ZodPipe:()=>ca,ZodPrefault:()=>Ng,ZodPreprocess:()=>Dg,ZodPromise:()=>Gg,ZodReadonly:()=>Fg,ZodRecord:()=>mo,ZodSet:()=>Tg,ZodString:()=>ho,ZodStringFormat:()=>je,ZodSuccess:()=>jg,ZodSymbol:()=>pg,ZodTemplateLiteral:()=>Hg,ZodTransform:()=>zg,ZodTuple:()=>wg,ZodType:()=>$e,ZodULID:()=>nl,ZodURL:()=>ra,ZodUUID:()=>Vt,ZodUndefined:()=>mg,ZodUnion:()=>aa,ZodUnknown:()=>gg,ZodVoid:()=>yg,ZodXID:()=>rl,ZodXor:()=>_g,_ZodString:()=>Bc,_default:()=>Og,_function:()=>Y_,any:()=>fl,array:()=>j,base64:()=>h_,base64url:()=>g_,bigint:()=>E_,boolean:()=>oe,catch:()=>qg,check:()=>eS,cidrv4:()=>m_,cidrv6:()=>f_,codec:()=>K_,creditCard:()=>y_,cuid:()=>i_,cuid2:()=>a_,currencyCode:()=>$_,custom:()=>tS,date:()=>A_,describe:()=>nS,discriminatedUnion:()=>Rn,e164:()=>v_,email:()=>Wc,emoji:()=>r_,enum:()=>he,exactOptional:()=>Eg,file:()=>Z_,float32:()=>T_,float64:()=>R_,function:()=>Y_,guid:()=>Qb,hash:()=>x_,hex:()=>w_,hostname:()=>k_,httpUrl:()=>n_,iban:()=>b_,instanceof:()=>oS,int:()=>Gc,int32:()=>I_,int64:()=>C_,intersection:()=>At,invertCodec:()=>W_,ipv4:()=>u_,ipv6:()=>p_,json:()=>aS,jwt:()=>__,keyof:()=>j_,ksuid:()=>l_,lazy:()=>In,literal:()=>q,looseObject:()=>me,looseRecord:()=>D_,mac:()=>d_,map:()=>F_,meta:()=>rS,nan:()=>B_,nanoid:()=>o_,nativeEnum:()=>H_,never:()=>hl,nonoptional:()=>Ag,null:()=>Ht,nullable:()=>na,nullish:()=>G_,number:()=>W,object:()=>E,optional:()=>ce,partialRecord:()=>L_,pipe:()=>Jc,prefault:()=>Ug,preprocess:()=>tn,promise:()=>X_,readonly:()=>Vg,record:()=>re,refine:()=>Bg,set:()=>V_,strictObject:()=>M_,string:()=>p,stringFormat:()=>S_,stringbool:()=>iS,success:()=>J_,superRefine:()=>Kg,symbol:()=>O_,templateLiteral:()=>Q_,transform:()=>gl,tuple:()=>$g,uint32:()=>z_,uint64:()=>P_,ulid:()=>s_,undefined:()=>N_,union:()=>ie,unknown:()=>le,url:()=>go,uuid:()=>Xb,uuidv4:()=>Yb,uuidv6:()=>e_,uuidv7:()=>t_,void:()=>U_,xid:()=>c_,xor:()=>q_});var Hc={};Kt(Hc,{endsWith:()=>to,gt:()=>Dt,gte:()=>$t,includes:()=>Yr,length:()=>sr,lowercase:()=>Qr,lt:()=>Lt,lte:()=>wt,maxLength:()=>ar,maxSize:()=>bn,mime:()=>ro,minLength:()=>Yt,minSize:()=>Ft,multipleOf:()=>yn,negative:()=>Ac,nonnegative:()=>Mc,nonpositive:()=>jc,normalize:()=>oo,overwrite:()=>Ut,positive:()=>Uc,properties:()=>no,property:()=>qc,regex:()=>Wr,size:()=>ir,slugify:()=>co,startsWith:()=>eo,toLowerCase:()=>ao,toUpperCase:()=>so,trim:()=>io,uppercase:()=>Xr});var Kb=new WeakSet([Object.prototype,Error.prototype]);function Zc(e,t,r){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let i=r(this);return Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0}),i},set(i){Object.defineProperty(this,t,{value:i,configurable:!0,writable:!0})}})}var Wb=(e,t)=>{Wd.init(e,t),e.name="ZodError";let r=Object.getPrototypeOf(e);Kb.has(r)||(Kb.add(r),Zc(r,"format",i=>n=>Ri(i,n)),Zc(r,"flatten",i=>n=>Ti(i,n)),Zc(r,"addIssue",i=>n=>{i.issues.push(n),i.message=JSON.stringify(i.issues,Ar,2)}),Zc(r,"addIssues",i=>n=>{i.issues.push(...n),i.message=JSON.stringify(i.issues,Ar,2)}),Object.defineProperty(r,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},KT=N("ZodError",Wb),bt=N("ZodError",Wb,void 0,{Parent:Error});var Xh=Dr(bt),Yh=Fr(bt),ta=Vr(bt),eg=Hr(bt),tg=Ss(bt),ng=ks(bt),rg=ws(bt),og=$s(bt),ig=xs(bt),ag=Ts(bt),sg=Rs(bt),cg=Is(bt);function QT(){Xe.localeError||He(ac())}function ur(){Xe.memoizer||He({memoizer:Zi()})}var $e=N("ZodType",(e,t)=>(QT(),be.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(H.mergeDefs(t,{checks:[...t.checks??[],...e.map(r=>typeof r=="function"?{_zod:{check:r,def:{check:"custom"},onattach:[]}}:r)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return Ne(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(Bg(e,t))},superRefine(e,t){return this.check(Kg(e,t))},overwrite(e){return this.check(Ut(e))},optional(){return ce(this)},exactOptional(){return Eg(this)},nullable(){return na(this)},nullish(){return ce(na(this))},nonoptional(e){return Ag(this,e)},array(){return j(this)},or(e){return ie([this,e])},and(e){return At(this,e)},transform(e){return Jc(this,gl(e))},default(e){return Og(this,e)},prefault(e){return Ug(this,e)},catch(e){return qg(this,e)},pipe(e){return Jc(this,e)},readonly(){return Vg(this)},describe(e){let t=this.clone();return nt.add(t,{description:e}),t},meta(...e){if(e.length===0)return nt.get(this);let t=this.clone();return nt.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return H.hide(this,"~standard",{...qs(this),jsonSchema:{input:lo(this,"input"),output:lo(this,"output")}})},set"~standard"(e){H.own(this,"~standard",e)},parse:function e(t,r){return Xh(this,t,r,{callee:e})},parseAsync:async function e(t,r){return await Yh(this,t,r,{callee:e})},safeParse(e,t){return ta(this,e,t)},async safeParseAsync(e,t){return eg(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){H.own(this,"spa",e)},validate(e,t){return Ii(this,e,t)},validateAsync(e,t){return zi(this,e,t)},encode:function e(t,r){return tg(this,t,r,{callee:e})},decode:function e(t,r){return ng(this,t,r,{callee:e})},encodeAsync:async function e(t,r){return await rg(this,t,r,{callee:e})},decodeAsync:async function e(t,r){return await og(this,t,r,{callee:e})},safeEncode(e,t){return ig(this,e,t)},safeDecode(e,t){return ag(this,e,t)},async safeEncodeAsync(e,t){return sg(this,e,t)},async safeDecodeAsync(e,t){return cg(this,e,t)},toJSONSchema(e){return dh(this,{})(e)},get description(){return nt.get(this)?.description},get _def(){return this._zod.def}}),Bc=N("_ZodString",(e,t)=>{tr.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>fh(e,r,i,n)},H.derived({format:e=>We(e).format??null,minLength:e=>We(e).minimum??null,maxLength:e=>We(e).maximum??null},{regex(...e){return this.check(Wr(...e))},includes(...e){return this.check(Yr(...e))},startsWith(...e){return this.check(eo(...e))},endsWith(...e){return this.check(to(...e))},min(...e){return this.check(Yt(...e))},max(...e){return this.check(ar(...e))},length(...e){return this.check(sr(...e))},nonempty(...e){return this.check(Yt(1,...e))},lowercase(e){return this.check(Qr(e))},uppercase(e){return this.check(Xr(e))},trim(){return this.check(io())},normalize(...e){return this.check(oo(...e))},toLowerCase(){return this.check(ao())},toUpperCase(){return this.check(so())},slugify(){return this.check(co())}})),ho=N("ZodString",(e,t)=>{tr.init(e,t),Bc.init(e,t)},{email(e){return this.check(fc(Kc,e))},url(e){return this.check(Bi(ra,e))},jwt(e){return this.check(Nc(pl,e))},emoji(e){return this.check(_c(Xc,e))},guid(e){return this.check(hc(Qc,e))},uuid(e){return this.check(gc(Vt,e))},uuidv4(e){return this.check(vc(Vt,e))},uuidv6(e){return this.check(yc(Vt,e))},uuidv7(e){return this.check(bc(Vt,e))},nanoid(e){return this.check(Sc(Yc,e))},cuid(e){return this.check(kc(el,e))},cuid2(e){return this.check(wc(tl,e))},ulid(e){return this.check($c(nl,e))},base64(e){return this.check(Cc(ll,e))},base64url(e){return this.check(Pc(ul,e))},xid(e){return this.check(xc(rl,e))},ksuid(e){return this.check(Tc(ol,e))},ipv4(e){return this.check(Rc(il,e))},ipv6(e){return this.check(Ic(al,e))},cidrv4(e){return this.check(zc(sl,e))},cidrv6(e){return this.check(Ec(cl,e))},e164(e){return this.check(Oc(dl,e))},datetime(e){return this.check(Ki(wn,e))},date(e){return this.check(Wi($n,e))},time(e){return this.check(Qi(xn,e))},duration(e){return this.check(Xi(Tn,e))}});function p(e){return Rf(ho,e)}var je=N("ZodStringFormat",(e,t)=>{Ue.init(e,t),Bc.init(e,t)}),wn=N("ZodISODateTime",(e,t)=>{gm.init(e,t),je.init(e,t)}),$n=N("ZodISODate",(e,t)=>{vm.init(e,t),je.init(e,t)}),xn=N("ZodISOTime",(e,t)=>{ym.init(e,t),je.init(e,t)}),Tn=N("ZodISODuration",(e,t)=>{bm.init(e,t),je.init(e,t)}),Kc=N("ZodEmail",(e,t)=>{im.init(e,t),je.init(e,t)});function Wc(e){return fc(Kc,e)}var Qc=N("ZodGUID",(e,t)=>{rm.init(e,t),je.init(e,t)});function Qb(e){return hc(Qc,e)}var Vt=N("ZodUUID",(e,t)=>{om.init(e,t),je.init(e,t)});function Xb(e){return gc(Vt,e)}function Yb(e){return vc(Vt,e)}function e_(e){return yc(Vt,e)}function t_(e){return bc(Vt,e)}var ra=N("ZodURL",(e,t)=>{cm.init(e,t),je.init(e,t)});function go(e){return Bi(ra,e)}function n_(e){return Bi(ra,{protocol:Ei,hostname:bp,...H.normalizeParams(e)})}var Xc=N("ZodEmoji",(e,t)=>{lm.init(e,t),je.init(e,t)});function r_(e){return _c(Xc,e)}var Yc=N("ZodNanoID",(e,t)=>{um.init(e,t),je.init(e,t)});function o_(e){return Sc(Yc,e)}var el=N("ZodCUID",(e,t)=>{dm.init(e,t),je.init(e,t)});function i_(e){return kc(el,e)}var tl=N("ZodCUID2",(e,t)=>{pm.init(e,t),je.init(e,t)});function a_(e){return wc(tl,e)}var nl=N("ZodULID",(e,t)=>{mm.init(e,t),je.init(e,t)});function s_(e){return $c(nl,e)}var rl=N("ZodXID",(e,t)=>{fm.init(e,t),je.init(e,t)});function c_(e){return xc(rl,e)}var ol=N("ZodKSUID",(e,t)=>{hm.init(e,t),je.init(e,t)});function l_(e){return Tc(ol,e)}var il=N("ZodIPv4",(e,t)=>{_m.init(e,t),je.init(e,t)});function u_(e){return Rc(il,e)}var lg=N("ZodMAC",(e,t)=>{km.init(e,t),je.init(e,t)});function d_(e){return zf(lg,e)}var al=N("ZodIPv6",(e,t)=>{Sm.init(e,t),je.init(e,t)});function p_(e){return Ic(al,e)}var sl=N("ZodCIDRv4",(e,t)=>{wm.init(e,t),je.init(e,t)});function m_(e){return zc(sl,e)}var cl=N("ZodCIDRv6",(e,t)=>{$m.init(e,t),je.init(e,t)});function f_(e){return Ec(cl,e)}var ll=N("ZodBase64",(e,t)=>{xm.init(e,t),je.init(e,t)});function h_(e){return Cc(ll,e)}var ul=N("ZodBase64URL",(e,t)=>{Tm.init(e,t),je.init(e,t)});function g_(e){return Pc(ul,e)}var dl=N("ZodE164",(e,t)=>{Rm.init(e,t),je.init(e,t)});function v_(e){return Oc(dl,e)}var ug=N("ZodCreditCard",(e,t)=>{Im.init(e,t),je.init(e,t)});function y_(e){return Ef(ug,e)}var dg=N("ZodIBAN",(e,t)=>{zm.init(e,t),je.init(e,t)});function b_(e){return Cf(dg,e)}var pl=N("ZodJWT",(e,t)=>{Em.init(e,t),je.init(e,t)});function __(e){return Nc(pl,e)}var dr=N("ZodCustomStringFormat",(e,t)=>{Cm.init(e,t),je.init(e,t)});function S_(e,t,r={}){return cr(dr,e,t,r)}function k_(e){return cr(dr,"hostname",yp,e)}function w_(e){return cr(dr,"hex",Op,e)}function $_(e){return cr(dr,"currency_code",Sp,e)}function x_(e,t){let r=t?.enc??"hex",i=`${e}_${r}`,n=zt[i];if(!n)throw new Error(`Unrecognized hash format: ${i}`);return cr(dr,i,n,t)}var vo=N("ZodNumber",(e,t)=>{Ks.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>hh(e,r,i,n),e.isFinite=!0},H.derived({minValue:e=>{let{minimum:t,exclusiveMinimum:r}=We(e);return Math.max(t??Number.NEGATIVE_INFINITY,r??Number.NEGATIVE_INFINITY)},maxValue:e=>{let{maximum:t,exclusiveMaximum:r}=We(e);return Math.min(t??Number.POSITIVE_INFINITY,r??Number.POSITIVE_INFINITY)},isInt:e=>{let{isInt:t,multipleOf:r}=We(e);return!!t||!!r?.some(Number.isSafeInteger)},format:e=>We(e).format??null},{gt(e,t){return this.check(Dt(e,t))},gte(e,t){return this.check($t(e,t))},min(e,t){return this.check($t(e,t))},lt(e,t){return this.check(Lt(e,t))},lte(e,t){return this.check(wt(e,t))},max(e,t){return this.check(wt(e,t))},int(e){return this.check(Gc(e))},safe(e){return this.check(Gc(e))},positive(e){return this.check(Dt(0,e))},nonnegative(e){return this.check($t(0,e))},negative(e){return this.check(Lt(0,e))},nonpositive(e){return this.check(wt(0,e))},multipleOf(e,t){return this.check(yn(e,t))},step(e,t){return this.check(yn(e,t))},finite(){return this}}));function W(e){return Of(vo,e)}var pr=N("ZodNumberFormat",(e,t)=>{Pm.init(e,t),vo.init(e,t)});function Gc(e){return Uf(pr,e)}function T_(e){return Af(pr,e)}function R_(e){return jf(pr,e)}function I_(e){return Mf(pr,e)}function z_(e){return qf(pr,e)}var yo=N("ZodBoolean",(e,t)=>{qi.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>gh(e,r,i,n)});function oe(e){return Lf(yo,e)}var bo=N("ZodBigInt",(e,t)=>{Ws.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>vh(e,r,i,n)},H.derived({minValue:e=>We(e).minimum??null,maxValue:e=>We(e).maximum??null,format:e=>We(e).format??null},{gte(e,t){return this.check($t(e,t))},min(e,t){return this.check($t(e,t))},gt(e,t){return this.check(Dt(e,t))},lt(e,t){return this.check(Lt(e,t))},lte(e,t){return this.check(wt(e,t))},max(e,t){return this.check(wt(e,t))},positive(e){return this.check(Dt(BigInt(0),e))},negative(e){return this.check(Lt(BigInt(0),e))},nonpositive(e){return this.check(wt(BigInt(0),e))},nonnegative(e){return this.check($t(BigInt(0),e))},multipleOf(e,t){return this.check(yn(e,t))}}));function E_(e){return Ff(bo,e)}var ml=N("ZodBigIntFormat",(e,t)=>{Om.init(e,t),bo.init(e,t)});function C_(e){return Hf(ml,e)}function P_(e){return Zf(ml,e)}var pg=N("ZodSymbol",(e,t)=>{Nm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>yh(e,r,i,n)});function O_(e){return Gf(pg,e)}var mg=N("ZodUndefined",(e,t)=>{Um.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>_h(e,r,i,n)});function N_(e){return Jf(mg,e)}var fg=N("ZodNull",(e,t)=>{Am.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>bh(e,r,i,n)});function Ht(e){return Bf(fg,e)}var hg=N("ZodAny",(e,t)=>{jm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>wh(e,r,i,n)});function fl(){return Kf(hg)}var gg=N("ZodUnknown",(e,t)=>{Mm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>$h(e,r,i,n)});function le(){return Wf(gg)}var vg=N("ZodNever",(e,t)=>{qm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>kh(e,r,i,n)});function hl(e){return Qf(vg,e)}var yg=N("ZodVoid",(e,t)=>{Lm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Sh(e,r,i,n)});function U_(e){return Xf(yg,e)}var oa=N("ZodDate",(e,t)=>{Dm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>xh(e,r,i,n),e.min=(r,i)=>e.check($t(r,i)),e.max=(r,i)=>e.check(wt(r,i))},H.derived({minDate:e=>{let{minimum:t}=We(e);return t?new Date(t):null},maxDate:e=>{let{maximum:t}=We(e);return t?new Date(t):null}},{}));function A_(e){return Yf(oa,e)}var bg=N("ZodArray",(e,t)=>{ur(),Vm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>jh(e,r,i,n),e.element=t.element},{min(e,t){return this.check(Yt(e,t))},nonempty(e){return this.check(Yt(1,e))},max(e,t){return this.check(ar(e,t))},length(e,t){return this.check(sr(e,t))},unwrap(){return this.element}});function j(e,t){return nh(bg,e,t)}function j_(e){let t=e._zod.def.shape;return he(Object.keys(t))}var ia=N("ZodObject",(e,t)=>{ur(),Hm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Mh(e,r,i,n),H.installLazyProp(e,"shape",r=>r._zod.def.shape,!1)},{keyof(){return he(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(H.mergeDefs(this._zod.def,{catchall:e}))},passthrough(){return this.clone(H.mergeDefs(this._zod.def,{catchall:le()}))},loose(){return this.clone(H.mergeDefs(this._zod.def,{catchall:le()}))},strict(){return this.clone(H.mergeDefs(this._zod.def,{catchall:hl()}))},strip(){return this.clone(H.mergeDefs(this._zod.def,{catchall:void 0}))},extend(e){return H.extend(this,e)},safeExtend(e){return H.safeExtend(this,e)},merge(e){return H.merge(this,e)},pick(e){return H.pick(this,e)},omit(e){return H.omit(this,e)},partial(...e){return H.partial(sa,this,e[0])},exactPartial(...e){return H.partial(vl,this,e[0],"exactPartial")},required(...e){return H.required(yl,this,e[0])}});function E(e,t){let r={type:"object",shape:e??{},...H.normalizeParams(t)};return new ia(r)}function M_(e,t){return new ia({type:"object",shape:e,catchall:hl(),...H.normalizeParams(t)})}function me(e,t){return new ia({type:"object",shape:e,catchall:le(),...H.normalizeParams(t)})}var aa=N("ZodUnion",(e,t)=>{Li.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dc(e,r,i,n),e.options=t.options});function ie(e,t){return new aa({type:"union",options:e,...H.normalizeParams(t)})}var _g=N("ZodXor",(e,t)=>{aa.init(e,t),Zm.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dc(e,r,i,n),e.options=t.options});function q_(e,t){return new _g({type:"union",options:e,inclusive:!1,...H.normalizeParams(t)})}var Sg=N("ZodDiscriminatedUnion",(e,t)=>{aa.init(e,t),Jm.init(e,t)});function Rn(e,t,r){return new Sg({type:"union",options:t,discriminator:e,...H.normalizeParams(r)})}var kg=N("ZodIntersection",(e,t)=>{Bm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>qh(e,r,i,n)});function At(e,t){return new kg({type:"intersection",left:e,right:t})}var wg=N("ZodTuple",(e,t)=>{ur(),Qs.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Lh(e,r,i,n)},{rest(e){return this.clone({...this._zod.def,rest:e})},partial(){let e=this._zod.def;if(e.checks?.length)throw new Error(".partial() cannot be used on tuple schemas containing refinements");return this.clone({...e,items:e.items.map(t=>new sa({type:"optional",innerType:t}))})}});function $g(e,t,r){let i=t instanceof be,n=i?r:t,o=i?t:null;return new wg({type:"tuple",items:e,rest:o,...H.normalizeParams(n)})}var mo=N("ZodRecord",(e,t)=>{ur(),Km.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Dh(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType});function re(e,t,r){return!t||!t._zod?new mo({type:"record",keyType:p(),valueType:e,...H.normalizeParams(t)}):new mo({type:"record",keyType:e,valueType:t,...H.normalizeParams(r)})}function L_(e,t,r){return new mo({type:"record",keyType:e,valueType:t,...H.normalizeParams(r),partial:!0})}function D_(e,t,r){return new mo({type:"record",keyType:e,valueType:t,mode:"loose",...H.normalizeParams(r)})}var xg=N("ZodMap",(e,t)=>{ur(),Wm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Uh(e,r,i,n),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...r)=>e.check(Ft(...r)),e.nonempty=r=>e.check(Ft(1,r)),e.max=(...r)=>e.check(bn(...r)),e.size=(...r)=>e.check(ir(...r))});function F_(e,t,r){return new xg({type:"map",keyType:e,valueType:t,...H.normalizeParams(r)})}var Tg=N("ZodSet",(e,t)=>{ur(),Qm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ah(e,r,i,n),e.min=(...r)=>e.check(Ft(...r)),e.nonempty=r=>e.check(Ft(1,r)),e.max=(...r)=>e.check(bn(...r)),e.size=(...r)=>e.check(ir(...r))});function V_(e,t){return new Tg({type:"set",valueType:e,...H.normalizeParams(t)})}var fo=N("ZodEnum",(e,t)=>{Xm.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(i,n,o)=>Th(e,i,n,o),e.enum=t.entries,e.options=[...e._zod.values];let r=new Set(Object.keys(t.entries));e.extract=(i,n)=>{let o={};for(let a of i)if(r.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new fo({...t,checks:[],...H.normalizeParams(n),entries:o})},e.exclude=(i,n)=>{let o={...t.entries};for(let a of i)if(r.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new fo({...t,checks:[],...H.normalizeParams(n),entries:o})}});function he(e,t){let r=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new fo({type:"enum",entries:r,...H.normalizeParams(t)})}function H_(e,t){return new fo({type:"enum",entries:e,...H.normalizeParams(t)})}var Rg=N("ZodLiteral",(e,t)=>{Ym.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Rh(e,r,i,n),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function q(e,t){return new Rg({type:"literal",values:Array.isArray(e)?e:[e],...H.normalizeParams(t)})}var Ig=N("ZodFile",(e,t)=>{ef.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Eh(e,r,i,n),e.min=(r,i)=>e.check(Ft(r,i)),e.max=(r,i)=>e.check(bn(r,i)),e.mime=(r,i)=>e.check(ro(Array.isArray(r)?r:[r],i))});function Z_(e){return rh(Ig,e)}var zg=N("ZodTransform",(e,t)=>{ur(),tf.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Nh(e,r,i,n),e._zod.parse=(r,i)=>{if(i.direction==="backward")throw new gn(e.constructor.name);r.addIssue=o=>{if(typeof o=="string")r.issues.push(H.issue(o,r.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),"input"in a||(a.input=r.value),a.inst??(a.inst=e),r.issues.push(H.issue(a))}};let n=t.transform(r.value,r);return n instanceof Promise?n.then(o=>(r.value=o,r)):(r.value=n,r)}});function gl(e){return new zg({type:"transform",transform:e})}var sa=N("ZodOptional",(e,t)=>{Xs.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fc(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function ce(e){return new sa({type:"optional",innerType:e})}var vl=N("ZodExactOptional",(e,t)=>{nf.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fc(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Eg(e){return new vl({type:"optional",innerType:e})}var Cg=N("ZodNullable",(e,t)=>{rf.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Fh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function na(e){return new Cg({type:"nullable",innerType:e})}function G_(e){return ce(na(e))}var Pg=N("ZodDefault",(e,t)=>{of.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Zh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Og(e,t){return new Pg({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():H.shallowClone(t)}})}var Ng=N("ZodPrefault",(e,t)=>{af.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Gh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Ug(e,t){return new Ng({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():H.shallowClone(t)}})}var yl=N("ZodNonOptional",(e,t)=>{sf.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Vh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Ag(e,t){return new yl({type:"nonoptional",innerType:e,...H.normalizeParams(t)})}var jg=N("ZodSuccess",(e,t)=>{cf.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ch(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function J_(e){return new jg({type:"success",innerType:e})}var Mg=N("ZodCatch",(e,t)=>{lf.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Jh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function qg(e,t){return new Mg({type:"catch",innerType:e,catchValue:typeof t=="function"?t:H.constantCatch(t)})}var Lg=N("ZodNaN",(e,t)=>{uf.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ih(e,r,i,n)});function B_(e){return th(Lg,e)}var ca=N("ZodPipe",(e,t)=>{Ys.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Bh(e,r,i,n),e.in=t.in,e.out=t.out});function Jc(e,t){return new ca({type:"pipe",in:e,out:t})}var la=N("ZodCodec",(e,t)=>{ca.init(e,t),Di.init(e,t)});function K_(e,t,r){return new la({type:"pipe",in:e,out:t,transform:r.decode,reverseTransform:r.encode})}function W_(e){let t=e._zod.def;return new la({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var Dg=N("ZodPreprocess",(e,t)=>{ca.init(e,t),df.init(e,t)}),Fg=N("ZodReadonly",(e,t)=>{pf.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Kh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function Vg(e){return new Fg({type:"readonly",innerType:e})}var Hg=N("ZodTemplateLiteral",(e,t)=>{mf.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>zh(e,r,i,n)});function Q_(e,t){return new Hg({type:"template_literal",parts:e,...H.normalizeParams(t)})}var Zg=N("ZodLazy",(e,t)=>{Fi.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Qh(e,r,i,n),e.unwrap=()=>e._zod.def.getter()});function In(e){return new Zg({type:"lazy",getter:e})}var Gg=N("ZodPromise",(e,t)=>{hf.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Wh(e,r,i,n),e.unwrap=()=>e._zod.def.innerType});function X_(e){return new Gg({type:"promise",innerType:e})}var Jg=N("ZodFunction",(e,t)=>{ff.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Oh(e,r,i,n)});function Y_(e){return new Jg({type:"function",input:Array.isArray(e?.input)?$g(e?.input):e?.input??j(le()),output:e?.output??le()})}var ua=N("ZodCustom",(e,t)=>{gf.init(e,t),$e.init(e,t),e._zod.processJSONSchema=(r,i,n)=>Ph(e,r,i,n)});function eS(e){let t=new Me({check:"custom"});return t._zod.check=e,t}function tS(e,t){return oh(ua,e??(()=>!0),t)}function Bg(e,t={}){return ih(ua,e,t)}function Kg(e,t){return ah(e,t)}var nS=sh,rS=ch,Wg=N("ZodInstanceOf",(e,t)=>{ua.init(e,t)},{properties(e,t){return this.check(no(e,t))}});function oS(e,t={}){let r=new Wg({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...H.normalizeParams(t)});return r._zod.bag.Class=e,r._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:r,path:[...r._zod.def.path??[]]})},r}var iS=(...e)=>lh({Codec:la,Boolean:yo,String:ho},...e);function aS(e){let t=In(()=>ie([p(e),W(),oe(),Ht(),j(t),re(p(),t)]));return t}function tn(e,t){return new Dg({type:"pipe",in:gl(e),out:t})}var Xg={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 XT(e){He({customError:e})}function YT(){return He().customError}var Qg;Qg||(Qg={});var Et={};Kt(Et,{ZodISODate:()=>$n,ZodISODateTime:()=>wn,ZodISODuration:()=>Tn,ZodISOTime:()=>xn,date:()=>tR,datetime:()=>eR,duration:()=>rR,time:()=>nR});function eR(e){return Ki(wn,e)}function tR(e){return Wi($n,e)}function nR(e){return Qi(xn,e)}function rR(e){return Xi(Tn,e)}var ae={..._o,...Hc,iso:Et},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 iR(e,t){let r=e.$schema;return r==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":r==="http://json-schema.org/draft-07/schema#"?"draft-7":r==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function sS(e,t){return e.map((r,i)=>i<t?r:r.optional())}function aR(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function sR(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let r=e.slice(1).split("/").filter(Boolean);if(r.length===0)return t.rootSchema;let i=t.version==="draft-2020-12"?"$defs":"definitions";if(r[0]===i){let n=r[1]===void 0?void 0:aR(r[1]);if(!n||!t.defs[n])throw new Error(`Reference not found: ${e}`);return t.defs[n]}throw new Error(`Reference not found: ${e}`)}function cR(e,t){return ae.transform(i=>i).check(i=>{let n=i.value;if(typeof n!="object"||n===null||Array.isArray(n))return;let o=Object.getOwnPropertyNames(n);if(t.minProperties!==void 0&&o.length<t.minProperties&&i.issues.push({origin:"object",code:"too_small",minimum:t.minProperties,inclusive:!0,message:`Too small: expected object to have >=${t.minProperties} properties`,input:n,inst:e,continue:!0}),t.maxProperties!==void 0&&o.length>t.maxProperties&&i.issues.push({origin:"object",code:"too_big",maximum:t.maxProperties,inclusive:!0,message:`Too big: expected object to have <=${t.maxProperties} properties`,input:n,inst:e,continue:!0}),t.keySchema)for(let a of o){let s=t.keySchema.safeParse(a);s.success||i.issues.push({code:"invalid_key",origin:"record",issues:s.error.issues,input:a,path:[a],continue:!0})}}).pipe(e)}function Yg(e,t){if(e===null)return"z";let r=typeof e;if(r!=="object"){if(r==="number"&&Number.isNaN(e))return null;let i=String(e);return`${r[0]}${i.length}:${i}`}if(t.has(e))return null;t.add(e);try{if(Array.isArray(e)){let o=[];for(let a of e){let s=Yg(a,t);if(s===null)return null;o.push(s)}return`a${o.length}:[${o.join(",")}]`}let i=Object.keys(e).sort(),n=[];for(let o of i){let a=Yg(e[o],t);if(a===null)return null;n.push(`${o.length}:${o}=${a}`)}return`o${n.length}:{${n.join(",")}}`}finally{t.delete(e)}}var lR=new Set(["items","prefixItems","additionalItems","additionalProperties","contains","propertyNames","not","if","then","else","allOf","anyOf","oneOf","unevaluatedItems","unevaluatedProperties","contentSchema"]),uR=new Set(["properties","patternProperties","dependentSchemas","dependencies","$defs","definitions"]);function da(e){return typeof e!="object"||e===null?!1:Array.isArray(e)?e.some(da):typeof e.$ref=="string"?!0:Object.entries(e).some(([t,r])=>lR.has(t)?da(r):!uR.has(t)||typeof r!="object"||r===null?!1:Object.values(r).some(da))}function cS(e){return e===1?"element":"elements"}function dR(e,t){return ae.transform(i=>i).check(i=>{let n=i.value;if(Array.isArray(n)){if(t.uniqueItems===!0){let o=new Map;for(let a=0;a<n.length;a++){let s=Yg(n[a],new Set);if(s===null)continue;let c=o.get(s);if(c===void 0){o.set(s,a);continue}i.issues.push({code:"custom",message:`Array items must be unique: element at index ${a} duplicates the one at index ${c}`,input:n,path:[a],continue:!0})}}if(t.containsSchema){let o=t.minContains??1,a=t.maxContains!==void 0?t.maxContains+1:Number.POSITIVE_INFINITY,s=0;for(let c of n)if(t.containsSchema.safeParse(c).success&&++s>=a)break;s<o&&i.issues.push({code:"custom",message:`Array must contain at least ${o} matching ${cS(o)}; found ${s}`,input:n,continue:!0}),t.maxContains!==void 0&&s>t.maxContains&&i.issues.push({code:"custom",message:`Array must contain at most ${t.maxContains} matching ${cS(t.maxContains)}`,input:n,continue:!0})}}}).pipe(e)}function lS(e,t){if(e!==!1)return e===void 0||e===!0?ae.any():mt(e,t)}var pR=/^(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d(?:\.\d+)?(?:Z|[+-](?:[01]\d|2[0-3]):[0-5]\d)$/;function uS(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ae.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 n=e.$ref;if(t.refs.has(n))return t.refs.get(n);if(t.processing.has(n))return ae.lazy(()=>{if(!t.refs.has(n))throw new Error(`Circular reference not resolved: ${n}`);return t.refs.get(n)});t.processing.add(n);let o=sR(n,t),a=mt(o,t);return t.refs.set(n,a),t.processing.delete(n),a}if(e.enum!==void 0){let n=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&n.length===1&&n[0]===null)return ae.null();if(n.length===0)return ae.never();if(n.length===1)return ae.literal(n[0]);if(n.every(a=>typeof a=="string"))return ae.enum(n);let o=n.map(a=>ae.literal(a));return o.length<2?o[0]:ae.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return ae.literal(e.const);let r=e.type;if(Array.isArray(r)){let n=r.map(o=>{let a={...e,type:o};return uS(a,t)});return n.length===0?ae.never():n.length===1?n[0]:ae.union(n)}if(!r)return ae.any();let i;switch(r){case"string":{let n=ae.string();if(e.format){let o=e.format;o==="email"?n=n.check(ae.email()):o==="uri"||o==="uri-reference"?n=n.check(ae.url()):o==="uuid"||o==="guid"?n=n.check(ae.uuid()):o==="date-time"?n=n.check(ae.iso.datetime({offset:!0})):o==="date"?n=n.check(ae.iso.date()):o==="time"?n=n.check(ae.regex(pR)):o==="duration"?n=n.check(ae.iso.duration()):o==="hostname"?n=n.check(ae.hostname()):o==="ipv4"?n=n.check(ae.ipv4()):o==="ipv6"?n=n.check(ae.ipv6()):o==="mac"?n=n.check(ae.mac()):o==="cidr"?n=n.check(ae.cidrv4()):o==="cidr-v6"?n=n.check(ae.cidrv6()):o==="base64"?n=n.check(ae.base64()):o==="base64url"?n=n.check(ae.base64url()):o==="e164"?n=n.check(ae.e164()):o==="credit_card"?n=n.check(ae.creditCard()):o==="iban"?n=n.check(ae.iban()):o==="jwt"?n=n.check(ae.jwt()):o==="emoji"?n=n.check(ae.emoji()):o==="nanoid"?n=n.check(ae.nanoid()):o==="cuid"?n=n.check(ae.cuid()):o==="cuid2"?n=n.check(ae.cuid2()):o==="ulid"?n=n.check(ae.ulid()):o==="xid"?n=n.check(ae.xid()):o==="ksuid"&&(n=n.check(ae.ksuid()))}typeof e.minLength=="number"&&(n=n.min(e.minLength)),typeof e.maxLength=="number"&&(n=n.max(e.maxLength)),e.pattern&&(n=n.regex(new RegExp(e.pattern))),i=n;break}case"number":case"integer":{let n=r==="integer"?ae.number().int():ae.number();typeof e.minimum=="number"&&e.exclusiveMinimum!==!0&&(n=n.min(e.minimum)),typeof e.maximum=="number"&&e.exclusiveMaximum!==!0&&(n=n.max(e.maximum)),typeof e.exclusiveMinimum=="number"?n=n.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(n=n.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?n=n.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(n=n.lt(e.maximum)),typeof e.multipleOf=="number"&&(n=n.multipleOf(e.multipleOf)),i=n;break}case"boolean":{i=ae.boolean();break}case"null":{i=ae.null();break}case"object":{let n={},o=e.properties||{},a=new Set(e.required||[]),s=typeof e.additionalProperties=="object"?mt(e.additionalProperties,t):void 0;for(let[d,f]of Object.entries(o)){let h=mt(f,t);tt(n,d,a.has(d)?h:h.optional())}if(e.patternProperties){let d=e.patternProperties,f=Object.keys(d),h=[];for(let b of f){let S=mt(d[b],t),y=ae.string().regex(new RegExp(b));h.push(ae.looseRecord(y,S))}let g=[];if(Object.keys(n).length>0&&g.push(ae.object(n).passthrough()),g.push(...h),g.length===0)i=ae.object({}).passthrough();else if(g.length===1)i=g[0];else{let b=ae.intersection(g[0],g[1]);for(let S=2;S<g.length;S++)b=ae.intersection(b,g[S]);i=b}if(e.additionalProperties===!1){let b=Object.keys(n),S=f.map(x=>new RegExp(x)),y=i;i=i.check(x=>{if(!Rt(x.value))return;let k=[];for(let I of Object.keys(x.value))b.includes(I)||S.some(O=>O.test(I))||k.push(I);k.length&&x.issues.push({code:"unrecognized_keys",keys:k,input:x.value,inst:y})})}}else{let d=ae.object(n);e.additionalProperties===!1?i=d.strict():s?i=d.catchall(s):i=d.passthrough()}let c=e.propertyNames!==void 0&&e.propertyNames!==!0,l=typeof e.minProperties=="number"?e.minProperties:void 0,u=typeof e.maxProperties=="number"?e.maxProperties:void 0;if(c||l!==void 0||u!==void 0){let d;if(c){let f=typeof e.propertyNames=="object"&&e.propertyNames.type===void 0?{type:"string",...e.propertyNames}:e.propertyNames;d=mt(f,t)}i=cR(i,{keySchema:d,minProperties:l,maxProperties:u})}break}case"array":{let n=e.prefixItems,o=e.items;if(n&&Array.isArray(n)){let a=typeof e.minItems=="number"?e.minItems:0,s=n.map(d=>mt(d,t)),c=sS(s,a),l=Array.isArray(o)?void 0:lS(o,t),u=ae.tuple(c);i=l?u.rest(l):u,typeof e.minItems=="number"&&(i=i.check(ae.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ae.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=typeof e.minItems=="number"?e.minItems:0,s=o.map(d=>mt(d,t)),c=sS(s,a),l=lS(e.additionalItems,t),u=ae.tuple(c);i=l?u.rest(l):u,typeof e.minItems=="number"&&(i=i.check(ae.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(ae.maxLength(e.maxItems)))}else if(o!==void 0){let a=mt(o,t),s=ae.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=ae.array(ae.any());(e.uniqueItems===!0||e.contains!==void 0)&&(i=dR(i,{uniqueItems:e.uniqueItems===!0,containsSchema:e.contains!==void 0?mt(e.contains,t):void 0,minContains:typeof e.minContains=="number"?e.minContains:void 0,maxContains:typeof e.maxContains=="number"?e.maxContains:void 0}));break}default:throw new Error(`Unsupported type: ${r}`)}return i}function mt(e,t){if(typeof e=="boolean")return e?ae.any():ae.never();let r=uS(e,t),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(l=>mt(l,t)),c=ae.union(s);r=i?ae.intersection(r,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(l=>mt(l,t)),c=ae.xor(s);r=i?ae.intersection(r,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)r=i?r:ae.any();else{let s=i?r:mt(e.allOf[0],t),c=i?0:1;for(let l=c;l<e.allOf.length;l++)s=ae.intersection(s,mt(e.allOf[l],t));r=s}e.nullable===!0&&t.version==="openapi-3.0"&&(r=ae.nullable(r)),e.readOnly===!0&&(r=ae.readonly(r)),e.default!==void 0&&(r=r.default(e.default));let n={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let s of o)s in e&&(n[s]=e[s]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let s of a)s in e&&(n[s]=e[s]);if(e.type==="object"&&e.$ref===void 0){e.propertyNames!==void 0&&!da(e.propertyNames)&&(n.propertyNames=e.propertyNames);for(let s of["minProperties","maxProperties"])e[s]!==void 0&&(n[s]=e[s])}if(e.type==="array"&&e.$ref===void 0){e.contains!==void 0&&!da(e.contains)&&(n.contains=e.contains);for(let s of["uniqueItems","minContains","maxContains"])e[s]!==void 0&&(n[s]=e[s])}for(let s of Object.keys(e))oR.has(s)||tt(n,s,e[s]);return Object.keys(n).length>0&&t.registry.add(r,n),e.description&&(r=r.describe(e.description)),r}function dS(e,t){if(typeof e=="boolean")return e?ae.any():ae.never();let r;try{r=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=iR(r,t?.defaultTarget),n=r.$defs||r.definitions||{},o={version:i,defs:n,refs:new Map,processing:new Set,rootSchema:r,registry:t?.registry??nt};return mt(r,o)}var pS=Symbol("z.visit/resolving");function pa(e,t){let r=typeof t=="function"?t:(a,s)=>{let c=t[a._zod.def.type];return c?c(a,s):a},i=new Map;function n(a){let s=i.get(a);if(s===pS)return new Fi({type:"lazy",getter:()=>i.get(a)});if(s!==void 0)return s;i.set(a,pS);let c=o(a),l=r(c,c!==a);return i.set(a,l),l}function o(a){let s=a._zod.def,c=s.type;switch(c){case"object":{let l=s.shape,u=Object.keys(l),d=!1,f={};for(let g of u){let b=n(l[g]);b!==l[g]&&(d=!0),f[g]=b}let h=s.catchall;return s.catchall&&(h=n(s.catchall),h!==s.catchall&&(d=!0)),d?Ne(a,{...s,shape:f,catchall:h}):a}case"array":{let l=n(s.element);return l===s.element?a:Ne(a,{...s,element:l})}case"tuple":{let l=s.items,u=!1,d=[];for(let h of l){let g=n(h);g!==h&&(u=!0),d.push(g)}let f=s.rest;return s.rest&&(f=n(s.rest),f!==s.rest&&(u=!0)),u?Ne(a,{...s,items:d,rest:f}):a}case"record":case"map":{let l=n(s.keyType),u=n(s.valueType);return l===s.keyType&&u===s.valueType?a:Ne(a,{...s,keyType:l,valueType:u})}case"set":{let l=n(s.valueType);return l===s.valueType?a:Ne(a,{...s,valueType:l})}case"union":{let l=s.options,u=!1,d=[];for(let f of l){let h=n(f);h!==f&&(u=!0),d.push(h)}return u?Ne(a,{...s,options:d}):a}case"intersection":{let l=n(s.left),u=n(s.right);return l===s.left&&u===s.right?a:Ne(a,{...s,left:l,right:u})}case"optional":case"nullable":case"default":case"prefault":case"catch":case"readonly":case"nonoptional":case"promise":case"success":{let l=n(s.innerType);return l===s.innerType?a:Ne(a,{...s,innerType:l})}case"pipe":{let l=n(s.in),u=n(s.out);return l===s.in&&u===s.out?a:Ne(a,{...s,in:l,out:u})}case"function":{let l=n(s.input),u=n(s.output);return l===s.input&&u===s.output?a:Ne(a,{...s,input:l,output:u})}case"lazy":{let l=s.getter,{_cachedInner:u,...d}=s;return Ne(a,{...d,getter:()=>n(l())})}case"template_literal":case"string":case"number":case"int":case"boolean":case"bigint":case"symbol":case"undefined":case"null":case"void":case"never":case"any":case"unknown":case"date":case"nan":case"enum":case"literal":case"file":case"transform":case"custom":return a;default:return a}}return n(e)}function mS(e){return pa(e,{object:t=>t.partial(),union:t=>{let r=t._zod.def;return r.discriminator===void 0?t:ie(r.options)}})}function mR(e,t){if(!t?.length)return e;let r=e._zod.def;return Ne(e,Ot(r,{checks:[...r.checks??[],...t]}),{parent:!0})}function fS(e){return mR(e.out,e.checks)}function fR(e){return e.in._zod.traits.has("$ZodTransform")?fS(e):e.in}function hS(e){return pa(e,{pipe:t=>fR(t._zod.def),default:(t,r)=>r?ce(t._zod.def.innerType):t,catch:(t,r)=>r?t._zod.def.innerType:t})}function gS(e){return pa(e,{pipe:t=>fS(t._zod.def),prefault:(t,r)=>r?t._zod.def.innerType:t})}var ma={};Kt(ma,{bigint:()=>yR,boolean:()=>vR,date:()=>bR,number:()=>gR,string:()=>hR});function hR(e){return If(ho,e)}function gR(e){return Nf(vo,e)}function vR(e){return Df(yo,e)}function yR(e){return Vf(bo,e)}function bR(e){return eh(oa,e)}var fr="2025-11-25";var bl=[fr,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],_l="io.modelcontextprotocol/related-task",rn="io.modelcontextprotocol/protocolVersion",So="io.modelcontextprotocol/clientInfo",Zt="io.modelcontextprotocol/serverInfo",on="io.modelcontextprotocol/clientCapabilities",hr="io.modelcontextprotocol/subscriptionId",En="io.modelcontextprotocol/logLevel";var gr="2.0";var zn=In(()=>ie([p(),W(),oe(),Ht(),re(p(),zn),j(zn)])),Ze=re(p(),zn),ev=j(zn),fa=ie([p(),W().int()]),ha=p(),Sl=E({ttl:W().optional()}),kl=E({taskId:p()}),ga=me({progressToken:fa.optional(),[_l]:kl.optional()}),Ye=E({_meta:ga.optional()}),vr=Ye.extend({task:Sl.optional()}),Ge=E({method:p(),params:Ye.loose().optional()}),at=E({_meta:ga.optional()}),st=E({method:p(),params:at.loose().optional()}),va=me({get[Zt](){return $o.optional().catch(void 0)}}),Je=me({_meta:va.optional()}),Cn=ie([p(),W().int()]),ya=E({jsonrpc:q(gr),id:Cn,...Ge.shape}).strict(),ba=E({jsonrpc:q(gr),...st.shape}).strict(),ko=E({jsonrpc:q(gr),id:Cn,result:Je}).strict(),wo=E({jsonrpc:q(gr),id:Cn.optional(),error:E({code:W().int(),message:p(),data:le().optional()})}).strict(),_a=ie([ya,ba,ko,wo]),tv=ie([ko,wo]),Sa=Je.strict(),wl=at.extend({requestId:Cn.optional(),reason:p().optional()}),ka=st.extend({method:q("notifications/cancelled"),params:wl}),$l=E({src:p(),mimeType:p().optional(),sizes:j(p()).optional(),theme:he(["light","dark"]).optional()}),Pn=E({icons:j($l).optional()}),nn=E({name:p(),title:p().optional()}),$o=nn.extend({...nn.shape,...Pn.shape,version:p(),websiteUrl:p().optional(),description:p().optional()}),_R=At(E({applyDefaults:oe().optional()}),Ze),SR=tn(e=>e&&typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,At(E({form:_R.optional(),url:Ze.optional()}),Ze.optional())),xl=me({list:Ze.optional(),cancel:Ze.optional(),requests:me({sampling:me({createMessage:Ze.optional()}).optional(),elicitation:me({create:Ze.optional()}).optional()}).optional()}),Tl=me({list:Ze.optional(),cancel:Ze.optional(),requests:me({tools:me({call:Ze.optional()}).optional()}).optional()}),Rl=E({experimental:re(p(),Ze).optional(),sampling:E({context:Ze.optional(),tools:Ze.optional()}).optional(),elicitation:SR.optional(),roots:E({listChanged:oe().optional()}).optional(),tasks:xl.optional(),extensions:re(p(),Ze).optional()}),Il=Ye.extend({protocolVersion:p(),capabilities:Rl,clientInfo:$o}),zl=Ge.extend({method:q("initialize"),params:Il}),wa=E({experimental:re(p(),Ze).optional(),logging:Ze.optional(),completions:Ze.optional(),prompts:E({listChanged:oe().optional()}).optional(),resources:E({subscribe:oe().optional(),listChanged:oe().optional()}).optional(),tools:E({listChanged:oe().optional()}).optional(),tasks:Tl.optional(),extensions:re(p(),Ze).optional()}),El=Je.extend({protocolVersion:p(),capabilities:wa,serverInfo:$o,instructions:p().optional()}),Cl=st.extend({method:q("notifications/initialized"),params:at.optional()}),Pl=Ge.extend({method:q("server/discover"),params:Ye.optional()}),Ol=Je.extend({supportedVersions:j(p()),capabilities:wa,instructions:p().optional()}),$a=Ge.extend({method:q("ping"),params:Ye.optional()}),Nl=E({progress:W(),total:ce(W()),message:ce(p())}),Ul=E({...at.shape,...Nl.shape,progressToken:fa}),xa=st.extend({method:q("notifications/progress"),params:Ul}),Al=Ye.extend({cursor:ha.optional()}),On=Ge.extend({params:Al.optional()}),Nn=Je.extend({nextCursor:ha.optional()}),Ta=E({uri:p(),mimeType:ce(p()),_meta:re(p(),le()).optional()}),Ra=Ta.extend({text:p()}),nv=p().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),Ia=Ta.extend({blob:nv}),Un=he(["user","assistant"]),an=E({audience:j(Un).optional(),priority:W().min(0).max(1).optional(),lastModified:Et.datetime({offset:!0}).optional()}),za=E({...nn.shape,...Pn.shape,uri:p(),description:ce(p()),mimeType:ce(p()),size:ce(W()),annotations:an.optional(),_meta:ce(me({}))}),jl=E({...nn.shape,...Pn.shape,uriTemplate:p(),description:ce(p()),mimeType:ce(p()),annotations:an.optional(),_meta:ce(me({}))}),Ml=On.extend({method:q("resources/list")}),ql=Nn.extend({resources:j(za)}),Ll=On.extend({method:q("resources/templates/list")}),Dl=Nn.extend({resourceTemplates:j(jl)}),xo=Ye.extend({uri:p()}),Fl=xo,Vl=Ge.extend({method:q("resources/read"),params:Fl}),Hl=Je.extend({contents:j(ie([Ra,Ia]))}),Zl=st.extend({method:q("notifications/resources/list_changed"),params:at.optional()}),Gl=xo,Jl=Ge.extend({method:q("resources/subscribe"),params:Gl}),Bl=xo,Kl=Ge.extend({method:q("resources/unsubscribe"),params:Bl}),Ea=E({toolsListChanged:oe().optional(),promptsListChanged:oe().optional(),resourcesListChanged:oe().optional(),resourceSubscriptions:j(p()).optional()}),Wl=Ye.extend({notifications:Ea}),Ql=Ge.extend({method:q("subscriptions/listen"),params:Wl}),Xl=at.extend({notifications:Ea}),Yl=st.extend({method:q("notifications/subscriptions/acknowledged"),params:Xl}),eu=va.extend({[hr]:Cn}),tu=Je.extend({_meta:eu}),nu=at.extend({uri:p()}),ru=st.extend({method:q("notifications/resources/updated"),params:nu}),ou=E({name:p(),description:ce(p()),required:ce(oe())}),iu=E({...nn.shape,...Pn.shape,description:ce(p()),arguments:ce(j(ou)),_meta:ce(me({}))}),au=On.extend({method:q("prompts/list")}),su=Nn.extend({prompts:j(iu)}),cu=Ye.extend({name:p(),arguments:re(p(),p()).optional()}),lu=Ge.extend({method:q("prompts/get"),params:cu}),To=E({type:q("text"),text:p(),annotations:an.optional(),_meta:re(p(),le()).optional()}),Ro=E({type:q("image"),data:nv,mimeType:p(),annotations:an.optional(),_meta:re(p(),le()).optional()}),Io=E({type:q("audio"),data:nv,mimeType:p(),annotations:an.optional(),_meta:re(p(),le()).optional()}),uu=E({type:q("tool_use"),name:p(),id:p(),input:re(p(),le()),_meta:re(p(),le()).optional()}),du=E({type:q("resource"),resource:ie([Ra,Ia]),annotations:an.optional(),_meta:re(p(),le()).optional()}),pu=za.extend({type:q("resource_link")}),zo=ie([To,Ro,Io,pu,du]),mu=E({role:Un,content:zo}),fu=Je.extend({description:p().optional(),messages:j(mu)}),hu=st.extend({method:q("notifications/prompts/list_changed"),params:at.optional()}),gu=E({title:p().optional(),readOnlyHint:oe().optional(),destructiveHint:oe().optional(),idempotentHint:oe().optional(),openWorldHint:oe().optional()}),vu=E({taskSupport:he(["required","optional","forbidden"]).optional()}),Ca=E({...nn.shape,...Pn.shape,description:p().optional(),inputSchema:E({type:q("object"),properties:re(p(),zn).optional(),required:j(p()).optional()}).catchall(le()),outputSchema:me({$schema:p().optional()}).optional(),annotations:gu.optional(),execution:vu.optional(),_meta:re(p(),le()).optional()}),yu=On.extend({method:q("tools/list")}),bu=Nn.extend({tools:j(Ca)}),Pa=Je.extend({content:j(zo).default([]),structuredContent:le().optional(),isError:oe().optional()}),rv=Pa.or(Je.extend({toolResult:le()})),_u=vr.extend({name:p(),arguments:re(p(),le()).optional()}),Su=Ge.extend({method:q("tools/call"),params:_u}),ku=st.extend({method:q("notifications/tools/list_changed"),params:at.optional()}),ov=E({autoRefresh:oe().default(!0),debounceMs:W().int().nonnegative().default(300)}),An=he(["debug","info","notice","warning","error","critical","alert","emergency"]),wu=Ye.extend({level:An}),$u=Ge.extend({method:q("logging/setLevel"),params:wu}),xu=at.extend({level:An,logger:p().optional(),data:le()}),Tu=st.extend({method:q("notifications/message"),params:xu}),Ru=E({name:p().optional()}),Iu=E({hints:j(Ru).optional(),costPriority:W().min(0).max(1).optional(),speedPriority:W().min(0).max(1).optional(),intelligencePriority:W().min(0).max(1).optional()}),zu=E({mode:he(["auto","required","none"]).optional()}),Eu=E({type:q("tool_result"),toolUseId:p().describe("The unique identifier for the corresponding tool call."),content:j(zo),structuredContent:le().optional(),isError:oe().optional(),_meta:re(p(),le()).optional()}),Cu=Rn("type",[To,Ro,Io]),mr=Rn("type",[To,Ro,Io,uu,Eu]),Pu=E({role:Un,content:ie([mr,j(mr)]),_meta:re(p(),le()).optional()}),Ou=vr.extend({messages:j(Pu),modelPreferences:Iu.optional(),systemPrompt:p().optional(),includeContext:he(["none","thisServer","allServers"]).optional(),temperature:W().optional(),maxTokens:W().int(),stopSequences:j(p()).optional(),metadata:Ze.optional(),tools:j(Ca).optional(),toolChoice:zu.optional()}),Nu=Ge.extend({method:q("sampling/createMessage"),params:Ou}),Uu=Je.extend({model:p(),stopReason:ce(he(["endTurn","stopSequence","maxTokens"]).or(p())),role:Un,content:Cu}),Au=Je.extend({model:p(),stopReason:ce(he(["endTurn","stopSequence","maxTokens","toolUse"]).or(p())),role:Un,content:ie([mr,j(mr)])}),Oa=E({type:q("boolean"),title:p().optional(),description:p().optional(),default:oe().optional()}),Eo=E({type:q("string"),title:p().optional(),description:p().optional(),minLength:W().optional(),maxLength:W().optional(),format:he(["email","uri","date","date-time"]).optional(),default:p().optional()}),Co=E({type:he(["number","integer"]),title:p().optional(),description:p().optional(),minimum:W().optional(),maximum:W().optional(),default:W().optional()}),Na=E({type:q("string"),title:p().optional(),description:p().optional(),enum:j(p()),default:p().optional()}),Ua=E({type:q("string"),title:p().optional(),description:p().optional(),oneOf:j(E({const:p(),title:p()})),default:p().optional()}),Aa=E({type:q("string"),title:p().optional(),description:p().optional(),enum:j(p()),enumNames:j(p()).optional(),default:p().optional()}),ju=ie([Na,Ua]),ja=E({type:q("array"),title:p().optional(),description:p().optional(),minItems:W().optional(),maxItems:W().optional(),items:E({type:q("string"),enum:j(p())}),default:j(p()).optional()}),Ma=E({type:q("array"),title:p().optional(),description:p().optional(),minItems:W().optional(),maxItems:W().optional(),items:E({anyOf:j(E({const:p(),title:p()}))}),default:j(p()).optional()}),Mu=ie([ja,Ma]),qu=ie([Aa,ju,Mu]),qa=ie([qu,Oa,Eo,Co]),Po=vr.extend({mode:q("form").optional(),message:p(),requestedSchema:E({type:q("object"),properties:re(p(),qa),required:j(p()).optional()}).catchall(le())}),Lu=vr.extend({mode:q("url"),message:p(),elicitationId:p(),url:p().url()}),Du=ie([Po,Lu]),Fu=Ge.extend({method:q("elicitation/create"),params:Du}),Vu=at.extend({elicitationId:p()}),Hu=st.extend({method:q("notifications/elicitation/complete"),params:Vu}),Zu=Je.extend({action:he(["accept","decline","cancel"]),content:tn(e=>e===null?void 0:e,re(p(),ie([p(),W(),oe(),j(p())])).optional())}),Gu=E({type:q("ref/resource"),uri:p()}),Ju=E({type:q("ref/prompt"),name:p()}),Bu=Ye.extend({ref:ie([Ju,Gu]),argument:E({name:p(),value:p()}),context:E({arguments:re(p(),p()).optional()}).optional()}),Ku=Ge.extend({method:q("completion/complete"),params:Bu}),Wu=Je.extend({completion:me({values:j(p()).max(100),total:ce(W().int()),hasMore:ce(oe())})}),Qu=E({uri:p().startsWith("file://"),name:p().optional(),_meta:re(p(),le()).optional()}),Xu=Ge.extend({method:q("roots/list"),params:Ye.optional()}),Yu=Je.extend({roots:j(Qu)}),ed=st.extend({method:q("notifications/roots/list_changed"),params:at.optional()}),iv=me({ttl:W().optional(),pollInterval:W().optional()}),td=he(["working","input_required","completed","failed","cancelled"]),jn=E({taskId:p(),status:td,ttl:ie([W(),Ht()]),createdAt:p(),lastUpdatedAt:p(),pollInterval:ce(W()),statusMessage:ce(p())}),av=Je.extend({task:jn}),nd=at.merge(jn),sv=st.extend({method:q("notifications/tasks/status"),params:nd}),cv=Ge.extend({method:q("tasks/get"),params:Ye.extend({taskId:p()})}),lv=Je.merge(jn),uv=Ge.extend({method:q("tasks/result"),params:Ye.extend({taskId:p()})}),dv=Je.loose(),pv=On.extend({method:q("tasks/list")}),mv=Nn.extend({tasks:j(jn)}),fv=Ge.extend({method:q("tasks/cancel"),params:Ye.extend({taskId:p()})}),hv=Je.merge(jn),gv=ie([$a,zl,Pl,Ku,$u,lu,au,Ml,Ll,Vl,Jl,Kl,Ql,Su,yu]),vv=ie([ka,xa,Cl,ed]),yv=ie([Sa,Uu,Au,Zu,Yu]),bv=ie([$a,Nu,Fu,Xu]),_v=ie([ka,xa,Tu,ru,Zl,ku,hu,Yl,Hu]),Sv=ie([Sa,El,Ol,Wu,fu,su,ql,Dl,Hl,Pa,bu,tu]);var et=go().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Xg.custom,message:"URL must be parseable",fatal:!0}),xi}).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"}),wv=me({resource:p().url(),authorization_servers:j(et).optional(),jwks_uri:p().url().optional(),scopes_supported:j(p()).optional(),bearer_methods_supported:j(p()).optional(),resource_signing_alg_values_supported:j(p()).optional(),resource_name:p().optional(),resource_documentation:p().optional(),resource_policy_uri:p().url().optional(),resource_tos_uri:p().url().optional(),tls_client_certificate_bound_access_tokens:oe().optional(),authorization_details_types_supported:j(p()).optional(),dpop_signing_alg_values_supported:j(p()).optional(),dpop_bound_access_tokens_required:oe().optional()}),rd=me({issuer:p(),authorization_endpoint:et,token_endpoint:et,registration_endpoint:et.optional(),scopes_supported:j(p()).optional(),response_types_supported:j(p()),response_modes_supported:j(p()).optional(),grant_types_supported:j(p()).optional(),token_endpoint_auth_methods_supported:j(p()).optional(),token_endpoint_auth_signing_alg_values_supported:j(p()).optional(),service_documentation:et.optional(),revocation_endpoint:et.optional(),revocation_endpoint_auth_methods_supported:j(p()).optional(),revocation_endpoint_auth_signing_alg_values_supported:j(p()).optional(),introspection_endpoint:p().optional(),introspection_endpoint_auth_methods_supported:j(p()).optional(),introspection_endpoint_auth_signing_alg_values_supported:j(p()).optional(),code_challenge_methods_supported:j(p()).optional(),client_id_metadata_document_supported:oe().optional(),authorization_response_iss_parameter_supported:oe().optional().catch(void 0),dpop_signing_alg_values_supported:j(p()).optional()}),od=me({issuer:p(),authorization_endpoint:et,token_endpoint:et,userinfo_endpoint:et.optional(),jwks_uri:et,registration_endpoint:et.optional(),scopes_supported:j(p()).optional(),response_types_supported:j(p()),response_modes_supported:j(p()).optional(),grant_types_supported:j(p()).optional(),acr_values_supported:j(p()).optional(),subject_types_supported:j(p()),id_token_signing_alg_values_supported:j(p()),id_token_encryption_alg_values_supported:j(p()).optional(),id_token_encryption_enc_values_supported:j(p()).optional(),userinfo_signing_alg_values_supported:j(p()).optional(),userinfo_encryption_alg_values_supported:j(p()).optional(),userinfo_encryption_enc_values_supported:j(p()).optional(),request_object_signing_alg_values_supported:j(p()).optional(),request_object_encryption_alg_values_supported:j(p()).optional(),request_object_encryption_enc_values_supported:j(p()).optional(),token_endpoint_auth_methods_supported:j(p()).optional(),token_endpoint_auth_signing_alg_values_supported:j(p()).optional(),display_values_supported:j(p()).optional(),claim_types_supported:j(p()).optional(),claims_supported:j(p()).optional(),service_documentation:p().optional(),claims_locales_supported:j(p()).optional(),ui_locales_supported:j(p()).optional(),claims_parameter_supported:oe().optional(),request_parameter_supported:oe().optional(),request_uri_parameter_supported:oe().optional(),require_request_uri_registration:oe().optional(),op_policy_uri:et.optional(),op_tos_uri:et.optional(),client_id_metadata_document_supported:oe().optional(),authorization_response_iss_parameter_supported:oe().optional().catch(void 0)}),$v=E({...od.shape,...rd.pick({code_challenge_methods_supported:!0}).shape}),xv=E({access_token:p(),id_token:p().optional(),token_type:p(),expires_in:ma.number().optional(),scope:p().optional(),refresh_token:p().optional(),issuer:p().optional().catch(void 0)}).strip(),Tv=E({issued_token_type:q("urn:ietf:params:oauth:token-type:id-jag"),access_token:p(),token_type:p().optional(),expires_in:W().optional(),scope:p().optional()}).strip(),Rv=E({error:p(),error_description:p().optional(),error_uri:p().optional()}),kv=et.optional().or(q("").transform(()=>{})),id=E({redirect_uris:j(et),token_endpoint_auth_method:p().optional(),grant_types:j(p()).optional(),response_types:j(p()).optional(),application_type:p().optional(),client_name:p().optional(),client_uri:et.optional(),logo_uri:kv,scope:p().optional(),contacts:j(p()).optional(),tos_uri:kv,policy_uri:p().optional(),jwks_uri:et.optional(),jwks:fl().optional(),software_id:p().optional(),software_version:p().optional(),software_statement:p().optional()}).strip(),ad=E({client_id:p(),client_secret:p().optional(),client_id_issued_at:W().optional(),client_secret_expires_at:W().optional(),issuer:p().optional().catch(void 0)}).strip(),Iv=id.merge(ad),zv=E({error:p(),error_description:p().optional()}).strip(),Ev=E({token:p(),token_type_hint:p().optional()}).strip();var Nv=Symbol.for("mcp.sdk.errorBrands");function Mv(e,t){let r=new Set,i=t;for(;typeof i=="function";){let n=i.mcpBrand;Object.prototype.hasOwnProperty.call(i,"mcpBrand")&&typeof n=="string"&&r.add(n),i=Object.getPrototypeOf(i)}r.size!==0&&Object.defineProperty(e,Nv,{value:r,enumerable:!1,configurable:!0})}function No(e,t){try{if(typeof t=="object"&&t!==null&&Object.prototype.hasOwnProperty.call(e,"mcpBrand")&&typeof e.mcpBrand=="string"&&Object.prototype.hasOwnProperty.call(t,Nv)){let r=t[Nv];if(r&&typeof r.has=="function"&&r.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}var LS=class DS extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.OAuthError"})}static[Symbol.hasInstance](t){return No(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 No(this,t)}constructor(t,r,i){super(r),this.code=t,this.errorUri=i,this.name="OAuthError",Mv(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 DS(t.error,t.error_description??t.error,t.error_uri)}},ke=(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 No(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 No(this,e)}constructor(e,t,r,i){super(t,i),this.code=e,this.data=r,this.name="SdkError",Mv(this,new.target)}},kR=class extends ve{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.SdkHttpError"})}constructor(e,t,r,i){super(e,t,r,i),this.name="SdkHttpError"}get status(){return this.data.status}get statusText(){return this.data.statusText}};function RS(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function wR(e,t,r){return e==="elicitation"&&t==="form"&&r.form===void 0&&r.url===void 0}function FS(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 fd(e,t){let r={};for(let[i,n]of Object.entries(e)){if(n===void 0)continue;let o=t===void 0?void 0:t[i];if(o===void 0){r[i]=n;continue}if(RS(n)&&RS(o)){let a={};for(let[s,c]of Object.entries(n))c!==void 0&&o[s]===void 0&&!wR(i,s,o)&&(a[s]=c);Object.keys(a).length>0&&(r[i]=a)}}return Object.keys(r).length>0?r:void 0}var VS="2026-07-28",Gt=[VS];function Ao(e){return e>=VS}function HS(e){return e.filter(t=>!Ao(t))}function hd(e){return e.filter(t=>Ao(t))}function ZS(e){let t=e.structuredContent;return t===void 0||!(typeof t!="object"||t===null||Array.isArray(t))||(e.content?.some(r=>r.type==="text")??!1)?e:{...e,content:[...e.content??[],{type:"text",text:JSON.stringify(t)}]}}var GS=["task","inputRequests","requestState"];function qv(e){return e===null||typeof e!="object"||Array.isArray(e)||e.content!==void 0||GS.some(t=>t in e)?e:{...e,content:[]}}function $R(){let e=In(()=>ie([p(),W(),oe(),Ht(),re(p(),e),j(e)])),t=re(p(),e),r=ie([p(),W().int()]),i=p(),n=E({ttl:W().optional()}),o=E({taskId:p()}),a=me({progressToken:r.optional(),"io.modelcontextprotocol/related-task":o.optional()}),s=E({_meta:a.optional()}),c=s.extend({task:n.optional()}),l=E({method:p(),params:s.loose().optional()}),u=E({_meta:a.optional()}),d=E({method:p(),params:u.loose().optional()}),f=me({_meta:a.optional()}),h=ie([p(),W().int()]),g=f.strict(),b=u.extend({requestId:h.optional(),reason:p().optional()}),S=d.extend({method:q("notifications/cancelled"),params:b}),y=E({src:p(),mimeType:p().optional(),sizes:j(p()).optional(),theme:he(["light","dark"]).optional()}),x=E({icons:j(y).optional()}),k=E({name:p(),title:p().optional()}),I=k.extend({...k.shape,...x.shape,version:p(),websiteUrl:p().optional(),description:p().optional()}),O=At(E({applyDefaults:oe().optional()}),t),T=tn(ot=>ot&&typeof ot=="object"&&!Array.isArray(ot)&&Object.keys(ot).length===0?{form:{}}:ot,At(E({form:O.optional(),url:t.optional()}),t.optional())),_=me({list:t.optional(),cancel:t.optional(),requests:me({sampling:me({createMessage:t.optional()}).optional(),elicitation:me({create:t.optional()}).optional()}).optional()}),R=me({list:t.optional(),cancel:t.optional(),requests:me({tools:me({call:t.optional()}).optional()}).optional()}),A=E({experimental:re(p(),t).optional(),sampling:E({context:t.optional(),tools:t.optional()}).optional(),elicitation:T.optional(),roots:E({listChanged:oe().optional()}).optional(),tasks:_.optional(),extensions:re(p(),t).optional()}),F=s.extend({protocolVersion:p(),capabilities:A,clientInfo:I}),M=l.extend({method:q("initialize"),params:F}),V=E({experimental:re(p(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:E({listChanged:oe().optional()}).optional(),resources:E({subscribe:oe().optional(),listChanged:oe().optional()}).optional(),tools:E({listChanged:oe().optional()}).optional(),tasks:R.optional(),extensions:re(p(),t).optional()}),te=f.extend({protocolVersion:p(),capabilities:V,serverInfo:I,instructions:p().optional()}),ne=d.extend({method:q("notifications/initialized"),params:u.optional()}),ye=l.extend({method:q("ping"),params:s.optional()}),Ce=E({progress:W(),total:ce(W()),message:ce(p())}),Ee=E({...u.shape,...Ce.shape,progressToken:r}),qe=d.extend({method:q("notifications/progress"),params:Ee}),we=s.extend({cursor:i.optional()}),P=l.extend({params:we.optional()}),L=f.extend({nextCursor:i.optional()}),w=E({uri:p(),mimeType:ce(p()),_meta:re(p(),le()).optional()}),m=w.extend({text:p()}),v=p().refine(ot=>{try{return atob(ot),!0}catch{return!1}},{message:"Invalid Base64 string"}),$=w.extend({blob:v}),C=he(["user","assistant"]),J=E({audience:j(C).optional(),priority:W().min(0).max(1).optional(),lastModified:Et.datetime({offset:!0}).optional()}),Y=E({...k.shape,...x.shape,uri:p(),description:ce(p()),mimeType:ce(p()),size:ce(W()),annotations:J.optional(),_meta:ce(me({}))}),X=E({...k.shape,...x.shape,uriTemplate:p(),description:ce(p()),mimeType:ce(p()),annotations:J.optional(),_meta:ce(me({}))}),_e=P.extend({method:q("resources/list")}),Pe=L.extend({resources:j(Y)}),z=P.extend({method:q("resources/templates/list")}),D=L.extend({resourceTemplates:j(X)}),B=s.extend({uri:p()}),se=B,ue=l.extend({method:q("resources/read"),params:se}),pe=f.extend({contents:j(ie([m,$]))}),Re=d.extend({method:q("notifications/resources/list_changed"),params:u.optional()}),Fe=B,Oe=l.extend({method:q("resources/subscribe"),params:Fe}),Ve=B,Le=l.extend({method:q("resources/unsubscribe"),params:Ve}),xt=u.extend({uri:p()}),Qe=d.extend({method:q("notifications/resources/updated"),params:xt}),Jt=E({name:p(),description:ce(p()),required:ce(oe())}),Ct=E({...k.shape,...x.shape,description:ce(p()),arguments:ce(j(Jt)),_meta:ce(me({}))}),Bt=P.extend({method:q("prompts/list")}),ln=L.extend({prompts:j(Ct)}),un=s.extend({name:p(),arguments:re(p(),p()).optional()}),Ln=l.extend({method:q("prompts/get"),params:un}),Dn=E({type:q("text"),text:p(),annotations:J.optional(),_meta:re(p(),le()).optional()}),Fn=E({type:q("image"),data:v,mimeType:p(),annotations:J.optional(),_meta:re(p(),le()).optional()}),Vn=E({type:q("audio"),data:v,mimeType:p(),annotations:J.optional(),_meta:re(p(),le()).optional()}),Lo=E({type:q("tool_use"),name:p(),id:p(),input:re(p(),le()),_meta:re(p(),le()).optional()}),dn=E({type:q("resource"),resource:ie([m,$]),annotations:J.optional(),_meta:re(p(),le()).optional()}),Do=Y.extend({type:q("resource_link")}),Tt=ie([Dn,Fn,Vn,Do,dn]),wr=E({role:C,content:Tt}),$r=f.extend({description:p().optional(),messages:j(wr)}),Hn=d.extend({method:q("notifications/prompts/list_changed"),params:u.optional()}),Fo=E({title:p().optional(),readOnlyHint:oe().optional(),destructiveHint:oe().optional(),idempotentHint:oe().optional(),openWorldHint:oe().optional()}),xr=E({taskSupport:he(["required","optional","forbidden"]).optional()}),Zn=E({...k.shape,...x.shape,description:p().optional(),inputSchema:E({type:q("object"),properties:re(p(),e).optional(),required:j(p()).optional()}).catchall(le()),outputSchema:E({type:q("object"),properties:re(p(),e).optional(),required:j(p()).optional()}).catchall(le()).optional(),annotations:Fo.optional(),execution:xr.optional(),_meta:re(p(),le()).optional()}),Tr=P.extend({method:q("tools/list")}),Rr=L.extend({tools:j(Zn)}),Ir=f.extend({content:j(Tt),structuredContent:re(p(),le()).optional(),isError:oe().optional()}),rt=c.extend({name:p(),arguments:re(p(),le()).optional()}),Vo=l.extend({method:q("tools/call"),params:rt}),Wa=d.extend({method:q("notifications/tools/list_changed"),params:u.optional()}),zr=he(["debug","info","notice","warning","error","critical","alert","emergency"]),Ho=s.extend({level:zr}),Zo=l.extend({method:q("logging/setLevel"),params:Ho}),Go=u.extend({level:zr,logger:p().optional(),data:le()}),Jo=d.extend({method:q("notifications/message"),params:Go}),Bo=E({name:p().optional()}),Ko=E({hints:j(Bo).optional(),costPriority:W().min(0).max(1).optional(),speedPriority:W().min(0).max(1).optional(),intelligencePriority:W().min(0).max(1).optional()}),Wo=E({mode:he(["auto","required","none"]).optional()}),Qa=E({type:q("tool_result"),toolUseId:p().describe("The unique identifier for the corresponding tool call."),content:j(Tt),structuredContent:E({}).loose().optional(),isError:oe().optional(),_meta:re(p(),le()).optional()}),Qo=Rn("type",[Dn,Fn,Vn]),pn=Rn("type",[Dn,Fn,Vn,Lo,Qa]),Xo=E({role:C,content:ie([pn,j(pn)]),_meta:re(p(),le()).optional()}),Yo=c.extend({messages:j(Xo),modelPreferences:Ko.optional(),systemPrompt:p().optional(),includeContext:he(["none","thisServer","allServers"]).optional(),temperature:W().optional(),maxTokens:W().int(),stopSequences:j(p()).optional(),metadata:t.optional(),tools:j(Zn).optional(),toolChoice:Wo.optional()}),ei=l.extend({method:q("sampling/createMessage"),params:Yo}),ti=f.extend({model:p(),stopReason:ce(he(["endTurn","stopSequence","maxTokens"]).or(p())),role:C,content:Qo}),ni=f.extend({model:p(),stopReason:ce(he(["endTurn","stopSequence","maxTokens","toolUse"]).or(p())),role:C,content:ie([pn,j(pn)])}),ri=E({type:q("boolean"),title:p().optional(),description:p().optional(),default:oe().optional()}),oi=E({type:q("string"),title:p().optional(),description:p().optional(),minLength:W().optional(),maxLength:W().optional(),format:he(["email","uri","date","date-time"]).optional(),default:p().optional()}),ii=E({type:he(["number","integer"]),title:p().optional(),description:p().optional(),minimum:W().optional(),maximum:W().optional(),default:W().optional()}),ai=E({type:q("string"),title:p().optional(),description:p().optional(),enum:j(p()),default:p().optional()}),si=E({type:q("string"),title:p().optional(),description:p().optional(),oneOf:j(E({const:p(),title:p()})),default:p().optional()}),ci=E({type:q("string"),title:p().optional(),description:p().optional(),enum:j(p()),enumNames:j(p()).optional(),default:p().optional()}),li=ie([ai,si]),Gn=E({type:q("array"),title:p().optional(),description:p().optional(),minItems:W().optional(),maxItems:W().optional(),items:E({type:q("string"),enum:j(p())}),default:j(p()).optional()}),Jn=E({type:q("array"),title:p().optional(),description:p().optional(),minItems:W().optional(),maxItems:W().optional(),items:E({anyOf:j(E({const:p(),title:p()}))}),default:j(p()).optional()}),Xa=ie([Gn,Jn]),Ya=ie([ci,li,Xa]),St=ie([Ya,ri,oi,ii]),kt=c.extend({mode:q("form").optional(),message:p(),requestedSchema:E({type:q("object"),properties:re(p(),St),required:j(p()).optional()}).catchall(le())}),ui=c.extend({mode:q("url"),message:p(),elicitationId:p(),url:p().url()}),Pt=ie([kt,ui]),es=l.extend({method:q("elicitation/create"),params:Pt}),ts=u.extend({elicitationId:p()}),ns=d.extend({method:q("notifications/elicitation/complete"),params:ts}),rs=f.extend({action:he(["accept","decline","cancel"]),content:tn(ot=>ot===null?void 0:ot,re(p(),ie([p(),W(),oe(),j(p())])).optional())}),os=E({type:q("ref/resource"),uri:p()}),is=E({type:q("ref/prompt"),name:p()}),as=s.extend({ref:ie([is,os]),argument:E({name:p(),value:p()}),context:E({arguments:re(p(),p()).optional()}).optional()}),di=l.extend({method:q("completion/complete"),params:as}),ss=f.extend({completion:me({values:j(p()).max(100),total:ce(W().int()),hasMore:ce(oe())})}),cs=E({uri:p().startsWith("file://"),name:p().optional(),_meta:re(p(),le()).optional()}),Er=l.extend({method:q("roots/list"),params:s.optional()}),pi=f.extend({roots:j(cs)}),ls=d.extend({method:q("notifications/roots/list_changed"),params:u.optional()}),us=me({ttl:W().optional(),pollInterval:W().optional()}),mi=he(["working","input_required","completed","failed","cancelled"]),mn=E({taskId:p(),status:mi,ttl:ie([W(),Ht()]),createdAt:p(),lastUpdatedAt:p(),pollInterval:ce(W()),statusMessage:ce(p())}),ft=f.extend({task:mn}),ds=u.merge(mn),Bn=d.extend({method:q("notifications/tasks/status"),params:ds}),Cr=l.extend({method:q("tasks/get"),params:s.extend({taskId:p()})}),Pr=f.merge(mn),Or=l.extend({method:q("tasks/result"),params:s.extend({taskId:p()})}),Od=f.loose(),ct=P.extend({method:q("tasks/list")}),Be=L.extend({tasks:j(mn)}),Kn=l.extend({method:q("tasks/cancel"),params:s.extend({taskId:p()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,TaskMetadataSchema:n,RelatedTaskMetadataSchema:o,RequestMetaSchema:a,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:h,EmptyResultSchema:g,CancelledNotificationParamsSchema:b,CancelledNotificationSchema:S,IconSchema:y,IconsSchema:x,BaseMetadataSchema:k,ImplementationSchema:I,ClientTasksCapabilitySchema:_,ServerTasksCapabilitySchema:R,ClientCapabilitiesSchema:A,InitializeRequestParamsSchema:F,InitializeRequestSchema:M,ServerCapabilitiesSchema:V,InitializeResultSchema:te,InitializedNotificationSchema:ne,PingRequestSchema:ye,ProgressSchema:Ce,ProgressNotificationParamsSchema:Ee,ProgressNotificationSchema:qe,PaginatedRequestParamsSchema:we,PaginatedRequestSchema:P,PaginatedResultSchema:L,ResourceContentsSchema:w,TextResourceContentsSchema:m,BlobResourceContentsSchema:$,RoleSchema:C,AnnotationsSchema:J,ResourceSchema:Y,ResourceTemplateSchema:X,ListResourcesRequestSchema:_e,ListResourcesResultSchema:Pe,ListResourceTemplatesRequestSchema:z,ListResourceTemplatesResultSchema:D,ResourceRequestParamsSchema:B,ReadResourceRequestParamsSchema:se,ReadResourceRequestSchema:ue,ReadResourceResultSchema:pe,ResourceListChangedNotificationSchema:Re,SubscribeRequestParamsSchema:Fe,SubscribeRequestSchema:Oe,UnsubscribeRequestParamsSchema:Ve,UnsubscribeRequestSchema:Le,ResourceUpdatedNotificationParamsSchema:xt,ResourceUpdatedNotificationSchema:Qe,PromptArgumentSchema:Jt,PromptSchema:Ct,ListPromptsRequestSchema:Bt,ListPromptsResultSchema:ln,GetPromptRequestParamsSchema:un,GetPromptRequestSchema:Ln,TextContentSchema:Dn,ImageContentSchema:Fn,AudioContentSchema:Vn,ToolUseContentSchema:Lo,EmbeddedResourceSchema:dn,ResourceLinkSchema:Do,ContentBlockSchema:Tt,PromptMessageSchema:wr,GetPromptResultSchema:$r,PromptListChangedNotificationSchema:Hn,ToolAnnotationsSchema:Fo,ToolExecutionSchema:xr,ToolSchema:Zn,ListToolsRequestSchema:Tr,ListToolsResultSchema:Rr,CallToolResultSchema:Ir,CallToolRequestParamsSchema:rt,CallToolRequestSchema:Vo,ToolListChangedNotificationSchema:Wa,LoggingLevelSchema:zr,SetLevelRequestParamsSchema:Ho,SetLevelRequestSchema:Zo,LoggingMessageNotificationParamsSchema:Go,LoggingMessageNotificationSchema:Jo,ModelHintSchema:Bo,ModelPreferencesSchema:Ko,ToolChoiceSchema:Wo,ToolResultContentSchema:Qa,SamplingContentSchema:Qo,SamplingMessageContentBlockSchema:pn,SamplingMessageSchema:Xo,CreateMessageRequestParamsSchema:Yo,CreateMessageRequestSchema:ei,CreateMessageResultSchema:ti,CreateMessageResultWithToolsSchema:ni,BooleanSchemaSchema:ri,StringSchemaSchema:oi,NumberSchemaSchema:ii,UntitledSingleSelectEnumSchemaSchema:ai,TitledSingleSelectEnumSchemaSchema:si,LegacyTitledEnumSchemaSchema:ci,SingleSelectEnumSchemaSchema:li,UntitledMultiSelectEnumSchemaSchema:Gn,TitledMultiSelectEnumSchemaSchema:Jn,MultiSelectEnumSchemaSchema:Xa,EnumSchemaSchema:Ya,PrimitiveSchemaDefinitionSchema:St,ElicitRequestFormParamsSchema:kt,ElicitRequestURLParamsSchema:ui,ElicitRequestParamsSchema:Pt,ElicitRequestSchema:es,ElicitationCompleteNotificationParamsSchema:ts,ElicitationCompleteNotificationSchema:ns,ElicitResultSchema:rs,ResourceTemplateReferenceSchema:os,PromptReferenceSchema:is,CompleteRequestParamsSchema:as,CompleteRequestSchema:di,CompleteResultSchema:ss,RootSchema:cs,ListRootsRequestSchema:Er,ListRootsResultSchema:pi,RootsListChangedNotificationSchema:ls,TaskCreationParamsSchema:us,TaskStatusSchema:mi,TaskSchema:mn,CreateTaskResultSchema:ft,TaskStatusNotificationParamsSchema:ds,TaskStatusNotificationSchema:Bn,GetTaskRequestSchema:Cr,GetTaskResultSchema:Pr,GetTaskPayloadRequestSchema:Or,GetTaskPayloadResultSchema:Od,ListTasksRequestSchema:ct,ListTasksResultSchema:Be,CancelTaskRequestSchema:Kn,CancelTaskResultSchema:f.merge(mn),ClientRequestSchema:ie([ye,M,di,Zo,Ln,Bt,_e,z,ue,Oe,Le,Vo,Tr,Cr,Or,ct,Kn]),ClientNotificationSchema:ie([S,qe,ne,ls,Bn]),ClientResultSchema:ie([g,ti,ni,rs,pi,Pr,Be,ft]),ServerRequestSchema:ie([ye,ei,es,Er,Cr,Or,ct,Kn]),ServerNotificationSchema:ie([S,qe,Jo,Qe,Re,Wa,Hn,Bn,ns]),ServerResultSchema:ie([g,te,ss,$r,ln,Pe,D,pe,Ir,Rr,Pr,Be,ft]),CallToolResultWireSchema:le().superRefine((ot,_k)=>{if(!(typeof ot!="object"||ot===null||Array.isArray(ot)||ot.content!==void 0)){for(let _1 of GS)if(_1 in ot){_k.addIssue({code:"custom",message:`content is required when the body carries '${_1}' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(qv).pipe(Ir)}}var xR;function JS(){return xR??=$R()}function BS(e){return e.type!=="object"}var TR=new Set(["const","enum","default","examples"]),RR=new Set(["properties","patternProperties","$defs","definitions","dependentSchemas","dependencies"]);function IS(e){return e!==void 0&&!(typeof e=="string"&&e.startsWith("#"))}function IR(e){let t=typeof e.$schema=="string"?e.$schema:void 0;if(IS(e.$id))return{...t!==void 0&&{$schema:t},type:"object",properties:{result:e},required:["result"]};let r=x1(e.$schema)&&e.$recursiveAnchor!==!0,i=(n,o)=>{if(Array.isArray(n))return n.map(c=>i(c,!1));if(n===null||typeof n!="object"||!o&&IS(n.$id))return n;let a={},s=!1;for(let[c,l]of Object.entries(n))o?a[c]=i(l,!1):(c==="$ref"||c==="$dynamicRef")&&typeof l=="string"?a[c]=l==="#"?"#/properties/result":l.startsWith("#/")?`#/properties/result${l.slice(1)}`:l:c==="$recursiveRef"&&l==="#"&&r?s=!0:TR.has(c)?a[c]=l:RR.has(c)?a[c]=i(l,!0):a[c]=i(l,!1);return s&&("$ref"in a?a.allOf=[...Array.isArray(a.allOf)?a.allOf:[],{$ref:"#/properties/result"}]:a.$ref="#/properties/result"),a};return{...t!==void 0&&{$schema:t},type:"object",properties:{result:i(e,!1)},required:["result"]}}var KS={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},WS={"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},zR={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},sd;function Lv(){if(sd)return sd;let e=JS();return sd={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}},sd}function QS(e){return Object.prototype.hasOwnProperty.call(KS,e)}function XS(e){return Object.prototype.hasOwnProperty.call(WS,e)}function ER(e){return Object.prototype.hasOwnProperty.call(zR,e)}function CR(e){return ER(e)?Lv().resultSchemas[e]:void 0}function PR(e){return QS(e)?Lv().requestSchemas[e]:void 0}function OR(e){return XS(e)?Lv().notificationSchemas[e]:void 0}var ON=Object.keys(KS),NN=Object.keys(WS);function Uv(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function cd(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}var zS={ok:!1,reason:"not-in-era"};function ES(e){return Uv(e)&&Uv(e.outputSchema)&&BS(e.outputSchema)}var Dv={era:"2025-11-25",hasRequestMethod:QS,hasNotificationMethod:XS,validateRequest:(e,t)=>cd(PR(e),t),validateResult:(e,t)=>cd(CR(e),t),validateNotification:(e,t)=>cd(OR(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>zS,validateInputResponse:()=>zS,samplingResultVariant:((e,t)=>{let r=JS();return cd(e?r.CreateMessageResultWithToolsSchema:r.CreateMessageResultSchema,t)}),outboundEnvelope:e=>{},validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let r=ZS(e),i=r.structuredContent;if(i===void 0)return r;let n=typeof i!="object"||i===null||Array.isArray(i),o=t!==void 0&&BS(t);return!n&&!o?r:{...r,structuredContent:{result:i}}},decodeResult(e,t){if(Uv(t)&&"resultType"in t){let r={...t};return delete r.resultType,{kind:"complete",result:r}}return{kind:"complete",result:t}},encodeResult(e,t){if(e!=="tools/list")return t;let r=t.tools;return!Array.isArray(r)||!r.some(i=>ES(i))?t:{...t,tools:r.map(i=>ES(i)?{...i,outputSchema:IR(i.outputSchema)}:i)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>{}};function NR(){let e=In(()=>ie([p(),W(),oe(),Ht(),re(p(),e),j(e)])),t=re(p(),e),r=ie([p(),W().int()]),i=p(),n=ie([p(),W().int()]),o=he(["user","assistant"]),a=he(["debug","info","notice","warning","error","critical","alert","emergency"]),s=p().refine(Be=>{try{return atob(Be),!0}catch{return!1}},{message:"Invalid Base64 string"}),c=E({ttl:W().optional()}),l=E({taskId:p()}),u=me({progressToken:r.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=E({_meta:u.optional()}),f=d.extend({task:c.optional()}),h=E({_meta:u.optional()}),g=E({method:p(),params:h.loose().optional()}),b=E({src:p(),mimeType:p().optional(),sizes:j(p()).optional(),theme:he(["light","dark"]).optional()}),S=E({icons:j(b).optional()}),y=E({name:p(),title:p().optional()}),x=y.extend({...y.shape,...S.shape,version:p(),websiteUrl:p().optional(),description:p().optional()}),k=At(E({applyDefaults:oe().optional()}),t),I=tn(Be=>Be&&typeof Be=="object"&&!Array.isArray(Be)&&Object.keys(Be).length===0?{form:{}}:Be,At(E({form:k.optional(),url:t.optional()}),t.optional())),O=me({list:t.optional(),cancel:t.optional(),requests:me({sampling:me({createMessage:t.optional()}).optional(),elicitation:me({create:t.optional()}).optional()}).optional()}),T=me({list:t.optional(),cancel:t.optional(),requests:me({tools:me({call:t.optional()}).optional()}).optional()}),_=E({experimental:re(p(),t).optional(),sampling:E({context:t.optional(),tools:t.optional()}).optional(),elicitation:I.optional(),roots:E({listChanged:oe().optional()}).optional(),tasks:O.optional(),extensions:re(p(),t).optional()}),R=E({experimental:re(p(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:E({listChanged:oe().optional()}).optional(),resources:E({subscribe:oe().optional(),listChanged:oe().optional()}).optional(),tools:E({listChanged:oe().optional()}).optional(),tasks:T.optional(),extensions:re(p(),t).optional()}),A=E({progress:W(),total:ce(W()),message:ce(p())}),F=E({...h.shape,...A.shape,progressToken:r}),M=g.extend({method:q("notifications/progress"),params:F}),V=h.extend({level:a,logger:p().optional(),data:le()}),te=g.extend({method:q("notifications/message"),params:V}),ne=E({uri:p(),mimeType:ce(p()),_meta:re(p(),le()).optional()}),ye=ne.extend({text:p()}),Ce=ne.extend({blob:s}),Ee=E({audience:j(o).optional(),priority:W().min(0).max(1).optional(),lastModified:Et.datetime({offset:!0}).optional()}),qe=E({...y.shape,...S.shape,uri:p(),description:ce(p()),mimeType:ce(p()),size:ce(W()),annotations:Ee.optional(),_meta:ce(me({}))}),we=E({...y.shape,...S.shape,uriTemplate:p(),description:ce(p()),mimeType:ce(p()),annotations:Ee.optional(),_meta:ce(me({}))}),P=g.extend({method:q("notifications/resources/list_changed"),params:h.optional()}),L=h.extend({uri:p()}),w=g.extend({method:q("notifications/resources/updated"),params:L}),m=E({name:p(),description:ce(p()),required:ce(oe())}),v=E({...y.shape,...S.shape,description:ce(p()),arguments:ce(j(m)),_meta:ce(me({}))}),$=g.extend({method:q("notifications/prompts/list_changed"),params:h.optional()}),C=E({type:q("text"),text:p(),annotations:Ee.optional(),_meta:re(p(),le()).optional()}),J=E({type:q("image"),data:s,mimeType:p(),annotations:Ee.optional(),_meta:re(p(),le()).optional()}),Y=E({type:q("audio"),data:s,mimeType:p(),annotations:Ee.optional(),_meta:re(p(),le()).optional()}),X=E({type:q("tool_use"),name:p(),id:p(),input:re(p(),le()),_meta:re(p(),le()).optional()}),_e=E({type:q("resource"),resource:ie([ye,Ce]),annotations:Ee.optional(),_meta:re(p(),le()).optional()}),Pe=qe.extend({type:q("resource_link")}),z=ie([C,J,Y,Pe,_e]),D=E({role:o,content:z}),B=E({title:p().optional(),readOnlyHint:oe().optional(),destructiveHint:oe().optional(),idempotentHint:oe().optional(),openWorldHint:oe().optional()}),se=g.extend({method:q("notifications/tools/list_changed"),params:h.optional()}),ue=E({name:p().optional()}),pe=E({hints:j(ue).optional(),costPriority:W().min(0).max(1).optional(),speedPriority:W().min(0).max(1).optional(),intelligencePriority:W().min(0).max(1).optional()}),Re=E({mode:he(["auto","required","none"]).optional()}),Fe=E({type:q("boolean"),title:p().optional(),description:p().optional(),default:oe().optional()}),Oe=E({type:q("string"),title:p().optional(),description:p().optional(),minLength:W().optional(),maxLength:W().optional(),format:he(["email","uri","date","date-time"]).optional(),default:p().optional()}),Ve=E({type:he(["number","integer"]),title:p().optional(),description:p().optional(),minimum:W().optional(),maximum:W().optional(),default:W().optional()}),Le=E({type:q("string"),title:p().optional(),description:p().optional(),enum:j(p()),default:p().optional()}),xt=E({type:q("string"),title:p().optional(),description:p().optional(),oneOf:j(E({const:p(),title:p()})),default:p().optional()}),Qe=E({type:q("string"),title:p().optional(),description:p().optional(),enum:j(p()),enumNames:j(p()).optional(),default:p().optional()}),Jt=ie([Le,xt]),Ct=E({type:q("array"),title:p().optional(),description:p().optional(),minItems:W().optional(),maxItems:W().optional(),items:E({type:q("string"),enum:j(p())}),default:j(p()).optional()}),Bt=E({type:q("array"),title:p().optional(),description:p().optional(),minItems:W().optional(),maxItems:W().optional(),items:E({anyOf:j(E({const:p(),title:p()}))}),default:j(p()).optional()}),ln=ie([Ct,Bt]),un=ie([Qe,Jt,ln]),Ln=ie([un,Fe,Oe,Ve]),Dn=f.extend({mode:q("form").optional(),message:p(),requestedSchema:E({type:q("object"),properties:re(p(),Ln),required:j(p()).optional()}).catchall(le())}),Fn=E({type:q("ref/resource"),uri:p()}),Vn=E({type:q("ref/prompt"),name:p()}),Lo=E({uri:p().startsWith("file://"),name:p().optional(),_meta:re(p(),le()).optional()}),dn=_.shape,Do=E({experimental:dn.experimental,sampling:dn.sampling,elicitation:dn.elicitation,roots:dn.roots,extensions:dn.extensions}),Tt=R.shape,wr=E({experimental:Tt.experimental,logging:Tt.logging,completions:Tt.completions,prompts:Tt.prompts,resources:Tt.resources,tools:Tt.tools,extensions:Tt.extensions}),$r=me({progressToken:r.optional(),[rn]:p(),[So]:x.optional(),[on]:Do,[En]:a.optional()}),Hn=E({...y.shape,...S.shape,description:p().optional(),inputSchema:me({$schema:p().optional(),type:q("object")}),outputSchema:me({$schema:p().optional()}).optional(),annotations:B.optional(),_meta:re(p(),le()).optional()}),Fo=E({type:q("tool_result"),toolUseId:p(),content:j(z),structuredContent:le().optional(),isError:oe().optional(),_meta:re(p(),le()).optional()}),xr=ie([C,J,Y,X,Fo]),Zn=E({role:o,content:ie([xr,j(xr)]),_meta:re(p(),le()).optional()}),Tr=p(),Rr=me({[Zt]:x.optional().catch(void 0)}),Ir=Rr.optional();function rt(Be){return me({_meta:Ir,resultType:Tr.default("complete"),...Be})}let Vo=rt({}),Wa=rt({nextCursor:i.optional()}),zr=rt({content:j(z),structuredContent:le().optional(),isError:oe().optional()}),Ho=rt({ttlMs:W().int().min(0),cacheScope:he(["public","private"]),tools:j(Hn),nextCursor:i.optional()}),Zo=rt({ttlMs:W().int().min(0),cacheScope:he(["public","private"]),prompts:j(v),nextCursor:i.optional()}),Go=rt({description:p().optional(),messages:j(D)}),Jo=rt({ttlMs:W().int().min(0),cacheScope:he(["public","private"]),resources:j(qe),nextCursor:i.optional()}),Bo=rt({ttlMs:W().int().min(0),cacheScope:he(["public","private"]),resourceTemplates:j(we),nextCursor:i.optional()}),Ko=rt({ttlMs:W().int().min(0),cacheScope:he(["public","private"]),contents:j(ie([ye,Ce]))}),Wo=rt({completion:E({values:j(p()).max(100),total:W().int().optional(),hasMore:oe().optional()}).loose()}),Qa=rt({ttlMs:W().int().min(0),cacheScope:he(["public","private"])}),Qo=rt({ttlMs:W().int().min(0).catch(0),cacheScope:he(["public","private"]).catch("private"),supportedVersions:j(p()),capabilities:wr,instructions:p().optional()}),pn=E({messages:j(Zn),modelPreferences:pe.optional(),systemPrompt:p().optional(),includeContext:he(["none","thisServer","allServers"]).optional(),temperature:W().optional(),maxTokens:W().int(),stopSequences:j(p()).optional(),metadata:t.optional(),tools:j(Hn).optional(),toolChoice:Re.optional()}),Xo=E({method:q("sampling/createMessage"),params:pn}),Yo=E({method:q("roots/list"),params:E({_meta:re(p(),le()).optional()}).optional()}),ei=E({...Zn.shape,model:p(),stopReason:p().optional()}),ti=E({roots:j(Lo)}),ni=E({action:he(["accept","decline","cancel"]),content:re(p(),ie([p(),W(),oe(),j(p())])).optional()}),ri=E({mode:q("url"),message:p(),url:p().url()}),oi=ie([Dn,ri]),ii=E({method:q("elicitation/create"),params:oi}),ai=ie([Xo,Yo,ii]),si=ie([ei,ti,ni]),ci=re(p(),ai),li=re(p(),si),Gn=rt({inputRequests:ci.optional(),requestState:p().optional()}),Jn={inputResponses:li.optional(),requestState:p().optional()},Xa=E({_meta:$r,...Jn}),Ya=me({progressToken:r.optional()});function St(Be,Kn){return E({method:q(Be),params:E({_meta:$r,...Kn})})}function kt(Be,Kn){return E({method:q(Be),params:E({_meta:Ya.optional(),...Kn}).optional()})}let ui={name:p(),arguments:re(p(),le()).optional(),...Jn},Pt={cursor:i.optional()},es=St("tools/call",ui),ts=St("tools/list",Pt),ns=St("prompts/list",Pt),rs=St("prompts/get",{name:p(),arguments:re(p(),p()).optional(),...Jn}),os=St("resources/list",Pt),is=St("resources/templates/list",Pt),as=St("resources/read",{uri:p(),...Jn}),di={ref:ie([Vn,Fn]),argument:E({name:p(),value:p()}),context:E({arguments:re(p(),p()).optional()}).optional()},ss=St("completion/complete",di),cs=St("server/discover",{}),Er=E({toolsListChanged:oe().optional(),promptsListChanged:oe().optional(),resourcesListChanged:oe().optional(),resourceSubscriptions:j(p()).optional()}),pi={notifications:Er},ls=St("subscriptions/listen",pi),us=Rr.extend({"io.modelcontextprotocol/subscriptionId":n}),mi=me({_meta:us,resultType:Tr.default("complete")}),mn={"tools/call":kt("tools/call",ui),"tools/list":kt("tools/list",Pt),"prompts/get":kt("prompts/get",{name:p(),arguments:re(p(),p()).optional()}),"prompts/list":kt("prompts/list",Pt),"resources/list":kt("resources/list",Pt),"resources/templates/list":kt("resources/templates/list",Pt),"resources/read":kt("resources/read",{uri:p()}),"completion/complete":kt("completion/complete",di),"server/discover":kt("server/discover",{}),"subscriptions/listen":kt("subscriptions/listen",pi)};function ft(Be){return me({_meta:Ir,...Be})}let ds={"tools/call":ft({content:j(z),structuredContent:le().optional(),isError:oe().optional()}),"tools/list":ft({ttlMs:W().int().min(0),cacheScope:he(["public","private"]),tools:j(Hn),nextCursor:i.optional()}),"prompts/get":ft({description:p().optional(),messages:j(D)}),"prompts/list":ft({ttlMs:W().int().min(0),cacheScope:he(["public","private"]),prompts:j(v),nextCursor:i.optional()}),"resources/list":ft({ttlMs:W().int().min(0),cacheScope:he(["public","private"]),resources:j(qe),nextCursor:i.optional()}),"resources/templates/list":ft({ttlMs:W().int().min(0),cacheScope:he(["public","private"]),resourceTemplates:j(we),nextCursor:i.optional()}),"resources/read":ft({ttlMs:W().int().min(0),cacheScope:he(["public","private"]),contents:j(ie([ye,Ce]))}),"completion/complete":ft({completion:E({values:j(p()).max(100),total:W().int().optional(),hasMore:oe().optional()}).loose()}),"server/discover":ft({ttlMs:W().int().min(0).catch(0),cacheScope:he(["public","private"]).catch("private"),supportedVersions:j(p()),capabilities:wr,instructions:p().optional()}),"subscriptions/listen":ft({})},Bn=me({"io.modelcontextprotocol/subscriptionId":n.optional()}),Cr=E({method:q("notifications/subscriptions/acknowledged"),params:E({_meta:Bn.optional(),notifications:Er})}),Pr=E({_meta:Bn.optional(),requestId:n,reason:p().optional()}),Or=E({method:q("notifications/cancelled"),params:Pr}),Od={"notifications/cancelled":Or,"notifications/progress":M,"notifications/message":te,"notifications/resources/updated":w,"notifications/resources/list_changed":P,"notifications/tools/list_changed":se,"notifications/prompts/list_changed":$,"notifications/subscriptions/acknowledged":Cr},ct=Be=>E({jsonrpc:q("2.0"),id:ie([p(),W().int()]),result:Be}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:r,CursorSchema:i,RequestIdSchema:n,RoleSchema:o,LoggingLevelSchema:a,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:h,NotificationSchema:g,IconSchema:b,IconsSchema:S,BaseMetadataSchema:y,ImplementationSchema:x,ClientTasksCapabilitySchema:O,ServerTasksCapabilitySchema:T,ClientCapabilitiesSchema:_,ServerCapabilitiesSchema:R,ProgressSchema:A,ProgressNotificationParamsSchema:F,ProgressNotificationSchema:M,LoggingMessageNotificationParamsSchema:V,LoggingMessageNotificationSchema:te,ResourceContentsSchema:ne,TextResourceContentsSchema:ye,BlobResourceContentsSchema:Ce,AnnotationsSchema:Ee,ResourceSchema:qe,ResourceTemplateSchema:we,ResourceListChangedNotificationSchema:P,ResourceUpdatedNotificationParamsSchema:L,ResourceUpdatedNotificationSchema:w,PromptArgumentSchema:m,PromptSchema:v,PromptListChangedNotificationSchema:$,TextContentSchema:C,ImageContentSchema:J,AudioContentSchema:Y,ToolUseContentSchema:X,EmbeddedResourceSchema:_e,ResourceLinkSchema:Pe,ContentBlockSchema:z,PromptMessageSchema:D,ToolAnnotationsSchema:B,ToolListChangedNotificationSchema:se,ModelHintSchema:ue,ModelPreferencesSchema:pe,ToolChoiceSchema:Re,BooleanSchemaSchema:Fe,StringSchemaSchema:Oe,NumberSchemaSchema:Ve,UntitledSingleSelectEnumSchemaSchema:Le,TitledSingleSelectEnumSchemaSchema:xt,LegacyTitledEnumSchemaSchema:Qe,SingleSelectEnumSchemaSchema:Jt,UntitledMultiSelectEnumSchemaSchema:Ct,TitledMultiSelectEnumSchemaSchema:Bt,MultiSelectEnumSchemaSchema:ln,EnumSchemaSchema:un,PrimitiveSchemaDefinitionSchema:Ln,ElicitRequestFormParamsSchema:Dn,ResourceTemplateReferenceSchema:Fn,PromptReferenceSchema:Vn,RootSchema:Lo,ClientCapabilities2026Schema:Do,ServerCapabilities2026Schema:wr,RequestMetaEnvelopeSchema:$r,ToolSchema:Hn,ToolResultContentSchema:Fo,SamplingMessageContentBlockSchema:xr,SamplingMessageSchema:Zn,ResultTypeSchema:Tr,ResultMetaSchema:Rr,ResultSchema:Vo,PaginatedResultSchema:Wa,CallToolResultSchema:zr,ListToolsResultSchema:Ho,ListPromptsResultSchema:Zo,GetPromptResultSchema:Go,ListResourcesResultSchema:Jo,ListResourceTemplatesResultSchema:Bo,ReadResourceResultSchema:Ko,CompleteResultSchema:Wo,CacheableResultSchema:Qa,DiscoverResultSchema:Qo,CreateMessageRequestParamsSchema:pn,CreateMessageRequestSchema:Xo,ListRootsRequestSchema:Yo,CreateMessageResultSchema:ei,ListRootsResultSchema:ti,ElicitResultSchema:ni,ElicitRequestURLParamsSchema:ri,ElicitRequestParamsSchema:oi,ElicitRequestSchema:ii,InputRequestSchema:ai,InputResponseSchema:si,InputRequestsSchema:ci,InputResponsesSchema:li,InputRequiredResultSchema:Gn,InputResponseRequestParamsSchema:Xa,CallToolRequestSchema:es,ListToolsRequestSchema:ts,ListPromptsRequestSchema:ns,GetPromptRequestSchema:rs,ListResourcesRequestSchema:os,ListResourceTemplatesRequestSchema:is,ReadResourceRequestSchema:as,CompleteRequestSchema:ss,DiscoverRequestSchema:cs,SubscriptionFilterSchema:Er,SubscriptionsListenRequestSchema:ls,SubscriptionsListenResultMetaSchema:us,SubscriptionsListenResultSchema:mi,dispatchRequestSchemas:mn,dispatchResultSchemas:ds,NotificationMetaSchema:Bn,SubscriptionsAcknowledgedNotificationSchema:Cr,CancelledNotificationParamsSchema:Pr,CancelledNotificationSchema:Or,notificationSchemas2026:Od,JSONRPCResultResponseSchema:ct(Vo),CallToolResultResponseSchema:ct(ie([zr,Gn])),ListToolsResultResponseSchema:ct(Ho),ListPromptsResultResponseSchema:ct(Zo),GetPromptResultResponseSchema:ct(ie([Go,Gn])),ListResourcesResultResponseSchema:ct(Jo),ListResourceTemplatesResultResponseSchema:ct(Bo),ReadResourceResultResponseSchema:ct(ie([Ko,Gn])),CompleteResultResponseSchema:ct(Wo),DiscoverResultResponseSchema:ct(Qo),SubscriptionsListenResultResponseSchema:ct(mi)}}var UR;function Mn(){return UR??=NR()}var AR=["tools/list","prompts/list","resources/list","resources/templates/list","resources/read","server/discover"];function jR(e){return AR.includes(e)}var Oo=Symbol("modelcontextprotocol.resultCacheHintFallback");function gd(e,t){if(t===void 0)return e;let r=e[Oo];if(r===void 0)return{...e,[Oo]:t};let i={},n=r.ttlMs??t.ttlMs;n!==void 0&&(i.ttlMs=n);let o=r.cacheScope??t.cacheScope;return o!==void 0&&(i.cacheScope=o),{...e,[Oo]:i}}function MR(e){return e[Oo]}function Fv(e){return typeof e=="number"&&Number.isSafeInteger(e)&&e>=0}function Vv(e){return e==="public"||e==="private"}function Hv(e,t){if(e.ttlMs!==void 0&&!Fv(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&&!Vv(e.cacheScope))throw new RangeError(`Invalid cache hint for ${t}: cacheScope must be 'public' or 'private' (got ${String(e.cacheScope)})`)}var ee=(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})({}),de=class YS extends Error{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ProtocolError"})}static[Symbol.hasInstance](t){return No(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 No(this,t)}constructor(t,r,i){super(r),this.code=t,this.data=i,this.name="ProtocolError",Mv(this,new.target)}static fromError(t,r,i){if(t===ee.UrlElicitationRequired&&i){let n=i;if(n.elicitations)return new e0(n.elicitations,r)}if(t===ee.UnsupportedProtocolVersion&&i){let n=i;if(Array.isArray(n.supported)&&typeof n.requested=="string")return new jo({supported:n.supported,requested:n.requested},r)}if(t===ee.InvalidParams||t===ee.ResourceNotFound){let n=i;if(typeof n?.uri=="string"&&(t===ee.ResourceNotFound||Object.keys(n).length===1))return new vd(n.uri,r)}if(t===ee.MissingRequiredClientCapability&&i){let n=i;if(n.requiredCapabilities!==null&&typeof n.requiredCapabilities=="object"&&!Array.isArray(n.requiredCapabilities))return new yd({requiredCapabilities:n.requiredCapabilities},r)}return new YS(t,r,i)}},vd=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.ResourceNotFoundError"})}constructor(e,t=`Resource not found: ${e}`){super(ee.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},e0=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UrlElicitationRequiredError"})}constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(ee.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},jo=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.UnsupportedProtocolVersionError"})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(ee.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},yd=class extends de{static{Object.defineProperty(this,"mcpBrand",{value:"mcp.MissingRequiredClientCapabilityError"})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(", ")}`){super(ee.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},qR=0,LR="private",DR=["tools/call","prompts/get","resources/read"];function FR(e,t){let r=t.resultType;if(r===void 0)return{...t,resultType:"complete"};if(r==="complete"||DR.includes(e))return t;throw new de(ee.InternalError,`Handler for ${e} returned resultType '${String(r)}', but results of ${e} only support 'complete' on protocol revision 2026-07-28`)}function VR(e,t){let r=MR(t);if(t.resultType!=="complete"||!jR(e))return r===void 0?t:BR(t);let i=t,n=Fv(i.ttlMs)?i.ttlMs:GR(r),o=Vv(i.cacheScope)?i.cacheScope:JR(r),a={...i,ttlMs:n,cacheScope:o};return delete a[Oo],a}function HR(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function ZR(e,t){if(t===void 0)return e;let r=e._meta;return r===void 0?{...e,_meta:{[Zt]:t}}:!HR(r)||r[Zt]!==void 0?e:{...e,_meta:{...r,[Zt]:t}}}function GR(e){return e!==void 0&&Fv(e.ttlMs)?e.ttlMs:qR}function JR(e){return e!==void 0&&Vv(e.cacheScope)?e.cacheScope:LR}function BR(e){let t={...e};return delete t[Oo],t}var KR=["elicitation/create","sampling/createMessage","roots/list"],ld;function t0(){if(ld)return ld;let e=Mn();return ld={request:{"elicitation/create":E({method:q("elicitation/create"),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":E({method:q("sampling/createMessage"),params:e.CreateMessageRequestParamsSchema}),"roots/list":E({method:q("roots/list"),params:me({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},ld}function n0(e){return KR.includes(e)}function Cv(e){return n0(e)?t0().request[e]:void 0}function WR(e){return n0(e)?t0().response[e]:void 0}var Zv={"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},r0={"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 o0(e){return Object.prototype.hasOwnProperty.call(Zv,e)}function i0(e){return Object.prototype.hasOwnProperty.call(r0,e)}function QR(e){return Object.prototype.hasOwnProperty.call(Zv,e)}function XR(e){return o0(e)?Mn().dispatchRequestSchemas[e]:void 0}function YR(e){return QR(e)?Mn().dispatchResultSchemas[e]:void 0}function eI(e){return i0(e)?Mn().notificationSchemas2026[e]:void 0}var UN=Object.keys(Zv),AN=Object.keys(r0);function Fa(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function La(e,t){if(e===void 0)return{ok:!1,reason:"not-in-era"};let r=e.safeParse(t);return r.success?{ok:!0,value:r.data}:{ok:!1,reason:"invalid",message:String(r.error)}}var tI={ok:!1,reason:"not-in-era"},nI=[rn,on];function rI(e,t){let r=t,i=!1,n=()=>(i||(r={...r},i=!0),r),o=t.tools;e==="tools/list"&&Array.isArray(o)&&o.some(s=>Fa(s)&&"execution"in s)&&(n().tools=o.map(s=>{if(!Fa(s)||!("execution"in s))return s;let c={...s};return delete c.execution,c}));let a=t.capabilities;if(Fa(a)&&"tasks"in a){let s={...a};delete s.tasks,n().capabilities=s}return r}var Gv={era:"2026-07-28",hasRequestMethod:o0,hasNotificationMethod:i0,hasInputRequestMethod:e=>Cv(e)!==void 0,validateRequest:(e,t)=>La(XR(e),t),validateResult:(e,t)=>La(YR(e),t),validateNotification:(e,t)=>La(eI(e),t),validateInputRequest:(e,t)=>La(Cv(e),t),validateInputResponse:(e,t)=>La(WR(e),t),samplingResultVariant:()=>tI,outboundEnvelope(e){return{[rn]:e.protocolVersion,[So]:e.clientInfo,[on]:e.clientCapabilities,...e.logLevel!==void 0&&{[En]:e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let i of nI)i in e||t.push({key:i,problem:"missing"});let r=Mn().RequestMetaEnvelopeSchema.safeParse(e);if(!r.success)for(let i of r.error.issues){let n=i.path.map(String),o=n.length>0?n.join("."):"_meta";n.length===1&&t.some(a=>a.key===o&&a.problem==="missing")||t.push({key:o,problem:i.message})}return t},projectCallToolResult:e=>ZS(e),inputRequestSchema:Cv,decodeResult(e,t){if(!Fa(t))return{kind:"invalid",error:new ve(ke.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let r=t.resultType;if(r===void 0)return{kind:"invalid",error:new ve(ke.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 r!="string")return{kind:"invalid",error:new ve(ke.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:r})};if(r==="input_required"){let a=t.inputRequests,s=Fa(a)?a:{},c=t.requestState,l=t._meta===void 0?void 0:Mn().ResultMetaSchema.safeParse(t._meta),u=l?.success?l.data:void 0;return Object.keys(s).length===0&&typeof c!="string"?{kind:"invalid",error:new ve(ke.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},...u!==void 0&&{_meta:u}}}if(r!=="complete")return{kind:"invalid",error:new ve(ke.UnsupportedResultType,`Unsupported result type '${r}' for ${e}`,{resultType:r,method:e})};let i=oI(),n=Object.hasOwn(i,e)?i[e]:void 0;if(n!==void 0){let a=n.safeParse(t);if(!a.success)return{kind:"invalid",error:new ve(ke.InvalidResult,`Invalid result for ${e}: ${a.error}`,{method:e})}}let o={...t};return delete o.resultType,{kind:"complete",result:o}},encodeResult(e,t,r){return ZR(VR(e,FR(e,rI(e,t))),r)},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/clientCapabilities)";let t=Mn().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(r=>r.message).join("; ")}`}},ud;function oI(){if(ud)return ud;let e=Mn();return ud={"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},ud}var Za="2026-07-28";function sn(e){return e!==void 0&&Ao(e)?Gv:Dv}function CS(e){return e.revision!==void 0?sn(e.revision).era:e.era==="modern"?Gv.era:Dv.era}function Pv(e){return a0.some(t=>t.hasRequestMethod(e))}function Ov(e){return a0.some(t=>t.hasNotificationMethod(e))}function PS(e){return e==="tasks/get"||e==="tasks/cancel"}var a0=[Dv,Gv];function OS(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function _r(e){if(!OS(e))return;let t=e._meta;return OS(t)?t:void 0}function bd(e){let t=_r(e);return t!==void 0&&rn in t}function _d(e){let t=_r(e)?.[rn];return typeof t=="string"?t:void 0}function Sd(e){return sn(Za).validateEnvelopeMeta(e)}var iI=w1({AnnotationsSchema:()=>an,AudioContentSchema:()=>Io,BaseMetadataSchema:()=>nn,BaseRequestParamsSchema:()=>Ye,BlobResourceContentsSchema:()=>Ia,BooleanSchemaSchema:()=>Oa,CallToolRequestParamsSchema:()=>_u,CallToolRequestSchema:()=>Su,CallToolResultSchema:()=>Pa,CancelTaskRequestSchema:()=>fv,CancelTaskResultSchema:()=>hv,CancelledNotificationParamsSchema:()=>wl,CancelledNotificationSchema:()=>ka,ClientCapabilitiesSchema:()=>Rl,ClientNotificationSchema:()=>vv,ClientRequestSchema:()=>gv,ClientResultSchema:()=>yv,ClientTasksCapabilitySchema:()=>xl,CompatibilityCallToolResultSchema:()=>rv,CompleteRequestParamsSchema:()=>Bu,CompleteRequestSchema:()=>Ku,CompleteResultSchema:()=>Wu,ContentBlockSchema:()=>zo,CreateMessageRequestParamsSchema:()=>Ou,CreateMessageRequestSchema:()=>Nu,CreateMessageResultSchema:()=>Uu,CreateMessageResultWithToolsSchema:()=>Au,CreateTaskResultSchema:()=>av,CursorSchema:()=>ha,DiscoverRequestSchema:()=>Pl,DiscoverResultSchema:()=>Ol,ElicitRequestFormParamsSchema:()=>Po,ElicitRequestParamsSchema:()=>Du,ElicitRequestSchema:()=>Fu,ElicitRequestURLParamsSchema:()=>Lu,ElicitResultSchema:()=>Zu,ElicitationCompleteNotificationParamsSchema:()=>Vu,ElicitationCompleteNotificationSchema:()=>Hu,EmbeddedResourceSchema:()=>du,EmptyResultSchema:()=>Sa,EnumSchemaSchema:()=>qu,GetPromptRequestParamsSchema:()=>cu,GetPromptRequestSchema:()=>lu,GetPromptResultSchema:()=>fu,GetTaskPayloadRequestSchema:()=>uv,GetTaskPayloadResultSchema:()=>dv,GetTaskRequestSchema:()=>cv,GetTaskResultSchema:()=>lv,IconSchema:()=>$l,IconsSchema:()=>Pn,ImageContentSchema:()=>Ro,ImplementationSchema:()=>$o,InitializeRequestParamsSchema:()=>Il,InitializeRequestSchema:()=>zl,InitializeResultSchema:()=>El,InitializedNotificationSchema:()=>Cl,JSONArraySchema:()=>ev,JSONObjectSchema:()=>Ze,JSONRPCErrorResponseSchema:()=>wo,JSONRPCMessageSchema:()=>_a,JSONRPCNotificationSchema:()=>ba,JSONRPCRequestSchema:()=>ya,JSONRPCResponseSchema:()=>tv,JSONRPCResultResponseSchema:()=>ko,JSONValueSchema:()=>zn,LegacyTitledEnumSchemaSchema:()=>Aa,ListChangedOptionsBaseSchema:()=>ov,ListPromptsRequestSchema:()=>au,ListPromptsResultSchema:()=>su,ListResourceTemplatesRequestSchema:()=>Ll,ListResourceTemplatesResultSchema:()=>Dl,ListResourcesRequestSchema:()=>Ml,ListResourcesResultSchema:()=>ql,ListRootsRequestSchema:()=>Xu,ListRootsResultSchema:()=>Yu,ListTasksRequestSchema:()=>pv,ListTasksResultSchema:()=>mv,ListToolsRequestSchema:()=>yu,ListToolsResultSchema:()=>bu,LoggingLevelSchema:()=>An,LoggingMessageNotificationParamsSchema:()=>xu,LoggingMessageNotificationSchema:()=>Tu,ModelHintSchema:()=>Ru,ModelPreferencesSchema:()=>Iu,MultiSelectEnumSchemaSchema:()=>Mu,NotificationSchema:()=>st,NotificationsParamsSchema:()=>at,NumberSchemaSchema:()=>Co,PaginatedRequestParamsSchema:()=>Al,PaginatedRequestSchema:()=>On,PaginatedResultSchema:()=>Nn,PingRequestSchema:()=>$a,PrimitiveSchemaDefinitionSchema:()=>qa,ProgressNotificationParamsSchema:()=>Ul,ProgressNotificationSchema:()=>xa,ProgressSchema:()=>Nl,ProgressTokenSchema:()=>fa,PromptArgumentSchema:()=>ou,PromptListChangedNotificationSchema:()=>hu,PromptMessageSchema:()=>mu,PromptReferenceSchema:()=>Ju,PromptSchema:()=>iu,ReadResourceRequestParamsSchema:()=>Fl,ReadResourceRequestSchema:()=>Vl,ReadResourceResultSchema:()=>Hl,RelatedTaskMetadataSchema:()=>kl,RequestIdSchema:()=>Cn,RequestMetaSchema:()=>ga,RequestSchema:()=>Ge,ResourceContentsSchema:()=>Ta,ResourceLinkSchema:()=>pu,ResourceListChangedNotificationSchema:()=>Zl,ResourceRequestParamsSchema:()=>xo,ResourceSchema:()=>za,ResourceTemplateReferenceSchema:()=>Gu,ResourceTemplateSchema:()=>jl,ResourceUpdatedNotificationParamsSchema:()=>nu,ResourceUpdatedNotificationSchema:()=>ru,ResultMetaObjectSchema:()=>va,ResultSchema:()=>Je,RoleSchema:()=>Un,RootSchema:()=>Qu,RootsListChangedNotificationSchema:()=>ed,SamplingContentSchema:()=>Cu,SamplingMessageContentBlockSchema:()=>mr,SamplingMessageSchema:()=>Pu,ServerCapabilitiesSchema:()=>wa,ServerNotificationSchema:()=>_v,ServerRequestSchema:()=>bv,ServerResultSchema:()=>Sv,ServerTasksCapabilitySchema:()=>Tl,SetLevelRequestParamsSchema:()=>wu,SetLevelRequestSchema:()=>$u,SingleSelectEnumSchemaSchema:()=>ju,StringSchemaSchema:()=>Eo,SubscribeRequestParamsSchema:()=>Gl,SubscribeRequestSchema:()=>Jl,SubscriptionFilterSchema:()=>Ea,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Xl,SubscriptionsAcknowledgedNotificationSchema:()=>Yl,SubscriptionsListenRequestParamsSchema:()=>Wl,SubscriptionsListenRequestSchema:()=>Ql,SubscriptionsListenResultMetaSchema:()=>eu,SubscriptionsListenResultSchema:()=>tu,TaskAugmentedRequestParamsSchema:()=>vr,TaskCreationParamsSchema:()=>iv,TaskMetadataSchema:()=>Sl,TaskSchema:()=>jn,TaskStatusNotificationParamsSchema:()=>nd,TaskStatusNotificationSchema:()=>sv,TaskStatusSchema:()=>td,TextContentSchema:()=>To,TextResourceContentsSchema:()=>Ra,TitledMultiSelectEnumSchemaSchema:()=>Ma,TitledSingleSelectEnumSchemaSchema:()=>Ua,ToolAnnotationsSchema:()=>gu,ToolChoiceSchema:()=>zu,ToolExecutionSchema:()=>vu,ToolListChangedNotificationSchema:()=>ku,ToolResultContentSchema:()=>Eu,ToolSchema:()=>Ca,ToolUseContentSchema:()=>uu,UnsubscribeRequestParamsSchema:()=>Bl,UnsubscribeRequestSchema:()=>Kl,UntitledMultiSelectEnumSchemaSchema:()=>ja,UntitledSingleSelectEnumSchemaSchema:()=>Na});var _t=e=>ya.safeParse(e).success,qn=e=>ba.safeParse(e).success,br=e=>ko.safeParse(e).success,Sr=e=>wo.safeParse(e).success;var cn=e=>typeof e=="object"&&e!==null&&!Array.isArray(e)&&e.resultType==="input_required";function Jv(e){if(e.params.ref.type!=="ref/prompt")throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function Bv(e){if(e.params.ref.type!=="ref/resource")throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}var NS="x-mcp-header",aI=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,sI=new Set(["string","integer","boolean"]);function Kv(e){let t=[],r=new Map,i,n=(a,s,c)=>{if(a===null||typeof a!="object")return;let l=a;if(NS in l){if(!c||s.length===0)return`${dd(s)}: 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=l[NS];if(typeof d!="string"||d.length===0)return`${dd(s)}: x-mcp-header MUST be a non-empty string`;if(!aI.test(d))return`${dd(s)}: x-mcp-header '${d}' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let f=typeof l.type=="string"?l.type:void 0;if(f===void 0||!sI.has(f)){let b=`${dd(s)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${f??"<none>"}`;if(f!=="number")return b;i??=b}let h=d.toLowerCase(),g=r.get(h);if(g!==void 0)return`x-mcp-header '${d}' is not case-insensitively unique (also declared as '${g}')`;r.set(h,d),t.push({path:s,headerName:d,type:f})}let u=l.properties;if(u!==null&&typeof u=="object")for(let[d,f]of Object.entries(u)){let h=n(f,[...s,d],c);if(h!==void 0)return h}for(let d of cI){let f=l[d];if(f===void 0)continue;let h=Array.isArray(f)?f:f!==null&&typeof f=="object"&&lI.has(d)?Object.values(f):[f];for(let g of h){let b=n(g,[...s,`<${d}>`],!1);if(b!==void 0)return b}}},o=n(e,[],!0);return o!==void 0?{valid:!1,reason:i??o}:i===void 0?{valid:!0,declarations:t}:{valid:!1,reason:i,declarations:t}}var cI=["items","prefixItems","contains","additionalProperties","unevaluatedProperties","unevaluatedItems","propertyNames","patternProperties","dependentSchemas","oneOf","anyOf","allOf","not","if","then","else","$defs","definitions"],lI=new Set(["patternProperties","dependentSchemas","$defs","definitions"]);function dd(e){return e.length===0?"<root>":e.join(".")}var md=-32020,jN=[{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:[ee.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:[md,ee.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:[ee.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:[ee.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:[ee.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:[md],conformance:["http-header-validation"],rationale:"SEP-2243 standard `MCP-Protocol-Version` / `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 spec requires `MCP-Protocol-Version` and `Mcp-Method` on every modern *request* POST (`Mcp-Name` only for the methods that mirror `params.name` / `params.uri` / `params.taskId`, see `MCP_NAME_HEADER_SOURCE`) and names them in that order, so a request missing several is answered by the earliest. Notification POSTs are exempt: the presence half runs on requests only, so a modern-enveloped notification is dispatched even with no standard headers at all. 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 \u2014 including the missing `MCP-Protocol-Version` cell, which cannot live on the edge rung without breaking body-primary classification. 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:[ee.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:[md],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."}],s0={[ee.ParseError]:400,[ee.InvalidRequest]:400,[ee.MethodNotFound]:404,[ee.UnsupportedProtocolVersion]:400,[ee.MissingRequiredClientCapability]:400,[md]:400};function pd(e,t,r,i,n){return{kind:"reject",rung:e,cell:t,httpStatus:r,code:i.code,message:i.message,...i.data!==void 0&&{data:i.data},settled:n}}function Wv(e){if(!bd(e))return!1;let t=_d(e);if(t===void 0||!Ao(t))return!1;let r=_r(e);return r!==void 0&&Sd(r).length===0}function Qv(e,t){switch(e.reason){case"http-method":return pd("http-method","modern-only-method-not-allowed",405,new de(-32e3,"Method not allowed."),!0);case"batch":return pd("jsonrpc-shape","modern-only-batch-not-supported",400,new de(ee.InvalidRequest,"Bad Request: JSON-RPC batches are not supported by this endpoint"),!0);case"response":return pd("jsonrpc-shape","modern-only-response-post",400,new de(ee.InvalidRequest,"Bad Request: JSON-RPC responses cannot be posted to this endpoint"),!0);case"notification":return;case"initialize":case"no-claim":{let r=e.requestedVersion;return pd("era-classification","modern-only-missing-envelope",400,r===void 0?new de(ee.UnsupportedProtocolVersion,"Unsupported protocol version: the request did not name a protocol version",{supported:[...t]}):new jo({supported:[...t],requested:r}),!0)}}}function kd(e,t){return ta(e,t)}function Da(e){return new Set(e.flatMap(t=>Object.keys(t.shape)))}function Uo(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 US=!1,Av="draft-2020-12";function kr(e,t="input"){let r=e["~standard"],i;if(r.jsonSchema)i=r.jsonSchema[t]({target:Av});else if(r.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().");US||(US=!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.")),i=lr(e,{target:Av,io:t})}else throw new Error(`Schema library "${r.vendor}" does not implement StandardJSONSchemaV1 (\`~standard.jsonSchema\`). Upgrade to a version that does, or wrap your JSON Schema with fromJsonSchema().`);if(t==="output")return i.type!==void 0?i:c0(i)?{type:"object",...i}:i;if(i.type!==void 0&&i.type!=="object")throw new Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(i.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:"object",...i}}var uI=/^#\/(\$defs|definitions)\/([^/~%]+)$/;function c0(e,t=e){if("properties"in e||"patternProperties"in e||"additionalProperties"in e||"required"in e)return!0;let r=typeof e.$ref=="string"&&uI.exec(e.$ref);if(r&&t[r[1]]?.[r[2]]?.type==="object")return!0;for(let i of["oneOf","anyOf","allOf"]){let n=e[i];if(Array.isArray(n)&&n.length>0)return n.every(o=>o!==null&&typeof o=="object"&&(o.type==="object"||c0(o,"$id"in o?{}:t)))}return!1}function dI(e){return e.path?.length?`${e.path.map(t=>String(typeof t=="object"?t.key:t)).join(".")}: ${e.message}`:e.message}async function yr(e,t){let r=await e["~standard"].validate(t);return r.issues&&r.issues.length>0?{success:!1,error:r.issues.map(i=>dI(i)).join(", ")}:{success:!0,data:r.value}}function pI(e){let t=lr(e,{target:Av,io:"input"});return typeof t.pattern=="string"?t.pattern:void 0}var mI=/\\\.\\d\{(\d+)\}/;function fI(e){let t=mI.exec(e),r=[void 0,-1,0];return t&&r.push(Number(t[1])),[!1,!0].flatMap(i=>[!1,!0].flatMap(n=>r.map(o=>Et.datetime({local:i,offset:n,precision:o}))))}function hI(e,t){let r;switch(e){case"email":r=[Wc()];break;case"uri":r=[go()];break;case"date":r=[Et.date()];break;case"date-time":r=fI(t);break}return new Set(r.map(i=>pI(i)).filter(i=>i!==void 0))}function gI(e,t,r){return r!=="zod"?!0:hI(e,t).has(t)}function l0(e){let t=kr(e,"input"),r=t.properties||{},i=t.required||[];return Object.entries(r).map(([n,o])=>({name:n,description:o?.description,required:i.includes(n)}))}function Ha(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function vI(e){try{return kr(e,"input")}catch(t){let r=t instanceof Error?t.message:String(t);throw new de(ee.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${r}`)}}var yI=new Set(["$comment","deprecated","description","examples","readOnly","title","writeOnly"]);function Xv(e){return yI.has(e)||e.startsWith("x-")}var bI=new Set(["$schema",...Object.keys(Po.shape.requestedSchema.shape)]),AS={string:Da([Eo,Na,Ua,Aa]),number:Da([Co]),integer:Da([Co]),boolean:Da([Oa]),array:Da([ja,Ma])},_I=new Set(Eo.shape.format.unwrap().options);function SI(e,t,r,i){if(!Ha(e))return e;let n=typeof e.type=="string"&&Object.hasOwn(AS,e.type)?AS[e.type]:void 0;if(n===void 0)return e;let o={};for(let[a,s]of Object.entries(e))n.has(a)||Xv(a)?o[a]=s:a==="pattern"&&e.type==="string"&&typeof e.format=="string"?_I.has(e.format)?(typeof s!="string"||!gI(e.format,s,r))&&i.push(`${t}.${a}`):o[a]=s:i.push(`${t}.${a}`);return o}function kI(e,t){let r={},i=[];for(let[n,o]of Object.entries(e))n==="properties"&&Ha(o)?r[n]=Object.fromEntries(Object.entries(o).map(([a,s])=>[a,SI(s,`properties.${a}`,t,i)])):bI.has(n)?r[n]=o:Xv(n)||i.push(n);if(i.length>0)throw new de(ee.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(", ")}`);return r}function wI(e,t){if(!Ha(e.properties))return t;let r=Object.entries(e.properties).filter(([,i])=>!kd(qa,i).success).map(([i])=>`properties.${i}`);return r.length>0?r.join(", "):t}function jv(e,t,r=""){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((i,n)=>jv(i,t[n],`${r}[${n}]`)):!Ha(e)||!Ha(t)?[]:Object.entries(e).flatMap(([i,n])=>{let o=r?`${r}.${i}`:i;return Object.prototype.hasOwnProperty.call(t,i)?jv(n,t[i],o):Xv(i)?[]:[o]})}function $I(e){if(!Uo(e.requestedSchema))return{...e,mode:"form",requestedSchema:e.requestedSchema};let t=e.requestedSchema["~standard"].vendor,r=kI(vI(e.requestedSchema),t),i=kd(Po.shape.requestedSchema,r);if(!i.success)throw new de(ee.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${wI(r,i.error.message)}`);let n=jv(r,i.data);if(n.length>0)throw new de(ee.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${n.join(", ")}`);let o=(i.data.required??[]).filter(a=>!Object.prototype.hasOwnProperty.call(i.data.properties,a));if(o.length>0)throw new de(ee.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${o.join(", ")}`);return{...e,mode:"form",requestedSchema:i.data}}function xI(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,r=typeof e.requestState=="string";if(!t&&!r)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 TI=Object.assign(xI,{elicit(e){try{return{method:"elicitation/create",params:$I(e)}}catch(t){throw t instanceof de?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 u0=250;function d0(e,t){return`Multi-round-trip request '${e}' still required input after ${t} rounds (inputRequired.maxRounds)`}function p0(e,t){return new Promise((r,i)=>{if(t?.aborted){i(t.reason instanceof ve?t.reason:new ve(ke.RequestTimeout,String(t.reason)));return}let n=setTimeout(()=>{t?.removeEventListener("abort",o),r()},e),o=()=>{clearTimeout(n),i(t?.reason instanceof ve?t.reason:new ve(ke.RequestTimeout,String(t?.reason)))};t?.addEventListener("abort",o,{once:!0})})}function m0(e){let t=new AbortController,r=()=>t.abort(e?.reason);return e?.addEventListener("abort",r,{once:!0}),e?.aborted&&t.abort(e.reason),{signal:t.signal,abort:i=>t.abort(i),dispose:()=>e?.removeEventListener("abort",r)}}var RI=["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","ResultMetaObjectSchema","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"],II={IdJagTokenExchangeResponseSchema:Tv,OAuthClientInformationFullSchema:Iv,OAuthClientInformationSchema:ad,OAuthClientMetadataSchema:id,OAuthClientRegistrationErrorSchema:zv,OAuthErrorResponseSchema:Rv,OAuthMetadataSchema:rd,OAuthProtectedResourceMetadataSchema:wv,OAuthTokenRevocationRequestSchema:Ev,OAuthTokensSchema:xv,OpenIdProviderDiscoveryMetadataSchema:$v,OpenIdProviderMetadataSchema:od},f0={},h0={};function g0(e,t){let r=e.slice(0,-6);f0[r]=t,h0[r]=i=>t.safeParse(i).success}for(let e of RI)g0(e,iI[e]);for(let[e,t]of Object.entries(II))g0(e,t);var zI=Object.freeze(f0),EI=Object.freeze(h0);function CI(e){switch(e){case"initialize":case"notifications/initialized":return sn(void 0);case"server/discover":return sn(Za);default:return}}var v0=6e4,PI=[rn,So,on,En],OI=["inputResponses","requestState"];function jS(e,t){let r=e.params;if(!Va(r))return{message:e,lifted:{}};let i=r._meta,n=Va(i)?PI.filter(c=>c in i):[],o=t==="request"?OI.filter(c=>c in r):[];if(n.length===0&&o.length===0)return{message:e,lifted:{}};let a={},s={...r};if(n.length>0&&Va(i)){let c={},l={...i};for(let u of n)c[u]=i[u],delete l[u];a.envelope=c,Object.keys(l).length>0?s._meta=l:delete s._meta}for(let c of o)c==="inputResponses"&&(a.inputResponses=s[c]),c==="requestState"&&(a.requestState=s[c]),delete s[c];return{message:{...e,params:s},lifted:a}}function MS(e,t){let r=e.validateResult(t,void 0);if(!(!r.ok&&r.reason==="not-in-era"))return{"~standard":{version:1,vendor:"mcp-wire-codec",validate(i){let n=e.validateResult(t,i);return n.ok?{value:n.value}:{issues:[{message:n.reason==="invalid"?n.message:`not-in-era: ${t}`}]}}}}}function Ga(e){return()=>e}var NI=Ga(void 0);function Yv(e,t){return{...e,mcpReq:{...e.mcpReq,requestState:Ga(t)}}}var y0;function e1(e,t){y0(e,t)}var t1=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;static{y0=(e,t)=>{e._negotiatedProtocolVersion=t}}_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??bl,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 r=e.params??{};return{...e,params:{...r,_meta:{...t,...r._meta}}}}_resolveNonCompleteResult(e,t){return Promise.reject(new ve(ke.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!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,r,i,n=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(i,t),startTime:Date.now(),timeout:t,maxTotalTimeout:r,resetTimeoutOnProgress:n,onTimeout:i})}_resetTimeout(e){let t=this._timeoutInfo.get(e);if(!t)return!1;let r=Date.now()-t.startTime;if(t.maxTotalTimeout&&r>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),new ve(ke.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:r});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 r=this.transport?.onerror;this._transport.onerror=n=>{r?.(n),this._onerror(n)};let i=this._transport?.onmessage;this._transport.onmessage=(n,o)=>{i?.(n,o),br(n)||Sr(n)?this._onresponse(n):_t(n)?this._onrequest(n,o):qn(n)?this._onnotification(n,o):this._onerror(new Error(`Unknown message type: ${JSON.stringify(n)}`))},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 i of this._timeoutInfo.values())clearTimeout(i.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let r=new ve(ke.ConnectionClosed,"Connection closed");this._transport=void 0;try{this.onclose?.()}finally{for(let i of e.values())i(r);for(let i of t.values())i.abort(r)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:r}=jS(e,"notification"),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)==="drop")return;if(t?.classification!==void 0){let a=CS(t.classification);if(a!==i.era){this._onerror(new Error(`Era mismatch on inbound notification '${r.method}': classified as ${a} but this instance serves ${i.era}`));return}}if(Ov(r.method)&&!i.hasNotificationMethod(r.method))return;let n=this._notificationHandlers.get(r.method),o=this.fallbackNotificationHandler;n===void 0&&o===void 0||Promise.resolve().then(()=>n===void 0?o(r):n(r,i)).catch(a=>this._onerror(new Error(`Uncaught error in notification handler: ${a}`)))}_onrequest(e,t){let{message:r,lifted:i}=jS(e,"request"),n=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 o=this._transport,a=(b,S,y)=>{let x={jsonrpc:"2.0",id:r.id,error:{code:b,message:S,...y!==void 0&&{data:y}}};o?.send(x).catch(k=>this._onerror(new Error(`Failed to send an error response: ${k}`)))};if(t?.classification!==void 0){let b=CS(t.classification);if(b!==n.era){this._onerror(new Error(`Era mismatch on inbound request '${r.method}': classified as ${b} but this instance serves ${n.era}`));let S=t.classification.revision??b;a(ee.UnsupportedProtocolVersion,`Unsupported protocol version: ${S}`,{supported:this._supportedProtocolVersions,requested:S});return}}if(Pv(r.method)&&!n.hasRequestMethod(r.method)&&!(PS(r.method)&&this._customSchemaRequestMethods.has(r.method))){a(ee.MethodNotFound,"Method not found");return}let s=this._requestHandlers.get(r.method)??this.fallbackRequestHandler;if(s===void 0){a(ee.MethodNotFound,"Method not found");return}let c=n.checkInboundEnvelope(i);if(c!==void 0){a(ee.InvalidParams,c);return}let l=(b,S)=>this._notificationViaCodec(this._resolveOutboundCodec(b.method),b,{...S,relatedRequestId:r.id}),u=(b,S,y)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(b.method),b,S,{...y,relatedRequestId:r.id}),d=new AbortController;this._requestHandlerAbortControllers.set(r.id,d);let f=i.inputResponses===void 0?void 0:UI(i.inputResponses),h={sessionId:o?.sessionId,mcpReq:{id:r.id,method:r.method,_meta:r.params?._meta,...i.envelope!==void 0&&{envelope:i.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:i.requestState===void 0?NI:Ga(i.requestState),signal:d.signal,send:((b,S,y)=>{let x=this._resolveOutboundCodec(b.method);if(this._assertOutboundRequestInEra(x,b.method),Uo(S))return u(b,S,y);let k=MS(x,b.method);if(k===void 0)throw new TypeError(`'${b.method}' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(b,k,S)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},g=this.buildContext(h,t);Promise.resolve().then(()=>s(r,g)).then(async b=>{if(d.signal.aborted)return;let S;try{S=n.encodeResult(r.method,b,this._outboundServerInfo())}catch(x){this._onerror(new Error(`Failed to encode result for ${r.method}: ${x}`)),a(ee.InternalError,"Internal error");return}let y={result:S,jsonrpc:"2.0",id:r.id};await o?.send(y)},async b=>{if(d.signal.aborted)return;let S=Number.isSafeInteger(b.code)?b.code:ee.InternalError,y={jsonrpc:"2.0",id:r.id,error:{code:n.encodeErrorCode(S),message:b.message??"Internal error",...b.data!==void 0&&{data:b.data}}};await o?.send(y)}).catch(b=>this._onerror(new Error(`Failed to send response: ${b}`))).finally(()=>{this._requestHandlerAbortControllers.get(r.id)===d&&this._requestHandlerAbortControllers.delete(r.id)})}_onprogress(e){let{progressToken:t,...r}=e.params,i=Number(t),n=this._progressHandlers.get(i);if(!n){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let o=this._responseHandlers.get(i),a=this._timeoutInfo.get(i);if(a&&o&&a.resetTimeoutOnProgress)try{this._resetTimeout(i)}catch(s){this._responseHandlers.delete(i),this._progressHandlers.delete(i),this._cleanupTimeout(i),o(s);return}n(r)}_onresponse(e){let t=Number(e.id),r=this._responseHandlers.get(t);if(r===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),br(e)?r(e):r(de.fromError(e.error.code,e.error.message,e.error.data))}get transport(){return this._transport}async close(){await this._transport?.close()}request(e,t,r){let i=this._resolveOutboundCodec(e.method);if(Uo(t))return PS(e.method)||this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r);this._assertOutboundRequestInEra(i,e.method);let n=MS(i,e.method);if(n===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(i,e,n,t)}_negotiatedWireCodec(){return sn(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=CI(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Pv(t)&&!e.hasRequestMethod(t))throw new ve(ke.MethodNotSupportedByProtocolVersion,`Method '${t}' is not supported by the negotiated protocol version (wire era ${e.era})`,{method:t,era:e.era})}_requestWithSchema(e,t,r){let i=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(i,e.method),this._requestWithSchemaViaCodec(i,e,t,r)}_requestWithSchemaViaCodec(e,t,r,i){let{relatedRequestId:n,resumptionToken:o,onresumptiontoken:a,headers:s}=i??{},c=Date.now(),l,u;return new Promise((d,f)=>{let h=T=>{f(T)};if(!this._transport){h(new Error("Not connected"));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(T){h(T);return}if(i?.signal?.aborted){let T=i.signal.reason;throw T instanceof ve?T:new ve(ke.RequestTimeout,String(T))}let g=e.era===Za&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,b=this._requestMessageId++;u=b;let S={...t,jsonrpc:"2.0",id:b};i?.onprogress&&(this._progressHandlers.set(b,i.onprogress),S.params={...t.params,_meta:{...t.params?._meta,progressToken:b}});let y=this._envelopeOutbound(S),x=!1,k=T=>{x||(this._progressHandlers.delete(b),g===void 0?t.method!=="initialize"&&this._transport?.send(this._envelopeOutbound({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:b,reason:String(T)}}),{relatedRequestId:n,resumptionToken:o,onresumptiontoken:a}).catch(_=>this._onerror(new Error(`Failed to send cancellation: ${_}`))):g.abort(),f(T instanceof ve?T:new ve(ke.RequestTimeout,String(T))))};this._responseHandlers.set(b,T=>{if(i?.signal?.aborted)return;if(x=!0,T instanceof Error)return f(T);let _;try{_=e.decodeResult(t.method,T.result)}catch(A){return f(A instanceof Error?A:new Error(String(A)))}if(_.kind==="invalid")return f(_.error);if(_.kind==="input_required"){if(i?.allowInputRequired===!0)return d(AI(_));let A={codec:e,request:t,resultSchema:r,options:i,flowStartedAt:c,retry:(F,M)=>this._requestWithSchemaViaCodec(e,F===void 0?{method:t.method}:{method:t.method,params:F},r,M)};return d(this._resolveNonCompleteResult(_,A))}let R=_.result;yr(r,R).then(A=>{A.success?d(A.data):f(new ve(ke.InvalidResult,`Invalid result for ${t.method}: ${A.error}`))},f)}),l=()=>k(i?.signal?.reason),i?.signal?.addEventListener("abort",l,{once:!0});let I=i?.timeout??v0,O=()=>k(new ve(ke.RequestTimeout,"Request timed out",{timeout:I}));this._setupTimeout(b,I,i?.maxTotalTimeout,O,i?.resetTimeoutOnProgress??!1),this._transport.send(y,{relatedRequestId:n,resumptionToken:o,onresumptiontoken:a,headers:s,requestSignal:g?.signal}).catch(T=>{this._progressHandlers.delete(b),f(T)})}).finally(()=>{l&&i?.signal?.removeEventListener("abort",l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,r){if(!this._transport)throw new ve(ke.NotConnected,"Not connected");if(Ov(t.method)&&!e.hasNotificationMethod(t.method))throw new ve(ke.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 i=this._envelopeOutbound({jsonrpc:"2.0",...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&r?.relatedRequestId===void 0){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(i,r).catch(n=>this._onerror(n))});return}await this._transport.send(i,r)}setRequestHandler(e,t,r){this.assertRequestHandlerCapability(e);let i;if(typeof t=="function"){if(!Pv(e))throw new TypeError(`'${e}' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);i=(n,o)=>{let a=this._negotiatedWireCodec(),s=a.validateRequest(e,n);if(!s.ok&&s.reason==="not-in-era"&&(s=a.validateInputRequest(e,n)),!s.ok)throw s.reason==="not-in-era"?new de(ee.InternalError,`No wire schema for ${e} in the resolved era`):new Error(s.message);return Promise.resolve(t(s.value,o))}}else if(r)i=async(n,o)=>{let a=await yr(t.params,{...n.params});if(!a.success)throw new de(ee.InvalidParams,`Invalid params for ${e}: ${a.error}`);return r(a.data,o)};else throw new TypeError("setRequestHandler: handler is required");typeof t=="function"?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,i))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.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,r){if(typeof t=="function"){if(!Ov(e))throw new TypeError(`'${e}' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(i,n)=>{let o=n.validateNotification(e,i);if(!o.ok)throw o.reason==="not-in-era"?new de(ee.InternalError,`No wire schema for ${e} in the resolved era`):new Error(o.message);return Promise.resolve(t(o.value))});return}if(!r)throw new TypeError("setNotificationHandler: handler is required");this._notificationHandlers.set(e,async i=>{let n=await yr(t.params,{...i.params});if(!n.success)throw new de(ee.InvalidParams,`Invalid params for notification ${e}: ${n.error}`);await r(n.data,i)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Va(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function n1(e,t){let r={...e};for(let i in t){let n=i,o=t[n];if(o===void 0)continue;let a=r[n];r[n]=Va(a)&&Va(o)?{...a,...o}:o}return r}function qS(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function UI(e){let t={},r=[];if(!qS(e))return{accepted:t,droppedKeys:r};for(let[i,n]of Object.entries(e)){if(!qS(n)||"method"in n||"result"in n){r.push(i);continue}t[i]=n}return{accepted:t,droppedKeys:r}}function AI(e){return{resultType:"input_required",inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}var jI=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,r=/\\([\u000b\u0020-\u00ff])/g,i=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/;e.parse=n;function n(s){if(!s)throw new TypeError("argument string is required");var c=typeof s=="object"?o(s):s;if(typeof c!="string")throw new TypeError("argument string is required to be a string");var l=c.indexOf(";"),u=l!==-1?c.slice(0,l).trim():c.trim();if(!i.test(u))throw new TypeError("invalid media type");var d=new a(u.toLowerCase());if(l!==-1){var f,h,g;for(t.lastIndex=l;h=t.exec(c);){if(h.index!==l)throw new TypeError("invalid parameter format");l+=h[0].length,f=h[1].toLowerCase(),g=h[2],g.charCodeAt(0)===34&&(g=g.slice(1,-1),g.indexOf("\\")!==-1&&(g=g.replace(r,"$1"))),d.parameters[f]=g}if(l!==c.length)throw new TypeError("invalid parameter format")}return d}function o(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}})),MN=ms(jI(),1);var b0=10*1024*1024,r1=class{_buffer;_maxBufferSize;constructor(e){this._maxBufferSize=e?.maxBufferSize??b0}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(`
|
|
66
|
+
`);if(e===-1)return null;let t=this._buffer.toString("utf8",0,e).replace(/\r$/,"");this._buffer=this._buffer.subarray(e+1);try{return _0(t)}catch(r){if(r instanceof SyntaxError)continue;throw r}}return null}clear(){this._buffer=void 0}};function _0(e){return _a.parse(JSON.parse(e))}function o1(e){return JSON.stringify(e)+`
|
|
67
|
+
`}var MI=/^[A-Za-z0-9._-]{1,128}$/;function qI(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"),!MI.test(e)){let r=[...e].filter(i=>!/[A-Za-z0-9._-]/.test(i)).filter((i,n,o)=>o.indexOf(i)===n);return t.push(`Tool name contains invalid characters: ${r.map(i=>`"${i}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function LI(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(let r of t)console.warn(` - ${r}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function i1(e){let t=qI(e);return LI(e,t.warnings),t.isValid}function DI(e){return typeof e=="object"&&e!==null&&"_zod"in e}function FI(e){return typeof e=="object"&&e!==null&&!("_zod"in e)&&"_def"in e&&typeof e._def?.typeName=="string"}function VI(e){if(typeof e!="object"||e===null||Uo(e))return!1;let t=Object.getPrototypeOf(e);return t!==Object.prototype&&t!==null?!1:Object.values(e).every(r=>DI(r))}function wd(e){if(e!==void 0){if(VI(e))return E(e);if(typeof e=="object"&&e!==null&&!Uo(e)&&Object.values(e).some(t=>FI(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(!Uo(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 xd=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 r=class extends t{constructor(y){if(super(),!e.IDENTIFIER.test(y))throw new Error("CodeGen: name must be a valid identifier");this.str=y}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}};e.Name=r;var i=class extends t{constructor(y){super(),this._items=typeof y=="string"?[y]:y}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let y=this._items[0];return y===""||y==='""'}get str(){var y;return(y=this._str)!==null&&y!==void 0?y:this._str=this._items.reduce((x,k)=>`${x}${k}`,"")}get names(){var y;return(y=this._names)!==null&&y!==void 0?y:this._names=this._items.reduce((x,k)=>(k instanceof r&&(x[k.str]=(x[k.str]||0)+1),x),{})}};e._Code=i,e.nil=new i("");function n(y,...x){let k=[y[0]],I=0;for(;I<x.length;)s(k,x[I]),k.push(y[++I]);return new i(k)}e._=n;let o=new i("+");function a(y,...x){let k=[h(y[0])],I=0;for(;I<x.length;)k.push(o),s(k,x[I]),k.push(o,h(y[++I]));return c(k),new i(k)}e.str=a;function s(y,x){x instanceof i?y.push(...x._items):x instanceof r?y.push(x):y.push(d(x))}e.addCodeArg=s;function c(y){let x=1;for(;x<y.length-1;){if(y[x]===o){let k=l(y[x-1],y[x+1]);if(k!==void 0){y.splice(x-1,3,k);continue}y[x++]="+"}x++}}function l(y,x){if(x==='""')return y;if(y==='""')return x;if(typeof y=="string")return x instanceof r||y[y.length-1]!=='"'?void 0:typeof x!="string"?`${y.slice(0,-1)}${x}"`:x[0]==='"'?y.slice(0,-1)+x.slice(1):void 0;if(typeof x=="string"&&x[0]==='"'&&!(y instanceof r))return`"${y}${x.slice(1)}`}function u(y,x){return x.emptyStr()?y:y.emptyStr()?x:a`${y}${x}`}e.strConcat=u;function d(y){return typeof y=="number"||typeof y=="boolean"||y===null?y:h(Array.isArray(y)?y.join(","):y)}function f(y){return new i(h(y))}e.stringify=f;function h(y){return JSON.stringify(y).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=h;function g(y){return typeof y=="string"&&e.IDENTIFIER.test(y)?new i(`.${y}`):n`[${y}]`}e.getProperty=g;function b(y){if(typeof y=="string"&&e.IDENTIFIER.test(y))return new i(`${y}`);throw new Error(`CodeGen: invalid export name: ${y}, use explicit $id name mapping`)}e.getEsmExportName=b;function S(y){return new i(y.toString())}e.regexpCode=S})),S0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;let t=xd();var r=class extends Error{constructor(c){super(`CodeGen: "code" for ${c} not defined`),this.value=c.value}},i;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(i||(e.UsedValueState=i={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};var n=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,u;if(!((u=(l=this._parent)===null||l===void 0?void 0:l._prefixes)===null||u===void 0)&&u.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=n;var o=class extends t.Name{constructor(c,l){super(l),this.prefix=c}setValue(c,{property:l,itemIndex:u}){this.value=c,this.scopePath=(0,t._)`.${new t.Name(l)}[${u}]`}};e.ValueScopeName=o;let a=(0,t._)`\n`;var s=class extends n{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 o(c,this._newName(c))}value(c,l){var u;if(l.ref===void 0)throw new Error("CodeGen: ref must be passed in value");let d=this.toName(c),{prefix:f}=d,h=(u=l.key)!==null&&u!==void 0?u:l.ref,g=this._values[f];if(g){let y=g.get(h);if(y)return y}else g=this._values[f]=new Map;g.set(h,d);let b=this._scope[f]||(this._scope[f]=[]),S=b.length;return b[S]=l.ref,d.setValue(l,{property:f,itemIndex:S}),d}getValue(c,l){let u=this._values[c];if(u)return u.get(l)}scopeRefs(c,l=this._values){return this._reduceValues(l,u=>{if(u.scopePath===void 0)throw new Error(`CodeGen: name "${u}" has no value`);return(0,t._)`${c}${u.scopePath}`})}scopeCode(c=this._values,l,u){return this._reduceValues(c,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},l,u)}_reduceValues(c,l,u={},d){let f=t.nil;for(let h in c){let g=c[h];if(!g)continue;let b=u[h]=u[h]||new Map;g.forEach(S=>{if(b.has(S))return;b.set(S,i.Started);let y=l(S);if(y){let x=this.opts.es5?e.varKinds.var:e.varKinds.const;f=(0,t._)`${f}${x} ${S} = ${y};${this.opts._n}`}else if(y=d?.(S))f=(0,t._)`${f}${y}${this.opts._n}`;else throw new r(S);b.set(S,i.Completed)})}return f}};e.ValueScope=s})),Se=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=xd(),r=S0();var i=xd();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return i.Name}});var n=S0();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return n.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return n.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return n.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return n.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};var o=class{optimizeNodes(){return this}optimizeNames(m,v){return this}},a=class extends o{constructor(m,v,$){super(),this.varKind=m,this.name=v,this.rhs=$}render({es5:m,_n:v}){let $=m?r.varKinds.var:this.varKind,C=this.rhs===void 0?"":` = ${this.rhs}`;return`${$} ${this.name}${C};`+v}optimizeNames(m,v){if(m[this.name.str])return this.rhs&&(this.rhs=ne(this.rhs,m,v)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}},s=class extends o{constructor(m,v,$){super(),this.lhs=m,this.rhs=v,this.sideEffects=$}render({_n:m}){return`${this.lhs} = ${this.rhs};`+m}optimizeNames(m,v){if(!(this.lhs instanceof t.Name&&!m[this.lhs.str]&&!this.sideEffects))return this.rhs=ne(this.rhs,m,v),this}get names(){return te(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}},c=class extends s{constructor(m,v,$,C){super(m,$,C),this.op=v}render({_n:m}){return`${this.lhs} ${this.op}= ${this.rhs};`+m}},l=class extends o{constructor(m){super(),this.label=m,this.names={}}render({_n:m}){return`${this.label}:`+m}},u=class extends o{constructor(m){super(),this.label=m,this.names={}}render({_n:m}){return`break${this.label?` ${this.label}`:""};`+m}},d=class extends o{constructor(m){super(),this.error=m}render({_n:m}){return`throw ${this.error};`+m}get names(){return this.error.names}},f=class extends o{constructor(m){super(),this.code=m}render({_n:m}){return`${this.code};`+m}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(m,v){return this.code=ne(this.code,m,v),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}},h=class extends o{constructor(m=[]){super(),this.nodes=m}render(m){return this.nodes.reduce((v,$)=>v+$.render(m),"")}optimizeNodes(){let{nodes:m}=this,v=m.length;for(;v--;){let $=m[v].optimizeNodes();Array.isArray($)?m.splice(v,1,...$):$?m[v]=$:m.splice(v,1)}return m.length>0?this:void 0}optimizeNames(m,v){let{nodes:$}=this,C=$.length;for(;C--;){let J=$[C];J.optimizeNames(m,v)||(ye(m,J.names),$.splice(C,1))}return $.length>0?this:void 0}get names(){return this.nodes.reduce((m,v)=>V(m,v.names),{})}},g=class extends h{render(m){return"{"+m._n+super.render(m)+"}"+m._n}},b=class extends h{},S=class extends g{};S.kind="else";var y=class $d extends g{constructor(v,$){super($),this.condition=v}render(v){let $=`if(${this.condition})`+super.render(v);return this.else&&($+="else "+this.else.render(v)),$}optimizeNodes(){super.optimizeNodes();let v=this.condition;if(v===!0)return this.nodes;let $=this.else;if($){let C=$.optimizeNodes();$=this.else=Array.isArray(C)?new S(C):C}if($)return v===!1?$ instanceof $d?$:$.nodes:this.nodes.length?this:new $d(Ce(v),$ instanceof $d?[$]:$.nodes);if(!(v===!1||!this.nodes.length))return this}optimizeNames(v,$){var C;if(this.else=(C=this.else)===null||C===void 0?void 0:C.optimizeNames(v,$),!!(super.optimizeNames(v,$)||this.else))return this.condition=ne(this.condition,v,$),this}get names(){let v=super.names;return te(v,this.condition),this.else&&V(v,this.else.names),v}};y.kind="if";var x=class extends g{};x.kind="for";var k=class extends x{constructor(m){super(),this.iteration=m}render(m){return`for(${this.iteration})`+super.render(m)}optimizeNames(m,v){if(super.optimizeNames(m,v))return this.iteration=ne(this.iteration,m,v),this}get names(){return V(super.names,this.iteration.names)}},I=class extends x{constructor(m,v,$,C){super(),this.varKind=m,this.name=v,this.from=$,this.to=C}render(m){let v=m.es5?r.varKinds.var:this.varKind,{name:$,from:C,to:J}=this;return`for(${v} ${$}=${C}; ${$}<${J}; ${$}++)`+super.render(m)}get names(){return te(te(super.names,this.from),this.to)}},O=class extends x{constructor(m,v,$,C){super(),this.loop=m,this.varKind=v,this.name=$,this.iterable=C}render(m){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(m)}optimizeNames(m,v){if(super.optimizeNames(m,v))return this.iterable=ne(this.iterable,m,v),this}get names(){return V(super.names,this.iterable.names)}},T=class extends g{constructor(m,v,$){super(),this.name=m,this.args=v,this.async=$}render(m){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(m)}};T.kind="func";var _=class extends h{render(m){return"return "+super.render(m)}};_.kind="return";var R=class extends g{render(m){let v="try"+super.render(m);return this.catch&&(v+=this.catch.render(m)),this.finally&&(v+=this.finally.render(m)),v}optimizeNodes(){var m,v;return super.optimizeNodes(),(m=this.catch)===null||m===void 0||m.optimizeNodes(),(v=this.finally)===null||v===void 0||v.optimizeNodes(),this}optimizeNames(m,v){var $,C;return super.optimizeNames(m,v),($=this.catch)===null||$===void 0||$.optimizeNames(m,v),(C=this.finally)===null||C===void 0||C.optimizeNames(m,v),this}get names(){let m=super.names;return this.catch&&V(m,this.catch.names),this.finally&&V(m,this.finally.names),m}},A=class extends g{constructor(m){super(),this.error=m}render(m){return`catch(${this.error})`+super.render(m)}};A.kind="catch";var F=class extends g{render(m){return"finally"+super.render(m)}};F.kind="finally";var M=class{constructor(m,v={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...v,_n:v.lines?`
|
|
68
|
+
`:""},this._extScope=m,this._scope=new r.Scope({parent:m}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(m){return this._scope.name(m)}scopeName(m){return this._extScope.name(m)}scopeValue(m,v){let $=this._extScope.value(m,v);return(this._values[$.prefix]||(this._values[$.prefix]=new Set)).add($),$}getScopeValue(m,v){return this._extScope.getValue(m,v)}scopeRefs(m){return this._extScope.scopeRefs(m,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(m,v,$,C){let J=this._scope.toName(v);return $!==void 0&&C&&(this._constants[J.str]=$),this._leafNode(new a(m,J,$)),J}const(m,v,$){return this._def(r.varKinds.const,m,v,$)}let(m,v,$){return this._def(r.varKinds.let,m,v,$)}var(m,v,$){return this._def(r.varKinds.var,m,v,$)}assign(m,v,$){return this._leafNode(new s(m,v,$))}add(m,v){return this._leafNode(new c(m,e.operators.ADD,v))}code(m){return typeof m=="function"?m():m!==t.nil&&this._leafNode(new f(m)),this}object(...m){let v=["{"];for(let[$,C]of m)v.length>1&&v.push(","),v.push($),($!==C||this.opts.es5)&&(v.push(":"),(0,t.addCodeArg)(v,C));return v.push("}"),new t._Code(v)}if(m,v,$){if(this._blockNode(new y(m)),v&&$)this.code(v).else().code($).endIf();else if(v)this.code(v).endIf();else if($)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(m){return this._elseNode(new y(m))}else(){return this._elseNode(new S)}endIf(){return this._endBlockNode(y,S)}_for(m,v){return this._blockNode(m),v&&this.code(v).endFor(),this}for(m,v){return this._for(new k(m),v)}forRange(m,v,$,C,J=this.opts.es5?r.varKinds.var:r.varKinds.let){let Y=this._scope.toName(m);return this._for(new I(J,Y,v,$),()=>C(Y))}forOf(m,v,$,C=r.varKinds.const){let J=this._scope.toName(m);if(this.opts.es5){let Y=v instanceof t.Name?v:this.var("_arr",v);return this.forRange("_i",0,(0,t._)`${Y}.length`,X=>{this.var(J,(0,t._)`${Y}[${X}]`),$(J)})}return this._for(new O("of",C,J,v),()=>$(J))}forIn(m,v,$,C=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(m,(0,t._)`Object.keys(${v})`,$);let J=this._scope.toName(m);return this._for(new O("in",C,J,v),()=>$(J))}endFor(){return this._endBlockNode(x)}label(m){return this._leafNode(new l(m))}break(m){return this._leafNode(new u(m))}return(m){let v=new _;if(this._blockNode(v),this.code(m),v.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(_)}try(m,v,$){if(!v&&!$)throw new Error('CodeGen: "try" without "catch" and "finally"');let C=new R;if(this._blockNode(C),this.code(m),v){let J=this.name("e");this._currNode=C.catch=new A(J),v(J)}return $&&(this._currNode=C.finally=new F,this.code($)),this._endBlockNode(A,F)}throw(m){return this._leafNode(new d(m))}block(m,v){return this._blockStarts.push(this._nodes.length),m&&this.code(m).endBlock(v),this}endBlock(m){let v=this._blockStarts.pop();if(v===void 0)throw new Error("CodeGen: not in self-balancing block");let $=this._nodes.length-v;if($<0||m!==void 0&&$!==m)throw new Error(`CodeGen: wrong number of nodes: ${$} vs ${m} expected`);return this._nodes.length=v,this}func(m,v=t.nil,$,C){return this._blockNode(new T(m,v,$)),C&&this.code(C).endFunc(),this}endFunc(){return this._endBlockNode(T)}optimize(m=1){for(;m-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(m){return this._currNode.nodes.push(m),this}_blockNode(m){this._currNode.nodes.push(m),this._nodes.push(m)}_endBlockNode(m,v){let $=this._currNode;if($ instanceof m||v&&$ instanceof v)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${v?`${m.kind}/${v.kind}`:m.kind}"`)}_elseNode(m){let v=this._currNode;if(!(v instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=v.else=m,this}get _root(){return this._nodes[0]}get _currNode(){let m=this._nodes;return m[m.length-1]}set _currNode(m){let v=this._nodes;v[v.length-1]=m}};e.CodeGen=M;function V(m,v){for(let $ in v)m[$]=(m[$]||0)+(v[$]||0);return m}function te(m,v){return v instanceof t._CodeOrName?V(m,v.names):m}function ne(m,v,$){if(m instanceof t.Name)return C(m);if(!J(m))return m;return new t._Code(m._items.reduce((Y,X)=>(X instanceof t.Name&&(X=C(X)),X instanceof t._Code?Y.push(...X._items):Y.push(X),Y),[]));function C(Y){let X=$[Y.str];return X===void 0||v[Y.str]!==1?Y:(delete v[Y.str],X)}function J(Y){return Y instanceof t._Code&&Y._items.some(X=>X instanceof t.Name&&v[X.str]===1&&$[X.str]!==void 0)}}function ye(m,v){for(let $ in v)m[$]=(m[$]||0)-(v[$]||0)}function Ce(m){return typeof m=="boolean"||typeof m=="number"||m===null?!m:(0,t._)`!${w(m)}`}e.not=Ce;let Ee=L(e.operators.AND);function qe(...m){return m.reduce(Ee)}e.and=qe;let we=L(e.operators.OR);function P(...m){return m.reduce(we)}e.or=P;function L(m){return(v,$)=>v===t.nil?$:$===t.nil?v:(0,t._)`${w(v)} ${m} ${w($)}`}function w(m){return m instanceof t.Name?m:(0,t._)`(${m})`}})),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=Se(),r=xd();function i(T){let _={};for(let R of T)_[R]=!0;return _}e.toHash=i;function n(T,_){return typeof _=="boolean"?_:Object.keys(_).length===0?!0:(o(T,_),!a(_,T.self.RULES.all))}e.alwaysValidSchema=n;function o(T,_=T.schema){let{opts:R,self:A}=T;if(!R.strictSchema||typeof _=="boolean")return;let F=A.RULES.keywords;for(let M in _)F[M]||O(T,`unknown keyword: "${M}"`)}e.checkUnknownRules=o;function a(T,_){if(typeof T=="boolean")return!T;for(let R in T)if(_[R])return!0;return!1}e.schemaHasRules=a;function s(T,_){if(typeof T=="boolean")return!T;for(let R in T)if(R!=="$ref"&&_.all[R])return!0;return!1}e.schemaHasRulesButRef=s;function c({topSchemaRef:T,schemaPath:_},R,A,F){if(!F){if(typeof R=="number"||typeof R=="boolean")return R;if(typeof R=="string")return(0,t._)`${R}`}return(0,t._)`${T}${_}${(0,t.getProperty)(A)}`}e.schemaRefOrVal=c;function l(T){return f(decodeURIComponent(T))}e.unescapeFragment=l;function u(T){return encodeURIComponent(d(T))}e.escapeFragment=u;function d(T){return typeof T=="number"?`${T}`:T.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=d;function f(T){return T.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=f;function h(T,_){if(Array.isArray(T))for(let R of T)_(R);else _(T)}e.eachItem=h;function g({mergeNames:T,mergeToName:_,mergeValues:R,resultToName:A}){return(F,M,V,te)=>{let ne=V===void 0?M:V instanceof t.Name?(M instanceof t.Name?T(F,M,V):_(F,M,V),V):M instanceof t.Name?(_(F,V,M),M):R(M,V);return te===t.Name&&!(ne instanceof t.Name)?A(F,ne):ne}}e.mergeEvaluated={props:g({mergeNames:(T,_,R)=>T.if((0,t._)`${R} !== true && ${_} !== undefined`,()=>{T.if((0,t._)`${_} === true`,()=>T.assign(R,!0),()=>T.assign(R,(0,t._)`${R} || {}`).code((0,t._)`Object.assign(${R}, ${_})`))}),mergeToName:(T,_,R)=>T.if((0,t._)`${R} !== true`,()=>{_===!0?T.assign(R,!0):(T.assign(R,(0,t._)`${R} || {}`),S(T,R,_))}),mergeValues:(T,_)=>T===!0?!0:{...T,..._},resultToName:b}),items:g({mergeNames:(T,_,R)=>T.if((0,t._)`${R} !== true && ${_} !== undefined`,()=>T.assign(R,(0,t._)`${_} === true ? true : ${R} > ${_} ? ${R} : ${_}`)),mergeToName:(T,_,R)=>T.if((0,t._)`${R} !== true`,()=>T.assign(R,_===!0?!0:(0,t._)`${R} > ${_} ? ${R} : ${_}`)),mergeValues:(T,_)=>T===!0?!0:Math.max(T,_),resultToName:(T,_)=>T.var("items",_)})};function b(T,_){if(_===!0)return T.var("props",!0);let R=T.var("props",(0,t._)`{}`);return _!==void 0&&S(T,R,_),R}e.evaluatedPropsToName=b;function S(T,_,R){Object.keys(R).forEach(A=>T.assign((0,t._)`${_}${(0,t.getProperty)(A)}`,!0))}e.setEvaluated=S;let y={};function x(T,_){return T.scopeValue("func",{ref:_,code:y[_.code]||(y[_.code]=new r._Code(_.code))})}e.useFunc=x;var k;(function(T){T[T.Num=0]="Num",T[T.Str=1]="Str"})(k||(e.Type=k={}));function I(T,_,R){if(T instanceof t.Name){let A=_===k.Num;return R?A?(0,t._)`"[" + ${T} + "]"`:(0,t._)`"['" + ${T} + "']"`:A?(0,t._)`"/" + ${T}`:(0,t._)`"/" + ${T}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return R?(0,t.getProperty)(T).toString():"/"+d(T)}e.getErrorPath=I;function O(T,_,R=T.opts.strictSchema){if(R){if(_=`strict mode: ${_}`,R===!0)throw new Error(_);T.self.logger.warn(_)}}e.checkStrictMode=O})),jt=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r={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=r})),Rd=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=Se(),r=Ie(),i=jt();e.keywordError={message:({keyword:S})=>(0,t.str)`must pass "${S}" keyword validation`},e.keyword$DataError={message:({keyword:S,schemaType:y})=>y?(0,t.str)`"${S}" keyword must be ${y} ($data)`:(0,t.str)`"${S}" keyword is invalid ($data)`};function n(S,y=e.keywordError,x,k){let{it:I}=S,{gen:O,compositeRule:T,allErrors:_}=I,R=d(S,y,x);k??(T||_)?c(O,R):l(I,(0,t._)`[${R}]`)}e.reportError=n;function o(S,y=e.keywordError,x){let{it:k}=S,{gen:I,compositeRule:O,allErrors:T}=k;c(I,d(S,y,x)),O||T||l(k,i.default.vErrors)}e.reportExtraError=o;function a(S,y){S.assign(i.default.errors,y),S.if((0,t._)`${i.default.vErrors} !== null`,()=>S.if(y,()=>S.assign((0,t._)`${i.default.vErrors}.length`,y),()=>S.assign(i.default.vErrors,null)))}e.resetErrorsCount=a;function s({gen:S,keyword:y,schemaValue:x,data:k,errsCount:I,it:O}){if(I===void 0)throw new Error("ajv implementation error");let T=S.name("err");S.forRange("i",I,i.default.errors,_=>{S.const(T,(0,t._)`${i.default.vErrors}[${_}]`),S.if((0,t._)`${T}.instancePath === undefined`,()=>S.assign((0,t._)`${T}.instancePath`,(0,t.strConcat)(i.default.instancePath,O.errorPath))),S.assign((0,t._)`${T}.schemaPath`,(0,t.str)`${O.errSchemaPath}/${y}`),O.opts.verbose&&(S.assign((0,t._)`${T}.schema`,x),S.assign((0,t._)`${T}.data`,k))})}e.extendErrors=s;function c(S,y){let x=S.const("err",y);S.if((0,t._)`${i.default.vErrors} === null`,()=>S.assign(i.default.vErrors,(0,t._)`[${x}]`),(0,t._)`${i.default.vErrors}.push(${x})`),S.code((0,t._)`${i.default.errors}++`)}function l(S,y){let{gen:x,validateName:k,schemaEnv:I}=S;I.$async?x.throw((0,t._)`new ${S.ValidationError}(${y})`):(x.assign((0,t._)`${k}.errors`,y),x.return(!1))}let u={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function d(S,y,x){let{createErrors:k}=S.it;return k===!1?(0,t._)`{}`:f(S,y,x)}function f(S,y,x={}){let{gen:k,it:I}=S,O=[h(I,x),g(S,x)];return b(S,y,O),k.object(...O)}function h({errorPath:S},{instancePath:y}){let x=y?(0,t.str)`${S}${(0,r.getErrorPath)(y,r.Type.Str)}`:S;return[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,x)]}function g({keyword:S,it:{errSchemaPath:y}},{schemaPath:x,parentSchema:k}){let I=k?y:(0,t.str)`${y}/${S}`;return x&&(I=(0,t.str)`${I}${(0,r.getErrorPath)(x,r.Type.Str)}`),[u.schemaPath,I]}function b(S,{params:y,message:x},k){let{keyword:I,data:O,schemaValue:T,it:_}=S,{opts:R,propertyName:A,topSchemaRef:F,schemaPath:M}=_;k.push([u.keyword,I],[u.params,typeof y=="function"?y(S):y||(0,t._)`{}`]),R.messages&&k.push([u.message,typeof x=="function"?x(S):x]),R.verbose&&k.push([u.schema,T],[u.parentSchema,(0,t._)`${F}${M}`],[i.default.data,O]),A&&k.push([u.propertyName,A])}})),HI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.boolOrEmptySchema=e.topBoolOrEmptySchema=void 0;let t=Rd(),r=Se(),i=jt(),n={message:"boolean schema is false"};function o(c){let{gen:l,schema:u,validateName:d}=c;u===!1?s(c,!1):typeof u=="object"&&u.$async===!0?l.return(i.default.data):(l.assign((0,r._)`${d}.errors`,null),l.return(!0))}e.topBoolOrEmptySchema=o;function a(c,l){let{gen:u,schema:d}=c;d===!1?(u.var(l,!1),s(c)):u.var(l,!0)}e.boolOrEmptySchema=a;function s(c,l){let{gen:u,data:d}=c,f={gen:u,keyword:"false schema",data:d,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:c};(0,t.reportError)(f,n,void 0,l)}})),k0=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 r(n){return typeof n=="string"&&t.has(n)}e.isJSONType=r;function i(){let n={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...n,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},n.number,n.string,n.array,n.object],post:{rules:[]},all:{},keywords:{}}}e.getRules=i})),w0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.shouldUseRule=e.shouldUseGroup=e.schemaHasRulesForType=void 0;function t({schema:n,self:o},a){let s=o.RULES.types[a];return s&&s!==!0&&r(n,s)}e.schemaHasRulesForType=t;function r(n,o){return o.rules.some(a=>i(n,a))}e.shouldUseGroup=r;function i(n,o){var a;return n[o.keyword]!==void 0||((a=o.definition.implements)===null||a===void 0?void 0:a.some(s=>n[s]!==void 0))}e.shouldUseRule=i})),Td=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=k0(),r=w0(),i=Rd(),n=Se(),o=Ie();var a;(function(k){k[k.Correct=0]="Correct",k[k.Wrong=1]="Wrong"})(a||(e.DataType=a={}));function s(k){let I=c(k.type);if(I.includes("null")){if(k.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!I.length&&k.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');k.nullable===!0&&I.push("null")}return I}e.getSchemaTypes=s;function c(k){let I=Array.isArray(k)?k:k?[k]:[];if(I.every(t.isJSONType))return I;throw new Error("type must be JSONType or JSONType[]: "+I.join(","))}e.getJSONTypes=c;function l(k,I){let{gen:O,data:T,opts:_}=k,R=d(I,_.coerceTypes),A=I.length>0&&!(R.length===0&&I.length===1&&(0,r.schemaHasRulesForType)(k,I[0]));if(A){let F=b(I,T,_.strictNumbers,a.Wrong);O.if(F,()=>{R.length?f(k,I,R):y(k)})}return A}e.coerceAndCheckDataType=l;let u=new Set(["string","number","integer","boolean","null"]);function d(k,I){return I?k.filter(O=>u.has(O)||I==="array"&&O==="array"):[]}function f(k,I,O){let{gen:T,data:_,opts:R}=k,A=T.let("dataType",(0,n._)`typeof ${_}`),F=T.let("coerced",(0,n._)`undefined`);R.coerceTypes==="array"&&T.if((0,n._)`${A} == 'object' && Array.isArray(${_}) && ${_}.length == 1`,()=>T.assign(_,(0,n._)`${_}[0]`).assign(A,(0,n._)`typeof ${_}`).if(b(I,_,R.strictNumbers),()=>T.assign(F,_))),T.if((0,n._)`${F} !== undefined`);for(let V of O)(u.has(V)||V==="array"&&R.coerceTypes==="array")&&M(V);T.else(),y(k),T.endIf(),T.if((0,n._)`${F} !== undefined`,()=>{T.assign(_,F),h(k,F)});function M(V){switch(V){case"string":T.elseIf((0,n._)`${A} == "number" || ${A} == "boolean"`).assign(F,(0,n._)`"" + ${_}`).elseIf((0,n._)`${_} === null`).assign(F,(0,n._)`""`);return;case"number":T.elseIf((0,n._)`${A} == "boolean" || ${_} === null
|
|
69
|
+
|| (${A} == "string" && ${_} && ${_} == +${_})`).assign(F,(0,n._)`+${_}`);return;case"integer":T.elseIf((0,n._)`${A} === "boolean" || ${_} === null
|
|
70
|
+
|| (${A} === "string" && ${_} && ${_} == +${_} && !(${_} % 1))`).assign(F,(0,n._)`+${_}`);return;case"boolean":T.elseIf((0,n._)`${_} === "false" || ${_} === 0 || ${_} === null`).assign(F,!1).elseIf((0,n._)`${_} === "true" || ${_} === 1`).assign(F,!0);return;case"null":T.elseIf((0,n._)`${_} === "" || ${_} === 0 || ${_} === false`),T.assign(F,null);return;case"array":T.elseIf((0,n._)`${A} === "string" || ${A} === "number"
|
|
71
|
+
|| ${A} === "boolean" || ${_} === null`).assign(F,(0,n._)`[${_}]`)}}}function h({gen:k,parentData:I,parentDataProperty:O},T){k.if((0,n._)`${I} !== undefined`,()=>k.assign((0,n._)`${I}[${O}]`,T))}function g(k,I,O,T=a.Correct){let _=T===a.Correct?n.operators.EQ:n.operators.NEQ,R;switch(k){case"null":return(0,n._)`${I} ${_} null`;case"array":R=(0,n._)`Array.isArray(${I})`;break;case"object":R=(0,n._)`${I} && typeof ${I} == "object" && !Array.isArray(${I})`;break;case"integer":R=A((0,n._)`!(${I} % 1) && !isNaN(${I})`);break;case"number":R=A();break;default:return(0,n._)`typeof ${I} ${_} ${k}`}return T===a.Correct?R:(0,n.not)(R);function A(F=n.nil){return(0,n.and)((0,n._)`typeof ${I} == "number"`,F,O?(0,n._)`isFinite(${I})`:n.nil)}}e.checkDataType=g;function b(k,I,O,T){if(k.length===1)return g(k[0],I,O,T);let _,R=(0,o.toHash)(k);if(R.array&&R.object){let A=(0,n._)`typeof ${I} != "object"`;_=R.null?A:(0,n._)`!${I} || ${A}`,delete R.null,delete R.array,delete R.object}else _=n.nil;R.number&&delete R.integer;for(let A in R)_=(0,n.and)(_,g(A,I,O,T));return _}e.checkDataTypes=b;let S={message:({schema:k})=>`must be ${k}`,params:({schema:k,schemaValue:I})=>typeof k=="string"?(0,n._)`{type: ${k}}`:(0,n._)`{type: ${I}}`};function y(k){let I=x(k);(0,i.reportError)(I,S)}e.reportTypeError=y;function x(k){let{gen:I,data:O,schema:T}=k,_=(0,o.schemaRefOrVal)(k,T,"type");return{gen:I,keyword:"type",data:O,schema:T.type,schemaCode:_,schemaValue:_,parentSchema:T,params:{},it:k}}})),ZI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.assignDefaults=void 0;let t=Se(),r=Ie();function i(o,a){let{properties:s,items:c}=o.schema;if(a==="object"&&s)for(let l in s)n(o,l,s[l].default);else a==="array"&&Array.isArray(c)&&c.forEach((l,u)=>n(o,u,l.default))}e.assignDefaults=i;function n(o,a,s){let{gen:c,compositeRule:l,data:u,opts:d}=o;if(s===void 0)return;let f=(0,t._)`${u}${(0,t.getProperty)(a)}`;if(l){(0,r.checkStrictMode)(o,`default is ignored for: ${f}`);return}let h=(0,t._)`${f} === undefined`;d.useDefaults==="empty"&&(h=(0,t._)`${h} || ${f} === null || ${f} === ""`),c.if(h,(0,t._)`${f} = ${(0,t.stringify)(s)}`)}})),Mt=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=Se(),r=Ie(),i=jt(),n=Ie();function o(k,I){let{gen:O,data:T,it:_}=k;O.if(d(O,T,I,_.opts.ownProperties),()=>{k.setParams({missingProperty:(0,t._)`${I}`},!0),k.error()})}e.checkReportMissingProp=o;function a({gen:k,data:I,it:{opts:O}},T,_){return(0,t.or)(...T.map(R=>(0,t.and)(d(k,I,R,O.ownProperties),(0,t._)`${_} = ${R}`)))}e.checkMissingProp=a;function s(k,I){k.setParams({missingProperty:I},!0),k.error()}e.reportMissingProp=s;function c(k){return k.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,t._)`Object.prototype.hasOwnProperty`})}e.hasPropFunc=c;function l(k,I,O){return(0,t._)`${c(k)}.call(${I}, ${O})`}e.isOwnProperty=l;function u(k,I,O,T){let _=(0,t._)`${I}${(0,t.getProperty)(O)} !== undefined`;return T?(0,t._)`${_} && ${l(k,I,O)}`:_}e.propertyInData=u;function d(k,I,O,T){let _=(0,t._)`${I}${(0,t.getProperty)(O)} === undefined`;return T?(0,t.or)(_,(0,t.not)(l(k,I,O))):_}e.noPropertyInData=d;function f(k){return k?Object.keys(k).filter(I=>I!=="__proto__"):[]}e.allSchemaProperties=f;function h(k,I){return f(I).filter(O=>!(0,r.alwaysValidSchema)(k,I[O]))}e.schemaProperties=h;function g({schemaCode:k,data:I,it:{gen:O,topSchemaRef:T,schemaPath:_,errorPath:R},it:A},F,M,V){let te=V?(0,t._)`${k}, ${I}, ${T}${_}`:I,ne=[[i.default.instancePath,(0,t.strConcat)(i.default.instancePath,R)],[i.default.parentData,A.parentData],[i.default.parentDataProperty,A.parentDataProperty],[i.default.rootData,i.default.rootData]];A.opts.dynamicRef&&ne.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);let ye=(0,t._)`${te}, ${O.object(...ne)}`;return M!==t.nil?(0,t._)`${F}.call(${M}, ${ye})`:(0,t._)`${F}(${ye})`}e.callValidateCode=g;let b=(0,t._)`new RegExp`;function S({gen:k,it:{opts:I}},O){let T=I.unicodeRegExp?"u":"",{regExp:_}=I.code,R=_(O,T);return k.scopeValue("pattern",{key:R.toString(),ref:R,code:(0,t._)`${_.code==="new RegExp"?b:(0,n.useFunc)(k,_)}(${O}, ${T})`})}e.usePattern=S;function y(k){let{gen:I,data:O,keyword:T,it:_}=k,R=I.name("valid");if(_.allErrors){let F=I.let("valid",!0);return A(()=>I.assign(F,!1)),F}return I.var(R,!0),A(()=>I.break()),R;function A(F){let M=I.const("len",(0,t._)`${O}.length`);I.forRange("i",0,M,V=>{k.subschema({keyword:T,dataProp:V,dataPropType:r.Type.Num},R),I.if((0,t.not)(R),F)})}}e.validateArray=y;function x(k){let{gen:I,schema:O,keyword:T,it:_}=k;if(!Array.isArray(O))throw new Error("ajv implementation error");if(O.some(F=>(0,r.alwaysValidSchema)(_,F))&&!_.opts.unevaluated)return;let R=I.let("valid",!1),A=I.name("_valid");I.block(()=>O.forEach((F,M)=>{let V=k.subschema({keyword:T,schemaProp:M,compositeRule:!0},A);I.assign(R,(0,t._)`${R} || ${A}`),k.mergeValidEvaluated(V,A)||I.if((0,t.not)(R))})),k.result(R,()=>k.reset(),()=>k.error(!0))}e.validateUnion=x})),GI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateKeywordUsage=e.validSchemaType=e.funcKeywordCode=e.macroKeywordCode=void 0;let t=Se(),r=jt(),i=Mt(),n=Rd();function o(h,g){let{gen:b,keyword:S,schema:y,parentSchema:x,it:k}=h,I=g.macro.call(k.self,y,x,k),O=u(b,S,I);k.opts.validateSchema!==!1&&k.self.validateSchema(I,!0);let T=b.name("valid");h.subschema({schema:I,schemaPath:t.nil,errSchemaPath:`${k.errSchemaPath}/${S}`,topSchemaRef:O,compositeRule:!0},T),h.pass(T,()=>h.error(!0))}e.macroKeywordCode=o;function a(h,g){var b;let{gen:S,keyword:y,schema:x,parentSchema:k,$data:I,it:O}=h;l(O,g);let T=u(S,y,!I&&g.compile?g.compile.call(O.self,x,k,O):g.validate),_=S.let("valid");h.block$data(_,R),h.ok((b=g.valid)!==null&&b!==void 0?b:_);function R(){if(g.errors===!1)M(),g.modifying&&s(h),V(()=>h.error());else{let te=g.async?A():F();g.modifying&&s(h),V(()=>c(h,te))}}function A(){let te=S.let("ruleErrs",null);return S.try(()=>M((0,t._)`await `),ne=>S.assign(_,!1).if((0,t._)`${ne} instanceof ${O.ValidationError}`,()=>S.assign(te,(0,t._)`${ne}.errors`),()=>S.throw(ne))),te}function F(){let te=(0,t._)`${T}.errors`;return S.assign(te,null),M(t.nil),te}function M(te=g.async?(0,t._)`await `:t.nil){let ne=O.opts.passContext?r.default.this:r.default.self,ye=!("compile"in g&&!I||g.schema===!1);S.assign(_,(0,t._)`${te}${(0,i.callValidateCode)(h,T,ne,ye)}`,g.modifying)}function V(te){var ne;S.if((0,t.not)((ne=g.valid)!==null&&ne!==void 0?ne:_),te)}}e.funcKeywordCode=a;function s(h){let{gen:g,data:b,it:S}=h;g.if(S.parentData,()=>g.assign(b,(0,t._)`${S.parentData}[${S.parentDataProperty}]`))}function c(h,g){let{gen:b}=h;b.if((0,t._)`Array.isArray(${g})`,()=>{b.assign(r.default.vErrors,(0,t._)`${r.default.vErrors} === null ? ${g} : ${r.default.vErrors}.concat(${g})`).assign(r.default.errors,(0,t._)`${r.default.vErrors}.length`),(0,n.extendErrors)(h)},()=>h.error())}function l({schemaEnv:h},g){if(g.async&&!h.$async)throw new Error("async keyword in sync schema")}function u(h,g,b){if(b===void 0)throw new Error(`keyword "${g}" failed to compile`);return h.scopeValue("keyword",typeof b=="function"?{ref:b}:{ref:b,code:(0,t.stringify)(b)})}function d(h,g,b=!1){return!g.length||g.some(S=>S==="array"?Array.isArray(h):S==="object"?h&&typeof h=="object"&&!Array.isArray(h):typeof h==S||b&&typeof h>"u")}e.validSchemaType=d;function f({schema:h,opts:g,self:b,errSchemaPath:S},y,x){if(Array.isArray(y.keyword)?!y.keyword.includes(x):y.keyword!==x)throw new Error("ajv implementation error");let k=y.dependencies;if(k?.some(I=>!Object.prototype.hasOwnProperty.call(h,I)))throw new Error(`parent schema must have dependencies of ${x}: ${k.join(",")}`);if(y.validateSchema&&!y.validateSchema(h[x])){let I=`keyword "${x}" value is invalid at path "${S}": `+b.errorsText(y.validateSchema.errors);if(g.validateSchema==="log")b.logger.error(I);else throw new Error(I)}}e.validateKeywordUsage=f})),JI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.extendSubschemaMode=e.extendSubschemaData=e.getSubschema=void 0;let t=Se(),r=Ie();function i(a,{keyword:s,schemaProp:c,schema:l,schemaPath:u,errSchemaPath:d,topSchemaRef:f}){if(s!==void 0&&l!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(s!==void 0){let h=a.schema[s];return c===void 0?{schema:h,schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(s)}`,errSchemaPath:`${a.errSchemaPath}/${s}`}:{schema:h[c],schemaPath:(0,t._)`${a.schemaPath}${(0,t.getProperty)(s)}${(0,t.getProperty)(c)}`,errSchemaPath:`${a.errSchemaPath}/${s}/${(0,r.escapeFragment)(c)}`}}if(l!==void 0){if(u===void 0||d===void 0||f===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:l,schemaPath:u,topSchemaRef:f,errSchemaPath:d}}throw new Error('either "keyword" or "schema" must be passed')}e.getSubschema=i;function n(a,s,{dataProp:c,dataPropType:l,data:u,dataTypes:d,propertyName:f}){if(u!==void 0&&c!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');let{gen:h}=s;if(c!==void 0){let{errorPath:b,dataPathArr:S,opts:y}=s;g(h.let("data",(0,t._)`${s.data}${(0,t.getProperty)(c)}`,!0)),a.errorPath=(0,t.str)`${b}${(0,r.getErrorPath)(c,l,y.jsPropertySyntax)}`,a.parentDataProperty=(0,t._)`${c}`,a.dataPathArr=[...S,a.parentDataProperty]}u!==void 0&&(g(u instanceof t.Name?u:h.let("data",u,!0)),f!==void 0&&(a.propertyName=f)),d&&(a.dataTypes=d);function g(b){a.data=b,a.dataLevel=s.dataLevel+1,a.dataTypes=[],s.definedProperties=new Set,a.parentData=s.data,a.dataNames=[...s.dataNames,b]}}e.extendSubschemaData=n;function o(a,{jtdDiscriminator:s,jtdMetadata:c,compositeRule:l,createErrors:u,allErrors:d}){l!==void 0&&(a.compositeRule=l),u!==void 0&&(a.createErrors=u),d!==void 0&&(a.allErrors=d),a.jtdDiscriminator=s,a.jtdMetadata=c}e.extendSubschemaMode=o})),$0=K(((e,t)=>{t.exports=function r(i,n){if(i===n)return!0;if(i&&n&&typeof i=="object"&&typeof n=="object"){if(i.constructor!==n.constructor)return!1;var o,a,s;if(Array.isArray(i)){if(o=i.length,o!=n.length)return!1;for(a=o;a--!==0;)if(!r(i[a],n[a]))return!1;return!0}if(i.constructor===RegExp)return i.source===n.source&&i.flags===n.flags;if(i.valueOf!==Object.prototype.valueOf)return i.valueOf()===n.valueOf();if(i.toString!==Object.prototype.toString)return i.toString()===n.toString();if(s=Object.keys(i),o=s.length,o!==Object.keys(n).length)return!1;for(a=o;a--!==0;)if(!Object.prototype.hasOwnProperty.call(n,s[a]))return!1;for(a=o;a--!==0;){var c=s[a];if(!r(i[c],n[c]))return!1}return!0}return i!==i&&n!==n}})),BI=K(((e,t)=>{var r=t.exports=function(o,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(){};i(a,c,l,o,"",o)};r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.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 i(o,a,s,c,l,u,d,f,h,g){if(c&&typeof c=="object"&&!Array.isArray(c)){a(c,l,u,d,f,h,g);for(var b in c){var S=c[b];if(Array.isArray(S)){if(b in r.arrayKeywords)for(var y=0;y<S.length;y++)i(o,a,s,S[y],l+"/"+b+"/"+y,u,l,b,c,y)}else if(b in r.propsKeywords){if(S&&typeof S=="object")for(var x in S)i(o,a,s,S[x],l+"/"+b+"/"+n(x),u,l,b,c,x)}else(b in r.keywords||o.allKeys&&!(b in r.skipKeywords))&&i(o,a,s,S,l+"/"+b,u,l,b,c)}s(c,l,u,d,f,h,g)}}function n(o){return o.replace(/~/g,"~0").replace(/\//g,"~1")}})),Id=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(),r=$0(),i=BI(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function o(S,y=!0){return typeof S=="boolean"?!0:y===!0?!s(S):y?c(S)<=y:!1}e.inlineRef=o;let a=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function s(S){for(let y in S){if(a.has(y))return!0;let x=S[y];if(Array.isArray(x)&&x.some(s)||typeof x=="object"&&s(x))return!0}return!1}function c(S){let y=0;for(let x in S){if(x==="$ref")return 1/0;if(y++,!n.has(x)&&(typeof S[x]=="object"&&(0,t.eachItem)(S[x],k=>y+=c(k)),y===1/0))return 1/0}return y}function l(S,y="",x){return x!==!1&&(y=f(y)),u(S,S.parse(y))}e.getFullPath=l;function u(S,y){return S.serialize(y).split("#")[0]+"#"}e._getFullPath=u;let d=/#\/?$/;function f(S){return S?S.replace(d,""):""}e.normalizeId=f;function h(S,y,x){return x=f(x),S.resolve(y,x)}e.resolveUrl=h;let g=/^[a-z_][-a-z0-9._]*$/i;function b(S,y){if(typeof S=="boolean")return{};let{schemaId:x,uriResolver:k}=this.opts,I=f(S[x]||y),O={"":I},T=l(k,I,!1),_={},R=new Set;return i(S,{allKeys:!0},(M,V,te,ne)=>{if(ne===void 0)return;let ye=T+V,Ce=O[ne];typeof M[x]=="string"&&(Ce=Ee.call(this,M[x])),qe.call(this,M.$anchor),qe.call(this,M.$dynamicAnchor),O[V]=Ce;function Ee(we){let P=this.opts.uriResolver.resolve;if(we=f(Ce?P(Ce,we):we),R.has(we))throw F(we);R.add(we);let L=this.refs[we];return typeof L=="string"&&(L=this.refs[L]),typeof L=="object"?A(M,L.schema,we):we!==f(ye)&&(we[0]==="#"?(A(M,_[we],we),_[we]=M):this.refs[we]=ye),we}function qe(we){if(typeof we=="string"){if(!g.test(we))throw new Error(`invalid anchor "${we}"`);Ee.call(this,`#${we}`)}}}),_;function A(M,V,te){if(V!==void 0&&!r(M,V))throw F(te)}function F(M){return new Error(`reference "${M}" resolves to more than one schema`)}}e.getSchemaRefs=b})),Mo=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.getData=e.KeywordCxt=e.validateFunctionCode=void 0;let t=HI(),r=Td(),i=w0(),n=Td(),o=ZI(),a=GI(),s=JI(),c=Se(),l=jt(),u=Id(),d=Ie(),f=Rd();function h(z){if(T(z)&&(R(z),O(z))){y(z);return}g(z,()=>(0,t.topBoolOrEmptySchema)(z))}e.validateFunctionCode=h;function g({gen:z,validateName:D,schema:B,schemaEnv:se,opts:ue},pe){ue.code.es5?z.func(D,(0,c._)`${l.default.data}, ${l.default.valCxt}`,se.$async,()=>{z.code((0,c._)`"use strict"; ${k(B,ue)}`),S(z,ue),z.code(pe)}):z.func(D,(0,c._)`${l.default.data}, ${b(ue)}`,se.$async,()=>z.code(k(B,ue)).code(pe))}function b(z){return(0,c._)`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${z.dynamicRef?(0,c._)`, ${l.default.dynamicAnchors}={}`:c.nil}}={}`}function S(z,D){z.if(l.default.valCxt,()=>{z.var(l.default.instancePath,(0,c._)`${l.default.valCxt}.${l.default.instancePath}`),z.var(l.default.parentData,(0,c._)`${l.default.valCxt}.${l.default.parentData}`),z.var(l.default.parentDataProperty,(0,c._)`${l.default.valCxt}.${l.default.parentDataProperty}`),z.var(l.default.rootData,(0,c._)`${l.default.valCxt}.${l.default.rootData}`),D.dynamicRef&&z.var(l.default.dynamicAnchors,(0,c._)`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{z.var(l.default.instancePath,(0,c._)`""`),z.var(l.default.parentData,(0,c._)`undefined`),z.var(l.default.parentDataProperty,(0,c._)`undefined`),z.var(l.default.rootData,l.default.data),D.dynamicRef&&z.var(l.default.dynamicAnchors,(0,c._)`{}`)})}function y(z){let{schema:D,opts:B,gen:se}=z;g(z,()=>{B.$comment&&D.$comment&&ne(z),M(z),se.let(l.default.vErrors,null),se.let(l.default.errors,0),B.unevaluated&&x(z),A(z),ye(z)})}function x(z){let{gen:D,validateName:B}=z;z.evaluated=D.const("evaluated",(0,c._)`${B}.evaluated`),D.if((0,c._)`${z.evaluated}.dynamicProps`,()=>D.assign((0,c._)`${z.evaluated}.props`,(0,c._)`undefined`)),D.if((0,c._)`${z.evaluated}.dynamicItems`,()=>D.assign((0,c._)`${z.evaluated}.items`,(0,c._)`undefined`))}function k(z,D){let B=typeof z=="object"&&z[D.schemaId];return B&&(D.code.source||D.code.process)?(0,c._)`/*# sourceURL=${B} */`:c.nil}function I(z,D){if(T(z)&&(R(z),O(z))){_(z,D);return}(0,t.boolOrEmptySchema)(z,D)}function O({schema:z,self:D}){if(typeof z=="boolean")return!z;for(let B in z)if(D.RULES.all[B])return!0;return!1}function T(z){return typeof z.schema!="boolean"}function _(z,D){let{schema:B,gen:se,opts:ue}=z;ue.$comment&&B.$comment&&ne(z),V(z),te(z);let pe=se.const("_errs",l.default.errors);A(z,pe),se.var(D,(0,c._)`${pe} === ${l.default.errors}`)}function R(z){(0,d.checkUnknownRules)(z),F(z)}function A(z,D){if(z.opts.jtd)return Ee(z,[],!1,D);let B=(0,r.getSchemaTypes)(z.schema);Ee(z,B,!(0,r.coerceAndCheckDataType)(z,B),D)}function F(z){let{schema:D,errSchemaPath:B,opts:se,self:ue}=z;D.$ref&&se.ignoreKeywordsWithRef&&(0,d.schemaHasRulesButRef)(D,ue.RULES)&&ue.logger.warn(`$ref: keywords ignored in schema at path "${B}"`)}function M(z){let{schema:D,opts:B}=z;D.default!==void 0&&B.useDefaults&&B.strictSchema&&(0,d.checkStrictMode)(z,"default is ignored in the schema root")}function V(z){let D=z.schema[z.opts.schemaId];D&&(z.baseId=(0,u.resolveUrl)(z.opts.uriResolver,z.baseId,D))}function te(z){if(z.schema.$async&&!z.schemaEnv.$async)throw new Error("async schema in sync schema")}function ne({gen:z,schemaEnv:D,schema:B,errSchemaPath:se,opts:ue}){let pe=B.$comment;if(ue.$comment===!0)z.code((0,c._)`${l.default.self}.logger.log(${pe})`);else if(typeof ue.$comment=="function"){let Re=(0,c.str)`${se}/$comment`,Fe=z.scopeValue("root",{ref:D.root});z.code((0,c._)`${l.default.self}.opts.$comment(${pe}, ${Re}, ${Fe}.schema)`)}}function ye(z){let{gen:D,schemaEnv:B,validateName:se,ValidationError:ue,opts:pe}=z;B.$async?D.if((0,c._)`${l.default.errors} === 0`,()=>D.return(l.default.data),()=>D.throw((0,c._)`new ${ue}(${l.default.vErrors})`)):(D.assign((0,c._)`${se}.errors`,l.default.vErrors),pe.unevaluated&&Ce(z),D.return((0,c._)`${l.default.errors} === 0`))}function Ce({gen:z,evaluated:D,props:B,items:se}){B instanceof c.Name&&z.assign((0,c._)`${D}.props`,B),se instanceof c.Name&&z.assign((0,c._)`${D}.items`,se)}function Ee(z,D,B,se){let{gen:ue,schema:pe,data:Re,allErrors:Fe,opts:Oe,self:Ve}=z,{RULES:Le}=Ve;if(pe.$ref&&(Oe.ignoreKeywordsWithRef||!(0,d.schemaHasRulesButRef)(pe,Le))){ue.block(()=>Y(z,"$ref",Le.all.$ref.definition));return}Oe.jtd||we(z,D),ue.block(()=>{for(let Qe of Le.rules)xt(Qe);xt(Le.post)});function xt(Qe){(0,i.shouldUseGroup)(pe,Qe)&&(Qe.type?(ue.if((0,n.checkDataType)(Qe.type,Re,Oe.strictNumbers)),qe(z,Qe),D.length===1&&D[0]===Qe.type&&B&&(ue.else(),(0,n.reportTypeError)(z)),ue.endIf()):qe(z,Qe),Fe||ue.if((0,c._)`${l.default.errors} === ${se||0}`))}}function qe(z,D){let{gen:B,schema:se,opts:{useDefaults:ue}}=z;ue&&(0,o.assignDefaults)(z,D.type),B.block(()=>{for(let pe of D.rules)(0,i.shouldUseRule)(se,pe)&&Y(z,pe.keyword,pe.definition,D.type)})}function we(z,D){z.schemaEnv.meta||!z.opts.strictTypes||(P(z,D),z.opts.allowUnionTypes||L(z,D),w(z,z.dataTypes))}function P(z,D){if(D.length){if(!z.dataTypes.length){z.dataTypes=D;return}D.forEach(B=>{v(z.dataTypes,B)||C(z,`type "${B}" not allowed by context "${z.dataTypes.join(",")}"`)}),$(z,D)}}function L(z,D){D.length>1&&!(D.length===2&&D.includes("null"))&&C(z,"use allowUnionTypes to allow union type keyword")}function w(z,D){let B=z.self.RULES.all;for(let se in B){let ue=B[se];if(typeof ue=="object"&&(0,i.shouldUseRule)(z.schema,ue)){let{type:pe}=ue.definition;pe.length&&!pe.some(Re=>m(D,Re))&&C(z,`missing type "${pe.join(",")}" for keyword "${se}"`)}}}function m(z,D){return z.includes(D)||D==="number"&&z.includes("integer")}function v(z,D){return z.includes(D)||D==="integer"&&z.includes("number")}function $(z,D){let B=[];for(let se of z.dataTypes)v(D,se)?B.push(se):D.includes("integer")&&se==="number"&&B.push("integer");z.dataTypes=B}function C(z,D){let B=z.schemaEnv.baseId+z.errSchemaPath;D+=` at "${B}" (strictTypes)`,(0,d.checkStrictMode)(z,D,z.opts.strictTypes)}var J=class{constructor(z,D,B){if((0,a.validateKeywordUsage)(z,D,B),this.gen=z.gen,this.allErrors=z.allErrors,this.keyword=B,this.data=z.data,this.schema=z.schema[B],this.$data=D.$data&&z.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,d.schemaRefOrVal)(z,this.schema,B,this.$data),this.schemaType=D.schemaType,this.parentSchema=z.schema,this.params={},this.it=z,this.def=D,this.$data)this.schemaCode=z.gen.const("vSchema",Pe(this.$data,z));else if(this.schemaCode=this.schemaValue,!(0,a.validSchemaType)(this.schema,D.schemaType,D.allowUndefined))throw new Error(`${B} value must be ${JSON.stringify(D.schemaType)}`);("code"in D?D.trackErrors:D.errors!==!1)&&(this.errsCount=z.gen.const("_errs",l.default.errors))}result(z,D,B){this.failResult((0,c.not)(z),D,B)}failResult(z,D,B){this.gen.if(z),B?B():this.error(),D?(this.gen.else(),D(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(z,D){this.failResult((0,c.not)(z),void 0,D)}fail(z){if(z===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(z),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(z){if(!this.$data)return this.fail(z);let{schemaCode:D}=this;this.fail((0,c._)`${D} !== undefined && (${(0,c.or)(this.invalid$data(),z)})`)}error(z,D,B){if(D){this.setParams(D),this._error(z,B),this.setParams({});return}this._error(z,B)}_error(z,D){(z?f.reportExtraError:f.reportError)(this,this.def.error,D)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(z){this.allErrors||this.gen.if(z)}setParams(z,D){D?Object.assign(this.params,z):this.params=z}block$data(z,D,B=c.nil){this.gen.block(()=>{this.check$data(z,B),D()})}check$data(z=c.nil,D=c.nil){if(!this.$data)return;let{gen:B,schemaCode:se,schemaType:ue,def:pe}=this;B.if((0,c.or)((0,c._)`${se} === undefined`,D)),z!==c.nil&&B.assign(z,!0),(ue.length||pe.validateSchema)&&(B.elseIf(this.invalid$data()),this.$dataError(),z!==c.nil&&B.assign(z,!1)),B.else()}invalid$data(){let{gen:z,schemaCode:D,schemaType:B,def:se,it:ue}=this;return(0,c.or)(pe(),Re());function pe(){if(B.length){if(!(D instanceof c.Name))throw new Error("ajv implementation error");let Fe=Array.isArray(B)?B:[B];return(0,c._)`${(0,n.checkDataTypes)(Fe,D,ue.opts.strictNumbers,n.DataType.Wrong)}`}return c.nil}function Re(){if(se.validateSchema){let Fe=z.scopeValue("validate$data",{ref:se.validateSchema});return(0,c._)`!${Fe}(${D})`}return c.nil}}subschema(z,D){let B=(0,s.getSubschema)(this.it,z);(0,s.extendSubschemaData)(B,this.it,z),(0,s.extendSubschemaMode)(B,z);let se={...this.it,...B,items:void 0,props:void 0};return I(se,D),se}mergeEvaluated(z,D){let{it:B,gen:se}=this;B.opts.unevaluated&&(B.props!==!0&&z.props!==void 0&&(B.props=d.mergeEvaluated.props(se,z.props,B.props,D)),B.items!==!0&&z.items!==void 0&&(B.items=d.mergeEvaluated.items(se,z.items,B.items,D)))}mergeValidEvaluated(z,D){let{it:B,gen:se}=this;if(B.opts.unevaluated&&(B.props!==!0||B.items!==!0))return se.if(D,()=>this.mergeEvaluated(z,c.Name)),!0}};e.KeywordCxt=J;function Y(z,D,B,se){let ue=new J(z,B,D);"code"in B?B.code(ue,se):ue.$data&&B.validate?(0,a.funcKeywordCode)(ue,B):"macro"in B?(0,a.macroKeywordCode)(ue,B):(B.compile||B.validate)&&(0,a.funcKeywordCode)(ue,B)}let X=/^\/(?:[^~]|~0|~1)*$/,_e=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Pe(z,{dataLevel:D,dataNames:B,dataPathArr:se}){let ue,pe;if(z==="")return l.default.rootData;if(z[0]==="/"){if(!X.test(z))throw new Error(`Invalid JSON-pointer: ${z}`);ue=z,pe=l.default.rootData}else{let Ve=_e.exec(z);if(!Ve)throw new Error(`Invalid JSON-pointer: ${z}`);let Le=+Ve[1];if(ue=Ve[2],ue==="#"){if(Le>=D)throw new Error(Oe("property/index",Le));return se[D-Le]}if(Le>D)throw new Error(Oe("data",Le));if(pe=B[D-Le],!ue)return pe}let Re=pe,Fe=ue.split("/");for(let Ve of Fe)Ve&&(pe=(0,c._)`${pe}${(0,c.getProperty)((0,d.unescapeJsonPointer)(Ve))}`,Re=(0,c._)`${Re} && ${pe}`);return Re;function Oe(Ve,Le){return`Cannot access ${Ve} ${Le} levels up, current level is ${D}`}}e.getData=Pe})),Ja=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});var t=class extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}};e.default=t})),qo=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Id();var r=class extends Error{constructor(i,n,o,a){super(a||`can't resolve reference ${o} from id ${n}`),this.missingRef=(0,t.resolveUrl)(i,n,o),this.missingSchema=(0,t.normalizeId)((0,t.getFullPath)(i,this.missingRef))}};e.default=r})),zd=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.resolveSchema=e.getCompilingSchema=e.resolveRef=e.compileSchema=e.SchemaEnv=void 0;let t=Se(),r=Ja(),i=jt(),n=Id(),o=Ie(),a=Mo();var s=class{constructor(y){var x;this.refs={},this.dynamicAnchors={};let k;typeof y.schema=="object"&&(k=y.schema),this.schema=y.schema,this.schemaId=y.schemaId,this.root=y.root||this,this.baseId=(x=y.baseId)!==null&&x!==void 0?x:(0,n.normalizeId)(k?.[y.schemaId||"$id"]),this.schemaPath=y.schemaPath,this.localRefs=y.localRefs,this.meta=y.meta,this.$async=k?.$async,this.refs={}}};e.SchemaEnv=s;function c(y){let x=d.call(this,y);if(x)return x;let k=(0,n.getFullPath)(this.opts.uriResolver,y.root.baseId),{es5:I,lines:O}=this.opts.code,{ownProperties:T}=this.opts,_=new t.CodeGen(this.scope,{es5:I,lines:O,ownProperties:T}),R;y.$async&&(R=_.scopeValue("Error",{ref:r.default,code:(0,t._)`require("ajv/dist/runtime/validation_error").default`}));let A=_.scopeName("validate");y.validateName=A;let F={gen:_,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[t.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:_.scopeValue("schema",this.opts.code.source===!0?{ref:y.schema,code:(0,t.stringify)(y.schema)}:{ref:y.schema}),validateName:A,ValidationError:R,schema:y.schema,schemaEnv:y,rootId:k,baseId:y.baseId||k,schemaPath:t.nil,errSchemaPath:y.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,t._)`""`,opts:this.opts,self:this},M;try{this._compilations.add(y),(0,a.validateFunctionCode)(F),_.optimize(this.opts.code.optimize);let V=_.toString();M=`${_.scopeRefs(i.default.scope)}return ${V}`,this.opts.code.process&&(M=this.opts.code.process(M,y));let te=new Function(`${i.default.self}`,`${i.default.scope}`,M)(this,this.scope.get());if(this.scope.value(A,{ref:te}),te.errors=null,te.schema=y.schema,te.schemaEnv=y,y.$async&&(te.$async=!0),this.opts.code.source===!0&&(te.source={validateName:A,validateCode:V,scopeValues:_._values}),this.opts.unevaluated){let{props:ne,items:ye}=F;te.evaluated={props:ne instanceof t.Name?void 0:ne,items:ye instanceof t.Name?void 0:ye,dynamicProps:ne instanceof t.Name,dynamicItems:ye instanceof t.Name},te.source&&(te.source.evaluated=(0,t.stringify)(te.evaluated))}return y.validate=te,y}catch(V){throw delete y.validate,delete y.validateName,M&&this.logger.error("Error compiling schema, function code:",M),V}finally{this._compilations.delete(y)}}e.compileSchema=c;function l(y,x,k){var I;k=(0,n.resolveUrl)(this.opts.uriResolver,x,k);let O=y.refs[k];if(O)return O;let T=h.call(this,y,k);if(T===void 0){let _=(I=y.localRefs)===null||I===void 0?void 0:I[k],{schemaId:R}=this.opts;_&&(T=new s({schema:_,schemaId:R,root:y,baseId:x}))}if(T!==void 0)return y.refs[k]=u.call(this,T)}e.resolveRef=l;function u(y){return(0,n.inlineRef)(y.schema,this.opts.inlineRefs)?y.schema:y.validate?y:c.call(this,y)}function d(y){for(let x of this._compilations)if(f(x,y))return x}e.getCompilingSchema=d;function f(y,x){return y.schema===x.schema&&y.root===x.root&&y.baseId===x.baseId}function h(y,x){let k;for(;typeof(k=this.refs[x])=="string";)x=k;return k||this.schemas[x]||g.call(this,y,x)}function g(y,x){let k=this.opts.uriResolver.parse(x),I=(0,n._getFullPath)(this.opts.uriResolver,k),O=(0,n.getFullPath)(this.opts.uriResolver,y.baseId,void 0);if(Object.keys(y.schema).length>0&&I===O)return S.call(this,k,y);let T=(0,n.normalizeId)(I),_=this.refs[T]||this.schemas[T];if(typeof _=="string"){let R=g.call(this,y,_);return typeof R?.schema!="object"?void 0:S.call(this,k,R)}if(typeof _?.schema=="object"){if(_.validate||c.call(this,_),T===(0,n.normalizeId)(x)){let{schema:R}=_,{schemaId:A}=this.opts,F=R[A];return F&&(O=(0,n.resolveUrl)(this.opts.uriResolver,O,F)),new s({schema:R,schemaId:A,root:y,baseId:O})}return S.call(this,k,_)}}e.resolveSchema=g;let b=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function S(y,{baseId:x,schema:k,root:I}){var O;if(((O=y.fragment)===null||O===void 0?void 0:O[0])!=="/")return;for(let R of y.fragment.slice(1).split("/")){if(typeof k=="boolean")return;let A=k[(0,o.unescapeFragment)(R)];if(A===void 0)return;k=A;let F=typeof k=="object"&&k[this.opts.schemaId];!b.has(R)&&F&&(x=(0,n.resolveUrl)(this.opts.uriResolver,x,F))}let T;if(typeof k!="boolean"&&k.$ref&&!(0,o.schemaHasRulesButRef)(k,this.RULES)){let R=(0,n.resolveUrl)(this.opts.uriResolver,x,k.$ref);T=g.call(this,I,R)}let{schemaId:_}=this.opts;if(T=T||new s({schema:k,schemaId:_,root:I,baseId:x}),T.schema!==T.root.schema)return T}})),KI=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}})),x0=K(((e,t)=>{let r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),i=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),n=RegExp.prototype.test.bind(/^\d*$/u),o=RegExp.prototype.test.bind(/^[\da-f]{2}$/iu),a=RegExp.prototype.test.bind(/^[\da-z\-._~]$/iu),s=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/]$/u),c=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:@/?]$/u),l=RegExp.prototype.test.bind(/^[A-Za-z0-9\-._~!$&'()*+,;=:]$/u),u=new Array(256);{let w="0123456789ABCDEF";for(let m=0;m<256;m++)u[m]="%"+w[m>>4]+w[m&15]}function d(w){return w<2048?u[192|w>>6]+u[128|w&63]:w<65536?u[224|w>>12]+u[128|w>>6&63]+u[128|w&63]:u[240|w>>18]+u[128|w>>12&63]+u[128|w>>6&63]+u[128|w&63]}function f(w){let m="",v=0,$=0;for($=0;$<w.length;$++)if(v=w[$].charCodeAt(0),v!==48){if(!(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102))return"";m+=w[$];break}for($+=1;$<w.length;$++){if(v=w[$].charCodeAt(0),!(v>=48&&v<=57||v>=65&&v<=70||v>=97&&v<=102))return"";m+=w[$]}return m}let h=RegExp.prototype.test.bind(/^[\dA-Fa-f]{1,4}$/),g=RegExp.prototype.test.bind(/^[vV][\dA-Fa-f]+\.[A-Za-z\d\-._~!$&'()*+,;=:]+$/),b=RegExp.prototype.test.bind(/^[A-Za-z\d\-._~]$/),S=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function y(w){if(w.length===0)return!1;for(let m=0;m<w.length;m++)if(!b(w[m])){if(w[m]==="%"&&m+2<w.length&&o(w.slice(m+1,m+3))){m+=2;continue}return!1}return!0}function x(w){let m=-1,v=0,$=-1,C=0;for(let X=0;X<w.length;X++)w[X]==="0"?($===-1&&($=X),C++,C>v&&(v=C,m=$)):($=-1,C=0);if(v<2)return w.join(":");let J=w.slice(0,m).join(":"),Y=w.slice(m+v).join(":");return J+"::"+Y}function k(w){let m=w.indexOf("::");if(m!==-1&&w.indexOf("::",m+1)!==-1)return;let v=m===-1?w.split(":"):w.slice(0,m).split(":"),$=m===-1?[]:w.slice(m+2).split(":");m!==-1&&(v.length===1&&v[0]===""&&(v.length=0),$.length===1&&$[0]===""&&($.length=0));let C=v.concat($),J=0;for(let X=0;X<C.length;X++){let _e=C[X];if(_e==="")return;if(_e.indexOf(".")!==-1){if(X!==C.length-1||m!==-1&&$.length===0||!i(_e))return;J+=2;continue}if(!h(_e))return;C[X]=parseInt(_e,16).toString(16),J++}if(m===-1)return J!==8?void 0:x(C);if(J>=8)return;let Y=C.slice(0,v.length);for(let X=J;X<8;X++)Y.push("0");for(let X=v.length;X<C.length;X++)Y.push(C[X]);return x(Y)}function I(w){let m=w[0]==="["&&w[w.length-1]==="]";if((w[0]==="["||w[w.length-1]==="]")&&!m)return{host:w,isIPV6:!1,error:!0};let v=m?w.slice(1,-1):w;if(m&&g(v))return v=v.toLowerCase(),{host:`[${v}]`,escapedHost:v,isIPV6:!1,isIPVFuture:!0};if(O(v,":")<2)return{host:w,isIPV6:!1,error:m};let $="",C=v.indexOf("%");if(C!==-1){let Y=v.slice(C,C+3).toLowerCase()==="%25"?3:1;if($=v.slice(C+Y),!y($))return{host:w,isIPV6:!1,error:!0};v=v.slice(0,C)}let J=k(v);return J===void 0?{host:w,isIPV6:!1,error:!0}:{host:J+($?"%"+$:""),escapedHost:J+($?"%25"+$:""),isIPV6:!0}}function O(w,m){let v=0;for(let $=0;$<w.length;$++)w[$]===m&&v++;return v}function T(w){let m=w,v=[],$=-1,C=0;for(;C=m.length;){if(C===1){if(m===".")break;if(m==="/"){v.push("/");break}else{v.push(m);break}}else if(C===2){if(m[0]==="."){if(m[1]===".")break;if(m[1]==="/"){m=m.slice(2);continue}}else if(m[0]==="/"&&(m[1]==="."||m[1]==="/")){v.push("/");break}}else if(C===3&&m==="/.."){v.length!==0&&v.pop(),v.push("/");break}if(m[0]==="."){if(m[1]==="."){if(m[2]==="/"){m=m.slice(3);continue}}else if(m[1]==="/"){m=m.slice(2);continue}}else if(m[0]==="/"&&m[1]==="."){if(m[2]==="/"){m=m.slice(2);continue}else if(m[2]==="."&&m[3]==="/"){m=m.slice(3),v.length!==0&&v.pop();continue}}if(($=m.indexOf("/",1))===-1){v.push(m);break}else v.push(m.slice(0,$)),m=m.slice($)}return v.join("")}let _={"@":"%40","/":"%2F","?":"%3F","#":"%23",":":"%3A"},R=/[@/?#:]/g,A=/[@/?#]/g;function F(w,m){let v=m?A:R;return v.lastIndex=0,w.replace(v,$=>_[$])}function M(w,m=!1){if(w.indexOf("%")===-1)return w;let v="";for(let $=0;$<w.length;$++){if(w[$]==="%"&&$+2<w.length){let C=w.slice($+1,$+3);if(o(C)){let J=C.toUpperCase(),Y=String.fromCharCode(parseInt(J,16));m&&a(Y)?v+=Y:v+="%"+J,$+=2;continue}}v+=w[$]}return v}function V(w){let m="";for(let v=0;v<w.length;v++){let $=w[v];if($==="%"&&v+2<w.length){let C=w.slice(v+1,v+3);if(o(C)){let J=C.toUpperCase(),Y=String.fromCharCode(parseInt(J,16));Y!=="."&&a(Y)?m+=Y:m+="%"+J,v+=2;continue}}if(s($))m+=$;else{let C=w.charCodeAt(v);if(C<128)m+=qe(C)?$:u[C];else if(C<55296||C>57343)m+=d(C);else if(C<=56319&&v+1<w.length){let J=w.charCodeAt(v+1);J>=56320&&J<=57343?(m+=d(65536+(C-55296<<10)+(J-56320)),v++):m+=d(65533)}else m+=d(65533)}}return m}function te(w,m=!1){let v="",$=m&&w[0]!=="/";for(let C=0;C<w.length;C++){let J=w[C];if(J==="%"&&C+2<w.length){let Y=w.slice(C+1,C+3);if(o(Y)){v+="%"+Y.toUpperCase(),C+=2;continue}}if(J==="/"&&($=!1),s(J)&&(J!==":"||!$))v+=J;else{let Y=w.charCodeAt(C);if(Y<128)v+=u[Y];else if(Y<55296||Y>57343)v+=d(Y);else if(Y<=56319&&C+1<w.length){let X=w.charCodeAt(C+1);X>=56320&&X<=57343?(v+=d(65536+(Y-55296<<10)+(X-56320)),C++):v+=d(65533)}else v+=d(65533)}}return v}function ne(w,m){let v="";for(let $=0;$<w.length;$++){let C=w[$];if(C==="%"&&$+2<w.length){let J=w.slice($+1,$+3);if(o(J)){v+="%"+J.toUpperCase(),$+=2;continue}}if(m(C))v+=C;else{let J=w.charCodeAt($);if(J<128)v+=u[J];else if(J<55296||J>57343)v+=d(J);else if(J<=56319&&$+1<w.length){let Y=w.charCodeAt($+1);Y>=56320&&Y<=57343?(v+=d(65536+(J-55296<<10)+(Y-56320)),$++):v+=d(65533)}else v+=d(65533)}}return v}function ye(w){return ne(w,l)}function Ce(w){return ne(w,c)}function Ee(w){return ne(w,c)}function qe(w){return w>=48&&w<=57||w>=65&&w<=90||w>=97&&w<=122||w===42||w===43||w===45||w===46||w===47||w===64||w===95}function we(w){let m="";for(let v=0;v<w.length;v++){let $=w[v];if($==="%"&&v+2<w.length){let C=w.slice(v+1,v+3);if(o(C)){let J=C.toUpperCase(),Y=String.fromCharCode(parseInt(J,16));a(Y)?m+=Y:m+="%"+J,v+=2;continue}}if(c($))m+=$;else{let C=w.charCodeAt(v);if(C<128)m+=qe(C)?$:u[C];else if(C<55296||C>57343)m+=d(C);else if(C<=56319&&v+1<w.length){let J=w.charCodeAt(v+1);J>=56320&&J<=57343?(m+=d(65536+(C-55296<<10)+(J-56320)),v++):m+=d(65533)}else m+=d(65533)}}return m}function P(w){let m="";for(let v=0;v<w.length;v++){if(w[v]==="%"&&v+2<w.length){let $=w.slice(v+1,v+3);if(o($)){m+="%"+$.toUpperCase(),v+=2;continue}}m+=escape(w[v])}return m}function L(w){let m=[];if(w.userinfo!==void 0&&(m.push(ye(w.userinfo)),m.push("@")),w.host!==void 0){let v=w.host;if(!i(v)){let $=I(v);$.isIPV6!==!0&&$.isIPVFuture!==!0&&(v=M(v,!0),$=I(v)),$.isIPV6===!0||$.isIPVFuture===!0?v=`[${$.escapedHost}]`:v=F(v,!1)}m.push(v)}if(typeof w.port=="number"||typeof w.port=="string"){let v=String(w.port);if(!n(v))throw new TypeError("URI port is malformed.");m.push(":"),m.push(v)}return m.length?m.join(""):void 0}t.exports={nonSimpleDomain:S,recomposeAuthority:L,reescapeHostDelimiters:F,normalizePercentEncoding:M,normalizePathEncoding:V,serializePathEncoding:te,normalizeQueryFragmentEncoding:we,encodeUserinfo:ye,encodeQuery:Ce,encodeFragment:Ee,escapePreservingEscapes:P,removeDotSegments:T,isIPv4:i,isUUID:r,normalizeIPv6:I,stringArrayToHexStripped:f}})),WI=K(((e,t)=>{let{isUUID:r}=x0(),i=/^([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-./:;=@]|%[\da-f]{2})+)$/iu,n=["http","https","ws","wss","urn","urn:uuid"];function o(_){return n.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 u(_){if((_.port===(a(_)?443:80)||_.port==="")&&(_.port=void 0),typeof _.secure=="boolean"&&(_.scheme=_.secure?"wss":"ws",_.secure=void 0),_.resourceName){let R=_.resourceName.indexOf("?"),A=R===-1?_.resourceName:_.resourceName.slice(0,R);_.path=A&&A!=="/"?A:void 0,_.query=R===-1?void 0:_.resourceName.slice(R+1),_.resourceName=void 0}return _.fragment=void 0,_}function d(_,R){if(!_.path)return _.error="URN can not be parsed",_;let A=_.path.match(i);if(A&&A[0]===_.path){let F=R.scheme||_.scheme||"urn";_.nid=A[1].toLowerCase(),_.nss=A[2];let M=T(`${F}:${R.nid||_.nid}`);_.path=void 0,M&&(_=M.parse(_,R))}else _.error=_.error||"URN can not be parsed.";return _}function f(_,R){if(_.nid===void 0)throw new Error("URN without nid cannot be serialized");let A=R.scheme||_.scheme||"urn",F=_.nid.toLowerCase(),M=T(`${A}:${R.nid||F}`);M&&(_=M.serialize(_,R));let V=_,te=_.nss;return V.path=`${F||R.nid}:${te}`,R.skipEscape=!0,V}function h(_,R){let A=_;return A.uuid=A.nss,A.nss=void 0,!R.tolerant&&(!A.uuid||!r(A.uuid))&&(A.error=A.error||"UUID is not valid."),A}function g(_){let R=_;return R.nss=(_.uuid||"").toLowerCase(),R}let b={scheme:"http",domainHost:!0,parse:s,serialize:c},S={scheme:"https",domainHost:b.domainHost,parse:s,serialize:c},y={scheme:"ws",domainHost:!0,parse:l,serialize:u},x={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},O={http:b,https:S,ws:y,wss:x,urn:{scheme:"urn",parse:d,serialize:f,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:h,serialize:g,skipNormalize:!0}};Object.setPrototypeOf(O,null);function T(_){return _&&(O[_]||O[_.toLowerCase()])||void 0}t.exports={wsIsSecure:a,SCHEMES:O,isValidSchemeName:o,getSchemeHandler:T}})),QI=K(((e,t)=>{let{normalizeIPv6:r,removeDotSegments:i,recomposeAuthority:n,normalizePercentEncoding:o,normalizePathEncoding:a,serializePathEncoding:s,normalizeQueryFragmentEncoding:c,encodeQuery:l,encodeFragment:u,reescapeHostDelimiters:d,isIPv4:f,nonSimpleDomain:h}=x0(),{SCHEMES:g,getSchemeHandler:b}=WI(),S=/^[A-Za-z][A-Za-z0-9+.-]*$/u,y="URI scheme is malformed.";function x(w){let m=unescape(String(w));if(!S.test(m))throw new TypeError(y);return m}function k(w,m){return typeof w=="string"?w=qe(w,m):typeof w=="object"&&(w=Ee(_(w,m),m)),w}function I(w,m,v){let $=v?Object.assign({scheme:"null"},v):{scheme:"null"},{parsed:C,malformedAuthorityOrPort:J,malformedPercentEncoding:Y,malformedSchemeSpecific:X,malformedHost:_e,malformedScheme:Pe}=Ce(w,$),{parsed:z,malformedAuthorityOrPort:D,malformedPercentEncoding:B,malformedSchemeSpecific:se,malformedHost:ue,malformedScheme:pe}=Ce(m,$);if(J||D||Y||B||X||se||_e||ue||Pe||pe)throw new Error(C.error||z.error||"URI is malformed.");let Re=O(C,z,$,!0),Fe=b(v&&v.scheme||Re.scheme),Oe=Re.host,Ve=Oe!==void 0&&Oe!==""&&(f(Oe)||r(Oe).isIPV6);ye(Re,v||{},Fe,Ve);let Le=Oe&&Oe.indexOf("%")!==-1&&!new RegExp("\\P{ASCII}","u").test(Oe);if(Re.error&&!Le)throw new Error(Re.error);return $.skipEscape=!0,_(Re,$)}function O(w,m,v,$){let C={};return $||(w=Ee(_(w,v),v),m=Ee(_(m,v),v)),v=v||{},!v.tolerant&&m.scheme?(C.scheme=m.scheme,C.userinfo=m.userinfo,C.host=m.host,C.port=m.port,C.path=i(m.path||""),C.query=m.query):(m.userinfo!==void 0||m.host!==void 0||m.port!==void 0?(C.userinfo=m.userinfo,C.host=m.host,C.port=m.port,C.path=i(m.path||""),C.query=m.query):(m.path?(m.path[0]==="/"?C.path=i(m.path):((w.userinfo!==void 0||w.host!==void 0||w.port!==void 0)&&!w.path?C.path="/"+m.path:w.path?C.path=w.path.slice(0,w.path.lastIndexOf("/")+1)+m.path:C.path=m.path,C.path=i(C.path)),C.query=m.query):(C.path=w.path,m.query!==void 0?C.query=m.query:C.query=w.query),C.userinfo=w.userinfo,C.host=w.host,C.port=w.port),C.scheme=w.scheme),C.fragment=m.fragment,C}function T(w,m,v){let $=P(w,v),C=P(m,v);return $!==void 0&&C!==void 0&&$===C}function _(w,m){let v={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:""},$=Object.assign({},m),C=[];v.scheme&&(v.scheme=x(v.scheme));let J=b($.scheme||v.scheme);J&&J.serialize&&J.serialize(v,$);let Y=v.userinfo!==void 0||v.host!==void 0||v.port!==void 0,X=!$.skipEscape&&v.scheme===void 0&&!Y;v.path!==void 0&&($.skipEscape?v.path=o(v.path):v.path=s(v.path,X)),$.reference!=="suffix"&&v.scheme&&(v.scheme=x(v.scheme),C.push(v.scheme,":"));let _e=n(v);if(_e!==void 0&&($.reference!=="suffix"&&C.push("//"),C.push(_e),v.path&&v.path[0]!=="/"&&C.push("/")),v.path!==void 0){let Pe=v.path;!$.absolutePath&&(!J||!J.absolutePath)&&(Pe=i(Pe)),X&&(Pe=s(Pe,!0)),_e===void 0&&Pe[0]==="/"&&Pe[1]==="/"&&(Pe="/%2F"+Pe.slice(2)),C.push(Pe)}return v.query!==void 0&&C.push("?",l(v.query)),v.fragment!==void 0&&C.push("#",u(v.fragment)),C.join("")}let R=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u,A=/^(?:[^#/:?]+:)?\/\/([^/?#]*)/,F=/^(?:[^#/:?]+:)?([/\\\t\n\r]*)/;function M(w,m){if(m[2]!==void 0&&w.path&&w.path[0]!=="/")return'URI path must start with "/" when authority is present.';if(typeof w.port=="number"&&(w.port<0||w.port>65535))return"URI port is malformed."}function V(w){if(w===void 0)return!1;let m=w.indexOf("%");for(;m!==-1;){if(m+2>=w.length||!/^[\da-f]{2}$/iu.test(w.slice(m+1,m+3)))return!0;m=w.indexOf("%",m+3)}return!1}function te(w){return w[0]==="["&&w[w.length-1]==="]"}function ne(w){let m=w[4];return V(w[3])||m!==void 0&&!te(m)&&V(m)||V(w[6])||V(w[7])||V(w[8])}function ye(w,m,v,$){if(!m.unicodeSupport&&(!v||!v.unicodeSupport)&&w.host&&!te(w.host)&&(m.domainHost||v&&v.domainHost)&&$===!1&&h(w.host))try{w.host=new URL("http://"+w.host).hostname}catch(C){return w.error=w.error||"Host's domain name can not be converted to ASCII: "+C,!0}return!1}function Ce(w,m){let v=Object.assign({},m),$={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},C=!1,J=!1,Y=!1,X=!1,_e=!1,Pe=!1,z=!1;v.reference==="suffix"&&(v.scheme?w=v.scheme+":"+w:w="//"+w);let D=w.match(A);D!==null&&D[1].indexOf("\\")!==-1&&($.error="URI authority must not contain a literal backslash.",C=!0);let B=w.match(F);if(B!==null){let ue=B[1],pe=ue.replace(/[\t\n\r]/g,"");pe.length>=2&&(pe.slice(0,2)!=="//"?($.error=$.error||"URI authority must not contain a literal backslash.",C=!0):ue.length!==pe.length&&($.error=$.error||"URI authority introducer must not contain whitespace.",C=!0))}let se=w.match(R);if(se){if($.scheme=se[1],$.userinfo=se[3],$.host=se[4],$.port=parseInt(se[5],10),$.path=se[6]||"",$.query=se[7],$.fragment=se[8],$.scheme!==void 0){let Re=unescape($.scheme);S.test(Re)?$.scheme=Re.toLowerCase():($.error=$.error||y,Pe=!0)}J=ne(se),J&&($.error=$.error||"URI contains malformed percent-encoding."),isNaN($.port)&&($.port=se[5]);let ue=M($,se);if(ue!==void 0&&($.error=$.error||ue,C=!0),$.host)if(f($.host)===!1){let Re=te($.host),Fe=$.host.indexOf("[")!==-1||$.host.indexOf("]")!==-1,Oe=r($.host);z=Oe.isIPV6||Oe.isIPVFuture===!0,_e=Fe&&(!Re||Oe.error===!0),$.host=z?Oe.host:Oe.host.toLowerCase(),_e&&($.error=$.error||"URI host is malformed.",C=!0)}else z=!0;$.scheme===void 0&&$.userinfo===void 0&&$.host===void 0&&$.port===void 0&&$.query===void 0&&!$.path?$.reference="same-document":$.scheme===void 0?$.reference="relative":$.fragment===void 0?$.reference="absolute":$.reference="uri",v.reference&&v.reference!=="suffix"&&v.reference!==$.reference&&($.error=$.error||"URI is not a "+v.reference+" reference.");let pe=b(v.scheme||$.scheme);if(_e||(X=ye($,v,pe,z)),w.indexOf("%")!==-1&&$.host!==void 0&&!_e){let Re=z?$.host:o($.host,!0);z||(Re=o(Re.toLowerCase())),$.host=d(Re,z)}(!pe||pe&&!pe.skipNormalize)&&($.path&&($.path=a($.path)),$.query&&($.query=c($.query)),$.fragment&&($.fragment=c($.fragment))),pe&&pe.parse&&(pe.parse($,v),pe===g.urn&&$.nid===void 0&&(Y=!0))}else $.error=$.error||"URI can not be parsed.";return{parsed:$,malformedAuthorityOrPort:C,malformedPercentEncoding:J,malformedSchemeSpecific:Y,malformedHost:X,malformedScheme:Pe}}function Ee(w,m){return Ce(w,m).parsed}function qe(w,m){return we(w,m).normalized}function we(w,m){let{parsed:v,malformedAuthorityOrPort:$,malformedPercentEncoding:C,malformedSchemeSpecific:J,malformedHost:Y,malformedScheme:X}=Ce(w,m);return{normalized:$||C||J||Y||X?w:_(v,m),malformedAuthorityOrPort:$,malformedPercentEncoding:C,malformedSchemeSpecific:J,malformedHost:Y,malformedScheme:X}}function P(w,m){if(typeof w!="string"&&typeof w!="object")return;let v;try{v=typeof w=="string"?w:_(w,m)}catch{return}let{normalized:$,malformedAuthorityOrPort:C,malformedPercentEncoding:J,malformedSchemeSpecific:Y,malformedHost:X,malformedScheme:_e}=we(v,m);return C||J||Y||X||_e?void 0:$}let L={SCHEMES:g,normalize:k,resolve:I,resolveComponent:O,equal:T,serialize:_,parse:Ee};t.exports=L,t.exports.default=L,t.exports.fastUri=L})),XI=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=QI();t.code='require("ajv/dist/runtime/uri").default',e.default=t})),s1=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=Mo();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=Se();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});let i=Ja(),n=qo(),o=k0(),a=zd(),s=Se(),c=Id(),l=Td(),u=Ie(),d=KI(),f=XI(),h=(P,L)=>new RegExp(P,L);h.code="new RegExp";let g=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),S={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},x=200;function k(P){var L,w,m,v,$,C,J,Y,X,_e,Pe,z,D,B,se,ue,pe,Re,Fe,Oe,Ve,Le,xt,Qe,Jt;let Ct=P.strict,Bt=(L=P.code)===null||L===void 0?void 0:L.optimize,ln=Bt===!0||Bt===void 0?1:Bt||0,un=(m=(w=P.code)===null||w===void 0?void 0:w.regExp)!==null&&m!==void 0?m:h,Ln=(v=P.uriResolver)!==null&&v!==void 0?v:f.default;return{strictSchema:(C=($=P.strictSchema)!==null&&$!==void 0?$:Ct)!==null&&C!==void 0?C:!0,strictNumbers:(Y=(J=P.strictNumbers)!==null&&J!==void 0?J:Ct)!==null&&Y!==void 0?Y:!0,strictTypes:(_e=(X=P.strictTypes)!==null&&X!==void 0?X:Ct)!==null&&_e!==void 0?_e:"log",strictTuples:(z=(Pe=P.strictTuples)!==null&&Pe!==void 0?Pe:Ct)!==null&&z!==void 0?z:"log",strictRequired:(B=(D=P.strictRequired)!==null&&D!==void 0?D:Ct)!==null&&B!==void 0?B:!1,code:P.code?{...P.code,optimize:ln,regExp:un}:{optimize:ln,regExp:un},loopRequired:(se=P.loopRequired)!==null&&se!==void 0?se:x,loopEnum:(ue=P.loopEnum)!==null&&ue!==void 0?ue:x,meta:(pe=P.meta)!==null&&pe!==void 0?pe:!0,messages:(Re=P.messages)!==null&&Re!==void 0?Re:!0,inlineRefs:(Fe=P.inlineRefs)!==null&&Fe!==void 0?Fe:!0,schemaId:(Oe=P.schemaId)!==null&&Oe!==void 0?Oe:"$id",addUsedSchema:(Ve=P.addUsedSchema)!==null&&Ve!==void 0?Ve:!0,validateSchema:(Le=P.validateSchema)!==null&&Le!==void 0?Le:!0,validateFormats:(xt=P.validateFormats)!==null&&xt!==void 0?xt:!0,unicodeRegExp:(Qe=P.unicodeRegExp)!==null&&Qe!==void 0?Qe:!0,int32range:(Jt=P.int32range)!==null&&Jt!==void 0?Jt:!0,uriResolver:Ln}}var I=class{constructor(P={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,P=this.opts={...P,...k(P)};let{es5:L,lines:w}=this.opts.code;this.scope=new s.ValueScope({scope:{},prefixes:b,es5:L,lines:w}),this.logger=V(P.logger);let m=P.validateFormats;P.validateFormats=!1,this.RULES=(0,o.getRules)(),O.call(this,S,P,"NOT SUPPORTED"),O.call(this,y,P,"DEPRECATED","warn"),this._metaOpts=F.call(this),P.formats&&R.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),P.keywords&&A.call(this,P.keywords),typeof P.meta=="object"&&this.addMetaSchema(P.meta),_.call(this),P.validateFormats=m}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:P,meta:L,schemaId:w}=this.opts,m=d;w==="id"&&(m={...d},m.id=m.$id,delete m.$id),L&&P&&this.addMetaSchema(m,m[w],!1)}defaultMeta(){let{meta:P,schemaId:L}=this.opts;return this.opts.defaultMeta=typeof P=="object"?P[L]||P:void 0}validate(P,L){let w;if(typeof P=="string"){if(w=this.getSchema(P),!w)throw new Error(`no schema with key or ref "${P}"`)}else w=this.compile(P);let m=w(L);return"$async"in w||(this.errors=w.errors),m}compile(P,L){let w=this._addSchema(P,L);return w.validate||this._compileSchemaEnv(w)}compileAsync(P,L){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");let{loadSchema:w}=this.opts;return m.call(this,P,L);async function m(X,_e){await v.call(this,X.$schema);let Pe=this._addSchema(X,_e);return Pe.validate||$.call(this,Pe)}async function v(X){X&&!this.getSchema(X)&&await m.call(this,{$ref:X},!0)}async function $(X){try{return this._compileSchemaEnv(X)}catch(_e){if(!(_e instanceof n.default))throw _e;return C.call(this,_e),await J.call(this,_e.missingSchema),$.call(this,X)}}function C({missingSchema:X,missingRef:_e}){if(this.refs[X])throw new Error(`AnySchema ${X} is loaded but ${_e} cannot be resolved`)}async function J(X){let _e=await Y.call(this,X);this.refs[X]||await v.call(this,_e.$schema),this.refs[X]||this.addSchema(_e,X,L)}async function Y(X){let _e=this._loading[X];if(_e)return _e;try{return await(this._loading[X]=w(X))}finally{delete this._loading[X]}}}addSchema(P,L,w,m=this.opts.validateSchema){if(Array.isArray(P)){for(let $ of P)this.addSchema($,void 0,w,m);return this}let v;if(typeof P=="object"){let{schemaId:$}=this.opts;if(v=P[$],v!==void 0&&typeof v!="string")throw new Error(`schema ${$} must be string`)}return L=(0,c.normalizeId)(L||v),this._checkUnique(L),this.schemas[L]=this._addSchema(P,w,L,m,!0),this}addMetaSchema(P,L,w=this.opts.validateSchema){return this.addSchema(P,L,!0,w),this}validateSchema(P,L){if(typeof P=="boolean")return!0;let w;if(w=P.$schema,w!==void 0&&typeof w!="string")throw new Error("$schema must be a string");if(w=w||this.opts.defaultMeta||this.defaultMeta(),!w)return this.logger.warn("meta-schema not available"),this.errors=null,!0;let m=this.validate(w,P);if(!m&&L){let v="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(v);else throw new Error(v)}return m}getSchema(P){let L;for(;typeof(L=T.call(this,P))=="string";)P=L;if(L===void 0){let{schemaId:w}=this.opts,m=new a.SchemaEnv({schema:{},schemaId:w});if(L=a.resolveSchema.call(this,m,P),!L)return;this.refs[P]=L}return L.validate||this._compileSchemaEnv(L)}removeSchema(P){if(P instanceof RegExp)return this._removeAllSchemas(this.schemas,P),this._removeAllSchemas(this.refs,P),this;switch(typeof P){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let L=T.call(this,P);return typeof L=="object"&&this._cache.delete(L.schema),delete this.schemas[P],delete this.refs[P],this}case"object":{let L=P;this._cache.delete(L);let w=P[this.opts.schemaId];return w&&(w=(0,c.normalizeId)(w),delete this.schemas[w],delete this.refs[w]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(P){for(let L of P)this.addKeyword(L);return this}addKeyword(P,L){let w;if(typeof P=="string")w=P,typeof L=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),L.keyword=w);else if(typeof P=="object"&&L===void 0){if(L=P,w=L.keyword,Array.isArray(w)&&!w.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ne.call(this,w,L),!L)return(0,u.eachItem)(w,v=>ye.call(this,v)),this;Ee.call(this,L);let m={...L,type:(0,l.getJSONTypes)(L.type),schemaType:(0,l.getJSONTypes)(L.schemaType)};return(0,u.eachItem)(w,m.type.length===0?v=>ye.call(this,v,m):v=>m.type.forEach($=>ye.call(this,v,m,$))),this}getKeyword(P){let L=this.RULES.all[P];return typeof L=="object"?L.definition:!!L}removeKeyword(P){let{RULES:L}=this;delete L.keywords[P],delete L.all[P];for(let w of L.rules){let m=w.rules.findIndex(v=>v.keyword===P);m>=0&&w.rules.splice(m,1)}return this}addFormat(P,L){return typeof L=="string"&&(L=new RegExp(L)),this.formats[P]=L,this}errorsText(P=this.errors,{separator:L=", ",dataVar:w="data"}={}){return!P||P.length===0?"No errors":P.map(m=>`${w}${m.instancePath} ${m.message}`).reduce((m,v)=>m+L+v)}$dataMetaSchema(P,L){let w=this.RULES.all;P=JSON.parse(JSON.stringify(P));for(let m of L){let v=m.split("/").slice(1),$=P;for(let C of v)$=$[C];for(let C in w){let J=w[C];if(typeof J!="object")continue;let{$data:Y}=J.definition,X=$[C];Y&&X&&($[C]=we(X))}}return P}_removeAllSchemas(P,L){for(let w in P){let m=P[w];(!L||L.test(w))&&(typeof m=="string"?delete P[w]:m&&!m.meta&&(this._cache.delete(m.schema),delete P[w]))}}_addSchema(P,L,w,m=this.opts.validateSchema,v=this.opts.addUsedSchema){let $,{schemaId:C}=this.opts;if(typeof P=="object")$=P[C];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof P!="boolean")throw new Error("schema must be object or boolean")}let J=this._cache.get(P);if(J!==void 0)return J;w=(0,c.normalizeId)($||w);let Y=c.getSchemaRefs.call(this,P,w);return J=new a.SchemaEnv({schema:P,schemaId:C,meta:L,baseId:w,localRefs:Y}),this._cache.set(J.schema,J),v&&!w.startsWith("#")&&(w&&this._checkUnique(w),this.refs[w]=J),m&&this.validateSchema(P,!0),J}_checkUnique(P){if(this.schemas[P]||this.refs[P])throw new Error(`schema with key or id "${P}" already exists`)}_compileSchemaEnv(P){if(P.meta?this._compileMetaSchema(P):a.compileSchema.call(this,P),!P.validate)throw new Error("ajv implementation error");return P.validate}_compileMetaSchema(P){let L=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,P)}finally{this.opts=L}}};I.ValidationError=i.default,I.MissingRefError=n.default,e.default=I;function O(P,L,w,m="error"){for(let v in P){let $=v;$ in L&&this.logger[m](`${w}: option ${v}. ${P[$]}`)}}function T(P){return P=(0,c.normalizeId)(P),this.schemas[P]||this.refs[P]}function _(){let P=this.opts.schemas;if(P)if(Array.isArray(P))this.addSchema(P);else for(let L in P)this.addSchema(P[L],L)}function R(){for(let P in this.opts.formats){let L=this.opts.formats[P];L&&this.addFormat(P,L)}}function A(P){if(Array.isArray(P)){this.addVocabulary(P);return}this.logger.warn("keywords option as map is deprecated, pass array");for(let L in P){let w=P[L];w.keyword||(w.keyword=L),this.addKeyword(w)}}function F(){let P={...this.opts};for(let L of g)delete P[L];return P}let M={log(){},warn(){},error(){}};function V(P){if(P===!1)return M;if(P===void 0)return console;if(P.log&&P.warn&&P.error)return P;throw new Error("logger must implement log, warn and error methods")}let te=/^[a-z_$][a-z0-9_$:-]*$/i;function ne(P,L){let{RULES:w}=this;if((0,u.eachItem)(P,m=>{if(w.keywords[m])throw new Error(`Keyword ${m} is already defined`);if(!te.test(m))throw new Error(`Keyword ${m} has invalid name`)}),!!L&&L.$data&&!("code"in L||"validate"in L))throw new Error('$data keyword must have "code" or "validate" function')}function ye(P,L,w){var m;let v=L?.post;if(w&&v)throw new Error('keyword with "post" flag cannot have "type"');let{RULES:$}=this,C=v?$.post:$.rules.find(({type:Y})=>Y===w);if(C||(C={type:w,rules:[]},$.rules.push(C)),$.keywords[P]=!0,!L)return;let J={keyword:P,definition:{...L,type:(0,l.getJSONTypes)(L.type),schemaType:(0,l.getJSONTypes)(L.schemaType)}};L.before?Ce.call(this,C,J,L.before):C.rules.push(J),$.all[P]=J,(m=L.implements)===null||m===void 0||m.forEach(Y=>this.addKeyword(Y))}function Ce(P,L,w){let m=P.rules.findIndex(v=>v.keyword===w);m>=0?P.rules.splice(m,0,L):(P.rules.push(L),this.logger.warn(`rule ${w} is not defined`))}function Ee(P){let{metaSchema:L}=P;L!==void 0&&(P.$data&&this.opts.$data&&(L=we(L)),P.validateSchema=this.compile(L,!0))}let qe={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function we(P){return{anyOf:[P,qe]}}})),YI=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})),c1=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.callRef=e.getValidate=void 0;let t=qo(),r=Mt(),i=Se(),n=jt(),o=zd(),a=Ie(),s={keyword:"$ref",schemaType:"string",code(u){let{gen:d,schema:f,it:h}=u,{baseId:g,schemaEnv:b,validateName:S,opts:y,self:x}=h,{root:k}=b;if((f==="#"||f==="#/")&&g===k.baseId)return O();let I=o.resolveRef.call(x,k,g,f);if(I===void 0)throw new t.default(h.opts.uriResolver,g,f);if(I instanceof o.SchemaEnv)return T(I);return _(I);function O(){if(b===k)return l(u,S,b,b.$async);let R=d.scopeValue("root",{ref:k});return l(u,(0,i._)`${R}.validate`,k,k.$async)}function T(R){l(u,c(u,R),R,R.$async)}function _(R){let A=d.scopeValue("schema",y.code.source===!0?{ref:R,code:(0,i.stringify)(R)}:{ref:R}),F=d.name("valid"),M=u.subschema({schema:R,dataTypes:[],schemaPath:i.nil,topSchemaRef:A,errSchemaPath:f},F);u.mergeEvaluated(M),u.ok(F)}}};function c(u,d){let{gen:f}=u;return d.validate?f.scopeValue("validate",{ref:d.validate}):(0,i._)`${f.scopeValue("wrapper",{ref:d})}.validate`}e.getValidate=c;function l(u,d,f,h){let{gen:g,it:b}=u,{allErrors:S,schemaEnv:y,opts:x}=b,k=x.passContext?n.default.this:i.nil;h?I():O();function I(){if(!y.$async)throw new Error("async schema referenced by sync schema");let R=g.let("valid");g.try(()=>{g.code((0,i._)`await ${(0,r.callValidateCode)(u,d,k)}`),_(d),S||g.assign(R,!0)},A=>{g.if((0,i._)`!(${A} instanceof ${b.ValidationError})`,()=>g.throw(A)),T(A),S||g.assign(R,!1)}),u.ok(R)}function O(){u.result((0,r.callValidateCode)(u,d,k),()=>_(d),()=>T(d))}function T(R){let A=(0,i._)`${R}.errors`;g.assign(n.default.vErrors,(0,i._)`${n.default.vErrors} === null ? ${A} : ${n.default.vErrors}.concat(${A})`),g.assign(n.default.errors,(0,i._)`${n.default.vErrors}.length`)}function _(R){var A;if(!b.opts.unevaluated)return;let F=(A=f?.validate)===null||A===void 0?void 0:A.evaluated;if(b.props!==!0)if(F&&!F.dynamicProps)F.props!==void 0&&(b.props=a.mergeEvaluated.props(g,F.props,b.props));else{let M=g.var("props",(0,i._)`${R}.evaluated.props`);b.props=a.mergeEvaluated.props(g,M,b.props,i.Name)}if(b.items!==!0)if(F&&!F.dynamicItems)F.items!==void 0&&(b.items=a.mergeEvaluated.items(g,F.items,b.items));else{let M=g.var("items",(0,i._)`${R}.evaluated.items`);b.items=a.mergeEvaluated.items(g,M,b.items,i.Name)}}}e.callRef=l,e.default=s})),T0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=YI(),r=c1(),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",t.default,r.default];e.default=i})),ez=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r=t.operators,i={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},n={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:{message:({keyword:o,schemaCode:a})=>(0,t.str)`must be ${i[o].okStr} ${a}`,params:({keyword:o,schemaCode:a})=>(0,t._)`{comparison: ${i[o].okStr}, limit: ${a}}`},code(o){let{keyword:a,data:s,schemaCode:c}=o;o.fail$data((0,t._)`${s} ${i[a].fail} ${c} || isNaN(${s})`)}};e.default=n})),tz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must be multiple of ${i}`,params:({schemaCode:i})=>(0,t._)`{multipleOf: ${i}}`},code(i){let{gen:n,data:o,schemaCode:a,it:s}=i,c=s.opts.multipleOfPrecision,l=n.let("res"),u=c?(0,t._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:(0,t._)`${l} !== parseInt(${l})`;i.fail$data((0,t._)`(${a} === 0 || (${l} = ${o}/${a}, ${u}))`)}};e.default=r})),nz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});function t(r){let i=r.length,n=0,o=0,a;for(;o<i;)n++,a=r.charCodeAt(o++),a>=55296&&a<=56319&&o<i&&(a=r.charCodeAt(o),(a&64512)===56320&&o++);return n}e.default=t,t.code='require("ajv/dist/runtime/ucs2length").default'})),rz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r=Ie(),i=nz(),n={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:o,schemaCode:a}){let s=o==="maxLength"?"more":"fewer";return(0,t.str)`must NOT have ${s} than ${a} characters`},params:({schemaCode:o})=>(0,t._)`{limit: ${o}}`},code(o){let{keyword:a,data:s,schemaCode:c,it:l}=o,u=a==="maxLength"?t.operators.GT:t.operators.LT,d=l.opts.unicode===!1?(0,t._)`${s}.length`:(0,t._)`${(0,r.useFunc)(o.gen,i.default)}(${s})`;o.fail$data((0,t._)`${d} ${u} ${c}`)}};e.default=n})),oz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Mt(),r=Ie(),i=Se(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:o})=>(0,i.str)`must match pattern "${o}"`,params:({schemaCode:o})=>(0,i._)`{pattern: ${o}}`},code(o){let{gen:a,data:s,$data:c,schema:l,schemaCode:u,it:d}=o,f=d.opts.unicodeRegExp?"u":"";if(c){let{regExp:h}=d.opts.code,g=h.code==="new RegExp"?(0,i._)`new RegExp`:(0,r.useFunc)(a,h),b=a.let("valid");a.try(()=>a.assign(b,(0,i._)`${g}(${u}, ${f}).test(${s})`),()=>a.assign(b,!1)),o.fail$data((0,i._)`!${b}`)}else{let h=(0,t.usePattern)(o,l);o.fail$data((0,i._)`!${h}.test(${s})`)}}};e.default=n})),iz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:n}){let o=i==="maxProperties"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${n} properties`},params:({schemaCode:i})=>(0,t._)`{limit: ${i}}`},code(i){let{keyword:n,data:o,schemaCode:a}=i,s=n==="maxProperties"?t.operators.GT:t.operators.LT;i.fail$data((0,t._)`Object.keys(${o}).length ${s} ${a}`)}};e.default=r})),az=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Mt(),r=Se(),i=Ie(),n={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:o}})=>(0,r.str)`must have required property '${o}'`,params:({params:{missingProperty:o}})=>(0,r._)`{missingProperty: ${o}}`},code(o){let{gen:a,schema:s,schemaCode:c,data:l,$data:u,it:d}=o,{opts:f}=d;if(!u&&s.length===0)return;let h=s.length>=f.loopRequired;if(d.allErrors?g():b(),f.strictRequired){let x=o.parentSchema.properties,{definedProperties:k}=o.it;for(let I of s)if(x?.[I]===void 0&&!k.has(I)){let O=`required property "${I}" is not defined at "${d.schemaEnv.baseId+d.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(d,O,d.opts.strictRequired)}}function g(){if(h||u)o.block$data(r.nil,S);else for(let x of s)(0,t.checkReportMissingProp)(o,x)}function b(){let x=a.let("missing");if(h||u){let k=a.let("valid",!0);o.block$data(k,()=>y(x,k)),o.ok(k)}else a.if((0,t.checkMissingProp)(o,s,x)),(0,t.reportMissingProp)(o,x),a.else()}function S(){a.forOf("prop",c,x=>{o.setParams({missingProperty:x}),a.if((0,t.noPropertyInData)(a,l,x,f.ownProperties),()=>o.error())})}function y(x,k){o.setParams({missingProperty:x}),a.forOf(x,c,()=>{a.assign(k,(0,t.propertyInData)(a,l,x,f.ownProperties)),a.if((0,r.not)(k),()=>{o.error(),a.break()})},r.nil)}}};e.default=n})),sz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:i,schemaCode:n}){let o=i==="maxItems"?"more":"fewer";return(0,t.str)`must NOT have ${o} than ${n} items`},params:({schemaCode:i})=>(0,t._)`{limit: ${i}}`},code(i){let{keyword:n,data:o,schemaCode:a}=i,s=n==="maxItems"?t.operators.GT:t.operators.LT;i.fail$data((0,t._)`${o}.length ${s} ${a}`)}};e.default=r})),l1=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=$0();t.code='require("ajv/dist/runtime/equal").default',e.default=t})),cz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Td(),r=Se(),i=Ie(),n=l1(),o={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:s}})=>(0,r.str)`must NOT have duplicate items (items ## ${s} and ${a} are identical)`,params:({params:{i:a,j:s}})=>(0,r._)`{i: ${a}, j: ${s}}`},code(a){let{gen:s,data:c,$data:l,schema:u,parentSchema:d,schemaCode:f,it:h}=a;if(!l&&!u)return;let g=s.let("valid"),b=d.items?(0,t.getSchemaTypes)(d.items):[];a.block$data(g,S,(0,r._)`${f} === false`),a.ok(g);function S(){let I=s.let("i",(0,r._)`${c}.length`),O=s.let("j");a.setParams({i:I,j:O}),s.assign(g,!0),s.if((0,r._)`${I} > 1`,()=>(y()?x:k)(I,O))}function y(){return b.length>0&&!b.some(I=>I==="object"||I==="array")}function x(I,O){let T=s.name("item"),_=(0,t.checkDataTypes)(b,T,h.opts.strictNumbers,t.DataType.Wrong),R=s.const("indices",(0,r._)`{}`);s.for((0,r._)`;${I}--;`,()=>{s.let(T,(0,r._)`${c}[${I}]`),s.if(_,(0,r._)`continue`),b.length>1&&s.if((0,r._)`typeof ${T} == "string"`,(0,r._)`${T} += "_"`),s.if((0,r._)`typeof ${R}[${T}] == "number"`,()=>{s.assign(O,(0,r._)`${R}[${T}]`),a.error(),s.assign(g,!1).break()}).code((0,r._)`${R}[${T}] = ${I}`)})}function k(I,O){let T=(0,i.useFunc)(s,n.default),_=s.name("outer");s.label(_).for((0,r._)`;${I}--;`,()=>s.for((0,r._)`${O} = ${I}; ${O}--;`,()=>s.if((0,r._)`${T}(${c}[${I}], ${c}[${O}])`,()=>{a.error(),s.assign(g,!1).break(_)})))}}};e.default=o})),lz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r=Ie(),i=l1(),n={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:o})=>(0,t._)`{allowedValue: ${o}}`},code(o){let{gen:a,data:s,$data:c,schemaCode:l,schema:u}=o;c||u&&typeof u=="object"?o.fail$data((0,t._)`!${(0,r.useFunc)(a,i.default)}(${s}, ${l})`):o.fail((0,t._)`${u} !== ${s}`)}};e.default=n})),uz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r=Ie(),i=l1(),n={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:o})=>(0,t._)`{allowedValues: ${o}}`},code(o){let{gen:a,data:s,$data:c,schema:l,schemaCode:u,it:d}=o;if(!c&&l.length===0)throw new Error("enum must have non-empty array");let f=l.length>=d.opts.loopEnum,h,g=()=>h??(h=(0,r.useFunc)(a,i.default)),b;if(f||c)b=a.let("valid"),o.block$data(b,S);else{if(!Array.isArray(l))throw new Error("ajv implementation error");let x=a.const("vSchema",u);b=(0,t.or)(...l.map((k,I)=>y(x,I)))}o.pass(b);function S(){a.assign(b,!1),a.forOf("v",u,x=>a.if((0,t._)`${g()}(${s}, ${x})`,()=>a.assign(b,!0).break()))}function y(x,k){let I=l[k];return typeof I=="object"&&I!==null?(0,t._)`${g()}(${s}, ${x}[${k}])`:(0,t._)`${s} === ${I}`}}};e.default=n})),R0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=ez(),r=tz(),i=rz(),n=oz(),o=iz(),a=az(),s=sz(),c=cz(),l=lz(),u=uz(),d=[t.default,r.default,i.default,n.default,o.default,a.default,s.default,c.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,u.default];e.default=d})),I0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateAdditionalItems=void 0;let t=Se(),r=Ie(),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:o}})=>(0,t.str)`must NOT have more than ${o} items`,params:({params:{len:o}})=>(0,t._)`{limit: ${o}}`},code(o){let{parentSchema:a,it:s}=o,{items:c}=a;if(!Array.isArray(c)){(0,r.checkStrictMode)(s,'"additionalItems" is ignored when "items" is not an array of schemas');return}n(o,c)}};function n(o,a){let{gen:s,schema:c,data:l,keyword:u,it:d}=o;d.items=!0;let f=s.const("len",(0,t._)`${l}.length`);if(c===!1)o.setParams({len:a.length}),o.pass((0,t._)`${f} <= ${a.length}`);else if(typeof c=="object"&&!(0,r.alwaysValidSchema)(d,c)){let g=s.var("valid",(0,t._)`${f} <= ${a.length}`);s.if((0,t.not)(g),()=>h(g)),o.ok(g)}function h(g){s.forRange("i",a.length,f,b=>{o.subschema({keyword:u,dataProp:b,dataPropType:r.Type.Num},g),d.allErrors||s.if((0,t.not)(g),()=>s.break())})}}e.validateAdditionalItems=n,e.default=i})),z0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateTuple=void 0;let t=Se(),r=Ie(),i=Mt(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(a){let{schema:s,it:c}=a;if(Array.isArray(s))return o(a,"additionalItems",s);c.items=!0,!(0,r.alwaysValidSchema)(c,s)&&a.ok((0,i.validateArray)(a))}};function o(a,s,c=a.schema){let{gen:l,parentSchema:u,data:d,keyword:f,it:h}=a;S(u),h.opts.unevaluated&&c.length&&h.items!==!0&&(h.items=r.mergeEvaluated.items(l,c.length,h.items));let g=l.name("valid"),b=l.const("len",(0,t._)`${d}.length`);c.forEach((y,x)=>{(0,r.alwaysValidSchema)(h,y)||(l.if((0,t._)`${b} > ${x}`,()=>a.subschema({keyword:f,schemaProp:x,dataProp:x},g)),a.ok(g))});function S(y){let{opts:x,errSchemaPath:k}=h,I=c.length,O=I===y.minItems&&(I===y.maxItems||y[s]===!1);if(x.strictTuples&&!O){let T=`"${f}" is ${I}-tuple, but minItems or maxItems/${s} are not specified or different at path "${k}"`;(0,r.checkStrictMode)(h,T,x.strictTuples)}}}e.validateTuple=o,e.default=n})),dz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=z0(),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:i=>(0,t.validateTuple)(i,"items")};e.default=r})),pz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r=Ie(),i=Mt(),n=I0(),o={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:u}=c;l.items=!0,!(0,r.alwaysValidSchema)(l,s)&&(u?(0,n.validateAdditionalItems)(a,u):a.ok((0,i.validateArray)(a)))}};e.default=o})),mz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r=Ie(),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:n,max:o}})=>o===void 0?(0,t.str)`must contain at least ${n} valid item(s)`:(0,t.str)`must contain at least ${n} and no more than ${o} valid item(s)`,params:({params:{min:n,max:o}})=>o===void 0?(0,t._)`{minContains: ${n}}`:(0,t._)`{minContains: ${n}, maxContains: ${o}}`},code(n){let{gen:o,schema:a,parentSchema:s,data:c,it:l}=n,u,d,{minContains:f,maxContains:h}=s;l.opts.next?(u=f===void 0?1:f,d=h):u=1;let g=o.const("len",(0,t._)`${c}.length`);if(n.setParams({min:u,max:d}),d===void 0&&u===0){(0,r.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(d!==void 0&&u>d){(0,r.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),n.fail();return}if((0,r.alwaysValidSchema)(l,a)){let k=(0,t._)`${g} >= ${u}`;d!==void 0&&(k=(0,t._)`${k} && ${g} <= ${d}`),n.pass(k);return}l.items=!0;let b=o.name("valid");d===void 0&&u===1?y(b,()=>o.if(b,()=>o.break())):u===0?(o.let(b,!0),d!==void 0&&o.if((0,t._)`${c}.length > 0`,S)):(o.let(b,!1),S()),n.result(b,()=>n.reset());function S(){let k=o.name("_valid"),I=o.let("count",0);y(k,()=>o.if(k,()=>x(I)))}function y(k,I){o.forRange("i",0,g,O=>{n.subschema({keyword:"contains",dataProp:O,dataPropType:r.Type.Num,compositeRule:!0},k),I()})}function x(k){o.code((0,t._)`${k}++`),d===void 0?o.if((0,t._)`${k} >= ${u}`,()=>o.assign(b,!0).break()):(o.if((0,t._)`${k} > ${d}`,()=>o.assign(b,!1).break()),u===1?o.assign(b,!0):o.if((0,t._)`${k} >= ${u}`,()=>o.assign(b,!0)))}}};e.default=i})),u1=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;let t=Se(),r=Ie(),i=Mt();e.error={message:({params:{property:c,depsCount:l,deps:u}})=>{let d=l===1?"property":"properties";return(0,t.str)`must have ${d} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:d}})=>(0,t._)`{property: ${c},
|
|
72
|
+
missingProperty: ${d},
|
|
73
|
+
depsCount: ${l},
|
|
74
|
+
deps: ${u}}`};let n={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){let[l,u]=o(c);a(c,l),s(c,u)}};function o({schema:c}){let l={},u={};for(let d in c){if(d==="__proto__")continue;let f=Array.isArray(c[d])?l:u;f[d]=c[d]}return[l,u]}function a(c,l=c.schema){let{gen:u,data:d,it:f}=c;if(Object.keys(l).length===0)return;let h=u.let("missing");for(let g in l){let b=l[g];if(b.length===0)continue;let S=(0,i.propertyInData)(u,d,g,f.opts.ownProperties);c.setParams({property:g,depsCount:b.length,deps:b.join(", ")}),f.allErrors?u.if(S,()=>{for(let y of b)(0,i.checkReportMissingProp)(c,y)}):(u.if((0,t._)`${S} && (${(0,i.checkMissingProp)(c,b,h)})`),(0,i.reportMissingProp)(c,h),u.else())}}e.validatePropertyDeps=a;function s(c,l=c.schema){let{gen:u,data:d,keyword:f,it:h}=c,g=u.name("valid");for(let b in l)(0,r.alwaysValidSchema)(h,l[b])||(u.if((0,i.propertyInData)(u,d,b,h.opts.ownProperties),()=>{let S=c.subschema({keyword:f,schemaProp:b},g);c.mergeValidEvaluated(S,g)},()=>u.var(g,!0)),c.ok(g))}e.validateSchemaDeps=s,e.default=n})),fz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r=Ie(),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:n})=>(0,t._)`{propertyName: ${n.propertyName}}`},code(n){let{gen:o,schema:a,data:s,it:c}=n;if((0,r.alwaysValidSchema)(c,a))return;let l=o.name("valid");o.forIn("key",s,u=>{n.setParams({propertyName:u}),n.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),o.if((0,t.not)(l),()=>{n.error(!0),c.allErrors||o.break()})}),n.ok(l)}};e.default=i})),E0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Mt(),r=Se(),i=jt(),n=Ie(),o={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,r._)`{additionalProperty: ${a.additionalProperty}}`},code(a){let{gen:s,schema:c,parentSchema:l,data:u,errsCount:d,it:f}=a;if(!d)throw new Error("ajv implementation error");let{allErrors:h,opts:g}=f;if(f.props=!0,g.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(f,c))return;let b=(0,t.allSchemaProperties)(l.properties),S=(0,t.allSchemaProperties)(l.patternProperties);y(),a.ok((0,r._)`${d} === ${i.default.errors}`);function y(){s.forIn("key",u,T=>{!b.length&&!S.length?I(T):s.if(x(T),()=>I(T))})}function x(T){let _;if(b.length>8){let R=(0,n.schemaRefOrVal)(f,l.properties,"properties");_=(0,t.isOwnProperty)(s,R,T)}else b.length?_=(0,r.or)(...b.map(R=>(0,r._)`${T} === ${R}`)):_=r.nil;return S.length&&(_=(0,r.or)(_,...S.map(R=>(0,r._)`${(0,t.usePattern)(a,R)}.test(${T})`))),(0,r.not)(_)}function k(T){s.code((0,r._)`delete ${u}[${T}]`)}function I(T){if(g.removeAdditional==="all"||g.removeAdditional&&c===!1){k(T);return}if(c===!1){a.setParams({additionalProperty:T}),a.error(),h||s.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(f,c)){let _=s.name("valid");g.removeAdditional==="failing"?(O(T,_,!1),s.if((0,r.not)(_),()=>{a.reset(),k(T)})):(O(T,_),h||s.if((0,r.not)(_),()=>s.break()))}}function O(T,_,R){let A={keyword:"additionalProperties",dataProp:T,dataPropType:n.Type.Str};R===!1&&Object.assign(A,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(A,_)}}};e.default=o})),hz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Mo(),r=Mt(),i=Ie(),n=E0(),o={keyword:"properties",type:"object",schemaType:"object",code(a){let{gen:s,schema:c,parentSchema:l,data:u,it:d}=a;d.opts.removeAdditional==="all"&&l.additionalProperties===void 0&&n.default.code(new t.KeywordCxt(d,n.default,"additionalProperties"));let f=(0,r.allSchemaProperties)(c);for(let y of f)d.definedProperties.add(y);d.opts.unevaluated&&f.length&&d.props!==!0&&(d.props=i.mergeEvaluated.props(s,(0,i.toHash)(f),d.props));let h=f.filter(y=>!(0,i.alwaysValidSchema)(d,c[y]));if(h.length===0)return;let g=s.name("valid");for(let y of h)b(y)?S(y):(s.if((0,r.propertyInData)(s,u,y,d.opts.ownProperties)),S(y),d.allErrors||s.else().var(g,!0),s.endIf()),a.it.definedProperties.add(y),a.ok(g);function b(y){return d.opts.useDefaults&&!d.compositeRule&&c[y].default!==void 0}function S(y){a.subschema({keyword:"properties",schemaProp:y,dataProp:y},g)}}};e.default=o})),gz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Mt(),r=Se(),i=Ie(),n=Ie(),o={keyword:"patternProperties",type:"object",schemaType:"object",code(a){let{gen:s,schema:c,data:l,parentSchema:u,it:d}=a,{opts:f}=d,h=(0,t.allSchemaProperties)(c),g=h.filter(O=>(0,i.alwaysValidSchema)(d,c[O]));if(h.length===0||g.length===h.length&&(!d.opts.unevaluated||d.props===!0))return;let b=f.strictSchema&&!f.allowMatchingProperties&&u.properties,S=s.name("valid");d.props!==!0&&!(d.props instanceof r.Name)&&(d.props=(0,n.evaluatedPropsToName)(s,d.props));let{props:y}=d;x();function x(){for(let O of h)b&&k(O),d.allErrors?I(O):(s.var(S,!0),I(O),s.if(S))}function k(O){for(let T in b)new RegExp(O).test(T)&&(0,i.checkStrictMode)(d,`property ${T} matches pattern ${O} (use allowMatchingProperties)`)}function I(O){s.forIn("key",l,T=>{s.if((0,r._)`${(0,t.usePattern)(a,O)}.test(${T})`,()=>{let _=g.includes(O);_||a.subschema({keyword:"patternProperties",schemaProp:O,dataProp:T,dataPropType:n.Type.Str},S),d.opts.unevaluated&&y!==!0?s.assign((0,r._)`${y}[${T}]`,!0):!_&&!d.allErrors&&s.if((0,r.not)(S),()=>s.break())})})}}};e.default=o})),vz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ie(),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(i){let{gen:n,schema:o,it:a}=i;if((0,t.alwaysValidSchema)(a,o)){i.fail();return}let s=n.name("valid");i.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),i.failResult(s,()=>i.reset(),()=>i.error())},error:{message:"must NOT be valid"}};e.default=r})),yz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Mt().validateUnion,error:{message:"must match a schema in anyOf"}};e.default=t})),bz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r=Ie(),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:n})=>(0,t._)`{passingSchemas: ${n.passing}}`},code(n){let{gen:o,schema:a,parentSchema:s,it:c}=n;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&s.discriminator)return;let l=a,u=o.let("valid",!1),d=o.let("passing",null),f=o.name("_valid");n.setParams({passing:d}),o.block(h),n.result(u,()=>n.reset(),()=>n.error(!0));function h(){l.forEach((g,b)=>{let S;(0,r.alwaysValidSchema)(c,g)?o.var(f,!0):S=n.subschema({keyword:"oneOf",schemaProp:b,compositeRule:!0},f),b>0&&o.if((0,t._)`${f} && ${u}`).assign(u,!1).assign(d,(0,t._)`[${d}, ${b}]`).else(),o.if(f,()=>{o.assign(u,!0),o.assign(d,b),S&&n.mergeEvaluated(S,t.Name)})})}}};e.default=i})),_z=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ie(),r={keyword:"allOf",schemaType:"array",code(i){let{gen:n,schema:o,it:a}=i;if(!Array.isArray(o))throw new Error("ajv implementation error");let s=n.name("valid");o.forEach((c,l)=>{if((0,t.alwaysValidSchema)(a,c))return;let u=i.subschema({keyword:"allOf",schemaProp:l},s);i.ok(s),i.mergeEvaluated(u)})}};e.default=r})),Sz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r=Ie(),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:o})=>(0,t.str)`must match "${o.ifClause}" schema`,params:({params:o})=>(0,t._)`{failingKeyword: ${o.ifClause}}`},code(o){let{gen:a,parentSchema:s,it:c}=o;s.then===void 0&&s.else===void 0&&(0,r.checkStrictMode)(c,'"if" without "then" and "else" is ignored');let l=n(c,"then"),u=n(c,"else");if(!l&&!u)return;let d=a.let("valid",!0),f=a.name("_valid");if(h(),o.reset(),l&&u){let b=a.let("ifClause");o.setParams({ifClause:b}),a.if(f,g("then",b),g("else",b))}else l?a.if(f,g("then")):a.if((0,t.not)(f),g("else"));o.pass(d,()=>o.error(!0));function h(){let b=o.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},f);o.mergeEvaluated(b)}function g(b,S){return()=>{let y=o.subschema({keyword:b},f);a.assign(d,f),o.mergeValidEvaluated(y,d),S?a.assign(S,(0,t._)`${b}`):o.setParams({ifClause:b})}}}};function n(o,a){let s=o.schema[a];return s!==void 0&&!(0,r.alwaysValidSchema)(o,s)}e.default=i})),kz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ie(),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:i,parentSchema:n,it:o}){n.if===void 0&&(0,t.checkStrictMode)(o,`"${i}" without "if" is ignored`)}};e.default=r})),C0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=I0(),r=dz(),i=z0(),n=pz(),o=mz(),a=u1(),s=fz(),c=E0(),l=hz(),u=gz(),d=vz(),f=yz(),h=bz(),g=_z(),b=Sz(),S=kz();function y(x=!1){let k=[d.default,f.default,h.default,g.default,b.default,S.default,s.default,c.default,a.default,l.default,u.default];return x?k.push(r.default,n.default):k.push(t.default,i.default),k.push(o.default),k}e.default=y})),wz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match format "${i}"`,params:({schemaCode:i})=>(0,t._)`{format: ${i}}`},code(i,n){let{gen:o,data:a,$data:s,schema:c,schemaCode:l,it:u}=i,{opts:d,errSchemaPath:f,schemaEnv:h,self:g}=u;if(!d.validateFormats)return;s?b():S();function b(){let y=o.scopeValue("formats",{ref:g.formats,code:d.code.formats}),x=o.const("fDef",(0,t._)`${y}[${l}]`),k=o.let("fType"),I=o.let("format");o.if((0,t._)`typeof ${x} == "object" && !(${x} instanceof RegExp)`,()=>o.assign(k,(0,t._)`${x}.type || "string"`).assign(I,(0,t._)`${x}.validate`),()=>o.assign(k,(0,t._)`"string"`).assign(I,x)),i.fail$data((0,t.or)(O(),T()));function O(){return d.strictSchema===!1?t.nil:(0,t._)`${l} && !${I}`}function T(){let _=h.$async?(0,t._)`(${x}.async ? await ${I}(${a}) : ${I}(${a}))`:(0,t._)`${I}(${a})`,R=(0,t._)`(typeof ${I} == "function" ? ${_} : ${I}.test(${a}))`;return(0,t._)`${I} && ${I} !== true && ${k} === ${n} && !${R}`}}function S(){let y=g.formats[c];if(!y){O();return}if(y===!0)return;let[x,k,I]=T(y);x===n&&i.pass(_());function O(){if(d.strictSchema===!1){g.logger.warn(R());return}throw new Error(R());function R(){return`unknown format "${c}" ignored in schema at path "${f}"`}}function T(R){let A=R instanceof RegExp?(0,t.regexpCode)(R):d.code.formats?(0,t._)`${d.code.formats}${(0,t.getProperty)(c)}`:void 0,F=o.scopeValue("formats",{key:c,ref:R,code:A});return typeof R=="object"&&!(R instanceof RegExp)?[R.type||"string",R.validate,(0,t._)`${F}.validate`]:["string",R,F]}function _(){if(typeof y=="object"&&!(y instanceof RegExp)&&y.async){if(!h.$async)throw new Error("async format in sync schema");return(0,t._)`await ${I}(${a})`}return typeof k=="function"?(0,t._)`${I}(${a})`:(0,t._)`${I}.test(${a})`}}}};e.default=r})),P0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=[wz().default];e.default=t})),O0=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"]})),N0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=T0(),r=R0(),i=C0(),n=P0(),o=O0(),a=[t.default,r.default,(0,i.default)(),n.default,o.metadataVocabulary,o.contentVocabulary];e.default=a})),$z=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0;var t;(function(r){r.Tag="tag",r.Mapping="mapping"})(t||(e.DiscrError=t={}))})),d1=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r=$z(),i=zd(),n=qo(),o=Ie(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:s,tagName:c}})=>s===r.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:u,parentSchema:d,it:f}=s,{oneOf:h}=d;if(!f.opts.discriminator)throw new Error("discriminator: requires discriminator option");let g=u.propertyName;if(typeof g!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!h)throw new Error("discriminator: requires oneOf keyword");let b=c.let("valid",!1),S=c.const("tag",(0,t._)`${l}${(0,t.getProperty)(g)}`);c.if((0,t._)`typeof ${S} == "string"`,()=>y(),()=>s.error(!1,{discrError:r.DiscrError.Tag,tag:S,tagName:g})),s.ok(b);function y(){let I=k();c.if(!1);for(let O in I)c.elseIf((0,t._)`${S} === ${O}`),c.assign(b,x(I[O]));c.else(),s.error(!1,{discrError:r.DiscrError.Mapping,tag:S,tagName:g}),c.endIf()}function x(I){let O=c.name("valid"),T=s.subschema({keyword:"oneOf",schemaProp:I},O);return s.mergeEvaluated(T,t.Name),O}function k(){var I;let O={},T=R(d),_=!0;for(let M=0;M<h.length;M++){let V=h[M];if(V?.$ref&&!(0,o.schemaHasRulesButRef)(V,f.self.RULES)){let ne=V.$ref;if(V=i.resolveRef.call(f.self,f.schemaEnv.root,f.baseId,ne),V instanceof i.SchemaEnv&&(V=V.schema),V===void 0)throw new n.default(f.opts.uriResolver,f.baseId,ne)}let te=(I=V?.properties)===null||I===void 0?void 0:I[g];if(typeof te!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${g}"`);_=_&&(T||R(V)),A(te,M)}if(!_)throw new Error(`discriminator: "${g}" must be required`);return O;function R({required:M}){return Array.isArray(M)&&M.includes(g)}function A(M,V){if(M.const)F(M.const,V);else if(M.enum)for(let te of M.enum)F(te,V);else throw new Error(`discriminator: "properties/${g}" must have "const" or "enum"`)}function F(M,V){if(typeof M!="string"||M in O)throw new Error(`discriminator: "${g}" values must be unique strings`);O[M]=V}}}};e.default=a})),xz=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}})),U0=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 r=s1(),i=N0(),n=d1(),o=xz(),a=["/properties"],s="http://json-schema.org/draft-07/schema";var c=class extends r.default{_addVocabularies(){super._addVocabularies(),i.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let h=this.opts.$data?this.$dataMetaSchema(o,a):o;this.addMetaSchema(h,s,!1),this.refs["http://json-schema.org/schema"]=s}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(s)?s:void 0)}};e.Ajv=c,t.exports=e=c,t.exports.Ajv=c,Object.defineProperty(e,"__esModule",{value:!0}),e.default=c;var l=Mo();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=Se();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=Ja();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return d.default}});var f=qo();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})),A0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicAnchor=void 0;let t=Se(),r=jt(),i=zd(),n=c1(),o={keyword:"$dynamicAnchor",schemaType:"string",code:c=>a(c,c.schema)};function a(c,l){let{gen:u,it:d}=c;d.schemaEnv.root.dynamicAnchors[l]=!0;let f=(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(l)}`,h=d.errSchemaPath==="#"?d.validateName:s(c);u.if((0,t._)`!${f}`,()=>u.assign(f,h))}e.dynamicAnchor=a;function s(c){let{schemaEnv:l,schema:u,self:d}=c.it,{root:f,baseId:h,localRefs:g,meta:b}=l.root,{schemaId:S}=d.opts,y=new i.SchemaEnv({schema:u,schemaId:S,root:f,baseId:h,localRefs:g,meta:b});return i.compileSchema.call(d,y),(0,n.getValidate)(c,y)}e.default=o})),j0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.dynamicRef=void 0;let t=Se(),r=jt(),i=c1(),n={keyword:"$dynamicRef",schemaType:"string",code:a=>o(a,a.schema)};function o(a,s){let{gen:c,keyword:l,it:u}=a;if(s[0]!=="#")throw new Error(`"${l}" only supports hash fragment reference`);let d=s.slice(1);if(u.allErrors)f();else{let g=c.let("valid",!1);f(g),a.ok(g)}function f(g){if(u.schemaEnv.root.dynamicAnchors[d]){let b=c.let("_v",(0,t._)`${r.default.dynamicAnchors}${(0,t.getProperty)(d)}`);c.if(b,h(b,g),h(u.validateName,g))}else h(u.validateName,g)()}function h(g,b){return b?()=>c.block(()=>{(0,i.callRef)(a,g),c.let(b,!0)}):()=>(0,i.callRef)(a,g)}}e.dynamicRef=o,e.default=n})),Tz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=A0(),r=Ie(),i={keyword:"$recursiveAnchor",schemaType:"boolean",code(n){n.schema?(0,t.dynamicAnchor)(n,""):(0,r.checkStrictMode)(n.it,"$recursiveAnchor: false is ignored")}};e.default=i})),Rz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=j0(),r={keyword:"$recursiveRef",schemaType:"string",code:i=>(0,t.dynamicRef)(i,i.schema)};e.default=r})),M0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=A0(),r=j0(),i=Tz(),n=Rz(),o=[t.default,r.default,i.default,n.default];e.default=o})),Iz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=u1(),r={keyword:"dependentRequired",type:"object",schemaType:"object",error:t.error,code:i=>(0,t.validatePropertyDeps)(i)};e.default=r})),zz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=u1(),r={keyword:"dependentSchemas",type:"object",schemaType:"object",code:i=>(0,t.validateSchemaDeps)(i)};e.default=r})),Ez=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Ie(),r={keyword:["maxContains","minContains"],type:"array",schemaType:"number",code({keyword:i,parentSchema:n,it:o}){n.contains===void 0&&(0,t.checkStrictMode)(o,`"${i}" without "contains" is ignored`)}};e.default=r})),q0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Iz(),r=zz(),i=Ez(),n=[t.default,r.default,i.default];e.default=n})),Cz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r=Ie(),i=jt(),n={keyword:"unevaluatedProperties",type:"object",schemaType:["boolean","object"],trackErrors:!0,error:{message:"must NOT have unevaluated properties",params:({params:o})=>(0,t._)`{unevaluatedProperty: ${o.unevaluatedProperty}}`},code(o){let{gen:a,schema:s,data:c,errsCount:l,it:u}=o;if(!l)throw new Error("ajv implementation error");let{allErrors:d,props:f}=u;f instanceof t.Name?a.if((0,t._)`${f} !== true`,()=>a.forIn("key",c,S=>a.if(g(f,S),()=>h(S)))):f!==!0&&a.forIn("key",c,S=>f===void 0?h(S):a.if(b(f,S),()=>h(S))),u.props=!0,o.ok((0,t._)`${l} === ${i.default.errors}`);function h(S){if(s===!1){o.setParams({unevaluatedProperty:S}),o.error(),d||a.break();return}if(!(0,r.alwaysValidSchema)(u,s)){let y=a.name("valid");o.subschema({keyword:"unevaluatedProperties",dataProp:S,dataPropType:r.Type.Str},y),d||a.if((0,t.not)(y),()=>a.break())}}function g(S,y){return(0,t._)`!${S} || !${S}[${y}]`}function b(S,y){let x=[];for(let k in S)S[k]===!0&&x.push((0,t._)`${y} !== ${k}`);return(0,t.and)(...x)}}};e.default=n})),Pz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Se(),r=Ie(),i={keyword:"unevaluatedItems",type:"array",schemaType:["boolean","object"],error:{message:({params:{len:n}})=>(0,t.str)`must NOT have more than ${n} items`,params:({params:{len:n}})=>(0,t._)`{limit: ${n}}`},code(n){let{gen:o,schema:a,data:s,it:c}=n,l=c.items||0;if(l===!0)return;let u=o.const("len",(0,t._)`${s}.length`);if(a===!1)n.setParams({len:l}),n.fail((0,t._)`${u} > ${l}`);else if(typeof a=="object"&&!(0,r.alwaysValidSchema)(c,a)){let f=o.var("valid",(0,t._)`${u} <= ${l}`);o.if((0,t.not)(f),()=>d(f,l)),n.ok(f)}c.items=!0;function d(f,h){o.forRange("i",h,u,g=>{n.subschema({keyword:"unevaluatedItems",dataProp:g,dataPropType:r.Type.Num},f),c.allErrors||o.if((0,t.not)(f),()=>o.break())})}}};e.default=i})),L0=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Cz(),r=Pz(),i=[t.default,r.default];e.default=i})),Oz=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/schema",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0,"https://json-schema.org/draft/2019-09/vocab/applicator":!0,"https://json-schema.org/draft/2019-09/vocab/validation":!0,"https://json-schema.org/draft/2019-09/vocab/meta-data":!0,"https://json-schema.org/draft/2019-09/vocab/format":!1,"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Core and Validation specifications meta-schema",allOf:[{$ref:"meta/core"},{$ref:"meta/applicator"},{$ref:"meta/validation"},{$ref:"meta/meta-data"},{$ref:"meta/format"},{$ref:"meta/content"}],type:["object","boolean"],properties:{definitions:{$comment:"While no longer an official keyword as it is replaced by $defs, this keyword is retained in the meta-schema to prevent incompatible extensions as it remains in common use.",type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},dependencies:{$comment:'"dependencies" is no longer a keyword, but schema authors should avoid redefining it to facilitate a smooth transition to "dependentSchemas" and "dependentRequired"',type:"object",additionalProperties:{anyOf:[{$recursiveRef:"#"},{$ref:"meta/validation#/$defs/stringArray"}]}}}}})),Nz=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/applicator",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/applicator":!0},$recursiveAnchor:!0,title:"Applicator vocabulary meta-schema",type:["object","boolean"],properties:{additionalItems:{$recursiveRef:"#"},unevaluatedItems:{$recursiveRef:"#"},items:{anyOf:[{$recursiveRef:"#"},{$ref:"#/$defs/schemaArray"}]},contains:{$recursiveRef:"#"},additionalProperties:{$recursiveRef:"#"},unevaluatedProperties:{$recursiveRef:"#"},properties:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$recursiveRef:"#"},propertyNames:{format:"regex"},default:{}},dependentSchemas:{type:"object",additionalProperties:{$recursiveRef:"#"}},propertyNames:{$recursiveRef:"#"},if:{$recursiveRef:"#"},then:{$recursiveRef:"#"},else:{$recursiveRef:"#"},allOf:{$ref:"#/$defs/schemaArray"},anyOf:{$ref:"#/$defs/schemaArray"},oneOf:{$ref:"#/$defs/schemaArray"},not:{$recursiveRef:"#"}},$defs:{schemaArray:{type:"array",minItems:1,items:{$recursiveRef:"#"}}}}})),Uz=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/content",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/content":!0},$recursiveAnchor:!0,title:"Content vocabulary meta-schema",type:["object","boolean"],properties:{contentMediaType:{type:"string"},contentEncoding:{type:"string"},contentSchema:{$recursiveRef:"#"}}}})),Az=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/core",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/core":!0},$recursiveAnchor:!0,title:"Core vocabulary meta-schema",type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference",$comment:"Non-empty fragments not allowed.",pattern:"^[^#]*#?$"},$schema:{type:"string",format:"uri"},$anchor:{type:"string",pattern:"^[A-Za-z][-A-Za-z0-9.:_]*$"},$ref:{type:"string",format:"uri-reference"},$recursiveRef:{type:"string",format:"uri-reference"},$recursiveAnchor:{type:"boolean",default:!1},$vocabulary:{type:"object",propertyNames:{type:"string",format:"uri"},additionalProperties:{type:"boolean"}},$comment:{type:"string"},$defs:{type:"object",additionalProperties:{$recursiveRef:"#"},default:{}}}}})),jz=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/format",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/format":!0},$recursiveAnchor:!0,title:"Format vocabulary meta-schema",type:["object","boolean"],properties:{format:{type:"string"}}}})),Mz=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/meta-data",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/meta-data":!0},$recursiveAnchor:!0,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}}}})),qz=K(((e,t)=>{t.exports={$schema:"https://json-schema.org/draft/2019-09/schema",$id:"https://json-schema.org/draft/2019-09/meta/validation",$vocabulary:{"https://json-schema.org/draft/2019-09/vocab/validation":!0},$recursiveAnchor:!0,title:"Validation vocabulary meta-schema",type:["object","boolean"],properties:{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"}},const:!0,enum:{type:"array",items:!0},type:{anyOf:[{$ref:"#/$defs/simpleTypes"},{type:"array",items:{$ref:"#/$defs/simpleTypes"},minItems:1,uniqueItems:!0}]}},$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:[]}}}})),Lz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Oz(),r=Nz(),i=Uz(),n=Az(),o=jz(),a=Mz(),s=qz(),c=["/properties"];function l(u){return[t,r,i,n,d(this,o),a,d(this,s)].forEach(f=>this.addMetaSchema(f,void 0,!1)),this;function d(f,h){return u?f.$dataMetaSchema(h,c):h}}e.default=l})),Dz=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.Ajv2019=void 0;let r=s1(),i=N0(),n=M0(),o=q0(),a=L0(),s=d1(),c=Lz(),l="https://json-schema.org/draft/2019-09/schema";var u=class extends r.default{constructor(b={}){super({...b,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),this.addVocabulary(n.default),i.default.forEach(b=>this.addVocabulary(b)),this.addVocabulary(o.default),this.addVocabulary(a.default),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:b,meta:S}=this.opts;S&&(c.default.call(this,b),this.refs["http://json-schema.org/schema"]=l)}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}};e.Ajv2019=u,t.exports=e=u,t.exports.Ajv2019=u,Object.defineProperty(e,"__esModule",{value:!0}),e.default=u;var d=Mo();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var f=Se();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});var h=Ja();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return h.default}});var g=qo();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return g.default}})})),Fz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=T0(),r=R0(),i=C0(),n=M0(),o=q0(),a=L0(),s=P0(),c=O0(),l=[n.default,t.default,r.default,(0,i.default)(!0),s.default,c.metadataVocabulary,c.contentVocabulary,o.default,a.default];e.default=l})),Vz=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}}}})),Hz=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"}}}}})),Zz=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"}}}})),Gz=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"}}}})),Jz=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"}}}})),Bz=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"}}}})),Kz=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}}}})),Wz=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:[]}}}})),Qz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0});let t=Vz(),r=Hz(),i=Zz(),n=Gz(),o=Jz(),a=Bz(),s=Kz(),c=Wz(),l=["/properties"];function u(d){return[t,r,i,n,o,f(this,a),s,f(this,c)].forEach(h=>this.addMetaSchema(h,void 0,!1)),this;function f(h,g){return d?h.$dataMetaSchema(g,l):g}}e.default=u})),Xz=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 r=s1(),i=Fz(),n=d1(),o=Qz(),a="https://json-schema.org/draft/2020-12/schema";var s=class extends r.default{constructor(f={}){super({...f,dynamicRef:!0,next:!0,unevaluated:!0})}_addVocabularies(){super._addVocabularies(),i.default.forEach(f=>this.addVocabulary(f)),this.opts.discriminator&&this.addKeyword(n.default)}_addDefaultMetaSchema(){super._addDefaultMetaSchema();let{$data:f,meta:h}=this.opts;h&&(o.default.call(this,f),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=Mo();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=Se();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 u=Ja();Object.defineProperty(e,"ValidationError",{enumerable:!0,get:function(){return u.default}});var d=qo();Object.defineProperty(e,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})),Yz=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatNames=e.fastFormats=e.fullFormats=void 0;function t(M,V){return{validate:M,compare:V}}e.fullFormats={date:t(o,a),time:t(c(!0),l),"date-time":t(f(!0),h),"iso-time":t(c(),u),"iso-date-time":t(f(),g),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:y,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:F,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:k,int32:{type:"number",validate:T},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,h),"iso-time":t(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,u),"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,g),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},e.formatNames=Object.keys(e.fullFormats);function r(M){return M%4===0&&(M%100!==0||M%400===0)}let i=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function o(M){let V=i.exec(M);if(!V)return!1;let te=+V[1],ne=+V[2],ye=+V[3];return ne>=1&&ne<=12&&ye>=1&&ye<=(ne===2&&r(te)?29:n[ne])}function a(M,V){if(M&&V)return M>V?1:M<V?-1:0}let s=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function c(M){return function(te){let ne=s.exec(te);if(!ne)return!1;let ye=+ne[1],Ce=+ne[2],Ee=+ne[3],qe=ne[4],we=ne[5]==="-"?-1:1,P=+(ne[6]||0),L=+(ne[7]||0);if(P>23||L>59||M&&!qe)return!1;if(ye<=23&&Ce<=59&&Ee<60)return!0;let w=Ce-L*we,m=ye-P*we-(w<0?1:0);return(m===23||m===-1)&&(w===59||w===-1)&&Ee<61}}function l(M,V){if(!(M&&V))return;let te=new Date("2020-01-01T"+M).valueOf(),ne=new Date("2020-01-01T"+V).valueOf();if(te&&ne)return te-ne}function u(M,V){if(!(M&&V))return;let te=s.exec(M),ne=s.exec(V);if(te&&ne)return M=te[1]+te[2]+te[3],V=ne[1]+ne[2]+ne[3],M>V?1:M<V?-1:0}let d=/t|\s/i;function f(M){let V=c(M);return function(ne){let ye=ne.split(d);return ye.length===2&&o(ye[0])&&V(ye[1])}}function h(M,V){if(!(M&&V))return;let te=new Date(M).valueOf(),ne=new Date(V).valueOf();if(te&&ne)return te-ne}function g(M,V){if(!(M&&V))return;let[te,ne]=M.split(d),[ye,Ce]=V.split(d),Ee=a(te,ye);if(Ee!==void 0)return Ee||l(ne,Ce)}let b=/\/|:/,S=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;function y(M){return b.test(M)&&S.test(M)}let x=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function k(M){return x.lastIndex=0,x.test(M)}let I=-(2**31),O=2**31-1;function T(M){return Number.isInteger(M)&&M<=O&&M>=I}function _(M){return Number.isInteger(M)}function R(){return!0}let A=/[^\\]\\Z/;function F(M){if(A.test(M))return!1;try{return new RegExp(M),!0}catch{return!1}}})),eE=K((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.formatLimitDefinition=void 0;let t=U0(),r=Se(),i=r.operators,n={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},o={message:({keyword:s,schemaCode:c})=>(0,r.str)`should be ${n[s].okStr} ${c}`,params:({keyword:s,schemaCode:c})=>(0,r._)`{comparison: ${n[s].okStr}, limit: ${c}}`};e.formatLimitDefinition={keyword:Object.keys(n),type:"string",schemaType:"string",$data:!0,error:o,code(s){let{gen:c,data:l,schemaCode:u,keyword:d,it:f}=s,{opts:h,self:g}=f;if(!h.validateFormats)return;let b=new t.KeywordCxt(f,g.RULES.all.format.definition,"format");b.$data?S():y();function S(){let k=c.scopeValue("formats",{ref:g.formats,code:h.code.formats}),I=c.const("fmt",(0,r._)`${k}[${b.schemaCode}]`);s.fail$data((0,r.or)((0,r._)`typeof ${I} != "object"`,(0,r._)`${I} instanceof RegExp`,(0,r._)`typeof ${I}.compare != "function"`,x(I)))}function y(){let k=b.schema,I=g.formats[k];if(!I||I===!0)return;if(typeof I!="object"||I instanceof RegExp||typeof I.compare!="function")throw new Error(`"${d}": format "${k}" does not define "compare" function`);let O=c.scopeValue("formats",{key:k,ref:I,code:h.code.formats?(0,r._)`${h.code.formats}${(0,r.getProperty)(k)}`:void 0});s.fail$data(x(O))}function x(k){return(0,r._)`${k}.compare(${l}, ${u}) ${n[d].fail} 0`}},dependencies:["format"]};let a=s=>(s.addKeyword(e.formatLimitDefinition),s);e.default=a})),tE=K(((e,t)=>{Object.defineProperty(e,"__esModule",{value:!0});let r=Yz(),i=eE(),n=Se(),o=new n.Name("fullFormats"),a=new n.Name("fastFormats"),s=(l,u={keywords:!0})=>{if(Array.isArray(u))return c(l,u,r.fullFormats,o),l;let[d,f]=u.mode==="fast"?[r.fastFormats,a]:[r.fullFormats,o];return c(l,u.formats||r.formatNames,d,f),u.keywords&&(0,i.default)(l),l};s.get=(l,u="full")=>{let d=(u==="fast"?r.fastFormats:r.fullFormats)[l];if(!d)throw new Error(`Unknown format "${l}"`);return d};function c(l,u,d,f){var h,g;(h=(g=l.opts.code).formats)!==null&&h!==void 0||(g.formats=(0,n._)`require("ajv-formats/dist/formats").${f}`);for(let b of u)l.addFormat(b,d[b])}t.exports=e=s,Object.defineProperty(e,"__esModule",{value:!0}),e.default=s})),D0=U0(),nE=Dz(),rE=Xz(),oE=ms(tE(),1),iE=oE.default;function a1(e){let t=new e({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return iE(t),t}var Ed=class{_ajv;_ajvDraft7;_ajv2019;_userAjv;constructor(e){this._userAjv=e!==void 0,this._ajv=e}get ajv(){return this._ajv??=a1(rE.Ajv2020)}_engineFor(e){if(this._userAjv)return this.ajv;let t=T1(e,"pass a pre-configured Ajv instance to AjvJsonSchemaValidator(ajv) to validate other dialects.");return t==="2020-12"?this.ajv:t==="2019-09"?this._ajv2019??=a1(nE.Ajv2019):this._ajvDraft7??=a1(D0.Ajv)}getValidator(e){let t=this._engineFor(e),r="$id"in e&&typeof e.$id=="string"?t.getSchema(e.$id)??t.compile(e):t.compile(e);return i=>r(i)?{valid:!0,data:i,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:t.errorsText(r.errors)}}},WN=D0.Ajv;import p1 from"node:process";var K0=Symbol.for("mcp.completable");function f1(e){return!!e&&typeof e=="object"&&K0 in e}function cE(e){return e[K0]?.complete}var h1=15e3,lE=2**31-1;function g1(e,t){if(!Number.isFinite(e)||e<1)return;let r=setInterval(t,Math.min(e,lE));return r.unref?.(),r}var W0,Q0=class{static{W0=e=>e._classification}onclose;onerror;onmessage;_classification;_responseMode;_started=!1;_used=!1;_closed=!1;_terminalDelivered=!1;_dispatchWindowOpen=!1;_requestId;_deferredResponse;_sse;_abortCleanup;_keepAliveMs;constructor(e){this._classification=e.classification,this._responseMode=e.responseMode??"auto",this._keepAliveMs=e.keepAliveMs??h1}async start(){if(this._started)throw new Error("PerRequestHTTPServerTransport is already started");this._started=!0}async handleMessage(e,t){if(this._used)throw new Error("PerRequestHTTPServerTransport serves exactly one exchange; construct a new transport per request");if(!this._started||this.onmessage===void 0)throw new Error("PerRequestHTTPServerTransport is not connected: connect a server to this transport before handling a message");if(this._closed)throw new Error("PerRequestHTTPServerTransport is closed");this._used=!0;let r=t?.request?.signal;if(r?.aborted)throw await this.close(),new ve(ke.ConnectionClosed,"The request was aborted before it could be handled");let i={classification:this._classification,...t?.request!==void 0&&{request:t.request},...t?.authInfo!==void 0&&{authInfo:t.authInfo}};if(_t(e)){this._requestId=e.id;let n,o,a=new Promise((s,c)=>{n=s,o=c});if(this._deferredResponse={promise:a,resolve:n,reject:o,settled:!1},r!==void 0){let s=()=>{this.close()};r.addEventListener("abort",s,{once:!0}),this._abortCleanup=()=>r.removeEventListener("abort",s)}this._dispatchWindowOpen=!0;try{this.onmessage(e,i)}finally{this._dispatchWindowOpen=!1}return this._responseMode==="sse"&&!this._closed&&!this._deferredResponse.settled&&this.upgradeToSse(),a}return this.onmessage(e,i),new Response(null,{status:202})}async send(e,t){if(this._closed)return;let r=br(e)||Sr(e),i=r?e.id:t?.relatedRequestId;if(this._requestId===void 0||i===void 0||i!==this._requestId){r&&this.onerror?.(new Error(`Received a response for an unknown request id: ${String(e.id)}`));return}if(r){if(this._terminalDelivered)return;this._terminalDelivered=!0;let n=Sr(e)?e.error.code:void 0,o=n!==void 0&&(this._dispatchWindowOpen||n===ee.MissingRequiredClientCapability)?s0[n]:void 0;if(o!==void 0&&this._sse===void 0){this.settleResponse(Response.json(e,{status:o,headers:{"Content-Type":"application/json"}})),queueMicrotask(()=>{this.close()});return}if(this._sse!==void 0||this._responseMode==="sse"){this._sse===void 0&&this.upgradeToSse(),this.writeMessageFrame(e),this.finalizeStream();return}this.settleResponse(Response.json(e,{status:200,headers:{"Content-Type":"application/json"}})),queueMicrotask(()=>{this.close()});return}this._responseMode!=="json"&&(this._sse===void 0&&this.upgradeToSse(),this.writeMessageFrame(e))}writeCommentFrame(e){if(this._closed||this._sse===void 0||this._sse.closed)return;let t=e.split(`
|
|
75
|
+
`).map(r=>`: ${r}`).join(`
|
|
76
|
+
`);this.writeFrame(`${t}
|
|
77
|
+
|
|
78
|
+
`)}async close(){if(!this._closed){if(this._closed=!0,this._abortCleanup?.(),this._abortCleanup=void 0,this._sse?.keepAliveTimer!==void 0&&clearInterval(this._sse.keepAliveTimer),this._sse!==void 0&&!this._sse.closed){this._sse.closed=!0;try{this._sse.controller.close()}catch{}}this._deferredResponse!==void 0&&!this._deferredResponse.settled&&(this._deferredResponse.settled=!0,this._deferredResponse.reject(new ve(ke.ConnectionClosed,"Connection closed before a response was produced"))),this.onclose?.()}}settleResponse(e){this._deferredResponse===void 0||this._deferredResponse.settled||(this._deferredResponse.settled=!0,this._deferredResponse.resolve(e))}upgradeToSse(){let e,t=new ReadableStream({start:r=>{e=r},cancel:()=>{this.close()}});this._sse={controller:e,encoder:new TextEncoder,closed:!1},this._sse.keepAliveTimer=g1(this._keepAliveMs,()=>this.writeCommentFrame("keepalive")),this.settleResponse(new Response(t,{status:200,headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache, no-transform",Connection:"keep-alive","X-Accel-Buffering":"no"}}))}finalizeStream(){if(this._sse?.keepAliveTimer!==void 0&&clearInterval(this._sse.keepAliveTimer),this._sse!==void 0&&!this._sse.closed){this._sse.closed=!0;try{this._sse.controller.close()}catch{}}queueMicrotask(()=>{this.close()})}writeMessageFrame(e){this.writeFrame(`event: message
|
|
79
|
+
data: ${JSON.stringify(e)}
|
|
80
|
+
|
|
81
|
+
`)}writeFrame(e){if(!(this._sse===void 0||this._sse.closed))try{this._sse.controller.enqueue(this._sse.encoder.encode(e))}catch(t){this.onerror?.(new Error(`Failed to write to the response stream: ${t}`))}}};function uE(e){return e instanceof Q0?W0(e):void 0}function dE(e){return typeof e=="object"&&e!==null&&"setScopeChallengeResolver"in e&&typeof e.setScopeChallengeResolver=="function"}var pE=8,mE=6e5;function fE(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??pE,roundTimeoutMs:e?.roundTimeoutMs??mE,legacyShim:e?.legacyShim??!0}}function X0(e,t,r){if(r===null||typeof r!="object"||typeof r.method!="string")throw new de(ee.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 i=r,n=FS(i);if(n===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input request '${t}' of kind '${i.method}', which is not an embedded request the 2026-07-28 revision defines`);return{embedded:i,required:n}}function hE(){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 r=[...t].map(i=>i.toString(16).padStart(2,"0")).join("");return`${r.slice(0,8)}-${r.slice(8,12)}-${r.slice(12,16)}-${r.slice(16,20)}-${r.slice(20)}`}function m1(e,t){if(e==="tools/call")return{content:[{type:"text",text:t}],isError:!0};throw new de(ee.InternalError,t)}var gE=class{constructor(e){this._host=e}async fulfill(e,t,r,i,n){let{maxRounds:o,roundTimeoutMs:a}=this._host,s=i.mcpReq.signal,c=n,l=0;for(;;){if(l+=1,l>o)return m1(e,d0(e,o));let u=c.inputRequests,d=u!=null&&Object.keys(u).length>0,f=typeof c.requestState=="string"?c.requestState:void 0;if(!d&&f===void 0)throw new de(ee.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 h;if(d){let S=this._host.resolvedClientCapabilities(i),y=[];for(let[k,I]of Object.entries(u)){let{embedded:O,required:T}=X0(e,k,I);if(O.method!=="roots/list"&&O.params===void 0)throw new de(ee.InternalError,`Handler for ${e} returned an input request '${k}' of kind '${O.method}' without params`);if(fd(T,S)!==void 0)return m1(e,`Cannot request input '${k}' (${O.method}): the client on this 2025-era connection did not declare the required capability${S===void 0?" (no client capabilities are available on this connection \u2014 per-request legacy serving cannot receive server-to-client requests)":""}`);y.push([k,O])}let x=m0(s);try{let k={relatedRequestId:i.mcpReq.id,timeout:a,resetTimeoutOnProgress:!0,onprogress:()=>{},signal:x.signal},I=await Promise.all(y.map(async([O,T])=>{try{return[O,await this._dispatchLeg(T,k)]}catch(_){throw x.abort(_),_}}));h=Object.fromEntries(I)}catch(k){if(s.aborted)throw k;return m1(e,`Fulfilling input required by '${e}' failed: ${k instanceof Error?k.message:String(k)}`)}finally{x.dispose()}}else await p0(u0,s);let g={...i,mcpReq:{...i.mcpReq,inputResponses:h,droppedInputResponseKeys:void 0,requestState:Ga(f)}};if(f!==void 0){let S=await this._host.verifyRequestState(f,g,e);S!==void 0&&(g=Yv(g,S))}let b=await t(r,g);if(!cn(b))return b;c=b}}async _dispatchLeg(e,t){switch(e.method){case"elicitation/create":{let r=e.params;return r.mode==="url"&&r.elicitationId===void 0&&(r={...r,elicitationId:hE()}),await this._host.sendElicitation(r,t)}case"sampling/createMessage":return await this._host.sendSampling(e.params,t);case"roots/list":return await this._host.listRoots(e.params,t)}}},vE=new Set(["tools/call","prompts/get","resources/read"]),yE,Y0,ek;function v1(e,t){Y0(e,t)}function y1(e){return ek(e)}var tk=class extends t1{_clientCapabilities;_clientVersion;static{yE=(e,t)=>{t.clientCapabilities!==void 0&&(e._clientCapabilities=t.clientCapabilities),t.clientInfo!==void 0&&(e._clientVersion=t.clientInfo)},Y0=(e,t)=>{let r=t.filter(i=>!e._supportedProtocolVersions.includes(i));r.length>0&&(e._supportedProtocolVersions=[...e._supportedProtocolVersions,...r]),e.setRequestHandler("server/discover",()=>e._ondiscover())},ek=e=>e._serverInfo}_capabilities;_instructions;_jsonSchemaValidator;_cacheHints;_requestStateVerify;_inputRequiredServing;_legacyShim;_boundFromTransport=!1;_legacyInputRequiredShim(){return this._legacyShim??=new gE({maxRounds:this._inputRequiredServing.maxRounds,roundTimeoutMs:this._inputRequiredServing.roundTimeoutMs,resolvedClientCapabilities:e=>this._inputRequestCapabilityView(e),verifyRequestState:(e,t,r)=>this._verifyRequestState(e,t,r),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 Ed,this._requestStateVerify=t?.requestState?.verify,this._inputRequiredServing=fE(t?.inputRequired),t?.cacheHints!==void 0){for(let[r,i]of Object.entries(t.cacheHints))i!==void 0&&Hv(i,`cacheHints['${r}']`);this._cacheHints=t.cacheHints}this.setRequestHandler("initialize",r=>this._oninitialize(r)),this.setNotificationHandler("notifications/initialized",()=>this.oninitialized?.()),hd(this._supportedProtocolVersions).length>0&&this.setRequestHandler("server/discover",()=>this._ondiscover()),this._capabilities.logging&&this._registerLoggingHandler()}async connect(e){if(this.transport!==void 0)throw new ve(ke.AlreadyConnected,"Use a separate Server instance per connection: this instance is already connected to a transport. To connect it to a new transport, call close() first.");this._boundFromTransport&&(this._boundFromTransport=!1,this._negotiatedProtocolVersion=void 0);let t=uE(e)?.revision;t!==void 0&&!this._servedModernEra()&&Gt.includes(t)&&hd(this._supportedProtocolVersions).includes(t)&&(this._negotiatedProtocolVersion=t,this._boundFromTransport=!0),await super.connect(e)}_registerLoggingHandler(){this.setRequestHandler("logging/setLevel",async(e,t)=>{let r=t.sessionId||t.http?.req?.headers.get("mcp-session-id")||void 0,{level:i}=e.params,n=kd(An,i);return n.success&&this._loggingLevels.set(r,n.data),{}})}buildContext(e,t){let r=e.http||t?.request||t?.closeSSEStream||t?.closeStandaloneSSEStream;return{...e,mcpReq:{...e.mcpReq,log:(i,n,o)=>{if(!this._capabilities.logging)return Promise.resolve();let a;if(this._servedModernEra()){if(a=e.mcpReq.envelope?.[En],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(i)<this.LOG_LEVEL_SEVERITY.get(a)?Promise.resolve():e.mcpReq.notify({method:"notifications/message",params:{level:i,data:n,logger:o}})},elicitInput:(i,n)=>this.elicitInput(i,n),requestSampling:(i,n)=>this.createMessage(i,n)},http:r?{...e.http,req:t?.request,closeSSE:t?.closeSSEStream,closeStandaloneSSE:t?.closeStandaloneSSEStream}:void 0}}_loggingLevels=new Map;LOG_LEVEL_SEVERITY=new Map(An.options.map((e,t)=>[e,t]));isMessageIgnored=(e,t)=>{let r=this._loggingLevels.get(t);return r?this.LOG_LEVEL_SEVERITY.get(e)<this.LOG_LEVEL_SEVERITY.get(r):!1};registerCapabilities(e){if(this.transport)throw new ve(ke.AlreadyConnected,"Cannot register capabilities after connecting to transport");let t=!!this._capabilities.logging;this._capabilities=n1(this._capabilities,e),!t&&this._capabilities.logging&&this._registerLoggingHandler()}_wrapHandler(e,t){if(e!=="tools/call"){let r=this._cacheHints?.[e],i=vE.has(e);return r===void 0&&!i?async(n,o)=>{let a=await t(n,o);if(cn(a))throw new de(ee.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(n,o)=>{let a=i?await this._invokeInputRequiredCapableHandler(e,t,n,o):await t(n,o);if(cn(a)){if(!i)throw new de(ee.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 r===void 0?a:gd(a,r)}}return async(r,i)=>{let n=sn(this._negotiatedProtocolVersion),o=n.validateRequest("tools/call",r);if(!o.ok)throw new de(o.reason==="not-in-era"?ee.InternalError:ee.InvalidParams,o.reason==="not-in-era"?"No wire schema for tools/call in the resolved era":`Invalid tools/call request: ${o.message}`);let a=await this._invokeInputRequiredCapableHandler("tools/call",t,r,i);if(cn(a))return a;let s=qv(a),c=n.validateResult("tools/call",s);if(!c.ok)throw new de(c.reason==="not-in-era"?ee.InternalError:ee.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&&Ao(this._negotiatedProtocolVersion)}async _invokeInputRequiredCapableHandler(e,t,r,i){let n=this._servedModernEra(),o=i.mcpReq.requestState();if(o!==void 0&&typeof o!="string")throw new de(ee.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"});let a=i;if(typeof o=="string"){let d=await this._verifyRequestState(o,i,e);d!==void 0&&(a=Yv(i,d))}let s;try{s=await t(r,a)}catch(d){throw d instanceof de&&d.code===ee.UrlElicitationRequired&&n?new de(ee.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.`):d}if(!cn(s))return s;if(!n){if(!this._inputRequiredServing.legacyShim)throw new de(ee.InternalError,`Handler for ${e} returned an input-required result, but this request is served on protocol revision ${this._negotiatedProtocolVersion??fr}, which has no input_required vocabulary`);return await this._legacyInputRequiredShim().fulfill(e,t,r,a,s)}let c=s.inputRequests,l=c!=null&&Object.keys(c).length>0,u=typeof s.requestState=="string";if(!l&&!u)throw new de(ee.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 d=this._inputRequestCapabilityView(i);for(let[f,h]of Object.entries(c)){let{embedded:g,required:b}=X0(e,f,h),S=fd(b,d);if(S!==void 0)throw new yd({requiredCapabilities:S},`Cannot request input '${f}' (${g.method}): the request's client capabilities do not declare the required capability`)}}return s}async _verifyRequestState(e,t,r){if(this._requestStateVerify!==void 0)try{return await this._requestStateVerify(e,t)}catch(i){throw this.onerror?.(new Error(`requestState verification rejected ${r}: ${i instanceof Error?i.message:String(i)}`)),new de(ee.InvalidParams,"Invalid or expired requestState",{reason:"invalid_request_state"})}}_inputRequestCapabilityView(e){return this._servedModernEra()?e.mcpReq.envelope?.[on]:this._clientCapabilities}_assertPushApiInServedEra(e){if(this._servedModernEra())throw new ve(ke.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(ke.CapabilityNotSupported,`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new ve(ke.CapabilityNotSupported,`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new ve(ke.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(ke.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(ke.CapabilityNotSupported,`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new ve(ke.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(ke.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(ke.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(ke.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new ve(ke.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new ve(ke.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(ke.CapabilityNotSupported,`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new ve(ke.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 r=HS(this._supportedProtocolVersions),i=r.includes(t)?t:r[0]??fr;return this._negotiatedProtocolVersion=i,this.transport?.setProtocolVersion?.(i),{protocolVersion:i,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}_ondiscover(){return{supportedVersions:hd(this._supportedProtocolVersions),capabilities:bE(this.getCapabilities()),...this._instructions&&{instructions:this._instructions}}}_outboundServerInfo(){return this._serverInfo}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(ke.CapabilityNotSupported,"Client does not support sampling tools capability.");if(e.messages.length>0){let o=e.messages.at(-1),a=Array.isArray(o.content)?o.content:[o.content],s=a.some(d=>d.type==="tool_result"),c=e.messages.length>1?e.messages.at(-2):void 0,l=c?Array.isArray(c.content)?c.content:[c.content]:[],u=l.some(d=>d.type==="tool_use");if(s){if(a.some(d=>d.type!=="tool_result"))throw new de(ee.InvalidParams,"The last message must contain only tool_result content if any is present");if(!u)throw new de(ee.InvalidParams,"tool_result blocks are not matching any tool_use from the previous message")}if(u){let d=new Set(l.filter(h=>h.type==="tool_use").map(h=>h.id)),f=new Set(a.filter(h=>h.type==="tool_result").map(h=>h.toolUseId));if(d.size!==f.size||![...d].every(h=>f.has(h)))throw new de(ee.InvalidParams,"ids of tool_result blocks and tool_use blocks from previous message do not match")}}let r=!!(e.tools||e.toolChoice),i=await this.request({method:"sampling/createMessage",params:e},t),n=this._wireCodec().samplingResultVariant(r,i);if(!n.ok)throw new ve(ke.InvalidResult,`Invalid sampling/createMessage result: ${n.reason==="invalid"?n.message:n.reason}`);return n.value}async elicitInput(e,t){switch(this._assertPushApiInServedEra("elicitation/create"),e.mode??"form"){case"url":if(!this._clientCapabilities?.elicitation?.url)throw new ve(ke.CapabilityNotSupported,"Client does not support url elicitation.");break;case"form":if(!this._clientCapabilities?.elicitation?.form)throw new ve(ke.CapabilityNotSupported,"Client does not support form elicitation.");break}return this._sendElicitationLeg(e,t)}async _sendElicitationLeg(e,t,r){let i=e.mode??"form",n=r?.validateAcceptedContent??!0;switch(i){case"url":{let o=e;return this.request({method:"elicitation/create",params:o},t)}case"form":{let o=e.mode==="form"?e:{...e,mode:"form"},a=await this.request({method:"elicitation/create",params:o},t);if(n&&a.action==="accept"&&a.content&&o.requestedSchema)try{let s=this._jsonSchemaValidator.getValidator(o.requestedSchema)(a.content);if(!s.valid)throw new de(ee.InvalidParams,`Elicitation response content does not match requested schema: ${s.errorMessage}`)}catch(s){throw s instanceof de?s:new de(ee.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(ke.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 bE(e){return{...e}}function _E(e,t){let r=0,i=[e];for(;i.length>0;){let n=i.pop();if(!(n===null||typeof n!="object"))if(Array.isArray(n))for(let o of n){if(++r>t)return r;o!==null&&typeof o=="object"&&i.push(o)}else for(let o in n){if(!Object.prototype.hasOwnProperty.call(n,o))continue;if(++r>t)return r;let a=n[o];a!==null&&typeof a=="object"&&i.push(a)}}return r}function SE(e){if(!(e===void 0||e===1/0)){if(typeof e!="number"||Number.isNaN(e)||e<1)throw new RangeError(`maxToolInputElements must be a number of at least 1, or Infinity, got ${String(e)}`);return e}}var Ka=class{server;_maxToolInputElements;_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 V0;try{let r=kr(t.inputSchema,"input");return this._toolInputSchemaJson[e]=r,r}catch{return}}}constructor(e,t){this.server=new tk(e,t),this._maxToolInputElements=SE(t?.maxToolInputElements),t?.capabilities?.tools&&this.setToolRequestHandlers(),t?.capabilities?.resources&&this.setResourceRequestHandlers(),t?.capabilities?.prompts&&this.setPromptRequestHandlers()}async connect(e){return dE(e)&&e.setScopeChallengeResolver(t=>this.resolveScopeChallenge(t)),await this.server.connect(e)}async close(){await this.server.close()}resolveScopeChallenge=e=>{switch(e.request.method){case"tools/call":{let t=e.request.params?.name;if(typeof t!="string")return;let r=this._registeredTools[t];return r===void 0||!r.enabled?void 0:r.scopeChallenge?.(e)}case"resources/read":{let t=e.request.params?.uri;if(typeof t!="string")return;let r;try{r=new URL(t)}catch{return}let i=this._registeredResources[r.toString()];if(i!==void 0)return i.enabled?i.scopeChallenge?.(e):void 0;for(let n of Object.values(this._registeredResourceTemplates))if(n.resourceTemplate.uriTemplate.match(r.toString()))return n.enabled?n.scopeChallenge?.(e):void 0;return}case"prompts/get":{let t=e.request.params?.name;if(typeof t!="string")return;let r=this._registeredPrompts[t];return r===void 0||!r.enabled?void 0:r.scopeChallenge?.(e)}default:return}};_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 r={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?kE(e,t.inputSchema):V0,annotations:t.annotations,icons:t.icons,execution:t.execution,_meta:t._meta};return t.outputSchema&&(r.outputSchema=kr(t.outputSchema,"output")),r})})),this.server.setRequestHandler("tools/call",async(e,t)=>{let r=this._registeredTools[e.params.name];if(!r)throw new de(ee.InvalidParams,`Tool ${e.params.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Tool ${e.params.name} disabled`);try{let i=await this.validateToolInput(r,e.params.arguments,e.params.name),n=await this.executeToolHandler(r,i,t);return await this.validateToolOutput(r,n,e.params.name),cn(n)?n:this.server.projectCallToolResult(n,r.outputSchemaJson)}catch(i){if(i instanceof de&&i.code===ee.UrlElicitationRequired)throw i;return this.createToolError(i instanceof Error?i.message:String(i))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,r){if(this._maxToolInputElements!==void 0&&_E(t,this._maxToolInputElements)>this._maxToolInputElements)throw new de(ee.InvalidParams,`Invalid arguments for tool ${r}: arguments contain more than the maximum of ${this._maxToolInputElements} elements`);if(!e.inputSchema)return;let i=await yr(e.inputSchema,t??{});if(!i.success)throw new de(ee.InvalidParams,`Input validation error: Invalid arguments for tool ${r}: ${i.error}`);return i.data}async validateToolOutput(e,t,r){if(!e.outputSchema||cn(t)||t.isError)return;if(t.structuredContent===void 0)throw new de(ee.InvalidParams,`Output validation error: Tool ${r} has an output schema but no structured content was provided`);let i=await yr(e.outputSchema,t.structuredContent);if(!i.success)throw new de(ee.InvalidParams,`Output validation error: Invalid structured content for tool ${r}: ${i.error}`)}async executeToolHandler(e,t,r){return e.executor(t,r)}_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 Jv(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return Bv(e),this.handleResourceCompletion(e,e.params.ref);default:throw new de(ee.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){let r=this._registeredPrompts[t.name];if(!r)throw new de(ee.InvalidParams,`Prompt ${t.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Prompt ${t.name} disabled`);if(!r.argsSchema)return Ba;let i=B0(J0(r.argsSchema)?.[e.params.argument.name]);if(!f1(i))return Ba;let n=cE(i);return n?G0(await n(e.params.argument.value,e.params.context)):Ba}async handleResourceCompletion(e,t){let r=Object.values(this._registeredResourceTemplates).find(n=>n.resourceTemplate.uriTemplate.toString()===t.uri);if(!r){if(this._registeredResources[t.uri])return Ba;throw new de(ee.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}let i=r.resourceTemplate.completeCallback(e.params.argument.name);return i?G0(await i(e.params.argument.value,e.params.context)):Ba}_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 r=Object.entries(this._registeredResources).filter(([n,o])=>o.enabled).map(([n,o])=>({uri:n,name:o.name,...o.metadata})),i=[];for(let n of Object.values(this._registeredResourceTemplates)){if(!n.resourceTemplate.listCallback)continue;let o=await n.resourceTemplate.listCallback(t);for(let a of o.resources)i.push({...n.metadata,...a})}return{resources:[...r,...i]}}),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 r;try{r=new URL(e.params.uri)}catch{throw new de(ee.InvalidParams,`Resource URI ${e.params.uri} is invalid`,{uri:e.params.uri,reason:"invalid_uri"})}let i=this._registeredResources[r.toString()];if(i){if(!i.enabled)throw new de(ee.InvalidParams,`Resource ${r} disabled`);return gd(await i.readCallback(r,t),i.cacheHint)}for(let n of Object.values(this._registeredResourceTemplates)){let o=n.resourceTemplate.uriTemplate.match(r.toString());if(o){if(!n.enabled)throw new de(ee.InvalidParams,`Resource template ${n.resourceTemplate.uriTemplate} disabled`);return gd(await n.readCallback(r,o,t),n.cacheHint)}}throw new vd(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?l0(t.argsSchema):void 0,icons:t.icons,_meta:t._meta}))})),this.server.setRequestHandler("prompts/get",async(e,t)=>{let r=this._registeredPrompts[e.params.name];if(!r)throw new de(ee.InvalidParams,`Prompt ${e.params.name} not found`);if(!r.enabled)throw new de(ee.InvalidParams,`Prompt ${e.params.name} disabled`);return r.handler(e.params.arguments,t)}),this._promptHandlersInitialized=!0)}registerResource(e,t,r,i){let{cacheHint:n,scopeChallenge:o,...a}=r,s=a;if(n!==void 0&&Hv(n,`resource ${e}`),typeof t=="string"){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);let c=this._createRegisteredResource(e,r.title,t,s,o,i);return n!==void 0&&(c.cacheHint=n),this.setResourceRequestHandlers(),this.sendResourceListChanged(),c}else{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);let c=this._createRegisteredResourceTemplate(e,r.title,t,s,o,i);return n!==void 0&&(c.cacheHint=n),this.setResourceRequestHandlers(),this.sendResourceListChanged(),c}}_createRegisteredResource(e,t,r,i,n,o){let a={name:e,title:t,metadata:i,readCallback:o,scopeChallenge:n,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({uri:null}),update:s=>{s.uri!==void 0&&s.uri!==r&&(delete this._registeredResources[r],s.uri&&(this._registeredResources[s.uri]=a)),s.name!==void 0&&(a.name=s.name),s.metadata!==void 0&&(a.metadata=s.metadata),s.title!==void 0&&(a.title=s.title,a.metadata={...a.metadata,title:s.title}),s.callback!==void 0&&(a.readCallback=s.callback),s.scopeChallenge!==void 0&&(a.scopeChallenge=s.scopeChallenge===null?void 0:s.scopeChallenge),s.enabled!==void 0&&(a.enabled=s.enabled),this.sendResourceListChanged()}};return this._registeredResources[r]=a,a}_createRegisteredResourceTemplate(e,t,r,i,n,o){let a={resourceTemplate:r,title:t,metadata:i,readCallback:o,scopeChallenge:n,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:c=>{c.name!==void 0&&c.name!==e&&(delete this._registeredResourceTemplates[e],c.name&&(this._registeredResourceTemplates[c.name]=a)),c.template!==void 0&&(a.resourceTemplate=c.template),c.metadata!==void 0&&(a.metadata=c.metadata),c.title!==void 0&&(a.title=c.title,a.metadata={...a.metadata,title:c.title}),c.callback!==void 0&&(a.readCallback=c.callback),c.scopeChallenge!==void 0&&(a.scopeChallenge=c.scopeChallenge===null?void 0:c.scopeChallenge),c.enabled!==void 0&&(a.enabled=c.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=a;let s=r.uriTemplate.variableNames;return Array.isArray(s)&&s.some(c=>!!r.completeCallback(c))&&this.setCompletionRequestHandler(),a}_createRegisteredPrompt(e,t,r,i,n,o,a,s){let c=i,l=n,u={title:t,description:r,argsSchema:i,icons:o,scopeChallenge:a,_meta:s,handler:Z0(e,i,n),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.scopeChallenge!==void 0&&(u.scopeChallenge=d.scopeChallenge===null?void 0:d.scopeChallenge),d._meta!==void 0&&(u._meta=d._meta);let f=!1;d.argsSchema!==void 0&&(u.argsSchema=d.argsSchema,c=d.argsSchema,f=!0),d.callback!==void 0&&(l=d.callback,f=!0),f&&(u.handler=Z0(e,c,l)),d.enabled!==void 0&&(u.enabled=d.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=u,i){let d=J0(i);d&&Object.values(d).some(f=>f1(B0(f)))&&this.setCompletionRequestHandler()}return u}_createRegisteredTool(e,t,r,i,n,o,a,s,c,l,u){i1(e);let d=u,f,h={title:t,description:r,inputSchema:i,outputSchema:n,get outputSchemaJson(){return f??=H0(h.outputSchema)},set outputSchemaJson(g){f=g},annotations:o,icons:a,execution:s,scopeChallenge:c,_meta:l,handler:u,executor:F0(i,u),enabled:!0,disable:()=>h.update({enabled:!1}),enable:()=>h.update({enabled:!0}),remove:()=>h.update({name:null}),update:g=>{g.name!==void 0&&g.name!==e&&(typeof g.name=="string"&&i1(g.name),delete this._registeredTools[e],delete this._toolInputSchemaJson[e],g.name&&(delete this._toolInputSchemaJson[g.name],this._registeredTools[g.name]=h,e=g.name)),g.title!==void 0&&(h.title=g.title),g.description!==void 0&&(h.description=g.description);let b=!1;g.paramsSchema!==void 0&&(h.inputSchema=g.paramsSchema,delete this._toolInputSchemaJson[e],b=!0),g.callback!==void 0&&(h.handler=g.callback,d=g.callback,b=!0),b&&(h.executor=F0(h.inputSchema,d)),g.outputSchema!==void 0&&(h.outputSchema=g.outputSchema,h.outputSchemaJson=H0(g.outputSchema)),g.annotations!==void 0&&(h.annotations=g.annotations),g.icons!==void 0&&(h.icons=g.icons),g.scopeChallenge!==void 0&&(h.scopeChallenge=g.scopeChallenge===null?void 0:g.scopeChallenge),g._meta!==void 0&&(h._meta=g._meta),g.enabled!==void 0&&(h.enabled=g.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=h,this.setToolRequestHandlers(),this.sendToolListChanged(),h}registerTool(e,t,r){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let{title:i,description:n,inputSchema:o,outputSchema:a,annotations:s,icons:c,scopeChallenge:l,_meta:u}=t;return this._createRegisteredTool(e,i,n,wd(o),wd(a),s,c,void 0,l,u,r)}registerPrompt(e,t,r){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let{title:i,description:n,argsSchema:o,icons:a,scopeChallenge:s,_meta:c}=t,l=this._createRegisteredPrompt(e,i,n,wd(o),r,a,s,c);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),l}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 F0(e,t){if(e){let i=t;return async(n,o)=>i(n,o)}let r=t;return async(i,n)=>r(n)}var V0={type:"object",properties:{}};function kE(e,t){let r=kr(t,"input"),i=Kv(r);return i.valid||console.warn(`[mcp-sdk] tool '${e}' carries an invalid x-mcp-header declaration and will be excluded by conforming Streamable HTTP clients: ${i.reason}`),r}function H0(e){if(e!==void 0)try{return kr(e,"output")}catch{return}}function Z0(e,t,r){if(t){let i=r;return async(n,o)=>{let a=await yr(t,n??{});if(!a.success)throw new de(ee.InvalidParams,`Invalid arguments for prompt ${e}: ${a.error}`);return i(a.data,o)}}else{let i=r;return async(n,o)=>i(o)}}function G0(e){return{completion:{values:e.map(String).slice(0,100),total:e.length,hasMore:e.length>100}}}var Ba={completion:{values:[],hasMore:!1}};function J0(e){let t=e;if(t.shape&&typeof t.shape=="object")return t.shape}function wE(e){return e?.type==="optional"}function B0(e){return wE(e)?e.def?.innerType??e:e}function $E(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 xE(e,t){let r={},i=n=>t===void 0||n===!0;return e.toolsListChanged===!0&&i(t?.tools?.listChanged)&&(r.toolsListChanged=!0),e.promptsListChanged===!0&&i(t?.prompts?.listChanged)&&(r.promptsListChanged=!0),e.resourcesListChanged===!0&&i(t?.resources?.listChanged)&&(r.resourcesListChanged=!0),e.resourceSubscriptions!==void 0&&e.resourceSubscriptions.length>0&&i(t?.resources?.subscribe)&&(r.resourceSubscriptions=[...e.resourceSubscriptions]),r}var Cd=1024;function nk(e,t){return{method:e.method,params:{...e.params,_meta:{...e.params?._meta,[hr]:t}}}}function TE(e){let t=sn(Za).validateRequest("subscriptions/listen",e);return t.ok?t.value.params?.notifications:void 0}var RE=new Set(["notifications/tools/list_changed","notifications/prompts/list_changed","notifications/resources/list_changed","notifications/resources/updated"]),rk=class{_subs=new Map;_serverCapabilities;_serverInfo;constructor(e=Cd,t,r){this._maxSubscriptions=e,this._serverCapabilities=t,this._serverInfo=r}setServerCapabilities(e,t){this._serverCapabilities=e,t!==void 0&&(this._serverInfo=t)}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=TE(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 r=xE(t,this._serverCapabilities);return this._subs.set(e.id,r),nk({method:"notifications/subscriptions/acknowledged",params:{notifications:r}},e.id)}cancel(e){return this._subs.delete(e)}routeOutbound(e){if(!RE.has(e.method))return"passthrough";let t=e.params?.uri,r=typeof t=="string"?t:void 0,i=IE(e.method,r),n=[];for(let[o,a]of this._subs)$E(a,i)&&n.push(nk({method:e.method,params:e.params??{}},o));return n}teardownAll(){let e=[];for(let t of this._subs.keys())e.push({jsonrpc:"2.0",id:t,result:{resultType:"complete",_meta:{[hr]:t,...this._serverInfo!==void 0&&{[Zt]:this._serverInfo}}}});return this._subs.clear(),e}};function IE(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 MA=4*1024*1024;var ok="https://cdn.jsdelivr.net";function ik(e,...t){let r=new Ka(e);for(let i of t)i(r);return r}function Pd(e,t){k1(e,t.name,t.uri,{description:t.description},()=>({contents:[{uri:t.uri,mimeType:Nd,text:t.html,_meta:{ui:{csp:{resourceDomains:[ok]}}}}]}))}var ak=[{id:"component-code",name:"Component Code",pkg:"@fabiocv/component-code-mcp",summary:"Code with live parameters that you can change and see the component update."},{id:"orbit",name:"Orbit",pkg:"@fabiocv/orbit-mcp",summary:"A one-button game to play while your agent works. Switch rings to miss the arcs ahead."}],sk={id:"mcp",name:"fabiocv",pkg:"@fabiocv/mcp",summary:"MCP Apps that show UI in your chat. Every tool in one server."};var ck=Symbol("swallowsErrorsAfterClose"),zE=class{_readBuffer;_started=!1;_closed=!1;constructor(e=p1.stdin,t=p1.stdout,r){this._stdin=e,this._stdout=t,this._readBuffer=new r1({maxBufferSize:r?.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._closed||(this.onerror?.(e),this.close().catch(()=>{}))};_onstdinclose=()=>{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;for(let e of this._stdout.listeners("error"))e[ck]&&this._stdout.off("error",e);(this._stdin.readableEnded||this._stdin.destroyed)&&setImmediate(this._onstdinclose),this._stdin.on("data",this._ondata),this._stdin.on("error",this._onerror),this._stdin.on("end",this._onstdinclose),this._stdin.on("close",this._onstdinclose),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._stdin.off("end",this._onstdinclose),this._stdin.off("close",this._onstdinclose),this._onstdouterror[ck]=!0,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,r)=>{let i=o1(e),n=!1,o=s=>{n||(n=!0,this._stdout.off("error",o),this._stdout.off("drain",a),r(s))},a=()=>{n||(n=!0,this._stdout.off("error",o),this._stdout.off("drain",a),t())};if(this._stdout.once("error",o),this._stdout.write(i)){if(n)return;n=!0,this._stdout.off("error",o),t()}else n||this._stdout.once("drain",a)})}},lk=3e3,EE=class{onclose;onerror;onmessage;_closed=!1;_pendingRequests=new Set;_drainWaiters=[];constructor(e,t,r){this._wire=e,this._onInstanceClose=t,this._outboundIntercept=r}async start(){}async send(e,t){if(br(e)||Sr(e)){let{id:r}=e;r!==void 0&&this._settle(r)}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(_t(e))this._pendingRequests.add(e.id);else if(qn(e)&&e.method==="notifications/cancelled"){let r=e.params?.requestId;r!==void 0&&this._settle(r)}this.onmessage?.(e,t)}}async whenRequestsAnswered(e){return this._closed||this._pendingRequests.size===0?!0:await new Promise(t=>{let r=()=>{clearTimeout(i),t(!0)},i=setTimeout(()=>{this._drainWaiters=this._drainWaiters.filter(n=>n!==r),t(!1)},e);this._drainWaiters.push(r)})}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 CE(e){let t=e.params;if(e.method==="initialize"&&!Wv(t)){let o=t!==null&&typeof t=="object"&&typeof t.protocolVersion=="string"?t.protocolVersion:void 0;return{kind:"legacy",reason:"initialize",...o!==void 0&&{requestedVersion:o}}}if(!bd(t))return{kind:"legacy",reason:"no-claim"};let r=_r(t),i=(r===void 0?[]:Sd(r))[0];if(i!==void 0)return{kind:"invalid-envelope",issue:i};let n=_d(t);return n===void 0||!Gt.includes(n)?{kind:"unsupported-revision",requested:n??"unknown"}:{kind:"modern",revision:n,classification:{era:"modern",revision:n}}}function uk(e,t={}){let r=t.legacy??"serve",i=t.transport??new zE,n={phase:"opening"},o,a=!1,s=()=>a||n.phase==="closed",c=R=>{try{t.onerror?.(R)}catch{}},l=(R,A,F,M)=>i.send({jsonrpc:"2.0",id:R,error:{code:A,message:F,...M!==void 0&&{data:M}}}).catch(V=>c(qt(V))),u=new rk(t.maxSubscriptions??Cd),d=R=>{if(!qn(R))return;let A=u.routeOutbound(R);if(A!=="passthrough"){for(let F of A)i.send({jsonrpc:"2.0",...F}).catch(M=>c(qt(M)));return"handled"}},f=async R=>{if(_t(R)&&R.method==="subscriptions/listen"){let A=_r(R.params),F=bd(R.params)?(A===void 0?[]:Sd(A))[0]:{key:"_meta",problem:"the per-request envelope is required on protocol revision 2026-07-28"},M=_d(R.params),V;if(F!==void 0)V={jsonrpc:"2.0",id:R.id,error:{code:-32602,message:`Invalid _meta envelope: ${F.key}: ${F.problem}`}};else if(M===void 0||!Gt.includes(M)){let te=new jo({supported:[...Gt],requested:M??"unknown"});V={jsonrpc:"2.0",id:R.id,error:{code:te.code,message:te.message,data:te.data}}}else V=u.serve(R);return await i.send("error"in V?V:{jsonrpc:"2.0",method:V.method,params:V.params}).catch(te=>c(qt(te))),!0}if(qn(R)&&R.method==="notifications/cancelled"){let A=R.params?.requestId;if(A!==void 0&&u.cancel(A))return!0}return!1},h=(R,A,F)=>{let M=Qv({kind:"legacy",reason:A,...F!==void 0&&{requestedVersion:F}},Gt);return M===void 0?Promise.resolve():(c(new Error(`Rejected 2025-era request on a modern-only stdio connection (${M.cell}): ${M.message}`)),l(R.id,M.code,M.message,M.data))},g=R=>{a||R===o||T()},b=async(R,A)=>{let F=await e({era:R}),M=F instanceof Ka?F.server:F;R==="modern"&&(e1(M,A),v1(M,Gt),u.setServerCapabilities(M.getCapabilities(),y1(M)));let V=new EE(i,()=>g(V),R==="modern"?d:void 0);return await F.connect(V),{product:F,channel:V}},S=R=>R.product.close().catch(A=>c(qt(A))),y=async R=>{o=R.channel;try{await R.channel.whenRequestsAnswered(lk)||c(new Error(`Discarded the probe instance with requests still unanswered after ${lk}ms; continuing with the fallback`)),await R.product.close()}catch(A){c(qt(A))}finally{o=void 0}},x=async R=>{if(n.phase==="closed")return;if(n.phase==="pinned"){if(n.era==="modern"&&_t(R)&&R.method==="initialize"&&!Wv(R.params)){await h(R,"initialize",R.params!==null&&typeof R.params=="object"&&typeof R.params.protocolVersion=="string"?R.params.protocolVersion:void 0);return}if(n.era==="modern"&&await f(R)||s())return;n.instance.channel.deliver(R);return}if(!_t(R)&&!qn(R)){c(new Error("Discarded a JSON-RPC response received before the connection negotiated an era"));return}let A=CE(R);switch(A.kind){case"invalid-envelope":{let F=`Invalid _meta envelope for protocol revision 2026-07-28: ${A.issue.key}: ${A.issue.problem}`;_t(R)?await l(R.id,ee.InvalidParams,F,{envelope:A.issue}):c(new Error(`Discarded a notification with a malformed envelope: ${F}`));return}case"unsupported-revision":if(_t(R)){let F=new jo({supported:[...Gt],requested:A.requested});c(F),await l(R.id,F.code,F.message,F.data)}else c(new Error(`Discarded a notification claiming unsupported protocol revision ${A.requested}`));return;case"modern":if(_t(R)&&R.method==="server/discover"){if(n.phase==="probe"){n.instance.channel.deliver(R,{classification:A.classification});return}let F=await b("modern",A.revision);if(s()){await S(F);return}n={phase:"probe",instance:F},F.channel.deliver(R,{classification:A.classification});return}if(n.phase==="probe"){if(qn(R)){n.instance.channel.deliver(R,{classification:A.classification});return}n={phase:"pinned",era:"modern",instance:n.instance}}else{let F=await b("modern",A.revision);if(s()){await S(F);return}n={phase:"pinned",era:"modern",instance:F}}if(await f(R)||s())return;n.instance.channel.deliver(R,{classification:A.classification});return;case"legacy":{if(r==="reject"){_t(R)&&await h(R,A.reason,A.requestedVersion);return}if(n.phase==="probe"){if(await y(n.instance),s())return;n={phase:"opening"}}let F=await b("legacy");if(s()){await S(F);return}n={phase:"pinned",era:"legacy",instance:F},n.instance.channel.deliver(R);return}}},k=[],I=!1,O=async()=>{if(!I){I=!0;try{for(;k.length>0;){let R=k.shift();try{await x(R)}catch(A){_t(R)&&await l(R.id,ee.InternalError,"Internal server error"),c(qt(A))}}}finally{I=!1}}},T=async()=>{if(a||n.phase==="closed")return;a=!0;let R=n;n={phase:"closed"};for(let A of u.teardownAll())await i.send(A).catch(F=>c(qt(F)));(R.phase==="probe"||R.phase==="pinned")&&await R.instance.product.close().catch(A=>c(qt(A))),await i.close().catch(A=>c(qt(A)))};i.onmessage=R=>{k.push(R),O()},i.onerror=R=>{c(R),(n.phase==="probe"||n.phase==="pinned")&&n.instance.channel.onerror?.(R)},i.onclose=()=>{if(a||n.phase==="closed")return;a=!0;let R=n;n={phase:"closed"},(R.phase==="probe"||R.phase==="pinned")&&R.instance.product.close().catch(A=>c(qt(A)))};let _=i.start().catch(R=>{throw c(qt(R)),R});return _.catch(()=>{}),{close:async()=>{await _.catch(()=>{}),await T()}}}function qt(e){return e instanceof Error?e:new Error(String(e))}var dk="0.5.0";var pk='<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <title>Component Code</title>\n <style>\n @font-face {\n font-family: Geist;\n src: url(\'https://cdn.jsdelivr.net/npm/geist@1.9.2/dist/fonts/geist-sans/Geist-Variable.woff2\')\n format(\'woff2\');\n font-weight: 100 900;\n font-display: swap;\n }\n @font-face {\n font-family: \'Geist Mono\';\n src: url(\'https://cdn.jsdelivr.net/npm/geist@1.9.2/dist/fonts/geist-mono/GeistMono-Variable.woff2\')\n format(\'woff2\');\n font-weight: 100 900;\n font-display: swap;\n }\n body {\n margin: 0;\n padding: 1px;\n font-family: Geist, ui-sans-serif, system-ui, sans-serif;\n }\n </style>\n <script type="module" crossorigin>var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var l=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function ee(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var te=ee.prototype=new y;te.constructor=ee,g(te,v.prototype),te.isPureReactComponent=!0;var ne=Array.isArray;function re(){}var ie={H:null,A:null,T:null,S:null},ae=Object.prototype.hasOwnProperty;function oe(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function se(e,t){return oe(e.type,t,e.props)}function ce(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function le(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var ue=/\\/+/g;function de(e,t){return typeof e==`object`&&e&&e.key!=null?le(``+e.key):t.toString(36)}function fe(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(re,re):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function pe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,pe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+de(e,0):a,ne(o)?(i=``,c!=null&&(i=c.replace(ue,`$&/`)+`/`),pe(o,r,i,``,function(e){return e})):o!=null&&(ce(o)&&(o=se(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(ue,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(ne(e))for(var u=0;u<e.length;u++)a=e[u],s=l+de(a,u),c+=pe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+de(a,u++),c+=pe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return pe(fe(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function b(e,t,n){if(e==null)return e;var r=[],i=0;return pe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function me(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var he=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ge={map:b,forEach:function(e,t,n){b(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return b(e,function(){t++}),t},toArray:function(e){return b(e,function(e){return e})||[]},only:function(e){if(!ce(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ge,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=ee,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ie,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ie.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!ae.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return oe(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)ae.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return oe(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=ce,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:me}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=ie.T,n={};ie.T=n;try{var r=e(),i=ie.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(re,he)}catch(e){he(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),ie.T=t}},e.unstable_useCacheRefresh=function(){return ie.H.useCacheRefresh()},e.use=function(e){return ie.H.use(e)},e.useActionState=function(e,t,n){return ie.H.useActionState(e,t,n)},e.useCallback=function(e,t){return ie.H.useCallback(e,t)},e.useContext=function(e){return ie.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return ie.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return ie.H.useEffect(e,t)},e.useEffectEvent=function(e){return ie.H.useEffectEvent(e)},e.useId=function(){return ie.H.useId()},e.useImperativeHandle=function(e,t,n){return ie.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return ie.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return ie.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return ie.H.useMemo(e,t)},e.useOptimistic=function(e,t){return ie.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return ie.H.useReducer(e,t,n)},e.useRef=function(e){return ie.H.useRef(e)},e.useState=function(e){return ie.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return ie.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return ie.H.useTransition()},e.version=`19.2.7`})),u=o(((e,t)=>{t.exports=l()})),d=c(u(),1),f=Object.defineProperty,p=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),m=(e,t)=>{let n={};for(var r in e)f(n,r,{get:e[r],enumerable:!0});return t&&f(n,Symbol.toStringTag,{value:`Module`}),n},h=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),g=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),_=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),v=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function y(e){return typeof e==`string`&&g.has(e.replace(/#$/,``))}function ee(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(h.has(n))return`2020-12`;if(g.has(n))return`2019-09`;if(_.has(n)||v.has(n))return`draft-7`;throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}function te(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function ne(e,t=`|`){return e.map(e=>Oe(e)).join(t)}function re(e,t){return typeof t==`bigint`?t.toString():t}var ie=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function ae(e){return new ie(e)}function oe(e){return e==null}function se(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ce(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var le=Symbol(`evaluating`);function ue(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==le)return r===void 0&&(r=le,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function de(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fe(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function pe(e){return fe(e._zod.def)??e._zod.def.shape}function b(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return de(this,t,e),e},enumerable:!0,configurable:!0})}function me(e,t,n){t in e?de(e,t,n):e[t]=n}function he(e,t,n,r){let i=pe(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?b(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):me(e,a,r?r(n.value,a):n.value))}}function ge(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?b(e,n,()=>t[n]):me(e,n,r.value))}}function _e(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ve(e){return JSON.stringify(e)}function ye(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,``).replace(/[\\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var be=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function xe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Se=ae(()=>{if(vt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Ce(e){if(xe(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(xe(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function we(e){return Ce(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var Te=new Set([`string`,`number`,`symbol`]);function Ee(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,`\\\\$&`)}function De(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function x(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 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 Oe(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ke(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var Ae={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},je={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Me(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return he(i,e,Ne(e,t)),De(e,_e(n,{shape:i,checks:[]}))}function Ne(e,t){let n=pe(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function S(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(Ne(e,t)),a={};return he(a,e,Reflect.ownKeys(pe(e)).filter(e=>!i.has(e))),De(e,_e(n,{shape:a,checks:[]}))}function Pe(e,t){if(!Ce(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=pe(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return De(e,_e(e._zod.def,{shape:Fe(e,t)}))}function Fe(e,t){let n={};return he(n,e,Reflect.ownKeys(pe(e))),ge(n,t),n}function Ie(e,t){if(!Ce(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return De(e,_e(e._zod.def,{shape:Fe(e,t)}))}function Le(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return he(n,e,Reflect.ownKeys(pe(e))),he(n,t,Reflect.ownKeys(pe(t))),De(e,_e(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Re(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(Ne(t,n)):void 0,o={};return he(o,t,Reflect.ownKeys(pe(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),De(t,_e(t._zod.def,{shape:o,checks:[]}))}function ze(e,t,n){let r=n?new Set(Ne(t,n)):void 0,i={};return he(i,t,Reflect.ownKeys(pe(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),De(t,_e(t._zod.def,{shape:i}))}function Be(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 Ve(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 He(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function Ue(e){return typeof e==`string`?e:e?.message}function We(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function Ge(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ke(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:Ue(e.inst?._zod.def?.error?.(e))??Ue(a?.(e))??Ue(t?.error?.(e))??Ue(n.customError?.(e))??Ue(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t===`inst`||t===`schema`||t===`continue`||t===`input`||t===`__proto__`||(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var qe=/[\\uD800-\\uDBFF]/;function Je(e){let t=e.length;if(!qe.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Ye(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Xe(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 t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ze(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Qe(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):nt(e,n,r.value)}}function $e(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function et(e,t,n){return $e(e,t,n,!1)}function tt(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return $e(this,n,r(this))},set(e){$e(this,n,e)}})}return t}function nt(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:$e(this,t,n.bind(this))},set(e){$e(this,t,e)}})}function rt(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var it,at=!1,ot={configurable:!0,get(){at=!0}};function st(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&it!==e._zod){it=void 0;return}it=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,ot);let e=at;at=!1;try{let r=n(this);return at?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),at||=e,r}catch(n){throw delete this[t],at||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function ct(e,t,n,r){let i=rt(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var lt=`~constantCatch`;function ut(e){let t=()=>e;return t[lt]=!0,t}var dt,ft=Object.freeze({status:`aborted`}),pt={value:void 0,enumerable:!1},mt=`captureStackTrace`in Error?Error:null;function ht(e){let t=mt;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return mt=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function C(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){pt.value=new a(r);try{Object.defineProperty(n,"_zod",pt)}finally{pt.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),Qe(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?ht(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var gt=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},_t=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(dt=globalThis).__zod_globalConfig??(dt.__zod_globalConfig={});var vt=globalThis.__zod_globalConfig;function yt(e){return e&&Object.assign(vt,e),vt}function bt(){let e=this._zod;return e.message??=JSON.stringify(e.def,re,2),e.message}function xt(e){this._zod.message=e}var St={get:bt,set:xt,enumerable:!0,configurable:!0},Ct={value:void 0,enumerable:!1},wt=new WeakSet([Object.prototype,Error.prototype]),Tt=(e,t)=>{e.name=`$ZodError`,Ct.value=t,Object.defineProperty(e,"issues",Ct),Ct.value=void 0,Object.defineProperty(e,"message",St);let n=Object.getPrototypeOf(e);wt.has(n)||(wt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},Et=C(`$ZodError`,Tt);C(`$ZodError`,Tt,void 0,{Parent:Error});function Dt(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function Ot(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?Dt(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function kt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function At(e,t){return{callee:t?.callee??e,Err:t?.Err}}var jt=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new gt;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ke(e,o,yt())));throw be(n,a?.callee??t),n}return s.value};return t},Mt=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ke(e,o,yt())));throw be(n,a?.callee??t),n}return s.value};return t},Nt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new gt;return a.issues.length?Pt(e,a.issues,i):{success:!0,data:a.value}};function Pt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ke(e,n,yt()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var Ft=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?Pt(e,a.issues,i):{success:!0,data:a.value}},It=Symbol.for(`zod.compile.invalid`),Lt=Symbol.for(`zod.compile.fallback`),Rt=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==It)return!0;if(r.definite===!0&&n===void 0)return!1}return zt(e,t,n)});function zt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[Lt]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new gt;return a.issues.length===0}var Bt=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Vt=e=>{let t=jt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,At(n,a))};return n},Ht=e=>{let t=jt(e),n=(e,r,i,a)=>t(e,r,i,At(n,a));return n},Ut=e=>{let t=Mt(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,At(n,a))};return n},Wt=e=>{let t=Mt(e),n=async(e,r,i,a)=>await t(e,r,i,At(n,a));return n},Gt=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Nt(e)(t,n,i)},Kt=e=>(t,n,r)=>Nt(e)(t,n,r),qt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return Ft(e)(t,n,i)},Jt=e=>async(t,n,r)=>Ft(e)(t,n,r),Yt=/^[cC][0-9a-z]{6,}$/,Xt=/^[0-9a-z]+$/,Zt=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Qt=/^[0-9a-vA-V]{20}$/,$t=/^[A-Za-z0-9]{27}$/,en=/^[a-zA-Z0-9_-]{21}$/;function tn(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var nn=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,rn=/^([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})$/,an=e=>e?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)$/,on=/^(?:[A-Za-z0-9_\'+\\-]+\\.)*[A-Za-z0-9_\'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,sn=`^(?=[\\\\s\\\\S]*[\\\\p{Extended_Pictographic}\\\\p{Regional_Indicator}\\\\u20E3])[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$`;function cn(){return new RegExp(sn,`u`)}var ln=/^(?:(?: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])$/,un=/^(([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}|:))$/,dn=/^((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])$/,fn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,pn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,mn=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,hn=/^https?$/,gn=/^\\+[1-9]\\d{6,14}$/,_n=`(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`;function vn(e){return RegExp(`^${e}$`)}var yn=vn(_n);function bn(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}}`:e.seconds?`${t}:[0-5]\\\\d(?:\\\\.\\\\d+)?`:`${t}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`}function xn(e){return RegExp(`^${bn(e)}$`)}function Sn(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);let n=`${bn({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${bn({precision:e.precision})}`:n;return RegExp(`^${_n}T(?:${r})$`)}var Cn=/^[\\s\\S]{0,}$/,wn=/^-?\\d+$/,Tn=/^-?\\d+(?:\\.\\d+)?$/,En=/^(?:true|false)$/i,Dn=/^null$/i,On=/^undefined$/i,kn=/^[^A-Z]*$/,An=/^[^a-z]*$/,jn=C(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Mn=e=>{let t=e.value;return!oe(t)&&t.length!==void 0},Nn={number:`number`,bigint:`bigint`,object:`date`},Pn=C(`$ZodCheckLessThan`,(e,t)=>{jn.init(e,t);let n=Nn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:Nn[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Fn=C(`$ZodCheckGreaterThan`,(e,t)=>{jn.init(e,t);let n=Nn[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:Nn[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),In=C(`$ZodCheckMultipleOf`,(e,t)=>{jn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):ce(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})}}),Ln=C(`$ZodCheckNumberFormat`,(e,t)=>{jn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=Ae[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Rn=C(`$ZodCheckMaxLength`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Je(r):i)<=t.maximum)return;let a=Ye(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),zn=C(`$ZodCheckMinLength`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Je(r):i)>=t.minimum)return;let a=Ye(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Bn=C(`$ZodCheckLengthEquals`,(e,t)=>{var n;jn.init(e,t),(n=e._zod.def).when??(n.when=Mn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Je(r):i;if(a===t.length)return;let o=Ye(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Vn=C(`$ZodCheckStringFormat`,(e,t)=>{var n,r;jn.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),Hn=C(`$ZodCheckRegex`,(e,t)=>{Vn.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})}}),Un=C(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=kn,Vn.init(e,t)}),Wn=C(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=An,Vn.init(e,t)}),Gn=C(`$ZodCheckIncludes`,(e,t)=>{jn.init(e,t);let n=Ee(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),Kn=C(`$ZodCheckStartsWith`,(e,t)=>{jn.init(e,t);let n=RegExp(`^${Ee(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),qn=C(`$ZodCheckEndsWith`,(e,t)=>{jn.init(e,t);let n=RegExp(`.*${Ee(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Jn=C(`$ZodCheckOverwrite`,(e,t)=>{jn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Yn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`\n`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\\n${t.join(`\n`)}\\n};`)(...Object.values(this.closed))}},Xn={major:4,minor:6,patch:7},Zn=C(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Xn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=Be(t),a;for(let o of n){if(o._zod.def.when){if(Ve(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new gt;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(Ge(t.issues,n,e),i||=Be(t,n))});else{if(t.issues.length===n)continue;Ge(t.issues,n,e),i||=Be(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(Be(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new gt;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new gt;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return et(this,`~standard`,er(this))},set"~standard"(e){$e(this,`~standard`,e)}}),Qn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ke(e,t,yt()))}:{value:e.value};async function $n(e,t){let n={async:!0};return Qn(await e._zod.run({value:t,issues:[]},n),n)}function er(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Qn(r,n)}catch{}return $n(e,t)},vendor:`zod`,version:1}}var tr=C(`$ZodString`,(e,t)=>{Zn.init(e,t),e._zod.pattern=t.pattern??Cn,e._zod.parse=(n,r)=>{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}}),nr=C(`$ZodStringFormat`,(e,t)=>{Vn.init(e,t),tr.init(e,t)}),rr=C(`$ZodGUID`,(e,t)=>{t.pattern??=rn,nr.init(e,t)}),ir=C(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=an(e)}else t.pattern??=an();nr.init(e,t)}),ar=C(`$ZodEmail`,(e,t)=>{t.pattern??=on,nr.init(e,t)});function or(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function sr(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?or(e)||2:cr(e,t)}function cr(e,t){if(!t.normalize&&t.protocol?.source===hn.source&&!/^https?:\\/\\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var lr=/[\\t\\n\\r]/g;function ur(e){return e.replace(lr,``)}function dr(e,t){return t.lastIndex=0,t.test(e.hostname)}function fr(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var pr=C(`$ZodURL`,(e,t)=>{nr.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=sr(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=ur(r);return}t.hostname&&!dr(i,t.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&&!fr(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:ur(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),mr=C(`$ZodEmoji`,(e,t)=>{t.pattern??=cn(),nr.init(e,t)}),hr=C(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?en:tn(t.length),nr.init(e,t)}),gr=C(`$ZodCUID`,(e,t)=>{t.pattern??=Yt,nr.init(e,t)}),_r=C(`$ZodCUID2`,(e,t)=>{t.pattern??=Xt,nr.init(e,t)}),vr=C(`$ZodULID`,(e,t)=>{t.pattern??=Zt,nr.init(e,t)}),yr=C(`$ZodXID`,(e,t)=>{t.pattern??=Qt,nr.init(e,t)}),br=C(`$ZodKSUID`,(e,t)=>{t.pattern??=$t,nr.init(e,t)}),xr=C(`$ZodISODateTime`,(e,t)=>{t.pattern??=Sn(t),nr.init(e,t)}),Sr=C(`$ZodISODate`,(e,t)=>{t.pattern??=yn,nr.init(e,t)}),Cr=C(`$ZodISOTime`,(e,t)=>{t.pattern??=xn(t),nr.init(e,t)}),wr=C(`$ZodISODuration`,(e,t)=>{t.pattern??=nn,nr.init(e,t)}),Tr=C(`$ZodIPv4`,(e,t)=>{t.pattern??=ln,nr.init(e,t)}),Er=/^[0-9a-fA-F:.]+$/;function Dr(e){return Er.test(e)?or(`http://[${e}]`):!1}var Or=C(`$ZodIPv6`,(e,t)=>{t.pattern??=un,nr.init(e,t),e._zod.check=n=>{Dr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),kr=C(`$ZodCIDRv4`,(e,t)=>{t.pattern??=dn,nr.init(e,t)});function Ar(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:Dr(n)}var jr=C(`$ZodCIDRv6`,(e,t)=>{t.pattern??=fn,nr.init(e,t),e._zod.check=n=>{Ar(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function Mr(e){if(e===``)return!0;if(/\\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var Nr=/^[0-9a-zA-Z+/]*={0,2}$/,Pr=C(`$ZodBase64`,(e,t)=>{t.pattern??=Nr,nr.init(e,t),e._zod.check=n=>{Mr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),Fr=/^[A-Za-z0-9_-]*$/;function Ir(e){if(!Fr.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return Mr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var Lr=C(`$ZodBase64URL`,(e,t)=>{t.pattern??=Fr,nr.init(e,t),e._zod.check=n=>{Ir(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),Rr=C(`$ZodE164`,(e,t)=>{t.pattern??=gn,nr.init(e,t)});function zr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Br=C(`$ZodJWT`,(e,t)=>{nr.init(e,t),e._zod.check=n=>{zr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Vr=C(`$ZodNumber`,(e,t)=>{Zn.init(e,t),e._zod.pattern=Tn,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),Hr=C(`$ZodNumberFormat`,(e,t)=>{Ln.init(e,t),Vr.init(e,t)}),Ur=C(`$ZodBoolean`,(e,t)=>{Zn.init(e,t),e._zod.pattern=En,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Wr=C(`$ZodUndefined`,(e,t)=>{Zn.init(e,t),e._zod.pattern=On,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Gr=C(`$ZodNull`,(e,t)=>{Zn.init(e,t),e._zod.pattern=Dn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Kr=C(`$ZodAny`,(e,t)=>{Zn.init(e,t),e._zod.parse=e=>e}),qr=C(`$ZodUnknown`,(e,t)=>{Zn.init(e,t),e._zod.parse=e=>e}),Jr=C(`$ZodNever`,(e,t)=>{Zn.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function Yr(e,t){let n=We(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of We(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,Ge(n.issues,t,e),n}}return i(n,a)}}var Xr=e=>Array.isArray(e)?e.length:-1;function Zr(e,t,n){e.issues.length&&t.issues.push(...He(n,e.issues)),t.value[n]=e.value}var Qr=C(`$ZodArray`,(e,t)=>{Zn.init(e,t);let n=vt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Zr(t,r,e)));else if(Zr(c,r,e),s&&c.issues.length!==0&&Be(c))break}return o.length?Promise.all(o).then(()=>r):r},Yr(e,Xr)});function $r(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(!(!o&&s&&i===`optional`)){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...He(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var ei=[];function ti(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:ei,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ke(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function ni(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(Be(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>$r(e,n,i,t,d,f))):$r(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var ri=C(`$ZodObject`,(e,t)=>{Zn.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=ae(()=>ti(t));st(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||de(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=xe,o=t.catchall,s,c=vt.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(Be(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>$r(n,t,e,r,a,o))):$r(s,t,e,r,a,o)}return o?ni(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),ii=C(`$ZodObjectJIT`,(e,t)=>{ri.init(e,t);let n=e._zod.parse,r=ae(()=>ti(t)),i=vt.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Yn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:ve(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`\n const ${n}_present = ${i};\n if (!${n}.issues.length || ${n}_present) {\n if (${n}.issues.length) {${c(n,r)}\n }\n\n if (${e}) {\n newResult[${r}] = ${n}.value;\n }\n }\n\n `)}else f?(o.write(`\n if (${n}.issues.length) {${c(n,r)}\n }\n `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`\n if (${n}.value !== undefined || ${i}) {\n newResult[${r}] = ${n}.value;\n }\n `)):o.write(`\n const ${n}_present = ${i};\n if (${n}.issues.length) {${c(n,r)}\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${r}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${n}_present) {\n newResult[${r}] = ${n}.value;\n }\n\n `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=xe,c=!vt.jitless,l=c&&Se.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?ni([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function ai(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!Be(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ke(e,r,yt())))}),t)}var oi=C(`$ZodUnion`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),st(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),st(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),st(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>se(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>ai(t,r,e,i)):ai(o,r,e,i)}});function si(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var ci=C(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,oi.init(e,t);let n=e._zod.parse;st(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||de(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=fe(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=ae(()=>si(t));e._zod.parse=(i,a)=>{let o=i.value;if(!xe(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),li=C(`$ZodIntersection`,(e,t)=>{Zn.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>di(e,t,n)):di(e,i,a)}});function ui(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ce(e)&&Ce(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=ui(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=ui(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function di(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=ui(t.value,n.value);if(!c.valid){if(Be(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var fi=C(`$ZodRecord`,(e,t)=>{Zn.init(e,t);let n=vt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Ce(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Ke(e,i,yt())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...He(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...He(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e))if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e);l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&Tn.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Ke(e,i,yt())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...He(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...He(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),pi=C(`$ZodEnum`,(e,t)=>{Zn.init(e,t);let n=te(t.entries),r=new Set(n);e._zod.values=r,st(e,`pattern`,e=>{let t=te(e.def.entries).filter(e=>Te.has(typeof e));return RegExp(t.length?`^(${t.map(e=>Ee(e.toString())).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),mi=C(`$ZodLiteral`,(e,t)=>{Zn.init(e,t);let n=new Set(t.values);e._zod.values=n,st(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?Ee(e):e?Ee(e.toString()):String(e)).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),hi=C(`$ZodTransform`,(e,t)=>{Zn.init(e,t),e._zod.optin=`optional`,vt.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new _t(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new gt;return n.value=i,n}});function gi(e,t){return e.value=t.issues.length?void 0:t.value,e}var _i=C(`$ZodOptional`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,st(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),st(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${se(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>gi(e,t)):gi(e,r)}return t.innerType._zod.run(e,n)}}),vi=C(`$ZodExactOptional`,(e,t)=>{_i.init(e,t),st(e,`values`,e=>e.def.innerType._zod.values),st(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),yi=C(`$ZodNullable`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin),st(e,`optout`,e=>e.def.innerType._zod.optout),st(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${se(t.source)}|null)$`):void 0}),st(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),bi=C(`$ZodDefault`,(e,t)=>{Zn.init(e,t),e._zod.optin=`defaulted`,st(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>xi(e,t)):xi(r,t)}});function xi(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var Si=C(`$ZodPrefault`,(e,t)=>{Zn.init(e,t),e._zod.optin=`defaulted`,st(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),Ci=C(`$ZodNonOptional`,(e,t)=>{Zn.init(e,t),st(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>wi(t,e)):wi(i,e)}});function wi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function Ti(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ke(e,r,yt()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var Ei=C(`$ZodCatch`,(e,t)=>{Zn.init(e,t),st(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),st(e,`optout`,e=>e.def.innerType._zod.optout),st(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>Ti(e,r,t,n)):Ti(e,r,t,n)}}),Di=C(`$ZodPipe`,(e,t)=>{Zn.init(e,t),st(e,`values`,e=>e.def.in._zod.values),st(e,`optin`,e=>e.def.in._zod.optin),st(e,`optout`,e=>e.def.out._zod.optout),st(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>Oi(e,t.in,n)):Oi(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>Oi(e,t.out,n)):Oi(r,t.out,n)}});function Oi(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var ki=C(`$ZodPreprocess`,(e,t)=>{Di.init(e,t)}),Ai=C(`$ZodReadonly`,(e,t)=>{Zn.init(e,t),st(e,`propValues`,e=>e.def.innerType._zod.propValues),st(e,`values`,e=>e.def.innerType._zod.values),st(e,`optin`,e=>e.def.innerType?._zod?.optin),st(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(ji):ji(r)}});function ji(e){return e.memo||(e.value=Object.freeze(e.value)),e}var Mi=C(`$ZodLazy`,(e,t)=>{Zn.init(e,t),ue(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),st(e,`pattern`,e=>e.innerType?._zod?.pattern),st(e,`propValues`,e=>e.innerType?._zod?.propValues),st(e,`optin`,e=>e.innerType?._zod?.optin??void 0),st(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),Ni=C(`$ZodCustom`,(e,t)=>{jn.init(e,t),Zn.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>Pi(t,n,r,e));Pi(i,n,r,e)}});function Pi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Ze(e))}}var Fi=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},Ii=`~memo`,Li=[];function Ri(e){return typeof e==`object`&&!!e}function zi(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Bi=new WeakMap,Vi=0,Hi=1,Ui=2;function Wi(e,t,n){let r=Bi.get(e);if(r!==void 0)return r?Ui:Vi;if(t.has(e))return Ui;t.add(e);let i=Vi,a=e=>{if(i!==Ui&&e?._zod){let r=Wi(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Vi;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?Hi:o.value?._zod?Wi(o.value,t,n):Vi;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=fe(c);s(e?o(e,!0):Hi),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Wi(r,t,!1):Hi);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(!(!n||typeof n!=`object`)){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Gi(e,i)}function Gi(e,t){return t!==Hi&&Bi.set(e,t===Ui),t}function Ki(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var qi,Ji=[],Yi={alloc(e,t,n){let r=qi;if(!r)return n;qi=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ji.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Zi(n,e.value))throw new Fi;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Wi(e,new Set,!1);if(i===Vi)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Ui||r?n=!0:r=!0}let l=s.value;if(!Ri(l))return t(s,c);let u=c[Ii];u||(u={buckets:new WeakMap,backEdges:void 0},c[Ii]=u);let d;i===c?d=a:(d=Ki(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...zi(f.issues)):(s.memo=!0,u.backEdges??=new WeakSet,u.backEdges.add(f.value)),s;qi=d;let p=Ji.length,m=t(s,c);qi=void 0;let h=Ji.length>p?Ji.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?zi(e.issues):Li),e)):(h&&(h.issues=m.issues.length?zi(m.issues):Li),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Xi(){return Yi}function Zi(e,t){let n=e[Ii]?.backEdges;return n!==void 0&&Ri(t)&&n.has(t)}var Qi=()=>{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(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Xe(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${Oe(e.values[0])}`:`Invalid option: expected one of ${ne(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${ne(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`\'${e}\'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function $i(){return{localeError:Qi()}}var ea,ta=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function na(){return new ta}(ea=globalThis).__zod_globalRegistry??(ea.__zod_globalRegistry=na());var ra=globalThis.__zod_globalRegistry;function ia(e){return e.checks&&=[...e.checks],e}function aa(e,t){return new e(ia({type:`string`,...x(t)}))}function oa(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...x(t)})}function sa(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...x(t)})}function ca(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...x(t)})}function la(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...x(t)})}function ua(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...x(t)})}function da(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...x(t)})}function fa(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...x(t)})}function pa(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...x(t)})}function ma(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...x(t)})}function ha(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...x(t)})}function ga(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...x(t)})}function _a(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...x(t)})}function va(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...x(t)})}function ya(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...x(t)})}function ba(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...x(t)})}function xa(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...x(t)})}function Sa(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...x(t)})}function Ca(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...x(t)})}function wa(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...x(t)})}function Ta(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...x(t)})}function Ea(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...x(t)})}function Da(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...x(t)})}function Oa(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...x(t)})}function ka(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...x(t)})}function Aa(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...x(t)})}function ja(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...x(t)})}function Ma(e,t){return new e(ia({type:`number`,checks:[],...x(t)}))}function Na(e,t){return new e(ia({type:`number`,coerce:!0,checks:[],...x(t)}))}function Pa(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...x(t)})}function Fa(e,t){return new e({type:`boolean`,...x(t)})}function Ia(e,t){return new e({type:`undefined`,...x(t)})}function La(e,t){return new e({type:`null`,...x(t)})}function Ra(e){return new e({type:`any`})}function za(e){return new e({type:`unknown`})}function Ba(e,t){return new e({type:`never`,...x(t)})}function Va(e,t){return new Pn({check:`less_than`,...x(t),value:e,inclusive:!1})}function Ha(e,t){return new Pn({check:`less_than`,...x(t),value:e,inclusive:!0})}function Ua(e,t){return new Fn({check:`greater_than`,...x(t),value:e,inclusive:!1})}function Wa(e,t){return new Fn({check:`greater_than`,...x(t),value:e,inclusive:!0})}function Ga(e,t){return new In({check:`multiple_of`,...x(t),value:e})}function Ka(e,t){return new Rn({check:`max_length`,...x(t),maximum:e})}function qa(e,t){return new zn({check:`min_length`,...x(t),minimum:e})}function Ja(e,t){return new Bn({check:`length_equals`,...x(t),length:e})}function Ya(e,t){return new Hn({check:`string_format`,format:`regex`,...x(t),pattern:e})}function Xa(e){return new Un({check:`string_format`,format:`lowercase`,...x(e)})}function Za(e){return new Wn({check:`string_format`,format:`uppercase`,...x(e)})}function Qa(e,t){return new Gn({check:`string_format`,format:`includes`,...x(t),includes:e})}function $a(e,t){return new Kn({check:`string_format`,format:`starts_with`,...x(t),prefix:e})}function eo(e,t){return new qn({check:`string_format`,format:`ends_with`,...x(t),suffix:e})}function to(e){return new Jn({check:`overwrite`,tx:e})}function no(e){return to(t=>t.normalize(e))}function ro(){return to(e=>e.trim())}function io(){return to(e=>e.toLowerCase())}function ao(){return to(e=>e.toUpperCase())}function oo(){return to(e=>ye(e))}function so(e,t,n){return new e({type:`array`,element:t,...x(n)})}function co(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...x(n)})}function lo(e,t){let n=uo(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Ze(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Ze(r))}},e(t.value,t)),t);return n}function uo(e,t){let n=new jn({check:`custom`,...x(t)});return n._zod.check=e,n}function fo(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&de(e,t,n[t]);return e}function po(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??ra,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function mo(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function ho(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,ho(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&fo(o.schema,c),t.io===`input`&&To(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function go(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}function _o(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${go(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+go(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>\n\nSet the \\`cycles\\` parameter to \\`"ref"\\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function vo(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;vo(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var yo=new Set([`type`,`properties`,`required`,`additionalProperties`]),bo=[`oneOf`,`anyOf`];function xo(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function So(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!yo.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??xo(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}de(n,r,e.length===1?e[0]:So(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=xo(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function Co(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of yo)if(t in e)return;let n=t.filter(e=>bo.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=So(t);else{let e=n[0],i=bo.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>So([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,fo(e,r))}function wo(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):fo(i,s),fo(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())vo(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])Co(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}fo(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,de(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:Do(t,`input`,e.processors),output:Do(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function To(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return To(r.element,n);if(r.type===`set`)return To(r.valueType,n);if(r.type===`lazy`)return To(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return To(r.innerType,n);if(r.type===`intersection`)return To(r.left,n)||To(r.right,n);if(r.type===`record`||r.type===`map`)return To(r.keyType,n)||To(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:To(r.in,n)||To(r.out,n);if(r.type===`object`){for(let e in r.shape)if(To(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(To(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(To(e,n))return!0;return!!(r.rest&&To(r.rest,n))}return!1}var Eo=(e,t={})=>n=>{let r=po({...n,processors:t});return ho(e,r),_o(r,e),wo(r,e)},Do=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=po({...i??{},target:a,io:t,processors:n});return ho(e,o),_o(o,e),wo(o,e)},w=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},Oo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},ko=(e,t)=>{w(e,`minimum`,t),Oo(e,`maximum`,t)},Ao=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},jo=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},Mo=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},No=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},Po=(e,t)=>w(e,`minimum`,t.minimum),Fo=(e,t)=>Oo(e,`maximum`,t.maximum),Io=e=>(t,n)=>{No(t,n.format);let[r,i]=e[n.format];w(t,`minimum`,r),Oo(t,`maximum`,i)},Lo={greater_than:(e,t)=>w(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>Oo(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>Ao(e,t.value),number_format:Io(Ae),bigint_format:Io(je),min_length:Po,max_length:Fo,length_equals:(e,t)=>ko(e,t.length),min_size:Po,max_size:Fo,size_equals:(e,t)=>ko(e,t.size),string_format:(e,t)=>{No(e,t.format),t.pattern&&jo(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>Mo(e,t.mime)};function Ro(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)Lo[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&w(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&w(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&Oo(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&Oo(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&Ao(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&Mo(t,i.mime);for(let e of i.patterns??[])jo(t,e);return t}var zo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},Bo=new Map([[Nr,pn],[Fr,mn]]),Vo=e=>Bo.get(e)??e,Ho=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=Ro(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=zo[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Vo);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},Uo=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=Ro(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):mo(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Wo=(e,t,n,r)=>{n.type=`boolean`},Go=(e,t,n,r)=>{mo(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Ko=(e,t,n,r)=>{mo(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},qo=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Jo=(e,t,n,r)=>{mo(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},Yo=(e,t,n,r)=>{mo(e,t,n,r,`Void cannot be represented in JSON Schema`)},Xo=(e,t,n,r)=>{n.not={}},Zo=(e,t,n,r)=>{},Qo=(e,t,n,r)=>{},$o=(e,t,n,r)=>{mo(e,t,n,r,`Date cannot be represented in JSON Schema`)},es=(e,t,n,r)=>{let i=e._zod.def,a=te(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},ts=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(mo(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(mo(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},ns=(e,t,n,r)=>{mo(e,t,n,r,`NaN cannot be represented in JSON Schema`)},rs=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},is=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=Ro(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},as=(e,t,n,r)=>{n.type=`boolean`},os=(e,t,n,r)=>{mo(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},ss=(e,t,n,r)=>{mo(e,t,n,r,`Function types cannot be represented in JSON Schema`)},cs=(e,t,n,r)=>{mo(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},ls=(e,t,n,r)=>{mo(e,t,n,r,`Map cannot be represented in JSON Schema`)},us=(e,t,n,r)=>{mo(e,t,n,r,`Set cannot be represented in JSON Schema`)},ds=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=Ro(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=ho(a.element,t,{...r,path:[...r.path,`items`]})};function fs(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?fs(t.out):t.type===`catch`?fs(t.innerType):e._zod.optin}var ps=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&mo(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)de(i.properties,e,ho(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?fs(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=ho(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},ms=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>ho(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},hs=(e,t,n,r)=>{let i=e._zod.def,a=ho(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=ho(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},gs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>ho(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?ho(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?fs(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=Ro(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function _s(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=_s(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>_s(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?Tn:wn).source),p):p}var vs=new WeakMap;function ys(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of vs.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=_s(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var bs=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=Ro(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=ho(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)de(i.patternProperties,Vo(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=ho(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=vs.get(t);n||(n=[],vs.set(t,n),t.deferred.push(()=>ys(t))),n.push(e)}i.additionalProperties=ho(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&fs(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},xs=(e,t,n,r)=>{let i=e._zod.def,a=ho(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},Ss=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Cs=Symbol();function ws(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(mo(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),Cs):JSON.parse(o)}var Ts=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=ws(i.defaultValue,e,t,n,r);o!==Cs&&(n.default=o)},Es=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=ws(i.defaultValue,e,t,n,r);o!==Cs&&(n._prefault=o)},Ds=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{mo(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},Os=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;ho(o,t,r);let s=t.seen.get(e);s.ref=o},ks=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},As=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},js=(e,t,n,r)=>{let i=e._zod.def;ho(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},Ms=(e,t,n,r)=>{let i=e._zod.innerType;ho(i,t,r);let a=t.seen.get(e);a.ref=i},Ns={string:Ho,number:Uo,boolean:Wo,bigint:Go,symbol:Ko,null:qo,undefined:Jo,void:Yo,never:Xo,any:Zo,unknown:Qo,date:$o,enum:es,literal:ts,nan:ns,template_literal:rs,file:is,success:as,custom:os,function:ss,transform:cs,map:ls,set:us,array:ds,object:ps,union:ms,intersection:hs,tuple:gs,record:bs,nullable:xs,nonoptional:Ss,default:Ts,prefault:Es,catch:Ds,pipe:Os,readonly:ks,promise:As,optional:js,lazy:Ms};function Ps(e,t){if(`_idmap`in e){let n=e,r=po({...t,processors:Ns}),i={};for(let e of n._idmap.entries()){let[t,n]=e;ho(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;_o(r,n),de(a,t,wo(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=po({...t,processors:Ns});return ho(e,n),_o(n,e),wo(n,e)}var Fs=new WeakSet([Object.prototype,Error.prototype]);function Is(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var Ls=C(`ZodError`,(e,t)=>{Et.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);Fs.has(n)||(Fs.add(n),Is(n,`format`,e=>t=>kt(e,t)),Is(n,`flatten`,e=>t=>Ot(e,t)),Is(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,re,2)}),Is(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,re,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),Rs=jt(Ls),zs=Mt(Ls),Bs=Nt(Ls),Vs=Ft(Ls),Hs=Vt(Ls),Us=Ht(Ls),Ws=Ut(Ls),Gs=Wt(Ls),Ks=Gt(Ls),qs=Kt(Ls),Js=qt(Ls),Ys=Jt(Ls);function Xs(){vt.localeError||yt($i())}function Zs(){vt.memoizer||yt({memoizer:Xi()})}var Qs=C(`ZodType`,(e,t)=>(Xs(),Zn.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(_e(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return De(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check(yl(e,t))},superRefine(e,t){return this.check(bl(e,t))},overwrite(e){return this.check(to(e))},optional(){return I(this)},exactOptional(){return el(this)},nullable(){return nl(this)},nullish(){return I(nl(this))},nonoptional(e){return cl(this,e)},array(){return k(this)},or(e){return M([this,e])},and(e){return Kc(this,e)},transform(e){return fl(this,Zc(e))},default(e){return il(this,e)},prefault(e){return ol(this,e)},catch(e){return ul(this,e)},pipe(e){return fl(this,e)},readonly(){return hl(this)},describe(e){let t=this.clone();return ra.add(t,{description:e}),t},meta(...e){if(e.length===0)return ra.get(this);let t=this.clone();return ra.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return et(this,`~standard`,{...er(this),jsonSchema:{input:Do(this,`input`),output:Do(this,`output`)}})},set"~standard"(e){$e(this,`~standard`,e)},parse:function e(t,n){return Rs(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await zs(this,t,n,{callee:e})},safeParse(e,t){return Bs(this,e,t)},async safeParseAsync(e,t){return Vs(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){$e(this,`spa`,e)},validate(e,t){return Rt(this,e,t)},validateAsync(e,t){return Bt(this,e,t)},encode:function e(t,n){return Hs(this,t,n,{callee:e})},decode:function e(t,n){return Us(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Ws(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Gs(this,t,n,{callee:e})},safeEncode(e,t){return Ks(this,e,t)},safeDecode(e,t){return qs(this,e,t)},async safeEncodeAsync(e,t){return Js(this,e,t)},async safeDecodeAsync(e,t){return Ys(this,e,t)},toJSONSchema(e){return Eo(this,{})(e)},get description(){return ra.get(this)?.description},get _def(){return this._zod.def}}),$s=C(`_ZodString`,(e,t)=>{tr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ho(e,t,n,r)},tt({format:e=>Ro(e).format??null,minLength:e=>Ro(e).minimum??null,maxLength:e=>Ro(e).maximum??null},{regex(...e){return this.check(Ya(...e))},includes(...e){return this.check(Qa(...e))},startsWith(...e){return this.check($a(...e))},endsWith(...e){return this.check(eo(...e))},min(...e){return this.check(qa(...e))},max(...e){return this.check(Ka(...e))},length(...e){return this.check(Ja(...e))},nonempty(...e){return this.check(qa(1,...e))},lowercase(e){return this.check(Xa(e))},uppercase(e){return this.check(Za(e))},trim(){return this.check(ro())},normalize(...e){return this.check(no(...e))},toLowerCase(){return this.check(io())},toUpperCase(){return this.check(ao())},slugify(){return this.check(oo())}})),ec=C(`ZodString`,(e,t)=>{tr.init(e,t),$s.init(e,t)},{email(e){return this.check(oa(oc,e))},url(e){return this.check(fa(uc,e))},jwt(e){return this.check(Da(Ec,e))},emoji(e){return this.check(pa(fc,e))},guid(e){return this.check(sa(cc,e))},uuid(e){return this.check(ca(lc,e))},uuidv4(e){return this.check(la(lc,e))},uuidv6(e){return this.check(ua(lc,e))},uuidv7(e){return this.check(da(lc,e))},nanoid(e){return this.check(ma(pc,e))},cuid(e){return this.check(ha(mc,e))},cuid2(e){return this.check(ga(hc,e))},ulid(e){return this.check(_a(gc,e))},base64(e){return this.check(wa(Cc,e))},base64url(e){return this.check(Ta(wc,e))},xid(e){return this.check(va(_c,e))},ksuid(e){return this.check(ya(vc,e))},ipv4(e){return this.check(ba(yc,e))},ipv6(e){return this.check(xa(bc,e))},cidrv4(e){return this.check(Sa(xc,e))},cidrv6(e){return this.check(Ca(Sc,e))},e164(e){return this.check(Ea(Tc,e))},datetime(e){return this.check(Oa(nc,e))},date(e){return this.check(ka(rc,e))},time(e){return this.check(Aa(ic,e))},duration(e){return this.check(ja(ac,e))}});function T(e){return aa(ec,e)}var tc=C(`ZodStringFormat`,(e,t)=>{nr.init(e,t),$s.init(e,t)}),nc=C(`ZodISODateTime`,(e,t)=>{xr.init(e,t),tc.init(e,t)}),rc=C(`ZodISODate`,(e,t)=>{Sr.init(e,t),tc.init(e,t)}),ic=C(`ZodISOTime`,(e,t)=>{Cr.init(e,t),tc.init(e,t)}),ac=C(`ZodISODuration`,(e,t)=>{wr.init(e,t),tc.init(e,t)}),oc=C(`ZodEmail`,(e,t)=>{ar.init(e,t),tc.init(e,t)});function sc(e){return oa(oc,e)}var cc=C(`ZodGUID`,(e,t)=>{rr.init(e,t),tc.init(e,t)}),lc=C(`ZodUUID`,(e,t)=>{ir.init(e,t),tc.init(e,t)}),uc=C(`ZodURL`,(e,t)=>{pr.init(e,t),tc.init(e,t)});function dc(e){return fa(uc,e)}var fc=C(`ZodEmoji`,(e,t)=>{mr.init(e,t),tc.init(e,t)}),pc=C(`ZodNanoID`,(e,t)=>{hr.init(e,t),tc.init(e,t)}),mc=C(`ZodCUID`,(e,t)=>{gr.init(e,t),tc.init(e,t)}),hc=C(`ZodCUID2`,(e,t)=>{_r.init(e,t),tc.init(e,t)}),gc=C(`ZodULID`,(e,t)=>{vr.init(e,t),tc.init(e,t)}),_c=C(`ZodXID`,(e,t)=>{yr.init(e,t),tc.init(e,t)}),vc=C(`ZodKSUID`,(e,t)=>{br.init(e,t),tc.init(e,t)}),yc=C(`ZodIPv4`,(e,t)=>{Tr.init(e,t),tc.init(e,t)}),bc=C(`ZodIPv6`,(e,t)=>{Or.init(e,t),tc.init(e,t)}),xc=C(`ZodCIDRv4`,(e,t)=>{kr.init(e,t),tc.init(e,t)}),Sc=C(`ZodCIDRv6`,(e,t)=>{jr.init(e,t),tc.init(e,t)}),Cc=C(`ZodBase64`,(e,t)=>{Pr.init(e,t),tc.init(e,t)}),wc=C(`ZodBase64URL`,(e,t)=>{Lr.init(e,t),tc.init(e,t)}),Tc=C(`ZodE164`,(e,t)=>{Rr.init(e,t),tc.init(e,t)}),Ec=C(`ZodJWT`,(e,t)=>{Br.init(e,t),tc.init(e,t)}),Dc=C(`ZodNumber`,(e,t)=>{Vr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Uo(e,t,n,r),e.isFinite=!0},tt({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=Ro(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=Ro(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=Ro(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>Ro(e).format??null},{gt(e,t){return this.check(Ua(e,t))},gte(e,t){return this.check(Wa(e,t))},min(e,t){return this.check(Wa(e,t))},lt(e,t){return this.check(Va(e,t))},lte(e,t){return this.check(Ha(e,t))},max(e,t){return this.check(Ha(e,t))},int(e){return this.check(kc(e))},safe(e){return this.check(kc(e))},positive(e){return this.check(Ua(0,e))},nonnegative(e){return this.check(Wa(0,e))},negative(e){return this.check(Va(0,e))},nonpositive(e){return this.check(Ha(0,e))},multipleOf(e,t){return this.check(Ga(e,t))},step(e,t){return this.check(Ga(e,t))},finite(){return this}}));function E(e){return Ma(Dc,e)}var Oc=C(`ZodNumberFormat`,(e,t)=>{Hr.init(e,t),Dc.init(e,t)});function kc(e){return Pa(Oc,e)}var Ac=C(`ZodBoolean`,(e,t)=>{Ur.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r)});function D(e){return Fa(Ac,e)}var jc=C(`ZodUndefined`,(e,t)=>{Wr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Jo(e,t,n,r)});function Mc(e){return Ia(jc,e)}var Nc=C(`ZodNull`,(e,t)=>{Gr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r)});function Pc(e){return La(Nc,e)}var Fc=C(`ZodAny`,(e,t)=>{Kr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function Ic(){return Ra(Fc)}var Lc=C(`ZodUnknown`,(e,t)=>{qr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function O(){return za(Lc)}var Rc=C(`ZodNever`,(e,t)=>{Jr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r)});function zc(e){return Ba(Rc,e)}var Bc=C(`ZodArray`,(e,t)=>{Zs(),Qr.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ds(e,t,n,r),e.element=t.element},{min(e,t){return this.check(qa(e,t))},nonempty(e){return this.check(qa(1,e))},max(e,t){return this.check(Ka(e,t))},length(e,t){return this.check(Ja(e,t))},unwrap(){return this.element}});function k(e,t){return so(Bc,e,t)}var Vc=C(`ZodObject`,(e,t)=>{Zs(),ii.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ps(e,t,n,r),ct(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return P(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(_e(this._zod.def,{catchall:e}))},passthrough(){return this.clone(_e(this._zod.def,{catchall:O()}))},loose(){return this.clone(_e(this._zod.def,{catchall:O()}))},strict(){return this.clone(_e(this._zod.def,{catchall:zc()}))},strip(){return this.clone(_e(this._zod.def,{catchall:void 0}))},extend(e){return Pe(this,e)},safeExtend(e){return Ie(this,e)},merge(e){return Le(this,e)},pick(e){return Me(this,e)},omit(e){return S(this,e)},partial(...e){return Re(Qc,this,e[0])},exactPartial(...e){return Re($c,this,e[0],`exactPartial`)},required(...e){return ze(sl,this,e[0])}});function A(e,t){return new Vc({type:`object`,shape:e??{},...x(t)})}function j(e,t){return new Vc({type:`object`,shape:e,catchall:O(),...x(t)})}var Hc=C(`ZodUnion`,(e,t)=>{oi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ms(e,t,n,r),e.options=t.options});function M(e,t){return new Hc({type:`union`,options:e,...x(t)})}var Uc=C(`ZodDiscriminatedUnion`,(e,t)=>{Hc.init(e,t),ci.init(e,t)});function Wc(e,t,n){return new Uc({type:`union`,options:t,discriminator:e,...x(n)})}var Gc=C(`ZodIntersection`,(e,t)=>{li.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>hs(e,t,n,r)});function Kc(e,t){return new Gc({type:`intersection`,left:e,right:t})}var qc=C(`ZodRecord`,(e,t)=>{Zs(),fi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>bs(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function N(e,t,n){return!t||!t._zod?new qc({type:`record`,keyType:T(),valueType:e,...x(t)}):new qc({type:`record`,keyType:e,valueType:t,...x(n)})}var Jc=C(`ZodEnum`,(e,t)=>{pi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>es(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Jc({...t,checks:[],...x(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Jc({...t,checks:[],...x(r),entries:i})}});function P(e,t){return new Jc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...x(t)})}var Yc=C(`ZodLiteral`,(e,t)=>{mi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ts(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function F(e,t){return new Yc({type:`literal`,values:Array.isArray(e)?e:[e],...x(t)})}var Xc=C(`ZodTransform`,(e,t)=>{Zs(),hi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new _t(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Ze(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Ze(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function Zc(e){return new Xc({type:`transform`,transform:e})}var Qc=C(`ZodOptional`,(e,t)=>{_i.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>js(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function I(e){return new Qc({type:`optional`,innerType:e})}var $c=C(`ZodExactOptional`,(e,t)=>{vi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>js(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function el(e){return new $c({type:`optional`,innerType:e})}var tl=C(`ZodNullable`,(e,t)=>{yi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>xs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function nl(e){return new tl({type:`nullable`,innerType:e})}var rl=C(`ZodDefault`,(e,t)=>{bi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ts(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function il(e,t){return new rl({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():we(t)}})}var al=C(`ZodPrefault`,(e,t)=>{Si.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Es(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function ol(e,t){return new al({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():we(t)}})}var sl=C(`ZodNonOptional`,(e,t)=>{Ci.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ss(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function cl(e,t){return new sl({type:`nonoptional`,innerType:e,...x(t)})}var ll=C(`ZodCatch`,(e,t)=>{Ei.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ds(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function ul(e,t){return new ll({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:ut(t)})}var dl=C(`ZodPipe`,(e,t)=>{Di.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Os(e,t,n,r),e.in=t.in,e.out=t.out});function fl(e,t){return new dl({type:`pipe`,in:e,out:t})}var pl=C(`ZodPreprocess`,(e,t)=>{dl.init(e,t),ki.init(e,t)}),ml=C(`ZodReadonly`,(e,t)=>{Ai.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ks(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function hl(e){return new ml({type:`readonly`,innerType:e})}var gl=C(`ZodLazy`,(e,t)=>{Mi.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ms(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function _l(e){return new gl({type:`lazy`,getter:e})}var vl=C(`ZodCustom`,(e,t)=>{Ni.init(e,t),Qs.init(e,t),e._zod.processJSONSchema=(t,n,r)=>os(e,t,n,r)});function yl(e,t={}){return co(vl,e,t)}function bl(e,t){return lo(e,t)}function xl(e,t){return new pl({type:`pipe`,in:Zc(e),out:t})}var Sl={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`},Cl;Cl||={};function wl(e){return Oa(nc,e)}function Tl(e){return ka(rc,e)}function El(e){return Na(Dc,e)}var Dl=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],Ol=`io.modelcontextprotocol/related-task`,kl=`io.modelcontextprotocol/protocolVersion`,Al=`io.modelcontextprotocol/clientInfo`,jl=`io.modelcontextprotocol/serverInfo`,Ml=`io.modelcontextprotocol/clientCapabilities`,Nl=`io.modelcontextprotocol/subscriptionId`,Pl=`io.modelcontextprotocol/logLevel`,Fl=_l(()=>M([T(),E(),D(),Pc(),N(T(),Fl),k(Fl)])),Il=N(T(),Fl),Ll=k(Fl),Rl=M([T(),E().int()]),zl=T(),Bl=A({ttl:E().optional()}),Vl=A({taskId:T()}),Hl=j({progressToken:Rl.optional(),[Ol]:Vl.optional()}),Ul=A({_meta:Hl.optional()}),Wl=Ul.extend({task:Bl.optional()}),Gl=A({method:T(),params:Ul.loose().optional()}),Kl=A({_meta:Hl.optional()}),ql=A({method:T(),params:Kl.loose().optional()}),Jl=j({get[jl](){return cu.optional().catch(void 0)}}),L=j({_meta:Jl.optional()}),Yl=M([T(),E().int()]),Xl=A({jsonrpc:F(`2.0`),id:Yl,...Gl.shape}).strict(),Zl=A({jsonrpc:F(`2.0`),...ql.shape}).strict(),Ql=A({jsonrpc:F(`2.0`),id:Yl,result:L}).strict(),$l=A({jsonrpc:F(`2.0`),id:Yl.optional(),error:A({code:E().int(),message:T(),data:O().optional()})}).strict(),eu=M([Xl,Zl,Ql,$l]),tu=M([Ql,$l]),nu=L.strict(),ru=Kl.extend({requestId:Yl.optional(),reason:T().optional()}),iu=ql.extend({method:F(`notifications/cancelled`),params:ru}),au=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),ou=A({icons:k(au).optional()}),su=A({name:T(),title:T().optional()}),cu=su.extend({...su.shape,...ou.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),lu=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),Il).optional(),url:Il.optional()}),Il.optional())),uu=j({list:Il.optional(),cancel:Il.optional(),requests:j({sampling:j({createMessage:Il.optional()}).optional(),elicitation:j({create:Il.optional()}).optional()}).optional()}),du=j({list:Il.optional(),cancel:Il.optional(),requests:j({tools:j({call:Il.optional()}).optional()}).optional()}),fu=A({experimental:N(T(),Il).optional(),sampling:A({context:Il.optional(),tools:Il.optional()}).optional(),elicitation:lu.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:uu.optional(),extensions:N(T(),Il).optional()}),pu=Ul.extend({protocolVersion:T(),capabilities:fu,clientInfo:cu}),mu=Gl.extend({method:F(`initialize`),params:pu}),hu=A({experimental:N(T(),Il).optional(),logging:Il.optional(),completions:Il.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:du.optional(),extensions:N(T(),Il).optional()}),gu=L.extend({protocolVersion:T(),capabilities:hu,serverInfo:cu,instructions:T().optional()}),_u=ql.extend({method:F(`notifications/initialized`),params:Kl.optional()}),vu=Gl.extend({method:F(`server/discover`),params:Ul.optional()}),yu=L.extend({supportedVersions:k(T()),capabilities:hu,instructions:T().optional()}),bu=Gl.extend({method:F(`ping`),params:Ul.optional()}),xu=A({progress:E(),total:I(E()),message:I(T())}),Su=A({...Kl.shape,...xu.shape,progressToken:Rl}),Cu=ql.extend({method:F(`notifications/progress`),params:Su}),wu=Ul.extend({cursor:zl.optional()}),Tu=Gl.extend({params:wu.optional()}),Eu=L.extend({nextCursor:zl.optional()}),Du=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),Ou=Du.extend({text:T()}),ku=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),Au=Du.extend({blob:ku}),ju=P([`user`,`assistant`]),Mu=A({audience:k(ju).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),Nu=A({...su.shape,...ou.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:Mu.optional(),_meta:I(j({}))}),Pu=A({...su.shape,...ou.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:Mu.optional(),_meta:I(j({}))}),Fu=Tu.extend({method:F(`resources/list`)}),Iu=Eu.extend({resources:k(Nu)}),Lu=Tu.extend({method:F(`resources/templates/list`)}),Ru=Eu.extend({resourceTemplates:k(Pu)}),zu=Ul.extend({uri:T()}),Bu=zu,Vu=Gl.extend({method:F(`resources/read`),params:Bu}),Hu=L.extend({contents:k(M([Ou,Au]))}),Uu=ql.extend({method:F(`notifications/resources/list_changed`),params:Kl.optional()}),Wu=zu,Gu=Gl.extend({method:F(`resources/subscribe`),params:Wu}),Ku=zu,qu=Gl.extend({method:F(`resources/unsubscribe`),params:Ku}),Ju=A({toolsListChanged:D().optional(),promptsListChanged:D().optional(),resourcesListChanged:D().optional(),resourceSubscriptions:k(T()).optional()}),Yu=Ul.extend({notifications:Ju}),Xu=Gl.extend({method:F(`subscriptions/listen`),params:Yu}),Zu=Kl.extend({notifications:Ju}),Qu=ql.extend({method:F(`notifications/subscriptions/acknowledged`),params:Zu}),$u=Jl.extend({[Nl]:Yl}),ed=L.extend({_meta:$u}),td=Kl.extend({uri:T()}),nd=ql.extend({method:F(`notifications/resources/updated`),params:td}),rd=A({name:T(),description:I(T()),required:I(D())}),id=A({...su.shape,...ou.shape,description:I(T()),arguments:I(k(rd)),_meta:I(j({}))}),ad=Tu.extend({method:F(`prompts/list`)}),od=Eu.extend({prompts:k(id)}),sd=Ul.extend({name:T(),arguments:N(T(),T()).optional()}),cd=Gl.extend({method:F(`prompts/get`),params:sd}),ld=A({type:F(`text`),text:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),ud=A({type:F(`image`),data:ku,mimeType:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),dd=A({type:F(`audio`),data:ku,mimeType:T(),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),fd=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),pd=A({type:F(`resource`),resource:M([Ou,Au]),annotations:Mu.optional(),_meta:N(T(),O()).optional()}),md=Nu.extend({type:F(`resource_link`)}),hd=M([ld,ud,dd,md,pd]),gd=A({role:ju,content:hd}),_d=L.extend({description:T().optional(),messages:k(gd)}),vd=ql.extend({method:F(`notifications/prompts/list_changed`),params:Kl.optional()}),yd=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),bd=A({taskSupport:P([`required`,`optional`,`forbidden`]).optional()}),xd=A({...su.shape,...ou.shape,description:T().optional(),inputSchema:A({type:F(`object`),properties:N(T(),Fl).optional(),required:k(T()).optional()}).catchall(O()),outputSchema:j({$schema:T().optional()}).optional(),annotations:yd.optional(),execution:bd.optional(),_meta:N(T(),O()).optional()}),Sd=Tu.extend({method:F(`tools/list`)}),Cd=Eu.extend({tools:k(xd)}),wd=L.extend({content:k(hd).default([]),structuredContent:O().optional(),isError:D().optional()}),Td=wd.or(L.extend({toolResult:O()})),Ed=Wl.extend({name:T(),arguments:N(T(),O()).optional()}),Dd=Gl.extend({method:F(`tools/call`),params:Ed}),Od=ql.extend({method:F(`notifications/tools/list_changed`),params:Kl.optional()}),kd=A({autoRefresh:D().default(!0),debounceMs:E().int().nonnegative().default(300)}),Ad=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),jd=Ul.extend({level:Ad}),Md=Gl.extend({method:F(`logging/setLevel`),params:jd}),Nd=Kl.extend({level:Ad,logger:T().optional(),data:O()}),Pd=ql.extend({method:F(`notifications/message`),params:Nd}),Fd=A({name:T().optional()}),Id=A({hints:k(Fd).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),Ld=A({mode:P([`auto`,`required`,`none`]).optional()}),Rd=A({type:F(`tool_result`),toolUseId:T().describe(`The unique identifier for the corresponding tool call.`),content:k(hd),structuredContent:O().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),zd=Wc(`type`,[ld,ud,dd]),Bd=Wc(`type`,[ld,ud,dd,fd,Rd]),Vd=A({role:ju,content:M([Bd,k(Bd)]),_meta:N(T(),O()).optional()}),Hd=Wl.extend({messages:k(Vd),modelPreferences:Id.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:Il.optional(),tools:k(xd).optional(),toolChoice:Ld.optional()}),Ud=Gl.extend({method:F(`sampling/createMessage`),params:Hd}),Wd=L.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`]).or(T())),role:ju,content:zd}),Gd=L.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(T())),role:ju,content:M([Bd,k(Bd)])}),Kd=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),qd=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),Jd=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Yd=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Xd=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Zd=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),Qd=M([Yd,Xd]),$d=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),ef=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),tf=M([$d,ef]),nf=M([Zd,Qd,tf]),rf=M([nf,Kd,qd,Jd]),af=Wl.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),rf),required:k(T()).optional()}).catchall(O())}),of=Wl.extend({mode:F(`url`),message:T(),elicitationId:T(),url:T().url()}),sf=M([af,of]),cf=Gl.extend({method:F(`elicitation/create`),params:sf}),lf=Kl.extend({elicitationId:T()}),uf=ql.extend({method:F(`notifications/elicitation/complete`),params:lf}),df=L.extend({action:P([`accept`,`decline`,`cancel`]),content:xl(e=>e===null?void 0:e,N(T(),M([T(),E(),D(),k(T())])).optional())}),ff=A({type:F(`ref/resource`),uri:T()}),pf=A({type:F(`ref/prompt`),name:T()}),mf=Ul.extend({ref:M([pf,ff]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()}),hf=Gl.extend({method:F(`completion/complete`),params:mf}),gf=L.extend({completion:j({values:k(T()).max(100),total:I(E().int()),hasMore:I(D())})}),_f=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),vf=Gl.extend({method:F(`roots/list`),params:Ul.optional()}),yf=L.extend({roots:k(_f)}),bf=ql.extend({method:F(`notifications/roots/list_changed`),params:Kl.optional()}),xf=j({ttl:E().optional(),pollInterval:E().optional()}),Sf=P([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Cf=A({taskId:T(),status:Sf,ttl:M([E(),Pc()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:I(E()),statusMessage:I(T())}),wf=L.extend({task:Cf}),Tf=Kl.merge(Cf),Ef=ql.extend({method:F(`notifications/tasks/status`),params:Tf}),Df=Gl.extend({method:F(`tasks/get`),params:Ul.extend({taskId:T()})}),Of=L.merge(Cf),kf=Gl.extend({method:F(`tasks/result`),params:Ul.extend({taskId:T()})}),Af=L.loose(),jf=Tu.extend({method:F(`tasks/list`)}),Mf=Eu.extend({tasks:k(Cf)}),Nf=Gl.extend({method:F(`tasks/cancel`),params:Ul.extend({taskId:T()})}),Pf=L.merge(Cf),Ff=M([bu,mu,vu,hf,Md,cd,ad,Fu,Lu,Vu,Gu,qu,Xu,Dd,Sd]),If=M([iu,Cu,_u,bf]),Lf=M([nu,Wd,Gd,df,yf]),Rf=M([bu,Ud,cf,vf]),zf=M([iu,Cu,Pd,nd,Uu,Od,vd,Qu,uf]),Bf=M([nu,gu,yu,gf,_d,od,Iu,Ru,Hu,wd,Cd,ed]),Vf=dc().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:Sl.custom,message:`URL must be parseable`,fatal:!0}),ft}).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`}),Hf=j({resource:T().url(),authorization_servers:k(Vf).optional(),jwks_uri:T().url().optional(),scopes_supported:k(T()).optional(),bearer_methods_supported:k(T()).optional(),resource_signing_alg_values_supported:k(T()).optional(),resource_name:T().optional(),resource_documentation:T().optional(),resource_policy_uri:T().url().optional(),resource_tos_uri:T().url().optional(),tls_client_certificate_bound_access_tokens:D().optional(),authorization_details_types_supported:k(T()).optional(),dpop_signing_alg_values_supported:k(T()).optional(),dpop_bound_access_tokens_required:D().optional()}),Uf=j({issuer:T(),authorization_endpoint:Vf,token_endpoint:Vf,registration_endpoint:Vf.optional(),scopes_supported:k(T()).optional(),response_types_supported:k(T()),response_modes_supported:k(T()).optional(),grant_types_supported:k(T()).optional(),token_endpoint_auth_methods_supported:k(T()).optional(),token_endpoint_auth_signing_alg_values_supported:k(T()).optional(),service_documentation:Vf.optional(),revocation_endpoint:Vf.optional(),revocation_endpoint_auth_methods_supported:k(T()).optional(),revocation_endpoint_auth_signing_alg_values_supported:k(T()).optional(),introspection_endpoint:T().optional(),introspection_endpoint_auth_methods_supported:k(T()).optional(),introspection_endpoint_auth_signing_alg_values_supported:k(T()).optional(),code_challenge_methods_supported:k(T()).optional(),client_id_metadata_document_supported:D().optional(),authorization_response_iss_parameter_supported:D().optional().catch(void 0),dpop_signing_alg_values_supported:k(T()).optional()}),Wf=j({issuer:T(),authorization_endpoint:Vf,token_endpoint:Vf,userinfo_endpoint:Vf.optional(),jwks_uri:Vf,registration_endpoint:Vf.optional(),scopes_supported:k(T()).optional(),response_types_supported:k(T()),response_modes_supported:k(T()).optional(),grant_types_supported:k(T()).optional(),acr_values_supported:k(T()).optional(),subject_types_supported:k(T()),id_token_signing_alg_values_supported:k(T()),id_token_encryption_alg_values_supported:k(T()).optional(),id_token_encryption_enc_values_supported:k(T()).optional(),userinfo_signing_alg_values_supported:k(T()).optional(),userinfo_encryption_alg_values_supported:k(T()).optional(),userinfo_encryption_enc_values_supported:k(T()).optional(),request_object_signing_alg_values_supported:k(T()).optional(),request_object_encryption_alg_values_supported:k(T()).optional(),request_object_encryption_enc_values_supported:k(T()).optional(),token_endpoint_auth_methods_supported:k(T()).optional(),token_endpoint_auth_signing_alg_values_supported:k(T()).optional(),display_values_supported:k(T()).optional(),claim_types_supported:k(T()).optional(),claims_supported:k(T()).optional(),service_documentation:T().optional(),claims_locales_supported:k(T()).optional(),ui_locales_supported:k(T()).optional(),claims_parameter_supported:D().optional(),request_parameter_supported:D().optional(),request_uri_parameter_supported:D().optional(),require_request_uri_registration:D().optional(),op_policy_uri:Vf.optional(),op_tos_uri:Vf.optional(),client_id_metadata_document_supported:D().optional(),authorization_response_iss_parameter_supported:D().optional().catch(void 0)}),Gf=A({...Wf.shape,...Uf.pick({code_challenge_methods_supported:!0}).shape}),Kf=A({access_token:T(),id_token:T().optional(),token_type:T(),expires_in:El().optional(),scope:T().optional(),refresh_token:T().optional(),issuer:T().optional().catch(void 0)}).strip(),qf=A({issued_token_type:F(`urn:ietf:params:oauth:token-type:id-jag`),access_token:T(),token_type:T().optional(),expires_in:E().optional(),scope:T().optional()}).strip(),Jf=A({error:T(),error_description:T().optional(),error_uri:T().optional()}),Yf=Vf.optional().or(F(``).transform(()=>void 0)),Xf=A({redirect_uris:k(Vf),token_endpoint_auth_method:T().optional(),grant_types:k(T()).optional(),response_types:k(T()).optional(),application_type:T().optional(),client_name:T().optional(),client_uri:Vf.optional(),logo_uri:Yf,scope:T().optional(),contacts:k(T()).optional(),tos_uri:Yf,policy_uri:T().optional(),jwks_uri:Vf.optional(),jwks:Ic().optional(),software_id:T().optional(),software_version:T().optional(),software_statement:T().optional()}).strip(),Zf=A({client_id:T(),client_secret:T().optional(),client_id_issued_at:E().optional(),client_secret_expires_at:E().optional(),issuer:T().optional().catch(void 0)}).strip(),Qf=Xf.merge(Zf),$f=A({error:T(),error_description:T().optional()}).strip(),ep=A({token:T(),token_type_hint:T().optional()}).strip(),tp=Symbol.for(`mcp.sdk.errorBrands`);function np(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,tp,{value:n,enumerable:!1,configurable:!0})}function rp(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,tp)){let n=t[tp];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,np(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});var R=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}({}),z=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,np(this,new.target)}},ip=class extends z{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}},ap=`2026-07-28`,op=[ap];function sp(e){return e>=ap}function cp(e){return e.filter(e=>!sp(e))}function lp(e){return e.filter(e=>sp(e))}function up(e){let t=e.structuredContent;return t===void 0||!(typeof t!=`object`||!t||Array.isArray(t))||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var dp=[`task`,`inputRequests`,`requestState`];function fp(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||dp.some(t=>t in e)?e:{...e,content:[]}}function pp(){let e=_l(()=>M([T(),E(),D(),Pc(),N(T(),e),k(e)])),t=N(T(),e),n=M([T(),E().int()]),r=T(),i=A({ttl:E().optional()}),a=A({taskId:T()}),o=j({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=A({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=A({method:T(),params:s.loose().optional()}),u=A({_meta:o.optional()}),d=A({method:T(),params:u.loose().optional()}),f=j({_meta:o.optional()}),p=M([T(),E().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:T().optional()}),g=d.extend({method:F(`notifications/cancelled`),params:h}),_=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),v=A({icons:k(_).optional()}),y=A({name:T(),title:T().optional()}),ee=y.extend({...y.shape,...v.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),te=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),t).optional(),url:t.optional()}),t.optional())),ne=j({list:t.optional(),cancel:t.optional(),requests:j({sampling:j({createMessage:t.optional()}).optional(),elicitation:j({create:t.optional()}).optional()}).optional()}),re=j({list:t.optional(),cancel:t.optional(),requests:j({tools:j({call:t.optional()}).optional()}).optional()}),ie=A({experimental:N(T(),t).optional(),sampling:A({context:t.optional(),tools:t.optional()}).optional(),elicitation:te.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:ne.optional(),extensions:N(T(),t).optional()}),ae=s.extend({protocolVersion:T(),capabilities:ie,clientInfo:ee}),oe=l.extend({method:F(`initialize`),params:ae}),se=A({experimental:N(T(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:re.optional(),extensions:N(T(),t).optional()}),ce=f.extend({protocolVersion:T(),capabilities:se,serverInfo:ee,instructions:T().optional()}),le=d.extend({method:F(`notifications/initialized`),params:u.optional()}),ue=l.extend({method:F(`ping`),params:s.optional()}),de=A({progress:E(),total:I(E()),message:I(T())}),fe=A({...u.shape,...de.shape,progressToken:n}),pe=d.extend({method:F(`notifications/progress`),params:fe}),b=s.extend({cursor:r.optional()}),me=l.extend({params:b.optional()}),he=f.extend({nextCursor:r.optional()}),ge=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),_e=ge.extend({text:T()}),ve=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ye=ge.extend({blob:ve}),be=P([`user`,`assistant`]),xe=A({audience:k(be).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),Se=A({...y.shape,...v.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:xe.optional(),_meta:I(j({}))}),Ce=A({...y.shape,...v.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:xe.optional(),_meta:I(j({}))}),we=me.extend({method:F(`resources/list`)}),Te=he.extend({resources:k(Se)}),Ee=me.extend({method:F(`resources/templates/list`)}),De=he.extend({resourceTemplates:k(Ce)}),x=s.extend({uri:T()}),Oe=x,ke=l.extend({method:F(`resources/read`),params:Oe}),Ae=f.extend({contents:k(M([_e,ye]))}),je=d.extend({method:F(`notifications/resources/list_changed`),params:u.optional()}),Me=x,Ne=l.extend({method:F(`resources/subscribe`),params:Me}),S=x,Pe=l.extend({method:F(`resources/unsubscribe`),params:S}),Fe=u.extend({uri:T()}),Ie=d.extend({method:F(`notifications/resources/updated`),params:Fe}),Le=A({name:T(),description:I(T()),required:I(D())}),Re=A({...y.shape,...v.shape,description:I(T()),arguments:I(k(Le)),_meta:I(j({}))}),ze=me.extend({method:F(`prompts/list`)}),Be=he.extend({prompts:k(Re)}),Ve=s.extend({name:T(),arguments:N(T(),T()).optional()}),He=l.extend({method:F(`prompts/get`),params:Ve}),Ue=A({type:F(`text`),text:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),We=A({type:F(`image`),data:ve,mimeType:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Ge=A({type:F(`audio`),data:ve,mimeType:T(),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Ke=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),qe=A({type:F(`resource`),resource:M([_e,ye]),annotations:xe.optional(),_meta:N(T(),O()).optional()}),Je=Se.extend({type:F(`resource_link`)}),Ye=M([Ue,We,Ge,Je,qe]),Xe=A({role:be,content:Ye}),Ze=f.extend({description:T().optional(),messages:k(Xe)}),Qe=d.extend({method:F(`notifications/prompts/list_changed`),params:u.optional()}),$e=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),et=A({taskSupport:P([`required`,`optional`,`forbidden`]).optional()}),tt=A({...y.shape,...v.shape,description:T().optional(),inputSchema:A({type:F(`object`),properties:N(T(),e).optional(),required:k(T()).optional()}).catchall(O()),outputSchema:A({type:F(`object`),properties:N(T(),e).optional(),required:k(T()).optional()}).catchall(O()).optional(),annotations:$e.optional(),execution:et.optional(),_meta:N(T(),O()).optional()}),nt=me.extend({method:F(`tools/list`)}),rt=he.extend({tools:k(tt)}),it=f.extend({content:k(Ye),structuredContent:N(T(),O()).optional(),isError:D().optional()}),at=c.extend({name:T(),arguments:N(T(),O()).optional()}),ot=l.extend({method:F(`tools/call`),params:at}),st=d.extend({method:F(`notifications/tools/list_changed`),params:u.optional()}),ct=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),lt=s.extend({level:ct}),ut=l.extend({method:F(`logging/setLevel`),params:lt}),dt=u.extend({level:ct,logger:T().optional(),data:O()}),ft=d.extend({method:F(`notifications/message`),params:dt}),pt=A({name:T().optional()}),mt=A({hints:k(pt).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),ht=A({mode:P([`auto`,`required`,`none`]).optional()}),C=A({type:F(`tool_result`),toolUseId:T().describe(`The unique identifier for the corresponding tool call.`),content:k(Ye),structuredContent:A({}).loose().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),gt=Wc(`type`,[Ue,We,Ge]),_t=Wc(`type`,[Ue,We,Ge,Ke,C]),vt=A({role:be,content:M([_t,k(_t)]),_meta:N(T(),O()).optional()}),yt=c.extend({messages:k(vt),modelPreferences:mt.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:t.optional(),tools:k(tt).optional(),toolChoice:ht.optional()}),bt=l.extend({method:F(`sampling/createMessage`),params:yt}),xt=f.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`]).or(T())),role:be,content:gt}),St=f.extend({model:T(),stopReason:I(P([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(T())),role:be,content:M([_t,k(_t)])}),Ct=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),wt=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),Tt=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Et=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Dt=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Ot=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),kt=M([Et,Dt]),At=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),jt=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),Mt=M([At,jt]),Nt=M([Ot,kt,Mt]),Pt=M([Nt,Ct,wt,Tt]),Ft=c.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),Pt),required:k(T()).optional()}).catchall(O())}),It=c.extend({mode:F(`url`),message:T(),elicitationId:T(),url:T().url()}),Lt=M([Ft,It]),Rt=l.extend({method:F(`elicitation/create`),params:Lt}),zt=u.extend({elicitationId:T()}),Bt=d.extend({method:F(`notifications/elicitation/complete`),params:zt}),Vt=f.extend({action:P([`accept`,`decline`,`cancel`]),content:xl(e=>e===null?void 0:e,N(T(),M([T(),E(),D(),k(T())])).optional())}),Ht=A({type:F(`ref/resource`),uri:T()}),Ut=A({type:F(`ref/prompt`),name:T()}),Wt=s.extend({ref:M([Ut,Ht]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()}),Gt=l.extend({method:F(`completion/complete`),params:Wt}),Kt=f.extend({completion:j({values:k(T()).max(100),total:I(E().int()),hasMore:I(D())})}),qt=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),Jt=l.extend({method:F(`roots/list`),params:s.optional()}),Yt=f.extend({roots:k(qt)}),Xt=d.extend({method:F(`notifications/roots/list_changed`),params:u.optional()}),Zt=j({ttl:E().optional(),pollInterval:E().optional()}),Qt=P([`working`,`input_required`,`completed`,`failed`,`cancelled`]),$t=A({taskId:T(),status:Qt,ttl:M([E(),Pc()]),createdAt:T(),lastUpdatedAt:T(),pollInterval:I(E()),statusMessage:I(T())}),en=f.extend({task:$t}),tn=u.merge($t),nn=d.extend({method:F(`notifications/tasks/status`),params:tn}),rn=l.extend({method:F(`tasks/get`),params:s.extend({taskId:T()})}),an=f.merge($t),on=l.extend({method:F(`tasks/result`),params:s.extend({taskId:T()})}),sn=f.loose(),cn=me.extend({method:F(`tasks/list`)}),ln=he.extend({tasks:k($t)}),un=l.extend({method:F(`tasks/cancel`),params:s.extend({taskId:T()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:_,IconsSchema:v,BaseMetadataSchema:y,ImplementationSchema:ee,ClientTasksCapabilitySchema:ne,ServerTasksCapabilitySchema:re,ClientCapabilitiesSchema:ie,InitializeRequestParamsSchema:ae,InitializeRequestSchema:oe,ServerCapabilitiesSchema:se,InitializeResultSchema:ce,InitializedNotificationSchema:le,PingRequestSchema:ue,ProgressSchema:de,ProgressNotificationParamsSchema:fe,ProgressNotificationSchema:pe,PaginatedRequestParamsSchema:b,PaginatedRequestSchema:me,PaginatedResultSchema:he,ResourceContentsSchema:ge,TextResourceContentsSchema:_e,BlobResourceContentsSchema:ye,RoleSchema:be,AnnotationsSchema:xe,ResourceSchema:Se,ResourceTemplateSchema:Ce,ListResourcesRequestSchema:we,ListResourcesResultSchema:Te,ListResourceTemplatesRequestSchema:Ee,ListResourceTemplatesResultSchema:De,ResourceRequestParamsSchema:x,ReadResourceRequestParamsSchema:Oe,ReadResourceRequestSchema:ke,ReadResourceResultSchema:Ae,ResourceListChangedNotificationSchema:je,SubscribeRequestParamsSchema:Me,SubscribeRequestSchema:Ne,UnsubscribeRequestParamsSchema:S,UnsubscribeRequestSchema:Pe,ResourceUpdatedNotificationParamsSchema:Fe,ResourceUpdatedNotificationSchema:Ie,PromptArgumentSchema:Le,PromptSchema:Re,ListPromptsRequestSchema:ze,ListPromptsResultSchema:Be,GetPromptRequestParamsSchema:Ve,GetPromptRequestSchema:He,TextContentSchema:Ue,ImageContentSchema:We,AudioContentSchema:Ge,ToolUseContentSchema:Ke,EmbeddedResourceSchema:qe,ResourceLinkSchema:Je,ContentBlockSchema:Ye,PromptMessageSchema:Xe,GetPromptResultSchema:Ze,PromptListChangedNotificationSchema:Qe,ToolAnnotationsSchema:$e,ToolExecutionSchema:et,ToolSchema:tt,ListToolsRequestSchema:nt,ListToolsResultSchema:rt,CallToolResultSchema:it,CallToolRequestParamsSchema:at,CallToolRequestSchema:ot,ToolListChangedNotificationSchema:st,LoggingLevelSchema:ct,SetLevelRequestParamsSchema:lt,SetLevelRequestSchema:ut,LoggingMessageNotificationParamsSchema:dt,LoggingMessageNotificationSchema:ft,ModelHintSchema:pt,ModelPreferencesSchema:mt,ToolChoiceSchema:ht,ToolResultContentSchema:C,SamplingContentSchema:gt,SamplingMessageContentBlockSchema:_t,SamplingMessageSchema:vt,CreateMessageRequestParamsSchema:yt,CreateMessageRequestSchema:bt,CreateMessageResultSchema:xt,CreateMessageResultWithToolsSchema:St,BooleanSchemaSchema:Ct,StringSchemaSchema:wt,NumberSchemaSchema:Tt,UntitledSingleSelectEnumSchemaSchema:Et,TitledSingleSelectEnumSchemaSchema:Dt,LegacyTitledEnumSchemaSchema:Ot,SingleSelectEnumSchemaSchema:kt,UntitledMultiSelectEnumSchemaSchema:At,TitledMultiSelectEnumSchemaSchema:jt,MultiSelectEnumSchemaSchema:Mt,EnumSchemaSchema:Nt,PrimitiveSchemaDefinitionSchema:Pt,ElicitRequestFormParamsSchema:Ft,ElicitRequestURLParamsSchema:It,ElicitRequestParamsSchema:Lt,ElicitRequestSchema:Rt,ElicitationCompleteNotificationParamsSchema:zt,ElicitationCompleteNotificationSchema:Bt,ElicitResultSchema:Vt,ResourceTemplateReferenceSchema:Ht,PromptReferenceSchema:Ut,CompleteRequestParamsSchema:Wt,CompleteRequestSchema:Gt,CompleteResultSchema:Kt,RootSchema:qt,ListRootsRequestSchema:Jt,ListRootsResultSchema:Yt,RootsListChangedNotificationSchema:Xt,TaskCreationParamsSchema:Zt,TaskStatusSchema:Qt,TaskSchema:$t,CreateTaskResultSchema:en,TaskStatusNotificationParamsSchema:tn,TaskStatusNotificationSchema:nn,GetTaskRequestSchema:rn,GetTaskResultSchema:an,GetTaskPayloadRequestSchema:on,GetTaskPayloadResultSchema:sn,ListTasksRequestSchema:cn,ListTasksResultSchema:ln,CancelTaskRequestSchema:un,CancelTaskResultSchema:f.merge($t),ClientRequestSchema:M([ue,oe,Gt,ut,He,ze,we,Ee,ke,Ne,Pe,ot,nt,rn,on,cn,un]),ClientNotificationSchema:M([g,pe,le,Xt,nn]),ClientResultSchema:M([m,xt,St,Vt,Yt,an,ln,en]),ServerRequestSchema:M([ue,bt,Rt,Jt,rn,on,cn,un]),ServerNotificationSchema:M([g,pe,ft,Ie,je,st,Qe,nn,Bt]),ServerResultSchema:M([m,ce,Kt,Ze,Be,Te,De,Ae,it,rt,an,ln,en]),CallToolResultWireSchema:O().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of dp)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries \'${n}\' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(fp).pipe(it)}}var mp;function hp(){return mp??=pp()}function gp(e){return e.type!==`object`}var _p=new Set([`const`,`enum`,`default`,`examples`]),vp=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function yp(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function bp(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(yp(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=y(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&yp(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:_p.has(o)?i[o]=s:vp.has(o)?i[o]=r(s,!0):i[o]=r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var xp={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},Sp={"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},Cp={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},wp;function Tp(){if(wp)return wp;let e=hp();return wp={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}},wp}function Ep(e){return Object.prototype.hasOwnProperty.call(xp,e)}function Dp(e){return Object.prototype.hasOwnProperty.call(Sp,e)}function Op(e){return Object.prototype.hasOwnProperty.call(Cp,e)}function kp(e){return Op(e)?Tp().resultSchemas[e]:void 0}function Ap(e){return Ep(e)?Tp().requestSchemas[e]:void 0}function jp(e){return Dp(e)?Tp().notificationSchemas[e]:void 0}Object.keys(xp),Object.keys(Sp);function Mp(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Np(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 Pp={ok:!1,reason:`not-in-era`};function Fp(e){return Mp(e)&&Mp(e.outputSchema)&&gp(e.outputSchema)}function Ip(e){return e}var Lp={era:`2025-11-25`,hasRequestMethod:Ep,hasNotificationMethod:Dp,validateRequest:(e,t)=>Np(Ap(e),t),validateResult:(e,t)=>Np(kp(e),t),validateNotification:(e,t)=>Np(jp(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>Pp,validateInputResponse:()=>Pp,samplingResultVariant:((e,t)=>{let n=hp();return Np(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=up(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&gp(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(Mp(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:Ip(e)}}return{kind:`complete`,result:Ip(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>Fp(e))?t:{...t,tools:n.map(e=>Fp(e)?{...e,outputSchema:bp(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function Rp(){let e=_l(()=>M([T(),E(),D(),Pc(),N(T(),e),k(e)])),t=N(T(),e),n=M([T(),E().int()]),r=T(),i=M([T(),E().int()]),a=P([`user`,`assistant`]),o=P([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=T().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=A({ttl:E().optional()}),l=A({taskId:T()}),u=j({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=A({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=A({_meta:u.optional()}),m=A({method:T(),params:p.loose().optional()}),h=A({src:T(),mimeType:T().optional(),sizes:k(T()).optional(),theme:P([`light`,`dark`]).optional()}),g=A({icons:k(h).optional()}),_=A({name:T(),title:T().optional()}),v=_.extend({..._.shape,...g.shape,version:T(),websiteUrl:T().optional(),description:T().optional()}),y=xl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Kc(A({form:Kc(A({applyDefaults:D().optional()}),t).optional(),url:t.optional()}),t.optional())),ee=j({list:t.optional(),cancel:t.optional(),requests:j({sampling:j({createMessage:t.optional()}).optional(),elicitation:j({create:t.optional()}).optional()}).optional()}),te=j({list:t.optional(),cancel:t.optional(),requests:j({tools:j({call:t.optional()}).optional()}).optional()}),ne=A({experimental:N(T(),t).optional(),sampling:A({context:t.optional(),tools:t.optional()}).optional(),elicitation:y.optional(),roots:A({listChanged:D().optional()}).optional(),tasks:ee.optional(),extensions:N(T(),t).optional()}),re=A({experimental:N(T(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:A({listChanged:D().optional()}).optional(),resources:A({subscribe:D().optional(),listChanged:D().optional()}).optional(),tools:A({listChanged:D().optional()}).optional(),tasks:te.optional(),extensions:N(T(),t).optional()}),ie=A({progress:E(),total:I(E()),message:I(T())}),ae=A({...p.shape,...ie.shape,progressToken:n}),oe=m.extend({method:F(`notifications/progress`),params:ae}),se=p.extend({level:o,logger:T().optional(),data:O()}),ce=m.extend({method:F(`notifications/message`),params:se}),le=A({uri:T(),mimeType:I(T()),_meta:N(T(),O()).optional()}),ue=le.extend({text:T()}),de=le.extend({blob:s}),fe=A({audience:k(a).optional(),priority:E().min(0).max(1).optional(),lastModified:wl({offset:!0}).optional()}),pe=A({..._.shape,...g.shape,uri:T(),description:I(T()),mimeType:I(T()),size:I(E()),annotations:fe.optional(),_meta:I(j({}))}),b=A({..._.shape,...g.shape,uriTemplate:T(),description:I(T()),mimeType:I(T()),annotations:fe.optional(),_meta:I(j({}))}),me=m.extend({method:F(`notifications/resources/list_changed`),params:p.optional()}),he=p.extend({uri:T()}),ge=m.extend({method:F(`notifications/resources/updated`),params:he}),_e=A({name:T(),description:I(T()),required:I(D())}),ve=A({..._.shape,...g.shape,description:I(T()),arguments:I(k(_e)),_meta:I(j({}))}),ye=m.extend({method:F(`notifications/prompts/list_changed`),params:p.optional()}),be=A({type:F(`text`),text:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),xe=A({type:F(`image`),data:s,mimeType:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Se=A({type:F(`audio`),data:s,mimeType:T(),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Ce=A({type:F(`tool_use`),name:T(),id:T(),input:N(T(),O()),_meta:N(T(),O()).optional()}),we=A({type:F(`resource`),resource:M([ue,de]),annotations:fe.optional(),_meta:N(T(),O()).optional()}),Te=pe.extend({type:F(`resource_link`)}),Ee=M([be,xe,Se,Te,we]),De=A({role:a,content:Ee}),x=A({title:T().optional(),readOnlyHint:D().optional(),destructiveHint:D().optional(),idempotentHint:D().optional(),openWorldHint:D().optional()}),Oe=m.extend({method:F(`notifications/tools/list_changed`),params:p.optional()}),ke=A({name:T().optional()}),Ae=A({hints:k(ke).optional(),costPriority:E().min(0).max(1).optional(),speedPriority:E().min(0).max(1).optional(),intelligencePriority:E().min(0).max(1).optional()}),je=A({mode:P([`auto`,`required`,`none`]).optional()}),Me=A({type:F(`boolean`),title:T().optional(),description:T().optional(),default:D().optional()}),Ne=A({type:F(`string`),title:T().optional(),description:T().optional(),minLength:E().optional(),maxLength:E().optional(),format:P([`email`,`uri`,`date`,`date-time`]).optional(),default:T().optional()}),S=A({type:P([`number`,`integer`]),title:T().optional(),description:T().optional(),minimum:E().optional(),maximum:E().optional(),default:E().optional()}),Pe=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),default:T().optional()}),Fe=A({type:F(`string`),title:T().optional(),description:T().optional(),oneOf:k(A({const:T(),title:T()})),default:T().optional()}),Ie=A({type:F(`string`),title:T().optional(),description:T().optional(),enum:k(T()),enumNames:k(T()).optional(),default:T().optional()}),Le=M([Pe,Fe]),Re=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({type:F(`string`),enum:k(T())}),default:k(T()).optional()}),ze=A({type:F(`array`),title:T().optional(),description:T().optional(),minItems:E().optional(),maxItems:E().optional(),items:A({anyOf:k(A({const:T(),title:T()}))}),default:k(T()).optional()}),Be=M([Re,ze]),Ve=M([Ie,Le,Be]),He=M([Ve,Me,Ne,S]),Ue=f.extend({mode:F(`form`).optional(),message:T(),requestedSchema:A({type:F(`object`),properties:N(T(),He),required:k(T()).optional()}).catchall(O())}),We=A({type:F(`ref/resource`),uri:T()}),Ge=A({type:F(`ref/prompt`),name:T()}),Ke=A({uri:T().startsWith(`file://`),name:T().optional(),_meta:N(T(),O()).optional()}),qe=ne.shape,Je=A({experimental:qe.experimental,sampling:qe.sampling,elicitation:qe.elicitation,roots:qe.roots,extensions:qe.extensions}),Ye=re.shape,Xe=A({experimental:Ye.experimental,logging:Ye.logging,completions:Ye.completions,prompts:Ye.prompts,resources:Ye.resources,tools:Ye.tools,extensions:Ye.extensions}),Ze=j({progressToken:n.optional(),[kl]:T(),[Al]:v.optional(),[Ml]:Je,[Pl]:o.optional()}),Qe=A({..._.shape,...g.shape,description:T().optional(),inputSchema:j({$schema:T().optional(),type:F(`object`)}),outputSchema:j({$schema:T().optional()}).optional(),annotations:x.optional(),_meta:N(T(),O()).optional()}),$e=A({type:F(`tool_result`),toolUseId:T(),content:k(Ee),structuredContent:O().optional(),isError:D().optional(),_meta:N(T(),O()).optional()}),et=M([be,xe,Se,Ce,$e]),tt=A({role:a,content:M([et,k(et)]),_meta:N(T(),O()).optional()}),nt=T(),rt=j({[jl]:v.optional().catch(void 0)}),it=rt.optional();function at(e){return j({_meta:it,resultType:nt.default(`complete`),...e})}let ot=at({}),st=at({nextCursor:r.optional()}),ct=at({content:k(Ee),structuredContent:O().optional(),isError:D().optional()}),lt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),tools:k(Qe),nextCursor:r.optional()}),ut=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),prompts:k(ve),nextCursor:r.optional()}),dt=at({description:T().optional(),messages:k(De)}),ft=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resources:k(pe),nextCursor:r.optional()}),pt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resourceTemplates:k(b),nextCursor:r.optional()}),mt=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),contents:k(M([ue,de]))}),ht=at({completion:A({values:k(T()).max(100),total:E().int().optional(),hasMore:D().optional()}).loose()}),C=at({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`])}),gt=at({ttlMs:E().int().min(0).catch(0),cacheScope:P([`public`,`private`]).catch(`private`),supportedVersions:k(T()),capabilities:Xe,instructions:T().optional()}),_t=A({messages:k(tt),modelPreferences:Ae.optional(),systemPrompt:T().optional(),includeContext:P([`none`,`thisServer`,`allServers`]).optional(),temperature:E().optional(),maxTokens:E().int(),stopSequences:k(T()).optional(),metadata:t.optional(),tools:k(Qe).optional(),toolChoice:je.optional()}),vt=A({method:F(`sampling/createMessage`),params:_t}),yt=A({method:F(`roots/list`),params:A({_meta:N(T(),O()).optional()}).optional()}),bt=A({...tt.shape,model:T(),stopReason:T().optional()}),xt=A({roots:k(Ke)}),St=A({action:P([`accept`,`decline`,`cancel`]),content:N(T(),M([T(),E(),D(),k(T())])).optional()}),Ct=A({mode:F(`url`),message:T(),url:T().url()}),wt=M([Ue,Ct]),Tt=A({method:F(`elicitation/create`),params:wt}),Et=M([vt,yt,Tt]),Dt=M([bt,xt,St]),Ot=N(T(),Et),kt=N(T(),Dt),At=at({inputRequests:Ot.optional(),requestState:T().optional()}),jt={inputResponses:kt.optional(),requestState:T().optional()},Mt=A({_meta:Ze,...jt}),Nt=j({progressToken:n.optional()});function Pt(e,t){return A({method:F(e),params:A({_meta:Ze,...t})})}function Ft(e,t){return A({method:F(e),params:A({_meta:Nt.optional(),...t}).optional()})}let It={name:T(),arguments:N(T(),O()).optional(),...jt},Lt={cursor:r.optional()},Rt=Pt(`tools/call`,It),zt=Pt(`tools/list`,Lt),Bt=Pt(`prompts/list`,Lt),Vt=Pt(`prompts/get`,{name:T(),arguments:N(T(),T()).optional(),...jt}),Ht=Pt(`resources/list`,Lt),Ut=Pt(`resources/templates/list`,Lt),Wt=Pt(`resources/read`,{uri:T(),...jt}),Gt={ref:M([Ge,We]),argument:A({name:T(),value:T()}),context:A({arguments:N(T(),T()).optional()}).optional()},Kt=Pt(`completion/complete`,Gt),qt=Pt(`server/discover`,{}),Jt=A({toolsListChanged:D().optional(),promptsListChanged:D().optional(),resourcesListChanged:D().optional(),resourceSubscriptions:k(T()).optional()}),Yt={notifications:Jt},Xt=Pt(`subscriptions/listen`,Yt),Zt=rt.extend({"io.modelcontextprotocol/subscriptionId":i}),Qt=j({_meta:Zt,resultType:nt.default(`complete`)}),$t={"tools/call":Ft(`tools/call`,It),"tools/list":Ft(`tools/list`,Lt),"prompts/get":Ft(`prompts/get`,{name:T(),arguments:N(T(),T()).optional()}),"prompts/list":Ft(`prompts/list`,Lt),"resources/list":Ft(`resources/list`,Lt),"resources/templates/list":Ft(`resources/templates/list`,Lt),"resources/read":Ft(`resources/read`,{uri:T()}),"completion/complete":Ft(`completion/complete`,Gt),"server/discover":Ft(`server/discover`,{}),"subscriptions/listen":Ft(`subscriptions/listen`,Yt)};function en(e){return j({_meta:it,...e})}let tn={"tools/call":en({content:k(Ee),structuredContent:O().optional(),isError:D().optional()}),"tools/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),tools:k(Qe),nextCursor:r.optional()}),"prompts/get":en({description:T().optional(),messages:k(De)}),"prompts/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),prompts:k(ve),nextCursor:r.optional()}),"resources/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resources:k(pe),nextCursor:r.optional()}),"resources/templates/list":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),resourceTemplates:k(b),nextCursor:r.optional()}),"resources/read":en({ttlMs:E().int().min(0),cacheScope:P([`public`,`private`]),contents:k(M([ue,de]))}),"completion/complete":en({completion:A({values:k(T()).max(100),total:E().int().optional(),hasMore:D().optional()}).loose()}),"server/discover":en({ttlMs:E().int().min(0).catch(0),cacheScope:P([`public`,`private`]).catch(`private`),supportedVersions:k(T()),capabilities:Xe,instructions:T().optional()}),"subscriptions/listen":en({})},nn=j({"io.modelcontextprotocol/subscriptionId":i.optional()}),rn=A({method:F(`notifications/subscriptions/acknowledged`),params:A({_meta:nn.optional(),notifications:Jt})}),an=A({_meta:nn.optional(),requestId:i,reason:T().optional()}),on=A({method:F(`notifications/cancelled`),params:an}),sn={"notifications/cancelled":on,"notifications/progress":oe,"notifications/message":ce,"notifications/resources/updated":ge,"notifications/resources/list_changed":me,"notifications/tools/list_changed":Oe,"notifications/prompts/list_changed":ye,"notifications/subscriptions/acknowledged":rn},cn=e=>A({jsonrpc:F(`2.0`),id:M([T(),E().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:_,ImplementationSchema:v,ClientTasksCapabilitySchema:ee,ServerTasksCapabilitySchema:te,ClientCapabilitiesSchema:ne,ServerCapabilitiesSchema:re,ProgressSchema:ie,ProgressNotificationParamsSchema:ae,ProgressNotificationSchema:oe,LoggingMessageNotificationParamsSchema:se,LoggingMessageNotificationSchema:ce,ResourceContentsSchema:le,TextResourceContentsSchema:ue,BlobResourceContentsSchema:de,AnnotationsSchema:fe,ResourceSchema:pe,ResourceTemplateSchema:b,ResourceListChangedNotificationSchema:me,ResourceUpdatedNotificationParamsSchema:he,ResourceUpdatedNotificationSchema:ge,PromptArgumentSchema:_e,PromptSchema:ve,PromptListChangedNotificationSchema:ye,TextContentSchema:be,ImageContentSchema:xe,AudioContentSchema:Se,ToolUseContentSchema:Ce,EmbeddedResourceSchema:we,ResourceLinkSchema:Te,ContentBlockSchema:Ee,PromptMessageSchema:De,ToolAnnotationsSchema:x,ToolListChangedNotificationSchema:Oe,ModelHintSchema:ke,ModelPreferencesSchema:Ae,ToolChoiceSchema:je,BooleanSchemaSchema:Me,StringSchemaSchema:Ne,NumberSchemaSchema:S,UntitledSingleSelectEnumSchemaSchema:Pe,TitledSingleSelectEnumSchemaSchema:Fe,LegacyTitledEnumSchemaSchema:Ie,SingleSelectEnumSchemaSchema:Le,UntitledMultiSelectEnumSchemaSchema:Re,TitledMultiSelectEnumSchemaSchema:ze,MultiSelectEnumSchemaSchema:Be,EnumSchemaSchema:Ve,PrimitiveSchemaDefinitionSchema:He,ElicitRequestFormParamsSchema:Ue,ResourceTemplateReferenceSchema:We,PromptReferenceSchema:Ge,RootSchema:Ke,ClientCapabilities2026Schema:Je,ServerCapabilities2026Schema:Xe,RequestMetaEnvelopeSchema:Ze,ToolSchema:Qe,ToolResultContentSchema:$e,SamplingMessageContentBlockSchema:et,SamplingMessageSchema:tt,ResultTypeSchema:nt,ResultMetaSchema:rt,ResultSchema:ot,PaginatedResultSchema:st,CallToolResultSchema:ct,ListToolsResultSchema:lt,ListPromptsResultSchema:ut,GetPromptResultSchema:dt,ListResourcesResultSchema:ft,ListResourceTemplatesResultSchema:pt,ReadResourceResultSchema:mt,CompleteResultSchema:ht,CacheableResultSchema:C,DiscoverResultSchema:gt,CreateMessageRequestParamsSchema:_t,CreateMessageRequestSchema:vt,ListRootsRequestSchema:yt,CreateMessageResultSchema:bt,ListRootsResultSchema:xt,ElicitResultSchema:St,ElicitRequestURLParamsSchema:Ct,ElicitRequestParamsSchema:wt,ElicitRequestSchema:Tt,InputRequestSchema:Et,InputResponseSchema:Dt,InputRequestsSchema:Ot,InputResponsesSchema:kt,InputRequiredResultSchema:At,InputResponseRequestParamsSchema:Mt,CallToolRequestSchema:Rt,ListToolsRequestSchema:zt,ListPromptsRequestSchema:Bt,GetPromptRequestSchema:Vt,ListResourcesRequestSchema:Ht,ListResourceTemplatesRequestSchema:Ut,ReadResourceRequestSchema:Wt,CompleteRequestSchema:Kt,DiscoverRequestSchema:qt,SubscriptionFilterSchema:Jt,SubscriptionsListenRequestSchema:Xt,SubscriptionsListenResultMetaSchema:Zt,SubscriptionsListenResultSchema:Qt,dispatchRequestSchemas:$t,dispatchResultSchemas:tn,NotificationMetaSchema:nn,SubscriptionsAcknowledgedNotificationSchema:rn,CancelledNotificationParamsSchema:an,CancelledNotificationSchema:on,notificationSchemas2026:sn,JSONRPCResultResponseSchema:cn(ot),CallToolResultResponseSchema:cn(M([ct,At])),ListToolsResultResponseSchema:cn(lt),ListPromptsResultResponseSchema:cn(ut),GetPromptResultResponseSchema:cn(M([dt,At])),ListResourcesResultResponseSchema:cn(ft),ListResourceTemplatesResultResponseSchema:cn(pt),ReadResourceResultResponseSchema:cn(M([mt,At])),CompleteResultResponseSchema:cn(ht),DiscoverResultResponseSchema:cn(gt),SubscriptionsListenResultResponseSchema:cn(Qt)}}var zp;function Bp(){return zp??=Rp()}var Vp=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function Hp(e){return Vp.includes(e)}var Up=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Wp(e){return e[Up]}function Gp(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function Kp(e){return e===`public`||e===`private`}var B=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}({}),qp=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,np(this,new.target)}static fromError(t,n,r){if(t===B.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Yp(e.elicitations,n)}if(t===B.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Xp({supported:e.supported,requested:e.requested},n)}if(t===B.InvalidParams||t===B.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===B.ResourceNotFound||Object.keys(e).length===1))return new Jp(e.uri,n)}if(t===B.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Zp({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Jp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ResourceNotFoundError`})}constructor(e,t=`Resource not found: ${e}`){super(B.InvalidParams,t,{uri:e})}get uri(){return this.data.uri}},Yp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UrlElicitationRequiredError`})}constructor(e,t=`URL elicitation${e.length>1?`s`:``} required`){super(B.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}},Xp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnsupportedProtocolVersionError`})}constructor(e,t=`Unsupported protocol version: ${e.requested}`){super(B.UnsupportedProtocolVersion,t,e)}get supported(){return this.data.supported}get requested(){return this.data.requested}},Zp=class extends qp{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.MissingRequiredClientCapabilityError`})}constructor(e,t=`Missing required client capabilities: ${Object.keys(e.requiredCapabilities).join(`, `)}`){super(B.MissingRequiredClientCapability,t,e)}get requiredCapabilities(){return this.data.requiredCapabilities}},Qp=0,$p=`private`,em=[`tools/call`,`prompts/get`,`resources/read`];function tm(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||em.includes(e))return t;throw new qp(B.InternalError,`Handler for ${e} returned resultType \'${String(n)}\', but results of ${e} only support \'complete\' on protocol revision 2026-07-28`)}function nm(e,t){let n=Wp(t);if(t.resultType!==`complete`||!Hp(e))return n===void 0?t:sm(t);let r=t,i=Gp(r.ttlMs)?r.ttlMs:am(n),a=Kp(r.cacheScope)?r.cacheScope:om(n),o={...r,ttlMs:i,cacheScope:a};return delete o[Up],o}function rm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function im(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[jl]:t}}:!rm(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[jl]:t}}}function am(e){return e!==void 0&&Gp(e.ttlMs)?e.ttlMs:Qp}function om(e){return e!==void 0&&Kp(e.cacheScope)?e.cacheScope:$p}function sm(e){let t={...e};return delete t[Up],t}var cm=[`elicitation/create`,`sampling/createMessage`,`roots/list`],lm;function um(){if(lm)return lm;let e=Bp();return lm={request:{"elicitation/create":A({method:F(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":A({method:F(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":A({method:F(`roots/list`),params:j({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},lm}function dm(e){return cm.includes(e)}function fm(e){return dm(e)?um().request[e]:void 0}function pm(e){return dm(e)?um().response[e]:void 0}var mm={"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},hm={"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 gm(e){return Object.prototype.hasOwnProperty.call(mm,e)}function _m(e){return Object.prototype.hasOwnProperty.call(hm,e)}function vm(e){return Object.prototype.hasOwnProperty.call(mm,e)}function ym(e){return gm(e)?Bp().dispatchRequestSchemas[e]:void 0}function bm(e){return vm(e)?Bp().dispatchResultSchemas[e]:void 0}function xm(e){return _m(e)?Bp().notificationSchemas2026[e]:void 0}Object.keys(mm),Object.keys(hm);function Sm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Cm(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 wm={ok:!1,reason:`not-in-era`},Tm=[kl,Ml];function Em(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>Sm(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!Sm(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if(Sm(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var Dm={era:`2026-07-28`,hasRequestMethod:gm,hasNotificationMethod:_m,hasInputRequestMethod:e=>fm(e)!==void 0,validateRequest:(e,t)=>Cm(ym(e),t),validateResult:(e,t)=>Cm(bm(e),t),validateNotification:(e,t)=>Cm(xm(e),t),validateInputRequest:(e,t)=>Cm(fm(e),t),validateInputResponse:(e,t)=>Cm(pm(e),t),samplingResultVariant:()=>wm,outboundEnvelope(e){return{[kl]:e.protocolVersion,[Al]:e.clientInfo,[Ml]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of Tm)n in e||t.push({key:n,problem:`missing`});let n=Bp().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>up(e),inputRequestSchema:fm,decodeResult(e,t){if(!Sm(t))return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new z(R.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 z(R.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=Sm(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:Bp().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new z(R.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:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new z(R.UnsupportedResultType,`Unsupported result type \'${n}\' for ${e}`,{resultType:n,method:e})};let r=km(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new z(R.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return im(nm(e,tm(e,Em(e,t))),n)},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/clientCapabilities)`;let t=Bp().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},Om;function km(){if(Om)return Om;let e=Bp();return Om={"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},Om}var Am=`2026-07-28`;function jm(e){return e!==void 0&&sp(e)?Dm:Lp}function Mm(e){return e.revision===void 0?e.era===`modern`?Dm.era:Lp.era:jm(e.revision).era}function Nm(e){return Im.some(t=>t.hasRequestMethod(e))}function Pm(e){return Im.some(t=>t.hasNotificationMethod(e))}function Fm(e){return e===`tasks/get`||e===`tasks/cancel`}var Im=[Lp,Dm],Lm=m({AnnotationsSchema:()=>Mu,AudioContentSchema:()=>dd,BaseMetadataSchema:()=>su,BaseRequestParamsSchema:()=>Ul,BlobResourceContentsSchema:()=>Au,BooleanSchemaSchema:()=>Kd,CallToolRequestParamsSchema:()=>Ed,CallToolRequestSchema:()=>Dd,CallToolResultSchema:()=>wd,CancelTaskRequestSchema:()=>Nf,CancelTaskResultSchema:()=>Pf,CancelledNotificationParamsSchema:()=>ru,CancelledNotificationSchema:()=>iu,ClientCapabilitiesSchema:()=>fu,ClientNotificationSchema:()=>If,ClientRequestSchema:()=>Ff,ClientResultSchema:()=>Lf,ClientTasksCapabilitySchema:()=>uu,CompatibilityCallToolResultSchema:()=>Td,CompleteRequestParamsSchema:()=>mf,CompleteRequestSchema:()=>hf,CompleteResultSchema:()=>gf,ContentBlockSchema:()=>hd,CreateMessageRequestParamsSchema:()=>Hd,CreateMessageRequestSchema:()=>Ud,CreateMessageResultSchema:()=>Wd,CreateMessageResultWithToolsSchema:()=>Gd,CreateTaskResultSchema:()=>wf,CursorSchema:()=>zl,DiscoverRequestSchema:()=>vu,DiscoverResultSchema:()=>yu,ElicitRequestFormParamsSchema:()=>af,ElicitRequestParamsSchema:()=>sf,ElicitRequestSchema:()=>cf,ElicitRequestURLParamsSchema:()=>of,ElicitResultSchema:()=>df,ElicitationCompleteNotificationParamsSchema:()=>lf,ElicitationCompleteNotificationSchema:()=>uf,EmbeddedResourceSchema:()=>pd,EmptyResultSchema:()=>nu,EnumSchemaSchema:()=>nf,GetPromptRequestParamsSchema:()=>sd,GetPromptRequestSchema:()=>cd,GetPromptResultSchema:()=>_d,GetTaskPayloadRequestSchema:()=>kf,GetTaskPayloadResultSchema:()=>Af,GetTaskRequestSchema:()=>Df,GetTaskResultSchema:()=>Of,IconSchema:()=>au,IconsSchema:()=>ou,ImageContentSchema:()=>ud,ImplementationSchema:()=>cu,InitializeRequestParamsSchema:()=>pu,InitializeRequestSchema:()=>mu,InitializeResultSchema:()=>gu,InitializedNotificationSchema:()=>_u,JSONArraySchema:()=>Ll,JSONObjectSchema:()=>Il,JSONRPCErrorResponseSchema:()=>$l,JSONRPCMessageSchema:()=>eu,JSONRPCNotificationSchema:()=>Zl,JSONRPCRequestSchema:()=>Xl,JSONRPCResponseSchema:()=>tu,JSONRPCResultResponseSchema:()=>Ql,JSONValueSchema:()=>Fl,LegacyTitledEnumSchemaSchema:()=>Zd,ListChangedOptionsBaseSchema:()=>kd,ListPromptsRequestSchema:()=>ad,ListPromptsResultSchema:()=>od,ListResourceTemplatesRequestSchema:()=>Lu,ListResourceTemplatesResultSchema:()=>Ru,ListResourcesRequestSchema:()=>Fu,ListResourcesResultSchema:()=>Iu,ListRootsRequestSchema:()=>vf,ListRootsResultSchema:()=>yf,ListTasksRequestSchema:()=>jf,ListTasksResultSchema:()=>Mf,ListToolsRequestSchema:()=>Sd,ListToolsResultSchema:()=>Cd,LoggingLevelSchema:()=>Ad,LoggingMessageNotificationParamsSchema:()=>Nd,LoggingMessageNotificationSchema:()=>Pd,ModelHintSchema:()=>Fd,ModelPreferencesSchema:()=>Id,MultiSelectEnumSchemaSchema:()=>tf,NotificationSchema:()=>ql,NotificationsParamsSchema:()=>Kl,NumberSchemaSchema:()=>Jd,PaginatedRequestParamsSchema:()=>wu,PaginatedRequestSchema:()=>Tu,PaginatedResultSchema:()=>Eu,PingRequestSchema:()=>bu,PrimitiveSchemaDefinitionSchema:()=>rf,ProgressNotificationParamsSchema:()=>Su,ProgressNotificationSchema:()=>Cu,ProgressSchema:()=>xu,ProgressTokenSchema:()=>Rl,PromptArgumentSchema:()=>rd,PromptListChangedNotificationSchema:()=>vd,PromptMessageSchema:()=>gd,PromptReferenceSchema:()=>pf,PromptSchema:()=>id,ReadResourceRequestParamsSchema:()=>Bu,ReadResourceRequestSchema:()=>Vu,ReadResourceResultSchema:()=>Hu,RelatedTaskMetadataSchema:()=>Vl,RequestIdSchema:()=>Yl,RequestMetaSchema:()=>Hl,RequestSchema:()=>Gl,ResourceContentsSchema:()=>Du,ResourceLinkSchema:()=>md,ResourceListChangedNotificationSchema:()=>Uu,ResourceRequestParamsSchema:()=>zu,ResourceSchema:()=>Nu,ResourceTemplateReferenceSchema:()=>ff,ResourceTemplateSchema:()=>Pu,ResourceUpdatedNotificationParamsSchema:()=>td,ResourceUpdatedNotificationSchema:()=>nd,ResultMetaObjectSchema:()=>Jl,ResultSchema:()=>L,RoleSchema:()=>ju,RootSchema:()=>_f,RootsListChangedNotificationSchema:()=>bf,SamplingContentSchema:()=>zd,SamplingMessageContentBlockSchema:()=>Bd,SamplingMessageSchema:()=>Vd,ServerCapabilitiesSchema:()=>hu,ServerNotificationSchema:()=>zf,ServerRequestSchema:()=>Rf,ServerResultSchema:()=>Bf,ServerTasksCapabilitySchema:()=>du,SetLevelRequestParamsSchema:()=>jd,SetLevelRequestSchema:()=>Md,SingleSelectEnumSchemaSchema:()=>Qd,StringSchemaSchema:()=>qd,SubscribeRequestParamsSchema:()=>Wu,SubscribeRequestSchema:()=>Gu,SubscriptionFilterSchema:()=>Ju,SubscriptionsAcknowledgedNotificationParamsSchema:()=>Zu,SubscriptionsAcknowledgedNotificationSchema:()=>Qu,SubscriptionsListenRequestParamsSchema:()=>Yu,SubscriptionsListenRequestSchema:()=>Xu,SubscriptionsListenResultMetaSchema:()=>$u,SubscriptionsListenResultSchema:()=>ed,TaskAugmentedRequestParamsSchema:()=>Wl,TaskCreationParamsSchema:()=>xf,TaskMetadataSchema:()=>Bl,TaskSchema:()=>Cf,TaskStatusNotificationParamsSchema:()=>Tf,TaskStatusNotificationSchema:()=>Ef,TaskStatusSchema:()=>Sf,TextContentSchema:()=>ld,TextResourceContentsSchema:()=>Ou,TitledMultiSelectEnumSchemaSchema:()=>ef,TitledSingleSelectEnumSchemaSchema:()=>Xd,ToolAnnotationsSchema:()=>yd,ToolChoiceSchema:()=>Ld,ToolExecutionSchema:()=>bd,ToolListChangedNotificationSchema:()=>Od,ToolResultContentSchema:()=>Rd,ToolSchema:()=>xd,ToolUseContentSchema:()=>fd,UnsubscribeRequestParamsSchema:()=>Ku,UnsubscribeRequestSchema:()=>qu,UntitledMultiSelectEnumSchemaSchema:()=>$d,UntitledSingleSelectEnumSchemaSchema:()=>Yd}),Rm=e=>Xl.safeParse(e).success,zm=e=>Zl.safeParse(e).success,Bm=e=>Ql.safeParse(e).success,Vm=e=>$l.safeParse(e).success,Hm=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,Um=`Mcp-Param-`,Wm=`x-mcp-header`,Gm=/^[!#$%&\'*+\\-.^_`|~0-9A-Za-z]+$/,Km=new Set([`string`,`integer`,`boolean`]);function qm(e){let t=[],n=new Map,r,i=(e,a,o)=>{if(typeof e!=`object`||!e)return;let s=e;if(Wm in s){if(!o||a.length===0)return`${Xm(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 e=s[Wm];if(typeof e!=`string`||e.length===0)return`${Xm(a)}: x-mcp-header MUST be a non-empty string`;if(!Gm.test(e))return`${Xm(a)}: x-mcp-header \'${e}\' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let i=typeof s.type==`string`?s.type:void 0;if(i===void 0||!Km.has(i)){let e=`${Xm(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${i??`<none>`}`;if(i!==`number`)return e;r??=e}let c=e.toLowerCase(),l=n.get(c);if(l!==void 0)return`x-mcp-header \'${e}\' is not case-insensitively unique (also declared as \'${l}\')`;n.set(c,e),t.push({path:a,headerName:e,type:i})}let c=s.properties;if(typeof c==`object`&&c)for(let[e,t]of Object.entries(c)){let n=i(t,[...a,e],o);if(n!==void 0)return n}for(let e of Jm){let t=s[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&Ym.has(e)?Object.values(t):[t];for(let t of n){let n=i(t,[...a,`<${e}>`],!1);if(n!==void 0)return n}}},a=i(e,[],!0);return a===void 0?r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r,declarations:t}:{valid:!1,reason:r??a}}var Jm=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],Ym=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function Xm(e){return e.length===0?`<root>`:e.join(`.`)}var Zm=`=?base64?`,Qm=`?=`;function $m(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function eh(e){if(e.length===0||e.startsWith(Zm)&&e.endsWith(Qm)||e!==e.trim())return!0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(!(n===9||n>=32&&n<=126))return!0}return!1}function th(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function nh(e){return eh(e)?`${Zm}${th(e)}${Qm}`:e}function rh(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function ih(e,t){let n={};for(let r of e){let e=rh(t,r.path);if(e==null)continue;let i=$m(e);i!==void 0&&(n[`${Um}${r.headerName}`]=nh(i))}return n}B.InvalidRequest,B.UnsupportedProtocolVersion,B.InvalidParams,B.MethodNotFound,B.InvalidParams,B.MissingRequiredClientCapability,B.ParseError,B.InvalidRequest,B.MethodNotFound,B.UnsupportedProtocolVersion,B.MissingRequiredClientCapability;function ah(e,t){return Bs(e,t)}function oh(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function sh(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 ch=!1,lh=`draft-2020-12`;function uh(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:lh});else if(n.vendor===`zod`){if(!(`_zod`in e))throw 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().`);ch||(ch=!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.")),r=Ps(e,{target:lh,io:t})}else throw 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 r.type===void 0&&fh(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}var dh=/^#\\/(\\$defs|definitions)\\/([^/~%]+)$/;function fh(e,t=e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;let n=typeof e.$ref==`string`&&dh.exec(e.$ref);if(n&&t[n[1]]?.[n[2]]?.type===`object`)return!0;for(let n of[`oneOf`,`anyOf`,`allOf`]){let r=e[n];if(Array.isArray(r)&&r.length>0)return r.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||fh(e,`$id`in e?{}:t)))}return!1}function ph(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function mh(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>ph(e)).join(`, `)}:{success:!0,data:n.value}}function hh(e){let t=Ps(e,{target:lh,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var gh=/\\\\\\.\\\\d\\{(\\d+)\\}/;function _h(e){let t=gh.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>wl({local:e,offset:t,precision:n}))))}function vh(e,t){let n;switch(e){case`email`:n=[sc()];break;case`uri`:n=[dc()];break;case`date`:n=[Tl()];break;case`date-time`:n=_h(t);break}return new Set(n.map(e=>hh(e)).filter(e=>e!==void 0))}function yh(e,t,n){return n!==`zod`||vh(e,t).has(t)}function bh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function xh(e){try{return uh(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new qp(B.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var Sh=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function Ch(e){return Sh.has(e)||e.startsWith(`x-`)}var wh=new Set([`$schema`,...Object.keys(af.shape.requestedSchema.shape)]),Th={string:oh([qd,Yd,Xd,Zd]),number:oh([Jd]),integer:oh([Jd]),boolean:oh([Kd]),array:oh([$d,ef])},Eh=new Set(qd.shape.format.unwrap().options);function Dh(e,t,n,r){if(!bh(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(Th,e.type)?Th[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||Ch(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?Eh.has(e.format)?(typeof s!=`string`||!yh(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function Oh(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&bh(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,Dh(n,`properties.${e}`,t,r)])):wh.has(i)?n[i]=a:Ch(i)||r.push(i);if(r.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function kh(e,t){if(!bh(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!ah(rf,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function Ah(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>Ah(e,t[r],`${n}[${r}]`)):!bh(e)||!bh(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?Ah(r,t[e],i):Ch(e)?[]:[i]})}function jh(e){if(!sh(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=Oh(xh(e.requestedSchema),t),r=ah(af.shape.requestedSchema,n);if(!r.success)throw new qp(B.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${kh(n,r.error.message)}`);let i=Ah(n,r.data);if(i.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new qp(B.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function Mh(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw 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}}}Object.assign(Mh,{elicit(e){try{return{method:`elicitation/create`,params:jh(e)}}catch(e){throw e instanceof qp?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var Nh=!0,Ph=10,Fh=250;function Ih(e){return{autoFulfill:e?.autoFulfill??Nh,maxRounds:e?.maxRounds??Ph}}function Lh(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function Rh(e,t){return`Multi-round-trip request \'${e}\' still required input after ${t} rounds (inputRequired.maxRounds)`}function zh(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof z?t.reason:new z(R.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof z?t.reason:new z(R.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function Bh(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:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function Vh(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new z(R.InputRequiredRoundsExceeded,Rh(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by \'${n}\' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=Bh(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await zh(Fh,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new z(R.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(Lh(r,u,c.requestState),d);if(Hm(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var Hh=`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.ResultMetaObjectSchema.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`.split(`.`),Uh={IdJagTokenExchangeResponseSchema:qf,OAuthClientInformationFullSchema:Qf,OAuthClientInformationSchema:Zf,OAuthClientMetadataSchema:Xf,OAuthClientRegistrationErrorSchema:$f,OAuthErrorResponseSchema:Jf,OAuthMetadataSchema:Uf,OAuthProtectedResourceMetadataSchema:Hf,OAuthTokenRevocationRequestSchema:ep,OAuthTokensSchema:Kf,OpenIdProviderDiscoveryMetadataSchema:Gf,OpenIdProviderMetadataSchema:Wf},Wh={},Gh={};function Kh(e,t){let n=e.slice(0,-6);Wh[n]=t,Gh[n]=e=>t.safeParse(e).success}for(let e of Hh)Kh(e,Lm[e]);for(let[e,t]of Object.entries(Uh))Kh(e,t);Object.freeze(Wh);var qh=Object.freeze(Gh);function Jh(e){switch(e){case`initialize`:case`notifications/initialized`:return jm(void 0);case`server/discover`:return jm(Am);default:return}}var Yh=[kl,Al,Ml,Pl],Xh=[`inputResponses`,`requestState`];function Zh(e,t){let n=e.params;if(!ng(n))return{message:e,lifted:{}};let r=n._meta,i=ng(r)?Yh.filter(e=>e in r):[],a=t===`request`?Xh.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&ng(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function Qh(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(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function $h(e){return()=>e}var eg=$h(void 0),tg=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??Dl,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_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 z(R.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!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_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 z(R.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=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),Bm(e)||Vm(e)?this._onresponse(e):Rm(e)?this._onrequest(e,t):zm(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},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 e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new z(R.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Zh(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=Mm(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification \'${n.method}\': classified as ${e} but this instance serves ${r.era}`));return}}if(Pm(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;i===void 0&&a===void 0||Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=Zh(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request \'${e.method}\': not servable on this connection\'s protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=Mm(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request \'${n.method}\': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(B.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(Nm(n.method)&&!i.hasRequestMethod(n.method)&&!(Fm(n.method)&&this._customSchemaRequestMethods.has(n.method))){o(B.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(B.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(B.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:ag(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?eg:$h(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),sh(t))return u(e,t,n);let i=Qh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(B.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:B.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),Bm(e)?n(e):n(qp.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 r=this._resolveOutboundCodec(e.method);if(sh(t))return Fm(e.method)||this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n);this._assertOutboundRequestInEra(r,e.method);let i=Qh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return jm(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Jh(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(Nm(t)&&!e.hasRequestMethod(t))throw new z(R.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 r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let _=this._envelopeOutbound(g),v=!1,y=e=>{v||(this._progressHandlers.delete(h),m===void 0?t.method!==`initialize`&&this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof z?e:new z(R.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(v=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(dg(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;mh(n,o).then(e=>{e.success?d(e.data):f(new z(R.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>y(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let ee=r?.timeout??6e4;this._setupTimeout(h,ee,r?.maxTotalTimeout,()=>y(new z(R.RequestTimeout,`Request timed out`,{timeout:ee})),r?.resetTimeoutOnProgress??!1),this._transport.send(_,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new z(R.NotConnected,`Not connected`);if(Pm(t.method)&&!e.hasNotificationMethod(t.method))throw new z(R.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 r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&n?.relatedRequestId===void 0){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(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!Nm(e))throw TypeError(`\'${e}\' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new qp(B.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await mh(t.params,{...r.params});if(!a.success)throw new qp(B.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);typeof t==`function`?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!Pm(e))throw TypeError(`\'${e}\' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new qp(B.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await mh(t.params,{...r.params});if(!i.success)throw new qp(B.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function ng(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function rg(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=ng(a)&&ng(i)?{...a,...i}:i}return n}function ig(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ag(e){let t={},n=[];if(!ig(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!ig(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function og(e){throw new z(R.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function sg(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:$h(void 0),signal:r,send:(()=>og(`send`)),notify:()=>og(`notify`)}}}async function cg(e,t,n,r,i){if(!ig(r)||typeof r.method!=`string`)throw new z(R.InvalidResult,`Invalid input request \'${n}\': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new z(R.InvalidResult,`Invalid input request \'${n}\': \'${a}\' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new z(R.CapabilityNotSupported,`Cannot fulfil input request \'${n}\': no handler is registered for \'${a}\' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=ig(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(sg(n,a,s,i,e.sessionId)))}function lg(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function ug(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>cg(e,i,t,n,r),retry:(e,t)=>r.retry(e,lg(o,t))};return Vh({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function dg(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}p((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,r=/^[!#$%&\'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&\'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))();function fg(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!fg(e[r],t[r]))return!1;return!0}if(n===`object`){if(!e||!t)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!fg(e[r],t[r]))return!1;return!0}return e===t}function pg(e){return encodeURI(mg(e))}function mg(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}var hg={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},gg={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},_g={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!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},vg=typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);function yg(e,t=Object.create(null),n=vg,r=``){if(e&&typeof e==`object`&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);a.hash.length>1?t[a.href]=e:(a.hash=``,r===``?n=a:yg(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(_g[i])continue;let a=`${r}/${pg(i)}`,o=e[i];if(Array.isArray(o)){if(hg[i]){let e=o.length;for(let r=0;r<e;r++)yg(o[r],t,n,`${a}/${r}`)}}else if(gg[i])for(let e in o)yg(o[e],t,n,`${a}/${pg(e)}`);else yg(o,t,n,a)}return t}var bg=/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/,xg=[0,31,28,31,30,31,30,31,31,30,31,30,31],Sg=/^(\\d\\d):(\\d\\d):(\\d\\d)(\\.\\d+)?(z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,Cg=/^(?=.{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,wg=/^(?:[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,Tg=/^(?:(?:[^\\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,Eg=/^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!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-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,Dg=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,Og=/^(?:\\/(?:[^~/]|~0|~1)*)*$/,kg=/^#(?:\\/(?:[a-z0-9_\\-.!$&\'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,Ag=/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,jg=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&\'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},Mg=/^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,Ng=/^((([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,Pg=e=>e.length>1&&e.length<80&&(/^P\\d+([.,]\\d+)?W$/.test(e)||/^P[\\dYMDTHS]*(\\d[.,]\\d+)?[YMDHS]$/.test(e)&&/^P([.,\\d]+Y)?([.,\\d]+M)?([.,\\d]+D)?(T([.,\\d]+H)?([.,\\d]+M)?([.,\\d]+S)?)?$/.test(e));function Fg(e){return e.test.bind(e)}var Ig={date:Rg,time:zg.bind(void 0,!1),"date-time":Vg,duration:Pg,uri:Wg,"uri-reference":Fg(wg),"uri-template":Fg(Tg),url:Fg(Eg),email:jg,hostname:Fg(Cg),ipv4:Fg(Mg),ipv6:Fg(Ng),regex:Kg,uuid:Fg(Dg),"json-pointer":Fg(Og),"json-pointer-uri-fragment":Fg(kg),"relative-json-pointer":Fg(Ag)};function Lg(e){return e%4==0&&(e%100!=0||e%400==0)}function Rg(e){let t=e.match(bg);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&Lg(n)?29:xg[r])}function zg(e,t){let n=t.match(Sg);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var Bg=/t|\\s/i;function Vg(e){let t=e.split(Bg);return t.length==2&&Rg(t[0])&&zg(!0,t[1])}var Hg=/\\/|:/,Ug=/^(?:[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 Wg(e){return Hg.test(e)&&Ug.test(e)}var Gg=/[^\\\\]\\\\Z/;function Kg(e){if(Gg.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function qg(e){let t=0,n=e.length,r=0,i;for(;r<n;)t++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return t}function Jg(e,t,n=`2019-09`,r=yg(t),i=!0,a=null,o=`#`,s=`#`,c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:o,keyword:`false`,keywordLocation:o,error:`False boolean schema.`}]};let l=typeof e,u;switch(l){case`boolean`:case`number`:case`string`:u=l;break;case`object`:u=e===null?`null`:Array.isArray(e)?`array`:`object`;break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:d,$recursiveRef:f,$recursiveAnchor:p,type:m,const:h,enum:g,required:_,not:v,anyOf:y,allOf:ee,oneOf:te,if:ne,then:re,else:ie,format:ae,properties:oe,patternProperties:se,additionalProperties:ce,unevaluatedProperties:le,minProperties:ue,maxProperties:de,propertyNames:fe,dependentRequired:pe,dependentSchemas:b,dependencies:me,prefixItems:he,items:ge,additionalItems:_e,unevaluatedItems:ve,contains:ye,minContains:be,maxContains:xe,minItems:Se,maxItems:Ce,uniqueItems:we,minimum:Te,maximum:Ee,exclusiveMinimum:De,exclusiveMaximum:x,multipleOf:Oe,minLength:ke,maxLength:Ae,pattern:je,__absolute_ref__:Me,__absolute_recursive_ref__:Ne}=t,S=[];if(p===!0&&a===null&&(a=t),f===`#`){let l=a===null?r[Ne]:a,u=`${s}/$recursiveRef`,d=Jg(e,a===null?t:a,n,r,i,l,o,u,c);d.valid||S.push({instanceLocation:o,keyword:`$recursiveRef`,keywordLocation:u,error:`A subschema had errors.`},...d.errors)}if(d!==void 0){let t=r[Me||d];if(t===void 0){let e=`Unresolved $ref "${d}".`;throw Me&&Me!==d&&(e+=` Absolute URI "${Me}".`),e+=`\\nKnown schemas:\\n- ${Object.keys(r).join(`\n- `)}`,Error(e)}let l=`${s}/$ref`,u=Jg(e,t,n,r,i,a,o,l,c);if(u.valid||S.push({instanceLocation:o,keyword:`$ref`,keywordLocation:l,error:`A subschema had errors.`},...u.errors),n===`4`||n===`7`)return{valid:S.length===0,errors:S}}if(Array.isArray(m)){let t=m.length,n=!1;for(let r=0;r<t;r++)if(u===m[r]||m[r]===`integer`&&u===`number`&&e%1==0&&e===e){n=!0;break}n||S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m.join(`", "`)}".`})}else m===`integer`?(u!==`number`||e%1||e!==e)&&S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`}):m!==void 0&&u!==m&&S.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`});if(h!==void 0&&(u===`object`||u===`array`?fg(e,h)||S.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`}):e!==h&&S.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`})),g!==void 0&&(u===`object`||u===`array`?g.some(t=>fg(e,t))||S.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||S.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),v!==void 0){let t=`${s}/not`;Jg(e,v,n,r,i,a,o,t).valid&&S.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let Pe=[];if(y!==void 0){let t=`${s}/anyOf`,l=S.length,u=!1;for(let s=0;s<y.length;s++){let l=y[s],d=Object.create(c),f=Jg(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);S.push(...f.errors),u||=f.valid,f.valid&&Pe.push(d)}u?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`anyOf`,keywordLocation:t,error:`Instance does not match any subschemas.`})}if(ee!==void 0){let t=`${s}/allOf`,l=S.length,u=!0;for(let s=0;s<ee.length;s++){let l=ee[s],d=Object.create(c),f=Jg(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);S.push(...f.errors),u&&=f.valid,f.valid&&Pe.push(d)}u?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`allOf`,keywordLocation:t,error:`Instance does not match every subschema.`})}if(te!==void 0){let t=`${s}/oneOf`,l=S.length,u=te.filter((s,l)=>{let u=Object.create(c),d=Jg(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return S.push(...d.errors),d.valid&&Pe.push(u),d.valid}).length;u===1?S.length=l:S.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...Pe),ne!==void 0){let t=`${s}/if`;if(Jg(e,ne,n,r,i,a,o,t,c).valid){if(re!==void 0){let l=Jg(e,re,n,r,i,a,o,`${s}/then`,c);l.valid||S.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(ie!==void 0){let l=Jg(e,ie,n,r,i,a,o,`${s}/else`,c);l.valid||S.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(_!==void 0)for(let t of _)t in e||S.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(ue!==void 0&&t.length<ue&&S.push({instanceLocation:o,keyword:`minProperties`,keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${ue} properties.`}),de!==void 0&&t.length>de&&S.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${de} properties.`}),fe!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${pg(s)}`,c=Jg(s,fe,n,r,i,a,e,t);c.valid||S.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(pe!==void 0){let t=`${s}/dependantRequired`;for(let n in pe)if(n in e){let r=pe[n];for(let i of r)i in e||S.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(b!==void 0)for(let t in b){let l=`${s}/dependentSchemas`;if(t in e){let s=Jg(e,b[t],n,r,i,a,o,`${l}/${pg(t)}`,c);s.valid||S.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(me!==void 0){let t=`${s}/dependencies`;for(let s in me)if(s in e){let c=me[s];if(Array.isArray(c))for(let n of c)n in e||S.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=Jg(e,c,n,r,i,a,o,`${t}/${pg(s)}`);l.valid||S.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(oe!==void 0){let t=`${s}/properties`;for(let s in oe){if(!(s in e))continue;let d=`${o}/${pg(s)}`,f=Jg(e[s],oe[s],n,r,i,a,d,`${t}/${pg(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,S.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&se!==void 0){let t=`${s}/patternProperties`;for(let s in se){let d=new RegExp(s,`u`),f=se[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${pg(p)}`,h=Jg(e[p],f,n,r,i,a,m,`${t}/${pg(s)}`);h.valid?c[p]=l[p]=!0:(u=i,S.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&ce!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${pg(s)}`,f=Jg(e[s],ce,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,S.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&le!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${pg(s)}`,u=Jg(e[s],le,n,r,i,a,l,t);u.valid?c[s]=!0:S.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){Ce!==void 0&&e.length>Ce&&S.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${Ce}).`}),Se!==void 0&&e.length<Se&&S.push({instanceLocation:o,keyword:`minItems`,keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${Se}).`});let t=e.length,l=0,u=!1;if(he!==void 0){let d=`${s}/prefixItems`,f=Math.min(he.length,t);for(;l<f;l++){let t=Jg(e[l],he[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`prefixItems`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}if(ge!==void 0){let d=`${s}/items`;if(Array.isArray(ge)){let s=Math.min(ge.length,t);for(;l<s;l++){let t=Jg(e[l],ge[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}else for(;l<t;l++){let t=Jg(e[l],ge,n,r,i,a,`${o}/${l}`,d);if(c[l]=!0,!t.valid&&(u=i,S.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}if(!u&&_e!==void 0){let d=`${s}/additionalItems`;for(;l<t;l++){let t=Jg(e[l],_e,n,r,i,a,`${o}/${l}`,d);c[l]=!0,t.valid||(u=i,S.push({instanceLocation:o,keyword:`additionalItems`,keywordLocation:d,error:`Items did not match additional items schema.`},...t.errors))}}}if(ye!==void 0)if(t===0&&be===void 0)S.push({instanceLocation:o,keyword:`contains`,keywordLocation:`${s}/contains`,error:`Array is empty. It must contain at least one item matching the schema.`});else if(be!==void 0&&t<be)S.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array has less items (${t}) than minContains (${be}).`});else{let l=`${s}/contains`,u=S.length,d=0;for(let s=0;s<t;s++){let t=Jg(e[s],ye,n,r,i,a,`${o}/${s}`,l);t.valid?(c[s]=!0,d++):S.push(...t.errors)}d>=(be||0)&&(S.length=u),be===void 0&&xe===void 0&&d===0?S.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):be!==void 0&&d<be?S.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array must contain at least ${be} items matching schema. Only ${d} items were found.`}):xe!==void 0&&d>xe&&S.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${xe} items matching schema. ${d} items were found.`})}if(!u&&ve!==void 0){let u=`${s}/unevaluatedItems`;for(;l<t;l++){if(c[l])continue;let t=Jg(e[l],ve,n,r,i,a,`${o}/${l}`,u);c[l]=!0,t.valid||S.push({instanceLocation:o,keyword:`unevaluatedItems`,keywordLocation:u,error:`Items did not match unevaluated items schema.`},...t.errors)}}if(we)for(let n=0;n<t;n++){let r=e[n],i=typeof r==`object`&&!!r;for(let a=0;a<t;a++){if(n===a)continue;let t=e[a];(r===t||i&&typeof t==`object`&&t&&fg(r,t))&&(S.push({instanceLocation:o,keyword:`uniqueItems`,keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${n} and ${a}.`}),n=2**53-1,a=2**53-1)}}}else if(u===`number`){if(n===`4`?(Te!==void 0&&(De===!0&&e<=Te||e<Te)&&S.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${De?`or equal to `:``} ${Te}.`}),Ee!==void 0&&(x===!0&&e>=Ee||e>Ee)&&S.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${x?`or equal to `:``} ${Ee}.`})):(Te!==void 0&&e<Te&&S.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${Te}.`}),Ee!==void 0&&e>Ee&&S.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${Ee}.`}),De!==void 0&&e<=De&&S.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${De}.`}),x!==void 0&&e>=x&&S.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${x}.`})),Oe!==void 0){let t=e%Oe;Math.abs(0-t)>=1.1920929e-7&&Math.abs(Oe-t)>=1.1920929e-7&&S.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${Oe}.`})}}else if(u===`string`){let t=ke===void 0&&Ae===void 0?0:qg(e);ke!==void 0&&t<ke&&S.push({instanceLocation:o,keyword:`minLength`,keywordLocation:`${s}/minLength`,error:`String is too short (${t} < ${ke}).`}),Ae!==void 0&&t>Ae&&S.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${Ae}).`}),je!==void 0&&!new RegExp(je,`u`).test(e)&&S.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),ae!==void 0&&Ig[ae]&&!Ig[ae](e)&&S.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${ae}".`})}return{valid:S.length===0,errors:S}}var Yg=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=yg(e)}validate(e){return Jg(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),yg(e,this.lookup)}},Xg=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=ee(e,`pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);return t===`draft-7`?`7`:t}getValidator(e){let t=new Yg(e,this.draft??this._draftFor(e),this.shortcircuit);return e=>{let n=t.validate(e);return n.valid?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:n.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}}}};globalThis.crypto;var Zg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e){super(e),this.name=new.target.name,np(this,new.target)}};(class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 \xA73.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}}),class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint \'${e}\'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}},class extends Zg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var Qg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,np(this,new.target)}},$g=new Set([`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`server/discover`]),e_=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(t_(e))}set(e,t){let n=t_(e),r=$g.has(e.method),i=!this._entries.has(n);if(!r&&i&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!$g.has(e.slice(0,e.indexOf(`\\0`)))){this._entries.delete(e),this._cappedSize--;break}}let a=++this._stamp;return this._entries.set(n,{...t,stamp:a}),i&&!r&&this._cappedSize++,a}delete(e){this._entries.delete(t_(e))&&!$g.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\\0`,n=$g.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),n||this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function t_(e){return`${e.method}\\0${JSON.stringify([e.partition??``,e.params??``])}`}function n_(e,t){return t===void 0?e:`${e}\\0${t}`}var r_=864e5,i_=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity=``;constructor(e,t,n=()=>{},r=``,i=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=n,this._cachePartition=r,this._now=i}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e===`public`?``:this._cachePartition])}async _probe(e,t){let n={method:e,params:t??``},r=this._partitionFor(`private`),i=await this._store.get({...n,partition:r});if(i!==void 0)return i;let a=this._partitionFor(`public`);if(a===r)return;let o=await this._store.get({...n,partition:a});return o?.scope===`public`?o:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,``)}async _deleteBoth(e,t){let n=this._partitionFor(`private`),r=this._partitionFor(`public`);try{await this._store.delete({method:e,params:t,partition:n})}catch(e){this._reportError(e)}if(r!==n)try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}}async evictKey(e,t){let n=n_(e,t),r=this._evictionGeneration.get(n);r!==void 0&&this._evictionGeneration.set(n,r+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let n=n_(e,t),r=this._evictionGeneration.get(n)??0;return this._evictionGeneration.set(n,r),r}async write(e,t,n,r){if((this._evictionGeneration.get(n_(e,r?.params))??0)!==n)return;let i=r?.params??``,a=this._partitionFor(`private`),o=this._partitionFor(`public`),s=(r?.scope??`private`)===`public`?o:a;try{await this._store.set({method:e,params:i,partition:s},{value:a_(t),expiresAt:r?.expiresAt,scope:r?.scope})}catch(e){this._reportError(e)}if(o!==a)try{await this._store.delete({method:e,params:i,partition:s===a?o:a})}catch(e){this._reportError(e)}}async read(e,t){let n=await this._probe(e,t);if(!(n?.expiresAt===void 0||!(n.expiresAt>this.now())))try{let e=JSON.parse(n.value);if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`cached document is not an object`);return{value:e}}catch(n){this._reportError(n),await this._deleteBoth(e,t??``);return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=``}async toolDefinition(e){let t=await this._probe(`tools/list`);if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),n=new Map;if(e!==void 0)for(let t of e.tools)n.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:n}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let n=await this._probe(`tools/list`);if(n===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==n.stamp){let e=this._decodeListTools(n)??{tools:[]},r=new Map;for(let n of e.tools){let e=t(n);e!==void 0&&r.set(n.name,e)}this._toolOutputValidatorIndex={stamp:n.stamp,byName:r}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>typeof e==`object`&&!!e))throw TypeError(`cached tools/list document has a malformed tools array`);return t}catch(e){this._reportError(e);return}}};function a_(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if(typeof t!=`string`)throw TypeError(`cache value is not JSON-serializable: it has no JSON representation`);return t}var o_=Symbol.for(`mcp.authSeamEscape`);function s_(e){return(typeof e==`object`&&!!e||typeof e==`function`)&&e[o_]===!0}var c_=-32022,l_=new Set([-32001,-32020,-32021]);function u_(e,t){switch(e.kind){case`result`:return d_(e.result,t);case`rpc-error`:return f_(e,t);case`http-error`:return p_(e,t);case`network-error`:return m_(e.error,t);case`unusable-reply`:return{kind:`error`,error:new z(R.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${g_(e.error)})`,{cause:e.error},{cause:e.error})};case`auth-required`:return{kind:`error`,error:e.error};case`closed`:return t.transportKind===`stdio`?{kind:`legacy`}:m_(Error(`Connection closed during the version negotiation probe`),t);case`timeout`:return t.transportKind===`stdio`?{kind:`legacy`}:{kind:`error`,error:new z(R.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function d_(e,t){let n=jm(Am).validateResult(`server/discover`,e);if(!n.ok)return{kind:`legacy`};let r=n.value.supportedVersions,i=t.clientModernVersions.find(e=>r.includes(e));return i===void 0?t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:new Xp({supported:[...r],requested:t.requestedVersion})}:{kind:`modern`,version:i,discover:n.value}}function f_(e,t){let{code:n,message:r,data:i}=e;if(n===c_){let e=__(i);if(e===void 0)return{kind:`legacy`};let n=new Xp({supported:e,requested:v_(i)??t.requestedVersion},r),a=lp(e),o=t.clientModernVersions.find(e=>a.includes(e));return o===void 0?a.length>0?{kind:`error`,error:n}:t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:n}:{kind:`corrective`,version:o,error:n}}return l_.has(n),{kind:`legacy`}}function p_(e,t){if(e.status===401||e.status===403){let t=e.status===403;return{kind:`error`,error:new ip(t?R.ClientHttpForbidden:R.ClientHttpAuthentication,`Version negotiation failed: ${t?`the server denied access (HTTP 403)`:`the server requires authorization (HTTP 401)`}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:`error`,error:new ip(R.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let n=y_(e.body);return n===void 0?{kind:`legacy`}:f_(n,t)}function m_(e,t){return t.environment===`browser`&&h_(e)?{kind:`legacy`}:{kind:`error`,error:new z(R.EraNegotiationFailed,`Version negotiation probe failed: ${g_(e)}`,{cause:e},{cause:e})}}function h_(e){return e instanceof TypeError||e instanceof Error&&e.name===`TypeError`}function g_(e){return e instanceof Error?e.message:String(e)}function __(e){if(typeof e!=`object`||!e)return;let t=e.supported;if(!(!Array.isArray(t)||t.length===0||!t.every(e=>typeof e==`string`)))return t}function v_(e){if(typeof e!=`object`||!e)return;let t=e.requested;return typeof t==`string`?t:void 0}function y_(e){if(e===void 0||e===``)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t)return;let n=t.error;if(typeof n!=`object`||!n)return;let{code:r,message:i,data:a}=n;if(typeof r==`number`)return{code:r,message:typeof i==`string`?i:``,data:a}}var b_=`legacy`;function x_(e,t){let n=e?.mode??b_;if(n===`legacy`)return{kind:`legacy`};let r=e?.probe??{};if(typeof n==`object`){if(!sp(n.pin))throw TypeError(`versionNegotiation: { pin: \'${n.pin}\' } is not a modern protocol revision \u2014 pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: \'legacy\') for 2025-era servers.`);return{kind:`pin`,version:n.pin,probe:r}}let i=t?lp(t):[];return{kind:`auto`,modernVersions:i.length>0?i:[...op],fallbackAvailable:!t||cp(t).length>0,probe:r}}function S_(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?`browser`:`node`}function C_(e){return`stderr`in e&&`pid`in e?`stdio`:`http`}var w_=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let n=new e(t);t.onmessage=e=>{let t=n._pending;if(t!==void 0&&(Bm(e)||Vm(e))&&e.id===t.id){n._pending=void 0,Bm(e)?t.resolve({kind:`response`,result:e.result}):t.resolve({kind:`response`,error:e.error});return}},t.onerror=e=>{n._savedOnError?.(e)},t.onclose=()=>{let e=n._pending;e!==void 0&&(n._pending=void 0,e.resolve({kind:`closed`})),n._closeDelivered=!0,n._savedOnClose?.()};try{await t.start()}catch(e){throw n.detach(),e}return n}async exchange(e,t){let n=`server-discover-probe-${++this._probeCounter}`;return new Promise(r=>{let i=!1,a=e=>{i||(i=!0,clearTimeout(o),this._pending?.id===n&&(this._pending=void 0),r(e))},o=setTimeout(()=>a({kind:`timeout`}),t);this._pending={id:n,resolve:a},this._transport.send(e(n)).catch(e=>a({kind:`send-error`,error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let e=this._savedOnClose,t=this._transport,n=!1,r=()=>{if(!n){n=!0;return}e()};t.onclose=r,T_.set(t,()=>{t.onclose===r&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,n=!0;e.start=async function(){if(n){n=!1,e.start=t;return}return t.call(e)}}},T_=new WeakMap;function E_(e){let t=T_.get(e);T_.delete(e),t?.()}function D_(e,t,n,r){return{jsonrpc:`2.0`,id:e,method:`server/discover`,params:{_meta:jm(t).outboundEnvelope({protocolVersion:t,clientInfo:n,clientCapabilities:r})}}}function O_(e){return e instanceof z&&e.code===R.ClientHttpUnexpectedContent||e instanceof Error&&e.name===`SyntaxError`}function k_(e,t){switch(e.kind){case`response`:return e.error===void 0?{kind:`result`,result:e.result}:{kind:`rpc-error`,...e.error};case`send-error`:{let t=e.error;if(s_(t)||t instanceof Qg||t instanceof Error&&t.name===`UnauthorizedError`)return{kind:`auth-required`,error:t};if(t instanceof ip){let e=t.data?.text;return{kind:`http-error`,status:t.data.status,body:typeof e==`string`?e:void 0,statusText:t.data.statusText}}return O_(t)?{kind:`unusable-reply`,error:t}:{kind:`network-error`,error:t}}case`closed`:return{kind:`closed`};case`timeout`:return{kind:`timeout`,timeoutMs:t}}}async function A_(e,t){let n=e.probe.timeoutMs??t.defaultTimeoutMs,r=Math.max(0,e.probe.maxRetries??0),i=e.kind===`pin`?[e.version]:e.modernVersions,a=e.kind===`auto`&&e.fallbackAvailable,o=await w_.open(t.transport),s=async()=>{let s=i[0],c=!1,l=r;for(;;){let r=await o.exchange(e=>D_(e,s,t.clientInfo,t.capabilities),n);if(r.kind===`timeout`&&l>0){l--;continue}let u=k_(r,n),d=u_(u,{clientModernVersions:i,requestedVersion:s,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(d.kind){case`modern`:return{era:`modern`,version:d.version,discover:d.discover};case`corrective`:if(c)throw d.error;c=!0,s=d.version;continue;case`legacy`:{let n=u.kind===`closed`?`the connection closed during the server/discover probe`:void 0;if(e.kind===`pin`)throw new z(R.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${n} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new z(R.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to`:`Version negotiation failed: ${n} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(n!==void 0&&t.disposableProbe!==!0)throw new z(R.EraNegotiationFailed,`Version negotiation failed: ${n} (this transport probed in place \u2014 the disposable sibling probe requires the SDK\'s base StdioClientTransport)`);return{era:`legacy`}}case`error`:throw d.error}}},c;try{c=await s()}catch(e){throw o.detach(),e}return o.release(),c}function j_(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,`_dispose`))return;let n=e._serverParams;return typeof n==`object`&&n&&typeof n.command==`string`?n:void 0}async function M_(e,t,n,r){let i=t.constructor,a=new i({...n,stderr:`ignore`}),o=t.close,s=!1,c,l=new Promise((e,t)=>{c=()=>t(N_())});t.close=async function(){return s=!0,c?.(),o.call(t)};let u;try{let t=A_(e,{...r,transport:a,transportKind:`stdio`,disposableProbe:!0});t.catch(()=>{}),u=await Promise.race([t,l])}finally{await P_(a),t.close=o}if(s)throw N_();return u}function N_(){return new z(R.EraNegotiationFailed,`Version negotiation failed: the transport was closed during the server/discover probe`)}async function P_(e){try{let t=e._dispose;await(typeof t==`function`?t.call(e):e.close())}catch{}}function F_(e){let t=e._meta?.[jl];return qh.Implementation(t)?t:void 0}function I_(e,t){if(!(!e||typeof t!=`object`||!t)){if(e.type===`object`&&e.properties&&typeof e.properties==`object`){let n=t,r=e.properties;for(let e of Object.keys(r)){let t=r[e];n[e]===void 0&&Object.prototype.hasOwnProperty.call(t,`default`)&&(n[e]=t.default),n[e]!==void 0&&I_(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&I_(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&I_(n,t)}}function L_(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}function R_(e){if(typeof e==`object`&&e&&(e.kind===`legacy`&&!(`supportedVersions`in e)&&!(`discover`in e)||e.kind===`modern`&&yu.safeParse(e.discover).success))return e;throw new z(R.EraNegotiationFailed,`connect({ prior }): unrecognized prior \u2014 expected { kind: \'modern\', discover } or { kind: \'legacy\' }`)}var z_={"notifications/tools/list_changed":[`tools/list`],"notifications/prompts/list_changed":[`prompts/list`],"notifications/resources/list_changed":[`resources/list`,`resources/templates/list`]},B_=64,V_={};(class extends tg{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;static{V_.enforceStrictCapabilities=e=>e._enforceStrictCapabilities,V_.walkPages=(e,t,n,r)=>e._walkPages(t,n,r),V_.readResource=(e,t,n)=>e._readResource(t,n)}_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new z(R.ConnectionClosed,`subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Xg,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=Ih(t?.inputRequired),this._cache=new i_(t?.responseCacheStore??new e_,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??``),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??B_,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&sp(this._negotiatedProtocolVersion)&&Rm(e))return`drop`}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?ug({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new z(R.UnsupportedResultType,`Unsupported result type \'input_required\' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance \u2014 pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:`input_required`,method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,`notifications/tools/list_changed`,e.tools,async()=>(await this.listTools(void 0,{cacheMode:`refresh`})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,`notifications/prompts/list_changed`,e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:`refresh`})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,`notifications/resources/list_changed`,e.resources,async()=>(await this.listResources(void 0,{cacheMode:`refresh`})).resources)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=rg(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error(`Cannot configure version negotiation after connecting to transport`);this._versionNegotiation=e}_wrapHandler(e,t){return e===`elicitation/create`?async(e,n)=>{let r=jm(this._negotiatedProtocolVersion),i=r.validateRequest(`elicitation/create`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`elicitation/create`,e)),!i.ok)throw new qp(i.reason===`not-in-era`?B.InternalError:B.InvalidParams,i.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation request: ${i.message}`);let{params:a}=i.value;a.mode=a.mode??`form`;let{supportsFormMode:o,supportsUrlMode:s}=L_(this._capabilities.elicitation);if(a.mode===`form`&&!o)throw new qp(B.InvalidParams,`Client does not support form-mode elicitation requests`);if(a.mode===`url`&&!s)throw new qp(B.InvalidParams,`Client does not support URL-mode elicitation requests`);let c=await t(e,n),l=r.validateResult(`elicitation/create`,c);if(!l.ok&&l.reason===`not-in-era`&&(l=r.validateInputResponse(`elicitation/create`,c)),!l.ok)throw new qp(l.reason===`not-in-era`?B.InternalError:B.InvalidParams,l.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation result: ${l.message}`);let u=l.value,d=a.mode===`form`?a.requestedSchema:void 0;if(a.mode===`form`&&u.action===`accept`&&u.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{I_(d,u.content)}catch{}return u}:e===`sampling/createMessage`?async(e,n)=>{let r=jm(this._negotiatedProtocolVersion),i=r.validateRequest(`sampling/createMessage`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`sampling/createMessage`,e)),!i.ok)throw new qp(i.reason===`not-in-era`?B.InternalError:B.InvalidParams,i.reason===`not-in-era`?`No wire schema for sampling/createMessage in the resolved era`:`Invalid sampling request: ${i.message}`);let{params:a}=i.value,o=await t(e,n),s=!!(a.tools||a.toolChoice),c=r.samplingResultVariant(s,o);if(!c.ok&&c.reason===`not-in-era`&&(c=r.validateInputResponse(`sampling/createMessage`,o)),!c.ok)throw new qp(c.reason===`not-in-era`?B.InternalError:B.InvalidParams,c.reason===`not-in-era`?`No result schema for sampling/createMessage in the resolved era`:`Invalid sampling result: ${c.message}`);return c.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new z(R.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,R_(t.prior),t);let n=x_(this._versionNegotiation,this._supportedProtocolVersionsOption);return n.kind===`legacy`?this._connectPlainLegacy(e,t):this._connectNegotiated(e,n,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let n=cp(this._supportedProtocolVersions);try{let r=n[0];if(r===void 0)throw new z(R.EraNegotiationFailed,`Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version`);let i=await this.request({method:`initialize`,params:{protocolVersion:r,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);if(!n.includes(i.protocolVersion))throw Error(`Server\'s protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:`notifications/initialized`}),this._negotiatedProtocolVersion=i.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,n){if(e.sessionId!==void 0){await super.connect(e);let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();let r;try{let i=C_(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:S_(),defaultTimeoutMs:n?.timeout??6e4},o=i===`stdio`?j_(e):void 0;r=o===void 0?await A_(t,{...a,transport:e,transportKind:i}):await M_(t,e,o,a)}catch(t){throw await e.close().catch(()=>{}),E_(e),t}if(E_(e),await super.connect(e),r.era===`legacy`){await this._legacyHandshake(e,n);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=F_(r.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.discover.instructions,this._discoverResult=r.discover,this._negotiatedProtocolVersion=r.version,e.setProtocolVersion&&e.setProtocolVersion(r.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,r={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},i=!0;try{this._setupListChangedHandlers(r)}catch(e){i=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let a=i?{...r.tools&&{toolsListChanged:!0},...r.prompts&&{promptsListChanged:!0},...r.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(a).length>0){let e=new AbortController,t=()=>e.abort(n?.signal?.reason);n?.signal?.aborted&&t(),n?.signal?.addEventListener(`abort`,t);try{this._autoOpenedSubscription=await this.listen(a,{timeout:n?.timeout,signal:e.signal})}catch(e){if(n?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{n?.signal?.removeEventListener(`abort`,t)}}}}async _connectFromPrior(e,t,n){if(t.kind===`legacy`)return this._connectPlainLegacy(e,n);let r=t.discover;this._resetConnectionState();let i=this._supportedProtocolVersionsOption,a=(i&&lp(i).length>0?lp(i):op).find(e=>r.supportedVersions.includes(e));if(a===void 0)throw new z(R.EraNegotiationFailed,`connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client\'s supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: \'legacy\' } to skip the probe and initialize directly, or use versionNegotiation: { mode: \'auto\' } to re-probe with legacy fallback.`);if(await super.connect(e),this._discoverResult=r,this._serverCapabilities=r.capabilities,this._serverVersion=F_(r),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.instructions,this._negotiatedProtocolVersion=a,e.setProtocolVersion?.(a),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return t===void 0?e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`:`${t.name}@${t.version}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return sp(e)?`modern`:`legacy`}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw new z(R.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw new z(R.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw new z(R.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw new z(R.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw new z(R.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw new z(R.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`server/discover`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw new z(R.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`);break;case`notifications/initialized`:break;case`notifications/cancelled`:break;case`notifications/progress`:break}}assertRequestHandlerCapability(e){switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw new z(R.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw new z(R.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw new z(R.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`);break;case`ping`:break}}async ping(e){return this.request({method:`ping`},e)}async discover(e){let t=await this._requestWithSchema({method:`server/discover`},yu,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:`completion/complete`,params:e},t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug(`Client.listPrompts() called but server does not advertise prompts capability - returning empty list`),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:`prompts/list`,params:e},t);let n=await this._serveFromCache(`prompts/list`,void 0,t);return n===void 0?this._listAllPages(`prompts/list`,e,t,e=>e.prompts):n}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResources() called but server does not advertise resources capability - returning empty list`),{resources:[]};if(e?.cursor!==void 0)return this.request({method:`resources/list`,params:e},t);let n=await this._serveFromCache(`resources/list`,void 0,t);return n===void 0?this._listAllPages(`resources/list`,e,t,e=>e.resources):n}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list`),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:`resources/templates/list`,params:e},t);let n=await this._serveFromCache(`resources/templates/list`,void 0,t);return n===void 0?this._listAllPages(`resources/templates/list`,e,t,e=>e.resourceTemplates):n}async _listAllPages(e,t,n,r,i){let a=n?.cacheMode===`bypass`,o=this._cache.captureGeneration(e),s=await this._walkPages(e,r=>{let i=r===void 0?t&&{...t}:{...t,cursor:r};return this.request({method:e,...i&&{params:i}},n)},r);return delete s.nextCursor,i?.(s),a||await this._cache.write(e,s,o,this._freshness(s)),s}async _walkPages(e,t,n){let r=await t(void 0),i=r.nextCursor,a=r,o=1;for(;i!==void 0;){if(this._listMaxPages!==0&&o>=this._listMaxPages)throw new z(R.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let s=await t(i);if(s.nextCursor===i&&JSON.stringify(n(s))===JSON.stringify(n(a)))break;n(r).push(...n(s)),a=s,i=s.nextCursor,o++}return r}_freshness(e,t){let n=e,r=typeof n.ttlMs==`number`?n.ttlMs:this._defaultCacheTtlMs,i=n.cacheScope===`public`?`public`:`private`;return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),r_),scope:i,params:t}}async _serveFromCache(e,t,n){if(n?.cacheMode===`bypass`||n?.cacheMode===`refresh`)return;let r=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(r!==void 0){if(n?.signal?.aborted){let e=n.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}return r.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let n=t??await this._cache.toolDefinition(e);return n===void 0?void 0:qm(n.inputSchema)}async readResource(e,t){let{result:n}=await this._readResource(e,t);return n}async _readResource(e,t){let n=await this._serveFromCache(`resources/read`,e.uri,t);if(n!==void 0)return{result:n,cached:!0};let r=this._cache.captureGeneration(`resources/read`,e.uri),i=await this.request({method:`resources/read`,params:e},t);if(t?.cacheMode!==`bypass`){let n=this._freshness(i,e.uri);n.expiresAt>this._cache.now()?await this._cache.write(`resources/read`,i,r,n):t?.cacheMode===`refresh`&&await this._cache.evictKey(`resources/read`,e.uri)}return{result:i,cached:!1}}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},t)}async listen(e,t){if(this.transport===void 0)throw new z(R.NotConnected,`Not connected`);let n=this._negotiatedProtocolVersion;if(n===void 0||!sp(n))throw new z(R.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${n??`none`}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:`subscriptions/listen`,protocolVersion:n});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof z?e:new z(R.RequestTimeout,String(e))}let r=new AbortController,i=`listen:${this._nextListenId++}`,a=`opening`,o,s,c,l,u=new Promise((e,t)=>{c=e,l=t}),d,f=new Promise(e=>{d=e}),p=e=>{if(a===`closed`)return;let n=a===`opening`;if(o!==void 0&&(clearTimeout(o),o=void 0),`ack`in e){a=`open`,c(e.ack);return}a=`closed`,s!==void 0&&t?.signal?.removeEventListener(`abort`,s),this._listenState.delete(i),r.abort(),d(e.cause),n&&l(e.error??new z(R.ConnectionClosed,`subscriptions/listen closed before the server acknowledged`))},m=async()=>{r.abort(),await this.notification({method:`notifications/cancelled`,params:{requestId:i}}).catch(()=>{})},h=async()=>{a!==`closed`&&(p({cause:`local`}),await m())};this._listenState.set(i,{settle:p});let g=t?.timeout??6e4;if(o=setTimeout(()=>{p({cause:`remote`,error:new z(R.RequestTimeout,`subscriptions/listen ack timed out`,{timeout:g})}),m().catch(()=>{})},g),t?.signal){let e=t.signal;s=()=>{if(a===`closed`)return;let t=e.reason;p({cause:`local`,error:t instanceof Error?t:Error(String(t??`Aborted`))}),m().catch(()=>{})},e.addEventListener(`abort`,s,{once:!0})}let _={jsonrpc:`2.0`,id:i,method:`subscriptions/listen`,params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},v=e=>{p({cause:`remote`,error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(_,{requestSignal:r.signal,onRequestStreamEnd:()=>p({cause:`remote`,error:Error(`subscriptions/listen: stream ended`)})}).catch(v)}catch(e){v(e)}return{honoredFilter:await u,close:h,closed:f}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let n=Object.hasOwn(z_,e.method)?z_[e.method]:void 0;if(e.method===`notifications/resources/updated`){let t=e.params?.uri;typeof t==`string`&&this._cache.evictKey(`resources/read`,t)}else if(n!==void 0)for(let e of n)this._cache.evict(e);if(e.method===`notifications/subscriptions/acknowledged`){let t=e.params?._meta?.[Nl],n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){let t=this._wireCodec().validateNotification(`notifications/subscriptions/acknowledged`,e);n.settle({ack:t.ok?t.value.params.notifications:{}});return}}if(e.method===`notifications/cancelled`){let t=e.params?.requestId,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){n.settle({cause:`remote`,error:Error(`subscriptions/listen: server cancelled the subscription`)});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){Vm(e)?n.settle({cause:`remote`,error:qp.fromError(e.error.code,e.error.message,e.error.data)}):n.settle({cause:`graceful`,error:new z(R.ConnectionClosed,`subscriptions/listen: server closed the subscription gracefully before acknowledging`)});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new z(R.ConnectionClosed,`Connection closed`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let n=this.getProtocolEra()===`modern`&&S_()!==`browser`,r=async()=>{if(!n)return t;let r;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||r.declarations.length===0)return t;let i=ih(r.declarations,e.arguments);return Object.keys(i).length===0?t:{...t,headers:{...t?.headers,...i}}},i=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(i===void 0||i.ok)return;let t=i.compileError,n=(t instanceof Error?t.message:String(t)).slice(0,200);throw new qp(B.InvalidParams,`Tool \'${e.name}\' has an invalid outputSchema: ${n}`)};a();let o;try{o=await this.request({method:`tools/call`,params:e},await r())}catch(s){let c=s instanceof qp&&s.code===-32020;if(!n||!c||t?.toolDefinition!==void 0)throw s;let l={signal:t?.signal,timeout:t?.timeout,cacheMode:`refresh`};await this._cache.evict(`tools/list`),await this.listTools(void 0,l).catch(e=>this._reportStoreError(e)),i=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),o=await this.request({method:`tools/call`,params:e},await r())}let s=i!==void 0&&i.ok?i.validator:void 0;if(s){if(o.structuredContent===void 0&&!o.isError)throw new qp(B.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent!==void 0&&!o.isError)try{let e=s(o.structuredContent);if(!e.valid)throw new qp(B.InvalidParams,`Structured content does not match the tool\'s output schema: ${e.errorMessage}`)}catch(e){throw e instanceof qp?e:new qp(B.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug(`Client.listTools() called but server does not advertise tools capability - returning empty list`),{tools:[]};if(e?.cursor!==void 0){let n=await this.request({method:`tools/list`,params:e},t);return this._excludeInvalidXMcpHeaderTools(n),n}let n=await this._serveFromCache(`tools/list`,void 0,t);return n===void 0?this._listAllPages(`tools/list`,e,t,e=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e)):n}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!==`modern`||!this.transport||C_(this.transport)===`stdio`)return;let t=e.tools.filter(e=>{let t=qm(e.inputSchema);return t.valid?!0:(console.warn(`[mcp-sdk] excluding tool \'${e.name}\' from tools/list: invalid x-mcp-header declaration \u2014 ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,n,r){let i=ah(kd,n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{s(null,await r())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}};this.setNotificationHandler(t,()=>{if(o){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let n=setTimeout(c,o);this._listChangedDebounceTimers.set(e,n)}else c()})}async sendRootsListChanged(){return this.notification({method:`notifications/roots/list_changed`})}}),class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return rp(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return rp(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,np(this,new.target)}};var H_=class{_eventSlots=new Map;setHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", \u2026) to add multiple listeners without replacing.`),n.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}dispatch(e,t){let n=this._eventSlots.get(e);if(n){n.onHandler?.(t);for(let e of[...n.listeners])e(t)}}_ensureEventSlot(e){let t=this._eventSlots.get(e);return t||(t={listeners:[]},this._eventSlots.set(e,t)),t}},U_=class{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}},W_=new Set;function G_(e,t){let[n,r]=t,i=n?.shape;if(typeof i?.method?.value!=`string`)return;let a=i.method.value,o=e===`request`?`setRequestHandler`:`setNotificationHandler`;W_.has(o)||(W_.add(o),console.warn(`[ext-apps] ${o}(Schema, handler) is deprecated; use ${o}("${a}", { params: Schema.shape.params }, handler).`));let s=r;return[a,{params:i.params},e===`request`?(e,t)=>s({method:a,params:e},K_(t)):e=>s({method:a,params:e})]}function K_(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var q_=`2026-01-26`,J_=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=eu.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},Y_=M([F(`light`),F(`dark`)]).describe(`Color theme preference for the host environment.`),X_=M([F(`inline`),F(`fullscreen`),F(`pip`)]).describe(`Display mode for UI presentation.`),Z_=N(M([F(`--color-background-primary`),F(`--color-background-secondary`),F(`--color-background-tertiary`),F(`--color-background-inverse`),F(`--color-background-ghost`),F(`--color-background-info`),F(`--color-background-danger`),F(`--color-background-success`),F(`--color-background-warning`),F(`--color-background-disabled`),F(`--color-text-primary`),F(`--color-text-secondary`),F(`--color-text-tertiary`),F(`--color-text-inverse`),F(`--color-text-ghost`),F(`--color-text-info`),F(`--color-text-danger`),F(`--color-text-success`),F(`--color-text-warning`),F(`--color-text-disabled`),F(`--color-border-primary`),F(`--color-border-secondary`),F(`--color-border-tertiary`),F(`--color-border-inverse`),F(`--color-border-ghost`),F(`--color-border-info`),F(`--color-border-danger`),F(`--color-border-success`),F(`--color-border-warning`),F(`--color-border-disabled`),F(`--color-ring-primary`),F(`--color-ring-secondary`),F(`--color-ring-inverse`),F(`--color-ring-info`),F(`--color-ring-danger`),F(`--color-ring-success`),F(`--color-ring-warning`),F(`--font-sans`),F(`--font-mono`),F(`--font-weight-normal`),F(`--font-weight-medium`),F(`--font-weight-semibold`),F(`--font-weight-bold`),F(`--font-text-xs-size`),F(`--font-text-sm-size`),F(`--font-text-md-size`),F(`--font-text-lg-size`),F(`--font-heading-xs-size`),F(`--font-heading-sm-size`),F(`--font-heading-md-size`),F(`--font-heading-lg-size`),F(`--font-heading-xl-size`),F(`--font-heading-2xl-size`),F(`--font-heading-3xl-size`),F(`--font-text-xs-line-height`),F(`--font-text-sm-line-height`),F(`--font-text-md-line-height`),F(`--font-text-lg-line-height`),F(`--font-heading-xs-line-height`),F(`--font-heading-sm-line-height`),F(`--font-heading-md-line-height`),F(`--font-heading-lg-line-height`),F(`--font-heading-xl-line-height`),F(`--font-heading-2xl-line-height`),F(`--font-heading-3xl-line-height`),F(`--border-radius-xs`),F(`--border-radius-sm`),F(`--border-radius-md`),F(`--border-radius-lg`),F(`--border-radius-xl`),F(`--border-radius-full`),F(`--border-width-regular`),F(`--shadow-hairline`),F(`--shadow-sm`),F(`--shadow-md`),F(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),M([T(),Mc()]).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`);A({method:F(`ui/open-link`),params:A({url:T().describe(`URL to open in the host\'s browser`)})});var Q_=A({isError:D().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),$_=A({isError:D().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),ev=A({isError:D().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();A({method:F(`ui/notifications/sandbox-proxy-ready`),params:A({})});var tv=A({connectDomains:k(T()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP \\`connect-src\\` directive\n- Empty or omitted \u2192 no network connections (secure default)`),resourceDomains:k(T()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\\n\\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\\n- Wildcard subdomains supported: `https://*.example.com`\\n- Empty or omitted \u2192 no network resources (secure default)"),frameDomains:k(T()).optional().describe("Origins for nested iframes.\\n\\n- Maps to CSP `frame-src` directive\\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src \'none\'`)"),baseUriDomains:k(T()).optional().describe("Allowed base URIs for the document.\\n\\n- Maps to CSP `base-uri` directive\\n- Empty or omitted \u2192 only same origin allowed (`base-uri \'self\'`)")}),nv=A({camera:A({}).optional().describe(`Request camera access.\n\nMaps to Permission Policy \\`camera\\` feature.`),microphone:A({}).optional().describe(`Request microphone access.\n\nMaps to Permission Policy \\`microphone\\` feature.`),geolocation:A({}).optional().describe(`Request geolocation access.\n\nMaps to Permission Policy \\`geolocation\\` feature.`),clipboardWrite:A({}).optional().describe(`Request clipboard write access.\n\nMaps to Permission Policy \\`clipboard-write\\` feature.`)});A({method:F(`ui/notifications/size-changed`),params:A({width:E().optional().describe(`New width in pixels.`),height:E().optional().describe(`New height in pixels.`)})});var rv=A({method:F(`ui/notifications/tool-input`),params:A({arguments:N(T(),O().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),iv=A({method:F(`ui/notifications/tool-input-partial`),params:A({arguments:N(T(),O().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),av=A({method:F(`ui/notifications/tool-cancelled`),params:A({reason:T().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),ov=A({fonts:T().optional()}),sv=A({variables:Z_.optional().describe(`CSS variables for theming the app.`),css:ov.optional().describe(`CSS blocks that apps can inject.`)}),cv=A({method:F(`ui/resource-teardown`),params:A({})}),lv=N(T(),O()),uv=A({text:A({}).optional().describe(`Host supports text content blocks.`),image:A({}).optional().describe(`Host supports image content blocks.`),audio:A({}).optional().describe(`Host supports audio content blocks.`),resource:A({}).optional().describe(`Host supports resource content blocks.`),resourceLink:A({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:A({}).optional().describe(`Host supports structured content.`)});A({method:F(`ui/notifications/request-teardown`),params:A({}).optional()});var dv=A({experimental:N(T(),N(T(),Ic()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:A({}).optional().describe(`Host supports opening external URLs.`),downloadFile:A({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:A({listChanged:D().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:A({listChanged:D().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:A({}).optional().describe(`Host accepts log messages.`),sandbox:A({permissions:nv.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:tv.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:uv.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model\'s context for future turns.`),message:uv.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:A({tools:A({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),fv=A({experimental:N(T(),N(T(),Ic()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:A({listChanged:D().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:k(X_).optional().describe(`Display modes the app supports.`)});A({method:F(`ui/notifications/initialized`),params:A({}).optional()}),A({csp:tv.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:nv.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:T().optional().describe(`Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., \\`{hash}.claudemcpcontent.com\\`)\n- URL-derived subdomains (e.g., \\`www-example-com.oaiusercontent.com\\`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:D().optional().describe(`Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts\' defaults may vary.\n\n- \\`true\\`: request visible border + background\n- \\`false\\`: request no visible border + background\n- omitted: host decides border`)}),A({method:F(`ui/request-display-mode`),params:A({mode:X_.describe(`The display mode being requested.`)})});var pv=A({mode:X_.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),mv=M([F(`model`),F(`app`)]).describe(`Tool visibility scope - who can access the tool.`);A({resourceUri:T().optional(),visibility:k(mv).optional().describe(`Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only`),csp:zc().optional(),permissions:zc().optional()}),A({mimeTypes:k(T()).optional().describe(\'Array of supported MIME types for UI resources.\\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.\')}),A({method:F(`ui/download-file`),params:A({contents:k(M([pd,md])).describe(`Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),A({method:F(`ui/message`),params:A({role:F(`user`).describe(`Message role, currently only "user" is supported.`),content:k(hd).describe(`Message content blocks (text, image, etc.).`)})}),A({method:F(`ui/notifications/sandbox-resource-ready`),params:A({html:T().describe(`HTML content to load into the inner iframe.`),sandbox:T().optional().describe(`Optional override for the inner iframe\'s sandbox attribute.`),csp:tv.optional().describe(`CSP configuration from resource metadata.`),permissions:nv.optional().describe(`Sandbox permissions from resource metadata.`)})});var hv=A({method:F(`ui/notifications/tool-result`),params:wd.describe(`Standard MCP tool execution result.`)}),gv=A({toolInfo:A({id:Yl.optional().describe(`JSON-RPC id of the tools/call request.`),tool:xd.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Y_.optional().describe(`Current color theme preference.`),styles:sv.optional().describe(`Style configuration for theming the app.`),displayMode:X_.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:k(X_).optional().describe(`Display modes the host supports.`),containerDimensions:M([A({height:E().describe(`Fixed container height in pixels.`)}),A({maxHeight:M([E(),Mc()]).optional().describe(`Maximum container height in pixels.`)})]).and(M([A({width:E().describe(`Fixed container width in pixels.`)}),A({maxWidth:M([E(),Mc()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:T().optional().describe(`User\'s language and region preference in BCP 47 format.`),timeZone:T().optional().describe(`User\'s timezone in IANA format.`),userAgent:T().optional().describe(`Host application identifier.`),platform:M([F(`web`),F(`desktop`),F(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:A({touch:D().optional().describe(`Whether the device supports touch input.`),hover:D().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:A({top:E().describe(`Top safe area inset in pixels.`),right:E().describe(`Right safe area inset in pixels.`),bottom:E().describe(`Bottom safe area inset in pixels.`),left:E().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),_v=A({method:F(`ui/notifications/host-context-changed`),params:gv.describe(`Partial context update containing only changed fields.`)});A({method:F(`ui/update-model-context`),params:A({content:k(hd).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:N(T(),O().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),A({method:F(`ui/initialize`),params:A({appInfo:cu.describe(`App identification (name and version).`),appCapabilities:fv.describe(`Features and capabilities this app provides.`),protocolVersion:T().describe(`Protocol version this app supports.`)})});var vv=A({protocolVersion:T().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:cu.describe(`Host application identification and version.`),hostCapabilities:dv.describe(`Features and capabilities provided by the host.`),hostContext:gv.describe(`Rich context about the host environment.`)}).passthrough(),yv={target:`draft-2020-12`};async function bv(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](yv);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function xv(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function Sv(e,t){let n={...e,...t};return t.experimental!==void 0&&(n.experimental={...e.experimental,...t.experimental}),t.tools!==void 0&&(n.tools={...e.tools,...t.tools}),n}var Cv=class e extends tg{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new H_;_methods=new U_;setRequestHandler=(...e)=>{let[t,...n]=G_(`request`,e)??e;this._methods.claim(t,`setRequestHandler`),super.setRequestHandler.call(this,t,...n)};setNotificationHandler=(...e)=>{let[t,...n]=G_(`notification`,e)??e;this._methods.claim(t,`setNotificationHandler`),super.setNotificationHandler.call(this,t,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:rv,toolinputpartial:iv,toolresult:hv,toolcancelled:av,hostcontextchanged:_v};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},t=>{let n=t;e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...n}),this._events.dispatch(e,n)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=t,this.options=n,this._methods.replace(`notifications/cancelled`),this._methods.replace(`notifications/progress`),!n.allowUnsafeEval&&yt({jitless:!0}),this.replaceRequestHandler(`ping`,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._appCapabilities=Sv(this._appCapabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._appCapabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await xv(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await xv(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await bv(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await bv(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(`ui/resource-teardown`,{params:cv.shape.params,result:lv},(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(`tools/call`,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(`tools/list`,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized(`createSamplingMessage`),await this.request({method:`sampling/createMessage`,params:e},t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},ev,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},nu,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Q_,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},$_,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},pv,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new J_(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:`ui/initialize`,params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:q_}},vv,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}},wv=e=>`${e}`.split(`.`)[1]?.length??0,Tv=e=>10**-wv(e),Ev=(e,t)=>`${+e.toFixed(wv(t))}`,Dv=class extends Error{},Ov=/[A-Za-z_$][\\w$-]*/y,kv=/-?(?:\\d[\\d_]*\\.?\\d*|\\.\\d+)(?:e[+-]?\\d+)?/iy,Av={amp:`&`,lt:`<`,gt:`>`,quot:`"`,apos:`\'`,nbsp:`\\xA0`},jv=e=>e.replace(/&(#x[\\da-f]+|#\\d+|\\w+);/gi,(e,t)=>t[0]===`#`?String.fromCodePoint(t[1]===`x`||t[1]===`X`?parseInt(t.slice(2),16):+t.slice(1)):Av[t]??e),Mv=e=>e.replace(/\\\\(u\\{[\\da-f]+\\}|u[\\da-f]{4}|x[\\da-f]{2}|[\\s\\S])/gi,(e,t)=>t.length>1?String.fromCodePoint(parseInt(t.replace(/[ux{}]/gi,``),16)):{n:`\n`,t:` `,r:`\\r`,b:`\\b`,f:`\\f`,v:`\\v`,0:`\\0`}[t]??t);function Nv(e){let t=0,n=e=>{throw new Dv(e)},r=()=>e.slice(t,t+12).split(`\n`)[0],i=n=>{n.lastIndex=t;let r=n.exec(e)?.[0];return r&&(t+=r.length),r},a=()=>{for(;;)if(i(/\\s+/y),e.startsWith(`//`,t))i(/\\/\\/.*/y);else if(e.startsWith(`/*`,t)){let n=e.indexOf(`*/`,t+2);t=n<0?e.length:n+2}else return},o=n=>(a(),e.startsWith(n,t)),s=e=>{o(e)||n(`Expected \\`${e}\\` at \\`${r()}\\`.`),t+=e.length};function c(){let a=[i(Ov)??n(`Expected a name at \\`${r()}\\`.`)];for(;e[t]===`.`;)t++,a.push(i(Ov)??n("Expected a name after `.`."));return a}function l(r,i=!1){let a=e[t],o=t+1;for(;o<e.length&&e[o]!==a;)e[o]===`\\\\`&&!i&&o++,o++;o>=e.length&&n(`A string is not closed.`);let s=e.slice(t+1,o);return a==="`"&&s.includes("${")&&n(`A template string cannot run here.`),t=o+1,{type:`string`,value:i?jv(s):Mv(s),quote:a,jsx:i,start:r,end:t}}function u(){a();let r=t,f=e[t];if(f===`"`||f===`\'`||f==="`")return l(r);if(f===`<`)return d();if(f===`(`){t++;let e=u();return s(`)`),e}if(f===`[`){t++;let e=[];for(;!o(`]`);)e.push(u()),o(`]`)||s(`,`);return t++,{type:`array`,items:e,start:r,end:t}}if(f===`{`){t++;let n=[];for(;!o(`}`);){let r=t,i=e[t]===`"`||e[t]===`\'`?l(t).value:c()[0],a={type:`name`,path:[i],start:r,end:t};n.push([i,o(`:`)?(t++,u()):a]),o(`}`)||s(`,`)}return t++,{type:`object`,entries:n,start:r,end:t}}let p=i(kv);if(p)return{type:`number`,value:+p.replace(/_/g,``),start:r,end:t};let m=c(),h=t;if(m.length===1){let e=m[0];if(e===`true`||e===`false`)return{type:`boolean`,value:e===`true`,start:r,end:h};if(e===`null`||e===`undefined`)return{type:e,start:r,end:h}}return o(`(`)&&n(`\\`${m.join(`.`)}()\\` is a call, which cannot run here.`),{type:`name`,path:m,start:r,end:h}}function d(){let f=t;s(`<`);let p=o(`>`)?``:c().join(`.`),m=[];for(;;){if(o(`/>`))return t+=2,{type:`element`,name:p,attributes:m,children:[],start:f,end:t};if(o(`>`))break;let c=t;if(o(`{`)){t++,s(`...`);let e=u();s(`}`),m.push({name:``,value:e,spread:!0,start:c,end:t});continue}let d=i(/[\\w$:-]+/y)??n(`Expected a prop at \\`${r()}\\`.`),h=t,g=null;o(`=`)&&(t++,a(),e[t]===`{`?(t++,g=u(),s(`}`)):g=e[t]===`"`||e[t]===`\'`?l(t,!0):u()),m.push({name:d,value:g,start:c,end:g?t:h})}t++;let h=[];for(;;){t>=e.length&&n(`\\`<${p}>\\` is not closed.`);let r=t;if(e.startsWith(`</`,t)){t+=2,a();let r=e[t]===`>`?``:c().join(`.`);return r!==p&&n(`\\`</${r}>\\` does not close \\`<${p}>\\`.`),s(`>`),{type:`element`,name:p,attributes:m,children:h,start:f,end:t}}e[t]===`<`?h.push(d()):e[t]===`{`?(t++,o(`}`)||h.push(u()),s(`}`)):(t=e.slice(t).search(/[<{]/)+t,t<r&&(t=e.length),h.push({type:`text`,raw:e.slice(r,t),start:r,end:t}))}}let f=[];for(;!o(`;`)&&t<e.length;){e[t]!==`<`&&e[t]!==`(`&&n(`Expected an element at \\`${r()}\\`.`);let i=u();i.type!==`element`&&n(`Expected an element.`),f.push(i)}return f}function Pv(e,t={}){let n=[],r=(e,r,i)=>{let a=t[`${e}.${r}`]??t[r],{value:o}=i,s=i.type===`string`?i.quote:``;a===!1||s==="`"||`${o}`.includes(`\n`)||n.push({prop:r,kind:Array.isArray(a)?`option`:i.type===`string`?`text`:i.type,value:o,range:{start:i.start,end:i.end},quote:s,jsx:i.type===`string`&&(!s||!!i.jsx),step:typeof o==`number`?Tv(o):1,...Array.isArray(a)?{options:a}:a})},i=e=>{for(let{name:t,value:n}of e.attributes)n?.type===`element`?i(n):(n?.type===`string`||n?.type===`number`||n?.type===`boolean`)&&r(e.name,t,n);let[t]=e.children,n=t?.type===`text`?t.raw.trim():``;if(e.children.length===1&&n&&!n.includes(`\n`)){let i=t.start+t.raw.indexOf(n);r(e.name,`children`,{type:`string`,value:jv(n),quote:``,start:i,end:i+n.length})}for(let t of e.children)t.type===`element`&&i(t)};return e.forEach(i),n}function Fv(e,t){let{quote:n}=e;if(typeof t!=`string`){let r=typeof t==`number`?Ev(t,e.step):`${t}`;return e.jsx&&n?`{${r}}`:r}if(!e.jsx){let e=n||`"`;return e+t.replaceAll(`\\\\`,`\\\\\\\\`).replaceAll(e,`\\\\${e}`)+e}let r=t.replaceAll(`&`,`&`).replaceAll(`<`,`<`);return n?n+r.replaceAll(n,n===`"`?`"`:`'`)+n:r.replaceAll(`>`,`>`).replaceAll(`{`,`{`).replaceAll(`}`,`}`)}function Iv(e,t,n){let{start:r,end:i}=t.range;return e.slice(0,r)+Fv(t,n)+e.slice(i)}function Lv(e){let t=[],n=e=>{for(let r of e.attributes)!r.value&&!r.spread?t.push(r.end):r.value?.type===`element`&&n(r.value);for(let t of e.children)t.type===`element`&&n(t)};return Nv(e).forEach(n),t.reverse().reduce((e,t)=>e.slice(0,t)+`={true}`+e.slice(t),e)}var Rv=new Set(`as async await break case catch class const continue default delete do else enum export extends false finally for from function if import in instanceof interface let new null of return satisfies static switch this throw true try type typeof undefined var void while yield`.split(` `)),zv=/^(|[(,=:?[{}>&|!]|return)$/;function Bv(e){let t=[],n=[{in:`code`,depth:0}],r=0,i=``,a=t=>(t.lastIndex=r,t.exec(e)?.[0]??``),o=(e,n)=>{n&&t.push({ink:e,start:r,end:r+n}),r+=n},s=t=>{let n=r+1;for(;n<e.length&&e[n]!==t;)n+=e[n]===`\\\\`?2:1;o(`string`,Math.min(n+1,e.length)-r)};for(;r<e.length;){let t=n[n.length-1],c=e[r];if(t.in===`text`){if(c===`{`)r++,n.push({in:`code`,depth:0});else if(c===`<`)r++,e[r]===`/`?(r++,o(`tag`,a(/[\\w$.:-]*/y).length),r=Math.max(r,e.indexOf(`>`,r)+1),n.pop()):n.push({in:`tag`,named:!1});else{let t=e.slice(r).search(/[<{]/);r=t<0?e.length:r+t}continue}if(t.in===`tag`){let i=a(/[\\w$.:-]+/y);i?o(t.named?`attribute`:`tag`,i.length):c===`"`||c===`\'`?s(c):c===`{`?(r++,n.push({in:`code`,depth:0})):c===`>`?(r++,n[n.length-1]={in:`text`}):e.startsWith(`/>`,r)?(r+=2,n.pop()):r++,t.named=!0;continue}let l=a(/\\s+|\\/\\/.*|\\/\\*[\\s\\S]*?(\\*\\/|$)/y);if(l){r+=l.length;continue}let u=a(/[A-Za-z_$][\\w$]*/y);if(u){let t=e.slice(r+u.length).match(/^\\s*(\\S)/)?.[1],n=Rv.has(u)?`keyword`:t===`(`||/^[A-Z]/.test(u)?`tag`:e[r-1]===`.`||t===`:`&&i!==`?`?`attribute`:void 0;n?o(n,u.length):r+=u.length,i=u===`return`?u:`name`;continue}let d=a(/\\d[\\d_]*\\.?\\d*(e[+-]?\\d+)?n?|\\.\\d+/iy);if(d){o(`keyword`,d.length),i=`name`;continue}if(c===`"`||c===`\'`||c==="`"){s(c),i=`name`;continue}if(c===`<`&&zv.test(i)&&/[A-Za-z>]/.test(e[r+1]??``)){r++,n.push({in:`tag`,named:e[r]===`>`}),e[r]===`>`&&(r++,n[n.length-1]={in:`text`});continue}if(c===`{`&&t.depth++,c===`}`){if(t.depth===0&&n.length>1){r++,n.pop();continue}t.depth--}i=e.startsWith(`&&`,r)||e.startsWith(`||`,r)?`&`:c,r++}return t}var Vv=`.cc{--cc-surface:light-dark(#fff,oklch(17.5% 0 0));--cc-subtle:light-dark(oklch(93% 0 0),oklch(24.5% 0 0));--cc-sunken:light-dark(oklch(89.5% 0 0),oklch(21% 0 0));--cc-foreground:light-dark(oklch(22.7% .006 271.2),oklch(92.3% .004 286.3));--cc-secondary:light-dark(oklch(41.8% .014 274.6),oklch(78.2% .016 281.9));--cc-muted:light-dark(oklch(52% .044 267.6),oklch(67.3% .028 276.2));--cc-disabled:light-dark(oklch(72% .01 270),oklch(48% .01 280));--cc-text:light-dark(oklch(49% .04 268),oklch(67.3% .028 276.2));--cc-line:light-dark(oklch(59% .02 270),oklch(51% .02 276));--cc-tag:light-dark(oklch(46% .185 145.3),oklch(84.4% .185 145.3));--cc-attribute:light-dark(oklch(46% .088 229.9),oklch(85.7% .088 229.9));--cc-string:light-dark(oklch(46% .191 32.2),oklch(71.2% .191 32.2));--cc-keyword:light-dark(oklch(46% .2 317.2),oklch(76.9% .2 317.2));--cc-sans:Geist, ui-sans-serif, system-ui, sans-serif;--cc-mono:"Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;--cc-ease:.24s cubic-bezier(.2, .9, .3, 1);--copy:0;--reset:0;--split:.5;--seam:min(2px, var(--split) * (100cqw - 4px), (1 - var(--split)) * (100cqw - 4px));--edge:calc(2px + var(--split) * (100cqw - 4px - var(--seam)));box-sizing:border-box;outline:1px solid var(--cc-subtle);background:var(--cc-subtle);width:100%;color:var(--cc-foreground);font:16px/24px var(--cc-sans);text-align:left;-webkit-font-smoothing:antialiased;border-radius:8px;position:relative;overflow:hidden;container-type:inline-size}.cc[data-theme=light]{color-scheme:light}.cc[data-theme=dark]{color-scheme:dark}.cc *,.cc :before,.cc :after{box-sizing:inherit}.cc-frame{background:var(--cc-surface);gap:2px;padding:2px;display:grid}.cc-split{inset:0 auto;left:calc(var(--edge) + var(--seam) / 2 - 5px);width:14px;translate:max(-8px, min(0px, (1 - var(--split)) * (100cqw - 4px - var(--seam)) - 8px));cursor:grab;touch-action:none;display:none;position:absolute}.cc-split:active{cursor:grabbing}.cc-split:before,.cc-split:after{content:"";transition:.4s linear(0, .48, 1, 1.13, 1.06, 1, .98, 1);transition-property:opacity,scale;position:absolute}.cc-split:before{top:calc(50% - 29.315px);left:calc(var(--seam) / 2 + 4px);transform-origin:1px;background:var(--cc-surface);width:9px;height:58.63px;mask:url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'3 0 9 58.63\'%3E%3Cpath d=\'M3 0H4A6 6 0 0 0 8 5.66A6 6 0 0 1 12 11.31V47.31A6 6 0 0 1 8 52.97A6 6 0 0 0 4 58.63H3Z\'/%3E%3C/svg%3E")}.cc-split:after{top:calc(50% - 20px);left:calc(var(--seam) / 2 + 5px);transform-origin:0;background:var(--cc-disabled);border-radius:2px;width:4px;height:40px}.cc-split:not(:hover,:active):before,.cc-split:not(:hover,:active):after{opacity:0;scale:.8}.cc-split:active:before,.cc-split:active:after{scale:1.1}@container (width>=640px){.cc-frame{grid-template-columns:calc(var(--split) * (100% - var(--seam))) minmax(0, 1fr);column-gap:var(--seam)}.cc-preview{overflow:clip}.cc-code{clip-path:inset(-2px 0 0 -2px)}.cc>.cc-tab{--cut:calc(var(--edge) + var(--seam) - 2px);clip-path:polygon(-1px -1px, calc(var(--cut) + 6px) -1px, calc(var(--cut) + 6px) 0, calc(var(--cut) + 4.45px) .2px, calc(var(--cut) + 3px) .8px, calc(var(--cut) + 1.76px) 1.76px, calc(var(--cut) + .8px) 3px, calc(var(--cut) + .2px) 4.45px, var(--cut) 6px, var(--cut) calc(100% + 6px), -1px calc(100% + 6px))}.cc-split{display:block}.cc[data-only]>.cc-frame{grid-template-columns:minmax(0,1fr)}.cc[data-only]>.cc-tab{clip-path:none}}.cc{--share:.5;--seam-y:2px;--edge-y:var(--rest,0px)}.cc[data-stack]{--seam-y:min(2px, var(--share) * var(--stack), (1 - var(--share)) * var(--stack));--edge-y:calc(2px + var(--share) * (var(--stack) - var(--seam-y)))}@container (width<640px){.cc[data-stack]>.cc-frame{height:calc(var(--stack) + 4px);grid-template-rows:calc(var(--share) * (100% - var(--seam-y))) minmax(0, 1fr);row-gap:var(--seam-y)}.cc[data-stack] .cc-preview{min-height:0;overflow:clip}.cc[data-stack] .cc-code{clip-path:inset(-2px -2px 0);flex-direction:column;min-height:0;padding-top:0;display:flex}.cc[data-stack] .cc-body{flex-grow:1;min-height:0;margin-top:22px;overflow-y:auto}.cc[data-stack][data-tabs=hidden] .cc-body{margin-top:0}.cc[data-stack]>.cc-tab{clip-path:inset(-1px -7px calc(26px - var(--edge-y) - var(--seam-y)) -1px)}.cc-split{inset:auto 0;top:calc(var(--edge-y) + var(--seam-y) / 2 - 5px);width:auto;height:14px;translate:0 max(-8px, min(0px, (1 - var(--share)) * (var(--stack,100vh) - var(--seam-y)) - 8px));display:block}.cc-split:before{top:calc(var(--seam-y) / 2 + 4px);transform-origin:50% 1px;width:58.63px;height:9px;left:calc(50% - 29.315px);mask-image:url("data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 3 58.63 9\'%3E%3Cpath d=\'M0 3V4A6 6 0 0 1 5.66 8A6 6 0 0 0 11.31 12H47.31A6 6 0 0 0 52.97 8A6 6 0 0 1 58.63 4V3Z\'/%3E%3C/svg%3E")}.cc-split:after{top:calc(var(--seam-y) / 2 + 5px);transform-origin:50% 0;width:40px;height:4px;left:calc(50% - 20px)}}.cc-preview{place-items:center;min-width:0;padding:48px 24px 24px;display:grid}.cc[data-tabs=hidden] .cc-preview{padding-top:24px}.cc[data-tabs=hidden] .cc-code{padding-top:0}.cc-problem{color:var(--cc-muted);font:14px/20px var(--cc-sans);text-align:center;margin:0}.cc-tab{--inset:0px;top:calc(var(--inset) * -1);left:calc(var(--inset) * -1);background:var(--ground);height:24px;color:var(--cc-muted);font:12px/16px var(--cc-sans);white-space:nowrap;pointer-events:none;border-bottom-right-radius:6px;align-items:center;padding:0 8px;display:flex;position:absolute}.cc-tab:before,.cc-tab:after{content:"";background:radial-gradient(circle at 100% 100%, #0000 6px, var(--ground) 6.5px);width:6px;height:6px;position:absolute}.cc-tab:before{top:var(--inset);left:100%}.cc-tab:after{top:100%;left:var(--inset)}.cc>.cc-tab{--ground:var(--cc-subtle)}.cc-code{--ground:var(--cc-surface);--tint:var(--cc-text);background:var(--cc-sunken);min-width:0;color:var(--cc-text);font:14px/24px var(--cc-mono);border-radius:6px;padding-top:22px;position:relative}.cc-code>.cc-tab{--inset:2px}.cc-body{display:flex}.cc-lines{color:var(--cc-line);text-align:right;white-space:pre;-webkit-user-select:none;user-select:none;flex-shrink:0;padding:16px 4px 16px 16px}.cc-scroll{scrollbar-width:thin;scrollbar-color:var(--cc-disabled) #0000;flex-grow:1;min-width:0;padding:16px 16px 16px 4px;overflow-x:auto}.cc .cc-scroll>code{all:unset;white-space:pre;tab-size:2;width:max-content;min-width:100%;display:block}.cc-tag{color:var(--cc-tag)}.cc-attribute{color:var(--cc-attribute)}.cc-string{--tint:var(--cc-string);color:var(--cc-string)}.cc-keyword{--tint:var(--cc-keyword);color:var(--cc-keyword)}.cc-box{all:unset;background:color-mix(in srgb, var(--tint) 14%, #0000);white-space:pre;cursor:pointer;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:#0000;border-radius:4px;margin:0 -2px;padding:0 4px;line-height:20px;display:inline-block}.cc-box:is(:hover,:focus-within,[aria-expanded=true]){background:color-mix(in srgb, var(--tint) 28%, #0000)}:is(.cc-box,.cc-action,.cc-menu>button):focus-visible{outline-offset:-2px;outline:2px solid}.cc-scrub{cursor:ew-resize;touch-action:pan-y}.cc-field{cursor:text;min-width:8px;display:inline-grid}.cc-field:after{content:attr(data-value);visibility:hidden;white-space:pre;grid-area:1/1}.cc-field>input{all:unset;grid-area:1/1;width:100%;min-width:0}.cc-menu{min-width:96px;font:14px/20px var(--cc-mono);border:0;margin:0;padding:2px;display:none;position:fixed;inset:auto}.cc-menu,.cc-code:after{background:var(--cc-subtle);color:var(--cc-secondary);border-radius:8px;box-shadow:0 8px 24px oklch(0% 0 0/.12)}.cc-menu:popover-open{gap:2px;display:grid}.cc-menu>button{all:unset;white-space:pre;cursor:pointer;border-radius:6px;align-items:center;gap:16px;height:32px;padding:0 8px;display:flex}.cc-menu>button:is(:hover,:focus){background:var(--cc-sunken);color:var(--cc-foreground)}.cc-menu>[aria-checked=true]:after{content:"\u2713";color:var(--cc-muted);margin-left:auto}.cc-code:is(:hover,:has(:focus-visible)){--copy:1}@media (hover:none){.cc-code{--copy:1}}.cc-changed{--reset:1}.cc-actions{--open:max(var(--copy), var(--reset));padding:0 calc(var(--open) * 4px) 0 0;pointer-events:auto;transition:padding var(--cc-ease);border-radius:0 0 0 6px;top:-2px;left:auto;right:-2px}.cc-actions:before,.cc-actions:after{background:radial-gradient(circle at 0 100%, #0000 6px, var(--ground) 6.5px);opacity:var(--open);transition:opacity var(--cc-ease);left:auto}.cc-actions:before{right:100%}.cc-actions:after{right:var(--inset)}.cc-slot{--shown:var(--copy);width:calc(var(--shown) * 24px);transition:width var(--cc-ease);justify-content:flex-end;display:flex;overflow:hidden}.cc-note,.cc-reset{--shown:var(--reset)}.cc-action{all:unset;width:20px;height:20px;color:var(--cc-muted);cursor:pointer;transform:translateX(calc((1 - var(--shown)) * 24px));transition:transform var(--cc-ease);border-radius:4px;flex-shrink:0;place-items:center;display:grid}.cc-action:hover{color:var(--cc-foreground)}.cc-action svg{fill:none;stroke:currentColor;stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.cc-code:after{content:attr(data-note);font:12px/16px var(--cc-sans);white-space:nowrap;opacity:0;transition:opacity var(--cc-ease);pointer-events:none;padding:4px 8px;position:absolute;top:26px;right:4px}.cc-code:has(.cc-note :is(:hover,:focus)):after{opacity:1}@media (prefers-reduced-motion:reduce){.cc *{transition:none!important}}`,Hv=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),V=c(o(((e,t)=>{t.exports=Hv()}))(),1),Uv=Vv;function Wv(e,t){(0,d.useInsertionEffect)(()=>{if(document.getElementById(e))return;let n=document.createElement(`style`);n.id=e,n.textContent=t,document.head.prepend(n)},[])}function Gv(e){let t=e.replace(/^\\s*\\n/,``).trimEnd().split(`\n`),n=Math.min(...t.filter(e=>e.trim()).map(e=>e.search(/\\S/)));return t.map(e=>e.slice(n)).join(`\n`)}var Kv=e=>e.kind===`boolean`||typeof e.value==`number`?`cc-box cc-keyword`:e.quote?`cc-box cc-string`:`cc-box`,qv=`M8 7.5h7.5v8H8zM12 4.5H4.5v8`,Jv=`M5 10.5l3 3 7-7`,Yv=`M5 8.5a5.5 5.5 0 1 1 .5 4.5M5 4.5v4h4`,Xv=`M16 10a6 6 0 1 1-12 0a6 6 0 0 1 12 0M10 9.5V13m0-6v.01`;function Zv({control:e,onChange:t,written:n}){let{min:r=-1/0,max:i=1/0,step:a}=e,o=e.value,s=(0,d.useRef)(null),c=i-r<1/0?Math.min(12,Math.max(2,240*a/(i-r))):6,l=()=>s.current=null,u=e=>{e=Math.min(i,Math.max(r,e)),e!==o&&t(e)};return(0,V.jsx)(`span`,{className:`${Kv(e)} cc-scrub`,role:`slider`,tabIndex:0,"aria-label":e.prop,"aria-valuenow":o,"aria-valuemin":r>-1/0?r:void 0,"aria-valuemax":i<1/0?i:void 0,onPointerDown:e=>{e.currentTarget.setPointerCapture(e.pointerId),s.current={x:e.clientX,value:o}},onPointerMove:e=>{if(s.current){let t=Math.round((e.clientX-s.current.x)/c);u(s.current.value+t*a)}},onPointerUp:l,onPointerCancel:l,onKeyDown:e=>{let t=e.shiftKey?a*10:a,n={ArrowUp:o+t,ArrowRight:o+t,ArrowDown:o-t,ArrowLeft:o-t,Home:r,End:i}[e.key];n!==void 0&&isFinite(n)&&(e.preventDefault(),u(n))},children:n})}function Qv({control:e,onChange:t,written:n}){return(0,V.jsx)(`button`,{type:`button`,className:Kv(e),"aria-label":e.prop,"aria-pressed":e.value,onClick:()=>t(!e.value),children:n})}function $v({control:e,onChange:t}){let n=`${e.value}`,{quote:r}=e;return(0,V.jsxs)(`label`,{className:Kv(e),children:[r,(0,V.jsx)(`span`,{className:`cc-field`,"data-value":n,children:(0,V.jsx)(`input`,{size:1,value:n,"aria-label":e.prop,spellCheck:!1,onChange:e=>t(e.target.value),onKeyDown:e=>{(e.key===`Enter`||e.key===`Escape`)&&e.currentTarget.blur()}})}),r]})}function ey({control:e,onChange:t,written:n}){let r=(0,d.useRef)(null),i=(0,d.useRef)(null),[a,o]=(0,d.useState)(!1),s=t=>{let n=typeof t==`string`?e.quote:``;return n+t+n},c=()=>[...r.current.children];return(0,d.useEffect)(()=>{let e=r.current,t=e=>o(e.newState===`open`),n=()=>e.matches(`:popover-open`)&&e.hidePopover();return e.addEventListener(`toggle`,t),addEventListener(`scroll`,n,!0),()=>{e.removeEventListener(`toggle`,t),removeEventListener(`scroll`,n,!0)}},[]),(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(`button`,{ref:i,type:`button`,className:Kv(e),"aria-haspopup":`menu`,"aria-expanded":a,"aria-label":e.prop,onClick:e=>{let t=r.current,{left:n,bottom:i}=e.currentTarget.getBoundingClientRect();t.style.left=`${n}px`,t.style.top=`${i+4}px`,t.showPopover(),t.querySelector(`[aria-checked=true]`)?.focus()},children:n}),(0,V.jsx)(`div`,{ref:r,className:`cc-menu`,popover:`auto`,role:`menu`,onKeyDown:e=>{let t=c(),n=t.indexOf(document.activeElement),{key:r}=e,a=r.length===1&&[...t.slice(n+1),...t].find(e=>e.textContent.replace(/^\\W/,``).startsWith(r)),o=a?t.indexOf(a):{ArrowDown:n+1,ArrowUp:n-1,Home:0,End:-1}[r];r===`Escape`&&i.current.focus(),o!==void 0&&(e.preventDefault(),t.at(o%t.length).focus())},children:e.options.map(n=>(0,V.jsx)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":n===e.value,onClick:()=>t(n),children:s(n)},`${n}`))})]})}function ty({source:e,tokens:t,controls:n,onChange:r}){let i=[],a=0,o=0,s=n=>{for(;a<n;){for(;o<t.length&&t[o].end<=a;)o++;let r=t[o];if(r&&r.start<=a){let t=Math.min(r.end,n);i.push((0,V.jsx)(`span`,{className:`cc-${r.ink}`,children:e.slice(a,t)},a)),a=t}else{let t=Math.min(r?.start??n,n);i.push(e.slice(a,t)),a=t}}};return n.forEach((t,n)=>{s(t.range.start);let o={control:t,written:e.slice(t.range.start,t.range.end),onChange:e=>r(t,e)},c={boolean:Qv,number:Zv,option:ey,text:$v}[t.kind];i.push((0,V.jsx)(c,{...o},`c${n}`)),a=t.range.end}),s(e.length),(0,V.jsxs)(`div`,{className:`cc-body`,children:[(0,V.jsx)(`div`,{className:`cc-lines`,"aria-hidden":!0,children:e.split(`\n`).map((e,t)=>t+1).join(`\n`)}),(0,V.jsx)(`div`,{className:`cc-scroll`,children:(0,V.jsx)(`code`,{children:i})})]})}function ny({slot:e,label:t,d:n,hidden:r,onClick:i}){return(0,V.jsx)(`span`,{className:`cc-slot${e}`,children:(0,V.jsx)(`button`,{type:`button`,className:`cc-action`,"aria-label":t,tabIndex:r?-1:0,onClick:i,children:(0,V.jsx)(`svg`,{width:`20`,height:`20`,viewBox:`0 0 20 20`,"aria-hidden":!0,children:(0,V.jsx)(`path`,{d:n})})})})}function ry({source:e,changed:t,note:n,onReset:r}){let[i,a]=(0,d.useState)(!1);return(0,V.jsxs)(`div`,{className:`cc-tab cc-actions${t?` cc-changed`:``}`,children:[n&&(0,V.jsx)(ny,{slot:` cc-note`,label:n,d:Xv,hidden:!t}),(0,V.jsx)(ny,{slot:` cc-reset`,label:`Reset code`,d:Yv,hidden:!t,onClick:r}),(0,V.jsx)(ny,{slot:``,label:i?`Copied`:`Copy code`,d:i?Jv:qv,onClick:()=>navigator.clipboard.writeText(e).then(()=>{a(!0),setTimeout(()=>a(!1),1500)})})]})}var iy=(2*Math.PI/.35)**2,ay=4*Math.PI/.35;function oy(e,t,n,r){let i={min:n,closed:r===void 0?0:r*2-1,to:r??.5,home:.5,off:0,speed:0,track:1,show(){e.style.setProperty(t,`${Math.min(1,Math.max(0,i.to+i.off))}`)},jump(e){i.off=matchMedia(`(prefers-reduced-motion: reduce)`).matches?0:i.off+i.to-e,i.to=e,o||=(a=performance.now(),requestAnimationFrame(s))},ease(e){let t=n-e;return t<=0?e:t>n/2?0:n-n/4*(1-Math.exp(-4*t/n))},stop:()=>cancelAnimationFrame(o)},a=0,o=0,s=e=>{let t=Math.min(.05,(e-a)/1e3);a=e;for(let e=0;e<t;e+=.001)i.speed-=(iy*i.off+ay*i.speed)*.001,i.off+=i.speed*.001;Math.abs(i.off)*i.track<.5?i.off=i.speed=o=0:o=requestAnimationFrame(s),i.show()};return i}function sy({start:e}){let t=(0,d.useRef)(null);return(0,d.useEffect)(()=>{let n=t.current,r=n.parentElement,i=r.firstElementChild,a=i.firstElementChild,o=oy(r,`--split`,160,e),s=oy(r,`--share`,80),c=o,l,u=()=>c=r.clientWidth<640?s:o,d=e=>c===s?e.clientY:e.clientX,f=globalThis.ResizeObserver&&new ResizeObserver(()=>r.style.setProperty(`--rest`,`${a.offsetTop+a.offsetHeight}px`));f?.observe(a),n.onpointerdown=e=>{if(!e.button){if(e.preventDefault(),n.setPointerCapture(e.pointerId),u()===s){if(!(`stack`in r.dataset)){let e=i.clientHeight-4;s.to=s.home=a.offsetHeight/(e-2),s.show(),r.style.setProperty(`--stack`,`${e}px`),r.dataset.stack=``}s.track=i.clientHeight-6}else o.track=i.clientWidth-6;l=d(e)-c.to*c.track}},n.onpointermove=e=>{if(l===void 0)return;if(!(e.buttons&1))return p();let{track:t}=c,n=d(e)-l;if(c.closed){let e=c.closed<0?Math.min(n,0):Math.max(n-t,0);if(l+=e,n-=e,(c.closed<0?n:t-n)<c.min){c.to=n/t,c.show();return}c.closed=0}let r=c.ease(n),i=c.ease(t-n);c.closed=r?+!i:-1,c.closed?(c.jump(c.closed<0?0:1),l=d(e)-c.to*t):c.to=(r===n?t-i:r)/t,c.show()};let p=()=>{if(l===void 0)return;l=void 0;let{min:e,track:t}=c,n=c.to*t,r=Math.min(n,t-n);c.closed&&r<e/2?c.jump(c.closed<0?0:1):r<e&&(c.closed=0,c.jump((n<e?e:t-e)/t))};return n.onpointerup=n.onpointercancel=n.onlostpointercapture=p,n.ondblclick=()=>{u()===s&&!(`stack`in r.dataset)||(c.closed=0,c.jump(c.home))},()=>{o.stop(),s.stop(),f?.disconnect()}},[]),(0,V.jsx)(`div`,{ref:t,className:`cc-split`,"aria-hidden":!0})}function cy({className:e,theme:t,title:n=`Preview`,tabs:r=!0,collapsed:i,only:a,preview:o,tab:s,source:c,changed:l,note:u,onReset:d,...f}){let p=a||!i?void 0:+(i===`code`);return(0,V.jsxs)(`div`,{className:e?`cc ${e}`:`cc`,"data-theme":t,"data-tabs":r?void 0:`hidden`,"data-only":a,style:p===void 0?void 0:{"--split":p},children:[(0,V.jsxs)(`div`,{className:`cc-frame`,children:[a!==`code`&&(0,V.jsx)(`div`,{className:`cc-preview`,children:o}),a!==`preview`&&(0,V.jsxs)(`div`,{className:`cc-code`,"data-note":u,children:[r&&s,(0,V.jsx)(ry,{source:c,changed:l,note:u,onReset:d}),(0,V.jsx)(ty,{source:c,...f})]})]}),r&&a!==`code`&&(0,V.jsx)(`div`,{className:`cc-tab`,children:n}),!a&&(0,V.jsx)(sy,{start:p})]})}var ly=Symbol(),uy=e=>jv(e.split(/\\s*\\n\\s*/).filter(Boolean).join(` `));function dy(e,t){let[n,...r]=e;if(!Object.hasOwn(t,n))throw new Dv(`\\`${n}\\` is not in \\`scope\\`.`);let i=t[n];for(let e of r)i=i?.[e];if(i===void 0)throw new Dv(`\\`${e.join(`.`)}\\` is not in \\`scope\\`.`);return i}function fy(e,t){switch(e.type){case`element`:return my(e,t);case`name`:return dy(e.path,t);case`array`:return e.items.map(e=>fy(e,t));case`object`:return Object.fromEntries(e.entries.map(([e,n])=>[e,fy(n,t)]));case`null`:return null;case`undefined`:return;default:return e.value}}function py(e,t){return e.type===`text`?uy(e.raw)||null:fy(e,t)}function my(e,t){let n=e.name?/^[a-z][^.]*$/.test(e.name)?e.name:dy(e.name.split(`.`),t):d.Fragment,r={},i=t[ly];for(let a of e.attributes){let e=typeof n!=`string`&&i?.get(a.value?.start);if(e){let{name:t}=a;r[`on${t[0].toUpperCase()}${t.slice(1)}Change`]=e}a.spread?Object.assign(r,fy(a.value,t)):r[a.name]=!a.value||fy(a.value,t)}return(0,d.createElement)(n,r,...e.children.map(e=>py(e,t)))}var hy=Uv,gy=class extends d.Component{state={};static getDerivedStateFromError(e){return{problem:e instanceof Error?e.message:`${e}`}}static getDerivedStateFromProps({source:e},t){return t.source===e?null:{source:e,problem:void 0}}render(){let{problem:e}=this.state;return e?(0,V.jsx)(`p`,{className:`cc-problem`,children:e}):this.props.children}};function _y({code:e,file:t=`Code`,theme:n,note:r,className:i,scope:a,interactive:o,controls:s,onChange:c,children:l,...u}){Wv(`component-code`,hy);let f=(0,d.useMemo)(()=>{let t=Gv(e);try{return o?Lv(t):t}catch{return t}},[e,o]),[p,m]=(0,d.useState)({from:f,to:f});p.from!==f&&m({from:f,to:f});let h=p.from===f?p.to:f,g=(0,d.useMemo)(()=>Bv(h),[h]),_=(e,t)=>{let n=Iv(h,e,t);m({from:f,to:n}),c?.({prop:e.prop,value:t,code:n})},v=l,y,ee=[];if(a)try{let e=Nv(h);o&&(ee=Pv(e,s));let t={...a,[ly]:new Map(ee.map(e=>[e.range.start,t=>typeof t==typeof e.value&&_(e,t)]))};v=(0,d.createElement)(d.Fragment,null,...e.map(e=>my(e,t)))}catch(e){if(!(e instanceof Dv))throw e;y=e.message}return(0,V.jsx)(cy,{className:i,theme:n,...u,preview:y?(0,V.jsx)(`p`,{className:`cc-problem`,children:y}):(0,V.jsx)(gy,{source:h,children:v}),tab:(0,V.jsx)(`div`,{className:`cc-tab`,children:t}),source:h,changed:h!==f,note:r,onReset:()=>m({from:f,to:f}),tokens:g,controls:ee,onChange:_})}function vy(){let e=document.documentElement,t=document.currentScript.previousElementSibling,n=e=>parent.postMessage(e,`*`);addEventListener(`message`,e=>{e.source===parent&&(t.textContent=e.data.css)}),addEventListener(`error`,e=>n({problem:e.message})),addEventListener(`unhandledrejection`,e=>n({problem:`${e.reason?.message??e.reason}`})),new ResizeObserver(()=>n({height:e.getBoundingClientRect().height})).observe(e),addEventListener(`load`,()=>n({ready:!0}))}var yy=(e,t)=>e.replace(RegExp(`</${t}`,`gi`),`<\\\\/${t}`);function by(e,t,n,r){return`<!doctype html><html><head><meta charset="utf-8"><style>:root{${r}}body{margin:0}</style><style>${yy(t,`style`)}</style><script>(${vy})()<\\/script></head><body>${e}<script>${yy(n,`script`)}<\\/script></body></html>`}function xy(e,t){let n,r,i,a,o=``,s=e=>e?.contentWindow?.postMessage({css:o},`*`),c=({source:e,data:o})=>{let c=[n,r].find(t=>t&&t.contentWindow===e);if(!(!c||typeof o!=`object`||!o)&&(o.height!==void 0&&(c.style.height=`${Math.ceil(o.height)}px`),o.problem&&(c===n?t(o.problem):a??=o.problem),o.ready&&c===r)){n?.remove(),n=c,r=void 0,c.dataset.shown=``,s(c),t(a),a=void 0;let e=i;i=void 0,e?.()}};return addEventListener(`message`,c),{run(t,a,s){let c=()=>{r=document.createElement(`iframe`),r.setAttribute(`sandbox`,`allow-scripts`),r.title=`Preview`,n&&(r.style.height=n.style.height),r.srcdoc=by(t,o,a,s),e.append(r)};r?i=c:c()},css(e){o=e,s(n),s(r)},stop(){removeEventListener(`message`,c),n?.remove(),r?.remove()}}}var Sy=/^-?(?:\\d+\\.?\\d*|\\.\\d+)$/,Cy=e=>/\\.css$/i.test(e)?`css`:/\\.m?js$/i.test(e)?`js`:`html`;function wy(e,t,n,r,i,a=``){let o=Array.isArray(t);return{prop:e,kind:o?`option`:typeof n==`string`?`text`:typeof n,value:n,range:{start:r,end:i},quote:a,jsx:!1,step:typeof n==`number`?Tv(n):1,...o?{options:t}:t===!0?{}:t}}var Ty=e=>(t,n,r)=>{r&&e.push({ink:t,start:n,end:n+r})},Ey=/\\x3C!--[\\s\\S]*?(?:-->|$)|<[!/]?([A-Za-z][\\w:-]*)([^>]*)>?/g,Dy=/([^\\s"\'=<>/]+)(?:\\s*=\\s*("[^"]*"?|\'[^\']*\'?|[^\\s>]+))?/g;function Oy(e,t){let n=[],r=[],i=Ty(n),a=new RegExp(Ey),o;for(;o=a.exec(e);){let[n,s,c]=o;if(!s)continue;let l=o.index+n.indexOf(s);i(`tag`,l,s.length);let u=s.toLowerCase();for(let e of c.matchAll(Dy)){let[,n,a]=e,o=l+s.length+e.index;if(i(`attribute`,o,n.length),!a)continue;let c=o+e[0].length-a.length;i(`string`,c,a.length);let d=t[`${u}.${n}`]??t[n];if(!d)continue;let f=/^["\']/.test(a)?a[0]:``,p=f?a.slice(1,-1):a;r.push(wy(n,d,Sy.test(p)?+p:p,c,c+a.length,f))}if(n[1]!==`/`&&(u===`script`||u===`style`)){let t=e.indexOf(`</${u}`,a.lastIndex);a.lastIndex=t<0?e.length:t}}return{tokens:n,controls:r}}var ky=/(["\'])(?:\\\\.|(?!\\1)[^\\\\])*\\1?|#[\\da-f]{3,8}\\b|(?<![\\w-])-?(?:\\d+\\.?\\d*|\\.\\d+)(?:[a-z]+|%)?|!important/gi;function Ay(e,t){let n=[],r=[],i=Ty(n),a=0;for(;a<e.length;){let n=/\\s+|\\/\\*[\\s\\S]*?(?:\\*\\/|$)/y;n.lastIndex=a;let o=n.exec(e)?.[0].length;if(o){a+=o;continue}let s=a,c=0;for(;s<e.length;){let t=e[s];if(t===`"`||t===`\'`){let n=e.indexOf(t,s+1);s=n<0?e.length:n+1;continue}if(t===`(`)c++;else if(t===`)`)c--;else if(c<=0&&/[{};]/.test(t))break;s++}let l=e.slice(a,s).trimEnd(),u=l.indexOf(`:`);if(l[0]===`@`)i(`keyword`,a,l.match(/^@[\\w-]*/)[0].length);else if(e[s]===`{`)i(`tag`,a,l.length);else if(u>0){let e=l.slice(0,u).trim();i(`attribute`,a,e.length);let n=l.slice(u+1).search(/\\S/),o=a+u+1+n,s=n<0?``:l.slice(u+1+n);for(let e of s.matchAll(ky))i(e[1]?`string`:`keyword`,o+e.index,e[0].length);let c=t[e],d=s.match(/^(-?(?:\\d+\\.?\\d*|\\.\\d+))([a-z]*|%)$/i);c&&s&&r.push(d&&(!Array.isArray(c)||!d[2])?wy(e,c,+d[1],o,o+d[1].length):wy(e,c,s,o,o+s.length))}a=s+1}return{tokens:n,controls:r}}var jy=/\\b(?:const|let|var)\\s+([A-Za-z_$][\\w$]*)\\s*=\\s*(-?(?:\\d+\\.?\\d*|\\.\\d+)|true|false|(["\'])(?:\\\\.|(?!\\3)[^\\\\\\n])*\\3)(?=[ \\t]*(?:[;,\\n]|$))/g;function My(e,t){let n=[];for(let r of e.matchAll(jy)){let[e,i,a,o=``]=r,s=t[i];if(!s)continue;let c=r.index+e.length-a.length,l=o?a.slice(1,-1).replace(/\\\\(.)/g,`$1`):Sy.test(a)?+a:a===`true`;n.push(wy(i,s,l,c,c+a.length,o))}return{tokens:Bv(e),controls:n}}var Ny={html:Oy,css:Ay,js:My};function Py(e,t,n){let r=typeof n==`number`?Ev(n,t.step):`${n}`;if(e===`css`)return r.replace(/[;{}<]/g,``);let{quote:i}=t;if(e===`html`){let e=r.replaceAll(`&`,`&`).replaceAll(`<`,`<`);return i?i+e.replaceAll(i,i===`"`?`"`:`'`)+i:e}if(typeof n!=`string`)return r;let a=i||`\'`;return a+r.replaceAll(`\\\\`,`\\\\\\\\`).replaceAll(a,`\\\\${a}`).replaceAll(`\n`,`\\\\n`)+a}function Fy(e,t,n,r){let{start:i,end:a}=n.range;return t.slice(0,i)+Py(e,n,r)+t.slice(a)}var Iy=Uv+`.cc .cc-files{pointer-events:auto;padding:0 2px}.cc-files>button{all:unset;cursor:pointer;border-radius:4px;align-items:center;height:20px;padding:0 6px;display:flex}.cc-files>:hover{color:var(--cc-secondary)}.cc-files>[aria-selected=true]{background:var(--cc-sunken);color:var(--cc-foreground)}.cc-files>:focus-visible{outline-offset:-2px;outline:2px solid}.cc-run:not([hidden]){width:100%;display:grid}.cc-run>iframe{opacity:0;pointer-events:none;border:0;grid-area:1/1;width:100%}.cc-run>[data-shown]{opacity:1;pointer-events:auto}`,Ly=(e,t)=>Object.keys(e).filter(e=>Cy(e)===t).map(t=>e[t]).join(`\n`);function Ry({html:e,css:t,js:n,theme:r}){let i=(0,d.useRef)(null),a=(0,d.useRef)(null),[o,s]=(0,d.useState)();return(0,d.useEffect)(()=>{let e=xy(i.current,s);return a.current=e,e.stop},[]),(0,d.useEffect)(()=>a.current.css(t),[t]),(0,d.useEffect)(()=>{let t=matchMedia(`(prefers-color-scheme: dark)`),r=()=>{let{colorScheme:r,color:o,fontFamily:s}=getComputedStyle(i.current),c=r.includes(`dark`)&&(!r.includes(`light`)||t.matches);a.current.run(e,n,`color-scheme:${c?`dark`:`light`};color:${o};font-family:${s}`)};return r(),t.addEventListener(`change`,r),()=>t.removeEventListener(`change`,r)},[e,n,r]),(0,V.jsxs)(V.Fragment,{children:[o&&(0,V.jsx)(`p`,{className:`cc-problem`,children:o}),(0,V.jsx)(`div`,{ref:i,className:`cc-run`,hidden:!!o})]})}function zy({files:e,controls:t={},onChange:n,theme:r,note:i,className:a,...o}){Wv(`component-code-html`,Iy);let s=(0,d.useMemo)(()=>Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Gv(t)])),[JSON.stringify(e)]),c=Object.keys(s),[l,u]=(0,d.useState)(c[0]),f=c.includes(l)?l:c[0],[p,m]=(0,d.useState)({from:s,to:s});p.from!==s&&m({from:s,to:s});let h=p.from===s?p.to:s,g=Cy(f),{tokens:_,controls:v}=Ny[g](h[f],t);return(0,V.jsx)(cy,{className:a,theme:r,...o,preview:(0,V.jsx)(Ry,{html:Ly(h,`html`),css:Ly(h,`css`),js:Ly(h,`js`),theme:r}),tab:(0,V.jsx)(`div`,{className:`cc-tab cc-files`,role:`tablist`,children:c.map(e=>(0,V.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":e===f,onClick:()=>u(e),children:e},e))}),source:h[f],changed:c.some(e=>h[e]!==s[e]),note:i,onReset:()=>m({from:s,to:s}),tokens:_,controls:v,onChange:(e,t)=>{let r=Fy(g,h[f],e,t);m({from:s,to:{...h,[f]:r}}),n?.({file:f,prop:e.prop,value:t,code:r})}})}var By=o((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function ee(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function te(e){if(h=!1,ee(e),!m)if(n(c)!==null)m=!0,ne||(ne=!0,ce());else{var t=n(l);t!==null&&de(te,t.startTime-e)}}var ne=!1,re=-1,ie=5,ae=-1;function oe(){return g?!0:!(e.unstable_now()-ae<ie)}function se(){if(g=!1,ne){var t=e.unstable_now();ae=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(re),re=-1),p=!0;var a=f;try{b:{for(ee(t),d=n(c);d!==null&&!(d.expirationTime>t&&oe());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,ee(t),i=!0;break b}d===n(c)&&r(c),ee(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&de(te,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?ce():ne=!1}}}var ce;if(typeof y==`function`)ce=function(){y(se)};else if(typeof MessageChannel<`u`){var le=new MessageChannel,ue=le.port2;le.port1.onmessage=se,ce=function(){ue.postMessage(null)}}else ce=function(){_(se,0)};function de(t,n){re=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):ie=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(re),re=-1):h=!0,de(te,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,ne||(ne=!0,ce()))),r},e.unstable_shouldYield=oe,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Vy=o(((e,t)=>{t.exports=By()})),Hy=o((e=>{var t=u();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`);function o(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function c(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return o(e,t,null,r)},e.flushSync=function(e){var t=s.T,n=i.p;try{if(s.T=null,i.p=2,e)return e()}finally{s.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=c(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??i.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=c(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=c(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else i.d.m(e)},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s.H.useFormState(e,t,n)},e.useFormStatus=function(){return s.H.useHostTransitionStatus()},e.version=`19.2.7`})),Uy=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Hy()})),Wy=o((e=>{var t=Vy(),n=u(),r=Uy();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}var p=Object.assign,m=Symbol.for(`react.element`),h=Symbol.for(`react.transitional.element`),g=Symbol.for(`react.portal`),_=Symbol.for(`react.fragment`),v=Symbol.for(`react.strict_mode`),y=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),te=Symbol.for(`react.context`),ne=Symbol.for(`react.forward_ref`),re=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),oe=Symbol.for(`react.lazy`),se=Symbol.for(`react.activity`),ce=Symbol.for(`react.memo_cache_sentinel`),le=Symbol.iterator;function ue(e){return typeof e!=`object`||!e?null:(e=le&&e[le]||e[`@@iterator`],typeof e==`function`?e:null)}var de=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===de?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case _:return`Fragment`;case y:return`Profiler`;case v:return`StrictMode`;case re:return`Suspense`;case ie:return`SuspenseList`;case se:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case g:return`Portal`;case te:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case ne:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case oe:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,b=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},ge=[],_e=-1;function ve(e){return{current:e}}function ye(e){0>_e||(e.current=ge[_e],ge[_e]=null,_e--)}function be(e,t){_e++,ge[_e]=e.current,e.current=t}var xe=ve(null),Se=ve(null),Ce=ve(null),we=ve(null);function Te(e,t){switch(be(Ce,t),be(Se,e),be(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?tf(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=tf(t),e=nf(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ye(xe),be(xe,e)}function Ee(){ye(xe),ye(Se),ye(Ce)}function De(e){e.memoizedState!==null&&be(we,e);var t=xe.current,n=nf(t,e.type);t!==n&&(be(Se,e),be(xe,n))}function x(e){Se.current===e&&(ye(xe),ye(Se)),we.current===e&&(ye(we),up._currentValue=he)}var Oe,ke;function Ae(e){if(Oe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\\n( *(at )?)/);Oe=t&&t[1]||``,ke=-1<e.stack.indexOf(`\n at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`\n`+Oe+e+ke}var je=!1;function Me(e,t){if(!e||je)return``;je=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`\n`),l=s.split(`\n`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`\n`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function Ne(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);default:return``}}function S(e){try{var t=``,n=null;do t+=Ne(e,n),n=e,e=e.return;while(e);return t}catch(e){return`\nError generating stack: `+e.message+`\n`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,ze=t.unstable_now,Be=t.unstable_getCurrentPriorityLevel,Ve=t.unstable_ImmediatePriority,He=t.unstable_UserBlockingPriority,Ue=t.unstable_NormalPriority,We=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,Ke=t.log,qe=t.unstable_setDisableYieldValue,Je=null,Ye=null;function Xe(e){if(typeof Ke==`function`&&qe(e),Ye&&typeof Ye.setStrictMode==`function`)try{Ye.setStrictMode(Je,e)}catch{}}var Ze=Math.clz32?Math.clz32:et,Qe=Math.log,$e=Math.LN2;function et(e){return e>>>=0,e===0?32:31-(Qe(e)/$e|0)|0}var tt=256,nt=262144,rt=4194304;function it(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function at(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=it(n))):i=it(o):i=it(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=it(n))):i=it(o)):i=it(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function ot(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function st(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ct(){var e=rt;return rt<<=1,!(rt&62914560)&&(rt=4194304),e}function lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ut(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function dt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Ze(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&ft(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function ft(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Ze(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function pt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Ze(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function mt(e,t){var n=t&-t;return n=n&42?1:ht(n),(n&(e.suspendedLanes|t))===0?n:0}function ht(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function C(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function gt(){var e=me.p;return e===0?(e=window.event,e===void 0?32:Ep(e.type)):e}function _t(e,t){var n=me.p;try{return me.p=e,t()}finally{me.p=n}}var vt=Math.random().toString(36).slice(2),yt=`__reactFiber$`+vt,bt=`__reactProps$`+vt,xt=`__reactContainer$`+vt,St=`__reactEvents$`+vt,Ct=`__reactListeners$`+vt,wt=`__reactHandles$`+vt,Tt=`__reactResources$`+vt,Et=`__reactMarker$`+vt;function Dt(e){delete e[yt],delete e[bt],delete e[St],delete e[Ct],delete e[wt]}function Ot(e){var t=e[yt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Tf(e);e!==null;){if(n=e[yt])return n;e=Tf(e)}return t}e=n,n=e.parentNode}return null}function kt(e){if(e=e[yt]||e[xt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function At(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function jt(e){var t=e[Tt];return t||=e[Tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Mt(e){e[Et]=!0}var Nt=new Set,Pt={};function Ft(e,t){It(e,t),It(e+`Capture`,t)}function It(e,t){for(Pt[e]=t,e=0;e<t.length;e++)Nt.add(t[e])}var Lt=RegExp(`^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$`),Rt={},zt={};function Bt(e){return Pe.call(zt,e)?!0:Pe.call(Rt,e)?!1:Lt.test(e)?zt[e]=!0:(Rt[e]=!0,!1)}function Vt(e,t,n){if(Bt(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,``+n)}}function Ht(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,``+n)}}function Ut(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,``+r)}}function Wt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Gt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Kt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function qt(e){if(!e._valueTracker){var t=Gt(e)?`checked`:`value`;e._valueTracker=Kt(e,t,``+e[t])}}function Jt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Gt(e)?e.checked?`true`:`false`:e.value),e=r,e===n?!1:(t.setValue(e),!0)}function Yt(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}var Xt=/[\\n"\\\\]/g;function Zt(e){return e.replace(Xt,function(e){return`\\\\`+e.charCodeAt(0).toString(16)+` `})}function Qt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Wt(t)):e.value!==``+Wt(t)&&(e.value=``+Wt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):en(e,o,Wt(n)):en(e,o,Wt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Wt(s):e.removeAttribute(`name`)}function $t(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){qt(e);return}n=n==null?``:``+Wt(n),t=t==null?n:``+Wt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),qt(e)}function en(e,t,n){t===`number`&&Yt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function tn(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Wt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function nn(e,t,n){if(t!=null&&(t=``+Wt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+Wt(n)}function rn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(pe(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Wt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),qt(e)}function an(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var on=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function sn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||on.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function cn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&sn(e,a,r)}else for(var o in t)t.hasOwnProperty(o)&&sn(e,o,t[o])}function ln(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var un=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),dn=/^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;function fn(e){return dn.test(``+e)?`javascript:throw new Error(\'React has blocked a javascript: URL as a security precaution.\')`:e}function pn(){}var mn=null;function hn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gn=null,_n=null;function vn(e){var t=kt(e);if(t&&(e=t.stateNode)){var n=e[bt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(Qt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+Zt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[bt]||null;if(!a)throw Error(i(90));Qt(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Jt(r)}break a;case`textarea`:nn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&tn(e,!!n.multiple,t,!1)}}}var yn=!1;function bn(e,t,n){if(yn)return e(t,n);yn=!0;try{return e(t)}finally{if(yn=!1,(gn!==null||_n!==null)&&(ju(),gn&&(t=gn,e=_n,_n=gn=null,vn(t),e)))for(t=0;t<e.length;t++)vn(e[t])}}function xn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[bt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=!(e===`button`||e===`input`||e===`select`||e===`textarea`)),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Sn=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Cn=!1;if(Sn)try{var wn={};Object.defineProperty(wn,"passive",{get:function(){Cn=!0}}),window.addEventListener(`test`,wn,wn),window.removeEventListener(`test`,wn,wn)}catch{Cn=!1}var Tn=null,En=null,Dn=null;function On(){if(Dn)return Dn;var e,t=En,n=t.length,r,i=`value`in Tn?Tn.value:Tn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return Dn=i.slice(e,1<r?1-r:void 0)}function kn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function An(){return!0}function jn(){return!1}function Mn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?An:jn,this.isPropagationStopped=jn,this}return p(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=An)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=An)},persist:function(){},isPersistent:An}),t}var Nn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pn=Mn(Nn),Fn=p({},Nn,{view:0,detail:0}),In=Mn(Fn),Ln,Rn,zn,Bn=p({},Fn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Zn,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==zn&&(zn&&e.type===`mousemove`?(Ln=e.screenX-zn.screenX,Rn=e.screenY-zn.screenY):Rn=Ln=0,zn=e),Ln)},movementY:function(e){return`movementY`in e?e.movementY:Rn}}),Vn=Mn(Bn),Hn=Mn(p({},Bn,{dataTransfer:0})),Un=Mn(p({},Fn,{relatedTarget:0})),Wn=Mn(p({},Nn,{animationName:0,elapsedTime:0,pseudoElement:0})),Gn=Mn(p({},Nn,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Kn=Mn(p({},Nn,{data:0})),qn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Jn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},Yn={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Xn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Yn[e])?!!t[e]:!1}function Zn(){return Xn}var Qn=Mn(p({},Fn,{key:function(e){if(e.key){var t=qn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=kn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Jn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Zn,charCode:function(e){return e.type===`keypress`?kn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?kn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),$n=Mn(p({},Bn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),er=Mn(p({},Fn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Zn})),tr=Mn(p({},Nn,{propertyName:0,elapsedTime:0,pseudoElement:0})),nr=Mn(p({},Bn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),rr=Mn(p({},Nn,{newState:0,oldState:0})),ir=[9,13,27,32],ar=Sn&&`CompositionEvent`in window,or=null;Sn&&`documentMode`in document&&(or=document.documentMode);var sr=Sn&&`TextEvent`in window&&!or,cr=Sn&&(!ar||or&&8<or&&11>=or),lr=` `,ur=!1;function dr(e,t){switch(e){case`keyup`:return ir.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function fr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var pr=!1;function mr(e,t){switch(e){case`compositionend`:return fr(t);case`keypress`:return t.which===32?(ur=!0,lr):null;case`textInput`:return e=t.data,e===lr&&ur?null:e;default:return null}}function hr(e,t){if(pr)return e===`compositionend`||!ar&&dr(e,t)?(e=On(),Dn=En=Tn=null,pr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return cr&&t.locale!==`ko`?null:t.data;default:return null}}var gr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function _r(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!gr[e.type]:t===`textarea`}function vr(e,t,n,r){gn?_n?_n.push(r):_n=[r]:gn=r,t=zd(t,`onChange`),0<t.length&&(n=new Pn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var yr=null,br=null;function xr(e){jd(e,0)}function Sr(e){if(Jt(At(e)))return e}function Cr(e,t){if(e===`change`)return t}var wr=!1;if(Sn){var Tr;if(Sn){var Er=`oninput`in document;if(!Er){var Dr=document.createElement(`div`);Dr.setAttribute(`oninput`,`return;`),Er=typeof Dr.oninput==`function`}Tr=Er}else Tr=!1;wr=Tr&&(!document.documentMode||9<document.documentMode)}function Or(){yr&&(yr.detachEvent(`onpropertychange`,kr),br=yr=null)}function kr(e){if(e.propertyName===`value`&&Sr(br)){var t=[];vr(t,br,e,hn(e)),bn(xr,t)}}function Ar(e,t,n){e===`focusin`?(Or(),yr=t,br=n,yr.attachEvent(`onpropertychange`,kr)):e===`focusout`&&Or()}function jr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Sr(br)}function Mr(e,t){if(e===`click`)return Sr(t)}function Nr(e,t){if(e===`input`||e===`change`)return Sr(t)}function Pr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Fr=typeof Object.is==`function`?Object.is:Pr;function Ir(e,t){if(Fr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Pe.call(t,i)||!Fr(e[i],t[i]))return!1}return!0}function Lr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Rr(e,t){var n=Lr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Lr(n)}}function zr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?zr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Br(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Yt(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Yt(e.document)}return t}function Vr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Hr=Sn&&`documentMode`in document&&11>=document.documentMode,Ur=null,Wr=null,Gr=null,Kr=!1;function qr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Kr||Ur==null||Ur!==Yt(r)||(r=Ur,`selectionStart`in r&&Vr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gr&&Ir(Gr,r)||(Gr=r,r=zd(Wr,`onSelect`),0<r.length&&(t=new Pn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Ur)))}function Jr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var Yr={animationend:Jr(`Animation`,`AnimationEnd`),animationiteration:Jr(`Animation`,`AnimationIteration`),animationstart:Jr(`Animation`,`AnimationStart`),transitionrun:Jr(`Transition`,`TransitionRun`),transitionstart:Jr(`Transition`,`TransitionStart`),transitioncancel:Jr(`Transition`,`TransitionCancel`),transitionend:Jr(`Transition`,`TransitionEnd`)},Xr={},Zr={};Sn&&(Zr=document.createElement(`div`).style,`AnimationEvent`in window||(delete Yr.animationend.animation,delete Yr.animationiteration.animation,delete Yr.animationstart.animation),`TransitionEvent`in window||delete Yr.transitionend.transition);function Qr(e){if(Xr[e])return Xr[e];if(!Yr[e])return e;var t=Yr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Zr)return Xr[e]=t[n];return e}var $r=Qr(`animationend`),ei=Qr(`animationiteration`),ti=Qr(`animationstart`),ni=Qr(`transitionrun`),ri=Qr(`transitionstart`),ii=Qr(`transitioncancel`),ai=Qr(`transitionend`),oi=new Map,si=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);si.push(`scrollEnd`);function ci(e,t){oi.set(e,t),Ft(t,[e])}var li=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},ui=[],di=0,fi=0;function pi(){for(var e=di,t=fi=di=0;t<e;){var n=ui[t];ui[t++]=null;var r=ui[t];ui[t++]=null;var i=ui[t];ui[t++]=null;var a=ui[t];if(ui[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&_i(n,i,a)}}function mi(e,t,n,r){ui[di++]=e,ui[di++]=t,ui[di++]=n,ui[di++]=r,fi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function hi(e,t,n,r){return mi(e,t,n,r),vi(e)}function gi(e,t){return mi(e,null,null,t),vi(e)}function _i(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Ze(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function vi(e){if(50<Su)throw Su=0,Cu=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var yi={};function bi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xi(e,t,n,r){return new bi(e,t,n,r)}function Si(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ci(e,t){var n=e.alternate;return n===null?(n=xi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function wi(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ti(e,t,n,r,a,o){var s=0;if(r=e,typeof e==`function`)Si(e)&&(s=1);else if(typeof e==`string`)s=rp(e,n,xe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case se:return e=xi(31,n,t,a),e.elementType=se,e.lanes=o,e;case _:return Ei(n.children,a,o,t);case v:s=8,a|=24;break;case y:return e=xi(12,n,t,a|2),e.elementType=y,e.lanes=o,e;case re:return e=xi(13,n,t,a),e.elementType=re,e.lanes=o,e;case ie:return e=xi(19,n,t,a),e.elementType=ie,e.lanes=o,e;default:if(typeof e==`object`&&e)switch(e.$$typeof){case te:s=10;break a;case ee:s=9;break a;case ne:s=11;break a;case ae:s=14;break a;case oe:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=xi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ei(e,t,n,r){return e=xi(7,e,r,t),e.lanes=n,e}function Di(e,t,n){return e=xi(6,e,null,t),e.lanes=n,e}function Oi(e){var t=xi(18,null,null,0);return t.stateNode=e,t}function ki(e,t,n){return t=xi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ai=new WeakMap;function ji(e,t){if(typeof e==`object`&&e){var n=Ai.get(e);return n===void 0?(t={value:e,source:t,stack:S(t)},Ai.set(e,t),t):n}return{value:e,source:t,stack:S(t)}}var Mi=[],Ni=0,Pi=null,Fi=0,Ii=[],Li=0,Ri=null,zi=1,Bi=``;function Vi(e,t){Mi[Ni++]=Fi,Mi[Ni++]=Pi,Pi=e,Fi=t}function Hi(e,t,n){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,Ri=e;var r=zi;e=Bi;var i=32-Ze(r)-1;r&=~(1<<i),n+=1;var a=32-Ze(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,zi=1<<32-Ze(t)+i|n<<i|r,Bi=a+e}else zi=1<<a|n<<i|r,Bi=e}function Ui(e){e.return!==null&&(Vi(e,1),Hi(e,1,0))}function Wi(e){for(;e===Pi;)Pi=Mi[--Ni],Mi[Ni]=null,Fi=Mi[--Ni],Mi[Ni]=null;for(;e===Ri;)Ri=Ii[--Li],Ii[Li]=null,Bi=Ii[--Li],Ii[Li]=null,zi=Ii[--Li],Ii[Li]=null}function Gi(e,t){Ii[Li++]=zi,Ii[Li++]=Bi,Ii[Li++]=Ri,zi=t.id,Bi=t.overflow,Ri=e}var Ki=null,qi=null,Ji=!1,Yi=null,Xi=!1,Zi=Error(i(519));function Qi(e){throw ia(ji(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),Zi}function $i(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[yt]=e,t[bt]=r,n){case`dialog`:Md(`cancel`,t),Md(`close`,t);break;case`iframe`:case`object`:case`embed`:Md(`load`,t);break;case`video`:case`audio`:for(n=0;n<kd.length;n++)Md(kd[n],t);break;case`source`:Md(`error`,t);break;case`img`:case`image`:case`link`:Md(`error`,t),Md(`load`,t);break;case`details`:Md(`toggle`,t);break;case`input`:Md(`invalid`,t),$t(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Md(`invalid`,t);break;case`textarea`:Md(`invalid`,t),rn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||Gd(t.textContent,n)?(r.popover!=null&&(Md(`beforetoggle`,t),Md(`toggle`,t)),r.onScroll!=null&&Md(`scroll`,t),r.onScrollEnd!=null&&Md(`scrollend`,t),r.onClick!=null&&(t.onclick=pn),t=!0):t=!1,t||Qi(e,!0)}function ea(e){for(Ki=e.return;Ki;)switch(Ki.tag){case 5:case 31:case 13:Xi=!1;return;case 27:case 3:Xi=!0;return;default:Ki=Ki.return}}function ta(e){if(e!==Ki)return!1;if(!Ji)return ea(e),Ji=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!==`form`&&n!==`button`)||rf(e.type,e.memoizedProps)),n=!n),n&&qi&&Qi(e),ea(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=wf(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));qi=wf(e)}else t===27?(t=qi,ff(e.type)?(e=Cf,Cf=null,qi=e):qi=t):qi=Ki?Sf(e.stateNode.nextSibling):null;return!0}function na(){qi=Ki=null,Ji=!1}function ra(){var e=Yi;return e!==null&&(cu===null?cu=e:cu.push.apply(cu,e),Yi=null),e}function ia(e){Yi===null?Yi=[e]:Yi.push(e)}var aa=ve(null),oa=null,sa=null;function ca(e,t,n){be(aa,t._currentValue),t._currentValue=n}function la(e){e._currentValue=aa.current,ye(aa)}function ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function da(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ua(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ua(s,n,e),s=null}else s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function fa(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Fr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===we.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[up]:e.push(up))}a=a.return}e!==null&&da(t,e,n,r),t.flags|=262144}function pa(e){for(e=e.firstContext;e!==null;){if(!Fr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ma(e){oa=e,sa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ha(e){return _a(oa,e)}function ga(e,t){return oa===null&&ma(e),_a(e,t)}function _a(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},sa===null){if(e===null)throw Error(i(308));sa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else sa=sa.next=t;return n}var va=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},ya=t.unstable_scheduleCallback,ba=t.unstable_NormalPriority,xa={$$typeof:te,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Sa(){return{controller:new va,data:new Map,refCount:0}}function Ca(e){e.refCount--,e.refCount===0&&ya(ba,function(){e.controller.abort()})}var wa=null,Ta=0,Ea=0,Da=null;function Oa(e,t){if(wa===null){var n=wa=[];Ta=0,Ea=Cd(),Da={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Ta++,t.then(ka,ka),t}function ka(){if(--Ta===0&&wa!==null){Da!==null&&(Da.status=`fulfilled`);var e=wa;wa=null,Ea=0,Da=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Aa(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var ja=b.S;b.S=function(e,t){du=ze(),typeof t==`object`&&t&&typeof t.then==`function`&&Oa(e,t),ja!==null&&ja(e,t)};var Ma=ve(null);function Na(){var e=Ma.current;return e===null?ql.pooledCache:e}function Pa(e,t){t===null?be(Ma,Ma.current):be(Ma,t.pool)}function Fa(){var e=Na();return e===null?null:{parent:xa._currentValue,pool:e}}var Ia=Error(i(460)),La=Error(i(474)),Ra=Error(i(542)),za={then:function(){}};function Ba(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Va(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(pn,pn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ga(e),e;default:if(typeof t.status==`string`)t.then(pn,pn);else{if(e=ql,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ga(e),e}throw Ua=t,Ia}}function Ha(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Ua=e,Ia):e}}var Ua=null;function Wa(){if(Ua===null)throw Error(i(459));var e=Ua;return Ua=null,e}function Ga(e){if(e===Ia||e===Ra)throw Error(i(483))}var Ka=null,qa=0;function Ja(e){var t=qa;return qa+=1,Ka===null&&(Ka=[]),Va(Ka,e,t)}function Ya(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Xa(e,t){throw t.$$typeof===m?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function Za(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ci(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Di(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===_?d(e,t,n.props.children,r,n.key):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===oe&&Ha(i)===t.type)?(t=a(t,n.props),Ya(t,n),t.return=e,t):(t=Ti(n.type,n.key,n.props,null,e.mode,r),Ya(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=ki(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ei(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Di(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case h:return n=Ti(t.type,t.key,t.props,null,e.mode,n),Ya(n,t),n.return=e,n;case g:return t=ki(t,e.mode,n),t.return=e,t;case oe:return t=Ha(t),f(e,t,n)}if(pe(t)||ue(t))return t=Ei(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,Ja(t),n);if(t.$$typeof===te)return f(e,ga(e,t),n);Xa(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case h:return n.key===i?l(e,t,n,r):null;case g:return n.key===i?u(e,t,n,r):null;case oe:return n=Ha(n),p(e,t,n,r)}if(pe(n)||ue(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,Ja(n),r);if(n.$$typeof===te)return p(e,t,ga(e,n),r);Xa(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case h:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case g:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case oe:return r=Ha(r),m(e,t,n,r,i)}if(pe(r)||ue(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,Ja(r),i);if(r.$$typeof===te)return m(e,t,n,ga(t,r),i);Xa(t,r)}return null}function v(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),Ji&&Vi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return Ji&&Vi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&g.alternate!==null&&d.delete(g.key===null?h:g.key),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),Ji&&Vi(i,h),l}function y(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),Ji&&Vi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return Ji&&Vi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&v.alternate!==null&&h.delete(v.key===null?g:v.key),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),Ji&&Vi(a,g),u}function ee(e,r,o,c){if(typeof o==`object`&&o&&o.type===_&&o.key===null&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case h:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===_){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===oe&&Ha(l)===r.type){n(e,r.sibling),c=a(r,o.props),Ya(c,o),c.return=e,e=c;break a}n(e,r);break}else t(e,r);r=r.sibling}o.type===_?(c=Ei(o.props.children,e.mode,c,o.key),c.return=e,e=c):(c=Ti(o.type,o.key,o.props,null,e.mode,c),Ya(c,o),c.return=e,e=c)}return s(e);case g:a:{for(l=o.key;r!==null;){if(r.key===l)if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}else{n(e,r);break}else t(e,r);r=r.sibling}c=ki(o,e.mode,c),c.return=e,e=c}return s(e);case oe:return o=Ha(o),ee(e,r,o,c)}if(pe(o))return v(e,r,o,c);if(ue(o)){if(l=ue(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),y(e,r,o,c)}if(typeof o.then==`function`)return ee(e,r,Ja(o),c);if(o.$$typeof===te)return ee(e,r,ga(e,o),c);Xa(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Di(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{qa=0;var i=ee(e,t,n,r);return Ka=null,i}catch(t){if(t===Ia||t===Ra)throw t;var a=xi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var Qa=Za(!0),$a=Za(!1),eo=!1;function to(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function no(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ro(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function io(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Kl&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=vi(e),_i(e,null,n),t}return mi(e,r,t,n),vi(e)}function ao(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}function oo(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var so=!1;function co(){if(so){var e=Da;if(e!==null)throw e}}function lo(e,t,n,r){so=!1;var i=e.updateQueue;eo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,m=f!==s.lane;if(m?(L&f)===f:(r&f)===f){f!==0&&f===Ea&&(so=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var h=e,g=s;f=t;var _=n;switch(g.tag){case 1:if(h=g.payload,typeof h==`function`){d=h.call(_,d,f);break a}d=h;break a;case 3:h.flags=h.flags&-65537|128;case 0:if(h=g.payload,f=typeof h==`function`?h.call(_,d,f):h,f==null)break a;d=p({},d,f);break a;case 2:eo=!0}}f=s.callback,f!==null&&(e.flags|=64,m&&(e.flags|=8192),m=i.callbacks,m===null?i.callbacks=[f]:m.push(f))}else m={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=m,c=d):u=u.next=m,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;m=s,s=m.next,m.next=null,i.lastBaseUpdate=m,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),nu|=o,e.lanes=o,e.memoizedState=d}}function uo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function fo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)uo(n[e],t)}var po=ve(null),mo=ve(0);function ho(e,t){e=eu,be(mo,e),be(po,t),eu=e|t.baseLanes}function go(){be(mo,eu),be(po,po.current)}function _o(){eu=mo.current,ye(po),ye(mo)}var vo=ve(null),yo=null;function bo(e){var t=e.alternate;be(To,To.current&1),be(vo,e),yo===null&&(t===null||po.current!==null||t.memoizedState!==null)&&(yo=e)}function xo(e){be(To,To.current),be(vo,e),yo===null&&(yo=e)}function So(e){e.tag===22?(be(To,To.current),be(vo,e),yo===null&&(yo=e)):Co(e)}function Co(){be(To,To.current),be(vo,vo.current)}function wo(e){ye(vo),yo===e&&(yo=null),ye(To)}var To=ve(0);function Eo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||yf(n)||bf(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Do=0,w=null,Oo=null,ko=null,Ao=!1,jo=!1,Mo=!1,No=0,Po=0,Fo=null,Io=0;function Lo(){throw Error(i(321))}function Ro(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Fr(e[n],t[n]))return!1;return!0}function zo(e,t,n,r,i,a){return Do=a,w=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,b.H=e===null||e.memoizedState===null?tc:nc,Mo=!1,a=n(r,i),Mo=!1,jo&&(a=Vo(t,n,r,i)),Bo(e),a}function Bo(e){b.H=T;var t=Oo!==null&&Oo.next!==null;if(Do=0,ko=Oo=w=null,Ao=!1,Po=0,Fo=null,t)throw Error(i(300));e===null||yc||(e=e.dependencies,e!==null&&pa(e)&&(yc=!0))}function Vo(e,t,n,r){w=e;var a=0;do{if(jo&&(Fo=null),Po=0,jo=!1,25<=a)throw Error(i(301));if(a+=1,ko=Oo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}b.H=rc,o=t(n,r)}while(jo);return o}function Ho(){var e=b.H,t=e.useState()[0];return t=typeof t.then==`function`?Yo(t):t,e=e.useState()[0],(Oo===null?null:Oo.memoizedState)!==e&&(w.flags|=1024),t}function Uo(){var e=No!==0;return No=0,e}function Wo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Go(e){if(Ao){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ao=!1}Do=0,ko=Oo=w=null,jo=!1,Po=No=0,Fo=null}function Ko(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ko===null?w.memoizedState=ko=e:ko=ko.next=e,ko}function qo(){if(Oo===null){var e=w.alternate;e=e===null?null:e.memoizedState}else e=Oo.next;var t=ko===null?w.memoizedState:ko.next;if(t!==null)ko=t,Oo=e;else{if(e===null)throw w.alternate===null?Error(i(467)):Error(i(310));Oo=e,e={memoizedState:Oo.memoizedState,baseState:Oo.baseState,baseQueue:Oo.baseQueue,queue:Oo.queue,next:null},ko===null?w.memoizedState=ko=e:ko=ko.next=e}return ko}function Jo(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Yo(e){var t=Po;return Po+=1,Fo===null&&(Fo=[]),e=Va(Fo,e,t),t=w,(ko===null?t.memoizedState:ko.next)===null&&(t=t.alternate,b.H=t===null||t.memoizedState===null?tc:nc),e}function Xo(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Yo(e);if(e.$$typeof===te)return ha(e)}throw Error(i(438,String(e)))}function Zo(e){var t=null,n=w.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=w.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=Jo(),w.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ce;return t.index++,n}function Qo(e,t){return typeof t==`function`?t(e):t}function $o(e){return es(qo(),Oo,e)}function es(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Do&f)===f:(L&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ea&&(d=!0);else if((Do&p)===p){u=u.next,p===Ea&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,w.lanes|=p,nu|=p;f=u.action,Mo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,w.lanes|=f,nu|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Fr(o,e.memoizedState)&&(yc=!0,d&&(n=Da,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function ts(e){var t=qo(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Fr(o,t.memoizedState)||(yc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ns(e,t,n){var r=w,a=qo(),o=Ji;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Fr((Oo||a).memoizedState,n);if(s&&(a.memoizedState=n,yc=!0),a=a.queue,Ds(as.bind(null,r,a,e),[e]),a.getSnapshot!==t||s||ko!==null&&ko.memoizedState.tag&1){if(r.flags|=2048,Ss(9,{destroy:void 0},is.bind(null,r,a,n,t),null),ql===null)throw Error(i(349));o||Do&127||rs(r,t,n)}return n}function rs(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=w.updateQueue,t===null?(t=Jo(),w.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function is(e,t,n,r){t.value=n,t.getSnapshot=r,os(t)&&ss(e)}function as(e,t,n){return n(function(){os(t)&&ss(e)})}function os(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Fr(e,n)}catch{return!0}}function ss(e){var t=gi(e,2);t!==null&&Eu(t,e,2)}function cs(e){var t=Ko();if(typeof e==`function`){var n=e;if(e=n(),Mo){Xe(!0);try{n()}finally{Xe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:e},t}function ls(e,t,n,r){return e.baseState=n,es(e,Oo,typeof r==`function`?r:Qo)}function us(e,t,n,r,a){if(Qs(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};b.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,ds(t,o)):(o.next=n.next,t.pending=n.next=o)}}function ds(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=b.T,o={};b.T=o;try{var s=n(i,r),c=b.S;c!==null&&c(o,s),fs(e,t,s)}catch(n){ms(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),b.T=a}}else try{a=n(i,r),fs(e,t,a)}catch(n){ms(e,t,n)}}function fs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ps(e,t,n)},function(n){return ms(e,t,n)}):ps(e,t,n)}function ps(e,t,n){t.status=`fulfilled`,t.value=n,hs(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,ds(e,n)))}function ms(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,hs(t),t=t.next;while(t!==r)}e.action=null}function hs(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function gs(e,t){return t}function _s(e,t){if(Ji){var n=ql.formState;if(n!==null){a:{var r=w;if(Ji){if(qi){b:{for(var i=qi,a=Xi;i.nodeType!==8;){if(!a){i=null;break b}if(i=Sf(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){qi=Sf(i.nextSibling),r=i.data===`F!`;break a}}Qi(r)}r=!1}r&&(t=n[0])}}return n=Ko(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:gs,lastRenderedState:t},n.queue=r,n=Ys.bind(null,w,r),r.dispatch=n,r=cs(!1),a=Zs.bind(null,w,!1,r.queue),r=Ko(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=us.bind(null,w,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function vs(e){return ys(qo(),Oo,e)}function ys(e,t,n){if(t=es(e,t,gs)[0],e=$o(Qo)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Yo(t)}catch(e){throw e===Ia?Ra:e}else r=t;t=qo();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(w.flags|=2048,Ss(9,{destroy:void 0},bs.bind(null,i,n),null)),[r,a,e]}function bs(e,t){e.action=t}function xs(e){var t=qo(),n=Oo;if(n!==null)return ys(t,n,e);qo(),t=t.memoizedState,n=qo();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ss(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=w.updateQueue,t===null&&(t=Jo(),w.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Cs(){return qo().memoizedState}function ws(e,t,n,r){var i=Ko();w.flags|=e,i.memoizedState=Ss(1|t,{destroy:void 0},n,r===void 0?null:r)}function Ts(e,t,n,r){var i=qo();r=r===void 0?null:r;var a=i.memoizedState.inst;Oo!==null&&r!==null&&Ro(r,Oo.memoizedState.deps)?i.memoizedState=Ss(t,a,n,r):(w.flags|=e,i.memoizedState=Ss(1|t,a,n,r))}function Es(e,t){ws(8390656,8,e,t)}function Ds(e,t){Ts(2048,8,e,t)}function Os(e){w.flags|=4;var t=w.updateQueue;if(t===null)t=Jo(),w.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ks(e){var t=qo().memoizedState;return Os({ref:t,nextImpl:e}),function(){if(Kl&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function As(e,t){return Ts(4,2,e,t)}function js(e,t){return Ts(4,4,e,t)}function Ms(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ns(e,t,n){n=n==null?null:n.concat([e]),Ts(4,4,Ms.bind(null,t,e),n)}function Ps(){}function Fs(e,t){var n=qo();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Ro(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Is(e,t){var n=qo();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Ro(t,r[1]))return r[0];if(r=e(),Mo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r}function Ls(e,t,n){return n===void 0||Do&1073741824&&!(L&261930)?e.memoizedState=t:(e.memoizedState=n,e=Tu(),w.lanes|=e,nu|=e,n)}function Rs(e,t,n,r){return Fr(n,t)?n:po.current===null?!(Do&42)||Do&1073741824&&!(L&261930)?(yc=!0,e.memoizedState=n):(e=Tu(),w.lanes|=e,nu|=e,t):(e=Ls(e,n,r),Fr(e,t)||(yc=!0),e)}function zs(e,t,n,r,i){var a=me.p;me.p=a!==0&&8>a?a:8;var o=b.T,s={};b.T=s,Zs(e,!1,t,n);try{var c=i(),l=b.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?Xs(e,t,Aa(c,r),wu(e)):Xs(e,t,r,wu(e))}catch(n){Xs(e,t,{then:function(){},status:`rejected`,reason:n},wu())}finally{me.p=a,o!==null&&s.types!==null&&(o.types=s.types),b.T=o}}function Bs(){}function Vs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=Hs(e).queue;zs(e,a,t,he,n===null?Bs:function(){return Us(e),n(r)})}function Hs(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:he},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qo,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Us(e){var t=Hs(e);t.next===null&&(t=e.alternate.memoizedState),Xs(e,t.next.queue,{},wu())}function Ws(){return ha(up)}function Gs(){return qo().memoizedState}function Ks(){return qo().memoizedState}function qs(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=wu();e=ro(n);var r=io(t,e,n);r!==null&&(Eu(r,t,n),ao(r,t,n)),t={cache:Sa()},e.payload=t;return}t=t.return}}function Js(e,t,n){var r=wu();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Qs(e)?$s(t,n):(n=hi(e,t,n,r),n!==null&&(Eu(n,e,r),ec(n,t,r)))}function Ys(e,t,n){Xs(e,t,n,wu())}function Xs(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qs(e))$s(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Fr(s,o))return mi(e,t,i,0),ql===null&&pi(),!1}catch{}if(n=hi(e,t,i,r),n!==null)return Eu(n,e,r),ec(n,t,r),!0}return!1}function Zs(e,t,n,r){if(r={lane:2,revertLane:Cd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Qs(e)){if(t)throw Error(i(479))}else t=hi(e,n,r,2),t!==null&&Eu(t,e,2)}function Qs(e){var t=e.alternate;return e===w||t!==null&&t===w}function $s(e,t){jo=Ao=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ec(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,pt(e,n)}}var T={readContext:ha,use:Xo,useCallback:Lo,useContext:Lo,useEffect:Lo,useImperativeHandle:Lo,useLayoutEffect:Lo,useInsertionEffect:Lo,useMemo:Lo,useReducer:Lo,useRef:Lo,useState:Lo,useDebugValue:Lo,useDeferredValue:Lo,useTransition:Lo,useSyncExternalStore:Lo,useId:Lo,useHostTransitionStatus:Lo,useFormState:Lo,useActionState:Lo,useOptimistic:Lo,useMemoCache:Lo,useCacheRefresh:Lo};T.useEffectEvent=Lo;var tc={readContext:ha,use:Xo,useCallback:function(e,t){return Ko().memoizedState=[e,t===void 0?null:t],e},useContext:ha,useEffect:Es,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),ws(4194308,4,Ms.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ws(4194308,4,e,t)},useInsertionEffect:function(e,t){ws(4,2,e,t)},useMemo:function(e,t){var n=Ko();t=t===void 0?null:t;var r=e();if(Mo){Xe(!0);try{e()}finally{Xe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=Ko();if(n!==void 0){var i=n(t);if(Mo){Xe(!0);try{n(t)}finally{Xe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=Js.bind(null,w,e),[r.memoizedState,e]},useRef:function(e){var t=Ko();return e={current:e},t.memoizedState=e},useState:function(e){e=cs(e);var t=e.queue,n=Ys.bind(null,w,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Ps,useDeferredValue:function(e,t){return Ls(Ko(),e,t)},useTransition:function(){var e=cs(!1);return e=zs.bind(null,w,e.queue,!0,!1),Ko().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=w,a=Ko();if(Ji){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),ql===null)throw Error(i(349));L&127||rs(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Es(as.bind(null,r,o,e),[e]),r.flags|=2048,Ss(9,{destroy:void 0},is.bind(null,r,o,n,t),null),n},useId:function(){var e=Ko(),t=ql.identifierPrefix;if(Ji){var n=Bi,r=zi;n=(r&~(1<<32-Ze(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=No++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Io++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:Ws,useFormState:_s,useActionState:_s,useOptimistic:function(e){var t=Ko();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Zs.bind(null,w,!0,n),n.dispatch=t,[e,t]},useMemoCache:Zo,useCacheRefresh:function(){return Ko().memoizedState=qs.bind(null,w)},useEffectEvent:function(e){var t=Ko(),n={impl:e};return t.memoizedState=n,function(){if(Kl&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},nc={readContext:ha,use:Xo,useCallback:Fs,useContext:ha,useEffect:Ds,useImperativeHandle:Ns,useInsertionEffect:As,useLayoutEffect:js,useMemo:Is,useReducer:$o,useRef:Cs,useState:function(){return $o(Qo)},useDebugValue:Ps,useDeferredValue:function(e,t){return Rs(qo(),Oo.memoizedState,e,t)},useTransition:function(){var e=$o(Qo)[0],t=qo().memoizedState;return[typeof e==`boolean`?e:Yo(e),t]},useSyncExternalStore:ns,useId:Gs,useHostTransitionStatus:Ws,useFormState:vs,useActionState:vs,useOptimistic:function(e,t){return ls(qo(),Oo,e,t)},useMemoCache:Zo,useCacheRefresh:Ks};nc.useEffectEvent=ks;var rc={readContext:ha,use:Xo,useCallback:Fs,useContext:ha,useEffect:Ds,useImperativeHandle:Ns,useInsertionEffect:As,useLayoutEffect:js,useMemo:Is,useReducer:ts,useRef:Cs,useState:function(){return ts(Qo)},useDebugValue:Ps,useDeferredValue:function(e,t){var n=qo();return Oo===null?Ls(n,e,t):Rs(n,Oo.memoizedState,e,t)},useTransition:function(){var e=ts(Qo)[0],t=qo().memoizedState;return[typeof e==`boolean`?e:Yo(e),t]},useSyncExternalStore:ns,useId:Gs,useHostTransitionStatus:Ws,useFormState:xs,useActionState:xs,useOptimistic:function(e,t){var n=qo();return Oo===null?(n.baseState=e,[e,n.queue.dispatch]):ls(n,Oo,e,t)},useMemoCache:Zo,useCacheRefresh:Ks};rc.useEffectEvent=ks;function ic(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:p({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var ac={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=wu(),i=ro(r);i.payload=t,n!=null&&(i.callback=n),t=io(e,i,r),t!==null&&(Eu(t,e,r),ao(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=wu(),i=ro(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=io(e,i,r),t!==null&&(Eu(t,e,r),ao(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=wu(),r=ro(n);r.tag=2,t!=null&&(r.callback=t),t=io(e,r,n),t!==null&&(Eu(t,e,n),ao(t,e,n))}};function oc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Ir(n,r)||!Ir(i,a):!0}function sc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&ac.enqueueReplaceState(t,t.state,null)}function cc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=p({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function lc(e){li(e)}function uc(e){console.error(e)}function dc(e){li(e)}function fc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function pc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function mc(e,t,n){return n=ro(n),n.tag=3,n.payload={element:null},n.callback=function(){fc(e,t)},n}function hc(e){return e=ro(e),e.tag=3,e}function gc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){pc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){pc(t,n,r),typeof i!=`function`&&(mu===null?mu=new Set([this]):mu.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function _c(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&fa(t,n,a,!0),n=vo.current,n!==null){switch(n.tag){case 31:case 13:return yo===null?Ru():n.alternate===null&&tu===0&&(tu=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===za?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),rd(e,r,a)),!1;case 22:return n.flags|=65536,r===za?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),rd(e,r,a)),!1}throw Error(i(435,n.tag))}return rd(e,r,a),Ru(),!1}if(Ji)return t=vo.current,t===null?(r!==Zi&&(t=Error(i(423),{cause:r}),ia(ji(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=ji(r,n),a=mc(e.stateNode,r,a),oo(e,a),tu!==4&&(tu=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==Zi&&(e=Error(i(422),{cause:r}),ia(ji(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=ji(o,n),su===null?su=[o]:su.push(o),tu!==4&&(tu=2),t===null)return!0;r=ji(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=mc(n.stateNode,r,e),oo(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(mu===null||!mu.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=hc(a),gc(a,e,n,r),oo(n,a),!1}n=n.return}while(n!==null);return!1}var vc=Error(i(461)),yc=!1;function bc(e,t,n,r){t.child=e===null?$a(t,null,n,r):Qa(t,e.child,n,r)}function xc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ma(t),r=zo(e,t,n,o,a,i),s=Uo(),e!==null&&!yc?(Wo(e,t,i),Vc(e,t,i)):(Ji&&s&&Ui(t),t.flags|=1,bc(e,t,r,i),t.child)}function Sc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Si(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Cc(e,t,a,r,i)):(e=Ti(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!A(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Ir:n,n(o,r)&&e.ref===t.ref)return Vc(e,t,i)}return t.flags|=1,e=Ci(a,r),e.ref=t.ref,e.return=t,t.child=e}function Cc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Ir(a,r)&&e.ref===t.ref)if(yc=!1,t.pendingProps=r=a,A(e,i))e.flags&131072&&(yc=!0);else return t.lanes=e.lanes,Vc(e,t,i)}return Ac(e,t,n,r,i)}function wc(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Ec(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Pa(t,a===null?null:a.cachePool),a===null?go():ho(t,a),So(t);else return r=t.lanes=536870912,Ec(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Pa(t,null),go(),Co(t)):(Pa(t,a.cachePool),ho(t,a),Co(t),t.memoizedState=null);return bc(e,t,i,n),t.child}function Tc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Ec(e,t,n,r,i){var a=Na();return a=a===null?null:{parent:xa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Pa(t,null),go(),So(t),e!==null&&fa(e,t,r,!0),t.childLanes=i,null}function Dc(e,t){return t=O({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function E(e,t,n){return Qa(t,e.child,null,n),e=Dc(t,t.pendingProps),e.flags|=2,wo(t),t.memoizedState=null,e}function Oc(e,t,n){var r=t.pendingProps,a=(t.flags&128)!=0;if(t.flags&=-129,e===null){if(Ji){if(r.mode===`hidden`)return e=Dc(t,r),t.lanes=536870912,Tc(null,e);if(xo(t),(e=qi)?(e=vf(e,Xi),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return t.lanes=536870912,null}return Dc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(xo(t),a)if(t.flags&256)t.flags&=-257,t=E(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558));else if(yc||fa(e,t,n,!1),a=(n&e.childLanes)!==0,yc||a){if(r=ql,r!==null&&(s=mt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,gi(e,s),Eu(r,e,s),vc;Ru(),t=E(e,t,n)}else e=o.treeContext,qi=Sf(s.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Dc(t,r),t.flags|=4096;return t}return e=Ci(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function kc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Ac(e,t,n,r,i){return ma(t),n=zo(e,t,n,r,void 0,i),r=Uo(),e!==null&&!yc?(Wo(e,t,i),Vc(e,t,i)):(Ji&&r&&Ui(t),t.flags|=1,bc(e,t,n,i),t.child)}function D(e,t,n,r,i,a){return ma(t),t.updateQueue=null,n=Vo(t,r,n,i),Bo(e),r=Uo(),e!==null&&!yc?(Wo(e,t,a),Vc(e,t,a)):(Ji&&r&&Ui(t),t.flags|=1,bc(e,t,n,a),t.child)}function jc(e,t,n,r,i){if(ma(t),t.stateNode===null){var a=yi,o=n.contextType;typeof o==`object`&&o&&(a=ha(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=ac,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},to(t),o=n.contextType,a.context=typeof o==`object`&&o?ha(o):yi,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(ic(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&ac.enqueueReplaceState(a,a.state,null),lo(t,r,a,i),co(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=cc(n,s);a.props=c;var l=a.context,u=n.contextType;o=yi,typeof u==`object`&&u&&(o=ha(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&sc(t,a,r,o),eo=!1;var f=t.memoizedState;a.state=f,lo(t,r,a,i),co(),l=t.memoizedState,s||f!==l||eo?(typeof d==`function`&&(ic(t,n,d,r),l=t.memoizedState),(c=eo||oc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,no(e,t),o=t.memoizedProps,u=cc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=yi,typeof l==`object`&&l&&(c=ha(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&sc(t,a,r,c),eo=!1,f=t.memoizedState,a.state=f,lo(t,r,a,i),co();var p=t.memoizedState;o!==d||f!==p||eo||e!==null&&e.dependencies!==null&&pa(e.dependencies)?(typeof s==`function`&&(ic(t,n,s,r),p=t.memoizedState),(u=eo||oc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&pa(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,kc(e,t),r=(t.flags&128)!=0,a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=Qa(t,e.child,null,i),t.child=Qa(t,null,n,i)):bc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=Vc(e,t,i),e}function Mc(e,t,n,r){return na(),t.flags|=256,bc(e,t,n,r),t.child}var Nc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pc(e){return{baseLanes:e,cachePool:Fa()}}function Fc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=au),e}function Ic(e,t,n){var r=t.pendingProps,a=!1,o=(t.flags&128)!=0,s;if((s=o)||(s=e!==null&&e.memoizedState===null?!1:(To.current&2)!=0),s&&(a=!0,t.flags&=-129),s=(t.flags&32)!=0,t.flags&=-33,e===null){if(Ji){if(a?bo(t):Co(t),(e=qi)?(e=vf(e,Xi),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ri===null?null:{id:zi,overflow:Bi},retryLane:536870912,hydrationErrors:null},n=Oi(e),n.return=t,t.child=n,Ki=t,qi=null)):e=null,e===null)throw Qi(t);return bf(e)?t.lanes=32:t.lanes=536870912,null}var c=r.children;return r=r.fallback,a?(Co(t),a=t.mode,c=O({mode:`hidden`,children:c},a),r=Ei(r,a,n,null),c.return=t,r.return=t,c.sibling=r,t.child=c,r=t.child,r.memoizedState=Pc(n),r.childLanes=Fc(e,s,n),t.memoizedState=Nc,Tc(null,r)):(bo(t),Lc(t,c))}var l=e.memoizedState;if(l!==null&&(c=l.dehydrated,c!==null)){if(o)t.flags&256?(bo(t),t.flags&=-257,t=Rc(e,t,n)):t.memoizedState===null?(Co(t),c=r.fallback,a=t.mode,r=O({mode:`visible`,children:r.children},a),c=Ei(c,a,n,null),c.flags|=2,r.return=t,c.return=t,r.sibling=c,t.child=r,Qa(t,e.child,null,n),r=t.child,r.memoizedState=Pc(n),r.childLanes=Fc(e,s,n),t.memoizedState=Nc,t=Tc(null,r)):(Co(t),t.child=e.child,t.flags|=128,t=null);else if(bo(t),bf(c)){if(s=c.nextSibling&&c.nextSibling.dataset,s)var u=s.dgst;s=u,r=Error(i(419)),r.stack=``,r.digest=s,ia({value:r,source:null,stack:null}),t=Rc(e,t,n)}else if(yc||fa(e,t,n,!1),s=(n&e.childLanes)!==0,yc||s){if(s=ql,s!==null&&(r=mt(s,n),r!==0&&r!==l.retryLane))throw l.retryLane=r,gi(e,r),Eu(s,e,r),vc;yf(c)||Ru(),t=Rc(e,t,n)}else yf(c)?(t.flags|=192,t.child=e.child,t=null):(e=l.treeContext,qi=Sf(c.nextSibling),Ki=t,Ji=!0,Yi=null,Xi=!1,e!==null&&Gi(t,e),t=Lc(t,r.children),t.flags|=4096);return t}return a?(Co(t),c=r.fallback,a=t.mode,l=e.child,u=l.sibling,r=Ci(l,{mode:`hidden`,children:r.children}),r.subtreeFlags=l.subtreeFlags&65011712,u===null?(c=Ei(c,a,n,null),c.flags|=2):c=Ci(u,c),c.return=t,r.return=t,r.sibling=c,t.child=r,Tc(null,r),r=t.child,c=e.child.memoizedState,c===null?c=Pc(n):(a=c.cachePool,a===null?a=Fa():(l=xa._currentValue,a=a.parent===l?a:{parent:l,pool:l}),c={baseLanes:c.baseLanes|n,cachePool:a}),r.memoizedState=c,r.childLanes=Fc(e,s,n),t.memoizedState=Nc,Tc(e.child,r)):(bo(t),n=e.child,e=n.sibling,n=Ci(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Lc(e,t){return t=O({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function O(e,t){return e=xi(22,e,null,t),e.lanes=0,e}function Rc(e,t,n){return Qa(t,e.child,null,n),e=Lc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function zc(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ua(e.return,t,n)}function Bc(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function k(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=To.current,s=(o&2)!=0;if(s?(o=o&1|2,t.flags|=128):o&=1,be(To,o),bc(e,t,r,n),r=Ji?Fi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&zc(e,n,t);else if(e.tag===19)zc(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Eo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Bc(t,!1,i,n,a,r);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Eo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Bc(t,!0,n,null,a,r);break;case`together`:Bc(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function Vc(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),nu|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(fa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ci(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ci(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function A(e,t){return(e.lanes&t)===0?(e=e.dependencies,!!(e!==null&&pa(e))):!0}function j(e,t,n){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),ca(t,xa,e.memoizedState.cache),na();break;case 27:case 5:De(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:ca(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,xo(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(bo(t),e=Vc(e,t,n),e===null?null:e.sibling):Ic(e,t,n):(bo(t),t.flags|=128,null);bo(t);break;case 19:var i=(e.flags&128)!=0;if(r=(n&t.childLanes)!==0,r||=(fa(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return k(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),be(To,To.current),r)break;return null;case 22:return t.lanes=0,wc(e,t,n,t.pendingProps);case 24:ca(t,xa,e.memoizedState.cache)}return Vc(e,t,n)}function Hc(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)yc=!0;else{if(!A(e,n)&&!(t.flags&128))return yc=!1,j(e,t,n);yc=!!(e.flags&131072)}else yc=!1,Ji&&t.flags&1048576&&Hi(t,Fi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Ha(t.elementType),t.type=e,typeof e==`function`)Si(e)?(r=cc(e,r),t.tag=1,t=jc(null,t,e,r,n)):(t.tag=0,t=Ac(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===ne){t.tag=11,t=xc(null,t,e,r,n);break a}else if(a===ae){t.tag=14,t=Sc(null,t,e,r,n);break a}}throw t=fe(e)||e,Error(i(306,t,``))}}return t;case 0:return Ac(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=cc(r,t.pendingProps),jc(e,t,r,a,n);case 3:a:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,no(e,t),lo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ca(t,xa,r),r!==o.cache&&da(t,[xa],n,!0),co(),r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Mc(e,t,r,n);break a}else if(r!==a){a=ji(Error(i(424)),t),ia(a),t=Mc(e,t,r,n);break a}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(qi=Sf(e.firstChild),Ki=t,Ji=!0,Yi=null,Xi=!0,n=$a(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(na(),r===a){t=Vc(e,t,n);break a}bc(e,t,r,n)}t=t.child}return t;case 26:return kc(e,t),e===null?(n=Uf(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ji||(n=t.type,e=t.pendingProps,r=ef(Ce.current).createElement(n),r[yt]=t,r[bt]=e,Jd(r,n,e),Mt(r),t.stateNode=r):t.memoizedState=Uf(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&Ji&&(r=t.stateNode=Ef(t.type,t.pendingProps,Ce.current),Ki=t,Xi=!0,a=qi,ff(t.type)?(Cf=a,qi=Sf(r.firstChild)):qi=a),bc(e,t,t.pendingProps.children,n),kc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ji&&((a=r=qi)&&(r=gf(r,t.type,t.pendingProps,Xi),r===null?a=!1:(t.stateNode=r,Ki=t,qi=Sf(r.firstChild),Xi=!1,a=!0)),a||Qi(t)),De(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,rf(a,o)?r=null:s!==null&&rf(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=zo(e,t,Ho,null,null,n),up._currentValue=a),kc(e,t),bc(e,t,r,n),t.child;case 6:return e===null&&Ji&&((e=n=qi)&&(n=_f(n,t.pendingProps,Xi),n===null?e=!1:(t.stateNode=n,Ki=t,qi=null,e=!0)),e||Qi(t)),null;case 13:return Ic(e,t,n);case 4:return Te(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Qa(t,null,r,n):bc(e,t,r,n),t.child;case 11:return xc(e,t,t.type,t.pendingProps,n);case 7:return bc(e,t,t.pendingProps,n),t.child;case 8:return bc(e,t,t.pendingProps.children,n),t.child;case 12:return bc(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,ca(t,t.type,r.value),bc(e,t,r.children,n),t.child;case 9:return a=t.type._context,r=t.pendingProps.children,ma(t),a=ha(a),r=r(a),t.flags|=1,bc(e,t,r,n),t.child;case 14:return Sc(e,t,t.type,t.pendingProps,n);case 15:return Cc(e,t,t.type,t.pendingProps,n);case 19:return k(e,t,n);case 31:return Oc(e,t,n);case 22:return wc(e,t,n,t.pendingProps);case 24:return ma(t),r=ha(xa),e===null?(a=Na(),a===null&&(a=ql,o=Sa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},to(t),ca(t,xa,a)):((e.lanes&n)!==0&&(no(e,t),lo(t,null,null,n),co()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ca(t,xa,r),r!==a.cache&&da(t,[xa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ca(t,xa,r))),bc(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function M(e){e.flags|=4}function Uc(e,t,n,r,i){if((t=(e.mode&32)!=0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(Fu())e.flags|=8192;else throw Ua=za,La}else e.flags&=-16777217}function Wc(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!R(t))if(Fu())e.flags|=8192;else throw Ua=za,La}function Gc(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ct(),e.lanes|=t,ou|=t)}function Kc(e,t){if(!Ji)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function qc(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function N(e,t,n){var r=t.pendingProps;switch(Wi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return qc(t),null;case 1:return qc(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),la(xa),Ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ta(t)?M(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,ra())),qc(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(M(t),o===null?(qc(t),Uc(t,a,null,r,n)):(qc(t),Wc(t,o))):o?o===e.memoizedState?(qc(t),t.flags&=-16777217):(M(t),qc(t),Wc(t,o)):(e=e.memoizedProps,e!==r&&M(t),qc(t),Uc(t,a,e,r,n)),null;case 27:if(x(t),n=Ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return qc(t),null}e=xe.current,ta(t)?$i(t,e):(e=Ef(a,r,n),t.stateNode=e,M(t))}return qc(t),null;case 5:if(x(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return qc(t),null}if(o=xe.current,ta(t))$i(t,o);else{var s=ef(Ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[yt]=t,o[bt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(Jd(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&M(t)}}return qc(t),Uc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&M(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ce.current,ta(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=Ki,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[yt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||Gd(e.nodeValue,n)),e||Qi(t,!0)}else e=ef(e).createTextNode(r),e[yt]=t,t.stateNode=e}return qc(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=ta(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[yt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qc(t),e=!1}else n=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(wo(t),t):(wo(t),null);if(t.flags&128)throw Error(i(558))}return qc(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=ta(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[yt]=t}else na(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;qc(t),a=!1}else a=ra(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(wo(t),t):(wo(t),null)}return wo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Gc(t,t.updateQueue),qc(t),null);case 4:return Ee(),e===null&&Fd(t.stateNode.containerInfo),qc(t),null;case 10:return la(t.type),qc(t),null;case 19:if(ye(To),r=t.memoizedState,r===null)return qc(t),null;if(a=(t.flags&128)!=0,o=r.rendering,o===null)if(a)Kc(r,!1);else{if(tu!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Eo(e),o!==null){for(t.flags|=128,Kc(r,!1),e=o.updateQueue,t.updateQueue=e,Gc(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)wi(n,e),n=n.sibling;return be(To,To.current&1|2),Ji&&Vi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&ze()>fu&&(t.flags|=128,a=!0,Kc(r,!1),t.lanes=4194304)}else{if(!a)if(e=Eo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Gc(t,e),Kc(r,!0),r.tail===null&&r.tailMode===`hidden`&&!o.alternate&&!Ji)return qc(t),null}else 2*ze()-r.renderingStartTime>fu&&n!==536870912&&(t.flags|=128,a=!0,Kc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}return r.tail===null?(qc(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=ze(),e.sibling=null,n=To.current,be(To,a?n&1|2:n&1),Ji&&Vi(t,r.treeForkCount),e);case 22:case 23:return wo(t),_o(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(qc(t),t.subtreeFlags&6&&(t.flags|=8192)):qc(t),n=t.updateQueue,n!==null&&Gc(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ye(Ma),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),la(xa),qc(t),null;case 25:return null;case 30:return null}throw Error(i(156,t.tag))}function Jc(e,t){switch(Wi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return la(xa),Ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return x(t),null;case 31:if(t.memoizedState!==null){if(wo(t),t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));na()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return ye(To),null;case 4:return Ee(),null;case 10:return la(t.type),null;case 22:case 23:return wo(t),_o(),e!==null&&ye(Ma),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return la(xa),null;case 25:return null;default:return null}}function P(e,t){switch(Wi(t),t.tag){case 3:la(xa),Ee();break;case 26:case 27:case 5:x(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&wo(t);break;case 13:wo(t);break;case 19:ye(To);break;case 10:la(t.type);break;case 22:case 23:wo(t),_o(),e!==null&&ye(Ma);break;case 24:la(xa)}}function Yc(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){nd(t,t.return,e)}}function F(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){nd(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){nd(t,t.return,e)}}function Xc(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{fo(t,n)}catch(t){nd(e,e.return,t)}}}function Zc(e,t,n){n.props=cc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){nd(e,t,n)}}function Qc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){nd(e,t,n)}}function I(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r==`function`)try{r()}catch(n){nd(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){nd(e,t,n)}else n.current=null}function $c(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){nd(e,e.return,t)}}function el(e,t,n){try{var r=e.stateNode;Yd(r,e.type,n,t),r[bt]=t}catch(t){nd(e,e.return,t)}}function tl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&ff(e.type)||e.tag===4}function nl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||tl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&ff(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function rl(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=pn));else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(rl(e,t,n),e=e.sibling;e!==null;)rl(e,t,n),e=e.sibling}function il(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&ff(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(il(e,t,n),e=e.sibling;e!==null;)il(e,t,n),e=e.sibling}function al(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Jd(t,r,n),t[yt]=e,t[bt]=n}catch(t){nd(e,e.return,t)}}var ol=!1,sl=!1,cl=!1,ll=typeof WeakSet==`function`?WeakSet:Set,ul=null;function dl(e,t){if(e=e.containerInfo,Qd=yp,e=Br(e),Vr(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var a=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==n||a!==0&&f.nodeType!==3||(c=s+a),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===n&&++u===a&&(c=s),p===o&&++d===r&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}n=c===-1||l===-1?null:{start:c,end:l}}else n=null}n||={start:0,end:0}}else n=null;for($d={focusedElem:e,selectionRange:n},yp=!1,ul=t;ul!==null;)if(t=ul,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,ul=e;else for(;ul!==null;){switch(t=ul,o=t.alternate,e=t.flags,t.tag){case 0:if(e&4&&(e=t.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(e&1024&&o!==null){e=void 0,n=t,a=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var h=cc(n.type,a);e=r.getSnapshotBeforeUpdate(h,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(e){nd(n,n.return,e)}}break;case 3:if(e&1024){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)hf(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:hf(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(e&1024)throw Error(i(163))}if(e=t.sibling,e!==null){e.return=t.return,ul=e;break}ul=t.return}}function fl(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Dl(e,n),r&4&&Yc(5,n);break;case 1:if(Dl(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){nd(n,n.return,e)}else{var i=cc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){nd(n,n.return,e)}}r&64&&Xc(n),r&512&&Qc(n,n.return);break;case 3:if(Dl(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{fo(e,t)}catch(e){nd(n,n.return,e)}}break;case 27:t===null&&r&4&&al(n);case 26:case 5:Dl(e,n),t===null&&r&4&&$c(n),r&512&&Qc(n,n.return);break;case 12:Dl(e,n);break;case 31:Dl(e,n),r&4&&vl(e,n);break;case 13:Dl(e,n),r&4&&yl(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=od.bind(null,n),xf(e,n))));break;case 22:if(r=n.memoizedState!==null||ol,!r){t=t!==null&&t.memoizedState!==null||sl,i=ol;var a=sl;ol=r,(sl=t)&&!a?kl(e,n,(n.subtreeFlags&8772)!=0):Dl(e,n),ol=i,sl=a}break;case 30:break;default:Dl(e,n)}}function pl(e){var t=e.alternate;t!==null&&(e.alternate=null,pl(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Dt(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ml=null,hl=!1;function gl(e,t,n){for(n=n.child;n!==null;)_l(e,t,n),n=n.sibling}function _l(e,t,n){if(Ye&&typeof Ye.onCommitFiberUnmount==`function`)try{Ye.onCommitFiberUnmount(Je,n)}catch{}switch(n.tag){case 26:sl||I(n,t),gl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:sl||I(n,t);var r=ml,i=hl;ff(n.type)&&(ml=n.stateNode,hl=!1),gl(e,t,n),Df(n.stateNode),ml=r,hl=i;break;case 5:sl||I(n,t);case 6:if(r=ml,i=hl,ml=null,gl(e,t,n),ml=r,hl=i,ml!==null)if(hl)try{(ml.nodeType===9?ml.body:ml.nodeName===`HTML`?ml.ownerDocument.body:ml).removeChild(n.stateNode)}catch(e){nd(n,t,e)}else try{ml.removeChild(n.stateNode)}catch(e){nd(n,t,e)}break;case 18:ml!==null&&(hl?(e=ml,pf(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gp(e)):pf(ml,n.stateNode));break;case 4:r=ml,i=hl,ml=n.stateNode.containerInfo,hl=!0,gl(e,t,n),ml=r,hl=i;break;case 0:case 11:case 14:case 15:F(2,n,t),sl||F(4,n,t),gl(e,t,n);break;case 1:sl||(I(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Zc(n,t,r)),gl(e,t,n);break;case 21:gl(e,t,n);break;case 22:sl=(r=sl)||n.memoizedState!==null,gl(e,t,n),sl=r;break;default:gl(e,t,n)}}function vl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gp(e)}catch(e){nd(t,t.return,e)}}}function yl(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gp(e)}catch(e){nd(t,t.return,e)}}function bl(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ll),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ll),t;default:throw Error(i(435,e.tag))}}function xl(e,t){var n=bl(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=sd.bind(null,e,t);t.then(r,r)}})}function Sl(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var a=n[r],o=e,s=t,c=s;a:for(;c!==null;){switch(c.tag){case 27:if(ff(c.type)){ml=c.stateNode,hl=!1;break a}break;case 5:ml=c.stateNode,hl=!1;break a;case 3:case 4:ml=c.stateNode.containerInfo,hl=!0;break a}c=c.return}if(ml===null)throw Error(i(160));_l(o,s,a),ml=null,hl=!1,o=a.alternate,o!==null&&(o.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wl(t,e),t=t.sibling}var Cl=null;function wl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Sl(t,e),Tl(e),r&4&&(F(3,e,e.return),Yc(3,e),F(5,e,e.return));break;case 1:Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),r&64&&ol&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var a=Cl;if(Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),r&4){var o=n===null?null:n.memoizedState;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){a:{r=e.type,n=e.memoizedProps,a=a.ownerDocument||a;b:switch(r){case`title`:o=a.getElementsByTagName(`title`)[0],(!o||o[Et]||o[yt]||o.namespaceURI===`http://www.w3.org/2000/svg`||o.hasAttribute(`itemprop`))&&(o=a.createElement(r),a.head.insertBefore(o,a.querySelector(`head > title`))),Jd(o,r,n),o[yt]=e,Mt(o),r=o;break a;case`link`:var s=tp(`link`,`href`,a).get(r+(n.href||``));if(s){for(var c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&o.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&o.getAttribute(`title`)===(n.title==null?null:n.title)&&o.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(c,1);break b}}o=a.createElement(r),Jd(o,r,n),a.head.appendChild(o);break;case`meta`:if(s=tp(`meta`,`content`,a).get(r+(n.content||``))){for(c=0;c<s.length;c++)if(o=s[c],o.getAttribute(`content`)===(n.content==null?null:``+n.content)&&o.getAttribute(`name`)===(n.name==null?null:n.name)&&o.getAttribute(`property`)===(n.property==null?null:n.property)&&o.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){s.splice(c,1);break b}}o=a.createElement(r),Jd(o,r,n),a.head.appendChild(o);break;default:throw Error(i(468,r))}o[yt]=e,Mt(o),r=o}e.stateNode=r}else np(a,e.type,e.stateNode);else e.stateNode=Xf(a,r,e.memoizedProps);else o===r?r===null&&e.stateNode!==null&&el(e,e.memoizedProps,n.memoizedProps):(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?np(a,e.type,e.stateNode):Xf(a,r,e.memoizedProps))}break;case 27:Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),n!==null&&r&4&&el(e,e.memoizedProps,n.memoizedProps);break;case 5:if(Sl(t,e),Tl(e),r&512&&(sl||n===null||I(n,n.return)),e.flags&32){a=e.stateNode;try{an(a,``)}catch(t){nd(e,e.return,t)}}r&4&&e.stateNode!=null&&(a=e.memoizedProps,el(e,a,n===null?a:n.memoizedProps)),r&1024&&(cl=!0);break;case 6:if(Sl(t,e),Tl(e),r&4){if(e.stateNode===null)throw Error(i(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(t){nd(e,e.return,t)}}break;case 3:if(ep=null,a=Cl,Cl=Af(t.containerInfo),Sl(t,e),Cl=a,Tl(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Gp(t.containerInfo)}catch(t){nd(e,e.return,t)}cl&&(cl=!1,El(e));break;case 4:r=Cl,Cl=Af(e.stateNode.containerInfo),Sl(t,e),Tl(e),Cl=r;break;case 12:Sl(t,e),Tl(e);break;case 31:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 13:Sl(t,e),Tl(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(uu=ze()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 22:a=e.memoizedState!==null;var l=n!==null&&n.memoizedState!==null,u=ol,d=sl;if(ol=u||a,sl=d||l,Sl(t,e),sl=d,ol=u,Tl(e),r&8192)a:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||l||ol||sl||Ol(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){l=n=t;try{if(o=l.stateNode,a)s=o.style,typeof s.setProperty==`function`?s.setProperty(`display`,`none`,`important`):s.display=`none`;else{c=l.stateNode;var f=l.memoizedProps.style,p=f!=null&&f.hasOwnProperty(`display`)?f.display:null;c.style.display=p==null||typeof p==`boolean`?``:(``+p).trim()}}catch(e){nd(l,l.return,e)}}}else if(t.tag===6){if(n===null){l=t;try{l.stateNode.nodeValue=a?``:l.memoizedProps}catch(e){nd(l,l.return,e)}}}else if(t.tag===18){if(n===null){l=t;try{var m=l.stateNode;a?mf(m,!0):mf(l.stateNode,!1)}catch(e){nd(l,l.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,xl(e,n))));break;case 19:Sl(t,e),Tl(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,xl(e,r)));break;case 30:break;case 21:break;default:Sl(t,e),Tl(e)}}function Tl(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(tl(r)){n=r;break}r=r.return}if(n==null)throw Error(i(160));switch(n.tag){case 27:var a=n.stateNode;il(e,nl(e),a);break;case 5:var o=n.stateNode;n.flags&32&&(an(o,``),n.flags&=-33),il(e,nl(e),o);break;case 3:case 4:var s=n.stateNode.containerInfo;rl(e,nl(e),s);break;default:throw Error(i(161))}}catch(t){nd(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function El(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;El(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)fl(e,t.alternate,t),t=t.sibling}function Ol(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:F(4,t,t.return),Ol(t);break;case 1:I(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount==`function`&&Zc(t,t.return,n),Ol(t);break;case 27:Df(t.stateNode);case 26:case 5:I(t,t.return),Ol(t);break;case 22:t.memoizedState===null&&Ol(t);break;case 30:Ol(t);break;default:Ol(t)}e=e.sibling}}function kl(e,t,n){for(n&&=(t.subtreeFlags&8772)!=0,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags;switch(a.tag){case 0:case 11:case 15:kl(i,a,n),Yc(4,a);break;case 1:if(kl(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){nd(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var s=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)uo(c[i],s)}catch(e){nd(r,r.return,e)}}n&&o&64&&Xc(a),Qc(a,a.return);break;case 27:al(a);case 26:case 5:kl(i,a,n),n&&r===null&&o&4&&$c(a),Qc(a,a.return);break;case 12:kl(i,a,n);break;case 31:kl(i,a,n),n&&o&4&&vl(i,a);break;case 13:kl(i,a,n),n&&o&4&&yl(i,a);break;case 22:a.memoizedState===null&&kl(i,a,n),Qc(a,a.return);break;case 30:break;default:kl(i,a,n)}t=t.sibling}}function Al(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Ca(n))}function jl(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e))}function Ml(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Nl(e,t,n,r),t=t.sibling}function Nl(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:Ml(e,t,n,r),i&2048&&Yc(9,t);break;case 1:Ml(e,t,n,r);break;case 3:Ml(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ca(e)));break;case 12:if(i&2048){Ml(e,t,n,r),e=t.stateNode;try{var a=t.memoizedProps,o=a.id,s=a.onPostCommit;typeof s==`function`&&s(o,t.alternate===null?`mount`:`update`,e.passiveEffectDuration,-0)}catch(e){nd(t,t.return,e)}}else Ml(e,t,n,r);break;case 31:Ml(e,t,n,r);break;case 13:Ml(e,t,n,r);break;case 23:break;case 22:a=t.stateNode,o=t.alternate,t.memoizedState===null?a._visibility&2?Ml(e,t,n,r):(a._visibility|=2,Pl(e,t,n,r,(t.subtreeFlags&10256)!=0||!1)):a._visibility&2?Ml(e,t,n,r):Fl(e,t),i&2048&&Al(o,t);break;case 24:Ml(e,t,n,r),i&2048&&jl(t.alternate,t);break;default:Ml(e,t,n,r)}}function Pl(e,t,n,r,i){for(i&&=(t.subtreeFlags&10256)!=0||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Pl(a,o,s,c,i),Yc(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Pl(a,o,s,c,i)):u._visibility&2?Pl(a,o,s,c,i):Fl(a,o),i&&l&2048&&Al(o.alternate,o);break;case 24:Pl(a,o,s,c,i),i&&l&2048&&jl(o.alternate,o);break;default:Pl(a,o,s,c,i)}t=t.sibling}}function Fl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Fl(n,r),i&2048&&Al(r.alternate,r);break;case 24:Fl(n,r),i&2048&&jl(r.alternate,r);break;default:Fl(n,r)}t=t.sibling}}var Il=8192;function Ll(e,t,n){if(e.subtreeFlags&Il)for(e=e.child;e!==null;)Rl(e,t,n),e=e.sibling}function Rl(e,t,n){switch(e.tag){case 26:Ll(e,t,n),e.flags&Il&&e.memoizedState!==null&&z(n,Cl,e.memoizedState,e.memoizedProps);break;case 5:Ll(e,t,n);break;case 3:case 4:var r=Cl;Cl=Af(e.stateNode.containerInfo),Ll(e,t,n),Cl=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Il,Il=16777216,Ll(e,t,n),Il=r):Ll(e,t,n));break;default:Ll(e,t,n)}}function zl(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Bl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Vl(e),e=e.sibling}function Vl(e){switch(e.tag){case 0:case 11:case 15:Bl(e),e.flags&2048&&F(9,e,e.return);break;case 3:Bl(e);break;case 12:Bl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Hl(e)):Bl(e);break;default:Bl(e)}}function Hl(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ul=r,Ul(r,e)}zl(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:F(8,t,t.return),Hl(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Hl(t));break;default:Hl(t)}e=e.sibling}}function Ul(e,t){for(;ul!==null;){var n=ul;switch(n.tag){case 0:case 11:case 15:F(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Ca(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ul=r;else a:for(n=e;ul!==null;){r=ul;var i=r.sibling,a=r.return;if(pl(r),r===n){ul=null;break a}if(i!==null){i.return=a,ul=i;break a}ul=a}}}var Wl={getCacheForType:function(e){var t=ha(xa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ha(xa).controller.signal}},Gl=typeof WeakMap==`function`?WeakMap:Map,Kl=0,ql=null,Jl=null,L=0,Yl=0,Xl=null,Zl=!1,Ql=!1,$l=!1,eu=0,tu=0,nu=0,ru=0,iu=0,au=0,ou=0,su=null,cu=null,lu=!1,uu=0,du=0,fu=1/0,pu=null,mu=null,hu=0,gu=null,_u=null,vu=0,yu=0,bu=null,xu=null,Su=0,Cu=null;function wu(){return Kl&2&&L!==0?L&-L:b.T===null?gt():Cd()}function Tu(){if(au===0)if(!(L&536870912)||Ji){var e=nt;nt<<=1,!(nt&3932160)&&(nt=262144),au=e}else au=536870912;return e=vo.current,e!==null&&(e.flags|=32),au}function Eu(e,t,n){(e===ql&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)&&(Nu(e,0),Au(e,L,au,!1)),ut(e,n),(!(Kl&2)||e!==ql)&&(e===ql&&(!(Kl&2)&&(ru|=n),tu===4&&Au(e,L,au,!1)),hd(e))}function Du(e,t,n){if(Kl&6)throw Error(i(327));var r=!n&&(t&127)==0&&(t&e.expiredLanes)===0||ot(e,t),a=r?Vu(e,t):zu(e,t,!0),o=r;do{if(a===0){Ql&&!r&&Au(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!ku(n)){a=zu(e,t,!1),o=!1;continue}if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=su;var l=c.current.memoizedState.isDehydrated;if(l&&(Nu(c,s).flags|=256),s=zu(c,s,!1),s!==2){if($l&&!l){c.errorRecoveryDisabledLanes|=o,ru|=o,a=4;break a}o=cu,cu=a,o!==null&&(cu===null?cu=o:cu.push.apply(cu,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Nu(e,0),Au(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t)break;case 6:Au(r,t,au,!Zl);break a;case 2:cu=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=uu+300-ze(),10<a)){if(Au(r,t,au,!Zl),at(r,0,!0)!==0)break a;vu=t,r.timeoutHandle=sf(Ou.bind(null,r,n,cu,pu,lu,t,au,ru,ou,Zl,o,`Throttled`,-0,0),a);break a}Ou(r,n,cu,pu,lu,t,au,ru,ou,Zl,o,null,-0,0)}}break}while(1);hd(e)}function Ou(e,t,n,r,i,a,o,s,c,l,u,d,f,p){if(e.timeoutHandle=-1,d=t.subtreeFlags,d&8192||(d&16785408)==16785408){d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pn},Rl(t,a,d);var m=(a&62914560)===a?uu-ze():(a&4194048)===a?du-ze():0;if(m=ap(d,m),m!==null){vu=a,e.cancelPendingCommit=m(Ju.bind(null,e,t,a,n,r,i,o,s,c,u,d,null,f,p)),Au(e,a,o,!l);return}}Ju(e,t,a,n,r,i,o,s,c)}function ku(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Fr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Au(e,t,n,r){t&=~iu,t&=~ru,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Ze(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&ft(e,n,t)}function ju(){return Kl&6?!0:(gd(0,!1),!1)}function Mu(){if(Jl!==null){if(Yl===0)var e=Jl.return;else e=Jl,sa=oa=null,Go(e),Ka=null,qa=0,e=Jl;for(;e!==null;)P(e.alternate,e),e=e.return;Jl=null}}function Nu(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,cf(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),vu=0,Mu(),ql=e,Jl=n=Ci(e.current,null),L=t,Yl=0,Xl=null,Zl=!1,Ql=ot(e,t),$l=!1,ou=au=iu=ru=nu=tu=0,cu=su=null,lu=!1,t&8&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Ze(r),a=1<<i;t|=e[i],r&=~a}return eu=t,pi(),n}function Pu(e,t){w=null,b.H=T,t===Ia||t===Ra?(t=Wa(),Yl=3):t===La?(t=Wa(),Yl=4):Yl=t===vc?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,Xl=t,Jl===null&&(tu=1,fc(e,ji(t,e.current)))}function Fu(){var e=vo.current;return e===null?!0:(L&4194048)===L?yo===null:(L&62914560)===L||L&536870912?e===yo:!1}function Iu(){var e=b.H;return b.H=T,e===null?T:e}function Lu(){var e=b.A;return b.A=Wl,e}function Ru(){tu=4,Zl||(L&4194048)!==L&&vo.current!==null||(Ql=!0),!(nu&134217727)&&!(ru&134217727)||ql===null||Au(ql,L,au,!1)}function zu(e,t,n){var r=Kl;Kl|=2;var i=Iu(),a=Lu();(ql!==e||L!==t)&&(pu=null,Nu(e,t)),t=!1;var o=tu;a:do try{if(Yl!==0&&Jl!==null){var s=Jl,c=Xl;switch(Yl){case 8:Mu(),o=6;break a;case 3:case 2:case 9:case 6:vo.current===null&&(t=!0);var l=Yl;if(Yl=0,Xl=null,Gu(e,s,c,l),n&&Ql){o=0;break a}break;default:l=Yl,Yl=0,Xl=null,Gu(e,s,c,l)}}Bu(),o=tu;break}catch(t){Pu(e,t)}while(1);return t&&e.shellSuspendCounter++,sa=oa=null,Kl=r,b.H=i,b.A=a,Jl===null&&(ql=null,L=0,pi()),o}function Bu(){for(;Jl!==null;)Uu(Jl)}function Vu(e,t){var n=Kl;Kl|=2;var r=Iu(),a=Lu();ql!==e||L!==t?(pu=null,fu=ze()+500,Nu(e,t)):Ql=ot(e,t);a:do try{if(Yl!==0&&Jl!==null){t=Jl;var o=Xl;b:switch(Yl){case 1:Yl=0,Xl=null,Gu(e,t,o,1);break;case 2:case 9:if(Ba(o)){Yl=0,Xl=null,Wu(t);break}t=function(){Yl!==2&&Yl!==9||ql!==e||(Yl=7),hd(e)},o.then(t,t);break a;case 3:Yl=7;break a;case 4:Yl=5;break a;case 7:Ba(o)?(Yl=0,Xl=null,Wu(t)):(Yl=0,Xl=null,Gu(e,t,o,7));break;case 5:var s=null;switch(Jl.tag){case 26:s=Jl.memoizedState;case 5:case 27:var c=Jl;if(s?R(s):c.stateNode.complete){Yl=0,Xl=null;var l=c.sibling;if(l!==null)Jl=l;else{var u=c.return;u===null?Jl=null:(Jl=u,Ku(u))}break b}}Yl=0,Xl=null,Gu(e,t,o,5);break;case 6:Yl=0,Xl=null,Gu(e,t,o,6);break;case 8:Mu(),tu=6;break a;default:throw Error(i(462))}}Hu();break}catch(t){Pu(e,t)}while(1);return sa=oa=null,b.H=r,b.A=a,Kl=n,Jl===null?(ql=null,L=0,pi(),tu):0}function Hu(){for(;Jl!==null&&!Le();)Uu(Jl)}function Uu(e){var t=Hc(e.alternate,e,eu);e.memoizedProps=e.pendingProps,t===null?Ku(e):Jl=t}function Wu(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=D(n,t,t.pendingProps,t.type,void 0,L);break;case 11:t=D(n,t,t.pendingProps,t.type.render,t.ref,L);break;case 5:Go(t);default:P(n,t),t=Jl=wi(t,eu),t=Hc(n,t,eu)}e.memoizedProps=e.pendingProps,t===null?Ku(e):Jl=t}function Gu(e,t,n,r){sa=oa=null,Go(t),Ka=null,qa=0;var i=t.return;try{if(_c(e,i,t,n,L)){tu=1,fc(e,ji(n,e.current)),Jl=null;return}}catch(t){if(i!==null)throw Jl=i,t;tu=1,fc(e,ji(n,e.current)),Jl=null;return}t.flags&32768?(Ji||r===1?e=!0:Ql||L&536870912?e=!1:(Zl=e=!0,(r===2||r===9||r===3||r===6)&&(r=vo.current,r!==null&&r.tag===13&&(r.flags|=16384))),qu(t,e)):Ku(t)}function Ku(e){var t=e;do{if(t.flags&32768){qu(t,Zl);return}e=t.return;var n=N(t.alternate,t,eu);if(n!==null){Jl=n;return}if(t=t.sibling,t!==null){Jl=t;return}Jl=t=e}while(t!==null);tu===0&&(tu=5)}function qu(e,t){do{var n=Jc(e.alternate,e);if(n!==null){n.flags&=32767,Jl=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Jl=e;return}Jl=e=n}while(e!==null);tu=6,Jl=null}function Ju(e,t,n,r,a,o,s,c,l){e.cancelPendingCommit=null;do $u();while(hu!==0);if(Kl&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));if(o=t.lanes|t.childLanes,o|=fi,dt(e,n,o,s,c,l),e===ql&&(Jl=ql=null,L=0),_u=t,gu=e,vu=n,yu=o,bu=a,xu=r,t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,cd(Ue,function(){return ed(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!=0,t.subtreeFlags&13878||r){r=b.T,b.T=null,a=me.p,me.p=2,s=Kl,Kl|=4;try{dl(e,t,n)}finally{Kl=s,me.p=a,b.T=r}}hu=1,Yu(),Xu(),Zu()}}function Yu(){if(hu===1){hu=0;var e=gu,t=_u,n=(t.flags&13878)!=0;if(t.subtreeFlags&13878||n){n=b.T,b.T=null;var r=me.p;me.p=2;var i=Kl;Kl|=4;try{wl(t,e);var a=$d,o=Br(e.containerInfo),s=a.focusedElem,c=a.selectionRange;if(o!==s&&s&&s.ownerDocument&&zr(s.ownerDocument.documentElement,s)){if(c!==null&&Vr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Rr(s,h),v=Rr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var ee=d[s];ee.element.scrollLeft=ee.left,ee.element.scrollTop=ee.top}}yp=!!Qd,$d=Qd=null}finally{Kl=i,me.p=r,b.T=n}}e.current=t,hu=2}}function Xu(){if(hu===2){hu=0;var e=gu,t=_u,n=(t.flags&8772)!=0;if(t.subtreeFlags&8772||n){n=b.T,b.T=null;var r=me.p;me.p=2;var i=Kl;Kl|=4;try{fl(e,t.alternate,t)}finally{Kl=i,me.p=r,b.T=n}}hu=3}}function Zu(){if(hu===4||hu===3){hu=0,Re();var e=gu,t=_u,n=vu,r=xu;t.subtreeFlags&10256||t.flags&10256?hu=5:(hu=0,_u=gu=null,Qu(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(mu=null),C(n),t=t.stateNode,Ye&&typeof Ye.onCommitFiberRoot==`function`)try{Ye.onCommitFiberRoot(Je,t,void 0,(t.current.flags&128)==128)}catch{}if(r!==null){t=b.T,i=me.p,me.p=2,b.T=null;try{for(var a=e.onRecoverableError,o=0;o<r.length;o++){var s=r[o];a(s.value,{componentStack:s.stack})}}finally{b.T=t,me.p=i}}vu&3&&$u(),hd(e),i=e.pendingLanes,n&261930&&i&42?e===Cu?Su++:(Su=0,Cu=e):Su=0,gd(0,!1)}}function Qu(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ca(t)))}function $u(){return Yu(),Xu(),Zu(),ed()}function ed(){if(hu!==5)return!1;var e=gu,t=yu;yu=0;var n=C(vu),r=b.T,a=me.p;try{me.p=32>n?32:n,b.T=null,n=bu,bu=null;var o=gu,s=vu;if(hu=0,_u=gu=null,vu=0,Kl&6)throw Error(i(331));var c=Kl;if(Kl|=4,Vl(o.current),Nl(o,o.current,s,n),Kl=c,gd(0,!1),Ye&&typeof Ye.onPostCommitFiberRoot==`function`)try{Ye.onPostCommitFiberRoot(Je,o)}catch{}return!0}finally{me.p=a,b.T=r,Qu(e,t)}}function td(e,t,n){t=ji(n,t),t=mc(e.stateNode,t,2),e=io(e,t,2),e!==null&&(ut(e,2),hd(e))}function nd(e,t,n){if(e.tag===3)td(e,e,n);else for(;t!==null;){if(t.tag===3){td(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(mu===null||!mu.has(r))){e=ji(n,e),n=hc(2),r=io(t,n,2),r!==null&&(gc(n,r,t,e),ut(r,2),hd(r));break}}t=t.return}}function rd(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Gl;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||($l=!0,i.add(n),e=id.bind(null,e,t,n),t.then(e,e))}function id(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ql===e&&(L&n)===n&&(tu===4||tu===3&&(L&62914560)===L&&300>ze()-uu?!(Kl&2)&&Nu(e,0):iu|=n,ou===L&&(ou=0)),hd(e)}function ad(e,t){t===0&&(t=ct()),e=gi(e,t),e!==null&&(ut(e,t),hd(e))}function od(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),ad(e,n)}function sd(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),ad(e,n)}function cd(e,t){return Fe(e,t)}var ld=null,ud=null,dd=!1,fd=!1,pd=!1,md=0;function hd(e){e!==ud&&e.next===null&&(ud===null?ld=ud=e:ud=ud.next=e),fd=!0,dd||(dd=!0,Sd())}function gd(e,t){if(!pd&&fd){pd=!0;do for(var n=!1,r=ld;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Ze(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,xd(r,a))}else a=L,a=at(r,r===ql?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||ot(r,a)||(n=!0,xd(r,a));r=r.next}while(n);pd=!1}}function _d(){vd()}function vd(){fd=dd=!1;var e=0;md!==0&&of()&&(e=md);for(var t=ze(),n=null,r=ld;r!==null;){var i=r.next,a=yd(r,t);a===0?(r.next=null,n===null?ld=i:n.next=i,i===null&&(ud=n)):(n=r,(e!==0||a&3)&&(fd=!0)),r=i}hu!==0&&hu!==5||gd(e,!1),md!==0&&(md=0)}function yd(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Ze(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=st(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=ql,n=L,n=at(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Yl===2||Yl===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||ot(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),C(n)){case 2:case 8:n=He;break;case 32:n=Ue;break;case 268435456:n=Ge;break;default:n=Ue}return r=bd.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function bd(e,t){if(hu!==0&&hu!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if($u()&&e.callbackNode!==n)return null;var r=L;return r=at(e,e===ql?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Du(e,r,t),yd(e,ze()),e.callbackNode!=null&&e.callbackNode===n?bd.bind(null,e):null)}function xd(e,t){if($u())return null;Du(e,t,!0)}function Sd(){uf(function(){Kl&6?Fe(Ve,_d):vd()})}function Cd(){if(md===0){var e=Ea;e===0&&(e=tt,tt<<=1,!(tt&261888)&&(tt=256)),md=e}return md}function wd(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:fn(``+e)}function Td(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Ed(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=wd((i[bt]||null).action),o=r.submitter;o&&(t=(t=o[bt]||null)?wd(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Pn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(md!==0){var e=o?Td(i,o):new FormData(i);Vs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Td(i,o):new FormData(i),Vs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Dd=0;Dd<si.length;Dd++){var Od=si[Dd];ci(Od.toLowerCase(),`on`+(Od[0].toUpperCase()+Od.slice(1)))}ci($r,`onAnimationEnd`),ci(ei,`onAnimationIteration`),ci(ti,`onAnimationStart`),ci(`dblclick`,`onDoubleClick`),ci(`focusin`,`onFocus`),ci(`focusout`,`onBlur`),ci(ni,`onTransitionRun`),ci(ri,`onTransitionStart`),ci(ii,`onTransitionCancel`),ci(ai,`onTransitionEnd`),It(`onMouseEnter`,[`mouseout`,`mouseover`]),It(`onMouseLeave`,[`mouseout`,`mouseover`]),It(`onPointerEnter`,[`pointerout`,`pointerover`]),It(`onPointerLeave`,[`pointerout`,`pointerover`]),Ft(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Ft(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Ft(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Ft(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Ft(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var kd=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Ad=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(kd));function jd(e,t){t=(t&4)!=0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){li(e)}i.currentTarget=null,a=c}}}}function Md(e,t){var n=t[St];n===void 0&&(n=t[St]=new Set);var r=e+`__bubble`;n.has(r)||(Id(t,e,2,!1),n.add(r))}function Nd(e,t,n){var r=0;t&&(r|=4),Id(n,e,r,t)}var Pd=`_reactListening`+Math.random().toString(36).slice(2);function Fd(e){if(!e[Pd]){e[Pd]=!0,Nt.forEach(function(t){t!==`selectionchange`&&(Ad.has(t)||Nd(t,!1,e),Nd(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pd]||(t[Pd]=!0,Nd(`selectionchange`,!1,t))}}function Id(e,t,n,r){switch(Ep(t)){case 2:var i=bp;break;case 8:i=xp;break;default:i=Sp}n=i.bind(null,t,n,e),i=void 0,!Cn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Ld(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=Ot(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}bn(function(){var r=a,i=hn(n),s=[];a:{var c=oi.get(e);if(c!==void 0){var l=Pn,u=e;switch(e){case`keypress`:if(kn(n)===0)break a;case`keydown`:case`keyup`:l=Qn;break;case`focusin`:u=`focus`,l=Un;break;case`focusout`:u=`blur`,l=Un;break;case`beforeblur`:case`afterblur`:l=Un;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Vn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Hn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=er;break;case $r:case ei:case ti:l=Wn;break;case ai:l=tr;break;case`scroll`:case`scrollend`:l=In;break;case`wheel`:l=nr;break;case`copy`:case`cut`:case`paste`:l=Gn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=$n;break;case`toggle`:case`beforetoggle`:l=rr}var d=(t&4)!=0,f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=xn(m,p),g!=null&&d.push(Rd(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(c=e===`mouseover`||e===`pointerover`,l=e===`mouseout`||e===`pointerout`,c&&n!==mn&&(u=n.relatedTarget||n.fromElement)&&(Ot(u)||u[xt]))break a;if((l||c)&&(c=i.window===i?i:(c=i.ownerDocument)?c.defaultView||c.parentWindow:window,l?(u=n.relatedTarget||n.toElement,l=r,u=u?Ot(u):null,u!==null&&(f=o(u),d=u.tag,u!==f||d!==5&&d!==27&&d!==6)&&(u=null)):(l=null,u=r),l!==u)){if(d=Vn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=$n,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=l==null?c:At(l),h=u==null?c:At(u),c=new d(g,m+`leave`,l,n,i),c.target=f,c.relatedTarget=h,g=null,Ot(i)===r&&(d=new d(p,m+`enter`,u,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,l&&u)b:{for(d=Bd,p=l,m=u,h=0,g=p;g;g=d(g))h++;g=0;for(var _=m;_;_=d(_))g++;for(;0<h-g;)p=d(p),h--;for(;0<g-h;)m=d(m),g--;for(;h--;){if(p===m||m!==null&&p===m.alternate){d=p;break b}p=d(p),m=d(m)}d=null}else d=null;l!==null&&Vd(s,c,l,d,!1),u!==null&&f!==null&&Vd(s,f,u,d,!0)}}a:{if(c=r?At(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var v=Cr;else if(_r(c))if(wr)v=Nr;else{v=jr;var y=Ar}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&ln(r.elementType)&&(v=Cr):v=Mr;if(v&&=v(e,r)){vr(s,v,n,i);break a}y&&y(e,c,r),e===`focusout`&&r&&c.type===`number`&&r.memoizedProps.value!=null&&en(c,`number`,c.value)}switch(y=r?At(r):window,e){case`focusin`:(_r(y)||y.contentEditable===`true`)&&(Ur=y,Wr=r,Gr=null);break;case`focusout`:Gr=Wr=Ur=null;break;case`mousedown`:Kr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Kr=!1,qr(s,n,i);break;case`selectionchange`:if(Hr)break;case`keydown`:case`keyup`:qr(s,n,i)}var ee;if(ar)b:{switch(e){case`compositionstart`:var te=`onCompositionStart`;break b;case`compositionend`:te=`onCompositionEnd`;break b;case`compositionupdate`:te=`onCompositionUpdate`;break b}te=void 0}else pr?dr(e,n)&&(te=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(te=`onCompositionStart`);te&&(cr&&n.locale!==`ko`&&(pr||te!==`onCompositionStart`?te===`onCompositionEnd`&&pr&&(ee=On()):(Tn=i,En=`value`in Tn?Tn.value:Tn.textContent,pr=!0)),y=zd(r,te),0<y.length&&(te=new Kn(te,e,null,n,i),s.push({event:te,listeners:y}),ee?te.data=ee:(ee=fr(n),ee!==null&&(te.data=ee)))),(ee=sr?mr(e,n):hr(e,n))&&(te=zd(r,`onBeforeInput`),0<te.length&&(y=new Kn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:y,listeners:te}),y.data=ee)),Ed(s,e,r,n,i)}jd(s,t)})}function Rd(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zd(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=xn(e,n),i!=null&&r.unshift(Rd(e,i,a)),i=xn(e,t),i!=null&&r.push(Rd(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Bd(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Vd(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=xn(n,a),l!=null&&o.unshift(Rd(n,l,c))):i||(l=xn(n,a),l!=null&&o.push(Rd(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var Hd=/\\r\\n?/g,Ud=/\\u0000|\\uFFFD/g;function Wd(e){return(typeof e==`string`?e:``+e).replace(Hd,`\n`).replace(Ud,``)}function Gd(e,t){return t=Wd(t),Wd(e)===t}function Kd(e,t,n,r,a,o){switch(n){case`children`:typeof r==`string`?t===`body`||t===`textarea`&&r===``||an(e,r):(typeof r==`number`||typeof r==`bigint`)&&t!==`body`&&an(e,``+r);break;case`className`:Ht(e,`class`,r);break;case`tabIndex`:Ht(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Ht(e,n,r);break;case`style`:cn(e,r,o);break;case`data`:if(t!==`object`){Ht(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error(\'A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().\')`);break}else typeof o==`function`&&(n===`formAction`?(t!==`input`&&Kd(e,t,`name`,a.name,a,null),Kd(e,t,`formEncType`,a.formEncType,a,null),Kd(e,t,`formMethod`,a.formMethod,a,null),Kd(e,t,`formTarget`,a.formTarget,a,null)):(Kd(e,t,`encType`,a.encType,a,null),Kd(e,t,`method`,a.method,a,null),Kd(e,t,`target`,a.target,a,null)));if(r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=fn(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=pn);break;case`onScroll`:r!=null&&Md(`scroll`,e);break;case`onScrollEnd`:r!=null&&Md(`scrollend`,e);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=fn(``+r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``+r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Md(`beforetoggle`,e),Md(`toggle`,e),Vt(e,`popover`,r);break;case`xlinkActuate`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Ut(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Ut(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Vt(e,`is`,r);break;case`innerText`:case`textContent`:break;default:(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)&&(n=un.get(n)||n,Vt(e,n,r))}}function qd(e,t,n,r,a,o){switch(n){case`style`:cn(e,r,o);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));e.innerHTML=n}}break;case`children`:typeof r==`string`?an(e,r):(typeof r==`number`||typeof r==`bigint`)&&an(e,``+r);break;case`onScroll`:r!=null&&Md(`scroll`,e);break;case`onScrollEnd`:r!=null&&Md(`scrollend`,e);break;case`onClick`:r!=null&&(e.onclick=pn);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(!Pt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),t=n.slice(2,a?n.length-7:void 0),o=e[bt]||null,o=o==null?null:o[n],typeof o==`function`&&e.removeEventListener(t,o,a),typeof r==`function`)){typeof o!=`function`&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,a);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):Vt(e,n,r)}}}function Jd(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Md(`error`,e),Md(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Kd(e,t,o,s,n,null)}}a&&Kd(e,t,`srcSet`,n.srcSet,n,null),r&&Kd(e,t,`src`,n.src,n,null);return;case`input`:Md(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:Kd(e,t,r,d,n,null)}}$t(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Md(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:Kd(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&tn(e,!!r,n,!0):tn(e,!!r,t,!1);return;case`textarea`:for(s in Md(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:Kd(e,t,s,c,n,null)}rn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:Kd(e,t,l,r,n,null)}return;case`dialog`:Md(`beforetoggle`,e),Md(`toggle`,e),Md(`cancel`,e),Md(`close`,e);break;case`iframe`:case`object`:Md(`load`,e);break;case`video`:case`audio`:for(r=0;r<kd.length;r++)Md(kd[r],e);break;case`image`:Md(`error`,e),Md(`load`,e);break;case`details`:Md(`toggle`,e);break;case`embed`:case`source`:case`link`:Md(`error`,e),Md(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:Kd(e,t,u,r,n,null)}return;default:if(ln(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&qd(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&Kd(e,t,c,r,n,null))}function Yd(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||Kd(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:o=m;break;case`name`:a=m;break;case`checked`:u=m;break;case`defaultChecked`:d=m;break;case`value`:s=m;break;case`defaultValue`:c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&Kd(e,t,p,m,r,f)}}Qt(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||Kd(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:p=o;break;case`defaultValue`:c=o;break;case`multiple`:s=o;default:o!==l&&Kd(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?tn(e,!!n,n?[]:``,!1):tn(e,!!n,t,!0)):tn(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:Kd(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:p=a;break;case`defaultValue`:m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&Kd(e,t,s,a,r,o)}nn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:Kd(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:Kd(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&Kd(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:Kd(e,t,u,p,r,m)}return;default:if(ln(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&qd(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||qd(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&Kd(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||Kd(e,t,f,p,r,m)}function Xd(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Zd(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&Xd(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&Xd(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var Qd=null,$d=null;function ef(e){return e.nodeType===9?e:e.ownerDocument}function tf(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function nf(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function rf(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var af=null;function of(){var e=window.event;return e&&e.type===`popstate`?e===af?!1:(af=e,!0):(af=null,!1)}var sf=typeof setTimeout==`function`?setTimeout:void 0,cf=typeof clearTimeout==`function`?clearTimeout:void 0,lf=typeof Promise==`function`?Promise:void 0,uf=typeof queueMicrotask==`function`?queueMicrotask:lf===void 0?sf:function(e){return lf.resolve(null).then(e).catch(df)};function df(e){setTimeout(function(){throw e})}function ff(e){return e===`head`}function pf(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Gp(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)Df(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,Df(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Et]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&Df(e.ownerDocument.body);n=i}while(n);Gp(t)}function mf(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8)if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++;n=r}while(n)}function hf(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:hf(n),Dt(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function gf(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r)if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e;else if(!e[Et])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=Sf(e.nextSibling),e===null)break}return null}function _f(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=Sf(e.nextSibling),e===null))return null;return e}function vf(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=Sf(e.nextSibling),e===null))return null;return e}function yf(e){return e.data===`$?`||e.data===`$~`}function bf(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function xf(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function Sf(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var Cf=null;function wf(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return Sf(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function Tf(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function Ef(e,t,n){switch(t=ef(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function Df(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Dt(e)}var Of=new Map,kf=new Set;function Af(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var jf=me.d;me.d={f:Mf,r:Nf,D:If,C:Lf,L:Rf,m:zf,X:Vf,S:Bf,M:Hf};function Mf(){var e=jf.f(),t=ju();return e||t}function Nf(e){var t=kt(e);t!==null&&t.tag===5&&t.type===`form`?Us(t):jf.r(e)}var Pf=typeof document>`u`?null:document;function Ff(e,t,n){var r=Pf;if(r&&typeof t==`string`&&t){var i=Zt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),kf.has(i)||(kf.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),Jd(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function If(e){jf.D(e),Ff(`dns-prefetch`,e,null)}function Lf(e,t){jf.C(e,t),Ff(`preconnect`,e,t)}function Rf(e,t,n){jf.L(e,t,n);var r=Pf;if(r&&e&&t){var i=`link[rel="preload"][as="`+Zt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+Zt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+Zt(n.imageSizes)+`"]`)):i+=`[href="`+Zt(e)+`"]`;var a=i;switch(t){case`style`:a=Wf(e);break;case`script`:a=Jf(e)}Of.has(a)||(e=p({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),Of.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Gf(a))||t===`script`&&r.querySelector(Yf(a))||(t=r.createElement(`link`),Jd(t,`link`,e),Mt(t),r.head.appendChild(t)))}}function zf(e,t){jf.m(e,t);var n=Pf;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+Zt(r)+`"][href="`+Zt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Jf(e)}if(!Of.has(a)&&(e=p({rel:`modulepreload`,href:e},t),Of.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Yf(a)))return}r=n.createElement(`link`),Jd(r,`link`,e),Mt(r),n.head.appendChild(r)}}}function Bf(e,t,n){jf.S(e,t,n);var r=Pf;if(r&&e){var i=jt(r).hoistableStyles,a=Wf(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Gf(a)))s.loading=5;else{e=p({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=Of.get(a))&&Qf(e,n);var c=o=r.createElement(`link`);Mt(c),Jd(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Zf(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Vf(e,t){jf.X(e,t);var n=Pf;if(n&&e){var r=jt(n).hoistableScripts,i=Jf(e),a=r.get(i);a||(a=n.querySelector(Yf(i)),a||(e=p({src:e,async:!0},t),(t=Of.get(i))&&$f(e,t),a=n.createElement(`script`),Mt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Hf(e,t){jf.M(e,t);var n=Pf;if(n&&e){var r=jt(n).hoistableScripts,i=Jf(e),a=r.get(i);a||(a=n.querySelector(Yf(i)),a||(e=p({src:e,async:!0,type:`module`},t),(t=Of.get(i))&&$f(e,t),a=n.createElement(`script`),Mt(a),Jd(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Uf(e,t,n,r){var a=(a=Ce.current)?Af(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(t=Wf(n.href),n=jt(a).hoistableStyles,r=n.get(t),r||(r={type:`style`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Wf(n.href);var o=jt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Gf(e)))&&!o._p&&(s.instance=o,s.state.loading=5),Of.has(e)||(n={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Of.set(e,n),o||qf(a,e,n,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(t=Jf(n),n=jt(a).hoistableScripts,r=n.get(t),r||(r={type:`script`,instance:null,count:0,state:null},n.set(t,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Wf(e){return`href="`+Zt(e)+`"`}function Gf(e){return`link[rel="stylesheet"][`+e+`]`}function Kf(e){return p({},e,{"data-precedence":e.precedence,precedence:null})}function qf(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=1:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2}),Jd(t,`link`,n),Mt(t),e.head.appendChild(t))}function Jf(e){return`[src="`+Zt(e)+`"]`}function Yf(e){return`script[async]`+e}function Xf(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+Zt(n.href)+`"]`);if(r)return t.instance=r,Mt(r),r;var a=p({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Mt(r),Jd(r,`style`,a),Zf(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Wf(n.href);var o=e.querySelector(Gf(a));if(o)return t.state.loading|=4,t.instance=o,Mt(o),o;r=Kf(n),(a=Of.get(a))&&Qf(r,a),o=(e.ownerDocument||e).createElement(`link`),Mt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),Jd(o,`link`,r),t.state.loading|=4,Zf(o,n.precedence,e),t.instance=o;case`script`:return o=Jf(n.src),(a=e.querySelector(Yf(o)))?(t.instance=a,Mt(a),a):(r=n,(a=Of.get(o))&&(r=p({},n),$f(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Mt(a),Jd(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Zf(r,n.precedence,e));return t.instance}function Zf(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Qf(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function $f(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var ep=null;function tp(e,t,n){if(ep===null){var r=new Map,i=ep=new Map;i.set(n,r)}else i=ep,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Et]||a[yt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function np(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function rp(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function R(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function z(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Wf(r.href),a=t.querySelector(Gf(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=op.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Mt(a);return}a=t.ownerDocument||t,r=Kf(r),(i=Of.get(i))&&Qf(r,i),a=a.createElement(`link`),Mt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),Jd(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=op.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var ip=0;function ap(e,t){return e.stylesheets&&e.count===0&&cp(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&ip===0&&(ip=62500*Zd());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&cp(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>ip?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function op(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)cp(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var sp=null;function cp(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sp=new Map,t.forEach(lp,e),sp=null,op.call(e))}function lp(e,t){if(!(t.state.loading&4)){var n=sp.get(e);if(n)var r=n.get(null);else{n=new Map,sp.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=op.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var up={$$typeof:te,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function dp(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lt(0),this.hiddenUpdates=lt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function fp(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dp(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=xi(3,null,null,t),e.current=a,a.stateNode=e,t=Sa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},to(a),e}function pp(e){return e?(e=yi,e):yi}function mp(e,t,n,r,i,a){i=pp(i),r.context===null?r.context=i:r.pendingContext=i,r=ro(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=io(e,r,t),n!==null&&(Eu(n,e,t),ao(n,e,t))}function hp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gp(e,t){hp(e,t),(e=e.alternate)&&hp(e,t)}function _p(e){if(e.tag===13||e.tag===31){var t=gi(e,67108864);t!==null&&Eu(t,e,67108864),gp(e,67108864)}}function vp(e){if(e.tag===13||e.tag===31){var t=wu();t=ht(t);var n=gi(e,t);n!==null&&Eu(n,e,t),gp(e,t)}}var yp=!0;function bp(e,t,n,r){var i=b.T;b.T=null;var a=me.p;try{me.p=2,Sp(e,t,n,r)}finally{me.p=a,b.T=i}}function xp(e,t,n,r){var i=b.T;b.T=null;var a=me.p;try{me.p=8,Sp(e,t,n,r)}finally{me.p=a,b.T=i}}function Sp(e,t,n,r){if(yp){var i=Cp(r);if(i===null)Ld(e,t,r,wp,n),Fp(e,r);else if(Lp(i,e,t,n,r))r.stopPropagation();else if(Fp(e,r),t&4&&-1<Pp.indexOf(e)){for(;i!==null;){var a=kt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=it(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Ze(o);s.entanglements[1]|=c,o&=~c}hd(a),!(Kl&6)&&(fu=ze()+500,gd(0,!1))}}break;case 31:case 13:s=gi(a,2),s!==null&&Eu(s,a,2),ju(),gp(a,2)}if(a=Cp(r),a===null&&Ld(e,t,r,wp,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Ld(e,t,r,null,n)}}function Cp(e){return e=hn(e),Tp(e)}var wp=null;function Tp(e){if(wp=null,e=Ot(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wp=e,null}function Ep(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(Be()){case Ve:return 2;case He:return 8;case Ue:case We:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var Dp=!1,Op=null,kp=null,Ap=null,jp=new Map,Mp=new Map,Np=[],Pp=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Fp(e,t){switch(e){case`focusin`:case`focusout`:Op=null;break;case`dragenter`:case`dragleave`:kp=null;break;case`mouseover`:case`mouseout`:Ap=null;break;case`pointerover`:case`pointerout`:jp.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mp.delete(t.pointerId)}}function Ip(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=kt(t),t!==null&&_p(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lp(e,t,n,r,i){switch(t){case`focusin`:return Op=Ip(Op,e,t,n,r,i),!0;case`dragenter`:return kp=Ip(kp,e,t,n,r,i),!0;case`mouseover`:return Ap=Ip(Ap,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jp.set(a,Ip(jp.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mp.set(a,Ip(Mp.get(a)||null,e,t,n,r,i)),!0}return!1}function Rp(e){var t=Ot(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,_t(e.priority,function(){vp(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,_t(e.priority,function(){vp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zp(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Cp(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);mn=r,n.target.dispatchEvent(r),mn=null}else return t=kt(n),t!==null&&_p(t),e.blockedOn=n,!1;t.shift()}return!0}function Bp(e,t,n){zp(e)&&n.delete(t)}function Vp(){Dp=!1,Op!==null&&zp(Op)&&(Op=null),kp!==null&&zp(kp)&&(kp=null),Ap!==null&&zp(Ap)&&(Ap=null),jp.forEach(Bp),Mp.forEach(Bp)}function Hp(e,n){e.blockedOn===n&&(e.blockedOn=null,Dp||(Dp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vp)))}var Up=null;function Wp(e){Up!==e&&(Up=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Up===e&&(Up=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Tp(r||n)===null)continue;break}var a=kt(n);a!==null&&(e.splice(t,3),t-=3,Vs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gp(e){function t(t){return Hp(t,e)}Op!==null&&Hp(Op,e),kp!==null&&Hp(kp,e),Ap!==null&&Hp(Ap,e),jp.forEach(t),Mp.forEach(t);for(var n=0;n<Np.length;n++){var r=Np[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Np.length&&(n=Np[0],n.blockedOn===null);)Rp(n),n.blockedOn===null&&Np.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[bt]||null;if(typeof a==`function`)o||Wp(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[bt]||null)s=o.formAction;else if(Tp(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wp(n)}}}function Kp(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function B(e){this._internalRoot=e}qp.prototype.render=B.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mp(n,wu(),e,t,null,null)},qp.prototype.unmount=B.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mp(e.current,2,null,e,null,null),ju(),t[xt]=null}};function qp(e){this._internalRoot=e}qp.prototype.unstable_scheduleHydration=function(e){if(e){var t=gt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Np.length&&t!==0&&t<Np[n].priority;n++);Np.splice(n,0,e),n===0&&Rp(e)}};var Jp=n.version;if(Jp!==`19.2.7`)throw Error(i(527,Jp,`19.2.7`));me.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Yp={bundleType:0,version:`19.2.7`,rendererPackageName:`react-dom`,currentDispatcherRef:b,reconcilerVersion:`19.2.7`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Xp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Xp.isDisabled&&Xp.supportsFiber)try{Je=Xp.inject(Yp),Ye=Xp}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=lc,s=uc,c=dc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fp(e,1,!1,null,null,n,r,null,o,s,c,Kp),e[xt]=t.current,Fd(e),new B(t)}})),Gy=o(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=Wy()}))(),Ky=`0.5.0`,qy=A({source:T().describe("The component\'s module in TSX. It may import only from \'react\'. Its exports, the default one by its function\'s name, are what `code` can name. For each value the reader can change by using the component, such as `checked`, `open` or `value`, take a matching `onCheckedChange`, `onOpenChange` or `onValueChange` prop and call it with the new value. Component Code passes it, so the change shows in the code. Keep state of its own only for when the prop is missing."),code:T().describe(`How the component is used, in JSX: elements, props and text only, with no hooks, calls or conditions. It is shown as code and rendered as the preview. Each string, number and boolean in it becomes a control.`),file:T().optional().describe("The file named in the code\'s tab, such as `Card.tsx`."),controls:N(T(),M([F(!1),k(M([T(),E()])),A({min:E().optional(),max:E().optional(),step:E().optional()})])).optional().describe("How a prop is changed, by its name or by `Element.prop`: a list of options, `{ min, max, step }` for a number, or `false` to keep it as written.")}),Jy=A({files:N(T(),T()).describe("The files by name, such as `index.html`, `style.css` and `script.js`, each in its own tab. They run together as one page in a sandboxed frame: the HTML is the page\'s body, with the CSS in a style element and the JS in a script element after it. The page cannot load anything from the network, so draw with canvas, SVG or the DOM."),controls:N(T(),M([F(!0),k(M([T(),E()])),A({min:E().optional(),max:E().optional(),step:E().optional()})])).optional().describe("The values the reader can change, by name: an attribute, as `r` or `circle.r`, a CSS property or custom property, as `--speed`, or a JS `const` set to a number, string or boolean. Each takes `true`, a list of options, or `{ min, max, step }` for a number. CSS changes apply as the reader drags, while HTML and JS run the page again, so a script that reads custom properties each frame follows along.")}),Yy={tsx:`tsx`,jsx:`jsx`,ts:`ts`,js:`js`,html:`html`,css:`css`},Xy=(e,t)=>`\\`${e}\\`\\n\\n\\`\\`\\`${Yy[e.split(`.`).pop()??``]??``}\\n${t}\\n\\`\\`\\``;function Zy({prop:e,value:t,files:n,file:r,problem:i}){return[`In Component Code, the user set \\`${e}\\` to \\`${typeof t==`string`?JSON.stringify(t):`${t}`}\\` in \\`${r}\\`. The preview now runs this code, which is its whole state:`,...Object.entries(n).map(([e,t])=>Xy(e,t)),i?`The preview throws instead of rendering: ${i}`:`The preview renders without throwing.`].join(`\n\n`)}var H;(function(e){e[e.NONE=0]=`NONE`,e[e._abstract=1]=`_abstract`,e[e._accessor=2]=`_accessor`,e[e._as=3]=`_as`,e[e._assert=4]=`_assert`,e[e._asserts=5]=`_asserts`,e[e._async=6]=`_async`,e[e._await=7]=`_await`,e[e._checks=8]=`_checks`,e[e._constructor=9]=`_constructor`,e[e._declare=10]=`_declare`,e[e._enum=11]=`_enum`,e[e._exports=12]=`_exports`,e[e._from=13]=`_from`,e[e._get=14]=`_get`,e[e._global=15]=`_global`,e[e._implements=16]=`_implements`,e[e._infer=17]=`_infer`,e[e._interface=18]=`_interface`,e[e._is=19]=`_is`,e[e._keyof=20]=`_keyof`,e[e._mixins=21]=`_mixins`,e[e._module=22]=`_module`,e[e._namespace=23]=`_namespace`,e[e._of=24]=`_of`,e[e._opaque=25]=`_opaque`,e[e._out=26]=`_out`,e[e._override=27]=`_override`,e[e._private=28]=`_private`,e[e._protected=29]=`_protected`,e[e._proto=30]=`_proto`,e[e._public=31]=`_public`,e[e._readonly=32]=`_readonly`,e[e._require=33]=`_require`,e[e._satisfies=34]=`_satisfies`,e[e._set=35]=`_set`,e[e._static=36]=`_static`,e[e._symbol=37]=`_symbol`,e[e._type=38]=`_type`,e[e._unique=39]=`_unique`,e[e._using=40]=`_using`})(H||={});var U;(function(e){e[e.PRECEDENCE_MASK=15]=`PRECEDENCE_MASK`,e[e.IS_KEYWORD=16]=`IS_KEYWORD`,e[e.IS_ASSIGN=32]=`IS_ASSIGN`,e[e.IS_RIGHT_ASSOCIATIVE=64]=`IS_RIGHT_ASSOCIATIVE`,e[e.IS_PREFIX=128]=`IS_PREFIX`,e[e.IS_POSTFIX=256]=`IS_POSTFIX`,e[e.IS_EXPRESSION_START=512]=`IS_EXPRESSION_START`,e[e.num=512]=`num`,e[e.bigint=1536]=`bigint`,e[e.decimal=2560]=`decimal`,e[e.regexp=3584]=`regexp`,e[e.string=4608]=`string`,e[e.name=5632]=`name`,e[e.eof=6144]=`eof`,e[e.bracketL=7680]=`bracketL`,e[e.bracketR=8192]=`bracketR`,e[e.braceL=9728]=`braceL`,e[e.braceBarL=10752]=`braceBarL`,e[e.braceR=11264]=`braceR`,e[e.braceBarR=12288]=`braceBarR`,e[e.parenL=13824]=`parenL`,e[e.parenR=14336]=`parenR`,e[e.comma=15360]=`comma`,e[e.semi=16384]=`semi`,e[e.colon=17408]=`colon`,e[e.doubleColon=18432]=`doubleColon`,e[e.dot=19456]=`dot`,e[e.question=20480]=`question`,e[e.questionDot=21504]=`questionDot`,e[e.arrow=22528]=`arrow`,e[e.template=23552]=`template`,e[e.ellipsis=24576]=`ellipsis`,e[e.backQuote=25600]=`backQuote`,e[e.dollarBraceL=27136]=`dollarBraceL`,e[e.at=27648]=`at`,e[e.hash=29184]=`hash`,e[e.eq=29728]=`eq`,e[e.assign=30752]=`assign`,e[e.preIncDec=32640]=`preIncDec`,e[e.postIncDec=33664]=`postIncDec`,e[e.bang=34432]=`bang`,e[e.tilde=35456]=`tilde`,e[e.pipeline=35841]=`pipeline`,e[e.nullishCoalescing=36866]=`nullishCoalescing`,e[e.logicalOR=37890]=`logicalOR`,e[e.logicalAND=38915]=`logicalAND`,e[e.bitwiseOR=39940]=`bitwiseOR`,e[e.bitwiseXOR=40965]=`bitwiseXOR`,e[e.bitwiseAND=41990]=`bitwiseAND`,e[e.equality=43015]=`equality`,e[e.lessThan=44040]=`lessThan`,e[e.greaterThan=45064]=`greaterThan`,e[e.relationalOrEqual=46088]=`relationalOrEqual`,e[e.bitShiftL=47113]=`bitShiftL`,e[e.bitShiftR=48137]=`bitShiftR`,e[e.plus=49802]=`plus`,e[e.minus=50826]=`minus`,e[e.modulo=51723]=`modulo`,e[e.star=52235]=`star`,e[e.slash=53259]=`slash`,e[e.exponent=54348]=`exponent`,e[e.jsxName=55296]=`jsxName`,e[e.jsxText=56320]=`jsxText`,e[e.jsxEmptyText=57344]=`jsxEmptyText`,e[e.jsxTagStart=58880]=`jsxTagStart`,e[e.jsxTagEnd=59392]=`jsxTagEnd`,e[e.typeParameterStart=60928]=`typeParameterStart`,e[e.nonNullAssertion=61440]=`nonNullAssertion`,e[e._break=62480]=`_break`,e[e._case=63504]=`_case`,e[e._catch=64528]=`_catch`,e[e._continue=65552]=`_continue`,e[e._debugger=66576]=`_debugger`,e[e._default=67600]=`_default`,e[e._do=68624]=`_do`,e[e._else=69648]=`_else`,e[e._finally=70672]=`_finally`,e[e._for=71696]=`_for`,e[e._function=73232]=`_function`,e[e._if=73744]=`_if`,e[e._return=74768]=`_return`,e[e._switch=75792]=`_switch`,e[e._throw=77456]=`_throw`,e[e._try=77840]=`_try`,e[e._var=78864]=`_var`,e[e._let=79888]=`_let`,e[e._const=80912]=`_const`,e[e._while=81936]=`_while`,e[e._with=82960]=`_with`,e[e._new=84496]=`_new`,e[e._this=85520]=`_this`,e[e._super=86544]=`_super`,e[e._class=87568]=`_class`,e[e._extends=88080]=`_extends`,e[e._export=89104]=`_export`,e[e._import=90640]=`_import`,e[e._yield=91664]=`_yield`,e[e._null=92688]=`_null`,e[e._true=93712]=`_true`,e[e._false=94736]=`_false`,e[e._in=95256]=`_in`,e[e._instanceof=96280]=`_instanceof`,e[e._typeof=97936]=`_typeof`,e[e._void=98960]=`_void`,e[e._delete=99984]=`_delete`,e[e._async=100880]=`_async`,e[e._get=101904]=`_get`,e[e._set=102928]=`_set`,e[e._declare=103952]=`_declare`,e[e._readonly=104976]=`_readonly`,e[e._abstract=106e3]=`_abstract`,e[e._static=107024]=`_static`,e[e._public=107536]=`_public`,e[e._private=108560]=`_private`,e[e._protected=109584]=`_protected`,e[e._override=110608]=`_override`,e[e._as=112144]=`_as`,e[e._enum=113168]=`_enum`,e[e._type=114192]=`_type`,e[e._implements=115216]=`_implements`})(U||={});function Qy(e){switch(e){case U.num:return`num`;case U.bigint:return`bigint`;case U.decimal:return`decimal`;case U.regexp:return`regexp`;case U.string:return`string`;case U.name:return`name`;case U.eof:return`eof`;case U.bracketL:return`[`;case U.bracketR:return`]`;case U.braceL:return`{`;case U.braceBarL:return`{|`;case U.braceR:return`}`;case U.braceBarR:return`|}`;case U.parenL:return`(`;case U.parenR:return`)`;case U.comma:return`,`;case U.semi:return`;`;case U.colon:return`:`;case U.doubleColon:return`::`;case U.dot:return`.`;case U.question:return`?`;case U.questionDot:return`?.`;case U.arrow:return`=>`;case U.template:return`template`;case U.ellipsis:return`...`;case U.backQuote:return"`";case U.dollarBraceL:return"${";case U.at:return`@`;case U.hash:return`#`;case U.eq:return`=`;case U.assign:return`_=`;case U.preIncDec:return`++/--`;case U.postIncDec:return`++/--`;case U.bang:return`!`;case U.tilde:return`~`;case U.pipeline:return`|>`;case U.nullishCoalescing:return`??`;case U.logicalOR:return`||`;case U.logicalAND:return`&&`;case U.bitwiseOR:return`|`;case U.bitwiseXOR:return`^`;case U.bitwiseAND:return`&`;case U.equality:return`==/!=`;case U.lessThan:return`<`;case U.greaterThan:return`>`;case U.relationalOrEqual:return`<=/>=`;case U.bitShiftL:return`<<`;case U.bitShiftR:return`>>/>>>`;case U.plus:return`+`;case U.minus:return`-`;case U.modulo:return`%`;case U.star:return`*`;case U.slash:return`/`;case U.exponent:return`**`;case U.jsxName:return`jsxName`;case U.jsxText:return`jsxText`;case U.jsxEmptyText:return`jsxEmptyText`;case U.jsxTagStart:return`jsxTagStart`;case U.jsxTagEnd:return`jsxTagEnd`;case U.typeParameterStart:return`typeParameterStart`;case U.nonNullAssertion:return`nonNullAssertion`;case U._break:return`break`;case U._case:return`case`;case U._catch:return`catch`;case U._continue:return`continue`;case U._debugger:return`debugger`;case U._default:return`default`;case U._do:return`do`;case U._else:return`else`;case U._finally:return`finally`;case U._for:return`for`;case U._function:return`function`;case U._if:return`if`;case U._return:return`return`;case U._switch:return`switch`;case U._throw:return`throw`;case U._try:return`try`;case U._var:return`var`;case U._let:return`let`;case U._const:return`const`;case U._while:return`while`;case U._with:return`with`;case U._new:return`new`;case U._this:return`this`;case U._super:return`super`;case U._class:return`class`;case U._extends:return`extends`;case U._export:return`export`;case U._import:return`import`;case U._yield:return`yield`;case U._null:return`null`;case U._true:return`true`;case U._false:return`false`;case U._in:return`in`;case U._instanceof:return`instanceof`;case U._typeof:return`typeof`;case U._void:return`void`;case U._delete:return`delete`;case U._async:return`async`;case U._get:return`get`;case U._set:return`set`;case U._declare:return`declare`;case U._readonly:return`readonly`;case U._abstract:return`abstract`;case U._static:return`static`;case U._public:return`public`;case U._private:return`private`;case U._protected:return`protected`;case U._override:return`override`;case U._as:return`as`;case U._enum:return`enum`;case U._type:return`type`;case U._implements:return`implements`;default:return``}}var $y=class{constructor(e,t,n){this.startTokenIndex=e,this.endTokenIndex=t,this.isFunctionScope=n}},eb=class{constructor(e,t,n,r,i,a,o,s,c,l,u,d,f){this.potentialArrowAt=e,this.noAnonFunctionType=t,this.inDisallowConditionalTypesContext=n,this.tokensLength=r,this.scopesLength=i,this.pos=a,this.type=o,this.contextualKeyword=s,this.start=c,this.end=l,this.isType=u,this.scopeDepth=d,this.error=f}},tb=class e{constructor(){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),e.prototype.__init6.call(this),e.prototype.__init7.call(this),e.prototype.__init8.call(this),e.prototype.__init9.call(this),e.prototype.__init10.call(this),e.prototype.__init11.call(this),e.prototype.__init12.call(this),e.prototype.__init13.call(this)}__init(){this.potentialArrowAt=-1}__init2(){this.noAnonFunctionType=!1}__init3(){this.inDisallowConditionalTypesContext=!1}__init4(){this.tokens=[]}__init5(){this.scopes=[]}__init6(){this.pos=0}__init7(){this.type=U.eof}__init8(){this.contextualKeyword=H.NONE}__init9(){this.start=0}__init10(){this.end=0}__init11(){this.isType=!1}__init12(){this.scopeDepth=0}__init13(){this.error=null}snapshot(){return new eb(this.potentialArrowAt,this.noAnonFunctionType,this.inDisallowConditionalTypesContext,this.tokens.length,this.scopes.length,this.pos,this.type,this.contextualKeyword,this.start,this.end,this.isType,this.scopeDepth,this.error)}restoreFromSnapshot(e){this.potentialArrowAt=e.potentialArrowAt,this.noAnonFunctionType=e.noAnonFunctionType,this.inDisallowConditionalTypesContext=e.inDisallowConditionalTypesContext,this.tokens.length=e.tokensLength,this.scopes.length=e.scopesLength,this.pos=e.pos,this.type=e.type,this.contextualKeyword=e.contextualKeyword,this.start=e.start,this.end=e.end,this.isType=e.isType,this.scopeDepth=e.scopeDepth,this.error=e.error}},W;(function(e){e[e.backSpace=8]=`backSpace`,e[e.lineFeed=10]=`lineFeed`,e[e.tab=9]=`tab`,e[e.carriageReturn=13]=`carriageReturn`,e[e.shiftOut=14]=`shiftOut`,e[e.space=32]=`space`,e[e.exclamationMark=33]=`exclamationMark`,e[e.quotationMark=34]=`quotationMark`,e[e.numberSign=35]=`numberSign`,e[e.dollarSign=36]=`dollarSign`,e[e.percentSign=37]=`percentSign`,e[e.ampersand=38]=`ampersand`,e[e.apostrophe=39]=`apostrophe`,e[e.leftParenthesis=40]=`leftParenthesis`,e[e.rightParenthesis=41]=`rightParenthesis`,e[e.asterisk=42]=`asterisk`,e[e.plusSign=43]=`plusSign`,e[e.comma=44]=`comma`,e[e.dash=45]=`dash`,e[e.dot=46]=`dot`,e[e.slash=47]=`slash`,e[e.digit0=48]=`digit0`,e[e.digit1=49]=`digit1`,e[e.digit2=50]=`digit2`,e[e.digit3=51]=`digit3`,e[e.digit4=52]=`digit4`,e[e.digit5=53]=`digit5`,e[e.digit6=54]=`digit6`,e[e.digit7=55]=`digit7`,e[e.digit8=56]=`digit8`,e[e.digit9=57]=`digit9`,e[e.colon=58]=`colon`,e[e.semicolon=59]=`semicolon`,e[e.lessThan=60]=`lessThan`,e[e.equalsTo=61]=`equalsTo`,e[e.greaterThan=62]=`greaterThan`,e[e.questionMark=63]=`questionMark`,e[e.atSign=64]=`atSign`,e[e.uppercaseA=65]=`uppercaseA`,e[e.uppercaseB=66]=`uppercaseB`,e[e.uppercaseC=67]=`uppercaseC`,e[e.uppercaseD=68]=`uppercaseD`,e[e.uppercaseE=69]=`uppercaseE`,e[e.uppercaseF=70]=`uppercaseF`,e[e.uppercaseG=71]=`uppercaseG`,e[e.uppercaseH=72]=`uppercaseH`,e[e.uppercaseI=73]=`uppercaseI`,e[e.uppercaseJ=74]=`uppercaseJ`,e[e.uppercaseK=75]=`uppercaseK`,e[e.uppercaseL=76]=`uppercaseL`,e[e.uppercaseM=77]=`uppercaseM`,e[e.uppercaseN=78]=`uppercaseN`,e[e.uppercaseO=79]=`uppercaseO`,e[e.uppercaseP=80]=`uppercaseP`,e[e.uppercaseQ=81]=`uppercaseQ`,e[e.uppercaseR=82]=`uppercaseR`,e[e.uppercaseS=83]=`uppercaseS`,e[e.uppercaseT=84]=`uppercaseT`,e[e.uppercaseU=85]=`uppercaseU`,e[e.uppercaseV=86]=`uppercaseV`,e[e.uppercaseW=87]=`uppercaseW`,e[e.uppercaseX=88]=`uppercaseX`,e[e.uppercaseY=89]=`uppercaseY`,e[e.uppercaseZ=90]=`uppercaseZ`,e[e.leftSquareBracket=91]=`leftSquareBracket`,e[e.backslash=92]=`backslash`,e[e.rightSquareBracket=93]=`rightSquareBracket`,e[e.caret=94]=`caret`,e[e.underscore=95]=`underscore`,e[e.graveAccent=96]=`graveAccent`,e[e.lowercaseA=97]=`lowercaseA`,e[e.lowercaseB=98]=`lowercaseB`,e[e.lowercaseC=99]=`lowercaseC`,e[e.lowercaseD=100]=`lowercaseD`,e[e.lowercaseE=101]=`lowercaseE`,e[e.lowercaseF=102]=`lowercaseF`,e[e.lowercaseG=103]=`lowercaseG`,e[e.lowercaseH=104]=`lowercaseH`,e[e.lowercaseI=105]=`lowercaseI`,e[e.lowercaseJ=106]=`lowercaseJ`,e[e.lowercaseK=107]=`lowercaseK`,e[e.lowercaseL=108]=`lowercaseL`,e[e.lowercaseM=109]=`lowercaseM`,e[e.lowercaseN=110]=`lowercaseN`,e[e.lowercaseO=111]=`lowercaseO`,e[e.lowercaseP=112]=`lowercaseP`,e[e.lowercaseQ=113]=`lowercaseQ`,e[e.lowercaseR=114]=`lowercaseR`,e[e.lowercaseS=115]=`lowercaseS`,e[e.lowercaseT=116]=`lowercaseT`,e[e.lowercaseU=117]=`lowercaseU`,e[e.lowercaseV=118]=`lowercaseV`,e[e.lowercaseW=119]=`lowercaseW`,e[e.lowercaseX=120]=`lowercaseX`,e[e.lowercaseY=121]=`lowercaseY`,e[e.lowercaseZ=122]=`lowercaseZ`,e[e.leftCurlyBrace=123]=`leftCurlyBrace`,e[e.verticalBar=124]=`verticalBar`,e[e.rightCurlyBrace=125]=`rightCurlyBrace`,e[e.tilde=126]=`tilde`,e[e.nonBreakingSpace=160]=`nonBreakingSpace`,e[e.oghamSpaceMark=5760]=`oghamSpaceMark`,e[e.lineSeparator=8232]=`lineSeparator`,e[e.paragraphSeparator=8233]=`paragraphSeparator`})(W||={});var nb,rb,ib,G,K,ab;function ob(){return ab++}function sb(e){if(`pos`in e){let t=lb(e.pos);e.message+=` (${t.line}:${t.column})`,e.loc=t}return e}var cb=class{constructor(e,t){this.line=e,this.column=t}};function lb(e){let t=1,n=1;for(let r=0;r<e;r++)K.charCodeAt(r)===W.lineFeed?(t++,n=1):n++;return new cb(t,n)}function ub(e,t,n,r){K=e,G=new tb,ab=1,nb=t,rb=n,ib=r}function q(e){return G.contextualKeyword===e}function db(e){let t=Ub();return t.type===U.name&&t.contextualKeyword===e}function fb(e){return G.contextualKeyword===e&&Z(U.name)}function pb(e){fb(e)||yb()}function mb(){return Q(U.eof)||Q(U.braceR)||hb()}function hb(){let e=G.tokens[G.tokens.length-1],t=e?e.end:0;for(let e=t;e<G.start;e++){let t=K.charCodeAt(e);if(t===W.lineFeed||t===W.carriageReturn||t===8232||t===8233)return!0}return!1}function gb(){let e=Wb();for(let t=G.end;t<e;t++){let e=K.charCodeAt(t);if(e===W.lineFeed||e===W.carriageReturn||e===8232||e===8233)return!0}return!1}function _b(){return Z(U.semi)||mb()}function vb(){_b()||yb(`Unexpected token, expected ";"`)}function J(e){Z(e)||yb(`Unexpected token, expected "${Qy(e)}"`)}function yb(e=`Unexpected token`,t=G.start){if(G.error)return;let n=SyntaxError(e);n.pos=t,G.error=n,G.pos=K.length,Qb(U.eof)}var bb=[9,11,12,W.space,W.nonBreakingSpace,W.oghamSpaceMark,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8239,8287,12288,65279],xb=/(?:\\s|\\/\\/.*|\\/\\*[^]*?\\*\\/)*/g,Sb=new Uint8Array(65536);for(let e of bb)Sb[e]=1;function Cb(e){if(e<48)return e===36;if(e<58)return!0;if(e<65)return!1;if(e<91)return!0;if(e<97)return e===95;if(e<123)return!0;if(e<128)return!1;throw Error(`Should not be called with non-ASCII char code.`)}var wb=new Uint8Array(65536);for(let e=0;e<128;e++)wb[e]=+!!Cb(e);for(let e=128;e<65536;e++)wb[e]=1;for(let e of bb)wb[e]=0;wb[8232]=0,wb[8233]=0;var Tb=wb.slice();for(let e=W.digit0;e<=W.digit9;e++)Tb[e]=0;var Eb=new Int32Array([-1,27,783,918,1755,2376,2862,3483,-1,3699,-1,4617,4752,4833,5130,5508,5940,-1,6480,6939,7749,8181,8451,8613,-1,8829,-1,-1,-1,54,243,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,432,-1,-1,-1,675,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,81,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,108,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,135,-1,-1,-1,-1,-1,-1,-1,-1,-1,162,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,189,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,216,-1,-1,-1,-1,-1,-1,H._abstract<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,270,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,297,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,324,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,351,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,378,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,405,-1,-1,-1,-1,-1,-1,-1,-1,H._accessor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._as<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,459,-1,-1,-1,-1,-1,594,-1,-1,-1,-1,-1,-1,486,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,513,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,540,-1,-1,-1,-1,-1,-1,H._assert<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,567,-1,-1,-1,-1,-1,-1,-1,H._asserts<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,621,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,648,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._async<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,702,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,729,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,756,-1,-1,-1,-1,-1,-1,H._await<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,810,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,837,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,864,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,891,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._break<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,945,-1,-1,-1,-1,-1,-1,1107,-1,-1,-1,1242,-1,-1,1350,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,972,1026,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,999,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._case<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1053,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1080,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._catch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1134,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1161,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1188,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1215,-1,-1,-1,-1,-1,-1,-1,H._checks<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1269,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1296,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1323,-1,-1,-1,-1,-1,-1,-1,(U._class<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1377,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1404,1620,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1431,-1,-1,-1,-1,-1,-1,(U._const<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1458,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1485,-1,-1,-1,-1,-1,-1,-1,-1,1512,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1539,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1566,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1593,-1,-1,-1,-1,-1,-1,-1,-1,H._constructor<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1647,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1674,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1701,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1728,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._continue<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1782,-1,-1,-1,-1,-1,-1,-1,-1,-1,2349,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1809,1971,-1,-1,2106,-1,-1,-1,-1,-1,2241,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1836,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1863,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1890,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1917,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1944,-1,-1,-1,-1,-1,-1,-1,-1,(U._debugger<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,1998,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2025,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2052,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2079,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._declare<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2133,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2160,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2187,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2214,-1,-1,-1,-1,-1,-1,(U._default<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2268,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2295,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2322,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._delete<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._do<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2403,-1,2484,-1,-1,-1,-1,-1,-1,-1,-1,-1,2565,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2430,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2457,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._else<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2511,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2538,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._enum<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2592,-1,-1,-1,2727,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2619,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2646,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2673,-1,-1,-1,-1,-1,-1,(U._export<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2700,-1,-1,-1,-1,-1,-1,-1,H._exports<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2754,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2781,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2808,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2835,-1,-1,-1,-1,-1,-1,-1,(U._extends<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2889,-1,-1,-1,-1,-1,-1,-1,2997,-1,-1,-1,-1,-1,3159,-1,-1,3213,-1,-1,3294,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2916,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2943,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,2970,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._false<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3024,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3051,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3078,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3105,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3132,-1,(U._finally<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3186,-1,-1,-1,-1,-1,-1,-1,-1,(U._for<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3240,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3267,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._from<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3321,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3348,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3375,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3402,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3429,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3456,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._function<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3510,-1,-1,-1,-1,-1,-1,3564,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3537,-1,-1,-1,-1,-1,-1,H._get<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3591,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3618,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3645,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3672,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._global<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3726,-1,-1,-1,-1,-1,-1,3753,4077,-1,-1,-1,-1,4590,-1,-1,-1,-1,-1,-1,-1,(U._if<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3780,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3807,-1,-1,3996,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3834,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3861,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3888,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3915,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3942,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,3969,-1,-1,-1,-1,-1,-1,-1,H._implements<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4023,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4050,-1,-1,-1,-1,-1,-1,(U._import<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._in<<1)+1,-1,-1,-1,-1,-1,4104,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4185,4401,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4131,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4158,-1,-1,-1,-1,-1,-1,-1,-1,H._infer<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4212,-1,-1,-1,-1,-1,-1,-1,4239,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4266,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4293,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4320,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4347,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4374,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._instanceof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4428,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4455,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4482,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4509,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4536,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4563,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._interface<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._is<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4644,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4671,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4698,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4725,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._keyof<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4779,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4806,-1,-1,-1,-1,-1,-1,(U._let<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4860,-1,-1,-1,-1,-1,4995,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4887,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4914,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4941,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,4968,-1,-1,-1,-1,-1,-1,-1,H._mixins<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5022,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5049,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5076,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5103,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._module<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5157,-1,-1,-1,5373,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5427,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5184,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5211,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5238,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5265,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5292,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5319,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5346,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._namespace<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5400,-1,-1,-1,(U._new<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5454,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5481,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._null<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5535,-1,-1,-1,-1,-1,-1,-1,-1,-1,5562,-1,-1,-1,-1,5697,5751,-1,-1,-1,-1,H._of<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5589,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5616,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5643,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5670,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._opaque<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5724,-1,-1,-1,-1,-1,-1,H._out<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5778,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5805,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5832,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5859,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5886,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5913,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._override<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5967,-1,-1,6345,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,5994,-1,-1,-1,-1,-1,6129,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6021,-1,-1,-1,-1,-1,6048,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6075,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6102,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._private<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6156,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6183,-1,-1,-1,-1,-1,-1,-1,-1,-1,6318,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6210,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6237,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6264,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6291,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._protected<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._proto<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6372,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6399,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6426,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6453,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._public<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6507,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6534,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6696,-1,-1,6831,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6561,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6588,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6615,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6642,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6669,-1,H._readonly<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6723,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6750,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6777,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6804,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._require<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6858,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6885,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6912,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._return<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6966,-1,-1,-1,7182,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7236,7371,-1,7479,-1,7614,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,6993,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7020,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7047,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7074,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7101,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7128,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7155,-1,-1,-1,-1,-1,-1,-1,H._satisfies<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7209,-1,-1,-1,-1,-1,-1,H._set<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7263,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7290,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7317,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7344,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._static<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7398,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7425,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7452,-1,-1,-1,-1,-1,-1,-1,-1,(U._super<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7506,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7533,-1,-1,-1,-1,-1,-1,-1,-1,-1,7560,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7587,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._switch<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7641,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7668,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7695,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7722,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._symbol<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7776,-1,-1,-1,-1,-1,-1,-1,-1,-1,7938,-1,-1,-1,-1,-1,-1,8046,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7803,-1,-1,-1,-1,-1,-1,-1,-1,7857,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7830,-1,-1,-1,-1,-1,-1,-1,(U._this<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7884,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7911,-1,-1,-1,(U._throw<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,7965,-1,-1,-1,8019,-1,-1,-1,-1,-1,-1,7992,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._true<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._try<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8073,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._type<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8127,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8154,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._typeof<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8208,-1,-1,-1,-1,8343,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8235,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8262,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8289,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8316,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._unique<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8370,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8397,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8424,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,H._using<<1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8478,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8532,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8505,-1,-1,-1,-1,-1,-1,-1,-1,(U._var<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8559,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8586,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._void<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8640,8748,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8667,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8694,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8721,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._while<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8775,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8802,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._with<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8856,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8883,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8910,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,8937,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,(U._yield<<1)+1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1]);function Db(){let e=0,t=0,n=G.pos;for(;n<K.length&&(t=K.charCodeAt(n),!(t<W.lowercaseA||t>W.lowercaseZ));){let r=Eb[e+(t-W.lowercaseA)+1];if(r===-1)break;e=r,n++}let r=Eb[e];if(r>-1&&!wb[t]){G.pos=n,r&1?Qb(r>>>1):Qb(U.name,r>>>1);return}for(;n<K.length;){let e=K.charCodeAt(n);if(wb[e])n++;else if(e===W.backslash){if(n+=2,K.charCodeAt(n)===W.leftCurlyBrace){for(;n<K.length&&K.charCodeAt(n)!==W.rightCurlyBrace;)n++;n++}}else if(e===W.atSign&&K.charCodeAt(n+1)===W.atSign)n+=2;else break}G.pos=n,Qb(U.name)}var Y;(function(e){e[e.Access=0]=`Access`,e[e.ExportAccess=1]=`ExportAccess`,e[e.TopLevelDeclaration=2]=`TopLevelDeclaration`,e[e.FunctionScopedDeclaration=3]=`FunctionScopedDeclaration`,e[e.BlockScopedDeclaration=4]=`BlockScopedDeclaration`,e[e.ObjectShorthandTopLevelDeclaration=5]=`ObjectShorthandTopLevelDeclaration`,e[e.ObjectShorthandFunctionScopedDeclaration=6]=`ObjectShorthandFunctionScopedDeclaration`,e[e.ObjectShorthandBlockScopedDeclaration=7]=`ObjectShorthandBlockScopedDeclaration`,e[e.ObjectShorthand=8]=`ObjectShorthand`,e[e.ImportDeclaration=9]=`ImportDeclaration`,e[e.ObjectKey=10]=`ObjectKey`,e[e.ImportAccess=11]=`ImportAccess`})(Y||={});var Ob;(function(e){e[e.NoChildren=0]=`NoChildren`,e[e.OneChild=1]=`OneChild`,e[e.StaticChildren=2]=`StaticChildren`,e[e.KeyAfterPropSpread=3]=`KeyAfterPropSpread`})(Ob||={});function kb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.FunctionScopedDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function Ab(e){let t=e.identifierRole;return t===Y.FunctionScopedDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function jb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ImportDeclaration}function Mb(e){let t=e.identifierRole;return t===Y.TopLevelDeclaration||t===Y.BlockScopedDeclaration||t===Y.ObjectShorthandTopLevelDeclaration||t===Y.ObjectShorthandBlockScopedDeclaration}function Nb(e){let t=e.identifierRole;return t===Y.FunctionScopedDeclaration||t===Y.ObjectShorthandFunctionScopedDeclaration}function Pb(e){return e.identifierRole===Y.ObjectShorthandTopLevelDeclaration||e.identifierRole===Y.ObjectShorthandBlockScopedDeclaration||e.identifierRole===Y.ObjectShorthandFunctionScopedDeclaration}var Fb=class{constructor(){this.type=G.type,this.contextualKeyword=G.contextualKeyword,this.start=G.start,this.end=G.end,this.scopeDepth=G.scopeDepth,this.isType=G.isType,this.identifierRole=null,this.jsxRole=null,this.shadowsGlobal=!1,this.isAsyncOperation=!1,this.contextId=null,this.rhsEndIndex=null,this.isExpression=!1,this.numNullishCoalesceStarts=0,this.numNullishCoalesceEnds=0,this.isOptionalChainStart=!1,this.isOptionalChainEnd=!1,this.subscriptStartIndex=null,this.nullishStartIndex=null}};function X(){G.tokens.push(new Fb),qb()}function Ib(){G.tokens.push(new Fb),G.start=G.pos,_x()}function Lb(){G.type===U.assign&&--G.pos,fx()}function Rb(e){for(let t=G.tokens.length-e;t<G.tokens.length;t++)G.tokens[t].isType=!0;let t=G.isType;return G.isType=!0,t}function zb(e){G.isType=e}function Z(e){return Q(e)?(X(),!0):!1}function Bb(e){let t=G.isType;G.isType=!0,Z(e),G.isType=t}function Q(e){return G.type===e}function Vb(){let e=G.snapshot();X();let t=G.type;return G.restoreFromSnapshot(e),t}var Hb=class{constructor(e,t){this.type=e,this.contextualKeyword=t}};function Ub(){let e=G.snapshot();X();let t=G.type,n=G.contextualKeyword;return G.restoreFromSnapshot(e),new Hb(t,n)}function Wb(){return Gb(G.pos)}function Gb(e){return xb.lastIndex=e,e+xb.exec(K)[0].length}function Kb(){return K.charCodeAt(Wb())}function qb(){if(Zb(),G.start=G.pos,G.pos>=K.length){let e=G.tokens;e.length>=2&&e[e.length-1].start>=K.length&&e[e.length-2].start>=K.length&&yb(`Unexpectedly reached the end of input.`),Qb(U.eof);return}Jb(K.charCodeAt(G.pos))}function Jb(e){Tb[e]||e===W.backslash||e===W.atSign&&K.charCodeAt(G.pos+1)===W.atSign?Db():ux(e)}function Yb(){for(;K.charCodeAt(G.pos)!==W.asterisk||K.charCodeAt(G.pos+1)!==W.slash;)if(G.pos++,G.pos>K.length){yb(`Unterminated comment`,G.pos-2);return}G.pos+=2}function Xb(e){let t=K.charCodeAt(G.pos+=e);if(G.pos<K.length)for(;t!==W.lineFeed&&t!==W.carriageReturn&&t!==W.lineSeparator&&t!==W.paragraphSeparator&&++G.pos<K.length;)t=K.charCodeAt(G.pos)}function Zb(){for(;G.pos<K.length;){let e=K.charCodeAt(G.pos);switch(e){case W.carriageReturn:K.charCodeAt(G.pos+1)===W.lineFeed&&++G.pos;case W.lineFeed:case W.lineSeparator:case W.paragraphSeparator:++G.pos;break;case W.slash:switch(K.charCodeAt(G.pos+1)){case W.asterisk:G.pos+=2,Yb();break;case W.slash:Xb(2);break;default:return}break;default:if(Sb[e])++G.pos;else return}}}function Qb(e,t=H.NONE){G.end=G.pos,G.type=e,G.contextualKeyword=t}function $b(){let e=K.charCodeAt(G.pos+1);if(e>=W.digit0&&e<=W.digit9){hx(!0);return}e===W.dot&&K.charCodeAt(G.pos+2)===W.dot?(G.pos+=3,Qb(U.ellipsis)):(++G.pos,Qb(U.dot))}function ex(){K.charCodeAt(G.pos+1)===W.equalsTo?dx(U.assign,2):dx(U.slash,1)}function tx(e){let t=e===W.asterisk?U.star:U.modulo,n=1,r=K.charCodeAt(G.pos+1);e===W.asterisk&&r===W.asterisk&&(n++,r=K.charCodeAt(G.pos+2),t=U.exponent),r===W.equalsTo&&K.charCodeAt(G.pos+2)!==W.greaterThan&&(n++,t=U.assign),dx(t,n)}function nx(e){let t=K.charCodeAt(G.pos+1);if(t===e){K.charCodeAt(G.pos+2)===W.equalsTo?dx(U.assign,3):dx(e===W.verticalBar?U.logicalOR:U.logicalAND,2);return}if(e===W.verticalBar){if(t===W.greaterThan){dx(U.pipeline,2);return}else if(t===W.rightCurlyBrace&&ib){dx(U.braceBarR,2);return}}if(t===W.equalsTo){dx(U.assign,2);return}dx(e===W.verticalBar?U.bitwiseOR:U.bitwiseAND,1)}function rx(){K.charCodeAt(G.pos+1)===W.equalsTo?dx(U.assign,2):dx(U.bitwiseXOR,1)}function ix(e){let t=K.charCodeAt(G.pos+1);if(t===e){dx(U.preIncDec,2);return}t===W.equalsTo?dx(U.assign,2):e===W.plusSign?dx(U.plus,1):dx(U.minus,1)}function ax(){let e=K.charCodeAt(G.pos+1);if(e===W.lessThan){if(K.charCodeAt(G.pos+2)===W.equalsTo){dx(U.assign,3);return}G.isType?dx(U.lessThan,1):dx(U.bitShiftL,2);return}e===W.equalsTo?dx(U.relationalOrEqual,2):dx(U.lessThan,1)}function ox(){if(G.isType){dx(U.greaterThan,1);return}let e=K.charCodeAt(G.pos+1);if(e===W.greaterThan){let e=K.charCodeAt(G.pos+2)===W.greaterThan?3:2;if(K.charCodeAt(G.pos+e)===W.equalsTo){dx(U.assign,e+1);return}dx(U.bitShiftR,e);return}e===W.equalsTo?dx(U.relationalOrEqual,2):dx(U.greaterThan,1)}function sx(){G.type===U.greaterThan&&(--G.pos,ox())}function cx(e){let t=K.charCodeAt(G.pos+1);if(t===W.equalsTo){dx(U.equality,K.charCodeAt(G.pos+2)===W.equalsTo?3:2);return}if(e===W.equalsTo&&t===W.greaterThan){G.pos+=2,Qb(U.arrow);return}dx(e===W.equalsTo?U.eq:U.bang,1)}function lx(){let e=K.charCodeAt(G.pos+1),t=K.charCodeAt(G.pos+2);e===W.questionMark&&!(ib&&G.isType)?t===W.equalsTo?dx(U.assign,3):dx(U.nullishCoalescing,2):e===W.dot&&!(t>=W.digit0&&t<=W.digit9)?(G.pos+=2,Qb(U.questionDot)):(++G.pos,Qb(U.question))}function ux(e){switch(e){case W.numberSign:++G.pos,Qb(U.hash);return;case W.dot:$b();return;case W.leftParenthesis:++G.pos,Qb(U.parenL);return;case W.rightParenthesis:++G.pos,Qb(U.parenR);return;case W.semicolon:++G.pos,Qb(U.semi);return;case W.comma:++G.pos,Qb(U.comma);return;case W.leftSquareBracket:++G.pos,Qb(U.bracketL);return;case W.rightSquareBracket:++G.pos,Qb(U.bracketR);return;case W.leftCurlyBrace:ib&&K.charCodeAt(G.pos+1)===W.verticalBar?dx(U.braceBarL,2):(++G.pos,Qb(U.braceL));return;case W.rightCurlyBrace:++G.pos,Qb(U.braceR);return;case W.colon:K.charCodeAt(G.pos+1)===W.colon?dx(U.doubleColon,2):(++G.pos,Qb(U.colon));return;case W.questionMark:lx();return;case W.atSign:++G.pos,Qb(U.at);return;case W.graveAccent:++G.pos,Qb(U.backQuote);return;case W.digit0:{let e=K.charCodeAt(G.pos+1);if(e===W.lowercaseX||e===W.uppercaseX||e===W.lowercaseO||e===W.uppercaseO||e===W.lowercaseB||e===W.uppercaseB){mx();return}}case W.digit1:case W.digit2:case W.digit3:case W.digit4:case W.digit5:case W.digit6:case W.digit7:case W.digit8:case W.digit9:hx(!1);return;case W.quotationMark:case W.apostrophe:gx(e);return;case W.slash:ex();return;case W.percentSign:case W.asterisk:tx(e);return;case W.verticalBar:case W.ampersand:nx(e);return;case W.caret:rx();return;case W.plusSign:case W.dash:ix(e);return;case W.lessThan:ax();return;case W.greaterThan:ox();return;case W.equalsTo:case W.exclamationMark:cx(e);return;case W.tilde:dx(U.tilde,1);return;default:break}yb(`Unexpected character \'${String.fromCharCode(e)}\'`,G.pos)}function dx(e,t){G.pos+=t,Qb(e)}function fx(){let e=G.pos,t=!1,n=!1;for(;;){if(G.pos>=K.length){yb(`Unterminated regular expression`,e);return}let r=K.charCodeAt(G.pos);if(t)t=!1;else{if(r===W.leftSquareBracket)n=!0;else if(r===W.rightSquareBracket&&n)n=!1;else if(r===W.slash&&!n)break;t=r===W.backslash}++G.pos}++G.pos,vx(),Qb(U.regexp)}function px(){for(;;){let e=K.charCodeAt(G.pos);if(e>=W.digit0&&e<=W.digit9||e===W.underscore)G.pos++;else break}}function mx(){for(G.pos+=2;;){let e=K.charCodeAt(G.pos);if(e>=W.digit0&&e<=W.digit9||e>=W.lowercaseA&&e<=W.lowercaseF||e>=W.uppercaseA&&e<=W.uppercaseF||e===W.underscore)G.pos++;else break}K.charCodeAt(G.pos)===W.lowercaseN?(++G.pos,Qb(U.bigint)):Qb(U.num)}function hx(e){let t=!1,n=!1;e||px();let r=K.charCodeAt(G.pos);if(r===W.dot&&(++G.pos,px(),r=K.charCodeAt(G.pos)),(r===W.uppercaseE||r===W.lowercaseE)&&(r=K.charCodeAt(++G.pos),(r===W.plusSign||r===W.dash)&&++G.pos,px(),r=K.charCodeAt(G.pos)),r===W.lowercaseN?(++G.pos,t=!0):r===W.lowercaseM&&(++G.pos,n=!0),t){Qb(U.bigint);return}if(n){Qb(U.decimal);return}Qb(U.num)}function gx(e){for(G.pos++;;){if(G.pos>=K.length){yb(`Unterminated string constant`);return}let t=K.charCodeAt(G.pos);if(t===W.backslash)G.pos++;else if(t===e)break;G.pos++}G.pos++,Qb(U.string)}function _x(){for(;;){if(G.pos>=K.length){yb(`Unterminated template`);return}let e=K.charCodeAt(G.pos);if(e===W.graveAccent||e===W.dollarSign&&K.charCodeAt(G.pos+1)===W.leftCurlyBrace){if(G.pos===G.start&&Q(U.template))if(e===W.dollarSign){G.pos+=2,Qb(U.dollarBraceL);return}else{++G.pos,Qb(U.backQuote);return}Qb(U.template);return}e===W.backslash&&G.pos++,G.pos++}}function vx(){for(;G.pos<K.length;){let e=K.charCodeAt(G.pos);if(wb[e])G.pos++;else if(e===W.backslash){if(G.pos+=2,K.charCodeAt(G.pos)===W.leftCurlyBrace){for(;G.pos<K.length&&K.charCodeAt(G.pos)!==W.rightCurlyBrace;)G.pos++;G.pos++}}else break}}function yx(e,t=e.currentIndex()){let n=t+1;if(bx(e,n)){let r=e.identifierNameAtIndex(t);return{isType:!1,leftName:r,rightName:r,endIndex:n}}if(n++,bx(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};if(n++,bx(e,n))return{isType:!1,leftName:e.identifierNameAtIndex(t),rightName:e.identifierNameAtIndex(t+2),endIndex:n};if(n++,bx(e,n))return{isType:!0,leftName:null,rightName:null,endIndex:n};throw Error(`Unexpected import/export specifier at ${t}`)}function bx(e,t){let n=e.tokens[t];return n.type===U.braceR||n.type===U.comma}var xx=new Map([[`quot`,`"`],[`amp`,`&`],[`apos`,`\'`],[`lt`,`<`],[`gt`,`>`],[`nbsp`,`\\xA0`],[`iexcl`,`\xA1`],[`cent`,`\xA2`],[`pound`,`\xA3`],[`curren`,`\xA4`],[`yen`,`\xA5`],[`brvbar`,`\xA6`],[`sect`,`\xA7`],[`uml`,`\xA8`],[`copy`,`\xA9`],[`ordf`,`\xAA`],[`laquo`,`\xAB`],[`not`,`\xAC`],[`shy`,`\xAD`],[`reg`,`\xAE`],[`macr`,`\xAF`],[`deg`,`\xB0`],[`plusmn`,`\xB1`],[`sup2`,`\xB2`],[`sup3`,`\xB3`],[`acute`,`\xB4`],[`micro`,`\xB5`],[`para`,`\xB6`],[`middot`,`\xB7`],[`cedil`,`\xB8`],[`sup1`,`\xB9`],[`ordm`,`\xBA`],[`raquo`,`\xBB`],[`frac14`,`\xBC`],[`frac12`,`\xBD`],[`frac34`,`\xBE`],[`iquest`,`\xBF`],[`Agrave`,`\xC0`],[`Aacute`,`\xC1`],[`Acirc`,`\xC2`],[`Atilde`,`\xC3`],[`Auml`,`\xC4`],[`Aring`,`\xC5`],[`AElig`,`\xC6`],[`Ccedil`,`\xC7`],[`Egrave`,`\xC8`],[`Eacute`,`\xC9`],[`Ecirc`,`\xCA`],[`Euml`,`\xCB`],[`Igrave`,`\xCC`],[`Iacute`,`\xCD`],[`Icirc`,`\xCE`],[`Iuml`,`\xCF`],[`ETH`,`\xD0`],[`Ntilde`,`\xD1`],[`Ograve`,`\xD2`],[`Oacute`,`\xD3`],[`Ocirc`,`\xD4`],[`Otilde`,`\xD5`],[`Ouml`,`\xD6`],[`times`,`\xD7`],[`Oslash`,`\xD8`],[`Ugrave`,`\xD9`],[`Uacute`,`\xDA`],[`Ucirc`,`\xDB`],[`Uuml`,`\xDC`],[`Yacute`,`\xDD`],[`THORN`,`\xDE`],[`szlig`,`\xDF`],[`agrave`,`\xE0`],[`aacute`,`\xE1`],[`acirc`,`\xE2`],[`atilde`,`\xE3`],[`auml`,`\xE4`],[`aring`,`\xE5`],[`aelig`,`\xE6`],[`ccedil`,`\xE7`],[`egrave`,`\xE8`],[`eacute`,`\xE9`],[`ecirc`,`\xEA`],[`euml`,`\xEB`],[`igrave`,`\xEC`],[`iacute`,`\xED`],[`icirc`,`\xEE`],[`iuml`,`\xEF`],[`eth`,`\xF0`],[`ntilde`,`\xF1`],[`ograve`,`\xF2`],[`oacute`,`\xF3`],[`ocirc`,`\xF4`],[`otilde`,`\xF5`],[`ouml`,`\xF6`],[`divide`,`\xF7`],[`oslash`,`\xF8`],[`ugrave`,`\xF9`],[`uacute`,`\xFA`],[`ucirc`,`\xFB`],[`uuml`,`\xFC`],[`yacute`,`\xFD`],[`thorn`,`\xFE`],[`yuml`,`\xFF`],[`OElig`,`\u0152`],[`oelig`,`\u0153`],[`Scaron`,`\u0160`],[`scaron`,`\u0161`],[`Yuml`,`\u0178`],[`fnof`,`\u0192`],[`circ`,`\u02C6`],[`tilde`,`\u02DC`],[`Alpha`,`\u0391`],[`Beta`,`\u0392`],[`Gamma`,`\u0393`],[`Delta`,`\u0394`],[`Epsilon`,`\u0395`],[`Zeta`,`\u0396`],[`Eta`,`\u0397`],[`Theta`,`\u0398`],[`Iota`,`\u0399`],[`Kappa`,`\u039A`],[`Lambda`,`\u039B`],[`Mu`,`\u039C`],[`Nu`,`\u039D`],[`Xi`,`\u039E`],[`Omicron`,`\u039F`],[`Pi`,`\u03A0`],[`Rho`,`\u03A1`],[`Sigma`,`\u03A3`],[`Tau`,`\u03A4`],[`Upsilon`,`\u03A5`],[`Phi`,`\u03A6`],[`Chi`,`\u03A7`],[`Psi`,`\u03A8`],[`Omega`,`\u03A9`],[`alpha`,`\u03B1`],[`beta`,`\u03B2`],[`gamma`,`\u03B3`],[`delta`,`\u03B4`],[`epsilon`,`\u03B5`],[`zeta`,`\u03B6`],[`eta`,`\u03B7`],[`theta`,`\u03B8`],[`iota`,`\u03B9`],[`kappa`,`\u03BA`],[`lambda`,`\u03BB`],[`mu`,`\u03BC`],[`nu`,`\u03BD`],[`xi`,`\u03BE`],[`omicron`,`\u03BF`],[`pi`,`\u03C0`],[`rho`,`\u03C1`],[`sigmaf`,`\u03C2`],[`sigma`,`\u03C3`],[`tau`,`\u03C4`],[`upsilon`,`\u03C5`],[`phi`,`\u03C6`],[`chi`,`\u03C7`],[`psi`,`\u03C8`],[`omega`,`\u03C9`],[`thetasym`,`\u03D1`],[`upsih`,`\u03D2`],[`piv`,`\u03D6`],[`ensp`,`\u2002`],[`emsp`,`\u2003`],[`thinsp`,`\u2009`],[`zwnj`,`\u200C`],[`zwj`,`\u200D`],[`lrm`,`\u200E`],[`rlm`,`\u200F`],[`ndash`,`\u2013`],[`mdash`,`\u2014`],[`lsquo`,`\u2018`],[`rsquo`,`\u2019`],[`sbquo`,`\u201A`],[`ldquo`,`\u201C`],[`rdquo`,`\u201D`],[`bdquo`,`\u201E`],[`dagger`,`\u2020`],[`Dagger`,`\u2021`],[`bull`,`\u2022`],[`hellip`,`\u2026`],[`permil`,`\u2030`],[`prime`,`\u2032`],[`Prime`,`\u2033`],[`lsaquo`,`\u2039`],[`rsaquo`,`\u203A`],[`oline`,`\u203E`],[`frasl`,`\u2044`],[`euro`,`\u20AC`],[`image`,`\u2111`],[`weierp`,`\u2118`],[`real`,`\u211C`],[`trade`,`\u2122`],[`alefsym`,`\u2135`],[`larr`,`\u2190`],[`uarr`,`\u2191`],[`rarr`,`\u2192`],[`darr`,`\u2193`],[`harr`,`\u2194`],[`crarr`,`\u21B5`],[`lArr`,`\u21D0`],[`uArr`,`\u21D1`],[`rArr`,`\u21D2`],[`dArr`,`\u21D3`],[`hArr`,`\u21D4`],[`forall`,`\u2200`],[`part`,`\u2202`],[`exist`,`\u2203`],[`empty`,`\u2205`],[`nabla`,`\u2207`],[`isin`,`\u2208`],[`notin`,`\u2209`],[`ni`,`\u220B`],[`prod`,`\u220F`],[`sum`,`\u2211`],[`minus`,`\u2212`],[`lowast`,`\u2217`],[`radic`,`\u221A`],[`prop`,`\u221D`],[`infin`,`\u221E`],[`ang`,`\u2220`],[`and`,`\u2227`],[`or`,`\u2228`],[`cap`,`\u2229`],[`cup`,`\u222A`],[`int`,`\u222B`],[`there4`,`\u2234`],[`sim`,`\u223C`],[`cong`,`\u2245`],[`asymp`,`\u2248`],[`ne`,`\u2260`],[`equiv`,`\u2261`],[`le`,`\u2264`],[`ge`,`\u2265`],[`sub`,`\u2282`],[`sup`,`\u2283`],[`nsub`,`\u2284`],[`sube`,`\u2286`],[`supe`,`\u2287`],[`oplus`,`\u2295`],[`otimes`,`\u2297`],[`perp`,`\u22A5`],[`sdot`,`\u22C5`],[`lceil`,`\u2308`],[`rceil`,`\u2309`],[`lfloor`,`\u230A`],[`rfloor`,`\u230B`],[`lang`,`\u2329`],[`rang`,`\u232A`],[`loz`,`\u25CA`],[`spades`,`\u2660`],[`clubs`,`\u2663`],[`hearts`,`\u2665`],[`diams`,`\u2666`]]);function Sx(e){let[t,n]=Cx(e.jsxPragma||`React.createElement`),[r,i]=Cx(e.jsxFragmentPragma||`React.Fragment`);return{base:t,suffix:n,fragmentBase:r,fragmentSuffix:i}}function Cx(e){let t=e.indexOf(`.`);return t===-1&&(t=e.length),[e.slice(0,t),e.slice(t)]}var wx=class{getPrefixCode(){return``}getHoistedCode(){return``}getSuffixCode(){return``}},Tx=class e extends wx{__init(){this.lastLineNumber=1}__init2(){this.lastIndex=0}__init3(){this.filenameVarName=null}__init4(){this.esmAutomaticImportNameResolutions={}}__init5(){this.cjsAutomaticModuleNameResolutions={}}constructor(t,n,r,i,a){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=r,this.nameManager=i,this.options=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this),this.jsxPragmaInfo=Sx(a),this.isAutomaticRuntime=a.jsxRuntime===`automatic`,this.jsxImportSource=a.jsxImportSource||`react`}process(){return this.tokens.matches1(U.jsxTagStart)?(this.processJSXTag(),!0):!1}getPrefixCode(){let e=``;if(this.filenameVarName&&(e+=`const ${this.filenameVarName} = ${JSON.stringify(this.options.filePath||``)};`),this.isAutomaticRuntime)if(this.importProcessor)for(let[t,n]of Object.entries(this.cjsAutomaticModuleNameResolutions))e+=`var ${n} = require("${t}");`;else{let{createElement:t,...n}=this.esmAutomaticImportNameResolutions;t&&(e+=`import {createElement as ${t}} from "${this.jsxImportSource}";`);let r=Object.entries(n).map(([e,t])=>`${e} as ${t}`).join(`, `);if(r){let t=this.jsxImportSource+(this.options.production?`/jsx-runtime`:`/jsx-dev-runtime`);e+=`import {${r}} from "${t}";`}}return e}processJSXTag(){let{jsxRole:e,start:t}=this.tokens.currentToken(),n=this.options.production?null:this.getElementLocationCode(t);this.isAutomaticRuntime&&e!==Ob.KeyAfterPropSpread?this.transformTagToJSXFunc(n,e):this.transformTagToCreateElement(n)}getElementLocationCode(e){return`lineNumber: ${this.getLineNumberForIndex(e)}`}getLineNumberForIndex(e){let t=this.tokens.code;for(;this.lastIndex<e&&this.lastIndex<t.length;)t[this.lastIndex]===`\n`&&this.lastLineNumber++,this.lastIndex++;return this.lastLineNumber}transformTagToJSXFunc(e,t){let n=t===Ob.StaticChildren;this.tokens.replaceToken(this.getJSXFuncInvocationCode(n));let r=null;if(this.tokens.matches1(U.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, {`),this.processAutomaticChildrenAndEndProps(t);else{if(this.processTagIntro(),this.tokens.appendCode(`, {`),r=this.processProps(!0),this.tokens.matches2(U.slash,U.jsxTagEnd))this.tokens.appendCode(`}`);else if(this.tokens.matches1(U.jsxTagEnd))this.tokens.removeToken(),this.processAutomaticChildrenAndEndProps(t);else throw Error(`Expected either /> or > at the end of the tag.`);r&&this.tokens.appendCode(`, ${r}`)}for(this.options.production||(r===null&&this.tokens.appendCode(`, void 0`),this.tokens.appendCode(`, ${n}, ${this.getDevSource(e)}, this`)),this.tokens.removeInitialToken();!this.tokens.matches1(U.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(`)`)}transformTagToCreateElement(e){if(this.tokens.replaceToken(this.getCreateElementInvocationCode()),this.tokens.matches1(U.jsxTagEnd))this.tokens.replaceToken(`${this.getFragmentCode()}, null`),this.processChildren(!0);else if(this.processTagIntro(),this.processPropsObjectWithDevInfo(e),!this.tokens.matches2(U.slash,U.jsxTagEnd))if(this.tokens.matches1(U.jsxTagEnd))this.tokens.removeToken(),this.processChildren(!0);else throw Error(`Expected either /> or > at the end of the tag.`);for(this.tokens.removeInitialToken();!this.tokens.matches1(U.jsxTagEnd);)this.tokens.removeToken();this.tokens.replaceToken(`)`)}getJSXFuncInvocationCode(e){return this.options.production?e?this.claimAutoImportedFuncInvocation(`jsxs`,`/jsx-runtime`):this.claimAutoImportedFuncInvocation(`jsx`,`/jsx-runtime`):this.claimAutoImportedFuncInvocation(`jsxDEV`,`/jsx-dev-runtime`)}getCreateElementInvocationCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedFuncInvocation(`createElement`,``);{let{jsxPragmaInfo:e}=this;return`${this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.base)||e.base}${e.suffix}(`}}getFragmentCode(){if(this.isAutomaticRuntime)return this.claimAutoImportedName(`Fragment`,this.options.production?`/jsx-runtime`:`/jsx-dev-runtime`);{let{jsxPragmaInfo:e}=this;return(this.importProcessor&&this.importProcessor.getIdentifierReplacement(e.fragmentBase)||e.fragmentBase)+e.fragmentSuffix}}claimAutoImportedFuncInvocation(e,t){let n=this.claimAutoImportedName(e,t);return this.importProcessor?`${n}.call(void 0, `:`${n}(`}claimAutoImportedName(e,t){if(this.importProcessor){let n=this.jsxImportSource+t;return this.cjsAutomaticModuleNameResolutions[n]||(this.cjsAutomaticModuleNameResolutions[n]=this.importProcessor.getFreeIdentifierForPath(n)),`${this.cjsAutomaticModuleNameResolutions[n]}.${e}`}else return this.esmAutomaticImportNameResolutions[e]||(this.esmAutomaticImportNameResolutions[e]=this.nameManager.claimFreeName(`_${e}`)),this.esmAutomaticImportNameResolutions[e]}processTagIntro(){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType||!this.tokens.matches2AtIndex(e-1,U.jsxName,U.jsxName)&&!this.tokens.matches2AtIndex(e-1,U.greaterThan,U.jsxName)&&!this.tokens.matches1AtIndex(e,U.braceL)&&!this.tokens.matches1AtIndex(e,U.jsxTagEnd)&&!this.tokens.matches2AtIndex(e,U.slash,U.jsxTagEnd);)e++;if(e===this.tokens.currentIndex()+1){let e=this.tokens.identifierName();Ex(e)&&this.tokens.replaceToken(`\'${e}\'`)}for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}processPropsObjectWithDevInfo(e){let t=this.options.production?``:`__self: this, __source: ${this.getDevSource(e)}`;if(!this.tokens.matches1(U.jsxName)&&!this.tokens.matches1(U.braceL)){t?this.tokens.appendCode(`, {${t}}`):this.tokens.appendCode(`, null`);return}this.tokens.appendCode(`, {`),this.processProps(!1),t?this.tokens.appendCode(` ${t}}`):this.tokens.appendCode(`}`)}processProps(e){let t=null;for(;;){if(this.tokens.matches2(U.jsxName,U.eq)){let n=this.tokens.identifierName();if(e&&n===`key`){t!==null&&this.tokens.appendCode(t.replace(/[^\\n]/g,``)),this.tokens.removeToken(),this.tokens.removeToken();let e=this.tokens.snapshot();this.processPropValue(),t=this.tokens.dangerouslyGetAndRemoveCodeSinceSnapshot(e);continue}else this.processPropName(n),this.tokens.replaceToken(`: `),this.processPropValue()}else if(this.tokens.matches1(U.jsxName)){let e=this.tokens.identifierName();this.processPropName(e),this.tokens.appendCode(`: true`)}else if(this.tokens.matches1(U.braceL))this.tokens.replaceToken(``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``);else break;this.tokens.appendCode(`,`)}return t}processPropName(e){e.includes(`-`)?this.tokens.replaceToken(`\'${e}\'`):this.tokens.copyToken()}processPropValue(){this.tokens.matches1(U.braceL)?(this.tokens.replaceToken(``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``)):this.tokens.matches1(U.jsxTagStart)?this.processJSXTag():this.processStringPropValue()}processStringPropValue(){let e=this.tokens.currentToken(),t=this.tokens.code.slice(e.start+1,e.end-1),n=Ox(t),r=kx(t);this.tokens.replaceToken(r+n)}processAutomaticChildrenAndEndProps(e){e===Ob.StaticChildren?(this.tokens.appendCode(` children: [`),this.processChildren(!1),this.tokens.appendCode(`]}`)):(e===Ob.OneChild&&this.tokens.appendCode(` children: `),this.processChildren(!1),this.tokens.appendCode(`}`))}processChildren(e){let t=e;for(;;){if(this.tokens.matches2(U.jsxTagStart,U.slash))return;let e=!1;if(this.tokens.matches1(U.braceL))this.tokens.matches2(U.braceL,U.braceR)?(this.tokens.replaceToken(``),this.tokens.replaceToken(``)):(this.tokens.replaceToken(t?`, `:``),this.rootTransformer.processBalancedCode(),this.tokens.replaceToken(``),e=!0);else if(this.tokens.matches1(U.jsxTagStart))this.tokens.appendCode(t?`, `:``),this.processJSXTag(),e=!0;else if(this.tokens.matches1(U.jsxText)||this.tokens.matches1(U.jsxEmptyText))e=this.processChildTextElement(t);else throw Error(`Unexpected token when processing JSX children.`);e&&(t=!0)}}processChildTextElement(e){let t=this.tokens.currentToken(),n=this.tokens.code.slice(t.start,t.end),r=Ox(n),i=Dx(n);return i===`""`?(this.tokens.replaceToken(r),!1):(this.tokens.replaceToken(`${e?`, `:``}${i}${r}`),!0)}getDevSource(e){return`{fileName: ${this.getFilenameVarName()}, ${e}}`}getFilenameVarName(){return this.filenameVarName||=this.nameManager.claimFreeName(`_jsxFileName`),this.filenameVarName}};function Ex(e){let t=e.charCodeAt(0);return t>=W.lowercaseA&&t<=W.lowercaseZ}function Dx(e){let t=``,n=``,r=!1,i=!1;for(let a=0;a<e.length;a++){let o=e[a];if(o===` `||o===` `||o===`\\r`)r||(n+=o);else if(o===`\n`)n=``,r=!0;else{if(i&&r&&(t+=` `),t+=n,n=``,o===`&`){let{entity:n,newI:r}=Ax(e,a+1);a=r-1,t+=n}else t+=o;i=!0,r=!1}}return r||(t+=n),JSON.stringify(t)}function Ox(e){let t=0,n=0;for(let r of e)r===`\n`?(t++,n=0):r===` `&&n++;return`\n`.repeat(t)+` `.repeat(n)}function kx(e){let t=``;for(let n=0;n<e.length;n++){let r=e[n];if(r===`\n`)if(/\\s/.test(e[n+1]))for(t+=` `;n<e.length&&/\\s/.test(e[n+1]);)n++;else t+=`\n`;else if(r===`&`){let{entity:r,newI:i}=Ax(e,n+1);t+=r,n=i-1}else t+=r}return JSON.stringify(t)}function Ax(e,t){let n=``,r=0,i,a=t;if(e[a]===`#`){let t=10;a++;let n;if(e[a]===`x`)for(t=16,a++,n=a;a<e.length&&Mx(e.charCodeAt(a));)a++;else for(n=a;a<e.length&&jx(e.charCodeAt(a));)a++;if(e[a]===`;`){let r=e.slice(n,a);r&&(a++,i=String.fromCodePoint(parseInt(r,t)))}}else for(;a<e.length&&r++<10;){let t=e[a];if(a++,t===`;`){i=xx.get(n);break}n+=t}return i?{entity:i,newI:a}:{entity:`&`,newI:t}}function jx(e){return e>=W.digit0&&e<=W.digit9}function Mx(e){return e>=W.digit0&&e<=W.digit9||e>=W.lowercaseA&&e<=W.lowercaseF||e>=W.uppercaseA&&e<=W.uppercaseF}function Nx(e,t){let n=Sx(t),r=new Set;for(let t=0;t<e.tokens.length;t++){let i=e.tokens[t];i.type===U.name&&!i.isType&&(i.identifierRole===Y.Access||i.identifierRole===Y.ObjectShorthand||i.identifierRole===Y.ExportAccess)&&!i.shadowsGlobal&&r.add(e.identifierNameForToken(i)),i.type===U.jsxTagStart&&r.add(n.base),i.type===U.jsxTagStart&&t+1<e.tokens.length&&e.tokens[t+1].type===U.jsxTagEnd&&(r.add(n.base),r.add(n.fragmentBase)),i.type===U.jsxName&&i.identifierRole===Y.Access&&(!Ex(e.identifierNameForToken(i))||e.tokens[t+1].type===U.dot)&&r.add(e.identifierNameForToken(i))}return r}var Px=class e{__init(){this.nonTypeIdentifiers=new Set}__init2(){this.importInfoByPath=new Map}__init3(){this.importsToReplace=new Map}__init4(){this.identifierReplacements=new Map}__init5(){this.exportBindingsByLocalName=new Map}constructor(t,n,r,i,a,o,s){this.nameManager=t,this.tokens=n,this.enableLegacyTypeScriptModuleInterop=r,this.options=i,this.isTypeScriptTransformEnabled=a,this.keepUnusedImports=o,this.helperManager=s,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),e.prototype.__init5.call(this)}preprocessTokens(){for(let e=0;e<this.tokens.tokens.length;e++)this.tokens.matches1AtIndex(e,U._import)&&!this.tokens.matches3AtIndex(e,U._import,U.name,U.eq)&&this.preprocessImportAtIndex(e),this.tokens.matches1AtIndex(e,U._export)&&!this.tokens.matches2AtIndex(e,U._export,U.eq)&&this.preprocessExportAtIndex(e);this.generateImportReplacements()}pruneTypeOnlyImports(){this.nonTypeIdentifiers=Nx(this.tokens,this.options);for(let[e,t]of this.importInfoByPath.entries())t.hasBareImport||t.hasStarExport||t.exportStarNames.length>0||t.namedExports.length>0||[...t.defaultNames,...t.wildcardNames,...t.namedImports.map(({localName:e})=>e)].every(e=>this.shouldAutomaticallyElideImportedName(e))&&this.importsToReplace.set(e,``)}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}generateImportReplacements(){for(let[e,t]of this.importInfoByPath.entries()){let{defaultNames:n,wildcardNames:r,namedImports:i,namedExports:a,exportStarNames:o,hasStarExport:s}=t;if(n.length===0&&r.length===0&&i.length===0&&a.length===0&&o.length===0&&!s){this.importsToReplace.set(e,`require(\'${e}\');`);continue}let c=this.getFreeIdentifierForPath(e),l;l=this.enableLegacyTypeScriptModuleInterop?c:r.length>0?r[0]:this.getFreeIdentifierForPath(e);let u=`var ${c} = require(\'${e}\');`;if(r.length>0)for(let e of r){let t=this.enableLegacyTypeScriptModuleInterop?c:`${this.helperManager.getHelperName(`interopRequireWildcard`)}(${c})`;u+=` var ${e} = ${t};`}else o.length>0&&l!==c?u+=` var ${l} = ${this.helperManager.getHelperName(`interopRequireWildcard`)}(${c});`:n.length>0&&l!==c&&(u+=` var ${l} = ${this.helperManager.getHelperName(`interopRequireDefault`)}(${c});`);for(let{importedName:e,localName:t}of a)u+=` ${this.helperManager.getHelperName(`createNamedExportFrom`)}(${c}, \'${t}\', \'${e}\');`;for(let e of o)u+=` exports.${e} = ${l};`;s&&(u+=` ${this.helperManager.getHelperName(`createStarExport`)}(${c});`),this.importsToReplace.set(e,u);for(let e of n)this.identifierReplacements.set(e,`${l}.default`);for(let{importedName:e,localName:t}of i)this.identifierReplacements.set(t,`${c}.${e}`)}}getFreeIdentifierForPath(e){let t=e.split(`/`),n=t[t.length-1].replace(/\\W/g,``);return this.nameManager.claimFreeName(`_${n}`)}preprocessImportAtIndex(e){let t=[],n=[],r=[];if(e++,(this.tokens.matchesContextualAtIndex(e,H._type)||this.tokens.matches1AtIndex(e,U._typeof))&&!this.tokens.matches1AtIndex(e+1,U.comma)&&!this.tokens.matchesContextualAtIndex(e+1,H._from)||this.tokens.matches1AtIndex(e,U.parenL))return;if(this.tokens.matches1AtIndex(e,U.name)&&(t.push(this.tokens.identifierNameAtIndex(e)),e++,this.tokens.matches1AtIndex(e,U.comma)&&e++),this.tokens.matches1AtIndex(e,U.star)&&(e+=2,n.push(this.tokens.identifierNameAtIndex(e)),e++),this.tokens.matches1AtIndex(e,U.braceL)){let n=this.getNamedImports(e+1);e=n.newIndex;for(let e of n.namedImports)e.importedName==="default"?t.push(e.localName):r.push(e)}if(this.tokens.matchesContextualAtIndex(e,H._from)&&e++,!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of import statement.`);let i=this.tokens.stringValueAtIndex(e),a=this.getImportInfo(i);a.defaultNames.push(...t),a.wildcardNames.push(...n),a.namedImports.push(...r),t.length===0&&n.length===0&&r.length===0&&(a.hasBareImport=!0)}preprocessExportAtIndex(e){if(this.tokens.matches2AtIndex(e,U._export,U._var)||this.tokens.matches2AtIndex(e,U._export,U._let)||this.tokens.matches2AtIndex(e,U._export,U._const))this.preprocessVarExportAtIndex(e);else if(this.tokens.matches2AtIndex(e,U._export,U._function)||this.tokens.matches2AtIndex(e,U._export,U._class)){let t=this.tokens.identifierNameAtIndex(e+2);this.addExportBinding(t,t)}else if(this.tokens.matches3AtIndex(e,U._export,U.name,U._function)){let t=this.tokens.identifierNameAtIndex(e+3);this.addExportBinding(t,t)}else this.tokens.matches2AtIndex(e,U._export,U.braceL)?this.preprocessNamedExportAtIndex(e):this.tokens.matches2AtIndex(e,U._export,U.star)&&this.preprocessExportStarAtIndex(e)}preprocessVarExportAtIndex(e){let t=0;for(let n=e+2;;n++)if(this.tokens.matches1AtIndex(n,U.braceL)||this.tokens.matches1AtIndex(n,U.dollarBraceL)||this.tokens.matches1AtIndex(n,U.bracketL))t++;else if(this.tokens.matches1AtIndex(n,U.braceR)||this.tokens.matches1AtIndex(n,U.bracketR))t--;else if(t===0&&!this.tokens.matches1AtIndex(n,U.name))break;else if(this.tokens.matches1AtIndex(1,U.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);n=e-1}else{let e=this.tokens.tokens[n];if(kb(e)){let e=this.tokens.identifierNameAtIndex(n);this.identifierReplacements.set(e,`exports.${e}`)}}}preprocessNamedExportAtIndex(e){e+=2;let{newIndex:t,namedImports:n}=this.getNamedImports(e);if(e=t,this.tokens.matchesContextualAtIndex(e,H._from))e++;else{for(let{importedName:e,localName:t}of n)this.addExportBinding(e,t);return}if(!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of import statement.`);let r=this.tokens.stringValueAtIndex(e);this.getImportInfo(r).namedExports.push(...n)}preprocessExportStarAtIndex(e){let t=null;if(this.tokens.matches3AtIndex(e,U._export,U.star,U._as)?(e+=3,t=this.tokens.identifierNameAtIndex(e),e+=2):e+=3,!this.tokens.matches1AtIndex(e,U.string))throw Error(`Expected string token at the end of star export statement.`);let n=this.tokens.stringValueAtIndex(e),r=this.getImportInfo(n);t===null?r.hasStarExport=!0:r.exportStarNames.push(t)}getNamedImports(e){let t=[];for(;;){if(this.tokens.matches1AtIndex(e,U.braceR)){e++;break}let n=yx(this.tokens,e);if(e=n.endIndex,n.isType||t.push({importedName:n.leftName,localName:n.rightName}),this.tokens.matches2AtIndex(e,U.comma,U.braceR)){e+=2;break}else if(this.tokens.matches1AtIndex(e,U.braceR)){e++;break}else if(this.tokens.matches1AtIndex(e,U.comma))e++;else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.tokens[e])}`)}return{newIndex:e,namedImports:t}}getImportInfo(e){let t=this.importInfoByPath.get(e);if(t)return t;let n={defaultNames:[],wildcardNames:[],namedImports:[],namedExports:[],hasBareImport:!1,exportStarNames:[],hasStarExport:!1};return this.importInfoByPath.set(e,n),n}addExportBinding(e,t){this.exportBindingsByLocalName.has(e)||this.exportBindingsByLocalName.set(e,[]),this.exportBindingsByLocalName.get(e).push(t)}claimImportCode(e){let t=this.importsToReplace.get(e);return this.importsToReplace.set(e,``),t||``}getIdentifierReplacement(e){return this.identifierReplacements.get(e)||null}resolveExportBinding(e){let t=this.exportBindingsByLocalName.get(e);return!t||t.length===0?null:t.map(e=>`exports.${e}`).join(` = `)}getGlobalNames(){return new Set([...this.identifierReplacements.keys(),...this.exportBindingsByLocalName.keys()])}},Fx=44,Ix=59,Lx=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/`,Rx=new Uint8Array(64),zx=new Uint8Array(128);for(let e=0;e<Lx.length;e++){let t=Lx.charCodeAt(e);Rx[e]=t,zx[t]=e}function Bx(e,t){do{let n=t&31;t>>>=5,t>0&&(n|=32),e.write(Rx[n])}while(t>0)}function Vx(e){return e<0?-e<<1|1:e<<1}var Hx=1024*16,Ux=typeof TextDecoder<`u`?new TextDecoder:typeof Buffer<`u`?{decode(e){return Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}}:{decode(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},Wx=class{constructor(){this.pos=0,this.out=``,this.buffer=new Uint8Array(Hx)}write(e){let{buffer:t}=this;t[this.pos++]=e,this.pos===Hx&&(this.out+=Ux.decode(t),this.pos=0)}flush(){let{buffer:e,out:t,pos:n}=this;return n>0?t+Ux.decode(e.subarray(0,n)):t}};function Gx(e){let t=new Wx,n=0,r=0,i=0,a=0;for(let o=0;o<e.length;o++){let s=e[o];if(o>0&&t.write(Ix),s.length===0)continue;let c=0;for(let e=0;e<s.length;e++){let o=s[e];e>0&&t.write(Fx),Bx(t,Vx(o[0]-c)),c=o[0],o.length!==1&&(Bx(t,Vx(o[1]-n)),Bx(t,Vx(o[2]-r)),Bx(t,Vx(o[3]-i)),n=o[1],r=o[2],i=o[3],o.length!==4&&(Bx(t,Vx(o[4]-a)),a=o[4]))}}return t.flush()}o(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self,n.resolveURI=r())})(e,(function(){let e=/^[\\w+.-]+:\\/\\//,t=/^([\\w+.-]+:)\\/\\/([^@/#?]*@)?(\\[[^\\]]+\\]|[^:/#?]*)(:\\d+)?(\\/[^#?]*)?(\\?[^#]*)?(#.*)?/,n=/^file:(?:\\/\\/((?![a-z]:)[^/#?]*)?)?(\\/?[^#?]*)(\\?[^#]*)?(#.*)?/i;function r(t){return e.test(t)}function i(e){return e.startsWith(`//`)}function a(e){return e.startsWith(`/`)}function o(e){return e.startsWith(`file:`)}function s(e){return/^[.?#]/.test(e)}function c(e){let n=t.exec(e);return u(n[1],n[2]||``,n[3],n[4]||``,n[5]||`/`,n[6]||``,n[7]||``)}function l(e){let t=n.exec(e),r=t[2];return u(`file:`,``,t[1]||``,``,a(r)?r:`/`+r,t[3]||``,t[4]||``)}function u(e,t,n,r,i,a,o){return{scheme:e,user:t,host:n,port:r,path:i,query:a,hash:o,type:7}}function d(e){if(i(e)){let t=c(`http:`+e);return t.scheme=``,t.type=6,t}if(a(e)){let t=c(`http://foo.com`+e);return t.scheme=``,t.host=``,t.type=5,t}if(o(e))return l(e);if(r(e))return c(e);let t=c(`http://foo.com/`+e);return t.scheme=``,t.host=``,t.type=e?e.startsWith(`?`)?3:e.startsWith(`#`)?2:4:1,t}function f(e){if(e.endsWith(`/..`))return e;let t=e.lastIndexOf(`/`);return e.slice(0,t+1)}function p(e,t){m(t,t.type),e.path===`/`?e.path=t.path:e.path=f(t.path)+e.path}function m(e,t){let n=t<=4,r=e.path.split(`/`),i=1,a=0,o=!1;for(let e=1;e<r.length;e++){let t=r[e];if(!t){o=!0;continue}if(o=!1,t!==`.`){if(t===`..`){a?(o=!0,a--,i--):n&&(r[i++]=t);continue}r[i++]=t,a++}}let s=``;for(let e=1;e<i;e++)s+=`/`+r[e];(!s||o&&!s.endsWith(`/..`))&&(s+=`/`),e.path=s}function h(e,t){if(!e&&!t)return``;let n=d(e),r=n.type;if(t&&r!==7){let e=d(t),i=e.type;switch(r){case 1:n.hash=e.hash;case 2:n.query=e.query;case 3:case 4:p(n,e);case 5:n.user=e.user,n.host=e.host,n.port=e.port;case 6:n.scheme=e.scheme}i>r&&(r=i)}m(n,r);let i=n.query+n.hash;switch(r){case 2:case 3:return i;case 4:{let r=n.path.slice(1);return r?s(t||e)&&!s(r)?`./`+r+i:r+i:i||`.`}case 5:return n.path+i;default:return n.scheme+`//`+n.user+n.host+n.port+n.path+i}}return h}))}))();var Kx=class{constructor(){this._indexes={__proto__:null},this.array=[]}};function qx(e){return e}function Jx(e,t){return qx(e)._indexes[t]}function Yx(e,t){let n=Jx(e,t);if(n!==void 0)return n;let{array:r,_indexes:i}=qx(e);return i[t]=r.push(t)-1}var Xx=0,Zx=1,Qx=2,$x=3,eS=4,tS=-1,nS=class{constructor({file:e,sourceRoot:t}={}){this._names=new Kx,this._sources=new Kx,this._sourcesContent=[],this._mappings=[],this.file=e,this.sourceRoot=t,this._ignoreList=new Kx}};function rS(e){return e}var iS=(e,t,n,r,i,a,o,s)=>sS(!0,e,t,n,r,i,a,o,s);function aS(e){let{_mappings:t,_sources:n,_sourcesContent:r,_names:i,_ignoreList:a}=rS(e);return dS(t),{version:3,file:e.file||void 0,names:i.array,sourceRoot:e.sourceRoot||void 0,sources:n.array,sourcesContent:r,mappings:t,ignoreList:a.array}}function oS(e){let t=aS(e);return Object.assign({},t,{mappings:Gx(t.mappings)})}function sS(e,t,n,r,i,a,o,s,c){let{_mappings:l,_sources:u,_sourcesContent:d,_names:f}=rS(t),p=cS(l,n),m=lS(p,r);if(!i)return e&&fS(p,m)?void 0:uS(p,m,[r]);let h=Yx(u,i),g=s?Yx(f,s):tS;if(h===d.length&&(d[h]=c??null),!(e&&pS(p,m,h,a,o,g)))return uS(p,m,s?[r,h,a,o,g]:[r,h,a,o])}function cS(e,t){for(let n=e.length;n<=t;n++)e[n]=[];return e[t]}function lS(e,t){let n=e.length;for(let r=n-1;r>=0&&!(t>=e[r][Xx]);n=r--);return n}function uS(e,t,n){for(let n=e.length;n>t;n--)e[n]=e[n-1];e[t]=n}function dS(e){let{length:t}=e,n=t;for(let t=n-1;t>=0&&!(e[t].length>0);n=t,t--);n<t&&(e.length=n)}function fS(e,t){return t===0||e[t-1].length===1}function pS(e,t,n,r,i,a){if(t===0)return!1;let o=e[t-1];return o.length!==1&&n===o[Zx]&&r===o[Qx]&&i===o[$x]&&a===(o.length===5?o[eS]:tS)}function mS({code:e,mappings:t},n,r,i,a){let o=hS(i,a),s=new nS({file:r.compiledFilename}),c=0,l=t[0];for(;l===void 0&&c<t.length-1;)c++,l=t[c];let u=0,d=0;l!==d&&iS(s,u,0,n,u,0);for(let r=0;r<e.length;r++){if(r===l){let e=l-d,i=o[c];for(iS(s,u,e,n,u,i);(l===r||l===void 0)&&c<t.length-1;)c++,l=t[c]}e.charCodeAt(r)===W.lineFeed&&(u++,d=r+1,l!==d&&iS(s,u,0,n,u,0))}let{sourceRoot:f,sourcesContent:p,...m}=oS(s);return m}function hS(e,t){let n=Array(t.length),r=0,i=t[r].start,a=0;for(let o=0;o<e.length;o++)o===i&&(n[r]=i-a,r++,i=t[r].start),e.charCodeAt(o)===W.lineFeed&&(a=o+1);return n}var gS={require:`\n import {createRequire as CREATE_REQUIRE_NAME} from "module";\n const require = CREATE_REQUIRE_NAME(import.meta.url);\n `,interopRequireWildcard:`\n function interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n newObj[key] = obj[key];\n }\n }\n }\n newObj.default = obj;\n return newObj;\n }\n }\n `,interopRequireDefault:`\n function interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n }\n `,createNamedExportFrom:`\n function createNamedExportFrom(obj, localName, importedName) {\n Object.defineProperty(exports, localName, {enumerable: true, configurable: true, get: () => obj[importedName]});\n }\n `,createStarExport:`\n function createStarExport(obj) {\n Object.keys(obj)\n .filter((key) => key !== "default" && key !== "__esModule")\n .forEach((key) => {\n if (exports.hasOwnProperty(key)) {\n return;\n }\n Object.defineProperty(exports, key, {enumerable: true, configurable: true, get: () => obj[key]});\n });\n }\n `,nullishCoalesce:`\n function nullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return rhsFn();\n }\n }\n `,asyncNullishCoalesce:`\n async function asyncNullishCoalesce(lhs, rhsFn) {\n if (lhs != null) {\n return lhs;\n } else {\n return await rhsFn();\n }\n }\n `,optionalChain:`\n function optionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === \'optionalAccess\' || op === \'optionalCall\') && value == null) {\n return undefined;\n }\n if (op === \'access\' || op === \'optionalAccess\') {\n lastAccessLHS = value;\n value = fn(value);\n } else if (op === \'call\' || op === \'optionalCall\') {\n value = fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n `,asyncOptionalChain:`\n async function asyncOptionalChain(ops) {\n let lastAccessLHS = undefined;\n let value = ops[0];\n let i = 1;\n while (i < ops.length) {\n const op = ops[i];\n const fn = ops[i + 1];\n i += 2;\n if ((op === \'optionalAccess\' || op === \'optionalCall\') && value == null) {\n return undefined;\n }\n if (op === \'access\' || op === \'optionalAccess\') {\n lastAccessLHS = value;\n value = await fn(value);\n } else if (op === \'call\' || op === \'optionalCall\') {\n value = await fn((...args) => value.call(lastAccessLHS, ...args));\n lastAccessLHS = undefined;\n }\n }\n return value;\n }\n `,optionalChainDelete:`\n function optionalChainDelete(ops) {\n const result = OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n `,asyncOptionalChainDelete:`\n async function asyncOptionalChainDelete(ops) {\n const result = await ASYNC_OPTIONAL_CHAIN_NAME(ops);\n return result == null ? true : result;\n }\n `},_S=class e{__init(){this.helperNames={}}__init2(){this.createRequireName=null}constructor(t){this.nameManager=t,e.prototype.__init.call(this),e.prototype.__init2.call(this)}getHelperName(e){let t=this.helperNames[e];return t||(t=this.nameManager.claimFreeName(`_${e}`),this.helperNames[e]=t,t)}emitHelpers(){let e=``;this.helperNames.optionalChainDelete&&this.getHelperName(`optionalChain`),this.helperNames.asyncOptionalChainDelete&&this.getHelperName(`asyncOptionalChain`);for(let[t,n]of Object.entries(gS)){let r=this.helperNames[t],i=n;t===`optionalChainDelete`?i=i.replace(`OPTIONAL_CHAIN_NAME`,this.helperNames.optionalChain):t===`asyncOptionalChainDelete`?i=i.replace(`ASYNC_OPTIONAL_CHAIN_NAME`,this.helperNames.asyncOptionalChain):t===`require`&&(this.createRequireName===null&&(this.createRequireName=this.nameManager.claimFreeName(`_createRequire`)),i=i.replace(/CREATE_REQUIRE_NAME/g,this.createRequireName)),r&&(e+=` `,e+=i.replace(t,r).replace(/\\s+/g,` `).trim())}return e}};function vS(e,t,n){yS(e,n)&&bS(e,t,n)}function yS(e,t){for(let n of e.tokens)if(n.type===U.name&&!n.isType&&Ab(n)&&t.has(e.identifierNameForToken(n)))return!0;return!1}function bS(e,t,n){let r=[],i=t.length-1;for(let a=e.tokens.length-1;;a--){for(;r.length>0&&r[r.length-1].startTokenIndex===a+1;)r.pop();for(;i>=0&&t[i].endTokenIndex===a+1;)r.push(t[i]),i--;if(a<0)break;let o=e.tokens[a],s=e.identifierNameForToken(o);if(r.length>1&&!o.isType&&o.type===U.name&&n.has(s)){if(Mb(o))xS(r[r.length-1],e,s);else if(Nb(o)){let t=r.length-1;for(;t>0&&!r[t].isFunctionScope;)t--;if(t<0)throw Error(`Did not find parent function scope.`);xS(r[t],e,s)}}}if(r.length>0)throw Error(`Expected empty scope stack after processing file.`)}function xS(e,t,n){for(let r=e.startTokenIndex;r<e.endTokenIndex;r++){let e=t.tokens[r];(e.type===U.name||e.type===U.jsxName)&&t.identifierNameForToken(e)===n&&(e.shadowsGlobal=!0)}}function SS(e,t){let n=[];for(let r of t)r.type===U.name&&n.push(e.slice(r.start,r.end));return n}var CS=class e{__init(){this.usedNames=new Set}constructor(t,n){e.prototype.__init.call(this),this.usedNames=new Set(SS(t,n))}claimFreeName(e){let t=this.findFreeName(e);return this.usedNames.add(t),t}findFreeName(e){if(!this.usedNames.has(e))return e;let t=2;for(;this.usedNames.has(e+String(t));)t++;return e+String(t)}},wS=o((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.DetailContext=e.NoopContext=e.VError=void 0;var n=function(e){t(n,e);function n(t,r){var i=e.call(this,r)||this;return i.path=t,Object.setPrototypeOf(i,n.prototype),i}return n}(Error);e.VError=n,e.NoopContext=function(){function e(){}return e.prototype.fail=function(e,t,n){return!1},e.prototype.unionResolver=function(){return this},e.prototype.createContext=function(){return this},e.prototype.resolveUnion=function(e){},e}();var r=function(){function e(){this._propNames=[``],this._messages=[null],this._score=0}return e.prototype.fail=function(e,t,n){return this._propNames.push(e),this._messages.push(t),this._score+=n,!1},e.prototype.unionResolver=function(){return new i},e.prototype.resolveUnion=function(e){for(var t,n,r=e,i=null,a=0,o=r.contexts;a<o.length;a++){var s=o[a];(!i||s._score>=i._score)&&(i=s)}i&&i._score>0&&((t=this._propNames).push.apply(t,i._propNames),(n=this._messages).push.apply(n,i._messages))},e.prototype.getError=function(e){for(var t=[],r=this._propNames.length-1;r>=0;r--){var i=this._propNames[r];e+=typeof i==`number`?`[`+i+`]`:i?`.`+i:``;var a=this._messages[r];a&&t.push(e+` `+a)}return new n(e,t.join(`; `))},e.prototype.getErrorDetail=function(e){for(var t=[],n=this._propNames.length-1;n>=0;n--){var r=this._propNames[n];e+=typeof r==`number`?`[`+r+`]`:r?`.`+r:``;var i=this._messages[n];i&&t.push({path:e,message:i})}for(var a=null,n=t.length-1;n>=0;n--)a&&(t[n].nested=[a]),a=t[n];return a},e}();e.DetailContext=r;var i=function(){function e(){this.contexts=[]}return e.prototype.createContext=function(){var e=new r;return this.contexts.push(e),e},e}()})),TS=o((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},e(t,n)};return function(t,n){e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,"__esModule",{value:!0}),e.basicTypes=e.BasicType=e.TParamList=e.TParam=e.param=e.TFunc=e.func=e.TProp=e.TOptional=e.opt=e.TIface=e.iface=e.TEnumLiteral=e.enumlit=e.TEnumType=e.enumtype=e.TIntersection=e.intersection=e.TUnion=e.union=e.TTuple=e.tuple=e.TArray=e.array=e.TLiteral=e.lit=e.TName=e.name=e.TType=void 0;var n=wS(),r=function(){function e(){}return e}();e.TType=r;function i(e){return typeof e==`string`?o(e):e}function a(e,t){var n=e[t];if(!n)throw Error(`Unknown type `+t);return n}function o(e){return new s(e)}e.name=o;var s=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.name=t,n._failMsg=`is not a `+t,n}return n.prototype.getChecker=function(e,t,r){var i=this,o=a(e,this.name),s=o.getChecker(e,t,r);return o instanceof b||o instanceof n?s:function(e,t){return s(e,t)?!0:t.fail(null,i._failMsg,0)}},n}(r);e.TName=s;function c(e){return new l(e)}e.lit=c;var l=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.value=t,n.name=JSON.stringify(t),n._failMsg=`is not `+n.name,n}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return e===n.value||t.fail(null,n._failMsg,-1)}},n}(r);e.TLiteral=l;function u(e){return new d(i(e))}e.array=u;var d=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttype=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var r=0;r<e.length;r++)if(!n(e[r],t))return t.fail(r,null,1);return!0}},n}(r);e.TArray=d;function f(){return new p([...arguments].map(function(e){return i(e)}))}e.tuple=f;var p=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttypes=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttypes.map(function(n){return n.getChecker(e,t)}),r=function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var r=0;r<n.length;r++)if(!n[r](e[r],t))return t.fail(r,null,1);return!0};return t?function(e,t){return r(e,t)?e.length<=n.length||t.fail(n.length,`is extraneous`,2):!1}:r},n}(r);e.TTuple=p;function m(){return new h([...arguments].map(function(e){return i(e)}))}e.union=m;var h=function(e){t(n,e);function n(t){var n=e.call(this)||this;n.ttypes=t;var r=t.map(function(e){return e instanceof s||e instanceof l?e.name:null}).filter(function(e){return e}),i=t.length-r.length;return r.length?(i>0&&r.push(i+` more`),n._failMsg=`is none of `+r.join(`, `)):n._failMsg=`is none of `+i+` types`,n}return n.prototype.getChecker=function(e,t){var n=this,r=this.ttypes.map(function(n){return n.getChecker(e,t)});return function(e,t){for(var i=t.unionResolver(),a=0;a<r.length;a++)if(r[a](e,i.createContext()))return!0;return t.resolveUnion(i),t.fail(null,n._failMsg,0)}},n}(r);e.TUnion=h;function g(){return new _([...arguments].map(function(e){return i(e)}))}e.intersection=g;var _=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttypes=t,n}return n.prototype.getChecker=function(e,t){var n=new Set,r=this.ttypes.map(function(r){return r.getChecker(e,t,n)});return function(e,t){return r.every(function(n){return n(e,t)})?!0:t.fail(null,null,0)}},n}(r);e.TIntersection=_;function v(e){return new y(e)}e.enumtype=v;var y=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.members=t,n.validValues=new Set,n._failMsg=`is not a valid enum value`,n.validValues=new Set(Object.keys(t).map(function(e){return t[e]})),n}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return n.validValues.has(e)?!0:t.fail(null,n._failMsg,0)}},n}(r);e.TEnumType=y;function ee(e,t){return new te(e,t)}e.enumlit=ee;var te=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.enumName=t,r.prop=n,r._failMsg=`is not `+t+`.`+n,r}return n.prototype.getChecker=function(e,t){var n=this,r=a(e,this.enumName);if(!(r instanceof y))throw Error(`Type `+this.enumName+` used in enumlit is not an enum type`);var i=r.members[this.prop];if(!r.members.hasOwnProperty(this.prop))throw Error(`Unknown value `+this.enumName+`.`+this.prop+` used in enumlit`);return function(e,t){return e===i||t.fail(null,n._failMsg,-1)}},n}(r);e.TEnumLiteral=te;function ne(e){return Object.keys(e).map(function(t){return re(t,e[t])})}function re(e,t){return t instanceof se?new ce(e,t.ttype,!0):new ce(e,i(t),!1)}function ie(e,t){return new ae(e,ne(t))}e.iface=ie;var ae=function(e){t(r,e);function r(t,n){var r=e.call(this)||this;return r.bases=t,r.props=n,r.propSet=new Set(n.map(function(e){return e.name})),r}return r.prototype.getChecker=function(e,t,r){var i=this,o=this.bases.map(function(n){return a(e,n).getChecker(e,t)}),s=this.props.map(function(n){return n.ttype.getChecker(e,t)}),c=new n.NoopContext,l=this.props.map(function(e,t){return!e.isOpt&&!s[t](void 0,c)}),u=function(e,t){if(typeof e!=`object`||!e)return t.fail(null,`is not an object`,0);for(var n=0;n<o.length;n++)if(!o[n](e,t))return!1;for(var n=0;n<s.length;n++){var r=i.props[n].name,a=e[r];if(a===void 0){if(l[n])return t.fail(r,`is missing`,1)}else if(!s[n](a,t))return t.fail(r,null,1)}return!0};if(!t)return u;var d=this.propSet;return r&&(this.propSet.forEach(function(e){return r.add(e)}),d=r),function(e,t){if(!u(e,t))return!1;for(var n in e)if(!d.has(n))return t.fail(n,`is extraneous`,2);return!0}},r}(r);e.TIface=ae;function oe(e){return new se(i(e))}e.opt=oe;var se=function(e){t(n,e);function n(t){var n=e.call(this)||this;return n.ttype=t,n}return n.prototype.getChecker=function(e,t){var n=this.ttype.getChecker(e,t);return function(e,t){return e===void 0||n(e,t)}},n}(r);e.TOptional=se;var ce=function(){function e(e,t,n){this.name=e,this.ttype=t,this.isOpt=n}return e}();e.TProp=ce;function le(e){return new ue(new pe([...arguments].slice(1)),i(e))}e.func=le;var ue=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.paramList=t,r.result=n,r}return n.prototype.getChecker=function(e,t){return function(e,t){return typeof e==`function`||t.fail(null,`is not a function`,0)}},n}(r);e.TFunc=ue;function de(e,t,n){return new fe(e,i(t),!!n)}e.param=de;var fe=function(){function e(e,t,n){this.name=e,this.ttype=t,this.isOpt=n}return e}();e.TParam=fe;var pe=function(e){t(r,e);function r(t){var n=e.call(this)||this;return n.params=t,n}return r.prototype.getChecker=function(e,t){var r=this,i=this.params.map(function(n){return n.ttype.getChecker(e,t)}),a=new n.NoopContext,o=this.params.map(function(e,t){return!e.isOpt&&!i[t](void 0,a)}),s=function(e,t){if(!Array.isArray(e))return t.fail(null,`is not an array`,0);for(var n=0;n<i.length;n++){var a=r.params[n];if(e[n]===void 0){if(o[n])return t.fail(a.name,`is missing`,1)}else if(!i[n](e[n],t))return t.fail(a.name,null,1)}return!0};return t?function(e,t){return s(e,t)?e.length<=i.length||t.fail(i.length,`is extraneous`,2):!1}:s},r}(r);e.TParamList=pe;var b=function(e){t(n,e);function n(t,n){var r=e.call(this)||this;return r.validator=t,r.message=n,r}return n.prototype.getChecker=function(e,t){var n=this;return function(e,t){return n.validator(e)?!0:t.fail(null,n.message,0)}},n}(r);e.BasicType=b,e.basicTypes={any:new b(function(e){return!0},`is invalid`),number:new b(function(e){return typeof e==`number`},`is not a number`),object:new b(function(e){return typeof e==`object`&&e},`is not an object`),boolean:new b(function(e){return typeof e==`boolean`},`is not a boolean`),string:new b(function(e){return typeof e==`string`},`is not a string`),symbol:new b(function(e){return typeof e==`symbol`},`is not a symbol`),void:new b(function(e){return e==null},`is not void`),undefined:new b(function(e){return e===void 0},`is not undefined`),null:new b(function(e){return e===null},`is not null`),never:new b(function(e){return!1},`is unexpected`),Date:new b(he(`[object Date]`),`is not a Date`),RegExp:new b(he(`[object RegExp]`),`is not a RegExp`)};var me=Object.prototype.toString;function he(e){return function(t){return typeof t==`object`&&t&&me.call(t)===e}}typeof Buffer<`u`&&(e.basicTypes.Buffer=new b(function(e){return Buffer.isBuffer(e)},`is not a Buffer`));for(var ge=function(t){e.basicTypes[t.name]=new b(function(e){return e instanceof t},`is not a `+t.name)},_e=0,ve=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,ArrayBuffer];_e<ve.length;_e++){var ye=ve[_e];ge(ye)}})),ES=c(o((e=>{var t=e&&e.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;for(var r=Array(e),i=0,t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};Object.defineProperty(e,"__esModule",{value:!0}),e.Checker=e.createCheckers=void 0;var n=TS(),r=wS(),i=TS();Object.defineProperty(e,"TArray",{enumerable:!0,get:function(){return i.TArray}}),Object.defineProperty(e,"TEnumType",{enumerable:!0,get:function(){return i.TEnumType}}),Object.defineProperty(e,"TEnumLiteral",{enumerable:!0,get:function(){return i.TEnumLiteral}}),Object.defineProperty(e,"TFunc",{enumerable:!0,get:function(){return i.TFunc}}),Object.defineProperty(e,"TIface",{enumerable:!0,get:function(){return i.TIface}}),Object.defineProperty(e,"TLiteral",{enumerable:!0,get:function(){return i.TLiteral}}),Object.defineProperty(e,"TName",{enumerable:!0,get:function(){return i.TName}}),Object.defineProperty(e,"TOptional",{enumerable:!0,get:function(){return i.TOptional}}),Object.defineProperty(e,"TParam",{enumerable:!0,get:function(){return i.TParam}}),Object.defineProperty(e,"TParamList",{enumerable:!0,get:function(){return i.TParamList}}),Object.defineProperty(e,"TProp",{enumerable:!0,get:function(){return i.TProp}}),Object.defineProperty(e,"TTuple",{enumerable:!0,get:function(){return i.TTuple}}),Object.defineProperty(e,"TType",{enumerable:!0,get:function(){return i.TType}}),Object.defineProperty(e,"TUnion",{enumerable:!0,get:function(){return i.TUnion}}),Object.defineProperty(e,"TIntersection",{enumerable:!0,get:function(){return i.TIntersection}}),Object.defineProperty(e,"array",{enumerable:!0,get:function(){return i.array}}),Object.defineProperty(e,"enumlit",{enumerable:!0,get:function(){return i.enumlit}}),Object.defineProperty(e,"enumtype",{enumerable:!0,get:function(){return i.enumtype}}),Object.defineProperty(e,"func",{enumerable:!0,get:function(){return i.func}}),Object.defineProperty(e,"iface",{enumerable:!0,get:function(){return i.iface}}),Object.defineProperty(e,"lit",{enumerable:!0,get:function(){return i.lit}}),Object.defineProperty(e,"name",{enumerable:!0,get:function(){return i.name}}),Object.defineProperty(e,"opt",{enumerable:!0,get:function(){return i.opt}}),Object.defineProperty(e,"param",{enumerable:!0,get:function(){return i.param}}),Object.defineProperty(e,"tuple",{enumerable:!0,get:function(){return i.tuple}}),Object.defineProperty(e,"union",{enumerable:!0,get:function(){return i.union}}),Object.defineProperty(e,"intersection",{enumerable:!0,get:function(){return i.intersection}}),Object.defineProperty(e,"BasicType",{enumerable:!0,get:function(){return i.BasicType}});var a=wS();Object.defineProperty(e,"VError",{enumerable:!0,get:function(){return a.VError}});function o(){for(var e=[...arguments],r=Object.assign.apply(Object,t([{},n.basicTypes],e)),i={},a=0,o=e;a<o.length;a++)for(var c=o[a],l=0,u=Object.keys(c);l<u.length;l++){var d=u[l];i[d]=new s(r,c[d])}return i}e.createCheckers=o;var s=function(){function e(e,t,r){if(r===void 0&&(r=`value`),this.suite=e,this.ttype=t,this._path=r,this.props=new Map,t instanceof n.TIface)for(var i=0,a=t.props;i<a.length;i++){var o=a[i];this.props.set(o.name,o.ttype)}this.checkerPlain=this.ttype.getChecker(e,!1),this.checkerStrict=this.ttype.getChecker(e,!0)}return e.prototype.setReportedPath=function(e){this._path=e},e.prototype.check=function(e){return this._doCheck(this.checkerPlain,e)},e.prototype.test=function(e){return this.checkerPlain(e,new r.NoopContext)},e.prototype.validate=function(e){return this._doValidate(this.checkerPlain,e)},e.prototype.strictCheck=function(e){return this._doCheck(this.checkerStrict,e)},e.prototype.strictTest=function(e){return this.checkerStrict(e,new r.NoopContext)},e.prototype.strictValidate=function(e){return this._doValidate(this.checkerStrict,e)},e.prototype.getProp=function(t){var n=this.props.get(t);if(!n)throw Error(`Type has no property `+t);return new e(this.suite,n,this._path+`.`+t)},e.prototype.methodArgs=function(t){var n=this._getMethod(t);return new e(this.suite,n.paramList)},e.prototype.methodResult=function(t){var n=this._getMethod(t);return new e(this.suite,n.result)},e.prototype.getArgs=function(){if(!(this.ttype instanceof n.TFunc))throw Error(`getArgs() applied to non-function`);return new e(this.suite,this.ttype.paramList)},e.prototype.getResult=function(){if(!(this.ttype instanceof n.TFunc))throw Error(`getResult() applied to non-function`);return new e(this.suite,this.ttype.result)},e.prototype.getType=function(){return this.ttype},e.prototype._doCheck=function(e,t){if(!e(t,new r.NoopContext)){var n=new r.DetailContext;throw e(t,n),n.getError(this._path)}},e.prototype._doValidate=function(e,t){if(e(t,new r.NoopContext))return null;var n=new r.DetailContext;return e(t,n),n.getErrorDetail(this._path)},e.prototype._getMethod=function(e){var t=this.props.get(e);if(!t)throw Error(`Type has no property `+e);if(!(t instanceof n.TFunc))throw Error(`Property `+e+` is not a method`);return t},e}();e.Checker=s}))()),DS={Transform:ES.union(ES.lit(`jsx`),ES.lit(`typescript`),ES.lit(`flow`),ES.lit(`imports`),ES.lit(`react-hot-loader`),ES.lit(`jest`)),SourceMapOptions:ES.iface([],{compiledFilename:`string`}),Options:ES.iface([],{transforms:ES.array(`Transform`),disableESTransforms:ES.opt(`boolean`),jsxRuntime:ES.opt(ES.union(ES.lit(`classic`),ES.lit(`automatic`),ES.lit(`preserve`))),production:ES.opt(`boolean`),jsxImportSource:ES.opt(`string`),jsxPragma:ES.opt(`string`),jsxFragmentPragma:ES.opt(`string`),keepUnusedImports:ES.opt(`boolean`),preserveDynamicImport:ES.opt(`boolean`),injectCreateRequireForImportRequire:ES.opt(`boolean`),enableLegacyTypeScriptModuleInterop:ES.opt(`boolean`),enableLegacyBabel5ModuleInterop:ES.opt(`boolean`),sourceMapOptions:ES.opt(`SourceMapOptions`),filePath:ES.opt(`string`)})},{Options:OS}=(0,ES.createCheckers)(DS);function kS(e){OS.strictCheck(e)}function AS(){X(),Jw(!1)}function jS(e){X(),FS(e)}function MS(e){$(),PS(e)}function NS(){$(),G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration}function PS(e){let t;t=G.scopeDepth===0?Y.TopLevelDeclaration:e?Y.BlockScopedDeclaration:Y.FunctionScopedDeclaration,G.tokens[G.tokens.length-1].identifierRole=t}function FS(e){switch(G.type){case U._this:{let e=Rb(0);X(),zb(e);return}case U._yield:case U.name:G.type=U.name,MS(e);return;case U.bracketL:X(),IS(U.bracketR,e,!0);return;case U.braceL:wT(!0,e);return;default:yb()}}function IS(e,t,n=!1,r=!1,i=0){let a=!0,o=!1,s=G.tokens.length;for(;!Z(e)&&!G.error;)if(a?a=!1:(J(U.comma),G.tokens[G.tokens.length-1].contextId=i,!o&&G.tokens[s].isType&&(G.tokens[G.tokens.length-1].isType=!0,o=!0)),!(n&&Q(U.comma))){if(Z(e))break;if(Q(U.ellipsis)){jS(t),RS(),Z(U.comma),J(e);break}else LS(r,t)}}function LS(e,t){e&&US([H._public,H._protected,H._private,H._readonly,H._override]),zS(t),RS(),zS(t,!0)}function RS(){ib?KE():rb&&Ow()}function zS(e,t=!1){if(t||FS(e),!Z(U.eq))return;let n=G.tokens.length-1;Jw(),G.tokens[n].rhsEndIndex=G.tokens.length}function BS(){return Q(U.name)}function VS(){return Q(U.name)||!!(G.type&U.IS_KEYWORD)||Q(U.string)||Q(U.num)||Q(U.bigint)||Q(U.decimal)}function HS(){let e=G.snapshot();return X(),(Q(U.bracketL)||Q(U.braceL)||Q(U.star)||Q(U.ellipsis)||Q(U.hash)||VS())&&!hb()?!0:(G.restoreFromSnapshot(e),!1)}function US(e){for(;WS(e)!==null;);}function WS(e){if(!Q(U.name))return null;let t=G.contextualKeyword;if(e.indexOf(t)!==-1&&HS()){switch(t){case H._readonly:G.tokens[G.tokens.length-1].type=U._readonly;break;case H._abstract:G.tokens[G.tokens.length-1].type=U._abstract;break;case H._static:G.tokens[G.tokens.length-1].type=U._static;break;case H._public:G.tokens[G.tokens.length-1].type=U._public;break;case H._private:G.tokens[G.tokens.length-1].type=U._private;break;case H._protected:G.tokens[G.tokens.length-1].type=U._protected;break;case H._override:G.tokens[G.tokens.length-1].type=U._override;break;case H._declare:G.tokens[G.tokens.length-1].type=U._declare;break;default:break}return t}return null}function GS(){for($();Z(U.dot);)$()}function KS(){GS(),!hb()&&Q(U.lessThan)&&sw()}function qS(){X(),FC()}function JS(){X()}function YS(){J(U._typeof),Q(U._import)?XS():GS(),!hb()&&Q(U.lessThan)&&sw()}function XS(){J(U._import),J(U.parenL),J(U.string),J(U.parenR),Z(U.dot)&&GS(),Q(U.lessThan)&&sw()}function ZS(){Z(U._const);let e=Z(U._in),t=fb(H._out);Z(U._const),(e||t)&&!Q(U.name)?G.tokens[G.tokens.length-1].type=U.name:$(),Z(U._extends)&&IC(),Z(U.eq)&&IC()}function QS(){Q(U.lessThan)&&$S()}function $S(){let e=Rb(0);for(Q(U.lessThan)||Q(U.typeParameterStart)?X():yb();!Z(U.greaterThan)&&!G.error;)ZS(),Z(U.comma);zb(e)}function eC(e){let t=e===U.arrow;QS(),J(U.parenL),G.scopeDepth++,tC(!1),G.scopeDepth--,(t||Q(e))&&AC(e)}function tC(e){IS(U.parenR,e)}function nC(){Z(U.comma)||vb()}function rC(){eC(U.colon),nC()}function iC(){let e=G.snapshot();X();let t=Z(U.name)&&Q(U.colon);return G.restoreFromSnapshot(e),t}function aC(){if(!(Q(U.bracketL)&&iC()))return!1;let e=Rb(0);return J(U.bracketL),$(),FC(),J(U.bracketR),MC(),nC(),zb(e),!0}function oC(e){Z(U.question),!e&&(Q(U.parenL)||Q(U.lessThan))?(eC(U.colon),nC()):(MC(),nC())}function sC(){if(Q(U.parenL)||Q(U.lessThan)){rC();return}if(Q(U._new)){X(),Q(U.parenL)||Q(U.lessThan)?rC():oC(!1);return}let e=!!WS([H._readonly]);aC()||((q(H._get)||q(H._set))&&HS(),kT(-1),oC(e))}function cC(){lC()}function lC(){for(J(U.braceL);!Z(U.braceR)&&!G.error;)sC()}function uC(){let e=G.snapshot(),t=dC();return G.restoreFromSnapshot(e),t}function dC(){return X(),Z(U.plus)||Z(U.minus)?q(H._readonly):(q(H._readonly)&&X(),!Q(U.bracketL)||(X(),!BS())?!1:(X(),Q(U._in)))}function fC(){$(),J(U._in),IC()}function pC(){J(U.braceL),Q(U.plus)||Q(U.minus)?(X(),pb(H._readonly)):fb(H._readonly),J(U.bracketL),fC(),fb(H._as)&&IC(),J(U.bracketR),Q(U.plus)||Q(U.minus)?(X(),J(U.question)):Z(U.question),NC(),vb(),J(U.braceR)}function mC(){for(J(U.bracketL);!Z(U.bracketR)&&!G.error;)hC(),Z(U.comma)}function hC(){Z(U.ellipsis)?IC():(IC(),Z(U.question)),Z(U.colon)&&IC()}function gC(){J(U.parenL),IC(),J(U.parenR)}function _C(){for(Ib(),Ib();!Q(U.backQuote)&&!G.error;)J(U.dollarBraceL),IC(),Ib(),Ib();X()}var vC;(function(e){e[e.TSFunctionType=0]=`TSFunctionType`,e[e.TSConstructorType=1]=`TSConstructorType`,e[e.TSAbstractConstructorType=2]=`TSAbstractConstructorType`})(vC||={});function yC(e){e===vC.TSAbstractConstructorType&&pb(H._abstract),(e===vC.TSConstructorType||e===vC.TSAbstractConstructorType)&&J(U._new);let t=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!1,eC(U.arrow),G.inDisallowConditionalTypesContext=t}function bC(){switch(G.type){case U.name:KS();return;case U._void:case U._null:X();return;case U.string:case U.num:case U.bigint:case U.decimal:case U._true:case U._false:hT();return;case U.minus:X(),hT();return;case U._this:JS(),q(H._is)&&!hb()&&qS();return;case U._typeof:YS();return;case U._import:XS();return;case U.braceL:uC()?pC():cC();return;case U.bracketL:mC();return;case U.parenL:gC();return;case U.backQuote:_C();return;default:if(G.type&U.IS_KEYWORD){X(),G.tokens[G.tokens.length-1].type=U.name;return}break}yb()}function xC(){for(bC();!hb()&&Z(U.bracketL);)Z(U.bracketR)||(IC(),J(U.bracketR))}function SC(){if(pb(H._infer),$(),Q(U._extends)){let e=G.snapshot();J(U._extends);let t=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!0,IC(),G.inDisallowConditionalTypesContext=t,(G.error||!G.inDisallowConditionalTypesContext&&Q(U.question))&&G.restoreFromSnapshot(e)}}function CC(){if(q(H._keyof)||q(H._unique)||q(H._readonly))X(),CC();else if(q(H._infer))SC();else{let e=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!1,xC(),G.inDisallowConditionalTypesContext=e}}function wC(){if(Z(U.bitwiseAND),CC(),Q(U.bitwiseAND))for(;Z(U.bitwiseAND);)CC()}function TC(){if(Z(U.bitwiseOR),wC(),Q(U.bitwiseOR))for(;Z(U.bitwiseOR);)wC()}function EC(){return Q(U.lessThan)?!0:Q(U.parenL)&&OC()}function DC(){if(Q(U.name)||Q(U._this))return X(),!0;if(Q(U.braceL)||Q(U.bracketL)){let e=1;for(X();e>0&&!G.error;)Q(U.braceL)||Q(U.bracketL)?e++:(Q(U.braceR)||Q(U.bracketR))&&e--,X();return!0}return!1}function OC(){let e=G.snapshot(),t=kC();return G.restoreFromSnapshot(e),t}function kC(){return X(),!!(Q(U.parenR)||Q(U.ellipsis)||DC()&&(Q(U.colon)||Q(U.comma)||Q(U.question)||Q(U.eq)||Q(U.parenR)&&(X(),Q(U.arrow))))}function AC(e){let t=Rb(0);J(e),PC()||IC(),zb(t)}function jC(){Q(U.colon)&&AC(U.colon)}function MC(){Q(U.colon)&&FC()}function NC(){Z(U.colon)&&IC()}function PC(){let e=G.snapshot();return q(H._asserts)?(X(),fb(H._is)?(IC(),!0):BS()||Q(U._this)?(X(),fb(H._is)&&IC(),!0):(G.restoreFromSnapshot(e),!1)):BS()||Q(U._this)?(X(),q(H._is)&&!hb()?(X(),IC(),!0):(G.restoreFromSnapshot(e),!1)):!1}function FC(){let e=Rb(0);J(U.colon),IC(),zb(e)}function IC(){if(RC(),G.inDisallowConditionalTypesContext||hb()||!Z(U._extends))return;let e=G.inDisallowConditionalTypesContext;G.inDisallowConditionalTypesContext=!0,RC(),G.inDisallowConditionalTypesContext=e,J(U.question),IC(),J(U.colon),IC()}function LC(){return q(H._abstract)&&Vb()===U._new}function RC(){if(EC()){yC(vC.TSFunctionType);return}if(Q(U._new)){yC(vC.TSConstructorType);return}else if(LC()){yC(vC.TSAbstractConstructorType);return}TC()}function zC(){let e=Rb(1);IC(),J(U.greaterThan),zb(e),tT()}function BC(){if(Z(U.jsxTagStart)){G.tokens[G.tokens.length-1].type=U.typeParameterStart;let e=Rb(1);for(;!Q(U.greaterThan)&&!G.error;)IC(),Z(U.comma);Hw(),zb(e)}}function VC(){for(;!Q(U.braceL)&&!G.error;)HC(),Z(U.comma)}function HC(){GS(),Q(U.lessThan)&&sw()}function UC(){MS(!1),QS(),Z(U._extends)&&VC(),lC()}function WC(){MS(!1),QS(),J(U.eq),IC(),vb()}function GC(){if(Q(U.string)?hT():$(),Z(U.eq)){let e=G.tokens.length-1;Jw(),G.tokens[e].rhsEndIndex=G.tokens.length}}function KC(){for(MS(!1),J(U.braceL);!Z(U.braceR)&&!G.error;)GC(),Z(U.comma)}function qC(){J(U.braceL),ND(U.braceR)}function JC(){MS(!1),Z(U.dot)?JC():qC()}function YC(){q(H._global)?$():Q(U.string)?fT():yb(),Q(U.braceL)?qC():vb()}function XC(){NS(),J(U.eq),QC(),vb()}function ZC(){return q(H._require)&&Vb()===U.parenL}function QC(){ZC()?$C():GS()}function $C(){pb(H._require),J(U.parenL),Q(U.string)||yb(),hT(),J(U.parenR)}function ew(){if(_b())return!1;switch(G.type){case U._function:{let e=Rb(1);X();let t=G.start;return RD(t,!0),zb(e),!0}case U._class:{let e=Rb(1);return BD(!0,!1),zb(e),!0}case U._const:if(Q(U._const)&&db(H._enum)){let e=Rb(1);return J(U._const),pb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,KC(),zb(e),!0}case U._var:case U._let:{let e=Rb(1);return DD(G.type!==U._var),zb(e),!0}case U.name:{let e=Rb(1),t=G.contextualKeyword,n=!1;return t===H._global?(YC(),n=!0):n=rw(t,!0),zb(e),n}default:return!1}}function tw(){return rw(G.contextualKeyword,!0)}function nw(e){switch(e){case H._declare:{let e=G.tokens.length-1;if(ew())return G.tokens[e].type=U._declare,!0;break}case H._global:if(Q(U.braceL))return qC(),!0;break;default:return rw(e,!1)}return!1}function rw(e,t){switch(e){case H._abstract:if(iw(t)&&Q(U._class))return G.tokens[G.tokens.length-1].type=U._abstract,BD(!0,!1),!0;break;case H._enum:if(iw(t)&&Q(U.name))return G.tokens[G.tokens.length-1].type=U._enum,KC(),!0;break;case H._interface:if(iw(t)&&Q(U.name)){let e=Rb(t?2:1);return UC(),zb(e),!0}break;case H._module:if(iw(t)){if(Q(U.string)){let e=Rb(t?2:1);return YC(),zb(e),!0}else if(Q(U.name)){let e=Rb(t?2:1);return JC(),zb(e),!0}}break;case H._namespace:if(iw(t)&&Q(U.name)){let e=Rb(t?2:1);return JC(),zb(e),!0}break;case H._type:if(iw(t)&&Q(U.name)){let e=Rb(t?2:1);return WC(),zb(e),!0}break;default:break}return!1}function iw(e){return e?(X(),!0):!_b()}function aw(){let e=G.snapshot();return $S(),zD(),jC(),J(U.arrow),G.error?(G.restoreFromSnapshot(e),!1):(NT(!0),!0)}function ow(){G.type===U.bitShiftL&&(--G.pos,Qb(U.lessThan)),sw()}function sw(){let e=Rb(0);for(J(U.lessThan);!Q(U.greaterThan)&&!G.error;)IC(),Z(U.comma);e?(J(U.greaterThan),zb(e)):(zb(e),sx(),J(U.greaterThan),G.tokens[G.tokens.length-1].isType=!0)}function cw(){if(Q(U.name))switch(G.contextualKeyword){case H._abstract:case H._declare:case H._enum:case H._interface:case H._module:case H._namespace:case H._type:return!0;default:break}return!1}function lw(e,t){if(Q(U.colon)&&AC(U.colon),!Q(U.braceL)&&_b()){let t=G.tokens.length-1;for(;t>=0&&(G.tokens[t].start>=e||G.tokens[t].type===U._default||G.tokens[t].type===U._export);)G.tokens[t].isType=!0,t--;return}NT(!1,t)}function uw(e,t,n){if(!hb()&&Z(U.bang)){G.tokens[G.tokens.length-1].type=U.nonNullAssertion;return}if(Q(U.lessThan)||Q(U.bitShiftL)){let n=G.snapshot();if(!t&&sT()&&aw())return;if(ow(),!t&&Z(U.parenL)?(G.tokens[G.tokens.length-1].subscriptStartIndex=e,cT()):Q(U.backQuote)?CT():(G.type===U.greaterThan||G.type!==U.parenL&&G.type&U.IS_EXPRESSION_START&&!hb())&&yb(),G.error)G.restoreFromSnapshot(n);else return}else!t&&Q(U.questionDot)&&Vb()===U.lessThan&&(X(),G.tokens[e].isOptionalChainStart=!0,G.tokens[G.tokens.length-1].subscriptStartIndex=e,sw(),J(U.parenL),cT());oT(e,t,n)}function dw(){if(Z(U._import))return q(H._type)&&Vb()!==U.eq&&pb(H._type),XC(),!0;if(Z(U.eq))return qw(),vb(),!0;if(fb(H._as))return pb(H._namespace),$(),vb(),!0;if(q(H._type)){let e=Vb();(e===U.braceL||e===U.star)&&X()}return!1}function fw(){if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-3].identifierRole=Y.ImportAccess,G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration;return}$(),G.tokens[G.tokens.length-3].identifierRole=Y.ImportAccess,G.tokens[G.tokens.length-1].identifierRole=Y.ImportDeclaration,G.tokens[G.tokens.length-4].isType=!0,G.tokens[G.tokens.length-3].isType=!0,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0}function pw(){if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0;return}if($(),Q(U.comma)||Q(U.braceR)){G.tokens[G.tokens.length-3].identifierRole=Y.ExportAccess;return}$(),G.tokens[G.tokens.length-3].identifierRole=Y.ExportAccess,G.tokens[G.tokens.length-4].isType=!0,G.tokens[G.tokens.length-3].isType=!0,G.tokens[G.tokens.length-2].isType=!0,G.tokens[G.tokens.length-1].isType=!0}function mw(){if(q(H._abstract)&&Vb()===U._class)return G.type=U._abstract,X(),BD(!0,!0),!0;if(q(H._interface)){let e=Rb(2);return rw(H._interface,!0),zb(e),!0}return!1}function hw(){if(G.type===U._const){let e=Ub();if(e.type===U.name&&e.contextualKeyword===H._enum)return J(U._const),pb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,KC(),!0}return!1}function gw(e){let t=G.tokens.length;US([H._abstract,H._readonly,H._declare,H._static,H._override]);let n=G.tokens.length;if(aC()){let r=e?t-1:t;for(let e=r;e<n;e++)G.tokens[e].isType=!0;return!0}return!1}function _w(e){nw(e)||vb()}function vw(){let e=fb(H._declare);e&&(G.tokens[G.tokens.length-1].type=U._declare);let t=!1;if(Q(U.name))if(e){let e=Rb(2);t=tw(),zb(e)}else t=tw();if(!t)if(e){let e=Rb(2);sD(!0),zb(e)}else sD(!0)}function yw(e){if(e&&(Q(U.lessThan)||Q(U.bitShiftL))&&ow(),fb(H._implements)){G.tokens[G.tokens.length-1].type=U._implements;let e=Rb(1);VC(),zb(e)}}function bw(){QS()}function xw(){QS()}function Sw(){let e=Rb(0);hb()||Z(U.bang),MC(),zb(e)}function Cw(){Q(U.colon)&&FC()}function ww(e,t){return nb?Tw(e,t):Ew(e,t)}function Tw(e,t){if(!Q(U.lessThan))return Yw(e,t);let n=G.snapshot(),r=Yw(e,t);if(G.error)G.restoreFromSnapshot(n);else return r;return G.type=U.typeParameterStart,$S(),r=Yw(e,t),r||yb(),r}function Ew(e,t){if(!Q(U.lessThan))return Yw(e,t);let n=G.snapshot();$S();let r=Yw(e,t);if(r||yb(),G.error)G.restoreFromSnapshot(n);else return r;return Yw(e,t)}function Dw(){if(Q(U.colon)){let e=G.snapshot();AC(U.colon),mb()&&yb(),Q(U.arrow)||yb(),G.error&&G.restoreFromSnapshot(e)}return Z(U.arrow)}function Ow(){let e=Rb(0);Z(U.question),MC(),zb(e)}function kw(){(Q(U.lessThan)||Q(U.bitShiftL))&&ow(),pD()}function Aw(){let e=!1,t=!1;for(;;){if(G.pos>=K.length){yb(`Unterminated JSX contents`);return}let n=K.charCodeAt(G.pos);if(n===W.lessThan||n===W.leftCurlyBrace){if(G.pos===G.start){if(n===W.lessThan){G.pos++,Qb(U.jsxTagStart);return}ux(n);return}Qb(e&&!t?U.jsxEmptyText:U.jsxText);return}n===W.lineFeed?e=!0:n!==W.space&&n!==W.carriageReturn&&n!==W.tab&&(t=!0),G.pos++}}function jw(e){for(G.pos++;;){if(G.pos>=K.length){yb(`Unterminated string constant`);return}if(K.charCodeAt(G.pos)===e){G.pos++;break}G.pos++}Qb(U.string)}function Mw(){let e;do{if(G.pos>K.length){yb(`Unexpectedly reached the end of input.`);return}e=K.charCodeAt(++G.pos)}while(wb[e]||e===W.dash);Qb(U.jsxName)}function Nw(){Hw()}function Pw(e){if(Nw(),!Z(U.colon)){G.tokens[G.tokens.length-1].identifierRole=e;return}Nw()}function Fw(){let e=G.tokens.length;Pw(Y.Access);let t=!1;for(;Q(U.dot);)t=!0,Hw(),Nw();if(!t){let t=G.tokens[e],n=K.charCodeAt(t.start);n>=W.lowercaseA&&n<=W.lowercaseZ&&(t.identifierRole=null)}}function Iw(){switch(G.type){case U.braceL:X(),qw(),Hw();return;case U.jsxTagStart:Vw(),Hw();return;case U.string:Hw();return;default:yb(`JSX value should be either an expression or a quoted JSX text`)}}function Lw(){J(U.ellipsis),qw()}function Rw(e){if(Q(U.jsxTagEnd))return!1;Fw(),rb&&BC();let t=!1;for(;!Q(U.slash)&&!Q(U.jsxTagEnd)&&!G.error;){if(Z(U.braceL)){t=!0,J(U.ellipsis),Jw(),Hw();continue}t&&G.end-G.start===3&&K.charCodeAt(G.start)===W.lowercaseK&&K.charCodeAt(G.start+1)===W.lowercaseE&&K.charCodeAt(G.start+2)===W.lowercaseY&&(G.tokens[e].jsxRole=Ob.KeyAfterPropSpread),Pw(Y.ObjectKey),Q(U.eq)&&(Hw(),Iw())}let n=Q(U.slash);return n&&Hw(),n}function zw(){Q(U.jsxTagEnd)||Fw()}function Bw(){let e=G.tokens.length-1;G.tokens[e].jsxRole=Ob.NoChildren;let t=0;if(!Rw(e))for(Uw();;)switch(G.type){case U.jsxTagStart:if(Hw(),Q(U.slash)){Hw(),zw(),G.tokens[e].jsxRole!==Ob.KeyAfterPropSpread&&(t===1?G.tokens[e].jsxRole=Ob.OneChild:t>1&&(G.tokens[e].jsxRole=Ob.StaticChildren));return}t++,Bw(),Uw();break;case U.jsxText:t++,Uw();break;case U.jsxEmptyText:Uw();break;case U.braceL:X(),Q(U.ellipsis)?(Lw(),Uw(),t+=2):(Q(U.braceR)||(t++,qw()),Uw());break;default:yb();return}}function Vw(){Hw(),Bw()}function Hw(){G.tokens.push(new Fb),Zb(),G.start=G.pos;let e=K.charCodeAt(G.pos);if(Tb[e])Mw();else if(e===W.quotationMark||e===W.apostrophe)jw(e);else switch(++G.pos,e){case W.greaterThan:Qb(U.jsxTagEnd);break;case W.lessThan:Qb(U.jsxTagStart);break;case W.slash:Qb(U.slash);break;case W.equalsTo:Qb(U.eq);break;case W.leftCurlyBrace:Qb(U.braceL);break;case W.dot:Qb(U.dot);break;case W.colon:Qb(U.colon);break;default:yb()}}function Uw(){G.tokens.push(new Fb),G.start=G.pos,Aw()}function Ww(e){if(Q(U.question)){let e=Vb();if(e===U.colon||e===U.comma||e===U.parenR)return}Qw(e)}function Gw(){Bb(U.question),Q(U.colon)&&(rb?FC():ib&&AE())}var Kw=class{constructor(e){this.stop=e}};function qw(e=!1){if(Jw(e),Q(U.comma))for(;Z(U.comma);)Jw(e)}function Jw(e=!1,t=!1){return rb?ww(e,t):ib?QE(e,t):Yw(e,t)}function Yw(e,t){if(Q(U._yield))return LT(),!1;(Q(U.parenL)||Q(U.name)||Q(U._yield))&&(G.potentialArrowAt=G.start);let n=Xw(e);return t&&bT(),G.type&U.IS_ASSIGN?(X(),Jw(e),!1):n}function Xw(e){return $w(e)?!0:(Zw(e),!1)}function Zw(e){rb||ib?Ww(e):Qw(e)}function Qw(e){Z(U.question)&&(Jw(),J(U.colon),Jw(e))}function $w(e){let t=G.tokens.length;return tT()?!0:(eT(t,-1,e),!1)}function eT(e,t,n){if(rb&&(U._in&U.PRECEDENCE_MASK)>t&&!hb()&&(fb(H._as)||fb(H._satisfies))){let r=Rb(1);IC(),zb(r),sx(),eT(e,t,n);return}let r=G.type&U.PRECEDENCE_MASK;if(r>0&&(!n||!Q(U._in))&&r>t){let i=G.type;X(),i===U.nullishCoalescing&&(G.tokens[G.tokens.length-1].nullishStartIndex=e);let a=G.tokens.length;tT(),eT(a,i&U.IS_RIGHT_ASSOCIATIVE?r-1:r,n),i===U.nullishCoalescing&&(G.tokens[e].numNullishCoalesceStarts++,G.tokens[G.tokens.length-1].numNullishCoalesceEnds++),eT(e,t,n)}}function tT(){if(rb&&!nb&&Z(U.lessThan))return zC(),!1;if(q(H._module)&&Kb()===W.leftCurlyBrace&&!gb())return RT(),!1;if(G.type&U.IS_PREFIX)return X(),tT(),!1;if(nT())return!0;for(;G.type&U.IS_POSTFIX&&!mb();)G.type===U.preIncDec&&(G.type=U.postIncDec),X();return!1}function nT(){let e=G.tokens.length;return fT()?!0:(rT(e),G.tokens.length>e&&G.tokens[e].isOptionalChainStart&&(G.tokens[G.tokens.length-1].isOptionalChainEnd=!0),!1)}function rT(e,t=!1){ib?eD(e,t):iT(e,t)}function iT(e,t=!1){let n=new Kw(!1);do aT(e,t,n);while(!n.stop&&!G.error)}function aT(e,t,n){rb?uw(e,t,n):ib?PE(e,t,n):oT(e,t,n)}function oT(e,t,n){if(!t&&Z(U.doubleColon))dT(),n.stop=!0,rT(e,t);else if(Q(U.questionDot)){if(G.tokens[e].isOptionalChainStart=!0,t&&Vb()===U.parenL){n.stop=!0;return}X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e,Z(U.bracketL)?(qw(),J(U.bracketR)):Z(U.parenL)?cT():pT()}else if(Z(U.dot))G.tokens[G.tokens.length-1].subscriptStartIndex=e,pT();else if(Z(U.bracketL))G.tokens[G.tokens.length-1].subscriptStartIndex=e,qw(),J(U.bracketR);else if(!t&&Q(U.parenL))if(sT()){let t=G.snapshot(),r=G.tokens.length;X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e;let i=ob();G.tokens[G.tokens.length-1].contextId=i,cT(),G.tokens[G.tokens.length-1].contextId=i,lT()&&(G.restoreFromSnapshot(t),n.stop=!0,G.scopeDepth++,zD(),uT(r))}else{X(),G.tokens[G.tokens.length-1].subscriptStartIndex=e;let t=ob();G.tokens[G.tokens.length-1].contextId=t,cT(),G.tokens[G.tokens.length-1].contextId=t}else Q(U.backQuote)?CT():n.stop=!0}function sT(){return G.tokens[G.tokens.length-1].contextualKeyword===H._async&&!mb()}function cT(){let e=!0;for(;!Z(U.parenR)&&!G.error;){if(e)e=!1;else if(J(U.comma),Z(U.parenR))break;FT(!1)}}function lT(){return Q(U.colon)||Q(U.arrow)}function uT(e){rb?Cw():ib&&ZE(),J(U.arrow),jT(e)}function dT(){let e=G.tokens.length;fT(),rT(e,!0)}function fT(){if(Z(U.modulo))return $(),!1;if(Q(U.jsxText)||Q(U.jsxEmptyText))return hT(),!1;if(Q(U.lessThan)&&nb)return G.type=U.jsxTagStart,Vw(),X(),!1;let e=G.potentialArrowAt===G.start;switch(G.type){case U.slash:case U.assign:Lb();case U._super:case U._this:case U.regexp:case U.num:case U.bigint:case U.decimal:case U.string:case U._null:case U._true:case U._false:return X(),!1;case U._import:return X(),Q(U.dot)&&(G.tokens[G.tokens.length-1].type=U.name,X(),$()),!1;case U.name:{let t=G.tokens.length,n=G.start,r=G.contextualKeyword;return $(),r===H._await?(IT(),!1):r===H._async&&Q(U._function)&&!mb()?(X(),RD(n,!1),!1):e&&r===H._async&&!mb()&&Q(U.name)?(G.scopeDepth++,MS(!1),J(U.arrow),jT(t),!0):Q(U._do)&&!mb()?(X(),MD(),!1):e&&!mb()&&Q(U.arrow)?(G.scopeDepth++,PS(!1),J(U.arrow),jT(t),!0):(G.tokens[G.tokens.length-1].identifierRole=Y.Access,!1)}case U._do:return X(),MD(),!1;case U.parenL:return _T(e);case U.bracketL:return X(),PT(U.bracketR,!0),!1;case U.braceL:return wT(!1,!1),!1;case U._function:return mT(),!1;case U.at:uD();case U._class:return BD(!1),!1;case U._new:return xT(),!1;case U.backQuote:return CT(),!1;case U.doubleColon:return X(),dT(),!1;case U.hash:{let e=Kb();return Tb[e]||e===W.backslash?pT():X(),!1}default:return yb(),!1}}function pT(){Z(U.hash),$()}function mT(){let e=G.start;$(),Z(U.dot)&&$(),RD(e,!1)}function hT(){X()}function gT(){J(U.parenL),qw(),J(U.parenR)}function _T(e){let t=G.snapshot(),n=G.tokens.length;J(U.parenL);let r=!0;for(;!Q(U.parenR)&&!G.error;){if(r)r=!1;else if(J(U.comma),Q(U.parenR))break;if(Q(U.ellipsis)){jS(!1),bT();break}else Jw(!1,!0)}return J(U.parenR),e&&vT()&&yT()?(G.restoreFromSnapshot(t),G.scopeDepth++,zD(),yT(),jT(n),G.error?(G.restoreFromSnapshot(t),_T(!1),!1):!0):!1}function vT(){return Q(U.colon)||!mb()}function yT(){return rb?Dw():ib?$E():Z(U.arrow)}function bT(){(rb||ib)&&Gw()}function xT(){if(J(U._new),Z(U.dot)){$();return}ST(),ib&&FE(),Z(U.parenL)&&PT(U.parenR)}function ST(){dT(),Z(U.questionDot)}function CT(){for(Ib(),Ib();!Q(U.backQuote)&&!G.error;)J(U.dollarBraceL),qw(),Ib(),Ib();X()}function wT(e,t){let n=ob(),r=!0;for(X(),G.tokens[G.tokens.length-1].contextId=n;!Z(U.braceR)&&!G.error;){if(r)r=!1;else if(J(U.comma),Z(U.braceR))break;let i=!1;if(Q(U.ellipsis)){let n=G.tokens.length;if(AS(),e&&(G.tokens.length===n+2&&PS(t),Z(U.braceR)))break;continue}e||(i=Z(U.star)),!e&&q(H._async)?(i&&yb(),$(),Q(U.colon)||Q(U.parenL)||Q(U.braceR)||Q(U.eq)||Q(U.comma)||(Q(U.star)&&(X(),i=!0),kT(n))):kT(n),OT(e,t,n)}G.tokens[G.tokens.length-1].contextId=n}function TT(e){return!e&&(Q(U.string)||Q(U.num)||Q(U.bracketL)||Q(U.name)||!!(G.type&U.IS_KEYWORD))}function ET(e,t){let n=G.start;return Q(U.parenL)?(e&&yb(),AT(n,!1),!0):TT(e)?(kT(t),AT(n,!1),!0):!1}function DT(e,t){if(Z(U.colon)){e?zS(t):Jw(!1);return}let n;n=e?G.scopeDepth===0?Y.ObjectShorthandTopLevelDeclaration:t?Y.ObjectShorthandBlockScopedDeclaration:Y.ObjectShorthandFunctionScopedDeclaration:Y.ObjectShorthand,G.tokens[G.tokens.length-1].identifierRole=n,zS(t,!0)}function OT(e,t,n){rb?bw():ib&&GE(),ET(e,n)||DT(e,t)}function kT(e){ib&&ME(),Z(U.bracketL)?(G.tokens[G.tokens.length-1].contextId=e,Jw(),J(U.bracketR),G.tokens[G.tokens.length-1].contextId=e):(Q(U.num)||Q(U.string)||Q(U.bigint)||Q(U.decimal)?fT():pT(),G.tokens[G.tokens.length-1].identifierRole=Y.ObjectKey,G.tokens[G.tokens.length-1].contextId=e)}function AT(e,t){let n=ob();G.scopeDepth++;let r=G.tokens.length;zD(t,n),MT(e,n);let i=G.tokens.length;G.scopes.push(new $y(r,i,!0)),G.scopeDepth--}function jT(e){NT(!0);let t=G.tokens.length;G.scopes.push(new $y(e,t,!0)),G.scopeDepth--}function MT(e,t=0){rb?lw(e,t):ib?NE(t):NT(!1,t)}function NT(e,t=0){e&&!Q(U.braceL)?Jw():MD(!0,t)}function PT(e,t=!1){let n=!0;for(;!Z(e)&&!G.error;){if(n)n=!1;else if(J(U.comma),Z(e))break;FT(t)}}function FT(e){e&&Q(U.comma)||(Q(U.ellipsis)?(AS(),bT()):Q(U.question)?X():Jw(!1,!0))}function $(){X(),G.tokens[G.tokens.length-1].type=U.name}function IT(){tT()}function LT(){X(),!Q(U.semi)&&!mb()&&(Z(U.star),Jw())}function RT(){pb(H._module),J(U.braceL),ND(U.braceR)}function zT(e){return(e.type===U.name||!!(e.type&U.IS_KEYWORD))&&e.contextualKeyword!==H._from}function BT(e){let t=Rb(0);J(e||U.colon),kE(),zb(t)}function VT(){J(U.modulo),pb(H._checks),Z(U.parenL)&&(qw(),J(U.parenR))}function HT(){let e=Rb(0);J(U.colon),Q(U.modulo)?VT():(kE(),Q(U.modulo)&&VT()),zb(e)}function UT(){X(),$T(!0)}function WT(){X(),$(),Q(U.lessThan)&&oE(),J(U.parenL),SE(),J(U.parenR),HT(),vb()}function GT(){Q(U._class)?UT():Q(U._function)?WT():Q(U._var)?KT():fb(H._module)?Z(U.dot)?YT():qT():q(H._type)?XT():q(H._opaque)?ZT():q(H._interface)?QT():Q(U._export)?JT():yb()}function KT(){X(),jE(),vb()}function qT(){for(Q(U.string)?fT():$(),J(U.braceL);!Q(U.braceR)&&!G.error;)Q(U._import)?(X(),pO()):yb();J(U.braceR)}function JT(){J(U._export),Z(U._default)?Q(U._function)||Q(U._class)?GT():(kE(),vb()):Q(U._var)||Q(U._function)||Q(U._class)||q(H._opaque)?GT():Q(U.star)||Q(U.braceL)||q(H._interface)||q(H._type)||q(H._opaque)?QD():yb()}function YT(){pb(H._exports),AE(),vb()}function XT(){X(),rE()}function ZT(){X(),iE(!0)}function QT(){X(),$T()}function $T(e=!1){if(nE(),Q(U.lessThan)&&oE(),Z(U._extends))do eE();while(!e&&Z(U.comma));if(q(H._mixins)){X();do eE();while(Z(U.comma))}if(q(H._implements)){X();do eE();while(Z(U.comma))}mE(e,!1,e)}function eE(){_E(!1),Q(U.lessThan)&&sE()}function tE(){$T()}function nE(){$()}function rE(){nE(),Q(U.lessThan)&&oE(),BT(U.eq),vb()}function iE(e){pb(H._type),nE(),Q(U.lessThan)&&oE(),Q(U.colon)&&BT(U.colon),e||BT(U.eq),vb()}function aE(){ME(),jE(),Z(U.eq)&&kE()}function oE(){let e=Rb(0);Q(U.lessThan)||Q(U.typeParameterStart)?X():yb();do aE(),Q(U.greaterThan)||J(U.comma);while(!Q(U.greaterThan)&&!G.error);J(U.greaterThan),zb(e)}function sE(){let e=Rb(0);for(J(U.lessThan);!Q(U.greaterThan)&&!G.error;)kE(),Q(U.greaterThan)||J(U.comma);J(U.greaterThan),zb(e)}function cE(){if(pb(H._interface),Z(U._extends))do eE();while(Z(U.comma));mE(!1,!1,!1)}function lE(){Q(U.num)||Q(U.string)?fT():$()}function uE(){Vb()===U.colon?(lE(),BT()):kE(),J(U.bracketR),BT()}function dE(){lE(),J(U.bracketR),J(U.bracketR),Q(U.lessThan)||Q(U.parenL)?fE():(Z(U.question),BT())}function fE(){for(Q(U.lessThan)&&oE(),J(U.parenL);!Q(U.parenR)&&!Q(U.ellipsis)&&!G.error;)xE(),Q(U.parenR)||J(U.comma);Z(U.ellipsis)&&xE(),J(U.parenR),BT()}function pE(){fE()}function mE(e,t,n){let r;for(t&&Q(U.braceBarL)?(J(U.braceBarL),r=U.braceBarR):(J(U.braceL),r=U.braceR);!Q(r)&&!G.error;){if(n&&q(H._proto)){let t=Vb();t!==U.colon&&t!==U.question&&(X(),e=!1)}if(e&&q(H._static)){let e=Vb();e!==U.colon&&e!==U.question&&X()}if(ME(),Z(U.bracketL))Z(U.bracketL)?dE():uE();else if(Q(U.parenL)||Q(U.lessThan))pE();else{if(q(H._get)||q(H._set)){let e=Vb();(e===U.name||e===U.string||e===U.num)&&X()}hE()}gE()}J(r)}function hE(){if(Q(U.ellipsis)){if(J(U.ellipsis),Z(U.comma)||Z(U.semi),Q(U.braceR))return;kE()}else lE(),Q(U.lessThan)||Q(U.parenL)?fE():(Z(U.question),BT())}function gE(){!Z(U.semi)&&!Z(U.comma)&&!Q(U.braceR)&&!Q(U.braceBarR)&&yb()}function _E(e){for(e||$();Z(U.dot);)$()}function vE(){_E(!0),Q(U.lessThan)&&sE()}function yE(){J(U._typeof),CE()}function bE(){for(J(U.bracketL);G.pos<K.length&&!Q(U.bracketR)&&(kE(),!Q(U.bracketR));)J(U.comma);J(U.bracketR)}function xE(){let e=Vb();e===U.colon||e===U.question?($(),Z(U.question),BT()):kE()}function SE(){for(;!Q(U.parenR)&&!Q(U.ellipsis)&&!G.error;)xE(),Q(U.parenR)||J(U.comma);Z(U.ellipsis)&&xE()}function CE(){let e=!1,t=G.noAnonFunctionType;switch(G.type){case U.name:if(q(H._interface)){cE();return}$(),vE();return;case U.braceL:mE(!1,!1,!1);return;case U.braceBarL:mE(!1,!0,!1);return;case U.bracketL:bE();return;case U.lessThan:oE(),J(U.parenL),SE(),J(U.parenR),J(U.arrow),kE();return;case U.parenL:if(X(),!Q(U.parenR)&&!Q(U.ellipsis))if(Q(U.name)){let t=Vb();e=t!==U.question&&t!==U.colon}else e=!0;if(e)if(G.noAnonFunctionType=!1,kE(),G.noAnonFunctionType=t,G.noAnonFunctionType||!(Q(U.comma)||Q(U.parenR)&&Vb()===U.arrow)){J(U.parenR);return}else Z(U.comma);SE(),J(U.parenR),J(U.arrow),kE();return;case U.minus:X(),hT();return;case U.string:case U.num:case U._true:case U._false:case U._null:case U._this:case U._void:case U.star:X();return;default:if(G.type===U._typeof){yE();return}else if(G.type&U.IS_KEYWORD){X(),G.tokens[G.tokens.length-1].type=U.name;return}}yb()}function wE(){for(CE();!mb()&&(Q(U.bracketL)||Q(U.questionDot));)Z(U.questionDot),J(U.bracketL),Z(U.bracketR)||(kE(),J(U.bracketR))}function TE(){Z(U.question)?TE():wE()}function EE(){TE(),!G.noAnonFunctionType&&Z(U.arrow)&&kE()}function DE(){for(Z(U.bitwiseAND),EE();Z(U.bitwiseAND);)EE()}function OE(){for(Z(U.bitwiseOR),DE();Z(U.bitwiseOR);)DE()}function kE(){OE()}function AE(){BT()}function jE(){$(),Q(U.colon)&&AE()}function ME(){(Q(U.plus)||Q(U.minus))&&(X(),G.tokens[G.tokens.length-1].isType=!0)}function NE(e){Q(U.colon)&&HT(),NT(!1,e)}function PE(e,t,n){if(Q(U.questionDot)&&Vb()===U.lessThan){if(t){n.stop=!0;return}X(),sE(),J(U.parenL),cT();return}else if(!t&&Q(U.lessThan)){let e=G.snapshot();if(sE(),J(U.parenL),cT(),G.error)G.restoreFromSnapshot(e);else return}oT(e,t,n)}function FE(){if(Q(U.lessThan)){let e=G.snapshot();sE(),G.error&&G.restoreFromSnapshot(e)}}function IE(){if(Q(U.name)&&G.contextualKeyword===H._interface){let e=Rb(0);return X(),tE(),zb(e),!0}else if(q(H._enum))return nD(),!0;return!1}function LE(){return q(H._enum)?(nD(),!0):!1}function RE(e){if(e===H._declare){if(Q(U._class)||Q(U.name)||Q(U._function)||Q(U._var)||Q(U._export)){let e=Rb(1);GT(),zb(e)}}else if(Q(U.name)){if(e===H._interface){let e=Rb(1);tE(),zb(e)}else if(e===H._type){let e=Rb(1);rE(),zb(e)}else if(e===H._opaque){let e=Rb(1);iE(!1),zb(e)}}vb()}function zE(){return q(H._type)||q(H._interface)||q(H._opaque)||q(H._enum)}function BE(){return Q(U.name)&&(G.contextualKeyword===H._type||G.contextualKeyword===H._interface||G.contextualKeyword===H._opaque||G.contextualKeyword===H._enum)}function VE(){if(q(H._type)){let e=Rb(1);X(),Q(U.braceL)?(lO(),rO()):rE(),zb(e)}else if(q(H._opaque)){let e=Rb(1);X(),iE(!1),zb(e)}else if(q(H._interface)){let e=Rb(1);X(),tE(),zb(e)}else sD(!0)}function HE(){return Q(U.star)||q(H._type)&&Vb()===U.star}function UE(){if(fb(H._type)){let e=Rb(2);oO(),zb(e)}else oO()}function WE(e){if(e&&Q(U.lessThan)&&sE(),q(H._implements)){let e=Rb(0);X(),G.tokens[G.tokens.length-1].type=U._implements;do nE(),Q(U.lessThan)&&sE();while(Z(U.comma));zb(e)}}function GE(){Q(U.lessThan)&&(oE(),Q(U.parenL)||yb())}function KE(){let e=Rb(0);Z(U.question),Q(U.colon)&&AE(),zb(e)}function qE(){if(Q(U._typeof)||q(H._type)){let e=Ub();(zT(e)||e.type===U.braceL||e.type===U.star)&&X()}}function JE(){let e=G.contextualKeyword===H._type||G.type===U._typeof;e?X():$(),q(H._as)&&!db(H._as)?($(),e&&!Q(U.name)&&!(G.type&U.IS_KEYWORD)||$()):(e&&(Q(U.name)||G.type&U.IS_KEYWORD)&&$(),fb(H._as)&&$())}function YE(){if(Q(U.lessThan)){let e=Rb(0);oE(),zb(e)}}function XE(){Q(U.colon)&&AE()}function ZE(){if(Q(U.colon)){let e=G.noAnonFunctionType;G.noAnonFunctionType=!0,AE(),G.noAnonFunctionType=e}}function QE(e,t){if(Q(U.lessThan)){let n=G.snapshot(),r=Yw(e,t);if(G.error)G.restoreFromSnapshot(n),G.type=U.typeParameterStart;else return r;let i=Rb(0);if(oE(),zb(i),r=Yw(e,t),r)return!0;yb()}return Yw(e,t)}function $E(){if(Q(U.colon)){let e=Rb(0),t=G.snapshot(),n=G.noAnonFunctionType;G.noAnonFunctionType=!0,HT(),G.noAnonFunctionType=n,mb()&&yb(),Q(U.arrow)||yb(),G.error&&G.restoreFromSnapshot(t),zb(e)}return Z(U.arrow)}function eD(e,t=!1){if(G.tokens[G.tokens.length-1].contextualKeyword===H._async&&Q(U.lessThan)){let e=G.snapshot();if(tD()&&!G.error)return;G.restoreFromSnapshot(e)}iT(e,t)}function tD(){G.scopeDepth++;let e=G.tokens.length;return zD(),yT()?(jT(e),!0):!1}function nD(){pb(H._enum),G.tokens[G.tokens.length-1].type=U._enum,$(),rD()}function rD(){fb(H._of)&&X(),J(U.braceL),iD(),J(U.braceR)}function iD(){for(;!Q(U.braceR)&&!G.error&&!Z(U.ellipsis);)aD(),Q(U.braceR)||J(U.comma)}function aD(){$(),Z(U.eq)&&X()}function oD(){if(ND(U.eof),G.scopes.push(new $y(0,G.tokens.length,!0)),G.scopeDepth!==0)throw Error(`Invalid scope depth at end of file: ${G.scopeDepth}`);return new bO(G.tokens,G.scopes)}function sD(e){ib&&IE()||(Q(U.at)&&uD(),cD(e))}function cD(e){if(rb&&hw())return;let t=G.type;switch(t){case U._break:case U._continue:mD();return;case U._debugger:hD();return;case U._do:gD();return;case U._for:_D();return;case U._function:if(Vb()===U.dot)break;e||yb(),bD();return;case U._class:e||yb(),BD(!0);return;case U._if:xD();return;case U._return:SD();return;case U._switch:CD();return;case U._throw:wD();return;case U._try:ED();return;case U._let:case U._const:e||yb();case U._var:DD(t!==U._var);return;case U._while:OD();return;case U.braceL:MD();return;case U.semi:kD();return;case U._export:case U._import:{let e=Vb();if(e===U.parenL||e===U.dot)break;X(),t===U._import?pO():QD();return}case U.name:if(G.contextualKeyword===H._async){let e=G.start,t=G.snapshot();if(X(),Q(U._function)&&!mb()){J(U._function),RD(e,!0);return}else G.restoreFromSnapshot(t)}else if(G.contextualKeyword===H._using&&!gb()&&Vb()===U.name){DD(!0);return}else if(lD()){pb(H._await),DD(!0);return}default:break}let n=G.tokens.length;qw();let r=null;if(G.tokens.length===n+1){let e=G.tokens[G.tokens.length-1];e.type===U.name&&(r=e.contextualKeyword)}if(r==null){vb();return}Z(U.colon)?AD():jD(r)}function lD(){if(!q(H._await))return!1;let e=G.snapshot();return X(),!q(H._using)||hb()||(X(),!Q(U.name)||hb())?(G.restoreFromSnapshot(e),!1):(G.restoreFromSnapshot(e),!0)}function uD(){for(;Q(U.at);)dD()}function dD(){if(X(),Z(U.parenL))qw(),J(U.parenR);else{for($();Z(U.dot);)$();fD()}}function fD(){rb?kw():pD()}function pD(){Z(U.parenL)&&cT()}function mD(){X(),_b()||($(),vb())}function hD(){X(),vb()}function gD(){X(),sD(!1),J(U._while),gT(),Z(U.semi)}function _D(){G.scopeDepth++;let e=G.tokens.length;yD();let t=G.tokens.length;G.scopes.push(new $y(e,t,!1)),G.scopeDepth--}function vD(){return!(!q(H._using)||db(H._of))}function yD(){X();let e=!1;if(q(H._await)&&(e=!0,X()),J(U.parenL),Q(U.semi)){e&&yb(),PD();return}let t=lD();if(t||Q(U._var)||Q(U._let)||Q(U._const)||vD()){if(t&&pb(H._await),X(),ID(!0,G.type!==U._var),Q(U._in)||q(H._of)){FD(e);return}PD();return}if(qw(!0),Q(U._in)||q(H._of)){FD(e);return}e&&yb(),PD()}function bD(){let e=G.start;X(),RD(e,!0)}function xD(){X(),gT(),sD(!1),Z(U._else)&&sD(!1)}function SD(){X(),_b()||(qw(),vb())}function CD(){X(),gT(),G.scopeDepth++;let e=G.tokens.length;for(J(U.braceL);!Q(U.braceR)&&!G.error;)if(Q(U._case)||Q(U._default)){let e=Q(U._case);X(),e&&qw(),J(U.colon)}else sD(!0);X();let t=G.tokens.length;G.scopes.push(new $y(e,t,!1)),G.scopeDepth--}function wD(){X(),qw(),vb()}function TD(){FS(!0),rb&&MC()}function ED(){if(X(),MD(),Q(U._catch)){X();let e=null;if(Q(U.parenL)&&(G.scopeDepth++,e=G.tokens.length,J(U.parenL),TD(),J(U.parenR)),MD(),e!=null){let t=G.tokens.length;G.scopes.push(new $y(e,t,!1)),G.scopeDepth--}}Z(U._finally)&&MD()}function DD(e){X(),ID(!1,e),vb()}function OD(){X(),gT(),sD(!1)}function kD(){X()}function AD(){sD(!0)}function jD(e){rb?_w(e):ib?RE(e):vb()}function MD(e=!1,t=0){let n=G.tokens.length;G.scopeDepth++,J(U.braceL),t&&(G.tokens[G.tokens.length-1].contextId=t),ND(U.braceR),t&&(G.tokens[G.tokens.length-1].contextId=t);let r=G.tokens.length;G.scopes.push(new $y(n,r,e)),G.scopeDepth--}function ND(e){for(;!Z(e)&&!G.error;)sD(!0)}function PD(){J(U.semi),Q(U.semi)||qw(),J(U.semi),Q(U.parenR)||qw(),J(U.parenR),sD(!1)}function FD(e){e?fb(H._of):X(),qw(),J(U.parenR),sD(!1)}function ID(e,t){for(;;){if(LD(t),Z(U.eq)){let t=G.tokens.length-1;Jw(e),G.tokens[t].rhsEndIndex=G.tokens.length}if(!Z(U.comma))break}}function LD(e){FS(e),rb?Sw():ib&&XE()}function RD(e,t,n=!1){Q(U.star)&&X(),t&&!n&&!Q(U.name)&&!Q(U._yield)&&yb();let r=null;Q(U.name)&&(t||(r=G.tokens.length,G.scopeDepth++),MS(!1));let i=G.tokens.length;G.scopeDepth++,zD(),MT(e);let a=G.tokens.length;G.scopes.push(new $y(i,a,!0)),G.scopeDepth--,r!==null&&(G.scopes.push(new $y(r,a,!0)),G.scopeDepth--)}function zD(e=!1,t=0){rb?xw():ib&&YE(),J(U.parenL),t&&(G.tokens[G.tokens.length-1].contextId=t),IS(U.parenR,!1,!1,e,t),t&&(G.tokens[G.tokens.length-1].contextId=t)}function BD(e,t=!1){let n=ob();X(),G.tokens[G.tokens.length-1].contextId=n,G.tokens[G.tokens.length-1].isExpression=!e;let r=null;e||(r=G.tokens.length,G.scopeDepth++),XD(e,t),ZD();let i=G.tokens.length;if(UD(n),!G.error&&(G.tokens[i].contextId=n,G.tokens[G.tokens.length-1].contextId=n,r!==null)){let e=G.tokens.length;G.scopes.push(new $y(r,e,!1)),G.scopeDepth--}}function VD(){return Q(U.eq)||Q(U.semi)||Q(U.braceR)||Q(U.bang)||Q(U.colon)}function HD(){return Q(U.parenL)||Q(U.lessThan)}function UD(e){for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(Z(U.semi))continue;if(Q(U.at)){dD();continue}let t=G.start;WD(t,e)}}function WD(e,t){rb&&US([H._declare,H._public,H._protected,H._private,H._override]);let n=!1;if(Q(U.name)&&G.contextualKeyword===H._static){if($(),HD()){KD(e,!1);return}else if(VD()){YD();return}if(G.tokens[G.tokens.length-1].type=U._static,n=!0,Q(U.braceL)){G.tokens[G.tokens.length-1].contextId=t,MD();return}}GD(e,n,t)}function GD(e,t,n){if(rb&&gw(t))return;if(Z(U.star)){qD(n),KD(e,!1);return}qD(n);let r=!1,i=G.tokens[G.tokens.length-1];i.contextualKeyword===H._constructor&&(r=!0),JD(),HD()?KD(e,r):VD()?YD():i.contextualKeyword===H._async&&!_b()?(G.tokens[G.tokens.length-1].type=U._async,Q(U.star)&&X(),qD(n),JD(),KD(e,!1)):(i.contextualKeyword===H._get||i.contextualKeyword===H._set)&&!(_b()&&Q(U.star))?(i.contextualKeyword===H._get?G.tokens[G.tokens.length-1].type=U._get:G.tokens[G.tokens.length-1].type=U._set,qD(n),KD(e,!1)):i.contextualKeyword===H._accessor&&!_b()?(qD(n),YD()):_b()?YD():yb()}function KD(e,t){rb?QS():ib&&Q(U.lessThan)&&oE(),AT(e,t)}function qD(e){kT(e)}function JD(){if(rb){let e=Rb(0);Z(U.question),zb(e)}}function YD(){if(rb?(Bb(U.bang),MC()):ib&&Q(U.colon)&&AE(),Q(U.eq)){let e=G.tokens.length;X(),Jw(),G.tokens[e].rhsEndIndex=G.tokens.length}vb()}function XD(e,t=!1){rb&&(!e||t)&&q(H._implements)||(Q(U.name)&&MS(!0),rb?QS():ib&&Q(U.lessThan)&&oE())}function ZD(){let e=!1;Z(U._extends)?(nT(),e=!0):e=!1,rb?yw(e):ib&&WE(e)}function QD(){let e=G.tokens.length-1;rb&&dw()||(iO()?aO():tO()?($(),Q(U.comma)&&Vb()===U.star?(J(U.comma),J(U.star),pb(H._as),$()):nO(),rO()):Z(U._default)?$D():cO()?eO():(lO(),rO()),G.tokens[e].rhsEndIndex=G.tokens.length)}function $D(){if(rb&&mw()||ib&&LE())return;let e=G.start;Z(U._function)?RD(e,!0,!0):q(H._async)&&Vb()===U._function?(fb(H._async),Z(U._function),RD(e,!0,!0)):Q(U._class)?BD(!0,!0):Q(U.at)?(uD(),BD(!0,!0)):(Jw(),vb())}function eO(){rb?vw():ib?VE():sD(!0)}function tO(){if(rb&&cw()||ib&&BE())return!1;if(Q(U.name))return G.contextualKeyword!==H._async;if(!Q(U._default))return!1;let e=Wb(),t=Ub(),n=t.type===U.name&&t.contextualKeyword===H._from;if(t.type===U.comma)return!0;if(n){let t=K.charCodeAt(Gb(e+4));return t===W.quotationMark||t===W.apostrophe}return!1}function nO(){Z(U.comma)&&lO()}function rO(){fb(H._from)&&(fT(),vO()),vb()}function iO(){return ib?HE():Q(U.star)}function aO(){ib?UE():oO()}function oO(){J(U.star),q(H._as)?sO():rO()}function sO(){X(),G.tokens[G.tokens.length-1].type=U._as,$(),nO(),rO()}function cO(){return rb&&cw()||ib&&zE()||G.type===U._var||G.type===U._const||G.type===U._let||G.type===U._function||G.type===U._class||q(H._async)||Q(U.at)}function lO(){let e=!0;for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(e)e=!1;else if(J(U.comma),Z(U.braceR))break;uO()}}function uO(){if(rb){pw();return}$(),G.tokens[G.tokens.length-1].identifierRole=Y.ExportAccess,fb(H._as)&&$()}function dO(){let e=G.snapshot();return pb(H._module),fb(H._from)?q(H._from)?(G.restoreFromSnapshot(e),!0):(G.restoreFromSnapshot(e),!1):Q(U.comma)?(G.restoreFromSnapshot(e),!1):(G.restoreFromSnapshot(e),!0)}function fO(){q(H._module)&&dO()&&X()}function pO(){if(rb&&Q(U.name)&&Vb()===U.eq){XC();return}if(rb&&q(H._type)){let e=Ub();if(e.type===U.name&&e.contextualKeyword!==H._from){if(pb(H._type),Vb()===U.eq){XC();return}}else(e.type===U.star||e.type===U.braceL)&&pb(H._type)}Q(U.string)?fT():(fO(),gO(),pb(H._from),fT()),vO(),vb()}function mO(){return Q(U.name)}function hO(){NS()}function gO(){ib&&qE();let e=!0;if(!(mO()&&(hO(),!Z(U.comma)))){if(Q(U.star)){X(),pb(H._as),hO();return}for(J(U.braceL);!Z(U.braceR)&&!G.error;){if(e)e=!1;else if(Z(U.colon)&&yb(`ES2015 named imports do not destructure. Use another statement for destructuring after the import.`),J(U.comma),Z(U.braceR))break;_O()}}}function _O(){if(rb){fw();return}if(ib){JE();return}NS(),q(H._as)&&(G.tokens[G.tokens.length-1].identifierRole=Y.ImportAccess,X(),NS())}function vO(){(Q(U._with)||q(H._assert)&&!hb())&&(X(),wT(!1,!1))}function yO(){return G.pos===0&&K.charCodeAt(0)===W.numberSign&&K.charCodeAt(1)===W.exclamationMark&&Xb(2),qb(),oD()}var bO=class{constructor(e,t){this.tokens=e,this.scopes=t}};function xO(e,t,n,r){if(r&&n)throw Error(`Cannot combine flow and typescript plugins.`);ub(e,t,n,r);let i=yO();if(G.error)throw sb(G.error);return i}function SO(e){let t=e.currentIndex(),n=0,r=e.currentToken();do{let i=e.tokens[t];if(i.isOptionalChainStart&&n++,i.isOptionalChainEnd&&n--,n+=i.numNullishCoalesceStarts,n-=i.numNullishCoalesceEnds,i.contextualKeyword===H._await&&i.identifierRole==null&&i.scopeDepth===r.scopeDepth)return!0;t+=1}while(n>0&&t<e.tokens.length);return!1}var CO=class e{__init(){this.resultCode=``}__init2(){this.resultMappings=Array(this.tokens.length)}__init3(){this.tokenIndex=0}constructor(t,n,r,i,a){this.code=t,this.tokens=n,this.isFlowEnabled=r,this.disableESTransforms=i,this.helperManager=a,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this)}snapshot(){return{resultCode:this.resultCode,tokenIndex:this.tokenIndex}}restoreToSnapshot(e){this.resultCode=e.resultCode,this.tokenIndex=e.tokenIndex}dangerouslyGetAndRemoveCodeSinceSnapshot(e){let t=this.resultCode.slice(e.resultCode.length);return this.resultCode=e.resultCode,t}reset(){this.resultCode=``,this.resultMappings=Array(this.tokens.length),this.tokenIndex=0}matchesContextualAtIndex(e,t){return this.matches1AtIndex(e,U.name)&&this.tokens[e].contextualKeyword===t}identifierNameAtIndex(e){return this.identifierNameForToken(this.tokens[e])}identifierNameAtRelativeIndex(e){return this.identifierNameForToken(this.tokenAtRelativeIndex(e))}identifierName(){return this.identifierNameForToken(this.currentToken())}identifierNameForToken(e){return this.code.slice(e.start,e.end)}rawCodeForToken(e){return this.code.slice(e.start,e.end)}stringValueAtIndex(e){return this.stringValueForToken(this.tokens[e])}stringValue(){return this.stringValueForToken(this.currentToken())}stringValueForToken(e){return this.code.slice(e.start+1,e.end-1)}matches1AtIndex(e,t){return this.tokens[e].type===t}matches2AtIndex(e,t,n){return this.tokens[e].type===t&&this.tokens[e+1].type===n}matches3AtIndex(e,t,n,r){return this.tokens[e].type===t&&this.tokens[e+1].type===n&&this.tokens[e+2].type===r}matches1(e){return this.tokens[this.tokenIndex].type===e}matches2(e,t){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t}matches3(e,t,n){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n}matches4(e,t,n,r){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===r}matches5(e,t,n,r,i){return this.tokens[this.tokenIndex].type===e&&this.tokens[this.tokenIndex+1].type===t&&this.tokens[this.tokenIndex+2].type===n&&this.tokens[this.tokenIndex+3].type===r&&this.tokens[this.tokenIndex+4].type===i}matchesContextual(e){return this.matchesContextualAtIndex(this.tokenIndex,e)}matchesContextIdAndLabel(e,t){return this.matches1(e)&&this.currentToken().contextId===t}previousWhitespaceAndComments(){let e=this.code.slice(this.tokenIndex>0?this.tokens[this.tokenIndex-1].end:0,this.tokenIndex<this.tokens.length?this.tokens[this.tokenIndex].start:this.code.length);return this.isFlowEnabled&&(e=e.replace(/@flow/g,``)),e}replaceToken(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}replaceTokenTrimmingLeftWhitespace(e){this.resultCode+=this.previousWhitespaceAndComments().replace(/[^\\r\\n]/g,``),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=e,this.appendTokenSuffix(),this.tokenIndex++}removeInitialToken(){this.replaceToken(``)}removeToken(){this.replaceTokenTrimmingLeftWhitespace(``)}removeBalancedCode(){let e=0;for(;!this.isAtEnd();){if(this.matches1(U.braceL))e++;else if(this.matches1(U.braceR)){if(e===0)return;e--}this.removeToken()}}copyExpectedToken(e){if(this.tokens[this.tokenIndex].type!==e)throw Error(`Expected token ${e}`);this.copyToken()}copyToken(){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}copyTokenWithPrefix(e){this.resultCode+=this.previousWhitespaceAndComments(),this.appendTokenPrefix(),this.resultCode+=e,this.resultMappings[this.tokenIndex]=this.resultCode.length,this.resultCode+=this.code.slice(this.tokens[this.tokenIndex].start,this.tokens[this.tokenIndex].end),this.appendTokenSuffix(),this.tokenIndex++}appendTokenPrefix(){let e=this.currentToken();if((e.numNullishCoalesceStarts||e.isOptionalChainStart)&&(e.isAsyncOperation=SO(this)),!this.disableESTransforms){if(e.numNullishCoalesceStarts)for(let t=0;t<e.numNullishCoalesceStarts;t++)e.isAsyncOperation?(this.resultCode+=`await `,this.resultCode+=this.helperManager.getHelperName(`asyncNullishCoalesce`)):this.resultCode+=this.helperManager.getHelperName(`nullishCoalesce`),this.resultCode+=`(`;e.isOptionalChainStart&&(e.isAsyncOperation&&(this.resultCode+=`await `),this.tokenIndex>0&&this.tokenAtRelativeIndex(-1).type===U._delete?e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName(`asyncOptionalChainDelete`):this.resultCode+=this.helperManager.getHelperName(`optionalChainDelete`):e.isAsyncOperation?this.resultCode+=this.helperManager.getHelperName(`asyncOptionalChain`):this.resultCode+=this.helperManager.getHelperName(`optionalChain`),this.resultCode+=`([`)}}appendTokenSuffix(){let e=this.currentToken();if(e.isOptionalChainEnd&&!this.disableESTransforms&&(this.resultCode+=`])`),e.numNullishCoalesceEnds&&!this.disableESTransforms)for(let t=0;t<e.numNullishCoalesceEnds;t++)this.resultCode+=`))`}appendCode(e){this.resultCode+=e}currentToken(){return this.tokens[this.tokenIndex]}currentTokenCode(){let e=this.currentToken();return this.code.slice(e.start,e.end)}tokenAtRelativeIndex(e){return this.tokens[this.tokenIndex+e]}currentIndex(){return this.tokenIndex}nextToken(){if(this.tokenIndex===this.tokens.length)throw Error(`Unexpectedly reached end of input.`);this.tokenIndex++}previousToken(){this.tokenIndex--}finish(){if(this.tokenIndex!==this.tokens.length)throw Error(`Tried to finish processing tokens before reaching the end.`);return this.resultCode+=this.previousWhitespaceAndComments(),{code:this.resultCode,mappings:this.resultMappings}}isAtEnd(){return this.tokenIndex===this.tokens.length}};function wO(e,t,n,r){let i=t.snapshot(),a=EO(t),o=[],s=[],c=[],l=null,u=[],d=[],f=t.currentToken().contextId;if(f==null)throw Error(`Expected non-null class context ID on class open-brace.`);for(t.nextToken();!t.matchesContextIdAndLabel(U.braceR,f);)if(t.matchesContextual(H._constructor)&&!t.currentToken().isType)({constructorInitializerStatements:o,constructorInsertPos:l}=DO(t));else if(t.matches1(U.semi))r||d.push({start:t.currentIndex(),end:t.currentIndex()+1}),t.nextToken();else if(t.currentToken().isType)t.nextToken();else{let i=t.currentIndex(),a=!1,p=!1,m=!1;for(;OO(t.currentToken());)t.matches1(U._static)&&(a=!0),t.matches1(U.hash)&&(p=!0),(t.matches1(U._declare)||t.matches1(U._abstract))&&(m=!0),t.nextToken();if(a&&t.matches1(U.braceL)){TO(t,f);continue}if(p){TO(t,f);continue}if(t.matchesContextual(H._constructor)&&!t.currentToken().isType){({constructorInitializerStatements:o,constructorInsertPos:l}=DO(t));continue}let h=t.currentIndex();if(kO(t),t.matches1(U.lessThan)||t.matches1(U.parenL)){TO(t,f);continue}for(;t.currentToken().isType;)t.nextToken();if(t.matches1(U.eq)){let r=t.currentIndex(),i=t.currentToken().rhsEndIndex;if(i==null)throw Error(`Expected rhsEndIndex on class field assignment.`);for(t.nextToken();t.currentIndex()<i;)e.processToken();let o;a?(o=n.claimFreeName(`__initStatic`),c.push(o)):(o=n.claimFreeName(`__init`),s.push(o)),u.push({initializerName:o,equalsIndex:r,start:h,end:t.currentIndex()})}else(!r||m)&&d.push({start:i,end:t.currentIndex()})}return t.restoreToSnapshot(i),r?{headerInfo:a,constructorInitializerStatements:o,instanceInitializerNames:[],staticInitializerNames:[],constructorInsertPos:l,fields:[],rangesToRemove:d}:{headerInfo:a,constructorInitializerStatements:o,instanceInitializerNames:s,staticInitializerNames:c,constructorInsertPos:l,fields:u,rangesToRemove:d}}function TO(e,t){for(e.nextToken();e.currentToken().contextId!==t;)e.nextToken();for(;OO(e.tokenAtRelativeIndex(-1));)e.previousToken()}function EO(e){let t=e.currentToken(),n=t.contextId;if(n==null)throw Error(`Expected context ID on class token.`);let r=t.isExpression;if(r==null)throw Error(`Expected isExpression on class token.`);let i=null,a=!1;for(e.nextToken(),e.matches1(U.name)&&(i=e.identifierName());!e.matchesContextIdAndLabel(U.braceL,n);)e.matches1(U._extends)&&!e.currentToken().isType&&(a=!0),e.nextToken();return{isExpression:r,className:i,hasSuperclass:a}}function DO(e){let t=[];e.nextToken();let n=e.currentToken().contextId;if(n==null)throw Error(`Expected context ID on open-paren starting constructor params.`);for(;!e.matchesContextIdAndLabel(U.parenR,n);)if(e.currentToken().contextId===n){if(e.nextToken(),OO(e.currentToken())){for(e.nextToken();OO(e.currentToken());)e.nextToken();let n=e.currentToken();if(n.type!==U.name)throw Error(`Expected identifier after access modifiers in constructor arg.`);let r=e.identifierNameForToken(n);t.push(`this.${r} = ${r}`)}}else e.nextToken();for(e.nextToken();e.currentToken().isType;)e.nextToken();let r=e.currentIndex(),i=!1;for(;!e.matchesContextIdAndLabel(U.braceR,n);){if(!i&&e.matches2(U._super,U.parenL)){e.nextToken();let t=e.currentToken().contextId;if(t==null)throw Error(`Expected a context ID on the super call`);for(;!e.matchesContextIdAndLabel(U.parenR,t);)e.nextToken();r=e.currentIndex(),i=!0}e.nextToken()}return e.nextToken(),{constructorInitializerStatements:t,constructorInsertPos:r}}function OO(e){return[U._async,U._get,U._set,U.plus,U.minus,U._readonly,U._static,U._public,U._private,U._protected,U._override,U._abstract,U.star,U._declare,U.hash].includes(e.type)}function kO(e){if(e.matches1(U.bracketL)){let t=e.currentToken().contextId;if(t==null)throw Error(`Expected class context ID on computed name open bracket.`);for(;!e.matchesContextIdAndLabel(U.bracketR,t);)e.nextToken();e.nextToken()}else e.nextToken()}function AO(e){if(e.removeInitialToken(),e.removeToken(),e.removeToken(),e.removeToken(),e.matches1(U.parenL))e.removeToken(),e.removeToken(),e.removeToken();else for(;e.matches1(U.dot);)e.removeToken(),e.removeToken()}var jO={typeDeclarations:new Set,valueDeclarations:new Set};function MO(e){let t=new Set,n=new Set;for(let r=0;r<e.tokens.length;r++){let i=e.tokens[r];i.type===U.name&&jb(i)&&(i.isType?t.add(e.identifierNameForToken(i)):n.add(e.identifierNameForToken(i)))}return{typeDeclarations:t,valueDeclarations:n}}function NO(e){let t=e.currentIndex();for(;!e.matches1AtIndex(t,U.braceR);)t++;return e.matchesContextualAtIndex(t+1,H._from)&&e.matches1AtIndex(t+2,U.string)}function PO(e){(e.matches2(U._with,U.braceL)||e.matches2(U.name,U.braceL)&&e.matchesContextual(H._assert))&&(e.removeToken(),e.removeToken(),e.removeBalancedCode(),e.removeToken())}function FO(e,t,n,r){if(!e||t)return!1;let i=n.currentToken();if(i.rhsEndIndex==null)throw Error(`Expected non-null rhsEndIndex on export token.`);let a=i.rhsEndIndex-n.currentIndex();if(a!==3&&!(a===4&&n.matches1AtIndex(i.rhsEndIndex-1,U.semi)))return!1;let o=n.tokenAtRelativeIndex(2);if(o.type!==U.name)return!1;let s=n.identifierNameForToken(o);return r.typeDeclarations.has(s)&&!r.valueDeclarations.has(s)}var IO=class e extends wx{__init(){this.hadExport=!1}__init2(){this.hadNamedExport=!1}__init3(){this.hadDefaultExport=!1}constructor(t,n,r,i,a,o,s,c,l,u,d,f){super(),this.rootTransformer=t,this.tokens=n,this.importProcessor=r,this.nameManager=i,this.helperManager=a,this.reactHotLoaderTransformer=o,this.enableLegacyBabel5ModuleInterop=s,this.enableLegacyTypeScriptModuleInterop=c,this.isTypeScriptTransformEnabled=l,this.isFlowTransformEnabled=u,this.preserveDynamicImport=d,this.keepUnusedImports=f,e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),this.declarationInfo=l?MO(n):jO}getPrefixCode(){let e=``;return this.hadExport&&(e+=`Object.defineProperty(exports, "__esModule", {value: true});`),e}getSuffixCode(){return this.enableLegacyBabel5ModuleInterop&&this.hadDefaultExport&&!this.hadNamedExport?`\nmodule.exports = exports.default;\n`:``}process(){return this.tokens.matches3(U._import,U.name,U.eq)?this.processImportEquals():this.tokens.matches1(U._import)?(this.processImport(),!0):this.tokens.matches2(U._export,U.eq)?(this.tokens.replaceToken(`module.exports`),!0):this.tokens.matches1(U._export)&&!this.tokens.currentToken().isType?(this.hadExport=!0,this.processExport()):this.tokens.matches2(U.name,U.postIncDec)&&this.processPostIncDec()?!0:this.tokens.matches1(U.name)||this.tokens.matches1(U.jsxName)?this.processIdentifier():this.tokens.matches1(U.eq)?this.processAssignment():this.tokens.matches1(U.assign)?this.processComplexAssignment():this.tokens.matches1(U.preIncDec)?this.processPreIncDec():!1}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.importProcessor.shouldAutomaticallyElideImportedName(e)?AO(this.tokens):this.tokens.replaceToken(`const`),!0}processImport(){if(this.tokens.matches2(U._import,U.parenL)){if(this.preserveDynamicImport){this.tokens.copyToken();return}let e=this.enableLegacyTypeScriptModuleInterop?``:`${this.helperManager.getHelperName(`interopRequireWildcard`)}(`;this.tokens.replaceToken(`Promise.resolve().then(() => ${e}require`);let t=this.tokens.currentToken().contextId;if(t==null)throw Error(`Expected context ID on dynamic import invocation.`);for(this.tokens.copyToken();!this.tokens.matchesContextIdAndLabel(U.parenR,t);)this.rootTransformer.processToken();this.tokens.replaceToken(e?`)))`:`))`);return}if(this.removeImportAndDetectIfShouldElide())this.tokens.removeToken();else{let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),this.tokens.appendCode(this.importProcessor.claimImportCode(e))}PO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}removeImportAndDetectIfShouldElide(){if(this.tokens.removeInitialToken(),this.tokens.matchesContextual(H._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._from))return this.removeRemainingImport(),!0;if(this.tokens.matches1(U.name)||this.tokens.matches1(U.star))return this.removeRemainingImport(),!1;if(this.tokens.matches1(U.string))return!1;let e=!1,t=!1;for(;!this.tokens.matches1(U.string);)(!e&&this.tokens.matches1(U.braceL)||this.tokens.matches1(U.comma))&&(this.tokens.removeToken(),this.tokens.matches1(U.braceR)||(t=!0),(this.tokens.matches2(U.name,U.comma)||this.tokens.matches2(U.name,U.braceR)||this.tokens.matches4(U.name,U.name,U.name,U.comma)||this.tokens.matches4(U.name,U.name,U.name,U.braceR))&&(e=!0)),this.tokens.removeToken();return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?t&&!e:!1}removeRemainingImport(){for(;!this.tokens.matches1(U.string);)this.tokens.removeToken()}processIdentifier(){let e=this.tokens.currentToken();if(e.shadowsGlobal)return!1;if(e.identifierRole===Y.ObjectShorthand)return this.processObjectShorthand();if(e.identifierRole!==Y.Access)return!1;let t=this.importProcessor.getIdentifierReplacement(this.tokens.identifierNameForToken(e));if(!t)return!1;let n=this.tokens.currentIndex()+1;for(;n<this.tokens.tokens.length&&this.tokens.tokens[n].type===U.parenR;)n++;return this.tokens.tokens[n].type===U.parenL?this.tokens.tokenAtRelativeIndex(1).type===U.parenL&&this.tokens.tokenAtRelativeIndex(-1).type!==U._new?(this.tokens.replaceToken(`${t}.call(void 0, `),this.tokens.removeToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR)):this.tokens.replaceToken(`(0, ${t})`):this.tokens.replaceToken(t),!0}processObjectShorthand(){let e=this.tokens.identifierName(),t=this.importProcessor.getIdentifierReplacement(e);return t?(this.tokens.replaceToken(`${e}: ${t}`),!0):!1}processExport(){if(this.tokens.matches2(U._export,U._enum)||this.tokens.matches3(U._export,U._const,U._enum))return this.hadNamedExport=!0,!1;if(this.tokens.matches2(U._export,U._default))return this.tokens.matches3(U._export,U._default,U._enum)?(this.hadDefaultExport=!0,!1):(this.processExportDefault(),!0);if(this.tokens.matches2(U._export,U.braceL))return this.processExportBindings(),!0;if(this.tokens.matches2(U._export,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(U.braceL)){for(;!this.tokens.matches1(U.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(U._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(H._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),PO(this.tokens)),!0}if(this.hadNamedExport=!0,this.tokens.matches2(U._export,U._var)||this.tokens.matches2(U._export,U._let)||this.tokens.matches2(U._export,U._const))return this.processExportVar(),!0;if(this.tokens.matches2(U._export,U._function)||this.tokens.matches3(U._export,U.name,U._function))return this.processExportFunction(),!0;if(this.tokens.matches2(U._export,U._class)||this.tokens.matches3(U._export,U._abstract,U._class)||this.tokens.matches2(U._export,U.at))return this.processExportClass(),!0;if(this.tokens.matches2(U._export,U.star))return this.processExportStar(),!0;throw Error(`Unrecognized export syntax.`)}processAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.isType||t.type!==U.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,U.dot)||e>=2&&[U._var,U._let,U._const].includes(this.tokens.tokens[e-2].type))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return n?(this.tokens.copyToken(),this.tokens.appendCode(` ${n} =`),!0):!1}processComplexAssignment(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e-1];if(t.type!==U.name||t.shadowsGlobal||e>=2&&this.tokens.matches1AtIndex(e-2,U.dot))return!1;let n=this.importProcessor.resolveExportBinding(this.tokens.identifierNameForToken(t));return n?(this.tokens.appendCode(` = ${n}`),this.tokens.copyToken(),!0):!1}processPreIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e+1];if(t.type!==U.name||t.shadowsGlobal||e+2<this.tokens.tokens.length&&(this.tokens.matches1AtIndex(e+2,U.dot)||this.tokens.matches1AtIndex(e+2,U.bracketL)||this.tokens.matches1AtIndex(e+2,U.parenL)))return!1;let n=this.tokens.identifierNameForToken(t),r=this.importProcessor.resolveExportBinding(n);return r?(this.tokens.appendCode(`${r} = `),this.tokens.copyToken(),!0):!1}processPostIncDec(){let e=this.tokens.currentIndex(),t=this.tokens.tokens[e],n=this.tokens.tokens[e+1];if(t.type!==U.name||t.shadowsGlobal||e>=1&&this.tokens.matches1AtIndex(e-1,U.dot))return!1;let r=this.tokens.identifierNameForToken(t),i=this.importProcessor.resolveExportBinding(r);if(!i)return!1;let a=this.tokens.rawCodeForToken(n),o=this.importProcessor.getIdentifierReplacement(r)||r;if(a===`++`)this.tokens.replaceToken(`(${o} = ${i} = ${o} + 1, ${o} - 1)`);else if(a===`--`)this.tokens.replaceToken(`(${o} = ${i} = ${o} - 1, ${o} + 1)`);else throw Error(`Unexpected operator: ${a}`);return this.tokens.removeToken(),!0}processExportDefault(){let e=!0;if(this.tokens.matches4(U._export,U._default,U._function,U.name)||this.tokens.matches5(U._export,U._default,U.name,U._function,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._async)){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.processNamedFunction();this.tokens.appendCode(` exports.default = ${e};`)}else if(this.tokens.matches4(U._export,U._default,U._class,U.name)||this.tokens.matches5(U._export,U._default,U._abstract,U._class,U.name)||this.tokens.matches3(U._export,U._default,U.at)){this.tokens.removeInitialToken(),this.tokens.removeToken(),this.copyDecorators(),this.tokens.matches1(U._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.default = ${e};`)}else if(FO(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))e=!1,this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken();else if(this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName(`_default`);this.tokens.replaceToken(`let ${e}; exports.`),this.tokens.copyToken(),this.tokens.appendCode(` = ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e)}else this.tokens.replaceToken(`exports.`),this.tokens.copyToken(),this.tokens.appendCode(` =`);e&&(this.hadDefaultExport=!0)}copyDecorators(){for(;this.tokens.matches1(U.at);)if(this.tokens.copyToken(),this.tokens.matches1(U.parenL))this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR);else{for(this.tokens.copyExpectedToken(U.name);this.tokens.matches1(U.dot);)this.tokens.copyExpectedToken(U.dot),this.tokens.copyExpectedToken(U.name);this.tokens.matches1(U.parenL)&&(this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR))}}processExportVar(){this.isSimpleExportVar()?this.processSimpleExportVar():this.processComplexExportVar()}isSimpleExportVar(){let e=this.tokens.currentIndex();if(e++,e++,!this.tokens.matches1AtIndex(e,U.name))return!1;for(e++;e<this.tokens.tokens.length&&this.tokens.tokens[e].isType;)e++;return!!this.tokens.matches1AtIndex(e,U.eq)}processSimpleExportVar(){this.tokens.removeInitialToken(),this.tokens.copyToken();let e=this.tokens.identifierName();for(;!this.tokens.matches1(U.eq);)this.rootTransformer.processToken();let t=this.tokens.currentToken().rhsEndIndex;if(t==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<t;)this.rootTransformer.processToken();this.tokens.appendCode(`; exports.${e} = ${e}`)}processComplexExportVar(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.matches1(U.braceL);e&&this.tokens.appendCode(`(`);let t=0;for(;;)if(this.tokens.matches1(U.braceL)||this.tokens.matches1(U.dollarBraceL)||this.tokens.matches1(U.bracketL))t++,this.tokens.copyToken();else if(this.tokens.matches1(U.braceR)||this.tokens.matches1(U.bracketR))t--,this.tokens.copyToken();else if(t===0&&!this.tokens.matches1(U.name)&&!this.tokens.currentToken().isType)break;else if(this.tokens.matches1(U.eq)){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken()}else{let e=this.tokens.currentToken();if(kb(e)){let t=this.tokens.identifierName(),n=this.importProcessor.getIdentifierReplacement(t);if(n===null)throw Error(`Expected a replacement for ${t} in \\`export var\\` syntax.`);Pb(e)&&(n=`${t}: ${n}`),this.tokens.replaceToken(n)}else this.rootTransformer.processToken()}if(e){let e=this.tokens.currentToken().rhsEndIndex;if(e==null)throw Error(`Expected = token with an end index.`);for(;this.tokens.currentIndex()<e;)this.rootTransformer.processToken();this.tokens.appendCode(`)`)}}processExportFunction(){this.tokens.replaceToken(``);let e=this.processNamedFunction();this.tokens.appendCode(` exports.${e} = ${e};`)}processNamedFunction(){if(this.tokens.matches1(U._function))this.tokens.copyToken();else if(this.tokens.matches2(U.name,U._function)){if(!this.tokens.matchesContextual(H._async))throw Error(`Expected async keyword in function export.`);this.tokens.copyToken(),this.tokens.copyToken()}if(this.tokens.matches1(U.star)&&this.tokens.copyToken(),!this.tokens.matches1(U.name))throw Error(`Expected identifier for exported function name.`);let e=this.tokens.identifierName();if(this.tokens.copyToken(),this.tokens.currentToken().isType)for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return this.tokens.copyExpectedToken(U.parenL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),this.rootTransformer.processPossibleTypeRange(),this.tokens.copyExpectedToken(U.braceL),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.braceR),e}processExportClass(){this.tokens.removeInitialToken(),this.copyDecorators(),this.tokens.matches1(U._abstract)&&this.tokens.removeToken();let e=this.rootTransformer.processNamedClass();this.tokens.appendCode(` exports.${e} = ${e};`)}processExportBindings(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=NO(this.tokens),t=[];for(;;){if(this.tokens.matches1(U.braceR)){this.tokens.removeToken();break}let n=yx(this.tokens);for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();if(!(n.isType||!e&&this.shouldElideExportedIdentifier(n.leftName))){let e=n.rightName;e==="default"?this.hadDefaultExport=!0:this.hadNamedExport=!0;let r=n.leftName,i=this.importProcessor.getIdentifierReplacement(r);t.push(`exports.${e} = ${i||r};`)}if(this.tokens.matches1(U.braceR)){this.tokens.removeToken();break}if(this.tokens.matches2(U.comma,U.braceR)){this.tokens.removeToken(),this.tokens.removeToken();break}else if(this.tokens.matches1(U.comma))this.tokens.removeToken();else throw Error(`Unexpected token: ${JSON.stringify(this.tokens.currentToken())}`)}if(this.tokens.matchesContextual(H._from)){this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),PO(this.tokens)}else this.tokens.appendCode(t.join(` `));this.tokens.matches1(U.semi)&&this.tokens.removeToken()}processExportStar(){for(this.tokens.removeInitialToken();!this.tokens.matches1(U.string);)this.tokens.removeToken();let e=this.tokens.stringValue();this.tokens.replaceTokenTrimmingLeftWhitespace(this.importProcessor.claimImportCode(e)),PO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}shouldElideExportedIdentifier(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.declarationInfo.valueDeclarations.has(e)}},LO=class extends wx{constructor(e,t,n,r,i,a,o,s){super(),this.tokens=e,this.nameManager=t,this.helperManager=n,this.reactHotLoaderTransformer=r,this.isTypeScriptTransformEnabled=i,this.isFlowTransformEnabled=a,this.keepUnusedImports=o,this.nonTypeIdentifiers=i&&!o?Nx(e,s):new Set,this.declarationInfo=i&&!o?MO(e):jO,this.injectCreateRequireForImportRequire=!!s.injectCreateRequireForImportRequire}process(){if(this.tokens.matches3(U._import,U.name,U.eq))return this.processImportEquals();if(this.tokens.matches4(U._import,U.name,U.name,U.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){this.tokens.removeInitialToken();for(let e=0;e<7;e++)this.tokens.removeToken();return!0}if(this.tokens.matches2(U._export,U.eq))return this.tokens.replaceToken(`module.exports`),!0;if(this.tokens.matches5(U._export,U._import,U.name,U.name,U.eq)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._type)){this.tokens.removeInitialToken();for(let e=0;e<8;e++)this.tokens.removeToken();return!0}if(this.tokens.matches1(U._import))return this.processImport();if(this.tokens.matches2(U._export,U._default))return this.processExportDefault();if(this.tokens.matches2(U._export,U.braceL))return this.processNamedExports();if(this.tokens.matches2(U._export,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._type)){if(this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.matches1(U.braceL)){for(;!this.tokens.matches1(U.braceR);)this.tokens.removeToken();this.tokens.removeToken()}else this.tokens.removeToken(),this.tokens.matches1(U._as)&&(this.tokens.removeToken(),this.tokens.removeToken());return this.tokens.matchesContextual(H._from)&&this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.string)&&(this.tokens.removeToken(),this.tokens.removeToken(),PO(this.tokens)),!0}return!1}processImportEquals(){let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.shouldAutomaticallyElideImportedName(e)?AO(this.tokens):this.injectCreateRequireForImportRequire?(this.tokens.replaceToken(`const`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.replaceToken(this.helperManager.getHelperName(`require`))):this.tokens.replaceToken(`const`),!0}processImport(){if(this.tokens.matches2(U._import,U.parenL))return!1;let e=this.tokens.snapshot();if(this.removeImportTypeBindings()){for(this.tokens.restoreToSnapshot(e);!this.tokens.matches1(U.string);)this.tokens.removeToken();this.tokens.removeToken(),PO(this.tokens),this.tokens.matches1(U.semi)&&this.tokens.removeToken()}return!0}removeImportTypeBindings(){if(this.tokens.copyExpectedToken(U._import),this.tokens.matchesContextual(H._type)&&!this.tokens.matches1AtIndex(this.tokens.currentIndex()+1,U.comma)&&!this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+1,H._from))return!0;if(this.tokens.matches1(U.string))return this.tokens.copyToken(),!1;this.tokens.matchesContextual(H._module)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._from)&&this.tokens.copyToken();let e=!1,t=!1,n=!1;if(this.tokens.matches1(U.name)&&(this.shouldAutomaticallyElideImportedName(this.tokens.identifierName())?(this.tokens.removeToken(),this.tokens.matches1(U.comma)&&this.tokens.removeToken()):(e=!0,this.tokens.copyToken(),this.tokens.matches1(U.comma)&&(n=!0,this.tokens.removeToken()))),this.tokens.matches1(U.star))this.shouldAutomaticallyElideImportedName(this.tokens.identifierNameAtRelativeIndex(2))?(this.tokens.removeToken(),this.tokens.removeToken(),this.tokens.removeToken()):(n&&this.tokens.appendCode(`,`),e=!0,this.tokens.copyExpectedToken(U.star),this.tokens.copyExpectedToken(U.name),this.tokens.copyExpectedToken(U.name));else if(this.tokens.matches1(U.braceL)){for(n&&this.tokens.appendCode(`,`),this.tokens.copyToken();!this.tokens.matches1(U.braceR);){t=!0;let n=yx(this.tokens);if(n.isType||this.shouldAutomaticallyElideImportedName(n.rightName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(U.comma)&&this.tokens.removeToken()}else{for(e=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(U.comma)&&this.tokens.copyToken()}}this.tokens.copyExpectedToken(U.braceR)}return this.keepUnusedImports?!1:this.isTypeScriptTransformEnabled?!e:this.isFlowTransformEnabled?t&&!e:!1}shouldAutomaticallyElideImportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&!this.nonTypeIdentifiers.has(e)}processExportDefault(){if(FO(this.isTypeScriptTransformEnabled,this.keepUnusedImports,this.tokens,this.declarationInfo))return this.tokens.removeInitialToken(),this.tokens.removeToken(),this.tokens.removeToken(),!0;if(!(this.tokens.matches4(U._export,U._default,U._function,U.name)||this.tokens.matches5(U._export,U._default,U.name,U._function,U.name)&&this.tokens.matchesContextualAtIndex(this.tokens.currentIndex()+2,H._async)||this.tokens.matches4(U._export,U._default,U._class,U.name)||this.tokens.matches5(U._export,U._default,U._abstract,U._class,U.name))&&this.reactHotLoaderTransformer){let e=this.nameManager.claimFreeName(`_default`);return this.tokens.replaceToken(`let ${e}; export`),this.tokens.copyToken(),this.tokens.appendCode(` ${e} =`),this.reactHotLoaderTransformer.setExtractedDefaultExportName(e),!0}return!1}processNamedExports(){if(!this.isTypeScriptTransformEnabled)return!1;this.tokens.copyExpectedToken(U._export),this.tokens.copyExpectedToken(U.braceL);let e=NO(this.tokens),t=!1;for(;!this.tokens.matches1(U.braceR);){let n=yx(this.tokens);if(n.isType||!e&&this.shouldElideExportedName(n.leftName)){for(;this.tokens.currentIndex()<n.endIndex;)this.tokens.removeToken();this.tokens.matches1(U.comma)&&this.tokens.removeToken()}else{for(t=!0;this.tokens.currentIndex()<n.endIndex;)this.tokens.copyToken();this.tokens.matches1(U.comma)&&this.tokens.copyToken()}}return this.tokens.copyExpectedToken(U.braceR),!this.keepUnusedImports&&e&&!t&&(this.tokens.removeToken(),this.tokens.removeToken(),PO(this.tokens)),!0}shouldElideExportedName(e){return this.isTypeScriptTransformEnabled&&!this.keepUnusedImports&&this.declarationInfo.typeDeclarations.has(e)&&!this.declarationInfo.valueDeclarations.has(e)}},RO=class extends wx{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(U._enum)?(this.processEnum(),!0):this.tokens.matches2(U._export,U._enum)?(this.processNamedExportEnum(),!0):this.tokens.matches3(U._export,U._default,U._enum)?(this.processDefaultExportEnum(),!0):!1}processNamedExportEnum(){if(this.isImportsTransformEnabled){this.tokens.removeInitialToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.tokens.appendCode(` exports.${e} = ${e};`)}else this.tokens.copyToken(),this.processEnum()}processDefaultExportEnum(){this.tokens.removeInitialToken(),this.tokens.removeToken();let e=this.tokens.identifierNameAtRelativeIndex(1);this.processEnum(),this.isImportsTransformEnabled?this.tokens.appendCode(` exports.default = ${e};`):this.tokens.appendCode(` export default ${e};`)}processEnum(){this.tokens.replaceToken(`const`),this.tokens.copyExpectedToken(U.name);let e=!1;this.tokens.matchesContextual(H._of)&&(this.tokens.removeToken(),e=this.tokens.matchesContextual(H._symbol),this.tokens.removeToken());let t=this.tokens.matches3(U.braceL,U.name,U.eq);this.tokens.appendCode(` = require("flow-enums-runtime")`);let n=!e&&!t;for(this.tokens.replaceTokenTrimmingLeftWhitespace(n?`.Mirrored([`:`({`);!this.tokens.matches1(U.braceR);){if(this.tokens.matches1(U.ellipsis)){this.tokens.removeToken();break}this.processEnumElement(e,t),this.tokens.matches1(U.comma)&&this.tokens.copyToken()}this.tokens.replaceToken(n?`]);`:`});`)}processEnumElement(e,t){if(e){let e=this.tokens.identifierName();this.tokens.copyToken(),this.tokens.appendCode(`: Symbol("${e}")`)}else t?(this.tokens.copyToken(),this.tokens.replaceTokenTrimmingLeftWhitespace(`:`),this.tokens.copyToken()):this.tokens.replaceToken(`"${this.tokens.identifierName()}"`)}};function zO(e){let t,n=e[0],r=1;for(;r<e.length;){let i=e[r],a=e[r+1];if(r+=2,(i===`optionalAccess`||i===`optionalCall`)&&n==null)return;i===`access`||i===`optionalAccess`?(t=n,n=a(n)):(i===`call`||i===`optionalCall`)&&(n=a((...e)=>n.call(t,...e)),t=void 0)}return n}var BO=`jest`,VO=[`mock`,`unmock`,`enableAutomock`,`disableAutomock`],HO=class e extends wx{__init(){this.hoistedFunctionNames=[]}constructor(t,n,r,i){super(),this.rootTransformer=t,this.tokens=n,this.nameManager=r,this.importProcessor=i,e.prototype.__init.call(this)}process(){return this.tokens.currentToken().scopeDepth===0&&this.tokens.matches4(U.name,U.dot,U.name,U.parenL)&&this.tokens.identifierName()===BO?!zO([this,`access`,e=>e.importProcessor,`optionalAccess`,e=>e.getGlobalNames,`call`,e=>e(),`optionalAccess`,e=>e.has,`call`,e=>e(BO)])&&this.extractHoistedCalls():!1}getHoistedCode(){return this.hoistedFunctionNames.length>0?this.hoistedFunctionNames.map(e=>`${e}();`).join(``):``}extractHoistedCalls(){this.tokens.removeToken();let e=!1;for(;this.tokens.matches3(U.dot,U.name,U.parenL);){let t=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);if(VO.includes(t)){let t=this.nameManager.claimFreeName(`__jestHoist`);this.hoistedFunctionNames.push(t),this.tokens.replaceToken(`function ${t}(){${BO}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),this.tokens.appendCode(`;}`),e=!1}else e?this.tokens.copyToken():this.tokens.replaceToken(`${BO}.`),this.tokens.copyToken(),this.tokens.copyToken(),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.parenR),e=!0}return!0}},UO=class extends wx{constructor(e){super(),this.tokens=e}process(){if(this.tokens.matches1(U.num)){let e=this.tokens.currentTokenCode();if(e.includes(`_`))return this.tokens.replaceToken(e.replace(/_/g,``)),!0}return!1}},WO=class extends wx{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){return this.tokens.matches2(U._catch,U.braceL)?(this.tokens.copyToken(),this.tokens.appendCode(` (${this.nameManager.claimFreeName(`e`)})`),!0):!1}},GO=class extends wx{constructor(e,t){super(),this.tokens=e,this.nameManager=t}process(){if(this.tokens.matches1(U.nullishCoalescing)){let e=this.tokens.currentToken();return this.tokens.tokens[e.nullishStartIndex].isAsyncOperation?this.tokens.replaceTokenTrimmingLeftWhitespace(`, async () => (`):this.tokens.replaceTokenTrimmingLeftWhitespace(`, () => (`),!0}if(this.tokens.matches1(U._delete)&&this.tokens.tokenAtRelativeIndex(1).isOptionalChainStart)return this.tokens.removeInitialToken(),!0;let e=this.tokens.currentToken().subscriptStartIndex;if(e!=null&&this.tokens.tokens[e].isOptionalChainStart&&this.tokens.tokenAtRelativeIndex(-1).type!==U._super){let t=this.nameManager.claimFreeName(`_`),n;if(n=e>0&&this.tokens.matches1AtIndex(e-1,U._delete)&&this.isLastSubscriptInChain()?`${t} => delete ${t}`:`${t} => ${t}`,this.tokens.tokens[e].isAsyncOperation&&(n=`async ${n}`),this.tokens.matches2(U.questionDot,U.parenL)||this.tokens.matches2(U.questionDot,U.lessThan))this.justSkippedSuper()&&this.tokens.appendCode(`.bind(this)`),this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalCall\', ${n}`);else if(this.tokens.matches2(U.questionDot,U.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalAccess\', ${n}`);else if(this.tokens.matches1(U.questionDot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'optionalAccess\', ${n}.`);else if(this.tokens.matches1(U.dot))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'access\', ${n}.`);else if(this.tokens.matches1(U.bracketL))this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'access\', ${n}[`);else if(this.tokens.matches1(U.parenL))this.justSkippedSuper()&&this.tokens.appendCode(`.bind(this)`),this.tokens.replaceTokenTrimmingLeftWhitespace(`, \'call\', ${n}(`);else throw Error(`Unexpected subscript operator in optional chain.`);return!0}return!1}isLastSubscriptInChain(){let e=0;for(let t=this.tokens.currentIndex()+1;;t++){if(t>=this.tokens.tokens.length)throw Error(`Reached the end of the code while finding the end of the access chain.`);if(this.tokens.tokens[t].isOptionalChainStart?e++:this.tokens.tokens[t].isOptionalChainEnd&&e--,e<0)return!0;if(e===0&&this.tokens.tokens[t].subscriptStartIndex!=null)return!1}}justSkippedSuper(){let e=0,t=this.tokens.currentIndex()-1;for(;;){if(t<0)throw Error(`Reached the start of the code while finding the start of the access chain.`);if(this.tokens.tokens[t].isOptionalChainStart?e--:this.tokens.tokens[t].isOptionalChainEnd&&e++,e<0)return!1;if(e===0&&this.tokens.tokens[t].subscriptStartIndex!=null)return this.tokens.tokens[t-1].type===U._super;t--}}},KO=class extends wx{constructor(e,t,n,r){super(),this.rootTransformer=e,this.tokens=t,this.importProcessor=n,this.options=r}process(){let e=this.tokens.currentIndex();if(this.tokens.identifierName()===`createReactClass`){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(`createReactClass`);return t?this.tokens.replaceToken(`(0, ${t})`):this.tokens.copyToken(),this.tryProcessCreateClassCall(e),!0}if(this.tokens.matches3(U.name,U.dot,U.name)&&this.tokens.identifierName()===`React`&&this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+2)===`createClass`){let t=this.importProcessor&&this.importProcessor.getIdentifierReplacement(`React`)||`React`;return t?(this.tokens.replaceToken(t),this.tokens.copyToken(),this.tokens.copyToken()):(this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.copyToken()),this.tryProcessCreateClassCall(e),!0}return!1}tryProcessCreateClassCall(e){let t=this.findDisplayName(e);t&&this.classNeedsDisplayName()&&(this.tokens.copyExpectedToken(U.parenL),this.tokens.copyExpectedToken(U.braceL),this.tokens.appendCode(`displayName: \'${t}\',`),this.rootTransformer.processBalancedCode(),this.tokens.copyExpectedToken(U.braceR),this.tokens.copyExpectedToken(U.parenR))}findDisplayName(e){return e<2?null:this.tokens.matches2AtIndex(e-2,U.name,U.eq)||e>=2&&this.tokens.tokens[e-2].identifierRole===Y.ObjectKey?this.tokens.identifierNameAtIndex(e-2):this.tokens.matches2AtIndex(e-2,U._export,U._default)?this.getDisplayNameFromFilename():null}getDisplayNameFromFilename(){let e=(this.options.filePath||`unknown`).split(`/`),t=e[e.length-1],n=t.lastIndexOf(`.`),r=n===-1?t:t.slice(0,n);return r===`index`&&e[e.length-2]?e[e.length-2]:r}classNeedsDisplayName(){let e=this.tokens.currentIndex();if(!this.tokens.matches2(U.parenL,U.braceL))return!1;let t=e+1,n=this.tokens.tokens[t].contextId;if(n==null)throw Error(`Expected non-null context ID on object open-brace.`);for(;e<this.tokens.tokens.length;e++){let t=this.tokens.tokens[e];if(t.type===U.braceR&&t.contextId===n){e++;break}if(this.tokens.identifierNameAtIndex(e)===`displayName`&&this.tokens.tokens[e].identifierRole===Y.ObjectKey&&t.contextId===n)return!1}if(e===this.tokens.tokens.length)throw Error(`Unexpected end of input when processing React class.`);return this.tokens.matches1AtIndex(e,U.parenR)||this.tokens.matches2AtIndex(e,U.comma,U.parenR)}},qO=class e extends wx{__init(){this.extractedDefaultExportName=null}constructor(t,n){super(),this.tokens=t,this.filePath=n,e.prototype.__init.call(this)}setExtractedDefaultExportName(e){this.extractedDefaultExportName=e}getPrefixCode(){return`\n (function () {\n var enterModule = require(\'react-hot-loader\').enterModule;\n enterModule && enterModule(module);\n })();`.replace(/\\s+/g,` `).trim()}getSuffixCode(){let e=new Set;for(let t of this.tokens.tokens)!t.isType&&jb(t)&&t.identifierRole!==Y.ImportDeclaration&&e.add(this.tokens.identifierNameForToken(t));let t=Array.from(e).map(e=>({variableName:e,uniqueLocalName:e}));return this.extractedDefaultExportName&&t.push({variableName:this.extractedDefaultExportName,uniqueLocalName:`default`}),`\n;(function () {\n var reactHotLoader = require(\'react-hot-loader\').default;\n var leaveModule = require(\'react-hot-loader\').leaveModule;\n if (!reactHotLoader) {\n return;\n }\n${t.map(({variableName:e,uniqueLocalName:t})=>` reactHotLoader.register(${e}, "${t}", ${JSON.stringify(this.filePath||``)});`).join(`\n`)}\n leaveModule(module);\n})();`}process(){return!1}},JO=new Set(`break.case.catch.class.const.continue.debugger.default.delete.do.else.export.extends.finally.for.function.if.import.in.instanceof.new.return.super.switch.this.throw.try.typeof.var.void.while.with.yield.enum.implements.interface.let.package.private.protected.public.static.await.false.null.true`.split(`.`));function YO(e){if(e.length===0||!Tb[e.charCodeAt(0)])return!1;for(let t=1;t<e.length;t++)if(!wb[e.charCodeAt(t)])return!1;return!JO.has(e)}var XO=class extends wx{constructor(e,t,n){super(),this.rootTransformer=e,this.tokens=t,this.isImportsTransformEnabled=n}process(){return this.rootTransformer.processPossibleArrowParamEnd()||this.rootTransformer.processPossibleAsyncArrowWithTypeParams()||this.rootTransformer.processPossibleTypeRange()?!0:this.tokens.matches1(U._public)||this.tokens.matches1(U._protected)||this.tokens.matches1(U._private)||this.tokens.matches1(U._abstract)||this.tokens.matches1(U._readonly)||this.tokens.matches1(U._override)||this.tokens.matches1(U.nonNullAssertion)?(this.tokens.removeInitialToken(),!0):this.tokens.matches1(U._enum)||this.tokens.matches2(U._const,U._enum)?(this.processEnum(),!0):this.tokens.matches2(U._export,U._enum)||this.tokens.matches3(U._export,U._const,U._enum)?(this.processEnum(!0),!0):!1}processEnum(e=!1){for(this.tokens.removeInitialToken();this.tokens.matches1(U._const)||this.tokens.matches1(U._enum);)this.tokens.removeToken();let t=this.tokens.identifierName();this.tokens.removeToken(),e&&!this.isImportsTransformEnabled&&this.tokens.appendCode(`export `),this.tokens.appendCode(`var ${t}; (function (${t})`),this.tokens.copyExpectedToken(U.braceL),this.processEnumBody(t),this.tokens.copyExpectedToken(U.braceR),e&&this.isImportsTransformEnabled?this.tokens.appendCode(`)(${t} || (exports.${t} = ${t} = {}));`):this.tokens.appendCode(`)(${t} || (${t} = {}));`)}processEnumBody(e){let t=null;for(;!this.tokens.matches1(U.braceR);){let{nameStringCode:n,variableName:r}=this.extractEnumKeyInfo(this.tokens.currentToken());this.tokens.removeInitialToken(),this.tokens.matches3(U.eq,U.string,U.comma)||this.tokens.matches3(U.eq,U.string,U.braceR)?this.processStringLiteralEnumMember(e,n,r):this.tokens.matches1(U.eq)?this.processExplicitValueEnumMember(e,n,r):this.processImplicitValueEnumMember(e,n,r,t),this.tokens.matches1(U.comma)&&this.tokens.removeToken(),t=r??`${e}[${n}]`}}extractEnumKeyInfo(e){if(e.type===U.name){let t=this.tokens.identifierNameForToken(e);return{nameStringCode:`"${t}"`,variableName:YO(t)?t:null}}else if(e.type===U.string){let t=this.tokens.stringValueForToken(e);return{nameStringCode:this.tokens.code.slice(e.start,e.end),variableName:YO(t)?t:null}}else throw Error(`Expected name or string at beginning of enum element.`)}processStringLiteralEnumMember(e,t,n){n==null?(this.tokens.appendCode(`${e}[${t}]`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`;`)):(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken(),this.tokens.copyToken(),this.tokens.appendCode(`; ${e}[${t}] = ${n};`))}processExplicitValueEnumMember(e,t,n){let r=this.tokens.currentToken().rhsEndIndex;if(r==null)throw Error(`Expected rhsEndIndex on enum assign.`);if(n!=null){for(this.tokens.appendCode(`const ${n}`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`; ${e}[${e}[${t}] = ${n}] = ${t};`)}else{for(this.tokens.appendCode(`${e}[${e}[${t}]`),this.tokens.copyToken();this.tokens.currentIndex()<r;)this.rootTransformer.processToken();this.tokens.appendCode(`] = ${t};`)}}processImplicitValueEnumMember(e,t,n,r){let i=r==null?`0`:`${r} + 1`;n!=null&&(this.tokens.appendCode(`const ${n} = ${i}; `),i=n),this.tokens.appendCode(`${e}[${e}[${t}] = ${i}] = ${t};`)}},ZO=class e{__init(){this.transformers=[]}__init2(){this.generatedVariables=[]}constructor(t,n,r,i){e.prototype.__init.call(this),e.prototype.__init2.call(this),this.nameManager=t.nameManager,this.helperManager=t.helperManager;let{tokenProcessor:a,importProcessor:o}=t;this.tokens=a,this.isImportsTransformEnabled=n.includes(`imports`),this.isReactHotLoaderTransformEnabled=n.includes(`react-hot-loader`),this.disableESTransforms=!!i.disableESTransforms,i.disableESTransforms||(this.transformers.push(new GO(a,this.nameManager)),this.transformers.push(new UO(a)),this.transformers.push(new WO(a,this.nameManager))),n.includes(`jsx`)&&(i.jsxRuntime!==`preserve`&&this.transformers.push(new Tx(this,a,o,this.nameManager,i)),this.transformers.push(new KO(this,a,o,i)));let s=null;if(n.includes(`react-hot-loader`)){if(!i.filePath)throw Error(`filePath is required when using the react-hot-loader transform.`);s=new qO(a,i.filePath),this.transformers.push(s)}if(n.includes(`imports`)){if(o===null)throw Error(`Expected non-null importProcessor with imports transform enabled.`);this.transformers.push(new IO(this,a,o,this.nameManager,this.helperManager,s,r,!!i.enableLegacyTypeScriptModuleInterop,n.includes(`typescript`),n.includes(`flow`),!!i.preserveDynamicImport,!!i.keepUnusedImports))}else this.transformers.push(new LO(a,this.nameManager,this.helperManager,s,n.includes(`typescript`),n.includes(`flow`),!!i.keepUnusedImports,i));n.includes(`flow`)&&this.transformers.push(new RO(this,a,n.includes(`imports`))),n.includes(`typescript`)&&this.transformers.push(new XO(this,a,n.includes(`imports`))),n.includes(`jest`)&&this.transformers.push(new HO(this,a,this.nameManager,o))}transform(){this.tokens.reset(),this.processBalancedCode();let e=this.isImportsTransformEnabled?`"use strict";`:``;for(let t of this.transformers)e+=t.getPrefixCode();e+=this.helperManager.emitHelpers(),e+=this.generatedVariables.map(e=>` var ${e};`).join(``);for(let t of this.transformers)e+=t.getHoistedCode();let t=``;for(let e of this.transformers)t+=e.getSuffixCode();let n=this.tokens.finish(),{code:r}=n;if(r.startsWith(`#!`)){let i=r.indexOf(`\n`);return i===-1&&(i=r.length,r+=`\n`),{code:r.slice(0,i+1)+e+r.slice(i+1)+t,mappings:this.shiftMappings(n.mappings,e.length)}}else return{code:e+r+t,mappings:this.shiftMappings(n.mappings,e.length)}}processBalancedCode(){let e=0,t=0;for(;!this.tokens.isAtEnd();){if(this.tokens.matches1(U.braceL)||this.tokens.matches1(U.dollarBraceL))e++;else if(this.tokens.matches1(U.braceR)){if(e===0)return;e--}if(this.tokens.matches1(U.parenL))t++;else if(this.tokens.matches1(U.parenR)){if(t===0)return;t--}this.processToken()}}processToken(){if(this.tokens.matches1(U._class)){this.processClass();return}for(let e of this.transformers)if(e.process())return;this.tokens.copyToken()}processNamedClass(){if(!this.tokens.matches2(U._class,U.name))throw Error(`Expected identifier for exported class name.`);let e=this.tokens.identifierNameAtIndex(this.tokens.currentIndex()+1);return this.processClass(),e}processClass(){let e=wO(this,this.tokens,this.nameManager,this.disableESTransforms),t=(e.headerInfo.isExpression||!e.headerInfo.className)&&e.staticInitializerNames.length+e.instanceInitializerNames.length>0,n=e.headerInfo.className;t&&(n=this.nameManager.claimFreeName(`_class`),this.generatedVariables.push(n),this.tokens.appendCode(` (${n} =`));let r=this.tokens.currentToken().contextId;if(r==null)throw Error(`Expected class to have a context ID.`);for(this.tokens.copyExpectedToken(U._class);!this.tokens.matchesContextIdAndLabel(U.braceL,r);)this.processToken();this.processClassBody(e,n);let i=e.staticInitializerNames.map(e=>`${n}.${e}()`);t?this.tokens.appendCode(`, ${i.map(e=>`${e}, `).join(``)}${n})`):e.staticInitializerNames.length>0&&this.tokens.appendCode(` ${i.map(e=>`${e};`).join(` `)}`)}processClassBody(e,t){let{headerInfo:n,constructorInsertPos:r,constructorInitializerStatements:i,fields:a,instanceInitializerNames:o,rangesToRemove:s}=e,c=0,l=0,u=this.tokens.currentToken().contextId;if(u==null)throw Error(`Expected non-null context ID on class.`);this.tokens.copyExpectedToken(U.braceL),this.isReactHotLoaderTransformEnabled&&this.tokens.appendCode(`__reactstandin__regenerateByEval(key, code) {this[key] = eval(code);}`);let d=i.length+o.length>0;if(r===null&&d){let e=this.makeConstructorInitCode(i,o,t);if(n.hasSuperclass){let t=this.nameManager.claimFreeName(`args`);this.tokens.appendCode(`constructor(...${t}) { super(...${t}); ${e}; }`)}else this.tokens.appendCode(`constructor() { ${e}; }`)}for(;!this.tokens.matchesContextIdAndLabel(U.braceR,u);)if(c<a.length&&this.tokens.currentIndex()===a[c].start){let e=!1;for(this.tokens.matches1(U.bracketL)?this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this`):this.tokens.matches1(U.string)||this.tokens.matches1(U.num)?(this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this[`),e=!0):this.tokens.copyTokenWithPrefix(`${a[c].initializerName}() {this.`);this.tokens.currentIndex()<a[c].end;)e&&this.tokens.currentIndex()===a[c].equalsIndex&&this.tokens.appendCode(`]`),this.processToken();this.tokens.appendCode(`}`),c++}else if(l<s.length&&this.tokens.currentIndex()>=s[l].start){for(this.tokens.currentIndex()<s[l].end&&this.tokens.removeInitialToken();this.tokens.currentIndex()<s[l].end;)this.tokens.removeToken();l++}else this.tokens.currentIndex()===r?(this.tokens.copyToken(),d&&this.tokens.appendCode(`;${this.makeConstructorInitCode(i,o,t)};`),this.processToken()):this.processToken();this.tokens.copyExpectedToken(U.braceR)}makeConstructorInitCode(e,t,n){return[...e,...t.map(e=>`${n}.prototype.${e}.call(this)`)].join(`;`)}processPossibleArrowParamEnd(){if(this.tokens.matches2(U.parenR,U.colon)&&this.tokens.tokenAtRelativeIndex(1).isType){let e=this.tokens.currentIndex()+1;for(;this.tokens.tokens[e].isType;)e++;if(this.tokens.matches1AtIndex(e,U.arrow)){for(this.tokens.removeInitialToken();this.tokens.currentIndex()<e;)this.tokens.removeToken();return this.tokens.replaceTokenTrimmingLeftWhitespace(`) =>`),!0}}return!1}processPossibleAsyncArrowWithTypeParams(){if(!this.tokens.matchesContextual(H._async)&&!this.tokens.matches1(U._async))return!1;let e=this.tokens.tokenAtRelativeIndex(1);if(e.type!==U.lessThan||!e.isType)return!1;let t=this.tokens.currentIndex()+1;for(;this.tokens.tokens[t].isType;)t++;if(this.tokens.matches1AtIndex(t,U.parenL)){for(this.tokens.replaceToken(`async (`),this.tokens.removeInitialToken();this.tokens.currentIndex()<t;)this.tokens.removeToken();return this.tokens.removeToken(),this.processBalancedCode(),this.processToken(),!0}return!1}processPossibleTypeRange(){if(this.tokens.currentToken().isType){for(this.tokens.removeInitialToken();this.tokens.currentToken().isType;)this.tokens.removeToken();return!0}return!1}shiftMappings(e,t){for(let n=0;n<e.length;n++){let r=e[n];r!==void 0&&(e[n]=r+t)}return e}};o((e=>{e.__esModule=!0,e.LinesAndColumns=void 0;var t=`\n`,n=`\\r`;e.LinesAndColumns=function(){function e(e){this.string=e;for(var r=[0],i=0;i<e.length;)switch(e[i]){case t:i+=t.length,r.push(i);break;case n:i+=n.length,e[i]===t&&(i+=t.length),r.push(i);break;default:i++;break}this.offsets=r}return e.prototype.locationForIndex=function(e){if(e<0||e>this.string.length)return null;for(var t=0,n=this.offsets;n[t+1]<=e;)t++;var r=e-n[t];return{line:t,column:r}},e.prototype.indexForLocation=function(e){var t=e.line,n=e.column;return t<0||t>=this.offsets.length||n<0||n>this.lengthOfLine(t)?null:this.offsets[t]+n},e.prototype.lengthOfLine=function(e){var t=this.offsets[e];return(e===this.offsets.length-1?this.string.length:this.offsets[e+1])-t},e}()}))();function QO(e){let t=new Set;for(let n=0;n<e.tokens.length;n++)e.matches1AtIndex(n,U._import)&&!e.matches3AtIndex(n,U._import,U.name,U.eq)&&$O(e,n,t);return t}function $O(e,t,n){t++,!e.matches1AtIndex(t,U.parenL)&&(e.matches1AtIndex(t,U.name)&&(n.add(e.identifierNameAtIndex(t)),t++,e.matches1AtIndex(t,U.comma)&&t++),e.matches1AtIndex(t,U.star)&&(t+=2,n.add(e.identifierNameAtIndex(t)),t++),e.matches1AtIndex(t,U.braceL)&&(t++,ek(e,t,n)))}function ek(e,t,n){for(;;){if(e.matches1AtIndex(t,U.braceR))return;let r=yx(e,t);if(t=r.endIndex,r.isType||n.add(r.rightName),e.matches2AtIndex(t,U.comma,U.braceR)||e.matches1AtIndex(t,U.braceR))return;if(e.matches1AtIndex(t,U.comma))t++;else throw Error(`Unexpected token: ${JSON.stringify(e.tokens[t])}`)}}function tk(e,t){kS(t);try{let n=nk(e,t),r=new ZO(n,t.transforms,!!t.enableLegacyBabel5ModuleInterop,t).transform(),i={code:r.code};if(t.sourceMapOptions){if(!t.filePath)throw Error(`filePath must be specified when generating a source map.`);i={...i,sourceMap:mS(r,t.filePath,t.sourceMapOptions,e,n.tokenProcessor.tokens)}}return i}catch(e){throw t.filePath&&(e.message=`Error transforming ${t.filePath}: ${e.message}`),e}}function nk(e,t){let n=t.transforms.includes(`jsx`),r=t.transforms.includes(`typescript`),i=t.transforms.includes(`flow`),a=t.disableESTransforms===!0,o=xO(e,n,r,i),s=o.tokens,c=o.scopes,l=new CS(e,s),u=new _S(l),d=new CO(e,s,i,a,u),f=!!t.enableLegacyTypeScriptModuleInterop,p=null;return t.transforms.includes(`imports`)?(p=new Px(l,d,f,t,t.transforms.includes(`typescript`),!!t.keepUnusedImports,u),p.preprocessTokens(),vS(d,c,p.getGlobalNames()),t.transforms.includes(`typescript`)&&!t.keepUnusedImports&&p.pruneTypeOnlyImports()):t.transforms.includes(`typescript`)&&!t.keepUnusedImports&&vS(d,c,QO(d)),{tokenProcessor:d,scopes:c,nameManager:l,importProcessor:p,helperManager:u}}var rk={react:d,"react/jsx-runtime":V};function ik(e){if(e in rk)return rk[e];throw Error(`\'${e}\' cannot be imported here. Only \'react\' can.`)}function ak(e){let{code:t}=tk(e,{transforms:[`typescript`,`jsx`,`imports`],jsxRuntime:`automatic`,production:!0}),n={require:ik,module:{exports:{}},ran:!1};window.__componentCode=n;let r=document.createElement(`script`);if(r.textContent=`(function (require, module, exports) {\ntry {\n${t}\n} catch (error) { __componentCode.error = error; }\n__componentCode.ran = true;\n})(__componentCode.require, __componentCode.module, __componentCode.module.exports);`,document.head.append(r),r.remove(),delete window.__componentCode,n.error)throw n.error;if(!n.ran)throw Error(`The host did not let the component run.`);let{default:i,...a}=n.module.exports;return typeof i==`function`&&i.name&&i.name!=="default"?{[i.name]:i,...a}:a}function ok({error:e}){throw e}function sk({source:e,code:t,file:n=`Code`,controls:r,note:i,onChange:a}){let o=(0,d.useMemo)(()=>{try{return{scope:ak(e)}}catch(e){return{error:e}}},[e]);return o.scope?(0,V.jsx)(_y,{interactive:!0,scope:o.scope,code:t,file:n,controls:r,note:i,onChange:({prop:e,value:t,code:r})=>a({prop:e,value:t,file:n,files:{[n]:r}})}):(0,V.jsx)(_y,{code:t,file:n,children:(0,V.jsx)(ok,{error:o.error})})}var ck=new Cv({name:`Component Code`,version:Ky}),lk=(0,Gy.createRoot)(document.getElementById(`root`)),uk=matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`,dk,fk={},pk=!1,mk,hk=e=>{ck.getHostCapabilities()?.updateModelContext&&(clearTimeout(mk),mk=setTimeout(()=>{let t=document.querySelector(`.cc-problem`)?.textContent||void 0;pk=!0,ck.updateModelContext({content:[{type:`text`,text:Zy({...e,problem:t})}]}).catch(()=>{})},400))},gk=()=>ck.getHostCapabilities()?.updateModelContext?`The chat sees this state`:void 0,_k=()=>{clearTimeout(mk),pk&&(pk=!1,ck.updateModelContext({content:[]}).catch(()=>{}))},vk=()=>{if(document.documentElement.style.colorScheme=uk,dk===void 0)return;let e=Jy.safeParse(dk),t=qy.safeParse(dk);lk.render(e.success?(0,V.jsx)(zy,{...e.data,theme:uk,note:gk(),onChange:({file:e,prop:t,value:n,code:r})=>{fk={...fk,[e]:r},hk({prop:t,value:n,file:e,files:fk})}}):t.success?(0,V.jsx)(sk,{...t.data,note:gk(),onChange:hk}):(0,V.jsx)(`p`,{children:t.error.message}))};ck.addEventListener(`toolinput`,e=>{dk=e.arguments;let t=Jy.safeParse(dk);fk=t.success?{...t.data.files}:{},_k(),vk()}),ck.addEventListener(`hostcontextchanged`,e=>{e.theme&&(uk=e.theme),vk()}),await ck.connect(),uk=ck.getHostContext()?.theme??uk,vk();var yk={host:ck.getHostVersion(),capabilities:ck.getHostCapabilities()};console.info(`Component Code host`,yk),yk.capabilities?.logging&&ck.sendLog({level:`info`,logger:`Component Code`,data:yk}).catch(()=>{});</script>\n </head>\n <body>\n <div id="root"></div>\n </body>\n</html>\n';var mk=ze.object({source:ze.string().describe("The component's module in TSX. It may import only from 'react'. Its exports, the default one by its function's name, are what `code` can name. For each value the reader can change by using the component, such as `checked`, `open` or `value`, take a matching `onCheckedChange`, `onOpenChange` or `onValueChange` prop and call it with the new value. Component Code passes it, so the change shows in the code. Keep state of its own only for when the prop is missing."),code:ze.string().describe("How the component is used, in JSX: elements, props and text only, with no hooks, calls or conditions. It is shown as code and rendered as the preview. Each string, number and boolean in it becomes a control."),file:ze.string().optional().describe("The file named in the code's tab, such as `Card.tsx`."),controls:ze.record(ze.string(),ze.union([ze.literal(!1),ze.array(ze.union([ze.string(),ze.number()])),ze.object({min:ze.number().optional(),max:ze.number().optional(),step:ze.number().optional()})])).optional().describe("How a prop is changed, by its name or by `Element.prop`: a list of options, `{ min, max, step }` for a number, or `false` to keep it as written.")}),fk=ze.object({files:ze.record(ze.string(),ze.string()).describe("The files by name, such as `index.html`, `style.css` and `script.js`, each in its own tab. They run together as one page in a sandboxed frame: the HTML is the page's body, with the CSS in a style element and the JS in a script element after it. The page cannot load anything from the network, so draw with canvas, SVG or the DOM."),controls:ze.record(ze.string(),ze.union([ze.literal(!0),ze.array(ze.union([ze.string(),ze.number()])),ze.object({min:ze.number().optional(),max:ze.number().optional(),step:ze.number().optional()})])).optional().describe("The values the reader can change, by name: an attribute, as `r` or `circle.r`, a CSS property or custom property, as `--speed`, or a JS `const` set to a number, string or boolean. Each takes `true`, a list of options, or `{ min, max, step }` for a number. CSS changes apply as the reader drags, while HTML and JS run the page again, so a script that reads custom properties each frame follows along.")});var b1="ui://fabio.cv/component-code",hk=e=>{fi(e,"component_code_show",{title:"Show in Component Code",description:"Shows a React component in the chat in Component Code: a live preview beside the code that uses it. Each string, number and boolean in the code becomes a control the reader can change. Use it when someone asks to show a component in Component Code, or to see, preview or try one.",inputSchema:mk,annotations:{readOnlyHint:!0,openWorldHint:!1},_meta:{ui:{resourceUri:b1}}},({file:t,code:r})=>({content:[{type:"text",text:`Showing ${t??"the component"} in Component Code:
|
|
82
|
+
|
|
83
|
+
${r}`}]})),fi(e,"component_code_show_html",{title:"Show HTML in Component Code",description:"Shows HTML, CSS and JS running in the chat in Component Code: the page beside its code, with a tab for each file. The values named in `controls` become controls the reader can change. Use it when someone asks to show HTML, CSS, JS, a canvas or an SVG in Component Code, or for an experiment without React.",inputSchema:fk,annotations:{readOnlyHint:!0,openWorldHint:!1},_meta:{ui:{resourceUri:b1}}},({files:t})=>({content:[{type:"text",text:`Showing ${Object.keys(t).join(", ")} in Component Code.`}]})),Pd(e,{uri:b1,name:"Component Code",description:"A component or page beside the code that makes it.",html:pk})};var gk='<!doctype html>\n<html lang="en">\n <head>\n <meta charset="utf-8" />\n <meta name="viewport" content="width=device-width, initial-scale=1" />\n <title>Orbit</title>\n <style>\n @font-face {\n font-family: \'Geist Mono\';\n src: url(\'https://cdn.jsdelivr.net/npm/geist@1.9.2/dist/fonts/geist-mono/GeistMono-Variable.woff2\')\n format(\'woff2\');\n font-weight: 100 900;\n font-display: swap;\n }\n :root {\n color-scheme: light dark;\n --surface: light-dark(oklch(100% 0 0), oklch(17.5% 0 0));\n --subtle: light-dark(oklch(93% 0 0), oklch(24.5% 0 0));\n --foreground: light-dark(\n oklch(22.7% 0.006 271.2),\n oklch(92.3% 0.004 286.3)\n );\n --muted: light-dark(oklch(52% 0.044 267.6), oklch(67.3% 0.028 276.2));\n --hazard: light-dark(oklch(46% 0.191 32.2), oklch(71.2% 0.191 32.2));\n --mono: \'Geist Mono\', ui-monospace, SFMono-Regular, Menlo, monospace;\n }\n body {\n margin: 0;\n padding: 1px;\n background: transparent;\n }\n main {\n position: relative;\n height: 260px;\n border-radius: 12px;\n background: var(--surface);\n box-shadow: inset 0 0 0 1px var(--subtle);\n overflow: hidden;\n cursor: pointer;\n user-select: none;\n -webkit-user-select: none;\n -webkit-tap-highlight-color: transparent;\n touch-action: manipulation;\n }\n main:focus-visible {\n outline: 2px solid var(--muted);\n outline-offset: -2px;\n }\n canvas {\n display: block;\n width: 100%;\n height: 100%;\n }\n p {\n position: absolute;\n margin: 0;\n font: 500 12px/16px var(--mono);\n color: var(--muted);\n font-variant-numeric: tabular-nums;\n }\n #score {\n top: 12px;\n left: 14px;\n color: var(--foreground);\n }\n #best {\n top: 12px;\n right: 14px;\n }\n #hint {\n bottom: 12px;\n left: 0;\n right: 0;\n text-align: center;\n }\n /* Read for the canvas, so it draws in the theme\'s colours. */\n .probe {\n display: none;\n }\n </style>\n <script type="module" crossorigin>(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var e=Object.defineProperty,t=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),n=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n&&e(r,Symbol.toStringTag,{value:`Module`}),r},r=new Set([`https://json-schema.org/draft/2020-12/schema`,`http://json-schema.org/draft/2020-12/schema`]),i=new Set([`https://json-schema.org/draft/2019-09/schema`,`http://json-schema.org/draft/2019-09/schema`]),a=new Set([`https://json-schema.org/draft-07/schema`,`http://json-schema.org/draft-07/schema`]),o=new Set([`https://json-schema.org/draft-06/schema`,`http://json-schema.org/draft-06/schema`]);function s(e){return typeof e==`string`&&i.has(e.replace(/#$/,``))}function c(e,t){if(!(`$schema`in e)||typeof e.$schema!=`string`)return`2020-12`;let n=e.$schema.replace(/#$/,``);if(r.has(n))return`2020-12`;if(i.has(n))return`2019-09`;if(a.has(n)||o.has(n))return`draft-7`;throw Error(`JSON Schema declares an unsupported dialect ("$schema": "${e.$schema.slice(0,200)}"). The default validator supports JSON Schema 2020-12, 2019-09, draft-07, and draft-06; ${t}`)}function l(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function u(e,t=`|`){return e.map(e=>_e(e)).join(t)}function d(e,t){return typeof t==`bigint`?t.toString():t}var f=class{constructor(e){this._getter=e,this._value=void 0}get value(){let e=this._getter;return e!==void 0&&(this._value=e(),this._getter=void 0),this._value}};function p(e){return new f(e)}function m(e){return e==null}function h(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function g(e,t){let n=e/t,r=Math.round(n),i=4*2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var ee=Symbol(`evaluating`);function te(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ee)return r===void 0&&(r=ee,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function _(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function ne(e){let t=Object.getOwnPropertyDescriptor(e,`shape`);return t?.get?t.get.raw:t?.value}function re(e){return ne(e._zod.def)??e._zod.def.shape}function ie(e,t,n){Object.defineProperty(e,t,{get(){let e=n();return _(this,t,e),e},enumerable:!0,configurable:!0})}function ae(e,t,n){t in e?_(e,t,n):e[t]=n}function oe(e,t,n,r){let i=re(t);for(let a of n){let n=Object.getOwnPropertyDescriptor(i,a);n.enumerable&&(n.get?ie(e,a,()=>{let e=t._zod.def.shape[a];return r?r(e,a):e}):ae(e,a,r?r(n.value,a):n.value))}}function se(e,t){for(let n of Reflect.ownKeys(t)){let r=Object.getOwnPropertyDescriptor(t,n);r.enumerable&&(r.get?ie(e,n,()=>t[n]):ae(e,n,r.value))}}function v(...e){let t={};for(let n of e){let e=Object.getOwnPropertyDescriptors(n);Object.assign(t,e)}return Object.defineProperties({},t)}function ce(e){return JSON.stringify(e)}function le(e){return e.toLowerCase().trim().replace(/[^\\w\\s-]/g,``).replace(/[\\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ue=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function de(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var fe=p(()=>{if(rt.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function pe(e){if(de(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(de(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function me(e){return pe(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}var he=new Set([`string`,`number`,`symbol`]);function ge(e){return e.replace(/[.*+?^${}()|[\\]\\\\]/g,`\\\\$&`)}function y(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function b(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 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 _e(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function ve(e){return Object.keys(e).filter(t=>e[t]._zod.optin!==void 0&&e[t]._zod.optout===`optional`)}var ye={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},x={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function be(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);let i={};return oe(i,e,xe(e,t)),y(e,v(n,{shape:i,checks:[]}))}function xe(e,t){let n=re(e),r=[];for(let e of Reflect.ownKeys(t)){if(!Object.getOwnPropertyDescriptor(n,e)?.enumerable)throw Error(`Unrecognized key: "${String(e)}"`);t[e]&&r.push(e)}return r}function Se(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);let i=new Set(xe(e,t)),a={};return oe(a,e,Reflect.ownKeys(re(e)).filter(e=>!i.has(e))),y(e,v(n,{shape:a,checks:[]}))}function Ce(e,t){if(!pe(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=re(e);for(let e of Reflect.ownKeys(t))if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return y(e,v(e._zod.def,{shape:we(e,t)}))}function we(e,t){let n={};return oe(n,e,Reflect.ownKeys(re(e))),se(n,t),n}function Te(e,t){if(!pe(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return y(e,v(e._zod.def,{shape:we(e,t)}))}function Ee(e,t){if(!t?._zod?.def)throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);let n={};return oe(n,e,Reflect.ownKeys(re(e))),oe(n,t,Reflect.ownKeys(re(t))),y(e,v(e._zod.def,{shape:n,get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function De(e,t,n,r=`partial`){let i=t._zod.def.checks;if(i&&i.length>0)throw Error(`.${r}() cannot be used on object schemas containing refinements`);let a=n?new Set(xe(t,n)):void 0,o={};return oe(o,t,Reflect.ownKeys(re(t)),e&&((t,n)=>a&&!a.has(n)?t:new e({type:`optional`,innerType:t}))),y(t,v(t._zod.def,{shape:o,checks:[]}))}function Oe(e,t,n){let r=n?new Set(xe(t,n)):void 0,i={};return oe(i,t,Reflect.ownKeys(re(t)),(t,n)=>r&&!r.has(n)?t:new e({type:`nonoptional`,innerType:t})),y(t,v(t._zod.def,{shape:i}))}function S(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 ke(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 Ae(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function je(e){return typeof e==`string`?e:e?.message}function Me(e){let t=[];for(let n of e??[]){let e=n._zod.def;if(!/_(length|size)$|_equals$/.test(e.check))break;let r=e.maximum??e.length??e.size;r>=0&&t.push([r,n])}return t}function C(e,t,n){var r;for(let i=t;i<e.length;i++)(r=e[i]).schema??(r.schema=n)}function Ne(e,t,n){var r;let i=e.inst?._zod?.traits;i?.has(`$ZodType`)&&(i.has(`$ZodCheck`)?(r=e).schema??(r.schema=e.inst):e.schema=e.inst);let a=e.schema===e.inst?void 0:e.schema?._zod.def?.error,o=e.message?e.message:je(e.inst?._zod.def?.error?.(e))??je(a?.(e))??je(t?.error?.(e))??je(n.customError?.(e))??je(n.localeError?.(e))??`Invalid input`,s={};for(let t of Object.keys(e))t===`inst`||t===`schema`||t===`continue`||t===`input`||t===`__proto__`||(s[t]=e[t]);return s.path??=[],s.message=o,t?.reportInput&&(s.input=e.input),s}var Pe=/[\\uD800-\\uDBFF]/;function Fe(e){let t=e.length;if(!Pe.test(e))return t;let n=t;for(let r=0;r<t-1;r++)(e.charCodeAt(r)&64512)==55296&&(e.charCodeAt(r+1)&64512)==56320&&(n--,r++);return n}function Ie(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function Le(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 t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Re(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function ze(e,t){for(let n in t){let r=Object.getOwnPropertyDescriptor(t,n);r.get?Object.defineProperty(e,n,{...r,enumerable:!1}):Ue(e,n,r.value)}}function Be(e,t,n,r=!0){return Object.defineProperty(e,t,{configurable:!0,writable:!0,enumerable:r,value:n}),n}function Ve(e,t,n){return Be(e,t,n,!1)}function He(e,t){for(let n in e){let r=e[n];Object.defineProperty(t,n,{configurable:!0,enumerable:!0,get(){return Be(this,n,r(this))},set(e){Be(this,n,e)}})}return t}function Ue(e,t,n){Object.defineProperty(e,t,{configurable:!0,get(){return this==null?n:Be(this,t,n.bind(this))},set(e){Be(this,t,e)}})}function We(e,t){let n=Object.getPrototypeOf(e);return t in n?void 0:n}var Ge,Ke=!1,qe={configurable:!0,get(){Ke=!0}};function w(e,t,n){let r=Object.getPrototypeOf(e._zod);if(t in r&&Ge!==e._zod){Ge=void 0;return}Ge=e._zod,Object.defineProperty(r,t,{configurable:!0,get(){Object.defineProperty(this,t,qe);let e=Ke;Ke=!1;try{let r=n(this);return Ke?delete this[t]:Object.defineProperty(this,t,{configurable:!0,writable:!0,value:r}),Ke||=e,r}catch(n){throw delete this[t],Ke||=e,n}},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})}})}function Je(e,t,n,r){let i=We(e,t);i&&Object.defineProperty(i,t,{configurable:!0,get(){let e={configurable:!0,writable:!0,enumerable:r,value:void 0};return Object.defineProperty(this,t,e),e.value=n(this),Object.defineProperty(this,t,e),e.value},set(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,enumerable:r,value:e})}})}var Ye=`~constantCatch`;function Xe(e){let t=()=>e;return t[Ye]=!0,t}var Ze,Qe=Object.freeze({status:`aborted`}),$e={value:void 0,enumerable:!1},et=`captureStackTrace`in Error?Error:null;function tt(e){let t=et;if(t){let n=t.stackTraceLimit;if(typeof n==`number`){try{t.stackTraceLimit=0}catch{return et=null,new e}try{return new e}finally{t.stackTraceLimit=n}}}return new e}function T(e,t,n,r){let i={};function a(e){this.def=e,this.constr=d,this.traits=new Set}a.prototype=i;let o=n,s=o&&new WeakSet;function c(n,r){if(!n._zod){$e.value=new a(r);try{Object.defineProperty(n,"_zod",$e)}finally{$e.value=void 0}}else if(n._zod.traits.has(e))return;if(n._zod.traits.add(e),t(n,r),s){let e=Object.getPrototypeOf(n),t=n._zod.constr.prototype,r=e;for(;r&&r!==t;)r=Object.getPrototypeOf(r);let i=r??e;s.has(i)||(s.add(i),ze(i,o))}let i=d.prototype;for(let e in i)Object.prototype.hasOwnProperty.call(i,e)&&(e in n||(n[e]=i[e].bind(n)))}let l=r?.Parent??Object;class u extends l{}Object.defineProperty(u,"name",{value:e});function d(e){let t=r?.Parent?tt(u):this;c(t,e);let n=t._zod.deferred;if(n){for(let e of n)e();t._zod.deferred=void 0}let i=globalThis.__zod_globalConfig?.postProcessor;return i&&i(t),t}return Object.defineProperty(d,"init",{value:c}),Object.defineProperty(d,Symbol.hasInstance,{value:t=>r?.Parent&&t instanceof r.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(d,"name",{value:e}),d}var E=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},nt=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(Ze=globalThis).__zod_globalConfig??(Ze.__zod_globalConfig={});var rt=globalThis.__zod_globalConfig;function it(e){return e&&Object.assign(rt,e),rt}function at(){let e=this._zod;return e.message??=JSON.stringify(e.def,d,2),e.message}function ot(e){this._zod.message=e}var st={get:at,set:ot,enumerable:!0,configurable:!0},ct={value:void 0,enumerable:!1},lt=new WeakSet([Object.prototype,Error.prototype]),ut=(e,t)=>{e.name=`$ZodError`,ct.value=t,Object.defineProperty(e,"issues",ct),ct.value=void 0,Object.defineProperty(e,"message",st);let n=Object.getPrototypeOf(e);lt.has(n)||(lt.add(n),Object.defineProperty(n,"toString",{configurable:!0,enumerable:!1,get(){let e=()=>this.message;return Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,"toString",{value:e,configurable:!0,writable:!0})}}))},dt=T(`$ZodError`,ut);T(`$ZodError`,ut,void 0,{Parent:Error});function ft(e,t,n){return Object.prototype.hasOwnProperty.call(e,t)||(t===`__proto__`?Object.defineProperty(e,t,{value:n(),writable:!0,enumerable:!0,configurable:!0}):e[t]=n()),e[t]}function pt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?ft(n,i.path[0],()=>[]).push(t(i)):r.push(t(i));return{formErrors:r,fieldErrors:n}}function mt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i],o=i===e.length-1;if(n===`_errors`){o&&r._errors.push(t(a)),i++;continue}Object.prototype.hasOwnProperty.call(r,n)||Object.defineProperty(r,n,{value:{_errors:[]},enumerable:!0,writable:!0,configurable:!0});let s=r[n];o&&s._errors.push(t(a)),r=s,i++}}}};return r(e),n}function ht(e,t){return{callee:t?.callee??e,Err:t?.Err}}var gt=e=>{let t=(n,r,i,a)=>{let o=i?{...i,async:!1}:{async:!1},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise)throw new E;if(s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ne(e,o,it())));throw ue(n,a?.callee??t),n}return s.value};return t},_t=e=>{let t=async(n,r,i,a)=>{let o=i?{...i,async:!0}:{async:!0},s=n._zod.run({value:r,issues:[]},o);if(s instanceof Promise&&(s=await s),s.issues.length){let n=new((a?.Err)??e)(s.issues.map(e=>Ne(e,o,it())));throw ue(n,a?.callee??t),n}return s.value};return t},vt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new E;return a.issues.length?yt(e,a.issues,i):{success:!0,data:a.value}};function yt(e,t,n){let r;return{success:!1,get error(){return r||(r=new e(t.map(e=>Ne(e,n,it()))),t=void 0,n=void 0),r},set error(e){r=e,t=void 0,n=void 0}}}var bt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?yt(e,a.issues,i):{success:!0,data:a.value}},xt=Symbol.for(`zod.compile.invalid`),St=Symbol.for(`zod.compile.fallback`),Ct=((e,t,n)=>{let r=e._zod.bag.validator;if(r!==void 0){if(r(t)!==xt)return!0;if(r.definite===!0&&n===void 0)return!1}return wt(e,t,n)});function wt(e,t,n){let r=n?{...n,async:!1,abortEarly:!0}:{async:!1,abortEarly:!0},i=e._zod.bag.fallbackRun,a;if(i?(r[St]=!0,a=i({value:t,issues:[]},r)):a=e._zod.run({value:t,issues:[]},r),a instanceof Promise)throw new E;return a.issues.length===0}var Tt=async(e,t,n)=>{let r=n?{...n,async:!0,abortEarly:!0}:{async:!0,abortEarly:!0},i=e._zod.run({value:t,issues:[]},r);return i instanceof Promise&&(i=await i),i.issues.length===0},Et=e=>{let t=gt(e),n=(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return t(e,r,o,ht(n,a))};return n},Dt=e=>{let t=gt(e),n=(e,r,i,a)=>t(e,r,i,ht(n,a));return n},Ot=e=>{let t=_t(e),n=async(e,r,i,a)=>{let o=i?{...i,direction:`backward`}:{direction:`backward`};return await t(e,r,o,ht(n,a))};return n},kt=e=>{let t=_t(e),n=async(e,r,i,a)=>await t(e,r,i,ht(n,a));return n},At=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return vt(e)(t,n,i)},jt=e=>(t,n,r)=>vt(e)(t,n,r),Mt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return bt(e)(t,n,i)},Nt=e=>async(t,n,r)=>bt(e)(t,n,r),Pt=/^[cC][0-9a-z]{6,}$/,Ft=/^[0-9a-z]+$/,It=/^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/,Lt=/^[0-9a-vA-V]{20}$/,Rt=/^[A-Za-z0-9]{27}$/,zt=/^[a-zA-Z0-9_-]{21}$/;function Bt(e){return RegExp(`^[a-zA-Z0-9_-]{${e}}$`)}var Vt=/^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/,Ht=/^([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})$/,Ut=e=>e?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)$/,Wt=/^(?:[A-Za-z0-9_\'+\\-]+\\.)*[A-Za-z0-9_\'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/,Gt=`^(?=[\\\\s\\\\S]*[\\\\p{Extended_Pictographic}\\\\p{Regional_Indicator}\\\\u20E3])[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$`;function Kt(){return new RegExp(Gt,`u`)}var qt=/^(?:(?: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])$/,Jt=/^(([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}|:))$/,Yt=/^((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])$/,Xt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Zt=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Qt=/^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/,$t=/^https?$/,en=/^\\+[1-9]\\d{6,14}$/,tn=`(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))`;function nn(e){return RegExp(`^${e}$`)}var rn=nn(tn);function D(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}}`:e.seconds?`${t}:[0-5]\\\\d(?:\\\\.\\\\d+)?`:`${t}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`}function an(e){return RegExp(`^${D(e)}$`)}function on(e){let t=[`Z`];e.offset&&t.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);let n=`${D({precision:e.precision,seconds:!0})}(?:${t.join(`|`)})`,r=e.local?`${n}|${D({precision:e.precision})}`:n;return RegExp(`^${tn}T(?:${r})$`)}var sn=/^[\\s\\S]{0,}$/,cn=/^-?\\d+$/,ln=/^-?\\d+(?:\\.\\d+)?$/,un=/^(?:true|false)$/i,dn=/^null$/i,fn=/^undefined$/i,pn=/^[^A-Z]*$/,mn=/^[^a-z]*$/,hn=T(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),gn=e=>{let t=e.value;return!m(t)&&t.length!==void 0},_n={number:`number`,bigint:`bigint`,object:`date`},vn=T(`$ZodCheckLessThan`,(e,t)=>{hn.init(e,t);let n=_n[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:_n[typeof r.value]??n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),yn=T(`$ZodCheckGreaterThan`,(e,t)=>{hn.init(e,t);let n=_n[typeof t.value];e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:_n[typeof r.value]??n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),bn=T(`$ZodCheckMultipleOf`,(e,t)=>{hn.init(e,t),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?t.value!==BigInt(0)&&n.value%t.value===BigInt(0):g(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})}}),xn=T(`$ZodCheckNumberFormat`,(e,t)=>{hn.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=ye[t.format];e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Sn=T(`$ZodCheckMaxLength`,(e,t)=>{var n;hn.init(e,t),(n=e._zod.def).when??(n.when=gn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>t.maximum?Fe(r):i)<=t.maximum)return;let a=Ie(r);n.issues.push({origin:a,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Cn=T(`$ZodCheckMinLength`,(e,t)=>{var n;hn.init(e,t),(n=e._zod.def).when??(n.when=gn),e._zod.check=n=>{let r=n.value,i=r.length;if((typeof r==`string`&&i>=t.minimum&&i<t.minimum*2?Fe(r):i)>=t.minimum)return;let a=Ie(r);n.issues.push({origin:a,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),wn=T(`$ZodCheckLengthEquals`,(e,t)=>{var n;hn.init(e,t),(n=e._zod.def).when??(n.when=gn),e._zod.check=n=>{let r=n.value,i=r.length,a=typeof r==`string`&&i>=t.length&&i<=t.length*2?Fe(r):i;if(a===t.length)return;let o=Ie(r),s=a>t.length;n.issues.push({origin:o,...s?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Tn=T(`$ZodCheckStringFormat`,(e,t)=>{var n,r;hn.init(e,t),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),En=T(`$ZodCheckRegex`,(e,t)=>{Tn.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})}}),Dn=T(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=pn,Tn.init(e,t)}),On=T(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=mn,Tn.init(e,t)}),kn=T(`$ZodCheckIncludes`,(e,t)=>{hn.init(e,t);let n=ge(t.includes);t.pattern=new RegExp(typeof t.position==`number`?`^.{${t.position},}${n}`:n),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),An=T(`$ZodCheckStartsWith`,(e,t)=>{hn.init(e,t);let n=RegExp(`^${ge(t.prefix)}.*`);t.pattern??=n,e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),jn=T(`$ZodCheckEndsWith`,(e,t)=>{hn.init(e,t);let n=RegExp(`.*${ge(t.suffix)}$`);t.pattern??=n,e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}}),Mn=T(`$ZodCheckOverwrite`,(e,t)=>{hn.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),Nn=class{constructor(e=[],t={}){this.content=[],this.indent=0,this.args=e,this.closed=t}indented(e){this.indent+=1;try{e(this)}finally{--this.indent}}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`\n`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.content??[``];return new e(...Object.keys(this.closed),`return function (${this.args.join(`, `)}) {\\n${t.join(`\n`)}\\n};`)(...Object.values(this.closed))}},Pn={major:4,minor:6,patch:7},O=T(`$ZodType`,(e,t)=>{var n;e??={},e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=Pn;let r=e._zod.def.checks,i=e._zod.traits.has(`$ZodCheck`)?[e,...r??[]]:r?.length?[...r]:[];for(let t of i)for(let n of t._zod.onattach)n(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(t,n,r)=>{if(t.memo)return t;let i=S(t),a;for(let o of n){if(o._zod.def.when){if(ke(t)||!o._zod.def.when(t))continue}else if(i)continue;let n=t.issues.length,s=o._zod.check(t);if(s instanceof Promise&&r?.async===!1)throw new E;if(a||s instanceof Promise)a=(a??Promise.resolve()).then(async()=>{await s,t.issues.length!==n&&(C(t.issues,n,e),i||=S(t,n))});else{if(t.issues.length===n)continue;C(t.issues,n,e),i||=S(t,n)}}return a?a.then(()=>t):t},n=(n,r,a)=>{if(S(n))return n.aborted=!0,n;let o=t(r,i,a);if(o instanceof Promise){if(a.async===!1)throw new E;return o.then(t=>e._zod.parse(t,a))}return e._zod.parse(o,a)};e._zod.run=(r,a)=>{if(a.skipChecks)return e._zod.parse(r,a);if(a.direction===`backward`){let t=e._zod.parse({value:r.value,issues:[]},{...a,skipChecks:!0});return t instanceof Promise?t.then(e=>n(e,r,a)):n(t,r,a)}let o=e._zod.parse(r,a);if(o instanceof Promise){if(a.async===!1)throw new E;return o.then(e=>t(e,i,a))}return t(o,i,a)}}},{get"~standard"(){return Ve(this,`~standard`,Ln(this))},set"~standard"(e){Be(this,`~standard`,e)}}),Fn=(e,t)=>e.issues.length?{issues:e.issues.map(e=>Ne(e,t,it()))}:{value:e.value};async function In(e,t){let n={async:!0};return Fn(await e._zod.run({value:t,issues:[]},n),n)}function Ln(e){return{validate:t=>{let n={async:!1};try{let r=e._zod.run({value:t,issues:[]},n);if(!(r instanceof Promise))return Fn(r,n)}catch{}return In(e,t)},vendor:`zod`,version:1}}var Rn=T(`$ZodString`,(e,t)=>{O.init(e,t),e._zod.pattern=t.pattern??sn,e._zod.parse=(n,r)=>{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}}),k=T(`$ZodStringFormat`,(e,t)=>{Tn.init(e,t),Rn.init(e,t)}),zn=T(`$ZodGUID`,(e,t)=>{t.pattern??=Ht,k.init(e,t)}),Bn=T(`$ZodUUID`,(e,t)=>{if(t.version){let e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(e===void 0)throw Error(`Invalid UUID version: "${t.version}"`);t.pattern??=Ut(e)}else t.pattern??=Ut();k.init(e,t)}),Vn=T(`$ZodEmail`,(e,t)=>{t.pattern??=Wt,k.init(e,t)});function Hn(e){try{return typeof URL<`u`&&typeof URL.canParse==`function`?URL.canParse(e):(new URL(e),!0)}catch{return!1}}function Un(e,t){return!(`normalize`in t)&&!(`hostname`in t)&&!(`protocol`in t)?Hn(e)||2:Wn(e,t)}function Wn(e,t){if(!t.normalize&&t.protocol?.source===$t.source&&!/^https?:\\/\\//i.test(e))return 1;try{if(typeof URL<`u`){let t=URL;if(typeof t.parse==`function`)return t.parse(e)??2}return new URL(e)}catch{return 2}}var Gn=/[\\t\\n\\r]/g;function Kn(e){return e.replace(Gn,``)}function qn(e,t){return t.lastIndex=0,t.test(e.hostname)}function Jn(e,t){return t.lastIndex=0,t.test(e.protocol.endsWith(`:`)?e.protocol.slice(0,-1):e.protocol)}var Yn=T(`$ZodURL`,(e,t)=>{k.init(e,t),e._zod.check=n=>{try{let r=n.value.trim(),i=Un(r,t);if(i===1){n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid URL format`,input:n.value,inst:e,continue:!t.abort});return}if(i===2){n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort});return}if(i===!0){n.value=Kn(r);return}t.hostname&&!qn(i,t.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&&!Jn(i,t.protocol)&&n.issues.push({code:`invalid_format`,format:`url`,note:`Invalid protocol`,pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort}),n.value=t.normalize?i.href:Kn(r);return}catch{n.issues.push({code:`invalid_format`,format:`url`,input:n.value,inst:e,continue:!t.abort})}}}),Xn=T(`$ZodEmoji`,(e,t)=>{t.pattern??=Kt(),k.init(e,t)}),Zn=T(`$ZodNanoID`,(e,t)=>{if(t.length!==void 0&&(!Number.isInteger(t.length)||t.length<1))throw Error(`Invalid nanoid length: ${t.length}`);t.pattern??=t.length===void 0?zt:Bt(t.length),k.init(e,t)}),Qn=T(`$ZodCUID`,(e,t)=>{t.pattern??=Pt,k.init(e,t)}),$n=T(`$ZodCUID2`,(e,t)=>{t.pattern??=Ft,k.init(e,t)}),er=T(`$ZodULID`,(e,t)=>{t.pattern??=It,k.init(e,t)}),tr=T(`$ZodXID`,(e,t)=>{t.pattern??=Lt,k.init(e,t)}),nr=T(`$ZodKSUID`,(e,t)=>{t.pattern??=Rt,k.init(e,t)}),rr=T(`$ZodISODateTime`,(e,t)=>{t.pattern??=on(t),k.init(e,t)}),ir=T(`$ZodISODate`,(e,t)=>{t.pattern??=rn,k.init(e,t)}),ar=T(`$ZodISOTime`,(e,t)=>{t.pattern??=an(t),k.init(e,t)}),or=T(`$ZodISODuration`,(e,t)=>{t.pattern??=Vt,k.init(e,t)}),sr=T(`$ZodIPv4`,(e,t)=>{t.pattern??=qt,k.init(e,t)}),cr=/^[0-9a-fA-F:.]+$/;function lr(e){return cr.test(e)?Hn(`http://[${e}]`):!1}var ur=T(`$ZodIPv6`,(e,t)=>{t.pattern??=Jt,k.init(e,t),e._zod.check=n=>{lr(n.value)||n.issues.push({code:`invalid_format`,format:`ipv6`,input:n.value,inst:e,continue:!t.abort})}}),dr=T(`$ZodCIDRv4`,(e,t)=>{t.pattern??=Yt,k.init(e,t)});function fr(e){let t=e.split(`/`);if(t.length!==2)return!1;let[n,r]=t;if(!r)return!1;let i=Number(r);return`${i}`!==r||i<0||i>128?!1:lr(n)}var pr=T(`$ZodCIDRv6`,(e,t)=>{t.pattern??=Xt,k.init(e,t),e._zod.check=n=>{fr(n.value)||n.issues.push({code:`invalid_format`,format:`cidrv6`,input:n.value,inst:e,continue:!t.abort})}});function mr(e){if(e===``)return!0;if(/\\s/.test(e)||e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var hr=/^[0-9a-zA-Z+/]*={0,2}$/,gr=T(`$ZodBase64`,(e,t)=>{t.pattern??=hr,k.init(e,t),e._zod.check=n=>{mr(n.value)||n.issues.push({code:`invalid_format`,format:`base64`,input:n.value,inst:e,continue:!t.abort})}}),_r=/^[A-Za-z0-9_-]*$/;function vr(e){if(!_r.test(e))return!1;let t=e.replace(/[-_]/g,e=>e===`-`?`+`:`/`);return mr(t.padEnd(Math.ceil(t.length/4)*4,`=`))}var yr=T(`$ZodBase64URL`,(e,t)=>{t.pattern??=_r,k.init(e,t),e._zod.check=n=>{vr(n.value)||n.issues.push({code:`invalid_format`,format:`base64url`,input:n.value,inst:e,continue:!t.abort})}}),br=T(`$ZodE164`,(e,t)=>{t.pattern??=en,k.init(e,t)});function xr(e,t=null){try{let n=e.split(`.`);if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!(`typ`in i&&i?.typ!==`JWT`||!i.alg||t&&(!(`alg`in i)||i.alg!==t))}catch{return!1}}var Sr=T(`$ZodJWT`,(e,t)=>{k.init(e,t),e._zod.check=n=>{xr(n.value,t.alg)||n.issues.push({code:`invalid_format`,format:`jwt`,input:n.value,inst:e,continue:!t.abort})}}),Cr=T(`$ZodNumber`,(e,t)=>{O.init(e,t),e._zod.pattern=ln,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i==`number`&&!Number.isNaN(i)&&Number.isFinite(i))return n;let a=typeof i==`number`?Number.isNaN(i)?`NaN`:Number.isFinite(i)?void 0:String(i):void 0;return n.issues.push({expected:`number`,code:`invalid_type`,input:i,inst:e,...a?{received:a}:{}}),n}}),wr=T(`$ZodNumberFormat`,(e,t)=>{xn.init(e,t),Cr.init(e,t)}),Tr=T(`$ZodBoolean`,(e,t)=>{O.init(e,t),e._zod.pattern=un,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i==`boolean`||n.issues.push({expected:`boolean`,code:`invalid_type`,input:i,inst:e}),n}}),Er=T(`$ZodUndefined`,(e,t)=>{O.init(e,t),e._zod.pattern=fn,e._zod.values=new Set([void 0]),e._zod.parse=(t,n)=>{let r=t.value;return r===void 0||t.issues.push({expected:`undefined`,code:`invalid_type`,input:r,inst:e}),t}}),Dr=T(`$ZodNull`,(e,t)=>{O.init(e,t),e._zod.pattern=dn,e._zod.values=new Set([null]),e._zod.parse=(t,n)=>{let r=t.value;return r===null||t.issues.push({expected:`null`,code:`invalid_type`,input:r,inst:e}),t}}),Or=T(`$ZodAny`,(e,t)=>{O.init(e,t),e._zod.parse=e=>e}),kr=T(`$ZodUnknown`,(e,t)=>{O.init(e,t),e._zod.parse=e=>e}),Ar=T(`$ZodNever`,(e,t)=>{O.init(e,t),e._zod.parse=(t,n)=>(t.issues.push({expected:`never`,code:`invalid_type`,input:t.value,inst:e}),t)});function jr(e,t){let n=Me(e._zod.def.checks);if(!n.length)return;let r=Math.min(...n.map(e=>e[0])),i=e._zod.parse;e._zod.parse=(n,a)=>{let o=t(n.value);if(o>r&&!a?.skipChecks&&a?.direction!==`backward`){for(let[t,r]of Me(e._zod.def.checks))if(o>t&&r._zod.def.when(n)){let t=n.issues.length;return r._zod.check(n),n.issues[t].continue=!1,C(n.issues,t,e),n}}return i(n,a)}}var Mr=e=>Array.isArray(e)?e.length:-1;function Nr(e,t,n){e.issues.length&&t.issues.push(...Ae(n,e.issues)),t.value[n]=e.value}var Pr=T(`$ZodArray`,(e,t)=>{O.init(e,t);let n=rt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!Array.isArray(a))return r.issues.push({expected:`array`,code:`invalid_type`,input:a,inst:e}),r;r.value=n?n.alloc(e,r,Array(a.length),i):Array(a.length);let o=[],s=i?.abortEarly;for(let e=0;e<a.length;e++){let n=a[e],c=t.element._zod.run({value:n,issues:[]},i);if(c instanceof Promise)o.push(c.then(t=>Nr(t,r,e)));else if(Nr(c,r,e),s&&c.issues.length!==0&&S(c))break}return o.length?Promise.all(o).then(()=>r):r},jr(e,Mr)});function Fr(e,t,n,r,i,a){let o=n in r,s=a===`optional`;if(!(!o&&s&&i===`optional`)){if(e.issues.length){if(i!==void 0&&s&&!o)return;t.issues.push(...Ae(n,e.issues))}if(!o&&i===void 0){e.issues.length||t.issues.push({code:`invalid_type`,expected:`nonoptional`,input:void 0,path:[n]});return}e.value===void 0?(o||i===`defaulted`&&!s)&&(t.value[n]=void 0):t.value[n]=e.value}}var Ir=[];function Lr(e){let t=Object.keys(e.shape),n=Object.getOwnPropertySymbols(e.shape),r=n.length?n:Ir,i=r.length?[...t,...r]:t;for(let t of i)if(!e.shape?.[t]?._zod?.traits?.has(`$ZodType`))throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);let a=ve(e.shape);return{...e,allKeys:i,symbolKeys:r,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(a)}}function Rr(e,t,n,r,i,a,o){let s=[],c=i.keySet,l=i.catchall._zod,u=l.def.type,d=l.optin,f=l.optout,p=0;for(let i in t){if(o&&n.issues.length!==p){if(S(n,p))break;p=n.issues.length}if(c.has(i))continue;if(i===`__proto__`){u===`never`&&s.push(i);continue}if(u===`never`){s.push(i);continue}let a=l.run({value:t[i],issues:[]},r);a instanceof Promise?e.push(a.then(e=>Fr(e,n,i,t,d,f))):Fr(a,n,i,t,d,f)}return s.length&&n.issues.push({code:`unrecognized_keys`,keys:s,input:t,inst:a,continue:!0}),e.length?Promise.all(e).then(()=>n):n}var zr=T(`$ZodObject`,(e,t)=>{O.init(e,t);let n=Object.getOwnPropertyDescriptor(t,`shape`),r=n?.get?n.get.raw:t.shape??{};if(r){let e=()=>{let n={...r};return Object.defineProperty(t,"shape",{value:n}),e.raw=n,n};e.raw=r,Object.defineProperty(t,"shape",{get:e})}let i=p(()=>Lr(t));w(e,`propValues`,e=>{let t=e.def.shape,n={};for(let e in t){let r=t[e]._zod;if(r.values){Object.prototype.hasOwnProperty.call(n,e)||_(n,e,new Set);for(let t of r.values)n[e].add(t);r.optin!==void 0&&n[e].add(void 0)}}return n});let a=de,o=t.catchall,s,c=rt.memoizer;c?.attach(e),e._zod.parse=(t,n)=>{s??=i.value;let r=t.value;if(!a(r))return t.issues.push({expected:`object`,code:`invalid_type`,input:r,inst:e}),t;t.value=c?c.alloc(e,t,{},n):{};let l=[],u=s.shape,d=n?.abortEarly,f=t.issues.length;for(let e of s.allKeys){if(d&&t.issues.length!==f){if(S(t,f))break;f=t.issues.length}if(e===`__proto__`)continue;let i=u[e],a=i._zod.optin,o=i._zod.optout,s=i._zod.run({value:r[e],issues:[]},n);s instanceof Promise?l.push(s.then(n=>Fr(n,t,e,r,a,o))):Fr(s,t,e,r,a,o)}return o?Rr(l,r,t,n,i.value,e,d===!0):l.length?Promise.all(l).then(()=>t):t}}),Br=T(`$ZodObjectJIT`,(e,t)=>{zr.init(e,t);let n=e._zod.parse,r=p(()=>Lr(t)),i=rt.memoizer,a=t=>{let n=r.value,a=n.symbolKeys,o=new Nn([`payload`,`ctx`],{shape:t,inst:e,memo:i,syms:a}),s=e=>`shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`,c=(e,t)=>`\n let ${e}_ab = false;\n for (let i = 0; i < ${e}.issues.length; i++) {\n const iss = ${e}.issues[i];\n iss.path = iss.path ? [${t}, ...iss.path] : [${t}];\n payload.issues.push(iss);\n if (iss.continue !== true) ${e}_ab = true;\n }\n if (${e}_ab && ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }`;o.write(`const input = payload.value;`);let l=Object.create(null),u=0;for(let e of n.allKeys)l[e]=`key_${u++}`;o.write(i?`const newResult = memo.alloc(inst, payload, {}, ctx);`:`const newResult = {};`);for(let e of n.allKeys){if(e===`__proto__`)continue;let n=l[e],r=typeof e==`symbol`?`syms[${a.indexOf(e)}]`:ce(e),i=`${r} in input`,u=t[e],d=u?._zod?.optin,f=d!==void 0,p=u?._zod?.optout===`optional`;if(o.write(`const ${n} = ${s(r)};`),f&&p){let e=d===`optional`?`${n}_present`:`${n}.value !== undefined || ${n}_present`;o.write(`\n const ${n}_present = ${i};\n if (!${n}.issues.length || ${n}_present) {\n if (${n}.issues.length) {${c(n,r)}\n }\n\n if (${e}) {\n newResult[${r}] = ${n}.value;\n }\n }\n\n `)}else f?(o.write(`\n if (${n}.issues.length) {${c(n,r)}\n }\n `),d===`defaulted`?o.write(`newResult[${r}] = ${n}.value;`):o.write(`\n if (${n}.value !== undefined || ${i}) {\n newResult[${r}] = ${n}.value;\n }\n `)):o.write(`\n const ${n}_present = ${i};\n if (${n}.issues.length) {${c(n,r)}\n }\n if (!${n}_present && !${n}.issues.length) {\n payload.issues.push({\n code: "invalid_type",\n expected: "nonoptional",\n input: undefined,\n path: [${r}]\n });\n if (ctx && ctx.abortEarly) {\n payload.value = newResult;\n return payload;\n }\n }\n\n if (${n}_present) {\n newResult[${r}] = ${n}.value;\n }\n\n `)}return o.write(`payload.value = newResult;`),o.write(`return payload;`),o.compile()},o,s=de,c=!rt.jitless,l=c&&fe.value,u=t.catchall,d;e._zod.parse=(i,f)=>{d??=r.value;let p=i.value;return s(p)?c&&l&&f?.async===!1&&f.jitless!==!0?(o||=a(t.shape),i=o(i,f),u?Rr([],p,i,f,d,e,f?.abortEarly===!0):i):n(i,f):(i.issues.push({expected:`object`,code:`invalid_type`,input:p,inst:e}),i)}});function Vr(e,t,n,r){for(let n of e)if(n.issues.length===0)return t.value=n.value,t;let i=e.filter(e=>!S(e));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:`invalid_union`,input:t.value,inst:n,errors:e.map(e=>e.issues.map(e=>Ne(e,r,it())))}),t)}var Hr=T(`$ZodUnion`,(e,t)=>{O.init(e,t),w(e,`optin`,e=>e.def.options.some(e=>e._zod.optin===`defaulted`)?`defaulted`:e.def.options.some(e=>e._zod.optin!==void 0)?`optional`:void 0),w(e,`optout`,e=>e.def.options.some(e=>e._zod.optout===`optional`)?`optional`:void 0),w(e,`values`,e=>{if(e.def.options.every(e=>e._zod.values))return new Set(e.def.options.flatMap(e=>Array.from(e._zod.values)))}),w(e,`pattern`,e=>{if(e.def.options.every(e=>e._zod.pattern)){let t=e.def.options.map(e=>e._zod.pattern);return RegExp(`^(${t.map(e=>h(e.source)).join(`|`)})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let a=!1,o=[];for(let e of t.options){let t=e._zod.run({value:r.value,issues:[]},i);if(t instanceof Promise)o.push(t),a=!0;else{if(t.issues.length===0)return t;o.push(t)}}return a?Promise.all(o).then(t=>Vr(t,r,e,i)):Vr(o,r,e,i)}});function Ur(e){let t=new Map;for(let n of e.options){let r=n._zod.propValues?.[e.discriminator];if(!r||r.size===0)throw Error(`Invalid discriminated union option at index "${e.options.indexOf(n)}"`);for(let e of r)if(t.has(e)){if(e!==void 0)throw Error(`Duplicate discriminator value "${String(e)}"`);t.set(e,null)}else t.set(e,n)}return t}var Wr=T(`$ZodDiscriminatedUnion`,(e,t)=>{t.inclusive=!1,Hr.init(e,t);let n=e._zod.parse;w(e,`propValues`,e=>{let t={},n=0;for(let r of e.def.options){let i=r._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${e.def.options.indexOf(r)}"`);i[e.def.discriminator]?.has(void 0)&&n++;for(let[e,n]of Object.entries(i)){Object.prototype.hasOwnProperty.call(t,e)||_(t,e,new Set);for(let r of n)t[e].add(r)}}return!e.def.unionFallback&&n>1&&t[e.def.discriminator]?.delete(void 0),t}),t.options.forEach((e,n)=>{let r=ne(e._zod.def);if(r&&!Object.prototype.hasOwnProperty.call(r,t.discriminator))throw Error(`Invalid discriminated union option at index "${n}"`)});let r=p(()=>Ur(t));e._zod.parse=(i,a)=>{let o=i.value;if(!de(o))return i.issues.push({code:`invalid_type`,expected:`object`,input:o,inst:e}),i;let s=o?.[t.discriminator],c=r.value.get(s);return c&&(s!==void 0||a.direction!==`backward`)?c._zod.run(i,a):t.unionFallback||a.direction===`backward`?n(i,a):(i.issues.push({code:`invalid_union`,errors:[],note:`No matching discriminator`,discriminator:t.discriminator,options:Array.from(r.value.keys()).filter(e=>r.value.get(e)!==null),input:o,path:[t.discriminator],inst:e}),i)}}),Gr=T(`$ZodIntersection`,(e,t)=>{O.init(e,t),e._zod.parse=(e,n)=>{let r=e.value,i=t.left._zod.run({value:r,issues:[]},n),a=t.right._zod.run({value:r,issues:[]},n);return i instanceof Promise||a instanceof Promise?Promise.all([i,a]).then(([t,n])=>qr(e,t,n)):qr(e,i,a)}});function Kr(e,t){if(e===t||e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(pe(e)&&pe(t)){let n=Object.keys(t),r=Object.keys(e).filter(e=>n.indexOf(e)!==-1),i={...e,...t};Object.prototype.hasOwnProperty.call(i,`__proto__`)&&delete i.__proto__;for(let n of r){if(n===`__proto__`)continue;let r=Kr(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};i[n]=r.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],a=t[r],o=Kr(i,a);if(!o.valid)return{valid:!1,mergeErrorPath:[r,...o.mergeErrorPath]};n.push(o.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function qr(e,t,n){let r=new Map,i,a=new Map,o=(e,t)=>{let n;if(e.code===`unrecognized_keys`&&!e.path?.length)i??=e,n=e.keys;else if(e.code===`invalid_key`&&e.origin===`record`&&e.path?.length===1){let t=String(e.path[0]);a.has(t)||a.set(t,e),n=[t]}else return!1;for(let e of n)r.has(e)||r.set(e,{}),r.get(e)[t]=!0;return!0};for(let n of t.issues)o(n,`l`)||e.issues.push(n);for(let t of n.issues)o(t,`r`)||e.issues.push(t);let s=[...r].filter(([,e])=>e.l&&e.r).map(([e])=>e);if(s.length){let t=i?s.filter(e=>i.keys.includes(e)):[];t.length&&e.issues.push({...i,keys:t});for(let n of s)!t.includes(n)&&a.has(n)&&e.issues.push(a.get(n))}let c=Kr(t.value,n.value);if(!c.valid){if(S(e))return e;throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`)}return e.value=c.data,e}var Jr=T(`$ZodRecord`,(e,t)=>{O.init(e,t);let n=rt.memoizer;n?.attach(e),e._zod.parse=(r,i)=>{let a=r.value;if(!pe(a))return r.issues.push({expected:`record`,code:`invalid_type`,input:a,inst:e}),r;let o=[],s=t.keyType._zod.values;if(s&&!t.partial){r.value=n?n.alloc(e,r,{},i):{};let c=new Set;for(let n of s)if(typeof n==`string`||typeof n==`number`||typeof n==`symbol`){if(c.add(typeof n==`number`?n.toString():n),n===`__proto__`)continue;let s=t.keyType._zod.run({value:n,issues:[]},i);if(s instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(s.issues.length){r.issues.push({code:`invalid_key`,origin:`record`,issues:s.issues.map(e=>Ne(e,i,it())),input:n,path:[n],inst:e});continue}let l=s.value;if(l===`__proto__`)continue;let u=t.valueType._zod.run({value:a[n],issues:[]},i);u instanceof Promise?o.push(u.then(e=>{e.issues.length&&r.issues.push(...Ae(n,e.issues)),r.value[l]=e.value})):(u.issues.length&&r.issues.push(...Ae(n,u.issues)),r.value[l]=u.value)}let l;for(let e in a)if(!c.has(e))if(t.mode===`loose`){if(e===`__proto__`)continue;r.value[e]=a[e]}else l??=[],l.push(e);l&&l.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:l,continue:!0})}else{r.value=n?n.alloc(e,r,{},i):{};let c;for(let n of Reflect.ownKeys(a)){if(n===`__proto__`||!Object.prototype.propertyIsEnumerable.call(a,n))continue;let l=t.keyType._zod.run({value:n,issues:[]},i);if(l instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);if(typeof n==`string`&&ln.test(n)&&l.issues.length){let e=t.keyType._zod.run({value:Number(n),issues:[]},i);if(e instanceof Promise)throw Error(`Async schemas not supported in object keys currently`);e.issues.length===0&&(l=e)}if(l.issues.length){t.mode===`loose`?r.value[n]=a[n]:s?(c??=[],c.push(n)):r.issues.push({code:`invalid_key`,origin:`record`,issues:l.issues.map(e=>Ne(e,i,it())),input:n,path:[n],inst:e});continue}let u=l.value;if(u===`__proto__`)continue;let d=t.valueType._zod.run({value:a[n],issues:[]},i);d instanceof Promise?o.push(d.then(e=>{e.issues.length&&r.issues.push(...Ae(n,e.issues)),r.value[u]=e.value})):(d.issues.length&&r.issues.push(...Ae(n,d.issues)),r.value[u]=d.value)}c&&c.length>0&&r.issues.push({code:`unrecognized_keys`,input:a,inst:e,keys:c,continue:!0})}return o.length?Promise.all(o).then(()=>r):r}}),Yr=T(`$ZodEnum`,(e,t)=>{O.init(e,t);let n=l(t.entries),r=new Set(n);e._zod.values=r,w(e,`pattern`,e=>{let t=l(e.def.entries).filter(e=>he.has(typeof e));return RegExp(t.length?`^(${t.map(e=>ge(e.toString())).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(t,i)=>{let a=t.value;return r.has(a)||t.issues.push({code:`invalid_value`,values:n,input:a,inst:e}),t}}),Xr=T(`$ZodLiteral`,(e,t)=>{O.init(e,t);let n=new Set(t.values);e._zod.values=n,w(e,`pattern`,e=>{let t=e.def.values;return RegExp(t.length?`^(${t.map(e=>typeof e==`string`?ge(e):e?ge(e.toString()):String(e)).join(`|`)})$`:`^[^\\\\s\\\\S]$`)}),e._zod.parse=(r,i)=>{let a=r.value;return n.has(a)||r.issues.push({code:`invalid_value`,values:t.values,input:a,inst:e}),r}}),Zr=T(`$ZodTransform`,(e,t)=>{O.init(e,t),e._zod.optin=`optional`,rt.memoizer?.guard(e),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new nt(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(e=>(n.value=e,n));if(i instanceof Promise)throw new E;return n.value=i,n}});function Qr(e,t){return e.value=t.issues.length?void 0:t.value,e}var $r=T(`$ZodOptional`,(e,t)=>{O.init(e,t),w(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),e._zod.optout=`optional`,w(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t,void 0]):void 0}),w(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${h(t.source)})?$`):void 0}),e._zod.parse=(e,n)=>{if(e.value===void 0){if(t.innerType._zod.optin!==`defaulted`)return e;let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(t=>Qr(e,t)):Qr(e,r)}return t.innerType._zod.run(e,n)}}),ei=T(`$ZodExactOptional`,(e,t)=>{$r.init(e,t),w(e,`values`,e=>e.def.innerType._zod.values),w(e,`pattern`,e=>e.def.innerType._zod.pattern),e._zod.parse=(e,n)=>t.innerType._zod.run(e,n)}),ti=T(`$ZodNullable`,(e,t)=>{O.init(e,t),w(e,`optin`,e=>e.def.innerType._zod.optin),w(e,`optout`,e=>e.def.innerType._zod.optout),w(e,`pattern`,e=>{let t=e.def.innerType._zod.pattern;return t?RegExp(`^(${h(t.source)}|null)$`):void 0}),w(e,`values`,e=>e.def.innerType._zod.values?new Set([...e.def.innerType._zod.values,null]):void 0),e._zod.parse=(e,n)=>e.value===null?e:t.innerType._zod.run(e,n)}),ni=T(`$ZodDefault`,(e,t)=>{O.init(e,t),e._zod.optin=`defaulted`,w(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);if(e.value===void 0)return e.value=t.defaultValue,e;let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(e=>ri(e,t)):ri(r,t)}});function ri(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var ii=T(`$ZodPrefault`,(e,t)=>{O.init(e,t),e._zod.optin=`defaulted`,w(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>(n.direction===`backward`||e.value===void 0&&(e.value=t.defaultValue),t.innerType._zod.run(e,n))}),ai=T(`$ZodNonOptional`,(e,t)=>{O.init(e,t),w(e,`values`,e=>{let t=e.def.innerType._zod.values;return t?new Set([...t].filter(e=>e!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(t=>oi(t,e)):oi(i,e)}});function oi(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:`invalid_type`,expected:`nonoptional`,input:e.value,inst:t}),e}function si(e,t,n,r){return t.issues.length?(e.value=n.catchValue({...t,value:e.value,error:{issues:t.issues.map(e=>Ne(e,r,it()))},input:e.value}),e):(e.value=t.value,t.memo&&(e.memo=!0),e)}var ci=T(`$ZodCatch`,(e,t)=>{O.init(e,t),w(e,`optin`,e=>e.def.innerType._zod.optin===`defaulted`?`defaulted`:`optional`),w(e,`optout`,e=>e.def.innerType._zod.optout),w(e,`values`,e=>e.def.innerType._zod.values),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run({value:e.value,issues:[]},n);return r instanceof Promise?r.then(r=>si(e,r,t,n)):si(e,r,t,n)}}),li=T(`$ZodPipe`,(e,t)=>{O.init(e,t),w(e,`values`,e=>e.def.in._zod.values),w(e,`optin`,e=>e.def.in._zod.optin),w(e,`optout`,e=>e.def.out._zod.optout),w(e,`propValues`,e=>e.def.in._zod.propValues),e._zod.parse=(e,n)=>{if(n.direction===`backward`){let r=t.out._zod.run(e,n);return r instanceof Promise?r.then(e=>ui(e,t.in,n)):ui(r,t.in,n)}let r=t.in._zod.run(e,n);return r instanceof Promise?r.then(e=>ui(e,t.out,n)):ui(r,t.out,n)}});function ui(e,t,n){return e.issues.some(e=>e.code!==`unrecognized_keys`)?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues},n)}var di=T(`$ZodPreprocess`,(e,t)=>{li.init(e,t)}),fi=T(`$ZodReadonly`,(e,t)=>{O.init(e,t),w(e,`propValues`,e=>e.def.innerType._zod.propValues),w(e,`values`,e=>e.def.innerType._zod.values),w(e,`optin`,e=>e.def.innerType?._zod?.optin),w(e,`optout`,e=>e.def.innerType?._zod?.optout),e._zod.parse=(e,n)=>{if(n.direction===`backward`)return t.innerType._zod.run(e,n);let r=t.innerType._zod.run(e,n);return r instanceof Promise?r.then(pi):pi(r)}});function pi(e){return e.memo||(e.value=Object.freeze(e.value)),e}var mi=T(`$ZodLazy`,(e,t)=>{O.init(e,t),te(e._zod,`innerType`,()=>{let e=t;return e._cachedInner||=t.getter(),e._cachedInner}),w(e,`pattern`,e=>e.innerType?._zod?.pattern),w(e,`propValues`,e=>e.innerType?._zod?.propValues),w(e,`optin`,e=>e.innerType?._zod?.optin??void 0),w(e,`optout`,e=>e.innerType?._zod?.optout??void 0),e._zod.parse=(t,n)=>e._zod.innerType._zod.run(t,n)}),hi=T(`$ZodCustom`,(e,t)=>{hn.init(e,t),O.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(t=>gi(t,n,r,e));gi(i,n,r,e)}});function gi(e,t,n,r){if(!e){let e={code:`custom`,input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(e.params=r._zod.def.params),t.issues.push(Re(e))}}var _i=class extends Error{constructor(){super(`Cannot parse a reference cycle that closes through a transform`),this.name=`ZodCyclicError`}},vi=`~memo`,yi=[];function bi(e){return typeof e==`object`&&!!e}function xi(e){return e.map(e=>e.path?{...e,path:e.path.slice()}:{...e})}var Si=new WeakMap,Ci=0,wi=1,Ti=2;function Ei(e,t,n){let r=Si.get(e);if(r!==void 0)return r?Ti:Ci;if(t.has(e))return Ti;t.add(e);let i=Ci,a=e=>{if(i!==Ti&&e?._zod){let r=Ei(e,t,n);r>i&&(i=r)}},o=(e,r)=>{let i=Ci;for(let a of Reflect.ownKeys(e)){let o=Object.getOwnPropertyDescriptor(e,a);if(r&&!o.enumerable)continue;let s=o.get?wi:o.value?._zod?Ei(o.value,t,n):Ci;s>i&&(i=s)}return i},s=e=>{e>i&&(i=e)},c=e._zod.def;switch(c.type){case`object`:{let e=ne(c);s(e?o(e,!0):wi),a(c.catchall);break}case`array`:a(c.element);break;case`tuple`:for(let e of c.items)a(e);a(c.rest);break;case`record`:case`map`:a(c.keyType),a(c.valueType);break;case`set`:a(c.valueType);break;case`union`:for(let e of c.options)a(e);break;case`intersection`:a(c.left),a(c.right);break;case`optional`:case`nullable`:case`default`:case`prefault`:case`catch`:case`readonly`:case`nonoptional`:case`promise`:case`success`:a(c.innerType);break;case`pipe`:a(c.in),a(c.out);break;case`function`:a(c.input),a(c.output);break;case`lazy`:{let r=c._cachedInner??(n?e._zod.innerType:void 0);s(r?Ei(r,t,!1):wi);break}case`template_literal`:case`string`:case`number`:case`int`:case`boolean`:case`bigint`:case`symbol`:case`undefined`:case`null`:case`void`:case`never`:case`any`:case`unknown`:case`date`:case`nan`:case`enum`:case`literal`:case`file`:case`transform`:case`custom`:break;default:for(let e in c){let t=Object.getOwnPropertyDescriptor(c,e);if(!t||t.get)continue;let n=t.value;if(!(!n||typeof n!=`object`)){if(n._zod)a(n);else if(Array.isArray(n))for(let e of n)a(e)}}}return t.delete(e),Di(e,i)}function Di(e,t){return t!==wi&&Si.set(e,t===Ti),t}function Oi(e,t){let n=e.buckets.get(t);return n||(n=new WeakMap,e.buckets.set(t,n)),n}var ki,Ai=[],ji={alloc(e,t,n){let r=ki;if(!r)return n;ki=void 0;let i={value:n,issues:null};return r.set(t.value,i),Ai.push(i),n},guard(e){var t;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,n=(e,n)=>{if(n.direction!==`backward`&&Ni(n,e.value))throw new _i;return t(e,n)};e._zod.parse=n,e._zod.run===t&&(e._zod.run=n)})},attach(e){var t;let n,r=!1,i,a;(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred.push(()=>{let t=e._zod.parse,o=(s,c)=>{if(n===void 0){let i=Ei(e,new Set,!1);if(i===Ci)return e._zod.parse=t,e._zod.run===o&&(e._zod.run=t),t(s,c);i===Ti||r?n=!0:r=!0}let l=s.value;if(!bi(l))return t(s,c);let u=c[vi];u||(u={buckets:new WeakMap,backEdges:void 0},c[vi]=u);let d;i===c?d=a:(d=Oi(u,e),i=c,a=d);let f=d.get(l);if(f)return s.value=f.value,f.issues?f.issues.length&&s.issues.push(...xi(f.issues)):(s.memo=!0,u.backEdges??=new WeakSet,u.backEdges.add(f.value)),s;ki=d;let p=Ai.length,m=t(s,c);ki=void 0;let h=Ai.length>p?Ai.pop():void 0;return m instanceof Promise?m.then(e=>(h&&(h.issues=e.issues.length?xi(e.issues):yi),e)):(h&&(h.issues=m.issues.length?xi(m.issues):yi),m)};e._zod.parse=o,e._zod.run===t&&(e._zod.run=o)})}};function Mi(){return ji}function Ni(e,t){let n=e[vi]?.backEdges;return n!==void 0&&bi(t)&&n.has(t)}var Pi=()=>{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(t){return e[t]??null}let n={regex:`input`,email:`email address`,url:`URL`,emoji:`emoji`,uuid:`UUID`,uuidv4:`UUIDv4`,uuidv6:`UUIDv6`,nanoid:`nanoid`,guid:`GUID`,cuid:`cuid`,cuid2:`cuid2`,ulid:`ULID`,xid:`XID`,ksuid:`KSUID`,datetime:`ISO datetime`,date:`ISO date`,time:`ISO time`,duration:`ISO duration`,ipv4:`IPv4 address`,ipv6:`IPv6 address`,mac:`MAC address`,cidrv4:`IPv4 range`,cidrv6:`IPv6 range`,base64:`base64-encoded string`,base64url:`base64url-encoded string`,json_string:`JSON string`,e164:`E.164 number`,currency_code:`currency code`,credit_card:`credit card number`,iban:`IBAN`,jwt:`JWT`,template_literal:`input`},r={nan:`NaN`};function i(e,t){return e===`number`&&typeof t==`number`&&!Number.isFinite(t)?String(t):r[e]??e}return e=>{switch(e.code){case`invalid_type`:return`Invalid input: expected ${i(e.expected)}, received ${i(Le(e.input),e.input)}`;case`invalid_value`:return e.values.length===1?`Invalid input: expected ${_e(e.values[0])}`:`Invalid option: expected one of ${u(e.values,`|`)}`;case`too_big`:{let n=e.exact?`exactly `:e.inclusive?`<=`:`<`,r=t(e.origin);return r?`Too big: expected ${e.origin??`value`} to have ${n}${e.maximum.toString()} ${r.unit??`elements`}`:`Too big: expected ${e.origin??`value`} to be ${n}${e.maximum.toString()}`}case`too_small`:{let n=e.exact?`exactly `:e.inclusive?`>=`:`>`,r=t(e.origin);return r?`Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}`:`Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`}case`invalid_format`:{let t=e;return t.format===`starts_with`?`Invalid string: must start with "${t.prefix}"`:t.format===`ends_with`?`Invalid string: must end with "${t.suffix}"`:t.format===`includes`?`Invalid string: must include "${t.includes}"`:t.format===`regex`?`Invalid string: must match pattern ${t.pattern}`:`Invalid ${n[t.format]??e.format}`}case`not_multiple_of`:return`Invalid number: must be a multiple of ${e.divisor}`;case`unrecognized_keys`:return`Unrecognized key${e.keys.length>1?`s`:``}: ${u(e.keys,`, `)}`;case`invalid_key`:return`Invalid key in ${e.origin}`;case`invalid_union`:return e.options&&Array.isArray(e.options)&&e.options.length>0?`Invalid discriminator value. Expected ${e.options.map(e=>`\'${e}\'`).join(` | `)}`:e.inclusive===!1?`Invalid input: more than one option matched`:`Invalid input`;case`invalid_element`:return`Invalid value in ${e.origin}`;default:return`Invalid input`}}};function Fi(){return{localeError:Pi()}}var Ii,Li=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){let n=t[0];return this._map.set(e,n),n&&typeof n==`object`&&`id`in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t=this._map.get(e);return t&&typeof t==`object`&&`id`in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){let t=e._zod.parent;if(t){let n={...this.get(t)??{}};delete n.id;let r={...n,...this._map.get(e)};return Object.keys(r).length?r:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function Ri(){return new Li}(Ii=globalThis).__zod_globalRegistry??(Ii.__zod_globalRegistry=Ri());var zi=globalThis.__zod_globalRegistry;function Bi(e){return e.checks&&=[...e.checks],e}function Vi(e,t){return new e(Bi({type:`string`,...b(t)}))}function Hi(e,t){return new e({type:`string`,format:`email`,check:`string_format`,abort:!1,...b(t)})}function Ui(e,t){return new e({type:`string`,format:`guid`,check:`string_format`,abort:!1,...b(t)})}function Wi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,...b(t)})}function Gi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v4`,...b(t)})}function Ki(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v6`,...b(t)})}function qi(e,t){return new e({type:`string`,format:`uuid`,check:`string_format`,abort:!1,version:`v7`,...b(t)})}function Ji(e,t){return new e({type:`string`,format:`url`,check:`string_format`,abort:!1,...b(t)})}function Yi(e,t){return new e({type:`string`,format:`emoji`,check:`string_format`,abort:!1,...b(t)})}function Xi(e,t){return new e({type:`string`,format:`nanoid`,check:`string_format`,abort:!1,...b(t)})}function Zi(e,t){return new e({type:`string`,format:`cuid`,check:`string_format`,abort:!1,...b(t)})}function Qi(e,t){return new e({type:`string`,format:`cuid2`,check:`string_format`,abort:!1,...b(t)})}function $i(e,t){return new e({type:`string`,format:`ulid`,check:`string_format`,abort:!1,...b(t)})}function ea(e,t){return new e({type:`string`,format:`xid`,check:`string_format`,abort:!1,...b(t)})}function ta(e,t){return new e({type:`string`,format:`ksuid`,check:`string_format`,abort:!1,...b(t)})}function na(e,t){return new e({type:`string`,format:`ipv4`,check:`string_format`,abort:!1,...b(t)})}function ra(e,t){return new e({type:`string`,format:`ipv6`,check:`string_format`,abort:!1,...b(t)})}function ia(e,t){return new e({type:`string`,format:`cidrv4`,check:`string_format`,abort:!1,...b(t)})}function aa(e,t){return new e({type:`string`,format:`cidrv6`,check:`string_format`,abort:!1,...b(t)})}function oa(e,t){return new e({type:`string`,format:`base64`,check:`string_format`,abort:!1,...b(t)})}function sa(e,t){return new e({type:`string`,format:`base64url`,check:`string_format`,abort:!1,...b(t)})}function ca(e,t){return new e({type:`string`,format:`e164`,check:`string_format`,abort:!1,...b(t)})}function la(e,t){return new e({type:`string`,format:`jwt`,check:`string_format`,abort:!1,...b(t)})}function ua(e,t){return new e({type:`string`,format:`datetime`,check:`string_format`,offset:!1,local:!1,precision:null,...b(t)})}function da(e,t){return new e({type:`string`,format:`date`,check:`string_format`,...b(t)})}function fa(e,t){return new e({type:`string`,format:`time`,check:`string_format`,precision:null,...b(t)})}function pa(e,t){return new e({type:`string`,format:`duration`,check:`string_format`,...b(t)})}function ma(e,t){return new e(Bi({type:`number`,checks:[],...b(t)}))}function ha(e,t){return new e(Bi({type:`number`,coerce:!0,checks:[],...b(t)}))}function ga(e,t){return new e({type:`number`,check:`number_format`,abort:!1,format:`safeint`,...b(t)})}function _a(e,t){return new e({type:`boolean`,...b(t)})}function va(e,t){return new e({type:`undefined`,...b(t)})}function ya(e,t){return new e({type:`null`,...b(t)})}function ba(e){return new e({type:`any`})}function xa(e){return new e({type:`unknown`})}function Sa(e,t){return new e({type:`never`,...b(t)})}function Ca(e,t){return new vn({check:`less_than`,...b(t),value:e,inclusive:!1})}function wa(e,t){return new vn({check:`less_than`,...b(t),value:e,inclusive:!0})}function Ta(e,t){return new yn({check:`greater_than`,...b(t),value:e,inclusive:!1})}function Ea(e,t){return new yn({check:`greater_than`,...b(t),value:e,inclusive:!0})}function Da(e,t){return new bn({check:`multiple_of`,...b(t),value:e})}function Oa(e,t){return new Sn({check:`max_length`,...b(t),maximum:e})}function ka(e,t){return new Cn({check:`min_length`,...b(t),minimum:e})}function Aa(e,t){return new wn({check:`length_equals`,...b(t),length:e})}function ja(e,t){return new En({check:`string_format`,format:`regex`,...b(t),pattern:e})}function Ma(e){return new Dn({check:`string_format`,format:`lowercase`,...b(e)})}function Na(e){return new On({check:`string_format`,format:`uppercase`,...b(e)})}function Pa(e,t){return new kn({check:`string_format`,format:`includes`,...b(t),includes:e})}function Fa(e,t){return new An({check:`string_format`,format:`starts_with`,...b(t),prefix:e})}function Ia(e,t){return new jn({check:`string_format`,format:`ends_with`,...b(t),suffix:e})}function La(e){return new Mn({check:`overwrite`,tx:e})}function Ra(e){return La(t=>t.normalize(e))}function za(){return La(e=>e.trim())}function Ba(){return La(e=>e.toLowerCase())}function Va(){return La(e=>e.toUpperCase())}function Ha(){return La(e=>le(e))}function Ua(e,t,n){return new e({type:`array`,element:t,...b(n)})}function Wa(e,t,n){return new e({type:`custom`,check:`custom`,fn:t,...b(n)})}function Ga(e,t){let n=Ka(t=>(t.addIssue=e=>{if(typeof e==`string`)t.issues.push(Re(e,t.value,n._zod.def));else{let r=e;r.fatal&&(r.continue=!1),r.code??=`custom`,`input`in r||(r.input=t.value),r.inst??=n,r.continue??=!n._zod.def.abort,t.issues.push(Re(r))}},e(t.value,t)),t);return n}function Ka(e,t){let n=new hn({check:`custom`,...b(t)});return n._zod.check=e,n}function qa(e,...t){for(let n of t)for(let t of Reflect.ownKeys(n))Object.prototype.propertyIsEnumerable.call(n,t)&&_(e,t,n[t]);return e}function Ja(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??zi,target:t,unrepresentable:e?.unrepresentable??`throw`,override:e?.override??(()=>{}),io:e?.io??`output`,counter:0,seen:new Map,sharedDefsExtractedFor:void 0,sharedEmitDoneFor:void 0,cycles:e?.cycles??`ref`,reused:e?.reused??`inline`,intersections:[],deferred:[],external:e?.external??void 0}}function Ya(e,t,n,r,i){let a=typeof t.unrepresentable==`function`?t.unrepresentable({zodSchema:e,path:r.path,message:i}):t.unrepresentable;if(a===`any`)return!1;if(a===void 0||a===`throw`)throw Error(i);return Object.assign(n,a),!0}function A(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,a=t.seen.get(e);if(a)return a.count++,n.schemaPath.includes(e)&&(a.cycle=n.path),a.schema;let o={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,o),t.sharedDefsExtractedFor=void 0,t.sharedEmitDoneFor=void 0;let s=e._zod.toJSONSchema?.();if(s)o.schema=s;else{let r={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,o.schema,r);else{let n=o.schema,a=t.processors[i.type];if(!a)throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);a(e,t,n,r)}let a=e._zod.parent;a&&(o.ref||=a,A(a,t,r),t.seen.get(a).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&qa(o.schema,c),t.io===`input`&&ao(e)&&(delete o.schema.examples,delete o.schema.default),t.io===`input`&&`_prefault`in o.schema&&((r=o.schema).default??(r.default=o.schema._prefault)),delete o.schema._prefault,t.seen.get(e).schema}function Xa(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}function Za(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);if(e.external&&e.sharedDefsExtractedFor===e.external)return;let r=new Map;for(let t of e.seen.entries()){let n=e.metadataRegistry.get(t[0])?.id;if(n){let e=r.get(n);if(e&&e!==t[0])throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(n,t[0])}}let i=t=>{let r=e.target===`draft-2020-12`?`$defs`:`definitions`;if(e.external){let n=e.external.registry.get(t[0])?.id,i=e.external.uri??(e=>e);if(n)return{ref:i(n)};let a=t[1].defId??t[1].schema.id??`schema${e.counter++}`;return t[1].defId=a,{defId:a,ref:`${i(`__shared`)}#/${r}/${Xa(a)}`}}let i=`#/${r}/`;if(t[1]===n&&!t[1].schema.id)return{ref:`#`};let a=t[1].schema.id??`__schema${e.counter++}`;return{defId:a,ref:i+Xa(a)}},a=e=>{if(e[1].schema.$ref)return;let t=e[1],{ref:n,defId:r}=i(e);t.def={...t.schema},r&&(t.defId=r);let a=t.schema;for(let e in a)delete a[e];a.$ref=n};if(e.cycles===`throw`)for(let t of e.seen.entries()){let e=t[1];if(e.cycle)throw Error(`Cycle detected: #/${e.cycle?.join(`/`)}/<root>\n\nSet the \\`cycles\\` parameter to \\`"ref"\\` to resolve cyclical schemas with defs.`)}for(let n of e.seen.entries()){let r=n[1];if(t===n[0]){a(n);continue}if(e.external){let r=e.external.registry.get(n[0])?.id;if(t!==n[0]&&r){a(n);continue}}if(e.metadataRegistry.get(n[0])?.id){a(n);continue}if(r.cycle){a(n);continue}r.count>1&&e.reused===`ref`&&a(n)}e.external&&(e.sharedDefsExtractedFor=e.external)}function Qa(e){let t=e.anyOf;if(!Array.isArray(t)||t.length===0||e.type!==void 0)return;let n=[];for(let e of t){if(!e||typeof e!=`object`)return;Qa(e);let t=Object.keys(e);if(t.length!==1||t[0]!==`type`)return;let r=e.type;for(let e of Array.isArray(r)?r:[r]){if(typeof e!=`string`)return;n.includes(e)||n.push(e)}}delete e.anyOf,e.type=n.length===1?n[0]:n}var $a=new Set([`type`,`properties`,`required`,`additionalProperties`]),eo=[`oneOf`,`anyOf`];function to(e){let t=e.additionalProperties;return t===void 0||t===!1||typeof t!=`object`||!t?null:Object.keys(t).length?t:null}function no(e){let t=[];for(let n of e){if(typeof n!=`object`||n.type!==`object`)return null;for(let e in n)if(!$a.has(e))return null;t.push(n)}let n={},r=new Set;for(let e of t){for(let r in e.properties){if(Object.prototype.hasOwnProperty.call(n,r))continue;let e=[];for(let n of t){let t=n.properties?.[r]??to(n);t!=null&&(e.some(e=>JSON.stringify(e)===JSON.stringify(t))||e.push(t))}_(n,r,e.length===1?e[0]:no(e)??{allOf:e})}for(let t of e.required??[])r.add(t)}let i={type:`object`,properties:n};if(r.size&&(i.required=[...r]),t.every(e=>e.additionalProperties===!1))i.additionalProperties=!1;else{let e=[];for(let n of t){let t=to(n);t&&!e.some(e=>JSON.stringify(e)===JSON.stringify(t))&&e.push(t)}e.length===1?i.additionalProperties=e[0]:e.length>1&&(i.additionalProperties={allOf:e})}return i}function ro(e){let t=e.allOf;if(!Array.isArray(t)||t.length<2)return;for(let t of $a)if(t in e)return;let n=t.filter(e=>eo.some(t=>Array.isArray(e[t]))),r=null;if(!n.length)r=no(t);else{let e=n[0],i=eo.find(t=>Array.isArray(e[t]));if(Object.keys(e).length!==1)return;let a=t.filter(t=>t!==e),o=e[i].map(e=>no([...a,e]));if(o.some(e=>!e))return;r={[i]:o}}r&&(delete e.allOf,qa(e,r))}function io(e,t){let n=e.seen.get(t);if(!n)throw Error(`Unprocessed schema. This is a bug in Zod.`);let r=t=>{let n=e.seen.get(t);if(n.ref===null)return;let i=n.def??n.schema,a={...i},o=n.ref;if(n.ref=null,o){r(o);let n=e.seen.get(o),s=n.schema;if(s.$ref&&(e.target===`draft-07`||e.target===`draft-04`||e.target===`openapi-3.0`)?(i.allOf=i.allOf??[],i.allOf.push(s)):qa(i,s),qa(i,a),t._zod.parent===o)for(let e in i)e===`$ref`||e===`allOf`||e in a||delete i[e];if(s.$ref&&n.def)for(let e in i)e===`$ref`||e===`allOf`||e in n.def&&JSON.stringify(i[e])===JSON.stringify(n.def[e])&&delete i[e]}let s=t._zod.parent;if(s&&s!==o){r(s);let t=e.seen.get(s);if(t?.schema.$ref&&(i.$ref=t.schema.$ref,t.def))for(let e in i)e===`$ref`||e===`allOf`||e in t.def&&JSON.stringify(i[e])===JSON.stringify(t.def[e])&&delete i[e]}e.override({zodSchema:t,jsonSchema:i,path:n.path??[]})};if(!e.external||e.sharedEmitDoneFor!==e.external){for(let t of[...e.seen.entries()].reverse())r(t[0]);if(e.target!==`openapi-3.0`)for(let t of e.seen.entries())Qa(t[1].def??t[1].schema);for(let t of e.deferred)t();if(e.intersections.length){let t=new Map;for(let n of e.seen.values())for(let e of[n.schema,n.def]){let n=e?.allOf;if(!Array.isArray(n))continue;let r=t.get(n);r?r.push(e):t.set(n,[e])}for(let n of e.intersections)for(let e of t.get(n)??[])ro(e)}}let i={};if(e.target===`draft-2020-12`?i.$schema=`https://json-schema.org/draft/2020-12/schema`:e.target===`draft-07`?i.$schema=`http://json-schema.org/draft-07/schema#`:e.target===`draft-04`?i.$schema=`http://json-schema.org/draft-04/schema#`:e.target,e.external?.uri){let n=e.external.registry.get(t)?.id;if(!n)throw Error("Schema is missing an `id` property");i.$id=e.external.uri(n)}qa(i,n.defId?n.schema:n.def??n.schema);let a=e.metadataRegistry.get(t)?.id;a!==void 0&&i.id===a&&delete i.id;let o=e.external?.defs??{};if(!e.external||e.sharedEmitDoneFor!==e.external)for(let t of e.seen.entries()){let e=t[1];e.def&&e.defId&&(e.def.id===e.defId&&delete e.def.id,_(o,e.defId,e.def))}e.external&&(e.sharedEmitDoneFor=e.external),e.external||Object.keys(o).length>0&&(e.target===`draft-2020-12`?i.$defs=o:i.definitions=o);try{let n=JSON.parse(JSON.stringify(i));return Object.defineProperty(n,"~standard",{value:{...t[`~standard`],jsonSchema:{input:so(t,`input`,e.processors),output:so(t,`output`,e.processors)}},enumerable:!1,writable:!1}),n}catch{throw Error(`Error converting schema to JSON.`)}}function ao(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type===`transform`)return!0;if(r.type===`array`)return ao(r.element,n);if(r.type===`set`)return ao(r.valueType,n);if(r.type===`lazy`)return ao(r.getter(),n);if(r.type===`promise`||r.type===`optional`||r.type===`nonoptional`||r.type===`nullable`||r.type===`readonly`||r.type==="default"||r.type===`prefault`||r.type===`catch`)return ao(r.innerType,n);if(r.type===`intersection`)return ao(r.left,n)||ao(r.right,n);if(r.type===`record`||r.type===`map`)return ao(r.keyType,n)||ao(r.valueType,n);if(r.type===`pipe`)return e._zod.traits.has(`$ZodCodec`)?!0:ao(r.in,n)||ao(r.out,n);if(r.type===`object`){for(let e in r.shape)if(ao(r.shape[e],n))return!0;return!1}if(r.type===`union`){for(let e of r.options)if(ao(e,n))return!0;return!1}if(r.type===`tuple`){for(let e of r.items)if(ao(e,n))return!0;return!!(r.rest&&ao(r.rest,n))}return!1}var oo=(e,t={})=>n=>{let r=Ja({...n,processors:t});return A(e,r),Za(r,e),io(r,e)},so=(e,t,n={})=>r=>{let{libraryOptions:i,target:a}=r??{},o=Ja({...i??{},target:a,io:t,processors:n});return A(e,o),Za(o,e),io(o,e)},co=(e,t,n)=>{(e[t]===void 0||n>e[t])&&(e[t]=n)},lo=(e,t,n)=>{(e[t]===void 0||n<e[t])&&(e[t]=n)},uo=(e,t)=>{co(e,`minimum`,t),lo(e,`maximum`,t)},fo=(e,t)=>{e.multipleOf??=[],e.multipleOf.includes(t)||e.multipleOf.push(t)},po=(e,t)=>{e.patterns??=new Set,e.patterns.add(t)},mo=(e,t)=>{e.mime=e.mime?e.mime.filter(e=>t.includes(e)):[...t]},ho=(e,t)=>{e.format=t,t.includes(`int`)&&(e.isInt=!0)},go=(e,t)=>co(e,`minimum`,t.minimum),_o=(e,t)=>lo(e,`maximum`,t.maximum),vo=e=>(t,n)=>{ho(t,n.format);let[r,i]=e[n.format];co(t,`minimum`,r),lo(t,`maximum`,i)},yo={greater_than:(e,t)=>co(e,t.inclusive?`minimum`:`exclusiveMinimum`,t.value),less_than:(e,t)=>lo(e,t.inclusive?`maximum`:`exclusiveMaximum`,t.value),multiple_of:(e,t)=>fo(e,t.value),number_format:vo(ye),bigint_format:vo(x),min_length:go,max_length:_o,length_equals:(e,t)=>uo(e,t.length),min_size:go,max_size:_o,size_equals:(e,t)=>uo(e,t.size),string_format:(e,t)=>{ho(e,t.format),t.pattern&&po(e,t.pattern),(t.format===`base64`||t.format===`base64url`)&&(e.contentEncoding=t.format),(t.local||t.precision===-1)&&(e.laxFormat=!0)},mime_type:(e,t)=>mo(e,t.mime)};function bo(e){let t={},n=e._zod.def,r=e._zod.traits.has(`$ZodCheck`)?[e,...n.checks??[]]:n.checks??[];for(let e of r)yo[e._zod.def.check]?.(t,e._zod.def);let i=e._zod.bag;i.minimum!==void 0&&co(t,`minimum`,i.minimum),i.exclusiveMinimum!==void 0&&co(t,`exclusiveMinimum`,i.exclusiveMinimum),i.maximum!==void 0&&lo(t,`maximum`,i.maximum),i.exclusiveMaximum!==void 0&&lo(t,`exclusiveMaximum`,i.exclusiveMaximum),i.multipleOf!==void 0&&fo(t,i.multipleOf),i.format!==void 0&&(t.format??=i.format,i.format.includes(`int`)&&(t.isInt=!0)),i.mime&&mo(t,i.mime);for(let e of i.patterns??[])po(t,e);return t}var xo={guid:`uuid`,url:`uri`,datetime:`date-time`,json_string:`json-string`,regex:``},So=new Map([[hr,Zt],[_r,Qt]]),Co=e=>So.get(e)??e,wo=(e,t,n,r)=>{let i=n;i.type=`string`;let{minimum:a,maximum:o,format:s,patterns:c,contentEncoding:l,laxFormat:u}=bo(e);if(typeof a==`number`&&(i.minLength=a),typeof o==`number`&&(i.maxLength=o),s&&(i.format=xo[s]??s,i.format===``&&delete i.format,(s===`time`||u)&&delete i.format),l&&(i.contentEncoding=l),c&&c.size>0){let e=[...c].map(Co);e.length===1?i.pattern=e[0].source:e.length>1&&(i.allOf=[...e.map(e=>({...t.target===`draft-07`||t.target===`draft-04`||t.target===`openapi-3.0`?{type:`string`}:{},pattern:e.source}))])}},To=(e,t,n,r)=>{let i=n,{minimum:a,maximum:o,multipleOf:s,exclusiveMaximum:c,exclusiveMinimum:l,isInt:u}=bo(e);i.type=u?`integer`:`number`;let d=typeof l==`number`&&l>=(a??-1/0),f=typeof c==`number`&&c<=(o??1/0),p=t.target===`draft-04`||t.target===`openapi-3.0`;if(d?p?(i.minimum=l,i.exclusiveMinimum=!0):i.exclusiveMinimum=l:typeof a==`number`&&(i.minimum=a),f?p?(i.maximum=c,i.exclusiveMaximum=!0):i.exclusiveMaximum=c:typeof o==`number`&&(i.maximum=o),s){let n=new Set;for(let a of s)Number.isFinite(a)&&a!==0?n.add(Math.abs(a)):Ya(e,t,i,r,`A multipleOf divisor of ${a} cannot be represented in JSON Schema`);let[a,...o]=n;a!==void 0&&(i.multipleOf=a),o.length&&(i.allOf=[...i.allOf??[],...o.map(e=>({multipleOf:e}))])}},Eo=(e,t,n,r)=>{n.type=`boolean`},Do=(e,t,n,r)=>{Ya(e,t,n,r,`BigInt cannot be represented in JSON Schema`)},Oo=(e,t,n,r)=>{Ya(e,t,n,r,`Symbols cannot be represented in JSON Schema`)},ko=(e,t,n,r)=>{t.target===`openapi-3.0`?(n.type=`string`,n.nullable=!0,n.enum=[null]):n.type=`null`},Ao=(e,t,n,r)=>{Ya(e,t,n,r,`Undefined cannot be represented in JSON Schema`)},jo=(e,t,n,r)=>{Ya(e,t,n,r,`Void cannot be represented in JSON Schema`)},Mo=(e,t,n,r)=>{n.not={}},No=(e,t,n,r)=>{},Po=(e,t,n,r)=>{},Fo=(e,t,n,r)=>{Ya(e,t,n,r,`Date cannot be represented in JSON Schema`)},Io=(e,t,n,r)=>{let i=e._zod.def,a=l(i.entries);if(a.length===0){n.not={};return}a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),n.enum=a},Lo=(e,t,n,r)=>{let i=e._zod.def;if(i.values.length===0){n.not={};return}let a=[];for(let o of i.values)if(o===void 0){if(Ya(e,t,n,r,"Literal `undefined` cannot be represented in JSON Schema"))return}else if(typeof o==`bigint`){if(Ya(e,t,n,r,`BigInt literals cannot be represented in JSON Schema`))return;a.push(Number(o))}else a.push(o);if(a.length!==0)if(a.length===1){let e=a[0];n.type=e===null?`null`:typeof e,t.target===`draft-04`||t.target===`openapi-3.0`?n.enum=[e]:n.const=e}else a.every(e=>typeof e==`number`)&&(n.type=`number`),a.every(e=>typeof e==`string`)&&(n.type=`string`),a.every(e=>typeof e==`boolean`)&&(n.type=`boolean`),a.every(e=>e===null)&&(n.type=`null`),n.enum=a},Ro=(e,t,n,r)=>{Ya(e,t,n,r,`NaN cannot be represented in JSON Schema`)},zo=(e,t,n,r)=>{let i=n,a=e._zod.pattern;if(!a)throw Error(`Pattern not found in template literal`);i.type=`string`,i.pattern=a.source},Bo=(e,t,n,r)=>{let i=n;i.type=`string`,i.format=`binary`,i.contentEncoding=`binary`;let{minimum:a,maximum:o,mime:s}=bo(e);a!==void 0&&(i.minLength=a),o!==void 0&&(i.maxLength=o),s&&(s.length===0?i.not={}:s.length===1?i.contentMediaType=s[0]:i.anyOf=s.map(e=>({contentMediaType:e})))},Vo=(e,t,n,r)=>{n.type=`boolean`},Ho=(e,t,n,r)=>{Ya(e,t,n,r,`Custom types cannot be represented in JSON Schema`)},Uo=(e,t,n,r)=>{Ya(e,t,n,r,`Function types cannot be represented in JSON Schema`)},Wo=(e,t,n,r)=>{Ya(e,t,n,r,`Transforms cannot be represented in JSON Schema`)},Go=(e,t,n,r)=>{Ya(e,t,n,r,`Map cannot be represented in JSON Schema`)},Ko=(e,t,n,r)=>{Ya(e,t,n,r,`Set cannot be represented in JSON Schema`)},qo=(e,t,n,r)=>{let i=n,a=e._zod.def,{minimum:o,maximum:s}=bo(e);typeof o==`number`&&(i.minItems=o),typeof s==`number`&&(i.maxItems=s),i.type=`array`,i.items=A(a.element,t,{...r,path:[...r.path,`items`]})};function Jo(e){let t=e._zod.def;return t.type===`pipe`&&t.in._zod.traits.has(`$ZodTransform`)?Jo(t.out):t.type===`catch`?Jo(t.innerType):e._zod.optin}var Yo=(e,t,n,r)=>{let i=n,a=e._zod.def,o=a.shape;if(Object.getOwnPropertySymbols(o).length&&Ya(e,t,i,r,`Symbol keys cannot be represented in JSON Schema`))return;i.type=`object`,i.properties={};for(let e in o)_(i.properties,e,A(o[e],t,{...r,path:[...r.path,`properties`,e]}));let s=[];for(let e of Object.keys(o)){let n=a.shape[e];(t.io===`input`?Jo(n)===void 0:n._zod.optout===void 0)&&s.push(e)}s.length>0&&(i.required=s),a.catchall?._zod.def.type===`never`?i.additionalProperties=!1:a.catchall?a.catchall&&(i.additionalProperties=A(a.catchall,t,{...r,path:[...r.path,`additionalProperties`]})):t.io===`output`&&(i.additionalProperties=!1)},Xo=(e,t,n,r)=>{let i=e._zod.def,a=i.inclusive===!1,o=i.options.map((e,n)=>A(e,t,{...r,path:[...r.path,a?`oneOf`:`anyOf`,n]}));a?n.oneOf=o:n.anyOf=o},Zo=(e,t,n,r)=>{let i=e._zod.def,a=A(i.left,t,{...r,path:[...r.path,`allOf`,0]}),o=A(i.right,t,{...r,path:[...r.path,`allOf`,1]}),s=e=>`allOf`in e&&Object.keys(e).length===1,c=[...s(a)?a.allOf:[a],...s(o)?o.allOf:[o]];n.allOf=c,t.intersections.push(c)},Qo=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`array`;let o=t.target===`draft-2020-12`?`prefixItems`:`items`,s=t.target===`draft-2020-12`||t.target===`openapi-3.0`?`items`:`additionalItems`,c=a.items.map((e,n)=>A(e,t,{...r,path:[...r.path,o,n]})),l=a.rest?A(a.rest,t,{...r,path:[...r.path,s,...t.target===`openapi-3.0`?[a.items.length]:[]]}):null,u=a.items.length;for(;u>0;){let e=a.items[u-1];if(!(t.io===`input`?Jo(e)!==void 0:e._zod.optout===`optional`))break;u--}let d=a.items.length,f=!a.rest;t.target===`draft-2020-12`?(i.prefixItems=c,f?i.items=!1:l&&(i.items=l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):t.target===`openapi-3.0`?(i.items={anyOf:c},l&&i.items.anyOf.push(l),u>0&&(i.minItems=u),f&&(i.maxItems=d)):(i.items=c,f?i.additionalItems=!1:l&&(i.additionalItems=l),u>0&&(i.minItems=u),f&&(i.maxItems=d));let{minimum:p,maximum:m}=bo(e);typeof p==`number`&&(i.minItems=p),typeof m==`number`&&(i.maxItems=m)};function $o(e,t,n){if(t.$ref){if(n.has(t))return t;n.add(t);let r=e.get(t)?.def;if(!r)return t;let i=$o(e,r,n);return i===r?t:i}for(let r of[`anyOf`,`oneOf`]){let i=t[r];if(!Array.isArray(i))continue;let a=i.map(t=>$o(e,t,n));a.some((e,t)=>e!==i[t])&&(t={...t,[r]:a})}let r=Array.isArray(t.type)?t.type:[t.type],i=!r.includes(`string`)&&r.some(e=>e===`number`||e===`integer`),a=t.enum??(t.const===void 0?void 0:[t.const]);if(!i&&!a?.some(e=>typeof e==`number`))return t;let{minimum:o,maximum:s,exclusiveMinimum:c,exclusiveMaximum:l,multipleOf:u,format:d,id:f,...p}=t;return p.enum?p.enum=p.enum.map(e=>typeof e==`number`?String(e):e):typeof p.const==`number`&&(p.const=String(p.const)),i?(p.type=`string`,a||(p.pattern=(r.includes(`number`)?ln:cn).source),p):p}var es=new WeakMap;function ts(e){let t=new Map;for(let n of e.seen.values())n.def&&!t.has(n.schema)&&t.set(n.schema,n);let n=new Map;for(let r of es.get(e)??[]){let i=e.seen.get(r),a=(i?.def??i?.schema)?.propertyNames;if(!a||a===!0||n.has(a))continue;let o=$o(t,a,new Set);o!==a&&n.set(a,o)}if(n.size)for(let t of e.seen.values())for(let e of[t.schema,t.def]){let t=e&&n.get(e.propertyNames);t&&(e.propertyNames=t)}}var ns=(e,t,n,r)=>{let i=n,a=e._zod.def;i.type=`object`;let o=a.keyType,s=bo(o).patterns;if(a.mode===`loose`&&s&&s.size>0){let e=A(a.valueType,t,{...r,path:[...r.path,`patternProperties`,`*`]});i.patternProperties={};for(let t of s)_(i.patternProperties,Co(t).source,e)}else{if(t.target===`draft-07`||t.target===`draft-2020-12`){i.propertyNames=A(a.keyType,t,{...r,path:[...r.path,`propertyNames`]});let n=es.get(t);n||(n=[],es.set(t,n),t.deferred.push(()=>ts(t))),n.push(e)}i.additionalProperties=A(a.valueType,t,{...r,path:[...r.path,`additionalProperties`]})}let c=o._zod.values,l=t.io===`input`&&Jo(a.valueType)!==void 0;if(c&&!a.partial&&!l){let e=[...c].filter(e=>typeof e==`string`||typeof e==`number`);e.length>0&&(i.required=e.map(String))}},rs=(e,t,n,r)=>{let i=e._zod.def,a=A(i.innerType,t,r),o=t.seen.get(e);t.target===`openapi-3.0`?(o.ref=i.innerType,n.nullable=!0):n.anyOf=[a,{type:`null`}]},is=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},as=Symbol();function os(e,t,n,r,i){let a=!1,o=JSON.stringify(e,(e,t)=>typeof t==`bigint`?(a=!0,null):t);return a?(Ya(t,n,r,i,`BigInt defaults cannot be represented in JSON Schema`),as):JSON.parse(o)}var ss=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o=os(i.defaultValue,e,t,n,r);o!==as&&(n.default=o)},cs=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);if(a.ref=i.innerType,t.io!==`input`)return;let o=os(i.defaultValue,e,t,n,r);o!==as&&(n._prefault=o)},ls=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType;let o;try{o=i.catchValue(void 0)}catch{Ya(e,t,n,r,`Dynamic catch values are not supported in JSON Schema`);return}n.default=o},us=(e,t,n,r)=>{let i=e._zod.def,a=i.in._zod.traits.has(`$ZodTransform`),o=t.io===`input`?a?i.out:i.in:i.out;A(o,t,r);let s=t.seen.get(e);s.ref=o},ds=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType,n.readOnly=!0},fs=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ps=(e,t,n,r)=>{let i=e._zod.def;A(i.innerType,t,r);let a=t.seen.get(e);a.ref=i.innerType},ms=(e,t,n,r)=>{let i=e._zod.innerType;A(i,t,r);let a=t.seen.get(e);a.ref=i},hs={string:wo,number:To,boolean:Eo,bigint:Do,symbol:Oo,null:ko,undefined:Ao,void:jo,never:Mo,any:No,unknown:Po,date:Fo,enum:Io,literal:Lo,nan:Ro,template_literal:zo,file:Bo,success:Vo,custom:Ho,function:Uo,transform:Wo,map:Go,set:Ko,array:qo,object:Yo,union:Xo,intersection:Zo,tuple:Qo,record:ns,nullable:rs,nonoptional:is,default:ss,prefault:cs,catch:ls,pipe:us,readonly:ds,promise:fs,optional:ps,lazy:ms};function gs(e,t){if(`_idmap`in e){let n=e,r=Ja({...t,processors:hs}),i={};for(let e of n._idmap.entries()){let[t,n]=e;A(n,r)}let a={};r.external={registry:n,uri:t?.uri,defs:i};for(let e of n._idmap.entries()){let[t,n]=e;Za(r,n),_(a,t,io(r,n))}return Object.keys(i).length>0&&(a.__shared={[r.target===`draft-2020-12`?`$defs`:`definitions`]:i}),{schemas:a}}let n=Ja({...t,processors:hs});return A(e,n),Za(n,e),io(n,e)}var _s=new WeakSet([Object.prototype,Error.prototype]);function vs(e,t,n){Object.defineProperty(e,t,{configurable:!0,enumerable:!1,get(){let e=n(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e},set(e){Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0})}})}var ys=T(`ZodError`,(e,t)=>{dt.init(e,t),e.name=`ZodError`;let n=Object.getPrototypeOf(e);_s.has(n)||(_s.add(n),vs(n,`format`,e=>t=>mt(e,t)),vs(n,`flatten`,e=>t=>pt(e,t)),vs(n,`addIssue`,e=>t=>{e.issues.push(t),e.message=JSON.stringify(e.issues,d,2)}),vs(n,`addIssues`,e=>t=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,d,2)}),Object.defineProperty(n,"isEmpty",{configurable:!0,enumerable:!1,get(){return this.issues.length===0}}))},void 0,{Parent:Error}),bs=gt(ys),xs=_t(ys),Ss=vt(ys),Cs=bt(ys),ws=Et(ys),Ts=Dt(ys),Es=Ot(ys),Ds=kt(ys),Os=At(ys),ks=jt(ys),As=Mt(ys),js=Nt(ys);function Ms(){rt.localeError||it(Fi())}function Ns(){rt.memoizer||it({memoizer:Mi()})}var j=T(`ZodType`,(e,t)=>(Ms(),O.init(e,t),e.def=t,e.type=t.type,e),{check(...e){let t=this.def;return this.clone(v(t,{checks:[...t.checks??[],...e.map(e=>typeof e==`function`?{_zod:{check:e,def:{check:`custom`},onattach:[]}}:e)]}),{parent:!0})},with(...e){return this.check(...e)},clone(e,t){return y(this,e,t)},brand(){return this},register(e,t){return e.add(this,t),this},refine(e,t){return this.check($c(e,t))},superRefine(e,t){return this.check(el(e,t))},overwrite(e){return this.check(La(e))},optional(){return W(this)},exactOptional(){return Pc(this)},nullable(){return Ic(this)},nullish(){return W(Ic(this))},nonoptional(e){return Hc(this,e)},array(){return L(this)},or(e){return B([this,e])},and(e){return Ec(this,e)},transform(e){return Kc(this,jc(e))},default(e){return Rc(this,e)},prefault(e){return Bc(this,e)},catch(e){return Wc(this,e)},pipe(e){return Kc(this,e)},readonly(){return Yc(this)},describe(e){let t=this.clone();return zi.add(t,{description:e}),t},meta(...e){if(e.length===0)return zi.get(this);let t=this.clone();return zi.add(t,e[0]),t},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(e,...t){return t.length===0?e(this):e(this,...t)},get"~standard"(){return Ve(this,`~standard`,{...Ln(this),jsonSchema:{input:so(this,`input`),output:so(this,`output`)}})},set"~standard"(e){Be(this,`~standard`,e)},parse:function e(t,n){return bs(this,t,n,{callee:e})},parseAsync:async function e(t,n){return await xs(this,t,n,{callee:e})},safeParse(e,t){return Ss(this,e,t)},async safeParseAsync(e,t){return Cs(this,e,t)},get spa(){return this?.safeParseAsync},set spa(e){Be(this,`spa`,e)},validate(e,t){return Ct(this,e,t)},validateAsync(e,t){return Tt(this,e,t)},encode:function e(t,n){return ws(this,t,n,{callee:e})},decode:function e(t,n){return Ts(this,t,n,{callee:e})},encodeAsync:async function e(t,n){return await Es(this,t,n,{callee:e})},decodeAsync:async function e(t,n){return await Ds(this,t,n,{callee:e})},safeEncode(e,t){return Os(this,e,t)},safeDecode(e,t){return ks(this,e,t)},async safeEncodeAsync(e,t){return As(this,e,t)},async safeDecodeAsync(e,t){return js(this,e,t)},toJSONSchema(e){return oo(this,{})(e)},get description(){return zi.get(this)?.description},get _def(){return this._zod.def}}),Ps=T(`_ZodString`,(e,t)=>{Rn.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>wo(e,t,n,r)},He({format:e=>bo(e).format??null,minLength:e=>bo(e).minimum??null,maxLength:e=>bo(e).maximum??null},{regex(...e){return this.check(ja(...e))},includes(...e){return this.check(Pa(...e))},startsWith(...e){return this.check(Fa(...e))},endsWith(...e){return this.check(Ia(...e))},min(...e){return this.check(ka(...e))},max(...e){return this.check(Oa(...e))},length(...e){return this.check(Aa(...e))},nonempty(...e){return this.check(ka(1,...e))},lowercase(e){return this.check(Ma(e))},uppercase(e){return this.check(Na(e))},trim(){return this.check(za())},normalize(...e){return this.check(Ra(...e))},toLowerCase(){return this.check(Ba())},toUpperCase(){return this.check(Va())},slugify(){return this.check(Ha())}})),Fs=T(`ZodString`,(e,t)=>{Rn.init(e,t),Ps.init(e,t)},{email(e){return this.check(Hi(Bs,e))},url(e){return this.check(Ji(Ws,e))},jwt(e){return this.check(la(oc,e))},emoji(e){return this.check(Yi(Ks,e))},guid(e){return this.check(Ui(Hs,e))},uuid(e){return this.check(Wi(Us,e))},uuidv4(e){return this.check(Gi(Us,e))},uuidv6(e){return this.check(Ki(Us,e))},uuidv7(e){return this.check(qi(Us,e))},nanoid(e){return this.check(Xi(qs,e))},cuid(e){return this.check(Zi(Js,e))},cuid2(e){return this.check(Qi(Ys,e))},ulid(e){return this.check($i(Xs,e))},base64(e){return this.check(oa(rc,e))},base64url(e){return this.check(sa(ic,e))},xid(e){return this.check(ea(Zs,e))},ksuid(e){return this.check(ta(Qs,e))},ipv4(e){return this.check(na($s,e))},ipv6(e){return this.check(ra(ec,e))},cidrv4(e){return this.check(ia(tc,e))},cidrv6(e){return this.check(aa(nc,e))},e164(e){return this.check(ca(ac,e))},datetime(e){return this.check(ua(Is,e))},date(e){return this.check(da(Ls,e))},time(e){return this.check(fa(Rs,e))},duration(e){return this.check(pa(zs,e))}});function M(e){return Vi(Fs,e)}var N=T(`ZodStringFormat`,(e,t)=>{k.init(e,t),Ps.init(e,t)}),Is=T(`ZodISODateTime`,(e,t)=>{rr.init(e,t),N.init(e,t)}),Ls=T(`ZodISODate`,(e,t)=>{ir.init(e,t),N.init(e,t)}),Rs=T(`ZodISOTime`,(e,t)=>{ar.init(e,t),N.init(e,t)}),zs=T(`ZodISODuration`,(e,t)=>{or.init(e,t),N.init(e,t)}),Bs=T(`ZodEmail`,(e,t)=>{Vn.init(e,t),N.init(e,t)});function Vs(e){return Hi(Bs,e)}var Hs=T(`ZodGUID`,(e,t)=>{zn.init(e,t),N.init(e,t)}),Us=T(`ZodUUID`,(e,t)=>{Bn.init(e,t),N.init(e,t)}),Ws=T(`ZodURL`,(e,t)=>{Yn.init(e,t),N.init(e,t)});function Gs(e){return Ji(Ws,e)}var Ks=T(`ZodEmoji`,(e,t)=>{Xn.init(e,t),N.init(e,t)}),qs=T(`ZodNanoID`,(e,t)=>{Zn.init(e,t),N.init(e,t)}),Js=T(`ZodCUID`,(e,t)=>{Qn.init(e,t),N.init(e,t)}),Ys=T(`ZodCUID2`,(e,t)=>{$n.init(e,t),N.init(e,t)}),Xs=T(`ZodULID`,(e,t)=>{er.init(e,t),N.init(e,t)}),Zs=T(`ZodXID`,(e,t)=>{tr.init(e,t),N.init(e,t)}),Qs=T(`ZodKSUID`,(e,t)=>{nr.init(e,t),N.init(e,t)}),$s=T(`ZodIPv4`,(e,t)=>{sr.init(e,t),N.init(e,t)}),ec=T(`ZodIPv6`,(e,t)=>{ur.init(e,t),N.init(e,t)}),tc=T(`ZodCIDRv4`,(e,t)=>{dr.init(e,t),N.init(e,t)}),nc=T(`ZodCIDRv6`,(e,t)=>{pr.init(e,t),N.init(e,t)}),rc=T(`ZodBase64`,(e,t)=>{gr.init(e,t),N.init(e,t)}),ic=T(`ZodBase64URL`,(e,t)=>{yr.init(e,t),N.init(e,t)}),ac=T(`ZodE164`,(e,t)=>{br.init(e,t),N.init(e,t)}),oc=T(`ZodJWT`,(e,t)=>{Sr.init(e,t),N.init(e,t)}),sc=T(`ZodNumber`,(e,t)=>{Cr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>To(e,t,n,r),e.isFinite=!0},He({minValue:e=>{let{minimum:t,exclusiveMinimum:n}=bo(e);return Math.max(t??-1/0,n??-1/0)},maxValue:e=>{let{maximum:t,exclusiveMaximum:n}=bo(e);return Math.min(t??1/0,n??1/0)},isInt:e=>{let{isInt:t,multipleOf:n}=bo(e);return!!t||!!n?.some(Number.isSafeInteger)},format:e=>bo(e).format??null},{gt(e,t){return this.check(Ta(e,t))},gte(e,t){return this.check(Ea(e,t))},min(e,t){return this.check(Ea(e,t))},lt(e,t){return this.check(Ca(e,t))},lte(e,t){return this.check(wa(e,t))},max(e,t){return this.check(wa(e,t))},int(e){return this.check(lc(e))},safe(e){return this.check(lc(e))},positive(e){return this.check(Ta(0,e))},nonnegative(e){return this.check(Ea(0,e))},negative(e){return this.check(Ca(0,e))},nonpositive(e){return this.check(wa(0,e))},multipleOf(e,t){return this.check(Da(e,t))},step(e,t){return this.check(Da(e,t))},finite(){return this}}));function P(e){return ma(sc,e)}var cc=T(`ZodNumberFormat`,(e,t)=>{wr.init(e,t),sc.init(e,t)});function lc(e){return ga(cc,e)}var uc=T(`ZodBoolean`,(e,t)=>{Tr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Eo(e,t,n,r)});function F(e){return _a(uc,e)}var dc=T(`ZodUndefined`,(e,t)=>{Er.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ao(e,t,n,r)});function fc(e){return va(dc,e)}var pc=T(`ZodNull`,(e,t)=>{Dr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ko(e,t,n,r)});function mc(e){return ya(pc,e)}var hc=T(`ZodAny`,(e,t)=>{Or.init(e,t),j.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function gc(){return ba(hc)}var _c=T(`ZodUnknown`,(e,t)=>{kr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(e,t,n)=>void 0});function I(){return xa(_c)}var vc=T(`ZodNever`,(e,t)=>{Ar.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Mo(e,t,n,r)});function yc(e){return Sa(vc,e)}var bc=T(`ZodArray`,(e,t)=>{Ns(),Pr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>qo(e,t,n,r),e.element=t.element},{min(e,t){return this.check(ka(e,t))},nonempty(e){return this.check(ka(1,e))},max(e,t){return this.check(Oa(e,t))},length(e,t){return this.check(Aa(e,t))},unwrap(){return this.element}});function L(e,t){return Ua(bc,e,t)}var xc=T(`ZodObject`,(e,t)=>{Ns(),Br.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Yo(e,t,n,r),Je(e,`shape`,e=>e._zod.def.shape,!1)},{keyof(){return H(Object.keys(this._zod.def.shape))},catchall(e){return this.clone(v(this._zod.def,{catchall:e}))},passthrough(){return this.clone(v(this._zod.def,{catchall:I()}))},loose(){return this.clone(v(this._zod.def,{catchall:I()}))},strict(){return this.clone(v(this._zod.def,{catchall:yc()}))},strip(){return this.clone(v(this._zod.def,{catchall:void 0}))},extend(e){return Ce(this,e)},safeExtend(e){return Te(this,e)},merge(e){return Ee(this,e)},pick(e){return be(this,e)},omit(e){return Se(this,e)},partial(...e){return De(Mc,this,e[0])},exactPartial(...e){return De(Nc,this,e[0],`exactPartial`)},required(...e){return Oe(Vc,this,e[0])}});function R(e,t){return new xc({type:`object`,shape:e??{},...b(t)})}function z(e,t){return new xc({type:`object`,shape:e,catchall:I(),...b(t)})}var Sc=T(`ZodUnion`,(e,t)=>{Hr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Xo(e,t,n,r),e.options=t.options});function B(e,t){return new Sc({type:`union`,options:e,...b(t)})}var Cc=T(`ZodDiscriminatedUnion`,(e,t)=>{Sc.init(e,t),Wr.init(e,t)});function wc(e,t,n){return new Cc({type:`union`,options:t,discriminator:e,...b(n)})}var Tc=T(`ZodIntersection`,(e,t)=>{Gr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Zo(e,t,n,r)});function Ec(e,t){return new Tc({type:`intersection`,left:e,right:t})}var Dc=T(`ZodRecord`,(e,t)=>{Ns(),Jr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ns(e,t,n,r),e.keyType=t.keyType,e.valueType=t.valueType});function V(e,t,n){return!t||!t._zod?new Dc({type:`record`,keyType:M(),valueType:e,...b(t)}):new Dc({type:`record`,keyType:e,valueType:t,...b(n)})}var Oc=T(`ZodEnum`,(e,t)=>{Yr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Io(e,t,n,r),e.enum=t.entries,e.options=[...e._zod.values];let n=new Set(Object.keys(t.entries));e.extract=(e,r)=>{let i={};for(let r of e)if(n.has(r))i[r]=t.entries[r];else throw Error(`Key ${r} not found in enum`);return new Oc({...t,checks:[],...b(r),entries:i})},e.exclude=(e,r)=>{let i={...t.entries};for(let t of e)if(n.has(t))delete i[t];else throw Error(`Key ${t} not found in enum`);return new Oc({...t,checks:[],...b(r),entries:i})}});function H(e,t){return new Oc({type:`enum`,entries:Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e,...b(t)})}var kc=T(`ZodLiteral`,(e,t)=>{Xr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Lo(e,t,n,r),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function U(e,t){return new kc({type:`literal`,values:Array.isArray(e)?e:[e],...b(t)})}var Ac=T(`ZodTransform`,(e,t)=>{Ns(),Zr.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Wo(e,t,n,r),e._zod.parse=(n,r)=>{if(r.direction===`backward`)throw new nt(e.constructor.name);n.addIssue=r=>{if(typeof r==`string`)n.issues.push(Re(r,n.value,t));else{let t=r;t.fatal&&(t.continue=!1),t.code??=`custom`,`input`in t||(t.input=n.value),t.inst??=e,n.issues.push(Re(t))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(e=>(n.value=e,n)):(n.value=i,n)}});function jc(e){return new Ac({type:`transform`,transform:e})}var Mc=T(`ZodOptional`,(e,t)=>{$r.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ps(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function W(e){return new Mc({type:`optional`,innerType:e})}var Nc=T(`ZodExactOptional`,(e,t)=>{ei.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ps(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Pc(e){return new Nc({type:`optional`,innerType:e})}var Fc=T(`ZodNullable`,(e,t)=>{ti.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>rs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Ic(e){return new Fc({type:`nullable`,innerType:e})}var Lc=T(`ZodDefault`,(e,t)=>{ni.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ss(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Rc(e,t){return new Lc({type:`default`,innerType:e,get defaultValue(){return typeof t==`function`?t():me(t)}})}var zc=T(`ZodPrefault`,(e,t)=>{ii.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>cs(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Bc(e,t){return new zc({type:`prefault`,innerType:e,get defaultValue(){return typeof t==`function`?t():me(t)}})}var Vc=T(`ZodNonOptional`,(e,t)=>{ai.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>is(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Hc(e,t){return new Vc({type:`nonoptional`,innerType:e,...b(t)})}var Uc=T(`ZodCatch`,(e,t)=>{ci.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ls(e,t,n,r),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Wc(e,t){return new Uc({type:`catch`,innerType:e,catchValue:typeof t==`function`?t:Xe(t)})}var Gc=T(`ZodPipe`,(e,t)=>{li.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>us(e,t,n,r),e.in=t.in,e.out=t.out});function Kc(e,t){return new Gc({type:`pipe`,in:e,out:t})}var qc=T(`ZodPreprocess`,(e,t)=>{Gc.init(e,t),di.init(e,t)}),Jc=T(`ZodReadonly`,(e,t)=>{fi.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ds(e,t,n,r),e.unwrap=()=>e._zod.def.innerType});function Yc(e){return new Jc({type:`readonly`,innerType:e})}var Xc=T(`ZodLazy`,(e,t)=>{mi.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>ms(e,t,n,r),e.unwrap=()=>e._zod.def.getter()});function Zc(e){return new Xc({type:`lazy`,getter:e})}var Qc=T(`ZodCustom`,(e,t)=>{hi.init(e,t),j.init(e,t),e._zod.processJSONSchema=(t,n,r)=>Ho(e,t,n,r)});function $c(e,t={}){return Wa(Qc,e,t)}function el(e,t){return Ga(e,t)}function tl(e,t){return new qc({type:`pipe`,in:jc(e),out:t})}var nl={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`},rl;rl||={};function il(e){return ua(Is,e)}function al(e){return da(Ls,e)}function ol(e){return ha(sc,e)}var sl=[`2025-11-25`,`2025-06-18`,`2025-03-26`,`2024-11-05`,`2024-10-07`],cl=`io.modelcontextprotocol/related-task`,ll=`io.modelcontextprotocol/protocolVersion`,ul=`io.modelcontextprotocol/clientInfo`,dl=`io.modelcontextprotocol/serverInfo`,fl=`io.modelcontextprotocol/clientCapabilities`,pl=`io.modelcontextprotocol/subscriptionId`,ml=`io.modelcontextprotocol/logLevel`,hl=Zc(()=>B([M(),P(),F(),mc(),V(M(),hl),L(hl)])),G=V(M(),hl),gl=L(hl),_l=B([M(),P().int()]),vl=M(),yl=R({ttl:P().optional()}),bl=R({taskId:M()}),xl=z({progressToken:_l.optional(),[cl]:bl.optional()}),Sl=R({_meta:xl.optional()}),Cl=Sl.extend({task:yl.optional()}),K=R({method:M(),params:Sl.loose().optional()}),wl=R({_meta:xl.optional()}),Tl=R({method:M(),params:wl.loose().optional()}),El=z({get[dl](){return Bl.optional().catch(void 0)}}),q=z({_meta:El.optional()}),Dl=B([M(),P().int()]),Ol=R({jsonrpc:U(`2.0`),id:Dl,...K.shape}).strict(),kl=R({jsonrpc:U(`2.0`),...Tl.shape}).strict(),Al=R({jsonrpc:U(`2.0`),id:Dl,result:q}).strict(),jl=R({jsonrpc:U(`2.0`),id:Dl.optional(),error:R({code:P().int(),message:M(),data:I().optional()})}).strict(),Ml=B([Ol,kl,Al,jl]),Nl=B([Al,jl]),Pl=q.strict(),Fl=wl.extend({requestId:Dl.optional(),reason:M().optional()}),Il=Tl.extend({method:U(`notifications/cancelled`),params:Fl}),Ll=R({src:M(),mimeType:M().optional(),sizes:L(M()).optional(),theme:H([`light`,`dark`]).optional()}),Rl=R({icons:L(Ll).optional()}),zl=R({name:M(),title:M().optional()}),Bl=zl.extend({...zl.shape,...Rl.shape,version:M(),websiteUrl:M().optional(),description:M().optional()}),Vl=tl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ec(R({form:Ec(R({applyDefaults:F().optional()}),G).optional(),url:G.optional()}),G.optional())),Hl=z({list:G.optional(),cancel:G.optional(),requests:z({sampling:z({createMessage:G.optional()}).optional(),elicitation:z({create:G.optional()}).optional()}).optional()}),Ul=z({list:G.optional(),cancel:G.optional(),requests:z({tools:z({call:G.optional()}).optional()}).optional()}),Wl=R({experimental:V(M(),G).optional(),sampling:R({context:G.optional(),tools:G.optional()}).optional(),elicitation:Vl.optional(),roots:R({listChanged:F().optional()}).optional(),tasks:Hl.optional(),extensions:V(M(),G).optional()}),Gl=Sl.extend({protocolVersion:M(),capabilities:Wl,clientInfo:Bl}),Kl=K.extend({method:U(`initialize`),params:Gl}),ql=R({experimental:V(M(),G).optional(),logging:G.optional(),completions:G.optional(),prompts:R({listChanged:F().optional()}).optional(),resources:R({subscribe:F().optional(),listChanged:F().optional()}).optional(),tools:R({listChanged:F().optional()}).optional(),tasks:Ul.optional(),extensions:V(M(),G).optional()}),Jl=q.extend({protocolVersion:M(),capabilities:ql,serverInfo:Bl,instructions:M().optional()}),Yl=Tl.extend({method:U(`notifications/initialized`),params:wl.optional()}),Xl=K.extend({method:U(`server/discover`),params:Sl.optional()}),Zl=q.extend({supportedVersions:L(M()),capabilities:ql,instructions:M().optional()}),Ql=K.extend({method:U(`ping`),params:Sl.optional()}),$l=R({progress:P(),total:W(P()),message:W(M())}),eu=R({...wl.shape,...$l.shape,progressToken:_l}),tu=Tl.extend({method:U(`notifications/progress`),params:eu}),nu=Sl.extend({cursor:vl.optional()}),ru=K.extend({params:nu.optional()}),iu=q.extend({nextCursor:vl.optional()}),au=R({uri:M(),mimeType:W(M()),_meta:V(M(),I()).optional()}),ou=au.extend({text:M()}),su=M().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),cu=au.extend({blob:su}),lu=H([`user`,`assistant`]),uu=R({audience:L(lu).optional(),priority:P().min(0).max(1).optional(),lastModified:il({offset:!0}).optional()}),du=R({...zl.shape,...Rl.shape,uri:M(),description:W(M()),mimeType:W(M()),size:W(P()),annotations:uu.optional(),_meta:W(z({}))}),fu=R({...zl.shape,...Rl.shape,uriTemplate:M(),description:W(M()),mimeType:W(M()),annotations:uu.optional(),_meta:W(z({}))}),pu=ru.extend({method:U(`resources/list`)}),mu=iu.extend({resources:L(du)}),hu=ru.extend({method:U(`resources/templates/list`)}),gu=iu.extend({resourceTemplates:L(fu)}),_u=Sl.extend({uri:M()}),vu=_u,yu=K.extend({method:U(`resources/read`),params:vu}),bu=q.extend({contents:L(B([ou,cu]))}),xu=Tl.extend({method:U(`notifications/resources/list_changed`),params:wl.optional()}),Su=_u,Cu=K.extend({method:U(`resources/subscribe`),params:Su}),wu=_u,Tu=K.extend({method:U(`resources/unsubscribe`),params:wu}),Eu=R({toolsListChanged:F().optional(),promptsListChanged:F().optional(),resourcesListChanged:F().optional(),resourceSubscriptions:L(M()).optional()}),Du=Sl.extend({notifications:Eu}),Ou=K.extend({method:U(`subscriptions/listen`),params:Du}),ku=wl.extend({notifications:Eu}),Au=Tl.extend({method:U(`notifications/subscriptions/acknowledged`),params:ku}),ju=El.extend({[pl]:Dl}),Mu=q.extend({_meta:ju}),Nu=wl.extend({uri:M()}),Pu=Tl.extend({method:U(`notifications/resources/updated`),params:Nu}),Fu=R({name:M(),description:W(M()),required:W(F())}),Iu=R({...zl.shape,...Rl.shape,description:W(M()),arguments:W(L(Fu)),_meta:W(z({}))}),Lu=ru.extend({method:U(`prompts/list`)}),Ru=iu.extend({prompts:L(Iu)}),zu=Sl.extend({name:M(),arguments:V(M(),M()).optional()}),Bu=K.extend({method:U(`prompts/get`),params:zu}),Vu=R({type:U(`text`),text:M(),annotations:uu.optional(),_meta:V(M(),I()).optional()}),Hu=R({type:U(`image`),data:su,mimeType:M(),annotations:uu.optional(),_meta:V(M(),I()).optional()}),Uu=R({type:U(`audio`),data:su,mimeType:M(),annotations:uu.optional(),_meta:V(M(),I()).optional()}),Wu=R({type:U(`tool_use`),name:M(),id:M(),input:V(M(),I()),_meta:V(M(),I()).optional()}),Gu=R({type:U(`resource`),resource:B([ou,cu]),annotations:uu.optional(),_meta:V(M(),I()).optional()}),Ku=du.extend({type:U(`resource_link`)}),qu=B([Vu,Hu,Uu,Ku,Gu]),Ju=R({role:lu,content:qu}),Yu=q.extend({description:M().optional(),messages:L(Ju)}),Xu=Tl.extend({method:U(`notifications/prompts/list_changed`),params:wl.optional()}),Zu=R({title:M().optional(),readOnlyHint:F().optional(),destructiveHint:F().optional(),idempotentHint:F().optional(),openWorldHint:F().optional()}),Qu=R({taskSupport:H([`required`,`optional`,`forbidden`]).optional()}),$u=R({...zl.shape,...Rl.shape,description:M().optional(),inputSchema:R({type:U(`object`),properties:V(M(),hl).optional(),required:L(M()).optional()}).catchall(I()),outputSchema:z({$schema:M().optional()}).optional(),annotations:Zu.optional(),execution:Qu.optional(),_meta:V(M(),I()).optional()}),ed=ru.extend({method:U(`tools/list`)}),td=iu.extend({tools:L($u)}),nd=q.extend({content:L(qu).default([]),structuredContent:I().optional(),isError:F().optional()}),rd=nd.or(q.extend({toolResult:I()})),id=Cl.extend({name:M(),arguments:V(M(),I()).optional()}),ad=K.extend({method:U(`tools/call`),params:id}),od=Tl.extend({method:U(`notifications/tools/list_changed`),params:wl.optional()}),sd=R({autoRefresh:F().default(!0),debounceMs:P().int().nonnegative().default(300)}),cd=H([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),ld=Sl.extend({level:cd}),ud=K.extend({method:U(`logging/setLevel`),params:ld}),dd=wl.extend({level:cd,logger:M().optional(),data:I()}),fd=Tl.extend({method:U(`notifications/message`),params:dd}),pd=R({name:M().optional()}),md=R({hints:L(pd).optional(),costPriority:P().min(0).max(1).optional(),speedPriority:P().min(0).max(1).optional(),intelligencePriority:P().min(0).max(1).optional()}),hd=R({mode:H([`auto`,`required`,`none`]).optional()}),gd=R({type:U(`tool_result`),toolUseId:M().describe(`The unique identifier for the corresponding tool call.`),content:L(qu),structuredContent:I().optional(),isError:F().optional(),_meta:V(M(),I()).optional()}),_d=wc(`type`,[Vu,Hu,Uu]),vd=wc(`type`,[Vu,Hu,Uu,Wu,gd]),yd=R({role:lu,content:B([vd,L(vd)]),_meta:V(M(),I()).optional()}),bd=Cl.extend({messages:L(yd),modelPreferences:md.optional(),systemPrompt:M().optional(),includeContext:H([`none`,`thisServer`,`allServers`]).optional(),temperature:P().optional(),maxTokens:P().int(),stopSequences:L(M()).optional(),metadata:G.optional(),tools:L($u).optional(),toolChoice:hd.optional()}),xd=K.extend({method:U(`sampling/createMessage`),params:bd}),Sd=q.extend({model:M(),stopReason:W(H([`endTurn`,`stopSequence`,`maxTokens`]).or(M())),role:lu,content:_d}),Cd=q.extend({model:M(),stopReason:W(H([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(M())),role:lu,content:B([vd,L(vd)])}),wd=R({type:U(`boolean`),title:M().optional(),description:M().optional(),default:F().optional()}),Td=R({type:U(`string`),title:M().optional(),description:M().optional(),minLength:P().optional(),maxLength:P().optional(),format:H([`email`,`uri`,`date`,`date-time`]).optional(),default:M().optional()}),Ed=R({type:H([`number`,`integer`]),title:M().optional(),description:M().optional(),minimum:P().optional(),maximum:P().optional(),default:P().optional()}),Dd=R({type:U(`string`),title:M().optional(),description:M().optional(),enum:L(M()),default:M().optional()}),Od=R({type:U(`string`),title:M().optional(),description:M().optional(),oneOf:L(R({const:M(),title:M()})),default:M().optional()}),kd=R({type:U(`string`),title:M().optional(),description:M().optional(),enum:L(M()),enumNames:L(M()).optional(),default:M().optional()}),Ad=B([Dd,Od]),jd=R({type:U(`array`),title:M().optional(),description:M().optional(),minItems:P().optional(),maxItems:P().optional(),items:R({type:U(`string`),enum:L(M())}),default:L(M()).optional()}),Md=R({type:U(`array`),title:M().optional(),description:M().optional(),minItems:P().optional(),maxItems:P().optional(),items:R({anyOf:L(R({const:M(),title:M()}))}),default:L(M()).optional()}),Nd=B([jd,Md]),Pd=B([kd,Ad,Nd]),Fd=B([Pd,wd,Td,Ed]),Id=Cl.extend({mode:U(`form`).optional(),message:M(),requestedSchema:R({type:U(`object`),properties:V(M(),Fd),required:L(M()).optional()}).catchall(I())}),Ld=Cl.extend({mode:U(`url`),message:M(),elicitationId:M(),url:M().url()}),Rd=B([Id,Ld]),zd=K.extend({method:U(`elicitation/create`),params:Rd}),Bd=wl.extend({elicitationId:M()}),Vd=Tl.extend({method:U(`notifications/elicitation/complete`),params:Bd}),Hd=q.extend({action:H([`accept`,`decline`,`cancel`]),content:tl(e=>e===null?void 0:e,V(M(),B([M(),P(),F(),L(M())])).optional())}),Ud=R({type:U(`ref/resource`),uri:M()}),Wd=R({type:U(`ref/prompt`),name:M()}),Gd=Sl.extend({ref:B([Wd,Ud]),argument:R({name:M(),value:M()}),context:R({arguments:V(M(),M()).optional()}).optional()}),Kd=K.extend({method:U(`completion/complete`),params:Gd}),qd=q.extend({completion:z({values:L(M()).max(100),total:W(P().int()),hasMore:W(F())})}),Jd=R({uri:M().startsWith(`file://`),name:M().optional(),_meta:V(M(),I()).optional()}),Yd=K.extend({method:U(`roots/list`),params:Sl.optional()}),Xd=q.extend({roots:L(Jd)}),Zd=Tl.extend({method:U(`notifications/roots/list_changed`),params:wl.optional()}),Qd=z({ttl:P().optional(),pollInterval:P().optional()}),$d=H([`working`,`input_required`,`completed`,`failed`,`cancelled`]),ef=R({taskId:M(),status:$d,ttl:B([P(),mc()]),createdAt:M(),lastUpdatedAt:M(),pollInterval:W(P()),statusMessage:W(M())}),tf=q.extend({task:ef}),nf=wl.merge(ef),rf=Tl.extend({method:U(`notifications/tasks/status`),params:nf}),af=K.extend({method:U(`tasks/get`),params:Sl.extend({taskId:M()})}),of=q.merge(ef),sf=K.extend({method:U(`tasks/result`),params:Sl.extend({taskId:M()})}),cf=q.loose(),lf=ru.extend({method:U(`tasks/list`)}),uf=iu.extend({tasks:L(ef)}),df=K.extend({method:U(`tasks/cancel`),params:Sl.extend({taskId:M()})}),ff=q.merge(ef),pf=B([Ql,Kl,Xl,Kd,ud,Bu,Lu,pu,hu,yu,Cu,Tu,Ou,ad,ed]),mf=B([Il,tu,Yl,Zd]),hf=B([Pl,Sd,Cd,Hd,Xd]),gf=B([Ql,xd,zd,Yd]),_f=B([Il,tu,fd,Pu,xu,od,Xu,Au,Vd]),vf=B([Pl,Jl,Zl,qd,Yu,Ru,mu,gu,bu,nd,td,Mu]),yf=Gs().superRefine((e,t)=>{if(!URL.canParse(e))return t.addIssue({code:nl.custom,message:`URL must be parseable`,fatal:!0}),Qe}).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`}),bf=z({resource:M().url(),authorization_servers:L(yf).optional(),jwks_uri:M().url().optional(),scopes_supported:L(M()).optional(),bearer_methods_supported:L(M()).optional(),resource_signing_alg_values_supported:L(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:F().optional(),authorization_details_types_supported:L(M()).optional(),dpop_signing_alg_values_supported:L(M()).optional(),dpop_bound_access_tokens_required:F().optional()}),xf=z({issuer:M(),authorization_endpoint:yf,token_endpoint:yf,registration_endpoint:yf.optional(),scopes_supported:L(M()).optional(),response_types_supported:L(M()),response_modes_supported:L(M()).optional(),grant_types_supported:L(M()).optional(),token_endpoint_auth_methods_supported:L(M()).optional(),token_endpoint_auth_signing_alg_values_supported:L(M()).optional(),service_documentation:yf.optional(),revocation_endpoint:yf.optional(),revocation_endpoint_auth_methods_supported:L(M()).optional(),revocation_endpoint_auth_signing_alg_values_supported:L(M()).optional(),introspection_endpoint:M().optional(),introspection_endpoint_auth_methods_supported:L(M()).optional(),introspection_endpoint_auth_signing_alg_values_supported:L(M()).optional(),code_challenge_methods_supported:L(M()).optional(),client_id_metadata_document_supported:F().optional(),authorization_response_iss_parameter_supported:F().optional().catch(void 0),dpop_signing_alg_values_supported:L(M()).optional()}),Sf=z({issuer:M(),authorization_endpoint:yf,token_endpoint:yf,userinfo_endpoint:yf.optional(),jwks_uri:yf,registration_endpoint:yf.optional(),scopes_supported:L(M()).optional(),response_types_supported:L(M()),response_modes_supported:L(M()).optional(),grant_types_supported:L(M()).optional(),acr_values_supported:L(M()).optional(),subject_types_supported:L(M()),id_token_signing_alg_values_supported:L(M()),id_token_encryption_alg_values_supported:L(M()).optional(),id_token_encryption_enc_values_supported:L(M()).optional(),userinfo_signing_alg_values_supported:L(M()).optional(),userinfo_encryption_alg_values_supported:L(M()).optional(),userinfo_encryption_enc_values_supported:L(M()).optional(),request_object_signing_alg_values_supported:L(M()).optional(),request_object_encryption_alg_values_supported:L(M()).optional(),request_object_encryption_enc_values_supported:L(M()).optional(),token_endpoint_auth_methods_supported:L(M()).optional(),token_endpoint_auth_signing_alg_values_supported:L(M()).optional(),display_values_supported:L(M()).optional(),claim_types_supported:L(M()).optional(),claims_supported:L(M()).optional(),service_documentation:M().optional(),claims_locales_supported:L(M()).optional(),ui_locales_supported:L(M()).optional(),claims_parameter_supported:F().optional(),request_parameter_supported:F().optional(),request_uri_parameter_supported:F().optional(),require_request_uri_registration:F().optional(),op_policy_uri:yf.optional(),op_tos_uri:yf.optional(),client_id_metadata_document_supported:F().optional(),authorization_response_iss_parameter_supported:F().optional().catch(void 0)}),Cf=R({...Sf.shape,...xf.pick({code_challenge_methods_supported:!0}).shape}),wf=R({access_token:M(),id_token:M().optional(),token_type:M(),expires_in:ol().optional(),scope:M().optional(),refresh_token:M().optional(),issuer:M().optional().catch(void 0)}).strip(),Tf=R({issued_token_type:U(`urn:ietf:params:oauth:token-type:id-jag`),access_token:M(),token_type:M().optional(),expires_in:P().optional(),scope:M().optional()}).strip(),Ef=R({error:M(),error_description:M().optional(),error_uri:M().optional()}),Df=yf.optional().or(U(``).transform(()=>void 0)),Of=R({redirect_uris:L(yf),token_endpoint_auth_method:M().optional(),grant_types:L(M()).optional(),response_types:L(M()).optional(),application_type:M().optional(),client_name:M().optional(),client_uri:yf.optional(),logo_uri:Df,scope:M().optional(),contacts:L(M()).optional(),tos_uri:Df,policy_uri:M().optional(),jwks_uri:yf.optional(),jwks:gc().optional(),software_id:M().optional(),software_version:M().optional(),software_statement:M().optional()}).strip(),kf=R({client_id:M(),client_secret:M().optional(),client_id_issued_at:P().optional(),client_secret_expires_at:P().optional(),issuer:M().optional().catch(void 0)}).strip(),Af=Of.merge(kf),jf=R({error:M(),error_description:M().optional()}).strip(),Mf=R({token:M(),token_type_hint:M().optional()}).strip(),Nf=Symbol.for(`mcp.sdk.errorBrands`);function Pf(e,t){let n=new Set,r=t;for(;typeof r==`function`;){let e=r.mcpBrand;Object.prototype.hasOwnProperty.call(r,`mcpBrand`)&&typeof e==`string`&&n.add(e),r=Object.getPrototypeOf(r)}n.size!==0&&Object.defineProperty(e,Nf,{value:n,enumerable:!1,configurable:!0})}function Ff(e,t){try{if(typeof t==`object`&&t&&Object.prototype.hasOwnProperty.call(e,`mcpBrand`)&&typeof e.mcpBrand==`string`&&Object.prototype.hasOwnProperty.call(t,Nf)){let n=t[Nf];if(n&&typeof n.has==`function`&&n.has(e.mcpBrand))return!0}}catch{}return Function.prototype[Symbol.hasInstance].call(e,t)}(class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthError`})}static[Symbol.hasInstance](e){return Ff(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ff(this,e)}constructor(e,t,n){super(t),this.code=e,this.errorUri=n,this.name=`OAuthError`,Pf(this,new.target)}toResponseObject(){let e={error:this.code,error_description:this.message};return this.errorUri&&(e.error_uri=this.errorUri),e}static fromResponse(t){return new e(t.error,t.error_description??t.error,t.error_uri)}});var J=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}({}),Y=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkError`})}static[Symbol.hasInstance](e){return Ff(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ff(this,e)}constructor(e,t,n,r){super(t,r),this.code=e,this.data=n,this.name=`SdkError`,Pf(this,new.target)}},If=class extends Y{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SdkHttpError`})}constructor(e,t,n,r){super(e,t,n,r),this.name=`SdkHttpError`}get status(){return this.data.status}get statusText(){return this.data.statusText}},Lf=`2026-07-28`,Rf=[Lf];function zf(e){return e>=Lf}function Bf(e){return e.filter(e=>!zf(e))}function Vf(e){return e.filter(e=>zf(e))}function Hf(e){let t=e.structuredContent;return t===void 0||!(typeof t!=`object`||!t||Array.isArray(t))||(e.content?.some(e=>e.type===`text`)??!1)?e:{...e,content:[...e.content??[],{type:`text`,text:JSON.stringify(t)}]}}var Uf=[`task`,`inputRequests`,`requestState`];function Wf(e){return typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0||Uf.some(t=>t in e)?e:{...e,content:[]}}function Gf(){let e=Zc(()=>B([M(),P(),F(),mc(),V(M(),e),L(e)])),t=V(M(),e),n=B([M(),P().int()]),r=M(),i=R({ttl:P().optional()}),a=R({taskId:M()}),o=z({progressToken:n.optional(),"io.modelcontextprotocol/related-task":a.optional()}),s=R({_meta:o.optional()}),c=s.extend({task:i.optional()}),l=R({method:M(),params:s.loose().optional()}),u=R({_meta:o.optional()}),d=R({method:M(),params:u.loose().optional()}),f=z({_meta:o.optional()}),p=B([M(),P().int()]),m=f.strict(),h=u.extend({requestId:p.optional(),reason:M().optional()}),g=d.extend({method:U(`notifications/cancelled`),params:h}),ee=R({src:M(),mimeType:M().optional(),sizes:L(M()).optional(),theme:H([`light`,`dark`]).optional()}),te=R({icons:L(ee).optional()}),_=R({name:M(),title:M().optional()}),ne=_.extend({..._.shape,...te.shape,version:M(),websiteUrl:M().optional(),description:M().optional()}),re=tl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ec(R({form:Ec(R({applyDefaults:F().optional()}),t).optional(),url:t.optional()}),t.optional())),ie=z({list:t.optional(),cancel:t.optional(),requests:z({sampling:z({createMessage:t.optional()}).optional(),elicitation:z({create:t.optional()}).optional()}).optional()}),ae=z({list:t.optional(),cancel:t.optional(),requests:z({tools:z({call:t.optional()}).optional()}).optional()}),oe=R({experimental:V(M(),t).optional(),sampling:R({context:t.optional(),tools:t.optional()}).optional(),elicitation:re.optional(),roots:R({listChanged:F().optional()}).optional(),tasks:ie.optional(),extensions:V(M(),t).optional()}),se=s.extend({protocolVersion:M(),capabilities:oe,clientInfo:ne}),v=l.extend({method:U(`initialize`),params:se}),ce=R({experimental:V(M(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:R({listChanged:F().optional()}).optional(),resources:R({subscribe:F().optional(),listChanged:F().optional()}).optional(),tools:R({listChanged:F().optional()}).optional(),tasks:ae.optional(),extensions:V(M(),t).optional()}),le=f.extend({protocolVersion:M(),capabilities:ce,serverInfo:ne,instructions:M().optional()}),ue=d.extend({method:U(`notifications/initialized`),params:u.optional()}),de=l.extend({method:U(`ping`),params:s.optional()}),fe=R({progress:P(),total:W(P()),message:W(M())}),pe=R({...u.shape,...fe.shape,progressToken:n}),me=d.extend({method:U(`notifications/progress`),params:pe}),he=s.extend({cursor:r.optional()}),ge=l.extend({params:he.optional()}),y=f.extend({nextCursor:r.optional()}),b=R({uri:M(),mimeType:W(M()),_meta:V(M(),I()).optional()}),_e=b.extend({text:M()}),ve=M().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),ye=b.extend({blob:ve}),x=H([`user`,`assistant`]),be=R({audience:L(x).optional(),priority:P().min(0).max(1).optional(),lastModified:il({offset:!0}).optional()}),xe=R({..._.shape,...te.shape,uri:M(),description:W(M()),mimeType:W(M()),size:W(P()),annotations:be.optional(),_meta:W(z({}))}),Se=R({..._.shape,...te.shape,uriTemplate:M(),description:W(M()),mimeType:W(M()),annotations:be.optional(),_meta:W(z({}))}),Ce=ge.extend({method:U(`resources/list`)}),we=y.extend({resources:L(xe)}),Te=ge.extend({method:U(`resources/templates/list`)}),Ee=y.extend({resourceTemplates:L(Se)}),De=s.extend({uri:M()}),Oe=De,S=l.extend({method:U(`resources/read`),params:Oe}),ke=f.extend({contents:L(B([_e,ye]))}),Ae=d.extend({method:U(`notifications/resources/list_changed`),params:u.optional()}),je=De,Me=l.extend({method:U(`resources/subscribe`),params:je}),C=De,Ne=l.extend({method:U(`resources/unsubscribe`),params:C}),Pe=u.extend({uri:M()}),Fe=d.extend({method:U(`notifications/resources/updated`),params:Pe}),Ie=R({name:M(),description:W(M()),required:W(F())}),Le=R({..._.shape,...te.shape,description:W(M()),arguments:W(L(Ie)),_meta:W(z({}))}),Re=ge.extend({method:U(`prompts/list`)}),ze=y.extend({prompts:L(Le)}),Be=s.extend({name:M(),arguments:V(M(),M()).optional()}),Ve=l.extend({method:U(`prompts/get`),params:Be}),He=R({type:U(`text`),text:M(),annotations:be.optional(),_meta:V(M(),I()).optional()}),Ue=R({type:U(`image`),data:ve,mimeType:M(),annotations:be.optional(),_meta:V(M(),I()).optional()}),We=R({type:U(`audio`),data:ve,mimeType:M(),annotations:be.optional(),_meta:V(M(),I()).optional()}),Ge=R({type:U(`tool_use`),name:M(),id:M(),input:V(M(),I()),_meta:V(M(),I()).optional()}),Ke=R({type:U(`resource`),resource:B([_e,ye]),annotations:be.optional(),_meta:V(M(),I()).optional()}),qe=xe.extend({type:U(`resource_link`)}),w=B([He,Ue,We,qe,Ke]),Je=R({role:x,content:w}),Ye=f.extend({description:M().optional(),messages:L(Je)}),Xe=d.extend({method:U(`notifications/prompts/list_changed`),params:u.optional()}),Ze=R({title:M().optional(),readOnlyHint:F().optional(),destructiveHint:F().optional(),idempotentHint:F().optional(),openWorldHint:F().optional()}),Qe=R({taskSupport:H([`required`,`optional`,`forbidden`]).optional()}),$e=R({..._.shape,...te.shape,description:M().optional(),inputSchema:R({type:U(`object`),properties:V(M(),e).optional(),required:L(M()).optional()}).catchall(I()),outputSchema:R({type:U(`object`),properties:V(M(),e).optional(),required:L(M()).optional()}).catchall(I()).optional(),annotations:Ze.optional(),execution:Qe.optional(),_meta:V(M(),I()).optional()}),et=ge.extend({method:U(`tools/list`)}),tt=y.extend({tools:L($e)}),T=f.extend({content:L(w),structuredContent:V(M(),I()).optional(),isError:F().optional()}),E=c.extend({name:M(),arguments:V(M(),I()).optional()}),nt=l.extend({method:U(`tools/call`),params:E}),rt=d.extend({method:U(`notifications/tools/list_changed`),params:u.optional()}),it=H([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),at=s.extend({level:it}),ot=l.extend({method:U(`logging/setLevel`),params:at}),st=u.extend({level:it,logger:M().optional(),data:I()}),ct=d.extend({method:U(`notifications/message`),params:st}),lt=R({name:M().optional()}),ut=R({hints:L(lt).optional(),costPriority:P().min(0).max(1).optional(),speedPriority:P().min(0).max(1).optional(),intelligencePriority:P().min(0).max(1).optional()}),dt=R({mode:H([`auto`,`required`,`none`]).optional()}),ft=R({type:U(`tool_result`),toolUseId:M().describe(`The unique identifier for the corresponding tool call.`),content:L(w),structuredContent:R({}).loose().optional(),isError:F().optional(),_meta:V(M(),I()).optional()}),pt=wc(`type`,[He,Ue,We]),mt=wc(`type`,[He,Ue,We,Ge,ft]),ht=R({role:x,content:B([mt,L(mt)]),_meta:V(M(),I()).optional()}),gt=c.extend({messages:L(ht),modelPreferences:ut.optional(),systemPrompt:M().optional(),includeContext:H([`none`,`thisServer`,`allServers`]).optional(),temperature:P().optional(),maxTokens:P().int(),stopSequences:L(M()).optional(),metadata:t.optional(),tools:L($e).optional(),toolChoice:dt.optional()}),_t=l.extend({method:U(`sampling/createMessage`),params:gt}),vt=f.extend({model:M(),stopReason:W(H([`endTurn`,`stopSequence`,`maxTokens`]).or(M())),role:x,content:pt}),yt=f.extend({model:M(),stopReason:W(H([`endTurn`,`stopSequence`,`maxTokens`,`toolUse`]).or(M())),role:x,content:B([mt,L(mt)])}),bt=R({type:U(`boolean`),title:M().optional(),description:M().optional(),default:F().optional()}),xt=R({type:U(`string`),title:M().optional(),description:M().optional(),minLength:P().optional(),maxLength:P().optional(),format:H([`email`,`uri`,`date`,`date-time`]).optional(),default:M().optional()}),St=R({type:H([`number`,`integer`]),title:M().optional(),description:M().optional(),minimum:P().optional(),maximum:P().optional(),default:P().optional()}),Ct=R({type:U(`string`),title:M().optional(),description:M().optional(),enum:L(M()),default:M().optional()}),wt=R({type:U(`string`),title:M().optional(),description:M().optional(),oneOf:L(R({const:M(),title:M()})),default:M().optional()}),Tt=R({type:U(`string`),title:M().optional(),description:M().optional(),enum:L(M()),enumNames:L(M()).optional(),default:M().optional()}),Et=B([Ct,wt]),Dt=R({type:U(`array`),title:M().optional(),description:M().optional(),minItems:P().optional(),maxItems:P().optional(),items:R({type:U(`string`),enum:L(M())}),default:L(M()).optional()}),Ot=R({type:U(`array`),title:M().optional(),description:M().optional(),minItems:P().optional(),maxItems:P().optional(),items:R({anyOf:L(R({const:M(),title:M()}))}),default:L(M()).optional()}),kt=B([Dt,Ot]),At=B([Tt,Et,kt]),jt=B([At,bt,xt,St]),Mt=c.extend({mode:U(`form`).optional(),message:M(),requestedSchema:R({type:U(`object`),properties:V(M(),jt),required:L(M()).optional()}).catchall(I())}),Nt=c.extend({mode:U(`url`),message:M(),elicitationId:M(),url:M().url()}),Pt=B([Mt,Nt]),Ft=l.extend({method:U(`elicitation/create`),params:Pt}),It=u.extend({elicitationId:M()}),Lt=d.extend({method:U(`notifications/elicitation/complete`),params:It}),Rt=f.extend({action:H([`accept`,`decline`,`cancel`]),content:tl(e=>e===null?void 0:e,V(M(),B([M(),P(),F(),L(M())])).optional())}),zt=R({type:U(`ref/resource`),uri:M()}),Bt=R({type:U(`ref/prompt`),name:M()}),Vt=s.extend({ref:B([Bt,zt]),argument:R({name:M(),value:M()}),context:R({arguments:V(M(),M()).optional()}).optional()}),Ht=l.extend({method:U(`completion/complete`),params:Vt}),Ut=f.extend({completion:z({values:L(M()).max(100),total:W(P().int()),hasMore:W(F())})}),Wt=R({uri:M().startsWith(`file://`),name:M().optional(),_meta:V(M(),I()).optional()}),Gt=l.extend({method:U(`roots/list`),params:s.optional()}),Kt=f.extend({roots:L(Wt)}),qt=d.extend({method:U(`notifications/roots/list_changed`),params:u.optional()}),Jt=z({ttl:P().optional(),pollInterval:P().optional()}),Yt=H([`working`,`input_required`,`completed`,`failed`,`cancelled`]),Xt=R({taskId:M(),status:Yt,ttl:B([P(),mc()]),createdAt:M(),lastUpdatedAt:M(),pollInterval:W(P()),statusMessage:W(M())}),Zt=f.extend({task:Xt}),Qt=u.merge(Xt),$t=d.extend({method:U(`notifications/tasks/status`),params:Qt}),en=l.extend({method:U(`tasks/get`),params:s.extend({taskId:M()})}),tn=f.merge(Xt),nn=l.extend({method:U(`tasks/result`),params:s.extend({taskId:M()})}),rn=f.loose(),D=ge.extend({method:U(`tasks/list`)}),an=y.extend({tasks:L(Xt)}),on=l.extend({method:U(`tasks/cancel`),params:s.extend({taskId:M()})});return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,TaskMetadataSchema:i,RelatedTaskMetadataSchema:a,RequestMetaSchema:o,BaseRequestParamsSchema:s,TaskAugmentedRequestParamsSchema:c,RequestSchema:l,NotificationsParamsSchema:u,NotificationSchema:d,ResultSchema:f,RequestIdSchema:p,EmptyResultSchema:m,CancelledNotificationParamsSchema:h,CancelledNotificationSchema:g,IconSchema:ee,IconsSchema:te,BaseMetadataSchema:_,ImplementationSchema:ne,ClientTasksCapabilitySchema:ie,ServerTasksCapabilitySchema:ae,ClientCapabilitiesSchema:oe,InitializeRequestParamsSchema:se,InitializeRequestSchema:v,ServerCapabilitiesSchema:ce,InitializeResultSchema:le,InitializedNotificationSchema:ue,PingRequestSchema:de,ProgressSchema:fe,ProgressNotificationParamsSchema:pe,ProgressNotificationSchema:me,PaginatedRequestParamsSchema:he,PaginatedRequestSchema:ge,PaginatedResultSchema:y,ResourceContentsSchema:b,TextResourceContentsSchema:_e,BlobResourceContentsSchema:ye,RoleSchema:x,AnnotationsSchema:be,ResourceSchema:xe,ResourceTemplateSchema:Se,ListResourcesRequestSchema:Ce,ListResourcesResultSchema:we,ListResourceTemplatesRequestSchema:Te,ListResourceTemplatesResultSchema:Ee,ResourceRequestParamsSchema:De,ReadResourceRequestParamsSchema:Oe,ReadResourceRequestSchema:S,ReadResourceResultSchema:ke,ResourceListChangedNotificationSchema:Ae,SubscribeRequestParamsSchema:je,SubscribeRequestSchema:Me,UnsubscribeRequestParamsSchema:C,UnsubscribeRequestSchema:Ne,ResourceUpdatedNotificationParamsSchema:Pe,ResourceUpdatedNotificationSchema:Fe,PromptArgumentSchema:Ie,PromptSchema:Le,ListPromptsRequestSchema:Re,ListPromptsResultSchema:ze,GetPromptRequestParamsSchema:Be,GetPromptRequestSchema:Ve,TextContentSchema:He,ImageContentSchema:Ue,AudioContentSchema:We,ToolUseContentSchema:Ge,EmbeddedResourceSchema:Ke,ResourceLinkSchema:qe,ContentBlockSchema:w,PromptMessageSchema:Je,GetPromptResultSchema:Ye,PromptListChangedNotificationSchema:Xe,ToolAnnotationsSchema:Ze,ToolExecutionSchema:Qe,ToolSchema:$e,ListToolsRequestSchema:et,ListToolsResultSchema:tt,CallToolResultSchema:T,CallToolRequestParamsSchema:E,CallToolRequestSchema:nt,ToolListChangedNotificationSchema:rt,LoggingLevelSchema:it,SetLevelRequestParamsSchema:at,SetLevelRequestSchema:ot,LoggingMessageNotificationParamsSchema:st,LoggingMessageNotificationSchema:ct,ModelHintSchema:lt,ModelPreferencesSchema:ut,ToolChoiceSchema:dt,ToolResultContentSchema:ft,SamplingContentSchema:pt,SamplingMessageContentBlockSchema:mt,SamplingMessageSchema:ht,CreateMessageRequestParamsSchema:gt,CreateMessageRequestSchema:_t,CreateMessageResultSchema:vt,CreateMessageResultWithToolsSchema:yt,BooleanSchemaSchema:bt,StringSchemaSchema:xt,NumberSchemaSchema:St,UntitledSingleSelectEnumSchemaSchema:Ct,TitledSingleSelectEnumSchemaSchema:wt,LegacyTitledEnumSchemaSchema:Tt,SingleSelectEnumSchemaSchema:Et,UntitledMultiSelectEnumSchemaSchema:Dt,TitledMultiSelectEnumSchemaSchema:Ot,MultiSelectEnumSchemaSchema:kt,EnumSchemaSchema:At,PrimitiveSchemaDefinitionSchema:jt,ElicitRequestFormParamsSchema:Mt,ElicitRequestURLParamsSchema:Nt,ElicitRequestParamsSchema:Pt,ElicitRequestSchema:Ft,ElicitationCompleteNotificationParamsSchema:It,ElicitationCompleteNotificationSchema:Lt,ElicitResultSchema:Rt,ResourceTemplateReferenceSchema:zt,PromptReferenceSchema:Bt,CompleteRequestParamsSchema:Vt,CompleteRequestSchema:Ht,CompleteResultSchema:Ut,RootSchema:Wt,ListRootsRequestSchema:Gt,ListRootsResultSchema:Kt,RootsListChangedNotificationSchema:qt,TaskCreationParamsSchema:Jt,TaskStatusSchema:Yt,TaskSchema:Xt,CreateTaskResultSchema:Zt,TaskStatusNotificationParamsSchema:Qt,TaskStatusNotificationSchema:$t,GetTaskRequestSchema:en,GetTaskResultSchema:tn,GetTaskPayloadRequestSchema:nn,GetTaskPayloadResultSchema:rn,ListTasksRequestSchema:D,ListTasksResultSchema:an,CancelTaskRequestSchema:on,CancelTaskResultSchema:f.merge(Xt),ClientRequestSchema:B([de,v,Ht,ot,Ve,Re,Ce,Te,S,Me,Ne,nt,et,en,nn,D,on]),ClientNotificationSchema:B([g,me,ue,qt,$t]),ClientResultSchema:B([m,vt,yt,Rt,Kt,tn,an,Zt]),ServerRequestSchema:B([de,_t,Ft,Gt,en,nn,D,on]),ServerNotificationSchema:B([g,me,ct,Fe,Ae,rt,Xe,$t,Lt]),ServerResultSchema:B([m,le,Ut,Ye,ze,we,Ee,ke,T,tt,tn,an,Zt]),CallToolResultWireSchema:I().superRefine((e,t)=>{if(!(typeof e!=`object`||!e||Array.isArray(e)||e.content!==void 0)){for(let n of Uf)if(n in e){t.addIssue({code:`custom`,message:`content is required when the body carries \'${n}\' \u2014 another result family cannot default into an empty tools/call success`});return}}}).transform(Wf).pipe(T)}}var Kf;function qf(){return Kf??=Gf()}function Jf(e){return e.type!==`object`}var Yf=new Set([`const`,`enum`,`default`,`examples`]),Xf=new Set([`properties`,`patternProperties`,`$defs`,`definitions`,`dependentSchemas`,`dependencies`]);function Zf(e){return e!==void 0&&!(typeof e==`string`&&e.startsWith(`#`))}function Qf(e){let t=typeof e.$schema==`string`?e.$schema:void 0;if(Zf(e.$id))return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:e},required:[`result`]};let n=s(e.$schema)&&e.$recursiveAnchor!==!0,r=(e,t)=>{if(Array.isArray(e))return e.map(e=>r(e,!1));if(typeof e!=`object`||!e||!t&&Zf(e.$id))return e;let i={},a=!1;for(let[o,s]of Object.entries(e))t?i[o]=r(s,!1):(o===`$ref`||o===`$dynamicRef`)&&typeof s==`string`?i[o]=s===`#`?`#/properties/result`:s.startsWith(`#/`)?`#/properties/result${s.slice(1)}`:s:o===`$recursiveRef`&&s===`#`&&n?a=!0:Yf.has(o)?i[o]=s:Xf.has(o)?i[o]=r(s,!0):i[o]=r(s,!1);return a&&(`$ref`in i?i.allOf=[...Array.isArray(i.allOf)?i.allOf:[],{$ref:`#/properties/result`}]:i.$ref=`#/properties/result`),i};return{...t!==void 0&&{$schema:t},type:`object`,properties:{result:r(e,!1)},required:[`result`]}}var $f={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},ep={"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},tp={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},np;function rp(){if(np)return np;let e=qf();return np={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}},np}function ip(e){return Object.prototype.hasOwnProperty.call($f,e)}function ap(e){return Object.prototype.hasOwnProperty.call(ep,e)}function op(e){return Object.prototype.hasOwnProperty.call(tp,e)}function sp(e){return op(e)?rp().resultSchemas[e]:void 0}function cp(e){return ip(e)?rp().requestSchemas[e]:void 0}function lp(e){return ap(e)?rp().notificationSchemas[e]:void 0}Object.keys($f),Object.keys(ep);function up(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function dp(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 fp={ok:!1,reason:`not-in-era`};function pp(e){return up(e)&&up(e.outputSchema)&&Jf(e.outputSchema)}function mp(e){return e}var hp={era:`2025-11-25`,hasRequestMethod:ip,hasNotificationMethod:ap,validateRequest:(e,t)=>dp(cp(e),t),validateResult:(e,t)=>dp(sp(e),t),validateNotification:(e,t)=>dp(lp(e),t),hasInputRequestMethod:()=>!1,validateInputRequest:()=>fp,validateInputResponse:()=>fp,samplingResultVariant:((e,t)=>{let n=qf();return dp(e?n.CreateMessageResultWithToolsSchema:n.CreateMessageResultSchema,t)}),outboundEnvelope:e=>void 0,validateEnvelopeMeta:e=>[],projectCallToolResult(e,t){let n=Hf(e),r=n.structuredContent;if(r===void 0)return n;let i=typeof r!=`object`||!r||Array.isArray(r),a=t!==void 0&&Jf(t);return!i&&!a?n:{...n,structuredContent:{result:r}}},decodeResult(e,t){if(up(t)&&`resultType`in t){let e={...t};return delete e.resultType,{kind:`complete`,result:mp(e)}}return{kind:`complete`,result:mp(t)}},encodeResult(e,t){if(e!==`tools/list`)return t;let n=t.tools;return!Array.isArray(n)||!n.some(e=>pp(e))?t:{...t,tools:n.map(e=>pp(e)?{...e,outputSchema:Qf(e.outputSchema)}:e)}},encodeErrorCode:e=>e===-32002?-32602:e,checkInboundEnvelope:e=>void 0};function gp(){let e=Zc(()=>B([M(),P(),F(),mc(),V(M(),e),L(e)])),t=V(M(),e),n=B([M(),P().int()]),r=M(),i=B([M(),P().int()]),a=H([`user`,`assistant`]),o=H([`debug`,`info`,`notice`,`warning`,`error`,`critical`,`alert`,`emergency`]),s=M().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:`Invalid Base64 string`}),c=R({ttl:P().optional()}),l=R({taskId:M()}),u=z({progressToken:n.optional(),"io.modelcontextprotocol/related-task":l.optional()}),d=R({_meta:u.optional()}),f=d.extend({task:c.optional()}),p=R({_meta:u.optional()}),m=R({method:M(),params:p.loose().optional()}),h=R({src:M(),mimeType:M().optional(),sizes:L(M()).optional(),theme:H([`light`,`dark`]).optional()}),g=R({icons:L(h).optional()}),ee=R({name:M(),title:M().optional()}),te=ee.extend({...ee.shape,...g.shape,version:M(),websiteUrl:M().optional(),description:M().optional()}),_=tl(e=>e&&typeof e==`object`&&!Array.isArray(e)&&Object.keys(e).length===0?{form:{}}:e,Ec(R({form:Ec(R({applyDefaults:F().optional()}),t).optional(),url:t.optional()}),t.optional())),ne=z({list:t.optional(),cancel:t.optional(),requests:z({sampling:z({createMessage:t.optional()}).optional(),elicitation:z({create:t.optional()}).optional()}).optional()}),re=z({list:t.optional(),cancel:t.optional(),requests:z({tools:z({call:t.optional()}).optional()}).optional()}),ie=R({experimental:V(M(),t).optional(),sampling:R({context:t.optional(),tools:t.optional()}).optional(),elicitation:_.optional(),roots:R({listChanged:F().optional()}).optional(),tasks:ne.optional(),extensions:V(M(),t).optional()}),ae=R({experimental:V(M(),t).optional(),logging:t.optional(),completions:t.optional(),prompts:R({listChanged:F().optional()}).optional(),resources:R({subscribe:F().optional(),listChanged:F().optional()}).optional(),tools:R({listChanged:F().optional()}).optional(),tasks:re.optional(),extensions:V(M(),t).optional()}),oe=R({progress:P(),total:W(P()),message:W(M())}),se=R({...p.shape,...oe.shape,progressToken:n}),v=m.extend({method:U(`notifications/progress`),params:se}),ce=p.extend({level:o,logger:M().optional(),data:I()}),le=m.extend({method:U(`notifications/message`),params:ce}),ue=R({uri:M(),mimeType:W(M()),_meta:V(M(),I()).optional()}),de=ue.extend({text:M()}),fe=ue.extend({blob:s}),pe=R({audience:L(a).optional(),priority:P().min(0).max(1).optional(),lastModified:il({offset:!0}).optional()}),me=R({...ee.shape,...g.shape,uri:M(),description:W(M()),mimeType:W(M()),size:W(P()),annotations:pe.optional(),_meta:W(z({}))}),he=R({...ee.shape,...g.shape,uriTemplate:M(),description:W(M()),mimeType:W(M()),annotations:pe.optional(),_meta:W(z({}))}),ge=m.extend({method:U(`notifications/resources/list_changed`),params:p.optional()}),y=p.extend({uri:M()}),b=m.extend({method:U(`notifications/resources/updated`),params:y}),_e=R({name:M(),description:W(M()),required:W(F())}),ve=R({...ee.shape,...g.shape,description:W(M()),arguments:W(L(_e)),_meta:W(z({}))}),ye=m.extend({method:U(`notifications/prompts/list_changed`),params:p.optional()}),x=R({type:U(`text`),text:M(),annotations:pe.optional(),_meta:V(M(),I()).optional()}),be=R({type:U(`image`),data:s,mimeType:M(),annotations:pe.optional(),_meta:V(M(),I()).optional()}),xe=R({type:U(`audio`),data:s,mimeType:M(),annotations:pe.optional(),_meta:V(M(),I()).optional()}),Se=R({type:U(`tool_use`),name:M(),id:M(),input:V(M(),I()),_meta:V(M(),I()).optional()}),Ce=R({type:U(`resource`),resource:B([de,fe]),annotations:pe.optional(),_meta:V(M(),I()).optional()}),we=me.extend({type:U(`resource_link`)}),Te=B([x,be,xe,we,Ce]),Ee=R({role:a,content:Te}),De=R({title:M().optional(),readOnlyHint:F().optional(),destructiveHint:F().optional(),idempotentHint:F().optional(),openWorldHint:F().optional()}),Oe=m.extend({method:U(`notifications/tools/list_changed`),params:p.optional()}),S=R({name:M().optional()}),ke=R({hints:L(S).optional(),costPriority:P().min(0).max(1).optional(),speedPriority:P().min(0).max(1).optional(),intelligencePriority:P().min(0).max(1).optional()}),Ae=R({mode:H([`auto`,`required`,`none`]).optional()}),je=R({type:U(`boolean`),title:M().optional(),description:M().optional(),default:F().optional()}),Me=R({type:U(`string`),title:M().optional(),description:M().optional(),minLength:P().optional(),maxLength:P().optional(),format:H([`email`,`uri`,`date`,`date-time`]).optional(),default:M().optional()}),C=R({type:H([`number`,`integer`]),title:M().optional(),description:M().optional(),minimum:P().optional(),maximum:P().optional(),default:P().optional()}),Ne=R({type:U(`string`),title:M().optional(),description:M().optional(),enum:L(M()),default:M().optional()}),Pe=R({type:U(`string`),title:M().optional(),description:M().optional(),oneOf:L(R({const:M(),title:M()})),default:M().optional()}),Fe=R({type:U(`string`),title:M().optional(),description:M().optional(),enum:L(M()),enumNames:L(M()).optional(),default:M().optional()}),Ie=B([Ne,Pe]),Le=R({type:U(`array`),title:M().optional(),description:M().optional(),minItems:P().optional(),maxItems:P().optional(),items:R({type:U(`string`),enum:L(M())}),default:L(M()).optional()}),Re=R({type:U(`array`),title:M().optional(),description:M().optional(),minItems:P().optional(),maxItems:P().optional(),items:R({anyOf:L(R({const:M(),title:M()}))}),default:L(M()).optional()}),ze=B([Le,Re]),Be=B([Fe,Ie,ze]),Ve=B([Be,je,Me,C]),He=f.extend({mode:U(`form`).optional(),message:M(),requestedSchema:R({type:U(`object`),properties:V(M(),Ve),required:L(M()).optional()}).catchall(I())}),Ue=R({type:U(`ref/resource`),uri:M()}),We=R({type:U(`ref/prompt`),name:M()}),Ge=R({uri:M().startsWith(`file://`),name:M().optional(),_meta:V(M(),I()).optional()}),Ke=ie.shape,qe=R({experimental:Ke.experimental,sampling:Ke.sampling,elicitation:Ke.elicitation,roots:Ke.roots,extensions:Ke.extensions}),w=ae.shape,Je=R({experimental:w.experimental,logging:w.logging,completions:w.completions,prompts:w.prompts,resources:w.resources,tools:w.tools,extensions:w.extensions}),Ye=z({progressToken:n.optional(),[ll]:M(),[ul]:te.optional(),[fl]:qe,[ml]:o.optional()}),Xe=R({...ee.shape,...g.shape,description:M().optional(),inputSchema:z({$schema:M().optional(),type:U(`object`)}),outputSchema:z({$schema:M().optional()}).optional(),annotations:De.optional(),_meta:V(M(),I()).optional()}),Ze=R({type:U(`tool_result`),toolUseId:M(),content:L(Te),structuredContent:I().optional(),isError:F().optional(),_meta:V(M(),I()).optional()}),Qe=B([x,be,xe,Se,Ze]),$e=R({role:a,content:B([Qe,L(Qe)]),_meta:V(M(),I()).optional()}),et=M(),tt=z({[dl]:te.optional().catch(void 0)}),T=tt.optional();function E(e){return z({_meta:T,resultType:et.default(`complete`),...e})}let nt=E({}),rt=E({nextCursor:r.optional()}),it=E({content:L(Te),structuredContent:I().optional(),isError:F().optional()}),at=E({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),tools:L(Xe),nextCursor:r.optional()}),ot=E({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),prompts:L(ve),nextCursor:r.optional()}),st=E({description:M().optional(),messages:L(Ee)}),ct=E({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),resources:L(me),nextCursor:r.optional()}),lt=E({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),resourceTemplates:L(he),nextCursor:r.optional()}),ut=E({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),contents:L(B([de,fe]))}),dt=E({completion:R({values:L(M()).max(100),total:P().int().optional(),hasMore:F().optional()}).loose()}),ft=E({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`])}),pt=E({ttlMs:P().int().min(0).catch(0),cacheScope:H([`public`,`private`]).catch(`private`),supportedVersions:L(M()),capabilities:Je,instructions:M().optional()}),mt=R({messages:L($e),modelPreferences:ke.optional(),systemPrompt:M().optional(),includeContext:H([`none`,`thisServer`,`allServers`]).optional(),temperature:P().optional(),maxTokens:P().int(),stopSequences:L(M()).optional(),metadata:t.optional(),tools:L(Xe).optional(),toolChoice:Ae.optional()}),ht=R({method:U(`sampling/createMessage`),params:mt}),gt=R({method:U(`roots/list`),params:R({_meta:V(M(),I()).optional()}).optional()}),_t=R({...$e.shape,model:M(),stopReason:M().optional()}),vt=R({roots:L(Ge)}),yt=R({action:H([`accept`,`decline`,`cancel`]),content:V(M(),B([M(),P(),F(),L(M())])).optional()}),bt=R({mode:U(`url`),message:M(),url:M().url()}),xt=B([He,bt]),St=R({method:U(`elicitation/create`),params:xt}),Ct=B([ht,gt,St]),wt=B([_t,vt,yt]),Tt=V(M(),Ct),Et=V(M(),wt),Dt=E({inputRequests:Tt.optional(),requestState:M().optional()}),Ot={inputResponses:Et.optional(),requestState:M().optional()},kt=R({_meta:Ye,...Ot}),At=z({progressToken:n.optional()});function jt(e,t){return R({method:U(e),params:R({_meta:Ye,...t})})}function Mt(e,t){return R({method:U(e),params:R({_meta:At.optional(),...t}).optional()})}let Nt={name:M(),arguments:V(M(),I()).optional(),...Ot},Pt={cursor:r.optional()},Ft=jt(`tools/call`,Nt),It=jt(`tools/list`,Pt),Lt=jt(`prompts/list`,Pt),Rt=jt(`prompts/get`,{name:M(),arguments:V(M(),M()).optional(),...Ot}),zt=jt(`resources/list`,Pt),Bt=jt(`resources/templates/list`,Pt),Vt=jt(`resources/read`,{uri:M(),...Ot}),Ht={ref:B([We,Ue]),argument:R({name:M(),value:M()}),context:R({arguments:V(M(),M()).optional()}).optional()},Ut=jt(`completion/complete`,Ht),Wt=jt(`server/discover`,{}),Gt=R({toolsListChanged:F().optional(),promptsListChanged:F().optional(),resourcesListChanged:F().optional(),resourceSubscriptions:L(M()).optional()}),Kt={notifications:Gt},qt=jt(`subscriptions/listen`,Kt),Jt=tt.extend({"io.modelcontextprotocol/subscriptionId":i}),Yt=z({_meta:Jt,resultType:et.default(`complete`)}),Xt={"tools/call":Mt(`tools/call`,Nt),"tools/list":Mt(`tools/list`,Pt),"prompts/get":Mt(`prompts/get`,{name:M(),arguments:V(M(),M()).optional()}),"prompts/list":Mt(`prompts/list`,Pt),"resources/list":Mt(`resources/list`,Pt),"resources/templates/list":Mt(`resources/templates/list`,Pt),"resources/read":Mt(`resources/read`,{uri:M()}),"completion/complete":Mt(`completion/complete`,Ht),"server/discover":Mt(`server/discover`,{}),"subscriptions/listen":Mt(`subscriptions/listen`,Kt)};function Zt(e){return z({_meta:T,...e})}let Qt={"tools/call":Zt({content:L(Te),structuredContent:I().optional(),isError:F().optional()}),"tools/list":Zt({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),tools:L(Xe),nextCursor:r.optional()}),"prompts/get":Zt({description:M().optional(),messages:L(Ee)}),"prompts/list":Zt({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),prompts:L(ve),nextCursor:r.optional()}),"resources/list":Zt({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),resources:L(me),nextCursor:r.optional()}),"resources/templates/list":Zt({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),resourceTemplates:L(he),nextCursor:r.optional()}),"resources/read":Zt({ttlMs:P().int().min(0),cacheScope:H([`public`,`private`]),contents:L(B([de,fe]))}),"completion/complete":Zt({completion:R({values:L(M()).max(100),total:P().int().optional(),hasMore:F().optional()}).loose()}),"server/discover":Zt({ttlMs:P().int().min(0).catch(0),cacheScope:H([`public`,`private`]).catch(`private`),supportedVersions:L(M()),capabilities:Je,instructions:M().optional()}),"subscriptions/listen":Zt({})},$t=z({"io.modelcontextprotocol/subscriptionId":i.optional()}),en=R({method:U(`notifications/subscriptions/acknowledged`),params:R({_meta:$t.optional(),notifications:Gt})}),tn=R({_meta:$t.optional(),requestId:i,reason:M().optional()}),nn=R({method:U(`notifications/cancelled`),params:tn}),rn={"notifications/cancelled":nn,"notifications/progress":v,"notifications/message":le,"notifications/resources/updated":b,"notifications/resources/list_changed":ge,"notifications/tools/list_changed":Oe,"notifications/prompts/list_changed":ye,"notifications/subscriptions/acknowledged":en},D=e=>R({jsonrpc:U(`2.0`),id:B([M(),P().int()]),result:e}).strict();return{JSONValueSchema:e,JSONObjectSchema:t,ProgressTokenSchema:n,CursorSchema:r,RequestIdSchema:i,RoleSchema:a,LoggingLevelSchema:o,TaskMetadataSchema:c,RelatedTaskMetadataSchema:l,RequestMetaSchema:u,BaseRequestParamsSchema:d,TaskAugmentedRequestParamsSchema:f,NotificationsParamsSchema:p,NotificationSchema:m,IconSchema:h,IconsSchema:g,BaseMetadataSchema:ee,ImplementationSchema:te,ClientTasksCapabilitySchema:ne,ServerTasksCapabilitySchema:re,ClientCapabilitiesSchema:ie,ServerCapabilitiesSchema:ae,ProgressSchema:oe,ProgressNotificationParamsSchema:se,ProgressNotificationSchema:v,LoggingMessageNotificationParamsSchema:ce,LoggingMessageNotificationSchema:le,ResourceContentsSchema:ue,TextResourceContentsSchema:de,BlobResourceContentsSchema:fe,AnnotationsSchema:pe,ResourceSchema:me,ResourceTemplateSchema:he,ResourceListChangedNotificationSchema:ge,ResourceUpdatedNotificationParamsSchema:y,ResourceUpdatedNotificationSchema:b,PromptArgumentSchema:_e,PromptSchema:ve,PromptListChangedNotificationSchema:ye,TextContentSchema:x,ImageContentSchema:be,AudioContentSchema:xe,ToolUseContentSchema:Se,EmbeddedResourceSchema:Ce,ResourceLinkSchema:we,ContentBlockSchema:Te,PromptMessageSchema:Ee,ToolAnnotationsSchema:De,ToolListChangedNotificationSchema:Oe,ModelHintSchema:S,ModelPreferencesSchema:ke,ToolChoiceSchema:Ae,BooleanSchemaSchema:je,StringSchemaSchema:Me,NumberSchemaSchema:C,UntitledSingleSelectEnumSchemaSchema:Ne,TitledSingleSelectEnumSchemaSchema:Pe,LegacyTitledEnumSchemaSchema:Fe,SingleSelectEnumSchemaSchema:Ie,UntitledMultiSelectEnumSchemaSchema:Le,TitledMultiSelectEnumSchemaSchema:Re,MultiSelectEnumSchemaSchema:ze,EnumSchemaSchema:Be,PrimitiveSchemaDefinitionSchema:Ve,ElicitRequestFormParamsSchema:He,ResourceTemplateReferenceSchema:Ue,PromptReferenceSchema:We,RootSchema:Ge,ClientCapabilities2026Schema:qe,ServerCapabilities2026Schema:Je,RequestMetaEnvelopeSchema:Ye,ToolSchema:Xe,ToolResultContentSchema:Ze,SamplingMessageContentBlockSchema:Qe,SamplingMessageSchema:$e,ResultTypeSchema:et,ResultMetaSchema:tt,ResultSchema:nt,PaginatedResultSchema:rt,CallToolResultSchema:it,ListToolsResultSchema:at,ListPromptsResultSchema:ot,GetPromptResultSchema:st,ListResourcesResultSchema:ct,ListResourceTemplatesResultSchema:lt,ReadResourceResultSchema:ut,CompleteResultSchema:dt,CacheableResultSchema:ft,DiscoverResultSchema:pt,CreateMessageRequestParamsSchema:mt,CreateMessageRequestSchema:ht,ListRootsRequestSchema:gt,CreateMessageResultSchema:_t,ListRootsResultSchema:vt,ElicitResultSchema:yt,ElicitRequestURLParamsSchema:bt,ElicitRequestParamsSchema:xt,ElicitRequestSchema:St,InputRequestSchema:Ct,InputResponseSchema:wt,InputRequestsSchema:Tt,InputResponsesSchema:Et,InputRequiredResultSchema:Dt,InputResponseRequestParamsSchema:kt,CallToolRequestSchema:Ft,ListToolsRequestSchema:It,ListPromptsRequestSchema:Lt,GetPromptRequestSchema:Rt,ListResourcesRequestSchema:zt,ListResourceTemplatesRequestSchema:Bt,ReadResourceRequestSchema:Vt,CompleteRequestSchema:Ut,DiscoverRequestSchema:Wt,SubscriptionFilterSchema:Gt,SubscriptionsListenRequestSchema:qt,SubscriptionsListenResultMetaSchema:Jt,SubscriptionsListenResultSchema:Yt,dispatchRequestSchemas:Xt,dispatchResultSchemas:Qt,NotificationMetaSchema:$t,SubscriptionsAcknowledgedNotificationSchema:en,CancelledNotificationParamsSchema:tn,CancelledNotificationSchema:nn,notificationSchemas2026:rn,JSONRPCResultResponseSchema:D(nt),CallToolResultResponseSchema:D(B([it,Dt])),ListToolsResultResponseSchema:D(at),ListPromptsResultResponseSchema:D(ot),GetPromptResultResponseSchema:D(B([st,Dt])),ListResourcesResultResponseSchema:D(ct),ListResourceTemplatesResultResponseSchema:D(lt),ReadResourceResultResponseSchema:D(B([ut,Dt])),CompleteResultResponseSchema:D(dt),DiscoverResultResponseSchema:D(pt),SubscriptionsListenResultResponseSchema:D(Yt)}}var _p;function vp(){return _p??=gp()}var yp=[`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`resources/read`,`server/discover`];function bp(e){return yp.includes(e)}var xp=Symbol(`modelcontextprotocol.resultCacheHintFallback`);function Sp(e){return e[xp]}function Cp(e){return typeof e==`number`&&Number.isSafeInteger(e)&&e>=0}function wp(e){return e===`public`||e===`private`}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}({}),Z=class e extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.ProtocolError`})}static[Symbol.hasInstance](e){return Ff(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ff(this,e)}constructor(e,t,n){super(t),this.code=e,this.data=n,this.name=`ProtocolError`,Pf(this,new.target)}static fromError(t,n,r){if(t===X.UrlElicitationRequired&&r){let e=r;if(e.elicitations)return new Ep(e.elicitations,n)}if(t===X.UnsupportedProtocolVersion&&r){let e=r;if(Array.isArray(e.supported)&&typeof e.requested==`string`)return new Dp({supported:e.supported,requested:e.requested},n)}if(t===X.InvalidParams||t===X.ResourceNotFound){let e=r;if(typeof e?.uri==`string`&&(t===X.ResourceNotFound||Object.keys(e).length===1))return new Tp(e.uri,n)}if(t===X.MissingRequiredClientCapability&&r){let e=r;if(e.requiredCapabilities!==null&&typeof e.requiredCapabilities==`object`&&!Array.isArray(e.requiredCapabilities))return new Op({requiredCapabilities:e.requiredCapabilities},n)}return new e(t,n,r)}},Tp=class extends Z{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}},Ep=class extends Z{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??[]}},Dp=class extends Z{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}},Op=class extends Z{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}},kp=0,Ap=`private`,jp=[`tools/call`,`prompts/get`,`resources/read`];function Mp(e,t){let n=t.resultType;if(n===void 0)return{...t,resultType:`complete`};if(n===`complete`||jp.includes(e))return t;throw new Z(X.InternalError,`Handler for ${e} returned resultType \'${String(n)}\', but results of ${e} only support \'complete\' on protocol revision 2026-07-28`)}function Np(e,t){let n=Sp(t);if(t.resultType!==`complete`||!bp(e))return n===void 0?t:Rp(t);let r=t,i=Cp(r.ttlMs)?r.ttlMs:Ip(n),a=wp(r.cacheScope)?r.cacheScope:Lp(n),o={...r,ttlMs:i,cacheScope:a};return delete o[xp],o}function Pp(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Fp(e,t){if(t===void 0)return e;let n=e._meta;return n===void 0?{...e,_meta:{[dl]:t}}:!Pp(n)||n[`io.modelcontextprotocol/serverInfo`]!==void 0?e:{...e,_meta:{...n,[dl]:t}}}function Ip(e){return e!==void 0&&Cp(e.ttlMs)?e.ttlMs:kp}function Lp(e){return e!==void 0&&wp(e.cacheScope)?e.cacheScope:Ap}function Rp(e){let t={...e};return delete t[xp],t}var zp=[`elicitation/create`,`sampling/createMessage`,`roots/list`],Bp;function Vp(){if(Bp)return Bp;let e=vp();return Bp={request:{"elicitation/create":R({method:U(`elicitation/create`),params:e.ElicitRequestParamsSchema}),"sampling/createMessage":R({method:U(`sampling/createMessage`),params:e.CreateMessageRequestParamsSchema}),"roots/list":R({method:U(`roots/list`),params:z({}).optional()})},response:{"elicitation/create":e.ElicitResultSchema,"sampling/createMessage":e.CreateMessageResultSchema,"roots/list":e.ListRootsResultSchema}},Bp}function Hp(e){return zp.includes(e)}function Up(e){return Hp(e)?Vp().request[e]:void 0}function Wp(e){return Hp(e)?Vp().response[e]:void 0}var Gp={"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},Kp={"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 qp(e){return Object.prototype.hasOwnProperty.call(Gp,e)}function Jp(e){return Object.prototype.hasOwnProperty.call(Kp,e)}function Yp(e){return Object.prototype.hasOwnProperty.call(Gp,e)}function Xp(e){return qp(e)?vp().dispatchRequestSchemas[e]:void 0}function Zp(e){return Yp(e)?vp().dispatchResultSchemas[e]:void 0}function Qp(e){return Jp(e)?vp().notificationSchemas2026[e]:void 0}Object.keys(Gp),Object.keys(Kp);function $p(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function em(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 tm={ok:!1,reason:`not-in-era`},nm=[ll,fl];function rm(e,t){let n=t,r=!1,i=()=>(r||=(n={...n},!0),n),a=t.tools;e===`tools/list`&&Array.isArray(a)&&a.some(e=>$p(e)&&`execution`in e)&&(i().tools=a.map(e=>{if(!$p(e)||!(`execution`in e))return e;let t={...e};return delete t.execution,t}));let o=t.capabilities;if($p(o)&&`tasks`in o){let e={...o};delete e.tasks,i().capabilities=e}return n}var im={era:`2026-07-28`,hasRequestMethod:qp,hasNotificationMethod:Jp,hasInputRequestMethod:e=>Up(e)!==void 0,validateRequest:(e,t)=>em(Xp(e),t),validateResult:(e,t)=>em(Zp(e),t),validateNotification:(e,t)=>em(Qp(e),t),validateInputRequest:(e,t)=>em(Up(e),t),validateInputResponse:(e,t)=>em(Wp(e),t),samplingResultVariant:()=>tm,outboundEnvelope(e){return{[ll]:e.protocolVersion,[ul]:e.clientInfo,[fl]:e.clientCapabilities,...e.logLevel!==void 0&&{"io.modelcontextprotocol/logLevel":e.logLevel}}},validateEnvelopeMeta(e){let t=[];for(let n of nm)n in e||t.push({key:n,problem:`missing`});let n=vp().RequestMetaEnvelopeSchema.safeParse(e);if(!n.success)for(let e of n.error.issues){let n=e.path.map(String),r=n.length>0?n.join(`.`):`_meta`;n.length===1&&t.some(e=>e.key===r&&e.problem===`missing`)||t.push({key:r,problem:e.message})}return t},projectCallToolResult:e=>Hf(e),inputRequestSchema:Up,decodeResult(e,t){if(!$p(t))return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: not an object`,{method:e})};let n=t.resultType;if(n===void 0)return{kind:`invalid`,error:new Y(J.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 Y(J.InvalidResult,`Invalid result for ${e}: non-string resultType`,{method:e,resultType:n})};if(n===`input_required`){let n=t.inputRequests,r=$p(n)?n:{},i=t.requestState,a=t._meta===void 0?void 0:vp().ResultMetaSchema.safeParse(t._meta),o=a?.success?a.data:void 0;return Object.keys(r).length===0&&typeof i!=`string`?{kind:`invalid`,error:new Y(J.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:r,...typeof i==`string`&&{requestState:i},...o!==void 0&&{_meta:o}}}if(n!==`complete`)return{kind:`invalid`,error:new Y(J.UnsupportedResultType,`Unsupported result type \'${n}\' for ${e}`,{resultType:n,method:e})};let r=om(),i=Object.hasOwn(r,e)?r[e]:void 0;if(i!==void 0){let n=i.safeParse(t);if(!n.success)return{kind:`invalid`,error:new Y(J.InvalidResult,`Invalid result for ${e}: ${n.error}`,{method:e})}}let a={...t};return delete a.resultType,{kind:`complete`,result:a}},encodeResult(e,t,n){return Fp(Np(e,Mp(e,rm(e,t))),n)},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/clientCapabilities)`;let t=vp().RequestMetaEnvelopeSchema.safeParse(e.envelope);if(!t.success)return`Invalid _meta envelope for protocol revision 2026-07-28: ${t.error.issues.map(e=>e.message).join(`; `)}`}},am;function om(){if(am)return am;let e=vp();return am={"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},am}var sm=`2026-07-28`;function cm(e){return e!==void 0&&zf(e)?im:hp}function lm(e){return e.revision===void 0?e.era===`modern`?im.era:hp.era:cm(e.revision).era}function um(e){return pm.some(t=>t.hasRequestMethod(e))}function dm(e){return pm.some(t=>t.hasNotificationMethod(e))}function fm(e){return e===`tasks/get`||e===`tasks/cancel`}var pm=[hp,im],mm=n({AnnotationsSchema:()=>uu,AudioContentSchema:()=>Uu,BaseMetadataSchema:()=>zl,BaseRequestParamsSchema:()=>Sl,BlobResourceContentsSchema:()=>cu,BooleanSchemaSchema:()=>wd,CallToolRequestParamsSchema:()=>id,CallToolRequestSchema:()=>ad,CallToolResultSchema:()=>nd,CancelTaskRequestSchema:()=>df,CancelTaskResultSchema:()=>ff,CancelledNotificationParamsSchema:()=>Fl,CancelledNotificationSchema:()=>Il,ClientCapabilitiesSchema:()=>Wl,ClientNotificationSchema:()=>mf,ClientRequestSchema:()=>pf,ClientResultSchema:()=>hf,ClientTasksCapabilitySchema:()=>Hl,CompatibilityCallToolResultSchema:()=>rd,CompleteRequestParamsSchema:()=>Gd,CompleteRequestSchema:()=>Kd,CompleteResultSchema:()=>qd,ContentBlockSchema:()=>qu,CreateMessageRequestParamsSchema:()=>bd,CreateMessageRequestSchema:()=>xd,CreateMessageResultSchema:()=>Sd,CreateMessageResultWithToolsSchema:()=>Cd,CreateTaskResultSchema:()=>tf,CursorSchema:()=>vl,DiscoverRequestSchema:()=>Xl,DiscoverResultSchema:()=>Zl,ElicitRequestFormParamsSchema:()=>Id,ElicitRequestParamsSchema:()=>Rd,ElicitRequestSchema:()=>zd,ElicitRequestURLParamsSchema:()=>Ld,ElicitResultSchema:()=>Hd,ElicitationCompleteNotificationParamsSchema:()=>Bd,ElicitationCompleteNotificationSchema:()=>Vd,EmbeddedResourceSchema:()=>Gu,EmptyResultSchema:()=>Pl,EnumSchemaSchema:()=>Pd,GetPromptRequestParamsSchema:()=>zu,GetPromptRequestSchema:()=>Bu,GetPromptResultSchema:()=>Yu,GetTaskPayloadRequestSchema:()=>sf,GetTaskPayloadResultSchema:()=>cf,GetTaskRequestSchema:()=>af,GetTaskResultSchema:()=>of,IconSchema:()=>Ll,IconsSchema:()=>Rl,ImageContentSchema:()=>Hu,ImplementationSchema:()=>Bl,InitializeRequestParamsSchema:()=>Gl,InitializeRequestSchema:()=>Kl,InitializeResultSchema:()=>Jl,InitializedNotificationSchema:()=>Yl,JSONArraySchema:()=>gl,JSONObjectSchema:()=>G,JSONRPCErrorResponseSchema:()=>jl,JSONRPCMessageSchema:()=>Ml,JSONRPCNotificationSchema:()=>kl,JSONRPCRequestSchema:()=>Ol,JSONRPCResponseSchema:()=>Nl,JSONRPCResultResponseSchema:()=>Al,JSONValueSchema:()=>hl,LegacyTitledEnumSchemaSchema:()=>kd,ListChangedOptionsBaseSchema:()=>sd,ListPromptsRequestSchema:()=>Lu,ListPromptsResultSchema:()=>Ru,ListResourceTemplatesRequestSchema:()=>hu,ListResourceTemplatesResultSchema:()=>gu,ListResourcesRequestSchema:()=>pu,ListResourcesResultSchema:()=>mu,ListRootsRequestSchema:()=>Yd,ListRootsResultSchema:()=>Xd,ListTasksRequestSchema:()=>lf,ListTasksResultSchema:()=>uf,ListToolsRequestSchema:()=>ed,ListToolsResultSchema:()=>td,LoggingLevelSchema:()=>cd,LoggingMessageNotificationParamsSchema:()=>dd,LoggingMessageNotificationSchema:()=>fd,ModelHintSchema:()=>pd,ModelPreferencesSchema:()=>md,MultiSelectEnumSchemaSchema:()=>Nd,NotificationSchema:()=>Tl,NotificationsParamsSchema:()=>wl,NumberSchemaSchema:()=>Ed,PaginatedRequestParamsSchema:()=>nu,PaginatedRequestSchema:()=>ru,PaginatedResultSchema:()=>iu,PingRequestSchema:()=>Ql,PrimitiveSchemaDefinitionSchema:()=>Fd,ProgressNotificationParamsSchema:()=>eu,ProgressNotificationSchema:()=>tu,ProgressSchema:()=>$l,ProgressTokenSchema:()=>_l,PromptArgumentSchema:()=>Fu,PromptListChangedNotificationSchema:()=>Xu,PromptMessageSchema:()=>Ju,PromptReferenceSchema:()=>Wd,PromptSchema:()=>Iu,ReadResourceRequestParamsSchema:()=>vu,ReadResourceRequestSchema:()=>yu,ReadResourceResultSchema:()=>bu,RelatedTaskMetadataSchema:()=>bl,RequestIdSchema:()=>Dl,RequestMetaSchema:()=>xl,RequestSchema:()=>K,ResourceContentsSchema:()=>au,ResourceLinkSchema:()=>Ku,ResourceListChangedNotificationSchema:()=>xu,ResourceRequestParamsSchema:()=>_u,ResourceSchema:()=>du,ResourceTemplateReferenceSchema:()=>Ud,ResourceTemplateSchema:()=>fu,ResourceUpdatedNotificationParamsSchema:()=>Nu,ResourceUpdatedNotificationSchema:()=>Pu,ResultMetaObjectSchema:()=>El,ResultSchema:()=>q,RoleSchema:()=>lu,RootSchema:()=>Jd,RootsListChangedNotificationSchema:()=>Zd,SamplingContentSchema:()=>_d,SamplingMessageContentBlockSchema:()=>vd,SamplingMessageSchema:()=>yd,ServerCapabilitiesSchema:()=>ql,ServerNotificationSchema:()=>_f,ServerRequestSchema:()=>gf,ServerResultSchema:()=>vf,ServerTasksCapabilitySchema:()=>Ul,SetLevelRequestParamsSchema:()=>ld,SetLevelRequestSchema:()=>ud,SingleSelectEnumSchemaSchema:()=>Ad,StringSchemaSchema:()=>Td,SubscribeRequestParamsSchema:()=>Su,SubscribeRequestSchema:()=>Cu,SubscriptionFilterSchema:()=>Eu,SubscriptionsAcknowledgedNotificationParamsSchema:()=>ku,SubscriptionsAcknowledgedNotificationSchema:()=>Au,SubscriptionsListenRequestParamsSchema:()=>Du,SubscriptionsListenRequestSchema:()=>Ou,SubscriptionsListenResultMetaSchema:()=>ju,SubscriptionsListenResultSchema:()=>Mu,TaskAugmentedRequestParamsSchema:()=>Cl,TaskCreationParamsSchema:()=>Qd,TaskMetadataSchema:()=>yl,TaskSchema:()=>ef,TaskStatusNotificationParamsSchema:()=>nf,TaskStatusNotificationSchema:()=>rf,TaskStatusSchema:()=>$d,TextContentSchema:()=>Vu,TextResourceContentsSchema:()=>ou,TitledMultiSelectEnumSchemaSchema:()=>Md,TitledSingleSelectEnumSchemaSchema:()=>Od,ToolAnnotationsSchema:()=>Zu,ToolChoiceSchema:()=>hd,ToolExecutionSchema:()=>Qu,ToolListChangedNotificationSchema:()=>od,ToolResultContentSchema:()=>gd,ToolSchema:()=>$u,ToolUseContentSchema:()=>Wu,UnsubscribeRequestParamsSchema:()=>wu,UnsubscribeRequestSchema:()=>Tu,UntitledMultiSelectEnumSchemaSchema:()=>jd,UntitledSingleSelectEnumSchemaSchema:()=>Dd}),hm=e=>Ol.safeParse(e).success,gm=e=>kl.safeParse(e).success,_m=e=>Al.safeParse(e).success,vm=e=>jl.safeParse(e).success,ym=e=>typeof e==`object`&&!!e&&!Array.isArray(e)&&e.resultType===`input_required`,bm=`Mcp-Param-`,xm=`x-mcp-header`,Sm=/^[!#$%&\'*+\\-.^_`|~0-9A-Za-z]+$/,Cm=new Set([`string`,`integer`,`boolean`]);function wm(e){let t=[],n=new Map,r,i=(e,a,o)=>{if(typeof e!=`object`||!e)return;let s=e;if(xm in s){if(!o||a.length===0)return`${Dm(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 e=s[xm];if(typeof e!=`string`||e.length===0)return`${Dm(a)}: x-mcp-header MUST be a non-empty string`;if(!Sm.test(e))return`${Dm(a)}: x-mcp-header \'${e}\' is not a valid RFC 9110 token (no spaces, control characters or HTTP delimiters)`;let i=typeof s.type==`string`?s.type:void 0;if(i===void 0||!Cm.has(i)){let e=`${Dm(a)}: x-mcp-header is only permitted on primitive-typed properties (string, integer, boolean); got ${i??`<none>`}`;if(i!==`number`)return e;r??=e}let c=e.toLowerCase(),l=n.get(c);if(l!==void 0)return`x-mcp-header \'${e}\' is not case-insensitively unique (also declared as \'${l}\')`;n.set(c,e),t.push({path:a,headerName:e,type:i})}let c=s.properties;if(typeof c==`object`&&c)for(let[e,t]of Object.entries(c)){let n=i(t,[...a,e],o);if(n!==void 0)return n}for(let e of Tm){let t=s[e];if(t===void 0)continue;let n=Array.isArray(t)?t:typeof t==`object`&&t&&Em.has(e)?Object.values(t):[t];for(let t of n){let n=i(t,[...a,`<${e}>`],!1);if(n!==void 0)return n}}},a=i(e,[],!0);return a===void 0?r===void 0?{valid:!0,declarations:t}:{valid:!1,reason:r,declarations:t}:{valid:!1,reason:r??a}}var Tm=[`items`,`prefixItems`,`contains`,`additionalProperties`,`unevaluatedProperties`,`unevaluatedItems`,`propertyNames`,`patternProperties`,`dependentSchemas`,`oneOf`,`anyOf`,`allOf`,`not`,`if`,`then`,`else`,`$defs`,`definitions`],Em=new Set([`patternProperties`,`dependentSchemas`,`$defs`,`definitions`]);function Dm(e){return e.length===0?`<root>`:e.join(`.`)}var Om=`=?base64?`,km=`?=`;function Am(e){if(typeof e==`string`)return e;if(typeof e==`boolean`)return e?`true`:`false`;if(typeof e==`number`)return!Number.isFinite(e)||Number.isInteger(e)&&!Number.isSafeInteger(e)?void 0:String(e)}function jm(e){if(e.length===0||e.startsWith(Om)&&e.endsWith(km)||e!==e.trim())return!0;for(let t=0;t<e.length;t++){let n=e.codePointAt(t);if(!(n===9||n>=32&&n<=126))return!0}return!1}function Mm(e){let t=new TextEncoder().encode(e),n=``;for(let e of t)n+=String.fromCodePoint(e);return btoa(n)}function Nm(e){return jm(e)?`${Om}${Mm(e)}${km}`:e}function Pm(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[e]}return n}function Fm(e,t){let n={};for(let r of e){let e=Pm(t,r.path);if(e==null)continue;let i=Am(e);i!==void 0&&(n[`${bm}${r.headerName}`]=Nm(i))}return n}X.InvalidRequest,X.UnsupportedProtocolVersion,X.InvalidParams,X.MethodNotFound,X.InvalidParams,X.MissingRequiredClientCapability,X.ParseError,X.InvalidRequest,X.MethodNotFound,X.UnsupportedProtocolVersion,X.MissingRequiredClientCapability;function Im(e,t){return Ss(e,t)}function Lm(e){return new Set(e.flatMap(e=>Object.keys(e.shape)))}function Rm(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 zm=!1,Bm=`draft-2020-12`;function Vm(e,t=`input`){let n=e[`~standard`],r;if(n.jsonSchema)r=n.jsonSchema[t]({target:Bm});else if(n.vendor===`zod`){if(!(`_zod`in e))throw 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().`);zm||(zm=!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.")),r=gs(e,{target:Bm,io:t})}else throw 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 r.type===void 0&&Um(r)?{type:`object`,...r}:r;if(r.type!==void 0&&r.type!==`object`)throw Error(`MCP tool and prompt schemas must describe objects (got type: ${JSON.stringify(r.type)}). Wrap your schema in z.object({...}) or equivalent.`);return{type:`object`,...r}}var Hm=/^#\\/(\\$defs|definitions)\\/([^/~%]+)$/;function Um(e,t=e){if(`properties`in e||`patternProperties`in e||`additionalProperties`in e||`required`in e)return!0;let n=typeof e.$ref==`string`&&Hm.exec(e.$ref);if(n&&t[n[1]]?.[n[2]]?.type===`object`)return!0;for(let n of[`oneOf`,`anyOf`,`allOf`]){let r=e[n];if(Array.isArray(r)&&r.length>0)return r.every(e=>typeof e==`object`&&!!e&&(e.type===`object`||Um(e,`$id`in e?{}:t)))}return!1}function Wm(e){return e.path?.length?`${e.path.map(e=>String(typeof e==`object`?e.key:e)).join(`.`)}: ${e.message}`:e.message}async function Gm(e,t){let n=await e[`~standard`].validate(t);return n.issues&&n.issues.length>0?{success:!1,error:n.issues.map(e=>Wm(e)).join(`, `)}:{success:!0,data:n.value}}function Km(e){let t=gs(e,{target:Bm,io:`input`});return typeof t.pattern==`string`?t.pattern:void 0}var qm=/\\\\\\.\\\\d\\{(\\d+)\\}/;function Jm(e){let t=qm.exec(e),n=[void 0,-1,0];return t&&n.push(Number(t[1])),[!1,!0].flatMap(e=>[!1,!0].flatMap(t=>n.map(n=>il({local:e,offset:t,precision:n}))))}function Ym(e,t){let n;switch(e){case`email`:n=[Vs()];break;case`uri`:n=[Gs()];break;case`date`:n=[al()];break;case`date-time`:n=Jm(t);break}return new Set(n.map(e=>Km(e)).filter(e=>e!==void 0))}function Xm(e,t,n){return n!==`zod`||Ym(e,t).has(t)}function Zm(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Qm(e){try{return Vm(e,`input`)}catch(e){let t=e instanceof Error?e.message:String(e);throw new Z(X.InvalidParams,`Elicitation requestedSchema must describe an object with flat primitive properties: ${t}`)}}var $m=new Set([`$comment`,`deprecated`,`description`,`examples`,`readOnly`,`title`,`writeOnly`]);function eh(e){return $m.has(e)||e.startsWith(`x-`)}var th=new Set([`$schema`,...Object.keys(Id.shape.requestedSchema.shape)]),nh={string:Lm([Td,Dd,Od,kd]),number:Lm([Ed]),integer:Lm([Ed]),boolean:Lm([wd]),array:Lm([jd,Md])},rh=new Set(Td.shape.format.unwrap().options);function ih(e,t,n,r){if(!Zm(e))return e;let i=typeof e.type==`string`&&Object.hasOwn(nh,e.type)?nh[e.type]:void 0;if(i===void 0)return e;let a={};for(let[o,s]of Object.entries(e))i.has(o)||eh(o)?a[o]=s:o===`pattern`&&e.type===`string`&&typeof e.format==`string`?rh.has(e.format)?(typeof s!=`string`||!Xm(e.format,s,n))&&r.push(`${t}.${o}`):a[o]=s:r.push(`${t}.${o}`);return a}function ah(e,t){let n={},r=[];for(let[i,a]of Object.entries(e))i===`properties`&&Zm(a)?n[i]=Object.fromEntries(Object.entries(a).map(([e,n])=>[e,ih(n,`properties.${e}`,t,r)])):th.has(i)?n[i]=a:eh(i)||r.push(i);if(r.length>0)throw new Z(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${r.join(`, `)}`);return n}function oh(e,t){if(!Zm(e.properties))return t;let n=Object.entries(e.properties).filter(([,e])=>!Im(Fd,e).success).map(([e])=>`properties.${e}`);return n.length>0?n.join(`, `):t}function sh(e,t,n=``){return Array.isArray(e)&&Array.isArray(t)?e.flatMap((e,r)=>sh(e,t[r],`${n}[${r}]`)):!Zm(e)||!Zm(t)?[]:Object.entries(e).flatMap(([e,r])=>{let i=n?`${n}.${e}`:e;return Object.prototype.hasOwnProperty.call(t,e)?sh(r,t[e],i):eh(e)?[]:[i]})}function ch(e){if(!Rm(e.requestedSchema))return{...e,mode:`form`,requestedSchema:e.requestedSchema};let t=e.requestedSchema[`~standard`].vendor,n=ah(Qm(e.requestedSchema),t),r=Im(Id.shape.requestedSchema,n);if(!r.success)throw new Z(X.InvalidParams,`Elicitation requestedSchema only supports flat primitive properties (string, number, integer, boolean, and string enums): ${oh(n,r.error.message)}`);let i=sh(n,r.data);if(i.length>0)throw new Z(X.InvalidParams,`Elicitation requestedSchema contains unsupported JSON Schema constraint(s) after Standard Schema conversion: ${i.join(`, `)}`);let a=(r.data.required??[]).filter(e=>!Object.prototype.hasOwnProperty.call(r.data.properties,e));if(a.length>0)throw new Z(X.InvalidParams,`Elicitation requestedSchema lists required properties that are not defined in properties: ${a.join(`, `)}`);return{...e,mode:`form`,requestedSchema:r.data}}function lh(e){let t=e.inputRequests!==void 0&&Object.keys(e.inputRequests).length>0,n=typeof e.requestState==`string`;if(!t&&!n)throw 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}}}Object.assign(lh,{elicit(e){try{return{method:`elicitation/create`,params:ch(e)}}catch(e){throw e instanceof Z?TypeError(e.message,{cause:e}):e}},elicitUrl(e){return{method:`elicitation/create`,params:{...e,mode:`url`}}},createMessage(e){return{method:`sampling/createMessage`,params:e}},listRoots(){return{method:`roots/list`}}});var uh=!0,dh=10,fh=250;function ph(e){return{autoFulfill:e?.autoFulfill??uh,maxRounds:e?.maxRounds??dh}}function mh(e,t,n){let r=t!==void 0&&Object.keys(t).length>0;return!r&&n===void 0?e:{...e,...r&&{inputResponses:t},...n!==void 0&&{requestState:n}}}function hh(e,t){return`Multi-round-trip request \'${e}\' still required input after ${t} rounds (inputRequired.maxRounds)`}function gh(e,t){return new Promise((n,r)=>{if(t?.aborted){r(t.reason instanceof Y?t.reason:new Y(J.RequestTimeout,String(t.reason)));return}let i=setTimeout(()=>{t?.removeEventListener(`abort`,a),n()},e),a=()=>{clearTimeout(i),r(t?.reason instanceof Y?t.reason:new Y(J.RequestTimeout,String(t?.reason)))};t?.addEventListener(`abort`,a,{once:!0})})}function _h(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:e=>t.abort(e),dispose:()=>e?.removeEventListener(`abort`,n)}}async function vh(e){let{config:t,method:n,originalParams:r,requestOptions:i,hooks:a,signal:o}=e,s=e.flowStartedAt??Date.now(),c=e.firstPayload,l=0;for(;;){if(l+=1,l>t.maxRounds)throw new Y(J.InputRequiredRoundsExceeded,hh(n,t.maxRounds),{rounds:t.maxRounds,lastResult:{inputRequests:c.inputRequests,...c.requestState!==void 0&&{requestState:c.requestState}}});i.onprogress?.({progress:l,message:`Fulfilling input required by \'${n}\' (round ${l})`});let e=Object.entries(c.inputRequests??{}),u;if(e.length>0){let t=_h(o);try{let n=await Promise.all(e.map(async([e,n])=>{try{return[e,await a.dispatchInputRequest(e,n,t.signal)]}catch(e){throw t.abort(e),e}}));u=Object.fromEntries(n)}finally{t.dispose()}}else await gh(fh,o);let d={...i.timeout!==void 0&&{timeout:i.timeout}};if(i.maxTotalTimeout!==void 0){let e=Date.now()-s,t=i.maxTotalTimeout-e;if(t<=0)throw new Y(J.RequestTimeout,`Maximum total timeout exceeded`,{maxTotalTimeout:i.maxTotalTimeout,totalElapsed:e});d.maxTotalTimeout=t}let f=await a.retry(mh(r,u,c.requestState),d);if(ym(f)){c={inputRequests:f.inputRequests??{},...f.requestState!==void 0&&{requestState:f.requestState}};continue}return f}}var yh=`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.ResultMetaObjectSchema.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`.split(`.`),bh={IdJagTokenExchangeResponseSchema:Tf,OAuthClientInformationFullSchema:Af,OAuthClientInformationSchema:kf,OAuthClientMetadataSchema:Of,OAuthClientRegistrationErrorSchema:jf,OAuthErrorResponseSchema:Ef,OAuthMetadataSchema:xf,OAuthProtectedResourceMetadataSchema:bf,OAuthTokenRevocationRequestSchema:Mf,OAuthTokensSchema:wf,OpenIdProviderDiscoveryMetadataSchema:Cf,OpenIdProviderMetadataSchema:Sf},xh={},Sh={};function Ch(e,t){let n=e.slice(0,-6);xh[n]=t,Sh[n]=e=>t.safeParse(e).success}for(let e of yh)Ch(e,mm[e]);for(let[e,t]of Object.entries(bh))Ch(e,t);Object.freeze(xh);var wh=Object.freeze(Sh);function Th(e){switch(e){case`initialize`:case`notifications/initialized`:return cm(void 0);case`server/discover`:return cm(sm);default:return}}var Eh=[ll,ul,fl,ml],Dh=[`inputResponses`,`requestState`];function Oh(e,t){let n=e.params;if(!Nh(n))return{message:e,lifted:{}};let r=n._meta,i=Nh(r)?Eh.filter(e=>e in r):[],a=t===`request`?Dh.filter(e=>e in n):[];if(i.length===0&&a.length===0)return{message:e,lifted:{}};let o={},s={...n};if(i.length>0&&Nh(r)){let e={},t={...r};for(let n of i)e[n]=r[n],delete t[n];o.envelope=e,Object.keys(t).length>0?s._meta=t:delete s._meta}for(let e of a)e===`inputResponses`&&(o.inputResponses=s[e]),e===`requestState`&&(o.requestState=s[e]),delete s[e];return{message:{...e,params:s},lifted:o}}function kh(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(n){let r=e.validateResult(t,n);return r.ok?{value:r.value}:{issues:[{message:r.reason===`invalid`?r.message:`not-in-era: ${t}`}]}}}}}function Ah(e){return()=>e}var jh=Ah(void 0),Mh=class{_transport;_requestMessageId=0;_requestHandlers=new Map;_customSchemaRequestMethods=new Set;_requestHandlerAbortControllers=new Map;_notificationHandlers=new Map;_responseHandlers=new Map;_progressHandlers=new Map;_timeoutInfo=new Map;_pendingDebouncedNotifications=new Set;_negotiatedProtocolVersion;_supportedProtocolVersions;onclose;onerror;fallbackRequestHandler;fallbackNotificationHandler;constructor(e){this._options=e,this._supportedProtocolVersions=e?.supportedProtocolVersions??sl,this.setNotificationHandler(`notifications/cancelled`,e=>{this._oncancel(e)}),this.setNotificationHandler(`notifications/progress`,e=>{this._onprogress(e)}),this.setRequestHandler(`ping`,e=>({}))}_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 Y(J.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!==void 0&&this._requestHandlerAbortControllers.get(e.params.requestId)?.abort(e.params.reason)}_setupTimeout(e,t,n,r,i=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(r,t),startTime:Date.now(),timeout:t,maxTotalTimeout:n,resetTimeoutOnProgress:i,onTimeout:r})}_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 Y(J.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=e=>{n?.(e),this._onerror(e)};let r=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{r?.(e,t),_m(e)||vm(e)?this._onresponse(e):hm(e)?this._onrequest(e,t):gm(e)?this._onnotification(e,t):this._onerror(Error(`Unknown message type: ${JSON.stringify(e)}`))},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 e of this._timeoutInfo.values())clearTimeout(e.timeoutId);this._timeoutInfo.clear();let t=this._requestHandlerAbortControllers;this._requestHandlerAbortControllers=new Map;let n=new Y(J.ConnectionClosed,`Connection closed`);this._transport=void 0;try{this.onclose?.()}finally{for(let t of e.values())t(n);for(let e of t.values())e.abort(n)}}_onerror(e){this.onerror?.(e)}_onnotification(e,t){let{message:n}=Oh(e,`notification`),r=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`)return;if(t?.classification!==void 0){let e=lm(t.classification);if(e!==r.era){this._onerror(Error(`Era mismatch on inbound notification \'${n.method}\': classified as ${e} but this instance serves ${r.era}`));return}}if(dm(n.method)&&!r.hasNotificationMethod(n.method))return;let i=this._notificationHandlers.get(n.method),a=this.fallbackNotificationHandler;i===void 0&&a===void 0||Promise.resolve().then(()=>i===void 0?a(n):i(n,r)).catch(e=>this._onerror(Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){let{message:n,lifted:r}=Oh(e,`request`),i=this._negotiatedWireCodec();if(t?.classification===void 0&&this._shouldDropInbound(e)===`drop`){this._onerror(Error(`Dropped inbound request \'${e.method}\': not servable on this connection\'s protocol era`));return}let a=this._transport,o=(e,t,r)=>{let i={jsonrpc:`2.0`,id:n.id,error:{code:e,message:t,...r!==void 0&&{data:r}}};a?.send(i).catch(e=>this._onerror(Error(`Failed to send an error response: ${e}`)))};if(t?.classification!==void 0){let e=lm(t.classification);if(e!==i.era){this._onerror(Error(`Era mismatch on inbound request \'${n.method}\': classified as ${e} but this instance serves ${i.era}`));let r=t.classification.revision??e;o(X.UnsupportedProtocolVersion,`Unsupported protocol version: ${r}`,{supported:this._supportedProtocolVersions,requested:r});return}}if(um(n.method)&&!i.hasRequestMethod(n.method)&&!(fm(n.method)&&this._customSchemaRequestMethods.has(n.method))){o(X.MethodNotFound,`Method not found`);return}let s=this._requestHandlers.get(n.method)??this.fallbackRequestHandler;if(s===void 0){o(X.MethodNotFound,`Method not found`);return}let c=i.checkInboundEnvelope(r);if(c!==void 0){o(X.InvalidParams,c);return}let l=(e,t)=>this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,{...t,relatedRequestId:n.id}),u=(e,t,r)=>this._requestWithSchemaViaCodec(this._resolveOutboundCodec(e.method),e,t,{...r,relatedRequestId:n.id}),d=new AbortController;this._requestHandlerAbortControllers.set(n.id,d);let f=r.inputResponses===void 0?void 0:Ih(r.inputResponses),p={sessionId:a?.sessionId,mcpReq:{id:n.id,method:n.method,_meta:n.params?._meta,...r.envelope!==void 0&&{envelope:r.envelope},...f!==void 0&&{inputResponses:f.accepted},...f!==void 0&&f.droppedKeys.length>0&&{droppedInputResponseKeys:f.droppedKeys},requestState:r.requestState===void 0?jh:Ah(r.requestState),signal:d.signal,send:((e,t,n)=>{let r=this._resolveOutboundCodec(e.method);if(this._assertOutboundRequestInEra(r,e.method),Rm(t))return u(e,t,n);let i=kh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to ctx.mcpReq.send().`);return u(e,i,t)}),notify:l},http:t?.authInfo?{authInfo:t.authInfo}:void 0},m=this.buildContext(p,t);Promise.resolve().then(()=>s(n,m)).then(async e=>{if(d.signal.aborted)return;let t;try{t=i.encodeResult(n.method,e,this._outboundServerInfo())}catch(e){this._onerror(Error(`Failed to encode result for ${n.method}: ${e}`)),o(X.InternalError,`Internal error`);return}let r={result:t,jsonrpc:`2.0`,id:n.id};await a?.send(r)},async e=>{if(d.signal.aborted)return;let t=Number.isSafeInteger(e.code)?e.code:X.InternalError,r={jsonrpc:`2.0`,id:n.id,error:{code:i.encodeErrorCode(t),message:e.message??`Internal error`,...e.data!==void 0&&{data:e.data}}};await a?.send(r)}).catch(e=>this._onerror(Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.get(n.id)===d&&this._requestHandlerAbortControllers.delete(n.id)})}_onprogress(e){let{progressToken:t,...n}=e.params,r=Number(t),i=this._progressHandlers.get(r);if(!i){this._onerror(Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));return}let a=this._responseHandlers.get(r),o=this._timeoutInfo.get(r);if(o&&a&&o.resetTimeoutOnProgress)try{this._resetTimeout(r)}catch(e){this._responseHandlers.delete(r),this._progressHandlers.delete(r),this._cleanupTimeout(r),a(e);return}i(n)}_onresponse(e){let t=Number(e.id),n=this._responseHandlers.get(t);if(n===void 0){this._onerror(Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));return}this._responseHandlers.delete(t),this._cleanupTimeout(t),this._progressHandlers.delete(t),_m(e)?n(e):n(Z.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 r=this._resolveOutboundCodec(e.method);if(Rm(t))return fm(e.method)||this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n);this._assertOutboundRequestInEra(r,e.method);let i=kh(r,e.method);if(i===void 0)throw TypeError(`\'${e.method}\' is not a spec method; pass a result schema as the second argument to request().`);return this._requestWithSchemaViaCodec(r,e,i,t)}_negotiatedWireCodec(){return cm(this._negotiatedProtocolVersion)}_wireCodec(){return this._negotiatedWireCodec()}_resolveOutboundCodec(e){if(this._negotiatedProtocolVersion===void 0){let t=Th(e);if(t)return t}return this._negotiatedWireCodec()}_assertOutboundRequestInEra(e,t){if(um(t)&&!e.hasRequestMethod(t))throw new Y(J.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 r=this._resolveOutboundCodec(e.method);return this._assertOutboundRequestInEra(r,e.method),this._requestWithSchemaViaCodec(r,e,t,n)}_requestWithSchemaViaCodec(e,t,n,r){let{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s}=r??{},c=Date.now(),l,u;return new Promise((d,f)=>{let p=e=>{f(e)};if(!this._transport){p(Error(`Not connected`));return}if(this._options?.enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(t.method)}catch(e){p(e);return}if(r?.signal?.aborted){let e=r.signal.reason;throw e instanceof Y?e:new Y(J.RequestTimeout,String(e))}let m=e.era===`2026-07-28`&&this._transport.hasPerRequestStream===!0?new AbortController:void 0,h=this._requestMessageId++;u=h;let g={...t,jsonrpc:`2.0`,id:h};r?.onprogress&&(this._progressHandlers.set(h,r.onprogress),g.params={...t.params,_meta:{...t.params?._meta,progressToken:h}});let ee=this._envelopeOutbound(g),te=!1,_=e=>{te||(this._progressHandlers.delete(h),m===void 0?t.method!==`initialize`&&this._transport?.send(this._envelopeOutbound({jsonrpc:`2.0`,method:`notifications/cancelled`,params:{requestId:h,reason:String(e)}}),{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o}).catch(e=>this._onerror(Error(`Failed to send cancellation: ${e}`))):m.abort(),f(e instanceof Y?e:new Y(J.RequestTimeout,String(e))))};this._responseHandlers.set(h,i=>{if(r?.signal?.aborted)return;if(te=!0,i instanceof Error)return f(i);let a;try{a=e.decodeResult(t.method,i.result)}catch(e){return f(e instanceof Error?e:Error(String(e)))}if(a.kind===`invalid`)return f(a.error);if(a.kind===`input_required`){if(r?.allowInputRequired===!0)return d(Hh(a));let i={codec:e,request:t,resultSchema:n,options:r,flowStartedAt:c,retry:(r,i)=>this._requestWithSchemaViaCodec(e,r===void 0?{method:t.method}:{method:t.method,params:r},n,i)};return d(this._resolveNonCompleteResult(a,i))}let o=a.result;Gm(n,o).then(e=>{e.success?d(e.data):f(new Y(J.InvalidResult,`Invalid result for ${t.method}: ${e.error}`))},f)}),l=()=>_(r?.signal?.reason),r?.signal?.addEventListener(`abort`,l,{once:!0});let ne=r?.timeout??6e4;this._setupTimeout(h,ne,r?.maxTotalTimeout,()=>_(new Y(J.RequestTimeout,`Request timed out`,{timeout:ne})),r?.resetTimeoutOnProgress??!1),this._transport.send(ee,{relatedRequestId:i,resumptionToken:a,onresumptiontoken:o,headers:s,requestSignal:m?.signal}).catch(e=>{this._progressHandlers.delete(h),f(e)})}).finally(()=>{l&&r?.signal?.removeEventListener(`abort`,l),u!==void 0&&(this._responseHandlers.delete(u),this._cleanupTimeout(u))})}async notification(e,t){return await this._notificationViaCodec(this._resolveOutboundCodec(e.method),e,t)}async _notificationViaCodec(e,t,n){if(!this._transport)throw new Y(J.NotConnected,`Not connected`);if(dm(t.method)&&!e.hasNotificationMethod(t.method))throw new Y(J.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 r=this._envelopeOutbound({jsonrpc:`2.0`,...t});if((this._options?.debouncedNotificationMethods??[]).includes(t.method)&&!t.params&&n?.relatedRequestId===void 0){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(r,n).catch(e=>this._onerror(e))});return}await this._transport.send(r,n)}setRequestHandler(e,t,n){this.assertRequestHandlerCapability(e);let r;if(typeof t==`function`){if(!um(e))throw TypeError(`\'${e}\' is not a spec request method; pass schemas as the second argument to setRequestHandler().`);r=(n,r)=>{let i=this._negotiatedWireCodec(),a=i.validateRequest(e,n);if(!a.ok&&a.reason===`not-in-era`&&(a=i.validateInputRequest(e,n)),!a.ok)throw a.reason===`not-in-era`?new Z(X.InternalError,`No wire schema for ${e} in the resolved era`):Error(a.message);return Promise.resolve(t(a.value,r))}}else if(n)r=async(r,i)=>{let a=await Gm(t.params,{...r.params});if(!a.success)throw new Z(X.InvalidParams,`Invalid params for ${e}: ${a.error}`);return n(a.data,i)};else throw TypeError(`setRequestHandler: handler is required`);typeof t==`function`?this._customSchemaRequestMethods.delete(e):this._customSchemaRequestMethods.add(e),this._requestHandlers.set(e,this._wrapHandler(e,r))}_wrapHandler(e,t){return t}_outboundServerInfo(){}removeRequestHandler(e){this._requestHandlers.delete(e),this._customSchemaRequestMethods.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t,n){if(typeof t==`function`){if(!dm(e))throw TypeError(`\'${e}\' is not a spec notification method; pass schemas as the second argument to setNotificationHandler().`);this._notificationHandlers.set(e,(n,r)=>{let i=r.validateNotification(e,n);if(!i.ok)throw i.reason===`not-in-era`?new Z(X.InternalError,`No wire schema for ${e} in the resolved era`):Error(i.message);return Promise.resolve(t(i.value))});return}if(!n)throw TypeError(`setNotificationHandler: handler is required`);this._notificationHandlers.set(e,async r=>{let i=await Gm(t.params,{...r.params});if(!i.success)throw new Z(X.InvalidParams,`Invalid params for notification ${e}: ${i.error}`);await n(i.data,r)})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}};function Nh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ph(e,t){let n={...e};for(let e in t){let r=e,i=t[r];if(i===void 0)continue;let a=n[r];n[r]=Nh(a)&&Nh(i)?{...a,...i}:i}return n}function Fh(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Ih(e){let t={},n=[];if(!Fh(e))return{accepted:t,droppedKeys:n};for(let[r,i]of Object.entries(e)){if(!Fh(i)||`method`in i||`result`in i){n.push(r);continue}t[r]=i}return{accepted:t,droppedKeys:n}}function Lh(e){throw new Y(J.SendFailed,`ctx.mcpReq.${e} is not available while fulfilling an embedded input request: the request is fulfilled locally and has no related peer request`)}function Rh(e,t,n,r,i){return{sessionId:i,mcpReq:{id:e,method:t,_meta:n?._meta,requestState:Ah(void 0),signal:r,send:(()=>Lh(`send`)),notify:()=>Lh(`notify`)}}}async function zh(e,t,n,r,i){if(!Fh(r)||typeof r.method!=`string`)throw new Y(J.InvalidResult,`Invalid input request \'${n}\': each inputRequests entry must be an embedded request object with a method`,{key:n});let a=r.method;if(!t.hasInputRequestMethod(a))throw new Y(J.InvalidResult,`Invalid input request \'${n}\': \'${a}\' is not an embedded request the ${t.era} revision defines (expected elicitation/create, sampling/createMessage, or roots/list)`,{key:n,method:a});let o=e.getRequestHandler(a);if(o===void 0)throw new Y(J.CapabilityNotSupported,`Cannot fulfil input request \'${n}\': no handler is registered for \'${a}\' on this client. Declare the corresponding capability and register a handler, or handle input_required results manually.`,{key:n,method:a});let s=Fh(r.params)?r.params:void 0;return await o({jsonrpc:`2.0`,id:n,method:a,...s!==void 0&&{params:s}},e.buildContext(Rh(n,a,s,i,e.sessionId)))}function Bh(e,t){return{...e?.signal!==void 0&&{signal:e.signal},...e?.onprogress!==void 0&&{onprogress:e.onprogress},...e?.resetTimeoutOnProgress!==void 0&&{resetTimeoutOnProgress:e.resetTimeoutOnProgress},...e?.headers!==void 0&&{headers:e.headers},...t.timeout!==void 0&&{timeout:t.timeout},...t.maxTotalTimeout!==void 0&&{maxTotalTimeout:t.maxTotalTimeout},allowInputRequired:!0}}function Vh(e,t,n,r){let{codec:i,request:a,options:o,flowStartedAt:s}=r,c={inputRequests:n.inputRequests,...n.requestState!==void 0&&{requestState:n.requestState}},l={dispatchInputRequest:(t,n,r)=>zh(e,i,t,n,r),retry:(e,t)=>r.retry(e,Bh(o,t))};return vh({config:t,method:a.method,originalParams:a.params,firstPayload:c,flowStartedAt:s,signal:o?.signal,requestOptions:{...o?.timeout!==void 0&&{timeout:o.timeout},...o?.maxTotalTimeout!==void 0&&{maxTotalTimeout:o.maxTotalTimeout},...o?.onprogress!==void 0&&{onprogress:o.onprogress}},hooks:l})}function Hh(e){return{resultType:`input_required`,inputRequests:e.inputRequests,...e.requestState!==void 0&&{requestState:e.requestState},...e._meta!==void 0&&{_meta:e._meta}}}t((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,r=/^[!#$%&\'*+.^_`|~0-9A-Za-z-]+\\/[!#$%&\'*+.^_`|~0-9A-Za-z-]+$/;e.parse=i;function i(e){if(!e)throw TypeError(`argument string is required`);var i=typeof e==`object`?a(e):e;if(typeof i!=`string`)throw TypeError(`argument string is required to be a string`);var s=i.indexOf(`;`),c=s===-1?i.trim():i.slice(0,s).trim();if(!r.test(c))throw TypeError(`invalid media type`);var l=new o(c.toLowerCase());if(s!==-1){var u,d,f;for(t.lastIndex=s;d=t.exec(i);){if(d.index!==s)throw TypeError(`invalid parameter format`);s+=d[0].length,u=d[1].toLowerCase(),f=d[2],f.charCodeAt(0)===34&&(f=f.slice(1,-1),f.indexOf(`\\\\`)!==-1&&(f=f.replace(n,`$1`))),l.parameters[u]=f}if(s!==i.length)throw TypeError(`invalid parameter format`)}return l}function a(e){var t;if(typeof e.getHeader==`function`?t=e.getHeader(`content-type`):typeof e.headers==`object`&&(t=e.headers&&e.headers[`content-type`]),typeof t!=`string`)throw TypeError(`content-type header is missing from object`);return t}function o(e){this.parameters=Object.create(null),this.type=e}}))();function Uh(e,t){let n=typeof e;if(n!==typeof t)return!1;if(Array.isArray(e)){if(!Array.isArray(t))return!1;let n=e.length;if(n!==t.length)return!1;for(let r=0;r<n;r++)if(!Uh(e[r],t[r]))return!1;return!0}if(n===`object`){if(!e||!t)return e===t;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!Uh(e[r],t[r]))return!1;return!0}return e===t}function Wh(e){return encodeURI(Gh(e))}function Gh(e){return e.replace(/~/g,`~0`).replace(/\\//g,`~1`)}var Kh={prefixItems:!0,items:!0,allOf:!0,anyOf:!0,oneOf:!0},qh={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependentSchemas:!0},Jh={id:!0,$id:!0,$ref:!0,$schema:!0,$anchor:!0,$vocabulary:!0,$comment:!0,default:!0,enum:!0,const:!0,required:!0,type:!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},Yh=typeof self<`u`&&self.location&&self.location.origin!==`null`?new URL(self.location.origin+self.location.pathname+location.search):new URL(`https://github.com/cfworker`);function Xh(e,t=Object.create(null),n=Yh,r=``){if(e&&typeof e==`object`&&!Array.isArray(e)){let i=e.$id||e.id;if(i){let a=new URL(i,n.href);a.hash.length>1?t[a.href]=e:(a.hash=``,r===``?n=a:Xh(e,t,n))}}else if(e!==!0&&e!==!1)return t;let i=n.href+(r?`#`+r:``);if(t[i]!==void 0)throw Error(`Duplicate schema URI "${i}".`);if(t[i]=e,e===!0||e===!1)return t;if(e.__absolute_uri__===void 0&&Object.defineProperty(e,"__absolute_uri__",{enumerable:!1,value:i}),e.$ref&&e.__absolute_ref__===void 0){let t=new URL(e.$ref,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_ref__",{enumerable:!1,value:t.href})}if(e.$recursiveRef&&e.__absolute_recursive_ref__===void 0){let t=new URL(e.$recursiveRef,n.href);t.hash=t.hash,Object.defineProperty(e,"__absolute_recursive_ref__",{enumerable:!1,value:t.href})}if(e.$anchor){let r=new URL(`#`+e.$anchor,n.href);t[r.href]=e}for(let i in e){if(Jh[i])continue;let a=`${r}/${Wh(i)}`,o=e[i];if(Array.isArray(o)){if(Kh[i]){let e=o.length;for(let r=0;r<e;r++)Xh(o[r],t,n,`${a}/${r}`)}}else if(qh[i])for(let e in o)Xh(o[e],t,n,`${a}/${Wh(e)}`);else Xh(o,t,n,a)}return t}var Zh=/^(\\d\\d\\d\\d)-(\\d\\d)-(\\d\\d)$/,Qh=[0,31,28,31,30,31,30,31,31,30,31,30,31],$h=/^(\\d\\d):(\\d\\d):(\\d\\d)(\\.\\d+)?(z|[+-]\\d\\d(?::?\\d\\d)?)?$/i,eg=/^(?=.{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,tg=/^(?:[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,ng=/^(?:(?:[^\\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,rg=/^(?:(?:https?|ftp):\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!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-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}0-9]+-?)*[a-z\\u{00a1}-\\u{ffff}0-9]+)*(?:\\.(?:[a-z\\u{00a1}-\\u{ffff}]{2,})))(?::\\d{2,5})?(?:\\/[^\\s]*)?$/iu,ig=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,ag=/^(?:\\/(?:[^~/]|~0|~1)*)*$/,og=/^#(?:\\/(?:[a-z0-9_\\-.!$&\'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,sg=/^(?:0|[1-9][0-9]*)(?:#|(?:\\/(?:[^~/]|~0|~1)*)*)$/,cg=e=>{if(e[0]===`"`)return!1;let[t,n,...r]=e.split(`@`);return!t||!n||r.length!==0||t.length>64||n.length>253||t[0]===`.`||t.endsWith(`.`)||t.includes(`..`)||!/^[a-z0-9.-]+$/i.test(n)||!/^[a-z0-9.!#$%&\'*+/=?^_`{|}~-]+$/i.test(t)?!1:n.split(`.`).every(e=>/^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$/i.test(e))},lg=/^(?:(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)\\.){3}(?:25[0-5]|2[0-4]\\d|[01]?\\d\\d?)$/,ug=/^((([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,dg=e=>e.length>1&&e.length<80&&(/^P\\d+([.,]\\d+)?W$/.test(e)||/^P[\\dYMDTHS]*(\\d[.,]\\d+)?[YMDHS]$/.test(e)&&/^P([.,\\d]+Y)?([.,\\d]+M)?([.,\\d]+D)?(T([.,\\d]+H)?([.,\\d]+M)?([.,\\d]+S)?)?$/.test(e));function fg(e){return e.test.bind(e)}var pg={date:hg,time:gg.bind(void 0,!1),"date-time":vg,duration:dg,uri:xg,"uri-reference":fg(tg),"uri-template":fg(ng),url:fg(rg),email:cg,hostname:fg(eg),ipv4:fg(lg),ipv6:fg(ug),regex:Cg,uuid:fg(ig),"json-pointer":fg(ag),"json-pointer-uri-fragment":fg(og),"relative-json-pointer":fg(sg)};function mg(e){return e%4==0&&(e%100!=0||e%400==0)}function hg(e){let t=e.match(Zh);if(!t)return!1;let n=+t[1],r=+t[2],i=+t[3];return r>=1&&r<=12&&i>=1&&i<=(r==2&&mg(n)?29:Qh[r])}function gg(e,t){let n=t.match($h);if(!n)return!1;let r=+n[1],i=+n[2],a=+n[3],o=!!n[5];return(r<=23&&i<=59&&a<=59||r==23&&i==59&&a==60)&&(!e||o)}var _g=/t|\\s/i;function vg(e){let t=e.split(_g);return t.length==2&&hg(t[0])&&gg(!0,t[1])}var yg=/\\/|:/,bg=/^(?:[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 xg(e){return yg.test(e)&&bg.test(e)}var Sg=/[^\\\\]\\\\Z/;function Cg(e){if(Sg.test(e))return!1;try{return new RegExp(e,`u`),!0}catch{return!1}}function wg(e){let t=0,n=e.length,r=0,i;for(;r<n;)t++,i=e.charCodeAt(r++),i>=55296&&i<=56319&&r<n&&(i=e.charCodeAt(r),(i&64512)==56320&&r++);return t}function Q(e,t,n=`2019-09`,r=Xh(t),i=!0,a=null,o=`#`,s=`#`,c=Object.create(null)){if(t===!0)return{valid:!0,errors:[]};if(t===!1)return{valid:!1,errors:[{instanceLocation:o,keyword:`false`,keywordLocation:o,error:`False boolean schema.`}]};let l=typeof e,u;switch(l){case`boolean`:case`number`:case`string`:u=l;break;case`object`:u=e===null?`null`:Array.isArray(e)?`array`:`object`;break;default:throw Error(`Instances of "${l}" type are not supported.`)}let{$ref:d,$recursiveRef:f,$recursiveAnchor:p,type:m,const:h,enum:g,required:ee,not:te,anyOf:_,allOf:ne,oneOf:re,if:ie,then:ae,else:oe,format:se,properties:v,patternProperties:ce,additionalProperties:le,unevaluatedProperties:ue,minProperties:de,maxProperties:fe,propertyNames:pe,dependentRequired:me,dependentSchemas:he,dependencies:ge,prefixItems:y,items:b,additionalItems:_e,unevaluatedItems:ve,contains:ye,minContains:x,maxContains:be,minItems:xe,maxItems:Se,uniqueItems:Ce,minimum:we,maximum:Te,exclusiveMinimum:Ee,exclusiveMaximum:De,multipleOf:Oe,minLength:S,maxLength:ke,pattern:Ae,__absolute_ref__:je,__absolute_recursive_ref__:Me}=t,C=[];if(p===!0&&a===null&&(a=t),f===`#`){let l=a===null?r[Me]:a,u=`${s}/$recursiveRef`,d=Q(e,a===null?t:a,n,r,i,l,o,u,c);d.valid||C.push({instanceLocation:o,keyword:`$recursiveRef`,keywordLocation:u,error:`A subschema had errors.`},...d.errors)}if(d!==void 0){let t=r[je||d];if(t===void 0){let e=`Unresolved $ref "${d}".`;throw je&&je!==d&&(e+=` Absolute URI "${je}".`),e+=`\\nKnown schemas:\\n- ${Object.keys(r).join(`\n- `)}`,Error(e)}let l=`${s}/$ref`,u=Q(e,t,n,r,i,a,o,l,c);if(u.valid||C.push({instanceLocation:o,keyword:`$ref`,keywordLocation:l,error:`A subschema had errors.`},...u.errors),n===`4`||n===`7`)return{valid:C.length===0,errors:C}}if(Array.isArray(m)){let t=m.length,n=!1;for(let r=0;r<t;r++)if(u===m[r]||m[r]===`integer`&&u===`number`&&e%1==0&&e===e){n=!0;break}n||C.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m.join(`", "`)}".`})}else m===`integer`?(u!==`number`||e%1||e!==e)&&C.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`}):m!==void 0&&u!==m&&C.push({instanceLocation:o,keyword:`type`,keywordLocation:`${s}/type`,error:`Instance type "${u}" is invalid. Expected "${m}".`});if(h!==void 0&&(u===`object`||u===`array`?Uh(e,h)||C.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`}):e!==h&&C.push({instanceLocation:o,keyword:`const`,keywordLocation:`${s}/const`,error:`Instance does not match ${JSON.stringify(h)}.`})),g!==void 0&&(u===`object`||u===`array`?g.some(t=>Uh(e,t))||C.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`}):g.some(t=>e===t)||C.push({instanceLocation:o,keyword:`enum`,keywordLocation:`${s}/enum`,error:`Instance does not match any of ${JSON.stringify(g)}.`})),te!==void 0){let t=`${s}/not`;Q(e,te,n,r,i,a,o,t).valid&&C.push({instanceLocation:o,keyword:`not`,keywordLocation:t,error:`Instance matched "not" schema.`})}let Ne=[];if(_!==void 0){let t=`${s}/anyOf`,l=C.length,u=!1;for(let s=0;s<_.length;s++){let l=_[s],d=Object.create(c),f=Q(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);C.push(...f.errors),u||=f.valid,f.valid&&Ne.push(d)}u?C.length=l:C.splice(l,0,{instanceLocation:o,keyword:`anyOf`,keywordLocation:t,error:`Instance does not match any subschemas.`})}if(ne!==void 0){let t=`${s}/allOf`,l=C.length,u=!0;for(let s=0;s<ne.length;s++){let l=ne[s],d=Object.create(c),f=Q(e,l,n,r,i,p===!0?a:null,o,`${t}/${s}`,d);C.push(...f.errors),u&&=f.valid,f.valid&&Ne.push(d)}u?C.length=l:C.splice(l,0,{instanceLocation:o,keyword:`allOf`,keywordLocation:t,error:`Instance does not match every subschema.`})}if(re!==void 0){let t=`${s}/oneOf`,l=C.length,u=re.filter((s,l)=>{let u=Object.create(c),d=Q(e,s,n,r,i,p===!0?a:null,o,`${t}/${l}`,u);return C.push(...d.errors),d.valid&&Ne.push(u),d.valid}).length;u===1?C.length=l:C.splice(l,0,{instanceLocation:o,keyword:`oneOf`,keywordLocation:t,error:`Instance does not match exactly one subschema (${u} matches).`})}if((u===`object`||u===`array`)&&Object.assign(c,...Ne),ie!==void 0){let t=`${s}/if`;if(Q(e,ie,n,r,i,a,o,t,c).valid){if(ae!==void 0){let l=Q(e,ae,n,r,i,a,o,`${s}/then`,c);l.valid||C.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "then" schema.`},...l.errors)}}else if(oe!==void 0){let l=Q(e,oe,n,r,i,a,o,`${s}/else`,c);l.valid||C.push({instanceLocation:o,keyword:`if`,keywordLocation:t,error:`Instance does not match "else" schema.`},...l.errors)}}if(u===`object`){if(ee!==void 0)for(let t of ee)t in e||C.push({instanceLocation:o,keyword:`required`,keywordLocation:`${s}/required`,error:`Instance does not have required property "${t}".`});let t=Object.keys(e);if(de!==void 0&&t.length<de&&C.push({instanceLocation:o,keyword:`minProperties`,keywordLocation:`${s}/minProperties`,error:`Instance does not have at least ${de} properties.`}),fe!==void 0&&t.length>fe&&C.push({instanceLocation:o,keyword:`maxProperties`,keywordLocation:`${s}/maxProperties`,error:`Instance does not have at least ${fe} properties.`}),pe!==void 0){let t=`${s}/propertyNames`;for(let s in e){let e=`${o}/${Wh(s)}`,c=Q(s,pe,n,r,i,a,e,t);c.valid||C.push({instanceLocation:o,keyword:`propertyNames`,keywordLocation:t,error:`Property name "${s}" does not match schema.`},...c.errors)}}if(me!==void 0){let t=`${s}/dependantRequired`;for(let n in me)if(n in e){let r=me[n];for(let i of r)i in e||C.push({instanceLocation:o,keyword:`dependentRequired`,keywordLocation:t,error:`Instance has "${n}" but does not have "${i}".`})}}if(he!==void 0)for(let t in he){let l=`${s}/dependentSchemas`;if(t in e){let s=Q(e,he[t],n,r,i,a,o,`${l}/${Wh(t)}`,c);s.valid||C.push({instanceLocation:o,keyword:`dependentSchemas`,keywordLocation:l,error:`Instance has "${t}" but does not match dependant schema.`},...s.errors)}}if(ge!==void 0){let t=`${s}/dependencies`;for(let s in ge)if(s in e){let c=ge[s];if(Array.isArray(c))for(let n of c)n in e||C.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not have "${n}".`});else{let l=Q(e,c,n,r,i,a,o,`${t}/${Wh(s)}`);l.valid||C.push({instanceLocation:o,keyword:`dependencies`,keywordLocation:t,error:`Instance has "${s}" but does not match dependant schema.`},...l.errors)}}}let l=Object.create(null),u=!1;if(v!==void 0){let t=`${s}/properties`;for(let s in v){if(!(s in e))continue;let d=`${o}/${Wh(s)}`,f=Q(e[s],v[s],n,r,i,a,d,`${t}/${Wh(s)}`);if(f.valid)c[s]=l[s]=!0;else if(u=i,C.push({instanceLocation:o,keyword:`properties`,keywordLocation:t,error:`Property "${s}" does not match schema.`},...f.errors),u)break}}if(!u&&ce!==void 0){let t=`${s}/patternProperties`;for(let s in ce){let d=new RegExp(s,`u`),f=ce[s];for(let p in e){if(!d.test(p))continue;let m=`${o}/${Wh(p)}`,h=Q(e[p],f,n,r,i,a,m,`${t}/${Wh(s)}`);h.valid?c[p]=l[p]=!0:(u=i,C.push({instanceLocation:o,keyword:`patternProperties`,keywordLocation:t,error:`Property "${p}" matches pattern "${s}" but does not match associated schema.`},...h.errors))}}}if(!u&&le!==void 0){let t=`${s}/additionalProperties`;for(let s in e){if(l[s])continue;let d=`${o}/${Wh(s)}`,f=Q(e[s],le,n,r,i,a,d,t);f.valid?c[s]=!0:(u=i,C.push({instanceLocation:o,keyword:`additionalProperties`,keywordLocation:t,error:`Property "${s}" does not match additional properties schema.`},...f.errors))}}else if(!u&&ue!==void 0){let t=`${s}/unevaluatedProperties`;for(let s in e)if(!c[s]){let l=`${o}/${Wh(s)}`,u=Q(e[s],ue,n,r,i,a,l,t);u.valid?c[s]=!0:C.push({instanceLocation:o,keyword:`unevaluatedProperties`,keywordLocation:t,error:`Property "${s}" does not match unevaluated properties schema.`},...u.errors)}}}else if(u===`array`){Se!==void 0&&e.length>Se&&C.push({instanceLocation:o,keyword:`maxItems`,keywordLocation:`${s}/maxItems`,error:`Array has too many items (${e.length} > ${Se}).`}),xe!==void 0&&e.length<xe&&C.push({instanceLocation:o,keyword:`minItems`,keywordLocation:`${s}/minItems`,error:`Array has too few items (${e.length} < ${xe}).`});let t=e.length,l=0,u=!1;if(y!==void 0){let d=`${s}/prefixItems`,f=Math.min(y.length,t);for(;l<f;l++){let t=Q(e[l],y[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,C.push({instanceLocation:o,keyword:`prefixItems`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}if(b!==void 0){let d=`${s}/items`;if(Array.isArray(b)){let s=Math.min(b.length,t);for(;l<s;l++){let t=Q(e[l],b[l],n,r,i,a,`${o}/${l}`,`${d}/${l}`);if(c[l]=!0,!t.valid&&(u=i,C.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}}else for(;l<t;l++){let t=Q(e[l],b,n,r,i,a,`${o}/${l}`,d);if(c[l]=!0,!t.valid&&(u=i,C.push({instanceLocation:o,keyword:`items`,keywordLocation:d,error:`Items did not match schema.`},...t.errors),u))break}if(!u&&_e!==void 0){let d=`${s}/additionalItems`;for(;l<t;l++){let t=Q(e[l],_e,n,r,i,a,`${o}/${l}`,d);c[l]=!0,t.valid||(u=i,C.push({instanceLocation:o,keyword:`additionalItems`,keywordLocation:d,error:`Items did not match additional items schema.`},...t.errors))}}}if(ye!==void 0)if(t===0&&x===void 0)C.push({instanceLocation:o,keyword:`contains`,keywordLocation:`${s}/contains`,error:`Array is empty. It must contain at least one item matching the schema.`});else if(x!==void 0&&t<x)C.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array has less items (${t}) than minContains (${x}).`});else{let l=`${s}/contains`,u=C.length,d=0;for(let s=0;s<t;s++){let t=Q(e[s],ye,n,r,i,a,`${o}/${s}`,l);t.valid?(c[s]=!0,d++):C.push(...t.errors)}d>=(x||0)&&(C.length=u),x===void 0&&be===void 0&&d===0?C.splice(u,0,{instanceLocation:o,keyword:`contains`,keywordLocation:l,error:`Array does not contain item matching schema.`}):x!==void 0&&d<x?C.push({instanceLocation:o,keyword:`minContains`,keywordLocation:`${s}/minContains`,error:`Array must contain at least ${x} items matching schema. Only ${d} items were found.`}):be!==void 0&&d>be&&C.push({instanceLocation:o,keyword:`maxContains`,keywordLocation:`${s}/maxContains`,error:`Array may contain at most ${be} items matching schema. ${d} items were found.`})}if(!u&&ve!==void 0){let u=`${s}/unevaluatedItems`;for(;l<t;l++){if(c[l])continue;let t=Q(e[l],ve,n,r,i,a,`${o}/${l}`,u);c[l]=!0,t.valid||C.push({instanceLocation:o,keyword:`unevaluatedItems`,keywordLocation:u,error:`Items did not match unevaluated items schema.`},...t.errors)}}if(Ce)for(let n=0;n<t;n++){let r=e[n],i=typeof r==`object`&&!!r;for(let a=0;a<t;a++){if(n===a)continue;let t=e[a];(r===t||i&&typeof t==`object`&&t&&Uh(r,t))&&(C.push({instanceLocation:o,keyword:`uniqueItems`,keywordLocation:`${s}/uniqueItems`,error:`Duplicate items at indexes ${n} and ${a}.`}),n=2**53-1,a=2**53-1)}}}else if(u===`number`){if(n===`4`?(we!==void 0&&(Ee===!0&&e<=we||e<we)&&C.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${Ee?`or equal to `:``} ${we}.`}),Te!==void 0&&(De===!0&&e>=Te||e>Te)&&C.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${De?`or equal to `:``} ${Te}.`})):(we!==void 0&&e<we&&C.push({instanceLocation:o,keyword:`minimum`,keywordLocation:`${s}/minimum`,error:`${e} is less than ${we}.`}),Te!==void 0&&e>Te&&C.push({instanceLocation:o,keyword:`maximum`,keywordLocation:`${s}/maximum`,error:`${e} is greater than ${Te}.`}),Ee!==void 0&&e<=Ee&&C.push({instanceLocation:o,keyword:`exclusiveMinimum`,keywordLocation:`${s}/exclusiveMinimum`,error:`${e} is less than ${Ee}.`}),De!==void 0&&e>=De&&C.push({instanceLocation:o,keyword:`exclusiveMaximum`,keywordLocation:`${s}/exclusiveMaximum`,error:`${e} is greater than or equal to ${De}.`})),Oe!==void 0){let t=e%Oe;Math.abs(0-t)>=1.1920929e-7&&Math.abs(Oe-t)>=1.1920929e-7&&C.push({instanceLocation:o,keyword:`multipleOf`,keywordLocation:`${s}/multipleOf`,error:`${e} is not a multiple of ${Oe}.`})}}else if(u===`string`){let t=S===void 0&&ke===void 0?0:wg(e);S!==void 0&&t<S&&C.push({instanceLocation:o,keyword:`minLength`,keywordLocation:`${s}/minLength`,error:`String is too short (${t} < ${S}).`}),ke!==void 0&&t>ke&&C.push({instanceLocation:o,keyword:`maxLength`,keywordLocation:`${s}/maxLength`,error:`String is too long (${t} > ${ke}).`}),Ae!==void 0&&!new RegExp(Ae,`u`).test(e)&&C.push({instanceLocation:o,keyword:`pattern`,keywordLocation:`${s}/pattern`,error:`String does not match pattern.`}),se!==void 0&&pg[se]&&!pg[se](e)&&C.push({instanceLocation:o,keyword:`format`,keywordLocation:`${s}/format`,error:`String does not match format "${se}".`})}return{valid:C.length===0,errors:C}}var Tg=class{schema;draft;shortCircuit;lookup;constructor(e,t=`2019-09`,n=!0){this.schema=e,this.draft=t,this.shortCircuit=n,this.lookup=Xh(e)}validate(e){return Q(e,this.schema,this.draft,this.lookup,this.shortCircuit)}addSchema(e,t){t&&(e={...e,$id:t}),Xh(e,this.lookup)}},Eg=class{shortcircuit;draft;constructor(e){this.shortcircuit=e?.shortcircuit??!0,this.draft=e?.draft}_draftFor(e){let t=c(e,`pass an explicit { draft } to CfWorkerJsonSchemaValidator to validate other dialects.`);return t===`draft-7`?`7`:t}getValidator(e){let t=new Tg(e,this.draft??this._draftFor(e),this.shortcircuit);return e=>{let n=t.validate(e);return n.valid?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:n.errors.map(e=>`${e.instanceLocation}: ${e.error}`).join(`; `)}}}};globalThis.crypto;var Dg=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.OAuthClientFlowError`})}static[Symbol.hasInstance](e){return Ff(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ff(this,e)}constructor(e){super(e),this.name=new.target.name,Pf(this,new.target)}};(class extends Dg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.IssuerMismatchError`})}kind;expected;received;constructor(e,t,n){super(`Issuer mismatch in ${e===`metadata`?`authorization server metadata (RFC 8414 \xA73.3)`:`authorization response (RFC 9207)`}: expected ${JSON.stringify(t)}, received ${JSON.stringify(n)}`),this.kind=e,this.expected=t,this.received=n}}),class extends Dg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.RegistrationRejectedError`})}status;body;submittedMetadata;constructor(e){super(`Dynamic Client Registration rejected (HTTP ${e.status}): ${e.body}`),this.status=e.status,this.body=e.body,this.submittedMetadata=e.submittedMetadata}},class extends Dg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsecureTokenEndpointError`})}tokenEndpoint;constructor(e){super(`Refusing to send credentials to non-https token endpoint \'${e}\'. OAuth token requests MUST use TLS (localhost / *.localhost / 127.0.0.1 / ::1 are exempt).`),this.tokenEndpoint=e}},class extends Dg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.AuthorizationServerMismatchError`})}constructor(e,t){super(`Authorization server mismatch: credentials are bound to ${JSON.stringify(e)} but this call resolved ${JSON.stringify(t)}; refusing to present them to a different authorization server`),this.recordedIssuer=e,this.currentIssuer=t}},class extends Dg{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.InsufficientScopeError`})}requiredScope;resourceMetadataUrl;errorDescription;constructor(e){super(`Insufficient scope${e.requiredScope?`: required "${e.requiredScope}"`:``}`),this.requiredScope=e.requiredScope,this.resourceMetadataUrl=e.resourceMetadataUrl,this.errorDescription=e.errorDescription}};var Og=class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.UnauthorizedError`})}static[Symbol.hasInstance](e){return Ff(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ff(this,e)}constructor(e){super(e??`Unauthorized`),this.name=`UnauthorizedError`,Pf(this,new.target)}},kg=new Set([`tools/list`,`prompts/list`,`resources/list`,`resources/templates/list`,`server/discover`]),Ag=class{_entries=new Map;_maxEntries;_stamp=0;_cappedSize=0;constructor(e){this._maxEntries=e?.maxEntries??512}get size(){return this._entries.size}get(e){return this._entries.get(jg(e))}set(e,t){let n=jg(e),r=kg.has(e.method),i=!this._entries.has(n);if(!r&&i&&this._maxEntries>0&&this._cappedSize>=this._maxEntries){for(let e of this._entries.keys())if(!kg.has(e.slice(0,e.indexOf(`\\0`)))){this._entries.delete(e),this._cappedSize--;break}}let a=++this._stamp;return this._entries.set(n,{...t,stamp:a}),i&&!r&&this._cappedSize++,a}delete(e){this._entries.delete(jg(e))&&!kg.has(e.method)&&this._cappedSize--}evict(e){let t=`${e}\\0`,n=kg.has(e);for(let e of this._entries.keys())e.startsWith(t)&&(this._entries.delete(e),n||this._cappedSize--)}clear(){this._entries.clear(),this._cappedSize=0}};function jg(e){return`${e.method}\\0${JSON.stringify([e.partition??``,e.params??``])}`}function Mg(e,t){return t===void 0?e:`${e}\\0${t}`}var Ng=864e5,Pg=class{_evictionGeneration=new Map;_toolIndex;_toolOutputValidatorIndex;_serverIdentity=``;constructor(e,t,n=()=>{},r=``,i=Date.now){this._store=e,this._isUserSupplied=t,this._reportError=n,this._cachePartition=r,this._now=i}now(){return this._now()}setServerIdentity(e){this._serverIdentity=e}_partitionFor(e){return JSON.stringify([this._serverIdentity,e===`public`?``:this._cachePartition])}async _probe(e,t){let n={method:e,params:t??``},r=this._partitionFor(`private`),i=await this._store.get({...n,partition:r});if(i!==void 0)return i;let a=this._partitionFor(`public`);if(a===r)return;let o=await this._store.get({...n,partition:a});return o?.scope===`public`?o:void 0}async evict(e){this._evictionGeneration.set(e,(this._evictionGeneration.get(e)??0)+1),await this._deleteBoth(e,``)}async _deleteBoth(e,t){let n=this._partitionFor(`private`),r=this._partitionFor(`public`);try{await this._store.delete({method:e,params:t,partition:n})}catch(e){this._reportError(e)}if(r!==n)try{await this._store.delete({method:e,params:t,partition:r})}catch(e){this._reportError(e)}}async evictKey(e,t){let n=Mg(e,t),r=this._evictionGeneration.get(n);r!==void 0&&this._evictionGeneration.set(n,r+1),await this._deleteBoth(e,t)}captureGeneration(e,t){let n=Mg(e,t),r=this._evictionGeneration.get(n)??0;return this._evictionGeneration.set(n,r),r}async write(e,t,n,r){if((this._evictionGeneration.get(Mg(e,r?.params))??0)!==n)return;let i=r?.params??``,a=this._partitionFor(`private`),o=this._partitionFor(`public`),s=(r?.scope??`private`)===`public`?o:a;try{await this._store.set({method:e,params:i,partition:s},{value:Fg(t),expiresAt:r?.expiresAt,scope:r?.scope})}catch(e){this._reportError(e)}if(o!==a)try{await this._store.delete({method:e,params:i,partition:s===a?o:a})}catch(e){this._reportError(e)}}async read(e,t){let n=await this._probe(e,t);if(!(n?.expiresAt===void 0||!(n.expiresAt>this.now())))try{let e=JSON.parse(n.value);if(typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`cached document is not an object`);return{value:e}}catch(n){this._reportError(n),await this._deleteBoth(e,t??``);return}}resetForReconnect(){this._isUserSupplied||this._store.clear(),this._evictionGeneration.clear(),this._toolIndex=void 0,this._toolOutputValidatorIndex=void 0,this._serverIdentity=``}async toolDefinition(e){let t=await this._probe(`tools/list`);if(t===void 0){this._toolIndex=void 0;return}if(this._toolIndex?.stamp!==t.stamp){let e=this._decodeListTools(t),n=new Map;if(e!==void 0)for(let t of e.tools)n.set(t.name,t);this._toolIndex={stamp:t.stamp,byName:n}}return this._toolIndex.byName.get(e)}async outputValidator(e,t){let n=await this._probe(`tools/list`);if(n===void 0){this._toolOutputValidatorIndex=void 0;return}if(this._toolOutputValidatorIndex?.stamp!==n.stamp){let e=this._decodeListTools(n)??{tools:[]},r=new Map;for(let n of e.tools){let e=t(n);e!==void 0&&r.set(n.name,e)}this._toolOutputValidatorIndex={stamp:n.stamp,byName:r}}return this._toolOutputValidatorIndex.byName.get(e)}_decodeListTools(e){try{let t=JSON.parse(e.value);if(!Array.isArray(t?.tools)||!t.tools.every(e=>typeof e==`object`&&!!e))throw TypeError(`cached tools/list document has a malformed tools array`);return t}catch(e){this._reportError(e);return}}};function Fg(e){let t;try{t=JSON.stringify(e)}catch(e){throw TypeError(`cache value is not JSON-serializable: ${e instanceof Error?e.message:String(e)}`)}if(typeof t!=`string`)throw TypeError(`cache value is not JSON-serializable: it has no JSON representation`);return t}var Ig=Symbol.for(`mcp.authSeamEscape`);function Lg(e){return(typeof e==`object`&&!!e||typeof e==`function`)&&e[Ig]===!0}var Rg=-32022,zg=new Set([-32001,-32020,-32021]);function Bg(e,t){switch(e.kind){case`result`:return Vg(e.result,t);case`rpc-error`:return Hg(e,t);case`http-error`:return Ug(e,t);case`network-error`:return Wg(e.error,t);case`unusable-reply`:return{kind:`error`,error:new Y(J.EraNegotiationFailed,`Version negotiation probe failed: the server answered with an unusable reply (${Kg(e.error)})`,{cause:e.error},{cause:e.error})};case`auth-required`:return{kind:`error`,error:e.error};case`closed`:return t.transportKind===`stdio`?{kind:`legacy`}:Wg(Error(`Connection closed during the version negotiation probe`),t);case`timeout`:return t.transportKind===`stdio`?{kind:`legacy`}:{kind:`error`,error:new Y(J.RequestTimeout,`Version negotiation probe timed out after ${e.timeoutMs}ms`,{timeout:e.timeoutMs})}}}function Vg(e,t){let n=cm(sm).validateResult(`server/discover`,e);if(!n.ok)return{kind:`legacy`};let r=n.value.supportedVersions,i=t.clientModernVersions.find(e=>r.includes(e));return i===void 0?t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:new Dp({supported:[...r],requested:t.requestedVersion})}:{kind:`modern`,version:i,discover:n.value}}function Hg(e,t){let{code:n,message:r,data:i}=e;if(n===Rg){let e=qg(i);if(e===void 0)return{kind:`legacy`};let n=new Dp({supported:e,requested:Jg(i)??t.requestedVersion},r),a=Vf(e),o=t.clientModernVersions.find(e=>a.includes(e));return o===void 0?a.length>0?{kind:`error`,error:n}:t.fallbackAvailable?{kind:`legacy`}:{kind:`error`,error:n}:{kind:`corrective`,version:o,error:n}}return zg.has(n),{kind:`legacy`}}function Ug(e,t){if(e.status===401||e.status===403){let t=e.status===403;return{kind:`error`,error:new If(t?J.ClientHttpForbidden:J.ClientHttpAuthentication,`Version negotiation failed: ${t?`the server denied access (HTTP 403)`:`the server requires authorization (HTTP 401)`}`,{status:e.status,statusText:e.statusText,text:e.body})}}if(e.status>=500)return{kind:`error`,error:new If(J.EraNegotiationFailed,`Version negotiation failed: the server answered the probe with HTTP ${e.status}`,{status:e.status,statusText:e.statusText,text:e.body})};let n=Yg(e.body);return n===void 0?{kind:`legacy`}:Hg(n,t)}function Wg(e,t){return t.environment===`browser`&&Gg(e)?{kind:`legacy`}:{kind:`error`,error:new Y(J.EraNegotiationFailed,`Version negotiation probe failed: ${Kg(e)}`,{cause:e},{cause:e})}}function Gg(e){return e instanceof TypeError||e instanceof Error&&e.name===`TypeError`}function Kg(e){return e instanceof Error?e.message:String(e)}function qg(e){if(typeof e!=`object`||!e)return;let t=e.supported;if(!(!Array.isArray(t)||t.length===0||!t.every(e=>typeof e==`string`)))return t}function Jg(e){if(typeof e!=`object`||!e)return;let t=e.requested;return typeof t==`string`?t:void 0}function Yg(e){if(e===void 0||e===``)return;let t;try{t=JSON.parse(e)}catch{return}if(typeof t!=`object`||!t)return;let n=t.error;if(typeof n!=`object`||!n)return;let{code:r,message:i,data:a}=n;if(typeof r==`number`)return{code:r,message:typeof i==`string`?i:``,data:a}}var Xg=`legacy`;function Zg(e,t){let n=e?.mode??Xg;if(n===`legacy`)return{kind:`legacy`};let r=e?.probe??{};if(typeof n==`object`){if(!zf(n.pin))throw TypeError(`versionNegotiation: { pin: \'${n.pin}\' } is not a modern protocol revision \u2014 pinning is for 2026-07-28 and later; omit versionNegotiation (or use mode: \'legacy\') for 2025-era servers.`);return{kind:`pin`,version:n.pin,probe:r}}let i=t?Vf(t):[];return{kind:`auto`,modernVersions:i.length>0?i:[...Rf],fallbackAvailable:!t||Bf(t).length>0,probe:r}}function Qg(){let e=globalThis;return e.window!==void 0&&e.document!==void 0?`browser`:`node`}function $g(e){return`stderr`in e&&`pid`in e?`stdio`:`http`}var e_=class e{_pending;_probeCounter=0;_savedOnMessage;_savedOnError;_savedOnClose;_closeDelivered=!1;constructor(e){this._transport=e,this._savedOnMessage=e.onmessage,this._savedOnError=e.onerror,this._savedOnClose=e.onclose}static async open(t){let n=new e(t);t.onmessage=e=>{let t=n._pending;if(t!==void 0&&(_m(e)||vm(e))&&e.id===t.id){n._pending=void 0,_m(e)?t.resolve({kind:`response`,result:e.result}):t.resolve({kind:`response`,error:e.error});return}},t.onerror=e=>{n._savedOnError?.(e)},t.onclose=()=>{let e=n._pending;e!==void 0&&(n._pending=void 0,e.resolve({kind:`closed`})),n._closeDelivered=!0,n._savedOnClose?.()};try{await t.start()}catch(e){throw n.detach(),e}return n}async exchange(e,t){let n=`server-discover-probe-${++this._probeCounter}`;return new Promise(r=>{let i=!1,a=e=>{i||(i=!0,clearTimeout(o),this._pending?.id===n&&(this._pending=void 0),r(e))},o=setTimeout(()=>a({kind:`timeout`}),t);this._pending={id:n,resolve:a},this._transport.send(e(n)).catch(e=>a({kind:`send-error`,error:e}))})}detach(){if(this._pending=void 0,this._transport.onmessage=this._savedOnMessage,this._transport.onerror=this._savedOnError,this._closeDelivered&&this._savedOnClose!==void 0){let e=this._savedOnClose,t=this._transport,n=!1,r=()=>{if(!n){n=!0;return}e()};t.onclose=r,t_.set(t,()=>{t.onclose===r&&(t.onclose=e)})}else this._transport.onclose=this._savedOnClose}release(){this.detach();let e=this._transport,t=e.start,n=!0;e.start=async function(){if(n){n=!1,e.start=t;return}return t.call(e)}}},t_=new WeakMap;function n_(e){let t=t_.get(e);t_.delete(e),t?.()}function r_(e,t,n,r){return{jsonrpc:`2.0`,id:e,method:`server/discover`,params:{_meta:cm(t).outboundEnvelope({protocolVersion:t,clientInfo:n,clientCapabilities:r})}}}function i_(e){return e instanceof Y&&e.code===J.ClientHttpUnexpectedContent||e instanceof Error&&e.name===`SyntaxError`}function a_(e,t){switch(e.kind){case`response`:return e.error===void 0?{kind:`result`,result:e.result}:{kind:`rpc-error`,...e.error};case`send-error`:{let t=e.error;if(Lg(t)||t instanceof Og||t instanceof Error&&t.name===`UnauthorizedError`)return{kind:`auth-required`,error:t};if(t instanceof If){let e=t.data?.text;return{kind:`http-error`,status:t.data.status,body:typeof e==`string`?e:void 0,statusText:t.data.statusText}}return i_(t)?{kind:`unusable-reply`,error:t}:{kind:`network-error`,error:t}}case`closed`:return{kind:`closed`};case`timeout`:return{kind:`timeout`,timeoutMs:t}}}async function o_(e,t){let n=e.probe.timeoutMs??t.defaultTimeoutMs,r=Math.max(0,e.probe.maxRetries??0),i=e.kind===`pin`?[e.version]:e.modernVersions,a=e.kind===`auto`&&e.fallbackAvailable,o=await e_.open(t.transport),s=async()=>{let s=i[0],c=!1,l=r;for(;;){let r=await o.exchange(e=>r_(e,s,t.clientInfo,t.capabilities),n);if(r.kind===`timeout`&&l>0){l--;continue}let u=a_(r,n),d=Bg(u,{clientModernVersions:i,requestedVersion:s,fallbackAvailable:a,environment:t.environment,transportKind:t.transportKind});switch(d.kind){case`modern`:return{era:`modern`,version:d.version,discover:d.discover};case`corrective`:if(c)throw d.error;c=!0,s=d.version;continue;case`legacy`:{let n=u.kind===`closed`?`the connection closed during the server/discover probe`:void 0;if(e.kind===`pin`)throw new Y(J.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server did not offer pinned protocol version ${e.version} via server/discover (no fallback in pin mode)`:`Version negotiation failed: ${n} before the server offered pinned protocol version ${e.version} (no fallback in pin mode)`);if(!e.fallbackAvailable)throw new Y(J.EraNegotiationFailed,n===void 0?`Version negotiation failed: the server gave no modern evidence and this client supports no pre-2026-07-28 protocol version to fall back to`:`Version negotiation failed: ${n} and this client supports no pre-2026-07-28 protocol version to fall back to`);if(n!==void 0&&t.disposableProbe!==!0)throw new Y(J.EraNegotiationFailed,`Version negotiation failed: ${n} (this transport probed in place \u2014 the disposable sibling probe requires the SDK\'s base StdioClientTransport)`);return{era:`legacy`}}case`error`:throw d.error}}},c;try{c=await s()}catch(e){throw o.detach(),e}return o.release(),c}function s_(e){let t=Object.getPrototypeOf(e);if(t===null||!Object.prototype.hasOwnProperty.call(t,`_dispose`))return;let n=e._serverParams;return typeof n==`object`&&n&&typeof n.command==`string`?n:void 0}async function c_(e,t,n,r){let i=t.constructor,a=new i({...n,stderr:`ignore`}),o=t.close,s=!1,c,l=new Promise((e,t)=>{c=()=>t(l_())});t.close=async function(){return s=!0,c?.(),o.call(t)};let u;try{let t=o_(e,{...r,transport:a,transportKind:`stdio`,disposableProbe:!0});t.catch(()=>{}),u=await Promise.race([t,l])}finally{await u_(a),t.close=o}if(s)throw l_();return u}function l_(){return new Y(J.EraNegotiationFailed,`Version negotiation failed: the transport was closed during the server/discover probe`)}async function u_(e){try{let t=e._dispose;await(typeof t==`function`?t.call(e):e.close())}catch{}}function d_(e){let t=e._meta?.[dl];return wh.Implementation(t)?t:void 0}function f_(e,t){if(!(!e||typeof t!=`object`||!t)){if(e.type===`object`&&e.properties&&typeof e.properties==`object`){let n=t,r=e.properties;for(let e of Object.keys(r)){let t=r[e];n[e]===void 0&&Object.prototype.hasOwnProperty.call(t,`default`)&&(n[e]=t.default),n[e]!==void 0&&f_(t,n[e])}}if(Array.isArray(e.anyOf))for(let n of e.anyOf)typeof n!=`boolean`&&f_(n,t);if(Array.isArray(e.oneOf))for(let n of e.oneOf)typeof n!=`boolean`&&f_(n,t)}}function p_(e){if(!e)return{supportsFormMode:!1,supportsUrlMode:!1};let t=e.form!==void 0,n=e.url!==void 0;return{supportsFormMode:t||!t&&!n,supportsUrlMode:n}}function m_(e){if(typeof e==`object`&&e&&(e.kind===`legacy`&&!(`supportedVersions`in e)&&!(`discover`in e)||e.kind===`modern`&&Zl.safeParse(e.discover).success))return e;throw new Y(J.EraNegotiationFailed,`connect({ prior }): unrecognized prior \u2014 expected { kind: \'modern\', discover } or { kind: \'legacy\' }`)}var h_={"notifications/tools/list_changed":[`tools/list`],"notifications/prompts/list_changed":[`prompts/list`],"notifications/resources/list_changed":[`resources/list`,`resources/templates/list`]},g_=64,__={};(class extends Mh{_serverCapabilities;_serverVersion;_capabilities;_instructions;_jsonSchemaValidator;_cache;_defaultCacheTtlMs;_listMaxPages;_listChangedDebounceTimers=new Map;_listChangedConfig;_enforceStrictCapabilities;_versionNegotiation;_supportedProtocolVersionsOption;_inputRequiredDriverConfig;_listenState=new Map;_nextListenId=0;_autoOpenedSubscription;_discoverResult;static{__.enforceStrictCapabilities=e=>e._enforceStrictCapabilities,__.walkPages=(e,t,n,r)=>e._walkPages(t,n,r),__.readResource=(e,t,n)=>e._readResource(t,n)}_resetConnectionState(){if(this._negotiatedProtocolVersion=void 0,this._serverCapabilities=void 0,this._serverVersion=void 0,this._instructions=void 0,this._discoverResult=void 0,this._autoOpenedSubscription=void 0,this._listenState.size>0){let e=new Y(J.ConnectionClosed,`subscriptions/listen: client reconnected or closed; subscription state from the previous connection was reset`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e})}this._listenState.clear();for(let e of this._listChangedDebounceTimers.values())clearTimeout(e);this._listChangedDebounceTimers.clear(),this._cache.resetForReconnect()}async close(){try{await super.close()}finally{this._resetConnectionState()}}constructor(e,t){super(t),this._clientInfo=e,this._capabilities=t?.capabilities?{...t.capabilities}:{},this._jsonSchemaValidator=t?.jsonSchemaValidator??new Eg,this._enforceStrictCapabilities=t?.enforceStrictCapabilities??!1,this._versionNegotiation=t?.versionNegotiation,this._supportedProtocolVersionsOption=t?.supportedProtocolVersions,this._inputRequiredDriverConfig=ph(t?.inputRequired),this._cache=new Pg(t?.responseCacheStore??new Ag,t?.responseCacheStore!==void 0,e=>this._reportStoreError(e),t?.cachePartition??``),this._defaultCacheTtlMs=t?.defaultCacheTtlMs??0,this._listMaxPages=t?.listMaxPages??g_,t?.listChanged&&(this._listChangedConfig=t.listChanged)}buildContext(e,t){return e}_shouldDropInbound(e){if(this._negotiatedProtocolVersion!==void 0&&zf(this._negotiatedProtocolVersion)&&hm(e))return`drop`}_outboundMetaEnvelope(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return this._wireCodec().outboundEnvelope({protocolVersion:e,clientInfo:this._clientInfo,clientCapabilities:this._capabilities})}_resolveNonCompleteResult(e,t){return this._inputRequiredDriverConfig.autoFulfill?Vh({getRequestHandler:e=>this._getRequestHandler(e),buildContext:e=>this.buildContext(e,void 0),sessionId:this.transport?.sessionId},this._inputRequiredDriverConfig,e,t):Promise.reject(new Y(J.UnsupportedResultType,`Unsupported result type \'input_required\' for ${t.request.method}: multi-round-trip auto-fulfilment is not enabled on this instance \u2014 pass allowInputRequired: true to handle it manually, or enable inputRequired.autoFulfill`,{resultType:`input_required`,method:t.request.method}))}_setupListChangedHandlers(e){e.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler(`tools`,`notifications/tools/list_changed`,e.tools,async()=>(await this.listTools(void 0,{cacheMode:`refresh`})).tools),e.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler(`prompts`,`notifications/prompts/list_changed`,e.prompts,async()=>(await this.listPrompts(void 0,{cacheMode:`refresh`})).prompts),e.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler(`resources`,`notifications/resources/list_changed`,e.resources,async()=>(await this.listResources(void 0,{cacheMode:`refresh`})).resources)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after connecting to transport`);this._capabilities=Ph(this._capabilities,e)}setVersionNegotiation(e){if(this.transport)throw Error(`Cannot configure version negotiation after connecting to transport`);this._versionNegotiation=e}_wrapHandler(e,t){return e===`elicitation/create`?async(e,n)=>{let r=cm(this._negotiatedProtocolVersion),i=r.validateRequest(`elicitation/create`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`elicitation/create`,e)),!i.ok)throw new Z(i.reason===`not-in-era`?X.InternalError:X.InvalidParams,i.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation request: ${i.message}`);let{params:a}=i.value;a.mode=a.mode??`form`;let{supportsFormMode:o,supportsUrlMode:s}=p_(this._capabilities.elicitation);if(a.mode===`form`&&!o)throw new Z(X.InvalidParams,`Client does not support form-mode elicitation requests`);if(a.mode===`url`&&!s)throw new Z(X.InvalidParams,`Client does not support URL-mode elicitation requests`);let c=await t(e,n),l=r.validateResult(`elicitation/create`,c);if(!l.ok&&l.reason===`not-in-era`&&(l=r.validateInputResponse(`elicitation/create`,c)),!l.ok)throw new Z(l.reason===`not-in-era`?X.InternalError:X.InvalidParams,l.reason===`not-in-era`?`No wire schema for elicitation/create in the resolved era`:`Invalid elicitation result: ${l.message}`);let u=l.value,d=a.mode===`form`?a.requestedSchema:void 0;if(a.mode===`form`&&u.action===`accept`&&u.content&&d&&this._capabilities.elicitation?.form?.applyDefaults)try{f_(d,u.content)}catch{}return u}:e===`sampling/createMessage`?async(e,n)=>{let r=cm(this._negotiatedProtocolVersion),i=r.validateRequest(`sampling/createMessage`,e);if(!i.ok&&i.reason===`not-in-era`&&(i=r.validateInputRequest(`sampling/createMessage`,e)),!i.ok)throw new Z(i.reason===`not-in-era`?X.InternalError:X.InvalidParams,i.reason===`not-in-era`?`No wire schema for sampling/createMessage in the resolved era`:`Invalid sampling request: ${i.message}`);let{params:a}=i.value,o=await t(e,n),s=!!(a.tools||a.toolChoice),c=r.samplingResultVariant(s,o);if(!c.ok&&c.reason===`not-in-era`&&(c=r.validateInputResponse(`sampling/createMessage`,o)),!c.ok)throw new Z(c.reason===`not-in-era`?X.InternalError:X.InvalidParams,c.reason===`not-in-era`?`No result schema for sampling/createMessage in the resolved era`:`Invalid sampling result: ${c.message}`);return c.value}:t}assertCapability(e,t){if(!this._serverCapabilities?.[e])throw new Y(J.CapabilityNotSupported,`Server does not support ${e} (required for ${t})`)}async connect(e,t){if(t?.prior!=null)return this._connectFromPrior(e,m_(t.prior),t);let n=Zg(this._versionNegotiation,this._supportedProtocolVersionsOption);return n.kind===`legacy`?this._connectPlainLegacy(e,t):this._connectNegotiated(e,n,t)}async _connectPlainLegacy(e,t){if(await super.connect(e),e.sessionId!==void 0){let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion?.(t);return}this._resetConnectionState(),await this._legacyHandshake(e,t)}async _legacyHandshake(e,t){let n=Bf(this._supportedProtocolVersions);try{let r=n[0];if(r===void 0)throw new Y(J.EraNegotiationFailed,`Cannot run the initialize handshake: supportedProtocolVersions contains no pre-2026-07-28 protocol version`);let i=await this.request({method:`initialize`,params:{protocolVersion:r,capabilities:this._capabilities,clientInfo:this._clientInfo}},t);if(i===void 0)throw Error(`Server sent invalid initialize result: ${i}`);if(!n.includes(i.protocolVersion))throw Error(`Server\'s protocol version is not supported: ${i.protocolVersion}`);this._serverCapabilities=i.capabilities,this._serverVersion=i.serverInfo,this._cache.setServerIdentity(this._deriveServerIdentity(e)),e.setProtocolVersion&&e.setProtocolVersion(i.protocolVersion),this._instructions=i.instructions,await this.notification({method:`notifications/initialized`}),this._negotiatedProtocolVersion=i.protocolVersion,this._listChangedConfig&&this._setupListChangedHandlers(this._listChangedConfig)}catch(e){throw this.close(),e}}async _connectNegotiated(e,t,n){if(e.sessionId!==void 0){await super.connect(e);let t=this._negotiatedProtocolVersion;t!==void 0&&e.setProtocolVersion&&e.setProtocolVersion(t);return}this._resetConnectionState();let r;try{let i=$g(e),a={clientInfo:this._clientInfo,capabilities:this._capabilities,environment:Qg(),defaultTimeoutMs:n?.timeout??6e4},o=i===`stdio`?s_(e):void 0;r=o===void 0?await o_(t,{...a,transport:e,transportKind:i}):await c_(t,e,o,a)}catch(t){throw await e.close().catch(()=>{}),n_(e),t}if(n_(e),await super.connect(e),r.era===`legacy`){await this._legacyHandshake(e,n);return}if(this._serverCapabilities=r.discover.capabilities,this._serverVersion=d_(r.discover),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.discover.instructions,this._discoverResult=r.discover,this._negotiatedProtocolVersion=r.version,e.setProtocolVersion&&e.setProtocolVersion(r.version),this._listChangedConfig){let e=this._listChangedConfig,t=this._serverCapabilities,r={...e.tools&&t?.tools?.listChanged&&{tools:e.tools},...e.prompts&&t?.prompts?.listChanged&&{prompts:e.prompts},...e.resources&&t?.resources?.listChanged&&{resources:e.resources}},i=!0;try{this._setupListChangedHandlers(r)}catch(e){i=!1,this.onerror?.(e instanceof Error?e:Error(String(e)))}let a=i?{...r.tools&&{toolsListChanged:!0},...r.prompts&&{promptsListChanged:!0},...r.resources&&{resourcesListChanged:!0}}:{};if(Object.keys(a).length>0){let e=new AbortController,t=()=>e.abort(n?.signal?.reason);n?.signal?.aborted&&t(),n?.signal?.addEventListener(`abort`,t);try{this._autoOpenedSubscription=await this.listen(a,{timeout:n?.timeout,signal:e.signal})}catch(e){if(n?.signal?.aborted)throw await this.close().catch(()=>{}),e;this.onerror?.(e instanceof Error?e:Error(String(e)))}finally{n?.signal?.removeEventListener(`abort`,t)}}}}async _connectFromPrior(e,t,n){if(t.kind===`legacy`)return this._connectPlainLegacy(e,n);let r=t.discover;this._resetConnectionState();let i=this._supportedProtocolVersionsOption,a=(i&&Vf(i).length>0?Vf(i):Rf).find(e=>r.supportedVersions.includes(e));if(a===void 0)throw new Y(J.EraNegotiationFailed,`connect({ prior }) with a modern verdict requires a 2026-07-28+ mutual protocol version; the supplied DiscoverResult and this client\'s supportedProtocolVersions have no modern overlap. For a server known to be legacy, pass prior: { kind: \'legacy\' } to skip the probe and initialize directly, or use versionNegotiation: { mode: \'auto\' } to re-probe with legacy fallback.`);if(await super.connect(e),this._discoverResult=r,this._serverCapabilities=r.capabilities,this._serverVersion=d_(r),this._cache.setServerIdentity(this._deriveServerIdentity(e)),this._instructions=r.instructions,this._negotiatedProtocolVersion=a,e.setProtocolVersion?.(a),this._listChangedConfig)try{this._setupListChangedHandlers(this._listChangedConfig)}catch(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}_deriveServerIdentity(e){let t=this._serverVersion;return t===void 0?e.sessionId??`anonymous:${Date.now()}-${Math.random().toString(36).slice(2)}`:`${t.name}@${t.version}`}getNegotiatedProtocolVersion(){return this._negotiatedProtocolVersion}getProtocolEra(){let e=this._negotiatedProtocolVersion;if(e!==void 0)return zf(e)?`modern`:`legacy`}getInstructions(){return this._instructions}getDiscoverResult(){return this._discoverResult}assertCapabilityForMethod(e){switch(e){case`logging/setLevel`:if(!this._serverCapabilities?.logging)throw new Y(J.CapabilityNotSupported,`Server does not support logging (required for ${e})`);break;case`prompts/get`:case`prompts/list`:if(!this._serverCapabilities?.prompts)throw new Y(J.CapabilityNotSupported,`Server does not support prompts (required for ${e})`);break;case`resources/list`:case`resources/templates/list`:case`resources/read`:case`resources/subscribe`:case`resources/unsubscribe`:if(!this._serverCapabilities?.resources)throw new Y(J.CapabilityNotSupported,`Server does not support resources (required for ${e})`);if(e===`resources/subscribe`&&!this._serverCapabilities.resources.subscribe)throw new Y(J.CapabilityNotSupported,`Server does not support resource subscriptions (required for ${e})`);break;case`tools/call`:case`tools/list`:if(!this._serverCapabilities?.tools)throw new Y(J.CapabilityNotSupported,`Server does not support tools (required for ${e})`);break;case`completion/complete`:if(!this._serverCapabilities?.completions)throw new Y(J.CapabilityNotSupported,`Server does not support completions (required for ${e})`);break;case`initialize`:break;case`server/discover`:break;case`ping`:break}}assertNotificationCapability(e){switch(e){case`notifications/roots/list_changed`:if(!this._capabilities.roots?.listChanged)throw new Y(J.CapabilityNotSupported,`Client does not support roots list changed notifications (required for ${e})`);break;case`notifications/initialized`:break;case`notifications/cancelled`:break;case`notifications/progress`:break}}assertRequestHandlerCapability(e){switch(e){case`sampling/createMessage`:if(!this._capabilities.sampling)throw new Y(J.CapabilityNotSupported,`Client does not support sampling capability (required for ${e})`);break;case`elicitation/create`:if(!this._capabilities.elicitation)throw new Y(J.CapabilityNotSupported,`Client does not support elicitation capability (required for ${e})`);break;case`roots/list`:if(!this._capabilities.roots)throw new Y(J.CapabilityNotSupported,`Client does not support roots capability (required for ${e})`);break;case`ping`:break}}async ping(e){return this.request({method:`ping`},e)}async discover(e){let t=await this._requestWithSchema({method:`server/discover`},Zl,e);return this._discoverResult=t,t}async complete(e,t){return this.request({method:`completion/complete`,params:e},t)}async setLoggingLevel(e,t){return this.request({method:`logging/setLevel`,params:{level:e}},t)}async getPrompt(e,t){return this.request({method:`prompts/get`,params:e},t)}async listPrompts(e,t){if(!this._serverCapabilities?.prompts&&!this._enforceStrictCapabilities)return console.debug(`Client.listPrompts() called but server does not advertise prompts capability - returning empty list`),{prompts:[]};if(e?.cursor!==void 0)return this.request({method:`prompts/list`,params:e},t);let n=await this._serveFromCache(`prompts/list`,void 0,t);return n===void 0?this._listAllPages(`prompts/list`,e,t,e=>e.prompts):n}async listResources(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResources() called but server does not advertise resources capability - returning empty list`),{resources:[]};if(e?.cursor!==void 0)return this.request({method:`resources/list`,params:e},t);let n=await this._serveFromCache(`resources/list`,void 0,t);return n===void 0?this._listAllPages(`resources/list`,e,t,e=>e.resources):n}async listResourceTemplates(e,t){if(!this._serverCapabilities?.resources&&!this._enforceStrictCapabilities)return console.debug(`Client.listResourceTemplates() called but server does not advertise resources capability - returning empty list`),{resourceTemplates:[]};if(e?.cursor!==void 0)return this.request({method:`resources/templates/list`,params:e},t);let n=await this._serveFromCache(`resources/templates/list`,void 0,t);return n===void 0?this._listAllPages(`resources/templates/list`,e,t,e=>e.resourceTemplates):n}async _listAllPages(e,t,n,r,i){let a=n?.cacheMode===`bypass`,o=this._cache.captureGeneration(e),s=await this._walkPages(e,r=>{let i=r===void 0?t&&{...t}:{...t,cursor:r};return this.request({method:e,...i&&{params:i}},n)},r);return delete s.nextCursor,i?.(s),a||await this._cache.write(e,s,o,this._freshness(s)),s}async _walkPages(e,t,n){let r=await t(void 0),i=r.nextCursor,a=r,o=1;for(;i!==void 0;){if(this._listMaxPages!==0&&o>=this._listMaxPages)throw new Y(J.ListPaginationExceeded,`${e}: exceeded listMaxPages (${this._listMaxPages}); server pagination did not terminate`,{method:e,listMaxPages:this._listMaxPages});let s=await t(i);if(s.nextCursor===i&&JSON.stringify(n(s))===JSON.stringify(n(a)))break;n(r).push(...n(s)),a=s,i=s.nextCursor,o++}return r}_freshness(e,t){let n=e,r=typeof n.ttlMs==`number`?n.ttlMs:this._defaultCacheTtlMs,i=n.cacheScope===`public`?`public`:`private`;return{expiresAt:this._cache.now()+Math.min(Math.max(0,r),Ng),scope:i,params:t}}async _serveFromCache(e,t,n){if(n?.cacheMode===`bypass`||n?.cacheMode===`refresh`)return;let r=await this._cache.read(e,t).catch(e=>void this._reportStoreError(e));if(r!==void 0){if(n?.signal?.aborted){let e=n.signal.reason;throw e instanceof Y?e:new Y(J.RequestTimeout,String(e))}return r.value}}_reportStoreError(e){this.onerror?.(e instanceof Error?e:Error(String(e)))}_compileOutputValidator(e){if(e.outputSchema)try{return{ok:!0,validator:this._jsonSchemaValidator.getValidator(e.outputSchema)}}catch(e){return{ok:!1,compileError:e}}}async _resolveXMcpHeaderScan(e,t){let n=t??await this._cache.toolDefinition(e);return n===void 0?void 0:wm(n.inputSchema)}async readResource(e,t){let{result:n}=await this._readResource(e,t);return n}async _readResource(e,t){let n=await this._serveFromCache(`resources/read`,e.uri,t);if(n!==void 0)return{result:n,cached:!0};let r=this._cache.captureGeneration(`resources/read`,e.uri),i=await this.request({method:`resources/read`,params:e},t);if(t?.cacheMode!==`bypass`){let n=this._freshness(i,e.uri);n.expiresAt>this._cache.now()?await this._cache.write(`resources/read`,i,r,n):t?.cacheMode===`refresh`&&await this._cache.evictKey(`resources/read`,e.uri)}return{result:i,cached:!1}}async subscribeResource(e,t){return this.request({method:`resources/subscribe`,params:e},t)}async unsubscribeResource(e,t){return this.request({method:`resources/unsubscribe`,params:e},t)}async listen(e,t){if(this.transport===void 0)throw new Y(J.NotConnected,`Not connected`);let n=this._negotiatedProtocolVersion;if(n===void 0||!zf(n))throw new Y(J.MethodNotSupportedByProtocolVersion,`subscriptions/listen requires a 2026-07-28-era connection (negotiated: ${n??`none`}). On a 2025-era connection, change notifications are delivered unsolicited: use ClientOptions.listChanged and resources/subscribe instead.`,{method:`subscriptions/listen`,protocolVersion:n});if(t?.signal?.aborted){let e=t.signal.reason;throw e instanceof Y?e:new Y(J.RequestTimeout,String(e))}let r=new AbortController,i=`listen:${this._nextListenId++}`,a=`opening`,o,s,c,l,u=new Promise((e,t)=>{c=e,l=t}),d,f=new Promise(e=>{d=e}),p=e=>{if(a===`closed`)return;let n=a===`opening`;if(o!==void 0&&(clearTimeout(o),o=void 0),`ack`in e){a=`open`,c(e.ack);return}a=`closed`,s!==void 0&&t?.signal?.removeEventListener(`abort`,s),this._listenState.delete(i),r.abort(),d(e.cause),n&&l(e.error??new Y(J.ConnectionClosed,`subscriptions/listen closed before the server acknowledged`))},m=async()=>{r.abort(),await this.notification({method:`notifications/cancelled`,params:{requestId:i}}).catch(()=>{})},h=async()=>{a!==`closed`&&(p({cause:`local`}),await m())};this._listenState.set(i,{settle:p});let g=t?.timeout??6e4;if(o=setTimeout(()=>{p({cause:`remote`,error:new Y(J.RequestTimeout,`subscriptions/listen ack timed out`,{timeout:g})}),m().catch(()=>{})},g),t?.signal){let e=t.signal;s=()=>{if(a===`closed`)return;let t=e.reason;p({cause:`local`,error:t instanceof Error?t:Error(String(t??`Aborted`))}),m().catch(()=>{})},e.addEventListener(`abort`,s,{once:!0})}let ee={jsonrpc:`2.0`,id:i,method:`subscriptions/listen`,params:{_meta:{...this._outboundMetaEnvelope()},notifications:e}},te=e=>{p({cause:`remote`,error:e instanceof Error?e:Error(String(e))})};try{this.transport.send(ee,{requestSignal:r.signal,onRequestStreamEnd:()=>p({cause:`remote`,error:Error(`subscriptions/listen: stream ended`)})}).catch(te)}catch(e){te(e)}return{honoredFilter:await u,close:h,closed:f}}get autoOpenedSubscription(){return this._autoOpenedSubscription}_onnotification(e,t){let n=Object.hasOwn(h_,e.method)?h_[e.method]:void 0;if(e.method===`notifications/resources/updated`){let t=e.params?.uri;typeof t==`string`&&this._cache.evictKey(`resources/read`,t)}else if(n!==void 0)for(let e of n)this._cache.evict(e);if(e.method===`notifications/subscriptions/acknowledged`){let t=e.params?._meta?.[pl],n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){let t=this._wireCodec().validateNotification(`notifications/subscriptions/acknowledged`,e);n.settle({ack:t.ok?t.value.params.notifications:{}});return}}if(e.method===`notifications/cancelled`){let t=e.params?.requestId,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){n.settle({cause:`remote`,error:Error(`subscriptions/listen: server cancelled the subscription`)});return}}super._onnotification(e,t)}_onresponse(e){let t=e.id,n=typeof t==`string`?this._listenState.get(t):void 0;if(n!==void 0){vm(e)?n.settle({cause:`remote`,error:Z.fromError(e.error.code,e.error.message,e.error.data)}):n.settle({cause:`graceful`,error:new Y(J.ConnectionClosed,`subscriptions/listen: server closed the subscription gracefully before acknowledging`)});return}super._onresponse(e)}_onclose(){if(this._listenState.size>0){let e=new Y(J.ConnectionClosed,`Connection closed`);for(let t of this._listenState.values())t.settle({cause:`remote`,error:e});this._listenState.clear()}super._onclose()}async callTool(e,t){let n=this.getProtocolEra()===`modern`&&Qg()!==`browser`,r=async()=>{if(!n)return t;let r;try{r=await this._resolveXMcpHeaderScan(e.name,t?.toolDefinition)}catch(e){this._reportStoreError(e)}if(!r?.valid||r.declarations.length===0)return t;let i=Fm(r.declarations,e.arguments);return Object.keys(i).length===0?t:{...t,headers:{...t?.headers,...i}}},i=t?.toolDefinition===void 0?await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)):this._compileOutputValidator(t.toolDefinition),a=()=>{if(i===void 0||i.ok)return;let t=i.compileError,n=(t instanceof Error?t.message:String(t)).slice(0,200);throw new Z(X.InvalidParams,`Tool \'${e.name}\' has an invalid outputSchema: ${n}`)};a();let o;try{o=await this.request({method:`tools/call`,params:e},await r())}catch(s){let c=s instanceof Z&&s.code===-32020;if(!n||!c||t?.toolDefinition!==void 0)throw s;let l={signal:t?.signal,timeout:t?.timeout,cacheMode:`refresh`};await this._cache.evict(`tools/list`),await this.listTools(void 0,l).catch(e=>this._reportStoreError(e)),i=await this._cache.outputValidator(e.name,e=>this._compileOutputValidator(e)).catch(e=>void this._reportStoreError(e)),a(),o=await this.request({method:`tools/call`,params:e},await r())}let s=i!==void 0&&i.ok?i.validator:void 0;if(s){if(o.structuredContent===void 0&&!o.isError)throw new Z(X.InvalidRequest,`Tool ${e.name} has an output schema but did not return structured content`);if(o.structuredContent!==void 0&&!o.isError)try{let e=s(o.structuredContent);if(!e.valid)throw new Z(X.InvalidParams,`Structured content does not match the tool\'s output schema: ${e.errorMessage}`)}catch(e){throw e instanceof Z?e:new Z(X.InvalidParams,`Failed to validate structured content: ${e instanceof Error?e.message:String(e)}`)}}return o}async listTools(e,t){if(!this._serverCapabilities?.tools&&!this._enforceStrictCapabilities)return console.debug(`Client.listTools() called but server does not advertise tools capability - returning empty list`),{tools:[]};if(e?.cursor!==void 0){let n=await this.request({method:`tools/list`,params:e},t);return this._excludeInvalidXMcpHeaderTools(n),n}let n=await this._serveFromCache(`tools/list`,void 0,t);return n===void 0?this._listAllPages(`tools/list`,e,t,e=>e.tools,e=>this._excludeInvalidXMcpHeaderTools(e)):n}_excludeInvalidXMcpHeaderTools(e){if(this.getProtocolEra()!==`modern`||!this.transport||$g(this.transport)===`stdio`)return;let t=e.tools.filter(e=>{let t=wm(e.inputSchema);return t.valid?!0:(console.warn(`[mcp-sdk] excluding tool \'${e.name}\' from tools/list: invalid x-mcp-header declaration \u2014 ${t.reason}`),!1)});t.length!==e.tools.length&&(e.tools=t)}_setupListChangedHandler(e,t,n,r){let i=Im(sd,n);if(!i.success)throw Error(`Invalid ${e} listChanged options: ${i.error.message}`);if(typeof n.onChanged!=`function`)throw TypeError(`Invalid ${e} listChanged options: onChanged must be a function`);let{autoRefresh:a,debounceMs:o}=i.data,{onChanged:s}=n,c=async()=>{if(!a){s(null,null);return}try{s(null,await r())}catch(e){s(e instanceof Error?e:Error(String(e)),null)}};this.setNotificationHandler(t,()=>{if(o){let t=this._listChangedDebounceTimers.get(e);t&&clearTimeout(t);let n=setTimeout(c,o);this._listChangedDebounceTimers.set(e,n)}else c()})}async sendRootsListChanged(){return this.notification({method:`notifications/roots/list_changed`})}}),class extends Error{static{Object.defineProperty(this,"mcpBrand",{value:`mcp.SseError`})}static[Symbol.hasInstance](e){return Ff(this,e)}static isInstance(e){if(typeof this!=`function`)throw TypeError("isInstance must be called on the class (e.g. `SdkError.isInstance(value)`); for callbacks use `v => SdkError.isInstance(v)`");return Ff(this,e)}constructor(e,t,n){super(`SSE error: ${t}`),this.code=e,this.event=n,Pf(this,new.target)}};var v_=class{_eventSlots=new Map;setHandler(e,t){let n=this._ensureEventSlot(e);n.onHandler&&t&&console.warn(`[MCP Apps] on${String(e)} handler replaced. Use addEventListener("${String(e)}", \u2026) to add multiple listeners without replacing.`),n.onHandler=t}getHandler(e){return this._eventSlots.get(e)?.onHandler}addEventListener(e,t){this._ensureEventSlot(e).listeners.push(t)}removeEventListener(e,t){let n=this._eventSlots.get(e);if(!n)return;let r=n.listeners.indexOf(t);r!==-1&&n.listeners.splice(r,1)}dispatch(e,t){let n=this._eventSlots.get(e);if(n){n.onHandler?.(t);for(let e of[...n.listeners])e(t)}}_ensureEventSlot(e){let t=this._eventSlots.get(e);return t||(t={listeners:[]},this._eventSlots.set(e,t)),t}},y_=class{_methods=new Set;claim(e,t){if(this._methods.has(e))throw Error(`Handler for "${e}" already registered (via ${t}). Use addEventListener() to attach multiple listeners, or the on* setter for replace semantics.`);this._methods.add(e)}replace(e){this._methods.add(e)}release(e){this._methods.delete(e)}has(e){return this._methods.has(e)}},b_=new Set;function x_(e,t){let[n,r]=t,i=n?.shape;if(typeof i?.method?.value!=`string`)return;let a=i.method.value,o=e===`request`?`setRequestHandler`:`setNotificationHandler`;b_.has(o)||(b_.add(o),console.warn(`[ext-apps] ${o}(Schema, handler) is deprecated; use ${o}("${a}", { params: Schema.shape.params }, handler).`));let s=r;return[a,{params:i.params},e===`request`?(e,t)=>s({method:a,params:e},S_(t)):e=>s({method:a,params:e})]}function S_(e){return{signal:e.mcpReq.signal,requestId:e.mcpReq.id,sessionId:e.sessionId,_meta:e.mcpReq._meta,sendRequest:e.mcpReq.send,sendNotification:e.mcpReq.notify,authInfo:e.http?.authInfo}}var C_=`2026-01-26`,w_=class{eventTarget;eventSource;messageListener;constructor(e=window.parent,t){this.eventTarget=e,this.eventSource=t,this.messageListener=e=>{if(t&&e.source!==this.eventSource){console.debug(`Ignoring message from unknown source`,e);return}let n=Ml.safeParse(e.data);n.success?(console.debug(`Parsed message`,n.data),this.onmessage?.(n.data)):e.data?.jsonrpc===`2.0`?(console.error(`Failed to parse message`,n.error.message,e),this.onerror?.(Error(`Invalid JSON-RPC message received: `+n.error.message))):console.debug(`Ignoring non-JSON-RPC message`,n.error.message,e)}}async start(){window.addEventListener(`message`,this.messageListener)}async send(e,t){e.method!==`ui/notifications/tool-input-partial`&&console.debug(`Sending message`,e),this.eventTarget.postMessage(e,`*`)}async close(){window.removeEventListener(`message`,this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion},T_=B([U(`light`),U(`dark`)]).describe(`Color theme preference for the host environment.`),E_=B([U(`inline`),U(`fullscreen`),U(`pip`)]).describe(`Display mode for UI presentation.`),D_=V(B([U(`--color-background-primary`),U(`--color-background-secondary`),U(`--color-background-tertiary`),U(`--color-background-inverse`),U(`--color-background-ghost`),U(`--color-background-info`),U(`--color-background-danger`),U(`--color-background-success`),U(`--color-background-warning`),U(`--color-background-disabled`),U(`--color-text-primary`),U(`--color-text-secondary`),U(`--color-text-tertiary`),U(`--color-text-inverse`),U(`--color-text-ghost`),U(`--color-text-info`),U(`--color-text-danger`),U(`--color-text-success`),U(`--color-text-warning`),U(`--color-text-disabled`),U(`--color-border-primary`),U(`--color-border-secondary`),U(`--color-border-tertiary`),U(`--color-border-inverse`),U(`--color-border-ghost`),U(`--color-border-info`),U(`--color-border-danger`),U(`--color-border-success`),U(`--color-border-warning`),U(`--color-border-disabled`),U(`--color-ring-primary`),U(`--color-ring-secondary`),U(`--color-ring-inverse`),U(`--color-ring-info`),U(`--color-ring-danger`),U(`--color-ring-success`),U(`--color-ring-warning`),U(`--font-sans`),U(`--font-mono`),U(`--font-weight-normal`),U(`--font-weight-medium`),U(`--font-weight-semibold`),U(`--font-weight-bold`),U(`--font-text-xs-size`),U(`--font-text-sm-size`),U(`--font-text-md-size`),U(`--font-text-lg-size`),U(`--font-heading-xs-size`),U(`--font-heading-sm-size`),U(`--font-heading-md-size`),U(`--font-heading-lg-size`),U(`--font-heading-xl-size`),U(`--font-heading-2xl-size`),U(`--font-heading-3xl-size`),U(`--font-text-xs-line-height`),U(`--font-text-sm-line-height`),U(`--font-text-md-line-height`),U(`--font-text-lg-line-height`),U(`--font-heading-xs-line-height`),U(`--font-heading-sm-line-height`),U(`--font-heading-md-line-height`),U(`--font-heading-lg-line-height`),U(`--font-heading-xl-line-height`),U(`--font-heading-2xl-line-height`),U(`--font-heading-3xl-line-height`),U(`--border-radius-xs`),U(`--border-radius-sm`),U(`--border-radius-md`),U(`--border-radius-lg`),U(`--border-radius-xl`),U(`--border-radius-full`),U(`--border-width-regular`),U(`--shadow-hairline`),U(`--shadow-sm`),U(`--shadow-md`),U(`--shadow-lg`)]).describe(`CSS variable keys available to MCP apps for theming.`).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`),B([M(),fc()]).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`)).describe(`Style variables for theming MCP apps.\n\nIndividual style keys are optional - hosts may provide any subset of these values.\nValues are strings containing CSS values (colors, sizes, font stacks, etc.).\n\nNote: This type uses \\`Record<K, string | undefined>\\` rather than \\`Partial<Record<K, string>>\\`\nfor compatibility with Zod schema generation. Both are functionally equivalent for validation.`);R({method:U(`ui/open-link`),params:R({url:M().describe(`URL to open in the host\'s browser`)})});var O_=R({isError:F().optional().describe(`True if the host failed to open the URL (e.g., due to security policy).`)}).passthrough(),k_=R({isError:F().optional().describe(`True if the download failed (e.g., user cancelled or host denied).`)}).passthrough(),A_=R({isError:F().optional().describe(`True if the host rejected or failed to deliver the message.`)}).passthrough();R({method:U(`ui/notifications/sandbox-proxy-ready`),params:R({})});var j_=R({connectDomains:L(M()).optional().describe(`Origins for network requests (fetch/XHR/WebSocket).\n\n- Maps to CSP \\`connect-src\\` directive\n- Empty or omitted \u2192 no network connections (secure default)`),resourceDomains:L(M()).optional().describe("Origins for static resources (images, scripts, stylesheets, fonts, media).\\n\\n- Maps to CSP `img-src`, `script-src`, `style-src`, `font-src`, `media-src` directives\\n- Wildcard subdomains supported: `https://*.example.com`\\n- Empty or omitted \u2192 no network resources (secure default)"),frameDomains:L(M()).optional().describe("Origins for nested iframes.\\n\\n- Maps to CSP `frame-src` directive\\n- Empty or omitted \u2192 no nested iframes allowed (`frame-src \'none\'`)"),baseUriDomains:L(M()).optional().describe("Allowed base URIs for the document.\\n\\n- Maps to CSP `base-uri` directive\\n- Empty or omitted \u2192 only same origin allowed (`base-uri \'self\'`)")}),M_=R({camera:R({}).optional().describe(`Request camera access.\n\nMaps to Permission Policy \\`camera\\` feature.`),microphone:R({}).optional().describe(`Request microphone access.\n\nMaps to Permission Policy \\`microphone\\` feature.`),geolocation:R({}).optional().describe(`Request geolocation access.\n\nMaps to Permission Policy \\`geolocation\\` feature.`),clipboardWrite:R({}).optional().describe(`Request clipboard write access.\n\nMaps to Permission Policy \\`clipboard-write\\` feature.`)});R({method:U(`ui/notifications/size-changed`),params:R({width:P().optional().describe(`New width in pixels.`),height:P().optional().describe(`New height in pixels.`)})});var N_=R({method:U(`ui/notifications/tool-input`),params:R({arguments:V(M(),I().describe(`Complete tool call arguments as key-value pairs.`)).optional().describe(`Complete tool call arguments as key-value pairs.`)})}),P_=R({method:U(`ui/notifications/tool-input-partial`),params:R({arguments:V(M(),I().describe(`Partial tool call arguments (incomplete, may change).`)).optional().describe(`Partial tool call arguments (incomplete, may change).`)})}),F_=R({method:U(`ui/notifications/tool-cancelled`),params:R({reason:M().optional().describe(`Optional reason for the cancellation (e.g., "user action", "timeout").`)})}),I_=R({fonts:M().optional()}),L_=R({variables:D_.optional().describe(`CSS variables for theming the app.`),css:I_.optional().describe(`CSS blocks that apps can inject.`)}),R_=R({method:U(`ui/resource-teardown`),params:R({})}),z_=V(M(),I()),B_=R({text:R({}).optional().describe(`Host supports text content blocks.`),image:R({}).optional().describe(`Host supports image content blocks.`),audio:R({}).optional().describe(`Host supports audio content blocks.`),resource:R({}).optional().describe(`Host supports resource content blocks.`),resourceLink:R({}).optional().describe(`Host supports resource link content blocks.`),structuredContent:R({}).optional().describe(`Host supports structured content.`)});R({method:U(`ui/notifications/request-teardown`),params:R({}).optional()});var V_=R({experimental:V(M(),V(M(),gc()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),openLinks:R({}).optional().describe(`Host supports opening external URLs.`),downloadFile:R({}).optional().describe(`Host supports file downloads via ui/download-file.`),serverTools:R({listChanged:F().optional().describe(`Host supports tools/list_changed notifications.`)}).optional().describe(`Host can proxy tool calls to the MCP server.`),serverResources:R({listChanged:F().optional().describe(`Host supports resources/list_changed notifications.`)}).optional().describe(`Host can proxy resource reads to the MCP server.`),logging:R({}).optional().describe(`Host accepts log messages.`),sandbox:R({permissions:M_.optional().describe(`Permissions granted by the host (camera, microphone, geolocation).`),csp:j_.optional().describe(`CSP domains approved by the host.`)}).optional().describe(`Sandbox configuration applied by the host.`),updateModelContext:B_.optional().describe(`Host accepts context updates (ui/update-model-context) to be included in the model\'s context for future turns.`),message:B_.optional().describe(`Host supports receiving content messages (ui/message) from the view.`),sampling:R({tools:R({}).optional().describe("Host supports tool use via `tools` and `toolChoice` parameters.")}).optional().describe("Host supports LLM sampling (sampling/createMessage) from the view.\\nMirrors the MCP `ClientCapabilities.sampling` shape so hosts can pass it through.")}),H_=R({experimental:V(M(),V(M(),gc()).describe(`Experimental features keyed by identifier.`)).optional().describe(`Experimental features keyed by identifier.`),tools:R({listChanged:F().optional().describe(`App supports tools/list_changed notifications.`)}).optional().describe(`App exposes MCP-style tools that the host can call.`),availableDisplayModes:L(E_).optional().describe(`Display modes the app supports.`)});R({method:U(`ui/notifications/initialized`),params:R({}).optional()}),R({csp:j_.optional().describe(`Content Security Policy configuration for UI resources.`),permissions:M_.optional().describe(`Sandbox permissions requested by the UI resource.`),domain:M().optional().describe(`Dedicated origin for view sandbox.\n\nUseful when views need stable, dedicated origins for OAuth callbacks, CORS policies, or API key allowlists.\n\n**Host-dependent:** The format and validation rules for this field are determined by each host. Servers MUST consult host-specific documentation for the expected domain format. Common patterns include:\n- Hash-based subdomains (e.g., \\`{hash}.claudemcpcontent.com\\`)\n- URL-derived subdomains (e.g., \\`www-example-com.oaiusercontent.com\\`)\n\nIf omitted, host uses default sandbox origin (typically per-conversation).`),prefersBorder:F().optional().describe(`Visual boundary preference - true if view prefers a visible border.\n\nBoolean requesting whether a visible border and background is provided by the host. Specifying an explicit value for this is recommended because hosts\' defaults may vary.\n\n- \\`true\\`: request visible border + background\n- \\`false\\`: request no visible border + background\n- omitted: host decides border`)}),R({method:U(`ui/request-display-mode`),params:R({mode:E_.describe(`The display mode being requested.`)})});var U_=R({mode:E_.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),W_=B([U(`model`),U(`app`)]).describe(`Tool visibility scope - who can access the tool.`);R({resourceUri:M().optional(),visibility:L(W_).optional().describe(`Who can access this tool. Default: ["model", "app"]\n- "model": Tool visible to and callable by the agent\n- "app": Tool callable by the app from this server only`),csp:yc().optional(),permissions:yc().optional()}),R({mimeTypes:L(M()).optional().describe(\'Array of supported MIME types for UI resources.\\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.\')}),R({method:U(`ui/download-file`),params:R({contents:L(B([Gu,Ku])).describe(`Resource contents to download \u2014 embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),R({method:U(`ui/message`),params:R({role:U(`user`).describe(`Message role, currently only "user" is supported.`),content:L(qu).describe(`Message content blocks (text, image, etc.).`)})}),R({method:U(`ui/notifications/sandbox-resource-ready`),params:R({html:M().describe(`HTML content to load into the inner iframe.`),sandbox:M().optional().describe(`Optional override for the inner iframe\'s sandbox attribute.`),csp:j_.optional().describe(`CSP configuration from resource metadata.`),permissions:M_.optional().describe(`Sandbox permissions from resource metadata.`)})});var G_=R({method:U(`ui/notifications/tool-result`),params:nd.describe(`Standard MCP tool execution result.`)}),K_=R({toolInfo:R({id:Dl.optional().describe(`JSON-RPC id of the tools/call request.`),tool:$u.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:T_.optional().describe(`Current color theme preference.`),styles:L_.optional().describe(`Style configuration for theming the app.`),displayMode:E_.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:L(E_).optional().describe(`Display modes the host supports.`),containerDimensions:B([R({height:P().describe(`Fixed container height in pixels.`)}),R({maxHeight:B([P(),fc()]).optional().describe(`Maximum container height in pixels.`)})]).and(B([R({width:P().describe(`Fixed container width in pixels.`)}),R({maxWidth:B([P(),fc()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other\ncontainer holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:M().optional().describe(`User\'s language and region preference in BCP 47 format.`),timeZone:M().optional().describe(`User\'s timezone in IANA format.`),userAgent:M().optional().describe(`Host application identifier.`),platform:B([U(`web`),U(`desktop`),U(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:R({touch:F().optional().describe(`Whether the device supports touch input.`),hover:F().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:R({top:P().describe(`Top safe area inset in pixels.`),right:P().describe(`Right safe area inset in pixels.`),bottom:P().describe(`Bottom safe area inset in pixels.`),left:P().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),q_=R({method:U(`ui/notifications/host-context-changed`),params:K_.describe(`Partial context update containing only changed fields.`)});R({method:U(`ui/update-model-context`),params:R({content:L(qu).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:V(M(),I().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),R({method:U(`ui/initialize`),params:R({appInfo:Bl.describe(`App identification (name and version).`),appCapabilities:H_.describe(`Features and capabilities this app provides.`),protocolVersion:M().describe(`Protocol version this app supports.`)})});var J_=R({protocolVersion:M().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:Bl.describe(`Host application identification and version.`),hostCapabilities:V_.describe(`Features and capabilities provided by the host.`),hostContext:K_.describe(`Rich context about the host environment.`)}).passthrough(),Y_={target:`draft-2020-12`};async function X_(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](Y_);throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function Z_(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function Q_(e,t){let n={...e,...t};return t.experimental!==void 0&&(n.experimental={...e.experimental,...t.experimental}),t.tools!==void 0&&(n.tools={...e.tools,...t.tools}),n}var $_=class e extends Mh{_appInfo;_appCapabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_registeredEvents=new Set;_events=new v_;_methods=new y_;setRequestHandler=(...e)=>{let[t,...n]=x_(`request`,e)??e;this._methods.claim(t,`setRequestHandler`),super.setRequestHandler.call(this,t,...n)};setNotificationHandler=(...e)=>{let[t,...n]=x_(`notification`,e)??e;this._methods.claim(t,`setNotificationHandler`),super.setNotificationHandler.call(this,t,...n)};removeRequestHandler=e=>{this._methods.release(e),super.removeRequestHandler(e)};removeNotificationHandler=e=>{this._methods.release(e),super.removeNotificationHandler(e)};replaceRequestHandler=(e,...t)=>{this._methods.replace(e),super.setRequestHandler.call(this,e,...t)};_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:N_,toolinputpartial:P_,toolresult:G_,toolcancelled:F_,hostcontextchanged:q_};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.setHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),this._ensureEventSlot(e),this._events.addEventListener(e,t)}removeEventListener(e,t){this._events.removeEventListener(e,t)}_ensureEventSlot(e){if(this._registeredEvents.has(e))return;let t=this.eventSchemas[e];if(!t)throw Error(`Unknown event: ${String(e)}`);this.setNotificationHandler(t.shape.method.value,{params:t.shape.params},t=>{let n=t;e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...n}),this._events.dispatch(e,n)}),this._registeredEvents.add(e)}getEventHandler(e){return this._events.getHandler(e)}warnIfRequestHandlerReplaced(e,t,n){t&&n&&console.warn(`[MCP Apps] ${e} handler replaced. Previous handler will no longer be called.`)}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._appCapabilities=t,this.options=n,this._methods.replace(`notifications/cancelled`),this._methods.replace(`notifications/progress`),!n.allowUnsafeEval&&it({jitless:!0}),this.replaceRequestHandler(`ping`,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}buildContext(e){return e}registerAppCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._appCapabilities=Q_(this._appCapabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._appCapabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await Z_(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await Z_(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._appCapabilities.tools&&!this.transport&&this.registerAppCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await X_(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await X_(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(`ui/resource-teardown`,{params:R_.shape.params,result:z_},(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(`tools/call`,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(`tools/list`,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._appCapabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;default:return}}assertNotificationCapability(e){}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},t)}async createSamplingMessage(e,t){return this._assertInitialized(`createSamplingMessage`),await this.request({method:`sampling/createMessage`,params:e},t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},A_,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},Pl,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},O_,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},k_,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},U_,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new w_(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1;try{await super.connect(e);let n=await this.request({method:`ui/initialize`,params:{appCapabilities:this._appCapabilities,appInfo:this._appInfo,protocolVersion:C_}},J_,t);if(n===void 0)throw Error(`Server sent invalid initialize result: ${n}`);this._hostCapabilities=n.hostCapabilities,this._hostInfo=n.hostInfo,this._hostContext=n.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}},ev=`0.5.0`,tv=.34,nv=6,rv=`orbit-best`,iv=document.querySelector(`main`),av=document.querySelector(`canvas`),$=av.getContext(`2d`),ov=document.querySelector(`#score`),sv=document.querySelector(`#best`),cv=document.querySelector(`#hint`),lv=[...document.querySelectorAll(`.probe`)],uv={foreground:``,muted:``,subtle:``,hazard:``},dv=()=>{let[e,t,n,r]=lv.map(e=>getComputedStyle(e).color);uv={foreground:e,muted:t,subtle:n,hazard:r}},fv=0;try{fv=Number(localStorage.getItem(rv))||0}catch{}var pv=`ready`,mv=-Math.PI/2,hv=1,gv=1,_v=[],vv=0,yv=0,bv=0,xv=0,Sv=()=>Math.min(1.7+yv*.05,4.2);function Cv(){mv=-Math.PI/2,hv=1,gv=1,_v=[],vv=mv+Math.PI,yv=0,xv=0}function wv(){ov.textContent=`${yv}`,sv.textContent=fv?`Best ${fv}`:``,cv.textContent=pv===`ready`?`Tap or press space to start`:pv===`over`?`Tap to go again`:``}function Tv(){pv===`playing`?hv=+!hv:(pv===`ready`||performance.now()-bv>400)&&(Cv(),pv=`playing`,wv())}iv.addEventListener(`pointerdown`,e=>{e.preventDefault(),iv.focus({focusVisible:!1}),Tv()}),iv.addEventListener(`keydown`,e=>{e.key!==` `&&e.key!==`Enter`||(e.preventDefault(),e.repeat||Tv())});function Ev(e,t,n){if(mv+=Sv()*e*(pv===`playing`?1:.5),gv+=(hv-gv)*(1-Math.exp(-e*20)),pv!==`playing`)return;for(;vv<mv+Math.PI*1.25;)_v.push({angle:vv,lane:Math.random()<.5?0:1,passed:!1}),vv+=.95+Math.random()*.75;let r=t[0]+(t[1]-t[0])*gv;for(let e of _v){let i=tv/2+nv/r,a=Math.abs(mv-e.angle)<i,o=Math.abs(r-t[e.lane])<n*.55;if(a&&o){if(pv=`over`,bv=performance.now(),xv=1,yv>fv){fv=yv;try{localStorage.setItem(rv,`${fv}`)}catch{}}wv();return}!e.passed&&e.angle+i<mv&&(e.passed=!0,yv+=1,wv())}_v=_v.filter(e=>e.angle>mv-Math.PI*.6)}function Dv(e){let{width:t,height:n}=av.getBoundingClientRect(),r=devicePixelRatio;av.width!==Math.round(t*r)&&(av.width=Math.round(t*r)),av.height!==Math.round(n*r)&&(av.height=Math.round(n*r)),$.setTransform(r,0,0,r,0,0),$.clearRect(0,0,t,n);let i=t/2,a=n/2,o=Math.min(t,n)*.33,s=o*.2,c=[o-s,o+s];Ev(e,c,s*2),$.lineWidth=1.5,$.strokeStyle=uv.subtle;for(let e of c)$.beginPath(),$.arc(i,a,e,0,Math.PI*2),$.stroke();$.lineWidth=6,$.lineCap=`round`,$.strokeStyle=uv.hazard;for(let e of _v)$.globalAlpha=e.passed?.3:1,$.beginPath(),$.arc(i,a,c[e.lane],e.angle-tv/2,e.angle+tv/2),$.stroke();$.globalAlpha=1;let l=c[0]+(c[1]-c[0])*gv;$.fillStyle=pv===`over`?uv.hazard:uv.foreground,$.beginPath(),$.arc(i+Math.cos(mv)*l,a+Math.sin(mv)*l,nv,0,Math.PI*2),$.fill(),xv>0&&(xv=Math.max(0,xv-e*3),$.globalAlpha=xv*.12,$.fillStyle=uv.hazard,$.fillRect(0,0,t,n),$.globalAlpha=1)}var Ov=performance.now();function kv(e){let t=Math.min((e-Ov)/1e3,1/30);Ov=e,Dv(t),requestAnimationFrame(kv)}var Av=new $_({name:`Orbit`,version:ev}),jv=e=>{(e===`light`||e===`dark`)&&(document.documentElement.style.colorScheme=e),dv()};Av.addEventListener(`hostcontextchanged`,e=>jv(e.theme)),matchMedia(`(prefers-color-scheme: dark)`).addEventListener(`change`,dv),dv(),wv(),requestAnimationFrame(kv),await Av.connect(),jv(Av.getHostContext()?.theme);</script>\n </head>\n <body>\n <main tabindex="0" aria-label="Orbit. Press space or tap to switch rings.">\n <canvas></canvas>\n <p id="score">0</p>\n <p id="best"></p>\n <p id="hint">Tap or press space to start</p>\n </main>\n <i class="probe" style="color: var(--foreground)"></i>\n <i class="probe" style="color: var(--muted)"></i>\n <i class="probe" style="color: var(--subtle)"></i>\n <i class="probe" style="color: var(--hazard)"></i>\n </body>\n</html>\n';var vk="ui://fabio.cv/orbit",yk=e=>{fi(e,"orbit_play",{title:"Play while you wait",description:"Shows Orbit, a small one-button game, in the chat for the reader to play while you work. It returns at once and the game keeps running, so call it first and carry on with the task. Use it only when someone asks for a game, or for something to do while they wait.",annotations:{readOnlyHint:!0,openWorldHint:!1},_meta:{ui:{resourceUri:vk}}},()=>({content:[{type:"text",text:"The reader has a game to play. Carry on with the task."}]})),Pd(e,{uri:vk,name:"Orbit",description:"A one-button game to play while the agent works.",html:gk})};var UE={"component-code":hk,orbit:yk},bk=ak.map(({id:e})=>UE[e]);uk(()=>ik({name:sk.name,version:dk},...bk));
|
|
84
|
+
/*! Bundled license information:
|
|
85
|
+
|
|
86
|
+
@modelcontextprotocol/server/dist/src-DdvbAHrR.mjs:
|
|
87
|
+
(*!
|
|
88
|
+
* content-type
|
|
89
|
+
* Copyright(c) 2015 Douglas Christopher Wilson
|
|
90
|
+
* MIT Licensed
|
|
91
|
+
*)
|
|
92
|
+
*/
|