{"version":3,"file":"index.cjs","names":["__create","__defProp","__getOwnPropDesc","__getOwnPropNames","__getProtoOf","__hasOwnProp","__commonJSMin","__copyProps","__toESM","defaultErrorMap","defaultErrorMap","ZodType","ZodOptional","ZodNullable","ZodArray","ZodUnion","ZodIntersection","ZodDefault","ZodCatch","ZodReadonly","emojiRegex","isValidJWT","ZodString","regex","floatSafeRemainder","ZodNumber","ZodBoolean","ZodNull","ZodAny","ZodUnknown","ZodNever","ZodObject","ZodTuple","ZodLazy","ZodLiteral","ZodEnum","mergeValues","ZodRecord","defaultErrorMap","custom","z","ignoreOverride","defaultOptions","getDefaultOptions","getRefs","addErrorMessage","setResponseValueAndErrors","getRelativePath","parseAnyDef","parseArrayDef","parseDef","parseBigintDef","parseBooleanDef","parseBrandedDef","parseCatchDef","parseDateDef","integerDateParser","parseDefaultDef","parseEffectsDef","parseEnumDef","isJsonSchema7AllOfType","parseIntersectionDef","parseLiteralDef","emojiRegex","zodPatterns","parseStringDef","escapeLiteralCheckValue","escapeNonAlphaNumeric","ALPHA_NUMERIC","addFormat","addPattern","stringifyRegExpWithFlags","parseRecordDef","parseMapDef","parseNativeEnumDef","parseNeverDef","parseNullDef","primitiveMappings","parseUnionDef","asAnyOf","parseNullableDef","parseNumberDef","parseObjectDef","safeIsOptional","decideAdditionalProperties","parseOptionalDef","parsePipelineDef","parsePromiseDef","parseSetDef","parseTupleDef","parseUndefinedDef","parseUnknownDef","parseReadonlyDef","selectParser","get$ref","addMeta","zodToJsonSchema","esm_default","F","_a","util.jsonStringifyReplacer","initializer","core.$ZodAsyncError","util.finalizeIssue","core.config","validateAsync","_emoji","number","boolean","_null","util.nullish","util.floatSafeRemainder","util.NUMBER_FORMAT_RANGES","util.getSizableOrigin","util.codePointLength","util.getLengthableOrigin","regexes.lowercase","regexes.uppercase","util.escapeRegex","util.prefixIssues","content","util.aborted","util.explicitlyAborted","core.$ZodAsyncError","util.hide","util.finalizeIssue","core.config","regexes.anyString","regexes.guid","regexes.uuid","regexes.email","regexes.emoji","regexes.nanoid","regexes.nanoidOfLength","regexes.cuid","regexes.cuid2","regexes.ulid","regexes.xid","regexes.ksuid","regexes.datetime","regexes.date","regexes.time","regexes.duration","regexes.ipv4","regexes.ipv6","regexes.cidrv4","regexes.cidrv6","regexes.e164","regexes.number","regexes.boolean","regexes.null","util.prefixIssues","util.optionalKeys","util.cached","isObject","util.isObject","util.esc","allowsEval","util.allowsEval","util.cleanRegex","util.isPlainObject","util.getEnumValues","util.escapeRegex","core.$ZodEncodeError","util.issue","util.rawShape","util.parsedType","util.stringifyPrimitive","util.joinValues","util.normalizeParams","_null","checks.$ZodCheckLessThan","checks.$ZodCheckGreaterThan","checks.$ZodCheckMultipleOf","checks.$ZodCheckMaxSize","checks.$ZodCheckMinSize","checks.$ZodCheckMaxLength","checks.$ZodCheckMinLength","checks.$ZodCheckLengthEquals","checks.$ZodCheckRegex","checks.$ZodCheckLowerCase","checks.$ZodCheckUpperCase","checks.$ZodCheckIncludes","checks.$ZodCheckStartsWith","checks.$ZodCheckEndsWith","checks.$ZodCheckProperties","checks.$ZodCheckMimeType","checks.$ZodCheckOverwrite","util.slugify","issue","util.issue","checks.$ZodCheck","addPattern","regexes.base64","regexes.base64url","regexes.number","regexes.integer","core.formatError","core.flattenError","util.jsonStringifyReplacer","en","core.memoizer","util.mergeDefs","core.clone","checks.overwrite","util.hide","core.standardProps","parse.parse","parse.parseAsync","parse.safeParse","parse.safeParseAsync","parse.validate","parse.validateAsync","parse.encode","parse.decode","parse.encodeAsync","parse.decodeAsync","parse.safeEncode","parse.safeDecode","parse.safeEncodeAsync","parse.safeDecodeAsync","processors.stringProcessor","processors.aggregateChecks","checks.regex","checks.includes","checks.startsWith","checks.endsWith","checks.minLength","checks.maxLength","checks.length","checks.lowercase","checks.uppercase","checks.trim","checks.normalize","checks.toLowerCase","checks.toUpperCase","checks.slugify","core._email","core._url","core._jwt","core._emoji","core._guid","core._uuid","core._uuidv4","core._uuidv6","core._uuidv7","core._nanoid","core._cuid","core._cuid2","core._ulid","core._base64","core._base64url","core._xid","core._ksuid","core._ipv4","core._ipv6","core._cidrv4","core._cidrv6","core._e164","core._isoDateTime","core._isoDate","core._isoTime","core._isoDuration","core._string","processors.numberProcessor","checks.gt","checks.gte","checks.lt","checks.lte","checks.multipleOf","core._number","core._int","processors.booleanProcessor","core._boolean","processors.nullProcessor","core._null","processors.anyProcessor","core._any","processors.unknownProcessor","core._unknown","processors.neverProcessor","core._never","processors.arrayProcessor","core._array","processors.objectProcessor","util.extend","util.safeExtend","util.merge","util.pick","util.omit","util.partial","util.required","object","util.normalizeParams","processors.unionProcessor","processors.intersectionProcessor","processors.tupleProcessor","core.$ZodType","processors.recordProcessor","processors.enumProcessor","processors.literalProcessor","processors.fileProcessor","core._minSize","core._maxSize","core._mime","core._file","processors.transformProcessor","core.$ZodEncodeError","issue","util.issue","processors.optionalProcessor","processors.nullableProcessor","processors.defaultProcessor","util.shallowClone","processors.prefaultProcessor","processors.nonoptionalProcessor","processors.catchProcessor","core.util.constantCatch","processors.pipeProcessor","processors.readonlyProcessor","processors.lazyProcessor","processors.customProcessor","core._custom","core._refine","core._superRefine","core._properties","z.string","VENDOR","#schema","#validate","#toJsonSchema","#convertValidationResult","toStandardSchema","import_json_schema_traverse","#schema","#options","#validate","#toJsonSchema","#getAjvValidator","#ajvPathToStandardPath","#ajvValidateCache","#ajvInstance","toStandardSchema","import_json_schema_traverse","convertToJsonSchema","esm_default","ignoreOverride","toStandardSchema","z3","toStandardSchema","isStandardSchemaWithJSON","toStandardSchema$4","toStandardSchema$2","toStandardSchema$3","z.number","z.ZodNumber","z2.literal","z2.null","z3.null","z3.literal","z3.enum","z3.union","z4.file","z5.string","z5.ZodString","z6.number","z6.ZodNumber","z7.array","z7.any","z7.ZodArray","tuple","z8.tuple","z9.object","arraySchema","z10.intersection","z11.union","z11.intersection","z12.ZodObject","z12.ZodRecord","z12.object","z13.any","z14.any","z14.never","z14.string","z14.number","z14.boolean","z14.null","z14.array","z14.custom","z14.union","getErrorMessage","z$1.union","z$1.string","z$1.instanceof","z$1.custom","z$1.lazy","z$1.null","z$1.number","z$1.boolean","z$1.record","z$1.array","z$1.object","z$1.literal","z$1.unknown","z$1.optional","ProtocolErrorCode","ProtocolErrorCode","MastraError","ErrorDomain","ErrorCategory","MastraBase","AsyncLocalStorage","DEFAULT_REQUEST_TIMEOUT_MSEC","Client","LOG_LEVEL_META_KEY","StdioClientTransport","StreamableHTTPClientTransport","UnauthorizedError","toStandardSchema","MastraError","ErrorDomain","ErrorCategory","MCPServerBase","noopObserve","MastraBase","DEFAULT_REQUEST_TIMEOUT_MSEC","MastraError","ErrorDomain","ErrorCategory","UnauthorizedError","RequestContext","ProtocolError","ProtocolErrorCode","MCPServerBase","RequestContext","MastraError","ErrorDomain","ErrorCategory","specTypeSchemas","Server","PROTOCOL_VERSION_META_KEY","CLIENT_INFO_META_KEY","SpanType","EntityType","inputRequired","ProtocolError","ProtocolErrorCode","RESOURCE_URI_META_KEY","RESOURCE_MIME_TYPE"],"sources":["../src/client/types.ts","../../schema-compat/dist/json-schema-traverse-B35mHRM8.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v3/helpers/util.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v3/ZodError.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v3/locales/en.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v3/errors.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v3/helpers/parseUtil.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v3/helpers/errorUtil.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v3/types.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v3/external.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v3/index.js","../../schema-compat/dist/esm-CWlHuVIx.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/util.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/core.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/errors.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/parse.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/regexes.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/checks.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/doc.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/versions.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/schemas.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/memoizer.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/locales/en.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/registries.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/api.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/to-json-schema.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/core/json-schema-processors.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/classic/errors.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/classic/parse.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod/4.6.5/6448fd814698825170f93bd428080c609bd45ccbc007f4c2dfd5fac1bb52f28d/node_modules/zod/v4/classic/schemas.js","../../schema-compat/dist/zod-to-json.js","../../schema-compat/dist/standard-schema/adapters/ai-sdk.js","../../schema-compat/dist/json-schema-R8yfooPa.js","../../schema-compat/dist/standard-schema/adapters/zod-v3.js","../../schema-compat/dist/schema-e0VHpMt0.js","../../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-from-json-schema/0.5.2/6d17c02444d8741339c17b6813a2702a4dfeb014f03ed377f311bb739f609aba/node_modules/zod-from-json-schema/dist/index.mjs","../../schema-compat/dist/index.js","../src/shared/json-schema-dialect.ts","../src/shared/mastra-tool-meta.ts","../src/shared/oauth-types.ts","../src/shared/trace-context.ts","../src/client/actions/progress.ts","../src/client/actions/prompt.ts","../src/client/actions/resource.ts","../src/client/error-utils.ts","../src/client/url-policy.ts","../src/client/client.ts","../src/client/oauth-callback-server.ts","../src/client/oauth-provider.ts","../src/client/server-proxy.ts","../src/client/configuration.ts","../src/server/actions.ts","../src/server/request.ts","../src/server/server.ts","../src/server/types.ts","../src/server/oauth-middleware.ts"],"sourcesContent":["import type { IOType } from 'node:child_process';\nimport type { RequestContext } from '@mastra/core/di';\nimport type {\n  StreamableHTTPClientTransportOptions,\n  ClientCapabilities,\n  ElicitRequestParams,\n  ElicitResult,\n  LoggingLevel,\n  ProgressNotification,\n  ToolAnnotations,\n  jsonSchemaValidator,\n} from '@modelcontextprotocol/client';\nimport type { MCPTraceContext } from '../shared/trace-context';\n\n// FetchLike is used internally when wrapping MastraFetchLike for transport compatibility\nexport type { FetchLike } from '@modelcontextprotocol/client';\n// Re-export so consumers of @mastra/mcp can type their requireToolApproval callbacks\n// without having to add @modelcontextprotocol/client as a direct dependency.\nexport type { ToolAnnotations } from '@modelcontextprotocol/client';\n// Re-export the MCP LoggingLevel for convenience\nexport type { LoggingLevel } from '@modelcontextprotocol/client';\n/** The identity (`serverInfo`) a server announced when the connection was established. */\nexport type { Implementation as MCPServerImplementation } from '@modelcontextprotocol/client';\n\n/** The current protocol revision; the one `/mcp` servers speak. */\nexport const MCP_CLIENT_PROTOCOL_VERSION = '2026-07-28' as const;\n\n/**\n * Which protocol revision to speak to a server.\n *\n * - `'2026-07-28'`: the current revision only. No probe, no fallback; a server\n *   that does not offer it fails to connect.\n * - `'legacy'`: the pre-2026 `initialize` handshake only. Use it for servers known\n *   not to have upgraded, to skip the probe.\n *\n * When omitted the client probes with `server/discover` and speaks whichever\n * revision the server offers.\n */\nexport type MCPClientProtocolVersion = typeof MCP_CLIENT_PROTOCOL_VERSION | 'legacy';\n\n/**\n * Extended fetch function type that receives the current request context as a third argument.\n *\n * This allows custom fetch implementations to access request-scoped data (e.g., authentication\n * cookies, bearer tokens) from the incoming request and forward them to the MCP server.\n *\n * The `requestContext` parameter is `null` when no context is available (e.g., during\n * initial connection or when a tool is called without a request context).\n *\n * @example\n * ```typescript\n * const mcp = new MCPClient({\n *   servers: {\n *     myServer: {\n *       url: new URL('https://api.example.com/mcp'),\n *       fetch: (url, init, requestContext) => {\n *         const headers = new Headers(init?.headers);\n *         const cookie = requestContext?.get('cookie');\n *         if (cookie) {\n *           headers.set('cookie', cookie);\n *         }\n *         return fetch(url, { ...init, headers });\n *       },\n *     },\n *   },\n * });\n * ```\n */\nexport type MastraFetchLike = (\n  url: string | URL,\n  init?: RequestInit,\n  requestContext?: RequestContext | null,\n) => Promise<Response>;\n\n/**\n * Log message structure for MCP client logging.\n */\nexport interface LogMessage {\n  /** Logging level (debug, info, warning, error, etc.) */\n  level: LoggingLevel;\n  /** Log message content */\n  message: string;\n  /** Timestamp when the log was created */\n  timestamp: Date;\n  /** Name of the MCP server that generated the log */\n  serverName: string;\n  /** Optional additional details */\n  details?: Record<string, any>;\n  requestContext?: RequestContext | null;\n}\n\n/**\n * Handler function for processing log messages from MCP servers.\n */\nexport type LogHandler = (logMessage: LogMessage) => void;\n\n/**\n * Handler function for processing progress notifications from MCP servers.\n *\n * @param params - The progress notification parameters including message and status\n */\nexport type ProgressHandler = (params: ProgressNotification['params']) => void;\n\n/**\n * One keyed input request embedded in an `input_required` result.\n *\n * Servers on the 2026-07-28 revision obtain user input by answering `tools/call`,\n * `resources/read`, or `prompts/get` with `input_required` instead of pushing a request\n * to the client. Every embedded request carries the server-chosen `key` it must be\n * answered under; the client retries the originating call with the collected responses.\n */\nexport interface MCPInputRequest {\n  /** Server-chosen key this response is filed under for the retry. */\n  key: string;\n  /** Elicitation parameters: form mode (`requestedSchema`) or url mode (`url`). */\n  params: ElicitRequestParams;\n  /** Aborted when the originating call is cancelled or times out. */\n  signal: AbortSignal;\n}\n\n/**\n * Supplies the response for one embedded input request.\n *\n * Return `{ action: 'accept', content }` with content matching `params.requestedSchema`,\n * or `{ action: 'decline' }` / `{ action: 'cancel' }`. The handler is called once per\n * request per round; earlier rounds' responses are never re-sent.\n */\nexport type MCPInputRequestHandler = (request: MCPInputRequest) => Promise<ElicitResult>;\n\n/**\n * Client capabilities a Mastra MCP client may advertise.\n *\n * `elicitation` is only accepted together with an `inputRequests` handler; it defaults to\n * form support when a handler is configured. The deprecated roots and sampling\n * capabilities are not supported.\n */\nexport type MCPClientCapabilities = Pick<ClientCapabilities, 'elicitation' | 'extensions'>;\n\n/**\n * Context passed to `requireToolApproval` when it's a function.\n * Provides information about the tool call and the current execution environment.\n */\nexport interface RequireToolApprovalContext {\n  /** Name of the tool being called */\n  toolName: string;\n  /** Arguments the LLM is passing to the tool */\n  args: Record<string, unknown>;\n  /** Request-scoped context (e.g., user info, auth data) as a plain object */\n  requestContext?: Record<string, unknown>;\n  /**\n   * Tool annotations advertised by the MCP server in `tools/list` (title,\n   * readOnlyHint, destructiveHint, idempotentHint, openWorldHint).\n   *\n   * Use these to drive declarative, server-agnostic approval policies\n   * instead of hardcoding tool name lists.\n   *\n   * SECURITY (per MCP spec): annotations are **hints**, not guarantees.\n   * Clients MUST consider them untrusted unless they come from a trusted\n   * server. Do not use annotations alone as a security boundary — gate\n   * dangerous behaviour with `requireToolApproval: true` (or a server-name\n   * allowlist) for any server you do not control.\n   *\n   * Spec defaults when a hint is omitted: `readOnlyHint: false`,\n   * `destructiveHint: true`, `idempotentHint: false`, `openWorldHint: true`.\n   * This field is `undefined` (not auto-defaulted) when the server omits\n   * annotations entirely, so policies can distinguish \"no annotations\" from\n   * \"annotated as safe\".\n   */\n  annotations?: ToolAnnotations;\n}\n\n/**\n * Function type for dynamic tool approval logic.\n * Return `true` to require approval, `false` to allow execution.\n */\nexport type RequireToolApprovalFn = (ctx: RequireToolApprovalContext) => boolean | Promise<boolean>;\n\n/**\n * Whether tools from this server require explicit user approval before execution.\n *\n * - `true`: All tools from this server require approval.\n * - `false` or omitted: No approval required (default).\n * - Function: Called per tool invocation to dynamically decide.\n */\nexport type RequireToolApproval = boolean | RequireToolApprovalFn;\n\n/**\n * Base options common to all MCP server definitions.\n */\nexport type BaseServerOptions = {\n  /** Optional handler for server log messages */\n  logger?: LogHandler;\n  /**\n   * Pin the protocol revision instead of probing for it. See {@link MCPClientProtocolVersion}.\n   *\n   * Features the pre-2026 revisions lack (`subscriptions/listen`, embedded input\n   * requests) fail with an error naming the negotiated revision when the server\n   * turned out to be legacy.\n   */\n  protocolVersion?: MCPClientProtocolVersion;\n  /** Optional timeout in milliseconds for server operations */\n  timeout?: number;\n  /** Optional client capabilities to advertise to the server */\n  capabilities?: MCPClientCapabilities;\n  /**\n   * Whether to opt into per-request server logs (default: true).\n   *\n   * 2026-07-28 servers only emit `notifications/message` for requests that carry the\n   * `io.modelcontextprotocol/logLevel` metadata key; this option attaches it to every\n   * request and forwards delivered messages to `logger`.\n   */\n  enableServerLogs?: boolean;\n  /**\n   * Minimum severity requested from the server for per-request logs.\n   *\n   * @default 'info'\n   */\n  serverLogLevel?: LoggingLevel;\n  /** Whether to enable progress tracking (default: false) */\n  enableProgressTracking?: boolean;\n  /**\n   * Returns the W3C `traceparent`, `tracestate` and `baggage` values to attach\n   * to each outgoing MCP request's `_meta`.\n   *\n   * The provider is called when the request is sent so consumers can read from\n   * their own request-local trace carrier without coupling MCP to a tracing SDK.\n   * Explicit `_meta` keys supplied for a tool call take precedence.\n   */\n  traceContext?: () => MCPTraceContext | undefined;\n  /**\n   * Whether instructions returned by this MCP server during discovery should\n   * be forwarded to agents that use the server's tools.\n   *\n   * Disabled by default: forwarded instructions are injected into the agent's\n   * system prompt, so only enable this for servers you trust.\n   *\n   * @default false\n   */\n  forwardInstructions?: boolean;\n  /**\n   * Maximum number of characters of this server's instructions to forward into\n   * an agent system prompt.\n   *\n   * @default 512\n   */\n  instructionsMaxLength?: number;\n  /**\n   * Whether tools from this server require explicit user approval before execution.\n   *\n   * - `true`: All tools require approval before running.\n   * - `false` or omitted: Tools run without approval (default).\n   * - Function: Called per tool invocation with context to dynamically decide.\n   *\n   * @example\n   * ```typescript\n   * // Require approval for all tools\n   * requireToolApproval: true\n   *\n   * // Dynamic approval based on tool name or args\n   * requireToolApproval: ({ toolName, args }) => {\n   *   if (toolName === 'list_repos') return false;\n   *   if (toolName === 'delete_repo') return true;\n   *   return false;\n   * }\n   *\n   * // Declarative, server-agnostic approval driven by MCP tool annotations.\n   * // NOTE: only sound for trusted servers — annotations are hints, not\n   * // guarantees, per the MCP spec.\n   * requireToolApproval: ({ annotations }) => {\n   *   // No annotations? Assume the worst (spec default: destructive).\n   *   if (!annotations) return true;\n   *   if (annotations.readOnlyHint) return false;\n   *   if (annotations.destructiveHint) return true;\n   *   return false;\n   * }\n   * ```\n   */\n  requireToolApproval?: RequireToolApproval;\n  /**\n   * How to handle MCP tool *execution* failures, which a spec-compliant server\n   * reports in-band by returning a normal `CallToolResult` with `isError: true`\n   * and the failure details in `content`.\n   *\n   * - `'throw'` (default): surface the failure on Mastra's failed-tool-call path\n   *   by throwing a `MastraError` that carries the server's `content` text. Tool\n   *   spans, stream chunks, scorers, and persisted message parts then reflect the\n   *   failure, and the model sees the error text so it can self-correct.\n   * - `'return'`: resolve successfully with the raw result (or `structuredContent`),\n   *   ignoring `isError`.\n   *\n   * @default 'throw'\n   */\n  onToolError?: 'throw' | 'return';\n  /**\n   * Optional custom JSON Schema validator forwarded to the underlying MCP\n   * client. Use this to opt into a non-default validator implementation.\n   *\n   * Pass `CfWorkerJsonSchemaValidator` (from\n   * `@modelcontextprotocol/client/validators/cf-worker`) when running in\n   * Cloudflare Workers / V8 isolates: the default `AjvJsonSchemaValidator`\n   * compiles validators with `new Function(...)`, which workerd refuses to\n   * evaluate when a tool advertises an `outputSchema`.\n   */\n  jsonSchemaValidator?: jsonSchemaValidator;\n  /**\n   * Answers embedded input requests (`input_required` results) from this server.\n   *\n   * Configuring a handler advertises form elicitation support; widen it with\n   * `capabilities.elicitation` to accept url-mode requests too. Without a handler\n   * an `input_required` result is surfaced as a typed error.\n   *\n   * @example\n   * ```typescript\n   * {\n   *   url: new URL('https://example/mcp'),\n   *   inputRequests: async ({ key, params }) => {\n   *     if (params.mode === 'url') return { action: 'decline' };\n   *     const content = await promptUser(key, params.requestedSchema);\n   *     return { action: 'accept', content };\n   *   },\n   * }\n   * ```\n   */\n  inputRequests?: MCPInputRequestHandler;\n};\n\n/**\n * Configuration for MCP servers using stdio (subprocess) transport.\n *\n * Used when the MCP server is spawned as a subprocess that communicates via stdin/stdout.\n */\nexport type StdioServerDefinition = BaseServerOptions & {\n  /** Command to execute (e.g., 'node', 'python', 'npx') */\n  command: string;\n  /** Optional arguments to pass to the command */\n  args?: string[];\n  /** Optional environment variables for the subprocess */\n  env?: Record<string, string>;\n  /**\n   * Whether the subprocess environment starts from the MCP SDK's default\n   * inherited environment. Defaults to `true`.\n   *\n   * The default is NOT the full `process.env`: the SDK's\n   * `getDefaultEnvironment()` inherits only a curated platform whitelist —\n   * on POSIX: `HOME`, `LOGNAME`, `PATH`, `SHELL`, `TERM`, `USER`; on Windows:\n   * `APPDATA`, `HOMEDRIVE`, `HOMEPATH`, `LOCALAPPDATA`, `PATH`,\n   * `PROCESSOR_ARCHITECTURE`, `SYSTEMDRIVE`, `SYSTEMROOT`, `TEMP`, `USERNAME`,\n   * `USERPROFILE` — and skips functions and variables starting with `()`.\n   *\n   * When `false`, the subprocess environment base is empty (`{}`) and only the\n   * variables explicitly listed in `env` are passed to the subprocess. Note\n   * that a subprocess without `PATH` may fail to spawn commands that are not\n   * absolute paths.\n   */\n  inheritDefaultEnv?: boolean;\n  /**\n   * How to handle stderr of the child process. Matches the semantics of Node's `child_process.spawn`.\n   *\n   * - `\"inherit\"` (default): stderr is printed to the parent process's stderr\n   * - `\"pipe\"`: stderr is captured and available via `StdioClientTransport.stderr`\n   * - `\"ignore\"`: stderr is discarded\n   */\n  stderr?: IOType;\n  /**\n   * The working directory to use when spawning the subprocess.\n   *\n   * If not specified, the current working directory will be inherited.\n   */\n  cwd?: string;\n\n  url?: never;\n  requestInit?: never;\n  authProvider?: never;\n  connectTimeout?: never;\n  fetch?: never;\n  allowedHosts?: never;\n};\n\n/**\n * Configuration for MCP servers using the Streamable HTTP transport.\n *\n * When `fetch` is provided, `requestInit` and `authProvider` become optional, as the custom\n * fetch function can handle authentication and request customization.\n */\nexport type HttpServerDefinition = BaseServerOptions & {\n  /** URL of the MCP server endpoint */\n  url: URL;\n\n  command?: never;\n  args?: never;\n  env?: never;\n  inheritDefaultEnv?: never;\n  stderr?: never;\n  cwd?: never;\n\n  /**\n   * Custom fetch implementation used for all network requests.\n   *\n   * When provided, this function will be used for all HTTP requests, allowing you to:\n   * - Add dynamic authentication headers (e.g., refreshing bearer tokens)\n   * - Forward request-scoped data (cookies, tokens) from the incoming request to the MCP server\n   * - Customize request behavior per-request\n   * - Intercept and modify requests/responses\n   *\n   * The third `requestContext` parameter provides access to request-scoped data set by middleware\n   * or passed during agent/tool execution. It is `null` when no context is available (e.g.,\n   * during the initial connection).\n   *\n   * @example\n   * ```typescript\n   * {\n   *   url: new URL('https://api.example.com/mcp'),\n   *   fetch: async (url, init, requestContext) => {\n   *     const headers = new Headers(init?.headers);\n   *     // Forward auth cookie from the incoming request\n   *     const cookie = requestContext?.get('cookie');\n   *     if (cookie) {\n   *       headers.set('cookie', cookie);\n   *     }\n   *     return fetch(url, { ...init, headers });\n   *   },\n   * }\n   * ```\n   */\n  fetch?: MastraFetchLike;\n  /**\n   * Optional allowlist of hosts this server's HTTP requests may target.\n   *\n   * When set, every outgoing request made on behalf of this server (initial\n   * connect, Streamable HTTP POSTs, OAuth discovery/token requests routed\n   * through the transport fetch, and every redirect hop) is checked against\n   * this list. When unset, no restriction applies.\n   *\n   * Matching semantics:\n   * - Entries are host values matched against `URL.host` — the hostname plus\n   *   the port when the URL carries a non-default port. WHATWG URL elides\n   *   default ports, so `https://x.com:443` has host `x.com` and matches the\n   *   entry `'x.com'`, not `'x.com:443'`. Examples: `'api.example.com'`,\n   *   `'localhost:8080'`.\n   * - Matching is exact and case-insensitive on the hostname. No wildcards.\n   * - The URL scheme is NOT checked — matching is host-only, so `http://` and\n   *   `https://` URLs to an allowed host both pass. The `Authorization` header\n   *   is still dropped on any cross-origin redirect hop (scheme, host, or port\n   *   change), so a same-host scheme downgrade never re-sends credentials.\n   * - An empty array (`allowedHosts: []`) denies all hosts.\n   *\n   * Enforcement strength varies by path:\n   * - On the default path (no custom `fetch`), requests to disallowed hosts —\n   *   including redirect hops, via manual redirect following — are blocked\n   *   BEFORE being sent.\n   * - When a custom `fetch` is in play, the initial URL is checked before the\n   *   request, but redirect hops are validated post-hoc via `response.url`:\n   *   the outbound hop may occur, but the response never reaches the caller\n   *   or the model. A hand-built `Response` with an empty `response.url` skips\n   *   the post-hoc check (documented limitation — custom fetches legitimately\n   *   construct such responses).\n   *\n   * OAuth note: the SDK routes OAuth discovery and token requests through the\n   * transport's fetch, so when using an `authProvider` whose authorization\n   * server lives on a different host, that host must also be allowlisted.\n   */\n  allowedHosts?: string[];\n  /** Optional request configuration for HTTP requests (optional when `fetch` is provided) */\n  requestInit?: StreamableHTTPClientTransportOptions['requestInit'];\n  /** Optional authentication provider for HTTP requests (optional when `fetch` is provided) */\n  authProvider?: StreamableHTTPClientTransportOptions['authProvider'];\n  /** Optional timeout in milliseconds for the connection phase (default: 3000ms). */\n  connectTimeout?: number;\n};\n\n/**\n * Configuration for connecting to an MCP server.\n *\n * Either stdio-based (subprocess) or HTTP-based (remote server). The transport type is\n * automatically detected based on whether `command` or `url` is provided.\n *\n * @example\n * ```typescript\n * // Stdio server\n * const stdioServer: MastraMCPServerDefinition = {\n *   command: 'npx',\n *   args: ['tsx', 'server.ts'],\n *   env: { API_KEY: 'secret' }\n * };\n *\n * // HTTP server with static headers\n * const httpServer: MastraMCPServerDefinition = {\n *   url: new URL('http://localhost:8080/mcp'),\n *   requestInit: {\n *     headers: { Authorization: 'Bearer token' }\n *   }\n * };\n * ```\n */\nexport type MastraMCPServerDefinition = StdioServerDefinition | HttpServerDefinition;\n\n/**\n * Options for creating an internal MCP client instance.\n *\n * @internal\n */\nexport type InternalMastraMCPClientOptions = {\n  /** Name identifier for this client */\n  name: string;\n  /** Server connection configuration */\n  server: MastraMCPServerDefinition;\n  /** Optional client version */\n  version?: string;\n  /** Optional timeout in milliseconds */\n  timeout?: number;\n};\n\n/**\n * A fully serializable description of a single tool advertised by an MCP server.\n *\n * This is the data returned by the MCP `tools/list` response, plus the server metadata needed\n * to reconstruct the tool faithfully. It contains no functions, class instances or references\n * to a live client, so it survives `JSON.stringify` and can be cached in Redis, a database, or\n * a build artifact and reused by other processes.\n *\n * Obtain these via {@link MCPClient.listToolDefinitions} and turn them back into executable\n * tools with {@link MCPClient.toolFromDefinition}.\n */\nexport type SerializableMCPToolDefinition = {\n  /** Tool name as advertised by the server, without any server namespace prefix. */\n  name: string;\n  /** Human readable display name from the server, if it supplied one. */\n  title?: string;\n  /** Human readable description from the server, if it supplied one. */\n  description?: string;\n  /** Raw JSON Schema for the tool's arguments, exactly as sent by the server. */\n  inputSchema: unknown;\n  /** Raw JSON Schema for the tool's structured output, if the server declared one. */\n  outputSchema?: unknown;\n  /** Server-advertised annotations (title, readOnlyHint, destructiveHint, ...). */\n  annotations?: ToolAnnotations;\n  /** Server-supplied `_meta`, including `ui.resourceUri` for MCP Apps. */\n  _meta?: Record<string, unknown>;\n  /**\n   * Metadata about the server that advertised this tool.\n   *\n   * Captured at discovery time because it is otherwise only available from a live connection.\n   * Without it, hydrating a tool would silently drop the server version and instructions that\n   * a normally discovered tool carries.\n   */\n  server: {\n    /** The name this server is configured under. */\n    name: string;\n    /** Server version reported during discovery, if any. */\n    version?: string;\n    /** Instructions the server returned during discovery, if any. */\n    instructions?: string;\n  };\n};\n\n/**\n * A serializable catalog of MCP tool definitions, keyed by server name and then tool name.\n *\n * This is the shape returned by {@link MCPClient.listToolDefinitions}.\n */\nexport type SerializableMCPToolCatalog = Record<string, Record<string, SerializableMCPToolDefinition>>;\n","//#region \\0rolldown/runtime.js\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\tkey = keys[i];\n\t\tif (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {\n\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/json-schema-traverse/1.0.0/57629b43e2af2bb885dfbbc8334b79bda8a7cd4a9b7fff008a3a0a2e53fb18be/node_modules/json-schema-traverse/index.js\nvar require_json_schema_traverse = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tvar traverse = module.exports = function(schema, opts, cb) {\n\t\tif (typeof opts == \"function\") {\n\t\t\tcb = opts;\n\t\t\topts = {};\n\t\t}\n\t\tcb = opts.cb || cb;\n\t\tvar pre = typeof cb == \"function\" ? cb : cb.pre || function() {};\n\t\tvar post = cb.post || function() {};\n\t\t_traverse(opts, pre, post, schema, \"\", schema);\n\t};\n\ttraverse.keywords = {\n\t\tadditionalItems: true,\n\t\titems: true,\n\t\tcontains: true,\n\t\tadditionalProperties: true,\n\t\tpropertyNames: true,\n\t\tnot: true,\n\t\tif: true,\n\t\tthen: true,\n\t\telse: true\n\t};\n\ttraverse.arrayKeywords = {\n\t\titems: true,\n\t\tallOf: true,\n\t\tanyOf: true,\n\t\toneOf: true\n\t};\n\ttraverse.propsKeywords = {\n\t\t$defs: true,\n\t\tdefinitions: true,\n\t\tproperties: true,\n\t\tpatternProperties: true,\n\t\tdependencies: true\n\t};\n\ttraverse.skipKeywords = {\n\t\tdefault: true,\n\t\tenum: true,\n\t\tconst: true,\n\t\trequired: true,\n\t\tmaximum: true,\n\t\tminimum: true,\n\t\texclusiveMaximum: true,\n\t\texclusiveMinimum: true,\n\t\tmultipleOf: true,\n\t\tmaxLength: true,\n\t\tminLength: true,\n\t\tpattern: true,\n\t\tformat: true,\n\t\tmaxItems: true,\n\t\tminItems: true,\n\t\tuniqueItems: true,\n\t\tmaxProperties: true,\n\t\tminProperties: true\n\t};\n\tfunction _traverse(opts, pre, post, schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex) {\n\t\tif (schema && typeof schema == \"object\" && !Array.isArray(schema)) {\n\t\t\tpre(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n\t\t\tfor (var key in schema) {\n\t\t\t\tvar sch = schema[key];\n\t\t\t\tif (Array.isArray(sch)) {\n\t\t\t\t\tif (key in traverse.arrayKeywords) for (var i = 0; i < sch.length; i++) _traverse(opts, pre, post, sch[i], jsonPtr + \"/\" + key + \"/\" + i, rootSchema, jsonPtr, key, schema, i);\n\t\t\t\t} else if (key in traverse.propsKeywords) {\n\t\t\t\t\tif (sch && typeof sch == \"object\") for (var prop in sch) _traverse(opts, pre, post, sch[prop], jsonPtr + \"/\" + key + \"/\" + escapeJsonPtr(prop), rootSchema, jsonPtr, key, schema, prop);\n\t\t\t\t} else if (key in traverse.keywords || opts.allKeys && !(key in traverse.skipKeywords)) _traverse(opts, pre, post, sch, jsonPtr + \"/\" + key, rootSchema, jsonPtr, key, schema);\n\t\t\t}\n\t\t\tpost(schema, jsonPtr, rootSchema, parentJsonPtr, parentKeyword, parentSchema, keyIndex);\n\t\t}\n\t}\n\tfunction escapeJsonPtr(str) {\n\t\treturn str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n\t}\n}));\n//#endregion\nexport { __commonJSMin as n, __toESM as r, require_json_schema_traverse as t };\n\n//# sourceMappingURL=json-schema-traverse-B35mHRM8.js.map","export var util;\n(function (util) {\n    util.assertEqual = (_) => { };\n    function assertIs(_arg) { }\n    util.assertIs = assertIs;\n    function assertNever(_x) {\n        throw new Error();\n    }\n    util.assertNever = assertNever;\n    util.arrayToEnum = (items) => {\n        const obj = {};\n        for (const item of items) {\n            obj[item] = item;\n        }\n        return obj;\n    };\n    util.getValidEnumValues = (obj) => {\n        const validKeys = util.objectKeys(obj).filter((k) => typeof obj[obj[k]] !== \"number\");\n        const filtered = {};\n        for (const k of validKeys) {\n            filtered[k] = obj[k];\n        }\n        return util.objectValues(filtered);\n    };\n    util.objectValues = (obj) => {\n        return util.objectKeys(obj).map(function (e) {\n            return obj[e];\n        });\n    };\n    util.objectKeys = typeof Object.keys === \"function\" // eslint-disable-line ban/ban\n        ? (obj) => Object.keys(obj) // eslint-disable-line ban/ban\n        : (object) => {\n            const keys = [];\n            for (const key in object) {\n                if (Object.prototype.hasOwnProperty.call(object, key)) {\n                    keys.push(key);\n                }\n            }\n            return keys;\n        };\n    util.find = (arr, checker) => {\n        for (const item of arr) {\n            if (checker(item))\n                return item;\n        }\n        return undefined;\n    };\n    util.isInteger = typeof Number.isInteger === \"function\"\n        ? (val) => Number.isInteger(val) // eslint-disable-line ban/ban\n        : (val) => typeof val === \"number\" && Number.isFinite(val) && Math.floor(val) === val;\n    function joinValues(array, separator = \" | \") {\n        return array.map((val) => (typeof val === \"string\" ? `'${val}'` : val)).join(separator);\n    }\n    util.joinValues = joinValues;\n    util.jsonStringifyReplacer = (_, value) => {\n        if (typeof value === \"bigint\") {\n            return value.toString();\n        }\n        return value;\n    };\n})(util || (util = {}));\nexport var objectUtil;\n(function (objectUtil) {\n    objectUtil.mergeShapes = (first, second) => {\n        return {\n            ...first,\n            ...second, // second overwrites first\n        };\n    };\n})(objectUtil || (objectUtil = {}));\nexport const ZodParsedType = util.arrayToEnum([\n    \"string\",\n    \"nan\",\n    \"number\",\n    \"integer\",\n    \"float\",\n    \"boolean\",\n    \"date\",\n    \"bigint\",\n    \"symbol\",\n    \"function\",\n    \"undefined\",\n    \"null\",\n    \"array\",\n    \"object\",\n    \"unknown\",\n    \"promise\",\n    \"void\",\n    \"never\",\n    \"map\",\n    \"set\",\n]);\nexport const getParsedType = (data) => {\n    const t = typeof data;\n    switch (t) {\n        case \"undefined\":\n            return ZodParsedType.undefined;\n        case \"string\":\n            return ZodParsedType.string;\n        case \"number\":\n            return Number.isNaN(data) ? ZodParsedType.nan : ZodParsedType.number;\n        case \"boolean\":\n            return ZodParsedType.boolean;\n        case \"function\":\n            return ZodParsedType.function;\n        case \"bigint\":\n            return ZodParsedType.bigint;\n        case \"symbol\":\n            return ZodParsedType.symbol;\n        case \"object\":\n            if (Array.isArray(data)) {\n                return ZodParsedType.array;\n            }\n            if (data === null) {\n                return ZodParsedType.null;\n            }\n            if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n                return ZodParsedType.promise;\n            }\n            if (typeof Map !== \"undefined\" && data instanceof Map) {\n                return ZodParsedType.map;\n            }\n            if (typeof Set !== \"undefined\" && data instanceof Set) {\n                return ZodParsedType.set;\n            }\n            if (typeof Date !== \"undefined\" && data instanceof Date) {\n                return ZodParsedType.date;\n            }\n            return ZodParsedType.object;\n        default:\n            return ZodParsedType.unknown;\n    }\n};\n","import { util } from \"./helpers/util.js\";\nexport const ZodIssueCode = util.arrayToEnum([\n    \"invalid_type\",\n    \"invalid_literal\",\n    \"custom\",\n    \"invalid_union\",\n    \"invalid_union_discriminator\",\n    \"invalid_enum_value\",\n    \"unrecognized_keys\",\n    \"invalid_arguments\",\n    \"invalid_return_type\",\n    \"invalid_date\",\n    \"invalid_string\",\n    \"too_small\",\n    \"too_big\",\n    \"invalid_intersection_types\",\n    \"not_multiple_of\",\n    \"not_finite\",\n]);\nexport const quotelessJson = (obj) => {\n    const json = JSON.stringify(obj, null, 2);\n    return json.replace(/\"([^\"]+)\":/g, \"$1:\");\n};\nexport class ZodError extends Error {\n    get errors() {\n        return this.issues;\n    }\n    constructor(issues) {\n        super();\n        this.issues = [];\n        this.addIssue = (sub) => {\n            this.issues = [...this.issues, sub];\n        };\n        this.addIssues = (subs = []) => {\n            this.issues = [...this.issues, ...subs];\n        };\n        const actualProto = new.target.prototype;\n        if (Object.setPrototypeOf) {\n            // eslint-disable-next-line ban/ban\n            Object.setPrototypeOf(this, actualProto);\n        }\n        else {\n            this.__proto__ = actualProto;\n        }\n        this.name = \"ZodError\";\n        this.issues = issues;\n    }\n    format(_mapper) {\n        const mapper = _mapper ||\n            function (issue) {\n                return issue.message;\n            };\n        const fieldErrors = { _errors: [] };\n        const processError = (error) => {\n            for (const issue of error.issues) {\n                if (issue.code === \"invalid_union\") {\n                    issue.unionErrors.map(processError);\n                }\n                else if (issue.code === \"invalid_return_type\") {\n                    processError(issue.returnTypeError);\n                }\n                else if (issue.code === \"invalid_arguments\") {\n                    processError(issue.argumentsError);\n                }\n                else if (issue.path.length === 0) {\n                    fieldErrors._errors.push(mapper(issue));\n                }\n                else {\n                    let curr = fieldErrors;\n                    let i = 0;\n                    while (i < issue.path.length) {\n                        const el = issue.path[i];\n                        const terminal = i === issue.path.length - 1;\n                        // `_errors` is reserved by this legacy format, so merge a matching path segment into the current node instead of treating its array as a child.\n                        if (el === \"_errors\") {\n                            if (terminal)\n                                curr._errors.push(mapper(issue));\n                            i++;\n                            continue;\n                        }\n                        // Create `el` as an own data property. A segment naming an inherited member (\"toString\", \"constructor\") would otherwise read through to the prototype, and assigning \"__proto__\" would hit the setter and walk into Object.prototype.\n                        if (!Object.prototype.hasOwnProperty.call(curr, el)) {\n                            if (el === \"__proto__\") {\n                                Object.defineProperty(curr, el, {\n                                    value: { _errors: [] },\n                                    writable: true,\n                                    enumerable: true,\n                                    configurable: true,\n                                });\n                            }\n                            else {\n                                curr[el] = { _errors: [] };\n                            }\n                        }\n                        curr = curr[el];\n                        if (terminal) {\n                            curr._errors.push(mapper(issue));\n                        }\n                        i++;\n                    }\n                }\n            }\n        };\n        processError(this);\n        return fieldErrors;\n    }\n    static assert(value) {\n        if (!(value instanceof ZodError)) {\n            throw new Error(`Not a ZodError: ${value}`);\n        }\n    }\n    toString() {\n        return this.message;\n    }\n    get message() {\n        return JSON.stringify(this.issues, util.jsonStringifyReplacer, 2);\n    }\n    get isEmpty() {\n        return this.issues.length === 0;\n    }\n    flatten(mapper = (issue) => issue.message) {\n        const fieldErrors = Object.create(null);\n        const formErrors = [];\n        for (const sub of this.issues) {\n            if (sub.path.length > 0) {\n                const firstEl = sub.path[0];\n                fieldErrors[firstEl] = fieldErrors[firstEl] || [];\n                fieldErrors[firstEl].push(mapper(sub));\n            }\n            else {\n                formErrors.push(mapper(sub));\n            }\n        }\n        return { formErrors, fieldErrors };\n    }\n    get formErrors() {\n        return this.flatten();\n    }\n}\nZodError.create = (issues) => {\n    const error = new ZodError(issues);\n    return error;\n};\n","import { ZodIssueCode } from \"../ZodError.js\";\nimport { util, ZodParsedType } from \"../helpers/util.js\";\nconst errorMap = (issue, _ctx) => {\n    let message;\n    switch (issue.code) {\n        case ZodIssueCode.invalid_type:\n            if (issue.received === ZodParsedType.undefined) {\n                message = \"Required\";\n            }\n            else {\n                message = `Expected ${issue.expected}, received ${issue.received}`;\n            }\n            break;\n        case ZodIssueCode.invalid_literal:\n            message = `Invalid literal value, expected ${JSON.stringify(issue.expected, util.jsonStringifyReplacer)}`;\n            break;\n        case ZodIssueCode.unrecognized_keys:\n            message = `Unrecognized key(s) in object: ${util.joinValues(issue.keys, \", \")}`;\n            break;\n        case ZodIssueCode.invalid_union:\n            message = `Invalid input`;\n            break;\n        case ZodIssueCode.invalid_union_discriminator:\n            message = `Invalid discriminator value. Expected ${util.joinValues(issue.options)}`;\n            break;\n        case ZodIssueCode.invalid_enum_value:\n            message = `Invalid enum value. Expected ${util.joinValues(issue.options)}, received '${issue.received}'`;\n            break;\n        case ZodIssueCode.invalid_arguments:\n            message = `Invalid function arguments`;\n            break;\n        case ZodIssueCode.invalid_return_type:\n            message = `Invalid function return type`;\n            break;\n        case ZodIssueCode.invalid_date:\n            message = `Invalid date`;\n            break;\n        case ZodIssueCode.invalid_string:\n            if (typeof issue.validation === \"object\") {\n                if (\"includes\" in issue.validation) {\n                    message = `Invalid input: must include \"${issue.validation.includes}\"`;\n                    if (typeof issue.validation.position === \"number\") {\n                        message = `${message} at one or more positions greater than or equal to ${issue.validation.position}`;\n                    }\n                }\n                else if (\"startsWith\" in issue.validation) {\n                    message = `Invalid input: must start with \"${issue.validation.startsWith}\"`;\n                }\n                else if (\"endsWith\" in issue.validation) {\n                    message = `Invalid input: must end with \"${issue.validation.endsWith}\"`;\n                }\n                else {\n                    util.assertNever(issue.validation);\n                }\n            }\n            else if (issue.validation !== \"regex\") {\n                message = `Invalid ${issue.validation}`;\n            }\n            else {\n                message = \"Invalid\";\n            }\n            break;\n        case ZodIssueCode.too_small:\n            if (issue.type === \"array\")\n                message = `Array must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `more than`} ${issue.minimum} element(s)`;\n            else if (issue.type === \"string\")\n                message = `String must contain ${issue.exact ? \"exactly\" : issue.inclusive ? `at least` : `over`} ${issue.minimum} character(s)`;\n            else if (issue.type === \"number\")\n                message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n            else if (issue.type === \"bigint\")\n                message = `Number must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${issue.minimum}`;\n            else if (issue.type === \"date\")\n                message = `Date must be ${issue.exact ? `exactly equal to ` : issue.inclusive ? `greater than or equal to ` : `greater than `}${new Date(Number(issue.minimum))}`;\n            else\n                message = \"Invalid input\";\n            break;\n        case ZodIssueCode.too_big:\n            if (issue.type === \"array\")\n                message = `Array must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `less than`} ${issue.maximum} element(s)`;\n            else if (issue.type === \"string\")\n                message = `String must contain ${issue.exact ? `exactly` : issue.inclusive ? `at most` : `under`} ${issue.maximum} character(s)`;\n            else if (issue.type === \"number\")\n                message = `Number must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n            else if (issue.type === \"bigint\")\n                message = `BigInt must be ${issue.exact ? `exactly` : issue.inclusive ? `less than or equal to` : `less than`} ${issue.maximum}`;\n            else if (issue.type === \"date\")\n                message = `Date must be ${issue.exact ? `exactly` : issue.inclusive ? `smaller than or equal to` : `smaller than`} ${new Date(Number(issue.maximum))}`;\n            else\n                message = \"Invalid input\";\n            break;\n        case ZodIssueCode.custom:\n            message = `Invalid input`;\n            break;\n        case ZodIssueCode.invalid_intersection_types:\n            message = `Intersection results could not be merged`;\n            break;\n        case ZodIssueCode.not_multiple_of:\n            message = `Number must be a multiple of ${issue.multipleOf}`;\n            break;\n        case ZodIssueCode.not_finite:\n            message = \"Number must be finite\";\n            break;\n        default:\n            message = _ctx.defaultError;\n            util.assertNever(issue);\n    }\n    return { message };\n};\nexport default errorMap;\n","import defaultErrorMap from \"./locales/en.js\";\nlet overrideErrorMap = defaultErrorMap;\nexport { defaultErrorMap };\nexport function setErrorMap(map) {\n    overrideErrorMap = map;\n}\nexport function getErrorMap() {\n    return overrideErrorMap;\n}\n","import { getErrorMap } from \"../errors.js\";\nimport defaultErrorMap from \"../locales/en.js\";\nexport const makeIssue = (params) => {\n    const { data, path, errorMaps, issueData } = params;\n    const fullPath = [...path, ...(issueData.path || [])];\n    const fullIssue = {\n        ...issueData,\n        path: fullPath,\n    };\n    if (issueData.message !== undefined) {\n        return {\n            ...issueData,\n            path: fullPath,\n            message: issueData.message,\n        };\n    }\n    let errorMessage = \"\";\n    const maps = errorMaps\n        .filter((m) => !!m)\n        .slice()\n        .reverse();\n    for (const map of maps) {\n        errorMessage = map(fullIssue, { data, defaultError: errorMessage }).message;\n    }\n    return {\n        ...issueData,\n        path: fullPath,\n        message: errorMessage,\n    };\n};\nexport const EMPTY_PATH = [];\nexport function addIssueToContext(ctx, issueData) {\n    const overrideMap = getErrorMap();\n    const issue = makeIssue({\n        issueData: issueData,\n        data: ctx.data,\n        path: ctx.path,\n        errorMaps: [\n            ctx.common.contextualErrorMap, // contextual error map is first priority\n            ctx.schemaErrorMap, // then schema-bound map if available\n            overrideMap, // then global override map\n            overrideMap === defaultErrorMap ? undefined : defaultErrorMap, // then global default map\n        ].filter((x) => !!x),\n    });\n    ctx.common.issues.push(issue);\n}\nexport class ParseStatus {\n    constructor() {\n        this.value = \"valid\";\n    }\n    dirty() {\n        if (this.value === \"valid\")\n            this.value = \"dirty\";\n    }\n    abort() {\n        if (this.value !== \"aborted\")\n            this.value = \"aborted\";\n    }\n    static mergeArray(status, results) {\n        const arrayValue = [];\n        for (const s of results) {\n            if (s.status === \"aborted\")\n                return INVALID;\n            if (s.status === \"dirty\")\n                status.dirty();\n            arrayValue.push(s.value);\n        }\n        return { status: status.value, value: arrayValue };\n    }\n    static async mergeObjectAsync(status, pairs) {\n        const syncPairs = [];\n        for (const pair of pairs) {\n            const key = await pair.key;\n            const value = await pair.value;\n            syncPairs.push({\n                key,\n                value,\n            });\n        }\n        return ParseStatus.mergeObjectSync(status, syncPairs);\n    }\n    static mergeObjectSync(status, pairs) {\n        const finalObject = {};\n        for (const pair of pairs) {\n            const { key, value } = pair;\n            if (key.status === \"aborted\")\n                return INVALID;\n            if (value.status === \"aborted\")\n                return INVALID;\n            if (key.status === \"dirty\")\n                status.dirty();\n            if (value.status === \"dirty\")\n                status.dirty();\n            if (key.value !== \"__proto__\" && (typeof value.value !== \"undefined\" || pair.alwaysSet)) {\n                finalObject[key.value] = value.value;\n            }\n        }\n        return { status: status.value, value: finalObject };\n    }\n}\nexport const INVALID = Object.freeze({\n    status: \"aborted\",\n});\nexport const DIRTY = (value) => ({ status: \"dirty\", value });\nexport const OK = (value) => ({ status: \"valid\", value });\nexport const isAborted = (x) => x.status === \"aborted\";\nexport const isDirty = (x) => x.status === \"dirty\";\nexport const isValid = (x) => x.status === \"valid\";\nexport const isAsync = (x) => typeof Promise !== \"undefined\" && x instanceof Promise;\n","export var errorUtil;\n(function (errorUtil) {\n    errorUtil.errToObj = (message) => typeof message === \"string\" ? { message } : message || {};\n    // biome-ignore lint/suspicious/noShadowRestrictedNames: renaming churns 31 v3 call sites\n    errorUtil.toString = (message) => typeof message === \"string\" ? message : message?.message;\n})(errorUtil || (errorUtil = {}));\n","import { ZodError, ZodIssueCode, } from \"./ZodError.js\";\nimport { defaultErrorMap, getErrorMap } from \"./errors.js\";\nimport { errorUtil } from \"./helpers/errorUtil.js\";\nimport { DIRTY, INVALID, OK, ParseStatus, addIssueToContext, isAborted, isAsync, isDirty, isValid, makeIssue, } from \"./helpers/parseUtil.js\";\nimport { util, ZodParsedType, getParsedType } from \"./helpers/util.js\";\nclass ParseInputLazyPath {\n    constructor(parent, value, path, key) {\n        this._cachedPath = [];\n        this.parent = parent;\n        this.data = value;\n        this._path = path;\n        this._key = key;\n    }\n    get path() {\n        if (!this._cachedPath.length) {\n            if (Array.isArray(this._key)) {\n                this._cachedPath.push(...this._path, ...this._key);\n            }\n            else {\n                this._cachedPath.push(...this._path, this._key);\n            }\n        }\n        return this._cachedPath;\n    }\n}\nconst handleResult = (ctx, result) => {\n    if (isValid(result)) {\n        return { success: true, data: result.value };\n    }\n    else {\n        if (!ctx.common.issues.length) {\n            throw new Error(\"Validation failed but no issues detected.\");\n        }\n        return {\n            success: false,\n            get error() {\n                if (this._error)\n                    return this._error;\n                const error = new ZodError(ctx.common.issues);\n                this._error = error;\n                return this._error;\n            },\n        };\n    }\n};\nfunction processCreateParams(params) {\n    if (!params)\n        return {};\n    const { errorMap, invalid_type_error, required_error, description } = params;\n    if (errorMap && (invalid_type_error || required_error)) {\n        throw new Error(`Can't use \"invalid_type_error\" or \"required_error\" in conjunction with custom error map.`);\n    }\n    if (errorMap)\n        return { errorMap: errorMap, description };\n    const customMap = (iss, ctx) => {\n        const { message } = params;\n        if (iss.code === \"invalid_enum_value\") {\n            return { message: message ?? ctx.defaultError };\n        }\n        if (typeof ctx.data === \"undefined\") {\n            return { message: message ?? required_error ?? ctx.defaultError };\n        }\n        if (iss.code !== \"invalid_type\")\n            return { message: ctx.defaultError };\n        return { message: message ?? invalid_type_error ?? ctx.defaultError };\n    };\n    return { errorMap: customMap, description };\n}\nexport class ZodType {\n    get description() {\n        return this._def.description;\n    }\n    _getType(input) {\n        return getParsedType(input.data);\n    }\n    _getOrReturnCtx(input, ctx) {\n        return (ctx || {\n            common: input.parent.common,\n            data: input.data,\n            parsedType: getParsedType(input.data),\n            schemaErrorMap: this._def.errorMap,\n            path: input.path,\n            parent: input.parent,\n        });\n    }\n    _processInputParams(input) {\n        return {\n            status: new ParseStatus(),\n            ctx: {\n                common: input.parent.common,\n                data: input.data,\n                parsedType: getParsedType(input.data),\n                schemaErrorMap: this._def.errorMap,\n                path: input.path,\n                parent: input.parent,\n            },\n        };\n    }\n    _parseSync(input) {\n        const result = this._parse(input);\n        if (isAsync(result)) {\n            throw new Error(\"Synchronous parse encountered promise.\");\n        }\n        return result;\n    }\n    _parseAsync(input) {\n        const result = this._parse(input);\n        return Promise.resolve(result);\n    }\n    parse(data, params) {\n        const result = this.safeParse(data, params);\n        if (result.success)\n            return result.data;\n        throw result.error;\n    }\n    safeParse(data, params) {\n        const ctx = {\n            common: {\n                issues: [],\n                async: params?.async ?? false,\n                contextualErrorMap: params?.errorMap,\n            },\n            path: params?.path || [],\n            schemaErrorMap: this._def.errorMap,\n            parent: null,\n            data,\n            parsedType: getParsedType(data),\n        };\n        const result = this._parseSync({ data, path: ctx.path, parent: ctx });\n        return handleResult(ctx, result);\n    }\n    \"~validate\"(data) {\n        const ctx = {\n            common: {\n                issues: [],\n                async: !!this[\"~standard\"].async,\n            },\n            path: [],\n            schemaErrorMap: this._def.errorMap,\n            parent: null,\n            data,\n            parsedType: getParsedType(data),\n        };\n        if (!this[\"~standard\"].async) {\n            try {\n                const result = this._parseSync({ data, path: [], parent: ctx });\n                return isValid(result)\n                    ? {\n                        value: result.value,\n                    }\n                    : {\n                        issues: ctx.common.issues,\n                    };\n            }\n            catch (err) {\n                if (err?.message?.toLowerCase()?.includes(\"encountered\")) {\n                    this[\"~standard\"].async = true;\n                }\n                ctx.common = {\n                    issues: [],\n                    async: true,\n                };\n            }\n        }\n        return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result)\n            ? {\n                value: result.value,\n            }\n            : {\n                issues: ctx.common.issues,\n            });\n    }\n    async parseAsync(data, params) {\n        const result = await this.safeParseAsync(data, params);\n        if (result.success)\n            return result.data;\n        throw result.error;\n    }\n    async safeParseAsync(data, params) {\n        const ctx = {\n            common: {\n                issues: [],\n                contextualErrorMap: params?.errorMap,\n                async: true,\n            },\n            path: params?.path || [],\n            schemaErrorMap: this._def.errorMap,\n            parent: null,\n            data,\n            parsedType: getParsedType(data),\n        };\n        const maybeAsyncResult = this._parse({ data, path: ctx.path, parent: ctx });\n        const result = await (isAsync(maybeAsyncResult) ? maybeAsyncResult : Promise.resolve(maybeAsyncResult));\n        return handleResult(ctx, result);\n    }\n    refine(check, message) {\n        const getIssueProperties = (val) => {\n            if (typeof message === \"string\" || typeof message === \"undefined\") {\n                return { message };\n            }\n            else if (typeof message === \"function\") {\n                return message(val);\n            }\n            else {\n                return message;\n            }\n        };\n        return this._refinement((val, ctx) => {\n            const result = check(val);\n            const setError = () => ctx.addIssue({\n                code: ZodIssueCode.custom,\n                ...getIssueProperties(val),\n            });\n            if (typeof Promise !== \"undefined\" && result instanceof Promise) {\n                return result.then((data) => {\n                    if (!data) {\n                        setError();\n                        return false;\n                    }\n                    else {\n                        return true;\n                    }\n                });\n            }\n            if (!result) {\n                setError();\n                return false;\n            }\n            else {\n                return true;\n            }\n        });\n    }\n    refinement(check, refinementData) {\n        return this._refinement((val, ctx) => {\n            if (!check(val)) {\n                ctx.addIssue(typeof refinementData === \"function\" ? refinementData(val, ctx) : refinementData);\n                return false;\n            }\n            else {\n                return true;\n            }\n        });\n    }\n    _refinement(refinement) {\n        return new ZodEffects({\n            schema: this,\n            typeName: ZodFirstPartyTypeKind.ZodEffects,\n            effect: { type: \"refinement\", refinement },\n        });\n    }\n    superRefine(refinement) {\n        return this._refinement(refinement);\n    }\n    constructor(def) {\n        /** Alias of safeParseAsync */\n        this.spa = this.safeParseAsync;\n        this._def = def;\n        this.parse = this.parse.bind(this);\n        this.safeParse = this.safeParse.bind(this);\n        this.parseAsync = this.parseAsync.bind(this);\n        this.safeParseAsync = this.safeParseAsync.bind(this);\n        this.spa = this.spa.bind(this);\n        this.refine = this.refine.bind(this);\n        this.refinement = this.refinement.bind(this);\n        this.superRefine = this.superRefine.bind(this);\n        this.optional = this.optional.bind(this);\n        this.nullable = this.nullable.bind(this);\n        this.nullish = this.nullish.bind(this);\n        this.array = this.array.bind(this);\n        this.promise = this.promise.bind(this);\n        this.or = this.or.bind(this);\n        this.and = this.and.bind(this);\n        this.transform = this.transform.bind(this);\n        this.brand = this.brand.bind(this);\n        this.default = this.default.bind(this);\n        this.catch = this.catch.bind(this);\n        this.describe = this.describe.bind(this);\n        this.pipe = this.pipe.bind(this);\n        this.readonly = this.readonly.bind(this);\n        this.isNullable = this.isNullable.bind(this);\n        this.isOptional = this.isOptional.bind(this);\n        this[\"~standard\"] = {\n            version: 1,\n            vendor: \"zod\",\n            validate: (data) => this[\"~validate\"](data),\n        };\n    }\n    optional() {\n        return ZodOptional.create(this, this._def);\n    }\n    nullable() {\n        return ZodNullable.create(this, this._def);\n    }\n    nullish() {\n        return this.nullable().optional();\n    }\n    array() {\n        return ZodArray.create(this);\n    }\n    promise() {\n        return ZodPromise.create(this, this._def);\n    }\n    or(option) {\n        return ZodUnion.create([this, option], this._def);\n    }\n    and(incoming) {\n        return ZodIntersection.create(this, incoming, this._def);\n    }\n    transform(transform) {\n        return new ZodEffects({\n            ...processCreateParams(this._def),\n            schema: this,\n            typeName: ZodFirstPartyTypeKind.ZodEffects,\n            effect: { type: \"transform\", transform },\n        });\n    }\n    default(def) {\n        const defaultValueFunc = typeof def === \"function\" ? def : () => def;\n        return new ZodDefault({\n            ...processCreateParams(this._def),\n            innerType: this,\n            defaultValue: defaultValueFunc,\n            typeName: ZodFirstPartyTypeKind.ZodDefault,\n        });\n    }\n    brand() {\n        return new ZodBranded({\n            typeName: ZodFirstPartyTypeKind.ZodBranded,\n            type: this,\n            ...processCreateParams(this._def),\n        });\n    }\n    catch(def) {\n        const catchValueFunc = typeof def === \"function\" ? def : () => def;\n        return new ZodCatch({\n            ...processCreateParams(this._def),\n            innerType: this,\n            catchValue: catchValueFunc,\n            typeName: ZodFirstPartyTypeKind.ZodCatch,\n        });\n    }\n    describe(description) {\n        const This = this.constructor;\n        return new This({\n            ...this._def,\n            description,\n        });\n    }\n    pipe(target) {\n        return ZodPipeline.create(this, target);\n    }\n    readonly() {\n        return ZodReadonly.create(this);\n    }\n    isOptional() {\n        return this.safeParse(undefined).success;\n    }\n    isNullable() {\n        return this.safeParse(null).success;\n    }\n}\nconst cuidRegex = /^c[^\\s-]{8,}$/i;\nconst cuid2Regex = /^[0-9a-z]+$/;\nconst ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;\n// const uuidRegex =\n//   /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;\nconst uuidRegex = /^[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;\nconst nanoidRegex = /^[a-z0-9_-]{21}$/i;\nconst jwtRegex = /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/;\nconst durationRegex = /^[-+]?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)?)??$/;\n// from https://stackoverflow.com/a/46181/1550155\n// old version: too slow, didn't support unicode\n// const emailRegex = /^((([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+(\\.([a-z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])+)*)|((\\x22)((((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(([\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]|\\x21|[\\x23-\\x5b]|[\\x5d-\\x7e]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(\\\\([\\x01-\\x09\\x0b\\x0c\\x0d-\\x7f]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]))))*(((\\x20|\\x09)*(\\x0d\\x0a))?(\\x20|\\x09)+)?(\\x22)))@((([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|\\d|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))\\.)+(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])*([a-z]|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])))$/i;\n//old email regex\n// const emailRegex = /^(([^<>()[\\].,;:\\s@\"]+(\\.[^<>()[\\].,;:\\s@\"]+)*)|(\".+\"))@((?!-)([^<>()[\\].,;:\\s@\"]+\\.)+[^<>()[\\].,;:\\s@\"]{1,})[^-<>()[\\].,;:\\s@\"]$/i;\n// eslint-disable-next-line\n// const emailRegex =\n//   /^(([^<>()[\\]\\\\.,;:\\s@\\\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\\\"]+)*)|(\\\".+\\\"))@((\\[(((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}))\\])|(\\[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})))\\])|([A-Za-z0-9]([A-Za-z0-9-]*[A-Za-z0-9])*(\\.[A-Za-z]{2,})+))$/;\n// const emailRegex =\n//   /^[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])?)*$/;\n// const emailRegex =\n//   /^(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$/i;\nconst emailRegex = /^(?!\\.)(?!.*\\.\\.)([A-Z0-9_'+\\-\\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\\-]*\\.)+[A-Z]{2,}$/i;\n// const emailRegex =\n//   /^[a-z0-9.!#$%&’*+/=?^_`{|}~-]+@[a-z0-9-]+(?:\\.[a-z0-9\\-]+)*$/i;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\nconst _emojiRegex = `^[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$`;\nlet emojiRegex;\n// faster, simpler, safer\nconst ipv4Regex = /^(?:(?: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])$/;\nconst ipv4CidrRegex = /^(?:(?: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])$/;\n// const ipv6Regex =\n// /^(([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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,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])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nconst base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;\n// https://base64.guru/standards/base64url\nconst base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;\n// simple\n// const dateRegexSource = `\\\\d{4}-\\\\d{2}-\\\\d{2}`;\n// no leap year validation\n// const dateRegexSource = `\\\\d{4}-((0[13578]|10|12)-31|(0[13-9]|1[0-2])-30|(0[1-9]|1[0-2])-(0[1-9]|1\\\\d|2\\\\d))`;\n// with leap year validation\nconst dateRegexSource = `((\\\\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])))`;\nconst dateRegex = new RegExp(`^${dateRegexSource}$`);\nfunction timeRegexSource(args) {\n    let secondsRegexSource = `[0-5]\\\\d`;\n    if (args.precision) {\n        secondsRegexSource = `${secondsRegexSource}\\\\.\\\\d{${args.precision}}`;\n    }\n    else if (args.precision == null) {\n        secondsRegexSource = `${secondsRegexSource}(\\\\.\\\\d+)?`;\n    }\n    const secondsQuantifier = args.precision ? \"+\" : \"?\"; // require seconds if precision is nonzero\n    return `([01]\\\\d|2[0-3]):[0-5]\\\\d(:${secondsRegexSource})${secondsQuantifier}`;\n}\nfunction timeRegex(args) {\n    return new RegExp(`^${timeRegexSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetimeRegex(args) {\n    let regex = `${dateRegexSource}T${timeRegexSource(args)}`;\n    const opts = [];\n    opts.push(args.local ? `Z?` : `Z`);\n    if (args.offset)\n        opts.push(`([+-]\\\\d{2}:?\\\\d{2})`);\n    regex = `${regex}(${opts.join(\"|\")})`;\n    return new RegExp(`^${regex}$`);\n}\nfunction isValidIP(ip, version) {\n    if ((version === \"v4\" || !version) && ipv4Regex.test(ip)) {\n        return true;\n    }\n    if ((version === \"v6\" || !version) && ipv6Regex.test(ip)) {\n        return true;\n    }\n    return false;\n}\nfunction isValidJWT(jwt, alg) {\n    if (!jwtRegex.test(jwt))\n        return false;\n    try {\n        const [header] = jwt.split(\".\");\n        if (!header)\n            return false;\n        // Convert base64url to base64\n        const base64 = header\n            .replace(/-/g, \"+\")\n            .replace(/_/g, \"/\")\n            .padEnd(header.length + ((4 - (header.length % 4)) % 4), \"=\");\n        // @ts-ignore\n        const decoded = JSON.parse(atob(base64));\n        if (typeof decoded !== \"object\" || decoded === null)\n            return false;\n        if (\"typ\" in decoded && decoded?.typ !== \"JWT\")\n            return false;\n        if (!decoded.alg)\n            return false;\n        if (alg && decoded.alg !== alg)\n            return false;\n        return true;\n    }\n    catch {\n        return false;\n    }\n}\nfunction isValidCidr(ip, version) {\n    if ((version === \"v4\" || !version) && ipv4CidrRegex.test(ip)) {\n        return true;\n    }\n    if ((version === \"v6\" || !version) && ipv6CidrRegex.test(ip)) {\n        return true;\n    }\n    return false;\n}\nexport class ZodString extends ZodType {\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = String(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.string) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.string,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const status = new ParseStatus();\n        let ctx = undefined;\n        for (const check of this._def.checks) {\n            if (check.kind === \"min\") {\n                if (input.data.length < check.value) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_small,\n                        minimum: check.value,\n                        type: \"string\",\n                        inclusive: true,\n                        exact: false,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"max\") {\n                if (input.data.length > check.value) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_big,\n                        maximum: check.value,\n                        type: \"string\",\n                        inclusive: true,\n                        exact: false,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"length\") {\n                const tooBig = input.data.length > check.value;\n                const tooSmall = input.data.length < check.value;\n                if (tooBig || tooSmall) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    if (tooBig) {\n                        addIssueToContext(ctx, {\n                            code: ZodIssueCode.too_big,\n                            maximum: check.value,\n                            type: \"string\",\n                            inclusive: true,\n                            exact: true,\n                            message: check.message,\n                        });\n                    }\n                    else if (tooSmall) {\n                        addIssueToContext(ctx, {\n                            code: ZodIssueCode.too_small,\n                            minimum: check.value,\n                            type: \"string\",\n                            inclusive: true,\n                            exact: true,\n                            message: check.message,\n                        });\n                    }\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"email\") {\n                if (!emailRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"email\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"emoji\") {\n                if (!emojiRegex) {\n                    emojiRegex = new RegExp(_emojiRegex, \"u\");\n                }\n                if (!emojiRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"emoji\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"uuid\") {\n                if (!uuidRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"uuid\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"nanoid\") {\n                if (!nanoidRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"nanoid\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"cuid\") {\n                if (!cuidRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"cuid\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"cuid2\") {\n                if (!cuid2Regex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"cuid2\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"ulid\") {\n                if (!ulidRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"ulid\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"url\") {\n                try {\n                    // @ts-ignore\n                    new URL(input.data);\n                }\n                catch {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"url\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"regex\") {\n                check.regex.lastIndex = 0;\n                const testResult = check.regex.test(input.data);\n                if (!testResult) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"regex\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"trim\") {\n                input.data = input.data.trim();\n            }\n            else if (check.kind === \"includes\") {\n                if (!input.data.includes(check.value, check.position)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: { includes: check.value, position: check.position },\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"toLowerCase\") {\n                input.data = input.data.toLowerCase();\n            }\n            else if (check.kind === \"toUpperCase\") {\n                input.data = input.data.toUpperCase();\n            }\n            else if (check.kind === \"startsWith\") {\n                if (!input.data.startsWith(check.value)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: { startsWith: check.value },\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"endsWith\") {\n                if (!input.data.endsWith(check.value)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: { endsWith: check.value },\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"datetime\") {\n                const regex = datetimeRegex(check);\n                if (!regex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: \"datetime\",\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"date\") {\n                const regex = dateRegex;\n                if (!regex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: \"date\",\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"time\") {\n                const regex = timeRegex(check);\n                if (!regex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_string,\n                        validation: \"time\",\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"duration\") {\n                if (!durationRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"duration\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"ip\") {\n                if (!isValidIP(input.data, check.version)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"ip\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"jwt\") {\n                if (!isValidJWT(input.data, check.alg)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"jwt\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"cidr\") {\n                if (!isValidCidr(input.data, check.version)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"cidr\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"base64\") {\n                if (!base64Regex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"base64\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"base64url\") {\n                if (!base64urlRegex.test(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        validation: \"base64url\",\n                        code: ZodIssueCode.invalid_string,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else {\n                util.assertNever(check);\n            }\n        }\n        return { status: status.value, value: input.data };\n    }\n    _regex(regex, validation, message) {\n        return this.refinement((data) => regex.test(data), {\n            validation,\n            code: ZodIssueCode.invalid_string,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    _addCheck(check) {\n        return new ZodString({\n            ...this._def,\n            checks: [...this._def.checks, check],\n        });\n    }\n    email(message) {\n        return this._addCheck({ kind: \"email\", ...errorUtil.errToObj(message) });\n    }\n    url(message) {\n        return this._addCheck({ kind: \"url\", ...errorUtil.errToObj(message) });\n    }\n    emoji(message) {\n        return this._addCheck({ kind: \"emoji\", ...errorUtil.errToObj(message) });\n    }\n    uuid(message) {\n        return this._addCheck({ kind: \"uuid\", ...errorUtil.errToObj(message) });\n    }\n    nanoid(message) {\n        return this._addCheck({ kind: \"nanoid\", ...errorUtil.errToObj(message) });\n    }\n    cuid(message) {\n        return this._addCheck({ kind: \"cuid\", ...errorUtil.errToObj(message) });\n    }\n    cuid2(message) {\n        return this._addCheck({ kind: \"cuid2\", ...errorUtil.errToObj(message) });\n    }\n    ulid(message) {\n        return this._addCheck({ kind: \"ulid\", ...errorUtil.errToObj(message) });\n    }\n    base64(message) {\n        return this._addCheck({ kind: \"base64\", ...errorUtil.errToObj(message) });\n    }\n    base64url(message) {\n        // base64url encoding is a modification of base64 that can safely be used in URLs and filenames\n        return this._addCheck({\n            kind: \"base64url\",\n            ...errorUtil.errToObj(message),\n        });\n    }\n    jwt(options) {\n        return this._addCheck({ kind: \"jwt\", ...errorUtil.errToObj(options) });\n    }\n    ip(options) {\n        return this._addCheck({ kind: \"ip\", ...errorUtil.errToObj(options) });\n    }\n    cidr(options) {\n        return this._addCheck({ kind: \"cidr\", ...errorUtil.errToObj(options) });\n    }\n    datetime(options) {\n        if (typeof options === \"string\") {\n            return this._addCheck({\n                kind: \"datetime\",\n                precision: null,\n                offset: false,\n                local: false,\n                message: options,\n            });\n        }\n        return this._addCheck({\n            kind: \"datetime\",\n            precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n            offset: options?.offset ?? false,\n            local: options?.local ?? false,\n            ...errorUtil.errToObj(options?.message),\n        });\n    }\n    date(message) {\n        return this._addCheck({ kind: \"date\", message });\n    }\n    time(options) {\n        if (typeof options === \"string\") {\n            return this._addCheck({\n                kind: \"time\",\n                precision: null,\n                message: options,\n            });\n        }\n        return this._addCheck({\n            kind: \"time\",\n            precision: typeof options?.precision === \"undefined\" ? null : options?.precision,\n            ...errorUtil.errToObj(options?.message),\n        });\n    }\n    duration(message) {\n        return this._addCheck({ kind: \"duration\", ...errorUtil.errToObj(message) });\n    }\n    regex(regex, message) {\n        return this._addCheck({\n            kind: \"regex\",\n            regex: regex,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    includes(value, options) {\n        return this._addCheck({\n            kind: \"includes\",\n            value: value,\n            position: options?.position,\n            ...errorUtil.errToObj(options?.message),\n        });\n    }\n    startsWith(value, message) {\n        return this._addCheck({\n            kind: \"startsWith\",\n            value: value,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    endsWith(value, message) {\n        return this._addCheck({\n            kind: \"endsWith\",\n            value: value,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    min(minLength, message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: minLength,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    max(maxLength, message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: maxLength,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    length(len, message) {\n        return this._addCheck({\n            kind: \"length\",\n            value: len,\n            ...errorUtil.errToObj(message),\n        });\n    }\n    /**\n     * Equivalent to `.min(1)`\n     */\n    nonempty(message) {\n        return this.min(1, errorUtil.errToObj(message));\n    }\n    trim() {\n        return new ZodString({\n            ...this._def,\n            checks: [...this._def.checks, { kind: \"trim\" }],\n        });\n    }\n    toLowerCase() {\n        return new ZodString({\n            ...this._def,\n            checks: [...this._def.checks, { kind: \"toLowerCase\" }],\n        });\n    }\n    toUpperCase() {\n        return new ZodString({\n            ...this._def,\n            checks: [...this._def.checks, { kind: \"toUpperCase\" }],\n        });\n    }\n    get isDatetime() {\n        return !!this._def.checks.find((ch) => ch.kind === \"datetime\");\n    }\n    get isDate() {\n        return !!this._def.checks.find((ch) => ch.kind === \"date\");\n    }\n    get isTime() {\n        return !!this._def.checks.find((ch) => ch.kind === \"time\");\n    }\n    get isDuration() {\n        return !!this._def.checks.find((ch) => ch.kind === \"duration\");\n    }\n    get isEmail() {\n        return !!this._def.checks.find((ch) => ch.kind === \"email\");\n    }\n    get isURL() {\n        return !!this._def.checks.find((ch) => ch.kind === \"url\");\n    }\n    get isEmoji() {\n        return !!this._def.checks.find((ch) => ch.kind === \"emoji\");\n    }\n    get isUUID() {\n        return !!this._def.checks.find((ch) => ch.kind === \"uuid\");\n    }\n    get isNANOID() {\n        return !!this._def.checks.find((ch) => ch.kind === \"nanoid\");\n    }\n    get isCUID() {\n        return !!this._def.checks.find((ch) => ch.kind === \"cuid\");\n    }\n    get isCUID2() {\n        return !!this._def.checks.find((ch) => ch.kind === \"cuid2\");\n    }\n    get isULID() {\n        return !!this._def.checks.find((ch) => ch.kind === \"ulid\");\n    }\n    get isIP() {\n        return !!this._def.checks.find((ch) => ch.kind === \"ip\");\n    }\n    get isCIDR() {\n        return !!this._def.checks.find((ch) => ch.kind === \"cidr\");\n    }\n    get isBase64() {\n        return !!this._def.checks.find((ch) => ch.kind === \"base64\");\n    }\n    get isBase64url() {\n        // base64url encoding is a modification of base64 that can safely be used in URLs and filenames\n        return !!this._def.checks.find((ch) => ch.kind === \"base64url\");\n    }\n    get minLength() {\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n        }\n        return min;\n    }\n    get maxLength() {\n        let max = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return max;\n    }\n}\nZodString.create = (params) => {\n    return new ZodString({\n        checks: [],\n        typeName: ZodFirstPartyTypeKind.ZodString,\n        coerce: params?.coerce ?? false,\n        ...processCreateParams(params),\n    });\n};\n// https://stackoverflow.com/questions/3966484/why-does-modulus-operator-return-fractional-number-in-javascript/31711034#31711034\nfunction floatSafeRemainder(val, step) {\n    const valDecCount = (val.toString().split(\".\")[1] || \"\").length;\n    const stepDecCount = (step.toString().split(\".\")[1] || \"\").length;\n    const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;\n    const valInt = Number.parseInt(val.toFixed(decCount).replace(\".\", \"\"));\n    const stepInt = Number.parseInt(step.toFixed(decCount).replace(\".\", \"\"));\n    return (valInt % stepInt) / 10 ** decCount;\n}\nexport class ZodNumber extends ZodType {\n    constructor() {\n        super(...arguments);\n        this.min = this.gte;\n        this.max = this.lte;\n        this.step = this.multipleOf;\n    }\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = Number(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.number) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.number,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        let ctx = undefined;\n        const status = new ParseStatus();\n        for (const check of this._def.checks) {\n            if (check.kind === \"int\") {\n                if (!util.isInteger(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.invalid_type,\n                        expected: \"integer\",\n                        received: \"float\",\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"min\") {\n                const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n                if (tooSmall) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_small,\n                        minimum: check.value,\n                        type: \"number\",\n                        inclusive: check.inclusive,\n                        exact: false,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"max\") {\n                const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n                if (tooBig) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_big,\n                        maximum: check.value,\n                        type: \"number\",\n                        inclusive: check.inclusive,\n                        exact: false,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"multipleOf\") {\n                if (floatSafeRemainder(input.data, check.value) !== 0) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.not_multiple_of,\n                        multipleOf: check.value,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"finite\") {\n                if (!Number.isFinite(input.data)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.not_finite,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else {\n                util.assertNever(check);\n            }\n        }\n        return { status: status.value, value: input.data };\n    }\n    gte(value, message) {\n        return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n    }\n    gt(value, message) {\n        return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n    }\n    lte(value, message) {\n        return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n    }\n    lt(value, message) {\n        return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n    }\n    setLimit(kind, value, inclusive, message) {\n        return new ZodNumber({\n            ...this._def,\n            checks: [\n                ...this._def.checks,\n                {\n                    kind,\n                    value,\n                    inclusive,\n                    message: errorUtil.toString(message),\n                },\n            ],\n        });\n    }\n    _addCheck(check) {\n        return new ZodNumber({\n            ...this._def,\n            checks: [...this._def.checks, check],\n        });\n    }\n    int(message) {\n        return this._addCheck({\n            kind: \"int\",\n            message: errorUtil.toString(message),\n        });\n    }\n    positive(message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: 0,\n            inclusive: false,\n            message: errorUtil.toString(message),\n        });\n    }\n    negative(message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: 0,\n            inclusive: false,\n            message: errorUtil.toString(message),\n        });\n    }\n    nonpositive(message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: 0,\n            inclusive: true,\n            message: errorUtil.toString(message),\n        });\n    }\n    nonnegative(message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: 0,\n            inclusive: true,\n            message: errorUtil.toString(message),\n        });\n    }\n    multipleOf(value, message) {\n        return this._addCheck({\n            kind: \"multipleOf\",\n            value: value,\n            message: errorUtil.toString(message),\n        });\n    }\n    finite(message) {\n        return this._addCheck({\n            kind: \"finite\",\n            message: errorUtil.toString(message),\n        });\n    }\n    safe(message) {\n        return this._addCheck({\n            kind: \"min\",\n            inclusive: true,\n            value: Number.MIN_SAFE_INTEGER,\n            message: errorUtil.toString(message),\n        })._addCheck({\n            kind: \"max\",\n            inclusive: true,\n            value: Number.MAX_SAFE_INTEGER,\n            message: errorUtil.toString(message),\n        });\n    }\n    get minValue() {\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n        }\n        return min;\n    }\n    get maxValue() {\n        let max = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return max;\n    }\n    get isInt() {\n        return !!this._def.checks.find((ch) => ch.kind === \"int\" || (ch.kind === \"multipleOf\" && util.isInteger(ch.value)));\n    }\n    get isFinite() {\n        let max = null;\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"finite\" || ch.kind === \"int\" || ch.kind === \"multipleOf\") {\n                return true;\n            }\n            else if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n            else if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return Number.isFinite(min) && Number.isFinite(max);\n    }\n}\nZodNumber.create = (params) => {\n    return new ZodNumber({\n        checks: [],\n        typeName: ZodFirstPartyTypeKind.ZodNumber,\n        coerce: params?.coerce || false,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodBigInt extends ZodType {\n    constructor() {\n        super(...arguments);\n        this.min = this.gte;\n        this.max = this.lte;\n    }\n    _parse(input) {\n        if (this._def.coerce) {\n            try {\n                input.data = BigInt(input.data);\n            }\n            catch {\n                return this._getInvalidInput(input);\n            }\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.bigint) {\n            return this._getInvalidInput(input);\n        }\n        let ctx = undefined;\n        const status = new ParseStatus();\n        for (const check of this._def.checks) {\n            if (check.kind === \"min\") {\n                const tooSmall = check.inclusive ? input.data < check.value : input.data <= check.value;\n                if (tooSmall) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_small,\n                        type: \"bigint\",\n                        minimum: check.value,\n                        inclusive: check.inclusive,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"max\") {\n                const tooBig = check.inclusive ? input.data > check.value : input.data >= check.value;\n                if (tooBig) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_big,\n                        type: \"bigint\",\n                        maximum: check.value,\n                        inclusive: check.inclusive,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"multipleOf\") {\n                if (input.data % check.value !== BigInt(0)) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.not_multiple_of,\n                        multipleOf: check.value,\n                        message: check.message,\n                    });\n                    status.dirty();\n                }\n            }\n            else {\n                util.assertNever(check);\n            }\n        }\n        return { status: status.value, value: input.data };\n    }\n    _getInvalidInput(input) {\n        const ctx = this._getOrReturnCtx(input);\n        addIssueToContext(ctx, {\n            code: ZodIssueCode.invalid_type,\n            expected: ZodParsedType.bigint,\n            received: ctx.parsedType,\n        });\n        return INVALID;\n    }\n    gte(value, message) {\n        return this.setLimit(\"min\", value, true, errorUtil.toString(message));\n    }\n    gt(value, message) {\n        return this.setLimit(\"min\", value, false, errorUtil.toString(message));\n    }\n    lte(value, message) {\n        return this.setLimit(\"max\", value, true, errorUtil.toString(message));\n    }\n    lt(value, message) {\n        return this.setLimit(\"max\", value, false, errorUtil.toString(message));\n    }\n    setLimit(kind, value, inclusive, message) {\n        return new ZodBigInt({\n            ...this._def,\n            checks: [\n                ...this._def.checks,\n                {\n                    kind,\n                    value,\n                    inclusive,\n                    message: errorUtil.toString(message),\n                },\n            ],\n        });\n    }\n    _addCheck(check) {\n        return new ZodBigInt({\n            ...this._def,\n            checks: [...this._def.checks, check],\n        });\n    }\n    positive(message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: BigInt(0),\n            inclusive: false,\n            message: errorUtil.toString(message),\n        });\n    }\n    negative(message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: BigInt(0),\n            inclusive: false,\n            message: errorUtil.toString(message),\n        });\n    }\n    nonpositive(message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: BigInt(0),\n            inclusive: true,\n            message: errorUtil.toString(message),\n        });\n    }\n    nonnegative(message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: BigInt(0),\n            inclusive: true,\n            message: errorUtil.toString(message),\n        });\n    }\n    multipleOf(value, message) {\n        return this._addCheck({\n            kind: \"multipleOf\",\n            value,\n            message: errorUtil.toString(message),\n        });\n    }\n    get minValue() {\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n        }\n        return min;\n    }\n    get maxValue() {\n        let max = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return max;\n    }\n}\nZodBigInt.create = (params) => {\n    return new ZodBigInt({\n        checks: [],\n        typeName: ZodFirstPartyTypeKind.ZodBigInt,\n        coerce: params?.coerce ?? false,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodBoolean extends ZodType {\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = Boolean(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.boolean) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.boolean,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodBoolean.create = (params) => {\n    return new ZodBoolean({\n        typeName: ZodFirstPartyTypeKind.ZodBoolean,\n        coerce: params?.coerce || false,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodDate extends ZodType {\n    _parse(input) {\n        if (this._def.coerce) {\n            input.data = new Date(input.data);\n        }\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.date) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.date,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        if (Number.isNaN(input.data.getTime())) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_date,\n            });\n            return INVALID;\n        }\n        const status = new ParseStatus();\n        let ctx = undefined;\n        for (const check of this._def.checks) {\n            if (check.kind === \"min\") {\n                if (input.data.getTime() < check.value) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_small,\n                        message: check.message,\n                        inclusive: true,\n                        exact: false,\n                        minimum: check.value,\n                        type: \"date\",\n                    });\n                    status.dirty();\n                }\n            }\n            else if (check.kind === \"max\") {\n                if (input.data.getTime() > check.value) {\n                    ctx = this._getOrReturnCtx(input, ctx);\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.too_big,\n                        message: check.message,\n                        inclusive: true,\n                        exact: false,\n                        maximum: check.value,\n                        type: \"date\",\n                    });\n                    status.dirty();\n                }\n            }\n            else {\n                util.assertNever(check);\n            }\n        }\n        return {\n            status: status.value,\n            value: new Date(input.data.getTime()),\n        };\n    }\n    _addCheck(check) {\n        return new ZodDate({\n            ...this._def,\n            checks: [...this._def.checks, check],\n        });\n    }\n    min(minDate, message) {\n        return this._addCheck({\n            kind: \"min\",\n            value: minDate.getTime(),\n            message: errorUtil.toString(message),\n        });\n    }\n    max(maxDate, message) {\n        return this._addCheck({\n            kind: \"max\",\n            value: maxDate.getTime(),\n            message: errorUtil.toString(message),\n        });\n    }\n    get minDate() {\n        let min = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"min\") {\n                if (min === null || ch.value > min)\n                    min = ch.value;\n            }\n        }\n        return min != null ? new Date(min) : null;\n    }\n    get maxDate() {\n        let max = null;\n        for (const ch of this._def.checks) {\n            if (ch.kind === \"max\") {\n                if (max === null || ch.value < max)\n                    max = ch.value;\n            }\n        }\n        return max != null ? new Date(max) : null;\n    }\n}\nZodDate.create = (params) => {\n    return new ZodDate({\n        checks: [],\n        coerce: params?.coerce || false,\n        typeName: ZodFirstPartyTypeKind.ZodDate,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodSymbol extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.symbol) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.symbol,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodSymbol.create = (params) => {\n    return new ZodSymbol({\n        typeName: ZodFirstPartyTypeKind.ZodSymbol,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodUndefined extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.undefined) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.undefined,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodUndefined.create = (params) => {\n    return new ZodUndefined({\n        typeName: ZodFirstPartyTypeKind.ZodUndefined,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodNull extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.null) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.null,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodNull.create = (params) => {\n    return new ZodNull({\n        typeName: ZodFirstPartyTypeKind.ZodNull,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodAny extends ZodType {\n    constructor() {\n        super(...arguments);\n        // to prevent instances of other classes from extending ZodAny. this causes issues with catchall in ZodObject.\n        this._any = true;\n    }\n    _parse(input) {\n        return OK(input.data);\n    }\n}\nZodAny.create = (params) => {\n    return new ZodAny({\n        typeName: ZodFirstPartyTypeKind.ZodAny,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodUnknown extends ZodType {\n    constructor() {\n        super(...arguments);\n        // required\n        this._unknown = true;\n    }\n    _parse(input) {\n        return OK(input.data);\n    }\n}\nZodUnknown.create = (params) => {\n    return new ZodUnknown({\n        typeName: ZodFirstPartyTypeKind.ZodUnknown,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodNever extends ZodType {\n    _parse(input) {\n        const ctx = this._getOrReturnCtx(input);\n        addIssueToContext(ctx, {\n            code: ZodIssueCode.invalid_type,\n            expected: ZodParsedType.never,\n            received: ctx.parsedType,\n        });\n        return INVALID;\n    }\n}\nZodNever.create = (params) => {\n    return new ZodNever({\n        typeName: ZodFirstPartyTypeKind.ZodNever,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodVoid extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.undefined) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.void,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n}\nZodVoid.create = (params) => {\n    return new ZodVoid({\n        typeName: ZodFirstPartyTypeKind.ZodVoid,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodArray extends ZodType {\n    _parse(input) {\n        const { ctx, status } = this._processInputParams(input);\n        const def = this._def;\n        if (ctx.parsedType !== ZodParsedType.array) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.array,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        if (def.exactLength !== null) {\n            const tooBig = ctx.data.length > def.exactLength.value;\n            const tooSmall = ctx.data.length < def.exactLength.value;\n            if (tooBig || tooSmall) {\n                addIssueToContext(ctx, {\n                    code: tooBig ? ZodIssueCode.too_big : ZodIssueCode.too_small,\n                    minimum: (tooSmall ? def.exactLength.value : undefined),\n                    maximum: (tooBig ? def.exactLength.value : undefined),\n                    type: \"array\",\n                    inclusive: true,\n                    exact: true,\n                    message: def.exactLength.message,\n                });\n                status.dirty();\n            }\n        }\n        if (def.minLength !== null) {\n            if (ctx.data.length < def.minLength.value) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.too_small,\n                    minimum: def.minLength.value,\n                    type: \"array\",\n                    inclusive: true,\n                    exact: false,\n                    message: def.minLength.message,\n                });\n                status.dirty();\n            }\n        }\n        if (def.maxLength !== null) {\n            if (ctx.data.length > def.maxLength.value) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.too_big,\n                    maximum: def.maxLength.value,\n                    type: \"array\",\n                    inclusive: true,\n                    exact: false,\n                    message: def.maxLength.message,\n                });\n                status.dirty();\n            }\n        }\n        if (ctx.common.async) {\n            return Promise.all([...ctx.data].map((item, i) => {\n                return def.type._parseAsync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n            })).then((result) => {\n                return ParseStatus.mergeArray(status, result);\n            });\n        }\n        const result = [...ctx.data].map((item, i) => {\n            return def.type._parseSync(new ParseInputLazyPath(ctx, item, ctx.path, i));\n        });\n        return ParseStatus.mergeArray(status, result);\n    }\n    get element() {\n        return this._def.type;\n    }\n    min(minLength, message) {\n        return new ZodArray({\n            ...this._def,\n            minLength: { value: minLength, message: errorUtil.toString(message) },\n        });\n    }\n    max(maxLength, message) {\n        return new ZodArray({\n            ...this._def,\n            maxLength: { value: maxLength, message: errorUtil.toString(message) },\n        });\n    }\n    length(len, message) {\n        return new ZodArray({\n            ...this._def,\n            exactLength: { value: len, message: errorUtil.toString(message) },\n        });\n    }\n    nonempty(message) {\n        return this.min(1, message);\n    }\n}\nZodArray.create = (schema, params) => {\n    return new ZodArray({\n        type: schema,\n        minLength: null,\n        maxLength: null,\n        exactLength: null,\n        typeName: ZodFirstPartyTypeKind.ZodArray,\n        ...processCreateParams(params),\n    });\n};\nfunction deepPartialify(schema) {\n    if (schema instanceof ZodObject) {\n        const newShape = {};\n        for (const key in schema.shape) {\n            const fieldSchema = schema.shape[key];\n            newShape[key] = ZodOptional.create(deepPartialify(fieldSchema));\n        }\n        return new ZodObject({\n            ...schema._def,\n            shape: () => newShape,\n        });\n    }\n    else if (schema instanceof ZodArray) {\n        return new ZodArray({\n            ...schema._def,\n            type: deepPartialify(schema.element),\n        });\n    }\n    else if (schema instanceof ZodOptional) {\n        return ZodOptional.create(deepPartialify(schema.unwrap()));\n    }\n    else if (schema instanceof ZodNullable) {\n        return ZodNullable.create(deepPartialify(schema.unwrap()));\n    }\n    else if (schema instanceof ZodTuple) {\n        return ZodTuple.create(schema.items.map((item) => deepPartialify(item)));\n    }\n    else {\n        return schema;\n    }\n}\nexport class ZodObject extends ZodType {\n    constructor() {\n        super(...arguments);\n        this._cached = null;\n        /**\n         * @deprecated In most cases, this is no longer needed - unknown properties are now silently stripped.\n         * If you want to pass through unknown properties, use `.passthrough()` instead.\n         */\n        this.nonstrict = this.passthrough;\n        // extend<\n        //   Augmentation extends ZodRawShape,\n        //   NewOutput extends util.flatten<{\n        //     [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n        //       ? Augmentation[k][\"_output\"]\n        //       : k extends keyof Output\n        //       ? Output[k]\n        //       : never;\n        //   }>,\n        //   NewInput extends util.flatten<{\n        //     [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n        //       ? Augmentation[k][\"_input\"]\n        //       : k extends keyof Input\n        //       ? Input[k]\n        //       : never;\n        //   }>\n        // >(\n        //   augmentation: Augmentation\n        // ): ZodObject<\n        //   extendShape<T, Augmentation>,\n        //   UnknownKeys,\n        //   Catchall,\n        //   NewOutput,\n        //   NewInput\n        // > {\n        //   return new ZodObject({\n        //     ...this._def,\n        //     shape: () => ({\n        //       ...this._def.shape(),\n        //       ...augmentation,\n        //     }),\n        //   }) as any;\n        // }\n        /**\n         * @deprecated Use `.extend` instead\n         *  */\n        this.augment = this.extend;\n    }\n    _getCached() {\n        if (this._cached !== null)\n            return this._cached;\n        const shape = this._def.shape();\n        const keys = util.objectKeys(shape);\n        this._cached = { shape, keys };\n        return this._cached;\n    }\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.object) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.object,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const { status, ctx } = this._processInputParams(input);\n        const { shape, keys: shapeKeys } = this._getCached();\n        const extraKeys = [];\n        if (!(this._def.catchall instanceof ZodNever && this._def.unknownKeys === \"strip\")) {\n            for (const key in ctx.data) {\n                if (!shapeKeys.includes(key)) {\n                    extraKeys.push(key);\n                }\n            }\n        }\n        const pairs = [];\n        for (const key of shapeKeys) {\n            const keyValidator = shape[key];\n            const value = ctx.data[key];\n            pairs.push({\n                key: { status: \"valid\", value: key },\n                value: keyValidator._parse(new ParseInputLazyPath(ctx, value, ctx.path, key)),\n                alwaysSet: key in ctx.data,\n            });\n        }\n        if (this._def.catchall instanceof ZodNever) {\n            const unknownKeys = this._def.unknownKeys;\n            if (unknownKeys === \"passthrough\") {\n                for (const key of extraKeys) {\n                    pairs.push({\n                        key: { status: \"valid\", value: key },\n                        value: { status: \"valid\", value: ctx.data[key] },\n                    });\n                }\n            }\n            else if (unknownKeys === \"strict\") {\n                if (extraKeys.length > 0) {\n                    addIssueToContext(ctx, {\n                        code: ZodIssueCode.unrecognized_keys,\n                        keys: extraKeys,\n                    });\n                    status.dirty();\n                }\n            }\n            else if (unknownKeys === \"strip\") {\n            }\n            else {\n                throw new Error(`Internal ZodObject error: invalid unknownKeys value.`);\n            }\n        }\n        else {\n            // run catchall validation\n            const catchall = this._def.catchall;\n            for (const key of extraKeys) {\n                const value = ctx.data[key];\n                pairs.push({\n                    key: { status: \"valid\", value: key },\n                    value: catchall._parse(new ParseInputLazyPath(ctx, value, ctx.path, key) //, ctx.child(key), value, getParsedType(value)\n                    ),\n                    alwaysSet: key in ctx.data,\n                });\n            }\n        }\n        if (ctx.common.async) {\n            return Promise.resolve()\n                .then(async () => {\n                const syncPairs = [];\n                for (const pair of pairs) {\n                    const key = await pair.key;\n                    const value = await pair.value;\n                    syncPairs.push({\n                        key,\n                        value,\n                        alwaysSet: pair.alwaysSet,\n                    });\n                }\n                return syncPairs;\n            })\n                .then((syncPairs) => {\n                return ParseStatus.mergeObjectSync(status, syncPairs);\n            });\n        }\n        else {\n            return ParseStatus.mergeObjectSync(status, pairs);\n        }\n    }\n    get shape() {\n        return this._def.shape();\n    }\n    strict(message) {\n        errorUtil.errToObj;\n        return new ZodObject({\n            ...this._def,\n            unknownKeys: \"strict\",\n            ...(message !== undefined\n                ? {\n                    errorMap: (issue, ctx) => {\n                        const defaultError = this._def.errorMap?.(issue, ctx).message ?? ctx.defaultError;\n                        if (issue.code === \"unrecognized_keys\")\n                            return {\n                                message: errorUtil.errToObj(message).message ?? defaultError,\n                            };\n                        return {\n                            message: defaultError,\n                        };\n                    },\n                }\n                : {}),\n        });\n    }\n    strip() {\n        return new ZodObject({\n            ...this._def,\n            unknownKeys: \"strip\",\n        });\n    }\n    passthrough() {\n        return new ZodObject({\n            ...this._def,\n            unknownKeys: \"passthrough\",\n        });\n    }\n    // const AugmentFactory =\n    //   <Def extends ZodObjectDef>(def: Def) =>\n    //   <Augmentation extends ZodRawShape>(\n    //     augmentation: Augmentation\n    //   ): ZodObject<\n    //     extendShape<ReturnType<Def[\"shape\"]>, Augmentation>,\n    //     Def[\"unknownKeys\"],\n    //     Def[\"catchall\"]\n    //   > => {\n    //     return new ZodObject({\n    //       ...def,\n    //       shape: () => ({\n    //         ...def.shape(),\n    //         ...augmentation,\n    //       }),\n    //     }) as any;\n    //   };\n    extend(augmentation) {\n        return new ZodObject({\n            ...this._def,\n            shape: () => ({\n                ...this._def.shape(),\n                ...augmentation,\n            }),\n        });\n    }\n    /**\n     * Prior to zod@1.0.12 there was a bug in the\n     * inferred type of merged objects. Please\n     * upgrade if you are experiencing issues.\n     */\n    merge(merging) {\n        const merged = new ZodObject({\n            unknownKeys: merging._def.unknownKeys,\n            catchall: merging._def.catchall,\n            shape: () => ({\n                ...this._def.shape(),\n                ...merging._def.shape(),\n            }),\n            typeName: ZodFirstPartyTypeKind.ZodObject,\n        });\n        return merged;\n    }\n    // merge<\n    //   Incoming extends AnyZodObject,\n    //   Augmentation extends Incoming[\"shape\"],\n    //   NewOutput extends {\n    //     [k in keyof Augmentation | keyof Output]: k extends keyof Augmentation\n    //       ? Augmentation[k][\"_output\"]\n    //       : k extends keyof Output\n    //       ? Output[k]\n    //       : never;\n    //   },\n    //   NewInput extends {\n    //     [k in keyof Augmentation | keyof Input]: k extends keyof Augmentation\n    //       ? Augmentation[k][\"_input\"]\n    //       : k extends keyof Input\n    //       ? Input[k]\n    //       : never;\n    //   }\n    // >(\n    //   merging: Incoming\n    // ): ZodObject<\n    //   extendShape<T, ReturnType<Incoming[\"_def\"][\"shape\"]>>,\n    //   Incoming[\"_def\"][\"unknownKeys\"],\n    //   Incoming[\"_def\"][\"catchall\"],\n    //   NewOutput,\n    //   NewInput\n    // > {\n    //   const merged: any = new ZodObject({\n    //     unknownKeys: merging._def.unknownKeys,\n    //     catchall: merging._def.catchall,\n    //     shape: () =>\n    //       objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n    //     typeName: ZodFirstPartyTypeKind.ZodObject,\n    //   }) as any;\n    //   return merged;\n    // }\n    setKey(key, schema) {\n        return this.augment({ [key]: schema });\n    }\n    // merge<Incoming extends AnyZodObject>(\n    //   merging: Incoming\n    // ): //ZodObject<T & Incoming[\"_shape\"], UnknownKeys, Catchall> = (merging) => {\n    // ZodObject<\n    //   extendShape<T, ReturnType<Incoming[\"_def\"][\"shape\"]>>,\n    //   Incoming[\"_def\"][\"unknownKeys\"],\n    //   Incoming[\"_def\"][\"catchall\"]\n    // > {\n    //   // const mergedShape = objectUtil.mergeShapes(\n    //   //   this._def.shape(),\n    //   //   merging._def.shape()\n    //   // );\n    //   const merged: any = new ZodObject({\n    //     unknownKeys: merging._def.unknownKeys,\n    //     catchall: merging._def.catchall,\n    //     shape: () =>\n    //       objectUtil.mergeShapes(this._def.shape(), merging._def.shape()),\n    //     typeName: ZodFirstPartyTypeKind.ZodObject,\n    //   }) as any;\n    //   return merged;\n    // }\n    catchall(index) {\n        return new ZodObject({\n            ...this._def,\n            catchall: index,\n        });\n    }\n    pick(mask) {\n        const shape = {};\n        for (const key of util.objectKeys(mask)) {\n            if (mask[key] && this.shape[key]) {\n                shape[key] = this.shape[key];\n            }\n        }\n        return new ZodObject({\n            ...this._def,\n            shape: () => shape,\n        });\n    }\n    omit(mask) {\n        const shape = {};\n        for (const key of util.objectKeys(this.shape)) {\n            if (!mask[key]) {\n                shape[key] = this.shape[key];\n            }\n        }\n        return new ZodObject({\n            ...this._def,\n            shape: () => shape,\n        });\n    }\n    /**\n     * @deprecated\n     */\n    deepPartial() {\n        return deepPartialify(this);\n    }\n    partial(mask) {\n        const newShape = {};\n        for (const key of util.objectKeys(this.shape)) {\n            const fieldSchema = this.shape[key];\n            if (mask && !mask[key]) {\n                newShape[key] = fieldSchema;\n            }\n            else {\n                newShape[key] = fieldSchema.optional();\n            }\n        }\n        return new ZodObject({\n            ...this._def,\n            shape: () => newShape,\n        });\n    }\n    required(mask) {\n        const newShape = {};\n        for (const key of util.objectKeys(this.shape)) {\n            if (mask && !mask[key]) {\n                newShape[key] = this.shape[key];\n            }\n            else {\n                const fieldSchema = this.shape[key];\n                let newField = fieldSchema;\n                while (newField instanceof ZodOptional) {\n                    newField = newField._def.innerType;\n                }\n                newShape[key] = newField;\n            }\n        }\n        return new ZodObject({\n            ...this._def,\n            shape: () => newShape,\n        });\n    }\n    keyof() {\n        return createZodEnum(util.objectKeys(this.shape));\n    }\n}\nZodObject.create = (shape, params) => {\n    return new ZodObject({\n        shape: () => shape,\n        unknownKeys: \"strip\",\n        catchall: ZodNever.create(),\n        typeName: ZodFirstPartyTypeKind.ZodObject,\n        ...processCreateParams(params),\n    });\n};\nZodObject.strictCreate = (shape, params) => {\n    return new ZodObject({\n        shape: () => shape,\n        unknownKeys: \"strict\",\n        catchall: ZodNever.create(),\n        typeName: ZodFirstPartyTypeKind.ZodObject,\n        ...processCreateParams(params),\n    });\n};\nZodObject.lazycreate = (shape, params) => {\n    return new ZodObject({\n        shape,\n        unknownKeys: \"strip\",\n        catchall: ZodNever.create(),\n        typeName: ZodFirstPartyTypeKind.ZodObject,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodUnion extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        const options = this._def.options;\n        function handleResults(results) {\n            // return first issue-free validation if it exists\n            for (const result of results) {\n                if (result.result.status === \"valid\") {\n                    return result.result;\n                }\n            }\n            for (const result of results) {\n                if (result.result.status === \"dirty\") {\n                    // add issues from dirty option\n                    ctx.common.issues.push(...result.ctx.common.issues);\n                    return result.result;\n                }\n            }\n            // return invalid\n            const unionErrors = results.map((result) => new ZodError(result.ctx.common.issues));\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_union,\n                unionErrors,\n            });\n            return INVALID;\n        }\n        if (ctx.common.async) {\n            return Promise.all(options.map(async (option) => {\n                const childCtx = {\n                    ...ctx,\n                    common: {\n                        ...ctx.common,\n                        issues: [],\n                    },\n                    parent: null,\n                };\n                return {\n                    result: await option._parseAsync({\n                        data: ctx.data,\n                        path: ctx.path,\n                        parent: childCtx,\n                    }),\n                    ctx: childCtx,\n                };\n            })).then(handleResults);\n        }\n        else {\n            let dirty = undefined;\n            const issues = [];\n            for (const option of options) {\n                const childCtx = {\n                    ...ctx,\n                    common: {\n                        ...ctx.common,\n                        issues: [],\n                    },\n                    parent: null,\n                };\n                const result = option._parseSync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: childCtx,\n                });\n                if (result.status === \"valid\") {\n                    return result;\n                }\n                else if (result.status === \"dirty\" && !dirty) {\n                    dirty = { result, ctx: childCtx };\n                }\n                if (childCtx.common.issues.length) {\n                    issues.push(childCtx.common.issues);\n                }\n            }\n            if (dirty) {\n                ctx.common.issues.push(...dirty.ctx.common.issues);\n                return dirty.result;\n            }\n            const unionErrors = issues.map((issues) => new ZodError(issues));\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_union,\n                unionErrors,\n            });\n            return INVALID;\n        }\n    }\n    get options() {\n        return this._def.options;\n    }\n}\nZodUnion.create = (types, params) => {\n    return new ZodUnion({\n        options: types,\n        typeName: ZodFirstPartyTypeKind.ZodUnion,\n        ...processCreateParams(params),\n    });\n};\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\n//////////                                 //////////\n//////////      ZodDiscriminatedUnion      //////////\n//////////                                 //////////\n/////////////////////////////////////////////////////\n/////////////////////////////////////////////////////\nconst getDiscriminator = (type) => {\n    if (type instanceof ZodLazy) {\n        return getDiscriminator(type.schema);\n    }\n    else if (type instanceof ZodEffects) {\n        return getDiscriminator(type.innerType());\n    }\n    else if (type instanceof ZodLiteral) {\n        return [type.value];\n    }\n    else if (type instanceof ZodEnum) {\n        return type.options;\n    }\n    else if (type instanceof ZodNativeEnum) {\n        // eslint-disable-next-line ban/ban\n        return util.objectValues(type.enum);\n    }\n    else if (type instanceof ZodDefault) {\n        return getDiscriminator(type._def.innerType);\n    }\n    else if (type instanceof ZodUndefined) {\n        return [undefined];\n    }\n    else if (type instanceof ZodNull) {\n        return [null];\n    }\n    else if (type instanceof ZodOptional) {\n        return [undefined, ...getDiscriminator(type.unwrap())];\n    }\n    else if (type instanceof ZodNullable) {\n        return [null, ...getDiscriminator(type.unwrap())];\n    }\n    else if (type instanceof ZodBranded) {\n        return getDiscriminator(type.unwrap());\n    }\n    else if (type instanceof ZodReadonly) {\n        return getDiscriminator(type.unwrap());\n    }\n    else if (type instanceof ZodCatch) {\n        return getDiscriminator(type._def.innerType);\n    }\n    else {\n        return [];\n    }\n};\nexport class ZodDiscriminatedUnion extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.object) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.object,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const discriminator = this.discriminator;\n        const discriminatorValue = ctx.data[discriminator];\n        const option = this.optionsMap.get(discriminatorValue);\n        if (!option) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_union_discriminator,\n                options: Array.from(this.optionsMap.keys()),\n                path: [discriminator],\n            });\n            return INVALID;\n        }\n        if (ctx.common.async) {\n            return option._parseAsync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            });\n        }\n        else {\n            return option._parseSync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            });\n        }\n    }\n    get discriminator() {\n        return this._def.discriminator;\n    }\n    get options() {\n        return this._def.options;\n    }\n    get optionsMap() {\n        return this._def.optionsMap;\n    }\n    /**\n     * The constructor of the discriminated union schema. Its behaviour is very similar to that of the normal z.union() constructor.\n     * However, it only allows a union of objects, all of which need to share a discriminator property. This property must\n     * have a different value for each object in the union.\n     * @param discriminator the name of the discriminator property\n     * @param types an array of object schemas\n     * @param params\n     */\n    static create(discriminator, options, params) {\n        // Get all the valid discriminator values\n        const optionsMap = new Map();\n        // try {\n        for (const type of options) {\n            const discriminatorValues = getDiscriminator(type.shape[discriminator]);\n            if (!discriminatorValues.length) {\n                throw new Error(`A discriminator value for key \\`${discriminator}\\` could not be extracted from all schema options`);\n            }\n            for (const value of discriminatorValues) {\n                if (optionsMap.has(value)) {\n                    throw new Error(`Discriminator property ${String(discriminator)} has duplicate value ${String(value)}`);\n                }\n                optionsMap.set(value, type);\n            }\n        }\n        return new ZodDiscriminatedUnion({\n            typeName: ZodFirstPartyTypeKind.ZodDiscriminatedUnion,\n            discriminator,\n            options,\n            optionsMap,\n            ...processCreateParams(params),\n        });\n    }\n}\nfunction mergeValues(a, b) {\n    const aType = getParsedType(a);\n    const bType = getParsedType(b);\n    if (a === b) {\n        return { valid: true, data: a };\n    }\n    else if (aType === ZodParsedType.object && bType === ZodParsedType.object) {\n        const bKeys = util.objectKeys(b);\n        const sharedKeys = util.objectKeys(a).filter((key) => bKeys.indexOf(key) !== -1);\n        const newObj = { ...a, ...b };\n        if (Object.prototype.hasOwnProperty.call(newObj, \"__proto__\"))\n            delete newObj.__proto__;\n        for (const key of sharedKeys) {\n            if (key === \"__proto__\")\n                continue;\n            const sharedValue = mergeValues(a[key], b[key]);\n            if (!sharedValue.valid) {\n                return { valid: false };\n            }\n            newObj[key] = sharedValue.data;\n        }\n        return { valid: true, data: newObj };\n    }\n    else if (aType === ZodParsedType.array && bType === ZodParsedType.array) {\n        if (a.length !== b.length) {\n            return { valid: false };\n        }\n        const newArray = [];\n        for (let index = 0; index < a.length; index++) {\n            const itemA = a[index];\n            const itemB = b[index];\n            const sharedValue = mergeValues(itemA, itemB);\n            if (!sharedValue.valid) {\n                return { valid: false };\n            }\n            newArray.push(sharedValue.data);\n        }\n        return { valid: true, data: newArray };\n    }\n    else if (aType === ZodParsedType.date && bType === ZodParsedType.date && +a === +b) {\n        return { valid: true, data: a };\n    }\n    else {\n        return { valid: false };\n    }\n}\nexport class ZodIntersection extends ZodType {\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        const handleParsed = (parsedLeft, parsedRight) => {\n            if (isAborted(parsedLeft) || isAborted(parsedRight)) {\n                return INVALID;\n            }\n            const merged = mergeValues(parsedLeft.value, parsedRight.value);\n            if (!merged.valid) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.invalid_intersection_types,\n                });\n                return INVALID;\n            }\n            if (isDirty(parsedLeft) || isDirty(parsedRight)) {\n                status.dirty();\n            }\n            return { status: status.value, value: merged.data };\n        };\n        if (ctx.common.async) {\n            return Promise.all([\n                this._def.left._parseAsync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                }),\n                this._def.right._parseAsync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                }),\n            ]).then(([left, right]) => handleParsed(left, right));\n        }\n        else {\n            return handleParsed(this._def.left._parseSync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            }), this._def.right._parseSync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            }));\n        }\n    }\n}\nZodIntersection.create = (left, right, params) => {\n    return new ZodIntersection({\n        left: left,\n        right: right,\n        typeName: ZodFirstPartyTypeKind.ZodIntersection,\n        ...processCreateParams(params),\n    });\n};\n// type ZodTupleItems = [ZodTypeAny, ...ZodTypeAny[]];\nexport class ZodTuple extends ZodType {\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.array) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.array,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        if (ctx.data.length < this._def.items.length) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.too_small,\n                minimum: this._def.items.length,\n                inclusive: true,\n                exact: false,\n                type: \"array\",\n            });\n            return INVALID;\n        }\n        const rest = this._def.rest;\n        if (!rest && ctx.data.length > this._def.items.length) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.too_big,\n                maximum: this._def.items.length,\n                inclusive: true,\n                exact: false,\n                type: \"array\",\n            });\n            status.dirty();\n        }\n        const items = [...ctx.data]\n            .map((item, itemIndex) => {\n            const schema = this._def.items[itemIndex] || this._def.rest;\n            if (!schema)\n                return null;\n            return schema._parse(new ParseInputLazyPath(ctx, item, ctx.path, itemIndex));\n        })\n            .filter((x) => !!x); // filter nulls\n        if (ctx.common.async) {\n            return Promise.all(items).then((results) => {\n                return ParseStatus.mergeArray(status, results);\n            });\n        }\n        else {\n            return ParseStatus.mergeArray(status, items);\n        }\n    }\n    get items() {\n        return this._def.items;\n    }\n    rest(rest) {\n        return new ZodTuple({\n            ...this._def,\n            rest,\n        });\n    }\n}\nZodTuple.create = (schemas, params) => {\n    if (!Array.isArray(schemas)) {\n        throw new Error(\"You must pass an array of schemas to z.tuple([ ... ])\");\n    }\n    return new ZodTuple({\n        items: schemas,\n        typeName: ZodFirstPartyTypeKind.ZodTuple,\n        rest: null,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodRecord extends ZodType {\n    get keySchema() {\n        return this._def.keyType;\n    }\n    get valueSchema() {\n        return this._def.valueType;\n    }\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.object) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.object,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const pairs = [];\n        const keyType = this._def.keyType;\n        const valueType = this._def.valueType;\n        for (const key in ctx.data) {\n            pairs.push({\n                key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, key)),\n                value: valueType._parse(new ParseInputLazyPath(ctx, ctx.data[key], ctx.path, key)),\n                alwaysSet: key in ctx.data,\n            });\n        }\n        if (ctx.common.async) {\n            return ParseStatus.mergeObjectAsync(status, pairs);\n        }\n        else {\n            return ParseStatus.mergeObjectSync(status, pairs);\n        }\n    }\n    get element() {\n        return this._def.valueType;\n    }\n    static create(first, second, third) {\n        if (second instanceof ZodType) {\n            return new ZodRecord({\n                keyType: first,\n                valueType: second,\n                typeName: ZodFirstPartyTypeKind.ZodRecord,\n                ...processCreateParams(third),\n            });\n        }\n        return new ZodRecord({\n            keyType: ZodString.create(),\n            valueType: first,\n            typeName: ZodFirstPartyTypeKind.ZodRecord,\n            ...processCreateParams(second),\n        });\n    }\n}\nexport class ZodMap extends ZodType {\n    get keySchema() {\n        return this._def.keyType;\n    }\n    get valueSchema() {\n        return this._def.valueType;\n    }\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.map) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.map,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const keyType = this._def.keyType;\n        const valueType = this._def.valueType;\n        const pairs = [...ctx.data.entries()].map(([key, value], index) => {\n            return {\n                key: keyType._parse(new ParseInputLazyPath(ctx, key, ctx.path, [index, \"key\"])),\n                value: valueType._parse(new ParseInputLazyPath(ctx, value, ctx.path, [index, \"value\"])),\n            };\n        });\n        if (ctx.common.async) {\n            const finalMap = new Map();\n            return Promise.resolve().then(async () => {\n                for (const pair of pairs) {\n                    const key = await pair.key;\n                    const value = await pair.value;\n                    if (key.status === \"aborted\" || value.status === \"aborted\") {\n                        return INVALID;\n                    }\n                    if (key.status === \"dirty\" || value.status === \"dirty\") {\n                        status.dirty();\n                    }\n                    finalMap.set(key.value, value.value);\n                }\n                return { status: status.value, value: finalMap };\n            });\n        }\n        else {\n            const finalMap = new Map();\n            for (const pair of pairs) {\n                const key = pair.key;\n                const value = pair.value;\n                if (key.status === \"aborted\" || value.status === \"aborted\") {\n                    return INVALID;\n                }\n                if (key.status === \"dirty\" || value.status === \"dirty\") {\n                    status.dirty();\n                }\n                finalMap.set(key.value, value.value);\n            }\n            return { status: status.value, value: finalMap };\n        }\n    }\n}\nZodMap.create = (keyType, valueType, params) => {\n    return new ZodMap({\n        valueType,\n        keyType,\n        typeName: ZodFirstPartyTypeKind.ZodMap,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodSet extends ZodType {\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.set) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.set,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const def = this._def;\n        if (def.minSize !== null) {\n            if (ctx.data.size < def.minSize.value) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.too_small,\n                    minimum: def.minSize.value,\n                    type: \"set\",\n                    inclusive: true,\n                    exact: false,\n                    message: def.minSize.message,\n                });\n                status.dirty();\n            }\n        }\n        if (def.maxSize !== null) {\n            if (ctx.data.size > def.maxSize.value) {\n                addIssueToContext(ctx, {\n                    code: ZodIssueCode.too_big,\n                    maximum: def.maxSize.value,\n                    type: \"set\",\n                    inclusive: true,\n                    exact: false,\n                    message: def.maxSize.message,\n                });\n                status.dirty();\n            }\n        }\n        const valueType = this._def.valueType;\n        function finalizeSet(elements) {\n            const parsedSet = new Set();\n            for (const element of elements) {\n                if (element.status === \"aborted\")\n                    return INVALID;\n                if (element.status === \"dirty\")\n                    status.dirty();\n                parsedSet.add(element.value);\n            }\n            return { status: status.value, value: parsedSet };\n        }\n        const elements = [...ctx.data.values()].map((item, i) => valueType._parse(new ParseInputLazyPath(ctx, item, ctx.path, i)));\n        if (ctx.common.async) {\n            return Promise.all(elements).then((elements) => finalizeSet(elements));\n        }\n        else {\n            return finalizeSet(elements);\n        }\n    }\n    min(minSize, message) {\n        return new ZodSet({\n            ...this._def,\n            minSize: { value: minSize, message: errorUtil.toString(message) },\n        });\n    }\n    max(maxSize, message) {\n        return new ZodSet({\n            ...this._def,\n            maxSize: { value: maxSize, message: errorUtil.toString(message) },\n        });\n    }\n    size(size, message) {\n        return this.min(size, message).max(size, message);\n    }\n    nonempty(message) {\n        return this.min(1, message);\n    }\n}\nZodSet.create = (valueType, params) => {\n    return new ZodSet({\n        valueType,\n        minSize: null,\n        maxSize: null,\n        typeName: ZodFirstPartyTypeKind.ZodSet,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodFunction extends ZodType {\n    constructor() {\n        super(...arguments);\n        this.validate = this.implement;\n    }\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.function) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.function,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        function makeArgsIssue(args, error) {\n            return makeIssue({\n                data: args,\n                path: ctx.path,\n                errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), defaultErrorMap].filter((x) => !!x),\n                issueData: {\n                    code: ZodIssueCode.invalid_arguments,\n                    argumentsError: error,\n                },\n            });\n        }\n        function makeReturnsIssue(returns, error) {\n            return makeIssue({\n                data: returns,\n                path: ctx.path,\n                errorMaps: [ctx.common.contextualErrorMap, ctx.schemaErrorMap, getErrorMap(), defaultErrorMap].filter((x) => !!x),\n                issueData: {\n                    code: ZodIssueCode.invalid_return_type,\n                    returnTypeError: error,\n                },\n            });\n        }\n        const params = { errorMap: ctx.common.contextualErrorMap };\n        const fn = ctx.data;\n        if (this._def.returns instanceof ZodPromise) {\n            // Would love a way to avoid disabling this rule, but we need an alias (using an arrow function was what caused 2651).\n            // eslint-disable-next-line @typescript-eslint/no-this-alias\n            const me = this;\n            return OK(async function (...args) {\n                const error = new ZodError([]);\n                const parsedArgs = await me._def.args.parseAsync(args, params).catch((e) => {\n                    error.addIssue(makeArgsIssue(args, e));\n                    throw error;\n                });\n                const result = await Reflect.apply(fn, this, parsedArgs);\n                const parsedReturns = await me._def.returns._def.type\n                    .parseAsync(result, params)\n                    .catch((e) => {\n                    error.addIssue(makeReturnsIssue(result, e));\n                    throw error;\n                });\n                return parsedReturns;\n            });\n        }\n        else {\n            // Would love a way to avoid disabling this rule, but we need an alias (using an arrow function was what caused 2651).\n            // eslint-disable-next-line @typescript-eslint/no-this-alias\n            const me = this;\n            return OK(function (...args) {\n                const parsedArgs = me._def.args.safeParse(args, params);\n                if (!parsedArgs.success) {\n                    throw new ZodError([makeArgsIssue(args, parsedArgs.error)]);\n                }\n                const result = Reflect.apply(fn, this, parsedArgs.data);\n                const parsedReturns = me._def.returns.safeParse(result, params);\n                if (!parsedReturns.success) {\n                    throw new ZodError([makeReturnsIssue(result, parsedReturns.error)]);\n                }\n                return parsedReturns.data;\n            });\n        }\n    }\n    parameters() {\n        return this._def.args;\n    }\n    returnType() {\n        return this._def.returns;\n    }\n    args(...items) {\n        return new ZodFunction({\n            ...this._def,\n            args: ZodTuple.create(items).rest(ZodUnknown.create()),\n        });\n    }\n    returns(returnType) {\n        return new ZodFunction({\n            ...this._def,\n            returns: returnType,\n        });\n    }\n    implement(func) {\n        const validatedFunc = this.parse(func);\n        return validatedFunc;\n    }\n    strictImplement(func) {\n        const validatedFunc = this.parse(func);\n        return validatedFunc;\n    }\n    static create(args, returns, params) {\n        return new ZodFunction({\n            args: (args ? args : ZodTuple.create([]).rest(ZodUnknown.create())),\n            returns: returns || ZodUnknown.create(),\n            typeName: ZodFirstPartyTypeKind.ZodFunction,\n            ...processCreateParams(params),\n        });\n    }\n}\nexport class ZodLazy extends ZodType {\n    get schema() {\n        return this._def.getter();\n    }\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        const lazySchema = this._def.getter();\n        return lazySchema._parse({ data: ctx.data, path: ctx.path, parent: ctx });\n    }\n}\nZodLazy.create = (getter, params) => {\n    return new ZodLazy({\n        getter: getter,\n        typeName: ZodFirstPartyTypeKind.ZodLazy,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodLiteral extends ZodType {\n    _parse(input) {\n        if (input.data !== this._def.value) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                received: ctx.data,\n                code: ZodIssueCode.invalid_literal,\n                expected: this._def.value,\n            });\n            return INVALID;\n        }\n        return { status: \"valid\", value: input.data };\n    }\n    get value() {\n        return this._def.value;\n    }\n}\nZodLiteral.create = (value, params) => {\n    return new ZodLiteral({\n        value: value,\n        typeName: ZodFirstPartyTypeKind.ZodLiteral,\n        ...processCreateParams(params),\n    });\n};\nfunction createZodEnum(values, params) {\n    return new ZodEnum({\n        values,\n        typeName: ZodFirstPartyTypeKind.ZodEnum,\n        ...processCreateParams(params),\n    });\n}\nexport class ZodEnum extends ZodType {\n    _parse(input) {\n        if (typeof input.data !== \"string\") {\n            const ctx = this._getOrReturnCtx(input);\n            const expectedValues = this._def.values;\n            addIssueToContext(ctx, {\n                expected: util.joinValues(expectedValues),\n                received: ctx.parsedType,\n                code: ZodIssueCode.invalid_type,\n            });\n            return INVALID;\n        }\n        if (!this._cache) {\n            this._cache = new Set(this._def.values);\n        }\n        if (!this._cache.has(input.data)) {\n            const ctx = this._getOrReturnCtx(input);\n            const expectedValues = this._def.values;\n            addIssueToContext(ctx, {\n                received: ctx.data,\n                code: ZodIssueCode.invalid_enum_value,\n                options: expectedValues,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n    get options() {\n        return this._def.values;\n    }\n    get enum() {\n        const enumValues = {};\n        for (const val of this._def.values) {\n            enumValues[val] = val;\n        }\n        return enumValues;\n    }\n    get Values() {\n        const enumValues = {};\n        for (const val of this._def.values) {\n            enumValues[val] = val;\n        }\n        return enumValues;\n    }\n    get Enum() {\n        const enumValues = {};\n        for (const val of this._def.values) {\n            enumValues[val] = val;\n        }\n        return enumValues;\n    }\n    extract(values, newDef = this._def) {\n        return ZodEnum.create(values, {\n            ...this._def,\n            ...newDef,\n        });\n    }\n    exclude(values, newDef = this._def) {\n        return ZodEnum.create(this.options.filter((opt) => !values.includes(opt)), {\n            ...this._def,\n            ...newDef,\n        });\n    }\n}\nZodEnum.create = createZodEnum;\nexport class ZodNativeEnum extends ZodType {\n    _parse(input) {\n        const nativeEnumValues = util.getValidEnumValues(this._def.values);\n        const ctx = this._getOrReturnCtx(input);\n        if (ctx.parsedType !== ZodParsedType.string && ctx.parsedType !== ZodParsedType.number) {\n            const expectedValues = util.objectValues(nativeEnumValues);\n            addIssueToContext(ctx, {\n                expected: util.joinValues(expectedValues),\n                received: ctx.parsedType,\n                code: ZodIssueCode.invalid_type,\n            });\n            return INVALID;\n        }\n        if (!this._cache) {\n            this._cache = new Set(util.getValidEnumValues(this._def.values));\n        }\n        if (!this._cache.has(input.data)) {\n            const expectedValues = util.objectValues(nativeEnumValues);\n            addIssueToContext(ctx, {\n                received: ctx.data,\n                code: ZodIssueCode.invalid_enum_value,\n                options: expectedValues,\n            });\n            return INVALID;\n        }\n        return OK(input.data);\n    }\n    get enum() {\n        return this._def.values;\n    }\n}\nZodNativeEnum.create = (values, params) => {\n    return new ZodNativeEnum({\n        values: values,\n        typeName: ZodFirstPartyTypeKind.ZodNativeEnum,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodPromise extends ZodType {\n    unwrap() {\n        return this._def.type;\n    }\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        if (ctx.parsedType !== ZodParsedType.promise && ctx.common.async === false) {\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.promise,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        const promisified = ctx.parsedType === ZodParsedType.promise ? ctx.data : Promise.resolve(ctx.data);\n        return OK(promisified.then((data) => {\n            return this._def.type.parseAsync(data, {\n                path: ctx.path,\n                errorMap: ctx.common.contextualErrorMap,\n            });\n        }));\n    }\n}\nZodPromise.create = (schema, params) => {\n    return new ZodPromise({\n        type: schema,\n        typeName: ZodFirstPartyTypeKind.ZodPromise,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodEffects extends ZodType {\n    innerType() {\n        return this._def.schema;\n    }\n    sourceType() {\n        return this._def.schema._def.typeName === ZodFirstPartyTypeKind.ZodEffects\n            ? this._def.schema.sourceType()\n            : this._def.schema;\n    }\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        const effect = this._def.effect || null;\n        const checkCtx = {\n            addIssue: (arg) => {\n                addIssueToContext(ctx, arg);\n                if (arg.fatal) {\n                    status.abort();\n                }\n                else {\n                    status.dirty();\n                }\n            },\n            get path() {\n                return ctx.path;\n            },\n        };\n        checkCtx.addIssue = checkCtx.addIssue.bind(checkCtx);\n        if (effect.type === \"preprocess\") {\n            const processed = effect.transform(ctx.data, checkCtx);\n            if (ctx.common.async) {\n                return Promise.resolve(processed).then(async (processed) => {\n                    if (status.value === \"aborted\")\n                        return INVALID;\n                    const result = await this._def.schema._parseAsync({\n                        data: processed,\n                        path: ctx.path,\n                        parent: ctx,\n                    });\n                    if (result.status === \"aborted\")\n                        return INVALID;\n                    if (result.status === \"dirty\")\n                        return DIRTY(result.value);\n                    if (status.value === \"dirty\")\n                        return DIRTY(result.value);\n                    return result;\n                });\n            }\n            else {\n                if (status.value === \"aborted\")\n                    return INVALID;\n                const result = this._def.schema._parseSync({\n                    data: processed,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n                if (result.status === \"aborted\")\n                    return INVALID;\n                if (result.status === \"dirty\")\n                    return DIRTY(result.value);\n                if (status.value === \"dirty\")\n                    return DIRTY(result.value);\n                return result;\n            }\n        }\n        if (effect.type === \"refinement\") {\n            const executeRefinement = (acc) => {\n                const result = effect.refinement(acc, checkCtx);\n                if (ctx.common.async) {\n                    return Promise.resolve(result);\n                }\n                if (result instanceof Promise) {\n                    throw new Error(\"Async refinement encountered during synchronous parse operation. Use .parseAsync instead.\");\n                }\n                return acc;\n            };\n            if (ctx.common.async === false) {\n                const inner = this._def.schema._parseSync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n                if (inner.status === \"aborted\")\n                    return INVALID;\n                if (inner.status === \"dirty\")\n                    status.dirty();\n                // return value is ignored\n                executeRefinement(inner.value);\n                return { status: status.value, value: inner.value };\n            }\n            else {\n                return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((inner) => {\n                    if (inner.status === \"aborted\")\n                        return INVALID;\n                    if (inner.status === \"dirty\")\n                        status.dirty();\n                    return executeRefinement(inner.value).then(() => {\n                        return { status: status.value, value: inner.value };\n                    });\n                });\n            }\n        }\n        if (effect.type === \"transform\") {\n            if (ctx.common.async === false) {\n                const base = this._def.schema._parseSync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n                if (!isValid(base))\n                    return INVALID;\n                const result = effect.transform(base.value, checkCtx);\n                if (result instanceof Promise) {\n                    throw new Error(`Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.`);\n                }\n                return { status: status.value, value: result };\n            }\n            else {\n                return this._def.schema._parseAsync({ data: ctx.data, path: ctx.path, parent: ctx }).then((base) => {\n                    if (!isValid(base))\n                        return INVALID;\n                    return Promise.resolve(effect.transform(base.value, checkCtx)).then((result) => ({\n                        status: status.value,\n                        value: result,\n                    }));\n                });\n            }\n        }\n        util.assertNever(effect);\n    }\n}\nZodEffects.create = (schema, effect, params) => {\n    return new ZodEffects({\n        schema,\n        typeName: ZodFirstPartyTypeKind.ZodEffects,\n        effect,\n        ...processCreateParams(params),\n    });\n};\nZodEffects.createWithPreprocess = (preprocess, schema, params) => {\n    return new ZodEffects({\n        schema,\n        effect: { type: \"preprocess\", transform: preprocess },\n        typeName: ZodFirstPartyTypeKind.ZodEffects,\n        ...processCreateParams(params),\n    });\n};\nexport { ZodEffects as ZodTransformer };\nexport class ZodOptional extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType === ZodParsedType.undefined) {\n            return OK(undefined);\n        }\n        return this._def.innerType._parse(input);\n    }\n    unwrap() {\n        return this._def.innerType;\n    }\n}\nZodOptional.create = (type, params) => {\n    return new ZodOptional({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodOptional,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodNullable extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType === ZodParsedType.null) {\n            return OK(null);\n        }\n        return this._def.innerType._parse(input);\n    }\n    unwrap() {\n        return this._def.innerType;\n    }\n}\nZodNullable.create = (type, params) => {\n    return new ZodNullable({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodNullable,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodDefault extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        let data = ctx.data;\n        if (ctx.parsedType === ZodParsedType.undefined) {\n            data = this._def.defaultValue();\n        }\n        return this._def.innerType._parse({\n            data,\n            path: ctx.path,\n            parent: ctx,\n        });\n    }\n    removeDefault() {\n        return this._def.innerType;\n    }\n}\nZodDefault.create = (type, params) => {\n    return new ZodDefault({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodDefault,\n        defaultValue: typeof params.default === \"function\" ? params.default : () => params.default,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodCatch extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        // newCtx is used to not collect issues from inner types in ctx\n        const newCtx = {\n            ...ctx,\n            common: {\n                ...ctx.common,\n                issues: [],\n            },\n        };\n        const result = this._def.innerType._parse({\n            data: newCtx.data,\n            path: newCtx.path,\n            parent: {\n                ...newCtx,\n            },\n        });\n        if (isAsync(result)) {\n            return result.then((result) => {\n                return {\n                    status: \"valid\",\n                    value: result.status === \"valid\"\n                        ? result.value\n                        : this._def.catchValue({\n                            get error() {\n                                return new ZodError(newCtx.common.issues);\n                            },\n                            input: newCtx.data,\n                        }),\n                };\n            });\n        }\n        else {\n            return {\n                status: \"valid\",\n                value: result.status === \"valid\"\n                    ? result.value\n                    : this._def.catchValue({\n                        get error() {\n                            return new ZodError(newCtx.common.issues);\n                        },\n                        input: newCtx.data,\n                    }),\n            };\n        }\n    }\n    removeCatch() {\n        return this._def.innerType;\n    }\n}\nZodCatch.create = (type, params) => {\n    return new ZodCatch({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodCatch,\n        catchValue: typeof params.catch === \"function\" ? params.catch : () => params.catch,\n        ...processCreateParams(params),\n    });\n};\nexport class ZodNaN extends ZodType {\n    _parse(input) {\n        const parsedType = this._getType(input);\n        if (parsedType !== ZodParsedType.nan) {\n            const ctx = this._getOrReturnCtx(input);\n            addIssueToContext(ctx, {\n                code: ZodIssueCode.invalid_type,\n                expected: ZodParsedType.nan,\n                received: ctx.parsedType,\n            });\n            return INVALID;\n        }\n        return { status: \"valid\", value: input.data };\n    }\n}\nZodNaN.create = (params) => {\n    return new ZodNaN({\n        typeName: ZodFirstPartyTypeKind.ZodNaN,\n        ...processCreateParams(params),\n    });\n};\nexport const BRAND = Symbol(\"zod_brand\");\nexport class ZodBranded extends ZodType {\n    _parse(input) {\n        const { ctx } = this._processInputParams(input);\n        const data = ctx.data;\n        return this._def.type._parse({\n            data,\n            path: ctx.path,\n            parent: ctx,\n        });\n    }\n    unwrap() {\n        return this._def.type;\n    }\n}\nexport class ZodPipeline extends ZodType {\n    _parse(input) {\n        const { status, ctx } = this._processInputParams(input);\n        if (ctx.common.async) {\n            const handleAsync = async () => {\n                const inResult = await this._def.in._parseAsync({\n                    data: ctx.data,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n                if (inResult.status === \"aborted\")\n                    return INVALID;\n                if (inResult.status === \"dirty\") {\n                    status.dirty();\n                    return DIRTY(inResult.value);\n                }\n                else {\n                    return this._def.out._parseAsync({\n                        data: inResult.value,\n                        path: ctx.path,\n                        parent: ctx,\n                    });\n                }\n            };\n            return handleAsync();\n        }\n        else {\n            const inResult = this._def.in._parseSync({\n                data: ctx.data,\n                path: ctx.path,\n                parent: ctx,\n            });\n            if (inResult.status === \"aborted\")\n                return INVALID;\n            if (inResult.status === \"dirty\") {\n                status.dirty();\n                return {\n                    status: \"dirty\",\n                    value: inResult.value,\n                };\n            }\n            else {\n                return this._def.out._parseSync({\n                    data: inResult.value,\n                    path: ctx.path,\n                    parent: ctx,\n                });\n            }\n        }\n    }\n    static create(a, b) {\n        return new ZodPipeline({\n            in: a,\n            out: b,\n            typeName: ZodFirstPartyTypeKind.ZodPipeline,\n        });\n    }\n}\nexport class ZodReadonly extends ZodType {\n    _parse(input) {\n        const result = this._def.innerType._parse(input);\n        const freeze = (data) => {\n            if (isValid(data)) {\n                data.value = Object.freeze(data.value);\n            }\n            return data;\n        };\n        return isAsync(result) ? result.then((data) => freeze(data)) : freeze(result);\n    }\n    unwrap() {\n        return this._def.innerType;\n    }\n}\nZodReadonly.create = (type, params) => {\n    return new ZodReadonly({\n        innerType: type,\n        typeName: ZodFirstPartyTypeKind.ZodReadonly,\n        ...processCreateParams(params),\n    });\n};\n////////////////////////////////////////\n////////////////////////////////////////\n//////////                    //////////\n//////////      z.custom      //////////\n//////////                    //////////\n////////////////////////////////////////\n////////////////////////////////////////\nfunction cleanParams(params, data) {\n    const p = typeof params === \"function\" ? params(data) : typeof params === \"string\" ? { message: params } : params;\n    const p2 = typeof p === \"string\" ? { message: p } : p;\n    return p2;\n}\nexport function custom(check, _params = {}, \n/**\n * @deprecated\n *\n * Pass `fatal` into the params object instead:\n *\n * ```ts\n * z.string().custom((val) => val.length > 5, { fatal: false })\n * ```\n *\n */\nfatal) {\n    if (check)\n        return ZodAny.create().superRefine((data, ctx) => {\n            const r = check(data);\n            if (r instanceof Promise) {\n                return r.then((r) => {\n                    if (!r) {\n                        const params = cleanParams(_params, data);\n                        const _fatal = params.fatal ?? fatal ?? true;\n                        ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n                    }\n                });\n            }\n            if (!r) {\n                const params = cleanParams(_params, data);\n                const _fatal = params.fatal ?? fatal ?? true;\n                ctx.addIssue({ code: \"custom\", ...params, fatal: _fatal });\n            }\n            return;\n        });\n    return ZodAny.create();\n}\nexport { ZodType as Schema, ZodType as ZodSchema };\nexport const late = {\n    object: ZodObject.lazycreate,\n};\nexport var ZodFirstPartyTypeKind;\n(function (ZodFirstPartyTypeKind) {\n    ZodFirstPartyTypeKind[\"ZodString\"] = \"ZodString\";\n    ZodFirstPartyTypeKind[\"ZodNumber\"] = \"ZodNumber\";\n    ZodFirstPartyTypeKind[\"ZodNaN\"] = \"ZodNaN\";\n    ZodFirstPartyTypeKind[\"ZodBigInt\"] = \"ZodBigInt\";\n    ZodFirstPartyTypeKind[\"ZodBoolean\"] = \"ZodBoolean\";\n    ZodFirstPartyTypeKind[\"ZodDate\"] = \"ZodDate\";\n    ZodFirstPartyTypeKind[\"ZodSymbol\"] = \"ZodSymbol\";\n    ZodFirstPartyTypeKind[\"ZodUndefined\"] = \"ZodUndefined\";\n    ZodFirstPartyTypeKind[\"ZodNull\"] = \"ZodNull\";\n    ZodFirstPartyTypeKind[\"ZodAny\"] = \"ZodAny\";\n    ZodFirstPartyTypeKind[\"ZodUnknown\"] = \"ZodUnknown\";\n    ZodFirstPartyTypeKind[\"ZodNever\"] = \"ZodNever\";\n    ZodFirstPartyTypeKind[\"ZodVoid\"] = \"ZodVoid\";\n    ZodFirstPartyTypeKind[\"ZodArray\"] = \"ZodArray\";\n    ZodFirstPartyTypeKind[\"ZodObject\"] = \"ZodObject\";\n    ZodFirstPartyTypeKind[\"ZodUnion\"] = \"ZodUnion\";\n    ZodFirstPartyTypeKind[\"ZodDiscriminatedUnion\"] = \"ZodDiscriminatedUnion\";\n    ZodFirstPartyTypeKind[\"ZodIntersection\"] = \"ZodIntersection\";\n    ZodFirstPartyTypeKind[\"ZodTuple\"] = \"ZodTuple\";\n    ZodFirstPartyTypeKind[\"ZodRecord\"] = \"ZodRecord\";\n    ZodFirstPartyTypeKind[\"ZodMap\"] = \"ZodMap\";\n    ZodFirstPartyTypeKind[\"ZodSet\"] = \"ZodSet\";\n    ZodFirstPartyTypeKind[\"ZodFunction\"] = \"ZodFunction\";\n    ZodFirstPartyTypeKind[\"ZodLazy\"] = \"ZodLazy\";\n    ZodFirstPartyTypeKind[\"ZodLiteral\"] = \"ZodLiteral\";\n    ZodFirstPartyTypeKind[\"ZodEnum\"] = \"ZodEnum\";\n    ZodFirstPartyTypeKind[\"ZodEffects\"] = \"ZodEffects\";\n    ZodFirstPartyTypeKind[\"ZodNativeEnum\"] = \"ZodNativeEnum\";\n    ZodFirstPartyTypeKind[\"ZodOptional\"] = \"ZodOptional\";\n    ZodFirstPartyTypeKind[\"ZodNullable\"] = \"ZodNullable\";\n    ZodFirstPartyTypeKind[\"ZodDefault\"] = \"ZodDefault\";\n    ZodFirstPartyTypeKind[\"ZodCatch\"] = \"ZodCatch\";\n    ZodFirstPartyTypeKind[\"ZodPromise\"] = \"ZodPromise\";\n    ZodFirstPartyTypeKind[\"ZodBranded\"] = \"ZodBranded\";\n    ZodFirstPartyTypeKind[\"ZodPipeline\"] = \"ZodPipeline\";\n    ZodFirstPartyTypeKind[\"ZodReadonly\"] = \"ZodReadonly\";\n})(ZodFirstPartyTypeKind || (ZodFirstPartyTypeKind = {}));\n// requires TS 4.4+\nclass Class {\n    constructor(..._) { }\n}\nconst instanceOfType = (\n// const instanceOfType = <T extends new (...args: any[]) => any>(\ncls, params = {\n    message: `Input not instance of ${cls.name}`,\n}) => custom((data) => data instanceof cls, params);\nconst stringType = ZodString.create;\nconst numberType = ZodNumber.create;\nconst nanType = ZodNaN.create;\nconst bigIntType = ZodBigInt.create;\nconst booleanType = ZodBoolean.create;\nconst dateType = ZodDate.create;\nconst symbolType = ZodSymbol.create;\nconst undefinedType = ZodUndefined.create;\nconst nullType = ZodNull.create;\nconst anyType = ZodAny.create;\nconst unknownType = ZodUnknown.create;\nconst neverType = ZodNever.create;\nconst voidType = ZodVoid.create;\nconst arrayType = ZodArray.create;\nconst objectType = ZodObject.create;\nconst strictObjectType = ZodObject.strictCreate;\nconst unionType = ZodUnion.create;\nconst discriminatedUnionType = ZodDiscriminatedUnion.create;\nconst intersectionType = ZodIntersection.create;\nconst tupleType = ZodTuple.create;\nconst recordType = ZodRecord.create;\nconst mapType = ZodMap.create;\nconst setType = ZodSet.create;\nconst functionType = ZodFunction.create;\nconst lazyType = ZodLazy.create;\nconst literalType = ZodLiteral.create;\nconst enumType = ZodEnum.create;\nconst nativeEnumType = ZodNativeEnum.create;\nconst promiseType = ZodPromise.create;\nconst effectsType = ZodEffects.create;\nconst optionalType = ZodOptional.create;\nconst nullableType = ZodNullable.create;\nconst preprocessType = ZodEffects.createWithPreprocess;\nconst pipelineType = ZodPipeline.create;\nconst ostring = () => stringType().optional();\nconst onumber = () => numberType().optional();\nconst oboolean = () => booleanType().optional();\nexport const coerce = {\n    string: ((arg) => ZodString.create({ ...arg, coerce: true })),\n    number: ((arg) => ZodNumber.create({ ...arg, coerce: true })),\n    boolean: ((arg) => ZodBoolean.create({\n        ...arg,\n        coerce: true,\n    })),\n    bigint: ((arg) => ZodBigInt.create({ ...arg, coerce: true })),\n    date: ((arg) => ZodDate.create({ ...arg, coerce: true })),\n};\nexport { anyType as any, arrayType as array, bigIntType as bigint, booleanType as boolean, dateType as date, discriminatedUnionType as discriminatedUnion, effectsType as effect, enumType as enum, functionType as function, instanceOfType as instanceof, intersectionType as intersection, lazyType as lazy, literalType as literal, mapType as map, nanType as nan, nativeEnumType as nativeEnum, neverType as never, nullType as null, nullableType as nullable, numberType as number, objectType as object, oboolean, onumber, optionalType as optional, ostring, pipelineType as pipeline, preprocessType as preprocess, promiseType as promise, recordType as record, setType as set, strictObjectType as strictObject, stringType as string, symbolType as symbol, effectsType as transformer, tupleType as tuple, undefinedType as undefined, unionType as union, unknownType as unknown, voidType as void, };\nexport const NEVER = INVALID;\n","export * from \"./errors.js\";\nexport * from \"./helpers/parseUtil.js\";\nexport * from \"./helpers/typeAliases.js\";\nexport * from \"./helpers/util.js\";\nexport * from \"./types.js\";\nexport * from \"./ZodError.js\";\n","import * as z from \"./external.js\";\nexport * from \"./external.js\";\nexport { z };\nexport default z;\n","import { ZodFirstPartyTypeKind } from \"zod/v3\";\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/Options.js\nconst ignoreOverride = Symbol(\"Let zodToJsonSchema decide on which parser to use\");\nconst defaultOptions = {\n\tname: void 0,\n\t$refStrategy: \"root\",\n\tbasePath: [\"#\"],\n\teffectStrategy: \"input\",\n\tpipeStrategy: \"all\",\n\tdateStrategy: \"format:date-time\",\n\tmapStrategy: \"entries\",\n\tremoveAdditionalStrategy: \"passthrough\",\n\tallowedAdditionalProperties: true,\n\trejectedAdditionalProperties: false,\n\tdefinitionPath: \"definitions\",\n\ttarget: \"jsonSchema7\",\n\tstrictUnions: false,\n\tdefinitions: {},\n\terrorMessages: false,\n\tmarkdownDescription: false,\n\tpatternStrategy: \"escape\",\n\tapplyRegexFlags: false,\n\temailStrategy: \"format:email\",\n\tbase64Strategy: \"contentEncoding:base64\",\n\tnameStrategy: \"ref\",\n\topenAiAnyTypeName: \"OpenAiAnyType\"\n};\nconst getDefaultOptions = (options) => typeof options === \"string\" ? {\n\t...defaultOptions,\n\tname: options\n} : {\n\t...defaultOptions,\n\t...options\n};\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/Refs.js\nconst getRefs = (options) => {\n\tconst _options = getDefaultOptions(options);\n\tconst currentPath = _options.name !== void 0 ? [\n\t\t..._options.basePath,\n\t\t_options.definitionPath,\n\t\t_options.name\n\t] : _options.basePath;\n\treturn {\n\t\t..._options,\n\t\tflags: { hasReferencedOpenAiAnyType: false },\n\t\tcurrentPath,\n\t\tpropertyPath: void 0,\n\t\tseen: new Map(Object.entries(_options.definitions).map(([name, def]) => [def._def, {\n\t\t\tdef: def._def,\n\t\t\tpath: [\n\t\t\t\t..._options.basePath,\n\t\t\t\t_options.definitionPath,\n\t\t\t\tname\n\t\t\t],\n\t\t\tjsonSchema: void 0\n\t\t}]))\n\t};\n};\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/errorMessages.js\nfunction addErrorMessage(res, key, errorMessage, refs) {\n\tif (!refs?.errorMessages) return;\n\tif (errorMessage) res.errorMessage = {\n\t\t...res.errorMessage,\n\t\t[key]: errorMessage\n\t};\n}\nfunction setResponseValueAndErrors(res, key, value, errorMessage, refs) {\n\tres[key] = value;\n\taddErrorMessage(res, key, errorMessage, refs);\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/getRelativePath.js\nconst getRelativePath = (pathA, pathB) => {\n\tlet i = 0;\n\tfor (; i < pathA.length && i < pathB.length; i++) if (pathA[i] !== pathB[i]) break;\n\treturn [(pathA.length - i).toString(), ...pathB.slice(i)].join(\"/\");\n};\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/any.js\nfunction parseAnyDef(refs) {\n\tif (refs.target !== \"openAi\") return {};\n\tconst anyDefinitionPath = [\n\t\t...refs.basePath,\n\t\trefs.definitionPath,\n\t\trefs.openAiAnyTypeName\n\t];\n\trefs.flags.hasReferencedOpenAiAnyType = true;\n\treturn { $ref: refs.$refStrategy === \"relative\" ? getRelativePath(anyDefinitionPath, refs.currentPath) : anyDefinitionPath.join(\"/\") };\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/array.js\nfunction parseArrayDef(def, refs) {\n\tconst res = { type: \"array\" };\n\tif (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) res.items = parseDef(def.type._def, {\n\t\t...refs,\n\t\tcurrentPath: [...refs.currentPath, \"items\"]\n\t});\n\tif (def.minLength) setResponseValueAndErrors(res, \"minItems\", def.minLength.value, def.minLength.message, refs);\n\tif (def.maxLength) setResponseValueAndErrors(res, \"maxItems\", def.maxLength.value, def.maxLength.message, refs);\n\tif (def.exactLength) {\n\t\tsetResponseValueAndErrors(res, \"minItems\", def.exactLength.value, def.exactLength.message, refs);\n\t\tsetResponseValueAndErrors(res, \"maxItems\", def.exactLength.value, def.exactLength.message, refs);\n\t}\n\treturn res;\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js\nfunction parseBigintDef(def, refs) {\n\tconst res = {\n\t\ttype: \"integer\",\n\t\tformat: \"int64\"\n\t};\n\tif (!def.checks) return res;\n\tfor (const check of def.checks) switch (check.kind) {\n\t\tcase \"min\":\n\t\t\tif (refs.target === \"jsonSchema7\") if (check.inclusive) setResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n\t\t\telse setResponseValueAndErrors(res, \"exclusiveMinimum\", check.value, check.message, refs);\n\t\t\telse {\n\t\t\t\tif (!check.inclusive) res.exclusiveMinimum = true;\n\t\t\t\tsetResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"max\":\n\t\t\tif (refs.target === \"jsonSchema7\") if (check.inclusive) setResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n\t\t\telse setResponseValueAndErrors(res, \"exclusiveMaximum\", check.value, check.message, refs);\n\t\t\telse {\n\t\t\t\tif (!check.inclusive) res.exclusiveMaximum = true;\n\t\t\t\tsetResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"multipleOf\":\n\t\t\tsetResponseValueAndErrors(res, \"multipleOf\", check.value, check.message, refs);\n\t\t\tbreak;\n\t}\n\treturn res;\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js\nfunction parseBooleanDef() {\n\treturn { type: \"boolean\" };\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js\nfunction parseBrandedDef(_def, refs) {\n\treturn parseDef(_def.type._def, refs);\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js\nconst parseCatchDef = (def, refs) => {\n\treturn parseDef(def.innerType._def, refs);\n};\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/date.js\nfunction parseDateDef(def, refs, overrideDateStrategy) {\n\tconst strategy = overrideDateStrategy ?? refs.dateStrategy;\n\tif (Array.isArray(strategy)) return { anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)) };\n\tswitch (strategy) {\n\t\tcase \"string\":\n\t\tcase \"format:date-time\": return {\n\t\t\ttype: \"string\",\n\t\t\tformat: \"date-time\"\n\t\t};\n\t\tcase \"format:date\": return {\n\t\t\ttype: \"string\",\n\t\t\tformat: \"date\"\n\t\t};\n\t\tcase \"integer\": return integerDateParser(def, refs);\n\t}\n}\nconst integerDateParser = (def, refs) => {\n\tconst res = {\n\t\ttype: \"integer\",\n\t\tformat: \"unix-time\"\n\t};\n\tif (refs.target === \"openApi3\") return res;\n\tfor (const check of def.checks) switch (check.kind) {\n\t\tcase \"min\":\n\t\t\tsetResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"max\":\n\t\t\tsetResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n\t\t\tbreak;\n\t}\n\treturn res;\n};\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/default.js\nfunction parseDefaultDef(_def, refs) {\n\treturn {\n\t\t...parseDef(_def.innerType._def, refs),\n\t\tdefault: _def.defaultValue()\n\t};\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js\nfunction parseEffectsDef(_def, refs) {\n\treturn refs.effectStrategy === \"input\" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js\nfunction parseEnumDef(def) {\n\treturn {\n\t\ttype: \"string\",\n\t\tenum: Array.from(def.values)\n\t};\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js\nconst isJsonSchema7AllOfType = (type) => {\n\tif (\"type\" in type && type.type === \"string\") return false;\n\treturn \"allOf\" in type;\n};\nfunction parseIntersectionDef(def, refs) {\n\tconst allOf = [parseDef(def.left._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"allOf\",\n\t\t\t\"0\"\n\t\t]\n\t}), parseDef(def.right._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"allOf\",\n\t\t\t\"1\"\n\t\t]\n\t})].filter((x) => !!x);\n\tlet unevaluatedProperties = refs.target === \"jsonSchema2019-09\" ? { unevaluatedProperties: false } : void 0;\n\tconst mergedAllOf = [];\n\tallOf.forEach((schema) => {\n\t\tif (isJsonSchema7AllOfType(schema)) {\n\t\t\tmergedAllOf.push(...schema.allOf);\n\t\t\tif (schema.unevaluatedProperties === void 0) unevaluatedProperties = void 0;\n\t\t} else {\n\t\t\tlet nestedSchema = schema;\n\t\t\tif (\"additionalProperties\" in schema && schema.additionalProperties === false) {\n\t\t\t\tconst { additionalProperties, ...rest } = schema;\n\t\t\t\tnestedSchema = rest;\n\t\t\t} else unevaluatedProperties = void 0;\n\t\t\tmergedAllOf.push(nestedSchema);\n\t\t}\n\t});\n\treturn mergedAllOf.length ? {\n\t\tallOf: mergedAllOf,\n\t\t...unevaluatedProperties\n\t} : void 0;\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js\nfunction parseLiteralDef(def, refs) {\n\tconst parsedType = typeof def.value;\n\tif (parsedType !== \"bigint\" && parsedType !== \"number\" && parsedType !== \"boolean\" && parsedType !== \"string\") return { type: Array.isArray(def.value) ? \"array\" : \"object\" };\n\tif (refs.target === \"openApi3\") return {\n\t\ttype: parsedType === \"bigint\" ? \"integer\" : parsedType,\n\t\tenum: [def.value]\n\t};\n\treturn {\n\t\ttype: parsedType === \"bigint\" ? \"integer\" : parsedType,\n\t\tconst: def.value\n\t};\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/string.js\nlet emojiRegex = void 0;\n/**\n* Generated from the regular expressions found here as of 2024-05-22:\n* https://github.com/colinhacks/zod/blob/master/src/types.ts.\n*\n* Expressions with /i flag have been changed accordingly.\n*/\nconst zodPatterns = {\n\t/**\n\t* `c` was changed to `[cC]` to replicate /i flag\n\t*/\n\tcuid: /^[cC][^\\s-]{8,}$/,\n\tcuid2: /^[0-9a-z]+$/,\n\tulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,\n\t/**\n\t* `a-z` was added to replicate /i flag\n\t*/\n\temail: /^(?!\\.)(?!.*\\.\\.)([a-zA-Z0-9_'+\\-\\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\\-]*\\.)+[a-zA-Z]{2,}$/,\n\t/**\n\t* Constructed a valid Unicode RegExp\n\t*\n\t* Lazily instantiate since this type of regex isn't supported\n\t* in all envs (e.g. React Native).\n\t*\n\t* See:\n\t* https://github.com/colinhacks/zod/issues/2433\n\t* Fix in Zod:\n\t* https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b\n\t*/\n\temoji: () => {\n\t\tif (emojiRegex === void 0) emojiRegex = RegExp(\"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\", \"u\");\n\t\treturn emojiRegex;\n\t},\n\t/**\n\t* Unused\n\t*/\n\tuuid: /^[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}$/,\n\t/**\n\t* Unused\n\t*/\n\tipv4: /^(?:(?: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])$/,\n\tipv4Cidr: /^(?:(?: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])$/,\n\t/**\n\t* Unused\n\t*/\n\tipv6: /^(([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,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]{21}$/,\n\tjwt: /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/\n};\nfunction parseStringDef(def, refs) {\n\tconst res = { type: \"string\" };\n\tif (def.checks) for (const check of def.checks) switch (check.kind) {\n\t\tcase \"min\":\n\t\t\tsetResponseValueAndErrors(res, \"minLength\", typeof res.minLength === \"number\" ? Math.max(res.minLength, check.value) : check.value, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"max\":\n\t\t\tsetResponseValueAndErrors(res, \"maxLength\", typeof res.maxLength === \"number\" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"email\":\n\t\t\tswitch (refs.emailStrategy) {\n\t\t\t\tcase \"format:email\":\n\t\t\t\t\taddFormat(res, \"email\", check.message, refs);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"format:idn-email\":\n\t\t\t\t\taddFormat(res, \"idn-email\", check.message, refs);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"pattern:zod\":\n\t\t\t\t\taddPattern(res, zodPatterns.email, check.message, refs);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"url\":\n\t\t\taddFormat(res, \"uri\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"uuid\":\n\t\t\taddFormat(res, \"uuid\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"regex\":\n\t\t\taddPattern(res, check.regex, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"cuid\":\n\t\t\taddPattern(res, zodPatterns.cuid, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"cuid2\":\n\t\t\taddPattern(res, zodPatterns.cuid2, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"startsWith\":\n\t\t\taddPattern(res, RegExp(`^${escapeLiteralCheckValue(check.value, refs)}`), check.message, refs);\n\t\t\tbreak;\n\t\tcase \"endsWith\":\n\t\t\taddPattern(res, RegExp(`${escapeLiteralCheckValue(check.value, refs)}$`), check.message, refs);\n\t\t\tbreak;\n\t\tcase \"datetime\":\n\t\t\taddFormat(res, \"date-time\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"date\":\n\t\t\taddFormat(res, \"date\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"time\":\n\t\t\taddFormat(res, \"time\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"duration\":\n\t\t\taddFormat(res, \"duration\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"length\":\n\t\t\tsetResponseValueAndErrors(res, \"minLength\", typeof res.minLength === \"number\" ? Math.max(res.minLength, check.value) : check.value, check.message, refs);\n\t\t\tsetResponseValueAndErrors(res, \"maxLength\", typeof res.maxLength === \"number\" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"includes\":\n\t\t\taddPattern(res, RegExp(escapeLiteralCheckValue(check.value, refs)), check.message, refs);\n\t\t\tbreak;\n\t\tcase \"ip\":\n\t\t\tif (check.version !== \"v6\") addFormat(res, \"ipv4\", check.message, refs);\n\t\t\tif (check.version !== \"v4\") addFormat(res, \"ipv6\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"base64url\":\n\t\t\taddPattern(res, zodPatterns.base64url, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"jwt\":\n\t\t\taddPattern(res, zodPatterns.jwt, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"cidr\":\n\t\t\tif (check.version !== \"v6\") addPattern(res, zodPatterns.ipv4Cidr, check.message, refs);\n\t\t\tif (check.version !== \"v4\") addPattern(res, zodPatterns.ipv6Cidr, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"emoji\":\n\t\t\taddPattern(res, zodPatterns.emoji(), check.message, refs);\n\t\t\tbreak;\n\t\tcase \"ulid\":\n\t\t\taddPattern(res, zodPatterns.ulid, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"base64\":\n\t\t\tswitch (refs.base64Strategy) {\n\t\t\t\tcase \"format:binary\":\n\t\t\t\t\taddFormat(res, \"binary\", check.message, refs);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"contentEncoding:base64\":\n\t\t\t\t\tsetResponseValueAndErrors(res, \"contentEncoding\", \"base64\", check.message, refs);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"pattern:zod\":\n\t\t\t\t\taddPattern(res, zodPatterns.base64, check.message, refs);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"nanoid\": addPattern(res, zodPatterns.nanoid, check.message, refs);\n\t\tcase \"toLowerCase\":\n\t\tcase \"toUpperCase\":\n\t\tcase \"trim\": break;\n\t\tdefault:\n\t}\n\treturn res;\n}\nfunction escapeLiteralCheckValue(literal, refs) {\n\treturn refs.patternStrategy === \"escape\" ? escapeNonAlphaNumeric(literal) : literal;\n}\nconst ALPHA_NUMERIC = /* @__PURE__ */ new Set(\"ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789\");\nfunction escapeNonAlphaNumeric(source) {\n\tlet result = \"\";\n\tfor (let i = 0; i < source.length; i++) {\n\t\tif (!ALPHA_NUMERIC.has(source[i])) result += \"\\\\\";\n\t\tresult += source[i];\n\t}\n\treturn result;\n}\nfunction addFormat(schema, value, message, refs) {\n\tif (schema.format || schema.anyOf?.some((x) => x.format)) {\n\t\tif (!schema.anyOf) schema.anyOf = [];\n\t\tif (schema.format) {\n\t\t\tschema.anyOf.push({\n\t\t\t\tformat: schema.format,\n\t\t\t\t...schema.errorMessage && refs.errorMessages && { errorMessage: { format: schema.errorMessage.format } }\n\t\t\t});\n\t\t\tdelete schema.format;\n\t\t\tif (schema.errorMessage) {\n\t\t\t\tdelete schema.errorMessage.format;\n\t\t\t\tif (Object.keys(schema.errorMessage).length === 0) delete schema.errorMessage;\n\t\t\t}\n\t\t}\n\t\tschema.anyOf.push({\n\t\t\tformat: value,\n\t\t\t...message && refs.errorMessages && { errorMessage: { format: message } }\n\t\t});\n\t} else setResponseValueAndErrors(schema, \"format\", value, message, refs);\n}\nfunction addPattern(schema, regex, message, refs) {\n\tif (schema.pattern || schema.allOf?.some((x) => x.pattern)) {\n\t\tif (!schema.allOf) schema.allOf = [];\n\t\tif (schema.pattern) {\n\t\t\tschema.allOf.push({\n\t\t\t\tpattern: schema.pattern,\n\t\t\t\t...schema.errorMessage && refs.errorMessages && { errorMessage: { pattern: schema.errorMessage.pattern } }\n\t\t\t});\n\t\t\tdelete schema.pattern;\n\t\t\tif (schema.errorMessage) {\n\t\t\t\tdelete schema.errorMessage.pattern;\n\t\t\t\tif (Object.keys(schema.errorMessage).length === 0) delete schema.errorMessage;\n\t\t\t}\n\t\t}\n\t\tschema.allOf.push({\n\t\t\tpattern: stringifyRegExpWithFlags(regex, refs),\n\t\t\t...message && refs.errorMessages && { errorMessage: { pattern: message } }\n\t\t});\n\t} else setResponseValueAndErrors(schema, \"pattern\", stringifyRegExpWithFlags(regex, refs), message, refs);\n}\nfunction stringifyRegExpWithFlags(regex, refs) {\n\tif (!refs.applyRegexFlags || !regex.flags) return regex.source;\n\tconst flags = {\n\t\ti: regex.flags.includes(\"i\"),\n\t\tm: regex.flags.includes(\"m\"),\n\t\ts: regex.flags.includes(\"s\")\n\t};\n\tconst source = flags.i ? regex.source.toLowerCase() : regex.source;\n\tlet pattern = \"\";\n\tlet isEscaped = false;\n\tlet inCharGroup = false;\n\tlet inCharRange = false;\n\tfor (let i = 0; i < source.length; i++) {\n\t\tif (isEscaped) {\n\t\t\tpattern += source[i];\n\t\t\tisEscaped = false;\n\t\t\tcontinue;\n\t\t}\n\t\tif (flags.i) {\n\t\t\tif (inCharGroup) {\n\t\t\t\tif (source[i].match(/[a-z]/)) {\n\t\t\t\t\tif (inCharRange) {\n\t\t\t\t\t\tpattern += source[i];\n\t\t\t\t\t\tpattern += `${source[i - 2]}-${source[i]}`.toUpperCase();\n\t\t\t\t\t\tinCharRange = false;\n\t\t\t\t\t} else if (source[i + 1] === \"-\" && source[i + 2]?.match(/[a-z]/)) {\n\t\t\t\t\t\tpattern += source[i];\n\t\t\t\t\t\tinCharRange = true;\n\t\t\t\t\t} else pattern += `${source[i]}${source[i].toUpperCase()}`;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if (source[i].match(/[a-z]/)) {\n\t\t\t\tpattern += `[${source[i]}${source[i].toUpperCase()}]`;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (flags.m) {\n\t\t\tif (source[i] === \"^\") {\n\t\t\t\tpattern += `(^|(?<=[\\r\\n]))`;\n\t\t\t\tcontinue;\n\t\t\t} else if (source[i] === \"$\") {\n\t\t\t\tpattern += `($|(?=[\\r\\n]))`;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (flags.s && source[i] === \".\") {\n\t\t\tpattern += inCharGroup ? `${source[i]}\\r\\n` : `[${source[i]}\\r\\n]`;\n\t\t\tcontinue;\n\t\t}\n\t\tpattern += source[i];\n\t\tif (source[i] === \"\\\\\") isEscaped = true;\n\t\telse if (inCharGroup && source[i] === \"]\") inCharGroup = false;\n\t\telse if (!inCharGroup && source[i] === \"[\") inCharGroup = true;\n\t}\n\ttry {\n\t\tnew RegExp(pattern);\n\t} catch {\n\t\tconsole.warn(`Could not convert regex pattern at ${refs.currentPath.join(\"/\")} to a flag-independent form! Falling back to the flag-ignorant source`);\n\t\treturn regex.source;\n\t}\n\treturn pattern;\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/record.js\nfunction parseRecordDef(def, refs) {\n\tif (refs.target === \"openAi\") console.warn(\"Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.\");\n\tif (refs.target === \"openApi3\" && def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) return {\n\t\ttype: \"object\",\n\t\trequired: def.keyType._def.values,\n\t\tproperties: def.keyType._def.values.reduce((acc, key) => ({\n\t\t\t...acc,\n\t\t\t[key]: parseDef(def.valueType._def, {\n\t\t\t\t...refs,\n\t\t\t\tcurrentPath: [\n\t\t\t\t\t...refs.currentPath,\n\t\t\t\t\t\"properties\",\n\t\t\t\t\tkey\n\t\t\t\t]\n\t\t\t}) ?? parseAnyDef(refs)\n\t\t}), {}),\n\t\tadditionalProperties: refs.rejectedAdditionalProperties\n\t};\n\tconst schema = {\n\t\ttype: \"object\",\n\t\tadditionalProperties: parseDef(def.valueType._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [...refs.currentPath, \"additionalProperties\"]\n\t\t}) ?? refs.allowedAdditionalProperties\n\t};\n\tif (refs.target === \"openApi3\") return schema;\n\tif (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) {\n\t\tconst { type, ...keyType } = parseStringDef(def.keyType._def, refs);\n\t\treturn {\n\t\t\t...schema,\n\t\t\tpropertyNames: keyType\n\t\t};\n\t} else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) return {\n\t\t...schema,\n\t\tpropertyNames: { enum: def.keyType._def.values }\n\t};\n\telse if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.type._def.checks?.length) {\n\t\tconst { type, ...keyType } = parseBrandedDef(def.keyType._def, refs);\n\t\treturn {\n\t\t\t...schema,\n\t\t\tpropertyNames: keyType\n\t\t};\n\t}\n\treturn schema;\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/map.js\nfunction parseMapDef(def, refs) {\n\tif (refs.mapStrategy === \"record\") return parseRecordDef(def, refs);\n\treturn {\n\t\ttype: \"array\",\n\t\tmaxItems: 125,\n\t\titems: {\n\t\t\ttype: \"array\",\n\t\t\titems: [parseDef(def.keyType._def, {\n\t\t\t\t...refs,\n\t\t\t\tcurrentPath: [\n\t\t\t\t\t...refs.currentPath,\n\t\t\t\t\t\"items\",\n\t\t\t\t\t\"items\",\n\t\t\t\t\t\"0\"\n\t\t\t\t]\n\t\t\t}) || parseAnyDef(refs), parseDef(def.valueType._def, {\n\t\t\t\t...refs,\n\t\t\t\tcurrentPath: [\n\t\t\t\t\t...refs.currentPath,\n\t\t\t\t\t\"items\",\n\t\t\t\t\t\"items\",\n\t\t\t\t\t\"1\"\n\t\t\t\t]\n\t\t\t}) || parseAnyDef(refs)],\n\t\t\tminItems: 2,\n\t\t\tmaxItems: 2\n\t\t}\n\t};\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js\nfunction parseNativeEnumDef(def) {\n\tconst object = def.values;\n\tconst actualValues = Object.keys(def.values).filter((key) => {\n\t\treturn typeof object[object[key]] !== \"number\";\n\t}).map((key) => object[key]);\n\tconst parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values)));\n\treturn {\n\t\ttype: parsedTypes.length === 1 ? parsedTypes[0] === \"string\" ? \"string\" : \"number\" : [\"string\", \"number\"],\n\t\tenum: actualValues\n\t};\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/never.js\nfunction parseNeverDef(refs) {\n\treturn refs.target === \"openAi\" ? void 0 : { not: parseAnyDef({\n\t\t...refs,\n\t\tcurrentPath: [...refs.currentPath, \"not\"]\n\t}) };\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/null.js\nfunction parseNullDef(refs) {\n\treturn refs.target === \"openApi3\" ? {\n\t\tenum: [\"null\"],\n\t\tnullable: true\n\t} : { type: \"null\" };\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/union.js\nconst primitiveMappings = {\n\tZodString: \"string\",\n\tZodNumber: \"number\",\n\tZodBigInt: \"integer\",\n\tZodBoolean: \"boolean\",\n\tZodNull: \"null\"\n};\nfunction parseUnionDef(def, refs) {\n\tif (refs.target === \"openApi3\") return asAnyOf(def, refs);\n\tconst options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;\n\tif (options.every((x) => x._def.typeName in primitiveMappings && (!x._def.checks || !x._def.checks.length))) {\n\t\tconst types = options.reduce((types, x) => {\n\t\t\tconst type = primitiveMappings[x._def.typeName];\n\t\t\treturn type && !types.includes(type) ? [...types, type] : types;\n\t\t}, []);\n\t\treturn { type: types.length > 1 ? types : types[0] };\n\t} else if (options.every((x) => x._def.typeName === \"ZodLiteral\" && !x.description)) {\n\t\tconst types = options.reduce((acc, x) => {\n\t\t\tconst type = typeof x._def.value;\n\t\t\tswitch (type) {\n\t\t\t\tcase \"string\":\n\t\t\t\tcase \"number\":\n\t\t\t\tcase \"boolean\": return [...acc, type];\n\t\t\t\tcase \"bigint\": return [...acc, \"integer\"];\n\t\t\t\tcase \"object\": if (x._def.value === null) return [...acc, \"null\"];\n\t\t\t\tdefault: return acc;\n\t\t\t}\n\t\t}, []);\n\t\tif (types.length === options.length) {\n\t\t\tconst uniqueTypes = types.filter((x, i, a) => a.indexOf(x) === i);\n\t\t\treturn {\n\t\t\t\ttype: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],\n\t\t\t\tenum: options.reduce((acc, x) => {\n\t\t\t\t\treturn acc.includes(x._def.value) ? acc : [...acc, x._def.value];\n\t\t\t\t}, [])\n\t\t\t};\n\t\t}\n\t} else if (options.every((x) => x._def.typeName === \"ZodEnum\")) return {\n\t\ttype: \"string\",\n\t\tenum: options.reduce((acc, x) => [...acc, ...x._def.values.filter((x) => !acc.includes(x))], [])\n\t};\n\treturn asAnyOf(def, refs);\n}\nconst asAnyOf = (def, refs) => {\n\tconst anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x, i) => parseDef(x._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"anyOf\",\n\t\t\t`${i}`\n\t\t]\n\t})).filter((x) => !!x && (!refs.strictUnions || typeof x === \"object\" && Object.keys(x).length > 0));\n\treturn anyOf.length ? { anyOf } : void 0;\n};\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js\nfunction parseNullableDef(def, refs) {\n\tif ([\n\t\t\"ZodString\",\n\t\t\"ZodNumber\",\n\t\t\"ZodBigInt\",\n\t\t\"ZodBoolean\",\n\t\t\"ZodNull\"\n\t].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {\n\t\tif (refs.target === \"openApi3\") return {\n\t\t\ttype: primitiveMappings[def.innerType._def.typeName],\n\t\t\tnullable: true\n\t\t};\n\t\treturn { type: [primitiveMappings[def.innerType._def.typeName], \"null\"] };\n\t}\n\tif (refs.target === \"openApi3\") {\n\t\tconst base = parseDef(def.innerType._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [...refs.currentPath]\n\t\t});\n\t\tif (base && \"$ref\" in base) return {\n\t\t\tallOf: [base],\n\t\t\tnullable: true\n\t\t};\n\t\treturn base && {\n\t\t\t...base,\n\t\t\tnullable: true\n\t\t};\n\t}\n\tconst base = parseDef(def.innerType._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"anyOf\",\n\t\t\t\"0\"\n\t\t]\n\t});\n\treturn base && { anyOf: [base, { type: \"null\" }] };\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/number.js\nfunction parseNumberDef(def, refs) {\n\tconst res = { type: \"number\" };\n\tif (!def.checks) return res;\n\tfor (const check of def.checks) switch (check.kind) {\n\t\tcase \"int\":\n\t\t\tres.type = \"integer\";\n\t\t\taddErrorMessage(res, \"type\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"min\":\n\t\t\tif (refs.target === \"jsonSchema7\") if (check.inclusive) setResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n\t\t\telse setResponseValueAndErrors(res, \"exclusiveMinimum\", check.value, check.message, refs);\n\t\t\telse {\n\t\t\t\tif (!check.inclusive) res.exclusiveMinimum = true;\n\t\t\t\tsetResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"max\":\n\t\t\tif (refs.target === \"jsonSchema7\") if (check.inclusive) setResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n\t\t\telse setResponseValueAndErrors(res, \"exclusiveMaximum\", check.value, check.message, refs);\n\t\t\telse {\n\t\t\t\tif (!check.inclusive) res.exclusiveMaximum = true;\n\t\t\t\tsetResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"multipleOf\":\n\t\t\tsetResponseValueAndErrors(res, \"multipleOf\", check.value, check.message, refs);\n\t\t\tbreak;\n\t}\n\treturn res;\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/object.js\nfunction parseObjectDef(def, refs) {\n\tconst forceOptionalIntoNullable = refs.target === \"openAi\";\n\tconst result = {\n\t\ttype: \"object\",\n\t\tproperties: {}\n\t};\n\tconst required = [];\n\tconst shape = def.shape();\n\tfor (const propName in shape) {\n\t\tlet propDef = shape[propName];\n\t\tif (propDef === void 0 || propDef._def === void 0) continue;\n\t\tlet propOptional = safeIsOptional(propDef);\n\t\tif (propOptional && forceOptionalIntoNullable) {\n\t\t\tif (propDef._def.typeName === \"ZodOptional\") propDef = propDef._def.innerType;\n\t\t\tif (!propDef.isNullable()) propDef = propDef.nullable();\n\t\t\tpropOptional = false;\n\t\t}\n\t\tconst parsedDef = parseDef(propDef._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [\n\t\t\t\t...refs.currentPath,\n\t\t\t\t\"properties\",\n\t\t\t\tpropName\n\t\t\t],\n\t\t\tpropertyPath: [\n\t\t\t\t...refs.currentPath,\n\t\t\t\t\"properties\",\n\t\t\t\tpropName\n\t\t\t]\n\t\t});\n\t\tif (parsedDef === void 0) continue;\n\t\tresult.properties[propName] = parsedDef;\n\t\tif (!propOptional) required.push(propName);\n\t}\n\tif (required.length) result.required = required;\n\tconst additionalProperties = decideAdditionalProperties(def, refs);\n\tif (additionalProperties !== void 0) result.additionalProperties = additionalProperties;\n\treturn result;\n}\nfunction decideAdditionalProperties(def, refs) {\n\tif (def.catchall._def.typeName !== \"ZodNever\") return parseDef(def.catchall._def, {\n\t\t...refs,\n\t\tcurrentPath: [...refs.currentPath, \"additionalProperties\"]\n\t});\n\tswitch (def.unknownKeys) {\n\t\tcase \"passthrough\": return refs.allowedAdditionalProperties;\n\t\tcase \"strict\": return refs.rejectedAdditionalProperties;\n\t\tcase \"strip\": return refs.removeAdditionalStrategy === \"strict\" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties;\n\t}\n}\nfunction safeIsOptional(schema) {\n\ttry {\n\t\treturn schema.isOptional();\n\t} catch {\n\t\treturn true;\n\t}\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js\nconst parseOptionalDef = (def, refs) => {\n\tif (refs.currentPath.toString() === refs.propertyPath?.toString()) return parseDef(def.innerType._def, refs);\n\tconst innerSchema = parseDef(def.innerType._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"anyOf\",\n\t\t\t\"1\"\n\t\t]\n\t});\n\treturn innerSchema ? { anyOf: [{ not: parseAnyDef(refs) }, innerSchema] } : parseAnyDef(refs);\n};\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js\nconst parsePipelineDef = (def, refs) => {\n\tif (refs.pipeStrategy === \"input\") return parseDef(def.in._def, refs);\n\telse if (refs.pipeStrategy === \"output\") return parseDef(def.out._def, refs);\n\tconst a = parseDef(def.in._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"allOf\",\n\t\t\t\"0\"\n\t\t]\n\t});\n\treturn { allOf: [a, parseDef(def.out._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"allOf\",\n\t\t\ta ? \"1\" : \"0\"\n\t\t]\n\t})].filter((x) => x !== void 0) };\n};\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js\nfunction parsePromiseDef(def, refs) {\n\treturn parseDef(def.type._def, refs);\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/set.js\nfunction parseSetDef(def, refs) {\n\tconst schema = {\n\t\ttype: \"array\",\n\t\tuniqueItems: true,\n\t\titems: parseDef(def.valueType._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [...refs.currentPath, \"items\"]\n\t\t})\n\t};\n\tif (def.minSize) setResponseValueAndErrors(schema, \"minItems\", def.minSize.value, def.minSize.message, refs);\n\tif (def.maxSize) setResponseValueAndErrors(schema, \"maxItems\", def.maxSize.value, def.maxSize.message, refs);\n\treturn schema;\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js\nfunction parseTupleDef(def, refs) {\n\tif (def.rest) return {\n\t\ttype: \"array\",\n\t\tminItems: def.items.length,\n\t\titems: def.items.map((x, i) => parseDef(x._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [\n\t\t\t\t...refs.currentPath,\n\t\t\t\t\"items\",\n\t\t\t\t`${i}`\n\t\t\t]\n\t\t})).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []),\n\t\tadditionalItems: parseDef(def.rest._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [...refs.currentPath, \"additionalItems\"]\n\t\t})\n\t};\n\telse return {\n\t\ttype: \"array\",\n\t\tminItems: def.items.length,\n\t\tmaxItems: def.items.length,\n\t\titems: def.items.map((x, i) => parseDef(x._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [\n\t\t\t\t...refs.currentPath,\n\t\t\t\t\"items\",\n\t\t\t\t`${i}`\n\t\t\t]\n\t\t})).reduce((acc, x) => x === void 0 ? acc : [...acc, x], [])\n\t};\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js\nfunction parseUndefinedDef(refs) {\n\treturn { not: parseAnyDef(refs) };\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js\nfunction parseUnknownDef(refs) {\n\treturn parseAnyDef(refs);\n}\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js\nconst parseReadonlyDef = (def, refs) => {\n\treturn parseDef(def.innerType._def, refs);\n};\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/selectParser.js\nconst selectParser = (def, typeName, refs) => {\n\tswitch (typeName) {\n\t\tcase ZodFirstPartyTypeKind.ZodString: return parseStringDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodNumber: return parseNumberDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodObject: return parseObjectDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodBigInt: return parseBigintDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodBoolean: return parseBooleanDef();\n\t\tcase ZodFirstPartyTypeKind.ZodDate: return parseDateDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodUndefined: return parseUndefinedDef(refs);\n\t\tcase ZodFirstPartyTypeKind.ZodNull: return parseNullDef(refs);\n\t\tcase ZodFirstPartyTypeKind.ZodArray: return parseArrayDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodUnion:\n\t\tcase ZodFirstPartyTypeKind.ZodDiscriminatedUnion: return parseUnionDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodIntersection: return parseIntersectionDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodTuple: return parseTupleDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodRecord: return parseRecordDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodLiteral: return parseLiteralDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodEnum: return parseEnumDef(def);\n\t\tcase ZodFirstPartyTypeKind.ZodNativeEnum: return parseNativeEnumDef(def);\n\t\tcase ZodFirstPartyTypeKind.ZodNullable: return parseNullableDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodOptional: return parseOptionalDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodMap: return parseMapDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodSet: return parseSetDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodLazy: return () => def.getter()._def;\n\t\tcase ZodFirstPartyTypeKind.ZodPromise: return parsePromiseDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodNaN:\n\t\tcase ZodFirstPartyTypeKind.ZodNever: return parseNeverDef(refs);\n\t\tcase ZodFirstPartyTypeKind.ZodEffects: return parseEffectsDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodAny: return parseAnyDef(refs);\n\t\tcase ZodFirstPartyTypeKind.ZodUnknown: return parseUnknownDef(refs);\n\t\tcase ZodFirstPartyTypeKind.ZodDefault: return parseDefaultDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodBranded: return parseBrandedDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodReadonly: return parseReadonlyDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodCatch: return parseCatchDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodPipeline: return parsePipelineDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodFunction:\n\t\tcase ZodFirstPartyTypeKind.ZodVoid:\n\t\tcase ZodFirstPartyTypeKind.ZodSymbol: return;\n\t\tdefault: return ((_) => void 0)(typeName);\n\t}\n};\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/parseDef.js\nfunction parseDef(def, refs, forceResolution = false) {\n\tconst seenItem = refs.seen.get(def);\n\tif (refs.override) {\n\t\tconst overrideResult = refs.override?.(def, refs, seenItem, forceResolution);\n\t\tif (overrideResult !== ignoreOverride) return overrideResult;\n\t}\n\tif (seenItem && !forceResolution) {\n\t\tconst seenSchema = get$ref(seenItem, refs);\n\t\tif (seenSchema !== void 0) return seenSchema;\n\t}\n\tconst newItem = {\n\t\tdef,\n\t\tpath: refs.currentPath,\n\t\tjsonSchema: void 0\n\t};\n\trefs.seen.set(def, newItem);\n\tconst jsonSchemaOrGetter = selectParser(def, def.typeName, refs);\n\tconst jsonSchema = typeof jsonSchemaOrGetter === \"function\" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter;\n\tif (jsonSchema) addMeta(def, refs, jsonSchema);\n\tif (refs.postProcess) {\n\t\tconst postProcessResult = refs.postProcess(jsonSchema, def, refs);\n\t\tnewItem.jsonSchema = jsonSchema;\n\t\treturn postProcessResult;\n\t}\n\tnewItem.jsonSchema = jsonSchema;\n\treturn jsonSchema;\n}\nconst get$ref = (item, refs) => {\n\tswitch (refs.$refStrategy) {\n\t\tcase \"root\": return { $ref: item.path.join(\"/\") };\n\t\tcase \"relative\": return { $ref: getRelativePath(refs.currentPath, item.path) };\n\t\tcase \"none\":\n\t\tcase \"seen\":\n\t\t\tif (item.path.length < refs.currentPath.length && item.path.every((value, index) => refs.currentPath[index] === value)) {\n\t\t\t\tconsole.warn(`Recursive reference detected at ${refs.currentPath.join(\"/\")}! Defaulting to any`);\n\t\t\t\treturn parseAnyDef(refs);\n\t\t\t}\n\t\t\treturn refs.$refStrategy === \"seen\" ? parseAnyDef(refs) : void 0;\n\t}\n};\nconst addMeta = (def, refs, jsonSchema) => {\n\tif (def.description) {\n\t\tjsonSchema.description = def.description;\n\t\tif (refs.markdownDescription) jsonSchema.markdownDescription = def.description;\n\t}\n\treturn jsonSchema;\n};\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js\nconst zodToJsonSchema = (schema, options) => {\n\tconst refs = getRefs(options);\n\tlet definitions = typeof options === \"object\" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name, schema]) => ({\n\t\t...acc,\n\t\t[name]: parseDef(schema._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [\n\t\t\t\t...refs.basePath,\n\t\t\t\trefs.definitionPath,\n\t\t\t\tname\n\t\t\t]\n\t\t}, true) ?? parseAnyDef(refs)\n\t}), {}) : void 0;\n\tconst name = typeof options === \"string\" ? options : options?.nameStrategy === \"title\" ? void 0 : options?.name;\n\tconst main = parseDef(schema._def, name === void 0 ? refs : {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.basePath,\n\t\t\trefs.definitionPath,\n\t\t\tname\n\t\t]\n\t}, false) ?? parseAnyDef(refs);\n\tconst title = typeof options === \"object\" && options.name !== void 0 && options.nameStrategy === \"title\" ? options.name : void 0;\n\tif (title !== void 0) main.title = title;\n\tif (refs.flags.hasReferencedOpenAiAnyType) {\n\t\tif (!definitions) definitions = {};\n\t\tif (!definitions[refs.openAiAnyTypeName]) definitions[refs.openAiAnyTypeName] = {\n\t\t\ttype: [\n\t\t\t\t\"string\",\n\t\t\t\t\"number\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"array\",\n\t\t\t\t\"null\"\n\t\t\t],\n\t\t\titems: { $ref: refs.$refStrategy === \"relative\" ? \"1\" : [\n\t\t\t\t...refs.basePath,\n\t\t\t\trefs.definitionPath,\n\t\t\t\trefs.openAiAnyTypeName\n\t\t\t].join(\"/\") }\n\t\t};\n\t}\n\tconst combined = name === void 0 ? definitions ? {\n\t\t...main,\n\t\t[refs.definitionPath]: definitions\n\t} : main : {\n\t\t$ref: [\n\t\t\t...refs.$refStrategy === \"relative\" ? [] : refs.basePath,\n\t\t\trefs.definitionPath,\n\t\t\tname\n\t\t].join(\"/\"),\n\t\t[refs.definitionPath]: {\n\t\t\t...definitions,\n\t\t\t[name]: main\n\t\t}\n\t};\n\tif (refs.target === \"jsonSchema7\") combined.$schema = \"http://json-schema.org/draft-07/schema#\";\n\telse if (refs.target === \"jsonSchema2019-09\" || refs.target === \"openAi\") combined.$schema = \"https://json-schema.org/draft/2019-09/schema#\";\n\tif (refs.target === \"openAi\" && (\"anyOf\" in combined || \"oneOf\" in combined || \"allOf\" in combined || \"type\" in combined && Array.isArray(combined.type))) console.warn(\"Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.\");\n\treturn combined;\n};\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-to-json-schema/3.25.2/908f2d58cfca10020e2b6940a6739ce665a2f2df0fe5c6976055048ffcbe2bc3/node_modules/zod-to-json-schema/dist/esm/index.js\nvar esm_default = zodToJsonSchema;\n//#endregion\nexport { ignoreOverride as n, esm_default as t };\n\n//# sourceMappingURL=esm-CWlHuVIx.js.map","import { globalConfig } from \"./core.js\";\n// functions\nexport function assertEqual(val) {\n    return val;\n}\nexport function assertNotEqual(val) {\n    return val;\n}\nexport function toZod() {\n    return (schema) => schema;\n}\nexport function assertIs(_arg) { }\nexport function assertNever(_x) {\n    throw new Error(\"Unexpected value in exhaustive check\");\n}\nexport function assert(_) { }\nexport function getEnumValues(entries) {\n    const numericValues = Object.values(entries).filter((v) => typeof v === \"number\");\n    const values = Object.entries(entries)\n        .filter(([k, _]) => numericValues.indexOf(+k) === -1)\n        .map(([_, v]) => v);\n    return values;\n}\nexport function joinValues(array, separator = \"|\") {\n    return array.map((val) => stringifyPrimitive(val)).join(separator);\n}\nexport function jsonStringifyReplacer(_, value) {\n    if (typeof value === \"bigint\")\n        return value.toString();\n    return value;\n}\n// the accessor lives on a shared prototype: an own accessor makes every box a dictionary-mode object (~360 B and a slow load per read against ~100 B and an inlined getter here)\nclass Cached {\n    constructor(getter) {\n        this._getter = getter;\n        this._value = undefined;\n    }\n    get value() {\n        const getter = this._getter;\n        if (getter !== undefined) {\n            this._value = getter();\n            this._getter = undefined;\n        }\n        return this._value;\n    }\n}\nexport function cached(getter) {\n    return new Cached(getter);\n}\nexport function nullish(input) {\n    return input === null || input === undefined;\n}\nexport function cleanRegex(source) {\n    const start = source.startsWith(\"^\") ? 1 : 0;\n    const end = source.endsWith(\"$\") ? source.length - 1 : source.length;\n    return source.slice(start, end);\n}\nexport function floatSafeRemainder(val, step) {\n    const ratio = val / step;\n    const roundedRatio = Math.round(ratio);\n    // `val` and `step` each round to a double before the division rounds again, so a true decimal multiple's quotient can sit up to 1.5 of these scaled epsilons from the integer. A 1x tolerance therefore rejected 2.03 as a multiple of 0.07; 4x covers the worst case with margin.\n    const tolerance = 4 * Number.EPSILON * Math.max(Math.abs(ratio), 1);\n    if (Math.abs(ratio - roundedRatio) < tolerance)\n        return 0;\n    return ratio - roundedRatio;\n}\nconst EVALUATING = /* @__PURE__*/ Symbol(\"evaluating\");\nexport function defineLazy(object, key, getter) {\n    let value = undefined;\n    Object.defineProperty(object, key, {\n        get() {\n            if (value === EVALUATING) {\n                // Circular reference detected, return undefined to break the cycle\n                return undefined;\n            }\n            if (value === undefined) {\n                value = EVALUATING;\n                value = getter();\n            }\n            return value;\n        },\n        set(v) {\n            Object.defineProperty(object, key, {\n                value: v,\n                // configurable: true,\n            });\n            // object[key] = v;\n        },\n        configurable: true,\n    });\n}\nexport function objectClone(obj) {\n    return Object.create(Object.getPrototypeOf(obj), Object.getOwnPropertyDescriptors(obj));\n}\nexport function assignProp(target, prop, value) {\n    Object.defineProperty(target, prop, {\n        value,\n        writable: true,\n        enumerable: true,\n        configurable: true,\n    });\n}\n/**\n * Whichever object a def's `shape` currently answers from: the one the caller passed until the first read, the frozen copy after it.\n *\n * Its keys and descriptors read without invoking anything, which is what lets a discriminated union check its discriminator, and the cycle walk read a shape, without resolving a getter that references the schema being constructed. A def that answers `shape` from an accessor of its own has none.\n */\nexport function rawShape(def) {\n    const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n    return desc?.get ? desc.get.raw : desc?.value;\n}\n// where a builder reads its source's keys and descriptors, resolving only a shape a def answers for itself. A shape resolves by object spread, so only its enumerable keys are ever part of it.\nfunction sourceShape(schema) {\n    return rawShape(schema._zod.def) ?? schema._zod.def.shape;\n}\n// a key whose value is not settled yet, self-caching so every read after the first gets the same one\nfunction deferProp(target, key, getter) {\n    Object.defineProperty(target, key, {\n        get() {\n            const value = getter();\n            assignProp(this, key, value);\n            return value;\n        },\n        enumerable: true,\n        configurable: true,\n    });\n}\n// Writes a settled key. A plain assignment is much cheaper than `defineProperty` and produces the same descriptor, but it runs whatever setter already answers to the key — an accessor this shape deferred, or an inherited one, which `__proto__` has on every object and prototype pollution can add for any name.\nfunction putProp(target, key, value) {\n    if (key in target)\n        assignProp(target, key, value);\n    else\n        target[key] = value;\n}\n/**\n * Copies `keys` of `source`'s shape onto `target`, each value passed through `wrap`.\n *\n * A key the source has resolved is copied through now, so the derived shape states it outright and nothing has to resolve it to learn what it holds. A key the source still defers stays deferred, and reads back through the source's own `shape`, so it resolves once and both shapes get that one schema.\n */\nfunction mirrorShape(target, source, keys, wrap) {\n    const raw = sourceShape(source);\n    for (const key of keys) {\n        const desc = Object.getOwnPropertyDescriptor(raw, key);\n        if (!desc.enumerable)\n            continue;\n        if (desc.get) {\n            deferProp(target, key, () => {\n                const value = source._zod.def.shape[key];\n                return wrap ? wrap(value, key) : value;\n            });\n        }\n        else\n            putProp(target, key, wrap ? wrap(desc.value, key) : desc.value);\n    }\n}\n// same, for a plain shape a caller passed rather than a schema's\nfunction mirrorProps(target, source) {\n    for (const key of Reflect.ownKeys(source)) {\n        const desc = Object.getOwnPropertyDescriptor(source, key);\n        if (!desc.enumerable)\n            continue;\n        if (desc.get)\n            deferProp(target, key, () => source[key]);\n        else\n            putProp(target, key, desc.value);\n    }\n}\nexport function mergeDefs(...defs) {\n    const mergedDescriptors = {};\n    for (const def of defs) {\n        const descriptors = Object.getOwnPropertyDescriptors(def);\n        Object.assign(mergedDescriptors, descriptors);\n    }\n    return Object.defineProperties({}, mergedDescriptors);\n}\nexport function cloneDef(schema) {\n    return mergeDefs(schema._zod.def);\n}\nexport function getElementAtPath(obj, path) {\n    if (!path)\n        return obj;\n    return path.reduce((acc, key) => acc?.[key], obj);\n}\nexport function promiseAllObject(promisesObj) {\n    const keys = Object.keys(promisesObj);\n    const promises = keys.map((key) => promisesObj[key]);\n    return Promise.all(promises).then((results) => {\n        const resolvedObj = {};\n        for (let i = 0; i < keys.length; i++) {\n            resolvedObj[keys[i]] = results[i];\n        }\n        return resolvedObj;\n    });\n}\nexport function randomString(length = 10) {\n    const chars = \"abcdefghijklmnopqrstuvwxyz\";\n    let str = \"\";\n    for (let i = 0; i < length; i++) {\n        str += chars[Math.floor(Math.random() * chars.length)];\n    }\n    return str;\n}\nexport function esc(str) {\n    return JSON.stringify(str);\n}\nexport function slugify(input) {\n    return input\n        .toLowerCase()\n        .trim()\n        .replace(/[^\\w\\s-]/g, \"\")\n        .replace(/[\\s_-]+/g, \"-\")\n        .replace(/^-+|-+$/g, \"\");\n}\nexport const captureStackTrace = (\"captureStackTrace\" in Error ? Error.captureStackTrace : (..._args) => { });\nexport function isObject(data) {\n    return typeof data === \"object\" && data !== null && !Array.isArray(data);\n}\nexport const allowsEval = /* @__PURE__*/ cached(() => {\n    // Skip the probe under `jitless`: strict CSPs report the caught `new Function` as a `securitypolicyviolation` even though the throw is swallowed.\n    if (globalConfig.jitless) {\n        return false;\n    }\n    // @ts-ignore\n    if (typeof navigator !== \"undefined\" && navigator?.userAgent?.includes(\"Cloudflare\")) {\n        return false;\n    }\n    try {\n        const F = Function;\n        new F(\"\");\n        return true;\n    }\n    catch (_) {\n        return false;\n    }\n});\nexport function isPlainObject(o) {\n    if (isObject(o) === false)\n        return false;\n    // modified constructor\n    const ctor = o.constructor;\n    if (ctor === undefined)\n        return true;\n    if (typeof ctor !== \"function\")\n        return true;\n    // modified prototype\n    const prot = ctor.prototype;\n    if (isObject(prot) === false)\n        return false;\n    // ctor doesn't have static `isPrototypeOf`\n    if (Object.prototype.hasOwnProperty.call(prot, \"isPrototypeOf\") === false) {\n        return false;\n    }\n    return true;\n}\nexport function shallowClone(o) {\n    if (isPlainObject(o))\n        return { ...o };\n    if (Array.isArray(o))\n        return [...o];\n    if (o instanceof Map)\n        return new Map(o);\n    if (o instanceof Set)\n        return new Set(o);\n    return o;\n}\nexport function numKeys(data) {\n    let keyCount = 0;\n    for (const key in data) {\n        if (Object.prototype.hasOwnProperty.call(data, key)) {\n            keyCount++;\n        }\n    }\n    return keyCount;\n}\nexport const getParsedType = (data) => {\n    const t = typeof data;\n    switch (t) {\n        case \"undefined\":\n            return \"undefined\";\n        case \"string\":\n            return \"string\";\n        case \"number\":\n            return Number.isNaN(data) ? \"nan\" : \"number\";\n        case \"boolean\":\n            return \"boolean\";\n        case \"function\":\n            return \"function\";\n        case \"bigint\":\n            return \"bigint\";\n        case \"symbol\":\n            return \"symbol\";\n        case \"object\":\n            if (Array.isArray(data)) {\n                return \"array\";\n            }\n            if (data === null) {\n                return \"null\";\n            }\n            if (data.then && typeof data.then === \"function\" && data.catch && typeof data.catch === \"function\") {\n                return \"promise\";\n            }\n            if (typeof Map !== \"undefined\" && data instanceof Map) {\n                return \"map\";\n            }\n            if (typeof Set !== \"undefined\" && data instanceof Set) {\n                return \"set\";\n            }\n            if (typeof Date !== \"undefined\" && data instanceof Date) {\n                return \"date\";\n            }\n            // @ts-ignore\n            if (typeof File !== \"undefined\" && data instanceof File) {\n                return \"file\";\n            }\n            return \"object\";\n        default:\n            throw new Error(`Unknown data type: ${t}`);\n    }\n};\nexport const propertyKeyTypes = /* @__PURE__*/ new Set([\"string\", \"number\", \"symbol\"]);\nexport const primitiveTypes = /* @__PURE__*/ new Set([\n    \"string\",\n    \"number\",\n    \"bigint\",\n    \"boolean\",\n    \"symbol\",\n    \"undefined\",\n]);\nexport function escapeRegex(str) {\n    return str.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\");\n}\n// zod-specific utils\nexport function clone(inst, def, params) {\n    const cl = new inst._zod.constr(def ?? inst._zod.def);\n    if (!def || params?.parent)\n        cl._zod.parent = inst;\n    return cl;\n}\nexport function normalizeParams(_params) {\n    const params = _params;\n    if (!params)\n        return {};\n    if (typeof params === \"string\")\n        return { error: () => params };\n    if (params?.message !== undefined) {\n        if (params?.error !== undefined)\n            throw new Error(\"Cannot specify both `message` and `error` params\");\n        params.error = params.message;\n    }\n    delete params.message;\n    if (typeof params.error === \"string\")\n        return { ...params, error: () => params.error };\n    return params;\n}\nexport function createTransparentProxy(getter) {\n    let target;\n    return new Proxy({}, {\n        get(_, prop, receiver) {\n            target ?? (target = getter());\n            return Reflect.get(target, prop, receiver);\n        },\n        set(_, prop, value, receiver) {\n            target ?? (target = getter());\n            return Reflect.set(target, prop, value, receiver);\n        },\n        has(_, prop) {\n            target ?? (target = getter());\n            return Reflect.has(target, prop);\n        },\n        deleteProperty(_, prop) {\n            target ?? (target = getter());\n            return Reflect.deleteProperty(target, prop);\n        },\n        ownKeys(_) {\n            target ?? (target = getter());\n            return Reflect.ownKeys(target);\n        },\n        getOwnPropertyDescriptor(_, prop) {\n            target ?? (target = getter());\n            return Reflect.getOwnPropertyDescriptor(target, prop);\n        },\n        defineProperty(_, prop, descriptor) {\n            target ?? (target = getter());\n            return Reflect.defineProperty(target, prop, descriptor);\n        },\n    });\n}\nexport function stringifyPrimitive(value) {\n    if (typeof value === \"bigint\")\n        return value.toString() + \"n\";\n    if (typeof value === \"string\")\n        return `\"${value}\"`;\n    return `${value}`;\n}\nexport function optionalKeys(shape) {\n    return Object.keys(shape).filter((k) => {\n        return shape[k]._zod.optin !== undefined && shape[k]._zod.optout === \"optional\";\n    });\n}\n// Wrapped in a `@__PURE__` IIFE: esbuild never tree-shakes a top-level initializer that contains a member access on `Number`, so the bare object literal survived into every bundle.\nexport const NUMBER_FORMAT_RANGES = /*@__PURE__*/ (() => ({\n    safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],\n    int32: [-2147483648, 2147483647],\n    uint32: [0, 4294967295],\n    float32: [-3.4028234663852886e38, 3.4028234663852886e38],\n    float64: [-Number.MAX_VALUE, Number.MAX_VALUE],\n}))();\nexport const BIGINT_FORMAT_RANGES = {\n    int64: [/* @__PURE__*/ BigInt(\"-9223372036854775808\"), /* @__PURE__*/ BigInt(\"9223372036854775807\")],\n    uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt(\"18446744073709551615\")],\n};\nexport function pick(schema, mask) {\n    const currDef = schema._zod.def;\n    const checks = currDef.checks;\n    const hasChecks = checks && checks.length > 0;\n    if (hasChecks) {\n        throw new Error(\".pick() cannot be used on object schemas containing refinements\");\n    }\n    const newShape = {};\n    mirrorShape(newShape, schema, maskedKeys(schema, mask));\n    return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));\n}\n// the mask keys that select something, checked against the source's shape without resolving it\nfunction maskedKeys(schema, mask) {\n    const raw = sourceShape(schema);\n    const keys = [];\n    // `for...in` skips symbols, so a symbol in the mask would select nothing\n    for (const key of Reflect.ownKeys(mask)) {\n        if (!Object.getOwnPropertyDescriptor(raw, key)?.enumerable) {\n            throw new Error(`Unrecognized key: \"${String(key)}\"`);\n        }\n        if (mask[key])\n            keys.push(key);\n    }\n    return keys;\n}\nexport function omit(schema, mask) {\n    const currDef = schema._zod.def;\n    const checks = currDef.checks;\n    const hasChecks = checks && checks.length > 0;\n    if (hasChecks) {\n        throw new Error(\".omit() cannot be used on object schemas containing refinements\");\n    }\n    const omitted = new Set(maskedKeys(schema, mask));\n    const newShape = {};\n    mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)));\n    return clone(schema, mergeDefs(currDef, { shape: newShape, checks: [] }));\n}\nexport function extend(schema, shape) {\n    if (!isPlainObject(shape)) {\n        throw new Error(\"Invalid input to extend: expected a plain object\");\n    }\n    const checks = schema._zod.def.checks;\n    const hasChecks = checks && checks.length > 0;\n    if (hasChecks) {\n        // Only throw if new shape overlaps with existing shape. Use getOwnPropertyDescriptor to check key existence without accessing values\n        const existingShape = sourceShape(schema);\n        for (const key of Reflect.ownKeys(shape)) {\n            if (Object.getOwnPropertyDescriptor(existingShape, key) !== undefined) {\n                throw new Error(\"Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.\");\n            }\n        }\n    }\n    return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));\n}\n// the source's keys, then the caller's overlaid on top\nfunction extended(schema, shape) {\n    const newShape = {};\n    mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)));\n    mirrorProps(newShape, shape);\n    return newShape;\n}\nexport function safeExtend(schema, shape) {\n    if (!isPlainObject(shape)) {\n        throw new Error(\"Invalid input to safeExtend: expected a plain object\");\n    }\n    return clone(schema, mergeDefs(schema._zod.def, { shape: extended(schema, shape) }));\n}\nexport function merge(a, b) {\n    if (!b?._zod?.def) {\n        throw new Error(\"Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.\");\n    }\n    if (a._zod.def.checks?.length) {\n        throw new Error(\".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.\");\n    }\n    const newShape = {};\n    mirrorShape(newShape, a, Reflect.ownKeys(sourceShape(a)));\n    mirrorShape(newShape, b, Reflect.ownKeys(sourceShape(b)));\n    const def = mergeDefs(a._zod.def, {\n        shape: newShape,\n        get catchall() {\n            return b._zod.def.catchall;\n        },\n        checks: b._zod.def.checks ?? [],\n    });\n    return clone(a, def);\n}\nexport function partial(Class, schema, mask, name = \"partial\") {\n    const currDef = schema._zod.def;\n    const checks = currDef.checks;\n    const hasChecks = checks && checks.length > 0;\n    if (hasChecks) {\n        throw new Error(`.${name}() cannot be used on object schemas containing refinements`);\n    }\n    const selected = mask ? new Set(maskedKeys(schema, mask)) : undefined;\n    const newShape = {};\n    mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class &&\n        ((value, key) => (selected && !selected.has(key) ? value : new Class({ type: \"optional\", innerType: value }))));\n    return clone(schema, mergeDefs(schema._zod.def, { shape: newShape, checks: [] }));\n}\nexport function required(Class, schema, mask) {\n    const selected = mask ? new Set(maskedKeys(schema, mask)) : undefined;\n    const newShape = {};\n    mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), (value, key) => \n    // overwrite with non-optional\n    selected && !selected.has(key) ? value : new Class({ type: \"nonoptional\", innerType: value }));\n    return clone(schema, mergeDefs(schema._zod.def, { shape: newShape }));\n}\n// invalid_type | too_big | too_small | invalid_format | not_multiple_of | unrecognized_keys | invalid_union | invalid_key | invalid_element | invalid_value | custom\nexport function aborted(x, startIndex = 0) {\n    if (x.aborted === true)\n        return true;\n    for (let i = startIndex; i < x.issues.length; i++) {\n        if (x.issues[i]?.continue !== true) {\n            return true;\n        }\n    }\n    return false;\n}\n// Checks for explicit abort (continue === false), as opposed to implicit abort (continue === undefined). Used to respect `abort: true` in .refine() even for checks that have a `when` function.\nexport function explicitlyAborted(x, startIndex = 0) {\n    if (x.aborted === true)\n        return true;\n    for (let i = startIndex; i < x.issues.length; i++) {\n        if (x.issues[i]?.continue === false) {\n            return true;\n        }\n    }\n    return false;\n}\nexport function prefixIssues(path, issues) {\n    return issues.map((iss) => {\n        var _a;\n        (_a = iss).path ?? (_a.path = []);\n        iss.path.unshift(path);\n        return iss;\n    });\n}\nexport function unwrapMessage(message) {\n    return typeof message === \"string\" ? message : message?.message;\n}\n/* A check holds no link back to the schema it is attached to — the same check instance is shared by every clone of that schema — so the owner is stamped onto the issues a check just raised, at the only point where both are in scope. Runs on the failure path only; `start` is the issue count from before the check ran. */\nexport function attachSchema(issues, start, inst) {\n    var _a;\n    for (let i = start; i < issues.length; i++) {\n        (_a = issues[i]).schema ?? (_a.schema = inst);\n    }\n}\nexport function finalizeIssue(iss, ctx, config) {\n    var _a;\n    // A schema that raised an issue itself owns it outright, and outranks any stamp an enclosing check left in `attachSchema`. String formats and z.custom() are schema and check at once, so when they act as a check they defer to that stamp instead.\n    const traits = iss.inst?._zod?.traits;\n    if (traits?.has(\"$ZodType\")) {\n        if (traits.has(\"$ZodCheck\"))\n            (_a = iss).schema ?? (_a.schema = iss.inst);\n        else\n            iss.schema = iss.inst;\n    }\n    // Decreasing specificity, first map to return a message wins. `inst` is whatever raised the issue, so a check's own map outranks the owning schema's.\n    const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : undefined;\n    const message = iss.message\n        ? iss.message\n        : (unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ??\n            unwrapMessage(schemaError?.(iss)) ??\n            unwrapMessage(ctx?.error?.(iss)) ??\n            unwrapMessage(config.customError?.(iss)) ??\n            unwrapMessage(config.localeError?.(iss)) ??\n            \"Invalid input\");\n    // an explicit own-key copy beats object rest with excluded keys, which v8 routes through a generic runtime call; Object.keys rather than for-in so an issue pushed with a prototype does not leak inherited keys, and an own __proto__ key is dropped rather than assigned through the setter\n    const full = {};\n    for (const k of Object.keys(iss)) {\n        if (k === \"inst\" || k === \"schema\" || k === \"continue\" || k === \"input\" || k === \"__proto__\")\n            continue;\n        full[k] = iss[k];\n    }\n    full.path ?? (full.path = []);\n    full.message = message;\n    if (ctx?.reportInput) {\n        full.input = iss.input;\n    }\n    return full;\n}\nexport function getSizableOrigin(input) {\n    if (input instanceof Set)\n        return \"set\";\n    if (input instanceof Map)\n        return \"map\";\n    // @ts-ignore\n    if (input instanceof File)\n        return \"file\";\n    return \"unknown\";\n}\nconst highSurrogate = /[\\uD800-\\uDBFF]/;\n// Code points in `str`: a surrogate pair counts once, a lone surrogate as itself. Hand-rolled because the string iterator allocates and runs ~250x slower on this path; the regex probe exits ~50x quicker for a string with no astral characters.\nexport function codePointLength(str) {\n    const units = str.length;\n    if (!highSurrogate.test(str))\n        return units;\n    let count = units;\n    for (let i = 0; i < units - 1; i++) {\n        if ((str.charCodeAt(i) & 0xfc00) === 0xd800 && (str.charCodeAt(i + 1) & 0xfc00) === 0xdc00) {\n            count--;\n            i++;\n        }\n    }\n    return count;\n}\nexport function getLengthableOrigin(input) {\n    if (Array.isArray(input))\n        return \"array\";\n    if (typeof input === \"string\")\n        return \"string\";\n    return \"unknown\";\n}\nexport function parsedType(data) {\n    const t = typeof data;\n    switch (t) {\n        case \"number\": {\n            return Number.isNaN(data) ? \"nan\" : \"number\";\n        }\n        case \"object\": {\n            if (data === null) {\n                return \"null\";\n            }\n            if (Array.isArray(data)) {\n                return \"array\";\n            }\n            const obj = data;\n            if (obj && Object.getPrototypeOf(obj) !== Object.prototype && \"constructor\" in obj && obj.constructor) {\n                return obj.constructor.name;\n            }\n        }\n    }\n    return t;\n}\nexport function issue(...args) {\n    const [iss, input, inst] = args;\n    if (typeof iss === \"string\") {\n        return {\n            message: iss,\n            code: \"custom\",\n            input,\n            inst,\n        };\n    }\n    return { ...iss };\n}\nexport function cleanEnum(obj) {\n    return Object.entries(obj)\n        .filter(([k, _]) => {\n        // return true if NaN, meaning it's not a number, thus a string key\n        return Number.isNaN(Number.parseInt(k, 10));\n    })\n        .map((el) => el[1]);\n}\n// Codec utility functions\nexport function base64ToUint8Array(base64) {\n    const binaryString = atob(base64);\n    const bytes = new Uint8Array(binaryString.length);\n    for (let i = 0; i < binaryString.length; i++) {\n        bytes[i] = binaryString.charCodeAt(i);\n    }\n    return bytes;\n}\nexport function uint8ArrayToBase64(bytes) {\n    let binaryString = \"\";\n    for (let i = 0; i < bytes.length; i++) {\n        binaryString += String.fromCharCode(bytes[i]);\n    }\n    return btoa(binaryString);\n}\nexport function base64urlToUint8Array(base64url) {\n    const base64 = base64url.replace(/-/g, \"+\").replace(/_/g, \"/\");\n    const padding = \"=\".repeat((4 - (base64.length % 4)) % 4);\n    return base64ToUint8Array(base64 + padding);\n}\nexport function uint8ArrayToBase64url(bytes) {\n    return uint8ArrayToBase64(bytes).replace(/\\+/g, \"-\").replace(/\\//g, \"_\").replace(/=/g, \"\");\n}\nexport function hexToUint8Array(hex) {\n    const cleanHex = hex.replace(/^0x/, \"\");\n    if (cleanHex.length % 2 !== 0) {\n        throw new Error(\"Invalid hex string length\");\n    }\n    const bytes = new Uint8Array(cleanHex.length / 2);\n    for (let i = 0; i < cleanHex.length; i += 2) {\n        bytes[i / 2] = Number.parseInt(cleanHex.slice(i, i + 2), 16);\n    }\n    return bytes;\n}\nexport function uint8ArrayToHex(bytes) {\n    return Array.from(bytes)\n        .map((b) => b.toString(16).padStart(2, \"0\"))\n        .join(\"\");\n}\n// instanceof\nexport class Class {\n    constructor(..._args) { }\n}\n//////////    PROTOTYPE INSTALLERS     //////////\n//\n// Members live on the prototype and materialize per instance on first read, which keeps own-property count under the step where V8 stops using inline slots. Changing anything here means re-measuring runtime, memory and bundle size together — see \"The three axes\" in AGENTS.md.\n/**\n * Installs a trait's members on its prototype. Each value builds that member for the instance on first read; the built value shadows the accessor as an own property, so a detached `const { parse } = schema` keeps working.\n *\n * Call this from a `proto` initializer, which runs once per prototype — never per instance.\n */\nexport function members(proto, table) {\n    for (const key in table) {\n        const desc = Object.getOwnPropertyDescriptor(table, key);\n        // a getter installs as written, so it stays live: `description` reads through to the registry on every access. not enumerable: an object literal's is, and a prototype member never was\n        if (desc.get)\n            Object.defineProperty(proto, key, { ...desc, enumerable: false });\n        // a method materializes bound on first read, which is what keeps a detached member working: `const opt = schema.optional; opt()`\n        else\n            defineBound(proto, key, desc.value);\n    }\n}\n/** Shadows a prototype member with an own value, so a getter that builds from the instance runs once. */\nexport function own(inst, key, value, enumerable = true) {\n    Object.defineProperty(inst, key, { configurable: true, writable: true, enumerable, value });\n    return value;\n}\n/** Like {@link own}, for a member that was never an own data property and has to stay out of `Object.keys`. */\nexport function hide(inst, key, value) {\n    return own(inst, key, value, false);\n}\n/** Adds members a table derives from the instance: each builds on first read and shadows as own data, and assignment shadows the same way, as when these were own properties. */\nexport /*@__NO_SIDE_EFFECTS__*/ function derived(computes, table) {\n    for (const key in computes) {\n        const compute = computes[key];\n        // an object literal's accessor is configurable and enumerable, and `members` copies the descriptor as written\n        Object.defineProperty(table, key, {\n            configurable: true,\n            enumerable: true,\n            get() {\n                return own(this, key, compute(this));\n            },\n            set(value) {\n                own(this, key, value);\n            },\n        });\n    }\n    return table;\n}\nfunction defineBound(proto, key, fn) {\n    Object.defineProperty(proto, key, {\n        configurable: true,\n        get() {\n            // vitest's spyOn calls a prototype getter bare to find the function it wraps, so a nullish receiver answers the raw method\n            return this == null ? fn : own(this, key, fn.bind(this));\n        },\n        set(value) {\n            own(this, key, value);\n        },\n    });\n}\n/** Returns the prototype to install on, or `undefined` if this group is already installed on it. */\nfunction claim(inst, sentinel) {\n    const proto = Object.getPrototypeOf(inst);\n    // Runs on every construction, so `in` rather than the costlier `hasOwnProperty.call`. Sentinels are keys the group itself defines.\n    return sentinel in proto ? undefined : proto;\n}\n// The internals whose init chain is installing. A second call for the same one is a derived constructor overriding its base, so it must not construct another schema in between or the override is dropped.\nlet installing;\n// Set while a getter is running, so a value that resolved through a recursion break is not memoized. One shared descriptor shadows the key for the duration, which costs no per-key allocation.\nlet broke = false;\nconst breaker = {\n    configurable: true,\n    get() {\n        broke = true;\n        return undefined;\n    },\n};\n/**\n * Installs a lazily-derived internal on the `_zod` prototype of `inst`'s\n * constructor, computed from the internals object itself and cached there on\n * first read. One accessor per constructor rather than one per instance.\n */\nexport function defineLazyInternal(inst, key, compute) {\n    const proto = Object.getPrototypeOf(inst._zod);\n    if (key in proto && installing !== inst._zod) {\n        // A repeat construction: everything is installed already. Cleared here so the reference is not held past the first construction of every type.\n        installing = undefined;\n        return;\n    }\n    installing = inst._zod;\n    Object.defineProperty(proto, key, {\n        configurable: true,\n        get() {\n            // Shadowed before computing so a re-entrant read from a recursive schema resolves to undefined instead of running the getter again.\n            Object.defineProperty(this, key, breaker);\n            const outer = broke;\n            broke = false;\n            try {\n                const value = compute(this);\n                // A result that resolved through a recursion break is recomputed once the graph is complete; everything else memoizes, undefined included.\n                if (broke)\n                    delete this[key];\n                else\n                    Object.defineProperty(this, key, { configurable: true, writable: true, value });\n                broke = broke || outer;\n                return value;\n            }\n            catch (err) {\n                // A compute that threw memoizes nothing, so a later read runs it again and fails the same way. The shadow goes with it, since leaving it installed would answer undefined for every later read.\n                delete this[key];\n                broke = broke || outer;\n                throw err;\n            }\n        },\n        set(value) {\n            Object.defineProperty(this, key, { configurable: true, writable: true, value });\n        },\n    });\n}\n/**\n * Installs `key` on `inst`'s prototype, computed by `make` on first read and cached there as an own\n * data property. One accessor per constructor rather than one per instance, because an own accessor\n * puts every instance after the first into v8 dictionary mode. The key doubles as the sentinel.\n */\nexport function installLazyProp(inst, key, make, enumerable) {\n    const proto = claim(inst, key);\n    if (!proto)\n        return;\n    Object.defineProperty(proto, key, {\n        configurable: true,\n        get() {\n            // Shadowed before computing, so a re-entrant read from a self-referential shape resolves to undefined instead of running the getter again. A data property rather than an accessor: an own accessor is the dictionary-mode transition this exists to avoid.\n            const desc = { configurable: true, writable: true, enumerable, value: undefined };\n            Object.defineProperty(this, key, desc);\n            // a compute that throws leaves the shadow behind, so later reads answer undefined instead of re-throwing; `defineLazy` did the same, and `defineLazyInternal`'s delete-on-catch would cost bytes in every bundle for a case only a throwing user getter reaches\n            desc.value = make(this);\n            Object.defineProperty(this, key, desc);\n            return desc.value;\n        },\n        set(value) {\n            Object.defineProperty(this, key, { configurable: true, writable: true, enumerable, value });\n        },\n    });\n}\n/** Marks the thunk `_catch` synthesises for a constant catch value. `Function.length` cannot tell that thunk from a user callback — rest and defaulted parameters both report arity 0 — and a user callback reads `ctx.error`, whose issues only finalize correctly against the caller's per-parse error map. Provenance can say what arity cannot. A plain string key rather than `Symbol.for`, whose call at module scope no bundler can prove pure — the same shape that anchored `urlCanParse` into every build. */\nexport const CONSTANT_CATCH = \"~constantCatch\";\n/** Wraps a constant catch value in a thunk tagged with {@link CONSTANT_CATCH}. */\nexport function constantCatch(value) {\n    const fn = () => value;\n    fn[CONSTANT_CATCH] = true;\n    return fn;\n}\n","var _a;\nimport { members as installMembers } from \"./util.js\";\n/** A special constant with type `never` */\nexport const NEVER = /*@__PURE__*/ Object.freeze({\n    status: \"aborted\",\n});\n/* Shared descriptor for installing `_zod`; defineProperty reads it\n * synchronously, so reusing one object avoids a per-instance allocation. */\nconst _zodDesc = { value: undefined, enumerable: false };\n// null where suppressing the capture would be unrecoverable: `parse()` puts the frames back with `captureStackTrace`, so without it the throw would lose its stack. also latched to null once `stackTraceLimit` proves unassignable, which a realm can do at any point by hardening Error\nlet _E = \"captureStackTrace\" in Error ? Error : null;\n// v8 captures a stack trace inside the Error constructor, which dominates a failed parse; costs only the frames, and parse() restores those. the constructor must RUN: Object.create is cheaper and passes instanceof, but Error.isError and util.types.isNativeError check an internal slot\nfunction newError(Definition) {\n    const E = _E;\n    if (E) {\n        const saved = E.stackTraceLimit;\n        if (typeof saved === \"number\") {\n            try {\n                E.stackTraceLimit = 0;\n            }\n            catch {\n                _E = null;\n                return new Definition();\n            }\n            try {\n                return new Definition();\n            }\n            finally {\n                E.stackTraceLimit = saved;\n            }\n        }\n    }\n    return new Definition();\n}\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, \n/** This trait's members, installed once on every prototype that composes it. They cannot be declared in the initializer above: that runs per instance, and the prototype is shared. */\nproto, params) {\n    // Prototype for this constructor's `_zod` internals. Lazily-derived fields (`values`, `pattern`, `optin`, …) install here once rather than as an accessor on every instance.\n    const zodProto = {};\n    // Assigning the fields in the constructor body is what gives instances in-object slots; building the object literally and reparenting it costs a second allocation and a generic property copy.\n    function Internals(def) {\n        this.def = def;\n        this.constr = _;\n        this.traits = new Set();\n    }\n    Internals.prototype = zodProto;\n    const protoMembers = proto;\n    // One trait's members land on every prototype whose chain composes it, so the answer is per prototype rather than per trait.\n    const initialized = protoMembers && new WeakSet();\n    function init(inst, def) {\n        if (!inst._zod) {\n            _zodDesc.value = new Internals(def);\n            try {\n                Object.defineProperty(inst, \"_zod\", _zodDesc);\n            }\n            finally {\n                // Cleared even on throw, so the shared descriptor never leaks one instance's internals into the next.\n                _zodDesc.value = undefined;\n            }\n        }\n        else if (inst._zod.traits.has(name)) {\n            return;\n        }\n        inst._zod.traits.add(name);\n        initializer(inst, def);\n        if (initialized) {\n            // `super(def)` from a user subclass gives `this` a prototype the subclass owns, and installing there would overwrite whatever the subclass declared. `constr` built the instance, so its prototype is the one below the subclass's that should carry the members. A receiver whose chain never reaches that prototype installs on its own, which for a plain object handed straight to `init` means `Object.prototype` — unchanged from before.\n            const own = Object.getPrototypeOf(inst);\n            const ctorProto = inst._zod.constr.prototype;\n            let up = own;\n            while (up && up !== ctorProto)\n                up = Object.getPrototypeOf(up);\n            const target = up ?? own;\n            if (!initialized.has(target)) {\n                initialized.add(target);\n                installMembers(target, protoMembers);\n            }\n        }\n        // support prototype modifications; for-in avoids the array allocation of Object.keys on the (usually empty) prototype\n        const proto = _.prototype;\n        for (const k in proto) {\n            if (!Object.prototype.hasOwnProperty.call(proto, k))\n                continue;\n            if (!(k in inst)) {\n                inst[k] = proto[k].bind(inst);\n            }\n        }\n    }\n    // doesn't work if Parent has a constructor with arguments\n    const Parent = params?.Parent ?? Object;\n    class Definition extends Parent {\n    }\n    Object.defineProperty(Definition, \"name\", { value: name });\n    function _(def) {\n        const inst = params?.Parent ? newError(Definition) : this;\n        init(inst, def);\n        const deferred = inst._zod.deferred;\n        if (deferred) {\n            for (const fn of deferred) {\n                fn();\n            }\n            // Released: initializers run once, and the list would otherwise be retained for the schema's lifetime.\n            inst._zod.deferred = undefined;\n        }\n        // Global post-processor hook. Internal: installed by `import \"zod/compile\"` to enable AOT compilation for every constructed schema. Runs last, once the instance is fully built, because it hands the instance to compile(). The post-processor is expected to be reentrancy-guarded by its own implementation.\n        const pp = globalThis.__zod_globalConfig?.postProcessor;\n        if (pp)\n            pp(inst);\n        return inst;\n    }\n    Object.defineProperty(_, \"init\", { value: init });\n    Object.defineProperty(_, Symbol.hasInstance, {\n        value: (inst) => {\n            if (params?.Parent && inst instanceof params.Parent)\n                return true;\n            return inst?._zod?.traits?.has(name);\n        },\n    });\n    Object.defineProperty(_, \"name\", { value: name });\n    return _;\n}\n//////////////////////////////   UTILITIES   ///////////////////////////////////////\nexport const $brand = /*@__PURE__*/ Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n    constructor() {\n        super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n    }\n}\nexport class $ZodEncodeError extends Error {\n    constructor(name) {\n        super(`Encountered unidirectional transform during encode: ${name}`);\n        this.name = \"ZodEncodeError\";\n    }\n}\n(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});\nexport const globalConfig = globalThis.__zod_globalConfig;\nexport function config(newConfig) {\n    if (newConfig)\n        Object.assign(globalConfig, newConfig);\n    return globalConfig;\n}\n","import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\n/* Computing the message eagerly is expensive (pretty-printed JSON of all\n * issues), so defer it until first read. The accessor functions and\n * descriptors are shared across instances to keep error construction\n * cheap; the computed message is cached on the internals object. The\n * setter preserves plain assignment semantics for consumers that\n * overwrite `message`. */\nfunction _getMessage() {\n    const internals = this._zod;\n    internals.message ?? (internals.message = JSON.stringify(internals.def, util.jsonStringifyReplacer, 2));\n    return internals.message;\n}\nfunction _setMessage(value) {\n    this._zod.message = value;\n}\nconst _messageDesc = {\n    get: _getMessage,\n    set: _setMessage,\n    enumerable: true,\n    configurable: true,\n};\nconst _issuesDesc = { value: undefined, enumerable: false };\n/* Prototypes that already carry the lazy `toString`. Seeded with the\n * intrinsics so that `init` on a foreign object — it accepts any object —\n * can never install an accessor onto a prototype we do not own. */\nconst _installedToString = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);\nconst initializer = (inst, def) => {\n    inst.name = \"$ZodError\";\n    // `_zod` is already non-enumerable: $constructor's init defined it with this same descriptor\n    _issuesDesc.value = def;\n    Object.defineProperty(inst, \"issues\", _issuesDesc);\n    // Clear the shared slot; a retained `value` pins the last error's issues.\n    _issuesDesc.value = undefined;\n    Object.defineProperty(inst, \"message\", _messageDesc);\n    /* `toString` lives as a non-enumerable lazy getter on the shared\n     * prototype; on first access it caches a per-instance closure so\n     * detached usage still works. */\n    const proto = Object.getPrototypeOf(inst);\n    if (!_installedToString.has(proto)) {\n        _installedToString.add(proto);\n        Object.defineProperty(proto, \"toString\", {\n            configurable: true,\n            enumerable: false,\n            get() {\n                const value = () => this.message;\n                Object.defineProperty(this, \"toString\", { value, configurable: true, writable: true });\n                return value;\n            },\n            set(value) {\n                Object.defineProperty(this, \"toString\", { value, configurable: true, writable: true });\n            },\n        });\n    }\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, undefined, {\n    Parent: Error,\n});\n/** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member\n * (\"toString\", \"constructor\") would otherwise read through to the prototype, and assigning\n * \"__proto__\" would hit the setter instead of creating a key. */\nfunction node(obj, key, make) {\n    if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n        if (key === \"__proto__\") {\n            Object.defineProperty(obj, key, { value: make(), writable: true, enumerable: true, configurable: true });\n        }\n        else {\n            obj[key] = make();\n        }\n    }\n    return obj[key];\n}\nexport function flattenError(error, mapper = (issue) => issue.message) {\n    const fieldErrors = {};\n    const formErrors = [];\n    for (const sub of error.issues) {\n        if (sub.path.length > 0) {\n            node(fieldErrors, sub.path[0], () => []).push(mapper(sub));\n        }\n        else {\n            formErrors.push(mapper(sub));\n        }\n    }\n    return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n    const fieldErrors = { _errors: [] };\n    const processError = (error, path = []) => {\n        for (const issue of error.issues) {\n            if (issue.code === \"invalid_union\" && issue.errors.length) {\n                issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n            }\n            else if (issue.code === \"invalid_key\") {\n                processError({ issues: issue.issues }, [...path, ...issue.path]);\n            }\n            else if (issue.code === \"invalid_element\") {\n                processError({ issues: issue.issues }, [...path, ...issue.path]);\n            }\n            else {\n                const fullpath = [...path, ...issue.path];\n                if (fullpath.length === 0) {\n                    fieldErrors._errors.push(mapper(issue));\n                }\n                else {\n                    let curr = fieldErrors;\n                    let i = 0;\n                    while (i < fullpath.length) {\n                        const el = fullpath[i];\n                        const terminal = i === fullpath.length - 1;\n                        // `_errors` is reserved by this legacy format, so merge a matching path segment into the current node instead of treating its array as a child.\n                        if (el === \"_errors\") {\n                            if (terminal)\n                                curr._errors.push(mapper(issue));\n                            i++;\n                            continue;\n                        }\n                        // A path element may collide with an inherited property name such as\n                        // \"__proto__\" or \"constructor\". Truthiness checks read the prototype\n                        // (so no node is created, then ._errors.push throws), and bracket\n                        // assignment of \"__proto__\" hits the setter instead of creating an\n                        // own key. Guard the read with hasOwnProperty and create the node\n                        // with defineProperty so any path element becomes a real own key.\n                        if (!Object.prototype.hasOwnProperty.call(curr, el)) {\n                            Object.defineProperty(curr, el, {\n                                value: { _errors: [] },\n                                enumerable: true,\n                                writable: true,\n                                configurable: true,\n                            });\n                        }\n                        const node = curr[el];\n                        if (terminal) {\n                            node._errors.push(mapper(issue));\n                        }\n                        curr = node;\n                        i++;\n                    }\n                }\n            }\n        }\n    };\n    processError(error);\n    return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n    const result = { errors: [] };\n    const processError = (error, path = []) => {\n        var _a;\n        for (const issue of error.issues) {\n            if (issue.code === \"invalid_union\" && issue.errors.length) {\n                // regular union error\n                issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n            }\n            else if (issue.code === \"invalid_key\") {\n                processError({ issues: issue.issues }, [...path, ...issue.path]);\n            }\n            else if (issue.code === \"invalid_element\") {\n                processError({ issues: issue.issues }, [...path, ...issue.path]);\n            }\n            else {\n                const fullpath = [...path, ...issue.path];\n                if (fullpath.length === 0) {\n                    result.errors.push(mapper(issue));\n                    continue;\n                }\n                let curr = result;\n                let i = 0;\n                while (i < fullpath.length) {\n                    const el = fullpath[i];\n                    const terminal = i === fullpath.length - 1;\n                    if (typeof el === \"string\") {\n                        curr.properties ?? (curr.properties = {});\n                        // el may collide with an inherited property name (\"__proto__\",\n                        // \"constructor\", ...); ??= reads the prototype so the node is never\n                        // created and curr.errors.push throws. Guard with hasOwnProperty and\n                        // create the node with defineProperty so \"__proto__\" becomes a real\n                        // own key rather than invoking the prototype setter.\n                        if (!Object.prototype.hasOwnProperty.call(curr.properties, el)) {\n                            Object.defineProperty(curr.properties, el, {\n                                value: { errors: [] },\n                                enumerable: true,\n                                writable: true,\n                                configurable: true,\n                            });\n                        }\n                        curr = curr.properties[el];\n                    }\n                    else {\n                        curr.items ?? (curr.items = []);\n                        (_a = curr.items)[el] ?? (_a[el] = { errors: [] });\n                        curr = curr.items[el];\n                    }\n                    if (terminal) {\n                        curr.errors.push(mapper(issue));\n                    }\n                    i++;\n                }\n            }\n        }\n    };\n    processError(error);\n    return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n *   issues: [\n *     {\n *       expected: 'string',\n *       code: 'invalid_type',\n *       path: [ 'username' ],\n *       message: 'Invalid input: expected string'\n *     },\n *     {\n *       expected: 'number',\n *       code: 'invalid_type',\n *       path: [ 'favoriteNumbers', 1 ],\n *       message: 'Invalid input: expected number'\n *     }\n *   ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n *   ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n *   ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n    const segs = [];\n    const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n    for (const seg of path) {\n        if (typeof seg === \"number\")\n            segs.push(`[${seg}]`);\n        else if (typeof seg === \"symbol\")\n            segs.push(`[${JSON.stringify(String(seg))}]`);\n        else if (/[^\\w$]/.test(seg))\n            segs.push(`[${JSON.stringify(seg)}]`);\n        else {\n            if (segs.length)\n                segs.push(\".\");\n            segs.push(seg);\n        }\n    }\n    return segs.join(\"\");\n}\nexport function prettifyError(error) {\n    const lines = [];\n    // sort by path length\n    const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n    // Process each issue\n    for (const issue of issues) {\n        lines.push(`✖ ${issue.message}`);\n        if (issue.path?.length)\n            lines.push(`  → at ${toDotPath(issue.path)}`);\n    }\n    // Convert Map to formatted string\n    return lines.join(\"\\n\");\n}\n","import * as core from \"./core.js\";\nimport * as errors from \"./errors.js\";\nimport * as util from \"./util.js\";\n// Always both keys, so the `_params` read site in `_parse` sees one object shape rather than two.\nfunction finalizeParams(callee, params) {\n    return { callee: params?.callee ?? callee, Err: params?.Err };\n}\nexport const _parse = (_Err) => {\n    const fn = (schema, value, _ctx, _params) => {\n        const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n        const result = schema._zod.run({ value, issues: [] }, ctx);\n        if (result instanceof Promise) {\n            throw new core.$ZodAsyncError();\n        }\n        if (result.issues.length) {\n            const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n            util.captureStackTrace(e, _params?.callee ?? fn);\n            throw e;\n        }\n        return result.value;\n    };\n    return fn;\n};\nexport const parse = /* @__PURE__*/ _parse(errors.$ZodRealError);\nexport const _parseAsync = (_Err) => {\n    const fn = async (schema, value, _ctx, params) => {\n        const ctx = _ctx ? { ..._ctx, async: true } : { async: true };\n        let result = schema._zod.run({ value, issues: [] }, ctx);\n        if (result instanceof Promise)\n            result = await result;\n        if (result.issues.length) {\n            const e = new (params?.Err ?? _Err)(result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n            util.captureStackTrace(e, params?.callee ?? fn);\n            throw e;\n        }\n        return result.value;\n    };\n    return fn;\n};\nexport const parseAsync = /* @__PURE__*/ _parseAsync(errors.$ZodRealError);\nexport const _safeParse = (_Err) => (schema, value, _ctx) => {\n    const ctx = _ctx ? { ..._ctx, async: false } : { async: false };\n    const result = schema._zod.run({ value, issues: [] }, ctx);\n    if (result instanceof Promise) {\n        throw new core.$ZodAsyncError();\n    }\n    return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };\n};\nexport const safeParse = /* @__PURE__*/ _safeParse(errors.$ZodRealError);\n// the error is built on the first read of `error`: finalizing the issues and constructing the instance is most of a failing parse, and a caller that only branches on `success` never pays it. a getter in the literal keeps this small; the alternative, one shared accessor descriptor plus a hidden state slot, reads ~15% faster but costs ~75 B gzipped in every bundle\nfunction failure(Err, issues, ctx) {\n    let error;\n    return {\n        success: false,\n        get error() {\n            if (!error) {\n                error = new Err(issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())));\n                // finalizeIssue drops `input`, so the built error holds nothing; keeping the raw issues past this point pins the parsed value for the life of the result\n                issues = undefined;\n                ctx = undefined;\n            }\n            return error;\n        },\n        set error(e) {\n            error = e;\n            // a replacement makes the getter's branch unreachable, so the captures have to go here too\n            issues = undefined;\n            ctx = undefined;\n        },\n    };\n}\nexport const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {\n    const ctx = _ctx ? { ..._ctx, async: true } : { async: true };\n    let result = schema._zod.run({ value, issues: [] }, ctx);\n    if (result instanceof Promise)\n        result = await result;\n    return result.issues.length ? failure(_Err, result.issues, ctx) : { success: true, data: result.value };\n};\nexport const safeParseAsync = /* @__PURE__*/ _safeParseAsync(errors.$ZodRealError);\n// registry mirrors of the compiler's sentinels, so this module never imports the compiler\nconst COMPILE_INVALID = /* @__PURE__ */ Symbol.for(\"zod.compile.invalid\");\nconst COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for(\"zod.compile.fallback\");\n// Deliberately tiny, because v8 will not inline a body carrying the fallback's object literals and throw. Everything that is not the compiled happy path lives in validateFallback, and that split is worth ~35% on a compiled schema.\nexport const validate = ((schema, value, _ctx) => {\n    const validator = schema._zod.bag.validator;\n    if (validator !== undefined) {\n        if (validator(value) !== COMPILE_INVALID)\n            return true;\n        // a definite sentinel means the runtime would reject, so skip the re-parse; a ctx can still change the answer\n        if (validator.definite === true && _ctx === undefined)\n            return false;\n    }\n    return validateFallback(schema, value, _ctx);\n});\nfunction validateFallback(schema, value, _ctx) {\n    const ctx = _ctx\n        ? { ..._ctx, async: false, abortEarly: true }\n        : { async: false, abortEarly: true };\n    const fallbackRun = schema._zod.bag.fallbackRun;\n    let result;\n    if (fallbackRun) {\n        // skip nested fast paths on the fallback, so user callbacks keep the at-most-twice bound\n        ctx[COMPILE_FALLBACK] = true;\n        result = fallbackRun({ value, issues: [] }, ctx);\n    }\n    else {\n        result = schema._zod.run({ value, issues: [] }, ctx);\n    }\n    if (result instanceof Promise) {\n        throw new core.$ZodAsyncError();\n    }\n    return result.issues.length === 0;\n}\n// no fast path: the compiler keeps async parses on the runtime, because a promise-returning callback that is not declared async compiles to a throw\nexport const validateAsync = async (schema, value, _ctx) => {\n    const ctx = _ctx\n        ? { ..._ctx, async: true, abortEarly: true }\n        : { async: true, abortEarly: true };\n    let result = schema._zod.run({ value, issues: [] }, ctx);\n    if (result instanceof Promise)\n        result = await result;\n    return result.issues.length === 0;\n};\nexport const _encode = (_Err) => {\n    const parse = _parse(_Err);\n    const fn = (schema, value, _ctx, _params) => {\n        const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n        return parse(schema, value, ctx, finalizeParams(fn, _params));\n    };\n    return fn;\n};\nexport const encode = /* @__PURE__*/ _encode(errors.$ZodRealError);\nexport const _decode = (_Err) => {\n    const parse = _parse(_Err);\n    const fn = (schema, value, _ctx, _params) => {\n        return parse(schema, value, _ctx, finalizeParams(fn, _params));\n    };\n    return fn;\n};\nexport const decode = /* @__PURE__*/ _decode(errors.$ZodRealError);\nexport const _encodeAsync = (_Err) => {\n    const parseAsync = _parseAsync(_Err);\n    const fn = async (schema, value, _ctx, _params) => {\n        const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n        return (await parseAsync(schema, value, ctx, finalizeParams(fn, _params)));\n    };\n    return fn;\n};\nexport const encodeAsync = /* @__PURE__*/ _encodeAsync(errors.$ZodRealError);\nexport const _decodeAsync = (_Err) => {\n    const parseAsync = _parseAsync(_Err);\n    const fn = async (schema, value, _ctx, _params) => {\n        return await parseAsync(schema, value, _ctx, finalizeParams(fn, _params));\n    };\n    return fn;\n};\nexport const decodeAsync = /* @__PURE__*/ _decodeAsync(errors.$ZodRealError);\nexport const _safeEncode = (_Err) => (schema, value, _ctx) => {\n    const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n    return _safeParse(_Err)(schema, value, ctx);\n};\nexport const safeEncode = /* @__PURE__*/ _safeEncode(errors.$ZodRealError);\nexport const _safeDecode = (_Err) => (schema, value, _ctx) => {\n    return _safeParse(_Err)(schema, value, _ctx);\n};\nexport const safeDecode = /* @__PURE__*/ _safeDecode(errors.$ZodRealError);\nexport const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {\n    const ctx = _ctx ? { ..._ctx, direction: \"backward\" } : { direction: \"backward\" };\n    return _safeParseAsync(_Err)(schema, value, ctx);\n};\nexport const safeEncodeAsync = /* @__PURE__*/ _safeEncodeAsync(errors.$ZodRealError);\nexport const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {\n    return _safeParseAsync(_Err)(schema, value, _ctx);\n};\nexport const safeDecodeAsync = /* @__PURE__*/ _safeDecodeAsync(errors.$ZodRealError);\n","import * as util from \"./util.js\";\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link cuid2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const cuid = /^[cC][0-9a-z]{6,}$/;\nexport const cuid2 = /^[0-9a-z]+$/;\nexport const ulid = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/;\nexport const xid = /^[0-9a-vA-V]{20}$/;\nexport const ksuid = /^[A-Za-z0-9]{27}$/;\nexport const nanoid = /^[a-zA-Z0-9_-]{21}$/;\nexport function nanoidOfLength(length) {\n    return new RegExp(`^[a-zA-Z0-9_-]{${length}}$`);\n}\n/** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */\nexport const duration = /^P(?:(\\d+W)|(?!.*W)(?=\\d|T\\d)(\\d+Y)?(\\d+M)?(\\d+D)?(T(?=\\d)(\\d+H)?(\\d+M)?(\\d+([.,]\\d+)?S)?)?)$/;\n/** Implements ISO 8601-2 extensions like explicit +- prefixes, mixing weeks with other units, and fractional/negative components. */\nexport const extendedDuration = /^[-+]?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)?)??$/;\n/** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */\nexport const guid = /^([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})$/;\n/** Returns a regex for validating an RFC 9562/4122 UUID.\n *\n * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */\nexport const uuid = (version) => {\n    if (!version)\n        return /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;\n    return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);\n};\nexport const uuid4 = /*@__PURE__*/ uuid(4);\nexport const uuid6 = /*@__PURE__*/ uuid(6);\nexport const uuid7 = /*@__PURE__*/ uuid(7);\n/** Practical email validation */\nexport const email = /^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$/;\n/** Equivalent to the HTML5 input[type=email] validation implemented by browsers. Source: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/email */\nexport const html5Email = /^[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])?)*$/;\n/** The classic emailregex.com regex for RFC 5322-compliant emails */\nexport const rfc5322Email = /^(([^<>()\\[\\]\\\\.,;:\\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,}))$/;\n/** A loose regex that allows Unicode characters, enforces length limits, and that's about it. */\nexport const unicodeEmail = /^[^\\s@\"]{1,64}@[^\\s@]{1,255}$/u;\nexport const idnEmail = unicodeEmail;\nexport const browserEmail = /^[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])?)*$/;\n// from https://thekevinscott.com/emojis-in-javascript/#writing-a-regular-expression\n// Single character class, not an alternation: the two properties overlap (U+1F9B0-U+1F9B3), so `(A|B)+` backtracks exponentially on a failed match. The leading lookahead then demands one anchor — a pictograph, a regional indicator, or the enclosing keycap — because `\\p{Emoji_Component}` on its own covers ASCII digits, `#`, `*`, ZWJ, variation selectors and skin tone modifiers, none of which is an emoji without a base.\nconst _emoji = `^(?=[\\\\s\\\\S]*[\\\\p{Extended_Pictographic}\\\\p{Regional_Indicator}\\\\u20E3])[\\\\p{Extended_Pictographic}\\\\p{Emoji_Component}]+$`;\nexport function emoji() {\n    return new RegExp(_emoji, \"u\");\n}\nexport const 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])$/;\nexport const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;\nexport const mac = (delimiter) => {\n    const escapedDelim = util.escapeRegex(delimiter ?? \":\");\n    return new RegExp(`^(?:[0-9A-F]{2}${escapedDelim}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${escapedDelim}){5}[0-9a-f]{2}$`);\n};\nexport const cidrv4 = /^((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])$/;\nexport const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;\n// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript\nexport const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;\nexport const base64url = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/;\n// based on https://stackoverflow.com/questions/106179/regular-expression-to-match-dns-hostname-or-ip-address\n// export const hostname: RegExp = /^([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+$/;\nexport const hostname = /^(?=.{1,253}\\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\\.?$/;\nexport const domain = /^(?=.{1,253}$)([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\\.)+[a-zA-Z]{2,63}$/;\nexport const httpProtocol = /^https?$/;\n// https://blog.stevenlevithan.com/archives/validate-phone-number#r4-3 (regex sans spaces) E.164: leading digit must be 1-9; total digits (excluding '+') between 7-15\nexport const e164 = /^\\+[1-9]\\d{6,14}$/;\n// Credit card shape: 12–19 digits, optionally separated by single spaces or single hyphens. ISO/IEC 7812 caps the PAN at 19 digits; 12 is the shortest issued length (Maestro).\nexport const creditCard = /^\\d(?:[ -]?\\d){11,18}$/;\n// ISO 4217 alpha codes from the SIX list, regenerated by scripts/update-iso-4217.ts\nexport const currencyCode = /^(?:AED|AFN|ALL|AMD|AOA|ARS|AUD|AWG|AZN|BAM|BBD|BDT|BHD|BIF|BMD|BND|BOB|BOV|BRL|BSD|BTN|BWP|BYN|BZD|CAD|CDF|CHE|CHF|CHW|CLF|CLP|CNY|COP|COU|CRC|CUP|CVE|CZK|DJF|DKK|DOP|DZD|EGP|ERN|ETB|EUR|FJD|FKP|GBP|GEL|GHS|GIP|GMD|GNF|GTQ|GYD|HKD|HNL|HTG|HUF|IDR|ILS|INR|IQD|IRR|ISK|JMD|JOD|JPY|KES|KGS|KHR|KMF|KPW|KRW|KWD|KYD|KZT|LAK|LBP|LKR|LRD|LSL|LYD|MAD|MDL|MGA|MKD|MMK|MNT|MOP|MRU|MUR|MVR|MWK|MXN|MXV|MYR|MZN|NAD|NGN|NIO|NOK|NPR|NZD|OMR|PAB|PEN|PGK|PHP|PKR|PLN|PYG|QAR|RON|RSD|RUB|RWF|SAR|SBD|SCR|SDG|SEK|SGD|SHP|SLE|SOS|SRD|SSP|STN|SVC|SYP|SZL|THB|TJS|TMT|TND|TOP|TRY|TTD|TWD|TZS|UAH|UGX|USD|USN|UYI|UYU|UYW|UZS|VED|VES|VND|VUV|WST|XAD|XAF|XAG|XAU|XBA|XBB|XBC|XBD|XCD|XCG|XDR|XOF|XPD|XPF|XPT|XSU|XTS|XUA|XXX|YER|ZAR|ZMW|ZWG)$/;\n// iban electronic format: 2-letter country, check digits 02-98 (the only values `98 - remainder` can produce), 11-30 bban characters\nexport const iban = /^[A-Z]{2}(?!00|01|99)\\d{2}[A-Z0-9]{11,30}$/;\nconst dateSource = `(?:(?:\\\\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])))`;\n/** Anchors a pattern source. The interpolation lives here rather than at the call site because\n * esbuild will not drop a `@__PURE__` call whose own argument interpolates a variable, but it\n * will drop `anchor(dateSource)`. Keeping it inline pinned `date` into every bundle. */\nfunction anchor(source) {\n    return new RegExp(`^${source}$`);\n}\nexport const date = /*@__PURE__*/ anchor(dateSource);\nfunction timeSource(args) {\n    const hhmm = `(?:[01]\\\\d|2[0-3]):[0-5]\\\\d`;\n    const regex = typeof args.precision === \"number\"\n        ? args.precision === -1\n            ? `${hhmm}`\n            : args.precision === 0\n                ? `${hhmm}:[0-5]\\\\d`\n                : `${hhmm}:[0-5]\\\\d\\\\.\\\\d{${args.precision}}`\n        : args.seconds\n            ? `${hhmm}:[0-5]\\\\d(?:\\\\.\\\\d+)?`\n            : `${hhmm}(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?`;\n    return regex;\n}\nexport function time(args) {\n    return new RegExp(`^${timeSource(args)}$`);\n}\n// Adapted from https://stackoverflow.com/a/3143231\nexport function datetime(args) {\n    const opts = [\"Z\"];\n    // if (args.offset) opts.push(`([+-]\\\\d{2}:\\\\d{2})`);\n    if (args.offset)\n        opts.push(`([+-](?:[01]\\\\d|2[0-3]):[0-5]\\\\d)`);\n    // RFC 3339 mandates seconds wherever the time carries a `Z` or an offset, so only the unqualified form `local` adds may omit them\n    const qualified = `${timeSource({ precision: args.precision, seconds: true })}(?:${opts.join(\"|\")})`;\n    const timeRegex = args.local ? `${qualified}|${timeSource({ precision: args.precision })}` : qualified;\n    return new RegExp(`^${dateSource}T(?:${timeRegex})$`);\n}\n// the unbounded form of `string()` as a literal, so every plain string shares one instance instead of building its own\nexport const anyString = /^[\\s\\S]{0,}$/;\nexport const string = (params) => {\n    const regex = params ? `[\\\\s\\\\S]{${params?.minimum ?? 0},${params?.maximum ?? \"\"}}` : `[\\\\s\\\\S]*`;\n    return new RegExp(`^${regex}$`);\n};\nexport const bigint = /^-?\\d+n?$/;\nexport const integer = /^-?\\d+$/;\nexport const number = /^-?\\d+(?:\\.\\d+)?$/;\nexport const boolean = /^(?:true|false)$/i;\nconst _null = /^null$/i;\nexport { _null as null };\nconst _undefined = /^undefined$/i;\nexport { _undefined as undefined };\n// regex for string with no uppercase letters\nexport const lowercase = /^[^A-Z]*$/;\n// regex for string with no lowercase letters\nexport const uppercase = /^[^a-z]*$/;\n// regex for hexadecimal strings (any length)\nexport const hex = /^[0-9a-fA-F]*$/;\n// Hash regexes for different algorithms and encodings\n// Helper function to create base64 regex with exact length and padding\nfunction fixedBase64(bodyLength, padding) {\n    return new RegExp(`^[A-Za-z0-9+/]{${bodyLength}}${padding}$`);\n}\n// Helper function to create base64url regex with exact length (no padding)\nfunction fixedBase64url(length) {\n    return new RegExp(`^[A-Za-z0-9_-]{${length}}$`);\n}\n// MD5 (16 bytes): base64 = 24 chars total (22 + \"==\")\nexport const md5_hex = /^[0-9a-fA-F]{32}$/;\nexport const md5_base64 = /*@__PURE__*/ fixedBase64(22, \"==\");\nexport const md5_base64url = /*@__PURE__*/ fixedBase64url(22);\n// SHA1 (20 bytes): base64 = 28 chars total (27 + \"=\")\nexport const sha1_hex = /^[0-9a-fA-F]{40}$/;\nexport const sha1_base64 = /*@__PURE__*/ fixedBase64(27, \"=\");\nexport const sha1_base64url = /*@__PURE__*/ fixedBase64url(27);\n// SHA256 (32 bytes): base64 = 44 chars total (43 + \"=\")\nexport const sha256_hex = /^[0-9a-fA-F]{64}$/;\nexport const sha256_base64 = /*@__PURE__*/ fixedBase64(43, \"=\");\nexport const sha256_base64url = /*@__PURE__*/ fixedBase64url(43);\n// SHA384 (48 bytes): base64 = 64 chars total (no padding)\nexport const sha384_hex = /^[0-9a-fA-F]{96}$/;\nexport const sha384_base64 = /*@__PURE__*/ fixedBase64(64, \"\");\nexport const sha384_base64url = /*@__PURE__*/ fixedBase64url(64);\n// SHA512 (64 bytes): base64 = 88 chars total (86 + \"==\")\nexport const sha512_hex = /^[0-9a-fA-F]{128}$/;\nexport const sha512_base64 = /*@__PURE__*/ fixedBase64(86, \"==\");\nexport const sha512_base64url = /*@__PURE__*/ fixedBase64url(86);\n","// import { $ZodType } from \"./schemas.js\";\nimport * as core from \"./core.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nexport const $ZodCheck = /*@__PURE__*/ core.$constructor(\"$ZodCheck\", (inst, def) => {\n    var _a;\n    inst._zod ?? (inst._zod = {});\n    inst._zod.def = def;\n    (_a = inst._zod).onattach ?? (_a.onattach = []);\n});\n/** Default `when` for size-based checks: run only on non-nullish values with a `size`. */\nconst _whenHasSize = (payload) => {\n    const val = payload.value;\n    return !util.nullish(val) && val.size !== undefined;\n};\n/** Default `when` for length-based checks: run only on non-nullish values with a `length`. */\nconst _whenHasLength = (payload) => {\n    const val = payload.value;\n    return !util.nullish(val) && val.length !== undefined;\n};\nconst numericOriginMap = {\n    number: \"number\",\n    bigint: \"bigint\",\n    object: \"date\",\n};\nexport const $ZodCheckLessThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckLessThan\", (inst, def) => {\n    $ZodCheck.init(inst, def);\n    const origin = numericOriginMap[typeof def.value];\n    inst._zod.check = (payload) => {\n        if (def.inclusive ? payload.value <= def.value : payload.value < def.value) {\n            return;\n        }\n        payload.issues.push({\n            origin: numericOriginMap[typeof payload.value] ?? origin,\n            code: \"too_big\",\n            maximum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n            input: payload.value,\n            inclusive: def.inclusive,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckGreaterThan = /*@__PURE__*/ core.$constructor(\"$ZodCheckGreaterThan\", (inst, def) => {\n    $ZodCheck.init(inst, def);\n    const origin = numericOriginMap[typeof def.value];\n    inst._zod.check = (payload) => {\n        if (def.inclusive ? payload.value >= def.value : payload.value > def.value) {\n            return;\n        }\n        payload.issues.push({\n            origin: numericOriginMap[typeof payload.value] ?? origin,\n            code: \"too_small\",\n            minimum: typeof def.value === \"object\" ? def.value.getTime() : def.value,\n            input: payload.value,\n            inclusive: def.inclusive,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckMultipleOf = \n/*@__PURE__*/ core.$constructor(\"$ZodCheckMultipleOf\", (inst, def) => {\n    $ZodCheck.init(inst, def);\n    inst._zod.check = (payload) => {\n        if (typeof payload.value !== typeof def.value)\n            throw new Error(\"Cannot mix number and bigint in multiple_of check.\");\n        const isMultiple = typeof payload.value === \"bigint\"\n            ? // `value % 0n` throws, and nothing is a multiple of zero — the number branch already fails this way via NaN\n                def.value !== BigInt(0) && payload.value % def.value === BigInt(0)\n            : util.floatSafeRemainder(payload.value, def.value) === 0;\n        if (isMultiple)\n            return;\n        payload.issues.push({\n            origin: typeof payload.value,\n            code: \"not_multiple_of\",\n            divisor: def.value,\n            input: payload.value,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckNumberFormat\", (inst, def) => {\n    $ZodCheck.init(inst, def); // no format checks\n    def.format = def.format || \"float64\";\n    const isInt = def.format?.includes(\"int\");\n    const origin = isInt ? \"int\" : \"number\";\n    const [minimum, maximum] = util.NUMBER_FORMAT_RANGES[def.format];\n    inst._zod.check = (payload) => {\n        const input = payload.value;\n        if (isInt) {\n            if (!Number.isInteger(input)) {\n                // invalid_format issue\n                // payload.issues.push({\n                //   expected: def.format,\n                //   format: def.format,\n                //   code: \"invalid_format\",\n                //   input,\n                //   inst,\n                // });\n                // invalid_type issue\n                payload.issues.push({\n                    expected: origin,\n                    format: def.format,\n                    code: \"invalid_type\",\n                    continue: false,\n                    input,\n                    inst,\n                });\n                return;\n                // not_multiple_of issue\n                // payload.issues.push({\n                //   code: \"not_multiple_of\",\n                //   origin: \"number\",\n                //   input,\n                //   inst,\n                //   divisor: 1,\n                // });\n            }\n            if (!Number.isSafeInteger(input)) {\n                if (input > 0) {\n                    // too_big\n                    payload.issues.push({\n                        input,\n                        code: \"too_big\",\n                        maximum: Number.MAX_SAFE_INTEGER,\n                        note: \"Integers must be within the safe integer range.\",\n                        inst,\n                        origin,\n                        inclusive: true,\n                        continue: !def.abort,\n                    });\n                }\n                else {\n                    // too_small\n                    payload.issues.push({\n                        input,\n                        code: \"too_small\",\n                        minimum: Number.MIN_SAFE_INTEGER,\n                        note: \"Integers must be within the safe integer range.\",\n                        inst,\n                        origin,\n                        inclusive: true,\n                        continue: !def.abort,\n                    });\n                }\n                return;\n            }\n        }\n        if (input < minimum) {\n            payload.issues.push({\n                origin: \"number\",\n                input,\n                code: \"too_small\",\n                minimum,\n                inclusive: true,\n                inst,\n                continue: !def.abort,\n            });\n        }\n        if (input > maximum) {\n            payload.issues.push({\n                origin: \"number\",\n                input,\n                code: \"too_big\",\n                maximum,\n                inclusive: true,\n                inst,\n                continue: !def.abort,\n            });\n        }\n    };\n});\nexport const $ZodCheckBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckBigIntFormat\", (inst, def) => {\n    $ZodCheck.init(inst, def); // no format checks\n    const [minimum, maximum] = util.BIGINT_FORMAT_RANGES[def.format];\n    inst._zod.check = (payload) => {\n        const input = payload.value;\n        if (input < minimum) {\n            payload.issues.push({\n                origin: \"bigint\",\n                input,\n                code: \"too_small\",\n                minimum: minimum,\n                inclusive: true,\n                inst,\n                continue: !def.abort,\n            });\n        }\n        if (input > maximum) {\n            payload.issues.push({\n                origin: \"bigint\",\n                input,\n                code: \"too_big\",\n                maximum,\n                inclusive: true,\n                inst,\n                continue: !def.abort,\n            });\n        }\n    };\n});\nexport const $ZodCheckMaxSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxSize\", (inst, def) => {\n    var _a;\n    $ZodCheck.init(inst, def);\n    (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);\n    inst._zod.check = (payload) => {\n        const input = payload.value;\n        const size = input.size;\n        if (size <= def.maximum)\n            return;\n        payload.issues.push({\n            origin: util.getSizableOrigin(input),\n            code: \"too_big\",\n            maximum: def.maximum,\n            inclusive: true,\n            input,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckMinSize = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinSize\", (inst, def) => {\n    var _a;\n    $ZodCheck.init(inst, def);\n    (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);\n    inst._zod.check = (payload) => {\n        const input = payload.value;\n        const size = input.size;\n        if (size >= def.minimum)\n            return;\n        payload.issues.push({\n            origin: util.getSizableOrigin(input),\n            code: \"too_small\",\n            minimum: def.minimum,\n            inclusive: true,\n            input,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckSizeEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckSizeEquals\", (inst, def) => {\n    var _a;\n    $ZodCheck.init(inst, def);\n    (_a = inst._zod.def).when ?? (_a.when = _whenHasSize);\n    inst._zod.check = (payload) => {\n        const input = payload.value;\n        const size = input.size;\n        if (size === def.size)\n            return;\n        const tooBig = size > def.size;\n        payload.issues.push({\n            origin: util.getSizableOrigin(input),\n            ...(tooBig ? { code: \"too_big\", maximum: def.size } : { code: \"too_small\", minimum: def.size }),\n            inclusive: true,\n            exact: true,\n            input: payload.value,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckMaxLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMaxLength\", (inst, def) => {\n    var _a;\n    $ZodCheck.init(inst, def);\n    (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);\n    inst._zod.check = (payload) => {\n        const input = payload.value;\n        const units = input.length;\n        // Strings are measured in Unicode code points, not UTF-16 units. A code point is at most two units, so a string that already fits in units fits in code points; only an overflow has to be counted.\n        const length = typeof input === \"string\" && units > def.maximum ? util.codePointLength(input) : units;\n        if (length <= def.maximum)\n            return;\n        const origin = util.getLengthableOrigin(input);\n        payload.issues.push({\n            origin,\n            code: \"too_big\",\n            maximum: def.maximum,\n            inclusive: true,\n            input,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckMinLength = /*@__PURE__*/ core.$constructor(\"$ZodCheckMinLength\", (inst, def) => {\n    var _a;\n    $ZodCheck.init(inst, def);\n    (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);\n    inst._zod.check = (payload) => {\n        const input = payload.value;\n        const units = input.length;\n        // A code point is one or two UTF-16 units, so fewer units than the floor can never reach it and twice the floor always clears it. Only in between is the exact count in doubt.\n        const length = typeof input === \"string\" && units >= def.minimum && units < def.minimum * 2\n            ? util.codePointLength(input)\n            : units;\n        if (length >= def.minimum)\n            return;\n        const origin = util.getLengthableOrigin(input);\n        payload.issues.push({\n            origin,\n            code: \"too_small\",\n            minimum: def.minimum,\n            inclusive: true,\n            input,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckLengthEquals = /*@__PURE__*/ core.$constructor(\"$ZodCheckLengthEquals\", (inst, def) => {\n    var _a;\n    $ZodCheck.init(inst, def);\n    (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);\n    inst._zod.check = (payload) => {\n        const input = payload.value;\n        const units = input.length;\n        // A code point is one or two UTF-16 units, so outside `[length, length * 2]` units the target is missed either way — and missed in the same direction in both measures.\n        const length = typeof input === \"string\" && units >= def.length && units <= def.length * 2\n            ? util.codePointLength(input)\n            : units;\n        if (length === def.length)\n            return;\n        const origin = util.getLengthableOrigin(input);\n        const tooBig = length > def.length;\n        payload.issues.push({\n            origin,\n            ...(tooBig ? { code: \"too_big\", maximum: def.length } : { code: \"too_small\", minimum: def.length }),\n            inclusive: true,\n            exact: true,\n            input: payload.value,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCheckStringFormat\", (inst, def) => {\n    var _a, _b;\n    $ZodCheck.init(inst, def);\n    if (def.pattern)\n        (_a = inst._zod).check ?? (_a.check = (payload) => {\n            def.pattern.lastIndex = 0;\n            if (def.pattern.test(payload.value))\n                return;\n            payload.issues.push({\n                origin: \"string\",\n                code: \"invalid_format\",\n                format: def.format,\n                input: payload.value,\n                ...(def.pattern ? { pattern: def.pattern.toString() } : {}),\n                inst,\n                continue: !def.abort,\n            });\n        });\n    else\n        (_b = inst._zod).check ?? (_b.check = () => { });\n});\nexport const $ZodCheckRegex = /*@__PURE__*/ core.$constructor(\"$ZodCheckRegex\", (inst, def) => {\n    $ZodCheckStringFormat.init(inst, def);\n    inst._zod.check = (payload) => {\n        def.pattern.lastIndex = 0;\n        if (def.pattern.test(payload.value))\n            return;\n        payload.issues.push({\n            origin: \"string\",\n            code: \"invalid_format\",\n            format: \"regex\",\n            input: payload.value,\n            pattern: def.pattern.toString(),\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckLowerCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckLowerCase\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.lowercase);\n    $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckUpperCase = /*@__PURE__*/ core.$constructor(\"$ZodCheckUpperCase\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.uppercase);\n    $ZodCheckStringFormat.init(inst, def);\n});\nexport const $ZodCheckIncludes = /*@__PURE__*/ core.$constructor(\"$ZodCheckIncludes\", (inst, def) => {\n    $ZodCheck.init(inst, def);\n    const escapedRegex = util.escapeRegex(def.includes);\n    // `String.prototype.includes(sub, position)` matches `sub` at `position`\n    // OR LATER, so the pattern must allow at least `position` leading chars\n    // (`{N,}`), not exactly `position` chars (`{N}`).\n    const pattern = new RegExp(typeof def.position === \"number\" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);\n    def.pattern = pattern;\n    inst._zod.check = (payload) => {\n        if (payload.value.includes(def.includes, def.position))\n            return;\n        payload.issues.push({\n            origin: \"string\",\n            code: \"invalid_format\",\n            format: \"includes\",\n            includes: def.includes,\n            input: payload.value,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckStartsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckStartsWith\", (inst, def) => {\n    $ZodCheck.init(inst, def);\n    const pattern = new RegExp(`^${util.escapeRegex(def.prefix)}.*`);\n    def.pattern ?? (def.pattern = pattern);\n    inst._zod.check = (payload) => {\n        if (payload.value.startsWith(def.prefix))\n            return;\n        payload.issues.push({\n            origin: \"string\",\n            code: \"invalid_format\",\n            format: \"starts_with\",\n            prefix: def.prefix,\n            input: payload.value,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckEndsWith = /*@__PURE__*/ core.$constructor(\"$ZodCheckEndsWith\", (inst, def) => {\n    $ZodCheck.init(inst, def);\n    const pattern = new RegExp(`.*${util.escapeRegex(def.suffix)}$`);\n    def.pattern ?? (def.pattern = pattern);\n    inst._zod.check = (payload) => {\n        if (payload.value.endsWith(def.suffix))\n            return;\n        payload.issues.push({\n            origin: \"string\",\n            code: \"invalid_format\",\n            format: \"ends_with\",\n            suffix: def.suffix,\n            input: payload.value,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\n///////////////////////////////////\n/////    $ZodCheckProperty    /////\n///////////////////////////////////\nfunction handleCheckPropertyResult(result, payload, property) {\n    if (result.issues.length) {\n        payload.issues.push(...util.prefixIssues(property, result.issues));\n    }\n}\nexport const $ZodCheckProperty = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperty\", (inst, def) => {\n    $ZodCheck.init(inst, def);\n    inst._zod.check = (payload) => {\n        const result = def.schema._zod.run({\n            value: payload.value[def.property],\n            issues: [],\n        }, {});\n        if (result instanceof Promise) {\n            return result.then((result) => handleCheckPropertyResult(result, payload, def.property));\n        }\n        handleCheckPropertyResult(result, payload, def.property);\n        return;\n    };\n});\nexport const $ZodCheckProperties = /*@__PURE__*/ core.$constructor(\"$ZodCheckProperties\", (inst, def) => {\n    $ZodCheck.init(inst, def);\n    util.hide(inst, Symbol.iterator, function* () {\n        yield inst;\n    });\n    // key and schema snapshotted together: reading one live and the other cached lets a later mutation of the caller's shape object pair a stale key with a missing schema\n    let entries;\n    inst._zod.check = (payload) => {\n        // the base schema already typed the value, so only a nullish one is rejected here: the properties read on a primitive too, matching z.property() on a string's length\n        if (payload.value == null) {\n            payload.issues.push({ expected: \"object\", code: \"invalid_type\", input: payload.value, inst });\n            return undefined;\n        }\n        entries ?? (entries = Reflect.ownKeys(def.shape).map((key) => [key, def.shape[key]]));\n        const input = payload.value;\n        let proms;\n        for (const [key, schema] of entries) {\n            const result = schema._zod.run({ value: input[key], issues: [] }, {});\n            if (result instanceof Promise) {\n                proms ?? (proms = []);\n                proms.push(result.then((result) => handleCheckPropertyResult(result, payload, key)));\n            }\n            else {\n                handleCheckPropertyResult(result, payload, key);\n            }\n        }\n        if (proms)\n            return Promise.all(proms).then(() => undefined);\n        return undefined;\n    };\n});\nexport const $ZodCheckMimeType = /*@__PURE__*/ core.$constructor(\"$ZodCheckMimeType\", (inst, def) => {\n    $ZodCheck.init(inst, def);\n    const mimeSet = new Set(def.mime);\n    inst._zod.check = (payload) => {\n        if (mimeSet.has(payload.value.type))\n            return;\n        payload.issues.push({\n            code: \"invalid_value\",\n            values: def.mime,\n            input: payload.value.type,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCheckOverwrite = /*@__PURE__*/ core.$constructor(\"$ZodCheckOverwrite\", (inst, def) => {\n    $ZodCheck.init(inst, def);\n    inst._zod.check = (payload) => {\n        payload.value = def.tx(payload.value);\n    };\n});\n","export class Doc {\n    constructor(args = [], closed = {}) {\n        this.content = [];\n        this.indent = 0;\n        this.args = args;\n        this.closed = closed;\n    }\n    // the compiler catches a child's throw and keeps writing into this doc, so the indent has to unwind with it\n    indented(fn) {\n        this.indent += 1;\n        try {\n            fn(this);\n        }\n        finally {\n            this.indent -= 1;\n        }\n    }\n    write(arg) {\n        if (typeof arg === \"function\") {\n            arg(this, { execution: \"sync\" });\n            arg(this, { execution: \"async\" });\n            return;\n        }\n        const content = arg;\n        const lines = content.split(\"\\n\").filter((x) => x);\n        const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));\n        const dedented = lines.map((x) => x.slice(minIndent)).map((x) => \" \".repeat(this.indent * 2) + x);\n        for (const line of dedented) {\n            this.content.push(line);\n        }\n    }\n    compile() {\n        const F = Function;\n        const content = this?.content ?? [``];\n        const factory = new F(...Object.keys(this.closed), `return function (${this.args.join(\", \")}) {\\n${content.join(\"\\n\")}\\n};`);\n        return factory(...Object.values(this.closed));\n    }\n}\n","export const version = {\n    major: 4,\n    minor: 6,\n    patch: 5,\n};\n","import * as checks from \"./checks.js\";\nimport * as core from \"./core.js\";\nimport { Doc } from \"./doc.js\";\nimport { parse, parseAsync } from \"./parse.js\";\nimport * as regexes from \"./regexes.js\";\nimport * as util from \"./util.js\";\nimport { version } from \"./versions.js\";\nexport const $ZodType = /*@__PURE__*/ core.$constructor(\"$ZodType\", (inst, def) => {\n    var _a;\n    inst ?? (inst = {});\n    inst._zod.def = def; // set _def property\n    inst._zod.bag = inst._zod.bag || {}; // initialize _bag object\n    inst._zod.version = version;\n    const defChecks = inst._zod.def.checks;\n    // if inst is itself a checks.$ZodCheck, run it as a check\n    const checks = inst._zod.traits.has(\"$ZodCheck\")\n        ? [inst, ...(defChecks ?? [])]\n        : defChecks?.length\n            ? [...defChecks]\n            : [];\n    for (const ch of checks) {\n        for (const fn of ch._zod.onattach) {\n            fn(inst);\n        }\n    }\n    if (checks.length === 0) {\n        // deferred initializer inst._zod.parse is not yet defined\n        (_a = inst._zod).deferred ?? (_a.deferred = []);\n        inst._zod.deferred?.push(() => {\n            inst._zod.run = inst._zod.parse;\n        });\n    }\n    else {\n        const runChecks = (payload, checks, ctx) => {\n            if (payload.memo)\n                return payload;\n            let isAborted = util.aborted(payload);\n            let asyncResult;\n            for (const ch of checks) {\n                if (ch._zod.def.when) {\n                    if (util.explicitlyAborted(payload))\n                        continue;\n                    const shouldRun = ch._zod.def.when(payload);\n                    if (!shouldRun)\n                        continue;\n                }\n                else if (isAborted) {\n                    continue;\n                }\n                const currLen = payload.issues.length;\n                const _ = ch._zod.check(payload);\n                if (_ instanceof Promise && ctx?.async === false) {\n                    throw new core.$ZodAsyncError();\n                }\n                if (asyncResult || _ instanceof Promise) {\n                    asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {\n                        await _;\n                        const nextLen = payload.issues.length;\n                        if (nextLen === currLen)\n                            return;\n                        util.attachSchema(payload.issues, currLen, inst);\n                        if (!isAborted)\n                            isAborted = util.aborted(payload, currLen);\n                    });\n                }\n                else {\n                    const nextLen = payload.issues.length;\n                    if (nextLen === currLen)\n                        continue;\n                    util.attachSchema(payload.issues, currLen, inst);\n                    if (!isAborted)\n                        isAborted = util.aborted(payload, currLen);\n                }\n            }\n            if (asyncResult) {\n                return asyncResult.then(() => {\n                    return payload;\n                });\n            }\n            return payload;\n        };\n        const handleCanaryResult = (canary, payload, ctx) => {\n            // abort if the canary is aborted\n            if (util.aborted(canary)) {\n                canary.aborted = true;\n                return canary;\n            }\n            // run checks first, then\n            const checkResult = runChecks(payload, checks, ctx);\n            if (checkResult instanceof Promise) {\n                if (ctx.async === false)\n                    throw new core.$ZodAsyncError();\n                return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));\n            }\n            return inst._zod.parse(checkResult, ctx);\n        };\n        inst._zod.run = (payload, ctx) => {\n            if (ctx.skipChecks) {\n                return inst._zod.parse(payload, ctx);\n            }\n            if (ctx.direction === \"backward\") {\n                // run canary initial pass (no checks)\n                const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });\n                if (canary instanceof Promise) {\n                    return canary.then((canary) => {\n                        return handleCanaryResult(canary, payload, ctx);\n                    });\n                }\n                return handleCanaryResult(canary, payload, ctx);\n            }\n            // forward\n            const result = inst._zod.parse(payload, ctx);\n            if (result instanceof Promise) {\n                if (ctx.async === false)\n                    throw new core.$ZodAsyncError();\n                return result.then((result) => runChecks(result, checks, ctx));\n            }\n            return runChecks(result, checks, ctx);\n        };\n    }\n}, {\n    // Wrappers extend this by installing a richer factory over it; reading it eagerly would defeat the laziness.\n    get \"~standard\"() {\n        return util.hide(this, \"~standard\", standardProps(this));\n    },\n    set \"~standard\"(value) {\n        util.own(this, \"~standard\", value);\n    },\n});\n/** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */\n// a Standard Schema result only reports issues, so a failure finalizes them straight off the raw payload: no ZodError, and no lazy result to read through\nconst toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())) } : { value: r.value };\nasync function validateAsync(inst, value) {\n    const ctx = { async: true };\n    return toStandardResult((await inst._zod.run({ value, issues: [] }, ctx)), ctx);\n}\nexport function standardProps(inst) {\n    return {\n        validate: (value) => {\n            const ctx = { async: false };\n            try {\n                const r = inst._zod.run({ value, issues: [] }, ctx);\n                if (!(r instanceof Promise))\n                    return toStandardResult(r, ctx);\n            }\n            catch (_) { }\n            // async function so a synchronously throwing check rejects instead of escaping validate\n            return validateAsync(inst, value);\n        },\n        vendor: \"zod\",\n        version: 1,\n    };\n}\nexport { clone } from \"./util.js\";\nexport const $ZodString = /*@__PURE__*/ core.$constructor(\"$ZodString\", (inst, def) => {\n    $ZodType.init(inst, def);\n    // a format's own pattern, else unbounded; a template literal derives the check-aware form itself\n    inst._zod.pattern = def.pattern ?? regexes.anyString;\n    inst._zod.parse = (payload, _) => {\n        if (def.coerce)\n            try {\n                payload.value = String(payload.value);\n            }\n            catch (_) { }\n        if (typeof payload.value === \"string\")\n            return payload;\n        payload.issues.push({\n            expected: \"string\",\n            code: \"invalid_type\",\n            input: payload.value,\n            inst,\n        });\n        return payload;\n    };\n});\nexport const $ZodStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodStringFormat\", (inst, def) => {\n    // check initialization must come first\n    checks.$ZodCheckStringFormat.init(inst, def);\n    $ZodString.init(inst, def);\n});\nexport const $ZodGUID = /*@__PURE__*/ core.$constructor(\"$ZodGUID\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.guid);\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodUUID = /*@__PURE__*/ core.$constructor(\"$ZodUUID\", (inst, def) => {\n    if (def.version) {\n        const versionMap = {\n            v1: 1,\n            v2: 2,\n            v3: 3,\n            v4: 4,\n            v5: 5,\n            v6: 6,\n            v7: 7,\n            v8: 8,\n        };\n        const v = versionMap[def.version];\n        if (v === undefined)\n            throw new Error(`Invalid UUID version: \"${def.version}\"`);\n        def.pattern ?? (def.pattern = regexes.uuid(v));\n    }\n    else\n        def.pattern ?? (def.pattern = regexes.uuid());\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodEmail = /*@__PURE__*/ core.$constructor(\"$ZodEmail\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.email);\n    $ZodStringFormat.init(inst, def);\n});\n/** The `://` guard rejected the input before the URL constructor saw it. */\nexport const URL_BAD_FORMAT = 1;\n/** The URL parser rejected the input. */\nexport const URL_UNPARSEABLE = 2;\nexport function canParseURL(input) {\n    try {\n        if (typeof URL !== \"undefined\" && typeof URL.canParse === \"function\")\n            return URL.canParse(input);\n        new URL(input);\n        return true;\n    }\n    catch {\n        return false;\n    }\n}\nexport function validateURL(trimmed, def) {\n    if (!(\"normalize\" in def) && !(\"hostname\" in def) && !(\"protocol\" in def)) {\n        return canParseURL(trimmed) || URL_UNPARSEABLE;\n    }\n    return parseURLObject(trimmed, def);\n}\n/** Parses a URL while preserving the non-normalizing HTTP guard. */\nexport function parseURLObject(trimmed, def) {\n    // When normalize is off, require :// for http/https URLs. This prevents strings like \"http:example.com\" or \"https:/path\" from being silently accepted\n    if (!def.normalize && def.protocol?.source === regexes.httpProtocol.source && !/^https?:\\/\\//i.test(trimmed)) {\n        return URL_BAD_FORMAT;\n    }\n    try {\n        if (typeof URL !== \"undefined\") {\n            const URLStatic = URL;\n            if (typeof URLStatic.parse === \"function\")\n                return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;\n        }\n        // @ts-ignore\n        return new URL(trimmed);\n    }\n    catch {\n        return URL_UNPARSEABLE;\n    }\n}\nconst asciiTabOrNewline = /[\\t\\n\\r]/g;\n/** The URL parser deletes every ASCII tab, LF and CR from its input before it parses, so `new URL(\"https://exa\\nmple.com\")` reports on `example.com`. Applying the same deletion to the returned value closes the half of that divergence which can move the host; the parser's other rewrite, stripping C0 controls at the edges, cannot. */\nexport function stripTabAndNewline(value) {\n    return value.replace(asciiTabOrNewline, \"\");\n}\nexport function urlHostnameOk(url, hostname) {\n    hostname.lastIndex = 0;\n    return hostname.test(url.hostname);\n}\nexport function urlProtocolOk(url, protocol) {\n    protocol.lastIndex = 0;\n    return protocol.test(url.protocol.endsWith(\":\") ? url.protocol.slice(0, -1) : url.protocol);\n}\nexport const $ZodURL = /*@__PURE__*/ core.$constructor(\"$ZodURL\", (inst, def) => {\n    $ZodStringFormat.init(inst, def);\n    inst._zod.check = (payload) => {\n        try {\n            // Trim whitespace from input\n            const trimmed = payload.value.trim();\n            const url = validateURL(trimmed, def);\n            if (url === URL_BAD_FORMAT) {\n                payload.issues.push({\n                    code: \"invalid_format\",\n                    format: \"url\",\n                    note: \"Invalid URL format\",\n                    input: payload.value,\n                    inst,\n                    continue: !def.abort,\n                });\n                return;\n            }\n            if (url === URL_UNPARSEABLE) {\n                payload.issues.push({\n                    code: \"invalid_format\",\n                    format: \"url\",\n                    input: payload.value,\n                    inst,\n                    continue: !def.abort,\n                });\n                return;\n            }\n            if (url === true) {\n                payload.value = stripTabAndNewline(trimmed);\n                return;\n            }\n            if (def.hostname && !urlHostnameOk(url, def.hostname)) {\n                payload.issues.push({\n                    code: \"invalid_format\",\n                    format: \"url\",\n                    note: \"Invalid hostname\",\n                    pattern: def.hostname.source,\n                    input: payload.value,\n                    inst,\n                    continue: !def.abort,\n                });\n            }\n            if (def.protocol && !urlProtocolOk(url, def.protocol)) {\n                payload.issues.push({\n                    code: \"invalid_format\",\n                    format: \"url\",\n                    note: \"Invalid protocol\",\n                    pattern: def.protocol.source,\n                    input: payload.value,\n                    inst,\n                    continue: !def.abort,\n                });\n            }\n            // Set the output value based on normalize flag\n            payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed);\n            return;\n        }\n        catch (_) {\n            payload.issues.push({\n                code: \"invalid_format\",\n                format: \"url\",\n                input: payload.value,\n                inst,\n                continue: !def.abort,\n            });\n        }\n    };\n});\nexport const $ZodEmoji = /*@__PURE__*/ core.$constructor(\"$ZodEmoji\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.emoji());\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodNanoID = /*@__PURE__*/ core.$constructor(\"$ZodNanoID\", (inst, def) => {\n    if (def.length !== undefined && (!Number.isInteger(def.length) || def.length < 1))\n        throw new Error(`Invalid nanoid length: ${def.length}`);\n    def.pattern ?? (def.pattern = def.length === undefined ? regexes.nanoid : regexes.nanoidOfLength(def.length));\n    $ZodStringFormat.init(inst, def);\n});\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const $ZodCUID = /*@__PURE__*/ core.$constructor(\"$ZodCUID\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.cuid);\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCUID2 = /*@__PURE__*/ core.$constructor(\"$ZodCUID2\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.cuid2);\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodULID = /*@__PURE__*/ core.$constructor(\"$ZodULID\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.ulid);\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodXID = /*@__PURE__*/ core.$constructor(\"$ZodXID\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.xid);\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodKSUID = /*@__PURE__*/ core.$constructor(\"$ZodKSUID\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.ksuid);\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODateTime = /*@__PURE__*/ core.$constructor(\"$ZodISODateTime\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.datetime(def));\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODate = /*@__PURE__*/ core.$constructor(\"$ZodISODate\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.date);\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISOTime = /*@__PURE__*/ core.$constructor(\"$ZodISOTime\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.time(def));\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodISODuration = /*@__PURE__*/ core.$constructor(\"$ZodISODuration\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.duration);\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodIPv4 = /*@__PURE__*/ core.$constructor(\"$ZodIPv4\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.ipv4);\n    $ZodStringFormat.init(inst, def);\n});\n/** An IPv6 address is written with hex digits, colons and dots, and nothing else. The guard is what makes the check below an IPv6 check: `new URL(\"http://[...]\")` parses an authority, not an address, so `@` and `\\` re-delimit it and `\"::@1\\\\\"` validates against the host `0.0.0.1`. The URL parser also deletes ASCII tab, LF and CR rather than failing, which is how `\"::1\\n\"` validated as `::1`. */\nconst ipv6Alphabet = /^[0-9a-fA-F:.]+$/;\nexport function isValidIPv6(value) {\n    if (!ipv6Alphabet.test(value))\n        return false;\n    return canParseURL(`http://[${value}]`);\n}\nexport const $ZodIPv6 = /*@__PURE__*/ core.$constructor(\"$ZodIPv6\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.ipv6);\n    $ZodStringFormat.init(inst, def);\n    inst._zod.check = (payload) => {\n        if (!isValidIPv6(payload.value)) {\n            payload.issues.push({\n                code: \"invalid_format\",\n                format: \"ipv6\",\n                input: payload.value,\n                inst,\n                continue: !def.abort,\n            });\n        }\n    };\n});\nexport const $ZodMAC = /*@__PURE__*/ core.$constructor(\"$ZodMAC\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.mac(def.delimiter));\n    $ZodStringFormat.init(inst, def);\n});\nexport const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv4\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.cidrv4);\n    $ZodStringFormat.init(inst, def);\n});\nexport function isValidCIDRv6(value) {\n    const parts = value.split(\"/\");\n    if (parts.length !== 2)\n        return false;\n    const [address, prefix] = parts;\n    if (!prefix)\n        return false;\n    const prefixNum = Number(prefix);\n    if (`${prefixNum}` !== prefix)\n        return false;\n    if (prefixNum < 0 || prefixNum > 128)\n        return false;\n    return isValidIPv6(address);\n}\nexport const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"$ZodCIDRv6\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation\n    $ZodStringFormat.init(inst, def);\n    inst._zod.check = (payload) => {\n        if (!isValidCIDRv6(payload.value)) {\n            payload.issues.push({\n                code: \"invalid_format\",\n                format: \"cidrv6\",\n                input: payload.value,\n                inst,\n                continue: !def.abort,\n            });\n        }\n    };\n});\n//////////////////////////////   ZodBase64   //////////////////////////////\nexport function isValidBase64(data) {\n    if (data === \"\")\n        return true;\n    // atob ignores whitespace, so reject it up front.\n    if (/\\s/.test(data))\n        return false;\n    if (data.length % 4 !== 0)\n        return false;\n    try {\n        // @ts-ignore\n        atob(data);\n        return true;\n    }\n    catch {\n        return false;\n    }\n}\n// lax on purpose: the quantified regexes.base64 overflows the regex stack on multi-MB input and its leading ^$| alternation leaks through template-literal composition; isValidBase64 enforces length and padding\nexport const base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;\nexport const $ZodBase64 = /*@__PURE__*/ core.$constructor(\"$ZodBase64\", (inst, def) => {\n    def.pattern ?? (def.pattern = base64Charset);\n    $ZodStringFormat.init(inst, def);\n    inst._zod.check = (payload) => {\n        if (isValidBase64(payload.value))\n            return;\n        payload.issues.push({\n            code: \"invalid_format\",\n            format: \"base64\",\n            input: payload.value,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\n//////////////////////////////   ZodBase64URL   //////////////////////////////\n// lax on purpose: the quantified regexes.base64url overflows the regex stack on multi-MB input; isValidBase64 enforces length on the padded string\nexport const base64urlCharset = /^[A-Za-z0-9_-]*$/;\nexport function isValidBase64URL(data) {\n    if (!base64urlCharset.test(data))\n        return false;\n    const base64 = data.replace(/[-_]/g, (c) => (c === \"-\" ? \"+\" : \"/\"));\n    const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, \"=\");\n    return isValidBase64(padded);\n}\nexport const $ZodBase64URL = /*@__PURE__*/ core.$constructor(\"$ZodBase64URL\", (inst, def) => {\n    def.pattern ?? (def.pattern = base64urlCharset);\n    $ZodStringFormat.init(inst, def);\n    inst._zod.check = (payload) => {\n        if (isValidBase64URL(payload.value))\n            return;\n        payload.issues.push({\n            code: \"invalid_format\",\n            format: \"base64url\",\n            input: payload.value,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodE164 = /*@__PURE__*/ core.$constructor(\"$ZodE164\", (inst, def) => {\n    def.pattern ?? (def.pattern = regexes.e164);\n    $ZodStringFormat.init(inst, def);\n});\n//////////////////////////////   ZodCreditCard   //////////////////////////////\nconst CC_SANITIZE = /[- ]/g;\n/** Luhn checksum on a digit-only string. Adapted from valibot (MIT). */\nfunction isLuhnAlgo(digits) {\n    let length = digits.length;\n    let bit = 1;\n    let sum = 0;\n    while (length) {\n        const value = digits.charCodeAt(--length) - 48;\n        bit ^= 1;\n        sum += bit ? [0, 2, 4, 6, 8, 1, 3, 5, 7, 9][value] : value;\n    }\n    return sum % 10 === 0;\n}\nexport function isValidCreditCard(input) {\n    if (!regexes.creditCard.test(input))\n        return false;\n    return isLuhnAlgo(input.replace(CC_SANITIZE, \"\"));\n}\nexport const $ZodCreditCard = /*@__PURE__*/ core.$constructor(\"$ZodCreditCard\", (inst, def) => {\n    // Shape only — the Luhn check below is not expressible as a pattern, so consumers of `pattern` (JSON Schema, template literals) get the length and separator rules alone.\n    def.pattern ?? (def.pattern = regexes.creditCard);\n    $ZodStringFormat.init(inst, def);\n    inst._zod.check = (payload) => {\n        if (isValidCreditCard(payload.value))\n            return;\n        payload.issues.push({\n            code: \"invalid_format\",\n            format: \"credit_card\",\n            input: payload.value,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\n//////////////////////////////   ZodIBAN   //////////////////////////////\n// iso 7064 mod 97-10 checksum without BigInt\nfunction isIso7064Mod97(iban) {\n    let remainder = 0;\n    const len = iban.length;\n    for (let i = 4; i < len; i++) {\n        const code = iban.charCodeAt(i);\n        remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;\n    }\n    for (let i = 0; i < 4; i++) {\n        const code = iban.charCodeAt(i);\n        remainder = (code >= 65 ? remainder * 100 + (code - 55) : remainder * 10 + (code - 48)) % 97;\n    }\n    return remainder === 1;\n}\nexport function isValidIBAN(input) {\n    if (!regexes.iban.test(input))\n        return false;\n    return isIso7064Mod97(input);\n}\nexport const $ZodIBAN = /*@__PURE__*/ core.$constructor(\"$ZodIBAN\", (inst, def) => {\n    // shape only — checksum is not expressible as a pattern\n    def.pattern ?? (def.pattern = regexes.iban);\n    $ZodStringFormat.init(inst, def);\n    inst._zod.check = (payload) => {\n        if (isValidIBAN(payload.value))\n            return;\n        payload.issues.push({\n            code: \"invalid_format\",\n            format: \"iban\",\n            input: payload.value,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\n//////////////////////////////   ZodJWT   //////////////////////////////\nexport function isValidJWT(token, algorithm = null) {\n    try {\n        const tokensParts = token.split(\".\");\n        if (tokensParts.length !== 3)\n            return false;\n        const [header] = tokensParts;\n        if (!header)\n            return false;\n        // @ts-ignore\n        const parsedHeader = JSON.parse(atob(header));\n        if (\"typ\" in parsedHeader && parsedHeader?.typ !== \"JWT\")\n            return false;\n        if (!parsedHeader.alg)\n            return false;\n        if (algorithm && (!(\"alg\" in parsedHeader) || parsedHeader.alg !== algorithm))\n            return false;\n        return true;\n    }\n    catch {\n        return false;\n    }\n}\nexport const $ZodJWT = /*@__PURE__*/ core.$constructor(\"$ZodJWT\", (inst, def) => {\n    $ZodStringFormat.init(inst, def);\n    inst._zod.check = (payload) => {\n        if (isValidJWT(payload.value, def.alg))\n            return;\n        payload.issues.push({\n            code: \"invalid_format\",\n            format: \"jwt\",\n            input: payload.value,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"$ZodCustomStringFormat\", (inst, def) => {\n    $ZodStringFormat.init(inst, def);\n    inst._zod.check = (payload) => {\n        if (def.fn(payload.value))\n            return;\n        payload.issues.push({\n            code: \"invalid_format\",\n            format: def.format,\n            input: payload.value,\n            inst,\n            continue: !def.abort,\n        });\n    };\n});\nexport const $ZodNumber = /*@__PURE__*/ core.$constructor(\"$ZodNumber\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.pattern = regexes.number;\n    inst._zod.parse = (payload, _ctx) => {\n        if (def.coerce)\n            try {\n                payload.value = Number(payload.value);\n            }\n            catch (_) { }\n        const input = payload.value;\n        if (typeof input === \"number\" && !Number.isNaN(input) && Number.isFinite(input)) {\n            return payload;\n        }\n        const received = typeof input === \"number\"\n            ? Number.isNaN(input)\n                ? \"NaN\"\n                : !Number.isFinite(input)\n                    ? String(input)\n                    : undefined\n            : undefined;\n        payload.issues.push({\n            expected: \"number\",\n            code: \"invalid_type\",\n            input,\n            inst,\n            ...(received ? { received } : {}),\n        });\n        return payload;\n    };\n});\nexport const $ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"$ZodNumberFormat\", (inst, def) => {\n    checks.$ZodCheckNumberFormat.init(inst, def);\n    $ZodNumber.init(inst, def); // no format checks\n});\nexport const $ZodBoolean = /*@__PURE__*/ core.$constructor(\"$ZodBoolean\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.pattern = regexes.boolean;\n    inst._zod.parse = (payload, _ctx) => {\n        if (def.coerce)\n            try {\n                payload.value = Boolean(payload.value);\n            }\n            catch (_) { }\n        const input = payload.value;\n        if (typeof input === \"boolean\")\n            return payload;\n        payload.issues.push({\n            expected: \"boolean\",\n            code: \"invalid_type\",\n            input,\n            inst,\n        });\n        return payload;\n    };\n});\nexport const $ZodBigInt = /*@__PURE__*/ core.$constructor(\"$ZodBigInt\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.pattern = regexes.bigint;\n    inst._zod.parse = (payload, _ctx) => {\n        if (def.coerce)\n            try {\n                payload.value = BigInt(payload.value);\n            }\n            catch (_) { }\n        if (typeof payload.value === \"bigint\")\n            return payload;\n        payload.issues.push({\n            expected: \"bigint\",\n            code: \"invalid_type\",\n            input: payload.value,\n            inst,\n        });\n        return payload;\n    };\n});\nexport const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"$ZodBigIntFormat\", (inst, def) => {\n    checks.$ZodCheckBigIntFormat.init(inst, def);\n    $ZodBigInt.init(inst, def); // no format checks\n});\nexport const $ZodSymbol = /*@__PURE__*/ core.$constructor(\"$ZodSymbol\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.parse = (payload, _ctx) => {\n        const input = payload.value;\n        if (typeof input === \"symbol\")\n            return payload;\n        payload.issues.push({\n            expected: \"symbol\",\n            code: \"invalid_type\",\n            input,\n            inst,\n        });\n        return payload;\n    };\n});\nexport const $ZodUndefined = /*@__PURE__*/ core.$constructor(\"$ZodUndefined\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.pattern = regexes.undefined;\n    inst._zod.values = new Set([undefined]);\n    inst._zod.parse = (payload, _ctx) => {\n        const input = payload.value;\n        if (typeof input === \"undefined\")\n            return payload;\n        payload.issues.push({\n            expected: \"undefined\",\n            code: \"invalid_type\",\n            input,\n            inst,\n        });\n        return payload;\n    };\n});\nexport const $ZodNull = /*@__PURE__*/ core.$constructor(\"$ZodNull\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.pattern = regexes.null;\n    inst._zod.values = new Set([null]);\n    inst._zod.parse = (payload, _ctx) => {\n        const input = payload.value;\n        if (input === null)\n            return payload;\n        payload.issues.push({\n            expected: \"null\",\n            code: \"invalid_type\",\n            input,\n            inst,\n        });\n        return payload;\n    };\n});\nexport const $ZodAny = /*@__PURE__*/ core.$constructor(\"$ZodAny\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.parse = (payload) => payload;\n});\nexport const $ZodUnknown = /*@__PURE__*/ core.$constructor(\"$ZodUnknown\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.parse = (payload) => payload;\n});\nexport const $ZodNever = /*@__PURE__*/ core.$constructor(\"$ZodNever\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.parse = (payload, _ctx) => {\n        payload.issues.push({\n            expected: \"never\",\n            code: \"invalid_type\",\n            input: payload.value,\n            inst,\n        });\n        return payload;\n    };\n});\nexport const $ZodVoid = /*@__PURE__*/ core.$constructor(\"$ZodVoid\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.parse = (payload, _ctx) => {\n        const input = payload.value;\n        if (typeof input === \"undefined\")\n            return payload;\n        payload.issues.push({\n            expected: \"void\",\n            code: \"invalid_type\",\n            input,\n            inst,\n        });\n        return payload;\n    };\n});\nexport const $ZodDate = /*@__PURE__*/ core.$constructor(\"$ZodDate\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.parse = (payload, _ctx) => {\n        if (def.coerce) {\n            try {\n                payload.value = new Date(payload.value);\n            }\n            catch (_err) { }\n        }\n        const input = payload.value;\n        const isDate = input instanceof Date;\n        const isValidDate = isDate && !Number.isNaN(input.getTime());\n        if (isValidDate)\n            return payload;\n        payload.issues.push({\n            expected: \"date\",\n            code: \"invalid_type\",\n            input,\n            ...(isDate ? { received: \"Invalid Date\" } : {}),\n            inst,\n        });\n        return payload;\n    };\n});\nfunction handleArrayResult(result, final, index) {\n    if (result.issues.length) {\n        final.issues.push(...util.prefixIssues(index, result.issues));\n    }\n    final.value[index] = result.value;\n}\nexport const $ZodArray = /*@__PURE__*/ core.$constructor(\"$ZodArray\", (inst, def) => {\n    $ZodType.init(inst, def);\n    const memo = core.globalConfig.memoizer;\n    memo?.attach(inst);\n    inst._zod.parse = (payload, ctx) => {\n        const input = payload.value;\n        if (!Array.isArray(input)) {\n            payload.issues.push({\n                expected: \"array\",\n                code: \"invalid_type\",\n                input,\n                inst,\n            });\n            return payload;\n        }\n        payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);\n        const proms = [];\n        const abortEarly = ctx?.abortEarly;\n        for (let i = 0; i < input.length; i++) {\n            const item = input[i];\n            const result = def.element._zod.run({\n                value: item,\n                issues: [],\n            }, ctx);\n            if (result instanceof Promise) {\n                proms.push(result.then((result) => handleArrayResult(result, payload, i)));\n            }\n            else {\n                handleArrayResult(result, payload, i);\n                // the element's payload is authoritative here, since handleArrayResult forwards every issue; an object's is not, because it drops a failed absent optional\n                if (abortEarly && result.issues.length !== 0 && util.aborted(result))\n                    break;\n            }\n        }\n        if (proms.length) {\n            return Promise.all(proms).then(() => payload);\n        }\n        return payload; //handleArrayResultsAsync(parseResults, final);\n    };\n});\nfunction handlePropertyResult(result, final, key, input, optin, optout) {\n    const isPresent = key in input;\n    const isOptionalOut = optout === \"optional\";\n    // The middle rung means \"absence permitted, nothing supplied in its place\", so an absent key contributes nothing — whatever the schema made of `undefined` is invented, not substituted. Only `optional` reaches this with a value: `defaulted` substitutes, and a schema that isn't optional-out has to keep the key.\n    if (!isPresent && isOptionalOut && optin === \"optional\") {\n        return;\n    }\n    if (result.issues.length) {\n        // For optional-in/out schemas, ignore errors on absent keys.\n        if (optin !== undefined && isOptionalOut && !isPresent) {\n            return;\n        }\n        final.issues.push(...util.prefixIssues(key, result.issues));\n    }\n    if (!isPresent && optin === undefined) {\n        if (!result.issues.length) {\n            final.issues.push({\n                code: \"invalid_type\",\n                expected: \"nonoptional\",\n                input: undefined,\n                path: [key],\n            });\n        }\n        return;\n    }\n    if (result.value === undefined) {\n        if (isPresent || (optin === \"defaulted\" && !isOptionalOut)) {\n            final.value[key] = undefined;\n        }\n    }\n    else {\n        final.value[key] = result.value;\n    }\n}\n// one shared instance; a fresh [] per schema cost 56 bytes retained\nconst NO_SYMBOL_KEYS = [];\nfunction normalizeDef(def) {\n    const keys = Object.keys(def.shape);\n    const ownSymbols = Object.getOwnPropertySymbols(def.shape);\n    const symbolKeys = ownSymbols.length ? ownSymbols : NO_SYMBOL_KEYS;\n    // aliases `keys` when there are no symbols, so a string-only shape keeps one array\n    const allKeys = symbolKeys.length ? [...keys, ...symbolKeys] : keys;\n    for (const k of allKeys) {\n        if (!def.shape?.[k]?._zod?.traits?.has(\"$ZodType\")) {\n            throw new Error(`Invalid element at key \"${String(k)}\": expected a Zod schema`);\n        }\n    }\n    const okeys = util.optionalKeys(def.shape);\n    return {\n        ...def,\n        allKeys,\n        symbolKeys,\n        // string-only: handleCatchall matches it against `for...in`, which never yields a symbol\n        keySet: new Set(keys),\n        numKeys: keys.length,\n        optionalKeys: new Set(okeys),\n    };\n}\nfunction handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {\n    const unrecognized = [];\n    const keySet = def.keySet;\n    const _catchall = def.catchall._zod;\n    const t = _catchall.def.type;\n    const optin = _catchall.optin;\n    const optout = _catchall.optout;\n    // starts at 0, not the current length: the shape phase already ran and may have aborted\n    let seen = 0;\n    for (const key in input) {\n        if (abortEarly && payload.issues.length !== seen) {\n            if (util.aborted(payload, seen))\n                break;\n            seen = payload.issues.length;\n        }\n        // Must precede the __proto__ branch: a declared key is not unrecognized, even though the shape loop deliberately strips __proto__ from the parsed output.\n        if (keySet.has(key))\n            continue;\n        // Don't copy an undeclared __proto__ into the result; assignment to a plain {} would replace the result prototype. But in strict mode it is still an unknown key, so report it before skipping.\n        if (key === \"__proto__\") {\n            if (t === \"never\")\n                unrecognized.push(key);\n            continue;\n        }\n        if (t === \"never\") {\n            unrecognized.push(key);\n            continue;\n        }\n        const r = _catchall.run({ value: input[key], issues: [] }, ctx);\n        if (r instanceof Promise) {\n            proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));\n        }\n        else {\n            handlePropertyResult(r, payload, key, input, optin, optout);\n        }\n    }\n    if (unrecognized.length) {\n        payload.issues.push({\n            code: \"unrecognized_keys\",\n            keys: unrecognized,\n            input,\n            inst,\n            // Describes the shape of the input, not the validity of the parsed value, so it never aborts. The parse still fails; the schema's own checks just get to run first, and an enclosing intersection can reconcile the key against a sibling operand.\n            continue: true,\n        });\n    }\n    if (!proms.length)\n        return payload;\n    return Promise.all(proms).then(() => {\n        return payload;\n    });\n}\nexport const $ZodObject = /*@__PURE__*/ core.$constructor(\"$ZodObject\", (inst, def) => {\n    // requires cast because technically $ZodObject doesn't extend\n    $ZodType.init(inst, def);\n    const desc = Object.getOwnPropertyDescriptor(def, \"shape\");\n    // a cloned def carries its source's accessor, which knows the shape it answers from; adopting that keeps the clone's keys readable without running it\n    const sh = desc?.get ? desc.get.raw : (def.shape ?? {});\n    if (sh) {\n        // Freezes the shape on first read, so its getters resolve once and every later read sees the same schemas.\n        const get = () => {\n            const newSh = { ...sh };\n            Object.defineProperty(def, \"shape\", { value: newSh });\n            get.raw = newSh;\n            return newSh;\n        };\n        get.raw = sh;\n        Object.defineProperty(def, \"shape\", { get });\n    }\n    const _normalized = util.cached(() => normalizeDef(def));\n    util.defineLazyInternal(inst, \"propValues\", (zod) => {\n        const shape = zod.def.shape;\n        const propValues = {};\n        for (const key in shape) {\n            const field = shape[key]._zod;\n            if (field.values) {\n                if (!Object.prototype.hasOwnProperty.call(propValues, key)) {\n                    util.assignProp(propValues, key, new Set());\n                }\n                for (const v of field.values)\n                    propValues[key].add(v);\n                // An omittable slot reads back as undefined at a discriminator lookup, so it has to claim undefined: two options that can both omit the key are not discriminable on it.\n                if (field.optin !== undefined)\n                    propValues[key].add(undefined);\n            }\n        }\n        return propValues;\n    });\n    const isObject = util.isObject;\n    const catchall = def.catchall;\n    let value;\n    const memo = core.globalConfig.memoizer;\n    memo?.attach(inst);\n    inst._zod.parse = (payload, ctx) => {\n        value ?? (value = _normalized.value);\n        const input = payload.value;\n        if (!isObject(input)) {\n            payload.issues.push({\n                expected: \"object\",\n                code: \"invalid_type\",\n                input,\n                inst,\n            });\n            return payload;\n        }\n        payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};\n        const proms = [];\n        const shape = value.shape;\n        const abortEarly = ctx?.abortEarly;\n        let seen = payload.issues.length;\n        for (const key of value.allKeys) {\n            if (abortEarly && payload.issues.length !== seen) {\n                if (util.aborted(payload, seen))\n                    break;\n                seen = payload.issues.length;\n            }\n            if (key === \"__proto__\")\n                continue;\n            const el = shape[key];\n            const optin = el._zod.optin;\n            const optout = el._zod.optout;\n            const r = el._zod.run({ value: input[key], issues: [] }, ctx);\n            if (r instanceof Promise) {\n                proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));\n            }\n            else {\n                handlePropertyResult(r, payload, key, input, optin, optout);\n            }\n        }\n        if (!catchall) {\n            return proms.length ? Promise.all(proms).then(() => payload) : payload;\n        }\n        return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true);\n    };\n});\nexport const $ZodObjectJIT = /*@__PURE__*/ core.$constructor(\"$ZodObjectJIT\", (inst, def) => {\n    // requires cast because technically $ZodObject doesn't extend\n    $ZodObject.init(inst, def);\n    const superParse = inst._zod.parse;\n    const _normalized = util.cached(() => normalizeDef(def));\n    const memo = core.globalConfig.memoizer;\n    const generateFastpass = (shape) => {\n        const normalized = _normalized.value;\n        const syms = normalized.symbolKeys;\n        // a symbol has no source literal, so it is read as `syms[i]` off the closed-over scope\n        const doc = new Doc([\"payload\", \"ctx\"], { shape, inst, memo, syms });\n        const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;\n        // prefixes in place, like util.prefixIssues. newResult must land before the early return: a catchall runs after this and would otherwise write onto the caller's input\n        const prefixStr = (id, k) => `\n          let ${id}_ab = false;\n          for (let i = 0; i < ${id}.issues.length; i++) {\n            const iss = ${id}.issues[i];\n            iss.path = iss.path ? [${k}, ...iss.path] : [${k}];\n            payload.issues.push(iss);\n            if (iss.continue !== true) ${id}_ab = true;\n          }\n          if (${id}_ab && ctx && ctx.abortEarly) {\n            payload.value = newResult;\n            return payload;\n          }`;\n        doc.write(`const input = payload.value;`);\n        const ids = Object.create(null);\n        let counter = 0;\n        for (const key of normalized.allKeys) {\n            ids[key] = `key_${counter++}`;\n        }\n        // A: preserve key order {\n        doc.write(memo ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);\n        for (const key of normalized.allKeys) {\n            if (key === \"__proto__\")\n                continue;\n            const id = ids[key];\n            const k = typeof key === \"symbol\" ? `syms[${syms.indexOf(key)}]` : util.esc(key);\n            const isPresent = `${k} in input`;\n            const schema = shape[key];\n            const optin = schema?._zod?.optin;\n            const isOptionalIn = optin !== undefined;\n            const isOptionalOut = schema?._zod?.optout === \"optional\";\n            doc.write(`const ${id} = ${parseStr(k)};`);\n            if (isOptionalIn && isOptionalOut) {\n                // For optional-in/out schemas, ignore errors on absent keys — and, like the interpreted path, drop the value produced alongside them. The middle rung goes further: it permits absence without supplying anything in its place, so an absent key contributes nothing at all.\n                const assign = optin === \"optional\" ? `${id}_present` : `${id}.value !== undefined || ${id}_present`;\n                doc.write(`\n        const ${id}_present = ${isPresent};\n        if (!${id}.issues.length || ${id}_present) {\n          if (${id}.issues.length) {${prefixStr(id, k)}\n          }\n\n          if (${assign}) {\n            newResult[${k}] = ${id}.value;\n          }\n        }\n\n      `);\n            }\n            else if (!isOptionalIn) {\n                doc.write(`\n        const ${id}_present = ${isPresent};\n        if (${id}.issues.length) {${prefixStr(id, k)}\n        }\n        if (!${id}_present && !${id}.issues.length) {\n          payload.issues.push({\n            code: \"invalid_type\",\n            expected: \"nonoptional\",\n            input: undefined,\n            path: [${k}]\n          });\n          if (ctx && ctx.abortEarly) {\n            payload.value = newResult;\n            return payload;\n          }\n        }\n\n        if (${id}_present) {\n          newResult[${k}] = ${id}.value;\n        }\n\n      `);\n            }\n            else {\n                doc.write(`\n        if (${id}.issues.length) {${prefixStr(id, k)}\n        }\n      `);\n                if (optin === \"defaulted\") {\n                    doc.write(`newResult[${k}] = ${id}.value;`);\n                }\n                else {\n                    doc.write(`\n        if (${id}.value !== undefined || ${isPresent}) {\n          newResult[${k}] = ${id}.value;\n        }\n      `);\n                }\n            }\n        }\n        doc.write(`payload.value = newResult;`);\n        doc.write(`return payload;`);\n        // closing `shape` in is what pays: turbofan specializes the parser against that one shape object, so every `shape[k]._zod.run` folds to a known callee. as a parameter it stays a generic load and measures 13% slower even with the forwarding frame gone\n        return doc.compile();\n    };\n    let fastpass;\n    const isObject = util.isObject;\n    const jit = !core.globalConfig.jitless;\n    const allowsEval = util.allowsEval;\n    const fastEnabled = jit && allowsEval.value; // && !def.catchall;\n    const catchall = def.catchall;\n    let value;\n    inst._zod.parse = (payload, ctx) => {\n        value ?? (value = _normalized.value);\n        const input = payload.value;\n        if (!isObject(input)) {\n            payload.issues.push({\n                expected: \"object\",\n                code: \"invalid_type\",\n                input,\n                inst,\n            });\n            return payload;\n        }\n        if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {\n            // always synchronous\n            if (!fastpass)\n                fastpass = generateFastpass(def.shape);\n            payload = fastpass(payload, ctx);\n            if (!catchall)\n                return payload;\n            return handleCatchall([], input, payload, ctx, value, inst, ctx?.abortEarly === true);\n        }\n        return superParse(payload, ctx);\n    };\n});\nfunction handleUnionResults(results, final, inst, ctx) {\n    for (const result of results) {\n        if (result.issues.length === 0) {\n            final.value = result.value;\n            return final;\n        }\n    }\n    const nonaborted = results.filter((r) => !util.aborted(r));\n    if (nonaborted.length === 1) {\n        final.value = nonaborted[0].value;\n        return nonaborted[0];\n    }\n    final.issues.push({\n        code: \"invalid_union\",\n        input: final.value,\n        inst,\n        errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n    });\n    return final;\n}\nexport const $ZodUnion = /*@__PURE__*/ core.$constructor(\"$ZodUnion\", (inst, def) => {\n    $ZodType.init(inst, def);\n    util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.options.some((o) => o._zod.optin === \"defaulted\")\n        ? \"defaulted\"\n        : zod.def.options.some((o) => o._zod.optin !== undefined)\n            ? \"optional\"\n            : undefined);\n    util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.options.some((o) => o._zod.optout === \"optional\") ? \"optional\" : undefined);\n    util.defineLazyInternal(inst, \"values\", (zod) => {\n        if (zod.def.options.every((o) => o._zod.values)) {\n            return new Set(zod.def.options.flatMap((option) => Array.from(option._zod.values)));\n        }\n        return undefined;\n    });\n    util.defineLazyInternal(inst, \"pattern\", (zod) => {\n        if (zod.def.options.every((o) => o._zod.pattern)) {\n            const patterns = zod.def.options.map((o) => o._zod.pattern);\n            return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join(\"|\")})$`);\n        }\n        return undefined;\n    });\n    const first = def.options.length === 1 ? def.options[0]._zod.run : null;\n    inst._zod.parse = (payload, ctx) => {\n        if (first) {\n            return first(payload, ctx);\n        }\n        let async = false;\n        const results = [];\n        for (const option of def.options) {\n            const result = option._zod.run({\n                value: payload.value,\n                issues: [],\n            }, ctx);\n            if (result instanceof Promise) {\n                results.push(result);\n                async = true;\n            }\n            else {\n                if (result.issues.length === 0)\n                    return result;\n                results.push(result);\n            }\n        }\n        if (!async)\n            return handleUnionResults(results, payload, inst, ctx);\n        return Promise.all(results).then((results) => {\n            return handleUnionResults(results, payload, inst, ctx);\n        });\n    };\n});\nfunction handleExclusiveUnionResults(results, final, inst, ctx) {\n    const matches = [];\n    for (let i = 0; i < results.length; i++) {\n        if (results[i].issues.length === 0)\n            matches.push(i);\n    }\n    if (matches.length === 1) {\n        final.value = results[matches[0]].value;\n        return final;\n    }\n    if (matches.length === 0) {\n        // No matches - same as regular union\n        final.issues.push({\n            code: \"invalid_union\",\n            input: final.value,\n            inst,\n            errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),\n        });\n    }\n    else {\n        // Multiple matches - exclusive union failure\n        final.issues.push({\n            code: \"invalid_union\",\n            input: final.value,\n            inst,\n            errors: [],\n            inclusive: false,\n            matches,\n        });\n    }\n    return final;\n}\nexport const $ZodXor = /*@__PURE__*/ core.$constructor(\"$ZodXor\", (inst, def) => {\n    $ZodUnion.init(inst, def);\n    def.inclusive = false;\n    const first = def.options.length === 1 ? def.options[0]._zod.run : null;\n    inst._zod.parse = (payload, ctx) => {\n        if (first) {\n            return first(payload, ctx);\n        }\n        let async = false;\n        const results = [];\n        for (const option of def.options) {\n            const result = option._zod.run({\n                value: payload.value,\n                issues: [],\n            }, ctx);\n            if (result instanceof Promise) {\n                results.push(result);\n                async = true;\n            }\n            else {\n                results.push(result);\n            }\n        }\n        if (!async)\n            return handleExclusiveUnionResults(results, payload, inst, ctx);\n        return Promise.all(results).then((results) => {\n            return handleExclusiveUnionResults(results, payload, inst, ctx);\n        });\n    };\n});\n/** Returns the option whose discriminator claims `value`, or throws if ambiguous. */\nexport function getDiscriminatedOption(union, value) {\n    const internals = union._zod;\n    let map = internals.bag.optionsMap;\n    if (!map) {\n        map = discriminatorMap(internals.def);\n        internals.bag.optionsMap = map;\n    }\n    const option = map.get(value);\n    if (option === null)\n        throw new Error(`Ambiguous discriminator value \"${String(value)}\"`);\n    return option;\n}\nfunction discriminatorMap(def) {\n    const map = new Map();\n    for (const option of def.options) {\n        const values = option._zod.propValues?.[def.discriminator];\n        if (!values || values.size === 0)\n            throw new Error(`Invalid discriminated union option at index \"${def.options.indexOf(option)}\"`);\n        for (const value of values) {\n            if (map.has(value)) {\n                if (value !== undefined)\n                    throw new Error(`Duplicate discriminator value \"${String(value)}\"`);\n                // keep the collision marked so a later member cannot reclaim it\n                map.set(value, null);\n            }\n            else {\n                map.set(value, option);\n            }\n        }\n    }\n    return map;\n}\nexport const $ZodDiscriminatedUnion = \n/*@__PURE__*/\ncore.$constructor(\"$ZodDiscriminatedUnion\", (inst, def) => {\n    def.inclusive = false;\n    $ZodUnion.init(inst, def);\n    const _super = inst._zod.parse;\n    util.defineLazyInternal(inst, \"propValues\", (zod) => {\n        const propValues = {};\n        let undefinedCount = 0;\n        for (const option of zod.def.options) {\n            const pv = option._zod.propValues;\n            if (!pv || Object.keys(pv).length === 0)\n                throw new Error(`Invalid discriminated union option at index \"${zod.def.options.indexOf(option)}\"`);\n            if (pv[zod.def.discriminator]?.has(undefined))\n                undefinedCount++;\n            for (const [k, v] of Object.entries(pv)) {\n                if (!Object.prototype.hasOwnProperty.call(propValues, k)) {\n                    util.assignProp(propValues, k, new Set());\n                }\n                for (const val of v) {\n                    propValues[k].add(val);\n                }\n            }\n        }\n        if (!zod.def.unionFallback && undefinedCount > 1)\n            propValues[zod.def.discriminator]?.delete(undefined);\n        return propValues;\n    });\n    // Checked now rather than in the lookup map below, so an option that lacks the discriminator fails at the `discriminatedUnion` call instead of on the first object parsed. Options whose shape cannot be enumerated without resolving it — pipes and lazies — are left to the map.\n    def.options.forEach((option, i) => {\n        const propShape = util.rawShape(option._zod.def);\n        if (propShape && !Object.prototype.hasOwnProperty.call(propShape, def.discriminator)) {\n            throw new Error(`Invalid discriminated union option at index \"${i}\"`);\n        }\n    });\n    const disc = util.cached(() => discriminatorMap(def));\n    inst._zod.parse = (payload, ctx) => {\n        const input = payload.value;\n        if (!util.isObject(input)) {\n            payload.issues.push({\n                code: \"invalid_type\",\n                expected: \"object\",\n                input,\n                inst,\n            });\n            return payload;\n        }\n        const value = input?.[def.discriminator];\n        const opt = disc.value.get(value);\n        // forward metadata cannot choose an encoder for an absent tag\n        if (opt && (value !== undefined || ctx.direction !== \"backward\")) {\n            return opt._zod.run(payload, ctx);\n        }\n        // Fall back to union matching when the fast discriminator path fails:\n        // - explicitly enabled via unionFallback, or\n        // - during backward direction (encode), since codec-based discriminators have different values in forward vs backward directions\n        if (def.unionFallback || ctx.direction === \"backward\") {\n            return _super(payload, ctx);\n        }\n        // no matching discriminator\n        payload.issues.push({\n            code: \"invalid_union\",\n            errors: [],\n            note: \"No matching discriminator\",\n            discriminator: def.discriminator,\n            options: Array.from(disc.value.keys()).filter((value) => disc.value.get(value) !== null),\n            input,\n            path: [def.discriminator],\n            inst,\n        });\n        return payload;\n    };\n});\nexport const $ZodIntersection = /*@__PURE__*/ core.$constructor(\"$ZodIntersection\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.parse = (payload, ctx) => {\n        const input = payload.value;\n        const left = def.left._zod.run({ value: input, issues: [] }, ctx);\n        const right = def.right._zod.run({ value: input, issues: [] }, ctx);\n        const async = left instanceof Promise || right instanceof Promise;\n        if (async) {\n            return Promise.all([left, right]).then(([left, right]) => {\n                return handleIntersectionResults(payload, left, right);\n            });\n        }\n        return handleIntersectionResults(payload, left, right);\n    };\n});\nexport function mergeValues(a, b) {\n    // const aType = parse.t(a);\n    // const bType = parse.t(b);\n    if (a === b) {\n        return { valid: true, data: a };\n    }\n    if (a instanceof Date && b instanceof Date && +a === +b) {\n        return { valid: true, data: a };\n    }\n    if (util.isPlainObject(a) && util.isPlainObject(b)) {\n        const bKeys = Object.keys(b);\n        const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);\n        const newObj = { ...a, ...b };\n        if (Object.prototype.hasOwnProperty.call(newObj, \"__proto__\"))\n            delete newObj.__proto__;\n        for (const key of sharedKeys) {\n            if (key === \"__proto__\")\n                continue;\n            const sharedValue = mergeValues(a[key], b[key]);\n            if (!sharedValue.valid) {\n                return {\n                    valid: false,\n                    mergeErrorPath: [key, ...sharedValue.mergeErrorPath],\n                };\n            }\n            newObj[key] = sharedValue.data;\n        }\n        return { valid: true, data: newObj };\n    }\n    if (Array.isArray(a) && Array.isArray(b)) {\n        if (a.length !== b.length) {\n            return { valid: false, mergeErrorPath: [] };\n        }\n        const newArray = [];\n        for (let index = 0; index < a.length; index++) {\n            const itemA = a[index];\n            const itemB = b[index];\n            const sharedValue = mergeValues(itemA, itemB);\n            if (!sharedValue.valid) {\n                return {\n                    valid: false,\n                    mergeErrorPath: [index, ...sharedValue.mergeErrorPath],\n                };\n            }\n            newArray.push(sharedValue.data);\n        }\n        return { valid: true, data: newArray };\n    }\n    return { valid: false, mergeErrorPath: [] };\n}\nfunction handleIntersectionResults(result, left, right) {\n    // Track which side(s) reject each key. A key rejection is reported only when BOTH sides reject it, so a key owned by one branch survives the other's key schema. strictObject reports these as unrecognized_keys; a record with an open key schema reports one invalid_key per key.\n    const unrecKeys = new Map();\n    let unrecIssue;\n    const keyIssues = new Map();\n    const collect = (iss, side) => {\n        let keys;\n        if (iss.code === \"unrecognized_keys\" && !iss.path?.length) {\n            unrecIssue ?? (unrecIssue = iss);\n            keys = iss.keys;\n        }\n        else if (iss.code === \"invalid_key\" && iss.origin === \"record\" && iss.path?.length === 1) {\n            const k = String(iss.path[0]);\n            if (!keyIssues.has(k))\n                keyIssues.set(k, iss);\n            keys = [k];\n        }\n        else {\n            return false;\n        }\n        for (const k of keys) {\n            if (!unrecKeys.has(k))\n                unrecKeys.set(k, {});\n            unrecKeys.get(k)[side] = true;\n        }\n        return true;\n    };\n    for (const iss of left.issues) {\n        if (!collect(iss, \"l\"))\n            result.issues.push(iss);\n    }\n    for (const iss of right.issues) {\n        if (!collect(iss, \"r\"))\n            result.issues.push(iss);\n    }\n    // Report only keys rejected by BOTH sides\n    const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);\n    if (bothKeys.length) {\n        const aggregated = unrecIssue ? bothKeys.filter((k) => unrecIssue.keys.includes(k)) : [];\n        if (aggregated.length)\n            result.issues.push({ ...unrecIssue, keys: aggregated });\n        for (const k of bothKeys) {\n            if (!aggregated.includes(k) && keyIssues.has(k))\n                result.issues.push(keyIssues.get(k));\n        }\n    }\n    const merged = mergeValues(left.value, right.value);\n    if (!merged.valid) {\n        if (util.aborted(result))\n            return result;\n        throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);\n    }\n    result.value = merged.data;\n    return result;\n}\nexport const $ZodTuple = /*@__PURE__*/ core.$constructor(\"$ZodTuple\", (inst, def) => {\n    $ZodType.init(inst, def);\n    const items = def.items;\n    const memo = core.globalConfig.memoizer;\n    memo?.attach(inst);\n    inst._zod.parse = (payload, ctx) => {\n        const input = payload.value;\n        if (!Array.isArray(input)) {\n            payload.issues.push({\n                input,\n                inst,\n                expected: \"tuple\",\n                code: \"invalid_type\",\n            });\n            return payload;\n        }\n        payload.value = memo ? memo.alloc(inst, payload, [], ctx) : [];\n        const proms = [];\n        const optinStart = getTupleOptStart(items, \"optin\");\n        const optoutStart = getTupleOptStart(items, \"optout\");\n        if (!def.rest) {\n            if (input.length < optinStart) {\n                payload.issues.push({\n                    code: \"too_small\",\n                    minimum: optinStart,\n                    inclusive: true,\n                    input,\n                    inst,\n                    origin: \"array\",\n                });\n                return payload;\n            }\n            if (input.length > items.length) {\n                payload.issues.push({\n                    code: \"too_big\",\n                    maximum: items.length,\n                    inclusive: true,\n                    input,\n                    inst,\n                    origin: \"array\",\n                });\n            }\n        }\n        // Run every item in parallel, collecting results into an indexed array. The post-processing in `handleTupleResults` walks them in order so it can decide whether an absent optional-output error can truncate the tail or must be reported to preserve required output.\n        const itemResults = new Array(items.length);\n        // only tracked when there is a rest loop to skip\n        const abortEarly = def.rest ? ctx?.abortEarly : undefined;\n        let itemAborted = false;\n        for (let i = 0; i < items.length; i++) {\n            const r = items[i]._zod.run({ value: input[i], issues: [] }, ctx);\n            if (r instanceof Promise) {\n                proms.push(r.then((rr) => {\n                    itemResults[i] = rr;\n                }));\n            }\n            else {\n                itemResults[i] = r;\n                if (abortEarly && !itemAborted && r.issues.length)\n                    itemAborted = util.aborted(r);\n            }\n        }\n        // sound because rest is non-empty exactly when every fixed index is present, the one case handleTupleResults cannot discard an item's issues\n        if (def.rest && !itemAborted) {\n            let i = items.length - 1;\n            const rest = input.slice(items.length);\n            let seen = payload.issues.length;\n            for (const el of rest) {\n                if (abortEarly && payload.issues.length !== seen) {\n                    if (util.aborted(payload, seen))\n                        break;\n                    seen = payload.issues.length;\n                }\n                i++;\n                const result = def.rest._zod.run({ value: el, issues: [] }, ctx);\n                if (result instanceof Promise) {\n                    proms.push(result.then((r) => handleTupleResult(r, payload, i)));\n                }\n                else {\n                    handleTupleResult(result, payload, i);\n                }\n            }\n        }\n        if (proms.length) {\n            return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));\n        }\n        return handleTupleResults(itemResults, payload, items, input, optoutStart);\n    };\n});\nfunction getTupleOptStart(items, key) {\n    for (let i = items.length - 1; i >= 0; i--) {\n        // optin is a three-rung ladder so any rung above `undefined` permits an absent slot; optout stays two-valued.\n        const omittable = key === \"optin\" ? items[i]._zod.optin !== undefined : items[i]._zod.optout === \"optional\";\n        if (!omittable)\n            return i + 1;\n    }\n    return 0;\n}\nfunction handleTupleResult(result, final, index) {\n    if (result.issues.length) {\n        final.issues.push(...util.prefixIssues(index, result.issues));\n    }\n    final.value[index] = result.value;\n}\nfunction handleTupleResults(itemResults, final, items, input, optoutStart) {\n    // Walk results in order. Mirror $ZodObject's swallow-on-absent-optional rule, but only after `optoutStart`: the first index where the output tuple tail can be absent.\n    for (let i = 0; i < items.length; i++) {\n        const r = itemResults[i];\n        const isPresent = i < input.length;\n        // The array analog of `handlePropertyResult`'s absent-key early return: the middle rung permits absence without supplying anything in its place, so the tail truncates here instead of materializing whatever the item made of `undefined`.\n        if (!isPresent && i >= optoutStart && items[i]._zod.optin === \"optional\") {\n            final.value.length = i;\n            break;\n        }\n        if (r.issues.length) {\n            if (!isPresent && i >= optoutStart) {\n                final.value.length = i;\n                break;\n            }\n            final.issues.push(...util.prefixIssues(i, r.issues));\n        }\n        final.value[i] = r.value;\n    }\n    // Drop trailing slots that produced `undefined` for absent input\n    // (the array analog of an absent optional key on an object). The\n    // `i >= input.length` floor is critical: an explicit `undefined`\n    // *inside* the input must be preserved even when the schema is\n    // optional-out (e.g. `z.string().or(z.undefined())` accepting an\n    // explicit undefined value).\n    for (let i = final.value.length - 1; i >= input.length; i--) {\n        if (items[i]._zod.optout === \"optional\" && final.value[i] === undefined) {\n            final.value.length = i;\n        }\n        else {\n            break;\n        }\n    }\n    return final;\n}\nexport const $ZodRecord = /*@__PURE__*/ core.$constructor(\"$ZodRecord\", (inst, def) => {\n    $ZodType.init(inst, def);\n    const memo = core.globalConfig.memoizer;\n    memo?.attach(inst);\n    inst._zod.parse = (payload, ctx) => {\n        const input = payload.value;\n        if (!util.isPlainObject(input)) {\n            payload.issues.push({\n                expected: \"record\",\n                code: \"invalid_type\",\n                input,\n                inst,\n            });\n            return payload;\n        }\n        // no guard in either loop below: a record's invalid_key aborts but an enclosing intersection can reconcile it, so a stopped loop hides keys the sibling does not own and the intersection then rejects nothing\n        const proms = [];\n        const values = def.keyType._zod.values;\n        if (values && !def.partial) {\n            payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};\n            const recordKeys = new Set();\n            for (const key of values) {\n                if (typeof key === \"string\" || typeof key === \"number\" || typeof key === \"symbol\") {\n                    recordKeys.add(typeof key === \"number\" ? key.toString() : key);\n                    // A declared __proto__ is stripped but is not an unrecognized key.\n                    if (key === \"__proto__\")\n                        continue;\n                    const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n                    if (keyResult instanceof Promise) {\n                        throw new Error(\"Async schemas not supported in object keys currently\");\n                    }\n                    if (keyResult.issues.length) {\n                        payload.issues.push({\n                            code: \"invalid_key\",\n                            origin: \"record\",\n                            issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n                            input: key,\n                            path: [key],\n                            inst,\n                        });\n                        continue;\n                    }\n                    const outKey = keyResult.value;\n                    if (outKey === \"__proto__\")\n                        continue;\n                    const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n                    if (result instanceof Promise) {\n                        proms.push(result.then((result) => {\n                            if (result.issues.length) {\n                                payload.issues.push(...util.prefixIssues(key, result.issues));\n                            }\n                            payload.value[outKey] = result.value;\n                        }));\n                    }\n                    else {\n                        if (result.issues.length) {\n                            payload.issues.push(...util.prefixIssues(key, result.issues));\n                        }\n                        payload.value[outKey] = result.value;\n                    }\n                }\n            }\n            let unrecognized;\n            for (const key in input) {\n                if (!recordKeys.has(key)) {\n                    if (def.mode === \"loose\") {\n                        // skip __proto__ so it can't replace the result prototype via the assignment setter on the plain {} we build into\n                        if (key === \"__proto__\")\n                            continue;\n                        payload.value[key] = input[key];\n                    }\n                    else {\n                        unrecognized = unrecognized ?? [];\n                        unrecognized.push(key);\n                    }\n                }\n            }\n            if (unrecognized && unrecognized.length > 0) {\n                payload.issues.push({\n                    code: \"unrecognized_keys\",\n                    input,\n                    inst,\n                    keys: unrecognized,\n                    continue: true,\n                });\n            }\n        }\n        else {\n            payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};\n            // An enumerable key schema declares which keys the record owns, so a key outside the set is unrecognized. A non-enumerable one (regex, refine) is a constraint every key must satisfy, so a failing key is invalid. Only the former is reconcilable against the other side of an intersection.\n            let unrecognized;\n            // Reflect.ownKeys for Symbol-key support; filter non-enumerable to match z.object()\n            for (const key of Reflect.ownKeys(input)) {\n                if (key === \"__proto__\")\n                    continue;\n                if (!Object.prototype.propertyIsEnumerable.call(input, key))\n                    continue;\n                let keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n                if (keyResult instanceof Promise) {\n                    throw new Error(\"Async schemas not supported in object keys currently\");\n                }\n                // Numeric string fallback: if key is a numeric string and failed, retry with Number(key). This handles z.number(), z.literal([1, 2, 3]), and unions containing numeric literals\n                const checkNumericKey = typeof key === \"string\" && regexes.number.test(key) && keyResult.issues.length;\n                if (checkNumericKey) {\n                    const retryResult = def.keyType._zod.run({ value: Number(key), issues: [] }, ctx);\n                    if (retryResult instanceof Promise) {\n                        throw new Error(\"Async schemas not supported in object keys currently\");\n                    }\n                    if (retryResult.issues.length === 0) {\n                        keyResult = retryResult;\n                    }\n                }\n                if (keyResult.issues.length) {\n                    if (def.mode === \"loose\") {\n                        // Pass through unchanged\n                        payload.value[key] = input[key];\n                    }\n                    else if (values) {\n                        unrecognized = unrecognized ?? [];\n                        unrecognized.push(key);\n                    }\n                    else {\n                        // Default \"strict\" behavior: error on invalid key\n                        payload.issues.push({\n                            code: \"invalid_key\",\n                            origin: \"record\",\n                            issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n                            input: key,\n                            path: [key],\n                            inst,\n                        });\n                    }\n                    continue;\n                }\n                // the guard above tests the raw input key, but the key schema can normalize an ordinary key into __proto__; re-check the key we actually write under\n                const outKey = keyResult.value;\n                if (outKey === \"__proto__\")\n                    continue;\n                const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);\n                if (result instanceof Promise) {\n                    proms.push(result.then((result) => {\n                        if (result.issues.length) {\n                            payload.issues.push(...util.prefixIssues(key, result.issues));\n                        }\n                        payload.value[outKey] = result.value;\n                    }));\n                }\n                else {\n                    if (result.issues.length) {\n                        payload.issues.push(...util.prefixIssues(key, result.issues));\n                    }\n                    payload.value[outKey] = result.value;\n                }\n            }\n            if (unrecognized && unrecognized.length > 0) {\n                payload.issues.push({\n                    code: \"unrecognized_keys\",\n                    input,\n                    inst,\n                    keys: unrecognized,\n                    continue: true,\n                });\n            }\n        }\n        if (proms.length) {\n            return Promise.all(proms).then(() => payload);\n        }\n        return payload;\n    };\n});\nexport const $ZodMap = /*@__PURE__*/ core.$constructor(\"$ZodMap\", (inst, def) => {\n    $ZodType.init(inst, def);\n    const memo = core.globalConfig.memoizer;\n    memo?.attach(inst);\n    inst._zod.parse = (payload, ctx) => {\n        const input = payload.value;\n        if (!(input instanceof Map)) {\n            payload.issues.push({\n                expected: \"map\",\n                code: \"invalid_type\",\n                input,\n                inst,\n            });\n            return payload;\n        }\n        const proms = [];\n        payload.value = memo ? memo.alloc(inst, payload, new Map(), ctx) : new Map();\n        const abortEarly = ctx?.abortEarly;\n        let seen = payload.issues.length;\n        for (const [key, value] of input) {\n            if (abortEarly && payload.issues.length !== seen) {\n                if (util.aborted(payload, seen))\n                    break;\n                seen = payload.issues.length;\n            }\n            const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);\n            const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);\n            if (keyResult instanceof Promise || valueResult instanceof Promise) {\n                proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {\n                    handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n                }));\n            }\n            else {\n                handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);\n            }\n        }\n        if (proms.length)\n            return Promise.all(proms).then(() => payload);\n        return payload;\n    };\n});\nfunction handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {\n    if (keyResult.issues.length) {\n        if (util.propertyKeyTypes.has(typeof key)) {\n            final.issues.push(...util.prefixIssues(key, keyResult.issues));\n        }\n        else {\n            final.issues.push({\n                code: \"invalid_key\",\n                origin: \"map\",\n                input,\n                inst,\n                issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n            });\n        }\n    }\n    if (valueResult.issues.length) {\n        if (util.propertyKeyTypes.has(typeof key)) {\n            final.issues.push(...util.prefixIssues(key, valueResult.issues));\n        }\n        else {\n            final.issues.push({\n                origin: \"map\",\n                code: \"invalid_element\",\n                input,\n                inst,\n                key: key,\n                issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n            });\n        }\n    }\n    final.value.set(keyResult.value, valueResult.value);\n}\nexport const $ZodSet = /*@__PURE__*/ core.$constructor(\"$ZodSet\", (inst, def) => {\n    $ZodType.init(inst, def);\n    const memo = core.globalConfig.memoizer;\n    memo?.attach(inst);\n    inst._zod.parse = (payload, ctx) => {\n        const input = payload.value;\n        if (!(input instanceof Set)) {\n            payload.issues.push({\n                input,\n                inst,\n                expected: \"set\",\n                code: \"invalid_type\",\n            });\n            return payload;\n        }\n        const proms = [];\n        payload.value = memo ? memo.alloc(inst, payload, new Set(), ctx) : new Set();\n        const abortEarly = ctx?.abortEarly;\n        let seen = payload.issues.length;\n        for (const item of input) {\n            if (abortEarly && payload.issues.length !== seen) {\n                if (util.aborted(payload, seen))\n                    break;\n                seen = payload.issues.length;\n            }\n            const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);\n            if (result instanceof Promise) {\n                proms.push(result.then((result) => handleSetResult(result, payload)));\n            }\n            else\n                handleSetResult(result, payload);\n        }\n        if (proms.length)\n            return Promise.all(proms).then(() => payload);\n        return payload;\n    };\n});\nfunction handleSetResult(result, final) {\n    if (result.issues.length) {\n        final.issues.push(...result.issues);\n    }\n    final.value.add(result.value);\n}\nexport const $ZodEnum = /*@__PURE__*/ core.$constructor(\"$ZodEnum\", (inst, def) => {\n    $ZodType.init(inst, def);\n    const values = util.getEnumValues(def.entries);\n    const valuesSet = new Set(values);\n    inst._zod.values = valuesSet;\n    util.defineLazyInternal(inst, \"pattern\", (zod) => {\n        const patternValues = util.getEnumValues(zod.def.entries).filter((k) => util.propertyKeyTypes.has(typeof k));\n        // unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches \"\"\n        return new RegExp(patternValues.length ? `^(${patternValues.map((o) => util.escapeRegex(o.toString())).join(\"|\")})$` : \"^[^\\\\s\\\\S]$\");\n    });\n    inst._zod.parse = (payload, _ctx) => {\n        const input = payload.value;\n        if (valuesSet.has(input)) {\n            return payload;\n        }\n        payload.issues.push({\n            code: \"invalid_value\",\n            values,\n            input,\n            inst,\n        });\n        return payload;\n    };\n});\nexport const $ZodLiteral = /*@__PURE__*/ core.$constructor(\"$ZodLiteral\", (inst, def) => {\n    $ZodType.init(inst, def);\n    const values = new Set(def.values);\n    inst._zod.values = values;\n    util.defineLazyInternal(inst, \"pattern\", (zod) => {\n        const vals = zod.def.values;\n        // unmatchable fallback, RE2-safe: an empty alternation would compile to /^()$/, which matches \"\"\n        return new RegExp(vals.length\n            ? `^(${vals\n                .map((o) => typeof o === \"string\" ? util.escapeRegex(o) : o ? util.escapeRegex(o.toString()) : String(o))\n                .join(\"|\")})$`\n            : \"^[^\\\\s\\\\S]$\");\n    });\n    inst._zod.parse = (payload, _ctx) => {\n        const input = payload.value;\n        if (values.has(input)) {\n            return payload;\n        }\n        payload.issues.push({\n            code: \"invalid_value\",\n            values: def.values,\n            input,\n            inst,\n        });\n        return payload;\n    };\n});\nexport const $ZodFile = /*@__PURE__*/ core.$constructor(\"$ZodFile\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.parse = (payload, _ctx) => {\n        const input = payload.value;\n        // @ts-ignore\n        if (input instanceof File)\n            return payload;\n        payload.issues.push({\n            expected: \"file\",\n            code: \"invalid_type\",\n            input,\n            inst,\n        });\n        return payload;\n    };\n});\nexport const $ZodTransform = /*@__PURE__*/ core.$constructor(\"$ZodTransform\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.optin = \"optional\";\n    core.globalConfig.memoizer?.guard(inst);\n    inst._zod.parse = (payload, ctx) => {\n        if (ctx.direction === \"backward\") {\n            throw new core.$ZodEncodeError(inst.constructor.name);\n        }\n        const _out = def.transform(payload.value, payload);\n        if (ctx.async) {\n            const output = _out instanceof Promise ? _out : Promise.resolve(_out);\n            return output.then((output) => {\n                payload.value = output;\n                return payload;\n            });\n        }\n        if (_out instanceof Promise) {\n            throw new core.$ZodAsyncError();\n        }\n        payload.value = _out;\n        return payload;\n    };\n});\nfunction handleOptionalResult(payload, result) {\n    // A substituting schema that still failed has no usable answer; yield undefined. Its issues are simply dropped: it ran on a payload of its own, so there is no shared array to truncate and nothing of the caller's to lose with it.\n    payload.value = result.issues.length ? undefined : result.value;\n    return payload;\n}\nexport const $ZodOptional = /*@__PURE__*/ core.$constructor(\"$ZodOptional\", (inst, def) => {\n    $ZodType.init(inst, def);\n    // .optional() propagates absence rather than substituting for it, so a defaulted inner keeps its rung.\n    util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType._zod.optin === \"defaulted\" ? \"defaulted\" : \"optional\");\n    inst._zod.optout = \"optional\";\n    util.defineLazyInternal(inst, \"values\", (zod) => {\n        const values = zod.def.innerType._zod.values;\n        return values ? new Set([...values, undefined]) : undefined;\n    });\n    util.defineLazyInternal(inst, \"pattern\", (zod) => {\n        const pattern = zod.def.innerType._zod.pattern;\n        return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;\n    });\n    inst._zod.parse = (payload, ctx) => {\n        if (payload.value === undefined) {\n            // Only the top rung substitutes a value for absence; everything else leaves it intact, which is what .optional() means.\n            if (def.innerType._zod.optin !== \"defaulted\")\n                return payload;\n            // Its own payload, for the same reason $ZodCatch gets one: a pipe forwards an unrecognized key through the caller's issues array, and this must not read that as the substituting schema failing and drop it.\n            const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);\n            if (result instanceof Promise)\n                return result.then((result) => handleOptionalResult(payload, result));\n            return handleOptionalResult(payload, result);\n        }\n        return def.innerType._zod.run(payload, ctx);\n    };\n});\nexport const $ZodExactOptional = /*@__PURE__*/ core.$constructor(\"$ZodExactOptional\", (inst, def) => {\n    // Call parent init - inherits optin/optout = \"optional\"\n    $ZodOptional.init(inst, def);\n    // Override values/pattern to NOT add undefined\n    util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n    util.defineLazyInternal(inst, \"pattern\", (zod) => zod.def.innerType._zod.pattern);\n    // Override parse to just delegate (no undefined handling)\n    inst._zod.parse = (payload, ctx) => {\n        return def.innerType._zod.run(payload, ctx);\n    };\n});\nexport const $ZodNullable = /*@__PURE__*/ core.$constructor(\"$ZodNullable\", (inst, def) => {\n    $ZodType.init(inst, def);\n    util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType._zod.optin);\n    util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.innerType._zod.optout);\n    util.defineLazyInternal(inst, \"pattern\", (zod) => {\n        const pattern = zod.def.innerType._zod.pattern;\n        return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;\n    });\n    util.defineLazyInternal(inst, \"values\", (zod) => {\n        return zod.def.innerType._zod.values ? new Set([...zod.def.innerType._zod.values, null]) : undefined;\n    });\n    inst._zod.parse = (payload, ctx) => {\n        // Forward direction (decode): allow null to pass through\n        if (payload.value === null)\n            return payload;\n        return def.innerType._zod.run(payload, ctx);\n    };\n});\nexport const $ZodDefault = /*@__PURE__*/ core.$constructor(\"$ZodDefault\", (inst, def) => {\n    $ZodType.init(inst, def);\n    // inst._zod.qin = \"true\";\n    inst._zod.optin = \"defaulted\";\n    util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n    inst._zod.parse = (payload, ctx) => {\n        if (ctx.direction === \"backward\") {\n            return def.innerType._zod.run(payload, ctx);\n        }\n        // Forward direction (decode): apply defaults for undefined input\n        if (payload.value === undefined) {\n            payload.value = def.defaultValue;\n            /**\n             * $ZodDefault returns the default value immediately in forward direction.\n             * It doesn't pass the default value into the validator (\"prefault\"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a \"prefault\" for the pipe.   */\n            return payload;\n        }\n        // Forward direction: continue with default handling\n        const result = def.innerType._zod.run(payload, ctx);\n        if (result instanceof Promise) {\n            return result.then((result) => handleDefaultResult(result, def));\n        }\n        return handleDefaultResult(result, def);\n    };\n});\nfunction handleDefaultResult(payload, def) {\n    if (payload.value === undefined) {\n        payload.value = def.defaultValue;\n    }\n    return payload;\n}\nexport const $ZodPrefault = /*@__PURE__*/ core.$constructor(\"$ZodPrefault\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.optin = \"defaulted\";\n    util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n    inst._zod.parse = (payload, ctx) => {\n        if (ctx.direction === \"backward\") {\n            return def.innerType._zod.run(payload, ctx);\n        }\n        // Forward direction (decode): apply prefault for undefined input\n        if (payload.value === undefined) {\n            payload.value = def.defaultValue;\n        }\n        return def.innerType._zod.run(payload, ctx);\n    };\n});\nexport const $ZodNonOptional = /*@__PURE__*/ core.$constructor(\"$ZodNonOptional\", (inst, def) => {\n    $ZodType.init(inst, def);\n    util.defineLazyInternal(inst, \"values\", (zod) => {\n        const v = zod.def.innerType._zod.values;\n        return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;\n    });\n    inst._zod.parse = (payload, ctx) => {\n        const result = def.innerType._zod.run(payload, ctx);\n        if (result instanceof Promise) {\n            return result.then((result) => handleNonOptionalResult(result, inst));\n        }\n        return handleNonOptionalResult(result, inst);\n    };\n});\nfunction handleNonOptionalResult(payload, inst) {\n    if (!payload.issues.length && payload.value === undefined) {\n        payload.issues.push({\n            code: \"invalid_type\",\n            expected: \"nonoptional\",\n            input: payload.value,\n            inst,\n        });\n    }\n    return payload;\n}\nexport const $ZodSuccess = /*@__PURE__*/ core.$constructor(\"$ZodSuccess\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.parse = (payload, ctx) => {\n        if (ctx.direction === \"backward\") {\n            throw new core.$ZodEncodeError(\"ZodSuccess\");\n        }\n        const result = def.innerType._zod.run(payload, ctx);\n        if (result instanceof Promise) {\n            return result.then((result) => {\n                payload.value = result.issues.length === 0;\n                return payload;\n            });\n        }\n        payload.value = result.issues.length === 0;\n        return payload;\n    };\n});\nfunction handleCatchResult(payload, result, def, ctx) {\n    if (!result.issues.length) {\n        payload.value = result.value;\n        // The value carries up, so the flag describing it has to carry with it: a back-edge into a node still being parsed must not be frozen by an enclosing readonly, and its checks belong to the node itself. Guarded so the ordinary case adds no own property.\n        if (result.memo)\n            payload.memo = true;\n        return payload;\n    }\n    // Spread the inner's own payload, not ours: `value` has to stay the input the catch was handed, and the inner ran on a payload of its own so its issues are already private to this call.\n    payload.value = def.catchValue({\n        ...result,\n        value: payload.value,\n        error: {\n            issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),\n        },\n        input: payload.value,\n    });\n    return payload;\n}\nexport const $ZodCatch = /*@__PURE__*/ core.$constructor(\"$ZodCatch\", (inst, def) => {\n    $ZodType.init(inst, def);\n    util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType._zod.optin === \"defaulted\" ? \"defaulted\" : \"optional\");\n    util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.innerType._zod.optout);\n    util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n    inst._zod.parse = (payload, ctx) => {\n        if (ctx.direction === \"backward\") {\n            return def.innerType._zod.run(payload, ctx);\n        }\n        // Forward direction (decode): apply catch logic\n        const result = def.innerType._zod.run({ value: payload.value, issues: [] }, ctx);\n        if (result instanceof Promise) {\n            return result.then((result) => handleCatchResult(payload, result, def, ctx));\n        }\n        return handleCatchResult(payload, result, def, ctx);\n    };\n});\nexport const $ZodNaN = /*@__PURE__*/ core.$constructor(\"$ZodNaN\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.parse = (payload, _ctx) => {\n        if (typeof payload.value !== \"number\" || !Number.isNaN(payload.value)) {\n            payload.issues.push({\n                input: payload.value,\n                inst,\n                expected: \"nan\",\n                code: \"invalid_type\",\n            });\n            return payload;\n        }\n        return payload;\n    };\n});\nexport const $ZodPipe = /*@__PURE__*/ core.$constructor(\"$ZodPipe\", (inst, def) => {\n    $ZodType.init(inst, def);\n    util.defineLazyInternal(inst, \"values\", (zod) => zod.def.in._zod.values);\n    util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.in._zod.optin);\n    util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.out._zod.optout);\n    util.defineLazyInternal(inst, \"propValues\", (zod) => zod.def.in._zod.propValues);\n    inst._zod.parse = (payload, ctx) => {\n        if (ctx.direction === \"backward\") {\n            const right = def.out._zod.run(payload, ctx);\n            if (right instanceof Promise) {\n                return right.then((right) => handlePipeResult(right, def.in, ctx));\n            }\n            return handlePipeResult(right, def.in, ctx);\n        }\n        const left = def.in._zod.run(payload, ctx);\n        if (left instanceof Promise) {\n            return left.then((left) => handlePipeResult(left, def.out, ctx));\n        }\n        return handlePipeResult(left, def.out, ctx);\n    };\n});\nfunction handlePipeResult(left, next, ctx) {\n    // Any issue stops the pipe, so a failing refinement never feeds its transform. An unrecognized key is the exception: it describes the input's extra properties, not the value being piped, and an enclosing intersection may yet reconcile it.\n    if (left.issues.some((iss) => iss.code !== \"unrecognized_keys\")) {\n        // prevent further checks\n        left.aborted = true;\n        return left;\n    }\n    return next._zod.run({ value: left.value, issues: left.issues }, ctx);\n}\nexport const $ZodCodec = /*@__PURE__*/ core.$constructor(\"$ZodCodec\", (inst, def) => {\n    $ZodType.init(inst, def);\n    util.defineLazyInternal(inst, \"values\", (zod) => zod.def.in._zod.values);\n    util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.in._zod.optin);\n    util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.out._zod.optout);\n    util.defineLazyInternal(inst, \"propValues\", (zod) => zod.def.in._zod.propValues);\n    inst._zod.parse = (payload, ctx) => {\n        const direction = ctx.direction || \"forward\";\n        if (direction === \"forward\") {\n            const left = def.in._zod.run(payload, ctx);\n            if (left instanceof Promise) {\n                return left.then((left) => handleCodecAResult(left, def, ctx));\n            }\n            return handleCodecAResult(left, def, ctx);\n        }\n        else {\n            const right = def.out._zod.run(payload, ctx);\n            if (right instanceof Promise) {\n                return right.then((right) => handleCodecAResult(right, def, ctx));\n            }\n            return handleCodecAResult(right, def, ctx);\n        }\n    };\n});\nfunction handleCodecAResult(result, def, ctx) {\n    if (result.issues.length) {\n        // prevent further checks\n        result.aborted = true;\n        return result;\n    }\n    const direction = ctx.direction || \"forward\";\n    if (direction === \"forward\") {\n        const transformed = def.transform(result.value, result);\n        if (transformed instanceof Promise) {\n            return transformed.then((value) => handleCodecTxResult(result, value, def.out, ctx));\n        }\n        return handleCodecTxResult(result, transformed, def.out, ctx);\n    }\n    else {\n        const transformed = def.reverseTransform(result.value, result);\n        if (transformed instanceof Promise) {\n            return transformed.then((value) => handleCodecTxResult(result, value, def.in, ctx));\n        }\n        return handleCodecTxResult(result, transformed, def.in, ctx);\n    }\n}\nfunction handleCodecTxResult(left, value, nextSchema, ctx) {\n    // Check if transform added any issues\n    if (left.issues.length) {\n        left.aborted = true;\n        return left;\n    }\n    return nextSchema._zod.run({ value, issues: left.issues }, ctx);\n}\nexport const $ZodPreprocess = /*@__PURE__*/ core.$constructor(\"$ZodPreprocess\", (inst, def) => {\n    $ZodPipe.init(inst, def);\n});\nexport const $ZodReadonly = /*@__PURE__*/ core.$constructor(\"$ZodReadonly\", (inst, def) => {\n    $ZodType.init(inst, def);\n    util.defineLazyInternal(inst, \"propValues\", (zod) => zod.def.innerType._zod.propValues);\n    util.defineLazyInternal(inst, \"values\", (zod) => zod.def.innerType._zod.values);\n    util.defineLazyInternal(inst, \"optin\", (zod) => zod.def.innerType?._zod?.optin);\n    util.defineLazyInternal(inst, \"optout\", (zod) => zod.def.innerType?._zod?.optout);\n    inst._zod.parse = (payload, ctx) => {\n        if (ctx.direction === \"backward\") {\n            return def.innerType._zod.run(payload, ctx);\n        }\n        const result = def.innerType._zod.run(payload, ctx);\n        if (result instanceof Promise) {\n            return result.then(handleReadonlyResult);\n        }\n        return handleReadonlyResult(result);\n    };\n});\nfunction handleReadonlyResult(payload) {\n    // A repeat visit hands back a node that is still being built; freezing it here would make the rest of its keys fail to assign.\n    if (!payload.memo)\n        payload.value = Object.freeze(payload.value);\n    return payload;\n}\n// a leaf's pattern source with its own checks folded in: the last pattern-carrying check wins, else length bounds narrow the catch-all, else an integer format narrows the number form. the fold lives here instead of on `_zod.pattern` so a bundle without template literals never pays for it\nfunction leafPattern(schema) {\n    const def = schema._zod.def;\n    let pattern = def.pattern;\n    let isInt = !!def.format?.includes(\"int\");\n    let minimum;\n    let maximum;\n    for (const ch of def.checks ?? []) {\n        const d = ch._zod.def;\n        if (d.pattern)\n            pattern = d.pattern;\n        isInt || (isInt = !!d.format?.includes(\"int\"));\n        const lo = d.minimum ?? d.length;\n        const hi = d.maximum ?? d.length;\n        if (lo !== undefined && (minimum === undefined || lo > minimum))\n            minimum = lo;\n        if (hi !== undefined && (maximum === undefined || hi < maximum))\n            maximum = hi;\n    }\n    if (pattern)\n        return pattern.source;\n    // an empty range matches nothing at runtime, and `{8,5}` is not a legal quantifier\n    if (minimum !== undefined && maximum !== undefined && minimum > maximum)\n        return \"(?!)\";\n    if (minimum !== undefined || maximum !== undefined)\n        return regexes.string({ minimum, maximum }).source;\n    const own = schema._zod.pattern;\n    return (isInt && own === regexes.number ? regexes.integer : own)?.source;\n}\n// a part's pattern source. a wrapper's pattern embeds its inner pattern's source verbatim, so the folded form is substituted in place without knowing the wrapper's own composition; a union's options are joined the way the union builds its own pattern\nfunction partPattern(schema) {\n    const def = schema._zod.def;\n    const own = schema._zod.pattern?.source;\n    // lazy resolves its inner on the internals, not the def\n    const inner = def.innerType ?? schema._zod.innerType;\n    if (inner) {\n        const before = inner._zod.pattern?.source;\n        const after = partPattern(inner);\n        if (own && before && after && after !== before) {\n            return own.replace(util.cleanRegex(before), () => util.cleanRegex(after));\n        }\n        return own;\n    }\n    if (def.options) {\n        const sources = def.options.map(partPattern);\n        if (sources.every(Boolean))\n            return `^(${sources.map((s) => util.cleanRegex(s)).join(\"|\")})$`;\n    }\n    return leafPattern(schema);\n}\nexport const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"$ZodTemplateLiteral\", (inst, def) => {\n    $ZodType.init(inst, def);\n    const regexParts = [];\n    for (const part of def.parts) {\n        if (typeof part === \"object\" && part !== null) {\n            // is Zod schema\n            const source = partPattern(part);\n            if (!source) {\n                throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);\n            }\n            regexParts.push(util.cleanRegex(source));\n        }\n        else if (part === null || util.primitiveTypes.has(typeof part)) {\n            regexParts.push(util.escapeRegex(`${part}`));\n        }\n        else {\n            throw new Error(`Invalid template literal part: ${part}`);\n        }\n    }\n    inst._zod.pattern = new RegExp(`^${regexParts.join(\"\")}$`);\n    inst._zod.parse = (payload, _ctx) => {\n        if (typeof payload.value !== \"string\") {\n            payload.issues.push({\n                input: payload.value,\n                inst,\n                expected: \"string\",\n                code: \"invalid_type\",\n            });\n            return payload;\n        }\n        inst._zod.pattern.lastIndex = 0;\n        if (!inst._zod.pattern.test(payload.value)) {\n            payload.issues.push({\n                input: payload.value,\n                inst,\n                code: \"invalid_format\",\n                format: def.format ?? \"template_literal\",\n                pattern: inst._zod.pattern.source,\n            });\n            return payload;\n        }\n        return payload;\n    };\n});\nexport const $ZodFunction = /*@__PURE__*/ core.$constructor(\"$ZodFunction\", (inst, def) => {\n    $ZodType.init(inst, def);\n    // Defined, not assigned: the classic prototype exposes `_def` as a getter with no setter.\n    Object.defineProperty(inst, \"_def\", { value: def });\n    inst._zod.def = def;\n    inst.implement = (func) => {\n        if (typeof func !== \"function\") {\n            throw new Error(\"implement() must be called with a function\");\n        }\n        // Defined inline so the closure stays anonymous: binding it to a `const` first names it, which costs 256 bytes per implemented function.\n        return Object.defineProperty(function (...args) {\n            const parsedArgs = inst._def.input ? parse(inst._def.input, args) : args;\n            const result = Reflect.apply(func, this, parsedArgs);\n            if (inst._def.output) {\n                return parse(inst._def.output, result);\n            }\n            return result;\n        }, \"_zod\", { value: inst._zod, enumerable: false });\n    };\n    inst.implementAsync = (func) => {\n        if (typeof func !== \"function\") {\n            throw new Error(\"implementAsync() must be called with a function\");\n        }\n        return Object.defineProperty(async function (...args) {\n            const parsedArgs = inst._def.input ? await parseAsync(inst._def.input, args) : args;\n            const result = await Reflect.apply(func, this, parsedArgs);\n            if (inst._def.output) {\n                return await parseAsync(inst._def.output, result);\n            }\n            return result;\n        }, \"_zod\", { value: inst._zod, enumerable: false });\n    };\n    inst._zod.parse = (payload, _ctx) => {\n        if (typeof payload.value !== \"function\") {\n            payload.issues.push({\n                code: \"invalid_type\",\n                expected: \"function\",\n                input: payload.value,\n                inst,\n            });\n            return payload;\n        }\n        // Check if output is a promise type to determine if we should use async implementation\n        const hasPromiseOutput = inst._def.output && inst._def.output._zod.def.type === \"promise\";\n        if (hasPromiseOutput) {\n            payload.value = inst.implementAsync(payload.value);\n        }\n        else {\n            payload.value = inst.implement(payload.value);\n        }\n        return payload;\n    };\n    inst.input = (...args) => {\n        const F = inst.constructor;\n        if (Array.isArray(args[0])) {\n            return new F({\n                type: \"function\",\n                input: new $ZodTuple({\n                    type: \"tuple\",\n                    items: args[0],\n                    rest: args[1],\n                }),\n                output: inst._def.output,\n            });\n        }\n        return new F({\n            type: \"function\",\n            input: args[0],\n            output: inst._def.output,\n        });\n    };\n    inst.output = (output) => {\n        const F = inst.constructor;\n        return new F({\n            type: \"function\",\n            input: inst._def.input,\n            output,\n        });\n    };\n    return inst;\n});\nexport const $ZodPromise = /*@__PURE__*/ core.$constructor(\"$ZodPromise\", (inst, def) => {\n    $ZodType.init(inst, def);\n    inst._zod.parse = (payload, ctx) => {\n        return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));\n    };\n});\nexport const $ZodLazy = /*@__PURE__*/ core.$constructor(\"$ZodLazy\", (inst, def) => {\n    $ZodType.init(inst, def);\n    // Cache the resolved inner type on the shared `def` so all clones of this lazy (e.g. via `.describe()`/`.meta()`) share the same inner instance, preserving identity for cycle detection on recursive schemas.\n    util.defineLazy(inst._zod, \"innerType\", () => {\n        const d = def;\n        if (!d._cachedInner)\n            d._cachedInner = def.getter();\n        return d._cachedInner;\n    });\n    util.defineLazyInternal(inst, \"pattern\", (zod) => zod.innerType?._zod?.pattern);\n    util.defineLazyInternal(inst, \"propValues\", (zod) => zod.innerType?._zod?.propValues);\n    util.defineLazyInternal(inst, \"optin\", (zod) => zod.innerType?._zod?.optin ?? undefined);\n    util.defineLazyInternal(inst, \"optout\", (zod) => zod.innerType?._zod?.optout ?? undefined);\n    inst._zod.parse = (payload, ctx) => {\n        const inner = inst._zod.innerType;\n        return inner._zod.run(payload, ctx);\n    };\n});\nexport const $ZodCustom = /*@__PURE__*/ core.$constructor(\"$ZodCustom\", (inst, def) => {\n    checks.$ZodCheck.init(inst, def);\n    $ZodType.init(inst, def);\n    inst._zod.parse = (payload, _) => {\n        return payload;\n    };\n    inst._zod.check = (payload) => {\n        const input = payload.value;\n        const r = def.fn(input);\n        if (r instanceof Promise) {\n            return r.then((r) => handleRefineResult(r, payload, input, inst));\n        }\n        handleRefineResult(r, payload, input, inst);\n        return;\n    };\n});\nfunction handleRefineResult(result, payload, input, inst) {\n    if (!result) {\n        const _iss = {\n            code: \"custom\",\n            input,\n            inst, // incorporates params.error into issue reporting\n            path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting\n            continue: !inst._zod.def.abort,\n            // params: inst._zod.def.params,\n        };\n        if (inst._zod.def.params)\n            _iss.params = inst._zod.def.params;\n        payload.issues.push(util.issue(_iss));\n    }\n}\n","import * as util from \"./util.js\";\nexport class $ZodCyclicError extends Error {\n    constructor() {\n        super(`Cannot parse a reference cycle that closes through a transform`);\n        this.name = \"ZodCyclicError\";\n    }\n}\n/** Keyed off the context object every schema in one parse call already shares. */\nconst STATE = \"~memo\";\nconst NO_ISSUES = [];\n// a value a cycle can close through\nfunction isRef(value) {\n    return value !== null && typeof value === \"object\";\n}\n// Receivers prefix paths in place, so the cache and every hand-out need their own copies.\nfunction cloneIssues(issues) {\n    return issues.map((iss) => (iss.path ? { ...iss, path: iss.path.slice() } : { ...iss }));\n}\nconst recursive = /*@__PURE__*/ new WeakMap();\n/** What the walk established, in order of certainty: ordered so the strongest answer among children wins. */\nconst NONE = 0;\nconst ASSUMED = 1;\nconst PROVEN = 2;\n/** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */\nfunction isRecursive(inst, stack, resolve) {\n    const cached = recursive.get(inst);\n    if (cached !== undefined)\n        return cached ? PROVEN : NONE;\n    // Relative to the walk in progress, so not cached.\n    if (stack.has(inst))\n        return PROVEN;\n    stack.add(inst);\n    let result = NONE;\n    const check = (child) => {\n        if (result !== PROVEN && child?._zod) {\n            const answer = isRecursive(child, stack, resolve);\n            if (answer > result)\n                result = answer;\n        }\n    };\n    // `Reflect.ownKeys` rather than `Object.keys`, so a cycle through a declared symbol key is still seen\n    const shape = (sh, spread) => {\n        let answer = NONE;\n        for (const key of Reflect.ownKeys(sh)) {\n            const desc = Object.getOwnPropertyDescriptor(sh, key);\n            // an object resolves its shape by spread, so a key it does not enumerate is never parsed; `z.properties` reads every own key and so keeps them all\n            if (spread && !desc.enumerable)\n                continue;\n            // resolving runs user code, and a factory mints a fresh subtree per read, so an edge the walk can't follow counts as a cycle\n            const child = desc.get ? ASSUMED : desc.value?._zod ? isRecursive(desc.value, stack, resolve) : NONE;\n            if (child > answer)\n                answer = child;\n        }\n        return answer;\n    };\n    const merge = (answer) => {\n        if (answer > result)\n            result = answer;\n    };\n    const def = inst._zod.def;\n    const kind = def.type;\n    switch (kind) {\n        case \"object\": {\n            const raw = util.rawShape(def);\n            // a def with no raw shape answers `shape` from an accessor of its own, and running that can mint a whole fresh subtree\n            merge(raw ? shape(raw, true) : ASSUMED);\n            check(def.catchall);\n            break;\n        }\n        case \"array\":\n            check(def.element);\n            break;\n        case \"tuple\":\n            for (const el of def.items)\n                check(el);\n            check(def.rest);\n            break;\n        case \"record\":\n        case \"map\":\n            check(def.keyType);\n            check(def.valueType);\n            break;\n        case \"set\":\n            check(def.valueType);\n            break;\n        case \"union\":\n            for (const el of def.options)\n                check(el);\n            break;\n        case \"intersection\":\n            check(def.left);\n            check(def.right);\n            break;\n        case \"optional\":\n        case \"nullable\":\n        case \"default\":\n        case \"prefault\":\n        case \"catch\":\n        case \"readonly\":\n        case \"nonoptional\":\n        case \"promise\":\n        case \"success\":\n            check(def.innerType);\n            break;\n        case \"pipe\":\n            check(def.in);\n            check(def.out);\n            break;\n        case \"function\":\n            check(def.input);\n            check(def.output);\n            break;\n        // `$ZodLazy` caches its inner on the def, so a resolved edge is followed exactly\n        case \"lazy\": {\n            const inner = def._cachedInner ?? (resolve ? inst._zod.innerType : undefined);\n            // walked with resolution off: one hop sees past the deferral, and a lazy that yields only another unresolved lazy is generative, so it stops there\n            merge(inner ? isRecursive(inner, stack, false) : ASSUMED);\n            break;\n        }\n        // a leaf by choice: `parts` are regex fragments, not data positions\n        case \"template_literal\":\n        // leaves\n        case \"string\":\n        case \"number\":\n        case \"int\":\n        case \"boolean\":\n        case \"bigint\":\n        case \"symbol\":\n        case \"undefined\":\n        case \"null\":\n        case \"void\":\n        case \"never\":\n        case \"any\":\n        case \"unknown\":\n        case \"date\":\n        case \"nan\":\n        case \"enum\":\n        case \"literal\":\n        case \"file\":\n        case \"transform\":\n        case \"custom\":\n            break;\n        default: {\n            // a new built-in kind becomes a compile error here\n            kind;\n            // a user-defined kind can still hold children, and only its author knows where, so fall back to scanning the def — skipping accessors, since reading one can run user code\n            for (const key in def) {\n                const desc = Object.getOwnPropertyDescriptor(def, key);\n                if (!desc || desc.get)\n                    continue;\n                const value = desc.value;\n                if (!value || typeof value !== \"object\")\n                    continue;\n                if (value._zod)\n                    check(value);\n                else if (Array.isArray(value))\n                    for (const el of value)\n                        check(el);\n            }\n        }\n    }\n    stack.delete(inst);\n    return settle(inst, result);\n}\n/** An assumed answer must not outlive the resolution that settles it, so only a certain one is cached. */\nfunction settle(inst, answer) {\n    if (answer !== ASSUMED)\n        recursive.set(inst, answer === PROVEN);\n    return answer;\n}\n/**\n * Whether one parse can re-enter this schema, i.e. its subtree contains a cycle.\n * Exported for `z.compile`, which refuses to compile such a schema: cycle\n * breaking is driven from here off state keyed on the parse context, and a\n * generated fast path has no context to key on.\n */\nexport function isRecursiveSchema(inst) {\n    // z.compile never parses, so nothing would ever resolve a lazy for it; it runs once and already treats a throw here as recursive\n    return isRecursive(inst, new Set(), true) !== NONE;\n}\nfunction bucketFor(state, inst) {\n    let bucket = state.buckets.get(inst);\n    if (!bucket) {\n        bucket = new WeakMap();\n        state.buckets.set(inst, bucket);\n    }\n    return bucket;\n}\n// Set immediately before delegating to core and cleared immediately after, so `alloc` registers only for a visit this module is driving.\nlet handoff;\n// Allocated but unfinished entries. `alloc` and the matching pop both happen in the synchronous part of a parse, so they nest even when children are async, and one stack serves every schema.\nconst open = [];\nconst memo = {\n    alloc(_inst, payload, empty) {\n        const bucket = handoff;\n        if (!bucket)\n            return empty;\n        handoff = undefined;\n        const entry = { value: empty, issues: null };\n        bucket.set(payload.value, entry);\n        open.push(entry);\n        return empty;\n    },\n    guard(inst) {\n        var _a;\n        (_a = inst._zod).deferred ?? (_a.deferred = []);\n        inst._zod.deferred.push(() => {\n            const base = inst._zod.parse;\n            const wrapped = (payload, ctx) => {\n                // The value is a placeholder a back-edge is still waiting on, so the cycle closes through this transform. Its output can't exist in time to bind.\n                if (ctx.direction !== \"backward\" && isBackEdge(ctx, payload.value))\n                    throw new $ZodCyclicError();\n                return base(payload, ctx);\n            };\n            inst._zod.parse = wrapped;\n            if (inst._zod.run === base)\n                inst._zod.run = wrapped;\n        });\n    },\n    attach(inst) {\n        var _a;\n        let isRecursiveInst;\n        let rechecked = false;\n        // a recursive schema is re-entered many times per parse and its bucket never changes\n        let lastCtx;\n        let lastBucket;\n        // Wraps `parse` in a deferred so it sees the container's final parse. Core's own deferred copies `parse` into `run` when there are no checks, and it ran first, so `run` is patched to match; with checks, `run` reads `parse` dynamically.\n        (_a = inst._zod).deferred ?? (_a.deferred = []);\n        inst._zod.deferred.push(() => {\n            const base = inst._zod.parse;\n            const wrapped = (payload, ctx) => {\n                if (isRecursiveInst === undefined) {\n                    const walked = isRecursive(inst, new Set(), false);\n                    if (walked === NONE) {\n                        // Nothing here can ever fire, so take it back out.\n                        inst._zod.parse = base;\n                        if (inst._zod.run === wrapped)\n                            inst._zod.run = base;\n                        return base(payload, ctx);\n                    }\n                    // this parse resolves the deferred edges on its own path, so ask once more before latching\n                    if (walked === PROVEN || rechecked)\n                        isRecursiveInst = true;\n                    else\n                        rechecked = true;\n                }\n                const input = payload.value;\n                if (!isRef(input))\n                    return base(payload, ctx);\n                let state = ctx[STATE];\n                if (!state) {\n                    state = { buckets: new WeakMap(), backEdges: undefined };\n                    ctx[STATE] = state;\n                }\n                let bucket;\n                if (lastCtx === ctx) {\n                    bucket = lastBucket;\n                }\n                else {\n                    bucket = bucketFor(state, inst);\n                    lastCtx = ctx;\n                    lastBucket = bucket;\n                }\n                const hit = bucket.get(input);\n                if (hit) {\n                    payload.value = hit.value;\n                    if (hit.issues) {\n                        if (hit.issues.length)\n                            payload.issues.push(...cloneIssues(hit.issues));\n                    }\n                    else {\n                        // Still being parsed: its own checks cover it, so skip them here.\n                        payload.memo = true;\n                        state.backEdges ?? (state.backEdges = new WeakSet());\n                        state.backEdges.add(hit.value);\n                    }\n                    return payload;\n                }\n                handoff = bucket;\n                const depth = open.length;\n                const result = base(payload, ctx);\n                handoff = undefined;\n                // A container that rejected its input outright allocated nothing.\n                const entry = open.length > depth ? open.pop() : undefined;\n                // Both paths written out so the sync one allocates no closure. It runs once per node, and capturing here cost more than everything else combined.\n                if (result instanceof Promise) {\n                    return result.then((r) => {\n                        if (entry)\n                            entry.issues = r.issues.length ? cloneIssues(r.issues) : NO_ISSUES;\n                        return r;\n                    });\n                }\n                if (entry)\n                    entry.issues = result.issues.length ? cloneIssues(result.issues) : NO_ISSUES;\n                return result;\n            };\n            inst._zod.parse = wrapped;\n            if (inst._zod.run === base)\n                inst._zod.run = wrapped;\n        });\n    },\n};\n/** The memoizer that gives containers cycle support. `zod` installs it by default; `zod/mini` opts in with `config({ memoizer: memoizer() })`. */\nexport function memoizer() {\n    return memo;\n}\n/** Whether this value is a node a back-edge resolved to before it finished. */\nexport function isBackEdge(ctx, value) {\n    const backEdges = ctx[STATE]?.backEdges;\n    return backEdges !== undefined && isRef(value) && backEdges.has(value);\n}\n","import * as util from \"../core/util.js\";\nconst error = () => {\n    const Sizable = {\n        string: { unit: \"characters\", verb: \"to have\" },\n        file: { unit: \"bytes\", verb: \"to have\" },\n        array: { unit: \"items\", verb: \"to have\" },\n        set: { unit: \"items\", verb: \"to have\" },\n        map: { unit: \"entries\", verb: \"to have\" },\n    };\n    function getSizing(origin) {\n        return Sizable[origin] ?? null;\n    }\n    const FormatDictionary = {\n        regex: \"input\",\n        email: \"email address\",\n        url: \"URL\",\n        emoji: \"emoji\",\n        uuid: \"UUID\",\n        uuidv4: \"UUIDv4\",\n        uuidv6: \"UUIDv6\",\n        nanoid: \"nanoid\",\n        guid: \"GUID\",\n        cuid: \"cuid\",\n        cuid2: \"cuid2\",\n        ulid: \"ULID\",\n        xid: \"XID\",\n        ksuid: \"KSUID\",\n        datetime: \"ISO datetime\",\n        date: \"ISO date\",\n        time: \"ISO time\",\n        duration: \"ISO duration\",\n        ipv4: \"IPv4 address\",\n        ipv6: \"IPv6 address\",\n        mac: \"MAC address\",\n        cidrv4: \"IPv4 range\",\n        cidrv6: \"IPv6 range\",\n        base64: \"base64-encoded string\",\n        base64url: \"base64url-encoded string\",\n        json_string: \"JSON string\",\n        e164: \"E.164 number\",\n        currency_code: \"currency code\",\n        credit_card: \"credit card number\",\n        iban: \"IBAN\",\n        jwt: \"JWT\",\n        template_literal: \"input\",\n    };\n    // type names: missing keys = do not translate (use raw value via ?? fallback)\n    const TypeDictionary = {\n        // Compatibility: \"nan\" -> \"NaN\" for display\n        nan: \"NaN\",\n        // All other type names omitted - they fall back to raw values via ?? operator\n    };\n    function getTypeName(type, input) {\n        if (type === \"number\" && typeof input === \"number\" && !Number.isFinite(input)) {\n            return String(input);\n        }\n        return TypeDictionary[type] ?? type;\n    }\n    return (issue) => {\n        switch (issue.code) {\n            case \"invalid_type\": {\n                const expected = getTypeName(issue.expected);\n                const receivedType = util.parsedType(issue.input);\n                const received = getTypeName(receivedType, issue.input);\n                return `Invalid input: expected ${expected}, received ${received}`;\n            }\n            case \"invalid_value\":\n                if (issue.values.length === 1)\n                    return `Invalid input: expected ${util.stringifyPrimitive(issue.values[0])}`;\n                return `Invalid option: expected one of ${util.joinValues(issue.values, \"|\")}`;\n            case \"too_big\": {\n                const adj = issue.exact ? \"exactly \" : issue.inclusive ? \"<=\" : \"<\";\n                const sizing = getSizing(issue.origin);\n                if (sizing)\n                    return `Too big: expected ${issue.origin ?? \"value\"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? \"elements\"}`;\n                return `Too big: expected ${issue.origin ?? \"value\"} to be ${adj}${issue.maximum.toString()}`;\n            }\n            case \"too_small\": {\n                const adj = issue.exact ? \"exactly \" : issue.inclusive ? \">=\" : \">\";\n                const sizing = getSizing(issue.origin);\n                if (sizing) {\n                    return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;\n                }\n                return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;\n            }\n            case \"invalid_format\": {\n                const _issue = issue;\n                if (_issue.format === \"starts_with\") {\n                    return `Invalid string: must start with \"${_issue.prefix}\"`;\n                }\n                if (_issue.format === \"ends_with\")\n                    return `Invalid string: must end with \"${_issue.suffix}\"`;\n                if (_issue.format === \"includes\")\n                    return `Invalid string: must include \"${_issue.includes}\"`;\n                if (_issue.format === \"regex\")\n                    return `Invalid string: must match pattern ${_issue.pattern}`;\n                return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;\n            }\n            case \"not_multiple_of\":\n                return `Invalid number: must be a multiple of ${issue.divisor}`;\n            case \"unrecognized_keys\":\n                return `Unrecognized key${issue.keys.length > 1 ? \"s\" : \"\"}: ${util.joinValues(issue.keys, \", \")}`;\n            case \"invalid_key\":\n                return `Invalid key in ${issue.origin}`;\n            case \"invalid_union\":\n                if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) {\n                    const opts = issue.options.map((o) => `'${o}'`).join(\" | \");\n                    return `Invalid discriminator value. Expected ${opts}`;\n                }\n                if (issue.inclusive === false) {\n                    return \"Invalid input: more than one option matched\";\n                }\n                return \"Invalid input\";\n            case \"invalid_element\":\n                return `Invalid value in ${issue.origin}`;\n            default:\n                return `Invalid input`;\n        }\n    };\n};\nexport default function () {\n    return {\n        localeError: error(),\n    };\n}\n","var _a;\nexport const $output = /*@__PURE__*/ Symbol(\"ZodOutput\");\nexport const $input = /*@__PURE__*/ Symbol(\"ZodInput\");\nexport class $ZodRegistry {\n    constructor() {\n        this._map = new WeakMap();\n        this._idmap = new Map();\n    }\n    add(schema, ..._meta) {\n        const meta = _meta[0];\n        this._map.set(schema, meta);\n        if (meta && typeof meta === \"object\" && \"id\" in meta) {\n            this._idmap.set(meta.id, schema);\n        }\n        return this;\n    }\n    clear() {\n        this._map = new WeakMap();\n        this._idmap = new Map();\n        return this;\n    }\n    remove(schema) {\n        const meta = this._map.get(schema);\n        if (meta && typeof meta === \"object\" && \"id\" in meta) {\n            this._idmap.delete(meta.id);\n        }\n        this._map.delete(schema);\n        return this;\n    }\n    get(schema) {\n        // return this._map.get(schema) as any;\n        // inherit metadata\n        const p = schema._zod.parent;\n        if (p) {\n            const pm = { ...(this.get(p) ?? {}) };\n            delete pm.id; // do not inherit id\n            const f = { ...pm, ...this._map.get(schema) };\n            return Object.keys(f).length ? f : undefined;\n        }\n        return this._map.get(schema);\n    }\n    has(schema) {\n        return this._map.has(schema);\n    }\n}\n// registries\nexport function registry() {\n    return new $ZodRegistry();\n}\n(_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());\nexport const globalRegistry = globalThis.__zod_globalRegistry;\n","import * as checks from \"./checks.js\";\nimport * as registries from \"./registries.js\";\nimport * as schemas from \"./schemas.js\";\nimport * as util from \"./util.js\";\nfunction snapshotChecks(def) {\n    if (def.checks)\n        def.checks = [...def.checks];\n    return def;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _string(Class, params) {\n    return new Class(snapshotChecks({ type: \"string\", ...util.normalizeParams(params) }));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedString(Class, params) {\n    return new Class(snapshotChecks({ type: \"string\", coerce: true, ...util.normalizeParams(params) }));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _email(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"email\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _guid(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"guid\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuid(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"uuid\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv4(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"uuid\",\n        check: \"string_format\",\n        abort: false,\n        version: \"v4\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv6(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"uuid\",\n        check: \"string_format\",\n        abort: false,\n        version: \"v6\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uuidv7(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"uuid\",\n        check: \"string_format\",\n        abort: false,\n        version: \"v7\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _url(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"url\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _emoji(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"emoji\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nanoid(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"nanoid\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link _cuid2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\n// @__NO_SIDE_EFFECTS__\nexport function _cuid(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"cuid\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cuid2(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"cuid2\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ulid(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"ulid\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _xid(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"xid\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ksuid(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"ksuid\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv4(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"ipv4\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _ipv6(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"ipv6\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mac(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"mac\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv4(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"cidrv4\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _cidrv6(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"cidrv6\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"base64\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _base64url(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"base64url\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _e164(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"e164\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _creditCard(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"credit_card\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _iban(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"iban\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _jwt(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"jwt\",\n        check: \"string_format\",\n        abort: false,\n        ...util.normalizeParams(params),\n    });\n}\nexport const TimePrecision = {\n    Any: null,\n    Minute: -1,\n    Second: 0,\n    Millisecond: 3,\n    Microsecond: 6,\n};\n// @__NO_SIDE_EFFECTS__\nexport function _isoDateTime(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"datetime\",\n        check: \"string_format\",\n        offset: false,\n        local: false,\n        precision: null,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDate(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"date\",\n        check: \"string_format\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoTime(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"time\",\n        check: \"string_format\",\n        precision: null,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _isoDuration(Class, params) {\n    return new Class({\n        type: \"string\",\n        format: \"duration\",\n        check: \"string_format\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _number(Class, params) {\n    return new Class(snapshotChecks({ type: \"number\", checks: [], ...util.normalizeParams(params) }));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedNumber(Class, params) {\n    return new Class(snapshotChecks({ type: \"number\", coerce: true, checks: [], ...util.normalizeParams(params) }));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int(Class, params) {\n    return new Class({\n        type: \"number\",\n        check: \"number_format\",\n        abort: false,\n        format: \"safeint\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float32(Class, params) {\n    return new Class({\n        type: \"number\",\n        check: \"number_format\",\n        abort: false,\n        format: \"float32\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _float64(Class, params) {\n    return new Class({\n        type: \"number\",\n        check: \"number_format\",\n        abort: false,\n        format: \"float64\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int32(Class, params) {\n    return new Class({\n        type: \"number\",\n        check: \"number_format\",\n        abort: false,\n        format: \"int32\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint32(Class, params) {\n    return new Class({\n        type: \"number\",\n        check: \"number_format\",\n        abort: false,\n        format: \"uint32\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _boolean(Class, params) {\n    return new Class({\n        type: \"boolean\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBoolean(Class, params) {\n    return new Class({\n        type: \"boolean\",\n        coerce: true,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _bigint(Class, params) {\n    return new Class({\n        type: \"bigint\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedBigint(Class, params) {\n    return new Class({\n        type: \"bigint\",\n        coerce: true,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _int64(Class, params) {\n    return new Class({\n        type: \"bigint\",\n        check: \"bigint_format\",\n        abort: false,\n        format: \"int64\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uint64(Class, params) {\n    return new Class({\n        type: \"bigint\",\n        check: \"bigint_format\",\n        abort: false,\n        format: \"uint64\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _symbol(Class, params) {\n    return new Class({\n        type: \"symbol\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _undefined(Class, params) {\n    return new Class({\n        type: \"undefined\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _null(Class, params) {\n    return new Class({\n        type: \"null\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _any(Class) {\n    return new Class({\n        type: \"any\",\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _unknown(Class) {\n    return new Class({\n        type: \"unknown\",\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _never(Class, params) {\n    return new Class({\n        type: \"never\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _void(Class, params) {\n    return new Class({\n        type: \"void\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _date(Class, params) {\n    return new Class({\n        type: \"date\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _coercedDate(Class, params) {\n    return new Class({\n        type: \"date\",\n        coerce: true,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nan(Class, params) {\n    return new Class({\n        type: \"nan\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lt(value, params) {\n    return new checks.$ZodCheckLessThan({\n        check: \"less_than\",\n        ...util.normalizeParams(params),\n        value,\n        inclusive: false,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lte(value, params) {\n    return new checks.$ZodCheckLessThan({\n        check: \"less_than\",\n        ...util.normalizeParams(params),\n        value,\n        inclusive: true,\n    });\n}\nexport { \n/** @deprecated Use `z.lte()` instead. */\n_lte as _max, };\n// @__NO_SIDE_EFFECTS__\nexport function _gt(value, params) {\n    return new checks.$ZodCheckGreaterThan({\n        check: \"greater_than\",\n        ...util.normalizeParams(params),\n        value,\n        inclusive: false,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _gte(value, params) {\n    return new checks.$ZodCheckGreaterThan({\n        check: \"greater_than\",\n        ...util.normalizeParams(params),\n        value,\n        inclusive: true,\n    });\n}\nexport { \n/** @deprecated Use `z.gte()` instead. */\n_gte as _min, };\n// @__NO_SIDE_EFFECTS__\nexport function _positive(params) {\n    return _gt(0, params);\n}\n// negative\n// @__NO_SIDE_EFFECTS__\nexport function _negative(params) {\n    return _lt(0, params);\n}\n// nonpositive\n// @__NO_SIDE_EFFECTS__\nexport function _nonpositive(params) {\n    return _lte(0, params);\n}\n// nonnegative\n// @__NO_SIDE_EFFECTS__\nexport function _nonnegative(params) {\n    return _gte(0, params);\n}\n// @__NO_SIDE_EFFECTS__\nexport function _multipleOf(value, params) {\n    return new checks.$ZodCheckMultipleOf({\n        check: \"multiple_of\",\n        ...util.normalizeParams(params),\n        value,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxSize(maximum, params) {\n    return new checks.$ZodCheckMaxSize({\n        check: \"max_size\",\n        ...util.normalizeParams(params),\n        maximum,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minSize(minimum, params) {\n    return new checks.$ZodCheckMinSize({\n        check: \"min_size\",\n        ...util.normalizeParams(params),\n        minimum,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _size(size, params) {\n    return new checks.$ZodCheckSizeEquals({\n        check: \"size_equals\",\n        ...util.normalizeParams(params),\n        size,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _maxLength(maximum, params) {\n    const ch = new checks.$ZodCheckMaxLength({\n        check: \"max_length\",\n        ...util.normalizeParams(params),\n        maximum,\n    });\n    return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _minLength(minimum, params) {\n    return new checks.$ZodCheckMinLength({\n        check: \"min_length\",\n        ...util.normalizeParams(params),\n        minimum,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _length(length, params) {\n    return new checks.$ZodCheckLengthEquals({\n        check: \"length_equals\",\n        ...util.normalizeParams(params),\n        length,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _regex(pattern, params) {\n    return new checks.$ZodCheckRegex({\n        check: \"string_format\",\n        format: \"regex\",\n        ...util.normalizeParams(params),\n        pattern,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lowercase(params) {\n    return new checks.$ZodCheckLowerCase({\n        check: \"string_format\",\n        format: \"lowercase\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _uppercase(params) {\n    return new checks.$ZodCheckUpperCase({\n        check: \"string_format\",\n        format: \"uppercase\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _includes(includes, params) {\n    return new checks.$ZodCheckIncludes({\n        check: \"string_format\",\n        format: \"includes\",\n        ...util.normalizeParams(params),\n        includes,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _startsWith(prefix, params) {\n    return new checks.$ZodCheckStartsWith({\n        check: \"string_format\",\n        format: \"starts_with\",\n        ...util.normalizeParams(params),\n        prefix,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _endsWith(suffix, params) {\n    return new checks.$ZodCheckEndsWith({\n        check: \"string_format\",\n        format: \"ends_with\",\n        ...util.normalizeParams(params),\n        suffix,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _property(property, schema, params) {\n    return new checks.$ZodCheckProperty({\n        check: \"property\",\n        property,\n        schema,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _properties(shape, params) {\n    return new checks.$ZodCheckProperties({\n        check: \"properties\",\n        shape,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _mime(types, params) {\n    return new checks.$ZodCheckMimeType({\n        check: \"mime_type\",\n        mime: types,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _overwrite(tx) {\n    return new checks.$ZodCheckOverwrite({\n        check: \"overwrite\",\n        tx,\n    });\n}\n// normalize\n// @__NO_SIDE_EFFECTS__\nexport function _normalize(form) {\n    return _overwrite((input) => input.normalize(form));\n}\n// trim\n// @__NO_SIDE_EFFECTS__\nexport function _trim() {\n    return _overwrite((input) => input.trim());\n}\n// toLowerCase\n// @__NO_SIDE_EFFECTS__\nexport function _toLowerCase() {\n    return _overwrite((input) => input.toLowerCase());\n}\n// toUpperCase\n// @__NO_SIDE_EFFECTS__\nexport function _toUpperCase() {\n    return _overwrite((input) => input.toUpperCase());\n}\n// slugify\n// @__NO_SIDE_EFFECTS__\nexport function _slugify() {\n    return _overwrite((input) => util.slugify(input));\n}\n// @__NO_SIDE_EFFECTS__\nexport function _array(Class, element, params) {\n    return new Class({\n        type: \"array\",\n        element,\n        // get element() {\n        //   return element;\n        // },\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _union(Class, options, params) {\n    return new Class({\n        type: \"union\",\n        options,\n        ...util.normalizeParams(params),\n    });\n}\nexport function _xor(Class, options, params) {\n    return new Class({\n        type: \"union\",\n        options,\n        inclusive: false,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _discriminatedUnion(Class, discriminator, options, params) {\n    return new Class({\n        type: \"union\",\n        options: options,\n        discriminator,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _intersection(Class, left, right) {\n    return new Class({\n        type: \"intersection\",\n        left,\n        right,\n    });\n}\n// export function _tuple(\n//   Class: util.SchemaClass<schemas.$ZodTuple>,\n//   items: [],\n//   params?: string | $ZodTupleParams\n// ): schemas.$ZodTuple<[], null>;\n// @__NO_SIDE_EFFECTS__\nexport function _tuple(Class, items, _paramsOrRest, _params) {\n    const hasRest = _paramsOrRest instanceof schemas.$ZodType;\n    const params = hasRest ? _params : _paramsOrRest;\n    const rest = hasRest ? _paramsOrRest : null;\n    return new Class({\n        type: \"tuple\",\n        items,\n        rest,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _record(Class, keyType, valueType, params) {\n    return new Class({\n        type: \"record\",\n        keyType,\n        valueType,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _map(Class, keyType, valueType, params) {\n    return new Class({\n        type: \"map\",\n        keyType,\n        valueType,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _set(Class, valueType, params) {\n    return new Class({\n        type: \"set\",\n        valueType,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _enum(Class, values, params) {\n    const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n    // if (Array.isArray(values)) {\n    //   for (const value of values) {\n    //     entries[value] = value;\n    //   }\n    // } else {\n    //   Object.assign(entries, values);\n    // }\n    // const entries: util.EnumLike = {};\n    // for (const val of values) {\n    //   entries[val] = val;\n    // }\n    return new Class({\n        type: \"enum\",\n        entries,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function _nativeEnum(Class, entries, params) {\n    return new Class({\n        type: \"enum\",\n        entries,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _literal(Class, value, params) {\n    return new Class({\n        type: \"literal\",\n        values: Array.isArray(value) ? value : [value],\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _file(Class, params) {\n    return new Class({\n        type: \"file\",\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _transform(Class, fn) {\n    return new Class({\n        type: \"transform\",\n        transform: fn,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _optional(Class, innerType) {\n    return new Class({\n        type: \"optional\",\n        innerType,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nullable(Class, innerType) {\n    return new Class({\n        type: \"nullable\",\n        innerType,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _default(Class, innerType, defaultValue) {\n    return new Class({\n        type: \"default\",\n        innerType,\n        get defaultValue() {\n            return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n        },\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _nonoptional(Class, innerType, params) {\n    return new Class({\n        type: \"nonoptional\",\n        innerType,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _success(Class, innerType) {\n    return new Class({\n        type: \"success\",\n        innerType,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _catch(Class, innerType, catchValue) {\n    return new Class({\n        type: \"catch\",\n        innerType,\n        catchValue: (typeof catchValue === \"function\" ? catchValue : util.constantCatch(catchValue)),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _pipe(Class, in_, out) {\n    return new Class({\n        type: \"pipe\",\n        in: in_,\n        out,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _readonly(Class, innerType) {\n    return new Class({\n        type: \"readonly\",\n        innerType,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _templateLiteral(Class, parts, params) {\n    return new Class({\n        type: \"template_literal\",\n        parts,\n        ...util.normalizeParams(params),\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _lazy(Class, getter) {\n    return new Class({\n        type: \"lazy\",\n        getter,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _promise(Class, innerType) {\n    return new Class({\n        type: \"promise\",\n        innerType,\n    });\n}\n// @__NO_SIDE_EFFECTS__\nexport function _custom(Class, fn, _params) {\n    const norm = util.normalizeParams(_params);\n    norm.abort ?? (norm.abort = true); // default to abort:false\n    const schema = new Class({\n        type: \"custom\",\n        check: \"custom\",\n        fn: fn,\n        ...norm,\n    });\n    return schema;\n}\n// same as _custom but defaults to abort:false\n// @__NO_SIDE_EFFECTS__\nexport function _refine(Class, fn, _params) {\n    const schema = new Class({\n        type: \"custom\",\n        check: \"custom\",\n        fn: fn,\n        ...util.normalizeParams(_params),\n    });\n    return schema;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _superRefine(fn, params) {\n    const ch = _check((payload) => {\n        payload.addIssue = (issue) => {\n            if (typeof issue === \"string\") {\n                payload.issues.push(util.issue(issue, payload.value, ch._zod.def));\n            }\n            else {\n                // for Zod 3 backwards compatibility\n                const _issue = issue;\n                if (_issue.fatal)\n                    _issue.continue = false;\n                _issue.code ?? (_issue.code = \"custom\");\n                if (!(\"input\" in _issue))\n                    _issue.input = payload.value;\n                _issue.inst ?? (_issue.inst = ch);\n                _issue.continue ?? (_issue.continue = !ch._zod.def.abort); // abort is always undefined, so this is always true...\n                payload.issues.push(util.issue(_issue));\n            }\n        };\n        return fn(payload.value, payload);\n    }, params);\n    return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _check(fn, params) {\n    const ch = new checks.$ZodCheck({\n        check: \"custom\",\n        ...util.normalizeParams(params),\n    });\n    ch._zod.check = fn;\n    return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function describe(description) {\n    const ch = new checks.$ZodCheck({ check: \"describe\" });\n    ch._zod.onattach = [\n        (inst) => {\n            const existing = registries.globalRegistry.get(inst) ?? {};\n            registries.globalRegistry.add(inst, { ...existing, description });\n        },\n    ];\n    ch._zod.check = () => { }; // no-op check\n    return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function meta(metadata) {\n    const ch = new checks.$ZodCheck({ check: \"meta\" });\n    ch._zod.onattach = [\n        (inst) => {\n            const existing = registries.globalRegistry.get(inst) ?? {};\n            registries.globalRegistry.add(inst, { ...existing, ...metadata });\n        },\n    ];\n    ch._zod.check = () => { }; // no-op check\n    return ch;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringbool(Classes, _params) {\n    const params = util.normalizeParams(_params);\n    let truthyArray = params.truthy ?? [\"true\", \"1\", \"yes\", \"on\", \"y\", \"enabled\"];\n    let falsyArray = params.falsy ?? [\"false\", \"0\", \"no\", \"off\", \"n\", \"disabled\"];\n    if (params.case !== \"sensitive\") {\n        truthyArray = truthyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n        falsyArray = falsyArray.map((v) => (typeof v === \"string\" ? v.toLowerCase() : v));\n    }\n    const truthySet = new Set(truthyArray);\n    const falsySet = new Set(falsyArray);\n    const _Codec = Classes.Codec ?? schemas.$ZodCodec;\n    const _Boolean = Classes.Boolean ?? schemas.$ZodBoolean;\n    const _String = Classes.String ?? schemas.$ZodString;\n    const stringSchema = new _String({ type: \"string\", error: params.error });\n    const booleanSchema = new _Boolean({ type: \"boolean\", error: params.error });\n    const codec = new _Codec({\n        type: \"pipe\",\n        in: stringSchema,\n        out: booleanSchema,\n        transform: ((input, payload) => {\n            let data = input;\n            if (params.case !== \"sensitive\")\n                data = data.toLowerCase();\n            if (truthySet.has(data)) {\n                return true;\n            }\n            else if (falsySet.has(data)) {\n                return false;\n            }\n            else {\n                payload.issues.push({\n                    code: \"invalid_value\",\n                    expected: \"stringbool\",\n                    values: [...truthySet, ...falsySet],\n                    input: payload.value,\n                    inst: codec,\n                    continue: false,\n                });\n                return {};\n            }\n        }),\n        reverseTransform: ((input, _payload) => {\n            if (input === true) {\n                return truthyArray[0] || \"true\";\n            }\n            else {\n                return falsyArray[0] || \"false\";\n            }\n        }),\n        error: params.error,\n    });\n    codec._zod.bag.truthy = truthyArray;\n    codec._zod.bag.falsy = falsyArray;\n    codec._zod.bag.case = params.case ?? \"insensitive\";\n    return codec;\n}\n// @__NO_SIDE_EFFECTS__\nexport function _stringFormat(Class, format, fnOrRegex, _params = {}) {\n    const params = util.normalizeParams(_params);\n    const def = {\n        check: \"string_format\",\n        type: \"string\",\n        format,\n        fn: typeof fnOrRegex === \"function\" ? fnOrRegex : (val) => fnOrRegex.test(val),\n        ...params,\n    };\n    if (fnOrRegex instanceof RegExp) {\n        def.pattern = fnOrRegex;\n    }\n    const inst = new Class(def);\n    return inst;\n}\n","import { globalRegistry } from \"./registries.js\";\nimport { assignProp } from \"./util.js\";\nfunction assignProps(target, ...sources) {\n    for (const source of sources) {\n        for (const key of Reflect.ownKeys(source)) {\n            if (Object.prototype.propertyIsEnumerable.call(source, key)) {\n                assignProp(target, key, source[key]);\n            }\n        }\n    }\n    return target;\n}\n// function initializeContext<T extends schemas.$ZodType>(inputs: JSONSchemaGeneratorParams<T>): ToJSONSchemaContext<T> {\n//   return {\n//     processor: inputs.processor,\n//     metadataRegistry: inputs.metadata ?? globalRegistry,\n//     target: inputs.target ?? \"draft-2020-12\",\n//     unrepresentable: inputs.unrepresentable ?? \"throw\",\n//   };\n// }\nexport function initializeContext(params) {\n    // Normalize target: convert old non-hyphenated versions to hyphenated versions\n    let target = params?.target ?? \"draft-2020-12\";\n    if (target === \"draft-4\")\n        target = \"draft-04\";\n    if (target === \"draft-7\")\n        target = \"draft-07\";\n    return {\n        processors: params.processors ?? {},\n        metadataRegistry: params?.metadata ?? globalRegistry,\n        target,\n        unrepresentable: params?.unrepresentable ?? \"throw\",\n        override: params?.override ?? (() => { }),\n        io: params?.io ?? \"output\",\n        counter: 0,\n        seen: new Map(),\n        sharedDefsExtractedFor: undefined,\n        sharedEmitDoneFor: undefined,\n        cycles: params?.cycles ?? \"ref\",\n        reused: params?.reused ?? \"inline\",\n        intersections: [],\n        deferred: [],\n        external: params?.external ?? undefined,\n    };\n}\n/**\n * Applies the `unrepresentable` setting at a site that has no JSON Schema equivalent. Throws\n * `message` unless the setting (or the handler's return value) says otherwise. Returns `true` if a\n * custom JSON Schema was written into `json`, in which case the caller must not write its own.\n */\nexport function handleUnrepresentable(schema, ctx, json, params, message) {\n    const result = typeof ctx.unrepresentable === \"function\"\n        ? ctx.unrepresentable({ zodSchema: schema, path: params.path, message })\n        : ctx.unrepresentable;\n    if (result === \"any\")\n        return false;\n    if (result === undefined || result === \"throw\")\n        throw new Error(message);\n    Object.assign(json, result);\n    return true;\n}\n// never rename this back to `process`: bundler polyfills inject a top-level `const process` that a lexical declaration of the same name collides with (#6397)\nexport function processSchema(schema, ctx, _params = { path: [], schemaPath: [] }) {\n    var _a;\n    const def = schema._zod.def;\n    // check for schema in seens\n    const seen = ctx.seen.get(schema);\n    if (seen) {\n        seen.count++;\n        // check if cycle\n        const isCycle = _params.schemaPath.includes(schema);\n        if (isCycle) {\n            seen.cycle = _params.path;\n        }\n        return seen.schema;\n    }\n    // initialize\n    const result = { schema: {}, count: 1, cycle: undefined, path: _params.path };\n    ctx.seen.set(schema, result);\n    ctx.sharedDefsExtractedFor = undefined;\n    ctx.sharedEmitDoneFor = undefined;\n    // custom method overrides default behavior\n    const overrideSchema = schema._zod.toJSONSchema?.();\n    if (overrideSchema) {\n        result.schema = overrideSchema;\n    }\n    else {\n        const params = {\n            ..._params,\n            schemaPath: [..._params.schemaPath, schema],\n            path: _params.path,\n        };\n        if (schema._zod.processJSONSchema) {\n            schema._zod.processJSONSchema(ctx, result.schema, params);\n        }\n        else {\n            const _json = result.schema;\n            const processor = ctx.processors[def.type];\n            if (!processor) {\n                throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);\n            }\n            processor(schema, ctx, _json, params);\n        }\n        const parent = schema._zod.parent;\n        if (parent) {\n            // Also set ref if processor didn't (for inheritance)\n            if (!result.ref)\n                result.ref = parent;\n            processSchema(parent, ctx, params);\n            ctx.seen.get(parent).isParent = true;\n        }\n    }\n    // metadata\n    const meta = ctx.metadataRegistry.get(schema);\n    if (meta)\n        assignProps(result.schema, meta);\n    if (ctx.io === \"input\" && isTransforming(schema)) {\n        // examples/defaults only apply to output type of pipe\n        delete result.schema.examples;\n        delete result.schema.default;\n    }\n    // set prefault as default\n    if (ctx.io === \"input\" && \"_prefault\" in result.schema)\n        (_a = result.schema).default ?? (_a.default = result.schema._prefault);\n    delete result.schema._prefault;\n    // pulling fresh from ctx.seen in case it was overwritten\n    const _result = ctx.seen.get(schema);\n    return _result.schema;\n}\n/** @deprecated Renamed to `processSchema`. An export alias declares no binding, so it is safe to keep. */\nexport { processSchema as process };\n// Escape a reference token for use in a JSON Pointer fragment (RFC 6901): `~` becomes `~0` and `/` becomes `~1`. The `~` replacement must run first.\nfunction encodeJSONPointerSegment(segment) {\n    return segment.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n}\nexport function extractDefs(ctx, schema\n// params: EmitParams\n) {\n    // iterate over seen map;\n    const root = ctx.seen.get(schema);\n    if (!root)\n        throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n    // With `external` set, every registered schema resolves through the external branch of `makeURI`, so the root branch below produces the same ref the external branch would — this pass is identical whichever schema it is called with, and only needs to run once.\n    if (ctx.external && ctx.sharedDefsExtractedFor === ctx.external)\n        return;\n    // Track ids to detect duplicates across different schemas\n    const idToSchema = new Map();\n    for (const entry of ctx.seen.entries()) {\n        const id = ctx.metadataRegistry.get(entry[0])?.id;\n        if (id) {\n            const existing = idToSchema.get(id);\n            if (existing && existing !== entry[0]) {\n                throw new Error(`Duplicate schema id \"${id}\" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);\n            }\n            idToSchema.set(id, entry[0]);\n        }\n    }\n    // returns a ref to the schema defId will be empty if the ref points to an external schema (or #)\n    const makeURI = (entry) => {\n        // comparing the seen objects because sometimes multiple schemas map to the same seen object. e.g. lazy\n        // external is configured\n        const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n        if (ctx.external) {\n            const externalId = ctx.external.registry.get(entry[0])?.id; // ?? \"__shared\";// `__schema${ctx.counter++}`;\n            // check if schema is in the external registry\n            const uriGenerator = ctx.external.uri ?? ((id) => id);\n            if (externalId) {\n                return { ref: uriGenerator(externalId) };\n            }\n            // otherwise, add to __shared\n            const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;\n            entry[1].defId = id; // set defId so it will be reused if needed\n            return { defId: id, ref: `${uriGenerator(\"__shared\")}#/${defsSegment}/${encodeJSONPointerSegment(id)}` };\n        }\n        const uriPrefix = `#`;\n        const defUriPrefix = `${uriPrefix}/${defsSegment}/`;\n        // an id-less root has nowhere to be extracted to, so it stays inline and self-references as `#`\n        if (entry[1] === root && !entry[1].schema.id) {\n            return { ref: uriPrefix };\n        }\n        // self-contained schema\n        const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;\n        return { defId, ref: defUriPrefix + encodeJSONPointerSegment(defId) };\n    };\n    // stored cached version in `def` property remove all properties, set $ref\n    const extractToDef = (entry) => {\n        // if the schema is already a reference, do not extract it\n        if (entry[1].schema.$ref) {\n            return;\n        }\n        const seen = entry[1];\n        const { ref, defId } = makeURI(entry);\n        seen.def = { ...seen.schema };\n        // defId won't be set if the schema is a reference to an external schema or if the schema is the root schema\n        if (defId)\n            seen.defId = defId;\n        // wipe away all properties except $ref\n        const schema = seen.schema;\n        for (const key in schema) {\n            delete schema[key];\n        }\n        schema.$ref = ref;\n    };\n    // throw on cycles\n    // break cycles\n    if (ctx.cycles === \"throw\") {\n        for (const entry of ctx.seen.entries()) {\n            const seen = entry[1];\n            if (seen.cycle) {\n                throw new Error(\"Cycle detected: \" +\n                    `#/${seen.cycle?.join(\"/\")}/<root>` +\n                    '\\n\\nSet the `cycles` parameter to `\"ref\"` to resolve cyclical schemas with defs.');\n            }\n        }\n    }\n    // extract schemas into $defs\n    for (const entry of ctx.seen.entries()) {\n        const seen = entry[1];\n        // convert root schema to # $ref\n        if (schema === entry[0]) {\n            extractToDef(entry); // this has special handling for the root schema\n            continue;\n        }\n        // extract schemas that are in the external registry\n        if (ctx.external) {\n            const ext = ctx.external.registry.get(entry[0])?.id;\n            if (schema !== entry[0] && ext) {\n                extractToDef(entry);\n                continue;\n            }\n        }\n        // extract schemas with `id` meta\n        const id = ctx.metadataRegistry.get(entry[0])?.id;\n        if (id) {\n            extractToDef(entry);\n            continue;\n        }\n        // break cycles\n        if (seen.cycle) {\n            // any\n            extractToDef(entry);\n            continue;\n        }\n        // extract reused schemas\n        if (seen.count > 1) {\n            if (ctx.reused === \"ref\") {\n                extractToDef(entry);\n            }\n        }\n    }\n    if (ctx.external)\n        ctx.sharedDefsExtractedFor = ctx.external;\n}\n/** Rewrites `anyOf: [{type: \"a\"}, {type: \"b\"}]` to `type: [\"a\", \"b\"]`, which every JSON Schema draft treats as equivalent and most consumers render far better for the nullable case. Only branches that are a bare type assertion qualify — anything carrying a constraint, `$ref`, `const` or metadata is left alone. Runs after `flattenRef`, so a branch an override decorated or `$defs` extraction turned into a `$ref` is no longer bare and correctly stays in `anyOf`. `oneOf` is excluded: `integer` and `number` overlap, so \"exactly one\" and \"at least one\" are not the same there. OpenAPI 3.0 is excluded: its `type` must be a single string. */\nfunction compactTypeUnion(schema) {\n    const options = schema.anyOf;\n    if (!Array.isArray(options) || options.length === 0 || schema.type !== undefined)\n        return;\n    const types = [];\n    for (const option of options) {\n        if (!option || typeof option !== \"object\")\n            return;\n        // A branch that is itself a compactible union folds into this one — nested `anyOf` and a flat `type` array say the same thing. Compacting it first also makes the result independent of the order this pass walks the seen map in.\n        compactTypeUnion(option);\n        const keys = Object.keys(option);\n        if (keys.length !== 1 || keys[0] !== \"type\")\n            return;\n        const type = option.type;\n        for (const member of Array.isArray(type) ? type : [type]) {\n            if (typeof member !== \"string\")\n                return;\n            if (!types.includes(member))\n                types.push(member);\n        }\n    }\n    delete schema.anyOf;\n    // A `type` array must be non-empty and unique (metaschema); a single member is spelled as a bare string.\n    schema.type = types.length === 1 ? types[0] : types;\n}\n/** Keywords `foldIntersection` knows how to combine. Anything else — `$ref`, `patternProperties`,\n * an annotation like `description` — makes a member unfoldable, so a constraint this does not\n * understand leaves the `allOf` alone instead of being silently dropped or misattributed. */\nconst FOLDABLE_KEYS = new Set([\"type\", \"properties\", \"required\", \"additionalProperties\"]);\nconst UNION_KEYS = [\"oneOf\", \"anyOf\"];\n/** A member's constraint on a key it does not declare itself. A `catchall` states one; `false`, an absent `additionalProperties`, and the empty schema a loose object emits state nothing. */\nfunction undeclaredConstraint(member) {\n    const extra = member.additionalProperties;\n    if (extra === undefined || extra === false || typeof extra !== \"object\" || extra === null)\n        return null;\n    return Object.keys(extra).length ? extra : null;\n}\n/** Combines object members into the single object they describe together, or returns `null` if any of them carries a keyword outside {@link FOLDABLE_KEYS}. */\nfunction foldObjects(members) {\n    const objects = [];\n    for (const member of members) {\n        // A boolean subschema is legal JSON Schema and carries no keywords to fold.\n        if (typeof member !== \"object\" || member.type !== \"object\")\n            return null;\n        for (const key in member) {\n            if (!FOLDABLE_KEYS.has(key))\n                return null;\n        }\n        objects.push(member);\n    }\n    const properties = {};\n    const required = new Set();\n    for (const object of objects) {\n        for (const key in object.properties) {\n            // `in` would report a `__proto__` key as already present via the prototype chain and skip it.\n            if (Object.prototype.hasOwnProperty.call(properties, key))\n                continue;\n            // Every member constrains this key: the ones that declare it say how, and a `catchall` member constrains it too even though it does not name it. The key has to satisfy all of them, which is the same intersection one level down.\n            const parts = [];\n            for (const other of objects) {\n                const part = other.properties?.[key] ?? undeclaredConstraint(other);\n                if (part === null || part === undefined)\n                    continue;\n                if (!parts.some((seen) => JSON.stringify(seen) === JSON.stringify(part)))\n                    parts.push(part);\n            }\n            const merged = parts.length === 1\n                ? parts[0]\n                : (foldObjects(parts) ?? { allOf: parts });\n            assignProp(properties, key, merged);\n        }\n        for (const key of object.required ?? [])\n            required.add(key);\n    }\n    const folded = { type: \"object\", properties };\n    if (required.size)\n        folded.required = [...required];\n    // A key no member declares is rejected only when every member rejects it, so the fold is closed only when every member is. Otherwise it carries whatever the `catchall` members demand of such a key.\n    if (objects.every((object) => object.additionalProperties === false)) {\n        folded.additionalProperties = false;\n    }\n    else {\n        const constraints = [];\n        for (const object of objects) {\n            const constraint = undeclaredConstraint(object);\n            if (constraint && !constraints.some((seen) => JSON.stringify(seen) === JSON.stringify(constraint)))\n                constraints.push(constraint);\n        }\n        if (constraints.length === 1)\n            folded.additionalProperties = constraints[0];\n        else if (constraints.length > 1)\n            folded.additionalProperties = { allOf: constraints };\n    }\n    return folded;\n}\n/** `additionalProperties` in an `allOf` member sees only that member's own `properties`, so two\n * closed object members reject each other's keys and the schema validates nothing. Zod's parser\n * pools the key sets instead — `handleIntersectionResults` reports a key as unrecognized only when\n * *every* side rejects it — so the emitted schema has to pool them too, and folding the members\n * into one object is the encoding that says so on every target.\n *\n * This runs from `finalize`, after `extractDefs`, which is what keeps it clear of the `$ref`\n * machinery: a member extracted into `$defs` is already a `$ref` by now and declines to fold, so it\n * keeps its reference and its own closedness rather than being inlined as a stale copy. */\nfunction foldIntersection(json) {\n    const allOf = json.allOf;\n    if (!Array.isArray(allOf) || allOf.length < 2)\n        return;\n    // An `override` runs before this pass and may have written object keywords onto the intersection itself. Those are deliberate, so decline rather than overwrite them.\n    for (const key of FOLDABLE_KEYS)\n        if (key in json)\n            return;\n    // An intersection distributes over a union: `A & (X | Y)` is `(A & X) | (A & Y)`. Only the first union is distributed over; a second one stays among the members every branch folds against, where it fails the object check and declines the whole intersection rather than multiplying out.\n    const unions = allOf.filter((m) => UNION_KEYS.some((k) => Array.isArray(m[k])));\n    let folded = null;\n    if (!unions.length) {\n        folded = foldObjects(allOf);\n    }\n    else {\n        const union = unions[0];\n        const keyword = UNION_KEYS.find((k) => Array.isArray(union[k]));\n        if (Object.keys(union).length !== 1)\n            return;\n        const rest = allOf.filter((m) => m !== union);\n        const branches = union[keyword].map((branch) => foldObjects([...rest, branch]));\n        if (branches.some((b) => !b))\n            return;\n        folded = { [keyword]: branches };\n    }\n    if (!folded)\n        return;\n    delete json.allOf;\n    assignProps(json, folded);\n}\nexport function finalize(ctx, schema) {\n    const root = ctx.seen.get(schema);\n    if (!root)\n        throw new Error(\"Unprocessed schema. This is a bug in Zod.\");\n    // flatten refs - inherit properties from parent schemas\n    const flattenRef = (zodSchema) => {\n        const seen = ctx.seen.get(zodSchema);\n        // already processed\n        if (seen.ref === null)\n            return;\n        const schema = seen.def ?? seen.schema;\n        const _cached = { ...schema };\n        const ref = seen.ref;\n        seen.ref = null; // prevent infinite recursion\n        if (ref) {\n            flattenRef(ref);\n            const refSeen = ctx.seen.get(ref);\n            const refSchema = refSeen.schema;\n            // merge referenced schema into current\n            if (refSchema.$ref && (ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\")) {\n                // older drafts can't combine $ref with other properties\n                schema.allOf = schema.allOf ?? [];\n                schema.allOf.push(refSchema);\n            }\n            else {\n                assignProps(schema, refSchema);\n            }\n            // restore child's own properties (child wins)\n            assignProps(schema, _cached);\n            const isParentRef = zodSchema._zod.parent === ref;\n            // For parent chain, child is a refinement - remove parent-only properties\n            if (isParentRef) {\n                for (const key in schema) {\n                    if (key === \"$ref\" || key === \"allOf\")\n                        continue;\n                    if (!(key in _cached)) {\n                        delete schema[key];\n                    }\n                }\n            }\n            // When ref was extracted to $defs, remove properties that match the definition\n            if (refSchema.$ref && refSeen.def) {\n                for (const key in schema) {\n                    if (key === \"$ref\" || key === \"allOf\")\n                        continue;\n                    if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) {\n                        delete schema[key];\n                    }\n                }\n            }\n        }\n        // If parent was extracted (has $ref), propagate $ref to this schema. This handles cases like: readonly().meta({id}).describe() where processor sets ref to innerType but parent should be referenced\n        const parent = zodSchema._zod.parent;\n        if (parent && parent !== ref) {\n            // Ensure parent is processed first so its def has inherited properties\n            flattenRef(parent);\n            const parentSeen = ctx.seen.get(parent);\n            if (parentSeen?.schema.$ref) {\n                schema.$ref = parentSeen.schema.$ref;\n                // De-duplicate with parent's definition\n                if (parentSeen.def) {\n                    for (const key in schema) {\n                        if (key === \"$ref\" || key === \"allOf\")\n                            continue;\n                        if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) {\n                            delete schema[key];\n                        }\n                    }\n                }\n            }\n        }\n        // execute overrides\n        ctx.override({\n            zodSchema: zodSchema,\n            jsonSchema: schema,\n            path: seen.path ?? [],\n        });\n    };\n    // Flattening walks the whole map and clears each `ref` as it goes, so a second call over the same map is a no-op scan. Skip it outright once it has run for a registry conversion.\n    if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {\n        for (const entry of [...ctx.seen.entries()].reverse()) {\n            flattenRef(entry[0]);\n        }\n        if (ctx.target !== \"openapi-3.0\") {\n            for (const entry of ctx.seen.entries()) {\n                compactTypeUnion(entry[1].def ?? entry[1].schema);\n            }\n        }\n        for (const rewrite of ctx.deferred)\n            rewrite();\n        // After flattening, every member that was extracted is a `$ref`, so the fold sees the final shape. A schema that inherits an intersection — through `z.lazy`, or any `ref` chain — holds the same `allOf` array, so fold by array identity to catch every copy.\n        if (ctx.intersections.length) {\n            const carriers = new Map();\n            for (const seen of ctx.seen.values()) {\n                for (const json of [seen.schema, seen.def]) {\n                    const allOf = json?.allOf;\n                    if (!Array.isArray(allOf))\n                        continue;\n                    const existing = carriers.get(allOf);\n                    if (existing)\n                        existing.push(json);\n                    else\n                        carriers.set(allOf, [json]);\n                }\n            }\n            for (const allOf of ctx.intersections) {\n                for (const json of carriers.get(allOf) ?? [])\n                    foldIntersection(json);\n            }\n        }\n    }\n    const result = {};\n    if (ctx.target === \"draft-2020-12\") {\n        result.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n    }\n    else if (ctx.target === \"draft-07\") {\n        result.$schema = \"http://json-schema.org/draft-07/schema#\";\n    }\n    else if (ctx.target === \"draft-04\") {\n        result.$schema = \"http://json-schema.org/draft-04/schema#\";\n    }\n    else if (ctx.target === \"openapi-3.0\") {\n        // OpenAPI 3.0 schema objects should not include a $schema property\n    }\n    else {\n        // Arbitrary string values are allowed but won't have a $schema property set\n    }\n    if (ctx.external?.uri) {\n        const id = ctx.external.registry.get(schema)?.id;\n        if (!id)\n            throw new Error(\"Schema is missing an `id` property\");\n        result.$id = ctx.external.uri(id);\n    }\n    // when the root was extracted into $defs, `root.schema` is the `$ref` wrapper and `root.def` is the body that now lives under $defs\n    assignProps(result, root.defId ? root.schema : (root.def ?? root.schema));\n    // The `id` in `.meta()` is a Zod-specific registration tag used to extract schemas into $defs — it is not user-facing JSON Schema metadata. Strip it from the output body where it would otherwise leak. The id is preserved implicitly via the $defs key (and via $ref paths).\n    const rootMetaId = ctx.metadataRegistry.get(schema)?.id;\n    if (rootMetaId !== undefined && result.id === rootMetaId)\n        delete result.id;\n    // build defs object. With `external`, `defs` is the shared object every schema writes into, so the same entries are reassigned on every call. Without it, `defs` is fresh per call and must be rebuilt.\n    const defs = ctx.external?.defs ?? {};\n    if (!ctx.external || ctx.sharedEmitDoneFor !== ctx.external) {\n        for (const entry of ctx.seen.entries()) {\n            const seen = entry[1];\n            if (seen.def && seen.defId) {\n                if (seen.def.id === seen.defId)\n                    delete seen.def.id;\n                assignProp(defs, seen.defId, seen.def);\n            }\n        }\n    }\n    if (ctx.external)\n        ctx.sharedEmitDoneFor = ctx.external;\n    // set definitions in result\n    if (ctx.external) {\n    }\n    else {\n        if (Object.keys(defs).length > 0) {\n            if (ctx.target === \"draft-2020-12\") {\n                result.$defs = defs;\n            }\n            else {\n                result.definitions = defs;\n            }\n        }\n    }\n    try {\n        // this \"finalizes\" this schema and ensures all cycles are removed each call to finalize() is functionally independent though the seen map is shared\n        const finalized = JSON.parse(JSON.stringify(result));\n        Object.defineProperty(finalized, \"~standard\", {\n            value: {\n                ...schema[\"~standard\"],\n                jsonSchema: {\n                    input: createStandardJSONSchemaMethod(schema, \"input\", ctx.processors),\n                    output: createStandardJSONSchemaMethod(schema, \"output\", ctx.processors),\n                },\n            },\n            enumerable: false,\n            writable: false,\n        });\n        return finalized;\n    }\n    catch (_err) {\n        throw new Error(\"Error converting schema to JSON.\");\n    }\n}\nfunction isTransforming(_schema, _ctx) {\n    const ctx = _ctx ?? { seen: new Set() };\n    if (ctx.seen.has(_schema))\n        return false;\n    ctx.seen.add(_schema);\n    const def = _schema._zod.def;\n    if (def.type === \"transform\")\n        return true;\n    if (def.type === \"array\")\n        return isTransforming(def.element, ctx);\n    if (def.type === \"set\")\n        return isTransforming(def.valueType, ctx);\n    if (def.type === \"lazy\")\n        return isTransforming(def.getter(), ctx);\n    if (def.type === \"promise\" ||\n        def.type === \"optional\" ||\n        def.type === \"nonoptional\" ||\n        def.type === \"nullable\" ||\n        def.type === \"readonly\" ||\n        def.type === \"default\" ||\n        def.type === \"prefault\" ||\n        def.type === \"catch\") {\n        return isTransforming(def.innerType, ctx);\n    }\n    if (def.type === \"intersection\") {\n        return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);\n    }\n    if (def.type === \"record\" || def.type === \"map\") {\n        return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);\n    }\n    if (def.type === \"pipe\") {\n        if (_schema._zod.traits.has(\"$ZodCodec\"))\n            return true;\n        return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);\n    }\n    if (def.type === \"object\") {\n        for (const key in def.shape) {\n            if (isTransforming(def.shape[key], ctx))\n                return true;\n        }\n        return false;\n    }\n    if (def.type === \"union\") {\n        for (const option of def.options) {\n            if (isTransforming(option, ctx))\n                return true;\n        }\n        return false;\n    }\n    if (def.type === \"tuple\") {\n        for (const item of def.items) {\n            if (isTransforming(item, ctx))\n                return true;\n        }\n        if (def.rest && isTransforming(def.rest, ctx))\n            return true;\n        return false;\n    }\n    return false;\n}\n/**\n * Creates a toJSONSchema method for a schema instance.\n * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.\n */\nexport const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {\n    const ctx = initializeContext({ ...params, processors });\n    processSchema(schema, ctx);\n    extractDefs(ctx, schema);\n    return finalize(ctx, schema);\n};\nexport const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {\n    const { libraryOptions, target } = params ?? {};\n    const ctx = initializeContext({ ...(libraryOptions ?? {}), target, io, processors });\n    processSchema(schema, ctx);\n    extractDefs(ctx, schema);\n    return finalize(ctx, schema);\n};\n","import * as regexes from \"./regexes.js\";\nimport { base64Charset, base64urlCharset } from \"./schemas.js\";\nimport { extractDefs, finalize, handleUnrepresentable, initializeContext, processSchema, } from \"./to-json-schema.js\";\nimport { BIGINT_FORMAT_RANGES, NUMBER_FORMAT_RANGES, assignProp, getEnumValues } from \"./util.js\";\nconst narrowMin = (agg, key, value) => {\n    if (agg[key] === undefined || value > agg[key])\n        agg[key] = value;\n};\nconst narrowMax = (agg, key, value) => {\n    if (agg[key] === undefined || value < agg[key])\n        agg[key] = value;\n};\nconst narrowBoth = (agg, value) => {\n    narrowMin(agg, \"minimum\", value);\n    narrowMax(agg, \"maximum\", value);\n};\nconst addDivisor = (agg, value) => {\n    agg.multipleOf ?? (agg.multipleOf = []);\n    if (!agg.multipleOf.includes(value))\n        agg.multipleOf.push(value);\n};\nconst addPattern = (agg, pattern) => {\n    agg.patterns ?? (agg.patterns = new Set());\n    agg.patterns.add(pattern);\n};\nconst intersectMime = (agg, mime) => {\n    agg.mime = agg.mime ? agg.mime.filter((m) => mime.includes(m)) : [...mime];\n};\n// last-wins, matching the bag's historical write order; the flag keeps an integer format from being lost to a later float one\nconst setFormat = (agg, format) => {\n    agg.format = format;\n    if (format.includes(\"int\"))\n        agg.isInt = true;\n};\nconst minContributor = (agg, def) => narrowMin(agg, \"minimum\", def.minimum);\nconst maxContributor = (agg, def) => narrowMax(agg, \"maximum\", def.maximum);\nconst formatContributor = (ranges) => (agg, def) => {\n    setFormat(agg, def.format);\n    const [minimum, maximum] = ranges[def.format];\n    narrowMin(agg, \"minimum\", minimum);\n    narrowMax(agg, \"maximum\", maximum);\n};\nconst contributors = {\n    greater_than: (agg, def) => narrowMin(agg, def.inclusive ? \"minimum\" : \"exclusiveMinimum\", def.value),\n    less_than: (agg, def) => narrowMax(agg, def.inclusive ? \"maximum\" : \"exclusiveMaximum\", def.value),\n    multiple_of: (agg, def) => addDivisor(agg, def.value),\n    number_format: formatContributor(NUMBER_FORMAT_RANGES),\n    bigint_format: formatContributor(BIGINT_FORMAT_RANGES),\n    min_length: minContributor,\n    max_length: maxContributor,\n    length_equals: (agg, def) => narrowBoth(agg, def.length),\n    min_size: minContributor,\n    max_size: maxContributor,\n    size_equals: (agg, def) => narrowBoth(agg, def.size),\n    string_format: (agg, def) => {\n        setFormat(agg, def.format);\n        if (def.pattern)\n            addPattern(agg, def.pattern);\n        if (def.format === \"base64\" || def.format === \"base64url\")\n            agg.contentEncoding = def.format;\n        if (def.local || def.precision === -1)\n            agg.laxFormat = true;\n    },\n    mime_type: (agg, def) => intersectMime(agg, def.mime),\n};\nexport function aggregateChecks(schema) {\n    const agg = {};\n    const def = schema._zod.def;\n    // a format schema is its own first check, same rule as $ZodType init\n    const list = schema._zod.traits.has(\"$ZodCheck\")\n        ? [schema, ...(def.checks ?? [])]\n        : (def.checks ?? []);\n    for (const ch of list)\n        contributors[ch._zod.def.check]?.(agg, ch._zod.def);\n    // reconcile with the bag so third-party onattach contributions still land; first-party residue is never tighter than the fold, so merging it back is idempotent for one and additive for the other\n    const bag = schema._zod.bag;\n    if (bag.minimum !== undefined)\n        narrowMin(agg, \"minimum\", bag.minimum);\n    if (bag.exclusiveMinimum !== undefined)\n        narrowMin(agg, \"exclusiveMinimum\", bag.exclusiveMinimum);\n    if (bag.maximum !== undefined)\n        narrowMax(agg, \"maximum\", bag.maximum);\n    if (bag.exclusiveMaximum !== undefined)\n        narrowMax(agg, \"exclusiveMaximum\", bag.exclusiveMaximum);\n    if (bag.multipleOf !== undefined)\n        addDivisor(agg, bag.multipleOf);\n    if (bag.format !== undefined) {\n        agg.format ?? (agg.format = bag.format);\n        if (bag.format.includes(\"int\"))\n            agg.isInt = true;\n    }\n    if (bag.mime)\n        intersectMime(agg, bag.mime);\n    for (const pattern of bag.patterns ?? [])\n        addPattern(agg, pattern);\n    return agg;\n}\nconst formatMap = {\n    guid: \"uuid\",\n    url: \"uri\",\n    datetime: \"date-time\",\n    json_string: \"json-string\",\n    regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\n// the runtime patterns are lax so parse paths never overflow the regex stack; the emitted schema swaps in the exact block forms, which zod itself never executes\nconst exactPatterns = new Map([\n    [base64Charset, regexes.base64],\n    [base64urlCharset, regexes.base64url],\n]);\nconst exactPattern = (p) => exactPatterns.get(p) ?? p;\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n    const json = _json;\n    json.type = \"string\";\n    const { minimum, maximum, format, patterns, contentEncoding, laxFormat } = aggregateChecks(schema);\n    if (typeof minimum === \"number\")\n        json.minLength = minimum;\n    if (typeof maximum === \"number\")\n        json.maxLength = maximum;\n    // custom pattern overrides format\n    if (format) {\n        json.format = formatMap[format] ?? format;\n        if (json.format === \"\")\n            delete json.format; // empty format is not valid\n        // `z.iso.time()` is never full-time, and `laxFormat` carries the datetime shapes that also accept what their keyword forbids\n        if (format === \"time\" || laxFormat) {\n            delete json.format;\n        }\n    }\n    if (contentEncoding)\n        json.contentEncoding = contentEncoding;\n    if (patterns && patterns.size > 0) {\n        const patternList = [...patterns].map(exactPattern);\n        if (patternList.length === 1)\n            json.pattern = patternList[0].source;\n        else if (patternList.length > 1) {\n            json.allOf = [\n                ...patternList.map((regex) => ({\n                    ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n                        ? { type: \"string\" }\n                        : {}),\n                    pattern: regex.source,\n                })),\n            ];\n        }\n    }\n};\nexport const numberProcessor = (schema, ctx, _json, params) => {\n    const json = _json;\n    const { minimum, maximum, multipleOf, exclusiveMaximum, exclusiveMinimum, isInt } = aggregateChecks(schema);\n    json.type = isInt ? \"integer\" : \"number\";\n    // when both minimum and exclusiveMinimum exist, pick the more restrictive one\n    const exMin = typeof exclusiveMinimum === \"number\" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);\n    const exMax = typeof exclusiveMaximum === \"number\" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);\n    const legacy = ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\";\n    if (exMin) {\n        if (legacy) {\n            json.minimum = exclusiveMinimum;\n            json.exclusiveMinimum = true;\n        }\n        else {\n            json.exclusiveMinimum = exclusiveMinimum;\n        }\n    }\n    else if (typeof minimum === \"number\") {\n        json.minimum = minimum;\n    }\n    if (exMax) {\n        if (legacy) {\n            json.maximum = exclusiveMaximum;\n            json.exclusiveMaximum = true;\n        }\n        else {\n            json.exclusiveMaximum = exclusiveMaximum;\n        }\n    }\n    else if (typeof maximum === \"number\") {\n        json.maximum = maximum;\n    }\n    if (multipleOf) {\n        // JSON Schema requires a divisor strictly greater than zero, and a non-finite one does not survive JSON at all. A negative divisor accepts exactly what its absolute value accepts, so it still maps; zero, NaN and Infinity have no keyword form.\n        const divisors = new Set();\n        for (const divisor of multipleOf) {\n            if (Number.isFinite(divisor) && divisor !== 0)\n                divisors.add(Math.abs(divisor));\n            else\n                handleUnrepresentable(schema, ctx, json, params, `A multipleOf divisor of ${divisor} cannot be represented in JSON Schema`);\n        }\n        // chained divisors are a conjunction the keyword cannot carry alone, so extras ride an allOf, same as stacked patterns\n        const [first, ...rest] = divisors;\n        if (first !== undefined)\n            json.multipleOf = first;\n        if (rest.length)\n            json.allOf = [...(json.allOf ?? []), ...rest.map((m) => ({ multipleOf: m }))];\n    }\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n    json.type = \"boolean\";\n};\nexport const bigintProcessor = (schema, ctx, json, params) => {\n    handleUnrepresentable(schema, ctx, json, params, \"BigInt cannot be represented in JSON Schema\");\n};\nexport const symbolProcessor = (schema, ctx, json, params) => {\n    handleUnrepresentable(schema, ctx, json, params, \"Symbols cannot be represented in JSON Schema\");\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n    if (ctx.target === \"openapi-3.0\") {\n        json.type = \"string\";\n        json.nullable = true;\n        json.enum = [null];\n    }\n    else {\n        json.type = \"null\";\n    }\n};\nexport const undefinedProcessor = (schema, ctx, json, params) => {\n    handleUnrepresentable(schema, ctx, json, params, \"Undefined cannot be represented in JSON Schema\");\n};\nexport const voidProcessor = (schema, ctx, json, params) => {\n    handleUnrepresentable(schema, ctx, json, params, \"Void cannot be represented in JSON Schema\");\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n    json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n    // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n    // empty schema accepts anything\n};\nexport const dateProcessor = (schema, ctx, json, params) => {\n    handleUnrepresentable(schema, ctx, json, params, \"Date cannot be represented in JSON Schema\");\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n    const def = schema._zod.def;\n    const values = getEnumValues(def.entries);\n    // an empty enum accepts nothing, same as z.never()\n    if (values.length === 0) {\n        json.not = {};\n        return;\n    }\n    // Number enums can have both string and number values\n    if (values.every((v) => typeof v === \"number\"))\n        json.type = \"number\";\n    if (values.every((v) => typeof v === \"string\"))\n        json.type = \"string\";\n    json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, params) => {\n    const def = schema._zod.def;\n    // a literal with no values accepts nothing, same as z.never()\n    if (def.values.length === 0) {\n        json.not = {};\n        return;\n    }\n    const vals = [];\n    for (const val of def.values) {\n        if (val === undefined) {\n            // a custom schema replaces the whole literal, so there is nothing left to accumulate\n            if (handleUnrepresentable(schema, ctx, json, params, \"Literal `undefined` cannot be represented in JSON Schema\"))\n                return;\n            // otherwise do not add to vals\n        }\n        else if (typeof val === \"bigint\") {\n            if (handleUnrepresentable(schema, ctx, json, params, \"BigInt literals cannot be represented in JSON Schema\"))\n                return;\n            vals.push(Number(val));\n        }\n        else {\n            vals.push(val);\n        }\n    }\n    if (vals.length === 0) {\n        // do nothing (an undefined literal was stripped)\n    }\n    else if (vals.length === 1) {\n        const val = vals[0];\n        json.type = val === null ? \"null\" : typeof val;\n        if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n            json.enum = [val];\n        }\n        else {\n            json.const = val;\n        }\n    }\n    else {\n        if (vals.every((v) => typeof v === \"number\"))\n            json.type = \"number\";\n        if (vals.every((v) => typeof v === \"string\"))\n            json.type = \"string\";\n        if (vals.every((v) => typeof v === \"boolean\"))\n            json.type = \"boolean\";\n        if (vals.every((v) => v === null))\n            json.type = \"null\";\n        json.enum = vals;\n    }\n};\nexport const nanProcessor = (schema, ctx, json, params) => {\n    handleUnrepresentable(schema, ctx, json, params, \"NaN cannot be represented in JSON Schema\");\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n    const _json = json;\n    const pattern = schema._zod.pattern;\n    if (!pattern)\n        throw new Error(\"Pattern not found in template literal\");\n    _json.type = \"string\";\n    _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n    const _json = json;\n    _json.type = \"string\";\n    _json.format = \"binary\";\n    _json.contentEncoding = \"binary\";\n    const { minimum, maximum, mime } = aggregateChecks(schema);\n    if (minimum !== undefined)\n        _json.minLength = minimum;\n    if (maximum !== undefined)\n        _json.maxLength = maximum;\n    if (!mime)\n        return;\n    // an empty intersection means the mime checks share no value, so nothing passes at runtime; `anyOf` must be non-empty, so the false schema is `not: {}`\n    if (mime.length === 0)\n        _json.not = {};\n    else if (mime.length === 1)\n        _json.contentMediaType = mime[0];\n    // only contentMediaType differs, so the shared props stay at the root\n    else\n        _json.anyOf = mime.map((m) => ({ contentMediaType: m }));\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n    json.type = \"boolean\";\n};\nexport const customProcessor = (schema, ctx, json, params) => {\n    handleUnrepresentable(schema, ctx, json, params, \"Custom types cannot be represented in JSON Schema\");\n};\nexport const functionProcessor = (schema, ctx, json, params) => {\n    handleUnrepresentable(schema, ctx, json, params, \"Function types cannot be represented in JSON Schema\");\n};\nexport const transformProcessor = (schema, ctx, json, params) => {\n    handleUnrepresentable(schema, ctx, json, params, \"Transforms cannot be represented in JSON Schema\");\n};\nexport const mapProcessor = (schema, ctx, json, params) => {\n    handleUnrepresentable(schema, ctx, json, params, \"Map cannot be represented in JSON Schema\");\n};\nexport const setProcessor = (schema, ctx, json, params) => {\n    handleUnrepresentable(schema, ctx, json, params, \"Set cannot be represented in JSON Schema\");\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n    const json = _json;\n    const def = schema._zod.def;\n    const { minimum, maximum } = aggregateChecks(schema);\n    if (typeof minimum === \"number\")\n        json.minItems = minimum;\n    if (typeof maximum === \"number\")\n        json.maxItems = maximum;\n    json.type = \"array\";\n    json.items = processSchema(def.element, ctx, {\n        ...params,\n        path: [...params.path, \"items\"],\n    });\n};\n// Transform and catch set `optin = \"optional\"` at runtime so the parser lets them observe an\n// absent key, but their declared input type stays required. An input JSON Schema describes the\n// declared type, so resolve past them to the schema that actually carries the optionality.\n// Used by both `objectProcessor` (for `required`) and `tupleProcessor` (for `minItems`); see\n// wiki/optionality.md, \"The JSON Schema emitter reads the *static* value\".\nfunction inputOptin(schema) {\n    const def = schema._zod.def;\n    if (def.type === \"pipe\" && def.in._zod.traits.has(\"$ZodTransform\")) {\n        return inputOptin(def.out);\n    }\n    if (def.type === \"catch\") {\n        return inputOptin(def.innerType);\n    }\n    return schema._zod.optin;\n}\nexport const objectProcessor = (schema, ctx, _json, params) => {\n    const json = _json;\n    const def = schema._zod.def;\n    const shape = def.shape;\n    // dropping it while still emitting `additionalProperties: false` would emit a schema that rejects data this one requires\n    const symbolKeys = Object.getOwnPropertySymbols(shape);\n    if (symbolKeys.length &&\n        handleUnrepresentable(schema, ctx, json, params, \"Symbol keys cannot be represented in JSON Schema\")) {\n        return;\n    }\n    json.type = \"object\";\n    json.properties = {};\n    for (const key in shape) {\n        // assignProp so a __proto__ key becomes an own property instead of hitting the inherited setter on the plain {} we build into\n        assignProp(json.properties, key, processSchema(shape[key], ctx, {\n            ...params,\n            path: [...params.path, \"properties\", key],\n        }));\n    }\n    // required keys\n    const requiredKeys = [];\n    for (const key of Object.keys(shape)) {\n        const field = def.shape[key];\n        if (ctx.io === \"input\" ? inputOptin(field) === undefined : field._zod.optout === undefined) {\n            requiredKeys.push(key);\n        }\n    }\n    if (requiredKeys.length > 0) {\n        json.required = requiredKeys;\n    }\n    // catchall\n    if (def.catchall?._zod.def.type === \"never\") {\n        // strict\n        json.additionalProperties = false;\n    }\n    else if (!def.catchall) {\n        // regular\n        if (ctx.io === \"output\")\n            json.additionalProperties = false;\n    }\n    else if (def.catchall) {\n        json.additionalProperties = processSchema(def.catchall, ctx, {\n            ...params,\n            path: [...params.path, \"additionalProperties\"],\n        });\n    }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n    const def = schema._zod.def;\n    // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches). This includes both z.xor() and discriminated unions\n    const isExclusive = def.inclusive === false;\n    const options = def.options.map((x, i) => processSchema(x, ctx, {\n        ...params,\n        path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n    }));\n    if (isExclusive) {\n        json.oneOf = options;\n    }\n    else {\n        json.anyOf = options;\n    }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n    const def = schema._zod.def;\n    const a = processSchema(def.left, ctx, {\n        ...params,\n        path: [...params.path, \"allOf\", 0],\n    });\n    const b = processSchema(def.right, ctx, {\n        ...params,\n        path: [...params.path, \"allOf\", 1],\n    });\n    const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n    const allOf = [\n        ...(isSimpleIntersection(a) ? a.allOf : [a]),\n        ...(isSimpleIntersection(b) ? b.allOf : [b]),\n    ];\n    json.allOf = allOf;\n    // Recorded innermost first, so a nested intersection has already folded by the time this one is considered. The array is the handle rather than the schema, because a wrapper that inherits this schema shares the same array; `finalize` folds every object holding it. See `foldIntersection`.\n    ctx.intersections.push(allOf);\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n    const json = _json;\n    const def = schema._zod.def;\n    json.type = \"array\";\n    const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n    const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n    const prefixItems = def.items.map((x, i) => processSchema(x, ctx, {\n        ...params,\n        path: [...params.path, prefixPath, i],\n    }));\n    const rest = def.rest\n        ? processSchema(def.rest, ctx, {\n            ...params,\n            path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n        })\n        : null;\n    let minItems = def.items.length;\n    while (minItems > 0) {\n        const item = def.items[minItems - 1];\n        const optional = ctx.io === \"input\" ? inputOptin(item) !== undefined : item._zod.optout === \"optional\";\n        if (!optional)\n            break;\n        minItems--;\n    }\n    const maxItems = def.items.length;\n    const isClosed = !def.rest;\n    if (ctx.target === \"draft-2020-12\") {\n        json.prefixItems = prefixItems;\n        if (isClosed) {\n            json.items = false;\n        }\n        else if (rest) {\n            json.items = rest;\n        }\n        if (minItems > 0)\n            json.minItems = minItems;\n        if (isClosed)\n            json.maxItems = maxItems;\n    }\n    else if (ctx.target === \"openapi-3.0\") {\n        json.items = {\n            anyOf: prefixItems,\n        };\n        if (rest) {\n            json.items.anyOf.push(rest);\n        }\n        if (minItems > 0)\n            json.minItems = minItems;\n        if (isClosed)\n            json.maxItems = maxItems;\n    }\n    else {\n        json.items = prefixItems;\n        if (isClosed) {\n            json.additionalItems = false;\n        }\n        else if (rest) {\n            json.additionalItems = rest;\n        }\n        if (minItems > 0)\n            json.minItems = minItems;\n        if (isClosed)\n            json.maxItems = maxItems;\n    }\n    // explicit user-defined length checks take precedence\n    const { minimum, maximum } = aggregateChecks(schema);\n    if (typeof minimum === \"number\")\n        json.minItems = minimum;\n    if (typeof maximum === \"number\")\n        json.maxItems = maximum;\n};\n/** JSON object keys are always strings, so a numeric record key schema is re-expressed over the\n * numeric-string form the record parser matches. Deferred to `finalize`, after the flatten: a key\n * behind a wrapper only carries its own `type` before then, and a union key only has its branches.\n *\n * A numeric bound cannot apply to a property name, so `minimum` and its siblings are dropped rather\n * than carried over: keeping them beside `type: \"string\"` reproduces the match-nothing schema this\n * exists to fix. A key that carries one therefore emits wider than the record parses — `z.record(z.number().min(5), V)`\n * accepts `\"3\"` — which is the deliberate trade, since throwing on it would reject an ordinary schema\n * outright. */\nfunction stringifyKeyNames(bySchema, json, visited) {\n    // an extracted key that rewrites cannot go on sharing its definition — the string form a key position needs is not the number form every other reference wants — so it inlines. One that does not rewrite keeps the `$ref`.\n    if (json.$ref) {\n        // a recursive key holds its own reference inside its definition, so a node already on the path is left alone rather than resolved again\n        if (visited.has(json))\n            return json;\n        visited.add(json);\n        const def = bySchema.get(json)?.def;\n        if (!def)\n            return json;\n        const inlined = stringifyKeyNames(bySchema, def, visited);\n        return inlined === def ? json : inlined;\n    }\n    for (const keyword of [\"anyOf\", \"oneOf\"]) {\n        const branches = json[keyword];\n        if (!Array.isArray(branches))\n            continue;\n        const mapped = branches.map((branch) => stringifyKeyNames(bySchema, branch, visited));\n        // rebuilding regardless would detach a key that had nothing to re-express, dropping its `$ref` and leaking the internal `id`\n        if (mapped.some((branch, i) => branch !== branches[i]))\n            json = { ...json, [keyword]: mapped };\n    }\n    // a member that already admits a string leaves the key unconstrained, so the node's own type re-expresses only when every member is numeric\n    const types = Array.isArray(json.type) ? json.type : [json.type];\n    const numericType = !types.includes(\"string\") && types.some((t) => t === \"number\" || t === \"integer\");\n    // a heterogeneous key carries no type at all, so its numeric members are caught here instead\n    const values = json.enum ?? (json.const !== undefined ? [json.const] : undefined);\n    if (!numericType && !values?.some((v) => typeof v === \"number\"))\n        return json;\n    const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json;\n    if (rest.enum)\n        rest.enum = rest.enum.map((v) => (typeof v === \"number\" ? String(v) : v));\n    else if (typeof rest.const === \"number\")\n        rest.const = String(rest.const);\n    // a heterogeneous key keeps its absent type: the stringified members already say what a key may be\n    if (!numericType)\n        return rest;\n    rest.type = \"string\";\n    if (!values)\n        rest.pattern = (types.includes(\"number\") ? regexes.number : regexes.integer).source;\n    return rest;\n}\n/** Every record of one conversion, so the carriers are found in a single pass rather than once per record. */\nconst pendingRecords = new WeakMap();\nfunction rewriteKeyNames(ctx) {\n    // an extracted key is resolved by the object `extractToDef` left in its place, so the map is built once rather than searched per reference. `_zod.toJSONSchema` can hand the same object to two schemas, so the first entry carrying a body wins, as a search would have found it.\n    const bySchema = new Map();\n    for (const entry of ctx.seen.values()) {\n        if (entry.def && !bySchema.has(entry.schema))\n            bySchema.set(entry.schema, entry);\n    }\n    const rewrites = new Map();\n    for (const record of pendingRecords.get(ctx) ?? []) {\n        const seen = ctx.seen.get(record);\n        const names = (seen?.def ?? seen?.schema)?.propertyNames;\n        if (!names || names === true || rewrites.has(names))\n            continue;\n        const rewritten = stringifyKeyNames(bySchema, names, new Set());\n        if (rewritten !== names)\n            rewrites.set(names, rewritten);\n    }\n    if (!rewrites.size)\n        return;\n    // the flatten has already copied each record's own properties onto every wrapper by reference, and an extracted body is another such copy, so every carrier holding a rewritten key is updated together\n    for (const entry of ctx.seen.values()) {\n        for (const carrier of [entry.schema, entry.def]) {\n            const rewritten = carrier && rewrites.get(carrier.propertyNames);\n            if (rewritten)\n                carrier.propertyNames = rewritten;\n        }\n    }\n}\nexport const recordProcessor = (schema, ctx, _json, params) => {\n    const json = _json;\n    const def = schema._zod.def;\n    json.type = \"object\";\n    // For looseRecord with regex patterns, use patternProperties. This correctly represents \"only validate keys matching the pattern\" semantics and composes well with allOf (intersections)\n    const keyType = def.keyType;\n    const patterns = aggregateChecks(keyType).patterns;\n    if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n        // Use patternProperties for looseRecord with regex patterns\n        const valueSchema = processSchema(def.valueType, ctx, {\n            ...params,\n            path: [...params.path, \"patternProperties\", \"*\"],\n        });\n        json.patternProperties = {};\n        for (const pattern of patterns) {\n            assignProp(json.patternProperties, exactPattern(pattern).source, valueSchema);\n        }\n    }\n    else {\n        // Default behavior: use propertyNames + additionalProperties\n        if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n            json.propertyNames = processSchema(def.keyType, ctx, {\n                ...params,\n                path: [...params.path, \"propertyNames\"],\n            });\n            let pending = pendingRecords.get(ctx);\n            if (!pending) {\n                pending = [];\n                pendingRecords.set(ctx, pending);\n                ctx.deferred.push(() => rewriteKeyNames(ctx));\n            }\n            pending.push(schema);\n        }\n        json.additionalProperties = processSchema(def.valueType, ctx, {\n            ...params,\n            path: [...params.path, \"additionalProperties\"],\n        });\n    }\n    // Add required for keys with discrete values (enum, literal, etc.)\n    const keyValues = keyType._zod.values;\n    // Every key shares one value schema, so an optional-in value makes the whole key set omittable on input. Output keeps them: the exhaustive branch assigns every key, even one whose value came back undefined.\n    const omittableOnInput = ctx.io === \"input\" && inputOptin(def.valueType) !== undefined;\n    if (keyValues && !def.partial && !omittableOnInput) {\n        const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n        if (validKeyValues.length > 0) {\n            json.required = validKeyValues.map(String);\n        }\n    }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n    const def = schema._zod.def;\n    const inner = processSchema(def.innerType, ctx, params);\n    const seen = ctx.seen.get(schema);\n    if (ctx.target === \"openapi-3.0\") {\n        seen.ref = def.innerType;\n        json.nullable = true;\n    }\n    else {\n        json.anyOf = [inner, { type: \"null\" }];\n    }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n    const def = schema._zod.def;\n    processSchema(def.innerType, ctx, params);\n    const seen = ctx.seen.get(schema);\n    seen.ref = def.innerType;\n};\n/** Round-trips a default value through JSON so the emitted schema is guaranteed to be valid JSON.\n * A BigInt has no reliable encoding, so it goes through `unrepresentable` like any other\n * unrepresentable value. Returns a sentinel when the caller must not write a default of its own. */\nconst UNREPRESENTABLE_DEFAULT = Symbol();\nfunction serializeDefaultValue(value, schema, ctx, json, params) {\n    let unrepresentable = false;\n    const serialized = JSON.stringify(value, (_, val) => {\n        if (typeof val !== \"bigint\")\n            return val;\n        unrepresentable = true;\n        return null;\n    });\n    if (!unrepresentable)\n        return JSON.parse(serialized);\n    handleUnrepresentable(schema, ctx, json, params, \"BigInt defaults cannot be represented in JSON Schema\");\n    return UNREPRESENTABLE_DEFAULT;\n}\nexport const defaultProcessor = (schema, ctx, json, params) => {\n    const def = schema._zod.def;\n    processSchema(def.innerType, ctx, params);\n    const seen = ctx.seen.get(schema);\n    seen.ref = def.innerType;\n    const value = serializeDefaultValue(def.defaultValue, schema, ctx, json, params);\n    if (value !== UNREPRESENTABLE_DEFAULT)\n        json.default = value;\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n    const def = schema._zod.def;\n    processSchema(def.innerType, ctx, params);\n    const seen = ctx.seen.get(schema);\n    seen.ref = def.innerType;\n    if (ctx.io !== \"input\")\n        return;\n    const value = serializeDefaultValue(def.defaultValue, schema, ctx, json, params);\n    if (value !== UNREPRESENTABLE_DEFAULT)\n        json._prefault = value;\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n    const def = schema._zod.def;\n    processSchema(def.innerType, ctx, params);\n    const seen = ctx.seen.get(schema);\n    seen.ref = def.innerType;\n    let catchValue;\n    try {\n        catchValue = def.catchValue(undefined);\n    }\n    catch {\n        handleUnrepresentable(schema, ctx, json, params, \"Dynamic catch values are not supported in JSON Schema\");\n        return;\n    }\n    json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n    const def = schema._zod.def;\n    const inIsTransform = def.in._zod.traits.has(\"$ZodTransform\");\n    const innerType = ctx.io === \"input\" ? (inIsTransform ? def.out : def.in) : def.out;\n    processSchema(innerType, ctx, params);\n    const seen = ctx.seen.get(schema);\n    seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n    const def = schema._zod.def;\n    processSchema(def.innerType, ctx, params);\n    const seen = ctx.seen.get(schema);\n    seen.ref = def.innerType;\n    json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n    const def = schema._zod.def;\n    processSchema(def.innerType, ctx, params);\n    const seen = ctx.seen.get(schema);\n    seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n    const def = schema._zod.def;\n    processSchema(def.innerType, ctx, params);\n    const seen = ctx.seen.get(schema);\n    seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n    const innerType = schema._zod.innerType;\n    processSchema(innerType, ctx, params);\n    const seen = ctx.seen.get(schema);\n    seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n    string: stringProcessor,\n    number: numberProcessor,\n    boolean: booleanProcessor,\n    bigint: bigintProcessor,\n    symbol: symbolProcessor,\n    null: nullProcessor,\n    undefined: undefinedProcessor,\n    void: voidProcessor,\n    never: neverProcessor,\n    any: anyProcessor,\n    unknown: unknownProcessor,\n    date: dateProcessor,\n    enum: enumProcessor,\n    literal: literalProcessor,\n    nan: nanProcessor,\n    template_literal: templateLiteralProcessor,\n    file: fileProcessor,\n    success: successProcessor,\n    custom: customProcessor,\n    function: functionProcessor,\n    transform: transformProcessor,\n    map: mapProcessor,\n    set: setProcessor,\n    array: arrayProcessor,\n    object: objectProcessor,\n    union: unionProcessor,\n    intersection: intersectionProcessor,\n    tuple: tupleProcessor,\n    record: recordProcessor,\n    nullable: nullableProcessor,\n    nonoptional: nonoptionalProcessor,\n    default: defaultProcessor,\n    prefault: prefaultProcessor,\n    catch: catchProcessor,\n    pipe: pipeProcessor,\n    readonly: readonlyProcessor,\n    promise: promiseProcessor,\n    optional: optionalProcessor,\n    lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n    if (\"_idmap\" in input) {\n        // Registry case\n        const registry = input;\n        const ctx = initializeContext({ ...params, processors: allProcessors });\n        const defs = {};\n        // First pass: process all schemas to build the seen map\n        for (const entry of registry._idmap.entries()) {\n            const [_, schema] = entry;\n            processSchema(schema, ctx);\n        }\n        const schemas = {};\n        const external = {\n            registry,\n            uri: params?.uri,\n            defs,\n        };\n        // Update the context with external configuration\n        ctx.external = external;\n        // Second pass: emit each schema\n        for (const entry of registry._idmap.entries()) {\n            const [key, schema] = entry;\n            extractDefs(ctx, schema);\n            assignProp(schemas, key, finalize(ctx, schema));\n        }\n        if (Object.keys(defs).length > 0) {\n            const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n            schemas.__shared = {\n                [defsSegment]: defs,\n            };\n        }\n        return { schemas };\n    }\n    // Single schema case\n    const ctx = initializeContext({ ...params, processors: allProcessors });\n    processSchema(input, ctx);\n    extractDefs(ctx, input);\n    return finalize(ctx, input);\n}\n","import * as core from \"../core/index.js\";\nimport { $ZodError } from \"../core/index.js\";\nimport * as util from \"../core/util.js\";\n/* Prototypes that already carry the lazy helper methods. Seeded with the\n * intrinsics so that `init` on a foreign object — it accepts any object —\n * can never install an accessor onto a prototype we do not own. */\nconst _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);\n/* Helper methods live as non-enumerable lazy getters on the shared\n * prototype instead of own properties on every instance. On first\n * access the getter allocates the per-instance closure and caches it\n * as a non-enumerable own property, so detached usage still works and\n * the allocation only happens for methods actually touched. */\nfunction _lazyMethod(proto, key, make) {\n    Object.defineProperty(proto, key, {\n        configurable: true,\n        enumerable: false,\n        get() {\n            const value = make(this);\n            Object.defineProperty(this, key, { value, configurable: true, writable: true });\n            return value;\n        },\n        set(value) {\n            Object.defineProperty(this, key, { value, configurable: true, writable: true });\n        },\n    });\n}\nconst initializer = (inst, issues) => {\n    $ZodError.init(inst, issues);\n    inst.name = \"ZodError\";\n    const proto = Object.getPrototypeOf(inst);\n    if (_installedErrorProtos.has(proto))\n        return;\n    _installedErrorProtos.add(proto);\n    _lazyMethod(proto, \"format\", (self) => (mapper) => core.formatError(self, mapper));\n    _lazyMethod(proto, \"flatten\", (self) => (mapper) => core.flattenError(self, mapper));\n    _lazyMethod(proto, \"addIssue\", (self) => (issue) => {\n        self.issues.push(issue);\n        self.message = JSON.stringify(self.issues, util.jsonStringifyReplacer, 2);\n    });\n    _lazyMethod(proto, \"addIssues\", (self) => (issues) => {\n        self.issues.push(...issues);\n        self.message = JSON.stringify(self.issues, util.jsonStringifyReplacer, 2);\n    });\n    Object.defineProperty(proto, \"isEmpty\", {\n        configurable: true,\n        enumerable: false,\n        get() {\n            return this.issues.length === 0;\n        },\n    });\n};\nexport const ZodError = /*@__PURE__*/ core.$constructor(\"ZodError\", initializer);\nexport const ZodRealError = /*@__PURE__*/ core.$constructor(\"ZodError\", initializer, undefined, {\n    Parent: Error,\n});\n// /** @deprecated Use `z.core.$ZodErrorMapCtx` instead. */\n// export type ErrorMapCtx = core.$ZodErrorMapCtx;\n","import * as core from \"../core/index.js\";\nimport { ZodRealError } from \"./errors.js\";\nexport const parse = /* @__PURE__ */ core._parse(ZodRealError);\nexport const parseAsync = /* @__PURE__ */ core._parseAsync(ZodRealError);\nexport const safeParse = /* @__PURE__ */ core._safeParse(ZodRealError);\nexport const safeParseAsync = /* @__PURE__ */ core._safeParseAsync(ZodRealError);\nexport { validate, validateAsync } from \"../core/index.js\";\n// Codec functions\nexport const encode = /* @__PURE__ */ core._encode(ZodRealError);\nexport const decode = /* @__PURE__ */ core._decode(ZodRealError);\nexport const encodeAsync = /* @__PURE__ */ core._encodeAsync(ZodRealError);\nexport const decodeAsync = /* @__PURE__ */ core._decodeAsync(ZodRealError);\nexport const safeEncode = /* @__PURE__ */ core._safeEncode(ZodRealError);\nexport const safeDecode = /* @__PURE__ */ core._safeDecode(ZodRealError);\nexport const safeEncodeAsync = /* @__PURE__ */ core._safeEncodeAsync(ZodRealError);\nexport const safeDecodeAsync = /* @__PURE__ */ core._safeDecodeAsync(ZodRealError);\n","import * as core from \"../core/index.js\";\nimport { util } from \"../core/index.js\";\nimport * as processors from \"../core/json-schema-processors.js\";\nimport * as regexes from \"../core/regexes.js\";\nimport { createStandardJSONSchemaMethod, createToJSONSchemaMethod } from \"../core/to-json-schema.js\";\nimport en from \"../locales/en.js\";\nimport * as checks from \"./checks.js\";\nimport * as parse from \"./parse.js\";\n// Register English as the default locale on first ZodType construction. Hooked into the `ZodType` `$constructor` (rather than a top-level `config(en())` in `external.ts`) so bundlers honoring `sideEffects: false` can't tree-shake it out — see #5953, #5725. An explicit `z.config(z.locales.xx())` call wins regardless of order, since this only sets the default when none is present.\nfunction _ensureDefaultLocale() {\n    if (!core.globalConfig.localeError)\n        core.config(en());\n}\n// the default memoizer is read by the core container init, which runs before `ZodType.init`, so each container calls this first\nfunction _ensureDefaultMemoizer() {\n    if (!core.globalConfig.memoizer)\n        core.config({ memoizer: core.memoizer() });\n}\nexport const ZodType = /*@__PURE__*/ core.$constructor(\"ZodType\", (inst, def) => {\n    _ensureDefaultLocale();\n    core.$ZodType.init(inst, def);\n    inst.def = def;\n    inst.type = def.type;\n    return inst;\n}, {\n    check(...chks) {\n        const def = this.def;\n        return this.clone(util.mergeDefs(def, {\n            checks: [\n                ...(def.checks ?? []),\n                ...chks.map((ch) => typeof ch === \"function\" ? { _zod: { check: ch, def: { check: \"custom\" }, onattach: [] } } : ch),\n            ],\n        }), { parent: true });\n    },\n    with(...chks) {\n        return this.check(...chks);\n    },\n    clone(def, params) {\n        return core.clone(this, def, params);\n    },\n    brand() {\n        return this;\n    },\n    register(reg, meta) {\n        reg.add(this, meta);\n        return this;\n    },\n    refine(check, params) {\n        return this.check(refine(check, params));\n    },\n    superRefine(refinement, params) {\n        return this.check(superRefine(refinement, params));\n    },\n    overwrite(fn) {\n        return this.check(checks.overwrite(fn));\n    },\n    optional() {\n        return optional(this);\n    },\n    exactOptional() {\n        return exactOptional(this);\n    },\n    nullable() {\n        return nullable(this);\n    },\n    nullish() {\n        return optional(nullable(this));\n    },\n    nonoptional(params) {\n        return nonoptional(this, params);\n    },\n    array() {\n        return array(this);\n    },\n    or(arg) {\n        return union([this, arg]);\n    },\n    and(arg) {\n        return intersection(this, arg);\n    },\n    transform(tx) {\n        return pipe(this, transform(tx));\n    },\n    default(d) {\n        return _default(this, d);\n    },\n    prefault(d) {\n        return prefault(this, d);\n    },\n    catch(params) {\n        return _catch(this, params);\n    },\n    pipe(target) {\n        return pipe(this, target);\n    },\n    readonly() {\n        return readonly(this);\n    },\n    describe(description) {\n        const cl = this.clone();\n        core.globalRegistry.add(cl, { description });\n        return cl;\n    },\n    meta(...args) {\n        // overloaded: meta() returns the registered metadata, meta(data) returns a clone with `data` registered. The mapped type picks up the second overload, so we accept variadic any-args and return `any` to satisfy both at runtime.\n        if (args.length === 0)\n            return core.globalRegistry.get(this);\n        const cl = this.clone();\n        core.globalRegistry.add(cl, args[0]);\n        return cl;\n    },\n    isOptional() {\n        return this.safeParse(undefined).success;\n    },\n    isNullable() {\n        return this.safeParse(null).success;\n    },\n    apply(fn, ...args) {\n        return args.length === 0 ? fn(this) : fn(this, ...args);\n    },\n    // Overrides core's `~standard` to add `jsonSchema`. Must stay a prototype entry: redefining it per instance demotes instances to dictionary mode.\n    get \"~standard\"() {\n        return util.hide(this, \"~standard\", {\n            ...core.standardProps(this),\n            jsonSchema: {\n                input: createStandardJSONSchemaMethod(this, \"input\"),\n                output: createStandardJSONSchemaMethod(this, \"output\"),\n            },\n        });\n    },\n    set \"~standard\"(value) {\n        util.own(this, \"~standard\", value);\n    },\n    parse: function _parse(data, params) {\n        return parse.parse(this, data, params, { callee: _parse });\n    },\n    parseAsync: async function _parseAsync(data, params) {\n        return await parse.parseAsync(this, data, params, { callee: _parseAsync });\n    },\n    safeParse(data, params) {\n        return parse.safeParse(this, data, params);\n    },\n    async safeParseAsync(data, params) {\n        return parse.safeParseAsync(this, data, params);\n    },\n    // `spa` is an alias: same function object as `safeParseAsync`, as before.\n    get spa() {\n        return this?.safeParseAsync;\n    },\n    set spa(value) {\n        util.own(this, \"spa\", value);\n    },\n    validate(data, params) {\n        return parse.validate(this, data, params);\n    },\n    validateAsync(data, params) {\n        return parse.validateAsync(this, data, params);\n    },\n    encode: function _encode(data, params) {\n        return parse.encode(this, data, params, { callee: _encode });\n    },\n    decode: function _decode(data, params) {\n        return parse.decode(this, data, params, { callee: _decode });\n    },\n    encodeAsync: async function _encodeAsync(data, params) {\n        return await parse.encodeAsync(this, data, params, { callee: _encodeAsync });\n    },\n    decodeAsync: async function _decodeAsync(data, params) {\n        return await parse.decodeAsync(this, data, params, { callee: _decodeAsync });\n    },\n    safeEncode(data, params) {\n        return parse.safeEncode(this, data, params);\n    },\n    safeDecode(data, params) {\n        return parse.safeDecode(this, data, params);\n    },\n    async safeEncodeAsync(data, params) {\n        return parse.safeEncodeAsync(this, data, params);\n    },\n    async safeDecodeAsync(data, params) {\n        return parse.safeDecodeAsync(this, data, params);\n    },\n    toJSONSchema(params) {\n        return createToJSONSchemaMethod(this, {})(params);\n    },\n    // Reads through to the registry on every access, so it must not cache.\n    get description() {\n        return core.globalRegistry.get(this)?.description;\n    },\n    // No setter: `schema._def = x` throws, as it did when `_def` was a non-writable own property.\n    get _def() {\n        return this._zod.def;\n    },\n});\n/** @internal */\nexport const _ZodString = /*@__PURE__*/ core.$constructor(\"_ZodString\", (inst, def) => {\n    core.$ZodString.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.stringProcessor(inst, ctx, json, params);\n}, \n/*@__PURE__*/ util.derived({\n    format: (inst) => processors.aggregateChecks(inst).format ?? null,\n    minLength: (inst) => processors.aggregateChecks(inst).minimum ?? null,\n    maxLength: (inst) => processors.aggregateChecks(inst).maximum ?? null,\n}, {\n    regex(...args) {\n        return this.check(checks.regex(...args));\n    },\n    includes(...args) {\n        return this.check(checks.includes(...args));\n    },\n    startsWith(...args) {\n        return this.check(checks.startsWith(...args));\n    },\n    endsWith(...args) {\n        return this.check(checks.endsWith(...args));\n    },\n    min(...args) {\n        return this.check(checks.minLength(...args));\n    },\n    max(...args) {\n        return this.check(checks.maxLength(...args));\n    },\n    length(...args) {\n        return this.check(checks.length(...args));\n    },\n    nonempty(...args) {\n        return this.check(checks.minLength(1, ...args));\n    },\n    lowercase(params) {\n        return this.check(checks.lowercase(params));\n    },\n    uppercase(params) {\n        return this.check(checks.uppercase(params));\n    },\n    trim() {\n        return this.check(checks.trim());\n    },\n    normalize(...args) {\n        return this.check(checks.normalize(...args));\n    },\n    toLowerCase() {\n        return this.check(checks.toLowerCase());\n    },\n    toUpperCase() {\n        return this.check(checks.toUpperCase());\n    },\n    slugify() {\n        return this.check(checks.slugify());\n    },\n}));\nexport const ZodString = /*@__PURE__*/ core.$constructor(\"ZodString\", (inst, def) => {\n    core.$ZodString.init(inst, def);\n    _ZodString.init(inst, def);\n}, {\n    email(params) {\n        return this.check(core._email(ZodEmail, params));\n    },\n    url(params) {\n        return this.check(core._url(ZodURL, params));\n    },\n    jwt(params) {\n        return this.check(core._jwt(ZodJWT, params));\n    },\n    emoji(params) {\n        return this.check(core._emoji(ZodEmoji, params));\n    },\n    guid(params) {\n        return this.check(core._guid(ZodGUID, params));\n    },\n    uuid(params) {\n        return this.check(core._uuid(ZodUUID, params));\n    },\n    uuidv4(params) {\n        return this.check(core._uuidv4(ZodUUID, params));\n    },\n    uuidv6(params) {\n        return this.check(core._uuidv6(ZodUUID, params));\n    },\n    uuidv7(params) {\n        return this.check(core._uuidv7(ZodUUID, params));\n    },\n    nanoid(params) {\n        return this.check(core._nanoid(ZodNanoID, params));\n    },\n    cuid(params) {\n        return this.check(core._cuid(ZodCUID, params));\n    },\n    cuid2(params) {\n        return this.check(core._cuid2(ZodCUID2, params));\n    },\n    ulid(params) {\n        return this.check(core._ulid(ZodULID, params));\n    },\n    base64(params) {\n        return this.check(core._base64(ZodBase64, params));\n    },\n    base64url(params) {\n        return this.check(core._base64url(ZodBase64URL, params));\n    },\n    xid(params) {\n        return this.check(core._xid(ZodXID, params));\n    },\n    ksuid(params) {\n        return this.check(core._ksuid(ZodKSUID, params));\n    },\n    ipv4(params) {\n        return this.check(core._ipv4(ZodIPv4, params));\n    },\n    ipv6(params) {\n        return this.check(core._ipv6(ZodIPv6, params));\n    },\n    cidrv4(params) {\n        return this.check(core._cidrv4(ZodCIDRv4, params));\n    },\n    cidrv6(params) {\n        return this.check(core._cidrv6(ZodCIDRv6, params));\n    },\n    e164(params) {\n        return this.check(core._e164(ZodE164, params));\n    },\n    datetime(params) {\n        return this.check(core._isoDateTime(ZodISODateTime, params));\n    },\n    date(params) {\n        return this.check(core._isoDate(ZodISODate, params));\n    },\n    time(params) {\n        return this.check(core._isoTime(ZodISOTime, params));\n    },\n    duration(params) {\n        return this.check(core._isoDuration(ZodISODuration, params));\n    },\n});\nexport function string(params) {\n    return core._string(ZodString, params);\n}\nexport const ZodStringFormat = /*@__PURE__*/ core.$constructor(\"ZodStringFormat\", (inst, def) => {\n    core.$ZodStringFormat.init(inst, def);\n    _ZodString.init(inst, def);\n});\nexport const ZodISODateTime = /*@__PURE__*/ core.$constructor(\"ZodISODateTime\", (inst, def) => {\n    core.$ZodISODateTime.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport const ZodISODate = /*@__PURE__*/ core.$constructor(\"ZodISODate\", (inst, def) => {\n    core.$ZodISODate.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport const ZodISOTime = /*@__PURE__*/ core.$constructor(\"ZodISOTime\", (inst, def) => {\n    core.$ZodISOTime.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport const ZodISODuration = /*@__PURE__*/ core.$constructor(\"ZodISODuration\", (inst, def) => {\n    core.$ZodISODuration.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport const ZodEmail = /*@__PURE__*/ core.$constructor(\"ZodEmail\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodEmail.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function email(params) {\n    return core._email(ZodEmail, params);\n}\nexport const ZodGUID = /*@__PURE__*/ core.$constructor(\"ZodGUID\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodGUID.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function guid(params) {\n    return core._guid(ZodGUID, params);\n}\nexport const ZodUUID = /*@__PURE__*/ core.$constructor(\"ZodUUID\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodUUID.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function uuid(params) {\n    return core._uuid(ZodUUID, params);\n}\nexport function uuidv4(params) {\n    return core._uuidv4(ZodUUID, params);\n}\n// ZodUUIDv6\nexport function uuidv6(params) {\n    return core._uuidv6(ZodUUID, params);\n}\n// ZodUUIDv7\nexport function uuidv7(params) {\n    return core._uuidv7(ZodUUID, params);\n}\nexport const ZodURL = /*@__PURE__*/ core.$constructor(\"ZodURL\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodURL.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function url(params) {\n    return core._url(ZodURL, params);\n}\nexport function httpUrl(params) {\n    return core._url(ZodURL, {\n        protocol: regexes.httpProtocol,\n        hostname: regexes.domain,\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodEmoji = /*@__PURE__*/ core.$constructor(\"ZodEmoji\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodEmoji.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function emoji(params) {\n    return core._emoji(ZodEmoji, params);\n}\nexport const ZodNanoID = /*@__PURE__*/ core.$constructor(\"ZodNanoID\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodNanoID.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function nanoid(params) {\n    return core._nanoid(ZodNanoID, params);\n}\n/**\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link ZodCUID2} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport const ZodCUID = /*@__PURE__*/ core.$constructor(\"ZodCUID\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodCUID.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\n/**\n * Validates a CUID v1 string.\n *\n * @deprecated CUID v1 is deprecated by its authors due to information leakage\n * (timestamps embedded in the id). Use {@link cuid2 | `z.cuid2()`} instead.\n * See https://github.com/paralleldrive/cuid.\n */\nexport function cuid(params) {\n    return core._cuid(ZodCUID, params);\n}\nexport const ZodCUID2 = /*@__PURE__*/ core.$constructor(\"ZodCUID2\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodCUID2.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function cuid2(params) {\n    return core._cuid2(ZodCUID2, params);\n}\nexport const ZodULID = /*@__PURE__*/ core.$constructor(\"ZodULID\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodULID.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function ulid(params) {\n    return core._ulid(ZodULID, params);\n}\nexport const ZodXID = /*@__PURE__*/ core.$constructor(\"ZodXID\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodXID.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function xid(params) {\n    return core._xid(ZodXID, params);\n}\nexport const ZodKSUID = /*@__PURE__*/ core.$constructor(\"ZodKSUID\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodKSUID.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function ksuid(params) {\n    return core._ksuid(ZodKSUID, params);\n}\nexport const ZodIPv4 = /*@__PURE__*/ core.$constructor(\"ZodIPv4\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodIPv4.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function ipv4(params) {\n    return core._ipv4(ZodIPv4, params);\n}\nexport const ZodMAC = /*@__PURE__*/ core.$constructor(\"ZodMAC\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodMAC.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function mac(params) {\n    return core._mac(ZodMAC, params);\n}\nexport const ZodIPv6 = /*@__PURE__*/ core.$constructor(\"ZodIPv6\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodIPv6.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function ipv6(params) {\n    return core._ipv6(ZodIPv6, params);\n}\nexport const ZodCIDRv4 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv4\", (inst, def) => {\n    core.$ZodCIDRv4.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function cidrv4(params) {\n    return core._cidrv4(ZodCIDRv4, params);\n}\nexport const ZodCIDRv6 = /*@__PURE__*/ core.$constructor(\"ZodCIDRv6\", (inst, def) => {\n    core.$ZodCIDRv6.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function cidrv6(params) {\n    return core._cidrv6(ZodCIDRv6, params);\n}\nexport const ZodBase64 = /*@__PURE__*/ core.$constructor(\"ZodBase64\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodBase64.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function base64(params) {\n    return core._base64(ZodBase64, params);\n}\nexport const ZodBase64URL = /*@__PURE__*/ core.$constructor(\"ZodBase64URL\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodBase64URL.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function base64url(params) {\n    return core._base64url(ZodBase64URL, params);\n}\nexport const ZodE164 = /*@__PURE__*/ core.$constructor(\"ZodE164\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodE164.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function e164(params) {\n    return core._e164(ZodE164, params);\n}\nexport const ZodCreditCard = /*@__PURE__*/ core.$constructor(\"ZodCreditCard\", (inst, def) => {\n    core.$ZodCreditCard.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function creditCard(params) {\n    return core._creditCard(ZodCreditCard, params);\n}\nexport const ZodIBAN = /*@__PURE__*/ core.$constructor(\"ZodIBAN\", (inst, def) => {\n    core.$ZodIBAN.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function iban(params) {\n    return core._iban(ZodIBAN, params);\n}\nexport const ZodJWT = /*@__PURE__*/ core.$constructor(\"ZodJWT\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodJWT.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function jwt(params) {\n    return core._jwt(ZodJWT, params);\n}\nexport const ZodCustomStringFormat = /*@__PURE__*/ core.$constructor(\"ZodCustomStringFormat\", (inst, def) => {\n    // ZodStringFormat.init(inst, def);\n    core.$ZodCustomStringFormat.init(inst, def);\n    ZodStringFormat.init(inst, def);\n});\nexport function stringFormat(format, fnOrRegex, _params = {}) {\n    return core._stringFormat(ZodCustomStringFormat, format, fnOrRegex, _params);\n}\nexport function hostname(_params) {\n    return core._stringFormat(ZodCustomStringFormat, \"hostname\", regexes.hostname, _params);\n}\nexport function hex(_params) {\n    return core._stringFormat(ZodCustomStringFormat, \"hex\", regexes.hex, _params);\n}\nexport function currencyCode(_params) {\n    return core._stringFormat(ZodCustomStringFormat, \"currency_code\", regexes.currencyCode, _params);\n}\nexport function hash(alg, params) {\n    const enc = params?.enc ?? \"hex\";\n    const format = `${alg}_${enc}`;\n    const regex = core.regexes[format];\n    if (!regex)\n        throw new Error(`Unrecognized hash format: ${format}`);\n    return core._stringFormat(ZodCustomStringFormat, format, regex, params);\n}\nexport const ZodNumber = /*@__PURE__*/ core.$constructor(\"ZodNumber\", (inst, def) => {\n    core.$ZodNumber.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.numberProcessor(inst, ctx, json, params);\n    inst.isFinite = true;\n}, \n/*@__PURE__*/ util.derived({\n    minValue: (inst) => {\n        const { minimum, exclusiveMinimum } = processors.aggregateChecks(inst);\n        return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);\n    },\n    maxValue: (inst) => {\n        const { maximum, exclusiveMaximum } = processors.aggregateChecks(inst);\n        return Math.min(maximum ?? Number.POSITIVE_INFINITY, exclusiveMaximum ?? Number.POSITIVE_INFINITY);\n    },\n    isInt: (inst) => {\n        const { isInt, multipleOf } = processors.aggregateChecks(inst);\n        return !!isInt || !!multipleOf?.some(Number.isSafeInteger);\n    },\n    format: (inst) => processors.aggregateChecks(inst).format ?? null,\n}, {\n    gt(value, params) {\n        return this.check(checks.gt(value, params));\n    },\n    gte(value, params) {\n        return this.check(checks.gte(value, params));\n    },\n    min(value, params) {\n        return this.check(checks.gte(value, params));\n    },\n    lt(value, params) {\n        return this.check(checks.lt(value, params));\n    },\n    lte(value, params) {\n        return this.check(checks.lte(value, params));\n    },\n    max(value, params) {\n        return this.check(checks.lte(value, params));\n    },\n    int(params) {\n        return this.check(int(params));\n    },\n    safe(params) {\n        return this.check(int(params));\n    },\n    positive(params) {\n        return this.check(checks.gt(0, params));\n    },\n    nonnegative(params) {\n        return this.check(checks.gte(0, params));\n    },\n    negative(params) {\n        return this.check(checks.lt(0, params));\n    },\n    nonpositive(params) {\n        return this.check(checks.lte(0, params));\n    },\n    multipleOf(value, params) {\n        return this.check(checks.multipleOf(value, params));\n    },\n    step(value, params) {\n        return this.check(checks.multipleOf(value, params));\n    },\n    finite() {\n        return this;\n    },\n}));\nexport function number(params) {\n    return core._number(ZodNumber, params);\n}\nexport const ZodNumberFormat = /*@__PURE__*/ core.$constructor(\"ZodNumberFormat\", (inst, def) => {\n    core.$ZodNumberFormat.init(inst, def);\n    ZodNumber.init(inst, def);\n});\nexport function int(params) {\n    return core._int(ZodNumberFormat, params);\n}\nexport function float32(params) {\n    return core._float32(ZodNumberFormat, params);\n}\nexport function float64(params) {\n    return core._float64(ZodNumberFormat, params);\n}\nexport function int32(params) {\n    return core._int32(ZodNumberFormat, params);\n}\nexport function uint32(params) {\n    return core._uint32(ZodNumberFormat, params);\n}\nexport const ZodBoolean = /*@__PURE__*/ core.$constructor(\"ZodBoolean\", (inst, def) => {\n    core.$ZodBoolean.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.booleanProcessor(inst, ctx, json, params);\n});\nexport function boolean(params) {\n    return core._boolean(ZodBoolean, params);\n}\nexport const ZodBigInt = /*@__PURE__*/ core.$constructor(\"ZodBigInt\", (inst, def) => {\n    core.$ZodBigInt.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.bigintProcessor(inst, ctx, json, params);\n}, \n/*@__PURE__*/ util.derived({\n    minValue: (inst) => processors.aggregateChecks(inst).minimum ?? null,\n    maxValue: (inst) => processors.aggregateChecks(inst).maximum ?? null,\n    format: (inst) => processors.aggregateChecks(inst).format ?? null,\n}, {\n    gte(value, params) {\n        return this.check(checks.gte(value, params));\n    },\n    min(value, params) {\n        return this.check(checks.gte(value, params));\n    },\n    gt(value, params) {\n        return this.check(checks.gt(value, params));\n    },\n    lt(value, params) {\n        return this.check(checks.lt(value, params));\n    },\n    lte(value, params) {\n        return this.check(checks.lte(value, params));\n    },\n    max(value, params) {\n        return this.check(checks.lte(value, params));\n    },\n    positive(params) {\n        return this.check(checks.gt(BigInt(0), params));\n    },\n    negative(params) {\n        return this.check(checks.lt(BigInt(0), params));\n    },\n    nonpositive(params) {\n        return this.check(checks.lte(BigInt(0), params));\n    },\n    nonnegative(params) {\n        return this.check(checks.gte(BigInt(0), params));\n    },\n    multipleOf(value, params) {\n        return this.check(checks.multipleOf(value, params));\n    },\n}));\nexport function bigint(params) {\n    return core._bigint(ZodBigInt, params);\n}\nexport const ZodBigIntFormat = /*@__PURE__*/ core.$constructor(\"ZodBigIntFormat\", (inst, def) => {\n    core.$ZodBigIntFormat.init(inst, def);\n    ZodBigInt.init(inst, def);\n});\nexport function int64(params) {\n    return core._int64(ZodBigIntFormat, params);\n}\nexport function uint64(params) {\n    return core._uint64(ZodBigIntFormat, params);\n}\nexport const ZodSymbol = /*@__PURE__*/ core.$constructor(\"ZodSymbol\", (inst, def) => {\n    core.$ZodSymbol.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.symbolProcessor(inst, ctx, json, params);\n});\nexport function symbol(params) {\n    return core._symbol(ZodSymbol, params);\n}\nexport const ZodUndefined = /*@__PURE__*/ core.$constructor(\"ZodUndefined\", (inst, def) => {\n    core.$ZodUndefined.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.undefinedProcessor(inst, ctx, json, params);\n});\nfunction _undefined(params) {\n    return core._undefined(ZodUndefined, params);\n}\nexport { _undefined as undefined };\nexport const ZodNull = /*@__PURE__*/ core.$constructor(\"ZodNull\", (inst, def) => {\n    core.$ZodNull.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.nullProcessor(inst, ctx, json, params);\n});\nfunction _null(params) {\n    return core._null(ZodNull, params);\n}\nexport { _null as null };\nexport const ZodAny = /*@__PURE__*/ core.$constructor(\"ZodAny\", (inst, def) => {\n    core.$ZodAny.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.anyProcessor(inst, ctx, json, params);\n});\nexport function any() {\n    return core._any(ZodAny);\n}\nexport const ZodUnknown = /*@__PURE__*/ core.$constructor(\"ZodUnknown\", (inst, def) => {\n    core.$ZodUnknown.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.unknownProcessor(inst, ctx, json, params);\n});\nexport function unknown() {\n    return core._unknown(ZodUnknown);\n}\nexport const ZodNever = /*@__PURE__*/ core.$constructor(\"ZodNever\", (inst, def) => {\n    core.$ZodNever.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.neverProcessor(inst, ctx, json, params);\n});\nexport function never(params) {\n    return core._never(ZodNever, params);\n}\nexport const ZodVoid = /*@__PURE__*/ core.$constructor(\"ZodVoid\", (inst, def) => {\n    core.$ZodVoid.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.voidProcessor(inst, ctx, json, params);\n});\nfunction _void(params) {\n    return core._void(ZodVoid, params);\n}\nexport { _void as void };\nexport const ZodDate = /*@__PURE__*/ core.$constructor(\"ZodDate\", (inst, def) => {\n    core.$ZodDate.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.dateProcessor(inst, ctx, json, params);\n    inst.min = (value, params) => inst.check(checks.gte(value, params));\n    inst.max = (value, params) => inst.check(checks.lte(value, params));\n}, \n/*@__PURE__*/ util.derived({\n    minDate: (inst) => {\n        const { minimum } = processors.aggregateChecks(inst);\n        return minimum ? new Date(minimum) : null;\n    },\n    maxDate: (inst) => {\n        const { maximum } = processors.aggregateChecks(inst);\n        return maximum ? new Date(maximum) : null;\n    },\n}, {}));\nexport function date(params) {\n    return core._date(ZodDate, params);\n}\nexport const ZodArray = /*@__PURE__*/ core.$constructor(\"ZodArray\", (inst, def) => {\n    _ensureDefaultMemoizer();\n    core.$ZodArray.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.arrayProcessor(inst, ctx, json, params);\n    inst.element = def.element;\n}, {\n    min(n, params) {\n        return this.check(checks.minLength(n, params));\n    },\n    nonempty(params) {\n        return this.check(checks.minLength(1, params));\n    },\n    max(n, params) {\n        return this.check(checks.maxLength(n, params));\n    },\n    length(n, params) {\n        return this.check(checks.length(n, params));\n    },\n    unwrap() {\n        return this.element;\n    },\n});\nexport function array(element, params) {\n    return core._array(ZodArray, element, params);\n}\n// .keyof\nexport function keyof(schema) {\n    const shape = schema._zod.def.shape;\n    return _enum(Object.keys(shape));\n}\nexport const ZodObject = /*@__PURE__*/ core.$constructor(\"ZodObject\", (inst, def) => {\n    _ensureDefaultMemoizer();\n    core.$ZodObjectJIT.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.objectProcessor(inst, ctx, json, params);\n    util.installLazyProp(inst, \"shape\", (self) => self._zod.def.shape, false);\n}, {\n    keyof() {\n        return _enum(Object.keys(this._zod.def.shape));\n    },\n    catchall(catchall) {\n        // `mergeDefs` rather than a spread: spreading reads `shape`, and resolving it can mint a whole fresh subtree\n        return this.clone(util.mergeDefs(this._zod.def, { catchall: catchall }));\n    },\n    passthrough() {\n        return this.clone(util.mergeDefs(this._zod.def, { catchall: unknown() }));\n    },\n    loose() {\n        return this.clone(util.mergeDefs(this._zod.def, { catchall: unknown() }));\n    },\n    strict() {\n        return this.clone(util.mergeDefs(this._zod.def, { catchall: never() }));\n    },\n    strip() {\n        return this.clone(util.mergeDefs(this._zod.def, { catchall: undefined }));\n    },\n    extend(incoming) {\n        return util.extend(this, incoming);\n    },\n    safeExtend(incoming) {\n        return util.safeExtend(this, incoming);\n    },\n    merge(other) {\n        return util.merge(this, other);\n    },\n    pick(mask) {\n        return util.pick(this, mask);\n    },\n    omit(mask) {\n        return util.omit(this, mask);\n    },\n    partial(...args) {\n        return util.partial(ZodOptional, this, args[0]);\n    },\n    exactPartial(...args) {\n        return util.partial(ZodExactOptional, this, args[0], \"exactPartial\");\n    },\n    required(...args) {\n        return util.required(ZodNonOptional, this, args[0]);\n    },\n});\nexport function object(shape, params) {\n    const def = {\n        type: \"object\",\n        shape: shape ?? {},\n        ...util.normalizeParams(params),\n    };\n    return new ZodObject(def);\n}\n// strictObject\nexport function strictObject(shape, params) {\n    return new ZodObject({\n        type: \"object\",\n        shape,\n        catchall: never(),\n        ...util.normalizeParams(params),\n    });\n}\n// looseObject\nexport function looseObject(shape, params) {\n    return new ZodObject({\n        type: \"object\",\n        shape,\n        catchall: unknown(),\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodUnion = /*@__PURE__*/ core.$constructor(\"ZodUnion\", (inst, def) => {\n    core.$ZodUnion.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n    inst.options = def.options;\n});\nexport function union(options, params) {\n    return new ZodUnion({\n        type: \"union\",\n        options: options,\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodXor = /*@__PURE__*/ core.$constructor(\"ZodXor\", (inst, def) => {\n    ZodUnion.init(inst, def);\n    core.$ZodXor.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.unionProcessor(inst, ctx, json, params);\n    inst.options = def.options;\n});\n/** Creates an exclusive union (XOR) where exactly one option must match.\n * Unlike regular unions that succeed when any option matches, xor fails if\n * zero or more than one option matches the input. */\nexport function xor(options, params) {\n    return new ZodXor({\n        type: \"union\",\n        options: options,\n        inclusive: false,\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodDiscriminatedUnion = /*@__PURE__*/ core.$constructor(\"ZodDiscriminatedUnion\", (inst, def) => {\n    ZodUnion.init(inst, def);\n    core.$ZodDiscriminatedUnion.init(inst, def);\n});\nexport function discriminatedUnion(discriminator, options, params) {\n    // const [options, params] = args;\n    return new ZodDiscriminatedUnion({\n        type: \"union\",\n        options: options,\n        discriminator,\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodIntersection = /*@__PURE__*/ core.$constructor(\"ZodIntersection\", (inst, def) => {\n    core.$ZodIntersection.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.intersectionProcessor(inst, ctx, json, params);\n});\nexport function intersection(left, right) {\n    return new ZodIntersection({\n        type: \"intersection\",\n        left: left,\n        right: right,\n    });\n}\nexport const ZodTuple = /*@__PURE__*/ core.$constructor(\"ZodTuple\", (inst, def) => {\n    _ensureDefaultMemoizer();\n    core.$ZodTuple.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.tupleProcessor(inst, ctx, json, params);\n}, {\n    rest(rest) {\n        return this.clone({\n            ...this._zod.def,\n            rest: rest,\n        });\n    },\n    partial() {\n        const def = this._zod.def;\n        // a refinement was authored against the full arity; partialing would run it on a shorter array\n        if (def.checks?.length)\n            throw new Error(\".partial() cannot be used on tuple schemas containing refinements\");\n        return this.clone({\n            ...def,\n            items: def.items.map((item) => new ZodOptional({ type: \"optional\", innerType: item })),\n        });\n    },\n});\nexport function tuple(items, _paramsOrRest, _params) {\n    const hasRest = _paramsOrRest instanceof core.$ZodType;\n    const params = hasRest ? _params : _paramsOrRest;\n    const rest = hasRest ? _paramsOrRest : null;\n    return new ZodTuple({\n        type: \"tuple\",\n        items: items,\n        rest,\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodRecord = /*@__PURE__*/ core.$constructor(\"ZodRecord\", (inst, def) => {\n    _ensureDefaultMemoizer();\n    core.$ZodRecord.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.recordProcessor(inst, ctx, json, params);\n    inst.keyType = def.keyType;\n    inst.valueType = def.valueType;\n});\nexport function record(keyType, valueType, params) {\n    // v3-compat: z.record(valueType, params?) — defaults keyType to z.string()\n    if (!valueType || !valueType._zod) {\n        return new ZodRecord({\n            type: \"record\",\n            keyType: string(),\n            valueType: keyType,\n            ...util.normalizeParams(valueType),\n        });\n    }\n    return new ZodRecord({\n        type: \"record\",\n        keyType,\n        valueType: valueType,\n        ...util.normalizeParams(params),\n    });\n}\n// type alksjf = core.output<core.$ZodRecordKey>;\nexport function partialRecord(keyType, valueType, params) {\n    return new ZodRecord({\n        type: \"record\",\n        keyType,\n        valueType: valueType,\n        ...util.normalizeParams(params),\n        partial: true,\n    });\n}\nexport function looseRecord(keyType, valueType, params) {\n    return new ZodRecord({\n        type: \"record\",\n        keyType,\n        valueType: valueType,\n        mode: \"loose\",\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodMap = /*@__PURE__*/ core.$constructor(\"ZodMap\", (inst, def) => {\n    _ensureDefaultMemoizer();\n    core.$ZodMap.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.mapProcessor(inst, ctx, json, params);\n    inst.keyType = def.keyType;\n    inst.valueType = def.valueType;\n    inst.min = (...args) => inst.check(core._minSize(...args));\n    inst.nonempty = (params) => inst.check(core._minSize(1, params));\n    inst.max = (...args) => inst.check(core._maxSize(...args));\n    inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function map(keyType, valueType, params) {\n    return new ZodMap({\n        type: \"map\",\n        keyType: keyType,\n        valueType: valueType,\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodSet = /*@__PURE__*/ core.$constructor(\"ZodSet\", (inst, def) => {\n    _ensureDefaultMemoizer();\n    core.$ZodSet.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.setProcessor(inst, ctx, json, params);\n    inst.min = (...args) => inst.check(core._minSize(...args));\n    inst.nonempty = (params) => inst.check(core._minSize(1, params));\n    inst.max = (...args) => inst.check(core._maxSize(...args));\n    inst.size = (...args) => inst.check(core._size(...args));\n});\nexport function set(valueType, params) {\n    return new ZodSet({\n        type: \"set\",\n        valueType: valueType,\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodEnum = /*@__PURE__*/ core.$constructor(\"ZodEnum\", (inst, def) => {\n    core.$ZodEnum.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.enumProcessor(inst, ctx, json, params);\n    inst.enum = def.entries;\n    // reuse the parsed value set so a numeric TS enum's reverse-mapping keys stay out\n    inst.options = [...inst._zod.values];\n    const keys = new Set(Object.keys(def.entries));\n    inst.extract = (values, params) => {\n        const newEntries = {};\n        for (const value of values) {\n            if (keys.has(value)) {\n                newEntries[value] = def.entries[value];\n            }\n            else\n                throw new Error(`Key ${value} not found in enum`);\n        }\n        return new ZodEnum({\n            ...def,\n            checks: [],\n            ...util.normalizeParams(params),\n            entries: newEntries,\n        });\n    };\n    inst.exclude = (values, params) => {\n        const newEntries = { ...def.entries };\n        for (const value of values) {\n            if (keys.has(value)) {\n                delete newEntries[value];\n            }\n            else\n                throw new Error(`Key ${value} not found in enum`);\n        }\n        return new ZodEnum({\n            ...def,\n            checks: [],\n            ...util.normalizeParams(params),\n            entries: newEntries,\n        });\n    };\n});\nfunction _enum(values, params) {\n    const entries = Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values;\n    return new ZodEnum({\n        type: \"enum\",\n        entries,\n        ...util.normalizeParams(params),\n    });\n}\nexport { _enum as enum };\n/** @deprecated This API has been merged into `z.enum()`. Use `z.enum()` instead.\n *\n * ```ts\n * enum Colors { red, green, blue }\n * z.enum(Colors);\n * ```\n */\nexport function nativeEnum(entries, params) {\n    return new ZodEnum({\n        type: \"enum\",\n        entries,\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodLiteral = /*@__PURE__*/ core.$constructor(\"ZodLiteral\", (inst, def) => {\n    core.$ZodLiteral.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.literalProcessor(inst, ctx, json, params);\n    inst.values = new Set(def.values);\n    Object.defineProperty(inst, \"value\", {\n        get() {\n            if (def.values.length > 1) {\n                throw new Error(\"This schema contains multiple valid literal values. Use `.values` instead.\");\n            }\n            return def.values[0];\n        },\n    });\n});\nexport function literal(value, params) {\n    return new ZodLiteral({\n        type: \"literal\",\n        values: Array.isArray(value) ? value : [value],\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodFile = /*@__PURE__*/ core.$constructor(\"ZodFile\", (inst, def) => {\n    core.$ZodFile.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.fileProcessor(inst, ctx, json, params);\n    inst.min = (size, params) => inst.check(core._minSize(size, params));\n    inst.max = (size, params) => inst.check(core._maxSize(size, params));\n    inst.mime = (types, params) => inst.check(core._mime(Array.isArray(types) ? types : [types], params));\n});\nexport function file(params) {\n    return core._file(ZodFile, params);\n}\nexport const ZodTransform = /*@__PURE__*/ core.$constructor(\"ZodTransform\", (inst, def) => {\n    _ensureDefaultMemoizer();\n    core.$ZodTransform.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.transformProcessor(inst, ctx, json, params);\n    inst._zod.parse = (payload, _ctx) => {\n        if (_ctx.direction === \"backward\") {\n            throw new core.$ZodEncodeError(inst.constructor.name);\n        }\n        payload.addIssue = (issue) => {\n            if (typeof issue === \"string\") {\n                payload.issues.push(util.issue(issue, payload.value, def));\n            }\n            else {\n                // for Zod 3 backwards compatibility\n                const _issue = issue;\n                if (_issue.fatal)\n                    _issue.continue = false;\n                _issue.code ?? (_issue.code = \"custom\");\n                if (!(\"input\" in _issue))\n                    _issue.input = payload.value;\n                _issue.inst ?? (_issue.inst = inst);\n                // _issue.continue ??= true;\n                payload.issues.push(util.issue(_issue));\n            }\n        };\n        const output = def.transform(payload.value, payload);\n        if (output instanceof Promise) {\n            return output.then((output) => {\n                payload.value = output;\n                return payload;\n            });\n        }\n        payload.value = output;\n        return payload;\n    };\n});\nexport function transform(fn) {\n    return new ZodTransform({\n        type: \"transform\",\n        transform: fn,\n    });\n}\nexport const ZodOptional = /*@__PURE__*/ core.$constructor(\"ZodOptional\", (inst, def) => {\n    core.$ZodOptional.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n    inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function optional(innerType) {\n    return new ZodOptional({\n        type: \"optional\",\n        innerType: innerType,\n    });\n}\nexport const ZodExactOptional = /*@__PURE__*/ core.$constructor(\"ZodExactOptional\", (inst, def) => {\n    core.$ZodExactOptional.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.optionalProcessor(inst, ctx, json, params);\n    inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function exactOptional(innerType) {\n    return new ZodExactOptional({\n        type: \"optional\",\n        innerType: innerType,\n    });\n}\nexport const ZodNullable = /*@__PURE__*/ core.$constructor(\"ZodNullable\", (inst, def) => {\n    core.$ZodNullable.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.nullableProcessor(inst, ctx, json, params);\n    inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nullable(innerType) {\n    return new ZodNullable({\n        type: \"nullable\",\n        innerType: innerType,\n    });\n}\n// nullish\nexport function nullish(innerType) {\n    return optional(nullable(innerType));\n}\nexport const ZodDefault = /*@__PURE__*/ core.$constructor(\"ZodDefault\", (inst, def) => {\n    core.$ZodDefault.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.defaultProcessor(inst, ctx, json, params);\n    inst.unwrap = () => inst._zod.def.innerType;\n    inst.removeDefault = inst.unwrap;\n});\nexport function _default(innerType, defaultValue) {\n    return new ZodDefault({\n        type: \"default\",\n        innerType: innerType,\n        get defaultValue() {\n            return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n        },\n    });\n}\nexport const ZodPrefault = /*@__PURE__*/ core.$constructor(\"ZodPrefault\", (inst, def) => {\n    core.$ZodPrefault.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.prefaultProcessor(inst, ctx, json, params);\n    inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function prefault(innerType, defaultValue) {\n    return new ZodPrefault({\n        type: \"prefault\",\n        innerType: innerType,\n        get defaultValue() {\n            return typeof defaultValue === \"function\" ? defaultValue() : util.shallowClone(defaultValue);\n        },\n    });\n}\nexport const ZodNonOptional = /*@__PURE__*/ core.$constructor(\"ZodNonOptional\", (inst, def) => {\n    core.$ZodNonOptional.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.nonoptionalProcessor(inst, ctx, json, params);\n    inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function nonoptional(innerType, params) {\n    return new ZodNonOptional({\n        type: \"nonoptional\",\n        innerType: innerType,\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodSuccess = /*@__PURE__*/ core.$constructor(\"ZodSuccess\", (inst, def) => {\n    core.$ZodSuccess.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.successProcessor(inst, ctx, json, params);\n    inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function success(innerType) {\n    return new ZodSuccess({\n        type: \"success\",\n        innerType: innerType,\n    });\n}\nexport const ZodCatch = /*@__PURE__*/ core.$constructor(\"ZodCatch\", (inst, def) => {\n    core.$ZodCatch.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.catchProcessor(inst, ctx, json, params);\n    inst.unwrap = () => inst._zod.def.innerType;\n    inst.removeCatch = inst.unwrap;\n});\nfunction _catch(innerType, catchValue) {\n    return new ZodCatch({\n        type: \"catch\",\n        innerType: innerType,\n        catchValue: (typeof catchValue === \"function\" ? catchValue : core.util.constantCatch(catchValue)),\n    });\n}\nexport { _catch as catch };\nexport const ZodNaN = /*@__PURE__*/ core.$constructor(\"ZodNaN\", (inst, def) => {\n    core.$ZodNaN.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.nanProcessor(inst, ctx, json, params);\n});\nexport function nan(params) {\n    return core._nan(ZodNaN, params);\n}\nexport const ZodPipe = /*@__PURE__*/ core.$constructor(\"ZodPipe\", (inst, def) => {\n    core.$ZodPipe.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.pipeProcessor(inst, ctx, json, params);\n    inst.in = def.in;\n    inst.out = def.out;\n});\nexport function pipe(in_, out) {\n    return new ZodPipe({\n        type: \"pipe\",\n        in: in_,\n        out: out,\n        // ...util.normalizeParams(params),\n    });\n}\nexport const ZodCodec = /*@__PURE__*/ core.$constructor(\"ZodCodec\", (inst, def) => {\n    ZodPipe.init(inst, def);\n    core.$ZodCodec.init(inst, def);\n});\nexport function codec(in_, out, params) {\n    return new ZodCodec({\n        type: \"pipe\",\n        in: in_,\n        out: out,\n        transform: params.decode,\n        reverseTransform: params.encode,\n    });\n}\nexport function invertCodec(codec) {\n    const def = codec._zod.def;\n    return new ZodCodec({\n        type: \"pipe\",\n        in: def.out,\n        out: def.in,\n        transform: def.reverseTransform,\n        reverseTransform: def.transform,\n    });\n}\nexport const ZodPreprocess = /*@__PURE__*/ core.$constructor(\"ZodPreprocess\", (inst, def) => {\n    ZodPipe.init(inst, def);\n    core.$ZodPreprocess.init(inst, def);\n});\nexport const ZodReadonly = /*@__PURE__*/ core.$constructor(\"ZodReadonly\", (inst, def) => {\n    core.$ZodReadonly.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.readonlyProcessor(inst, ctx, json, params);\n    inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function readonly(innerType) {\n    return new ZodReadonly({\n        type: \"readonly\",\n        innerType: innerType,\n    });\n}\nexport const ZodTemplateLiteral = /*@__PURE__*/ core.$constructor(\"ZodTemplateLiteral\", (inst, def) => {\n    core.$ZodTemplateLiteral.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.templateLiteralProcessor(inst, ctx, json, params);\n});\nexport function templateLiteral(parts, params) {\n    return new ZodTemplateLiteral({\n        type: \"template_literal\",\n        parts,\n        ...util.normalizeParams(params),\n    });\n}\nexport const ZodLazy = /*@__PURE__*/ core.$constructor(\"ZodLazy\", (inst, def) => {\n    core.$ZodLazy.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.lazyProcessor(inst, ctx, json, params);\n    inst.unwrap = () => inst._zod.def.getter();\n});\nexport function lazy(getter) {\n    return new ZodLazy({\n        type: \"lazy\",\n        getter: getter,\n    });\n}\nexport const ZodPromise = /*@__PURE__*/ core.$constructor(\"ZodPromise\", (inst, def) => {\n    core.$ZodPromise.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.promiseProcessor(inst, ctx, json, params);\n    inst.unwrap = () => inst._zod.def.innerType;\n});\nexport function promise(innerType) {\n    return new ZodPromise({\n        type: \"promise\",\n        innerType: innerType,\n    });\n}\nexport const ZodFunction = /*@__PURE__*/ core.$constructor(\"ZodFunction\", (inst, def) => {\n    core.$ZodFunction.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.functionProcessor(inst, ctx, json, params);\n});\nexport function _function(params) {\n    return new ZodFunction({\n        type: \"function\",\n        input: Array.isArray(params?.input) ? tuple(params?.input) : (params?.input ?? array(unknown())),\n        output: params?.output ?? unknown(),\n    });\n}\nexport { _function as function };\nexport const ZodCustom = /*@__PURE__*/ core.$constructor(\"ZodCustom\", (inst, def) => {\n    core.$ZodCustom.init(inst, def);\n    ZodType.init(inst, def);\n    inst._zod.processJSONSchema = (ctx, json, params) => processors.customProcessor(inst, ctx, json, params);\n});\n// custom checks\nexport function check(fn) {\n    const ch = new core.$ZodCheck({\n        check: \"custom\",\n        // ...util.normalizeParams(params),\n    });\n    ch._zod.check = fn;\n    return ch;\n}\nexport function custom(fn, _params) {\n    return core._custom(ZodCustom, fn ?? (() => true), _params);\n}\nexport function refine(fn, _params = {}) {\n    return core._refine(ZodCustom, fn, _params);\n}\n// superRefine\nexport function superRefine(fn, params) {\n    return core._superRefine(fn, params);\n}\n// Re-export describe and meta from core\nexport const describe = core.describe;\nexport const meta = core.meta;\nexport const ZodInstanceOf = /*@__PURE__*/ core.$constructor(\"ZodInstanceOf\", (inst, def) => {\n    ZodCustom.init(inst, def);\n}, {\n    properties(shape, params) {\n        // asserts in place, so the narrowed output type is truthful without a wrapper\n        return this.check(core._properties(shape, params));\n    },\n});\nfunction _instanceof(cls, params = {}) {\n    const inst = new ZodInstanceOf({\n        type: \"custom\",\n        check: \"custom\",\n        fn: (data) => data instanceof cls,\n        abort: true,\n        ...util.normalizeParams(params),\n    });\n    inst._zod.bag.Class = cls;\n    // Override check to emit invalid_type instead of custom\n    inst._zod.check = (payload) => {\n        if (!(payload.value instanceof cls)) {\n            payload.issues.push({\n                code: \"invalid_type\",\n                expected: cls.name,\n                input: payload.value,\n                inst,\n                path: [...(inst._zod.def.path ?? [])],\n            });\n        }\n    };\n    return inst;\n}\nexport { _instanceof as instanceof };\n// stringbool\nexport const stringbool = (...args) => core._stringbool({\n    Codec: ZodCodec,\n    Boolean: ZodBoolean,\n    String: ZodString,\n}, ...args);\nexport function json(params) {\n    const jsonSchema = lazy(() => {\n        return union([string(params), number(), boolean(), _null(), array(jsonSchema), record(string(), jsonSchema)]);\n    });\n    return jsonSchema;\n}\n// preprocess\nexport function preprocess(fn, schema) {\n    return new ZodPreprocess({\n        type: \"pipe\",\n        in: transform(fn),\n        out: schema,\n    });\n}\n","import { t as esm_default } from \"./esm-CWlHuVIx.js\";\nimport { z } from \"zod/v4\";\n//#region src/zod-to-json.ts\nconst PATCHED = Symbol(\"__mastra_patched__\");\n/**\n* Recursively patch Zod v4 record schemas that are missing valueType.\n* This fixes a bug in Zod v4 where z.record(valueSchema) doesn't set def.valueType.\n* The single-arg form should set valueType but instead only sets keyType.\n*\n* Idempotent — marks patched schemas with a Symbol so repeat calls no-op.\n*\n* @internal Exported so the Zod v4 standard-schema adapter can apply the\n* same patch before its native `toJSONSchema` call (the legacy `zodToJsonSchema`\n* entry already calls it; the `applyCompatLayer` path otherwise wouldn't).\n* Not part of the public API.\n*/\nfunction patchRecordSchemas(schema) {\n\tif (!schema || typeof schema !== \"object\") return schema;\n\tif (schema[PATCHED]) return schema;\n\tschema[PATCHED] = true;\n\tconst def = schema._zod?.def;\n\tif (def?.type === \"record\" && def.keyType && !def.valueType) {\n\t\tdef.valueType = def.keyType;\n\t\tdef.keyType = z.string();\n\t}\n\tif (!def) return schema;\n\tif (def.type === \"object\" && def.shape) {\n\t\tconst shape = typeof def.shape === \"function\" ? def.shape() : def.shape;\n\t\tfor (const key of Object.keys(shape)) patchRecordSchemas(shape[key]);\n\t}\n\tif (def.type === \"array\" && def.element) patchRecordSchemas(def.element);\n\tif (def.type === \"union\" && def.options) def.options.forEach(patchRecordSchemas);\n\tif (def.type === \"record\") {\n\t\tif (def.keyType) patchRecordSchemas(def.keyType);\n\t\tif (def.valueType) patchRecordSchemas(def.valueType);\n\t}\n\tif (def.type === \"intersection\") {\n\t\tif (def.left) patchRecordSchemas(def.left);\n\t\tif (def.right) patchRecordSchemas(def.right);\n\t}\n\tif (def.type === \"lazy\") {\n\t\tif (def.getter && typeof def.getter === \"function\") {\n\t\t\tconst originalGetter = def.getter;\n\t\t\tdef.getter = function() {\n\t\t\t\tconst innerSchema = originalGetter();\n\t\t\t\tif (innerSchema) patchRecordSchemas(innerSchema);\n\t\t\t\treturn innerSchema;\n\t\t\t};\n\t\t}\n\t}\n\tif (def.innerType) patchRecordSchemas(def.innerType);\n\treturn schema;\n}\n/**\n* Recursively fixes anyOf patterns that some providers (like OpenAI) don't accept.\n* Converts anyOf: [{type: X}, {type: \"null\"}] to type: [X, \"null\"]\n* Also fixes empty {} property schemas by converting to a union of primitive types.\n*/\nfunction fixAnyOfNullable(schema) {\n\tif (typeof schema !== \"object\" || schema === null) return schema;\n\tconst result = { ...schema };\n\tif (result.anyOf && Array.isArray(result.anyOf) && result.anyOf.length === 2) {\n\t\tconst nullSchema = result.anyOf.find((s) => typeof s === \"object\" && s !== null && s.type === \"null\");\n\t\tconst otherSchema = result.anyOf.find((s) => typeof s === \"object\" && s !== null && s.type !== \"null\");\n\t\tif (nullSchema && otherSchema && typeof otherSchema === \"object\" && otherSchema.type) {\n\t\t\tconst { anyOf, ...rest } = result;\n\t\t\tconst fixedRest = fixAnyOfNullable(rest);\n\t\t\tconst { const: constValue, ...fixedOther } = fixAnyOfNullable(otherSchema);\n\t\t\tconst merged = {\n\t\t\t\t...fixedRest,\n\t\t\t\t...fixedOther,\n\t\t\t\ttype: Array.isArray(fixedOther.type) ? [...fixedOther.type, \"null\"] : [fixedOther.type, \"null\"]\n\t\t\t};\n\t\t\tif (constValue !== void 0) merged.enum = [constValue, null];\n\t\t\telse if (Array.isArray(fixedOther.enum) && !fixedOther.enum.includes(null)) merged.enum = [...fixedOther.enum, null];\n\t\t\treturn merged;\n\t\t}\n\t}\n\tif (result.properties && typeof result.properties === \"object\" && !Array.isArray(result.properties)) result.properties = Object.fromEntries(Object.entries(result.properties).map(([key, value]) => {\n\t\tconst propSchema = value;\n\t\tif (typeof propSchema === \"object\" && propSchema !== null && !Array.isArray(propSchema) && Object.keys(propSchema).length === 0) return [key, { type: [\n\t\t\t\"string\",\n\t\t\t\"number\",\n\t\t\t\"boolean\",\n\t\t\t\"null\"\n\t\t] }];\n\t\treturn [key, fixAnyOfNullable(propSchema)];\n\t}));\n\tif (result.items) if (Array.isArray(result.items)) result.items = result.items.map((item) => fixAnyOfNullable(item));\n\telse result.items = fixAnyOfNullable(result.items);\n\tif (result.anyOf && Array.isArray(result.anyOf)) result.anyOf = result.anyOf.map((s) => fixAnyOfNullable(s));\n\tif (result.oneOf && Array.isArray(result.oneOf)) result.oneOf = result.oneOf.map((s) => fixAnyOfNullable(s));\n\tif (result.allOf && Array.isArray(result.allOf)) result.allOf = result.allOf.map((s) => fixAnyOfNullable(s));\n\treturn result;\n}\n/**\n* Apply a strict-mode pass to every schema hoisted into `$defs`/`definitions`.\n* zod-to-json-schema (v3 path, `$refStrategy: 'relative'`) lifts reused subschemas into\n* these definition maps and references them via `$ref`, so the referenced schemas must be\n* processed with the same pass as inline nodes or their unsupported keywords leak through.\n*/\nfunction applyToDefinitions(result, fn) {\n\tfor (const defKey of [\"$defs\", \"definitions\"]) {\n\t\tconst defs = result[defKey];\n\t\tif (defs && typeof defs === \"object\" && !Array.isArray(defs)) result[defKey] = Object.fromEntries(Object.entries(defs).map(([key, value]) => [key, typeof value === \"object\" && value !== null ? fn(value) : value]));\n\t}\n}\n/**\n* Recursively ensures all properties in an object schema are included in the `required` array.\n* OpenAI's strict structured output mode requires every key in `properties` to also appear in `required`.\n*\n* @param schema - The JSON Schema to process\n* @returns A new schema with all properties marked as required\n*/\nfunction ensureAllPropertiesRequired(schema) {\n\tif (typeof schema !== \"object\" || schema === null) return schema;\n\tconst result = { ...schema };\n\tif (result.type === \"object\" && result.properties) {\n\t\tresult.required = Object.keys(result.properties);\n\t\tresult.properties = Object.fromEntries(Object.entries(result.properties).map(([key, value]) => [key, ensureAllPropertiesRequired(value)]));\n\t}\n\tif (result.items) {\n\t\tif (Array.isArray(result.items)) result.items = result.items.map((item) => ensureAllPropertiesRequired(item));\n\t\telse if (typeof result.items === \"object\") result.items = ensureAllPropertiesRequired(result.items);\n\t}\n\tif (result.additionalProperties && typeof result.additionalProperties === \"object\") result.additionalProperties = ensureAllPropertiesRequired(result.additionalProperties);\n\tif (result.anyOf && Array.isArray(result.anyOf)) result.anyOf = result.anyOf.map((s) => ensureAllPropertiesRequired(s));\n\tif (result.oneOf && Array.isArray(result.oneOf)) result.oneOf = result.oneOf.map((s) => ensureAllPropertiesRequired(s));\n\tif (result.allOf && Array.isArray(result.allOf)) result.allOf = result.allOf.map((s) => ensureAllPropertiesRequired(s));\n\tapplyToDefinitions(result, ensureAllPropertiesRequired);\n\treturn result;\n}\n/**\n* Prepare a JSON Schema for OpenAI strict mode by ensuring all object properties\n* are required and all objects have additionalProperties: false.\n*/\nfunction prepareJsonSchemaForOpenAIStrictMode(schema) {\n\treturn stripUnsupportedStrictModeKeywords(ensureAdditionalPropertiesFalse(ensureAllPropertiesRequired(schema)));\n}\nconst STRICT_MODE_DROPPED_KEYWORDS = [\n\t\"contains\",\n\t\"minContains\",\n\t\"maxContains\",\n\t\"minProperties\",\n\t\"maxProperties\",\n\t\"patternProperties\",\n\t\"unevaluatedItems\",\n\t\"unevaluatedProperties\",\n\t\"not\",\n\t\"if\",\n\t\"then\",\n\t\"else\",\n\t\"dependentRequired\",\n\t\"dependentSchemas\"\n];\nfunction isDeepEqual(a, b) {\n\tif (a === b) return true;\n\tif (Array.isArray(a) || Array.isArray(b)) return Array.isArray(a) && Array.isArray(b) && a.length === b.length && a.every((v, i) => isDeepEqual(v, b[i]));\n\tif (typeof a !== \"object\" || typeof b !== \"object\" || a === null || b === null) return false;\n\tconst keysA = Object.keys(a);\n\tconst keysB = Object.keys(b);\n\treturn keysA.length === keysB.length && keysA.every((k) => Object.hasOwn(b, k) && isDeepEqual(a[k], b[k]));\n}\n/**\n* Merge `allOf` subschemas into the containing node. OpenAI strict mode rejects `allOf`\n* (only `anyOf` composition is supported), so the intersection is flattened into a single\n* node. Every keyword from every branch is hoisted so nothing (e.g. `enum`, `const`,\n* `items`, `anyOf`) is silently discarded:\n*\n* - `properties` are unioned; a property present in more than one branch must be identical.\n* - `required` is unioned. `additionalProperties: false` wins. Descriptions are concatenated.\n* - Any other keyword must either be absent from the target or deep-equal to the branch value.\n*\n* Intersections that cannot be represented this way (conflicting property schemas, types,\n* enums, nested `anyOf`, ...) are rejected with an error instead of producing a schema that\n* accepts values the original would have rejected. This mirrors the tool-path behaviour in\n* SchemaCompatLayer (\"Cannot flatten intersections with overlapping keys\").\n*/\nfunction mergeAllOfSubschemas(target, subschemas) {\n\tconst mergedProps = new Map(Object.entries(target.properties ?? {}));\n\tconst requiredSet = new Set(Array.isArray(target.required) ? target.required : []);\n\tconst descriptions = typeof target.description === \"string\" && target.description ? [target.description] : [];\n\tfor (const sub of subschemas) {\n\t\tif (!sub || typeof sub !== \"object\") continue;\n\t\tfor (const [key, value] of Object.entries(sub)) switch (key) {\n\t\t\tcase \"properties\":\n\t\t\t\tfor (const [propName, propSchema] of Object.entries(value)) {\n\t\t\t\t\tif (mergedProps.has(propName) && !isDeepEqual(mergedProps.get(propName), propSchema)) throw new Error(`Cannot flatten allOf for OpenAI strict mode: property \"${propName}\" is defined differently in multiple branches`);\n\t\t\t\t\tmergedProps.set(propName, propSchema);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"required\":\n\t\t\t\tif (Array.isArray(value)) for (const name of value) requiredSet.add(name);\n\t\t\t\tbreak;\n\t\t\tcase \"additionalProperties\":\n\t\t\t\tif (value === false) target.additionalProperties = false;\n\t\t\t\tbreak;\n\t\t\tcase \"description\":\n\t\t\t\tif (typeof value === \"string\" && value) descriptions.push(value);\n\t\t\t\tbreak;\n\t\t\tdefault: if (target[key] === void 0) target[key] = value;\n\t\t\telse if (!isDeepEqual(target[key], value)) throw new Error(`Cannot flatten allOf for OpenAI strict mode: conflicting \"${key}\" values across branches`);\n\t\t}\n\t}\n\tif (mergedProps.size) target.properties = Object.fromEntries(mergedProps);\n\tif (requiredSet.size) target.required = [...requiredSet];\n\tif (descriptions.length) target.description = descriptions.join(\" \");\n}\n/**\n* Merge constraint phrases into a schema node's description.\n* Mirrors SchemaCompatLayer.mergeParameterDescription phrasing so the strict-mode\n* output path degrades identically to the tool path.\n*/\nfunction appendConstraintsToDescription(description, constraints) {\n\tif (constraints.length === 0) return description;\n\tconst suffix = constraints.join(\", \");\n\treturn description ? `${description} (${suffix})` : suffix;\n}\n/**\n* Recursively remove JSON Schema validation keywords that OpenAI strict mode rejects.\n* Constraints with useful intent (length/number/pattern/format/uniqueness bounds) are folded\n* into the node's `description` — matching how the tool-path SchemaCompatLayer degrades them\n* in schema-compatibility.ts — while purely structural unsupported keywords are dropped.\n*/\nfunction stripUnsupportedStrictModeKeywords(schema) {\n\tif (typeof schema !== \"object\" || schema === null) return schema;\n\tconst result = { ...schema };\n\tconst constraints = [];\n\tconst { minItems, maxItems } = result;\n\tif (minItems !== void 0 && maxItems !== void 0 && minItems === maxItems) constraints.push(`exact length ${minItems}`);\n\telse {\n\t\tif (minItems !== void 0) constraints.push(`minimum length ${minItems}`);\n\t\tif (maxItems !== void 0) constraints.push(`maximum length ${maxItems}`);\n\t}\n\tdelete result.minItems;\n\tdelete result.maxItems;\n\tif (result.uniqueItems === true) constraints.push(\"all items must be unique\");\n\tdelete result.uniqueItems;\n\tif (result.minLength !== void 0) {\n\t\tconstraints.push(`minimum length ${result.minLength}`);\n\t\tdelete result.minLength;\n\t}\n\tif (result.maxLength !== void 0) {\n\t\tconstraints.push(`maximum length ${result.maxLength}`);\n\t\tdelete result.maxLength;\n\t}\n\tif (result.format !== void 0) {\n\t\tconstraints.push(`a valid ${result.format}`);\n\t\tdelete result.format;\n\t}\n\tif (result.pattern !== void 0) {\n\t\tconstraints.push(`input must match this regex ${result.pattern}`);\n\t\tdelete result.pattern;\n\t}\n\tif (result.minimum !== void 0) {\n\t\tif (result.minimum !== Number.MIN_SAFE_INTEGER) constraints.push(`greater than or equal to ${result.minimum}`);\n\t\tdelete result.minimum;\n\t}\n\tif (result.maximum !== void 0) {\n\t\tif (result.maximum !== Number.MAX_SAFE_INTEGER) constraints.push(`lower than or equal to ${result.maximum}`);\n\t\tdelete result.maximum;\n\t}\n\tif (result.exclusiveMinimum !== void 0) {\n\t\tconstraints.push(`greater than ${result.exclusiveMinimum}`);\n\t\tdelete result.exclusiveMinimum;\n\t}\n\tif (result.exclusiveMaximum !== void 0) {\n\t\tconstraints.push(`lower than ${result.exclusiveMaximum}`);\n\t\tdelete result.exclusiveMaximum;\n\t}\n\tif (result.multipleOf !== void 0) {\n\t\tconstraints.push(`multiple of ${result.multipleOf}`);\n\t\tdelete result.multipleOf;\n\t}\n\tfor (const keyword of STRICT_MODE_DROPPED_KEYWORDS) delete result[keyword];\n\tif (constraints.length) result.description = appendConstraintsToDescription(result.description, constraints);\n\tif (result.properties) result.properties = Object.fromEntries(Object.entries(result.properties).map(([key, value]) => [key, stripUnsupportedStrictModeKeywords(value)]));\n\tif (result.items) {\n\t\tif (Array.isArray(result.items)) result.items = result.items.map((item) => stripUnsupportedStrictModeKeywords(item));\n\t\telse if (typeof result.items === \"object\") result.items = stripUnsupportedStrictModeKeywords(result.items);\n\t}\n\tif (result.additionalProperties && typeof result.additionalProperties === \"object\") result.additionalProperties = stripUnsupportedStrictModeKeywords(result.additionalProperties);\n\tif (result.anyOf && Array.isArray(result.anyOf)) result.anyOf = result.anyOf.map((s) => stripUnsupportedStrictModeKeywords(s));\n\tif (result.oneOf && Array.isArray(result.oneOf)) {\n\t\tif (Array.isArray(result.anyOf)) throw new Error(\"Cannot convert schema for OpenAI strict mode: \\\"oneOf\\\" and \\\"anyOf\\\" on the same node cannot be merged without changing semantics\");\n\t\tresult.anyOf = result.oneOf.map((s) => stripUnsupportedStrictModeKeywords(s));\n\t\tdelete result.oneOf;\n\t}\n\tif (result.allOf && Array.isArray(result.allOf)) {\n\t\tconst merged = result.allOf.map((s) => stripUnsupportedStrictModeKeywords(s));\n\t\tdelete result.allOf;\n\t\tmergeAllOfSubschemas(result, merged);\n\t}\n\tapplyToDefinitions(result, stripUnsupportedStrictModeKeywords);\n\treturn result;\n}\nfunction ensureAdditionalPropertiesFalse(schema) {\n\tif (typeof schema !== \"object\" || schema === null) return schema;\n\tconst result = { ...schema };\n\tif (result.type === \"object\" || result.properties) result.additionalProperties = false;\n\tif (result.properties) result.properties = Object.fromEntries(Object.entries(result.properties).map(([key, value]) => [key, ensureAdditionalPropertiesFalse(value)]));\n\tif (result.items) {\n\t\tif (Array.isArray(result.items)) result.items = result.items.map((item) => ensureAdditionalPropertiesFalse(item));\n\t\telse if (typeof result.items === \"object\") result.items = ensureAdditionalPropertiesFalse(result.items);\n\t}\n\tif (result.anyOf && Array.isArray(result.anyOf)) result.anyOf = result.anyOf.map((s) => ensureAdditionalPropertiesFalse(s));\n\tif (result.oneOf && Array.isArray(result.oneOf)) result.oneOf = result.oneOf.map((s) => ensureAdditionalPropertiesFalse(s));\n\tif (result.allOf && Array.isArray(result.allOf)) result.allOf = result.allOf.map((s) => ensureAdditionalPropertiesFalse(s));\n\tapplyToDefinitions(result, ensureAdditionalPropertiesFalse);\n\treturn result;\n}\nfunction zodToJsonSchema(zodSchema, target = \"jsonSchema7\", strategy = \"relative\") {\n\tif (zodSchema?._zod) {\n\t\tpatchRecordSchemas(zodSchema);\n\t\treturn fixAnyOfNullable(z.toJSONSchema(zodSchema, {\n\t\t\tunrepresentable: \"any\",\n\t\t\tio: \"input\",\n\t\t\toverride: (ctx) => {\n\t\t\t\tconst def = ctx.zodSchema?._def || ctx.zodSchema?._zod?.def;\n\t\t\t\tif (def && (def.typeName === \"ZodDate\" || def.type === \"date\")) {\n\t\t\t\t\tctx.jsonSchema.type = \"string\";\n\t\t\t\t\tctx.jsonSchema.format = \"date-time\";\n\t\t\t\t}\n\t\t\t\tif (def && (def.typeName === \"ZodObject\" || def.type === \"object\")) ctx.jsonSchema.additionalProperties = false;\n\t\t\t}\n\t\t}));\n\t} else return esm_default(zodSchema, {\n\t\t$refStrategy: strategy,\n\t\ttarget\n\t});\n}\n//#endregion\nexport { ensureAllPropertiesRequired, patchRecordSchemas, prepareJsonSchemaForOpenAIStrictMode, zodToJsonSchema };\n\n//# sourceMappingURL=zod-to-json.js.map","//#region src/standard-schema/adapters/ai-sdk.ts\n/**\n* Vendor name for AI SDK wrapped schemas.\n*/\nconst VENDOR = \"ai-sdk\";\n/**\n* A wrapper class that makes AI SDK Schema compatible with @standard-schema/spec.\n*\n* This class implements both `StandardSchemaV1` (validation) and `StandardJSONSchemaV1`\n* (JSON Schema conversion) interfaces. It wraps an AI SDK Schema and adapts its\n* validation method and jsonSchema property to the standard-schema interface.\n*\n* @typeParam T - The TypeScript type that the AI SDK Schema represents\n*\n* @example\n* ```typescript\n* import { jsonSchema } from '@internal/ai-v6';\n* import { toStandardSchema } from '@mastra/schema-compat/adapters/ai-sdk';\n*\n* // Create an AI SDK schema\n* const aiSdkSchema = jsonSchema<{ name: string; age: number }>({\n*   type: 'object',\n*   properties: {\n*     name: { type: 'string' },\n*     age: { type: 'number' },\n*   },\n*   required: ['name', 'age'],\n* });\n*\n* // Convert to standard-schema\n* const standardSchema = toStandardSchema(aiSdkSchema);\n*\n* // Use validation (from StandardSchemaV1)\n* const result = standardSchema['~standard'].validate({ name: 'John', age: 30 });\n*\n* // Get JSON Schema (from StandardJSONSchemaV1)\n* const jsonSchema = standardSchema['~standard'].jsonSchema.output({ target: 'draft-07' });\n* ```\n*/\nvar AiSdkSchemaWrapper = class {\n\t#schema;\n\t\"~standard\";\n\tconstructor(schema) {\n\t\tthis.#schema = schema;\n\t\tthis[\"~standard\"] = {\n\t\t\tversion: 1,\n\t\t\tvendor: VENDOR,\n\t\t\tvalidate: this.#validate.bind(this),\n\t\t\tjsonSchema: {\n\t\t\t\tinput: this.#toJsonSchema.bind(this),\n\t\t\t\toutput: this.#toJsonSchema.bind(this)\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t* Validates a value against the AI SDK Schema.\n\t*\n\t* @param value - The value to validate\n\t* @returns A result object with either the validated value or validation issues\n\t*/\n\t#validate(value) {\n\t\tif (!this.#schema.validate) return { value };\n\t\ttry {\n\t\t\tconst result = this.#schema.validate(value);\n\t\t\tif (result && typeof result === \"object\" && \"then\" in result && typeof result.then === \"function\") return Promise.resolve(result).then((res) => this.#convertValidationResult(res)).catch((error) => {\n\t\t\t\treturn { issues: [{ message: `Schema validation error: ${error instanceof Error ? error.message : \"Unknown validation error\"}` }] };\n\t\t\t});\n\t\t\treturn this.#convertValidationResult(result);\n\t\t} catch (error) {\n\t\t\treturn { issues: [{ message: `Schema validation error: ${error instanceof Error ? error.message : \"Unknown validation error\"}` }] };\n\t\t}\n\t}\n\t/**\n\t* Converts an AI SDK ValidationResult to a StandardSchemaV1.Result.\n\t*\n\t* @param result - The AI SDK validation result\n\t* @returns A StandardSchemaV1.Result\n\t*/\n\t#convertValidationResult(result) {\n\t\tif (result.success) return { value: result.value };\n\t\treturn { issues: [{ message: result.error.message }] };\n\t}\n\t/**\n\t* Returns the JSON Schema in the requested target format.\n\t*\n\t* @param options - Options including the target format\n\t* @returns The JSON Schema as a Record\n\t*/\n\t#toJsonSchema(options) {\n\t\tconst { target } = options;\n\t\tconst clonedSchema = JSON.parse(JSON.stringify(this.#schema.jsonSchema));\n\t\tif (!clonedSchema.$schema) switch (target) {\n\t\t\tcase \"draft-07\":\n\t\t\t\tclonedSchema.$schema = \"http://json-schema.org/draft-07/schema#\";\n\t\t\t\tbreak;\n\t\t\tcase \"draft-2020-12\":\n\t\t\t\tclonedSchema.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n\t\t\t\tbreak;\n\t\t\tcase \"openapi-3.0\": break;\n\t\t\tdefault: break;\n\t\t}\n\t\treturn clonedSchema;\n\t}\n\t/**\n\t* Returns the original AI SDK Schema.\n\t*/\n\tgetSchema() {\n\t\treturn this.#schema;\n\t}\n\t/**\n\t* Returns the original JSON Schema from the AI SDK Schema.\n\t*/\n\tgetJsonSchema() {\n\t\treturn this.#schema.jsonSchema;\n\t}\n};\n/**\n* Wraps an AI SDK Schema to implement the full @standard-schema/spec interface.\n*\n* This function creates a wrapper that implements both `StandardSchemaV1` (validation)\n* and `StandardJSONSchemaV1` (JSON Schema conversion) interfaces.\n*\n* @typeParam T - The TypeScript type that the AI SDK Schema represents\n* @param schema - The AI SDK Schema to wrap\n* @returns A wrapper implementing StandardSchemaWithJSON\n*\n* @example\n* ```typescript\n* import { jsonSchema } from '@internal/ai-v6';\n* import { toStandardSchema } from '@mastra/schema-compat/adapters/ai-sdk';\n*\n* const aiSdkSchema = jsonSchema<{ name: string; age: number }>({\n*   type: 'object',\n*   properties: {\n*     name: { type: 'string' },\n*     age: { type: 'number' },\n*   },\n*   required: ['name', 'age'],\n* });\n*\n* const standardSchema = toStandardSchema(aiSdkSchema);\n*\n* // Validate data\n* const result = standardSchema['~standard'].validate({ name: 'John', age: 30 });\n*\n* // Get JSON Schema\n* const jsonSchema = standardSchema['~standard'].jsonSchema.output({ target: 'draft-07' });\n* ```\n*/\nfunction toStandardSchema(schema) {\n\treturn new AiSdkSchemaWrapper(schema);\n}\n//#endregion\nexport { AiSdkSchemaWrapper, toStandardSchema };\n\n//# sourceMappingURL=ai-sdk.js.map","import { n as __commonJSMin, r as __toESM, t as require_json_schema_traverse } from \"./json-schema-traverse-B35mHRM8.js\";\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/codegen/code.js\nvar require_code$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.regexpCode = exports.getEsmExportName = exports.getProperty = exports.safeStringify = exports.stringify = exports.strConcat = exports.addCodeArg = exports.str = exports._ = exports.nil = exports._Code = exports.Name = exports.IDENTIFIER = exports._CodeOrName = void 0;\n\tvar _CodeOrName = class {};\n\texports._CodeOrName = _CodeOrName;\n\texports.IDENTIFIER = /^[a-z$_][a-z$_0-9]*$/i;\n\tvar Name = class extends _CodeOrName {\n\t\tconstructor(s) {\n\t\t\tsuper();\n\t\t\tif (!exports.IDENTIFIER.test(s)) throw new Error(\"CodeGen: name must be a valid identifier\");\n\t\t\tthis.str = s;\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.str;\n\t\t}\n\t\temptyStr() {\n\t\t\treturn false;\n\t\t}\n\t\tget names() {\n\t\t\treturn { [this.str]: 1 };\n\t\t}\n\t};\n\texports.Name = Name;\n\tvar _Code = class extends _CodeOrName {\n\t\tconstructor(code) {\n\t\t\tsuper();\n\t\t\tthis._items = typeof code === \"string\" ? [code] : code;\n\t\t}\n\t\ttoString() {\n\t\t\treturn this.str;\n\t\t}\n\t\temptyStr() {\n\t\t\tif (this._items.length > 1) return false;\n\t\t\tconst item = this._items[0];\n\t\t\treturn item === \"\" || item === \"\\\"\\\"\";\n\t\t}\n\t\tget str() {\n\t\t\tvar _a;\n\t\t\treturn (_a = this._str) !== null && _a !== void 0 ? _a : this._str = this._items.reduce((s, c) => `${s}${c}`, \"\");\n\t\t}\n\t\tget names() {\n\t\t\tvar _a;\n\t\t\treturn (_a = this._names) !== null && _a !== void 0 ? _a : this._names = this._items.reduce((names, c) => {\n\t\t\t\tif (c instanceof Name) names[c.str] = (names[c.str] || 0) + 1;\n\t\t\t\treturn names;\n\t\t\t}, {});\n\t\t}\n\t};\n\texports._Code = _Code;\n\texports.nil = new _Code(\"\");\n\tfunction _(strs, ...args) {\n\t\tconst code = [strs[0]];\n\t\tlet i = 0;\n\t\twhile (i < args.length) {\n\t\t\taddCodeArg(code, args[i]);\n\t\t\tcode.push(strs[++i]);\n\t\t}\n\t\treturn new _Code(code);\n\t}\n\texports._ = _;\n\tconst plus = new _Code(\"+\");\n\tfunction str(strs, ...args) {\n\t\tconst expr = [safeStringify(strs[0])];\n\t\tlet i = 0;\n\t\twhile (i < args.length) {\n\t\t\texpr.push(plus);\n\t\t\taddCodeArg(expr, args[i]);\n\t\t\texpr.push(plus, safeStringify(strs[++i]));\n\t\t}\n\t\toptimize(expr);\n\t\treturn new _Code(expr);\n\t}\n\texports.str = str;\n\tfunction addCodeArg(code, arg) {\n\t\tif (arg instanceof _Code) code.push(...arg._items);\n\t\telse if (arg instanceof Name) code.push(arg);\n\t\telse code.push(interpolate(arg));\n\t}\n\texports.addCodeArg = addCodeArg;\n\tfunction optimize(expr) {\n\t\tlet i = 1;\n\t\twhile (i < expr.length - 1) {\n\t\t\tif (expr[i] === plus) {\n\t\t\t\tconst res = mergeExprItems(expr[i - 1], expr[i + 1]);\n\t\t\t\tif (res !== void 0) {\n\t\t\t\t\texpr.splice(i - 1, 3, res);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\texpr[i++] = \"+\";\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t}\n\tfunction mergeExprItems(a, b) {\n\t\tif (b === \"\\\"\\\"\") return a;\n\t\tif (a === \"\\\"\\\"\") return b;\n\t\tif (typeof a == \"string\") {\n\t\t\tif (b instanceof Name || a[a.length - 1] !== \"\\\"\") return;\n\t\t\tif (typeof b != \"string\") return `${a.slice(0, -1)}${b}\"`;\n\t\t\tif (b[0] === \"\\\"\") return a.slice(0, -1) + b.slice(1);\n\t\t\treturn;\n\t\t}\n\t\tif (typeof b == \"string\" && b[0] === \"\\\"\" && !(a instanceof Name)) return `\"${a}${b.slice(1)}`;\n\t}\n\tfunction strConcat(c1, c2) {\n\t\treturn c2.emptyStr() ? c1 : c1.emptyStr() ? c2 : str`${c1}${c2}`;\n\t}\n\texports.strConcat = strConcat;\n\tfunction interpolate(x) {\n\t\treturn typeof x == \"number\" || typeof x == \"boolean\" || x === null ? x : safeStringify(Array.isArray(x) ? x.join(\",\") : x);\n\t}\n\tfunction stringify(x) {\n\t\treturn new _Code(safeStringify(x));\n\t}\n\texports.stringify = stringify;\n\tfunction safeStringify(x) {\n\t\treturn JSON.stringify(x).replace(/\\u2028/g, \"\\\\u2028\").replace(/\\u2029/g, \"\\\\u2029\");\n\t}\n\texports.safeStringify = safeStringify;\n\tfunction getProperty(key) {\n\t\treturn typeof key == \"string\" && exports.IDENTIFIER.test(key) ? new _Code(`.${key}`) : _`[${key}]`;\n\t}\n\texports.getProperty = getProperty;\n\tfunction getEsmExportName(key) {\n\t\tif (typeof key == \"string\" && exports.IDENTIFIER.test(key)) return new _Code(`${key}`);\n\t\tthrow new Error(`CodeGen: invalid export name: ${key}, use explicit $id name mapping`);\n\t}\n\texports.getEsmExportName = getEsmExportName;\n\tfunction regexpCode(rx) {\n\t\treturn new _Code(rx.toString());\n\t}\n\texports.regexpCode = regexpCode;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/codegen/scope.js\nvar require_scope = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.ValueScope = exports.ValueScopeName = exports.Scope = exports.varKinds = exports.UsedValueState = void 0;\n\tconst code_1 = require_code$1();\n\tvar ValueError = class extends Error {\n\t\tconstructor(name) {\n\t\t\tsuper(`CodeGen: \"code\" for ${name} not defined`);\n\t\t\tthis.value = name.value;\n\t\t}\n\t};\n\tvar UsedValueState;\n\t(function(UsedValueState) {\n\t\tUsedValueState[UsedValueState[\"Started\"] = 0] = \"Started\";\n\t\tUsedValueState[UsedValueState[\"Completed\"] = 1] = \"Completed\";\n\t})(UsedValueState || (exports.UsedValueState = UsedValueState = {}));\n\texports.varKinds = {\n\t\tconst: new code_1.Name(\"const\"),\n\t\tlet: new code_1.Name(\"let\"),\n\t\tvar: new code_1.Name(\"var\")\n\t};\n\tvar Scope = class {\n\t\tconstructor({ prefixes, parent } = {}) {\n\t\t\tthis._names = {};\n\t\t\tthis._prefixes = prefixes;\n\t\t\tthis._parent = parent;\n\t\t}\n\t\ttoName(nameOrPrefix) {\n\t\t\treturn nameOrPrefix instanceof code_1.Name ? nameOrPrefix : this.name(nameOrPrefix);\n\t\t}\n\t\tname(prefix) {\n\t\t\treturn new code_1.Name(this._newName(prefix));\n\t\t}\n\t\t_newName(prefix) {\n\t\t\tconst ng = this._names[prefix] || this._nameGroup(prefix);\n\t\t\treturn `${prefix}${ng.index++}`;\n\t\t}\n\t\t_nameGroup(prefix) {\n\t\t\tvar _a, _b;\n\t\t\tif (((_b = (_a = this._parent) === null || _a === void 0 ? void 0 : _a._prefixes) === null || _b === void 0 ? void 0 : _b.has(prefix)) || this._prefixes && !this._prefixes.has(prefix)) throw new Error(`CodeGen: prefix \"${prefix}\" is not allowed in this scope`);\n\t\t\treturn this._names[prefix] = {\n\t\t\t\tprefix,\n\t\t\t\tindex: 0\n\t\t\t};\n\t\t}\n\t};\n\texports.Scope = Scope;\n\tvar ValueScopeName = class extends code_1.Name {\n\t\tconstructor(prefix, nameStr) {\n\t\t\tsuper(nameStr);\n\t\t\tthis.prefix = prefix;\n\t\t}\n\t\tsetValue(value, { property, itemIndex }) {\n\t\t\tthis.value = value;\n\t\t\tthis.scopePath = (0, code_1._)`.${new code_1.Name(property)}[${itemIndex}]`;\n\t\t}\n\t};\n\texports.ValueScopeName = ValueScopeName;\n\tconst line = (0, code_1._)`\\n`;\n\tvar ValueScope = class extends Scope {\n\t\tconstructor(opts) {\n\t\t\tsuper(opts);\n\t\t\tthis._values = {};\n\t\t\tthis._scope = opts.scope;\n\t\t\tthis.opts = {\n\t\t\t\t...opts,\n\t\t\t\t_n: opts.lines ? line : code_1.nil\n\t\t\t};\n\t\t}\n\t\tget() {\n\t\t\treturn this._scope;\n\t\t}\n\t\tname(prefix) {\n\t\t\treturn new ValueScopeName(prefix, this._newName(prefix));\n\t\t}\n\t\tvalue(nameOrPrefix, value) {\n\t\t\tvar _a;\n\t\t\tif (value.ref === void 0) throw new Error(\"CodeGen: ref must be passed in value\");\n\t\t\tconst name = this.toName(nameOrPrefix);\n\t\t\tconst { prefix } = name;\n\t\t\tconst valueKey = (_a = value.key) !== null && _a !== void 0 ? _a : value.ref;\n\t\t\tlet vs = this._values[prefix];\n\t\t\tif (vs) {\n\t\t\t\tconst _name = vs.get(valueKey);\n\t\t\t\tif (_name) return _name;\n\t\t\t} else vs = this._values[prefix] = /* @__PURE__ */ new Map();\n\t\t\tvs.set(valueKey, name);\n\t\t\tconst s = this._scope[prefix] || (this._scope[prefix] = []);\n\t\t\tconst itemIndex = s.length;\n\t\t\ts[itemIndex] = value.ref;\n\t\t\tname.setValue(value, {\n\t\t\t\tproperty: prefix,\n\t\t\t\titemIndex\n\t\t\t});\n\t\t\treturn name;\n\t\t}\n\t\tgetValue(prefix, keyOrRef) {\n\t\t\tconst vs = this._values[prefix];\n\t\t\tif (!vs) return;\n\t\t\treturn vs.get(keyOrRef);\n\t\t}\n\t\tscopeRefs(scopeName, values = this._values) {\n\t\t\treturn this._reduceValues(values, (name) => {\n\t\t\t\tif (name.scopePath === void 0) throw new Error(`CodeGen: name \"${name}\" has no value`);\n\t\t\t\treturn (0, code_1._)`${scopeName}${name.scopePath}`;\n\t\t\t});\n\t\t}\n\t\tscopeCode(values = this._values, usedValues, getCode) {\n\t\t\treturn this._reduceValues(values, (name) => {\n\t\t\t\tif (name.value === void 0) throw new Error(`CodeGen: name \"${name}\" has no value`);\n\t\t\t\treturn name.value.code;\n\t\t\t}, usedValues, getCode);\n\t\t}\n\t\t_reduceValues(values, valueCode, usedValues = {}, getCode) {\n\t\t\tlet code = code_1.nil;\n\t\t\tfor (const prefix in values) {\n\t\t\t\tconst vs = values[prefix];\n\t\t\t\tif (!vs) continue;\n\t\t\t\tconst nameSet = usedValues[prefix] = usedValues[prefix] || /* @__PURE__ */ new Map();\n\t\t\t\tvs.forEach((name) => {\n\t\t\t\t\tif (nameSet.has(name)) return;\n\t\t\t\t\tnameSet.set(name, UsedValueState.Started);\n\t\t\t\t\tlet c = valueCode(name);\n\t\t\t\t\tif (c) {\n\t\t\t\t\t\tconst def = this.opts.es5 ? exports.varKinds.var : exports.varKinds.const;\n\t\t\t\t\t\tcode = (0, code_1._)`${code}${def} ${name} = ${c};${this.opts._n}`;\n\t\t\t\t\t} else if (c = getCode === null || getCode === void 0 ? void 0 : getCode(name)) code = (0, code_1._)`${code}${c}${this.opts._n}`;\n\t\t\t\t\telse throw new ValueError(name);\n\t\t\t\t\tnameSet.set(name, UsedValueState.Completed);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn code;\n\t\t}\n\t};\n\texports.ValueScope = ValueScope;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/codegen/index.js\nvar require_codegen = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.or = exports.and = exports.not = exports.CodeGen = exports.operators = exports.varKinds = exports.ValueScopeName = exports.ValueScope = exports.Scope = exports.Name = exports.regexpCode = exports.stringify = exports.getProperty = exports.nil = exports.strConcat = exports.str = exports._ = void 0;\n\tconst code_1 = require_code$1();\n\tconst scope_1 = require_scope();\n\tvar code_2 = require_code$1();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"strConcat\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.strConcat;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"getProperty\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.getProperty;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"regexpCode\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.regexpCode;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn code_2.Name;\n\t\t}\n\t});\n\tvar scope_2 = require_scope();\n\tObject.defineProperty(exports, \"Scope\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn scope_2.Scope;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"ValueScope\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn scope_2.ValueScope;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"ValueScopeName\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn scope_2.ValueScopeName;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"varKinds\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn scope_2.varKinds;\n\t\t}\n\t});\n\texports.operators = {\n\t\tGT: new code_1._Code(\">\"),\n\t\tGTE: new code_1._Code(\">=\"),\n\t\tLT: new code_1._Code(\"<\"),\n\t\tLTE: new code_1._Code(\"<=\"),\n\t\tEQ: new code_1._Code(\"===\"),\n\t\tNEQ: new code_1._Code(\"!==\"),\n\t\tNOT: new code_1._Code(\"!\"),\n\t\tOR: new code_1._Code(\"||\"),\n\t\tAND: new code_1._Code(\"&&\"),\n\t\tADD: new code_1._Code(\"+\")\n\t};\n\tvar Node = class {\n\t\toptimizeNodes() {\n\t\t\treturn this;\n\t\t}\n\t\toptimizeNames(_names, _constants) {\n\t\t\treturn this;\n\t\t}\n\t};\n\tvar Def = class extends Node {\n\t\tconstructor(varKind, name, rhs) {\n\t\t\tsuper();\n\t\t\tthis.varKind = varKind;\n\t\t\tthis.name = name;\n\t\t\tthis.rhs = rhs;\n\t\t}\n\t\trender({ es5, _n }) {\n\t\t\tconst varKind = es5 ? scope_1.varKinds.var : this.varKind;\n\t\t\tconst rhs = this.rhs === void 0 ? \"\" : ` = ${this.rhs}`;\n\t\t\treturn `${varKind} ${this.name}${rhs};` + _n;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tif (!names[this.name.str]) return;\n\t\t\tif (this.rhs) this.rhs = optimizeExpr(this.rhs, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn this.rhs instanceof code_1._CodeOrName ? this.rhs.names : {};\n\t\t}\n\t};\n\tvar Assign = class extends Node {\n\t\tconstructor(lhs, rhs, sideEffects) {\n\t\t\tsuper();\n\t\t\tthis.lhs = lhs;\n\t\t\tthis.rhs = rhs;\n\t\t\tthis.sideEffects = sideEffects;\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `${this.lhs} = ${this.rhs};` + _n;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tif (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects) return;\n\t\t\tthis.rhs = optimizeExpr(this.rhs, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn addExprNames(this.lhs instanceof code_1.Name ? {} : { ...this.lhs.names }, this.rhs);\n\t\t}\n\t};\n\tvar AssignOp = class extends Assign {\n\t\tconstructor(lhs, op, rhs, sideEffects) {\n\t\t\tsuper(lhs, rhs, sideEffects);\n\t\t\tthis.op = op;\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `${this.lhs} ${this.op}= ${this.rhs};` + _n;\n\t\t}\n\t};\n\tvar Label = class extends Node {\n\t\tconstructor(label) {\n\t\t\tsuper();\n\t\t\tthis.label = label;\n\t\t\tthis.names = {};\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `${this.label}:` + _n;\n\t\t}\n\t};\n\tvar Break = class extends Node {\n\t\tconstructor(label) {\n\t\t\tsuper();\n\t\t\tthis.label = label;\n\t\t\tthis.names = {};\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `break${this.label ? ` ${this.label}` : \"\"};` + _n;\n\t\t}\n\t};\n\tvar Throw = class extends Node {\n\t\tconstructor(error) {\n\t\t\tsuper();\n\t\t\tthis.error = error;\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `throw ${this.error};` + _n;\n\t\t}\n\t\tget names() {\n\t\t\treturn this.error.names;\n\t\t}\n\t};\n\tvar AnyCode = class extends Node {\n\t\tconstructor(code) {\n\t\t\tsuper();\n\t\t\tthis.code = code;\n\t\t}\n\t\trender({ _n }) {\n\t\t\treturn `${this.code};` + _n;\n\t\t}\n\t\toptimizeNodes() {\n\t\t\treturn `${this.code}` ? this : void 0;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tthis.code = optimizeExpr(this.code, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn this.code instanceof code_1._CodeOrName ? this.code.names : {};\n\t\t}\n\t};\n\tvar ParentNode = class extends Node {\n\t\tconstructor(nodes = []) {\n\t\t\tsuper();\n\t\t\tthis.nodes = nodes;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn this.nodes.reduce((code, n) => code + n.render(opts), \"\");\n\t\t}\n\t\toptimizeNodes() {\n\t\t\tconst { nodes } = this;\n\t\t\tlet i = nodes.length;\n\t\t\twhile (i--) {\n\t\t\t\tconst n = nodes[i].optimizeNodes();\n\t\t\t\tif (Array.isArray(n)) nodes.splice(i, 1, ...n);\n\t\t\t\telse if (n) nodes[i] = n;\n\t\t\t\telse nodes.splice(i, 1);\n\t\t\t}\n\t\t\treturn nodes.length > 0 ? this : void 0;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tconst { nodes } = this;\n\t\t\tlet i = nodes.length;\n\t\t\twhile (i--) {\n\t\t\t\tconst n = nodes[i];\n\t\t\t\tif (n.optimizeNames(names, constants)) continue;\n\t\t\t\tsubtractNames(names, n.names);\n\t\t\t\tnodes.splice(i, 1);\n\t\t\t}\n\t\t\treturn nodes.length > 0 ? this : void 0;\n\t\t}\n\t\tget names() {\n\t\t\treturn this.nodes.reduce((names, n) => addNames(names, n.names), {});\n\t\t}\n\t};\n\tvar BlockNode = class extends ParentNode {\n\t\trender(opts) {\n\t\t\treturn \"{\" + opts._n + super.render(opts) + \"}\" + opts._n;\n\t\t}\n\t};\n\tvar Root = class extends ParentNode {};\n\tvar Else = class extends BlockNode {};\n\tElse.kind = \"else\";\n\tvar If = class If extends BlockNode {\n\t\tconstructor(condition, nodes) {\n\t\t\tsuper(nodes);\n\t\t\tthis.condition = condition;\n\t\t}\n\t\trender(opts) {\n\t\t\tlet code = `if(${this.condition})` + super.render(opts);\n\t\t\tif (this.else) code += \"else \" + this.else.render(opts);\n\t\t\treturn code;\n\t\t}\n\t\toptimizeNodes() {\n\t\t\tsuper.optimizeNodes();\n\t\t\tconst cond = this.condition;\n\t\t\tif (cond === true) return this.nodes;\n\t\t\tlet e = this.else;\n\t\t\tif (e) {\n\t\t\t\tconst ns = e.optimizeNodes();\n\t\t\t\te = this.else = Array.isArray(ns) ? new Else(ns) : ns;\n\t\t\t}\n\t\t\tif (e) {\n\t\t\t\tif (cond === false) return e instanceof If ? e : e.nodes;\n\t\t\t\tif (this.nodes.length) return this;\n\t\t\t\treturn new If(not(cond), e instanceof If ? [e] : e.nodes);\n\t\t\t}\n\t\t\tif (cond === false || !this.nodes.length) return void 0;\n\t\t\treturn this;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tvar _a;\n\t\t\tthis.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants);\n\t\t\tif (!(super.optimizeNames(names, constants) || this.else)) return;\n\t\t\tthis.condition = optimizeExpr(this.condition, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\tconst names = super.names;\n\t\t\taddExprNames(names, this.condition);\n\t\t\tif (this.else) addNames(names, this.else.names);\n\t\t\treturn names;\n\t\t}\n\t};\n\tIf.kind = \"if\";\n\tvar For = class extends BlockNode {};\n\tFor.kind = \"for\";\n\tvar ForLoop = class extends For {\n\t\tconstructor(iteration) {\n\t\t\tsuper();\n\t\t\tthis.iteration = iteration;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn `for(${this.iteration})` + super.render(opts);\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tif (!super.optimizeNames(names, constants)) return;\n\t\t\tthis.iteration = optimizeExpr(this.iteration, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn addNames(super.names, this.iteration.names);\n\t\t}\n\t};\n\tvar ForRange = class extends For {\n\t\tconstructor(varKind, name, from, to) {\n\t\t\tsuper();\n\t\t\tthis.varKind = varKind;\n\t\t\tthis.name = name;\n\t\t\tthis.from = from;\n\t\t\tthis.to = to;\n\t\t}\n\t\trender(opts) {\n\t\t\tconst varKind = opts.es5 ? scope_1.varKinds.var : this.varKind;\n\t\t\tconst { name, from, to } = this;\n\t\t\treturn `for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)` + super.render(opts);\n\t\t}\n\t\tget names() {\n\t\t\treturn addExprNames(addExprNames(super.names, this.from), this.to);\n\t\t}\n\t};\n\tvar ForIter = class extends For {\n\t\tconstructor(loop, varKind, name, iterable) {\n\t\t\tsuper();\n\t\t\tthis.loop = loop;\n\t\t\tthis.varKind = varKind;\n\t\t\tthis.name = name;\n\t\t\tthis.iterable = iterable;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tif (!super.optimizeNames(names, constants)) return;\n\t\t\tthis.iterable = optimizeExpr(this.iterable, names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\treturn addNames(super.names, this.iterable.names);\n\t\t}\n\t};\n\tvar Func = class extends BlockNode {\n\t\tconstructor(name, args, async) {\n\t\t\tsuper();\n\t\t\tthis.name = name;\n\t\t\tthis.args = args;\n\t\t\tthis.async = async;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn `${this.async ? \"async \" : \"\"}function ${this.name}(${this.args})` + super.render(opts);\n\t\t}\n\t};\n\tFunc.kind = \"func\";\n\tvar Return = class extends ParentNode {\n\t\trender(opts) {\n\t\t\treturn \"return \" + super.render(opts);\n\t\t}\n\t};\n\tReturn.kind = \"return\";\n\tvar Try = class extends BlockNode {\n\t\trender(opts) {\n\t\t\tlet code = \"try\" + super.render(opts);\n\t\t\tif (this.catch) code += this.catch.render(opts);\n\t\t\tif (this.finally) code += this.finally.render(opts);\n\t\t\treturn code;\n\t\t}\n\t\toptimizeNodes() {\n\t\t\tvar _a, _b;\n\t\t\tsuper.optimizeNodes();\n\t\t\t(_a = this.catch) === null || _a === void 0 || _a.optimizeNodes();\n\t\t\t(_b = this.finally) === null || _b === void 0 || _b.optimizeNodes();\n\t\t\treturn this;\n\t\t}\n\t\toptimizeNames(names, constants) {\n\t\t\tvar _a, _b;\n\t\t\tsuper.optimizeNames(names, constants);\n\t\t\t(_a = this.catch) === null || _a === void 0 || _a.optimizeNames(names, constants);\n\t\t\t(_b = this.finally) === null || _b === void 0 || _b.optimizeNames(names, constants);\n\t\t\treturn this;\n\t\t}\n\t\tget names() {\n\t\t\tconst names = super.names;\n\t\t\tif (this.catch) addNames(names, this.catch.names);\n\t\t\tif (this.finally) addNames(names, this.finally.names);\n\t\t\treturn names;\n\t\t}\n\t};\n\tvar Catch = class extends BlockNode {\n\t\tconstructor(error) {\n\t\t\tsuper();\n\t\t\tthis.error = error;\n\t\t}\n\t\trender(opts) {\n\t\t\treturn `catch(${this.error})` + super.render(opts);\n\t\t}\n\t};\n\tCatch.kind = \"catch\";\n\tvar Finally = class extends BlockNode {\n\t\trender(opts) {\n\t\t\treturn \"finally\" + super.render(opts);\n\t\t}\n\t};\n\tFinally.kind = \"finally\";\n\tvar CodeGen = class {\n\t\tconstructor(extScope, opts = {}) {\n\t\t\tthis._values = {};\n\t\t\tthis._blockStarts = [];\n\t\t\tthis._constants = {};\n\t\t\tthis.opts = {\n\t\t\t\t...opts,\n\t\t\t\t_n: opts.lines ? \"\\n\" : \"\"\n\t\t\t};\n\t\t\tthis._extScope = extScope;\n\t\t\tthis._scope = new scope_1.Scope({ parent: extScope });\n\t\t\tthis._nodes = [new Root()];\n\t\t}\n\t\ttoString() {\n\t\t\treturn this._root.render(this.opts);\n\t\t}\n\t\tname(prefix) {\n\t\t\treturn this._scope.name(prefix);\n\t\t}\n\t\tscopeName(prefix) {\n\t\t\treturn this._extScope.name(prefix);\n\t\t}\n\t\tscopeValue(prefixOrName, value) {\n\t\t\tconst name = this._extScope.value(prefixOrName, value);\n\t\t\t(this._values[name.prefix] || (this._values[name.prefix] = /* @__PURE__ */ new Set())).add(name);\n\t\t\treturn name;\n\t\t}\n\t\tgetScopeValue(prefix, keyOrRef) {\n\t\t\treturn this._extScope.getValue(prefix, keyOrRef);\n\t\t}\n\t\tscopeRefs(scopeName) {\n\t\t\treturn this._extScope.scopeRefs(scopeName, this._values);\n\t\t}\n\t\tscopeCode() {\n\t\t\treturn this._extScope.scopeCode(this._values);\n\t\t}\n\t\t_def(varKind, nameOrPrefix, rhs, constant) {\n\t\t\tconst name = this._scope.toName(nameOrPrefix);\n\t\t\tif (rhs !== void 0 && constant) this._constants[name.str] = rhs;\n\t\t\tthis._leafNode(new Def(varKind, name, rhs));\n\t\t\treturn name;\n\t\t}\n\t\tconst(nameOrPrefix, rhs, _constant) {\n\t\t\treturn this._def(scope_1.varKinds.const, nameOrPrefix, rhs, _constant);\n\t\t}\n\t\tlet(nameOrPrefix, rhs, _constant) {\n\t\t\treturn this._def(scope_1.varKinds.let, nameOrPrefix, rhs, _constant);\n\t\t}\n\t\tvar(nameOrPrefix, rhs, _constant) {\n\t\t\treturn this._def(scope_1.varKinds.var, nameOrPrefix, rhs, _constant);\n\t\t}\n\t\tassign(lhs, rhs, sideEffects) {\n\t\t\treturn this._leafNode(new Assign(lhs, rhs, sideEffects));\n\t\t}\n\t\tadd(lhs, rhs) {\n\t\t\treturn this._leafNode(new AssignOp(lhs, exports.operators.ADD, rhs));\n\t\t}\n\t\tcode(c) {\n\t\t\tif (typeof c == \"function\") c();\n\t\t\telse if (c !== code_1.nil) this._leafNode(new AnyCode(c));\n\t\t\treturn this;\n\t\t}\n\t\tobject(...keyValues) {\n\t\t\tconst code = [\"{\"];\n\t\t\tfor (const [key, value] of keyValues) {\n\t\t\t\tif (code.length > 1) code.push(\",\");\n\t\t\t\tcode.push(key);\n\t\t\t\tif (key !== value || this.opts.es5) {\n\t\t\t\t\tcode.push(\":\");\n\t\t\t\t\t(0, code_1.addCodeArg)(code, value);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcode.push(\"}\");\n\t\t\treturn new code_1._Code(code);\n\t\t}\n\t\tif(condition, thenBody, elseBody) {\n\t\t\tthis._blockNode(new If(condition));\n\t\t\tif (thenBody && elseBody) this.code(thenBody).else().code(elseBody).endIf();\n\t\t\telse if (thenBody) this.code(thenBody).endIf();\n\t\t\telse if (elseBody) throw new Error(\"CodeGen: \\\"else\\\" body without \\\"then\\\" body\");\n\t\t\treturn this;\n\t\t}\n\t\telseIf(condition) {\n\t\t\treturn this._elseNode(new If(condition));\n\t\t}\n\t\telse() {\n\t\t\treturn this._elseNode(new Else());\n\t\t}\n\t\tendIf() {\n\t\t\treturn this._endBlockNode(If, Else);\n\t\t}\n\t\t_for(node, forBody) {\n\t\t\tthis._blockNode(node);\n\t\t\tif (forBody) this.code(forBody).endFor();\n\t\t\treturn this;\n\t\t}\n\t\tfor(iteration, forBody) {\n\t\t\treturn this._for(new ForLoop(iteration), forBody);\n\t\t}\n\t\tforRange(nameOrPrefix, from, to, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.let) {\n\t\t\tconst name = this._scope.toName(nameOrPrefix);\n\t\t\treturn this._for(new ForRange(varKind, name, from, to), () => forBody(name));\n\t\t}\n\t\tforOf(nameOrPrefix, iterable, forBody, varKind = scope_1.varKinds.const) {\n\t\t\tconst name = this._scope.toName(nameOrPrefix);\n\t\t\tif (this.opts.es5) {\n\t\t\t\tconst arr = iterable instanceof code_1.Name ? iterable : this.var(\"_arr\", iterable);\n\t\t\t\treturn this.forRange(\"_i\", 0, (0, code_1._)`${arr}.length`, (i) => {\n\t\t\t\t\tthis.var(name, (0, code_1._)`${arr}[${i}]`);\n\t\t\t\t\tforBody(name);\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn this._for(new ForIter(\"of\", varKind, name, iterable), () => forBody(name));\n\t\t}\n\t\tforIn(nameOrPrefix, obj, forBody, varKind = this.opts.es5 ? scope_1.varKinds.var : scope_1.varKinds.const) {\n\t\t\tif (this.opts.ownProperties) return this.forOf(nameOrPrefix, (0, code_1._)`Object.keys(${obj})`, forBody);\n\t\t\tconst name = this._scope.toName(nameOrPrefix);\n\t\t\treturn this._for(new ForIter(\"in\", varKind, name, obj), () => forBody(name));\n\t\t}\n\t\tendFor() {\n\t\t\treturn this._endBlockNode(For);\n\t\t}\n\t\tlabel(label) {\n\t\t\treturn this._leafNode(new Label(label));\n\t\t}\n\t\tbreak(label) {\n\t\t\treturn this._leafNode(new Break(label));\n\t\t}\n\t\treturn(value) {\n\t\t\tconst node = new Return();\n\t\t\tthis._blockNode(node);\n\t\t\tthis.code(value);\n\t\t\tif (node.nodes.length !== 1) throw new Error(\"CodeGen: \\\"return\\\" should have one node\");\n\t\t\treturn this._endBlockNode(Return);\n\t\t}\n\t\ttry(tryBody, catchCode, finallyCode) {\n\t\t\tif (!catchCode && !finallyCode) throw new Error(\"CodeGen: \\\"try\\\" without \\\"catch\\\" and \\\"finally\\\"\");\n\t\t\tconst node = new Try();\n\t\t\tthis._blockNode(node);\n\t\t\tthis.code(tryBody);\n\t\t\tif (catchCode) {\n\t\t\t\tconst error = this.name(\"e\");\n\t\t\t\tthis._currNode = node.catch = new Catch(error);\n\t\t\t\tcatchCode(error);\n\t\t\t}\n\t\t\tif (finallyCode) {\n\t\t\t\tthis._currNode = node.finally = new Finally();\n\t\t\t\tthis.code(finallyCode);\n\t\t\t}\n\t\t\treturn this._endBlockNode(Catch, Finally);\n\t\t}\n\t\tthrow(error) {\n\t\t\treturn this._leafNode(new Throw(error));\n\t\t}\n\t\tblock(body, nodeCount) {\n\t\t\tthis._blockStarts.push(this._nodes.length);\n\t\t\tif (body) this.code(body).endBlock(nodeCount);\n\t\t\treturn this;\n\t\t}\n\t\tendBlock(nodeCount) {\n\t\t\tconst len = this._blockStarts.pop();\n\t\t\tif (len === void 0) throw new Error(\"CodeGen: not in self-balancing block\");\n\t\t\tconst toClose = this._nodes.length - len;\n\t\t\tif (toClose < 0 || nodeCount !== void 0 && toClose !== nodeCount) throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);\n\t\t\tthis._nodes.length = len;\n\t\t\treturn this;\n\t\t}\n\t\tfunc(name, args = code_1.nil, async, funcBody) {\n\t\t\tthis._blockNode(new Func(name, args, async));\n\t\t\tif (funcBody) this.code(funcBody).endFunc();\n\t\t\treturn this;\n\t\t}\n\t\tendFunc() {\n\t\t\treturn this._endBlockNode(Func);\n\t\t}\n\t\toptimize(n = 1) {\n\t\t\twhile (n-- > 0) {\n\t\t\t\tthis._root.optimizeNodes();\n\t\t\t\tthis._root.optimizeNames(this._root.names, this._constants);\n\t\t\t}\n\t\t}\n\t\t_leafNode(node) {\n\t\t\tthis._currNode.nodes.push(node);\n\t\t\treturn this;\n\t\t}\n\t\t_blockNode(node) {\n\t\t\tthis._currNode.nodes.push(node);\n\t\t\tthis._nodes.push(node);\n\t\t}\n\t\t_endBlockNode(N1, N2) {\n\t\t\tconst n = this._currNode;\n\t\t\tif (n instanceof N1 || N2 && n instanceof N2) {\n\t\t\t\tthis._nodes.pop();\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tthrow new Error(`CodeGen: not in block \"${N2 ? `${N1.kind}/${N2.kind}` : N1.kind}\"`);\n\t\t}\n\t\t_elseNode(node) {\n\t\t\tconst n = this._currNode;\n\t\t\tif (!(n instanceof If)) throw new Error(\"CodeGen: \\\"else\\\" without \\\"if\\\"\");\n\t\t\tthis._currNode = n.else = node;\n\t\t\treturn this;\n\t\t}\n\t\tget _root() {\n\t\t\treturn this._nodes[0];\n\t\t}\n\t\tget _currNode() {\n\t\t\tconst ns = this._nodes;\n\t\t\treturn ns[ns.length - 1];\n\t\t}\n\t\tset _currNode(node) {\n\t\t\tconst ns = this._nodes;\n\t\t\tns[ns.length - 1] = node;\n\t\t}\n\t};\n\texports.CodeGen = CodeGen;\n\tfunction addNames(names, from) {\n\t\tfor (const n in from) names[n] = (names[n] || 0) + (from[n] || 0);\n\t\treturn names;\n\t}\n\tfunction addExprNames(names, from) {\n\t\treturn from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;\n\t}\n\tfunction optimizeExpr(expr, names, constants) {\n\t\tif (expr instanceof code_1.Name) return replaceName(expr);\n\t\tif (!canOptimize(expr)) return expr;\n\t\treturn new code_1._Code(expr._items.reduce((items, c) => {\n\t\t\tif (c instanceof code_1.Name) c = replaceName(c);\n\t\t\tif (c instanceof code_1._Code) items.push(...c._items);\n\t\t\telse items.push(c);\n\t\t\treturn items;\n\t\t}, []));\n\t\tfunction replaceName(n) {\n\t\t\tconst c = constants[n.str];\n\t\t\tif (c === void 0 || names[n.str] !== 1) return n;\n\t\t\tdelete names[n.str];\n\t\t\treturn c;\n\t\t}\n\t\tfunction canOptimize(e) {\n\t\t\treturn e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants[c.str] !== void 0);\n\t\t}\n\t}\n\tfunction subtractNames(names, from) {\n\t\tfor (const n in from) names[n] = (names[n] || 0) - (from[n] || 0);\n\t}\n\tfunction not(x) {\n\t\treturn typeof x == \"boolean\" || typeof x == \"number\" || x === null ? !x : (0, code_1._)`!${par(x)}`;\n\t}\n\texports.not = not;\n\tconst andCode = mappend(exports.operators.AND);\n\tfunction and(...args) {\n\t\treturn args.reduce(andCode);\n\t}\n\texports.and = and;\n\tconst orCode = mappend(exports.operators.OR);\n\tfunction or(...args) {\n\t\treturn args.reduce(orCode);\n\t}\n\texports.or = or;\n\tfunction mappend(op) {\n\t\treturn (x, y) => x === code_1.nil ? y : y === code_1.nil ? x : (0, code_1._)`${par(x)} ${op} ${par(y)}`;\n\t}\n\tfunction par(x) {\n\t\treturn x instanceof code_1.Name ? x : (0, code_1._)`(${x})`;\n\t}\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/util.js\nvar require_util = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.checkStrictMode = exports.getErrorPath = exports.Type = exports.useFunc = exports.setEvaluated = exports.evaluatedPropsToName = exports.mergeEvaluated = exports.eachItem = exports.unescapeJsonPointer = exports.escapeJsonPointer = exports.escapeFragment = exports.unescapeFragment = exports.schemaRefOrVal = exports.schemaHasRulesButRef = exports.schemaHasRules = exports.checkUnknownRules = exports.alwaysValidSchema = exports.toHash = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst code_1 = require_code$1();\n\tfunction toHash(arr) {\n\t\tconst hash = {};\n\t\tfor (const item of arr) hash[item] = true;\n\t\treturn hash;\n\t}\n\texports.toHash = toHash;\n\tfunction alwaysValidSchema(it, schema) {\n\t\tif (typeof schema == \"boolean\") return schema;\n\t\tif (Object.keys(schema).length === 0) return true;\n\t\tcheckUnknownRules(it, schema);\n\t\treturn !schemaHasRules(schema, it.self.RULES.all);\n\t}\n\texports.alwaysValidSchema = alwaysValidSchema;\n\tfunction checkUnknownRules(it, schema = it.schema) {\n\t\tconst { opts, self } = it;\n\t\tif (!opts.strictSchema) return;\n\t\tif (typeof schema === \"boolean\") return;\n\t\tconst rules = self.RULES.keywords;\n\t\tfor (const key in schema) if (!rules[key]) checkStrictMode(it, `unknown keyword: \"${key}\"`);\n\t}\n\texports.checkUnknownRules = checkUnknownRules;\n\tfunction schemaHasRules(schema, rules) {\n\t\tif (typeof schema == \"boolean\") return !schema;\n\t\tfor (const key in schema) if (rules[key]) return true;\n\t\treturn false;\n\t}\n\texports.schemaHasRules = schemaHasRules;\n\tfunction schemaHasRulesButRef(schema, RULES) {\n\t\tif (typeof schema == \"boolean\") return !schema;\n\t\tfor (const key in schema) if (key !== \"$ref\" && RULES.all[key]) return true;\n\t\treturn false;\n\t}\n\texports.schemaHasRulesButRef = schemaHasRulesButRef;\n\tfunction schemaRefOrVal({ topSchemaRef, schemaPath }, schema, keyword, $data) {\n\t\tif (!$data) {\n\t\t\tif (typeof schema == \"number\" || typeof schema == \"boolean\") return schema;\n\t\t\tif (typeof schema == \"string\") return (0, codegen_1._)`${schema}`;\n\t\t}\n\t\treturn (0, codegen_1._)`${topSchemaRef}${schemaPath}${(0, codegen_1.getProperty)(keyword)}`;\n\t}\n\texports.schemaRefOrVal = schemaRefOrVal;\n\tfunction unescapeFragment(str) {\n\t\treturn unescapeJsonPointer(decodeURIComponent(str));\n\t}\n\texports.unescapeFragment = unescapeFragment;\n\tfunction escapeFragment(str) {\n\t\treturn encodeURIComponent(escapeJsonPointer(str));\n\t}\n\texports.escapeFragment = escapeFragment;\n\tfunction escapeJsonPointer(str) {\n\t\tif (typeof str == \"number\") return `${str}`;\n\t\treturn str.replace(/~/g, \"~0\").replace(/\\//g, \"~1\");\n\t}\n\texports.escapeJsonPointer = escapeJsonPointer;\n\tfunction unescapeJsonPointer(str) {\n\t\treturn str.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n\t}\n\texports.unescapeJsonPointer = unescapeJsonPointer;\n\tfunction eachItem(xs, f) {\n\t\tif (Array.isArray(xs)) for (const x of xs) f(x);\n\t\telse f(xs);\n\t}\n\texports.eachItem = eachItem;\n\tfunction makeMergeEvaluated({ mergeNames, mergeToName, mergeValues, resultToName }) {\n\t\treturn (gen, from, to, toName) => {\n\t\t\tconst res = to === void 0 ? from : to instanceof codegen_1.Name ? (from instanceof codegen_1.Name ? mergeNames(gen, from, to) : mergeToName(gen, from, to), to) : from instanceof codegen_1.Name ? (mergeToName(gen, to, from), from) : mergeValues(from, to);\n\t\t\treturn toName === codegen_1.Name && !(res instanceof codegen_1.Name) ? resultToName(gen, res) : res;\n\t\t};\n\t}\n\texports.mergeEvaluated = {\n\t\tprops: makeMergeEvaluated({\n\t\t\tmergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => {\n\t\t\t\tgen.if((0, codegen_1._)`${from} === true`, () => gen.assign(to, true), () => gen.assign(to, (0, codegen_1._)`${to} || {}`).code((0, codegen_1._)`Object.assign(${to}, ${from})`));\n\t\t\t}),\n\t\t\tmergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => {\n\t\t\t\tif (from === true) gen.assign(to, true);\n\t\t\t\telse {\n\t\t\t\t\tgen.assign(to, (0, codegen_1._)`${to} || {}`);\n\t\t\t\t\tsetEvaluated(gen, to, from);\n\t\t\t\t}\n\t\t\t}),\n\t\t\tmergeValues: (from, to) => from === true ? true : {\n\t\t\t\t...from,\n\t\t\t\t...to\n\t\t\t},\n\t\t\tresultToName: evaluatedPropsToName\n\t\t}),\n\t\titems: makeMergeEvaluated({\n\t\t\tmergeNames: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true && ${from} !== undefined`, () => gen.assign(to, (0, codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),\n\t\t\tmergeToName: (gen, from, to) => gen.if((0, codegen_1._)`${to} !== true`, () => gen.assign(to, from === true ? true : (0, codegen_1._)`${to} > ${from} ? ${to} : ${from}`)),\n\t\t\tmergeValues: (from, to) => from === true ? true : Math.max(from, to),\n\t\t\tresultToName: (gen, items) => gen.var(\"items\", items)\n\t\t})\n\t};\n\tfunction evaluatedPropsToName(gen, ps) {\n\t\tif (ps === true) return gen.var(\"props\", true);\n\t\tconst props = gen.var(\"props\", (0, codegen_1._)`{}`);\n\t\tif (ps !== void 0) setEvaluated(gen, props, ps);\n\t\treturn props;\n\t}\n\texports.evaluatedPropsToName = evaluatedPropsToName;\n\tfunction setEvaluated(gen, props, ps) {\n\t\tObject.keys(ps).forEach((p) => gen.assign((0, codegen_1._)`${props}${(0, codegen_1.getProperty)(p)}`, true));\n\t}\n\texports.setEvaluated = setEvaluated;\n\tconst snippets = {};\n\tfunction useFunc(gen, f) {\n\t\treturn gen.scopeValue(\"func\", {\n\t\t\tref: f,\n\t\t\tcode: snippets[f.code] || (snippets[f.code] = new code_1._Code(f.code))\n\t\t});\n\t}\n\texports.useFunc = useFunc;\n\tvar Type;\n\t(function(Type) {\n\t\tType[Type[\"Num\"] = 0] = \"Num\";\n\t\tType[Type[\"Str\"] = 1] = \"Str\";\n\t})(Type || (exports.Type = Type = {}));\n\tfunction getErrorPath(dataProp, dataPropType, jsPropertySyntax) {\n\t\tif (dataProp instanceof codegen_1.Name) {\n\t\t\tconst isNumber = dataPropType === Type.Num;\n\t\t\treturn jsPropertySyntax ? isNumber ? (0, codegen_1._)`\"[\" + ${dataProp} + \"]\"` : (0, codegen_1._)`\"['\" + ${dataProp} + \"']\"` : isNumber ? (0, codegen_1._)`\"/\" + ${dataProp}` : (0, codegen_1._)`\"/\" + ${dataProp}.replace(/~/g, \"~0\").replace(/\\\\//g, \"~1\")`;\n\t\t}\n\t\treturn jsPropertySyntax ? (0, codegen_1.getProperty)(dataProp).toString() : \"/\" + escapeJsonPointer(dataProp);\n\t}\n\texports.getErrorPath = getErrorPath;\n\tfunction checkStrictMode(it, msg, mode = it.opts.strictSchema) {\n\t\tif (!mode) return;\n\t\tmsg = `strict mode: ${msg}`;\n\t\tif (mode === true) throw new Error(msg);\n\t\tit.self.logger.warn(msg);\n\t}\n\texports.checkStrictMode = checkStrictMode;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/names.js\nvar require_names = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\texports.default = {\n\t\tdata: new codegen_1.Name(\"data\"),\n\t\tvalCxt: new codegen_1.Name(\"valCxt\"),\n\t\tinstancePath: new codegen_1.Name(\"instancePath\"),\n\t\tparentData: new codegen_1.Name(\"parentData\"),\n\t\tparentDataProperty: new codegen_1.Name(\"parentDataProperty\"),\n\t\trootData: new codegen_1.Name(\"rootData\"),\n\t\tdynamicAnchors: new codegen_1.Name(\"dynamicAnchors\"),\n\t\tvErrors: new codegen_1.Name(\"vErrors\"),\n\t\terrors: new codegen_1.Name(\"errors\"),\n\t\tthis: new codegen_1.Name(\"this\"),\n\t\tself: new codegen_1.Name(\"self\"),\n\t\tscope: new codegen_1.Name(\"scope\"),\n\t\tjson: new codegen_1.Name(\"json\"),\n\t\tjsonPos: new codegen_1.Name(\"jsonPos\"),\n\t\tjsonLen: new codegen_1.Name(\"jsonLen\"),\n\t\tjsonPart: new codegen_1.Name(\"jsonPart\")\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/errors.js\nvar require_errors = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.extendErrors = exports.resetErrorsCount = exports.reportExtraError = exports.reportError = exports.keyword$DataError = exports.keywordError = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst names_1 = require_names();\n\texports.keywordError = { message: ({ keyword }) => (0, codegen_1.str)`must pass \"${keyword}\" keyword validation` };\n\texports.keyword$DataError = { message: ({ keyword, schemaType }) => schemaType ? (0, codegen_1.str)`\"${keyword}\" keyword must be ${schemaType} ($data)` : (0, codegen_1.str)`\"${keyword}\" keyword is invalid ($data)` };\n\tfunction reportError(cxt, error = exports.keywordError, errorPaths, overrideAllErrors) {\n\t\tconst { it } = cxt;\n\t\tconst { gen, compositeRule, allErrors } = it;\n\t\tconst errObj = errorObjectCode(cxt, error, errorPaths);\n\t\tif (overrideAllErrors !== null && overrideAllErrors !== void 0 ? overrideAllErrors : compositeRule || allErrors) addError(gen, errObj);\n\t\telse returnErrors(it, (0, codegen_1._)`[${errObj}]`);\n\t}\n\texports.reportError = reportError;\n\tfunction reportExtraError(cxt, error = exports.keywordError, errorPaths) {\n\t\tconst { it } = cxt;\n\t\tconst { gen, compositeRule, allErrors } = it;\n\t\taddError(gen, errorObjectCode(cxt, error, errorPaths));\n\t\tif (!(compositeRule || allErrors)) returnErrors(it, names_1.default.vErrors);\n\t}\n\texports.reportExtraError = reportExtraError;\n\tfunction resetErrorsCount(gen, errsCount) {\n\t\tgen.assign(names_1.default.errors, errsCount);\n\t\tgen.if((0, codegen_1._)`${names_1.default.vErrors} !== null`, () => gen.if(errsCount, () => gen.assign((0, codegen_1._)`${names_1.default.vErrors}.length`, errsCount), () => gen.assign(names_1.default.vErrors, null)));\n\t}\n\texports.resetErrorsCount = resetErrorsCount;\n\tfunction extendErrors({ gen, keyword, schemaValue, data, errsCount, it }) {\n\t\t/* istanbul ignore if */\n\t\tif (errsCount === void 0) throw new Error(\"ajv implementation error\");\n\t\tconst err = gen.name(\"err\");\n\t\tgen.forRange(\"i\", errsCount, names_1.default.errors, (i) => {\n\t\t\tgen.const(err, (0, codegen_1._)`${names_1.default.vErrors}[${i}]`);\n\t\t\tgen.if((0, codegen_1._)`${err}.instancePath === undefined`, () => gen.assign((0, codegen_1._)`${err}.instancePath`, (0, codegen_1.strConcat)(names_1.default.instancePath, it.errorPath)));\n\t\t\tgen.assign((0, codegen_1._)`${err}.schemaPath`, (0, codegen_1.str)`${it.errSchemaPath}/${keyword}`);\n\t\t\tif (it.opts.verbose) {\n\t\t\t\tgen.assign((0, codegen_1._)`${err}.schema`, schemaValue);\n\t\t\t\tgen.assign((0, codegen_1._)`${err}.data`, data);\n\t\t\t}\n\t\t});\n\t}\n\texports.extendErrors = extendErrors;\n\tfunction addError(gen, errObj) {\n\t\tconst err = gen.const(\"err\", errObj);\n\t\tgen.if((0, codegen_1._)`${names_1.default.vErrors} === null`, () => gen.assign(names_1.default.vErrors, (0, codegen_1._)`[${err}]`), (0, codegen_1._)`${names_1.default.vErrors}.push(${err})`);\n\t\tgen.code((0, codegen_1._)`${names_1.default.errors}++`);\n\t}\n\tfunction returnErrors(it, errs) {\n\t\tconst { gen, validateName, schemaEnv } = it;\n\t\tif (schemaEnv.$async) gen.throw((0, codegen_1._)`new ${it.ValidationError}(${errs})`);\n\t\telse {\n\t\t\tgen.assign((0, codegen_1._)`${validateName}.errors`, errs);\n\t\t\tgen.return(false);\n\t\t}\n\t}\n\tconst E = {\n\t\tkeyword: new codegen_1.Name(\"keyword\"),\n\t\tschemaPath: new codegen_1.Name(\"schemaPath\"),\n\t\tparams: new codegen_1.Name(\"params\"),\n\t\tpropertyName: new codegen_1.Name(\"propertyName\"),\n\t\tmessage: new codegen_1.Name(\"message\"),\n\t\tschema: new codegen_1.Name(\"schema\"),\n\t\tparentSchema: new codegen_1.Name(\"parentSchema\")\n\t};\n\tfunction errorObjectCode(cxt, error, errorPaths) {\n\t\tconst { createErrors } = cxt.it;\n\t\tif (createErrors === false) return (0, codegen_1._)`{}`;\n\t\treturn errorObject(cxt, error, errorPaths);\n\t}\n\tfunction errorObject(cxt, error, errorPaths = {}) {\n\t\tconst { gen, it } = cxt;\n\t\tconst keyValues = [errorInstancePath(it, errorPaths), errorSchemaPath(cxt, errorPaths)];\n\t\textraErrorProps(cxt, error, keyValues);\n\t\treturn gen.object(...keyValues);\n\t}\n\tfunction errorInstancePath({ errorPath }, { instancePath }) {\n\t\tconst instPath = instancePath ? (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(instancePath, util_1.Type.Str)}` : errorPath;\n\t\treturn [names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, instPath)];\n\t}\n\tfunction errorSchemaPath({ keyword, it: { errSchemaPath } }, { schemaPath, parentSchema }) {\n\t\tlet schPath = parentSchema ? errSchemaPath : (0, codegen_1.str)`${errSchemaPath}/${keyword}`;\n\t\tif (schemaPath) schPath = (0, codegen_1.str)`${schPath}${(0, util_1.getErrorPath)(schemaPath, util_1.Type.Str)}`;\n\t\treturn [E.schemaPath, schPath];\n\t}\n\tfunction extraErrorProps(cxt, { params, message }, keyValues) {\n\t\tconst { keyword, data, schemaValue, it } = cxt;\n\t\tconst { opts, propertyName, topSchemaRef, schemaPath } = it;\n\t\tkeyValues.push([E.keyword, keyword], [E.params, typeof params == \"function\" ? params(cxt) : params || (0, codegen_1._)`{}`]);\n\t\tif (opts.messages) keyValues.push([E.message, typeof message == \"function\" ? message(cxt) : message]);\n\t\tif (opts.verbose) keyValues.push([E.schema, schemaValue], [E.parentSchema, (0, codegen_1._)`${topSchemaRef}${schemaPath}`], [names_1.default.data, data]);\n\t\tif (propertyName) keyValues.push([E.propertyName, propertyName]);\n\t}\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/validate/boolSchema.js\nvar require_boolSchema = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.boolOrEmptySchema = exports.topBoolOrEmptySchema = void 0;\n\tconst errors_1 = require_errors();\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst boolError = { message: \"boolean schema is false\" };\n\tfunction topBoolOrEmptySchema(it) {\n\t\tconst { gen, schema, validateName } = it;\n\t\tif (schema === false) falseSchemaError(it, false);\n\t\telse if (typeof schema == \"object\" && schema.$async === true) gen.return(names_1.default.data);\n\t\telse {\n\t\t\tgen.assign((0, codegen_1._)`${validateName}.errors`, null);\n\t\t\tgen.return(true);\n\t\t}\n\t}\n\texports.topBoolOrEmptySchema = topBoolOrEmptySchema;\n\tfunction boolOrEmptySchema(it, valid) {\n\t\tconst { gen, schema } = it;\n\t\tif (schema === false) {\n\t\t\tgen.var(valid, false);\n\t\t\tfalseSchemaError(it);\n\t\t} else gen.var(valid, true);\n\t}\n\texports.boolOrEmptySchema = boolOrEmptySchema;\n\tfunction falseSchemaError(it, overrideAllErrors) {\n\t\tconst { gen, data } = it;\n\t\tconst cxt = {\n\t\t\tgen,\n\t\t\tkeyword: \"false schema\",\n\t\t\tdata,\n\t\t\tschema: false,\n\t\t\tschemaCode: false,\n\t\t\tschemaValue: false,\n\t\t\tparams: {},\n\t\t\tit\n\t\t};\n\t\t(0, errors_1.reportError)(cxt, boolError, void 0, overrideAllErrors);\n\t}\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/rules.js\nvar require_rules = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.getRules = exports.isJSONType = void 0;\n\tconst jsonTypes = /* @__PURE__ */ new Set([\n\t\t\"string\",\n\t\t\"number\",\n\t\t\"integer\",\n\t\t\"boolean\",\n\t\t\"null\",\n\t\t\"object\",\n\t\t\"array\"\n\t]);\n\tfunction isJSONType(x) {\n\t\treturn typeof x == \"string\" && jsonTypes.has(x);\n\t}\n\texports.isJSONType = isJSONType;\n\tfunction getRules() {\n\t\tconst groups = {\n\t\t\tnumber: {\n\t\t\t\ttype: \"number\",\n\t\t\t\trules: []\n\t\t\t},\n\t\t\tstring: {\n\t\t\t\ttype: \"string\",\n\t\t\t\trules: []\n\t\t\t},\n\t\t\tarray: {\n\t\t\t\ttype: \"array\",\n\t\t\t\trules: []\n\t\t\t},\n\t\t\tobject: {\n\t\t\t\ttype: \"object\",\n\t\t\t\trules: []\n\t\t\t}\n\t\t};\n\t\treturn {\n\t\t\ttypes: {\n\t\t\t\t...groups,\n\t\t\t\tinteger: true,\n\t\t\t\tboolean: true,\n\t\t\t\tnull: true\n\t\t\t},\n\t\t\trules: [\n\t\t\t\t{ rules: [] },\n\t\t\t\tgroups.number,\n\t\t\t\tgroups.string,\n\t\t\t\tgroups.array,\n\t\t\t\tgroups.object\n\t\t\t],\n\t\t\tpost: { rules: [] },\n\t\t\tall: {},\n\t\t\tkeywords: {}\n\t\t};\n\t}\n\texports.getRules = getRules;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/validate/applicability.js\nvar require_applicability = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.shouldUseRule = exports.shouldUseGroup = exports.schemaHasRulesForType = void 0;\n\tfunction schemaHasRulesForType({ schema, self }, type) {\n\t\tconst group = self.RULES.types[type];\n\t\treturn group && group !== true && shouldUseGroup(schema, group);\n\t}\n\texports.schemaHasRulesForType = schemaHasRulesForType;\n\tfunction shouldUseGroup(schema, group) {\n\t\treturn group.rules.some((rule) => shouldUseRule(schema, rule));\n\t}\n\texports.shouldUseGroup = shouldUseGroup;\n\tfunction shouldUseRule(schema, rule) {\n\t\tvar _a;\n\t\treturn schema[rule.keyword] !== void 0 || ((_a = rule.definition.implements) === null || _a === void 0 ? void 0 : _a.some((kwd) => schema[kwd] !== void 0));\n\t}\n\texports.shouldUseRule = shouldUseRule;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/validate/dataType.js\nvar require_dataType = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.reportTypeError = exports.checkDataTypes = exports.checkDataType = exports.coerceAndCheckDataType = exports.getJSONTypes = exports.getSchemaTypes = exports.DataType = void 0;\n\tconst rules_1 = require_rules();\n\tconst applicability_1 = require_applicability();\n\tconst errors_1 = require_errors();\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tvar DataType;\n\t(function(DataType) {\n\t\tDataType[DataType[\"Correct\"] = 0] = \"Correct\";\n\t\tDataType[DataType[\"Wrong\"] = 1] = \"Wrong\";\n\t})(DataType || (exports.DataType = DataType = {}));\n\tfunction getSchemaTypes(schema) {\n\t\tconst types = getJSONTypes(schema.type);\n\t\tif (types.includes(\"null\")) {\n\t\t\tif (schema.nullable === false) throw new Error(\"type: null contradicts nullable: false\");\n\t\t} else {\n\t\t\tif (!types.length && schema.nullable !== void 0) throw new Error(\"\\\"nullable\\\" cannot be used without \\\"type\\\"\");\n\t\t\tif (schema.nullable === true) types.push(\"null\");\n\t\t}\n\t\treturn types;\n\t}\n\texports.getSchemaTypes = getSchemaTypes;\n\tfunction getJSONTypes(ts) {\n\t\tconst types = Array.isArray(ts) ? ts : ts ? [ts] : [];\n\t\tif (types.every(rules_1.isJSONType)) return types;\n\t\tthrow new Error(\"type must be JSONType or JSONType[]: \" + types.join(\",\"));\n\t}\n\texports.getJSONTypes = getJSONTypes;\n\tfunction coerceAndCheckDataType(it, types) {\n\t\tconst { gen, data, opts } = it;\n\t\tconst coerceTo = coerceToTypes(types, opts.coerceTypes);\n\t\tconst checkTypes = types.length > 0 && !(coerceTo.length === 0 && types.length === 1 && (0, applicability_1.schemaHasRulesForType)(it, types[0]));\n\t\tif (checkTypes) {\n\t\t\tconst wrongType = checkDataTypes(types, data, opts.strictNumbers, DataType.Wrong);\n\t\t\tgen.if(wrongType, () => {\n\t\t\t\tif (coerceTo.length) coerceData(it, types, coerceTo);\n\t\t\t\telse reportTypeError(it);\n\t\t\t});\n\t\t}\n\t\treturn checkTypes;\n\t}\n\texports.coerceAndCheckDataType = coerceAndCheckDataType;\n\tconst COERCIBLE = /* @__PURE__ */ new Set([\n\t\t\"string\",\n\t\t\"number\",\n\t\t\"integer\",\n\t\t\"boolean\",\n\t\t\"null\"\n\t]);\n\tfunction coerceToTypes(types, coerceTypes) {\n\t\treturn coerceTypes ? types.filter((t) => COERCIBLE.has(t) || coerceTypes === \"array\" && t === \"array\") : [];\n\t}\n\tfunction coerceData(it, types, coerceTo) {\n\t\tconst { gen, data, opts } = it;\n\t\tconst dataType = gen.let(\"dataType\", (0, codegen_1._)`typeof ${data}`);\n\t\tconst coerced = gen.let(\"coerced\", (0, codegen_1._)`undefined`);\n\t\tif (opts.coerceTypes === \"array\") gen.if((0, codegen_1._)`${dataType} == 'object' && Array.isArray(${data}) && ${data}.length == 1`, () => gen.assign(data, (0, codegen_1._)`${data}[0]`).assign(dataType, (0, codegen_1._)`typeof ${data}`).if(checkDataTypes(types, data, opts.strictNumbers), () => gen.assign(coerced, data)));\n\t\tgen.if((0, codegen_1._)`${coerced} !== undefined`);\n\t\tfor (const t of coerceTo) if (COERCIBLE.has(t) || t === \"array\" && opts.coerceTypes === \"array\") coerceSpecificType(t);\n\t\tgen.else();\n\t\treportTypeError(it);\n\t\tgen.endIf();\n\t\tgen.if((0, codegen_1._)`${coerced} !== undefined`, () => {\n\t\t\tgen.assign(data, coerced);\n\t\t\tassignParentData(it, coerced);\n\t\t});\n\t\tfunction coerceSpecificType(t) {\n\t\t\tswitch (t) {\n\t\t\t\tcase \"string\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${dataType} == \"number\" || ${dataType} == \"boolean\"`).assign(coerced, (0, codegen_1._)`\"\" + ${data}`).elseIf((0, codegen_1._)`${data} === null`).assign(coerced, (0, codegen_1._)`\"\"`);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"number\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${dataType} == \"boolean\" || ${data} === null\n              || (${dataType} == \"string\" && ${data} && ${data} == +${data})`).assign(coerced, (0, codegen_1._)`+${data}`);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"integer\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${dataType} === \"boolean\" || ${data} === null\n              || (${dataType} === \"string\" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced, (0, codegen_1._)`+${data}`);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"boolean\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${data} === \"false\" || ${data} === 0 || ${data} === null`).assign(coerced, false).elseIf((0, codegen_1._)`${data} === \"true\" || ${data} === 1`).assign(coerced, true);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"null\":\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${data} === \"\" || ${data} === 0 || ${data} === false`);\n\t\t\t\t\tgen.assign(coerced, null);\n\t\t\t\t\treturn;\n\t\t\t\tcase \"array\": gen.elseIf((0, codegen_1._)`${dataType} === \"string\" || ${dataType} === \"number\"\n              || ${dataType} === \"boolean\" || ${data} === null`).assign(coerced, (0, codegen_1._)`[${data}]`);\n\t\t\t}\n\t\t}\n\t}\n\tfunction assignParentData({ gen, parentData, parentDataProperty }, expr) {\n\t\tgen.if((0, codegen_1._)`${parentData} !== undefined`, () => gen.assign((0, codegen_1._)`${parentData}[${parentDataProperty}]`, expr));\n\t}\n\tfunction checkDataType(dataType, data, strictNums, correct = DataType.Correct) {\n\t\tconst EQ = correct === DataType.Correct ? codegen_1.operators.EQ : codegen_1.operators.NEQ;\n\t\tlet cond;\n\t\tswitch (dataType) {\n\t\t\tcase \"null\": return (0, codegen_1._)`${data} ${EQ} null`;\n\t\t\tcase \"array\":\n\t\t\t\tcond = (0, codegen_1._)`Array.isArray(${data})`;\n\t\t\t\tbreak;\n\t\t\tcase \"object\":\n\t\t\t\tcond = (0, codegen_1._)`${data} && typeof ${data} == \"object\" && !Array.isArray(${data})`;\n\t\t\t\tbreak;\n\t\t\tcase \"integer\":\n\t\t\t\tcond = numCond((0, codegen_1._)`!(${data} % 1) && !isNaN(${data})`);\n\t\t\t\tbreak;\n\t\t\tcase \"number\":\n\t\t\t\tcond = numCond();\n\t\t\t\tbreak;\n\t\t\tdefault: return (0, codegen_1._)`typeof ${data} ${EQ} ${dataType}`;\n\t\t}\n\t\treturn correct === DataType.Correct ? cond : (0, codegen_1.not)(cond);\n\t\tfunction numCond(_cond = codegen_1.nil) {\n\t\t\treturn (0, codegen_1.and)((0, codegen_1._)`typeof ${data} == \"number\"`, _cond, strictNums ? (0, codegen_1._)`isFinite(${data})` : codegen_1.nil);\n\t\t}\n\t}\n\texports.checkDataType = checkDataType;\n\tfunction checkDataTypes(dataTypes, data, strictNums, correct) {\n\t\tif (dataTypes.length === 1) return checkDataType(dataTypes[0], data, strictNums, correct);\n\t\tlet cond;\n\t\tconst types = (0, util_1.toHash)(dataTypes);\n\t\tif (types.array && types.object) {\n\t\t\tconst notObj = (0, codegen_1._)`typeof ${data} != \"object\"`;\n\t\t\tcond = types.null ? notObj : (0, codegen_1._)`!${data} || ${notObj}`;\n\t\t\tdelete types.null;\n\t\t\tdelete types.array;\n\t\t\tdelete types.object;\n\t\t} else cond = codegen_1.nil;\n\t\tif (types.number) delete types.integer;\n\t\tfor (const t in types) cond = (0, codegen_1.and)(cond, checkDataType(t, data, strictNums, correct));\n\t\treturn cond;\n\t}\n\texports.checkDataTypes = checkDataTypes;\n\tconst typeError = {\n\t\tmessage: ({ schema }) => `must be ${schema}`,\n\t\tparams: ({ schema, schemaValue }) => typeof schema == \"string\" ? (0, codegen_1._)`{type: ${schema}}` : (0, codegen_1._)`{type: ${schemaValue}}`\n\t};\n\tfunction reportTypeError(it) {\n\t\tconst cxt = getTypeErrorContext(it);\n\t\t(0, errors_1.reportError)(cxt, typeError);\n\t}\n\texports.reportTypeError = reportTypeError;\n\tfunction getTypeErrorContext(it) {\n\t\tconst { gen, data, schema } = it;\n\t\tconst schemaCode = (0, util_1.schemaRefOrVal)(it, schema, \"type\");\n\t\treturn {\n\t\t\tgen,\n\t\t\tkeyword: \"type\",\n\t\t\tdata,\n\t\t\tschema: schema.type,\n\t\t\tschemaCode,\n\t\t\tschemaValue: schemaCode,\n\t\t\tparentSchema: schema,\n\t\t\tparams: {},\n\t\t\tit\n\t\t};\n\t}\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/validate/defaults.js\nvar require_defaults = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.assignDefaults = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tfunction assignDefaults(it, ty) {\n\t\tconst { properties, items } = it.schema;\n\t\tif (ty === \"object\" && properties) for (const key in properties) assignDefault(it, key, properties[key].default);\n\t\telse if (ty === \"array\" && Array.isArray(items)) items.forEach((sch, i) => assignDefault(it, i, sch.default));\n\t}\n\texports.assignDefaults = assignDefaults;\n\tfunction assignDefault(it, prop, defaultValue) {\n\t\tconst { gen, compositeRule, data, opts } = it;\n\t\tif (defaultValue === void 0) return;\n\t\tconst childData = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(prop)}`;\n\t\tif (compositeRule) {\n\t\t\t(0, util_1.checkStrictMode)(it, `default is ignored for: ${childData}`);\n\t\t\treturn;\n\t\t}\n\t\tlet condition = (0, codegen_1._)`${childData} === undefined`;\n\t\tif (opts.useDefaults === \"empty\") condition = (0, codegen_1._)`${condition} || ${childData} === null || ${childData} === \"\"`;\n\t\tgen.if(condition, (0, codegen_1._)`${childData} = ${(0, codegen_1.stringify)(defaultValue)}`);\n\t}\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/code.js\nvar require_code = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateUnion = exports.validateArray = exports.usePattern = exports.callValidateCode = exports.schemaProperties = exports.allSchemaProperties = exports.noPropertyInData = exports.propertyInData = exports.isOwnProperty = exports.hasPropFunc = exports.reportMissingProp = exports.checkMissingProp = exports.checkReportMissingProp = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst names_1 = require_names();\n\tconst util_2 = require_util();\n\tfunction checkReportMissingProp(cxt, prop) {\n\t\tconst { gen, data, it } = cxt;\n\t\tgen.if(noPropertyInData(gen, data, prop, it.opts.ownProperties), () => {\n\t\t\tcxt.setParams({ missingProperty: (0, codegen_1._)`${prop}` }, true);\n\t\t\tcxt.error();\n\t\t});\n\t}\n\texports.checkReportMissingProp = checkReportMissingProp;\n\tfunction checkMissingProp({ gen, data, it: { opts } }, properties, missing) {\n\t\treturn (0, codegen_1.or)(...properties.map((prop) => (0, codegen_1.and)(noPropertyInData(gen, data, prop, opts.ownProperties), (0, codegen_1._)`${missing} = ${prop}`)));\n\t}\n\texports.checkMissingProp = checkMissingProp;\n\tfunction reportMissingProp(cxt, missing) {\n\t\tcxt.setParams({ missingProperty: missing }, true);\n\t\tcxt.error();\n\t}\n\texports.reportMissingProp = reportMissingProp;\n\tfunction hasPropFunc(gen) {\n\t\treturn gen.scopeValue(\"func\", {\n\t\t\tref: Object.prototype.hasOwnProperty,\n\t\t\tcode: (0, codegen_1._)`Object.prototype.hasOwnProperty`\n\t\t});\n\t}\n\texports.hasPropFunc = hasPropFunc;\n\tfunction isOwnProperty(gen, data, property) {\n\t\treturn (0, codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`;\n\t}\n\texports.isOwnProperty = isOwnProperty;\n\tfunction propertyInData(gen, data, property, ownProperties) {\n\t\tconst cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} !== undefined`;\n\t\treturn ownProperties ? (0, codegen_1._)`${cond} && ${isOwnProperty(gen, data, property)}` : cond;\n\t}\n\texports.propertyInData = propertyInData;\n\tfunction noPropertyInData(gen, data, property, ownProperties) {\n\t\tconst cond = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(property)} === undefined`;\n\t\treturn ownProperties ? (0, codegen_1.or)(cond, (0, codegen_1.not)(isOwnProperty(gen, data, property))) : cond;\n\t}\n\texports.noPropertyInData = noPropertyInData;\n\tfunction allSchemaProperties(schemaMap) {\n\t\treturn schemaMap ? Object.keys(schemaMap).filter((p) => p !== \"__proto__\") : [];\n\t}\n\texports.allSchemaProperties = allSchemaProperties;\n\tfunction schemaProperties(it, schemaMap) {\n\t\treturn allSchemaProperties(schemaMap).filter((p) => !(0, util_1.alwaysValidSchema)(it, schemaMap[p]));\n\t}\n\texports.schemaProperties = schemaProperties;\n\tfunction callValidateCode({ schemaCode, data, it: { gen, topSchemaRef, schemaPath, errorPath }, it }, func, context, passSchema) {\n\t\tconst dataAndSchema = passSchema ? (0, codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}` : data;\n\t\tconst valCxt = [\n\t\t\t[names_1.default.instancePath, (0, codegen_1.strConcat)(names_1.default.instancePath, errorPath)],\n\t\t\t[names_1.default.parentData, it.parentData],\n\t\t\t[names_1.default.parentDataProperty, it.parentDataProperty],\n\t\t\t[names_1.default.rootData, names_1.default.rootData]\n\t\t];\n\t\tif (it.opts.dynamicRef) valCxt.push([names_1.default.dynamicAnchors, names_1.default.dynamicAnchors]);\n\t\tconst args = (0, codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`;\n\t\treturn context !== codegen_1.nil ? (0, codegen_1._)`${func}.call(${context}, ${args})` : (0, codegen_1._)`${func}(${args})`;\n\t}\n\texports.callValidateCode = callValidateCode;\n\tconst newRegExp = (0, codegen_1._)`new RegExp`;\n\tfunction usePattern({ gen, it: { opts } }, pattern) {\n\t\tconst u = opts.unicodeRegExp ? \"u\" : \"\";\n\t\tconst { regExp } = opts.code;\n\t\tconst rx = regExp(pattern, u);\n\t\treturn gen.scopeValue(\"pattern\", {\n\t\t\tkey: rx.toString(),\n\t\t\tref: rx,\n\t\t\tcode: (0, codegen_1._)`${regExp.code === \"new RegExp\" ? newRegExp : (0, util_2.useFunc)(gen, regExp)}(${pattern}, ${u})`\n\t\t});\n\t}\n\texports.usePattern = usePattern;\n\tfunction validateArray(cxt) {\n\t\tconst { gen, data, keyword, it } = cxt;\n\t\tconst valid = gen.name(\"valid\");\n\t\tif (it.allErrors) {\n\t\t\tconst validArr = gen.let(\"valid\", true);\n\t\t\tvalidateItems(() => gen.assign(validArr, false));\n\t\t\treturn validArr;\n\t\t}\n\t\tgen.var(valid, true);\n\t\tvalidateItems(() => gen.break());\n\t\treturn valid;\n\t\tfunction validateItems(notValid) {\n\t\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\t\tgen.forRange(\"i\", 0, len, (i) => {\n\t\t\t\tcxt.subschema({\n\t\t\t\t\tkeyword,\n\t\t\t\t\tdataProp: i,\n\t\t\t\t\tdataPropType: util_1.Type.Num\n\t\t\t\t}, valid);\n\t\t\t\tgen.if((0, codegen_1.not)(valid), notValid);\n\t\t\t});\n\t\t}\n\t}\n\texports.validateArray = validateArray;\n\tfunction validateUnion(cxt) {\n\t\tconst { gen, schema, keyword, it } = cxt;\n\t\t/* istanbul ignore if */\n\t\tif (!Array.isArray(schema)) throw new Error(\"ajv implementation error\");\n\t\tif (schema.some((sch) => (0, util_1.alwaysValidSchema)(it, sch)) && !it.opts.unevaluated) return;\n\t\tconst valid = gen.let(\"valid\", false);\n\t\tconst schValid = gen.name(\"_valid\");\n\t\tgen.block(() => schema.forEach((_sch, i) => {\n\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\tkeyword,\n\t\t\t\tschemaProp: i,\n\t\t\t\tcompositeRule: true\n\t\t\t}, schValid);\n\t\t\tgen.assign(valid, (0, codegen_1._)`${valid} || ${schValid}`);\n\t\t\tif (!cxt.mergeValidEvaluated(schCxt, schValid)) gen.if((0, codegen_1.not)(valid));\n\t\t}));\n\t\tcxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n\t}\n\texports.validateUnion = validateUnion;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/validate/keyword.js\nvar require_keyword = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateKeywordUsage = exports.validSchemaType = exports.funcKeywordCode = exports.macroKeywordCode = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst code_1 = require_code();\n\tconst errors_1 = require_errors();\n\tfunction macroKeywordCode(cxt, def) {\n\t\tconst { gen, keyword, schema, parentSchema, it } = cxt;\n\t\tconst macroSchema = def.macro.call(it.self, schema, parentSchema, it);\n\t\tconst schemaRef = useKeyword(gen, keyword, macroSchema);\n\t\tif (it.opts.validateSchema !== false) it.self.validateSchema(macroSchema, true);\n\t\tconst valid = gen.name(\"valid\");\n\t\tcxt.subschema({\n\t\t\tschema: macroSchema,\n\t\t\tschemaPath: codegen_1.nil,\n\t\t\terrSchemaPath: `${it.errSchemaPath}/${keyword}`,\n\t\t\ttopSchemaRef: schemaRef,\n\t\t\tcompositeRule: true\n\t\t}, valid);\n\t\tcxt.pass(valid, () => cxt.error(true));\n\t}\n\texports.macroKeywordCode = macroKeywordCode;\n\tfunction funcKeywordCode(cxt, def) {\n\t\tvar _a;\n\t\tconst { gen, keyword, schema, parentSchema, $data, it } = cxt;\n\t\tcheckAsyncKeyword(it, def);\n\t\tconst validateRef = useKeyword(gen, keyword, !$data && def.compile ? def.compile.call(it.self, schema, parentSchema, it) : def.validate);\n\t\tconst valid = gen.let(\"valid\");\n\t\tcxt.block$data(valid, validateKeyword);\n\t\tcxt.ok((_a = def.valid) !== null && _a !== void 0 ? _a : valid);\n\t\tfunction validateKeyword() {\n\t\t\tif (def.errors === false) {\n\t\t\t\tassignValid();\n\t\t\t\tif (def.modifying) modifyData(cxt);\n\t\t\t\treportErrs(() => cxt.error());\n\t\t\t} else {\n\t\t\t\tconst ruleErrs = def.async ? validateAsync() : validateSync();\n\t\t\t\tif (def.modifying) modifyData(cxt);\n\t\t\t\treportErrs(() => addErrs(cxt, ruleErrs));\n\t\t\t}\n\t\t}\n\t\tfunction validateAsync() {\n\t\t\tconst ruleErrs = gen.let(\"ruleErrs\", null);\n\t\t\tgen.try(() => assignValid((0, codegen_1._)`await `), (e) => gen.assign(valid, false).if((0, codegen_1._)`${e} instanceof ${it.ValidationError}`, () => gen.assign(ruleErrs, (0, codegen_1._)`${e}.errors`), () => gen.throw(e)));\n\t\t\treturn ruleErrs;\n\t\t}\n\t\tfunction validateSync() {\n\t\t\tconst validateErrs = (0, codegen_1._)`${validateRef}.errors`;\n\t\t\tgen.assign(validateErrs, null);\n\t\t\tassignValid(codegen_1.nil);\n\t\t\treturn validateErrs;\n\t\t}\n\t\tfunction assignValid(_await = def.async ? (0, codegen_1._)`await ` : codegen_1.nil) {\n\t\t\tconst passCxt = it.opts.passContext ? names_1.default.this : names_1.default.self;\n\t\t\tconst passSchema = !(\"compile\" in def && !$data || def.schema === false);\n\t\t\tgen.assign(valid, (0, codegen_1._)`${_await}${(0, code_1.callValidateCode)(cxt, validateRef, passCxt, passSchema)}`, def.modifying);\n\t\t}\n\t\tfunction reportErrs(errors) {\n\t\t\tvar _a;\n\t\t\tgen.if((0, codegen_1.not)((_a = def.valid) !== null && _a !== void 0 ? _a : valid), errors);\n\t\t}\n\t}\n\texports.funcKeywordCode = funcKeywordCode;\n\tfunction modifyData(cxt) {\n\t\tconst { gen, data, it } = cxt;\n\t\tgen.if(it.parentData, () => gen.assign(data, (0, codegen_1._)`${it.parentData}[${it.parentDataProperty}]`));\n\t}\n\tfunction addErrs(cxt, errs) {\n\t\tconst { gen } = cxt;\n\t\tgen.if((0, codegen_1._)`Array.isArray(${errs})`, () => {\n\t\t\tgen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);\n\t\t\t(0, errors_1.extendErrors)(cxt);\n\t\t}, () => cxt.error());\n\t}\n\tfunction checkAsyncKeyword({ schemaEnv }, def) {\n\t\tif (def.async && !schemaEnv.$async) throw new Error(\"async keyword in sync schema\");\n\t}\n\tfunction useKeyword(gen, keyword, result) {\n\t\tif (result === void 0) throw new Error(`keyword \"${keyword}\" failed to compile`);\n\t\treturn gen.scopeValue(\"keyword\", typeof result == \"function\" ? { ref: result } : {\n\t\t\tref: result,\n\t\t\tcode: (0, codegen_1.stringify)(result)\n\t\t});\n\t}\n\tfunction validSchemaType(schema, schemaType, allowUndefined = false) {\n\t\treturn !schemaType.length || schemaType.some((st) => st === \"array\" ? Array.isArray(schema) : st === \"object\" ? schema && typeof schema == \"object\" && !Array.isArray(schema) : typeof schema == st || allowUndefined && typeof schema == \"undefined\");\n\t}\n\texports.validSchemaType = validSchemaType;\n\tfunction validateKeywordUsage({ schema, opts, self, errSchemaPath }, def, keyword) {\n\t\t/* istanbul ignore if */\n\t\tif (Array.isArray(def.keyword) ? !def.keyword.includes(keyword) : def.keyword !== keyword) throw new Error(\"ajv implementation error\");\n\t\tconst deps = def.dependencies;\n\t\tif (deps === null || deps === void 0 ? void 0 : deps.some((kwd) => !Object.prototype.hasOwnProperty.call(schema, kwd))) throw new Error(`parent schema must have dependencies of ${keyword}: ${deps.join(\",\")}`);\n\t\tif (def.validateSchema) {\n\t\t\tif (!def.validateSchema(schema[keyword])) {\n\t\t\t\tconst msg = `keyword \"${keyword}\" value is invalid at path \"${errSchemaPath}\": ` + self.errorsText(def.validateSchema.errors);\n\t\t\t\tif (opts.validateSchema === \"log\") self.logger.error(msg);\n\t\t\t\telse throw new Error(msg);\n\t\t\t}\n\t\t}\n\t}\n\texports.validateKeywordUsage = validateKeywordUsage;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/validate/subschema.js\nvar require_subschema = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.extendSubschemaMode = exports.extendSubschemaData = exports.getSubschema = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tfunction getSubschema(it, { keyword, schemaProp, schema, schemaPath, errSchemaPath, topSchemaRef }) {\n\t\tif (keyword !== void 0 && schema !== void 0) throw new Error(\"both \\\"keyword\\\" and \\\"schema\\\" passed, only one allowed\");\n\t\tif (keyword !== void 0) {\n\t\t\tconst sch = it.schema[keyword];\n\t\t\treturn schemaProp === void 0 ? {\n\t\t\t\tschema: sch,\n\t\t\t\tschemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}`,\n\t\t\t\terrSchemaPath: `${it.errSchemaPath}/${keyword}`\n\t\t\t} : {\n\t\t\t\tschema: sch[schemaProp],\n\t\t\t\tschemaPath: (0, codegen_1._)`${it.schemaPath}${(0, codegen_1.getProperty)(keyword)}${(0, codegen_1.getProperty)(schemaProp)}`,\n\t\t\t\terrSchemaPath: `${it.errSchemaPath}/${keyword}/${(0, util_1.escapeFragment)(schemaProp)}`\n\t\t\t};\n\t\t}\n\t\tif (schema !== void 0) {\n\t\t\tif (schemaPath === void 0 || errSchemaPath === void 0 || topSchemaRef === void 0) throw new Error(\"\\\"schemaPath\\\", \\\"errSchemaPath\\\" and \\\"topSchemaRef\\\" are required with \\\"schema\\\"\");\n\t\t\treturn {\n\t\t\t\tschema,\n\t\t\t\tschemaPath,\n\t\t\t\ttopSchemaRef,\n\t\t\t\terrSchemaPath\n\t\t\t};\n\t\t}\n\t\tthrow new Error(\"either \\\"keyword\\\" or \\\"schema\\\" must be passed\");\n\t}\n\texports.getSubschema = getSubschema;\n\tfunction extendSubschemaData(subschema, it, { dataProp, dataPropType: dpType, data, dataTypes, propertyName }) {\n\t\tif (data !== void 0 && dataProp !== void 0) throw new Error(\"both \\\"data\\\" and \\\"dataProp\\\" passed, only one allowed\");\n\t\tconst { gen } = it;\n\t\tif (dataProp !== void 0) {\n\t\t\tconst { errorPath, dataPathArr, opts } = it;\n\t\t\tdataContextProps(gen.let(\"data\", (0, codegen_1._)`${it.data}${(0, codegen_1.getProperty)(dataProp)}`, true));\n\t\t\tsubschema.errorPath = (0, codegen_1.str)`${errorPath}${(0, util_1.getErrorPath)(dataProp, dpType, opts.jsPropertySyntax)}`;\n\t\t\tsubschema.parentDataProperty = (0, codegen_1._)`${dataProp}`;\n\t\t\tsubschema.dataPathArr = [...dataPathArr, subschema.parentDataProperty];\n\t\t}\n\t\tif (data !== void 0) {\n\t\t\tdataContextProps(data instanceof codegen_1.Name ? data : gen.let(\"data\", data, true));\n\t\t\tif (propertyName !== void 0) subschema.propertyName = propertyName;\n\t\t}\n\t\tif (dataTypes) subschema.dataTypes = dataTypes;\n\t\tfunction dataContextProps(_nextData) {\n\t\t\tsubschema.data = _nextData;\n\t\t\tsubschema.dataLevel = it.dataLevel + 1;\n\t\t\tsubschema.dataTypes = [];\n\t\t\tit.definedProperties = /* @__PURE__ */ new Set();\n\t\t\tsubschema.parentData = it.data;\n\t\t\tsubschema.dataNames = [...it.dataNames, _nextData];\n\t\t}\n\t}\n\texports.extendSubschemaData = extendSubschemaData;\n\tfunction extendSubschemaMode(subschema, { jtdDiscriminator, jtdMetadata, compositeRule, createErrors, allErrors }) {\n\t\tif (compositeRule !== void 0) subschema.compositeRule = compositeRule;\n\t\tif (createErrors !== void 0) subschema.createErrors = createErrors;\n\t\tif (allErrors !== void 0) subschema.allErrors = allErrors;\n\t\tsubschema.jtdDiscriminator = jtdDiscriminator;\n\t\tsubschema.jtdMetadata = jtdMetadata;\n\t}\n\texports.extendSubschemaMode = extendSubschemaMode;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-deep-equal/3.1.3/57fbe5fd6f7d3bd61519466ad102884cc9e5511fabd9777317b6582805433878/node_modules/fast-deep-equal/index.js\nvar require_fast_deep_equal = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = function equal(a, b) {\n\t\tif (a === b) return true;\n\t\tif (a && b && typeof a == \"object\" && typeof b == \"object\") {\n\t\t\tif (a.constructor !== b.constructor) return false;\n\t\t\tvar length, i, keys;\n\t\t\tif (Array.isArray(a)) {\n\t\t\t\tlength = a.length;\n\t\t\t\tif (length != b.length) return false;\n\t\t\t\tfor (i = length; i-- !== 0;) if (!equal(a[i], b[i])) return false;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n\t\t\tif (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n\t\t\tif (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\t\t\tkeys = Object.keys(a);\n\t\t\tlength = keys.length;\n\t\t\tif (length !== Object.keys(b).length) return false;\n\t\t\tfor (i = length; i-- !== 0;) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\t\t\tfor (i = length; i-- !== 0;) {\n\t\t\t\tvar key = keys[i];\n\t\t\t\tif (!equal(a[key], b[key])) return false;\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn a !== a && b !== b;\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/resolve.js\nvar require_resolve = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.getSchemaRefs = exports.resolveUrl = exports.normalizeId = exports._getFullPath = exports.getFullPath = exports.inlineRef = void 0;\n\tconst util_1 = require_util();\n\tconst equal = require_fast_deep_equal();\n\tconst traverse = require_json_schema_traverse();\n\tconst SIMPLE_INLINED = /* @__PURE__ */ new Set([\n\t\t\"type\",\n\t\t\"format\",\n\t\t\"pattern\",\n\t\t\"maxLength\",\n\t\t\"minLength\",\n\t\t\"maxProperties\",\n\t\t\"minProperties\",\n\t\t\"maxItems\",\n\t\t\"minItems\",\n\t\t\"maximum\",\n\t\t\"minimum\",\n\t\t\"uniqueItems\",\n\t\t\"multipleOf\",\n\t\t\"required\",\n\t\t\"enum\",\n\t\t\"const\"\n\t]);\n\tfunction inlineRef(schema, limit = true) {\n\t\tif (typeof schema == \"boolean\") return true;\n\t\tif (limit === true) return !hasRef(schema);\n\t\tif (!limit) return false;\n\t\treturn countKeys(schema) <= limit;\n\t}\n\texports.inlineRef = inlineRef;\n\tconst REF_KEYWORDS = /* @__PURE__ */ new Set([\n\t\t\"$ref\",\n\t\t\"$recursiveRef\",\n\t\t\"$recursiveAnchor\",\n\t\t\"$dynamicRef\",\n\t\t\"$dynamicAnchor\"\n\t]);\n\tfunction hasRef(schema) {\n\t\tfor (const key in schema) {\n\t\t\tif (REF_KEYWORDS.has(key)) return true;\n\t\t\tconst sch = schema[key];\n\t\t\tif (Array.isArray(sch) && sch.some(hasRef)) return true;\n\t\t\tif (typeof sch == \"object\" && hasRef(sch)) return true;\n\t\t}\n\t\treturn false;\n\t}\n\tfunction countKeys(schema) {\n\t\tlet count = 0;\n\t\tfor (const key in schema) {\n\t\t\tif (key === \"$ref\") return Infinity;\n\t\t\tcount++;\n\t\t\tif (SIMPLE_INLINED.has(key)) continue;\n\t\t\tif (typeof schema[key] == \"object\") (0, util_1.eachItem)(schema[key], (sch) => count += countKeys(sch));\n\t\t\tif (count === Infinity) return Infinity;\n\t\t}\n\t\treturn count;\n\t}\n\tfunction getFullPath(resolver, id = \"\", normalize) {\n\t\tif (normalize !== false) id = normalizeId(id);\n\t\treturn _getFullPath(resolver, resolver.parse(id));\n\t}\n\texports.getFullPath = getFullPath;\n\tfunction _getFullPath(resolver, p) {\n\t\treturn resolver.serialize(p).split(\"#\")[0] + \"#\";\n\t}\n\texports._getFullPath = _getFullPath;\n\tconst TRAILING_SLASH_HASH = /#\\/?$/;\n\tfunction normalizeId(id) {\n\t\treturn id ? id.replace(TRAILING_SLASH_HASH, \"\") : \"\";\n\t}\n\texports.normalizeId = normalizeId;\n\tfunction resolveUrl(resolver, baseId, id) {\n\t\tid = normalizeId(id);\n\t\treturn resolver.resolve(baseId, id);\n\t}\n\texports.resolveUrl = resolveUrl;\n\tconst ANCHOR = /^[a-z_][-a-z0-9._]*$/i;\n\tfunction getSchemaRefs(schema, baseId) {\n\t\tif (typeof schema == \"boolean\") return {};\n\t\tconst { schemaId, uriResolver } = this.opts;\n\t\tconst schId = normalizeId(schema[schemaId] || baseId);\n\t\tconst baseIds = { \"\": schId };\n\t\tconst pathPrefix = getFullPath(uriResolver, schId, false);\n\t\tconst localRefs = {};\n\t\tconst schemaRefs = /* @__PURE__ */ new Set();\n\t\ttraverse(schema, { allKeys: true }, (sch, jsonPtr, _, parentJsonPtr) => {\n\t\t\tif (parentJsonPtr === void 0) return;\n\t\t\tconst fullPath = pathPrefix + jsonPtr;\n\t\t\tlet innerBaseId = baseIds[parentJsonPtr];\n\t\t\tif (typeof sch[schemaId] == \"string\") innerBaseId = addRef.call(this, sch[schemaId]);\n\t\t\taddAnchor.call(this, sch.$anchor);\n\t\t\taddAnchor.call(this, sch.$dynamicAnchor);\n\t\t\tbaseIds[jsonPtr] = innerBaseId;\n\t\t\tfunction addRef(ref) {\n\t\t\t\tconst _resolve = this.opts.uriResolver.resolve;\n\t\t\t\tref = normalizeId(innerBaseId ? _resolve(innerBaseId, ref) : ref);\n\t\t\t\tif (schemaRefs.has(ref)) throw ambiguos(ref);\n\t\t\t\tschemaRefs.add(ref);\n\t\t\t\tlet schOrRef = this.refs[ref];\n\t\t\t\tif (typeof schOrRef == \"string\") schOrRef = this.refs[schOrRef];\n\t\t\t\tif (typeof schOrRef == \"object\") checkAmbiguosRef(sch, schOrRef.schema, ref);\n\t\t\t\telse if (ref !== normalizeId(fullPath)) if (ref[0] === \"#\") {\n\t\t\t\t\tcheckAmbiguosRef(sch, localRefs[ref], ref);\n\t\t\t\t\tlocalRefs[ref] = sch;\n\t\t\t\t} else this.refs[ref] = fullPath;\n\t\t\t\treturn ref;\n\t\t\t}\n\t\t\tfunction addAnchor(anchor) {\n\t\t\t\tif (typeof anchor == \"string\") {\n\t\t\t\t\tif (!ANCHOR.test(anchor)) throw new Error(`invalid anchor \"${anchor}\"`);\n\t\t\t\t\taddRef.call(this, `#${anchor}`);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn localRefs;\n\t\tfunction checkAmbiguosRef(sch1, sch2, ref) {\n\t\t\tif (sch2 !== void 0 && !equal(sch1, sch2)) throw ambiguos(ref);\n\t\t}\n\t\tfunction ambiguos(ref) {\n\t\t\treturn /* @__PURE__ */ new Error(`reference \"${ref}\" resolves to more than one schema`);\n\t\t}\n\t}\n\texports.getSchemaRefs = getSchemaRefs;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/validate/index.js\nvar require_validate = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.getData = exports.KeywordCxt = exports.validateFunctionCode = void 0;\n\tconst boolSchema_1 = require_boolSchema();\n\tconst dataType_1 = require_dataType();\n\tconst applicability_1 = require_applicability();\n\tconst dataType_2 = require_dataType();\n\tconst defaults_1 = require_defaults();\n\tconst keyword_1 = require_keyword();\n\tconst subschema_1 = require_subschema();\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst resolve_1 = require_resolve();\n\tconst util_1 = require_util();\n\tconst errors_1 = require_errors();\n\tfunction validateFunctionCode(it) {\n\t\tif (isSchemaObj(it)) {\n\t\t\tcheckKeywords(it);\n\t\t\tif (schemaCxtHasRules(it)) {\n\t\t\t\ttopSchemaObjCode(it);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tvalidateFunction(it, () => (0, boolSchema_1.topBoolOrEmptySchema)(it));\n\t}\n\texports.validateFunctionCode = validateFunctionCode;\n\tfunction validateFunction({ gen, validateName, schema, schemaEnv, opts }, body) {\n\t\tif (opts.code.es5) gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`, schemaEnv.$async, () => {\n\t\t\tgen.code((0, codegen_1._)`\"use strict\"; ${funcSourceUrl(schema, opts)}`);\n\t\t\tdestructureValCxtES5(gen, opts);\n\t\t\tgen.code(body);\n\t\t});\n\t\telse gen.func(validateName, (0, codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`, schemaEnv.$async, () => gen.code(funcSourceUrl(schema, opts)).code(body));\n\t}\n\tfunction destructureValCxt(opts) {\n\t\treturn (0, codegen_1._)`{${names_1.default.instancePath}=\"\", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef ? (0, codegen_1._)`, ${names_1.default.dynamicAnchors}={}` : codegen_1.nil}}={}`;\n\t}\n\tfunction destructureValCxtES5(gen, opts) {\n\t\tgen.if(names_1.default.valCxt, () => {\n\t\t\tgen.var(names_1.default.instancePath, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`);\n\t\t\tgen.var(names_1.default.parentData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`);\n\t\t\tgen.var(names_1.default.parentDataProperty, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`);\n\t\t\tgen.var(names_1.default.rootData, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`);\n\t\t\tif (opts.dynamicRef) gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`);\n\t\t}, () => {\n\t\t\tgen.var(names_1.default.instancePath, (0, codegen_1._)`\"\"`);\n\t\t\tgen.var(names_1.default.parentData, (0, codegen_1._)`undefined`);\n\t\t\tgen.var(names_1.default.parentDataProperty, (0, codegen_1._)`undefined`);\n\t\t\tgen.var(names_1.default.rootData, names_1.default.data);\n\t\t\tif (opts.dynamicRef) gen.var(names_1.default.dynamicAnchors, (0, codegen_1._)`{}`);\n\t\t});\n\t}\n\tfunction topSchemaObjCode(it) {\n\t\tconst { schema, opts, gen } = it;\n\t\tvalidateFunction(it, () => {\n\t\t\tif (opts.$comment && schema.$comment) commentKeyword(it);\n\t\t\tcheckNoDefault(it);\n\t\t\tgen.let(names_1.default.vErrors, null);\n\t\t\tgen.let(names_1.default.errors, 0);\n\t\t\tif (opts.unevaluated) resetEvaluated(it);\n\t\t\ttypeAndKeywords(it);\n\t\t\treturnResults(it);\n\t\t});\n\t}\n\tfunction resetEvaluated(it) {\n\t\tconst { gen, validateName } = it;\n\t\tit.evaluated = gen.const(\"evaluated\", (0, codegen_1._)`${validateName}.evaluated`);\n\t\tgen.if((0, codegen_1._)`${it.evaluated}.dynamicProps`, () => gen.assign((0, codegen_1._)`${it.evaluated}.props`, (0, codegen_1._)`undefined`));\n\t\tgen.if((0, codegen_1._)`${it.evaluated}.dynamicItems`, () => gen.assign((0, codegen_1._)`${it.evaluated}.items`, (0, codegen_1._)`undefined`));\n\t}\n\tfunction funcSourceUrl(schema, opts) {\n\t\tconst schId = typeof schema == \"object\" && schema[opts.schemaId];\n\t\treturn schId && (opts.code.source || opts.code.process) ? (0, codegen_1._)`/*# sourceURL=${schId} */` : codegen_1.nil;\n\t}\n\tfunction subschemaCode(it, valid) {\n\t\tif (isSchemaObj(it)) {\n\t\t\tcheckKeywords(it);\n\t\t\tif (schemaCxtHasRules(it)) {\n\t\t\t\tsubSchemaObjCode(it, valid);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t(0, boolSchema_1.boolOrEmptySchema)(it, valid);\n\t}\n\tfunction schemaCxtHasRules({ schema, self }) {\n\t\tif (typeof schema == \"boolean\") return !schema;\n\t\tfor (const key in schema) if (self.RULES.all[key]) return true;\n\t\treturn false;\n\t}\n\tfunction isSchemaObj(it) {\n\t\treturn typeof it.schema != \"boolean\";\n\t}\n\tfunction subSchemaObjCode(it, valid) {\n\t\tconst { schema, gen, opts } = it;\n\t\tif (opts.$comment && schema.$comment) commentKeyword(it);\n\t\tupdateContext(it);\n\t\tcheckAsyncSchema(it);\n\t\tconst errsCount = gen.const(\"_errs\", names_1.default.errors);\n\t\ttypeAndKeywords(it, errsCount);\n\t\tgen.var(valid, (0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);\n\t}\n\tfunction checkKeywords(it) {\n\t\t(0, util_1.checkUnknownRules)(it);\n\t\tcheckRefsAndKeywords(it);\n\t}\n\tfunction typeAndKeywords(it, errsCount) {\n\t\tif (it.opts.jtd) return schemaKeywords(it, [], false, errsCount);\n\t\tconst types = (0, dataType_1.getSchemaTypes)(it.schema);\n\t\tschemaKeywords(it, types, !(0, dataType_1.coerceAndCheckDataType)(it, types), errsCount);\n\t}\n\tfunction checkRefsAndKeywords(it) {\n\t\tconst { schema, errSchemaPath, opts, self } = it;\n\t\tif (schema.$ref && opts.ignoreKeywordsWithRef && (0, util_1.schemaHasRulesButRef)(schema, self.RULES)) self.logger.warn(`$ref: keywords ignored in schema at path \"${errSchemaPath}\"`);\n\t}\n\tfunction checkNoDefault(it) {\n\t\tconst { schema, opts } = it;\n\t\tif (schema.default !== void 0 && opts.useDefaults && opts.strictSchema) (0, util_1.checkStrictMode)(it, \"default is ignored in the schema root\");\n\t}\n\tfunction updateContext(it) {\n\t\tconst schId = it.schema[it.opts.schemaId];\n\t\tif (schId) it.baseId = (0, resolve_1.resolveUrl)(it.opts.uriResolver, it.baseId, schId);\n\t}\n\tfunction checkAsyncSchema(it) {\n\t\tif (it.schema.$async && !it.schemaEnv.$async) throw new Error(\"async schema in sync schema\");\n\t}\n\tfunction commentKeyword({ gen, schemaEnv, schema, errSchemaPath, opts }) {\n\t\tconst msg = schema.$comment;\n\t\tif (opts.$comment === true) gen.code((0, codegen_1._)`${names_1.default.self}.logger.log(${msg})`);\n\t\telse if (typeof opts.$comment == \"function\") {\n\t\t\tconst schemaPath = (0, codegen_1.str)`${errSchemaPath}/$comment`;\n\t\t\tconst rootName = gen.scopeValue(\"root\", { ref: schemaEnv.root });\n\t\t\tgen.code((0, codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`);\n\t\t}\n\t}\n\tfunction returnResults(it) {\n\t\tconst { gen, schemaEnv, validateName, ValidationError, opts } = it;\n\t\tif (schemaEnv.$async) gen.if((0, codegen_1._)`${names_1.default.errors} === 0`, () => gen.return(names_1.default.data), () => gen.throw((0, codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`));\n\t\telse {\n\t\t\tgen.assign((0, codegen_1._)`${validateName}.errors`, names_1.default.vErrors);\n\t\t\tif (opts.unevaluated) assignEvaluated(it);\n\t\t\tgen.return((0, codegen_1._)`${names_1.default.errors} === 0`);\n\t\t}\n\t}\n\tfunction assignEvaluated({ gen, evaluated, props, items }) {\n\t\tif (props instanceof codegen_1.Name) gen.assign((0, codegen_1._)`${evaluated}.props`, props);\n\t\tif (items instanceof codegen_1.Name) gen.assign((0, codegen_1._)`${evaluated}.items`, items);\n\t}\n\tfunction schemaKeywords(it, types, typeErrors, errsCount) {\n\t\tconst { gen, schema, data, allErrors, opts, self } = it;\n\t\tconst { RULES } = self;\n\t\tif (schema.$ref && (opts.ignoreKeywordsWithRef || !(0, util_1.schemaHasRulesButRef)(schema, RULES))) {\n\t\t\tgen.block(() => keywordCode(it, \"$ref\", RULES.all.$ref.definition));\n\t\t\treturn;\n\t\t}\n\t\tif (!opts.jtd) checkStrictTypes(it, types);\n\t\tgen.block(() => {\n\t\t\tfor (const group of RULES.rules) groupKeywords(group);\n\t\t\tgroupKeywords(RULES.post);\n\t\t});\n\t\tfunction groupKeywords(group) {\n\t\t\tif (!(0, applicability_1.shouldUseGroup)(schema, group)) return;\n\t\t\tif (group.type) {\n\t\t\t\tgen.if((0, dataType_2.checkDataType)(group.type, data, opts.strictNumbers));\n\t\t\t\titerateKeywords(it, group);\n\t\t\t\tif (types.length === 1 && types[0] === group.type && typeErrors) {\n\t\t\t\t\tgen.else();\n\t\t\t\t\t(0, dataType_2.reportTypeError)(it);\n\t\t\t\t}\n\t\t\t\tgen.endIf();\n\t\t\t} else iterateKeywords(it, group);\n\t\t\tif (!allErrors) gen.if((0, codegen_1._)`${names_1.default.errors} === ${errsCount || 0}`);\n\t\t}\n\t}\n\tfunction iterateKeywords(it, group) {\n\t\tconst { gen, schema, opts: { useDefaults } } = it;\n\t\tif (useDefaults) (0, defaults_1.assignDefaults)(it, group.type);\n\t\tgen.block(() => {\n\t\t\tfor (const rule of group.rules) if ((0, applicability_1.shouldUseRule)(schema, rule)) keywordCode(it, rule.keyword, rule.definition, group.type);\n\t\t});\n\t}\n\tfunction checkStrictTypes(it, types) {\n\t\tif (it.schemaEnv.meta || !it.opts.strictTypes) return;\n\t\tcheckContextTypes(it, types);\n\t\tif (!it.opts.allowUnionTypes) checkMultipleTypes(it, types);\n\t\tcheckKeywordTypes(it, it.dataTypes);\n\t}\n\tfunction checkContextTypes(it, types) {\n\t\tif (!types.length) return;\n\t\tif (!it.dataTypes.length) {\n\t\t\tit.dataTypes = types;\n\t\t\treturn;\n\t\t}\n\t\ttypes.forEach((t) => {\n\t\t\tif (!includesType(it.dataTypes, t)) strictTypesError(it, `type \"${t}\" not allowed by context \"${it.dataTypes.join(\",\")}\"`);\n\t\t});\n\t\tnarrowSchemaTypes(it, types);\n\t}\n\tfunction checkMultipleTypes(it, ts) {\n\t\tif (ts.length > 1 && !(ts.length === 2 && ts.includes(\"null\"))) strictTypesError(it, \"use allowUnionTypes to allow union type keyword\");\n\t}\n\tfunction checkKeywordTypes(it, ts) {\n\t\tconst rules = it.self.RULES.all;\n\t\tfor (const keyword in rules) {\n\t\t\tconst rule = rules[keyword];\n\t\t\tif (typeof rule == \"object\" && (0, applicability_1.shouldUseRule)(it.schema, rule)) {\n\t\t\t\tconst { type } = rule.definition;\n\t\t\t\tif (type.length && !type.some((t) => hasApplicableType(ts, t))) strictTypesError(it, `missing type \"${type.join(\",\")}\" for keyword \"${keyword}\"`);\n\t\t\t}\n\t\t}\n\t}\n\tfunction hasApplicableType(schTs, kwdT) {\n\t\treturn schTs.includes(kwdT) || kwdT === \"number\" && schTs.includes(\"integer\");\n\t}\n\tfunction includesType(ts, t) {\n\t\treturn ts.includes(t) || t === \"integer\" && ts.includes(\"number\");\n\t}\n\tfunction narrowSchemaTypes(it, withTypes) {\n\t\tconst ts = [];\n\t\tfor (const t of it.dataTypes) if (includesType(withTypes, t)) ts.push(t);\n\t\telse if (withTypes.includes(\"integer\") && t === \"number\") ts.push(\"integer\");\n\t\tit.dataTypes = ts;\n\t}\n\tfunction strictTypesError(it, msg) {\n\t\tconst schemaPath = it.schemaEnv.baseId + it.errSchemaPath;\n\t\tmsg += ` at \"${schemaPath}\" (strictTypes)`;\n\t\t(0, util_1.checkStrictMode)(it, msg, it.opts.strictTypes);\n\t}\n\tvar KeywordCxt = class {\n\t\tconstructor(it, def, keyword) {\n\t\t\t(0, keyword_1.validateKeywordUsage)(it, def, keyword);\n\t\t\tthis.gen = it.gen;\n\t\t\tthis.allErrors = it.allErrors;\n\t\t\tthis.keyword = keyword;\n\t\t\tthis.data = it.data;\n\t\t\tthis.schema = it.schema[keyword];\n\t\t\tthis.$data = def.$data && it.opts.$data && this.schema && this.schema.$data;\n\t\t\tthis.schemaValue = (0, util_1.schemaRefOrVal)(it, this.schema, keyword, this.$data);\n\t\t\tthis.schemaType = def.schemaType;\n\t\t\tthis.parentSchema = it.schema;\n\t\t\tthis.params = {};\n\t\t\tthis.it = it;\n\t\t\tthis.def = def;\n\t\t\tif (this.$data) this.schemaCode = it.gen.const(\"vSchema\", getData(this.$data, it));\n\t\t\telse {\n\t\t\t\tthis.schemaCode = this.schemaValue;\n\t\t\t\tif (!(0, keyword_1.validSchemaType)(this.schema, def.schemaType, def.allowUndefined)) throw new Error(`${keyword} value must be ${JSON.stringify(def.schemaType)}`);\n\t\t\t}\n\t\t\tif (\"code\" in def ? def.trackErrors : def.errors !== false) this.errsCount = it.gen.const(\"_errs\", names_1.default.errors);\n\t\t}\n\t\tresult(condition, successAction, failAction) {\n\t\t\tthis.failResult((0, codegen_1.not)(condition), successAction, failAction);\n\t\t}\n\t\tfailResult(condition, successAction, failAction) {\n\t\t\tthis.gen.if(condition);\n\t\t\tif (failAction) failAction();\n\t\t\telse this.error();\n\t\t\tif (successAction) {\n\t\t\t\tthis.gen.else();\n\t\t\t\tsuccessAction();\n\t\t\t\tif (this.allErrors) this.gen.endIf();\n\t\t\t} else if (this.allErrors) this.gen.endIf();\n\t\t\telse this.gen.else();\n\t\t}\n\t\tpass(condition, failAction) {\n\t\t\tthis.failResult((0, codegen_1.not)(condition), void 0, failAction);\n\t\t}\n\t\tfail(condition) {\n\t\t\tif (condition === void 0) {\n\t\t\t\tthis.error();\n\t\t\t\tif (!this.allErrors) this.gen.if(false);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.gen.if(condition);\n\t\t\tthis.error();\n\t\t\tif (this.allErrors) this.gen.endIf();\n\t\t\telse this.gen.else();\n\t\t}\n\t\tfail$data(condition) {\n\t\t\tif (!this.$data) return this.fail(condition);\n\t\t\tconst { schemaCode } = this;\n\t\t\tthis.fail((0, codegen_1._)`${schemaCode} !== undefined && (${(0, codegen_1.or)(this.invalid$data(), condition)})`);\n\t\t}\n\t\terror(append, errorParams, errorPaths) {\n\t\t\tif (errorParams) {\n\t\t\t\tthis.setParams(errorParams);\n\t\t\t\tthis._error(append, errorPaths);\n\t\t\t\tthis.setParams({});\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis._error(append, errorPaths);\n\t\t}\n\t\t_error(append, errorPaths) {\n\t\t\t(append ? errors_1.reportExtraError : errors_1.reportError)(this, this.def.error, errorPaths);\n\t\t}\n\t\t$dataError() {\n\t\t\t(0, errors_1.reportError)(this, this.def.$dataError || errors_1.keyword$DataError);\n\t\t}\n\t\treset() {\n\t\t\tif (this.errsCount === void 0) throw new Error(\"add \\\"trackErrors\\\" to keyword definition\");\n\t\t\t(0, errors_1.resetErrorsCount)(this.gen, this.errsCount);\n\t\t}\n\t\tok(cond) {\n\t\t\tif (!this.allErrors) this.gen.if(cond);\n\t\t}\n\t\tsetParams(obj, assign) {\n\t\t\tif (assign) Object.assign(this.params, obj);\n\t\t\telse this.params = obj;\n\t\t}\n\t\tblock$data(valid, codeBlock, $dataValid = codegen_1.nil) {\n\t\t\tthis.gen.block(() => {\n\t\t\t\tthis.check$data(valid, $dataValid);\n\t\t\t\tcodeBlock();\n\t\t\t});\n\t\t}\n\t\tcheck$data(valid = codegen_1.nil, $dataValid = codegen_1.nil) {\n\t\t\tif (!this.$data) return;\n\t\t\tconst { gen, schemaCode, schemaType, def } = this;\n\t\t\tgen.if((0, codegen_1.or)((0, codegen_1._)`${schemaCode} === undefined`, $dataValid));\n\t\t\tif (valid !== codegen_1.nil) gen.assign(valid, true);\n\t\t\tif (schemaType.length || def.validateSchema) {\n\t\t\t\tgen.elseIf(this.invalid$data());\n\t\t\t\tthis.$dataError();\n\t\t\t\tif (valid !== codegen_1.nil) gen.assign(valid, false);\n\t\t\t}\n\t\t\tgen.else();\n\t\t}\n\t\tinvalid$data() {\n\t\t\tconst { gen, schemaCode, schemaType, def, it } = this;\n\t\t\treturn (0, codegen_1.or)(wrong$DataType(), invalid$DataSchema());\n\t\t\tfunction wrong$DataType() {\n\t\t\t\tif (schemaType.length) {\n\t\t\t\t\t/* istanbul ignore if */\n\t\t\t\t\tif (!(schemaCode instanceof codegen_1.Name)) throw new Error(\"ajv implementation error\");\n\t\t\t\t\tconst st = Array.isArray(schemaType) ? schemaType : [schemaType];\n\t\t\t\t\treturn (0, codegen_1._)`${(0, dataType_2.checkDataTypes)(st, schemaCode, it.opts.strictNumbers, dataType_2.DataType.Wrong)}`;\n\t\t\t\t}\n\t\t\t\treturn codegen_1.nil;\n\t\t\t}\n\t\t\tfunction invalid$DataSchema() {\n\t\t\t\tif (def.validateSchema) {\n\t\t\t\t\tconst validateSchemaRef = gen.scopeValue(\"validate$data\", { ref: def.validateSchema });\n\t\t\t\t\treturn (0, codegen_1._)`!${validateSchemaRef}(${schemaCode})`;\n\t\t\t\t}\n\t\t\t\treturn codegen_1.nil;\n\t\t\t}\n\t\t}\n\t\tsubschema(appl, valid) {\n\t\t\tconst subschema = (0, subschema_1.getSubschema)(this.it, appl);\n\t\t\t(0, subschema_1.extendSubschemaData)(subschema, this.it, appl);\n\t\t\t(0, subschema_1.extendSubschemaMode)(subschema, appl);\n\t\t\tconst nextContext = {\n\t\t\t\t...this.it,\n\t\t\t\t...subschema,\n\t\t\t\titems: void 0,\n\t\t\t\tprops: void 0\n\t\t\t};\n\t\t\tsubschemaCode(nextContext, valid);\n\t\t\treturn nextContext;\n\t\t}\n\t\tmergeEvaluated(schemaCxt, toName) {\n\t\t\tconst { it, gen } = this;\n\t\t\tif (!it.opts.unevaluated) return;\n\t\t\tif (it.props !== true && schemaCxt.props !== void 0) it.props = util_1.mergeEvaluated.props(gen, schemaCxt.props, it.props, toName);\n\t\t\tif (it.items !== true && schemaCxt.items !== void 0) it.items = util_1.mergeEvaluated.items(gen, schemaCxt.items, it.items, toName);\n\t\t}\n\t\tmergeValidEvaluated(schemaCxt, valid) {\n\t\t\tconst { it, gen } = this;\n\t\t\tif (it.opts.unevaluated && (it.props !== true || it.items !== true)) {\n\t\t\t\tgen.if(valid, () => this.mergeEvaluated(schemaCxt, codegen_1.Name));\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t};\n\texports.KeywordCxt = KeywordCxt;\n\tfunction keywordCode(it, keyword, def, ruleType) {\n\t\tconst cxt = new KeywordCxt(it, def, keyword);\n\t\tif (\"code\" in def) def.code(cxt, ruleType);\n\t\telse if (cxt.$data && def.validate) (0, keyword_1.funcKeywordCode)(cxt, def);\n\t\telse if (\"macro\" in def) (0, keyword_1.macroKeywordCode)(cxt, def);\n\t\telse if (def.compile || def.validate) (0, keyword_1.funcKeywordCode)(cxt, def);\n\t}\n\tconst JSON_POINTER = /^\\/(?:[^~]|~0|~1)*$/;\n\tconst RELATIVE_JSON_POINTER = /^([0-9]+)(#|\\/(?:[^~]|~0|~1)*)?$/;\n\tfunction getData($data, { dataLevel, dataNames, dataPathArr }) {\n\t\tlet jsonPointer;\n\t\tlet data;\n\t\tif ($data === \"\") return names_1.default.rootData;\n\t\tif ($data[0] === \"/\") {\n\t\t\tif (!JSON_POINTER.test($data)) throw new Error(`Invalid JSON-pointer: ${$data}`);\n\t\t\tjsonPointer = $data;\n\t\t\tdata = names_1.default.rootData;\n\t\t} else {\n\t\t\tconst matches = RELATIVE_JSON_POINTER.exec($data);\n\t\t\tif (!matches) throw new Error(`Invalid JSON-pointer: ${$data}`);\n\t\t\tconst up = +matches[1];\n\t\t\tjsonPointer = matches[2];\n\t\t\tif (jsonPointer === \"#\") {\n\t\t\t\tif (up >= dataLevel) throw new Error(errorMsg(\"property/index\", up));\n\t\t\t\treturn dataPathArr[dataLevel - up];\n\t\t\t}\n\t\t\tif (up > dataLevel) throw new Error(errorMsg(\"data\", up));\n\t\t\tdata = dataNames[dataLevel - up];\n\t\t\tif (!jsonPointer) return data;\n\t\t}\n\t\tlet expr = data;\n\t\tconst segments = jsonPointer.split(\"/\");\n\t\tfor (const segment of segments) if (segment) {\n\t\t\tdata = (0, codegen_1._)`${data}${(0, codegen_1.getProperty)((0, util_1.unescapeJsonPointer)(segment))}`;\n\t\t\texpr = (0, codegen_1._)`${expr} && ${data}`;\n\t\t}\n\t\treturn expr;\n\t\tfunction errorMsg(pointerType, up) {\n\t\t\treturn `Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`;\n\t\t}\n\t}\n\texports.getData = getData;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/runtime/validation_error.js\nvar require_validation_error = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tvar ValidationError = class extends Error {\n\t\tconstructor(errors) {\n\t\t\tsuper(\"validation failed\");\n\t\t\tthis.errors = errors;\n\t\t\tthis.ajv = this.validation = true;\n\t\t}\n\t};\n\texports.default = ValidationError;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/ref_error.js\nvar require_ref_error = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst resolve_1 = require_resolve();\n\tvar MissingRefError = class extends Error {\n\t\tconstructor(resolver, baseId, ref, msg) {\n\t\t\tsuper(msg || `can't resolve reference ${ref} from id ${baseId}`);\n\t\t\tthis.missingRef = (0, resolve_1.resolveUrl)(resolver, baseId, ref);\n\t\t\tthis.missingSchema = (0, resolve_1.normalizeId)((0, resolve_1.getFullPath)(resolver, this.missingRef));\n\t\t}\n\t};\n\texports.default = MissingRefError;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/compile/index.js\nvar require_compile = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.resolveSchema = exports.getCompilingSchema = exports.resolveRef = exports.compileSchema = exports.SchemaEnv = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst validation_error_1 = require_validation_error();\n\tconst names_1 = require_names();\n\tconst resolve_1 = require_resolve();\n\tconst util_1 = require_util();\n\tconst validate_1 = require_validate();\n\tvar SchemaEnv = class {\n\t\tconstructor(env) {\n\t\t\tvar _a;\n\t\t\tthis.refs = {};\n\t\t\tthis.dynamicAnchors = {};\n\t\t\tlet schema;\n\t\t\tif (typeof env.schema == \"object\") schema = env.schema;\n\t\t\tthis.schema = env.schema;\n\t\t\tthis.schemaId = env.schemaId;\n\t\t\tthis.root = env.root || this;\n\t\t\tthis.baseId = (_a = env.baseId) !== null && _a !== void 0 ? _a : (0, resolve_1.normalizeId)(schema === null || schema === void 0 ? void 0 : schema[env.schemaId || \"$id\"]);\n\t\t\tthis.schemaPath = env.schemaPath;\n\t\t\tthis.localRefs = env.localRefs;\n\t\t\tthis.meta = env.meta;\n\t\t\tthis.$async = schema === null || schema === void 0 ? void 0 : schema.$async;\n\t\t\tthis.refs = {};\n\t\t}\n\t};\n\texports.SchemaEnv = SchemaEnv;\n\tfunction compileSchema(sch) {\n\t\tconst _sch = getCompilingSchema.call(this, sch);\n\t\tif (_sch) return _sch;\n\t\tconst rootId = (0, resolve_1.getFullPath)(this.opts.uriResolver, sch.root.baseId);\n\t\tconst { es5, lines } = this.opts.code;\n\t\tconst { ownProperties } = this.opts;\n\t\tconst gen = new codegen_1.CodeGen(this.scope, {\n\t\t\tes5,\n\t\t\tlines,\n\t\t\townProperties\n\t\t});\n\t\tlet _ValidationError;\n\t\tif (sch.$async) _ValidationError = gen.scopeValue(\"Error\", {\n\t\t\tref: validation_error_1.default,\n\t\t\tcode: (0, codegen_1._)`require(\"ajv/dist/runtime/validation_error\").default`\n\t\t});\n\t\tconst validateName = gen.scopeName(\"validate\");\n\t\tsch.validateName = validateName;\n\t\tconst schemaCxt = {\n\t\t\tgen,\n\t\t\tallErrors: this.opts.allErrors,\n\t\t\tdata: names_1.default.data,\n\t\t\tparentData: names_1.default.parentData,\n\t\t\tparentDataProperty: names_1.default.parentDataProperty,\n\t\t\tdataNames: [names_1.default.data],\n\t\t\tdataPathArr: [codegen_1.nil],\n\t\t\tdataLevel: 0,\n\t\t\tdataTypes: [],\n\t\t\tdefinedProperties: /* @__PURE__ */ new Set(),\n\t\t\ttopSchemaRef: gen.scopeValue(\"schema\", this.opts.code.source === true ? {\n\t\t\t\tref: sch.schema,\n\t\t\t\tcode: (0, codegen_1.stringify)(sch.schema)\n\t\t\t} : { ref: sch.schema }),\n\t\t\tvalidateName,\n\t\t\tValidationError: _ValidationError,\n\t\t\tschema: sch.schema,\n\t\t\tschemaEnv: sch,\n\t\t\trootId,\n\t\t\tbaseId: sch.baseId || rootId,\n\t\t\tschemaPath: codegen_1.nil,\n\t\t\terrSchemaPath: sch.schemaPath || (this.opts.jtd ? \"\" : \"#\"),\n\t\t\terrorPath: (0, codegen_1._)`\"\"`,\n\t\t\topts: this.opts,\n\t\t\tself: this\n\t\t};\n\t\tlet sourceCode;\n\t\ttry {\n\t\t\tthis._compilations.add(sch);\n\t\t\t(0, validate_1.validateFunctionCode)(schemaCxt);\n\t\t\tgen.optimize(this.opts.code.optimize);\n\t\t\tconst validateCode = gen.toString();\n\t\t\tsourceCode = `${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`;\n\t\t\tif (this.opts.code.process) sourceCode = this.opts.code.process(sourceCode, sch);\n\t\t\tconst validate = new Function(`${names_1.default.self}`, `${names_1.default.scope}`, sourceCode)(this, this.scope.get());\n\t\t\tthis.scope.value(validateName, { ref: validate });\n\t\t\tvalidate.errors = null;\n\t\t\tvalidate.schema = sch.schema;\n\t\t\tvalidate.schemaEnv = sch;\n\t\t\tif (sch.$async) validate.$async = true;\n\t\t\tif (this.opts.code.source === true) validate.source = {\n\t\t\t\tvalidateName,\n\t\t\t\tvalidateCode,\n\t\t\t\tscopeValues: gen._values\n\t\t\t};\n\t\t\tif (this.opts.unevaluated) {\n\t\t\t\tconst { props, items } = schemaCxt;\n\t\t\t\tvalidate.evaluated = {\n\t\t\t\t\tprops: props instanceof codegen_1.Name ? void 0 : props,\n\t\t\t\t\titems: items instanceof codegen_1.Name ? void 0 : items,\n\t\t\t\t\tdynamicProps: props instanceof codegen_1.Name,\n\t\t\t\t\tdynamicItems: items instanceof codegen_1.Name\n\t\t\t\t};\n\t\t\t\tif (validate.source) validate.source.evaluated = (0, codegen_1.stringify)(validate.evaluated);\n\t\t\t}\n\t\t\tsch.validate = validate;\n\t\t\treturn sch;\n\t\t} catch (e) {\n\t\t\tdelete sch.validate;\n\t\t\tdelete sch.validateName;\n\t\t\tif (sourceCode) this.logger.error(\"Error compiling schema, function code:\", sourceCode);\n\t\t\tthrow e;\n\t\t} finally {\n\t\t\tthis._compilations.delete(sch);\n\t\t}\n\t}\n\texports.compileSchema = compileSchema;\n\tfunction resolveRef(root, baseId, ref) {\n\t\tvar _a;\n\t\tref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, ref);\n\t\tconst schOrFunc = root.refs[ref];\n\t\tif (schOrFunc) return schOrFunc;\n\t\tlet _sch = resolve.call(this, root, ref);\n\t\tif (_sch === void 0) {\n\t\t\tconst schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];\n\t\t\tconst { schemaId } = this.opts;\n\t\t\tif (schema) _sch = new SchemaEnv({\n\t\t\t\tschema,\n\t\t\t\tschemaId,\n\t\t\t\troot,\n\t\t\t\tbaseId\n\t\t\t});\n\t\t}\n\t\tif (_sch === void 0) return;\n\t\treturn root.refs[ref] = inlineOrCompile.call(this, _sch);\n\t}\n\texports.resolveRef = resolveRef;\n\tfunction inlineOrCompile(sch) {\n\t\tif ((0, resolve_1.inlineRef)(sch.schema, this.opts.inlineRefs)) return sch.schema;\n\t\treturn sch.validate ? sch : compileSchema.call(this, sch);\n\t}\n\tfunction getCompilingSchema(schEnv) {\n\t\tfor (const sch of this._compilations) if (sameSchemaEnv(sch, schEnv)) return sch;\n\t}\n\texports.getCompilingSchema = getCompilingSchema;\n\tfunction sameSchemaEnv(s1, s2) {\n\t\treturn s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;\n\t}\n\tfunction resolve(root, ref) {\n\t\tlet sch;\n\t\twhile (typeof (sch = this.refs[ref]) == \"string\") ref = sch;\n\t\treturn sch || this.schemas[ref] || resolveSchema.call(this, root, ref);\n\t}\n\tfunction resolveSchema(root, ref) {\n\t\tconst p = this.opts.uriResolver.parse(ref);\n\t\tconst refPath = (0, resolve_1._getFullPath)(this.opts.uriResolver, p);\n\t\tlet baseId = (0, resolve_1.getFullPath)(this.opts.uriResolver, root.baseId, void 0);\n\t\tif (Object.keys(root.schema).length > 0 && refPath === baseId) return getJsonPointer.call(this, p, root);\n\t\tconst id = (0, resolve_1.normalizeId)(refPath);\n\t\tconst schOrRef = this.refs[id] || this.schemas[id];\n\t\tif (typeof schOrRef == \"string\") {\n\t\t\tconst sch = resolveSchema.call(this, root, schOrRef);\n\t\t\tif (typeof (sch === null || sch === void 0 ? void 0 : sch.schema) !== \"object\") return;\n\t\t\treturn getJsonPointer.call(this, p, sch);\n\t\t}\n\t\tif (typeof (schOrRef === null || schOrRef === void 0 ? void 0 : schOrRef.schema) !== \"object\") return;\n\t\tif (!schOrRef.validate) compileSchema.call(this, schOrRef);\n\t\tif (id === (0, resolve_1.normalizeId)(ref)) {\n\t\t\tconst { schema } = schOrRef;\n\t\t\tconst { schemaId } = this.opts;\n\t\t\tconst schId = schema[schemaId];\n\t\t\tif (schId) baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n\t\t\treturn new SchemaEnv({\n\t\t\t\tschema,\n\t\t\t\tschemaId,\n\t\t\t\troot,\n\t\t\t\tbaseId\n\t\t\t});\n\t\t}\n\t\treturn getJsonPointer.call(this, p, schOrRef);\n\t}\n\texports.resolveSchema = resolveSchema;\n\tconst PREVENT_SCOPE_CHANGE = /* @__PURE__ */ new Set([\n\t\t\"properties\",\n\t\t\"patternProperties\",\n\t\t\"enum\",\n\t\t\"dependencies\",\n\t\t\"definitions\"\n\t]);\n\tfunction getJsonPointer(parsedRef, { baseId, schema, root }) {\n\t\tvar _a;\n\t\tif (((_a = parsedRef.fragment) === null || _a === void 0 ? void 0 : _a[0]) !== \"/\") return;\n\t\tfor (const part of parsedRef.fragment.slice(1).split(\"/\")) {\n\t\t\tif (typeof schema === \"boolean\") return;\n\t\t\tconst partSchema = schema[(0, util_1.unescapeFragment)(part)];\n\t\t\tif (partSchema === void 0) return;\n\t\t\tschema = partSchema;\n\t\t\tconst schId = typeof schema === \"object\" && schema[this.opts.schemaId];\n\t\t\tif (!PREVENT_SCOPE_CHANGE.has(part) && schId) baseId = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schId);\n\t\t}\n\t\tlet env;\n\t\tif (typeof schema != \"boolean\" && schema.$ref && !(0, util_1.schemaHasRulesButRef)(schema, this.RULES)) {\n\t\t\tconst $ref = (0, resolve_1.resolveUrl)(this.opts.uriResolver, baseId, schema.$ref);\n\t\t\tenv = resolveSchema.call(this, root, $ref);\n\t\t}\n\t\tconst { schemaId } = this.opts;\n\t\tenv = env || new SchemaEnv({\n\t\t\tschema,\n\t\t\tschemaId,\n\t\t\troot,\n\t\t\tbaseId\n\t\t});\n\t\tif (env.schema !== env.root.schema) return env;\n\t}\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/refs/data.json\nvar require_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$id\": \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\",\n\t\t\"description\": \"Meta-schema for $data reference (JSON AnySchema extension proposal)\",\n\t\t\"type\": \"object\",\n\t\t\"required\": [\"$data\"],\n\t\t\"properties\": { \"$data\": {\n\t\t\t\"type\": \"string\",\n\t\t\t\"anyOf\": [{ \"format\": \"relative-json-pointer\" }, { \"format\": \"json-pointer\" }]\n\t\t} },\n\t\t\"additionalProperties\": false\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-uri/3.1.8/31eb273a53620425b8459a1edc80e2d7abcef4fd1179aa16ecd126038265429a/node_modules/fast-uri/lib/utils.js\nvar require_utils = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\t/** @type {(value: string) => boolean} */\n\tconst isUUID = RegExp.prototype.test.bind(/^[\\da-f]{8}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{4}-[\\da-f]{12}$/iu);\n\t/** @type {(value: string) => boolean} */\n\tconst isIPv4 = RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)\\.){3}(?:25[0-5]|2[0-4]\\d|1\\d{2}|[1-9]\\d|\\d)$/u);\n\t/** @type {(value: string) => boolean} */\n\tconst isPort = RegExp.prototype.test.bind(/^\\d*$/u);\n\t/** @type {(value: string) => boolean} */\n\tconst isHexPair = RegExp.prototype.test.bind(/^[\\da-f]{2}$/iu);\n\t/** @type {(value: string) => boolean} */\n\tconst isUnreserved = RegExp.prototype.test.bind(/^[\\da-z\\-._~]$/iu);\n\t/** @type {(value: string) => boolean} */\n\tconst isPathCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\\-._~!$&'()*+,;=:@/]$/u);\n\t/** @type {(value: string) => boolean} */\n\tconst isQueryFragmentCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\\-._~!$&'()*+,;=:@/?]$/u);\n\t/** @type {(value: string) => boolean} */\n\tconst isUserinfoCharacter = RegExp.prototype.test.bind(/^[A-Za-z0-9\\-._~!$&'()*+,;=:]$/u);\n\tconst BYTE_HEX = new Array(256);\n\t{\n\t\tconst HEX_DIGITS = \"0123456789ABCDEF\";\n\t\tfor (let i = 0; i < 256; i++) BYTE_HEX[i] = \"%\" + HEX_DIGITS[i >> 4] + HEX_DIGITS[i & 15];\n\t}\n\tfunction percentEncodeNonAscii(cp) {\n\t\tif (cp < 2048) return BYTE_HEX[192 | cp >> 6] + BYTE_HEX[128 | cp & 63];\n\t\tif (cp < 65536) return BYTE_HEX[224 | cp >> 12] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];\n\t\treturn BYTE_HEX[240 | cp >> 18] + BYTE_HEX[128 | cp >> 12 & 63] + BYTE_HEX[128 | cp >> 6 & 63] + BYTE_HEX[128 | cp & 63];\n\t}\n\t/**\n\t* @param {Array<string>} input\n\t* @returns {string}\n\t*/\n\tfunction stringArrayToHexStripped(input) {\n\t\tlet acc = \"\";\n\t\tlet code = 0;\n\t\tlet i = 0;\n\t\tfor (i = 0; i < input.length; i++) {\n\t\t\tcode = input[i].charCodeAt(0);\n\t\t\tif (code === 48) continue;\n\t\t\tif (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) return \"\";\n\t\t\tacc += input[i];\n\t\t\tbreak;\n\t\t}\n\t\tfor (i += 1; i < input.length; i++) {\n\t\t\tcode = input[i].charCodeAt(0);\n\t\t\tif (!(code >= 48 && code <= 57 || code >= 65 && code <= 70 || code >= 97 && code <= 102)) return \"\";\n\t\t\tacc += input[i];\n\t\t}\n\t\treturn acc;\n\t}\n\t/** @type {(value: string) => boolean} */\n\tconst isHextet = RegExp.prototype.test.bind(/^[\\dA-Fa-f]{1,4}$/);\n\t/** @type {(value: string) => boolean} */\n\tconst isIPvFuture = RegExp.prototype.test.bind(/^[vV][\\dA-Fa-f]+\\.[A-Za-z\\d\\-._~!$&'()*+,;=:]+$/);\n\t/** @type {(value: string) => boolean} */\n\tconst isZoneCharacter = RegExp.prototype.test.bind(/^[A-Za-z\\d\\-._~]$/);\n\t/**\n\t* @param {string} value\n\t* @returns {boolean}\n\t*/\n\tconst nonSimpleDomain = RegExp.prototype.test.bind(/[^!\"$&'()*+,\\-.;=_`a-z{}~]/u);\n\t/**\n\t* @param {string} zone\n\t* @returns {boolean}\n\t*/\n\tfunction isZoneIdentifier(zone) {\n\t\tif (zone.length === 0) return false;\n\t\tfor (let i = 0; i < zone.length; i++) {\n\t\t\tif (isZoneCharacter(zone[i])) continue;\n\t\t\tif (zone[i] === \"%\" && i + 2 < zone.length && isHexPair(zone.slice(i + 1, i + 3))) {\n\t\t\t\ti += 2;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}\n\t/**\n\t* Compresses the longest run of zero hextets to \"::\" per RFC 5952. A run of a\n\t* single zero hextet is left uncompressed. On ties the leftmost run wins.\n\t*\n\t* @param {string[]} hextets\n\t* @returns {string}\n\t*/\n\tfunction compressIPv6ZeroRun(hextets) {\n\t\tlet bestStart = -1;\n\t\tlet bestLength = 0;\n\t\tlet runStart = -1;\n\t\tlet runLength = 0;\n\t\tfor (let i = 0; i < hextets.length; i++) if (hextets[i] === \"0\") {\n\t\t\tif (runStart === -1) runStart = i;\n\t\t\trunLength++;\n\t\t\tif (runLength > bestLength) {\n\t\t\t\tbestLength = runLength;\n\t\t\t\tbestStart = runStart;\n\t\t\t}\n\t\t} else {\n\t\t\trunStart = -1;\n\t\t\trunLength = 0;\n\t\t}\n\t\tif (bestLength < 2) return hextets.join(\":\");\n\t\tconst head = hextets.slice(0, bestStart).join(\":\");\n\t\tconst tail = hextets.slice(bestStart + bestLength).join(\":\");\n\t\treturn head + \"::\" + tail;\n\t}\n\t/**\n\t* Validates an IPv6 address against the alternatives in RFC 3986 section\n\t* 3.2.2 and returns the same address with leading hextet zeroes removed.\n\t* An embedded IPv4 address counts as two hextets and is only valid at the end.\n\t*\n\t* @param {string} input\n\t* @returns {string|undefined}\n\t*/\n\tfunction normalizeIPv6Address(input) {\n\t\tconst compression = input.indexOf(\"::\");\n\t\tif (compression !== -1 && input.indexOf(\"::\", compression + 1) !== -1) return void 0;\n\t\tconst left = compression === -1 ? input.split(\":\") : input.slice(0, compression).split(\":\");\n\t\tconst right = compression === -1 ? [] : input.slice(compression + 2).split(\":\");\n\t\tif (compression !== -1) {\n\t\t\tif (left.length === 1 && left[0] === \"\") left.length = 0;\n\t\t\tif (right.length === 1 && right[0] === \"\") right.length = 0;\n\t\t}\n\t\tconst parts = left.concat(right);\n\t\tlet hextetCount = 0;\n\t\tfor (let i = 0; i < parts.length; i++) {\n\t\t\tconst part = parts[i];\n\t\t\tif (part === \"\") return void 0;\n\t\t\tif (part.indexOf(\".\") !== -1) {\n\t\t\t\tif (i !== parts.length - 1 || compression !== -1 && right.length === 0 || !isIPv4(part)) return void 0;\n\t\t\t\thextetCount += 2;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (!isHextet(part)) return void 0;\n\t\t\tparts[i] = parseInt(part, 16).toString(16);\n\t\t\thextetCount++;\n\t\t}\n\t\tif (compression === -1) {\n\t\t\tif (hextetCount !== 8) return void 0;\n\t\t\treturn compressIPv6ZeroRun(parts);\n\t\t}\n\t\tif (hextetCount >= 8) return void 0;\n\t\tconst expanded = parts.slice(0, left.length);\n\t\tfor (let i = hextetCount; i < 8; i++) expanded.push(\"0\");\n\t\tfor (let i = left.length; i < parts.length; i++) expanded.push(parts[i]);\n\t\treturn compressIPv6ZeroRun(expanded);\n\t}\n\t/**\n\t* @typedef {Object} NormalizeIPv6Result\n\t* @property {string} host - The normalized host.\n\t* @property {string} [escapedHost] - The escaped host.\n\t* @property {boolean} isIPV6 - Indicates if the host is an IPv6 address.\n\t* @property {boolean} [isIPVFuture] - Indicates if the host is an IPvFuture literal.\n\t* @property {boolean} [error] - Indicates if a bracketed IP literal is malformed.\n\t*/\n\t/**\n\t* Validates and normalizes a bracketed IP literal. Raw zone separators remain\n\t* accepted for backwards compatibility, while encoded separators and zone\n\t* contents follow RFC 6874.\n\t*\n\t* @param {string} host\n\t* @returns {NormalizeIPv6Result}\n\t*/\n\tfunction normalizeIPv6(host) {\n\t\tconst bracketed = host[0] === \"[\" && host[host.length - 1] === \"]\";\n\t\tif ((host[0] === \"[\" || host[host.length - 1] === \"]\") && !bracketed) return {\n\t\t\thost,\n\t\t\tisIPV6: false,\n\t\t\terror: true\n\t\t};\n\t\tlet input = bracketed ? host.slice(1, -1) : host;\n\t\tif (bracketed && isIPvFuture(input)) {\n\t\t\tinput = input.toLowerCase();\n\t\t\treturn {\n\t\t\t\thost: `[${input}]`,\n\t\t\t\tescapedHost: input,\n\t\t\t\tisIPV6: false,\n\t\t\t\tisIPVFuture: true\n\t\t\t};\n\t\t}\n\t\tif (findToken(input, \":\") < 2) return {\n\t\t\thost,\n\t\t\tisIPV6: false,\n\t\t\terror: bracketed\n\t\t};\n\t\tlet zoneIdentifier = \"\";\n\t\tconst zoneSeparator = input.indexOf(\"%\");\n\t\tif (zoneSeparator !== -1) {\n\t\t\tconst separatorLength = input.slice(zoneSeparator, zoneSeparator + 3).toLowerCase() === \"%25\" ? 3 : 1;\n\t\t\tzoneIdentifier = input.slice(zoneSeparator + separatorLength);\n\t\t\tif (!isZoneIdentifier(zoneIdentifier)) return {\n\t\t\t\thost,\n\t\t\t\tisIPV6: false,\n\t\t\t\terror: true\n\t\t\t};\n\t\t\tinput = input.slice(0, zoneSeparator);\n\t\t}\n\t\tconst address = normalizeIPv6Address(input);\n\t\tif (address === void 0) return {\n\t\t\thost,\n\t\t\tisIPV6: false,\n\t\t\terror: true\n\t\t};\n\t\treturn {\n\t\t\thost: address + (zoneIdentifier ? \"%\" + zoneIdentifier : \"\"),\n\t\t\tescapedHost: address + (zoneIdentifier ? \"%25\" + zoneIdentifier : \"\"),\n\t\t\tisIPV6: true\n\t\t};\n\t}\n\t/**\n\t* @param {string} str\n\t* @param {string} token\n\t* @returns {number}\n\t*/\n\tfunction findToken(str, token) {\n\t\tlet ind = 0;\n\t\tfor (let i = 0; i < str.length; i++) if (str[i] === token) ind++;\n\t\treturn ind;\n\t}\n\t/**\n\t* @param {string} path\n\t* @returns {string}\n\t*\n\t* @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4\n\t*/\n\tfunction removeDotSegments(path) {\n\t\tlet input = path;\n\t\tconst output = [];\n\t\tlet nextSlash = -1;\n\t\tlet len = 0;\n\t\twhile (len = input.length) {\n\t\t\tif (len === 1) if (input === \".\") break;\n\t\t\telse if (input === \"/\") {\n\t\t\t\toutput.push(\"/\");\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\toutput.push(input);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\telse if (len === 2) {\n\t\t\t\tif (input[0] === \".\") {\n\t\t\t\t\tif (input[1] === \".\") break;\n\t\t\t\t\telse if (input[1] === \"/\") {\n\t\t\t\t\t\tinput = input.slice(2);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t} else if (input[0] === \"/\") {\n\t\t\t\t\tif (input[1] === \".\" || input[1] === \"/\") {\n\t\t\t\t\t\toutput.push(\"/\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (len === 3) {\n\t\t\t\tif (input === \"/..\") {\n\t\t\t\t\tif (output.length !== 0) output.pop();\n\t\t\t\t\toutput.push(\"/\");\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (input[0] === \".\") {\n\t\t\t\tif (input[1] === \".\") {\n\t\t\t\t\tif (input[2] === \"/\") {\n\t\t\t\t\t\tinput = input.slice(3);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t} else if (input[1] === \"/\") {\n\t\t\t\t\tinput = input.slice(2);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if (input[0] === \"/\") {\n\t\t\t\tif (input[1] === \".\") {\n\t\t\t\t\tif (input[2] === \"/\") {\n\t\t\t\t\t\tinput = input.slice(2);\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t} else if (input[2] === \".\") {\n\t\t\t\t\t\tif (input[3] === \"/\") {\n\t\t\t\t\t\t\tinput = input.slice(3);\n\t\t\t\t\t\t\tif (output.length !== 0) output.pop();\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ((nextSlash = input.indexOf(\"/\", 1)) === -1) {\n\t\t\t\toutput.push(input);\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\toutput.push(input.slice(0, nextSlash));\n\t\t\t\tinput = input.slice(nextSlash);\n\t\t\t}\n\t\t}\n\t\treturn output.join(\"\");\n\t}\n\t/**\n\t* Re-escape RFC 3986 gen-delims that must not appear literally in the host.\n\t* After the URI regex parses, these characters cannot be literal in the host\n\t* field, so any that appear after decoding came from percent-encoding and\n\t* must be restored to prevent authority structure changes.\n\t*\n\t* @param {string} host\n\t* @param {boolean} isIP - true for IPv4/IPv6 hosts (skip colon re-escaping)\n\t* @returns {string}\n\t*/\n\tconst HOST_DELIMS = {\n\t\t\"@\": \"%40\",\n\t\t\"/\": \"%2F\",\n\t\t\"?\": \"%3F\",\n\t\t\"#\": \"%23\",\n\t\t\":\": \"%3A\"\n\t};\n\tconst HOST_DELIM_RE = /[@/?#:]/g;\n\tconst HOST_DELIM_NO_COLON_RE = /[@/?#]/g;\n\tfunction reescapeHostDelimiters(host, isIP) {\n\t\tconst re = isIP ? HOST_DELIM_NO_COLON_RE : HOST_DELIM_RE;\n\t\tre.lastIndex = 0;\n\t\treturn host.replace(re, (ch) => HOST_DELIMS[ch]);\n\t}\n\t/**\n\t* Normalizes percent escapes and optionally decodes only unreserved ASCII bytes.\n\t* Reserved delimiters such as `%2F` stay escaped; `%2E` is unreserved.\n\t*\n\t* @param {string} input\n\t* @param {boolean} [decodeUnreserved=false]\n\t* @returns {string}\n\t*/\n\tfunction normalizePercentEncoding(input, decodeUnreserved = false) {\n\t\tif (input.indexOf(\"%\") === -1) return input;\n\t\tlet output = \"\";\n\t\tfor (let i = 0; i < input.length; i++) {\n\t\t\tif (input[i] === \"%\" && i + 2 < input.length) {\n\t\t\t\tconst hex = input.slice(i + 1, i + 3);\n\t\t\t\tif (isHexPair(hex)) {\n\t\t\t\t\tconst normalizedHex = hex.toUpperCase();\n\t\t\t\t\tconst decoded = String.fromCharCode(parseInt(normalizedHex, 16));\n\t\t\t\t\tif (decodeUnreserved && isUnreserved(decoded)) output += decoded;\n\t\t\t\t\telse output += \"%\" + normalizedHex;\n\t\t\t\t\ti += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput += input[i];\n\t\t}\n\t\treturn output;\n\t}\n\t/**\n\t* Normalizes path data without turning reserved escapes into live path syntax.\n\t* Valid escapes are uppercased, raw unsafe characters are escaped, and only\n\t* unreserved bytes that are not `.` are decoded.\n\t*\n\t* @param {string} input\n\t* @returns {string}\n\t*/\n\tfunction normalizePathEncoding(input) {\n\t\tlet output = \"\";\n\t\tfor (let i = 0; i < input.length; i++) {\n\t\t\tconst ch = input[i];\n\t\t\tif (ch === \"%\" && i + 2 < input.length) {\n\t\t\t\tconst hex = input.slice(i + 1, i + 3);\n\t\t\t\tif (isHexPair(hex)) {\n\t\t\t\t\tconst normalizedHex = hex.toUpperCase();\n\t\t\t\t\tconst decoded = String.fromCharCode(parseInt(normalizedHex, 16));\n\t\t\t\t\tif (decoded !== \".\" && isUnreserved(decoded)) output += decoded;\n\t\t\t\t\telse output += \"%\" + normalizedHex;\n\t\t\t\t\ti += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isPathCharacter(ch)) output += ch;\n\t\t\telse {\n\t\t\t\tconst code = input.charCodeAt(i);\n\t\t\t\tif (code < 128) output += isEscapeSafe(code) ? ch : BYTE_HEX[code];\n\t\t\t\telse if (code < 55296 || code > 57343) output += percentEncodeNonAscii(code);\n\t\t\t\telse if (code <= 56319 && i + 1 < input.length) {\n\t\t\t\t\tconst low = input.charCodeAt(i + 1);\n\t\t\t\t\tif (low >= 56320 && low <= 57343) {\n\t\t\t\t\t\toutput += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else output += percentEncodeNonAscii(65533);\n\t\t\t\t} else output += percentEncodeNonAscii(65533);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\t/**\n\t* Serializes a path without rewriting reserved data. Raw RFC 3986 path\n\t* characters remain literal, valid escapes are preserved and uppercased, and\n\t* everything else is UTF-8 percent-encoded. In a path-noscheme, a colon in the\n\t* first segment must be escaped so the result cannot be parsed as a scheme.\n\t*\n\t* @param {string} input\n\t* @param {boolean} [pathNoScheme=false]\n\t* @returns {string}\n\t*/\n\tfunction serializePathEncoding(input, pathNoScheme = false) {\n\t\tlet output = \"\";\n\t\tlet firstSegment = pathNoScheme && input[0] !== \"/\";\n\t\tfor (let i = 0; i < input.length; i++) {\n\t\t\tconst ch = input[i];\n\t\t\tif (ch === \"%\" && i + 2 < input.length) {\n\t\t\t\tconst hex = input.slice(i + 1, i + 3);\n\t\t\t\tif (isHexPair(hex)) {\n\t\t\t\t\toutput += \"%\" + hex.toUpperCase();\n\t\t\t\t\ti += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (ch === \"/\") firstSegment = false;\n\t\t\tif (isPathCharacter(ch) && (ch !== \":\" || !firstSegment)) output += ch;\n\t\t\telse {\n\t\t\t\tconst code = input.charCodeAt(i);\n\t\t\t\tif (code < 128) output += BYTE_HEX[code];\n\t\t\t\telse if (code < 55296 || code > 57343) output += percentEncodeNonAscii(code);\n\t\t\t\telse if (code <= 56319 && i + 1 < input.length) {\n\t\t\t\t\tconst low = input.charCodeAt(i + 1);\n\t\t\t\t\tif (low >= 56320 && low <= 57343) {\n\t\t\t\t\t\toutput += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else output += percentEncodeNonAscii(65533);\n\t\t\t\t} else output += percentEncodeNonAscii(65533);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\t/**\n\t* Percent-encodes a URI component using its RFC 3986 literal character set.\n\t* Existing valid escapes are preserved and normalized to uppercase hex.\n\t*\n\t* @param {string} input\n\t* @param {(value: string) => boolean} isAllowed\n\t* @returns {string}\n\t*/\n\tfunction encodeComponent(input, isAllowed) {\n\t\tlet output = \"\";\n\t\tfor (let i = 0; i < input.length; i++) {\n\t\t\tconst ch = input[i];\n\t\t\tif (ch === \"%\" && i + 2 < input.length) {\n\t\t\t\tconst hex = input.slice(i + 1, i + 3);\n\t\t\t\tif (isHexPair(hex)) {\n\t\t\t\t\toutput += \"%\" + hex.toUpperCase();\n\t\t\t\t\ti += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isAllowed(ch)) output += ch;\n\t\t\telse {\n\t\t\t\tconst code = input.charCodeAt(i);\n\t\t\t\tif (code < 128) output += BYTE_HEX[code];\n\t\t\t\telse if (code < 55296 || code > 57343) output += percentEncodeNonAscii(code);\n\t\t\t\telse if (code <= 56319 && i + 1 < input.length) {\n\t\t\t\t\tconst low = input.charCodeAt(i + 1);\n\t\t\t\t\tif (low >= 56320 && low <= 57343) {\n\t\t\t\t\t\toutput += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else output += percentEncodeNonAscii(65533);\n\t\t\t\t} else output += percentEncodeNonAscii(65533);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\t/**\n\t* Encodes userinfo while preserving its RFC 3986 §3.2.1 literal characters.\n\t* In particular, authority delimiters such as `@`, `/`, `?`, and `#` are data.\n\t*\n\t* @param {string} input\n\t* @returns {string}\n\t*/\n\tfunction encodeUserinfo(input) {\n\t\treturn encodeComponent(input, isUserinfoCharacter);\n\t}\n\t/**\n\t* Encodes query data using the RFC 3986 §3.4 grammar. A literal `#` must be\n\t* escaped because it would otherwise begin the fragment component.\n\t*\n\t* @param {string} input\n\t* @returns {string}\n\t*/\n\tfunction encodeQuery(input) {\n\t\treturn encodeComponent(input, isQueryFragmentCharacter);\n\t}\n\t/**\n\t* Encodes fragment data using the RFC 3986 §3.5 grammar.\n\t*\n\t* @param {string} input\n\t* @returns {string}\n\t*/\n\tfunction encodeFragment(input) {\n\t\treturn encodeComponent(input, isQueryFragmentCharacter);\n\t}\n\tfunction isEscapeSafe(cp) {\n\t\treturn cp >= 48 && cp <= 57 || cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122 || cp === 42 || cp === 43 || cp === 45 || cp === 46 || cp === 47 || cp === 64 || cp === 95;\n\t}\n\t/**\n\t* Normalizes the percent-encoding of a query or fragment component.\n\t*\n\t* Like `normalizePathEncoding`, but uses the query/fragment character set\n\t* (which additionally allows `?`) and decodes `.` since it has no dot-segment\n\t* meaning outside of a path.\n\t*\n\t* @param {string} input\n\t* @returns {string}\n\t*/\n\tfunction normalizeQueryFragmentEncoding(input) {\n\t\tlet output = \"\";\n\t\tfor (let i = 0; i < input.length; i++) {\n\t\t\tconst ch = input[i];\n\t\t\tif (ch === \"%\" && i + 2 < input.length) {\n\t\t\t\tconst hex = input.slice(i + 1, i + 3);\n\t\t\t\tif (isHexPair(hex)) {\n\t\t\t\t\tconst normalizedHex = hex.toUpperCase();\n\t\t\t\t\tconst decoded = String.fromCharCode(parseInt(normalizedHex, 16));\n\t\t\t\t\tif (isUnreserved(decoded)) output += decoded;\n\t\t\t\t\telse output += \"%\" + normalizedHex;\n\t\t\t\t\ti += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (isQueryFragmentCharacter(ch)) output += ch;\n\t\t\telse {\n\t\t\t\tconst code = input.charCodeAt(i);\n\t\t\t\tif (code < 128) output += isEscapeSafe(code) ? ch : BYTE_HEX[code];\n\t\t\t\telse if (code < 55296 || code > 57343) output += percentEncodeNonAscii(code);\n\t\t\t\telse if (code <= 56319 && i + 1 < input.length) {\n\t\t\t\t\tconst low = input.charCodeAt(i + 1);\n\t\t\t\t\tif (low >= 56320 && low <= 57343) {\n\t\t\t\t\t\toutput += percentEncodeNonAscii(65536 + (code - 55296 << 10) + (low - 56320));\n\t\t\t\t\t\ti++;\n\t\t\t\t\t} else output += percentEncodeNonAscii(65533);\n\t\t\t\t} else output += percentEncodeNonAscii(65533);\n\t\t\t}\n\t\t}\n\t\treturn output;\n\t}\n\t/**\n\t* Escapes a component while preserving existing valid percent escapes.\n\t*\n\t* @param {string} input\n\t* @returns {string}\n\t*/\n\tfunction escapePreservingEscapes(input) {\n\t\tlet output = \"\";\n\t\tfor (let i = 0; i < input.length; i++) {\n\t\t\tif (input[i] === \"%\" && i + 2 < input.length) {\n\t\t\t\tconst hex = input.slice(i + 1, i + 3);\n\t\t\t\tif (isHexPair(hex)) {\n\t\t\t\t\toutput += \"%\" + hex.toUpperCase();\n\t\t\t\t\ti += 2;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t\toutput += escape(input[i]);\n\t\t}\n\t\treturn output;\n\t}\n\t/**\n\t* @param {import('../types/index').URIComponent} component\n\t* @returns {string|undefined}\n\t*/\n\tfunction recomposeAuthority(component) {\n\t\tconst uriTokens = [];\n\t\tif (component.userinfo !== void 0) {\n\t\t\turiTokens.push(encodeUserinfo(component.userinfo));\n\t\t\turiTokens.push(\"@\");\n\t\t}\n\t\tif (component.host !== void 0) {\n\t\t\tlet host = component.host;\n\t\t\tif (!isIPv4(host)) {\n\t\t\t\tlet ipV6res = normalizeIPv6(host);\n\t\t\t\tif (ipV6res.isIPV6 !== true && ipV6res.isIPVFuture !== true) {\n\t\t\t\t\thost = normalizePercentEncoding(host, true);\n\t\t\t\t\tipV6res = normalizeIPv6(host);\n\t\t\t\t}\n\t\t\t\tif (ipV6res.isIPV6 === true || ipV6res.isIPVFuture === true) host = `[${ipV6res.escapedHost}]`;\n\t\t\t\telse host = reescapeHostDelimiters(host, false);\n\t\t\t}\n\t\t\turiTokens.push(host);\n\t\t}\n\t\tif (typeof component.port === \"number\" || typeof component.port === \"string\") {\n\t\t\tconst port = String(component.port);\n\t\t\tif (!isPort(port)) throw new TypeError(\"URI port is malformed.\");\n\t\t\turiTokens.push(\":\");\n\t\t\turiTokens.push(port);\n\t\t}\n\t\treturn uriTokens.length ? uriTokens.join(\"\") : void 0;\n\t}\n\tmodule.exports = {\n\t\tnonSimpleDomain,\n\t\trecomposeAuthority,\n\t\treescapeHostDelimiters,\n\t\tnormalizePercentEncoding,\n\t\tnormalizePathEncoding,\n\t\tserializePathEncoding,\n\t\tnormalizeQueryFragmentEncoding,\n\t\tencodeUserinfo,\n\t\tencodeQuery,\n\t\tencodeFragment,\n\t\tescapePreservingEscapes,\n\t\tremoveDotSegments,\n\t\tisIPv4,\n\t\tisUUID,\n\t\tnormalizeIPv6,\n\t\tstringArrayToHexStripped\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-uri/3.1.8/31eb273a53620425b8459a1edc80e2d7abcef4fd1179aa16ecd126038265429a/node_modules/fast-uri/lib/schemes.js\nvar require_schemes = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { isUUID } = require_utils();\n\tconst URN_REG = /^([\\da-z][\\d\\-a-z]{0,31}):((?:[\\w!$'()*+,\\-./:;=@]|%[\\da-f]{2})+)$/iu;\n\tconst supportedSchemeNames = [\n\t\t\"http\",\n\t\t\"https\",\n\t\t\"ws\",\n\t\t\"wss\",\n\t\t\"urn\",\n\t\t\"urn:uuid\"\n\t];\n\t/** @typedef {supportedSchemeNames[number]} SchemeName */\n\t/**\n\t* @param {string} name\n\t* @returns {name is SchemeName}\n\t*/\n\tfunction isValidSchemeName(name) {\n\t\treturn supportedSchemeNames.indexOf(name) !== -1;\n\t}\n\t/**\n\t* @callback SchemeFn\n\t* @param {import('../types/index').URIComponent} component\n\t* @param {import('../types/index').Options} options\n\t* @returns {import('../types/index').URIComponent}\n\t*/\n\t/**\n\t* @typedef {Object} SchemeHandler\n\t* @property {SchemeName} scheme - The scheme name.\n\t* @property {boolean} [domainHost] - Indicates if the scheme supports domain hosts.\n\t* @property {SchemeFn} parse - Function to parse the URI component for this scheme.\n\t* @property {SchemeFn} serialize - Function to serialize the URI component for this scheme.\n\t* @property {boolean} [skipNormalize] - Indicates if normalization should be skipped for this scheme.\n\t* @property {boolean} [absolutePath] - Indicates if the scheme uses absolute paths.\n\t* @property {boolean} [unicodeSupport] - Indicates if the scheme supports Unicode.\n\t*/\n\t/**\n\t* @param {import('../types/index').URIComponent} wsComponent\n\t* @returns {boolean}\n\t*/\n\tfunction wsIsSecure(wsComponent) {\n\t\tif (wsComponent.secure === true) return true;\n\t\telse if (wsComponent.secure === false) return false;\n\t\telse if (wsComponent.scheme) return wsComponent.scheme.length === 3 && (wsComponent.scheme[0] === \"w\" || wsComponent.scheme[0] === \"W\") && (wsComponent.scheme[1] === \"s\" || wsComponent.scheme[1] === \"S\") && (wsComponent.scheme[2] === \"s\" || wsComponent.scheme[2] === \"S\");\n\t\telse return false;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction httpParse(component) {\n\t\tif (!component.host) component.error = component.error || \"HTTP URIs must have a host.\";\n\t\treturn component;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction httpSerialize(component) {\n\t\tconst secure = String(component.scheme).toLowerCase() === \"https\";\n\t\tif (component.port === (secure ? 443 : 80) || component.port === \"\") component.port = void 0;\n\t\tif (!component.path) component.path = \"/\";\n\t\treturn component;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction wsParse(wsComponent) {\n\t\twsComponent.secure = wsIsSecure(wsComponent);\n\t\twsComponent.resourceName = (wsComponent.path || \"/\") + (wsComponent.query ? \"?\" + wsComponent.query : \"\");\n\t\twsComponent.path = void 0;\n\t\twsComponent.query = void 0;\n\t\treturn wsComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction wsSerialize(wsComponent) {\n\t\tif (wsComponent.port === (wsIsSecure(wsComponent) ? 443 : 80) || wsComponent.port === \"\") wsComponent.port = void 0;\n\t\tif (typeof wsComponent.secure === \"boolean\") {\n\t\t\twsComponent.scheme = wsComponent.secure ? \"wss\" : \"ws\";\n\t\t\twsComponent.secure = void 0;\n\t\t}\n\t\tif (wsComponent.resourceName) {\n\t\t\tconst queryIndex = wsComponent.resourceName.indexOf(\"?\");\n\t\t\tconst path = queryIndex === -1 ? wsComponent.resourceName : wsComponent.resourceName.slice(0, queryIndex);\n\t\t\twsComponent.path = path && path !== \"/\" ? path : void 0;\n\t\t\twsComponent.query = queryIndex === -1 ? void 0 : wsComponent.resourceName.slice(queryIndex + 1);\n\t\t\twsComponent.resourceName = void 0;\n\t\t}\n\t\twsComponent.fragment = void 0;\n\t\treturn wsComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction urnParse(urnComponent, options) {\n\t\tif (!urnComponent.path) {\n\t\t\turnComponent.error = \"URN can not be parsed\";\n\t\t\treturn urnComponent;\n\t\t}\n\t\tconst matches = urnComponent.path.match(URN_REG);\n\t\tif (matches && matches[0] === urnComponent.path) {\n\t\t\tconst scheme = options.scheme || urnComponent.scheme || \"urn\";\n\t\t\turnComponent.nid = matches[1].toLowerCase();\n\t\t\turnComponent.nss = matches[2];\n\t\t\tconst schemeHandler = getSchemeHandler(`${scheme}:${options.nid || urnComponent.nid}`);\n\t\t\turnComponent.path = void 0;\n\t\t\tif (schemeHandler) urnComponent = schemeHandler.parse(urnComponent, options);\n\t\t} else urnComponent.error = urnComponent.error || \"URN can not be parsed.\";\n\t\treturn urnComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction urnSerialize(urnComponent, options) {\n\t\tif (urnComponent.nid === void 0) throw new Error(\"URN without nid cannot be serialized\");\n\t\tconst scheme = options.scheme || urnComponent.scheme || \"urn\";\n\t\tconst nid = urnComponent.nid.toLowerCase();\n\t\tconst schemeHandler = getSchemeHandler(`${scheme}:${options.nid || nid}`);\n\t\tif (schemeHandler) urnComponent = schemeHandler.serialize(urnComponent, options);\n\t\tconst uriComponent = urnComponent;\n\t\tconst nss = urnComponent.nss;\n\t\turiComponent.path = `${nid || options.nid}:${nss}`;\n\t\toptions.skipEscape = true;\n\t\treturn uriComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction urnuuidParse(urnComponent, options) {\n\t\tconst uuidComponent = urnComponent;\n\t\tuuidComponent.uuid = uuidComponent.nss;\n\t\tuuidComponent.nss = void 0;\n\t\tif (!options.tolerant && (!uuidComponent.uuid || !isUUID(uuidComponent.uuid))) uuidComponent.error = uuidComponent.error || \"UUID is not valid.\";\n\t\treturn uuidComponent;\n\t}\n\t/** @type {SchemeFn} */\n\tfunction urnuuidSerialize(uuidComponent) {\n\t\tconst urnComponent = uuidComponent;\n\t\turnComponent.nss = (uuidComponent.uuid || \"\").toLowerCase();\n\t\treturn urnComponent;\n\t}\n\tconst http = {\n\t\tscheme: \"http\",\n\t\tdomainHost: true,\n\t\tparse: httpParse,\n\t\tserialize: httpSerialize\n\t};\n\tconst https = {\n\t\tscheme: \"https\",\n\t\tdomainHost: http.domainHost,\n\t\tparse: httpParse,\n\t\tserialize: httpSerialize\n\t};\n\tconst ws = {\n\t\tscheme: \"ws\",\n\t\tdomainHost: true,\n\t\tparse: wsParse,\n\t\tserialize: wsSerialize\n\t};\n\tconst SCHEMES = {\n\t\thttp,\n\t\thttps,\n\t\tws,\n\t\twss: {\n\t\t\tscheme: \"wss\",\n\t\t\tdomainHost: ws.domainHost,\n\t\t\tparse: ws.parse,\n\t\t\tserialize: ws.serialize\n\t\t},\n\t\turn: {\n\t\t\tscheme: \"urn\",\n\t\t\tparse: urnParse,\n\t\t\tserialize: urnSerialize,\n\t\t\tskipNormalize: true\n\t\t},\n\t\t\"urn:uuid\": {\n\t\t\tscheme: \"urn:uuid\",\n\t\t\tparse: urnuuidParse,\n\t\t\tserialize: urnuuidSerialize,\n\t\t\tskipNormalize: true\n\t\t}\n\t};\n\tObject.setPrototypeOf(SCHEMES, null);\n\t/**\n\t* @param {string|undefined} scheme\n\t* @returns {SchemeHandler|undefined}\n\t*/\n\tfunction getSchemeHandler(scheme) {\n\t\treturn scheme && (SCHEMES[scheme] || SCHEMES[scheme.toLowerCase()]) || void 0;\n\t}\n\tmodule.exports = {\n\t\twsIsSecure,\n\t\tSCHEMES,\n\t\tisValidSchemeName,\n\t\tgetSchemeHandler\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/fast-uri/3.1.8/31eb273a53620425b8459a1edc80e2d7abcef4fd1179aa16ecd126038265429a/node_modules/fast-uri/index.js\nvar require_fast_uri = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst { normalizeIPv6, removeDotSegments, recomposeAuthority, normalizePercentEncoding, normalizePathEncoding, serializePathEncoding, normalizeQueryFragmentEncoding, encodeQuery, encodeFragment, reescapeHostDelimiters, isIPv4, nonSimpleDomain } = require_utils();\n\tconst { SCHEMES, getSchemeHandler } = require_schemes();\n\tconst VALID_SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*$/u;\n\tconst MALFORMED_SCHEME_ERROR = \"URI scheme is malformed.\";\n\t/**\n\t* @param {string} scheme\n\t* @returns {string}\n\t*/\n\tfunction decodeValidScheme(scheme) {\n\t\tconst decodedScheme = unescape(String(scheme));\n\t\tif (!VALID_SCHEME.test(decodedScheme)) throw new TypeError(MALFORMED_SCHEME_ERROR);\n\t\treturn decodedScheme;\n\t}\n\t/**\n\t* @template {import('./types/index').URIComponent|string} T\n\t* @param {T} uri\n\t* @param {import('./types/index').Options} [options]\n\t* @returns {T}\n\t*/\n\tfunction normalize(uri, options) {\n\t\tif (typeof uri === \"string\") uri = normalizeString(uri, options);\n\t\telse if (typeof uri === \"object\") uri = parse(serialize(uri, options), options);\n\t\treturn uri;\n\t}\n\t/**\n\t* @param {string} baseURI\n\t* @param {string} relativeURI\n\t* @param {import('./types/index').Options} [options]\n\t* @returns {string}\n\t*/\n\tfunction resolve(baseURI, relativeURI, options) {\n\t\tconst schemelessOptions = options ? Object.assign({ scheme: \"null\" }, options) : { scheme: \"null\" };\n\t\tconst { parsed: baseParsed, malformedAuthorityOrPort: baseMalformed, malformedPercentEncoding: baseMalformedPercentEncoding, malformedSchemeSpecific: baseMalformedSchemeSpecific, malformedHost: baseMalformedHost, malformedScheme: baseMalformedScheme } = parseWithStatus(baseURI, schemelessOptions);\n\t\tconst { parsed: relativeParsed, malformedAuthorityOrPort: relativeMalformed, malformedPercentEncoding: relativeMalformedPercentEncoding, malformedSchemeSpecific: relativeMalformedSchemeSpecific, malformedHost: relativeMalformedHost, malformedScheme: relativeMalformedScheme } = parseWithStatus(relativeURI, schemelessOptions);\n\t\tif (baseMalformed || relativeMalformed || baseMalformedPercentEncoding || relativeMalformedPercentEncoding || baseMalformedSchemeSpecific || relativeMalformedSchemeSpecific || baseMalformedHost || relativeMalformedHost || baseMalformedScheme || relativeMalformedScheme) throw new Error(baseParsed.error || relativeParsed.error || \"URI is malformed.\");\n\t\tconst resolved = resolveComponent(baseParsed, relativeParsed, schemelessOptions, true);\n\t\tconst resolvedSchemeHandler = getSchemeHandler(options && options.scheme || resolved.scheme);\n\t\tconst resolvedHost = resolved.host;\n\t\tconst resolvedHostIsIP = resolvedHost !== void 0 && resolvedHost !== \"\" && (isIPv4(resolvedHost) || normalizeIPv6(resolvedHost).isIPV6);\n\t\tcanonicalizeHost(resolved, options || {}, resolvedSchemeHandler, resolvedHostIsIP);\n\t\tconst encodedASCIIHost = resolvedHost && resolvedHost.indexOf(\"%\") !== -1 && !/\\P{ASCII}/u.test(resolvedHost);\n\t\tif (resolved.error && !encodedASCIIHost) throw new Error(resolved.error);\n\t\tschemelessOptions.skipEscape = true;\n\t\treturn serialize(resolved, schemelessOptions);\n\t}\n\t/**\n\t* @param {import ('./types/index').URIComponent} base\n\t* @param {import ('./types/index').URIComponent} relative\n\t* @param {import('./types/index').Options} [options]\n\t* @param {boolean} [skipNormalization=false]\n\t* @returns {import ('./types/index').URIComponent}\n\t*/\n\tfunction resolveComponent(base, relative, options, skipNormalization) {\n\t\t/** @type {import('./types/index').URIComponent} */\n\t\tconst target = {};\n\t\tif (!skipNormalization) {\n\t\t\tbase = parse(serialize(base, options), options);\n\t\t\trelative = parse(serialize(relative, options), options);\n\t\t}\n\t\toptions = options || {};\n\t\tif (!options.tolerant && relative.scheme) {\n\t\t\ttarget.scheme = relative.scheme;\n\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\ttarget.host = relative.host;\n\t\t\ttarget.port = relative.port;\n\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\ttarget.query = relative.query;\n\t\t} else {\n\t\t\tif (relative.userinfo !== void 0 || relative.host !== void 0 || relative.port !== void 0) {\n\t\t\t\ttarget.userinfo = relative.userinfo;\n\t\t\t\ttarget.host = relative.host;\n\t\t\t\ttarget.port = relative.port;\n\t\t\t\ttarget.path = removeDotSegments(relative.path || \"\");\n\t\t\t\ttarget.query = relative.query;\n\t\t\t} else {\n\t\t\t\tif (!relative.path) {\n\t\t\t\t\ttarget.path = base.path;\n\t\t\t\t\tif (relative.query !== void 0) target.query = relative.query;\n\t\t\t\t\telse target.query = base.query;\n\t\t\t\t} else {\n\t\t\t\t\tif (relative.path[0] === \"/\") target.path = removeDotSegments(relative.path);\n\t\t\t\t\telse {\n\t\t\t\t\t\tif ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) target.path = \"/\" + relative.path;\n\t\t\t\t\t\telse if (!base.path) target.path = relative.path;\n\t\t\t\t\t\telse target.path = base.path.slice(0, base.path.lastIndexOf(\"/\") + 1) + relative.path;\n\t\t\t\t\t\ttarget.path = removeDotSegments(target.path);\n\t\t\t\t\t}\n\t\t\t\t\ttarget.query = relative.query;\n\t\t\t\t}\n\t\t\t\ttarget.userinfo = base.userinfo;\n\t\t\t\ttarget.host = base.host;\n\t\t\t\ttarget.port = base.port;\n\t\t\t}\n\t\t\ttarget.scheme = base.scheme;\n\t\t}\n\t\ttarget.fragment = relative.fragment;\n\t\treturn target;\n\t}\n\t/**\n\t* @param {import ('./types/index').URIComponent|string} uriA\n\t* @param {import ('./types/index').URIComponent|string} uriB\n\t* @param {import ('./types/index').Options} options\n\t* @returns {boolean}\n\t*/\n\tfunction equal(uriA, uriB, options) {\n\t\tconst normalizedA = normalizeComparableURI(uriA, options);\n\t\tconst normalizedB = normalizeComparableURI(uriB, options);\n\t\treturn normalizedA !== void 0 && normalizedB !== void 0 && normalizedA === normalizedB;\n\t}\n\t/**\n\t* @param {Readonly<import('./types/index').URIComponent>} cmpts\n\t* @param {import('./types/index').Options} [opts]\n\t* @returns {string}\n\t*/\n\tfunction serialize(cmpts, opts) {\n\t\tconst component = {\n\t\t\thost: cmpts.host,\n\t\t\tscheme: cmpts.scheme,\n\t\t\tuserinfo: cmpts.userinfo,\n\t\t\tport: cmpts.port,\n\t\t\tpath: cmpts.path,\n\t\t\tquery: cmpts.query,\n\t\t\tnid: cmpts.nid,\n\t\t\tnss: cmpts.nss,\n\t\t\tuuid: cmpts.uuid,\n\t\t\tfragment: cmpts.fragment,\n\t\t\treference: cmpts.reference,\n\t\t\tresourceName: cmpts.resourceName,\n\t\t\tsecure: cmpts.secure,\n\t\t\terror: \"\"\n\t\t};\n\t\tconst options = Object.assign({}, opts);\n\t\tconst uriTokens = [];\n\t\tif (component.scheme) component.scheme = decodeValidScheme(component.scheme);\n\t\tconst schemeHandler = getSchemeHandler(options.scheme || component.scheme);\n\t\tif (schemeHandler && schemeHandler.serialize) schemeHandler.serialize(component, options);\n\t\tconst hasAuthority = component.userinfo !== void 0 || component.host !== void 0 || component.port !== void 0;\n\t\tconst pathNoScheme = !options.skipEscape && component.scheme === void 0 && !hasAuthority;\n\t\tif (component.path !== void 0) if (!options.skipEscape) component.path = serializePathEncoding(component.path, pathNoScheme);\n\t\telse component.path = normalizePercentEncoding(component.path);\n\t\tif (options.reference !== \"suffix\" && component.scheme) {\n\t\t\tcomponent.scheme = decodeValidScheme(component.scheme);\n\t\t\turiTokens.push(component.scheme, \":\");\n\t\t}\n\t\tconst authority = recomposeAuthority(component);\n\t\tif (authority !== void 0) {\n\t\t\tif (options.reference !== \"suffix\") uriTokens.push(\"//\");\n\t\t\turiTokens.push(authority);\n\t\t\tif (component.path && component.path[0] !== \"/\") uriTokens.push(\"/\");\n\t\t}\n\t\tif (component.path !== void 0) {\n\t\t\tlet s = component.path;\n\t\t\tif (!options.absolutePath && (!schemeHandler || !schemeHandler.absolutePath)) s = removeDotSegments(s);\n\t\t\tif (pathNoScheme) s = serializePathEncoding(s, true);\n\t\t\tif (authority === void 0 && s[0] === \"/\" && s[1] === \"/\") s = \"/%2F\" + s.slice(2);\n\t\t\turiTokens.push(s);\n\t\t}\n\t\tif (component.query !== void 0) uriTokens.push(\"?\", encodeQuery(component.query));\n\t\tif (component.fragment !== void 0) uriTokens.push(\"#\", encodeFragment(component.fragment));\n\t\treturn uriTokens.join(\"\");\n\t}\n\tconst URI_PARSE = /^(?:([^#/:?]+):)?(?:\\/\\/((?:([^#/?@]*)@)?(\\[[^#/?\\]]+\\]|[^#/:?]*)(?::(\\d*))?))?([^#?]*)(?:\\?([^#]*))?(?:#((?:.|[\\n\\r])*))?/u;\n\tconst AUTHORITY_PREFIX = /^(?:[^#/:?]+:)?\\/\\/([^/?#]*)/;\n\tconst AUTHORITY_INTRODUCER_REGION = /^(?:[^#/:?]+:)?([/\\\\\\t\\n\\r]*)/;\n\t/**\n\t* @param {import('./types/index').URIComponent} parsed\n\t* @param {RegExpMatchArray} matches\n\t* @returns {string|undefined}\n\t*/\n\tfunction getParseError(parsed, matches) {\n\t\tif (matches[2] !== void 0 && parsed.path && parsed.path[0] !== \"/\") return \"URI path must start with \\\"/\\\" when authority is present.\";\n\t\tif (typeof parsed.port === \"number\" && (parsed.port < 0 || parsed.port > 65535)) return \"URI port is malformed.\";\n\t}\n\t/**\n\t* Checks percent syntax without decoding the represented octets. RFC 3986\n\t* percent-encoding is byte-oriented, so sequences such as `%FF` are valid even\n\t* though they are not independently valid UTF-8.\n\t*\n\t* @param {string|undefined} component\n\t* @returns {boolean}\n\t*/\n\tfunction hasMalformedPercentEncoding(component) {\n\t\tif (component === void 0) return false;\n\t\tlet percent = component.indexOf(\"%\");\n\t\twhile (percent !== -1) {\n\t\t\tif (percent + 2 >= component.length || !/^[\\da-f]{2}$/iu.test(component.slice(percent + 1, percent + 3))) return true;\n\t\t\tpercent = component.indexOf(\"%\", percent + 3);\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* Whether the host is a bracketed IP literal (RFC 3986 `IP-literal`).\n\t* An unterminated `[` is not a literal, so it must still be validated as a\n\t* reg-name instead of being waved through as an IP.\n\t*\n\t* @param {string} host\n\t* @returns {boolean}\n\t*/\n\tfunction isIPLiteral(host) {\n\t\treturn host[0] === \"[\" && host[host.length - 1] === \"]\";\n\t}\n\t/**\n\t* @param {RegExpMatchArray} matches\n\t* @returns {boolean}\n\t*/\n\tfunction hasMalformedComponentPercentEncoding(matches) {\n\t\tconst host = matches[4];\n\t\treturn hasMalformedPercentEncoding(matches[3]) || host !== void 0 && !isIPLiteral(host) && hasMalformedPercentEncoding(host) || hasMalformedPercentEncoding(matches[6]) || hasMalformedPercentEncoding(matches[7]) || hasMalformedPercentEncoding(matches[8]);\n\t}\n\t/**\n\t* @param {import('./types/index').URIComponent} parsed\n\t* @param {import('./types/index').Options} options\n\t* @param {{ domainHost?: boolean, unicodeSupport?: boolean }|undefined} schemeHandler\n\t* @param {boolean} isIP\n\t* @returns {boolean} whether host conversion failed\n\t*/\n\tfunction canonicalizeHost(parsed, options, schemeHandler, isIP) {\n\t\tif (!options.unicodeSupport && (!schemeHandler || !schemeHandler.unicodeSupport) && parsed.host && !isIPLiteral(parsed.host) && (options.domainHost || schemeHandler && schemeHandler.domainHost) && isIP === false && nonSimpleDomain(parsed.host)) try {\n\t\t\tparsed.host = new URL(\"http://\" + parsed.host).hostname;\n\t\t} catch (e) {\n\t\t\tparsed.error = parsed.error || \"Host's domain name can not be converted to ASCII: \" + e;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}\n\t/**\n\t* @param {string} uri\n\t* @param {import('./types/index').Options} [opts]\n\t* @returns {{ parsed: import('./types/index').URIComponent, malformedAuthorityOrPort: boolean, malformedPercentEncoding: boolean, malformedSchemeSpecific: boolean, malformedHost: boolean, malformedScheme: boolean }}\n\t*/\n\tfunction parseWithStatus(uri, opts) {\n\t\tconst options = Object.assign({}, opts);\n\t\t/** @type {import('./types/index').URIComponent} */\n\t\tconst parsed = {\n\t\t\tscheme: void 0,\n\t\t\tuserinfo: void 0,\n\t\t\thost: \"\",\n\t\t\tport: void 0,\n\t\t\tpath: \"\",\n\t\t\tquery: void 0,\n\t\t\tfragment: void 0\n\t\t};\n\t\tlet malformedAuthorityOrPort = false;\n\t\tlet malformedPercentEncoding = false;\n\t\tlet malformedSchemeSpecific = false;\n\t\tlet malformedHost = false;\n\t\tlet malformedIPLiteral = false;\n\t\tlet malformedScheme = false;\n\t\tlet isIP = false;\n\t\tif (options.reference === \"suffix\") if (options.scheme) uri = options.scheme + \":\" + uri;\n\t\telse uri = \"//\" + uri;\n\t\tconst authorityMatch = uri.match(AUTHORITY_PREFIX);\n\t\tif (authorityMatch !== null && authorityMatch[1].indexOf(\"\\\\\") !== -1) {\n\t\t\tparsed.error = \"URI authority must not contain a literal backslash.\";\n\t\t\tmalformedAuthorityOrPort = true;\n\t\t}\n\t\tconst introducerMatch = uri.match(AUTHORITY_INTRODUCER_REGION);\n\t\tif (introducerMatch !== null) {\n\t\t\tconst region = introducerMatch[1];\n\t\t\tconst normalizedRegion = region.replace(/[\\t\\n\\r]/g, \"\");\n\t\t\tif (normalizedRegion.length >= 2) {\n\t\t\t\tif (normalizedRegion.slice(0, 2) !== \"//\") {\n\t\t\t\t\tparsed.error = parsed.error || \"URI authority must not contain a literal backslash.\";\n\t\t\t\t\tmalformedAuthorityOrPort = true;\n\t\t\t\t} else if (region.length !== normalizedRegion.length) {\n\t\t\t\t\tparsed.error = parsed.error || \"URI authority introducer must not contain whitespace.\";\n\t\t\t\t\tmalformedAuthorityOrPort = true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tconst matches = uri.match(URI_PARSE);\n\t\tif (matches) {\n\t\t\tparsed.scheme = matches[1];\n\t\t\tparsed.userinfo = matches[3];\n\t\t\tparsed.host = matches[4];\n\t\t\tparsed.port = parseInt(matches[5], 10);\n\t\t\tparsed.path = matches[6] || \"\";\n\t\t\tparsed.query = matches[7];\n\t\t\tparsed.fragment = matches[8];\n\t\t\tif (parsed.scheme !== void 0) {\n\t\t\t\tconst decodedScheme = unescape(parsed.scheme);\n\t\t\t\tif (VALID_SCHEME.test(decodedScheme)) parsed.scheme = decodedScheme.toLowerCase();\n\t\t\t\telse {\n\t\t\t\t\tparsed.error = parsed.error || MALFORMED_SCHEME_ERROR;\n\t\t\t\t\tmalformedScheme = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tmalformedPercentEncoding = hasMalformedComponentPercentEncoding(matches);\n\t\t\tif (malformedPercentEncoding) parsed.error = parsed.error || \"URI contains malformed percent-encoding.\";\n\t\t\tif (isNaN(parsed.port)) parsed.port = matches[5];\n\t\t\tconst parseError = getParseError(parsed, matches);\n\t\t\tif (parseError !== void 0) {\n\t\t\t\tparsed.error = parsed.error || parseError;\n\t\t\t\tmalformedAuthorityOrPort = true;\n\t\t\t}\n\t\t\tif (parsed.host) if (isIPv4(parsed.host) === false) {\n\t\t\t\tconst bracketedIPLiteral = isIPLiteral(parsed.host);\n\t\t\t\tconst hasIPLiteralBracket = parsed.host.indexOf(\"[\") !== -1 || parsed.host.indexOf(\"]\") !== -1;\n\t\t\t\tconst ipv6result = normalizeIPv6(parsed.host);\n\t\t\t\tisIP = ipv6result.isIPV6 || ipv6result.isIPVFuture === true;\n\t\t\t\tmalformedIPLiteral = hasIPLiteralBracket && (!bracketedIPLiteral || ipv6result.error === true);\n\t\t\t\tparsed.host = isIP ? ipv6result.host : ipv6result.host.toLowerCase();\n\t\t\t\tif (malformedIPLiteral) {\n\t\t\t\t\tparsed.error = parsed.error || \"URI host is malformed.\";\n\t\t\t\t\tmalformedAuthorityOrPort = true;\n\t\t\t\t}\n\t\t\t} else isIP = true;\n\t\t\tif (parsed.scheme === void 0 && parsed.userinfo === void 0 && parsed.host === void 0 && parsed.port === void 0 && parsed.query === void 0 && !parsed.path) parsed.reference = \"same-document\";\n\t\t\telse if (parsed.scheme === void 0) parsed.reference = \"relative\";\n\t\t\telse if (parsed.fragment === void 0) parsed.reference = \"absolute\";\n\t\t\telse parsed.reference = \"uri\";\n\t\t\tif (options.reference && options.reference !== \"suffix\" && options.reference !== parsed.reference) parsed.error = parsed.error || \"URI is not a \" + options.reference + \" reference.\";\n\t\t\tconst schemeHandler = getSchemeHandler(options.scheme || parsed.scheme);\n\t\t\tif (!malformedIPLiteral) malformedHost = canonicalizeHost(parsed, options, schemeHandler, isIP);\n\t\t\tif (uri.indexOf(\"%\") !== -1 && parsed.host !== void 0 && !malformedIPLiteral) {\n\t\t\t\tlet host = isIP ? parsed.host : normalizePercentEncoding(parsed.host, true);\n\t\t\t\tif (!isIP) host = normalizePercentEncoding(host.toLowerCase());\n\t\t\t\tparsed.host = reescapeHostDelimiters(host, isIP);\n\t\t\t}\n\t\t\tif (!schemeHandler || schemeHandler && !schemeHandler.skipNormalize) {\n\t\t\t\tif (parsed.path) parsed.path = normalizePathEncoding(parsed.path);\n\t\t\t\tif (parsed.query) parsed.query = normalizeQueryFragmentEncoding(parsed.query);\n\t\t\t\tif (parsed.fragment) parsed.fragment = normalizeQueryFragmentEncoding(parsed.fragment);\n\t\t\t}\n\t\t\tif (schemeHandler && schemeHandler.parse) {\n\t\t\t\tschemeHandler.parse(parsed, options);\n\t\t\t\tif (schemeHandler === SCHEMES.urn && parsed.nid === void 0) malformedSchemeSpecific = true;\n\t\t\t}\n\t\t} else parsed.error = parsed.error || \"URI can not be parsed.\";\n\t\treturn {\n\t\t\tparsed,\n\t\t\tmalformedAuthorityOrPort,\n\t\t\tmalformedPercentEncoding,\n\t\t\tmalformedSchemeSpecific,\n\t\t\tmalformedHost,\n\t\t\tmalformedScheme\n\t\t};\n\t}\n\t/**\n\t* @param {string} uri\n\t* @param {import('./types/index').Options} [opts]\n\t* @returns\n\t*/\n\tfunction parse(uri, opts) {\n\t\treturn parseWithStatus(uri, opts).parsed;\n\t}\n\t/**\n\t* @param {string} uri\n\t* @param {import('./types/index').Options} [opts]\n\t* @returns {string}\n\t*/\n\tfunction normalizeString(uri, opts) {\n\t\treturn normalizeStringWithStatus(uri, opts).normalized;\n\t}\n\t/**\n\t* @param {string} uri\n\t* @param {import('./types/index').Options} [opts]\n\t* @returns {{ normalized: string, malformedAuthorityOrPort: boolean, malformedPercentEncoding: boolean, malformedSchemeSpecific: boolean, malformedHost: boolean, malformedScheme: boolean }}\n\t*/\n\tfunction normalizeStringWithStatus(uri, opts) {\n\t\tconst { parsed, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = parseWithStatus(uri, opts);\n\t\treturn {\n\t\t\tnormalized: malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? uri : serialize(parsed, opts),\n\t\t\tmalformedAuthorityOrPort,\n\t\t\tmalformedPercentEncoding,\n\t\t\tmalformedSchemeSpecific,\n\t\t\tmalformedHost,\n\t\t\tmalformedScheme\n\t\t};\n\t}\n\t/**\n\t* @param {import ('./types/index').URIComponent|string} uri\n\t* @param {import('./types/index').Options} [opts]\n\t* @returns {string|undefined}\n\t*/\n\tfunction normalizeComparableURI(uri, opts) {\n\t\tif (typeof uri !== \"string\" && typeof uri !== \"object\") return;\n\t\tlet value;\n\t\ttry {\n\t\t\tvalue = typeof uri === \"string\" ? uri : serialize(uri, opts);\n\t\t} catch {\n\t\t\treturn;\n\t\t}\n\t\tconst { normalized, malformedAuthorityOrPort, malformedPercentEncoding, malformedSchemeSpecific, malformedHost, malformedScheme } = normalizeStringWithStatus(value, opts);\n\t\treturn malformedAuthorityOrPort || malformedPercentEncoding || malformedSchemeSpecific || malformedHost || malformedScheme ? void 0 : normalized;\n\t}\n\tconst fastUri = {\n\t\tSCHEMES,\n\t\tnormalize,\n\t\tresolve,\n\t\tresolveComponent,\n\t\tequal,\n\t\tserialize,\n\t\tparse\n\t};\n\tmodule.exports = fastUri;\n\tmodule.exports.default = fastUri;\n\tmodule.exports.fastUri = fastUri;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/runtime/uri.js\nvar require_uri = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst uri = require_fast_uri();\n\turi.code = \"require(\\\"ajv/dist/runtime/uri\\\").default\";\n\texports.default = uri;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/core.js\nvar require_core$2 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = void 0;\n\tvar validate_1 = require_validate();\n\tObject.defineProperty(exports, \"KeywordCxt\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validate_1.KeywordCxt;\n\t\t}\n\t});\n\tvar codegen_1 = require_codegen();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.Name;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"CodeGen\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.CodeGen;\n\t\t}\n\t});\n\tconst validation_error_1 = require_validation_error();\n\tconst ref_error_1 = require_ref_error();\n\tconst rules_1 = require_rules();\n\tconst compile_1 = require_compile();\n\tconst codegen_2 = require_codegen();\n\tconst resolve_1 = require_resolve();\n\tconst dataType_1 = require_dataType();\n\tconst util_1 = require_util();\n\tconst $dataRefSchema = require_data();\n\tconst uri_1 = require_uri();\n\tconst defaultRegExp = (str, flags) => new RegExp(str, flags);\n\tdefaultRegExp.code = \"new RegExp\";\n\tconst META_IGNORE_OPTIONS = [\n\t\t\"removeAdditional\",\n\t\t\"useDefaults\",\n\t\t\"coerceTypes\"\n\t];\n\tconst EXT_SCOPE_NAMES = /* @__PURE__ */ new Set([\n\t\t\"validate\",\n\t\t\"serialize\",\n\t\t\"parse\",\n\t\t\"wrapper\",\n\t\t\"root\",\n\t\t\"schema\",\n\t\t\"keyword\",\n\t\t\"pattern\",\n\t\t\"formats\",\n\t\t\"validate$data\",\n\t\t\"func\",\n\t\t\"obj\",\n\t\t\"Error\"\n\t]);\n\tconst removedOptions = {\n\t\terrorDataPath: \"\",\n\t\tformat: \"`validateFormats: false` can be used instead.\",\n\t\tnullable: \"\\\"nullable\\\" keyword is supported by default.\",\n\t\tjsonPointers: \"Deprecated jsPropertySyntax can be used instead.\",\n\t\textendRefs: \"Deprecated ignoreKeywordsWithRef can be used instead.\",\n\t\tmissingRefs: \"Pass empty schema with $id that should be ignored to ajv.addSchema.\",\n\t\tprocessCode: \"Use option `code: {process: (code, schemaEnv: object) => string}`\",\n\t\tsourceCode: \"Use option `code: {source: true}`\",\n\t\tstrictDefaults: \"It is default now, see option `strict`.\",\n\t\tstrictKeywords: \"It is default now, see option `strict`.\",\n\t\tuniqueItems: \"\\\"uniqueItems\\\" keyword is always validated.\",\n\t\tunknownFormats: \"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).\",\n\t\tcache: \"Map is used as cache, schema object as key.\",\n\t\tserialize: \"Map is used as cache, schema object as key.\",\n\t\tajvErrors: \"It is default now.\"\n\t};\n\tconst deprecatedOptions = {\n\t\tignoreKeywordsWithRef: \"\",\n\t\tjsPropertySyntax: \"\",\n\t\tunicode: \"\\\"minLength\\\"/\\\"maxLength\\\" account for unicode characters by default.\"\n\t};\n\tconst MAX_EXPRESSION = 200;\n\tfunction requiredOptions(o) {\n\t\tvar _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0;\n\t\tconst s = o.strict;\n\t\tconst _optz = (_a = o.code) === null || _a === void 0 ? void 0 : _a.optimize;\n\t\tconst optimize = _optz === true || _optz === void 0 ? 1 : _optz || 0;\n\t\tconst regExp = (_c = (_b = o.code) === null || _b === void 0 ? void 0 : _b.regExp) !== null && _c !== void 0 ? _c : defaultRegExp;\n\t\tconst uriResolver = (_d = o.uriResolver) !== null && _d !== void 0 ? _d : uri_1.default;\n\t\treturn {\n\t\t\tstrictSchema: (_f = (_e = o.strictSchema) !== null && _e !== void 0 ? _e : s) !== null && _f !== void 0 ? _f : true,\n\t\t\tstrictNumbers: (_h = (_g = o.strictNumbers) !== null && _g !== void 0 ? _g : s) !== null && _h !== void 0 ? _h : true,\n\t\t\tstrictTypes: (_k = (_j = o.strictTypes) !== null && _j !== void 0 ? _j : s) !== null && _k !== void 0 ? _k : \"log\",\n\t\t\tstrictTuples: (_m = (_l = o.strictTuples) !== null && _l !== void 0 ? _l : s) !== null && _m !== void 0 ? _m : \"log\",\n\t\t\tstrictRequired: (_p = (_o = o.strictRequired) !== null && _o !== void 0 ? _o : s) !== null && _p !== void 0 ? _p : false,\n\t\t\tcode: o.code ? {\n\t\t\t\t...o.code,\n\t\t\t\toptimize,\n\t\t\t\tregExp\n\t\t\t} : {\n\t\t\t\toptimize,\n\t\t\t\tregExp\n\t\t\t},\n\t\t\tloopRequired: (_q = o.loopRequired) !== null && _q !== void 0 ? _q : MAX_EXPRESSION,\n\t\t\tloopEnum: (_r = o.loopEnum) !== null && _r !== void 0 ? _r : MAX_EXPRESSION,\n\t\t\tmeta: (_s = o.meta) !== null && _s !== void 0 ? _s : true,\n\t\t\tmessages: (_t = o.messages) !== null && _t !== void 0 ? _t : true,\n\t\t\tinlineRefs: (_u = o.inlineRefs) !== null && _u !== void 0 ? _u : true,\n\t\t\tschemaId: (_v = o.schemaId) !== null && _v !== void 0 ? _v : \"$id\",\n\t\t\taddUsedSchema: (_w = o.addUsedSchema) !== null && _w !== void 0 ? _w : true,\n\t\t\tvalidateSchema: (_x = o.validateSchema) !== null && _x !== void 0 ? _x : true,\n\t\t\tvalidateFormats: (_y = o.validateFormats) !== null && _y !== void 0 ? _y : true,\n\t\t\tunicodeRegExp: (_z = o.unicodeRegExp) !== null && _z !== void 0 ? _z : true,\n\t\t\tint32range: (_0 = o.int32range) !== null && _0 !== void 0 ? _0 : true,\n\t\t\turiResolver\n\t\t};\n\t}\n\tvar Ajv = class {\n\t\tconstructor(opts = {}) {\n\t\t\tthis.schemas = {};\n\t\t\tthis.refs = {};\n\t\t\tthis.formats = Object.create(null);\n\t\t\tthis._compilations = /* @__PURE__ */ new Set();\n\t\t\tthis._loading = {};\n\t\t\tthis._cache = /* @__PURE__ */ new Map();\n\t\t\topts = this.opts = {\n\t\t\t\t...opts,\n\t\t\t\t...requiredOptions(opts)\n\t\t\t};\n\t\t\tconst { es5, lines } = this.opts.code;\n\t\t\tthis.scope = new codegen_2.ValueScope({\n\t\t\t\tscope: {},\n\t\t\t\tprefixes: EXT_SCOPE_NAMES,\n\t\t\t\tes5,\n\t\t\t\tlines\n\t\t\t});\n\t\t\tthis.logger = getLogger(opts.logger);\n\t\t\tconst formatOpt = opts.validateFormats;\n\t\t\topts.validateFormats = false;\n\t\t\tthis.RULES = (0, rules_1.getRules)();\n\t\t\tcheckOptions.call(this, removedOptions, opts, \"NOT SUPPORTED\");\n\t\t\tcheckOptions.call(this, deprecatedOptions, opts, \"DEPRECATED\", \"warn\");\n\t\t\tthis._metaOpts = getMetaSchemaOptions.call(this);\n\t\t\tif (opts.formats) addInitialFormats.call(this);\n\t\t\tthis._addVocabularies();\n\t\t\tthis._addDefaultMetaSchema();\n\t\t\tif (opts.keywords) addInitialKeywords.call(this, opts.keywords);\n\t\t\tif (typeof opts.meta == \"object\") this.addMetaSchema(opts.meta);\n\t\t\taddInitialSchemas.call(this);\n\t\t\topts.validateFormats = formatOpt;\n\t\t}\n\t\t_addVocabularies() {\n\t\t\tthis.addKeyword(\"$async\");\n\t\t}\n\t\t_addDefaultMetaSchema() {\n\t\t\tconst { $data, meta, schemaId } = this.opts;\n\t\t\tlet _dataRefSchema = $dataRefSchema;\n\t\t\tif (schemaId === \"id\") {\n\t\t\t\t_dataRefSchema = { ...$dataRefSchema };\n\t\t\t\t_dataRefSchema.id = _dataRefSchema.$id;\n\t\t\t\tdelete _dataRefSchema.$id;\n\t\t\t}\n\t\t\tif (meta && $data) this.addMetaSchema(_dataRefSchema, _dataRefSchema[schemaId], false);\n\t\t}\n\t\tdefaultMeta() {\n\t\t\tconst { meta, schemaId } = this.opts;\n\t\t\treturn this.opts.defaultMeta = typeof meta == \"object\" ? meta[schemaId] || meta : void 0;\n\t\t}\n\t\tvalidate(schemaKeyRef, data) {\n\t\t\tlet v;\n\t\t\tif (typeof schemaKeyRef == \"string\") {\n\t\t\t\tv = this.getSchema(schemaKeyRef);\n\t\t\t\tif (!v) throw new Error(`no schema with key or ref \"${schemaKeyRef}\"`);\n\t\t\t} else v = this.compile(schemaKeyRef);\n\t\t\tconst valid = v(data);\n\t\t\tif (!(\"$async\" in v)) this.errors = v.errors;\n\t\t\treturn valid;\n\t\t}\n\t\tcompile(schema, _meta) {\n\t\t\tconst sch = this._addSchema(schema, _meta);\n\t\t\treturn sch.validate || this._compileSchemaEnv(sch);\n\t\t}\n\t\tcompileAsync(schema, meta) {\n\t\t\tif (typeof this.opts.loadSchema != \"function\") throw new Error(\"options.loadSchema should be a function\");\n\t\t\tconst { loadSchema } = this.opts;\n\t\t\treturn runCompileAsync.call(this, schema, meta);\n\t\t\tasync function runCompileAsync(_schema, _meta) {\n\t\t\t\tawait loadMetaSchema.call(this, _schema.$schema);\n\t\t\t\tconst sch = this._addSchema(_schema, _meta);\n\t\t\t\treturn sch.validate || _compileAsync.call(this, sch);\n\t\t\t}\n\t\t\tasync function loadMetaSchema($ref) {\n\t\t\t\tif ($ref && !this.getSchema($ref)) await runCompileAsync.call(this, { $ref }, true);\n\t\t\t}\n\t\t\tasync function _compileAsync(sch) {\n\t\t\t\ttry {\n\t\t\t\t\treturn this._compileSchemaEnv(sch);\n\t\t\t\t} catch (e) {\n\t\t\t\t\tif (!(e instanceof ref_error_1.default)) throw e;\n\t\t\t\t\tcheckLoaded.call(this, e);\n\t\t\t\t\tawait loadMissingSchema.call(this, e.missingSchema);\n\t\t\t\t\treturn _compileAsync.call(this, sch);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction checkLoaded({ missingSchema: ref, missingRef }) {\n\t\t\t\tif (this.refs[ref]) throw new Error(`AnySchema ${ref} is loaded but ${missingRef} cannot be resolved`);\n\t\t\t}\n\t\t\tasync function loadMissingSchema(ref) {\n\t\t\t\tconst _schema = await _loadSchema.call(this, ref);\n\t\t\t\tif (!this.refs[ref]) await loadMetaSchema.call(this, _schema.$schema);\n\t\t\t\tif (!this.refs[ref]) this.addSchema(_schema, ref, meta);\n\t\t\t}\n\t\t\tasync function _loadSchema(ref) {\n\t\t\t\tconst p = this._loading[ref];\n\t\t\t\tif (p) return p;\n\t\t\t\ttry {\n\t\t\t\t\treturn await (this._loading[ref] = loadSchema(ref));\n\t\t\t\t} finally {\n\t\t\t\t\tdelete this._loading[ref];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\taddSchema(schema, key, _meta, _validateSchema = this.opts.validateSchema) {\n\t\t\tif (Array.isArray(schema)) {\n\t\t\t\tfor (const sch of schema) this.addSchema(sch, void 0, _meta, _validateSchema);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tlet id;\n\t\t\tif (typeof schema === \"object\") {\n\t\t\t\tconst { schemaId } = this.opts;\n\t\t\t\tid = schema[schemaId];\n\t\t\t\tif (id !== void 0 && typeof id != \"string\") throw new Error(`schema ${schemaId} must be string`);\n\t\t\t}\n\t\t\tkey = (0, resolve_1.normalizeId)(key || id);\n\t\t\tthis._checkUnique(key);\n\t\t\tthis.schemas[key] = this._addSchema(schema, _meta, key, _validateSchema, true);\n\t\t\treturn this;\n\t\t}\n\t\taddMetaSchema(schema, key, _validateSchema = this.opts.validateSchema) {\n\t\t\tthis.addSchema(schema, key, true, _validateSchema);\n\t\t\treturn this;\n\t\t}\n\t\tvalidateSchema(schema, throwOrLogError) {\n\t\t\tif (typeof schema == \"boolean\") return true;\n\t\t\tlet $schema;\n\t\t\t$schema = schema.$schema;\n\t\t\tif ($schema !== void 0 && typeof $schema != \"string\") throw new Error(\"$schema must be a string\");\n\t\t\t$schema = $schema || this.opts.defaultMeta || this.defaultMeta();\n\t\t\tif (!$schema) {\n\t\t\t\tthis.logger.warn(\"meta-schema not available\");\n\t\t\t\tthis.errors = null;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tconst valid = this.validate($schema, schema);\n\t\t\tif (!valid && throwOrLogError) {\n\t\t\t\tconst message = \"schema is invalid: \" + this.errorsText();\n\t\t\t\tif (this.opts.validateSchema === \"log\") this.logger.error(message);\n\t\t\t\telse throw new Error(message);\n\t\t\t}\n\t\t\treturn valid;\n\t\t}\n\t\tgetSchema(keyRef) {\n\t\t\tlet sch;\n\t\t\twhile (typeof (sch = getSchEnv.call(this, keyRef)) == \"string\") keyRef = sch;\n\t\t\tif (sch === void 0) {\n\t\t\t\tconst { schemaId } = this.opts;\n\t\t\t\tconst root = new compile_1.SchemaEnv({\n\t\t\t\t\tschema: {},\n\t\t\t\t\tschemaId\n\t\t\t\t});\n\t\t\t\tsch = compile_1.resolveSchema.call(this, root, keyRef);\n\t\t\t\tif (!sch) return;\n\t\t\t\tthis.refs[keyRef] = sch;\n\t\t\t}\n\t\t\treturn sch.validate || this._compileSchemaEnv(sch);\n\t\t}\n\t\tremoveSchema(schemaKeyRef) {\n\t\t\tif (schemaKeyRef instanceof RegExp) {\n\t\t\t\tthis._removeAllSchemas(this.schemas, schemaKeyRef);\n\t\t\t\tthis._removeAllSchemas(this.refs, schemaKeyRef);\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tswitch (typeof schemaKeyRef) {\n\t\t\t\tcase \"undefined\":\n\t\t\t\t\tthis._removeAllSchemas(this.schemas);\n\t\t\t\t\tthis._removeAllSchemas(this.refs);\n\t\t\t\t\tthis._cache.clear();\n\t\t\t\t\treturn this;\n\t\t\t\tcase \"string\": {\n\t\t\t\t\tconst sch = getSchEnv.call(this, schemaKeyRef);\n\t\t\t\t\tif (typeof sch == \"object\") this._cache.delete(sch.schema);\n\t\t\t\t\tdelete this.schemas[schemaKeyRef];\n\t\t\t\t\tdelete this.refs[schemaKeyRef];\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tcase \"object\": {\n\t\t\t\t\tconst cacheKey = schemaKeyRef;\n\t\t\t\t\tthis._cache.delete(cacheKey);\n\t\t\t\t\tlet id = schemaKeyRef[this.opts.schemaId];\n\t\t\t\t\tif (id) {\n\t\t\t\t\t\tid = (0, resolve_1.normalizeId)(id);\n\t\t\t\t\t\tdelete this.schemas[id];\n\t\t\t\t\t\tdelete this.refs[id];\n\t\t\t\t\t}\n\t\t\t\t\treturn this;\n\t\t\t\t}\n\t\t\t\tdefault: throw new Error(\"ajv.removeSchema: invalid parameter\");\n\t\t\t}\n\t\t}\n\t\taddVocabulary(definitions) {\n\t\t\tfor (const def of definitions) this.addKeyword(def);\n\t\t\treturn this;\n\t\t}\n\t\taddKeyword(kwdOrDef, def) {\n\t\t\tlet keyword;\n\t\t\tif (typeof kwdOrDef == \"string\") {\n\t\t\t\tkeyword = kwdOrDef;\n\t\t\t\tif (typeof def == \"object\") {\n\t\t\t\t\tthis.logger.warn(\"these parameters are deprecated, see docs for addKeyword\");\n\t\t\t\t\tdef.keyword = keyword;\n\t\t\t\t}\n\t\t\t} else if (typeof kwdOrDef == \"object\" && def === void 0) {\n\t\t\t\tdef = kwdOrDef;\n\t\t\t\tkeyword = def.keyword;\n\t\t\t\tif (Array.isArray(keyword) && !keyword.length) throw new Error(\"addKeywords: keyword must be string or non-empty array\");\n\t\t\t} else throw new Error(\"invalid addKeywords parameters\");\n\t\t\tcheckKeyword.call(this, keyword, def);\n\t\t\tif (!def) {\n\t\t\t\t(0, util_1.eachItem)(keyword, (kwd) => addRule.call(this, kwd));\n\t\t\t\treturn this;\n\t\t\t}\n\t\t\tkeywordMetaschema.call(this, def);\n\t\t\tconst definition = {\n\t\t\t\t...def,\n\t\t\t\ttype: (0, dataType_1.getJSONTypes)(def.type),\n\t\t\t\tschemaType: (0, dataType_1.getJSONTypes)(def.schemaType)\n\t\t\t};\n\t\t\t(0, util_1.eachItem)(keyword, definition.type.length === 0 ? (k) => addRule.call(this, k, definition) : (k) => definition.type.forEach((t) => addRule.call(this, k, definition, t)));\n\t\t\treturn this;\n\t\t}\n\t\tgetKeyword(keyword) {\n\t\t\tconst rule = this.RULES.all[keyword];\n\t\t\treturn typeof rule == \"object\" ? rule.definition : !!rule;\n\t\t}\n\t\tremoveKeyword(keyword) {\n\t\t\tconst { RULES } = this;\n\t\t\tdelete RULES.keywords[keyword];\n\t\t\tdelete RULES.all[keyword];\n\t\t\tfor (const group of RULES.rules) {\n\t\t\t\tconst i = group.rules.findIndex((rule) => rule.keyword === keyword);\n\t\t\t\tif (i >= 0) group.rules.splice(i, 1);\n\t\t\t}\n\t\t\treturn this;\n\t\t}\n\t\taddFormat(name, format) {\n\t\t\tif (typeof format == \"string\") format = new RegExp(format);\n\t\t\tthis.formats[name] = format;\n\t\t\treturn this;\n\t\t}\n\t\terrorsText(errors = this.errors, { separator = \", \", dataVar = \"data\" } = {}) {\n\t\t\tif (!errors || errors.length === 0) return \"No errors\";\n\t\t\treturn errors.map((e) => `${dataVar}${e.instancePath} ${e.message}`).reduce((text, msg) => text + separator + msg);\n\t\t}\n\t\t$dataMetaSchema(metaSchema, keywordsJsonPointers) {\n\t\t\tconst rules = this.RULES.all;\n\t\t\tmetaSchema = JSON.parse(JSON.stringify(metaSchema));\n\t\t\tfor (const jsonPointer of keywordsJsonPointers) {\n\t\t\t\tconst segments = jsonPointer.split(\"/\").slice(1);\n\t\t\t\tlet keywords = metaSchema;\n\t\t\t\tfor (const seg of segments) keywords = keywords[seg];\n\t\t\t\tfor (const key in rules) {\n\t\t\t\t\tconst rule = rules[key];\n\t\t\t\t\tif (typeof rule != \"object\") continue;\n\t\t\t\t\tconst { $data } = rule.definition;\n\t\t\t\t\tconst schema = keywords[key];\n\t\t\t\t\tif ($data && schema) keywords[key] = schemaOrData(schema);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn metaSchema;\n\t\t}\n\t\t_removeAllSchemas(schemas, regex) {\n\t\t\tfor (const keyRef in schemas) {\n\t\t\t\tconst sch = schemas[keyRef];\n\t\t\t\tif (!regex || regex.test(keyRef)) {\n\t\t\t\t\tif (typeof sch == \"string\") delete schemas[keyRef];\n\t\t\t\t\telse if (sch && !sch.meta) {\n\t\t\t\t\t\tthis._cache.delete(sch.schema);\n\t\t\t\t\t\tdelete schemas[keyRef];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t_addSchema(schema, meta, baseId, validateSchema = this.opts.validateSchema, addSchema = this.opts.addUsedSchema) {\n\t\t\tlet id;\n\t\t\tconst { schemaId } = this.opts;\n\t\t\tif (typeof schema == \"object\") id = schema[schemaId];\n\t\t\telse if (this.opts.jtd) throw new Error(\"schema must be object\");\n\t\t\telse if (typeof schema != \"boolean\") throw new Error(\"schema must be object or boolean\");\n\t\t\tlet sch = this._cache.get(schema);\n\t\t\tif (sch !== void 0) return sch;\n\t\t\tbaseId = (0, resolve_1.normalizeId)(id || baseId);\n\t\t\tconst localRefs = resolve_1.getSchemaRefs.call(this, schema, baseId);\n\t\t\tsch = new compile_1.SchemaEnv({\n\t\t\t\tschema,\n\t\t\t\tschemaId,\n\t\t\t\tmeta,\n\t\t\t\tbaseId,\n\t\t\t\tlocalRefs\n\t\t\t});\n\t\t\tthis._cache.set(sch.schema, sch);\n\t\t\tif (addSchema && !baseId.startsWith(\"#\")) {\n\t\t\t\tif (baseId) this._checkUnique(baseId);\n\t\t\t\tthis.refs[baseId] = sch;\n\t\t\t}\n\t\t\tif (validateSchema) this.validateSchema(schema, true);\n\t\t\treturn sch;\n\t\t}\n\t\t_checkUnique(id) {\n\t\t\tif (this.schemas[id] || this.refs[id]) throw new Error(`schema with key or id \"${id}\" already exists`);\n\t\t}\n\t\t_compileSchemaEnv(sch) {\n\t\t\tif (sch.meta) this._compileMetaSchema(sch);\n\t\t\telse compile_1.compileSchema.call(this, sch);\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!sch.validate) throw new Error(\"ajv implementation error\");\n\t\t\treturn sch.validate;\n\t\t}\n\t\t_compileMetaSchema(sch) {\n\t\t\tconst currentOpts = this.opts;\n\t\t\tthis.opts = this._metaOpts;\n\t\t\ttry {\n\t\t\t\tcompile_1.compileSchema.call(this, sch);\n\t\t\t} finally {\n\t\t\t\tthis.opts = currentOpts;\n\t\t\t}\n\t\t}\n\t};\n\tAjv.ValidationError = validation_error_1.default;\n\tAjv.MissingRefError = ref_error_1.default;\n\texports.default = Ajv;\n\tfunction checkOptions(checkOpts, options, msg, log = \"error\") {\n\t\tfor (const key in checkOpts) {\n\t\t\tconst opt = key;\n\t\t\tif (opt in options) this.logger[log](`${msg}: option ${key}. ${checkOpts[opt]}`);\n\t\t}\n\t}\n\tfunction getSchEnv(keyRef) {\n\t\tkeyRef = (0, resolve_1.normalizeId)(keyRef);\n\t\treturn this.schemas[keyRef] || this.refs[keyRef];\n\t}\n\tfunction addInitialSchemas() {\n\t\tconst optsSchemas = this.opts.schemas;\n\t\tif (!optsSchemas) return;\n\t\tif (Array.isArray(optsSchemas)) this.addSchema(optsSchemas);\n\t\telse for (const key in optsSchemas) this.addSchema(optsSchemas[key], key);\n\t}\n\tfunction addInitialFormats() {\n\t\tfor (const name in this.opts.formats) {\n\t\t\tconst format = this.opts.formats[name];\n\t\t\tif (format) this.addFormat(name, format);\n\t\t}\n\t}\n\tfunction addInitialKeywords(defs) {\n\t\tif (Array.isArray(defs)) {\n\t\t\tthis.addVocabulary(defs);\n\t\t\treturn;\n\t\t}\n\t\tthis.logger.warn(\"keywords option as map is deprecated, pass array\");\n\t\tfor (const keyword in defs) {\n\t\t\tconst def = defs[keyword];\n\t\t\tif (!def.keyword) def.keyword = keyword;\n\t\t\tthis.addKeyword(def);\n\t\t}\n\t}\n\tfunction getMetaSchemaOptions() {\n\t\tconst metaOpts = { ...this.opts };\n\t\tfor (const opt of META_IGNORE_OPTIONS) delete metaOpts[opt];\n\t\treturn metaOpts;\n\t}\n\tconst noLogs = {\n\t\tlog() {},\n\t\twarn() {},\n\t\terror() {}\n\t};\n\tfunction getLogger(logger) {\n\t\tif (logger === false) return noLogs;\n\t\tif (logger === void 0) return console;\n\t\tif (logger.log && logger.warn && logger.error) return logger;\n\t\tthrow new Error(\"logger must implement log, warn and error methods\");\n\t}\n\tconst KEYWORD_NAME = /^[a-z_$][a-z0-9_$:-]*$/i;\n\tfunction checkKeyword(keyword, def) {\n\t\tconst { RULES } = this;\n\t\t(0, util_1.eachItem)(keyword, (kwd) => {\n\t\t\tif (RULES.keywords[kwd]) throw new Error(`Keyword ${kwd} is already defined`);\n\t\t\tif (!KEYWORD_NAME.test(kwd)) throw new Error(`Keyword ${kwd} has invalid name`);\n\t\t});\n\t\tif (!def) return;\n\t\tif (def.$data && !(\"code\" in def || \"validate\" in def)) throw new Error(\"$data keyword must have \\\"code\\\" or \\\"validate\\\" function\");\n\t}\n\tfunction addRule(keyword, definition, dataType) {\n\t\tvar _a;\n\t\tconst post = definition === null || definition === void 0 ? void 0 : definition.post;\n\t\tif (dataType && post) throw new Error(\"keyword with \\\"post\\\" flag cannot have \\\"type\\\"\");\n\t\tconst { RULES } = this;\n\t\tlet ruleGroup = post ? RULES.post : RULES.rules.find(({ type: t }) => t === dataType);\n\t\tif (!ruleGroup) {\n\t\t\truleGroup = {\n\t\t\t\ttype: dataType,\n\t\t\t\trules: []\n\t\t\t};\n\t\t\tRULES.rules.push(ruleGroup);\n\t\t}\n\t\tRULES.keywords[keyword] = true;\n\t\tif (!definition) return;\n\t\tconst rule = {\n\t\t\tkeyword,\n\t\t\tdefinition: {\n\t\t\t\t...definition,\n\t\t\t\ttype: (0, dataType_1.getJSONTypes)(definition.type),\n\t\t\t\tschemaType: (0, dataType_1.getJSONTypes)(definition.schemaType)\n\t\t\t}\n\t\t};\n\t\tif (definition.before) addBeforeRule.call(this, ruleGroup, rule, definition.before);\n\t\telse ruleGroup.rules.push(rule);\n\t\tRULES.all[keyword] = rule;\n\t\t(_a = definition.implements) === null || _a === void 0 || _a.forEach((kwd) => this.addKeyword(kwd));\n\t}\n\tfunction addBeforeRule(ruleGroup, rule, before) {\n\t\tconst i = ruleGroup.rules.findIndex((_rule) => _rule.keyword === before);\n\t\tif (i >= 0) ruleGroup.rules.splice(i, 0, rule);\n\t\telse {\n\t\t\truleGroup.rules.push(rule);\n\t\t\tthis.logger.warn(`rule ${before} is not defined`);\n\t\t}\n\t}\n\tfunction keywordMetaschema(def) {\n\t\tlet { metaSchema } = def;\n\t\tif (metaSchema === void 0) return;\n\t\tif (def.$data && this.opts.$data) metaSchema = schemaOrData(metaSchema);\n\t\tdef.validateSchema = this.compile(metaSchema, true);\n\t}\n\tconst $dataRef = { $ref: \"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#\" };\n\tfunction schemaOrData(schema) {\n\t\treturn { anyOf: [schema, $dataRef] };\n\t}\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/core/id.js\nvar require_id = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = {\n\t\tkeyword: \"id\",\n\t\tcode() {\n\t\t\tthrow new Error(\"NOT SUPPORTED: keyword \\\"id\\\", use \\\"$id\\\" for schema ID\");\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/core/ref.js\nvar require_ref = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.callRef = exports.getValidate = void 0;\n\tconst ref_error_1 = require_ref_error();\n\tconst code_1 = require_code();\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst compile_1 = require_compile();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"$ref\",\n\t\tschemaType: \"string\",\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema: $ref, it } = cxt;\n\t\t\tconst { baseId, schemaEnv: env, validateName, opts, self } = it;\n\t\t\tconst { root } = env;\n\t\t\tif (($ref === \"#\" || $ref === \"#/\") && baseId === root.baseId) return callRootRef();\n\t\t\tconst schOrEnv = compile_1.resolveRef.call(self, root, baseId, $ref);\n\t\t\tif (schOrEnv === void 0) throw new ref_error_1.default(it.opts.uriResolver, baseId, $ref);\n\t\t\tif (schOrEnv instanceof compile_1.SchemaEnv) return callValidate(schOrEnv);\n\t\t\treturn inlineRefSchema(schOrEnv);\n\t\t\tfunction callRootRef() {\n\t\t\t\tif (env === root) return callRef(cxt, validateName, env, env.$async);\n\t\t\t\tconst rootName = gen.scopeValue(\"root\", { ref: root });\n\t\t\t\treturn callRef(cxt, (0, codegen_1._)`${rootName}.validate`, root, root.$async);\n\t\t\t}\n\t\t\tfunction callValidate(sch) {\n\t\t\t\tcallRef(cxt, getValidate(cxt, sch), sch, sch.$async);\n\t\t\t}\n\t\t\tfunction inlineRefSchema(sch) {\n\t\t\t\tconst schName = gen.scopeValue(\"schema\", opts.code.source === true ? {\n\t\t\t\t\tref: sch,\n\t\t\t\t\tcode: (0, codegen_1.stringify)(sch)\n\t\t\t\t} : { ref: sch });\n\t\t\t\tconst valid = gen.name(\"valid\");\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tschema: sch,\n\t\t\t\t\tdataTypes: [],\n\t\t\t\t\tschemaPath: codegen_1.nil,\n\t\t\t\t\ttopSchemaRef: schName,\n\t\t\t\t\terrSchemaPath: $ref\n\t\t\t\t}, valid);\n\t\t\t\tcxt.mergeEvaluated(schCxt);\n\t\t\t\tcxt.ok(valid);\n\t\t\t}\n\t\t}\n\t};\n\tfunction getValidate(cxt, sch) {\n\t\tconst { gen } = cxt;\n\t\treturn sch.validate ? gen.scopeValue(\"validate\", { ref: sch.validate }) : (0, codegen_1._)`${gen.scopeValue(\"wrapper\", { ref: sch })}.validate`;\n\t}\n\texports.getValidate = getValidate;\n\tfunction callRef(cxt, v, sch, $async) {\n\t\tconst { gen, it } = cxt;\n\t\tconst { allErrors, schemaEnv: env, opts } = it;\n\t\tconst passCxt = opts.passContext ? names_1.default.this : codegen_1.nil;\n\t\tif ($async) callAsyncRef();\n\t\telse callSyncRef();\n\t\tfunction callAsyncRef() {\n\t\t\tif (!env.$async) throw new Error(\"async schema referenced by sync schema\");\n\t\t\tconst valid = gen.let(\"valid\");\n\t\t\tgen.try(() => {\n\t\t\t\tgen.code((0, codegen_1._)`await ${(0, code_1.callValidateCode)(cxt, v, passCxt)}`);\n\t\t\t\taddEvaluatedFrom(v);\n\t\t\t\tif (!allErrors) gen.assign(valid, true);\n\t\t\t}, (e) => {\n\t\t\t\tgen.if((0, codegen_1._)`!(${e} instanceof ${it.ValidationError})`, () => gen.throw(e));\n\t\t\t\taddErrorsFrom(e);\n\t\t\t\tif (!allErrors) gen.assign(valid, false);\n\t\t\t});\n\t\t\tcxt.ok(valid);\n\t\t}\n\t\tfunction callSyncRef() {\n\t\t\tcxt.result((0, code_1.callValidateCode)(cxt, v, passCxt), () => addEvaluatedFrom(v), () => addErrorsFrom(v));\n\t\t}\n\t\tfunction addErrorsFrom(source) {\n\t\t\tconst errs = (0, codegen_1._)`${source}.errors`;\n\t\t\tgen.assign(names_1.default.vErrors, (0, codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`);\n\t\t\tgen.assign(names_1.default.errors, (0, codegen_1._)`${names_1.default.vErrors}.length`);\n\t\t}\n\t\tfunction addEvaluatedFrom(source) {\n\t\t\tvar _a;\n\t\t\tif (!it.opts.unevaluated) return;\n\t\t\tconst schEvaluated = (_a = sch === null || sch === void 0 ? void 0 : sch.validate) === null || _a === void 0 ? void 0 : _a.evaluated;\n\t\t\tif (it.props !== true) if (schEvaluated && !schEvaluated.dynamicProps) {\n\t\t\t\tif (schEvaluated.props !== void 0) it.props = util_1.mergeEvaluated.props(gen, schEvaluated.props, it.props);\n\t\t\t} else {\n\t\t\t\tconst props = gen.var(\"props\", (0, codegen_1._)`${source}.evaluated.props`);\n\t\t\t\tit.props = util_1.mergeEvaluated.props(gen, props, it.props, codegen_1.Name);\n\t\t\t}\n\t\t\tif (it.items !== true) if (schEvaluated && !schEvaluated.dynamicItems) {\n\t\t\t\tif (schEvaluated.items !== void 0) it.items = util_1.mergeEvaluated.items(gen, schEvaluated.items, it.items);\n\t\t\t} else {\n\t\t\t\tconst items = gen.var(\"items\", (0, codegen_1._)`${source}.evaluated.items`);\n\t\t\t\tit.items = util_1.mergeEvaluated.items(gen, items, it.items, codegen_1.Name);\n\t\t\t}\n\t\t}\n\t}\n\texports.callRef = callRef;\n\texports.default = def;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/core/index.js\nvar require_core$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst id_1 = require_id();\n\tconst ref_1 = require_ref();\n\texports.default = [\n\t\t\"$schema\",\n\t\t\"$id\",\n\t\t\"$defs\",\n\t\t\"$vocabulary\",\n\t\t{ keyword: \"$comment\" },\n\t\t\"definitions\",\n\t\tid_1.default,\n\t\tref_1.default\n\t];\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/limitNumber.js\nvar require_limitNumber = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst ops = codegen_1.operators;\n\tconst KWDs = {\n\t\tmaximum: {\n\t\t\tokStr: \"<=\",\n\t\t\tok: ops.LTE,\n\t\t\tfail: ops.GT\n\t\t},\n\t\tminimum: {\n\t\t\tokStr: \">=\",\n\t\t\tok: ops.GTE,\n\t\t\tfail: ops.LT\n\t\t},\n\t\texclusiveMaximum: {\n\t\t\tokStr: \"<\",\n\t\t\tok: ops.LT,\n\t\t\tfail: ops.GTE\n\t\t},\n\t\texclusiveMinimum: {\n\t\t\tokStr: \">\",\n\t\t\tok: ops.GT,\n\t\t\tfail: ops.LTE\n\t\t}\n\t};\n\texports.default = {\n\t\tkeyword: Object.keys(KWDs),\n\t\ttype: \"number\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ keyword, schemaCode }) => (0, codegen_1.str)`must be ${KWDs[keyword].okStr} ${schemaCode}`,\n\t\t\tparams: ({ keyword, schemaCode }) => (0, codegen_1._)`{comparison: ${KWDs[keyword].okStr}, limit: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { keyword, data, schemaCode } = cxt;\n\t\t\tcxt.fail$data((0, codegen_1._)`${data} ${KWDs[keyword].fail} ${schemaCode} || isNaN(${data})`);\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/multipleOf.js\nvar require_multipleOf = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\texports.default = {\n\t\tkeyword: \"multipleOf\",\n\t\ttype: \"number\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ schemaCode }) => (0, codegen_1.str)`must be multiple of ${schemaCode}`,\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{multipleOf: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, schemaCode, it } = cxt;\n\t\t\tconst prec = it.opts.multipleOfPrecision;\n\t\t\tconst res = gen.let(\"res\");\n\t\t\tconst invalid = prec ? (0, codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}` : (0, codegen_1._)`${res} !== parseInt(${res})`;\n\t\t\tcxt.fail$data((0, codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid}))`);\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/runtime/ucs2length.js\nvar require_ucs2length = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tfunction ucs2length(str) {\n\t\tconst len = str.length;\n\t\tlet length = 0;\n\t\tlet pos = 0;\n\t\tlet value;\n\t\twhile (pos < len) {\n\t\t\tlength++;\n\t\t\tvalue = str.charCodeAt(pos++);\n\t\t\tif (value >= 55296 && value <= 56319 && pos < len) {\n\t\t\t\tvalue = str.charCodeAt(pos);\n\t\t\t\tif ((value & 64512) === 56320) pos++;\n\t\t\t}\n\t\t}\n\t\treturn length;\n\t}\n\texports.default = ucs2length;\n\tucs2length.code = \"require(\\\"ajv/dist/runtime/ucs2length\\\").default\";\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/limitLength.js\nvar require_limitLength = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst ucs2length_1 = require_ucs2length();\n\texports.default = {\n\t\tkeyword: [\"maxLength\", \"minLength\"],\n\t\ttype: \"string\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage({ keyword, schemaCode }) {\n\t\t\t\tconst comp = keyword === \"maxLength\" ? \"more\" : \"fewer\";\n\t\t\t\treturn (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`;\n\t\t\t},\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { keyword, data, schemaCode, it } = cxt;\n\t\t\tconst op = keyword === \"maxLength\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n\t\t\tconst len = it.opts.unicode === false ? (0, codegen_1._)`${data}.length` : (0, codegen_1._)`${(0, util_1.useFunc)(cxt.gen, ucs2length_1.default)}(${data})`;\n\t\t\tcxt.fail$data((0, codegen_1._)`${len} ${op} ${schemaCode}`);\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/pattern.js\nvar require_pattern = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst code_1 = require_code();\n\tconst util_1 = require_util();\n\tconst codegen_1 = require_codegen();\n\texports.default = {\n\t\tkeyword: \"pattern\",\n\t\ttype: \"string\",\n\t\tschemaType: \"string\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ schemaCode }) => (0, codegen_1.str)`must match pattern \"${schemaCode}\"`,\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{pattern: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, $data, schema, schemaCode, it } = cxt;\n\t\t\tconst u = it.opts.unicodeRegExp ? \"u\" : \"\";\n\t\t\tif ($data) {\n\t\t\t\tconst { regExp } = it.opts.code;\n\t\t\t\tconst regExpCode = regExp.code === \"new RegExp\" ? (0, codegen_1._)`new RegExp` : (0, util_1.useFunc)(gen, regExp);\n\t\t\t\tconst valid = gen.let(\"valid\");\n\t\t\t\tgen.try(() => gen.assign(valid, (0, codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`), () => gen.assign(valid, false));\n\t\t\t\tcxt.fail$data((0, codegen_1._)`!${valid}`);\n\t\t\t} else {\n\t\t\t\tconst regExp = (0, code_1.usePattern)(cxt, schema);\n\t\t\t\tcxt.fail$data((0, codegen_1._)`!${regExp}.test(${data})`);\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/limitProperties.js\nvar require_limitProperties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\texports.default = {\n\t\tkeyword: [\"maxProperties\", \"minProperties\"],\n\t\ttype: \"object\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage({ keyword, schemaCode }) {\n\t\t\t\tconst comp = keyword === \"maxProperties\" ? \"more\" : \"fewer\";\n\t\t\t\treturn (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`;\n\t\t\t},\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { keyword, data, schemaCode } = cxt;\n\t\t\tconst op = keyword === \"maxProperties\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n\t\t\tcxt.fail$data((0, codegen_1._)`Object.keys(${data}).length ${op} ${schemaCode}`);\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/required.js\nvar require_required = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst code_1 = require_code();\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\texports.default = {\n\t\tkeyword: \"required\",\n\t\ttype: \"object\",\n\t\tschemaType: \"array\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ params: { missingProperty } }) => (0, codegen_1.str)`must have required property '${missingProperty}'`,\n\t\t\tparams: ({ params: { missingProperty } }) => (0, codegen_1._)`{missingProperty: ${missingProperty}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, schemaCode, data, $data, it } = cxt;\n\t\t\tconst { opts } = it;\n\t\t\tif (!$data && schema.length === 0) return;\n\t\t\tconst useLoop = schema.length >= opts.loopRequired;\n\t\t\tif (it.allErrors) allErrorsMode();\n\t\t\telse exitOnErrorMode();\n\t\t\tif (opts.strictRequired) {\n\t\t\t\tconst props = cxt.parentSchema.properties;\n\t\t\t\tconst { definedProperties } = cxt.it;\n\t\t\t\tfor (const requiredKey of schema) if ((props === null || props === void 0 ? void 0 : props[requiredKey]) === void 0 && !definedProperties.has(requiredKey)) {\n\t\t\t\t\tconst msg = `required property \"${requiredKey}\" is not defined at \"${it.schemaEnv.baseId + it.errSchemaPath}\" (strictRequired)`;\n\t\t\t\t\t(0, util_1.checkStrictMode)(it, msg, it.opts.strictRequired);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction allErrorsMode() {\n\t\t\t\tif (useLoop || $data) cxt.block$data(codegen_1.nil, loopAllRequired);\n\t\t\t\telse for (const prop of schema) (0, code_1.checkReportMissingProp)(cxt, prop);\n\t\t\t}\n\t\t\tfunction exitOnErrorMode() {\n\t\t\t\tconst missing = gen.let(\"missing\");\n\t\t\t\tif (useLoop || $data) {\n\t\t\t\t\tconst valid = gen.let(\"valid\", true);\n\t\t\t\t\tcxt.block$data(valid, () => loopUntilMissing(missing, valid));\n\t\t\t\t\tcxt.ok(valid);\n\t\t\t\t} else {\n\t\t\t\t\tgen.if((0, code_1.checkMissingProp)(cxt, schema, missing));\n\t\t\t\t\t(0, code_1.reportMissingProp)(cxt, missing);\n\t\t\t\t\tgen.else();\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction loopAllRequired() {\n\t\t\t\tgen.forOf(\"prop\", schemaCode, (prop) => {\n\t\t\t\t\tcxt.setParams({ missingProperty: prop });\n\t\t\t\t\tgen.if((0, code_1.noPropertyInData)(gen, data, prop, opts.ownProperties), () => cxt.error());\n\t\t\t\t});\n\t\t\t}\n\t\t\tfunction loopUntilMissing(missing, valid) {\n\t\t\t\tcxt.setParams({ missingProperty: missing });\n\t\t\t\tgen.forOf(missing, schemaCode, () => {\n\t\t\t\t\tgen.assign(valid, (0, code_1.propertyInData)(gen, data, missing, opts.ownProperties));\n\t\t\t\t\tgen.if((0, codegen_1.not)(valid), () => {\n\t\t\t\t\t\tcxt.error();\n\t\t\t\t\t\tgen.break();\n\t\t\t\t\t});\n\t\t\t\t}, codegen_1.nil);\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/limitItems.js\nvar require_limitItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\texports.default = {\n\t\tkeyword: [\"maxItems\", \"minItems\"],\n\t\ttype: \"array\",\n\t\tschemaType: \"number\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage({ keyword, schemaCode }) {\n\t\t\t\tconst comp = keyword === \"maxItems\" ? \"more\" : \"fewer\";\n\t\t\t\treturn (0, codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`;\n\t\t\t},\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{limit: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { keyword, data, schemaCode } = cxt;\n\t\t\tconst op = keyword === \"maxItems\" ? codegen_1.operators.GT : codegen_1.operators.LT;\n\t\t\tcxt.fail$data((0, codegen_1._)`${data}.length ${op} ${schemaCode}`);\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/runtime/equal.js\nvar require_equal = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst equal = require_fast_deep_equal();\n\tequal.code = \"require(\\\"ajv/dist/runtime/equal\\\").default\";\n\texports.default = equal;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/uniqueItems.js\nvar require_uniqueItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dataType_1 = require_dataType();\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst equal_1 = require_equal();\n\texports.default = {\n\t\tkeyword: \"uniqueItems\",\n\t\ttype: \"array\",\n\t\tschemaType: \"boolean\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ params: { i, j } }) => (0, codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,\n\t\t\tparams: ({ params: { i, j } }) => (0, codegen_1._)`{i: ${i}, j: ${j}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, $data, schema, parentSchema, schemaCode, it } = cxt;\n\t\t\tif (!$data && !schema) return;\n\t\t\tconst valid = gen.let(\"valid\");\n\t\t\tconst itemTypes = parentSchema.items ? (0, dataType_1.getSchemaTypes)(parentSchema.items) : [];\n\t\t\tcxt.block$data(valid, validateUniqueItems, (0, codegen_1._)`${schemaCode} === false`);\n\t\t\tcxt.ok(valid);\n\t\t\tfunction validateUniqueItems() {\n\t\t\t\tconst i = gen.let(\"i\", (0, codegen_1._)`${data}.length`);\n\t\t\t\tconst j = gen.let(\"j\");\n\t\t\t\tcxt.setParams({\n\t\t\t\t\ti,\n\t\t\t\t\tj\n\t\t\t\t});\n\t\t\t\tgen.assign(valid, true);\n\t\t\t\tgen.if((0, codegen_1._)`${i} > 1`, () => (canOptimize() ? loopN : loopN2)(i, j));\n\t\t\t}\n\t\t\tfunction canOptimize() {\n\t\t\t\treturn itemTypes.length > 0 && !itemTypes.some((t) => t === \"object\" || t === \"array\");\n\t\t\t}\n\t\t\tfunction loopN(i, j) {\n\t\t\t\tconst item = gen.name(\"item\");\n\t\t\t\tconst wrongType = (0, dataType_1.checkDataTypes)(itemTypes, item, it.opts.strictNumbers, dataType_1.DataType.Wrong);\n\t\t\t\tconst indices = gen.const(\"indices\", (0, codegen_1._)`{}`);\n\t\t\t\tgen.for((0, codegen_1._)`;${i}--;`, () => {\n\t\t\t\t\tgen.let(item, (0, codegen_1._)`${data}[${i}]`);\n\t\t\t\t\tgen.if(wrongType, (0, codegen_1._)`continue`);\n\t\t\t\t\tif (itemTypes.length > 1) gen.if((0, codegen_1._)`typeof ${item} == \"string\"`, (0, codegen_1._)`${item} += \"_\"`);\n\t\t\t\t\tgen.if((0, codegen_1._)`typeof ${indices}[${item}] == \"number\"`, () => {\n\t\t\t\t\t\tgen.assign(j, (0, codegen_1._)`${indices}[${item}]`);\n\t\t\t\t\t\tcxt.error();\n\t\t\t\t\t\tgen.assign(valid, false).break();\n\t\t\t\t\t}).code((0, codegen_1._)`${indices}[${item}] = ${i}`);\n\t\t\t\t});\n\t\t\t}\n\t\t\tfunction loopN2(i, j) {\n\t\t\t\tconst eql = (0, util_1.useFunc)(gen, equal_1.default);\n\t\t\t\tconst outer = gen.name(\"outer\");\n\t\t\t\tgen.label(outer).for((0, codegen_1._)`;${i}--;`, () => gen.for((0, codegen_1._)`${j} = ${i}; ${j}--;`, () => gen.if((0, codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`, () => {\n\t\t\t\t\tcxt.error();\n\t\t\t\t\tgen.assign(valid, false).break(outer);\n\t\t\t\t})));\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/const.js\nvar require_const = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst equal_1 = require_equal();\n\texports.default = {\n\t\tkeyword: \"const\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: \"must be equal to constant\",\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{allowedValue: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, $data, schemaCode, schema } = cxt;\n\t\t\tif ($data || schema && typeof schema == \"object\") cxt.fail$data((0, codegen_1._)`!${(0, util_1.useFunc)(gen, equal_1.default)}(${data}, ${schemaCode})`);\n\t\t\telse cxt.fail((0, codegen_1._)`${schema} !== ${data}`);\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/enum.js\nvar require_enum = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst equal_1 = require_equal();\n\texports.default = {\n\t\tkeyword: \"enum\",\n\t\tschemaType: \"array\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: \"must be equal to one of the allowed values\",\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{allowedValues: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, $data, schema, schemaCode, it } = cxt;\n\t\t\tif (!$data && schema.length === 0) throw new Error(\"enum must have non-empty array\");\n\t\t\tconst useLoop = schema.length >= it.opts.loopEnum;\n\t\t\tlet eql;\n\t\t\tconst getEql = () => eql !== null && eql !== void 0 ? eql : eql = (0, util_1.useFunc)(gen, equal_1.default);\n\t\t\tlet valid;\n\t\t\tif (useLoop || $data) {\n\t\t\t\tvalid = gen.let(\"valid\");\n\t\t\t\tcxt.block$data(valid, loopEnum);\n\t\t\t} else {\n\t\t\t\t/* istanbul ignore if */\n\t\t\t\tif (!Array.isArray(schema)) throw new Error(\"ajv implementation error\");\n\t\t\t\tconst vSchema = gen.const(\"vSchema\", schemaCode);\n\t\t\t\tvalid = (0, codegen_1.or)(...schema.map((_x, i) => equalCode(vSchema, i)));\n\t\t\t}\n\t\t\tcxt.pass(valid);\n\t\t\tfunction loopEnum() {\n\t\t\t\tgen.assign(valid, false);\n\t\t\t\tgen.forOf(\"v\", schemaCode, (v) => gen.if((0, codegen_1._)`${getEql()}(${data}, ${v})`, () => gen.assign(valid, true).break()));\n\t\t\t}\n\t\t\tfunction equalCode(vSchema, i) {\n\t\t\t\tconst sch = schema[i];\n\t\t\t\treturn typeof sch === \"object\" && sch !== null ? (0, codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])` : (0, codegen_1._)`${data} === ${sch}`;\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/index.js\nvar require_validation$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst limitNumber_1 = require_limitNumber();\n\tconst multipleOf_1 = require_multipleOf();\n\tconst limitLength_1 = require_limitLength();\n\tconst pattern_1 = require_pattern();\n\tconst limitProperties_1 = require_limitProperties();\n\tconst required_1 = require_required();\n\tconst limitItems_1 = require_limitItems();\n\tconst uniqueItems_1 = require_uniqueItems();\n\tconst const_1 = require_const();\n\tconst enum_1 = require_enum();\n\texports.default = [\n\t\tlimitNumber_1.default,\n\t\tmultipleOf_1.default,\n\t\tlimitLength_1.default,\n\t\tpattern_1.default,\n\t\tlimitProperties_1.default,\n\t\trequired_1.default,\n\t\tlimitItems_1.default,\n\t\tuniqueItems_1.default,\n\t\t{\n\t\t\tkeyword: \"type\",\n\t\t\tschemaType: [\"string\", \"array\"]\n\t\t},\n\t\t{\n\t\t\tkeyword: \"nullable\",\n\t\t\tschemaType: \"boolean\"\n\t\t},\n\t\tconst_1.default,\n\t\tenum_1.default\n\t];\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/additionalItems.js\nvar require_additionalItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateAdditionalItems = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"additionalItems\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"boolean\", \"object\"],\n\t\tbefore: \"uniqueItems\",\n\t\terror: {\n\t\t\tmessage: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,\n\t\t\tparams: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { parentSchema, it } = cxt;\n\t\t\tconst { items } = parentSchema;\n\t\t\tif (!Array.isArray(items)) {\n\t\t\t\t(0, util_1.checkStrictMode)(it, \"\\\"additionalItems\\\" is ignored when \\\"items\\\" is not an array of schemas\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tvalidateAdditionalItems(cxt, items);\n\t\t}\n\t};\n\tfunction validateAdditionalItems(cxt, items) {\n\t\tconst { gen, schema, data, keyword, it } = cxt;\n\t\tit.items = true;\n\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\tif (schema === false) {\n\t\t\tcxt.setParams({ len: items.length });\n\t\t\tcxt.pass((0, codegen_1._)`${len} <= ${items.length}`);\n\t\t} else if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\tconst valid = gen.var(\"valid\", (0, codegen_1._)`${len} <= ${items.length}`);\n\t\t\tgen.if((0, codegen_1.not)(valid), () => validateItems(valid));\n\t\t\tcxt.ok(valid);\n\t\t}\n\t\tfunction validateItems(valid) {\n\t\t\tgen.forRange(\"i\", items.length, len, (i) => {\n\t\t\t\tcxt.subschema({\n\t\t\t\t\tkeyword,\n\t\t\t\t\tdataProp: i,\n\t\t\t\t\tdataPropType: util_1.Type.Num\n\t\t\t\t}, valid);\n\t\t\t\tif (!it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t});\n\t\t}\n\t}\n\texports.validateAdditionalItems = validateAdditionalItems;\n\texports.default = def;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/items.js\nvar require_items = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateTuple = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst code_1 = require_code();\n\tconst def = {\n\t\tkeyword: \"items\",\n\t\ttype: \"array\",\n\t\tschemaType: [\n\t\t\t\"object\",\n\t\t\t\"array\",\n\t\t\t\"boolean\"\n\t\t],\n\t\tbefore: \"uniqueItems\",\n\t\tcode(cxt) {\n\t\t\tconst { schema, it } = cxt;\n\t\t\tif (Array.isArray(schema)) return validateTuple(cxt, \"additionalItems\", schema);\n\t\t\tit.items = true;\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) return;\n\t\t\tcxt.ok((0, code_1.validateArray)(cxt));\n\t\t}\n\t};\n\tfunction validateTuple(cxt, extraItems, schArr = cxt.schema) {\n\t\tconst { gen, parentSchema, data, keyword, it } = cxt;\n\t\tcheckStrictTuple(parentSchema);\n\t\tif (it.opts.unevaluated && schArr.length && it.items !== true) it.items = util_1.mergeEvaluated.items(gen, schArr.length, it.items);\n\t\tconst valid = gen.name(\"valid\");\n\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\tschArr.forEach((sch, i) => {\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, sch)) return;\n\t\t\tgen.if((0, codegen_1._)`${len} > ${i}`, () => cxt.subschema({\n\t\t\t\tkeyword,\n\t\t\t\tschemaProp: i,\n\t\t\t\tdataProp: i\n\t\t\t}, valid));\n\t\t\tcxt.ok(valid);\n\t\t});\n\t\tfunction checkStrictTuple(sch) {\n\t\t\tconst { opts, errSchemaPath } = it;\n\t\t\tconst l = schArr.length;\n\t\t\tconst fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);\n\t\t\tif (opts.strictTuples && !fullTuple) {\n\t\t\t\tconst msg = `\"${keyword}\" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path \"${errSchemaPath}\"`;\n\t\t\t\t(0, util_1.checkStrictMode)(it, msg, opts.strictTuples);\n\t\t\t}\n\t\t}\n\t}\n\texports.validateTuple = validateTuple;\n\texports.default = def;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/prefixItems.js\nvar require_prefixItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst items_1 = require_items();\n\texports.default = {\n\t\tkeyword: \"prefixItems\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"array\"],\n\t\tbefore: \"uniqueItems\",\n\t\tcode: (cxt) => (0, items_1.validateTuple)(cxt, \"items\")\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/items2020.js\nvar require_items2020 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst code_1 = require_code();\n\tconst additionalItems_1 = require_additionalItems();\n\texports.default = {\n\t\tkeyword: \"items\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\tbefore: \"uniqueItems\",\n\t\terror: {\n\t\t\tmessage: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,\n\t\t\tparams: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { schema, parentSchema, it } = cxt;\n\t\t\tconst { prefixItems } = parentSchema;\n\t\t\tit.items = true;\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) return;\n\t\t\tif (prefixItems) (0, additionalItems_1.validateAdditionalItems)(cxt, prefixItems);\n\t\t\telse cxt.ok((0, code_1.validateArray)(cxt));\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/contains.js\nvar require_contains = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\texports.default = {\n\t\tkeyword: \"contains\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\tbefore: \"uniqueItems\",\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1.str)`must contain at least ${min} valid item(s)` : (0, codegen_1.str)`must contain at least ${min} and no more than ${max} valid item(s)`,\n\t\t\tparams: ({ params: { min, max } }) => max === void 0 ? (0, codegen_1._)`{minContains: ${min}}` : (0, codegen_1._)`{minContains: ${min}, maxContains: ${max}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, parentSchema, data, it } = cxt;\n\t\t\tlet min;\n\t\t\tlet max;\n\t\t\tconst { minContains, maxContains } = parentSchema;\n\t\t\tif (it.opts.next) {\n\t\t\t\tmin = minContains === void 0 ? 1 : minContains;\n\t\t\t\tmax = maxContains;\n\t\t\t} else min = 1;\n\t\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\t\tcxt.setParams({\n\t\t\t\tmin,\n\t\t\t\tmax\n\t\t\t});\n\t\t\tif (max === void 0 && min === 0) {\n\t\t\t\t(0, util_1.checkStrictMode)(it, `\"minContains\" == 0 without \"maxContains\": \"contains\" keyword ignored`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (max !== void 0 && min > max) {\n\t\t\t\t(0, util_1.checkStrictMode)(it, `\"minContains\" > \"maxContains\" is always invalid`);\n\t\t\t\tcxt.fail();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\tlet cond = (0, codegen_1._)`${len} >= ${min}`;\n\t\t\t\tif (max !== void 0) cond = (0, codegen_1._)`${cond} && ${len} <= ${max}`;\n\t\t\t\tcxt.pass(cond);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tit.items = true;\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tif (max === void 0 && min === 1) validateItems(valid, () => gen.if(valid, () => gen.break()));\n\t\t\telse if (min === 0) {\n\t\t\t\tgen.let(valid, true);\n\t\t\t\tif (max !== void 0) gen.if((0, codegen_1._)`${data}.length > 0`, validateItemsWithCount);\n\t\t\t} else {\n\t\t\t\tgen.let(valid, false);\n\t\t\t\tvalidateItemsWithCount();\n\t\t\t}\n\t\t\tcxt.result(valid, () => cxt.reset());\n\t\t\tfunction validateItemsWithCount() {\n\t\t\t\tconst schValid = gen.name(\"_valid\");\n\t\t\t\tconst count = gen.let(\"count\", 0);\n\t\t\t\tvalidateItems(schValid, () => gen.if(schValid, () => checkLimits(count)));\n\t\t\t}\n\t\t\tfunction validateItems(_valid, block) {\n\t\t\t\tgen.forRange(\"i\", 0, len, (i) => {\n\t\t\t\t\tcxt.subschema({\n\t\t\t\t\t\tkeyword: \"contains\",\n\t\t\t\t\t\tdataProp: i,\n\t\t\t\t\t\tdataPropType: util_1.Type.Num,\n\t\t\t\t\t\tcompositeRule: true\n\t\t\t\t\t}, _valid);\n\t\t\t\t\tblock();\n\t\t\t\t});\n\t\t\t}\n\t\t\tfunction checkLimits(count) {\n\t\t\t\tgen.code((0, codegen_1._)`${count}++`);\n\t\t\t\tif (max === void 0) gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true).break());\n\t\t\t\telse {\n\t\t\t\t\tgen.if((0, codegen_1._)`${count} > ${max}`, () => gen.assign(valid, false).break());\n\t\t\t\t\tif (min === 1) gen.assign(valid, true);\n\t\t\t\t\telse gen.if((0, codegen_1._)`${count} >= ${min}`, () => gen.assign(valid, true));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/dependencies.js\nvar require_dependencies = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.validateSchemaDeps = exports.validatePropertyDeps = exports.error = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst code_1 = require_code();\n\texports.error = {\n\t\tmessage: ({ params: { property, depsCount, deps } }) => {\n\t\t\tconst property_ies = depsCount === 1 ? \"property\" : \"properties\";\n\t\t\treturn (0, codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`;\n\t\t},\n\t\tparams: ({ params: { property, depsCount, deps, missingProperty } }) => (0, codegen_1._)`{property: ${property},\n    missingProperty: ${missingProperty},\n    depsCount: ${depsCount},\n    deps: ${deps}}`\n\t};\n\tconst def = {\n\t\tkeyword: \"dependencies\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\terror: exports.error,\n\t\tcode(cxt) {\n\t\t\tconst [propDeps, schDeps] = splitDependencies(cxt);\n\t\t\tvalidatePropertyDeps(cxt, propDeps);\n\t\t\tvalidateSchemaDeps(cxt, schDeps);\n\t\t}\n\t};\n\tfunction splitDependencies({ schema }) {\n\t\tconst propertyDeps = {};\n\t\tconst schemaDeps = {};\n\t\tfor (const key in schema) {\n\t\t\tif (key === \"__proto__\") continue;\n\t\t\tconst deps = Array.isArray(schema[key]) ? propertyDeps : schemaDeps;\n\t\t\tdeps[key] = schema[key];\n\t\t}\n\t\treturn [propertyDeps, schemaDeps];\n\t}\n\tfunction validatePropertyDeps(cxt, propertyDeps = cxt.schema) {\n\t\tconst { gen, data, it } = cxt;\n\t\tif (Object.keys(propertyDeps).length === 0) return;\n\t\tconst missing = gen.let(\"missing\");\n\t\tfor (const prop in propertyDeps) {\n\t\t\tconst deps = propertyDeps[prop];\n\t\t\tif (deps.length === 0) continue;\n\t\t\tconst hasProperty = (0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties);\n\t\t\tcxt.setParams({\n\t\t\t\tproperty: prop,\n\t\t\t\tdepsCount: deps.length,\n\t\t\t\tdeps: deps.join(\", \")\n\t\t\t});\n\t\t\tif (it.allErrors) gen.if(hasProperty, () => {\n\t\t\t\tfor (const depProp of deps) (0, code_1.checkReportMissingProp)(cxt, depProp);\n\t\t\t});\n\t\t\telse {\n\t\t\t\tgen.if((0, codegen_1._)`${hasProperty} && (${(0, code_1.checkMissingProp)(cxt, deps, missing)})`);\n\t\t\t\t(0, code_1.reportMissingProp)(cxt, missing);\n\t\t\t\tgen.else();\n\t\t\t}\n\t\t}\n\t}\n\texports.validatePropertyDeps = validatePropertyDeps;\n\tfunction validateSchemaDeps(cxt, schemaDeps = cxt.schema) {\n\t\tconst { gen, data, keyword, it } = cxt;\n\t\tconst valid = gen.name(\"valid\");\n\t\tfor (const prop in schemaDeps) {\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schemaDeps[prop])) continue;\n\t\t\tgen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties), () => {\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tkeyword,\n\t\t\t\t\tschemaProp: prop\n\t\t\t\t}, valid);\n\t\t\t\tcxt.mergeValidEvaluated(schCxt, valid);\n\t\t\t}, () => gen.var(valid, true));\n\t\t\tcxt.ok(valid);\n\t\t}\n\t}\n\texports.validateSchemaDeps = validateSchemaDeps;\n\texports.default = def;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/propertyNames.js\nvar require_propertyNames = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\texports.default = {\n\t\tkeyword: \"propertyNames\",\n\t\ttype: \"object\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\terror: {\n\t\t\tmessage: \"property name must be valid\",\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{propertyName: ${params.propertyName}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, data, it } = cxt;\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) return;\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tgen.forIn(\"key\", data, (key) => {\n\t\t\t\tcxt.setParams({ propertyName: key });\n\t\t\t\tcxt.subschema({\n\t\t\t\t\tkeyword: \"propertyNames\",\n\t\t\t\t\tdata: key,\n\t\t\t\t\tdataTypes: [\"string\"],\n\t\t\t\t\tpropertyName: key,\n\t\t\t\t\tcompositeRule: true\n\t\t\t\t}, valid);\n\t\t\t\tgen.if((0, codegen_1.not)(valid), () => {\n\t\t\t\t\tcxt.error(true);\n\t\t\t\t\tif (!it.allErrors) gen.break();\n\t\t\t\t});\n\t\t\t});\n\t\t\tcxt.ok(valid);\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/additionalProperties.js\nvar require_additionalProperties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst code_1 = require_code();\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst util_1 = require_util();\n\texports.default = {\n\t\tkeyword: \"additionalProperties\",\n\t\ttype: [\"object\"],\n\t\tschemaType: [\"boolean\", \"object\"],\n\t\tallowUndefined: true,\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: \"must NOT have additional properties\",\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{additionalProperty: ${params.additionalProperty}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, parentSchema, data, errsCount, it } = cxt;\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!errsCount) throw new Error(\"ajv implementation error\");\n\t\t\tconst { allErrors, opts } = it;\n\t\t\tit.props = true;\n\t\t\tif (opts.removeAdditional !== \"all\" && (0, util_1.alwaysValidSchema)(it, schema)) return;\n\t\t\tconst props = (0, code_1.allSchemaProperties)(parentSchema.properties);\n\t\t\tconst patProps = (0, code_1.allSchemaProperties)(parentSchema.patternProperties);\n\t\t\tcheckAdditionalProperties();\n\t\t\tcxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);\n\t\t\tfunction checkAdditionalProperties() {\n\t\t\t\tgen.forIn(\"key\", data, (key) => {\n\t\t\t\t\tif (!props.length && !patProps.length) additionalPropertyCode(key);\n\t\t\t\t\telse gen.if(isAdditional(key), () => additionalPropertyCode(key));\n\t\t\t\t});\n\t\t\t}\n\t\t\tfunction isAdditional(key) {\n\t\t\t\tlet definedProp;\n\t\t\t\tif (props.length > 8) {\n\t\t\t\t\tconst propsSchema = (0, util_1.schemaRefOrVal)(it, parentSchema.properties, \"properties\");\n\t\t\t\t\tdefinedProp = (0, code_1.isOwnProperty)(gen, propsSchema, key);\n\t\t\t\t} else if (props.length) definedProp = (0, codegen_1.or)(...props.map((p) => (0, codegen_1._)`${key} === ${p}`));\n\t\t\t\telse definedProp = codegen_1.nil;\n\t\t\t\tif (patProps.length) definedProp = (0, codegen_1.or)(definedProp, ...patProps.map((p) => (0, codegen_1._)`${(0, code_1.usePattern)(cxt, p)}.test(${key})`));\n\t\t\t\treturn (0, codegen_1.not)(definedProp);\n\t\t\t}\n\t\t\tfunction deleteAdditional(key) {\n\t\t\t\tgen.code((0, codegen_1._)`delete ${data}[${key}]`);\n\t\t\t}\n\t\t\tfunction additionalPropertyCode(key) {\n\t\t\t\tif (opts.removeAdditional === \"all\" || opts.removeAdditional && schema === false) {\n\t\t\t\t\tdeleteAdditional(key);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (schema === false) {\n\t\t\t\t\tcxt.setParams({ additionalProperty: key });\n\t\t\t\t\tcxt.error();\n\t\t\t\t\tif (!allErrors) gen.break();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\t\tconst valid = gen.name(\"valid\");\n\t\t\t\t\tif (opts.removeAdditional === \"failing\") {\n\t\t\t\t\t\tapplyAdditionalSchema(key, valid, false);\n\t\t\t\t\t\tgen.if((0, codegen_1.not)(valid), () => {\n\t\t\t\t\t\t\tcxt.reset();\n\t\t\t\t\t\t\tdeleteAdditional(key);\n\t\t\t\t\t\t});\n\t\t\t\t\t} else {\n\t\t\t\t\t\tapplyAdditionalSchema(key, valid);\n\t\t\t\t\t\tif (!allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction applyAdditionalSchema(key, valid, errors) {\n\t\t\t\tconst subschema = {\n\t\t\t\t\tkeyword: \"additionalProperties\",\n\t\t\t\t\tdataProp: key,\n\t\t\t\t\tdataPropType: util_1.Type.Str\n\t\t\t\t};\n\t\t\t\tif (errors === false) Object.assign(subschema, {\n\t\t\t\t\tcompositeRule: true,\n\t\t\t\t\tcreateErrors: false,\n\t\t\t\t\tallErrors: false\n\t\t\t\t});\n\t\t\t\tcxt.subschema(subschema, valid);\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/properties.js\nvar require_properties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst validate_1 = require_validate();\n\tconst code_1 = require_code();\n\tconst util_1 = require_util();\n\tconst additionalProperties_1 = require_additionalProperties();\n\texports.default = {\n\t\tkeyword: \"properties\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, parentSchema, data, it } = cxt;\n\t\t\tif (it.opts.removeAdditional === \"all\" && parentSchema.additionalProperties === void 0) additionalProperties_1.default.code(new validate_1.KeywordCxt(it, additionalProperties_1.default, \"additionalProperties\"));\n\t\t\tconst allProps = (0, code_1.allSchemaProperties)(schema);\n\t\t\tfor (const prop of allProps) it.definedProperties.add(prop);\n\t\t\tif (it.opts.unevaluated && allProps.length && it.props !== true) it.props = util_1.mergeEvaluated.props(gen, (0, util_1.toHash)(allProps), it.props);\n\t\t\tconst properties = allProps.filter((p) => !(0, util_1.alwaysValidSchema)(it, schema[p]));\n\t\t\tif (properties.length === 0) return;\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tfor (const prop of properties) {\n\t\t\t\tif (hasDefault(prop)) applyPropertySchema(prop);\n\t\t\t\telse {\n\t\t\t\t\tgen.if((0, code_1.propertyInData)(gen, data, prop, it.opts.ownProperties));\n\t\t\t\t\tapplyPropertySchema(prop);\n\t\t\t\t\tif (!it.allErrors) gen.else().var(valid, true);\n\t\t\t\t\tgen.endIf();\n\t\t\t\t}\n\t\t\t\tcxt.it.definedProperties.add(prop);\n\t\t\t\tcxt.ok(valid);\n\t\t\t}\n\t\t\tfunction hasDefault(prop) {\n\t\t\t\treturn it.opts.useDefaults && !it.compositeRule && schema[prop].default !== void 0;\n\t\t\t}\n\t\t\tfunction applyPropertySchema(prop) {\n\t\t\t\tcxt.subschema({\n\t\t\t\t\tkeyword: \"properties\",\n\t\t\t\t\tschemaProp: prop,\n\t\t\t\t\tdataProp: prop\n\t\t\t\t}, valid);\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/patternProperties.js\nvar require_patternProperties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst code_1 = require_code();\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst util_2 = require_util();\n\texports.default = {\n\t\tkeyword: \"patternProperties\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, data, parentSchema, it } = cxt;\n\t\t\tconst { opts } = it;\n\t\t\tconst patterns = (0, code_1.allSchemaProperties)(schema);\n\t\t\tconst alwaysValidPatterns = patterns.filter((p) => (0, util_1.alwaysValidSchema)(it, schema[p]));\n\t\t\tif (patterns.length === 0 || alwaysValidPatterns.length === patterns.length && (!it.opts.unevaluated || it.props === true)) return;\n\t\t\tconst checkProperties = opts.strictSchema && !opts.allowMatchingProperties && parentSchema.properties;\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tif (it.props !== true && !(it.props instanceof codegen_1.Name)) it.props = (0, util_2.evaluatedPropsToName)(gen, it.props);\n\t\t\tconst { props } = it;\n\t\t\tvalidatePatternProperties();\n\t\t\tfunction validatePatternProperties() {\n\t\t\t\tfor (const pat of patterns) {\n\t\t\t\t\tif (checkProperties) checkMatchingProperties(pat);\n\t\t\t\t\tif (it.allErrors) validateProperties(pat);\n\t\t\t\t\telse {\n\t\t\t\t\t\tgen.var(valid, true);\n\t\t\t\t\t\tvalidateProperties(pat);\n\t\t\t\t\t\tgen.if(valid);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction checkMatchingProperties(pat) {\n\t\t\t\tfor (const prop in checkProperties) if (new RegExp(pat).test(prop)) (0, util_1.checkStrictMode)(it, `property ${prop} matches pattern ${pat} (use allowMatchingProperties)`);\n\t\t\t}\n\t\t\tfunction validateProperties(pat) {\n\t\t\t\tgen.forIn(\"key\", data, (key) => {\n\t\t\t\t\tgen.if((0, codegen_1._)`${(0, code_1.usePattern)(cxt, pat)}.test(${key})`, () => {\n\t\t\t\t\t\tconst alwaysValid = alwaysValidPatterns.includes(pat);\n\t\t\t\t\t\tif (!alwaysValid) cxt.subschema({\n\t\t\t\t\t\t\tkeyword: \"patternProperties\",\n\t\t\t\t\t\t\tschemaProp: pat,\n\t\t\t\t\t\t\tdataProp: key,\n\t\t\t\t\t\t\tdataPropType: util_2.Type.Str\n\t\t\t\t\t\t}, valid);\n\t\t\t\t\t\tif (it.opts.unevaluated && props !== true) gen.assign((0, codegen_1._)`${props}[${key}]`, true);\n\t\t\t\t\t\telse if (!alwaysValid && !it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/not.js\nvar require_not = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst util_1 = require_util();\n\texports.default = {\n\t\tkeyword: \"not\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\ttrackErrors: true,\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, it } = cxt;\n\t\t\tif ((0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\tcxt.fail();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tcxt.subschema({\n\t\t\t\tkeyword: \"not\",\n\t\t\t\tcompositeRule: true,\n\t\t\t\tcreateErrors: false,\n\t\t\t\tallErrors: false\n\t\t\t}, valid);\n\t\t\tcxt.failResult(valid, () => cxt.reset(), () => cxt.error());\n\t\t},\n\t\terror: { message: \"must NOT be valid\" }\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/anyOf.js\nvar require_anyOf = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = {\n\t\tkeyword: \"anyOf\",\n\t\tschemaType: \"array\",\n\t\ttrackErrors: true,\n\t\tcode: require_code().validateUnion,\n\t\terror: { message: \"must match a schema in anyOf\" }\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/oneOf.js\nvar require_oneOf = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\texports.default = {\n\t\tkeyword: \"oneOf\",\n\t\tschemaType: \"array\",\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: \"must match exactly one schema in oneOf\",\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{passingSchemas: ${params.passing}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, parentSchema, it } = cxt;\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!Array.isArray(schema)) throw new Error(\"ajv implementation error\");\n\t\t\tif (it.opts.discriminator && parentSchema.discriminator) return;\n\t\t\tconst schArr = schema;\n\t\t\tconst valid = gen.let(\"valid\", false);\n\t\t\tconst passing = gen.let(\"passing\", null);\n\t\t\tconst schValid = gen.name(\"_valid\");\n\t\t\tcxt.setParams({ passing });\n\t\t\tgen.block(validateOneOf);\n\t\t\tcxt.result(valid, () => cxt.reset(), () => cxt.error(true));\n\t\t\tfunction validateOneOf() {\n\t\t\t\tschArr.forEach((sch, i) => {\n\t\t\t\t\tlet schCxt;\n\t\t\t\t\tif ((0, util_1.alwaysValidSchema)(it, sch)) gen.var(schValid, true);\n\t\t\t\t\telse schCxt = cxt.subschema({\n\t\t\t\t\t\tkeyword: \"oneOf\",\n\t\t\t\t\t\tschemaProp: i,\n\t\t\t\t\t\tcompositeRule: true\n\t\t\t\t\t}, schValid);\n\t\t\t\t\tif (i > 0) gen.if((0, codegen_1._)`${schValid} && ${valid}`).assign(valid, false).assign(passing, (0, codegen_1._)`[${passing}, ${i}]`).else();\n\t\t\t\t\tgen.if(schValid, () => {\n\t\t\t\t\t\tgen.assign(valid, true);\n\t\t\t\t\t\tgen.assign(passing, i);\n\t\t\t\t\t\tif (schCxt) cxt.mergeEvaluated(schCxt, codegen_1.Name);\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/allOf.js\nvar require_allOf = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst util_1 = require_util();\n\texports.default = {\n\t\tkeyword: \"allOf\",\n\t\tschemaType: \"array\",\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, it } = cxt;\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!Array.isArray(schema)) throw new Error(\"ajv implementation error\");\n\t\t\tconst valid = gen.name(\"valid\");\n\t\t\tschema.forEach((sch, i) => {\n\t\t\t\tif ((0, util_1.alwaysValidSchema)(it, sch)) return;\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tkeyword: \"allOf\",\n\t\t\t\t\tschemaProp: i\n\t\t\t\t}, valid);\n\t\t\t\tcxt.ok(valid);\n\t\t\t\tcxt.mergeEvaluated(schCxt);\n\t\t\t});\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/if.js\nvar require_if = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst def = {\n\t\tkeyword: \"if\",\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: ({ params }) => (0, codegen_1.str)`must match \"${params.ifClause}\" schema`,\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{failingKeyword: ${params.ifClause}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, parentSchema, it } = cxt;\n\t\t\tif (parentSchema.then === void 0 && parentSchema.else === void 0) (0, util_1.checkStrictMode)(it, \"\\\"if\\\" without \\\"then\\\" and \\\"else\\\" is ignored\");\n\t\t\tconst hasThen = hasSchema(it, \"then\");\n\t\t\tconst hasElse = hasSchema(it, \"else\");\n\t\t\tif (!hasThen && !hasElse) return;\n\t\t\tconst valid = gen.let(\"valid\", true);\n\t\t\tconst schValid = gen.name(\"_valid\");\n\t\t\tvalidateIf();\n\t\t\tcxt.reset();\n\t\t\tif (hasThen && hasElse) {\n\t\t\t\tconst ifClause = gen.let(\"ifClause\");\n\t\t\t\tcxt.setParams({ ifClause });\n\t\t\t\tgen.if(schValid, validateClause(\"then\", ifClause), validateClause(\"else\", ifClause));\n\t\t\t} else if (hasThen) gen.if(schValid, validateClause(\"then\"));\n\t\t\telse gen.if((0, codegen_1.not)(schValid), validateClause(\"else\"));\n\t\t\tcxt.pass(valid, () => cxt.error(true));\n\t\t\tfunction validateIf() {\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tkeyword: \"if\",\n\t\t\t\t\tcompositeRule: true,\n\t\t\t\t\tcreateErrors: false,\n\t\t\t\t\tallErrors: false\n\t\t\t\t}, schValid);\n\t\t\t\tcxt.mergeEvaluated(schCxt);\n\t\t\t}\n\t\t\tfunction validateClause(keyword, ifClause) {\n\t\t\t\treturn () => {\n\t\t\t\t\tconst schCxt = cxt.subschema({ keyword }, schValid);\n\t\t\t\t\tgen.assign(valid, schValid);\n\t\t\t\t\tcxt.mergeValidEvaluated(schCxt, valid);\n\t\t\t\t\tif (ifClause) gen.assign(ifClause, (0, codegen_1._)`${keyword}`);\n\t\t\t\t\telse cxt.setParams({ ifClause: keyword });\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t};\n\tfunction hasSchema(it, keyword) {\n\t\tconst schema = it.schema[keyword];\n\t\treturn schema !== void 0 && !(0, util_1.alwaysValidSchema)(it, schema);\n\t}\n\texports.default = def;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/thenElse.js\nvar require_thenElse = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst util_1 = require_util();\n\texports.default = {\n\t\tkeyword: [\"then\", \"else\"],\n\t\tschemaType: [\"object\", \"boolean\"],\n\t\tcode({ keyword, parentSchema, it }) {\n\t\t\tif (parentSchema.if === void 0) (0, util_1.checkStrictMode)(it, `\"${keyword}\" without \"if\" is ignored`);\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/index.js\nvar require_applicator$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst additionalItems_1 = require_additionalItems();\n\tconst prefixItems_1 = require_prefixItems();\n\tconst items_1 = require_items();\n\tconst items2020_1 = require_items2020();\n\tconst contains_1 = require_contains();\n\tconst dependencies_1 = require_dependencies();\n\tconst propertyNames_1 = require_propertyNames();\n\tconst additionalProperties_1 = require_additionalProperties();\n\tconst properties_1 = require_properties();\n\tconst patternProperties_1 = require_patternProperties();\n\tconst not_1 = require_not();\n\tconst anyOf_1 = require_anyOf();\n\tconst oneOf_1 = require_oneOf();\n\tconst allOf_1 = require_allOf();\n\tconst if_1 = require_if();\n\tconst thenElse_1 = require_thenElse();\n\tfunction getApplicator(draft2020 = false) {\n\t\tconst applicator = [\n\t\t\tnot_1.default,\n\t\t\tanyOf_1.default,\n\t\t\toneOf_1.default,\n\t\t\tallOf_1.default,\n\t\t\tif_1.default,\n\t\t\tthenElse_1.default,\n\t\t\tpropertyNames_1.default,\n\t\t\tadditionalProperties_1.default,\n\t\t\tdependencies_1.default,\n\t\t\tproperties_1.default,\n\t\t\tpatternProperties_1.default\n\t\t];\n\t\tif (draft2020) applicator.push(prefixItems_1.default, items2020_1.default);\n\t\telse applicator.push(additionalItems_1.default, items_1.default);\n\t\tapplicator.push(contains_1.default);\n\t\treturn applicator;\n\t}\n\texports.default = getApplicator;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/format/format.js\nvar require_format$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\texports.default = {\n\t\tkeyword: \"format\",\n\t\ttype: [\"number\", \"string\"],\n\t\tschemaType: \"string\",\n\t\t$data: true,\n\t\terror: {\n\t\t\tmessage: ({ schemaCode }) => (0, codegen_1.str)`must match format \"${schemaCode}\"`,\n\t\t\tparams: ({ schemaCode }) => (0, codegen_1._)`{format: ${schemaCode}}`\n\t\t},\n\t\tcode(cxt, ruleType) {\n\t\t\tconst { gen, data, $data, schema, schemaCode, it } = cxt;\n\t\t\tconst { opts, errSchemaPath, schemaEnv, self } = it;\n\t\t\tif (!opts.validateFormats) return;\n\t\t\tif ($data) validate$DataFormat();\n\t\t\telse validateFormat();\n\t\t\tfunction validate$DataFormat() {\n\t\t\t\tconst fmts = gen.scopeValue(\"formats\", {\n\t\t\t\t\tref: self.formats,\n\t\t\t\t\tcode: opts.code.formats\n\t\t\t\t});\n\t\t\t\tconst fDef = gen.const(\"fDef\", (0, codegen_1._)`${fmts}[${schemaCode}]`);\n\t\t\t\tconst fType = gen.let(\"fType\");\n\t\t\t\tconst format = gen.let(\"format\");\n\t\t\t\tgen.if((0, codegen_1._)`typeof ${fDef} == \"object\" && !(${fDef} instanceof RegExp)`, () => gen.assign(fType, (0, codegen_1._)`${fDef}.type || \"string\"`).assign(format, (0, codegen_1._)`${fDef}.validate`), () => gen.assign(fType, (0, codegen_1._)`\"string\"`).assign(format, fDef));\n\t\t\t\tcxt.fail$data((0, codegen_1.or)(unknownFmt(), invalidFmt()));\n\t\t\t\tfunction unknownFmt() {\n\t\t\t\t\tif (opts.strictSchema === false) return codegen_1.nil;\n\t\t\t\t\treturn (0, codegen_1._)`${schemaCode} && !${format}`;\n\t\t\t\t}\n\t\t\t\tfunction invalidFmt() {\n\t\t\t\t\tconst callFormat = schemaEnv.$async ? (0, codegen_1._)`(${fDef}.async ? await ${format}(${data}) : ${format}(${data}))` : (0, codegen_1._)`${format}(${data})`;\n\t\t\t\t\tconst validData = (0, codegen_1._)`(typeof ${format} == \"function\" ? ${callFormat} : ${format}.test(${data}))`;\n\t\t\t\t\treturn (0, codegen_1._)`${format} && ${format} !== true && ${fType} === ${ruleType} && !${validData}`;\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction validateFormat() {\n\t\t\t\tconst formatDef = self.formats[schema];\n\t\t\t\tif (!formatDef) {\n\t\t\t\t\tunknownFormat();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (formatDef === true) return;\n\t\t\t\tconst [fmtType, format, fmtRef] = getFormat(formatDef);\n\t\t\t\tif (fmtType === ruleType) cxt.pass(validCondition());\n\t\t\t\tfunction unknownFormat() {\n\t\t\t\t\tif (opts.strictSchema === false) {\n\t\t\t\t\t\tself.logger.warn(unknownMsg());\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthrow new Error(unknownMsg());\n\t\t\t\t\tfunction unknownMsg() {\n\t\t\t\t\t\treturn `unknown format \"${schema}\" ignored in schema at path \"${errSchemaPath}\"`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tfunction getFormat(fmtDef) {\n\t\t\t\t\tconst code = fmtDef instanceof RegExp ? (0, codegen_1.regexpCode)(fmtDef) : opts.code.formats ? (0, codegen_1._)`${opts.code.formats}${(0, codegen_1.getProperty)(schema)}` : void 0;\n\t\t\t\t\tconst fmt = gen.scopeValue(\"formats\", {\n\t\t\t\t\t\tkey: schema,\n\t\t\t\t\t\tref: fmtDef,\n\t\t\t\t\t\tcode\n\t\t\t\t\t});\n\t\t\t\t\tif (typeof fmtDef == \"object\" && !(fmtDef instanceof RegExp)) return [\n\t\t\t\t\t\tfmtDef.type || \"string\",\n\t\t\t\t\t\tfmtDef.validate,\n\t\t\t\t\t\t(0, codegen_1._)`${fmt}.validate`\n\t\t\t\t\t];\n\t\t\t\t\treturn [\n\t\t\t\t\t\t\"string\",\n\t\t\t\t\t\tfmtDef,\n\t\t\t\t\t\tfmt\n\t\t\t\t\t];\n\t\t\t\t}\n\t\t\t\tfunction validCondition() {\n\t\t\t\t\tif (typeof formatDef == \"object\" && !(formatDef instanceof RegExp) && formatDef.async) {\n\t\t\t\t\t\tif (!schemaEnv.$async) throw new Error(\"async format in sync schema\");\n\t\t\t\t\t\treturn (0, codegen_1._)`await ${fmtRef}(${data})`;\n\t\t\t\t\t}\n\t\t\t\t\treturn typeof format == \"function\" ? (0, codegen_1._)`${fmtRef}(${data})` : (0, codegen_1._)`${fmtRef}.test(${data})`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/format/index.js\nvar require_format = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = [require_format$1().default];\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/metadata.js\nvar require_metadata = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.contentVocabulary = exports.metadataVocabulary = void 0;\n\texports.metadataVocabulary = [\n\t\t\"title\",\n\t\t\"description\",\n\t\t\"default\",\n\t\t\"deprecated\",\n\t\t\"readOnly\",\n\t\t\"writeOnly\",\n\t\t\"examples\"\n\t];\n\texports.contentVocabulary = [\n\t\t\"contentMediaType\",\n\t\t\"contentEncoding\",\n\t\t\"contentSchema\"\n\t];\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/draft7.js\nvar require_draft7 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst core_1 = require_core$1();\n\tconst validation_1 = require_validation$1();\n\tconst applicator_1 = require_applicator$1();\n\tconst format_1 = require_format();\n\tconst metadata_1 = require_metadata();\n\texports.default = [\n\t\tcore_1.default,\n\t\tvalidation_1.default,\n\t\t(0, applicator_1.default)(),\n\t\tformat_1.default,\n\t\tmetadata_1.metadataVocabulary,\n\t\tmetadata_1.contentVocabulary\n\t];\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/discriminator/types.js\nvar require_types = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.DiscrError = void 0;\n\tvar DiscrError;\n\t(function(DiscrError) {\n\t\tDiscrError[\"Tag\"] = \"tag\";\n\t\tDiscrError[\"Mapping\"] = \"mapping\";\n\t})(DiscrError || (exports.DiscrError = DiscrError = {}));\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/discriminator/index.js\nvar require_discriminator = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst types_1 = require_types();\n\tconst compile_1 = require_compile();\n\tconst ref_error_1 = require_ref_error();\n\tconst util_1 = require_util();\n\texports.default = {\n\t\tkeyword: \"discriminator\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\terror: {\n\t\t\tmessage: ({ params: { discrError, tagName } }) => discrError === types_1.DiscrError.Tag ? `tag \"${tagName}\" must be string` : `value of tag \"${tagName}\" must be in oneOf`,\n\t\t\tparams: ({ params: { discrError, tag, tagName } }) => (0, codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, data, schema, parentSchema, it } = cxt;\n\t\t\tconst { oneOf } = parentSchema;\n\t\t\tif (!it.opts.discriminator) throw new Error(\"discriminator: requires discriminator option\");\n\t\t\tconst tagName = schema.propertyName;\n\t\t\tif (typeof tagName != \"string\") throw new Error(\"discriminator: requires propertyName\");\n\t\t\tif (schema.mapping) throw new Error(\"discriminator: mapping is not supported\");\n\t\t\tif (!oneOf) throw new Error(\"discriminator: requires oneOf keyword\");\n\t\t\tconst valid = gen.let(\"valid\", false);\n\t\t\tconst tag = gen.const(\"tag\", (0, codegen_1._)`${data}${(0, codegen_1.getProperty)(tagName)}`);\n\t\t\tgen.if((0, codegen_1._)`typeof ${tag} == \"string\"`, () => validateMapping(), () => cxt.error(false, {\n\t\t\t\tdiscrError: types_1.DiscrError.Tag,\n\t\t\t\ttag,\n\t\t\t\ttagName\n\t\t\t}));\n\t\t\tcxt.ok(valid);\n\t\t\tfunction validateMapping() {\n\t\t\t\tconst mapping = getMapping();\n\t\t\t\tgen.if(false);\n\t\t\t\tfor (const tagValue in mapping) {\n\t\t\t\t\tgen.elseIf((0, codegen_1._)`${tag} === ${tagValue}`);\n\t\t\t\t\tgen.assign(valid, applyTagSchema(mapping[tagValue]));\n\t\t\t\t}\n\t\t\t\tgen.else();\n\t\t\t\tcxt.error(false, {\n\t\t\t\t\tdiscrError: types_1.DiscrError.Mapping,\n\t\t\t\t\ttag,\n\t\t\t\t\ttagName\n\t\t\t\t});\n\t\t\t\tgen.endIf();\n\t\t\t}\n\t\t\tfunction applyTagSchema(schemaProp) {\n\t\t\t\tconst _valid = gen.name(\"valid\");\n\t\t\t\tconst schCxt = cxt.subschema({\n\t\t\t\t\tkeyword: \"oneOf\",\n\t\t\t\t\tschemaProp\n\t\t\t\t}, _valid);\n\t\t\t\tcxt.mergeEvaluated(schCxt, codegen_1.Name);\n\t\t\t\treturn _valid;\n\t\t\t}\n\t\t\tfunction getMapping() {\n\t\t\t\tvar _a;\n\t\t\t\tconst oneOfMapping = {};\n\t\t\t\tconst topRequired = hasRequired(parentSchema);\n\t\t\t\tlet tagRequired = true;\n\t\t\t\tfor (let i = 0; i < oneOf.length; i++) {\n\t\t\t\t\tlet sch = oneOf[i];\n\t\t\t\t\tif ((sch === null || sch === void 0 ? void 0 : sch.$ref) && !(0, util_1.schemaHasRulesButRef)(sch, it.self.RULES)) {\n\t\t\t\t\t\tconst ref = sch.$ref;\n\t\t\t\t\t\tsch = compile_1.resolveRef.call(it.self, it.schemaEnv.root, it.baseId, ref);\n\t\t\t\t\t\tif (sch instanceof compile_1.SchemaEnv) sch = sch.schema;\n\t\t\t\t\t\tif (sch === void 0) throw new ref_error_1.default(it.opts.uriResolver, it.baseId, ref);\n\t\t\t\t\t}\n\t\t\t\t\tconst propSch = (_a = sch === null || sch === void 0 ? void 0 : sch.properties) === null || _a === void 0 ? void 0 : _a[tagName];\n\t\t\t\t\tif (typeof propSch != \"object\") throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have \"properties/${tagName}\"`);\n\t\t\t\t\ttagRequired = tagRequired && (topRequired || hasRequired(sch));\n\t\t\t\t\taddMappings(propSch, i);\n\t\t\t\t}\n\t\t\t\tif (!tagRequired) throw new Error(`discriminator: \"${tagName}\" must be required`);\n\t\t\t\treturn oneOfMapping;\n\t\t\t\tfunction hasRequired({ required }) {\n\t\t\t\t\treturn Array.isArray(required) && required.includes(tagName);\n\t\t\t\t}\n\t\t\t\tfunction addMappings(sch, i) {\n\t\t\t\t\tif (sch.const) addMapping(sch.const, i);\n\t\t\t\t\telse if (sch.enum) for (const tagValue of sch.enum) addMapping(tagValue, i);\n\t\t\t\t\telse throw new Error(`discriminator: \"properties/${tagName}\" must have \"const\" or \"enum\"`);\n\t\t\t\t}\n\t\t\t\tfunction addMapping(tagValue, i) {\n\t\t\t\t\tif (typeof tagValue != \"string\" || tagValue in oneOfMapping) throw new Error(`discriminator: \"${tagName}\" values must be unique strings`);\n\t\t\t\t\toneOfMapping[tagValue] = i;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/refs/json-schema-draft-07.json\nvar require_json_schema_draft_07 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"http://json-schema.org/draft-07/schema#\",\n\t\t\"$id\": \"http://json-schema.org/draft-07/schema#\",\n\t\t\"title\": \"Core schema meta-schema\",\n\t\t\"definitions\": {\n\t\t\t\"schemaArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"items\": { \"$ref\": \"#\" }\n\t\t\t},\n\t\t\t\"nonNegativeInteger\": {\n\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\"minimum\": 0\n\t\t\t},\n\t\t\t\"nonNegativeIntegerDefault0\": { \"allOf\": [{ \"$ref\": \"#/definitions/nonNegativeInteger\" }, { \"default\": 0 }] },\n\t\t\t\"simpleTypes\": { \"enum\": [\n\t\t\t\t\"array\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"null\",\n\t\t\t\t\"number\",\n\t\t\t\t\"object\",\n\t\t\t\t\"string\"\n\t\t\t] },\n\t\t\t\"stringArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\"uniqueItems\": true,\n\t\t\t\t\"default\": []\n\t\t\t}\n\t\t},\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"$id\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t},\n\t\t\t\"$schema\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri\"\n\t\t\t},\n\t\t\t\"$ref\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t},\n\t\t\t\"$comment\": { \"type\": \"string\" },\n\t\t\t\"title\": { \"type\": \"string\" },\n\t\t\t\"description\": { \"type\": \"string\" },\n\t\t\t\"default\": true,\n\t\t\t\"readOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"examples\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t},\n\t\t\t\"multipleOf\": {\n\t\t\t\t\"type\": \"number\",\n\t\t\t\t\"exclusiveMinimum\": 0\n\t\t\t},\n\t\t\t\"maximum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMaximum\": { \"type\": \"number\" },\n\t\t\t\"minimum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMinimum\": { \"type\": \"number\" },\n\t\t\t\"maxLength\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\t\"minLength\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\t\"pattern\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"regex\"\n\t\t\t},\n\t\t\t\"additionalItems\": { \"$ref\": \"#\" },\n\t\t\t\"items\": {\n\t\t\t\t\"anyOf\": [{ \"$ref\": \"#\" }, { \"$ref\": \"#/definitions/schemaArray\" }],\n\t\t\t\t\"default\": true\n\t\t\t},\n\t\t\t\"maxItems\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\t\"minItems\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\t\"uniqueItems\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"contains\": { \"$ref\": \"#\" },\n\t\t\t\"maxProperties\": { \"$ref\": \"#/definitions/nonNegativeInteger\" },\n\t\t\t\"minProperties\": { \"$ref\": \"#/definitions/nonNegativeIntegerDefault0\" },\n\t\t\t\"required\": { \"$ref\": \"#/definitions/stringArray\" },\n\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\"definitions\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"properties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#\" },\n\t\t\t\t\"propertyNames\": { \"format\": \"regex\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependencies\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"anyOf\": [{ \"$ref\": \"#\" }, { \"$ref\": \"#/definitions/stringArray\" }] }\n\t\t\t},\n\t\t\t\"propertyNames\": { \"$ref\": \"#\" },\n\t\t\t\"const\": true,\n\t\t\t\"enum\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true,\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"uniqueItems\": true\n\t\t\t},\n\t\t\t\"type\": { \"anyOf\": [{ \"$ref\": \"#/definitions/simpleTypes\" }, {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"$ref\": \"#/definitions/simpleTypes\" },\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"uniqueItems\": true\n\t\t\t}] },\n\t\t\t\"format\": { \"type\": \"string\" },\n\t\t\t\"contentMediaType\": { \"type\": \"string\" },\n\t\t\t\"contentEncoding\": { \"type\": \"string\" },\n\t\t\t\"if\": { \"$ref\": \"#\" },\n\t\t\t\"then\": { \"$ref\": \"#\" },\n\t\t\t\"else\": { \"$ref\": \"#\" },\n\t\t\t\"allOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\t\"anyOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\t\"oneOf\": { \"$ref\": \"#/definitions/schemaArray\" },\n\t\t\t\"not\": { \"$ref\": \"#\" }\n\t\t},\n\t\t\"default\": true\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/ajv.js\nvar require_ajv = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv = void 0;\n\tconst core_1 = require_core$2();\n\tconst draft7_1 = require_draft7();\n\tconst discriminator_1 = require_discriminator();\n\tconst draft7MetaSchema = require_json_schema_draft_07();\n\tconst META_SUPPORT_DATA = [\"/properties\"];\n\tconst META_SCHEMA_ID = \"http://json-schema.org/draft-07/schema\";\n\tvar Ajv = class extends core_1.default {\n\t\t_addVocabularies() {\n\t\t\tsuper._addVocabularies();\n\t\t\tdraft7_1.default.forEach((v) => this.addVocabulary(v));\n\t\t\tif (this.opts.discriminator) this.addKeyword(discriminator_1.default);\n\t\t}\n\t\t_addDefaultMetaSchema() {\n\t\t\tsuper._addDefaultMetaSchema();\n\t\t\tif (!this.opts.meta) return;\n\t\t\tconst metaSchema = this.opts.$data ? this.$dataMetaSchema(draft7MetaSchema, META_SUPPORT_DATA) : draft7MetaSchema;\n\t\t\tthis.addMetaSchema(metaSchema, META_SCHEMA_ID, false);\n\t\t\tthis.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n\t\t}\n\t\tdefaultMeta() {\n\t\t\treturn this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);\n\t\t}\n\t};\n\texports.Ajv = Ajv;\n\tmodule.exports = exports = Ajv;\n\tmodule.exports.Ajv = Ajv;\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = Ajv;\n\tvar validate_1 = require_validate();\n\tObject.defineProperty(exports, \"KeywordCxt\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validate_1.KeywordCxt;\n\t\t}\n\t});\n\tvar codegen_1 = require_codegen();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.Name;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"CodeGen\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.CodeGen;\n\t\t}\n\t});\n\tvar validation_error_1 = require_validation_error();\n\tObject.defineProperty(exports, \"ValidationError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validation_error_1.default;\n\t\t}\n\t});\n\tvar ref_error_1 = require_ref_error();\n\tObject.defineProperty(exports, \"MissingRefError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn ref_error_1.default;\n\t\t}\n\t});\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/dynamic/dynamicAnchor.js\nvar require_dynamicAnchor = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.dynamicAnchor = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst compile_1 = require_compile();\n\tconst ref_1 = require_ref();\n\tconst def = {\n\t\tkeyword: \"$dynamicAnchor\",\n\t\tschemaType: \"string\",\n\t\tcode: (cxt) => dynamicAnchor(cxt, cxt.schema)\n\t};\n\tfunction dynamicAnchor(cxt, anchor) {\n\t\tconst { gen, it } = cxt;\n\t\tit.schemaEnv.root.dynamicAnchors[anchor] = true;\n\t\tconst v = (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`;\n\t\tconst validate = it.errSchemaPath === \"#\" ? it.validateName : _getValidate(cxt);\n\t\tgen.if((0, codegen_1._)`!${v}`, () => gen.assign(v, validate));\n\t}\n\texports.dynamicAnchor = dynamicAnchor;\n\tfunction _getValidate(cxt) {\n\t\tconst { schemaEnv, schema, self } = cxt.it;\n\t\tconst { root, baseId, localRefs, meta } = schemaEnv.root;\n\t\tconst { schemaId } = self.opts;\n\t\tconst sch = new compile_1.SchemaEnv({\n\t\t\tschema,\n\t\t\tschemaId,\n\t\t\troot,\n\t\t\tbaseId,\n\t\t\tlocalRefs,\n\t\t\tmeta\n\t\t});\n\t\tcompile_1.compileSchema.call(self, sch);\n\t\treturn (0, ref_1.getValidate)(cxt, sch);\n\t}\n\texports.default = def;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/dynamic/dynamicRef.js\nvar require_dynamicRef = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.dynamicRef = void 0;\n\tconst codegen_1 = require_codegen();\n\tconst names_1 = require_names();\n\tconst ref_1 = require_ref();\n\tconst def = {\n\t\tkeyword: \"$dynamicRef\",\n\t\tschemaType: \"string\",\n\t\tcode: (cxt) => dynamicRef(cxt, cxt.schema)\n\t};\n\tfunction dynamicRef(cxt, ref) {\n\t\tconst { gen, keyword, it } = cxt;\n\t\tif (ref[0] !== \"#\") throw new Error(`\"${keyword}\" only supports hash fragment reference`);\n\t\tconst anchor = ref.slice(1);\n\t\tif (it.allErrors) _dynamicRef();\n\t\telse {\n\t\t\tconst valid = gen.let(\"valid\", false);\n\t\t\t_dynamicRef(valid);\n\t\t\tcxt.ok(valid);\n\t\t}\n\t\tfunction _dynamicRef(valid) {\n\t\t\tif (it.schemaEnv.root.dynamicAnchors[anchor]) {\n\t\t\t\tconst v = gen.let(\"_v\", (0, codegen_1._)`${names_1.default.dynamicAnchors}${(0, codegen_1.getProperty)(anchor)}`);\n\t\t\t\tgen.if(v, _callRef(v, valid), _callRef(it.validateName, valid));\n\t\t\t} else _callRef(it.validateName, valid)();\n\t\t}\n\t\tfunction _callRef(validate, valid) {\n\t\t\treturn valid ? () => gen.block(() => {\n\t\t\t\t(0, ref_1.callRef)(cxt, validate);\n\t\t\t\tgen.let(valid, true);\n\t\t\t}) : () => (0, ref_1.callRef)(cxt, validate);\n\t\t}\n\t}\n\texports.dynamicRef = dynamicRef;\n\texports.default = def;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/dynamic/recursiveAnchor.js\nvar require_recursiveAnchor = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dynamicAnchor_1 = require_dynamicAnchor();\n\tconst util_1 = require_util();\n\texports.default = {\n\t\tkeyword: \"$recursiveAnchor\",\n\t\tschemaType: \"boolean\",\n\t\tcode(cxt) {\n\t\t\tif (cxt.schema) (0, dynamicAnchor_1.dynamicAnchor)(cxt, \"\");\n\t\t\telse (0, util_1.checkStrictMode)(cxt.it, \"$recursiveAnchor: false is ignored\");\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/dynamic/recursiveRef.js\nvar require_recursiveRef = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dynamicRef_1 = require_dynamicRef();\n\texports.default = {\n\t\tkeyword: \"$recursiveRef\",\n\t\tschemaType: \"string\",\n\t\tcode: (cxt) => (0, dynamicRef_1.dynamicRef)(cxt, cxt.schema)\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/dynamic/index.js\nvar require_dynamic = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dynamicAnchor_1 = require_dynamicAnchor();\n\tconst dynamicRef_1 = require_dynamicRef();\n\tconst recursiveAnchor_1 = require_recursiveAnchor();\n\tconst recursiveRef_1 = require_recursiveRef();\n\texports.default = [\n\t\tdynamicAnchor_1.default,\n\t\tdynamicRef_1.default,\n\t\trecursiveAnchor_1.default,\n\t\trecursiveRef_1.default\n\t];\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/dependentRequired.js\nvar require_dependentRequired = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dependencies_1 = require_dependencies();\n\texports.default = {\n\t\tkeyword: \"dependentRequired\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\terror: dependencies_1.error,\n\t\tcode: (cxt) => (0, dependencies_1.validatePropertyDeps)(cxt)\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/applicator/dependentSchemas.js\nvar require_dependentSchemas = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dependencies_1 = require_dependencies();\n\texports.default = {\n\t\tkeyword: \"dependentSchemas\",\n\t\ttype: \"object\",\n\t\tschemaType: \"object\",\n\t\tcode: (cxt) => (0, dependencies_1.validateSchemaDeps)(cxt)\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/validation/limitContains.js\nvar require_limitContains = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst util_1 = require_util();\n\texports.default = {\n\t\tkeyword: [\"maxContains\", \"minContains\"],\n\t\ttype: \"array\",\n\t\tschemaType: \"number\",\n\t\tcode({ keyword, parentSchema, it }) {\n\t\t\tif (parentSchema.contains === void 0) (0, util_1.checkStrictMode)(it, `\"${keyword}\" without \"contains\" is ignored`);\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/next.js\nvar require_next = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst dependentRequired_1 = require_dependentRequired();\n\tconst dependentSchemas_1 = require_dependentSchemas();\n\tconst limitContains_1 = require_limitContains();\n\texports.default = [\n\t\tdependentRequired_1.default,\n\t\tdependentSchemas_1.default,\n\t\tlimitContains_1.default\n\t];\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedProperties.js\nvar require_unevaluatedProperties = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\tconst names_1 = require_names();\n\texports.default = {\n\t\tkeyword: \"unevaluatedProperties\",\n\t\ttype: \"object\",\n\t\tschemaType: [\"boolean\", \"object\"],\n\t\ttrackErrors: true,\n\t\terror: {\n\t\t\tmessage: \"must NOT have unevaluated properties\",\n\t\t\tparams: ({ params }) => (0, codegen_1._)`{unevaluatedProperty: ${params.unevaluatedProperty}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, data, errsCount, it } = cxt;\n\t\t\t/* istanbul ignore if */\n\t\t\tif (!errsCount) throw new Error(\"ajv implementation error\");\n\t\t\tconst { allErrors, props } = it;\n\t\t\tif (props instanceof codegen_1.Name) gen.if((0, codegen_1._)`${props} !== true`, () => gen.forIn(\"key\", data, (key) => gen.if(unevaluatedDynamic(props, key), () => unevaluatedPropCode(key))));\n\t\t\telse if (props !== true) gen.forIn(\"key\", data, (key) => props === void 0 ? unevaluatedPropCode(key) : gen.if(unevaluatedStatic(props, key), () => unevaluatedPropCode(key)));\n\t\t\tit.props = true;\n\t\t\tcxt.ok((0, codegen_1._)`${errsCount} === ${names_1.default.errors}`);\n\t\t\tfunction unevaluatedPropCode(key) {\n\t\t\t\tif (schema === false) {\n\t\t\t\t\tcxt.setParams({ unevaluatedProperty: key });\n\t\t\t\t\tcxt.error();\n\t\t\t\t\tif (!allErrors) gen.break();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (!(0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\t\tconst valid = gen.name(\"valid\");\n\t\t\t\t\tcxt.subschema({\n\t\t\t\t\t\tkeyword: \"unevaluatedProperties\",\n\t\t\t\t\t\tdataProp: key,\n\t\t\t\t\t\tdataPropType: util_1.Type.Str\n\t\t\t\t\t}, valid);\n\t\t\t\t\tif (!allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t\t}\n\t\t\t}\n\t\t\tfunction unevaluatedDynamic(evaluatedProps, key) {\n\t\t\t\treturn (0, codegen_1._)`!${evaluatedProps} || !${evaluatedProps}[${key}]`;\n\t\t\t}\n\t\t\tfunction unevaluatedStatic(evaluatedProps, key) {\n\t\t\t\tconst ps = [];\n\t\t\t\tfor (const p in evaluatedProps) if (evaluatedProps[p] === true) ps.push((0, codegen_1._)`${key} !== ${p}`);\n\t\t\t\treturn (0, codegen_1.and)(...ps);\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/unevaluated/unevaluatedItems.js\nvar require_unevaluatedItems = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst codegen_1 = require_codegen();\n\tconst util_1 = require_util();\n\texports.default = {\n\t\tkeyword: \"unevaluatedItems\",\n\t\ttype: \"array\",\n\t\tschemaType: [\"boolean\", \"object\"],\n\t\terror: {\n\t\t\tmessage: ({ params: { len } }) => (0, codegen_1.str)`must NOT have more than ${len} items`,\n\t\t\tparams: ({ params: { len } }) => (0, codegen_1._)`{limit: ${len}}`\n\t\t},\n\t\tcode(cxt) {\n\t\t\tconst { gen, schema, data, it } = cxt;\n\t\t\tconst items = it.items || 0;\n\t\t\tif (items === true) return;\n\t\t\tconst len = gen.const(\"len\", (0, codegen_1._)`${data}.length`);\n\t\t\tif (schema === false) {\n\t\t\t\tcxt.setParams({ len: items });\n\t\t\t\tcxt.fail((0, codegen_1._)`${len} > ${items}`);\n\t\t\t} else if (typeof schema == \"object\" && !(0, util_1.alwaysValidSchema)(it, schema)) {\n\t\t\t\tconst valid = gen.var(\"valid\", (0, codegen_1._)`${len} <= ${items}`);\n\t\t\t\tgen.if((0, codegen_1.not)(valid), () => validateItems(valid, items));\n\t\t\t\tcxt.ok(valid);\n\t\t\t}\n\t\t\tit.items = true;\n\t\t\tfunction validateItems(valid, from) {\n\t\t\t\tgen.forRange(\"i\", from, len, (i) => {\n\t\t\t\t\tcxt.subschema({\n\t\t\t\t\t\tkeyword: \"unevaluatedItems\",\n\t\t\t\t\t\tdataProp: i,\n\t\t\t\t\t\tdataPropType: util_1.Type.Num\n\t\t\t\t\t}, valid);\n\t\t\t\t\tif (!it.allErrors) gen.if((0, codegen_1.not)(valid), () => gen.break());\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/unevaluated/index.js\nvar require_unevaluated$1 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst unevaluatedProperties_1 = require_unevaluatedProperties();\n\tconst unevaluatedItems_1 = require_unevaluatedItems();\n\texports.default = [unevaluatedProperties_1.default, unevaluatedItems_1.default];\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/vocabularies/draft2020.js\nvar require_draft2020 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst core_1 = require_core$1();\n\tconst validation_1 = require_validation$1();\n\tconst applicator_1 = require_applicator$1();\n\tconst dynamic_1 = require_dynamic();\n\tconst next_1 = require_next();\n\tconst unevaluated_1 = require_unevaluated$1();\n\tconst format_1 = require_format();\n\tconst metadata_1 = require_metadata();\n\texports.default = [\n\t\tdynamic_1.default,\n\t\tcore_1.default,\n\t\tvalidation_1.default,\n\t\t(0, applicator_1.default)(true),\n\t\tformat_1.default,\n\t\tmetadata_1.metadataVocabulary,\n\t\tmetadata_1.contentVocabulary,\n\t\tnext_1.default,\n\t\tunevaluated_1.default\n\t];\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/refs/json-schema-2020-12/schema.json\nvar require_schema = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$vocabulary\": {\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/core\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/applicator\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/unevaluated\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/validation\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/meta-data\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/format-annotation\": true,\n\t\t\t\"https://json-schema.org/draft/2020-12/vocab/content\": true\n\t\t},\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Core and Validation specifications meta-schema\",\n\t\t\"allOf\": [\n\t\t\t{ \"$ref\": \"meta/core\" },\n\t\t\t{ \"$ref\": \"meta/applicator\" },\n\t\t\t{ \"$ref\": \"meta/unevaluated\" },\n\t\t\t{ \"$ref\": \"meta/validation\" },\n\t\t\t{ \"$ref\": \"meta/meta-data\" },\n\t\t\t{ \"$ref\": \"meta/format-annotation\" },\n\t\t\t{ \"$ref\": \"meta/content\" }\n\t\t],\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"$comment\": \"This meta-schema also defines keywords that have appeared in previous drafts in order to prevent incompatible extensions as they remain in common use.\",\n\t\t\"properties\": {\n\t\t\t\"definitions\": {\n\t\t\t\t\"$comment\": \"\\\"definitions\\\" has been replaced by \\\"$defs\\\".\",\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"deprecated\": true,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependencies\": {\n\t\t\t\t\"$comment\": \"\\\"dependencies\\\" has been split and replaced by \\\"dependentSchemas\\\" and \\\"dependentRequired\\\" in order to serve their differing semantics.\",\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"anyOf\": [{ \"$dynamicRef\": \"#meta\" }, { \"$ref\": \"meta/validation#/$defs/stringArray\" }] },\n\t\t\t\t\"deprecated\": true,\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"$recursiveAnchor\": {\n\t\t\t\t\"$comment\": \"\\\"$recursiveAnchor\\\" has been replaced by \\\"$dynamicAnchor\\\".\",\n\t\t\t\t\"$ref\": \"meta/core#/$defs/anchorString\",\n\t\t\t\t\"deprecated\": true\n\t\t\t},\n\t\t\t\"$recursiveRef\": {\n\t\t\t\t\"$comment\": \"\\\"$recursiveRef\\\" has been replaced by \\\"$dynamicRef\\\".\",\n\t\t\t\t\"$ref\": \"meta/core#/$defs/uriReferenceString\",\n\t\t\t\t\"deprecated\": true\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/refs/json-schema-2020-12/meta/applicator.json\nvar require_applicator = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/applicator\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/applicator\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Applicator vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"prefixItems\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"items\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"contains\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"properties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"patternProperties\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"propertyNames\": { \"format\": \"regex\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"dependentSchemas\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\t\"default\": {}\n\t\t\t},\n\t\t\t\"propertyNames\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"if\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"then\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"else\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"allOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"anyOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"oneOf\": { \"$ref\": \"#/$defs/schemaArray\" },\n\t\t\t\"not\": { \"$dynamicRef\": \"#meta\" }\n\t\t},\n\t\t\"$defs\": { \"schemaArray\": {\n\t\t\t\"type\": \"array\",\n\t\t\t\"minItems\": 1,\n\t\t\t\"items\": { \"$dynamicRef\": \"#meta\" }\n\t\t} }\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/refs/json-schema-2020-12/meta/unevaluated.json\nvar require_unevaluated = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/unevaluated\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/unevaluated\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Unevaluated applicator vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"unevaluatedItems\": { \"$dynamicRef\": \"#meta\" },\n\t\t\t\"unevaluatedProperties\": { \"$dynamicRef\": \"#meta\" }\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/refs/json-schema-2020-12/meta/content.json\nvar require_content = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/content\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/content\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Content vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"contentEncoding\": { \"type\": \"string\" },\n\t\t\t\"contentMediaType\": { \"type\": \"string\" },\n\t\t\t\"contentSchema\": { \"$dynamicRef\": \"#meta\" }\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/refs/json-schema-2020-12/meta/core.json\nvar require_core = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/core\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/core\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Core vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"$id\": {\n\t\t\t\t\"$ref\": \"#/$defs/uriReferenceString\",\n\t\t\t\t\"$comment\": \"Non-empty fragments not allowed.\",\n\t\t\t\t\"pattern\": \"^[^#]*#?$\"\n\t\t\t},\n\t\t\t\"$schema\": { \"$ref\": \"#/$defs/uriString\" },\n\t\t\t\"$ref\": { \"$ref\": \"#/$defs/uriReferenceString\" },\n\t\t\t\"$anchor\": { \"$ref\": \"#/$defs/anchorString\" },\n\t\t\t\"$dynamicRef\": { \"$ref\": \"#/$defs/uriReferenceString\" },\n\t\t\t\"$dynamicAnchor\": { \"$ref\": \"#/$defs/anchorString\" },\n\t\t\t\"$vocabulary\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"propertyNames\": { \"$ref\": \"#/$defs/uriString\" },\n\t\t\t\t\"additionalProperties\": { \"type\": \"boolean\" }\n\t\t\t},\n\t\t\t\"$comment\": { \"type\": \"string\" },\n\t\t\t\"$defs\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$dynamicRef\": \"#meta\" }\n\t\t\t}\n\t\t},\n\t\t\"$defs\": {\n\t\t\t\"anchorString\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"pattern\": \"^[A-Za-z_][-A-Za-z0-9._]*$\"\n\t\t\t},\n\t\t\t\"uriString\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri\"\n\t\t\t},\n\t\t\t\"uriReferenceString\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"uri-reference\"\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/refs/json-schema-2020-12/meta/format-annotation.json\nvar require_format_annotation = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/format-annotation\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/format-annotation\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Format vocabulary meta-schema for annotation results\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": { \"format\": { \"type\": \"string\" } }\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/refs/json-schema-2020-12/meta/meta-data.json\nvar require_meta_data = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/meta-data\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/meta-data\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Meta-data vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"title\": { \"type\": \"string\" },\n\t\t\t\"description\": { \"type\": \"string\" },\n\t\t\t\"default\": true,\n\t\t\t\"deprecated\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"readOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"writeOnly\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"examples\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/refs/json-schema-2020-12/meta/validation.json\nvar require_validation = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tmodule.exports = {\n\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\"$id\": \"https://json-schema.org/draft/2020-12/meta/validation\",\n\t\t\"$vocabulary\": { \"https://json-schema.org/draft/2020-12/vocab/validation\": true },\n\t\t\"$dynamicAnchor\": \"meta\",\n\t\t\"title\": \"Validation vocabulary meta-schema\",\n\t\t\"type\": [\"object\", \"boolean\"],\n\t\t\"properties\": {\n\t\t\t\"type\": { \"anyOf\": [{ \"$ref\": \"#/$defs/simpleTypes\" }, {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"$ref\": \"#/$defs/simpleTypes\" },\n\t\t\t\t\"minItems\": 1,\n\t\t\t\t\"uniqueItems\": true\n\t\t\t}] },\n\t\t\t\"const\": true,\n\t\t\t\"enum\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": true\n\t\t\t},\n\t\t\t\"multipleOf\": {\n\t\t\t\t\"type\": \"number\",\n\t\t\t\t\"exclusiveMinimum\": 0\n\t\t\t},\n\t\t\t\"maximum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMaximum\": { \"type\": \"number\" },\n\t\t\t\"minimum\": { \"type\": \"number\" },\n\t\t\t\"exclusiveMinimum\": { \"type\": \"number\" },\n\t\t\t\"maxLength\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minLength\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"pattern\": {\n\t\t\t\t\"type\": \"string\",\n\t\t\t\t\"format\": \"regex\"\n\t\t\t},\n\t\t\t\"maxItems\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minItems\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"uniqueItems\": {\n\t\t\t\t\"type\": \"boolean\",\n\t\t\t\t\"default\": false\n\t\t\t},\n\t\t\t\"maxContains\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minContains\": {\n\t\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\t\"default\": 1\n\t\t\t},\n\t\t\t\"maxProperties\": { \"$ref\": \"#/$defs/nonNegativeInteger\" },\n\t\t\t\"minProperties\": { \"$ref\": \"#/$defs/nonNegativeIntegerDefault0\" },\n\t\t\t\"required\": { \"$ref\": \"#/$defs/stringArray\" },\n\t\t\t\"dependentRequired\": {\n\t\t\t\t\"type\": \"object\",\n\t\t\t\t\"additionalProperties\": { \"$ref\": \"#/$defs/stringArray\" }\n\t\t\t}\n\t\t},\n\t\t\"$defs\": {\n\t\t\t\"nonNegativeInteger\": {\n\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\"minimum\": 0\n\t\t\t},\n\t\t\t\"nonNegativeIntegerDefault0\": {\n\t\t\t\t\"$ref\": \"#/$defs/nonNegativeInteger\",\n\t\t\t\t\"default\": 0\n\t\t\t},\n\t\t\t\"simpleTypes\": { \"enum\": [\n\t\t\t\t\"array\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"null\",\n\t\t\t\t\"number\",\n\t\t\t\t\"object\",\n\t\t\t\t\"string\"\n\t\t\t] },\n\t\t\t\"stringArray\": {\n\t\t\t\t\"type\": \"array\",\n\t\t\t\t\"items\": { \"type\": \"string\" },\n\t\t\t\t\"uniqueItems\": true,\n\t\t\t\t\"default\": []\n\t\t\t}\n\t\t}\n\t};\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/refs/json-schema-2020-12/index.js\nvar require_json_schema_2020_12 = /* @__PURE__ */ __commonJSMin(((exports) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\tconst metaSchema = require_schema();\n\tconst applicator = require_applicator();\n\tconst unevaluated = require_unevaluated();\n\tconst content = require_content();\n\tconst core = require_core();\n\tconst format = require_format_annotation();\n\tconst metadata = require_meta_data();\n\tconst validation = require_validation();\n\tconst META_SUPPORT_DATA = [\"/properties\"];\n\tfunction addMetaSchema2020($data) {\n\t\t[\n\t\t\tmetaSchema,\n\t\t\tapplicator,\n\t\t\tunevaluated,\n\t\t\tcontent,\n\t\t\tcore,\n\t\t\twith$data(this, format),\n\t\t\tmetadata,\n\t\t\twith$data(this, validation)\n\t\t].forEach((sch) => this.addMetaSchema(sch, void 0, false));\n\t\treturn this;\n\t\tfunction with$data(ajv, sch) {\n\t\t\treturn $data ? ajv.$dataMetaSchema(sch, META_SUPPORT_DATA) : sch;\n\t\t}\n\t}\n\texports.default = addMetaSchema2020;\n}));\n//#endregion\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/ajv/8.20.0/030cdf17be110aa8137679eb877279b0c80ee1367e93a2fc22ecf4c20a1be629/node_modules/ajv/dist/2020.js\nvar require__2020 = /* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.MissingRefError = exports.ValidationError = exports.CodeGen = exports.Name = exports.nil = exports.stringify = exports.str = exports._ = exports.KeywordCxt = exports.Ajv2020 = void 0;\n\tconst core_1 = require_core$2();\n\tconst draft2020_1 = require_draft2020();\n\tconst discriminator_1 = require_discriminator();\n\tconst json_schema_2020_12_1 = require_json_schema_2020_12();\n\tconst META_SCHEMA_ID = \"https://json-schema.org/draft/2020-12/schema\";\n\tvar Ajv2020 = class extends core_1.default {\n\t\tconstructor(opts = {}) {\n\t\t\tsuper({\n\t\t\t\t...opts,\n\t\t\t\tdynamicRef: true,\n\t\t\t\tnext: true,\n\t\t\t\tunevaluated: true\n\t\t\t});\n\t\t}\n\t\t_addVocabularies() {\n\t\t\tsuper._addVocabularies();\n\t\t\tdraft2020_1.default.forEach((v) => this.addVocabulary(v));\n\t\t\tif (this.opts.discriminator) this.addKeyword(discriminator_1.default);\n\t\t}\n\t\t_addDefaultMetaSchema() {\n\t\t\tsuper._addDefaultMetaSchema();\n\t\t\tconst { $data, meta } = this.opts;\n\t\t\tif (!meta) return;\n\t\t\tjson_schema_2020_12_1.default.call(this, $data);\n\t\t\tthis.refs[\"http://json-schema.org/schema\"] = META_SCHEMA_ID;\n\t\t}\n\t\tdefaultMeta() {\n\t\t\treturn this.opts.defaultMeta = super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : void 0);\n\t\t}\n\t};\n\texports.Ajv2020 = Ajv2020;\n\tmodule.exports = exports = Ajv2020;\n\tmodule.exports.Ajv2020 = Ajv2020;\n\tObject.defineProperty(exports, \"__esModule\", { value: true });\n\texports.default = Ajv2020;\n\tvar validate_1 = require_validate();\n\tObject.defineProperty(exports, \"KeywordCxt\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validate_1.KeywordCxt;\n\t\t}\n\t});\n\tvar codegen_1 = require_codegen();\n\tObject.defineProperty(exports, \"_\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1._;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"str\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.str;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"stringify\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.stringify;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"nil\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.nil;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"Name\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.Name;\n\t\t}\n\t});\n\tObject.defineProperty(exports, \"CodeGen\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn codegen_1.CodeGen;\n\t\t}\n\t});\n\tvar validation_error_1 = require_validation_error();\n\tObject.defineProperty(exports, \"ValidationError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn validation_error_1.default;\n\t\t}\n\t});\n\tvar ref_error_1 = require_ref_error();\n\tObject.defineProperty(exports, \"MissingRefError\", {\n\t\tenumerable: true,\n\t\tget: function() {\n\t\t\treturn ref_error_1.default;\n\t\t}\n\t});\n}));\n//#endregion\n//#region src/standard-schema/adapters/json-schema.ts\nvar import_ajv = require_ajv();\nvar import__2020 = /* @__PURE__ */ __toESM(require__2020(), 1);\nvar import_json_schema_traverse = /* @__PURE__ */ __toESM(require_json_schema_traverse(), 1);\n/**\n* Vendor name for JSON Schema wrapped schemas.\n*/\nconst VENDOR = \"json-schema\";\n/**\n* A wrapper class that makes JSON Schema compatible with @standard-schema/spec.\n*\n* This class implements both `StandardSchemaV1` (validation) and `StandardJSONSchemaV1`\n* (JSON Schema conversion) interfaces. Validation is performed using Ajv (Another JSON\n* Schema Validator).\n*\n* @typeParam T - The TypeScript type that the JSON Schema represents\n*\n* @example\n* ```typescript\n* import { toStandardSchema } from '@mastra/schema-compat/adapters/json-schema';\n*\n* const userJsonSchema = {\n*   type: 'object',\n*   properties: {\n*     name: { type: 'string' },\n*     age: { type: 'number', minimum: 0 },\n*   },\n*   required: ['name', 'age'],\n* } as const;\n*\n* const standardSchema = toStandardSchema<{ name: string; age: number }>(userJsonSchema);\n*\n* // Use validation (from StandardSchemaV1)\n* const result = standardSchema['~standard'].validate({ name: 'John', age: 30 });\n*\n* // Get JSON Schema (from StandardJSONSchemaV1)\n* const jsonSchema = standardSchema['~standard'].jsonSchema.output({ target: 'draft-07' });\n* ```\n*/\nvar JsonSchemaWrapper = class {\n\t#schema;\n\t#options;\n\t#ajvValidateCache = null;\n\t#ajvInstance = null;\n\t\"~standard\";\n\tconstructor(schema, options = {}) {\n\t\tthis.#schema = schema;\n\t\tthis.#options = options;\n\t\tthis[\"~standard\"] = {\n\t\t\tversion: 1,\n\t\t\tvendor: VENDOR,\n\t\t\tvalidate: this.#validate.bind(this),\n\t\t\tjsonSchema: {\n\t\t\t\tinput: this.#toJsonSchema.bind(this),\n\t\t\t\toutput: this.#toJsonSchema.bind(this)\n\t\t\t}\n\t\t};\n\t}\n\t/**\n\t* Validates a value against the JSON Schema using Ajv.\n\t*\n\t* @param value - The value to validate\n\t* @returns A result object with either the validated value or validation issues\n\t*/\n\t#validate(value) {\n\t\ttry {\n\t\t\tconst validateFn = this.#getAjvValidator();\n\t\t\tconst result = validateFn(value);\n\t\t\tif (validateFn.$async) return result.then(() => ({ value })).catch((err) => {\n\t\t\t\treturn { issues: (err?.errors ?? []).map((e) => ({\n\t\t\t\t\tmessage: e.message ?? \"Validation error\",\n\t\t\t\t\tpath: this.#ajvPathToStandardPath(e.instancePath)\n\t\t\t\t})) };\n\t\t\t});\n\t\t\tif (result) return { value };\n\t\t\treturn { issues: (validateFn.errors ?? []).map((err) => ({\n\t\t\t\tmessage: err.message ?? \"Validation error\",\n\t\t\t\tpath: this.#ajvPathToStandardPath(err.instancePath)\n\t\t\t})) };\n\t\t} catch (error) {\n\t\t\treturn { issues: [{ message: `Schema validation error: ${error instanceof Error ? error.message : \"Unknown validation error\"}` }] };\n\t\t}\n\t}\n\t/**\n\t* Converts an Ajv instance path (e.g., \"/foo/0/bar\") to a Standard Schema path array.\n\t*\n\t* @param instancePath - The Ajv instance path\n\t* @returns An array of path segments\n\t*/\n\t#ajvPathToStandardPath(instancePath) {\n\t\tif (!instancePath || instancePath === \"\") return [];\n\t\treturn instancePath.slice(1).split(\"/\").map((part) => {\n\t\t\tconst num = parseInt(part, 10);\n\t\t\tif (!isNaN(num) && String(num) === part) return num;\n\t\t\treturn part.replace(/~1/g, \"/\").replace(/~0/g, \"~\");\n\t\t});\n\t}\n\t/**\n\t* Returns the JSON Schema in the requested target format.\n\t*\n\t* Since we're already working with JSON Schema, this is mostly a pass-through.\n\t* Different targets may require slight modifications in the future.\n\t*\n\t* @param options - Options including the target format\n\t* @returns The JSON Schema as a Record\n\t*/\n\t#toJsonSchema(options) {\n\t\tconst { target } = options;\n\t\tconst clonedSchema = JSON.parse(JSON.stringify(this.#schema));\n\t\tif (!clonedSchema.$schema) switch (target) {\n\t\t\tcase \"draft-07\":\n\t\t\t\tclonedSchema.$schema = \"http://json-schema.org/draft-07/schema#\";\n\t\t\t\tbreak;\n\t\t\tcase \"draft-2020-12\":\n\t\t\t\tclonedSchema.$schema = \"https://json-schema.org/draft/2020-12/schema\";\n\t\t\t\tbreak;\n\t\t\tcase \"openapi-3.0\": break;\n\t\t\tdefault: break;\n\t\t}\n\t\tif (options?.libraryOptions?.override) {\n\t\t\tconst override = options.libraryOptions.override;\n\t\t\t(0, import_json_schema_traverse.default)(clonedSchema, { cb: { post: (schema) => {\n\t\t\t\toverride({ jsonSchema: schema });\n\t\t\t} } });\n\t\t}\n\t\treturn clonedSchema;\n\t}\n\t/**\n\t* Gets or creates an Ajv validator for the schema.\n\t* The validator is cached for performance.\n\t*/\n\t#getAjvValidator() {\n\t\tif (!this.#ajvValidateCache) {\n\t\t\tconst AjvClass = typeof this.#schema.$schema === \"string\" && this.#schema.$schema.includes(\"2020-12\") ? import__2020.default : import_ajv.Ajv;\n\t\t\tthis.#ajvInstance = new AjvClass({\n\t\t\t\tallErrors: true,\n\t\t\t\tstrict: false,\n\t\t\t\t...this.#options.ajvOptions\n\t\t\t});\n\t\t\tthis.#ajvValidateCache = this.#ajvInstance.compile(this.#schema);\n\t\t}\n\t\treturn this.#ajvValidateCache;\n\t}\n\t/**\n\t* Returns the original JSON Schema.\n\t*/\n\tgetSchema() {\n\t\treturn this.#schema;\n\t}\n\t/**\n\t* Returns the Ajv instance used for validation.\n\t* Useful for advanced use cases like adding custom formats or keywords.\n\t*/\n\tgetAjv() {\n\t\tthis.#getAjvValidator();\n\t\treturn this.#ajvInstance;\n\t}\n};\n/**\n* Wraps a JSON Schema to implement the full @standard-schema/spec interface.\n*\n* This function creates a wrapper that implements both `StandardSchemaV1` (validation)\n* and `StandardJSONSchemaV1` (JSON Schema conversion) interfaces. Validation is performed\n* using Ajv (Another JSON Schema Validator).\n*\n* @typeParam T - The TypeScript type that the JSON Schema represents\n* @param schema - The JSON Schema to wrap\n* @param options - Optional configuration options\n* @returns A wrapper implementing StandardSchemaWithJSON\n*\n* @example\n* ```typescript\n* import { toStandardSchema } from '@mastra/schema-compat/adapters/json-schema';\n*\n* const userSchema = {\n*   type: 'object',\n*   properties: {\n*     name: { type: 'string' },\n*     age: { type: 'number' },\n*   },\n*   required: ['name'],\n* } as const;\n*\n* type User = { name: string; age?: number };\n*\n* const standardSchema = toStandardSchema<User>(userSchema);\n*\n* // Validate data\n* const result = standardSchema['~standard'].validate({ name: 'John' });\n*\n* // Get JSON Schema\n* const jsonSchema = standardSchema['~standard'].jsonSchema.output({ target: 'draft-07' });\n* ```\n*/\nfunction toStandardSchema(schema, options) {\n\treturn new JsonSchemaWrapper(schema, options);\n}\n//#endregion\nexport { toStandardSchema as n, JsonSchemaWrapper as t };\n\n//# sourceMappingURL=json-schema-R8yfooPa.js.map","import { r as __toESM, t as require_json_schema_traverse } from \"../../json-schema-traverse-B35mHRM8.js\";\nimport { n as ignoreOverride, t as esm_default } from \"../../esm-CWlHuVIx.js\";\n//#region src/standard-schema/adapters/zod-v3.ts\nvar import_json_schema_traverse = /* @__PURE__ */ __toESM(require_json_schema_traverse(), 1);\n/**\n* Target mapping from Standard Schema targets to zod-to-json-schema targets.\n*/\nconst TARGET_MAP = {\n\t\"draft-04\": \"jsonSchema7\",\n\t\"draft-07\": \"jsonSchema7\",\n\t\"draft-2020-12\": \"jsonSchema2019-09\",\n\t\"openapi-3.0\": \"openApi3\"\n};\n/**\n* Converts a Zod schema to JSON Schema using the specified target format.\n*\n* @param zodSchema - The Zod schema to convert\n* @param options - Standard Schema JSON options including the target format\n* @returns The JSON Schema representation\n* @throws Error if the target format is not supported\n*\n* @internal\n*/\nfunction convertToJsonSchema(zodSchema, options) {\n\tconst target = TARGET_MAP[options.target];\n\tif (!target) {\n\t\tconst supportedTargets = Object.keys(TARGET_MAP);\n\t\tthrow new Error(`Unsupported JSON Schema target: \"${options.target}\". Supported targets are: ${supportedTargets.join(\", \")}`);\n\t}\n\tconst jsonSchema = esm_default(zodSchema, {\n\t\t$refStrategy: \"none\",\n\t\ttarget,\n\t\toverride: (def) => {\n\t\t\tif (def.typeName === \"ZodDate\") return {\n\t\t\t\ttype: \"string\",\n\t\t\t\tformat: \"date-time\",\n\t\t\t\t\"x-date\": true\n\t\t\t};\n\t\t\treturn ignoreOverride;\n\t\t}\n\t});\n\t(0, import_json_schema_traverse.default)(jsonSchema, { cb: { pre: (schema) => {\n\t\tif (schema.type === \"string\" && schema.format === \"email\") schema.pattern = `^(?!\\\\.)(?!.*\\\\.\\\\.)([A-Za-z0-9_'+\\\\-\\\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\\\-]*\\\\.)+[A-Za-z]{2,}$`;\n\t} } });\n\treturn jsonSchema;\n}\n/**\n* Wraps a Zod v3 schema to implement the full @standard-schema/spec interface.\n*\n* While Zod v3 natively implements `StandardSchemaV1` (validation), it does not\n* implement `StandardJSONSchemaV1` (JSON Schema conversion). This adapter adds\n* the `jsonSchema` property to provide JSON Schema conversion capabilities.\n*\n* @typeParam T - The Zod schema type\n*\n* @example\n* ```typescript\n* import { z } from 'zod';\n* import { toStandardSchema } from '@mastra/schema-compat/adapters/zod-v3';\n*\n* const userSchema = z.object({\n*   name: z.string(),\n*   age: z.number().min(0),\n* });\n*\n* const standardSchema = toStandardSchema(userSchema);\n*\n* // Use validation (from StandardSchemaV1)\n* const result = standardSchema['~standard'].validate({ name: 'John', age: 30 });\n*\n* // Get JSON Schema (from StandardJSONSchemaV1)\n* const jsonSchema = standardSchema['~standard'].jsonSchema.output({ target: 'draft-07' });\n* ```\n*/\nfunction toStandardSchema(zodSchema) {\n\tconst wrapper = Object.create(zodSchema);\n\tconst existingStandard = zodSchema[\"~standard\"];\n\tconst jsonSchemaConverter = {\n\t\tinput: (options) => {\n\t\t\treturn convertToJsonSchema(zodSchema, options);\n\t\t},\n\t\toutput: (options) => {\n\t\t\treturn convertToJsonSchema(zodSchema, options);\n\t\t}\n\t};\n\tObject.defineProperty(wrapper, \"~standard\", {\n\t\tvalue: {\n\t\t\t...existingStandard,\n\t\t\tjsonSchema: jsonSchemaConverter\n\t\t},\n\t\twritable: false,\n\t\tenumerable: true,\n\t\tconfigurable: false\n\t});\n\treturn wrapper;\n}\n//#endregion\nexport { toStandardSchema };\n\n//# sourceMappingURL=zod-v3.js.map","import { patchRecordSchemas } from \"./zod-to-json.js\";\nimport { toStandardSchema as toStandardSchema$2 } from \"./standard-schema/adapters/ai-sdk.js\";\nimport { n as toStandardSchema$3 } from \"./json-schema-R8yfooPa.js\";\nimport { toStandardSchema as toStandardSchema$4 } from \"./standard-schema/adapters/zod-v3.js\";\nimport z3 from \"zod/v3\";\nimport { toJSONSchema } from \"zod/v4\";\n//#region src/standard-schema/adapters/zod-v4.ts\n/**\n* Supported JSON Schema targets for z.toJSONSchema().\n* Works with both real Zod v4 and Zod 3.25's v4 compat layer.\n*/\nconst SUPPORTED_TARGETS = /* @__PURE__ */ new Set([\n\t\"draft-07\",\n\t\"draft-04\",\n\t\"draft-2020-12\"\n]);\n/**\n* Maps Mastra's target names to Zod v4's expected format.\n* Zod v4's z.toJSONSchema() expects \"draft-7\" instead of \"draft-07\",\n* and \"draft-4\" instead of \"draft-04\".\n*/\nconst ZOD_V4_TARGET_MAP = {\n\t\"draft-07\": \"draft-7\",\n\t\"draft-04\": \"draft-4\"\n};\n/**\n* Converts a Zod v4 schema to JSON Schema using z.toJSONSchema().\n*\n* Works with both real Zod v4 and Zod 3.25's v4 compat layer.\n*\n* @internal\n*/\nfunction convertToJsonSchema(zodSchema, options, adapterOptions) {\n\tpatchRecordSchemas(zodSchema);\n\tconst target = SUPPORTED_TARGETS.has(options.target) ? options.target : \"draft-07\";\n\tconst jsonSchemaOptions = { target: ZOD_V4_TARGET_MAP[target] ?? target };\n\tif (adapterOptions.unrepresentable) jsonSchemaOptions.unrepresentable = adapterOptions.unrepresentable;\n\tif (adapterOptions.override) jsonSchemaOptions.override = adapterOptions.override;\n\treturn toJSONSchema(zodSchema, jsonSchemaOptions);\n}\n/**\n* Wraps a Zod v4 schema to implement the full @standard-schema/spec interface.\n*\n* Zod v4 schemas (and Zod 3.25's v4 compat layer) implement `StandardSchemaV1`\n* (validation) but may not implement `StandardJSONSchemaV1` (JSON Schema conversion)\n* on the `~standard` property. This adapter adds the `jsonSchema` property using\n* `z.toJSONSchema()` to provide JSON Schema conversion capabilities.\n*\n* @param zodSchema - A Zod v4 schema (has `_zod` property)\n* @param adapterOptions - Options passed to z.toJSONSchema()\n* @returns The schema wrapped with StandardSchemaWithJSON support\n*/\nfunction toStandardSchema$1(zodSchema, adapterOptions = {}) {\n\tconst wrapper = Object.create(zodSchema);\n\tconst existingStandard = zodSchema[\"~standard\"];\n\tconst jsonSchemaConverter = {\n\t\tinput: (options) => {\n\t\t\treturn convertToJsonSchema(zodSchema, options, adapterOptions);\n\t\t},\n\t\toutput: (options) => {\n\t\t\treturn convertToJsonSchema(zodSchema, options, adapterOptions);\n\t\t}\n\t};\n\tObject.defineProperty(wrapper, \"~standard\", {\n\t\tvalue: {\n\t\t\t...existingStandard,\n\t\t\tjsonSchema: jsonSchemaConverter\n\t\t},\n\t\twritable: false,\n\t\tenumerable: true,\n\t\tconfigurable: false\n\t});\n\treturn wrapper;\n}\n//#endregion\n//#region src/standard-schema/standard-schema.ts\n/**\n* Override function for JSON Schema conversion.\n* Handles types that Zod v4 cannot natively represent in JSON Schema:\n* - z.date() -> { type: 'string', format: 'date-time' }\n*/\nfunction jsonSchemaOverride(ctx) {\n\tconst zodSchema = ctx.zodSchema;\n\tif (ctx.jsonSchema.type === \"object\" && ctx.jsonSchema.properties !== void 0 && !ctx.jsonSchema.additionalProperties) ctx.jsonSchema.additionalProperties = false;\n\tif (zodSchema) {\n\t\tif (zodSchema?.type === \"date\" || zodSchema?._def?.typeName === \"ZodDate\") {\n\t\t\tif (zodSchema?.type === \"date\") {\n\t\t\t\tctx.jsonSchema.type = \"string\";\n\t\t\t\tctx.jsonSchema.format = \"date-time\";\n\t\t\t}\n\t\t\tctx.jsonSchema[\"x-date\"] = !zodSchema._zod?.def?.coerce;\n\t\t} else if (zodSchema?.type === \"object\" && zodSchema._zod?.def?.catchall?.type === \"unknown\") ctx.jsonSchema.additionalProperties = true;\n\t}\n}\n/**\n* Library options for JSON Schema conversion.\n* - unrepresentable: 'any' allows z.custom() and other unrepresentable types to be converted to {}\n*   instead of throwing \"Custom types cannot be represented in JSON Schema\"\n* - override: converts z.date() to { type: 'string', format: 'date-time' }\n*/\nconst JSON_SCHEMA_LIBRARY_OPTIONS = {\n\tunrepresentable: \"any\",\n\toverride: jsonSchemaOverride\n};\nfunction isVercelSchema(schema) {\n\treturn typeof schema === \"object\" && schema !== null && \"_type\" in schema && \"jsonSchema\" in schema && typeof schema.jsonSchema === \"object\";\n}\n/**\n* Check if a schema is Zod v4 (has _zod property which is v4-only)\n*/\nfunction isZodV4(schema) {\n\treturn typeof schema === \"object\" && schema !== null && \"_zod\" in schema;\n}\n/**\n* Check if a schema is Zod v3.\n*\n* Zod v3 can come from:\n* 1. The old standalone 'zod-v3' package\n* 2. The 'zod/v3' compat export from modern zod\n*\n* We detect Zod v3 by checking:\n* - Has ~standard.vendor === 'zod' (both v3 and v4 have this)\n* - Does NOT have ~standard.jsonSchema (only Zod v4 has native JSON Schema support)\n* - Does NOT have _zod property (only Zod v4 has this)\n*\n* Note: We can't use instanceof z3.ZodType because the old 'zod-v3' package\n* has a different prototype chain than 'zod/v3'.\n*/\nfunction isZodV3(schema) {\n\tif (schema === null || typeof schema !== \"object\") return false;\n\tif (isZodV4(schema)) return false;\n\tif (\"~standard\" in schema) {\n\t\tconst std = schema[\"~standard\"];\n\t\tif (typeof std === \"object\" && std !== null && std.vendor === \"zod\" && !(\"jsonSchema\" in std)) return true;\n\t}\n\treturn schema instanceof z3.ZodType;\n}\nfunction toStandardSchema(schema) {\n\tif (isZodV4(schema)) patchRecordSchemas(schema);\n\tif (isStandardSchemaWithJSON(schema)) return schema;\n\tif (isZodV4(schema)) return toStandardSchema$1(schema, {\n\t\tunrepresentable: JSON_SCHEMA_LIBRARY_OPTIONS.unrepresentable,\n\t\toverride: JSON_SCHEMA_LIBRARY_OPTIONS.override\n\t});\n\tif (isZodV3(schema)) return toStandardSchema$4(schema);\n\tif (isVercelSchema(schema)) return toStandardSchema$2(schema);\n\tif (schema === null || typeof schema !== \"object\" && typeof schema !== \"function\") throw new Error(`Unsupported schema type: ${typeof schema}`);\n\tif (typeof schema === \"function\") throw new Error(`Unsupported schema type: function (schema libraries should implement StandardSchemaWithJSON)`);\n\treturn toStandardSchema$3(schema);\n}\n/**\n* Type guard to check if a value implements the StandardSchemaV1 interface.\n*\n* @param value - The value to check\n* @returns True if the value implements StandardSchemaV1\n*\n* @example\n* ```typescript\n* import { isStandardSchema } from '@mastra/schema-compat';\n*\n* if (isStandardSchema(someValue)) {\n*   const result = someValue['~standard'].validate(input);\n* }\n* ```\n*/\nfunction isStandardSchema(value) {\n\tif (value === null || typeof value !== \"object\" && typeof value !== \"function\") return false;\n\tif (!(\"~standard\" in value)) return false;\n\tconst std = value[\"~standard\"];\n\treturn typeof std === \"object\" && std !== null && \"version\" in std && std.version === 1 && \"vendor\" in std && \"validate\" in std && typeof std.validate === \"function\";\n}\n/**\n* Type guard to check if a value implements the StandardJSONSchemaV1 interface.\n*\n* @param value - The value to check\n* @returns True if the value implements StandardJSONSchemaV1\n*\n* @example\n* ```typescript\n* import { isStandardJSONSchema } from '@mastra/schema-compat';\n*\n* if (isStandardJSONSchema(someValue)) {\n*   const jsonSchema = someValue['~standard'].jsonSchema.output({ target: 'draft-07' });\n* }\n* ```\n*/\nfunction isStandardJSONSchema(value) {\n\tif (value === null || typeof value !== \"object\" && typeof value !== \"function\") return false;\n\tif (!(\"~standard\" in value)) return false;\n\tconst std = value[\"~standard\"];\n\tif (typeof std !== \"object\" || std === null) return false;\n\tif (!(\"version\" in std) || std.version !== 1 || !(\"vendor\" in std)) return false;\n\tif (!(\"jsonSchema\" in std) || typeof std.jsonSchema !== \"object\") return false;\n\treturn typeof std.jsonSchema.input === \"function\" && typeof std.jsonSchema.output === \"function\";\n}\n/**\n* Type guard to check if a value implements both StandardSchemaV1 and StandardJSONSchemaV1.\n*\n* @param value - The value to check\n* @returns True if the value implements both interfaces\n*\n* @example\n* ```typescript\n* import { isStandardSchemaWithJSON } from '@mastra/schema-compat';\n*\n* if (isStandardSchemaWithJSON(someValue)) {\n*   // Can use both validation and JSON Schema conversion\n*   const result = someValue['~standard'].validate(input);\n*   const jsonSchema = someValue['~standard'].jsonSchema.output({ target: 'draft-07' });\n* }\n* ```\n*/\nfunction isStandardSchemaWithJSON(value) {\n\treturn isStandardSchema(value) && isStandardJSONSchema(value);\n}\n/**\n* Converts a StandardSchemaWithJSON to a JSON Schema.\n*\n* @param schema - The StandardSchemaWithJSON schema to convert\n* @param options - Conversion options\n* @param options.target - The JSON Schema target version (default: 'draft-07')\n* @param options.io - Whether to use input or output schema (default: 'output')\n*   - 'input': Use for tool parameters, function arguments, request bodies\n*   - 'output': Use for return types, response bodies\n* @returns The JSON Schema representation\n*\n* @example\n* ```typescript\n* import { standardSchemaToJSONSchema, toStandardSchema } from '@mastra/schema-compat';\n* import { z } from 'zod';\n*\n* const zodSchema = z.object({ name: z.string() });\n* const standardSchema = toStandardSchema(zodSchema);\n*\n* // For output types (default)\n* const outputSchema = standardSchemaToJSONSchema(standardSchema);\n*\n* // For input types (tool parameters)\n* const inputSchema = standardSchemaToJSONSchema(standardSchema, { io: 'input' });\n* ```\n*/\nfunction standardSchemaToJSONSchema(schema, options = {}) {\n\tconst { target = \"draft-07\", io = \"output\", override = JSON_SCHEMA_LIBRARY_OPTIONS.override } = options;\n\tconst jsonSchemaFn = schema[\"~standard\"].jsonSchema[io];\n\tlet jsonSchema = jsonSchemaFn({\n\t\ttarget,\n\t\tlibraryOptions: {\n\t\t\t...JSON_SCHEMA_LIBRARY_OPTIONS,\n\t\t\toverride\n\t\t}\n\t});\n\tjsonSchema = JSON.parse(JSON.stringify(jsonSchema));\n\treturn jsonSchema;\n}\n//#endregion\nexport { standardSchemaToJSONSchema as a, isStandardSchemaWithJSON as i, isStandardJSONSchema as n, toStandardSchema as o, isStandardSchema as r, JSON_SCHEMA_LIBRARY_OPTIONS as t };\n\n//# sourceMappingURL=schema-e0VHpMt0.js.map","// src/core/converter.ts\nimport { z as z14 } from \"zod/v4\";\n\n// src/handlers/primitive/type.ts\nimport { z } from \"zod/v4\";\nvar TypeHandler = class {\n  apply(types, schema) {\n    if (!schema.type) return;\n    const allowedTypes = Array.isArray(schema.type) ? schema.type : [schema.type];\n    const typeSet = new Set(allowedTypes);\n    if (!typeSet.has(\"string\")) {\n      types.string = false;\n    }\n    if (!typeSet.has(\"number\") && !typeSet.has(\"integer\")) {\n      types.number = false;\n    }\n    if (!typeSet.has(\"boolean\")) {\n      types.boolean = false;\n    }\n    if (!typeSet.has(\"null\")) {\n      types.null = false;\n    }\n    if (!typeSet.has(\"array\")) {\n      types.array = false;\n    }\n    if (!typeSet.has(\"object\")) {\n      types.object = false;\n    }\n    if (typeSet.has(\"integer\") && types.number !== false) {\n      const currentNumber = types.number || z.number();\n      if (currentNumber instanceof z.ZodNumber) {\n        types.number = currentNumber.int();\n      }\n    }\n  }\n};\n\n// src/handlers/primitive/const.ts\nimport { z as z2 } from \"zod/v4\";\nvar ConstHandler = class {\n  apply(types, schema) {\n    if (schema.const === void 0) return;\n    const constValue = schema.const;\n    types.string = false;\n    types.number = false;\n    types.boolean = false;\n    types.null = false;\n    types.array = false;\n    types.object = false;\n    if (typeof constValue === \"string\") {\n      types.string = z2.literal(constValue);\n    } else if (typeof constValue === \"number\") {\n      types.number = z2.literal(constValue);\n    } else if (typeof constValue === \"boolean\") {\n      types.boolean = z2.literal(constValue);\n    } else if (constValue === null) {\n      types.null = z2.null();\n    } else if (Array.isArray(constValue)) {\n      types.array = void 0;\n    } else if (typeof constValue === \"object\") {\n      types.object = void 0;\n    }\n  }\n};\n\n// src/handlers/primitive/enum.ts\nimport { z as z3 } from \"zod/v4\";\nvar EnumHandler = class {\n  apply(types, schema) {\n    if (!schema.enum) return;\n    if (schema.enum.length === 0) {\n      if (!schema.type) {\n        types.string = false;\n        types.number = false;\n        types.boolean = false;\n        types.null = false;\n        types.array = false;\n        types.object = false;\n      }\n      return;\n    }\n    const valuesByType = {\n      string: schema.enum.filter((v) => typeof v === \"string\"),\n      number: schema.enum.filter((v) => typeof v === \"number\"),\n      boolean: schema.enum.filter((v) => typeof v === \"boolean\"),\n      null: schema.enum.filter((v) => v === null),\n      array: schema.enum.filter((v) => Array.isArray(v)),\n      object: schema.enum.filter((v) => typeof v === \"object\" && v !== null && !Array.isArray(v))\n    };\n    types.string = this.createTypeSchema(valuesByType.string, \"string\");\n    types.number = this.createTypeSchema(valuesByType.number, \"number\");\n    types.boolean = this.createTypeSchema(valuesByType.boolean, \"boolean\");\n    types.null = valuesByType.null.length > 0 ? z3.null() : false;\n    types.array = valuesByType.array.length > 0 ? void 0 : false;\n    types.object = valuesByType.object.length > 0 ? void 0 : false;\n  }\n  createTypeSchema(values, type) {\n    if (values.length === 0) return false;\n    if (values.length === 1) {\n      return z3.literal(values[0]);\n    }\n    if (type === \"string\") {\n      return z3.enum(values);\n    }\n    if (type === \"number\") {\n      const [first, second, ...rest] = values;\n      return z3.union([z3.literal(first), z3.literal(second), ...rest.map((v) => z3.literal(v))]);\n    }\n    if (type === \"boolean\") {\n      return z3.union([z3.literal(true), z3.literal(false)]);\n    }\n    return false;\n  }\n};\n\n// src/handlers/primitive/file.ts\nimport { z as z4 } from \"zod/v4\";\nvar FileHandler = class {\n  apply(types, schema) {\n    const stringSchema = schema;\n    if (stringSchema.type === \"string\" && stringSchema.format === \"binary\" && stringSchema.contentEncoding === \"binary\") {\n      let fileSchema = z4.file();\n      if (stringSchema.minLength !== void 0) {\n        fileSchema = fileSchema.min(stringSchema.minLength);\n      }\n      if (stringSchema.maxLength !== void 0) {\n        fileSchema = fileSchema.max(stringSchema.maxLength);\n      }\n      if (stringSchema.contentMediaType !== void 0) {\n        fileSchema = fileSchema.mime(stringSchema.contentMediaType);\n      }\n      types.file = fileSchema;\n      types.string = false;\n    }\n  }\n};\n\n// src/handlers/primitive/string.ts\nimport { z as z5 } from \"zod/v4\";\nvar ImplicitStringHandler = class {\n  apply(types, schema) {\n    const stringSchema = schema;\n    if (schema.type === void 0 && (stringSchema.minLength !== void 0 || stringSchema.maxLength !== void 0 || stringSchema.pattern !== void 0)) {\n      if (types.string === void 0) {\n        types.string = z5.string();\n      }\n    }\n  }\n};\nvar MinLengthHandler = class {\n  apply(types, schema) {\n    const stringSchema = schema;\n    if (stringSchema.minLength === void 0) return;\n    if (types.string !== false) {\n      const currentString = types.string || z5.string();\n      if (currentString instanceof z5.ZodString) {\n        types.string = currentString.refine(\n          (value) => {\n            const graphemeLength = Array.from(value).length;\n            return graphemeLength >= stringSchema.minLength;\n          },\n          { message: `String must be at least ${stringSchema.minLength} characters long` }\n        );\n      }\n    }\n  }\n};\nvar MaxLengthHandler = class {\n  apply(types, schema) {\n    const stringSchema = schema;\n    if (stringSchema.maxLength === void 0) return;\n    if (types.string !== false) {\n      const currentString = types.string || z5.string();\n      if (currentString instanceof z5.ZodString) {\n        types.string = currentString.refine(\n          (value) => {\n            const graphemeLength = Array.from(value).length;\n            return graphemeLength <= stringSchema.maxLength;\n          },\n          { message: `String must be at most ${stringSchema.maxLength} characters long` }\n        );\n      }\n    }\n  }\n};\nvar PatternHandler = class {\n  apply(types, schema) {\n    const stringSchema = schema;\n    if (!stringSchema.pattern) return;\n    if (types.string !== false) {\n      const currentString = types.string || z5.string();\n      if (currentString instanceof z5.ZodString) {\n        const regex = new RegExp(stringSchema.pattern);\n        types.string = currentString.regex(regex);\n      }\n    }\n  }\n};\n\n// src/handlers/primitive/number.ts\nimport { z as z6 } from \"zod/v4\";\nvar MinimumHandler = class {\n  apply(types, schema) {\n    const numberSchema = schema;\n    if (numberSchema.minimum === void 0) return;\n    if (types.number !== false) {\n      const currentNumber = types.number || z6.number();\n      if (currentNumber instanceof z6.ZodNumber) {\n        types.number = currentNumber.min(numberSchema.minimum);\n      }\n    }\n  }\n};\nvar MaximumHandler = class {\n  apply(types, schema) {\n    const numberSchema = schema;\n    if (numberSchema.maximum === void 0) return;\n    if (types.number !== false) {\n      const currentNumber = types.number || z6.number();\n      if (currentNumber instanceof z6.ZodNumber) {\n        types.number = currentNumber.max(numberSchema.maximum);\n      }\n    }\n  }\n};\nvar ExclusiveMinimumHandler = class {\n  apply(types, schema) {\n    const numberSchema = schema;\n    if (numberSchema.exclusiveMinimum === void 0) return;\n    if (types.number !== false) {\n      const currentNumber = types.number || z6.number();\n      if (currentNumber instanceof z6.ZodNumber) {\n        if (typeof numberSchema.exclusiveMinimum === \"number\") {\n          types.number = currentNumber.gt(numberSchema.exclusiveMinimum);\n        } else {\n          types.number = false;\n        }\n      }\n    }\n  }\n};\nvar ExclusiveMaximumHandler = class {\n  apply(types, schema) {\n    const numberSchema = schema;\n    if (numberSchema.exclusiveMaximum === void 0) return;\n    if (types.number !== false) {\n      const currentNumber = types.number || z6.number();\n      if (currentNumber instanceof z6.ZodNumber) {\n        if (typeof numberSchema.exclusiveMaximum === \"number\") {\n          types.number = currentNumber.lt(numberSchema.exclusiveMaximum);\n        } else {\n          types.number = false;\n        }\n      }\n    }\n  }\n};\nvar MultipleOfHandler = class {\n  apply(types, schema) {\n    const numberSchema = schema;\n    if (numberSchema.multipleOf === void 0) return;\n    if (types.number !== false) {\n      const currentNumber = types.number || z6.number();\n      if (currentNumber instanceof z6.ZodNumber) {\n        types.number = currentNumber.refine(\n          (value) => {\n            if (numberSchema.multipleOf === 0) return false;\n            const quotient = value / numberSchema.multipleOf;\n            const rounded = Math.round(quotient);\n            const tolerance = Math.min(\n              Math.abs(value) * Number.EPSILON * 10,\n              Math.abs(numberSchema.multipleOf) * Number.EPSILON * 10\n            );\n            return Math.abs(quotient - rounded) <= tolerance / Math.abs(numberSchema.multipleOf);\n          },\n          { message: `Must be a multiple of ${numberSchema.multipleOf}` }\n        );\n      }\n    }\n  }\n};\n\n// src/handlers/primitive/array.ts\nimport { z as z7 } from \"zod/v4\";\nvar ImplicitArrayHandler = class {\n  apply(types, schema) {\n    const arraySchema = schema;\n    if (schema.type === void 0 && (arraySchema.minItems !== void 0 || arraySchema.maxItems !== void 0 || arraySchema.items !== void 0 || arraySchema.prefixItems !== void 0)) {\n      if (types.array === void 0) {\n        types.array = z7.array(z7.any());\n      }\n    }\n  }\n};\nvar MinItemsHandler = class {\n  apply(types, schema) {\n    const arraySchema = schema;\n    if (arraySchema.minItems === void 0) return;\n    if (types.array !== false) {\n      types.array = (types.array || z7.array(z7.any())).min(arraySchema.minItems);\n    }\n  }\n};\nvar MaxItemsHandler = class {\n  apply(types, schema) {\n    const arraySchema = schema;\n    if (arraySchema.maxItems === void 0) return;\n    if (types.array !== false) {\n      types.array = (types.array || z7.array(z7.any())).max(arraySchema.maxItems);\n    }\n  }\n};\nvar ItemsHandler = class {\n  apply(types, schema) {\n    const arraySchema = schema;\n    if (types.array === false) return;\n    if (Array.isArray(arraySchema.items)) {\n      types.array = types.array || z7.array(z7.any());\n    } else if (arraySchema.items && typeof arraySchema.items !== \"boolean\" && !arraySchema.prefixItems) {\n      const itemSchema = convertJsonSchemaToZod(arraySchema.items);\n      let newArray = z7.array(itemSchema);\n      if (types.array && types.array instanceof z7.ZodArray) {\n        const existingDef = types.array._def;\n        if (existingDef.checks) {\n          existingDef.checks.forEach((check) => {\n            if (check._zod && check._zod.def) {\n              const def = check._zod.def;\n              if (def.check === \"min_length\" && def.minimum !== void 0) {\n                newArray = newArray.min(def.minimum);\n              } else if (def.check === \"max_length\" && def.maximum !== void 0) {\n                newArray = newArray.max(def.maximum);\n              }\n            }\n          });\n        }\n      }\n      types.array = newArray;\n    } else if (typeof arraySchema.items === \"boolean\" && arraySchema.items === false) {\n      if (!arraySchema.prefixItems) {\n        types.array = z7.array(z7.any()).max(0);\n      } else {\n        types.array = types.array || z7.array(z7.any());\n      }\n    } else if (typeof arraySchema.items === \"boolean\" && arraySchema.items === true) {\n      types.array = types.array || z7.array(z7.any());\n    } else if (arraySchema.prefixItems) {\n      types.array = types.array || z7.array(z7.any());\n    }\n  }\n};\n\n// src/handlers/primitive/tuple.ts\nimport { z as z8 } from \"zod/v4\";\nvar TupleHandler = class {\n  apply(types, schema) {\n    if (schema.type !== \"array\") return;\n    const arraySchema = schema;\n    if (!Array.isArray(arraySchema.items)) return;\n    if (types.array === false) return;\n    const itemSchemas = arraySchema.items.map((itemSchema) => convertJsonSchemaToZod(itemSchema));\n    let tuple;\n    if (itemSchemas.length === 0) {\n      tuple = z8.tuple([]);\n    } else {\n      tuple = z8.tuple(itemSchemas);\n    }\n    if (arraySchema.minItems !== void 0 && arraySchema.minItems > itemSchemas.length) {\n      tuple = false;\n    }\n    if (arraySchema.maxItems !== void 0 && arraySchema.maxItems < itemSchemas.length) {\n      tuple = false;\n    }\n    types.tuple = tuple;\n    types.array = false;\n  }\n};\n\n// src/handlers/primitive/object.ts\nimport { z as z9 } from \"zod/v4\";\nvar PropertiesHandler = class {\n  apply(types, schema) {\n    const objectSchema = schema;\n    if (types.object === false) return;\n    if (objectSchema.properties || objectSchema.required || objectSchema.additionalProperties !== void 0) {\n      types.object = types.object || z9.object({}).passthrough();\n    }\n  }\n};\nvar ImplicitObjectHandler = class {\n  apply(types, schema) {\n    const objectSchema = schema;\n    if (schema.type === void 0 && (objectSchema.maxProperties !== void 0 || objectSchema.minProperties !== void 0)) {\n      if (types.object === void 0) {\n        types.object = z9.object({}).passthrough();\n      }\n    }\n  }\n};\nvar MaxPropertiesHandler = class {\n  apply(types, schema) {\n    const objectSchema = schema;\n    if (objectSchema.maxProperties === void 0) return;\n    if (types.object !== false) {\n      const baseObject = types.object || z9.object({}).passthrough();\n      types.object = baseObject.refine(\n        (obj) => Object.keys(obj).length <= objectSchema.maxProperties,\n        { message: `Object must have at most ${objectSchema.maxProperties} properties` }\n      );\n    }\n  }\n};\nvar MinPropertiesHandler = class {\n  apply(types, schema) {\n    const objectSchema = schema;\n    if (objectSchema.minProperties === void 0) return;\n    if (types.object !== false) {\n      const baseObject = types.object || z9.object({}).passthrough();\n      types.object = baseObject.refine(\n        (obj) => Object.keys(obj).length >= objectSchema.minProperties,\n        { message: `Object must have at least ${objectSchema.minProperties} properties` }\n      );\n    }\n  }\n};\n\n// src/core/utils.ts\nfunction deepEqual(a, b) {\n  if (a === b) return true;\n  if (a == null || b == null) return a === b;\n  if (typeof a !== typeof b) return false;\n  if (Array.isArray(a) && Array.isArray(b)) {\n    if (a.length !== b.length) return false;\n    return a.every((item, index) => deepEqual(item, b[index]));\n  }\n  if (typeof a === \"object\" && typeof b === \"object\") {\n    const keysA = Object.keys(a);\n    const keysB = Object.keys(b);\n    if (keysA.length !== keysB.length) return false;\n    return keysA.every((key) => keysB.includes(key) && deepEqual(a[key], b[key]));\n  }\n  return false;\n}\nfunction createUniqueItemsValidator() {\n  return (value) => {\n    if (!Array.isArray(value)) {\n      return true;\n    }\n    const seen = [];\n    return value.every((item) => {\n      const isDuplicate = seen.some((seenItem) => deepEqual(item, seenItem));\n      if (isDuplicate) {\n        return false;\n      }\n      seen.push(item);\n      return true;\n    });\n  };\n}\nfunction isValidWithSchema(schema, value) {\n  return schema.safeParse(value).success;\n}\n\n// src/handlers/refinement/not.ts\nvar NotHandler = class {\n  apply(zodSchema, schema) {\n    if (!schema.not) return zodSchema;\n    const notSchema = convertJsonSchemaToZod(schema.not);\n    return zodSchema.refine(\n      (value) => !isValidWithSchema(notSchema, value),\n      { message: \"Value must not match the 'not' schema\" }\n    );\n  }\n};\n\n// src/handlers/refinement/uniqueItems.ts\nvar UniqueItemsHandler = class {\n  apply(zodSchema, schema) {\n    const arraySchema = schema;\n    if (arraySchema.uniqueItems !== true) return zodSchema;\n    return zodSchema.refine(createUniqueItemsValidator(), {\n      message: \"Array items must be unique\"\n    });\n  }\n};\n\n// src/handlers/refinement/allOf.ts\nimport { z as z10 } from \"zod/v4\";\nvar AllOfHandler = class {\n  apply(zodSchema, schema) {\n    if (!schema.allOf || schema.allOf.length === 0) return zodSchema;\n    const allOfSchemas = schema.allOf.map((s) => convertJsonSchemaToZod(s));\n    return allOfSchemas.reduce(\n      (acc, s) => z10.intersection(acc, s),\n      zodSchema\n    );\n  }\n};\n\n// src/handlers/refinement/anyOf.ts\nimport { z as z11 } from \"zod/v4\";\nvar AnyOfHandler = class {\n  apply(zodSchema, schema) {\n    if (!schema.anyOf || schema.anyOf.length === 0) return zodSchema;\n    const anyOfSchema = schema.anyOf.length === 1 ? convertJsonSchemaToZod(schema.anyOf[0]) : z11.union([\n      convertJsonSchemaToZod(schema.anyOf[0]),\n      convertJsonSchemaToZod(schema.anyOf[1]),\n      ...schema.anyOf.slice(2).map((s) => convertJsonSchemaToZod(s))\n    ]);\n    return z11.intersection(zodSchema, anyOfSchema);\n  }\n};\n\n// src/handlers/refinement/oneOf.ts\nvar OneOfHandler = class {\n  apply(zodSchema, schema) {\n    if (!schema.oneOf || schema.oneOf.length === 0) return zodSchema;\n    const oneOfSchemas = schema.oneOf.map((s) => convertJsonSchemaToZod(s));\n    return zodSchema.refine(\n      (value) => {\n        let validCount = 0;\n        for (const oneOfSchema of oneOfSchemas) {\n          const result = oneOfSchema.safeParse(value);\n          if (result.success) {\n            validCount++;\n            if (validCount > 1) return false;\n          }\n        }\n        return validCount === 1;\n      },\n      { message: \"Value must match exactly one of the oneOf schemas\" }\n    );\n  }\n};\n\n// src/handlers/refinement/arrayItems.ts\nvar PrefixItemsHandler = class {\n  apply(zodSchema, schema) {\n    const arraySchema = schema;\n    if (arraySchema.prefixItems && Array.isArray(arraySchema.prefixItems)) {\n      const prefixItems = arraySchema.prefixItems;\n      const prefixSchemas = prefixItems.map((itemSchema) => convertJsonSchemaToZod(itemSchema));\n      return zodSchema.refine(\n        (value) => {\n          if (!Array.isArray(value)) return true;\n          for (let i = 0; i < Math.min(value.length, prefixSchemas.length); i++) {\n            if (!isValidWithSchema(prefixSchemas[i], value[i])) {\n              return false;\n            }\n          }\n          if (value.length > prefixSchemas.length) {\n            if (typeof arraySchema.items === \"boolean\" && arraySchema.items === false) {\n              return false;\n            } else if (arraySchema.items && typeof arraySchema.items === \"object\" && !Array.isArray(arraySchema.items)) {\n              const additionalItemSchema = convertJsonSchemaToZod(arraySchema.items);\n              for (let i = prefixSchemas.length; i < value.length; i++) {\n                if (!isValidWithSchema(additionalItemSchema, value[i])) {\n                  return false;\n                }\n              }\n            }\n          }\n          return true;\n        },\n        { message: \"Array does not match prefixItems schema\" }\n      );\n    }\n    return zodSchema;\n  }\n};\n\n// src/handlers/refinement/objectProperties.ts\nimport { z as z12 } from \"zod/v4\";\nvar ObjectPropertiesHandler = class {\n  apply(zodSchema, schema) {\n    const objectSchema = schema;\n    if (!objectSchema.properties && !objectSchema.required && objectSchema.additionalProperties !== false) {\n      return zodSchema;\n    }\n    if (zodSchema instanceof z12.ZodObject || zodSchema instanceof z12.ZodRecord) {\n      const shape = {};\n      if (objectSchema.properties) {\n        for (const [key, propSchema] of Object.entries(objectSchema.properties)) {\n          if (propSchema !== void 0) {\n            shape[key] = convertJsonSchemaToZod(propSchema);\n          }\n        }\n      }\n      if (objectSchema.required && Array.isArray(objectSchema.required)) {\n        const required = new Set(objectSchema.required);\n        for (const key of Object.keys(shape)) {\n          if (!required.has(key)) {\n            shape[key] = shape[key].optional();\n          }\n        }\n      } else {\n        for (const key of Object.keys(shape)) {\n          shape[key] = shape[key].optional();\n        }\n      }\n      if (objectSchema.additionalProperties === false) {\n        return z12.object(shape);\n      } else {\n        return z12.object(shape).passthrough();\n      }\n    }\n    return zodSchema.refine(\n      (value) => {\n        if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n          return true;\n        }\n        if (objectSchema.properties) {\n          for (const [propName, propSchema] of Object.entries(objectSchema.properties)) {\n            if (propSchema !== void 0) {\n              const propExists = Object.getOwnPropertyDescriptor(value, propName) !== void 0;\n              if (propExists) {\n                const zodPropSchema = convertJsonSchemaToZod(propSchema);\n                const propResult = zodPropSchema.safeParse(value[propName]);\n                if (!propResult.success) {\n                  return false;\n                }\n              }\n            }\n          }\n        }\n        if (objectSchema.required && Array.isArray(objectSchema.required)) {\n          for (const requiredProp of objectSchema.required) {\n            const propExists = Object.getOwnPropertyDescriptor(value, requiredProp) !== void 0;\n            if (!propExists) {\n              return false;\n            }\n          }\n        }\n        if (objectSchema.additionalProperties === false && objectSchema.properties) {\n          const allowedProps = new Set(Object.keys(objectSchema.properties));\n          for (const prop in value) {\n            if (!allowedProps.has(prop)) {\n              return false;\n            }\n          }\n        }\n        return true;\n      },\n      { message: \"Object constraints validation failed\" }\n    );\n  }\n};\n\n// src/handlers/refinement/enumComplex.ts\nvar EnumComplexHandler = class {\n  apply(zodSchema, schema) {\n    if (!schema.enum || schema.enum.length === 0) return zodSchema;\n    const complexValues = schema.enum.filter(\n      (v) => Array.isArray(v) || typeof v === \"object\" && v !== null\n    );\n    if (complexValues.length === 0) return zodSchema;\n    return zodSchema.refine(\n      (value) => {\n        if (typeof value !== \"object\" || value === null) return true;\n        return complexValues.some(\n          (enumValue) => deepEqual(value, enumValue)\n        );\n      },\n      { message: \"Value must match one of the enum values\" }\n    );\n  }\n};\n\n// src/handlers/refinement/constComplex.ts\nvar ConstComplexHandler = class {\n  apply(zodSchema, schema) {\n    if (schema.const === void 0) return zodSchema;\n    const constValue = schema.const;\n    if (typeof constValue !== \"object\" || constValue === null) {\n      return zodSchema;\n    }\n    return zodSchema.refine(\n      (value) => deepEqual(value, constValue),\n      { message: \"Value must equal the const value\" }\n    );\n  }\n};\n\n// src/handlers/refinement/metadata.ts\nvar MetadataHandler = class {\n  apply(zodSchema, schema) {\n    if (schema.description) {\n      zodSchema = zodSchema.describe(schema.description);\n    }\n    return zodSchema;\n  }\n};\n\n// src/handlers/refinement/protoRequired.ts\nimport { z as z13 } from \"zod/v4\";\nvar ProtoRequiredHandler = class {\n  apply(zodSchema, schema) {\n    var _a;\n    const objectSchema = schema;\n    if (!((_a = objectSchema.required) == null ? void 0 : _a.includes(\"__proto__\")) || schema.type !== void 0) {\n      return zodSchema;\n    }\n    return z13.any().refine(\n      (value) => this.validateRequired(value, objectSchema.required),\n      { message: \"Missing required properties\" }\n    );\n  }\n  validateRequired(value, required) {\n    if (typeof value !== \"object\" || value === null || Array.isArray(value)) {\n      return true;\n    }\n    return required.every(\n      (prop) => Object.prototype.hasOwnProperty.call(value, prop)\n    );\n  }\n};\n\n// src/handlers/refinement/contains.ts\nvar ContainsHandler = class {\n  apply(zodSchema, schema) {\n    var _a;\n    const arraySchema = schema;\n    if (arraySchema.contains === void 0) return zodSchema;\n    const containsSchema = convertJsonSchemaToZod(arraySchema.contains);\n    const minContains = (_a = arraySchema.minContains) != null ? _a : 1;\n    const maxContains = arraySchema.maxContains;\n    return zodSchema.refine(\n      (value) => {\n        if (!Array.isArray(value)) {\n          return true;\n        }\n        let matchCount = 0;\n        for (const item of value) {\n          if (isValidWithSchema(containsSchema, item)) {\n            matchCount++;\n          }\n        }\n        if (matchCount < minContains) {\n          return false;\n        }\n        if (maxContains !== void 0 && matchCount > maxContains) {\n          return false;\n        }\n        return true;\n      },\n      { message: \"Array must contain required items matching the schema\" }\n    );\n  }\n};\n\n// src/handlers/refinement/default.ts\nvar DefaultHandler = class {\n  apply(zodSchema, schema) {\n    const { default: v } = schema;\n    if (v === void 0) return zodSchema;\n    if (!zodSchema.safeParse(v).success) {\n      return zodSchema;\n    }\n    return zodSchema.default(v);\n  }\n};\n\n// src/core/converter.ts\nvar primitiveHandlers = [\n  // Type constraints - should run first\n  new ConstHandler(),\n  new EnumHandler(),\n  new TypeHandler(),\n  // File schema detection - must run before string constraints\n  new FileHandler(),\n  // Implicit type detection - must run before other constraints\n  new ImplicitStringHandler(),\n  new ImplicitArrayHandler(),\n  new ImplicitObjectHandler(),\n  // String constraints\n  new MinLengthHandler(),\n  new MaxLengthHandler(),\n  new PatternHandler(),\n  // Number constraints\n  new MinimumHandler(),\n  new MaximumHandler(),\n  new ExclusiveMinimumHandler(),\n  new ExclusiveMaximumHandler(),\n  new MultipleOfHandler(),\n  // Array constraints - TupleHandler must run before ItemsHandler\n  new TupleHandler(),\n  new MinItemsHandler(),\n  new MaxItemsHandler(),\n  new ItemsHandler(),\n  // Object constraints\n  new MaxPropertiesHandler(),\n  new MinPropertiesHandler(),\n  new PropertiesHandler()\n];\nvar refinementHandlers = [\n  // Handle special cases first\n  new ProtoRequiredHandler(),\n  new EnumComplexHandler(),\n  new ConstComplexHandler(),\n  // Logical combinations\n  new AllOfHandler(),\n  new AnyOfHandler(),\n  new OneOfHandler(),\n  // Type-specific refinements\n  new PrefixItemsHandler(),\n  new ObjectPropertiesHandler(),\n  // Array refinements\n  new ContainsHandler(),\n  // Other refinements\n  new NotHandler(),\n  new UniqueItemsHandler(),\n  new DefaultHandler(),\n  // Metadata last\n  new MetadataHandler()\n];\nfunction convertJsonSchemaToZod(schema) {\n  if (typeof schema === \"boolean\") {\n    return schema ? z14.any() : z14.never();\n  }\n  const types = {};\n  for (const handler of primitiveHandlers) {\n    handler.apply(types, schema);\n  }\n  const allowedSchemas = [];\n  if (types.string !== false) {\n    allowedSchemas.push(types.string || z14.string());\n  }\n  if (types.number !== false) {\n    allowedSchemas.push(types.number || z14.number());\n  }\n  if (types.boolean !== false) {\n    allowedSchemas.push(types.boolean || z14.boolean());\n  }\n  if (types.null !== false) {\n    allowedSchemas.push(types.null || z14.null());\n  }\n  if (types.array !== false) {\n    allowedSchemas.push(types.array || z14.array(z14.any()));\n  }\n  if (types.tuple !== false && types.tuple !== void 0) {\n    allowedSchemas.push(types.tuple);\n  }\n  if (types.object !== false) {\n    if (types.object) {\n      allowedSchemas.push(types.object);\n    } else {\n      const objectSchema = z14.custom((val) => {\n        return typeof val === \"object\" && val !== null && !Array.isArray(val);\n      }, \"Must be an object, not an array\");\n      allowedSchemas.push(objectSchema);\n    }\n  }\n  if (types.file !== false && types.file !== void 0) {\n    allowedSchemas.push(types.file);\n  }\n  let zodSchema;\n  if (allowedSchemas.length === 0) {\n    zodSchema = z14.never();\n  } else if (allowedSchemas.length === 1) {\n    zodSchema = allowedSchemas[0];\n  } else {\n    const hasConstraints = Object.keys(schema).some(\n      (key) => key !== \"$schema\" && key !== \"title\" && key !== \"description\"\n    );\n    if (!hasConstraints) {\n      zodSchema = z14.any();\n    } else {\n      zodSchema = z14.union(allowedSchemas);\n    }\n  }\n  for (const handler of refinementHandlers) {\n    zodSchema = handler.apply(zodSchema, schema);\n  }\n  return zodSchema;\n}\n\n// src/index.ts\nfunction jsonSchemaObjectToZodRawShape(schema) {\n  var _a;\n  const raw = {};\n  const requiredArray = Array.isArray(schema.required) ? schema.required : [];\n  const requiredFields = new Set(requiredArray);\n  for (const [key, value] of Object.entries((_a = schema.properties) != null ? _a : {})) {\n    if (value === void 0) continue;\n    let zodType = convertJsonSchemaToZod(value);\n    if (requiredArray.length > 0) {\n      if (!requiredFields.has(key)) {\n        zodType = zodType.optional();\n      }\n    } else {\n      zodType = zodType.optional();\n    }\n    raw[key] = zodType;\n  }\n  return raw;\n}\nexport {\n  convertJsonSchemaToZod,\n  createUniqueItemsValidator,\n  isValidWithSchema,\n  jsonSchemaObjectToZodRawShape\n};\n","import { r as __toESM$1, t as require_json_schema_traverse } from \"./json-schema-traverse-B35mHRM8.js\";\nimport { ensureAllPropertiesRequired, prepareJsonSchemaForOpenAIStrictMode, zodToJsonSchema as zodToJsonSchema$1 } from \"./zod-to-json.js\";\nimport { a as standardSchemaToJSONSchema, i as isStandardSchemaWithJSON, n as isStandardJSONSchema, o as toStandardSchema, r as isStandardSchema, t as JSON_SCHEMA_LIBRARY_OPTIONS } from \"./schema-e0VHpMt0.js\";\nimport { ZodArray, ZodDate, ZodDefault, ZodFirstPartyTypeKind, ZodIntersection, ZodNull, ZodNullable, ZodNumber, ZodObject, ZodOptional, ZodString, ZodUnion, z } from \"zod/v3\";\nimport { z as z$1 } from \"zod\";\nimport { convertJsonSchemaToZod } from \"zod-from-json-schema\";\nimport { ZodArray as ZodArray$1, ZodDate as ZodDate$1, ZodDefault as ZodDefault$1, ZodIntersection as ZodIntersection$1, ZodNull as ZodNull$1, ZodNullable as ZodNullable$1, ZodNumber as ZodNumber$1, ZodObject as ZodObject$1, ZodOptional as ZodOptional$1, ZodString as ZodString$1, ZodUnion as ZodUnion$1, z as z$2 } from \"zod/v4\";\n//#region ../../../../../setup-pnpm/node_modules/.bin/store/v11/links/@/zod-from-json-schema/0.0.5/8e273a13436172e49bb0898e3f9caf0fd3966851d12111764522ea958a085aeb/node_modules/zod-from-json-schema/dist/index.mjs\nfunction convertJsonSchemaToZod$1(schema) {\n\tfunction addMetadata(zodSchema, jsonSchema) {\n\t\tif (jsonSchema.description) zodSchema = zodSchema.describe(jsonSchema.description);\n\t\treturn zodSchema;\n\t}\n\tif (schema.const !== void 0) {\n\t\tif (typeof schema.const === \"string\") return addMetadata(z$1.literal(schema.const), schema);\n\t\telse if (typeof schema.const === \"number\") return addMetadata(z$1.literal(schema.const), schema);\n\t\telse if (typeof schema.const === \"boolean\") return addMetadata(z$1.literal(schema.const), schema);\n\t\telse if (schema.const === null) return addMetadata(z$1.null(), schema);\n\t\treturn addMetadata(z$1.literal(schema.const), schema);\n\t}\n\tif (schema.type) switch (schema.type) {\n\t\tcase \"string\": {\n\t\t\tif (schema.enum) {\n\t\t\t\tif (schema.enum.length === 0) return addMetadata(z$1.string(), schema);\n\t\t\t\treturn addMetadata(z$1.enum(schema.enum), schema);\n\t\t\t}\n\t\t\tlet stringSchema = z$1.string();\n\t\t\tif (schema.minLength !== void 0) stringSchema = stringSchema.min(schema.minLength);\n\t\t\tif (schema.maxLength !== void 0) stringSchema = stringSchema.max(schema.maxLength);\n\t\t\tif (schema.pattern !== void 0) {\n\t\t\t\tconst regex = new RegExp(schema.pattern);\n\t\t\t\tstringSchema = stringSchema.regex(regex);\n\t\t\t}\n\t\t\treturn addMetadata(stringSchema, schema);\n\t\t}\n\t\tcase \"number\":\n\t\tcase \"integer\": {\n\t\t\tif (schema.enum) {\n\t\t\t\tif (schema.enum.length === 0) return addMetadata(z$1.number(), schema);\n\t\t\t\tconst options = schema.enum.map((val) => z$1.literal(val));\n\t\t\t\tif (options.length === 1) return addMetadata(options[0], schema);\n\t\t\t\tif (options.length >= 2) return addMetadata(z$1.union([\n\t\t\t\t\toptions[0],\n\t\t\t\t\toptions[1],\n\t\t\t\t\t...options.slice(2)\n\t\t\t\t]), schema);\n\t\t\t}\n\t\t\tlet numberSchema = schema.type === \"integer\" ? z$1.number().int() : z$1.number();\n\t\t\tif (schema.minimum !== void 0) numberSchema = numberSchema.min(schema.minimum);\n\t\t\tif (schema.maximum !== void 0) numberSchema = numberSchema.max(schema.maximum);\n\t\t\tif (schema.exclusiveMinimum !== void 0) numberSchema = numberSchema.gt(schema.exclusiveMinimum);\n\t\t\tif (schema.exclusiveMaximum !== void 0) numberSchema = numberSchema.lt(schema.exclusiveMaximum);\n\t\t\tif (schema.multipleOf !== void 0) numberSchema = numberSchema.multipleOf(schema.multipleOf);\n\t\t\treturn addMetadata(numberSchema, schema);\n\t\t}\n\t\tcase \"boolean\":\n\t\t\tif (schema.enum) {\n\t\t\t\tif (schema.enum.length === 0) return addMetadata(z$1.boolean(), schema);\n\t\t\t\tconst options = schema.enum.map((val) => z$1.literal(val));\n\t\t\t\tif (options.length === 1) return addMetadata(options[0], schema);\n\t\t\t\tif (options.length >= 2) return addMetadata(z$1.union([\n\t\t\t\t\toptions[0],\n\t\t\t\t\toptions[1],\n\t\t\t\t\t...options.slice(2)\n\t\t\t\t]), schema);\n\t\t\t}\n\t\t\treturn addMetadata(z$1.boolean(), schema);\n\t\tcase \"null\": return addMetadata(z$1.null(), schema);\n\t\tcase \"object\":\n\t\t\tif (schema.properties) {\n\t\t\t\tconst shape = {};\n\t\t\t\tfor (const [key, propSchema] of Object.entries(schema.properties)) shape[key] = convertJsonSchemaToZod$1(propSchema);\n\t\t\t\tif (schema.required && Array.isArray(schema.required)) {\n\t\t\t\t\tconst required = new Set(schema.required);\n\t\t\t\t\tfor (const key of Object.keys(shape)) if (!required.has(key)) shape[key] = shape[key].optional();\n\t\t\t\t} else for (const key of Object.keys(shape)) shape[key] = shape[key].optional();\n\t\t\t\tlet zodSchema;\n\t\t\t\tif (schema.additionalProperties !== false) zodSchema = z$1.object(shape).passthrough();\n\t\t\t\telse zodSchema = z$1.object(shape);\n\t\t\t\treturn addMetadata(zodSchema, schema);\n\t\t\t}\n\t\t\treturn addMetadata(z$1.object({}), schema);\n\t\tcase \"array\": {\n\t\t\tlet arraySchema;\n\t\t\tif (schema.items) arraySchema = z$1.array(convertJsonSchemaToZod$1(schema.items));\n\t\t\telse arraySchema = z$1.array(z$1.any());\n\t\t\tif (schema.minItems !== void 0) arraySchema = arraySchema.min(schema.minItems);\n\t\t\tif (schema.maxItems !== void 0) arraySchema = arraySchema.max(schema.maxItems);\n\t\t\tif (schema.uniqueItems === true) arraySchema = arraySchema.refine((items) => {\n\t\t\t\tconst seen = /* @__PURE__ */ new Set();\n\t\t\t\treturn items.every((item) => {\n\t\t\t\t\tif (typeof item === \"string\" || typeof item === \"number\" || typeof item === \"boolean\") {\n\t\t\t\t\t\tif (seen.has(item)) return false;\n\t\t\t\t\t\tseen.add(item);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\tconst serialized = JSON.stringify(item);\n\t\t\t\t\tif (seen.has(serialized)) return false;\n\t\t\t\t\tseen.add(serialized);\n\t\t\t\t\treturn true;\n\t\t\t\t});\n\t\t\t}, { message: \"Array items must be unique\" });\n\t\t\treturn addMetadata(arraySchema, schema);\n\t\t}\n\t}\n\tif (schema.enum) {\n\t\tif (schema.enum.length === 0) return addMetadata(z$1.never(), schema);\n\t\tif (schema.enum.every((val) => typeof val === \"string\")) return addMetadata(z$1.enum(schema.enum), schema);\n\t\telse {\n\t\t\tconst options = schema.enum.map((val) => z$1.literal(val));\n\t\t\tif (options.length === 1) return addMetadata(options[0], schema);\n\t\t\tif (options.length >= 2) return addMetadata(z$1.union([\n\t\t\t\toptions[0],\n\t\t\t\toptions[1],\n\t\t\t\t...options.slice(2)\n\t\t\t]), schema);\n\t\t}\n\t}\n\tif (schema.anyOf && schema.anyOf.length >= 2) {\n\t\tconst schemas = schema.anyOf.map(convertJsonSchemaToZod$1);\n\t\treturn addMetadata(z$1.union([\n\t\t\tschemas[0],\n\t\t\tschemas[1],\n\t\t\t...schemas.slice(2)\n\t\t]), schema);\n\t}\n\tif (schema.allOf) return addMetadata(schema.allOf.reduce((acc, s) => z$1.intersection(acc, convertJsonSchemaToZod$1(s)), z$1.object({})), schema);\n\tif (schema.oneOf && schema.oneOf.length >= 2) {\n\t\tconst schemas = schema.oneOf.map(convertJsonSchemaToZod$1);\n\t\treturn addMetadata(z$1.union([\n\t\t\tschemas[0],\n\t\t\tschemas[1],\n\t\t\t...schemas.slice(2)\n\t\t]), schema);\n\t}\n\treturn addMetadata(z$1.any(), schema);\n}\n//#endregion\n//#region ../_vendored/ai_v4/dist/dist-Cm5DZgxA.js\nvar marker$1 = \"vercel.ai.error\";\nvar symbol$1 = Symbol.for(marker$1);\nvar _a$1;\nvar _AISDKError = class _AISDKError extends Error {\n\t/**\n\t* Creates an AI SDK Error.\n\t*\n\t* @param {Object} params - The parameters for creating the error.\n\t* @param {string} params.name - The name of the error.\n\t* @param {string} params.message - The error message.\n\t* @param {unknown} [params.cause] - The underlying cause of the error.\n\t*/\n\tconstructor({ name: name14, message, cause }) {\n\t\tsuper(message);\n\t\tthis[_a$1] = true;\n\t\tthis.name = name14;\n\t\tthis.cause = cause;\n\t}\n\t/**\n\t* Checks if the given error is an AI SDK Error.\n\t* @param {unknown} error - The error to check.\n\t* @returns {boolean} True if the error is an AI SDK Error, false otherwise.\n\t*/\n\tstatic isInstance(error) {\n\t\treturn _AISDKError.hasMarker(error, marker$1);\n\t}\n\tstatic hasMarker(error, marker15) {\n\t\tconst markerSymbol = Symbol.for(marker15);\n\t\treturn error != null && typeof error === \"object\" && markerSymbol in error && typeof error[markerSymbol] === \"boolean\" && error[markerSymbol] === true;\n\t}\n};\n_a$1 = symbol$1;\nvar AISDKError = _AISDKError;\nfunction getErrorMessage(error) {\n\tif (error == null) return \"unknown error\";\n\tif (typeof error === \"string\") return error;\n\tif (error instanceof Error) return error.message;\n\treturn JSON.stringify(error);\n}\nvar name3$1 = \"AI_InvalidArgumentError\";\nvar marker4$1 = `vercel.ai.error.${name3$1}`;\nvar symbol4$1 = Symbol.for(marker4$1);\nvar _a4$1;\nvar InvalidArgumentError = class extends AISDKError {\n\tconstructor({ message, cause, argument }) {\n\t\tsuper({\n\t\t\tname: name3$1,\n\t\t\tmessage,\n\t\t\tcause\n\t\t});\n\t\tthis[_a4$1] = true;\n\t\tthis.argument = argument;\n\t}\n\tstatic isInstance(error) {\n\t\treturn AISDKError.hasMarker(error, marker4$1);\n\t}\n};\n_a4$1 = symbol4$1;\nvar name6$1 = \"AI_JSONParseError\";\nvar marker7$1 = `vercel.ai.error.${name6$1}`;\nvar symbol7$1 = Symbol.for(marker7$1);\nvar _a7$1;\nvar JSONParseError = class extends AISDKError {\n\tconstructor({ text, cause }) {\n\t\tsuper({\n\t\t\tname: name6$1,\n\t\t\tmessage: `JSON parsing failed: Text: ${text}.\nError message: ${getErrorMessage(cause)}`,\n\t\t\tcause\n\t\t});\n\t\tthis[_a7$1] = true;\n\t\tthis.text = text;\n\t}\n\tstatic isInstance(error) {\n\t\treturn AISDKError.hasMarker(error, marker7$1);\n\t}\n};\n_a7$1 = symbol7$1;\nvar name12$1 = \"AI_TypeValidationError\";\nvar marker13$1 = `vercel.ai.error.${name12$1}`;\nvar symbol13$1 = Symbol.for(marker13$1);\nvar _a13$1;\nvar _TypeValidationError = class _TypeValidationError extends AISDKError {\n\tconstructor({ value, cause }) {\n\t\tsuper({\n\t\t\tname: name12$1,\n\t\t\tmessage: `Type validation failed: Value: ${JSON.stringify(value)}.\nError message: ${getErrorMessage(cause)}`,\n\t\t\tcause\n\t\t});\n\t\tthis[_a13$1] = true;\n\t\tthis.value = value;\n\t}\n\tstatic isInstance(error) {\n\t\treturn AISDKError.hasMarker(error, marker13$1);\n\t}\n\t/**\n\t* Wraps an error into a TypeValidationError.\n\t* If the cause is already a TypeValidationError with the same value, it returns the cause.\n\t* Otherwise, it creates a new TypeValidationError.\n\t*\n\t* @param {Object} params - The parameters for wrapping the error.\n\t* @param {unknown} params.value - The value that failed validation.\n\t* @param {unknown} params.cause - The original error or cause of the validation failure.\n\t* @returns {TypeValidationError} A TypeValidationError instance.\n\t*/\n\tstatic wrap({ value, cause }) {\n\t\treturn _TypeValidationError.isInstance(cause) && cause.value === value ? cause : new _TypeValidationError({\n\t\t\tvalue,\n\t\t\tcause\n\t\t});\n\t}\n};\n_a13$1 = symbol13$1;\nvar TypeValidationError = _TypeValidationError;\n//#endregion\n//#region ../_vendored/ai_v4/dist/index.js\nvar __create = Object.create;\nvar __defProp$1 = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);\nvar __copyProps = (to, from, except, desc) => {\n\tif (from && typeof from === \"object\" || typeof from === \"function\") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {\n\t\tkey = keys[i];\n\t\tif (!__hasOwnProp.call(to, key) && key !== except) __defProp$1(to, key, {\n\t\t\tget: ((k) => from[k]).bind(null, key),\n\t\t\tenumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable\n\t\t});\n\t}\n\treturn to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp$1(target, \"default\", {\n\tvalue: mod,\n\tenumerable: true\n}) : target, mod));\nlet customAlphabet = (alphabet, defaultSize = 21) => {\n\treturn (size = defaultSize) => {\n\t\tlet id = \"\";\n\t\tlet i = size | 0;\n\t\twhile (i-- > 0) id += alphabet[Math.random() * alphabet.length | 0];\n\t\treturn id;\n\t};\n};\nvar import_secure_json_parse = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {\n\tconst hasBuffer = typeof Buffer !== \"undefined\";\n\tconst suspectProtoRx = /\"(?:_|\\\\u005[Ff])(?:_|\\\\u005[Ff])(?:p|\\\\u0070)(?:r|\\\\u0072)(?:o|\\\\u006[Ff])(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:_|\\\\u005[Ff])(?:_|\\\\u005[Ff])\"\\s*:/;\n\tconst suspectConstructorRx = /\"(?:c|\\\\u0063)(?:o|\\\\u006[Ff])(?:n|\\\\u006[Ee])(?:s|\\\\u0073)(?:t|\\\\u0074)(?:r|\\\\u0072)(?:u|\\\\u0075)(?:c|\\\\u0063)(?:t|\\\\u0074)(?:o|\\\\u006[Ff])(?:r|\\\\u0072)\"\\s*:/;\n\tfunction _parse(text, reviver, options) {\n\t\tif (options == null) {\n\t\t\tif (reviver !== null && typeof reviver === \"object\") {\n\t\t\t\toptions = reviver;\n\t\t\t\treviver = void 0;\n\t\t\t}\n\t\t}\n\t\tif (hasBuffer && Buffer.isBuffer(text)) text = text.toString();\n\t\tif (text && text.charCodeAt(0) === 65279) text = text.slice(1);\n\t\tconst obj = JSON.parse(text, reviver);\n\t\tif (obj === null || typeof obj !== \"object\") return obj;\n\t\tconst protoAction = options && options.protoAction || \"error\";\n\t\tconst constructorAction = options && options.constructorAction || \"error\";\n\t\tif (protoAction === \"ignore\" && constructorAction === \"ignore\") return obj;\n\t\tif (protoAction !== \"ignore\" && constructorAction !== \"ignore\") {\n\t\t\tif (suspectProtoRx.test(text) === false && suspectConstructorRx.test(text) === false) return obj;\n\t\t} else if (protoAction !== \"ignore\" && constructorAction === \"ignore\") {\n\t\t\tif (suspectProtoRx.test(text) === false) return obj;\n\t\t} else if (suspectConstructorRx.test(text) === false) return obj;\n\t\treturn filter(obj, {\n\t\t\tprotoAction,\n\t\t\tconstructorAction,\n\t\t\tsafe: options && options.safe\n\t\t});\n\t}\n\tfunction filter(obj, { protoAction = \"error\", constructorAction = \"error\", safe } = {}) {\n\t\tlet next = [obj];\n\t\twhile (next.length) {\n\t\t\tconst nodes = next;\n\t\t\tnext = [];\n\t\t\tfor (const node of nodes) {\n\t\t\t\tif (protoAction !== \"ignore\" && Object.prototype.hasOwnProperty.call(node, \"__proto__\")) {\n\t\t\t\t\tif (safe === true) return null;\n\t\t\t\t\telse if (protoAction === \"error\") throw new SyntaxError(\"Object contains forbidden prototype property\");\n\t\t\t\t\tdelete node.__proto__;\n\t\t\t\t}\n\t\t\t\tif (constructorAction !== \"ignore\" && Object.prototype.hasOwnProperty.call(node, \"constructor\") && Object.prototype.hasOwnProperty.call(node.constructor, \"prototype\")) {\n\t\t\t\t\tif (safe === true) return null;\n\t\t\t\t\telse if (constructorAction === \"error\") throw new SyntaxError(\"Object contains forbidden prototype property\");\n\t\t\t\t\tdelete node.constructor;\n\t\t\t\t}\n\t\t\t\tfor (const key in node) {\n\t\t\t\t\tconst value = node[key];\n\t\t\t\t\tif (value && typeof value === \"object\") next.push(value);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn obj;\n\t}\n\tfunction parse(text, reviver, options) {\n\t\tconst stackTraceLimit = Error.stackTraceLimit;\n\t\tError.stackTraceLimit = 0;\n\t\ttry {\n\t\t\treturn _parse(text, reviver, options);\n\t\t} finally {\n\t\t\tError.stackTraceLimit = stackTraceLimit;\n\t\t}\n\t}\n\tfunction safeParse(text, reviver) {\n\t\tconst stackTraceLimit = Error.stackTraceLimit;\n\t\tError.stackTraceLimit = 0;\n\t\ttry {\n\t\t\treturn _parse(text, reviver, { safe: true });\n\t\t} catch (_e) {\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tError.stackTraceLimit = stackTraceLimit;\n\t\t}\n\t}\n\tmodule.exports = parse;\n\tmodule.exports.default = parse;\n\tmodule.exports.parse = parse;\n\tmodule.exports.safeParse = safeParse;\n\tmodule.exports.scan = filter;\n})))(), 1);\nfunction convertAsyncIteratorToReadableStream(iterator) {\n\treturn new ReadableStream({\n\t\t/**\n\t\t* Called when the consumer wants to pull more data from the stream.\n\t\t*\n\t\t* @param {ReadableStreamDefaultController<T>} controller - The controller to enqueue data into the stream.\n\t\t* @returns {Promise<void>}\n\t\t*/\n\t\tasync pull(controller) {\n\t\t\ttry {\n\t\t\t\tconst { value, done } = await iterator.next();\n\t\t\t\tif (done) controller.close();\n\t\t\t\telse controller.enqueue(value);\n\t\t\t} catch (error) {\n\t\t\t\tcontroller.error(error);\n\t\t\t}\n\t\t},\n\t\t/**\n\t\t* Called when the consumer cancels the stream.\n\t\t*/\n\t\tcancel() {}\n\t});\n}\nvar createIdGenerator = ({ prefix, size: defaultSize = 16, alphabet = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz\", separator = \"-\" } = {}) => {\n\tconst generator = customAlphabet(alphabet, defaultSize);\n\tif (prefix == null) return generator;\n\tif (alphabet.includes(separator)) throw new InvalidArgumentError({\n\t\targument: \"separator\",\n\t\tmessage: `The separator \"${separator}\" must not be part of the alphabet \"${alphabet}\".`\n\t});\n\treturn (size) => `${prefix}${separator}${generator(size)}`;\n};\ncreateIdGenerator();\nvar validatorSymbol = Symbol.for(\"vercel.ai.validator\");\nfunction validator(validate) {\n\treturn {\n\t\t[validatorSymbol]: true,\n\t\tvalidate\n\t};\n}\nfunction isValidator(value) {\n\treturn typeof value === \"object\" && value !== null && validatorSymbol in value && value[validatorSymbol] === true && \"validate\" in value;\n}\nfunction asValidator(value) {\n\treturn isValidator(value) ? value : zodValidator(value);\n}\nfunction zodValidator(zodSchema) {\n\treturn validator((value) => {\n\t\tconst result = zodSchema.safeParse(value);\n\t\treturn result.success ? {\n\t\t\tsuccess: true,\n\t\t\tvalue: result.data\n\t\t} : {\n\t\t\tsuccess: false,\n\t\t\terror: result.error\n\t\t};\n\t});\n}\nfunction safeValidateTypes({ value, schema }) {\n\tconst validator2 = asValidator(schema);\n\ttry {\n\t\tif (validator2.validate == null) return {\n\t\t\tsuccess: true,\n\t\t\tvalue\n\t\t};\n\t\tconst result = validator2.validate(value);\n\t\tif (result.success) return result;\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: TypeValidationError.wrap({\n\t\t\t\tvalue,\n\t\t\t\tcause: result.error\n\t\t\t})\n\t\t};\n\t} catch (error) {\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: TypeValidationError.wrap({\n\t\t\t\tvalue,\n\t\t\t\tcause: error\n\t\t\t})\n\t\t};\n\t}\n}\nfunction safeParseJSON({ text, schema }) {\n\ttry {\n\t\tconst value = import_secure_json_parse.default.parse(text);\n\t\tif (schema == null) return {\n\t\t\tsuccess: true,\n\t\t\tvalue,\n\t\t\trawValue: value\n\t\t};\n\t\tconst validationResult = safeValidateTypes({\n\t\t\tvalue,\n\t\t\tschema\n\t\t});\n\t\treturn validationResult.success ? {\n\t\t\t...validationResult,\n\t\t\trawValue: value\n\t\t} : validationResult;\n\t} catch (error) {\n\t\treturn {\n\t\t\tsuccess: false,\n\t\t\terror: JSONParseError.isInstance(error) ? error : new JSONParseError({\n\t\t\t\ttext,\n\t\t\t\tcause: error\n\t\t\t})\n\t\t};\n\t}\n}\nvar { btoa, atob } = globalThis;\nconst ignoreOverride = Symbol(\"Let zodToJsonSchema decide on which parser to use\");\nconst defaultOptions = {\n\tname: void 0,\n\t$refStrategy: \"root\",\n\tbasePath: [\"#\"],\n\teffectStrategy: \"input\",\n\tpipeStrategy: \"all\",\n\tdateStrategy: \"format:date-time\",\n\tmapStrategy: \"entries\",\n\tremoveAdditionalStrategy: \"passthrough\",\n\tallowedAdditionalProperties: true,\n\trejectedAdditionalProperties: false,\n\tdefinitionPath: \"definitions\",\n\ttarget: \"jsonSchema7\",\n\tstrictUnions: false,\n\tdefinitions: {},\n\terrorMessages: false,\n\tmarkdownDescription: false,\n\tpatternStrategy: \"escape\",\n\tapplyRegexFlags: false,\n\temailStrategy: \"format:email\",\n\tbase64Strategy: \"contentEncoding:base64\",\n\tnameStrategy: \"ref\",\n\topenAiAnyTypeName: \"OpenAiAnyType\"\n};\nconst getDefaultOptions = (options) => typeof options === \"string\" ? {\n\t...defaultOptions,\n\tname: options\n} : {\n\t...defaultOptions,\n\t...options\n};\nconst getRefs = (options) => {\n\tconst _options = getDefaultOptions(options);\n\tconst currentPath = _options.name !== void 0 ? [\n\t\t..._options.basePath,\n\t\t_options.definitionPath,\n\t\t_options.name\n\t] : _options.basePath;\n\treturn {\n\t\t..._options,\n\t\tflags: { hasReferencedOpenAiAnyType: false },\n\t\tcurrentPath,\n\t\tpropertyPath: void 0,\n\t\tseen: new Map(Object.entries(_options.definitions).map(([name, def]) => [def._def, {\n\t\t\tdef: def._def,\n\t\t\tpath: [\n\t\t\t\t..._options.basePath,\n\t\t\t\t_options.definitionPath,\n\t\t\t\tname\n\t\t\t],\n\t\t\tjsonSchema: void 0\n\t\t}]))\n\t};\n};\nfunction addErrorMessage(res, key, errorMessage, refs) {\n\tif (!refs?.errorMessages) return;\n\tif (errorMessage) res.errorMessage = {\n\t\t...res.errorMessage,\n\t\t[key]: errorMessage\n\t};\n}\nfunction setResponseValueAndErrors(res, key, value, errorMessage, refs) {\n\tres[key] = value;\n\taddErrorMessage(res, key, errorMessage, refs);\n}\nconst getRelativePath = (pathA, pathB) => {\n\tlet i = 0;\n\tfor (; i < pathA.length && i < pathB.length; i++) if (pathA[i] !== pathB[i]) break;\n\treturn [(pathA.length - i).toString(), ...pathB.slice(i)].join(\"/\");\n};\nfunction parseAnyDef(refs) {\n\tif (refs.target !== \"openAi\") return {};\n\tconst anyDefinitionPath = [\n\t\t...refs.basePath,\n\t\trefs.definitionPath,\n\t\trefs.openAiAnyTypeName\n\t];\n\trefs.flags.hasReferencedOpenAiAnyType = true;\n\treturn { $ref: refs.$refStrategy === \"relative\" ? getRelativePath(anyDefinitionPath, refs.currentPath) : anyDefinitionPath.join(\"/\") };\n}\nfunction parseArrayDef(def, refs) {\n\tconst res = { type: \"array\" };\n\tif (def.type?._def && def.type?._def?.typeName !== ZodFirstPartyTypeKind.ZodAny) res.items = parseDef(def.type._def, {\n\t\t...refs,\n\t\tcurrentPath: [...refs.currentPath, \"items\"]\n\t});\n\tif (def.minLength) setResponseValueAndErrors(res, \"minItems\", def.minLength.value, def.minLength.message, refs);\n\tif (def.maxLength) setResponseValueAndErrors(res, \"maxItems\", def.maxLength.value, def.maxLength.message, refs);\n\tif (def.exactLength) {\n\t\tsetResponseValueAndErrors(res, \"minItems\", def.exactLength.value, def.exactLength.message, refs);\n\t\tsetResponseValueAndErrors(res, \"maxItems\", def.exactLength.value, def.exactLength.message, refs);\n\t}\n\treturn res;\n}\nfunction parseBigintDef(def, refs) {\n\tconst res = {\n\t\ttype: \"integer\",\n\t\tformat: \"int64\"\n\t};\n\tif (!def.checks) return res;\n\tfor (const check of def.checks) switch (check.kind) {\n\t\tcase \"min\":\n\t\t\tif (refs.target === \"jsonSchema7\") if (check.inclusive) setResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n\t\t\telse setResponseValueAndErrors(res, \"exclusiveMinimum\", check.value, check.message, refs);\n\t\t\telse {\n\t\t\t\tif (!check.inclusive) res.exclusiveMinimum = true;\n\t\t\t\tsetResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"max\":\n\t\t\tif (refs.target === \"jsonSchema7\") if (check.inclusive) setResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n\t\t\telse setResponseValueAndErrors(res, \"exclusiveMaximum\", check.value, check.message, refs);\n\t\t\telse {\n\t\t\t\tif (!check.inclusive) res.exclusiveMaximum = true;\n\t\t\t\tsetResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"multipleOf\":\n\t\t\tsetResponseValueAndErrors(res, \"multipleOf\", check.value, check.message, refs);\n\t\t\tbreak;\n\t}\n\treturn res;\n}\nfunction parseBooleanDef() {\n\treturn { type: \"boolean\" };\n}\nfunction parseBrandedDef(_def, refs) {\n\treturn parseDef(_def.type._def, refs);\n}\nconst parseCatchDef = (def, refs) => {\n\treturn parseDef(def.innerType._def, refs);\n};\nfunction parseDateDef(def, refs, overrideDateStrategy) {\n\tconst strategy = overrideDateStrategy ?? refs.dateStrategy;\n\tif (Array.isArray(strategy)) return { anyOf: strategy.map((item, i) => parseDateDef(def, refs, item)) };\n\tswitch (strategy) {\n\t\tcase \"string\":\n\t\tcase \"format:date-time\": return {\n\t\t\ttype: \"string\",\n\t\t\tformat: \"date-time\"\n\t\t};\n\t\tcase \"format:date\": return {\n\t\t\ttype: \"string\",\n\t\t\tformat: \"date\"\n\t\t};\n\t\tcase \"integer\": return integerDateParser(def, refs);\n\t}\n}\nconst integerDateParser = (def, refs) => {\n\tconst res = {\n\t\ttype: \"integer\",\n\t\tformat: \"unix-time\"\n\t};\n\tif (refs.target === \"openApi3\") return res;\n\tfor (const check of def.checks) switch (check.kind) {\n\t\tcase \"min\":\n\t\t\tsetResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"max\":\n\t\t\tsetResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n\t\t\tbreak;\n\t}\n\treturn res;\n};\nfunction parseDefaultDef(_def, refs) {\n\treturn {\n\t\t...parseDef(_def.innerType._def, refs),\n\t\tdefault: _def.defaultValue()\n\t};\n}\nfunction parseEffectsDef(_def, refs) {\n\treturn refs.effectStrategy === \"input\" ? parseDef(_def.schema._def, refs) : parseAnyDef(refs);\n}\nfunction parseEnumDef(def) {\n\treturn {\n\t\ttype: \"string\",\n\t\tenum: Array.from(def.values)\n\t};\n}\nconst isJsonSchema7AllOfType = (type) => {\n\tif (\"type\" in type && type.type === \"string\") return false;\n\treturn \"allOf\" in type;\n};\nfunction parseIntersectionDef(def, refs) {\n\tconst allOf = [parseDef(def.left._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"allOf\",\n\t\t\t\"0\"\n\t\t]\n\t}), parseDef(def.right._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"allOf\",\n\t\t\t\"1\"\n\t\t]\n\t})].filter((x) => !!x);\n\tlet unevaluatedProperties = refs.target === \"jsonSchema2019-09\" ? { unevaluatedProperties: false } : void 0;\n\tconst mergedAllOf = [];\n\tallOf.forEach((schema) => {\n\t\tif (isJsonSchema7AllOfType(schema)) {\n\t\t\tmergedAllOf.push(...schema.allOf);\n\t\t\tif (schema.unevaluatedProperties === void 0) unevaluatedProperties = void 0;\n\t\t} else {\n\t\t\tlet nestedSchema = schema;\n\t\t\tif (\"additionalProperties\" in schema && schema.additionalProperties === false) {\n\t\t\t\tconst { additionalProperties, ...rest } = schema;\n\t\t\t\tnestedSchema = rest;\n\t\t\t} else unevaluatedProperties = void 0;\n\t\t\tmergedAllOf.push(nestedSchema);\n\t\t}\n\t});\n\treturn mergedAllOf.length ? {\n\t\tallOf: mergedAllOf,\n\t\t...unevaluatedProperties\n\t} : void 0;\n}\nfunction parseLiteralDef(def, refs) {\n\tconst parsedType = typeof def.value;\n\tif (parsedType !== \"bigint\" && parsedType !== \"number\" && parsedType !== \"boolean\" && parsedType !== \"string\") return { type: Array.isArray(def.value) ? \"array\" : \"object\" };\n\tif (refs.target === \"openApi3\") return {\n\t\ttype: parsedType === \"bigint\" ? \"integer\" : parsedType,\n\t\tenum: [def.value]\n\t};\n\treturn {\n\t\ttype: parsedType === \"bigint\" ? \"integer\" : parsedType,\n\t\tconst: def.value\n\t};\n}\nlet emojiRegex = void 0;\n/**\n* Generated from the regular expressions found here as of 2024-05-22:\n* https://github.com/colinhacks/zod/blob/master/src/types.ts.\n*\n* Expressions with /i flag have been changed accordingly.\n*/\nconst zodPatterns = {\n\t/**\n\t* `c` was changed to `[cC]` to replicate /i flag\n\t*/\n\tcuid: /^[cC][^\\s-]{8,}$/,\n\tcuid2: /^[0-9a-z]+$/,\n\tulid: /^[0-9A-HJKMNP-TV-Z]{26}$/,\n\t/**\n\t* `a-z` was added to replicate /i flag\n\t*/\n\temail: /^(?!\\.)(?!.*\\.\\.)([a-zA-Z0-9_'+\\-\\.]*)[a-zA-Z0-9_+-]@([a-zA-Z0-9][a-zA-Z0-9\\-]*\\.)+[a-zA-Z]{2,}$/,\n\t/**\n\t* Constructed a valid Unicode RegExp\n\t*\n\t* Lazily instantiate since this type of regex isn't supported\n\t* in all envs (e.g. React Native).\n\t*\n\t* See:\n\t* https://github.com/colinhacks/zod/issues/2433\n\t* Fix in Zod:\n\t* https://github.com/colinhacks/zod/commit/9340fd51e48576a75adc919bff65dbc4a5d4c99b\n\t*/\n\temoji: () => {\n\t\tif (emojiRegex === void 0) emojiRegex = RegExp(\"^(\\\\p{Extended_Pictographic}|\\\\p{Emoji_Component})+$\", \"u\");\n\t\treturn emojiRegex;\n\t},\n\t/**\n\t* Unused\n\t*/\n\tuuid: /^[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}$/,\n\t/**\n\t* Unused\n\t*/\n\tipv4: /^(?:(?: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])$/,\n\tipv4Cidr: /^(?:(?: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])$/,\n\t/**\n\t* Unused\n\t*/\n\tipv6: /^(([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})))$/,\n\tipv6Cidr: /^(([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])$/,\n\tbase64: /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,\n\tbase64url: /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,\n\tnanoid: /^[a-zA-Z0-9_-]{21}$/,\n\tjwt: /^[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]+\\.[A-Za-z0-9-_]*$/\n};\nfunction parseStringDef(def, refs) {\n\tconst res = { type: \"string\" };\n\tif (def.checks) for (const check of def.checks) switch (check.kind) {\n\t\tcase \"min\":\n\t\t\tsetResponseValueAndErrors(res, \"minLength\", typeof res.minLength === \"number\" ? Math.max(res.minLength, check.value) : check.value, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"max\":\n\t\t\tsetResponseValueAndErrors(res, \"maxLength\", typeof res.maxLength === \"number\" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"email\":\n\t\t\tswitch (refs.emailStrategy) {\n\t\t\t\tcase \"format:email\":\n\t\t\t\t\taddFormat(res, \"email\", check.message, refs);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"format:idn-email\":\n\t\t\t\t\taddFormat(res, \"idn-email\", check.message, refs);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"pattern:zod\":\n\t\t\t\t\taddPattern(res, zodPatterns.email, check.message, refs);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"url\":\n\t\t\taddFormat(res, \"uri\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"uuid\":\n\t\t\taddFormat(res, \"uuid\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"regex\":\n\t\t\taddPattern(res, check.regex, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"cuid\":\n\t\t\taddPattern(res, zodPatterns.cuid, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"cuid2\":\n\t\t\taddPattern(res, zodPatterns.cuid2, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"startsWith\":\n\t\t\taddPattern(res, RegExp(`^${escapeLiteralCheckValue(check.value, refs)}`), check.message, refs);\n\t\t\tbreak;\n\t\tcase \"endsWith\":\n\t\t\taddPattern(res, RegExp(`${escapeLiteralCheckValue(check.value, refs)}$`), check.message, refs);\n\t\t\tbreak;\n\t\tcase \"datetime\":\n\t\t\taddFormat(res, \"date-time\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"date\":\n\t\t\taddFormat(res, \"date\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"time\":\n\t\t\taddFormat(res, \"time\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"duration\":\n\t\t\taddFormat(res, \"duration\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"length\":\n\t\t\tsetResponseValueAndErrors(res, \"minLength\", typeof res.minLength === \"number\" ? Math.max(res.minLength, check.value) : check.value, check.message, refs);\n\t\t\tsetResponseValueAndErrors(res, \"maxLength\", typeof res.maxLength === \"number\" ? Math.min(res.maxLength, check.value) : check.value, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"includes\":\n\t\t\taddPattern(res, RegExp(escapeLiteralCheckValue(check.value, refs)), check.message, refs);\n\t\t\tbreak;\n\t\tcase \"ip\":\n\t\t\tif (check.version !== \"v6\") addFormat(res, \"ipv4\", check.message, refs);\n\t\t\tif (check.version !== \"v4\") addFormat(res, \"ipv6\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"base64url\":\n\t\t\taddPattern(res, zodPatterns.base64url, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"jwt\":\n\t\t\taddPattern(res, zodPatterns.jwt, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"cidr\":\n\t\t\tif (check.version !== \"v6\") addPattern(res, zodPatterns.ipv4Cidr, check.message, refs);\n\t\t\tif (check.version !== \"v4\") addPattern(res, zodPatterns.ipv6Cidr, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"emoji\":\n\t\t\taddPattern(res, zodPatterns.emoji(), check.message, refs);\n\t\t\tbreak;\n\t\tcase \"ulid\":\n\t\t\taddPattern(res, zodPatterns.ulid, check.message, refs);\n\t\t\tbreak;\n\t\tcase \"base64\":\n\t\t\tswitch (refs.base64Strategy) {\n\t\t\t\tcase \"format:binary\":\n\t\t\t\t\taddFormat(res, \"binary\", check.message, refs);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"contentEncoding:base64\":\n\t\t\t\t\tsetResponseValueAndErrors(res, \"contentEncoding\", \"base64\", check.message, refs);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"pattern:zod\":\n\t\t\t\t\taddPattern(res, zodPatterns.base64, check.message, refs);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"nanoid\": addPattern(res, zodPatterns.nanoid, check.message, refs);\n\t\tcase \"toLowerCase\":\n\t\tcase \"toUpperCase\":\n\t\tcase \"trim\": break;\n\t\tdefault:\n\t}\n\treturn res;\n}\nfunction escapeLiteralCheckValue(literal, refs) {\n\treturn refs.patternStrategy === \"escape\" ? escapeNonAlphaNumeric(literal) : literal;\n}\nconst ALPHA_NUMERIC = /* @__PURE__ */ new Set(\"ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789\");\nfunction escapeNonAlphaNumeric(source) {\n\tlet result = \"\";\n\tfor (let i = 0; i < source.length; i++) {\n\t\tif (!ALPHA_NUMERIC.has(source[i])) result += \"\\\\\";\n\t\tresult += source[i];\n\t}\n\treturn result;\n}\nfunction addFormat(schema, value, message, refs) {\n\tif (schema.format || schema.anyOf?.some((x) => x.format)) {\n\t\tif (!schema.anyOf) schema.anyOf = [];\n\t\tif (schema.format) {\n\t\t\tschema.anyOf.push({\n\t\t\t\tformat: schema.format,\n\t\t\t\t...schema.errorMessage && refs.errorMessages && { errorMessage: { format: schema.errorMessage.format } }\n\t\t\t});\n\t\t\tdelete schema.format;\n\t\t\tif (schema.errorMessage) {\n\t\t\t\tdelete schema.errorMessage.format;\n\t\t\t\tif (Object.keys(schema.errorMessage).length === 0) delete schema.errorMessage;\n\t\t\t}\n\t\t}\n\t\tschema.anyOf.push({\n\t\t\tformat: value,\n\t\t\t...message && refs.errorMessages && { errorMessage: { format: message } }\n\t\t});\n\t} else setResponseValueAndErrors(schema, \"format\", value, message, refs);\n}\nfunction addPattern(schema, regex, message, refs) {\n\tif (schema.pattern || schema.allOf?.some((x) => x.pattern)) {\n\t\tif (!schema.allOf) schema.allOf = [];\n\t\tif (schema.pattern) {\n\t\t\tschema.allOf.push({\n\t\t\t\tpattern: schema.pattern,\n\t\t\t\t...schema.errorMessage && refs.errorMessages && { errorMessage: { pattern: schema.errorMessage.pattern } }\n\t\t\t});\n\t\t\tdelete schema.pattern;\n\t\t\tif (schema.errorMessage) {\n\t\t\t\tdelete schema.errorMessage.pattern;\n\t\t\t\tif (Object.keys(schema.errorMessage).length === 0) delete schema.errorMessage;\n\t\t\t}\n\t\t}\n\t\tschema.allOf.push({\n\t\t\tpattern: stringifyRegExpWithFlags(regex, refs),\n\t\t\t...message && refs.errorMessages && { errorMessage: { pattern: message } }\n\t\t});\n\t} else setResponseValueAndErrors(schema, \"pattern\", stringifyRegExpWithFlags(regex, refs), message, refs);\n}\nfunction stringifyRegExpWithFlags(regex, refs) {\n\tif (!refs.applyRegexFlags || !regex.flags) return regex.source;\n\tconst flags = {\n\t\ti: regex.flags.includes(\"i\"),\n\t\tm: regex.flags.includes(\"m\"),\n\t\ts: regex.flags.includes(\"s\")\n\t};\n\tconst source = flags.i ? regex.source.toLowerCase() : regex.source;\n\tlet pattern = \"\";\n\tlet isEscaped = false;\n\tlet inCharGroup = false;\n\tlet inCharRange = false;\n\tfor (let i = 0; i < source.length; i++) {\n\t\tif (isEscaped) {\n\t\t\tpattern += source[i];\n\t\t\tisEscaped = false;\n\t\t\tcontinue;\n\t\t}\n\t\tif (flags.i) {\n\t\t\tif (inCharGroup) {\n\t\t\t\tif (source[i].match(/[a-z]/)) {\n\t\t\t\t\tif (inCharRange) {\n\t\t\t\t\t\tpattern += source[i];\n\t\t\t\t\t\tpattern += `${source[i - 2]}-${source[i]}`.toUpperCase();\n\t\t\t\t\t\tinCharRange = false;\n\t\t\t\t\t} else if (source[i + 1] === \"-\" && source[i + 2]?.match(/[a-z]/)) {\n\t\t\t\t\t\tpattern += source[i];\n\t\t\t\t\t\tinCharRange = true;\n\t\t\t\t\t} else pattern += `${source[i]}${source[i].toUpperCase()}`;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t} else if (source[i].match(/[a-z]/)) {\n\t\t\t\tpattern += `[${source[i]}${source[i].toUpperCase()}]`;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (flags.m) {\n\t\t\tif (source[i] === \"^\") {\n\t\t\t\tpattern += `(^|(?<=[\\r\\n]))`;\n\t\t\t\tcontinue;\n\t\t\t} else if (source[i] === \"$\") {\n\t\t\t\tpattern += `($|(?=[\\r\\n]))`;\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t}\n\t\tif (flags.s && source[i] === \".\") {\n\t\t\tpattern += inCharGroup ? `${source[i]}\\r\\n` : `[${source[i]}\\r\\n]`;\n\t\t\tcontinue;\n\t\t}\n\t\tpattern += source[i];\n\t\tif (source[i] === \"\\\\\") isEscaped = true;\n\t\telse if (inCharGroup && source[i] === \"]\") inCharGroup = false;\n\t\telse if (!inCharGroup && source[i] === \"[\") inCharGroup = true;\n\t}\n\ttry {\n\t\tnew RegExp(pattern);\n\t} catch {\n\t\tconsole.warn(`Could not convert regex pattern at ${refs.currentPath.join(\"/\")} to a flag-independent form! Falling back to the flag-ignorant source`);\n\t\treturn regex.source;\n\t}\n\treturn pattern;\n}\nfunction parseRecordDef(def, refs) {\n\tif (refs.target === \"openAi\") console.warn(\"Warning: OpenAI may not support records in schemas! Try an array of key-value pairs instead.\");\n\tif (refs.target === \"openApi3\" && def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) return {\n\t\ttype: \"object\",\n\t\trequired: def.keyType._def.values,\n\t\tproperties: def.keyType._def.values.reduce((acc, key) => ({\n\t\t\t...acc,\n\t\t\t[key]: parseDef(def.valueType._def, {\n\t\t\t\t...refs,\n\t\t\t\tcurrentPath: [\n\t\t\t\t\t...refs.currentPath,\n\t\t\t\t\t\"properties\",\n\t\t\t\t\tkey\n\t\t\t\t]\n\t\t\t}) ?? parseAnyDef(refs)\n\t\t}), {}),\n\t\tadditionalProperties: refs.rejectedAdditionalProperties\n\t};\n\tconst schema = {\n\t\ttype: \"object\",\n\t\tadditionalProperties: parseDef(def.valueType._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [...refs.currentPath, \"additionalProperties\"]\n\t\t}) ?? refs.allowedAdditionalProperties\n\t};\n\tif (refs.target === \"openApi3\") return schema;\n\tif (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.checks?.length) {\n\t\tconst { type, ...keyType } = parseStringDef(def.keyType._def, refs);\n\t\treturn {\n\t\t\t...schema,\n\t\t\tpropertyNames: keyType\n\t\t};\n\t} else if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodEnum) return {\n\t\t...schema,\n\t\tpropertyNames: { enum: def.keyType._def.values }\n\t};\n\telse if (def.keyType?._def.typeName === ZodFirstPartyTypeKind.ZodBranded && def.keyType._def.type._def.typeName === ZodFirstPartyTypeKind.ZodString && def.keyType._def.type._def.checks?.length) {\n\t\tconst { type, ...keyType } = parseBrandedDef(def.keyType._def, refs);\n\t\treturn {\n\t\t\t...schema,\n\t\t\tpropertyNames: keyType\n\t\t};\n\t}\n\treturn schema;\n}\nfunction parseMapDef(def, refs) {\n\tif (refs.mapStrategy === \"record\") return parseRecordDef(def, refs);\n\treturn {\n\t\ttype: \"array\",\n\t\tmaxItems: 125,\n\t\titems: {\n\t\t\ttype: \"array\",\n\t\t\titems: [parseDef(def.keyType._def, {\n\t\t\t\t...refs,\n\t\t\t\tcurrentPath: [\n\t\t\t\t\t...refs.currentPath,\n\t\t\t\t\t\"items\",\n\t\t\t\t\t\"items\",\n\t\t\t\t\t\"0\"\n\t\t\t\t]\n\t\t\t}) || parseAnyDef(refs), parseDef(def.valueType._def, {\n\t\t\t\t...refs,\n\t\t\t\tcurrentPath: [\n\t\t\t\t\t...refs.currentPath,\n\t\t\t\t\t\"items\",\n\t\t\t\t\t\"items\",\n\t\t\t\t\t\"1\"\n\t\t\t\t]\n\t\t\t}) || parseAnyDef(refs)],\n\t\t\tminItems: 2,\n\t\t\tmaxItems: 2\n\t\t}\n\t};\n}\nfunction parseNativeEnumDef(def) {\n\tconst object = def.values;\n\tconst actualValues = Object.keys(def.values).filter((key) => {\n\t\treturn typeof object[object[key]] !== \"number\";\n\t}).map((key) => object[key]);\n\tconst parsedTypes = Array.from(new Set(actualValues.map((values) => typeof values)));\n\treturn {\n\t\ttype: parsedTypes.length === 1 ? parsedTypes[0] === \"string\" ? \"string\" : \"number\" : [\"string\", \"number\"],\n\t\tenum: actualValues\n\t};\n}\nfunction parseNeverDef(refs) {\n\treturn refs.target === \"openAi\" ? void 0 : { not: parseAnyDef({\n\t\t...refs,\n\t\tcurrentPath: [...refs.currentPath, \"not\"]\n\t}) };\n}\nfunction parseNullDef(refs) {\n\treturn refs.target === \"openApi3\" ? {\n\t\tenum: [\"null\"],\n\t\tnullable: true\n\t} : { type: \"null\" };\n}\nconst primitiveMappings = {\n\tZodString: \"string\",\n\tZodNumber: \"number\",\n\tZodBigInt: \"integer\",\n\tZodBoolean: \"boolean\",\n\tZodNull: \"null\"\n};\nfunction parseUnionDef(def, refs) {\n\tif (refs.target === \"openApi3\") return asAnyOf(def, refs);\n\tconst options = def.options instanceof Map ? Array.from(def.options.values()) : def.options;\n\tif (options.every((x) => x._def.typeName in primitiveMappings && (!x._def.checks || !x._def.checks.length))) {\n\t\tconst types = options.reduce((types, x) => {\n\t\t\tconst type = primitiveMappings[x._def.typeName];\n\t\t\treturn type && !types.includes(type) ? [...types, type] : types;\n\t\t}, []);\n\t\treturn { type: types.length > 1 ? types : types[0] };\n\t} else if (options.every((x) => x._def.typeName === \"ZodLiteral\" && !x.description)) {\n\t\tconst types = options.reduce((acc, x) => {\n\t\t\tconst type = typeof x._def.value;\n\t\t\tswitch (type) {\n\t\t\t\tcase \"string\":\n\t\t\t\tcase \"number\":\n\t\t\t\tcase \"boolean\": return [...acc, type];\n\t\t\t\tcase \"bigint\": return [...acc, \"integer\"];\n\t\t\t\tcase \"object\": if (x._def.value === null) return [...acc, \"null\"];\n\t\t\t\tdefault: return acc;\n\t\t\t}\n\t\t}, []);\n\t\tif (types.length === options.length) {\n\t\t\tconst uniqueTypes = types.filter((x, i, a) => a.indexOf(x) === i);\n\t\t\treturn {\n\t\t\t\ttype: uniqueTypes.length > 1 ? uniqueTypes : uniqueTypes[0],\n\t\t\t\tenum: options.reduce((acc, x) => {\n\t\t\t\t\treturn acc.includes(x._def.value) ? acc : [...acc, x._def.value];\n\t\t\t\t}, [])\n\t\t\t};\n\t\t}\n\t} else if (options.every((x) => x._def.typeName === \"ZodEnum\")) return {\n\t\ttype: \"string\",\n\t\tenum: options.reduce((acc, x) => [...acc, ...x._def.values.filter((x) => !acc.includes(x))], [])\n\t};\n\treturn asAnyOf(def, refs);\n}\nconst asAnyOf = (def, refs) => {\n\tconst anyOf = (def.options instanceof Map ? Array.from(def.options.values()) : def.options).map((x, i) => parseDef(x._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"anyOf\",\n\t\t\t`${i}`\n\t\t]\n\t})).filter((x) => !!x && (!refs.strictUnions || typeof x === \"object\" && Object.keys(x).length > 0));\n\treturn anyOf.length ? { anyOf } : void 0;\n};\nfunction parseNullableDef(def, refs) {\n\tif ([\n\t\t\"ZodString\",\n\t\t\"ZodNumber\",\n\t\t\"ZodBigInt\",\n\t\t\"ZodBoolean\",\n\t\t\"ZodNull\"\n\t].includes(def.innerType._def.typeName) && (!def.innerType._def.checks || !def.innerType._def.checks.length)) {\n\t\tif (refs.target === \"openApi3\") return {\n\t\t\ttype: primitiveMappings[def.innerType._def.typeName],\n\t\t\tnullable: true\n\t\t};\n\t\treturn { type: [primitiveMappings[def.innerType._def.typeName], \"null\"] };\n\t}\n\tif (refs.target === \"openApi3\") {\n\t\tconst base = parseDef(def.innerType._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [...refs.currentPath]\n\t\t});\n\t\tif (base && \"$ref\" in base) return {\n\t\t\tallOf: [base],\n\t\t\tnullable: true\n\t\t};\n\t\treturn base && {\n\t\t\t...base,\n\t\t\tnullable: true\n\t\t};\n\t}\n\tconst base = parseDef(def.innerType._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"anyOf\",\n\t\t\t\"0\"\n\t\t]\n\t});\n\treturn base && { anyOf: [base, { type: \"null\" }] };\n}\nfunction parseNumberDef(def, refs) {\n\tconst res = { type: \"number\" };\n\tif (!def.checks) return res;\n\tfor (const check of def.checks) switch (check.kind) {\n\t\tcase \"int\":\n\t\t\tres.type = \"integer\";\n\t\t\taddErrorMessage(res, \"type\", check.message, refs);\n\t\t\tbreak;\n\t\tcase \"min\":\n\t\t\tif (refs.target === \"jsonSchema7\") if (check.inclusive) setResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n\t\t\telse setResponseValueAndErrors(res, \"exclusiveMinimum\", check.value, check.message, refs);\n\t\t\telse {\n\t\t\t\tif (!check.inclusive) res.exclusiveMinimum = true;\n\t\t\t\tsetResponseValueAndErrors(res, \"minimum\", check.value, check.message, refs);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"max\":\n\t\t\tif (refs.target === \"jsonSchema7\") if (check.inclusive) setResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n\t\t\telse setResponseValueAndErrors(res, \"exclusiveMaximum\", check.value, check.message, refs);\n\t\t\telse {\n\t\t\t\tif (!check.inclusive) res.exclusiveMaximum = true;\n\t\t\t\tsetResponseValueAndErrors(res, \"maximum\", check.value, check.message, refs);\n\t\t\t}\n\t\t\tbreak;\n\t\tcase \"multipleOf\":\n\t\t\tsetResponseValueAndErrors(res, \"multipleOf\", check.value, check.message, refs);\n\t\t\tbreak;\n\t}\n\treturn res;\n}\nfunction parseObjectDef(def, refs) {\n\tconst forceOptionalIntoNullable = refs.target === \"openAi\";\n\tconst result = {\n\t\ttype: \"object\",\n\t\tproperties: {}\n\t};\n\tconst required = [];\n\tconst shape = def.shape();\n\tfor (const propName in shape) {\n\t\tlet propDef = shape[propName];\n\t\tif (propDef === void 0 || propDef._def === void 0) continue;\n\t\tlet propOptional = safeIsOptional(propDef);\n\t\tif (propOptional && forceOptionalIntoNullable) {\n\t\t\tif (propDef._def.typeName === \"ZodOptional\") propDef = propDef._def.innerType;\n\t\t\tif (!propDef.isNullable()) propDef = propDef.nullable();\n\t\t\tpropOptional = false;\n\t\t}\n\t\tconst parsedDef = parseDef(propDef._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [\n\t\t\t\t...refs.currentPath,\n\t\t\t\t\"properties\",\n\t\t\t\tpropName\n\t\t\t],\n\t\t\tpropertyPath: [\n\t\t\t\t...refs.currentPath,\n\t\t\t\t\"properties\",\n\t\t\t\tpropName\n\t\t\t]\n\t\t});\n\t\tif (parsedDef === void 0) continue;\n\t\tresult.properties[propName] = parsedDef;\n\t\tif (!propOptional) required.push(propName);\n\t}\n\tif (required.length) result.required = required;\n\tconst additionalProperties = decideAdditionalProperties(def, refs);\n\tif (additionalProperties !== void 0) result.additionalProperties = additionalProperties;\n\treturn result;\n}\nfunction decideAdditionalProperties(def, refs) {\n\tif (def.catchall._def.typeName !== \"ZodNever\") return parseDef(def.catchall._def, {\n\t\t...refs,\n\t\tcurrentPath: [...refs.currentPath, \"additionalProperties\"]\n\t});\n\tswitch (def.unknownKeys) {\n\t\tcase \"passthrough\": return refs.allowedAdditionalProperties;\n\t\tcase \"strict\": return refs.rejectedAdditionalProperties;\n\t\tcase \"strip\": return refs.removeAdditionalStrategy === \"strict\" ? refs.allowedAdditionalProperties : refs.rejectedAdditionalProperties;\n\t}\n}\nfunction safeIsOptional(schema) {\n\ttry {\n\t\treturn schema.isOptional();\n\t} catch {\n\t\treturn true;\n\t}\n}\nconst parseOptionalDef = (def, refs) => {\n\tif (refs.currentPath.toString() === refs.propertyPath?.toString()) return parseDef(def.innerType._def, refs);\n\tconst innerSchema = parseDef(def.innerType._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"anyOf\",\n\t\t\t\"1\"\n\t\t]\n\t});\n\treturn innerSchema ? { anyOf: [{ not: parseAnyDef(refs) }, innerSchema] } : parseAnyDef(refs);\n};\nconst parsePipelineDef = (def, refs) => {\n\tif (refs.pipeStrategy === \"input\") return parseDef(def.in._def, refs);\n\telse if (refs.pipeStrategy === \"output\") return parseDef(def.out._def, refs);\n\tconst a = parseDef(def.in._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"allOf\",\n\t\t\t\"0\"\n\t\t]\n\t});\n\treturn { allOf: [a, parseDef(def.out._def, {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.currentPath,\n\t\t\t\"allOf\",\n\t\t\ta ? \"1\" : \"0\"\n\t\t]\n\t})].filter((x) => x !== void 0) };\n};\nfunction parsePromiseDef(def, refs) {\n\treturn parseDef(def.type._def, refs);\n}\nfunction parseSetDef(def, refs) {\n\tconst schema = {\n\t\ttype: \"array\",\n\t\tuniqueItems: true,\n\t\titems: parseDef(def.valueType._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [...refs.currentPath, \"items\"]\n\t\t})\n\t};\n\tif (def.minSize) setResponseValueAndErrors(schema, \"minItems\", def.minSize.value, def.minSize.message, refs);\n\tif (def.maxSize) setResponseValueAndErrors(schema, \"maxItems\", def.maxSize.value, def.maxSize.message, refs);\n\treturn schema;\n}\nfunction parseTupleDef(def, refs) {\n\tif (def.rest) return {\n\t\ttype: \"array\",\n\t\tminItems: def.items.length,\n\t\titems: def.items.map((x, i) => parseDef(x._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [\n\t\t\t\t...refs.currentPath,\n\t\t\t\t\"items\",\n\t\t\t\t`${i}`\n\t\t\t]\n\t\t})).reduce((acc, x) => x === void 0 ? acc : [...acc, x], []),\n\t\tadditionalItems: parseDef(def.rest._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [...refs.currentPath, \"additionalItems\"]\n\t\t})\n\t};\n\telse return {\n\t\ttype: \"array\",\n\t\tminItems: def.items.length,\n\t\tmaxItems: def.items.length,\n\t\titems: def.items.map((x, i) => parseDef(x._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [\n\t\t\t\t...refs.currentPath,\n\t\t\t\t\"items\",\n\t\t\t\t`${i}`\n\t\t\t]\n\t\t})).reduce((acc, x) => x === void 0 ? acc : [...acc, x], [])\n\t};\n}\nfunction parseUndefinedDef(refs) {\n\treturn { not: parseAnyDef(refs) };\n}\nfunction parseUnknownDef(refs) {\n\treturn parseAnyDef(refs);\n}\nconst parseReadonlyDef = (def, refs) => {\n\treturn parseDef(def.innerType._def, refs);\n};\nconst selectParser = (def, typeName, refs) => {\n\tswitch (typeName) {\n\t\tcase ZodFirstPartyTypeKind.ZodString: return parseStringDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodNumber: return parseNumberDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodObject: return parseObjectDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodBigInt: return parseBigintDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodBoolean: return parseBooleanDef();\n\t\tcase ZodFirstPartyTypeKind.ZodDate: return parseDateDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodUndefined: return parseUndefinedDef(refs);\n\t\tcase ZodFirstPartyTypeKind.ZodNull: return parseNullDef(refs);\n\t\tcase ZodFirstPartyTypeKind.ZodArray: return parseArrayDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodUnion:\n\t\tcase ZodFirstPartyTypeKind.ZodDiscriminatedUnion: return parseUnionDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodIntersection: return parseIntersectionDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodTuple: return parseTupleDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodRecord: return parseRecordDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodLiteral: return parseLiteralDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodEnum: return parseEnumDef(def);\n\t\tcase ZodFirstPartyTypeKind.ZodNativeEnum: return parseNativeEnumDef(def);\n\t\tcase ZodFirstPartyTypeKind.ZodNullable: return parseNullableDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodOptional: return parseOptionalDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodMap: return parseMapDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodSet: return parseSetDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodLazy: return () => def.getter()._def;\n\t\tcase ZodFirstPartyTypeKind.ZodPromise: return parsePromiseDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodNaN:\n\t\tcase ZodFirstPartyTypeKind.ZodNever: return parseNeverDef(refs);\n\t\tcase ZodFirstPartyTypeKind.ZodEffects: return parseEffectsDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodAny: return parseAnyDef(refs);\n\t\tcase ZodFirstPartyTypeKind.ZodUnknown: return parseUnknownDef(refs);\n\t\tcase ZodFirstPartyTypeKind.ZodDefault: return parseDefaultDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodBranded: return parseBrandedDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodReadonly: return parseReadonlyDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodCatch: return parseCatchDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodPipeline: return parsePipelineDef(def, refs);\n\t\tcase ZodFirstPartyTypeKind.ZodFunction:\n\t\tcase ZodFirstPartyTypeKind.ZodVoid:\n\t\tcase ZodFirstPartyTypeKind.ZodSymbol: return;\n\t\tdefault: return ((_) => void 0)(typeName);\n\t}\n};\nfunction parseDef(def, refs, forceResolution = false) {\n\tconst seenItem = refs.seen.get(def);\n\tif (refs.override) {\n\t\tconst overrideResult = refs.override?.(def, refs, seenItem, forceResolution);\n\t\tif (overrideResult !== ignoreOverride) return overrideResult;\n\t}\n\tif (seenItem && !forceResolution) {\n\t\tconst seenSchema = get$ref(seenItem, refs);\n\t\tif (seenSchema !== void 0) return seenSchema;\n\t}\n\tconst newItem = {\n\t\tdef,\n\t\tpath: refs.currentPath,\n\t\tjsonSchema: void 0\n\t};\n\trefs.seen.set(def, newItem);\n\tconst jsonSchemaOrGetter = selectParser(def, def.typeName, refs);\n\tconst jsonSchema = typeof jsonSchemaOrGetter === \"function\" ? parseDef(jsonSchemaOrGetter(), refs) : jsonSchemaOrGetter;\n\tif (jsonSchema) addMeta(def, refs, jsonSchema);\n\tif (refs.postProcess) {\n\t\tconst postProcessResult = refs.postProcess(jsonSchema, def, refs);\n\t\tnewItem.jsonSchema = jsonSchema;\n\t\treturn postProcessResult;\n\t}\n\tnewItem.jsonSchema = jsonSchema;\n\treturn jsonSchema;\n}\nconst get$ref = (item, refs) => {\n\tswitch (refs.$refStrategy) {\n\t\tcase \"root\": return { $ref: item.path.join(\"/\") };\n\t\tcase \"relative\": return { $ref: getRelativePath(refs.currentPath, item.path) };\n\t\tcase \"none\":\n\t\tcase \"seen\":\n\t\t\tif (item.path.length < refs.currentPath.length && item.path.every((value, index) => refs.currentPath[index] === value)) {\n\t\t\t\tconsole.warn(`Recursive reference detected at ${refs.currentPath.join(\"/\")}! Defaulting to any`);\n\t\t\t\treturn parseAnyDef(refs);\n\t\t\t}\n\t\t\treturn refs.$refStrategy === \"seen\" ? parseAnyDef(refs) : void 0;\n\t}\n};\nconst addMeta = (def, refs, jsonSchema) => {\n\tif (def.description) {\n\t\tjsonSchema.description = def.description;\n\t\tif (refs.markdownDescription) jsonSchema.markdownDescription = def.description;\n\t}\n\treturn jsonSchema;\n};\nconst zodToJsonSchema = (schema, options) => {\n\tconst refs = getRefs(options);\n\tlet definitions = typeof options === \"object\" && options.definitions ? Object.entries(options.definitions).reduce((acc, [name, schema]) => ({\n\t\t...acc,\n\t\t[name]: parseDef(schema._def, {\n\t\t\t...refs,\n\t\t\tcurrentPath: [\n\t\t\t\t...refs.basePath,\n\t\t\t\trefs.definitionPath,\n\t\t\t\tname\n\t\t\t]\n\t\t}, true) ?? parseAnyDef(refs)\n\t}), {}) : void 0;\n\tconst name = typeof options === \"string\" ? options : options?.nameStrategy === \"title\" ? void 0 : options?.name;\n\tconst main = parseDef(schema._def, name === void 0 ? refs : {\n\t\t...refs,\n\t\tcurrentPath: [\n\t\t\t...refs.basePath,\n\t\t\trefs.definitionPath,\n\t\t\tname\n\t\t]\n\t}, false) ?? parseAnyDef(refs);\n\tconst title = typeof options === \"object\" && options.name !== void 0 && options.nameStrategy === \"title\" ? options.name : void 0;\n\tif (title !== void 0) main.title = title;\n\tif (refs.flags.hasReferencedOpenAiAnyType) {\n\t\tif (!definitions) definitions = {};\n\t\tif (!definitions[refs.openAiAnyTypeName]) definitions[refs.openAiAnyTypeName] = {\n\t\t\ttype: [\n\t\t\t\t\"string\",\n\t\t\t\t\"number\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"array\",\n\t\t\t\t\"null\"\n\t\t\t],\n\t\t\titems: { $ref: refs.$refStrategy === \"relative\" ? \"1\" : [\n\t\t\t\t...refs.basePath,\n\t\t\t\trefs.definitionPath,\n\t\t\t\trefs.openAiAnyTypeName\n\t\t\t].join(\"/\") }\n\t\t};\n\t}\n\tconst combined = name === void 0 ? definitions ? {\n\t\t...main,\n\t\t[refs.definitionPath]: definitions\n\t} : main : {\n\t\t$ref: [\n\t\t\t...refs.$refStrategy === \"relative\" ? [] : refs.basePath,\n\t\t\trefs.definitionPath,\n\t\t\tname\n\t\t].join(\"/\"),\n\t\t[refs.definitionPath]: {\n\t\t\t...definitions,\n\t\t\t[name]: main\n\t\t}\n\t};\n\tif (refs.target === \"jsonSchema7\") combined.$schema = \"http://json-schema.org/draft-07/schema#\";\n\telse if (refs.target === \"jsonSchema2019-09\" || refs.target === \"openAi\") combined.$schema = \"https://json-schema.org/draft/2019-09/schema#\";\n\tif (refs.target === \"openAi\" && (\"anyOf\" in combined || \"oneOf\" in combined || \"allOf\" in combined || \"type\" in combined && Array.isArray(combined.type))) console.warn(\"Warning: OpenAI may not support schemas with unions as roots! Try wrapping it in an object property.\");\n\treturn combined;\n};\nvar esm_default = zodToJsonSchema;\nvar textStreamPart = {\n\tcode: \"0\",\n\tname: \"text\",\n\tparse: (value) => {\n\t\tif (typeof value !== \"string\") throw new Error(\"\\\"text\\\" parts expect a string value.\");\n\t\treturn {\n\t\t\ttype: \"text\",\n\t\t\tvalue\n\t\t};\n\t}\n};\nvar errorStreamPart = {\n\tcode: \"3\",\n\tname: \"error\",\n\tparse: (value) => {\n\t\tif (typeof value !== \"string\") throw new Error(\"\\\"error\\\" parts expect a string value.\");\n\t\treturn {\n\t\t\ttype: \"error\",\n\t\t\tvalue\n\t\t};\n\t}\n};\nvar assistantMessageStreamPart = {\n\tcode: \"4\",\n\tname: \"assistant_message\",\n\tparse: (value) => {\n\t\tif (value == null || typeof value !== \"object\" || !(\"id\" in value) || !(\"role\" in value) || !(\"content\" in value) || typeof value.id !== \"string\" || typeof value.role !== \"string\" || value.role !== \"assistant\" || !Array.isArray(value.content) || !value.content.every((item) => item != null && typeof item === \"object\" && \"type\" in item && item.type === \"text\" && \"text\" in item && item.text != null && typeof item.text === \"object\" && \"value\" in item.text && typeof item.text.value === \"string\")) throw new Error(\"\\\"assistant_message\\\" parts expect an object with an \\\"id\\\", \\\"role\\\", and \\\"content\\\" property.\");\n\t\treturn {\n\t\t\ttype: \"assistant_message\",\n\t\t\tvalue\n\t\t};\n\t}\n};\nvar assistantControlDataStreamPart = {\n\tcode: \"5\",\n\tname: \"assistant_control_data\",\n\tparse: (value) => {\n\t\tif (value == null || typeof value !== \"object\" || !(\"threadId\" in value) || !(\"messageId\" in value) || typeof value.threadId !== \"string\" || typeof value.messageId !== \"string\") throw new Error(\"\\\"assistant_control_data\\\" parts expect an object with a \\\"threadId\\\" and \\\"messageId\\\" property.\");\n\t\treturn {\n\t\t\ttype: \"assistant_control_data\",\n\t\t\tvalue: {\n\t\t\t\tthreadId: value.threadId,\n\t\t\t\tmessageId: value.messageId\n\t\t\t}\n\t\t};\n\t}\n};\nvar dataMessageStreamPart = {\n\tcode: \"6\",\n\tname: \"data_message\",\n\tparse: (value) => {\n\t\tif (value == null || typeof value !== \"object\" || !(\"role\" in value) || !(\"data\" in value) || typeof value.role !== \"string\" || value.role !== \"data\") throw new Error(\"\\\"data_message\\\" parts expect an object with a \\\"role\\\" and \\\"data\\\" property.\");\n\t\treturn {\n\t\t\ttype: \"data_message\",\n\t\t\tvalue\n\t\t};\n\t}\n};\nvar assistantStreamParts = [\n\ttextStreamPart,\n\terrorStreamPart,\n\tassistantMessageStreamPart,\n\tassistantControlDataStreamPart,\n\tdataMessageStreamPart\n];\ntextStreamPart.code, errorStreamPart.code, assistantMessageStreamPart.code, assistantControlDataStreamPart.code, dataMessageStreamPart.code;\ntextStreamPart.name, textStreamPart.code, errorStreamPart.name, errorStreamPart.code, assistantMessageStreamPart.name, assistantMessageStreamPart.code, assistantControlDataStreamPart.name, assistantControlDataStreamPart.code, dataMessageStreamPart.name, dataMessageStreamPart.code;\nassistantStreamParts.map((part) => part.code);\nfunction fixJson(input) {\n\tconst stack = [\"ROOT\"];\n\tlet lastValidIndex = -1;\n\tlet literalStart = null;\n\tfunction processValueStart(char, i, swapState) {\n\t\tswitch (char) {\n\t\t\tcase \"\\\"\":\n\t\t\t\tlastValidIndex = i;\n\t\t\t\tstack.pop();\n\t\t\t\tstack.push(swapState);\n\t\t\t\tstack.push(\"INSIDE_STRING\");\n\t\t\t\tbreak;\n\t\t\tcase \"f\":\n\t\t\tcase \"t\":\n\t\t\tcase \"n\":\n\t\t\t\tlastValidIndex = i;\n\t\t\t\tliteralStart = i;\n\t\t\t\tstack.pop();\n\t\t\t\tstack.push(swapState);\n\t\t\t\tstack.push(\"INSIDE_LITERAL\");\n\t\t\t\tbreak;\n\t\t\tcase \"-\":\n\t\t\t\tstack.pop();\n\t\t\t\tstack.push(swapState);\n\t\t\t\tstack.push(\"INSIDE_NUMBER\");\n\t\t\t\tbreak;\n\t\t\tcase \"0\":\n\t\t\tcase \"1\":\n\t\t\tcase \"2\":\n\t\t\tcase \"3\":\n\t\t\tcase \"4\":\n\t\t\tcase \"5\":\n\t\t\tcase \"6\":\n\t\t\tcase \"7\":\n\t\t\tcase \"8\":\n\t\t\tcase \"9\":\n\t\t\t\tlastValidIndex = i;\n\t\t\t\tstack.pop();\n\t\t\t\tstack.push(swapState);\n\t\t\t\tstack.push(\"INSIDE_NUMBER\");\n\t\t\t\tbreak;\n\t\t\tcase \"{\":\n\t\t\t\tlastValidIndex = i;\n\t\t\t\tstack.pop();\n\t\t\t\tstack.push(swapState);\n\t\t\t\tstack.push(\"INSIDE_OBJECT_START\");\n\t\t\t\tbreak;\n\t\t\tcase \"[\":\n\t\t\t\tlastValidIndex = i;\n\t\t\t\tstack.pop();\n\t\t\t\tstack.push(swapState);\n\t\t\t\tstack.push(\"INSIDE_ARRAY_START\");\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tfunction processAfterObjectValue(char, i) {\n\t\tswitch (char) {\n\t\t\tcase \",\":\n\t\t\t\tstack.pop();\n\t\t\t\tstack.push(\"INSIDE_OBJECT_AFTER_COMMA\");\n\t\t\t\tbreak;\n\t\t\tcase \"}\":\n\t\t\t\tlastValidIndex = i;\n\t\t\t\tstack.pop();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tfunction processAfterArrayValue(char, i) {\n\t\tswitch (char) {\n\t\t\tcase \",\":\n\t\t\t\tstack.pop();\n\t\t\t\tstack.push(\"INSIDE_ARRAY_AFTER_COMMA\");\n\t\t\t\tbreak;\n\t\t\tcase \"]\":\n\t\t\t\tlastValidIndex = i;\n\t\t\t\tstack.pop();\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tfor (let i = 0; i < input.length; i++) {\n\t\tconst char = input[i];\n\t\tswitch (stack[stack.length - 1]) {\n\t\t\tcase \"ROOT\":\n\t\t\t\tprocessValueStart(char, i, \"FINISH\");\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_OBJECT_START\":\n\t\t\t\tswitch (char) {\n\t\t\t\t\tcase \"\\\"\":\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tstack.push(\"INSIDE_OBJECT_KEY\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"}\":\n\t\t\t\t\t\tlastValidIndex = i;\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_OBJECT_AFTER_COMMA\":\n\t\t\t\tswitch (char) {\n\t\t\t\t\tcase \"\\\"\":\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tstack.push(\"INSIDE_OBJECT_KEY\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_OBJECT_KEY\":\n\t\t\t\tswitch (char) {\n\t\t\t\t\tcase \"\\\"\":\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tstack.push(\"INSIDE_OBJECT_AFTER_KEY\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_OBJECT_AFTER_KEY\":\n\t\t\t\tswitch (char) {\n\t\t\t\t\tcase \":\":\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tstack.push(\"INSIDE_OBJECT_BEFORE_VALUE\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_OBJECT_BEFORE_VALUE\":\n\t\t\t\tprocessValueStart(char, i, \"INSIDE_OBJECT_AFTER_VALUE\");\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_OBJECT_AFTER_VALUE\":\n\t\t\t\tprocessAfterObjectValue(char, i);\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_STRING\":\n\t\t\t\tswitch (char) {\n\t\t\t\t\tcase \"\\\"\":\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tlastValidIndex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"\\\\\":\n\t\t\t\t\t\tstack.push(\"INSIDE_STRING_ESCAPE\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: lastValidIndex = i;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_ARRAY_START\":\n\t\t\t\tswitch (char) {\n\t\t\t\t\tcase \"]\":\n\t\t\t\t\t\tlastValidIndex = i;\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tlastValidIndex = i;\n\t\t\t\t\t\tprocessValueStart(char, i, \"INSIDE_ARRAY_AFTER_VALUE\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_ARRAY_AFTER_VALUE\":\n\t\t\t\tswitch (char) {\n\t\t\t\t\tcase \",\":\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tstack.push(\"INSIDE_ARRAY_AFTER_COMMA\");\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"]\":\n\t\t\t\t\t\tlastValidIndex = i;\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tlastValidIndex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_ARRAY_AFTER_COMMA\":\n\t\t\t\tprocessValueStart(char, i, \"INSIDE_ARRAY_AFTER_VALUE\");\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_STRING_ESCAPE\":\n\t\t\t\tstack.pop();\n\t\t\t\tlastValidIndex = i;\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_NUMBER\":\n\t\t\t\tswitch (char) {\n\t\t\t\t\tcase \"0\":\n\t\t\t\t\tcase \"1\":\n\t\t\t\t\tcase \"2\":\n\t\t\t\t\tcase \"3\":\n\t\t\t\t\tcase \"4\":\n\t\t\t\t\tcase \"5\":\n\t\t\t\t\tcase \"6\":\n\t\t\t\t\tcase \"7\":\n\t\t\t\t\tcase \"8\":\n\t\t\t\t\tcase \"9\":\n\t\t\t\t\t\tlastValidIndex = i;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"e\":\n\t\t\t\t\tcase \"E\":\n\t\t\t\t\tcase \"-\":\n\t\t\t\t\tcase \".\": break;\n\t\t\t\t\tcase \",\":\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tif (stack[stack.length - 1] === \"INSIDE_ARRAY_AFTER_VALUE\") processAfterArrayValue(char, i);\n\t\t\t\t\t\tif (stack[stack.length - 1] === \"INSIDE_OBJECT_AFTER_VALUE\") processAfterObjectValue(char, i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"}\":\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tif (stack[stack.length - 1] === \"INSIDE_OBJECT_AFTER_VALUE\") processAfterObjectValue(char, i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"]\":\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tif (stack[stack.length - 1] === \"INSIDE_ARRAY_AFTER_VALUE\") processAfterArrayValue(char, i);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tstack.pop();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase \"INSIDE_LITERAL\": {\n\t\t\t\tconst partialLiteral = input.substring(literalStart, i + 1);\n\t\t\t\tif (!\"false\".startsWith(partialLiteral) && !\"true\".startsWith(partialLiteral) && !\"null\".startsWith(partialLiteral)) {\n\t\t\t\t\tstack.pop();\n\t\t\t\t\tif (stack[stack.length - 1] === \"INSIDE_OBJECT_AFTER_VALUE\") processAfterObjectValue(char, i);\n\t\t\t\t\telse if (stack[stack.length - 1] === \"INSIDE_ARRAY_AFTER_VALUE\") processAfterArrayValue(char, i);\n\t\t\t\t} else lastValidIndex = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tlet result = input.slice(0, lastValidIndex + 1);\n\tfor (let i = stack.length - 1; i >= 0; i--) switch (stack[i]) {\n\t\tcase \"INSIDE_STRING\":\n\t\t\tresult += \"\\\"\";\n\t\t\tbreak;\n\t\tcase \"INSIDE_OBJECT_KEY\":\n\t\tcase \"INSIDE_OBJECT_AFTER_KEY\":\n\t\tcase \"INSIDE_OBJECT_AFTER_COMMA\":\n\t\tcase \"INSIDE_OBJECT_START\":\n\t\tcase \"INSIDE_OBJECT_BEFORE_VALUE\":\n\t\tcase \"INSIDE_OBJECT_AFTER_VALUE\":\n\t\t\tresult += \"}\";\n\t\t\tbreak;\n\t\tcase \"INSIDE_ARRAY_START\":\n\t\tcase \"INSIDE_ARRAY_AFTER_COMMA\":\n\t\tcase \"INSIDE_ARRAY_AFTER_VALUE\":\n\t\t\tresult += \"]\";\n\t\t\tbreak;\n\t\tcase \"INSIDE_LITERAL\": {\n\t\t\tconst partialLiteral = input.substring(literalStart, input.length);\n\t\t\tif (\"true\".startsWith(partialLiteral)) result += \"true\".slice(partialLiteral.length);\n\t\t\telse if (\"false\".startsWith(partialLiteral)) result += \"false\".slice(partialLiteral.length);\n\t\t\telse if (\"null\".startsWith(partialLiteral)) result += \"null\".slice(partialLiteral.length);\n\t\t}\n\t}\n\treturn result;\n}\nfunction parsePartialJson(jsonText) {\n\tif (jsonText === void 0) return {\n\t\tvalue: void 0,\n\t\tstate: \"undefined-input\"\n\t};\n\tlet result = safeParseJSON({ text: jsonText });\n\tif (result.success) return {\n\t\tvalue: result.value,\n\t\tstate: \"successful-parse\"\n\t};\n\tresult = safeParseJSON({ text: fixJson(jsonText) });\n\tif (result.success) return {\n\t\tvalue: result.value,\n\t\tstate: \"repaired-parse\"\n\t};\n\treturn {\n\t\tvalue: void 0,\n\t\tstate: \"failed-parse\"\n\t};\n}\nvar dataStreamParts = [\n\t{\n\t\tcode: \"0\",\n\t\tname: \"text\",\n\t\tparse: (value) => {\n\t\t\tif (typeof value !== \"string\") throw new Error(\"\\\"text\\\" parts expect a string value.\");\n\t\t\treturn {\n\t\t\t\ttype: \"text\",\n\t\t\t\tvalue\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"2\",\n\t\tname: \"data\",\n\t\tparse: (value) => {\n\t\t\tif (!Array.isArray(value)) throw new Error(\"\\\"data\\\" parts expect an array value.\");\n\t\t\treturn {\n\t\t\t\ttype: \"data\",\n\t\t\t\tvalue\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"3\",\n\t\tname: \"error\",\n\t\tparse: (value) => {\n\t\t\tif (typeof value !== \"string\") throw new Error(\"\\\"error\\\" parts expect a string value.\");\n\t\t\treturn {\n\t\t\t\ttype: \"error\",\n\t\t\t\tvalue\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"8\",\n\t\tname: \"message_annotations\",\n\t\tparse: (value) => {\n\t\t\tif (!Array.isArray(value)) throw new Error(\"\\\"message_annotations\\\" parts expect an array value.\");\n\t\t\treturn {\n\t\t\t\ttype: \"message_annotations\",\n\t\t\t\tvalue\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"9\",\n\t\tname: \"tool_call\",\n\t\tparse: (value) => {\n\t\t\tif (value == null || typeof value !== \"object\" || !(\"toolCallId\" in value) || typeof value.toolCallId !== \"string\" || !(\"toolName\" in value) || typeof value.toolName !== \"string\" || !(\"args\" in value) || typeof value.args !== \"object\") throw new Error(\"\\\"tool_call\\\" parts expect an object with a \\\"toolCallId\\\", \\\"toolName\\\", and \\\"args\\\" property.\");\n\t\t\treturn {\n\t\t\t\ttype: \"tool_call\",\n\t\t\t\tvalue\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"a\",\n\t\tname: \"tool_result\",\n\t\tparse: (value) => {\n\t\t\tif (value == null || typeof value !== \"object\" || !(\"toolCallId\" in value) || typeof value.toolCallId !== \"string\" || !(\"result\" in value)) throw new Error(\"\\\"tool_result\\\" parts expect an object with a \\\"toolCallId\\\" and a \\\"result\\\" property.\");\n\t\t\treturn {\n\t\t\t\ttype: \"tool_result\",\n\t\t\t\tvalue\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"b\",\n\t\tname: \"tool_call_streaming_start\",\n\t\tparse: (value) => {\n\t\t\tif (value == null || typeof value !== \"object\" || !(\"toolCallId\" in value) || typeof value.toolCallId !== \"string\" || !(\"toolName\" in value) || typeof value.toolName !== \"string\") throw new Error(\"\\\"tool_call_streaming_start\\\" parts expect an object with a \\\"toolCallId\\\" and \\\"toolName\\\" property.\");\n\t\t\treturn {\n\t\t\t\ttype: \"tool_call_streaming_start\",\n\t\t\t\tvalue\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"c\",\n\t\tname: \"tool_call_delta\",\n\t\tparse: (value) => {\n\t\t\tif (value == null || typeof value !== \"object\" || !(\"toolCallId\" in value) || typeof value.toolCallId !== \"string\" || !(\"argsTextDelta\" in value) || typeof value.argsTextDelta !== \"string\") throw new Error(\"\\\"tool_call_delta\\\" parts expect an object with a \\\"toolCallId\\\" and \\\"argsTextDelta\\\" property.\");\n\t\t\treturn {\n\t\t\t\ttype: \"tool_call_delta\",\n\t\t\t\tvalue\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"d\",\n\t\tname: \"finish_message\",\n\t\tparse: (value) => {\n\t\t\tif (value == null || typeof value !== \"object\" || !(\"finishReason\" in value) || typeof value.finishReason !== \"string\") throw new Error(\"\\\"finish_message\\\" parts expect an object with a \\\"finishReason\\\" property.\");\n\t\t\tconst result = { finishReason: value.finishReason };\n\t\t\tif (\"usage\" in value && value.usage != null && typeof value.usage === \"object\" && \"promptTokens\" in value.usage && \"completionTokens\" in value.usage) result.usage = {\n\t\t\t\tpromptTokens: typeof value.usage.promptTokens === \"number\" ? value.usage.promptTokens : NaN,\n\t\t\t\tcompletionTokens: typeof value.usage.completionTokens === \"number\" ? value.usage.completionTokens : NaN\n\t\t\t};\n\t\t\treturn {\n\t\t\t\ttype: \"finish_message\",\n\t\t\t\tvalue: result\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"e\",\n\t\tname: \"finish_step\",\n\t\tparse: (value) => {\n\t\t\tif (value == null || typeof value !== \"object\" || !(\"finishReason\" in value) || typeof value.finishReason !== \"string\") throw new Error(\"\\\"finish_step\\\" parts expect an object with a \\\"finishReason\\\" property.\");\n\t\t\tconst result = {\n\t\t\t\tfinishReason: value.finishReason,\n\t\t\t\tisContinued: false\n\t\t\t};\n\t\t\tif (\"usage\" in value && value.usage != null && typeof value.usage === \"object\" && \"promptTokens\" in value.usage && \"completionTokens\" in value.usage) result.usage = {\n\t\t\t\tpromptTokens: typeof value.usage.promptTokens === \"number\" ? value.usage.promptTokens : NaN,\n\t\t\t\tcompletionTokens: typeof value.usage.completionTokens === \"number\" ? value.usage.completionTokens : NaN\n\t\t\t};\n\t\t\tif (\"isContinued\" in value && typeof value.isContinued === \"boolean\") result.isContinued = value.isContinued;\n\t\t\treturn {\n\t\t\t\ttype: \"finish_step\",\n\t\t\t\tvalue: result\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"f\",\n\t\tname: \"start_step\",\n\t\tparse: (value) => {\n\t\t\tif (value == null || typeof value !== \"object\" || !(\"messageId\" in value) || typeof value.messageId !== \"string\") throw new Error(\"\\\"start_step\\\" parts expect an object with an \\\"id\\\" property.\");\n\t\t\treturn {\n\t\t\t\ttype: \"start_step\",\n\t\t\t\tvalue: { messageId: value.messageId }\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"g\",\n\t\tname: \"reasoning\",\n\t\tparse: (value) => {\n\t\t\tif (typeof value !== \"string\") throw new Error(\"\\\"reasoning\\\" parts expect a string value.\");\n\t\t\treturn {\n\t\t\t\ttype: \"reasoning\",\n\t\t\t\tvalue\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"h\",\n\t\tname: \"source\",\n\t\tparse: (value) => {\n\t\t\tif (value == null || typeof value !== \"object\") throw new Error(\"\\\"source\\\" parts expect a Source object.\");\n\t\t\treturn {\n\t\t\t\ttype: \"source\",\n\t\t\t\tvalue\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"i\",\n\t\tname: \"redacted_reasoning\",\n\t\tparse: (value) => {\n\t\t\tif (value == null || typeof value !== \"object\" || !(\"data\" in value) || typeof value.data !== \"string\") throw new Error(\"\\\"redacted_reasoning\\\" parts expect an object with a \\\"data\\\" property.\");\n\t\t\treturn {\n\t\t\t\ttype: \"redacted_reasoning\",\n\t\t\t\tvalue: { data: value.data }\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"j\",\n\t\tname: \"reasoning_signature\",\n\t\tparse: (value) => {\n\t\t\tif (value == null || typeof value !== \"object\" || !(\"signature\" in value) || typeof value.signature !== \"string\") throw new Error(\"\\\"reasoning_signature\\\" parts expect an object with a \\\"signature\\\" property.\");\n\t\t\treturn {\n\t\t\t\ttype: \"reasoning_signature\",\n\t\t\t\tvalue: { signature: value.signature }\n\t\t\t};\n\t\t}\n\t},\n\t{\n\t\tcode: \"k\",\n\t\tname: \"file\",\n\t\tparse: (value) => {\n\t\t\tif (value == null || typeof value !== \"object\" || !(\"data\" in value) || typeof value.data !== \"string\" || !(\"mimeType\" in value) || typeof value.mimeType !== \"string\") throw new Error(\"\\\"file\\\" parts expect an object with a \\\"data\\\" and \\\"mimeType\\\" property.\");\n\t\t\treturn {\n\t\t\t\ttype: \"file\",\n\t\t\t\tvalue\n\t\t\t};\n\t\t}\n\t}\n];\nObject.fromEntries(dataStreamParts.map((part) => [part.code, part]));\nObject.fromEntries(dataStreamParts.map((part) => [part.name, part.code]));\ndataStreamParts.map((part) => part.code);\nfunction formatDataStreamPart(type, value) {\n\tconst streamPart = dataStreamParts.find((part) => part.name === type);\n\tif (!streamPart) throw new Error(`Invalid stream part type: ${type}`);\n\treturn `${streamPart.code}:${JSON.stringify(value)}\n`;\n}\n\"\\n\".charCodeAt(0);\n\"\\n\".charCodeAt(0);\nfunction zodSchema(zodSchema2, options) {\n\tvar _a;\n\treturn jsonSchema(esm_default(zodSchema2, {\n\t\t$refStrategy: ((_a = options == null ? void 0 : options.useReferences) != null ? _a : false) ? \"root\" : \"none\",\n\t\ttarget: \"jsonSchema7\"\n\t}), { validate: (value) => {\n\t\tconst result = zodSchema2.safeParse(value);\n\t\treturn result.success ? {\n\t\t\tsuccess: true,\n\t\t\tvalue: result.data\n\t\t} : {\n\t\t\tsuccess: false,\n\t\t\terror: result.error\n\t\t};\n\t} });\n}\nvar schemaSymbol = Symbol.for(\"vercel.ai.schema\");\nfunction jsonSchema(jsonSchema2, { validate } = {}) {\n\treturn {\n\t\t[schemaSymbol]: true,\n\t\t_type: void 0,\n\t\t[validatorSymbol]: true,\n\t\tjsonSchema: jsonSchema2,\n\t\tvalidate\n\t};\n}\nfunction isSchema(value) {\n\treturn typeof value === \"object\" && value !== null && schemaSymbol in value && value[schemaSymbol] === true && \"jsonSchema\" in value && \"validate\" in value;\n}\nfunction asSchema(schema) {\n\treturn isSchema(schema) ? schema : zodSchema(schema);\n}\n/** only globals that common to node and browsers are allowed */\nvar _globalThis = typeof globalThis === \"object\" ? globalThis : global;\nvar VERSION = \"1.9.0\";\nvar re = /^(\\d+)\\.(\\d+)\\.(\\d+)(-(.+))?$/;\n/**\n* Create a function to test an API version to see if it is compatible with the provided ownVersion.\n*\n* The returned function has the following semantics:\n* - Exact match is always compatible\n* - Major versions must match exactly\n*    - 1.x package cannot use global 2.x package\n*    - 2.x package cannot use global 1.x package\n* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n*    - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n*    - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n* - Patch and build tag differences are not considered at this time\n*\n* @param ownVersion version which should be checked against\n*/\nfunction _makeCompatibilityCheck(ownVersion) {\n\tvar acceptedVersions = /* @__PURE__ */ new Set([ownVersion]);\n\tvar rejectedVersions = /* @__PURE__ */ new Set();\n\tvar myVersionMatch = ownVersion.match(re);\n\tif (!myVersionMatch) return function() {\n\t\treturn false;\n\t};\n\tvar ownVersionParsed = {\n\t\tmajor: +myVersionMatch[1],\n\t\tminor: +myVersionMatch[2],\n\t\tpatch: +myVersionMatch[3],\n\t\tprerelease: myVersionMatch[4]\n\t};\n\tif (ownVersionParsed.prerelease != null) return function isExactmatch(globalVersion) {\n\t\treturn globalVersion === ownVersion;\n\t};\n\tfunction _reject(v) {\n\t\trejectedVersions.add(v);\n\t\treturn false;\n\t}\n\tfunction _accept(v) {\n\t\tacceptedVersions.add(v);\n\t\treturn true;\n\t}\n\treturn function isCompatible(globalVersion) {\n\t\tif (acceptedVersions.has(globalVersion)) return true;\n\t\tif (rejectedVersions.has(globalVersion)) return false;\n\t\tvar globalVersionMatch = globalVersion.match(re);\n\t\tif (!globalVersionMatch) return _reject(globalVersion);\n\t\tvar globalVersionParsed = {\n\t\t\tmajor: +globalVersionMatch[1],\n\t\t\tminor: +globalVersionMatch[2],\n\t\t\tpatch: +globalVersionMatch[3],\n\t\t\tprerelease: globalVersionMatch[4]\n\t\t};\n\t\tif (globalVersionParsed.prerelease != null) return _reject(globalVersion);\n\t\tif (ownVersionParsed.major !== globalVersionParsed.major) return _reject(globalVersion);\n\t\tif (ownVersionParsed.major === 0) {\n\t\t\tif (ownVersionParsed.minor === globalVersionParsed.minor && ownVersionParsed.patch <= globalVersionParsed.patch) return _accept(globalVersion);\n\t\t\treturn _reject(globalVersion);\n\t\t}\n\t\tif (ownVersionParsed.minor <= globalVersionParsed.minor) return _accept(globalVersion);\n\t\treturn _reject(globalVersion);\n\t};\n}\n/**\n* Test an API version to see if it is compatible with this API.\n*\n* - Exact match is always compatible\n* - Major versions must match exactly\n*    - 1.x package cannot use global 2.x package\n*    - 2.x package cannot use global 1.x package\n* - The minor version of the API module requesting access to the global API must be less than or equal to the minor version of this API\n*    - 1.3 package may use 1.4 global because the later global contains all functions 1.3 expects\n*    - 1.4 package may NOT use 1.3 global because it may try to call functions which don't exist on 1.3\n* - If the major version is 0, the minor version is treated as the major and the patch is treated as the minor\n* - Patch and build tag differences are not considered at this time\n*\n* @param version version of the API requesting an instance of the global API\n*/\nvar isCompatible = _makeCompatibilityCheck(VERSION);\nvar major = VERSION.split(\".\")[0];\nvar GLOBAL_OPENTELEMETRY_API_KEY = Symbol.for(\"opentelemetry.js.api.\" + major);\nvar _global = _globalThis;\nfunction registerGlobal(type, instance, diag, allowOverride) {\n\tvar _a;\n\tif (allowOverride === void 0) allowOverride = false;\n\tvar api = _global[GLOBAL_OPENTELEMETRY_API_KEY] = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) !== null && _a !== void 0 ? _a : { version: VERSION };\n\tif (!allowOverride && api[type]) {\n\t\tvar err = /* @__PURE__ */ new Error(\"@opentelemetry/api: Attempted duplicate registration of API: \" + type);\n\t\tdiag.error(err.stack || err.message);\n\t\treturn false;\n\t}\n\tif (api.version !== \"1.9.0\") {\n\t\tvar err = /* @__PURE__ */ new Error(\"@opentelemetry/api: Registration of version v\" + api.version + \" for \" + type + \" does not match previously registered API v\" + VERSION);\n\t\tdiag.error(err.stack || err.message);\n\t\treturn false;\n\t}\n\tapi[type] = instance;\n\tdiag.debug(\"@opentelemetry/api: Registered a global for \" + type + \" v\" + VERSION + \".\");\n\treturn true;\n}\nfunction getGlobal(type) {\n\tvar _a, _b;\n\tvar globalVersion = (_a = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _a === void 0 ? void 0 : _a.version;\n\tif (!globalVersion || !isCompatible(globalVersion)) return;\n\treturn (_b = _global[GLOBAL_OPENTELEMETRY_API_KEY]) === null || _b === void 0 ? void 0 : _b[type];\n}\nfunction unregisterGlobal(type, diag) {\n\tdiag.debug(\"@opentelemetry/api: Unregistering a global for \" + type + \" v\" + VERSION + \".\");\n\tvar api = _global[GLOBAL_OPENTELEMETRY_API_KEY];\n\tif (api) delete api[type];\n}\nvar __read$3 = function(o, n) {\n\tvar m = typeof Symbol === \"function\" && o[Symbol.iterator];\n\tif (!m) return o;\n\tvar i = m.call(o), r, ar = [], e;\n\ttry {\n\t\twhile ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n\t} catch (error) {\n\t\te = { error };\n\t} finally {\n\t\ttry {\n\t\t\tif (r && !r.done && (m = i[\"return\"])) m.call(i);\n\t\t} finally {\n\t\t\tif (e) throw e.error;\n\t\t}\n\t}\n\treturn ar;\n};\nvar __spreadArray$3 = function(to, from, pack) {\n\tif (pack || arguments.length === 2) {\n\t\tfor (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) {\n\t\t\tif (!ar) ar = Array.prototype.slice.call(from, 0, i);\n\t\t\tar[i] = from[i];\n\t\t}\n\t}\n\treturn to.concat(ar || Array.prototype.slice.call(from));\n};\n/**\n* Component Logger which is meant to be used as part of any component which\n* will add automatically additional namespace in front of the log message.\n* It will then forward all message to global diag logger\n* @example\n* const cLogger = diag.createComponentLogger({ namespace: '@opentelemetry/instrumentation-http' });\n* cLogger.debug('test');\n* // @opentelemetry/instrumentation-http test\n*/\nvar DiagComponentLogger = function() {\n\tfunction DiagComponentLogger(props) {\n\t\tthis._namespace = props.namespace || \"DiagComponentLogger\";\n\t}\n\tDiagComponentLogger.prototype.debug = function() {\n\t\tvar args = [];\n\t\tfor (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];\n\t\treturn logProxy(\"debug\", this._namespace, args);\n\t};\n\tDiagComponentLogger.prototype.error = function() {\n\t\tvar args = [];\n\t\tfor (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];\n\t\treturn logProxy(\"error\", this._namespace, args);\n\t};\n\tDiagComponentLogger.prototype.info = function() {\n\t\tvar args = [];\n\t\tfor (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];\n\t\treturn logProxy(\"info\", this._namespace, args);\n\t};\n\tDiagComponentLogger.prototype.warn = function() {\n\t\tvar args = [];\n\t\tfor (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];\n\t\treturn logProxy(\"warn\", this._namespace, args);\n\t};\n\tDiagComponentLogger.prototype.verbose = function() {\n\t\tvar args = [];\n\t\tfor (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];\n\t\treturn logProxy(\"verbose\", this._namespace, args);\n\t};\n\treturn DiagComponentLogger;\n}();\nfunction logProxy(funcName, namespace, args) {\n\tvar logger = getGlobal(\"diag\");\n\tif (!logger) return;\n\targs.unshift(namespace);\n\treturn logger[funcName].apply(logger, __spreadArray$3([], __read$3(args), false));\n}\n/**\n* Defines the available internal logging levels for the diagnostic logger, the numeric values\n* of the levels are defined to match the original values from the initial LogLevel to avoid\n* compatibility/migration issues for any implementation that assume the numeric ordering.\n*/\nvar DiagLogLevel;\n(function(DiagLogLevel) {\n\t/** Diagnostic Logging level setting to disable all logging (except and forced logs) */\n\tDiagLogLevel[DiagLogLevel[\"NONE\"] = 0] = \"NONE\";\n\t/** Identifies an error scenario */\n\tDiagLogLevel[DiagLogLevel[\"ERROR\"] = 30] = \"ERROR\";\n\t/** Identifies a warning scenario */\n\tDiagLogLevel[DiagLogLevel[\"WARN\"] = 50] = \"WARN\";\n\t/** General informational log message */\n\tDiagLogLevel[DiagLogLevel[\"INFO\"] = 60] = \"INFO\";\n\t/** General debug log message */\n\tDiagLogLevel[DiagLogLevel[\"DEBUG\"] = 70] = \"DEBUG\";\n\t/**\n\t* Detailed trace level logging should only be used for development, should only be set\n\t* in a development environment.\n\t*/\n\tDiagLogLevel[DiagLogLevel[\"VERBOSE\"] = 80] = \"VERBOSE\";\n\t/** Used to set the logging level to include all logging */\n\tDiagLogLevel[DiagLogLevel[\"ALL\"] = 9999] = \"ALL\";\n})(DiagLogLevel || (DiagLogLevel = {}));\nfunction createLogLevelDiagLogger(maxLevel, logger) {\n\tif (maxLevel < DiagLogLevel.NONE) maxLevel = DiagLogLevel.NONE;\n\telse if (maxLevel > DiagLogLevel.ALL) maxLevel = DiagLogLevel.ALL;\n\tlogger = logger || {};\n\tfunction _filterFunc(funcName, theLevel) {\n\t\tvar theFunc = logger[funcName];\n\t\tif (typeof theFunc === \"function\" && maxLevel >= theLevel) return theFunc.bind(logger);\n\t\treturn function() {};\n\t}\n\treturn {\n\t\terror: _filterFunc(\"error\", DiagLogLevel.ERROR),\n\t\twarn: _filterFunc(\"warn\", DiagLogLevel.WARN),\n\t\tinfo: _filterFunc(\"info\", DiagLogLevel.INFO),\n\t\tdebug: _filterFunc(\"debug\", DiagLogLevel.DEBUG),\n\t\tverbose: _filterFunc(\"verbose\", DiagLogLevel.VERBOSE)\n\t};\n}\nvar __read$2 = function(o, n) {\n\tvar m = typeof Symbol === \"function\" && o[Symbol.iterator];\n\tif (!m) return o;\n\tvar i = m.call(o), r, ar = [], e;\n\ttry {\n\t\twhile ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n\t} catch (error) {\n\t\te = { error };\n\t} finally {\n\t\ttry {\n\t\t\tif (r && !r.done && (m = i[\"return\"])) m.call(i);\n\t\t} finally {\n\t\t\tif (e) throw e.error;\n\t\t}\n\t}\n\treturn ar;\n};\nvar __spreadArray$2 = function(to, from, pack) {\n\tif (pack || arguments.length === 2) {\n\t\tfor (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) {\n\t\t\tif (!ar) ar = Array.prototype.slice.call(from, 0, i);\n\t\t\tar[i] = from[i];\n\t\t}\n\t}\n\treturn to.concat(ar || Array.prototype.slice.call(from));\n};\nvar API_NAME$2 = \"diag\";\n/**\n* Singleton object which represents the entry point to the OpenTelemetry internal\n* diagnostic API\n*/\nvar DiagAPI = function() {\n\t/**\n\t* Private internal constructor\n\t* @private\n\t*/\n\tfunction DiagAPI() {\n\t\tfunction _logProxy(funcName) {\n\t\t\treturn function() {\n\t\t\t\tvar args = [];\n\t\t\t\tfor (var _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];\n\t\t\t\tvar logger = getGlobal(\"diag\");\n\t\t\t\tif (!logger) return;\n\t\t\t\treturn logger[funcName].apply(logger, __spreadArray$2([], __read$2(args), false));\n\t\t\t};\n\t\t}\n\t\tvar self = this;\n\t\tvar setLogger = function(logger, optionsOrLogLevel) {\n\t\t\tvar _a, _b, _c;\n\t\t\tif (optionsOrLogLevel === void 0) optionsOrLogLevel = { logLevel: DiagLogLevel.INFO };\n\t\t\tif (logger === self) {\n\t\t\t\tvar err = /* @__PURE__ */ new Error(\"Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation\");\n\t\t\t\tself.error((_a = err.stack) !== null && _a !== void 0 ? _a : err.message);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (typeof optionsOrLogLevel === \"number\") optionsOrLogLevel = { logLevel: optionsOrLogLevel };\n\t\t\tvar oldLogger = getGlobal(\"diag\");\n\t\t\tvar newLogger = createLogLevelDiagLogger((_b = optionsOrLogLevel.logLevel) !== null && _b !== void 0 ? _b : DiagLogLevel.INFO, logger);\n\t\t\tif (oldLogger && !optionsOrLogLevel.suppressOverrideMessage) {\n\t\t\t\tvar stack = (_c = (/* @__PURE__ */ new Error()).stack) !== null && _c !== void 0 ? _c : \"<failed to generate stacktrace>\";\n\t\t\t\toldLogger.warn(\"Current logger will be overwritten from \" + stack);\n\t\t\t\tnewLogger.warn(\"Current logger will overwrite one already registered from \" + stack);\n\t\t\t}\n\t\t\treturn registerGlobal(\"diag\", newLogger, self, true);\n\t\t};\n\t\tself.setLogger = setLogger;\n\t\tself.disable = function() {\n\t\t\tunregisterGlobal(API_NAME$2, self);\n\t\t};\n\t\tself.createComponentLogger = function(options) {\n\t\t\treturn new DiagComponentLogger(options);\n\t\t};\n\t\tself.verbose = _logProxy(\"verbose\");\n\t\tself.debug = _logProxy(\"debug\");\n\t\tself.info = _logProxy(\"info\");\n\t\tself.warn = _logProxy(\"warn\");\n\t\tself.error = _logProxy(\"error\");\n\t}\n\t/** Get the singleton instance of the DiagAPI API */\n\tDiagAPI.instance = function() {\n\t\tif (!this._instance) this._instance = new DiagAPI();\n\t\treturn this._instance;\n\t};\n\treturn DiagAPI;\n}();\n/** Get a key to uniquely identify a context value */\nfunction createContextKey(description) {\n\treturn Symbol.for(description);\n}\n/** The root context is used as the default parent context when there is no active context */\nvar ROOT_CONTEXT = new (function() {\n\t/**\n\t* Construct a new context which inherits values from an optional parent context.\n\t*\n\t* @param parentContext a context from which to inherit values\n\t*/\n\tfunction BaseContext(parentContext) {\n\t\tvar self = this;\n\t\tself._currentContext = parentContext ? new Map(parentContext) : /* @__PURE__ */ new Map();\n\t\tself.getValue = function(key) {\n\t\t\treturn self._currentContext.get(key);\n\t\t};\n\t\tself.setValue = function(key, value) {\n\t\t\tvar context = new BaseContext(self._currentContext);\n\t\t\tcontext._currentContext.set(key, value);\n\t\t\treturn context;\n\t\t};\n\t\tself.deleteValue = function(key) {\n\t\t\tvar context = new BaseContext(self._currentContext);\n\t\t\tcontext._currentContext.delete(key);\n\t\t\treturn context;\n\t\t};\n\t}\n\treturn BaseContext;\n}())();\nvar __read$1 = function(o, n) {\n\tvar m = typeof Symbol === \"function\" && o[Symbol.iterator];\n\tif (!m) return o;\n\tvar i = m.call(o), r, ar = [], e;\n\ttry {\n\t\twhile ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n\t} catch (error) {\n\t\te = { error };\n\t} finally {\n\t\ttry {\n\t\t\tif (r && !r.done && (m = i[\"return\"])) m.call(i);\n\t\t} finally {\n\t\t\tif (e) throw e.error;\n\t\t}\n\t}\n\treturn ar;\n};\nvar __spreadArray$1 = function(to, from, pack) {\n\tif (pack || arguments.length === 2) {\n\t\tfor (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) {\n\t\t\tif (!ar) ar = Array.prototype.slice.call(from, 0, i);\n\t\t\tar[i] = from[i];\n\t\t}\n\t}\n\treturn to.concat(ar || Array.prototype.slice.call(from));\n};\nvar NoopContextManager = function() {\n\tfunction NoopContextManager() {}\n\tNoopContextManager.prototype.active = function() {\n\t\treturn ROOT_CONTEXT;\n\t};\n\tNoopContextManager.prototype.with = function(_context, fn, thisArg) {\n\t\tvar args = [];\n\t\tfor (var _i = 3; _i < arguments.length; _i++) args[_i - 3] = arguments[_i];\n\t\treturn fn.call.apply(fn, __spreadArray$1([thisArg], __read$1(args), false));\n\t};\n\tNoopContextManager.prototype.bind = function(_context, target) {\n\t\treturn target;\n\t};\n\tNoopContextManager.prototype.enable = function() {\n\t\treturn this;\n\t};\n\tNoopContextManager.prototype.disable = function() {\n\t\treturn this;\n\t};\n\treturn NoopContextManager;\n}();\nvar __read = function(o, n) {\n\tvar m = typeof Symbol === \"function\" && o[Symbol.iterator];\n\tif (!m) return o;\n\tvar i = m.call(o), r, ar = [], e;\n\ttry {\n\t\twhile ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n\t} catch (error) {\n\t\te = { error };\n\t} finally {\n\t\ttry {\n\t\t\tif (r && !r.done && (m = i[\"return\"])) m.call(i);\n\t\t} finally {\n\t\t\tif (e) throw e.error;\n\t\t}\n\t}\n\treturn ar;\n};\nvar __spreadArray = function(to, from, pack) {\n\tif (pack || arguments.length === 2) {\n\t\tfor (var i = 0, l = from.length, ar; i < l; i++) if (ar || !(i in from)) {\n\t\t\tif (!ar) ar = Array.prototype.slice.call(from, 0, i);\n\t\t\tar[i] = from[i];\n\t\t}\n\t}\n\treturn to.concat(ar || Array.prototype.slice.call(from));\n};\nvar API_NAME$1 = \"context\";\nvar NOOP_CONTEXT_MANAGER = new NoopContextManager();\n/**\n* Singleton object which represents the entry point to the OpenTelemetry Context API\n*/\nvar ContextAPI = function() {\n\t/** Empty private constructor prevents end users from constructing a new instance of the API */\n\tfunction ContextAPI() {}\n\t/** Get the singleton instance of the Context API */\n\tContextAPI.getInstance = function() {\n\t\tif (!this._instance) this._instance = new ContextAPI();\n\t\treturn this._instance;\n\t};\n\t/**\n\t* Set the current context manager.\n\t*\n\t* @returns true if the context manager was successfully registered, else false\n\t*/\n\tContextAPI.prototype.setGlobalContextManager = function(contextManager) {\n\t\treturn registerGlobal(API_NAME$1, contextManager, DiagAPI.instance());\n\t};\n\t/**\n\t* Get the currently active context\n\t*/\n\tContextAPI.prototype.active = function() {\n\t\treturn this._getContextManager().active();\n\t};\n\t/**\n\t* Execute a function with an active context\n\t*\n\t* @param context context to be active during function execution\n\t* @param fn function to execute in a context\n\t* @param thisArg optional receiver to be used for calling fn\n\t* @param args optional arguments forwarded to fn\n\t*/\n\tContextAPI.prototype.with = function(context, fn, thisArg) {\n\t\tvar _a;\n\t\tvar args = [];\n\t\tfor (var _i = 3; _i < arguments.length; _i++) args[_i - 3] = arguments[_i];\n\t\treturn (_a = this._getContextManager()).with.apply(_a, __spreadArray([\n\t\t\tcontext,\n\t\t\tfn,\n\t\t\tthisArg\n\t\t], __read(args), false));\n\t};\n\t/**\n\t* Bind a context to a target function or event emitter\n\t*\n\t* @param context context to bind to the event emitter or function. Defaults to the currently active context\n\t* @param target function or event emitter to bind\n\t*/\n\tContextAPI.prototype.bind = function(context, target) {\n\t\treturn this._getContextManager().bind(context, target);\n\t};\n\tContextAPI.prototype._getContextManager = function() {\n\t\treturn getGlobal(API_NAME$1) || NOOP_CONTEXT_MANAGER;\n\t};\n\t/** Disable and remove the global context manager */\n\tContextAPI.prototype.disable = function() {\n\t\tthis._getContextManager().disable();\n\t\tunregisterGlobal(API_NAME$1, DiagAPI.instance());\n\t};\n\treturn ContextAPI;\n}();\nvar TraceFlags;\n(function(TraceFlags) {\n\t/** Represents no flag set. */\n\tTraceFlags[TraceFlags[\"NONE\"] = 0] = \"NONE\";\n\t/** Bit to represent whether trace is sampled in trace flags. */\n\tTraceFlags[TraceFlags[\"SAMPLED\"] = 1] = \"SAMPLED\";\n})(TraceFlags || (TraceFlags = {}));\nvar INVALID_SPAN_CONTEXT = {\n\ttraceId: \"00000000000000000000000000000000\",\n\tspanId: \"0000000000000000\",\n\ttraceFlags: TraceFlags.NONE\n};\n/**\n* The NonRecordingSpan is the default {@link Span} that is used when no Span\n* implementation is available. All operations are no-op including context\n* propagation.\n*/\nvar NonRecordingSpan = function() {\n\tfunction NonRecordingSpan(_spanContext) {\n\t\tif (_spanContext === void 0) _spanContext = INVALID_SPAN_CONTEXT;\n\t\tthis._spanContext = _spanContext;\n\t}\n\tNonRecordingSpan.prototype.spanContext = function() {\n\t\treturn this._spanContext;\n\t};\n\tNonRecordingSpan.prototype.setAttribute = function(_key, _value) {\n\t\treturn this;\n\t};\n\tNonRecordingSpan.prototype.setAttributes = function(_attributes) {\n\t\treturn this;\n\t};\n\tNonRecordingSpan.prototype.addEvent = function(_name, _attributes) {\n\t\treturn this;\n\t};\n\tNonRecordingSpan.prototype.addLink = function(_link) {\n\t\treturn this;\n\t};\n\tNonRecordingSpan.prototype.addLinks = function(_links) {\n\t\treturn this;\n\t};\n\tNonRecordingSpan.prototype.setStatus = function(_status) {\n\t\treturn this;\n\t};\n\tNonRecordingSpan.prototype.updateName = function(_name) {\n\t\treturn this;\n\t};\n\tNonRecordingSpan.prototype.end = function(_endTime) {};\n\tNonRecordingSpan.prototype.isRecording = function() {\n\t\treturn false;\n\t};\n\tNonRecordingSpan.prototype.recordException = function(_exception, _time) {};\n\treturn NonRecordingSpan;\n}();\n/**\n* span key\n*/\nvar SPAN_KEY = createContextKey(\"OpenTelemetry Context Key SPAN\");\n/**\n* Return the span if one exists\n*\n* @param context context to get span from\n*/\nfunction getSpan(context) {\n\treturn context.getValue(SPAN_KEY) || void 0;\n}\n/**\n* Gets the span from the current context, if one exists.\n*/\nfunction getActiveSpan() {\n\treturn getSpan(ContextAPI.getInstance().active());\n}\n/**\n* Set the span on a context\n*\n* @param context context to use as parent\n* @param span span to set active\n*/\nfunction setSpan(context, span) {\n\treturn context.setValue(SPAN_KEY, span);\n}\n/**\n* Remove current span stored in the context\n*\n* @param context context to delete span from\n*/\nfunction deleteSpan(context) {\n\treturn context.deleteValue(SPAN_KEY);\n}\n/**\n* Wrap span context in a NoopSpan and set as span in a new\n* context\n*\n* @param context context to set active span on\n* @param spanContext span context to be wrapped\n*/\nfunction setSpanContext(context, spanContext) {\n\treturn setSpan(context, new NonRecordingSpan(spanContext));\n}\n/**\n* Get the span context of the span if it exists.\n*\n* @param context context to get values from\n*/\nfunction getSpanContext(context) {\n\tvar _a;\n\treturn (_a = getSpan(context)) === null || _a === void 0 ? void 0 : _a.spanContext();\n}\nvar VALID_TRACEID_REGEX = /^([0-9a-f]{32})$/i;\nvar VALID_SPANID_REGEX = /^[0-9a-f]{16}$/i;\nfunction isValidTraceId(traceId) {\n\treturn VALID_TRACEID_REGEX.test(traceId) && traceId !== \"00000000000000000000000000000000\";\n}\nfunction isValidSpanId(spanId) {\n\treturn VALID_SPANID_REGEX.test(spanId) && spanId !== \"0000000000000000\";\n}\n/**\n* Returns true if this {@link SpanContext} is valid.\n* @return true if this {@link SpanContext} is valid.\n*/\nfunction isSpanContextValid(spanContext) {\n\treturn isValidTraceId(spanContext.traceId) && isValidSpanId(spanContext.spanId);\n}\n/**\n* Wrap the given {@link SpanContext} in a new non-recording {@link Span}\n*\n* @param spanContext span context to be wrapped\n* @returns a new non-recording {@link Span} with the provided context\n*/\nfunction wrapSpanContext(spanContext) {\n\treturn new NonRecordingSpan(spanContext);\n}\nvar contextApi = ContextAPI.getInstance();\n/**\n* No-op implementations of {@link Tracer}.\n*/\nvar NoopTracer = function() {\n\tfunction NoopTracer() {}\n\tNoopTracer.prototype.startSpan = function(name, options, context) {\n\t\tif (context === void 0) context = contextApi.active();\n\t\tif (Boolean(options === null || options === void 0 ? void 0 : options.root)) return new NonRecordingSpan();\n\t\tvar parentFromContext = context && getSpanContext(context);\n\t\tif (isSpanContext(parentFromContext) && isSpanContextValid(parentFromContext)) return new NonRecordingSpan(parentFromContext);\n\t\telse return new NonRecordingSpan();\n\t};\n\tNoopTracer.prototype.startActiveSpan = function(name, arg2, arg3, arg4) {\n\t\tvar opts;\n\t\tvar ctx;\n\t\tvar fn;\n\t\tif (arguments.length < 2) return;\n\t\telse if (arguments.length === 2) fn = arg2;\n\t\telse if (arguments.length === 3) {\n\t\t\topts = arg2;\n\t\t\tfn = arg3;\n\t\t} else {\n\t\t\topts = arg2;\n\t\t\tctx = arg3;\n\t\t\tfn = arg4;\n\t\t}\n\t\tvar parentContext = ctx !== null && ctx !== void 0 ? ctx : contextApi.active();\n\t\tvar span = this.startSpan(name, opts, parentContext);\n\t\tvar contextWithSpanSet = setSpan(parentContext, span);\n\t\treturn contextApi.with(contextWithSpanSet, fn, void 0, span);\n\t};\n\treturn NoopTracer;\n}();\nfunction isSpanContext(spanContext) {\n\treturn typeof spanContext === \"object\" && typeof spanContext[\"spanId\"] === \"string\" && typeof spanContext[\"traceId\"] === \"string\" && typeof spanContext[\"traceFlags\"] === \"number\";\n}\nvar NOOP_TRACER = new NoopTracer();\n/**\n* Proxy tracer provided by the proxy tracer provider\n*/\nvar ProxyTracer = function() {\n\tfunction ProxyTracer(_provider, name, version, options) {\n\t\tthis._provider = _provider;\n\t\tthis.name = name;\n\t\tthis.version = version;\n\t\tthis.options = options;\n\t}\n\tProxyTracer.prototype.startSpan = function(name, options, context) {\n\t\treturn this._getTracer().startSpan(name, options, context);\n\t};\n\tProxyTracer.prototype.startActiveSpan = function(_name, _options, _context, _fn) {\n\t\tvar tracer = this._getTracer();\n\t\treturn Reflect.apply(tracer.startActiveSpan, tracer, arguments);\n\t};\n\t/**\n\t* Try to get a tracer from the proxy tracer provider.\n\t* If the proxy tracer provider has no delegate, return a noop tracer.\n\t*/\n\tProxyTracer.prototype._getTracer = function() {\n\t\tif (this._delegate) return this._delegate;\n\t\tvar tracer = this._provider.getDelegateTracer(this.name, this.version, this.options);\n\t\tif (!tracer) return NOOP_TRACER;\n\t\tthis._delegate = tracer;\n\t\treturn this._delegate;\n\t};\n\treturn ProxyTracer;\n}();\nvar NOOP_TRACER_PROVIDER = new (function() {\n\tfunction NoopTracerProvider() {}\n\tNoopTracerProvider.prototype.getTracer = function(_name, _version, _options) {\n\t\treturn new NoopTracer();\n\t};\n\treturn NoopTracerProvider;\n}())();\n/**\n* Tracer provider which provides {@link ProxyTracer}s.\n*\n* Before a delegate is set, tracers provided are NoOp.\n*   When a delegate is set, traces are provided from the delegate.\n*   When a delegate is set after tracers have already been provided,\n*   all tracers already provided will use the provided delegate implementation.\n*/\nvar ProxyTracerProvider = function() {\n\tfunction ProxyTracerProvider() {}\n\t/**\n\t* Get a {@link ProxyTracer}\n\t*/\n\tProxyTracerProvider.prototype.getTracer = function(name, version, options) {\n\t\tvar _a;\n\t\treturn (_a = this.getDelegateTracer(name, version, options)) !== null && _a !== void 0 ? _a : new ProxyTracer(this, name, version, options);\n\t};\n\tProxyTracerProvider.prototype.getDelegate = function() {\n\t\tvar _a;\n\t\treturn (_a = this._delegate) !== null && _a !== void 0 ? _a : NOOP_TRACER_PROVIDER;\n\t};\n\t/**\n\t* Set the delegate tracer provider\n\t*/\n\tProxyTracerProvider.prototype.setDelegate = function(delegate) {\n\t\tthis._delegate = delegate;\n\t};\n\tProxyTracerProvider.prototype.getDelegateTracer = function(name, version, options) {\n\t\tvar _a;\n\t\treturn (_a = this._delegate) === null || _a === void 0 ? void 0 : _a.getTracer(name, version, options);\n\t};\n\treturn ProxyTracerProvider;\n}();\n/**\n* An enumeration of status codes.\n*/\nvar SpanStatusCode;\n(function(SpanStatusCode) {\n\t/**\n\t* The default status.\n\t*/\n\tSpanStatusCode[SpanStatusCode[\"UNSET\"] = 0] = \"UNSET\";\n\t/**\n\t* The operation has been validated by an Application developer or\n\t* Operator to have completed successfully.\n\t*/\n\tSpanStatusCode[SpanStatusCode[\"OK\"] = 1] = \"OK\";\n\t/**\n\t* The operation contains an error.\n\t*/\n\tSpanStatusCode[SpanStatusCode[\"ERROR\"] = 2] = \"ERROR\";\n})(SpanStatusCode || (SpanStatusCode = {}));\nvar API_NAME = \"trace\";\n(function() {\n\t/** Empty private constructor prevents end users from constructing a new instance of the API */\n\tfunction TraceAPI() {\n\t\tthis._proxyTracerProvider = new ProxyTracerProvider();\n\t\tthis.wrapSpanContext = wrapSpanContext;\n\t\tthis.isSpanContextValid = isSpanContextValid;\n\t\tthis.deleteSpan = deleteSpan;\n\t\tthis.getSpan = getSpan;\n\t\tthis.getActiveSpan = getActiveSpan;\n\t\tthis.getSpanContext = getSpanContext;\n\t\tthis.setSpan = setSpan;\n\t\tthis.setSpanContext = setSpanContext;\n\t}\n\t/** Get the singleton instance of the Trace API */\n\tTraceAPI.getInstance = function() {\n\t\tif (!this._instance) this._instance = new TraceAPI();\n\t\treturn this._instance;\n\t};\n\t/**\n\t* Set the current global tracer.\n\t*\n\t* @returns true if the tracer provider was successfully registered, else false\n\t*/\n\tTraceAPI.prototype.setGlobalTracerProvider = function(provider) {\n\t\tvar success = registerGlobal(API_NAME, this._proxyTracerProvider, DiagAPI.instance());\n\t\tif (success) this._proxyTracerProvider.setDelegate(provider);\n\t\treturn success;\n\t};\n\t/**\n\t* Returns the global tracer provider.\n\t*/\n\tTraceAPI.prototype.getTracerProvider = function() {\n\t\treturn getGlobal(API_NAME) || this._proxyTracerProvider;\n\t};\n\t/**\n\t* Returns a tracer from the global tracer provider.\n\t*/\n\tTraceAPI.prototype.getTracer = function(name, version) {\n\t\treturn this.getTracerProvider().getTracer(name, version);\n\t};\n\t/** Remove the global tracer provider */\n\tTraceAPI.prototype.disable = function() {\n\t\tunregisterGlobal(API_NAME, DiagAPI.instance());\n\t\tthis._proxyTracerProvider = new ProxyTracerProvider();\n\t};\n\treturn TraceAPI;\n})().getInstance();\nvar __defProp = Object.defineProperty;\nvar __export = (target, all) => {\n\tfor (var name17 in all) __defProp(target, name17, {\n\t\tget: all[name17],\n\t\tenumerable: true\n\t});\n};\nfunction prepareResponseHeaders(headers, { contentType, dataStreamVersion }) {\n\tconst responseHeaders = new Headers(headers != null ? headers : {});\n\tif (!responseHeaders.has(\"Content-Type\")) responseHeaders.set(\"Content-Type\", contentType);\n\tif (dataStreamVersion !== void 0) responseHeaders.set(\"X-Vercel-AI-Data-Stream\", dataStreamVersion);\n\treturn responseHeaders;\n}\nvar name4 = \"AI_NoObjectGeneratedError\";\nvar marker4 = `vercel.ai.error.${name4}`;\nvar symbol4 = Symbol.for(marker4);\nvar _a4;\nvar NoObjectGeneratedError = class extends AISDKError {\n\tconstructor({ message = \"No object generated.\", cause, text: text2, response, usage, finishReason }) {\n\t\tsuper({\n\t\t\tname: name4,\n\t\t\tmessage,\n\t\t\tcause\n\t\t});\n\t\tthis[_a4] = true;\n\t\tthis.text = text2;\n\t\tthis.response = response;\n\t\tthis.usage = usage;\n\t\tthis.finishReason = finishReason;\n\t}\n\tstatic isInstance(error) {\n\t\treturn AISDKError.hasMarker(error, marker4);\n\t}\n};\n_a4 = symbol4;\nvar dataContentSchema = z$1.union([\n\tz$1.string(),\n\tz$1.instanceof(Uint8Array),\n\tz$1.instanceof(ArrayBuffer),\n\tz$1.custom((value) => {\n\t\tvar _a17, _b;\n\t\treturn (_b = (_a17 = globalThis.Buffer) == null ? void 0 : _a17.isBuffer(value)) != null ? _b : false;\n\t}, { message: \"Must be a Buffer\" })\n]);\nvar jsonValueSchema = z$1.lazy(() => z$1.union([\n\tz$1.null(),\n\tz$1.string(),\n\tz$1.number(),\n\tz$1.boolean(),\n\tz$1.record(z$1.string(), jsonValueSchema),\n\tz$1.array(jsonValueSchema)\n]));\nvar providerMetadataSchema = z$1.record(z$1.string(), z$1.record(z$1.string(), jsonValueSchema));\nvar toolResultContentSchema = z$1.array(z$1.union([z$1.object({\n\ttype: z$1.literal(\"text\"),\n\ttext: z$1.string()\n}), z$1.object({\n\ttype: z$1.literal(\"image\"),\n\tdata: z$1.string(),\n\tmimeType: z$1.string().optional()\n})]));\nvar textPartSchema = z$1.object({\n\ttype: z$1.literal(\"text\"),\n\ttext: z$1.string(),\n\tproviderOptions: providerMetadataSchema.optional(),\n\texperimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar imagePartSchema = z$1.object({\n\ttype: z$1.literal(\"image\"),\n\timage: z$1.union([dataContentSchema, z$1.instanceof(URL)]),\n\tmimeType: z$1.string().optional(),\n\tproviderOptions: providerMetadataSchema.optional(),\n\texperimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar filePartSchema = z$1.object({\n\ttype: z$1.literal(\"file\"),\n\tdata: z$1.union([dataContentSchema, z$1.instanceof(URL)]),\n\tfilename: z$1.string().optional(),\n\tmimeType: z$1.string(),\n\tproviderOptions: providerMetadataSchema.optional(),\n\texperimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar reasoningPartSchema = z$1.object({\n\ttype: z$1.literal(\"reasoning\"),\n\ttext: z$1.string(),\n\tproviderOptions: providerMetadataSchema.optional(),\n\texperimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar redactedReasoningPartSchema = z$1.object({\n\ttype: z$1.literal(\"redacted-reasoning\"),\n\tdata: z$1.string(),\n\tproviderOptions: providerMetadataSchema.optional(),\n\texperimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar toolCallPartSchema = z$1.object({\n\ttype: z$1.literal(\"tool-call\"),\n\ttoolCallId: z$1.string(),\n\ttoolName: z$1.string(),\n\targs: z$1.unknown(),\n\tproviderOptions: providerMetadataSchema.optional(),\n\texperimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar toolResultPartSchema = z$1.object({\n\ttype: z$1.literal(\"tool-result\"),\n\ttoolCallId: z$1.string(),\n\ttoolName: z$1.string(),\n\tresult: z$1.unknown(),\n\tcontent: toolResultContentSchema.optional(),\n\tisError: z$1.boolean().optional(),\n\tproviderOptions: providerMetadataSchema.optional(),\n\texperimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar coreSystemMessageSchema = z$1.object({\n\trole: z$1.literal(\"system\"),\n\tcontent: z$1.string(),\n\tproviderOptions: providerMetadataSchema.optional(),\n\texperimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar coreUserMessageSchema = z$1.object({\n\trole: z$1.literal(\"user\"),\n\tcontent: z$1.union([z$1.string(), z$1.array(z$1.union([\n\t\ttextPartSchema,\n\t\timagePartSchema,\n\t\tfilePartSchema\n\t]))]),\n\tproviderOptions: providerMetadataSchema.optional(),\n\texperimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar coreAssistantMessageSchema = z$1.object({\n\trole: z$1.literal(\"assistant\"),\n\tcontent: z$1.union([z$1.string(), z$1.array(z$1.union([\n\t\ttextPartSchema,\n\t\tfilePartSchema,\n\t\treasoningPartSchema,\n\t\tredactedReasoningPartSchema,\n\t\ttoolCallPartSchema\n\t]))]),\n\tproviderOptions: providerMetadataSchema.optional(),\n\texperimental_providerMetadata: providerMetadataSchema.optional()\n});\nvar coreToolMessageSchema = z$1.object({\n\trole: z$1.literal(\"tool\"),\n\tcontent: z$1.array(toolResultPartSchema),\n\tproviderOptions: providerMetadataSchema.optional(),\n\texperimental_providerMetadata: providerMetadataSchema.optional()\n});\nz$1.union([\n\tcoreSystemMessageSchema,\n\tcoreUserMessageSchema,\n\tcoreAssistantMessageSchema,\n\tcoreToolMessageSchema\n]);\nvar DEFAULT_SCHEMA_PREFIX = \"JSON schema:\";\nvar DEFAULT_SCHEMA_SUFFIX = \"You MUST answer with a JSON object that matches the JSON schema above.\";\nvar DEFAULT_GENERIC_SUFFIX = \"You MUST answer with JSON.\";\nfunction injectJsonInstruction({ prompt, schema, schemaPrefix = schema != null ? DEFAULT_SCHEMA_PREFIX : void 0, schemaSuffix = schema != null ? DEFAULT_SCHEMA_SUFFIX : DEFAULT_GENERIC_SUFFIX }) {\n\treturn [\n\t\tprompt != null && prompt.length > 0 ? prompt : void 0,\n\t\tprompt != null && prompt.length > 0 ? \"\" : void 0,\n\t\tschemaPrefix,\n\t\tschema != null ? JSON.stringify(schema) : void 0,\n\t\tschemaSuffix\n\t].filter((line) => line != null).join(\"\\n\");\n}\ncreateIdGenerator({\n\tprefix: \"aiobj\",\n\tsize: 24\n});\ncreateIdGenerator({\n\tprefix: \"aiobj\",\n\tsize: 24\n});\ncreateIdGenerator({\n\tprefix: \"aitxt\",\n\tsize: 24\n});\ncreateIdGenerator({\n\tprefix: \"msg\",\n\tsize: 24\n});\n__export({}, {\n\tobject: () => object,\n\ttext: () => text\n});\nvar text = () => ({\n\ttype: \"text\",\n\tresponseFormat: () => ({ type: \"text\" }),\n\tinjectIntoSystemPrompt({ system }) {\n\t\treturn system;\n\t},\n\tparsePartial({ text: text2 }) {\n\t\treturn { partial: text2 };\n\t},\n\tparseOutput({ text: text2 }) {\n\t\treturn text2;\n\t}\n});\nvar object = ({ schema: inputSchema }) => {\n\tconst schema = asSchema(inputSchema);\n\treturn {\n\t\ttype: \"object\",\n\t\tresponseFormat: ({ model }) => ({\n\t\t\ttype: \"json\",\n\t\t\tschema: model.supportsStructuredOutputs ? schema.jsonSchema : void 0\n\t\t}),\n\t\tinjectIntoSystemPrompt({ system, model }) {\n\t\t\treturn model.supportsStructuredOutputs ? system : injectJsonInstruction({\n\t\t\t\tprompt: system,\n\t\t\t\tschema: schema.jsonSchema\n\t\t\t});\n\t\t},\n\t\tparsePartial({ text: text2 }) {\n\t\t\tconst result = parsePartialJson(text2);\n\t\t\tswitch (result.state) {\n\t\t\t\tcase \"failed-parse\":\n\t\t\t\tcase \"undefined-input\": return;\n\t\t\t\tcase \"repaired-parse\":\n\t\t\t\tcase \"successful-parse\": return { partial: result.value };\n\t\t\t\tdefault: {\n\t\t\t\t\tconst _exhaustiveCheck = result.state;\n\t\t\t\t\tthrow new Error(`Unsupported parse state: ${_exhaustiveCheck}`);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tparseOutput({ text: text2 }, context) {\n\t\t\tconst parseResult = safeParseJSON({ text: text2 });\n\t\t\tif (!parseResult.success) throw new NoObjectGeneratedError({\n\t\t\t\tmessage: \"No object generated: could not parse the response.\",\n\t\t\t\tcause: parseResult.error,\n\t\t\t\ttext: text2,\n\t\t\t\tresponse: context.response,\n\t\t\t\tusage: context.usage,\n\t\t\t\tfinishReason: context.finishReason\n\t\t\t});\n\t\t\tconst validationResult = safeValidateTypes({\n\t\t\t\tvalue: parseResult.value,\n\t\t\t\tschema\n\t\t\t});\n\t\t\tif (!validationResult.success) throw new NoObjectGeneratedError({\n\t\t\t\tmessage: \"No object generated: response did not match schema.\",\n\t\t\t\tcause: validationResult.error,\n\t\t\t\ttext: text2,\n\t\t\t\tresponse: context.response,\n\t\t\t\tusage: context.usage,\n\t\t\t\tfinishReason: context.finishReason\n\t\t\t});\n\t\t\treturn validationResult.value;\n\t\t}\n\t};\n};\nfunction mergeStreams(stream1, stream2) {\n\tconst reader1 = stream1.getReader();\n\tconst reader2 = stream2.getReader();\n\tlet lastRead1 = void 0;\n\tlet lastRead2 = void 0;\n\tlet stream1Done = false;\n\tlet stream2Done = false;\n\tasync function readStream1(controller) {\n\t\ttry {\n\t\t\tif (lastRead1 == null) lastRead1 = reader1.read();\n\t\t\tconst result = await lastRead1;\n\t\t\tlastRead1 = void 0;\n\t\t\tif (!result.done) controller.enqueue(result.value);\n\t\t\telse controller.close();\n\t\t} catch (error) {\n\t\t\tcontroller.error(error);\n\t\t}\n\t}\n\tasync function readStream2(controller) {\n\t\ttry {\n\t\t\tif (lastRead2 == null) lastRead2 = reader2.read();\n\t\t\tconst result = await lastRead2;\n\t\t\tlastRead2 = void 0;\n\t\t\tif (!result.done) controller.enqueue(result.value);\n\t\t\telse controller.close();\n\t\t} catch (error) {\n\t\t\tcontroller.error(error);\n\t\t}\n\t}\n\treturn new ReadableStream({\n\t\tasync pull(controller) {\n\t\t\ttry {\n\t\t\t\tif (stream1Done) {\n\t\t\t\t\tawait readStream2(controller);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (stream2Done) {\n\t\t\t\t\tawait readStream1(controller);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (lastRead1 == null) lastRead1 = reader1.read();\n\t\t\t\tif (lastRead2 == null) lastRead2 = reader2.read();\n\t\t\t\tconst { result, reader } = await Promise.race([lastRead1.then((result2) => ({\n\t\t\t\t\tresult: result2,\n\t\t\t\t\treader: reader1\n\t\t\t\t})), lastRead2.then((result2) => ({\n\t\t\t\t\tresult: result2,\n\t\t\t\t\treader: reader2\n\t\t\t\t}))]);\n\t\t\t\tif (!result.done) controller.enqueue(result.value);\n\t\t\t\tif (reader === reader1) {\n\t\t\t\t\tlastRead1 = void 0;\n\t\t\t\t\tif (result.done) {\n\t\t\t\t\t\tawait readStream2(controller);\n\t\t\t\t\t\tstream1Done = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tlastRead2 = void 0;\n\t\t\t\t\tif (result.done) {\n\t\t\t\t\t\tstream2Done = true;\n\t\t\t\t\t\tawait readStream1(controller);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tcontroller.error(error);\n\t\t\t}\n\t\t},\n\t\tcancel() {\n\t\t\treader1.cancel();\n\t\t\treader2.cancel();\n\t\t}\n\t});\n}\ncreateIdGenerator({\n\tprefix: \"aitxt\",\n\tsize: 24\n});\ncreateIdGenerator({\n\tprefix: \"msg\",\n\tsize: 24\n});\nvar ClientOrServerImplementationSchema = z$1.object({\n\tname: z$1.string(),\n\tversion: z$1.string()\n}).passthrough();\nvar BaseParamsSchema = z$1.object({ _meta: z$1.optional(z$1.object({}).passthrough()) }).passthrough();\nvar ResultSchema = BaseParamsSchema;\nvar RequestSchema = z$1.object({\n\tmethod: z$1.string(),\n\tparams: z$1.optional(BaseParamsSchema)\n});\nvar ServerCapabilitiesSchema = z$1.object({\n\texperimental: z$1.optional(z$1.object({}).passthrough()),\n\tlogging: z$1.optional(z$1.object({}).passthrough()),\n\tprompts: z$1.optional(z$1.object({ listChanged: z$1.optional(z$1.boolean()) }).passthrough()),\n\tresources: z$1.optional(z$1.object({\n\t\tsubscribe: z$1.optional(z$1.boolean()),\n\t\tlistChanged: z$1.optional(z$1.boolean())\n\t}).passthrough()),\n\ttools: z$1.optional(z$1.object({ listChanged: z$1.optional(z$1.boolean()) }).passthrough())\n}).passthrough();\nResultSchema.extend({\n\tprotocolVersion: z$1.string(),\n\tcapabilities: ServerCapabilitiesSchema,\n\tserverInfo: ClientOrServerImplementationSchema,\n\tinstructions: z$1.optional(z$1.string())\n});\nvar PaginatedResultSchema = ResultSchema.extend({ nextCursor: z$1.optional(z$1.string()) });\nvar ToolSchema = z$1.object({\n\tname: z$1.string(),\n\tdescription: z$1.optional(z$1.string()),\n\tinputSchema: z$1.object({\n\t\ttype: z$1.literal(\"object\"),\n\t\tproperties: z$1.optional(z$1.object({}).passthrough())\n\t}).passthrough()\n}).passthrough();\nPaginatedResultSchema.extend({ tools: z$1.array(ToolSchema) });\nvar TextContentSchema = z$1.object({\n\ttype: z$1.literal(\"text\"),\n\ttext: z$1.string()\n}).passthrough();\nvar ImageContentSchema = z$1.object({\n\ttype: z$1.literal(\"image\"),\n\tdata: z$1.string().base64(),\n\tmimeType: z$1.string()\n}).passthrough();\nvar ResourceContentsSchema = z$1.object({\n\t/**\n\t* The URI of this resource.\n\t*/\n\turi: z$1.string(),\n\t/**\n\t* The MIME type of this resource, if known.\n\t*/\n\tmimeType: z$1.optional(z$1.string())\n}).passthrough();\nvar TextResourceContentsSchema = ResourceContentsSchema.extend({ text: z$1.string() });\nvar BlobResourceContentsSchema = ResourceContentsSchema.extend({ blob: z$1.string().base64() });\nvar EmbeddedResourceSchema = z$1.object({\n\ttype: z$1.literal(\"resource\"),\n\tresource: z$1.union([TextResourceContentsSchema, BlobResourceContentsSchema])\n}).passthrough();\nResultSchema.extend({\n\tcontent: z$1.array(z$1.union([\n\t\tTextContentSchema,\n\t\tImageContentSchema,\n\t\tEmbeddedResourceSchema\n\t])),\n\tisError: z$1.boolean().default(false).optional()\n}).or(ResultSchema.extend({ toolResult: z$1.unknown() }));\nvar JSONRPC_VERSION = \"2.0\";\nvar JSONRPCRequestSchema = z$1.object({\n\tjsonrpc: z$1.literal(JSONRPC_VERSION),\n\tid: z$1.union([z$1.string(), z$1.number().int()])\n}).merge(RequestSchema).strict();\nvar JSONRPCResponseSchema = z$1.object({\n\tjsonrpc: z$1.literal(JSONRPC_VERSION),\n\tid: z$1.union([z$1.string(), z$1.number().int()]),\n\tresult: ResultSchema\n}).strict();\nvar JSONRPCErrorSchema = z$1.object({\n\tjsonrpc: z$1.literal(JSONRPC_VERSION),\n\tid: z$1.union([z$1.string(), z$1.number().int()]),\n\terror: z$1.object({\n\t\tcode: z$1.number().int(),\n\t\tmessage: z$1.string(),\n\t\tdata: z$1.optional(z$1.unknown())\n\t})\n}).strict();\nvar JSONRPCNotificationSchema = z$1.object({ jsonrpc: z$1.literal(JSONRPC_VERSION) }).merge(z$1.object({\n\tmethod: z$1.string(),\n\tparams: z$1.optional(BaseParamsSchema)\n})).strict();\nz$1.union([\n\tJSONRPCRequestSchema,\n\tJSONRPCNotificationSchema,\n\tJSONRPCResponseSchema,\n\tJSONRPCErrorSchema\n]);\n__export({}, {\n\tmergeIntoDataStream: () => mergeIntoDataStream,\n\ttoDataStream: () => toDataStream,\n\ttoDataStreamResponse: () => toDataStreamResponse\n});\nfunction createCallbacksTransformer(callbacks = {}) {\n\tconst textEncoder = new TextEncoder();\n\tlet aggregatedResponse = \"\";\n\treturn new TransformStream({\n\t\tasync start() {\n\t\t\tif (callbacks.onStart) await callbacks.onStart();\n\t\t},\n\t\tasync transform(message, controller) {\n\t\t\tcontroller.enqueue(textEncoder.encode(message));\n\t\t\taggregatedResponse += message;\n\t\t\tif (callbacks.onToken) await callbacks.onToken(message);\n\t\t\tif (callbacks.onText && typeof message === \"string\") await callbacks.onText(message);\n\t\t},\n\t\tasync flush() {\n\t\t\tif (callbacks.onCompletion) await callbacks.onCompletion(aggregatedResponse);\n\t\t\tif (callbacks.onFinal) await callbacks.onFinal(aggregatedResponse);\n\t\t}\n\t});\n}\nfunction toDataStreamInternal(stream, callbacks) {\n\treturn stream.pipeThrough(new TransformStream({ transform: async (value, controller) => {\n\t\tvar _a17;\n\t\tif (typeof value === \"string\") {\n\t\t\tcontroller.enqueue(value);\n\t\t\treturn;\n\t\t}\n\t\tif (\"event\" in value) {\n\t\t\tif (value.event === \"on_chat_model_stream\") forwardAIMessageChunk((_a17 = value.data) == null ? void 0 : _a17.chunk, controller);\n\t\t\treturn;\n\t\t}\n\t\tforwardAIMessageChunk(value, controller);\n\t} })).pipeThrough(createCallbacksTransformer(callbacks)).pipeThrough(new TextDecoderStream()).pipeThrough(new TransformStream({ transform: async (chunk, controller) => {\n\t\tcontroller.enqueue(formatDataStreamPart(\"text\", chunk));\n\t} }));\n}\nfunction toDataStream(stream, callbacks) {\n\treturn toDataStreamInternal(stream, callbacks).pipeThrough(new TextEncoderStream());\n}\nfunction toDataStreamResponse(stream, options) {\n\tvar _a17;\n\tconst dataStream = toDataStreamInternal(stream, options == null ? void 0 : options.callbacks).pipeThrough(new TextEncoderStream());\n\tconst data = options == null ? void 0 : options.data;\n\tconst init = options == null ? void 0 : options.init;\n\tconst responseStream = data ? mergeStreams(data.stream, dataStream) : dataStream;\n\treturn new Response(responseStream, {\n\t\tstatus: (_a17 = init == null ? void 0 : init.status) != null ? _a17 : 200,\n\t\tstatusText: init == null ? void 0 : init.statusText,\n\t\theaders: prepareResponseHeaders(init == null ? void 0 : init.headers, {\n\t\t\tcontentType: \"text/plain; charset=utf-8\",\n\t\t\tdataStreamVersion: \"v1\"\n\t\t})\n\t});\n}\nfunction mergeIntoDataStream(stream, options) {\n\toptions.dataStream.merge(toDataStreamInternal(stream, options.callbacks));\n}\nfunction forwardAIMessageChunk(chunk, controller) {\n\tif (typeof chunk.content === \"string\") controller.enqueue(chunk.content);\n\telse {\n\t\tconst content = chunk.content;\n\t\tfor (const item of content) if (item.type === \"text\") controller.enqueue(item.text);\n\t}\n}\n__export({}, {\n\tmergeIntoDataStream: () => mergeIntoDataStream2,\n\ttoDataStream: () => toDataStream2,\n\ttoDataStreamResponse: () => toDataStreamResponse2\n});\nfunction toDataStreamInternal2(stream, callbacks) {\n\tconst trimStart = trimStartOfStream();\n\treturn convertAsyncIteratorToReadableStream(stream[Symbol.asyncIterator]()).pipeThrough(new TransformStream({ async transform(message, controller) {\n\t\tcontroller.enqueue(trimStart(message.delta));\n\t} })).pipeThrough(createCallbacksTransformer(callbacks)).pipeThrough(new TextDecoderStream()).pipeThrough(new TransformStream({ transform: async (chunk, controller) => {\n\t\tcontroller.enqueue(formatDataStreamPart(\"text\", chunk));\n\t} }));\n}\nfunction toDataStream2(stream, callbacks) {\n\treturn toDataStreamInternal2(stream, callbacks).pipeThrough(new TextEncoderStream());\n}\nfunction toDataStreamResponse2(stream, options = {}) {\n\tvar _a17;\n\tconst { init, data, callbacks } = options;\n\tconst dataStream = toDataStreamInternal2(stream, callbacks).pipeThrough(new TextEncoderStream());\n\tconst responseStream = data ? mergeStreams(data.stream, dataStream) : dataStream;\n\treturn new Response(responseStream, {\n\t\tstatus: (_a17 = init == null ? void 0 : init.status) != null ? _a17 : 200,\n\t\tstatusText: init == null ? void 0 : init.statusText,\n\t\theaders: prepareResponseHeaders(init == null ? void 0 : init.headers, {\n\t\t\tcontentType: \"text/plain; charset=utf-8\",\n\t\t\tdataStreamVersion: \"v1\"\n\t\t})\n\t});\n}\nfunction mergeIntoDataStream2(stream, options) {\n\toptions.dataStream.merge(toDataStreamInternal2(stream, options.callbacks));\n}\nfunction trimStartOfStream() {\n\tlet isStreamStart = true;\n\treturn (text2) => {\n\t\tif (isStreamStart) {\n\t\t\ttext2 = text2.trimStart();\n\t\t\tif (text2) isStreamStart = false;\n\t\t}\n\t\treturn text2;\n\t};\n}\n//#endregion\n//#region src/utils.ts\n/**\n* Converts a Zod schema to an AI SDK Schema with validation support.\n*\n* This function mirrors the behavior of Vercel's AI SDK zod-schema utility but allows\n* customization of the JSON Schema target format.\n*\n* @param zodSchema - The Zod schema to convert\n* @param target - The JSON Schema target format (defaults to 'jsonSchema7')\n* @returns An AI SDK Schema object with built-in validation\n*\n* @example\n* ```typescript\n* import { z } from 'zod';\n* import { convertZodSchemaToAISDKSchema } from '@mastra/schema-compat';\n*\n* const userSchema = z.object({\n*   name: z.string(),\n*   age: z.number().min(0)\n* });\n*\n* const aiSchema = convertZodSchemaToAISDKSchema(userSchema);\n* ```\n*/\nfunction convertZodSchemaToAISDKSchema(zodSchema, target = \"jsonSchema7\") {\n\treturn jsonSchema(zodToJsonSchema$1(zodSchema, target), { validate: (value) => {\n\t\tconst result = zodSchema.safeParse(value);\n\t\treturn result.success ? {\n\t\t\tsuccess: true,\n\t\t\tvalue: result.data\n\t\t} : {\n\t\t\tsuccess: false,\n\t\t\terror: result.error\n\t\t};\n\t} });\n}\n/**\n* Checks if a value is a Zod type by examining its properties and methods.\n*\n* @param value - The value to check\n* @returns True if the value is a Zod type, false otherwise\n* @internal\n*/\nfunction isZodType(value) {\n\treturn typeof value === \"object\" && value !== null && (\"_def\" in value || \"_zod\" in value) && \"parse\" in value && typeof value.parse === \"function\" && \"safeParse\" in value && typeof value.safeParse === \"function\";\n}\n/**\n* Converts an AI SDK Schema or Zod schema to a Zod schema.\n*\n* If the input is already a Zod schema, it returns it unchanged.\n* If the input is an AI SDK Schema, it extracts the JSON schema and converts it to Zod.\n*\n* @param schema - The schema to convert (AI SDK Schema or Zod schema)\n* @returns A Zod schema equivalent of the input\n* @throws Error if the conversion fails\n*\n* @example\n* ```typescript\n* import { jsonSchema } from 'ai';\n* import { convertSchemaToZod } from '@mastra/schema-compat';\n*\n* const aiSchema = jsonSchema({\n*   type: 'object',\n*   properties: {\n*     name: { type: 'string' }\n*   }\n* });\n*\n* const zodSchema = convertSchemaToZod(aiSchema);\n* ```\n*/\nfunction convertSchemaToZod(schema) {\n\tif (isZodType(schema)) return schema;\n\telse {\n\t\tconst jsonSchemaToConvert = \"jsonSchema\" in schema ? schema.jsonSchema : schema;\n\t\ttry {\n\t\t\tif (\"toJSONSchema\" in z$1) return convertJsonSchemaToZod(jsonSchemaToConvert);\n\t\t\telse return convertJsonSchemaToZod$1(jsonSchemaToConvert);\n\t\t} catch (e) {\n\t\t\tconst errorMessage = `[Schema Builder] Failed to convert schema parameters to Zod. Original schema: ${JSON.stringify(jsonSchemaToConvert)}`;\n\t\t\tconsole.error(errorMessage, e);\n\t\t\tthrow new Error(errorMessage + (e instanceof Error ? `\\n${e.stack}` : \"\\nUnknown error object\"));\n\t\t}\n\t}\n}\n/**\n* Processes a schema using provider compatibility layers and converts it to the specified format.\n*\n* This function automatically applies the first matching compatibility layer from the provided\n* list based on the model configuration. If no compatibility applies, it falls back to\n* standard conversion.\n*\n* @param options - Configuration object for schema processing\n* @param options.schema - The schema to process (AI SDK Schema or Zod object schema)\n* @param options.compatLayers - Array of compatibility layers to try\n* @param options.mode - Output format: 'jsonSchema' for JSONSchema7 or 'aiSdkSchema' for AI SDK Schema\n* @returns Processed schema in the requested format\n*\n* @example\n* ```typescript\n* import { z } from 'zod';\n* import { applyCompatLayer, OpenAISchemaCompatLayer, AnthropicSchemaCompatLayer } from '@mastra/schema-compat';\n*\n* const schema = z.object({\n*   query: z.string().email(),\n*   limit: z.number().min(1).max(100)\n* });\n*\n* const compatLayers = [\n*   new OpenAISchemaCompatLayer(model),\n*   new AnthropicSchemaCompatLayer(model)\n* ];\n*\n* const result = applyCompatLayer({\n*   schema,\n*   compatLayers,\n*   mode: 'aiSdkSchema'\n* });\n* ```\n*/\nfunction applyCompatLayer({ schema, compatLayers, mode }) {\n\tif (mode === \"jsonSchema\") {\n\t\tconst standardSchema = toStandardSchema(schema);\n\t\tfor (const compat of compatLayers) if (compat.shouldApply()) return standardSchemaToJSONSchema(compat.processToCompatSchema(standardSchema));\n\t\treturn standardSchemaToJSONSchema(standardSchema);\n\t} else {\n\t\tlet zodSchema;\n\t\tif (isZodType(schema)) zodSchema = schema;\n\t\telse {\n\t\t\tif (isStandardSchemaWithJSON(schema)) throw new Error(\"StandardSchemaWithJSON is not supported for applyCompatLayer and aiSdkSchema mode\");\n\t\t\tzodSchema = convertSchemaToZod(schema);\n\t\t}\n\t\tfor (const compat of compatLayers) if (compat.shouldApply()) return compat.processToAISDKSchema(zodSchema);\n\t\treturn convertZodSchemaToAISDKSchema(zodSchema);\n\t}\n}\n//#endregion\n//#region src/schema-compatibility-v3.ts\n/**\n* All supported string validation check types that can be processed or converted to descriptions.\n* @constant\n*/\nconst ALL_STRING_CHECKS = [\n\t\"regex\",\n\t\"emoji\",\n\t\"email\",\n\t\"url\",\n\t\"uuid\",\n\t\"cuid\",\n\t\"min\",\n\t\"max\"\n];\n/**\n* All supported number validation check types that can be processed or converted to descriptions.\n* @constant\n*/\nconst ALL_NUMBER_CHECKS = [\n\t\"min\",\n\t\"max\",\n\t\"multipleOf\"\n];\n/**\n* All supported array validation check types that can be processed or converted to descriptions.\n* @constant\n*/\nconst ALL_ARRAY_CHECKS = [\n\t\"min\",\n\t\"max\",\n\t\"length\"\n];\nconst isOptional = (v) => v instanceof ZodOptional;\nconst isObj = (v) => v instanceof ZodObject;\nconst isArr = (v) => v instanceof ZodArray;\nconst isUnion = (v) => v instanceof ZodUnion;\nconst isString = (v) => v instanceof ZodString;\nconst isNumber = (v) => v instanceof ZodNumber;\n/**\n* Zod types that are not supported by most AI model providers and should be avoided.\n* @constant\n*/\nconst UNSUPPORTED_ZOD_TYPES = [\n\t\"ZodIntersection\",\n\t\"ZodNever\",\n\t\"ZodNull\",\n\t\"ZodTuple\",\n\t\"ZodUndefined\"\n];\n/**\n* Zod types that are generally supported by AI model providers.\n* @constant\n*/\nconst SUPPORTED_ZOD_TYPES = [\n\t\"ZodObject\",\n\t\"ZodArray\",\n\t\"ZodUnion\",\n\t\"ZodString\",\n\t\"ZodNumber\",\n\t\"ZodDate\",\n\t\"ZodAny\",\n\t\"ZodDefault\",\n\t\"ZodNullable\"\n];\n/**\n* All Zod types (both supported and unsupported).\n* @constant\n*/\nconst ALL_ZOD_TYPES = [...SUPPORTED_ZOD_TYPES, ...UNSUPPORTED_ZOD_TYPES];\n/**\n* Abstract base class for creating schema compatibility layers for different AI model providers.\n*\n* This class provides a framework for transforming Zod schemas to work with specific AI model\n* provider requirements and limitations. Each provider may have different support levels for\n* JSON Schema features, validation constraints, and data types.\n*\n*\n* @example\n* ```typescript\n* import { SchemaCompatLayer } from '@mastra/schema-compat';\n* import type { LanguageModelV1 } from 'ai';\n*\n* class CustomProviderCompat extends SchemaCompatLayer {\n*   constructor(model: ModelInformation) {\n*     super(model);\n*   }\n*\n*   shouldApply(): boolean {\n*     return this.getModel().provider === 'custom-provider';\n*   }\n*\n*   getSchemaTarget() {\n*     return 'jsonSchema7';\n*   }\n*\n*   processZodType<T extends z.AnyZodObject>(value: z.ZodTypeAny): ShapeValue<T> {\n*     // Custom processing logic for this provider\n*     switch (value._def.typeName) {\n*       case 'ZodString':\n*         return this.defaultZodStringHandler(value, ['email', 'url']);\n*       default:\n*         return this.defaultUnsupportedZodTypeHandler(value);\n*     }\n*   }\n* }\n* ```\n*/\nvar SchemaCompatLayer$1 = class {\n\tmodel;\n\tparent;\n\t/**\n\t* Creates a new schema compatibility instance.\n\t*\n\t* @param model - The language model this compatibility layer applies to\n\t*/\n\tconstructor(model, parent) {\n\t\tthis.model = model;\n\t\tthis.parent = parent;\n\t}\n\t/**\n\t* Gets the language model associated with this compatibility layer.\n\t*\n\t* @returns The language model instance\n\t*/\n\tgetModel() {\n\t\treturn this.model;\n\t}\n\tgetUnsupportedZodTypes() {\n\t\treturn UNSUPPORTED_ZOD_TYPES;\n\t}\n\t/**\n\t* Type guard for optional Zod types\n\t*/\n\tisOptional(v) {\n\t\treturn v instanceof ZodOptional;\n\t}\n\t/**\n\t* Type guard for object Zod types\n\t*/\n\tisObj(v) {\n\t\treturn v instanceof ZodObject;\n\t}\n\t/**\n\t* Type guard for null Zod types\n\t*/\n\tisNull(v) {\n\t\treturn v instanceof ZodNull;\n\t}\n\t/**\n\t* Type guard for nullable Zod types\n\t*/\n\tisNullable(v) {\n\t\treturn v instanceof ZodNullable;\n\t}\n\t/**\n\t* Type guard for array Zod types\n\t*/\n\tisArr(v) {\n\t\treturn v instanceof ZodArray;\n\t}\n\t/**\n\t* Type guard for union Zod types\n\t*/\n\tisUnion(v) {\n\t\treturn v instanceof ZodUnion;\n\t}\n\t/**\n\t* Type guard for string Zod types\n\t*/\n\tisString(v) {\n\t\treturn v instanceof ZodString;\n\t}\n\t/**\n\t* Type guard for number Zod types\n\t*/\n\tisNumber(v) {\n\t\treturn v instanceof ZodNumber;\n\t}\n\t/**\n\t* Type guard for date Zod types\n\t*/\n\tisDate(v) {\n\t\treturn v instanceof ZodDate;\n\t}\n\t/**\n\t* Type guard for default Zod types\n\t*/\n\tisDefault(v) {\n\t\treturn v instanceof ZodDefault;\n\t}\n\t/**\n\t* Type guard for intersection Zod types\n\t*/\n\tisIntersection(v) {\n\t\treturn v instanceof ZodIntersection;\n\t}\n\t/**\n\t* Determines whether this compatibility layer should be applied for the current model.\n\t*\n\t* @returns True if this compatibility layer should be used, false otherwise\n\t* @abstract\n\t*/\n\tshouldApply() {\n\t\treturn this.parent.shouldApply();\n\t}\n\t/**\n\t* Returns the JSON Schema target format for this provider.\n\t*\n\t* @returns The schema target format, or undefined to use the default 'jsonSchema7'\n\t* @abstract\n\t*/\n\tgetSchemaTarget() {\n\t\treturn this.parent.getSchemaTarget();\n\t}\n\t/**\n\t* Processes a specific Zod type according to the provider's requirements.\n\t*\n\t* @param value - The Zod type to process\n\t* @returns The processed Zod type\n\t* @abstract\n\t*/\n\tprocessZodType(value) {\n\t\treturn this.parent.processZodType(value);\n\t}\n\t/**\n\t* Default handler for Zod object types. Recursively processes all properties in the object.\n\t*\n\t* @param value - The Zod object to process\n\t* @returns The processed Zod object\n\t*/\n\tdefaultZodObjectHandler(value, options = { passthrough: true }) {\n\t\tconst processedShape = Object.entries(value.shape).reduce((acc, [key, propValue]) => {\n\t\t\tacc[key] = this.processZodType(propValue);\n\t\t\treturn acc;\n\t\t}, {});\n\t\tlet result = z.object(processedShape);\n\t\tif (value._def.unknownKeys === \"strict\") result = result.strict();\n\t\tif (value._def.catchall && !(value._def.catchall instanceof z.ZodNever)) result = result.catchall(value._def.catchall);\n\t\tif (value.description) result = result.describe(value.description);\n\t\tif (options.passthrough && value._def.unknownKeys === \"passthrough\") result = result.passthrough();\n\t\treturn result;\n\t}\n\t/**\n\t* Merges validation constraints into a parameter description.\n\t*\n\t* This helper method converts validation constraints that may not be supported\n\t* by a provider into human-readable descriptions.\n\t*\n\t* @param description - The existing parameter description\n\t* @param constraints - The validation constraints to merge\n\t* @returns The updated description with constraints, or undefined if no constraints\n\t*/\n\tmergeParameterDescription(description, constraints) {\n\t\tif (constraints.length > 0) return (description ? description + \"\\n\" : \"\") + `constraints: ${constraints.join(`, `)}`;\n\t\telse return description;\n\t}\n\t/**\n\t* Default handler for unsupported Zod types. Throws an error for specified unsupported types.\n\t*\n\t* @param value - The Zod type to check\n\t* @param throwOnTypes - Array of type names to throw errors for\n\t* @returns The original value if not in the throw list\n\t* @throws Error if the type is in the unsupported list\n\t*/\n\tdefaultUnsupportedZodTypeHandler(value, throwOnTypes = UNSUPPORTED_ZOD_TYPES) {\n\t\tif (throwOnTypes.includes(value._def?.typeName)) throw new Error(`${this.model.modelId} does not support zod type: ${value._def?.typeName}`);\n\t\treturn value;\n\t}\n\t/**\n\t* Default handler for Zod array types. Processes array constraints according to provider support.\n\t*\n\t* @param value - The Zod array to process\n\t* @param handleChecks - Array constraints to convert to descriptions vs keep as validation\n\t* @returns The processed Zod array\n\t*/\n\tdefaultZodArrayHandler(value, handleChecks = ALL_ARRAY_CHECKS) {\n\t\tconst zodArrayDef = value._def;\n\t\tconst processedType = this.processZodType(zodArrayDef.type);\n\t\tlet result = z.array(processedType);\n\t\tconst constraints = [];\n\t\tif (zodArrayDef.minLength?.value !== void 0) if (handleChecks.includes(\"min\")) constraints.push(`minimum length ${zodArrayDef.minLength.value}`);\n\t\telse result = result.min(zodArrayDef.minLength.value);\n\t\tif (zodArrayDef.maxLength?.value !== void 0) if (handleChecks.includes(\"max\")) constraints.push(`maximum length ${zodArrayDef.maxLength.value}`);\n\t\telse result = result.max(zodArrayDef.maxLength.value);\n\t\tif (zodArrayDef.exactLength?.value !== void 0) if (handleChecks.includes(\"length\")) constraints.push(`exact length ${zodArrayDef.exactLength.value}`);\n\t\telse result = result.length(zodArrayDef.exactLength.value);\n\t\tconst description = this.mergeParameterDescription(value.description, constraints);\n\t\tif (description) result = result.describe(description);\n\t\treturn result;\n\t}\n\t/**\n\t* Default handler for Zod union types. Processes all union options.\n\t*\n\t* @param value - The Zod union to process\n\t* @returns The processed Zod union\n\t* @throws Error if union has fewer than 2 options\n\t*/\n\tdefaultZodUnionHandler(value) {\n\t\tconst processedOptions = value._def.options.map((option) => this.processZodType(option));\n\t\tif (processedOptions.length < 2) throw new Error(\"Union must have at least 2 options\");\n\t\tlet result = z.union(processedOptions);\n\t\tif (value.description) result = result.describe(value.description);\n\t\treturn result;\n\t}\n\t/**\n\t* Default handler for Zod string types. Processes string validation constraints.\n\t*\n\t* @param value - The Zod string to process\n\t* @param handleChecks - String constraints to convert to descriptions vs keep as validation\n\t* @returns The processed Zod string\n\t*/\n\tdefaultZodStringHandler(value, handleChecks = ALL_STRING_CHECKS) {\n\t\tconst constraints = [];\n\t\tconst checks = value._def.checks || [];\n\t\tconst newChecks = [];\n\t\tfor (const check of checks) if (\"kind\" in check) if (handleChecks.includes(check.kind)) switch (check.kind) {\n\t\t\tcase \"regex\":\n\t\t\t\tconstraints.push(`input must match this regex ${check.regex.source}`);\n\t\t\t\tbreak;\n\t\t\tcase \"emoji\":\n\t\t\tcase \"email\":\n\t\t\tcase \"url\":\n\t\t\tcase \"uuid\":\n\t\t\tcase \"cuid\":\n\t\t\t\tconstraints.push(`a valid ${check.kind}`);\n\t\t\t\tbreak;\n\t\t\tcase \"min\":\n\t\t\tcase \"max\":\n\t\t\t\tconstraints.push(`${check.kind}imum length ${check.value}`);\n\t\t\t\tbreak;\n\t\t}\n\t\telse newChecks.push(check);\n\t\tlet result = z.string();\n\t\tfor (const check of newChecks) result = result._addCheck(check);\n\t\tconst description = this.mergeParameterDescription(value.description, constraints);\n\t\tif (description) result = result.describe(description);\n\t\treturn result;\n\t}\n\t/**\n\t* Default handler for Zod number types. Processes number validation constraints.\n\t*\n\t* @param value - The Zod number to process\n\t* @param handleChecks - Number constraints to convert to descriptions vs keep as validation\n\t* @returns The processed Zod number\n\t*/\n\tdefaultZodNumberHandler(value, handleChecks = ALL_NUMBER_CHECKS) {\n\t\tconst constraints = [];\n\t\tconst checks = value._def.checks || [];\n\t\tconst newChecks = [];\n\t\tfor (const check of checks) if (\"kind\" in check) if (handleChecks.includes(check.kind)) switch (check.kind) {\n\t\t\tcase \"min\":\n\t\t\t\tif (check.inclusive) constraints.push(`greater than or equal to ${check.value}`);\n\t\t\t\telse constraints.push(`greater than ${check.value}`);\n\t\t\t\tbreak;\n\t\t\tcase \"max\":\n\t\t\t\tif (check.inclusive) constraints.push(`lower than or equal to ${check.value}`);\n\t\t\t\telse constraints.push(`lower than ${check.value}`);\n\t\t\t\tbreak;\n\t\t\tcase \"multipleOf\":\n\t\t\t\tconstraints.push(`multiple of ${check.value}`);\n\t\t\t\tbreak;\n\t\t}\n\t\telse newChecks.push(check);\n\t\tlet result = z.number();\n\t\tfor (const check of newChecks) switch (check.kind) {\n\t\t\tcase \"int\":\n\t\t\t\tresult = result.int();\n\t\t\t\tbreak;\n\t\t\tcase \"finite\":\n\t\t\t\tresult = result.finite();\n\t\t\t\tbreak;\n\t\t\tdefault: result = result._addCheck(check);\n\t\t}\n\t\tconst description = this.mergeParameterDescription(value.description, constraints);\n\t\tif (description) result = result.describe(description);\n\t\treturn result;\n\t}\n\t/**\n\t* Default handler for Zod date types. Converts dates to ISO strings with constraint descriptions.\n\t*\n\t* @param value - The Zod date to process\n\t* @returns A Zod string schema representing the date in ISO format\n\t*/\n\tdefaultZodDateHandler(value) {\n\t\tconst constraints = [];\n\t\tconst checks = value._def.checks || [];\n\t\tconst newChecks = [];\n\t\tfor (const check of checks) if (\"kind\" in check) switch (check.kind) {\n\t\t\tcase \"min\":\n\t\t\t\tconst minDate = new Date(check.value);\n\t\t\t\tif (!isNaN(minDate.getTime())) constraints.push(`Date must be newer than ${minDate.toISOString()} (ISO)`);\n\t\t\t\tbreak;\n\t\t\tcase \"max\":\n\t\t\t\tconst maxDate = new Date(check.value);\n\t\t\t\tif (!isNaN(maxDate.getTime())) constraints.push(`Date must be older than ${maxDate.toISOString()} (ISO)`);\n\t\t\t\tbreak;\n\t\t\tdefault: newChecks.push(check);\n\t\t}\n\t\tconstraints.push(`Date format is date-time`);\n\t\tlet result = z.string().describe(\"date-time\");\n\t\tconst description = this.mergeParameterDescription(value.description, constraints);\n\t\tif (description) result = result.describe(description);\n\t\treturn result;\n\t}\n\t/**\n\t* Default handler for Zod optional types. Processes the inner type and maintains optionality.\n\t*\n\t* @param value - The Zod optional to process\n\t* @param handleTypes - Types that should be processed vs passed through\n\t* @returns The processed Zod optional\n\t*/\n\tdefaultZodOptionalHandler(value, handleTypes = SUPPORTED_ZOD_TYPES) {\n\t\tif (handleTypes.includes(value._def.innerType._def.typeName)) return this.processZodType(value._def.innerType).optional();\n\t\telse return value;\n\t}\n\t/**\n\t* Default handler for Zod nullable types. Processes the inner type and maintains nullability.\n\t*\n\t* @param value - The Zod nullable to process\n\t* @param handleTypes - Types that should be processed vs passed through\n\t* @returns The processed Zod nullable\n\t*/\n\tdefaultZodNullableHandler(value, handleTypes = SUPPORTED_ZOD_TYPES) {\n\t\tif (handleTypes.includes(value._def.innerType._def.typeName)) return this.processZodType(value._def.innerType).nullable();\n\t\telse return value;\n\t}\n\t/**\n\t* Recursively collects leaf types from a ZodIntersection tree.\n\t*/\n\tcollectIntersectionLeaves(value) {\n\t\tif (value instanceof ZodIntersection) return [...this.collectIntersectionLeaves(value._def.left), ...this.collectIntersectionLeaves(value._def.right)];\n\t\treturn [value];\n\t}\n\t/**\n\t* Default handler for Zod intersection types.\n\t* Flattens the intersection tree and merges object shapes into a single z.object().\n\t* Falls back to z.any() for non-object intersections.\n\t*/\n\tdefaultZodIntersectionHandler(value) {\n\t\tconst processed = this.collectIntersectionLeaves(value).map((leaf) => this.processZodType(leaf));\n\t\tif (processed.every((p) => p instanceof ZodObject)) {\n\t\t\tconst mergedShape = {};\n\t\t\tfor (const obj of processed) Object.assign(mergedShape, obj.shape);\n\t\t\tlet result = z.object(mergedShape);\n\t\t\tif (value.description) result = result.describe(value.description);\n\t\t\treturn result;\n\t\t}\n\t\treturn z.any().describe(value.description || \"intersection type\");\n\t}\n\t/**\n\t* Processes a Zod object schema and converts it to an AI SDK Schema.\n\t*\n\t* @param zodSchema - The Zod object schema to process\n\t* @returns An AI SDK Schema with provider-specific compatibility applied\n\t*/\n\tprocessToAISDKSchema(zodSchema) {\n\t\treturn convertZodSchemaToAISDKSchema(this.processZodType(zodSchema), this.getSchemaTarget());\n\t}\n\t/**\n\t* Processes a Zod object schema and converts it to a JSON Schema.\n\t*\n\t* @param zodSchema - The Zod object schema to process\n\t* @returns A JSONSchema7 object with provider-specific compatibility applied\n\t*/\n\tprocessToJSONSchema(zodSchema) {\n\t\treturn this.processToAISDKSchema(zodSchema).jsonSchema;\n\t}\n};\n//#endregion\n//#region src/schema-compatibility-v4.ts\n/**\n* All supported string validation check types that can be processed or converted to descriptions.\n* @constant\n*/\nconst ALL_STRING_CHECKS$1 = [\n\t\"regex\",\n\t\"emoji\",\n\t\"email\",\n\t\"url\",\n\t\"uuid\",\n\t\"cuid\",\n\t\"min_length\",\n\t\"max_length\",\n\t\"string_format\"\n];\n/**\n* All supported number validation check types that can be processed or converted to descriptions.\n* @constant\n*/\nconst ALL_NUMBER_CHECKS$1 = [\n\t\"greater_than\",\n\t\"less_than\",\n\t\"multiple_of\"\n];\n/**\n* All supported array validation check types that can be processed or converted to descriptions.\n* @constant\n*/\nconst ALL_ARRAY_CHECKS$1 = [\n\t\"min\",\n\t\"max\",\n\t\"length\"\n];\n/**\n* Zod types that are not supported by most AI model providers and should be avoided.\n* @constant\n*/\nconst UNSUPPORTED_ZOD_TYPES$2 = [\n\t\"ZodIntersection\",\n\t\"ZodNever\",\n\t\"ZodNull\",\n\t\"ZodTuple\",\n\t\"ZodUndefined\"\n];\n/**\n* Zod types that are generally supported by AI model providers.\n* @constant\n*/\nconst SUPPORTED_ZOD_TYPES$2 = [\n\t\"ZodObject\",\n\t\"ZodArray\",\n\t\"ZodUnion\",\n\t\"ZodString\",\n\t\"ZodNumber\",\n\t\"ZodDate\",\n\t\"ZodAny\",\n\t\"ZodDefault\",\n\t\"ZodNullable\"\n];\n[...SUPPORTED_ZOD_TYPES$2, ...UNSUPPORTED_ZOD_TYPES$2];\n/**\n* Returns the v3-style type name (e.g. \"ZodString\") for a Zod v4 schema. Zod v4\n* stores the kind as a lowercase `type` (e.g. \"string\"), so this normalizes it\n* for comparison against the `*_ZOD_TYPES` lists, mirroring the dispatcher in\n* `schema-compatibility.ts`.\n*/\nfunction zodV4TypeName(value) {\n\tconst v4Type = value?._zod?.def?.type;\n\treturn v4Type ? \"Zod\" + v4Type.charAt(0).toUpperCase() + v4Type.slice(1) : \"\";\n}\n/**\n* Abstract base class for creating schema compatibility layers for different AI model providers.\n*\n* This class provides a framework for transforming Zod schemas to work with specific AI model\n* provider requirements and limitations. Each provider may have different support levels for\n* JSON Schema features, validation constraints, and data types.\n*\n*\n* @example\n* ```typescript\n* import { SchemaCompatLayer } from '@mastra/schema-compat';\n* import type { LanguageModelV1 } from 'ai';\n*\n* class CustomProviderCompat extends SchemaCompatLayer {\n*   constructor(model: LanguageModelV1) {\n*     super(model);\n*   }\n*\n*   shouldApply(): boolean {\n*     return this.getModel().provider === 'custom-provider';\n*   }\n*\n*   getSchemaTarget() {\n*     return 'jsonSchema7';\n*   }\n*\n*   processZodType<T extends z.AnyZodObject>(value: z.ZodAny): ShapeValue<T> {\n*     // Custom processing logic for this provider\n*     switch (value._def.typeName) {\n*       case 'ZodString':\n*         return this.defaultZodStringHandler(value, ['email', 'url']);\n*       default:\n*         return this.defaultUnsupportedZodTypeHandler(value);\n*     }\n*   }\n* }\n* ```\n*/\nvar SchemaCompatLayer$2 = class {\n\tmodel;\n\tparent;\n\t/**\n\t* Creates a new schema compatibility instance.\n\t*\n\t* @param model - The language model this compatibility layer applies to\n\t*/\n\tconstructor(model, parent) {\n\t\tthis.model = model;\n\t\tthis.parent = parent;\n\t}\n\t/**\n\t* Gets the language model associated with this compatibility layer.\n\t*\n\t* @returns The language model instance\n\t*/\n\tgetModel() {\n\t\treturn this.model;\n\t}\n\tgetUnsupportedZodTypes() {\n\t\treturn UNSUPPORTED_ZOD_TYPES$2;\n\t}\n\t/**\n\t* Type guard for optional Zod types\n\t*/\n\tisOptional(v) {\n\t\treturn v instanceof ZodOptional$1;\n\t}\n\t/**\n\t* Type guard for object Zod types\n\t*/\n\tisObj(v) {\n\t\treturn v instanceof ZodObject$1;\n\t}\n\t/**\n\t* Type guard for null Zod types\n\t*/\n\tisNull(v) {\n\t\treturn v instanceof ZodNull$1;\n\t}\n\t/**\n\t* Type guard for nullable Zod types\n\t*/\n\tisNullable(v) {\n\t\treturn v instanceof ZodNullable$1;\n\t}\n\t/**\n\t* Type guard for array Zod types\n\t*/\n\tisArr(v) {\n\t\treturn v instanceof ZodArray$1;\n\t}\n\t/**\n\t* Type guard for union Zod types\n\t*/\n\tisUnion(v) {\n\t\treturn v instanceof ZodUnion$1;\n\t}\n\t/**\n\t* Type guard for string Zod types\n\t*/\n\tisString(v) {\n\t\treturn v instanceof ZodString$1;\n\t}\n\t/**\n\t* Type guard for number Zod types\n\t*/\n\tisNumber(v) {\n\t\treturn v instanceof ZodNumber$1;\n\t}\n\t/**\n\t* Type guard for date Zod types\n\t*/\n\tisDate(v) {\n\t\treturn v instanceof ZodDate$1;\n\t}\n\t/**\n\t* Type guard for default Zod types\n\t*/\n\tisDefault(v) {\n\t\treturn v instanceof ZodDefault$1;\n\t}\n\t/**\n\t* Type guard for intersection Zod types\n\t*/\n\tisIntersection(v) {\n\t\treturn v instanceof ZodIntersection$1;\n\t}\n\t/**\n\t* Determines whether this compatibility layer should be applied for the current model.\n\t*\n\t* @returns True if this compatibility layer should be used, false otherwise\n\t* @abstract\n\t*/\n\tshouldApply() {\n\t\treturn this.parent.shouldApply();\n\t}\n\t/**\n\t* Returns the JSON Schema target format for this provider.\n\t*\n\t* @returns The schema target format, or undefined to use the default 'jsonSchema7'\n\t* @abstract\n\t*/\n\tgetSchemaTarget() {\n\t\treturn this.parent.getSchemaTarget();\n\t}\n\t/**\n\t* Processes a specific Zod type according to the provider's requirements.\n\t*\n\t* @param value - The Zod type to process\n\t* @returns The processed Zod type\n\t* @abstract\n\t*/\n\tprocessZodType(value) {\n\t\treturn this.parent.processZodType(value);\n\t}\n\t/**\n\t* Default handler for Zod object types. Recursively processes all properties in the object.\n\t*\n\t* @param value - The Zod object to process\n\t* @returns The processed Zod object\n\t*/\n\tdefaultZodObjectHandler(value, options = { passthrough: true }) {\n\t\tconst processedShape = Object.entries(value.shape).reduce((acc, [key, propValue]) => {\n\t\t\tacc[key] = this.processZodType(propValue);\n\t\t\treturn acc;\n\t\t}, {});\n\t\tlet result = z$2.object(processedShape);\n\t\tif (value._zod.def.catchall instanceof z$2.ZodNever) result = z$2.strictObject(processedShape);\n\t\telse if (value._zod.def.catchall instanceof z$2.ZodUnknown) {\n\t\t\tif (options.passthrough) result = z$2.looseObject(processedShape);\n\t\t} else if (value._zod.def.catchall) result = result.catchall(value._zod.def.catchall);\n\t\tif (value.description) result = result.describe(value.description);\n\t\treturn result;\n\t}\n\t/**\n\t* Merges validation constraints into a parameter description.\n\t*\n\t* This helper method converts validation constraints that may not be supported\n\t* by a provider into human-readable descriptions.\n\t*\n\t* @param description - The existing parameter description\n\t* @param constraints - The validation constraints to merge\n\t* @returns The updated description with constraints, or undefined if no constraints\n\t*/\n\tmergeParameterDescription(description, constraints) {\n\t\tif (constraints.length > 0) return (description ? description + \"\\n\" : \"\") + `constraints: ${constraints.join(`, `)}`;\n\t\telse return description;\n\t}\n\t/**\n\t* Default handler for unsupported Zod types. Throws an error for specified unsupported types.\n\t*\n\t* @param value - The Zod type to check\n\t* @param throwOnTypes - Array of type names to throw errors for\n\t* @returns The original value if not in the throw list\n\t* @throws Error if the type is in the unsupported list\n\t*/\n\tdefaultUnsupportedZodTypeHandler(value, throwOnTypes = UNSUPPORTED_ZOD_TYPES$2) {\n\t\tif (throwOnTypes.includes(value.constructor.name)) throw new Error(`${this.model.modelId} does not support zod type: ${value.constructor.name}`);\n\t\treturn value;\n\t}\n\t/**\n\t* Default handler for Zod array types. Processes array constraints according to provider support.\n\t*\n\t* @param value - The Zod array to process\n\t* @param handleChecks - Array constraints to convert to descriptions vs keep as validation\n\t* @returns The processed Zod array\n\t*/\n\tdefaultZodArrayHandler(value, handleChecks = ALL_ARRAY_CHECKS$1) {\n\t\tconst zodArrayDef = value._zod.def;\n\t\tconst processedType = this.processZodType(zodArrayDef.element);\n\t\tlet result = z$2.array(processedType);\n\t\tconst constraints = [];\n\t\tif (zodArrayDef.checks) for (const check of zodArrayDef.checks) {\n\t\t\tif (check._zod.def.check === \"min_length\") if (handleChecks.includes(\"min\")) constraints.push(`minimum length ${check._zod.def.minimum}`);\n\t\t\telse result = result.min(check._zod.def.minimum);\n\t\t\tif (check._zod.def.check === \"max_length\") if (handleChecks.includes(\"max\")) constraints.push(`maximum length ${check._zod.def.maximum}`);\n\t\t\telse result = result.max(check._zod.def.maximum);\n\t\t\tif (check._zod.def.check === \"length_equals\") if (handleChecks.includes(\"length\")) constraints.push(`exact length ${check._zod.def.length}`);\n\t\t\telse result = result.length(check._zod.def.length);\n\t\t}\n\t\tconst metaDescription = value.meta()?.description;\n\t\tconst legacyDescription = value.description;\n\t\tconst description = this.mergeParameterDescription(metaDescription || legacyDescription, constraints);\n\t\tif (description) result = result.describe(description);\n\t\treturn result;\n\t}\n\t/**\n\t* Default handler for Zod union types. Processes all union options.\n\t*\n\t* @param value - The Zod union to process\n\t* @returns The processed Zod union\n\t* @throws Error if union has fewer than 2 options\n\t*/\n\tdefaultZodUnionHandler(value) {\n\t\tconst processedOptions = value._zod.def.options.map((option) => this.processZodType(option));\n\t\tif (processedOptions.length < 2) throw new Error(\"Union must have at least 2 options\");\n\t\tlet result = z$2.union(processedOptions);\n\t\tif (value.description) result = result.describe(value.description);\n\t\treturn result;\n\t}\n\t/**\n\t* Default handler for Zod string types. Processes string validation constraints.\n\t*\n\t* @param value - The Zod string to process\n\t* @param handleChecks - String constraints to convert to descriptions vs keep as validation\n\t* @returns The processed Zod string\n\t*/\n\tdefaultZodStringHandler(value, handleChecks = ALL_STRING_CHECKS$1) {\n\t\tconst constraints = [];\n\t\tconst checks = value._zod.def.checks || [];\n\t\tconst newChecks = [];\n\t\tif (checks) for (const check of checks) if (handleChecks.includes(check._zod.def.check)) switch (check._zod.def.check) {\n\t\t\tcase \"min_length\":\n\t\t\t\tconstraints.push(`minimum length ${check._zod.def.minimum}`);\n\t\t\t\tbreak;\n\t\t\tcase \"max_length\":\n\t\t\t\tconstraints.push(`maximum length ${check._zod.def.maximum}`);\n\t\t\t\tbreak;\n\t\t\tcase \"string_format\":\n\t\t\t\tswitch (check._zod.def.format) {\n\t\t\t\t\tcase \"email\":\n\t\t\t\t\tcase \"url\":\n\t\t\t\t\tcase \"emoji\":\n\t\t\t\t\tcase \"uuid\":\n\t\t\t\t\tcase \"cuid\":\n\t\t\t\t\t\tconstraints.push(`a valid ${check._zod.def.format}`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"regex\":\n\t\t\t\t\t\tconstraints.push(`input must match this regex ${check._zod.def.pattern}`);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tnewChecks.push(check);\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\telse newChecks.push(check);\n\t\tlet result = z$2.string();\n\t\tfor (const check of newChecks) result = result.check(check);\n\t\tconst metaDescription = value.meta()?.description;\n\t\tconst legacyDescription = value.description;\n\t\tconst description = this.mergeParameterDescription(metaDescription || legacyDescription, constraints);\n\t\tif (description) result = result.describe(description);\n\t\treturn result;\n\t}\n\t/**\n\t* Default handler for Zod number types. Processes number validation constraints.\n\t*\n\t* @param value - The Zod number to process\n\t* @param handleChecks - Number constraints to convert to descriptions vs keep as validation\n\t* @returns The processed Zod number\n\t*/\n\tdefaultZodNumberHandler(value, handleChecks = ALL_NUMBER_CHECKS$1) {\n\t\tconst constraints = [];\n\t\tconst checks = value._zod.def.checks || [];\n\t\tconst newChecks = [];\n\t\tif (checks) for (const check of checks) if (handleChecks.includes(check._zod.def.check)) switch (check._zod.def.check) {\n\t\t\tcase \"greater_than\":\n\t\t\t\tif (check._zod.def.inclusive) constraints.push(`greater than or equal to ${check._zod.def.value}`);\n\t\t\t\telse constraints.push(`greater than ${check._zod.def.value}`);\n\t\t\t\tbreak;\n\t\t\tcase \"less_than\":\n\t\t\t\tif (check._zod.def.inclusive) constraints.push(`lower than or equal to ${check._zod.def.value}`);\n\t\t\t\telse constraints.push(`lower than ${check._zod.def.value}`);\n\t\t\t\tbreak;\n\t\t\tcase \"multiple_of\":\n\t\t\t\tconstraints.push(`multiple of ${check._zod.def.value}`);\n\t\t\t\tbreak;\n\t\t}\n\t\telse newChecks.push(check);\n\t\tlet result = z$2.number();\n\t\tfor (const check of newChecks) switch (check._zod.def.check) {\n\t\t\tcase \"number_format\":\n\t\t\t\tswitch (check._zod.def.format) {\n\t\t\t\t\tcase \"safeint\":\n\t\t\t\t\t\tresult = result.int();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault: result = result.check(check);\n\t\t}\n\t\tconst description = this.mergeParameterDescription(value.description, constraints);\n\t\tif (description) result = result.describe(description);\n\t\treturn result;\n\t}\n\t/**\n\t* Default handler for Zod date types. Converts dates to ISO strings with constraint descriptions.\n\t*\n\t* @param value - The Zod date to process\n\t* @returns A Zod string schema representing the date in ISO format\n\t*/\n\tdefaultZodDateHandler(value) {\n\t\tconst constraints = [];\n\t\tconst checks = value._zod.def.checks || [];\n\t\tconst newChecks = [];\n\t\tif (checks) for (const check of checks) switch (check._zod.def.check) {\n\t\t\tcase \"less_than\":\n\t\t\t\tconst maxDate = new Date(check._zod.def.value);\n\t\t\t\tif (!isNaN(maxDate.getTime())) constraints.push(`Date must be older than ${maxDate.toISOString()} (ISO)`);\n\t\t\t\tbreak;\n\t\t\tcase \"greater_than\":\n\t\t\t\tconst minDate = new Date(check._zod.def.value);\n\t\t\t\tif (!isNaN(minDate.getTime())) constraints.push(`Date must be newer than ${minDate.toISOString()} (ISO)`);\n\t\t\t\tbreak;\n\t\t\tdefault: newChecks.push(check);\n\t\t}\n\t\tconstraints.push(`Date format is date-time`);\n\t\tlet result = z$2.string().describe(\"date-time\");\n\t\tconst description = this.mergeParameterDescription(value.description, constraints);\n\t\tif (description) result = result.describe(description);\n\t\treturn result;\n\t}\n\t/**\n\t* Default handler for Zod optional types. Processes the inner type and maintains optionality.\n\t*\n\t* @param value - The Zod optional to process\n\t* @param handleTypes - Types that should be processed vs passed through\n\t* @returns The processed Zod optional\n\t*/\n\tdefaultZodOptionalHandler(value, handleTypes = SUPPORTED_ZOD_TYPES$2) {\n\t\tconst innerType = value._zod?.def?.innerType;\n\t\tif (innerType && handleTypes.includes(zodV4TypeName(innerType))) return this.processZodType(innerType).optional();\n\t\telse return value;\n\t}\n\t/**\n\t* Default handler for Zod nullable types. Processes the inner type and maintains nullability.\n\t*\n\t* @param value - The Zod nullable to process\n\t* @param handleTypes - Types that should be processed vs passed through\n\t* @returns The processed Zod nullable\n\t*/\n\tdefaultZodNullableHandler(value, handleTypes = SUPPORTED_ZOD_TYPES$2) {\n\t\tconst innerType = value._zod?.def?.innerType;\n\t\tif (innerType && handleTypes.includes(zodV4TypeName(innerType))) return this.processZodType(innerType).nullable();\n\t\telse return value;\n\t}\n\t/**\n\t* Recursively collects leaf types from a ZodIntersection tree.\n\t*/\n\tcollectIntersectionLeaves(value) {\n\t\tif (value instanceof ZodIntersection$1) return [...this.collectIntersectionLeaves(value._zod.def.left), ...this.collectIntersectionLeaves(value._zod.def.right)];\n\t\treturn [value];\n\t}\n\t/**\n\t* Default handler for Zod intersection types.\n\t* Flattens the intersection tree and merges object shapes into a single z.object().\n\t* Falls back to z.any() for non-object intersections.\n\t*/\n\tdefaultZodIntersectionHandler(value) {\n\t\tconst processed = this.collectIntersectionLeaves(value).map((leaf) => this.processZodType(leaf));\n\t\tif (processed.every((p) => p instanceof ZodObject$1)) {\n\t\t\tconst mergedShape = {};\n\t\t\tfor (const obj of processed) for (const [key, field] of Object.entries(obj.shape)) {\n\t\t\t\tif (key in mergedShape) throw new Error(\"Cannot flatten intersections with overlapping keys\");\n\t\t\t\tmergedShape[key] = field;\n\t\t\t}\n\t\t\tlet result = z$2.object(mergedShape);\n\t\t\tif (value.description) result = result.describe(value.description);\n\t\t\treturn result;\n\t\t}\n\t\treturn z$2.any().describe(value.description || \"intersection type\");\n\t}\n\t/**\n\t* Processes a Zod object schema and converts it to an AI SDK Schema.\n\t*\n\t* @param zodSchema - The Zod object schema to process\n\t* @returns An AI SDK Schema with provider-specific compatibility applied\n\t*/\n\tprocessToAISDKSchema(zodSchema) {\n\t\treturn convertZodSchemaToAISDKSchema(this.processZodType(zodSchema), this.getSchemaTarget());\n\t}\n\t/**\n\t* Processes a Zod object schema and converts it to a JSON Schema.\n\t*\n\t* @param zodSchema - The Zod object schema to process\n\t* @returns A JSONSchema7 object with provider-specific compatibility applied\n\t*/\n\tprocessToJSONSchema(zodSchema) {\n\t\treturn this.processToAISDKSchema(zodSchema).jsonSchema;\n\t}\n};\n//#endregion\n//#region src/json-schema/utils.ts\nvar import_json_schema_traverse = /* @__PURE__ */ __toESM$1(require_json_schema_traverse(), 1);\n/**\n* Type guard to check if a JSON Schema has a specific type\n*/\nfunction hasType(schema, type) {\n\tif (schema.type === type) return true;\n\tif (Array.isArray(schema.type) && schema.type.includes(type)) return true;\n\treturn false;\n}\n/**\n* Check if a JSON Schema represents an object type\n*/\nfunction isObjectSchema(schema) {\n\treturn hasType(schema, \"object\") || schema.properties !== void 0;\n}\n/**\n* Check if a JSON Schema represents an array type\n*/\nfunction isArraySchema(schema) {\n\treturn hasType(schema, \"array\") || schema.items !== void 0;\n}\n/**\n* Check if a JSON Schema represents a string type\n*/\nfunction isStringSchema(schema) {\n\treturn hasType(schema, \"string\");\n}\n/**\n* Check if a JSON Schema represents a number type (number or integer)\n*/\nfunction isNumberSchema(schema) {\n\treturn hasType(schema, \"number\") || hasType(schema, \"integer\");\n}\n/**\n* Check if a JSON Schema uses anyOf\n*/\nfunction isAnyOfSchema(schema) {\n\treturn Array.isArray(schema.anyOf) && schema.anyOf.length > 0;\n}\n/**\n* Check if a JSON Schema uses oneOf\n*/\nfunction isOneOfSchema(schema) {\n\treturn Array.isArray(schema.oneOf) && schema.oneOf.length > 0;\n}\n/**\n* Check if a JSON Schema is a union type (anyOf or oneOf)\n*/\nfunction isUnionSchema(schema) {\n\treturn isAnyOfSchema(schema) || isOneOfSchema(schema) || Array.isArray(schema.type);\n}\n/**\n* Check if a JSON Schema uses allOf (intersection)\n*/\nfunction isAllOfSchema(schema) {\n\treturn Array.isArray(schema.allOf) && schema.allOf.length > 0;\n}\n/**\n* Check if a property is optional within a parent object schema.\n* A property is optional if it's not in the parent's `required` array.\n* @param propertyName - The name of the property to check\n* @param parentSchema - The parent object schema containing the property\n*/\nfunction isOptionalSchema(propertyName, parentSchema) {\n\tif (!parentSchema.required || !Array.isArray(parentSchema.required)) return true;\n\treturn !parentSchema.required.includes(propertyName);\n}\n//#endregion\n//#region src/schema-compatibility.ts\nvar SchemaCompatLayer = class {\n\tmodel;\n\tv3Layer;\n\tv4Layer;\n\t/**\n\t* Creates a new schema compatibility instance.\n\t*\n\t* @param model - The language model this compatibility layer applies to\n\t*/\n\tconstructor(model) {\n\t\tthis.model = model;\n\t\tthis.v3Layer = new SchemaCompatLayer$1(model, this);\n\t\tthis.v4Layer = new SchemaCompatLayer$2(model, this);\n\t}\n\tpreProcessJSONNode(_schema, _parentSchema) {}\n\tpostProcessJSONNode(_schema, _parentSchema) {}\n\t/**\n\t* Gets the language model associated with this compatibility layer.\n\t*\n\t* @returns The language model instance\n\t*/\n\tgetModel() {\n\t\treturn this.model;\n\t}\n\tgetUnsupportedZodTypes(value) {\n\t\tif (\"_zod\" in value) return this.v4Layer.getUnsupportedZodTypes();\n\t\telse return this.v3Layer.getUnsupportedZodTypes();\n\t}\n\tisOptional(v) {\n\t\tif (\"_zod\" in v) return this.v4Layer.isOptional(v);\n\t\telse return this.v3Layer.isOptional(v);\n\t}\n\tisObj(v) {\n\t\tif (\"_zod\" in v) return this.v4Layer.isObj(v);\n\t\telse return this.v3Layer.isObj(v);\n\t}\n\tisNull(v) {\n\t\tif (\"_zod\" in v) return this.v4Layer.isNull(v);\n\t\telse return this.v3Layer.isNull(v);\n\t}\n\tisNullable(v) {\n\t\tif (\"_zod\" in v) return this.v4Layer.isNullable(v);\n\t\telse return this.v3Layer.isNullable(v);\n\t}\n\tisArr(v) {\n\t\tif (\"_zod\" in v) return this.v4Layer.isArr(v);\n\t\telse return this.v3Layer.isArr(v);\n\t}\n\tisUnion(v) {\n\t\tif (\"_zod\" in v) return this.v4Layer.isUnion(v);\n\t\telse return this.v3Layer.isUnion(v);\n\t}\n\tisString(v) {\n\t\tif (\"_zod\" in v) return this.v4Layer.isString(v);\n\t\telse return this.v3Layer.isString(v);\n\t}\n\tisNumber(v) {\n\t\tif (\"_zod\" in v) return this.v4Layer.isNumber(v);\n\t\telse return this.v3Layer.isNumber(v);\n\t}\n\tisDate(v) {\n\t\tif (\"_zod\" in v) return this.v4Layer.isDate(v);\n\t\telse return this.v3Layer.isDate(v);\n\t}\n\tisDefault(v) {\n\t\tif (\"_zod\" in v) return this.v4Layer.isDefault(v);\n\t\telse return this.v3Layer.isDefault(v);\n\t}\n\tisIntersection(v) {\n\t\tif (\"_zod\" in v) return this.v4Layer.isIntersection(v);\n\t\telse return this.v3Layer.isIntersection(v);\n\t}\n\tdefaultZodObjectHandler(value, options = { passthrough: true }) {\n\t\tif (\"_zod\" in value) return this.v4Layer.defaultZodObjectHandler(value, options);\n\t\telse return this.v3Layer.defaultZodObjectHandler(value, options);\n\t}\n\tmergeParameterDescription(description, constraints) {\n\t\treturn this.v3Layer.mergeParameterDescription(description, constraints);\n\t}\n\tdefaultUnsupportedZodTypeHandler(value, throwOnTypes) {\n\t\tif (\"_zod\" in value) return this.v4Layer.defaultUnsupportedZodTypeHandler(value, throwOnTypes ?? UNSUPPORTED_ZOD_TYPES$2);\n\t\telse return this.v3Layer.defaultUnsupportedZodTypeHandler(value, throwOnTypes ?? UNSUPPORTED_ZOD_TYPES);\n\t}\n\tdefaultZodArrayHandler(value, handleChecks = ALL_ARRAY_CHECKS) {\n\t\tif (\"_zod\" in value) return this.v4Layer.defaultZodArrayHandler(value, handleChecks);\n\t\telse return this.v3Layer.defaultZodArrayHandler(value, handleChecks);\n\t}\n\tdefaultZodUnionHandler(value) {\n\t\tif (\"_zod\" in value) return this.v4Layer.defaultZodUnionHandler(value);\n\t\telse return this.v3Layer.defaultZodUnionHandler(value);\n\t}\n\tdefaultZodStringHandler(value, handleChecks = ALL_STRING_CHECKS) {\n\t\tif (\"_zod\" in value) return this.v4Layer.defaultZodStringHandler(value);\n\t\telse return this.v3Layer.defaultZodStringHandler(value, handleChecks);\n\t}\n\tdefaultZodNumberHandler(value, handleChecks = ALL_NUMBER_CHECKS) {\n\t\tif (\"_zod\" in value) return this.v4Layer.defaultZodNumberHandler(value);\n\t\telse return this.v3Layer.defaultZodNumberHandler(value, handleChecks);\n\t}\n\tdefaultZodDateHandler(value) {\n\t\tif (\"_zod\" in value) return this.v4Layer.defaultZodDateHandler(value);\n\t\telse return this.v3Layer.defaultZodDateHandler(value);\n\t}\n\tdefaultZodOptionalHandler(value, handleTypes) {\n\t\tif (!handleTypes) handleTypes = [\n\t\t\t\"ZodObject\",\n\t\t\t\"ZodArray\",\n\t\t\t\"ZodUnion\",\n\t\t\t\"ZodString\",\n\t\t\t\"ZodNumber\"\n\t\t];\n\t\tlet innerTypeName;\n\t\tif (\"_zod\" in value) {\n\t\t\tconst v4Type = (value._zod?.def?.innerType)?._zod?.def?.type;\n\t\t\tif (!v4Type) return value;\n\t\t\tinnerTypeName = \"Zod\" + v4Type.charAt(0).toUpperCase() + v4Type.slice(1);\n\t\t} else innerTypeName = value._def.innerType._def.typeName;\n\t\tif (handleTypes.includes(innerTypeName)) if (\"_zod\" in value) {\n\t\t\tconst innerType = value._zod?.def?.innerType;\n\t\t\tif (!innerType) return value;\n\t\t\treturn this.processZodType(innerType).optional();\n\t\t} else return this.processZodType(value._def.innerType).optional();\n\t\telse return value;\n\t}\n\tdefaultZodNullableHandler(value, handleTypes) {\n\t\tif (\"_zod\" in value) return this.v4Layer.defaultZodNullableHandler(value, handleTypes ?? SUPPORTED_ZOD_TYPES$2);\n\t\telse return this.v3Layer.defaultZodNullableHandler(value, handleTypes ?? SUPPORTED_ZOD_TYPES);\n\t}\n\tdefaultZodIntersectionHandler(value) {\n\t\tif (\"_zod\" in value) return this.v4Layer.defaultZodIntersectionHandler(value);\n\t\telse return this.v3Layer.defaultZodIntersectionHandler(value);\n\t}\n\t/**\n\t* @deprecated please use processToCompatSchema to usse StandardSchemaWithJSON\n\t* @param zodSchema\n\t* @returns\n\t*/\n\tprocessToAISDKSchema(zodSchema) {\n\t\treturn convertZodSchemaToAISDKSchema(this.processZodType(zodSchema), this.getSchemaTarget());\n\t}\n\t/**\n\t* @param schema\n\t* @returns\n\t*/\n\tprocessToJSONSchema(schema, io = \"input\") {\n\t\tconst jsonSchema = standardSchemaToJSONSchema(toStandardSchema(schema), {\n\t\t\ttarget: \"draft-07\",\n\t\t\tio\n\t\t});\n\t\t(0, import_json_schema_traverse.default)(jsonSchema, { cb: {\n\t\t\tpre: (schema) => {\n\t\t\t\tthis.preProcessJSONNode(schema);\n\t\t\t},\n\t\t\tpost: (schema) => {\n\t\t\t\tthis.postProcessJSONNode(schema);\n\t\t\t}\n\t\t} });\n\t\treturn jsonSchema;\n\t}\n\tprocessToCompatSchema(schema) {\n\t\treturn { \"~standard\": {\n\t\t\tversion: 1,\n\t\t\tvendor: \"mastra\",\n\t\t\tvalidate: (value) => toStandardSchema(schema)[\"~standard\"].validate(value),\n\t\t\tjsonSchema: {\n\t\t\t\tinput: () => {\n\t\t\t\t\treturn this.processToJSONSchema(schema, \"input\");\n\t\t\t\t},\n\t\t\t\toutput: () => {\n\t\t\t\t\treturn this.processToJSONSchema(schema, \"output\");\n\t\t\t\t}\n\t\t\t}\n\t\t} };\n\t}\n\t/**\n\t* Default handler for JSON Schema objects.\n\t* Processes object schemas with properties and required fields.\n\t*/\n\tdefaultObjectHandler(schema) {\n\t\tif (schema.properties && schema.additionalProperties === void 0) schema.additionalProperties = false;\n\t\tif (!Object.keys(schema.properties ?? {}).length) schema.required = [];\n\t\treturn schema;\n\t}\n\t/**\n\t* Default handler for JSON Schema arrays.\n\t* Converts array constraints (minItems, maxItems) to description text.\n\t*/\n\tdefaultArrayHandler(schema) {\n\t\tlet constraints = [];\n\t\tconst minItems = schema.minItems;\n\t\tconst maxItems = schema.maxItems;\n\t\tif (minItems !== void 0 && maxItems !== void 0 && minItems === maxItems) {\n\t\t\tconstraints = [`exact length ${minItems}`];\n\t\t\tdelete schema.minItems;\n\t\t\tdelete schema.maxItems;\n\t\t} else {\n\t\t\tif (minItems !== void 0) {\n\t\t\t\tconstraints.push(`minimum length ${minItems}`);\n\t\t\t\tdelete schema.minItems;\n\t\t\t}\n\t\t\tif (maxItems !== void 0) {\n\t\t\t\tconstraints.push(`maximum length ${maxItems}`);\n\t\t\t\tdelete schema.maxItems;\n\t\t\t}\n\t\t}\n\t\tif (constraints.length) schema.description = this.mergeParameterDescription(schema.description, constraints);\n\t\treturn schema;\n\t}\n\t/**\n\t* Default handler for JSON Schema strings.\n\t* Converts string constraints (minLength, maxLength, pattern, format) to description text.\n\t*/\n\tdefaultStringHandler(schema) {\n\t\tconst constraints = [];\n\t\tif (schema.minLength !== void 0) {\n\t\t\tconstraints.push(`minimum length ${schema.minLength}`);\n\t\t\tdelete schema.minLength;\n\t\t}\n\t\tif (schema.maxLength !== void 0) {\n\t\t\tconstraints.push(`maximum length ${schema.maxLength}`);\n\t\t\tdelete schema.maxLength;\n\t\t}\n\t\tswitch (schema.format) {\n\t\t\tcase \"email\":\n\t\t\tcase \"emoji\":\n\t\t\tcase \"uri\":\n\t\t\tcase \"uuid\":\n\t\t\tcase \"date-time\":\n\t\t\tcase \"date\":\n\t\t\tcase \"time\":\n\t\t\t\tconstraints.push(`a valid ${schema.format}`);\n\t\t\t\tdelete schema.pattern;\n\t\t\t\tdelete schema.format;\n\t\t\t\tbreak;\n\t\t}\n\t\tif (constraints.length === 0 && schema.pattern !== void 0) {\n\t\t\tconstraints.push(`input must match this regex ${schema.pattern}`);\n\t\t\tdelete schema.pattern;\n\t\t}\n\t\tif (constraints.length) schema.description = this.mergeParameterDescription(schema.description, constraints);\n\t\treturn schema;\n\t}\n\t/**\n\t* Default handler for JSON Schema numbers/integers.\n\t* Converts number constraints (minimum, maximum, multipleOf, exclusiveMinimum, exclusiveMaximum) to description text.\n\t*/\n\tdefaultNumberHandler(schema) {\n\t\tconst constraints = [];\n\t\tif (schema.minimum !== void 0) {\n\t\t\tif (schema.minimum !== Number.MIN_SAFE_INTEGER) constraints.push(`greater than or equal to ${schema.minimum}`);\n\t\t\tdelete schema.minimum;\n\t\t}\n\t\tif (schema.maximum !== void 0) {\n\t\t\tif (schema.maximum !== Number.MAX_SAFE_INTEGER) constraints.push(`lower than or equal to ${schema.maximum}`);\n\t\t\tdelete schema.maximum;\n\t\t}\n\t\tif (schema.exclusiveMinimum !== void 0) {\n\t\t\tconstraints.push(`greater than ${schema.exclusiveMinimum}`);\n\t\t\tdelete schema.exclusiveMinimum;\n\t\t}\n\t\tif (schema.exclusiveMaximum !== void 0) {\n\t\t\tconstraints.push(`lower than ${schema.exclusiveMaximum}`);\n\t\t\tdelete schema.exclusiveMaximum;\n\t\t}\n\t\tif (schema.multipleOf !== void 0) {\n\t\t\tconstraints.push(`multiple of ${schema.multipleOf}`);\n\t\t\tdelete schema.multipleOf;\n\t\t}\n\t\tif (constraints.length) schema.description = this.mergeParameterDescription(schema.description, constraints);\n\t\treturn schema;\n\t}\n\t/**\n\t* Default handler for JSON Schema unions (anyOf/oneOf).\n\t* Processes union schemas and can convert anyOf patterns to type arrays for simple primitives.\n\t*/\n\tdefaultUnionHandler(schema) {\n\t\tif (Array.isArray(schema.anyOf)) {\n\t\t\tschema.anyOf = schema.anyOf.map((subSchema) => {\n\t\t\t\tif (typeof subSchema !== \"object\" || subSchema === null) return false;\n\t\t\t\tthis.preProcessJSONNode(subSchema);\n\t\t\t\tthis.postProcessJSONNode(subSchema);\n\t\t\t\treturn subSchema;\n\t\t\t}).filter(Boolean);\n\t\t\tif (schema.anyOf.length === 1) schema = schema.anyOf[0];\n\t\t}\n\t\treturn schema;\n\t}\n\t/**\n\t* Default handler for JSON Schema allOf (intersection) types.\n\t* Flattens allOf sub-schemas by merging properties and required arrays into a single object schema.\n\t*/\n\tdefaultAllOfHandler(schema) {\n\t\tif (!schema.allOf || !Array.isArray(schema.allOf)) return schema;\n\t\tconst mergedProperties = {};\n\t\tconst mergedRequired = [];\n\t\tfor (const subSchema of schema.allOf) {\n\t\t\tif (subSchema.properties) Object.assign(mergedProperties, subSchema.properties);\n\t\t\tif (Array.isArray(subSchema.required)) mergedRequired.push(...subSchema.required);\n\t\t}\n\t\tdelete schema.allOf;\n\t\tschema.type = \"object\";\n\t\tschema.properties = mergedProperties;\n\t\tif (mergedRequired.length > 0) schema.required = [...new Set(mergedRequired)];\n\t\tschema.additionalProperties = false;\n\t\treturn schema;\n\t}\n\t/**\n\t* Default handler for JSON Schema nullable types.\n\t* Ensures nullable types are represented correctly.\n\t*/\n\tdefaultNullableHandler(schema) {\n\t\treturn this.defaultUnionHandler(schema);\n\t}\n\t/**\n\t* Default handler for JSON Schema dates (string with date/date-time format).\n\t* Converts date formats to string type with format constraint in description.\n\t*/\n\tdefaultDateHandler(schema) {\n\t\tif (schema.format === \"date\" || schema.format === \"date-time\") {\n\t\t\tconst format = schema.format;\n\t\t\tdelete schema.format;\n\t\t\tschema.description = this.mergeParameterDescription(schema.description, [`format: ${format}`]);\n\t\t}\n\t\treturn schema;\n\t}\n\t/**\n\t* Default handler for empty JSON schemas.\n\t* Converts empty {} schemas to a union of primitive types.\n\t*/\n\tdefaultEmptySchemaHandler(schema) {\n\t\tif (Object.keys(schema).length === 0) schema.type = [\n\t\t\t\"string\",\n\t\t\t\"number\",\n\t\t\t\"boolean\",\n\t\t\t\"null\"\n\t\t];\n\t\treturn schema;\n\t}\n\t/**\n\t* Default handler for unsupported JSON Schema features.\n\t* Can be used to strip or convert unsupported keywords.\n\t*/\n\tdefaultUnsupportedHandler(schema, unsupportedKeywords = []) {\n\t\tfor (const keyword of unsupportedKeywords) if (keyword in schema) delete schema[keyword];\n\t\treturn schema;\n\t}\n\tisObjectSchema(schema) {\n\t\treturn isObjectSchema(schema);\n\t}\n\tisArraySchema(schema) {\n\t\treturn isArraySchema(schema);\n\t}\n\tisStringSchema(schema) {\n\t\treturn isStringSchema(schema);\n\t}\n\tisNumberSchema(schema) {\n\t\treturn isNumberSchema(schema);\n\t}\n\tisUnionSchema(schema) {\n\t\treturn isUnionSchema(schema);\n\t}\n\tisAllOfSchema(schema) {\n\t\treturn isAllOfSchema(schema);\n\t}\n\t/**\n\t* Checks if a property is optional within a parent object schema.\n\t* A property is optional if it's not in the parent's `required` array.\n\t* @param propertyName - The name of the property to check\n\t* @param parentSchema - The parent object schema containing the property\n\t*/\n\tisOptionalProperty(propertyName, parentSchema) {\n\t\treturn isOptionalSchema(propertyName, parentSchema);\n\t}\n\t/**\n\t* Converts a Zod schema to JSON Schema using the standard-schema interface\n\t* and applies pre/post processing via traverse.\n\t*\n\t* Uses 'input' io mode so that fields with defaults are optional (appropriate for tool parameters).\n\t* @deprecated please use processToCompatSchema\n\t*/\n\ttoJSONSchema(zodSchema) {\n\t\tconst SCHEMA_TARGET_TO_STANDARD = {\n\t\t\tjsonSchema7: \"draft-07\",\n\t\t\t\"jsonSchema2019-09\": \"draft-2020-12\",\n\t\t\topenApi3: \"openapi-3.0\"\n\t\t};\n\t\tconst schemaTarget = this.getSchemaTarget();\n\t\tconst target = (schemaTarget && SCHEMA_TARGET_TO_STANDARD[schemaTarget]) ?? schemaTarget;\n\t\tconst jsonSchema = standardSchemaToJSONSchema(toStandardSchema(zodSchema), {\n\t\t\ttarget,\n\t\t\tio: \"input\"\n\t\t});\n\t\t(0, import_json_schema_traverse.default)(jsonSchema, { cb: {\n\t\t\tpre: (schema) => {\n\t\t\t\tthis.preProcessJSONNode(schema);\n\t\t\t},\n\t\t\tpost: (schema) => {\n\t\t\t\tthis.postProcessJSONNode(schema);\n\t\t\t}\n\t\t} });\n\t\treturn jsonSchema;\n\t}\n};\n//#endregion\n//#region src/null-to-undefined.ts\n/**\n* Recursively converts null values to undefined in an object based on which\n* properties are optional in the JSON Schema. This is needed because OpenAI\n* strict mode sends null for optional fields, but schemas like Zod's .optional()\n* reject null.\n*\n* Only converts null→undefined for properties that are NOT in the schema's\n* `required` array, preserving null for explicitly .nullable() fields.\n*/\nfunction transformNullToUndefined(value, jsonSchema) {\n\tif (value === null || value === void 0) return value;\n\tconst branches = jsonSchema.anyOf ?? jsonSchema.oneOf;\n\tif (Array.isArray(branches)) {\n\t\tconst { anyOf: _anyOf, oneOf: _oneOf, ...parent } = jsonSchema;\n\t\tconst branch = findMatchingBranch(value, branches);\n\t\tif (!branch) return \"properties\" in parent || \"items\" in parent ? transformNullToUndefined(value, parent) : value;\n\t\treturn transformNullToUndefined(value, mergeSchemas(parent, branch));\n\t}\n\tif (typeof value !== \"object\" || Array.isArray(value)) {\n\t\tif (Array.isArray(value) && jsonSchema.items && typeof jsonSchema.items === \"object\") return value.map((item) => transformNullToUndefined(item, jsonSchema.items));\n\t\treturn value;\n\t}\n\tconst properties = jsonSchema.properties;\n\tif (!properties) return value;\n\tconst required = jsonSchema.required || [];\n\tconst result = {};\n\tfor (const [key, val] of Object.entries(value)) if (val === null && !required.includes(key)) result[key] = void 0;\n\telse if (val !== null && typeof val === \"object\" && properties[key]) result[key] = transformNullToUndefined(val, properties[key]);\n\telse result[key] = val;\n\treturn result;\n}\n/**\n* Picks the non-null union branch (from `anyOf`/`oneOf`) whose shape matches the value,\n* e.g. the object branch of a `.nullable()` object. For objects, branches whose required\n* keys are missing or whose `const`/`enum` properties (discriminators) disagree are skipped.\n*/\nfunction findMatchingBranch(value, branches) {\n\tconst isArray = Array.isArray(value);\n\tif (typeof value !== \"object\" && !isArray) return;\n\treturn branches.find((branch) => {\n\t\tif (!branch || typeof branch !== \"object\") return false;\n\t\tconst types = Array.isArray(branch.type) ? branch.type : [branch.type];\n\t\tif (isArray) {\n\t\t\tif (!(\"items\" in branch || types.includes(\"array\"))) return false;\n\t\t\tconst items = branch.items;\n\t\t\treturn !items || typeof items !== \"object\" || value.every((item) => itemMatches(item, items));\n\t\t}\n\t\tif (!(\"properties\" in branch || \"anyOf\" in branch || \"oneOf\" in branch || types.includes(\"object\"))) return false;\n\t\treturn objectMatchesBranch(value, branch);\n\t});\n}\nfunction itemMatches(item, schema) {\n\tif (item === null || typeof item !== \"object\" || Array.isArray(item)) return true;\n\tconst branches = schema.anyOf ?? schema.oneOf;\n\tif (Array.isArray(branches)) return findMatchingBranch(item, branches) !== void 0;\n\treturn objectMatchesBranch(item, schema);\n}\nfunction objectMatchesBranch(value, branch) {\n\tif ((branch.required ?? []).some((key) => !(key in value))) return false;\n\tconst properties = branch.properties ?? {};\n\treturn Object.entries(properties).every(([key, prop]) => {\n\t\tif (!prop || typeof prop !== \"object\" || !(key in value)) return true;\n\t\tif (\"const\" in prop) return prop.const === value[key];\n\t\tif (Array.isArray(prop.enum)) return prop.enum.includes(value[key]);\n\t\treturn true;\n\t});\n}\nfunction mergeSchemas(parent, branch) {\n\tconst merged = {\n\t\t...parent,\n\t\t...branch\n\t};\n\tif (parent.items && !branch.items) merged.items = parent.items;\n\tif (!parent.properties) return merged;\n\treturn {\n\t\t...merged,\n\t\tproperties: {\n\t\t\t...parent.properties,\n\t\t\t...branch.properties\n\t\t},\n\t\trequired: [.../* @__PURE__ */ new Set([...parent.required ?? [], ...branch.required ?? []])]\n\t};\n}\n/**\n* Wraps a StandardSchemaWithJSON to transform null values to undefined for\n* optional fields before validation. This is a schema-agnostic solution for\n* OpenAI strict mode, which sends null for optional fields.\n*\n* The wrapper:\n* 1. Extracts the JSON Schema from the inner schema to determine optional fields\n* 2. Before validation, transforms null→undefined for non-required properties\n* 3. Delegates validation to the inner schema with the transformed value\n* 4. Delegates JSON Schema conversion to the inner schema unchanged\n*/\nfunction wrapSchemaWithNullTransform(schema) {\n\tlet jsonSchema;\n\ttry {\n\t\tjsonSchema = schema[\"~standard\"].jsonSchema.input({ target: \"draft-07\" });\n\t} catch {}\n\tif (!jsonSchema) return schema;\n\tconst innerProps = schema[\"~standard\"];\n\treturn { \"~standard\": {\n\t\tversion: innerProps.version,\n\t\tvendor: innerProps.vendor,\n\t\ttypes: innerProps.types,\n\t\tvalidate: (value, options) => {\n\t\t\tconst transformed = transformNullToUndefined(value, jsonSchema);\n\t\t\treturn innerProps.validate(transformed, options);\n\t\t},\n\t\tjsonSchema: innerProps.jsonSchema\n\t} };\n}\nfunction isOptional$1(z) {\n\treturn (v) => v instanceof z[\"ZodOptional\"];\n}\nfunction isObj$1(z) {\n\treturn (v) => v instanceof z[\"ZodObject\"];\n}\nfunction isNull(z) {\n\treturn (v) => v instanceof z[\"ZodNull\"];\n}\nfunction isArr$1(z) {\n\treturn (v) => v instanceof z[\"ZodArray\"];\n}\nfunction isUnion$1(z) {\n\treturn (v) => v instanceof z[\"ZodUnion\"];\n}\nfunction isString$1(z) {\n\treturn (v) => v instanceof z[\"ZodString\"];\n}\nfunction isNumber$1(z) {\n\treturn (v) => v instanceof z[\"ZodNumber\"];\n}\nfunction isDate(z) {\n\treturn (v) => v instanceof z[\"ZodDate\"];\n}\nfunction isDefault(z) {\n\treturn (v) => v instanceof z[\"ZodDefault\"];\n}\nfunction isNullable(z) {\n\treturn (v) => v instanceof z[\"ZodNullable\"];\n}\nfunction isIntersection(z) {\n\treturn (v) => v instanceof z[\"ZodIntersection\"];\n}\n//#endregion\n//#region src/provider-compats/openai.ts\nconst allowedStringFormats = [\n\t\"date-time\",\n\t\"time\",\n\t\"date\",\n\t\"duration\",\n\t\"email\",\n\t\"hostname\",\n\t\"ipv4\",\n\t\"ipv6\",\n\t\"uuid\"\n];\nfunction unorderedArraysEqual(left, right, itemEquals) {\n\tif (left.length !== right.length) return false;\n\tconst matched = /* @__PURE__ */ new Set();\n\treturn left.every((leftItem) => {\n\t\tconst matchIndex = right.findIndex((rightItem, index) => !matched.has(index) && itemEquals(leftItem, rightItem));\n\t\tif (matchIndex === -1) return false;\n\t\tmatched.add(matchIndex);\n\t\treturn true;\n\t});\n}\nfunction jsonValuesEqual(left, right) {\n\tif (Object.is(left, right)) return true;\n\tif (Array.isArray(left) || Array.isArray(right)) return Array.isArray(left) && Array.isArray(right) && left.length === right.length && left.every((value, index) => jsonValuesEqual(value, right[index]));\n\tif (!left || !right || typeof left !== \"object\" || typeof right !== \"object\") return false;\n\tconst leftEntries = Object.entries(left);\n\tconst rightRecord = right;\n\treturn leftEntries.length === Object.keys(rightRecord).length && leftEntries.every(([key, value]) => Object.prototype.hasOwnProperty.call(rightRecord, key) && jsonValuesEqual(value, rightRecord[key]));\n}\nfunction schemaValuesEqual(left, right, keyword) {\n\tif (keyword === \"const\" || keyword === \"default\" || keyword === \"example\" || keyword === \"examples\") return jsonValuesEqual(left, right);\n\tif (Object.is(left, right)) return true;\n\tif (Array.isArray(left) || Array.isArray(right)) {\n\t\tif (!Array.isArray(left) || !Array.isArray(right)) return false;\n\t\tif (keyword === \"required\" || keyword === \"type\") return unorderedArraysEqual(left, right, Object.is);\n\t\tif (keyword === \"enum\") return unorderedArraysEqual(left, right, jsonValuesEqual);\n\t\tif (keyword === \"allOf\" || keyword === \"anyOf\" || keyword === \"oneOf\") return unorderedArraysEqual(left, right, (leftItem, rightItem) => schemaValuesEqual(leftItem, rightItem));\n\t\treturn left.length === right.length && left.every((value, index) => schemaValuesEqual(value, right[index]));\n\t}\n\tif (!left || !right || typeof left !== \"object\" || typeof right !== \"object\") return false;\n\tconst leftEntries = Object.entries(left);\n\tconst rightRecord = right;\n\treturn leftEntries.length === Object.keys(rightRecord).length && leftEntries.every(([key, value]) => Object.prototype.hasOwnProperty.call(rightRecord, key) && schemaValuesEqual(value, rightRecord[key], key));\n}\nvar OpenAISchemaCompatLayer = class extends SchemaCompatLayer {\n\tgetSchemaTarget() {\n\t\treturn `jsonSchema7`;\n\t}\n\tisReasoningModel() {\n\t\tconst modelId = this.getModel().modelId;\n\t\tif (!modelId) return false;\n\t\treturn modelId.includes(`o3`) || modelId.includes(`o4`) || modelId.includes(`o1`);\n\t}\n\tshouldApply() {\n\t\tconst model = this.getModel();\n\t\tif (!this.isReasoningModel() && (model.provider.includes(`openai`) || model.modelId?.includes(`openai`) || model.provider.includes(`groq`))) return true;\n\t\treturn false;\n\t}\n\tprocessZodType(value) {\n\t\tif (isOptional$1(z$1)(value)) {\n\t\t\tconst innerType = \"_def\" in value ? value._def.innerType : value._zod?.def?.innerType;\n\t\t\tif (innerType) {\n\t\t\t\tif (isNullable(z$1)(innerType)) return this.processZodType(innerType).transform((val) => val === null ? void 0 : val);\n\t\t\t\treturn this.processZodType(innerType).nullable().transform((val) => val === null ? void 0 : val);\n\t\t\t}\n\t\t\treturn value;\n\t\t} else if (isNullable(z$1)(value)) {\n\t\t\tconst innerType = \"_def\" in value ? value._def.innerType : value._zod?.def?.innerType;\n\t\t\tif (innerType) {\n\t\t\t\tif (isOptional$1(z$1)(innerType)) {\n\t\t\t\t\tconst innerInnerType = \"_def\" in innerType ? innerType._def.innerType : innerType._zod?.def?.innerType;\n\t\t\t\t\tif (innerInnerType) return this.processZodType(innerInnerType).nullable().transform((val) => val === null ? void 0 : val);\n\t\t\t\t}\n\t\t\t\treturn this.processZodType(innerType).nullable();\n\t\t\t}\n\t\t\treturn value;\n\t\t} else if (isDefault(z$1)(value)) {\n\t\t\tconst innerType = \"_def\" in value ? value._def.innerType : value._zod?.def?.innerType;\n\t\t\tconst defaultValue = \"_def\" in value ? value._def.defaultValue : value._zod?.def?.defaultValue;\n\t\t\tif (innerType) return this.processZodType(innerType).nullable().transform((val) => {\n\t\t\t\tif (val === null) return typeof defaultValue === \"function\" ? defaultValue() : defaultValue;\n\t\t\t\treturn val;\n\t\t\t});\n\t\t\treturn value;\n\t\t} else if (isObj$1(z$1)(value)) return this.defaultZodObjectHandler(value);\n\t\telse if (isUnion$1(z$1)(value)) return this.defaultZodUnionHandler(value);\n\t\telse if (isArr$1(z$1)(value)) return this.defaultZodArrayHandler(value);\n\t\telse if (isString$1(z$1)(value)) {\n\t\t\tconst model = this.getModel();\n\t\t\tconst checks = [\"emoji\"];\n\t\t\tif (model.modelId?.includes(\"gpt-4o-mini\")) return this.defaultZodStringHandler(value, [\"emoji\", \"regex\"]);\n\t\t\treturn this.defaultZodStringHandler(value, checks);\n\t\t}\n\t\tif (isIntersection(z$1)(value)) return this.defaultZodIntersectionHandler(value);\n\t\treturn this.defaultUnsupportedZodTypeHandler(value, [\n\t\t\t\"ZodNever\",\n\t\t\t\"ZodUndefined\",\n\t\t\t\"ZodTuple\"\n\t\t]);\n\t}\n\t/**\n\t* Override to apply the same JSON Schema fixes (additionalProperties, required fields)\n\t* that processToJSONSchema applies. The base implementation skips JSON Schema traversal,\n\t* which causes OpenAI strict mode to reject tool schemas missing additionalProperties: false.\n\t*/\n\tprocessToAISDKSchema(zodSchema) {\n\t\tconst transformedJsonSchema = standardSchemaToJSONSchema(this.processToCompatSchema(zodSchema));\n\t\treturn jsonSchema(transformedJsonSchema, { validate: (value) => {\n\t\t\tconst transformed = this.#traverse(value, transformedJsonSchema);\n\t\t\tconst result = zodSchema.safeParse(transformed);\n\t\t\treturn result.success ? {\n\t\t\t\tsuccess: true,\n\t\t\t\tvalue: result.data\n\t\t\t} : {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: result.error\n\t\t\t};\n\t\t} });\n\t}\n\tprocessToCompatSchema(schema) {\n\t\tconst originalStandardSchema = toStandardSchema(schema);\n\t\treturn { \"~standard\": {\n\t\t\tversion: 1,\n\t\t\tvendor: \"mastra\",\n\t\t\tvalidate: (value) => {\n\t\t\t\tconst transformedJsonSchema = this.processToJSONSchema(schema, \"input\");\n\t\t\t\tconst transformed = this.#traverse(value, transformedJsonSchema);\n\t\t\t\treturn originalStandardSchema[\"~standard\"].validate(transformed);\n\t\t\t},\n\t\t\tjsonSchema: {\n\t\t\t\tinput: () => {\n\t\t\t\t\treturn this.processToJSONSchema(schema, \"input\");\n\t\t\t\t},\n\t\t\t\toutput: () => {\n\t\t\t\t\treturn this.processToJSONSchema(schema, \"output\");\n\t\t\t\t}\n\t\t\t}\n\t\t} };\n\t}\n\tpreProcessJSONNode(schema, _parentSchema) {\n\t\tif (isAllOfSchema(schema)) this.defaultAllOfHandler(schema);\n\t\tif (isObjectSchema(schema)) this.defaultObjectHandler(schema);\n\t\telse if (isArraySchema(schema)) this.defaultArrayHandler(schema);\n\t\telse if (isNumberSchema(schema)) this.defaultNumberHandler(schema);\n\t\telse if (isStringSchema(schema)) {\n\t\t\tif (schema.format) {\n\t\t\t\tif (!allowedStringFormats.includes(schema.format)) {\n\t\t\t\t\tdelete schema.format;\n\t\t\t\t\tdelete schema.pattern;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.defaultStringHandler(schema);\n\t\t}\n\t}\n\tpostProcessJSONNode(schema) {\n\t\tif (isUnionSchema(schema)) this.defaultUnionHandler(schema);\n\t\tif (schema.type === void 0 && !schema.anyOf) {\n\t\t\tlet subSchema = {};\n\t\t\tfor (const key of Object.keys(schema)) {\n\t\t\t\tsubSchema[key] = schema[key];\n\t\t\t\tdelete schema[key];\n\t\t\t}\n\t\t\tschema.anyOf = [subSchema, { type: \"null\" }];\n\t\t}\n\t\tif (isObjectSchema(schema)) {\n\t\t\tschema.additionalProperties = false;\n\t\t\tdelete schema.propertyNames;\n\t\t\tif (schema.properties) for (const key of Object.keys(schema.properties)) {\n\t\t\t\tconst prop = schema.properties[key];\n\t\t\t\tif (!schema.required) schema.required = [];\n\t\t\t\tif (!schema.required?.includes(key)) {\n\t\t\t\t\tschema[\"x-optional\"] = [...schema[\"x-optional\"] || [], key];\n\t\t\t\t\tschema.required?.push(key);\n\t\t\t\t\tconst objectKeywords = [\n\t\t\t\t\t\t\"properties\",\n\t\t\t\t\t\t\"required\",\n\t\t\t\t\t\t\"additionalProperties\",\n\t\t\t\t\t\t\"x-optional\"\n\t\t\t\t\t];\n\t\t\t\t\tconst arrayKeywords = [\"items\"];\n\t\t\t\t\tconst numericKeywords = [\n\t\t\t\t\t\t\"format\",\n\t\t\t\t\t\t\"minimum\",\n\t\t\t\t\t\t\"maximum\",\n\t\t\t\t\t\t\"exclusiveMinimum\",\n\t\t\t\t\t\t\"exclusiveMaximum\",\n\t\t\t\t\t\t\"multipleOf\"\n\t\t\t\t\t];\n\t\t\t\t\tconst isNumericType = (type) => type === \"integer\" || type === \"number\";\n\t\t\t\t\tconst genericConstraintKeywords = [\n\t\t\t\t\t\t\"const\",\n\t\t\t\t\t\t\"enum\",\n\t\t\t\t\t\t\"oneOf\",\n\t\t\t\t\t\t\"not\",\n\t\t\t\t\t\t\"if\",\n\t\t\t\t\t\t\"then\",\n\t\t\t\t\t\t\"else\"\n\t\t\t\t\t];\n\t\t\t\t\tconst branchConstraintKeywords = [\n\t\t\t\t\t\t\"anyOf\",\n\t\t\t\t\t\t\"oneOf\",\n\t\t\t\t\t\t\"not\",\n\t\t\t\t\t\t\"if\",\n\t\t\t\t\t\t\"then\",\n\t\t\t\t\t\t\"else\"\n\t\t\t\t\t];\n\t\t\t\t\tconst typeSpecificKeywords = (type) => type === \"object\" ? objectKeywords : type === \"array\" ? arrayKeywords : [];\n\t\t\t\t\tconst isRedundantNullableUnion = (type) => {\n\t\t\t\t\t\tif (!prop.anyOf || prop.anyOf.length !== 2) return false;\n\t\t\t\t\t\tconst nullBranches = prop.anyOf.filter((branch) => typeof branch !== \"boolean\" && branch.type === \"null\");\n\t\t\t\t\t\tconst valueBranches = prop.anyOf.filter((branch) => typeof branch !== \"boolean\" && branch.type !== \"null\");\n\t\t\t\t\t\tif (nullBranches.length !== 1 || valueBranches.length !== 1) return false;\n\t\t\t\t\t\tconst valueBranch = valueBranches[0];\n\t\t\t\t\t\tif (valueBranch.type !== type) return false;\n\t\t\t\t\t\treturn Object.entries(valueBranch).every(([keyword, value]) => {\n\t\t\t\t\t\t\tif (keyword === \"type\") return true;\n\t\t\t\t\t\t\treturn keyword in prop && schemaValuesEqual(prop[keyword], value, keyword);\n\t\t\t\t\t\t});\n\t\t\t\t\t};\n\t\t\t\t\tif (Array.isArray(prop.type)) {\n\t\t\t\t\t\tconst types = [...prop.type];\n\t\t\t\t\t\tif (!types.includes(\"null\")) types.push(\"null\");\n\t\t\t\t\t\tconst branchConstraints = {};\n\t\t\t\t\t\tconst propRecord = prop;\n\t\t\t\t\t\tconst branchConstraintRecord = branchConstraints;\n\t\t\t\t\t\tfor (const keyword of branchConstraintKeywords) if (keyword in prop) {\n\t\t\t\t\t\t\tbranchConstraintRecord[keyword] = propRecord[keyword];\n\t\t\t\t\t\t\tdelete propRecord[keyword];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tdelete prop.type;\n\t\t\t\t\t\tif (\"const\" in prop) {\n\t\t\t\t\t\t\tconst constValue = prop.const;\n\t\t\t\t\t\t\tprop.enum = !prop.enum || prop.enum.some((value) => jsonValuesEqual(value, constValue)) ? [constValue, null] : [null];\n\t\t\t\t\t\t\tdelete prop.const;\n\t\t\t\t\t\t} else if (prop.enum && !prop.enum.includes(null)) prop.enum = [...prop.enum, null];\n\t\t\t\t\t\tprop.anyOf = types.map((type) => {\n\t\t\t\t\t\t\tif (type === \"null\") return { type: \"null\" };\n\t\t\t\t\t\t\tconst branch = { type };\n\t\t\t\t\t\t\tconst numericFormat = typeof prop.format === \"string\" && [\n\t\t\t\t\t\t\t\t\"int32\",\n\t\t\t\t\t\t\t\t\"int64\",\n\t\t\t\t\t\t\t\t\"float\",\n\t\t\t\t\t\t\t\t\"double\"\n\t\t\t\t\t\t\t].includes(prop.format);\n\t\t\t\t\t\t\tconst formatOwner = types.includes(\"string\") && !numericFormat ? type === \"string\" : isNumericType(type);\n\t\t\t\t\t\t\tfor (const keyword of [\n\t\t\t\t\t\t\t\t...typeSpecificKeywords(type),\n\t\t\t\t\t\t\t\t...isNumericType(type) ? numericKeywords.filter((k) => k !== \"format\") : [],\n\t\t\t\t\t\t\t\t...formatOwner ? [\"format\"] : []\n\t\t\t\t\t\t\t]) if (keyword in prop) branch[keyword] = prop[keyword];\n\t\t\t\t\t\t\treturn Object.assign(branch, branchConstraints);\n\t\t\t\t\t\t});\n\t\t\t\t\t\tconst numericBranchExists = types.some(isNumericType);\n\t\t\t\t\t\tfor (const keyword of [\n\t\t\t\t\t\t\t...objectKeywords,\n\t\t\t\t\t\t\t...arrayKeywords,\n\t\t\t\t\t\t\t...numericBranchExists ? numericKeywords : []\n\t\t\t\t\t\t]) delete prop[keyword];\n\t\t\t\t\t} else if (prop.type && prop.type !== \"null\") {\n\t\t\t\t\t\tconst originalType = prop.type;\n\t\t\t\t\t\tconst keywords = typeSpecificKeywords(originalType);\n\t\t\t\t\t\tif (keywords.length > 0) {\n\t\t\t\t\t\t\tconst branch = { type: originalType };\n\t\t\t\t\t\t\tconst preserveAnyOf = prop.anyOf && !isRedundantNullableUnion(originalType) ? prop.anyOf : void 0;\n\t\t\t\t\t\t\tfor (const keyword of [...keywords, ...genericConstraintKeywords]) if (keyword in prop) {\n\t\t\t\t\t\t\t\tbranch[keyword] = prop[keyword];\n\t\t\t\t\t\t\t\tdelete prop[keyword];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (preserveAnyOf) branch.anyOf = preserveAnyOf;\n\t\t\t\t\t\t\tdelete prop.type;\n\t\t\t\t\t\t\tprop.anyOf = [branch, { type: \"null\" }];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst propSchema = {\n\t\t\t\t\t\t\t\t...prop,\n\t\t\t\t\t\t\t\ttype: originalType\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t\tif (isRedundantNullableUnion(originalType)) delete propSchema.anyOf;\n\t\t\t\t\t\t\tfor (const keyword of [...genericConstraintKeywords, \"anyOf\"]) delete prop[keyword];\n\t\t\t\t\t\t\tif (isNumericType(originalType)) for (const keyword of numericKeywords) delete prop[keyword];\n\t\t\t\t\t\t\tdelete prop.type;\n\t\t\t\t\t\t\tprop.anyOf = [propSchema, { type: \"null\" }];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\t#traverse(value, schema) {\n\t\tconst resolved = this.#resolveAnyOf(schema, value);\n\t\tif ((isDateFormat(resolved) || resolved[\"x-date\"] === true) && typeof value === \"string\") return new Date(value);\n\t\tif (resolved.type === \"array\" || Array.isArray(resolved.type) && resolved.type.includes(\"array\")) {\n\t\t\tif (!Array.isArray(value)) return value;\n\t\t\treturn value.map((item) => this.#traverse(item, resolved.items));\n\t\t}\n\t\tif (!(resolved.type === \"object\" || Array.isArray(resolved.type) && resolved.type.includes(\"object\"))) return value;\n\t\tconst properties = resolved.properties;\n\t\tif (!properties || !value) return value;\n\t\tconst obj = value;\n\t\tconst optionalProperties = resolved[\"x-optional\"] ?? [];\n\t\tfor (const key in obj) if (optionalProperties.includes(key) && obj[key] === null) obj[key] = void 0;\n\t\telse if (properties[key]) obj[key] = this.#traverse(obj[key], properties[key]);\n\t\treturn obj;\n\t}\n\t/**\n\t* If schema has anyOf, return the variant whose type matches the value's shape\n\t* (branches are type-specific), falling back to the first non-null variant.\n\t* Otherwise return the schema itself.\n\t*/\n\t#resolveAnyOf(schema, value) {\n\t\tif (Array.isArray(schema.anyOf)) {\n\t\t\tconst nonNullVariants = schema.anyOf.filter((s) => s && s.type !== \"null\");\n\t\t\tconst valueType = Array.isArray(value) ? \"array\" : value !== null && typeof value === \"object\" ? \"object\" : typeof value === \"number\" ? Number.isInteger(value) ? \"integer\" : \"number\" : typeof value === \"string\" || typeof value === \"boolean\" ? typeof value : void 0;\n\t\t\tif (valueType) {\n\t\t\t\tconst hasType = (variant, type) => (Array.isArray(variant.type) ? variant.type : [variant.type]).includes(type);\n\t\t\t\tconst exactMatch = nonNullVariants.find((variant) => hasType(variant, valueType));\n\t\t\t\tif (exactMatch) return {\n\t\t\t\t\t...schema,\n\t\t\t\t\t...exactMatch\n\t\t\t\t};\n\t\t\t\tif (valueType === \"integer\") {\n\t\t\t\t\tconst numberMatch = nonNullVariants.find((variant) => hasType(variant, \"number\"));\n\t\t\t\t\tif (numberMatch) return {\n\t\t\t\t\t\t...schema,\n\t\t\t\t\t\t...numberMatch\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (nonNullVariants[0]) return {\n\t\t\t\t...schema,\n\t\t\t\t...nonNullVariants[0]\n\t\t\t};\n\t\t}\n\t\treturn schema;\n\t}\n};\nfunction isDateFormat(schema) {\n\treturn schema.format === \"date-time\" || schema.format === \"date\";\n}\n//#endregion\n//#region src/provider-compats/openai-reasoning.ts\nvar OpenAIReasoningSchemaCompatLayer = class extends OpenAISchemaCompatLayer {\n\tgetSchemaTarget() {\n\t\treturn `openApi3`;\n\t}\n\tisReasoningModel() {\n\t\tconst modelId = this.getModel().modelId;\n\t\tif (!modelId) return false;\n\t\treturn modelId.includes(`o3`) || modelId.includes(`o4`) || modelId.includes(`o1`);\n\t}\n\tshouldApply() {\n\t\tconst model = this.getModel();\n\t\tif (this.isReasoningModel() && (model.provider.includes(`openai`) || model.modelId?.includes(`openai`))) return true;\n\t\treturn false;\n\t}\n\tprocessZodType(value) {\n\t\tif (isOptional$1(z$1)(value)) {\n\t\t\tconst innerType = \"_def\" in value ? value._def.innerType : value._zod?.def?.innerType;\n\t\t\tif (innerType) {\n\t\t\t\tif (isNullable(z$1)(innerType)) return this.processZodType(innerType).transform((val) => val === null ? void 0 : val);\n\t\t\t\treturn this.processZodType(innerType).nullable().transform((val) => val === null ? void 0 : val);\n\t\t\t}\n\t\t\treturn value;\n\t\t} else if (isNullable(z$1)(value)) {\n\t\t\tconst innerType = \"_def\" in value ? value._def.innerType : value._zod?.def?.innerType;\n\t\t\tif (innerType && isOptional$1(z$1)(innerType)) {\n\t\t\t\tconst innerInnerType = \"_def\" in innerType ? innerType._def.innerType : innerType._zod?.def?.innerType;\n\t\t\t\tif (innerInnerType) return this.processZodType(innerInnerType).nullable().transform((val) => val === null ? void 0 : val);\n\t\t\t}\n\t\t\tif (innerType) return this.processZodType(innerType).nullable();\n\t\t\treturn value;\n\t\t} else if (isObj$1(z$1)(value)) return this.defaultZodObjectHandler(value, { passthrough: false });\n\t\telse if (isArr$1(z$1)(value)) return this.defaultZodArrayHandler(value);\n\t\telse if (isUnion$1(z$1)(value)) return this.defaultZodUnionHandler(value);\n\t\telse if (isDefault(z$1)(value)) {\n\t\t\tconst defaultDef = value._def;\n\t\t\tconst innerType = defaultDef.innerType;\n\t\t\tconst defaultValue = typeof defaultDef.defaultValue === \"function\" ? defaultDef.defaultValue() : defaultDef.defaultValue;\n\t\t\tconst constraints = [];\n\t\t\tif (defaultValue !== void 0) constraints.push(`the default value is ${defaultValue}`);\n\t\t\tconst description = this.mergeParameterDescription(value.description, constraints);\n\t\t\tlet result = this.processZodType(innerType);\n\t\t\tif (description) result = result.describe(description);\n\t\t\treturn result;\n\t\t} else if (isNumber$1(z$1)(value)) return this.defaultZodNumberHandler(value);\n\t\telse if (isString$1(z$1)(value)) return this.defaultZodStringHandler(value);\n\t\telse if (isDate(z$1)(value)) return this.defaultZodDateHandler(value);\n\t\telse if (isNull(z$1)(value)) return z$1.any().refine((v) => v === null, { message: \"must be null\" }).describe(value.description || \"must be null\");\n\t\telse if (value.constructor.name === \"ZodAny\") return z$1.string().describe((value.description ?? \"\") + `\\nArgument was an \"any\" type, but you (the LLM) do not support \"any\", so it was cast to a \"string\" type`);\n\t\tif (isIntersection(z$1)(value)) return this.defaultZodIntersectionHandler(value);\n\t\treturn this.defaultUnsupportedZodTypeHandler(value);\n\t}\n};\n//#endregion\n//#region src/standard-schema-compat.ts\n/**\n* Standard Schema compatibility utilities\n*\n* This module provides utilities to apply provider-specific schema transformations\n* to StandardSchemaWithJSON types, particularly for OpenAI compatibility.\n*/\n/**\n* Extracts the underlying Zod schema from a schema value.\n*\n* Handles both:\n* - Raw Zod schemas (z.object(...))\n* - StandardSchemaWithJSON wrappers that preserve Zod methods via prototype\n*\n* @param schema - The schema to extract from\n* @returns The underlying Zod schema, or null if not a Zod schema\n*/\nfunction extractZodSchema(schema) {\n\tif (!isZodType(schema)) return null;\n\treturn schema;\n}\n/**\n* Applies OpenAI schema compatibility transforms to a schema.\n*\n* For OpenAI models, converts `.optional()` fields to `.nullable().transform()`\n* to work around OpenAI's limitation with optional fields in structured outputs.\n*\n* @param schema - The schema to process (raw Zod or StandardSchemaWithJSON)\n* @param modelInfo - Information about the target model\n* @returns The processed schema as StandardSchemaWithJSON, or original if not applicable\n*\n* @example\n* ```typescript\n* const schema = z.object({\n*   name: z.string(),\n*   age: z.number().optional(), // Will be converted to .nullable().transform()\n* });\n*\n* const processed = applyOpenAICompatTransforms(schema, {\n*   provider: 'openai',\n*   modelId: 'gpt-4',\n*   supportsStructuredOutputs: false,\n* });\n* ```\n*/\nfunction applyOpenAICompatTransforms(schema, modelInfo) {\n\tif (!(modelInfo.provider?.includes(\"openai\") || modelInfo.modelId?.includes(\"openai\"))) return schema;\n\tconst zodSchema = extractZodSchema(schema);\n\tif (!zodSchema) return schema;\n\tconst compatLayer = /^o[1-5]/.test(modelInfo.modelId) ? new OpenAIReasoningSchemaCompatLayer(modelInfo) : new OpenAISchemaCompatLayer(modelInfo);\n\tif (!compatLayer.shouldApply()) return schema;\n\treturn toStandardSchema(compatLayer.processZodType(zodSchema));\n}\n/**\n* Applies OpenAI compat transforms to all tools in a toolset.\n*\n* Processes each tool's inputSchema (if present) with OpenAI compatibility transforms.\n*\n* @param tools - The toolset to process\n* @param modelInfo - Information about the target model\n* @returns The processed toolset with transformed schemas\n*\n* @example\n* ```typescript\n* const tools = {\n*   getTodo: {\n*     inputSchema: z.object({\n*       id: z.string(),\n*       includeCompleted: z.boolean().optional(), // Will be transformed\n*     }),\n*     execute: async (input) => { ... },\n*   },\n* };\n*\n* const processed = applyOpenAICompatToTools(tools, {\n*   provider: 'openai',\n*   modelId: 'gpt-4',\n*   supportsStructuredOutputs: false,\n* });\n* ```\n*/\nfunction applyOpenAICompatToTools(tools, modelInfo) {\n\tif (!tools) return tools;\n\tconst transformedTools = {};\n\tfor (const [name, tool] of Object.entries(tools)) if (tool.inputSchema) {\n\t\tconst processedSchema = applyOpenAICompatTransforms(tool.inputSchema, modelInfo);\n\t\ttransformedTools[name] = {\n\t\t\t...tool,\n\t\t\tinputSchema: processedSchema\n\t\t};\n\t} else transformedTools[name] = tool;\n\treturn transformedTools;\n}\n//#endregion\n//#region src/provider-compats/anthropic.ts\nvar AnthropicSchemaCompatLayer = class extends SchemaCompatLayer {\n\tconstructor(model) {\n\t\tsuper(model);\n\t}\n\tgetSchemaTarget() {\n\t\treturn \"jsonSchema7\";\n\t}\n\tprocessToJSONSchema(schema, io = \"input\") {\n\t\tconst jsonSchema = super.processToJSONSchema(schema, io);\n\t\tconst union = jsonSchema.anyOf ?? jsonSchema.oneOf;\n\t\tif (io !== \"input\" || !Array.isArray(union)) return jsonSchema;\n\t\tconst objectSchemas = union.filter((subSchema) => typeof subSchema === \"object\" && subSchema !== null && subSchema.type === \"object\");\n\t\tif (objectSchemas.length === 0 || objectSchemas.length !== union.length) return jsonSchema;\n\t\tdelete jsonSchema.anyOf;\n\t\tdelete jsonSchema.oneOf;\n\t\tjsonSchema.type = \"object\";\n\t\tconst mergedProperties = {};\n\t\tfor (const subSchema of objectSchemas) for (const [key, propSchema] of Object.entries(subSchema.properties ?? {})) {\n\t\t\tconst variants = mergedProperties[key] ??= [];\n\t\t\tif (!variants.some((existing) => JSON.stringify(existing) === JSON.stringify(propSchema))) variants.push(propSchema);\n\t\t}\n\t\tjsonSchema.properties = Object.fromEntries(Object.entries(mergedProperties).map(([key, variants]) => [key, variants.length === 1 ? variants[0] : { anyOf: variants }]));\n\t\tjsonSchema.required = objectSchemas.map((subSchema) => subSchema.required ?? []).reduce((required, branchRequired) => required.filter((key) => branchRequired.includes(key)));\n\t\tjsonSchema.additionalProperties = false;\n\t\treturn jsonSchema;\n\t}\n\tshouldApply() {\n\t\treturn this.getModel().modelId.includes(\"claude\");\n\t}\n\tprocessZodType(value) {\n\t\tif (this.isOptional(value)) {\n\t\t\tconst handleTypes = [\n\t\t\t\t\"ZodObject\",\n\t\t\t\t\"ZodArray\",\n\t\t\t\t\"ZodUnion\",\n\t\t\t\t\"ZodNever\",\n\t\t\t\t\"ZodUndefined\",\n\t\t\t\t\"ZodTuple\"\n\t\t\t];\n\t\t\tif (this.getModel().modelId.includes(\"claude-3.5-haiku\")) handleTypes.push(\"ZodString\");\n\t\t\treturn this.defaultZodOptionalHandler(value, handleTypes);\n\t\t} else if (this.isObj(value)) return this.defaultZodObjectHandler(value);\n\t\telse if (this.isArr(value)) return this.defaultZodArrayHandler(value, []);\n\t\telse if (this.isUnion(value)) return this.defaultZodUnionHandler(value);\n\t\telse if (this.isString(value)) if (this.getModel().modelId.includes(\"claude-3.5-haiku\")) return this.defaultZodStringHandler(value, [\"max\", \"min\"]);\n\t\telse return value;\n\t\telse if (isNull(z$1)(value)) return z$1.any().refine((v) => v === null, { message: \"must be null\" }).describe(value.description || \"must be null\");\n\t\telse if (isIntersection(z$1)(value)) return this.defaultZodIntersectionHandler(value);\n\t\treturn this.defaultUnsupportedZodTypeHandler(value);\n\t}\n\tprocessToAISDKSchema(zodSchema) {\n\t\tconst compat = this.processToCompatSchema(zodSchema);\n\t\treturn jsonSchema(standardSchemaToJSONSchema(compat), { validate: (value) => {\n\t\t\tconst result = compat[\"~standard\"].validate(value);\n\t\t\tif (result instanceof Promise) throw new Error(\"Async validation is not supported\");\n\t\t\treturn \"issues\" in result && result.issues ? {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: new Error(result.issues.map((i) => i.message).join(\", \"))\n\t\t\t} : {\n\t\t\t\tsuccess: true,\n\t\t\t\tvalue: result.value\n\t\t\t};\n\t\t} });\n\t}\n\tprocessToCompatSchema(schema) {\n\t\tconst originalStandardSchema = toStandardSchema(schema);\n\t\tconst validationStandardSchema = this.#getCompatValidationStandardSchema(schema, originalStandardSchema);\n\t\treturn { \"~standard\": {\n\t\t\tversion: 1,\n\t\t\tvendor: \"mastra\",\n\t\t\tvalidate: (value) => {\n\t\t\t\tconst transformedJsonSchema = this.processToJSONSchema(schema, \"input\");\n\t\t\t\tconst transformed = this.#traverse(value, transformedJsonSchema);\n\t\t\t\treturn validationStandardSchema[\"~standard\"].validate(transformed);\n\t\t\t},\n\t\t\tjsonSchema: {\n\t\t\t\tinput: () => {\n\t\t\t\t\treturn this.processToJSONSchema(schema, \"input\");\n\t\t\t\t},\n\t\t\t\toutput: () => {\n\t\t\t\t\treturn this.processToJSONSchema(schema, \"output\");\n\t\t\t\t}\n\t\t\t}\n\t\t} };\n\t}\n\tpreProcessJSONNode(schema) {\n\t\tif (isAllOfSchema(schema)) this.defaultAllOfHandler(schema);\n\t\tif (isObjectSchema(schema)) this.defaultObjectHandler(schema);\n\t\telse if (isArraySchema(schema)) this.defaultArrayHandler(schema);\n\t\telse if (isNumberSchema(schema)) this.defaultNumberHandler(schema);\n\t\telse if (isStringSchema(schema)) this.defaultStringHandler(schema);\n\t}\n\tpostProcessJSONNode(schema) {\n\t\tif (isUnionSchema(schema)) this.defaultUnionHandler(schema);\n\t}\n\t#traverse(value, schema) {\n\t\tconst resolved = this.#resolveSchemaForValue(schema, value);\n\t\tif (resolved[\"x-date\"] === true && typeof value === \"string\") return new Date(value);\n\t\tif (resolved.type === \"array\" || Array.isArray(resolved.type) && resolved.type.includes(\"array\")) {\n\t\t\tif (!Array.isArray(value)) return value;\n\t\t\treturn value.map((item) => this.#traverse(item, resolved.items));\n\t\t}\n\t\tif (!(resolved.type === \"object\" || Array.isArray(resolved.type) && resolved.type.includes(\"object\"))) return value;\n\t\tconst properties = resolved.properties;\n\t\tif (!properties || !value) return value;\n\t\tconst obj = value;\n\t\tfor (const key in obj) if (properties[key]) obj[key] = this.#traverse(obj[key], properties[key]);\n\t\treturn obj;\n\t}\n\t#isHaikuModel() {\n\t\treturn this.getModel().modelId.includes(\"claude-3.5-haiku\");\n\t}\n\t#getCompatValidationStandardSchema(schema, originalStandardSchema) {\n\t\tif (!this.#isHaikuModel() || !isZodType(schema)) return originalStandardSchema;\n\t\treturn toStandardSchema(this.#stripHaikuStringLengthConstraints(schema));\n\t}\n\t/**\n\t* Strip Haiku-ignored string min/max from a Zod schema for execute-time validation.\n\t* Preserves object-level refinements and wrapper semantics unlike full-tree processZodType.\n\t*/\n\t#stripHaikuStringLengthConstraints(value) {\n\t\tconst schemas = /* @__PURE__ */ new WeakMap();\n\t\tif (\"_zod\" in value) return this.#stripHaikuStringLengthConstraintsV4(value, schemas);\n\t\treturn this.#stripHaikuStringLengthConstraintsV3(value, schemas);\n\t}\n\t#stripHaikuStringLengthConstraintsV4(value, schemas) {\n\t\tconst cached = schemas.get(value);\n\t\tif (cached) return cached;\n\t\tconst schema = value;\n\t\tconst def = schema._zod.def;\n\t\tconst strip = (child) => this.#stripHaikuStringLengthConstraintsV4(child, schemas);\n\t\tlet nextDef = def;\n\t\tconst replace = (key) => {\n\t\t\tconst current = def[key];\n\t\t\tif (!current) return;\n\t\t\tconst stripped = strip(current);\n\t\t\tif (stripped !== current) nextDef = {\n\t\t\t\t...nextDef,\n\t\t\t\t[key]: stripped\n\t\t\t};\n\t\t};\n\t\tswitch (def.type) {\n\t\t\tcase \"string\": {\n\t\t\t\tconst checks = (def.checks ?? []).filter((check) => check._zod.def.check !== \"min_length\" && check._zod.def.check !== \"max_length\");\n\t\t\t\tif (checks.length !== (def.checks?.length ?? 0)) nextDef = {\n\t\t\t\t\t...def,\n\t\t\t\t\tchecks\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"object\": {\n\t\t\t\tconst shape = def.shape;\n\t\t\t\tconst nextShape = Object.fromEntries(Object.entries(shape).map(([key, child]) => [key, strip(child)]));\n\t\t\t\tif (Object.keys(shape).some((key) => nextShape[key] !== shape[key])) nextDef = {\n\t\t\t\t\t...nextDef,\n\t\t\t\t\tshape: nextShape\n\t\t\t\t};\n\t\t\t\treplace(\"catchall\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"array\":\n\t\t\t\treplace(\"element\");\n\t\t\t\tbreak;\n\t\t\tcase \"union\": {\n\t\t\t\tconst options = def.options;\n\t\t\t\tconst nextOptions = options.map(strip);\n\t\t\t\tif (nextOptions.some((option, index) => option !== options[index])) nextDef = {\n\t\t\t\t\t...nextDef,\n\t\t\t\t\toptions: nextOptions\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"intersection\":\n\t\t\t\treplace(\"left\");\n\t\t\t\treplace(\"right\");\n\t\t\t\tbreak;\n\t\t\tcase \"tuple\": {\n\t\t\t\tconst items = def.items;\n\t\t\t\tconst nextItems = items.map(strip);\n\t\t\t\tif (nextItems.some((item, index) => item !== items[index])) nextDef = {\n\t\t\t\t\t...nextDef,\n\t\t\t\t\titems: nextItems\n\t\t\t\t};\n\t\t\t\treplace(\"rest\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"record\":\n\t\t\tcase \"map\":\n\t\t\t\treplace(\"keyType\");\n\t\t\t\treplace(\"valueType\");\n\t\t\t\tbreak;\n\t\t\tcase \"set\":\n\t\t\t\treplace(\"valueType\");\n\t\t\t\tbreak;\n\t\t\tcase \"optional\":\n\t\t\tcase \"nullable\":\n\t\t\tcase \"default\":\n\t\t\tcase \"prefault\":\n\t\t\tcase \"nonoptional\":\n\t\t\tcase \"success\":\n\t\t\tcase \"catch\":\n\t\t\tcase \"readonly\":\n\t\t\t\treplace(\"innerType\");\n\t\t\t\tbreak;\n\t\t\tcase \"pipe\":\n\t\t\t\treplace(\"in\");\n\t\t\t\treplace(\"out\");\n\t\t\t\tbreak;\n\t\t\tcase \"promise\":\n\t\t\t\treplace(\"innerType\");\n\t\t\t\tbreak;\n\t\t\tcase \"lazy\":\n\t\t\t\tnextDef = {\n\t\t\t\t\t...def,\n\t\t\t\t\tgetter: () => strip(def.getter())\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t}\n\t\tif (nextDef === def) {\n\t\t\tschemas.set(value, value);\n\t\t\treturn value;\n\t\t}\n\t\tlet stripped = schema.clone(nextDef);\n\t\tconst metadata = schema.meta();\n\t\tif (metadata) stripped = stripped.meta(metadata);\n\t\tschemas.set(value, stripped);\n\t\treturn stripped;\n\t}\n\t#stripHaikuStringLengthConstraintsV3(value, schemas) {\n\t\tconst cached = schemas.get(value);\n\t\tif (cached) return cached;\n\t\tconst schema = value;\n\t\tconst def = schema._def;\n\t\tconst strip = (child) => this.#stripHaikuStringLengthConstraintsV3(child, schemas);\n\t\tlet nextDef = def;\n\t\tconst replace = (key) => {\n\t\t\tconst current = def[key];\n\t\t\tif (!current) return;\n\t\t\tconst stripped = strip(current);\n\t\t\tif (stripped !== current) nextDef = {\n\t\t\t\t...nextDef,\n\t\t\t\t[key]: stripped\n\t\t\t};\n\t\t};\n\t\tswitch (def.typeName) {\n\t\t\tcase \"ZodString\": {\n\t\t\t\tconst checks = (def.checks ?? []).filter((check) => check.kind !== \"min\" && check.kind !== \"max\");\n\t\t\t\tif (checks.length !== (def.checks?.length ?? 0)) nextDef = {\n\t\t\t\t\t...def,\n\t\t\t\t\tchecks\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"ZodObject\": {\n\t\t\t\tconst shape = def.shape();\n\t\t\t\tconst nextShape = Object.fromEntries(Object.entries(shape).map(([key, child]) => [key, strip(child)]));\n\t\t\t\tif (Object.keys(shape).some((key) => nextShape[key] !== shape[key])) nextDef = {\n\t\t\t\t\t...nextDef,\n\t\t\t\t\tshape: () => nextShape\n\t\t\t\t};\n\t\t\t\treplace(\"catchall\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"ZodArray\":\n\t\t\tcase \"ZodPromise\":\n\t\t\tcase \"ZodBranded\":\n\t\t\t\treplace(\"type\");\n\t\t\t\tbreak;\n\t\t\tcase \"ZodUnion\": {\n\t\t\t\tconst options = def.options;\n\t\t\t\tconst nextOptions = options.map(strip);\n\t\t\t\tif (nextOptions.some((option, index) => option !== options[index])) nextDef = {\n\t\t\t\t\t...nextDef,\n\t\t\t\t\toptions: nextOptions\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"ZodDiscriminatedUnion\": {\n\t\t\t\tconst options = def.options;\n\t\t\t\tconst nextOptions = options.map(strip);\n\t\t\t\tif (nextOptions.some((option, index) => option !== options[index])) {\n\t\t\t\t\tconst optionsMap = new Map(def.optionsMap);\n\t\t\t\t\tfor (const [key, option] of optionsMap) {\n\t\t\t\t\t\tconst index = options.indexOf(option);\n\t\t\t\t\t\tif (index !== -1) optionsMap.set(key, nextOptions[index]);\n\t\t\t\t\t}\n\t\t\t\t\tnextDef = {\n\t\t\t\t\t\t...nextDef,\n\t\t\t\t\t\toptions: nextOptions,\n\t\t\t\t\t\toptionsMap\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"ZodIntersection\":\n\t\t\t\treplace(\"left\");\n\t\t\t\treplace(\"right\");\n\t\t\t\tbreak;\n\t\t\tcase \"ZodTuple\": {\n\t\t\t\tconst items = def.items;\n\t\t\t\tconst nextItems = items.map(strip);\n\t\t\t\tif (nextItems.some((item, index) => item !== items[index])) nextDef = {\n\t\t\t\t\t...nextDef,\n\t\t\t\t\titems: nextItems\n\t\t\t\t};\n\t\t\t\treplace(\"rest\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"ZodRecord\":\n\t\t\tcase \"ZodMap\":\n\t\t\t\treplace(\"keyType\");\n\t\t\t\treplace(\"valueType\");\n\t\t\t\tbreak;\n\t\t\tcase \"ZodSet\":\n\t\t\t\treplace(\"valueType\");\n\t\t\t\tbreak;\n\t\t\tcase \"ZodOptional\":\n\t\t\tcase \"ZodNullable\":\n\t\t\tcase \"ZodDefault\":\n\t\t\tcase \"ZodCatch\":\n\t\t\tcase \"ZodReadonly\":\n\t\t\t\treplace(\"innerType\");\n\t\t\t\tbreak;\n\t\t\tcase \"ZodEffects\":\n\t\t\t\treplace(\"schema\");\n\t\t\t\tbreak;\n\t\t\tcase \"ZodPipeline\":\n\t\t\t\treplace(\"in\");\n\t\t\t\treplace(\"out\");\n\t\t\t\tbreak;\n\t\t\tcase \"ZodLazy\":\n\t\t\t\tnextDef = {\n\t\t\t\t\t...def,\n\t\t\t\t\tgetter: () => strip(def.getter())\n\t\t\t\t};\n\t\t\t\tbreak;\n\t\t}\n\t\tif (nextDef === def) {\n\t\t\tschemas.set(value, value);\n\t\t\treturn value;\n\t\t}\n\t\tconst stripped = new schema.constructor(nextDef);\n\t\tschemas.set(value, stripped);\n\t\treturn stripped;\n\t}\n\t#resolveSchemaForValue(schema, value) {\n\t\tif (!Array.isArray(schema.anyOf)) return schema;\n\t\tconst variants = schema.anyOf;\n\t\tconst nonNullVariants = variants.filter((variant) => variant.type !== \"null\");\n\t\tif (variants.length === 2 && nonNullVariants.length === 1) return nonNullVariants[0];\n\t\tconst keys = value && typeof value === \"object\" ? Object.keys(value) : [];\n\t\treturn nonNullVariants.find((variant) => {\n\t\t\tconst properties = variant.properties;\n\t\t\treturn !!properties && keys.some((key) => key in properties);\n\t\t}) ?? schema;\n\t}\n};\n//#endregion\n//#region src/provider-compats/deepseek.ts\nvar DeepSeekSchemaCompatLayer = class extends SchemaCompatLayer {\n\tconstructor(model) {\n\t\tsuper(model);\n\t}\n\tgetSchemaTarget() {\n\t\treturn \"jsonSchema7\";\n\t}\n\tshouldApply() {\n\t\treturn this.getModel().modelId.includes(\"deepseek\") && !this.getModel().modelId.includes(\"r1\");\n\t}\n\tprocessZodType(value) {\n\t\tif (isOptional$1(z$1)(value)) return this.defaultZodOptionalHandler(value, [\n\t\t\t\"ZodObject\",\n\t\t\t\"ZodArray\",\n\t\t\t\"ZodUnion\",\n\t\t\t\"ZodString\",\n\t\t\t\"ZodNumber\"\n\t\t]);\n\t\telse if (isObj$1(z$1)(value)) return this.defaultZodObjectHandler(value);\n\t\telse if (isArr$1(z$1)(value)) return this.defaultZodArrayHandler(value, [\"min\", \"max\"]);\n\t\telse if (isUnion$1(z$1)(value)) return this.defaultZodUnionHandler(value);\n\t\telse if (isString$1(z$1)(value)) return this.defaultZodStringHandler(value);\n\t\telse if (isIntersection(z$1)(value)) return this.defaultZodIntersectionHandler(value);\n\t\treturn value;\n\t}\n\tprocessToAISDKSchema(zodSchema) {\n\t\tconst transformedJsonSchema = standardSchemaToJSONSchema(this.processToCompatSchema(zodSchema));\n\t\treturn jsonSchema(transformedJsonSchema, { validate: (value) => {\n\t\t\tconst transformed = this.#traverse(value, transformedJsonSchema);\n\t\t\tconst result = zodSchema.safeParse(transformed);\n\t\t\treturn result.success ? {\n\t\t\t\tsuccess: true,\n\t\t\t\tvalue: result.data\n\t\t\t} : {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: result.error\n\t\t\t};\n\t\t} });\n\t}\n\tprocessToCompatSchema(schema) {\n\t\tconst originalStandardSchema = toStandardSchema(schema);\n\t\treturn { \"~standard\": {\n\t\t\tversion: 1,\n\t\t\tvendor: \"mastra\",\n\t\t\tvalidate: (value) => {\n\t\t\t\tconst transformedJsonSchema = this.processToJSONSchema(schema, \"input\");\n\t\t\t\tconst transformed = this.#traverse(value, transformedJsonSchema);\n\t\t\t\treturn originalStandardSchema[\"~standard\"].validate(transformed);\n\t\t\t},\n\t\t\tjsonSchema: {\n\t\t\t\tinput: () => {\n\t\t\t\t\treturn this.processToJSONSchema(schema, \"input\");\n\t\t\t\t},\n\t\t\t\toutput: () => {\n\t\t\t\t\treturn this.processToJSONSchema(schema, \"output\");\n\t\t\t\t}\n\t\t\t}\n\t\t} };\n\t}\n\tpreProcessJSONNode(schema) {\n\t\tif (isAllOfSchema(schema)) this.defaultAllOfHandler(schema);\n\t\tif (isObjectSchema(schema)) this.defaultObjectHandler(schema);\n\t\telse if (isArraySchema(schema)) this.defaultArrayHandler(schema);\n\t\telse if (isNumberSchema(schema)) this.defaultNumberHandler(schema);\n\t\telse if (isStringSchema(schema)) this.defaultStringHandler(schema);\n\t}\n\tpostProcessJSONNode(schema) {\n\t\tif (isUnionSchema(schema)) this.defaultUnionHandler(schema);\n\t}\n\t#traverse(value, schema) {\n\t\tconst resolved = this.#resolveAnyOf(schema);\n\t\tif (resolved[\"x-date\"] === true && typeof value === \"string\") return new Date(value);\n\t\tif (resolved.type === \"array\" || Array.isArray(resolved.type) && resolved.type.includes(\"array\")) {\n\t\t\tif (!Array.isArray(value)) return value;\n\t\t\treturn value.map((item) => this.#traverse(item, resolved.items));\n\t\t}\n\t\tif (!(resolved.type === \"object\" || Array.isArray(resolved.type) && resolved.type.includes(\"object\"))) return value;\n\t\tconst properties = resolved.properties;\n\t\tif (!properties || !value) return value;\n\t\tconst obj = value;\n\t\tfor (const key in obj) if (properties[key]) obj[key] = this.#traverse(obj[key], properties[key]);\n\t\treturn obj;\n\t}\n\t#resolveAnyOf(schema) {\n\t\tif (Array.isArray(schema.anyOf)) {\n\t\t\tconst nonNull = schema.anyOf.find((s) => s.type !== \"null\");\n\t\t\tif (nonNull) return nonNull;\n\t\t}\n\t\treturn schema;\n\t}\n};\n//#endregion\n//#region src/provider-compats/google.ts\nfunction fixAISDKNullableUnionTypes(schema) {\n\tif (typeof schema !== \"object\" || schema === null) return schema;\n\tconst result = { ...schema };\n\tif (Array.isArray(result.type)) {\n\t\tconst nonNullTypes = result.type.filter((t) => t !== \"null\");\n\t\tif (nonNullTypes.length === 1) {\n\t\t\tresult.type = nonNullTypes[0];\n\t\t\tresult.nullable = true;\n\t\t} else {\n\t\t\tdelete result.type;\n\t\t\tdelete result.nullable;\n\t\t}\n\t}\n\tif (Array.isArray(result.enum) && result.enum.some((value) => typeof value !== \"string\")) delete result.enum;\n\tif (\"const\" in result && typeof result.const !== \"string\") delete result.const;\n\tif (result.anyOf && Array.isArray(result.anyOf)) {\n\t\tconst nullSchema = result.anyOf.find((s) => typeof s === \"object\" && s !== null && s.type === \"null\");\n\t\tconst nonNullSchemas = result.anyOf.filter((s) => !(typeof s === \"object\" && s !== null && s.type === \"null\"));\n\t\tif (nullSchema) {\n\t\t\tconst { anyOf: _, ...rest } = result;\n\t\t\tif (nonNullSchemas.length === 1 && typeof nonNullSchemas[0] === \"object\" && nonNullSchemas[0] !== null) {\n\t\t\t\tconst fixedOther = fixAISDKNullableUnionTypes(nonNullSchemas[0]);\n\t\t\t\treturn fixedOther.type ? {\n\t\t\t\t\t...rest,\n\t\t\t\t\t...fixedOther,\n\t\t\t\t\tnullable: true\n\t\t\t\t} : {\n\t\t\t\t\t...rest,\n\t\t\t\t\t...fixedOther\n\t\t\t\t};\n\t\t\t}\n\t\t\treturn rest;\n\t\t}\n\t}\n\tif (result.properties && typeof result.properties === \"object\") result.properties = Object.fromEntries(Object.entries(result.properties).map(([key, value]) => [key, fixAISDKNullableUnionTypes(value)]));\n\tif (result.items) if (Array.isArray(result.items)) result.items = result.items.map((item) => fixAISDKNullableUnionTypes(item));\n\telse result.items = fixAISDKNullableUnionTypes(result.items);\n\tif (result.additionalProperties && typeof result.additionalProperties === \"object\") result.additionalProperties = fixAISDKNullableUnionTypes(result.additionalProperties);\n\tif (result.anyOf && Array.isArray(result.anyOf)) result.anyOf = result.anyOf.map((s) => fixAISDKNullableUnionTypes(s));\n\tif (result.oneOf && Array.isArray(result.oneOf)) result.oneOf = result.oneOf.map((s) => fixAISDKNullableUnionTypes(s));\n\tif (result.allOf && Array.isArray(result.allOf)) result.allOf = result.allOf.map((s) => fixAISDKNullableUnionTypes(s));\n\tif (result.anyOf && Array.isArray(result.anyOf)) {\n\t\tif (result.description) {\n\t\t\tfor (const item of result.anyOf) if (typeof item === \"object\" && item !== null && !item.description) item.description = result.description;\n\t\t}\n\t\treturn { anyOf: result.anyOf };\n\t}\n\treturn result;\n}\n/**\n* Inline `$ref` pointers one level and drop `definitions`/`$defs`.\n* Gemini can't follow JSON Schema `$ref`s — they cause silent mis-fills.\n* Self-references (recursive schemas) are collapsed to `{ type: 'object' }`\n* to avoid infinite expansion.\n*/\nfunction inlineRefsAndDropDefinitions(schema) {\n\tconst json = JSON.stringify(schema);\n\tif (!json.includes(\"\\\"$ref\\\"\")) return;\n\tconst defs = schema[\"definitions\"] ?? schema[\"$defs\"];\n\tconst snapshot = JSON.parse(json);\n\tresolveRefs(schema, snapshot, snapshot[\"definitions\"] ?? snapshot[\"$defs\"] ?? defs ?? {}, /* @__PURE__ */ new Set());\n\tdelete schema[\"definitions\"];\n\tdelete schema[\"$defs\"];\n}\nfunction resolveRefs(node, rootSnapshot, defs, visiting) {\n\tif (typeof node !== \"object\" || node === null) return;\n\tfor (const [key, value] of Object.entries(node)) if (key === \"$ref\" && typeof value === \"string\") {\n\t\tconst resolved = resolveRef(value, rootSnapshot, defs);\n\t\tif (!resolved || visiting.has(value)) {\n\t\t\tdelete node[\"$ref\"];\n\t\t\tnode[\"type\"] = \"object\";\n\t\t} else {\n\t\t\tdelete node[\"$ref\"];\n\t\t\tvisiting.add(value);\n\t\t\tconst clone = JSON.parse(JSON.stringify(resolved));\n\t\t\tresolveRefs(clone, rootSnapshot, defs, visiting);\n\t\t\tvisiting.delete(value);\n\t\t\tObject.assign(node, clone);\n\t\t}\n\t} else if (Array.isArray(value)) {\n\t\tfor (const item of value) if (typeof item === \"object\" && item !== null) resolveRefs(item, rootSnapshot, defs, visiting);\n\t} else if (typeof value === \"object\" && value !== null) resolveRefs(value, rootSnapshot, defs, visiting);\n}\nfunction resolveRef(ref, rootSnapshot, defs) {\n\tif (ref === \"#\") return rootSnapshot;\n\tconst match = ref.match(/^#\\/(?:definitions|\\$defs)\\/(.+)$/);\n\tif (match) return defs[match[1]];\n}\nvar GoogleSchemaCompatLayer = class extends SchemaCompatLayer {\n\tconstructor(model) {\n\t\tsuper(model);\n\t}\n\tgetSchemaTarget() {\n\t\treturn \"jsonSchema7\";\n\t}\n\tshouldApply() {\n\t\tif (this.getModel().modelId.includes(\"claude\")) return false;\n\t\treturn this.getModel().provider.includes(\"google\") || this.getModel().modelId.includes(\"gemini-\") || this.getModel().modelId.includes(\"google\");\n\t}\n\tprocessZodType(value) {\n\t\tif (isOptional$1(z$1)(value)) return this.defaultZodOptionalHandler(value, [\n\t\t\t\"ZodObject\",\n\t\t\t\"ZodArray\",\n\t\t\t\"ZodUnion\",\n\t\t\t\"ZodString\",\n\t\t\t\"ZodNumber\",\n\t\t\t\"ZodNullable\"\n\t\t]);\n\t\telse if (isNullable(z$1)(value)) return this.defaultZodNullableHandler(value);\n\t\telse if (isNull(z$1)(value)) return z$1.any().refine((v) => v === null, { message: \"must be null\" }).describe(value.description || \"must be null\");\n\t\telse if (isObj$1(z$1)(value)) return this.defaultZodObjectHandler(value);\n\t\telse if (isArr$1(z$1)(value)) return this.defaultZodArrayHandler(value, []);\n\t\telse if (isUnion$1(z$1)(value)) return this.defaultZodUnionHandler(value);\n\t\telse if (isString$1(z$1)(value)) return this.defaultZodStringHandler(value);\n\t\telse if (isNumber$1(z$1)(value)) return this.defaultZodNumberHandler(value);\n\t\telse if (isIntersection(z$1)(value)) return this.defaultZodIntersectionHandler(value);\n\t\treturn this.defaultUnsupportedZodTypeHandler(value);\n\t}\n\tprocessToJSONSchema(schema, io) {\n\t\tconst result = super.processToJSONSchema(schema, io);\n\t\tinlineRefsAndDropDefinitions(result);\n\t\treturn result;\n\t}\n\tprocessToAISDKSchema(zodSchema) {\n\t\tconst fixedJsonSchema = fixAISDKNullableUnionTypes(standardSchemaToJSONSchema(this.processToCompatSchema(zodSchema)));\n\t\treturn jsonSchema(fixedJsonSchema, { validate: (value) => {\n\t\t\tconst transformed = this.#traverse(value, fixedJsonSchema);\n\t\t\tconst result = zodSchema.safeParse(transformed);\n\t\t\treturn result.success ? {\n\t\t\t\tsuccess: true,\n\t\t\t\tvalue: result.data\n\t\t\t} : {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: result.error\n\t\t\t};\n\t\t} });\n\t}\n\tprocessToCompatSchema(schema) {\n\t\tconst originalStandardSchema = toStandardSchema(schema);\n\t\treturn { \"~standard\": {\n\t\t\tversion: 1,\n\t\t\tvendor: \"mastra\",\n\t\t\tvalidate: (value) => {\n\t\t\t\tconst transformedJsonSchema = this.processToJSONSchema(schema, \"input\");\n\t\t\t\tconst transformed = this.#traverse(value, transformedJsonSchema);\n\t\t\t\treturn originalStandardSchema[\"~standard\"].validate(transformed);\n\t\t\t},\n\t\t\tjsonSchema: {\n\t\t\t\tinput: () => {\n\t\t\t\t\treturn this.processToJSONSchema(schema, \"input\");\n\t\t\t\t},\n\t\t\t\toutput: () => {\n\t\t\t\t\treturn this.processToJSONSchema(schema, \"output\");\n\t\t\t\t}\n\t\t\t}\n\t\t} };\n\t}\n\tpreProcessJSONNode(schema) {\n\t\tif (isAllOfSchema(schema)) this.defaultAllOfHandler(schema);\n\t\tif (isObjectSchema(schema)) this.defaultObjectHandler(schema);\n\t\telse if (isNumberSchema(schema)) this.defaultNumberHandler(schema);\n\t\telse if (isArraySchema(schema)) this.defaultArrayHandler(schema);\n\t\telse if (isStringSchema(schema)) this.defaultStringHandler(schema);\n\t}\n\tpostProcessJSONNode(schema) {\n\t\tif (isUnionSchema(schema)) this.defaultUnionHandler(schema);\n\t\tconst s = schema;\n\t\tdelete s[\"$schema\"];\n\t\tdelete s[\"additionalProperties\"];\n\t\tdelete s[\"propertyNames\"];\n\t\tif (Array.isArray(s[\"type\"])) {\n\t\t\tconst types = s[\"type\"];\n\t\t\tconst nonNull = types.filter((t) => t !== \"null\");\n\t\t\tconst hasNull = types.includes(\"null\");\n\t\t\tif (nonNull.length === 1) {\n\t\t\t\ts[\"type\"] = nonNull[0];\n\t\t\t\tif (hasNull) s[\"nullable\"] = true;\n\t\t\t} else if (nonNull.length === 0 && hasNull) {\n\t\t\t\ts[\"type\"] = \"object\";\n\t\t\t\ts[\"nullable\"] = true;\n\t\t\t} else {\n\t\t\t\tdelete s[\"type\"];\n\t\t\t\ts[\"anyOf\"] = nonNull.map((t) => ({ type: t }));\n\t\t\t\tif (hasNull) s[\"nullable\"] = true;\n\t\t\t}\n\t\t}\n\t\tif (Array.isArray(s[\"oneOf\"])) {\n\t\t\ts[\"anyOf\"] = s[\"oneOf\"];\n\t\t\tdelete s[\"oneOf\"];\n\t\t}\n\t\tif (\"const\" in s) {\n\t\t\ts[\"enum\"] = [s[\"const\"]];\n\t\t\tdelete s[\"const\"];\n\t\t}\n\t\tif (Array.isArray(s[\"items\"])) {\n\t\t\ts[\"items\"] = { anyOf: s[\"items\"] };\n\t\t\tdelete s[\"minItems\"];\n\t\t\tdelete s[\"maxItems\"];\n\t\t}\n\t\tif (Array.isArray(s[\"anyOf\"])) {\n\t\t\tconst variants = s[\"anyOf\"];\n\t\t\tconst nonNull = variants.filter((v) => v && typeof v === \"object\" && v[\"type\"] !== \"null\");\n\t\t\tconst hasNull = variants.some((v) => v && typeof v === \"object\" && v[\"type\"] === \"null\");\n\t\t\tif (hasNull && nonNull.length === 1) {\n\t\t\t\tconst base = nonNull[0];\n\t\t\t\tdelete s[\"anyOf\"];\n\t\t\t\tObject.assign(s, base);\n\t\t\t\ts[\"nullable\"] = true;\n\t\t\t} else if (hasNull && nonNull.length > 1) {\n\t\t\t\ts[\"anyOf\"] = nonNull;\n\t\t\t\ts[\"nullable\"] = true;\n\t\t\t}\n\t\t}\n\t\tif (!s[\"type\"] && !s[\"anyOf\"] && !s[\"oneOf\"] && !s[\"allOf\"] && !s[\"$ref\"] && !s[\"enum\"] && !s[\"const\"] && !s[\"properties\"] && !s[\"items\"]) {\n\t\t\ts[\"anyOf\"] = [...[\n\t\t\t\t\"string\",\n\t\t\t\t\"number\",\n\t\t\t\t\"integer\",\n\t\t\t\t\"boolean\",\n\t\t\t\t\"object\"\n\t\t\t].map((t) => ({ type: t })), {\n\t\t\t\ttype: \"array\",\n\t\t\t\titems: { anyOf: [\n\t\t\t\t\t\"string\",\n\t\t\t\t\t\"number\",\n\t\t\t\t\t\"integer\",\n\t\t\t\t\t\"boolean\",\n\t\t\t\t\t\"object\"\n\t\t\t\t].map((t) => ({ type: t })) }\n\t\t\t}];\n\t\t\ts[\"nullable\"] = true;\n\t\t}\n\t}\n\t#traverse(value, schema) {\n\t\tconst resolved = this.#resolveAnyOf(schema);\n\t\tif (resolved[\"x-date\"] === true && typeof value === \"string\") return new Date(value);\n\t\tif (resolved.type === \"array\" || Array.isArray(resolved.type) && resolved.type.includes(\"array\")) {\n\t\t\tif (!Array.isArray(value)) return value;\n\t\t\treturn value.map((item) => this.#traverse(item, resolved.items));\n\t\t}\n\t\tif (!(resolved.type === \"object\" || Array.isArray(resolved.type) && resolved.type.includes(\"object\"))) return value;\n\t\tconst properties = resolved.properties;\n\t\tif (!properties || !value) return value;\n\t\tconst obj = value;\n\t\tfor (const key in obj) if (properties[key]) obj[key] = this.#traverse(obj[key], properties[key]);\n\t\treturn obj;\n\t}\n\t#resolveAnyOf(schema) {\n\t\tif (Array.isArray(schema.anyOf)) {\n\t\t\tconst nonNull = schema.anyOf.find((s) => s.type !== \"null\");\n\t\t\tif (nonNull) return nonNull;\n\t\t}\n\t\treturn schema;\n\t}\n};\n//#endregion\n//#region src/provider-compats/meta.ts\nvar MetaSchemaCompatLayer = class extends SchemaCompatLayer {\n\tconstructor(model) {\n\t\tsuper(model);\n\t}\n\tgetSchemaTarget() {\n\t\treturn \"jsonSchema7\";\n\t}\n\tshouldApply() {\n\t\treturn this.getModel().modelId.includes(\"meta\");\n\t}\n\tprocessZodType(value) {\n\t\tif (isOptional$1(z$1)(value)) return this.defaultZodOptionalHandler(value, [\n\t\t\t\"ZodObject\",\n\t\t\t\"ZodArray\",\n\t\t\t\"ZodUnion\",\n\t\t\t\"ZodString\",\n\t\t\t\"ZodNumber\"\n\t\t]);\n\t\telse if (isObj$1(z$1)(value)) return this.defaultZodObjectHandler(value);\n\t\telse if (isArr$1(z$1)(value)) return this.defaultZodArrayHandler(value, [\"min\", \"max\"]);\n\t\telse if (isUnion$1(z$1)(value)) return this.defaultZodUnionHandler(value);\n\t\telse if (isNumber$1(z$1)(value)) return this.defaultZodNumberHandler(value);\n\t\telse if (isString$1(z$1)(value)) return this.defaultZodStringHandler(value);\n\t\telse if (isIntersection(z$1)(value)) return this.defaultZodIntersectionHandler(value);\n\t\treturn value;\n\t}\n\tprocessToAISDKSchema(zodSchema) {\n\t\tconst transformedJsonSchema = standardSchemaToJSONSchema(this.processToCompatSchema(zodSchema));\n\t\treturn jsonSchema(transformedJsonSchema, { validate: (value) => {\n\t\t\tconst transformed = this.#traverse(value, transformedJsonSchema);\n\t\t\tconst result = zodSchema.safeParse(transformed);\n\t\t\treturn result.success ? {\n\t\t\t\tsuccess: true,\n\t\t\t\tvalue: result.data\n\t\t\t} : {\n\t\t\t\tsuccess: false,\n\t\t\t\terror: result.error\n\t\t\t};\n\t\t} });\n\t}\n\tprocessToCompatSchema(schema) {\n\t\tconst originalStandardSchema = toStandardSchema(schema);\n\t\treturn { \"~standard\": {\n\t\t\tversion: 1,\n\t\t\tvendor: \"mastra\",\n\t\t\tvalidate: (value) => {\n\t\t\t\tconst transformedJsonSchema = this.processToJSONSchema(schema, \"input\");\n\t\t\t\tconst transformed = this.#traverse(value, transformedJsonSchema);\n\t\t\t\treturn originalStandardSchema[\"~standard\"].validate(transformed);\n\t\t\t},\n\t\t\tjsonSchema: {\n\t\t\t\tinput: () => {\n\t\t\t\t\treturn this.processToJSONSchema(schema, \"input\");\n\t\t\t\t},\n\t\t\t\toutput: () => {\n\t\t\t\t\treturn this.processToJSONSchema(schema, \"output\");\n\t\t\t\t}\n\t\t\t}\n\t\t} };\n\t}\n\tpreProcessJSONNode(schema) {\n\t\tif (isAllOfSchema(schema)) this.defaultAllOfHandler(schema);\n\t\tif (isObjectSchema(schema)) this.defaultObjectHandler(schema);\n\t\telse if (isArraySchema(schema)) this.defaultArrayHandler(schema);\n\t\telse if (isNumberSchema(schema)) this.defaultNumberHandler(schema);\n\t\telse if (isStringSchema(schema)) this.defaultStringHandler(schema);\n\t}\n\tpostProcessJSONNode(schema) {\n\t\tif (isUnionSchema(schema)) this.defaultUnionHandler(schema);\n\t}\n\t#traverse(value, schema) {\n\t\tconst resolved = this.#resolveAnyOf(schema);\n\t\tif (resolved[\"x-date\"] === true && typeof value === \"string\") return new Date(value);\n\t\tif (resolved.type === \"array\" || Array.isArray(resolved.type) && resolved.type.includes(\"array\")) {\n\t\t\tif (!Array.isArray(value)) return value;\n\t\t\treturn value.map((item) => this.#traverse(item, resolved.items));\n\t\t}\n\t\tif (!(resolved.type === \"object\" || Array.isArray(resolved.type) && resolved.type.includes(\"object\"))) return value;\n\t\tconst properties = resolved.properties;\n\t\tif (!properties || !value) return value;\n\t\tconst obj = value;\n\t\tfor (const key in obj) if (properties[key]) obj[key] = this.#traverse(obj[key], properties[key]);\n\t\treturn obj;\n\t}\n\t#resolveAnyOf(schema) {\n\t\tif (Array.isArray(schema.anyOf)) {\n\t\t\tconst nonNull = schema.anyOf.find((s) => s.type !== \"null\");\n\t\t\tif (nonNull) return nonNull;\n\t\t}\n\t\treturn schema;\n\t}\n};\n//#endregion\nexport { ALL_ARRAY_CHECKS, ALL_NUMBER_CHECKS, ALL_STRING_CHECKS, ALL_ZOD_TYPES, AnthropicSchemaCompatLayer, DeepSeekSchemaCompatLayer, GoogleSchemaCompatLayer, JSON_SCHEMA_LIBRARY_OPTIONS, MetaSchemaCompatLayer, OpenAIReasoningSchemaCompatLayer, OpenAISchemaCompatLayer, SUPPORTED_ZOD_TYPES, SchemaCompatLayer, SchemaCompatLayer$1 as SchemaCompatLayerV3, SchemaCompatLayer$2 as SchemaCompatLayerV4, UNSUPPORTED_ZOD_TYPES, applyCompatLayer, applyOpenAICompatToTools, applyOpenAICompatTransforms, convertSchemaToZod, convertZodSchemaToAISDKSchema, ensureAllPropertiesRequired, extractZodSchema, isArr, isNumber, isObj, isOptional, isStandardJSONSchema, isStandardSchema, isStandardSchemaWithJSON, isString, isUnion, isZodType, jsonSchema, prepareJsonSchemaForOpenAIStrictMode, standardSchemaToJSONSchema, toStandardSchema, wrapSchemaWithNullTransform };\n\n//# sourceMappingURL=index.js.map","export const JSON_SCHEMA_2020_12 = 'https://json-schema.org/draft/2020-12/schema';\n\nconst JSON_SCHEMA_2019_09 = /^https?:\\/\\/json-schema\\.org\\/draft\\/2019-09\\/schema#?$/;\n\n/** Keywords whose value is a subschema (`items` may also be an array of subschemas). */\nconst SCHEMA_KEYWORDS = new Set([\n  'items',\n  'additionalItems',\n  'contains',\n  'additionalProperties',\n  'propertyNames',\n  'unevaluatedItems',\n  'unevaluatedProperties',\n  'if',\n  'then',\n  'else',\n  'not',\n]);\n/** Keywords whose value is an array of subschemas. */\nconst SCHEMA_ARRAY_KEYWORDS = new Set(['allOf', 'anyOf', 'oneOf']);\n/** Keywords whose values map arbitrary names to subschemas. */\nconst SCHEMA_MAP_KEYWORDS = new Set(['properties', 'patternProperties', '$defs', 'definitions', 'dependentSchemas']);\n\n/** Complexity limits for untrusted schemas; also enforced by the client before validation. */\nexport const MAX_JSON_SCHEMA_DEPTH = 128;\nexport const MAX_JSON_SCHEMA_NODES = 10_000;\n\nclass Unconvertible extends Error {}\n\n/**\n * Converts a 2019-09 schema (e.g. from zod v3) into 2020-12 form. Tuples are the\n * only structural difference handled: array-form `items` becomes `prefixItems`,\n * and `additionalItems` becomes `items`.\n *\n * Returns `undefined` when the schema does not declare 2019-09, or relies on\n * features this conversion cannot preserve (`$recursiveRef`/`$recursiveAnchor`,\n * `$ref` pointers into tuple members, embedded `$schema` declarations,\n * `unevaluatedItems`, `prefixItems`, or `contentSchema`), or exceeds the depth/node limits.\n * Callers should then keep the original.\n */\nexport function toJsonSchema2020<T extends { $schema?: string }>(schema: T): T | undefined {\n  if (!schema.$schema || !JSON_SCHEMA_2019_09.test(schema.$schema)) return undefined;\n  try {\n    return { ...(rewrite(schema, 0, { nodes: 0 }, true) as T), $schema: JSON_SCHEMA_2020_12 };\n  } catch (error) {\n    if (error instanceof Unconvertible) return undefined;\n    throw error;\n  }\n}\n\nfunction checkBudget(depth: number, budget: { nodes: number }) {\n  if (depth > MAX_JSON_SCHEMA_DEPTH || ++budget.nodes > MAX_JSON_SCHEMA_NODES) throw new Unconvertible();\n}\n\n/** Rewrites a value in a subschema position. Only known schema keywords are walked; everything else is copied as-is. */\nfunction rewrite(schema: unknown, depth: number, budget: { nodes: number }, isRoot = false): unknown {\n  if (!schema || typeof schema !== 'object' || Array.isArray(schema)) return schema;\n  checkBudget(depth, budget);\n\n  const out: Record<string, unknown> = { ...schema };\n  // Embedded resources may declare their own dialect. unevaluatedItems interacts with contains (including via\n  // in-place applicators) differently in 2020-12, prefixItems is an annotation in 2019-09 but an assertion in\n  // 2020-12, and contentSchema is not walked. zod v3 emits none of these, so decline rather than risk a change.\n  if (!isRoot && '$schema' in out) throw new Unconvertible();\n  if ('$recursiveRef' in out || '$recursiveAnchor' in out) throw new Unconvertible();\n  if ('unevaluatedItems' in out || 'prefixItems' in out || 'contentSchema' in out) throw new Unconvertible();\n  if (typeof out.$ref === 'string' && /\\/(items\\/\\d+|additionalItems)(\\/|$)/.test(out.$ref)) {\n    throw new Unconvertible();\n  }\n\n  for (const [key, child] of Object.entries(out)) {\n    if (SCHEMA_KEYWORDS.has(key)) {\n      out[key] = Array.isArray(child)\n        ? (checkBudget(depth + 1, budget), child.map(item => rewrite(item, depth + 2, budget)))\n        : rewrite(child, depth + 1, budget);\n    } else if (SCHEMA_ARRAY_KEYWORDS.has(key) && Array.isArray(child)) {\n      checkBudget(depth + 1, budget);\n      out[key] = child.map(item => rewrite(item, depth + 2, budget));\n    } else if (SCHEMA_MAP_KEYWORDS.has(key) && child && typeof child === 'object' && !Array.isArray(child)) {\n      checkBudget(depth + 1, budget);\n      out[key] = Object.fromEntries(\n        Object.entries(child).map(([name, sub]) => [name, rewrite(sub, depth + 2, budget)]),\n      );\n    }\n  }\n  if (!Array.isArray(out.items)) return out;\n\n  out.prefixItems = out.items;\n  if ('additionalItems' in out) out.items = out.additionalItems;\n  else delete out.items;\n  delete out.additionalItems;\n  return out;\n}\n","const MASTRA_META_KEY = 'mastra';\nconst STRICT_META_KEY = 'strict';\n\nexport function withMastraToolStrictMeta(\n  meta: Record<string, unknown> | undefined,\n  strict: boolean | undefined,\n): Record<string, unknown> | undefined {\n  if (strict == null) {\n    return meta;\n  }\n\n  const mastraMeta =\n    meta?.[MASTRA_META_KEY] && typeof meta[MASTRA_META_KEY] === 'object'\n      ? (meta[MASTRA_META_KEY] as Record<string, unknown>)\n      : undefined;\n\n  return {\n    ...(meta ?? {}),\n    [MASTRA_META_KEY]: {\n      ...(mastraMeta ?? {}),\n      [STRICT_META_KEY]: strict,\n    },\n  };\n}\n\nexport function getMastraToolStrictMeta(meta: Record<string, unknown> | undefined): boolean | undefined {\n  const mastraMeta = meta?.[MASTRA_META_KEY];\n  if (!mastraMeta || typeof mastraMeta !== 'object') {\n    return undefined;\n  }\n\n  const strict = (mastraMeta as Record<string, unknown>)[STRICT_META_KEY];\n  return typeof strict === 'boolean' ? strict : undefined;\n}\n","/**\n * OAuth Types for MCP Authentication\n *\n * Re-exports and extends the MCP OAuth types for use in Mastra's MCP client and\n * server implementations. The OAuth metadata shapes are identical across the\n * MCP packages, so both sides source them from `@modelcontextprotocol/client`\n * alongside the OAuth flow helpers below.\n *\n * @see https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization\n */\nimport type { OAuthProtectedResourceMetadata as SDKOAuthProtectedResourceMetadata } from '@modelcontextprotocol/client';\n\nexport type {\n  OAuthMetadata,\n  OAuthTokens,\n  OAuthErrorResponse,\n  OAuthClientMetadata,\n  OAuthClientInformation,\n  OAuthClientInformationContext,\n  OAuthDiscoveryState,\n  StoredOAuthTokens,\n  OAuthTokenRevocationRequest,\n  OAuthProtectedResourceMetadata,\n  AuthorizationServerMetadata,\n} from '@modelcontextprotocol/client';\n\nexport {\n  auth,\n  discoverOAuthProtectedResourceMetadata,\n  discoverOAuthMetadata,\n  discoverAuthorizationServerMetadata,\n  startAuthorization,\n  exchangeAuthorization,\n  refreshAuthorization,\n  extractResourceMetadataUrl,\n  selectResourceURL,\n  parseErrorResponse,\n  UnauthorizedError,\n  buildDiscoveryUrls,\n} from '@modelcontextprotocol/client';\n\n// Re-export OAuthClientProvider interface\nexport type { OAuthClientProvider, AuthResult } from '@modelcontextprotocol/client';\n\n/**\n * Configuration for OAuth-protected MCP server.\n *\n * Used to configure Protected Resource Metadata (RFC 9728) and\n * token validation for MCP servers that require OAuth authentication.\n */\nexport interface MCPServerOAuthConfig {\n  /**\n   * The resource identifier URI for this MCP server.\n   * This MUST be the canonical URL of the MCP server.\n   *\n   * @example 'https://mcp.example.com/mcp'\n   */\n  resource: string;\n\n  /**\n   * URLs of authorization servers that can issue tokens for this resource.\n   * At least one authorization server should be specified.\n   *\n   * @example ['https://auth.example.com']\n   */\n  authorizationServers: string[];\n\n  /**\n   * Scopes supported by this MCP server.\n   *\n   * @default ['mcp:read', 'mcp:write']\n   */\n  scopesSupported?: string[];\n\n  /**\n   * Human-readable name of this resource server.\n   */\n  resourceName?: string;\n\n  /**\n   * URL to documentation about this resource server.\n   */\n  resourceDocumentation?: string;\n\n  /**\n   * Custom function to validate access tokens.\n   *\n   * If not provided, tokens are accepted without validation\n   * (useful for testing but NOT recommended for production).\n   *\n   * @param token - The bearer token from the Authorization header\n   * @param resource - The resource URI this server represents\n   * @returns Promise resolving to validation result\n   */\n  validateToken?: (token: string, resource: string) => Promise<TokenValidationResult>;\n}\n\n/**\n * Result of token validation.\n */\nexport interface TokenValidationResult {\n  /**\n   * Whether the token is valid.\n   */\n  valid: boolean;\n\n  /**\n   * If invalid, the reason for rejection.\n   */\n  error?: string;\n\n  /**\n   * If invalid, a more detailed error description.\n   */\n  errorDescription?: string;\n\n  /**\n   * The scopes granted by this token.\n   */\n  scopes?: string[];\n\n  /**\n   * The subject (user) identifier from the token.\n   */\n  subject?: string;\n\n  /**\n   * When the token expires (Unix timestamp).\n   */\n  expiresAt?: number;\n\n  /**\n   * Additional claims from the token.\n   */\n  claims?: Record<string, unknown>;\n}\n\n/**\n * Options for OAuth-related HTTP responses.\n */\nexport interface OAuthResponseOptions {\n  /**\n   * URL to the Protected Resource Metadata endpoint.\n   */\n  resourceMetadataUrl?: string;\n\n  /**\n   * Additional WWW-Authenticate parameters.\n   */\n  additionalParams?: Record<string, string>;\n}\n\n/**\n * Escapes backslashes and double quotes in a string for use in HTTP header quoted-string values.\n */\nfunction escapeHeaderValue(value: string): string {\n  return value.replace(/\\\\/g, '\\\\\\\\').replace(/\"/g, '\\\\\"');\n}\n\n/**\n * Generates a WWW-Authenticate header value for OAuth 401 responses.\n *\n * @param options - Options for generating the header\n * @returns The WWW-Authenticate header value\n *\n * @example\n * ```typescript\n * const header = generateWWWAuthenticateHeader({\n *   resourceMetadataUrl: 'https://mcp.example.com/.well-known/oauth-protected-resource',\n * });\n * // Returns: 'Bearer resource_metadata=\"https://mcp.example.com/.well-known/oauth-protected-resource\"'\n * ```\n */\nexport function generateWWWAuthenticateHeader(options: OAuthResponseOptions = {}): string {\n  const params: string[] = [];\n\n  if (options.resourceMetadataUrl) {\n    params.push(`resource_metadata=\"${escapeHeaderValue(options.resourceMetadataUrl)}\"`);\n  }\n\n  if (options.additionalParams) {\n    for (const [key, value] of Object.entries(options.additionalParams)) {\n      params.push(`${key}=\"${escapeHeaderValue(value)}\"`);\n    }\n  }\n\n  if (params.length === 0) {\n    return 'Bearer';\n  }\n\n  return `Bearer ${params.join(', ')}`;\n}\n\n/**\n * Generates Protected Resource Metadata (RFC 9728) JSON response.\n *\n * @param config - OAuth configuration for the MCP server\n * @returns The Protected Resource Metadata object\n *\n * @see https://www.rfc-editor.org/rfc/rfc9728.html\n */\nexport function generateProtectedResourceMetadata(config: MCPServerOAuthConfig): SDKOAuthProtectedResourceMetadata {\n  return {\n    resource: config.resource,\n    authorization_servers: config.authorizationServers,\n    scopes_supported: config.scopesSupported ?? ['mcp:read', 'mcp:write'],\n    bearer_methods_supported: ['header'],\n    ...(config.resourceName && { resource_name: config.resourceName }),\n    ...(config.resourceDocumentation && {\n      resource_documentation: config.resourceDocumentation,\n    }),\n  };\n}\n\n/**\n * Extracts the bearer token from an Authorization header.\n *\n * @param authHeader - The Authorization header value\n * @returns The bearer token, or undefined if not present\n */\nexport function extractBearerToken(authHeader: string | null | undefined): string | undefined {\n  if (!authHeader) return undefined;\n\n  // Case-insensitive check for \"Bearer \" prefix (safer than regex to avoid ReDoS)\n  const prefix = 'bearer ';\n  if (authHeader.length <= prefix.length) return undefined;\n  if (authHeader.slice(0, prefix.length).toLowerCase() !== prefix) return undefined;\n\n  const token = authHeader.slice(prefix.length).trim();\n  return token || undefined;\n}\n","/**\n * W3C trace fields carried in MCP request `_meta` (SEP-414).\n *\n * Mastra passes these strings through without creating spans or validating\n * their format. Treat inbound values, especially `baggage`, as untrusted\n * observability data: never use them for authentication or authorization.\n */\nexport interface MCPTraceContext {\n  traceparent: string;\n  tracestate?: string;\n  baggage?: string;\n}\n\n/** `_meta` keys defined by the MCP specification for W3C trace propagation. */\nconst TRACEPARENT_META_KEY = 'traceparent';\nconst TRACESTATE_META_KEY = 'tracestate';\nconst BAGGAGE_META_KEY = 'baggage';\n\n/**\n * Reads the W3C trace fields out of request metadata. Only string values are\n * accepted; a request without a `traceparent` carries no trace context.\n */\nexport function traceContextFromMeta(meta: Record<string, unknown> | undefined): MCPTraceContext | undefined {\n  const traceparent = meta?.[TRACEPARENT_META_KEY];\n  if (typeof traceparent !== 'string') return undefined;\n  const tracestate = meta?.[TRACESTATE_META_KEY];\n  const baggage = meta?.[BAGGAGE_META_KEY];\n  return {\n    traceparent,\n    ...(typeof tracestate === 'string' ? { tracestate } : {}),\n    ...(typeof baggage === 'string' ? { baggage } : {}),\n  };\n}\n\n/** Projects a trace context onto the `_meta` keys the specification defines. */\nexport function traceContextToMeta(traceContext: MCPTraceContext): Record<string, string> {\n  return {\n    [TRACEPARENT_META_KEY]: traceContext.traceparent,\n    ...(traceContext.tracestate !== undefined ? { [TRACESTATE_META_KEY]: traceContext.tracestate } : {}),\n    ...(traceContext.baggage !== undefined ? { [BAGGAGE_META_KEY]: traceContext.baggage } : {}),\n  };\n}\n","import type { IMastraLogger } from '@mastra/core/logger';\nimport type { ProgressNotification } from '@modelcontextprotocol/client';\nimport type { InternalMastraMCPClient } from '../client';\n\ninterface ProgressClientActionsConfig {\n  client: InternalMastraMCPClient;\n  logger: IMastraLogger;\n}\n\n/**\n * Client-side progress actions for handling progress notifications from MCP servers.\n */\nexport class ProgressClientActions {\n  private readonly client: InternalMastraMCPClient;\n  private readonly logger: IMastraLogger;\n\n  constructor({ client, logger }: ProgressClientActionsConfig) {\n    this.client = client;\n    this.logger = logger;\n  }\n\n  /**\n   * Set a notification handler for progress updates.\n   * @param handler The callback function to handle progress notifications.\n   */\n  public onUpdate(handler: (params: ProgressNotification['params']) => void): void {\n    this.client.setProgressNotificationHandler(handler);\n  }\n}\n","import type { IMastraLogger } from '@mastra/core/logger';\nimport type { GetPromptResult, Prompt } from '@modelcontextprotocol/client';\nimport { ProtocolErrorCode } from '@modelcontextprotocol/client';\nimport type { InternalMastraMCPClient } from '../client';\n\ninterface PromptClientActionsConfig {\n  client: InternalMastraMCPClient;\n  logger: IMastraLogger;\n}\n\n/**\n * Client-side prompt actions for interacting with MCP server prompts.\n *\n * Provides methods to list, retrieve, and subscribe to prompt templates exposed by an MCP server.\n * Prompts are reusable message templates that can be parameterized and used for AI interactions.\n */\nexport class PromptClientActions {\n  private readonly client: InternalMastraMCPClient;\n  private readonly logger: IMastraLogger;\n\n  /**\n   * @internal\n   */\n  constructor({ client, logger }: PromptClientActionsConfig) {\n    this.client = client;\n    this.logger = logger;\n  }\n\n  /**\n   * Retrieves all available prompts from the connected MCP server.\n   *\n   * Returns an empty array if the server doesn't support prompts (MethodNotFound error).\n   *\n   * @returns Promise resolving to array of prompts with their metadata\n   * @throws {Error} If fetching prompts fails (excluding MethodNotFound)\n   *\n   * @example\n   * ```typescript\n   * const prompts = await client.prompts.list();\n   * prompts.forEach(prompt => {\n   *   console.log(`${prompt.name}: ${prompt.description}`);\n   * });\n   * ```\n   */\n  public async list(): Promise<Prompt[]> {\n    try {\n      const response = await this.client.listPrompts();\n      if (response && response.prompts && Array.isArray(response.prompts)) {\n        return response.prompts.map(prompt => ({ ...prompt }));\n      } else {\n        this.logger.warn('Prompts response did not have expected structure', {\n          server: this.client.name,\n          response,\n        });\n        return [];\n      }\n    } catch (e: any) {\n      // MCP Server might not support prompts, so we return an empty array\n      if (e.code === ProtocolErrorCode.MethodNotFound) {\n        return [];\n      }\n      this.logger.error('Error getting prompts from server', {\n        server: this.client.name,\n        error: e instanceof Error ? e.message : String(e),\n      });\n      throw new Error(\n        `Failed to fetch prompts from server ${this.client.name}: ${e instanceof Error ? e.stack || e.message : String(e)}`,\n      );\n    }\n  }\n\n  /**\n   * Retrieves a specific prompt with its messages from the MCP server.\n   *\n   * Prompts can accept arguments to parameterize the template. The returned messages\n   * can be used directly in AI chat completions.\n   *\n   * @param params - Parameters for the prompt request\n   * @param params.name - Name of the prompt to retrieve\n   * @param params.args - Optional arguments to populate the prompt template\n   * @returns Promise resolving to the prompt result with messages\n   * @throws {Error} If fetching the prompt fails or prompt not found\n   *\n   * @example\n   * ```typescript\n   * const prompt = await client.prompts.get({\n   *   name: 'code-review',\n   *   args: {\n   *     language: 'typescript',\n   *     code: 'const x = 1;'\n   *   },\n   * });\n   *\n   * // Use prompt messages in AI completion\n   * console.log(prompt.messages);\n   * ```\n   */\n  public async get({ name, args }: { name: string; args?: Record<string, any> }): Promise<GetPromptResult> {\n    return this.client.getPrompt({ name, args });\n  }\n\n  /**\n   * Sets a notification handler for when the list of available prompts changes.\n   *\n   * The handler is called when prompts are added, removed, or modified on the server.\n   *\n   * @param handler - Callback function invoked when the prompt list changes\n   *\n   * @example\n   * ```typescript\n   * await client.prompts.onListChanged(async () => {\n   *   console.log('Prompt list changed, re-fetching...');\n   *   const prompts = await client.prompts.list();\n   *   console.log('Available prompts:', prompts.map(p => p.name));\n   * });\n   * ```\n   */\n  public async onListChanged(handler: () => void): Promise<void> {\n    await this.client.setPromptListChangedNotificationHandler(handler);\n  }\n}\n","import type { IMastraLogger } from '@mastra/core/logger';\nimport type { Resource, ResourceTemplateType } from '@modelcontextprotocol/client';\nimport { ProtocolErrorCode } from '@modelcontextprotocol/client';\nimport type { InternalMastraMCPClient } from '../client';\n\ninterface ResourceClientActionsConfig {\n  client: InternalMastraMCPClient;\n  logger: IMastraLogger;\n}\n\n/**\n * Client-side resource actions for interacting with MCP server resources.\n *\n * Provides methods to list, read, subscribe to, and manage resources exposed by an MCP server.\n * Resources represent any kind of data that a server wants to make available (files, database\n * records, API responses, etc.).\n */\nexport class ResourceClientActions {\n  private readonly client: InternalMastraMCPClient;\n  private readonly logger: IMastraLogger;\n\n  /**\n   * @internal\n   */\n  constructor({ client, logger }: ResourceClientActionsConfig) {\n    this.client = client;\n    this.logger = logger;\n  }\n\n  /**\n   * Retrieves all available resources from the connected MCP server.\n   *\n   * Returns an empty array if the server doesn't support resources (MethodNotFound error).\n   *\n   * @returns Promise resolving to array of resources\n   * @throws {Error} If fetching resources fails (excluding MethodNotFound)\n   *\n   * @example\n   * ```typescript\n   * const resources = await client.resources.list();\n   * resources.forEach(resource => {\n   *   console.log(`${resource.name}: ${resource.uri}`);\n   * });\n   * ```\n   */\n  public async list(): Promise<Resource[]> {\n    try {\n      const response = await this.client.listResources();\n      if (response && response.resources && Array.isArray(response.resources)) {\n        return response.resources;\n      } else {\n        this.logger.warn('Resources response did not have expected structure', {\n          server: this.client.name,\n          response,\n        });\n        return [];\n      }\n    } catch (e: any) {\n      // MCP Server might not support resources, so we return an empty array\n      if (e.code === ProtocolErrorCode.MethodNotFound) {\n        return [];\n      }\n      this.logger.error('Error getting resources from server', {\n        server: this.client.name,\n        error: e instanceof Error ? e.message : String(e),\n      });\n      throw new Error(\n        `Failed to fetch resources from server ${this.client.name}: ${e instanceof Error ? e.stack || e.message : String(e)}`,\n      );\n    }\n  }\n\n  /**\n   * Retrieves all available resource templates from the connected MCP server.\n   *\n   * Resource templates are URI templates (RFC 6570) that describe dynamic resources.\n   * Returns an empty array if the server doesn't support resource templates.\n   *\n   * @returns Promise resolving to array of resource templates\n   * @throws {Error} If fetching resource templates fails (excluding MethodNotFound)\n   *\n   * @example\n   * ```typescript\n   * const templates = await client.resources.templates();\n   * templates.forEach(template => {\n   *   console.log(`${template.name}: ${template.uriTemplate}`);\n   * });\n   * ```\n   */\n  public async templates(): Promise<ResourceTemplateType[]> {\n    try {\n      const response = await this.client.listResourceTemplates();\n      if (response && response.resourceTemplates && Array.isArray(response.resourceTemplates)) {\n        return response.resourceTemplates;\n      } else {\n        this.logger.warn('Resource templates response did not have expected structure', {\n          server: this.client.name,\n          response,\n        });\n        return [];\n      }\n    } catch (e: any) {\n      // MCP Server might not support resources, so we return an empty array\n      if (e.code === ProtocolErrorCode.MethodNotFound) {\n        return [];\n      }\n      this.logger.error('Error getting resource templates from server', {\n        server: this.client.name,\n        error: e instanceof Error ? e.message : String(e),\n      });\n      throw new Error(\n        `Failed to fetch resource templates from server ${this.client.name}: ${e instanceof Error ? e.stack || e.message : String(e)}`,\n      );\n    }\n  }\n\n  /**\n   * Reads the content of a specific resource from the MCP server.\n   *\n   * @param uri - URI of the resource to read (e.g., 'file://path/to/file.txt')\n   * @returns Promise resolving to the resource content\n   * @throws {Error} If reading the resource fails or resource not found\n   *\n   * @example\n   * ```typescript\n   * const result = await client.resources.read('file://data/config.json');\n   * console.log(result.contents[0].text); // Resource text content\n   * ```\n   */\n  public async read(uri: string) {\n    return this.client.readResource(uri);\n  }\n\n  /**\n   * Subscribes to update notifications for a resource. The client carries every\n   * subscription on one `subscriptions/listen` stream and reopens it after reconnects.\n   *\n   * @param uri - URI of the resource to watch\n   * @throws {Error} If the server declines the subscription\n   *\n   * @example\n   * ```typescript\n   * await client.resources.onUpdated(({ uri }) => console.log(`updated ${uri}`));\n   * await client.resources.subscribe('file://data/config.json');\n   * ```\n   */\n  public async subscribe(uri: string): Promise<void> {\n    await this.client.subscribeResource(uri);\n  }\n\n  /** Stops update notifications for a resource previously passed to {@link subscribe}. */\n  public async unsubscribe(uri: string): Promise<void> {\n    await this.client.unsubscribeResource(uri);\n  }\n\n  /**\n   * Sets a notification handler for when subscribed resources are updated.\n   *\n   * Updates arrive for resources passed to {@link subscribe}.\n   *\n   * @param handler - Callback function receiving the updated resource URI\n   *\n   * @example\n   * ```typescript\n   * await client.resources.onUpdated(async (params) => {\n   *   console.log(`Resource updated: ${params.uri}`);\n   *   // Re-fetch the resource\n   *   const content = await client.resources.read(params.uri);\n   *   console.log('New content:', content);\n   * });\n   * ```\n   */\n  public async onUpdated(handler: (params: { uri: string }) => void): Promise<void> {\n    this.client.setResourceUpdatedNotificationHandler(handler);\n  }\n\n  /**\n   * Sets a notification handler for when the list of available resources changes.\n   *\n   * The handler is called when resources are added or removed from the server.\n   *\n   * @param handler - Callback function invoked when the resource list changes\n   *\n   * @example\n   * ```typescript\n   * await client.resources.onListChanged(async () => {\n   *   console.log('Resource list changed, re-fetching...');\n   *   const resources = await client.resources.list();\n   *   console.log('Updated resource count:', resources.length);\n   * });\n   * ```\n   */\n  public async onListChanged(handler: () => void): Promise<void> {\n    await this.client.setResourceListChangedNotificationHandler(handler);\n  }\n}\n","/**\n * Whether a failed MCP call is worth one transport reconnect and retry.\n *\n * Qualifying failures are a detached SDK client, an HTTP 400/401/403/404 from\n * the endpoint (a gateway or auth layer answering while the backend behind it\n * is unhealthy or the credentials went stale), or a dropped/refused connection.\n * The caller reconnects and retries once. Tool execution errors and JSON-RPC\n * protocol errors are never reconnectable.\n */\nexport function isReconnectableMCPError(error: unknown): boolean {\n  if (!(error instanceof Error)) {\n    return false;\n  }\n\n  const errorMessage = error.message.toLowerCase();\n\n  return (\n    errorMessage.includes('not connected') ||\n    errorMessage.includes('http 400') ||\n    errorMessage.includes('http 401') ||\n    errorMessage.includes('http 403') ||\n    errorMessage.includes('http 404') ||\n    errorMessage.includes('econnrefused') ||\n    errorMessage.includes('fetch failed') ||\n    errorMessage.includes('connection refused') ||\n    errorMessage.includes('connection closed') ||\n    errorMessage.includes('typeerror: terminated')\n  );\n}\n\n/** Structured transport metadata for a failed aggregate MCP discovery. */\nexport interface MCPDiscoveryErrorDetails {\n  /** Human-readable failure message. Includes `(HTTP nnn)` when an HTTP status is available. */\n  message: string;\n  /** HTTP response status reported by the MCP transport. */\n  httpStatus?: number;\n  /** Deepest error code in the cause chain, such as an MCP SDK, network, or application error code. */\n  code?: string | number;\n}\n\nconst MAX_DISCOVERY_ERROR_CAUSE_DEPTH = 8;\n\nfunction isHttpStatus(value: unknown): value is number {\n  return typeof value === 'number' && Number.isInteger(value) && value >= 100 && value <= 599;\n}\n\nfunction asErrorRecord(value: unknown): Record<string, unknown> | undefined {\n  return typeof value === 'object' && value !== null ? (value as Record<string, unknown>) : undefined;\n}\n\nfunction getErrorProperty(record: Record<string, unknown> | undefined, property: string): unknown {\n  if (!record) return undefined;\n\n  try {\n    return record[property];\n  } catch {\n    // Third-party errors can expose values through getters or Proxy traps.\n    // Discovery error reporting must never turn one server failure into an\n    // aggregate rejection merely because inspecting that failure throws.\n    return undefined;\n  }\n}\n\nfunction getErrorMessage(error: unknown): string {\n  const message = getErrorProperty(asErrorRecord(error), 'message');\n  if (typeof message === 'string') return message;\n\n  try {\n    return String(error);\n  } catch {\n    return 'Unknown error';\n  }\n}\n\n/**\n * Preserve machine-readable transport metadata before aggregate discovery turns\n * a thrown error into its legacy per-server string.\n *\n * MCP SDK 2 keeps an HTTP response status on `SdkHttpError.status` while\n * `code` is a string SDK code. Older transports and wrappers have also used\n * `statusCode`; only explicit status fields are treated as HTTP metadata so a\n * numeric SDK or application `code` is not mislabeled. The walk is bounded and\n * cycle-safe because application errors may wrap arbitrary third-party causes.\n */\nexport function getMCPDiscoveryErrorDetails(error: unknown): MCPDiscoveryErrorDetails {\n  let message = getErrorMessage(error);\n  let httpStatus: number | undefined;\n  let code: string | number | undefined;\n  let current: unknown = error;\n  const seen = new Set<unknown>();\n\n  for (\n    let depth = 0;\n    depth < MAX_DISCOVERY_ERROR_CAUSE_DEPTH && current !== undefined && current !== null && !seen.has(current);\n    depth++\n  ) {\n    seen.add(current);\n    const record = asErrorRecord(current);\n    if (!record) break;\n\n    const data = asErrorRecord(getErrorProperty(record, 'data'));\n    if (httpStatus === undefined) {\n      for (const candidate of [\n        getErrorProperty(record, 'status'),\n        getErrorProperty(record, 'statusCode'),\n        getErrorProperty(data, 'status'),\n        getErrorProperty(data, 'statusCode'),\n      ]) {\n        if (isHttpStatus(candidate)) {\n          httpStatus = candidate;\n          break;\n        }\n      }\n    }\n\n    for (const candidate of [getErrorProperty(record, 'code'), getErrorProperty(data, 'code')]) {\n      if (typeof candidate === 'string' || typeof candidate === 'number') {\n        // Prefer the deepest code: outer Mastra errors describe the aggregate\n        // operation, while the innermost SDK/network code classifies the cause.\n        code = candidate;\n      }\n    }\n\n    current = getErrorProperty(record, 'cause');\n  }\n\n  if (httpStatus !== undefined && !message.includes(`(HTTP ${httpStatus})`)) {\n    message += ` (HTTP ${httpStatus})`;\n  }\n\n  return {\n    message,\n    ...(httpStatus !== undefined ? { httpStatus } : {}),\n    ...(code !== undefined ? { code } : {}),\n  };\n}\n","import { ErrorCategory, ErrorDomain, MastraError } from '@mastra/core/error';\n\n/**\n * Redirect status codes the manual redirect loop follows. Other 3xx statuses\n * (e.g. 304) are not redirects and are returned to the caller as-is.\n */\nconst REDIRECT_STATUS_CODES = new Set([301, 302, 303, 307, 308]);\n\n/** Maximum number of redirect hops followed before failing. */\nconst MAX_REDIRECT_HOPS = 5;\n\nfunction normalizeHost(host: string): string {\n  return host.toLowerCase();\n}\n\n/**\n * Minimal structural view of a fetch response. Both the platform `Response`\n * and the eventsource package's `FetchLikeResponse` (used for a caller-supplied\n * `eventSourceInit.fetch`) satisfy it.\n */\ntype ResponseLike = { readonly url: string; readonly body?: unknown };\n\n/** Best-effort release of a discarded response body so its socket is not left undrained. */\nfunction cancelResponseBody(response: ResponseLike): void {\n  const body = response.body as { cancel?: () => Promise<unknown> } | null | undefined;\n  if (typeof body?.cancel !== 'function') {\n    return;\n  }\n  try {\n    void Promise.resolve(body.cancel()).catch(() => {});\n  } catch {\n    // some Response implementations throw synchronously on cancel\n  }\n}\n\nfunction isHostAllowed(host: string, allowedHosts: readonly string[]): boolean {\n  const normalized = normalizeHost(host);\n  return allowedHosts.some(allowed => normalizeHost(allowed) === normalized);\n}\n\n/**\n * Marker phrase embedded in every policy error's message. The `eventsource`\n * package flattens errors thrown from the SSE stream's fetch into a plain\n * message string (its internal `flattenError`), and the SDK re-wraps that\n * string as `SseError` — the `MastraError` identity does not survive that\n * boundary, but the message text does. {@link isUrlPolicyError} falls back to\n * matching this marker.\n */\nconst URL_POLICY_ERROR_MARKER = 'allowedHosts policy';\n\n/**\n * Build the policy-violation error. The message deliberately avoids every\n * substring matched by `isReconnectableMCPError` (see ./error-utils.ts) so a\n * policy violation is never treated as a transient transport failure and fed\n * into the reconnect machinery — a blocked host must not be retried.\n */\nfunction hostNotAllowedError(host: string, allowedHosts: readonly string[], detail: string): MastraError {\n  const allowedList =\n    allowedHosts.length > 0 ? allowedHosts.map(h => `\"${h}\"`).join(', ') : '(empty list — all hosts are denied)';\n  return new MastraError({\n    id: 'MCP_CLIENT_HOST_NOT_ALLOWED',\n    domain: ErrorDomain.MCP,\n    category: ErrorCategory.USER,\n    text: `Host \"${host}\" is blocked by the allowedHosts policy. Allowed hosts: ${allowedList}. ${detail}`,\n    details: { host, allowedHosts: allowedHosts.join(',') },\n  });\n}\n\n/**\n * Assert that the URL's host is in the allowlist.\n *\n * Matching is exact and case-insensitive against `URL.host` (hostname plus\n * port when the URL carries a non-default port — WHATWG URL elides default\n * ports, so `https://x.com:443` has host `x.com`). No wildcards. An empty\n * allowlist denies every host. The URL scheme is not checked.\n *\n * @returns the parsed URL, for callers that need it.\n * @throws {MastraError} `MCP_CLIENT_HOST_NOT_ALLOWED` when the host is not allowed.\n */\nexport function assertHostAllowed(\n  url: string | URL,\n  allowedHosts: readonly string[],\n  detail = 'The request was not sent.',\n): URL {\n  const parsed = typeof url === 'string' ? new URL(url) : url;\n  if (!isHostAllowed(parsed.host, allowedHosts)) {\n    throw hostNotAllowedError(parsed.host, allowedHosts, detail);\n  }\n  return parsed;\n}\n\n/**\n * Post-hoc validation for responses produced by a caller-supplied fetch.\n *\n * A custom fetch may auto-follow redirects, so the final URL can differ from\n * the (already validated) request URL. When `response.url` lands on a\n * disallowed host the response is discarded by throwing — the outbound hop\n * already happened, but the data never reaches the caller or the model.\n *\n * Limitation (fail-open by design): a hand-built or proxied `Response` with an\n * empty `response.url` skips this check, because custom fetch implementations\n * legitimately construct such responses.\n */\nexport function assertResponseHostAllowed<R extends ResponseLike>(response: R, allowedHosts: readonly string[]): R {\n  if (!response.url) {\n    return response;\n  }\n  const parsed = new URL(response.url);\n  if (!isHostAllowed(parsed.host, allowedHosts)) {\n    cancelResponseBody(response);\n    throw hostNotAllowedError(\n      parsed.host,\n      allowedHosts,\n      'A custom fetch implementation followed a redirect to this host; the response was discarded.',\n    );\n  }\n  return response;\n}\n\n/**\n * True when the error is one of the allowedHosts policy errors. Policy\n * violations are final: they must never trigger the SSE fallback or the\n * reconnect machinery, because retrying a blocked host cannot succeed.\n *\n * Matches by `MastraError` id when the identity is intact, and by the\n * {@link URL_POLICY_ERROR_MARKER} message marker for errors that crossed the\n * eventsource boundary (which flattens thrown errors to message strings) or\n * were re-wrapped by another layer.\n */\nconst URL_POLICY_ERROR_IDS = new Set([\n  'MCP_CLIENT_HOST_NOT_ALLOWED',\n  'MCP_CLIENT_TOO_MANY_REDIRECTS',\n  'MCP_CLIENT_REDIRECT_MISSING_LOCATION',\n  'MCP_CLIENT_REDIRECT_BODY_NOT_REPLAYABLE',\n]);\n\nexport function isUrlPolicyError(error: unknown): boolean {\n  if (!(error instanceof Error)) {\n    return false;\n  }\n  if (error instanceof MastraError && URL_POLICY_ERROR_IDS.has(error.id)) {\n    return true;\n  }\n  return error.message.includes(URL_POLICY_ERROR_MARKER);\n}\n\n/**\n * Wrap a caller-supplied fetch with the allowedHosts policy: the request URL is\n * validated before the wrapped fetch runs, and the response is validated\n * post-hoc via {@link assertResponseHostAllowed}.\n *\n * Variadic over the trailing arguments deliberately: the same wrapper serves\n * the 3-arg `MastraFetchLike` (url, init, requestContext) and the 2-arg\n * eventsource stream fetch (url, init).\n */\nexport function wrapFetchWithHostPolicy<Args extends [url: string | URL, ...rest: any[]], R extends ResponseLike>(\n  fetchImpl: (...args: Args) => Promise<R>,\n  allowedHosts: readonly string[],\n): (...args: Args) => Promise<R> {\n  return async (...args: Args) => {\n    assertHostAllowed(args[0], allowedHosts);\n    const response = await fetchImpl(...args);\n    return assertResponseHostAllowed(response, allowedHosts);\n  };\n}\n\n/**\n * Fetch with manual redirect handling so every redirect hop is validated\n * against the allowlist BEFORE the hop request is sent. Platform fetch follows\n * redirects transparently, which would bypass a per-call host check.\n *\n * Semantics follow platform conventions:\n * - `Location` is resolved against the current hop's URL (relative Locations are legal).\n * - 303 switches the method to GET and drops the body; 301/302 on POST do the same.\n * - 307/308 preserve method and body; a non-replayable body (anything other\n *   than a string) throws rather than silently re-sending an empty body.\n * - 301/302 on non-POST methods preserve the method and body, matching\n *   platform behavior.\n * - The `Authorization` header is not carried across hops to a different\n *   origin (scheme, host, or port change), matching the WHATWG Fetch\n *   credential-stripping rule — same host over a downgraded scheme still\n *   drops the header.\n * - A redirect status with no `Location` header throws.\n * - More than {@link MAX_REDIRECT_HOPS} hops throws.\n */\nexport async function fetchFollowingAllowedRedirects(\n  fetchImpl: (url: string | URL, init?: RequestInit) => Promise<Response>,\n  url: string | URL,\n  init: RequestInit | undefined,\n  allowedHosts: readonly string[],\n): Promise<Response> {\n  let currentUrl = assertHostAllowed(url, allowedHosts);\n  let method = init?.method ?? 'GET';\n  let body = init?.body;\n  const headers = new Headers(init?.headers);\n\n  for (let redirectsFollowed = 0; ; redirectsFollowed++) {\n    const response = await fetchImpl(currentUrl, { ...init, method, body, headers, redirect: 'manual' });\n    if (!REDIRECT_STATUS_CODES.has(response.status)) {\n      return response;\n    }\n\n    const location = response.headers.get('location');\n    if (!location) {\n      throw new MastraError({\n        id: 'MCP_CLIENT_REDIRECT_MISSING_LOCATION',\n        domain: ErrorDomain.MCP,\n        category: ErrorCategory.THIRD_PARTY,\n        text: `Received a ${response.status} redirect with no Location header from \"${currentUrl.host}\" while following redirects under the allowedHosts policy.`,\n      });\n    }\n    if (redirectsFollowed >= MAX_REDIRECT_HOPS) {\n      throw new MastraError({\n        id: 'MCP_CLIENT_TOO_MANY_REDIRECTS',\n        domain: ErrorDomain.MCP,\n        category: ErrorCategory.THIRD_PARTY,\n        // Interpolate only the host, not the full URL: a URL's path/query could\n        // contain substrings (e.g. \"not connected\") that isReconnectableMCPError\n        // matches, which would misclassify this terminal failure as transient.\n        text: `Exceeded the maximum of ${MAX_REDIRECT_HOPS} redirect hops while requesting host \"${currentUrl.host}\" under the allowedHosts policy.`,\n      });\n    }\n\n    // Release the redirect response's body so its socket can be reused.\n    cancelResponseBody(response);\n\n    const nextUrl = new URL(location, currentUrl);\n    assertHostAllowed(nextUrl, allowedHosts, `A redirect from \"${currentUrl.host}\" pointed at it; the hop was not followed.`);\n\n    const methodUpper = method.toUpperCase();\n    const dropsBody =\n      response.status === 303 || ((response.status === 301 || response.status === 302) && methodUpper === 'POST');\n    if (dropsBody) {\n      method = 'GET';\n      body = undefined;\n      headers.delete('content-type');\n      headers.delete('content-length');\n    } else if (body != null && typeof body !== 'string') {\n      // Any hop that preserves the body (307/308 always; 301/302 for non-POST\n      // methods) would re-send an already consumed one-shot body, so guard on\n      // \"the body is preserved\", not on specific status codes.\n      throw new MastraError({\n        id: 'MCP_CLIENT_REDIRECT_BODY_NOT_REPLAYABLE',\n        domain: ErrorDomain.MCP,\n        category: ErrorCategory.USER,\n        text: `Cannot follow a ${response.status} redirect under the allowedHosts policy: the request body is not replayable (only string bodies can be re-sent).`,\n      });\n    }\n\n    // WHATWG Fetch strips Authorization when the ORIGIN (scheme + host + port)\n    // changes — host alone is not enough: a same-host https→http downgrade must\n    // also drop the header or the bearer token is re-sent in cleartext.\n    if (nextUrl.origin !== currentUrl.origin) {\n      headers.delete('authorization');\n    }\n\n    currentUrl = nextUrl;\n  }\n}\n","import { AsyncLocalStorage } from 'node:async_hooks';\nimport { createRequire } from 'node:module';\nimport type { Stream } from 'node:stream';\nimport { MastraBase } from '@mastra/core/base';\nimport type { RequestContext } from '@mastra/core/di';\nimport { ErrorCategory, ErrorDomain, MastraError } from '@mastra/core/error';\nimport { createTool, validateToolOutput } from '@mastra/core/tools';\nimport type { NeedsApprovalFn, Tool } from '@mastra/core/tools';\nimport { toStandardSchema } from '@mastra/schema-compat';\nimport type { JSONSchema7, StandardSchemaWithJSON } from '@mastra/schema-compat';\nimport {\n  Client,\n  LOG_LEVEL_META_KEY,\n  StreamableHTTPClientTransport,\n  DEFAULT_REQUEST_TIMEOUT_MSEC,\n} from '@modelcontextprotocol/client';\nimport type {\n  Transport,\n  GetPromptResult,\n  ListPromptsResult,\n  ListResourcesResult,\n  ListResourceTemplatesResult,\n  LoggingLevel,\n  McpSubscription,\n  ReadResourceResult,\n  ClientCapabilities,\n  PriorDiscovery,\n  SubscriptionFilter,\n  VersionNegotiationMode,\n  jsonSchemaValidator,\n} from '@modelcontextprotocol/client';\nimport { getDefaultEnvironment, StdioClientTransport } from '@modelcontextprotocol/client/stdio';\nimport { asyncExitHook, gracefulExit } from 'exit-hook';\nimport { JSON_SCHEMA_2020_12, MAX_JSON_SCHEMA_DEPTH, MAX_JSON_SCHEMA_NODES, toJsonSchema2020 } from '../shared/json-schema-dialect';\nimport { getMastraToolStrictMeta } from '../shared/mastra-tool-meta';\nimport { UnauthorizedError } from '../shared/oauth-types';\nimport { traceContextToMeta } from '../shared/trace-context';\nimport { ProgressClientActions } from './actions/progress';\nimport { PromptClientActions } from './actions/prompt';\nimport { ResourceClientActions } from './actions/resource';\nimport { isReconnectableMCPError } from './error-utils';\nimport { MCP_CLIENT_PROTOCOL_VERSION } from './types';\nimport type {\n  FetchLike,\n  LogHandler,\n  ProgressHandler,\n  MastraMCPServerDefinition,\n  InternalMastraMCPClientOptions,\n  MCPClientProtocolVersion,\n  MCPServerImplementation,\n  RequireToolApproval,\n  SerializableMCPToolDefinition,\n} from './types';\nimport { assertHostAllowed, fetchFollowingAllowedRedirects, wrapFetchWithHostPolicy } from './url-policy';\n\n// Re-export types for convenience\nexport type {\n  LoggingLevel,\n  LogMessage,\n  LogHandler,\n  ProgressHandler,\n  MastraFetchLike,\n  MastraMCPServerDefinition,\n  MCPClientCapabilities,\n  MCPClientProtocolVersion,\n  MCPInputRequest,\n  MCPInputRequestHandler,\n  InternalMastraMCPClientOptions,\n  RequireToolApproval,\n  RequireToolApprovalFn,\n  RequireToolApprovalContext,\n  SerializableMCPToolDefinition,\n} from './types';\n\n/** A single entry from the MCP `tools/list` response. */\ntype MCPToolListEntry = Awaited<ReturnType<Client['listTools']>>['tools'][0];\n\nconst DEFAULT_SERVER_CONNECT_TIMEOUT_MSEC = 3000;\n\n/**\n * Bounds the work a validator can be asked to do for an untrusted tool catalogue.\n * Only schema-bearing keywords are walked, so deeply nested annotation data such as\n * `default` or `examples` does not count.\n */\nfunction getJsonSchemaComplexityError(schema: unknown): string | undefined {\n  const seen = new Set<object>();\n  let nodes = 0;\n  const stack = [{ value: schema, depth: 0 }];\n  const schemaMapKeywords = [\n    '$defs',\n    'definitions',\n    'properties',\n    'patternProperties',\n    'dependentSchemas',\n    'dependencies',\n  ];\n  const schemaArrayKeywords = ['prefixItems', 'allOf', 'anyOf', 'oneOf', 'items'];\n  const schemaKeywords = [\n    'additionalProperties',\n    'unevaluatedProperties',\n    'additionalItems',\n    'unevaluatedItems',\n    'items',\n    'contains',\n    'propertyNames',\n    'not',\n    'if',\n    'then',\n    'else',\n    'contentSchema',\n  ];\n\n  while (stack.length > 0) {\n    const { value, depth } = stack.pop()!;\n    if (value === null || typeof value !== 'object' || Array.isArray(value) || seen.has(value)) continue;\n    seen.add(value);\n\n    nodes += 1;\n    if (depth > MAX_JSON_SCHEMA_DEPTH) {\n      return `JSON Schema exceeds the maximum depth of ${MAX_JSON_SCHEMA_DEPTH}`;\n    }\n    if (nodes > MAX_JSON_SCHEMA_NODES) {\n      return `JSON Schema exceeds the maximum node count of ${MAX_JSON_SCHEMA_NODES}`;\n    }\n\n    const record = value as Record<string, unknown>;\n    for (const keyword of schemaMapKeywords) {\n      const schemas = record[keyword];\n      if (schemas && typeof schemas === 'object' && !Array.isArray(schemas)) {\n        for (const child of Object.values(schemas)) stack.push({ value: child, depth: depth + 1 });\n      }\n    }\n    for (const keyword of schemaArrayKeywords) {\n      const schemas = record[keyword];\n      if (Array.isArray(schemas)) {\n        for (const child of schemas) stack.push({ value: child, depth: depth + 1 });\n      }\n    }\n    for (const keyword of schemaKeywords) {\n      if (record[keyword] !== undefined) stack.push({ value: record[keyword], depth: depth + 1 });\n    }\n  }\n\n  return undefined;\n}\n\nconst SUPPORTED_DIALECTS = new Set([\n  JSON_SCHEMA_2020_12,\n  `${JSON_SCHEMA_2020_12}#`,\n  'http://json-schema.org/draft-07/schema',\n  'http://json-schema.org/draft-07/schema#',\n]);\n\n/**\n * MCP 2026-07-28 schemas default to JSON Schema 2020-12 when they declare no dialect.\n * 2019-09 schemas (e.g. from zod v3 servers) are converted to 2020-12 when that can be done\n * faithfully, so tool calls are not rejected before they run.\n */\nfunction withDefaultDialect(schema: JSONSchema7): JSONSchema7 {\n  if (!schema.$schema) return { ...schema, $schema: JSON_SCHEMA_2020_12 };\n  if (SUPPORTED_DIALECTS.has(schema.$schema)) return schema;\n  return toJsonSchema2020(schema) ?? schema;\n}\nconst DEFAULT_INSTRUCTIONS_MAX_LENGTH = 512;\nconst DEFAULT_SERVER_LOG_LEVEL: LoggingLevel = 'info';\n\n/**\n * OAuth authorization state of an MCP server connection.\n *\n * - `needs-auth`: the server rejected the connection with a 401 and interactive\n *   authorization is required (see MCPClient.authenticate)\n * - `authorized`: the server accepted the configured authProvider's credentials\n *\n * Servers without an authProvider never carry an auth state.\n */\nexport type MCPServerAuthState = 'needs-auth' | 'authorized';\n\nconst DATADOG_TRACER_TEST_SYMBOL = Symbol.for('mastra.mcp.dd-trace-test-tracer');\n\ntype DatadogScopeLike = {\n  activate<T>(span: unknown, callback: () => T): T;\n};\n\ntype DatadogTracerLike = {\n  scope?: () => DatadogScopeLike;\n  default?: {\n    scope?: () => DatadogScopeLike;\n  };\n};\n\n/**\n * 2026-07-28 Streamable HTTP has no standalone GET stream; the only long-lived request is\n * the `subscriptions/listen` POST, whose response stays open for the life of the\n * subscription and must not hold the caller's active Datadog span open with it.\n */\nfunction shouldDetachPersistentTransportRequest(init?: RequestInit): boolean {\n  if (typeof init?.body !== 'string' || !init.body.includes('subscriptions/listen')) return false;\n  try {\n    const message: unknown = JSON.parse(init.body);\n    return typeof message === 'object' && message !== null && 'method' in message && message.method === 'subscriptions/listen';\n  } catch {\n    return false;\n  }\n}\n\n/**\n * Extract a human-readable error message from a failed CallToolResult's `content`.\n * Joins the text of all `text` content blocks, falling back to a generic message\n * when the server returned no text (e.g. only image/resource content).\n */\nfunction extractToolErrorText(content: unknown): string {\n  const fallback = 'MCP tool execution failed';\n  if (!Array.isArray(content)) return fallback;\n  const text = extractModelTextFromToolContent(content);\n  return text || fallback;\n}\n\n/**\n * Extract LLM-facing text from a successful CallToolResult's `content` blocks.\n * Per MCP spec, `content` is the human/model-readable channel; `structuredContent`\n * is for client/UI consumption.\n */\nfunction extractModelTextFromToolContent(content: unknown): string | undefined {\n  if (!Array.isArray(content)) return undefined;\n  const text = content\n    .filter((part): part is { type: 'text'; text: string } => {\n      return !!part && typeof part === 'object' && (part as { type?: unknown }).type === 'text';\n    })\n    .map(part => part.text)\n    .join('\\n')\n    .trim();\n  return text || undefined;\n}\n\n/**\n * Non-enumerable metadata attached to structured tool execute results so\n * `toModelOutput` can read MCP `content` without changing the execute return shape.\n *\n * When a tool has an `outputSchema` and the server returns `structuredContent`,\n * `execute()` returns that structured value directly. The rest of the\n * CallToolResult envelope is preserved on non-enumerable symbols:\n * - {@link MCP_CALL_TOOL_CONTENT} holds the MCP `content` blocks (model-facing text).\n * - {@link MCP_CALL_TOOL_META} holds the result-level `_meta` (e.g. `ui.resourceUri`\n *   used by MCP Apps hosts), with `ui.serverId` stamped by the client.\n *\n * Read them with {@link getMcpCallToolContent} and {@link getMcpCallToolMeta}.\n * Note: scalar or `null` structured results cannot carry properties, so these\n * channels are only available when `structuredContent` is an object or array.\n */\nexport const MCP_CALL_TOOL_CONTENT = Symbol.for('mastra.mcp.callToolContent');\n\n/** Non-enumerable result-level `_meta` attached to structured tool execute results. */\nexport const MCP_CALL_TOOL_META = Symbol.for('mastra.mcp.callToolMeta');\n\nfunction attachMcpCallToolContent(\n  structuredContent: unknown,\n  content: unknown,\n  _meta?: Record<string, unknown>,\n): unknown {\n  if (structuredContent !== null && typeof structuredContent === 'object') {\n    Object.defineProperty(structuredContent, MCP_CALL_TOOL_CONTENT, {\n      value: content,\n      enumerable: false,\n      configurable: true,\n    });\n    if (_meta !== undefined) {\n      Object.defineProperty(structuredContent, MCP_CALL_TOOL_META, {\n        value: _meta,\n        enumerable: false,\n        configurable: true,\n      });\n    }\n  }\n  return structuredContent;\n}\n\n/**\n * Read the MCP `content` blocks preserved on a structured tool execute result.\n * Returns `undefined` for scalar results or results without a hidden content channel.\n */\nexport function getMcpCallToolContent(output: unknown): unknown {\n  if (output === null || typeof output !== 'object') return undefined;\n  return (output as Record<PropertyKey, unknown>)[MCP_CALL_TOOL_CONTENT];\n}\n\n/**\n * Read the result-level `_meta` preserved on a structured tool execute result\n * (e.g. `_meta.ui.resourceUri` for MCP Apps detection). Returns `undefined` for\n * scalar results or results whose CallToolResult had no `_meta`.\n */\nexport function getMcpCallToolMeta(output: unknown): Record<string, unknown> | undefined {\n  if (output === null || typeof output !== 'object') return undefined;\n  return (output as Record<PropertyKey, unknown>)[MCP_CALL_TOOL_META] as Record<string, unknown> | undefined;\n}\n\nfunction createStructuredToolToModelOutput(): (output: unknown) =>\n  | { type: 'text'; value: string }\n  | { type: 'json'; value: unknown } {\n  return output => {\n    const modelText = extractModelTextFromToolContent(getMcpCallToolContent(output));\n    if (modelText !== undefined) {\n      return { type: 'text', value: modelText };\n    }\n    return { type: 'json', value: output };\n  };\n}\n\nfunction getDatadogScope(): DatadogScopeLike | null {\n  const testTracer = (globalThis as Record<PropertyKey, unknown>)[DATADOG_TRACER_TEST_SYMBOL] as\n    | DatadogTracerLike\n    | undefined;\n  const tracer = testTracer ?? loadDatadogTracer();\n\n  if (typeof tracer?.scope === 'function') {\n    return tracer.scope();\n  }\n\n  if (typeof tracer?.default?.scope === 'function') {\n    return tracer.default.scope();\n  }\n\n  return null;\n}\n\nfunction loadDatadogTracer(): DatadogTracerLike | null {\n  if (!isDatadogTracerLikelyLoaded()) {\n    return null;\n  }\n\n  try {\n    const req = createRequire(import.meta.url);\n    return req('dd-trace') as DatadogTracerLike;\n  } catch {\n    return null;\n  }\n}\n\nfunction isDatadogTracerLikelyLoaded(): boolean {\n  if ((globalThis as Record<PropertyKey, unknown>)[DATADOG_TRACER_TEST_SYMBOL]) {\n    return true;\n  }\n\n  if (process.execArgv.some(arg => arg.includes('dd-trace'))) {\n    return true;\n  }\n\n  if (process.env.NODE_OPTIONS?.includes('dd-trace')) {\n    return true;\n  }\n\n  try {\n    const req = createRequire(import.meta.url);\n    const resolvedPath = req.resolve('dd-trace');\n    return Boolean(req.cache[resolvedPath]);\n  } catch {\n    return false;\n  }\n}\n\nfunction runOutsideDatadogTraceScope<T>(callback: () => T): T {\n  const scope = getDatadogScope();\n  if (!scope) {\n    return callback();\n  }\n\n  return scope.activate(null, callback);\n}\n\n/**\n * Convert an MCP LoggingLevel to a logger method name that exists in our logger\n */\nfunction convertLogLevelToLoggerMethod(level: LoggingLevel): 'debug' | 'info' | 'warn' | 'error' {\n  switch (level) {\n    case 'debug':\n      return 'debug';\n    case 'info':\n    case 'notice':\n      return 'info';\n    case 'warning':\n      return 'warn';\n    case 'error':\n    case 'critical':\n    case 'alert':\n    case 'emergency':\n      return 'error';\n    default:\n      return 'info';\n  }\n}\n\n/** Maps the per-server `protocolVersion` option onto the SDK negotiation mode. */\nfunction negotiationMode(protocolVersion: MCPClientProtocolVersion | undefined): VersionNegotiationMode {\n  if (protocolVersion === undefined) return 'auto';\n  return protocolVersion === 'legacy' ? 'legacy' : { pin: protocolVersion };\n}\n\n/**\n * Internal MCP client implementation for connecting to a single MCP server.\n *\n * Probes the server with `server/discover` unless `protocolVersion` pins a\n * revision, then speaks whichever revision was negotiated. On 2026-07-28 there is\n * no session, embedded input requests are answered through the configured\n * `inputRequests` handler, and change notifications arrive on one managed\n * `subscriptions/listen` stream (see {@link subscribeResource}). Those two\n * facilities fail on a legacy negotiation; everything else works on either revision.\n *\n * @internal\n */\nexport class InternalMastraMCPClient extends MastraBase {\n  name: string;\n  private client: Client;\n  private readonly timeout: number;\n  private logHandler?: LogHandler;\n  private readonly serverLogLevel?: LoggingLevel;\n  private enableProgressTracking: boolean;\n  private serverConfig: MastraMCPServerDefinition;\n  private transport?: Transport;\n  private pendingAuthTransport?: StreamableHTTPClientTransport;\n  private clientBaseOnClose?: () => void;\n  private clientConnectionOnClose?: () => void;\n  private _authState?: MCPServerAuthState;\n  private operationContextStore = new AsyncLocalStorage<RequestContext | null>();\n  private exitHookUnsubscribe?: () => void;\n  private sigTermHandler?: () => void;\n  private sigHupHandler?: () => void;\n  private serverInstructions?: string;\n  private serverImplementation?: MCPServerImplementation;\n  /** The verdict of the last successful probe, reused so reconnects skip it. */\n  private priorDiscovery?: PriorDiscovery;\n  private readonly requireToolApproval: RequireToolApproval | undefined;\n  private readonly onToolError: 'throw' | 'return';\n  private jsonSchemaValidator?: jsonSchemaValidator;\n  private jsonSchemaValidatorPromise?: Promise<jsonSchemaValidator>;\n\n  /** Provides access to resource operations (list, read, notifications) */\n  public readonly resources: ResourceClientActions;\n  /** Provides access to prompt operations (list, get, notifications) */\n  public readonly prompts: PromptClientActions;\n  /** Provides access to progress operations (notifications) */\n  public readonly progress: ProgressClientActions;\n\n  /**\n   * @internal\n   */\n  constructor({ name, version = '1.0.0', server, timeout = DEFAULT_REQUEST_TIMEOUT_MSEC }: InternalMastraMCPClientOptions) {\n    super({ name: 'MastraMCPClient' });\n    this.name = name;\n    this.timeout = timeout;\n    this.logHandler = server.logger;\n    this.serverLogLevel =\n      (server.enableServerLogs ?? true) ? (server.serverLogLevel ?? DEFAULT_SERVER_LOG_LEVEL) : undefined;\n    this.serverConfig = server;\n    this.enableProgressTracking = !!server.enableProgressTracking;\n    this.requireToolApproval = server.requireToolApproval;\n    this.onToolError = server.onToolError ?? 'throw';\n    this.jsonSchemaValidator = server.jsonSchemaValidator;\n\n    const configured = server.capabilities ?? {};\n    if (configured.elicitation !== undefined && !server.inputRequests) {\n      throw new Error(\n        `MCP server '${name}' advertises the elicitation capability without an inputRequests handler. Configure inputRequests or remove capabilities.elicitation.`,\n      );\n    }\n    const clientCapabilities: ClientCapabilities = {\n      ...(server.inputRequests ? { elicitation: configured.elicitation ?? { form: {} } } : {}),\n      // Advertise MCP Apps extension support so servers know we can render UI resources\n      extensions: {\n        ...(configured.extensions ?? {}),\n        'io.modelcontextprotocol/ui': {},\n      },\n    };\n\n    this.client = new Client(\n      { name, version },\n      {\n        capabilities: clientCapabilities,\n        ...(server.jsonSchemaValidator ? { jsonSchemaValidator: server.jsonSchemaValidator } : {}),\n        versionNegotiation: { mode: negotiationMode(server.protocolVersion) },\n      },\n    );\n\n    if (server.inputRequests) {\n      const handler = server.inputRequests;\n      this.client.setRequestHandler('elicitation/create', async (request, ctx) => {\n        this.log('debug', `Answering input request '${String(ctx.mcpReq.id)}'`);\n        return handler({ key: String(ctx.mcpReq.id), params: request.params, signal: ctx.mcpReq.signal });\n      });\n    }\n\n    if (this.serverLogLevel) {\n      this.client.setNotificationHandler('notifications/message', notification => {\n        const { level, ...params } = notification.params;\n        this.log(level, '[MCP SERVER LOG]', params);\n      });\n    }\n\n    this.resources = new ResourceClientActions({ client: this, logger: this.logger });\n    this.prompts = new PromptClientActions({ client: this, logger: this.logger });\n    this.progress = new ProgressClientActions({ client: this, logger: this.logger });\n  }\n\n  /**\n   * Log a message at the specified level\n   */\n  private log(level: LoggingLevel, message: string, details?: Record<string, any>): void {\n    const loggerMethod = convertLogLevelToLoggerMethod(level);\n    const msg = `[${this.name}] ${message}`;\n\n    this.logger[loggerMethod](msg, details);\n\n    if (this.logHandler) {\n      this.logHandler({\n        level,\n        message: msg,\n        timestamp: new Date(),\n        serverName: this.name,\n        details,\n        requestContext: this.operationContextStore.getStore() ?? null,\n      });\n    }\n  }\n\n  /**\n   * Request metadata every outgoing request carries: the per-request log-level\n   * opt-in (when enabled) and the W3C trace fields resolved for this request,\n   * merged under caller-supplied keys.\n   */\n  private requestMeta(meta?: Record<string, unknown>): Record<string, unknown> | undefined {\n    const traceContext = this.serverConfig.traceContext?.();\n    const merged = {\n      ...(this.serverLogLevel ? { [LOG_LEVEL_META_KEY]: this.serverLogLevel } : {}),\n      ...(traceContext ? traceContextToMeta(traceContext) : {}),\n      ...meta,\n    };\n    return Object.keys(merged).length > 0 ? merged : undefined;\n  }\n\n  private buildStdioEnv(): Record<string, string> {\n    const configured = this.serverConfig.env || {};\n    if (this.serverConfig.inheritDefaultEnv === false) {\n      // The SDK's StdioClientTransport unconditionally spreads getDefaultEnvironment()\n      // under the env we pass it, so an empty base alone cannot suppress the curated\n      // defaults. Explicitly override each curated key with undefined — Node's spawn\n      // drops env entries whose value is undefined — so only configured entries reach\n      // the subprocess.\n      const suppressed: Record<string, string | undefined> = {};\n      for (const key of Object.keys(getDefaultEnvironment())) {\n        suppressed[key] = undefined;\n      }\n      return { ...suppressed, ...configured } as Record<string, string>;\n    }\n    return { ...getDefaultEnvironment(), ...configured };\n  }\n\n  private async connectStdio(command: string) {\n    this.log('debug', `Using Stdio transport for command: ${command}`);\n    // Held locally until the connect succeeds, mirroring connectHttp, so a failed\n    // attempt leaves `this.transport` unset. connect()'s failure branch keys the\n    // process-hook release on that, and a lingering transport would suppress it.\n    const transport = new StdioClientTransport({\n      command,\n      args: this.serverConfig.args,\n      env: this.buildStdioEnv(),\n      stderr: this.serverConfig.stderr,\n      cwd: this.serverConfig.cwd,\n    });\n    try {\n      await this.client.connect(transport, {\n        timeout: this.serverConfig.timeout ?? this.timeout,\n        prior: this.priorDiscovery,\n      });\n      this.transport = transport;\n      this.log('debug', `Successfully connected to MCP server via Stdio`);\n    } catch (e) {\n      this.log('error', e instanceof Error ? e.stack || e.message : JSON.stringify(e));\n      // client.connect() may already have spawned the child before throwing, and\n      // nothing else holds this transport now, so close it here or the subprocess\n      // outlives the failed attempt.\n      await transport.close().catch(() => {});\n      throw e;\n    }\n  }\n\n  private async connectHttp(url: URL) {\n    const { requestInit, authProvider, connectTimeout, fetch: userFetch, allowedHosts } = this.serverConfig;\n\n    // Fail fast with a clear error before any transport is constructed.\n    if (allowedHosts !== undefined) {\n      assertHostAllowed(url, allowedHosts);\n    }\n\n    // Wrap fetch so request-scoped metadata still flows through normal MCP POSTs, while\n    // long-lived streams do not inherit the active Datadog span. When allowedHosts is\n    // set, the same wrapper enforces the host policy: on the default path via manual\n    // redirect following (hops blocked before being sent), and on the custom-fetch path\n    // via a pre-request check plus post-hoc response validation.\n    const policyUserFetch =\n      userFetch && allowedHosts !== undefined ? wrapFetchWithHostPolicy(userFetch, allowedHosts) : undefined;\n    const fetch: FetchLike = (requestUrl: string | URL, init?: RequestInit) => {\n      const requestContext = this.operationContextStore.getStore() ?? null;\n      const executeFetch = (): Promise<Response> => {\n        if (allowedHosts === undefined) {\n          return userFetch ? userFetch(requestUrl, init, requestContext) : globalThis.fetch(requestUrl, init);\n        }\n        if (policyUserFetch) {\n          return policyUserFetch(requestUrl, init, requestContext);\n        }\n        return fetchFollowingAllowedRedirects(\n          (u: string | URL, i?: RequestInit) => globalThis.fetch(u, i),\n          requestUrl,\n          init,\n          allowedHosts,\n        );\n      };\n\n      return shouldDetachPersistentTransportRequest(init) ? runOutsideDatadogTraceScope(executeFetch) : executeFetch();\n    };\n\n    this.log('debug', `Connecting to URL: ${url}`);\n\n    // Constructed outside the try so an UnauthorizedError can keep a handle on the\n    // transport that started the authorization flow (finishAuth must run on it).\n    const transport = new StreamableHTTPClientTransport(url, { requestInit, authProvider, fetch });\n    try {\n      await this.client.connect(transport, {\n        timeout: connectTimeout ?? DEFAULT_SERVER_CONNECT_TIMEOUT_MSEC,\n        prior: this.priorDiscovery,\n      });\n      this.transport = transport;\n      this.log('debug', 'Successfully connected using Streamable HTTP transport.');\n      // Close any transport left pending from an earlier 401: authorization is satisfied.\n      this.closePendingAuthTransport();\n      if (authProvider) {\n        this._authState = 'authorized';\n      }\n    } catch (error) {\n      this.log('debug', `Streamable HTTP transport failed: ${error}`);\n      // A 401 means the flow continues on this transport via finishAuth: the SDK has\n      // already run discovery and redirected to authorization. Guarded on authProvider\n      // so servers without one never carry an auth state.\n      if (authProvider && error instanceof UnauthorizedError) {\n        this.markNeedsAuth(transport);\n      }\n      throw error;\n    }\n  }\n\n  /**\n   * Detaches whatever transport is still attached to the underlying SDK Client.\n   *\n   * The SDK assigns its internal `_transport` before `transport.start()` and never\n   * clears it when `start()` throws, so a stale transport can remain attached and\n   * make every subsequent `client.connect()` throw \"Already connected to a\n   * transport\". Mastra's own `this.transport` is only assigned after a successful\n   * connect, so disconnect/forceReconnect never see the stale one.\n   */\n  private async detachStaleClientTransport(): Promise<void> {\n    const stale = this.client.transport;\n    if (!stale) {\n      return;\n    }\n    if (stale === this.pendingAuthTransport) {\n      // Keep the transport alive: finishAuth must complete the OAuth flow on it.\n      // Just sever its link to the SDK client so the next connect isn't rejected.\n      this.severClientTransportLink(stale);\n      return;\n    }\n    this.log('debug', 'Closing stale SDK client transport before connect attempt');\n    try {\n      await stale.close();\n    } catch (e) {\n      this.log('debug', 'Error closing stale SDK client transport (ignored)', {\n        error: e instanceof Error ? e.message : String(e),\n      });\n    }\n    this.severClientTransportLink(stale);\n  }\n\n  /**\n   * Severs the mutual references between the SDK client and a stale transport\n   * without closing it, so a later close() of the stale transport cannot reach\n   * into the SDK client and clear the state of a newer live connection.\n   */\n  private severClientTransportLink(stale: Transport): void {\n    stale.onclose = undefined;\n    stale.onerror = undefined;\n    stale.onmessage = undefined;\n    if (this.client.transport === stale) {\n      (this.client as unknown as { _transport?: Transport })._transport = undefined;\n      // The listen stream rode on this transport; connect() reopens it from interest.\n      this.subscriptionStream = undefined;\n    }\n  }\n\n  /**\n   * Closes and clears any transport retained from an unfinished authorization\n   * flow. Safe to call when nothing is pending.\n   */\n  private closePendingAuthTransport(replacement?: StreamableHTTPClientTransport): void {\n    const pending = this.pendingAuthTransport;\n    this.pendingAuthTransport = replacement;\n    if (pending && pending !== replacement) {\n      void pending.close().catch(() => {});\n    }\n  }\n\n  /**\n   * Records that the server rejected the connection with a 401 and keeps the\n   * transport that started the authorization flow so finishAuth can complete it.\n   */\n  private markNeedsAuth(transport: StreamableHTTPClientTransport): void {\n    this.closePendingAuthTransport(transport);\n    this._authState = 'needs-auth';\n    this.log('debug', 'Server requires OAuth authorization before connecting.');\n  }\n\n  /**\n   * OAuth authorization state of this server connection, when it has an authProvider.\n   *\n   * @internal\n   */\n  get authState(): MCPServerAuthState | undefined {\n    return this._authState;\n  }\n\n  /**\n   * Completes a pending OAuth authorization-code flow.\n   *\n   * Exchanges the authorization code captured at the redirect URI on the same\n   * transport that started the flow, then leaves the client ready to connect().\n   * The RFC 9207 `iss` captured at the redirect is validated against the\n   * discovered authorization server before the code is exchanged.\n   *\n   * @internal\n   */\n  async finishAuth(authorizationCode: string, issuer?: string): Promise<void> {\n    const pending = this.pendingAuthTransport;\n    if (!pending) {\n      throw new Error('No OAuth authorization is pending for this server. Call connect() first.');\n    }\n    this.pendingAuthTransport = undefined;\n    try {\n      await pending.finishAuth(authorizationCode, issuer);\n    } finally {\n      // The pending transport only ran the token exchange; the next connect() builds a fresh one.\n      void pending.close().catch(() => {});\n    }\n  }\n\n  private isConnected: Promise<boolean> | null = null;\n  private reconnectPromise: Promise<void> | null = null;\n\n  /**\n   * Change notifications the caller has asked for. The client keeps exactly one\n   * `subscriptions/listen` stream open for this interest set, replaces it when the\n   * set changes and reopens it after a reconnect.\n   */\n  private subscriptionInterest = {\n    toolsListChanged: false,\n    promptsListChanged: false,\n    resourcesListChanged: false,\n    resourceSubscriptions: new Set<string>(),\n  };\n  private subscriptionStream?: McpSubscription;\n  private subscriptionUpdate: Promise<unknown> = Promise.resolve();\n  private lifecycleGeneration = 0;\n\n  /**\n   * Connects to the MCP server using the configured transport.\n   *\n   * Safe to call multiple times - returns existing connection if already connected.\n   *\n   * @internal\n   */\n  async connect() {\n    if (this.isConnected) {\n      return this.isConnected;\n    }\n\n    this.isConnected = new Promise<boolean>(async (resolve, reject) => {\n      try {\n        await this.detachStaleClientTransport();\n\n        const { command, url } = this.serverConfig;\n\n        if (command) {\n          await this.connectStdio(command);\n        } else if (url) {\n          await this.connectHttp(url);\n        } else {\n          throw new Error('Server configuration must include either a command or a url.');\n        }\n\n        this.serverInstructions = this.client.getInstructions();\n        this.serverImplementation = this.client.getServerVersion();\n        this.rememberNegotiation();\n\n        if (this.hasSubscriptionInterest()) {\n          try {\n            await this.enqueueSubscriptionUpdate(() => this.replaceSubscriptionStream());\n          } catch (error) {\n            // The connection stays usable; the next subscribe/handler registration retries.\n            this.log('error', 'Failed to restore subscriptions/listen after connecting', {\n              error: error instanceof Error ? error.message : String(error),\n            });\n          }\n        }\n\n        resolve(true);\n\n        // Scope the reset to this connection so an older handler retained across\n        // reconnects cannot clear the state of a replacement connection.\n        const connectedTransport = this.transport;\n        const connectionPromise = this.isConnected;\n        if (this.client.onclose !== this.clientConnectionOnClose) {\n          this.clientBaseOnClose = this.client.onclose;\n        }\n        const connectionOnClose = () => {\n          if (this.transport === connectedTransport) {\n            this.log('debug', `MCP server connection closed`);\n            const staleTransport = this.transport;\n            this.transport = undefined;\n            if (this.isConnected === connectionPromise) {\n              this.isConnected = null;\n            }\n            this.serverInstructions = undefined;\n            this.serverImplementation = undefined;\n            this.subscriptionStream = undefined;\n            if (staleTransport) {\n              this.severClientTransportLink(staleTransport);\n              void staleTransport.close().catch(() => {});\n            }\n          }\n          this.clientBaseOnClose?.();\n        };\n        this.clientConnectionOnClose = connectionOnClose;\n        this.client.onclose = connectionOnClose;\n      } catch (e) {\n        // A connect that never reached a transport leaves nothing for disconnect() to\n        // tear down, so the process hooks must not outlive the failed attempt. A live\n        // transport means an earlier connection still owns them.\n        if (!this.transport) {\n          this.unregisterProcessHooks();\n        }\n        this.isConnected = null;\n        // A failed connect invalidates the cached verdict so a legacy verdict cannot stick.\n        this.priorDiscovery = undefined;\n        reject(e);\n      }\n    });\n\n    // Registered before the connection settles so an exit during a connect attempt still\n    // tears down anything the transport already started (a spawned stdio child, say).\n    // The failure path inside the promise removes them again.\n    this.registerProcessHooks();\n\n    return this.isConnected;\n  }\n\n  /**\n   * Installs the process-exit and signal handlers that tear this client down when the\n   * host process goes away. Idempotent, so repeated connects add at most one of each.\n   */\n  private registerProcessHooks() {\n    if (!this.exitHookUnsubscribe) {\n      this.exitHookUnsubscribe = asyncExitHook(\n        async () => {\n          this.log('debug', `Disconnecting MCP server during exit`);\n          await this.disconnect();\n        },\n        { wait: 5000 },\n      );\n    }\n\n    if (!this.sigTermHandler) {\n      this.sigTermHandler = () => gracefulExit();\n      process.on('SIGTERM', this.sigTermHandler);\n    }\n\n    if (!this.sigHupHandler) {\n      this.sigHupHandler = () => gracefulExit();\n      process.on('SIGHUP', this.sigHupHandler);\n    }\n  }\n\n  /**\n   * Removes whatever {@link registerProcessHooks} installed. Keyed on the handlers this\n   * client actually registered rather than on connection state, so a client that never\n   * reached a transport still releases its process listeners.\n   */\n  private unregisterProcessHooks() {\n    if (this.exitHookUnsubscribe) {\n      this.exitHookUnsubscribe();\n      this.exitHookUnsubscribe = undefined;\n    }\n    if (this.sigTermHandler) {\n      process.off('SIGTERM', this.sigTermHandler);\n      this.sigTermHandler = undefined;\n    }\n    if (this.sigHupHandler) {\n      process.off('SIGHUP', this.sigHupHandler);\n      this.sigHupHandler = undefined;\n    }\n  }\n\n  /**\n   * Gets the stderr stream of the child process, if using stdio transport with `stderr: 'pipe'`.\n   *\n   * @internal\n   */\n  get stderr(): Stream | null {\n    if (this.transport instanceof StdioClientTransport) {\n      return this.transport.stderr;\n    }\n    return null;\n  }\n\n  get instructions(): string | undefined {\n    return this.serverInstructions;\n  }\n\n  /** The identity (`serverInfo`) the server announced on connect; `undefined` until connected or if the server announced none. */\n  get serverInfo(): MCPServerImplementation | undefined {\n    return this.serverImplementation;\n  }\n\n  /** The protocol revision negotiated with the server; `undefined` until connected. */\n  get negotiatedProtocolVersion(): string | undefined {\n    return this.client.getNegotiatedProtocolVersion();\n  }\n\n  private rememberNegotiation(): void {\n    if (this.serverConfig.protocolVersion !== undefined) return;\n    const discover = this.client.getDiscoverResult();\n    this.priorDiscovery =\n      this.client.getProtocolEra() === 'modern' && discover ? { kind: 'modern', discover } : { kind: 'legacy' };\n    this.log('debug', `Negotiated protocol revision ${this.negotiatedProtocolVersion}`);\n  }\n\n  /** Fails a call that only the 2026-07-28 revision supports when the server negotiated an older one. */\n  private assertCurrentRevision(feature: string): void {\n    const negotiated = this.negotiatedProtocolVersion;\n    if (negotiated !== undefined && negotiated !== MCP_CLIENT_PROTOCOL_VERSION) {\n      throw new Error(\n        `${feature} needs MCP ${MCP_CLIENT_PROTOCOL_VERSION}, but server '${this.name}' negotiated ${negotiated}`,\n      );\n    }\n  }\n\n  get forwardInstructions(): boolean {\n    return this.serverConfig.forwardInstructions ?? false;\n  }\n\n  get instructionsMaxLength(): number {\n    return this.serverConfig.instructionsMaxLength ?? DEFAULT_INSTRUCTIONS_MAX_LENGTH;\n  }\n\n  async disconnect() {\n    // Invalidate tool calls that started before this explicit teardown. Their\n    // recovery path must not establish a replacement connection afterwards.\n    this.lifecycleGeneration++;\n\n    const reconnectPromise = this.reconnectPromise;\n    if (reconnectPromise) {\n      await reconnectPromise.catch(() => {});\n    }\n\n    this.closePendingAuthTransport();\n    if (!this.transport) {\n      await this.detachStaleClientTransport();\n      // A client whose connect() failed still holds process hooks; there is simply no\n      // transport to close. Release them here or they outlive the client entirely.\n      this.unregisterProcessHooks();\n      this.log('debug', 'Disconnect called but no transport was connected.');\n      return;\n    }\n    this.log('debug', `Disconnecting from MCP server`);\n    const disconnectedTransport = this.transport;\n    try {\n      await this.closeSubscriptionStream();\n      await disconnectedTransport.close();\n      this.log('debug', 'Successfully disconnected from MCP server');\n    } catch (e) {\n      this.log('error', 'Error during MCP server disconnect', {\n        error: e instanceof Error ? e.stack : JSON.stringify(e, null, 2),\n      });\n      throw e;\n    } finally {\n      this.severClientTransportLink(disconnectedTransport);\n      this.transport = undefined;\n      this.isConnected = null;\n      this.serverInstructions = undefined;\n      this.serverImplementation = undefined;\n\n      this.unregisterProcessHooks();\n    }\n  }\n\n  /**\n   * Forces a reconnection to the MCP server by disconnecting and reconnecting.\n   *\n   * @internal\n   */\n  async forceReconnect(): Promise<void> {\n    if (this.reconnectPromise) {\n      this.log('debug', 'Reconnection already in progress; waiting for it to complete');\n      return await this.reconnectPromise;\n    }\n\n    const reconnectPromise = (async () => {\n      this.log('debug', 'Forcing reconnection to MCP server...');\n\n      this.closePendingAuthTransport();\n\n      const disconnectedTransport = this.transport;\n      try {\n        if (disconnectedTransport) {\n          await disconnectedTransport.close();\n        }\n      } catch (e) {\n        this.log('debug', 'Error during force disconnect (ignored)', {\n          error: e instanceof Error ? e.message : String(e),\n        });\n      } finally {\n        if (disconnectedTransport) {\n          this.severClientTransportLink(disconnectedTransport);\n        }\n      }\n\n      // Reset connection state only when it still belongs to the transport that\n      // this reconnect attempt disconnected.\n      if (!disconnectedTransport || this.transport === disconnectedTransport) {\n        this.transport = undefined;\n        this.isConnected = null;\n        this.serverInstructions = undefined;\n        this.serverImplementation = undefined;\n      }\n\n      await this.connect();\n      this.log('debug', 'Successfully reconnected to MCP server');\n    })();\n    this.reconnectPromise = reconnectPromise;\n\n    try {\n      await reconnectPromise;\n    } finally {\n      if (this.reconnectPromise === reconnectPromise) {\n        this.reconnectPromise = null;\n      }\n    }\n  }\n\n  private async reconnectAfterTransportFailure(failedTransport: Transport | undefined, lifecycleGeneration: number) {\n    while (true) {\n      if (this.lifecycleGeneration !== lifecycleGeneration) {\n        throw new Error('MCP client was disconnected while recovering the failed transport');\n      }\n\n      const reconnectPromise = this.reconnectPromise;\n      if (reconnectPromise) {\n        await reconnectPromise;\n        continue;\n      }\n\n      if (failedTransport && this.transport && this.transport !== failedTransport) {\n        this.log('debug', 'Connection was already replaced after the failed operation; skipping reconnect');\n        return;\n      }\n\n      await this.forceReconnect();\n\n      if (this.lifecycleGeneration !== lifecycleGeneration) {\n        throw new Error('MCP client was disconnected while recovering the failed transport');\n      }\n      return;\n    }\n  }\n\n  async listResources(): Promise<ListResourcesResult> {\n    this.log('debug', `Requesting resources from MCP server`);\n    return await this.client.listResources({ _meta: this.requestMeta() }, { timeout: this.timeout });\n  }\n\n  async readResource(uri: string): Promise<ReadResourceResult> {\n    this.log('debug', `Reading resource from MCP server: ${uri}`);\n    return await this.client.readResource({ uri, _meta: this.requestMeta() }, { timeout: this.timeout });\n  }\n\n  async listResourceTemplates(): Promise<ListResourceTemplatesResult> {\n    this.log('debug', `Requesting resource templates from MCP server`);\n    return await this.client.listResourceTemplates({ _meta: this.requestMeta() }, { timeout: this.timeout });\n  }\n\n  /**\n   * Fetch the list of available prompts from the MCP server.\n   */\n  async listPrompts(): Promise<ListPromptsResult> {\n    this.log('debug', `Requesting prompts from MCP server`);\n    return await this.client.listPrompts({ _meta: this.requestMeta() }, { timeout: this.timeout });\n  }\n\n  /**\n   * Get a prompt and its dynamic messages from the server.\n   */\n  async getPrompt({ name, args }: { name: string; args?: Record<string, any> }): Promise<GetPromptResult> {\n    this.log('debug', `Requesting prompt from MCP server: ${name}`);\n    return await this.client.getPrompt(\n      { name, arguments: args, _meta: this.requestMeta() },\n      { timeout: this.timeout },\n    );\n  }\n\n  private hasSubscriptionInterest(): boolean {\n    const interest = this.subscriptionInterest;\n    return (\n      interest.toolsListChanged ||\n      interest.promptsListChanged ||\n      interest.resourcesListChanged ||\n      interest.resourceSubscriptions.size > 0\n    );\n  }\n\n  private subscriptionFilter(): SubscriptionFilter {\n    const interest = this.subscriptionInterest;\n    return {\n      ...(interest.toolsListChanged ? { toolsListChanged: true } : {}),\n      ...(interest.promptsListChanged ? { promptsListChanged: true } : {}),\n      ...(interest.resourcesListChanged ? { resourcesListChanged: true } : {}),\n      ...(interest.resourceSubscriptions.size > 0\n        ? { resourceSubscriptions: [...interest.resourceSubscriptions].sort() }\n        : {}),\n    };\n  }\n\n  /** Serializes stream replacements so concurrent mutations apply in order. */\n  private enqueueSubscriptionUpdate<T>(update: () => Promise<T>): Promise<T> {\n    const operation = this.subscriptionUpdate.catch(() => {}).then(update);\n    this.subscriptionUpdate = operation;\n    return operation;\n  }\n\n  /**\n   * Opens a `subscriptions/listen` stream for the current interest set, then closes the\n   * previous one so no notification is lost between filters. Resource subscriptions the\n   * server declines are an error; declined list-changed bits only mean the server has\n   * nothing to announce.\n   */\n  private async replaceSubscriptionStream(): Promise<void> {\n    this.assertCurrentRevision('subscriptions/listen');\n    const previous = this.subscriptionStream;\n    const filter = this.subscriptionFilter();\n    this.log('debug', 'Opening subscriptions/listen stream', { filter });\n    const replacement = this.hasSubscriptionInterest()\n      ? await this.client.listen(filter, { timeout: this.timeout })\n      : undefined;\n\n    if (replacement && filter.resourceSubscriptions) {\n      const honored = new Set(replacement.honoredFilter.resourceSubscriptions ?? []);\n      const declined = filter.resourceSubscriptions.filter(uri => !honored.has(uri));\n      if (declined.length > 0) {\n        await replacement.close();\n        throw new Error(`Server declined resource subscriptions for: ${declined.join(', ')}`);\n      }\n    }\n\n    this.subscriptionStream = replacement;\n    if (replacement) {\n      void replacement.closed.then(() => {\n        if (this.subscriptionStream === replacement) this.subscriptionStream = undefined;\n      });\n    }\n    await previous?.close();\n  }\n\n  private async closeSubscriptionStream(): Promise<void> {\n    await this.subscriptionUpdate.catch(() => {});\n    const stream = this.subscriptionStream;\n    this.subscriptionStream = undefined;\n    await stream?.close();\n  }\n\n  /** Applies an interest change to the live stream when connected; otherwise connect() opens it. */\n  private async applySubscriptionInterest(): Promise<void> {\n    if (!this.transport) return;\n    await this.enqueueSubscriptionUpdate(() => this.replaceSubscriptionStream());\n  }\n\n  /**\n   * Subscribes to `notifications/resources/updated` for a resource. The subscription is\n   * carried on the client's single `subscriptions/listen` stream and survives reconnects.\n   */\n  async subscribeResource(uri: string): Promise<void> {\n    this.log('debug', `Subscribing to resource: ${uri}`);\n    await this.enqueueSubscriptionUpdate(async () => {\n      if (this.subscriptionInterest.resourceSubscriptions.has(uri) && this.subscriptionStream) return;\n      const next = new Set(this.subscriptionInterest.resourceSubscriptions);\n      next.add(uri);\n      await this.updateResourceSubscriptions(next);\n    });\n  }\n\n  async unsubscribeResource(uri: string): Promise<void> {\n    this.log('debug', `Unsubscribing from resource: ${uri}`);\n    await this.enqueueSubscriptionUpdate(async () => {\n      if (!this.subscriptionInterest.resourceSubscriptions.has(uri)) return;\n      const next = new Set(this.subscriptionInterest.resourceSubscriptions);\n      next.delete(uri);\n      await this.updateResourceSubscriptions(next);\n    });\n  }\n\n  private async updateResourceSubscriptions(next: Set<string>): Promise<void> {\n    const previous = this.subscriptionInterest.resourceSubscriptions;\n    this.subscriptionInterest.resourceSubscriptions = next;\n    if (!this.transport) return;\n    try {\n      await this.replaceSubscriptionStream();\n    } catch (error) {\n      this.subscriptionInterest.resourceSubscriptions = previous;\n      throw error;\n    }\n  }\n\n  async setPromptListChangedNotificationHandler(handler: () => void): Promise<void> {\n    this.client.setNotificationHandler('notifications/prompts/list_changed', () => {\n      handler();\n    });\n    this.subscriptionInterest.promptsListChanged = true;\n    await this.applySubscriptionInterest();\n  }\n\n  async setToolListChangedNotificationHandler(handler: () => void): Promise<void> {\n    this.client.setNotificationHandler('notifications/tools/list_changed', () => {\n      handler();\n    });\n    this.subscriptionInterest.toolsListChanged = true;\n    await this.applySubscriptionInterest();\n  }\n\n  setResourceUpdatedNotificationHandler(handler: (params: { uri: string }) => void): void {\n    this.client.setNotificationHandler('notifications/resources/updated', notification => {\n      handler(notification.params);\n    });\n  }\n\n  async setResourceListChangedNotificationHandler(handler: () => void): Promise<void> {\n    this.client.setNotificationHandler('notifications/resources/list_changed', () => {\n      handler();\n    });\n    this.subscriptionInterest.resourcesListChanged = true;\n    await this.applySubscriptionInterest();\n  }\n\n  setProgressNotificationHandler(handler: ProgressHandler): void {\n    this.client.setNotificationHandler('notifications/progress', notification => {\n      handler(notification.params);\n    });\n  }\n\n  private async getJsonSchemaValidator(): Promise<jsonSchemaValidator> {\n    if (this.jsonSchemaValidator) return this.jsonSchemaValidator;\n\n    this.jsonSchemaValidatorPromise ??= import('@modelcontextprotocol/client/validators/ajv').then(\n      ({ AjvJsonSchemaValidator }) => new AjvJsonSchemaValidator(),\n    );\n    this.jsonSchemaValidator = await this.jsonSchemaValidatorPromise;\n    return this.jsonSchemaValidator;\n  }\n\n  private convertInputSchema(inputSchema: MCPToolListEntry['inputSchema']): StandardSchemaWithJSON {\n    const schema = withDefaultDialect(('jsonSchema' in inputSchema ? inputSchema.jsonSchema : inputSchema) as JSONSchema7);\n    const standardSchema = toStandardSchema(schema);\n    const complexityError = getJsonSchemaComplexityError(schema);\n    if (!complexityError) return standardSchema;\n\n    return {\n      '~standard': {\n        ...standardSchema['~standard'],\n        validate: () => ({ issues: [{ message: complexityError }] }),\n      },\n    };\n  }\n\n  /**\n   * Wraps the output schema with a validator that always succeeds. The tool's execute wrapper\n   * returns the full CallToolResult envelope when there is no structuredContent (and for\n   * in-band errors with `onToolError: 'return'`), which would never match the advertised\n   * outputSchema — so enforcement happens inside the execute wrapper, scoped to the\n   * structuredContent path (see buildToolFromListEntry). The JSON schema is surfaced here\n   * for documentation.\n   */\n  private convertOutputSchema(outputSchema: MCPToolListEntry['outputSchema']): StandardSchemaWithJSON | undefined {\n    if (!outputSchema) return outputSchema;\n    const schema = withDefaultDialect(('jsonSchema' in outputSchema ? outputSchema.jsonSchema : outputSchema) as JSONSchema7);\n    const standardSchema = toStandardSchema(schema)['~standard'];\n    return {\n      '~standard': {\n        ...standardSchema,\n        validate: value => ({ value }),\n      },\n    };\n  }\n\n  /**\n   * Returns the server's tool catalog as plain, serializable definitions.\n   */\n  async toolDefinitions(): Promise<Record<string, SerializableMCPToolDefinition>> {\n    this.log('debug', `Requesting tool definitions from MCP server`);\n    const { tools } = await this.client.listTools({ _meta: this.requestMeta() }, { timeout: this.timeout });\n\n    const definitions: Record<string, SerializableMCPToolDefinition> = {};\n    for (const tool of tools) {\n      if (!tool.name) continue;\n      definitions[tool.name] = this.toSerializableDefinition(tool);\n    }\n    return definitions;\n  }\n\n  private toSerializableDefinition(tool: MCPToolListEntry): SerializableMCPToolDefinition {\n    const annotations = tool.annotations;\n    const rawMeta = (tool as { _meta?: Record<string, unknown> })._meta;\n\n    return {\n      name: tool.name,\n      ...(tool.title ? { title: tool.title } : {}),\n      ...(tool.description ? { description: tool.description } : {}),\n      inputSchema: tool.inputSchema,\n      ...(tool.outputSchema ? { outputSchema: tool.outputSchema } : {}),\n      ...(annotations ? { annotations } : {}),\n      ...(rawMeta ? { _meta: rawMeta } : {}),\n      server: {\n        name: this.name,\n        ...(this.client.getServerVersion()?.version ? { version: this.client.getServerVersion()!.version } : {}),\n        ...(this.serverInstructions ? { instructions: this.serverInstructions } : {}),\n      },\n    };\n  }\n\n  /**\n   * Rebuilds an executable Mastra tool from a cached {@link SerializableMCPToolDefinition}.\n   * The client connects lazily on the first execution.\n   */\n  toolFromDefinition({ definition }: { definition: SerializableMCPToolDefinition }): Tool<any, any, any, any> {\n    const tool = {\n      name: definition.name,\n      title: definition.title,\n      description: definition.description,\n      inputSchema: definition.inputSchema,\n      outputSchema: definition.outputSchema,\n      annotations: definition.annotations,\n      _meta: definition._meta,\n    } as MCPToolListEntry;\n\n    const built = this.buildToolFromListEntry(tool, {\n      version: definition.server.version,\n      instructions: definition.server.instructions,\n      connectFirst: true,\n    });\n\n    if (!built) {\n      throw new MastraError({\n        id: 'MCP_CLIENT_TOOL_HYDRATION_FAILED',\n        domain: ErrorDomain.MCP,\n        category: ErrorCategory.USER,\n        text: `Failed to rebuild MCP tool \"${definition.name}\" from its cached definition`,\n        details: { toolName: definition.name, serverName: this.name },\n      });\n    }\n\n    return built;\n  }\n\n  async tools(): Promise<Record<string, Tool<any, any, any, any>>> {\n    this.log('debug', `Requesting tools from MCP server`);\n    const { tools } = await this.client.listTools({ _meta: this.requestMeta() }, { timeout: this.timeout });\n    const toolsRes: Record<string, Tool<any, any, any, any>> = {};\n    for (const tool of tools) {\n      const mastraTool = this.buildToolFromListEntry(tool, {\n        version: this.client.getServerVersion()?.version,\n        instructions: this.serverInstructions,\n      });\n\n      if (mastraTool && tool.name) {\n        toolsRes[tool.name] = mastraTool;\n      }\n    }\n\n    return toolsRes;\n  }\n\n  /**\n   * Single conversion path shared by live discovery and cached hydration, so hydrated\n   * tools behave identically to discovered ones.\n   */\n  private buildToolFromListEntry(\n    tool: MCPToolListEntry,\n    serverMeta: { version?: string; instructions?: string; connectFirst?: boolean },\n  ): Tool<any, any, any, any> | undefined {\n    try {\n      let requireApproval: boolean | undefined;\n      let needsApprovalFn: NeedsApprovalFn | undefined;\n\n      // Server-advertised annotations are exposed on `mcp.annotations` and forwarded to\n      // the requireToolApproval callback so consumers can write annotation-driven policies.\n      const annotations = tool.annotations;\n      const title = tool.title || annotations?.title;\n\n      if (typeof this.requireToolApproval === 'function') {\n        const serverApprovalFn = this.requireToolApproval;\n        const toolName = tool.name;\n        requireApproval = true;\n        needsApprovalFn = (args: Record<string, unknown>, ctx: Record<string, unknown> = {}) => {\n          // Server-supplied annotations are placed AFTER the ctx spread so a caller\n          // cannot override them by injecting an `annotations` key into ctx.\n          return serverApprovalFn({ toolName, args, ...ctx, annotations });\n        };\n      } else if (this.requireToolApproval === true) {\n        requireApproval = true;\n      }\n\n      const rawMeta = (tool as { _meta?: Record<string, unknown> })._meta;\n      // Stamp serverId into _meta.ui so consumers can resolve app resources\n      // back to the originating MCP server without scanning all servers.\n      const toolMeta = rawMeta ? this.stampServerIdInMeta(rawMeta) : undefined;\n      const mcpToolProps =\n        toolMeta || annotations\n          ? {\n              mcp: {\n                ...(toolMeta ? { _meta: toolMeta } : {}),\n                ...(annotations ? { annotations } : {}),\n              },\n            }\n          : {};\n      // Real validator for structuredContent. Kept separate from the Tool's outputSchema\n      // (whose validator is a no-op — see convertOutputSchema) because only the\n      // structuredContent success path should be validated, not envelope returns. It uses\n      // the SDK validator so live and cache-hydrated tools enforce the same dialect.\n      const outputSchema = tool.outputSchema\n        ? withDefaultDialect(('jsonSchema' in tool.outputSchema ? tool.outputSchema.jsonSchema : tool.outputSchema) as JSONSchema7)\n        : undefined;\n      const outputSchemaComplexityError = outputSchema ? getJsonSchemaComplexityError(outputSchema) : undefined;\n      let outputValidationSchema: StandardSchemaWithJSON | undefined;\n      const getOutputValidationSchema = async () => {\n        if (!outputSchema) return undefined;\n        if (outputSchemaComplexityError) {\n          throw new MastraError({\n            id: 'MCP_CLIENT_OUTPUT_SCHEMA_TOO_COMPLEX',\n            domain: ErrorDomain.MCP,\n            category: ErrorCategory.THIRD_PARTY,\n            text: `MCP tool \"${tool.name}\" has a schema that is too complex: ${outputSchemaComplexityError}`,\n            details: { toolName: tool.name, serverName: this.name },\n          });\n        }\n        if (!outputValidationSchema) {\n          const validator = (await this.getJsonSchemaValidator()).getValidator(outputSchema);\n          const standardSchema = toStandardSchema(outputSchema)['~standard'];\n          outputValidationSchema = {\n            '~standard': {\n              ...standardSchema,\n              validate: value => {\n                const result = validator(value);\n                return result.valid ? { value: result.data } : { issues: [{ message: result.errorMessage }] };\n              },\n            },\n          };\n        }\n        return outputValidationSchema;\n      };\n      const mastraTool = createTool({\n        id: `${this.name}_${tool.name}`,\n        title,\n        description: tool.description || '',\n        inputSchema: this.convertInputSchema(tool.inputSchema),\n        outputSchema: this.convertOutputSchema(tool.outputSchema),\n        strict: getMastraToolStrictMeta(toolMeta),\n        ...mcpToolProps,\n        requireApproval,\n        mcpMetadata: {\n          serverName: this.name,\n          serverVersion: serverMeta.version,\n          serverInstructions: serverMeta.instructions,\n          forwardInstructions: this.forwardInstructions,\n          instructionsMaxLength: this.instructionsMaxLength,\n        },\n        ...(tool.outputSchema ? { toModelOutput: createStructuredToolToModelOutput() } : {}),\n        execute: async (\n          input: any,\n          context?: {\n            requestContext?: RequestContext | null;\n            runId?: string;\n            abortSignal?: AbortSignal;\n            _meta?: Record<string, unknown>;\n          },\n        ) => {\n          // A hydrated tool was rebuilt from cache without ever opening a connection, so the\n          // first execution is what establishes it. `connect()` is memoised.\n          if (serverMeta.connectFirst) {\n            await this.connect();\n          }\n\n          const operationContext = context?.requestContext ?? null;\n\n          return this.operationContextStore.run(operationContext, async () => {\n            const executeToolCall = async () => {\n              this.log('debug', `Executing tool: ${tool.name}`, { toolArgs: input, runId: context?.runId });\n              // progressToken spreads last so the Mastra-managed token takes precedence.\n              const progressMeta = this.enableProgressTracking\n                ? { progressToken: context?.runId || crypto.randomUUID() }\n                : undefined;\n              const _meta = this.requestMeta({ ...context?._meta, ...progressMeta });\n\n              const res = await this.client.callTool(\n                { name: tool.name, arguments: input, ...(_meta ? { _meta } : {}) },\n                { timeout: this.timeout, signal: context?.abortSignal },\n              );\n\n              // Per the MCP spec, tool *execution* failures are reported in-band with\n              // `isError: true`. Map that onto Mastra's failed-tool-call path unless the\n              // consumer opted into `'return'`.\n              if (res.isError && this.onToolError === 'throw') {\n                const errorText = extractToolErrorText(res.content);\n                this.log('debug', `Tool reported an error: ${tool.name}`, { error: errorText });\n                throw new MastraError({\n                  id: 'MCP_CLIENT_TOOL_EXECUTION_FAILED',\n                  domain: ErrorDomain.MCP,\n                  category: ErrorCategory.THIRD_PARTY,\n                  text: errorText,\n                  details: { toolName: tool.name, serverName: this.name },\n                });\n              }\n\n              this.log('debug', `Tool executed successfully: ${tool.name}`);\n\n              if (res.structuredContent !== undefined) {\n                // Enforce the server-advertised outputSchema before the result reaches the\n                // model. Covers hydrated tools too, which never populate the SDK's tools/list\n                // output-schema cache. On mismatch, return the structured ValidationError\n                // shape createTool produces so the model can self-correct.\n                if (!res.isError && outputSchema) {\n                  const validationSchema = await getOutputValidationSchema();\n                  const validation = validateToolOutput(validationSchema, res.structuredContent, tool.name);\n                  if (validation.error) {\n                    this.log('debug', `Tool output failed schema validation: ${tool.name}`, {\n                      message: validation.error.message,\n                    });\n                    return validation.error;\n                  }\n                }\n                return attachMcpCallToolContent(\n                  res.structuredContent,\n                  res.content,\n                  res._meta ? this.stampServerIdInMeta(res._meta) : undefined,\n                );\n              }\n\n              return res;\n            };\n\n            const failedTransport = this.transport;\n            const lifecycleGeneration = this.lifecycleGeneration;\n            try {\n              return await executeToolCall();\n            } catch (e) {\n              // In-band tool errors are semantic failures, never transport issues.\n              const isToolExecutionError = e instanceof MastraError && e.id === 'MCP_CLIENT_TOOL_EXECUTION_FAILED';\n\n              if (!isToolExecutionError && isReconnectableMCPError(e)) {\n                this.log('debug', `Transport error detected for tool ${tool.name}, attempting reconnection...`, {\n                  error: e instanceof Error ? e.message : String(e),\n                });\n\n                try {\n                  await this.reconnectAfterTransportFailure(failedTransport, lifecycleGeneration);\n                  this.log('debug', `Retrying tool ${tool.name} after reconnection...`);\n                  return await executeToolCall();\n                } catch (reconnectError) {\n                  this.log('error', `Reconnection or retry failed for tool ${tool.name}`, {\n                    originalError: e instanceof Error ? e.message : String(e),\n                    reconnectError: reconnectError instanceof Error ? reconnectError.stack : String(reconnectError),\n                    toolArgs: input,\n                  });\n                  throw reconnectError;\n                }\n              }\n\n              this.log('error', `Error calling tool: ${tool.name}`, {\n                error: e instanceof Error ? e.stack : JSON.stringify(e, null, 2),\n                toolArgs: input,\n              });\n              throw e;\n            }\n          });\n        },\n      });\n\n      // The agent runtime reads this back via the typed `getNeedsApprovalFn` helper.\n      if (needsApprovalFn) {\n        mastraTool.needsApprovalFn = needsApprovalFn;\n      }\n\n      return mastraTool;\n    } catch (toolCreationError: unknown) {\n      this.log('error', `Failed to create Mastra tool wrapper for MCP tool: ${tool.name}`, {\n        error: toolCreationError instanceof Error ? toolCreationError.stack : String(toolCreationError),\n        mcpToolDefinition: tool,\n      });\n      return undefined;\n    }\n  }\n\n  private stampServerIdInMeta(meta: Record<string, unknown>): Record<string, unknown> {\n    const ui = meta.ui as Record<string, unknown> | undefined;\n    if (!ui?.resourceUri) return meta;\n    return {\n      ...meta,\n      ui: { ...ui, serverId: this.name },\n    };\n  }\n}\n","/**\n * Loopback OAuth Callback Server for MCP Client\n *\n * Provides a one-shot local HTTP server that captures the OAuth authorization\n * code delivered to a loopback redirect URL (RFC 8252). Hosts use it together\n * with MCPOAuthClientProvider to complete the authorization-code flow for\n * OAuth-protected MCP servers.\n *\n * @see https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization\n */\n\nimport { timingSafeEqual } from 'node:crypto';\nimport { createServer } from 'node:http';\nimport type { Server as HttpServer } from 'node:http';\n\n/**\n * How many sequential ports to try after the preferred port when it is in use.\n */\nconst CALLBACK_PORT_FALLBACK_RANGE = 10;\n\n/**\n * Default time to wait for the browser to deliver the authorization code.\n */\nconst DEFAULT_CALLBACK_TIMEOUT_MS = 5 * 60 * 1000;\n\nconst SUCCESS_HTML = `<!DOCTYPE html>\n<html>\n  <head><meta charset=\"utf-8\"><title>Authentication complete</title></head>\n  <body style=\"font-family: system-ui, sans-serif; text-align: center; padding-top: 4rem;\">\n    <h1>Authentication complete</h1>\n    <p>You can close this tab and return to your application.</p>\n  </body>\n</html>`;\n\nconst ERROR_HTML = `<!DOCTYPE html>\n<html>\n  <head><meta charset=\"utf-8\"><title>Authentication failed</title></head>\n  <body style=\"font-family: system-ui, sans-serif; text-align: center; padding-top: 4rem;\">\n    <h1>Authentication failed</h1>\n    <p>You can close this tab and retry from your application.</p>\n  </body>\n</html>`;\n\n/**\n * Options for creating an OAuth callback server.\n */\nexport interface OAuthCallbackServerOptions {\n  /**\n   * The redirect URL the authorization server will send the browser back to.\n   * Its port is the preferred port to bind; if that port is in use, the next\n   * sequential ports are tried (see getCallbackUrlCandidates). The server\n   * binds the URL's hostname — prefer the literal `127.0.0.1` over\n   * `localhost` (RFC 8252 §8.3) so the browser and server agree on the\n   * address family.\n   *\n   * @example 'http://127.0.0.1:5533/oauth/callback'\n   */\n  redirectUrl: string | URL;\n\n  /**\n   * The OAuth state parameter issued for this authorization request.\n   * The state authenticates the redirect (CSRF protection per OAuth 2.1):\n   * callback requests without a matching state receive an error response and\n   * never settle the flow, so a stray local request cannot abort or spoof a\n   * pending authorization.\n   */\n  state: string;\n}\n\n/**\n * The authorization code captured from the OAuth callback.\n */\nexport interface OAuthCallbackResult {\n  /**\n   * The authorization code to exchange for tokens.\n   */\n  code: string;\n\n  /**\n   * The state parameter echoed back by the authorization server.\n   */\n  state: string;\n\n  /**\n   * RFC 9207 authorization-server issuer returned with the callback, when present.\n   */\n  iss?: string;\n}\n\n/**\n * A running loopback OAuth callback server.\n */\nexport interface OAuthCallbackServer {\n  /**\n   * The callback URL that is actually bound (reflects any port fallback).\n   * Use this — not the preferred redirect URL — as the redirect_uri for the\n   * authorization request.\n   */\n  url: URL;\n\n  /**\n   * The port the server is listening on.\n   */\n  port: number;\n\n  /**\n   * Waits for the browser to deliver the authorization code.\n   *\n   * Resolves once with the code and state from the first state-matching\n   * callback request. Rejects on timeout, on a state-matching OAuth error\n   * response (`error` / `error_description` query params), or when the\n   * server is closed before a code arrives.\n   */\n  waitForCode(options?: { timeoutMs?: number }): Promise<OAuthCallbackResult>;\n\n  /**\n   * Stops the server and releases the port. Rejects any pending waitForCode.\n   * Idempotent: closing an already-closed server resolves immediately.\n   */\n  close(): Promise<void>;\n}\n\n/**\n * Returns the candidate callback URLs for a redirect URL: the URL itself on\n * its preferred port, followed by the sequential fallback-port variants that\n * createOAuthCallbackServer will try when the preferred port is in use.\n *\n * This is the single source of the candidate list: include all of these as\n * redirect_uris in the pre-registered client or the hosted Client ID Metadata\n * Document so a fallback-bound callback URL always matches a listed URI.\n */\nexport function getCallbackUrlCandidates(redirectUrl: string | URL): URL[] {\n  const base = new URL(redirectUrl.toString());\n  const preferredPort = base.port ? Number(base.port) : base.protocol === 'https:' ? 443 : 80;\n\n  const candidates: URL[] = [];\n  for (let offset = 0; offset <= CALLBACK_PORT_FALLBACK_RANGE; offset++) {\n    const port = preferredPort + offset;\n    // Assigning an out-of-range port to URL.port is silently ignored, which\n    // would leave the candidate on the previous port — stop at the valid max.\n    if (port > 65535) break;\n    const candidate = new URL(base.toString());\n    candidate.port = String(port);\n    candidates.push(candidate);\n  }\n  return candidates;\n}\n\n/**\n * Constant-time comparison of the callback's state parameter against the\n * expected state, so response timing does not leak how much of the state a\n * forged local request matched. (Length is still observable, which is fine —\n * the state's entropy is what protects it.)\n */\nfunction stateMatches(receivedState: string, expectedState: string): boolean {\n  const received = Buffer.from(receivedState);\n  const expected = Buffer.from(expectedState);\n  return received.length === expected.length && timingSafeEqual(received, expected);\n}\n\nfunction listen(server: HttpServer, port: number, hostname: string): Promise<NodeJS.ErrnoException | null> {\n  return new Promise((resolve, reject) => {\n    const onError = (error: NodeJS.ErrnoException) => {\n      server.off('listening', onListening);\n      if (error.code === 'EADDRINUSE') {\n        resolve(error);\n      } else {\n        reject(error);\n      }\n    };\n    const onListening = () => {\n      server.off('error', onError);\n      resolve(null);\n    };\n\n    server.once('error', onError);\n    server.once('listening', onListening);\n    server.listen(port, hostname);\n  });\n}\n\n/**\n * Starts a one-shot loopback HTTP server that captures the OAuth\n * authorization code.\n *\n * The server binds the redirect URL's hostname on its port, falling back to\n * the next sequential ports when it is in use (see getCallbackUrlCandidates).\n * The first state-matching request on the callback path settles the outcome;\n * subsequent requests receive 410 Gone. Requests whose state does not match\n * receive an error response without settling, so only the genuine redirect\n * can complete or abort the flow. The response pages never echo the\n * authorization code.\n *\n * @example\n * ```typescript\n * const callbackServer = await createOAuthCallbackServer({\n *   redirectUrl: 'http://127.0.0.1:5533/oauth/callback',\n *   state: expectedState,\n * });\n * try {\n *   // Direct the user to the authorization URL, then:\n *   const { code } = await callbackServer.waitForCode();\n *   await transport.finishAuth(code);\n * } finally {\n *   await callbackServer.close();\n * }\n * ```\n */\nexport async function createOAuthCallbackServer(options: OAuthCallbackServerOptions): Promise<OAuthCallbackServer> {\n  const candidates = getCallbackUrlCandidates(options.redirectUrl);\n  const callbackPath = candidates[0]!.pathname;\n\n  let settled = false;\n  let resolveCode: (result: OAuthCallbackResult) => void;\n  let rejectCode: (error: Error) => void;\n  const codePromise = new Promise<OAuthCallbackResult>((resolve, reject) => {\n    resolveCode = resolve;\n    rejectCode = reject;\n  });\n  // The rejection is consumed by waitForCode; this guard keeps an unconsumed\n  // rejection (e.g. close() before waitForCode) from surfacing as unhandled.\n  codePromise.catch(() => {});\n\n  const settle = (outcome: { result: OAuthCallbackResult } | { error: Error }) => {\n    if (settled) return;\n    settled = true;\n    if ('result' in outcome) {\n      resolveCode(outcome.result);\n    } else {\n      rejectCode(outcome.error);\n    }\n  };\n\n  const server = createServer((req, res) => {\n    const url = new URL(req.url ?? '', 'http://localhost');\n    if (url.pathname !== callbackPath) {\n      res.statusCode = 404;\n      res.end('Not found');\n      return;\n    }\n    if (settled) {\n      res.statusCode = 410;\n      res.end('Callback already handled');\n      return;\n    }\n\n    const respond = (statusCode: number, html: string) => {\n      res.statusCode = statusCode;\n      res.setHeader('Content-Type', 'text/html; charset=utf-8');\n      res.end(html);\n    };\n\n    // The state authenticates the redirect: the callback port is predictable,\n    // so anything local can reach it, and the authorization server echoes the\n    // state on both success and error redirects (RFC 6749 §4.1.2). Requests\n    // without the expected state are not this flow's redirect and must not\n    // settle the one-shot outcome.\n    const state = url.searchParams.get('state');\n    if (state === null || !stateMatches(state, options.state)) {\n      respond(400, ERROR_HTML);\n      return;\n    }\n\n    const error = url.searchParams.get('error');\n    if (error) {\n      const description = url.searchParams.get('error_description');\n      respond(400, ERROR_HTML);\n      settle({ error: new Error(`Authorization failed: ${error}${description ? ` (${description})` : ''}`) });\n      return;\n    }\n\n    const code = url.searchParams.get('code');\n    if (!code) {\n      respond(400, ERROR_HTML);\n      settle({ error: new Error('Authorization failed: missing authorization code') });\n      return;\n    }\n\n    respond(200, SUCCESS_HTML);\n    settle({ result: { code, state, iss: url.searchParams.get('iss') ?? undefined } });\n  });\n\n  // Bind the hostname the redirect URL names (brackets stripped for IPv6\n  // literals) so e.g. http://localhost or http://[::1] redirects actually\n  // reach the server rather than an unbound 127.0.0.1 socket.\n  const hostname = candidates[0]!.hostname.replace(/^\\[|\\]$/g, '');\n\n  let boundUrl: URL | undefined;\n  let boundPort: number | undefined;\n  for (const candidate of candidates) {\n    const candidatePort = Number(candidate.port);\n    const error = await listen(server, candidatePort, hostname);\n    if (!error) {\n      boundUrl = candidate;\n      // Preserve the port we actually listened on. Reading URL.port back would\n      // return '' for the default 80/443, losing the effective port.\n      boundPort = candidatePort;\n      break;\n    }\n  }\n  if (!boundUrl || boundPort === undefined) {\n    const firstPort = Number(candidates[0]!.port);\n    const lastPort = Number(candidates[candidates.length - 1]!.port);\n    throw new Error(`Failed to start OAuth callback server: ports ${firstPort}-${lastPort} are all in use`);\n  }\n\n  // The bind-time 'error' listener is removed once 'listening' fires, so after\n  // this point the server has no 'error' handler. An emitted 'error' (e.g. a\n  // post-bind socket failure) with no listener throws and would crash the host\n  // process. Keep a persistent listener that settles the flow with the error\n  // instead of letting it become an uncaught exception.\n  server.on('error', error => {\n    settle({ error: error instanceof Error ? error : new Error(String(error)) });\n  });\n\n  return {\n    url: boundUrl,\n    port: boundPort,\n\n    waitForCode({ timeoutMs = DEFAULT_CALLBACK_TIMEOUT_MS } = {}) {\n      let timer: NodeJS.Timeout | undefined;\n      const timeout = new Promise<never>((_, reject) => {\n        timer = setTimeout(\n          () => reject(new Error(`Timed out waiting for OAuth callback after ${timeoutMs}ms`)),\n          timeoutMs,\n        );\n        timer.unref?.();\n      });\n      return Promise.race([codePromise, timeout]).finally(() => clearTimeout(timer));\n    },\n\n    close() {\n      settle({ error: new Error('OAuth callback server closed before receiving an authorization code') });\n      // Browsers keep the callback connection alive after the response, and\n      // server.close() waits for every socket to end — without this the port\n      // stays held until the keep-alive timeout expires.\n      server.closeIdleConnections();\n      return new Promise<void>((resolve, reject) => {\n        server.close(error => {\n          // Closing twice is fine (e.g. an explicit cancel followed by the\n          // flow's own cleanup); only real errors propagate.\n          if (error && (error as NodeJS.ErrnoException).code !== 'ERR_SERVER_NOT_RUNNING') {\n            reject(error);\n          } else {\n            resolve();\n          }\n        });\n      });\n    },\n  };\n}\n","/**\n * OAuth Client Provider Implementation for MCP Client\n *\n * Provides a ready-to-use OAuthClientProvider implementation that can be used\n * with Mastra's MCPClient for connecting to OAuth-protected MCP servers.\n *\n * Client identity is configured, never registered at runtime: the provider is\n * given either pre-registered client information or a Client ID Metadata\n * Document URL (SEP-991), and it never performs dynamic client registration.\n */\n\nimport { validateClientMetadataUrl } from '@modelcontextprotocol/client';\nimport type {\n  OAuthClientProvider,\n  OAuthClientMetadata,\n  OAuthClientInformation,\n  OAuthClientInformationContext,\n  OAuthDiscoveryState,\n  StoredOAuthTokens,\n} from '../shared/oauth-types.js';\n\n/**\n * Storage interface for persisting OAuth data.\n *\n * Implement this interface to persist OAuth data across processes.\n * For simple in-memory usage, use InMemoryOAuthStorage.\n */\nexport interface OAuthStorage {\n  /**\n   * Store a value by key.\n   */\n  set(key: string, value: string): Promise<void> | void;\n\n  /**\n   * Retrieve a value by key.\n   */\n  get(key: string): Promise<string | undefined> | string | undefined;\n\n  /**\n   * Delete a value by key.\n   */\n  delete(key: string): Promise<void> | void;\n}\n\n/**\n * Simple in-memory OAuth storage.\n *\n * Data is lost when the process exits. For production, implement\n * OAuthStorage with a persistent store like Redis or a database.\n */\nexport class InMemoryOAuthStorage implements OAuthStorage {\n  private data = new Map<string, string>();\n\n  set(key: string, value: string): void {\n    this.data.set(key, value);\n  }\n\n  get(key: string): string | undefined {\n    return this.data.get(key);\n  }\n\n  delete(key: string): void {\n    this.data.delete(key);\n  }\n\n  clear(): void {\n    this.data.clear();\n  }\n}\n\n/**\n * Options for creating a MCPOAuthClientProvider.\n *\n * Exactly one client identity source is required: `clientInformation` for a\n * client pre-registered with the authorization server, or `clientMetadataUrl`\n * for a Client ID Metadata Document the authorization server fetches.\n */\nexport interface MCPClientMetadata extends OAuthClientMetadata {\n  /**\n   * The `client_id` published in a Client ID Metadata Document. When present it\n   * must equal `clientMetadataUrl`; the provider never sends it to the\n   * authorization server itself.\n   */\n  client_id?: string;\n}\n\nexport interface MCPOAuthClientProviderOptions {\n  /**\n   * The redirect URL for the OAuth callback.\n   * This should be a URL your application controls that can handle\n   * the authorization code callback.\n   *\n   * @example 'http://localhost:3000/oauth/callback'\n   */\n  redirectUrl: string | URL;\n\n  /**\n   * OAuth client metadata (name, redirect URIs, grant types, scope).\n   *\n   * Used for scope selection and as the description of this client; it is\n   * never posted to a registration endpoint. With `clientMetadataUrl` it must\n   * mirror the hosted document: `client_name` and at least one redirect URI.\n   */\n  clientMetadata: MCPClientMetadata;\n\n  /**\n   * Client information for a client pre-registered with the authorization server.\n   */\n  clientInformation?: OAuthClientInformation;\n\n  /**\n   * HTTPS URL of this client's Client ID Metadata Document (SEP-991).\n   *\n   * The URL is used as the `client_id`; the authorization server fetches the\n   * document to learn the client's metadata. Must be an HTTPS URL with a\n   * non-root pathname.\n   */\n  clientMetadataUrl?: string;\n\n  /**\n   * Storage for persisting OAuth data (tokens, discovery state and the PKCE\n   * verifier). Defaults to InMemoryOAuthStorage if not provided.\n   *\n   * Tokens are keyed by the authorization server's validated `issuer`, and\n   * mutation ordering is coordinated only within one provider instance, so\n   * give each provider its own storage namespace.\n   */\n  storage?: OAuthStorage;\n\n  /**\n   * Callback invoked when the user needs to be redirected to authorize.\n   *\n   * For CLI applications, you might open the URL in a browser.\n   * For web applications, you might redirect the response.\n   *\n   * @param url - The authorization URL to redirect to\n   */\n  onRedirectToAuthorization?: (url: URL) => void | Promise<void>;\n\n  /**\n   * Generate a random state parameter for OAuth requests.\n   * Defaults to using crypto.randomUUID.\n   */\n  stateGenerator?: () => string | Promise<string>;\n}\n\n/**\n * Mastra's OAuth Client Provider implementation.\n *\n * This provider handles the OAuth 2.1 authorization-code flow for connecting to\n * OAuth-protected MCP servers, including:\n * - Pre-registered or URL-based (Client ID Metadata Document) client identity\n * - PKCE (Proof Key for Code Exchange)\n * - Token storage and refresh\n *\n * @example\n * ```typescript\n * import { MCPClient, MCPOAuthClientProvider } from '@mastra/mcp';\n *\n * const oauthProvider = new MCPOAuthClientProvider({\n *   redirectUrl: 'http://localhost:3000/oauth/callback',\n *   clientMetadataUrl: 'https://my-app.example.com/oauth/client-metadata.json',\n *   clientMetadata: {\n *     redirect_uris: ['http://localhost:3000/oauth/callback'],\n *     client_name: 'My MCP Client',\n *     grant_types: ['authorization_code', 'refresh_token'],\n *     response_types: ['code'],\n *   },\n *   onRedirectToAuthorization: (url) => {\n *     console.log(`Please visit: ${url}`);\n *   },\n * });\n *\n * const client = new MCPClient({\n *   servers: {\n *     'protected-server': {\n *       url: new URL('https://mcp.example.com/mcp'),\n *       authProvider: oauthProvider,\n *     },\n *   },\n * });\n * ```\n */\nexport class MCPOAuthClientProvider implements OAuthClientProvider {\n  private _redirectUrl: string | URL;\n  private readonly _clientMetadata: OAuthClientMetadata;\n  private readonly _clientMetadataUrl?: string;\n  private readonly _clientInfo?: OAuthClientInformation;\n  private readonly storage: OAuthStorage;\n  private readonly onRedirect?: (url: URL) => void | Promise<void>;\n  private readonly generateState: () => string | Promise<string>;\n\n  private _sessionState?: string;\n  private _sessionRedirectUrl?: string | URL;\n  private credentialMutation: Promise<unknown> = Promise.resolve();\n\n  constructor(options: MCPOAuthClientProviderOptions) {\n    if (!options.clientInformation && !options.clientMetadataUrl) {\n      throw new Error(\n        'MCPOAuthClientProvider requires a client identity: pass clientInformation for a pre-registered client or clientMetadataUrl for a Client ID Metadata Document. Dynamic client registration is not supported.',\n      );\n    }\n    if (options.clientInformation && options.clientMetadataUrl) {\n      throw new Error(\n        'MCPOAuthClientProvider accepts one client identity: pass either clientInformation or clientMetadataUrl, not both.',\n      );\n    }\n    if (options.clientMetadataUrl) {\n      validateClientMetadataUrl(options.clientMetadataUrl);\n      if (options.clientMetadata.client_id !== undefined && options.clientMetadata.client_id !== options.clientMetadataUrl) {\n        throw new Error('clientMetadataUrl must match clientMetadata.client_id');\n      }\n      if (!options.clientMetadata.client_name || options.clientMetadata.redirect_uris.length === 0) {\n        throw new Error('Client ID Metadata Documents require client_name and at least one redirect_uri');\n      }\n    }\n    const { client_id: _clientId, ...clientMetadata } = options.clientMetadata;\n    this._redirectUrl = options.redirectUrl;\n    this._clientMetadata = clientMetadata;\n    this._clientMetadataUrl = options.clientMetadataUrl;\n    this._clientInfo = options.clientInformation;\n    this.storage = options.storage ?? new InMemoryOAuthStorage();\n    this.onRedirect = options.onRedirectToAuthorization;\n    this.generateState = options.stateGenerator ?? (() => crypto.randomUUID());\n  }\n\n  /**\n   * The URL to redirect the user agent to after authorization.\n   */\n  get redirectUrl(): string | URL {\n    return this._redirectUrl;\n  }\n\n  /**\n   * Metadata about this OAuth client.\n   */\n  get clientMetadata(): OAuthClientMetadata {\n    return this._clientMetadata;\n  }\n\n  /**\n   * URL of this client's Client ID Metadata Document, when identity is URL-based.\n   */\n  get clientMetadataUrl(): string | undefined {\n    return this._clientMetadataUrl;\n  }\n\n  /**\n   * Returns a OAuth2 state parameter.\n   *\n   * While an authorization session is active (see beginAuthorizationSession),\n   * the pinned session state is returned so a callback server can validate\n   * the redirect against a known value.\n   */\n  async state(): Promise<string> {\n    return this._sessionState ?? this.generateState();\n  }\n\n  /**\n   * Pins the OAuth state parameter for the next authorization request.\n   *\n   * Hosts driving an interactive authorization flow (e.g. MCPClient.authenticate)\n   * call this before triggering the flow so the loopback callback server knows\n   * which state value to expect. Call endAuthorizationSession once the flow settles.\n   *\n   * @returns The pinned state value, generated with the configured stateGenerator\n   */\n  async beginAuthorizationSession(): Promise<string> {\n    this._sessionState = await this.generateState();\n    this._sessionRedirectUrl = this._redirectUrl;\n    return this._sessionState;\n  }\n\n  /**\n   * Clears the pinned authorization state (see beginAuthorizationSession) and\n   * restores the configured redirect URL if applyResolvedRedirectUrl rebased\n   * it to a fallback port during the session, so the next flow starts from\n   * the preferred port again.\n   */\n  endAuthorizationSession(): void {\n    this._sessionState = undefined;\n    if (this._sessionRedirectUrl !== undefined) {\n      this._redirectUrl = this._sessionRedirectUrl;\n      this._sessionRedirectUrl = undefined;\n    }\n  }\n\n  /**\n   * Points the provider at the callback URL that is actually bound.\n   *\n   * Loopback callback servers may bind a fallback port when the preferred one\n   * is in use. Call this before triggering authorization so the authorization\n   * request's redirect_uri matches the listening server. The bound URL must be\n   * one of the redirect URIs the client is registered with (or lists in its\n   * metadata document).\n   *\n   * @param redirectUrl - The callback URL that is actually bound\n   */\n  applyResolvedRedirectUrl(redirectUrl: string | URL): void {\n    this._redirectUrl = redirectUrl;\n  }\n\n  /**\n   * The client's identity: pre-registered information, or the metadata\n   * document URL used as `client_id`.\n   */\n  clientInformation(): OAuthClientInformation {\n    return this._clientInfo ?? { client_id: this._clientMetadataUrl! };\n  }\n\n  private tokensKey(ctx?: OAuthClientInformationContext): string {\n    return ctx ? `tokens:${encodeURIComponent(ctx.issuer)}` : 'tokens';\n  }\n\n  /**\n   * Serializes storage mutations so concurrent writes and invalidations settle\n   * in call order: a write started before `invalidateCredentials` cannot land\n   * after it completes.\n   */\n  private enqueueCredentialMutation<T>(mutation: () => Promise<T>): Promise<T> {\n    const operation = this.credentialMutation.catch(() => {}).then(mutation);\n    this.credentialMutation = operation;\n    return operation;\n  }\n\n  private async readStored<T>(key: string, expectedIssuer?: string): Promise<T | undefined> {\n    const stored = await this.storage.get(key);\n    if (!stored) return undefined;\n    try {\n      const value = JSON.parse(stored) as T;\n      if (expectedIssuer && (value as { issuer?: unknown }).issuer !== expectedIssuer) return undefined;\n      return value;\n    } catch {\n      return undefined;\n    }\n  }\n\n  private async readIssuerIndex(): Promise<string[]> {\n    return (await this.readStored<string[]>('credential_issuers')) ?? [];\n  }\n\n  private async rememberIssuer(issuer: string): Promise<void> {\n    const issuers = await this.readIssuerIndex();\n    if (!issuers.includes(issuer)) {\n      issuers.push(issuer);\n      await this.storage.set('credential_issuers', JSON.stringify(issuers));\n    }\n  }\n\n  /**\n   * Loads existing OAuth tokens.\n   *\n   * With an issuer context, only tokens minted by that authorization server are\n   * returned; without one, the most recently saved token set is returned for\n   * the transport's bearer-token read.\n   */\n  async tokens(ctx?: OAuthClientInformationContext): Promise<StoredOAuthTokens | undefined> {\n    return this.readStored<StoredOAuthTokens>(this.tokensKey(ctx), ctx?.issuer);\n  }\n\n  /**\n   * Stores new OAuth tokens after successful authorization, bound to the\n   * authorization server's issuer when known.\n   */\n  async saveTokens(tokens: StoredOAuthTokens, ctx?: OAuthClientInformationContext): Promise<void> {\n    await this.enqueueCredentialMutation(async () => {\n      if (ctx) {\n        await this.rememberIssuer(ctx.issuer);\n        await this.storage.set(this.tokensKey(ctx), JSON.stringify(tokens));\n      }\n      await this.storage.set('tokens', JSON.stringify(tokens));\n    });\n  }\n\n  /**\n   * Persists authorization-server discovery state so the callback leg can\n   * verify the code is exchanged with the server that issued the redirect.\n   */\n  async saveDiscoveryState(state: OAuthDiscoveryState): Promise<void> {\n    await this.enqueueCredentialMutation(async () => {\n      await this.storage.set('discovery_state', JSON.stringify(state));\n    });\n  }\n\n  /**\n   * Loads persisted authorization-server discovery state.\n   */\n  async discoveryState(): Promise<OAuthDiscoveryState | undefined> {\n    return this.readStored<OAuthDiscoveryState>('discovery_state');\n  }\n\n  /**\n   * Invoked to redirect the user agent to the authorization URL.\n   */\n  async redirectToAuthorization(authorizationUrl: URL): Promise<void> {\n    if (this.onRedirect) {\n      await this.onRedirect(authorizationUrl);\n    } else {\n      // Default behavior: just log the URL (CLI scenario)\n      console.info(`Authorization required. Please visit: ${authorizationUrl.toString()}`);\n    }\n  }\n\n  /**\n   * Saves a PKCE code verifier before redirecting to authorization.\n   */\n  async saveCodeVerifier(codeVerifier: string): Promise<void> {\n    await this.enqueueCredentialMutation(async () => {\n      await this.storage.set('code_verifier', codeVerifier);\n    });\n  }\n\n  /**\n   * Loads the PKCE code verifier for validating authorization result.\n   */\n  async codeVerifier(): Promise<string> {\n    const verifier = await this.storage.get('code_verifier');\n    if (!verifier) {\n      throw new Error('No code verifier found. Authorization flow may not have started properly.');\n    }\n    return verifier;\n  }\n\n  /**\n   * Invalidate stored credentials when the server indicates they're no longer valid.\n   * Client identity is configuration, so the `client` scope has nothing to discard.\n   */\n  async invalidateCredentials(scope: 'all' | 'client' | 'tokens' | 'verifier' | 'discovery'): Promise<void> {\n    await this.enqueueCredentialMutation(async () => {\n      const deleteTokens = async () => {\n        const issuers = await this.readIssuerIndex();\n        await this.storage.delete('tokens');\n        await Promise.all(issuers.map(issuer => this.storage.delete(this.tokensKey({ issuer }))));\n      };\n\n      switch (scope) {\n        case 'all':\n          await deleteTokens();\n          await this.storage.delete('code_verifier');\n          await this.storage.delete('discovery_state');\n          await this.storage.delete('credential_issuers');\n          break;\n        case 'tokens':\n          await deleteTokens();\n          break;\n        case 'verifier':\n          await this.storage.delete('code_verifier');\n          break;\n        case 'discovery':\n          await this.storage.delete('discovery_state');\n          break;\n        case 'client':\n          break;\n      }\n    });\n  }\n\n  /**\n   * Clear all stored OAuth data.\n   * Useful for logging out or resetting state.\n   */\n  async clear(): Promise<void> {\n    await this.invalidateCredentials('all');\n  }\n\n  /**\n   * Check if the provider has tokens with an access token.\n   */\n  async hasValidTokens(): Promise<boolean> {\n    const currentTokens = await this.tokens();\n    return !!currentTokens?.access_token;\n  }\n}\n\n/**\n * Creates a simple OAuth provider with pre-configured tokens.\n *\n * This is useful for testing scenarios where you already have a valid token.\n * For production, use the full MCPOAuthClientProvider with proper OAuth flow.\n *\n * @param accessToken - A valid access token\n * @param options - Additional configuration options\n * @returns An OAuthClientProvider that returns the pre-configured token\n *\n * @example\n * ```typescript\n * const provider = createSimpleTokenProvider('my-access-token', {\n *   redirectUrl: 'http://localhost:3000/callback',\n *   clientMetadata: {\n *     redirect_uris: ['http://localhost:3000/callback'],\n *     client_name: 'Test Client',\n *   },\n *   clientInformation: { client_id: 'test-client' },\n * });\n * ```\n */\nexport function createSimpleTokenProvider(\n  accessToken: string,\n  options: {\n    redirectUrl: string | URL;\n    clientMetadata: OAuthClientMetadata;\n    /** Client identity used if the token must be refreshed. */\n    clientInformation: OAuthClientInformation;\n    tokenType?: string;\n    refreshToken?: string;\n    expiresIn?: number;\n    scope?: string;\n  },\n): OAuthClientProvider {\n  const tokens: StoredOAuthTokens = {\n    access_token: accessToken,\n    token_type: options.tokenType ?? 'Bearer',\n    refresh_token: options.refreshToken,\n    expires_in: options.expiresIn,\n    scope: options.scope,\n  };\n\n  const storage = new InMemoryOAuthStorage();\n  storage.set('tokens', JSON.stringify(tokens));\n\n  return new MCPOAuthClientProvider({\n    redirectUrl: options.redirectUrl,\n    clientMetadata: options.clientMetadata,\n    clientInformation: options.clientInformation,\n    storage,\n  });\n}\n","import type { ToolsInput } from '@mastra/core/agent';\nimport { MCPServerBase } from '@mastra/core/mcp';\nimport type { MCPToolExecutionResultV2, MCPToolType, ServerDetailInfo, ServerInfo } from '@mastra/core/mcp';\nimport { isStandardSchemaWithJSON, standardSchemaToJSONSchema } from '@mastra/core/schema';\nimport { noopObserve } from '@mastra/core/tools';\n\nimport type { InternalMastraMCPClient } from './client';\n\ntype ToolInfo = {\n  id: string;\n  name: string;\n  description?: string;\n  inputSchema: unknown;\n  outputSchema?: unknown;\n  toolType?: MCPToolType;\n  _meta?: Record<string, unknown>;\n};\n\n/**\n * Wraps a single MCPClient server connection as an `MCPServerBase` so external\n * (non-Mastra) MCP servers connected through MCPClient can be registered in Mastra's\n * `mcpServers` config and appear in Studio alongside local MCPServer instances.\n *\n * Tool and resource operations are delegated lazily to the underlying connection.\n * The proxy has no transport of its own: it is not served over stdio or HTTP.\n */\nexport class MCPClientServerProxy extends MCPServerBase {\n  override readonly mcpVersion = 2 as const;\n  private clientGetter: () => Promise<InternalMastraMCPClient>;\n  private cachedClient: InternalMastraMCPClient | null = null;\n  private cachedToolList: { tools: ToolInfo[] } | null = null;\n\n  constructor(\n    config: { name: string; version?: string; id?: string; description?: string },\n    clientGetter: () => Promise<InternalMastraMCPClient>,\n  ) {\n    super({\n      name: config.name,\n      version: config.version ?? '1.0.0',\n      id: config.id,\n      description: config.description,\n      tools: {},\n    });\n    this.clientGetter = clientGetter;\n  }\n\n  /** The remote catalogue is fetched lazily; nothing is converted locally. */\n  convertTools(_tools: ToolsInput) {\n    return {};\n  }\n\n  private async getClient(): Promise<InternalMastraMCPClient> {\n    if (!this.cachedClient) {\n      this.cachedClient = await this.clientGetter();\n    }\n    return this.cachedClient;\n  }\n\n  private convertSchema(schema: unknown): unknown {\n    if (isStandardSchemaWithJSON(schema)) {\n      return standardSchemaToJSONSchema(schema);\n    }\n    return (schema as { jsonSchema?: unknown } | undefined)?.jsonSchema ?? schema;\n  }\n\n  private async fetchToolList(): Promise<{ tools: ToolInfo[] }> {\n    if (this.cachedToolList) return this.cachedToolList;\n    const client = await this.getClient();\n    const tools = await client.tools();\n    this.cachedToolList = {\n      tools: Object.entries(tools).map(([toolName, tool]) => ({\n        id: toolName,\n        name: toolName,\n        description: tool.description,\n        inputSchema: this.convertSchema(tool.inputSchema),\n        outputSchema: this.convertSchema(tool.outputSchema),\n        toolType: tool.mcp?.toolType,\n        _meta: tool.mcp?._meta as Record<string, unknown> | undefined,\n      })),\n    };\n    return this.cachedToolList;\n  }\n\n  public getToolListInfo(): { tools: ToolInfo[] } | Promise<{ tools: ToolInfo[] }> {\n    if (this.cachedToolList) return this.cachedToolList;\n    return this.fetchToolList();\n  }\n\n  public getToolInfo(toolId: string): ToolInfo | undefined | Promise<ToolInfo | undefined> {\n    const find = (list: { tools: ToolInfo[] }) => list.tools.find(t => t.name === toolId);\n    if (this.cachedToolList) return find(this.cachedToolList);\n    return this.fetchToolList().then(find);\n  }\n\n  public async executeTool(\n    toolId: string,\n    input: unknown,\n    context: Parameters<MCPServerBase['executeTool']>[2] = {},\n  ): Promise<MCPToolExecutionResultV2> {\n    const client = await this.getClient();\n    const tools = await client.tools();\n    const tool = tools[toolId];\n    if (!tool) {\n      throw new Error(`Tool '${toolId}' not found on remote MCP server '${this.name}'`);\n    }\n    if (!tool.execute) {\n      throw new Error(`Tool '${toolId}' on remote MCP server '${this.name}' has no execute method`);\n    }\n    const output = await tool.execute(input, { requestContext: context.requestContext, observe: noopObserve });\n    return { status: 'completed', output };\n  }\n\n  public async listResources(): Promise<{\n    resources: Array<{ uri: string; name: string; description?: string; mimeType?: string; _meta?: Record<string, unknown> }>;\n  }> {\n    const client = await this.getClient();\n    const resources = await client.resources.list();\n    return {\n      resources: resources.map(r => ({\n        uri: r.uri,\n        name: r.name ?? r.uri,\n        description: r.description,\n        mimeType: r.mimeType,\n        _meta: r._meta,\n      })),\n    };\n  }\n\n  public async readResource(uri: string): Promise<{\n    contents: Array<{ uri: string; text?: string; blob?: string; mimeType?: string; _meta?: Record<string, unknown> }>;\n  }> {\n    const client = await this.getClient();\n    const result = await client.resources.read(uri);\n    return {\n      contents: result.contents.map(c => ({\n        uri: c.uri ?? uri,\n        ...(c.mimeType !== undefined ? { mimeType: c.mimeType } : {}),\n        ...(c._meta !== undefined ? { _meta: c._meta } : {}),\n        ...('text' in c && c.text !== undefined ? { text: c.text } : {}),\n        ...('blob' in c && c.blob !== undefined ? { blob: c.blob } : {}),\n      })),\n    };\n  }\n\n  public async startStdio(): Promise<void> {\n    throw new Error('MCPClientServerProxy does not serve a transport; it proxies a remote MCP server');\n  }\n\n  public async startHTTP(): Promise<void> {\n    throw new Error('MCPClientServerProxy does not serve a transport; it proxies a remote MCP server');\n  }\n\n  public async close(): Promise<void> {\n    this.cachedClient = null;\n    this.cachedToolList = null;\n  }\n\n  public getServerInfo(): ServerInfo {\n    return {\n      id: this.id,\n      name: this.name,\n      description: this.description,\n      version_detail: {\n        version: this.version,\n        release_date: this.releaseDate,\n        is_latest: this.isLatest,\n      },\n    };\n  }\n\n  public getServerDetail(): ServerDetailInfo {\n    return {\n      ...this.getServerInfo(),\n      packages: this.packages ?? [],\n      remotes: this.remotes ?? [],\n    };\n  }\n}\n","import { createHash } from 'node:crypto';\nimport type { Stream } from 'node:stream';\nimport { MastraBase } from '@mastra/core/base';\nimport { ErrorCategory, ErrorDomain, MastraError } from '@mastra/core/error';\nimport type { MCPServerBase } from '@mastra/core/mcp';\nimport type { Tool } from '@mastra/core/tools';\nimport { DEFAULT_REQUEST_TIMEOUT_MSEC } from '@modelcontextprotocol/client';\nimport type { ProgressNotification, Prompt, Resource, ResourceTemplateType } from '@modelcontextprotocol/client';\nimport equal from 'fast-deep-equal';\nimport { UnauthorizedError } from '../shared/oauth-types';\nimport { InternalMastraMCPClient } from './client';\nimport type { MastraMCPServerDefinition, MCPServerAuthState } from './client';\nimport { getMCPDiscoveryErrorDetails, isReconnectableMCPError } from './error-utils';\nimport type { MCPDiscoveryErrorDetails } from './error-utils';\nimport { createOAuthCallbackServer } from './oauth-callback-server';\nimport type { OAuthCallbackServer } from './oauth-callback-server';\nimport { MCPOAuthClientProvider } from './oauth-provider';\nimport { MCPClientServerProxy } from './server-proxy';\nimport type { MCPServerImplementation, SerializableMCPToolCatalog, SerializableMCPToolDefinition } from './types';\n\nconst mcpClientInstances = new Map<string, InstanceType<typeof MCPClient>>();\nconst TOOL_DISCOVERY_MAX_ATTEMPTS = 2;\n\n// Outcome of a single server's discovery within discoverAcrossServers(). An\n// explicit discriminated union (rather than `{ value?: T; error?: string }`) so\n// that narrowing on `error` also narrows `value` — Promise.all would otherwise\n// widen the two branches into independent optional props and break the fold.\ntype ServerDiscoveryResult<T> =\n  | { serverName: string; value: T; error: undefined; duration: number }\n  | { serverName: string; value: undefined; error: MCPDiscoveryErrorDetails; duration: number };\n\n/** Options for aggregate discovery across configured MCP servers. */\nexport interface MCPDiscoveryOptions {\n  /** Maximum time to wait for each server's discovery operation, in milliseconds. */\n  perServerTimeoutMs?: number;\n}\n\n// Matches the entire 127.0.0.0/8 range in dotted-quad form. `URL` normalizes\n// IPv4 hosts to four octets (so `127.1` becomes `127.0.0.1`), so anchoring the\n// pattern is enough — and it rejects lookalikes like `127.evil.com` that a\n// prefix check would wrongly accept and leak the authorization code to.\nconst LOOPBACK_IPV4 = /^127\\.(?:\\d{1,3})\\.(?:\\d{1,3})\\.(?:\\d{1,3})$/;\n\n// Whether a hostname is a loopback address authenticate() accepts for the\n// provider's redirect URL (RFC 8252 loopback redirection). Kept in sync with the\n// mastracode config parser, which accepts any 127.0.0.0/8 host, so a config that\n// parses (e.g. 127.0.0.2) does not later fail here.\nfunction isLoopbackHostname(hostname: string): boolean {\n  return hostname === 'localhost' || hostname === '[::1]' || hostname === '::1' || LOOPBACK_IPV4.test(hostname);\n}\n\n/**\n * Configuration options for creating an MCPClient instance.\n */\nexport interface MCPClientOptions {\n  /** Optional unique identifier to prevent memory leaks when creating multiple instances with identical configurations */\n  id?: string;\n  /** Map of server names to their connection configurations (stdio or HTTP-based) */\n  servers: Record<string, MastraMCPServerDefinition>;\n  /** Optional global timeout in milliseconds for all servers (default: 60000ms) */\n  timeout?: number;\n}\n\n/**\n * Manages Model Context Protocol (MCP) server connections and tool namespacing,\n * with access to tools, resources, prompts, and elicitation.\n *\n * Configure authentication when required by your servers.\n *\n * @example\n * `yourServerUrl` is a URL for a running MCP server's HTTP endpoint.\n * ```typescript\n * import { MCPClient } from '@mastra/mcp';\n *\n * const mcp = new MCPClient({\n *   servers: {\n *     remote: { url: yourServerUrl },\n *   },\n * });\n * ```\n *\n * @see For documentation bundled with your installed package, locate\n * `@mastra/mcp/package.json` with your project's resolver or package-manager\n * tooling, then read `dist/docs/SKILL.md` from that package root and follow its\n * reference links. Use package-manager tools for virtual or archived packages.\n *\n * @see [MCP client documentation](https://mastra.ai/reference/tools/mcp-client)\n * if packaged docs are unavailable.\n */\nexport class MCPClient extends MastraBase {\n  private serverConfigs: Record<string, MastraMCPServerDefinition> = {};\n  private id: string;\n  private defaultTimeout: number;\n  private mcpClientsById = new Map<string, InternalMastraMCPClient>();\n  private disconnectPromise: Promise<void> | null = null;\n  private authFlowsByServer = new Map<string, Promise<void>>();\n  private authCallbackServersByServer = new Map<string, OAuthCallbackServer>();\n  /**\n   * Per-server abort controllers for in-flight authorization flows. Created\n   * synchronously at the start of {@link runAuthorizationFlow} — before the\n   * callback server exists — so cancel/disconnect can interrupt the setup phase\n   * (discovery, registration, port binding) and not just the waitForCode wait.\n   */\n  private authAbortControllersByServer = new Map<string, AbortController>();\n\n  /**\n   * Creates a new MCPClient instance for managing MCP server connections.\n   *\n   * The client automatically manages connection lifecycle and prevents memory leaks by\n   * caching instances with identical configurations.\n   *\n   * @param args - Configuration options\n   * @param args.id - Optional unique identifier to allow multiple instances with same config\n   * @param args.servers - Map of server names to server configurations\n   * @param args.timeout - Optional global timeout in milliseconds (default: 60000)\n   *\n   * @throws {Error} If multiple instances with identical config are created without an ID\n   *\n   * @example\n   * ```typescript\n   * const mcp = new MCPClient({\n   *   servers: {\n   *     weatherServer: {\n   *       url: new URL('http://localhost:8080/mcp'),\n   *       requestInit: {\n   *         headers: { Authorization: 'Bearer token' }\n   *       }\n   *     }\n   *   },\n   *   timeout: 30000\n   * });\n   * ```\n   */\n  constructor(args: MCPClientOptions) {\n    super({ name: 'MCPClient' });\n    this.defaultTimeout = args.timeout ?? DEFAULT_REQUEST_TIMEOUT_MSEC;\n    this.serverConfigs = args.servers;\n    this.id = args.id ?? this.makeId();\n\n    if (args.id) {\n      this.id = args.id;\n      const cached = mcpClientInstances.get(this.id);\n\n      if (cached && !equal(cached.serverConfigs, args.servers)) {\n        const existingInstance = mcpClientInstances.get(this.id);\n        if (existingInstance) {\n          void existingInstance.disconnect();\n          mcpClientInstances.delete(this.id);\n        }\n      }\n    } else {\n      this.id = this.makeId();\n    }\n\n    // to prevent memory leaks return the same MCP server instance when configured the same way multiple times\n    const existingInstance = mcpClientInstances.get(this.id);\n    if (existingInstance) {\n      if (!args.id) {\n        throw new Error(`MCPClient was initialized multiple times with the same configuration options.\n\nThis error is intended to prevent memory leaks.\n\nTo fix this you have three different options:\n1. If you need multiple MCPClient class instances with identical server configurations, set an id when configuring: new MCPClient({ id: \"my-unique-id\" })\n2. Call \"await client.disconnect()\" after you're done using the client and before you recreate another instance with the same options. If the identical MCPClient instance is already closed at the time of re-creating it, you will not see this error.\n3. If you only need one instance of MCPClient in your app, refactor your code so it's only created one time (ex. move it out of a loop into a higher scope code block)\n`);\n      }\n      return existingInstance;\n    }\n\n    mcpClientInstances.set(this.id, this);\n    this.addToInstanceCache();\n    return this;\n  }\n\n  /**\n   * Provides access to progress-related operations for tracking long-running operations.\n   *\n   * Progress tracking allows MCP servers to send updates about the status of ongoing operations,\n   * providing real-time feedback to users about task completion and current state.\n   *\n   * @example\n   * ```typescript\n   * // Set up handler for progress updates from a server\n   * await mcp.progress.onUpdate('serverName', (params) => {\n   *   console.log(`Progress: ${params.progress}%`);\n   *   console.log(`Status: ${params.message}`);\n   *\n   *   if (params.total) {\n   *     console.log(`Completed ${params.progress} of ${params.total} items`);\n   *   }\n   * });\n   * ```\n   */\n  public get progress() {\n    this.addToInstanceCache();\n    return {\n      onUpdate: async (serverName: string, handler: (params: ProgressNotification['params']) => void) => {\n        try {\n          const internalClient = await this.getConnectedClientForServer(serverName);\n          return internalClient.progress.onUpdate(handler);\n        } catch (err) {\n          throw new MastraError(\n            {\n              id: 'MCP_CLIENT_ON_UPDATE_PROGRESS_FAILED',\n              domain: ErrorDomain.MCP,\n              category: ErrorCategory.THIRD_PARTY,\n              details: {\n                serverName,\n              },\n            },\n            err,\n          );\n        }\n      },\n    };\n  }\n\n  /**\n   * Provides access to resource-related operations across all configured servers.\n   *\n   * Resources represent data exposed by MCP servers (files, database records, API responses, etc.).\n   *\n   * @example\n   * ```typescript\n   * // List all resources from all servers\n   * const allResources = await mcp.resources.list();\n   * Object.entries(allResources).forEach(([serverName, resources]) => {\n   *   console.log(`${serverName}: ${resources.length} resources`);\n   * });\n   *\n   * // Read a specific resource\n   * const content = await mcp.resources.read('weatherServer', 'file://data.json');\n   *\n   * // Receive resource updates\n   * await mcp.resources.onUpdated('weatherServer', async (params) => {\n   *   console.log(`Resource updated: ${params.uri}`);\n   * });\n   * await mcp.resources.subscribe('weatherServer', 'file://data.json');\n   * ```\n   */\n  public get resources() {\n    this.addToInstanceCache();\n    return {\n      /**\n       * Lists all available resources from all configured servers.\n       *\n       * Returns a map of server names to their resource arrays. Errors for individual\n       * servers are logged but don't throw - failed servers return empty arrays.\n       *\n       * @returns Promise resolving to object mapping server names to resource arrays\n       *\n       * @example\n       * ```typescript\n       * const resources = await mcp.resources.list();\n       * console.log(resources.weatherServer); // Array of resources\n       * ```\n      */\n      list: async (): Promise<Record<string, Resource[]>> => (await this.listResourcesWithErrors()).resources,\n      /**\n       * Lists resources while preserving per-server discovery failures.\n       * The existing `list()` method remains the success-only convenience API.\n       */\n      listWithErrors: (options?: MCPDiscoveryOptions) => this.listResourcesWithErrors(options),\n      /**\n       * Lists all available resource templates from all configured servers.\n       *\n       * Resource templates are URI templates (RFC 6570) describing dynamic resources.\n       * Errors for individual servers are logged but don't throw.\n       *\n       * @returns Promise resolving to object mapping server names to template arrays\n       *\n       * @example\n       * ```typescript\n       * const templates = await mcp.resources.templates();\n       * console.log(templates.weatherServer); // Array of resource templates\n       * ```\n       */\n      templates: async (): Promise<Record<string, ResourceTemplateType[]>> =>\n        (await this.listResourceTemplatesWithErrors()).templates,\n      /**\n       * Lists resource templates while preserving per-server discovery failures.\n       * The existing `templates()` method remains the success-only convenience API.\n       */\n      templatesWithErrors: (options?: MCPDiscoveryOptions) => this.listResourceTemplatesWithErrors(options),\n      /**\n       * Reads the content of a specific resource from a server.\n       *\n       * @param serverName - Name of the server to read from\n       * @param uri - URI of the resource to read\n       * @returns Promise resolving to the resource content\n       * @throws {MastraError} If reading the resource fails\n       *\n       * @example\n       * ```typescript\n       * const content = await mcp.resources.read('weatherServer', 'file://config.json');\n       * console.log(content.contents[0].text);\n       * ```\n       */\n      read: async (serverName: string, uri: string) => {\n        try {\n          const internalClient = await this.getConnectedClientForServer(serverName);\n          return internalClient.resources.read(uri);\n        } catch (error) {\n          throw new MastraError(\n            {\n              id: 'MCP_CLIENT_READ_RESOURCE_FAILED',\n              domain: ErrorDomain.MCP,\n              category: ErrorCategory.THIRD_PARTY,\n              details: {\n                serverName,\n                uri,\n              },\n            },\n            error,\n          );\n        }\n      },\n      /**\n       * Subscribes to update notifications for a resource on a server. Subscriptions ride\n       * the client's single `subscriptions/listen` stream and are restored after reconnects.\n       *\n       * @param serverName - Name of the server\n       * @param uri - URI of the resource to watch\n       * @throws {MastraError} If the server declines the subscription\n       *\n       * @example\n       * ```typescript\n       * await mcp.resources.onUpdated('weatherServer', ({ uri }) => console.log(`updated ${uri}`));\n       * await mcp.resources.subscribe('weatherServer', 'file://data.json');\n       * ```\n       */\n      subscribe: async (serverName: string, uri: string): Promise<void> => {\n        try {\n          const internalClient = await this.getConnectedClientForServer(serverName);\n          await internalClient.resources.subscribe(uri);\n        } catch (err) {\n          throw new MastraError(\n            {\n              id: 'MCP_CLIENT_SUBSCRIBE_RESOURCE_FAILED',\n              domain: ErrorDomain.MCP,\n              category: ErrorCategory.THIRD_PARTY,\n              details: { serverName, uri },\n            },\n            err,\n          );\n        }\n      },\n      /**\n       * Stops update notifications for a resource previously passed to `subscribe`.\n       *\n       * @param serverName - Name of the server\n       * @param uri - URI of the resource\n       * @throws {MastraError} If the stream cannot be updated\n       */\n      unsubscribe: async (serverName: string, uri: string): Promise<void> => {\n        try {\n          const internalClient = await this.getConnectedClientForServer(serverName);\n          await internalClient.resources.unsubscribe(uri);\n        } catch (err) {\n          throw new MastraError(\n            {\n              id: 'MCP_CLIENT_UNSUBSCRIBE_RESOURCE_FAILED',\n              domain: ErrorDomain.MCP,\n              category: ErrorCategory.THIRD_PARTY,\n              details: { serverName, uri },\n            },\n            err,\n          );\n        }\n      },\n      /**\n       * Sets a notification handler for when subscribed resources are updated on a server.\n       * Updates arrive for resources passed to `subscribe`.\n       *\n       * @param serverName - Name of the server to monitor\n       * @param handler - Callback function receiving the updated resource URI\n       * @returns Promise resolving when handler is registered\n       * @throws {MastraError} If setting up the handler fails\n       *\n       * @example\n       * ```typescript\n       * await mcp.resources.onUpdated('weatherServer', async (params) => {\n       *   console.log(`Resource updated: ${params.uri}`);\n       *   const content = await mcp.resources.read('weatherServer', params.uri);\n       * });\n       * ```\n       */\n      onUpdated: async (serverName: string, handler: (params: { uri: string }) => void) => {\n        try {\n          const internalClient = await this.getConnectedClientForServer(serverName);\n          return internalClient.resources.onUpdated(handler);\n        } catch (err) {\n          throw new MastraError(\n            {\n              id: 'MCP_CLIENT_ON_UPDATED_RESOURCE_FAILED',\n              domain: ErrorDomain.MCP,\n              category: ErrorCategory.THIRD_PARTY,\n              details: {\n                serverName,\n              },\n            },\n            err,\n          );\n        }\n      },\n      /**\n       * Sets a notification handler for when the resource list changes on a server.\n       *\n       * @param serverName - Name of the server to monitor\n       * @param handler - Callback function invoked when resources are added/removed\n       * @returns Promise resolving when handler is registered\n       * @throws {MastraError} If setting up the handler fails\n       *\n       * @example\n       * ```typescript\n       * await mcp.resources.onListChanged('weatherServer', async () => {\n       *   console.log('Resource list changed, re-fetching...');\n       *   const resources = await mcp.resources.list();\n       * });\n       * ```\n       */\n      onListChanged: async (serverName: string, handler: () => void) => {\n        try {\n          const internalClient = await this.getConnectedClientForServer(serverName);\n          return internalClient.resources.onListChanged(handler);\n        } catch (err) {\n          throw new MastraError(\n            {\n              id: 'MCP_CLIENT_ON_LIST_CHANGED_RESOURCE_FAILED',\n              domain: ErrorDomain.MCP,\n              category: ErrorCategory.THIRD_PARTY,\n              details: {\n                serverName,\n              },\n            },\n            err,\n          );\n        }\n      },\n    };\n  }\n\n  /**\n   * Provides access to prompt-related operations across all configured servers.\n   *\n   * Prompts are reusable message templates exposed by MCP servers that can be parameterized\n   * and used for AI interactions.\n   *\n   * @example\n   * ```typescript\n   * // List all prompts from all servers\n   * const allPrompts = await mcp.prompts.list();\n   * Object.entries(allPrompts).forEach(([serverName, prompts]) => {\n   *   console.log(`${serverName}: ${prompts.map(p => p.name).join(', ')}`);\n   * });\n   *\n   * // Get a specific prompt with arguments\n   * const prompt = await mcp.prompts.get({\n   *   serverName: 'weatherServer',\n   *   name: 'forecast-template',\n   *   args: { city: 'London', days: 7 }\n   * });\n   * ```\n   */\n  public get prompts() {\n    this.addToInstanceCache();\n    return {\n      /**\n       * Lists all available prompts from all configured servers.\n       *\n       * Returns a map of server names to their prompt arrays. Errors for individual\n       * servers are logged but don't throw - failed servers return empty arrays.\n       *\n       * @returns Promise resolving to object mapping server names to prompt arrays\n       *\n       * @example\n       * ```typescript\n       * const prompts = await mcp.prompts.list();\n       * console.log(prompts.weatherServer); // Array of prompts\n       * ```\n       */\n      list: async (): Promise<Record<string, Prompt[]>> => (await this.listPromptsWithErrors()).prompts,\n      /**\n       * Lists prompts while preserving per-server discovery failures.\n       * The existing `list()` method remains the success-only convenience API.\n       */\n      listWithErrors: (options?: MCPDiscoveryOptions) => this.listPromptsWithErrors(options),\n      /**\n       * Retrieves a specific prompt with its messages from a server.\n       *\n       * @param params - Parameters for the prompt request\n       * @param params.serverName - Name of the server to retrieve from\n       * @param params.name - Name of the prompt to retrieve\n       * @param params.args - Optional arguments to populate the prompt template\n       * @returns Promise resolving to the prompt result with messages\n       * @throws {MastraError} If fetching the prompt fails\n       *\n       * @example\n       * ```typescript\n       * const prompt = await mcp.prompts.get({\n       *   serverName: 'weatherServer',\n       *   name: 'forecast',\n       *   args: { city: 'London' },\n       * });\n       * console.log(prompt.messages);\n       * ```\n       */\n      get: async ({ serverName, name, args }: { serverName: string; name: string; args?: Record<string, any> }) => {\n        try {\n          const internalClient = await this.getConnectedClientForServer(serverName);\n          return internalClient.prompts.get({ name, args });\n        } catch (error) {\n          throw new MastraError(\n            {\n              id: 'MCP_CLIENT_GET_PROMPT_FAILED',\n              domain: ErrorDomain.MCP,\n              category: ErrorCategory.THIRD_PARTY,\n              details: {\n                serverName,\n                name,\n              },\n            },\n            error,\n          );\n        }\n      },\n      /**\n       * Sets a notification handler for when the prompt list changes on a server.\n       *\n       * @param serverName - Name of the server to monitor\n       * @param handler - Callback function invoked when prompts are added/removed/modified\n       * @returns Promise resolving when handler is registered\n       * @throws {MastraError} If setting up the handler fails\n       *\n       * @example\n       * ```typescript\n       * await mcp.prompts.onListChanged('weatherServer', async () => {\n       *   console.log('Prompt list changed, re-fetching...');\n       *   const prompts = await mcp.prompts.list();\n       * });\n       * ```\n       */\n      onListChanged: async (serverName: string, handler: () => void) => {\n        try {\n          const internalClient = await this.getConnectedClientForServer(serverName);\n          return internalClient.prompts.onListChanged(handler);\n        } catch (error) {\n          throw new MastraError(\n            {\n              id: 'MCP_CLIENT_ON_LIST_CHANGED_PROMPT_FAILED',\n              domain: ErrorDomain.MCP,\n              category: ErrorCategory.THIRD_PARTY,\n              details: {\n                serverName,\n              },\n            },\n            error,\n          );\n        }\n      },\n    };\n  }\n\n  /**\n   * Provides access to tool-related notification operations across all configured servers.\n   *\n   * To fetch tools, use `listTools()` or `listToolsets()`.\n   *\n   * @example\n   * ```typescript\n   * // React to tool list changes on a server\n   * await mcp.tools.onListChanged('weatherServer', async () => {\n   *   console.log('Tool list changed, re-fetching...');\n   *   const tools = await mcp.listTools();\n   * });\n   * ```\n   */\n  public get tools() {\n    this.addToInstanceCache();\n    return {\n      /**\n       * Sets a notification handler for when the tool list changes on a server.\n       *\n       * @param serverName - Name of the server to monitor\n       * @param handler - Callback function invoked when tools are added/removed/modified\n       * @returns Promise resolving when handler is registered\n       * @throws {MastraError} If setting up the handler fails\n       *\n       * @example\n       * ```typescript\n       * await mcp.tools.onListChanged('weatherServer', async () => {\n       *   const tools = await mcp.listTools();\n       * });\n       * ```\n       */\n      onListChanged: async (serverName: string, handler: () => void) => {\n        try {\n          const internalClient = await this.getConnectedClientForServer(serverName);\n          await internalClient.setToolListChangedNotificationHandler(handler);\n        } catch (error) {\n          throw new MastraError(\n            {\n              id: 'MCP_CLIENT_ON_LIST_CHANGED_TOOLS_FAILED',\n              domain: ErrorDomain.MCP,\n              category: ErrorCategory.THIRD_PARTY,\n              details: {\n                serverName,\n              },\n            },\n            error,\n          );\n        }\n      },\n    };\n  }\n\n  private addToInstanceCache() {\n    if (!mcpClientInstances.has(this.id)) {\n      mcpClientInstances.set(this.id, this);\n    }\n  }\n\n  private makeId() {\n    const text = JSON.stringify(this.serverConfigs).normalize('NFKC');\n    return createHash('sha256').update('MCPClient').update(text).digest('hex');\n  }\n\n  /**\n   * Disconnects from all MCP servers and cleans up resources.\n   *\n   * This method gracefully closes all server connections and clears internal caches.\n   * Safe to call multiple times - subsequent calls will wait for the first disconnect to complete.\n   *\n   * @example\n   * ```typescript\n   * // Cleanup on application shutdown\n   * process.on('SIGTERM', async () => {\n   *   await mcp.disconnect();\n   *   process.exit(0);\n   * });\n   * ```\n   */\n  public async disconnect() {\n    // Helps to prevent race condition\n    // If there is already a disconnect ongoing, return the existing promise.\n    if (this.disconnectPromise) {\n      return this.disconnectPromise;\n    }\n\n    this.disconnectPromise = (async () => {\n      try {\n        mcpClientInstances.delete(this.id);\n\n        // Tear down any in-flight authorization: each callback server owns a live\n        // loopback HTTP port, and closing it rejects the flow's waitForCode. Await\n        // the flow settlements so a disconnect during authentication does not leave\n        // a bound port or a dangling promise keeping the process alive.\n        const pendingFlows = Array.from(this.authFlowsByServer.values());\n        // Abort first so flows still in their setup phase (no callback server\n        // bound yet) unblock instead of parking on waitForCode and deadlocking\n        // the awaited settlement below.\n        for (const controller of this.authAbortControllersByServer.values()) {\n          controller.abort();\n        }\n        await Promise.allSettled(Array.from(this.authCallbackServersByServer.values()).map(server => server.close()));\n        await Promise.allSettled(pendingFlows);\n        this.authAbortControllersByServer.clear();\n        this.authCallbackServersByServer.clear();\n        this.authFlowsByServer.clear();\n\n        // Disconnect all clients in the cache\n        await Promise.allSettled(Array.from(this.mcpClientsById.values()).map(client => client.disconnect()));\n        this.mcpClientsById.clear();\n      } finally {\n        this.disconnectPromise = null;\n      }\n    })();\n\n    return this.disconnectPromise;\n  }\n\n  /**\n   * Reconnects a single MCP server by name.\n   *\n   * If the server is already connected, it will be forcefully disconnected and reconnected.\n   * If the server has never been connected, a new connection will be established.\n   *\n   * @param serverName - The name of the server to reconnect (must match a key in `servers`)\n   * @throws {Error} If the server name is not found in the configuration\n   *\n   * @example\n   * ```typescript\n   * // Reconnect a specific server after it fails\n   * await mcp.reconnectServer('weatherServer');\n   * ```\n   */\n  public async reconnectServer(serverName: string): Promise<void> {\n    const existingClient = this.mcpClientsById.get(serverName);\n    if (existingClient) {\n      await existingClient.forceReconnect();\n    } else {\n      await this.getConnectedClientForServer(serverName);\n    }\n  }\n\n  /**\n   * Runs the interactive OAuth authorization-code flow for a server.\n   *\n   * Requires the server to be configured with an MCPOAuthClientProvider whose\n   * redirect URL points at a loopback address. The flow:\n   *\n   * 1. Starts a loopback callback server on the redirect URL's port (falling\n   *    back to the next sequential ports when it is in use)\n   * 2. Attempts a connection so the SDK runs authorization server discovery\n   *    (identifying the client by its pre-registered id or its client metadata\n   *    URL) and delivers the authorization URL through the provider's\n   *    `onRedirectToAuthorization` callback — the host directs the user there\n   * 3. Waits for the browser to deliver the authorization code, validates the\n   *    OAuth state, exchanges the code for tokens, and reconnects\n   *\n   * Concurrent calls for the same server join the pending flow (the joiner's\n   * options are ignored — the pending flow keeps its own timeout); different\n   * servers authenticate independently. Each server needs its own provider\n   * instance: the flow pins session state on the provider, so sharing one\n   * MCPOAuthClientProvider across servers is not supported. Hosts with custom\n   * redirect handling (e.g. a web app with an HTTPS redirect URL) should\n   * drive MCPOAuthClientProvider directly instead.\n   *\n   * @param serverName - The name of the server to authenticate (must match a key in `servers`)\n   * @param options.timeoutMs - How long to wait for the browser callback (default 5 minutes)\n   * @throws {Error} If the server has no MCPOAuthClientProvider or its redirect URL is not loopback\n   *\n   * @example\n   * ```typescript\n   * if (mcp.getServerAuthState('weatherServer') === 'needs-auth') {\n   *   await mcp.authenticate('weatherServer');\n   * }\n   * ```\n   */\n  public async authenticate(serverName: string, options?: { timeoutMs?: number }): Promise<void> {\n    // Wait for an in-flight disconnect to finish before starting. disconnect()\n    // snapshots and then clears the auth-flow maps, so a flow registered during\n    // that window would have its abort controller and callback server wiped\n    // without being closed, orphaning the loopback port. Swallow a rejected\n    // disconnect: it must not surface as an authenticate() failure.\n    if (this.disconnectPromise) {\n      await this.disconnectPromise.catch(() => {});\n    }\n\n    const pendingFlow = this.authFlowsByServer.get(serverName);\n    if (pendingFlow) {\n      return pendingFlow;\n    }\n\n    // Correctness contract: nothing between here and runAuthorizationFlow's\n    // synchronous abort-controller registration may await. The disconnect-race\n    // guard above relies on this flow's map entries landing in the same tick, so\n    // that any disconnect() starting afterwards snapshots and tears them down.\n    const flow = this.runAuthorizationFlow(serverName, options).finally(() => {\n      this.authFlowsByServer.delete(serverName);\n    });\n    this.authFlowsByServer.set(serverName, flow);\n    return flow;\n  }\n\n  /**\n   * OAuth authorization state of a configured server.\n   *\n   * Returns `undefined` for servers without an authProvider and for servers\n   * that have not attempted a connection yet.\n   */\n  public getServerAuthState(serverName: string): MCPServerAuthState | undefined {\n    return this.mcpClientsById.get(serverName)?.authState;\n  }\n\n  private async runAuthorizationFlow(serverName: string, options?: { timeoutMs?: number }): Promise<void> {\n    // Register the abort controller synchronously, before the first await, so a\n    // cancel/disconnect during the setup phase (discovery, registration, port\n    // binding) can interrupt the flow rather than letting it park on waitForCode.\n    const abortController = new AbortController();\n    this.authAbortControllersByServer.set(serverName, abortController);\n    const throwIfAborted = () => {\n      if (abortController.signal.aborted) {\n        throw new Error(`Authentication for MCP server ${serverName} was cancelled.`);\n      }\n    };\n\n    // Resources acquired during setup that must be released on every exit path.\n    // Tracked here so the single outer finally can tear them down even if a\n    // fallible setup step (session begin, port binding) throws.\n    let provider: MCPOAuthClientProvider | undefined;\n    let sessionStarted = false;\n    let callbackServer: OAuthCallbackServer | undefined;\n\n    // Installed before the first fallible step so the abort-controller entry,\n    // provider session, and callback server never leak on an early throw.\n    try {\n      const config = this.getServerConfig(serverName);\n      const candidateProvider = config.authProvider;\n      if (!(candidateProvider instanceof MCPOAuthClientProvider)) {\n        throw new Error(\n          `Cannot authenticate MCP server ${serverName}: it is not configured with an MCPOAuthClientProvider.`,\n        );\n      }\n      provider = candidateProvider;\n\n      const redirectUrl = new URL(provider.redirectUrl.toString());\n      if (redirectUrl.protocol !== 'http:' || !isLoopbackHostname(redirectUrl.hostname)) {\n        throw new Error(\n          `Cannot authenticate MCP server ${serverName}: the provider's redirect URL must be a loopback address, got ${redirectUrl.origin}.`,\n        );\n      }\n\n      const state = await provider.beginAuthorizationSession();\n      sessionStarted = true;\n      // A cancel that arrived during beginAuthorizationSession() has no callback\n      // server to close yet, so bail here before binding a port and parking.\n      throwIfAborted();\n\n      callbackServer = await createOAuthCallbackServer({ redirectUrl, state });\n      // A cancel during port binding: bail before we ever wait for a code that\n      // will never arrive. The outer finally closes the freshly-bound server.\n      throwIfAborted();\n      this.authCallbackServersByServer.set(serverName, callbackServer);\n\n      // Point the authorization request at the callback URL that actually bound.\n      provider.applyResolvedRedirectUrl(callbackServer.url);\n\n      const client = await this.getClientForServer(serverName);\n      try {\n        // With valid stored tokens this simply connects; otherwise the SDK\n        // delivers the authorization URL and throws UnauthorizedError.\n        await client.connect();\n        return;\n      } catch (error) {\n        if (!(error instanceof UnauthorizedError)) {\n          throw this.handleConnectError(serverName, error);\n        }\n      }\n\n      const { code, iss } = await callbackServer.waitForCode(options);\n      await client.finishAuth(code, iss);\n\n      try {\n        await client.connect();\n      } catch (error) {\n        throw error instanceof UnauthorizedError ? error : this.handleConnectError(serverName, error);\n      }\n    } finally {\n      this.authCallbackServersByServer.delete(serverName);\n      this.authAbortControllersByServer.delete(serverName);\n      if (sessionStarted) {\n        provider?.endAuthorizationSession();\n      }\n      await callbackServer?.close();\n    }\n  }\n\n  /**\n   * Cancels a pending {@link authenticate} flow for a server.\n   *\n   * Tears down the loopback callback server immediately — the pending\n   * authenticate() call rejects. Useful when the user closed the browser\n   * without completing consent, which the host cannot observe.\n   *\n   * The resulting auth state depends on how far the flow had progressed: a flow\n   * cancelled after the server rejected the connection with a 401 stays in the\n   * `needs-auth` state so it can be retried right away, while a flow cancelled\n   * during the setup phase (before any connection was attempted) leaves the\n   * state unchanged — typically `undefined`.\n   *\n   * @param serverName - The name of the server whose flow to cancel\n   * @returns `true` if a pending flow was cancelled, `false` when no flow was pending\n   */\n  public async cancelAuthentication(serverName: string): Promise<boolean> {\n    const pendingFlow = this.authFlowsByServer.get(serverName);\n    if (!pendingFlow) {\n      return false;\n    }\n\n    // Abort first so a flow still in its setup phase (no callback server bound\n    // yet) is interrupted before it can park on waitForCode; then close the\n    // callback server if one exists, which rejects an in-progress waitForCode.\n    this.authAbortControllersByServer.get(serverName)?.abort();\n    await this.authCallbackServersByServer.get(serverName)?.close();\n    await pendingFlow.catch(() => undefined);\n    return true;\n  }\n\n  /**\n   * Returns instructions advertised by connected MCP servers during discovery.\n   *\n   * Servers that have not connected yet, or did not advertise instructions,\n   * return `undefined`.\n   */\n  public getServerInstructions(): Record<string, string | undefined> {\n    const instructions: Record<string, string | undefined> = {};\n\n    for (const serverName of Object.keys(this.serverConfigs)) {\n      instructions[serverName] = this.mcpClientsById.get(serverName)?.instructions;\n    }\n\n    return instructions;\n  }\n\n  /**\n   * Returns the identity each connected MCP server announced when the\n   * connection was established (`serverInfo`: name, version, and optionally\n   * title, description, websiteUrl, and icons), keyed by server name.\n   *\n   * A server's entry is `undefined` if it has not connected yet, or if it\n   * connected over the 2026-07-28 revision without announcing an identity, so\n   * don't use this to check connection state. Icon and website URLs come from\n   * the remote server and are not validated.\n   */\n  public getServerInfo(): Record<string, MCPServerImplementation | undefined> {\n    const info: Record<string, MCPServerImplementation | undefined> = {};\n    for (const serverName of Object.keys(this.serverConfigs)) {\n      info[serverName] = this.mcpClientsById.get(serverName)?.serverInfo;\n    }\n    return info;\n  }\n\n  /**\n   * The protocol revision negotiated with each configured server, keyed by\n   * server name. Servers that have not connected yet return `undefined`.\n   */\n  public getServerProtocolVersions(): Record<string, string | undefined> {\n    const versions: Record<string, string | undefined> = {};\n    for (const serverName of Object.keys(this.serverConfigs)) {\n      versions[serverName] = this.mcpClientsById.get(serverName)?.negotiatedProtocolVersion;\n    }\n    return versions;\n  }\n\n  /**\n   * Retrieves all tools from all configured servers with namespaced names.\n   *\n   * Tool names are namespaced as `serverName_toolName` to prevent conflicts between servers.\n   * This method is intended to be passed directly to an Agent definition.\n   *\n   * @returns Object mapping namespaced tool names to tool implementations.\n   * Errors for individual servers are logged but don't throw - failed servers are skipped.\n   * Transient connection failures are retried once after reconnecting the affected server.\n   *\n   * @example\n   * ```typescript\n   * const agent = new Agent({\n   *   id: 'multi-tool-agent',\n   *   name: 'Multi-tool Agent',\n   *   instructions: 'You have access to weather and stock tools.',\n   *   model: 'openai/gpt-4',\n   *   tools: await mcp.listTools(), // weather_getWeather, stockPrice_getPrice\n   * });\n   * ```\n   */\n  public async listTools(): Promise<Record<string, Tool<any, any, any, any>>> {\n    const result = await this.listToolsWithErrors();\n    return result.tools;\n  }\n\n  /**\n   * Retrieves all tools from all configured servers with namespaced names,\n   * along with any per-server errors.\n   *\n   * Like listTools(), but also returns errors for servers that failed to connect\n   * or list tools. This allows callers to report specific failure reasons per server.\n   *\n   * @returns Object with successful `tools`, legacy string `errors`, and structured `errorDetails`.\n   * Transient connection failures are retried once after reconnecting the affected server.\n   *\n   * @example\n   * ```typescript\n   * const { tools, errors, errorDetails } = await mcp.listToolsWithErrors();\n   * for (const [name, err] of Object.entries(errors)) {\n   *   console.error(`Server ${name} failed: ${err}`, errorDetails[name]);\n   * }\n   * ```\n   */\n  public async listToolsWithErrors(options?: MCPDiscoveryOptions): Promise<{\n    tools: Record<string, Tool<any, any, any, any>>;\n    errors: Record<string, string>;\n    errorDetails: Record<string, MCPDiscoveryErrorDetails>;\n    durations?: Record<string, number>;\n  }> {\n    this.addToInstanceCache();\n    const connectedTools: Record<string, Tool<any, any, any, any>> = {};\n    const errors: Record<string, string> = {};\n    const errorDetails: Record<string, MCPDiscoveryErrorDetails> = {};\n    const durations: Record<string, number> = {};\n\n    const settled = await this.discoverAcrossServers(\n      serverName => this.getToolsForServer(serverName),\n      {\n        errorId: 'MCP_CLIENT_GET_TOOLS_FAILED',\n        logMessage: 'Failed to list tools from server:',\n      },\n      options,\n    );\n\n    for (const { serverName, value, error, duration } of settled) {\n      durations[serverName] = duration;\n      if (error !== undefined) {\n        errors[serverName] = error.message;\n        errorDetails[serverName] = error;\n        continue;\n      }\n      for (const [toolName, toolConfig] of Object.entries(value)) {\n        connectedTools[`${serverName}_${toolName}`] = toolConfig;\n      }\n    }\n\n    const result = { tools: connectedTools, errors, errorDetails };\n    return options ? { ...result, durations } : result;\n  }\n\n  /**\n   * Returns toolsets organized by server name for dynamic tool injection.\n   *\n   * Unlike listTools(), this returns tools grouped by server without namespacing.\n   * This is intended to be passed dynamically to the generate() or stream() method.\n   *\n   * @returns Object mapping server names to their tool collections.\n   * Errors for individual servers are logged but don't throw - failed servers are skipped.\n   *\n   * @example\n   * ```typescript\n   * const agent = new Agent({\n   *   id: 'dynamic-agent',\n   *   name: 'Dynamic Agent',\n   *   instructions: 'You can use tools dynamically.',\n   *   model: 'openai/gpt-4',\n   * });\n   *\n   * const response = await agent.stream(prompt, {\n   *   toolsets: await mcp.listToolsets(), // { weather: {...}, stockPrice: {...} }\n   * });\n   * ```\n   */\n  public async listToolsets(): Promise<Record<string, Record<string, Tool<any, any, any, any>>>> {\n    const result = await this.listToolsetsWithErrors();\n    return result.toolsets;\n  }\n\n  /**\n   * Returns toolsets organized by server name, along with any per-server errors.\n   *\n   * Like listToolsets(), but also returns errors for servers that failed to connect\n   * or list tools. This allows callers to report specific failure reasons per server.\n   *\n   * @returns Object with successful `toolsets`, legacy string `errors`, and structured `errorDetails`.\n   * Transient connection failures are retried once after reconnecting the affected server.\n   *\n   * @example\n   * ```typescript\n   * const { toolsets, errors, errorDetails } = await mcp.listToolsetsWithErrors();\n   * for (const [name, err] of Object.entries(errors)) {\n   *   console.error(`Server ${name} failed: ${err}`, errorDetails[name]);\n   * }\n   * ```\n   */\n  public async listToolsetsWithErrors(options?: MCPDiscoveryOptions): Promise<{\n    toolsets: Record<string, Record<string, Tool<any, any, any, any>>>;\n    errors: Record<string, string>;\n    errorDetails: Record<string, MCPDiscoveryErrorDetails>;\n    durations?: Record<string, number>;\n  }> {\n    this.addToInstanceCache();\n    const connectedToolsets: Record<string, Record<string, Tool<any, any, any, any>>> = {};\n    const errors: Record<string, string> = {};\n    const errorDetails: Record<string, MCPDiscoveryErrorDetails> = {};\n    const durations: Record<string, number> = {};\n\n    const settled = await this.discoverAcrossServers(\n      serverName => this.getToolsForServer(serverName),\n      {\n        errorId: 'MCP_CLIENT_GET_TOOLSETS_FAILED',\n        logMessage: 'Failed to list toolsets from server:',\n      },\n      options,\n    );\n\n    for (const { serverName, value, error, duration } of settled) {\n      durations[serverName] = duration;\n      if (error !== undefined) {\n        errors[serverName] = error.message;\n        errorDetails[serverName] = error;\n        continue;\n      }\n      connectedToolsets[serverName] = value;\n    }\n\n    const result = { toolsets: connectedToolsets, errors, errorDetails };\n    return options ? { ...result, durations } : result;\n  }\n\n  /**\n   * Discovers every configured server's tools as plain, serializable definitions.\n   *\n   * Unlike `listTools()`/`listToolsets()`, the result contains no functions or references to a\n   * live client, so it can be JSON-serialized and cached (Redis, a database, a build artifact)\n   * and reused by other processes. Rebuild an executable tool from a cached definition with\n   * {@link toolFromDefinition}, which does not reconnect.\n   *\n   * Definitions are grouped by server and keyed by the server's own tool name, without the\n   * `serverName_toolName` namespacing that `listTools()` applies.\n   *\n   * @example\n   * ```typescript\n   * // Once, at build time or on the first worker:\n   * const definitions = await mcp.listToolDefinitions();\n   * await cache.set('mcp-tools', JSON.stringify(definitions));\n   *\n   * // In every other worker, with no MCP connections opened:\n   * const definitions = JSON.parse(await cache.get('mcp-tools'));\n   * const tool = mcp.toolFromDefinition('weather', definitions.weather.getForecast);\n   * ```\n   */\n  public async listToolDefinitions(): Promise<SerializableMCPToolCatalog> {\n    const result = await this.listToolDefinitionsWithErrors();\n    return result.definitions;\n  }\n\n  /**\n   * Like {@link listToolDefinitions}, but also returns errors for servers that failed to\n   * connect instead of surfacing only the servers that succeeded.\n   *\n   * Useful when caching a catalog, since it lets you avoid persisting a partial manifest that\n   * silently omits a server which happened to be down at discovery time.\n   * `errors` remains a string map for compatibility; `errorDetails` preserves\n   * machine-readable transport status and error codes when available.\n   */\n  public async listToolDefinitionsWithErrors(options?: MCPDiscoveryOptions): Promise<{\n    definitions: SerializableMCPToolCatalog;\n    errors: Record<string, string>;\n    errorDetails: Record<string, MCPDiscoveryErrorDetails>;\n    durations?: Record<string, number>;\n  }> {\n    this.addToInstanceCache();\n    const definitions: SerializableMCPToolCatalog = {};\n    const errors: Record<string, string> = {};\n    const errorDetails: Record<string, MCPDiscoveryErrorDetails> = {};\n    const durations: Record<string, number> = {};\n\n    const settled = await this.discoverAcrossServers(\n      async serverName => {\n        const client = await this.getConnectedClientForServer(serverName);\n        return client.toolDefinitions();\n      },\n      {\n        errorId: 'MCP_CLIENT_GET_TOOL_DEFINITIONS_FAILED',\n        logMessage: 'Failed to list tool definitions from server:',\n      },\n      options,\n    );\n\n    for (const { serverName, value, error, duration } of settled) {\n      durations[serverName] = duration;\n      if (error !== undefined) {\n        errors[serverName] = error.message;\n        errorDetails[serverName] = error;\n        continue;\n      }\n      definitions[serverName] = value;\n    }\n\n    const result = { definitions, errors, errorDetails };\n    return options ? { ...result, durations } : result;\n  }\n\n  /**\n   * Rebuilds an executable Mastra tool from a cached {@link SerializableMCPToolDefinition}.\n   *\n   * No MCP connection is opened here — that is the point of the method. The underlying client\n   * connects lazily, the first time the returned tool is actually executed, so a worker can\n   * reconstruct an entire tool map at startup and only pay for connections to the servers whose\n   * tools the model really calls.\n   *\n   * The returned tool behaves exactly like one from `listTools()`: same strict-mode metadata,\n   * approval policy, structured content handling, in-band tool errors, progress metadata, abort\n   * signal support, and reconnect/retry behavior.\n   *\n   * @param serverName Name of the server the definition came from, as configured on this client.\n   * @param definition A definition previously obtained from {@link listToolDefinitions}.\n   */\n  public async toolFromDefinition({\n    serverName,\n    definition,\n  }: {\n    serverName: string;\n    definition: SerializableMCPToolDefinition;\n  }): Promise<Tool<any, any, any, any>> {\n    this.addToInstanceCache();\n    // getOrCreateClient constructs the client without connecting; connection is deferred to\n    // the tool's first execution.\n    const client = await this.getOrCreateClient(serverName, this.getServerConfig(serverName));\n    return client.toolFromDefinition({ definition });\n  }\n\n  /**\n   * Rebuilds an entire cached catalog into a namespaced tool map, without connecting.\n   *\n   * This is the cached counterpart to `listTools()`: it produces the same `serverName_toolName`\n   * keys, so an agent's tool map can be reconstructed on a cold start from a catalog in Redis\n   * and dropped straight into the agent, with connections opened lazily per tool call.\n   *\n   * Servers present in the catalog but no longer configured on this client are skipped, so a\n   * stale cached manifest degrades gracefully instead of throwing.\n   *\n   * @example\n   * ```typescript\n   * const definitions = JSON.parse(await cache.get('mcp-tools'));\n   * const agent = new Agent({ tools: await mcp.toolsFromDefinitions({ definitions }), ... });\n   * ```\n   */\n  public async toolsFromDefinitions({\n    definitions: catalog,\n  }: {\n    definitions: SerializableMCPToolCatalog;\n  }): Promise<Record<string, Tool<any, any, any, any>>> {\n    const configuredServers = new Set(Object.keys(this.serverConfigs));\n    const tools: Record<string, Tool<any, any, any, any>> = {};\n\n    for (const [serverName, definitions] of Object.entries(catalog)) {\n      if (!configuredServers.has(serverName)) {\n        this.logger.warn('Skipping cached MCP tool definitions for a server that is no longer configured', {\n          serverName,\n        });\n        continue;\n      }\n\n      for (const [toolName, definition] of Object.entries(definitions)) {\n        tools[`${serverName}_${toolName}`] = await this.toolFromDefinition({ serverName, definition });\n      }\n    }\n\n    return tools;\n  }\n\n  private async listResourcesWithErrors(options?: MCPDiscoveryOptions): Promise<{\n    resources: Record<string, Resource[]>;\n    errors: Record<string, string>;\n    errorDetails: Record<string, MCPDiscoveryErrorDetails>;\n    durations?: Record<string, number>;\n  }> {\n    const { values, ...diagnostics } = await this.discoverValuesWithErrors(\n      async serverName => (await this.getConnectedClientForServer(serverName)).resources.list(),\n      { errorId: 'MCP_CLIENT_LIST_RESOURCES_FAILED', logMessage: 'Failed to list resources from server:' },\n      options,\n    );\n    return { resources: values, ...diagnostics };\n  }\n\n  private async listResourceTemplatesWithErrors(options?: MCPDiscoveryOptions): Promise<{\n    templates: Record<string, ResourceTemplateType[]>;\n    errors: Record<string, string>;\n    errorDetails: Record<string, MCPDiscoveryErrorDetails>;\n    durations?: Record<string, number>;\n  }> {\n    const { values, ...diagnostics } = await this.discoverValuesWithErrors(\n      async serverName => (await this.getConnectedClientForServer(serverName)).resources.templates(),\n      {\n        errorId: 'MCP_CLIENT_LIST_RESOURCE_TEMPLATES_FAILED',\n        logMessage: 'Failed to list resource templates from server:',\n      },\n      options,\n    );\n    return { templates: values, ...diagnostics };\n  }\n\n  private async listPromptsWithErrors(options?: MCPDiscoveryOptions): Promise<{\n    prompts: Record<string, Prompt[]>;\n    errors: Record<string, string>;\n    errorDetails: Record<string, MCPDiscoveryErrorDetails>;\n    durations?: Record<string, number>;\n  }> {\n    const { values, ...diagnostics } = await this.discoverValuesWithErrors(\n      async serverName => (await this.getConnectedClientForServer(serverName)).prompts.list(),\n      { errorId: 'MCP_CLIENT_LIST_PROMPTS_FAILED', logMessage: 'Failed to list prompts from server:' },\n      options,\n    );\n    return { prompts: values, ...diagnostics };\n  }\n\n  private async discoverValuesWithErrors<T>(\n    operation: (serverName: string) => Promise<T>,\n    onError: { errorId: Uppercase<string>; logMessage: string },\n    options?: MCPDiscoveryOptions,\n  ): Promise<{\n    values: Record<string, T>;\n    errors: Record<string, string>;\n    errorDetails: Record<string, MCPDiscoveryErrorDetails>;\n    durations?: Record<string, number>;\n  }> {\n    const values: Record<string, T> = {};\n    const errors: Record<string, string> = {};\n    const errorDetails: Record<string, MCPDiscoveryErrorDetails> = {};\n    const durations: Record<string, number> = {};\n    const settled = await this.discoverAcrossServers(operation, onError, options);\n\n    for (const { serverName, value, error, duration } of settled) {\n      durations[serverName] = duration;\n      if (error !== undefined) {\n        errors[serverName] = error.message;\n        errorDetails[serverName] = error;\n      } else {\n        values[serverName] = value;\n      }\n    }\n\n    const result = { values, errors, errorDetails };\n    return options ? { ...result, durations } : result;\n  }\n\n  /**\n   * Runs a per-server discovery `operation` against every configured server\n   * concurrently, isolating and logging per-server failures. Results are\n   * returned in configuration order (`Object.keys(serverConfigs)`) so callers\n   * fold them back deterministically.\n   *\n   * Mirrors the parallel teardown in `disconnect()`: each server is bounded by\n   * its own request timeout, so total time is the slowest single server rather\n   * than the sum, and one slow or unresponsive server never stalls the others.\n   * Backs `listTools`/`listToolsets`, `resources.list`/`templates`, and\n   * `prompts.list`.\n   */\n  private async discoverAcrossServers<T>(\n    operation: (serverName: string) => Promise<T>,\n    onError: { errorId: Uppercase<string>; logMessage: string },\n    options?: MCPDiscoveryOptions,\n  ): Promise<Array<ServerDiscoveryResult<T>>> {\n    const serverNames = Object.keys(this.serverConfigs);\n    return Promise.all(\n      serverNames.map(async (serverName): Promise<ServerDiscoveryResult<T>> => {\n        const startedAt = performance.now();\n        let timer: NodeJS.Timeout | undefined;\n\n        try {\n          const operationPromise = operation(serverName);\n          const value =\n            options?.perServerTimeoutMs === undefined\n              ? await operationPromise\n              : await Promise.race([\n                  operationPromise,\n                  new Promise<never>((_, reject) => {\n                    timer = setTimeout(\n                      () => reject(new Error(`Discovery timed out after ${options.perServerTimeoutMs}ms`)),\n                      options.perServerTimeoutMs,\n                    );\n                    timer.unref?.();\n                  }),\n                ]);\n\n          return { serverName, value, error: undefined, duration: performance.now() - startedAt };\n        } catch (error) {\n          const discoveryError = getMCPDiscoveryErrorDetails(error);\n\n          try {\n            const mastraError = new MastraError(\n              {\n                id: onError.errorId,\n                domain: ErrorDomain.MCP,\n                category: ErrorCategory.THIRD_PARTY,\n                details: { serverName },\n              },\n              error,\n            );\n            this.logger.trackException(mastraError);\n            this.logger.error(onError.logMessage, { error: mastraError.toString() });\n          } catch {\n            // Error inspection performed by telemetry must not make aggregate\n            // discovery reject. Preserve the normalized message even when a\n            // hostile third-party Error uses throwing getters or Proxy traps.\n            const fallbackError = new MastraError({\n              id: onError.errorId,\n              domain: ErrorDomain.MCP,\n              category: ErrorCategory.THIRD_PARTY,\n              text: discoveryError.message,\n              details: { serverName },\n            });\n            this.logger.trackException(fallbackError);\n            this.logger.error(onError.logMessage, { error: fallbackError.toString() });\n          }\n          return {\n            serverName,\n            value: undefined,\n            error: discoveryError,\n            duration: performance.now() - startedAt,\n          };\n        } finally {\n          clearTimeout(timer);\n        }\n      }),\n    );\n  }\n\n  /**\n   * Creates `MCPServerBase` proxy objects for each server connection in this\n   * MCPClient. The returned record can be spread directly into Mastra's\n   * `mcpServers` config so that external (non-Mastra) servers appear in Studio\n   * alongside local MCPServer instances.\n   *\n   * @returns Record mapping server names to proxy instances\n   *\n   * @example\n   * ```typescript\n   * const mcp = new MCPClient({\n   *   servers: {\n   *     trailhead: { command: 'npx', args: ['trailhead-server'] },\n   *   },\n   * });\n   *\n   * const mastra = new Mastra({\n   *   mcpServers: {\n   *     ...mcp.toMCPServerProxies(),\n   *   },\n   * });\n   * ```\n   */\n  public toMCPServerProxies(): Record<string, MCPServerBase> {\n    const proxies: Record<string, MCPServerBase> = {};\n    for (const serverName of Object.keys(this.serverConfigs)) {\n      proxies[serverName] = new MCPClientServerProxy({ name: serverName, id: serverName }, () =>\n        this.getConnectedClientForServer(serverName),\n      );\n    }\n    return proxies;\n  }\n\n  /**\n   * Gets the stderr stream of a connected stdio server.\n   *\n   * Only available for servers using stdio transport with `stderr: 'pipe'`.\n   * Returns null if the server is not connected, not using stdio, or stderr is not piped.\n   *\n   * @param serverName - The name of the server\n   * @returns The stderr stream, or null\n   */\n  public getServerStderr(serverName: string): Stream | null {\n    const client = this.mcpClientsById.get(serverName);\n    if (!client) return null;\n    return client.stderr;\n  }\n\n  private getServerConfig(serverName: string): MastraMCPServerDefinition {\n    const serverConfig = this.serverConfigs[serverName];\n    if (!serverConfig) {\n      throw new Error(`Server configuration not found for name: ${serverName}`);\n    }\n    return serverConfig;\n  }\n\n  private async getOrCreateClient(name: string, config: MastraMCPServerDefinition): Promise<InternalMastraMCPClient> {\n    if (this.disconnectPromise) {\n      await this.disconnectPromise;\n    }\n\n    const exists = this.mcpClientsById.has(name);\n    const existingClient = this.mcpClientsById.get(name);\n\n    this.logger.debug('Checking connected client', { name, exists });\n\n    if (exists) {\n      // This is just to satisfy Typescript since technically you could have this.mcpClientsById.set('someKey', undefined);\n      // Should never reach this point basically we always create a new MastraMCPClient instance when we add to the Map.\n      if (!existingClient) {\n        throw new Error(`Client ${name} exists but is undefined`);\n      }\n      return existingClient;\n    }\n\n    const mcpClient = new InternalMastraMCPClient({\n      name,\n      server: config,\n      timeout: config.timeout ?? this.defaultTimeout,\n    });\n\n    mcpClient.__setLogger(this.logger);\n\n    this.mcpClientsById.set(name, mcpClient);\n\n    return mcpClient;\n  }\n\n  private async getConnectedClient(name: string, config: MastraMCPServerDefinition): Promise<InternalMastraMCPClient> {\n    this.logger.debug('Connecting to MCP server', { name });\n\n    const mcpClient = await this.getOrCreateClient(name, config);\n\n    try {\n      await mcpClient.connect();\n    } catch (e) {\n      throw this.handleConnectError(name, e);\n    }\n    this.logger.debug('Connected to MCP server', { name });\n    return mcpClient;\n  }\n\n  private handleConnectError(name: string, error: unknown): MastraError {\n    const mastraError = new MastraError(\n      {\n        id: 'MCP_CLIENT_CONNECT_FAILED',\n        domain: ErrorDomain.MCP,\n        category: ErrorCategory.THIRD_PARTY,\n        text: `Failed to connect to MCP server ${name}: ${\n          error instanceof Error ? error.stack || error.message : String(error)\n        }`,\n        details: {\n          name,\n        },\n      },\n      error,\n    );\n    this.logger.trackException(mastraError);\n    this.logger.error('MCPClient errored connecting to MCP server:', { error: mastraError.toString() });\n    // Keep the client when authorization is required: it carries the needs-auth\n    // state and the pending transport that authenticate() completes.\n    if (!(error instanceof UnauthorizedError)) {\n      this.mcpClientsById.delete(name);\n    }\n    return mastraError;\n  }\n\n  private async getConnectedClientForServer(serverName: string): Promise<InternalMastraMCPClient> {\n    return this.getConnectedClient(serverName, this.getServerConfig(serverName));\n  }\n\n  private async getClientForServer(serverName: string): Promise<InternalMastraMCPClient> {\n    return this.getOrCreateClient(serverName, this.getServerConfig(serverName));\n  }\n\n  private async getToolsForServer(serverName: string): Promise<Record<string, Tool<any, any, any, any>>> {\n    for (let attempt = 1; attempt <= TOOL_DISCOVERY_MAX_ATTEMPTS; attempt++) {\n      try {\n        const client = await this.getConnectedClientForServer(serverName);\n        return await client.tools();\n      } catch (error) {\n        if (attempt === TOOL_DISCOVERY_MAX_ATTEMPTS || !isReconnectableMCPError(error)) {\n          throw error;\n        }\n\n        this.logger.debug('Retrying MCP tool discovery after reconnect', {\n          serverName,\n          attempt,\n          maxAttempts: TOOL_DISCOVERY_MAX_ATTEMPTS,\n          error: error instanceof Error ? error.message : String(error),\n        });\n\n        await this.reconnectServer(serverName);\n      }\n    }\n\n    return {};\n  }\n}\n","import type { ToolsInput } from '@mastra/core/agent';\nimport type { IMastraLogger } from '@mastra/core/logger';\nimport type { ServerNotifier } from '@modelcontextprotocol/server';\n\ninterface ActionDependencies {\n  getLogger: () => IMastraLogger;\n  /** Clients receive change events through `subscriptions/listen`; undefined until a transport is serving. */\n  getNotifier: () => ServerNotifier | undefined;\n}\n\n/** Runtime tool catalogue mutations. Every change is published to listening clients. */\nexport class ServerToolActions {\n  constructor(\n    private readonly deps: ActionDependencies & {\n      addTools: (tools: ToolsInput) => void;\n      removeTools: (toolIds: string[]) => string[];\n    },\n  ) {}\n\n  async add(tools: ToolsInput): Promise<void> {\n    this.deps.addTools(tools);\n    await this.notifyListChanged();\n  }\n\n  async remove(toolIds: string[]): Promise<void> {\n    if (this.deps.removeTools(toolIds).length === 0) return;\n    await this.notifyListChanged();\n  }\n\n  async notifyListChanged(): Promise<void> {\n    this.deps.getLogger().info('Tool list changed. Publishing notification.');\n    this.deps.getNotifier()?.toolsChanged();\n  }\n}\n\nexport class ServerResourceActions {\n  constructor(private readonly deps: ActionDependencies) {}\n\n  async notifyUpdated({ uri }: { uri: string }): Promise<void> {\n    this.deps.getLogger().info('Resource updated. Publishing notification.', { uri });\n    this.deps.getNotifier()?.resourceUpdated(uri);\n  }\n\n  async notifyListChanged(): Promise<void> {\n    this.deps.getLogger().info('Resource list changed. Publishing notification.');\n    this.deps.getNotifier()?.resourcesChanged();\n  }\n}\n\nexport class ServerPromptActions {\n  constructor(private readonly deps: ActionDependencies) {}\n\n  async notifyListChanged(): Promise<void> {\n    this.deps.getLogger().info('Prompt list changed. Publishing notification.');\n    this.deps.getNotifier()?.promptsChanged();\n  }\n}\n","import { createHash } from 'node:crypto';\nimport { RequestContext } from '@mastra/core/request-context';\nimport type { MCPToolExecutionContext } from '@mastra/core/tools';\nimport { ProtocolError, ProtocolErrorCode, inputResponse } from '@modelcontextprotocol/server';\nimport type { ServerContext } from '@modelcontextprotocol/server';\nimport { traceContextFromMeta } from '../shared/trace-context';\nimport type { MCPAuthInfoToUserMapper } from './types';\n\nconst unavailable = (feature: string, replacement: string) => (): Promise<never> =>\n  Promise.reject(new Error(`${feature} is not available on a 2026-07-28 server; ${replacement}`));\n\n/**\n * The `context.mcp` a 2026-07-28 request hands to tools: the 1.x shape, with the\n * per-request facilities (cancellation, metadata, auth, log, progress) live and the\n * removed server-initiated requests throwing at the call site.\n */\nexport function toToolExecutionContext(ctx: ServerContext, loggerName: string): MCPToolExecutionContext {\n  const progressToken = ctx.mcpReq._meta?.progressToken;\n  return {\n    protocolVersion: '2026-07-28',\n    extra: {\n      ...ctx,\n      signal: ctx.mcpReq.signal,\n      requestId: ctx.mcpReq.id,\n      authInfo: ctx.http?.authInfo,\n      _meta: ctx.mcpReq._meta,\n      sendNotification: unavailable('extra.sendNotification', 'use context.mcp.log or context.mcp.progress'),\n      sendRequest: unavailable('extra.sendRequest', 'the protocol no longer has server-initiated requests'),\n    },\n    elicitation: {\n      sendRequest: unavailable(\n        'elicitation.sendRequest',\n        'call context.suspend(payload) and read context.resumeData on the next round',\n      ),\n    },\n    // Delivered only when the caller opted in through its `_meta` log level.\n    log: (level, message, data) => ctx.mcpReq.log(level, { message, ...data }, loggerName),\n    progress: async params => {\n      if (progressToken === undefined) return;\n      await ctx.mcpReq.notify({ method: 'notifications/progress', params: { progressToken, ...params } });\n    },\n  };\n}\n\n/**\n * Builds the trusted application context for one request. Auth is re-derived from\n * the transport every time; nothing is carried between continuation rounds. The W3C\n * trace fields sent by the client are exposed under `traceContext` as opaque\n * strings for observability only; they are never consulted for authorization.\n */\nexport async function toRequestContext(\n  ctx: ServerContext,\n  mapAuthInfoToUser: MCPAuthInfoToUserMapper | undefined,\n): Promise<RequestContext> {\n  const requestContext = new RequestContext();\n  const traceContext = traceContextFromMeta(ctx.mcpReq._meta);\n  if (traceContext) requestContext.set('traceContext', traceContext);\n  const authInfo = ctx.http?.authInfo;\n  if (!authInfo) return requestContext;\n  requestContext.set('authInfo', authInfo);\n  const user = await mapAuthInfoToUser?.({ authInfo, extra: { authInfo }, requestContext });\n  if (user) requestContext.set('user', user);\n  return requestContext;\n}\n\n/**\n * The identity a continuation is bound to; a different caller cannot resume it.\n * Prefers the token subject, then the id of the user `mapAuthInfoToUser` produced,\n * and otherwise the bearer token itself, so two users sharing one OAuth client\n * never share a principal. A token refreshed mid-round therefore starts over.\n */\nexport function principalOf(ctx: ServerContext, requestContext: RequestContext): string {\n  const authInfo = ctx.http?.authInfo;\n  if (!authInfo) return 'anonymous';\n  const subject = authInfo.extra?.sub ?? authInfo.extra?.subject;\n  if (typeof subject === 'string' && subject) return `${authInfo.clientId}:sub:${subject}`;\n  const user = requestContext.get('user');\n  const userId = user && typeof user === 'object' ? (user as { id?: unknown }).id : undefined;\n  if (typeof userId === 'string' && userId) return `${authInfo.clientId}:user:${userId}`;\n  return `${authInfo.clientId}:token:${createHash('sha256').update(authInfo.token).digest('base64url')}`;\n}\n\nexport function hashArguments(value: unknown): string {\n  return createHash('sha256').update(canonicalJSON(value)).digest('base64url');\n}\n\nfunction canonicalJSON(value: unknown): string {\n  if (Array.isArray(value)) return `[${value.map(canonicalJSON).join(',')}]`;\n  if (value && typeof value === 'object') {\n    const entries = Object.entries(value as Record<string, unknown>)\n      .filter(([, v]) => v !== undefined)\n      .sort(([a], [b]) => (a < b ? -1 : a > b ? 1 : 0))\n      .map(([k, v]) => `${JSON.stringify(k)}:${canonicalJSON(v)}`);\n    return `{${entries.join(',')}}`;\n  }\n  return JSON.stringify(value) ?? 'null';\n}\n\n/**\n * What the server signs into `requestState` when a handler suspends. It names the\n * exact operation and caller so a continuation can only answer the round it was\n * issued for; `suspendPayload` is what the handler asked to be handed back.\n */\nexport interface ContinuationEnvelope {\n  method: 'tools/call' | 'resources/read' | 'prompts/get';\n  name: string;\n  argsHash: string;\n  principal: string;\n  round: number;\n  suspendPayload: unknown;\n  iat: number;\n}\n\n/** The key every suspended round asks the client to answer under. */\nexport const INPUT_KEY = 'input';\n\nexport interface ContinuationRound {\n  round: number;\n  suspendPayload: unknown;\n  /** Present when the client accepted; a decline or cancel ends the request instead. */\n  resumeData?: unknown;\n  outcome: 'accept' | 'decline' | 'cancel';\n}\n\n/**\n * Reads the continuation the SDK already integrity-checked and pairs it with this\n * round's answer. Returns `undefined` for a fresh request.\n */\nexport function readContinuation(\n  ctx: ServerContext,\n  requestContext: RequestContext,\n  expected: Pick<ContinuationEnvelope, 'method' | 'name' | 'argsHash'>,\n): ContinuationRound | undefined {\n  const envelope = ctx.mcpReq.requestState<ContinuationEnvelope>();\n  if (envelope === undefined) return undefined;\n  if (\n    !envelope ||\n    typeof envelope !== 'object' ||\n    envelope.method !== expected.method ||\n    envelope.name !== expected.name ||\n    envelope.argsHash !== expected.argsHash\n  ) {\n    throw new ProtocolError(\n      ProtocolErrorCode.InvalidParams,\n      `requestState does not belong to ${expected.method} \"${expected.name}\" with these arguments`,\n    );\n  }\n  if (envelope.principal !== principalOf(ctx, requestContext)) {\n    throw new ProtocolError(ProtocolErrorCode.InvalidParams, 'requestState was issued to a different caller');\n  }\n  const answer = inputResponse(ctx.mcpReq.inputResponses, INPUT_KEY);\n  if (answer.kind === 'missing') {\n    throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Missing input response \"${INPUT_KEY}\"`);\n  }\n  if (answer.kind !== 'elicit') {\n    throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Unsupported input response \"${INPUT_KEY}\"`);\n  }\n  return {\n    round: envelope.round,\n    suspendPayload: envelope.suspendPayload,\n    outcome: answer.action,\n    resumeData: answer.action === 'accept' ? (answer.content ?? {}) : undefined,\n  };\n}\n","import { readFileSync } from 'node:fs';\nimport type * as http from 'node:http';\nimport type { Agent, ToolsInput } from '@mastra/core/agent';\nimport { ErrorCategory, ErrorDomain, MastraError } from '@mastra/core/error';\nimport { MCPServerBase } from '@mastra/core/mcp';\nimport type {\n  MCPServerConfig as CoreMCPServerConfig,\n  MCPServerFGAConfig,\n  MCPToolExecutionResultV2,\n  ServerDetailInfo,\n  ServerInfo,\n} from '@mastra/core/mcp';\nimport { EntityType, SpanType, getOrCreateSpan } from '@mastra/core/observability';\nimport type { Span, TracingContext } from '@mastra/core/observability';\nimport { RequestContext } from '@mastra/core/request-context';\nimport { isStandardSchemaWithJSON, standardSchemaToJSONSchema, toStandardSchema } from '@mastra/core/schema';\nimport type { StandardSchemaWithJSON } from '@mastra/core/schema';\nimport { createTool, isValidationError } from '@mastra/core/tools';\nimport type { InternalCoreTool, MCPToolExecutionContext, MCPToolType, ToolAction } from '@mastra/core/tools';\nimport { makeCoreTool } from '@mastra/core/utils';\nimport type { SuspendOptions, Workflow } from '@mastra/core/workflows';\nimport { PromptSchema } from '@modelcontextprotocol/core';\nimport { RESOURCE_MIME_TYPE, RESOURCE_URI_META_KEY } from '@modelcontextprotocol/ext-apps';\nimport { hostHeaderValidation, originValidation, toNodeHandler } from '@modelcontextprotocol/node';\nimport type { NodeMcpRequestHandler } from '@modelcontextprotocol/node';\nimport {\n  CLIENT_INFO_META_KEY,\n  PROTOCOL_VERSION_META_KEY,\n  Server,\n  ProtocolError,\n  ProtocolErrorCode,\n  createMcpHandler,\n  createRequestStateCodec,\n  inputRequired,\n  specTypeSchemas,\n} from '@modelcontextprotocol/server';\nimport type {\n  BlobResourceContents,\n  CallToolResult,\n  HandlerResultTypeMap,\n  Implementation,\n  InputRequiredResult,\n  McpHttpHandler,\n  RequestMethod,\n  RequestStateCodec,\n  RequestTypeMap,\n  Resource,\n  ServerCapabilities,\n  ServerContext,\n  ServerNotifier,\n  TextResourceContents,\n  Tool as MCPTool,\n  jsonSchemaValidator,\n} from '@modelcontextprotocol/server';\nimport { serveStdio } from '@modelcontextprotocol/server/stdio';\nimport type { StdioServerHandle } from '@modelcontextprotocol/server/stdio';\n\nimport { JSON_SCHEMA_2020_12, toJsonSchema2020 } from '../shared/json-schema-dialect';\nimport { withMastraToolStrictMeta } from '../shared/mastra-tool-meta';\nimport { ServerPromptActions, ServerResourceActions, ServerToolActions } from './actions';\nimport {\n  INPUT_KEY,\n  hashArguments,\n  principalOf,\n  readContinuation,\n  toRequestContext,\n  toToolExecutionContext,\n} from './request';\nimport type { ContinuationEnvelope } from './request';\nimport type {\n  AppResources,\n  MCPAuthInfoToUserMapper,\n  MCPServerCacheHints,\n  MCPServerHTTPRequestOptions,\n  MCPServerPrompts,\n  MCPServerRequest,\n  MCPServerRequestStateOptions,\n  MCPServerResources,\n} from './types';\n\nexport interface MCPServerConfig extends CoreMCPServerConfig {\n  resources?: MCPServerResources;\n  prompts?: MCPServerPrompts;\n  /** MCP Apps (SEP-1865) HTML resources served under `ui://`. */\n  appResources?: AppResources;\n  /** Custom JSON Schema validator, for runtimes where the SDK default is unavailable. */\n  jsonSchemaValidator?: jsonSchemaValidator;\n  cacheHints?: MCPServerCacheHints;\n  /** Integrity protection for `input_required` continuation state. */\n  requestState?: MCPServerRequestStateOptions;\n}\n\nexport interface MCPServerHTTPOptions {\n  url: URL;\n  httpPath: string;\n  req: http.IncomingMessage;\n  res: http.ServerResponse<http.IncomingMessage>;\n  options?: MCPServerHTTPRequestOptions;\n}\n\n/** The JSON Schema form a suspended handler asks the client to fill in. */\ntype JSONSchema7 = NonNullable<Extract<MCPToolExecutionResultV2, { status: 'suspended' }>['resumeSchema']>;\n\nconst EMPTY_OBJECT_SCHEMA = { type: 'object', properties: {} } as const;\n\n/** Tool description served over Mastra's REST routes; `id` is what Studio keys tools by. */\ntype ToolInfo = {\n  id: string;\n  name: string;\n  description?: string;\n  inputSchema: Record<string, unknown>;\n  outputSchema?: Record<string, unknown>;\n  toolType?: MCPToolType;\n  _meta?: Record<string, unknown>;\n};\n\n/** Where a suspended handler is resumed from and what the client is asked. */\ninterface Suspension {\n  method: ContinuationEnvelope['method'];\n  name: string;\n  argsHash: string;\n  round: number;\n  suspendPayload: unknown;\n  resumeSchema: JSONSchema7 | undefined;\n}\n\n/**\n * Exposes Mastra tools, agents, workflows, resources and prompts to Model Context\n * Protocol (MCP) clients using protocol revision 2026-07-28: self-contained requests\n * over Streamable HTTP or stdio, native `input_required` continuation and\n * per-request logging.\n *\n * @example\n * `yourTool` is a tool you have already configured.\n * ```typescript\n * import { MCPServer } from '@mastra/mcp';\n *\n * const server = new MCPServer({\n *   id: 'my-server',\n *   name: 'My Server',\n *   version: '1.0.0',\n *   tools: { yourTool },\n * });\n * await server.startStdio();\n * ```\n *\n * @see For documentation bundled with your installed package, locate\n * `@mastra/mcp/package.json` with your project's resolver or package-manager\n * tooling, then read `dist/docs/SKILL.md` from that package root and follow its\n * reference links. Use package-manager tools for virtual or archived packages.\n *\n * @see [MCP server documentation](https://mastra.ai/reference/tools/mcp-server)\n * if packaged docs are unavailable.\n */\nexport class MCPServer extends MCPServerBase {\n  override readonly mcpVersion = 2 as const;\n\n  readonly resources: ServerResourceActions;\n  readonly prompts: ServerPromptActions;\n  readonly toolActions: ServerToolActions;\n\n  private readonly resourceOptions?: MCPServerResources;\n  private readonly promptOptions?: MCPServerPrompts;\n  private readonly appResourceList: Resource[] = [];\n  private readonly appResourceHtml = new Map<string, string>();\n  private readonly jsonSchemaValidator?: jsonSchemaValidator;\n  private readonly cacheHints?: MCPServerCacheHints;\n  private readonly mapAuthInfoToUser?: MCPAuthInfoToUserMapper;\n  private readonly fga?: MCPServerFGAConfig;\n  private readonly requestStateCodec: RequestStateCodec<ContinuationEnvelope>;\n\n  private httpHandler?: McpHttpHandler;\n  private nodeHandler?: NodeMcpRequestHandler;\n  private stdioHandle?: StdioServerHandle;\n  private stdioInstance?: Server;\n\n  constructor(config: MCPServerConfig) {\n    super(config);\n    this.jsonSchemaValidator = config.jsonSchemaValidator;\n    this.cacheHints = config.cacheHints;\n    this.mapAuthInfoToUser = config.mapAuthInfoToUser;\n    this.fga = config.fga;\n    this.promptOptions = config.prompts;\n    this.resourceOptions = config.resources;\n    this.loadAppResources(config.appResources);\n    this.requestStateCodec = this.createRequestStateCodec(config.requestState);\n    if (config.resources?.resumeSchema) this.assertFormRepresentable('resources', config.resources.resumeSchema);\n    if (config.prompts?.resumeSchema) this.assertFormRepresentable('prompts', config.prompts.resumeSchema);\n\n    const deps = { getLogger: () => this.logger, getNotifier: () => this.notifier() };\n    this.toolActions = new ServerToolActions({\n      ...deps,\n      addTools: tools => this.addTools(tools),\n      removeTools: keys => this.removeTools(keys),\n    });\n    this.resources = new ServerResourceActions(deps);\n    this.prompts = new ServerPromptActions(deps);\n  }\n\n  private createRequestStateCodec(options: MCPServerRequestStateOptions | undefined) {\n    let key = options?.key;\n    if (key === undefined) {\n      key = globalThis.crypto.getRandomValues(new Uint8Array(32));\n      this.logger.warn(\n        'No requestState.key configured: continuation state is signed with a per-process key, so a suspended request can only be resumed on this process. Set requestState.key in multi-instance and serverless deployments.',\n      );\n    }\n    return createRequestStateCodec<ContinuationEnvelope>({ key, ttlSeconds: options?.ttlSeconds });\n  }\n\n  // ---------------------------------------------------------------------------\n  // Catalogue\n\n  convertTools(\n    tools: ToolsInput,\n    agents?: Record<string, Agent>,\n    workflows?: Record<string, Workflow>,\n  ): Record<string, InternalCoreTool> {\n    const converted: Record<string, InternalCoreTool> = {};\n    const convert = (name: string, tool: NonNullable<ToolsInput[string]>) => {\n      const coreTool = makeCoreTool(tool, {\n        name,\n        requestContext: new RequestContext(),\n        tracingContext: {},\n        mastra: this.mastra,\n        logger: this.logger,\n        description: 'description' in tool ? tool.description : undefined,\n      }) as InternalCoreTool;\n      converted[name] = { ...coreTool, id: name } as InternalCoreTool;\n    };\n\n    for (const [name, tool] of Object.entries(tools)) {\n      if (!tool || !('execute' in tool) || typeof tool.execute !== 'function') {\n        this.logger.warn('Tool has no execute function, skipping', { tool: name });\n        continue;\n      }\n      if ('resumeSchema' in tool && tool.resumeSchema)\n        this.assertFormRepresentable(`tool '${name}'`, tool.resumeSchema);\n      convert(name, tool);\n    }\n\n    for (const [key, agent] of Object.entries(agents ?? {})) {\n      const description = agent.getDescription();\n      if (!description) {\n        throw new MastraError({\n          id: 'MCP_SERVER_AGENT_OR_WORKFLOW_TOOL_CONVERSION_FAILED',\n          domain: ErrorDomain.MCP,\n          category: ErrorCategory.USER,\n          text: `Agent '${agent.name}' (key: '${key}') must have a non-empty description to be used in an MCPServer.`,\n        });\n      }\n      const name = `ask_${key}`;\n      if (converted[name]) {\n        this.logger.warn(`Tool '${name}' already exists; agent '${key}' is not exposed.`);\n        continue;\n      }\n      convert(\n        name,\n        createTool({\n          id: name,\n          description: `Ask agent '${agent.name}' a question. Agent description: ${description}`,\n          inputSchema: {\n            type: 'object' as const,\n            properties: { message: { type: 'string', description: 'The question or input for the agent.' } },\n            required: ['message'],\n            additionalProperties: false,\n          },\n          mcp: { toolType: 'agent' },\n          execute: async (inputData, context) => {\n            const { message } = inputData as { message: string };\n            return agent.generate(message, {\n              requestContext: context?.requestContext,\n              tracingContext: context?.tracingContext,\n              abortSignal: context?.abortSignal,\n            });\n          },\n        }),\n      );\n    }\n\n    for (const [key, workflow] of Object.entries(workflows ?? {})) {\n      if (!workflow.description) {\n        throw new MastraError({\n          id: 'MCP_SERVER_AGENT_OR_WORKFLOW_TOOL_CONVERSION_FAILED',\n          domain: ErrorDomain.MCP,\n          category: ErrorCategory.USER,\n          text: `Workflow '${workflow.id}' (key: '${key}') must have a non-empty description to be used in an MCPServer.`,\n        });\n      }\n      const name = `run_${key}`;\n      if (converted[name]) {\n        this.logger.warn(`Tool '${name}' already exists; workflow '${key}' is not exposed.`);\n        continue;\n      }\n      convert(\n        name,\n        createTool({\n          id: name,\n          description: `Run workflow '${key}'. Workflow description: ${workflow.description}`,\n          inputSchema: workflow.inputSchema,\n          mcp: { toolType: 'workflow' },\n          execute: async (inputData, context) => {\n            const run = await workflow.createRun({ runId: context?.requestContext?.get('runId') });\n            return run.start({\n              inputData,\n              requestContext: context?.requestContext,\n              tracingContext: context?.tracingContext,\n            });\n          },\n        }),\n      );\n    }\n\n    this.logger.info(`${Object.keys(converted).length} tools registered`);\n    return converted;\n  }\n\n  /**\n   * A suspended handler's `resumeSchema` becomes the form the client fills in, and\n   * the protocol only allows a flat object of primitives there. Checked at registration\n   * so a tool cannot suspend into a request no client can answer.\n   */\n  private assertFormRepresentable(owner: string, resumeSchema: unknown): void {\n    const requestedSchema = this.formSchema(resumeSchema);\n    const validation = specTypeSchemas.ElicitRequestFormParams['~standard'].validate({\n      message: owner,\n      requestedSchema,\n    });\n    if (validation instanceof Promise || validation.issues) {\n      throw new MastraError({\n        id: 'MCP_SERVER_RESUME_SCHEMA_NOT_REPRESENTABLE',\n        domain: ErrorDomain.MCP,\n        category: ErrorCategory.USER,\n        text: `The resumeSchema of ${owner} cannot be presented as an input request: it must be an object whose properties are strings, numbers, booleans or enums.`,\n        details: { owner, issues: JSON.stringify(validation instanceof Promise ? 'async' : validation.issues) },\n      });\n    }\n  }\n\n  /**\n   * Input-request forms are a restricted flat-object subset of JSON Schema, so\n   * the dialect declaration is left off the requested schema.\n   */\n  private formSchema(resumeSchema: unknown): Record<string, unknown> {\n    const schema = isStandardSchemaWithJSON(resumeSchema)\n      ? resumeSchema\n      : toStandardSchema(resumeSchema as Parameters<typeof toStandardSchema>[0]);\n    const { $schema: _dialect, ...form } = this.jsonSchema(schema, { io: 'input' }) ?? {};\n    return Object.keys(form).length ? form : { type: 'object', properties: {} };\n  }\n\n  /**\n   * Converts a tool schema to JSON Schema 2020-12, the dialect MCP 2026-07-28\n   * assumes when none is declared. The dialect declaration is kept so validators\n   * that dispatch on `$schema` pick the same draft on both sides. Some vendors\n   * (e.g. zod v3) emit 2019-09 for this target, so it is rewritten to 2020-12.\n   */\n  private jsonSchema(schema: unknown, options?: { io: 'input' | 'output' }): Record<string, unknown> | undefined {\n    if (!schema) return undefined;\n    if (!isStandardSchemaWithJSON(schema)) {\n      return (schema as { jsonSchema?: Record<string, unknown> }).jsonSchema ?? (schema as Record<string, unknown>);\n    }\n    const converted = standardSchemaToJSONSchema(schema, { ...options, target: 'draft-2020-12' }) as Record<\n      string,\n      unknown\n    >;\n    if (!converted.$schema || converted.$schema === JSON_SCHEMA_2020_12) return converted;\n    return toJsonSchema2020(converted) ?? converted;\n  }\n\n  private addTools(tools: ToolsInput): void {\n    const converted = this.convertTools(tools);\n    for (const key of Object.keys(converted)) {\n      if (this.convertedTools[key]) this.logger.warn(`Tool '${key}' already exists and will be replaced.`);\n    }\n    this.convertedTools = { ...this.convertedTools, ...converted };\n    this.originalTools = { ...this.originalTools, ...tools };\n    if (this.mastra) {\n      for (const [key, tool] of Object.entries(tools)) {\n        if (isRegistrableTool(tool)) this.mastra.addTool(tool, this.mastraToolKey(key, tool));\n      }\n    }\n  }\n\n  private removeTools(toolIds: string[]): string[] {\n    const removed: string[] = [];\n    const convertedTools = { ...this.convertedTools };\n    const originalTools = { ...this.originalTools };\n    for (const toolId of toolIds) {\n      if (!convertedTools[toolId]) {\n        this.logger.warn(`Cannot remove tool '${toolId}': tool not found.`);\n        continue;\n      }\n      const original = originalTools[toolId];\n      delete convertedTools[toolId];\n      delete originalTools[toolId];\n      removed.push(toolId);\n      if (this.mastra && original && typeof original === 'object' && 'id' in original) {\n        this.mastra.removeTool(this.mastraToolKey(toolId, original));\n      }\n    }\n    this.convertedTools = convertedTools;\n    this.originalTools = originalTools;\n    return removed;\n  }\n\n  /** Mirrors `__registerMastra`: the tool's intrinsic id when it has one, else its key. */\n  private mastraToolKey(key: string, tool: NonNullable<ToolsInput[string]>): string {\n    return 'id' in tool && typeof tool.id === 'string' ? tool.id : key;\n  }\n\n  /** Schema-less tools advertise an open empty object rather than the default validator schema. */\n  private hasInputSchema(name: string): boolean {\n    const original = this.originalTools[name];\n    return !original || !('inputSchema' in original) || original.inputSchema !== undefined;\n  }\n\n  private resumeSchemaOf(name: string): JSONSchema7 | undefined {\n    const original = this.originalTools[name];\n    if (!original || !('resumeSchema' in original) || !original.resumeSchema) return undefined;\n    return this.formSchema(original.resumeSchema);\n  }\n\n  /**\n   * Prefers the tool's own schema over the converted core tool's, which has\n   * already been lowered to draft-07, so 2020-12 shapes survive advertisement.\n   */\n  private advertisedSchema(name: string, field: 'inputSchema' | 'outputSchema', converted: unknown) {\n    const original = this.originalTools[name];\n    const own = original && field in original ? (original as Record<string, unknown>)[field] : undefined;\n    return this.jsonSchema(isStandardSchemaWithJSON(own) ? own : converted, {\n      io: field === 'inputSchema' ? 'input' : 'output',\n    });\n  }\n\n  private toolInfo(name: string, tool: InternalCoreTool): ToolInfo {\n    return {\n      id: name,\n      name,\n      description: tool.description,\n      inputSchema: this.hasInputSchema(name)\n        ? (this.advertisedSchema(name, 'inputSchema', tool.parameters) ?? EMPTY_OBJECT_SCHEMA)\n        : EMPTY_OBJECT_SCHEMA,\n      outputSchema: this.advertisedSchema(name, 'outputSchema', tool.outputSchema),\n      toolType: tool.mcp?.toolType,\n      _meta: withMastraToolStrictMeta(tool.mcp?._meta, tool.strict),\n    };\n  }\n\n  /** Builds the wire tool description, validated against the spec schema. */\n  private toMCPTool(name: string, tool: InternalCoreTool): MCPTool {\n    const info = this.toolInfo(name, tool);\n    const validation = specTypeSchemas.Tool['~standard'].validate({\n      name,\n      title: tool.title,\n      description: info.description,\n      inputSchema: info.inputSchema,\n      outputSchema: info.outputSchema,\n      annotations: tool.mcp?.annotations,\n      _meta: normalizeUiMeta(info._meta),\n    });\n    if (validation instanceof Promise || validation.issues) {\n      throw new Error(`Tool '${name}' does not describe a valid MCP tool (input schemas must be objects)`);\n    }\n    return validation.value;\n  }\n\n  private hasUiMetadata(): boolean {\n    return Object.values(this.convertedTools).some(tool => Boolean(uiResourceUri(tool.mcp?._meta)));\n  }\n\n  // ---------------------------------------------------------------------------\n  // Protocol instance\n\n  private capabilities(): ServerCapabilities {\n    const capabilities: ServerCapabilities = {\n      tools: { listChanged: true },\n      // Static declaration required by the 2026-07-28 logging utility; delivery\n      // itself is gated per request by the caller's `_meta` log-level opt-in.\n      logging: {},\n    };\n    if (this.resourceOptions || this.appResourceList.length > 0) {\n      capabilities.resources = { subscribe: true, listChanged: true };\n    }\n    if (this.promptOptions) capabilities.prompts = { listChanged: true };\n    if (this.appResourceList.length > 0 || this.hasUiMetadata()) {\n      capabilities.extensions = { 'io.modelcontextprotocol/ui': {} };\n    }\n    return capabilities;\n  }\n\n  private createServerInstance(): Server {\n    const server = new Server(\n      {\n        name: this.name,\n        version: this.version,\n        title: this.title,\n        description: this.description,\n        websiteUrl: this.websiteUrl,\n        icons: this.icons,\n      },\n      {\n        capabilities: this.capabilities(),\n        instructions: this.instructions,\n        jsonSchemaValidator: this.jsonSchemaValidator,\n        cacheHints: this.cacheHints,\n        // Continuation state is verified before any handler runs; a tampered,\n        // expired or foreign envelope answers the round with -32602.\n        requestState: { verify: this.requestStateCodec.verify },\n      },\n    );\n    // Deprecated session-level log control (SEP-2577): not served.\n    server.removeRequestHandler('logging/setLevel');\n    this.registerToolHandlers(server);\n    this.registerResourceHandlers(server);\n    this.registerPromptHandlers(server);\n    return server;\n  }\n\n  /**\n   * Registers `method` under an `MCP_SERVER_REQUEST` span, so every request the\n   * server answers is recorded — including the list and read methods that never\n   * reach a tool, and requests that fail before any work is done.\n   */\n  private setTracedHandler<M extends RequestMethod>(\n    server: Server,\n    method: M,\n    handler: (\n      request: RequestTypeMap[M],\n      ctx: ServerContext,\n      trace: {\n        requestSpan: Span<SpanType.MCP_SERVER_REQUEST> | undefined;\n        /** Resolved once per request, before the span, and shared with the handler. */\n        requestContext: RequestContext;\n        /**\n         * Records the error behind an `isError` result. A handler that turns a\n         * caught error into an error result reports it here so the span carries\n         * the original error rather than its serialized text.\n         */\n        reportError: (error: Error) => void;\n      },\n    ) => Promise<HandlerResultTypeMap[M]>,\n  ): void {\n    server.setRequestHandler(method, async (request, ctx) => {\n      const params = request.params as Record<string, unknown> | undefined;\n      // A span can only be given its request context when it is created, so auth is\n      // resolved first. A mapper that throws still leaves a failed span behind.\n      let requestContext: RequestContext;\n      try {\n        requestContext = await toRequestContext(ctx, this.mapAuthInfoToUser);\n      } catch (error) {\n        this.startRequestSpan(method, params, { server, ctx })?.error({ error: error as Error });\n        throw error;\n      }\n      const requestSpan = this.startRequestSpan(method, params, { server, ctx, requestContext });\n      let reportedError: Error | undefined;\n      return this.traceRequest(\n        requestSpan,\n        () =>\n          handler(request, ctx, {\n            requestSpan,\n            requestContext,\n            reportError: error => {\n              reportedError = error;\n            },\n          }),\n        () => reportedError,\n      );\n    });\n  }\n\n  /**\n   * Opens the span for one served request. `connection` is absent for\n   * {@link executeTool}, which is called in-process and negotiates nothing.\n   */\n  private startRequestSpan(\n    method: string,\n    params: Record<string, unknown> | undefined,\n    connection?: { server?: Server; ctx?: ServerContext; requestContext?: RequestContext },\n  ): Span<SpanType.MCP_SERVER_REQUEST> | undefined {\n    // A stateless HTTP request carries its own envelope; a stdio connection\n    // negotiates once and the instance holds what it agreed to.\n    const envelope = connection?.ctx?.mcpReq.envelope as Record<string, unknown> | undefined;\n    const protocolVersion = envelope?.[PROTOCOL_VERSION_META_KEY] ?? connection?.server?.getNegotiatedProtocolVersion();\n    const client = (envelope?.[CLIENT_INFO_META_KEY] ?? connection?.server?.getClientVersion()) as\n      | Implementation\n      | undefined;\n    const target = params?.name ?? params?.uri;\n    const targetName = typeof target === 'string' ? target : undefined;\n\n    return getOrCreateSpan({\n      type: SpanType.MCP_SERVER_REQUEST,\n      name: targetName ? `${method} ${targetName}` : method,\n      entityType: EntityType.MCP_SERVER,\n      entityId: this.id,\n      entityName: this.name,\n      input: params,\n      attributes: {\n        mcpMethod: method,\n        targetName,\n        mcpServer: this.name,\n        serverVersion: this.version,\n        mcpProtocolVersion: typeof protocolVersion === 'string' ? protocolVersion : undefined,\n        clientName: client?.name,\n        clientVersion: client?.version,\n      },\n      tracingContext: {},\n      requestContext: connection?.requestContext,\n      mastra: this.mastra,\n    });\n  }\n\n  /**\n   * Runs `fn` under a request span. Only the protocol's own `isError` marks a\n   * failure; the rest of a result is opaque handler output that may legitimately\n   * carry any field. A thrown error ends the whole span tree and is rethrown.\n   */\n  private async traceRequest<T>(\n    requestSpan: Span<SpanType.MCP_SERVER_REQUEST> | undefined,\n    fn: () => Promise<T>,\n    getReportedError?: () => Error | undefined,\n  ): Promise<T> {\n    try {\n      const result = await fn();\n      const errorResult = result as { isError?: boolean; content?: Array<{ text?: string }> } | undefined;\n      if (errorResult?.isError) {\n        requestSpan?.error({\n          error:\n            getReportedError?.() ??\n            new MastraError({\n              id: 'MCP_SERVER_REQUEST_FAILED',\n              domain: ErrorDomain.MCP,\n              category: ErrorCategory.USER,\n              text: errorResult.content\n                ?.map(c => c.text)\n                .filter(Boolean)\n                .join('\\n'),\n            }),\n        });\n      } else {\n        requestSpan?.end({ output: result });\n      }\n      return result;\n    } catch (error) {\n      requestSpan?.error({ error: error as Error, endTree: true });\n      throw error;\n    }\n  }\n\n  /** Answers a suspended round: one keyed form derived from the handler's `resumeSchema`. */\n  private async inputRequired(\n    ctx: ServerContext,\n    requestContext: RequestContext,\n    suspension: Suspension,\n  ): Promise<InputRequiredResult> {\n    const payload = suspension.suspendPayload as { message?: unknown } | undefined;\n    const message =\n      typeof payload?.message === 'string'\n        ? payload.message\n        : typeof suspension.resumeSchema?.description === 'string'\n          ? suspension.resumeSchema.description\n          : `\"${suspension.name}\" needs more input`;\n    const { method, name, argsHash, round, suspendPayload } = suspension;\n    return inputRequired({\n      inputRequests: {\n        [INPUT_KEY]: inputRequired.elicit({\n          message,\n          requestedSchema: (suspension.resumeSchema ?? { type: 'object', properties: {} }) as never,\n        }),\n      },\n      requestState: await this.requestStateCodec.mint({\n        method,\n        name,\n        argsHash,\n        round,\n        suspendPayload,\n        principal: principalOf(ctx, requestContext),\n        iat: Math.floor(Date.now() / 1000),\n      }),\n    });\n  }\n\n  private async serverRequest(\n    ctx: ServerContext,\n    requestContext: RequestContext,\n    method: ContinuationEnvelope['method'],\n    name: string,\n    args: unknown,\n    resumeSchema: StandardSchemaWithJSON | undefined,\n  ): Promise<{\n    request: MCPServerRequest;\n    continuation: ReturnType<typeof readContinuation>;\n    suspended: () => { payload: unknown } | undefined;\n    argsHash: string;\n  }> {\n    const argsHash = hashArguments(args);\n    const continuation = readContinuation(ctx, requestContext, { method, name, argsHash });\n    if (continuation?.outcome === 'accept' && resumeSchema) {\n      const validation = await resumeSchema['~standard'].validate(continuation.resumeData);\n      if (validation.issues) {\n        throw new ProtocolError(\n          ProtocolErrorCode.InvalidParams,\n          `Input response for ${method} \"${name}\" does not match its resumeSchema: ${validation.issues.map(issue => issue.message).join('; ')}`,\n        );\n      }\n      continuation.resumeData = validation.value;\n    }\n    let suspension: { payload: unknown } | undefined;\n    const request: MCPServerRequest = {\n      extra: toToolExecutionContext(ctx, this.name).extra,\n      requestContext,\n      suspend: async payload => void (suspension = { payload }),\n      resumeData: continuation?.resumeData,\n      suspendPayload: continuation?.suspendPayload,\n    };\n    return { request, continuation, suspended: () => suspension, argsHash };\n  }\n\n  private registerToolHandlers(server: Server): void {\n    this.setTracedHandler(server, 'tools/list', async (_request, _ctx, trace) => {\n      const entries = await this.authorizedToolEntries(trace.requestContext);\n      return { tools: entries.map(([name, tool]) => this.toMCPTool(name, tool)) };\n    });\n\n    this.setTracedHandler(server, 'tools/call', async (request, ctx, trace) => {\n      const name = request.params.name;\n      const tool = this.convertedTools[name];\n      if (!tool) {\n        this.logger.warn('Unknown tool requested', { tool: name });\n        return errorResult(`Unknown tool: ${name}`);\n      }\n      const args = request.params.arguments ?? {};\n      const argsHash = hashArguments(args);\n      const requestContext = trace.requestContext;\n      const continuation = readContinuation(ctx, requestContext, { method: 'tools/call', name, argsHash });\n      const mcp = toToolExecutionContext(ctx, this.name);\n      const startedAt = Date.now();\n      try {\n        // Every round is authorized on its own; nothing is trusted from the envelope.\n        await this.enforceToolExecutionFGA(name, requestContext);\n        if (continuation && continuation.outcome !== 'accept') {\n          return errorResult(`Tool '${name}' was ${continuation.outcome === 'decline' ? 'declined' : 'cancelled'}`);\n        }\n        const execution = await this.runTool(name, tool, args, {\n          requestContext,\n          mcp,\n          tracingContext: { currentSpan: trace.requestSpan },\n          resumeData: continuation?.resumeData,\n          suspendPayload: continuation?.suspendPayload,\n        });\n        if (execution.status === 'suspended') {\n          this.logger.debug(`Tool '${name}' requires client input.`);\n          return this.inputRequired(ctx, requestContext, {\n            method: 'tools/call',\n            name,\n            argsHash,\n            round: (continuation?.round ?? 0) + 1,\n            suspendPayload: execution.suspendPayload,\n            resumeSchema: execution.resumeSchema,\n          });\n        }\n        const result = this.toCallToolResult(name, tool, execution.output);\n        this.logger.info(`Tool '${name}' finished in ${Date.now() - startedAt}ms.`);\n        return result;\n      } catch (error) {\n        if (error instanceof ProtocolError) throw error;\n        this.logger.error('Tool execution failed', { tool: name, error });\n        const mastraError =\n          error instanceof MastraError\n            ? error\n            : new MastraError(\n                {\n                  id: 'TOOL_EXECUTION_FAILED',\n                  domain: ErrorDomain.TOOL,\n                  category: ErrorCategory.USER,\n                  details: { toolName: name },\n                },\n                error,\n              );\n        // The client still receives the serialized error, but the span keeps the\n        // original so its id and message survive instead of a JSON blob.\n        trace.reportError(mastraError);\n        return errorResult(JSON.stringify(mastraError.toJSON()));\n      }\n    });\n  }\n\n  /**\n   * Runs one round of a tool. The tool sees the same `suspend` / `resumeData` /\n   * `suspendPayload` vocabulary as under an agent or workflow; nothing else is\n   * carried between rounds.\n   */\n  private async runTool(\n    name: string,\n    tool: InternalCoreTool,\n    args: unknown,\n    options: {\n      requestContext?: RequestContext;\n      mcp?: MCPToolExecutionContext;\n      tracingContext?: TracingContext;\n      resumeData?: unknown;\n      suspendPayload?: unknown;\n    },\n  ): Promise<MCPToolExecutionResultV2> {\n    if (!tool.execute) throw new Error(`Tool '${name}' cannot be executed.`);\n    let suspension: { payload: unknown; resumeSchema?: string } | undefined;\n    const output = await tool.execute(args, {\n      // The 1.x idiom: an empty toolCallId keeps CoreToolBuilder on the MCP path.\n      toolCallId: '',\n      messages: [],\n      // The request span already records this call; a builder tool span would double it.\n      skipToolSpan: true,\n      requestContext: options.requestContext,\n      tracingContext: options.tracingContext,\n      abortSignal: options.mcp?.extra.signal,\n      ...(options.mcp ? { mcp: options.mcp } : {}),\n      suspend: async (payload: unknown, suspendOptions?: SuspendOptions) => {\n        suspension = { payload, resumeSchema: suspendOptions?.resumeSchema };\n      },\n      resumeData: options.resumeData,\n      suspendPayload: options.suspendPayload,\n    });\n    if (suspension) {\n      const { payload, resumeSchema } = suspension as { payload: unknown; resumeSchema?: string };\n      // The core builder serializes the resume schema as draft-07 JSON; forms carry no dialect.\n      const { $schema: _dialect, ...fromBuilder } = resumeSchema ? JSON.parse(resumeSchema) : {};\n      return {\n        status: 'suspended',\n        suspendPayload: payload,\n        resumeSchema: this.resumeSchemaOf(name) ?? (resumeSchema ? fromBuilder : undefined),\n      };\n    }\n    return { status: 'completed', output };\n  }\n\n  private toCallToolResult(name: string, tool: InternalCoreTool, value: unknown): CallToolResult {\n    if (isValidationError(value)) {\n      this.logger.warn(`Tool '${name}' rejected its input.`, { error: value.message });\n      return errorResult(value.message);\n    }\n    // Hosts may detect an MCP App from the call result, so mirror the tool's declared app link onto it.\n    const resourceUri = uiResourceUri(tool.mcp?._meta);\n    const meta = resourceUri ? { _meta: { ui: { resourceUri }, [RESOURCE_URI_META_KEY]: resourceUri } } : {};\n    if (!tool.outputSchema) {\n      return {\n        isError: false,\n        content: [{ type: 'text', text: typeof value === 'string' ? value : JSON.stringify(value) }],\n        ...meta,\n      };\n    }\n    // Tools with an output schema already validated `value` against it.\n    const structuredContent = value as Record<string, unknown>;\n    return {\n      isError: false,\n      structuredContent,\n      content: [{ type: 'text', text: JSON.stringify(structuredContent) }],\n      ...meta,\n    };\n  }\n\n  private registerResourceHandlers(server: Server): void {\n    const options = this.resourceOptions;\n    const hasAppResources = this.appResourceList.length > 0;\n    if (!options && !hasAppResources) return;\n\n    const listResources = async (ctx: ServerContext, requestContext: RequestContext): Promise<Resource[]> => [\n      ...this.appResourceList,\n      ...((await options?.listResources({\n        extra: toToolExecutionContext(ctx, this.name).extra,\n        requestContext,\n      })) ?? []),\n    ];\n\n    // Providers are re-evaluated with the current request every time; resource\n    // lists are scoped per caller and never cached on the shared server.\n    this.setTracedHandler(server, 'resources/list', async (_request, ctx, trace) => ({\n      resources: await listResources(ctx, trace.requestContext),\n    }));\n\n    this.setTracedHandler(server, 'resources/read', async (request, ctx, trace) => {\n      const uri = request.params.uri;\n      const resource = (await listResources(ctx, trace.requestContext)).find(r => r.uri === uri);\n      if (!resource) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Resource not found: ${uri}`);\n\n      const html = this.appResourceHtml.get(uri);\n      if (html !== undefined) return { contents: [this.resourceContents(resource, { text: html })] };\n      if (!options) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Resource not found: ${uri}`);\n\n      const {\n        request: serverRequest,\n        continuation,\n        suspended,\n        argsHash,\n      } = await this.serverRequest(ctx, trace.requestContext, 'resources/read', uri, {}, options.resumeSchema);\n      if (continuation && continuation.outcome !== 'accept') {\n        throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Reading '${uri}' was ${continuation.outcome}ed`);\n      }\n      const result = await options.getResourceContent({ uri, ...serverRequest });\n      const suspension = suspended();\n      if (suspension) {\n        return this.inputRequired(ctx, serverRequest.requestContext, {\n          method: 'resources/read',\n          name: uri,\n          argsHash,\n          round: (continuation?.round ?? 0) + 1,\n          suspendPayload: suspension.payload,\n          resumeSchema: options.resumeSchema ? this.formSchema(options.resumeSchema) : undefined,\n        });\n      }\n      if (result === undefined) throw new Error(`Resource '${uri}' returned no content`);\n      const contents = (Array.isArray(result) ? result : [result]).map(content =>\n        this.resourceContents(resource, content),\n      );\n      return { contents };\n    });\n\n    if (options?.resourceTemplates) {\n      this.setTracedHandler(server, 'resources/templates/list', async (_request, ctx, trace) => ({\n        resourceTemplates: await options.resourceTemplates!({\n          extra: toToolExecutionContext(ctx, this.name).extra,\n          requestContext: trace.requestContext,\n        }),\n      }));\n    }\n  }\n\n  private resourceContents(\n    resource: Resource,\n    content: { text?: string } | { blob?: string },\n  ): TextResourceContents | BlobResourceContents {\n    // `_meta` is preserved on contents: MCP Apps hosts read the UI CSP from it.\n    const base = {\n      uri: resource.uri,\n      mimeType: resource.mimeType,\n      ...(resource._meta ? { _meta: resource._meta } : {}),\n    };\n    if ('text' in content && content.text !== undefined) return { ...base, text: content.text };\n    if ('blob' in content && content.blob !== undefined) return { ...base, blob: content.blob };\n    throw new Error(`Resource '${resource.uri}' returned content with neither text nor blob`);\n  }\n\n  private registerPromptHandlers(server: Server): void {\n    const options = this.promptOptions;\n    if (!options) return;\n\n    const listPrompts = async (ctx: ServerContext, requestContext: RequestContext) => {\n      const prompts = await options.listPrompts({\n        extra: toToolExecutionContext(ctx, this.name).extra,\n        requestContext,\n      });\n      for (const prompt of prompts) PromptSchema.parse(prompt);\n      return prompts;\n    };\n\n    this.setTracedHandler(server, 'prompts/list', async (_request, ctx, trace) => ({\n      prompts: await listPrompts(ctx, trace.requestContext),\n    }));\n\n    if (!options.getPromptMessages) return;\n    this.setTracedHandler(server, 'prompts/get', async (request, ctx, trace) => {\n      const { name, arguments: args } = request.params;\n      const prompt = (await listPrompts(ctx, trace.requestContext)).find(p => p.name === name);\n      if (!prompt) throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Prompt \"${name}\" not found`);\n      for (const arg of prompt.arguments ?? []) {\n        if (arg.required && (args?.[arg.name] === undefined || args?.[arg.name] === null)) {\n          throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Missing required argument: ${arg.name}`);\n        }\n      }\n      const {\n        request: serverRequest,\n        continuation,\n        suspended,\n        argsHash,\n      } = await this.serverRequest(ctx, trace.requestContext, 'prompts/get', name, args ?? {}, options.resumeSchema);\n      if (continuation && continuation.outcome !== 'accept') {\n        throw new ProtocolError(ProtocolErrorCode.InvalidParams, `Prompt \"${name}\" was ${continuation.outcome}ed`);\n      }\n      const messages = await options.getPromptMessages!({ name, args, ...serverRequest });\n      const suspension = suspended();\n      if (suspension) {\n        return this.inputRequired(ctx, serverRequest.requestContext, {\n          method: 'prompts/get',\n          name,\n          argsHash,\n          round: (continuation?.round ?? 0) + 1,\n          suspendPayload: suspension.payload,\n          resumeSchema: options.resumeSchema ? this.formSchema(options.resumeSchema) : undefined,\n        });\n      }\n      if (messages === undefined) throw new Error(`Prompt \"${name}\" returned no messages`);\n      return { description: prompt.description, messages };\n    });\n  }\n\n  // ---------------------------------------------------------------------------\n  // App resources\n\n  private loadAppResources(appResources: AppResources | undefined): void {\n    for (const [uri, appResource] of Object.entries(appResources ?? {})) {\n      const html = appResource.html ?? (appResource.htmlPath ? readFileSync(appResource.htmlPath, 'utf-8') : undefined);\n      if (html === undefined) {\n        this.logger.warn(`App resource '${uri}' has neither html nor htmlPath; skipping`);\n        continue;\n      }\n      this.appResourceHtml.set(uri, html);\n      this.appResourceList.push({\n        uri,\n        name: appResource.name,\n        description: appResource.description,\n        mimeType: RESOURCE_MIME_TYPE,\n        ...(appResource.meta ? { _meta: { ui: appResource.meta } } : {}),\n      });\n    }\n  }\n\n  // ---------------------------------------------------------------------------\n  // Authorization\n\n  private async enforceToolExecutionFGA(toolId: string, requestContext: RequestContext): Promise<void> {\n    const fgaProvider = this.mastra?.getServer?.()?.fga;\n    if (!fgaProvider) return;\n\n    const { getMCPToolFGAResourceId, requireFGA, FGADeniedError, MastraFGAPermissions } =\n      await import('@mastra/core/auth/ee');\n    const resourceId = getMCPToolFGAResourceId(this.id, toolId);\n    const user = requestContext.get('user');\n    if (!user) {\n      throw new FGADeniedError({ id: 'unknown' }, { type: 'tool', id: resourceId }, MastraFGAPermissions.TOOLS_EXECUTE);\n    }\n    const permission =\n      this.fga?.permissionMapping?.[MastraFGAPermissions.TOOLS_EXECUTE] ?? MastraFGAPermissions.TOOLS_EXECUTE;\n    const mapping = this.fga?.resourceMapping?.tool ?? this.fga?.resourceMapping?.tools;\n    const resource = mapping\n      ? { type: mapping.fgaResourceType, id: mapping.deriveId?.({ user, resourceId, requestContext }) ?? resourceId }\n      : { type: 'tool', id: resourceId };\n\n    await requireFGA({\n      fgaProvider,\n      user,\n      resource,\n      permission,\n      requestContext,\n      context: { resourceId },\n      metadata: { mcpServerId: this.id, mcpServerName: this.name, toolId },\n    });\n  }\n\n  private async authorizedToolEntries(requestContext: RequestContext): Promise<Array<[string, InternalCoreTool]>> {\n    const entries = Object.entries(this.convertedTools);\n    if (!this.mastra?.getServer?.()?.fga) return entries;\n    if (!requestContext.get('user')) return [];\n    const accessible = await Promise.all(\n      entries.map(async entry => {\n        try {\n          await this.enforceToolExecutionFGA(entry[0], requestContext);\n          return entry;\n        } catch (error) {\n          if (error instanceof Error && error.name === 'FGADeniedError') return undefined;\n          throw error;\n        }\n      }),\n    );\n    return accessible.filter((entry): entry is [string, InternalCoreTool] => entry !== undefined);\n  }\n\n  // ---------------------------------------------------------------------------\n  // Transports\n\n  private notifier(): ServerNotifier | undefined {\n    if (this.httpHandler) return this.httpHandler.notify;\n    const stdio = this.stdioInstance;\n    if (!stdio) return undefined;\n    const report = (error: unknown) => this.logger.error('Failed to publish stdio notification', { error });\n    return {\n      toolsChanged: () => void stdio.sendToolListChanged().catch(report),\n      promptsChanged: () => void stdio.sendPromptListChanged().catch(report),\n      resourcesChanged: () => void stdio.sendResourceListChanged().catch(report),\n      resourceUpdated: uri => void stdio.sendResourceUpdated({ uri }).catch(report),\n    };\n  }\n\n  private getNodeHandler(): NodeMcpRequestHandler {\n    if (!this.nodeHandler) {\n      this.httpHandler = createMcpHandler(() => this.createServerInstance(), {\n        legacy: 'reject',\n        onerror: error => this.logger.error('MCP handler error', { error: error.toString() }),\n      });\n      this.nodeHandler = toNodeHandler(this.httpHandler, {\n        onerror: error => this.logger.error('MCP Node handler adapter error', { error: error.toString() }),\n      });\n    }\n    return this.nodeHandler;\n  }\n\n  /** Serves the current process's stdio. Legacy openings are rejected. */\n  async startStdio(): Promise<void> {\n    this.stdioHandle = serveStdio(\n      () => {\n        this.stdioInstance = this.createServerInstance();\n        return this.stdioInstance;\n      },\n      {\n        legacy: 'reject',\n        onerror: error => this.logger.error('MCP stdio handler error', { error: error.toString() }),\n      },\n    );\n    this.logger.info('Started MCP Server (stdio, 2026-07-28)');\n  }\n\n  /**\n   * Handles one Streamable HTTP request at `httpPath`. Every request is\n   * self-contained; requests without a 2026-07-28 envelope are rejected.\n   */\n  async startHTTP({ url, httpPath, req, res, options }: MCPServerHTTPOptions): Promise<void> {\n    if (url.pathname !== httpPath) {\n      res.writeHead(404);\n      res.end();\n      return;\n    }\n    if (options?.enableDnsRebindingProtection) {\n      if (options.allowedHosts?.length) {\n        const hostnames = options.allowedHosts.map(host => new URL(`http://${host}`).hostname);\n        if (!hostHeaderValidation(hostnames)(req, res)) return;\n      }\n      if (options.allowedOrigins?.length) {\n        const hostnames = options.allowedOrigins.map(origin => new URL(origin).hostname);\n        if (!originValidation(hostnames)(req, res)) return;\n      }\n    }\n    try {\n      // Body-parsing middleware (express.json(), Fastify) leaves the stream consumed.\n      const parsedBody = (req as http.IncomingMessage & { body?: unknown }).body;\n      await this.getNodeHandler()(req, res, parsedBody);\n    } catch (error) {\n      const mastraError = new MastraError(\n        {\n          id: 'MCP_SERVER_HTTP_CONNECTION_FAILED',\n          domain: ErrorDomain.MCP,\n          category: ErrorCategory.USER,\n          text: 'Failed to handle MCP request',\n        },\n        error,\n      );\n      this.logger.trackException(mastraError);\n      if (!res.headersSent) {\n        res.writeHead(500, { 'Content-Type': 'application/json' });\n        res.end(\n          JSON.stringify({ jsonrpc: '2.0', error: { code: -32603, message: 'Internal server error' }, id: null }),\n        );\n      }\n    }\n  }\n\n  async close(): Promise<void> {\n    if (this.stdioHandle) {\n      await this.stdioHandle.close();\n      this.stdioHandle = undefined;\n      this.stdioInstance = undefined;\n    }\n    if (this.httpHandler) {\n      await this.httpHandler.close();\n      this.httpHandler = undefined;\n      this.nodeHandler = undefined;\n    }\n  }\n\n  // ---------------------------------------------------------------------------\n  // Registry information and direct execution\n\n  getServerInfo(): ServerInfo {\n    return {\n      id: this.id,\n      name: this.name,\n      description: this.description,\n      repository: this.repository,\n      version_detail: { version: this.version, release_date: this.releaseDate, is_latest: this.isLatest },\n    };\n  }\n\n  getServerDetail(): ServerDetailInfo {\n    return {\n      ...this.getServerInfo(),\n      package_canonical: this.packageCanonical,\n      packages: this.packages,\n      remotes: this.remotes,\n    };\n  }\n\n  getToolListInfo(requestContext?: RequestContext): { tools: ToolInfo[] } | Promise<{ tools: ToolInfo[] }> {\n    const toInfo = (entries: Array<[string, InternalCoreTool]>) => ({\n      tools: entries.map(([name, tool]) => this.toolInfo(name, tool)),\n    });\n    if (this.mastra?.getServer?.()?.fga) {\n      return requestContext ? this.authorizedToolEntries(requestContext).then(toInfo) : { tools: [] };\n    }\n    return toInfo(Object.entries(this.convertedTools));\n  }\n\n  getToolInfo(toolId: string): ToolInfo | undefined {\n    const tool = this.convertedTools[toolId];\n    return tool ? this.toolInfo(toolId, tool) : undefined;\n  }\n\n  /**\n   * Runs a tool without a protocol client (the Studio/REST route). A tool that\n   * suspends is reported as such; the caller continues by sending the same\n   * arguments with `resumeData` and `suspendPayload`.\n   */\n  async executeTool(\n    toolId: string,\n    args: unknown,\n    executionContext: Parameters<MCPServerBase['executeTool']>[2] = {},\n  ): Promise<MCPToolExecutionResultV2> {\n    const requestContext = executionContext.requestContext ?? new RequestContext();\n    // The in-process caller gets the same request span a wire `tools/call` opens.\n    // It is opened before the tool lookup and the authorization check so an\n    // unknown tool or a denial is recorded as a failed request, not lost.\n    const requestSpan = this.startRequestSpan('tools/call', { name: toolId, arguments: args }, { requestContext });\n    return this.traceRequest(requestSpan, async () => {\n      const tool = this.convertedTools[toolId];\n      if (!tool) {\n        this.logger.warn('Unknown tool requested', { tool: toolId, server: this.name });\n        throw new MastraError({\n          id: 'MCP_SERVER_TOOL_EXECUTE_PREPARATION_FAILED',\n          domain: ErrorDomain.MCP,\n          category: ErrorCategory.USER,\n          text: `Unknown tool: ${toolId}`,\n          details: { toolId },\n        });\n      }\n      // A denial is reported as such, not as a failed execution.\n      await this.enforceToolExecutionFGA(toolId, requestContext);\n      try {\n        const execution = await this.runTool(toolId, tool, args, {\n          requestContext,\n          tracingContext: { currentSpan: requestSpan },\n          resumeData: executionContext.resumeData,\n          suspendPayload: executionContext.suspendPayload,\n        });\n        // Invalid input or resume data is the caller's error, not a completed call.\n        if (execution.status === 'completed' && isValidationError(execution.output)) {\n          throw new MastraError({\n            id: 'MCP_SERVER_TOOL_INVALID_INPUT',\n            domain: ErrorDomain.MCP,\n            category: ErrorCategory.USER,\n            text: execution.output.message,\n            details: { toolId },\n          });\n        }\n        this.logger.info('Tool executed successfully', { tool: toolId });\n        return execution;\n      } catch (error) {\n        if (error instanceof MastraError && error.id === 'MCP_SERVER_TOOL_INVALID_INPUT') throw error;\n        const mastraError = new MastraError(\n          {\n            id: 'MCP_SERVER_TOOL_EXECUTE_FAILED',\n            domain: ErrorDomain.MCP,\n            category: ErrorCategory.USER,\n            details: { toolId, args: JSON.stringify(args) },\n          },\n          error,\n        );\n        this.logger.trackException(mastraError);\n        throw mastraError;\n      }\n    });\n  }\n\n  /** Reads an `ui://` app resource; application resources require a protocol request. */\n  async readResource(uri: string): Promise<{\n    contents: Array<{ uri: string; text?: string; blob?: string; mimeType?: string; _meta?: Record<string, unknown> }>;\n  }> {\n    const html = this.appResourceHtml.get(uri);\n    const resource = this.appResourceList.find(r => r.uri === uri);\n    if (html === undefined || !resource) {\n      throw new MastraError({\n        id: 'MCP_SERVER_RESOURCE_NOT_FOUND',\n        domain: ErrorDomain.MCP,\n        category: ErrorCategory.USER,\n        text: `Resource '${uri}' not found; application resources are only readable through an MCP request`,\n        details: { uri },\n      });\n    }\n    return { contents: [this.resourceContents(resource, { text: html })] };\n  }\n\n  /** Lists `ui://` app resources; application resources require a protocol request. */\n  async listResources(): Promise<{ resources: Resource[] }> {\n    return { resources: [...this.appResourceList] };\n  }\n}\n\n/** Tools with an intrinsic id are also registered on the Mastra instance, like `__registerMastra` does. */\nfunction isRegistrableTool(tool: ToolsInput[string]): tool is ToolAction<any, any, any, any> {\n  return !!tool && typeof tool === 'object' && 'id' in tool && typeof tool.id === 'string';\n}\n\nfunction errorResult(text: string): CallToolResult {\n  return { content: [{ type: 'text', text }], isError: true };\n}\n\n/** The tool's MCP App URI; the nested key wins over the flat one, as in ext-apps' `getToolUiResourceUri`. */\nfunction uiResourceUri(meta: Record<string, unknown> | undefined): string | undefined {\n  const ui = meta?.ui as { resourceUri?: string } | undefined;\n  return ui?.resourceUri || (meta?.[RESOURCE_URI_META_KEY] as string | undefined) || undefined;\n}\n\n/** Writes the tool's MCP App URI to both the nested and the flat key, so every host opens the same app. */\nfunction normalizeUiMeta(meta: Record<string, unknown> | undefined): Record<string, unknown> | undefined {\n  const resourceUri = uiResourceUri(meta);\n  if (!meta || !resourceUri) return meta;\n  const ui = meta.ui as Record<string, unknown> | undefined;\n  return { ...meta, ui: { ...ui, resourceUri }, [RESOURCE_URI_META_KEY]: resourceUri };\n}\n\nexport { ServerPromptActions, ServerResourceActions, ServerToolActions };\n","import type { MCPServerConfig as CoreMCPServerConfig } from '@mastra/core/mcp';\nimport type { RequestContext } from '@mastra/core/request-context';\nimport type { StandardSchemaWithJSON } from '@mastra/core/schema';\nimport type { MCPServerContext } from '@mastra/core/tools';\nimport type { McpUiResourceMeta } from '@modelcontextprotocol/ext-apps';\nimport type {\n  CacheHint,\n  InputRequiredResult,\n  Prompt,\n  PromptMessage,\n  Resource,\n  ResourceTemplateType,\n} from '@modelcontextprotocol/server';\n\n/** The only protocol revision `@mastra/mcp` serves. */\nexport const MCP_PROTOCOL_VERSION = '2026-07-28' as const;\n\n/** Operations whose results can advertise cache hints. */\nexport type MCPServerCacheableMethod =\n  | 'tools/list'\n  | 'prompts/list'\n  | 'resources/list'\n  | 'resources/templates/list'\n  | 'resources/read'\n  | 'server/discover';\n\n/** Cache hints (`ttlMs` / `cacheScope`) advertised on cacheable results, keyed by operation. */\nexport type MCPServerCacheHints = Partial<Record<MCPServerCacheableMethod, CacheHint>>;\n\n/**\n * Protocol context handed to resource and prompt callbacks: the same object tools\n * receive as `context.mcp.extra` (cancellation signal, request id, `_meta`, auth).\n */\nexport type MCPRequestHandlerExtra = MCPServerContext;\n\n/**\n * Request-scoped context handed to resource and prompt callbacks.\n *\n * `extra` carries the protocol facilities of the current request and\n * `requestContext` the trusted application context (`authInfo`, mapped `user`).\n * `suspend`, `resumeData` and `suspendPayload` are the same continuation vocabulary\n * tools use: calling `suspend(payload)` ends the request as `input_required`; the\n * continuation re-enters with the client's answer in `resumeData` and the payload it\n * suspended with in `suspendPayload`.\n */\nexport interface MCPServerRequest<TSuspend = unknown, TResume = unknown> {\n  extra: MCPRequestHandlerExtra;\n  requestContext: RequestContext;\n  suspend: (payload: TSuspend) => Promise<void>;\n  resumeData?: TResume;\n  suspendPayload?: TSuspend;\n}\n\n/** Content for an MCP resource, either text or binary (base64-encoded). */\nexport type MCPServerResourceContent = { text?: string } | { blob?: string };\n\nexport type MCPServerResourceContentCallback = (\n  params: { uri: string } & MCPServerRequest,\n) => Promise<MCPServerResourceContent | MCPServerResourceContent[] | void>;\n\n/** Configuration for MCP server resource handling. */\nexport type MCPServerResources = {\n  listResources: (params: { extra: MCPRequestHandlerExtra; requestContext: RequestContext }) => Promise<Resource[]>;\n  getResourceContent: MCPServerResourceContentCallback;\n  resourceTemplates?: (params: {\n    extra: MCPRequestHandlerExtra;\n    requestContext: RequestContext;\n  }) => Promise<ResourceTemplateType[]>;\n  /**\n   * Shape of the answer a suspended `getResourceContent` expects. Required for\n   * `suspend` to be usable; it must describe a flat object of primitives because it\n   * becomes the form the client fills in.\n   */\n  resumeSchema?: StandardSchemaWithJSON;\n};\n\nexport type MCPServerPromptMessagesCallback = (\n  params: { name: string; args?: Record<string, unknown> } & MCPServerRequest,\n) => Promise<PromptMessage[] | void>;\n\n/** Configuration for MCP server prompt handling. */\nexport type MCPServerPrompts = {\n  listPrompts: (params: { extra: MCPRequestHandlerExtra; requestContext: RequestContext }) => Promise<Prompt[]>;\n  getPromptMessages?: MCPServerPromptMessagesCallback;\n  /** Shape of the answer a suspended `getPromptMessages` expects; see `MCPServerResources.resumeSchema`. */\n  resumeSchema?: StandardSchemaWithJSON;\n};\n\n/**\n * Integrity protection for continuation state. `requestState` round-trips through\n * the client on every `input_required` round: the server signs it with `key` so a\n * tampered, expired or foreign envelope is rejected before any handler runs.\n *\n * Every instance that may answer a continuation must share the same key (set it from\n * the environment in multi-instance and serverless deployments). Without a key the\n * server generates one per process and continuations only succeed on that process.\n *\n * The envelope is bound to the authenticated caller. On a server without\n * authorization every caller shares one anonymous principal, so a `requestState`\n * acts as a bearer credential for its round until `ttlSeconds` elapse.\n */\nexport interface MCPServerRequestStateOptions {\n  /** HMAC key, at least 32 bytes. */\n  key?: string | Uint8Array;\n  /** How long a suspended round stays answerable. Defaults to 600 seconds. */\n  ttlSeconds?: number;\n}\n\n/** Request-security options accepted by `startHTTP`. */\nexport interface MCPServerHTTPRequestOptions {\n  /**\n   * Check the `Host` header against `allowedHosts` and the `Origin` header against\n   * `allowedOrigins` before handling the request. A check only runs when its list is\n   * non-empty; a rejected request receives a `403` JSON-RPC error.\n   */\n  enableDnsRebindingProtection?: boolean;\n  /** Hostnames accepted in the `Host` header. Ports are ignored when matching. */\n  allowedHosts?: string[];\n  /**\n   * Origins accepted in the `Origin` header. Only the hostname is compared, and\n   * requests without an `Origin` header pass because non-browser clients don't send one.\n   */\n  allowedOrigins?: string[];\n}\n\nexport type MCPAuthInfoToUserMapper = NonNullable<CoreMCPServerConfig['mapAuthInfoToUser']>;\n\nexport type { Prompt, PromptMessage, Resource, ResourceTemplateType as ResourceTemplate, InputRequiredResult };\n\n/** Configuration for a single MCP App resource served under the `ui://` scheme. */\nexport interface AppResource {\n  name: string;\n  description?: string;\n  html?: string;\n  htmlPath?: string;\n  meta?: McpUiResourceMeta;\n}\n\n/** Map of `ui://` URIs to their app resource configurations. */\nexport type AppResources = Record<string, AppResource>;\n","/**\n * OAuth Middleware for MCP Server\n *\n * Implements OAuth 2.0 Protected Resource support per RFC 9728 for MCP servers.\n * This allows MCP servers to require OAuth authentication from clients.\n *\n * @see https://modelcontextprotocol.io/specification/2026-07-28/basic/authorization\n * @see https://www.rfc-editor.org/rfc/rfc9728.html\n */\n\nimport type * as http from 'node:http';\n\nimport type { MCPServerOAuthConfig, TokenValidationResult } from '../shared/oauth-types.js';\nimport {\n  generateProtectedResourceMetadata,\n  generateWWWAuthenticateHeader,\n  extractBearerToken,\n} from '../shared/oauth-types.js';\n\n/**\n * Simple logger interface for OAuth middleware.\n */\ninterface OAuthMiddlewareLogger {\n  debug?: (message: string, ...args: unknown[]) => void;\n}\n\n/**\n * Options for the OAuth middleware.\n */\nexport interface OAuthMiddlewareOptions {\n  /**\n   * OAuth configuration for the MCP server.\n   */\n  oauth: MCPServerOAuthConfig;\n\n  /**\n   * Path where the MCP endpoint is served.\n   * @default '/mcp'\n   */\n  mcpPath?: string;\n\n  /**\n   * Logger instance for debugging.\n   */\n  logger?: OAuthMiddlewareLogger;\n}\n\n/**\n * Result of the middleware check.\n */\nexport interface OAuthMiddlewareResult {\n  /**\n   * Whether the request should proceed.\n   */\n  proceed: boolean;\n\n  /**\n   * If false, the response has already been sent.\n   */\n  handled: boolean;\n\n  /**\n   * Token validation result if authentication was attempted.\n   */\n  tokenValidation?: TokenValidationResult;\n}\n\n/**\n * Creates an OAuth middleware function for protecting MCP server endpoints.\n *\n * This middleware:\n * 1. Serves Protected Resource Metadata at `/.well-known/oauth-protected-resource`\n * 2. Validates bearer tokens on protected endpoints\n * 3. Returns proper 401 responses with WWW-Authenticate headers\n *\n * @param options - Middleware configuration\n * @returns Middleware function that returns whether request should proceed\n *\n * @example\n * ```typescript\n * import http from 'node:http';\n * import { MCPServer, createOAuthMiddleware } from '@mastra/mcp';\n *\n * const server = new MCPServer({ name: 'Protected Server', version: '1.0.0', tools: {} });\n *\n * const oauthMiddleware = createOAuthMiddleware({\n *   oauth: {\n *     resource: 'https://mcp.example.com/mcp',\n *     authorizationServers: ['https://auth.example.com'],\n *     validateToken: async (token, resource) => {\n *       // Your token validation logic here\n *       return { valid: true, scopes: ['mcp:read', 'mcp:write'] };\n *     },\n *   },\n * });\n *\n * const httpServer = http.createServer(async (req, res) => {\n *   const url = new URL(req.url || '', 'http://localhost:3000');\n *\n *   // Apply OAuth middleware first\n *   const result = await oauthMiddleware(req, res, url);\n *   if (!result.proceed) return; // Middleware handled the response\n *\n *   // Continue to MCP handler\n *   await server.startHTTP({ url, httpPath: '/mcp', req, res });\n * });\n *\n * httpServer.listen(3000);\n * ```\n */\nexport function createOAuthMiddleware(options: OAuthMiddlewareOptions) {\n  const { oauth, mcpPath = '/mcp', logger } = options;\n\n  // Pre-compute the metadata and paths\n  const protectedResourceMetadata = generateProtectedResourceMetadata(oauth);\n  const wellKnownPath = '/.well-known/oauth-protected-resource';\n  const resourceMetadataUrl = new URL(wellKnownPath, oauth.resource).toString();\n\n  return async function oauthMiddleware(\n    req: http.IncomingMessage,\n    res: http.ServerResponse,\n    url: URL,\n  ): Promise<OAuthMiddlewareResult> {\n    logger?.debug?.(`OAuth middleware: ${req.method} ${url.pathname}`);\n\n    // Handle Protected Resource Metadata endpoint (RFC 9728)\n    if (url.pathname === wellKnownPath && req.method === 'GET') {\n      logger?.debug?.('OAuth middleware: Serving Protected Resource Metadata');\n      res.writeHead(200, {\n        'Content-Type': 'application/json',\n        'Cache-Control': 'max-age=3600',\n        'Access-Control-Allow-Origin': '*',\n      });\n      res.end(JSON.stringify(protectedResourceMetadata));\n      return { proceed: false, handled: true };\n    }\n\n    // Handle CORS preflight for metadata endpoint\n    if (url.pathname === wellKnownPath && req.method === 'OPTIONS') {\n      res.writeHead(204, {\n        'Access-Control-Allow-Origin': '*',\n        'Access-Control-Allow-Methods': 'GET, OPTIONS',\n        'Access-Control-Allow-Headers': 'Content-Type',\n        'Access-Control-Max-Age': '86400',\n      });\n      res.end();\n      return { proceed: false, handled: true };\n    }\n\n    // Only protect the MCP endpoint\n    if (!url.pathname.startsWith(mcpPath)) {\n      return { proceed: true, handled: false };\n    }\n\n    // Extract and validate bearer token\n    const authHeader = req.headers['authorization'];\n    const token = extractBearerToken(authHeader as string | undefined);\n\n    if (!token) {\n      logger?.debug?.('OAuth middleware: No bearer token provided');\n      res.writeHead(401, {\n        'Content-Type': 'application/json',\n        'WWW-Authenticate': generateWWWAuthenticateHeader({ resourceMetadataUrl }),\n      });\n      res.end(\n        JSON.stringify({\n          error: 'unauthorized',\n          error_description: 'Bearer token required',\n        }),\n      );\n      return { proceed: false, handled: true };\n    }\n\n    // Validate the token\n    if (oauth.validateToken) {\n      logger?.debug?.('OAuth middleware: Validating token');\n      const validationResult = await oauth.validateToken(token, oauth.resource);\n\n      if (!validationResult.valid) {\n        logger?.debug?.(`OAuth middleware: Token validation failed: ${validationResult.error}`);\n        res.writeHead(401, {\n          'Content-Type': 'application/json',\n          'WWW-Authenticate': generateWWWAuthenticateHeader({\n            resourceMetadataUrl,\n            additionalParams: {\n              error: validationResult.error || 'invalid_token',\n              ...(validationResult.errorDescription && {\n                error_description: validationResult.errorDescription,\n              }),\n            },\n          }),\n        });\n        res.end(\n          JSON.stringify({\n            error: validationResult.error || 'invalid_token',\n            error_description: validationResult.errorDescription || 'Token validation failed',\n          }),\n        );\n        return { proceed: false, handled: true, tokenValidation: validationResult };\n      }\n\n      logger?.debug?.('OAuth middleware: Token validated successfully');\n      return { proceed: true, handled: false, tokenValidation: validationResult };\n    }\n\n    // If no validateToken function provided, accept the token\n    // This is for testing/development - NOT recommended for production\n    logger?.debug?.('OAuth middleware: No token validation configured, accepting token');\n    return {\n      proceed: true,\n      handled: false,\n      tokenValidation: { valid: true },\n    };\n  };\n}\n\n/**\n * Helper to create a simple token validator that checks against a list of valid tokens.\n *\n * Useful for testing and development. For production, use a proper JWT validator\n * or call your authorization server's introspection endpoint.\n *\n * @param validTokens - Array of valid token strings\n * @returns Token validation function\n *\n * @example\n * ```typescript\n * const validateToken = createStaticTokenValidator(['secret-token-1', 'secret-token-2']);\n *\n * const middleware = createOAuthMiddleware({\n *   oauth: {\n *     resource: 'https://mcp.example.com/mcp',\n *     authorizationServers: ['https://auth.example.com'],\n *     validateToken,\n *   },\n * });\n * ```\n */\nexport function createStaticTokenValidator(validTokens: string[]): MCPServerOAuthConfig['validateToken'] {\n  const tokenSet = new Set(validTokens);\n  return async (token: string): Promise<TokenValidationResult> => {\n    if (tokenSet.has(token)) {\n      return { valid: true, scopes: ['mcp:read', 'mcp:write'] };\n    }\n    return {\n      valid: false,\n      error: 'invalid_token',\n      errorDescription: 'Token not recognized',\n    };\n  };\n}\n\n/**\n * Introspection response type per RFC 7662.\n */\ninterface IntrospectionResponse {\n  active: boolean;\n  scope?: string;\n  client_id?: string;\n  username?: string;\n  token_type?: string;\n  exp?: number;\n  iat?: number;\n  nbf?: number;\n  sub?: string;\n  aud?: string | string[];\n  iss?: string;\n  jti?: string;\n  [key: string]: unknown;\n}\n\n/**\n * Creates a token validator that calls an introspection endpoint.\n *\n * Per RFC 7662, the introspection endpoint returns token metadata.\n *\n * @param introspectionEndpoint - URL of the token introspection endpoint\n * @param clientCredentials - Optional client credentials for authenticated introspection\n * @returns Token validation function\n *\n * @example\n * ```typescript\n * const validateToken = createIntrospectionValidator(\n *   'https://auth.example.com/oauth/introspect',\n *   { clientId: 'mcp-server', clientSecret: 'secret' }\n * );\n * ```\n */\nexport function createIntrospectionValidator(\n  introspectionEndpoint: string,\n  clientCredentials?: { clientId: string; clientSecret: string },\n): MCPServerOAuthConfig['validateToken'] {\n  return async (token: string, resource: string): Promise<TokenValidationResult> => {\n    try {\n      const headers: Record<string, string> = {\n        'Content-Type': 'application/x-www-form-urlencoded',\n      };\n\n      if (clientCredentials) {\n        // RFC 7617: user-id cannot contain a colon character\n        if (clientCredentials.clientId.includes(':')) {\n          return {\n            valid: false,\n            error: 'invalid_request',\n            errorDescription: 'clientId cannot contain a colon character per RFC 7617',\n          };\n        }\n        const credentials = Buffer.from(`${clientCredentials.clientId}:${clientCredentials.clientSecret}`).toString(\n          'base64',\n        );\n        headers['Authorization'] = `Basic ${credentials}`;\n      }\n\n      const response = await fetch(introspectionEndpoint, {\n        method: 'POST',\n        headers,\n        body: new URLSearchParams({\n          token,\n          token_type_hint: 'access_token',\n        }),\n      });\n\n      if (!response.ok) {\n        return {\n          valid: false,\n          error: 'server_error',\n          errorDescription: `Introspection failed: ${response.status}`,\n        };\n      }\n\n      const data = (await response.json()) as IntrospectionResponse;\n\n      if (!data.active) {\n        return {\n          valid: false,\n          error: 'invalid_token',\n          errorDescription: 'Token is not active',\n        };\n      }\n\n      // Validate audience if present\n      if (data.aud) {\n        const audiences = Array.isArray(data.aud) ? data.aud : [data.aud];\n        if (!audiences.includes(resource)) {\n          return {\n            valid: false,\n            error: 'invalid_token',\n            errorDescription: 'Token audience does not match this resource',\n          };\n        }\n      }\n\n      return {\n        valid: true,\n        scopes:\n          data.scope\n            ?.trim()\n            .split(' ')\n            .filter(s => s !== '') || [],\n        subject: data.sub,\n        expiresAt: data.exp,\n        claims: data as Record<string, unknown>,\n      };\n    } catch (error) {\n      return {\n        valid: false,\n        error: 'server_error',\n        errorDescription: error instanceof Error ? error.message : 'Introspection failed',\n      };\n    }\n  };\n}\n"],"x_google_ignoreList":[2,3,4,5,6,7,8,9,10,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,35],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAa,8BAA8B;;;ACxB3C,IAAIA,aAAW,OAAO;AACtB,IAAIC,cAAY,OAAO;AACvB,IAAIC,qBAAmB,OAAO;AAC9B,IAAIC,sBAAoB,OAAO;AAC/B,IAAIC,iBAAe,OAAO;AAC1B,IAAIC,iBAAe,OAAO,UAAU;AACpC,IAAIC,mBAAiB,IAAI,eAAe,QAAQ,IAAI,MAAM,EAAE,SAAS,CAAC,EAAE,EAAA,CAAG,SAAS,GAAG,GAAG,KAAK,OAAO,IAAI;AAC1G,IAAIC,iBAAe,IAAI,MAAM,QAAQ,SAAS;CAC7C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY,KAAK,IAAI,OAAOJ,oBAAkB,IAAI,GAAG,IAAI,GAAG,IAAI,KAAK,QAAQ,KAAK,IAAI,GAAG,KAAK;EACrJ,MAAM,KAAK;EACX,IAAI,CAACE,eAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QAAQ,YAAU,IAAI,KAAK;GACrE,OAAO,MAAM,KAAK,GAAA,CAAI,KAAK,MAAM,GAAG;GACpC,Y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