@modelcontextprotocol/ext-apps 0.4.2 → 1.0.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/README.md +182 -2
- package/dist/src/app-bridge.js +1 -1
- package/dist/src/app-with-deps.js +1 -1
- package/dist/src/app.js +1 -1
- package/dist/src/generated/schema.d.ts +2 -2
- package/dist/src/react/index.js +1 -1
- package/dist/src/react/react-with-deps.js +1 -1
- package/dist/src/server/index.js +1 -1
- package/dist/src/spec.types.d.ts +4 -4
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var Me=Object.defineProperty;var s=(r,i)=>{for(var o in i)Me(r,o,{get:i[o],enumerable:!0,configurable:!0,set:($)=>i[o]=()=>$})};import{useEffect as cb,useState as Xl}from"react";import{Protocol as ub}from"@modelcontextprotocol/sdk/shared/protocol.js";import{CallToolRequestSchema as tb,CallToolResultSchema as gb,EmptyResultSchema as lb,ListToolsRequestSchema as Ib,PingRequestSchema as eb}from"@modelcontextprotocol/sdk/types.js";import{JSONRPCMessageSchema as Re}from"@modelcontextprotocol/sdk/types.js";class zr{eventTarget;eventSource;messageListener;constructor(r=window.parent,i){this.eventTarget=r;this.eventSource=i;this.messageListener=(o)=>{if(i&&o.source!==this.eventSource){console.debug("Ignoring message from unknown source",o);return}let $=Re.safeParse(o.data);if($.success)console.debug("Parsed message",$.data),this.onmessage?.($.data);else console.error("Failed to parse message",$.error.message,o),this.onerror?.(Error("Invalid JSON-RPC message received: "+$.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(r,i){console.debug("Sending message",r),this.eventTarget.postMessage(r,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var Pv="2025-11-21",me="ui/open-link",xe="ui/message",Ze="ui/notifications/sandbox-proxy-ready",Ce="ui/notifications/sandbox-resource-ready",de="ui/notifications/size-changed",fe="ui/notifications/tool-input",ye="ui/notifications/tool-input-partial",he="ui/notifications/tool-result",ae="ui/notifications/tool-cancelled",pe="ui/notifications/host-context-changed",se="ui/resource-teardown",r4="ui/initialize",n4="ui/notifications/initialized",i4="ui/request-display-mode";var g={};s(g,{xor:()=>ve,xid:()=>LI,void:()=>aI,uuidv7:()=>wI,uuidv6:()=>DI,uuidv4:()=>kI,uuid:()=>UI,util:()=>D,url:()=>NI,uppercase:()=>Yr,unknown:()=>Nr,union:()=>lv,undefined:()=>yI,ulid:()=>JI,uint64:()=>dI,uint32:()=>xI,tuple:()=>Mg,trim:()=>Hr,treeifyError:()=>Av,transform:()=>ev,toUpperCase:()=>Rr,toLowerCase:()=>Mr,toJSONSchema:()=>Qi,templateLiteral:()=>ke,symbol:()=>fI,superRefine:()=>_l,success:()=>be,stringbool:()=>je,stringFormat:()=>FI,string:()=>Ri,strictObject:()=>ne,startsWith:()=>Qr,slugify:()=>mr,size:()=>kr,setErrorMap:()=>qc,set:()=>ge,safeParseAsync:()=>Ug,safeParse:()=>_g,safeEncodeAsync:()=>zg,safeEncode:()=>Og,safeDecodeAsync:()=>Pg,safeDecode:()=>Sg,registry:()=>ti,regexes:()=>x,regex:()=>Kr,refine:()=>bl,record:()=>Rg,readonly:()=>tl,property:()=>Ki,promise:()=>De,prettifyError:()=>Qv,preprocess:()=>Le,prefault:()=>rl,positive:()=>Ei,pipe:()=>En,partialRecord:()=>$e,parseAsync:()=>bg,parse:()=>cg,overwrite:()=>C,optional:()=>Ln,object:()=>re,number:()=>Jg,nullish:()=>ce,nullable:()=>Gn,null:()=>Xg,normalize:()=>Tr,nonpositive:()=>Xi,nonoptional:()=>nl,nonnegative:()=>Vi,never:()=>gv,negative:()=>Wi,nativeEnum:()=>le,nanoid:()=>zI,nan:()=>_e,multipleOf:()=>tr,minSize:()=>a,minLength:()=>nr,mime:()=>Br,meta:()=>ze,maxSize:()=>gr,maxLength:()=>Dr,map:()=>te,mac:()=>WI,lte:()=>R,lt:()=>y,lowercase:()=>qr,looseRecord:()=>ue,looseObject:()=>ie,locales:()=>Sn,literal:()=>Ie,length:()=>wr,lazy:()=>Il,ksuid:()=>GI,keyof:()=>sI,jwt:()=>QI,json:()=>Je,iso:()=>Cr,ipv6:()=>XI,ipv4:()=>EI,intersection:()=>Tg,int64:()=>CI,int32:()=>mI,int:()=>mi,instanceof:()=>Pe,includes:()=>Ar,httpUrl:()=>OI,hostname:()=>BI,hex:()=>TI,hash:()=>HI,guid:()=>_I,gte:()=>A,gt:()=>h,globalRegistry:()=>K,getErrorMap:()=>Yc,function:()=>we,fromJSONSchema:()=>Ee,formatError:()=>In,float64:()=>RI,float32:()=>MI,flattenError:()=>ln,file:()=>ee,exactOptional:()=>yg,enum:()=>Iv,endsWith:()=>Fr,encodeAsync:()=>wg,encode:()=>kg,emoji:()=>SI,email:()=>bI,e164:()=>AI,discriminatedUnion:()=>oe,describe:()=>Se,decodeAsync:()=>Ng,decode:()=>Dg,date:()=>pI,custom:()=>Oe,cuid2:()=>jI,cuid:()=>PI,core:()=>ir,config:()=>V,coerce:()=>kl,codec:()=>Ue,clone:()=>Y,cidrv6:()=>KI,cidrv4:()=>VI,check:()=>Ne,catch:()=>ol,boolean:()=>Lg,bigint:()=>ZI,base64url:()=>YI,base64:()=>qI,array:()=>Vn,any:()=>hI,_function:()=>we,_default:()=>pg,_ZodString:()=>xi,ZodXor:()=>Qg,ZodXID:()=>ai,ZodVoid:()=>Yg,ZodUnknown:()=>Kg,ZodUnion:()=>qn,ZodUndefined:()=>Eg,ZodUUID:()=>p,ZodURL:()=>Wn,ZodULID:()=>hi,ZodType:()=>P,ZodTuple:()=>Hg,ZodTransform:()=>dg,ZodTemplateLiteral:()=>gl,ZodSymbol:()=>Gg,ZodSuccess:()=>il,ZodStringFormat:()=>E,ZodString:()=>fr,ZodSet:()=>xg,ZodRecord:()=>Yn,ZodRealError:()=>H,ZodReadonly:()=>ul,ZodPromise:()=>el,ZodPrefault:()=>sg,ZodPipe:()=>_v,ZodOptional:()=>cv,ZodObject:()=>Kn,ZodNumberFormat:()=>Or,ZodNumber:()=>hr,ZodNullable:()=>hg,ZodNull:()=>Wg,ZodNonOptional:()=>bv,ZodNever:()=>qg,ZodNanoID:()=>di,ZodNaN:()=>$l,ZodMap:()=>mg,ZodMAC:()=>jg,ZodLiteral:()=>Zg,ZodLazy:()=>ll,ZodKSUID:()=>pi,ZodJWT:()=>uv,ZodIssueCode:()=>Kc,ZodIntersection:()=>Bg,ZodISOTime:()=>Hi,ZodISODuration:()=>Mi,ZodISODateTime:()=>Bi,ZodISODate:()=>Ti,ZodIPv6:()=>rv,ZodIPv4:()=>si,ZodGUID:()=>Jn,ZodFunction:()=>cl,ZodFirstPartyTypeKind:()=>Ul,ZodFile:()=>Cg,ZodExactOptional:()=>fg,ZodError:()=>Xc,ZodEnum:()=>dr,ZodEmoji:()=>Ci,ZodEmail:()=>Zi,ZodE164:()=>$v,ZodDiscriminatedUnion:()=>Fg,ZodDefault:()=>ag,ZodDate:()=>Xn,ZodCustomStringFormat:()=>yr,ZodCustom:()=>An,ZodCodec:()=>Uv,ZodCatch:()=>vl,ZodCUID2:()=>yi,ZodCUID:()=>fi,ZodCIDRv6:()=>iv,ZodCIDRv4:()=>nv,ZodBoolean:()=>ar,ZodBigIntFormat:()=>tv,ZodBigInt:()=>pr,ZodBase64URL:()=>ov,ZodBase64:()=>vv,ZodArray:()=>Ag,ZodAny:()=>Vg,TimePrecision:()=>Mu,NEVER:()=>jv,$output:()=>Au,$input:()=>Qu,$brand:()=>Jv});var ir={};s(ir,{version:()=>Vo,util:()=>D,treeifyError:()=>Av,toJSONSchema:()=>Qi,toDotPath:()=>Ql,safeParseAsync:()=>Bv,safeParse:()=>Fv,safeEncodeAsync:()=>A4,safeEncode:()=>q4,safeDecodeAsync:()=>Q4,safeDecode:()=>Y4,registry:()=>ti,regexes:()=>x,process:()=>L,prettifyError:()=>Qv,parseAsync:()=>Tn,parse:()=>Bn,meta:()=>St,locales:()=>Sn,isValidJWT:()=>nI,isValidBase64URL:()=>rI,isValidBase64:()=>r$,initializeContext:()=>lr,globalRegistry:()=>K,globalConfig:()=>rn,formatError:()=>In,flattenError:()=>ln,finalize:()=>er,extractDefs:()=>Ir,encodeAsync:()=>V4,encode:()=>W4,describe:()=>Ot,decodeAsync:()=>K4,decode:()=>X4,createToJSONSchemaMethod:()=>Pt,createStandardJSONSchemaMethod:()=>Zr,config:()=>V,clone:()=>Y,_xor:()=>uc,_xid:()=>wi,_void:()=>et,_uuidv7:()=>ci,_uuidv6:()=>ei,_uuidv4:()=>Ii,_uuid:()=>li,_url:()=>Pn,_uppercase:()=>Yr,_unknown:()=>lt,_union:()=>$c,_undefined:()=>ut,_ulid:()=>Di,_uint64:()=>ot,_uint32:()=>pu,_tuple:()=>lc,_trim:()=>Hr,_transform:()=>kc,_toUpperCase:()=>Rr,_toLowerCase:()=>Mr,_templateLiteral:()=>Jc,_symbol:()=>$t,_superRefine:()=>Nt,_success:()=>Sc,_stringbool:()=>zt,_stringFormat:()=>xr,_string:()=>Bu,_startsWith:()=>Qr,_slugify:()=>mr,_size:()=>kr,_set:()=>cc,_safeParseAsync:()=>Wr,_safeParse:()=>Er,_safeEncodeAsync:()=>Cn,_safeEncode:()=>xn,_safeDecodeAsync:()=>dn,_safeDecode:()=>Zn,_regex:()=>Kr,_refine:()=>wt,_record:()=>Ic,_readonly:()=>jc,_property:()=>Ki,_promise:()=>Gc,_positive:()=>Ei,_pipe:()=>Pc,_parseAsync:()=>Gr,_parse:()=>Lr,_overwrite:()=>C,_optional:()=>Dc,_number:()=>Cu,_nullable:()=>wc,_null:()=>tt,_normalize:()=>Tr,_nonpositive:()=>Xi,_nonoptional:()=>Oc,_nonnegative:()=>Vi,_never:()=>It,_negative:()=>Wi,_nativeEnum:()=>_c,_nanoid:()=>_i,_nan:()=>_t,_multipleOf:()=>tr,_minSize:()=>a,_minLength:()=>nr,_min:()=>A,_mime:()=>Br,_maxSize:()=>gr,_maxLength:()=>Dr,_max:()=>R,_map:()=>ec,_mac:()=>Hu,_lte:()=>R,_lt:()=>y,_lowercase:()=>qr,_literal:()=>Uc,_length:()=>wr,_lazy:()=>Lc,_ksuid:()=>Ni,_jwt:()=>Gi,_isoTime:()=>xu,_isoDuration:()=>Zu,_isoDateTime:()=>Ru,_isoDate:()=>mu,_ipv6:()=>Si,_ipv4:()=>Oi,_intersection:()=>gc,_int64:()=>vt,_int32:()=>au,_int:()=>fu,_includes:()=>Ar,_guid:()=>zn,_gte:()=>A,_gt:()=>h,_float64:()=>hu,_float32:()=>yu,_file:()=>kt,_enum:()=>bc,_endsWith:()=>Fr,_encodeAsync:()=>Rn,_encode:()=>Hn,_emoji:()=>bi,_email:()=>gi,_e164:()=>Li,_discriminatedUnion:()=>tc,_default:()=>Nc,_decodeAsync:()=>mn,_decode:()=>Mn,_date:()=>ct,_custom:()=>Dt,_cuid2:()=>ki,_cuid:()=>Ui,_coercedString:()=>Tu,_coercedNumber:()=>du,_coercedDate:()=>bt,_coercedBoolean:()=>rt,_coercedBigint:()=>it,_cidrv6:()=>Pi,_cidrv4:()=>zi,_check:()=>II,_catch:()=>zc,_boolean:()=>su,_bigint:()=>nt,_base64url:()=>Ji,_base64:()=>ji,_array:()=>Ut,_any:()=>gt,TimePrecision:()=>Mu,NEVER:()=>jv,JSONSchemaGenerator:()=>tg,JSONSchema:()=>eI,Doc:()=>an,$output:()=>Au,$input:()=>Qu,$constructor:()=>e,$brand:()=>Jv,$ZodXor:()=>w$,$ZodXID:()=>Ro,$ZodVoid:()=>_$,$ZodUnknown:()=>c$,$ZodUnion:()=>Un,$ZodUndefined:()=>l$,$ZodUUID:()=>Yo,$ZodURL:()=>Qo,$ZodULID:()=>Mo,$ZodType:()=>z,$ZodTuple:()=>$i,$ZodTransform:()=>G$,$ZodTemplateLiteral:()=>B$,$ZodSymbol:()=>g$,$ZodSuccess:()=>q$,$ZodStringFormat:()=>G,$ZodString:()=>Ur,$ZodSet:()=>P$,$ZodRegistry:()=>Fu,$ZodRecord:()=>S$,$ZodRealError:()=>T,$ZodReadonly:()=>F$,$ZodPromise:()=>H$,$ZodPrefault:()=>V$,$ZodPipe:()=>Q$,$ZodOptional:()=>ui,$ZodObjectJIT:()=>D$,$ZodObject:()=>oI,$ZodNumberFormat:()=>u$,$ZodNumber:()=>vi,$ZodNullable:()=>W$,$ZodNull:()=>I$,$ZodNonOptional:()=>K$,$ZodNever:()=>b$,$ZodNanoID:()=>Bo,$ZodNaN:()=>A$,$ZodMap:()=>z$,$ZodMAC:()=>ao,$ZodLiteral:()=>J$,$ZodLazy:()=>M$,$ZodKSUID:()=>mo,$ZodJWT:()=>o$,$ZodIntersection:()=>O$,$ZodISOTime:()=>Co,$ZodISODuration:()=>fo,$ZodISODateTime:()=>xo,$ZodISODate:()=>Zo,$ZodIPv6:()=>ho,$ZodIPv4:()=>yo,$ZodGUID:()=>qo,$ZodFunction:()=>T$,$ZodFile:()=>L$,$ZodExactOptional:()=>E$,$ZodError:()=>gn,$ZodEnum:()=>j$,$ZodEncodeError:()=>cr,$ZodEmoji:()=>Fo,$ZodEmail:()=>Ao,$ZodE164:()=>v$,$ZodDiscriminatedUnion:()=>N$,$ZodDefault:()=>X$,$ZodDate:()=>U$,$ZodCustomStringFormat:()=>$$,$ZodCustom:()=>R$,$ZodCodec:()=>kn,$ZodCheckUpperCase:()=>jo,$ZodCheckStringFormat:()=>Xr,$ZodCheckStartsWith:()=>Lo,$ZodCheckSizeEquals:()=>wo,$ZodCheckRegex:()=>zo,$ZodCheckProperty:()=>Eo,$ZodCheckOverwrite:()=>Xo,$ZodCheckNumberFormat:()=>_o,$ZodCheckMultipleOf:()=>bo,$ZodCheckMinSize:()=>Do,$ZodCheckMinLength:()=>Oo,$ZodCheckMimeType:()=>Wo,$ZodCheckMaxSize:()=>ko,$ZodCheckMaxLength:()=>No,$ZodCheckLowerCase:()=>Po,$ZodCheckLessThan:()=>yn,$ZodCheckLengthEquals:()=>So,$ZodCheckIncludes:()=>Jo,$ZodCheckGreaterThan:()=>hn,$ZodCheckEndsWith:()=>Go,$ZodCheckBigIntFormat:()=>Uo,$ZodCheck:()=>W,$ZodCatch:()=>Y$,$ZodCUID2:()=>Ho,$ZodCUID:()=>To,$ZodCIDRv6:()=>so,$ZodCIDRv4:()=>po,$ZodBoolean:()=>_n,$ZodBigIntFormat:()=>t$,$ZodBigInt:()=>oi,$ZodBase64URL:()=>i$,$ZodBase64:()=>n$,$ZodAsyncError:()=>f,$ZodArray:()=>k$,$ZodAny:()=>e$});var jv=Object.freeze({status:"aborted"});function e(r,i,o){function $(t,I){if(!t._zod)Object.defineProperty(t,"_zod",{value:{def:I,constr:u,traits:new Set},enumerable:!1});if(t._zod.traits.has(r))return;t._zod.traits.add(r),i(t,I);let l=u.prototype,c=Object.keys(l);for(let _=0;_<c.length;_++){let N=c[_];if(!(N in t))t[N]=l[N].bind(t)}}let n=o?.Parent??Object;class v extends n{}Object.defineProperty(v,"name",{value:r});function u(t){var I;let l=o?.Parent?new v:this;$(l,t),(I=l._zod).deferred??(I.deferred=[]);for(let c of l._zod.deferred)c();return l}return Object.defineProperty(u,"init",{value:$}),Object.defineProperty(u,Symbol.hasInstance,{value:(t)=>{if(o?.Parent&&t instanceof o.Parent)return!0;return t?._zod?.traits?.has(r)}}),Object.defineProperty(u,"name",{value:r}),u}var Jv=Symbol("zod_brand");class f extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class cr extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`);this.name="ZodEncodeError"}}var rn={};function V(r){if(r)Object.assign(rn,r);return rn}var D={};s(D,{unwrapMessage:()=>nn,uint8ArrayToHex:()=>G4,uint8ArrayToBase64url:()=>J4,uint8ArrayToBase64:()=>ql,stringifyPrimitive:()=>U,slugify:()=>Ev,shallowClone:()=>Xv,safeExtend:()=>N4,required:()=>z4,randomString:()=>c4,propertyKeyTypes:()=>$n,promiseAllObject:()=>e4,primitiveTypes:()=>Vv,prefixIssues:()=>M,pick:()=>k4,partial:()=>S4,parsedType:()=>k,optionalKeys:()=>Kv,omit:()=>D4,objectClone:()=>g4,numKeys:()=>b4,nullish:()=>vr,normalizeParams:()=>w,mergeDefs:()=>rr,merge:()=>O4,jsonStringifyReplacer:()=>Pr,joinValues:()=>b,issue:()=>Jr,isPlainObject:()=>$r,isObject:()=>br,hexToUint8Array:()=>L4,getSizableOrigin:()=>un,getParsedType:()=>_4,getLengthableOrigin:()=>tn,getEnumValues:()=>vn,getElementAtPath:()=>I4,floatSafeRemainder:()=>Gv,finalizeIssue:()=>B,extend:()=>w4,escapeRegex:()=>m,esc:()=>Qn,defineLazy:()=>j,createTransparentProxy:()=>U4,cloneDef:()=>l4,clone:()=>Y,cleanRegex:()=>on,cleanEnum:()=>P4,captureStackTrace:()=>Fn,cached:()=>jr,base64urlToUint8Array:()=>j4,base64ToUint8Array:()=>Kl,assignProp:()=>or,assertNotEqual:()=>o4,assertNever:()=>u4,assertIs:()=>$4,assertEqual:()=>v4,assert:()=>t4,allowsEval:()=>Wv,aborted:()=>ur,NUMBER_FORMAT_RANGES:()=>qv,Class:()=>Yl,BIGINT_FORMAT_RANGES:()=>Yv});function v4(r){return r}function o4(r){return r}function $4(r){}function u4(r){throw Error("Unexpected value in exhaustive check")}function t4(r){}function vn(r){let i=Object.values(r).filter(($)=>typeof $==="number");return Object.entries(r).filter(([$,n])=>i.indexOf(+$)===-1).map(([$,n])=>n)}function b(r,i="|"){return r.map((o)=>U(o)).join(i)}function Pr(r,i){if(typeof i==="bigint")return i.toString();return i}function jr(r){return{get value(){{let o=r();return Object.defineProperty(this,"value",{value:o}),o}throw Error("cached value already set")}}}function vr(r){return r===null||r===void 0}function on(r){let i=r.startsWith("^")?1:0,o=r.endsWith("$")?r.length-1:r.length;return r.slice(i,o)}function Gv(r,i){let o=(r.toString().split(".")[1]||"").length,$=i.toString(),n=($.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test($)){let I=$.match(/\d?e-(\d?)/);if(I?.[1])n=Number.parseInt(I[1])}let v=o>n?o:n,u=Number.parseInt(r.toFixed(v).replace(".","")),t=Number.parseInt(i.toFixed(v).replace(".",""));return u%t/10**v}var Vl=Symbol("evaluating");function j(r,i,o){let $=void 0;Object.defineProperty(r,i,{get(){if($===Vl)return;if($===void 0)$=Vl,$=o();return $},set(n){Object.defineProperty(r,i,{value:n})},configurable:!0})}function g4(r){return Object.create(Object.getPrototypeOf(r),Object.getOwnPropertyDescriptors(r))}function or(r,i,o){Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}function rr(...r){let i={};for(let o of r){let $=Object.getOwnPropertyDescriptors(o);Object.assign(i,$)}return Object.defineProperties({},i)}function l4(r){return rr(r._zod.def)}function I4(r,i){if(!i)return r;return i.reduce((o,$)=>o?.[$],r)}function e4(r){let i=Object.keys(r),o=i.map(($)=>r[$]);return Promise.all(o).then(($)=>{let n={};for(let v=0;v<i.length;v++)n[i[v]]=$[v];return n})}function c4(r=10){let o="";for(let $=0;$<r;$++)o+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return o}function Qn(r){return JSON.stringify(r)}function Ev(r){return r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Fn="captureStackTrace"in Error?Error.captureStackTrace:(...r)=>{};function br(r){return typeof r==="object"&&r!==null&&!Array.isArray(r)}var Wv=jr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(r){return!1}});function $r(r){if(br(r)===!1)return!1;let i=r.constructor;if(i===void 0)return!0;if(typeof i!=="function")return!0;let o=i.prototype;if(br(o)===!1)return!1;if(Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)return!1;return!0}function Xv(r){if($r(r))return{...r};if(Array.isArray(r))return[...r];return r}function b4(r){let i=0;for(let o in r)if(Object.prototype.hasOwnProperty.call(r,o))i++;return i}var _4=(r)=>{let i=typeof r;switch(i){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(r)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(r))return"array";if(r===null)return"null";if(r.then&&typeof r.then==="function"&&r.catch&&typeof r.catch==="function")return"promise";if(typeof Map<"u"&&r instanceof Map)return"map";if(typeof Set<"u"&&r instanceof Set)return"set";if(typeof Date<"u"&&r instanceof Date)return"date";if(typeof File<"u"&&r instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${i}`)}},$n=new Set(["string","number","symbol"]),Vv=new Set(["string","number","bigint","boolean","symbol","undefined"]);function m(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Y(r,i,o){let $=new r._zod.constr(i??r._zod.def);if(!i||o?.parent)$._zod.parent=r;return $}function w(r){let i=r;if(!i)return{};if(typeof i==="string")return{error:()=>i};if(i?.message!==void 0){if(i?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");i.error=i.message}if(delete i.message,typeof i.error==="string")return{...i,error:()=>i.error};return i}function U4(r){let i;return new Proxy({},{get(o,$,n){return i??(i=r()),Reflect.get(i,$,n)},set(o,$,n,v){return i??(i=r()),Reflect.set(i,$,n,v)},has(o,$){return i??(i=r()),Reflect.has(i,$)},deleteProperty(o,$){return i??(i=r()),Reflect.deleteProperty(i,$)},ownKeys(o){return i??(i=r()),Reflect.ownKeys(i)},getOwnPropertyDescriptor(o,$){return i??(i=r()),Reflect.getOwnPropertyDescriptor(i,$)},defineProperty(o,$,n){return i??(i=r()),Reflect.defineProperty(i,$,n)}})}function U(r){if(typeof r==="bigint")return r.toString()+"n";if(typeof r==="string")return`"${r}"`;return`${r}`}function Kv(r){return Object.keys(r).filter((i)=>{return r[i]._zod.optin==="optional"&&r[i]._zod.optout==="optional"})}var qv={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Yv={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function k4(r,i){let o=r._zod.def,$=o.checks;if($&&$.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let v=rr(r._zod.def,{get shape(){let u={};for(let t in i){if(!(t in o.shape))throw Error(`Unrecognized key: "${t}"`);if(!i[t])continue;u[t]=o.shape[t]}return or(this,"shape",u),u},checks:[]});return Y(r,v)}function D4(r,i){let o=r._zod.def,$=o.checks;if($&&$.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let v=rr(r._zod.def,{get shape(){let u={...r._zod.def.shape};for(let t in i){if(!(t in o.shape))throw Error(`Unrecognized key: "${t}"`);if(!i[t])continue;delete u[t]}return or(this,"shape",u),u},checks:[]});return Y(r,v)}function w4(r,i){if(!$r(i))throw Error("Invalid input to extend: expected a plain object");let o=r._zod.def.checks;if(o&&o.length>0){let v=r._zod.def.shape;for(let u in i)if(Object.getOwnPropertyDescriptor(v,u)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=rr(r._zod.def,{get shape(){let v={...r._zod.def.shape,...i};return or(this,"shape",v),v}});return Y(r,n)}function N4(r,i){if(!$r(i))throw Error("Invalid input to safeExtend: expected a plain object");let o=rr(r._zod.def,{get shape(){let $={...r._zod.def.shape,...i};return or(this,"shape",$),$}});return Y(r,o)}function O4(r,i){let o=rr(r._zod.def,{get shape(){let $={...r._zod.def.shape,...i._zod.def.shape};return or(this,"shape",$),$},get catchall(){return i._zod.def.catchall},checks:[]});return Y(r,o)}function S4(r,i,o){let n=i._zod.def.checks;if(n&&n.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let u=rr(i._zod.def,{get shape(){let t=i._zod.def.shape,I={...t};if(o)for(let l in o){if(!(l in t))throw Error(`Unrecognized key: "${l}"`);if(!o[l])continue;I[l]=r?new r({type:"optional",innerType:t[l]}):t[l]}else for(let l in t)I[l]=r?new r({type:"optional",innerType:t[l]}):t[l];return or(this,"shape",I),I},checks:[]});return Y(i,u)}function z4(r,i,o){let $=rr(i._zod.def,{get shape(){let n=i._zod.def.shape,v={...n};if(o)for(let u in o){if(!(u in v))throw Error(`Unrecognized key: "${u}"`);if(!o[u])continue;v[u]=new r({type:"nonoptional",innerType:n[u]})}else for(let u in n)v[u]=new r({type:"nonoptional",innerType:n[u]});return or(this,"shape",v),v}});return Y(i,$)}function ur(r,i=0){if(r.aborted===!0)return!0;for(let o=i;o<r.issues.length;o++)if(r.issues[o]?.continue!==!0)return!0;return!1}function M(r,i){return i.map((o)=>{var $;return($=o).path??($.path=[]),o.path.unshift(r),o})}function nn(r){return typeof r==="string"?r:r?.message}function B(r,i,o){let $={...r,path:r.path??[]};if(!r.message){let n=nn(r.inst?._zod.def?.error?.(r))??nn(i?.error?.(r))??nn(o.customError?.(r))??nn(o.localeError?.(r))??"Invalid input";$.message=n}if(delete $.inst,delete $.continue,!i?.reportInput)delete $.input;return $}function un(r){if(r instanceof Set)return"set";if(r instanceof Map)return"map";if(r instanceof File)return"file";return"unknown"}function tn(r){if(Array.isArray(r))return"array";if(typeof r==="string")return"string";return"unknown"}function k(r){let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"nan":"number";case"object":{if(r===null)return"null";if(Array.isArray(r))return"array";let o=r;if(o&&Object.getPrototypeOf(o)!==Object.prototype&&"constructor"in o&&o.constructor)return o.constructor.name}}return i}function Jr(...r){let[i,o,$]=r;if(typeof i==="string")return{message:i,code:"custom",input:o,inst:$};return{...i}}function P4(r){return Object.entries(r).filter(([i,o])=>{return Number.isNaN(Number.parseInt(i,10))}).map((i)=>i[1])}function Kl(r){let i=atob(r),o=new Uint8Array(i.length);for(let $=0;$<i.length;$++)o[$]=i.charCodeAt($);return o}function ql(r){let i="";for(let o=0;o<r.length;o++)i+=String.fromCharCode(r[o]);return btoa(i)}function j4(r){let i=r.replace(/-/g,"+").replace(/_/g,"/"),o="=".repeat((4-i.length%4)%4);return Kl(i+o)}function J4(r){return ql(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function L4(r){let i=r.replace(/^0x/,"");if(i.length%2!==0)throw Error("Invalid hex string length");let o=new Uint8Array(i.length/2);for(let $=0;$<i.length;$+=2)o[$/2]=Number.parseInt(i.slice($,$+2),16);return o}function G4(r){return Array.from(r).map((i)=>i.toString(16).padStart(2,"0")).join("")}class Yl{constructor(...r){}}var Al=(r,i)=>{r.name="$ZodError",Object.defineProperty(r,"_zod",{value:r._zod,enumerable:!1}),Object.defineProperty(r,"issues",{value:i,enumerable:!1}),r.message=JSON.stringify(i,Pr,2),Object.defineProperty(r,"toString",{value:()=>r.message,enumerable:!1})},gn=e("$ZodError",Al),T=e("$ZodError",Al,{Parent:Error});function ln(r,i=(o)=>o.message){let o={},$=[];for(let n of r.issues)if(n.path.length>0)o[n.path[0]]=o[n.path[0]]||[],o[n.path[0]].push(i(n));else $.push(i(n));return{formErrors:$,fieldErrors:o}}function In(r,i=(o)=>o.message){let o={_errors:[]},$=(n)=>{for(let v of n.issues)if(v.code==="invalid_union"&&v.errors.length)v.errors.map((u)=>$({issues:u}));else if(v.code==="invalid_key")$({issues:v.issues});else if(v.code==="invalid_element")$({issues:v.issues});else if(v.path.length===0)o._errors.push(i(v));else{let u=o,t=0;while(t<v.path.length){let I=v.path[t];if(t!==v.path.length-1)u[I]=u[I]||{_errors:[]};else u[I]=u[I]||{_errors:[]},u[I]._errors.push(i(v));u=u[I],t++}}};return $(r),o}function Av(r,i=(o)=>o.message){let o={errors:[]},$=(n,v=[])=>{var u,t;for(let I of n.issues)if(I.code==="invalid_union"&&I.errors.length)I.errors.map((l)=>$({issues:l},I.path));else if(I.code==="invalid_key")$({issues:I.issues},I.path);else if(I.code==="invalid_element")$({issues:I.issues},I.path);else{let l=[...v,...I.path];if(l.length===0){o.errors.push(i(I));continue}let c=o,_=0;while(_<l.length){let N=l[_],O=_===l.length-1;if(typeof N==="string")c.properties??(c.properties={}),(u=c.properties)[N]??(u[N]={errors:[]}),c=c.properties[N];else c.items??(c.items=[]),(t=c.items)[N]??(t[N]={errors:[]}),c=c.items[N];if(O)c.errors.push(i(I));_++}}};return $(r),o}function Ql(r){let i=[],o=r.map(($)=>typeof $==="object"?$.key:$);for(let $ of o)if(typeof $==="number")i.push(`[${$}]`);else if(typeof $==="symbol")i.push(`[${JSON.stringify(String($))}]`);else if(/[^\w$]/.test($))i.push(`[${JSON.stringify($)}]`);else{if(i.length)i.push(".");i.push($)}return i.join("")}function Qv(r){let i=[],o=[...r.issues].sort(($,n)=>($.path??[]).length-(n.path??[]).length);for(let $ of o)if(i.push(`✖ ${$.message}`),$.path?.length)i.push(` → at ${Ql($.path)}`);return i.join(`
|
|
1
|
+
var Me=Object.defineProperty;var s=(r,i)=>{for(var o in i)Me(r,o,{get:i[o],enumerable:!0,configurable:!0,set:($)=>i[o]=()=>$})};import{useEffect as cb,useState as Xl}from"react";import{Protocol as ub}from"@modelcontextprotocol/sdk/shared/protocol.js";import{CallToolRequestSchema as tb,CallToolResultSchema as gb,EmptyResultSchema as lb,ListToolsRequestSchema as Ib,PingRequestSchema as eb}from"@modelcontextprotocol/sdk/types.js";import{JSONRPCMessageSchema as Re}from"@modelcontextprotocol/sdk/types.js";class zr{eventTarget;eventSource;messageListener;constructor(r=window.parent,i){this.eventTarget=r;this.eventSource=i;this.messageListener=(o)=>{if(i&&o.source!==this.eventSource){console.debug("Ignoring message from unknown source",o);return}let $=Re.safeParse(o.data);if($.success)console.debug("Parsed message",$.data),this.onmessage?.($.data);else console.error("Failed to parse message",$.error.message,o),this.onerror?.(Error("Invalid JSON-RPC message received: "+$.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(r,i){console.debug("Sending message",r),this.eventTarget.postMessage(r,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var Pv="2026-01-26",me="ui/open-link",xe="ui/message",Ze="ui/notifications/sandbox-proxy-ready",Ce="ui/notifications/sandbox-resource-ready",de="ui/notifications/size-changed",fe="ui/notifications/tool-input",ye="ui/notifications/tool-input-partial",he="ui/notifications/tool-result",ae="ui/notifications/tool-cancelled",pe="ui/notifications/host-context-changed",se="ui/resource-teardown",r4="ui/initialize",n4="ui/notifications/initialized",i4="ui/request-display-mode";var g={};s(g,{xor:()=>ve,xid:()=>LI,void:()=>aI,uuidv7:()=>wI,uuidv6:()=>DI,uuidv4:()=>kI,uuid:()=>UI,util:()=>D,url:()=>NI,uppercase:()=>Yr,unknown:()=>Nr,union:()=>lv,undefined:()=>yI,ulid:()=>JI,uint64:()=>dI,uint32:()=>xI,tuple:()=>Mg,trim:()=>Hr,treeifyError:()=>Av,transform:()=>ev,toUpperCase:()=>Rr,toLowerCase:()=>Mr,toJSONSchema:()=>Qi,templateLiteral:()=>ke,symbol:()=>fI,superRefine:()=>_l,success:()=>be,stringbool:()=>je,stringFormat:()=>FI,string:()=>Ri,strictObject:()=>ne,startsWith:()=>Qr,slugify:()=>mr,size:()=>kr,setErrorMap:()=>qc,set:()=>ge,safeParseAsync:()=>Ug,safeParse:()=>_g,safeEncodeAsync:()=>zg,safeEncode:()=>Og,safeDecodeAsync:()=>Pg,safeDecode:()=>Sg,registry:()=>ti,regexes:()=>x,regex:()=>Kr,refine:()=>bl,record:()=>Rg,readonly:()=>tl,property:()=>Ki,promise:()=>De,prettifyError:()=>Qv,preprocess:()=>Le,prefault:()=>rl,positive:()=>Ei,pipe:()=>En,partialRecord:()=>$e,parseAsync:()=>bg,parse:()=>cg,overwrite:()=>C,optional:()=>Ln,object:()=>re,number:()=>Jg,nullish:()=>ce,nullable:()=>Gn,null:()=>Xg,normalize:()=>Tr,nonpositive:()=>Xi,nonoptional:()=>nl,nonnegative:()=>Vi,never:()=>gv,negative:()=>Wi,nativeEnum:()=>le,nanoid:()=>zI,nan:()=>_e,multipleOf:()=>tr,minSize:()=>a,minLength:()=>nr,mime:()=>Br,meta:()=>ze,maxSize:()=>gr,maxLength:()=>Dr,map:()=>te,mac:()=>WI,lte:()=>R,lt:()=>y,lowercase:()=>qr,looseRecord:()=>ue,looseObject:()=>ie,locales:()=>Sn,literal:()=>Ie,length:()=>wr,lazy:()=>Il,ksuid:()=>GI,keyof:()=>sI,jwt:()=>QI,json:()=>Je,iso:()=>Cr,ipv6:()=>XI,ipv4:()=>EI,intersection:()=>Tg,int64:()=>CI,int32:()=>mI,int:()=>mi,instanceof:()=>Pe,includes:()=>Ar,httpUrl:()=>OI,hostname:()=>BI,hex:()=>TI,hash:()=>HI,guid:()=>_I,gte:()=>A,gt:()=>h,globalRegistry:()=>K,getErrorMap:()=>Yc,function:()=>we,fromJSONSchema:()=>Ee,formatError:()=>In,float64:()=>RI,float32:()=>MI,flattenError:()=>ln,file:()=>ee,exactOptional:()=>yg,enum:()=>Iv,endsWith:()=>Fr,encodeAsync:()=>wg,encode:()=>kg,emoji:()=>SI,email:()=>bI,e164:()=>AI,discriminatedUnion:()=>oe,describe:()=>Se,decodeAsync:()=>Ng,decode:()=>Dg,date:()=>pI,custom:()=>Oe,cuid2:()=>jI,cuid:()=>PI,core:()=>ir,config:()=>V,coerce:()=>kl,codec:()=>Ue,clone:()=>Y,cidrv6:()=>KI,cidrv4:()=>VI,check:()=>Ne,catch:()=>ol,boolean:()=>Lg,bigint:()=>ZI,base64url:()=>YI,base64:()=>qI,array:()=>Vn,any:()=>hI,_function:()=>we,_default:()=>pg,_ZodString:()=>xi,ZodXor:()=>Qg,ZodXID:()=>ai,ZodVoid:()=>Yg,ZodUnknown:()=>Kg,ZodUnion:()=>qn,ZodUndefined:()=>Eg,ZodUUID:()=>p,ZodURL:()=>Wn,ZodULID:()=>hi,ZodType:()=>P,ZodTuple:()=>Hg,ZodTransform:()=>dg,ZodTemplateLiteral:()=>gl,ZodSymbol:()=>Gg,ZodSuccess:()=>il,ZodStringFormat:()=>E,ZodString:()=>fr,ZodSet:()=>xg,ZodRecord:()=>Yn,ZodRealError:()=>H,ZodReadonly:()=>ul,ZodPromise:()=>el,ZodPrefault:()=>sg,ZodPipe:()=>_v,ZodOptional:()=>cv,ZodObject:()=>Kn,ZodNumberFormat:()=>Or,ZodNumber:()=>hr,ZodNullable:()=>hg,ZodNull:()=>Wg,ZodNonOptional:()=>bv,ZodNever:()=>qg,ZodNanoID:()=>di,ZodNaN:()=>$l,ZodMap:()=>mg,ZodMAC:()=>jg,ZodLiteral:()=>Zg,ZodLazy:()=>ll,ZodKSUID:()=>pi,ZodJWT:()=>uv,ZodIssueCode:()=>Kc,ZodIntersection:()=>Bg,ZodISOTime:()=>Hi,ZodISODuration:()=>Mi,ZodISODateTime:()=>Bi,ZodISODate:()=>Ti,ZodIPv6:()=>rv,ZodIPv4:()=>si,ZodGUID:()=>Jn,ZodFunction:()=>cl,ZodFirstPartyTypeKind:()=>Ul,ZodFile:()=>Cg,ZodExactOptional:()=>fg,ZodError:()=>Xc,ZodEnum:()=>dr,ZodEmoji:()=>Ci,ZodEmail:()=>Zi,ZodE164:()=>$v,ZodDiscriminatedUnion:()=>Fg,ZodDefault:()=>ag,ZodDate:()=>Xn,ZodCustomStringFormat:()=>yr,ZodCustom:()=>An,ZodCodec:()=>Uv,ZodCatch:()=>vl,ZodCUID2:()=>yi,ZodCUID:()=>fi,ZodCIDRv6:()=>iv,ZodCIDRv4:()=>nv,ZodBoolean:()=>ar,ZodBigIntFormat:()=>tv,ZodBigInt:()=>pr,ZodBase64URL:()=>ov,ZodBase64:()=>vv,ZodArray:()=>Ag,ZodAny:()=>Vg,TimePrecision:()=>Mu,NEVER:()=>jv,$output:()=>Au,$input:()=>Qu,$brand:()=>Jv});var ir={};s(ir,{version:()=>Vo,util:()=>D,treeifyError:()=>Av,toJSONSchema:()=>Qi,toDotPath:()=>Ql,safeParseAsync:()=>Bv,safeParse:()=>Fv,safeEncodeAsync:()=>A4,safeEncode:()=>q4,safeDecodeAsync:()=>Q4,safeDecode:()=>Y4,registry:()=>ti,regexes:()=>x,process:()=>L,prettifyError:()=>Qv,parseAsync:()=>Tn,parse:()=>Bn,meta:()=>St,locales:()=>Sn,isValidJWT:()=>nI,isValidBase64URL:()=>rI,isValidBase64:()=>r$,initializeContext:()=>lr,globalRegistry:()=>K,globalConfig:()=>rn,formatError:()=>In,flattenError:()=>ln,finalize:()=>er,extractDefs:()=>Ir,encodeAsync:()=>V4,encode:()=>W4,describe:()=>Ot,decodeAsync:()=>K4,decode:()=>X4,createToJSONSchemaMethod:()=>Pt,createStandardJSONSchemaMethod:()=>Zr,config:()=>V,clone:()=>Y,_xor:()=>uc,_xid:()=>wi,_void:()=>et,_uuidv7:()=>ci,_uuidv6:()=>ei,_uuidv4:()=>Ii,_uuid:()=>li,_url:()=>Pn,_uppercase:()=>Yr,_unknown:()=>lt,_union:()=>$c,_undefined:()=>ut,_ulid:()=>Di,_uint64:()=>ot,_uint32:()=>pu,_tuple:()=>lc,_trim:()=>Hr,_transform:()=>kc,_toUpperCase:()=>Rr,_toLowerCase:()=>Mr,_templateLiteral:()=>Jc,_symbol:()=>$t,_superRefine:()=>Nt,_success:()=>Sc,_stringbool:()=>zt,_stringFormat:()=>xr,_string:()=>Bu,_startsWith:()=>Qr,_slugify:()=>mr,_size:()=>kr,_set:()=>cc,_safeParseAsync:()=>Wr,_safeParse:()=>Er,_safeEncodeAsync:()=>Cn,_safeEncode:()=>xn,_safeDecodeAsync:()=>dn,_safeDecode:()=>Zn,_regex:()=>Kr,_refine:()=>wt,_record:()=>Ic,_readonly:()=>jc,_property:()=>Ki,_promise:()=>Gc,_positive:()=>Ei,_pipe:()=>Pc,_parseAsync:()=>Gr,_parse:()=>Lr,_overwrite:()=>C,_optional:()=>Dc,_number:()=>Cu,_nullable:()=>wc,_null:()=>tt,_normalize:()=>Tr,_nonpositive:()=>Xi,_nonoptional:()=>Oc,_nonnegative:()=>Vi,_never:()=>It,_negative:()=>Wi,_nativeEnum:()=>_c,_nanoid:()=>_i,_nan:()=>_t,_multipleOf:()=>tr,_minSize:()=>a,_minLength:()=>nr,_min:()=>A,_mime:()=>Br,_maxSize:()=>gr,_maxLength:()=>Dr,_max:()=>R,_map:()=>ec,_mac:()=>Hu,_lte:()=>R,_lt:()=>y,_lowercase:()=>qr,_literal:()=>Uc,_length:()=>wr,_lazy:()=>Lc,_ksuid:()=>Ni,_jwt:()=>Gi,_isoTime:()=>xu,_isoDuration:()=>Zu,_isoDateTime:()=>Ru,_isoDate:()=>mu,_ipv6:()=>Si,_ipv4:()=>Oi,_intersection:()=>gc,_int64:()=>vt,_int32:()=>au,_int:()=>fu,_includes:()=>Ar,_guid:()=>zn,_gte:()=>A,_gt:()=>h,_float64:()=>hu,_float32:()=>yu,_file:()=>kt,_enum:()=>bc,_endsWith:()=>Fr,_encodeAsync:()=>Rn,_encode:()=>Hn,_emoji:()=>bi,_email:()=>gi,_e164:()=>Li,_discriminatedUnion:()=>tc,_default:()=>Nc,_decodeAsync:()=>mn,_decode:()=>Mn,_date:()=>ct,_custom:()=>Dt,_cuid2:()=>ki,_cuid:()=>Ui,_coercedString:()=>Tu,_coercedNumber:()=>du,_coercedDate:()=>bt,_coercedBoolean:()=>rt,_coercedBigint:()=>it,_cidrv6:()=>Pi,_cidrv4:()=>zi,_check:()=>II,_catch:()=>zc,_boolean:()=>su,_bigint:()=>nt,_base64url:()=>Ji,_base64:()=>ji,_array:()=>Ut,_any:()=>gt,TimePrecision:()=>Mu,NEVER:()=>jv,JSONSchemaGenerator:()=>tg,JSONSchema:()=>eI,Doc:()=>an,$output:()=>Au,$input:()=>Qu,$constructor:()=>e,$brand:()=>Jv,$ZodXor:()=>w$,$ZodXID:()=>Ro,$ZodVoid:()=>_$,$ZodUnknown:()=>c$,$ZodUnion:()=>Un,$ZodUndefined:()=>l$,$ZodUUID:()=>Yo,$ZodURL:()=>Qo,$ZodULID:()=>Mo,$ZodType:()=>z,$ZodTuple:()=>$i,$ZodTransform:()=>G$,$ZodTemplateLiteral:()=>B$,$ZodSymbol:()=>g$,$ZodSuccess:()=>q$,$ZodStringFormat:()=>G,$ZodString:()=>Ur,$ZodSet:()=>P$,$ZodRegistry:()=>Fu,$ZodRecord:()=>S$,$ZodRealError:()=>T,$ZodReadonly:()=>F$,$ZodPromise:()=>H$,$ZodPrefault:()=>V$,$ZodPipe:()=>Q$,$ZodOptional:()=>ui,$ZodObjectJIT:()=>D$,$ZodObject:()=>oI,$ZodNumberFormat:()=>u$,$ZodNumber:()=>vi,$ZodNullable:()=>W$,$ZodNull:()=>I$,$ZodNonOptional:()=>K$,$ZodNever:()=>b$,$ZodNanoID:()=>Bo,$ZodNaN:()=>A$,$ZodMap:()=>z$,$ZodMAC:()=>ao,$ZodLiteral:()=>J$,$ZodLazy:()=>M$,$ZodKSUID:()=>mo,$ZodJWT:()=>o$,$ZodIntersection:()=>O$,$ZodISOTime:()=>Co,$ZodISODuration:()=>fo,$ZodISODateTime:()=>xo,$ZodISODate:()=>Zo,$ZodIPv6:()=>ho,$ZodIPv4:()=>yo,$ZodGUID:()=>qo,$ZodFunction:()=>T$,$ZodFile:()=>L$,$ZodExactOptional:()=>E$,$ZodError:()=>gn,$ZodEnum:()=>j$,$ZodEncodeError:()=>cr,$ZodEmoji:()=>Fo,$ZodEmail:()=>Ao,$ZodE164:()=>v$,$ZodDiscriminatedUnion:()=>N$,$ZodDefault:()=>X$,$ZodDate:()=>U$,$ZodCustomStringFormat:()=>$$,$ZodCustom:()=>R$,$ZodCodec:()=>kn,$ZodCheckUpperCase:()=>jo,$ZodCheckStringFormat:()=>Xr,$ZodCheckStartsWith:()=>Lo,$ZodCheckSizeEquals:()=>wo,$ZodCheckRegex:()=>zo,$ZodCheckProperty:()=>Eo,$ZodCheckOverwrite:()=>Xo,$ZodCheckNumberFormat:()=>_o,$ZodCheckMultipleOf:()=>bo,$ZodCheckMinSize:()=>Do,$ZodCheckMinLength:()=>Oo,$ZodCheckMimeType:()=>Wo,$ZodCheckMaxSize:()=>ko,$ZodCheckMaxLength:()=>No,$ZodCheckLowerCase:()=>Po,$ZodCheckLessThan:()=>yn,$ZodCheckLengthEquals:()=>So,$ZodCheckIncludes:()=>Jo,$ZodCheckGreaterThan:()=>hn,$ZodCheckEndsWith:()=>Go,$ZodCheckBigIntFormat:()=>Uo,$ZodCheck:()=>W,$ZodCatch:()=>Y$,$ZodCUID2:()=>Ho,$ZodCUID:()=>To,$ZodCIDRv6:()=>so,$ZodCIDRv4:()=>po,$ZodBoolean:()=>_n,$ZodBigIntFormat:()=>t$,$ZodBigInt:()=>oi,$ZodBase64URL:()=>i$,$ZodBase64:()=>n$,$ZodAsyncError:()=>f,$ZodArray:()=>k$,$ZodAny:()=>e$});var jv=Object.freeze({status:"aborted"});function e(r,i,o){function $(t,I){if(!t._zod)Object.defineProperty(t,"_zod",{value:{def:I,constr:u,traits:new Set},enumerable:!1});if(t._zod.traits.has(r))return;t._zod.traits.add(r),i(t,I);let l=u.prototype,c=Object.keys(l);for(let _=0;_<c.length;_++){let N=c[_];if(!(N in t))t[N]=l[N].bind(t)}}let n=o?.Parent??Object;class v extends n{}Object.defineProperty(v,"name",{value:r});function u(t){var I;let l=o?.Parent?new v:this;$(l,t),(I=l._zod).deferred??(I.deferred=[]);for(let c of l._zod.deferred)c();return l}return Object.defineProperty(u,"init",{value:$}),Object.defineProperty(u,Symbol.hasInstance,{value:(t)=>{if(o?.Parent&&t instanceof o.Parent)return!0;return t?._zod?.traits?.has(r)}}),Object.defineProperty(u,"name",{value:r}),u}var Jv=Symbol("zod_brand");class f extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class cr extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`);this.name="ZodEncodeError"}}var rn={};function V(r){if(r)Object.assign(rn,r);return rn}var D={};s(D,{unwrapMessage:()=>nn,uint8ArrayToHex:()=>G4,uint8ArrayToBase64url:()=>J4,uint8ArrayToBase64:()=>ql,stringifyPrimitive:()=>U,slugify:()=>Ev,shallowClone:()=>Xv,safeExtend:()=>N4,required:()=>z4,randomString:()=>c4,propertyKeyTypes:()=>$n,promiseAllObject:()=>e4,primitiveTypes:()=>Vv,prefixIssues:()=>M,pick:()=>k4,partial:()=>S4,parsedType:()=>k,optionalKeys:()=>Kv,omit:()=>D4,objectClone:()=>g4,numKeys:()=>b4,nullish:()=>vr,normalizeParams:()=>w,mergeDefs:()=>rr,merge:()=>O4,jsonStringifyReplacer:()=>Pr,joinValues:()=>b,issue:()=>Jr,isPlainObject:()=>$r,isObject:()=>br,hexToUint8Array:()=>L4,getSizableOrigin:()=>un,getParsedType:()=>_4,getLengthableOrigin:()=>tn,getEnumValues:()=>vn,getElementAtPath:()=>I4,floatSafeRemainder:()=>Gv,finalizeIssue:()=>B,extend:()=>w4,escapeRegex:()=>m,esc:()=>Qn,defineLazy:()=>j,createTransparentProxy:()=>U4,cloneDef:()=>l4,clone:()=>Y,cleanRegex:()=>on,cleanEnum:()=>P4,captureStackTrace:()=>Fn,cached:()=>jr,base64urlToUint8Array:()=>j4,base64ToUint8Array:()=>Kl,assignProp:()=>or,assertNotEqual:()=>o4,assertNever:()=>u4,assertIs:()=>$4,assertEqual:()=>v4,assert:()=>t4,allowsEval:()=>Wv,aborted:()=>ur,NUMBER_FORMAT_RANGES:()=>qv,Class:()=>Yl,BIGINT_FORMAT_RANGES:()=>Yv});function v4(r){return r}function o4(r){return r}function $4(r){}function u4(r){throw Error("Unexpected value in exhaustive check")}function t4(r){}function vn(r){let i=Object.values(r).filter(($)=>typeof $==="number");return Object.entries(r).filter(([$,n])=>i.indexOf(+$)===-1).map(([$,n])=>n)}function b(r,i="|"){return r.map((o)=>U(o)).join(i)}function Pr(r,i){if(typeof i==="bigint")return i.toString();return i}function jr(r){return{get value(){{let o=r();return Object.defineProperty(this,"value",{value:o}),o}throw Error("cached value already set")}}}function vr(r){return r===null||r===void 0}function on(r){let i=r.startsWith("^")?1:0,o=r.endsWith("$")?r.length-1:r.length;return r.slice(i,o)}function Gv(r,i){let o=(r.toString().split(".")[1]||"").length,$=i.toString(),n=($.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test($)){let I=$.match(/\d?e-(\d?)/);if(I?.[1])n=Number.parseInt(I[1])}let v=o>n?o:n,u=Number.parseInt(r.toFixed(v).replace(".","")),t=Number.parseInt(i.toFixed(v).replace(".",""));return u%t/10**v}var Vl=Symbol("evaluating");function j(r,i,o){let $=void 0;Object.defineProperty(r,i,{get(){if($===Vl)return;if($===void 0)$=Vl,$=o();return $},set(n){Object.defineProperty(r,i,{value:n})},configurable:!0})}function g4(r){return Object.create(Object.getPrototypeOf(r),Object.getOwnPropertyDescriptors(r))}function or(r,i,o){Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}function rr(...r){let i={};for(let o of r){let $=Object.getOwnPropertyDescriptors(o);Object.assign(i,$)}return Object.defineProperties({},i)}function l4(r){return rr(r._zod.def)}function I4(r,i){if(!i)return r;return i.reduce((o,$)=>o?.[$],r)}function e4(r){let i=Object.keys(r),o=i.map(($)=>r[$]);return Promise.all(o).then(($)=>{let n={};for(let v=0;v<i.length;v++)n[i[v]]=$[v];return n})}function c4(r=10){let o="";for(let $=0;$<r;$++)o+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return o}function Qn(r){return JSON.stringify(r)}function Ev(r){return r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Fn="captureStackTrace"in Error?Error.captureStackTrace:(...r)=>{};function br(r){return typeof r==="object"&&r!==null&&!Array.isArray(r)}var Wv=jr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(r){return!1}});function $r(r){if(br(r)===!1)return!1;let i=r.constructor;if(i===void 0)return!0;if(typeof i!=="function")return!0;let o=i.prototype;if(br(o)===!1)return!1;if(Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)return!1;return!0}function Xv(r){if($r(r))return{...r};if(Array.isArray(r))return[...r];return r}function b4(r){let i=0;for(let o in r)if(Object.prototype.hasOwnProperty.call(r,o))i++;return i}var _4=(r)=>{let i=typeof r;switch(i){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(r)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(r))return"array";if(r===null)return"null";if(r.then&&typeof r.then==="function"&&r.catch&&typeof r.catch==="function")return"promise";if(typeof Map<"u"&&r instanceof Map)return"map";if(typeof Set<"u"&&r instanceof Set)return"set";if(typeof Date<"u"&&r instanceof Date)return"date";if(typeof File<"u"&&r instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${i}`)}},$n=new Set(["string","number","symbol"]),Vv=new Set(["string","number","bigint","boolean","symbol","undefined"]);function m(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Y(r,i,o){let $=new r._zod.constr(i??r._zod.def);if(!i||o?.parent)$._zod.parent=r;return $}function w(r){let i=r;if(!i)return{};if(typeof i==="string")return{error:()=>i};if(i?.message!==void 0){if(i?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");i.error=i.message}if(delete i.message,typeof i.error==="string")return{...i,error:()=>i.error};return i}function U4(r){let i;return new Proxy({},{get(o,$,n){return i??(i=r()),Reflect.get(i,$,n)},set(o,$,n,v){return i??(i=r()),Reflect.set(i,$,n,v)},has(o,$){return i??(i=r()),Reflect.has(i,$)},deleteProperty(o,$){return i??(i=r()),Reflect.deleteProperty(i,$)},ownKeys(o){return i??(i=r()),Reflect.ownKeys(i)},getOwnPropertyDescriptor(o,$){return i??(i=r()),Reflect.getOwnPropertyDescriptor(i,$)},defineProperty(o,$,n){return i??(i=r()),Reflect.defineProperty(i,$,n)}})}function U(r){if(typeof r==="bigint")return r.toString()+"n";if(typeof r==="string")return`"${r}"`;return`${r}`}function Kv(r){return Object.keys(r).filter((i)=>{return r[i]._zod.optin==="optional"&&r[i]._zod.optout==="optional"})}var qv={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Yv={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function k4(r,i){let o=r._zod.def,$=o.checks;if($&&$.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let v=rr(r._zod.def,{get shape(){let u={};for(let t in i){if(!(t in o.shape))throw Error(`Unrecognized key: "${t}"`);if(!i[t])continue;u[t]=o.shape[t]}return or(this,"shape",u),u},checks:[]});return Y(r,v)}function D4(r,i){let o=r._zod.def,$=o.checks;if($&&$.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let v=rr(r._zod.def,{get shape(){let u={...r._zod.def.shape};for(let t in i){if(!(t in o.shape))throw Error(`Unrecognized key: "${t}"`);if(!i[t])continue;delete u[t]}return or(this,"shape",u),u},checks:[]});return Y(r,v)}function w4(r,i){if(!$r(i))throw Error("Invalid input to extend: expected a plain object");let o=r._zod.def.checks;if(o&&o.length>0){let v=r._zod.def.shape;for(let u in i)if(Object.getOwnPropertyDescriptor(v,u)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=rr(r._zod.def,{get shape(){let v={...r._zod.def.shape,...i};return or(this,"shape",v),v}});return Y(r,n)}function N4(r,i){if(!$r(i))throw Error("Invalid input to safeExtend: expected a plain object");let o=rr(r._zod.def,{get shape(){let $={...r._zod.def.shape,...i};return or(this,"shape",$),$}});return Y(r,o)}function O4(r,i){let o=rr(r._zod.def,{get shape(){let $={...r._zod.def.shape,...i._zod.def.shape};return or(this,"shape",$),$},get catchall(){return i._zod.def.catchall},checks:[]});return Y(r,o)}function S4(r,i,o){let n=i._zod.def.checks;if(n&&n.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let u=rr(i._zod.def,{get shape(){let t=i._zod.def.shape,I={...t};if(o)for(let l in o){if(!(l in t))throw Error(`Unrecognized key: "${l}"`);if(!o[l])continue;I[l]=r?new r({type:"optional",innerType:t[l]}):t[l]}else for(let l in t)I[l]=r?new r({type:"optional",innerType:t[l]}):t[l];return or(this,"shape",I),I},checks:[]});return Y(i,u)}function z4(r,i,o){let $=rr(i._zod.def,{get shape(){let n=i._zod.def.shape,v={...n};if(o)for(let u in o){if(!(u in v))throw Error(`Unrecognized key: "${u}"`);if(!o[u])continue;v[u]=new r({type:"nonoptional",innerType:n[u]})}else for(let u in n)v[u]=new r({type:"nonoptional",innerType:n[u]});return or(this,"shape",v),v}});return Y(i,$)}function ur(r,i=0){if(r.aborted===!0)return!0;for(let o=i;o<r.issues.length;o++)if(r.issues[o]?.continue!==!0)return!0;return!1}function M(r,i){return i.map((o)=>{var $;return($=o).path??($.path=[]),o.path.unshift(r),o})}function nn(r){return typeof r==="string"?r:r?.message}function B(r,i,o){let $={...r,path:r.path??[]};if(!r.message){let n=nn(r.inst?._zod.def?.error?.(r))??nn(i?.error?.(r))??nn(o.customError?.(r))??nn(o.localeError?.(r))??"Invalid input";$.message=n}if(delete $.inst,delete $.continue,!i?.reportInput)delete $.input;return $}function un(r){if(r instanceof Set)return"set";if(r instanceof Map)return"map";if(r instanceof File)return"file";return"unknown"}function tn(r){if(Array.isArray(r))return"array";if(typeof r==="string")return"string";return"unknown"}function k(r){let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"nan":"number";case"object":{if(r===null)return"null";if(Array.isArray(r))return"array";let o=r;if(o&&Object.getPrototypeOf(o)!==Object.prototype&&"constructor"in o&&o.constructor)return o.constructor.name}}return i}function Jr(...r){let[i,o,$]=r;if(typeof i==="string")return{message:i,code:"custom",input:o,inst:$};return{...i}}function P4(r){return Object.entries(r).filter(([i,o])=>{return Number.isNaN(Number.parseInt(i,10))}).map((i)=>i[1])}function Kl(r){let i=atob(r),o=new Uint8Array(i.length);for(let $=0;$<i.length;$++)o[$]=i.charCodeAt($);return o}function ql(r){let i="";for(let o=0;o<r.length;o++)i+=String.fromCharCode(r[o]);return btoa(i)}function j4(r){let i=r.replace(/-/g,"+").replace(/_/g,"/"),o="=".repeat((4-i.length%4)%4);return Kl(i+o)}function J4(r){return ql(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function L4(r){let i=r.replace(/^0x/,"");if(i.length%2!==0)throw Error("Invalid hex string length");let o=new Uint8Array(i.length/2);for(let $=0;$<i.length;$+=2)o[$/2]=Number.parseInt(i.slice($,$+2),16);return o}function G4(r){return Array.from(r).map((i)=>i.toString(16).padStart(2,"0")).join("")}class Yl{constructor(...r){}}var Al=(r,i)=>{r.name="$ZodError",Object.defineProperty(r,"_zod",{value:r._zod,enumerable:!1}),Object.defineProperty(r,"issues",{value:i,enumerable:!1}),r.message=JSON.stringify(i,Pr,2),Object.defineProperty(r,"toString",{value:()=>r.message,enumerable:!1})},gn=e("$ZodError",Al),T=e("$ZodError",Al,{Parent:Error});function ln(r,i=(o)=>o.message){let o={},$=[];for(let n of r.issues)if(n.path.length>0)o[n.path[0]]=o[n.path[0]]||[],o[n.path[0]].push(i(n));else $.push(i(n));return{formErrors:$,fieldErrors:o}}function In(r,i=(o)=>o.message){let o={_errors:[]},$=(n)=>{for(let v of n.issues)if(v.code==="invalid_union"&&v.errors.length)v.errors.map((u)=>$({issues:u}));else if(v.code==="invalid_key")$({issues:v.issues});else if(v.code==="invalid_element")$({issues:v.issues});else if(v.path.length===0)o._errors.push(i(v));else{let u=o,t=0;while(t<v.path.length){let I=v.path[t];if(t!==v.path.length-1)u[I]=u[I]||{_errors:[]};else u[I]=u[I]||{_errors:[]},u[I]._errors.push(i(v));u=u[I],t++}}};return $(r),o}function Av(r,i=(o)=>o.message){let o={errors:[]},$=(n,v=[])=>{var u,t;for(let I of n.issues)if(I.code==="invalid_union"&&I.errors.length)I.errors.map((l)=>$({issues:l},I.path));else if(I.code==="invalid_key")$({issues:I.issues},I.path);else if(I.code==="invalid_element")$({issues:I.issues},I.path);else{let l=[...v,...I.path];if(l.length===0){o.errors.push(i(I));continue}let c=o,_=0;while(_<l.length){let N=l[_],O=_===l.length-1;if(typeof N==="string")c.properties??(c.properties={}),(u=c.properties)[N]??(u[N]={errors:[]}),c=c.properties[N];else c.items??(c.items=[]),(t=c.items)[N]??(t[N]={errors:[]}),c=c.items[N];if(O)c.errors.push(i(I));_++}}};return $(r),o}function Ql(r){let i=[],o=r.map(($)=>typeof $==="object"?$.key:$);for(let $ of o)if(typeof $==="number")i.push(`[${$}]`);else if(typeof $==="symbol")i.push(`[${JSON.stringify(String($))}]`);else if(/[^\w$]/.test($))i.push(`[${JSON.stringify($)}]`);else{if(i.length)i.push(".");i.push($)}return i.join("")}function Qv(r){let i=[],o=[...r.issues].sort(($,n)=>($.path??[]).length-(n.path??[]).length);for(let $ of o)if(i.push(`✖ ${$.message}`),$.path?.length)i.push(` → at ${Ql($.path)}`);return i.join(`
|
|
2
2
|
`)}var Lr=(r)=>(i,o,$,n)=>{let v=$?Object.assign($,{async:!1}):{async:!1},u=i._zod.run({value:o,issues:[]},v);if(u instanceof Promise)throw new f;if(u.issues.length){let t=new(n?.Err??r)(u.issues.map((I)=>B(I,v,V())));throw Fn(t,n?.callee),t}return u.value},Bn=Lr(T),Gr=(r)=>async(i,o,$,n)=>{let v=$?Object.assign($,{async:!0}):{async:!0},u=i._zod.run({value:o,issues:[]},v);if(u instanceof Promise)u=await u;if(u.issues.length){let t=new(n?.Err??r)(u.issues.map((I)=>B(I,v,V())));throw Fn(t,n?.callee),t}return u.value},Tn=Gr(T),Er=(r)=>(i,o,$)=>{let n=$?{...$,async:!1}:{async:!1},v=i._zod.run({value:o,issues:[]},n);if(v instanceof Promise)throw new f;return v.issues.length?{success:!1,error:new(r??gn)(v.issues.map((u)=>B(u,n,V())))}:{success:!0,data:v.value}},Fv=Er(T),Wr=(r)=>async(i,o,$)=>{let n=$?Object.assign($,{async:!0}):{async:!0},v=i._zod.run({value:o,issues:[]},n);if(v instanceof Promise)v=await v;return v.issues.length?{success:!1,error:new r(v.issues.map((u)=>B(u,n,V())))}:{success:!0,data:v.value}},Bv=Wr(T),Hn=(r)=>(i,o,$)=>{let n=$?Object.assign($,{direction:"backward"}):{direction:"backward"};return Lr(r)(i,o,n)},W4=Hn(T),Mn=(r)=>(i,o,$)=>{return Lr(r)(i,o,$)},X4=Mn(T),Rn=(r)=>async(i,o,$)=>{let n=$?Object.assign($,{direction:"backward"}):{direction:"backward"};return Gr(r)(i,o,n)},V4=Rn(T),mn=(r)=>async(i,o,$)=>{return Gr(r)(i,o,$)},K4=mn(T),xn=(r)=>(i,o,$)=>{let n=$?Object.assign($,{direction:"backward"}):{direction:"backward"};return Er(r)(i,o,n)},q4=xn(T),Zn=(r)=>(i,o,$)=>{return Er(r)(i,o,$)},Y4=Zn(T),Cn=(r)=>async(i,o,$)=>{let n=$?Object.assign($,{direction:"backward"}):{direction:"backward"};return Wr(r)(i,o,n)},A4=Cn(T),dn=(r)=>async(i,o,$)=>{return Wr(r)(i,o,$)},Q4=dn(T);var x={};s(x,{xid:()=>Rv,uuid7:()=>H4,uuid6:()=>T4,uuid4:()=>B4,uuid:()=>_r,uppercase:()=>co,unicodeEmail:()=>Fl,undefined:()=>Io,ulid:()=>Mv,time:()=>vo,string:()=>$o,sha512_hex:()=>t6,sha512_base64url:()=>l6,sha512_base64:()=>g6,sha384_hex:()=>o6,sha384_base64url:()=>u6,sha384_base64:()=>$6,sha256_hex:()=>n6,sha256_base64url:()=>v6,sha256_base64:()=>i6,sha1_hex:()=>p4,sha1_base64url:()=>r6,sha1_base64:()=>s4,rfc5322Email:()=>R4,number:()=>en,null:()=>lo,nanoid:()=>xv,md5_hex:()=>y4,md5_base64url:()=>a4,md5_base64:()=>h4,mac:()=>av,lowercase:()=>eo,ksuid:()=>mv,ipv6:()=>hv,ipv4:()=>yv,integer:()=>to,idnEmail:()=>m4,html5Email:()=>M4,hostname:()=>C4,hex:()=>f4,guid:()=>Cv,extendedDuration:()=>F4,emoji:()=>fv,email:()=>dv,e164:()=>no,duration:()=>Zv,domain:()=>d4,datetime:()=>oo,date:()=>io,cuid2:()=>Hv,cuid:()=>Tv,cidrv6:()=>sv,cidrv4:()=>pv,browserEmail:()=>x4,boolean:()=>go,bigint:()=>uo,base64url:()=>fn,base64:()=>ro});var Tv=/^[cC][^\s-]{8,}$/,Hv=/^[0-9a-z]+$/,Mv=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Rv=/^[0-9a-vA-V]{20}$/,mv=/^[A-Za-z0-9]{27}$/,xv=/^[a-zA-Z0-9_-]{21}$/,Zv=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,F4=/^[-+]?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)?)??$/,Cv=/^([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})$/,_r=(r)=>{if(!r)return/^([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)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${r}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},B4=_r(4),T4=_r(6),H4=_r(7),dv=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,M4=/^[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])?)*$/,R4=/^(([^<>()\[\]\\.,;:\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,}))$/,Fl=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,m4=Fl,x4=/^[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])?)*$/,Z4="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function fv(){return new RegExp(Z4,"u")}var yv=/^(?:(?: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])$/,hv=/^(([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}|:))$/,av=(r)=>{let i=m(r??":");return new RegExp(`^(?:[0-9A-F]{2}${i}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${i}){5}[0-9a-f]{2}$`)},pv=/^((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])$/,sv=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,ro=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fn=/^[A-Za-z0-9_-]*$/,C4=/^(?=.{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])?)*\.?$/,d4=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,no=/^\+[1-9]\d{6,14}$/,Bl="(?:(?:\\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])))",io=new RegExp(`^${Bl}$`);function Tl(r){return typeof r.precision==="number"?r.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":r.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${r.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function vo(r){return new RegExp(`^${Tl(r)}$`)}function oo(r){let i=Tl({precision:r.precision}),o=["Z"];if(r.local)o.push("");if(r.offset)o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let $=`${i}(?:${o.join("|")})`;return new RegExp(`^${Bl}T(?:${$})$`)}var $o=(r)=>{let i=r?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${i}$`)},uo=/^-?\d+n?$/,to=/^-?\d+$/,en=/^-?\d+(?:\.\d+)?$/,go=/^(?:true|false)$/i,lo=/^null$/i;var Io=/^undefined$/i;var eo=/^[^A-Z]*$/,co=/^[^a-z]*$/,f4=/^[0-9a-fA-F]*$/;function cn(r,i){return new RegExp(`^[A-Za-z0-9+/]{${r}}${i}$`)}function bn(r){return new RegExp(`^[A-Za-z0-9_-]{${r}}$`)}var y4=/^[0-9a-fA-F]{32}$/,h4=cn(22,"=="),a4=bn(22),p4=/^[0-9a-fA-F]{40}$/,s4=cn(27,"="),r6=bn(27),n6=/^[0-9a-fA-F]{64}$/,i6=cn(43,"="),v6=bn(43),o6=/^[0-9a-fA-F]{96}$/,$6=cn(64,""),u6=bn(64),t6=/^[0-9a-fA-F]{128}$/,g6=cn(86,"=="),l6=bn(86);var W=e("$ZodCheck",(r,i)=>{var o;r._zod??(r._zod={}),r._zod.def=i,(o=r._zod).onattach??(o.onattach=[])}),Ml={number:"number",bigint:"bigint",object:"date"},yn=e("$ZodCheckLessThan",(r,i)=>{W.init(r,i);let o=Ml[typeof i.value];r._zod.onattach.push(($)=>{let n=$._zod.bag,v=(i.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(i.value<v)if(i.inclusive)n.maximum=i.value;else n.exclusiveMaximum=i.value}),r._zod.check=($)=>{if(i.inclusive?$.value<=i.value:$.value<i.value)return;$.issues.push({origin:o,code:"too_big",maximum:typeof i.value==="object"?i.value.getTime():i.value,input:$.value,inclusive:i.inclusive,inst:r,continue:!i.abort})}}),hn=e("$ZodCheckGreaterThan",(r,i)=>{W.init(r,i);let o=Ml[typeof i.value];r._zod.onattach.push(($)=>{let n=$._zod.bag,v=(i.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(i.value>v)if(i.inclusive)n.minimum=i.value;else n.exclusiveMinimum=i.value}),r._zod.check=($)=>{if(i.inclusive?$.value>=i.value:$.value>i.value)return;$.issues.push({origin:o,code:"too_small",minimum:typeof i.value==="object"?i.value.getTime():i.value,input:$.value,inclusive:i.inclusive,inst:r,continue:!i.abort})}}),bo=e("$ZodCheckMultipleOf",(r,i)=>{W.init(r,i),r._zod.onattach.push((o)=>{var $;($=o._zod.bag).multipleOf??($.multipleOf=i.value)}),r._zod.check=(o)=>{if(typeof o.value!==typeof i.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof o.value==="bigint"?o.value%i.value===BigInt(0):Gv(o.value,i.value)===0)return;o.issues.push({origin:typeof o.value,code:"not_multiple_of",divisor:i.value,input:o.value,inst:r,continue:!i.abort})}}),_o=e("$ZodCheckNumberFormat",(r,i)=>{W.init(r,i),i.format=i.format||"float64";let o=i.format?.includes("int"),$=o?"int":"number",[n,v]=qv[i.format];r._zod.onattach.push((u)=>{let t=u._zod.bag;if(t.format=i.format,t.minimum=n,t.maximum=v,o)t.pattern=to}),r._zod.check=(u)=>{let t=u.value;if(o){if(!Number.isInteger(t)){u.issues.push({expected:$,format:i.format,code:"invalid_type",continue:!1,input:t,inst:r});return}if(!Number.isSafeInteger(t)){if(t>0)u.issues.push({input:t,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:$,inclusive:!0,continue:!i.abort});else u.issues.push({input:t,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:$,inclusive:!0,continue:!i.abort});return}}if(t<n)u.issues.push({origin:"number",input:t,code:"too_small",minimum:n,inclusive:!0,inst:r,continue:!i.abort});if(t>v)u.issues.push({origin:"number",input:t,code:"too_big",maximum:v,inclusive:!0,inst:r,continue:!i.abort})}}),Uo=e("$ZodCheckBigIntFormat",(r,i)=>{W.init(r,i);let[o,$]=Yv[i.format];r._zod.onattach.push((n)=>{let v=n._zod.bag;v.format=i.format,v.minimum=o,v.maximum=$}),r._zod.check=(n)=>{let v=n.value;if(v<o)n.issues.push({origin:"bigint",input:v,code:"too_small",minimum:o,inclusive:!0,inst:r,continue:!i.abort});if(v>$)n.issues.push({origin:"bigint",input:v,code:"too_big",maximum:$,inclusive:!0,inst:r,continue:!i.abort})}}),ko=e("$ZodCheckMaxSize",(r,i)=>{var o;W.init(r,i),(o=r._zod.def).when??(o.when=($)=>{let n=$.value;return!vr(n)&&n.size!==void 0}),r._zod.onattach.push(($)=>{let n=$._zod.bag.maximum??Number.POSITIVE_INFINITY;if(i.maximum<n)$._zod.bag.maximum=i.maximum}),r._zod.check=($)=>{let n=$.value;if(n.size<=i.maximum)return;$.issues.push({origin:un(n),code:"too_big",maximum:i.maximum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),Do=e("$ZodCheckMinSize",(r,i)=>{var o;W.init(r,i),(o=r._zod.def).when??(o.when=($)=>{let n=$.value;return!vr(n)&&n.size!==void 0}),r._zod.onattach.push(($)=>{let n=$._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(i.minimum>n)$._zod.bag.minimum=i.minimum}),r._zod.check=($)=>{let n=$.value;if(n.size>=i.minimum)return;$.issues.push({origin:un(n),code:"too_small",minimum:i.minimum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),wo=e("$ZodCheckSizeEquals",(r,i)=>{var o;W.init(r,i),(o=r._zod.def).when??(o.when=($)=>{let n=$.value;return!vr(n)&&n.size!==void 0}),r._zod.onattach.push(($)=>{let n=$._zod.bag;n.minimum=i.size,n.maximum=i.size,n.size=i.size}),r._zod.check=($)=>{let n=$.value,v=n.size;if(v===i.size)return;let u=v>i.size;$.issues.push({origin:un(n),...u?{code:"too_big",maximum:i.size}:{code:"too_small",minimum:i.size},inclusive:!0,exact:!0,input:$.value,inst:r,continue:!i.abort})}}),No=e("$ZodCheckMaxLength",(r,i)=>{var o;W.init(r,i),(o=r._zod.def).when??(o.when=($)=>{let n=$.value;return!vr(n)&&n.length!==void 0}),r._zod.onattach.push(($)=>{let n=$._zod.bag.maximum??Number.POSITIVE_INFINITY;if(i.maximum<n)$._zod.bag.maximum=i.maximum}),r._zod.check=($)=>{let n=$.value;if(n.length<=i.maximum)return;let u=tn(n);$.issues.push({origin:u,code:"too_big",maximum:i.maximum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),Oo=e("$ZodCheckMinLength",(r,i)=>{var o;W.init(r,i),(o=r._zod.def).when??(o.when=($)=>{let n=$.value;return!vr(n)&&n.length!==void 0}),r._zod.onattach.push(($)=>{let n=$._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(i.minimum>n)$._zod.bag.minimum=i.minimum}),r._zod.check=($)=>{let n=$.value;if(n.length>=i.minimum)return;let u=tn(n);$.issues.push({origin:u,code:"too_small",minimum:i.minimum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),So=e("$ZodCheckLengthEquals",(r,i)=>{var o;W.init(r,i),(o=r._zod.def).when??(o.when=($)=>{let n=$.value;return!vr(n)&&n.length!==void 0}),r._zod.onattach.push(($)=>{let n=$._zod.bag;n.minimum=i.length,n.maximum=i.length,n.length=i.length}),r._zod.check=($)=>{let n=$.value,v=n.length;if(v===i.length)return;let u=tn(n),t=v>i.length;$.issues.push({origin:u,...t?{code:"too_big",maximum:i.length}:{code:"too_small",minimum:i.length},inclusive:!0,exact:!0,input:$.value,inst:r,continue:!i.abort})}}),Xr=e("$ZodCheckStringFormat",(r,i)=>{var o,$;if(W.init(r,i),r._zod.onattach.push((n)=>{let v=n._zod.bag;if(v.format=i.format,i.pattern)v.patterns??(v.patterns=new Set),v.patterns.add(i.pattern)}),i.pattern)(o=r._zod).check??(o.check=(n)=>{if(i.pattern.lastIndex=0,i.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:i.format,input:n.value,...i.pattern?{pattern:i.pattern.toString()}:{},inst:r,continue:!i.abort})});else($=r._zod).check??($.check=()=>{})}),zo=e("$ZodCheckRegex",(r,i)=>{Xr.init(r,i),r._zod.check=(o)=>{if(i.pattern.lastIndex=0,i.pattern.test(o.value))return;o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:i.pattern.toString(),inst:r,continue:!i.abort})}}),Po=e("$ZodCheckLowerCase",(r,i)=>{i.pattern??(i.pattern=eo),Xr.init(r,i)}),jo=e("$ZodCheckUpperCase",(r,i)=>{i.pattern??(i.pattern=co),Xr.init(r,i)}),Jo=e("$ZodCheckIncludes",(r,i)=>{W.init(r,i);let o=m(i.includes),$=new RegExp(typeof i.position==="number"?`^.{${i.position}}${o}`:o);i.pattern=$,r._zod.onattach.push((n)=>{let v=n._zod.bag;v.patterns??(v.patterns=new Set),v.patterns.add($)}),r._zod.check=(n)=>{if(n.value.includes(i.includes,i.position))return;n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:i.includes,input:n.value,inst:r,continue:!i.abort})}}),Lo=e("$ZodCheckStartsWith",(r,i)=>{W.init(r,i);let o=new RegExp(`^${m(i.prefix)}.*`);i.pattern??(i.pattern=o),r._zod.onattach.push(($)=>{let n=$._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),r._zod.check=($)=>{if($.value.startsWith(i.prefix))return;$.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:i.prefix,input:$.value,inst:r,continue:!i.abort})}}),Go=e("$ZodCheckEndsWith",(r,i)=>{W.init(r,i);let o=new RegExp(`.*${m(i.suffix)}$`);i.pattern??(i.pattern=o),r._zod.onattach.push(($)=>{let n=$._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),r._zod.check=($)=>{if($.value.endsWith(i.suffix))return;$.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:i.suffix,input:$.value,inst:r,continue:!i.abort})}});function Hl(r,i,o){if(r.issues.length)i.issues.push(...M(o,r.issues))}var Eo=e("$ZodCheckProperty",(r,i)=>{W.init(r,i),r._zod.check=(o)=>{let $=i.schema._zod.run({value:o.value[i.property],issues:[]},{});if($ instanceof Promise)return $.then((n)=>Hl(n,o,i.property));Hl($,o,i.property);return}}),Wo=e("$ZodCheckMimeType",(r,i)=>{W.init(r,i);let o=new Set(i.mime);r._zod.onattach.push(($)=>{$._zod.bag.mime=i.mime}),r._zod.check=($)=>{if(o.has($.value.type))return;$.issues.push({code:"invalid_value",values:i.mime,input:$.value.type,inst:r,continue:!i.abort})}}),Xo=e("$ZodCheckOverwrite",(r,i)=>{W.init(r,i),r._zod.check=(o)=>{o.value=i.tx(o.value)}});class an{constructor(r=[]){if(this.content=[],this.indent=0,this)this.args=r}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r==="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let o=r.split(`
|
|
3
3
|
`).filter((v)=>v),$=Math.min(...o.map((v)=>v.length-v.trimStart().length)),n=o.map((v)=>v.slice($)).map((v)=>" ".repeat(this.indent*2)+v);for(let v of n)this.content.push(v)}compile(){let r=Function,i=this?.args,$=[...(this?.content??[""]).map((n)=>` ${n}`)];return new r(...i,$.join(`
|
|
4
4
|
`))}}var Vo={major:4,minor:3,patch:6};var z=e("$ZodType",(r,i)=>{var o;r??(r={}),r._zod.def=i,r._zod.bag=r._zod.bag||{},r._zod.version=Vo;let $=[...r._zod.def.checks??[]];if(r._zod.traits.has("$ZodCheck"))$.unshift(r);for(let n of $)for(let v of n._zod.onattach)v(r);if($.length===0)(o=r._zod).deferred??(o.deferred=[]),r._zod.deferred?.push(()=>{r._zod.run=r._zod.parse});else{let n=(u,t,I)=>{let l=ur(u),c;for(let _ of t){if(_._zod.def.when){if(!_._zod.def.when(u))continue}else if(l)continue;let N=u.issues.length,O=_._zod.check(u);if(O instanceof Promise&&I?.async===!1)throw new f;if(c||O instanceof Promise)c=(c??Promise.resolve()).then(async()=>{if(await O,u.issues.length===N)return;if(!l)l=ur(u,N)});else{if(u.issues.length===N)continue;if(!l)l=ur(u,N)}}if(c)return c.then(()=>{return u});return u},v=(u,t,I)=>{if(ur(u))return u.aborted=!0,u;let l=n(t,$,I);if(l instanceof Promise){if(I.async===!1)throw new f;return l.then((c)=>r._zod.parse(c,I))}return r._zod.parse(l,I)};r._zod.run=(u,t)=>{if(t.skipChecks)return r._zod.parse(u,t);if(t.direction==="backward"){let l=r._zod.parse({value:u.value,issues:[]},{...t,skipChecks:!0});if(l instanceof Promise)return l.then((c)=>{return v(c,u,t)});return v(l,u,t)}let I=r._zod.parse(u,t);if(I instanceof Promise){if(t.async===!1)throw new f;return I.then((l)=>n(l,$,t))}return n(I,$,t)}}j(r,"~standard",()=>({validate:(n)=>{try{let v=Fv(r,n);return v.success?{value:v.data}:{issues:v.error?.issues}}catch(v){return Bv(r,n).then((u)=>u.success?{value:u.data}:{issues:u.error?.issues})}},vendor:"zod",version:1}))}),Ur=e("$ZodString",(r,i)=>{z.init(r,i),r._zod.pattern=[...r?._zod.bag?.patterns??[]].pop()??$o(r._zod.bag),r._zod.parse=(o,$)=>{if(i.coerce)try{o.value=String(o.value)}catch(n){}if(typeof o.value==="string")return o;return o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:r}),o}}),G=e("$ZodStringFormat",(r,i)=>{Xr.init(r,i),Ur.init(r,i)}),qo=e("$ZodGUID",(r,i)=>{i.pattern??(i.pattern=Cv),G.init(r,i)}),Yo=e("$ZodUUID",(r,i)=>{if(i.version){let $={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[i.version];if($===void 0)throw Error(`Invalid UUID version: "${i.version}"`);i.pattern??(i.pattern=_r($))}else i.pattern??(i.pattern=_r());G.init(r,i)}),Ao=e("$ZodEmail",(r,i)=>{i.pattern??(i.pattern=dv),G.init(r,i)}),Qo=e("$ZodURL",(r,i)=>{G.init(r,i),r._zod.check=(o)=>{try{let $=o.value.trim(),n=new URL($);if(i.hostname){if(i.hostname.lastIndex=0,!i.hostname.test(n.hostname))o.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:i.hostname.source,input:o.value,inst:r,continue:!i.abort})}if(i.protocol){if(i.protocol.lastIndex=0,!i.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol))o.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:i.protocol.source,input:o.value,inst:r,continue:!i.abort})}if(i.normalize)o.value=n.href;else o.value=$;return}catch($){o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:r,continue:!i.abort})}}}),Fo=e("$ZodEmoji",(r,i)=>{i.pattern??(i.pattern=fv()),G.init(r,i)}),Bo=e("$ZodNanoID",(r,i)=>{i.pattern??(i.pattern=xv),G.init(r,i)}),To=e("$ZodCUID",(r,i)=>{i.pattern??(i.pattern=Tv),G.init(r,i)}),Ho=e("$ZodCUID2",(r,i)=>{i.pattern??(i.pattern=Hv),G.init(r,i)}),Mo=e("$ZodULID",(r,i)=>{i.pattern??(i.pattern=Mv),G.init(r,i)}),Ro=e("$ZodXID",(r,i)=>{i.pattern??(i.pattern=Rv),G.init(r,i)}),mo=e("$ZodKSUID",(r,i)=>{i.pattern??(i.pattern=mv),G.init(r,i)}),xo=e("$ZodISODateTime",(r,i)=>{i.pattern??(i.pattern=oo(i)),G.init(r,i)}),Zo=e("$ZodISODate",(r,i)=>{i.pattern??(i.pattern=io),G.init(r,i)}),Co=e("$ZodISOTime",(r,i)=>{i.pattern??(i.pattern=vo(i)),G.init(r,i)}),fo=e("$ZodISODuration",(r,i)=>{i.pattern??(i.pattern=Zv),G.init(r,i)}),yo=e("$ZodIPv4",(r,i)=>{i.pattern??(i.pattern=yv),G.init(r,i),r._zod.bag.format="ipv4"}),ho=e("$ZodIPv6",(r,i)=>{i.pattern??(i.pattern=hv),G.init(r,i),r._zod.bag.format="ipv6",r._zod.check=(o)=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:r,continue:!i.abort})}}}),ao=e("$ZodMAC",(r,i)=>{i.pattern??(i.pattern=av(i.delimiter)),G.init(r,i),r._zod.bag.format="mac"}),po=e("$ZodCIDRv4",(r,i)=>{i.pattern??(i.pattern=pv),G.init(r,i)}),so=e("$ZodCIDRv6",(r,i)=>{i.pattern??(i.pattern=sv),G.init(r,i),r._zod.check=(o)=>{let $=o.value.split("/");try{if($.length!==2)throw Error();let[n,v]=$;if(!v)throw Error();let u=Number(v);if(`${u}`!==v)throw Error();if(u<0||u>128)throw Error();new URL(`http://[${n}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:r,continue:!i.abort})}}});function r$(r){if(r==="")return!0;if(r.length%4!==0)return!1;try{return atob(r),!0}catch{return!1}}var n$=e("$ZodBase64",(r,i)=>{i.pattern??(i.pattern=ro),G.init(r,i),r._zod.bag.contentEncoding="base64",r._zod.check=(o)=>{if(r$(o.value))return;o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:r,continue:!i.abort})}});function rI(r){if(!fn.test(r))return!1;let i=r.replace(/[-_]/g,($)=>$==="-"?"+":"/"),o=i.padEnd(Math.ceil(i.length/4)*4,"=");return r$(o)}var i$=e("$ZodBase64URL",(r,i)=>{i.pattern??(i.pattern=fn),G.init(r,i),r._zod.bag.contentEncoding="base64url",r._zod.check=(o)=>{if(rI(o.value))return;o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:r,continue:!i.abort})}}),v$=e("$ZodE164",(r,i)=>{i.pattern??(i.pattern=no),G.init(r,i)});function nI(r,i=null){try{let o=r.split(".");if(o.length!==3)return!1;let[$]=o;if(!$)return!1;let n=JSON.parse(atob($));if("typ"in n&&n?.typ!=="JWT")return!1;if(!n.alg)return!1;if(i&&(!("alg"in n)||n.alg!==i))return!1;return!0}catch{return!1}}var o$=e("$ZodJWT",(r,i)=>{G.init(r,i),r._zod.check=(o)=>{if(nI(o.value,i.alg))return;o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:r,continue:!i.abort})}}),$$=e("$ZodCustomStringFormat",(r,i)=>{G.init(r,i),r._zod.check=(o)=>{if(i.fn(o.value))return;o.issues.push({code:"invalid_format",format:i.format,input:o.value,inst:r,continue:!i.abort})}}),vi=e("$ZodNumber",(r,i)=>{z.init(r,i),r._zod.pattern=r._zod.bag.pattern??en,r._zod.parse=(o,$)=>{if(i.coerce)try{o.value=Number(o.value)}catch(u){}let n=o.value;if(typeof n==="number"&&!Number.isNaN(n)&&Number.isFinite(n))return o;let v=typeof n==="number"?Number.isNaN(n)?"NaN":!Number.isFinite(n)?"Infinity":void 0:void 0;return o.issues.push({expected:"number",code:"invalid_type",input:n,inst:r,...v?{received:v}:{}}),o}}),u$=e("$ZodNumberFormat",(r,i)=>{_o.init(r,i),vi.init(r,i)}),_n=e("$ZodBoolean",(r,i)=>{z.init(r,i),r._zod.pattern=go,r._zod.parse=(o,$)=>{if(i.coerce)try{o.value=Boolean(o.value)}catch(v){}let n=o.value;if(typeof n==="boolean")return o;return o.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:r}),o}}),oi=e("$ZodBigInt",(r,i)=>{z.init(r,i),r._zod.pattern=uo,r._zod.parse=(o,$)=>{if(i.coerce)try{o.value=BigInt(o.value)}catch(n){}if(typeof o.value==="bigint")return o;return o.issues.push({expected:"bigint",code:"invalid_type",input:o.value,inst:r}),o}}),t$=e("$ZodBigIntFormat",(r,i)=>{Uo.init(r,i),oi.init(r,i)}),g$=e("$ZodSymbol",(r,i)=>{z.init(r,i),r._zod.parse=(o,$)=>{let n=o.value;if(typeof n==="symbol")return o;return o.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:r}),o}}),l$=e("$ZodUndefined",(r,i)=>{z.init(r,i),r._zod.pattern=Io,r._zod.values=new Set([void 0]),r._zod.optin="optional",r._zod.optout="optional",r._zod.parse=(o,$)=>{let n=o.value;if(typeof n>"u")return o;return o.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:r}),o}}),I$=e("$ZodNull",(r,i)=>{z.init(r,i),r._zod.pattern=lo,r._zod.values=new Set([null]),r._zod.parse=(o,$)=>{let n=o.value;if(n===null)return o;return o.issues.push({expected:"null",code:"invalid_type",input:n,inst:r}),o}}),e$=e("$ZodAny",(r,i)=>{z.init(r,i),r._zod.parse=(o)=>o}),c$=e("$ZodUnknown",(r,i)=>{z.init(r,i),r._zod.parse=(o)=>o}),b$=e("$ZodNever",(r,i)=>{z.init(r,i),r._zod.parse=(o,$)=>{return o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:r}),o}}),_$=e("$ZodVoid",(r,i)=>{z.init(r,i),r._zod.parse=(o,$)=>{let n=o.value;if(typeof n>"u")return o;return o.issues.push({expected:"void",code:"invalid_type",input:n,inst:r}),o}}),U$=e("$ZodDate",(r,i)=>{z.init(r,i),r._zod.parse=(o,$)=>{if(i.coerce)try{o.value=new Date(o.value)}catch(t){}let n=o.value,v=n instanceof Date;if(v&&!Number.isNaN(n.getTime()))return o;return o.issues.push({expected:"date",code:"invalid_type",input:n,...v?{received:"Invalid Date"}:{},inst:r}),o}});function ml(r,i,o){if(r.issues.length)i.issues.push(...M(o,r.issues));i.value[o]=r.value}var k$=e("$ZodArray",(r,i)=>{z.init(r,i),r._zod.parse=(o,$)=>{let n=o.value;if(!Array.isArray(n))return o.issues.push({expected:"array",code:"invalid_type",input:n,inst:r}),o;o.value=Array(n.length);let v=[];for(let u=0;u<n.length;u++){let t=n[u],I=i.element._zod.run({value:t,issues:[]},$);if(I instanceof Promise)v.push(I.then((l)=>ml(l,o,u)));else ml(I,o,u)}if(v.length)return Promise.all(v).then(()=>o);return o}});function ii(r,i,o,$,n){if(r.issues.length){if(n&&!(o in $))return;i.issues.push(...M(o,r.issues))}if(r.value===void 0){if(o in $)i.value[o]=void 0}else i.value[o]=r.value}function iI(r){let i=Object.keys(r.shape);for(let $ of i)if(!r.shape?.[$]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${$}": expected a Zod schema`);let o=Kv(r.shape);return{...r,keys:i,keySet:new Set(i),numKeys:i.length,optionalKeys:new Set(o)}}function vI(r,i,o,$,n,v){let u=[],t=n.keySet,I=n.catchall._zod,l=I.def.type,c=I.optout==="optional";for(let _ in i){if(t.has(_))continue;if(l==="never"){u.push(_);continue}let N=I.run({value:i[_],issues:[]},$);if(N instanceof Promise)r.push(N.then((O)=>ii(O,o,_,i,c)));else ii(N,o,_,i,c)}if(u.length)o.issues.push({code:"unrecognized_keys",keys:u,input:i,inst:v});if(!r.length)return o;return Promise.all(r).then(()=>{return o})}var oI=e("$ZodObject",(r,i)=>{if(z.init(r,i),!Object.getOwnPropertyDescriptor(i,"shape")?.get){let t=i.shape;Object.defineProperty(i,"shape",{get:()=>{let I={...t};return Object.defineProperty(i,"shape",{value:I}),I}})}let $=jr(()=>iI(i));j(r._zod,"propValues",()=>{let t=i.shape,I={};for(let l in t){let c=t[l]._zod;if(c.values){I[l]??(I[l]=new Set);for(let _ of c.values)I[l].add(_)}}return I});let n=br,v=i.catchall,u;r._zod.parse=(t,I)=>{u??(u=$.value);let l=t.value;if(!n(l))return t.issues.push({expected:"object",code:"invalid_type",input:l,inst:r}),t;t.value={};let c=[],_=u.shape;for(let N of u.keys){let O=_[N],J=O._zod.optout==="optional",X=O._zod.run({value:l[N],issues:[]},I);if(X instanceof Promise)c.push(X.then((Sr)=>ii(Sr,t,N,l,J)));else ii(X,t,N,l,J)}if(!v)return c.length?Promise.all(c).then(()=>t):t;return vI(c,l,t,I,$.value,r)}}),D$=e("$ZodObjectJIT",(r,i)=>{oI.init(r,i);let o=r._zod.parse,$=jr(()=>iI(i)),n=(N)=>{let O=new an(["shape","payload","ctx"]),J=$.value,X=(d)=>{let F=Qn(d);return`shape[${F}]._zod.run({ value: input[${F}], issues: [] }, ctx)`};O.write("const input = payload.value;");let Sr=Object.create(null),Be=0;for(let d of J.keys)Sr[d]=`key_${Be++}`;O.write("const newResult = {};");for(let d of J.keys){let F=Sr[d],Z=Qn(d),He=N[d]?._zod?.optout==="optional";if(O.write(`const ${F} = ${X(d)};`),He)O.write(`
|
package/dist/src/server/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var QI=Object.defineProperty;var s=(r,i)=>{for(var o in i)QI(r,o,{get:i[o],enumerable:!0,configurable:!0,set:(t)=>i[o]=()=>t})};import{Protocol as H6}from"@modelcontextprotocol/sdk/shared/protocol.js";import{CallToolRequestSchema as T6,CallToolResultSchema as M6,EmptyResultSchema as R6,ListToolsRequestSchema as x6,PingRequestSchema as Z6}from"@modelcontextprotocol/sdk/types.js";import{JSONRPCMessageSchema as YI}from"@modelcontextprotocol/sdk/types.js";class Qn{eventTarget;eventSource;messageListener;constructor(r=window.parent,i){this.eventTarget=r;this.eventSource=i;this.messageListener=(o)=>{if(i&&o.source!==this.eventSource){console.debug("Ignoring message from unknown source",o);return}let t=YI.safeParse(o.data);if(t.success)console.debug("Parsed message",t.data),this.onmessage?.(t.data);else console.error("Failed to parse message",t.error.message,o),this.onerror?.(Error("Invalid JSON-RPC message received: "+t.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(r,i){console.debug("Sending message",r),this.eventTarget.postMessage(r,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var wv="2025-11-21";var g={};s(g,{xor:()=>al,xid:()=>Ol,void:()=>Zl,uuidv7:()=>cl,uuidv6:()=>Il,uuidv4:()=>ll,uuid:()=>el,util:()=>D,url:()=>bl,uppercase:()=>Kr,unknown:()=>Nr,union:()=>ev,undefined:()=>Rl,ulid:()=>Nl,uint64:()=>Tl,uint32:()=>Bl,tuple:()=>Yg,trim:()=>mr,treeifyError:()=>Xv,transform:()=>Iv,toUpperCase:()=>Tr,toLowerCase:()=>Hr,toJSONSchema:()=>Yi,templateLiteral:()=>lI,symbol:()=>Ml,superRefine:()=>ee,success:()=>uI,stringbool:()=>wI,stringFormat:()=>El,string:()=>Mi,strictObject:()=>yl,startsWith:()=>Qr,slugify:()=>Mr,size:()=>kr,setErrorMap:()=>b6,set:()=>iI,safeParseAsync:()=>lg,safeParse:()=>eg,safeEncodeAsync:()=>Dg,safeEncode:()=>Ug,safeDecodeAsync:()=>wg,safeDecode:()=>kg,registry:()=>ui,regexes:()=>x,regex:()=>Er,refine:()=>ge,record:()=>Fg,readonly:()=>ie,property:()=>Ai,promise:()=>II,prettifyError:()=>Ev,preprocess:()=>OI,prefault:()=>yg,positive:()=>Wi,pipe:()=>Gn,partialRecord:()=>sl,parseAsync:()=>gg,parse:()=>ug,overwrite:()=>d,optional:()=>Jn,object:()=>fl,number:()=>Og,nullish:()=>$I,nullable:()=>Ln,null:()=>Jg,normalize:()=>Br,nonpositive:()=>Xi,nonoptional:()=>hg,nonnegative:()=>Ei,never:()=>gv,negative:()=>Vi,nativeEnum:()=>vI,nanoid:()=>kl,nan:()=>gI,multipleOf:()=>ur,minSize:()=>a,minLength:()=>nr,mime:()=>Fr,meta:()=>kI,maxSize:()=>gr,maxLength:()=>Dr,map:()=>nI,mac:()=>Pl,lte:()=>M,lt:()=>y,lowercase:()=>Ar,looseRecord:()=>rI,looseObject:()=>hl,locales:()=>On,literal:()=>oI,length:()=>wr,lazy:()=>te,ksuid:()=>zl,keyof:()=>Cl,jwt:()=>Xl,json:()=>NI,iso:()=>Zr,ipv6:()=>jl,ipv4:()=>Sl,intersection:()=>qg,int64:()=>Hl,int32:()=>Fl,int:()=>Ri,instanceof:()=>DI,includes:()=>qr,httpUrl:()=>_l,hostname:()=>Al,hex:()=>Kl,hash:()=>ql,guid:()=>gl,gte:()=>Q,gt:()=>h,globalRegistry:()=>A,getErrorMap:()=>_6,function:()=>cI,fromJSONSchema:()=>SI,formatError:()=>en,float64:()=>Yl,float32:()=>Ql,flattenError:()=>gn,file:()=>tI,exactOptional:()=>xg,enum:()=>lv,endsWith:()=>Yr,encodeAsync:()=>bg,encode:()=>Ig,emoji:()=>Ul,email:()=>ul,e164:()=>Vl,discriminatedUnion:()=>pl,describe:()=>UI,decodeAsync:()=>_g,decode:()=>cg,date:()=>dl,custom:()=>_I,cuid2:()=>wl,cuid:()=>Dl,core:()=>ir,config:()=>E,coerce:()=>Ie,codec:()=>eI,clone:()=>q,cidrv6:()=>Ll,cidrv4:()=>Jl,check:()=>bI,catch:()=>sg,boolean:()=>zg,bigint:()=>ml,base64url:()=>Wl,base64:()=>Gl,array:()=>Xn,any:()=>xl,_function:()=>cI,_default:()=>Cg,_ZodString:()=>xi,ZodXor:()=>Eg,ZodXID:()=>ai,ZodVoid:()=>Vg,ZodUnknown:()=>Gg,ZodUnion:()=>An,ZodUndefined:()=>Pg,ZodUUID:()=>p,ZodURL:()=>Wn,ZodULID:()=>hi,ZodType:()=>P,ZodTuple:()=>Qg,ZodTransform:()=>Mg,ZodTemplateLiteral:()=>ve,ZodSymbol:()=>Sg,ZodSuccess:()=>ag,ZodStringFormat:()=>W,ZodString:()=>Cr,ZodSet:()=>mg,ZodRecord:()=>Kn,ZodRealError:()=>H,ZodReadonly:()=>ne,ZodPromise:()=>$e,ZodPrefault:()=>fg,ZodPipe:()=>_v,ZodOptional:()=>cv,ZodObject:()=>En,ZodNumberFormat:()=>Or,ZodNumber:()=>yr,ZodNullable:()=>Zg,ZodNull:()=>jg,ZodNonOptional:()=>bv,ZodNever:()=>Wg,ZodNanoID:()=>Ci,ZodNaN:()=>re,ZodMap:()=>Bg,ZodMAC:()=>Ng,ZodLiteral:()=>Hg,ZodLazy:()=>oe,ZodKSUID:()=>pi,ZodJWT:()=>$v,ZodIssueCode:()=>c6,ZodIntersection:()=>Kg,ZodISOTime:()=>Hi,ZodISODuration:()=>Ti,ZodISODateTime:()=>Bi,ZodISODate:()=>mi,ZodIPv6:()=>rv,ZodIPv4:()=>si,ZodGUID:()=>jn,ZodFunction:()=>ue,ZodFirstPartyTypeKind:()=>le,ZodFile:()=>Tg,ZodExactOptional:()=>Rg,ZodError:()=>l6,ZodEnum:()=>dr,ZodEmoji:()=>di,ZodEmail:()=>Zi,ZodE164:()=>tv,ZodDiscriminatedUnion:()=>Ag,ZodDefault:()=>dg,ZodDate:()=>Vn,ZodCustomStringFormat:()=>fr,ZodCustom:()=>qn,ZodCodec:()=>Uv,ZodCatch:()=>pg,ZodCUID2:()=>yi,ZodCUID:()=>fi,ZodCIDRv6:()=>iv,ZodCIDRv4:()=>nv,ZodBoolean:()=>hr,ZodBigIntFormat:()=>uv,ZodBigInt:()=>ar,ZodBase64URL:()=>ov,ZodBase64:()=>vv,ZodArray:()=>Xg,ZodAny:()=>Lg,TimePrecision:()=>Y$,NEVER:()=>Nv,$output:()=>X$,$input:()=>E$,$brand:()=>Ov});var ir={};s(ir,{version:()=>Lo,util:()=>D,treeifyError:()=>Xv,toJSONSchema:()=>Yi,toDotPath:()=>Xe,safeParseAsync:()=>Kv,safeParse:()=>Av,safeEncodeAsync:()=>Uc,safeEncode:()=>bc,safeDecodeAsync:()=>kc,safeDecode:()=>_c,registry:()=>ui,regexes:()=>x,process:()=>L,prettifyError:()=>Ev,parseAsync:()=>mn,parse:()=>Bn,meta:()=>ku,locales:()=>On,isValidJWT:()=>ye,isValidBase64URL:()=>fe,isValidBase64:()=>yo,initializeContext:()=>er,globalRegistry:()=>A,globalConfig:()=>sr,formatError:()=>en,flattenError:()=>gn,finalize:()=>Ir,extractDefs:()=>lr,encodeAsync:()=>Ic,encode:()=>ec,describe:()=>Uu,decodeAsync:()=>cc,decode:()=>lc,createToJSONSchemaMethod:()=>wu,createStandardJSONSchemaMethod:()=>xr,config:()=>E,clone:()=>q,_xor:()=>H4,_xid:()=>wi,_void:()=>$u,_uuidv7:()=>ci,_uuidv6:()=>Ii,_uuidv4:()=>li,_uuid:()=>ei,_url:()=>Sn,_uppercase:()=>Kr,_unknown:()=>ou,_union:()=>m4,_undefined:()=>nu,_ulid:()=>Di,_uint64:()=>s$,_uint32:()=>C$,_tuple:()=>R4,_trim:()=>mr,_transform:()=>h4,_toUpperCase:()=>Tr,_toLowerCase:()=>Hr,_templateLiteral:()=>t6,_symbol:()=>ru,_superRefine:()=>_u,_success:()=>n6,_stringbool:()=>Du,_stringFormat:()=>Rr,_string:()=>K$,_startsWith:()=>Qr,_slugify:()=>Mr,_size:()=>kr,_set:()=>d4,_safeParseAsync:()=>Wr,_safeParse:()=>Gr,_safeEncodeAsync:()=>dn,_safeEncode:()=>xn,_safeDecodeAsync:()=>Cn,_safeDecode:()=>Zn,_regex:()=>Er,_refine:()=>bu,_record:()=>x4,_readonly:()=>o6,_property:()=>Ai,_promise:()=>u6,_positive:()=>Wi,_pipe:()=>v6,_parseAsync:()=>Lr,_parse:()=>Jr,_overwrite:()=>d,_optional:()=>a4,_number:()=>T$,_nullable:()=>p4,_null:()=>iu,_normalize:()=>Br,_nonpositive:()=>Xi,_nonoptional:()=>r6,_nonnegative:()=>Ei,_never:()=>tu,_negative:()=>Vi,_nativeEnum:()=>f4,_nanoid:()=>_i,_nan:()=>eu,_multipleOf:()=>ur,_minSize:()=>a,_minLength:()=>nr,_min:()=>Q,_mime:()=>Fr,_maxSize:()=>gr,_maxLength:()=>Dr,_max:()=>M,_map:()=>Z4,_mac:()=>Q$,_lte:()=>M,_lt:()=>y,_lowercase:()=>Ar,_literal:()=>y4,_length:()=>wr,_lazy:()=>$6,_ksuid:()=>Ni,_jwt:()=>Gi,_isoTime:()=>m$,_isoDuration:()=>H$,_isoDateTime:()=>F$,_isoDate:()=>B$,_ipv6:()=>zi,_ipv4:()=>Oi,_intersection:()=>M4,_int64:()=>p$,_int32:()=>d$,_int:()=>R$,_includes:()=>qr,_guid:()=>zn,_gte:()=>Q,_gt:()=>h,_float64:()=>Z$,_float32:()=>x$,_file:()=>Iu,_enum:()=>C4,_endsWith:()=>Yr,_encodeAsync:()=>Mn,_encode:()=>Hn,_emoji:()=>bi,_email:()=>gi,_e164:()=>Li,_discriminatedUnion:()=>T4,_default:()=>s4,_decodeAsync:()=>Rn,_decode:()=>Tn,_date:()=>uu,_custom:()=>cu,_cuid2:()=>ki,_cuid:()=>Ui,_coercedString:()=>q$,_coercedNumber:()=>M$,_coercedDate:()=>gu,_coercedBoolean:()=>y$,_coercedBigint:()=>a$,_cidrv6:()=>Pi,_cidrv4:()=>Si,_check:()=>ol,_catch:()=>i6,_boolean:()=>f$,_bigint:()=>h$,_base64url:()=>Ji,_base64:()=>ji,_array:()=>lu,_any:()=>vu,TimePrecision:()=>Y$,NEVER:()=>Nv,JSONSchemaGenerator:()=>ig,JSONSchema:()=>tl,Doc:()=>an,$output:()=>X$,$input:()=>E$,$constructor:()=>I,$brand:()=>Ov,$ZodXor:()=>bt,$ZodXID:()=>Fo,$ZodVoid:()=>et,$ZodUnknown:()=>ut,$ZodUnion:()=>_n,$ZodUndefined:()=>ot,$ZodUUID:()=>Vo,$ZodURL:()=>Eo,$ZodULID:()=>Yo,$ZodType:()=>S,$ZodTuple:()=>ti,$ZodTransform:()=>St,$ZodTemplateLiteral:()=>Kt,$ZodSymbol:()=>vt,$ZodSuccess:()=>Wt,$ZodStringFormat:()=>G,$ZodString:()=>Ur,$ZodSet:()=>wt,$ZodRegistry:()=>A$,$ZodRecord:()=>kt,$ZodRealError:()=>m,$ZodReadonly:()=>At,$ZodPromise:()=>Qt,$ZodPrefault:()=>Lt,$ZodPipe:()=>Et,$ZodOptional:()=>$i,$ZodObjectJIT:()=>ct,$ZodObject:()=>pe,$ZodNumberFormat:()=>nt,$ZodNumber:()=>vi,$ZodNullable:()=>jt,$ZodNull:()=>tt,$ZodNonOptional:()=>Gt,$ZodNever:()=>gt,$ZodNanoID:()=>Ko,$ZodNaN:()=>Xt,$ZodMap:()=>Dt,$ZodMAC:()=>Zo,$ZodLiteral:()=>Ot,$ZodLazy:()=>Yt,$ZodKSUID:()=>Bo,$ZodJWT:()=>so,$ZodIntersection:()=>Ut,$ZodISOTime:()=>To,$ZodISODuration:()=>Mo,$ZodISODateTime:()=>mo,$ZodISODate:()=>Ho,$ZodIPv6:()=>xo,$ZodIPv4:()=>Ro,$ZodGUID:()=>Wo,$ZodFunction:()=>qt,$ZodFile:()=>zt,$ZodExactOptional:()=>Pt,$ZodError:()=>un,$ZodEnum:()=>Nt,$ZodEncodeError:()=>cr,$ZodEmoji:()=>Ao,$ZodEmail:()=>Xo,$ZodE164:()=>po,$ZodDiscriminatedUnion:()=>_t,$ZodDefault:()=>Jt,$ZodDate:()=>lt,$ZodCustomStringFormat:()=>rt,$ZodCustom:()=>Ft,$ZodCodec:()=>Un,$ZodCheckUpperCase:()=>No,$ZodCheckStringFormat:()=>Vr,$ZodCheckStartsWith:()=>zo,$ZodCheckSizeEquals:()=>bo,$ZodCheckRegex:()=>Do,$ZodCheckProperty:()=>Po,$ZodCheckOverwrite:()=>Jo,$ZodCheckNumberFormat:()=>eo,$ZodCheckMultipleOf:()=>go,$ZodCheckMinSize:()=>co,$ZodCheckMinLength:()=>Uo,$ZodCheckMimeType:()=>jo,$ZodCheckMaxSize:()=>Io,$ZodCheckMaxLength:()=>_o,$ZodCheckLowerCase:()=>wo,$ZodCheckLessThan:()=>yn,$ZodCheckLengthEquals:()=>ko,$ZodCheckIncludes:()=>Oo,$ZodCheckGreaterThan:()=>hn,$ZodCheckEndsWith:()=>So,$ZodCheckBigIntFormat:()=>lo,$ZodCheck:()=>V,$ZodCatch:()=>Vt,$ZodCUID2:()=>Qo,$ZodCUID:()=>qo,$ZodCIDRv6:()=>fo,$ZodCIDRv4:()=>Co,$ZodBoolean:()=>bn,$ZodBigIntFormat:()=>it,$ZodBigInt:()=>oi,$ZodBase64URL:()=>ao,$ZodBase64:()=>ho,$ZodAsyncError:()=>f,$ZodArray:()=>It,$ZodAny:()=>$t});var Nv=Object.freeze({status:"aborted"});function I(r,i,o){function t(u,l){if(!u._zod)Object.defineProperty(u,"_zod",{value:{def:l,constr:$,traits:new Set},enumerable:!1});if(u._zod.traits.has(r))return;u._zod.traits.add(r),i(u,l);let e=$.prototype,c=Object.keys(e);for(let _=0;_<c.length;_++){let N=c[_];if(!(N in u))u[N]=e[N].bind(u)}}let n=o?.Parent??Object;class v extends n{}Object.defineProperty(v,"name",{value:r});function $(u){var l;let e=o?.Parent?new v:this;t(e,u),(l=e._zod).deferred??(l.deferred=[]);for(let c of e._zod.deferred)c();return e}return Object.defineProperty($,"init",{value:t}),Object.defineProperty($,Symbol.hasInstance,{value:(u)=>{if(o?.Parent&&u instanceof o.Parent)return!0;return u?._zod?.traits?.has(r)}}),Object.defineProperty($,"name",{value:r}),$}var Ov=Symbol("zod_brand");class f extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class cr extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`);this.name="ZodEncodeError"}}var sr={};function E(r){if(r)Object.assign(sr,r);return sr}var D={};s(D,{unwrapMessage:()=>rn,uint8ArrayToHex:()=>uc,uint8ArrayToBase64url:()=>tc,uint8ArrayToBase64:()=>Ge,stringifyPrimitive:()=>U,slugify:()=>Pv,shallowClone:()=>Jv,safeExtend:()=>sI,required:()=>ic,randomString:()=>dI,propertyKeyTypes:()=>on,promiseAllObject:()=>ZI,primitiveTypes:()=>Lv,prefixIssues:()=>T,pick:()=>hI,partial:()=>nc,parsedType:()=>k,optionalKeys:()=>Gv,omit:()=>aI,objectClone:()=>MI,numKeys:()=>CI,nullish:()=>vr,normalizeParams:()=>w,mergeDefs:()=>rr,merge:()=>rc,jsonStringifyReplacer:()=>Sr,joinValues:()=>b,issue:()=>jr,isPlainObject:()=>tr,isObject:()=>br,hexToUint8Array:()=>$c,getSizableOrigin:()=>tn,getParsedType:()=>fI,getLengthableOrigin:()=>$n,getEnumValues:()=>nn,getElementAtPath:()=>xI,floatSafeRemainder:()=>Sv,finalizeIssue:()=>B,extend:()=>pI,escapeRegex:()=>R,esc:()=>Yn,defineLazy:()=>j,createTransparentProxy:()=>yI,cloneDef:()=>RI,clone:()=>q,cleanRegex:()=>vn,cleanEnum:()=>vc,captureStackTrace:()=>Fn,cached:()=>Pr,base64urlToUint8Array:()=>oc,base64ToUint8Array:()=>Le,assignProp:()=>or,assertNotEqual:()=>BI,assertNever:()=>HI,assertIs:()=>mI,assertEqual:()=>FI,assert:()=>TI,allowsEval:()=>jv,aborted:()=>$r,NUMBER_FORMAT_RANGES:()=>Wv,Class:()=>We,BIGINT_FORMAT_RANGES:()=>Vv});function FI(r){return r}function BI(r){return r}function mI(r){}function HI(r){throw Error("Unexpected value in exhaustive check")}function TI(r){}function nn(r){let i=Object.values(r).filter((t)=>typeof t==="number");return Object.entries(r).filter(([t,n])=>i.indexOf(+t)===-1).map(([t,n])=>n)}function b(r,i="|"){return r.map((o)=>U(o)).join(i)}function Sr(r,i){if(typeof i==="bigint")return i.toString();return i}function Pr(r){return{get value(){{let o=r();return Object.defineProperty(this,"value",{value:o}),o}throw Error("cached value already set")}}}function vr(r){return r===null||r===void 0}function vn(r){let i=r.startsWith("^")?1:0,o=r.endsWith("$")?r.length-1:r.length;return r.slice(i,o)}function Sv(r,i){let o=(r.toString().split(".")[1]||"").length,t=i.toString(),n=(t.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(t)){let l=t.match(/\d?e-(\d?)/);if(l?.[1])n=Number.parseInt(l[1])}let v=o>n?o:n,$=Number.parseInt(r.toFixed(v).replace(".","")),u=Number.parseInt(i.toFixed(v).replace(".",""));return $%u/10**v}var Je=Symbol("evaluating");function j(r,i,o){let t=void 0;Object.defineProperty(r,i,{get(){if(t===Je)return;if(t===void 0)t=Je,t=o();return t},set(n){Object.defineProperty(r,i,{value:n})},configurable:!0})}function MI(r){return Object.create(Object.getPrototypeOf(r),Object.getOwnPropertyDescriptors(r))}function or(r,i,o){Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}function rr(...r){let i={};for(let o of r){let t=Object.getOwnPropertyDescriptors(o);Object.assign(i,t)}return Object.defineProperties({},i)}function RI(r){return rr(r._zod.def)}function xI(r,i){if(!i)return r;return i.reduce((o,t)=>o?.[t],r)}function ZI(r){let i=Object.keys(r),o=i.map((t)=>r[t]);return Promise.all(o).then((t)=>{let n={};for(let v=0;v<i.length;v++)n[i[v]]=t[v];return n})}function dI(r=10){let o="";for(let t=0;t<r;t++)o+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return o}function Yn(r){return JSON.stringify(r)}function Pv(r){return r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Fn="captureStackTrace"in Error?Error.captureStackTrace:(...r)=>{};function br(r){return typeof r==="object"&&r!==null&&!Array.isArray(r)}var jv=Pr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(r){return!1}});function tr(r){if(br(r)===!1)return!1;let i=r.constructor;if(i===void 0)return!0;if(typeof i!=="function")return!0;let o=i.prototype;if(br(o)===!1)return!1;if(Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)return!1;return!0}function Jv(r){if(tr(r))return{...r};if(Array.isArray(r))return[...r];return r}function CI(r){let i=0;for(let o in r)if(Object.prototype.hasOwnProperty.call(r,o))i++;return i}var fI=(r)=>{let i=typeof r;switch(i){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(r)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(r))return"array";if(r===null)return"null";if(r.then&&typeof r.then==="function"&&r.catch&&typeof r.catch==="function")return"promise";if(typeof Map<"u"&&r instanceof Map)return"map";if(typeof Set<"u"&&r instanceof Set)return"set";if(typeof Date<"u"&&r instanceof Date)return"date";if(typeof File<"u"&&r instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${i}`)}},on=new Set(["string","number","symbol"]),Lv=new Set(["string","number","bigint","boolean","symbol","undefined"]);function R(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(r,i,o){let t=new r._zod.constr(i??r._zod.def);if(!i||o?.parent)t._zod.parent=r;return t}function w(r){let i=r;if(!i)return{};if(typeof i==="string")return{error:()=>i};if(i?.message!==void 0){if(i?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");i.error=i.message}if(delete i.message,typeof i.error==="string")return{...i,error:()=>i.error};return i}function yI(r){let i;return new Proxy({},{get(o,t,n){return i??(i=r()),Reflect.get(i,t,n)},set(o,t,n,v){return i??(i=r()),Reflect.set(i,t,n,v)},has(o,t){return i??(i=r()),Reflect.has(i,t)},deleteProperty(o,t){return i??(i=r()),Reflect.deleteProperty(i,t)},ownKeys(o){return i??(i=r()),Reflect.ownKeys(i)},getOwnPropertyDescriptor(o,t){return i??(i=r()),Reflect.getOwnPropertyDescriptor(i,t)},defineProperty(o,t,n){return i??(i=r()),Reflect.defineProperty(i,t,n)}})}function U(r){if(typeof r==="bigint")return r.toString()+"n";if(typeof r==="string")return`"${r}"`;return`${r}`}function Gv(r){return Object.keys(r).filter((i)=>{return r[i]._zod.optin==="optional"&&r[i]._zod.optout==="optional"})}var Wv={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Vv={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function hI(r,i){let o=r._zod.def,t=o.checks;if(t&&t.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let v=rr(r._zod.def,{get shape(){let $={};for(let u in i){if(!(u in o.shape))throw Error(`Unrecognized key: "${u}"`);if(!i[u])continue;$[u]=o.shape[u]}return or(this,"shape",$),$},checks:[]});return q(r,v)}function aI(r,i){let o=r._zod.def,t=o.checks;if(t&&t.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let v=rr(r._zod.def,{get shape(){let $={...r._zod.def.shape};for(let u in i){if(!(u in o.shape))throw Error(`Unrecognized key: "${u}"`);if(!i[u])continue;delete $[u]}return or(this,"shape",$),$},checks:[]});return q(r,v)}function pI(r,i){if(!tr(i))throw Error("Invalid input to extend: expected a plain object");let o=r._zod.def.checks;if(o&&o.length>0){let v=r._zod.def.shape;for(let $ in i)if(Object.getOwnPropertyDescriptor(v,$)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=rr(r._zod.def,{get shape(){let v={...r._zod.def.shape,...i};return or(this,"shape",v),v}});return q(r,n)}function sI(r,i){if(!tr(i))throw Error("Invalid input to safeExtend: expected a plain object");let o=rr(r._zod.def,{get shape(){let t={...r._zod.def.shape,...i};return or(this,"shape",t),t}});return q(r,o)}function rc(r,i){let o=rr(r._zod.def,{get shape(){let t={...r._zod.def.shape,...i._zod.def.shape};return or(this,"shape",t),t},get catchall(){return i._zod.def.catchall},checks:[]});return q(r,o)}function nc(r,i,o){let n=i._zod.def.checks;if(n&&n.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let $=rr(i._zod.def,{get shape(){let u=i._zod.def.shape,l={...u};if(o)for(let e in o){if(!(e in u))throw Error(`Unrecognized key: "${e}"`);if(!o[e])continue;l[e]=r?new r({type:"optional",innerType:u[e]}):u[e]}else for(let e in u)l[e]=r?new r({type:"optional",innerType:u[e]}):u[e];return or(this,"shape",l),l},checks:[]});return q(i,$)}function ic(r,i,o){let t=rr(i._zod.def,{get shape(){let n=i._zod.def.shape,v={...n};if(o)for(let $ in o){if(!($ in v))throw Error(`Unrecognized key: "${$}"`);if(!o[$])continue;v[$]=new r({type:"nonoptional",innerType:n[$]})}else for(let $ in n)v[$]=new r({type:"nonoptional",innerType:n[$]});return or(this,"shape",v),v}});return q(i,t)}function $r(r,i=0){if(r.aborted===!0)return!0;for(let o=i;o<r.issues.length;o++)if(r.issues[o]?.continue!==!0)return!0;return!1}function T(r,i){return i.map((o)=>{var t;return(t=o).path??(t.path=[]),o.path.unshift(r),o})}function rn(r){return typeof r==="string"?r:r?.message}function B(r,i,o){let t={...r,path:r.path??[]};if(!r.message){let n=rn(r.inst?._zod.def?.error?.(r))??rn(i?.error?.(r))??rn(o.customError?.(r))??rn(o.localeError?.(r))??"Invalid input";t.message=n}if(delete t.inst,delete t.continue,!i?.reportInput)delete t.input;return t}function tn(r){if(r instanceof Set)return"set";if(r instanceof Map)return"map";if(r instanceof File)return"file";return"unknown"}function $n(r){if(Array.isArray(r))return"array";if(typeof r==="string")return"string";return"unknown"}function k(r){let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"nan":"number";case"object":{if(r===null)return"null";if(Array.isArray(r))return"array";let o=r;if(o&&Object.getPrototypeOf(o)!==Object.prototype&&"constructor"in o&&o.constructor)return o.constructor.name}}return i}function jr(...r){let[i,o,t]=r;if(typeof i==="string")return{message:i,code:"custom",input:o,inst:t};return{...i}}function vc(r){return Object.entries(r).filter(([i,o])=>{return Number.isNaN(Number.parseInt(i,10))}).map((i)=>i[1])}function Le(r){let i=atob(r),o=new Uint8Array(i.length);for(let t=0;t<i.length;t++)o[t]=i.charCodeAt(t);return o}function Ge(r){let i="";for(let o=0;o<r.length;o++)i+=String.fromCharCode(r[o]);return btoa(i)}function oc(r){let i=r.replace(/-/g,"+").replace(/_/g,"/"),o="=".repeat((4-i.length%4)%4);return Le(i+o)}function tc(r){return Ge(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function $c(r){let i=r.replace(/^0x/,"");if(i.length%2!==0)throw Error("Invalid hex string length");let o=new Uint8Array(i.length/2);for(let t=0;t<i.length;t+=2)o[t/2]=Number.parseInt(i.slice(t,t+2),16);return o}function uc(r){return Array.from(r).map((i)=>i.toString(16).padStart(2,"0")).join("")}class We{constructor(...r){}}var Ve=(r,i)=>{r.name="$ZodError",Object.defineProperty(r,"_zod",{value:r._zod,enumerable:!1}),Object.defineProperty(r,"issues",{value:i,enumerable:!1}),r.message=JSON.stringify(i,Sr,2),Object.defineProperty(r,"toString",{value:()=>r.message,enumerable:!1})},un=I("$ZodError",Ve),m=I("$ZodError",Ve,{Parent:Error});function gn(r,i=(o)=>o.message){let o={},t=[];for(let n of r.issues)if(n.path.length>0)o[n.path[0]]=o[n.path[0]]||[],o[n.path[0]].push(i(n));else t.push(i(n));return{formErrors:t,fieldErrors:o}}function en(r,i=(o)=>o.message){let o={_errors:[]},t=(n)=>{for(let v of n.issues)if(v.code==="invalid_union"&&v.errors.length)v.errors.map(($)=>t({issues:$}));else if(v.code==="invalid_key")t({issues:v.issues});else if(v.code==="invalid_element")t({issues:v.issues});else if(v.path.length===0)o._errors.push(i(v));else{let $=o,u=0;while(u<v.path.length){let l=v.path[u];if(u!==v.path.length-1)$[l]=$[l]||{_errors:[]};else $[l]=$[l]||{_errors:[]},$[l]._errors.push(i(v));$=$[l],u++}}};return t(r),o}function Xv(r,i=(o)=>o.message){let o={errors:[]},t=(n,v=[])=>{var $,u;for(let l of n.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map((e)=>t({issues:e},l.path));else if(l.code==="invalid_key")t({issues:l.issues},l.path);else if(l.code==="invalid_element")t({issues:l.issues},l.path);else{let e=[...v,...l.path];if(e.length===0){o.errors.push(i(l));continue}let c=o,_=0;while(_<e.length){let N=e[_],O=_===e.length-1;if(typeof N==="string")c.properties??(c.properties={}),($=c.properties)[N]??($[N]={errors:[]}),c=c.properties[N];else c.items??(c.items=[]),(u=c.items)[N]??(u[N]={errors:[]}),c=c.items[N];if(O)c.errors.push(i(l));_++}}};return t(r),o}function Xe(r){let i=[],o=r.map((t)=>typeof t==="object"?t.key:t);for(let t of o)if(typeof t==="number")i.push(`[${t}]`);else if(typeof t==="symbol")i.push(`[${JSON.stringify(String(t))}]`);else if(/[^\w$]/.test(t))i.push(`[${JSON.stringify(t)}]`);else{if(i.length)i.push(".");i.push(t)}return i.join("")}function Ev(r){let i=[],o=[...r.issues].sort((t,n)=>(t.path??[]).length-(n.path??[]).length);for(let t of o)if(i.push(`✖ ${t.message}`),t.path?.length)i.push(` → at ${Xe(t.path)}`);return i.join(`
|
|
1
|
+
var QI=Object.defineProperty;var s=(r,i)=>{for(var o in i)QI(r,o,{get:i[o],enumerable:!0,configurable:!0,set:(t)=>i[o]=()=>t})};import{Protocol as H6}from"@modelcontextprotocol/sdk/shared/protocol.js";import{CallToolRequestSchema as T6,CallToolResultSchema as M6,EmptyResultSchema as R6,ListToolsRequestSchema as x6,PingRequestSchema as Z6}from"@modelcontextprotocol/sdk/types.js";import{JSONRPCMessageSchema as YI}from"@modelcontextprotocol/sdk/types.js";class Qn{eventTarget;eventSource;messageListener;constructor(r=window.parent,i){this.eventTarget=r;this.eventSource=i;this.messageListener=(o)=>{if(i&&o.source!==this.eventSource){console.debug("Ignoring message from unknown source",o);return}let t=YI.safeParse(o.data);if(t.success)console.debug("Parsed message",t.data),this.onmessage?.(t.data);else console.error("Failed to parse message",t.error.message,o),this.onerror?.(Error("Invalid JSON-RPC message received: "+t.error.message))}}async start(){window.addEventListener("message",this.messageListener)}async send(r,i){console.debug("Sending message",r),this.eventTarget.postMessage(r,"*")}async close(){window.removeEventListener("message",this.messageListener),this.onclose?.()}onclose;onerror;onmessage;sessionId;setProtocolVersion}var wv="2026-01-26";var g={};s(g,{xor:()=>al,xid:()=>Ol,void:()=>Zl,uuidv7:()=>cl,uuidv6:()=>Il,uuidv4:()=>ll,uuid:()=>el,util:()=>D,url:()=>bl,uppercase:()=>Kr,unknown:()=>Nr,union:()=>ev,undefined:()=>Rl,ulid:()=>Nl,uint64:()=>Tl,uint32:()=>Bl,tuple:()=>Yg,trim:()=>mr,treeifyError:()=>Xv,transform:()=>Iv,toUpperCase:()=>Tr,toLowerCase:()=>Hr,toJSONSchema:()=>Yi,templateLiteral:()=>lI,symbol:()=>Ml,superRefine:()=>ee,success:()=>uI,stringbool:()=>wI,stringFormat:()=>El,string:()=>Mi,strictObject:()=>yl,startsWith:()=>Qr,slugify:()=>Mr,size:()=>kr,setErrorMap:()=>b6,set:()=>iI,safeParseAsync:()=>lg,safeParse:()=>eg,safeEncodeAsync:()=>Dg,safeEncode:()=>Ug,safeDecodeAsync:()=>wg,safeDecode:()=>kg,registry:()=>ui,regexes:()=>x,regex:()=>Er,refine:()=>ge,record:()=>Fg,readonly:()=>ie,property:()=>Ai,promise:()=>II,prettifyError:()=>Ev,preprocess:()=>OI,prefault:()=>yg,positive:()=>Wi,pipe:()=>Gn,partialRecord:()=>sl,parseAsync:()=>gg,parse:()=>ug,overwrite:()=>d,optional:()=>Jn,object:()=>fl,number:()=>Og,nullish:()=>$I,nullable:()=>Ln,null:()=>Jg,normalize:()=>Br,nonpositive:()=>Xi,nonoptional:()=>hg,nonnegative:()=>Ei,never:()=>gv,negative:()=>Vi,nativeEnum:()=>vI,nanoid:()=>kl,nan:()=>gI,multipleOf:()=>ur,minSize:()=>a,minLength:()=>nr,mime:()=>Fr,meta:()=>kI,maxSize:()=>gr,maxLength:()=>Dr,map:()=>nI,mac:()=>Pl,lte:()=>M,lt:()=>y,lowercase:()=>Ar,looseRecord:()=>rI,looseObject:()=>hl,locales:()=>On,literal:()=>oI,length:()=>wr,lazy:()=>te,ksuid:()=>zl,keyof:()=>Cl,jwt:()=>Xl,json:()=>NI,iso:()=>Zr,ipv6:()=>jl,ipv4:()=>Sl,intersection:()=>qg,int64:()=>Hl,int32:()=>Fl,int:()=>Ri,instanceof:()=>DI,includes:()=>qr,httpUrl:()=>_l,hostname:()=>Al,hex:()=>Kl,hash:()=>ql,guid:()=>gl,gte:()=>Q,gt:()=>h,globalRegistry:()=>A,getErrorMap:()=>_6,function:()=>cI,fromJSONSchema:()=>SI,formatError:()=>en,float64:()=>Yl,float32:()=>Ql,flattenError:()=>gn,file:()=>tI,exactOptional:()=>xg,enum:()=>lv,endsWith:()=>Yr,encodeAsync:()=>bg,encode:()=>Ig,emoji:()=>Ul,email:()=>ul,e164:()=>Vl,discriminatedUnion:()=>pl,describe:()=>UI,decodeAsync:()=>_g,decode:()=>cg,date:()=>dl,custom:()=>_I,cuid2:()=>wl,cuid:()=>Dl,core:()=>ir,config:()=>E,coerce:()=>Ie,codec:()=>eI,clone:()=>q,cidrv6:()=>Ll,cidrv4:()=>Jl,check:()=>bI,catch:()=>sg,boolean:()=>zg,bigint:()=>ml,base64url:()=>Wl,base64:()=>Gl,array:()=>Xn,any:()=>xl,_function:()=>cI,_default:()=>Cg,_ZodString:()=>xi,ZodXor:()=>Eg,ZodXID:()=>ai,ZodVoid:()=>Vg,ZodUnknown:()=>Gg,ZodUnion:()=>An,ZodUndefined:()=>Pg,ZodUUID:()=>p,ZodURL:()=>Wn,ZodULID:()=>hi,ZodType:()=>P,ZodTuple:()=>Qg,ZodTransform:()=>Mg,ZodTemplateLiteral:()=>ve,ZodSymbol:()=>Sg,ZodSuccess:()=>ag,ZodStringFormat:()=>W,ZodString:()=>Cr,ZodSet:()=>mg,ZodRecord:()=>Kn,ZodRealError:()=>H,ZodReadonly:()=>ne,ZodPromise:()=>$e,ZodPrefault:()=>fg,ZodPipe:()=>_v,ZodOptional:()=>cv,ZodObject:()=>En,ZodNumberFormat:()=>Or,ZodNumber:()=>yr,ZodNullable:()=>Zg,ZodNull:()=>jg,ZodNonOptional:()=>bv,ZodNever:()=>Wg,ZodNanoID:()=>Ci,ZodNaN:()=>re,ZodMap:()=>Bg,ZodMAC:()=>Ng,ZodLiteral:()=>Hg,ZodLazy:()=>oe,ZodKSUID:()=>pi,ZodJWT:()=>$v,ZodIssueCode:()=>c6,ZodIntersection:()=>Kg,ZodISOTime:()=>Hi,ZodISODuration:()=>Ti,ZodISODateTime:()=>Bi,ZodISODate:()=>mi,ZodIPv6:()=>rv,ZodIPv4:()=>si,ZodGUID:()=>jn,ZodFunction:()=>ue,ZodFirstPartyTypeKind:()=>le,ZodFile:()=>Tg,ZodExactOptional:()=>Rg,ZodError:()=>l6,ZodEnum:()=>dr,ZodEmoji:()=>di,ZodEmail:()=>Zi,ZodE164:()=>tv,ZodDiscriminatedUnion:()=>Ag,ZodDefault:()=>dg,ZodDate:()=>Vn,ZodCustomStringFormat:()=>fr,ZodCustom:()=>qn,ZodCodec:()=>Uv,ZodCatch:()=>pg,ZodCUID2:()=>yi,ZodCUID:()=>fi,ZodCIDRv6:()=>iv,ZodCIDRv4:()=>nv,ZodBoolean:()=>hr,ZodBigIntFormat:()=>uv,ZodBigInt:()=>ar,ZodBase64URL:()=>ov,ZodBase64:()=>vv,ZodArray:()=>Xg,ZodAny:()=>Lg,TimePrecision:()=>Y$,NEVER:()=>Nv,$output:()=>X$,$input:()=>E$,$brand:()=>Ov});var ir={};s(ir,{version:()=>Lo,util:()=>D,treeifyError:()=>Xv,toJSONSchema:()=>Yi,toDotPath:()=>Xe,safeParseAsync:()=>Kv,safeParse:()=>Av,safeEncodeAsync:()=>Uc,safeEncode:()=>bc,safeDecodeAsync:()=>kc,safeDecode:()=>_c,registry:()=>ui,regexes:()=>x,process:()=>L,prettifyError:()=>Ev,parseAsync:()=>mn,parse:()=>Bn,meta:()=>ku,locales:()=>On,isValidJWT:()=>ye,isValidBase64URL:()=>fe,isValidBase64:()=>yo,initializeContext:()=>er,globalRegistry:()=>A,globalConfig:()=>sr,formatError:()=>en,flattenError:()=>gn,finalize:()=>Ir,extractDefs:()=>lr,encodeAsync:()=>Ic,encode:()=>ec,describe:()=>Uu,decodeAsync:()=>cc,decode:()=>lc,createToJSONSchemaMethod:()=>wu,createStandardJSONSchemaMethod:()=>xr,config:()=>E,clone:()=>q,_xor:()=>H4,_xid:()=>wi,_void:()=>$u,_uuidv7:()=>ci,_uuidv6:()=>Ii,_uuidv4:()=>li,_uuid:()=>ei,_url:()=>Sn,_uppercase:()=>Kr,_unknown:()=>ou,_union:()=>m4,_undefined:()=>nu,_ulid:()=>Di,_uint64:()=>s$,_uint32:()=>C$,_tuple:()=>R4,_trim:()=>mr,_transform:()=>h4,_toUpperCase:()=>Tr,_toLowerCase:()=>Hr,_templateLiteral:()=>t6,_symbol:()=>ru,_superRefine:()=>_u,_success:()=>n6,_stringbool:()=>Du,_stringFormat:()=>Rr,_string:()=>K$,_startsWith:()=>Qr,_slugify:()=>Mr,_size:()=>kr,_set:()=>d4,_safeParseAsync:()=>Wr,_safeParse:()=>Gr,_safeEncodeAsync:()=>dn,_safeEncode:()=>xn,_safeDecodeAsync:()=>Cn,_safeDecode:()=>Zn,_regex:()=>Er,_refine:()=>bu,_record:()=>x4,_readonly:()=>o6,_property:()=>Ai,_promise:()=>u6,_positive:()=>Wi,_pipe:()=>v6,_parseAsync:()=>Lr,_parse:()=>Jr,_overwrite:()=>d,_optional:()=>a4,_number:()=>T$,_nullable:()=>p4,_null:()=>iu,_normalize:()=>Br,_nonpositive:()=>Xi,_nonoptional:()=>r6,_nonnegative:()=>Ei,_never:()=>tu,_negative:()=>Vi,_nativeEnum:()=>f4,_nanoid:()=>_i,_nan:()=>eu,_multipleOf:()=>ur,_minSize:()=>a,_minLength:()=>nr,_min:()=>Q,_mime:()=>Fr,_maxSize:()=>gr,_maxLength:()=>Dr,_max:()=>M,_map:()=>Z4,_mac:()=>Q$,_lte:()=>M,_lt:()=>y,_lowercase:()=>Ar,_literal:()=>y4,_length:()=>wr,_lazy:()=>$6,_ksuid:()=>Ni,_jwt:()=>Gi,_isoTime:()=>m$,_isoDuration:()=>H$,_isoDateTime:()=>F$,_isoDate:()=>B$,_ipv6:()=>zi,_ipv4:()=>Oi,_intersection:()=>M4,_int64:()=>p$,_int32:()=>d$,_int:()=>R$,_includes:()=>qr,_guid:()=>zn,_gte:()=>Q,_gt:()=>h,_float64:()=>Z$,_float32:()=>x$,_file:()=>Iu,_enum:()=>C4,_endsWith:()=>Yr,_encodeAsync:()=>Mn,_encode:()=>Hn,_emoji:()=>bi,_email:()=>gi,_e164:()=>Li,_discriminatedUnion:()=>T4,_default:()=>s4,_decodeAsync:()=>Rn,_decode:()=>Tn,_date:()=>uu,_custom:()=>cu,_cuid2:()=>ki,_cuid:()=>Ui,_coercedString:()=>q$,_coercedNumber:()=>M$,_coercedDate:()=>gu,_coercedBoolean:()=>y$,_coercedBigint:()=>a$,_cidrv6:()=>Pi,_cidrv4:()=>Si,_check:()=>ol,_catch:()=>i6,_boolean:()=>f$,_bigint:()=>h$,_base64url:()=>Ji,_base64:()=>ji,_array:()=>lu,_any:()=>vu,TimePrecision:()=>Y$,NEVER:()=>Nv,JSONSchemaGenerator:()=>ig,JSONSchema:()=>tl,Doc:()=>an,$output:()=>X$,$input:()=>E$,$constructor:()=>I,$brand:()=>Ov,$ZodXor:()=>bt,$ZodXID:()=>Fo,$ZodVoid:()=>et,$ZodUnknown:()=>ut,$ZodUnion:()=>_n,$ZodUndefined:()=>ot,$ZodUUID:()=>Vo,$ZodURL:()=>Eo,$ZodULID:()=>Yo,$ZodType:()=>S,$ZodTuple:()=>ti,$ZodTransform:()=>St,$ZodTemplateLiteral:()=>Kt,$ZodSymbol:()=>vt,$ZodSuccess:()=>Wt,$ZodStringFormat:()=>G,$ZodString:()=>Ur,$ZodSet:()=>wt,$ZodRegistry:()=>A$,$ZodRecord:()=>kt,$ZodRealError:()=>m,$ZodReadonly:()=>At,$ZodPromise:()=>Qt,$ZodPrefault:()=>Lt,$ZodPipe:()=>Et,$ZodOptional:()=>$i,$ZodObjectJIT:()=>ct,$ZodObject:()=>pe,$ZodNumberFormat:()=>nt,$ZodNumber:()=>vi,$ZodNullable:()=>jt,$ZodNull:()=>tt,$ZodNonOptional:()=>Gt,$ZodNever:()=>gt,$ZodNanoID:()=>Ko,$ZodNaN:()=>Xt,$ZodMap:()=>Dt,$ZodMAC:()=>Zo,$ZodLiteral:()=>Ot,$ZodLazy:()=>Yt,$ZodKSUID:()=>Bo,$ZodJWT:()=>so,$ZodIntersection:()=>Ut,$ZodISOTime:()=>To,$ZodISODuration:()=>Mo,$ZodISODateTime:()=>mo,$ZodISODate:()=>Ho,$ZodIPv6:()=>xo,$ZodIPv4:()=>Ro,$ZodGUID:()=>Wo,$ZodFunction:()=>qt,$ZodFile:()=>zt,$ZodExactOptional:()=>Pt,$ZodError:()=>un,$ZodEnum:()=>Nt,$ZodEncodeError:()=>cr,$ZodEmoji:()=>Ao,$ZodEmail:()=>Xo,$ZodE164:()=>po,$ZodDiscriminatedUnion:()=>_t,$ZodDefault:()=>Jt,$ZodDate:()=>lt,$ZodCustomStringFormat:()=>rt,$ZodCustom:()=>Ft,$ZodCodec:()=>Un,$ZodCheckUpperCase:()=>No,$ZodCheckStringFormat:()=>Vr,$ZodCheckStartsWith:()=>zo,$ZodCheckSizeEquals:()=>bo,$ZodCheckRegex:()=>Do,$ZodCheckProperty:()=>Po,$ZodCheckOverwrite:()=>Jo,$ZodCheckNumberFormat:()=>eo,$ZodCheckMultipleOf:()=>go,$ZodCheckMinSize:()=>co,$ZodCheckMinLength:()=>Uo,$ZodCheckMimeType:()=>jo,$ZodCheckMaxSize:()=>Io,$ZodCheckMaxLength:()=>_o,$ZodCheckLowerCase:()=>wo,$ZodCheckLessThan:()=>yn,$ZodCheckLengthEquals:()=>ko,$ZodCheckIncludes:()=>Oo,$ZodCheckGreaterThan:()=>hn,$ZodCheckEndsWith:()=>So,$ZodCheckBigIntFormat:()=>lo,$ZodCheck:()=>V,$ZodCatch:()=>Vt,$ZodCUID2:()=>Qo,$ZodCUID:()=>qo,$ZodCIDRv6:()=>fo,$ZodCIDRv4:()=>Co,$ZodBoolean:()=>bn,$ZodBigIntFormat:()=>it,$ZodBigInt:()=>oi,$ZodBase64URL:()=>ao,$ZodBase64:()=>ho,$ZodAsyncError:()=>f,$ZodArray:()=>It,$ZodAny:()=>$t});var Nv=Object.freeze({status:"aborted"});function I(r,i,o){function t(u,l){if(!u._zod)Object.defineProperty(u,"_zod",{value:{def:l,constr:$,traits:new Set},enumerable:!1});if(u._zod.traits.has(r))return;u._zod.traits.add(r),i(u,l);let e=$.prototype,c=Object.keys(e);for(let _=0;_<c.length;_++){let N=c[_];if(!(N in u))u[N]=e[N].bind(u)}}let n=o?.Parent??Object;class v extends n{}Object.defineProperty(v,"name",{value:r});function $(u){var l;let e=o?.Parent?new v:this;t(e,u),(l=e._zod).deferred??(l.deferred=[]);for(let c of e._zod.deferred)c();return e}return Object.defineProperty($,"init",{value:t}),Object.defineProperty($,Symbol.hasInstance,{value:(u)=>{if(o?.Parent&&u instanceof o.Parent)return!0;return u?._zod?.traits?.has(r)}}),Object.defineProperty($,"name",{value:r}),$}var Ov=Symbol("zod_brand");class f extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class cr extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`);this.name="ZodEncodeError"}}var sr={};function E(r){if(r)Object.assign(sr,r);return sr}var D={};s(D,{unwrapMessage:()=>rn,uint8ArrayToHex:()=>uc,uint8ArrayToBase64url:()=>tc,uint8ArrayToBase64:()=>Ge,stringifyPrimitive:()=>U,slugify:()=>Pv,shallowClone:()=>Jv,safeExtend:()=>sI,required:()=>ic,randomString:()=>dI,propertyKeyTypes:()=>on,promiseAllObject:()=>ZI,primitiveTypes:()=>Lv,prefixIssues:()=>T,pick:()=>hI,partial:()=>nc,parsedType:()=>k,optionalKeys:()=>Gv,omit:()=>aI,objectClone:()=>MI,numKeys:()=>CI,nullish:()=>vr,normalizeParams:()=>w,mergeDefs:()=>rr,merge:()=>rc,jsonStringifyReplacer:()=>Sr,joinValues:()=>b,issue:()=>jr,isPlainObject:()=>tr,isObject:()=>br,hexToUint8Array:()=>$c,getSizableOrigin:()=>tn,getParsedType:()=>fI,getLengthableOrigin:()=>$n,getEnumValues:()=>nn,getElementAtPath:()=>xI,floatSafeRemainder:()=>Sv,finalizeIssue:()=>B,extend:()=>pI,escapeRegex:()=>R,esc:()=>Yn,defineLazy:()=>j,createTransparentProxy:()=>yI,cloneDef:()=>RI,clone:()=>q,cleanRegex:()=>vn,cleanEnum:()=>vc,captureStackTrace:()=>Fn,cached:()=>Pr,base64urlToUint8Array:()=>oc,base64ToUint8Array:()=>Le,assignProp:()=>or,assertNotEqual:()=>BI,assertNever:()=>HI,assertIs:()=>mI,assertEqual:()=>FI,assert:()=>TI,allowsEval:()=>jv,aborted:()=>$r,NUMBER_FORMAT_RANGES:()=>Wv,Class:()=>We,BIGINT_FORMAT_RANGES:()=>Vv});function FI(r){return r}function BI(r){return r}function mI(r){}function HI(r){throw Error("Unexpected value in exhaustive check")}function TI(r){}function nn(r){let i=Object.values(r).filter((t)=>typeof t==="number");return Object.entries(r).filter(([t,n])=>i.indexOf(+t)===-1).map(([t,n])=>n)}function b(r,i="|"){return r.map((o)=>U(o)).join(i)}function Sr(r,i){if(typeof i==="bigint")return i.toString();return i}function Pr(r){return{get value(){{let o=r();return Object.defineProperty(this,"value",{value:o}),o}throw Error("cached value already set")}}}function vr(r){return r===null||r===void 0}function vn(r){let i=r.startsWith("^")?1:0,o=r.endsWith("$")?r.length-1:r.length;return r.slice(i,o)}function Sv(r,i){let o=(r.toString().split(".")[1]||"").length,t=i.toString(),n=(t.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(t)){let l=t.match(/\d?e-(\d?)/);if(l?.[1])n=Number.parseInt(l[1])}let v=o>n?o:n,$=Number.parseInt(r.toFixed(v).replace(".","")),u=Number.parseInt(i.toFixed(v).replace(".",""));return $%u/10**v}var Je=Symbol("evaluating");function j(r,i,o){let t=void 0;Object.defineProperty(r,i,{get(){if(t===Je)return;if(t===void 0)t=Je,t=o();return t},set(n){Object.defineProperty(r,i,{value:n})},configurable:!0})}function MI(r){return Object.create(Object.getPrototypeOf(r),Object.getOwnPropertyDescriptors(r))}function or(r,i,o){Object.defineProperty(r,i,{value:o,writable:!0,enumerable:!0,configurable:!0})}function rr(...r){let i={};for(let o of r){let t=Object.getOwnPropertyDescriptors(o);Object.assign(i,t)}return Object.defineProperties({},i)}function RI(r){return rr(r._zod.def)}function xI(r,i){if(!i)return r;return i.reduce((o,t)=>o?.[t],r)}function ZI(r){let i=Object.keys(r),o=i.map((t)=>r[t]);return Promise.all(o).then((t)=>{let n={};for(let v=0;v<i.length;v++)n[i[v]]=t[v];return n})}function dI(r=10){let o="";for(let t=0;t<r;t++)o+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return o}function Yn(r){return JSON.stringify(r)}function Pv(r){return r.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Fn="captureStackTrace"in Error?Error.captureStackTrace:(...r)=>{};function br(r){return typeof r==="object"&&r!==null&&!Array.isArray(r)}var jv=Pr(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(r){return!1}});function tr(r){if(br(r)===!1)return!1;let i=r.constructor;if(i===void 0)return!0;if(typeof i!=="function")return!0;let o=i.prototype;if(br(o)===!1)return!1;if(Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")===!1)return!1;return!0}function Jv(r){if(tr(r))return{...r};if(Array.isArray(r))return[...r];return r}function CI(r){let i=0;for(let o in r)if(Object.prototype.hasOwnProperty.call(r,o))i++;return i}var fI=(r)=>{let i=typeof r;switch(i){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(r)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(r))return"array";if(r===null)return"null";if(r.then&&typeof r.then==="function"&&r.catch&&typeof r.catch==="function")return"promise";if(typeof Map<"u"&&r instanceof Map)return"map";if(typeof Set<"u"&&r instanceof Set)return"set";if(typeof Date<"u"&&r instanceof Date)return"date";if(typeof File<"u"&&r instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${i}`)}},on=new Set(["string","number","symbol"]),Lv=new Set(["string","number","bigint","boolean","symbol","undefined"]);function R(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function q(r,i,o){let t=new r._zod.constr(i??r._zod.def);if(!i||o?.parent)t._zod.parent=r;return t}function w(r){let i=r;if(!i)return{};if(typeof i==="string")return{error:()=>i};if(i?.message!==void 0){if(i?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");i.error=i.message}if(delete i.message,typeof i.error==="string")return{...i,error:()=>i.error};return i}function yI(r){let i;return new Proxy({},{get(o,t,n){return i??(i=r()),Reflect.get(i,t,n)},set(o,t,n,v){return i??(i=r()),Reflect.set(i,t,n,v)},has(o,t){return i??(i=r()),Reflect.has(i,t)},deleteProperty(o,t){return i??(i=r()),Reflect.deleteProperty(i,t)},ownKeys(o){return i??(i=r()),Reflect.ownKeys(i)},getOwnPropertyDescriptor(o,t){return i??(i=r()),Reflect.getOwnPropertyDescriptor(i,t)},defineProperty(o,t,n){return i??(i=r()),Reflect.defineProperty(i,t,n)}})}function U(r){if(typeof r==="bigint")return r.toString()+"n";if(typeof r==="string")return`"${r}"`;return`${r}`}function Gv(r){return Object.keys(r).filter((i)=>{return r[i]._zod.optin==="optional"&&r[i]._zod.optout==="optional"})}var Wv={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Vv={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function hI(r,i){let o=r._zod.def,t=o.checks;if(t&&t.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let v=rr(r._zod.def,{get shape(){let $={};for(let u in i){if(!(u in o.shape))throw Error(`Unrecognized key: "${u}"`);if(!i[u])continue;$[u]=o.shape[u]}return or(this,"shape",$),$},checks:[]});return q(r,v)}function aI(r,i){let o=r._zod.def,t=o.checks;if(t&&t.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let v=rr(r._zod.def,{get shape(){let $={...r._zod.def.shape};for(let u in i){if(!(u in o.shape))throw Error(`Unrecognized key: "${u}"`);if(!i[u])continue;delete $[u]}return or(this,"shape",$),$},checks:[]});return q(r,v)}function pI(r,i){if(!tr(i))throw Error("Invalid input to extend: expected a plain object");let o=r._zod.def.checks;if(o&&o.length>0){let v=r._zod.def.shape;for(let $ in i)if(Object.getOwnPropertyDescriptor(v,$)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=rr(r._zod.def,{get shape(){let v={...r._zod.def.shape,...i};return or(this,"shape",v),v}});return q(r,n)}function sI(r,i){if(!tr(i))throw Error("Invalid input to safeExtend: expected a plain object");let o=rr(r._zod.def,{get shape(){let t={...r._zod.def.shape,...i};return or(this,"shape",t),t}});return q(r,o)}function rc(r,i){let o=rr(r._zod.def,{get shape(){let t={...r._zod.def.shape,...i._zod.def.shape};return or(this,"shape",t),t},get catchall(){return i._zod.def.catchall},checks:[]});return q(r,o)}function nc(r,i,o){let n=i._zod.def.checks;if(n&&n.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let $=rr(i._zod.def,{get shape(){let u=i._zod.def.shape,l={...u};if(o)for(let e in o){if(!(e in u))throw Error(`Unrecognized key: "${e}"`);if(!o[e])continue;l[e]=r?new r({type:"optional",innerType:u[e]}):u[e]}else for(let e in u)l[e]=r?new r({type:"optional",innerType:u[e]}):u[e];return or(this,"shape",l),l},checks:[]});return q(i,$)}function ic(r,i,o){let t=rr(i._zod.def,{get shape(){let n=i._zod.def.shape,v={...n};if(o)for(let $ in o){if(!($ in v))throw Error(`Unrecognized key: "${$}"`);if(!o[$])continue;v[$]=new r({type:"nonoptional",innerType:n[$]})}else for(let $ in n)v[$]=new r({type:"nonoptional",innerType:n[$]});return or(this,"shape",v),v}});return q(i,t)}function $r(r,i=0){if(r.aborted===!0)return!0;for(let o=i;o<r.issues.length;o++)if(r.issues[o]?.continue!==!0)return!0;return!1}function T(r,i){return i.map((o)=>{var t;return(t=o).path??(t.path=[]),o.path.unshift(r),o})}function rn(r){return typeof r==="string"?r:r?.message}function B(r,i,o){let t={...r,path:r.path??[]};if(!r.message){let n=rn(r.inst?._zod.def?.error?.(r))??rn(i?.error?.(r))??rn(o.customError?.(r))??rn(o.localeError?.(r))??"Invalid input";t.message=n}if(delete t.inst,delete t.continue,!i?.reportInput)delete t.input;return t}function tn(r){if(r instanceof Set)return"set";if(r instanceof Map)return"map";if(r instanceof File)return"file";return"unknown"}function $n(r){if(Array.isArray(r))return"array";if(typeof r==="string")return"string";return"unknown"}function k(r){let i=typeof r;switch(i){case"number":return Number.isNaN(r)?"nan":"number";case"object":{if(r===null)return"null";if(Array.isArray(r))return"array";let o=r;if(o&&Object.getPrototypeOf(o)!==Object.prototype&&"constructor"in o&&o.constructor)return o.constructor.name}}return i}function jr(...r){let[i,o,t]=r;if(typeof i==="string")return{message:i,code:"custom",input:o,inst:t};return{...i}}function vc(r){return Object.entries(r).filter(([i,o])=>{return Number.isNaN(Number.parseInt(i,10))}).map((i)=>i[1])}function Le(r){let i=atob(r),o=new Uint8Array(i.length);for(let t=0;t<i.length;t++)o[t]=i.charCodeAt(t);return o}function Ge(r){let i="";for(let o=0;o<r.length;o++)i+=String.fromCharCode(r[o]);return btoa(i)}function oc(r){let i=r.replace(/-/g,"+").replace(/_/g,"/"),o="=".repeat((4-i.length%4)%4);return Le(i+o)}function tc(r){return Ge(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function $c(r){let i=r.replace(/^0x/,"");if(i.length%2!==0)throw Error("Invalid hex string length");let o=new Uint8Array(i.length/2);for(let t=0;t<i.length;t+=2)o[t/2]=Number.parseInt(i.slice(t,t+2),16);return o}function uc(r){return Array.from(r).map((i)=>i.toString(16).padStart(2,"0")).join("")}class We{constructor(...r){}}var Ve=(r,i)=>{r.name="$ZodError",Object.defineProperty(r,"_zod",{value:r._zod,enumerable:!1}),Object.defineProperty(r,"issues",{value:i,enumerable:!1}),r.message=JSON.stringify(i,Sr,2),Object.defineProperty(r,"toString",{value:()=>r.message,enumerable:!1})},un=I("$ZodError",Ve),m=I("$ZodError",Ve,{Parent:Error});function gn(r,i=(o)=>o.message){let o={},t=[];for(let n of r.issues)if(n.path.length>0)o[n.path[0]]=o[n.path[0]]||[],o[n.path[0]].push(i(n));else t.push(i(n));return{formErrors:t,fieldErrors:o}}function en(r,i=(o)=>o.message){let o={_errors:[]},t=(n)=>{for(let v of n.issues)if(v.code==="invalid_union"&&v.errors.length)v.errors.map(($)=>t({issues:$}));else if(v.code==="invalid_key")t({issues:v.issues});else if(v.code==="invalid_element")t({issues:v.issues});else if(v.path.length===0)o._errors.push(i(v));else{let $=o,u=0;while(u<v.path.length){let l=v.path[u];if(u!==v.path.length-1)$[l]=$[l]||{_errors:[]};else $[l]=$[l]||{_errors:[]},$[l]._errors.push(i(v));$=$[l],u++}}};return t(r),o}function Xv(r,i=(o)=>o.message){let o={errors:[]},t=(n,v=[])=>{var $,u;for(let l of n.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map((e)=>t({issues:e},l.path));else if(l.code==="invalid_key")t({issues:l.issues},l.path);else if(l.code==="invalid_element")t({issues:l.issues},l.path);else{let e=[...v,...l.path];if(e.length===0){o.errors.push(i(l));continue}let c=o,_=0;while(_<e.length){let N=e[_],O=_===e.length-1;if(typeof N==="string")c.properties??(c.properties={}),($=c.properties)[N]??($[N]={errors:[]}),c=c.properties[N];else c.items??(c.items=[]),(u=c.items)[N]??(u[N]={errors:[]}),c=c.items[N];if(O)c.errors.push(i(l));_++}}};return t(r),o}function Xe(r){let i=[],o=r.map((t)=>typeof t==="object"?t.key:t);for(let t of o)if(typeof t==="number")i.push(`[${t}]`);else if(typeof t==="symbol")i.push(`[${JSON.stringify(String(t))}]`);else if(/[^\w$]/.test(t))i.push(`[${JSON.stringify(t)}]`);else{if(i.length)i.push(".");i.push(t)}return i.join("")}function Ev(r){let i=[],o=[...r.issues].sort((t,n)=>(t.path??[]).length-(n.path??[]).length);for(let t of o)if(i.push(`✖ ${t.message}`),t.path?.length)i.push(` → at ${Xe(t.path)}`);return i.join(`
|
|
2
2
|
`)}var Jr=(r)=>(i,o,t,n)=>{let v=t?Object.assign(t,{async:!1}):{async:!1},$=i._zod.run({value:o,issues:[]},v);if($ instanceof Promise)throw new f;if($.issues.length){let u=new(n?.Err??r)($.issues.map((l)=>B(l,v,E())));throw Fn(u,n?.callee),u}return $.value},Bn=Jr(m),Lr=(r)=>async(i,o,t,n)=>{let v=t?Object.assign(t,{async:!0}):{async:!0},$=i._zod.run({value:o,issues:[]},v);if($ instanceof Promise)$=await $;if($.issues.length){let u=new(n?.Err??r)($.issues.map((l)=>B(l,v,E())));throw Fn(u,n?.callee),u}return $.value},mn=Lr(m),Gr=(r)=>(i,o,t)=>{let n=t?{...t,async:!1}:{async:!1},v=i._zod.run({value:o,issues:[]},n);if(v instanceof Promise)throw new f;return v.issues.length?{success:!1,error:new(r??un)(v.issues.map(($)=>B($,n,E())))}:{success:!0,data:v.value}},Av=Gr(m),Wr=(r)=>async(i,o,t)=>{let n=t?Object.assign(t,{async:!0}):{async:!0},v=i._zod.run({value:o,issues:[]},n);if(v instanceof Promise)v=await v;return v.issues.length?{success:!1,error:new r(v.issues.map(($)=>B($,n,E())))}:{success:!0,data:v.value}},Kv=Wr(m),Hn=(r)=>(i,o,t)=>{let n=t?Object.assign(t,{direction:"backward"}):{direction:"backward"};return Jr(r)(i,o,n)},ec=Hn(m),Tn=(r)=>(i,o,t)=>{return Jr(r)(i,o,t)},lc=Tn(m),Mn=(r)=>async(i,o,t)=>{let n=t?Object.assign(t,{direction:"backward"}):{direction:"backward"};return Lr(r)(i,o,n)},Ic=Mn(m),Rn=(r)=>async(i,o,t)=>{return Lr(r)(i,o,t)},cc=Rn(m),xn=(r)=>(i,o,t)=>{let n=t?Object.assign(t,{direction:"backward"}):{direction:"backward"};return Gr(r)(i,o,n)},bc=xn(m),Zn=(r)=>(i,o,t)=>{return Gr(r)(i,o,t)},_c=Zn(m),dn=(r)=>async(i,o,t)=>{let n=t?Object.assign(t,{direction:"backward"}):{direction:"backward"};return Wr(r)(i,o,n)},Uc=dn(m),Cn=(r)=>async(i,o,t)=>{return Wr(r)(i,o,t)},kc=Cn(m);var x={};s(x,{xid:()=>Fv,uuid7:()=>Oc,uuid6:()=>Nc,uuid4:()=>wc,uuid:()=>_r,uppercase:()=>uo,unicodeEmail:()=>Ee,undefined:()=>to,ulid:()=>Yv,time:()=>pv,string:()=>ro,sha512_hex:()=>Tc,sha512_base64url:()=>Rc,sha512_base64:()=>Mc,sha384_hex:()=>Bc,sha384_base64url:()=>Hc,sha384_base64:()=>mc,sha256_hex:()=>Qc,sha256_base64url:()=>Fc,sha256_base64:()=>Yc,sha1_hex:()=>Ac,sha1_base64url:()=>qc,sha1_base64:()=>Kc,rfc5322Email:()=>Sc,number:()=>ln,null:()=>oo,nanoid:()=>mv,md5_hex:()=>Vc,md5_base64url:()=>Ec,md5_base64:()=>Xc,mac:()=>dv,lowercase:()=>$o,ksuid:()=>Bv,ipv6:()=>Zv,ipv4:()=>xv,integer:()=>io,idnEmail:()=>Pc,html5Email:()=>zc,hostname:()=>Lc,hex:()=>Wc,guid:()=>Tv,extendedDuration:()=>Dc,emoji:()=>Rv,email:()=>Mv,e164:()=>hv,duration:()=>Hv,domain:()=>Gc,datetime:()=>sv,date:()=>av,cuid2:()=>Qv,cuid:()=>qv,cidrv6:()=>fv,cidrv4:()=>Cv,browserEmail:()=>jc,boolean:()=>vo,bigint:()=>no,base64url:()=>fn,base64:()=>yv});var qv=/^[cC][^\s-]{8,}$/,Qv=/^[0-9a-z]+$/,Yv=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Fv=/^[0-9a-vA-V]{20}$/,Bv=/^[A-Za-z0-9]{27}$/,mv=/^[a-zA-Z0-9_-]{21}$/,Hv=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Dc=/^[-+]?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)?)??$/,Tv=/^([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})$/,_r=(r)=>{if(!r)return/^([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)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${r}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},wc=_r(4),Nc=_r(6),Oc=_r(7),Mv=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,zc=/^[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])?)*$/,Sc=/^(([^<>()\[\]\\.,;:\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,}))$/,Ee=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Pc=Ee,jc=/^[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])?)*$/,Jc="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Rv(){return new RegExp(Jc,"u")}var xv=/^(?:(?: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])$/,Zv=/^(([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}|:))$/,dv=(r)=>{let i=R(r??":");return new RegExp(`^(?:[0-9A-F]{2}${i}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${i}){5}[0-9a-f]{2}$`)},Cv=/^((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])$/,fv=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,yv=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,fn=/^[A-Za-z0-9_-]*$/,Lc=/^(?=.{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])?)*\.?$/,Gc=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,hv=/^\+[1-9]\d{6,14}$/,Ae="(?:(?:\\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])))",av=new RegExp(`^${Ae}$`);function Ke(r){return typeof r.precision==="number"?r.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":r.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${r.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function pv(r){return new RegExp(`^${Ke(r)}$`)}function sv(r){let i=Ke({precision:r.precision}),o=["Z"];if(r.local)o.push("");if(r.offset)o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let t=`${i}(?:${o.join("|")})`;return new RegExp(`^${Ae}T(?:${t})$`)}var ro=(r)=>{let i=r?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${i}$`)},no=/^-?\d+n?$/,io=/^-?\d+$/,ln=/^-?\d+(?:\.\d+)?$/,vo=/^(?:true|false)$/i,oo=/^null$/i;var to=/^undefined$/i;var $o=/^[^A-Z]*$/,uo=/^[^a-z]*$/,Wc=/^[0-9a-fA-F]*$/;function In(r,i){return new RegExp(`^[A-Za-z0-9+/]{${r}}${i}$`)}function cn(r){return new RegExp(`^[A-Za-z0-9_-]{${r}}$`)}var Vc=/^[0-9a-fA-F]{32}$/,Xc=In(22,"=="),Ec=cn(22),Ac=/^[0-9a-fA-F]{40}$/,Kc=In(27,"="),qc=cn(27),Qc=/^[0-9a-fA-F]{64}$/,Yc=In(43,"="),Fc=cn(43),Bc=/^[0-9a-fA-F]{96}$/,mc=In(64,""),Hc=cn(64),Tc=/^[0-9a-fA-F]{128}$/,Mc=In(86,"=="),Rc=cn(86);var V=I("$ZodCheck",(r,i)=>{var o;r._zod??(r._zod={}),r._zod.def=i,(o=r._zod).onattach??(o.onattach=[])}),Qe={number:"number",bigint:"bigint",object:"date"},yn=I("$ZodCheckLessThan",(r,i)=>{V.init(r,i);let o=Qe[typeof i.value];r._zod.onattach.push((t)=>{let n=t._zod.bag,v=(i.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(i.value<v)if(i.inclusive)n.maximum=i.value;else n.exclusiveMaximum=i.value}),r._zod.check=(t)=>{if(i.inclusive?t.value<=i.value:t.value<i.value)return;t.issues.push({origin:o,code:"too_big",maximum:typeof i.value==="object"?i.value.getTime():i.value,input:t.value,inclusive:i.inclusive,inst:r,continue:!i.abort})}}),hn=I("$ZodCheckGreaterThan",(r,i)=>{V.init(r,i);let o=Qe[typeof i.value];r._zod.onattach.push((t)=>{let n=t._zod.bag,v=(i.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(i.value>v)if(i.inclusive)n.minimum=i.value;else n.exclusiveMinimum=i.value}),r._zod.check=(t)=>{if(i.inclusive?t.value>=i.value:t.value>i.value)return;t.issues.push({origin:o,code:"too_small",minimum:typeof i.value==="object"?i.value.getTime():i.value,input:t.value,inclusive:i.inclusive,inst:r,continue:!i.abort})}}),go=I("$ZodCheckMultipleOf",(r,i)=>{V.init(r,i),r._zod.onattach.push((o)=>{var t;(t=o._zod.bag).multipleOf??(t.multipleOf=i.value)}),r._zod.check=(o)=>{if(typeof o.value!==typeof i.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof o.value==="bigint"?o.value%i.value===BigInt(0):Sv(o.value,i.value)===0)return;o.issues.push({origin:typeof o.value,code:"not_multiple_of",divisor:i.value,input:o.value,inst:r,continue:!i.abort})}}),eo=I("$ZodCheckNumberFormat",(r,i)=>{V.init(r,i),i.format=i.format||"float64";let o=i.format?.includes("int"),t=o?"int":"number",[n,v]=Wv[i.format];r._zod.onattach.push(($)=>{let u=$._zod.bag;if(u.format=i.format,u.minimum=n,u.maximum=v,o)u.pattern=io}),r._zod.check=($)=>{let u=$.value;if(o){if(!Number.isInteger(u)){$.issues.push({expected:t,format:i.format,code:"invalid_type",continue:!1,input:u,inst:r});return}if(!Number.isSafeInteger(u)){if(u>0)$.issues.push({input:u,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:t,inclusive:!0,continue:!i.abort});else $.issues.push({input:u,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:t,inclusive:!0,continue:!i.abort});return}}if(u<n)$.issues.push({origin:"number",input:u,code:"too_small",minimum:n,inclusive:!0,inst:r,continue:!i.abort});if(u>v)$.issues.push({origin:"number",input:u,code:"too_big",maximum:v,inclusive:!0,inst:r,continue:!i.abort})}}),lo=I("$ZodCheckBigIntFormat",(r,i)=>{V.init(r,i);let[o,t]=Vv[i.format];r._zod.onattach.push((n)=>{let v=n._zod.bag;v.format=i.format,v.minimum=o,v.maximum=t}),r._zod.check=(n)=>{let v=n.value;if(v<o)n.issues.push({origin:"bigint",input:v,code:"too_small",minimum:o,inclusive:!0,inst:r,continue:!i.abort});if(v>t)n.issues.push({origin:"bigint",input:v,code:"too_big",maximum:t,inclusive:!0,inst:r,continue:!i.abort})}}),Io=I("$ZodCheckMaxSize",(r,i)=>{var o;V.init(r,i),(o=r._zod.def).when??(o.when=(t)=>{let n=t.value;return!vr(n)&&n.size!==void 0}),r._zod.onattach.push((t)=>{let n=t._zod.bag.maximum??Number.POSITIVE_INFINITY;if(i.maximum<n)t._zod.bag.maximum=i.maximum}),r._zod.check=(t)=>{let n=t.value;if(n.size<=i.maximum)return;t.issues.push({origin:tn(n),code:"too_big",maximum:i.maximum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),co=I("$ZodCheckMinSize",(r,i)=>{var o;V.init(r,i),(o=r._zod.def).when??(o.when=(t)=>{let n=t.value;return!vr(n)&&n.size!==void 0}),r._zod.onattach.push((t)=>{let n=t._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(i.minimum>n)t._zod.bag.minimum=i.minimum}),r._zod.check=(t)=>{let n=t.value;if(n.size>=i.minimum)return;t.issues.push({origin:tn(n),code:"too_small",minimum:i.minimum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),bo=I("$ZodCheckSizeEquals",(r,i)=>{var o;V.init(r,i),(o=r._zod.def).when??(o.when=(t)=>{let n=t.value;return!vr(n)&&n.size!==void 0}),r._zod.onattach.push((t)=>{let n=t._zod.bag;n.minimum=i.size,n.maximum=i.size,n.size=i.size}),r._zod.check=(t)=>{let n=t.value,v=n.size;if(v===i.size)return;let $=v>i.size;t.issues.push({origin:tn(n),...$?{code:"too_big",maximum:i.size}:{code:"too_small",minimum:i.size},inclusive:!0,exact:!0,input:t.value,inst:r,continue:!i.abort})}}),_o=I("$ZodCheckMaxLength",(r,i)=>{var o;V.init(r,i),(o=r._zod.def).when??(o.when=(t)=>{let n=t.value;return!vr(n)&&n.length!==void 0}),r._zod.onattach.push((t)=>{let n=t._zod.bag.maximum??Number.POSITIVE_INFINITY;if(i.maximum<n)t._zod.bag.maximum=i.maximum}),r._zod.check=(t)=>{let n=t.value;if(n.length<=i.maximum)return;let $=$n(n);t.issues.push({origin:$,code:"too_big",maximum:i.maximum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),Uo=I("$ZodCheckMinLength",(r,i)=>{var o;V.init(r,i),(o=r._zod.def).when??(o.when=(t)=>{let n=t.value;return!vr(n)&&n.length!==void 0}),r._zod.onattach.push((t)=>{let n=t._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(i.minimum>n)t._zod.bag.minimum=i.minimum}),r._zod.check=(t)=>{let n=t.value;if(n.length>=i.minimum)return;let $=$n(n);t.issues.push({origin:$,code:"too_small",minimum:i.minimum,inclusive:!0,input:n,inst:r,continue:!i.abort})}}),ko=I("$ZodCheckLengthEquals",(r,i)=>{var o;V.init(r,i),(o=r._zod.def).when??(o.when=(t)=>{let n=t.value;return!vr(n)&&n.length!==void 0}),r._zod.onattach.push((t)=>{let n=t._zod.bag;n.minimum=i.length,n.maximum=i.length,n.length=i.length}),r._zod.check=(t)=>{let n=t.value,v=n.length;if(v===i.length)return;let $=$n(n),u=v>i.length;t.issues.push({origin:$,...u?{code:"too_big",maximum:i.length}:{code:"too_small",minimum:i.length},inclusive:!0,exact:!0,input:t.value,inst:r,continue:!i.abort})}}),Vr=I("$ZodCheckStringFormat",(r,i)=>{var o,t;if(V.init(r,i),r._zod.onattach.push((n)=>{let v=n._zod.bag;if(v.format=i.format,i.pattern)v.patterns??(v.patterns=new Set),v.patterns.add(i.pattern)}),i.pattern)(o=r._zod).check??(o.check=(n)=>{if(i.pattern.lastIndex=0,i.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:i.format,input:n.value,...i.pattern?{pattern:i.pattern.toString()}:{},inst:r,continue:!i.abort})});else(t=r._zod).check??(t.check=()=>{})}),Do=I("$ZodCheckRegex",(r,i)=>{Vr.init(r,i),r._zod.check=(o)=>{if(i.pattern.lastIndex=0,i.pattern.test(o.value))return;o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:i.pattern.toString(),inst:r,continue:!i.abort})}}),wo=I("$ZodCheckLowerCase",(r,i)=>{i.pattern??(i.pattern=$o),Vr.init(r,i)}),No=I("$ZodCheckUpperCase",(r,i)=>{i.pattern??(i.pattern=uo),Vr.init(r,i)}),Oo=I("$ZodCheckIncludes",(r,i)=>{V.init(r,i);let o=R(i.includes),t=new RegExp(typeof i.position==="number"?`^.{${i.position}}${o}`:o);i.pattern=t,r._zod.onattach.push((n)=>{let v=n._zod.bag;v.patterns??(v.patterns=new Set),v.patterns.add(t)}),r._zod.check=(n)=>{if(n.value.includes(i.includes,i.position))return;n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:i.includes,input:n.value,inst:r,continue:!i.abort})}}),zo=I("$ZodCheckStartsWith",(r,i)=>{V.init(r,i);let o=new RegExp(`^${R(i.prefix)}.*`);i.pattern??(i.pattern=o),r._zod.onattach.push((t)=>{let n=t._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),r._zod.check=(t)=>{if(t.value.startsWith(i.prefix))return;t.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:i.prefix,input:t.value,inst:r,continue:!i.abort})}}),So=I("$ZodCheckEndsWith",(r,i)=>{V.init(r,i);let o=new RegExp(`.*${R(i.suffix)}$`);i.pattern??(i.pattern=o),r._zod.onattach.push((t)=>{let n=t._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),r._zod.check=(t)=>{if(t.value.endsWith(i.suffix))return;t.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:i.suffix,input:t.value,inst:r,continue:!i.abort})}});function qe(r,i,o){if(r.issues.length)i.issues.push(...T(o,r.issues))}var Po=I("$ZodCheckProperty",(r,i)=>{V.init(r,i),r._zod.check=(o)=>{let t=i.schema._zod.run({value:o.value[i.property],issues:[]},{});if(t instanceof Promise)return t.then((n)=>qe(n,o,i.property));qe(t,o,i.property);return}}),jo=I("$ZodCheckMimeType",(r,i)=>{V.init(r,i);let o=new Set(i.mime);r._zod.onattach.push((t)=>{t._zod.bag.mime=i.mime}),r._zod.check=(t)=>{if(o.has(t.value.type))return;t.issues.push({code:"invalid_value",values:i.mime,input:t.value.type,inst:r,continue:!i.abort})}}),Jo=I("$ZodCheckOverwrite",(r,i)=>{V.init(r,i),r._zod.check=(o)=>{o.value=i.tx(o.value)}});class an{constructor(r=[]){if(this.content=[],this.indent=0,this)this.args=r}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r==="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let o=r.split(`
|
|
3
3
|
`).filter((v)=>v),t=Math.min(...o.map((v)=>v.length-v.trimStart().length)),n=o.map((v)=>v.slice(t)).map((v)=>" ".repeat(this.indent*2)+v);for(let v of n)this.content.push(v)}compile(){let r=Function,i=this?.args,t=[...(this?.content??[""]).map((n)=>` ${n}`)];return new r(...i,t.join(`
|
|
4
4
|
`))}}var Lo={major:4,minor:3,patch:6};var S=I("$ZodType",(r,i)=>{var o;r??(r={}),r._zod.def=i,r._zod.bag=r._zod.bag||{},r._zod.version=Lo;let t=[...r._zod.def.checks??[]];if(r._zod.traits.has("$ZodCheck"))t.unshift(r);for(let n of t)for(let v of n._zod.onattach)v(r);if(t.length===0)(o=r._zod).deferred??(o.deferred=[]),r._zod.deferred?.push(()=>{r._zod.run=r._zod.parse});else{let n=($,u,l)=>{let e=$r($),c;for(let _ of u){if(_._zod.def.when){if(!_._zod.def.when($))continue}else if(e)continue;let N=$.issues.length,O=_._zod.check($);if(O instanceof Promise&&l?.async===!1)throw new f;if(c||O instanceof Promise)c=(c??Promise.resolve()).then(async()=>{if(await O,$.issues.length===N)return;if(!e)e=$r($,N)});else{if($.issues.length===N)continue;if(!e)e=$r($,N)}}if(c)return c.then(()=>{return $});return $},v=($,u,l)=>{if($r($))return $.aborted=!0,$;let e=n(u,t,l);if(e instanceof Promise){if(l.async===!1)throw new f;return e.then((c)=>r._zod.parse(c,l))}return r._zod.parse(e,l)};r._zod.run=($,u)=>{if(u.skipChecks)return r._zod.parse($,u);if(u.direction==="backward"){let e=r._zod.parse({value:$.value,issues:[]},{...u,skipChecks:!0});if(e instanceof Promise)return e.then((c)=>{return v(c,$,u)});return v(e,$,u)}let l=r._zod.parse($,u);if(l instanceof Promise){if(u.async===!1)throw new f;return l.then((e)=>n(e,t,u))}return n(l,t,u)}}j(r,"~standard",()=>({validate:(n)=>{try{let v=Av(r,n);return v.success?{value:v.data}:{issues:v.error?.issues}}catch(v){return Kv(r,n).then(($)=>$.success?{value:$.data}:{issues:$.error?.issues})}},vendor:"zod",version:1}))}),Ur=I("$ZodString",(r,i)=>{S.init(r,i),r._zod.pattern=[...r?._zod.bag?.patterns??[]].pop()??ro(r._zod.bag),r._zod.parse=(o,t)=>{if(i.coerce)try{o.value=String(o.value)}catch(n){}if(typeof o.value==="string")return o;return o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:r}),o}}),G=I("$ZodStringFormat",(r,i)=>{Vr.init(r,i),Ur.init(r,i)}),Wo=I("$ZodGUID",(r,i)=>{i.pattern??(i.pattern=Tv),G.init(r,i)}),Vo=I("$ZodUUID",(r,i)=>{if(i.version){let t={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[i.version];if(t===void 0)throw Error(`Invalid UUID version: "${i.version}"`);i.pattern??(i.pattern=_r(t))}else i.pattern??(i.pattern=_r());G.init(r,i)}),Xo=I("$ZodEmail",(r,i)=>{i.pattern??(i.pattern=Mv),G.init(r,i)}),Eo=I("$ZodURL",(r,i)=>{G.init(r,i),r._zod.check=(o)=>{try{let t=o.value.trim(),n=new URL(t);if(i.hostname){if(i.hostname.lastIndex=0,!i.hostname.test(n.hostname))o.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:i.hostname.source,input:o.value,inst:r,continue:!i.abort})}if(i.protocol){if(i.protocol.lastIndex=0,!i.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol))o.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:i.protocol.source,input:o.value,inst:r,continue:!i.abort})}if(i.normalize)o.value=n.href;else o.value=t;return}catch(t){o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:r,continue:!i.abort})}}}),Ao=I("$ZodEmoji",(r,i)=>{i.pattern??(i.pattern=Rv()),G.init(r,i)}),Ko=I("$ZodNanoID",(r,i)=>{i.pattern??(i.pattern=mv),G.init(r,i)}),qo=I("$ZodCUID",(r,i)=>{i.pattern??(i.pattern=qv),G.init(r,i)}),Qo=I("$ZodCUID2",(r,i)=>{i.pattern??(i.pattern=Qv),G.init(r,i)}),Yo=I("$ZodULID",(r,i)=>{i.pattern??(i.pattern=Yv),G.init(r,i)}),Fo=I("$ZodXID",(r,i)=>{i.pattern??(i.pattern=Fv),G.init(r,i)}),Bo=I("$ZodKSUID",(r,i)=>{i.pattern??(i.pattern=Bv),G.init(r,i)}),mo=I("$ZodISODateTime",(r,i)=>{i.pattern??(i.pattern=sv(i)),G.init(r,i)}),Ho=I("$ZodISODate",(r,i)=>{i.pattern??(i.pattern=av),G.init(r,i)}),To=I("$ZodISOTime",(r,i)=>{i.pattern??(i.pattern=pv(i)),G.init(r,i)}),Mo=I("$ZodISODuration",(r,i)=>{i.pattern??(i.pattern=Hv),G.init(r,i)}),Ro=I("$ZodIPv4",(r,i)=>{i.pattern??(i.pattern=xv),G.init(r,i),r._zod.bag.format="ipv4"}),xo=I("$ZodIPv6",(r,i)=>{i.pattern??(i.pattern=Zv),G.init(r,i),r._zod.bag.format="ipv6",r._zod.check=(o)=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:r,continue:!i.abort})}}}),Zo=I("$ZodMAC",(r,i)=>{i.pattern??(i.pattern=dv(i.delimiter)),G.init(r,i),r._zod.bag.format="mac"}),Co=I("$ZodCIDRv4",(r,i)=>{i.pattern??(i.pattern=Cv),G.init(r,i)}),fo=I("$ZodCIDRv6",(r,i)=>{i.pattern??(i.pattern=fv),G.init(r,i),r._zod.check=(o)=>{let t=o.value.split("/");try{if(t.length!==2)throw Error();let[n,v]=t;if(!v)throw Error();let $=Number(v);if(`${$}`!==v)throw Error();if($<0||$>128)throw Error();new URL(`http://[${n}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:r,continue:!i.abort})}}});function yo(r){if(r==="")return!0;if(r.length%4!==0)return!1;try{return atob(r),!0}catch{return!1}}var ho=I("$ZodBase64",(r,i)=>{i.pattern??(i.pattern=yv),G.init(r,i),r._zod.bag.contentEncoding="base64",r._zod.check=(o)=>{if(yo(o.value))return;o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:r,continue:!i.abort})}});function fe(r){if(!fn.test(r))return!1;let i=r.replace(/[-_]/g,(t)=>t==="-"?"+":"/"),o=i.padEnd(Math.ceil(i.length/4)*4,"=");return yo(o)}var ao=I("$ZodBase64URL",(r,i)=>{i.pattern??(i.pattern=fn),G.init(r,i),r._zod.bag.contentEncoding="base64url",r._zod.check=(o)=>{if(fe(o.value))return;o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:r,continue:!i.abort})}}),po=I("$ZodE164",(r,i)=>{i.pattern??(i.pattern=hv),G.init(r,i)});function ye(r,i=null){try{let o=r.split(".");if(o.length!==3)return!1;let[t]=o;if(!t)return!1;let n=JSON.parse(atob(t));if("typ"in n&&n?.typ!=="JWT")return!1;if(!n.alg)return!1;if(i&&(!("alg"in n)||n.alg!==i))return!1;return!0}catch{return!1}}var so=I("$ZodJWT",(r,i)=>{G.init(r,i),r._zod.check=(o)=>{if(ye(o.value,i.alg))return;o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:r,continue:!i.abort})}}),rt=I("$ZodCustomStringFormat",(r,i)=>{G.init(r,i),r._zod.check=(o)=>{if(i.fn(o.value))return;o.issues.push({code:"invalid_format",format:i.format,input:o.value,inst:r,continue:!i.abort})}}),vi=I("$ZodNumber",(r,i)=>{S.init(r,i),r._zod.pattern=r._zod.bag.pattern??ln,r._zod.parse=(o,t)=>{if(i.coerce)try{o.value=Number(o.value)}catch($){}let n=o.value;if(typeof n==="number"&&!Number.isNaN(n)&&Number.isFinite(n))return o;let v=typeof n==="number"?Number.isNaN(n)?"NaN":!Number.isFinite(n)?"Infinity":void 0:void 0;return o.issues.push({expected:"number",code:"invalid_type",input:n,inst:r,...v?{received:v}:{}}),o}}),nt=I("$ZodNumberFormat",(r,i)=>{eo.init(r,i),vi.init(r,i)}),bn=I("$ZodBoolean",(r,i)=>{S.init(r,i),r._zod.pattern=vo,r._zod.parse=(o,t)=>{if(i.coerce)try{o.value=Boolean(o.value)}catch(v){}let n=o.value;if(typeof n==="boolean")return o;return o.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:r}),o}}),oi=I("$ZodBigInt",(r,i)=>{S.init(r,i),r._zod.pattern=no,r._zod.parse=(o,t)=>{if(i.coerce)try{o.value=BigInt(o.value)}catch(n){}if(typeof o.value==="bigint")return o;return o.issues.push({expected:"bigint",code:"invalid_type",input:o.value,inst:r}),o}}),it=I("$ZodBigIntFormat",(r,i)=>{lo.init(r,i),oi.init(r,i)}),vt=I("$ZodSymbol",(r,i)=>{S.init(r,i),r._zod.parse=(o,t)=>{let n=o.value;if(typeof n==="symbol")return o;return o.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:r}),o}}),ot=I("$ZodUndefined",(r,i)=>{S.init(r,i),r._zod.pattern=to,r._zod.values=new Set([void 0]),r._zod.optin="optional",r._zod.optout="optional",r._zod.parse=(o,t)=>{let n=o.value;if(typeof n>"u")return o;return o.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:r}),o}}),tt=I("$ZodNull",(r,i)=>{S.init(r,i),r._zod.pattern=oo,r._zod.values=new Set([null]),r._zod.parse=(o,t)=>{let n=o.value;if(n===null)return o;return o.issues.push({expected:"null",code:"invalid_type",input:n,inst:r}),o}}),$t=I("$ZodAny",(r,i)=>{S.init(r,i),r._zod.parse=(o)=>o}),ut=I("$ZodUnknown",(r,i)=>{S.init(r,i),r._zod.parse=(o)=>o}),gt=I("$ZodNever",(r,i)=>{S.init(r,i),r._zod.parse=(o,t)=>{return o.issues.push({expected:"never",code:"invalid_type",input:o.value,inst:r}),o}}),et=I("$ZodVoid",(r,i)=>{S.init(r,i),r._zod.parse=(o,t)=>{let n=o.value;if(typeof n>"u")return o;return o.issues.push({expected:"void",code:"invalid_type",input:n,inst:r}),o}}),lt=I("$ZodDate",(r,i)=>{S.init(r,i),r._zod.parse=(o,t)=>{if(i.coerce)try{o.value=new Date(o.value)}catch(u){}let n=o.value,v=n instanceof Date;if(v&&!Number.isNaN(n.getTime()))return o;return o.issues.push({expected:"date",code:"invalid_type",input:n,...v?{received:"Invalid Date"}:{},inst:r}),o}});function Fe(r,i,o){if(r.issues.length)i.issues.push(...T(o,r.issues));i.value[o]=r.value}var It=I("$ZodArray",(r,i)=>{S.init(r,i),r._zod.parse=(o,t)=>{let n=o.value;if(!Array.isArray(n))return o.issues.push({expected:"array",code:"invalid_type",input:n,inst:r}),o;o.value=Array(n.length);let v=[];for(let $=0;$<n.length;$++){let u=n[$],l=i.element._zod.run({value:u,issues:[]},t);if(l instanceof Promise)v.push(l.then((e)=>Fe(e,o,$)));else Fe(l,o,$)}if(v.length)return Promise.all(v).then(()=>o);return o}});function ii(r,i,o,t,n){if(r.issues.length){if(n&&!(o in t))return;i.issues.push(...T(o,r.issues))}if(r.value===void 0){if(o in t)i.value[o]=void 0}else i.value[o]=r.value}function he(r){let i=Object.keys(r.shape);for(let t of i)if(!r.shape?.[t]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${t}": expected a Zod schema`);let o=Gv(r.shape);return{...r,keys:i,keySet:new Set(i),numKeys:i.length,optionalKeys:new Set(o)}}function ae(r,i,o,t,n,v){let $=[],u=n.keySet,l=n.catchall._zod,e=l.def.type,c=l.optout==="optional";for(let _ in i){if(u.has(_))continue;if(e==="never"){$.push(_);continue}let N=l.run({value:i[_],issues:[]},t);if(N instanceof Promise)r.push(N.then((O)=>ii(O,o,_,i,c)));else ii(N,o,_,i,c)}if($.length)o.issues.push({code:"unrecognized_keys",keys:$,input:i,inst:v});if(!r.length)return o;return Promise.all(r).then(()=>{return o})}var pe=I("$ZodObject",(r,i)=>{if(S.init(r,i),!Object.getOwnPropertyDescriptor(i,"shape")?.get){let u=i.shape;Object.defineProperty(i,"shape",{get:()=>{let l={...u};return Object.defineProperty(i,"shape",{value:l}),l}})}let t=Pr(()=>he(i));j(r._zod,"propValues",()=>{let u=i.shape,l={};for(let e in u){let c=u[e]._zod;if(c.values){l[e]??(l[e]=new Set);for(let _ of c.values)l[e].add(_)}}return l});let n=br,v=i.catchall,$;r._zod.parse=(u,l)=>{$??($=t.value);let e=u.value;if(!n(e))return u.issues.push({expected:"object",code:"invalid_type",input:e,inst:r}),u;u.value={};let c=[],_=$.shape;for(let N of $.keys){let O=_[N],J=O._zod.optout==="optional",X=O._zod.run({value:e[N],issues:[]},l);if(X instanceof Promise)c.push(X.then((zr)=>ii(zr,u,N,e,J)));else ii(X,u,N,e,J)}if(!v)return c.length?Promise.all(c).then(()=>u):u;return ae(c,e,u,l,t.value,r)}}),ct=I("$ZodObjectJIT",(r,i)=>{pe.init(r,i);let o=r._zod.parse,t=Pr(()=>he(i)),n=(N)=>{let O=new an(["shape","payload","ctx"]),J=t.value,X=(C)=>{let F=Yn(C);return`shape[${F}]._zod.run({ value: input[${F}], issues: [] }, ctx)`};O.write("const input = payload.value;");let zr=Object.create(null),AI=0;for(let C of J.keys)zr[C]=`key_${AI++}`;O.write("const newResult = {};");for(let C of J.keys){let F=zr[C],Z=Yn(C),qI=N[C]?._zod?.optout==="optional";if(O.write(`const ${F} = ${X(C)};`),qI)O.write(`
|
package/dist/src/spec.types.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* - Use `@description` JSDoc tags to generate `.describe()` calls on schemas
|
|
8
8
|
* - Run `npm run generate:schemas` to regenerate schemas from these types
|
|
9
9
|
*
|
|
10
|
-
* @see https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/
|
|
10
|
+
* @see https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx
|
|
11
11
|
*/
|
|
12
12
|
import type { CallToolResult, ContentBlock, Implementation, RequestId, Tool } from "@modelcontextprotocol/sdk/types.js";
|
|
13
13
|
/**
|
|
@@ -16,7 +16,7 @@ import type { CallToolResult, ContentBlock, Implementation, RequestId, Tool } fr
|
|
|
16
16
|
* The SDK automatically handles version negotiation during initialization.
|
|
17
17
|
* Apps and hosts don't need to manage protocol versions manually.
|
|
18
18
|
*/
|
|
19
|
-
export declare const LATEST_PROTOCOL_VERSION = "
|
|
19
|
+
export declare const LATEST_PROTOCOL_VERSION = "2026-01-26";
|
|
20
20
|
/**
|
|
21
21
|
* @description Color theme preference for the host environment.
|
|
22
22
|
*/
|
|
@@ -92,7 +92,7 @@ export interface McpUiMessageResult {
|
|
|
92
92
|
/**
|
|
93
93
|
* @description Notification that the sandbox proxy iframe is ready to receive content.
|
|
94
94
|
* @internal
|
|
95
|
-
* @see https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/
|
|
95
|
+
* @see https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx#sandbox-proxy
|
|
96
96
|
*/
|
|
97
97
|
export interface McpUiSandboxProxyReadyNotification {
|
|
98
98
|
method: "ui/notifications/sandbox-proxy-ready";
|
|
@@ -101,7 +101,7 @@ export interface McpUiSandboxProxyReadyNotification {
|
|
|
101
101
|
/**
|
|
102
102
|
* @description Notification containing HTML resource for the sandbox proxy to load.
|
|
103
103
|
* @internal
|
|
104
|
-
* @see https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/
|
|
104
|
+
* @see https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/2026-01-26/apps.mdx#sandbox-proxy
|
|
105
105
|
*/
|
|
106
106
|
export interface McpUiSandboxResourceReadyNotification {
|
|
107
107
|
method: "ui/notifications/sandbox-resource-ready";
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"url": "https://github.com/modelcontextprotocol/ext-apps"
|
|
6
6
|
},
|
|
7
7
|
"homepage": "https://github.com/modelcontextprotocol/ext-apps",
|
|
8
|
-
"version": "0.
|
|
8
|
+
"version": "1.0.0",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"description": "MCP Apps SDK — Enable MCP servers to display interactive user interfaces in conversational clients.",
|
|
11
11
|
"type": "module",
|