/*! For license information please see elementor-capabilities-mcp.js.LICENSE.txt */
!function(){"use strict";var e={"./node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js":function(e,t,o){function assertToolsCallTaskCapability(e,t,o){if(!e)throw new Error(`${o} does not support task creation (required for ${t})`);if("tools/call"===t)if(!e.tools?.call)throw new Error(`${o} does not support task creation for tools/call (required for ${t})`)}function assertClientRequestTaskCapability(e,t,o){if(!e)throw new Error(`${o} does not support task creation (required for ${t})`);switch(t){case"sampling/createMessage":if(!e.sampling?.createMessage)throw new Error(`${o} does not support task creation for sampling/createMessage (required for ${t})`);break;case"elicitation/create":if(!e.elicitation?.create)throw new Error(`${o} does not support task creation for elicitation/create (required for ${t})`)}}o.r(t),o.d(t,{assertClientRequestTaskCapability:function(){return assertClientRequestTaskCapability},assertToolsCallTaskCapability:function(){return assertToolsCallTaskCapability}})},"./node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js":function(e,t,o){function isTerminal(e){return"completed"===e||"failed"===e||"cancelled"===e}o.r(t),o.d(t,{isTerminal:function(){return isTerminal}})},"./node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js":function(e,t,o){o.r(t),o.d(t,{ExperimentalMcpServerTasks:function(){return ExperimentalMcpServerTasks}});class ExperimentalMcpServerTasks{constructor(e){this._mcpServer=e}registerToolTask(e,t,o){const n={taskSupport:"required",...t.execution};if("forbidden"===n.taskSupport)throw new Error(`Cannot register task-based tool '${e}' with taskSupport 'forbidden'. Use registerTool() instead.`);return this._mcpServer._createRegisteredTool(e,t.title,t.description,t.inputSchema,t.outputSchema,t.annotations,n,t._meta,o)}}},"./node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js":function(e,t,o){o.r(t),o.d(t,{ExperimentalServerTasks:function(){return ExperimentalServerTasks}});var n=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/types.js");class ExperimentalServerTasks{constructor(e){this._server=e}requestStream(e,t,o){return this._server.requestStream(e,t,o)}createMessageStream(e,t){const o=this._server.getClientCapabilities();if((e.tools||e.toolChoice)&&!o?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){const t=e.messages[e.messages.length-1],o=Array.isArray(t.content)?t.content:[t.content],n=o.some(e=>"tool_result"===e.type),r=e.messages.length>1?e.messages[e.messages.length-2]:void 0,s=r?Array.isArray(r.content)?r.content:[r.content]:[],a=s.some(e=>"tool_use"===e.type);if(n){if(o.some(e=>"tool_result"!==e.type))throw new Error("The last message must contain only tool_result content if any is present");if(!a)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(a){const e=new Set(s.filter(e=>"tool_use"===e.type).map(e=>e.id)),t=new Set(o.filter(e=>"tool_result"===e.type).map(e=>e.toolUseId));if(e.size!==t.size||![...e].every(e=>t.has(e)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return this.requestStream({method:"sampling/createMessage",params:e},n.CreateMessageResultSchema,t)}elicitInputStream(e,t){const o=this._server.getClientCapabilities(),r=e.mode??"form";switch(r){case"url":if(!o?.elicitation?.url)throw new Error("Client does not support url elicitation.");break;case"form":if(!o?.elicitation?.form)throw new Error("Client does not support form elicitation.")}const s="form"===r&&void 0===e.mode?{...e,mode:"form"}:e;return this.requestStream({method:"elicitation/create",params:s},n.ElicitResultSchema,t)}async getTask(e,t){return this._server.getTask({taskId:e},t)}async getTaskResult(e,t,o){return this._server.getTaskResult({taskId:e},t,o)}async listTasks(e,t){return this._server.listTasks(e?{cursor:e}:void 0,t)}async cancelTask(e,t){return this._server.cancelTask({taskId:e},t)}}},"./node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js":function(e,t,o){o.r(t),o.d(t,{COMPLETABLE_SYMBOL:function(){return n},McpZodTypeKind:function(){return r},completable:function(){return completable},getCompleter:function(){return getCompleter},isCompletable:function(){return isCompletable},unwrapCompletable:function(){return unwrapCompletable}});const n=Symbol.for("mcp.completable");function completable(e,t){return Object.defineProperty(e,n,{value:{complete:t},enumerable:!1,writable:!1,configurable:!1}),e}function isCompletable(e){return!!e&&"object"==typeof e&&n in e}function getCompleter(e){const t=e[n];return t?.complete}function unwrapCompletable(e){return e}var r;!function(e){e.Completable="McpCompletable"}(r||(r={}))},"./node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js":function(e,t,o){o.r(t),o.d(t,{Server:function(){return Server}});var n=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js"),r=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/types.js"),s=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js"),a=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js"),i=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/server.js"),d=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/helpers.js");class Server extends n.Protocol{constructor(e,t){super(t),this._serverInfo=e,this._loggingLevels=new Map,this.LOG_LEVEL_SEVERITY=new Map(r.LoggingLevelSchema.options.map((e,t)=>[e,t])),this.isMessageIgnored=(e,t)=>{const o=this._loggingLevels.get(t);return!!o&&this.LOG_LEVEL_SEVERITY.get(e)<this.LOG_LEVEL_SEVERITY.get(o)},this._capabilities=t?.capabilities??{},this._instructions=t?.instructions,this._jsonSchemaValidator=t?.jsonSchemaValidator??new s.AjvJsonSchemaValidator,this.setRequestHandler(r.InitializeRequestSchema,e=>this._oninitialize(e)),this.setNotificationHandler(r.InitializedNotificationSchema,()=>this.oninitialized?.()),this._capabilities.logging&&this.setRequestHandler(r.SetLevelRequestSchema,async(e,t)=>{const o=t.sessionId||t.requestInfo?.headers["mcp-session-id"]||void 0,{level:n}=e.params,s=r.LoggingLevelSchema.safeParse(n);return s.success&&this._loggingLevels.set(o,s.data),{}})}get experimental(){return this._experimental||(this._experimental={tasks:new i.ExperimentalServerTasks(this)}),this._experimental}registerCapabilities(e){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=(0,n.mergeCapabilities)(this._capabilities,e)}setRequestHandler(e,t){const o=(0,a.getObjectShape)(e),n=o?.method;if(!n)throw new Error("Schema is missing a method literal");let s;if((0,a.isZ4Schema)(n)){const e=n,t=e._zod?.def;s=t?.value??e.value}else{const e=n,t=e._def;s=t?.value??e.value}if("string"!=typeof s)throw new Error("Schema method literal must be a string");if("tools/call"===s){const wrappedHandler=async(e,o)=>{const n=(0,a.safeParse)(r.CallToolRequestSchema,e);if(!n.success){const e=n.error instanceof Error?n.error.message:String(n.error);throw new r.McpError(r.ErrorCode.InvalidParams,`Invalid tools/call request: ${e}`)}const{params:s}=n.data,i=await Promise.resolve(t(e,o));if(s.task){const e=(0,a.safeParse)(r.CreateTaskResultSchema,i);if(!e.success){const t=e.error instanceof Error?e.error.message:String(e.error);throw new r.McpError(r.ErrorCode.InvalidParams,`Invalid task creation result: ${t}`)}return e.data}const d=(0,a.safeParse)(r.CallToolResultSchema,i);if(!d.success){const e=d.error instanceof Error?d.error.message:String(d.error);throw new r.McpError(r.ErrorCode.InvalidParams,`Invalid tools/call result: ${e}`)}return d.data};return super.setRequestHandler(e,wrappedHandler)}return super.setRequestHandler(e,t)}assertCapabilityForMethod(e){switch(e){case"sampling/createMessage":if(!this._clientCapabilities?.sampling)throw new Error(`Client does not support sampling (required for ${e})`);break;case"elicitation/create":if(!this._clientCapabilities?.elicitation)throw new Error(`Client does not support elicitation (required for ${e})`);break;case"roots/list":if(!this._clientCapabilities?.roots)throw new Error(`Client does not support listing roots (required for ${e})`)}}assertNotificationCapability(e){switch(e){case"notifications/message":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"notifications/resources/updated":case"notifications/resources/list_changed":if(!this._capabilities.resources)throw new Error(`Server does not support notifying about resources (required for ${e})`);break;case"notifications/tools/list_changed":if(!this._capabilities.tools)throw new Error(`Server does not support notifying of tool list changes (required for ${e})`);break;case"notifications/prompts/list_changed":if(!this._capabilities.prompts)throw new Error(`Server does not support notifying of prompt list changes (required for ${e})`);break;case"notifications/elicitation/complete":if(!this._clientCapabilities?.elicitation?.url)throw new Error(`Client does not support URL elicitation (required for ${e})`)}}assertRequestHandlerCapability(e){if(this._capabilities)switch(e){case"completion/complete":if(!this._capabilities.completions)throw new Error(`Server does not support completions (required for ${e})`);break;case"logging/setLevel":if(!this._capabilities.logging)throw new Error(`Server does not support logging (required for ${e})`);break;case"prompts/get":case"prompts/list":if(!this._capabilities.prompts)throw new Error(`Server does not support prompts (required for ${e})`);break;case"resources/list":case"resources/templates/list":case"resources/read":if(!this._capabilities.resources)throw new Error(`Server does not support resources (required for ${e})`);break;case"tools/call":case"tools/list":if(!this._capabilities.tools)throw new Error(`Server does not support tools (required for ${e})`);break;case"tasks/get":case"tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Server does not support tasks capability (required for ${e})`)}}assertTaskCapability(e){(0,d.assertClientRequestTaskCapability)(this._clientCapabilities?.tasks?.requests,e,"Client")}assertTaskHandlerCapability(e){this._capabilities&&(0,d.assertToolsCallTaskCapability)(this._capabilities.tasks?.requests,e,"Server")}async _oninitialize(e){const t=e.params.protocolVersion;this._clientCapabilities=e.params.capabilities,this._clientVersion=e.params.clientInfo;return{protocolVersion:r.SUPPORTED_PROTOCOL_VERSIONS.includes(t)?t:r.LATEST_PROTOCOL_VERSION,capabilities:this.getCapabilities(),serverInfo:this._serverInfo,...this._instructions&&{instructions:this._instructions}}}getClientCapabilities(){return this._clientCapabilities}getClientVersion(){return this._clientVersion}getCapabilities(){return this._capabilities}async ping(){return this.request({method:"ping"},r.EmptyResultSchema)}async createMessage(e,t){if((e.tools||e.toolChoice)&&!this._clientCapabilities?.sampling?.tools)throw new Error("Client does not support sampling tools capability.");if(e.messages.length>0){const t=e.messages[e.messages.length-1],o=Array.isArray(t.content)?t.content:[t.content],n=o.some(e=>"tool_result"===e.type),r=e.messages.length>1?e.messages[e.messages.length-2]:void 0,s=r?Array.isArray(r.content)?r.content:[r.content]:[],a=s.some(e=>"tool_use"===e.type);if(n){if(o.some(e=>"tool_result"!==e.type))throw new Error("The last message must contain only tool_result content if any is present");if(!a)throw new Error("tool_result blocks are not matching any tool_use from the previous message")}if(a){const e=new Set(s.filter(e=>"tool_use"===e.type).map(e=>e.id)),t=new Set(o.filter(e=>"tool_result"===e.type).map(e=>e.toolUseId));if(e.size!==t.size||![...e].every(e=>t.has(e)))throw new Error("ids of tool_result blocks and tool_use blocks from previous message do not match")}}return e.tools?this.request({method:"sampling/createMessage",params:e},r.CreateMessageResultWithToolsSchema,t):this.request({method:"sampling/createMessage",params:e},r.CreateMessageResultSchema,t)}async elicitInput(e,t){switch(e.mode??"form"){case"url":{if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support url elicitation.");const o=e;return this.request({method:"elicitation/create",params:o},r.ElicitResultSchema,t)}case"form":{if(!this._clientCapabilities?.elicitation?.form)throw new Error("Client does not support form elicitation.");const o="form"===e.mode?e:{...e,mode:"form"},n=await this.request({method:"elicitation/create",params:o},r.ElicitResultSchema,t);if("accept"===n.action&&n.content&&o.requestedSchema)try{const e=this._jsonSchemaValidator.getValidator(o.requestedSchema)(n.content);if(!e.valid)throw new r.McpError(r.ErrorCode.InvalidParams,`Elicitation response content does not match requested schema: ${e.errorMessage}`)}catch(e){if(e instanceof r.McpError)throw e;throw new r.McpError(r.ErrorCode.InternalError,`Error validating elicitation response: ${e instanceof Error?e.message:String(e)}`)}return n}}}createElicitationCompletionNotifier(e,t){if(!this._clientCapabilities?.elicitation?.url)throw new Error("Client does not support URL elicitation (required for notifications/elicitation/complete)");return()=>this.notification({method:"notifications/elicitation/complete",params:{elicitationId:e}},t)}async listRoots(e,t){return this.request({method:"roots/list",params:e},r.ListRootsResultSchema,t)}async sendLoggingMessage(e,t){if(this._capabilities.logging&&!this.isMessageIgnored(e.level,t))return this.notification({method:"notifications/message",params:e})}async sendResourceUpdated(e){return this.notification({method:"notifications/resources/updated",params:e})}async sendResourceListChanged(){return this.notification({method:"notifications/resources/list_changed"})}async sendToolListChanged(){return this.notification({method:"notifications/tools/list_changed"})}async sendPromptListChanged(){return this.notification({method:"notifications/prompts/list_changed"})}}},"./node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js":function(e,t,o){o.r(t),o.d(t,{McpServer:function(){return McpServer},ResourceTemplate:function(){return ResourceTemplate}});var n=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js"),s=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js"),a=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/types.js"),i=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/server/completable.js"),d=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/shared/uriTemplate.js"),c=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js"),u=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/mcp-server.js"),l=o("./node_modules/zod/v3/types.js");class McpServer{constructor(e,t){this._registeredResources={},this._registeredResourceTemplates={},this._registeredTools={},this._registeredPrompts={},this._toolHandlersInitialized=!1,this._completionHandlerInitialized=!1,this._resourceHandlersInitialized=!1,this._promptHandlersInitialized=!1,this.server=new n.Server(e,t)}get experimental(){return this._experimental||(this._experimental={tasks:new u.ExperimentalMcpServerTasks(this)}),this._experimental}async connect(e){return await this.server.connect(e)}async close(){await this.server.close()}setToolRequestHandlers(){this._toolHandlersInitialized||(this.server.assertCanSetRequestHandler(getMethodValue(a.ListToolsRequestSchema)),this.server.assertCanSetRequestHandler(getMethodValue(a.CallToolRequestSchema)),this.server.registerCapabilities({tools:{listChanged:!0}}),this.server.setRequestHandler(a.ListToolsRequestSchema,()=>({tools:Object.entries(this._registeredTools).filter(([,e])=>e.enabled).map(([e,t])=>{const o={name:e,title:t.title,description:t.description,inputSchema:(()=>{const e=(0,r.normalizeObjectSchema)(t.inputSchema);return e?(0,s.toJsonSchemaCompat)(e,{strictUnions:!0,pipeStrategy:"input"}):m})(),annotations:t.annotations,execution:t.execution,_meta:t._meta};if(t.outputSchema){const e=(0,r.normalizeObjectSchema)(t.outputSchema);e&&(o.outputSchema=(0,s.toJsonSchemaCompat)(e,{strictUnions:!0,pipeStrategy:"output"}))}return o})})),this.server.setRequestHandler(a.CallToolRequestSchema,async(e,t)=>{try{const o=this._registeredTools[e.params.name];if(!o)throw new a.McpError(a.ErrorCode.InvalidParams,`Tool ${e.params.name} not found`);if(!o.enabled)throw new a.McpError(a.ErrorCode.InvalidParams,`Tool ${e.params.name} disabled`);const n=!!e.params.task,r=o.execution?.taskSupport,s="createTask"in o.handler;if(("required"===r||"optional"===r)&&!s)throw new a.McpError(a.ErrorCode.InternalError,`Tool ${e.params.name} has taskSupport '${r}' but was not registered with registerToolTask`);if("required"===r&&!n)throw new a.McpError(a.ErrorCode.MethodNotFound,`Tool ${e.params.name} requires task augmentation (taskSupport: 'required')`);if("optional"===r&&!n&&s)return await this.handleAutomaticTaskPolling(o,e,t);const i=await this.validateToolInput(o,e.params.arguments,e.params.name),d=await this.executeToolHandler(o,i,t);return n||await this.validateToolOutput(o,d,e.params.name),d}catch(e){if(e instanceof a.McpError&&e.code===a.ErrorCode.UrlElicitationRequired)throw e;return this.createToolError(e instanceof Error?e.message:String(e))}}),this._toolHandlersInitialized=!0)}createToolError(e){return{content:[{type:"text",text:e}],isError:!0}}async validateToolInput(e,t,o){if(!e.inputSchema)return;const n=(0,r.normalizeObjectSchema)(e.inputSchema)??e.inputSchema,s=await(0,r.safeParseAsync)(n,t);if(!s.success){const e="error"in s?s.error:"Unknown error",t=(0,r.getParseErrorMessage)(e);throw new a.McpError(a.ErrorCode.InvalidParams,`Input validation error: Invalid arguments for tool ${o}: ${t}`)}return s.data}async validateToolOutput(e,t,o){if(!e.outputSchema)return;if(!("content"in t))return;if(t.isError)return;if(!t.structuredContent)throw new a.McpError(a.ErrorCode.InvalidParams,`Output validation error: Tool ${o} has an output schema but no structured content was provided`);const n=(0,r.normalizeObjectSchema)(e.outputSchema),s=await(0,r.safeParseAsync)(n,t.structuredContent);if(!s.success){const e="error"in s?s.error:"Unknown error",t=(0,r.getParseErrorMessage)(e);throw new a.McpError(a.ErrorCode.InvalidParams,`Output validation error: Invalid structured content for tool ${o}: ${t}`)}}async executeToolHandler(e,t,o){const n=e.handler;if("createTask"in n){if(!o.taskStore)throw new Error("No task store provided.");const r={...o,taskStore:o.taskStore};if(e.inputSchema){const e=n;return await Promise.resolve(e.createTask(t,r))}{const e=n;return await Promise.resolve(e.createTask(r))}}if(e.inputSchema){const e=n;return await Promise.resolve(e(t,o))}{const e=n;return await Promise.resolve(e(o))}}async handleAutomaticTaskPolling(e,t,o){if(!o.taskStore)throw new Error("No task store provided for task-capable tool.");const n=await this.validateToolInput(e,t.params.arguments,t.params.name),r=e.handler,s={...o,taskStore:o.taskStore},i=n?await Promise.resolve(r.createTask(n,s)):await Promise.resolve(r.createTask(s)),d=i.task.taskId;let c=i.task;const u=c.pollInterval??5e3;for(;"completed"!==c.status&&"failed"!==c.status&&"cancelled"!==c.status;){await new Promise(e=>setTimeout(e,u));const e=await o.taskStore.getTask(d);if(!e)throw new a.McpError(a.ErrorCode.InternalError,`Task ${d} not found during polling`);c=e}return await o.taskStore.getTaskResult(d)}setCompletionRequestHandler(){this._completionHandlerInitialized||(this.server.assertCanSetRequestHandler(getMethodValue(a.CompleteRequestSchema)),this.server.registerCapabilities({completions:{}}),this.server.setRequestHandler(a.CompleteRequestSchema,async e=>{switch(e.params.ref.type){case"ref/prompt":return(0,a.assertCompleteRequestPrompt)(e),this.handlePromptCompletion(e,e.params.ref);case"ref/resource":return(0,a.assertCompleteRequestResourceTemplate)(e),this.handleResourceCompletion(e,e.params.ref);default:throw new a.McpError(a.ErrorCode.InvalidParams,`Invalid completion reference: ${e.params.ref}`)}}),this._completionHandlerInitialized=!0)}async handlePromptCompletion(e,t){const o=this._registeredPrompts[t.name];if(!o)throw new a.McpError(a.ErrorCode.InvalidParams,`Prompt ${t.name} not found`);if(!o.enabled)throw new a.McpError(a.ErrorCode.InvalidParams,`Prompt ${t.name} disabled`);if(!o.argsSchema)return p;const n=(0,r.getObjectShape)(o.argsSchema),s=n?.[e.params.argument.name];if(!(0,i.isCompletable)(s))return p;const d=(0,i.getCompleter)(s);if(!d)return p;return createCompletionResult(await d(e.params.argument.value,e.params.context))}async handleResourceCompletion(e,t){const o=Object.values(this._registeredResourceTemplates).find(e=>e.resourceTemplate.uriTemplate.toString()===t.uri);if(!o){if(this._registeredResources[t.uri])return p;throw new a.McpError(a.ErrorCode.InvalidParams,`Resource template ${e.params.ref.uri} not found`)}const n=o.resourceTemplate.completeCallback(e.params.argument.name);if(!n)return p;return createCompletionResult(await n(e.params.argument.value,e.params.context))}setResourceRequestHandlers(){this._resourceHandlersInitialized||(this.server.assertCanSetRequestHandler(getMethodValue(a.ListResourcesRequestSchema)),this.server.assertCanSetRequestHandler(getMethodValue(a.ListResourceTemplatesRequestSchema)),this.server.assertCanSetRequestHandler(getMethodValue(a.ReadResourceRequestSchema)),this.server.registerCapabilities({resources:{listChanged:!0}}),this.server.setRequestHandler(a.ListResourcesRequestSchema,async(e,t)=>{const o=Object.entries(this._registeredResources).filter(([e,t])=>t.enabled).map(([e,t])=>({uri:e,name:t.name,...t.metadata})),n=[];for(const e of Object.values(this._registeredResourceTemplates)){if(!e.resourceTemplate.listCallback)continue;const o=await e.resourceTemplate.listCallback(t);for(const t of o.resources)n.push({...e.metadata,...t})}return{resources:[...o,...n]}}),this.server.setRequestHandler(a.ListResourceTemplatesRequestSchema,async()=>({resourceTemplates:Object.entries(this._registeredResourceTemplates).map(([e,t])=>({name:e,uriTemplate:t.resourceTemplate.uriTemplate.toString(),...t.metadata}))})),this.server.setRequestHandler(a.ReadResourceRequestSchema,async(e,t)=>{const o=new URL(e.params.uri),n=this._registeredResources[o.toString()];if(n){if(!n.enabled)throw new a.McpError(a.ErrorCode.InvalidParams,`Resource ${o} disabled`);return n.readCallback(o,t)}for(const e of Object.values(this._registeredResourceTemplates)){const n=e.resourceTemplate.uriTemplate.match(o.toString());if(n)return e.readCallback(o,n,t)}throw new a.McpError(a.ErrorCode.InvalidParams,`Resource ${o} not found`)}),this._resourceHandlersInitialized=!0)}setPromptRequestHandlers(){this._promptHandlersInitialized||(this.server.assertCanSetRequestHandler(getMethodValue(a.ListPromptsRequestSchema)),this.server.assertCanSetRequestHandler(getMethodValue(a.GetPromptRequestSchema)),this.server.registerCapabilities({prompts:{listChanged:!0}}),this.server.setRequestHandler(a.ListPromptsRequestSchema,()=>({prompts:Object.entries(this._registeredPrompts).filter(([,e])=>e.enabled).map(([e,t])=>({name:e,title:t.title,description:t.description,arguments:t.argsSchema?promptArgumentsFromSchema(t.argsSchema):void 0}))})),this.server.setRequestHandler(a.GetPromptRequestSchema,async(e,t)=>{const o=this._registeredPrompts[e.params.name];if(!o)throw new a.McpError(a.ErrorCode.InvalidParams,`Prompt ${e.params.name} not found`);if(!o.enabled)throw new a.McpError(a.ErrorCode.InvalidParams,`Prompt ${e.params.name} disabled`);if(o.argsSchema){const n=(0,r.normalizeObjectSchema)(o.argsSchema),s=await(0,r.safeParseAsync)(n,e.params.arguments);if(!s.success){const t="error"in s?s.error:"Unknown error",o=(0,r.getParseErrorMessage)(t);throw new a.McpError(a.ErrorCode.InvalidParams,`Invalid arguments for prompt ${e.params.name}: ${o}`)}const i=s.data,d=o.callback;return await Promise.resolve(d(i,t))}{const e=o.callback;return await Promise.resolve(e(t))}}),this._promptHandlersInitialized=!0)}resource(e,t,...o){let n;"object"==typeof o[0]&&(n=o.shift());const r=o[0];if("string"==typeof t){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);const o=this._createRegisteredResource(e,void 0,t,n,r);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),o}{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);const o=this._createRegisteredResourceTemplate(e,void 0,t,n,r);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),o}}registerResource(e,t,o,n){if("string"==typeof t){if(this._registeredResources[t])throw new Error(`Resource ${t} is already registered`);const r=this._createRegisteredResource(e,o.title,t,o,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),r}{if(this._registeredResourceTemplates[e])throw new Error(`Resource template ${e} is already registered`);const r=this._createRegisteredResourceTemplate(e,o.title,t,o,n);return this.setResourceRequestHandlers(),this.sendResourceListChanged(),r}}_createRegisteredResource(e,t,o,n,r){const s={name:e,title:t,metadata:n,readCallback:r,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({uri:null}),update:e=>{void 0!==e.uri&&e.uri!==o&&(delete this._registeredResources[o],e.uri&&(this._registeredResources[e.uri]=s)),void 0!==e.name&&(s.name=e.name),void 0!==e.title&&(s.title=e.title),void 0!==e.metadata&&(s.metadata=e.metadata),void 0!==e.callback&&(s.readCallback=e.callback),void 0!==e.enabled&&(s.enabled=e.enabled),this.sendResourceListChanged()}};return this._registeredResources[o]=s,s}_createRegisteredResourceTemplate(e,t,o,n,r){const s={resourceTemplate:o,title:t,metadata:n,readCallback:r,enabled:!0,disable:()=>s.update({enabled:!1}),enable:()=>s.update({enabled:!0}),remove:()=>s.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredResourceTemplates[e],t.name&&(this._registeredResourceTemplates[t.name]=s)),void 0!==t.title&&(s.title=t.title),void 0!==t.template&&(s.resourceTemplate=t.template),void 0!==t.metadata&&(s.metadata=t.metadata),void 0!==t.callback&&(s.readCallback=t.callback),void 0!==t.enabled&&(s.enabled=t.enabled),this.sendResourceListChanged()}};this._registeredResourceTemplates[e]=s;const a=o.uriTemplate.variableNames;return Array.isArray(a)&&a.some(e=>!!o.completeCallback(e))&&this.setCompletionRequestHandler(),s}_createRegisteredPrompt(e,t,o,n,s){const a={title:t,description:o,argsSchema:void 0===n?void 0:(0,r.objectFromShape)(n),callback:s,enabled:!0,disable:()=>a.update({enabled:!1}),enable:()=>a.update({enabled:!0}),remove:()=>a.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&(delete this._registeredPrompts[e],t.name&&(this._registeredPrompts[t.name]=a)),void 0!==t.title&&(a.title=t.title),void 0!==t.description&&(a.description=t.description),void 0!==t.argsSchema&&(a.argsSchema=(0,r.objectFromShape)(t.argsSchema)),void 0!==t.callback&&(a.callback=t.callback),void 0!==t.enabled&&(a.enabled=t.enabled),this.sendPromptListChanged()}};if(this._registeredPrompts[e]=a,n){Object.values(n).some(e=>{const t=e instanceof l.ZodOptional?e._def?.innerType:e;return(0,i.isCompletable)(t)})&&this.setCompletionRequestHandler()}return a}_createRegisteredTool(e,t,o,n,s,a,i,d,u){(0,c.validateAndWarnToolName)(e);const l={title:t,description:o,inputSchema:getZodSchemaObject(n),outputSchema:getZodSchemaObject(s),annotations:a,execution:i,_meta:d,handler:u,enabled:!0,disable:()=>l.update({enabled:!1}),enable:()=>l.update({enabled:!0}),remove:()=>l.update({name:null}),update:t=>{void 0!==t.name&&t.name!==e&&("string"==typeof t.name&&(0,c.validateAndWarnToolName)(t.name),delete this._registeredTools[e],t.name&&(this._registeredTools[t.name]=l)),void 0!==t.title&&(l.title=t.title),void 0!==t.description&&(l.description=t.description),void 0!==t.paramsSchema&&(l.inputSchema=(0,r.objectFromShape)(t.paramsSchema)),void 0!==t.outputSchema&&(l.outputSchema=(0,r.objectFromShape)(t.outputSchema)),void 0!==t.callback&&(l.handler=t.callback),void 0!==t.annotations&&(l.annotations=t.annotations),void 0!==t._meta&&(l._meta=t._meta),void 0!==t.enabled&&(l.enabled=t.enabled),this.sendToolListChanged()}};return this._registeredTools[e]=l,this.setToolRequestHandlers(),this.sendToolListChanged(),l}tool(e,...t){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);let o,n,r;if("string"==typeof t[0]&&(o=t.shift()),t.length>1){const e=t[0];isZodRawShapeCompat(e)?(n=t.shift(),t.length>1&&"object"==typeof t[0]&&null!==t[0]&&!isZodRawShapeCompat(t[0])&&(r=t.shift())):"object"==typeof e&&null!==e&&(r=t.shift())}const s=t[0];return this._createRegisteredTool(e,void 0,o,n,undefined,r,{taskSupport:"forbidden"},void 0,s)}registerTool(e,t,o){if(this._registeredTools[e])throw new Error(`Tool ${e} is already registered`);const{title:n,description:r,inputSchema:s,outputSchema:a,annotations:i,_meta:d}=t;return this._createRegisteredTool(e,n,r,s,a,i,{taskSupport:"forbidden"},d,o)}prompt(e,...t){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);let o,n;"string"==typeof t[0]&&(o=t.shift()),t.length>1&&(n=t.shift());const r=t[0],s=this._createRegisteredPrompt(e,void 0,o,n,r);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),s}registerPrompt(e,t,o){if(this._registeredPrompts[e])throw new Error(`Prompt ${e} is already registered`);const{title:n,description:r,argsSchema:s}=t,a=this._createRegisteredPrompt(e,n,r,s,o);return this.setPromptRequestHandlers(),this.sendPromptListChanged(),a}isConnected(){return void 0!==this.server.transport}async sendLoggingMessage(e,t){return this.server.sendLoggingMessage(e,t)}sendResourceListChanged(){this.isConnected()&&this.server.sendResourceListChanged()}sendToolListChanged(){this.isConnected()&&this.server.sendToolListChanged()}sendPromptListChanged(){this.isConnected()&&this.server.sendPromptListChanged()}}class ResourceTemplate{constructor(e,t){this._callbacks=t,this._uriTemplate="string"==typeof e?new d.UriTemplate(e):e}get uriTemplate(){return this._uriTemplate}get listCallback(){return this._callbacks.list}completeCallback(e){return this._callbacks.complete?.[e]}}const m={type:"object",properties:{}};function isZodTypeLike(e){return null!==e&&"object"==typeof e&&"parse"in e&&"function"==typeof e.parse&&"safeParse"in e&&"function"==typeof e.safeParse}function isZodRawShapeCompat(e){return"object"==typeof e&&null!==e&&(!function isZodSchemaInstance(e){return"_def"in e||"_zod"in e||isZodTypeLike(e)}(e)&&(0===Object.keys(e).length||Object.values(e).some(isZodTypeLike)))}function getZodSchemaObject(e){if(e)return isZodRawShapeCompat(e)?(0,r.objectFromShape)(e):e}function promptArgumentsFromSchema(e){const t=(0,r.getObjectShape)(e);return t?Object.entries(t).map(([e,t])=>({name:e,description:(0,r.getSchemaDescription)(t),required:!(0,r.isSchemaOptional)(t)})):[]}function getMethodValue(e){const t=(0,r.getObjectShape)(e),o=t?.method;if(!o)throw new Error("Schema is missing a method literal");const n=(0,r.getLiteralValue)(o);if("string"==typeof n)return n;throw new Error("Schema method literal must be a string")}function createCompletionResult(e){return{completion:{values:e.slice(0,100),total:e.length,hasMore:e.length>100}}}const p={completion:{values:[],hasMore:!1}}},"./node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js":function(e,t,o){o.r(t),o.d(t,{getLiteralValue:function(){return getLiteralValue},getObjectShape:function(){return getObjectShape},getParseErrorMessage:function(){return getParseErrorMessage},getSchemaDescription:function(){return getSchemaDescription},isSchemaOptional:function(){return isSchemaOptional},isZ4Schema:function(){return isZ4Schema},normalizeObjectSchema:function(){return normalizeObjectSchema},objectFromShape:function(){return objectFromShape},safeParse:function(){return safeParse},safeParseAsync:function(){return safeParseAsync}});var n=o("./node_modules/zod/v3/types.js"),r=o("./node_modules/zod/v4/core/parse.js"),s=o("./node_modules/zod/v4/mini/schemas.js");function isZ4Schema(e){return!!e._zod}function objectFromShape(e){const t=Object.values(e);if(0===t.length)return s.object({});const o=t.every(isZ4Schema),r=t.every(e=>!isZ4Schema(e));if(o)return s.object(e);if(r)return n.object(e);throw new Error("Mixed Zod versions detected in object shape.")}function safeParse(e,t){if(isZ4Schema(e)){return r.safeParse(e,t)}return e.safeParse(t)}async function safeParseAsync(e,t){if(isZ4Schema(e)){return await r.safeParseAsync(e,t)}const o=e;return await o.safeParseAsync(t)}function getObjectShape(e){if(!e)return;let t;if(isZ4Schema(e)){const o=e;t=o._zod?.def?.shape}else{t=e.shape}if(t){if("function"==typeof t)try{return t()}catch{return}return t}}function normalizeObjectSchema(e){if(e){if("object"==typeof e){const t=e;if(!e._def&&!t._zod){const t=Object.values(e);if(t.length>0&&t.every(e=>"object"==typeof e&&null!==e&&(void 0!==e._def||void 0!==e._zod||"function"==typeof e.parse)))return objectFromShape(e)}}if(isZ4Schema(e)){const t=e,o=t._zod?.def;if(o&&("object"===o.type||void 0!==o.shape))return e}else{if(void 0!==e.shape)return e}}}function getParseErrorMessage(e){if(e&&"object"==typeof e){if("message"in e&&"string"==typeof e.message)return e.message;if("issues"in e&&Array.isArray(e.issues)&&e.issues.length>0){const t=e.issues[0];if(t&&"object"==typeof t&&"message"in t)return String(t.message)}try{return JSON.stringify(e)}catch{return String(e)}}return String(e)}function getSchemaDescription(e){return e.description}function isSchemaOptional(e){if(isZ4Schema(e)){const t=e;return"optional"===t._zod?.def?.type}const t=e;return"function"==typeof e.isOptional?e.isOptional():"ZodOptional"===t._def?.typeName}function getLiteralValue(e){if(isZ4Schema(e)){const t=e,o=t._zod?.def;if(o){if(void 0!==o.value)return o.value;if(Array.isArray(o.values)&&o.values.length>0)return o.values[0]}}const t=e._def;if(t){if(void 0!==t.value)return t.value;if(Array.isArray(t.values)&&t.values.length>0)return t.values[0]}const o=e.value;if(void 0!==o)return o}},"./node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js":function(e,t,o){o.r(t),o.d(t,{getMethodLiteral:function(){return getMethodLiteral},parseWithCompat:function(){return parseWithCompat},toJsonSchemaCompat:function(){return toJsonSchemaCompat}});var n=o("./node_modules/zod/v4/core/to-json-schema.js"),r=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/index.js");function toJsonSchemaCompat(e,t){return(0,r.isZ4Schema)(e)?n.toJSONSchema(e,{target:(o=t?.target,o?"jsonSchema7"===o||"draft-7"===o?"draft-7":"jsonSchema2019-09"===o||"draft-2020-12"===o?"draft-2020-12":"draft-7":"draft-7"),io:t?.pipeStrategy??"input"}):(0,s.zodToJsonSchema)(e,{strictUnions:t?.strictUnions??!0,pipeStrategy:t?.pipeStrategy??"input"});var o}function getMethodLiteral(e){const t=(0,r.getObjectShape)(e),o=t?.method;if(!o)throw new Error("Schema is missing a method literal");const n=(0,r.getLiteralValue)(o);if("string"!=typeof n)throw new Error("Schema method literal must be a string");return n}function parseWithCompat(e,t){const o=(0,r.safeParse)(e,t);if(!o.success)throw o.error;return o.data}},"./node_modules/@modelcontextprotocol/sdk/dist/esm/shared/protocol.js":function(e,t,o){o.r(t),o.d(t,{DEFAULT_REQUEST_TIMEOUT_MSEC:function(){return i},Protocol:function(){return Protocol},mergeCapabilities:function(){return mergeCapabilities}});var n=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js"),r=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/types.js"),s=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/experimental/tasks/interfaces.js"),a=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-json-schema-compat.js");const i=6e4;class Protocol{constructor(e){this._options=e,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(r.CancelledNotificationSchema,e=>{this._oncancel(e)}),this.setNotificationHandler(r.ProgressNotificationSchema,e=>{this._onprogress(e)}),this.setRequestHandler(r.PingRequestSchema,e=>({})),this._taskStore=e?.taskStore,this._taskMessageQueue=e?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(r.GetTaskRequestSchema,async(e,t)=>{const o=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!o)throw new r.McpError(r.ErrorCode.InvalidParams,"Failed to retrieve task: Task not found");return{...o}}),this.setRequestHandler(r.GetTaskPayloadRequestSchema,async(e,t)=>{const handleTaskResult=async()=>{const o=e.params.taskId;if(this._taskMessageQueue){let e;for(;e=await this._taskMessageQueue.dequeue(o,t.sessionId);){if("response"===e.type||"error"===e.type){const t=e.message,o=t.id,n=this._requestResolvers.get(o);if(n)if(this._requestResolvers.delete(o),"response"===e.type)n(t);else{const e=t;n(new r.McpError(e.error.code,e.error.message,e.error.data))}else{const t="response"===e.type?"Response":"Error";this._onerror(new Error(`${t} handler missing for request ${o}`))}continue}await(this._transport?.send(e.message,{relatedRequestId:t.requestId}))}}const n=await this._taskStore.getTask(o,t.sessionId);if(!n)throw new r.McpError(r.ErrorCode.InvalidParams,`Task not found: ${o}`);if(!(0,s.isTerminal)(n.status))return await this._waitForTaskUpdate(o,t.signal),await handleTaskResult();if((0,s.isTerminal)(n.status)){const e=await this._taskStore.getTaskResult(o,t.sessionId);return this._clearTaskQueue(o),{...e,_meta:{...e._meta,[r.RELATED_TASK_META_KEY]:{taskId:o}}}}return await handleTaskResult()};return await handleTaskResult()}),this.setRequestHandler(r.ListTasksRequestSchema,async(e,t)=>{try{const{tasks:o,nextCursor:n}=await this._taskStore.listTasks(e.params?.cursor,t.sessionId);return{tasks:o,nextCursor:n,_meta:{}}}catch(e){throw new r.McpError(r.ErrorCode.InvalidParams,`Failed to list tasks: ${e instanceof Error?e.message:String(e)}`)}}),this.setRequestHandler(r.CancelTaskRequestSchema,async(e,t)=>{try{const o=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!o)throw new r.McpError(r.ErrorCode.InvalidParams,`Task not found: ${e.params.taskId}`);if((0,s.isTerminal)(o.status))throw new r.McpError(r.ErrorCode.InvalidParams,`Cannot cancel task in terminal status: ${o.status}`);await this._taskStore.updateTaskStatus(e.params.taskId,"cancelled","Client cancelled task execution.",t.sessionId),this._clearTaskQueue(e.params.taskId);const n=await this._taskStore.getTask(e.params.taskId,t.sessionId);if(!n)throw new r.McpError(r.ErrorCode.InvalidParams,`Task not found after cancellation: ${e.params.taskId}`);return{_meta:{},...n}}catch(e){if(e instanceof r.McpError)throw e;throw new r.McpError(r.ErrorCode.InvalidRequest,`Failed to cancel task: ${e instanceof Error?e.message:String(e)}`)}}))}async _oncancel(e){if(!e.params.requestId)return;const t=this._requestHandlerAbortControllers.get(e.params.requestId);t?.abort(e.params.reason)}_setupTimeout(e,t,o,n,r=!1){this._timeoutInfo.set(e,{timeoutId:setTimeout(n,t),startTime:Date.now(),timeout:t,maxTotalTimeout:o,resetTimeoutOnProgress:r,onTimeout:n})}_resetTimeout(e){const t=this._timeoutInfo.get(e);if(!t)return!1;const o=Date.now()-t.startTime;if(t.maxTotalTimeout&&o>=t.maxTotalTimeout)throw this._timeoutInfo.delete(e),r.McpError.fromError(r.ErrorCode.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:t.maxTotalTimeout,totalElapsed:o});return clearTimeout(t.timeoutId),t.timeoutId=setTimeout(t.onTimeout,t.timeout),!0}_cleanupTimeout(e){const t=this._timeoutInfo.get(e);t&&(clearTimeout(t.timeoutId),this._timeoutInfo.delete(e))}async connect(e){if(this._transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=e;const t=this.transport?.onclose;this._transport.onclose=()=>{t?.(),this._onclose()};const o=this.transport?.onerror;this._transport.onerror=e=>{o?.(e),this._onerror(e)};const n=this._transport?.onmessage;this._transport.onmessage=(e,t)=>{n?.(e,t),(0,r.isJSONRPCResultResponse)(e)||(0,r.isJSONRPCErrorResponse)(e)?this._onresponse(e):(0,r.isJSONRPCRequest)(e)?this._onrequest(e,t):(0,r.isJSONRPCNotification)(e)?this._onnotification(e):this._onerror(new Error(`Unknown message type: ${JSON.stringify(e)}`))},await this._transport.start()}_onclose(){const e=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.clear();for(const e of this._requestHandlerAbortControllers.values())e.abort();this._requestHandlerAbortControllers.clear();const t=r.McpError.fromError(r.ErrorCode.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const o of e.values())o(t)}_onerror(e){this.onerror?.(e)}_onnotification(e){const t=this._notificationHandlers.get(e.method)??this.fallbackNotificationHandler;void 0!==t&&Promise.resolve().then(()=>t(e)).catch(e=>this._onerror(new Error(`Uncaught error in notification handler: ${e}`)))}_onrequest(e,t){const o=this._requestHandlers.get(e.method)??this.fallbackRequestHandler,n=this._transport,s=e.params?._meta?.[r.RELATED_TASK_META_KEY]?.taskId;if(void 0===o){const t={jsonrpc:"2.0",id:e.id,error:{code:r.ErrorCode.MethodNotFound,message:"Method not found"}};return void(s&&this._taskMessageQueue?this._enqueueTaskMessage(s,{type:"error",message:t,timestamp:Date.now()},n?.sessionId).catch(e=>this._onerror(new Error(`Failed to enqueue error response: ${e}`))):n?.send(t).catch(e=>this._onerror(new Error(`Failed to send an error response: ${e}`))))}const a=new AbortController;this._requestHandlerAbortControllers.set(e.id,a);const i=(0,r.isTaskAugmentedRequestParams)(e.params)?e.params.task:void 0,d=this._taskStore?this.requestTaskStore(e,n?.sessionId):void 0,c={signal:a.signal,sessionId:n?.sessionId,_meta:e.params?._meta,sendNotification:async t=>{if(a.signal.aborted)return;const o={relatedRequestId:e.id};s&&(o.relatedTask={taskId:s}),await this.notification(t,o)},sendRequest:async(t,o,n)=>{if(a.signal.aborted)throw new r.McpError(r.ErrorCode.ConnectionClosed,"Request was cancelled");const i={...n,relatedRequestId:e.id};s&&!i.relatedTask&&(i.relatedTask={taskId:s});const c=i.relatedTask?.taskId??s;return c&&d&&await d.updateTaskStatus(c,"input_required"),await this.request(t,o,i)},authInfo:t?.authInfo,requestId:e.id,requestInfo:t?.requestInfo,taskId:s,taskStore:d,taskRequestedTtl:i?.ttl,closeSSEStream:t?.closeSSEStream,closeStandaloneSSEStream:t?.closeStandaloneSSEStream};Promise.resolve().then(()=>{i&&this.assertTaskHandlerCapability(e.method)}).then(()=>o(e,c)).then(async t=>{if(a.signal.aborted)return;const o={result:t,jsonrpc:"2.0",id:e.id};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"response",message:o,timestamp:Date.now()},n?.sessionId):await(n?.send(o))},async t=>{if(a.signal.aborted)return;const o={jsonrpc:"2.0",id:e.id,error:{code:Number.isSafeInteger(t.code)?t.code:r.ErrorCode.InternalError,message:t.message??"Internal error",...void 0!==t.data&&{data:t.data}}};s&&this._taskMessageQueue?await this._enqueueTaskMessage(s,{type:"error",message:o,timestamp:Date.now()},n?.sessionId):await(n?.send(o))}).catch(e=>this._onerror(new Error(`Failed to send response: ${e}`))).finally(()=>{this._requestHandlerAbortControllers.delete(e.id)})}_onprogress(e){const{progressToken:t,...o}=e.params,n=Number(t),r=this._progressHandlers.get(n);if(!r)return void this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(e)}`));const s=this._responseHandlers.get(n),a=this._timeoutInfo.get(n);if(a&&s&&a.resetTimeoutOnProgress)try{this._resetTimeout(n)}catch(e){return this._responseHandlers.delete(n),this._progressHandlers.delete(n),this._cleanupTimeout(n),void s(e)}r(o)}_onresponse(e){const t=Number(e.id),o=this._requestResolvers.get(t);if(o){if(this._requestResolvers.delete(t),(0,r.isJSONRPCResultResponse)(e))o(e);else{o(new r.McpError(e.error.code,e.error.message,e.error.data))}return}const n=this._responseHandlers.get(t);if(void 0===n)return void this._onerror(new Error(`Received a response for an unknown message ID: ${JSON.stringify(e)}`));this._responseHandlers.delete(t),this._cleanupTimeout(t);let s=!1;if((0,r.isJSONRPCResultResponse)(e)&&e.result&&"object"==typeof e.result){const o=e.result;if(o.task&&"object"==typeof o.task){const e=o.task;"string"==typeof e.taskId&&(s=!0,this._taskProgressTokens.set(e.taskId,t))}}if(s||this._progressHandlers.delete(t),(0,r.isJSONRPCResultResponse)(e))n(e);else{n(r.McpError.fromError(e.error.code,e.error.message,e.error.data))}}get transport(){return this._transport}async close(){await(this._transport?.close())}async*requestStream(e,t,o){const{task:n}=o??{};if(!n){try{const n=await this.request(e,t,o);yield{type:"result",result:n}}catch(e){yield{type:"error",error:e instanceof r.McpError?e:new r.McpError(r.ErrorCode.InternalError,String(e))}}return}let a;try{const n=await this.request(e,r.CreateTaskResultSchema,o);if(!n.task)throw new r.McpError(r.ErrorCode.InternalError,"Task creation did not return a task");for(a=n.task.taskId,yield{type:"taskCreated",task:n.task};;){const e=await this.getTask({taskId:a},o);if(yield{type:"taskStatus",task:e},(0,s.isTerminal)(e.status)){if("completed"===e.status){const e=await this.getTaskResult({taskId:a},t,o);yield{type:"result",result:e}}else"failed"===e.status?yield{type:"error",error:new r.McpError(r.ErrorCode.InternalError,`Task ${a} failed`)}:"cancelled"===e.status&&(yield{type:"error",error:new r.McpError(r.ErrorCode.InternalError,`Task ${a} was cancelled`)});return}if("input_required"===e.status){const e=await this.getTaskResult({taskId:a},t,o);return void(yield{type:"result",result:e})}const n=e.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(e=>setTimeout(e,n)),o?.signal?.throwIfAborted()}}catch(e){yield{type:"error",error:e instanceof r.McpError?e:new r.McpError(r.ErrorCode.InternalError,String(e))}}}request(e,t,o){const{relatedRequestId:s,resumptionToken:a,onresumptiontoken:d,task:c,relatedTask:u}=o??{};return new Promise((l,m)=>{const earlyReject=e=>{m(e)};if(!this._transport)return void earlyReject(new Error("Not connected"));if(!0===this._options?.enforceStrictCapabilities)try{this.assertCapabilityForMethod(e.method),c&&this.assertTaskCapability(e.method)}catch(e){return void earlyReject(e)}o?.signal?.throwIfAborted();const p=this._requestMessageId++,f={...e,jsonrpc:"2.0",id:p};o?.onprogress&&(this._progressHandlers.set(p,o.onprogress),f.params={...e.params,_meta:{...e.params?._meta||{},progressToken:p}}),c&&(f.params={...f.params,task:c}),u&&(f.params={...f.params,_meta:{...f.params?._meta||{},[r.RELATED_TASK_META_KEY]:u}});const cancel=e=>{this._responseHandlers.delete(p),this._progressHandlers.delete(p),this._cleanupTimeout(p),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:p,reason:String(e)}},{relatedRequestId:s,resumptionToken:a,onresumptiontoken:d}).catch(e=>this._onerror(new Error(`Failed to send cancellation: ${e}`)));const t=e instanceof r.McpError?e:new r.McpError(r.ErrorCode.RequestTimeout,String(e));m(t)};this._responseHandlers.set(p,e=>{if(!o?.signal?.aborted){if(e instanceof Error)return m(e);try{const o=(0,n.safeParse)(t,e.result);o.success?l(o.data):m(o.error)}catch(e){m(e)}}}),o?.signal?.addEventListener("abort",()=>{cancel(o?.signal?.reason)});const h=o?.timeout??i;this._setupTimeout(p,h,o?.maxTotalTimeout,()=>cancel(r.McpError.fromError(r.ErrorCode.RequestTimeout,"Request timed out",{timeout:h})),o?.resetTimeoutOnProgress??!1);const g=u?.taskId;if(g){const responseResolver=e=>{const t=this._responseHandlers.get(p);t?t(e):this._onerror(new Error(`Response handler missing for side-channeled request ${p}`))};this._requestResolvers.set(p,responseResolver),this._enqueueTaskMessage(g,{type:"request",message:f,timestamp:Date.now()}).catch(e=>{this._cleanupTimeout(p),m(e)})}else this._transport.send(f,{relatedRequestId:s,resumptionToken:a,onresumptiontoken:d}).catch(e=>{this._cleanupTimeout(p),m(e)})})}async getTask(e,t){return this.request({method:"tasks/get",params:e},r.GetTaskResultSchema,t)}async getTaskResult(e,t,o){return this.request({method:"tasks/result",params:e},t,o)}async listTasks(e,t){return this.request({method:"tasks/list",params:e},r.ListTasksResultSchema,t)}async cancelTask(e,t){return this.request({method:"tasks/cancel",params:e},r.CancelTaskResultSchema,t)}async notification(e,t){if(!this._transport)throw new Error("Not connected");this.assertNotificationCapability(e.method);const o=t?.relatedTask?.taskId;if(o){const n={...e,jsonrpc:"2.0",params:{...e.params,_meta:{...e.params?._meta||{},[r.RELATED_TASK_META_KEY]:t.relatedTask}}};return void await this._enqueueTaskMessage(o,{type:"notification",message:n,timestamp:Date.now()})}if((this._options?.debouncedNotificationMethods??[]).includes(e.method)&&!e.params&&!t?.relatedRequestId&&!t?.relatedTask){if(this._pendingDebouncedNotifications.has(e.method))return;return this._pendingDebouncedNotifications.add(e.method),void Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(e.method),!this._transport)return;let o={...e,jsonrpc:"2.0"};t?.relatedTask&&(o={...o,params:{...o.params,_meta:{...o.params?._meta||{},[r.RELATED_TASK_META_KEY]:t.relatedTask}}}),this._transport?.send(o,t).catch(e=>this._onerror(e))})}let n={...e,jsonrpc:"2.0"};t?.relatedTask&&(n={...n,params:{...n.params,_meta:{...n.params?._meta||{},[r.RELATED_TASK_META_KEY]:t.relatedTask}}}),await this._transport.send(n,t)}setRequestHandler(e,t){const o=(0,a.getMethodLiteral)(e);this.assertRequestHandlerCapability(o),this._requestHandlers.set(o,(o,n)=>{const r=(0,a.parseWithCompat)(e,o);return Promise.resolve(t(r,n))})}removeRequestHandler(e){this._requestHandlers.delete(e)}assertCanSetRequestHandler(e){if(this._requestHandlers.has(e))throw new Error(`A request handler for ${e} already exists, which would be overridden`)}setNotificationHandler(e,t){const o=(0,a.getMethodLiteral)(e);this._notificationHandlers.set(o,o=>{const n=(0,a.parseWithCompat)(e,o);return Promise.resolve(t(n))})}removeNotificationHandler(e){this._notificationHandlers.delete(e)}_cleanupTaskProgressHandler(e){const t=this._taskProgressTokens.get(e);void 0!==t&&(this._progressHandlers.delete(t),this._taskProgressTokens.delete(e))}async _enqueueTaskMessage(e,t,o){if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const n=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(e,t,o,n)}async _clearTaskQueue(e,t){if(this._taskMessageQueue){const o=await this._taskMessageQueue.dequeueAll(e,t);for(const t of o)if("request"===t.type&&(0,r.isJSONRPCRequest)(t.message)){const o=t.message.id,n=this._requestResolvers.get(o);n?(n(new r.McpError(r.ErrorCode.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(o)):this._onerror(new Error(`Resolver missing for request ${o} during task ${e} cleanup`))}}}async _waitForTaskUpdate(e,t){let o=this._options?.defaultTaskPollInterval??1e3;try{const t=await(this._taskStore?.getTask(e));t?.pollInterval&&(o=t.pollInterval)}catch{}return new Promise((e,n)=>{if(t.aborted)return void n(new r.McpError(r.ErrorCode.InvalidRequest,"Request cancelled"));const s=setTimeout(e,o);t.addEventListener("abort",()=>{clearTimeout(s),n(new r.McpError(r.ErrorCode.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(e,t){const o=this._taskStore;if(!o)throw new Error("No task store configured");return{createTask:async n=>{if(!e)throw new Error("No request provided");return await o.createTask(n,e.id,{method:e.method,params:e.params},t)},getTask:async e=>{const n=await o.getTask(e,t);if(!n)throw new r.McpError(r.ErrorCode.InvalidParams,"Failed to retrieve task: Task not found");return n},storeTaskResult:async(e,n,a)=>{await o.storeTaskResult(e,n,a,t);const i=await o.getTask(e,t);if(i){const t=r.TaskStatusNotificationSchema.parse({method:"notifications/tasks/status",params:i});await this.notification(t),(0,s.isTerminal)(i.status)&&this._cleanupTaskProgressHandler(e)}},getTaskResult:e=>o.getTaskResult(e,t),updateTaskStatus:async(e,n,a)=>{const i=await o.getTask(e,t);if(!i)throw new r.McpError(r.ErrorCode.InvalidParams,`Task "${e}" not found - it may have been cleaned up`);if((0,s.isTerminal)(i.status))throw new r.McpError(r.ErrorCode.InvalidParams,`Cannot update task "${e}" from terminal status "${i.status}" to "${n}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await o.updateTaskStatus(e,n,a,t);const d=await o.getTask(e,t);if(d){const t=r.TaskStatusNotificationSchema.parse({method:"notifications/tasks/status",params:d});await this.notification(t),(0,s.isTerminal)(d.status)&&this._cleanupTaskProgressHandler(e)}},listTasks:e=>o.listTasks(e,t)}}}function isPlainObject(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function mergeCapabilities(e,t){const o={...e};for(const e in t){const n=e,r=t[n];if(void 0===r)continue;const s=o[n];isPlainObject(s)&&isPlainObject(r)?o[n]={...s,...r}:o[n]=r}return o}},"./node_modules/@modelcontextprotocol/sdk/dist/esm/shared/toolNameValidation.js":function(e,t,o){o.r(t),o.d(t,{issueToolNameWarning:function(){return issueToolNameWarning},validateAndWarnToolName:function(){return validateAndWarnToolName},validateToolName:function(){return validateToolName}});const n=/^[A-Za-z0-9._-]{1,128}$/;function validateToolName(e){const t=[];if(0===e.length)return{isValid:!1,warnings:["Tool name cannot be empty"]};if(e.length>128)return{isValid:!1,warnings:[`Tool name exceeds maximum length of 128 characters (current: ${e.length})`]};if(e.includes(" ")&&t.push("Tool name contains spaces, which may cause parsing issues"),e.includes(",")&&t.push("Tool name contains commas, which may cause parsing issues"),(e.startsWith("-")||e.endsWith("-"))&&t.push("Tool name starts or ends with a dash, which may cause parsing issues in some contexts"),(e.startsWith(".")||e.endsWith("."))&&t.push("Tool name starts or ends with a dot, which may cause parsing issues in some contexts"),!n.test(e)){const o=e.split("").filter(e=>!/[A-Za-z0-9._-]/.test(e)).filter((e,t,o)=>o.indexOf(e)===t);return t.push(`Tool name contains invalid characters: ${o.map(e=>`"${e}"`).join(", ")}`,"Allowed characters are: A-Z, a-z, 0-9, underscore (_), dash (-), and dot (.)"),{isValid:!1,warnings:t}}return{isValid:!0,warnings:t}}function issueToolNameWarning(e,t){if(t.length>0){console.warn(`Tool name validation warning for "${e}":`);for(const e of t)console.warn(`  - ${e}`);console.warn("Tool registration will proceed, but this may cause compatibility issues."),console.warn("Consider updating the tool name to conform to the MCP tool naming standard."),console.warn("See SEP: Specify Format for Tool Names (https://github.com/modelcontextprotocol/modelcontextprotocol/issues/986) for more details.")}}function validateAndWarnToolName(e){const t=validateToolName(e);return issueToolNameWarning(e,t.warnings),t.isValid}},"./node_modules/@modelcontextprotocol/sdk/dist/esm/shared/uriTemplate.js":function(e,t,o){o.r(t),o.d(t,{UriTemplate:function(){return UriTemplate}});const n=1e6,r=1e6;class UriTemplate{static isTemplate(e){return/\{[^}\s]+\}/.test(e)}static validateLength(e,t,o){if(e.length>t)throw new Error(`${o} exceeds maximum length of ${t} characters (got ${e.length})`)}get variableNames(){return this.parts.flatMap(e=>"string"==typeof e?[]:e.names)}constructor(e){UriTemplate.validateLength(e,n,"Template"),this.template=e,this.parts=this.parse(e)}toString(){return this.template}parse(e){const t=[];let o="",n=0,s=0;for(;n<e.length;)if("{"===e[n]){o&&(t.push(o),o="");const a=e.indexOf("}",n);if(-1===a)throw new Error("Unclosed template expression");if(s++,s>1e4)throw new Error("Template contains too many expressions (max 10000)");const i=e.slice(n+1,a),d=this.getOperator(i),c=i.includes("*"),u=this.getNames(i),l=u[0];for(const e of u)UriTemplate.validateLength(e,r,"Variable name");t.push({name:l,operator:d,names:u,exploded:c}),n=a+1}else o+=e[n],n++;return o&&t.push(o),t}getOperator(e){return["+","#",".","/","?","&"].find(t=>e.startsWith(t))||""}getNames(e){const t=this.getOperator(e);return e.slice(t.length).split(",").map(e=>e.replace("*","").trim()).filter(e=>e.length>0)}encodeValue(e,t){return UriTemplate.validateLength(e,r,"Variable value"),"+"===t||"#"===t?encodeURI(e):encodeURIComponent(e)}expandPart(e,t){if("?"===e.operator||"&"===e.operator){const o=e.names.map(o=>{const n=t[o];if(void 0===n)return"";return`${o}=${Array.isArray(n)?n.map(t=>this.encodeValue(t,e.operator)).join(","):this.encodeValue(n.toString(),e.operator)}`}).filter(e=>e.length>0);if(0===o.length)return"";return("?"===e.operator?"?":"&")+o.join("&")}if(e.names.length>1){const o=e.names.map(e=>t[e]).filter(e=>void 0!==e);return 0===o.length?"":o.map(e=>Array.isArray(e)?e[0]:e).join(",")}const o=t[e.name];if(void 0===o)return"";const n=(Array.isArray(o)?o:[o]).map(t=>this.encodeValue(t,e.operator));switch(e.operator){case"":case"+":default:return n.join(",");case"#":return"#"+n.join(",");case".":return"."+n.join(".");case"/":return"/"+n.join("/")}}expand(e){let t="",o=!1;for(const n of this.parts){if("string"==typeof n){t+=n;continue}const r=this.expandPart(n,e);r&&("?"!==n.operator&&"&"!==n.operator||!o?t+=r:t+=r.replace("?","&"),"?"!==n.operator&&"&"!==n.operator||(o=!0))}return t}escapeRegExp(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}partToRegExp(e){const t=[];for(const t of e.names)UriTemplate.validateLength(t,r,"Variable name");if("?"===e.operator||"&"===e.operator){for(let o=0;o<e.names.length;o++){const n=e.names[o],r=0===o?"\\"+e.operator:"&";t.push({pattern:r+this.escapeRegExp(n)+"=([^&]+)",name:n})}return t}let o;const n=e.name;switch(e.operator){case"":o=e.exploded?"([^/,]+(?:,[^/,]+)*)":"([^/,]+)";break;case"+":case"#":o="(.+)";break;case".":o="\\.([^/,]+)";break;case"/":o="/"+(e.exploded?"([^/,]+(?:,[^/,]+)*)":"([^/,]+)");break;default:o="([^/]+)"}return t.push({pattern:o,name:n}),t}match(e){UriTemplate.validateLength(e,n,"URI");let t="^";const o=[];for(const e of this.parts)if("string"==typeof e)t+=this.escapeRegExp(e);else{const n=this.partToRegExp(e);for(const{pattern:r,name:s}of n)t+=r,o.push({name:s,exploded:e.exploded})}t+="$",UriTemplate.validateLength(t,1e6,"Generated regex pattern");const r=new RegExp(t),s=e.match(r);if(!s)return null;const a={};for(let e=0;e<o.length;e++){const{name:t,exploded:n}=o[e],r=s[e+1],i=t.replace("*","");n&&r.includes(",")?a[i]=r.split(","):a[i]=r}return a}}},"./node_modules/@modelcontextprotocol/sdk/dist/esm/types.js":function(e,t,o){o.r(t),o.d(t,{AnnotationsSchema:function(){return $e},AudioContentSchema:function(){return We},BaseMetadataSchema:function(){return L},BlobResourceContentsSchema:function(){return ke},BooleanSchemaSchema:function(){return Et},CallToolRequestParamsSchema:function(){return ut},CallToolRequestSchema:function(){return lt},CallToolResultSchema:function(){return dt},CancelTaskRequestSchema:function(){return _e},CancelTaskResultSchema:function(){return ge},CancelledNotificationParamsSchema:function(){return O},CancelledNotificationSchema:function(){return A},ClientCapabilitiesSchema:function(){return B},ClientNotificationSchema:function(){return ao},ClientRequestSchema:function(){return so},ClientResultSchema:function(){return io},ClientTasksCapabilitySchema:function(){return F},CompatibilityCallToolResultSchema:function(){return ct},CompleteRequestParamsSchema:function(){return Qt},CompleteRequestSchema:function(){return Xt},CompleteResultSchema:function(){return eo},ContentBlockSchema:function(){return Xe},CreateMessageRequestParamsSchema:function(){return St},CreateMessageRequestSchema:function(){return Pt},CreateMessageResultSchema:function(){return Zt},CreateMessageResultWithToolsSchema:function(){return Tt},CreateTaskResultSchema:function(){return ie},CursorSchema:function(){return m},DEFAULT_NEGOTIATED_PROTOCOL_VERSION:function(){return a},ElicitRequestFormParamsSchema:function(){return qt},ElicitRequestParamsSchema:function(){return Ft},ElicitRequestSchema:function(){return Kt},ElicitRequestURLParamsSchema:function(){return Vt},ElicitResultSchema:function(){return Jt},ElicitationCompleteNotificationParamsSchema:function(){return Bt},ElicitationCompleteNotificationSchema:function(){return Ht},EmbeddedResourceSchema:function(){return Ye},EmptyResultSchema:function(){return N},EnumSchemaSchema:function(){return Lt},ErrorCode:function(){return T},GetPromptRequestParamsSchema:function(){return Ke},GetPromptRequestSchema:function(){return Be},GetPromptResultSchema:function(){return tt},GetTaskPayloadRequestSchema:function(){return me},GetTaskPayloadResultSchema:function(){return pe},GetTaskRequestSchema:function(){return ue},GetTaskResultSchema:function(){return le},IconSchema:function(){return D},IconsSchema:function(){return M},ImageContentSchema:function(){return Je},ImplementationSchema:function(){return U},InitializeRequestParamsSchema:function(){return H},InitializeRequestSchema:function(){return J},InitializeResultSchema:function(){return G},InitializedNotificationSchema:function(){return Y},JSONRPCErrorResponseSchema:function(){return E},JSONRPCErrorSchema:function(){return I},JSONRPCMessageSchema:function(){return C},JSONRPCNotificationSchema:function(){return S},JSONRPCRequestSchema:function(){return x},JSONRPCResponseSchema:function(){return R},JSONRPCResultResponseSchema:function(){return P},JSONRPC_VERSION:function(){return c},LATEST_PROTOCOL_VERSION:function(){return s},LegacyTitledEnumSchemaSchema:function(){return Nt},ListChangedOptionsBaseSchema:function(){return pt},ListPromptsRequestSchema:function(){return Ve},ListPromptsResultSchema:function(){return Fe},ListResourceTemplatesRequestSchema:function(){return Ze},ListResourceTemplatesResultSchema:function(){return Te},ListResourcesRequestSchema:function(){return Se},ListResourcesResultSchema:function(){return Pe},ListRootsRequestSchema:function(){return oo},ListRootsResultSchema:function(){return no},ListTasksRequestSchema:function(){return fe},ListTasksResultSchema:function(){return he},ListToolsRequestSchema:function(){return at},ListToolsResultSchema:function(){return it},LoggingLevelSchema:function(){return ft},LoggingMessageNotificationParamsSchema:function(){return gt},LoggingMessageNotificationSchema:function(){return yt},McpError:function(){return McpError},ModelHintSchema:function(){return vt},ModelPreferencesSchema:function(){return bt},MultiSelectEnumSchemaSchema:function(){return Mt},NotificationSchema:function(){return w},NumberSchemaSchema:function(){return zt},PaginatedRequestParamsSchema:function(){return oe},PaginatedRequestSchema:function(){return ne},PaginatedResultSchema:function(){return re},PingRequestSchema:function(){return Q},PrimitiveSchemaDefinitionSchema:function(){return Ut},ProgressNotificationParamsSchema:function(){return ee},ProgressNotificationSchema:function(){return te},ProgressSchema:function(){return X},ProgressTokenSchema:function(){return l},PromptArgumentSchema:function(){return Ue},PromptListChangedNotificationSchema:function(){return ot},PromptMessageSchema:function(){return et},PromptReferenceSchema:function(){return Yt},PromptSchema:function(){return qe},RELATED_TASK_META_KEY:function(){return d},ReadResourceRequestParamsSchema:function(){return Ie},ReadResourceRequestSchema:function(){return ze},ReadResourceResultSchema:function(){return Ce},RelatedTaskMetadataSchema:function(){return h},RequestIdSchema:function(){return j},RequestSchema:function(){return b},ResourceContentsSchema:function(){return ye},ResourceLinkSchema:function(){return Qe},ResourceListChangedNotificationSchema:function(){return Re},ResourceReferenceSchema:function(){return Gt},ResourceRequestParamsSchema:function(){return Ee},ResourceSchema:function(){return je},ResourceTemplateReferenceSchema:function(){return Wt},ResourceTemplateSchema:function(){return xe},ResourceUpdatedNotificationParamsSchema:function(){return Me},ResourceUpdatedNotificationSchema:function(){return Le},ResultSchema:function(){return $},RoleSchema:function(){return we},RootSchema:function(){return to},RootsListChangedNotificationSchema:function(){return ro},SUPPORTED_PROTOCOL_VERSIONS:function(){return i},SamplingContentSchema:function(){return $t},SamplingMessageContentBlockSchema:function(){return jt},SamplingMessageSchema:function(){return xt},ServerCapabilitiesSchema:function(){return W},ServerNotificationSchema:function(){return uo},ServerRequestSchema:function(){return co},ServerResultSchema:function(){return lo},ServerTasksCapabilitySchema:function(){return K},SetLevelRequestParamsSchema:function(){return ht},SetLevelRequestSchema:function(){return _t},SingleSelectEnumSchemaSchema:function(){return Ot},StringSchemaSchema:function(){return It},SubscribeRequestParamsSchema:function(){return Ne},SubscribeRequestSchema:function(){return Oe},TaskAugmentedRequestParamsSchema:function(){return v},TaskCreationParamsSchema:function(){return p},TaskMetadataSchema:function(){return f},TaskSchema:function(){return ae},TaskStatusNotificationParamsSchema:function(){return de},TaskStatusNotificationSchema:function(){return ce},TaskStatusSchema:function(){return se},TextContentSchema:function(){return He},TextResourceContentsSchema:function(){return ve},TitledMultiSelectEnumSchemaSchema:function(){return Dt},TitledSingleSelectEnumSchemaSchema:function(){return Rt},ToolAnnotationsSchema:function(){return nt},ToolChoiceSchema:function(){return kt},ToolExecutionSchema:function(){return rt},ToolListChangedNotificationSchema:function(){return mt},ToolResultContentSchema:function(){return wt},ToolSchema:function(){return st},ToolUseContentSchema:function(){return Ge},UnsubscribeRequestParamsSchema:function(){return Ae},UnsubscribeRequestSchema:function(){return De},UntitledMultiSelectEnumSchemaSchema:function(){return At},UntitledSingleSelectEnumSchemaSchema:function(){return Ct},UrlElicitationRequiredError:function(){return UrlElicitationRequiredError},assertCompleteRequestPrompt:function(){return assertCompleteRequestPrompt},assertCompleteRequestResourceTemplate:function(){return assertCompleteRequestResourceTemplate},isInitializeRequest:function(){return isInitializeRequest},isInitializedNotification:function(){return isInitializedNotification},isJSONRPCError:function(){return z},isJSONRPCErrorResponse:function(){return isJSONRPCErrorResponse},isJSONRPCNotification:function(){return isJSONRPCNotification},isJSONRPCRequest:function(){return isJSONRPCRequest},isJSONRPCResponse:function(){return Z},isJSONRPCResultResponse:function(){return isJSONRPCResultResponse},isTaskAugmentedRequestParams:function(){return isTaskAugmentedRequestParams}});var n=o("./node_modules/zod/v4/classic/schemas.js"),r=o("./node_modules/zod/v4/classic/iso.js");const s="2025-11-25",a="2025-03-26",i=[s,"2025-06-18","2025-03-26","2024-11-05","2024-10-07"],d="io.modelcontextprotocol/related-task",c="2.0",u=n.custom(e=>null!==e&&("object"==typeof e||"function"==typeof e)),l=n.union([n.string(),n.number().int()]),m=n.string(),p=n.looseObject({ttl:n.union([n.number(),n.null()]).optional(),pollInterval:n.number().optional()}),f=n.object({ttl:n.number().optional()}),h=n.object({taskId:n.string()}),g=n.looseObject({progressToken:l.optional(),[d]:h.optional()}),y=n.object({_meta:g.optional()}),v=y.extend({task:f.optional()}),isTaskAugmentedRequestParams=e=>v.safeParse(e).success,b=n.object({method:n.string(),params:y.loose().optional()}),k=n.object({_meta:g.optional()}),w=n.object({method:n.string(),params:k.loose().optional()}),$=n.looseObject({_meta:g.optional()}),j=n.union([n.string(),n.number().int()]),x=n.object({jsonrpc:n.literal(c),id:j,...b.shape}).strict(),isJSONRPCRequest=e=>x.safeParse(e).success,S=n.object({jsonrpc:n.literal(c),...w.shape}).strict(),isJSONRPCNotification=e=>S.safeParse(e).success,P=n.object({jsonrpc:n.literal(c),id:j,result:$}).strict(),isJSONRPCResultResponse=e=>P.safeParse(e).success,Z=isJSONRPCResultResponse;var T;!function(e){e[e.ConnectionClosed=-32e3]="ConnectionClosed",e[e.RequestTimeout=-32001]="RequestTimeout",e[e.ParseError=-32700]="ParseError",e[e.InvalidRequest=-32600]="InvalidRequest",e[e.MethodNotFound=-32601]="MethodNotFound",e[e.InvalidParams=-32602]="InvalidParams",e[e.InternalError=-32603]="InternalError",e[e.UrlElicitationRequired=-32042]="UrlElicitationRequired"}(T||(T={}));const E=n.object({jsonrpc:n.literal(c),id:j.optional(),error:n.object({code:n.number().int(),message:n.string(),data:n.unknown().optional()})}).strict(),I=E,isJSONRPCErrorResponse=e=>E.safeParse(e).success,z=isJSONRPCErrorResponse,C=n.union([x,S,P,E]),R=n.union([P,E]),N=$.strict(),O=k.extend({requestId:j.optional(),reason:n.string().optional()}),A=w.extend({method:n.literal("notifications/cancelled"),params:O}),D=n.object({src:n.string(),mimeType:n.string().optional(),sizes:n.array(n.string()).optional(),theme:n.enum(["light","dark"]).optional()}),M=n.object({icons:n.array(D).optional()}),L=n.object({name:n.string(),title:n.string().optional()}),U=L.extend({...L.shape,...M.shape,version:n.string(),websiteUrl:n.string().optional(),description:n.string().optional()}),q=n.intersection(n.object({applyDefaults:n.boolean().optional()}),n.record(n.string(),n.unknown())),V=n.preprocess(e=>e&&"object"==typeof e&&!Array.isArray(e)&&0===Object.keys(e).length?{form:{}}:e,n.intersection(n.object({form:q.optional(),url:u.optional()}),n.record(n.string(),n.unknown()).optional())),F=n.looseObject({list:u.optional(),cancel:u.optional(),requests:n.looseObject({sampling:n.looseObject({createMessage:u.optional()}).optional(),elicitation:n.looseObject({create:u.optional()}).optional()}).optional()}),K=n.looseObject({list:u.optional(),cancel:u.optional(),requests:n.looseObject({tools:n.looseObject({call:u.optional()}).optional()}).optional()}),B=n.object({experimental:n.record(n.string(),u).optional(),sampling:n.object({context:u.optional(),tools:u.optional()}).optional(),elicitation:V.optional(),roots:n.object({listChanged:n.boolean().optional()}).optional(),tasks:F.optional()}),H=y.extend({protocolVersion:n.string(),capabilities:B,clientInfo:U}),J=b.extend({method:n.literal("initialize"),params:H}),isInitializeRequest=e=>J.safeParse(e).success,W=n.object({experimental:n.record(n.string(),u).optional(),logging:u.optional(),completions:u.optional(),prompts:n.object({listChanged:n.boolean().optional()}).optional(),resources:n.object({subscribe:n.boolean().optional(),listChanged:n.boolean().optional()}).optional(),tools:n.object({listChanged:n.boolean().optional()}).optional(),tasks:K.optional()}),G=$.extend({protocolVersion:n.string(),capabilities:W,serverInfo:U,instructions:n.string().optional()}),Y=w.extend({method:n.literal("notifications/initialized"),params:k.optional()}),isInitializedNotification=e=>Y.safeParse(e).success,Q=b.extend({method:n.literal("ping"),params:y.optional()}),X=n.object({progress:n.number(),total:n.optional(n.number()),message:n.optional(n.string())}),ee=n.object({...k.shape,...X.shape,progressToken:l}),te=w.extend({method:n.literal("notifications/progress"),params:ee}),oe=y.extend({cursor:m.optional()}),ne=b.extend({params:oe.optional()}),re=$.extend({nextCursor:m.optional()}),se=n.enum(["working","input_required","completed","failed","cancelled"]),ae=n.object({taskId:n.string(),status:se,ttl:n.union([n.number(),n.null()]),createdAt:n.string(),lastUpdatedAt:n.string(),pollInterval:n.optional(n.number()),statusMessage:n.optional(n.string())}),ie=$.extend({task:ae}),de=k.merge(ae),ce=w.extend({method:n.literal("notifications/tasks/status"),params:de}),ue=b.extend({method:n.literal("tasks/get"),params:y.extend({taskId:n.string()})}),le=$.merge(ae),me=b.extend({method:n.literal("tasks/result"),params:y.extend({taskId:n.string()})}),pe=$.loose(),fe=ne.extend({method:n.literal("tasks/list")}),he=re.extend({tasks:n.array(ae)}),_e=b.extend({method:n.literal("tasks/cancel"),params:y.extend({taskId:n.string()})}),ge=$.merge(ae),ye=n.object({uri:n.string(),mimeType:n.optional(n.string()),_meta:n.record(n.string(),n.unknown()).optional()}),ve=ye.extend({text:n.string()}),be=n.string().refine(e=>{try{return atob(e),!0}catch{return!1}},{message:"Invalid Base64 string"}),ke=ye.extend({blob:be}),we=n.enum(["user","assistant"]),$e=n.object({audience:n.array(we).optional(),priority:n.number().min(0).max(1).optional(),lastModified:r.datetime({offset:!0}).optional()}),je=n.object({...L.shape,...M.shape,uri:n.string(),description:n.optional(n.string()),mimeType:n.optional(n.string()),annotations:$e.optional(),_meta:n.optional(n.looseObject({}))}),xe=n.object({...L.shape,...M.shape,uriTemplate:n.string(),description:n.optional(n.string()),mimeType:n.optional(n.string()),annotations:$e.optional(),_meta:n.optional(n.looseObject({}))}),Se=ne.extend({method:n.literal("resources/list")}),Pe=re.extend({resources:n.array(je)}),Ze=ne.extend({method:n.literal("resources/templates/list")}),Te=re.extend({resourceTemplates:n.array(xe)}),Ee=y.extend({uri:n.string()}),Ie=Ee,ze=b.extend({method:n.literal("resources/read"),params:Ie}),Ce=$.extend({contents:n.array(n.union([ve,ke]))}),Re=w.extend({method:n.literal("notifications/resources/list_changed"),params:k.optional()}),Ne=Ee,Oe=b.extend({method:n.literal("resources/subscribe"),params:Ne}),Ae=Ee,De=b.extend({method:n.literal("resources/unsubscribe"),params:Ae}),Me=k.extend({uri:n.string()}),Le=w.extend({method:n.literal("notifications/resources/updated"),params:Me}),Ue=n.object({name:n.string(),description:n.optional(n.string()),required:n.optional(n.boolean())}),qe=n.object({...L.shape,...M.shape,description:n.optional(n.string()),arguments:n.optional(n.array(Ue)),_meta:n.optional(n.looseObject({}))}),Ve=ne.extend({method:n.literal("prompts/list")}),Fe=re.extend({prompts:n.array(qe)}),Ke=y.extend({name:n.string(),arguments:n.record(n.string(),n.string()).optional()}),Be=b.extend({method:n.literal("prompts/get"),params:Ke}),He=n.object({type:n.literal("text"),text:n.string(),annotations:$e.optional(),_meta:n.record(n.string(),n.unknown()).optional()}),Je=n.object({type:n.literal("image"),data:be,mimeType:n.string(),annotations:$e.optional(),_meta:n.record(n.string(),n.unknown()).optional()}),We=n.object({type:n.literal("audio"),data:be,mimeType:n.string(),annotations:$e.optional(),_meta:n.record(n.string(),n.unknown()).optional()}),Ge=n.object({type:n.literal("tool_use"),name:n.string(),id:n.string(),input:n.record(n.string(),n.unknown()),_meta:n.record(n.string(),n.unknown()).optional()}),Ye=n.object({type:n.literal("resource"),resource:n.union([ve,ke]),annotations:$e.optional(),_meta:n.record(n.string(),n.unknown()).optional()}),Qe=je.extend({type:n.literal("resource_link")}),Xe=n.union([He,Je,We,Qe,Ye]),et=n.object({role:we,content:Xe}),tt=$.extend({description:n.string().optional(),messages:n.array(et)}),ot=w.extend({method:n.literal("notifications/prompts/list_changed"),params:k.optional()}),nt=n.object({title:n.string().optional(),readOnlyHint:n.boolean().optional(),destructiveHint:n.boolean().optional(),idempotentHint:n.boolean().optional(),openWorldHint:n.boolean().optional()}),rt=n.object({taskSupport:n.enum(["required","optional","forbidden"]).optional()}),st=n.object({...L.shape,...M.shape,description:n.string().optional(),inputSchema:n.object({type:n.literal("object"),properties:n.record(n.string(),u).optional(),required:n.array(n.string()).optional()}).catchall(n.unknown()),outputSchema:n.object({type:n.literal("object"),properties:n.record(n.string(),u).optional(),required:n.array(n.string()).optional()}).catchall(n.unknown()).optional(),annotations:nt.optional(),execution:rt.optional(),_meta:n.record(n.string(),n.unknown()).optional()}),at=ne.extend({method:n.literal("tools/list")}),it=re.extend({tools:n.array(st)}),dt=$.extend({content:n.array(Xe).default([]),structuredContent:n.record(n.string(),n.unknown()).optional(),isError:n.boolean().optional()}),ct=dt.or($.extend({toolResult:n.unknown()})),ut=v.extend({name:n.string(),arguments:n.record(n.string(),n.unknown()).optional()}),lt=b.extend({method:n.literal("tools/call"),params:ut}),mt=w.extend({method:n.literal("notifications/tools/list_changed"),params:k.optional()}),pt=n.object({autoRefresh:n.boolean().default(!0),debounceMs:n.number().int().nonnegative().default(300)}),ft=n.enum(["debug","info","notice","warning","error","critical","alert","emergency"]),ht=y.extend({level:ft}),_t=b.extend({method:n.literal("logging/setLevel"),params:ht}),gt=k.extend({level:ft,logger:n.string().optional(),data:n.unknown()}),yt=w.extend({method:n.literal("notifications/message"),params:gt}),vt=n.object({name:n.string().optional()}),bt=n.object({hints:n.array(vt).optional(),costPriority:n.number().min(0).max(1).optional(),speedPriority:n.number().min(0).max(1).optional(),intelligencePriority:n.number().min(0).max(1).optional()}),kt=n.object({mode:n.enum(["auto","required","none"]).optional()}),wt=n.object({type:n.literal("tool_result"),toolUseId:n.string().describe("The unique identifier for the corresponding tool call."),content:n.array(Xe).default([]),structuredContent:n.object({}).loose().optional(),isError:n.boolean().optional(),_meta:n.record(n.string(),n.unknown()).optional()}),$t=n.discriminatedUnion("type",[He,Je,We]),jt=n.discriminatedUnion("type",[He,Je,We,Ge,wt]),xt=n.object({role:we,content:n.union([jt,n.array(jt)]),_meta:n.record(n.string(),n.unknown()).optional()}),St=v.extend({messages:n.array(xt),modelPreferences:bt.optional(),systemPrompt:n.string().optional(),includeContext:n.enum(["none","thisServer","allServers"]).optional(),temperature:n.number().optional(),maxTokens:n.number().int(),stopSequences:n.array(n.string()).optional(),metadata:u.optional(),tools:n.array(st).optional(),toolChoice:kt.optional()}),Pt=b.extend({method:n.literal("sampling/createMessage"),params:St}),Zt=$.extend({model:n.string(),stopReason:n.optional(n.enum(["endTurn","stopSequence","maxTokens"]).or(n.string())),role:we,content:$t}),Tt=$.extend({model:n.string(),stopReason:n.optional(n.enum(["endTurn","stopSequence","maxTokens","toolUse"]).or(n.string())),role:we,content:n.union([jt,n.array(jt)])}),Et=n.object({type:n.literal("boolean"),title:n.string().optional(),description:n.string().optional(),default:n.boolean().optional()}),It=n.object({type:n.literal("string"),title:n.string().optional(),description:n.string().optional(),minLength:n.number().optional(),maxLength:n.number().optional(),format:n.enum(["email","uri","date","date-time"]).optional(),default:n.string().optional()}),zt=n.object({type:n.enum(["number","integer"]),title:n.string().optional(),description:n.string().optional(),minimum:n.number().optional(),maximum:n.number().optional(),default:n.number().optional()}),Ct=n.object({type:n.literal("string"),title:n.string().optional(),description:n.string().optional(),enum:n.array(n.string()),default:n.string().optional()}),Rt=n.object({type:n.literal("string"),title:n.string().optional(),description:n.string().optional(),oneOf:n.array(n.object({const:n.string(),title:n.string()})),default:n.string().optional()}),Nt=n.object({type:n.literal("string"),title:n.string().optional(),description:n.string().optional(),enum:n.array(n.string()),enumNames:n.array(n.string()).optional(),default:n.string().optional()}),Ot=n.union([Ct,Rt]),At=n.object({type:n.literal("array"),title:n.string().optional(),description:n.string().optional(),minItems:n.number().optional(),maxItems:n.number().optional(),items:n.object({type:n.literal("string"),enum:n.array(n.string())}),default:n.array(n.string()).optional()}),Dt=n.object({type:n.literal("array"),title:n.string().optional(),description:n.string().optional(),minItems:n.number().optional(),maxItems:n.number().optional(),items:n.object({anyOf:n.array(n.object({const:n.string(),title:n.string()}))}),default:n.array(n.string()).optional()}),Mt=n.union([At,Dt]),Lt=n.union([Nt,Ot,Mt]),Ut=n.union([Lt,Et,It,zt]),qt=v.extend({mode:n.literal("form").optional(),message:n.string(),requestedSchema:n.object({type:n.literal("object"),properties:n.record(n.string(),Ut),required:n.array(n.string()).optional()})}),Vt=v.extend({mode:n.literal("url"),message:n.string(),elicitationId:n.string(),url:n.string().url()}),Ft=n.union([qt,Vt]),Kt=b.extend({method:n.literal("elicitation/create"),params:Ft}),Bt=k.extend({elicitationId:n.string()}),Ht=w.extend({method:n.literal("notifications/elicitation/complete"),params:Bt}),Jt=$.extend({action:n.enum(["accept","decline","cancel"]),content:n.preprocess(e=>null===e?void 0:e,n.record(n.string(),n.union([n.string(),n.number(),n.boolean(),n.array(n.string())])).optional())}),Wt=n.object({type:n.literal("ref/resource"),uri:n.string()}),Gt=Wt,Yt=n.object({type:n.literal("ref/prompt"),name:n.string()}),Qt=y.extend({ref:n.union([Yt,Wt]),argument:n.object({name:n.string(),value:n.string()}),context:n.object({arguments:n.record(n.string(),n.string()).optional()}).optional()}),Xt=b.extend({method:n.literal("completion/complete"),params:Qt});function assertCompleteRequestPrompt(e){if("ref/prompt"!==e.params.ref.type)throw new TypeError(`Expected CompleteRequestPrompt, but got ${e.params.ref.type}`)}function assertCompleteRequestResourceTemplate(e){if("ref/resource"!==e.params.ref.type)throw new TypeError(`Expected CompleteRequestResourceTemplate, but got ${e.params.ref.type}`)}const eo=$.extend({completion:n.looseObject({values:n.array(n.string()).max(100),total:n.optional(n.number().int()),hasMore:n.optional(n.boolean())})}),to=n.object({uri:n.string().startsWith("file://"),name:n.string().optional(),_meta:n.record(n.string(),n.unknown()).optional()}),oo=b.extend({method:n.literal("roots/list"),params:y.optional()}),no=$.extend({roots:n.array(to)}),ro=w.extend({method:n.literal("notifications/roots/list_changed"),params:k.optional()}),so=n.union([Q,J,Xt,_t,Be,Ve,Se,Ze,ze,Oe,De,lt,at,ue,me,fe,_e]),ao=n.union([A,te,Y,ro,ce]),io=n.union([N,Zt,Tt,Jt,no,le,he,ie]),co=n.union([Q,Pt,Kt,oo,ue,me,fe,_e]),uo=n.union([A,te,yt,Le,Re,mt,ot,ce,Ht]),lo=n.union([N,G,eo,tt,Fe,Pe,Te,Ce,dt,it,le,he,ie]);class McpError extends Error{constructor(e,t,o){super(`MCP error ${e}: ${t}`),this.code=e,this.data=o,this.name="McpError"}static fromError(e,t,o){if(e===T.UrlElicitationRequired&&o){const e=o;if(e.elicitations)return new UrlElicitationRequiredError(e.elicitations,t)}return new McpError(e,t,o)}}class UrlElicitationRequiredError extends McpError{constructor(e,t=`URL elicitation${e.length>1?"s":""} required`){super(T.UrlElicitationRequired,t,{elicitations:e})}get elicitations(){return this.data?.elicitations??[]}}},"./node_modules/@modelcontextprotocol/sdk/dist/esm/validation/ajv-provider.js":function(e,t,o){o.r(t),o.d(t,{AjvJsonSchemaValidator:function(){return AjvJsonSchemaValidator}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/ajv.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv-formats/dist/index.js");class AjvJsonSchemaValidator{constructor(e){this._ajv=e??function createDefaultAjvInstance(){const e=new n({strict:!1,validateFormats:!0,validateSchema:!1,allErrors:!0});return r(e),e}()}getValidator(e){const t="$id"in e&&"string"==typeof e.$id?this._ajv.getSchema(e.$id)??this._ajv.compile(e):this._ajv.compile(e);return e=>t(e)?{valid:!0,data:e,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(t.errors)}}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv-formats/dist/formats.js":function(e,t){function fmtDef(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:fmtDef(date,compareDate),time:fmtDef(getTime(!0),compareTime),"date-time":fmtDef(getDateTime(!0),compareDateTime),"iso-time":fmtDef(getTime(),compareIsoTime),"iso-date-time":fmtDef(getDateTime(),compareIsoDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function uri(e){return a.test(e)&&i.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function regex(e){if(l.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function byte(e){return d.lastIndex=0,d.test(e)},int32:{type:"number",validate:function validateInt32(e){return Number.isInteger(e)&&e<=u&&e>=c}},int64:{type:"number",validate:function validateInt64(e){return Number.isInteger(e)}},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),"iso-time":fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoTime),"iso-date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const o=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,n=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date(e){const t=o.exec(e);if(!t)return!1;const r=+t[1],s=+t[2],a=+t[3];return s>=1&&s<=12&&a>=1&&a<=(2===s&&function isLeapYear(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:n[s])}function compareDate(e,t){if(e&&t)return e>t?1:e<t?-1:0}const r=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function getTime(e){return function time(t){const o=r.exec(t);if(!o)return!1;const n=+o[1],s=+o[2],a=+o[3],i=o[4],d="-"===o[5]?-1:1,c=+(o[6]||0),u=+(o[7]||0);if(c>23||u>59||e&&!i)return!1;if(n<=23&&s<=59&&a<60)return!0;const l=s-u*d,m=n-c*d-(l<0?1:0);return(23===m||-1===m)&&(59===l||-1===l)&&a<61}}function compareTime(e,t){if(!e||!t)return;const o=new Date("2020-01-01T"+e).valueOf(),n=new Date("2020-01-01T"+t).valueOf();return o&&n?o-n:void 0}function compareIsoTime(e,t){if(!e||!t)return;const o=r.exec(e),n=r.exec(t);return o&&n?(e=o[1]+o[2]+o[3])>(t=n[1]+n[2]+n[3])?1:e<t?-1:0:void 0}const s=/t|\s/i;function getDateTime(e){const t=getTime(e);return function date_time(e){const o=e.split(s);return 2===o.length&&date(o[0])&&t(o[1])}}function compareDateTime(e,t){if(!e||!t)return;const o=new Date(e).valueOf(),n=new Date(t).valueOf();return o&&n?o-n:void 0}function compareIsoDateTime(e,t){if(!e||!t)return;const[o,n]=e.split(s),[r,a]=t.split(s),i=compareDate(o,r);return void 0!==i?i||compareTime(n,a):void 0}const a=/\/|:/,i=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;const d=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;const c=-(2**31),u=2**31-1;function validateNumber(){return!0}const l=/[^\\]\\Z/},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv-formats/dist/index.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv-formats/dist/formats.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv-formats/dist/limit.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),a=new s.Name("fullFormats"),i=new s.Name("fastFormats"),formatsPlugin=(e,t={keywords:!0})=>{if(Array.isArray(t))return addFormats(e,t,n.fullFormats,a),e;const[o,s]="fast"===t.mode?[n.fastFormats,i]:[n.fullFormats,a];return addFormats(e,t.formats||n.formatNames,o,s),t.keywords&&(0,r.default)(e),e};function addFormats(e,t,o,n){var r,a;null!==(r=(a=e.opts.code).formats)&&void 0!==r||(a.formats=s._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,o[n])}formatsPlugin.get=(e,t="full")=>{const o=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!o)throw new Error(`Unknown format "${e}"`);return o},e.exports=t=formatsPlugin,Object.defineProperty(t,"__esModule",{value:!0}),t.default=formatsPlugin},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv-formats/dist/limit.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/ajv.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),s=r.operators,a={formatMaximum:{okStr:"<=",ok:s.LTE,fail:s.GT},formatMinimum:{okStr:">=",ok:s.GTE,fail:s.LT},formatExclusiveMaximum:{okStr:"<",ok:s.LT,fail:s.GTE},formatExclusiveMinimum:{okStr:">",ok:s.GT,fail:s.LTE}},i={message:({keyword:e,schemaCode:t})=>r.str`should be ${a[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>r._`{comparison: ${a[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(a),type:"string",schemaType:"string",$data:!0,error:i,code(e){const{gen:t,data:o,schemaCode:s,keyword:i,it:d}=e,{opts:c,self:u}=d;if(!c.validateFormats)return;const l=new n.KeywordCxt(d,u.RULES.all.format.definition,"format");function compareCode(e){return r._`${e}.compare(${o}, ${s}) ${a[i].fail} 0`}l.$data?function validate$DataFormat(){const o=t.scopeValue("formats",{ref:u.formats,code:c.code.formats}),n=t.const("fmt",r._`${o}[${l.schemaCode}]`);e.fail$data((0,r.or)(r._`typeof ${n} != "object"`,r._`${n} instanceof RegExp`,r._`typeof ${n}.compare != "function"`,compareCode(n)))}():function validateFormat(){const o=l.schema,n=u.formats[o];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${i}": format "${o}" does not define "compare" function`);const s=t.scopeValue("formats",{key:o,ref:n,code:c.code.formats?r._`${c.code.formats}${(0,r.getProperty)(o)}`:void 0});e.fail$data(compareCode(s))}()},dependencies:["format"]};t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/ajv.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/core.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/draft7.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/discriminator/index.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/refs/json-schema-draft-07.json"),i=["/properties"],d="http://json-schema.org/draft-07/schema";class Ajv extends n.default{_addVocabularies(){super._addVocabularies(),r.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,i):a;this.addMetaSchema(e,d,!1),this.refs["http://json-schema.org/schema"]=d}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(d)?d:void 0)}}t.Ajv=Ajv,e.exports=t=Ajv,e.exports.Ajv=Ajv,Object.defineProperty(t,"__esModule",{value:!0}),t.default=Ajv;var c=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/index.js");Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var u=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js");Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var l=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/validation_error.js");Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return l.default}});var m=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/ref_error.js");Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/code.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class _CodeOrName{}t._CodeOrName=_CodeOrName,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=Name;class _Code extends _CodeOrName{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce((e,t)=>(t instanceof Name&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function _(e,...t){const o=[e[0]];let n=0;for(;n<t.length;)addCodeArg(o,t[n]),o.push(e[++n]);return new _Code(o)}t._Code=_Code,t.nil=new _Code(""),t._=_;const o=new _Code("+");function str(e,...t){const n=[safeStringify(e[0])];let r=0;for(;r<t.length;)n.push(o),addCodeArg(n,t[r]),n.push(o,safeStringify(e[++r]));return function optimize(e){let t=1;for(;t<e.length-1;){if(e[t]===o){const o=mergeExprItems(e[t-1],e[t+1]);if(void 0!==o){e.splice(t-1,3,o);continue}e[t++]="+"}t++}}(n),new _Code(n)}function addCodeArg(e,t){t instanceof _Code?e.push(...t._items):t instanceof Name?e.push(t):e.push(function interpolate(e){return"number"==typeof e||"boolean"==typeof e||null===e?e:safeStringify(Array.isArray(e)?e.join(","):e)}(t))}function mergeExprItems(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof Name||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof Name?void 0:`"${e}${t.slice(1)}`}function safeStringify(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}t.str=str,t.addCodeArg=addCodeArg,t.strConcat=function strConcat(e,t){return t.emptyStr()?e:e.emptyStr()?t:str`${e}${t}`},t.stringify=function stringify(e){return new _Code(safeStringify(e))},t.safeStringify=safeStringify,t.getProperty=function getProperty(e){return"string"==typeof e&&t.IDENTIFIER.test(e)?new _Code(`.${e}`):_`[${e}]`},t.getEsmExportName=function getEsmExportName(e){if("string"==typeof e&&t.IDENTIFIER.test(e))return new _Code(`${e}`);throw new Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)},t.regexpCode=function regexpCode(e){return new _Code(e.toString())}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/code.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/scope.js");var s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/code.js");Object.defineProperty(t,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return s.Name}});var a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/scope.js");Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class Node{optimizeNodes(){return this}optimizeNames(e,t){return this}}class Def extends Node{constructor(e,t,o){super(),this.varKind=e,this.name=t,this.rhs=o}render({es5:e,_n:t}){const o=e?r.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${o} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=optimizeExpr(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class Assign extends Node{constructor(e,t,o){super(),this.lhs=e,this.rhs=t,this.sideEffects=o}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=optimizeExpr(this.rhs,e,t),this}get names(){return addExprNames(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class AssignOp extends Assign{constructor(e,t,o,n){super(e,o,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class Label extends Node{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class Break extends Node{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class Throw extends Node{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class AnyCode extends Node{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=optimizeExpr(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class ParentNode extends Node{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,o)=>t+o.render(e),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const o=e[t].optimizeNodes();Array.isArray(o)?e.splice(t,1,...o):o?e[t]=o:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:o}=this;let n=o.length;for(;n--;){const r=o[n];r.optimizeNames(e,t)||(subtractNames(e,r.names),o.splice(n,1))}return o.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>addNames(e,t.names),{})}}class BlockNode extends ParentNode{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class Root extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new Else(e):e}return t?!1===e?t instanceof If?t:t.nodes:this.nodes.length?this:new If(not(e),t instanceof If?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var o;if(this.else=null===(o=this.else)||void 0===o?void 0:o.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=optimizeExpr(this.condition,e,t),this}get names(){const e=super.names;return addExprNames(e,this.condition),this.else&&addNames(e,this.else.names),e}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=optimizeExpr(this.iteration,e,t),this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(e,t,o,n){super(),this.varKind=e,this.name=t,this.from=o,this.to=n}render(e){const t=e.es5?r.varKinds.var:this.varKind,{name:o,from:n,to:s}=this;return`for(${t} ${o}=${n}; ${o}<${s}; ${o}++)`+super.render(e)}get names(){const e=addExprNames(super.names,this.from);return addExprNames(e,this.to)}}class ForIter extends For{constructor(e,t,o,n){super(),this.loop=e,this.varKind=t,this.name=o,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=optimizeExpr(this.iterable,e,t),this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(e,t,o){super(),this.name=e,this.args=t,this.async=o}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}Func.kind="func";class Return extends ParentNode{render(e){return"return "+super.render(e)}}Return.kind="return";class Try extends BlockNode{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var o,n;return super.optimizeNames(e,t),null===(o=this.catch)||void 0===o||o.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&addNames(e,this.catch.names),this.finally&&addNames(e,this.finally.names),e}}class Catch extends BlockNode{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}Catch.kind="catch";class Finally extends BlockNode{render(e){return"finally"+super.render(e)}}Finally.kind="finally";function addNames(e,t){for(const o in t)e[o]=(e[o]||0)+(t[o]||0);return e}function addExprNames(e,t){return t instanceof n._CodeOrName?addNames(e,t.names):e}function optimizeExpr(e,t,o){return e instanceof n.Name?replaceName(e):function canOptimize(e){return e instanceof n._Code&&e._items.some(e=>e instanceof n.Name&&1===t[e.str]&&void 0!==o[e.str])}(e)?new n._Code(e._items.reduce((e,t)=>(t instanceof n.Name&&(t=replaceName(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e),[])):e;function replaceName(e){const n=o[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function subtractNames(e,t){for(const o in t)e[o]=(e[o]||0)-(t[o]||0)}function not(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${par(e)}`}t.CodeGen=class CodeGen{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new r.Scope({parent:e}),this._nodes=[new Root]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const o=this._extScope.value(e,t);return(this._values[o.prefix]||(this._values[o.prefix]=new Set)).add(o),o}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,o,n){const r=this._scope.toName(t);return void 0!==o&&n&&(this._constants[r.str]=o),this._leafNode(new Def(e,r,o)),r}const(e,t,o){return this._def(r.varKinds.const,e,t,o)}let(e,t,o){return this._def(r.varKinds.let,e,t,o)}var(e,t,o){return this._def(r.varKinds.var,e,t,o)}assign(e,t,o){return this._leafNode(new Assign(e,t,o))}add(e,o){return this._leafNode(new AssignOp(e,t.operators.ADD,o))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new AnyCode(e)),this}object(...e){const t=["{"];for(const[o,r]of e)t.length>1&&t.push(","),t.push(o),(o!==r||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,r));return t.push("}"),new n._Code(t)}if(e,t,o){if(this._blockNode(new If(e)),t&&o)this.code(t).else().code(o).endIf();else if(t)this.code(t).endIf();else if(o)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new If(e))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new ForLoop(e),t)}forRange(e,t,o,n,s=(this.opts.es5?r.varKinds.var:r.varKinds.let)){const a=this._scope.toName(e);return this._for(new ForRange(s,a,t,o),()=>n(a))}forOf(e,t,o,s=r.varKinds.const){const a=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,t=>{this.var(a,n._`${e}[${t}]`),o(a)})}return this._for(new ForIter("of",s,a,t),()=>o(a))}forIn(e,t,o,s=(this.opts.es5?r.varKinds.var:r.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,o);const a=this._scope.toName(e);return this._for(new ForIter("in",s,a,t),()=>o(a))}endFor(){return this._endBlockNode(For)}label(e){return this._leafNode(new Label(e))}break(e){return this._leafNode(new Break(e))}return(e){const t=new Return;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(e,t,o){if(!t&&!o)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new Try;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new Catch(e),t(e)}return o&&(this._currNode=n.finally=new Finally,this.code(o)),this._endBlockNode(Catch,Finally)}throw(e){return this._leafNode(new Throw(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const o=this._nodes.length-t;if(o<0||void 0!==e&&o!==e)throw new Error(`CodeGen: wrong number of nodes: ${o} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,o,r){return this._blockNode(new Func(e,t,o)),r&&this.code(r).endFunc(),this}endFunc(){return this._endBlockNode(Func)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const o=this._currNode;if(o instanceof e||t&&o instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof If))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=not;const i=mappend(t.operators.AND);t.and=function and(...e){return e.reduce(i)};const d=mappend(t.operators.OR);function mappend(e){return(t,o)=>t===n.nil?o:o===n.nil?t:n._`${par(t)} ${e} ${par(o)}`}function par(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function or(...e){return e.reduce(d)}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/scope.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/code.js");class ValueError extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var r;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(r||(t.UsedValueState=r={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class Scope{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,o;if((null===(o=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===o?void 0:o.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=Scope;class ValueScopeName extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:o}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${o}]`}}t.ValueScopeName=ValueScopeName;const s=n._`\n`;t.ValueScope=class ValueScope extends Scope{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?s:n.nil}}get(){return this._scope}name(e){return new ValueScopeName(e,this._newName(e))}value(e,t){var o;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:r}=n,s=null!==(o=t.key)&&void 0!==o?o:t.ref;let a=this._values[r];if(a){const e=a.get(s);if(e)return e}else a=this._values[r]=new Map;a.set(s,n);const i=this._scope[r]||(this._scope[r]=[]),d=i.length;return i[d]=t.ref,n.setValue(t,{property:r,itemIndex:d}),n}getValue(e,t){const o=this._values[e];if(o)return o.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`})}scopeCode(e=this._values,t,o){return this._reduceValues(e,e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,o)}_reduceValues(e,o,s={},a){let i=n.nil;for(const d in e){const c=e[d];if(!c)continue;const u=s[d]=s[d]||new Map;c.forEach(e=>{if(u.has(e))return;u.set(e,r.Started);let s=o(e);if(s){const o=this.opts.es5?t.varKinds.var:t.varKinds.const;i=n._`${i}${o} ${e} = ${s};${this.opts._n}`}else{if(!(s=null==a?void 0:a(e)))throw new ValueError(e);i=n._`${i}${s}${this.opts._n}`}u.set(e,r.Completed)})}return i}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/errors.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/names.js");function addError(e,t){const o=e.const("err",t);e.if(n._`${s.default.vErrors} === null`,()=>e.assign(s.default.vErrors,n._`[${o}]`),n._`${s.default.vErrors}.push(${o})`),e.code(n._`${s.default.errors}++`)}function returnErrors(e,t){const{gen:o,validateName:r,schemaEnv:s}=e;s.$async?o.throw(n._`new ${e.ValidationError}(${t})`):(o.assign(n._`${r}.errors`,t),o.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function reportError(e,o=t.keywordError,r,s){const{it:a}=e,{gen:i,compositeRule:d,allErrors:c}=a,u=errorObjectCode(e,o,r);(null!=s?s:d||c)?addError(i,u):returnErrors(a,n._`[${u}]`)},t.reportExtraError=function reportExtraError(e,o=t.keywordError,n){const{it:r}=e,{gen:a,compositeRule:i,allErrors:d}=r;addError(a,errorObjectCode(e,o,n)),i||d||returnErrors(r,s.default.vErrors)},t.resetErrorsCount=function resetErrorsCount(e,t){e.assign(s.default.errors,t),e.if(n._`${s.default.vErrors} !== null`,()=>e.if(t,()=>e.assign(n._`${s.default.vErrors}.length`,t),()=>e.assign(s.default.vErrors,null)))},t.extendErrors=function extendErrors({gen:e,keyword:t,schemaValue:o,data:r,errsCount:a,it:i}){if(void 0===a)throw new Error("ajv implementation error");const d=e.name("err");e.forRange("i",a,s.default.errors,a=>{e.const(d,n._`${s.default.vErrors}[${a}]`),e.if(n._`${d}.instancePath === undefined`,()=>e.assign(n._`${d}.instancePath`,(0,n.strConcat)(s.default.instancePath,i.errorPath))),e.assign(n._`${d}.schemaPath`,n.str`${i.errSchemaPath}/${t}`),i.opts.verbose&&(e.assign(n._`${d}.schema`,o),e.assign(n._`${d}.data`,r))})};const a={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function errorObjectCode(e,t,o){const{createErrors:r}=e.it;return!1===r?n._`{}`:function errorObject(e,t,o={}){const{gen:r,it:i}=e,d=[errorInstancePath(i,o),errorSchemaPath(e,o)];return function extraErrorProps(e,{params:t,message:o},r){const{keyword:i,data:d,schemaValue:c,it:u}=e,{opts:l,propertyName:m,topSchemaRef:p,schemaPath:f}=u;r.push([a.keyword,i],[a.params,"function"==typeof t?t(e):t||n._`{}`]),l.messages&&r.push([a.message,"function"==typeof o?o(e):o]);l.verbose&&r.push([a.schema,c],[a.parentSchema,n._`${p}${f}`],[s.default.data,d]);m&&r.push([a.propertyName,m])}(e,t,d),r.object(...d)}(e,t,o)}function errorInstancePath({errorPath:e},{instancePath:t}){const o=t?n.str`${e}${(0,r.getErrorPath)(t,r.Type.Str)}`:e;return[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,o)]}function errorSchemaPath({keyword:e,it:{errSchemaPath:t}},{schemaPath:o,parentSchema:s}){let i=s?t:n.str`${t}/${e}`;return o&&(i=n.str`${i}${(0,r.getErrorPath)(o,r.Type.Str)}`),[a.schemaPath,i]}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/index.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/validation_error.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/names.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/resolve.js"),i=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),d=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/index.js");class SchemaEnv{constructor(e){var t;let o;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(o=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,a.normalizeId)(null==o?void 0:o[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==o?void 0:o.$async,this.refs={}}}function compileSchema(e){const t=getCompilingSchema.call(this,e);if(t)return t;const o=(0,a.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:i,lines:c}=this.opts.code,{ownProperties:u}=this.opts,l=new n.CodeGen(this.scope,{es5:i,lines:c,ownProperties:u});let m;e.$async&&(m=l.scopeValue("Error",{ref:r.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const p=l.scopeName("validate");e.validateName=p;const f={gen:l,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:l.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:p,ValidationError:m,schema:e.schema,schemaEnv:e,rootId:o,baseId:e.baseId||o,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let h;try{this._compilations.add(e),(0,d.validateFunctionCode)(f),l.optimize(this.opts.code.optimize);const t=l.toString();h=`${l.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(h=this.opts.code.process(h,e));const o=new Function(`${s.default.self}`,`${s.default.scope}`,h)(this,this.scope.get());if(this.scope.value(p,{ref:o}),o.errors=null,o.schema=e.schema,o.schemaEnv=e,e.$async&&(o.$async=!0),!0===this.opts.code.source&&(o.source={validateName:p,validateCode:t,scopeValues:l._values}),this.opts.unevaluated){const{props:e,items:t}=f;o.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},o.source&&(o.source.evaluated=(0,n.stringify)(o.evaluated))}return e.validate=o,e}catch(t){throw delete e.validate,delete e.validateName,h&&this.logger.error("Error compiling schema, function code:",h),t}finally{this._compilations.delete(e)}}function inlineOrCompile(e){return(0,a.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:compileSchema.call(this,e)}function getCompilingSchema(e){for(const t of this._compilations)if(sameSchemaEnv(t,e))return t}function sameSchemaEnv(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function resolve(e,t){let o;for(;"string"==typeof(o=this.refs[t]);)t=o;return o||this.schemas[t]||resolveSchema.call(this,e,t)}function resolveSchema(e,t){const o=this.opts.uriResolver.parse(t),n=(0,a._getFullPath)(this.opts.uriResolver,o);let r=(0,a.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===r)return getJsonPointer.call(this,o,e);const s=(0,a.normalizeId)(n),i=this.refs[s]||this.schemas[s];if("string"==typeof i){const t=resolveSchema.call(this,e,i);if("object"!=typeof(null==t?void 0:t.schema))return;return getJsonPointer.call(this,o,t)}if("object"==typeof(null==i?void 0:i.schema)){if(i.validate||compileSchema.call(this,i),s===(0,a.normalizeId)(t)){const{schema:t}=i,{schemaId:o}=this.opts,n=t[o];return n&&(r=(0,a.resolveUrl)(this.opts.uriResolver,r,n)),new SchemaEnv({schema:t,schemaId:o,root:e,baseId:r})}return getJsonPointer.call(this,o,i)}}t.SchemaEnv=SchemaEnv,t.compileSchema=compileSchema,t.resolveRef=function resolveRef(e,t,o){var n;o=(0,a.resolveUrl)(this.opts.uriResolver,t,o);const r=e.refs[o];if(r)return r;let s=resolve.call(this,e,o);if(void 0===s){const r=null===(n=e.localRefs)||void 0===n?void 0:n[o],{schemaId:a}=this.opts;r&&(s=new SchemaEnv({schema:r,schemaId:a,root:e,baseId:t}))}return void 0!==s?e.refs[o]=inlineOrCompile.call(this,s):void 0},t.getCompilingSchema=getCompilingSchema,t.resolveSchema=resolveSchema;const c=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(e,{baseId:t,schema:o,root:n}){var r;if("/"!==(null===(r=e.fragment)||void 0===r?void 0:r[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof o)return;const e=o[(0,i.unescapeFragment)(n)];if(void 0===e)return;const r="object"==typeof(o=e)&&o[this.opts.schemaId];!c.has(n)&&r&&(t=(0,a.resolveUrl)(this.opts.uriResolver,t,r))}let s;if("boolean"!=typeof o&&o.$ref&&!(0,i.schemaHasRulesButRef)(o,this.RULES)){const e=(0,a.resolveUrl)(this.opts.uriResolver,t,o.$ref);s=resolveSchema.call(this,n,e)}const{schemaId:d}=this.opts;return s=s||new SchemaEnv({schema:o,schemaId:d,root:n,baseId:t}),s.schema!==s.root.schema?s:void 0}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/names.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=r},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/ref_error.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/resolve.js");class MissingRefError extends Error{constructor(e,t,o,r){super(r||`can't resolve reference ${o} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,o),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=MissingRefError},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/resolve.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),r=o("./node_modules/fast-deep-equal/index.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse/index.js"),a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function inlineRef(e,t=!0){return"boolean"==typeof e||(!0===t?!hasRef(e):!!t&&countKeys(e)<=t)};const i=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(e){for(const t in e){if(i.has(t))return!0;const o=e[t];if(Array.isArray(o)&&o.some(hasRef))return!0;if("object"==typeof o&&hasRef(o))return!0}return!1}function countKeys(e){let t=0;for(const o in e){if("$ref"===o)return 1/0;if(t++,!a.has(o)&&("object"==typeof e[o]&&(0,n.eachItem)(e[o],e=>t+=countKeys(e)),t===1/0))return 1/0}return t}function getFullPath(e,t="",o){!1!==o&&(t=normalizeId(t));const n=e.parse(t);return _getFullPath(e,n)}function _getFullPath(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=getFullPath,t._getFullPath=_getFullPath;const d=/#\/?$/;function normalizeId(e){return e?e.replace(d,""):""}t.normalizeId=normalizeId,t.resolveUrl=function resolveUrl(e,t,o){return o=normalizeId(o),e.resolve(t,o)};const c=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function getSchemaRefs(e,t){if("boolean"==typeof e)return{};const{schemaId:o,uriResolver:n}=this.opts,a=normalizeId(e[o]||t),i={"":a},d=getFullPath(n,a,!1),u={},l=new Set;return s(e,{allKeys:!0},(e,t,n,r)=>{if(void 0===r)return;const s=d+t;let a=i[r];function addRef(t){const o=this.opts.uriResolver.resolve;if(t=normalizeId(a?o(a,t):t),l.has(t))throw ambiguos(t);l.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?checkAmbiguosRef(e,n.schema,t):t!==normalizeId(s)&&("#"===t[0]?(checkAmbiguosRef(e,u[t],t),u[t]=e):this.refs[t]=s),t}function addAnchor(e){if("string"==typeof e){if(!c.test(e))throw new Error(`invalid anchor "${e}"`);addRef.call(this,`#${e}`)}}"string"==typeof e[o]&&(a=addRef.call(this,e[o])),addAnchor.call(this,e.$anchor),addAnchor.call(this,e.$dynamicAnchor),i[t]=a}),u;function checkAmbiguosRef(e,t,o){if(void 0!==t&&!r(e,t))throw ambiguos(o)}function ambiguos(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/rules.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const o=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function isJSONType(e){return"string"==typeof e&&o.has(e)},t.getRules=function getRules(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/code.js");function checkUnknownRules(e,t=e.schema){const{opts:o,self:n}=e;if(!o.strictSchema)return;if("boolean"==typeof t)return;const r=n.RULES.keywords;for(const o in t)r[o]||checkStrictMode(e,`unknown keyword: "${o}"`)}function schemaHasRules(e,t){if("boolean"==typeof e)return!e;for(const o in e)if(t[o])return!0;return!1}function escapeJsonPointer(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function unescapeJsonPointer(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function makeMergeEvaluated({mergeNames:e,mergeToName:t,mergeValues:o,resultToName:r}){return(s,a,i,d)=>{const c=void 0===i?a:i instanceof n.Name?(a instanceof n.Name?e(s,a,i):t(s,a,i),i):a instanceof n.Name?(t(s,i,a),a):o(a,i);return d!==n.Name||c instanceof n.Name?c:r(s,c)}}function evaluatedPropsToName(e,t){if(!0===t)return e.var("props",!0);const o=e.var("props",n._`{}`);return void 0!==t&&setEvaluated(e,o,t),o}function setEvaluated(e,t,o){Object.keys(o).forEach(o=>e.assign(n._`${t}${(0,n.getProperty)(o)}`,!0))}t.toHash=function toHash(e){const t={};for(const o of e)t[o]=!0;return t},t.alwaysValidSchema=function alwaysValidSchema(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(checkUnknownRules(e,t),!schemaHasRules(t,e.self.RULES.all))},t.checkUnknownRules=checkUnknownRules,t.schemaHasRules=schemaHasRules,t.schemaHasRulesButRef=function schemaHasRulesButRef(e,t){if("boolean"==typeof e)return!e;for(const o in e)if("$ref"!==o&&t.all[o])return!0;return!1},t.schemaRefOrVal=function schemaRefOrVal({topSchemaRef:e,schemaPath:t},o,r,s){if(!s){if("number"==typeof o||"boolean"==typeof o)return o;if("string"==typeof o)return n._`${o}`}return n._`${e}${t}${(0,n.getProperty)(r)}`},t.unescapeFragment=function unescapeFragment(e){return unescapeJsonPointer(decodeURIComponent(e))},t.escapeFragment=function escapeFragment(e){return encodeURIComponent(escapeJsonPointer(e))},t.escapeJsonPointer=escapeJsonPointer,t.unescapeJsonPointer=unescapeJsonPointer,t.eachItem=function eachItem(e,t){if(Array.isArray(e))for(const o of e)t(o);else t(e)},t.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(e,t,o)=>e.if(n._`${o} !== true && ${t} !== undefined`,()=>{e.if(n._`${t} === true`,()=>e.assign(o,!0),()=>e.assign(o,n._`${o} || {}`).code(n._`Object.assign(${o}, ${t})`))}),mergeToName:(e,t,o)=>e.if(n._`${o} !== true`,()=>{!0===t?e.assign(o,!0):(e.assign(o,n._`${o} || {}`),setEvaluated(e,o,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(e,t,o)=>e.if(n._`${o} !== true && ${t} !== undefined`,()=>e.assign(o,n._`${t} === true ? true : ${o} > ${t} ? ${o} : ${t}`)),mergeToName:(e,t,o)=>e.if(n._`${o} !== true`,()=>e.assign(o,!0===t||n._`${o} > ${t} ? ${o} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=evaluatedPropsToName,t.setEvaluated=setEvaluated;const s={};var a;function checkStrictMode(e,t,o=e.opts.strictSchema){if(o){if(t=`strict mode: ${t}`,!0===o)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function useFunc(e,t){return e.scopeValue("func",{ref:t,code:s[t.code]||(s[t.code]=new r._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(a||(t.Type=a={})),t.getErrorPath=function getErrorPath(e,t,o){if(e instanceof n.Name){const r=t===a.Num;return o?r?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:r?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return o?(0,n.getProperty)(e).toString():"/"+escapeJsonPointer(e)},t.checkStrictMode=checkStrictMode},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/applicability.js":function(e,t){function shouldUseGroup(e,t){return t.rules.some(t=>shouldUseRule(e,t))}function shouldUseRule(e,t){var o;return void 0!==e[t.keyword]||(null===(o=t.definition.implements)||void 0===o?void 0:o.some(t=>void 0!==e[t]))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function schemaHasRulesForType({schema:e,self:t},o){const n=t.RULES.types[o];return n&&!0!==n&&shouldUseGroup(e,n)},t.shouldUseGroup=shouldUseGroup,t.shouldUseRule=shouldUseRule},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/boolSchema.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/errors.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/names.js"),a={message:"boolean schema is false"};function falseSchemaError(e,t){const{gen:o,data:r}=e,s={gen:o,keyword:"false schema",data:r,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(s,a,void 0,t)}t.topBoolOrEmptySchema=function topBoolOrEmptySchema(e){const{gen:t,schema:o,validateName:n}=e;!1===o?falseSchemaError(e,!1):"object"==typeof o&&!0===o.$async?t.return(s.default.data):(t.assign(r._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function boolOrEmptySchema(e,t){const{gen:o,schema:n}=e;!1===n?(o.var(t,!1),falseSchemaError(e)):o.var(t,!0)}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/dataType.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/rules.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/applicability.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/errors.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),i=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js");var d;function getJSONTypes(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(d||(t.DataType=d={})),t.getSchemaTypes=function getSchemaTypes(e){const t=getJSONTypes(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=getJSONTypes,t.coerceAndCheckDataType=function coerceAndCheckDataType(e,t){const{gen:o,data:n,opts:s}=e,i=function coerceToTypes(e,t){return t?e.filter(e=>c.has(e)||"array"===t&&"array"===e):[]}(t,s.coerceTypes),u=t.length>0&&!(0===i.length&&1===t.length&&(0,r.schemaHasRulesForType)(e,t[0]));if(u){const r=checkDataTypes(t,n,s.strictNumbers,d.Wrong);o.if(r,()=>{i.length?function coerceData(e,t,o){const{gen:n,data:r,opts:s}=e,i=n.let("dataType",a._`typeof ${r}`),d=n.let("coerced",a._`undefined`);"array"===s.coerceTypes&&n.if(a._`${i} == 'object' && Array.isArray(${r}) && ${r}.length == 1`,()=>n.assign(r,a._`${r}[0]`).assign(i,a._`typeof ${r}`).if(checkDataTypes(t,r,s.strictNumbers),()=>n.assign(d,r)));n.if(a._`${d} !== undefined`);for(const e of o)(c.has(e)||"array"===e&&"array"===s.coerceTypes)&&coerceSpecificType(e);function coerceSpecificType(e){switch(e){case"string":return void n.elseIf(a._`${i} == "number" || ${i} == "boolean"`).assign(d,a._`"" + ${r}`).elseIf(a._`${r} === null`).assign(d,a._`""`);case"number":return void n.elseIf(a._`${i} == "boolean" || ${r} === null
              || (${i} == "string" && ${r} && ${r} == +${r})`).assign(d,a._`+${r}`);case"integer":return void n.elseIf(a._`${i} === "boolean" || ${r} === null
              || (${i} === "string" && ${r} && ${r} == +${r} && !(${r} % 1))`).assign(d,a._`+${r}`);case"boolean":return void n.elseIf(a._`${r} === "false" || ${r} === 0 || ${r} === null`).assign(d,!1).elseIf(a._`${r} === "true" || ${r} === 1`).assign(d,!0);case"null":return n.elseIf(a._`${r} === "" || ${r} === 0 || ${r} === false`),void n.assign(d,null);case"array":n.elseIf(a._`${i} === "string" || ${i} === "number"
              || ${i} === "boolean" || ${r} === null`).assign(d,a._`[${r}]`)}}n.else(),reportTypeError(e),n.endIf(),n.if(a._`${d} !== undefined`,()=>{n.assign(r,d),function assignParentData({gen:e,parentData:t,parentDataProperty:o},n){e.if(a._`${t} !== undefined`,()=>e.assign(a._`${t}[${o}]`,n))}(e,d)})}(e,t,i):reportTypeError(e)})}return u};const c=new Set(["string","number","integer","boolean","null"]);function checkDataType(e,t,o,n=d.Correct){const r=n===d.Correct?a.operators.EQ:a.operators.NEQ;let s;switch(e){case"null":return a._`${t} ${r} null`;case"array":s=a._`Array.isArray(${t})`;break;case"object":s=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=numCond(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=numCond();break;default:return a._`typeof ${t} ${r} ${e}`}return n===d.Correct?s:(0,a.not)(s);function numCond(e=a.nil){return(0,a.and)(a._`typeof ${t} == "number"`,e,o?a._`isFinite(${t})`:a.nil)}}function checkDataTypes(e,t,o,n){if(1===e.length)return checkDataType(e[0],t,o,n);let r;const s=(0,i.toHash)(e);if(s.array&&s.object){const e=a._`typeof ${t} != "object"`;r=s.null?e:a._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else r=a.nil;s.number&&delete s.integer;for(const e in s)r=(0,a.and)(r,checkDataType(e,t,o,n));return r}t.checkDataType=checkDataType,t.checkDataTypes=checkDataTypes;const u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function reportTypeError(e){const t=function getTypeErrorContext(e){const{gen:t,data:o,schema:n}=e,r=(0,i.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:o,schema:n.type,schemaCode:r,schemaValue:r,parentSchema:n,params:{},it:e}}(e);(0,s.reportError)(t,u)}t.reportTypeError=reportTypeError},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/defaults.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js");function assignDefault(e,t,o){const{gen:s,compositeRule:a,data:i,opts:d}=e;if(void 0===o)return;const c=n._`${i}${(0,n.getProperty)(t)}`;if(a)return void(0,r.checkStrictMode)(e,`default is ignored for: ${c}`);let u=n._`${c} === undefined`;"empty"===d.useDefaults&&(u=n._`${u} || ${c} === null || ${c} === ""`),s.if(u,n._`${c} = ${(0,n.stringify)(o)}`)}t.assignDefaults=function assignDefaults(e,t){const{properties:o,items:n}=e.schema;if("object"===t&&o)for(const t in o)assignDefault(e,t,o[t].default);else"array"===t&&Array.isArray(n)&&n.forEach((t,o)=>assignDefault(e,o,t.default))}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/index.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/boolSchema.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/dataType.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/applicability.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/dataType.js"),i=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/defaults.js"),d=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/keyword.js"),c=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/subschema.js"),u=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),l=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/names.js"),m=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/resolve.js"),p=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),f=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/errors.js");function validateFunction({gen:e,validateName:t,schema:o,schemaEnv:n,opts:r},s){r.code.es5?e.func(t,u._`${l.default.data}, ${l.default.valCxt}`,n.$async,()=>{e.code(u._`"use strict"; ${funcSourceUrl(o,r)}`),function destructureValCxtES5(e,t){e.if(l.default.valCxt,()=>{e.var(l.default.instancePath,u._`${l.default.valCxt}.${l.default.instancePath}`),e.var(l.default.parentData,u._`${l.default.valCxt}.${l.default.parentData}`),e.var(l.default.parentDataProperty,u._`${l.default.valCxt}.${l.default.parentDataProperty}`),e.var(l.default.rootData,u._`${l.default.valCxt}.${l.default.rootData}`),t.dynamicRef&&e.var(l.default.dynamicAnchors,u._`${l.default.valCxt}.${l.default.dynamicAnchors}`)},()=>{e.var(l.default.instancePath,u._`""`),e.var(l.default.parentData,u._`undefined`),e.var(l.default.parentDataProperty,u._`undefined`),e.var(l.default.rootData,l.default.data),t.dynamicRef&&e.var(l.default.dynamicAnchors,u._`{}`)})}(e,r),e.code(s)}):e.func(t,u._`${l.default.data}, ${function destructureValCxt(e){return u._`{${l.default.instancePath}="", ${l.default.parentData}, ${l.default.parentDataProperty}, ${l.default.rootData}=${l.default.data}${e.dynamicRef?u._`, ${l.default.dynamicAnchors}={}`:u.nil}}={}`}(r)}`,n.$async,()=>e.code(funcSourceUrl(o,r)).code(s))}function funcSourceUrl(e,t){const o="object"==typeof e&&e[t.schemaId];return o&&(t.code.source||t.code.process)?u._`/*# sourceURL=${o} */`:u.nil}function subschemaCode(e,t){isSchemaObj(e)&&(checkKeywords(e),schemaCxtHasRules(e))?function subSchemaObjCode(e,t){const{schema:o,gen:n,opts:r}=e;r.$comment&&o.$comment&&commentKeyword(e);(function updateContext(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,m.resolveUrl)(e.opts.uriResolver,e.baseId,t))})(e),function checkAsyncSchema(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const s=n.const("_errs",l.default.errors);typeAndKeywords(e,s),n.var(t,u._`${s} === ${l.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}function schemaCxtHasRules({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const o in e)if(t.RULES.all[o])return!0;return!1}function isSchemaObj(e){return"boolean"!=typeof e.schema}function checkKeywords(e){(0,p.checkUnknownRules)(e),function checkRefsAndKeywords(e){const{schema:t,errSchemaPath:o,opts:n,self:r}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,r.RULES)&&r.logger.warn(`$ref: keywords ignored in schema at path "${o}"`)}(e)}function typeAndKeywords(e,t){if(e.opts.jtd)return schemaKeywords(e,[],!1,t);const o=(0,r.getSchemaTypes)(e.schema);schemaKeywords(e,o,!(0,r.coerceAndCheckDataType)(e,o),t)}function commentKeyword({gen:e,schemaEnv:t,schema:o,errSchemaPath:n,opts:r}){const s=o.$comment;if(!0===r.$comment)e.code(u._`${l.default.self}.logger.log(${s})`);else if("function"==typeof r.$comment){const o=u.str`${n}/$comment`,r=e.scopeValue("root",{ref:t.root});e.code(u._`${l.default.self}.opts.$comment(${s}, ${o}, ${r}.schema)`)}}function schemaKeywords(e,t,o,n){const{gen:r,schema:i,data:d,allErrors:c,opts:m,self:f}=e,{RULES:h}=f;function groupKeywords(p){(0,s.shouldUseGroup)(i,p)&&(p.type?(r.if((0,a.checkDataType)(p.type,d,m.strictNumbers)),iterateKeywords(e,p),1===t.length&&t[0]===p.type&&o&&(r.else(),(0,a.reportTypeError)(e)),r.endIf()):iterateKeywords(e,p),c||r.if(u._`${l.default.errors} === ${n||0}`))}!i.$ref||!m.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(i,h)?(m.jtd||function checkStrictTypes(e,t){if(e.schemaEnv.meta||!e.opts.strictTypes)return;(function checkContextTypes(e,t){if(!t.length)return;if(!e.dataTypes.length)return void(e.dataTypes=t);t.forEach(t=>{includesType(e.dataTypes,t)||strictTypesError(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),function narrowSchemaTypes(e,t){const o=[];for(const n of e.dataTypes)includesType(t,n)?o.push(n):t.includes("integer")&&"number"===n&&o.push("integer");e.dataTypes=o}(e,t)})(e,t),e.opts.allowUnionTypes||function checkMultipleTypes(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&strictTypesError(e,"use allowUnionTypes to allow union type keyword")}(e,t);!function checkKeywordTypes(e,t){const o=e.self.RULES.all;for(const n in o){const r=o[n];if("object"==typeof r&&(0,s.shouldUseRule)(e.schema,r)){const{type:o}=r.definition;o.length&&!o.some(e=>hasApplicableType(t,e))&&strictTypesError(e,`missing type "${o.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes)}(e,t),r.block(()=>{for(const e of h.rules)groupKeywords(e);groupKeywords(h.post)})):r.block(()=>keywordCode(e,"$ref",h.all.$ref.definition))}function iterateKeywords(e,t){const{gen:o,schema:n,opts:{useDefaults:r}}=e;r&&(0,i.assignDefaults)(e,t.type),o.block(()=>{for(const o of t.rules)(0,s.shouldUseRule)(n,o)&&keywordCode(e,o.keyword,o.definition,t.type)})}function hasApplicableType(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function includesType(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function strictTypesError(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function validateFunctionCode(e){isSchemaObj(e)&&(checkKeywords(e),schemaCxtHasRules(e))?function topSchemaObjCode(e){const{schema:t,opts:o,gen:n}=e;return void validateFunction(e,()=>{o.$comment&&t.$comment&&commentKeyword(e),function checkNoDefault(e){const{schema:t,opts:o}=e;void 0!==t.default&&o.useDefaults&&o.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(l.default.vErrors,null),n.let(l.default.errors,0),o.unevaluated&&function resetEvaluated(e){const{gen:t,validateName:o}=e;e.evaluated=t.const("evaluated",u._`${o}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`)),t.if(u._`${e.evaluated}.dynamicItems`,()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`))}(e),typeAndKeywords(e),function returnResults(e){const{gen:t,schemaEnv:o,validateName:n,ValidationError:r,opts:s}=e;o.$async?t.if(u._`${l.default.errors} === 0`,()=>t.return(l.default.data),()=>t.throw(u._`new ${r}(${l.default.vErrors})`)):(t.assign(u._`${n}.errors`,l.default.vErrors),s.unevaluated&&function assignEvaluated({gen:e,evaluated:t,props:o,items:n}){o instanceof u.Name&&e.assign(u._`${t}.props`,o);n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${l.default.errors} === 0`))}(e)})}(e):validateFunction(e,()=>(0,n.topBoolOrEmptySchema)(e))};class KeywordCxt{constructor(e,t,o){if((0,d.validateKeywordUsage)(e,t,o),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=o,this.data=e.data,this.schema=e.schema[o],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,o,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",getData(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,d.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${o} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",l.default.errors))}result(e,t,o){this.failResult((0,u.not)(e),t,o)}failResult(e,t,o){this.gen.if(e),o?o():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,o){if(t)return this.setParams(t),this._error(e,o),void this.setParams({});this._error(e,o)}_error(e,t){(e?f.reportExtraError:f.reportError)(this,this.def.error,t)}$dataError(){(0,f.reportError)(this,this.def.$dataError||f.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,f.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,o=u.nil){this.gen.block(()=>{this.check$data(e,o),t()})}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:o,schemaCode:n,schemaType:r,def:s}=this;o.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&o.assign(e,!0),(r.length||s.validateSchema)&&(o.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&o.assign(e,!1)),o.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:o,def:n,it:r}=this;return(0,u.or)(function wrong$DataType(){if(o.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(o)?o:[o];return u._`${(0,a.checkDataTypes)(e,t,r.opts.strictNumbers,a.DataType.Wrong)}`}return u.nil}(),function invalid$DataSchema(){if(n.validateSchema){const o=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${o}(${t})`}return u.nil}())}subschema(e,t){const o=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(o,this.it,e),(0,c.extendSubschemaMode)(o,e);const n={...this.it,...o,items:void 0,props:void 0};return subschemaCode(n,t),n}mergeEvaluated(e,t){const{it:o,gen:n}=this;o.opts.unevaluated&&(!0!==o.props&&void 0!==e.props&&(o.props=p.mergeEvaluated.props(n,e.props,o.props,t)),!0!==o.items&&void 0!==e.items&&(o.items=p.mergeEvaluated.items(n,e.items,o.items,t)))}mergeValidEvaluated(e,t){const{it:o,gen:n}=this;if(o.opts.unevaluated&&(!0!==o.props||!0!==o.items))return n.if(t,()=>this.mergeEvaluated(e,u.Name)),!0}}function keywordCode(e,t,o,n){const r=new KeywordCxt(e,o,t);"code"in o?o.code(r,n):r.$data&&o.validate?(0,d.funcKeywordCode)(r,o):"macro"in o?(0,d.macroKeywordCode)(r,o):(o.compile||o.validate)&&(0,d.funcKeywordCode)(r,o)}t.KeywordCxt=KeywordCxt;const h=/^\/(?:[^~]|~0|~1)*$/,g=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData(e,{dataLevel:t,dataNames:o,dataPathArr:n}){let r,s;if(""===e)return l.default.rootData;if("/"===e[0]){if(!h.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);r=e,s=l.default.rootData}else{const a=g.exec(e);if(!a)throw new Error(`Invalid JSON-pointer: ${e}`);const i=+a[1];if(r=a[2],"#"===r){if(i>=t)throw new Error(errorMsg("property/index",i));return n[t-i]}if(i>t)throw new Error(errorMsg("data",i));if(s=o[t-i],!r)return s}let a=s;const i=r.split("/");for(const e of i)e&&(s=u._`${s}${(0,u.getProperty)((0,p.unescapeJsonPointer)(e))}`,a=u._`${a} && ${s}`);return a;function errorMsg(e,o){return`Cannot access ${e} ${o} levels up, current level is ${t}`}}t.getData=getData},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/keyword.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/names.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/errors.js");function modifyData(e){const{gen:t,data:o,it:r}=e;t.if(r.parentData,()=>t.assign(o,n._`${r.parentData}[${r.parentDataProperty}]`))}function useKeyword(e,t,o){if(void 0===o)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof o?{ref:o}:{ref:o,code:(0,n.stringify)(o)})}t.macroKeywordCode=function macroKeywordCode(e,t){const{gen:o,keyword:r,schema:s,parentSchema:a,it:i}=e,d=t.macro.call(i.self,s,a,i),c=useKeyword(o,r,d);!1!==i.opts.validateSchema&&i.self.validateSchema(d,!0);const u=o.name("valid");e.subschema({schema:d,schemaPath:n.nil,errSchemaPath:`${i.errSchemaPath}/${r}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))},t.funcKeywordCode=function funcKeywordCode(e,t){var o;const{gen:i,keyword:d,schema:c,parentSchema:u,$data:l,it:m}=e;!function checkAsyncKeyword({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(m,t);const p=!l&&t.compile?t.compile.call(m.self,c,u,m):t.validate,f=useKeyword(i,d,p),h=i.let("valid");function assignValid(o=(t.async?n._`await `:n.nil)){const a=m.opts.passContext?r.default.this:r.default.self,d=!("compile"in t&&!l||!1===t.schema);i.assign(h,n._`${o}${(0,s.callValidateCode)(e,f,a,d)}`,t.modifying)}function reportErrs(e){var o;i.if((0,n.not)(null!==(o=t.valid)&&void 0!==o?o:h),e)}e.block$data(h,function validateKeyword(){if(!1===t.errors)assignValid(),t.modifying&&modifyData(e),reportErrs(()=>e.error());else{const o=t.async?function validateAsync(){const e=i.let("ruleErrs",null);return i.try(()=>assignValid(n._`await `),t=>i.assign(h,!1).if(n._`${t} instanceof ${m.ValidationError}`,()=>i.assign(e,n._`${t}.errors`),()=>i.throw(t))),e}():function validateSync(){const e=n._`${f}.errors`;return i.assign(e,null),assignValid(n.nil),e}();t.modifying&&modifyData(e),reportErrs(()=>function addErrs(e,t){const{gen:o}=e;o.if(n._`Array.isArray(${t})`,()=>{o.assign(r.default.vErrors,n._`${r.default.vErrors} === null ? ${t} : ${r.default.vErrors}.concat(${t})`).assign(r.default.errors,n._`${r.default.vErrors}.length`),(0,a.extendErrors)(e)},()=>e.error())}(e,o))}}),e.ok(null!==(o=t.valid)&&void 0!==o?o:h)},t.validSchemaType=function validSchemaType(e,t,o=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||o&&void 0===e)},t.validateKeywordUsage=function validateKeywordUsage({schema:e,opts:t,self:o,errSchemaPath:n},r,s){if(Array.isArray(r.keyword)?!r.keyword.includes(s):r.keyword!==s)throw new Error("ajv implementation error");const a=r.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw new Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(r.validateSchema){if(!r.validateSchema(e[s])){const e=`keyword "${s}" value is invalid at path "${n}": `+o.errorsText(r.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);o.logger.error(e)}}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/subschema.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js");t.getSubschema=function getSubschema(e,{keyword:t,schemaProp:o,schema:s,schemaPath:a,errSchemaPath:i,topSchemaRef:d}){if(void 0!==t&&void 0!==s)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const s=e.schema[t];return void 0===o?{schema:s,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[o],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(o)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,r.escapeFragment)(o)}`}}if(void 0!==s){if(void 0===a||void 0===i||void 0===d)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:a,topSchemaRef:d,errSchemaPath:i}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function extendSubschemaData(e,t,{dataProp:o,dataPropType:s,data:a,dataTypes:i,propertyName:d}){if(void 0!==a&&void 0!==o)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==o){const{errorPath:a,dataPathArr:i,opts:d}=t;dataContextProps(c.let("data",n._`${t.data}${(0,n.getProperty)(o)}`,!0)),e.errorPath=n.str`${a}${(0,r.getErrorPath)(o,s,d.jsPropertySyntax)}`,e.parentDataProperty=n._`${o}`,e.dataPathArr=[...i,e.parentDataProperty]}if(void 0!==a){dataContextProps(a instanceof n.Name?a:c.let("data",a,!0)),void 0!==d&&(e.propertyName=d)}function dataContextProps(o){e.data=o,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,o]}i&&(e.dataTypes=i)},t.extendSubschemaMode=function extendSubschemaMode(e,{jtdDiscriminator:t,jtdMetadata:o,compositeRule:n,createErrors:r,allErrors:s}){void 0!==n&&(e.compositeRule=n),void 0!==r&&(e.createErrors=r),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=o}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/core.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/index.js");Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js");Object.defineProperty(t,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/validation_error.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/ref_error.js"),i=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/rules.js"),d=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/index.js"),c=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),u=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/resolve.js"),l=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/dataType.js"),m=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),p=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/refs/data.json"),f=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/uri.js"),defaultRegExp=(e,t)=>new RegExp(e,t);defaultRegExp.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],g=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},v={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function requiredOptions(e){var t,o,n,r,s,a,i,d,c,u,l,m,p,h,g,y,v,b,k,w,$,j,x,S,P;const Z=e.strict,T=null===(t=e.code)||void 0===t?void 0:t.optimize,E=!0===T||void 0===T?1:T||0,I=null!==(n=null===(o=e.code)||void 0===o?void 0:o.regExp)&&void 0!==n?n:defaultRegExp,z=null!==(r=e.uriResolver)&&void 0!==r?r:f.default;return{strictSchema:null===(a=null!==(s=e.strictSchema)&&void 0!==s?s:Z)||void 0===a||a,strictNumbers:null===(d=null!==(i=e.strictNumbers)&&void 0!==i?i:Z)||void 0===d||d,strictTypes:null!==(u=null!==(c=e.strictTypes)&&void 0!==c?c:Z)&&void 0!==u?u:"log",strictTuples:null!==(m=null!==(l=e.strictTuples)&&void 0!==l?l:Z)&&void 0!==m?m:"log",strictRequired:null!==(h=null!==(p=e.strictRequired)&&void 0!==p?p:Z)&&void 0!==h&&h,code:e.code?{...e.code,optimize:E,regExp:I}:{optimize:E,regExp:I},loopRequired:null!==(g=e.loopRequired)&&void 0!==g?g:200,loopEnum:null!==(y=e.loopEnum)&&void 0!==y?y:200,meta:null===(v=e.meta)||void 0===v||v,messages:null===(b=e.messages)||void 0===b||b,inlineRefs:null===(k=e.inlineRefs)||void 0===k||k,schemaId:null!==(w=e.schemaId)&&void 0!==w?w:"$id",addUsedSchema:null===($=e.addUsedSchema)||void 0===$||$,validateSchema:null===(j=e.validateSchema)||void 0===j||j,validateFormats:null===(x=e.validateFormats)||void 0===x||x,unicodeRegExp:null===(S=e.unicodeRegExp)||void 0===S||S,int32range:null===(P=e.int32range)||void 0===P||P,uriResolver:z}}class Ajv{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...requiredOptions(e)};const{es5:t,lines:o}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:g,es5:t,lines:o}),this.logger=function getLogger(e){if(!1===e)return b;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,i.getRules)(),checkOptions.call(this,y,e,"NOT SUPPORTED"),checkOptions.call(this,v,e,"DEPRECATED","warn"),this._metaOpts=getMetaSchemaOptions.call(this),e.formats&&addInitialFormats.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&addInitialKeywords.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),addInitialSchemas.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:o}=this.opts;let n=p;"id"===o&&(n={...p},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[o],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let o;if("string"==typeof e){if(o=this.getSchema(e),!o)throw new Error(`no schema with key or ref "${e}"`)}else o=this.compile(e);const n=o(t);return"$async"in o||(this.errors=o.errors),n}compile(e,t){const o=this._addSchema(e,t);return o.validate||this._compileSchemaEnv(o)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:o}=this.opts;return runCompileAsync.call(this,e,t);async function runCompileAsync(e,t){await loadMetaSchema.call(this,e.$schema);const o=this._addSchema(e,t);return o.validate||_compileAsync.call(this,o)}async function loadMetaSchema(e){e&&!this.getSchema(e)&&await runCompileAsync.call(this,{$ref:e},!0)}async function _compileAsync(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return checkLoaded.call(this,t),await loadMissingSchema.call(this,t.missingSchema),_compileAsync.call(this,e)}}function checkLoaded({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function loadMissingSchema(e){const o=await _loadSchema.call(this,e);this.refs[e]||await loadMetaSchema.call(this,o.$schema),this.refs[e]||this.addSchema(o,e,t)}async function _loadSchema(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=o(e))}finally{delete this._loading[e]}}}addSchema(e,t,o,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,o,n);return this}let r;if("object"==typeof e){const{schemaId:t}=this.opts;if(r=e[t],void 0!==r&&"string"!=typeof r)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||r),this._checkUnique(t),this.schemas[t]=this._addSchema(e,o,t,n,!0),this}addMetaSchema(e,t,o=this.opts.validateSchema){return this.addSchema(e,t,!0,o),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let o;if(o=e.$schema,void 0!==o&&"string"!=typeof o)throw new Error("$schema must be a string");if(o=o||this.opts.defaultMeta||this.defaultMeta(),!o)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(o,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=getSchEnv.call(this,e));)e=t;if(void 0===t){const{schemaId:o}=this.opts,n=new d.SchemaEnv({schema:{},schemaId:o});if(t=d.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=getSchEnv.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let o=e[this.opts.schemaId];return o&&(o=(0,u.normalizeId)(o),delete this.schemas[o],delete this.refs[o]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let o;if("string"==typeof e)o=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=o);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(o=(t=e).keyword,Array.isArray(o)&&!o.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(checkKeyword.call(this,o,t),!t)return(0,m.eachItem)(o,e=>addRule.call(this,e)),this;keywordMetaschema.call(this,t);const n={...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)};return(0,m.eachItem)(o,0===n.type.length?e=>addRule.call(this,e,n):e=>n.type.forEach(t=>addRule.call(this,e,n,t))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const o of t.rules){const t=o.rules.findIndex(t=>t.keyword===e);t>=0&&o.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:o="data"}={}){return e&&0!==e.length?e.map(e=>`${o}${e.instancePath} ${e.message}`).reduce((e,o)=>e+t+o):"No errors"}$dataMetaSchema(e,t){const o=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let r=e;for(const e of t)r=r[e];for(const e in o){const t=o[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,s=r[e];n&&s&&(r[e]=schemaOrData(s))}}return e}_removeAllSchemas(e,t){for(const o in e){const n=e[o];t&&!t.test(o)||("string"==typeof n?delete e[o]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[o]))}}_addSchema(e,t,o,n=this.opts.validateSchema,r=this.opts.addUsedSchema){let s;const{schemaId:a}=this.opts;if("object"==typeof e)s=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let i=this._cache.get(e);if(void 0!==i)return i;o=(0,u.normalizeId)(s||o);const c=u.getSchemaRefs.call(this,e,o);return i=new d.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:o,localRefs:c}),this._cache.set(i.schema,i),r&&!o.startsWith("#")&&(o&&this._checkUnique(o),this.refs[o]=i),n&&this.validateSchema(e,!0),i}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):d.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{d.compileSchema.call(this,e)}finally{this.opts=t}}}function checkOptions(e,t,o,n="error"){for(const r in e){const s=r;s in t&&this.logger[n](`${o}: option ${r}. ${e[s]}`)}}function getSchEnv(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function addInitialSchemas(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function addInitialFormats(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function addInitialKeywords(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const o=e[t];o.keyword||(o.keyword=t),this.addKeyword(o)}}}function getMetaSchemaOptions(){const e={...this.opts};for(const t of h)delete e[t];return e}Ajv.ValidationError=s.default,Ajv.MissingRefError=a.default,t.default=Ajv;const b={log(){},warn(){},error(){}};const k=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(e,t){const{RULES:o}=this;if((0,m.eachItem)(e,e=>{if(o.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!k.test(e))throw new Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function addRule(e,t,o){var n;const r=null==t?void 0:t.post;if(o&&r)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:s}=this;let a=r?s.post:s.rules.find(({type:e})=>e===o);if(a||(a={type:o,rules:[]},s.rules.push(a)),s.keywords[e]=!0,!t)return;const i={keyword:e,definition:{...t,type:(0,l.getJSONTypes)(t.type),schemaType:(0,l.getJSONTypes)(t.schemaType)}};t.before?addBeforeRule.call(this,a,i,t.before):a.rules.push(i),s.all[e]=i,null===(n=t.implements)||void 0===n||n.forEach(e=>this.addKeyword(e))}function addBeforeRule(e,t,o){const n=e.rules.findIndex(e=>e.keyword===o);n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${o} is not defined`))}function keywordMetaschema(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=schemaOrData(t)),e.validateSchema=this.compile(t,!0))}const w={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(e){return{anyOf:[e,w]}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/refs/data.json":function(e){e.exports=JSON.parse('{"$id":"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#","description":"Meta-schema for $data reference (JSON AnySchema extension proposal)","type":"object","required":["$data"],"properties":{"$data":{"type":"string","anyOf":[{"format":"relative-json-pointer"},{"format":"json-pointer"}]}},"additionalProperties":false}')},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/refs/json-schema-draft-07.json":function(e){e.exports=JSON.parse('{"$schema":"http://json-schema.org/draft-07/schema#","$id":"http://json-schema.org/draft-07/schema#","title":"Core schema meta-schema","definitions":{"schemaArray":{"type":"array","minItems":1,"items":{"$ref":"#"}},"nonNegativeInteger":{"type":"integer","minimum":0},"nonNegativeIntegerDefault0":{"allOf":[{"$ref":"#/definitions/nonNegativeInteger"},{"default":0}]},"simpleTypes":{"enum":["array","boolean","integer","null","number","object","string"]},"stringArray":{"type":"array","items":{"type":"string"},"uniqueItems":true,"default":[]}},"type":["object","boolean"],"properties":{"$id":{"type":"string","format":"uri-reference"},"$schema":{"type":"string","format":"uri"},"$ref":{"type":"string","format":"uri-reference"},"$comment":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"default":true,"readOnly":{"type":"boolean","default":false},"examples":{"type":"array","items":true},"multipleOf":{"type":"number","exclusiveMinimum":0},"maximum":{"type":"number"},"exclusiveMaximum":{"type":"number"},"minimum":{"type":"number"},"exclusiveMinimum":{"type":"number"},"maxLength":{"$ref":"#/definitions/nonNegativeInteger"},"minLength":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"pattern":{"type":"string","format":"regex"},"additionalItems":{"$ref":"#"},"items":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/schemaArray"}],"default":true},"maxItems":{"$ref":"#/definitions/nonNegativeInteger"},"minItems":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"uniqueItems":{"type":"boolean","default":false},"contains":{"$ref":"#"},"maxProperties":{"$ref":"#/definitions/nonNegativeInteger"},"minProperties":{"$ref":"#/definitions/nonNegativeIntegerDefault0"},"required":{"$ref":"#/definitions/stringArray"},"additionalProperties":{"$ref":"#"},"definitions":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"properties":{"type":"object","additionalProperties":{"$ref":"#"},"default":{}},"patternProperties":{"type":"object","additionalProperties":{"$ref":"#"},"propertyNames":{"format":"regex"},"default":{}},"dependencies":{"type":"object","additionalProperties":{"anyOf":[{"$ref":"#"},{"$ref":"#/definitions/stringArray"}]}},"propertyNames":{"$ref":"#"},"const":true,"enum":{"type":"array","items":true,"minItems":1,"uniqueItems":true},"type":{"anyOf":[{"$ref":"#/definitions/simpleTypes"},{"type":"array","items":{"$ref":"#/definitions/simpleTypes"},"minItems":1,"uniqueItems":true}]},"format":{"type":"string"},"contentMediaType":{"type":"string"},"contentEncoding":{"type":"string"},"if":{"$ref":"#"},"then":{"$ref":"#"},"else":{"$ref":"#"},"allOf":{"$ref":"#/definitions/schemaArray"},"anyOf":{"$ref":"#/definitions/schemaArray"},"oneOf":{"$ref":"#/definitions/schemaArray"},"not":{"$ref":"#"}},"default":true}')},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/equal.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/fast-deep-equal/index.js");n.code='require("ajv/dist/runtime/equal").default',t.default=n},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/ucs2length.js":function(e,t){function ucs2length(e){const t=e.length;let o,n=0,r=0;for(;r<t;)n++,o=e.charCodeAt(r++),o>=55296&&o<=56319&&r<t&&(o=e.charCodeAt(r),56320==(64512&o)&&r++);return n}Object.defineProperty(t,"__esModule",{value:!0}),t.default=ucs2length,ucs2length.code='require("ajv/dist/runtime/ucs2length").default'},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/uri.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/fast-uri/index.js");n.code='require("ajv/dist/runtime/uri").default',t.default=n},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/validation_error.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0});class ValidationError extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=ValidationError},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:o}=e,{items:n}=t;Array.isArray(n)?validateAdditionalItems(e,n):(0,r.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas')}};function validateAdditionalItems(e,t){const{gen:o,schema:s,data:a,keyword:i,it:d}=e;d.items=!0;const c=o.const("len",n._`${a}.length`);if(!1===s)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof s&&!(0,r.alwaysValidSchema)(d,s)){const s=o.var("valid",n._`${c} <= ${t.length}`);o.if((0,n.not)(s),()=>function validateItems(s){o.forRange("i",t.length,c,t=>{e.subschema({keyword:i,dataProp:t,dataPropType:r.Type.Num},s),d.allErrors||o.if((0,n.not)(s),()=>o.break())})}(s)),e.ok(s)}}t.validateAdditionalItems=validateAdditionalItems,t.default=s},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/names.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),i={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>r._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:o,parentSchema:i,data:d,errsCount:c,it:u}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:l,opts:m}=u;if(u.props=!0,"all"!==m.removeAdditional&&(0,a.alwaysValidSchema)(u,o))return;const p=(0,n.allSchemaProperties)(i.properties),f=(0,n.allSchemaProperties)(i.patternProperties);function deleteAdditional(e){t.code(r._`delete ${d}[${e}]`)}function additionalPropertyCode(n){if("all"===m.removeAdditional||m.removeAdditional&&!1===o)deleteAdditional(n);else{if(!1===o)return e.setParams({additionalProperty:n}),e.error(),void(l||t.break());if("object"==typeof o&&!(0,a.alwaysValidSchema)(u,o)){const o=t.name("valid");"failing"===m.removeAdditional?(applyAdditionalSchema(n,o,!1),t.if((0,r.not)(o),()=>{e.reset(),deleteAdditional(n)})):(applyAdditionalSchema(n,o),l||t.if((0,r.not)(o),()=>t.break()))}}}function applyAdditionalSchema(t,o,n){const r={keyword:"additionalProperties",dataProp:t,dataPropType:a.Type.Str};!1===n&&Object.assign(r,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(r,o)}!function checkAdditionalProperties(){t.forIn("key",d,o=>{p.length||f.length?t.if(function isAdditional(o){let s;if(p.length>8){const e=(0,a.schemaRefOrVal)(u,i.properties,"properties");s=(0,n.isOwnProperty)(t,e,o)}else s=p.length?(0,r.or)(...p.map(e=>r._`${o} === ${e}`)):r.nil;f.length&&(s=(0,r.or)(s,...f.map(t=>r._`${(0,n.usePattern)(e,t)}.test(${o})`)));return(0,r.not)(s)}(o),()=>additionalPropertyCode(o)):additionalPropertyCode(o)})}(),e.ok(r._`${c} === ${s.default.errors}`)}};t.default=i},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/allOf.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),r={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:o,it:r}=e;if(!Array.isArray(o))throw new Error("ajv implementation error");const s=t.name("valid");o.forEach((t,o)=>{if((0,n.alwaysValidSchema)(r,t))return;const a=e.subschema({keyword:"allOf",schemaProp:o},s);e.ok(s),e.mergeEvaluated(a)})}};t.default=r},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/anyOf.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js").validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/contains.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:o,parentSchema:s,data:a,it:i}=e;let d,c;const{minContains:u,maxContains:l}=s;i.opts.next?(d=void 0===u?1:u,c=l):d=1;const m=t.const("len",n._`${a}.length`);if(e.setParams({min:d,max:c}),void 0===c&&0===d)return void(0,r.checkStrictMode)(i,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&d>c)return(0,r.checkStrictMode)(i,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,r.alwaysValidSchema)(i,o)){let t=n._`${m} >= ${d}`;return void 0!==c&&(t=n._`${t} && ${m} <= ${c}`),void e.pass(t)}i.items=!0;const p=t.name("valid");function validateItemsWithCount(){const e=t.name("_valid"),o=t.let("count",0);validateItems(e,()=>t.if(e,()=>function checkLimits(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${d}`,()=>t.assign(p,!0).break()):(t.if(n._`${e} > ${c}`,()=>t.assign(p,!1).break()),1===d?t.assign(p,!0):t.if(n._`${e} >= ${d}`,()=>t.assign(p,!0)))}(o)))}function validateItems(o,n){t.forRange("i",0,m,t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:r.Type.Num,compositeRule:!0},o),n()})}void 0===c&&1===d?validateItems(p,()=>t.if(p,()=>t.break())):0===d?(t.let(p,!0),void 0!==c&&t.if(n._`${a}.length > 0`,validateItemsWithCount)):(t.let(p,!1),validateItemsWithCount()),e.result(p,()=>e.reset())}};t.default=s},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/dependencies.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js");t.error={message:({params:{property:e,depsCount:t,deps:o}})=>{const r=1===t?"property":"properties";return n.str`must have ${r} ${o} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:o,missingProperty:r}})=>n._`{property: ${e},
    missingProperty: ${r},
    depsCount: ${t},
    deps: ${o}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,o]=function splitDependencies({schema:e}){const t={},o={};for(const n in e){if("__proto__"===n)continue;(Array.isArray(e[n])?t:o)[n]=e[n]}return[t,o]}(e);validatePropertyDeps(e,t),validateSchemaDeps(e,o)}};function validatePropertyDeps(e,t=e.schema){const{gen:o,data:r,it:a}=e;if(0===Object.keys(t).length)return;const i=o.let("missing");for(const d in t){const c=t[d];if(0===c.length)continue;const u=(0,s.propertyInData)(o,r,d,a.opts.ownProperties);e.setParams({property:d,depsCount:c.length,deps:c.join(", ")}),a.allErrors?o.if(u,()=>{for(const t of c)(0,s.checkReportMissingProp)(e,t)}):(o.if(n._`${u} && (${(0,s.checkMissingProp)(e,c,i)})`),(0,s.reportMissingProp)(e,i),o.else())}}function validateSchemaDeps(e,t=e.schema){const{gen:o,data:n,keyword:a,it:i}=e,d=o.name("valid");for(const c in t)(0,r.alwaysValidSchema)(i,t[c])||(o.if((0,s.propertyInData)(o,n,c,i.opts.ownProperties),()=>{const t=e.subschema({keyword:a,schemaProp:c},d);e.mergeValidEvaluated(t,d)},()=>o.var(d,!0)),e.ok(d))}t.validatePropertyDeps=validatePropertyDeps,t.validateSchemaDeps=validateSchemaDeps,t.default=a},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/if.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:o,it:s}=e;void 0===o.then&&void 0===o.else&&(0,r.checkStrictMode)(s,'"if" without "then" and "else" is ignored');const a=hasSchema(s,"then"),i=hasSchema(s,"else");if(!a&&!i)return;const d=t.let("valid",!0),c=t.name("_valid");if(function validateIf(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},c);e.mergeEvaluated(t)}(),e.reset(),a&&i){const o=t.let("ifClause");e.setParams({ifClause:o}),t.if(c,validateClause("then",o),validateClause("else",o))}else a?t.if(c,validateClause("then")):t.if((0,n.not)(c),validateClause("else"));function validateClause(o,r){return()=>{const s=e.subschema({keyword:o},c);t.assign(d,c),e.mergeValidEvaluated(s,d),r?t.assign(r,n._`${o}`):e.setParams({ifClause:o})}}e.pass(d,()=>e.error(!0))}};function hasSchema(e,t){const o=e.schema[t];return void 0!==o&&!(0,r.alwaysValidSchema)(e,o)}t.default=s},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/index.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/items.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/items2020.js"),i=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/contains.js"),d=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/dependencies.js"),c=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js"),u=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"),l=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/properties.js"),m=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js"),p=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/not.js"),f=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/anyOf.js"),h=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/oneOf.js"),g=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/allOf.js"),y=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/if.js"),v=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/thenElse.js");t.default=function getApplicator(e=!1){const t=[p.default,f.default,h.default,g.default,y.default,v.default,c.default,u.default,d.default,l.default,m.default];return e?t.push(r.default,a.default):t.push(n.default,s.default),t.push(i.default),t}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/items.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js"),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:o}=e;if(Array.isArray(t))return validateTuple(e,"additionalItems",t);o.items=!0,(0,r.alwaysValidSchema)(o,t)||e.ok((0,s.validateArray)(e))}};function validateTuple(e,t,o=e.schema){const{gen:s,parentSchema:a,data:i,keyword:d,it:c}=e;!function checkStrictTuple(e){const{opts:n,errSchemaPath:s}=c,a=o.length,i=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(n.strictTuples&&!i){const e=`"${d}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,r.checkStrictMode)(c,e,n.strictTuples)}}(a),c.opts.unevaluated&&o.length&&!0!==c.items&&(c.items=r.mergeEvaluated.items(s,o.length,c.items));const u=s.name("valid"),l=s.const("len",n._`${i}.length`);o.forEach((t,o)=>{(0,r.alwaysValidSchema)(c,t)||(s.if(n._`${l} > ${o}`,()=>e.subschema({keyword:d,schemaProp:o,dataProp:o},u)),e.ok(u))})}t.validateTuple=validateTuple,t.default=a},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/items2020.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js"),i={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:o,it:n}=e,{prefixItems:i}=o;n.items=!0,(0,r.alwaysValidSchema)(n,t)||(i?(0,a.validateAdditionalItems)(e,i):e.ok((0,s.validateArray)(e)))}};t.default=i},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/not.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),r={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:o,it:r}=e;if((0,n.alwaysValidSchema)(r,o))return void e.fail();const s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};t.default=r},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/oneOf.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:o,parentSchema:s,it:a}=e;if(!Array.isArray(o))throw new Error("ajv implementation error");if(a.opts.discriminator&&s.discriminator)return;const i=o,d=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block(function validateOneOf(){i.forEach((o,s)=>{let i;(0,r.alwaysValidSchema)(a,o)?t.var(u,!0):i=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},u),s>0&&t.if(n._`${u} && ${d}`).assign(d,!1).assign(c,n._`[${c}, ${s}]`).else(),t.if(u,()=>{t.assign(d,!0),t.assign(c,s),i&&e.mergeEvaluated(i,n.Name)})})}),e.result(d,()=>e.reset(),()=>e.error(!0))}};t.default=s},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),i={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:o,data:i,parentSchema:d,it:c}=e,{opts:u}=c,l=(0,n.allSchemaProperties)(o),m=l.filter(e=>(0,s.alwaysValidSchema)(c,o[e]));if(0===l.length||m.length===l.length&&(!c.opts.unevaluated||!0===c.props))return;const p=u.strictSchema&&!u.allowMatchingProperties&&d.properties,f=t.name("valid");!0===c.props||c.props instanceof r.Name||(c.props=(0,a.evaluatedPropsToName)(t,c.props));const{props:h}=c;function checkMatchingProperties(e){for(const t in p)new RegExp(e).test(t)&&(0,s.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function validateProperties(o){t.forIn("key",i,s=>{t.if(r._`${(0,n.usePattern)(e,o)}.test(${s})`,()=>{const n=m.includes(o);n||e.subschema({keyword:"patternProperties",schemaProp:o,dataProp:s,dataPropType:a.Type.Str},f),c.opts.unevaluated&&!0!==h?t.assign(r._`${h}[${s}]`,!0):n||c.allErrors||t.if((0,r.not)(f),()=>t.break())})})}!function validatePatternProperties(){for(const e of l)p&&checkMatchingProperties(e),c.allErrors?validateProperties(e):(t.var(f,!0),validateProperties(e),t.if(f))}()}};t.default=i},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/items.js"),r={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=r},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/properties.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js"),i={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:o,parentSchema:i,data:d,it:c}=e;"all"===c.opts.removeAdditional&&void 0===i.additionalProperties&&a.default.code(new n.KeywordCxt(c,a.default,"additionalProperties"));const u=(0,r.allSchemaProperties)(o);for(const e of u)c.definedProperties.add(e);c.opts.unevaluated&&u.length&&!0!==c.props&&(c.props=s.mergeEvaluated.props(t,(0,s.toHash)(u),c.props));const l=u.filter(e=>!(0,s.alwaysValidSchema)(c,o[e]));if(0===l.length)return;const m=t.name("valid");for(const o of l)hasDefault(o)?applyPropertySchema(o):(t.if((0,r.propertyInData)(t,d,o,c.opts.ownProperties)),applyPropertySchema(o),c.allErrors||t.else().var(m,!0),t.endIf()),e.it.definedProperties.add(o),e.ok(m);function hasDefault(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==o[e].default}function applyPropertySchema(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},m)}}};t.default=i},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:o,data:s,it:a}=e;if((0,r.alwaysValidSchema)(a,o))return;const i=t.name("valid");t.forIn("key",s,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},i),t.if((0,n.not)(i),()=>{e.error(!0),a.allErrors||t.break()})}),e.ok(i)}};t.default=s},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/thenElse.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),r={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:o}){void 0===t.if&&(0,n.checkStrictMode)(o,`"${e}" without "if" is ignored`)}};t.default=r},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/names.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js");function hasPropFunc(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function isOwnProperty(e,t,o){return n._`${hasPropFunc(e)}.call(${t}, ${o})`}function noPropertyInData(e,t,o,r){const s=n._`${t}${(0,n.getProperty)(o)} === undefined`;return r?(0,n.or)(s,(0,n.not)(isOwnProperty(e,t,o))):s}function allSchemaProperties(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}t.checkReportMissingProp=function checkReportMissingProp(e,t){const{gen:o,data:r,it:s}=e;o.if(noPropertyInData(o,r,t,s.opts.ownProperties),()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()})},t.checkMissingProp=function checkMissingProp({gen:e,data:t,it:{opts:o}},r,s){return(0,n.or)(...r.map(r=>(0,n.and)(noPropertyInData(e,t,r,o.ownProperties),n._`${s} = ${r}`)))},t.reportMissingProp=function reportMissingProp(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=hasPropFunc,t.isOwnProperty=isOwnProperty,t.propertyInData=function propertyInData(e,t,o,r){const s=n._`${t}${(0,n.getProperty)(o)} !== undefined`;return r?n._`${s} && ${isOwnProperty(e,t,o)}`:s},t.noPropertyInData=noPropertyInData,t.allSchemaProperties=allSchemaProperties,t.schemaProperties=function schemaProperties(e,t){return allSchemaProperties(t).filter(o=>!(0,r.alwaysValidSchema)(e,t[o]))},t.callValidateCode=function callValidateCode({schemaCode:e,data:t,it:{gen:o,topSchemaRef:r,schemaPath:a,errorPath:i},it:d},c,u,l){const m=l?n._`${e}, ${t}, ${r}${a}`:t,p=[[s.default.instancePath,(0,n.strConcat)(s.default.instancePath,i)],[s.default.parentData,d.parentData],[s.default.parentDataProperty,d.parentDataProperty],[s.default.rootData,s.default.rootData]];d.opts.dynamicRef&&p.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);const f=n._`${m}, ${o.object(...p)}`;return u!==n.nil?n._`${c}.call(${u}, ${f})`:n._`${c}(${f})`};const i=n._`new RegExp`;t.usePattern=function usePattern({gen:e,it:{opts:t}},o){const r=t.unicodeRegExp?"u":"",{regExp:s}=t.code,d=s(o,r);return e.scopeValue("pattern",{key:d.toString(),ref:d,code:n._`${"new RegExp"===s.code?i:(0,a.useFunc)(e,s)}(${o}, ${r})`})},t.validateArray=function validateArray(e){const{gen:t,data:o,keyword:s,it:a}=e,i=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return validateItems(()=>t.assign(e,!1)),e}return t.var(i,!0),validateItems(()=>t.break()),i;function validateItems(a){const d=t.const("len",n._`${o}.length`);t.forRange("i",0,d,o=>{e.subschema({keyword:s,dataProp:o,dataPropType:r.Type.Num},i),t.if((0,n.not)(i),a)})}},t.validateUnion=function validateUnion(e){const{gen:t,schema:o,keyword:s,it:a}=e;if(!Array.isArray(o))throw new Error("ajv implementation error");if(o.some(e=>(0,r.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;const i=t.let("valid",!1),d=t.name("_valid");t.block(()=>o.forEach((o,r)=>{const a=e.subschema({keyword:s,schemaProp:r,compositeRule:!0},d);t.assign(i,n._`${i} || ${d}`);e.mergeValidEvaluated(a,d)||t.if((0,n.not)(i))})),e.result(i,()=>e.reset(),()=>e.error(!0))}},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/id.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const o={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=o},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/index.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/id.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/ref.js"),s=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,r.default];t.default=s},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/ref.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/ref_error.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/names.js"),i=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/index.js"),d=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:o,it:r}=e,{baseId:a,schemaEnv:d,validateName:c,opts:u,self:l}=r,{root:m}=d;if(("#"===o||"#/"===o)&&a===m.baseId)return function callRootRef(){if(d===m)return callRef(e,c,d,d.$async);const o=t.scopeValue("root",{ref:m});return callRef(e,s._`${o}.validate`,m,m.$async)}();const p=i.resolveRef.call(l,m,a,o);if(void 0===p)throw new n.default(r.opts.uriResolver,a,o);return p instanceof i.SchemaEnv?function callValidate(t){const o=getValidate(e,t);callRef(e,o,t,t.$async)}(p):function inlineRefSchema(n){const r=t.scopeValue("schema",!0===u.code.source?{ref:n,code:(0,s.stringify)(n)}:{ref:n}),a=t.name("valid"),i=e.subschema({schema:n,dataTypes:[],schemaPath:s.nil,topSchemaRef:r,errSchemaPath:o},a);e.mergeEvaluated(i),e.ok(a)}(p)}};function getValidate(e,t){const{gen:o}=e;return t.validate?o.scopeValue("validate",{ref:t.validate}):s._`${o.scopeValue("wrapper",{ref:t})}.validate`}function callRef(e,t,o,n){const{gen:i,it:c}=e,{allErrors:u,schemaEnv:l,opts:m}=c,p=m.passContext?a.default.this:s.nil;function addErrorsFrom(e){const t=s._`${e}.errors`;i.assign(a.default.vErrors,s._`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),i.assign(a.default.errors,s._`${a.default.vErrors}.length`)}function addEvaluatedFrom(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==o?void 0:o.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=d.mergeEvaluated.props(i,n.props,c.props));else{const t=i.var("props",s._`${e}.evaluated.props`);c.props=d.mergeEvaluated.props(i,t,c.props,s.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=d.mergeEvaluated.items(i,n.items,c.items));else{const t=i.var("items",s._`${e}.evaluated.items`);c.items=d.mergeEvaluated.items(i,t,c.items,s.Name)}}n?function callAsyncRef(){if(!l.$async)throw new Error("async schema referenced by sync schema");const o=i.let("valid");i.try(()=>{i.code(s._`await ${(0,r.callValidateCode)(e,t,p)}`),addEvaluatedFrom(t),u||i.assign(o,!0)},e=>{i.if(s._`!(${e} instanceof ${c.ValidationError})`,()=>i.throw(e)),addErrorsFrom(e),u||i.assign(o,!1)}),e.ok(o)}():function callSyncRef(){e.result((0,r.callValidateCode)(e,t,p),()=>addEvaluatedFrom(t),()=>addErrorsFrom(t))}()}t.getValidate=getValidate,t.callRef=callRef,t.default=c},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/discriminator/index.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/discriminator/types.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/index.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/ref_error.js"),i=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),d={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===r.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:o}})=>n._`{error: ${e}, tag: ${o}, tagValue: ${t}}`},code(e){const{gen:t,data:o,schema:d,parentSchema:c,it:u}=e,{oneOf:l}=c;if(!u.opts.discriminator)throw new Error("discriminator: requires discriminator option");const m=d.propertyName;if("string"!=typeof m)throw new Error("discriminator: requires propertyName");if(d.mapping)throw new Error("discriminator: mapping is not supported");if(!l)throw new Error("discriminator: requires oneOf keyword");const p=t.let("valid",!1),f=t.const("tag",n._`${o}${(0,n.getProperty)(m)}`);function applyTagSchema(o){const r=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:o},r);return e.mergeEvaluated(s,n.Name),r}t.if(n._`typeof ${f} == "string"`,()=>function validateMapping(){const o=function getMapping(){var e;const t={},o=hasRequired(c);let n=!0;for(let t=0;t<l.length;t++){let r=l[t];if((null==r?void 0:r.$ref)&&!(0,i.schemaHasRulesButRef)(r,u.self.RULES)){const e=r.$ref;if(r=s.resolveRef.call(u.self,u.schemaEnv.root,u.baseId,e),r instanceof s.SchemaEnv&&(r=r.schema),void 0===r)throw new a.default(u.opts.uriResolver,u.baseId,e)}const d=null===(e=null==r?void 0:r.properties)||void 0===e?void 0:e[m];if("object"!=typeof d)throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${m}"`);n=n&&(o||hasRequired(r)),addMappings(d,t)}if(!n)throw new Error(`discriminator: "${m}" must be required`);return t;function hasRequired({required:e}){return Array.isArray(e)&&e.includes(m)}function addMappings(e,t){if(e.const)addMapping(e.const,t);else{if(!e.enum)throw new Error(`discriminator: "properties/${m}" must have "const" or "enum"`);for(const o of e.enum)addMapping(o,t)}}function addMapping(e,o){if("string"!=typeof e||e in t)throw new Error(`discriminator: "${m}" values must be unique strings`);t[e]=o}}();t.if(!1);for(const e in o)t.elseIf(n._`${f} === ${e}`),t.assign(p,applyTagSchema(o[e]));t.else(),e.error(!1,{discrError:r.DiscrError.Mapping,tag:f,tagName:m}),t.endIf()}(),()=>e.error(!1,{discrError:r.DiscrError.Tag,tag:f,tagName:m})),e.ok(p)}};t.default=d},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/discriminator/types.js":function(e,t){var o;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(o||(t.DiscrError=o={}))},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/draft7.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/core/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/index.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/applicator/index.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/format/index.js"),i=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/metadata.js"),d=[n.default,r.default,(0,s.default)(),a.default,i.metadataVocabulary,i.contentVocabulary];t.default=d},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/format/format.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:o,data:r,$data:s,schema:a,schemaCode:i,it:d}=e,{opts:c,errSchemaPath:u,schemaEnv:l,self:m}=d;c.validateFormats&&(s?function validate$DataFormat(){const s=o.scopeValue("formats",{ref:m.formats,code:c.code.formats}),a=o.const("fDef",n._`${s}[${i}]`),d=o.let("fType"),u=o.let("format");o.if(n._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,()=>o.assign(d,n._`${a}.type || "string"`).assign(u,n._`${a}.validate`),()=>o.assign(d,n._`"string"`).assign(u,a)),e.fail$data((0,n.or)(function unknownFmt(){return!1===c.strictSchema?n.nil:n._`${i} && !${u}`}(),function invalidFmt(){const e=l.$async?n._`(${a}.async ? await ${u}(${r}) : ${u}(${r}))`:n._`${u}(${r})`,o=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${r}))`;return n._`${u} && ${u} !== true && ${d} === ${t} && !${o}`}()))}():function validateFormat(){const s=m.formats[a];if(!s)return void function unknownFormat(){if(!1===c.strictSchema)return void m.logger.warn(unknownMsg());throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${a}" ignored in schema at path "${u}"`}}();if(!0===s)return;const[i,d,p]=function getFormat(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(a)}`:void 0,r=o.scopeValue("formats",{key:a,ref:e,code:t});if("object"==typeof e&&!(e instanceof RegExp))return[e.type||"string",e.validate,n._`${r}.validate`];return["string",e,r]}(s);i===t&&e.pass(function validCondition(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!l.$async)throw new Error("async format in sync schema");return n._`await ${p}(${r})`}return"function"==typeof d?n._`${p}(${r})`:n._`${p}.test(${r})`}())}())}};t.default=r},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/format/index.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=[o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/format/format.js").default];t.default=n},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/metadata.js":function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/const.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/equal.js"),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:o,$data:a,schemaCode:i,schema:d}=e;a||d&&"object"==typeof d?e.fail$data(n._`!${(0,r.useFunc)(t,s.default)}(${o}, ${i})`):e.fail(n._`${d} !== ${o}`)}};t.default=a},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/enum.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/equal.js"),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:o,$data:a,schema:i,schemaCode:d,it:c}=e;if(!a&&0===i.length)throw new Error("enum must have non-empty array");const u=i.length>=c.opts.loopEnum;let l;const getEql=()=>null!=l?l:l=(0,r.useFunc)(t,s.default);let m;if(u||a)m=t.let("valid"),e.block$data(m,function loopEnum(){t.assign(m,!1),t.forOf("v",d,e=>t.if(n._`${getEql()}(${o}, ${e})`,()=>t.assign(m,!0).break()))});else{if(!Array.isArray(i))throw new Error("ajv implementation error");const e=t.const("vSchema",d);m=(0,n.or)(...i.map((t,r)=>function equalCode(e,t){const r=i[t];return"object"==typeof r&&null!==r?n._`${getEql()}(${o}, ${e}[${t}])`:n._`${o} === ${r}`}(e,r)))}e.pass(m)}};t.default=a},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/index.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitNumber.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/multipleOf.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitLength.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/pattern.js"),i=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitProperties.js"),d=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/required.js"),c=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitItems.js"),u=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js"),l=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/const.js"),m=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/enum.js"),p=[n.default,r.default,s.default,a.default,i.default,d.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},l.default,m.default];t.default=p},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitItems.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const o="maxItems"===e?"more":"fewer";return n.str`must NOT have ${o} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:o,schemaCode:r}=e,s="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${o}.length ${s} ${r}`)}};t.default=r},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitLength.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/ucs2length.js"),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const o="maxLength"===e?"more":"fewer";return n.str`must NOT have ${o} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:o,schemaCode:a,it:i}=e,d="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===i.opts.unicode?n._`${o}.length`:n._`${(0,r.useFunc)(e.gen,s.default)}(${o})`;e.fail$data(n._`${c} ${d} ${a}`)}};t.default=a},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitNumber.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r=n.operators,s={maximum:{okStr:"<=",ok:r.LTE,fail:r.GT},minimum:{okStr:">=",ok:r.GTE,fail:r.LT},exclusiveMaximum:{okStr:"<",ok:r.LT,fail:r.GTE},exclusiveMinimum:{okStr:">",ok:r.GT,fail:r.LTE}},a={message:({keyword:e,schemaCode:t})=>n.str`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${s[e].okStr}, limit: ${t}}`},i={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:a,code(e){const{keyword:t,data:o,schemaCode:r}=e;e.fail$data(n._`${o} ${s[t].fail} ${r} || isNaN(${o})`)}};t.default=i},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/limitProperties.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const o="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${o} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:o,schemaCode:r}=e,s="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${o}).length ${s} ${r}`)}};t.default=r},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/multipleOf.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:o,schemaCode:r,it:s}=e,a=s.opts.multipleOfPrecision,i=t.let("res"),d=a?n._`Math.abs(Math.round(${i}) - ${i}) > 1e-${a}`:n._`${i} !== parseInt(${i})`;e.fail$data(n._`(${r} === 0 || (${i} = ${o}/${r}, ${d}))`)}};t.default=r},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/pattern.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),a={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>s.str`must match pattern "${e}"`,params:({schemaCode:e})=>s._`{pattern: ${e}}`},code(e){const{gen:t,data:o,$data:a,schema:i,schemaCode:d,it:c}=e,u=c.opts.unicodeRegExp?"u":"";if(a){const{regExp:n}=c.opts.code,a="new RegExp"===n.code?s._`new RegExp`:(0,r.useFunc)(t,n),i=t.let("valid");t.try(()=>t.assign(i,s._`${a}(${d}, ${u}).test(${o})`),()=>t.assign(i,!1)),e.fail$data(s._`!${i}`)}else{const t=(0,n.usePattern)(e,i);e.fail$data(s._`!${t}.test(${o})`)}}};t.default=a},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/required.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/code.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>r.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>r._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:o,schemaCode:a,data:i,$data:d,it:c}=e,{opts:u}=c;if(!d&&0===o.length)return;const l=o.length>=u.loopRequired;if(c.allErrors?function allErrorsMode(){if(l||d)e.block$data(r.nil,loopAllRequired);else for(const t of o)(0,n.checkReportMissingProp)(e,t)}():function exitOnErrorMode(){const s=t.let("missing");if(l||d){const o=t.let("valid",!0);e.block$data(o,()=>function loopUntilMissing(o,s){e.setParams({missingProperty:o}),t.forOf(o,a,()=>{t.assign(s,(0,n.propertyInData)(t,i,o,u.ownProperties)),t.if((0,r.not)(s),()=>{e.error(),t.break()})},r.nil)}(s,o)),e.ok(o)}else t.if((0,n.checkMissingProp)(e,o,s)),(0,n.reportMissingProp)(e,s),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of o)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,s.checkStrictMode)(c,t,c.opts.strictRequired)}}function loopAllRequired(){t.forOf("prop",a,o=>{e.setParams({missingProperty:o}),t.if((0,n.noPropertyInData)(t,i,o,u.ownProperties),()=>e.error())})}}};t.default=a},"./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js":function(e,t,o){Object.defineProperty(t,"__esModule",{value:!0});const n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/validate/dataType.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/codegen/index.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/compile/util.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/ajv/dist/runtime/equal.js"),i={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>r.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>r._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:o,$data:i,schema:d,parentSchema:c,schemaCode:u,it:l}=e;if(!i&&!d)return;const m=t.let("valid"),p=c.items?(0,n.getSchemaTypes)(c.items):[];function loopN(s,a){const i=t.name("item"),d=(0,n.checkDataTypes)(p,i,l.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",r._`{}`);t.for(r._`;${s}--;`,()=>{t.let(i,r._`${o}[${s}]`),t.if(d,r._`continue`),p.length>1&&t.if(r._`typeof ${i} == "string"`,r._`${i} += "_"`),t.if(r._`typeof ${c}[${i}] == "number"`,()=>{t.assign(a,r._`${c}[${i}]`),e.error(),t.assign(m,!1).break()}).code(r._`${c}[${i}] = ${s}`)})}function loopN2(n,i){const d=(0,s.useFunc)(t,a.default),c=t.name("outer");t.label(c).for(r._`;${n}--;`,()=>t.for(r._`${i} = ${n}; ${i}--;`,()=>t.if(r._`${d}(${o}[${n}], ${o}[${i}])`,()=>{e.error(),t.assign(m,!1).break(c)})))}e.block$data(m,function validateUniqueItems(){const n=t.let("i",r._`${o}.length`),s=t.let("j");e.setParams({i:n,j:s}),t.assign(m,!0),t.if(r._`${n} > 1`,()=>(function canOptimize(){return p.length>0&&!p.some(e=>"object"===e||"array"===e)}()?loopN:loopN2)(n,s))},r._`${u} === false`),e.ok(m)}};t.default=i},"./node_modules/@modelcontextprotocol/sdk/node_modules/json-schema-traverse/index.js":function(e){var t=e.exports=function(e,t,o){"function"==typeof t&&(o=t,t={}),_traverse(t,"function"==typeof(o=t.cb||o)?o:o.pre||function(){},o.post||function(){},e,"",e)};function _traverse(e,o,n,r,s,a,i,d,c,u){if(r&&"object"==typeof r&&!Array.isArray(r)){for(var l in o(r,s,a,i,d,c,u),r){var m=r[l];if(Array.isArray(m)){if(l in t.arrayKeywords)for(var p=0;p<m.length;p++)_traverse(e,o,n,m[p],s+"/"+l+"/"+p,a,s,l,r,p)}else if(l in t.propsKeywords){if(m&&"object"==typeof m)for(var f in m)_traverse(e,o,n,m[f],s+"/"+l+"/"+escapeJsonPtr(f),a,s,l,r,f)}else(l in t.keywords||e.allKeys&&!(l in t.skipKeywords))&&_traverse(e,o,n,m,s+"/"+l,a,s,l,r)}n(r,s,a,i,d,c,u)}}function escapeJsonPtr(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}t.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},t.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},t.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},t.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/Options.js":function(e,t,o){o.r(t),o.d(t,{defaultOptions:function(){return r},getDefaultOptions:function(){return getDefaultOptions},ignoreOverride:function(){return n},jsonDescription:function(){return jsonDescription}});const n=Symbol("Let zodToJsonSchema decide on which parser to use"),jsonDescription=(e,t)=>{if(t.description)try{return{...e,...JSON.parse(t.description)}}catch{}return e},r={name:void 0,$refStrategy:"root",basePath:["#"],effectStrategy:"input",pipeStrategy:"all",dateStrategy:"format:date-time",mapStrategy:"entries",removeAdditionalStrategy:"passthrough",allowedAdditionalProperties:!0,rejectedAdditionalProperties:!1,definitionPath:"definitions",target:"jsonSchema7",strictUnions:!1,definitions:{},errorMessages:!1,markdownDescription:!1,patternStrategy:"escape",applyRegexFlags:!1,emailStrategy:"format:email",base64Strategy:"contentEncoding:base64",nameStrategy:"ref",openAiAnyTypeName:"OpenAiAnyType"},getDefaultOptions=e=>"string"==typeof e?{...r,name:e}:{...r,...e}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/Refs.js":function(e,t,o){o.r(t),o.d(t,{getRefs:function(){return getRefs}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/Options.js");const getRefs=e=>{const t=(0,n.getDefaultOptions)(e),o=void 0!==t.name?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,flags:{hasReferencedOpenAiAnyType:!1},currentPath:o,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([e,o])=>[o._def,{def:o._def,path:[...t.basePath,t.definitionPath,e],jsonSchema:void 0}]))}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/errorMessages.js":function(e,t,o){function addErrorMessage(e,t,o,n){n?.errorMessages&&o&&(e.errorMessage={...e.errorMessage,[t]:o})}function setResponseValueAndErrors(e,t,o,n,r){e[t]=o,addErrorMessage(e,t,n,r)}o.r(t),o.d(t,{addErrorMessage:function(){return addErrorMessage},setResponseValueAndErrors:function(){return setResponseValueAndErrors}})},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js":function(e,t,o){o.r(t),o.d(t,{getRelativePath:function(){return getRelativePath}});const getRelativePath=(e,t)=>{let o=0;for(;o<e.length&&o<t.length&&e[o]===t[o];o++);return[(e.length-o).toString(),...t.slice(o)].join("/")}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/index.js":function(e,t,o){o.r(t),o.d(t,{addErrorMessage:function(){return s.addErrorMessage},defaultOptions:function(){return n.defaultOptions},getDefaultOptions:function(){return n.getDefaultOptions},getRefs:function(){return r.getRefs},getRelativePath:function(){return a.getRelativePath},ignoreOverride:function(){return n.ignoreOverride},jsonDescription:function(){return n.jsonDescription},parseAnyDef:function(){return d.parseAnyDef},parseArrayDef:function(){return c.parseArrayDef},parseBigintDef:function(){return u.parseBigintDef},parseBooleanDef:function(){return l.parseBooleanDef},parseBrandedDef:function(){return m.parseBrandedDef},parseCatchDef:function(){return p.parseCatchDef},parseDateDef:function(){return f.parseDateDef},parseDef:function(){return i.parseDef},parseDefaultDef:function(){return h.parseDefaultDef},parseEffectsDef:function(){return g.parseEffectsDef},parseEnumDef:function(){return y.parseEnumDef},parseIntersectionDef:function(){return v.parseIntersectionDef},parseLiteralDef:function(){return b.parseLiteralDef},parseMapDef:function(){return k.parseMapDef},parseNativeEnumDef:function(){return w.parseNativeEnumDef},parseNeverDef:function(){return $.parseNeverDef},parseNullDef:function(){return j.parseNullDef},parseNullableDef:function(){return x.parseNullableDef},parseNumberDef:function(){return S.parseNumberDef},parseObjectDef:function(){return P.parseObjectDef},parseOptionalDef:function(){return Z.parseOptionalDef},parsePipelineDef:function(){return T.parsePipelineDef},parsePromiseDef:function(){return E.parsePromiseDef},parseReadonlyDef:function(){return I.parseReadonlyDef},parseRecordDef:function(){return z.parseRecordDef},parseSetDef:function(){return C.parseSetDef},parseStringDef:function(){return R.parseStringDef},parseTupleDef:function(){return N.parseTupleDef},parseUndefinedDef:function(){return O.parseUndefinedDef},parseUnionDef:function(){return A.parseUnionDef},parseUnknownDef:function(){return D.parseUnknownDef},primitiveMappings:function(){return A.primitiveMappings},selectParser:function(){return M.selectParser},setResponseValueAndErrors:function(){return s.setResponseValueAndErrors},zodPatterns:function(){return R.zodPatterns},zodToJsonSchema:function(){return L.zodToJsonSchema}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/Options.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/Refs.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js"),i=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js"),d=(o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseTypes.js"),o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/any.js")),c=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/array.js"),u=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js"),l=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js"),m=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"),p=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js"),f=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/date.js"),h=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/default.js"),g=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js"),y=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js"),v=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js"),b=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js"),k=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/map.js"),w=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js"),$=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/never.js"),j=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/null.js"),x=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js"),S=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/number.js"),P=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/object.js"),Z=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js"),T=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js"),E=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js"),I=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js"),z=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/record.js"),C=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/set.js"),R=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/string.js"),N=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js"),O=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js"),A=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/union.js"),D=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js"),M=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/selectParser.js"),L=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js");t.default=L.zodToJsonSchema},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js":function(e,t,o){o.r(t),o.d(t,{parseDef:function(){return parseDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/Options.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/selectParser.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/any.js");function parseDef(e,t,o=!1){const s=t.seen.get(e);if(t.override){const r=t.override?.(e,t,s,o);if(r!==n.ignoreOverride)return r}if(s&&!o){const e=get$ref(s,t);if(void 0!==e)return e}const a={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,a);const i=(0,r.selectParser)(e,e.typeName,t),d="function"==typeof i?parseDef(i(),t):i;if(d&&addMeta(e,t,d),t.postProcess){const o=t.postProcess(d,e,t);return a.jsonSchema=d,o}return a.jsonSchema=d,d}const get$ref=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:(0,s.getRelativePath)(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((e,o)=>t.currentPath[o]===e)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),(0,a.parseAnyDef)(t)):"seen"===t.$refStrategy?(0,a.parseAnyDef)(t):void 0}},addMeta=(e,t,o)=>(e.description&&(o.description=e.description,t.markdownDescription&&(o.markdownDescription=e.description)),o)},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseTypes.js":function(e,t,o){o.r(t)},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/any.js":function(e,t,o){o.r(t),o.d(t,{parseAnyDef:function(){return parseAnyDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js");function parseAnyDef(e){if("openAi"!==e.target)return{};const t=[...e.basePath,e.definitionPath,e.openAiAnyTypeName];return e.flags.hasReferencedOpenAiAnyType=!0,{$ref:"relative"===e.$refStrategy?(0,n.getRelativePath)(t,e.currentPath):t.join("/")}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/array.js":function(e,t,o){o.r(t),o.d(t,{parseArrayDef:function(){return parseArrayDef}});var n=o("./node_modules/zod/v3/types.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js");function parseArrayDef(e,t){const o={type:"array"};return e.type?._def&&e.type?._def?.typeName!==n.ZodFirstPartyTypeKind.ZodAny&&(o.items=(0,s.parseDef)(e.type._def,{...t,currentPath:[...t.currentPath,"items"]})),e.minLength&&(0,r.setResponseValueAndErrors)(o,"minItems",e.minLength.value,e.minLength.message,t),e.maxLength&&(0,r.setResponseValueAndErrors)(o,"maxItems",e.maxLength.value,e.maxLength.message,t),e.exactLength&&((0,r.setResponseValueAndErrors)(o,"minItems",e.exactLength.value,e.exactLength.message,t),(0,r.setResponseValueAndErrors)(o,"maxItems",e.exactLength.value,e.exactLength.message,t)),o}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js":function(e,t,o){o.r(t),o.d(t,{parseBigintDef:function(){return parseBigintDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/errorMessages.js");function parseBigintDef(e,t){const o={type:"integer",format:"int64"};if(!e.checks)return o;for(const r of e.checks)switch(r.kind){case"min":"jsonSchema7"===t.target?r.inclusive?(0,n.setResponseValueAndErrors)(o,"minimum",r.value,r.message,t):(0,n.setResponseValueAndErrors)(o,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(o.exclusiveMinimum=!0),(0,n.setResponseValueAndErrors)(o,"minimum",r.value,r.message,t));break;case"max":"jsonSchema7"===t.target?r.inclusive?(0,n.setResponseValueAndErrors)(o,"maximum",r.value,r.message,t):(0,n.setResponseValueAndErrors)(o,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(o.exclusiveMaximum=!0),(0,n.setResponseValueAndErrors)(o,"maximum",r.value,r.message,t));break;case"multipleOf":(0,n.setResponseValueAndErrors)(o,"multipleOf",r.value,r.message,t)}return o}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js":function(e,t,o){function parseBooleanDef(){return{type:"boolean"}}o.r(t),o.d(t,{parseBooleanDef:function(){return parseBooleanDef}})},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js":function(e,t,o){o.r(t),o.d(t,{parseBrandedDef:function(){return parseBrandedDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js");function parseBrandedDef(e,t){return(0,n.parseDef)(e.type._def,t)}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js":function(e,t,o){o.r(t),o.d(t,{parseCatchDef:function(){return parseCatchDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js");const parseCatchDef=(e,t)=>(0,n.parseDef)(e.innerType._def,t)},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/date.js":function(e,t,o){o.r(t),o.d(t,{parseDateDef:function(){return parseDateDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/errorMessages.js");function parseDateDef(e,t,o){const n=o??t.dateStrategy;if(Array.isArray(n))return{anyOf:n.map((o,n)=>parseDateDef(e,t,o))};switch(n){case"string":case"format:date-time":return{type:"string",format:"date-time"};case"format:date":return{type:"string",format:"date"};case"integer":return integerDateParser(e,t)}}const integerDateParser=(e,t)=>{const o={type:"integer",format:"unix-time"};if("openApi3"===t.target)return o;for(const r of e.checks)switch(r.kind){case"min":(0,n.setResponseValueAndErrors)(o,"minimum",r.value,r.message,t);break;case"max":(0,n.setResponseValueAndErrors)(o,"maximum",r.value,r.message,t)}return o}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/default.js":function(e,t,o){o.r(t),o.d(t,{parseDefaultDef:function(){return parseDefaultDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js");function parseDefaultDef(e,t){return{...(0,n.parseDef)(e.innerType._def,t),default:e.defaultValue()}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js":function(e,t,o){o.r(t),o.d(t,{parseEffectsDef:function(){return parseEffectsDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/any.js");function parseEffectsDef(e,t){return"input"===t.effectStrategy?(0,n.parseDef)(e.schema._def,t):(0,r.parseAnyDef)(t)}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js":function(e,t,o){function parseEnumDef(e){return{type:"string",enum:Array.from(e.values)}}o.r(t),o.d(t,{parseEnumDef:function(){return parseEnumDef}})},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js":function(e,t,o){o.r(t),o.d(t,{parseIntersectionDef:function(){return parseIntersectionDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js");const isJsonSchema7AllOfType=e=>(!("type"in e)||"string"!==e.type)&&"allOf"in e;function parseIntersectionDef(e,t){const o=[(0,n.parseDef)(e.left._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),(0,n.parseDef)(e.right._def,{...t,currentPath:[...t.currentPath,"allOf","1"]})].filter(e=>!!e);let r="jsonSchema2019-09"===t.target?{unevaluatedProperties:!1}:void 0;const s=[];return o.forEach(e=>{if(isJsonSchema7AllOfType(e))s.push(...e.allOf),void 0===e.unevaluatedProperties&&(r=void 0);else{let t=e;if("additionalProperties"in e&&!1===e.additionalProperties){const{additionalProperties:o,...n}=e;t=n}else r=void 0;s.push(t)}}),s.length?{allOf:s,...r}:void 0}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js":function(e,t,o){function parseLiteralDef(e,t){const o=typeof e.value;return"bigint"!==o&&"number"!==o&&"boolean"!==o&&"string"!==o?{type:Array.isArray(e.value)?"array":"object"}:"openApi3"===t.target?{type:"bigint"===o?"integer":o,enum:[e.value]}:{type:"bigint"===o?"integer":o,const:e.value}}o.r(t),o.d(t,{parseLiteralDef:function(){return parseLiteralDef}})},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/map.js":function(e,t,o){o.r(t),o.d(t,{parseMapDef:function(){return parseMapDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/record.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/any.js");function parseMapDef(e,t){if("record"===t.mapStrategy)return(0,r.parseRecordDef)(e,t);return{type:"array",maxItems:125,items:{type:"array",items:[(0,n.parseDef)(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||(0,s.parseAnyDef)(t),(0,n.parseDef)(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||(0,s.parseAnyDef)(t)],minItems:2,maxItems:2}}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js":function(e,t,o){function parseNativeEnumDef(e){const t=e.values,o=Object.keys(e.values).filter(e=>"number"!=typeof t[t[e]]).map(e=>t[e]),n=Array.from(new Set(o.map(e=>typeof e)));return{type:1===n.length?"string"===n[0]?"string":"number":["string","number"],enum:o}}o.r(t),o.d(t,{parseNativeEnumDef:function(){return parseNativeEnumDef}})},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/never.js":function(e,t,o){o.r(t),o.d(t,{parseNeverDef:function(){return parseNeverDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/any.js");function parseNeverDef(e){return"openAi"===e.target?void 0:{not:(0,n.parseAnyDef)({...e,currentPath:[...e.currentPath,"not"]})}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/null.js":function(e,t,o){function parseNullDef(e){return"openApi3"===e.target?{enum:["null"],nullable:!0}:{type:"null"}}o.r(t),o.d(t,{parseNullDef:function(){return parseNullDef}})},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js":function(e,t,o){o.r(t),o.d(t,{parseNullableDef:function(){return parseNullableDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/union.js");function parseNullableDef(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return"openApi3"===t.target?{type:r.primitiveMappings[e.innerType._def.typeName],nullable:!0}:{type:[r.primitiveMappings[e.innerType._def.typeName],"null"]};if("openApi3"===t.target){const o=(0,n.parseDef)(e.innerType._def,{...t,currentPath:[...t.currentPath]});return o&&"$ref"in o?{allOf:[o],nullable:!0}:o&&{...o,nullable:!0}}const o=(0,n.parseDef)(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return o&&{anyOf:[o,{type:"null"}]}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/number.js":function(e,t,o){o.r(t),o.d(t,{parseNumberDef:function(){return parseNumberDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/errorMessages.js");function parseNumberDef(e,t){const o={type:"number"};if(!e.checks)return o;for(const r of e.checks)switch(r.kind){case"int":o.type="integer",(0,n.addErrorMessage)(o,"type",r.message,t);break;case"min":"jsonSchema7"===t.target?r.inclusive?(0,n.setResponseValueAndErrors)(o,"minimum",r.value,r.message,t):(0,n.setResponseValueAndErrors)(o,"exclusiveMinimum",r.value,r.message,t):(r.inclusive||(o.exclusiveMinimum=!0),(0,n.setResponseValueAndErrors)(o,"minimum",r.value,r.message,t));break;case"max":"jsonSchema7"===t.target?r.inclusive?(0,n.setResponseValueAndErrors)(o,"maximum",r.value,r.message,t):(0,n.setResponseValueAndErrors)(o,"exclusiveMaximum",r.value,r.message,t):(r.inclusive||(o.exclusiveMaximum=!0),(0,n.setResponseValueAndErrors)(o,"maximum",r.value,r.message,t));break;case"multipleOf":(0,n.setResponseValueAndErrors)(o,"multipleOf",r.value,r.message,t)}return o}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/object.js":function(e,t,o){o.r(t),o.d(t,{parseObjectDef:function(){return parseObjectDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js");function parseObjectDef(e,t){const o="openAi"===t.target,r={type:"object",properties:{}},s=[],a=e.shape();for(const e in a){let i=a[e];if(void 0===i||void 0===i._def)continue;let d=safeIsOptional(i);d&&o&&("ZodOptional"===i._def.typeName&&(i=i._def.innerType),i.isNullable()||(i=i.nullable()),d=!1);const c=(0,n.parseDef)(i._def,{...t,currentPath:[...t.currentPath,"properties",e],propertyPath:[...t.currentPath,"properties",e]});void 0!==c&&(r.properties[e]=c,d||s.push(e))}s.length&&(r.required=s);const i=function decideAdditionalProperties(e,t){if("ZodNever"!==e.catchall._def.typeName)return(0,n.parseDef)(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return"strict"===t.removeAdditionalStrategy?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}(e,t);return void 0!==i&&(r.additionalProperties=i),r}function safeIsOptional(e){try{return e.isOptional()}catch{return!0}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js":function(e,t,o){o.r(t),o.d(t,{parseOptionalDef:function(){return parseOptionalDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/any.js");const parseOptionalDef=(e,t)=>{if(t.currentPath.toString()===t.propertyPath?.toString())return(0,n.parseDef)(e.innerType._def,t);const o=(0,n.parseDef)(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return o?{anyOf:[{not:(0,r.parseAnyDef)(t)},o]}:(0,r.parseAnyDef)(t)}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js":function(e,t,o){o.r(t),o.d(t,{parsePipelineDef:function(){return parsePipelineDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js");const parsePipelineDef=(e,t)=>{if("input"===t.pipeStrategy)return(0,n.parseDef)(e.in._def,t);if("output"===t.pipeStrategy)return(0,n.parseDef)(e.out._def,t);const o=(0,n.parseDef)(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]});return{allOf:[o,(0,n.parseDef)(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",o?"1":"0"]})].filter(e=>void 0!==e)}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js":function(e,t,o){o.r(t),o.d(t,{parsePromiseDef:function(){return parsePromiseDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js");function parsePromiseDef(e,t){return(0,n.parseDef)(e.type._def,t)}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js":function(e,t,o){o.r(t),o.d(t,{parseReadonlyDef:function(){return parseReadonlyDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js");const parseReadonlyDef=(e,t)=>(0,n.parseDef)(e.innerType._def,t)},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/record.js":function(e,t,o){o.r(t),o.d(t,{parseRecordDef:function(){return parseRecordDef}});var n=o("./node_modules/zod/v3/types.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/string.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"),i=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/any.js");function parseRecordDef(e,t){if("openAi"===t.target&&console.warn("Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead."),"openApi3"===t.target&&e.keyType?._def.typeName===n.ZodFirstPartyTypeKind.ZodEnum)return{type:"object",required:e.keyType._def.values,properties:e.keyType._def.values.reduce((o,n)=>({...o,[n]:(0,r.parseDef)(e.valueType._def,{...t,currentPath:[...t.currentPath,"properties",n]})??(0,i.parseAnyDef)(t)}),{}),additionalProperties:t.rejectedAdditionalProperties};const o={type:"object",additionalProperties:(0,r.parseDef)(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]})??t.allowedAdditionalProperties};if("openApi3"===t.target)return o;if(e.keyType?._def.typeName===n.ZodFirstPartyTypeKind.ZodString&&e.keyType._def.checks?.length){const{type:n,...r}=(0,s.parseStringDef)(e.keyType._def,t);return{...o,propertyNames:r}}if(e.keyType?._def.typeName===n.ZodFirstPartyTypeKind.ZodEnum)return{...o,propertyNames:{enum:e.keyType._def.values}};if(e.keyType?._def.typeName===n.ZodFirstPartyTypeKind.ZodBranded&&e.keyType._def.type._def.typeName===n.ZodFirstPartyTypeKind.ZodString&&e.keyType._def.type._def.checks?.length){const{type:n,...r}=(0,a.parseBrandedDef)(e.keyType._def,t);return{...o,propertyNames:r}}return o}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/set.js":function(e,t,o){o.r(t),o.d(t,{parseSetDef:function(){return parseSetDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/errorMessages.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js");function parseSetDef(e,t){const o={type:"array",uniqueItems:!0,items:(0,r.parseDef)(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(0,n.setResponseValueAndErrors)(o,"minItems",e.minSize.value,e.minSize.message,t),e.maxSize&&(0,n.setResponseValueAndErrors)(o,"maxItems",e.maxSize.value,e.maxSize.message,t),o}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/string.js":function(e,t,o){o.r(t),o.d(t,{parseStringDef:function(){return parseStringDef},zodPatterns:function(){return s}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/errorMessages.js");let r;const s={cuid:/^[cC][^\s-]{8,}$/,cuid2:/^[0-9a-z]+$/,ulid:/^[0-9A-HJKMNP-TV-Z]{26}$/,email:/^(?!\.)(?!.*\.\.)([a-zA-Z0-9_'+\-\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,}$/,emoji:()=>(void 0===r&&(r=RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),r),uuid:/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/,ipv4:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,ipv4Cidr:/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,ipv6:/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,ipv6Cidr:/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64:/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,base64url:/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,nanoid:/^[a-zA-Z0-9_-]{21}$/,jwt:/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/};function parseStringDef(e,t){const o={type:"string"};if(e.checks)for(const r of e.checks)switch(r.kind){case"min":(0,n.setResponseValueAndErrors)(o,"minLength","number"==typeof o.minLength?Math.max(o.minLength,r.value):r.value,r.message,t);break;case"max":(0,n.setResponseValueAndErrors)(o,"maxLength","number"==typeof o.maxLength?Math.min(o.maxLength,r.value):r.value,r.message,t);break;case"email":switch(t.emailStrategy){case"format:email":addFormat(o,"email",r.message,t);break;case"format:idn-email":addFormat(o,"idn-email",r.message,t);break;case"pattern:zod":addPattern(o,s.email,r.message,t)}break;case"url":addFormat(o,"uri",r.message,t);break;case"uuid":addFormat(o,"uuid",r.message,t);break;case"regex":addPattern(o,r.regex,r.message,t);break;case"cuid":addPattern(o,s.cuid,r.message,t);break;case"cuid2":addPattern(o,s.cuid2,r.message,t);break;case"startsWith":addPattern(o,RegExp(`^${escapeLiteralCheckValue(r.value,t)}`),r.message,t);break;case"endsWith":addPattern(o,RegExp(`${escapeLiteralCheckValue(r.value,t)}$`),r.message,t);break;case"datetime":addFormat(o,"date-time",r.message,t);break;case"date":addFormat(o,"date",r.message,t);break;case"time":addFormat(o,"time",r.message,t);break;case"duration":addFormat(o,"duration",r.message,t);break;case"length":(0,n.setResponseValueAndErrors)(o,"minLength","number"==typeof o.minLength?Math.max(o.minLength,r.value):r.value,r.message,t),(0,n.setResponseValueAndErrors)(o,"maxLength","number"==typeof o.maxLength?Math.min(o.maxLength,r.value):r.value,r.message,t);break;case"includes":addPattern(o,RegExp(escapeLiteralCheckValue(r.value,t)),r.message,t);break;case"ip":"v6"!==r.version&&addFormat(o,"ipv4",r.message,t),"v4"!==r.version&&addFormat(o,"ipv6",r.message,t);break;case"base64url":addPattern(o,s.base64url,r.message,t);break;case"jwt":addPattern(o,s.jwt,r.message,t);break;case"cidr":"v6"!==r.version&&addPattern(o,s.ipv4Cidr,r.message,t),"v4"!==r.version&&addPattern(o,s.ipv6Cidr,r.message,t);break;case"emoji":addPattern(o,s.emoji(),r.message,t);break;case"ulid":addPattern(o,s.ulid,r.message,t);break;case"base64":switch(t.base64Strategy){case"format:binary":addFormat(o,"binary",r.message,t);break;case"contentEncoding:base64":(0,n.setResponseValueAndErrors)(o,"contentEncoding","base64",r.message,t);break;case"pattern:zod":addPattern(o,s.base64,r.message,t)}break;case"nanoid":addPattern(o,s.nanoid,r.message,t);case"toLowerCase":case"toUpperCase":case"trim":break;default:(()=>{})()}return o}function escapeLiteralCheckValue(e,t){return"escape"===t.patternStrategy?function escapeNonAlphaNumeric(e){let t="";for(let o=0;o<e.length;o++)a.has(e[o])||(t+="\\"),t+=e[o];return t}(e):e}const a=new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function addFormat(e,t,o,r){e.format||e.anyOf?.some(e=>e.format)?(e.anyOf||(e.anyOf=[]),e.format&&(e.anyOf.push({format:e.format,...e.errorMessage&&r.errorMessages&&{errorMessage:{format:e.errorMessage.format}}}),delete e.format,e.errorMessage&&(delete e.errorMessage.format,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.anyOf.push({format:t,...o&&r.errorMessages&&{errorMessage:{format:o}}})):(0,n.setResponseValueAndErrors)(e,"format",t,o,r)}function addPattern(e,t,o,r){e.pattern||e.allOf?.some(e=>e.pattern)?(e.allOf||(e.allOf=[]),e.pattern&&(e.allOf.push({pattern:e.pattern,...e.errorMessage&&r.errorMessages&&{errorMessage:{pattern:e.errorMessage.pattern}}}),delete e.pattern,e.errorMessage&&(delete e.errorMessage.pattern,0===Object.keys(e.errorMessage).length&&delete e.errorMessage)),e.allOf.push({pattern:stringifyRegExpWithFlags(t,r),...o&&r.errorMessages&&{errorMessage:{pattern:o}}})):(0,n.setResponseValueAndErrors)(e,"pattern",stringifyRegExpWithFlags(t,r),o,r)}function stringifyRegExpWithFlags(e,t){if(!t.applyRegexFlags||!e.flags)return e.source;const o=e.flags.includes("i"),n=e.flags.includes("m"),r=e.flags.includes("s"),s=o?e.source.toLowerCase():e.source;let a="",i=!1,d=!1,c=!1;for(let e=0;e<s.length;e++)if(i)a+=s[e],i=!1;else{if(o)if(d){if(s[e].match(/[a-z]/)){c?(a+=s[e],a+=`${s[e-2]}-${s[e]}`.toUpperCase(),c=!1):"-"===s[e+1]&&s[e+2]?.match(/[a-z]/)?(a+=s[e],c=!0):a+=`${s[e]}${s[e].toUpperCase()}`;continue}}else if(s[e].match(/[a-z]/)){a+=`[${s[e]}${s[e].toUpperCase()}]`;continue}if(n){if("^"===s[e]){a+="(^|(?<=[\r\n]))";continue}if("$"===s[e]){a+="($|(?=[\r\n]))";continue}}r&&"."===s[e]?a+=d?`${s[e]}\r\n`:`[${s[e]}\r\n]`:(a+=s[e],"\\"===s[e]?i=!0:d&&"]"===s[e]?d=!1:d||"["!==s[e]||(d=!0))}try{new RegExp(a)}catch{return console.warn(`Could not convert regex pattern at ${t.currentPath.join("/")} to a flag-independent form! Falling back to the flag-ignorant source`),e.source}return a}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js":function(e,t,o){o.r(t),o.d(t,{parseTupleDef:function(){return parseTupleDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js");function parseTupleDef(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((e,o)=>(0,n.parseDef)(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[]),additionalItems:(0,n.parseDef)(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((e,o)=>(0,n.parseDef)(e._def,{...t,currentPath:[...t.currentPath,"items",`${o}`]})).reduce((e,t)=>void 0===t?e:[...e,t],[])}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js":function(e,t,o){o.r(t),o.d(t,{parseUndefinedDef:function(){return parseUndefinedDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/any.js");function parseUndefinedDef(e){return{not:(0,n.parseAnyDef)(e)}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/union.js":function(e,t,o){o.r(t),o.d(t,{parseUnionDef:function(){return parseUnionDef},primitiveMappings:function(){return r}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js");const r={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function parseUnionDef(e,t){if("openApi3"===t.target)return asAnyOf(e,t);const o=e.options instanceof Map?Array.from(e.options.values()):e.options;if(o.every(e=>e._def.typeName in r&&(!e._def.checks||!e._def.checks.length))){const e=o.reduce((e,t)=>{const o=r[t._def.typeName];return o&&!e.includes(o)?[...e,o]:e},[]);return{type:e.length>1?e:e[0]}}if(o.every(e=>"ZodLiteral"===e._def.typeName&&!e.description)){const e=o.reduce((e,t)=>{const o=typeof t._def.value;switch(o){case"string":case"number":case"boolean":return[...e,o];case"bigint":return[...e,"integer"];case"object":if(null===t._def.value)return[...e,"null"];default:return e}},[]);if(e.length===o.length){const t=e.filter((e,t,o)=>o.indexOf(e)===t);return{type:t.length>1?t:t[0],enum:o.reduce((e,t)=>e.includes(t._def.value)?e:[...e,t._def.value],[])}}}else if(o.every(e=>"ZodEnum"===e._def.typeName))return{type:"string",enum:o.reduce((e,t)=>[...e,...t._def.values.filter(t=>!e.includes(t))],[])};return asAnyOf(e,t)}const asAnyOf=(e,t)=>{const o=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((e,o)=>(0,n.parseDef)(e._def,{...t,currentPath:[...t.currentPath,"anyOf",`${o}`]})).filter(e=>!!e&&(!t.strictUnions||"object"==typeof e&&Object.keys(e).length>0));return o.length?{anyOf:o}:void 0}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js":function(e,t,o){o.r(t),o.d(t,{parseUnknownDef:function(){return parseUnknownDef}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/any.js");function parseUnknownDef(e){return(0,n.parseAnyDef)(e)}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/selectParser.js":function(e,t,o){o.r(t),o.d(t,{selectParser:function(){return selectParser}});var n=o("./node_modules/zod/v3/types.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/any.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/array.js"),a=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js"),i=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js"),d=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js"),c=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js"),u=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/date.js"),l=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/default.js"),m=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js"),p=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js"),f=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js"),h=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js"),g=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/map.js"),y=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js"),v=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/never.js"),b=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/null.js"),k=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js"),w=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/number.js"),$=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/object.js"),j=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js"),x=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js"),S=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js"),P=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/record.js"),Z=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/set.js"),T=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/string.js"),E=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js"),I=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js"),z=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/union.js"),C=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js"),R=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js");const selectParser=(e,t,o)=>{switch(t){case n.ZodFirstPartyTypeKind.ZodString:return(0,T.parseStringDef)(e,o);case n.ZodFirstPartyTypeKind.ZodNumber:return(0,w.parseNumberDef)(e,o);case n.ZodFirstPartyTypeKind.ZodObject:return(0,$.parseObjectDef)(e,o);case n.ZodFirstPartyTypeKind.ZodBigInt:return(0,a.parseBigintDef)(e,o);case n.ZodFirstPartyTypeKind.ZodBoolean:return(0,i.parseBooleanDef)();case n.ZodFirstPartyTypeKind.ZodDate:return(0,u.parseDateDef)(e,o);case n.ZodFirstPartyTypeKind.ZodUndefined:return(0,I.parseUndefinedDef)(o);case n.ZodFirstPartyTypeKind.ZodNull:return(0,b.parseNullDef)(o);case n.ZodFirstPartyTypeKind.ZodArray:return(0,s.parseArrayDef)(e,o);case n.ZodFirstPartyTypeKind.ZodUnion:case n.ZodFirstPartyTypeKind.ZodDiscriminatedUnion:return(0,z.parseUnionDef)(e,o);case n.ZodFirstPartyTypeKind.ZodIntersection:return(0,f.parseIntersectionDef)(e,o);case n.ZodFirstPartyTypeKind.ZodTuple:return(0,E.parseTupleDef)(e,o);case n.ZodFirstPartyTypeKind.ZodRecord:return(0,P.parseRecordDef)(e,o);case n.ZodFirstPartyTypeKind.ZodLiteral:return(0,h.parseLiteralDef)(e,o);case n.ZodFirstPartyTypeKind.ZodEnum:return(0,p.parseEnumDef)(e);case n.ZodFirstPartyTypeKind.ZodNativeEnum:return(0,y.parseNativeEnumDef)(e);case n.ZodFirstPartyTypeKind.ZodNullable:return(0,k.parseNullableDef)(e,o);case n.ZodFirstPartyTypeKind.ZodOptional:return(0,j.parseOptionalDef)(e,o);case n.ZodFirstPartyTypeKind.ZodMap:return(0,g.parseMapDef)(e,o);case n.ZodFirstPartyTypeKind.ZodSet:return(0,Z.parseSetDef)(e,o);case n.ZodFirstPartyTypeKind.ZodLazy:return()=>e.getter()._def;case n.ZodFirstPartyTypeKind.ZodPromise:return(0,S.parsePromiseDef)(e,o);case n.ZodFirstPartyTypeKind.ZodNaN:case n.ZodFirstPartyTypeKind.ZodNever:return(0,v.parseNeverDef)(o);case n.ZodFirstPartyTypeKind.ZodEffects:return(0,m.parseEffectsDef)(e,o);case n.ZodFirstPartyTypeKind.ZodAny:return(0,r.parseAnyDef)(o);case n.ZodFirstPartyTypeKind.ZodUnknown:return(0,C.parseUnknownDef)(o);case n.ZodFirstPartyTypeKind.ZodDefault:return(0,l.parseDefaultDef)(e,o);case n.ZodFirstPartyTypeKind.ZodBranded:return(0,d.parseBrandedDef)(e,o);case n.ZodFirstPartyTypeKind.ZodReadonly:return(0,R.parseReadonlyDef)(e,o);case n.ZodFirstPartyTypeKind.ZodCatch:return(0,c.parseCatchDef)(e,o);case n.ZodFirstPartyTypeKind.ZodPipeline:return(0,x.parsePipelineDef)(e,o);case n.ZodFirstPartyTypeKind.ZodFunction:case n.ZodFirstPartyTypeKind.ZodVoid:case n.ZodFirstPartyTypeKind.ZodSymbol:default:return}}},"./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js":function(e,t,o){o.r(t),o.d(t,{zodToJsonSchema:function(){return zodToJsonSchema}});var n=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parseDef.js"),r=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/Refs.js"),s=o("./node_modules/@modelcontextprotocol/sdk/node_modules/zod-to-json-schema/dist/esm/parsers/any.js");const zodToJsonSchema=(e,t)=>{const o=(0,r.getRefs)(t);let a="object"==typeof t&&t.definitions?Object.entries(t.definitions).reduce((e,[t,r])=>({...e,[t]:(0,n.parseDef)(r._def,{...o,currentPath:[...o.basePath,o.definitionPath,t]},!0)??(0,s.parseAnyDef)(o)}),{}):void 0;const i="string"==typeof t?t:"title"===t?.nameStrategy?void 0:t?.name,d=(0,n.parseDef)(e._def,void 0===i?o:{...o,currentPath:[...o.basePath,o.definitionPath,i]},!1)??(0,s.parseAnyDef)(o),c="object"==typeof t&&void 0!==t.name&&"title"===t.nameStrategy?t.name:void 0;void 0!==c&&(d.title=c),o.flags.hasReferencedOpenAiAnyType&&(a||(a={}),a[o.openAiAnyTypeName]||(a[o.openAiAnyTypeName]={type:["string","number","integer","boolean","array","null"],items:{$ref:"relative"===o.$refStrategy?"1":[...o.basePath,o.definitionPath,o.openAiAnyTypeName].join("/")}}));const u=void 0===i?a?{...d,[o.definitionPath]:a}:d:{$ref:[..."relative"===o.$refStrategy?[]:o.basePath,o.definitionPath,i].join("/"),[o.definitionPath]:{...a,[i]:d}};return"jsonSchema7"===o.target?u.$schema="http://json-schema.org/draft-07/schema#":"jsonSchema2019-09"!==o.target&&"openAi"!==o.target||(u.$schema="https://json-schema.org/draft/2019-09/schema#"),"openAi"===o.target&&("anyOf"in u||"oneOf"in u||"allOf"in u||"type"in u&&Array.isArray(u.type))&&console.warn("Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property."),u}},"./node_modules/fast-deep-equal/index.js":function(e){e.exports=function equal(e,t){if(e===t)return!0;if(e&&t&&"object"==typeof e&&"object"==typeof t){if(e.constructor!==t.constructor)return!1;var o,n,r;if(Array.isArray(e)){if((o=e.length)!=t.length)return!1;for(n=o;0!==n--;)if(!equal(e[n],t[n]))return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===t.toString();if((o=(r=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(n=o;0!==n--;)if(!Object.prototype.hasOwnProperty.call(t,r[n]))return!1;for(n=o;0!==n--;){var s=r[n];if(!equal(e[s],t[s]))return!1}return!0}return e!=e&&t!=t}},"./node_modules/fast-uri/index.js":function(e,t,o){const{normalizeIPv6:n,removeDotSegments:r,recomposeAuthority:s,normalizeComponentEncoding:a,isIPv4:i,nonSimpleDomain:d}=o("./node_modules/fast-uri/lib/utils.js"),{SCHEMES:c,getSchemeHandler:u}=o("./node_modules/fast-uri/lib/schemes.js");function resolveComponent(e,t,o,n){const s={};return n||(e=parse(serialize(e,o),o),t=parse(serialize(t,o),o)),!(o=o||{}).tolerant&&t.scheme?(s.scheme=t.scheme,s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=r(t.path||""),s.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=r(t.path||""),s.query=t.query):(t.path?("/"===t.path[0]?s.path=r(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?s.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:s.path=t.path:s.path="/"+t.path,s.path=r(s.path)),s.query=t.query):(s.path=e.path,void 0!==t.query?s.query=t.query:s.query=e.query),s.userinfo=e.userinfo,s.host=e.host,s.port=e.port),s.scheme=e.scheme),s.fragment=t.fragment,s}function serialize(e,t){const o={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},n=Object.assign({},t),a=[],i=u(n.scheme||o.scheme);i&&i.serialize&&i.serialize(o,n),void 0!==o.path&&(n.skipEscape?o.path=unescape(o.path):(o.path=escape(o.path),void 0!==o.scheme&&(o.path=o.path.split("%3A").join(":")))),"suffix"!==n.reference&&o.scheme&&a.push(o.scheme,":");const d=s(o);if(void 0!==d&&("suffix"!==n.reference&&a.push("//"),a.push(d),o.path&&"/"!==o.path[0]&&a.push("/")),void 0!==o.path){let e=o.path;n.absolutePath||i&&i.absolutePath||(e=r(e)),void 0===d&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),a.push(e)}return void 0!==o.query&&a.push("?",o.query),void 0!==o.fragment&&a.push("#",o.fragment),a.join("")}const l=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function parse(e,t){const o=Object.assign({},t),r={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let s=!1;"suffix"===o.reference&&(e=o.scheme?o.scheme+":"+e:"//"+e);const a=e.match(l);if(a){if(r.scheme=a[1],r.userinfo=a[3],r.host=a[4],r.port=parseInt(a[5],10),r.path=a[6]||"",r.query=a[7],r.fragment=a[8],isNaN(r.port)&&(r.port=a[5]),r.host){if(!1===i(r.host)){const e=n(r.host);r.host=e.host.toLowerCase(),s=e.isIPV6}else s=!0}void 0!==r.scheme||void 0!==r.userinfo||void 0!==r.host||void 0!==r.port||void 0!==r.query||r.path?void 0===r.scheme?r.reference="relative":void 0===r.fragment?r.reference="absolute":r.reference="uri":r.reference="same-document",o.reference&&"suffix"!==o.reference&&o.reference!==r.reference&&(r.error=r.error||"URI is not a "+o.reference+" reference.");const t=u(o.scheme||r.scheme);if(!(o.unicodeSupport||t&&t.unicodeSupport)&&r.host&&(o.domainHost||t&&t.domainHost)&&!1===s&&d(r.host))try{r.host=URL.domainToASCII(r.host.toLowerCase())}catch(e){r.error=r.error||"Host's domain name can not be converted to ASCII: "+e}(!t||t&&!t.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==r.scheme&&(r.scheme=unescape(r.scheme)),void 0!==r.host&&(r.host=unescape(r.host))),r.path&&(r.path=escape(unescape(r.path))),r.fragment&&(r.fragment=encodeURI(decodeURIComponent(r.fragment)))),t&&t.parse&&t.parse(r,o)}else r.error=r.error||"URI can not be parsed.";return r}const m={SCHEMES:c,normalize:function normalize(e,t){return"string"==typeof e?e=serialize(parse(e,t),t):"object"==typeof e&&(e=parse(serialize(e,t),t)),e},resolve:function resolve(e,t,o){const n=o?Object.assign({scheme:"null"},o):{scheme:"null"},r=resolveComponent(parse(e,n),parse(t,n),n,!0);return n.skipEscape=!0,serialize(r,n)},resolveComponent:resolveComponent,equal:function equal(e,t,o){return"string"==typeof e?(e=unescape(e),e=serialize(a(parse(e,o),!0),{...o,skipEscape:!0})):"object"==typeof e&&(e=serialize(a(e,!0),{...o,skipEscape:!0})),"string"==typeof t?(t=unescape(t),t=serialize(a(parse(t,o),!0),{...o,skipEscape:!0})):"object"==typeof t&&(t=serialize(a(t,!0),{...o,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:serialize,parse:parse};e.exports=m,e.exports.default=m,e.exports.fastUri=m},"./node_modules/fast-uri/lib/schemes.js":function(e,t,o){const{isUUID:n}=o("./node_modules/fast-uri/lib/utils.js"),r=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,s=["http","https","ws","wss","urn","urn:uuid"];function wsIsSecure(e){return!0===e.secure||!1!==e.secure&&(!!e.scheme&&!(3!==e.scheme.length||"w"!==e.scheme[0]&&"W"!==e.scheme[0]||"s"!==e.scheme[1]&&"S"!==e.scheme[1]||"s"!==e.scheme[2]&&"S"!==e.scheme[2]))}function httpParse(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function httpSerialize(e){const t="https"===String(e.scheme).toLowerCase();return e.port!==(t?443:80)&&""!==e.port||(e.port=void 0),e.path||(e.path="/"),e}const a={scheme:"http",domainHost:!0,parse:httpParse,serialize:httpSerialize},i={scheme:"ws",domainHost:!0,parse:function wsParse(e){return e.secure=wsIsSecure(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e},serialize:function wsSerialize(e){if(e.port!==(wsIsSecure(e)?443:80)&&""!==e.port||(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){const[t,o]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=o,e.resourceName=void 0}return e.fragment=void 0,e}},d={http:a,https:{scheme:"https",domainHost:a.domainHost,parse:httpParse,serialize:httpSerialize},ws:i,wss:{scheme:"wss",domainHost:i.domainHost,parse:i.parse,serialize:i.serialize},urn:{scheme:"urn",parse:function urnParse(e,t){if(!e.path)return e.error="URN can not be parsed",e;const o=e.path.match(r);if(o){const n=t.scheme||e.scheme||"urn";e.nid=o[1].toLowerCase(),e.nss=o[2];const r=getSchemeHandler(`${n}:${t.nid||e.nid}`);e.path=void 0,r&&(e=r.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e},serialize:function urnSerialize(e,t){if(void 0===e.nid)throw new Error("URN without nid cannot be serialized");const o=t.scheme||e.scheme||"urn",n=e.nid.toLowerCase(),r=getSchemeHandler(`${o}:${t.nid||n}`);r&&(e=r.serialize(e,t));const s=e,a=e.nss;return s.path=`${n||t.nid}:${a}`,t.skipEscape=!0,s},skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:function urnuuidParse(e,t){const o=e;return o.uuid=o.nss,o.nss=void 0,t.tolerant||o.uuid&&n(o.uuid)||(o.error=o.error||"UUID is not valid."),o},serialize:function urnuuidSerialize(e){const t=e;return t.nss=(e.uuid||"").toLowerCase(),t},skipNormalize:!0}};function getSchemeHandler(e){return e&&(d[e]||d[e.toLowerCase()])||void 0}Object.setPrototypeOf(d,null),e.exports={wsIsSecure:wsIsSecure,SCHEMES:d,isValidSchemeName:function isValidSchemeName(e){return-1!==s.indexOf(e)},getSchemeHandler:getSchemeHandler}},"./node_modules/fast-uri/lib/utils.js":function(e){const t=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),o=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function stringArrayToHexStripped(e){let t="",o=0,n=0;for(n=0;n<e.length;n++)if(o=e[n].charCodeAt(0),48!==o){if(!(o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102))return"";t+=e[n];break}for(n+=1;n<e.length;n++){if(o=e[n].charCodeAt(0),!(o>=48&&o<=57||o>=65&&o<=70||o>=97&&o<=102))return"";t+=e[n]}return t}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function consumeIsZone(e){return e.length=0,!0}function consumeHextets(e,t,o){if(e.length){const n=stringArrayToHexStripped(e);if(""===n)return o.error=!0,!1;t.push(n),e.length=0}return!0}function normalizeIPv6(e){if(function findToken(e,t){let o=0;for(let n=0;n<e.length;n++)e[n]===t&&o++;return o}(e,":")<2)return{host:e,isIPV6:!1};const t=function getIPV6(e){let t=0;const o={error:!1,address:"",zone:""},n=[],r=[];let s=!1,a=!1,i=consumeHextets;for(let d=0;d<e.length;d++){const c=e[d];if("["!==c&&"]"!==c)if(":"!==c)if("%"===c){if(!i(r,n,o))break;i=consumeIsZone}else r.push(c);else{if(!0===s&&(a=!0),!i(r,n,o))break;if(++t>7){o.error=!0;break}d>0&&":"===e[d-1]&&(s=!0),n.push(":")}}return r.length&&(i===consumeIsZone?o.zone=r.join(""):a?n.push(r.join("")):n.push(stringArrayToHexStripped(r))),o.address=n.join(""),o}(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,o=t.address;return t.zone&&(e+="%"+t.zone,o+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:o}}}e.exports={nonSimpleDomain:n,recomposeAuthority:function recomposeAuthority(e){const t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let n=unescape(e.host);if(!o(n)){const t=normalizeIPv6(n);n=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}t.push(n)}return"number"!=typeof e.port&&"string"!=typeof e.port||(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0},normalizeComponentEncoding:function normalizeComponentEncoding(e,t){const o=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=o(e.scheme)),void 0!==e.userinfo&&(e.userinfo=o(e.userinfo)),void 0!==e.host&&(e.host=o(e.host)),void 0!==e.path&&(e.path=o(e.path)),void 0!==e.query&&(e.query=o(e.query)),void 0!==e.fragment&&(e.fragment=o(e.fragment)),e},removeDotSegments:function removeDotSegments(e){let t=e;const o=[];let n=-1,r=0;for(;r=t.length;){if(1===r){if("."===t)break;if("/"===t){o.push("/");break}o.push(t);break}if(2===r){if("."===t[0]){if("."===t[1])break;if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){o.push("/");break}}else if(3===r&&"/.."===t){0!==o.length&&o.pop(),o.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==o.length&&o.pop();continue}}if(-1===(n=t.indexOf("/",1))){o.push(t);break}o.push(t.slice(0,n)),t=t.slice(n)}return o.join("")},isIPv4:o,isUUID:t,normalizeIPv6:normalizeIPv6,stringArrayToHexStripped:stringArrayToHexStripped}},"./node_modules/zod/v3/ZodError.js":function(e,t,o){o.r(t),o.d(t,{ZodError:function(){return ZodError},ZodIssueCode:function(){return r},quotelessJson:function(){return quotelessJson}});var n=o("./node_modules/zod/v3/helpers/util.js");const r=n.util.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),quotelessJson=e=>JSON.stringify(e,null,2).replace(/"([^"]+)":/g,"$1:");class ZodError extends Error{get errors(){return this.issues}constructor(e){super(),this.issues=[],this.addIssue=e=>{this.issues=[...this.issues,e]},this.addIssues=(e=[])=>{this.issues=[...this.issues,...e]};const t=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,t):this.__proto__=t,this.name="ZodError",this.issues=e}format(e){const t=e||function(e){return e.message},o={_errors:[]},processError=e=>{for(const n of e.issues)if("invalid_union"===n.code)n.unionErrors.map(processError);else if("invalid_return_type"===n.code)processError(n.returnTypeError);else if("invalid_arguments"===n.code)processError(n.argumentsError);else if(0===n.path.length)o._errors.push(t(n));else{let e=o,r=0;for(;r<n.path.length;){const o=n.path[r];r===n.path.length-1?(e[o]=e[o]||{_errors:[]},e[o]._errors.push(t(n))):e[o]=e[o]||{_errors:[]},e=e[o],r++}}};return processError(this),o}static assert(e){if(!(e instanceof ZodError))throw new Error(`Not a ZodError: ${e}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,n.util.jsonStringifyReplacer,2)}get isEmpty(){return 0===this.issues.length}flatten(e=e=>e.message){const t={},o=[];for(const n of this.issues)if(n.path.length>0){const o=n.path[0];t[o]=t[o]||[],t[o].push(e(n))}else o.push(e(n));return{formErrors:o,fieldErrors:t}}get formErrors(){return this.flatten()}}ZodError.create=e=>new ZodError(e)},"./node_modules/zod/v3/errors.js":function(e,t,o){o.r(t),o.d(t,{defaultErrorMap:function(){return n.default},getErrorMap:function(){return getErrorMap},setErrorMap:function(){return setErrorMap}});var n=o("./node_modules/zod/v3/locales/en.js");let r=n.default;function setErrorMap(e){r=e}function getErrorMap(){return r}},"./node_modules/zod/v3/helpers/errorUtil.js":function(e,t,o){var n;o.r(t),o.d(t,{errorUtil:function(){return n}}),function(e){e.errToObj=e=>"string"==typeof e?{message:e}:e||{},e.toString=e=>"string"==typeof e?e:e?.message}(n||(n={}))},"./node_modules/zod/v3/helpers/parseUtil.js":function(e,t,o){o.r(t),o.d(t,{DIRTY:function(){return DIRTY},EMPTY_PATH:function(){return s},INVALID:function(){return a},OK:function(){return OK},ParseStatus:function(){return ParseStatus},addIssueToContext:function(){return addIssueToContext},isAborted:function(){return isAborted},isAsync:function(){return isAsync},isDirty:function(){return isDirty},isValid:function(){return isValid},makeIssue:function(){return makeIssue}});var n=o("./node_modules/zod/v3/errors.js"),r=o("./node_modules/zod/v3/locales/en.js");const makeIssue=e=>{const{data:t,path:o,errorMaps:n,issueData:r}=e,s=[...o,...r.path||[]],a={...r,path:s};if(void 0!==r.message)return{...r,path:s,message:r.message};let i="";const d=n.filter(e=>!!e).slice().reverse();for(const e of d)i=e(a,{data:t,defaultError:i}).message;return{...r,path:s,message:i}},s=[];function addIssueToContext(e,t){const o=(0,n.getErrorMap)(),s=makeIssue({issueData:t,data:e.data,path:e.path,errorMaps:[e.common.contextualErrorMap,e.schemaErrorMap,o,o===r.default?void 0:r.default].filter(e=>!!e)});e.common.issues.push(s)}class ParseStatus{constructor(){this.value="valid"}dirty(){"valid"===this.value&&(this.value="dirty")}abort(){"aborted"!==this.value&&(this.value="aborted")}static mergeArray(e,t){const o=[];for(const n of t){if("aborted"===n.status)return a;"dirty"===n.status&&e.dirty(),o.push(n.value)}return{status:e.value,value:o}}static async mergeObjectAsync(e,t){const o=[];for(const e of t){const t=await e.key,n=await e.value;o.push({key:t,value:n})}return ParseStatus.mergeObjectSync(e,o)}static mergeObjectSync(e,t){const o={};for(const n of t){const{key:t,value:r}=n;if("aborted"===t.status)return a;if("aborted"===r.status)return a;"dirty"===t.status&&e.dirty(),"dirty"===r.status&&e.dirty(),"__proto__"===t.value||void 0===r.value&&!n.alwaysSet||(o[t.value]=r.value)}return{status:e.value,value:o}}}const a=Object.freeze({status:"aborted"}),DIRTY=e=>({status:"dirty",value:e}),OK=e=>({status:"valid",value:e}),isAborted=e=>"aborted"===e.status,isDirty=e=>"dirty"===e.status,isValid=e=>"valid"===e.status,isAsync=e=>"undefined"!=typeof Promise&&e instanceof Promise},"./node_modules/zod/v3/helpers/util.js":function(e,t,o){var n,r;o.r(t),o.d(t,{ZodParsedType:function(){return s},getParsedType:function(){return getParsedType},objectUtil:function(){return r},util:function(){return n}}),function(e){e.assertEqual=e=>{},e.assertIs=function assertIs(e){},e.assertNever=function assertNever(e){throw new Error},e.arrayToEnum=e=>{const t={};for(const o of e)t[o]=o;return t},e.getValidEnumValues=t=>{const o=e.objectKeys(t).filter(e=>"number"!=typeof t[t[e]]),n={};for(const e of o)n[e]=t[e];return e.objectValues(n)},e.objectValues=t=>e.objectKeys(t).map(function(e){return t[e]}),e.objectKeys="function"==typeof Object.keys?e=>Object.keys(e):e=>{const t=[];for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.push(o);return t},e.find=(e,t)=>{for(const o of e)if(t(o))return o},e.isInteger="function"==typeof Number.isInteger?e=>Number.isInteger(e):e=>"number"==typeof e&&Number.isFinite(e)&&Math.floor(e)===e,e.joinValues=function joinValues(e,t=" | "){return e.map(e=>"string"==typeof e?`'${e}'`:e).join(t)},e.jsonStringifyReplacer=(e,t)=>"bigint"==typeof t?t.toString():t}(n||(n={})),function(e){e.mergeShapes=(e,t)=>({...e,...t})}(r||(r={}));const s=n.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),getParsedType=e=>{switch(typeof e){case"undefined":return s.undefined;case"string":return s.string;case"number":return Number.isNaN(e)?s.nan:s.number;case"boolean":return s.boolean;case"function":return s.function;case"bigint":return s.bigint;case"symbol":return s.symbol;case"object":return Array.isArray(e)?s.array:null===e?s.null:e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?s.promise:"undefined"!=typeof Map&&e instanceof Map?s.map:"undefined"!=typeof Set&&e instanceof Set?s.set:"undefined"!=typeof Date&&e instanceof Date?s.date:s.object;default:return s.unknown}}},"./node_modules/zod/v3/locales/en.js":function(e,t,o){o.r(t);var n=o("./node_modules/zod/v3/ZodError.js"),r=o("./node_modules/zod/v3/helpers/util.js");t.default=(e,t)=>{let o;switch(e.code){case n.ZodIssueCode.invalid_type:o=e.received===r.ZodParsedType.undefined?"Required":`Expected ${e.expected}, received ${e.received}`;break;case n.ZodIssueCode.invalid_literal:o=`Invalid literal value, expected ${JSON.stringify(e.expected,r.util.jsonStringifyReplacer)}`;break;case n.ZodIssueCode.unrecognized_keys:o=`Unrecognized key(s) in object: ${r.util.joinValues(e.keys,", ")}`;break;case n.ZodIssueCode.invalid_union:o="Invalid input";break;case n.ZodIssueCode.invalid_union_discriminator:o=`Invalid discriminator value. Expected ${r.util.joinValues(e.options)}`;break;case n.ZodIssueCode.invalid_enum_value:o=`Invalid enum value. Expected ${r.util.joinValues(e.options)}, received '${e.received}'`;break;case n.ZodIssueCode.invalid_arguments:o="Invalid function arguments";break;case n.ZodIssueCode.invalid_return_type:o="Invalid function return type";break;case n.ZodIssueCode.invalid_date:o="Invalid date";break;case n.ZodIssueCode.invalid_string:"object"==typeof e.validation?"includes"in e.validation?(o=`Invalid input: must include "${e.validation.includes}"`,"number"==typeof e.validation.position&&(o=`${o} at one or more positions greater than or equal to ${e.validation.position}`)):"startsWith"in e.validation?o=`Invalid input: must start with "${e.validation.startsWith}"`:"endsWith"in e.validation?o=`Invalid input: must end with "${e.validation.endsWith}"`:r.util.assertNever(e.validation):o="regex"!==e.validation?`Invalid ${e.validation}`:"Invalid";break;case n.ZodIssueCode.too_small:o="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at least":"more than"} ${e.minimum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at least":"over"} ${e.minimum} character(s)`:"number"===e.type||"bigint"===e.type?`Number must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${e.minimum}`:"date"===e.type?`Date must be ${e.exact?"exactly equal to ":e.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(e.minimum))}`:"Invalid input";break;case n.ZodIssueCode.too_big:o="array"===e.type?`Array must contain ${e.exact?"exactly":e.inclusive?"at most":"less than"} ${e.maximum} element(s)`:"string"===e.type?`String must contain ${e.exact?"exactly":e.inclusive?"at most":"under"} ${e.maximum} character(s)`:"number"===e.type?`Number must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"bigint"===e.type?`BigInt must be ${e.exact?"exactly":e.inclusive?"less than or equal to":"less than"} ${e.maximum}`:"date"===e.type?`Date must be ${e.exact?"exactly":e.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(e.maximum))}`:"Invalid input";break;case n.ZodIssueCode.custom:o="Invalid input";break;case n.ZodIssueCode.invalid_intersection_types:o="Intersection results could not be merged";break;case n.ZodIssueCode.not_multiple_of:o=`Number must be a multiple of ${e.multipleOf}`;break;case n.ZodIssueCode.not_finite:o="Number must be finite";break;default:o=t.defaultError,r.util.assertNever(e)}return{message:o}}},"./node_modules/zod/v3/types.js":function(e,t,o){o.r(t),o.d(t,{BRAND:function(){return P},NEVER:function(){return le},Schema:function(){return ZodType},ZodAny:function(){return ZodAny},ZodArray:function(){return ZodArray},ZodBigInt:function(){return ZodBigInt},ZodBoolean:function(){return ZodBoolean},ZodBranded:function(){return ZodBranded},ZodCatch:function(){return ZodCatch},ZodDate:function(){return ZodDate},ZodDefault:function(){return ZodDefault},ZodDiscriminatedUnion:function(){return ZodDiscriminatedUnion},ZodEffects:function(){return ZodEffects},ZodEnum:function(){return ZodEnum},ZodFirstPartyTypeKind:function(){return T},ZodFunction:function(){return ZodFunction},ZodIntersection:function(){return ZodIntersection},ZodLazy:function(){return ZodLazy},ZodLiteral:function(){return ZodLiteral},ZodMap:function(){return ZodMap},ZodNaN:function(){return ZodNaN},ZodNativeEnum:function(){return ZodNativeEnum},ZodNever:function(){return ZodNever},ZodNull:function(){return ZodNull},ZodNullable:function(){return ZodNullable},ZodNumber:function(){return ZodNumber},ZodObject:function(){return ZodObject},ZodOptional:function(){return ZodOptional},ZodPipeline:function(){return ZodPipeline},ZodPromise:function(){return ZodPromise},ZodReadonly:function(){return ZodReadonly},ZodRecord:function(){return ZodRecord},ZodSchema:function(){return ZodType},ZodSet:function(){return ZodSet},ZodString:function(){return ZodString},ZodSymbol:function(){return ZodSymbol},ZodTransformer:function(){return ZodEffects},ZodTuple:function(){return ZodTuple},ZodType:function(){return ZodType},ZodUndefined:function(){return ZodUndefined},ZodUnion:function(){return ZodUnion},ZodUnknown:function(){return ZodUnknown},ZodVoid:function(){return ZodVoid},any:function(){return M},array:function(){return V},bigint:function(){return C},boolean:function(){return R},coerce:function(){return ue},custom:function(){return custom},date:function(){return N},datetimeRegex:function(){return datetimeRegex},discriminatedUnion:function(){return H},effect:function(){return se},enum:function(){return oe},function:function(){return X},instanceof:function(){return instanceOfType},intersection:function(){return J},late:function(){return Z},lazy:function(){return ee},literal:function(){return te},map:function(){return Y},nan:function(){return z},nativeEnum:function(){return ne},never:function(){return U},null:function(){return D},nullable:function(){return ie},number:function(){return I},object:function(){return F},oboolean:function(){return oboolean},onumber:function(){return onumber},optional:function(){return ae},ostring:function(){return ostring},pipeline:function(){return ce},preprocess:function(){return de},promise:function(){return re},record:function(){return G},set:function(){return Q},strictObject:function(){return K},string:function(){return E},symbol:function(){return O},transformer:function(){return se},tuple:function(){return W},undefined:function(){return A},union:function(){return B},unknown:function(){return L},void:function(){return q}});var n=o("./node_modules/zod/v3/ZodError.js"),r=o("./node_modules/zod/v3/errors.js"),s=o("./node_modules/zod/v3/locales/en.js"),a=o("./node_modules/zod/v3/helpers/errorUtil.js"),i=o("./node_modules/zod/v3/helpers/parseUtil.js"),d=o("./node_modules/zod/v3/helpers/util.js");class ParseInputLazyPath{constructor(e,t,o,n){this._cachedPath=[],this.parent=e,this.data=t,this._path=o,this._key=n}get path(){return this._cachedPath.length||(Array.isArray(this._key)?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}}const handleResult=(e,t)=>{if((0,i.isValid)(t))return{success:!0,data:t.value};if(!e.common.issues.length)throw new Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;const t=new n.ZodError(e.common.issues);return this._error=t,this._error}}};function processCreateParams(e){if(!e)return{};const{errorMap:t,invalid_type_error:o,required_error:n,description:r}=e;if(t&&(o||n))throw new Error('Can\'t use "invalid_type_error" or "required_error" in conjunction with custom error map.');if(t)return{errorMap:t,description:r};return{errorMap:(t,r)=>{const{message:s}=e;return"invalid_enum_value"===t.code?{message:s??r.defaultError}:void 0===r.data?{message:s??n??r.defaultError}:"invalid_type"!==t.code?{message:r.defaultError}:{message:s??o??r.defaultError}},description:r}}class ZodType{get description(){return this._def.description}_getType(e){return(0,d.getParsedType)(e.data)}_getOrReturnCtx(e,t){return t||{common:e.parent.common,data:e.data,parsedType:(0,d.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return{status:new i.ParseStatus,ctx:{common:e.parent.common,data:e.data,parsedType:(0,d.getParsedType)(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){const t=this._parse(e);if((0,i.isAsync)(t))throw new Error("Synchronous parse encountered promise.");return t}_parseAsync(e){const t=this._parse(e);return Promise.resolve(t)}parse(e,t){const o=this.safeParse(e,t);if(o.success)return o.data;throw o.error}safeParse(e,t){const o={common:{issues:[],async:t?.async??!1,contextualErrorMap:t?.errorMap},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,d.getParsedType)(e)},n=this._parseSync({data:e,path:o.path,parent:o});return handleResult(o,n)}"~validate"(e){const t={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,d.getParsedType)(e)};if(!this["~standard"].async)try{const o=this._parseSync({data:e,path:[],parent:t});return(0,i.isValid)(o)?{value:o.value}:{issues:t.common.issues}}catch(e){e?.message?.toLowerCase()?.includes("encountered")&&(this["~standard"].async=!0),t.common={issues:[],async:!0}}return this._parseAsync({data:e,path:[],parent:t}).then(e=>(0,i.isValid)(e)?{value:e.value}:{issues:t.common.issues})}async parseAsync(e,t){const o=await this.safeParseAsync(e,t);if(o.success)return o.data;throw o.error}async safeParseAsync(e,t){const o={common:{issues:[],contextualErrorMap:t?.errorMap,async:!0},path:t?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:(0,d.getParsedType)(e)},n=this._parse({data:e,path:o.path,parent:o}),r=await((0,i.isAsync)(n)?n:Promise.resolve(n));return handleResult(o,r)}refine(e,t){const getIssueProperties=e=>"string"==typeof t||void 0===t?{message:t}:"function"==typeof t?t(e):t;return this._refinement((t,o)=>{const r=e(t),setError=()=>o.addIssue({code:n.ZodIssueCode.custom,...getIssueProperties(t)});return"undefined"!=typeof Promise&&r instanceof Promise?r.then(e=>!!e||(setError(),!1)):!!r||(setError(),!1)})}refinement(e,t){return this._refinement((o,n)=>!!e(o)||(n.addIssue("function"==typeof t?t(o,n):t),!1))}_refinement(e){return new ZodEffects({schema:this,typeName:T.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this),this["~standard"]={version:1,vendor:"zod",validate:e=>this["~validate"](e)}}optional(){return ZodOptional.create(this,this._def)}nullable(){return ZodNullable.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return ZodArray.create(this)}promise(){return ZodPromise.create(this,this._def)}or(e){return ZodUnion.create([this,e],this._def)}and(e){return ZodIntersection.create(this,e,this._def)}transform(e){return new ZodEffects({...processCreateParams(this._def),schema:this,typeName:T.ZodEffects,effect:{type:"transform",transform:e}})}default(e){const t="function"==typeof e?e:()=>e;return new ZodDefault({...processCreateParams(this._def),innerType:this,defaultValue:t,typeName:T.ZodDefault})}brand(){return new ZodBranded({typeName:T.ZodBranded,type:this,...processCreateParams(this._def)})}catch(e){const t="function"==typeof e?e:()=>e;return new ZodCatch({...processCreateParams(this._def),innerType:this,catchValue:t,typeName:T.ZodCatch})}describe(e){return new(0,this.constructor)({...this._def,description:e})}pipe(e){return ZodPipeline.create(this,e)}readonly(){return ZodReadonly.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}const c=/^c[^\s-]{8,}$/i,u=/^[0-9a-z]+$/,l=/^[0-9A-HJKMNP-TV-Z]{26}$/i,m=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,p=/^[a-z0-9_-]{21}$/i,f=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,h=/^[-+]?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)?)??$/,g=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i;let y;const v=/^(?:(?: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])$/,b=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,k=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/,w=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,$=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,j=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,x="((\\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])))",S=new RegExp(`^${x}$`);function timeRegexSource(e){let t="[0-5]\\d";e.precision?t=`${t}\\.\\d{${e.precision}}`:null==e.precision&&(t=`${t}(\\.\\d+)?`);return`([01]\\d|2[0-3]):[0-5]\\d(:${t})${e.precision?"+":"?"}`}function timeRegex(e){return new RegExp(`^${timeRegexSource(e)}$`)}function datetimeRegex(e){let t=`${x}T${timeRegexSource(e)}`;const o=[];return o.push(e.local?"Z?":"Z"),e.offset&&o.push("([+-]\\d{2}:?\\d{2})"),t=`${t}(${o.join("|")})`,new RegExp(`^${t}$`)}function isValidIP(e,t){return!("v4"!==t&&t||!v.test(e))||!("v6"!==t&&t||!k.test(e))}function isValidJWT(e,t){if(!f.test(e))return!1;try{const[o]=e.split(".");if(!o)return!1;const n=o.replace(/-/g,"+").replace(/_/g,"/").padEnd(o.length+(4-o.length%4)%4,"="),r=JSON.parse(atob(n));return"object"==typeof r&&null!==r&&((!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||r.alg===t)))}catch{return!1}}function isValidCidr(e,t){return!("v4"!==t&&t||!b.test(e))||!("v6"!==t&&t||!w.test(e))}class ZodString extends ZodType{_parse(e){this._def.coerce&&(e.data=String(e.data));if(this._getType(e)!==d.ZodParsedType.string){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.string,received:t.parsedType}),i.INVALID}const t=new i.ParseStatus;let o;for(const r of this._def.checks)if("min"===r.kind)e.data.length<r.value&&(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("max"===r.kind)e.data.length>r.value&&(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!1,message:r.message}),t.dirty());else if("length"===r.kind){const s=e.data.length>r.value,a=e.data.length<r.value;(s||a)&&(o=this._getOrReturnCtx(e,o),s?(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.too_big,maximum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}):a&&(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.too_small,minimum:r.value,type:"string",inclusive:!0,exact:!0,message:r.message}),t.dirty())}else if("email"===r.kind)g.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"email",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty());else if("emoji"===r.kind)y||(y=new RegExp("^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$","u")),y.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"emoji",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty());else if("uuid"===r.kind)m.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"uuid",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty());else if("nanoid"===r.kind)p.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"nanoid",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty());else if("cuid"===r.kind)c.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"cuid",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty());else if("cuid2"===r.kind)u.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"cuid2",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty());else if("ulid"===r.kind)l.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"ulid",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty());else if("url"===r.kind)try{new URL(e.data)}catch{o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"url",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty()}else if("regex"===r.kind){r.regex.lastIndex=0;r.regex.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"regex",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty())}else if("trim"===r.kind)e.data=e.data.trim();else if("includes"===r.kind)e.data.includes(r.value,r.position)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.invalid_string,validation:{includes:r.value,position:r.position},message:r.message}),t.dirty());else if("toLowerCase"===r.kind)e.data=e.data.toLowerCase();else if("toUpperCase"===r.kind)e.data=e.data.toUpperCase();else if("startsWith"===r.kind)e.data.startsWith(r.value)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.invalid_string,validation:{startsWith:r.value},message:r.message}),t.dirty());else if("endsWith"===r.kind)e.data.endsWith(r.value)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.invalid_string,validation:{endsWith:r.value},message:r.message}),t.dirty());else if("datetime"===r.kind){datetimeRegex(r).test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.invalid_string,validation:"datetime",message:r.message}),t.dirty())}else if("date"===r.kind){S.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.invalid_string,validation:"date",message:r.message}),t.dirty())}else if("time"===r.kind){timeRegex(r).test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.invalid_string,validation:"time",message:r.message}),t.dirty())}else"duration"===r.kind?h.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"duration",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty()):"ip"===r.kind?isValidIP(e.data,r.version)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"ip",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty()):"jwt"===r.kind?isValidJWT(e.data,r.alg)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"jwt",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty()):"cidr"===r.kind?isValidCidr(e.data,r.version)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"cidr",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty()):"base64"===r.kind?$.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"base64",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty()):"base64url"===r.kind?j.test(e.data)||(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{validation:"base64url",code:n.ZodIssueCode.invalid_string,message:r.message}),t.dirty()):d.util.assertNever(r);return{status:t.value,value:e.data}}_regex(e,t,o){return this.refinement(t=>e.test(t),{validation:t,code:n.ZodIssueCode.invalid_string,...a.errorUtil.errToObj(o)})}_addCheck(e){return new ZodString({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...a.errorUtil.errToObj(e)})}url(e){return this._addCheck({kind:"url",...a.errorUtil.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...a.errorUtil.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...a.errorUtil.errToObj(e)})}nanoid(e){return this._addCheck({kind:"nanoid",...a.errorUtil.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...a.errorUtil.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...a.errorUtil.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...a.errorUtil.errToObj(e)})}base64(e){return this._addCheck({kind:"base64",...a.errorUtil.errToObj(e)})}base64url(e){return this._addCheck({kind:"base64url",...a.errorUtil.errToObj(e)})}jwt(e){return this._addCheck({kind:"jwt",...a.errorUtil.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...a.errorUtil.errToObj(e)})}cidr(e){return this._addCheck({kind:"cidr",...a.errorUtil.errToObj(e)})}datetime(e){return"string"==typeof e?this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:e}):this._addCheck({kind:"datetime",precision:void 0===e?.precision?null:e?.precision,offset:e?.offset??!1,local:e?.local??!1,...a.errorUtil.errToObj(e?.message)})}date(e){return this._addCheck({kind:"date",message:e})}time(e){return"string"==typeof e?this._addCheck({kind:"time",precision:null,message:e}):this._addCheck({kind:"time",precision:void 0===e?.precision?null:e?.precision,...a.errorUtil.errToObj(e?.message)})}duration(e){return this._addCheck({kind:"duration",...a.errorUtil.errToObj(e)})}regex(e,t){return this._addCheck({kind:"regex",regex:e,...a.errorUtil.errToObj(t)})}includes(e,t){return this._addCheck({kind:"includes",value:e,position:t?.position,...a.errorUtil.errToObj(t?.message)})}startsWith(e,t){return this._addCheck({kind:"startsWith",value:e,...a.errorUtil.errToObj(t)})}endsWith(e,t){return this._addCheck({kind:"endsWith",value:e,...a.errorUtil.errToObj(t)})}min(e,t){return this._addCheck({kind:"min",value:e,...a.errorUtil.errToObj(t)})}max(e,t){return this._addCheck({kind:"max",value:e,...a.errorUtil.errToObj(t)})}length(e,t){return this._addCheck({kind:"length",value:e,...a.errorUtil.errToObj(t)})}nonempty(e){return this.min(1,a.errorUtil.errToObj(e))}trim(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new ZodString({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find(e=>"datetime"===e.kind)}get isDate(){return!!this._def.checks.find(e=>"date"===e.kind)}get isTime(){return!!this._def.checks.find(e=>"time"===e.kind)}get isDuration(){return!!this._def.checks.find(e=>"duration"===e.kind)}get isEmail(){return!!this._def.checks.find(e=>"email"===e.kind)}get isURL(){return!!this._def.checks.find(e=>"url"===e.kind)}get isEmoji(){return!!this._def.checks.find(e=>"emoji"===e.kind)}get isUUID(){return!!this._def.checks.find(e=>"uuid"===e.kind)}get isNANOID(){return!!this._def.checks.find(e=>"nanoid"===e.kind)}get isCUID(){return!!this._def.checks.find(e=>"cuid"===e.kind)}get isCUID2(){return!!this._def.checks.find(e=>"cuid2"===e.kind)}get isULID(){return!!this._def.checks.find(e=>"ulid"===e.kind)}get isIP(){return!!this._def.checks.find(e=>"ip"===e.kind)}get isCIDR(){return!!this._def.checks.find(e=>"cidr"===e.kind)}get isBase64(){return!!this._def.checks.find(e=>"base64"===e.kind)}get isBase64url(){return!!this._def.checks.find(e=>"base64url"===e.kind)}get minLength(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxLength(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}function floatSafeRemainder(e,t){const o=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,r=o>n?o:n;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}ZodString.create=e=>new ZodString({checks:[],typeName:T.ZodString,coerce:e?.coerce??!1,...processCreateParams(e)});class ZodNumber extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(e){this._def.coerce&&(e.data=Number(e.data));if(this._getType(e)!==d.ZodParsedType.number){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.number,received:t.parsedType}),i.INVALID}let t;const o=new i.ParseStatus;for(const r of this._def.checks)if("int"===r.kind)d.util.isInteger(e.data)||(t=this._getOrReturnCtx(e,t),(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:"integer",received:"float",message:r.message}),o.dirty());else if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.too_small,minimum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),o.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.too_big,maximum:r.value,type:"number",inclusive:r.inclusive,exact:!1,message:r.message}),o.dirty())}else"multipleOf"===r.kind?0!==floatSafeRemainder(e.data,r.value)&&(t=this._getOrReturnCtx(e,t),(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.not_multiple_of,multipleOf:r.value,message:r.message}),o.dirty()):"finite"===r.kind?Number.isFinite(e.data)||(t=this._getOrReturnCtx(e,t),(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.not_finite,message:r.message}),o.dirty()):d.util.assertNever(r);return{status:o.value,value:e.data}}gte(e,t){return this.setLimit("min",e,!0,a.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,a.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,a.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,a.errorUtil.toString(t))}setLimit(e,t,o,n){return new ZodNumber({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:o,message:a.errorUtil.toString(n)}]})}_addCheck(e){return new ZodNumber({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:a.errorUtil.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:a.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:a.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:a.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:a.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:a.errorUtil.toString(t)})}finite(e){return this._addCheck({kind:"finite",message:a.errorUtil.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:a.errorUtil.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:a.errorUtil.toString(e)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}get isInt(){return!!this._def.checks.find(e=>"int"===e.kind||"multipleOf"===e.kind&&d.util.isInteger(e.value))}get isFinite(){let e=null,t=null;for(const o of this._def.checks){if("finite"===o.kind||"int"===o.kind||"multipleOf"===o.kind)return!0;"min"===o.kind?(null===t||o.value>t)&&(t=o.value):"max"===o.kind&&(null===e||o.value<e)&&(e=o.value)}return Number.isFinite(t)&&Number.isFinite(e)}}ZodNumber.create=e=>new ZodNumber({checks:[],typeName:T.ZodNumber,coerce:e?.coerce||!1,...processCreateParams(e)});class ZodBigInt extends ZodType{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte}_parse(e){if(this._def.coerce)try{e.data=BigInt(e.data)}catch{return this._getInvalidInput(e)}if(this._getType(e)!==d.ZodParsedType.bigint)return this._getInvalidInput(e);let t;const o=new i.ParseStatus;for(const r of this._def.checks)if("min"===r.kind){(r.inclusive?e.data<r.value:e.data<=r.value)&&(t=this._getOrReturnCtx(e,t),(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.too_small,type:"bigint",minimum:r.value,inclusive:r.inclusive,message:r.message}),o.dirty())}else if("max"===r.kind){(r.inclusive?e.data>r.value:e.data>=r.value)&&(t=this._getOrReturnCtx(e,t),(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.too_big,type:"bigint",maximum:r.value,inclusive:r.inclusive,message:r.message}),o.dirty())}else"multipleOf"===r.kind?e.data%r.value!==BigInt(0)&&(t=this._getOrReturnCtx(e,t),(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.not_multiple_of,multipleOf:r.value,message:r.message}),o.dirty()):d.util.assertNever(r);return{status:o.value,value:e.data}}_getInvalidInput(e){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.bigint,received:t.parsedType}),i.INVALID}gte(e,t){return this.setLimit("min",e,!0,a.errorUtil.toString(t))}gt(e,t){return this.setLimit("min",e,!1,a.errorUtil.toString(t))}lte(e,t){return this.setLimit("max",e,!0,a.errorUtil.toString(t))}lt(e,t){return this.setLimit("max",e,!1,a.errorUtil.toString(t))}setLimit(e,t,o,n){return new ZodBigInt({...this._def,checks:[...this._def.checks,{kind:e,value:t,inclusive:o,message:a.errorUtil.toString(n)}]})}_addCheck(e){return new ZodBigInt({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:a.errorUtil.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:a.errorUtil.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:a.errorUtil.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:a.errorUtil.toString(e)})}multipleOf(e,t){return this._addCheck({kind:"multipleOf",value:e,message:a.errorUtil.toString(t)})}get minValue(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return e}get maxValue(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return e}}ZodBigInt.create=e=>new ZodBigInt({checks:[],typeName:T.ZodBigInt,coerce:e?.coerce??!1,...processCreateParams(e)});class ZodBoolean extends ZodType{_parse(e){this._def.coerce&&(e.data=Boolean(e.data));if(this._getType(e)!==d.ZodParsedType.boolean){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.boolean,received:t.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}ZodBoolean.create=e=>new ZodBoolean({typeName:T.ZodBoolean,coerce:e?.coerce||!1,...processCreateParams(e)});class ZodDate extends ZodType{_parse(e){this._def.coerce&&(e.data=new Date(e.data));if(this._getType(e)!==d.ZodParsedType.date){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.date,received:t.parsedType}),i.INVALID}if(Number.isNaN(e.data.getTime())){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_date}),i.INVALID}const t=new i.ParseStatus;let o;for(const r of this._def.checks)"min"===r.kind?e.data.getTime()<r.value&&(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.too_small,message:r.message,inclusive:!0,exact:!1,minimum:r.value,type:"date"}),t.dirty()):"max"===r.kind?e.data.getTime()>r.value&&(o=this._getOrReturnCtx(e,o),(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.too_big,message:r.message,inclusive:!0,exact:!1,maximum:r.value,type:"date"}),t.dirty()):d.util.assertNever(r);return{status:t.value,value:new Date(e.data.getTime())}}_addCheck(e){return new ZodDate({...this._def,checks:[...this._def.checks,e]})}min(e,t){return this._addCheck({kind:"min",value:e.getTime(),message:a.errorUtil.toString(t)})}max(e,t){return this._addCheck({kind:"max",value:e.getTime(),message:a.errorUtil.toString(t)})}get minDate(){let e=null;for(const t of this._def.checks)"min"===t.kind&&(null===e||t.value>e)&&(e=t.value);return null!=e?new Date(e):null}get maxDate(){let e=null;for(const t of this._def.checks)"max"===t.kind&&(null===e||t.value<e)&&(e=t.value);return null!=e?new Date(e):null}}ZodDate.create=e=>new ZodDate({checks:[],coerce:e?.coerce||!1,typeName:T.ZodDate,...processCreateParams(e)});class ZodSymbol extends ZodType{_parse(e){if(this._getType(e)!==d.ZodParsedType.symbol){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.symbol,received:t.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}ZodSymbol.create=e=>new ZodSymbol({typeName:T.ZodSymbol,...processCreateParams(e)});class ZodUndefined extends ZodType{_parse(e){if(this._getType(e)!==d.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.undefined,received:t.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}ZodUndefined.create=e=>new ZodUndefined({typeName:T.ZodUndefined,...processCreateParams(e)});class ZodNull extends ZodType{_parse(e){if(this._getType(e)!==d.ZodParsedType.null){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.null,received:t.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}ZodNull.create=e=>new ZodNull({typeName:T.ZodNull,...processCreateParams(e)});class ZodAny extends ZodType{constructor(){super(...arguments),this._any=!0}_parse(e){return(0,i.OK)(e.data)}}ZodAny.create=e=>new ZodAny({typeName:T.ZodAny,...processCreateParams(e)});class ZodUnknown extends ZodType{constructor(){super(...arguments),this._unknown=!0}_parse(e){return(0,i.OK)(e.data)}}ZodUnknown.create=e=>new ZodUnknown({typeName:T.ZodUnknown,...processCreateParams(e)});class ZodNever extends ZodType{_parse(e){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.never,received:t.parsedType}),i.INVALID}}ZodNever.create=e=>new ZodNever({typeName:T.ZodNever,...processCreateParams(e)});class ZodVoid extends ZodType{_parse(e){if(this._getType(e)!==d.ZodParsedType.undefined){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.void,received:t.parsedType}),i.INVALID}return(0,i.OK)(e.data)}}ZodVoid.create=e=>new ZodVoid({typeName:T.ZodVoid,...processCreateParams(e)});class ZodArray extends ZodType{_parse(e){const{ctx:t,status:o}=this._processInputParams(e),r=this._def;if(t.parsedType!==d.ZodParsedType.array)return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.array,received:t.parsedType}),i.INVALID;if(null!==r.exactLength){const e=t.data.length>r.exactLength.value,s=t.data.length<r.exactLength.value;(e||s)&&((0,i.addIssueToContext)(t,{code:e?n.ZodIssueCode.too_big:n.ZodIssueCode.too_small,minimum:s?r.exactLength.value:void 0,maximum:e?r.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:r.exactLength.message}),o.dirty())}if(null!==r.minLength&&t.data.length<r.minLength.value&&((0,i.addIssueToContext)(t,{code:n.ZodIssueCode.too_small,minimum:r.minLength.value,type:"array",inclusive:!0,exact:!1,message:r.minLength.message}),o.dirty()),null!==r.maxLength&&t.data.length>r.maxLength.value&&((0,i.addIssueToContext)(t,{code:n.ZodIssueCode.too_big,maximum:r.maxLength.value,type:"array",inclusive:!0,exact:!1,message:r.maxLength.message}),o.dirty()),t.common.async)return Promise.all([...t.data].map((e,o)=>r.type._parseAsync(new ParseInputLazyPath(t,e,t.path,o)))).then(e=>i.ParseStatus.mergeArray(o,e));const s=[...t.data].map((e,o)=>r.type._parseSync(new ParseInputLazyPath(t,e,t.path,o)));return i.ParseStatus.mergeArray(o,s)}get element(){return this._def.type}min(e,t){return new ZodArray({...this._def,minLength:{value:e,message:a.errorUtil.toString(t)}})}max(e,t){return new ZodArray({...this._def,maxLength:{value:e,message:a.errorUtil.toString(t)}})}length(e,t){return new ZodArray({...this._def,exactLength:{value:e,message:a.errorUtil.toString(t)}})}nonempty(e){return this.min(1,e)}}function deepPartialify(e){if(e instanceof ZodObject){const t={};for(const o in e.shape){const n=e.shape[o];t[o]=ZodOptional.create(deepPartialify(n))}return new ZodObject({...e._def,shape:()=>t})}return e instanceof ZodArray?new ZodArray({...e._def,type:deepPartialify(e.element)}):e instanceof ZodOptional?ZodOptional.create(deepPartialify(e.unwrap())):e instanceof ZodNullable?ZodNullable.create(deepPartialify(e.unwrap())):e instanceof ZodTuple?ZodTuple.create(e.items.map(e=>deepPartialify(e))):e}ZodArray.create=(e,t)=>new ZodArray({type:e,minLength:null,maxLength:null,exactLength:null,typeName:T.ZodArray,...processCreateParams(t)});class ZodObject extends ZodType{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(null!==this._cached)return this._cached;const e=this._def.shape(),t=d.util.objectKeys(e);return this._cached={shape:e,keys:t},this._cached}_parse(e){if(this._getType(e)!==d.ZodParsedType.object){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.object,received:t.parsedType}),i.INVALID}const{status:t,ctx:o}=this._processInputParams(e),{shape:r,keys:s}=this._getCached(),a=[];if(!(this._def.catchall instanceof ZodNever&&"strip"===this._def.unknownKeys))for(const e in o.data)s.includes(e)||a.push(e);const c=[];for(const e of s){const t=r[e],n=o.data[e];c.push({key:{status:"valid",value:e},value:t._parse(new ParseInputLazyPath(o,n,o.path,e)),alwaysSet:e in o.data})}if(this._def.catchall instanceof ZodNever){const e=this._def.unknownKeys;if("passthrough"===e)for(const e of a)c.push({key:{status:"valid",value:e},value:{status:"valid",value:o.data[e]}});else if("strict"===e)a.length>0&&((0,i.addIssueToContext)(o,{code:n.ZodIssueCode.unrecognized_keys,keys:a}),t.dirty());else if("strip"!==e)throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else{const e=this._def.catchall;for(const t of a){const n=o.data[t];c.push({key:{status:"valid",value:t},value:e._parse(new ParseInputLazyPath(o,n,o.path,t)),alwaysSet:t in o.data})}}return o.common.async?Promise.resolve().then(async()=>{const e=[];for(const t of c){const o=await t.key,n=await t.value;e.push({key:o,value:n,alwaysSet:t.alwaysSet})}return e}).then(e=>i.ParseStatus.mergeObjectSync(t,e)):i.ParseStatus.mergeObjectSync(t,c)}get shape(){return this._def.shape()}strict(e){return a.errorUtil.errToObj,new ZodObject({...this._def,unknownKeys:"strict",...void 0!==e?{errorMap:(t,o)=>{const n=this._def.errorMap?.(t,o).message??o.defaultError;return"unrecognized_keys"===t.code?{message:a.errorUtil.errToObj(e).message??n}:{message:n}}}:{}})}strip(){return new ZodObject({...this._def,unknownKeys:"strip"})}passthrough(){return new ZodObject({...this._def,unknownKeys:"passthrough"})}extend(e){return new ZodObject({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new ZodObject({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:T.ZodObject})}setKey(e,t){return this.augment({[e]:t})}catchall(e){return new ZodObject({...this._def,catchall:e})}pick(e){const t={};for(const o of d.util.objectKeys(e))e[o]&&this.shape[o]&&(t[o]=this.shape[o]);return new ZodObject({...this._def,shape:()=>t})}omit(e){const t={};for(const o of d.util.objectKeys(this.shape))e[o]||(t[o]=this.shape[o]);return new ZodObject({...this._def,shape:()=>t})}deepPartial(){return deepPartialify(this)}partial(e){const t={};for(const o of d.util.objectKeys(this.shape)){const n=this.shape[o];e&&!e[o]?t[o]=n:t[o]=n.optional()}return new ZodObject({...this._def,shape:()=>t})}required(e){const t={};for(const o of d.util.objectKeys(this.shape))if(e&&!e[o])t[o]=this.shape[o];else{let e=this.shape[o];for(;e instanceof ZodOptional;)e=e._def.innerType;t[o]=e}return new ZodObject({...this._def,shape:()=>t})}keyof(){return createZodEnum(d.util.objectKeys(this.shape))}}ZodObject.create=(e,t)=>new ZodObject({shape:()=>e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:T.ZodObject,...processCreateParams(t)}),ZodObject.strictCreate=(e,t)=>new ZodObject({shape:()=>e,unknownKeys:"strict",catchall:ZodNever.create(),typeName:T.ZodObject,...processCreateParams(t)}),ZodObject.lazycreate=(e,t)=>new ZodObject({shape:e,unknownKeys:"strip",catchall:ZodNever.create(),typeName:T.ZodObject,...processCreateParams(t)});class ZodUnion extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),o=this._def.options;if(t.common.async)return Promise.all(o.map(async e=>{const o={...t,common:{...t.common,issues:[]},parent:null};return{result:await e._parseAsync({data:t.data,path:t.path,parent:o}),ctx:o}})).then(function handleResults(e){for(const t of e)if("valid"===t.result.status)return t.result;for(const o of e)if("dirty"===o.result.status)return t.common.issues.push(...o.ctx.common.issues),o.result;const o=e.map(e=>new n.ZodError(e.ctx.common.issues));return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_union,unionErrors:o}),i.INVALID});{let e;const r=[];for(const n of o){const o={...t,common:{...t.common,issues:[]},parent:null},s=n._parseSync({data:t.data,path:t.path,parent:o});if("valid"===s.status)return s;"dirty"!==s.status||e||(e={result:s,ctx:o}),o.common.issues.length&&r.push(o.common.issues)}if(e)return t.common.issues.push(...e.ctx.common.issues),e.result;const s=r.map(e=>new n.ZodError(e));return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_union,unionErrors:s}),i.INVALID}}get options(){return this._def.options}}ZodUnion.create=(e,t)=>new ZodUnion({options:e,typeName:T.ZodUnion,...processCreateParams(t)});const getDiscriminator=e=>e instanceof ZodLazy?getDiscriminator(e.schema):e instanceof ZodEffects?getDiscriminator(e.innerType()):e instanceof ZodLiteral?[e.value]:e instanceof ZodEnum?e.options:e instanceof ZodNativeEnum?d.util.objectValues(e.enum):e instanceof ZodDefault?getDiscriminator(e._def.innerType):e instanceof ZodUndefined?[void 0]:e instanceof ZodNull?[null]:e instanceof ZodOptional?[void 0,...getDiscriminator(e.unwrap())]:e instanceof ZodNullable?[null,...getDiscriminator(e.unwrap())]:e instanceof ZodBranded||e instanceof ZodReadonly?getDiscriminator(e.unwrap()):e instanceof ZodCatch?getDiscriminator(e._def.innerType):[];class ZodDiscriminatedUnion extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.ZodParsedType.object)return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.object,received:t.parsedType}),i.INVALID;const o=this.discriminator,r=t.data[o],s=this.optionsMap.get(r);return s?t.common.async?s._parseAsync({data:t.data,path:t.path,parent:t}):s._parseSync({data:t.data,path:t.path,parent:t}):((0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[o]}),i.INVALID)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,t,o){const n=new Map;for(const o of t){const t=getDiscriminator(o.shape[e]);if(!t.length)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(const r of t){if(n.has(r))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(r)}`);n.set(r,o)}}return new ZodDiscriminatedUnion({typeName:T.ZodDiscriminatedUnion,discriminator:e,options:t,optionsMap:n,...processCreateParams(o)})}}function mergeValues(e,t){const o=(0,d.getParsedType)(e),n=(0,d.getParsedType)(t);if(e===t)return{valid:!0,data:e};if(o===d.ZodParsedType.object&&n===d.ZodParsedType.object){const o=d.util.objectKeys(t),n=d.util.objectKeys(e).filter(e=>-1!==o.indexOf(e)),r={...e,...t};for(const o of n){const n=mergeValues(e[o],t[o]);if(!n.valid)return{valid:!1};r[o]=n.data}return{valid:!0,data:r}}if(o===d.ZodParsedType.array&&n===d.ZodParsedType.array){if(e.length!==t.length)return{valid:!1};const o=[];for(let n=0;n<e.length;n++){const r=mergeValues(e[n],t[n]);if(!r.valid)return{valid:!1};o.push(r.data)}return{valid:!0,data:o}}return o===d.ZodParsedType.date&&n===d.ZodParsedType.date&&+e===+t?{valid:!0,data:e}:{valid:!1}}class ZodIntersection extends ZodType{_parse(e){const{status:t,ctx:o}=this._processInputParams(e),handleParsed=(e,r)=>{if((0,i.isAborted)(e)||(0,i.isAborted)(r))return i.INVALID;const s=mergeValues(e.value,r.value);return s.valid?(((0,i.isDirty)(e)||(0,i.isDirty)(r))&&t.dirty(),{status:t.value,value:s.data}):((0,i.addIssueToContext)(o,{code:n.ZodIssueCode.invalid_intersection_types}),i.INVALID)};return o.common.async?Promise.all([this._def.left._parseAsync({data:o.data,path:o.path,parent:o}),this._def.right._parseAsync({data:o.data,path:o.path,parent:o})]).then(([e,t])=>handleParsed(e,t)):handleParsed(this._def.left._parseSync({data:o.data,path:o.path,parent:o}),this._def.right._parseSync({data:o.data,path:o.path,parent:o}))}}ZodIntersection.create=(e,t,o)=>new ZodIntersection({left:e,right:t,typeName:T.ZodIntersection,...processCreateParams(o)});class ZodTuple extends ZodType{_parse(e){const{status:t,ctx:o}=this._processInputParams(e);if(o.parsedType!==d.ZodParsedType.array)return(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.array,received:o.parsedType}),i.INVALID;if(o.data.length<this._def.items.length)return(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),i.INVALID;!this._def.rest&&o.data.length>this._def.items.length&&((0,i.addIssueToContext)(o,{code:n.ZodIssueCode.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),t.dirty());const r=[...o.data].map((e,t)=>{const n=this._def.items[t]||this._def.rest;return n?n._parse(new ParseInputLazyPath(o,e,o.path,t)):null}).filter(e=>!!e);return o.common.async?Promise.all(r).then(e=>i.ParseStatus.mergeArray(t,e)):i.ParseStatus.mergeArray(t,r)}get items(){return this._def.items}rest(e){return new ZodTuple({...this._def,rest:e})}}ZodTuple.create=(e,t)=>{if(!Array.isArray(e))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new ZodTuple({items:e,typeName:T.ZodTuple,rest:null,...processCreateParams(t)})};class ZodRecord extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:o}=this._processInputParams(e);if(o.parsedType!==d.ZodParsedType.object)return(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.object,received:o.parsedType}),i.INVALID;const r=[],s=this._def.keyType,a=this._def.valueType;for(const e in o.data)r.push({key:s._parse(new ParseInputLazyPath(o,e,o.path,e)),value:a._parse(new ParseInputLazyPath(o,o.data[e],o.path,e)),alwaysSet:e in o.data});return o.common.async?i.ParseStatus.mergeObjectAsync(t,r):i.ParseStatus.mergeObjectSync(t,r)}get element(){return this._def.valueType}static create(e,t,o){return new ZodRecord(t instanceof ZodType?{keyType:e,valueType:t,typeName:T.ZodRecord,...processCreateParams(o)}:{keyType:ZodString.create(),valueType:e,typeName:T.ZodRecord,...processCreateParams(t)})}}class ZodMap extends ZodType{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){const{status:t,ctx:o}=this._processInputParams(e);if(o.parsedType!==d.ZodParsedType.map)return(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.map,received:o.parsedType}),i.INVALID;const r=this._def.keyType,s=this._def.valueType,a=[...o.data.entries()].map(([e,t],n)=>({key:r._parse(new ParseInputLazyPath(o,e,o.path,[n,"key"])),value:s._parse(new ParseInputLazyPath(o,t,o.path,[n,"value"]))}));if(o.common.async){const e=new Map;return Promise.resolve().then(async()=>{for(const o of a){const n=await o.key,r=await o.value;if("aborted"===n.status||"aborted"===r.status)return i.INVALID;"dirty"!==n.status&&"dirty"!==r.status||t.dirty(),e.set(n.value,r.value)}return{status:t.value,value:e}})}{const e=new Map;for(const o of a){const n=o.key,r=o.value;if("aborted"===n.status||"aborted"===r.status)return i.INVALID;"dirty"!==n.status&&"dirty"!==r.status||t.dirty(),e.set(n.value,r.value)}return{status:t.value,value:e}}}}ZodMap.create=(e,t,o)=>new ZodMap({valueType:t,keyType:e,typeName:T.ZodMap,...processCreateParams(o)});class ZodSet extends ZodType{_parse(e){const{status:t,ctx:o}=this._processInputParams(e);if(o.parsedType!==d.ZodParsedType.set)return(0,i.addIssueToContext)(o,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.set,received:o.parsedType}),i.INVALID;const r=this._def;null!==r.minSize&&o.data.size<r.minSize.value&&((0,i.addIssueToContext)(o,{code:n.ZodIssueCode.too_small,minimum:r.minSize.value,type:"set",inclusive:!0,exact:!1,message:r.minSize.message}),t.dirty()),null!==r.maxSize&&o.data.size>r.maxSize.value&&((0,i.addIssueToContext)(o,{code:n.ZodIssueCode.too_big,maximum:r.maxSize.value,type:"set",inclusive:!0,exact:!1,message:r.maxSize.message}),t.dirty());const s=this._def.valueType;function finalizeSet(e){const o=new Set;for(const n of e){if("aborted"===n.status)return i.INVALID;"dirty"===n.status&&t.dirty(),o.add(n.value)}return{status:t.value,value:o}}const a=[...o.data.values()].map((e,t)=>s._parse(new ParseInputLazyPath(o,e,o.path,t)));return o.common.async?Promise.all(a).then(e=>finalizeSet(e)):finalizeSet(a)}min(e,t){return new ZodSet({...this._def,minSize:{value:e,message:a.errorUtil.toString(t)}})}max(e,t){return new ZodSet({...this._def,maxSize:{value:e,message:a.errorUtil.toString(t)}})}size(e,t){return this.min(e,t).max(e,t)}nonempty(e){return this.min(1,e)}}ZodSet.create=(e,t)=>new ZodSet({valueType:e,minSize:null,maxSize:null,typeName:T.ZodSet,...processCreateParams(t)});class ZodFunction extends ZodType{constructor(){super(...arguments),this.validate=this.implement}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.ZodParsedType.function)return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.function,received:t.parsedType}),i.INVALID;function makeArgsIssue(e,o){return(0,i.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,r.getErrorMap)(),s.default].filter(e=>!!e),issueData:{code:n.ZodIssueCode.invalid_arguments,argumentsError:o}})}function makeReturnsIssue(e,o){return(0,i.makeIssue)({data:e,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,(0,r.getErrorMap)(),s.default].filter(e=>!!e),issueData:{code:n.ZodIssueCode.invalid_return_type,returnTypeError:o}})}const o={errorMap:t.common.contextualErrorMap},a=t.data;if(this._def.returns instanceof ZodPromise){const e=this;return(0,i.OK)(async function(...t){const r=new n.ZodError([]),s=await e._def.args.parseAsync(t,o).catch(e=>{throw r.addIssue(makeArgsIssue(t,e)),r}),i=await Reflect.apply(a,this,s);return await e._def.returns._def.type.parseAsync(i,o).catch(e=>{throw r.addIssue(makeReturnsIssue(i,e)),r})})}{const e=this;return(0,i.OK)(function(...t){const r=e._def.args.safeParse(t,o);if(!r.success)throw new n.ZodError([makeArgsIssue(t,r.error)]);const s=Reflect.apply(a,this,r.data),i=e._def.returns.safeParse(s,o);if(!i.success)throw new n.ZodError([makeReturnsIssue(s,i.error)]);return i.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new ZodFunction({...this._def,args:ZodTuple.create(e).rest(ZodUnknown.create())})}returns(e){return new ZodFunction({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,t,o){return new ZodFunction({args:e||ZodTuple.create([]).rest(ZodUnknown.create()),returns:t||ZodUnknown.create(),typeName:T.ZodFunction,...processCreateParams(o)})}}class ZodLazy extends ZodType{get schema(){return this._def.getter()}_parse(e){const{ctx:t}=this._processInputParams(e);return this._def.getter()._parse({data:t.data,path:t.path,parent:t})}}ZodLazy.create=(e,t)=>new ZodLazy({getter:e,typeName:T.ZodLazy,...processCreateParams(t)});class ZodLiteral extends ZodType{_parse(e){if(e.data!==this._def.value){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{received:t.data,code:n.ZodIssueCode.invalid_literal,expected:this._def.value}),i.INVALID}return{status:"valid",value:e.data}}get value(){return this._def.value}}function createZodEnum(e,t){return new ZodEnum({values:e,typeName:T.ZodEnum,...processCreateParams(t)})}ZodLiteral.create=(e,t)=>new ZodLiteral({value:e,typeName:T.ZodLiteral,...processCreateParams(t)});class ZodEnum extends ZodType{_parse(e){if("string"!=typeof e.data){const t=this._getOrReturnCtx(e),o=this._def.values;return(0,i.addIssueToContext)(t,{expected:d.util.joinValues(o),received:t.parsedType,code:n.ZodIssueCode.invalid_type}),i.INVALID}if(this._cache||(this._cache=new Set(this._def.values)),!this._cache.has(e.data)){const t=this._getOrReturnCtx(e),o=this._def.values;return(0,i.addIssueToContext)(t,{received:t.data,code:n.ZodIssueCode.invalid_enum_value,options:o}),i.INVALID}return(0,i.OK)(e.data)}get options(){return this._def.values}get enum(){const e={};for(const t of this._def.values)e[t]=t;return e}get Values(){const e={};for(const t of this._def.values)e[t]=t;return e}get Enum(){const e={};for(const t of this._def.values)e[t]=t;return e}extract(e,t=this._def){return ZodEnum.create(e,{...this._def,...t})}exclude(e,t=this._def){return ZodEnum.create(this.options.filter(t=>!e.includes(t)),{...this._def,...t})}}ZodEnum.create=createZodEnum;class ZodNativeEnum extends ZodType{_parse(e){const t=d.util.getValidEnumValues(this._def.values),o=this._getOrReturnCtx(e);if(o.parsedType!==d.ZodParsedType.string&&o.parsedType!==d.ZodParsedType.number){const e=d.util.objectValues(t);return(0,i.addIssueToContext)(o,{expected:d.util.joinValues(e),received:o.parsedType,code:n.ZodIssueCode.invalid_type}),i.INVALID}if(this._cache||(this._cache=new Set(d.util.getValidEnumValues(this._def.values))),!this._cache.has(e.data)){const e=d.util.objectValues(t);return(0,i.addIssueToContext)(o,{received:o.data,code:n.ZodIssueCode.invalid_enum_value,options:e}),i.INVALID}return(0,i.OK)(e.data)}get enum(){return this._def.values}}ZodNativeEnum.create=(e,t)=>new ZodNativeEnum({values:e,typeName:T.ZodNativeEnum,...processCreateParams(t)});class ZodPromise extends ZodType{unwrap(){return this._def.type}_parse(e){const{ctx:t}=this._processInputParams(e);if(t.parsedType!==d.ZodParsedType.promise&&!1===t.common.async)return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.promise,received:t.parsedType}),i.INVALID;const o=t.parsedType===d.ZodParsedType.promise?t.data:Promise.resolve(t.data);return(0,i.OK)(o.then(e=>this._def.type.parseAsync(e,{path:t.path,errorMap:t.common.contextualErrorMap})))}}ZodPromise.create=(e,t)=>new ZodPromise({type:e,typeName:T.ZodPromise,...processCreateParams(t)});class ZodEffects extends ZodType{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===T.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){const{status:t,ctx:o}=this._processInputParams(e),n=this._def.effect||null,r={addIssue:e=>{(0,i.addIssueToContext)(o,e),e.fatal?t.abort():t.dirty()},get path(){return o.path}};if(r.addIssue=r.addIssue.bind(r),"preprocess"===n.type){const e=n.transform(o.data,r);if(o.common.async)return Promise.resolve(e).then(async e=>{if("aborted"===t.value)return i.INVALID;const n=await this._def.schema._parseAsync({data:e,path:o.path,parent:o});return"aborted"===n.status?i.INVALID:"dirty"===n.status||"dirty"===t.value?(0,i.DIRTY)(n.value):n});{if("aborted"===t.value)return i.INVALID;const n=this._def.schema._parseSync({data:e,path:o.path,parent:o});return"aborted"===n.status?i.INVALID:"dirty"===n.status||"dirty"===t.value?(0,i.DIRTY)(n.value):n}}if("refinement"===n.type){const executeRefinement=e=>{const t=n.refinement(e,r);if(o.common.async)return Promise.resolve(t);if(t instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return e};if(!1===o.common.async){const e=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});return"aborted"===e.status?i.INVALID:("dirty"===e.status&&t.dirty(),executeRefinement(e.value),{status:t.value,value:e.value})}return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(e=>"aborted"===e.status?i.INVALID:("dirty"===e.status&&t.dirty(),executeRefinement(e.value).then(()=>({status:t.value,value:e.value}))))}if("transform"===n.type){if(!1===o.common.async){const e=this._def.schema._parseSync({data:o.data,path:o.path,parent:o});if(!(0,i.isValid)(e))return i.INVALID;const s=n.transform(e.value,r);if(s instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:t.value,value:s}}return this._def.schema._parseAsync({data:o.data,path:o.path,parent:o}).then(e=>(0,i.isValid)(e)?Promise.resolve(n.transform(e.value,r)).then(e=>({status:t.value,value:e})):i.INVALID)}d.util.assertNever(n)}}ZodEffects.create=(e,t,o)=>new ZodEffects({schema:e,typeName:T.ZodEffects,effect:t,...processCreateParams(o)}),ZodEffects.createWithPreprocess=(e,t,o)=>new ZodEffects({schema:t,effect:{type:"preprocess",transform:e},typeName:T.ZodEffects,...processCreateParams(o)});class ZodOptional extends ZodType{_parse(e){return this._getType(e)===d.ZodParsedType.undefined?(0,i.OK)(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ZodOptional.create=(e,t)=>new ZodOptional({innerType:e,typeName:T.ZodOptional,...processCreateParams(t)});class ZodNullable extends ZodType{_parse(e){return this._getType(e)===d.ZodParsedType.null?(0,i.OK)(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}}ZodNullable.create=(e,t)=>new ZodNullable({innerType:e,typeName:T.ZodNullable,...processCreateParams(t)});class ZodDefault extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e);let o=t.data;return t.parsedType===d.ZodParsedType.undefined&&(o=this._def.defaultValue()),this._def.innerType._parse({data:o,path:t.path,parent:t})}removeDefault(){return this._def.innerType}}ZodDefault.create=(e,t)=>new ZodDefault({innerType:e,typeName:T.ZodDefault,defaultValue:"function"==typeof t.default?t.default:()=>t.default,...processCreateParams(t)});class ZodCatch extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),o={...t,common:{...t.common,issues:[]}},r=this._def.innerType._parse({data:o.data,path:o.path,parent:{...o}});return(0,i.isAsync)(r)?r.then(e=>({status:"valid",value:"valid"===e.status?e.value:this._def.catchValue({get error(){return new n.ZodError(o.common.issues)},input:o.data})})):{status:"valid",value:"valid"===r.status?r.value:this._def.catchValue({get error(){return new n.ZodError(o.common.issues)},input:o.data})}}removeCatch(){return this._def.innerType}}ZodCatch.create=(e,t)=>new ZodCatch({innerType:e,typeName:T.ZodCatch,catchValue:"function"==typeof t.catch?t.catch:()=>t.catch,...processCreateParams(t)});class ZodNaN extends ZodType{_parse(e){if(this._getType(e)!==d.ZodParsedType.nan){const t=this._getOrReturnCtx(e);return(0,i.addIssueToContext)(t,{code:n.ZodIssueCode.invalid_type,expected:d.ZodParsedType.nan,received:t.parsedType}),i.INVALID}return{status:"valid",value:e.data}}}ZodNaN.create=e=>new ZodNaN({typeName:T.ZodNaN,...processCreateParams(e)});const P=Symbol("zod_brand");class ZodBranded extends ZodType{_parse(e){const{ctx:t}=this._processInputParams(e),o=t.data;return this._def.type._parse({data:o,path:t.path,parent:t})}unwrap(){return this._def.type}}class ZodPipeline extends ZodType{_parse(e){const{status:t,ctx:o}=this._processInputParams(e);if(o.common.async){return(async()=>{const e=await this._def.in._parseAsync({data:o.data,path:o.path,parent:o});return"aborted"===e.status?i.INVALID:"dirty"===e.status?(t.dirty(),(0,i.DIRTY)(e.value)):this._def.out._parseAsync({data:e.value,path:o.path,parent:o})})()}{const e=this._def.in._parseSync({data:o.data,path:o.path,parent:o});return"aborted"===e.status?i.INVALID:"dirty"===e.status?(t.dirty(),{status:"dirty",value:e.value}):this._def.out._parseSync({data:e.value,path:o.path,parent:o})}}static create(e,t){return new ZodPipeline({in:e,out:t,typeName:T.ZodPipeline})}}class ZodReadonly extends ZodType{_parse(e){const t=this._def.innerType._parse(e),freeze=e=>((0,i.isValid)(e)&&(e.value=Object.freeze(e.value)),e);return(0,i.isAsync)(t)?t.then(e=>freeze(e)):freeze(t)}unwrap(){return this._def.innerType}}function cleanParams(e,t){const o="function"==typeof e?e(t):"string"==typeof e?{message:e}:e;return"string"==typeof o?{message:o}:o}function custom(e,t={},o){return e?ZodAny.create().superRefine((n,r)=>{const s=e(n);if(s instanceof Promise)return s.then(e=>{if(!e){const e=cleanParams(t,n),s=e.fatal??o??!0;r.addIssue({code:"custom",...e,fatal:s})}});if(!s){const e=cleanParams(t,n),s=e.fatal??o??!0;r.addIssue({code:"custom",...e,fatal:s})}}):ZodAny.create()}ZodReadonly.create=(e,t)=>new ZodReadonly({innerType:e,typeName:T.ZodReadonly,...processCreateParams(t)});const Z={object:ZodObject.lazycreate};var T;!function(e){e.ZodString="ZodString",e.ZodNumber="ZodNumber",e.ZodNaN="ZodNaN",e.ZodBigInt="ZodBigInt",e.ZodBoolean="ZodBoolean",e.ZodDate="ZodDate",e.ZodSymbol="ZodSymbol",e.ZodUndefined="ZodUndefined",e.ZodNull="ZodNull",e.ZodAny="ZodAny",e.ZodUnknown="ZodUnknown",e.ZodNever="ZodNever",e.ZodVoid="ZodVoid",e.ZodArray="ZodArray",e.ZodObject="ZodObject",e.ZodUnion="ZodUnion",e.ZodDiscriminatedUnion="ZodDiscriminatedUnion",e.ZodIntersection="ZodIntersection",e.ZodTuple="ZodTuple",e.ZodRecord="ZodRecord",e.ZodMap="ZodMap",e.ZodSet="ZodSet",e.ZodFunction="ZodFunction",e.ZodLazy="ZodLazy",e.ZodLiteral="ZodLiteral",e.ZodEnum="ZodEnum",e.ZodEffects="ZodEffects",e.ZodNativeEnum="ZodNativeEnum",e.ZodOptional="ZodOptional",e.ZodNullable="ZodNullable",e.ZodDefault="ZodDefault",e.ZodCatch="ZodCatch",e.ZodPromise="ZodPromise",e.ZodBranded="ZodBranded",e.ZodPipeline="ZodPipeline",e.ZodReadonly="ZodReadonly"}(T||(T={}));const instanceOfType=(e,t={message:`Input not instance of ${e.name}`})=>custom(t=>t instanceof e,t),E=ZodString.create,I=ZodNumber.create,z=ZodNaN.create,C=ZodBigInt.create,R=ZodBoolean.create,N=ZodDate.create,O=ZodSymbol.create,A=ZodUndefined.create,D=ZodNull.create,M=ZodAny.create,L=ZodUnknown.create,U=ZodNever.create,q=ZodVoid.create,V=ZodArray.create,F=ZodObject.create,K=ZodObject.strictCreate,B=ZodUnion.create,H=ZodDiscriminatedUnion.create,J=ZodIntersection.create,W=ZodTuple.create,G=ZodRecord.create,Y=ZodMap.create,Q=ZodSet.create,X=ZodFunction.create,ee=ZodLazy.create,te=ZodLiteral.create,oe=ZodEnum.create,ne=ZodNativeEnum.create,re=ZodPromise.create,se=ZodEffects.create,ae=ZodOptional.create,ie=ZodNullable.create,de=ZodEffects.createWithPreprocess,ce=ZodPipeline.create,ostring=()=>E().optional(),onumber=()=>I().optional(),oboolean=()=>R().optional(),ue={string:e=>ZodString.create({...e,coerce:!0}),number:e=>ZodNumber.create({...e,coerce:!0}),boolean:e=>ZodBoolean.create({...e,coerce:!0}),bigint:e=>ZodBigInt.create({...e,coerce:!0}),date:e=>ZodDate.create({...e,coerce:!0})},le=i.INVALID},"./node_modules/zod/v4/classic/errors.js":function(e,t,o){o.r(t),o.d(t,{ZodError:function(){return s},ZodRealError:function(){return a}});var n=o("./node_modules/zod/v4/core/core.js"),r=o("./node_modules/zod/v4/core/errors.js");const initializer=(e,t)=>{r.$ZodError.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:t=>r.formatError(e,t)},flatten:{value:t=>r.flattenError(e,t)},addIssue:{value:t=>e.issues.push(t)},addIssues:{value:t=>e.issues.push(...t)},isEmpty:{get(){return 0===e.issues.length}}})},s=n.$constructor("ZodError",initializer),a=n.$constructor("ZodError",initializer,{Parent:Error})},"./node_modules/zod/v4/classic/iso.js":function(e,t,o){o.r(t),o.d(t,{ZodISODate:function(){return d},ZodISODateTime:function(){return i},ZodISODuration:function(){return u},ZodISOTime:function(){return c},date:function(){return date},datetime:function(){return datetime},duration:function(){return duration},time:function(){return time}});var n=o("./node_modules/zod/v4/core/core.js"),r=o("./node_modules/zod/v4/core/schemas.js"),s=o("./node_modules/zod/v4/core/api.js"),a=o("./node_modules/zod/v4/classic/schemas.js");const i=n.$constructor("ZodISODateTime",(e,t)=>{r.$ZodISODateTime.init(e,t),a.ZodStringFormat.init(e,t)});function datetime(e){return s._isoDateTime(i,e)}const d=n.$constructor("ZodISODate",(e,t)=>{r.$ZodISODate.init(e,t),a.ZodStringFormat.init(e,t)});function date(e){return s._isoDate(d,e)}const c=n.$constructor("ZodISOTime",(e,t)=>{r.$ZodISOTime.init(e,t),a.ZodStringFormat.init(e,t)});function time(e){return s._isoTime(c,e)}const u=n.$constructor("ZodISODuration",(e,t)=>{r.$ZodISODuration.init(e,t),a.ZodStringFormat.init(e,t)});function duration(e){return s._isoDuration(u,e)}},"./node_modules/zod/v4/classic/parse.js":function(e,t,o){o.r(t),o.d(t,{parse:function(){return s},parseAsync:function(){return a},safeParse:function(){return i},safeParseAsync:function(){return d}});var n=o("./node_modules/zod/v4/core/parse.js"),r=o("./node_modules/zod/v4/classic/errors.js");const s=n._parse(r.ZodRealError),a=n._parseAsync(r.ZodRealError),i=n._safeParse(r.ZodRealError),d=n._safeParseAsync(r.ZodRealError)},"./node_modules/zod/v4/classic/schemas.js":function(e,t,o){o.r(t),o.d(t,{ZodAny:function(){return F},ZodArray:function(){return W},ZodBase64:function(){return I},ZodBase64URL:function(){return z},ZodBigInt:function(){return M},ZodBigIntFormat:function(){return L},ZodBoolean:function(){return D},ZodCIDRv4:function(){return T},ZodCIDRv6:function(){return E},ZodCUID:function(){return w},ZodCUID2:function(){return $},ZodCatch:function(){return fe},ZodCustom:function(){return ke},ZodCustomStringFormat:function(){return N},ZodDate:function(){return J},ZodDefault:function(){return ue},ZodDiscriminatedUnion:function(){return Q},ZodE164:function(){return C},ZodEmail:function(){return h},ZodEmoji:function(){return b},ZodEnum:function(){return re},ZodFile:function(){return ae},ZodGUID:function(){return g},ZodIPv4:function(){return P},ZodIPv6:function(){return Z},ZodIntersection:function(){return X},ZodJWT:function(){return R},ZodKSUID:function(){return S},ZodLazy:function(){return ve},ZodLiteral:function(){return se},ZodMap:function(){return oe},ZodNaN:function(){return he},ZodNanoID:function(){return k},ZodNever:function(){return B},ZodNonOptional:function(){return me},ZodNull:function(){return V},ZodNullable:function(){return ce},ZodNumber:function(){return O},ZodNumberFormat:function(){return A},ZodObject:function(){return G},ZodOptional:function(){return de},ZodPipe:function(){return _e},ZodPrefault:function(){return le},ZodPromise:function(){return be},ZodReadonly:function(){return ge},ZodRecord:function(){return te},ZodSet:function(){return ne},ZodString:function(){return p},ZodStringFormat:function(){return f},ZodSuccess:function(){return pe},ZodSymbol:function(){return U},ZodTemplateLiteral:function(){return ye},ZodTransform:function(){return ie},ZodTuple:function(){return ee},ZodType:function(){return l},ZodULID:function(){return j},ZodURL:function(){return v},ZodUUID:function(){return y},ZodUndefined:function(){return q},ZodUnion:function(){return Y},ZodUnknown:function(){return K},ZodVoid:function(){return H},ZodXID:function(){return x},_ZodString:function(){return m},_default:function(){return _default},any:function(){return any},array:function(){return array},base64:function(){return base64},base64url:function(){return base64url},bigint:function(){return bigint},boolean:function(){return boolean},catch:function(){return _catch},check:function(){return check},cidrv4:function(){return cidrv4},cidrv6:function(){return cidrv6},cuid:function(){return cuid},cuid2:function(){return cuid2},custom:function(){return custom},date:function(){return date},discriminatedUnion:function(){return discriminatedUnion},e164:function(){return e164},email:function(){return email},emoji:function(){return emoji},enum:function(){return _enum},file:function(){return file},float32:function(){return float32},float64:function(){return float64},guid:function(){return guid},instanceof:function(){return _instanceof},int:function(){return int},int32:function(){return int32},int64:function(){return int64},intersection:function(){return intersection},ipv4:function(){return ipv4},ipv6:function(){return ipv6},json:function(){return json},jwt:function(){return jwt},keyof:function(){return keyof},ksuid:function(){return ksuid},lazy:function(){return lazy},literal:function(){return literal},looseObject:function(){return looseObject},map:function(){return map},nan:function(){return nan},nanoid:function(){return nanoid},nativeEnum:function(){return nativeEnum},never:function(){return never},nonoptional:function(){return nonoptional},null:function(){return _null},nullable:function(){return nullable},nullish:function(){return nullish},number:function(){return number},object:function(){return object},optional:function(){return optional},partialRecord:function(){return partialRecord},pipe:function(){return pipe},prefault:function(){return prefault},preprocess:function(){return preprocess},promise:function(){return promise},readonly:function(){return readonly},record:function(){return record},refine:function(){return refine},set:function(){return set},strictObject:function(){return strictObject},string:function(){return string},stringFormat:function(){return stringFormat},stringbool:function(){return stringbool},success:function(){return success},superRefine:function(){return superRefine},symbol:function(){return symbol},templateLiteral:function(){return templateLiteral},transform:function(){return transform},tuple:function(){return tuple},uint32:function(){return uint32},uint64:function(){return uint64},ulid:function(){return ulid},undefined:function(){return _undefined},union:function(){return union},unknown:function(){return unknown},url:function(){return url},uuid:function(){return uuid},uuidv4:function(){return uuidv4},uuidv6:function(){return uuidv6},uuidv7:function(){return uuidv7},void:function(){return _void},xid:function(){return xid}});var n=o("./node_modules/zod/v4/core/core.js"),r=o("./node_modules/zod/v4/core/schemas.js"),s=o("./node_modules/zod/v4/core/checks.js"),a=o("./node_modules/zod/v4/core/util.js"),i=o("./node_modules/zod/v4/core/registries.js"),d=o("./node_modules/zod/v4/core/api.js"),c=o("./node_modules/zod/v4/classic/iso.js"),u=o("./node_modules/zod/v4/classic/parse.js");const l=n.$constructor("ZodType",(e,t)=>(r.$ZodType.init(e,t),e.def=t,Object.defineProperty(e,"_def",{value:t}),e.check=(...o)=>e.clone({...t,checks:[...t.checks??[],...o.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),e.clone=(t,o)=>a.clone(e,t,o),e.brand=()=>e,e.register=(t,o)=>(t.add(e,o),e),e.parse=(t,o)=>u.parse(e,t,o,{callee:e.parse}),e.safeParse=(t,o)=>u.safeParse(e,t,o),e.parseAsync=async(t,o)=>u.parseAsync(e,t,o,{callee:e.parseAsync}),e.safeParseAsync=async(t,o)=>u.safeParseAsync(e,t,o),e.spa=e.safeParseAsync,e.refine=(t,o)=>e.check(refine(t,o)),e.superRefine=t=>e.check(superRefine(t)),e.overwrite=t=>e.check(d._overwrite(t)),e.optional=()=>optional(e),e.nullable=()=>nullable(e),e.nullish=()=>optional(nullable(e)),e.nonoptional=t=>nonoptional(e,t),e.array=()=>array(e),e.or=t=>union([e,t]),e.and=t=>intersection(e,t),e.transform=t=>pipe(e,transform(t)),e.default=t=>_default(e,t),e.prefault=t=>prefault(e,t),e.catch=t=>_catch(e,t),e.pipe=t=>pipe(e,t),e.readonly=()=>readonly(e),e.describe=t=>{const o=e.clone();return i.globalRegistry.add(o,{description:t}),o},Object.defineProperty(e,"description",{get(){return i.globalRegistry.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(0===t.length)return i.globalRegistry.get(e);const o=e.clone();return i.globalRegistry.add(o,t[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),m=n.$constructor("_ZodString",(e,t)=>{r.$ZodString.init(e,t),l.init(e,t);const o=e._zod.bag;e.format=o.format??null,e.minLength=o.minimum??null,e.maxLength=o.maximum??null,e.regex=(...t)=>e.check(d._regex(...t)),e.includes=(...t)=>e.check(d._includes(...t)),e.startsWith=(...t)=>e.check(d._startsWith(...t)),e.endsWith=(...t)=>e.check(d._endsWith(...t)),e.min=(...t)=>e.check(d._minLength(...t)),e.max=(...t)=>e.check(d._maxLength(...t)),e.length=(...t)=>e.check(d._length(...t)),e.nonempty=(...t)=>e.check(d._minLength(1,...t)),e.lowercase=t=>e.check(d._lowercase(t)),e.uppercase=t=>e.check(d._uppercase(t)),e.trim=()=>e.check(d._trim()),e.normalize=(...t)=>e.check(d._normalize(...t)),e.toLowerCase=()=>e.check(d._toLowerCase()),e.toUpperCase=()=>e.check(d._toUpperCase())}),p=n.$constructor("ZodString",(e,t)=>{r.$ZodString.init(e,t),m.init(e,t),e.email=t=>e.check(d._email(h,t)),e.url=t=>e.check(d._url(v,t)),e.jwt=t=>e.check(d._jwt(R,t)),e.emoji=t=>e.check(d._emoji(b,t)),e.guid=t=>e.check(d._guid(g,t)),e.uuid=t=>e.check(d._uuid(y,t)),e.uuidv4=t=>e.check(d._uuidv4(y,t)),e.uuidv6=t=>e.check(d._uuidv6(y,t)),e.uuidv7=t=>e.check(d._uuidv7(y,t)),e.nanoid=t=>e.check(d._nanoid(k,t)),e.guid=t=>e.check(d._guid(g,t)),e.cuid=t=>e.check(d._cuid(w,t)),e.cuid2=t=>e.check(d._cuid2($,t)),e.ulid=t=>e.check(d._ulid(j,t)),e.base64=t=>e.check(d._base64(I,t)),e.base64url=t=>e.check(d._base64url(z,t)),e.xid=t=>e.check(d._xid(x,t)),e.ksuid=t=>e.check(d._ksuid(S,t)),e.ipv4=t=>e.check(d._ipv4(P,t)),e.ipv6=t=>e.check(d._ipv6(Z,t)),e.cidrv4=t=>e.check(d._cidrv4(T,t)),e.cidrv6=t=>e.check(d._cidrv6(E,t)),e.e164=t=>e.check(d._e164(C,t)),e.datetime=t=>e.check(c.datetime(t)),e.date=t=>e.check(c.date(t)),e.time=t=>e.check(c.time(t)),e.duration=t=>e.check(c.duration(t))});function string(e){return d._string(p,e)}const f=n.$constructor("ZodStringFormat",(e,t)=>{r.$ZodStringFormat.init(e,t),m.init(e,t)}),h=n.$constructor("ZodEmail",(e,t)=>{r.$ZodEmail.init(e,t),f.init(e,t)});function email(e){return d._email(h,e)}const g=n.$constructor("ZodGUID",(e,t)=>{r.$ZodGUID.init(e,t),f.init(e,t)});function guid(e){return d._guid(g,e)}const y=n.$constructor("ZodUUID",(e,t)=>{r.$ZodUUID.init(e,t),f.init(e,t)});function uuid(e){return d._uuid(y,e)}function uuidv4(e){return d._uuidv4(y,e)}function uuidv6(e){return d._uuidv6(y,e)}function uuidv7(e){return d._uuidv7(y,e)}const v=n.$constructor("ZodURL",(e,t)=>{r.$ZodURL.init(e,t),f.init(e,t)});function url(e){return d._url(v,e)}const b=n.$constructor("ZodEmoji",(e,t)=>{r.$ZodEmoji.init(e,t),f.init(e,t)});function emoji(e){return d._emoji(b,e)}const k=n.$constructor("ZodNanoID",(e,t)=>{r.$ZodNanoID.init(e,t),f.init(e,t)});function nanoid(e){return d._nanoid(k,e)}const w=n.$constructor("ZodCUID",(e,t)=>{r.$ZodCUID.init(e,t),f.init(e,t)});function cuid(e){return d._cuid(w,e)}const $=n.$constructor("ZodCUID2",(e,t)=>{r.$ZodCUID2.init(e,t),f.init(e,t)});function cuid2(e){return d._cuid2($,e)}const j=n.$constructor("ZodULID",(e,t)=>{r.$ZodULID.init(e,t),f.init(e,t)});function ulid(e){return d._ulid(j,e)}const x=n.$constructor("ZodXID",(e,t)=>{r.$ZodXID.init(e,t),f.init(e,t)});function xid(e){return d._xid(x,e)}const S=n.$constructor("ZodKSUID",(e,t)=>{r.$ZodKSUID.init(e,t),f.init(e,t)});function ksuid(e){return d._ksuid(S,e)}const P=n.$constructor("ZodIPv4",(e,t)=>{r.$ZodIPv4.init(e,t),f.init(e,t)});function ipv4(e){return d._ipv4(P,e)}const Z=n.$constructor("ZodIPv6",(e,t)=>{r.$ZodIPv6.init(e,t),f.init(e,t)});function ipv6(e){return d._ipv6(Z,e)}const T=n.$constructor("ZodCIDRv4",(e,t)=>{r.$ZodCIDRv4.init(e,t),f.init(e,t)});function cidrv4(e){return d._cidrv4(T,e)}const E=n.$constructor("ZodCIDRv6",(e,t)=>{r.$ZodCIDRv6.init(e,t),f.init(e,t)});function cidrv6(e){return d._cidrv6(E,e)}const I=n.$constructor("ZodBase64",(e,t)=>{r.$ZodBase64.init(e,t),f.init(e,t)});function base64(e){return d._base64(I,e)}const z=n.$constructor("ZodBase64URL",(e,t)=>{r.$ZodBase64URL.init(e,t),f.init(e,t)});function base64url(e){return d._base64url(z,e)}const C=n.$constructor("ZodE164",(e,t)=>{r.$ZodE164.init(e,t),f.init(e,t)});function e164(e){return d._e164(C,e)}const R=n.$constructor("ZodJWT",(e,t)=>{r.$ZodJWT.init(e,t),f.init(e,t)});function jwt(e){return d._jwt(R,e)}const N=n.$constructor("ZodCustomStringFormat",(e,t)=>{r.$ZodCustomStringFormat.init(e,t),f.init(e,t)});function stringFormat(e,t,o={}){return d._stringFormat(N,e,t,o)}const O=n.$constructor("ZodNumber",(e,t)=>{r.$ZodNumber.init(e,t),l.init(e,t),e.gt=(t,o)=>e.check(d._gt(t,o)),e.gte=(t,o)=>e.check(d._gte(t,o)),e.min=(t,o)=>e.check(d._gte(t,o)),e.lt=(t,o)=>e.check(d._lt(t,o)),e.lte=(t,o)=>e.check(d._lte(t,o)),e.max=(t,o)=>e.check(d._lte(t,o)),e.int=t=>e.check(int(t)),e.safe=t=>e.check(int(t)),e.positive=t=>e.check(d._gt(0,t)),e.nonnegative=t=>e.check(d._gte(0,t)),e.negative=t=>e.check(d._lt(0,t)),e.nonpositive=t=>e.check(d._lte(0,t)),e.multipleOf=(t,o)=>e.check(d._multipleOf(t,o)),e.step=(t,o)=>e.check(d._multipleOf(t,o)),e.finite=()=>e;const o=e._zod.bag;e.minValue=Math.max(o.minimum??Number.NEGATIVE_INFINITY,o.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(o.maximum??Number.POSITIVE_INFINITY,o.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(o.format??"").includes("int")||Number.isSafeInteger(o.multipleOf??.5),e.isFinite=!0,e.format=o.format??null});function number(e){return d._number(O,e)}const A=n.$constructor("ZodNumberFormat",(e,t)=>{r.$ZodNumberFormat.init(e,t),O.init(e,t)});function int(e){return d._int(A,e)}function float32(e){return d._float32(A,e)}function float64(e){return d._float64(A,e)}function int32(e){return d._int32(A,e)}function uint32(e){return d._uint32(A,e)}const D=n.$constructor("ZodBoolean",(e,t)=>{r.$ZodBoolean.init(e,t),l.init(e,t)});function boolean(e){return d._boolean(D,e)}const M=n.$constructor("ZodBigInt",(e,t)=>{r.$ZodBigInt.init(e,t),l.init(e,t),e.gte=(t,o)=>e.check(d._gte(t,o)),e.min=(t,o)=>e.check(d._gte(t,o)),e.gt=(t,o)=>e.check(d._gt(t,o)),e.gte=(t,o)=>e.check(d._gte(t,o)),e.min=(t,o)=>e.check(d._gte(t,o)),e.lt=(t,o)=>e.check(d._lt(t,o)),e.lte=(t,o)=>e.check(d._lte(t,o)),e.max=(t,o)=>e.check(d._lte(t,o)),e.positive=t=>e.check(d._gt(BigInt(0),t)),e.negative=t=>e.check(d._lt(BigInt(0),t)),e.nonpositive=t=>e.check(d._lte(BigInt(0),t)),e.nonnegative=t=>e.check(d._gte(BigInt(0),t)),e.multipleOf=(t,o)=>e.check(d._multipleOf(t,o));const o=e._zod.bag;e.minValue=o.minimum??null,e.maxValue=o.maximum??null,e.format=o.format??null});function bigint(e){return d._bigint(M,e)}const L=n.$constructor("ZodBigIntFormat",(e,t)=>{r.$ZodBigIntFormat.init(e,t),M.init(e,t)});function int64(e){return d._int64(L,e)}function uint64(e){return d._uint64(L,e)}const U=n.$constructor("ZodSymbol",(e,t)=>{r.$ZodSymbol.init(e,t),l.init(e,t)});function symbol(e){return d._symbol(U,e)}const q=n.$constructor("ZodUndefined",(e,t)=>{r.$ZodUndefined.init(e,t),l.init(e,t)});function _undefined(e){return d._undefined(q,e)}const V=n.$constructor("ZodNull",(e,t)=>{r.$ZodNull.init(e,t),l.init(e,t)});function _null(e){return d._null(V,e)}const F=n.$constructor("ZodAny",(e,t)=>{r.$ZodAny.init(e,t),l.init(e,t)});function any(){return d._any(F)}const K=n.$constructor("ZodUnknown",(e,t)=>{r.$ZodUnknown.init(e,t),l.init(e,t)});function unknown(){return d._unknown(K)}const B=n.$constructor("ZodNever",(e,t)=>{r.$ZodNever.init(e,t),l.init(e,t)});function never(e){return d._never(B,e)}const H=n.$constructor("ZodVoid",(e,t)=>{r.$ZodVoid.init(e,t),l.init(e,t)});function _void(e){return d._void(H,e)}const J=n.$constructor("ZodDate",(e,t)=>{r.$ZodDate.init(e,t),l.init(e,t),e.min=(t,o)=>e.check(d._gte(t,o)),e.max=(t,o)=>e.check(d._lte(t,o));const o=e._zod.bag;e.minDate=o.minimum?new Date(o.minimum):null,e.maxDate=o.maximum?new Date(o.maximum):null});function date(e){return d._date(J,e)}const W=n.$constructor("ZodArray",(e,t)=>{r.$ZodArray.init(e,t),l.init(e,t),e.element=t.element,e.min=(t,o)=>e.check(d._minLength(t,o)),e.nonempty=t=>e.check(d._minLength(1,t)),e.max=(t,o)=>e.check(d._maxLength(t,o)),e.length=(t,o)=>e.check(d._length(t,o)),e.unwrap=()=>e.element});function array(e,t){return d._array(W,e,t)}function keyof(e){const t=e._zod.def.shape;return literal(Object.keys(t))}const G=n.$constructor("ZodObject",(e,t)=>{r.$ZodObject.init(e,t),l.init(e,t),a.defineLazy(e,"shape",()=>t.shape),e.keyof=()=>_enum(Object.keys(e._zod.def.shape)),e.catchall=t=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:unknown()}),e.loose=()=>e.clone({...e._zod.def,catchall:unknown()}),e.strict=()=>e.clone({...e._zod.def,catchall:never()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t=>a.extend(e,t),e.merge=t=>a.merge(e,t),e.pick=t=>a.pick(e,t),e.omit=t=>a.omit(e,t),e.partial=(...t)=>a.partial(de,e,t[0]),e.required=(...t)=>a.required(me,e,t[0])});function object(e,t){const o={type:"object",get shape(){return a.assignProp(this,"shape",{...e}),this.shape},...a.normalizeParams(t)};return new G(o)}function strictObject(e,t){return new G({type:"object",get shape(){return a.assignProp(this,"shape",{...e}),this.shape},catchall:never(),...a.normalizeParams(t)})}function looseObject(e,t){return new G({type:"object",get shape(){return a.assignProp(this,"shape",{...e}),this.shape},catchall:unknown(),...a.normalizeParams(t)})}const Y=n.$constructor("ZodUnion",(e,t)=>{r.$ZodUnion.init(e,t),l.init(e,t),e.options=t.options});function union(e,t){return new Y({type:"union",options:e,...a.normalizeParams(t)})}const Q=n.$constructor("ZodDiscriminatedUnion",(e,t)=>{Y.init(e,t),r.$ZodDiscriminatedUnion.init(e,t)});function discriminatedUnion(e,t,o){return new Q({type:"union",options:t,discriminator:e,...a.normalizeParams(o)})}const X=n.$constructor("ZodIntersection",(e,t)=>{r.$ZodIntersection.init(e,t),l.init(e,t)});function intersection(e,t){return new X({type:"intersection",left:e,right:t})}const ee=n.$constructor("ZodTuple",(e,t)=>{r.$ZodTuple.init(e,t),l.init(e,t),e.rest=t=>e.clone({...e._zod.def,rest:t})});function tuple(e,t,o){const n=t instanceof r.$ZodType,s=n?o:t;return new ee({type:"tuple",items:e,rest:n?t:null,...a.normalizeParams(s)})}const te=n.$constructor("ZodRecord",(e,t)=>{r.$ZodRecord.init(e,t),l.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function record(e,t,o){return new te({type:"record",keyType:e,valueType:t,...a.normalizeParams(o)})}function partialRecord(e,t,o){return new te({type:"record",keyType:union([e,never()]),valueType:t,...a.normalizeParams(o)})}const oe=n.$constructor("ZodMap",(e,t)=>{r.$ZodMap.init(e,t),l.init(e,t),e.keyType=t.keyType,e.valueType=t.valueType});function map(e,t,o){return new oe({type:"map",keyType:e,valueType:t,...a.normalizeParams(o)})}const ne=n.$constructor("ZodSet",(e,t)=>{r.$ZodSet.init(e,t),l.init(e,t),e.min=(...t)=>e.check(d._minSize(...t)),e.nonempty=t=>e.check(d._minSize(1,t)),e.max=(...t)=>e.check(d._maxSize(...t)),e.size=(...t)=>e.check(d._size(...t))});function set(e,t){return new ne({type:"set",valueType:e,...a.normalizeParams(t)})}const re=n.$constructor("ZodEnum",(e,t)=>{r.$ZodEnum.init(e,t),l.init(e,t),e.enum=t.entries,e.options=Object.values(t.entries);const o=new Set(Object.keys(t.entries));e.extract=(e,n)=>{const r={};for(const n of e){if(!o.has(n))throw new Error(`Key ${n} not found in enum`);r[n]=t.entries[n]}return new re({...t,checks:[],...a.normalizeParams(n),entries:r})},e.exclude=(e,n)=>{const r={...t.entries};for(const t of e){if(!o.has(t))throw new Error(`Key ${t} not found in enum`);delete r[t]}return new re({...t,checks:[],...a.normalizeParams(n),entries:r})}});function _enum(e,t){const o=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new re({type:"enum",entries:o,...a.normalizeParams(t)})}function nativeEnum(e,t){return new re({type:"enum",entries:e,...a.normalizeParams(t)})}const se=n.$constructor("ZodLiteral",(e,t)=>{r.$ZodLiteral.init(e,t),l.init(e,t),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function literal(e,t){return new se({type:"literal",values:Array.isArray(e)?e:[e],...a.normalizeParams(t)})}const ae=n.$constructor("ZodFile",(e,t)=>{r.$ZodFile.init(e,t),l.init(e,t),e.min=(t,o)=>e.check(d._minSize(t,o)),e.max=(t,o)=>e.check(d._maxSize(t,o)),e.mime=(t,o)=>e.check(d._mime(Array.isArray(t)?t:[t],o))});function file(e){return d._file(ae,e)}const ie=n.$constructor("ZodTransform",(e,t)=>{r.$ZodTransform.init(e,t),l.init(e,t),e._zod.parse=(o,n)=>{o.addIssue=n=>{if("string"==typeof n)o.issues.push(a.issue(n,o.value,t));else{const t=n;t.fatal&&(t.continue=!1),t.code??(t.code="custom"),t.input??(t.input=o.value),t.inst??(t.inst=e),t.continue??(t.continue=!0),o.issues.push(a.issue(t))}};const r=t.transform(o.value,o);return r instanceof Promise?r.then(e=>(o.value=e,o)):(o.value=r,o)}});function transform(e){return new ie({type:"transform",transform:e})}const de=n.$constructor("ZodOptional",(e,t)=>{r.$ZodOptional.init(e,t),l.init(e,t),e.unwrap=()=>e._zod.def.innerType});function optional(e){return new de({type:"optional",innerType:e})}const ce=n.$constructor("ZodNullable",(e,t)=>{r.$ZodNullable.init(e,t),l.init(e,t),e.unwrap=()=>e._zod.def.innerType});function nullable(e){return new ce({type:"nullable",innerType:e})}function nullish(e){return optional(nullable(e))}const ue=n.$constructor("ZodDefault",(e,t)=>{r.$ZodDefault.init(e,t),l.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function _default(e,t){return new ue({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():t}})}const le=n.$constructor("ZodPrefault",(e,t)=>{r.$ZodPrefault.init(e,t),l.init(e,t),e.unwrap=()=>e._zod.def.innerType});function prefault(e,t){return new le({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():t}})}const me=n.$constructor("ZodNonOptional",(e,t)=>{r.$ZodNonOptional.init(e,t),l.init(e,t),e.unwrap=()=>e._zod.def.innerType});function nonoptional(e,t){return new me({type:"nonoptional",innerType:e,...a.normalizeParams(t)})}const pe=n.$constructor("ZodSuccess",(e,t)=>{r.$ZodSuccess.init(e,t),l.init(e,t),e.unwrap=()=>e._zod.def.innerType});function success(e){return new pe({type:"success",innerType:e})}const fe=n.$constructor("ZodCatch",(e,t)=>{r.$ZodCatch.init(e,t),l.init(e,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function _catch(e,t){return new fe({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const he=n.$constructor("ZodNaN",(e,t)=>{r.$ZodNaN.init(e,t),l.init(e,t)});function nan(e){return d._nan(he,e)}const _e=n.$constructor("ZodPipe",(e,t)=>{r.$ZodPipe.init(e,t),l.init(e,t),e.in=t.in,e.out=t.out});function pipe(e,t){return new _e({type:"pipe",in:e,out:t})}const ge=n.$constructor("ZodReadonly",(e,t)=>{r.$ZodReadonly.init(e,t),l.init(e,t)});function readonly(e){return new ge({type:"readonly",innerType:e})}const ye=n.$constructor("ZodTemplateLiteral",(e,t)=>{r.$ZodTemplateLiteral.init(e,t),l.init(e,t)});function templateLiteral(e,t){return new ye({type:"template_literal",parts:e,...a.normalizeParams(t)})}const ve=n.$constructor("ZodLazy",(e,t)=>{r.$ZodLazy.init(e,t),l.init(e,t),e.unwrap=()=>e._zod.def.getter()});function lazy(e){return new ve({type:"lazy",getter:e})}const be=n.$constructor("ZodPromise",(e,t)=>{r.$ZodPromise.init(e,t),l.init(e,t),e.unwrap=()=>e._zod.def.innerType});function promise(e){return new be({type:"promise",innerType:e})}const ke=n.$constructor("ZodCustom",(e,t)=>{r.$ZodCustom.init(e,t),l.init(e,t)});function check(e){const t=new s.$ZodCheck({check:"custom"});return t._zod.check=e,t}function custom(e,t){return d._custom(ke,e??(()=>!0),t)}function refine(e,t={}){return d._refine(ke,e,t)}function superRefine(e){const t=check(o=>(o.addIssue=e=>{if("string"==typeof e)o.issues.push(a.issue(e,o.value,t._zod.def));else{const n=e;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=o.value),n.inst??(n.inst=t),n.continue??(n.continue=!t._zod.def.abort),o.issues.push(a.issue(n))}},e(o.value,o)));return t}function _instanceof(e,t={error:`Input not instance of ${e.name}`}){const o=new ke({type:"custom",check:"custom",fn:t=>t instanceof e,abort:!0,...a.normalizeParams(t)});return o._zod.bag.Class=e,o}const stringbool=(...e)=>d._stringbool({Pipe:_e,Boolean:D,String:p,Transform:ie},...e);function json(e){const t=lazy(()=>union([string(e),number(),boolean(),_null(),array(t),record(string(),t)]));return t}function preprocess(e,t){return pipe(transform(e),t)}},"./node_modules/zod/v4/core/api.js":function(e,t,o){o.r(t),o.d(t,{TimePrecision:function(){return a},_any:function(){return _any},_array:function(){return _array},_base64:function(){return _base64},_base64url:function(){return _base64url},_bigint:function(){return _bigint},_boolean:function(){return _boolean},_catch:function(){return _catch},_cidrv4:function(){return _cidrv4},_cidrv6:function(){return _cidrv6},_coercedBigint:function(){return _coercedBigint},_coercedBoolean:function(){return _coercedBoolean},_coercedDate:function(){return _coercedDate},_coercedNumber:function(){return _coercedNumber},_coercedString:function(){return _coercedString},_cuid:function(){return _cuid},_cuid2:function(){return _cuid2},_custom:function(){return _custom},_date:function(){return _date},_default:function(){return _default},_discriminatedUnion:function(){return _discriminatedUnion},_e164:function(){return _e164},_email:function(){return _email},_emoji:function(){return _emoji},_endsWith:function(){return _endsWith},_enum:function(){return _enum},_file:function(){return _file},_float32:function(){return _float32},_float64:function(){return _float64},_gt:function(){return _gt},_gte:function(){return _gte},_guid:function(){return _guid},_includes:function(){return _includes},_int:function(){return _int},_int32:function(){return _int32},_int64:function(){return _int64},_intersection:function(){return _intersection},_ipv4:function(){return _ipv4},_ipv6:function(){return _ipv6},_isoDate:function(){return _isoDate},_isoDateTime:function(){return _isoDateTime},_isoDuration:function(){return _isoDuration},_isoTime:function(){return _isoTime},_jwt:function(){return _jwt},_ksuid:function(){return _ksuid},_lazy:function(){return _lazy},_length:function(){return _length},_literal:function(){return _literal},_lowercase:function(){return _lowercase},_lt:function(){return _lt},_lte:function(){return _lte},_map:function(){return _map},_max:function(){return _lte},_maxLength:function(){return _maxLength},_maxSize:function(){return _maxSize},_mime:function(){return _mime},_min:function(){return _gte},_minLength:function(){return _minLength},_minSize:function(){return _minSize},_multipleOf:function(){return _multipleOf},_nan:function(){return _nan},_nanoid:function(){return _nanoid},_nativeEnum:function(){return _nativeEnum},_negative:function(){return _negative},_never:function(){return _never},_nonnegative:function(){return _nonnegative},_nonoptional:function(){return _nonoptional},_nonpositive:function(){return _nonpositive},_normalize:function(){return _normalize},_null:function(){return _null},_nullable:function(){return _nullable},_number:function(){return _number},_optional:function(){return _optional},_overwrite:function(){return _overwrite},_pipe:function(){return _pipe},_positive:function(){return _positive},_promise:function(){return _promise},_property:function(){return _property},_readonly:function(){return _readonly},_record:function(){return _record},_refine:function(){return _refine},_regex:function(){return _regex},_set:function(){return _set},_size:function(){return _size},_startsWith:function(){return _startsWith},_string:function(){return _string},_stringFormat:function(){return _stringFormat},_stringbool:function(){return _stringbool},_success:function(){return _success},_symbol:function(){return _symbol},_templateLiteral:function(){return _templateLiteral},_toLowerCase:function(){return _toLowerCase},_toUpperCase:function(){return _toUpperCase},_transform:function(){return _transform},_trim:function(){return _trim},_tuple:function(){return _tuple},_uint32:function(){return _uint32},_uint64:function(){return _uint64},_ulid:function(){return _ulid},_undefined:function(){return _undefined},_union:function(){return _union},_unknown:function(){return _unknown},_uppercase:function(){return _uppercase},_url:function(){return _url},_uuid:function(){return _uuid},_uuidv4:function(){return _uuidv4},_uuidv6:function(){return _uuidv6},_uuidv7:function(){return _uuidv7},_void:function(){return _void},_xid:function(){return _xid}});var n=o("./node_modules/zod/v4/core/checks.js"),r=o("./node_modules/zod/v4/core/schemas.js"),s=o("./node_modules/zod/v4/core/util.js");function _string(e,t){return new e({type:"string",...s.normalizeParams(t)})}function _coercedString(e,t){return new e({type:"string",coerce:!0,...s.normalizeParams(t)})}function _email(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _guid(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _uuid(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _uuidv4(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...s.normalizeParams(t)})}function _uuidv6(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...s.normalizeParams(t)})}function _uuidv7(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...s.normalizeParams(t)})}function _url(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _emoji(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _nanoid(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _cuid(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _cuid2(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _ulid(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _xid(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _ksuid(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _ipv4(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _ipv6(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _cidrv4(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _cidrv6(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _base64(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _base64url(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _e164(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...s.normalizeParams(t)})}function _jwt(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...s.normalizeParams(t)})}const a={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function _isoDateTime(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...s.normalizeParams(t)})}function _isoDate(e,t){return new e({type:"string",format:"date",check:"string_format",...s.normalizeParams(t)})}function _isoTime(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...s.normalizeParams(t)})}function _isoDuration(e,t){return new e({type:"string",format:"duration",check:"string_format",...s.normalizeParams(t)})}function _number(e,t){return new e({type:"number",checks:[],...s.normalizeParams(t)})}function _coercedNumber(e,t){return new e({type:"number",coerce:!0,checks:[],...s.normalizeParams(t)})}function _int(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...s.normalizeParams(t)})}function _float32(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...s.normalizeParams(t)})}function _float64(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...s.normalizeParams(t)})}function _int32(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...s.normalizeParams(t)})}function _uint32(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...s.normalizeParams(t)})}function _boolean(e,t){return new e({type:"boolean",...s.normalizeParams(t)})}function _coercedBoolean(e,t){return new e({type:"boolean",coerce:!0,...s.normalizeParams(t)})}function _bigint(e,t){return new e({type:"bigint",...s.normalizeParams(t)})}function _coercedBigint(e,t){return new e({type:"bigint",coerce:!0,...s.normalizeParams(t)})}function _int64(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...s.normalizeParams(t)})}function _uint64(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...s.normalizeParams(t)})}function _symbol(e,t){return new e({type:"symbol",...s.normalizeParams(t)})}function _undefined(e,t){return new e({type:"undefined",...s.normalizeParams(t)})}function _null(e,t){return new e({type:"null",...s.normalizeParams(t)})}function _any(e){return new e({type:"any"})}function _unknown(e){return new e({type:"unknown"})}function _never(e,t){return new e({type:"never",...s.normalizeParams(t)})}function _void(e,t){return new e({type:"void",...s.normalizeParams(t)})}function _date(e,t){return new e({type:"date",...s.normalizeParams(t)})}function _coercedDate(e,t){return new e({type:"date",coerce:!0,...s.normalizeParams(t)})}function _nan(e,t){return new e({type:"nan",...s.normalizeParams(t)})}function _lt(e,t){return new n.$ZodCheckLessThan({check:"less_than",...s.normalizeParams(t),value:e,inclusive:!1})}function _lte(e,t){return new n.$ZodCheckLessThan({check:"less_than",...s.normalizeParams(t),value:e,inclusive:!0})}function _gt(e,t){return new n.$ZodCheckGreaterThan({check:"greater_than",...s.normalizeParams(t),value:e,inclusive:!1})}function _gte(e,t){return new n.$ZodCheckGreaterThan({check:"greater_than",...s.normalizeParams(t),value:e,inclusive:!0})}function _positive(e){return _gt(0,e)}function _negative(e){return _lt(0,e)}function _nonpositive(e){return _lte(0,e)}function _nonnegative(e){return _gte(0,e)}function _multipleOf(e,t){return new n.$ZodCheckMultipleOf({check:"multiple_of",...s.normalizeParams(t),value:e})}function _maxSize(e,t){return new n.$ZodCheckMaxSize({check:"max_size",...s.normalizeParams(t),maximum:e})}function _minSize(e,t){return new n.$ZodCheckMinSize({check:"min_size",...s.normalizeParams(t),minimum:e})}function _size(e,t){return new n.$ZodCheckSizeEquals({check:"size_equals",...s.normalizeParams(t),size:e})}function _maxLength(e,t){return new n.$ZodCheckMaxLength({check:"max_length",...s.normalizeParams(t),maximum:e})}function _minLength(e,t){return new n.$ZodCheckMinLength({check:"min_length",...s.normalizeParams(t),minimum:e})}function _length(e,t){return new n.$ZodCheckLengthEquals({check:"length_equals",...s.normalizeParams(t),length:e})}function _regex(e,t){return new n.$ZodCheckRegex({check:"string_format",format:"regex",...s.normalizeParams(t),pattern:e})}function _lowercase(e){return new n.$ZodCheckLowerCase({check:"string_format",format:"lowercase",...s.normalizeParams(e)})}function _uppercase(e){return new n.$ZodCheckUpperCase({check:"string_format",format:"uppercase",...s.normalizeParams(e)})}function _includes(e,t){return new n.$ZodCheckIncludes({check:"string_format",format:"includes",...s.normalizeParams(t),includes:e})}function _startsWith(e,t){return new n.$ZodCheckStartsWith({check:"string_format",format:"starts_with",...s.normalizeParams(t),prefix:e})}function _endsWith(e,t){return new n.$ZodCheckEndsWith({check:"string_format",format:"ends_with",...s.normalizeParams(t),suffix:e})}function _property(e,t,o){return new n.$ZodCheckProperty({check:"property",property:e,schema:t,...s.normalizeParams(o)})}function _mime(e,t){return new n.$ZodCheckMimeType({check:"mime_type",mime:e,...s.normalizeParams(t)})}function _overwrite(e){return new n.$ZodCheckOverwrite({check:"overwrite",tx:e})}function _normalize(e){return _overwrite(t=>t.normalize(e))}function _trim(){return _overwrite(e=>e.trim())}function _toLowerCase(){return _overwrite(e=>e.toLowerCase())}function _toUpperCase(){return _overwrite(e=>e.toUpperCase())}function _array(e,t,o){return new e({type:"array",element:t,...s.normalizeParams(o)})}function _union(e,t,o){return new e({type:"union",options:t,...s.normalizeParams(o)})}function _discriminatedUnion(e,t,o,n){return new e({type:"union",options:o,discriminator:t,...s.normalizeParams(n)})}function _intersection(e,t,o){return new e({type:"intersection",left:t,right:o})}function _tuple(e,t,o,n){const a=o instanceof r.$ZodType,i=a?n:o;return new e({type:"tuple",items:t,rest:a?o:null,...s.normalizeParams(i)})}function _record(e,t,o,n){return new e({type:"record",keyType:t,valueType:o,...s.normalizeParams(n)})}function _map(e,t,o,n){return new e({type:"map",keyType:t,valueType:o,...s.normalizeParams(n)})}function _set(e,t,o){return new e({type:"set",valueType:t,...s.normalizeParams(o)})}function _enum(e,t,o){return new e({type:"enum",entries:Array.isArray(t)?Object.fromEntries(t.map(e=>[e,e])):t,...s.normalizeParams(o)})}function _nativeEnum(e,t,o){return new e({type:"enum",entries:t,...s.normalizeParams(o)})}function _literal(e,t,o){return new e({type:"literal",values:Array.isArray(t)?t:[t],...s.normalizeParams(o)})}function _file(e,t){return new e({type:"file",...s.normalizeParams(t)})}function _transform(e,t){return new e({type:"transform",transform:t})}function _optional(e,t){return new e({type:"optional",innerType:t})}function _nullable(e,t){return new e({type:"nullable",innerType:t})}function _default(e,t,o){return new e({type:"default",innerType:t,get defaultValue(){return"function"==typeof o?o():o}})}function _nonoptional(e,t,o){return new e({type:"nonoptional",innerType:t,...s.normalizeParams(o)})}function _success(e,t){return new e({type:"success",innerType:t})}function _catch(e,t,o){return new e({type:"catch",innerType:t,catchValue:"function"==typeof o?o:()=>o})}function _pipe(e,t,o){return new e({type:"pipe",in:t,out:o})}function _readonly(e,t){return new e({type:"readonly",innerType:t})}function _templateLiteral(e,t,o){return new e({type:"template_literal",parts:t,...s.normalizeParams(o)})}function _lazy(e,t){return new e({type:"lazy",getter:t})}function _promise(e,t){return new e({type:"promise",innerType:t})}function _custom(e,t,o){const n=s.normalizeParams(o);n.abort??(n.abort=!0);return new e({type:"custom",check:"custom",fn:t,...n})}function _refine(e,t,o){return new e({type:"custom",check:"custom",fn:t,...s.normalizeParams(o)})}function _stringbool(e,t){const o=s.normalizeParams(t);let n=o.truthy??["true","1","yes","on","y","enabled"],a=o.falsy??["false","0","no","off","n","disabled"];"sensitive"!==o.case&&(n=n.map(e=>"string"==typeof e?e.toLowerCase():e),a=a.map(e=>"string"==typeof e?e.toLowerCase():e));const i=new Set(n),d=new Set(a),c=e.Pipe??r.$ZodPipe,u=e.Boolean??r.$ZodBoolean,l=e.String??r.$ZodString,m=new(e.Transform??r.$ZodTransform)({type:"transform",transform:(e,t)=>{let n=e;return"sensitive"!==o.case&&(n=n.toLowerCase()),!!i.has(n)||!d.has(n)&&(t.issues.push({code:"invalid_value",expected:"stringbool",values:[...i,...d],input:t.value,inst:m}),{})},error:o.error}),p=new c({type:"pipe",in:new l({type:"string",error:o.error}),out:m,error:o.error});return new c({type:"pipe",in:p,out:new u({type:"boolean",error:o.error}),error:o.error})}function _stringFormat(e,t,o,n={}){const r=s.normalizeParams(n),a={...s.normalizeParams(n),check:"string_format",type:"string",format:t,fn:"function"==typeof o?o:e=>o.test(e),...r};o instanceof RegExp&&(a.pattern=o);return new e(a)}},"./node_modules/zod/v4/core/checks.js":function(e,t,o){o.r(t),o.d(t,{$ZodCheck:function(){return a},$ZodCheckBigIntFormat:function(){return m},$ZodCheckEndsWith:function(){return S},$ZodCheckGreaterThan:function(){return c},$ZodCheckIncludes:function(){return j},$ZodCheckLengthEquals:function(){return v},$ZodCheckLessThan:function(){return d},$ZodCheckLowerCase:function(){return w},$ZodCheckMaxLength:function(){return g},$ZodCheckMaxSize:function(){return p},$ZodCheckMimeType:function(){return Z},$ZodCheckMinLength:function(){return y},$ZodCheckMinSize:function(){return f},$ZodCheckMultipleOf:function(){return u},$ZodCheckNumberFormat:function(){return l},$ZodCheckOverwrite:function(){return T},$ZodCheckProperty:function(){return P},$ZodCheckRegex:function(){return k},$ZodCheckSizeEquals:function(){return h},$ZodCheckStartsWith:function(){return x},$ZodCheckStringFormat:function(){return b},$ZodCheckUpperCase:function(){return $}});var n=o("./node_modules/zod/v4/core/core.js"),r=o("./node_modules/zod/v4/core/regexes.js"),s=o("./node_modules/zod/v4/core/util.js");const a=n.$constructor("$ZodCheck",(e,t)=>{var o;e._zod??(e._zod={}),e._zod.def=t,(o=e._zod).onattach??(o.onattach=[])}),i={number:"number",bigint:"bigint",object:"date"},d=n.$constructor("$ZodCheckLessThan",(e,t)=>{a.init(e,t);const o=i[typeof t.value];e._zod.onattach.push(e=>{const o=e._zod.bag,n=(t.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<n&&(t.inclusive?o.maximum=t.value:o.exclusiveMaximum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value<=t.value:n.value<t.value)||n.issues.push({origin:o,code:"too_big",maximum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),c=n.$constructor("$ZodCheckGreaterThan",(e,t)=>{a.init(e,t);const o=i[typeof t.value];e._zod.onattach.push(e=>{const o=e._zod.bag,n=(t.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>n&&(t.inclusive?o.minimum=t.value:o.exclusiveMinimum=t.value)}),e._zod.check=n=>{(t.inclusive?n.value>=t.value:n.value>t.value)||n.issues.push({origin:o,code:"too_small",minimum:t.value,input:n.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),u=n.$constructor("$ZodCheckMultipleOf",(e,t)=>{a.init(e,t),e._zod.onattach.push(e=>{var o;(o=e._zod.bag).multipleOf??(o.multipleOf=t.value)}),e._zod.check=o=>{if(typeof o.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");("bigint"==typeof o.value?o.value%t.value===BigInt(0):0===s.floatSafeRemainder(o.value,t.value))||o.issues.push({origin:typeof o.value,code:"not_multiple_of",divisor:t.value,input:o.value,inst:e,continue:!t.abort})}}),l=n.$constructor("$ZodCheckNumberFormat",(e,t)=>{a.init(e,t),t.format=t.format||"float64";const o=t.format?.includes("int"),n=o?"int":"number",[i,d]=s.NUMBER_FORMAT_RANGES[t.format];e._zod.onattach.push(e=>{const n=e._zod.bag;n.format=t.format,n.minimum=i,n.maximum=d,o&&(n.pattern=r.integer)}),e._zod.check=r=>{const s=r.value;if(o){if(!Number.isInteger(s))return void r.issues.push({expected:n,format:t.format,code:"invalid_type",input:s,inst:e});if(!Number.isSafeInteger(s))return void(s>0?r.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}):r.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:n,continue:!t.abort}))}s<i&&r.issues.push({origin:"number",input:s,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>d&&r.issues.push({origin:"number",input:s,code:"too_big",maximum:d,inst:e})}}),m=n.$constructor("$ZodCheckBigIntFormat",(e,t)=>{a.init(e,t);const[o,n]=s.BIGINT_FORMAT_RANGES[t.format];e._zod.onattach.push(e=>{const r=e._zod.bag;r.format=t.format,r.minimum=o,r.maximum=n}),e._zod.check=r=>{const s=r.value;s<o&&r.issues.push({origin:"bigint",input:s,code:"too_small",minimum:o,inclusive:!0,inst:e,continue:!t.abort}),s>n&&r.issues.push({origin:"bigint",input:s,code:"too_big",maximum:n,inst:e})}}),p=n.$constructor("$ZodCheckMaxSize",(e,t)=>{var o;a.init(e,t),(o=e._zod.def).when??(o.when=e=>{const t=e.value;return!s.nullish(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const o=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const n=o.value;n.size<=t.maximum||o.issues.push({origin:s.getSizableOrigin(n),code:"too_big",maximum:t.maximum,input:n,inst:e,continue:!t.abort})}}),f=n.$constructor("$ZodCheckMinSize",(e,t)=>{var o;a.init(e,t),(o=e._zod.def).when??(o.when=e=>{const t=e.value;return!s.nullish(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const o=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const n=o.value;n.size>=t.minimum||o.issues.push({origin:s.getSizableOrigin(n),code:"too_small",minimum:t.minimum,input:n,inst:e,continue:!t.abort})}}),h=n.$constructor("$ZodCheckSizeEquals",(e,t)=>{var o;a.init(e,t),(o=e._zod.def).when??(o.when=e=>{const t=e.value;return!s.nullish(t)&&void 0!==t.size}),e._zod.onattach.push(e=>{const o=e._zod.bag;o.minimum=t.size,o.maximum=t.size,o.size=t.size}),e._zod.check=o=>{const n=o.value,r=n.size;if(r===t.size)return;const a=r>t.size;o.issues.push({origin:s.getSizableOrigin(n),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),g=n.$constructor("$ZodCheckMaxLength",(e,t)=>{var o;a.init(e,t),(o=e._zod.def).when??(o.when=e=>{const t=e.value;return!s.nullish(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const o=e._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<o&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=o=>{const n=o.value;if(n.length<=t.maximum)return;const r=s.getLengthableOrigin(n);o.issues.push({origin:r,code:"too_big",maximum:t.maximum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),y=n.$constructor("$ZodCheckMinLength",(e,t)=>{var o;a.init(e,t),(o=e._zod.def).when??(o.when=e=>{const t=e.value;return!s.nullish(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const o=e._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>o&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=o=>{const n=o.value;if(n.length>=t.minimum)return;const r=s.getLengthableOrigin(n);o.issues.push({origin:r,code:"too_small",minimum:t.minimum,inclusive:!0,input:n,inst:e,continue:!t.abort})}}),v=n.$constructor("$ZodCheckLengthEquals",(e,t)=>{var o;a.init(e,t),(o=e._zod.def).when??(o.when=e=>{const t=e.value;return!s.nullish(t)&&void 0!==t.length}),e._zod.onattach.push(e=>{const o=e._zod.bag;o.minimum=t.length,o.maximum=t.length,o.length=t.length}),e._zod.check=o=>{const n=o.value,r=n.length;if(r===t.length)return;const a=s.getLengthableOrigin(n),i=r>t.length;o.issues.push({origin:a,...i?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!t.abort})}}),b=n.$constructor("$ZodCheckStringFormat",(e,t)=>{var o,n;a.init(e,t),e._zod.onattach.push(e=>{const o=e._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(o=e._zod).check??(o.check=o=>{t.pattern.lastIndex=0,t.pattern.test(o.value)||o.issues.push({origin:"string",code:"invalid_format",format:t.format,input:o.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(n=e._zod).check??(n.check=()=>{})}),k=n.$constructor("$ZodCheckRegex",(e,t)=>{b.init(e,t),e._zod.check=o=>{t.pattern.lastIndex=0,t.pattern.test(o.value)||o.issues.push({origin:"string",code:"invalid_format",format:"regex",input:o.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),w=n.$constructor("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=r.lowercase),b.init(e,t)}),$=n.$constructor("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=r.uppercase),b.init(e,t)}),j=n.$constructor("$ZodCheckIncludes",(e,t)=>{a.init(e,t);const o=s.escapeRegex(t.includes),n=new RegExp("number"==typeof t.position?`^.{${t.position}}${o}`:o);t.pattern=n,e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=o=>{o.value.includes(t.includes,t.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:o.value,inst:e,continue:!t.abort})}}),x=n.$constructor("$ZodCheckStartsWith",(e,t)=>{a.init(e,t);const o=new RegExp(`^${s.escapeRegex(t.prefix)}.*`);t.pattern??(t.pattern=o),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(o)}),e._zod.check=o=>{o.value.startsWith(t.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:o.value,inst:e,continue:!t.abort})}}),S=n.$constructor("$ZodCheckEndsWith",(e,t)=>{a.init(e,t);const o=new RegExp(`.*${s.escapeRegex(t.suffix)}$`);t.pattern??(t.pattern=o),e._zod.onattach.push(e=>{const t=e._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(o)}),e._zod.check=o=>{o.value.endsWith(t.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:o.value,inst:e,continue:!t.abort})}});function handleCheckPropertyResult(e,t,o){e.issues.length&&t.issues.push(...s.prefixIssues(o,e.issues))}const P=n.$constructor("$ZodCheckProperty",(e,t)=>{a.init(e,t),e._zod.check=e=>{const o=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(o instanceof Promise)return o.then(o=>handleCheckPropertyResult(o,e,t.property));handleCheckPropertyResult(o,e,t.property)}}),Z=n.$constructor("$ZodCheckMimeType",(e,t)=>{a.init(e,t);const o=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=n=>{o.has(n.value.type)||n.issues.push({code:"invalid_value",values:t.mime,input:n.value.type,inst:e})}}),T=n.$constructor("$ZodCheckOverwrite",(e,t)=>{a.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}})},"./node_modules/zod/v4/core/core.js":function(e,t,o){o.r(t),o.d(t,{$ZodAsyncError:function(){return $ZodAsyncError},$brand:function(){return r},$constructor:function(){return $constructor},NEVER:function(){return n},config:function(){return config},globalConfig:function(){return s}});const n=Object.freeze({status:"aborted"});function $constructor(e,t,o){function init(o,n){var r;Object.defineProperty(o,"_zod",{value:o._zod??{},enumerable:!1}),(r=o._zod).traits??(r.traits=new Set),o._zod.traits.add(e),t(o,n);for(const e in _.prototype)e in o||Object.defineProperty(o,e,{value:_.prototype[e].bind(o)});o._zod.constr=_,o._zod.def=n}const n=o?.Parent??Object;class Definition extends n{}function _(e){var t;const n=o?.Parent?new Definition:this;init(n,e),(t=n._zod).deferred??(t.deferred=[]);for(const e of n._zod.deferred)e();return n}return Object.defineProperty(Definition,"name",{value:e}),Object.defineProperty(_,"init",{value:init}),Object.defineProperty(_,Symbol.hasInstance,{value:t=>!!(o?.Parent&&t instanceof o.Parent)||t?._zod?.traits?.has(e)}),Object.defineProperty(_,"name",{value:e}),_}const r=Symbol("zod_brand");class $ZodAsyncError extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}const s={};function config(e){return e&&Object.assign(s,e),s}},"./node_modules/zod/v4/core/doc.js":function(e,t,o){o.r(t),o.d(t,{Doc:function(){return Doc}});class Doc{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if("function"==typeof e)return e(this,{execution:"sync"}),void e(this,{execution:"async"});const t=e.split("\n").filter(e=>e),o=Math.min(...t.map(e=>e.length-e.trimStart().length)),n=t.map(e=>e.slice(o)).map(e=>" ".repeat(2*this.indent)+e);for(const e of n)this.content.push(e)}compile(){const e=Function,t=this?.args;return new e(...t,[...(this?.content??[""]).map(e=>`  ${e}`)].join("\n"))}}},"./node_modules/zod/v4/core/errors.js":function(e,t,o){o.r(t),o.d(t,{$ZodError:function(){return s},$ZodRealError:function(){return a},flattenError:function(){return flattenError},formatError:function(){return formatError},prettifyError:function(){return prettifyError},toDotPath:function(){return toDotPath},treeifyError:function(){return treeifyError}});var n=o("./node_modules/zod/v4/core/core.js"),r=o("./node_modules/zod/v4/core/util.js");const initializer=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get(){return JSON.stringify(t,r.jsonStringifyReplacer,2)},enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},s=(0,n.$constructor)("$ZodError",initializer),a=(0,n.$constructor)("$ZodError",initializer,{Parent:Error});function flattenError(e,t=e=>e.message){const o={},n=[];for(const r of e.issues)r.path.length>0?(o[r.path[0]]=o[r.path[0]]||[],o[r.path[0]].push(t(r))):n.push(t(r));return{formErrors:n,fieldErrors:o}}function formatError(e,t){const o=t||function(e){return e.message},n={_errors:[]},processError=e=>{for(const t of e.issues)if("invalid_union"===t.code&&t.errors.length)t.errors.map(e=>processError({issues:e}));else if("invalid_key"===t.code)processError({issues:t.issues});else if("invalid_element"===t.code)processError({issues:t.issues});else if(0===t.path.length)n._errors.push(o(t));else{let e=n,r=0;for(;r<t.path.length;){const n=t.path[r];r===t.path.length-1?(e[n]=e[n]||{_errors:[]},e[n]._errors.push(o(t))):e[n]=e[n]||{_errors:[]},e=e[n],r++}}};return processError(e),n}function treeifyError(e,t){const o=t||function(e){return e.message},n={errors:[]},processError=(e,t=[])=>{var r,s;for(const a of e.issues)if("invalid_union"===a.code&&a.errors.length)a.errors.map(e=>processError({issues:e},a.path));else if("invalid_key"===a.code)processError({issues:a.issues},a.path);else if("invalid_element"===a.code)processError({issues:a.issues},a.path);else{const e=[...t,...a.path];if(0===e.length){n.errors.push(o(a));continue}let i=n,d=0;for(;d<e.length;){const t=e[d],n=d===e.length-1;"string"==typeof t?(i.properties??(i.properties={}),(r=i.properties)[t]??(r[t]={errors:[]}),i=i.properties[t]):(i.items??(i.items=[]),(s=i.items)[t]??(s[t]={errors:[]}),i=i.items[t]),n&&i.errors.push(o(a)),d++}}};return processError(e),n}function toDotPath(e){const t=[];for(const o of e)"number"==typeof o?t.push(`[${o}]`):"symbol"==typeof o?t.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?t.push(`[${JSON.stringify(o)}]`):(t.length&&t.push("."),t.push(o));return t.join("")}function prettifyError(e){const t=[],o=[...e.issues].sort((e,t)=>e.path.length-t.path.length);for(const e of o)t.push(`✖ ${e.message}`),e.path?.length&&t.push(`  → at ${toDotPath(e.path)}`);return t.join("\n")}},"./node_modules/zod/v4/core/parse.js":function(e,t,o){o.r(t),o.d(t,{_parse:function(){return _parse},_parseAsync:function(){return _parseAsync},_safeParse:function(){return _safeParse},_safeParseAsync:function(){return _safeParseAsync},parse:function(){return a},parseAsync:function(){return i},safeParse:function(){return d},safeParseAsync:function(){return c}});var n=o("./node_modules/zod/v4/core/core.js"),r=o("./node_modules/zod/v4/core/errors.js"),s=o("./node_modules/zod/v4/core/util.js");const _parse=e=>(t,o,r,a)=>{const i=r?Object.assign(r,{async:!1}):{async:!1},d=t._zod.run({value:o,issues:[]},i);if(d instanceof Promise)throw new n.$ZodAsyncError;if(d.issues.length){const t=new(a?.Err??e)(d.issues.map(e=>s.finalizeIssue(e,i,n.config())));throw s.captureStackTrace(t,a?.callee),t}return d.value},a=_parse(r.$ZodRealError),_parseAsync=e=>async(t,o,r,a)=>{const i=r?Object.assign(r,{async:!0}):{async:!0};let d=t._zod.run({value:o,issues:[]},i);if(d instanceof Promise&&(d=await d),d.issues.length){const t=new(a?.Err??e)(d.issues.map(e=>s.finalizeIssue(e,i,n.config())));throw s.captureStackTrace(t,a?.callee),t}return d.value},i=_parseAsync(r.$ZodRealError),_safeParse=e=>(t,o,a)=>{const i=a?{...a,async:!1}:{async:!1},d=t._zod.run({value:o,issues:[]},i);if(d instanceof Promise)throw new n.$ZodAsyncError;return d.issues.length?{success:!1,error:new(e??r.$ZodError)(d.issues.map(e=>s.finalizeIssue(e,i,n.config())))}:{success:!0,data:d.value}},d=_safeParse(r.$ZodRealError),_safeParseAsync=e=>async(t,o,r)=>{const a=r?Object.assign(r,{async:!0}):{async:!0};let i=t._zod.run({value:o,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new e(i.issues.map(e=>s.finalizeIssue(e,a,n.config())))}:{success:!0,data:i.value}},c=_safeParseAsync(r.$ZodRealError)},"./node_modules/zod/v4/core/regexes.js":function(e,t,o){o.r(t),o.d(t,{_emoji:function(){return k},base64:function(){return S},base64url:function(){return P},bigint:function(){return C},boolean:function(){return O},browserEmail:function(){return b},cidrv4:function(){return j},cidrv6:function(){return x},cuid:function(){return n},cuid2:function(){return r},date:function(){return z},datetime:function(){return datetime},domain:function(){return T},duration:function(){return c},e164:function(){return E},email:function(){return h},emoji:function(){return emoji},extendedDuration:function(){return u},guid:function(){return l},hostname:function(){return Z},html5Email:function(){return g},integer:function(){return R},ipv4:function(){return w},ipv6:function(){return $},ksuid:function(){return i},lowercase:function(){return M},nanoid:function(){return d},null:function(){return A},number:function(){return N},rfc5322Email:function(){return y},string:function(){return string},time:function(){return time},ulid:function(){return s},undefined:function(){return D},unicodeEmail:function(){return v},uppercase:function(){return L},uuid:function(){return uuid},uuid4:function(){return m},uuid6:function(){return p},uuid7:function(){return f},xid:function(){return a}});const n=/^[cC][^\s-]{8,}$/,r=/^[0-9a-z]+$/,s=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,a=/^[0-9a-vA-V]{20}$/,i=/^[A-Za-z0-9]{27}$/,d=/^[a-zA-Z0-9_-]{21}$/,c=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,u=/^[-+]?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)?)??$/,l=/^([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})$/,uuid=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/,m=uuid(4),p=uuid(6),f=uuid(7),h=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,g=/^[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])?)*$/,y=/^(([^<>()\[\]\\.,;:\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,}))$/,v=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,b=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,k="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function emoji(){return new RegExp(k,"u")}const w=/^(?:(?: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-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})$/,j=/^((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])$/,x=/^(([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])$/,S=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,P=/^[A-Za-z0-9_-]*$/,Z=/^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/,T=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,E=/^\+(?:[0-9]){6,14}[0-9]$/,I="(?:(?:\\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])))",z=new RegExp(`^${I}$`);function timeSource(e){const t="(?:[01]\\d|2[0-3]):[0-5]\\d";return"number"==typeof e.precision?-1===e.precision?`${t}`:0===e.precision?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function time(e){return new RegExp(`^${timeSource(e)}$`)}function datetime(e){const t=timeSource({precision:e.precision}),o=["Z"];e.local&&o.push(""),e.offset&&o.push("([+-]\\d{2}:\\d{2})");const n=`${t}(?:${o.join("|")})`;return new RegExp(`^${I}T(?:${n})$`)}const string=e=>new RegExp(`^${e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*"}$`),C=/^\d+n?$/,R=/^\d+$/,N=/^-?\d+(?:\.\d+)?/i,O=/true|false/i,A=/null/i,D=/undefined/i,M=/^[^A-Z]*$/,L=/^[^a-z]*$/},"./node_modules/zod/v4/core/registries.js":function(e,t,o){o.r(t),o.d(t,{$ZodRegistry:function(){return $ZodRegistry},$input:function(){return r},$output:function(){return n},globalRegistry:function(){return s},registry:function(){return registry}});const n=Symbol("ZodOutput"),r=Symbol("ZodInput");class $ZodRegistry{constructor(){this._map=new Map,this._idmap=new Map}add(e,...t){const o=t[0];if(this._map.set(e,o),o&&"object"==typeof o&&"id"in o){if(this._idmap.has(o.id))throw new Error(`ID ${o.id} already exists in the registry`);this._idmap.set(o.id,e)}return this}clear(){return this._map=new Map,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&"object"==typeof t&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const o={...this.get(t)??{}};return delete o.id,{...o,...this._map.get(e)}}return this._map.get(e)}has(e){return this._map.has(e)}}function registry(){return new $ZodRegistry}const s=registry()},"./node_modules/zod/v4/core/schemas.js":function(e,t,o){o.r(t),o.d(t,{$ZodAny:function(){return B},$ZodArray:function(){return Y},$ZodBase64:function(){return C},$ZodBase64URL:function(){return R},$ZodBigInt:function(){return U},$ZodBigIntFormat:function(){return q},$ZodBoolean:function(){return L},$ZodCIDRv4:function(){return I},$ZodCIDRv6:function(){return z},$ZodCUID:function(){return b},$ZodCUID2:function(){return k},$ZodCatch:function(){return _e},$ZodCustom:function(){return $e},$ZodCustomStringFormat:function(){return A},$ZodDate:function(){return G},$ZodDefault:function(){return me},$ZodDiscriminatedUnion:function(){return ee},$ZodE164:function(){return N},$ZodEmail:function(){return h},$ZodEmoji:function(){return y},$ZodEnum:function(){return ae},$ZodFile:function(){return de},$ZodGUID:function(){return p},$ZodIPv4:function(){return T},$ZodIPv6:function(){return E},$ZodISODate:function(){return S},$ZodISODateTime:function(){return x},$ZodISODuration:function(){return Z},$ZodISOTime:function(){return P},$ZodIntersection:function(){return te},$ZodJWT:function(){return O},$ZodKSUID:function(){return j},$ZodLazy:function(){return we},$ZodLiteral:function(){return ie},$ZodMap:function(){return re},$ZodNaN:function(){return ge},$ZodNanoID:function(){return v},$ZodNever:function(){return J},$ZodNonOptional:function(){return fe},$ZodNull:function(){return K},$ZodNullable:function(){return le},$ZodNumber:function(){return D},$ZodNumberFormat:function(){return M},$ZodObject:function(){return Q},$ZodOptional:function(){return ue},$ZodPipe:function(){return ye},$ZodPrefault:function(){return pe},$ZodPromise:function(){return ke},$ZodReadonly:function(){return ve},$ZodRecord:function(){return ne},$ZodSet:function(){return se},$ZodString:function(){return l},$ZodStringFormat:function(){return m},$ZodSuccess:function(){return he},$ZodSymbol:function(){return V},$ZodTemplateLiteral:function(){return be},$ZodTransform:function(){return ce},$ZodTuple:function(){return oe},$ZodType:function(){return u},$ZodULID:function(){return w},$ZodURL:function(){return g},$ZodUUID:function(){return f},$ZodUndefined:function(){return F},$ZodUnion:function(){return X},$ZodUnknown:function(){return H},$ZodVoid:function(){return W},$ZodXID:function(){return $},clone:function(){return d.clone},isValidBase64:function(){return isValidBase64},isValidBase64URL:function(){return isValidBase64URL},isValidJWT:function(){return isValidJWT}});var n=o("./node_modules/zod/v4/core/checks.js"),r=o("./node_modules/zod/v4/core/core.js"),s=o("./node_modules/zod/v4/core/doc.js"),a=o("./node_modules/zod/v4/core/parse.js"),i=o("./node_modules/zod/v4/core/regexes.js"),d=o("./node_modules/zod/v4/core/util.js"),c=o("./node_modules/zod/v4/core/versions.js");const u=r.$constructor("$ZodType",(e,t)=>{var o;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=c.version;const n=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&n.unshift(e);for(const t of n)for(const o of t._zod.onattach)o(e);if(0===n.length)(o=e._zod).deferred??(o.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{const runChecks=(e,t,o)=>{let n,s=d.aborted(e);for(const a of t){if(a._zod.def.when){if(!a._zod.def.when(e))continue}else if(s)continue;const t=e.issues.length,i=a._zod.check(e);if(i instanceof Promise&&!1===o?.async)throw new r.$ZodAsyncError;if(n||i instanceof Promise)n=(n??Promise.resolve()).then(async()=>{await i;e.issues.length!==t&&(s||(s=d.aborted(e,t)))});else{if(e.issues.length===t)continue;s||(s=d.aborted(e,t))}}return n?n.then(()=>e):e};e._zod.run=(t,o)=>{const s=e._zod.parse(t,o);if(s instanceof Promise){if(!1===o.async)throw new r.$ZodAsyncError;return s.then(e=>runChecks(e,n,o))}return runChecks(s,n,o)}}e["~standard"]={validate:t=>{try{const o=(0,a.safeParse)(e,t);return o.success?{value:o.data}:{issues:o.error?.issues}}catch(o){return(0,a.safeParseAsync)(e,t).then(e=>e.success?{value:e.data}:{issues:e.error?.issues})}},vendor:"zod",version:1}}),l=r.$constructor("$ZodString",(e,t)=>{u.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??i.string(e._zod.bag),e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=String(o.value)}catch(n){}return"string"==typeof o.value||o.issues.push({expected:"string",code:"invalid_type",input:o.value,inst:e}),o}}),m=r.$constructor("$ZodStringFormat",(e,t)=>{n.$ZodCheckStringFormat.init(e,t),l.init(e,t)}),p=r.$constructor("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=i.guid),m.init(e,t)}),f=r.$constructor("$ZodUUID",(e,t)=>{if(t.version){const e={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(void 0===e)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=i.uuid(e))}else t.pattern??(t.pattern=i.uuid());m.init(e,t)}),h=r.$constructor("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=i.email),m.init(e,t)}),g=r.$constructor("$ZodURL",(e,t)=>{m.init(e,t),e._zod.check=o=>{try{const n=o.value,r=new URL(n),s=r.href;return t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(r.hostname)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:i.hostname.source,input:o.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(r.protocol.endsWith(":")?r.protocol.slice(0,-1):r.protocol)||o.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:o.value,inst:e,continue:!t.abort})),void(!n.endsWith("/")&&s.endsWith("/")?o.value=s.slice(0,-1):o.value=s)}catch(n){o.issues.push({code:"invalid_format",format:"url",input:o.value,inst:e,continue:!t.abort})}}}),y=r.$constructor("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=i.emoji()),m.init(e,t)}),v=r.$constructor("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=i.nanoid),m.init(e,t)}),b=r.$constructor("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=i.cuid),m.init(e,t)}),k=r.$constructor("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=i.cuid2),m.init(e,t)}),w=r.$constructor("$ZodULID",(e,t)=>{t.pattern??(t.pattern=i.ulid),m.init(e,t)}),$=r.$constructor("$ZodXID",(e,t)=>{t.pattern??(t.pattern=i.xid),m.init(e,t)}),j=r.$constructor("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=i.ksuid),m.init(e,t)}),x=r.$constructor("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=i.datetime(t)),m.init(e,t)}),S=r.$constructor("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=i.date),m.init(e,t)}),P=r.$constructor("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=i.time(t)),m.init(e,t)}),Z=r.$constructor("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=i.duration),m.init(e,t)}),T=r.$constructor("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=i.ipv4),m.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv4"})}),E=r.$constructor("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=i.ipv6),m.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.format="ipv6"}),e._zod.check=o=>{try{new URL(`http://[${o.value}]`)}catch{o.issues.push({code:"invalid_format",format:"ipv6",input:o.value,inst:e,continue:!t.abort})}}}),I=r.$constructor("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=i.cidrv4),m.init(e,t)}),z=r.$constructor("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=i.cidrv6),m.init(e,t),e._zod.check=o=>{const[n,r]=o.value.split("/");try{if(!r)throw new Error;const e=Number(r);if(`${e}`!==r)throw new Error;if(e<0||e>128)throw new Error;new URL(`http://[${n}]`)}catch{o.issues.push({code:"invalid_format",format:"cidrv6",input:o.value,inst:e,continue:!t.abort})}}});function isValidBase64(e){if(""===e)return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}const C=r.$constructor("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=i.base64),m.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64"}),e._zod.check=o=>{isValidBase64(o.value)||o.issues.push({code:"invalid_format",format:"base64",input:o.value,inst:e,continue:!t.abort})}});function isValidBase64URL(e){if(!i.base64url.test(e))return!1;const t=e.replace(/[-_]/g,e=>"-"===e?"+":"/");return isValidBase64(t.padEnd(4*Math.ceil(t.length/4),"="))}const R=r.$constructor("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=i.base64url),m.init(e,t),e._zod.onattach.push(e=>{e._zod.bag.contentEncoding="base64url"}),e._zod.check=o=>{isValidBase64URL(o.value)||o.issues.push({code:"invalid_format",format:"base64url",input:o.value,inst:e,continue:!t.abort})}}),N=r.$constructor("$ZodE164",(e,t)=>{t.pattern??(t.pattern=i.e164),m.init(e,t)});function isValidJWT(e,t=null){try{const o=e.split(".");if(3!==o.length)return!1;const[n]=o;if(!n)return!1;const r=JSON.parse(atob(n));return(!("typ"in r)||"JWT"===r?.typ)&&(!!r.alg&&(!t||"alg"in r&&r.alg===t))}catch{return!1}}const O=r.$constructor("$ZodJWT",(e,t)=>{m.init(e,t),e._zod.check=o=>{isValidJWT(o.value,t.alg)||o.issues.push({code:"invalid_format",format:"jwt",input:o.value,inst:e,continue:!t.abort})}}),A=r.$constructor("$ZodCustomStringFormat",(e,t)=>{m.init(e,t),e._zod.check=o=>{t.fn(o.value)||o.issues.push({code:"invalid_format",format:t.format,input:o.value,inst:e,continue:!t.abort})}}),D=r.$constructor("$ZodNumber",(e,t)=>{u.init(e,t),e._zod.pattern=e._zod.bag.pattern??i.number,e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=Number(o.value)}catch(e){}const r=o.value;if("number"==typeof r&&!Number.isNaN(r)&&Number.isFinite(r))return o;const s="number"==typeof r?Number.isNaN(r)?"NaN":Number.isFinite(r)?void 0:"Infinity":void 0;return o.issues.push({expected:"number",code:"invalid_type",input:r,inst:e,...s?{received:s}:{}}),o}}),M=r.$constructor("$ZodNumber",(e,t)=>{n.$ZodCheckNumberFormat.init(e,t),D.init(e,t)}),L=r.$constructor("$ZodBoolean",(e,t)=>{u.init(e,t),e._zod.pattern=i.boolean,e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=Boolean(o.value)}catch(e){}const r=o.value;return"boolean"==typeof r||o.issues.push({expected:"boolean",code:"invalid_type",input:r,inst:e}),o}}),U=r.$constructor("$ZodBigInt",(e,t)=>{u.init(e,t),e._zod.pattern=i.bigint,e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=BigInt(o.value)}catch(e){}return"bigint"==typeof o.value||o.issues.push({expected:"bigint",code:"invalid_type",input:o.value,inst:e}),o}}),q=r.$constructor("$ZodBigInt",(e,t)=>{n.$ZodCheckBigIntFormat.init(e,t),U.init(e,t)}),V=r.$constructor("$ZodSymbol",(e,t)=>{u.init(e,t),e._zod.parse=(t,o)=>{const n=t.value;return"symbol"==typeof n||t.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),t}}),F=r.$constructor("$ZodUndefined",(e,t)=>{u.init(e,t),e._zod.pattern=i.undefined,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,o)=>{const n=t.value;return void 0===n||t.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),t}}),K=r.$constructor("$ZodNull",(e,t)=>{u.init(e,t),e._zod.pattern=i.null,e._zod.values=new Set([null]),e._zod.parse=(t,o)=>{const n=t.value;return null===n||t.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),t}}),B=r.$constructor("$ZodAny",(e,t)=>{u.init(e,t),e._zod.parse=e=>e}),H=r.$constructor("$ZodUnknown",(e,t)=>{u.init(e,t),e._zod.parse=e=>e}),J=r.$constructor("$ZodNever",(e,t)=>{u.init(e,t),e._zod.parse=(t,o)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),W=r.$constructor("$ZodVoid",(e,t)=>{u.init(e,t),e._zod.parse=(t,o)=>{const n=t.value;return void 0===n||t.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),t}}),G=r.$constructor("$ZodDate",(e,t)=>{u.init(e,t),e._zod.parse=(o,n)=>{if(t.coerce)try{o.value=new Date(o.value)}catch(e){}const r=o.value,s=r instanceof Date;return s&&!Number.isNaN(r.getTime())||o.issues.push({expected:"date",code:"invalid_type",input:r,...s?{received:"Invalid Date"}:{},inst:e}),o}});function handleArrayResult(e,t,o){e.issues.length&&t.issues.push(...d.prefixIssues(o,e.issues)),t.value[o]=e.value}const Y=r.$constructor("$ZodArray",(e,t)=>{u.init(e,t),e._zod.parse=(o,n)=>{const r=o.value;if(!Array.isArray(r))return o.issues.push({expected:"array",code:"invalid_type",input:r,inst:e}),o;o.value=Array(r.length);const s=[];for(let e=0;e<r.length;e++){const a=r[e],i=t.element._zod.run({value:a,issues:[]},n);i instanceof Promise?s.push(i.then(t=>handleArrayResult(t,o,e))):handleArrayResult(i,o,e)}return s.length?Promise.all(s).then(()=>o):o}});function handleObjectResult(e,t,o){e.issues.length&&t.issues.push(...d.prefixIssues(o,e.issues)),t.value[o]=e.value}function handleOptionalObjectResult(e,t,o,n){e.issues.length?void 0===n[o]?t.value[o]=o in n?void 0:e.value:t.issues.push(...d.prefixIssues(o,e.issues)):void 0===e.value?o in n&&(t.value[o]=void 0):t.value[o]=e.value}const Q=r.$constructor("$ZodObject",(e,t)=>{u.init(e,t);const o=d.cached(()=>{const e=Object.keys(t.shape);for(const o of e)if(!(t.shape[o]instanceof u))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);const o=d.optionalKeys(t.shape);return{shape:t.shape,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(o)}});d.defineLazy(e._zod,"propValues",()=>{const e=t.shape,o={};for(const t in e){const n=e[t]._zod;if(n.values){o[t]??(o[t]=new Set);for(const e of n.values)o[t].add(e)}}return o});let n;const a=d.isObject,i=!r.globalConfig.jitless,c=d.allowsEval,l=i&&c.value,m=t.catchall;let p;e._zod.parse=(r,c)=>{p??(p=o.value);const u=r.value;if(!a(u))return r.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),r;const f=[];if(i&&l&&!1===c?.async&&!0!==c.jitless)n||(n=(e=>{const t=new s.Doc(["shape","payload","ctx"]),n=o.value,parseStr=e=>{const t=d.esc(e);return`shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`};t.write("const input = payload.value;");const r=Object.create(null);let a=0;for(const e of n.keys)r[e]="key_"+a++;t.write("const newResult = {}");for(const e of n.keys)if(n.optionalKeys.has(e)){const o=r[e];t.write(`const ${o} = ${parseStr(e)};`);const n=d.esc(e);t.write(`\n        if (${o}.issues.length) {\n          if (input[${n}] === undefined) {\n            if (${n} in input) {\n              newResult[${n}] = undefined;\n            }\n          } else {\n            payload.issues = payload.issues.concat(\n              ${o}.issues.map((iss) => ({\n                ...iss,\n                path: iss.path ? [${n}, ...iss.path] : [${n}],\n              }))\n            );\n          }\n        } else if (${o}.value === undefined) {\n          if (${n} in input) newResult[${n}] = undefined;\n        } else {\n          newResult[${n}] = ${o}.value;\n        }\n        `)}else{const o=r[e];t.write(`const ${o} = ${parseStr(e)};`),t.write(`\n          if (${o}.issues.length) payload.issues = payload.issues.concat(${o}.issues.map(iss => ({\n            ...iss,\n            path: iss.path ? [${d.esc(e)}, ...iss.path] : [${d.esc(e)}]\n          })));`),t.write(`newResult[${d.esc(e)}] = ${o}.value`)}t.write("payload.value = newResult;"),t.write("return payload;");const i=t.compile();return(t,o)=>i(e,t,o)})(t.shape)),r=n(r,c);else{r.value={};const e=p.shape;for(const t of p.keys){const o=e[t],n=o._zod.run({value:u[t],issues:[]},c),s="optional"===o._zod.optin&&"optional"===o._zod.optout;n instanceof Promise?f.push(n.then(e=>s?handleOptionalObjectResult(e,r,t,u):handleObjectResult(e,r,t))):s?handleOptionalObjectResult(n,r,t,u):handleObjectResult(n,r,t)}}if(!m)return f.length?Promise.all(f).then(()=>r):r;const h=[],g=p.keySet,y=m._zod,v=y.def.type;for(const e of Object.keys(u)){if(g.has(e))continue;if("never"===v){h.push(e);continue}const t=y.run({value:u[e],issues:[]},c);t instanceof Promise?f.push(t.then(t=>handleObjectResult(t,r,e))):handleObjectResult(t,r,e)}return h.length&&r.issues.push({code:"unrecognized_keys",keys:h,input:u,inst:e}),f.length?Promise.all(f).then(()=>r):r}});function handleUnionResults(e,t,o,n){for(const o of e)if(0===o.issues.length)return t.value=o.value,t;return t.issues.push({code:"invalid_union",input:t.value,inst:o,errors:e.map(e=>e.issues.map(e=>d.finalizeIssue(e,n,r.config())))}),t}const X=r.$constructor("$ZodUnion",(e,t)=>{u.init(e,t),d.defineLazy(e._zod,"optin",()=>t.options.some(e=>"optional"===e._zod.optin)?"optional":void 0),d.defineLazy(e._zod,"optout",()=>t.options.some(e=>"optional"===e._zod.optout)?"optional":void 0),d.defineLazy(e._zod,"values",()=>{if(t.options.every(e=>e._zod.values))return new Set(t.options.flatMap(e=>Array.from(e._zod.values)))}),d.defineLazy(e._zod,"pattern",()=>{if(t.options.every(e=>e._zod.pattern)){const e=t.options.map(e=>e._zod.pattern);return new RegExp(`^(${e.map(e=>d.cleanRegex(e.source)).join("|")})$`)}}),e._zod.parse=(o,n)=>{let r=!1;const s=[];for(const e of t.options){const t=e._zod.run({value:o.value,issues:[]},n);if(t instanceof Promise)s.push(t),r=!0;else{if(0===t.issues.length)return t;s.push(t)}}return r?Promise.all(s).then(t=>handleUnionResults(t,o,e,n)):handleUnionResults(s,o,e,n)}}),ee=r.$constructor("$ZodDiscriminatedUnion",(e,t)=>{X.init(e,t);const o=e._zod.parse;d.defineLazy(e._zod,"propValues",()=>{const e={};for(const o of t.options){const n=o._zod.propValues;if(!n||0===Object.keys(n).length)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(const[t,o]of Object.entries(n)){e[t]||(e[t]=new Set);for(const n of o)e[t].add(n)}}return e});const n=d.cached(()=>{const e=t.options,o=new Map;for(const n of e){const e=n._zod.propValues[t.discriminator];if(!e||0===e.size)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);for(const t of e){if(o.has(t))throw new Error(`Duplicate discriminator value "${String(t)}"`);o.set(t,n)}}return o});e._zod.parse=(r,s)=>{const a=r.value;if(!d.isObject(a))return r.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),r;const i=n.value.get(a?.[t.discriminator]);return i?i._zod.run(r,s):t.unionFallback?o(r,s):(r.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",input:a,path:[t.discriminator],inst:e}),r)}}),te=r.$constructor("$ZodIntersection",(e,t)=>{u.init(e,t),e._zod.parse=(e,o)=>{const n=e.value,r=t.left._zod.run({value:n,issues:[]},o),s=t.right._zod.run({value:n,issues:[]},o);return r instanceof Promise||s instanceof Promise?Promise.all([r,s]).then(([t,o])=>handleIntersectionResults(e,t,o)):handleIntersectionResults(e,r,s)}});function mergeValues(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e===+t)return{valid:!0,data:e};if(d.isPlainObject(e)&&d.isPlainObject(t)){const o=Object.keys(t),n=Object.keys(e).filter(e=>-1!==o.indexOf(e)),r={...e,...t};for(const o of n){const n=mergeValues(e[o],t[o]);if(!n.valid)return{valid:!1,mergeErrorPath:[o,...n.mergeErrorPath]};r[o]=n.data}return{valid:!0,data:r}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};const o=[];for(let n=0;n<e.length;n++){const r=mergeValues(e[n],t[n]);if(!r.valid)return{valid:!1,mergeErrorPath:[n,...r.mergeErrorPath]};o.push(r.data)}return{valid:!0,data:o}}return{valid:!1,mergeErrorPath:[]}}function handleIntersectionResults(e,t,o){if(t.issues.length&&e.issues.push(...t.issues),o.issues.length&&e.issues.push(...o.issues),d.aborted(e))return e;const n=mergeValues(t.value,o.value);if(!n.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(n.mergeErrorPath)}`);return e.value=n.data,e}const oe=r.$constructor("$ZodTuple",(e,t)=>{u.init(e,t);const o=t.items,n=o.length-[...o].reverse().findIndex(e=>"optional"!==e._zod.optin);e._zod.parse=(r,s)=>{const a=r.value;if(!Array.isArray(a))return r.issues.push({input:a,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];const i=[];if(!t.rest){const t=a.length>o.length,s=a.length<n-1;if(t||s)return r.issues.push({input:a,inst:e,origin:"array",...t?{code:"too_big",maximum:o.length}:{code:"too_small",minimum:o.length}}),r}let d=-1;for(const e of o){if(d++,d>=a.length&&d>=n)continue;const t=e._zod.run({value:a[d],issues:[]},s);t instanceof Promise?i.push(t.then(e=>handleTupleResult(e,r,d))):handleTupleResult(t,r,d)}if(t.rest){const e=a.slice(o.length);for(const o of e){d++;const e=t.rest._zod.run({value:o,issues:[]},s);e instanceof Promise?i.push(e.then(e=>handleTupleResult(e,r,d))):handleTupleResult(e,r,d)}}return i.length?Promise.all(i).then(()=>r):r}});function handleTupleResult(e,t,o){e.issues.length&&t.issues.push(...d.prefixIssues(o,e.issues)),t.value[o]=e.value}const ne=r.$constructor("$ZodRecord",(e,t)=>{u.init(e,t),e._zod.parse=(o,n)=>{const s=o.value;if(!d.isPlainObject(s))return o.issues.push({expected:"record",code:"invalid_type",input:s,inst:e}),o;const a=[];if(t.keyType._zod.values){const r=t.keyType._zod.values;o.value={};for(const e of r)if("string"==typeof e||"number"==typeof e||"symbol"==typeof e){const r=t.valueType._zod.run({value:s[e],issues:[]},n);r instanceof Promise?a.push(r.then(t=>{t.issues.length&&o.issues.push(...d.prefixIssues(e,t.issues)),o.value[e]=t.value})):(r.issues.length&&o.issues.push(...d.prefixIssues(e,r.issues)),o.value[e]=r.value)}let i;for(const e in s)r.has(e)||(i=i??[],i.push(e));i&&i.length>0&&o.issues.push({code:"unrecognized_keys",input:s,inst:e,keys:i})}else{o.value={};for(const i of Reflect.ownKeys(s)){if("__proto__"===i)continue;const c=t.keyType._zod.run({value:i,issues:[]},n);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(c.issues.length){o.issues.push({origin:"record",code:"invalid_key",issues:c.issues.map(e=>d.finalizeIssue(e,n,r.config())),input:i,path:[i],inst:e}),o.value[c.value]=c.value;continue}const u=t.valueType._zod.run({value:s[i],issues:[]},n);u instanceof Promise?a.push(u.then(e=>{e.issues.length&&o.issues.push(...d.prefixIssues(i,e.issues)),o.value[c.value]=e.value})):(u.issues.length&&o.issues.push(...d.prefixIssues(i,u.issues)),o.value[c.value]=u.value)}}return a.length?Promise.all(a).then(()=>o):o}}),re=r.$constructor("$ZodMap",(e,t)=>{u.init(e,t),e._zod.parse=(o,n)=>{const r=o.value;if(!(r instanceof Map))return o.issues.push({expected:"map",code:"invalid_type",input:r,inst:e}),o;const s=[];o.value=new Map;for(const[a,i]of r){const d=t.keyType._zod.run({value:a,issues:[]},n),c=t.valueType._zod.run({value:i,issues:[]},n);d instanceof Promise||c instanceof Promise?s.push(Promise.all([d,c]).then(([t,s])=>{handleMapResult(t,s,o,a,r,e,n)})):handleMapResult(d,c,o,a,r,e,n)}return s.length?Promise.all(s).then(()=>o):o}});function handleMapResult(e,t,o,n,s,a,i){e.issues.length&&(d.propertyKeyTypes.has(typeof n)?o.issues.push(...d.prefixIssues(n,e.issues)):o.issues.push({origin:"map",code:"invalid_key",input:s,inst:a,issues:e.issues.map(e=>d.finalizeIssue(e,i,r.config()))})),t.issues.length&&(d.propertyKeyTypes.has(typeof n)?o.issues.push(...d.prefixIssues(n,t.issues)):o.issues.push({origin:"map",code:"invalid_element",input:s,inst:a,key:n,issues:t.issues.map(e=>d.finalizeIssue(e,i,r.config()))})),o.value.set(e.value,t.value)}const se=r.$constructor("$ZodSet",(e,t)=>{u.init(e,t),e._zod.parse=(o,n)=>{const r=o.value;if(!(r instanceof Set))return o.issues.push({input:r,inst:e,expected:"set",code:"invalid_type"}),o;const s=[];o.value=new Set;for(const e of r){const r=t.valueType._zod.run({value:e,issues:[]},n);r instanceof Promise?s.push(r.then(e=>handleSetResult(e,o))):handleSetResult(r,o)}return s.length?Promise.all(s).then(()=>o):o}});function handleSetResult(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}const ae=r.$constructor("$ZodEnum",(e,t)=>{u.init(e,t);const o=d.getEnumValues(t.entries);e._zod.values=new Set(o),e._zod.pattern=new RegExp(`^(${o.filter(e=>d.propertyKeyTypes.has(typeof e)).map(e=>"string"==typeof e?d.escapeRegex(e):e.toString()).join("|")})$`),e._zod.parse=(t,n)=>{const r=t.value;return e._zod.values.has(r)||t.issues.push({code:"invalid_value",values:o,input:r,inst:e}),t}}),ie=r.$constructor("$ZodLiteral",(e,t)=>{u.init(e,t),e._zod.values=new Set(t.values),e._zod.pattern=new RegExp(`^(${t.values.map(e=>"string"==typeof e?d.escapeRegex(e):e?e.toString():String(e)).join("|")})$`),e._zod.parse=(o,n)=>{const r=o.value;return e._zod.values.has(r)||o.issues.push({code:"invalid_value",values:t.values,input:r,inst:e}),o}}),de=r.$constructor("$ZodFile",(e,t)=>{u.init(e,t),e._zod.parse=(t,o)=>{const n=t.value;return n instanceof File||t.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),t}}),ce=r.$constructor("$ZodTransform",(e,t)=>{u.init(e,t),e._zod.parse=(e,o)=>{const n=t.transform(e.value,e);if(o.async){return(n instanceof Promise?n:Promise.resolve(n)).then(t=>(e.value=t,e))}if(n instanceof Promise)throw new r.$ZodAsyncError;return e.value=n,e}}),ue=r.$constructor("$ZodOptional",(e,t)=>{u.init(e,t),e._zod.optin="optional",e._zod.optout="optional",d.defineLazy(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),d.defineLazy(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${d.cleanRegex(e.source)})?$`):void 0}),e._zod.parse=(e,o)=>"optional"===t.innerType._zod.optin?t.innerType._zod.run(e,o):void 0===e.value?e:t.innerType._zod.run(e,o)}),le=r.$constructor("$ZodNullable",(e,t)=>{u.init(e,t),d.defineLazy(e._zod,"optin",()=>t.innerType._zod.optin),d.defineLazy(e._zod,"optout",()=>t.innerType._zod.optout),d.defineLazy(e._zod,"pattern",()=>{const e=t.innerType._zod.pattern;return e?new RegExp(`^(${d.cleanRegex(e.source)}|null)$`):void 0}),d.defineLazy(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(e,o)=>null===e.value?e:t.innerType._zod.run(e,o)}),me=r.$constructor("$ZodDefault",(e,t)=>{u.init(e,t),e._zod.optin="optional",d.defineLazy(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,o)=>{if(void 0===e.value)return e.value=t.defaultValue,e;const n=t.innerType._zod.run(e,o);return n instanceof Promise?n.then(e=>handleDefaultResult(e,t)):handleDefaultResult(n,t)}});function handleDefaultResult(e,t){return void 0===e.value&&(e.value=t.defaultValue),e}const pe=r.$constructor("$ZodPrefault",(e,t)=>{u.init(e,t),e._zod.optin="optional",d.defineLazy(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,o)=>(void 0===e.value&&(e.value=t.defaultValue),t.innerType._zod.run(e,o))}),fe=r.$constructor("$ZodNonOptional",(e,t)=>{u.init(e,t),d.defineLazy(e._zod,"values",()=>{const e=t.innerType._zod.values;return e?new Set([...e].filter(e=>void 0!==e)):void 0}),e._zod.parse=(o,n)=>{const r=t.innerType._zod.run(o,n);return r instanceof Promise?r.then(t=>handleNonOptionalResult(t,e)):handleNonOptionalResult(r,e)}});function handleNonOptionalResult(e,t){return e.issues.length||void 0!==e.value||e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}const he=r.$constructor("$ZodSuccess",(e,t)=>{u.init(e,t),e._zod.parse=(e,o)=>{const n=t.innerType._zod.run(e,o);return n instanceof Promise?n.then(t=>(e.value=0===t.issues.length,e)):(e.value=0===n.issues.length,e)}}),_e=r.$constructor("$ZodCatch",(e,t)=>{u.init(e,t),e._zod.optin="optional",d.defineLazy(e._zod,"optout",()=>t.innerType._zod.optout),d.defineLazy(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(e,o)=>{const n=t.innerType._zod.run(e,o);return n instanceof Promise?n.then(n=>(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map(e=>d.finalizeIssue(e,o,r.config()))},input:e.value}),e.issues=[]),e)):(e.value=n.value,n.issues.length&&(e.value=t.catchValue({...e,error:{issues:n.issues.map(e=>d.finalizeIssue(e,o,r.config()))},input:e.value}),e.issues=[]),e)}}),ge=r.$constructor("$ZodNaN",(e,t)=>{u.init(e,t),e._zod.parse=(t,o)=>("number"==typeof t.value&&Number.isNaN(t.value)||t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t)}),ye=r.$constructor("$ZodPipe",(e,t)=>{u.init(e,t),d.defineLazy(e._zod,"values",()=>t.in._zod.values),d.defineLazy(e._zod,"optin",()=>t.in._zod.optin),d.defineLazy(e._zod,"optout",()=>t.out._zod.optout),e._zod.parse=(e,o)=>{const n=t.in._zod.run(e,o);return n instanceof Promise?n.then(e=>handlePipeResult(e,t,o)):handlePipeResult(n,t,o)}});function handlePipeResult(e,t,o){return d.aborted(e)?e:t.out._zod.run({value:e.value,issues:e.issues},o)}const ve=r.$constructor("$ZodReadonly",(e,t)=>{u.init(e,t),d.defineLazy(e._zod,"propValues",()=>t.innerType._zod.propValues),d.defineLazy(e._zod,"values",()=>t.innerType._zod.values),d.defineLazy(e._zod,"optin",()=>t.innerType._zod.optin),d.defineLazy(e._zod,"optout",()=>t.innerType._zod.optout),e._zod.parse=(e,o)=>{const n=t.innerType._zod.run(e,o);return n instanceof Promise?n.then(handleReadonlyResult):handleReadonlyResult(n)}});function handleReadonlyResult(e){return e.value=Object.freeze(e.value),e}const be=r.$constructor("$ZodTemplateLiteral",(e,t)=>{u.init(e,t);const o=[];for(const e of t.parts)if(e instanceof u){if(!e._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...e._zod.traits].shift()}`);const t=e._zod.pattern instanceof RegExp?e._zod.pattern.source:e._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${e._zod.traits}`);const n=t.startsWith("^")?1:0,r=t.endsWith("$")?t.length-1:t.length;o.push(t.slice(n,r))}else{if(null!==e&&!d.primitiveTypes.has(typeof e))throw new Error(`Invalid template literal part: ${e}`);o.push(d.escapeRegex(`${e}`))}e._zod.pattern=new RegExp(`^${o.join("")}$`),e._zod.parse=(t,o)=>"string"!=typeof t.value?(t.issues.push({input:t.value,inst:e,expected:"template_literal",code:"invalid_type"}),t):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(t.value)||t.issues.push({input:t.value,inst:e,code:"invalid_format",format:"template_literal",pattern:e._zod.pattern.source}),t)}),ke=r.$constructor("$ZodPromise",(e,t)=>{u.init(e,t),e._zod.parse=(e,o)=>Promise.resolve(e.value).then(e=>t.innerType._zod.run({value:e,issues:[]},o))}),we=r.$constructor("$ZodLazy",(e,t)=>{u.init(e,t),d.defineLazy(e._zod,"innerType",()=>t.getter()),d.defineLazy(e._zod,"pattern",()=>e._zod.innerType._zod.pattern),d.defineLazy(e._zod,"propValues",()=>e._zod.innerType._zod.propValues),d.defineLazy(e._zod,"optin",()=>e._zod.innerType._zod.optin),d.defineLazy(e._zod,"optout",()=>e._zod.innerType._zod.optout),e._zod.parse=(t,o)=>e._zod.innerType._zod.run(t,o)}),$e=r.$constructor("$ZodCustom",(e,t)=>{n.$ZodCheck.init(e,t),u.init(e,t),e._zod.parse=(e,t)=>e,e._zod.check=o=>{const n=o.value,r=t.fn(n);if(r instanceof Promise)return r.then(t=>handleRefineResult(t,o,n,e));handleRefineResult(r,o,n,e)}});function handleRefineResult(e,t,o,n){if(!e){const e={code:"custom",input:o,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(e.params=n._zod.def.params),t.issues.push(d.issue(e))}}},"./node_modules/zod/v4/core/to-json-schema.js":function(e,t,o){o.r(t),o.d(t,{JSONSchemaGenerator:function(){return JSONSchemaGenerator},toJSONSchema:function(){return toJSONSchema}});var n=o("./node_modules/zod/v4/core/registries.js"),r=o("./node_modules/zod/v4/core/util.js");class JSONSchemaGenerator{constructor(e){this.counter=0,this.metadataRegistry=e?.metadata??n.globalRegistry,this.target=e?.target??"draft-2020-12",this.unrepresentable=e?.unrepresentable??"throw",this.override=e?.override??(()=>{}),this.io=e?.io??"output",this.seen=new Map}process(e,t={path:[],schemaPath:[]}){var o;const n=e._zod.def,s={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},a=this.seen.get(e);if(a){a.count++;return t.schemaPath.includes(e)&&(a.cycle=t.path),a.schema}const i={schema:{},count:1,cycle:void 0,path:t.path};this.seen.set(e,i);const d=e._zod.toJSONSchema?.();if(d)i.schema=d;else{const o={...t,schemaPath:[...t.schemaPath,e],path:t.path},a=e._zod.parent;if(a)i.ref=a,this.process(a,o),this.seen.get(a).isParent=!0;else{const t=i.schema;switch(n.type){case"string":{const o=t;o.type="string";const{minimum:n,maximum:r,format:a,patterns:d,contentEncoding:c}=e._zod.bag;if("number"==typeof n&&(o.minLength=n),"number"==typeof r&&(o.maxLength=r),a&&(o.format=s[a]??a,""===o.format&&delete o.format),c&&(o.contentEncoding=c),d&&d.size>0){const e=[...d];1===e.length?o.pattern=e[0].source:e.length>1&&(i.schema.allOf=[...e.map(e=>({..."draft-7"===this.target?{type:"string"}:{},pattern:e.source}))])}break}case"number":{const o=t,{minimum:n,maximum:r,format:s,multipleOf:a,exclusiveMaximum:i,exclusiveMinimum:d}=e._zod.bag;"string"==typeof s&&s.includes("int")?o.type="integer":o.type="number","number"==typeof d&&(o.exclusiveMinimum=d),"number"==typeof n&&(o.minimum=n,"number"==typeof d&&(d>=n?delete o.minimum:delete o.exclusiveMinimum)),"number"==typeof i&&(o.exclusiveMaximum=i),"number"==typeof r&&(o.maximum=r,"number"==typeof i&&(i<=r?delete o.maximum:delete o.exclusiveMaximum)),"number"==typeof a&&(o.multipleOf=a);break}case"boolean":t.type="boolean";break;case"bigint":if("throw"===this.unrepresentable)throw new Error("BigInt cannot be represented in JSON Schema");break;case"symbol":if("throw"===this.unrepresentable)throw new Error("Symbols cannot be represented in JSON Schema");break;case"null":t.type="null";break;case"any":case"unknown":break;case"undefined":if("throw"===this.unrepresentable)throw new Error("Undefined cannot be represented in JSON Schema");break;case"void":if("throw"===this.unrepresentable)throw new Error("Void cannot be represented in JSON Schema");break;case"never":t.not={};break;case"date":if("throw"===this.unrepresentable)throw new Error("Date cannot be represented in JSON Schema");break;case"array":{const r=t,{minimum:s,maximum:a}=e._zod.bag;"number"==typeof s&&(r.minItems=s),"number"==typeof a&&(r.maxItems=a),r.type="array",r.items=this.process(n.element,{...o,path:[...o.path,"items"]});break}case"object":{const e=t;e.type="object",e.properties={};const r=n.shape;for(const t in r)e.properties[t]=this.process(r[t],{...o,path:[...o.path,"properties",t]});const s=new Set(Object.keys(r)),a=new Set([...s].filter(e=>{const t=n.shape[e]._zod;return"input"===this.io?void 0===t.optin:void 0===t.optout}));a.size>0&&(e.required=Array.from(a)),"never"===n.catchall?._zod.def.type?e.additionalProperties=!1:n.catchall?n.catchall&&(e.additionalProperties=this.process(n.catchall,{...o,path:[...o.path,"additionalProperties"]})):"output"===this.io&&(e.additionalProperties=!1);break}case"union":t.anyOf=n.options.map((e,t)=>this.process(e,{...o,path:[...o.path,"anyOf",t]}));break;case"intersection":{const e=t,r=this.process(n.left,{...o,path:[...o.path,"allOf",0]}),s=this.process(n.right,{...o,path:[...o.path,"allOf",1]}),isSimpleIntersection=e=>"allOf"in e&&1===Object.keys(e).length,a=[...isSimpleIntersection(r)?r.allOf:[r],...isSimpleIntersection(s)?s.allOf:[s]];e.allOf=a;break}case"tuple":{const r=t;r.type="array";const s=n.items.map((e,t)=>this.process(e,{...o,path:[...o.path,"prefixItems",t]}));if("draft-2020-12"===this.target?r.prefixItems=s:r.items=s,n.rest){const e=this.process(n.rest,{...o,path:[...o.path,"items"]});"draft-2020-12"===this.target?r.items=e:r.additionalItems=e}n.rest&&(r.items=this.process(n.rest,{...o,path:[...o.path,"items"]}));const{minimum:a,maximum:i}=e._zod.bag;"number"==typeof a&&(r.minItems=a),"number"==typeof i&&(r.maxItems=i);break}case"record":{const e=t;e.type="object",e.propertyNames=this.process(n.keyType,{...o,path:[...o.path,"propertyNames"]}),e.additionalProperties=this.process(n.valueType,{...o,path:[...o.path,"additionalProperties"]});break}case"map":if("throw"===this.unrepresentable)throw new Error("Map cannot be represented in JSON Schema");break;case"set":if("throw"===this.unrepresentable)throw new Error("Set cannot be represented in JSON Schema");break;case"enum":{const e=t,o=(0,r.getEnumValues)(n.entries);o.every(e=>"number"==typeof e)&&(e.type="number"),o.every(e=>"string"==typeof e)&&(e.type="string"),e.enum=o;break}case"literal":{const e=t,o=[];for(const e of n.values)if(void 0===e){if("throw"===this.unrepresentable)throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if("bigint"==typeof e){if("throw"===this.unrepresentable)throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(e))}else o.push(e);if(0===o.length);else if(1===o.length){const t=o[0];e.type=null===t?"null":typeof t,e.const=t}else o.every(e=>"number"==typeof e)&&(e.type="number"),o.every(e=>"string"==typeof e)&&(e.type="string"),o.every(e=>"boolean"==typeof e)&&(e.type="string"),o.every(e=>null===e)&&(e.type="null"),e.enum=o;break}case"file":{const o=t,n={type:"string",format:"binary",contentEncoding:"binary"},{minimum:r,maximum:s,mime:a}=e._zod.bag;void 0!==r&&(n.minLength=r),void 0!==s&&(n.maxLength=s),a?1===a.length?(n.contentMediaType=a[0],Object.assign(o,n)):o.anyOf=a.map(e=>({...n,contentMediaType:e})):Object.assign(o,n);break}case"transform":if("throw"===this.unrepresentable)throw new Error("Transforms cannot be represented in JSON Schema");break;case"nullable":{const e=this.process(n.innerType,o);t.anyOf=[e,{type:"null"}];break}case"nonoptional":case"promise":case"optional":this.process(n.innerType,o),i.ref=n.innerType;break;case"success":t.type="boolean";break;case"default":this.process(n.innerType,o),i.ref=n.innerType,t.default=JSON.parse(JSON.stringify(n.defaultValue));break;case"prefault":this.process(n.innerType,o),i.ref=n.innerType,"input"===this.io&&(t._prefault=JSON.parse(JSON.stringify(n.defaultValue)));break;case"catch":{let e;this.process(n.innerType,o),i.ref=n.innerType;try{e=n.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}t.default=e;break}case"nan":if("throw"===this.unrepresentable)throw new Error("NaN cannot be represented in JSON Schema");break;case"template_literal":{const o=t,n=e._zod.pattern;if(!n)throw new Error("Pattern not found in template literal");o.type="string",o.pattern=n.source;break}case"pipe":{const e="input"===this.io?"transform"===n.in._zod.def.type?n.out:n.in:n.out;this.process(e,o),i.ref=e;break}case"readonly":this.process(n.innerType,o),i.ref=n.innerType,t.readOnly=!0;break;case"lazy":{const t=e._zod.innerType;this.process(t,o),i.ref=t;break}case"custom":if("throw"===this.unrepresentable)throw new Error("Custom types cannot be represented in JSON Schema")}}}const c=this.metadataRegistry.get(e);c&&Object.assign(i.schema,c),"input"===this.io&&isTransforming(e)&&(delete i.schema.examples,delete i.schema.default),"input"===this.io&&i.schema._prefault&&((o=i.schema).default??(o.default=i.schema._prefault)),delete i.schema._prefault;return this.seen.get(e).schema}emit(e,t){const o={cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0},n=this.seen.get(e);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");const makeURI=e=>{const t="draft-2020-12"===this.target?"$defs":"definitions";if(o.external){const n=o.external.registry.get(e[0])?.id,r=o.external.uri??(e=>e);if(n)return{ref:r(n)};const s=e[1].defId??e[1].schema.id??"schema"+this.counter++;return e[1].defId=s,{defId:s,ref:`${r("__shared")}#/${t}/${s}`}}if(e[1]===n)return{ref:"#"};const r=`#/${t}/`,s=e[1].schema.id??"__schema"+this.counter++;return{defId:s,ref:r+s}},extractToDef=e=>{if(e[1].schema.$ref)return;const t=e[1],{ref:o,defId:n}=makeURI(e);t.def={...t.schema},n&&(t.defId=n);const r=t.schema;for(const e in r)delete r[e];r.$ref=o};if("throw"===o.cycles)for(const e of this.seen.entries()){const t=e[1];if(t.cycle)throw new Error(`Cycle detected: #/${t.cycle?.join("/")}/<root>\n\nSet the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const t of this.seen.entries()){const n=t[1];if(e===t[0]){extractToDef(t);continue}if(o.external){const n=o.external.registry.get(t[0])?.id;if(e!==t[0]&&n){extractToDef(t);continue}}const r=this.metadataRegistry.get(t[0])?.id;r?extractToDef(t):(n.cycle||n.count>1&&"ref"===o.reused)&&extractToDef(t)}const flattenRef=(e,t)=>{const o=this.seen.get(e),n=o.def??o.schema,r={...n};if(null===o.ref)return;const s=o.ref;if(o.ref=null,s){flattenRef(s,t);const e=this.seen.get(s).schema;e.$ref&&"draft-7"===t.target?(n.allOf=n.allOf??[],n.allOf.push(e)):(Object.assign(n,e),Object.assign(n,r))}o.isParent||this.override({zodSchema:e,jsonSchema:n,path:o.path??[]})};for(const e of[...this.seen.entries()].reverse())flattenRef(e[0],{target:this.target});const r={};if("draft-2020-12"===this.target?r.$schema="https://json-schema.org/draft/2020-12/schema":"draft-7"===this.target?r.$schema="http://json-schema.org/draft-07/schema#":console.warn(`Invalid target: ${this.target}`),o.external?.uri){const t=o.external.registry.get(e)?.id;if(!t)throw new Error("Schema is missing an `id` property");r.$id=o.external.uri(t)}Object.assign(r,n.def);const s=o.external?.defs??{};for(const e of this.seen.entries()){const t=e[1];t.def&&t.defId&&(s[t.defId]=t.def)}o.external||Object.keys(s).length>0&&("draft-2020-12"===this.target?r.$defs=s:r.definitions=s);try{return JSON.parse(JSON.stringify(r))}catch(e){throw new Error("Error converting schema to JSON.")}}}function toJSONSchema(e,t){if(e instanceof n.$ZodRegistry){const o=new JSONSchemaGenerator(t),n={};for(const t of e._idmap.entries()){const[e,n]=t;o.process(n)}const r={},s={registry:e,uri:t?.uri,defs:n};for(const n of e._idmap.entries()){const[e,a]=n;r[e]=o.emit(a,{...t,external:s})}if(Object.keys(n).length>0){const e="draft-2020-12"===o.target?"$defs":"definitions";r.__shared={[e]:n}}return{schemas:r}}const o=new JSONSchemaGenerator(t);return o.process(e),o.emit(e,t)}function isTransforming(e,t){const o=t??{seen:new Set};if(o.seen.has(e))return!1;o.seen.add(e);const n=e._zod.def;switch(n.type){case"string":case"number":case"bigint":case"boolean":case"date":case"symbol":case"undefined":case"null":case"any":case"unknown":case"never":case"void":case"literal":case"enum":case"nan":case"file":case"template_literal":case"custom":case"success":case"catch":return!1;case"array":return isTransforming(n.element,o);case"object":for(const e in n.shape)if(isTransforming(n.shape[e],o))return!0;return!1;case"union":for(const e of n.options)if(isTransforming(e,o))return!0;return!1;case"intersection":return isTransforming(n.left,o)||isTransforming(n.right,o);case"tuple":for(const e of n.items)if(isTransforming(e,o))return!0;return!(!n.rest||!isTransforming(n.rest,o));case"record":case"map":return isTransforming(n.keyType,o)||isTransforming(n.valueType,o);case"set":return isTransforming(n.valueType,o);case"promise":case"optional":case"nonoptional":case"nullable":case"readonly":case"default":case"prefault":return isTransforming(n.innerType,o);case"lazy":return isTransforming(n.getter(),o);case"transform":return!0;case"pipe":return isTransforming(n.in,o)||isTransforming(n.out,o)}throw new Error(`Unknown schema type: ${n.type}`)}},"./node_modules/zod/v4/core/util.js":function(e,t,o){function assertEqual(e){return e}function assertNotEqual(e){return e}function assertIs(e){}function assertNever(e){throw new Error}function assert(e){}function getEnumValues(e){const t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,o])=>-1===t.indexOf(+e)).map(([e,t])=>t)}function joinValues(e,t="|"){return e.map(e=>stringifyPrimitive(e)).join(t)}function jsonStringifyReplacer(e,t){return"bigint"==typeof t?t.toString():t}function cached(e){return{get value(){{const t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function nullish(e){return null==e}function cleanRegex(e){const t=e.startsWith("^")?1:0,o=e.endsWith("$")?e.length-1:e.length;return e.slice(t,o)}function floatSafeRemainder(e,t){const o=(e.toString().split(".")[1]||"").length,n=(t.toString().split(".")[1]||"").length,r=o>n?o:n;return Number.parseInt(e.toFixed(r).replace(".",""))%Number.parseInt(t.toFixed(r).replace(".",""))/10**r}function defineLazy(e,t,o){Object.defineProperty(e,t,{get(){{const n=o();return e[t]=n,n}},set(o){Object.defineProperty(e,t,{value:o})},configurable:!0})}function assignProp(e,t,o){Object.defineProperty(e,t,{value:o,writable:!0,enumerable:!0,configurable:!0})}function getElementAtPath(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function promiseAllObject(e){const t=Object.keys(e),o=t.map(t=>e[t]);return Promise.all(o).then(e=>{const o={};for(let n=0;n<t.length;n++)o[t[n]]=e[n];return o})}function randomString(e=10){const t="abcdefghijklmnopqrstuvwxyz";let o="";for(let n=0;n<e;n++)o+=t[Math.floor(26*Math.random())];return o}function esc(e){return JSON.stringify(e)}o.r(t),o.d(t,{BIGINT_FORMAT_RANGES:function(){return d},Class:function(){return Class},NUMBER_FORMAT_RANGES:function(){return i},aborted:function(){return aborted},allowsEval:function(){return r},assert:function(){return assert},assertEqual:function(){return assertEqual},assertIs:function(){return assertIs},assertNever:function(){return assertNever},assertNotEqual:function(){return assertNotEqual},assignProp:function(){return assignProp},cached:function(){return cached},captureStackTrace:function(){return n},cleanEnum:function(){return cleanEnum},cleanRegex:function(){return cleanRegex},clone:function(){return clone},createTransparentProxy:function(){return createTransparentProxy},defineLazy:function(){return defineLazy},esc:function(){return esc},escapeRegex:function(){return escapeRegex},extend:function(){return extend},finalizeIssue:function(){return finalizeIssue},floatSafeRemainder:function(){return floatSafeRemainder},getElementAtPath:function(){return getElementAtPath},getEnumValues:function(){return getEnumValues},getLengthableOrigin:function(){return getLengthableOrigin},getParsedType:function(){return getParsedType},getSizableOrigin:function(){return getSizableOrigin},isObject:function(){return isObject},isPlainObject:function(){return isPlainObject},issue:function(){return issue},joinValues:function(){return joinValues},jsonStringifyReplacer:function(){return jsonStringifyReplacer},merge:function(){return merge},normalizeParams:function(){return normalizeParams},nullish:function(){return nullish},numKeys:function(){return numKeys},omit:function(){return omit},optionalKeys:function(){return optionalKeys},partial:function(){return partial},pick:function(){return pick},prefixIssues:function(){return prefixIssues},primitiveTypes:function(){return a},promiseAllObject:function(){return promiseAllObject},propertyKeyTypes:function(){return s},randomString:function(){return randomString},required:function(){return required},stringifyPrimitive:function(){return stringifyPrimitive},unwrapMessage:function(){return unwrapMessage}});const n=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function isObject(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}const r=cached(()=>{if("undefined"!=typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function isPlainObject(e){if(!1===isObject(e))return!1;const t=e.constructor;if(void 0===t)return!0;const o=t.prototype;return!1!==isObject(o)&&!1!==Object.prototype.hasOwnProperty.call(o,"isPrototypeOf")}function numKeys(e){let t=0;for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&t++;return t}const getParsedType=e=>{const t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":null===e?"null":e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch?"promise":"undefined"!=typeof Map&&e instanceof Map?"map":"undefined"!=typeof Set&&e instanceof Set?"set":"undefined"!=typeof Date&&e instanceof Date?"date":"undefined"!=typeof File&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},s=new Set(["string","number","symbol"]),a=new Set(["string","number","bigint","boolean","symbol","undefined"]);function escapeRegex(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function clone(e,t,o){const n=new e._zod.constr(t??e._zod.def);return t&&!o?.parent||(n._zod.parent=e),n}function normalizeParams(e){const t=e;if(!t)return{};if("string"==typeof t)return{error:()=>t};if(void 0!==t?.message){if(void 0!==t?.error)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,"string"==typeof t.error?{...t,error:()=>t.error}:t}function createTransparentProxy(e){let t;return new Proxy({},{get(o,n,r){return t??(t=e()),Reflect.get(t,n,r)},set(o,n,r,s){return t??(t=e()),Reflect.set(t,n,r,s)},has(o,n){return t??(t=e()),Reflect.has(t,n)},deleteProperty(o,n){return t??(t=e()),Reflect.deleteProperty(t,n)},ownKeys(o){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(o,n){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,n)},defineProperty(o,n,r){return t??(t=e()),Reflect.defineProperty(t,n,r)}})}function stringifyPrimitive(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}function optionalKeys(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)}const i={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},d={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function pick(e,t){const o={},n=e._zod.def;for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&(o[e]=n.shape[e])}return clone(e,{...e._zod.def,shape:o,checks:[]})}function omit(e,t){const o={...e._zod.def.shape},n=e._zod.def;for(const e in t){if(!(e in n.shape))throw new Error(`Unrecognized key: "${e}"`);t[e]&&delete o[e]}return clone(e,{...e._zod.def,shape:o,checks:[]})}function extend(e,t){if(!isPlainObject(t))throw new Error("Invalid input to extend: expected a plain object");const o={...e._zod.def,get shape(){const o={...e._zod.def.shape,...t};return assignProp(this,"shape",o),o},checks:[]};return clone(e,o)}function merge(e,t){return clone(e,{...e._zod.def,get shape(){const o={...e._zod.def.shape,...t._zod.def.shape};return assignProp(this,"shape",o),o},catchall:t._zod.def.catchall,checks:[]})}function partial(e,t,o){const n=t._zod.def.shape,r={...n};if(o)for(const t in o){if(!(t in n))throw new Error(`Unrecognized key: "${t}"`);o[t]&&(r[t]=e?new e({type:"optional",innerType:n[t]}):n[t])}else for(const t in n)r[t]=e?new e({type:"optional",innerType:n[t]}):n[t];return clone(t,{...t._zod.def,shape:r,checks:[]})}function required(e,t,o){const n=t._zod.def.shape,r={...n};if(o)for(const t in o){if(!(t in r))throw new Error(`Unrecognized key: "${t}"`);o[t]&&(r[t]=new e({type:"nonoptional",innerType:n[t]}))}else for(const t in n)r[t]=new e({type:"nonoptional",innerType:n[t]});return clone(t,{...t._zod.def,shape:r,checks:[]})}function aborted(e,t=0){for(let o=t;o<e.issues.length;o++)if(!0!==e.issues[o]?.continue)return!0;return!1}function prefixIssues(e,t){return t.map(t=>{var o;return(o=t).path??(o.path=[]),t.path.unshift(e),t})}function unwrapMessage(e){return"string"==typeof e?e:e?.message}function finalizeIssue(e,t,o){const n={...e,path:e.path??[]};if(!e.message){const r=unwrapMessage(e.inst?._zod.def?.error?.(e))??unwrapMessage(t?.error?.(e))??unwrapMessage(o.customError?.(e))??unwrapMessage(o.localeError?.(e))??"Invalid input";n.message=r}return delete n.inst,delete n.continue,t?.reportInput||delete n.input,n}function getSizableOrigin(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function getLengthableOrigin(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"}function issue(...e){const[t,o,n]=e;return"string"==typeof t?{message:t,code:"custom",input:o,inst:n}:{...t}}function cleanEnum(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}class Class{constructor(...e){}}},"./node_modules/zod/v4/core/versions.js":function(e,t,o){o.r(t),o.d(t,{version:function(){return n}});const n={major:4,minor:0,patch:0}},"./node_modules/zod/v4/mini/schemas.js":function(e,t,o){o.r(t),o.d(t,{ZodMiniAny:function(){return U},ZodMiniArray:function(){return B},ZodMiniBase64:function(){return Z},ZodMiniBase64URL:function(){return T},ZodMiniBigInt:function(){return O},ZodMiniBigIntFormat:function(){return A},ZodMiniBoolean:function(){return N},ZodMiniCIDRv4:function(){return S},ZodMiniCIDRv6:function(){return P},ZodMiniCUID:function(){return v},ZodMiniCUID2:function(){return b},ZodMiniCatch:function(){return le},ZodMiniCustom:function(){return ye},ZodMiniCustomStringFormat:function(){return z},ZodMiniDate:function(){return K},ZodMiniDefault:function(){return ie},ZodMiniDiscriminatedUnion:function(){return W},ZodMiniE164:function(){return E},ZodMiniEmail:function(){return m},ZodMiniEmoji:function(){return g},ZodMiniEnum:function(){return te},ZodMiniFile:function(){return ne},ZodMiniGUID:function(){return p},ZodMiniIPv4:function(){return j},ZodMiniIPv6:function(){return x},ZodMiniIntersection:function(){return G},ZodMiniJWT:function(){return I},ZodMiniKSUID:function(){return $},ZodMiniLazy:function(){return _e},ZodMiniLiteral:function(){return oe},ZodMiniMap:function(){return X},ZodMiniNaN:function(){return me},ZodMiniNanoID:function(){return y},ZodMiniNever:function(){return V},ZodMiniNonOptional:function(){return ce},ZodMiniNull:function(){return L},ZodMiniNullable:function(){return ae},ZodMiniNumber:function(){return C},ZodMiniNumberFormat:function(){return R},ZodMiniObject:function(){return H},ZodMiniOptional:function(){return se},ZodMiniPipe:function(){return pe},ZodMiniPrefault:function(){return de},ZodMiniPromise:function(){return ge},ZodMiniReadonly:function(){return fe},ZodMiniRecord:function(){return Q},ZodMiniSet:function(){return ee},ZodMiniString:function(){return u},ZodMiniStringFormat:function(){return l},ZodMiniSuccess:function(){return ue},ZodMiniSymbol:function(){return D},ZodMiniTemplateLiteral:function(){return he},ZodMiniTransform:function(){return re},ZodMiniTuple:function(){return Y},ZodMiniType:function(){return c},ZodMiniULID:function(){return k},ZodMiniURL:function(){return h},ZodMiniUUID:function(){return f},ZodMiniUndefined:function(){return M},ZodMiniUnion:function(){return J},ZodMiniUnknown:function(){return q},ZodMiniVoid:function(){return F},ZodMiniXID:function(){return w},_default:function(){return _default},any:function(){return any},array:function(){return array},base64:function(){return base64},base64url:function(){return base64url},bigint:function(){return bigint},boolean:function(){return boolean},catch:function(){return _catch},catchall:function(){return catchall},check:function(){return check},cidrv4:function(){return cidrv4},cidrv6:function(){return cidrv6},cuid:function(){return cuid},cuid2:function(){return cuid2},custom:function(){return custom},date:function(){return date},discriminatedUnion:function(){return discriminatedUnion},e164:function(){return e164},email:function(){return email},emoji:function(){return emoji},enum:function(){return _enum},extend:function(){return extend},file:function(){return file},float32:function(){return float32},float64:function(){return float64},guid:function(){return guid},instanceof:function(){return _instanceof},int:function(){return int},int32:function(){return int32},int64:function(){return int64},intersection:function(){return intersection},ipv4:function(){return ipv4},ipv6:function(){return ipv6},json:function(){return json},jwt:function(){return jwt},keyof:function(){return keyof},ksuid:function(){return ksuid},lazy:function(){return _lazy},literal:function(){return literal},looseObject:function(){return looseObject},map:function(){return map},merge:function(){return merge},nan:function(){return nan},nanoid:function(){return nanoid},nativeEnum:function(){return nativeEnum},never:function(){return never},nonoptional:function(){return nonoptional},null:function(){return _null},nullable:function(){return nullable},nullish:function(){return nullish},number:function(){return number},object:function(){return object},omit:function(){return omit},optional:function(){return optional},partial:function(){return partial},partialRecord:function(){return partialRecord},pick:function(){return pick},pipe:function(){return pipe},prefault:function(){return prefault},promise:function(){return promise},readonly:function(){return readonly},record:function(){return record},refine:function(){return refine},required:function(){return required},set:function(){return set},strictObject:function(){return strictObject},string:function(){return string},stringFormat:function(){return stringFormat},stringbool:function(){return stringbool},success:function(){return success},symbol:function(){return symbol},templateLiteral:function(){return templateLiteral},transform:function(){return transform},tuple:function(){return tuple},uint32:function(){return uint32},uint64:function(){return uint64},ulid:function(){return ulid},undefined:function(){return _undefined},union:function(){return union},unknown:function(){return unknown},url:function(){return url},uuid:function(){return uuid},uuidv4:function(){return uuidv4},uuidv6:function(){return uuidv6},uuidv7:function(){return uuidv7},void:function(){return _void},xid:function(){return xid}});var n=o("./node_modules/zod/v4/core/core.js"),r=o("./node_modules/zod/v4/core/schemas.js"),s=o("./node_modules/zod/v4/core/checks.js"),a=o("./node_modules/zod/v4/core/util.js"),i=o("./node_modules/zod/v4/core/api.js"),d=o("./node_modules/zod/v4/core/parse.js");const c=n.$constructor("ZodMiniType",(e,t)=>{if(!e._zod)throw new Error("Uninitialized schema in ZodMiniType.");r.$ZodType.init(e,t),e.def=t,e.parse=(t,o)=>d.parse(e,t,o,{callee:e.parse}),e.safeParse=(t,o)=>d.safeParse(e,t,o),e.parseAsync=async(t,o)=>d.parseAsync(e,t,o,{callee:e.parseAsync}),e.safeParseAsync=async(t,o)=>d.safeParseAsync(e,t,o),e.check=(...o)=>e.clone({...t,checks:[...t.checks??[],...o.map(e=>"function"==typeof e?{_zod:{check:e,def:{check:"custom"},onattach:[]}}:e)]}),e.clone=(t,o)=>a.clone(e,t,o),e.brand=()=>e,e.register=(t,o)=>(t.add(e,o),e)}),u=n.$constructor("ZodMiniString",(e,t)=>{r.$ZodString.init(e,t),c.init(e,t)});function string(e){return i._string(u,e)}const l=n.$constructor("ZodMiniStringFormat",(e,t)=>{r.$ZodStringFormat.init(e,t),u.init(e,t)}),m=n.$constructor("ZodMiniEmail",(e,t)=>{r.$ZodEmail.init(e,t),l.init(e,t)});function email(e){return i._email(m,e)}const p=n.$constructor("ZodMiniGUID",(e,t)=>{r.$ZodGUID.init(e,t),l.init(e,t)});function guid(e){return i._guid(p,e)}const f=n.$constructor("ZodMiniUUID",(e,t)=>{r.$ZodUUID.init(e,t),l.init(e,t)});function uuid(e){return i._uuid(f,e)}function uuidv4(e){return i._uuidv4(f,e)}function uuidv6(e){return i._uuidv6(f,e)}function uuidv7(e){return i._uuidv7(f,e)}const h=n.$constructor("ZodMiniURL",(e,t)=>{r.$ZodURL.init(e,t),l.init(e,t)});function url(e){return i._url(h,e)}const g=n.$constructor("ZodMiniEmoji",(e,t)=>{r.$ZodEmoji.init(e,t),l.init(e,t)});function emoji(e){return i._emoji(g,e)}const y=n.$constructor("ZodMiniNanoID",(e,t)=>{r.$ZodNanoID.init(e,t),l.init(e,t)});function nanoid(e){return i._nanoid(y,e)}const v=n.$constructor("ZodMiniCUID",(e,t)=>{r.$ZodCUID.init(e,t),l.init(e,t)});function cuid(e){return i._cuid(v,e)}const b=n.$constructor("ZodMiniCUID2",(e,t)=>{r.$ZodCUID2.init(e,t),l.init(e,t)});function cuid2(e){return i._cuid2(b,e)}const k=n.$constructor("ZodMiniULID",(e,t)=>{r.$ZodULID.init(e,t),l.init(e,t)});function ulid(e){return i._ulid(k,e)}const w=n.$constructor("ZodMiniXID",(e,t)=>{r.$ZodXID.init(e,t),l.init(e,t)});function xid(e){return i._xid(w,e)}const $=n.$constructor("ZodMiniKSUID",(e,t)=>{r.$ZodKSUID.init(e,t),l.init(e,t)});function ksuid(e){return i._ksuid($,e)}const j=n.$constructor("ZodMiniIPv4",(e,t)=>{r.$ZodIPv4.init(e,t),l.init(e,t)});function ipv4(e){return i._ipv4(j,e)}const x=n.$constructor("ZodMiniIPv6",(e,t)=>{r.$ZodIPv6.init(e,t),l.init(e,t)});function ipv6(e){return i._ipv6(x,e)}const S=n.$constructor("ZodMiniCIDRv4",(e,t)=>{r.$ZodCIDRv4.init(e,t),l.init(e,t)});function cidrv4(e){return i._cidrv4(S,e)}const P=n.$constructor("ZodMiniCIDRv6",(e,t)=>{r.$ZodCIDRv6.init(e,t),l.init(e,t)});function cidrv6(e){return i._cidrv6(P,e)}const Z=n.$constructor("ZodMiniBase64",(e,t)=>{r.$ZodBase64.init(e,t),l.init(e,t)});function base64(e){return i._base64(Z,e)}const T=n.$constructor("ZodMiniBase64URL",(e,t)=>{r.$ZodBase64URL.init(e,t),l.init(e,t)});function base64url(e){return i._base64url(T,e)}const E=n.$constructor("ZodMiniE164",(e,t)=>{r.$ZodE164.init(e,t),l.init(e,t)});function e164(e){return i._e164(E,e)}const I=n.$constructor("ZodMiniJWT",(e,t)=>{r.$ZodJWT.init(e,t),l.init(e,t)});function jwt(e){return i._jwt(I,e)}const z=n.$constructor("ZodMiniCustomStringFormat",(e,t)=>{r.$ZodCustomStringFormat.init(e,t),l.init(e,t)});function stringFormat(e,t,o={}){return i._stringFormat(z,e,t,o)}const C=n.$constructor("ZodMiniNumber",(e,t)=>{r.$ZodNumber.init(e,t),c.init(e,t)});function number(e){return i._number(C,e)}const R=n.$constructor("ZodMiniNumberFormat",(e,t)=>{r.$ZodNumberFormat.init(e,t),C.init(e,t)});function int(e){return i._int(R,e)}function float32(e){return i._float32(R,e)}function float64(e){return i._float64(R,e)}function int32(e){return i._int32(R,e)}function uint32(e){return i._uint32(R,e)}const N=n.$constructor("ZodMiniBoolean",(e,t)=>{r.$ZodBoolean.init(e,t),c.init(e,t)});function boolean(e){return i._boolean(N,e)}const O=n.$constructor("ZodMiniBigInt",(e,t)=>{r.$ZodBigInt.init(e,t),c.init(e,t)});function bigint(e){return i._bigint(O,e)}const A=n.$constructor("ZodMiniBigIntFormat",(e,t)=>{r.$ZodBigIntFormat.init(e,t),O.init(e,t)});function int64(e){return i._int64(A,e)}function uint64(e){return i._uint64(A,e)}const D=n.$constructor("ZodMiniSymbol",(e,t)=>{r.$ZodSymbol.init(e,t),c.init(e,t)});function symbol(e){return i._symbol(D,e)}const M=n.$constructor("ZodMiniUndefined",(e,t)=>{r.$ZodUndefined.init(e,t),c.init(e,t)});function _undefined(e){return i._undefined(M,e)}const L=n.$constructor("ZodMiniNull",(e,t)=>{r.$ZodNull.init(e,t),c.init(e,t)});function _null(e){return i._null(L,e)}const U=n.$constructor("ZodMiniAny",(e,t)=>{r.$ZodAny.init(e,t),c.init(e,t)});function any(){return i._any(U)}const q=n.$constructor("ZodMiniUnknown",(e,t)=>{r.$ZodUnknown.init(e,t),c.init(e,t)});function unknown(){return i._unknown(q)}const V=n.$constructor("ZodMiniNever",(e,t)=>{r.$ZodNever.init(e,t),c.init(e,t)});function never(e){return i._never(V,e)}const F=n.$constructor("ZodMiniVoid",(e,t)=>{r.$ZodVoid.init(e,t),c.init(e,t)});function _void(e){return i._void(F,e)}const K=n.$constructor("ZodMiniDate",(e,t)=>{r.$ZodDate.init(e,t),c.init(e,t)});function date(e){return i._date(K,e)}const B=n.$constructor("ZodMiniArray",(e,t)=>{r.$ZodArray.init(e,t),c.init(e,t)});function array(e,t){return new B({type:"array",element:e,...a.normalizeParams(t)})}function keyof(e){const t=e._zod.def.shape;return literal(Object.keys(t))}const H=n.$constructor("ZodMiniObject",(e,t)=>{r.$ZodObject.init(e,t),c.init(e,t),a.defineLazy(e,"shape",()=>t.shape)});function object(e,t){const o={type:"object",get shape(){return a.assignProp(this,"shape",{...e}),this.shape},...a.normalizeParams(t)};return new H(o)}function strictObject(e,t){return new H({type:"object",get shape(){return a.assignProp(this,"shape",{...e}),this.shape},catchall:never(),...a.normalizeParams(t)})}function looseObject(e,t){return new H({type:"object",get shape(){return a.assignProp(this,"shape",{...e}),this.shape},catchall:unknown(),...a.normalizeParams(t)})}function extend(e,t){return a.extend(e,t)}function merge(e,t){return a.extend(e,t)}function pick(e,t){return a.pick(e,t)}function omit(e,t){return a.omit(e,t)}function partial(e,t){return a.partial(se,e,t)}function required(e,t){return a.required(ce,e,t)}function catchall(e,t){return e.clone({...e._zod.def,catchall:t})}const J=n.$constructor("ZodMiniUnion",(e,t)=>{r.$ZodUnion.init(e,t),c.init(e,t)});function union(e,t){return new J({type:"union",options:e,...a.normalizeParams(t)})}const W=n.$constructor("ZodMiniDiscriminatedUnion",(e,t)=>{r.$ZodDiscriminatedUnion.init(e,t),c.init(e,t)});function discriminatedUnion(e,t,o){return new W({type:"union",options:t,discriminator:e,...a.normalizeParams(o)})}const G=n.$constructor("ZodMiniIntersection",(e,t)=>{r.$ZodIntersection.init(e,t),c.init(e,t)});function intersection(e,t){return new G({type:"intersection",left:e,right:t})}const Y=n.$constructor("ZodMiniTuple",(e,t)=>{r.$ZodTuple.init(e,t),c.init(e,t)});function tuple(e,t,o){const n=t instanceof r.$ZodType,s=n?o:t;return new Y({type:"tuple",items:e,rest:n?t:null,...a.normalizeParams(s)})}const Q=n.$constructor("ZodMiniRecord",(e,t)=>{r.$ZodRecord.init(e,t),c.init(e,t)});function record(e,t,o){return new Q({type:"record",keyType:e,valueType:t,...a.normalizeParams(o)})}function partialRecord(e,t,o){return new Q({type:"record",keyType:union([e,never()]),valueType:t,...a.normalizeParams(o)})}const X=n.$constructor("ZodMiniMap",(e,t)=>{r.$ZodMap.init(e,t),c.init(e,t)});function map(e,t,o){return new X({type:"map",keyType:e,valueType:t,...a.normalizeParams(o)})}const ee=n.$constructor("ZodMiniSet",(e,t)=>{r.$ZodSet.init(e,t),c.init(e,t)});function set(e,t){return new ee({type:"set",valueType:e,...a.normalizeParams(t)})}const te=n.$constructor("ZodMiniEnum",(e,t)=>{r.$ZodEnum.init(e,t),c.init(e,t)});function _enum(e,t){const o=Array.isArray(e)?Object.fromEntries(e.map(e=>[e,e])):e;return new te({type:"enum",entries:o,...a.normalizeParams(t)})}function nativeEnum(e,t){return new te({type:"enum",entries:e,...a.normalizeParams(t)})}const oe=n.$constructor("ZodMiniLiteral",(e,t)=>{r.$ZodLiteral.init(e,t),c.init(e,t)});function literal(e,t){return new oe({type:"literal",values:Array.isArray(e)?e:[e],...a.normalizeParams(t)})}const ne=n.$constructor("ZodMiniFile",(e,t)=>{r.$ZodFile.init(e,t),c.init(e,t)});function file(e){return i._file(ne,e)}const re=n.$constructor("ZodMiniTransform",(e,t)=>{r.$ZodTransform.init(e,t),c.init(e,t)});function transform(e){return new re({type:"transform",transform:e})}const se=n.$constructor("ZodMiniOptional",(e,t)=>{r.$ZodOptional.init(e,t),c.init(e,t)});function optional(e){return new se({type:"optional",innerType:e})}const ae=n.$constructor("ZodMiniNullable",(e,t)=>{r.$ZodNullable.init(e,t),c.init(e,t)});function nullable(e){return new ae({type:"nullable",innerType:e})}function nullish(e){return optional(nullable(e))}const ie=n.$constructor("ZodMiniDefault",(e,t)=>{r.$ZodDefault.init(e,t),c.init(e,t)});function _default(e,t){return new ie({type:"default",innerType:e,get defaultValue(){return"function"==typeof t?t():t}})}const de=n.$constructor("ZodMiniPrefault",(e,t)=>{r.$ZodPrefault.init(e,t),c.init(e,t)});function prefault(e,t){return new de({type:"prefault",innerType:e,get defaultValue(){return"function"==typeof t?t():t}})}const ce=n.$constructor("ZodMiniNonOptional",(e,t)=>{r.$ZodNonOptional.init(e,t),c.init(e,t)});function nonoptional(e,t){return new ce({type:"nonoptional",innerType:e,...a.normalizeParams(t)})}const ue=n.$constructor("ZodMiniSuccess",(e,t)=>{r.$ZodSuccess.init(e,t),c.init(e,t)});function success(e){return new ue({type:"success",innerType:e})}const le=n.$constructor("ZodMiniCatch",(e,t)=>{r.$ZodCatch.init(e,t),c.init(e,t)});function _catch(e,t){return new le({type:"catch",innerType:e,catchValue:"function"==typeof t?t:()=>t})}const me=n.$constructor("ZodMiniNaN",(e,t)=>{r.$ZodNaN.init(e,t),c.init(e,t)});function nan(e){return i._nan(me,e)}const pe=n.$constructor("ZodMiniPipe",(e,t)=>{r.$ZodPipe.init(e,t),c.init(e,t)});function pipe(e,t){return new pe({type:"pipe",in:e,out:t})}const fe=n.$constructor("ZodMiniReadonly",(e,t)=>{r.$ZodReadonly.init(e,t),c.init(e,t)});function readonly(e){return new fe({type:"readonly",innerType:e})}const he=n.$constructor("ZodMiniTemplateLiteral",(e,t)=>{r.$ZodTemplateLiteral.init(e,t),c.init(e,t)});function templateLiteral(e,t){return new he({type:"template_literal",parts:e,...a.normalizeParams(t)})}const _e=n.$constructor("ZodMiniLazy",(e,t)=>{r.$ZodLazy.init(e,t),c.init(e,t)});function _lazy(e){return new _e({type:"lazy",getter:e})}const ge=n.$constructor("ZodMiniPromise",(e,t)=>{r.$ZodPromise.init(e,t),c.init(e,t)});function promise(e){return new ge({type:"promise",innerType:e})}const ye=n.$constructor("ZodMiniCustom",(e,t)=>{r.$ZodCustom.init(e,t),c.init(e,t)});function check(e,t){const o=new s.$ZodCheck({check:"custom",...a.normalizeParams(t)});return o._zod.check=e,o}function custom(e,t){return i._custom(ye,e??(()=>!0),t)}function refine(e,t={}){return i._refine(ye,e,t)}function _instanceof(e,t={error:`Input not instance of ${e.name}`}){const o=custom(t=>t instanceof e,t);return o._zod.bag.Class=e,o}const stringbool=(...e)=>i._stringbool({Pipe:pe,Boolean:N,String:u,Transform:re},...e);function json(){const e=_lazy(()=>union([string(),number(),boolean(),_null(),array(e),record(string(),e)]));return e}},"./packages/apps/elementor-capabilities-mcp/src/elementor-capabilities-mcp-server.ts":function(e,t,o){o.r(t),o.d(t,{createElementorCapabilitiesServer:function(){return createElementorCapabilitiesServer},getSafeOrigin:function(){return getSafeOrigin},safeNavigateAfterResponse:function(){return safeNavigateAfterResponse}});var n=o("@elementor/editor-mcp"),r=o("@elementor/elementor-mcp-common"),s=o("@elementor/schema"),a=o("./node_modules/@modelcontextprotocol/sdk/dist/esm/server/mcp.js"),i=o("./packages/apps/elementor-capabilities-mcp/src/mcp-description-resource.ts"),d=o("./packages/apps/elementor-capabilities-mcp/src/pages-list-resource.ts");const c="angie/requiredResources",u="/wp/v2/pages",l="builder",m="New Page",p="elementor",getSafeOrigin=()=>{if("undefined"==typeof window)return"";const e=new URL(window.location.href);return`${e.protocol}://${e.host}`||""};function safeNavigateAfterResponse(e){try{(0,n.getAngieIframe)().contentWindow.postMessage({type:n.AngieMessageEvenetType.ANGIE_NAVIGATE_AFTER_RESPONSE,payload:{url:e}},getSafeOrigin())}finally{setTimeout(()=>{window.location.replace(e)},50)}}function createElementorCapabilitiesServer(){const e=new a.McpServer({name:"elementor-capabilities-server",version:"1.0.0",title:"Elementor Capabilities"},{instructions:"Provides Elementor page-building capabilities and navigates users to the editor.",capabilities:{resources:{subscribe:!0}}});return(0,d.addPagesListResource)(e),(0,i.addCapabilitiesDescriptionResource)(e),e.registerTool("navigate-to-elementor-editor",{description:"Navigate the user to the Elementor editor. Causes a full page reload — editor-related tools become available afterward.\n\nWorkflow: choose from the pages list resource → set pageId (edit) OR createNew=true (new page) with confirmationMessage.",inputSchema:{pageId:s.z.number().optional().describe("The ID of the page to navigate to. Only provide after user has explicitly selected a page from the available pages list. When provided, confirmationMessage is REQUIRED."),createNew:s.z.boolean().optional().describe("Set to true ONLY when user explicitly requests to create a new page. When true, confirmationMessage is REQUIRED. Default is false."),newPageTitle:s.z.string().optional().describe('Title for the new page when createNew is true. Use what the user specified or default to "New Page".'),confirmationMessage:s.z.string().optional().describe("REQUIRED when pageId or createNew is provided. A clear message shown to user before navigation. Example: \"I'll open the 'Homepage' in Elementor editor so you can add a form widget. Ready to proceed?\" Omit when just fetching available pages.")},annotations:{title:"Navigate to Elementor Editor",destructiveHint:!0},_meta:{[c]:[{uri:i.CAPABILITIES_DESCRIPTION_URI,whenToUse:"Read first for full capabilities and limitations guide"},{uri:d.PAGES_LIST_RESOURCE_URI,whenToUse:"Always use this resource first to understand what pages are available before asking the user which page to edit"}]}},async e=>{try{if((e.pageId||e.createNew)&&!e.confirmationMessage)throw new Error("confirmationMessage is required when navigating to a page (pageId or createNew provided)");if(e.createNew)return await async function handleCreateAndNavigate(e){const t=e.newPageTitle||m,o=(await(0,r.callWpApi)(u,"POST",{title:t,status:"draft",meta:{_elementor_edit_mode:l}})).data;if(!o||"object"!=typeof o||!("id"in o))throw new Error("Invalid response from page creation API");return await handleNavigateToPage(o.id)}(e);if(e.pageId)return await handleNavigateToPage(e.pageId);throw new Error("Either pageId or createNew must be provided. The pages list is available in the wp-pages-list resource.")}catch(e){throw console.error("[Elementor Capabilities Server] navigation error:",e),new Error(`Error navigating to Elementor editor: ${e.message}`)}}),e}async function handleNavigateToPage(e){if(!e||e<=0)throw new Error("Invalid page ID");const t=(await(0,r.callWpApi)(`${u}/${e}`,"GET")).data;if(!t||"object"!=typeof t||!("id"in t)||!("title"in t))throw new Error(`Invalid page data received for page ID ${e}`);const o=function generateElementorEditUrl(e){return`${window.location.origin}/wp-admin/post.php?post=${e}&action=${p}`}(e);if(!o.startsWith(window.location.origin))throw new Error("Invalid navigation URL");return safeNavigateAfterResponse(o),{content:[{type:"text",text:JSON.stringify({success:!0,message:`Navigating to Elementor editor for page: ${t.title.rendered}`,pageId:t.id,pageTitle:t.title.rendered,editUrl:o,nextSteps:"Once in the Elementor editor, you can use Elementor MCP tools for page settings, UI navigation, AI content generation, custom styling, and dynamic content."},null,2)}]}}},"./packages/apps/elementor-capabilities-mcp/src/mcp-description-resource.ts":function(e,t,o){o.r(t),o.d(t,{CAPABILITIES_DESCRIPTION:function(){return s},CAPABILITIES_DESCRIPTION_URI:function(){return r},addCapabilitiesDescriptionResource:function(){return addCapabilitiesDescriptionResource}});var n=o("./packages/apps/elementor-capabilities-mcp/src/pages-list-resource.ts");const r="elementor://capabilities/server-description",s=`## Elementor Page Builder - Available When In Editor\n\nThis MCP provides information about Elementor's page building capabilities. When users ask about Elementor features, you should navigate them to the Elementor editor where full capabilities are available.\n\n### Available Resources:\n**Pages List Resource** (\`${n.PAGES_LIST_RESOURCE_URI}\`):\n- Lists all WordPress pages with IDs, titles, status, and metadata\n- Use this to see what pages are available before navigation\n- Updated automatically when pages are created or modified\n- Useful for suggesting pages to edit or checking if a page exists\n\n### Elementor Capabilities (Available In Editor):\n\n**Page Management:**\n- Manage page settings, saving and routing pages\n- Control the editor UI, including switching between desktop, tablet, and mobile views\n\n**Global Styles:**\n- Work with global styles, helping manage shared design settings like colors and fonts across the site\n\n**Element Management:**\n- Create, edit, delete, duplicate, and move individual Elementor widgets and containers\n- Update widget and container settings\n- Insert text content with AI-powered text generation\n- Create image widgets and assign images to elements\n\n**AI-Powered Content Creation:**\n- Generate and edit text and insert it into the page\n- Generate images and place them on the canvas\n\n**Custom Styling & Code:**\n- Apply custom CSS to elements\n- Generate supported code snippets\n\n### Elementor Limitations (What Cannot Be Done):\n\n**Element Management Limitations:**\n- Cannot apply motion effects\n- Cannot create fully designed or polished pages in a single step\n- Cannot fully resolve responsiveness issues\n- Layout generation (Copilot) is not currently available\n\n**Theme Builder:**\n- Cannot create or manage Theme Builder templates, including headers, footers, single posts, archives, products, loop items, or 404 pages\n- Cannot set display conditions for templates\n- Cannot configure popup triggers and advanced rules\n\n**System Settings:**\n- Cannot change Elementor system-level settings\n- Cannot activate or work with Editor V4\n- Cannot manage form submissions\n- Cannot add custom fonts or icons\n- Cannot manage user roles\n- Cannot roll back Elementor versions\n- Cannot place the site in maintenance mode\n- Cannot export the website\n- Cannot apply full website templates\n\n**Code & Widgets:**\n- Cannot register PHP code or create new custom widgets, though Angie may provide guidance, code snippets, or plugin suggestions where helpful\n\n**Note**: While page names can include terms like "header" or "footer", these won't function as actual theme parts without Theme Builder access.\n\n### How to Help Users:\n\n**When users ask about Elementor features:**\n1. Confirm what they want to accomplish\n2. Check if it's a supported capability (see lists above)\n3. **Get the page to edit:**\n   - If user says "create new page" → Use createNew=true\n   - Otherwise → Call tool with no parameters to get page list\n   - Show pages to user: "Which page? Homepage, About, Contact..."\n   - User chooses → Call tool again with that pageId\n4. Once in editor, full Elementor MCP tools will be available\n\n**Examples:**\n- User: "Edit homepage" → Get page list → Find "Homepage" → Ask to confirm → Navigate\n- User: "Create new page" → createNew=true → Navigate\n\n**Examples of when to navigate to editor:**\n- "Edit my homepage with Elementor"\n- "Apply custom CSS to my page"\n- "Generate text content for my page"\n- "Work with dynamic content"\n\n**Examples of when to navigate to editor (element management now supported):**\n- "Add a heading widget" (Navigate to editor - element management supported)\n- "Create a new section with containers" (Navigate to editor - container creation supported)\n- "Change the color of a button" (Navigate to editor - widget settings supported)\n\n**Examples of what Elementor CANNOT do (don't navigate):**\n- "Add motion effects to my page" (Motion effects not supported)\n- "Create a header template" (Theme Builder not available)\n- "Set up a popup trigger" (Popup triggers and advanced rules not supported)\n- "Change Elementor settings" (System-level settings restricted)\n- "Add custom fonts" (Custom fonts not supported)\n- "Create a custom widget" (Cannot register PHP code or custom widgets)\n\n### Important Notes:\n- Elementor tools are ONLY available when inside the Elementor editor\n- This MCP server is for navigation and capability awareness\n- Once in editor, the full 'elementor' MCP server with all tools becomes available\n- Always verify if the requested feature is supported before navigating\n\n**Important**: When users ask "What can Angie do?" or similar questions about Angie's general capabilities, use the \`what-can-angie-do\` tool from the knowledge MCP server instead of generating your own response.`;function addCapabilitiesDescriptionResource(e){e.registerResource("elementor-capabilities-server-description",r,{title:"Elementor capabilities and limitations",description:"Full guide to Elementor MCP capabilities, limitations, workflows, and when to navigate to the editor."},async e=>({contents:[{uri:e.href,mimeType:"text/plain",text:s}]}))}},"./packages/apps/elementor-capabilities-mcp/src/pages-list-resource.ts":function(e,t,o){o.r(t),o.d(t,{PAGES_LIST_RESOURCE_URI:function(){return r},addPagesListResource:function(){return addPagesListResource}});var n=o("@elementor/elementor-mcp-common");const r="wp://pages/list";function addPagesListResource(e){e.registerResource("wp-pages-list",r,{title:"List of wordpress pages",description:"List of all WordPress pages with their IDs, titles, status, and metadata. Use this to get available pages before navigation or editing."},async e=>{try{const t=(await(0,n.callWpApi)("/wp/v2/pages?per_page=100&orderby=modified&order=desc","GET")).data;if(!Array.isArray(t))throw new Error("Invalid response format from wordpress pages API");const o=t.map(e=>({id:e.id,title:e.title.rendered,status:e.status,link:e.link,modified:e.modified,type:e.type}));return{contents:[{uri:e.href,mimeType:"application/json",text:JSON.stringify({pages:o,total:o.length,message:"List of all available wordpress pages"},null,2)}]}}catch(e){throw new Error(`Failed to fetch pages list: ${e.message}`)}})}},"@elementor/editor-mcp":function(e){e.exports=window.elementorV2.editorMcp},"@elementor/elementor-mcp-common":function(e){e.exports=window.elementorV2.elementorMcpCommon},"@elementor/schema":function(e){e.exports=window.elementorV2.schema}},t={};function __webpack_require__(o){var n=t[o];if(void 0!==n)return n.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return __webpack_require__.d(t,{a:t}),t},__webpack_require__.d=function(e,t){for(var o in t)__webpack_require__.o(t,o)&&!__webpack_require__.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},__webpack_require__.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},__webpack_require__.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){__webpack_require__.r(o),__webpack_require__.d(o,{init:function(){return init}});var e=__webpack_require__("@elementor/editor-mcp"),t=__webpack_require__("./packages/apps/elementor-capabilities-mcp/src/elementor-capabilities-mcp-server.ts");function init(){const o=(0,e.getAngieSdk)();o.waitForReady().then(()=>{const e=(0,t.createElementorCapabilitiesServer)();o.registerServer({name:"elementor-capabilities",version:"2.0.0",description:"Elementor Capabilities Gateway",server:e,capabilities:{tools:{}}}),console.log("[Elementor Capabilities MCP] Module initialized")})}}(),(window.elementorV2=window.elementorV2||{}).elementorCapabilitiesMcp=o}(),window.elementorV2.elementorCapabilitiesMcp?.init?.();
//# sourceMappingURL=elementor-capabilities-mcp.js.map