diff --git a/CHANGELOG.md b/CHANGELOG.md index afd2544..235e210 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes to Able are documented in this file. The format follows [Kee ### Added -- Nothing yet. +- A public catalog-only UCP agent profile and Shopify Storefront Catalog MCP integration for bounded, live product search and detail. ## [0.1.0] - 2026-08-01 diff --git a/README.md b/README.md index a16359c..bcbb48c 100644 --- a/README.md +++ b/README.md @@ -56,11 +56,20 @@ Requirements: Node.js 22 or 24+, npm, and a Cloudflare account for remote deploy ```sh npm install -npm run db:migrate:local -npm run dev +npm run dev:parity ``` -Copy `apps/desk/.dev.vars.example` to `apps/desk/.dev.vars` for local-only values. Never commit the resulting file. +`dev:parity` migrates and seeds a persistent local-only workspace, then runs the +same Worker entry point and browser assistant used by a deployment. It uses +remote Workers AI, so authenticate once with `npx wrangler login`. D1, R2, +queues, Durable Objects, email, and all fixture data remain local. See +[the development workflow](docs/development.md#production-like-local-assistant) +for parity limits and optional development-store configuration. + +Copy `apps/desk/.dev.vars.parity.example` to `apps/desk/.dev.vars` only when +local integrations need private values. Never commit the resulting file. The +separate `.dev.vars.example` documents deployment setup and contains deliberate +placeholders that must not be used by the parity server. Run the complete local gate before opening a pull request: diff --git a/apps/desk/.dev.vars.parity.example b/apps/desk/.dev.vars.parity.example new file mode 100644 index 0000000..bebbeea --- /dev/null +++ b/apps/desk/.dev.vars.parity.example @@ -0,0 +1,25 @@ +# Optional integrations for `npm run dev:parity`. Copy this file to `.dev.vars` +# and uncomment only values backed by a dedicated development store. Never use +# production credentials or customer data in the local parity workspace. + +# Public catalog discovery through Shopify's merchant-scoped UCP Catalog MCP. +# Shopify must be able to fetch the profile URL, so localhost cannot be used. +# SHOPIFY_SHOP_DOMAIN=development-store.myshopify.com +# SHOPIFY_UCP_AGENT_PROFILE_URL=https://staging-support.example.test/.well-known/ucp +# SHOPIFY_STOREFRONT_COUNTRY=IN +# SHOPIFY_STOREFRONT_LANGUAGE=en + +# Optional recognition hints for the development catalog. Use public product +# and brand vocabulary only; do not put customer data here. +# ABLE_VOICE_KEYTERMS=Example Brand,Example Model,espresso grinder +# Optional Indian-English voice. Use a dedicated development Deepgram key only. +# DEEPGRAM_API_KEY= +# ABLE_VOICE_TTS_MODEL=flux-priya-en + + +# Authenticated order lookup through a least-authority development app. +# SHOPIFY_CLIENT_ID=replace-with-development-client-id +# SHOPIFY_CLIENT_SECRET=replace-with-development-client-secret + +# Optional Customer Account API sign-in rail. +# SHOPIFY_CUSTOMER_CLIENT_ID=replace-with-development-customer-account-client-id diff --git a/apps/desk/package.json b/apps/desk/package.json index f4bbf8f..272edd6 100644 --- a/apps/desk/package.json +++ b/apps/desk/package.json @@ -48,6 +48,18 @@ }, "SHOPIFY_CUSTOMER_CLIENT_ID": { "description": "Optional Customer Account API public client ID enabling store-account sign-in on the support portal." + }, + "SHOPIFY_UCP_AGENT_PROFILE_URL": { + "description": "Optional public Able UCP profile URL for local parity; deployed agents derive /.well-known/ucp from the portal origin." + }, + "SHOPIFY_STOREFRONT_COUNTRY": { + "description": "Optional ISO country code used to localize public Shopify prices and availability, such as IN." + }, + "SHOPIFY_STOREFRONT_LANGUAGE": { + "description": "Optional BCP 47 language tag used to localize public storefront content, such as en or hi." + }, + "ABLE_VOICE_KEYTERMS": { + "description": "Optional comma-separated product, brand, and place vocabulary boosted by voice recognition." } } }, @@ -57,6 +69,7 @@ "build:portal-search": "node scripts/build-portal-search.mjs", "build:assets": "npm run build:mcp-app && npm run build:voice-demo && npm run build:portal-search", "dev": "npm run build:assets && wrangler dev", + "dev:parity": "npm run build:assets && node scripts/local-parity-server.mjs", "deploy": "npm run build:assets && wrangler deploy", "build:production-config": "node scripts/production-config.mjs", "deploy:production": "node scripts/require-main-build.mjs && npm run build:production-config && wrangler d1 migrations apply DB --remote --config wrangler.production.generated.json && npm run build:assets && wrangler deploy --config wrangler.production.generated.json", @@ -81,24 +94,25 @@ "@modelcontextprotocol/ext-apps": "^1.7.5", "@modelcontextprotocol/sdk": "^1.29.0", "agents": "0.20.1", - "ai": "7.0.37", - "hono": "^4.12.32", + "ai": "7.0.64", + "hono": "^4.13.1", "marked": "^18.0.7", "postal-mime": "^2.7.5", + "remend": "^1.3.0", "workers-ai-provider": "4.0.0", "xss": "^1.0.15", "zod": "^4.4.3" }, "devDependencies": { - "@cloudflare/vitest-pool-workers": "^0.18.8", - "@cloudflare/workers-types": "^5.20260719.1", + "@cloudflare/vitest-pool-workers": "^0.21.2", + "@cloudflare/workers-types": "^5.20260813.1", "@playwright/test": "^1.62.0", "@types/node": "^24.0.0", "esbuild": "^0.28.1", "jsonc-parser": "3.3.1", "typescript": "^7.0.0", "vitest": "^4.1.0", - "wrangler": "^4.112.0" + "wrangler": "^4.122.0" }, "repository": { "type": "git", diff --git a/apps/desk/public/voice-demo.css b/apps/desk/public/voice-demo.css index 68a2d42..81b3e03 100644 --- a/apps/desk/public/voice-demo.css +++ b/apps/desk/public/voice-demo.css @@ -1 +1 @@ -:root{color-scheme:light;font-family:var(--font, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif);color:var(--ink, #121212);background:var(--canvas, #ffffff);font-synthesis:none;--card: #ffffff;--soft: color-mix(in srgb, var(--ink, #121212) 4%, #ffffff);--line: color-mix(in srgb, var(--ink, #121212) 12%, transparent);--line-strong: color-mix(in srgb, var(--ink, #121212) 22%, transparent);--muted: color-mix(in srgb, var(--ink, #121212) 62%, var(--canvas, #ffffff));--accent-soft: color-mix(in srgb, var(--accent, #c87942) 9%, #ffffff);--accent-line: color-mix(in srgb, var(--accent, #c87942) 34%, transparent);--focus-ring: color-mix(in srgb, var(--accent, #c87942) 50%, transparent);--surface-width: 64rem;--answer-width: 47.5rem}*{box-sizing:border-box}html,body{min-height:100%}html.support-conversation,body.support-conversation{height:100%;overflow:hidden;overscroll-behavior:none}body{margin:0;min-width:320px;font-family:inherit;background:var(--canvas, #fff)}button,input{font:inherit}button{border:0;cursor:pointer;touch-action:manipulation}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,input:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--focus-ring);outline-offset:2px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.skip-link{position:fixed;z-index:20;top:8px;left:8px;transform:translateY(-150%);border-radius:8px;padding:10px 14px;color:var(--ink, #121212);background:#fff;box-shadow:0 2px 12px #0000001f;font-weight:700}.skip-link:focus{transform:translateY(0)}.app{min-height:100dvh;display:flex;flex-direction:column}.app[data-view=conversation]{position:fixed;z-index:1;top:var(--support-viewport-top, 0px);right:0;left:0;width:100%;min-height:0;height:var(--support-viewport-height, 100dvh);max-height:var(--support-viewport-height, 100dvh);overflow:hidden}.chat-header{flex:none;padding-top:env(safe-area-inset-top);background:var(--card)}.chat-header-inner{width:min(var(--surface-width),100% - 40px);min-height:64px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line)}.header-actions,.support-nav{display:flex;align-items:center;gap:8px}.support-nav a,.text-button{min-height:44px;display:inline-flex;align-items:center;border-radius:9px;padding:0 9px;color:var(--muted);background:transparent;font-size:13px;font-weight:650;text-decoration:none;white-space:nowrap}.support-nav a:hover,.text-button:not(:disabled):hover{color:var(--ink, #121212);background:var(--soft)}.brand{min-width:0;display:inline-flex;align-items:center;gap:10px;color:inherit;text-decoration:none}.brand-logo{display:block;height:28px;max-width:150px;object-fit:contain}.brand-mark,.avatar{flex:none;display:grid;place-items:center;color:var(--accent-ink, #000);background:var(--accent, #c87942);font-size:11px;font-weight:800}.brand-mark{width:32px;height:32px;border-radius:9px}.avatar{width:28px;height:28px;border-radius:50%}.brand-text{min-width:0;display:grid;line-height:1.25}.brand-name{overflow:hidden;font-size:15px;font-weight:720;letter-spacing:-.01em;text-overflow:ellipsis;white-space:nowrap}.brand-sub{color:var(--muted);font-size:12px}.reconnect-banner{flex:none;padding:8px 16px;border-bottom:1px solid var(--accent-line);color:var(--ink, #121212);background:var(--accent-soft);text-align:center;font-size:13px;font-weight:650}.thread{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:24px;scrollbar-color:var(--line-strong) transparent}.thread-inner{width:min(var(--answer-width),100% - 40px);margin:0 auto;padding:36px 0 24px}.app[data-view=landing] .thread{flex:none;overflow:visible}.app[data-view=landing] .thread-inner{width:min(var(--surface-width),100% - 40px);padding:104px 0 80px}.landing-hero h1{max-width:18ch;margin:0;font-size:clamp(2.5rem,4vw,3rem);font-weight:650;letter-spacing:-.045em;line-height:1}.landing-lede{max-width:42rem;margin:20px 0 0;color:var(--muted);font-size:15px;line-height:1.55}.ask-composer{width:100%;min-height:52px;margin-top:30px;display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:13px;padding:4px 5px 4px 10px;background:#fff;box-shadow:0 1px #0000000a,0 6px 18px #0000000f}.ask-composer:focus-within{border-color:var(--line-strong);box-shadow:0 0 0 3px var(--focus-ring),0 8px 24px #00000014}.ask-icon{flex:none;display:grid;place-items:center}.ask-icon .avatar{width:24px;height:24px;font-size:9px}.ask-composer input{flex:1 1 auto;min-width:0;min-height:44px;border:0;padding:0 3px;color:var(--ink, #121212);background:transparent;font-size:16px;outline:0}.ask-composer input::placeholder,.composer input::placeholder{color:var(--muted)}.ask-composer input:focus-visible{outline:0}.ask-composer .mic-button,.ask-composer .ask-send-button{width:44px;height:44px;min-width:44px;min-height:44px;padding:0}.ask-composer .mic-button{border:0}.ask-send-button{border-radius:9px;display:grid;place-items:center}.landing-trust{margin:13px 0 0;color:var(--muted);font-size:12px;line-height:1.5}.landing-status{min-height:18px;margin:6px 0 0;color:var(--ink, #121212);font-size:12px;font-weight:650;line-height:1.5}.support-tasks{margin-top:48px}.support-tasks-heading .eyebrow{margin:0}.support-tasks-heading h2{margin:5px 0 0;font-size:21px;font-weight:670;letter-spacing:-.025em}.support-task-grid{margin-top:20px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.support-task{min-height:124px;display:flex;flex-direction:column;justify-content:space-between;gap:16px;border:1px solid var(--line);border-radius:12px;padding:16px;color:var(--ink, #121212);background:var(--card);text-align:left;text-decoration:none;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}.support-task:not(:disabled):hover{border-color:var(--line-strong);box-shadow:0 6px 18px #0000000f;transform:translateY(-1px)}.support-task--contact{border-color:var(--accent-line);background:var(--accent-soft)}.support-task-title{font-size:14px;font-weight:720;line-height:1.35}.support-task-copy{color:var(--muted);font-size:12px;line-height:1.45}.topics-section{margin-top:72px}.topics-heading{display:flex;align-items:baseline;justify-content:space-between;gap:20px}.topics-heading h2{margin:0;font-size:21px;font-weight:670;letter-spacing:-.025em}.topics-heading>a{color:var(--muted);font-size:13px;font-weight:650}.topic-grid{margin-top:27px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:56px;row-gap:42px}.topic-card h3{margin:0;font-size:14px;font-weight:720;line-height:1.35}.topic-card h3 a,.topic-card li a{color:var(--ink, #121212);text-decoration:none}.topic-card h3 a:hover,.topic-card li a:hover{text-decoration:underline;text-underline-offset:3px}.topic-card>p{margin:7px 0 0;color:var(--muted);font-size:12.5px;line-height:1.5}.topic-card ul{margin:12px 0 0;padding:0;list-style:none;display:grid;gap:8px}.topic-card li{font-size:13px;line-height:1.45}.topics-empty{grid-column:1 / -1;margin:0;color:var(--muted)}.thread-list{margin:0;padding:0 0 36px;list-style:none;display:flex;flex-direction:column;gap:28px}.answer-turn{display:grid;gap:8px}.answer-turn--user{width:100%}.turn-label{margin:0;color:var(--muted);font-size:12px;font-weight:700}.turn-copy{color:var(--ink, #121212);font-size:15px;line-height:1.62}.turn-copy p{margin:0;overflow-wrap:anywhere}.answer-turn--user .turn-copy{font-size:clamp(1.35rem,4vw,1.5rem);font-weight:650;letter-spacing:-.025em;line-height:1.25}.answer-turn--user .turn-copy h2{margin:0;overflow-wrap:anywhere;font:inherit}.answer-turn--pending{opacity:.65}.typing-bubble{min-height:25px}.typing-dots{display:inline-flex;gap:4px;align-items:center}.typing-dots span{width:6px;height:6px;border-radius:50%;background:var(--muted);animation:typing-blink 1.2s ease-in-out infinite}.typing-dots span:nth-child(2){animation-delay:.2s}.typing-dots span:nth-child(3){animation-delay:.4s}@keyframes typing-blink{0%,80%,to{opacity:.3}40%{opacity:1}}.typing-static{display:none;font-weight:700;letter-spacing:2px}.system-note{padding:2px 8px;color:var(--muted);text-align:center;font-size:12.5px;line-height:1.45}.sources-row{margin-top:-18px}.sources-card{width:100%}.sources-card summary{width:max-content;min-height:44px;display:flex;align-items:center;border-radius:7px;padding:5px 7px;color:var(--muted);font-size:12px;font-weight:650;cursor:pointer}.sources-card[open] summary{margin-bottom:8px}.sources-list{display:flex;flex-wrap:wrap;gap:7px}.source-chip{min-height:44px;max-width:100%;display:inline-flex;flex-direction:column;justify-content:center;gap:1px;border-radius:8px;padding:7px 9px;color:inherit;background:var(--soft);text-decoration:none}.source-chip:hover{background:var(--accent-soft)}.source-chip span{color:var(--ink, #121212);font-size:12.5px;font-weight:650}.source-chip small{color:var(--muted);font-size:10.5px}.follow-up-prompts{margin-top:9px}.follow-up-prompts>p{margin:0 0 7px;color:var(--muted);font-size:12px;font-weight:650}.follow-up-list{display:flex;flex-wrap:wrap;gap:7px}.follow-up-chip{min-height:36px;border-radius:8px;padding:7px 10px;color:var(--ink, #121212);background:var(--soft);font-size:12px;font-weight:600;text-align:left}.follow-up-chip:hover{background:var(--accent-soft)}.bubble-row{display:flex;align-items:flex-start;gap:10px}.bubble-stack{width:100%;max-width:31rem;display:grid;gap:10px}.chat-card{display:grid;gap:11px;border:1px solid var(--line);border-radius:12px;padding:16px;background:var(--card)}.chat-card-lead{margin:0;font-size:14px;font-weight:680}.chat-card-copy{margin:0;color:var(--muted);font-size:12.5px;line-height:1.5}.access-button{min-height:44px;border-radius:9px;color:var(--accent-ink, #000);background:var(--accent, #c87942);font-weight:700}.signin-card{display:grid;gap:10px}.signin-card .chat-card-lead{font-size:16px;font-weight:750}.signin-button{width:100%;border-radius:10px}.access-button:not(:disabled):hover{transform:translateY(-1px)}.access-feedback{color:var(--muted);font-size:11.5px;line-height:1.45}.session-turnstile{overflow:hidden}.session-turnstile{position:fixed;z-index:30;right:16px;bottom:max(16px,env(safe-area-inset-bottom));width:min(20rem,calc(100% - 32px));pointer-events:none}.session-turnstile:not(:empty){min-height:65px;pointer-events:auto}.session-turnstile:empty{display:none}.cf-turnstile{min-height:65px;overflow:hidden}.eyebrow{margin:0;color:var(--accent-text, var(--accent, #c87942));font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.ticket-card{gap:6px}.ticket-title{margin:0;font-size:15px;font-weight:700}.ticket-copy{margin:0;color:var(--muted);font-size:12.5px;line-height:1.5}.ticket-card dl{margin:4px 0 0;display:flex;gap:22px}.ticket-card dl div{display:grid;gap:3px}.ticket-card dt{color:var(--muted);font-size:10px;font-weight:750;letter-spacing:.1em;text-transform:uppercase}.ticket-card dd{margin:0;font-size:13px;font-weight:700}.composer-bar{flex:none;border-top:1px solid var(--line);background:color-mix(in srgb,var(--card) 94%,transparent);backdrop-filter:blur(12px)}.composer-inner{width:min(var(--answer-width),100% - 40px);margin:0 auto;padding:10px 0 max(8px,env(safe-area-inset-bottom))}.composer{display:flex;align-items:center;gap:8px}.composer input{flex:1 1 auto;min-width:0;min-height:46px;border:1px solid var(--line-strong);border-radius:12px;padding:0 14px;color:var(--ink, #121212);background:#fff;font-size:16px}.mic-button,.human-action-button{width:46px;height:46px;flex:none;display:grid;place-items:center;border:1px solid var(--line-strong);border-radius:12px;color:var(--ink, #121212);background:var(--card)}.mic-button--active{border-color:transparent;color:var(--accent-ink, #000);background:var(--accent, #c87942);animation:mic-pulse 1.6s ease-in-out infinite}@keyframes mic-pulse{50%{box-shadow:0 0 0 8px color-mix(in srgb,var(--accent, #c87942) 18%,transparent)}}.mute-button{min-height:44px;flex:none;border:1px solid var(--line-strong);border-radius:10px;padding:0 13px;color:var(--ink, #121212);background:var(--card);font-size:12.5px;font-weight:650}.send-button{min-height:46px;flex:none;border-radius:10px;padding:0 18px;color:var(--accent-ink, #000);background:var(--accent, #c87942);font-weight:700}.send-button:not(:disabled):hover,.mic-button:not(:disabled):hover,.human-action-button:not(:disabled):hover{transform:translateY(-1px)}@media(max-width:700px){.chat-header-inner{width:100%;min-height:58px;padding:0 14px}.brand-sub{display:none}.support-nav a,.text-button{min-height:44px;font-size:14px}.app[data-view=landing] .thread-inner{width:100%;padding:44px 20px 80px}.thread-inner,.composer-inner{width:100%;padding-left:16px;padding-right:16px}.landing-hero h1{font-size:2.25rem;line-height:1.05}.landing-lede{margin-top:16px;font-size:14px}.ask-composer{position:static;width:100%;min-height:54px;margin-top:20px;border-radius:13px}.landing-trust{font-size:11.5px}.support-tasks{margin-top:38px}.support-task-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.support-task{min-height:132px;padding:14px}.topics-section{margin-top:52px}.topic-grid{grid-template-columns:1fr;gap:31px}.topics-heading>a,.topic-card h3 a,.topic-card li a{min-height:44px;display:flex;align-items:center}.topic-card ul{margin-top:4px;gap:0}.thread-inner{padding-top:24px}.thread-list{padding-bottom:28px}.bubble-stack{max-width:100%}.bubble-row>.avatar{display:none}.composer-inner{padding-top:8px;padding-bottom:max(16px,env(safe-area-inset-bottom))}.composer input{font-size:16px}.composer .mic-button:not(.mic-button--active){display:none}.send-button{min-width:54px;padding:0 12px}.follow-up-chip{min-height:44px;font-size:16px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}.typing-dots{display:none}.typing-static{display:inline}} +:root{color-scheme:light;font-family:var(--font, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Helvetica, Arial, sans-serif);color:var(--ink, #121212);background:var(--canvas, #ffffff);font-synthesis:none;--card: #ffffff;--soft: color-mix(in srgb, var(--ink, #121212) 4%, #ffffff);--line: color-mix(in srgb, var(--ink, #121212) 12%, transparent);--line-strong: color-mix(in srgb, var(--ink, #121212) 22%, transparent);--muted: color-mix(in srgb, var(--ink, #121212) 62%, var(--canvas, #ffffff));--accent-soft: color-mix(in srgb, var(--accent, #c87942) 9%, #ffffff);--accent-line: color-mix(in srgb, var(--accent, #c87942) 34%, transparent);--focus-ring: color-mix(in srgb, var(--accent, #c87942) 50%, transparent);--page: color-mix(in srgb, var(--canvas, #ffffff) 94%, var(--ink, #121212));--surface-width: 72rem;--answer-width: 52rem}*{box-sizing:border-box}html,body{min-height:100%}html.support-conversation,body.support-conversation{height:100%;overflow:hidden;overscroll-behavior:none}body{margin:0;min-width:320px;font-family:inherit;background:radial-gradient(circle at 12% 0%,var(--accent-soft),transparent 30rem),var(--page)}button,input{font:inherit}button{border:0;cursor:pointer;touch-action:manipulation}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,input:focus-visible,a:focus-visible,summary:focus-visible{outline:3px solid var(--focus-ring);outline-offset:2px}[hidden]{display:none!important}.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.skip-link{position:fixed;z-index:20;top:8px;left:8px;transform:translateY(-150%);border-radius:8px;padding:10px 14px;color:var(--ink, #121212);background:#fff;box-shadow:0 2px 12px #0000001f;font-weight:700}.skip-link:focus{transform:translateY(0)}.app{min-height:100dvh;display:flex;flex-direction:column}.app[data-view=conversation]{position:fixed;z-index:1;top:var(--support-viewport-top, 0px);right:0;left:0;width:100%;min-height:0;height:var(--support-viewport-height, 100dvh);max-height:var(--support-viewport-height, 100dvh);overflow:hidden}.chat-header{position:relative;z-index:10;flex:none;padding-top:env(safe-area-inset-top);border-bottom:1px solid var(--line);background:color-mix(in srgb,var(--card) 88%,transparent);backdrop-filter:blur(18px)}.chat-header-inner{width:min(var(--surface-width),100% - 40px);min-height:72px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:16px}.header-actions,.support-nav{display:flex;align-items:center;gap:8px}.support-nav a,.text-button{min-height:44px;display:inline-flex;align-items:center;border-radius:9px;padding:0 9px;color:var(--muted);background:transparent;font-size:13px;font-weight:650;text-decoration:none;white-space:nowrap}.support-nav a:hover,.text-button:not(:disabled):hover{color:var(--ink, #121212);background:var(--soft)}.help-centre-link:before{content:"?";width:20px;height:20px;display:grid;place-items:center;margin-right:7px;border:1px solid var(--line-strong);border-radius:50%;font-size:11px;font-weight:800}.account-menu{position:relative}.account-menu summary{min-height:44px;display:flex;align-items:center;gap:8px;border-radius:12px;padding:4px 8px 4px 5px;color:var(--ink, #121212);cursor:pointer;list-style:none}.account-menu summary::-webkit-details-marker{display:none}.account-menu summary:hover,.account-menu[open] summary{background:var(--soft)}.account-avatar{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;color:var(--accent-ink, #000);background:var(--accent, #c87942);font-size:11px;font-weight:800}.account-name{max-width:10rem;overflow:hidden;font-size:13px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}.account-chevron{color:var(--muted);font-size:14px;transition:transform .15s ease}.account-menu[open] .account-chevron{transform:rotate(180deg)}.account-popover{position:absolute;z-index:20;top:calc(100% + 8px);right:0;width:220px;overflow:hidden;border:1px solid var(--line);border-radius:14px;padding:8px;background:var(--card);box-shadow:0 18px 50px #00000024}.account-popover p{margin:0;display:grid;gap:2px;padding:10px 10px 12px;border-bottom:1px solid var(--line)}.account-popover p strong{overflow:hidden;font-size:13px;text-overflow:ellipsis;white-space:nowrap}.account-popover p span{color:var(--muted);font-size:11px}.account-popover a{width:100%;margin-top:6px;justify-content:flex-start}.brand{min-width:0;display:inline-flex;align-items:center;gap:10px;color:inherit;text-decoration:none}.brand-logo{display:block;height:32px;max-width:160px;object-fit:contain}.brand-mark,.avatar{flex:none;display:grid;place-items:center;color:var(--accent-ink, #000);background:var(--accent, #c87942);font-size:11px;font-weight:800}.brand-mark{width:36px;height:36px;border-radius:11px;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--ink, #121212) 10%,transparent)}.avatar{width:28px;height:28px;border-radius:50%}.brand-text{min-width:0;display:grid;line-height:1.25}.brand-name{overflow:hidden;font-size:15px;font-weight:760;letter-spacing:-.015em;text-overflow:ellipsis;white-space:nowrap}.brand-sub{color:var(--muted);font-size:12px}.reconnect-banner{flex:none;padding:8px 16px;border-bottom:1px solid var(--accent-line);color:var(--ink, #121212);background:var(--accent-soft);text-align:center;font-size:13px;font-weight:650}.thread{flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;scroll-padding-block:24px;scrollbar-color:var(--line-strong) transparent}.thread-inner{width:min(var(--answer-width),100% - 40px);margin:0 auto;padding:24px 0 28px}.app[data-view=landing] .thread{flex:none;overflow:visible}.app[data-view=landing] .thread-inner{width:min(var(--surface-width),100% - 40px);padding:84px 0 80px}.landing-hero{max-width:54rem}.landing-hero h1{max-width:18ch;margin:0;font-size:clamp(2.75rem,5vw,4.5rem);font-weight:680;letter-spacing:-.045em;line-height:1}.landing-lede{max-width:46rem;margin:22px 0 0;color:var(--muted);font-size:16px;line-height:1.6}.ask-composer{width:100%;min-height:64px;margin-top:30px;display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:18px;padding:8px 8px 8px 14px;background:#fff;box-shadow:0 1px #0000000a,0 18px 50px #00000017}.ask-composer:focus-within{border-color:var(--line-strong);box-shadow:0 0 0 3px var(--focus-ring),0 8px 24px #00000014}.ask-icon{flex:none;display:grid;place-items:center}.ask-icon .avatar{width:24px;height:24px;font-size:9px}.ask-composer input{flex:1 1 auto;min-width:0;min-height:44px;border:0;padding:0 3px;color:var(--ink, #121212);background:transparent;font-size:16px;outline:0}.ask-composer input::placeholder,.composer input::placeholder{color:var(--muted)}.ask-composer input:focus-visible{outline:0}.ask-composer .mic-button,.ask-composer .ask-send-button{width:44px;height:44px;min-width:44px;min-height:44px;padding:0}.ask-composer .mic-button{border:0}.ask-send-button{border-radius:13px;display:grid;place-items:center}.landing-trust{margin:13px 0 0;color:var(--muted);font-size:12px;line-height:1.5}.landing-status{min-height:18px;margin:6px 0 0;display:flex;align-items:center;gap:7px;color:var(--muted);font-size:12px;font-weight:650;line-height:1.5}.connection-dot{width:7px;height:7px;flex:none;border-radius:50%;background:var(--accent, #c87942);box-shadow:0 0 0 4px var(--accent-soft);animation:connection-pulse 1.6s ease-in-out infinite}.app[data-connection=ready] .connection-dot{background:#27844c;box-shadow:0 0 0 4px color-mix(in srgb,#27844c 13%,transparent);animation:none}.app[data-connection=ready] .landing-status{color:var(--muted)}.app[data-connection=reconnecting] .connection-dot,.app[data-connection=error] .connection-dot{background:#b45c34;box-shadow:0 0 0 4px color-mix(in srgb,#b45c34 14%,transparent)}@keyframes connection-pulse{50%{opacity:.42;transform:scale(.82)}}.support-tasks{margin-top:48px}.support-tasks-heading .eyebrow{margin:0}.support-tasks-heading h2{margin:5px 0 0;font-size:21px;font-weight:670;letter-spacing:-.025em}.support-task-grid{margin-top:20px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.support-task{min-height:124px;display:flex;flex-direction:column;justify-content:space-between;gap:16px;border:1px solid var(--line);border-radius:16px;padding:18px;color:var(--ink, #121212);background:var(--card);text-align:left;text-decoration:none;box-shadow:0 1px #00000005;transition:border-color .15s ease,box-shadow .15s ease,transform .15s ease}.support-task:not(:disabled):hover{border-color:var(--accent-line);box-shadow:0 12px 28px #00000014;transform:translateY(-2px)}.support-task--contact{border-color:var(--accent-line);background:var(--accent-soft)}.support-task--featured{color:var(--accent-ink, #000);background:var(--accent, #c87942)}.support-task--featured .support-task-copy{color:color-mix(in srgb,var(--accent-ink, #000) 72%,transparent)}.support-task-title{font-size:14px;font-weight:720;line-height:1.35}.support-task-copy{color:var(--muted);font-size:12px;line-height:1.45}.topics-section{margin-top:72px}.topics-heading{display:flex;align-items:baseline;justify-content:space-between;gap:20px}.topics-heading h2{margin:0;font-size:21px;font-weight:670;letter-spacing:-.025em}.topics-heading>a{color:var(--muted);font-size:13px;font-weight:650}.topic-grid{margin-top:27px;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:56px;row-gap:42px}.topic-card h3{margin:0;font-size:14px;font-weight:720;line-height:1.35}.topic-card h3 a,.topic-card li a{color:var(--ink, #121212);text-decoration:none}.topic-card h3 a:hover,.topic-card li a:hover{text-decoration:underline;text-underline-offset:3px}.topic-card>p{margin:7px 0 0;color:var(--muted);font-size:12.5px;line-height:1.5}.topic-card ul{margin:12px 0 0;padding:0;list-style:none;display:grid;gap:8px}.topic-card li{font-size:13px;line-height:1.45}.topics-empty{grid-column:1 / -1;margin:0;color:var(--muted)}.conversation-toolbar{min-height:58px;margin-bottom:22px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-bottom:1px solid var(--line);padding-bottom:16px}.app[data-view=landing] .conversation-toolbar{display:none}.conversation-agent{display:flex;align-items:center;gap:10px}.conversation-agent .avatar{width:34px;height:34px;box-shadow:0 0 0 4px var(--accent-soft)}.conversation-agent>span{display:grid;gap:1px}.conversation-agent strong{font-size:14px}.conversation-agent small{color:var(--muted);font-size:11.5px}.conversation-actions{display:flex;align-items:center;gap:7px}.conversation-help-button,.new-conversation-button{min-height:40px;display:inline-flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:11px;padding:0 12px;color:var(--muted);background:var(--card);font-size:12px;font-weight:680}.conversation-help-button{border-color:transparent;color:var(--ink, #121212);background:var(--accent-soft)}.conversation-help-button:not(:disabled):hover,.new-conversation-button:not(:disabled):hover{border-color:var(--line-strong);color:var(--ink, #121212)}.new-conversation-button>span{font-size:18px;font-weight:400;line-height:1}.thread-list{margin:0;padding:0 0 36px;list-style:none;display:flex;flex-direction:column;gap:20px}.answer-turn{display:grid;gap:8px}.answer-turn--assistant{max-width:90%;border:1px solid var(--line);border-radius:18px 18px 18px 6px;padding:17px 19px 18px;background:var(--card);box-shadow:0 8px 26px #0000000e}.answer-turn--user{width:100%;justify-items:end}.turn-label{margin:0;color:var(--muted);font-size:11px;font-weight:760;letter-spacing:.02em}.answer-turn--assistant .turn-label{display:flex;align-items:center;gap:7px;color:var(--ink, #121212)}.answer-turn--assistant .turn-label:before{content:"";width:7px;height:7px;border-radius:50%;background:var(--accent, #c87942);box-shadow:0 0 0 3px var(--accent-soft)}.turn-copy{color:var(--ink, #121212);font-size:15px;line-height:1.62}.turn-copy p{overflow-wrap:anywhere}.markdown-body{min-width:0}.markdown-body>:first-child{margin-top:0}.markdown-body>:last-child{margin-bottom:0}.markdown-body p{margin:0 0 .72em}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4{margin:1.15em 0 .42em;font-weight:750;letter-spacing:-.018em;line-height:1.25}.markdown-body h1{font-size:1.3em}.markdown-body h2{font-size:1.18em}.markdown-body h3,.markdown-body h4{font-size:1em}.markdown-body ul,.markdown-body ol{margin:.55em 0 .8em;padding-left:1.35em}.markdown-body li{margin:.3em 0;padding-left:.15em}.markdown-body li::marker{color:var(--accent-text, var(--accent, #c87942));font-weight:750}.markdown-body strong{font-weight:760}.markdown-body a{color:var(--accent-text, #9b542c);font-weight:650;text-decoration-thickness:1px;text-underline-offset:3px}.markdown-body a:hover{text-decoration-thickness:2px}.markdown-body blockquote{margin:.7em 0;border-left:3px solid var(--accent, #c87942);padding:.1em 0 .1em 1em;color:var(--muted)}.markdown-body code{border-radius:5px;padding:.12em .35em;background:var(--soft);font:.88em/1.5 ui-monospace,SFMono-Regular,Consolas,monospace}.markdown-body pre{max-width:100%;overflow-x:auto;margin:.75em 0;border:1px solid var(--line);border-radius:10px;padding:12px 14px;background:var(--soft)}.markdown-body pre code{padding:0;background:transparent}.markdown-body table{display:block;max-width:100%;overflow-x:auto;margin:.8em 0;border-spacing:0;font-size:.9em}.markdown-body th,.markdown-body td{border-bottom:1px solid var(--line);padding:8px 12px;text-align:left;vertical-align:top}.markdown-body th{background:var(--soft);font-weight:720}.markdown-body hr{height:1px;margin:1em 0;border:0;background:var(--line)}.answer-turn--user .turn-label{padding-right:4px}.answer-turn--user .turn-copy{max-width:82%;border:1px solid var(--accent-line);border-radius:17px 17px 6px;padding:12px 15px;background:var(--accent-soft);font-size:15px;font-weight:580;letter-spacing:-.01em;line-height:1.45}.answer-turn--user .turn-copy h2{margin:0;overflow-wrap:anywhere;font:inherit}.answer-turn--pending{opacity:.65}.typing-bubble{min-height:25px}.typing-dots{display:inline-flex;gap:4px;align-items:center}.typing-dots span{width:6px;height:6px;border-radius:50%;background:var(--muted);animation:typing-blink 1.2s ease-in-out infinite}.typing-dots span:nth-child(2){animation-delay:.2s}.typing-dots span:nth-child(3){animation-delay:.4s}@keyframes typing-blink{0%,80%,to{opacity:.3}40%{opacity:1}}.typing-static{display:none;font-weight:700;letter-spacing:2px}.typing-copy{margin-left:9px;color:var(--muted);font-size:12.5px;font-weight:600}.system-note{padding:2px 8px;color:var(--muted);text-align:center;font-size:12.5px;line-height:1.45}.sources-row{margin-top:-8px}.sources-card{width:100%}.sources-card summary{width:max-content;min-height:44px;display:flex;align-items:center;border-radius:7px;padding:5px 7px;color:var(--muted);font-size:12px;font-weight:650;cursor:pointer}.sources-card[open] summary{margin-bottom:8px}.sources-list{display:flex;flex-wrap:wrap;gap:7px}.source-chip{min-height:44px;max-width:100%;display:inline-flex;flex-direction:column;justify-content:center;gap:1px;border-radius:8px;padding:7px 9px;color:inherit;background:var(--soft);text-decoration:none}.source-chip:hover{background:var(--accent-soft)}.source-chip span{color:var(--ink, #121212);font-size:12.5px;font-weight:650}.source-chip small{color:var(--muted);font-size:10.5px}.products-row{margin-top:-6px}.product-results{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:10px}.product-result{min-width:0;overflow:hidden;display:flex;flex-direction:column;border:1px solid var(--line);border-radius:14px;color:var(--ink, #121212);background:var(--card);text-decoration:none}.product-result:hover{border-color:var(--accent-line);box-shadow:0 8px 24px #00000012}.product-result>img{width:100%;aspect-ratio:4 / 3;object-fit:cover;background:var(--soft)}.product-result-copy{display:grid;gap:4px;padding:12px}.product-result-copy strong{overflow:hidden;font-size:13px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}.product-result-copy>span{font-size:12.5px;font-weight:680}.product-result-copy small{color:var(--muted);font-size:10.5px}.follow-up-prompts{margin-top:9px}.follow-up-prompts>p{margin:0 0 7px;color:var(--muted);font-size:12px;font-weight:650}.follow-up-list{display:flex;flex-wrap:wrap;gap:7px}.follow-up-chip{min-height:36px;border-radius:8px;padding:7px 10px;color:var(--ink, #121212);background:var(--soft);font-size:12px;font-weight:600;text-align:left}.follow-up-chip:hover{background:var(--accent-soft)}.bubble-row{display:flex;align-items:flex-start;gap:10px}.bubble-stack{width:100%;max-width:31rem;display:grid;gap:10px}.chat-card{display:grid;gap:11px;border:1px solid var(--line);border-radius:12px;padding:16px;background:var(--card)}.chat-card-lead{margin:0;font-size:14px;font-weight:680}.chat-card-copy{margin:0;color:var(--muted);font-size:12.5px;line-height:1.5}.access-button{min-height:44px;border-radius:9px;color:var(--accent-ink, #000);background:var(--accent, #c87942);font-weight:700}.signin-card{display:grid;gap:10px}.signin-card .chat-card-lead{font-size:16px;font-weight:750}.signin-button{width:100%;border-radius:10px}.access-button:not(:disabled):hover{transform:translateY(-1px)}.access-feedback{color:var(--muted);font-size:11.5px;line-height:1.45}.session-turnstile{overflow:hidden}.session-turnstile{position:fixed;z-index:30;right:16px;bottom:max(16px,env(safe-area-inset-bottom));width:min(20rem,calc(100% - 32px));pointer-events:none}.session-turnstile:not(:empty){min-height:65px;pointer-events:auto}.session-turnstile:empty{display:none}.cf-turnstile{min-height:65px;overflow:hidden}.eyebrow{margin:0;color:var(--accent-text, var(--accent, #c87942));font-size:11px;font-weight:800;letter-spacing:.12em;text-transform:uppercase}.ticket-card{gap:6px}.ticket-title{margin:0;font-size:15px;font-weight:700}.ticket-copy{margin:0;color:var(--muted);font-size:12.5px;line-height:1.5}.ticket-card dl{margin:4px 0 0;display:flex;gap:22px}.ticket-card dl div{display:grid;gap:3px}.ticket-card dt{color:var(--muted);font-size:10px;font-weight:750;letter-spacing:.1em;text-transform:uppercase}.ticket-card dd{margin:0;font-size:13px;font-weight:700}.composer-bar{flex:none;background:linear-gradient(to top,var(--page) 72%,transparent)}.composer-inner{width:min(var(--answer-width),100% - 40px);margin:0 auto;padding:10px 0 max(18px,env(safe-area-inset-bottom))}.composer{display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:18px;padding:7px;background:var(--card);box-shadow:0 16px 46px #0000001f}.composer:focus-within{border-color:var(--accent-line);box-shadow:0 0 0 3px var(--focus-ring),0 16px 46px #0000001f}.composer input{flex:1 1 auto;min-width:0;min-height:46px;border:0;border-radius:12px;padding:0 10px;color:var(--ink, #121212);background:transparent;font-size:16px;outline:0}.composer input:focus-visible{outline:0}.mic-button{width:44px;height:44px;flex:none;display:grid;place-items:center;border:0;border-radius:12px;color:var(--muted);background:transparent}.mic-button--active{border-color:transparent;color:var(--accent-ink, #000);background:var(--accent, #c87942);animation:mic-pulse 1.6s ease-in-out infinite}@keyframes mic-pulse{50%{box-shadow:0 0 0 8px color-mix(in srgb,var(--accent, #c87942) 18%,transparent)}}.mute-button{min-height:44px;flex:none;border:1px solid var(--line-strong);border-radius:10px;padding:0 13px;color:var(--ink, #121212);background:var(--card);font-size:12.5px;font-weight:650}.send-button{width:44px;min-width:44px;min-height:44px;flex:none;display:grid;place-items:center;border-radius:13px;padding:0;color:var(--accent-ink, #000);background:var(--accent, #c87942);font-weight:700}.send-button:not(:disabled):hover,.mic-button:not(:disabled):hover{transform:translateY(-1px)}@media(max-width:700px){.chat-header-inner{width:100%;min-height:58px;padding:0 14px}.brand-sub{display:none}.support-nav a,.text-button{min-height:44px;font-size:14px}.help-centre-link:before{display:none}.account-name,.account-chevron{display:none}.account-menu summary{padding-right:5px}.account-popover{position:fixed;top:calc(58px + env(safe-area-inset-top));right:12px}.app[data-view=landing] .thread-inner{width:100%;padding:44px 20px 80px}.thread-inner,.composer-inner{width:100%;padding-left:16px;padding-right:16px}.landing-hero h1{font-size:2.25rem;line-height:1.05}.landing-lede{margin-top:16px;font-size:14px}.ask-composer{position:static;width:100%;min-height:54px;margin-top:20px;border-radius:13px}.landing-trust{font-size:11.5px}.support-tasks{margin-top:38px}.support-task-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.support-task{min-height:132px;padding:14px}.topics-section{margin-top:52px}.topic-grid{grid-template-columns:1fr;gap:31px}.topics-heading>a,.topic-card h3 a,.topic-card li a{min-height:44px;display:flex;align-items:center}.topic-card ul{margin-top:4px;gap:0}.thread-inner{padding-top:16px}.conversation-toolbar{margin-bottom:16px}.conversation-agent small{display:none}.conversation-actions{gap:4px}.conversation-help-button{min-height:44px;padding-inline:10px}.new-conversation-button{min-height:44px;font-size:0;padding:0 11px}.new-conversation-button>span{font-size:22px}.thread-list{padding-bottom:28px}.answer-turn--assistant{max-width:96%;padding:15px 16px 16px}.answer-turn--user .turn-copy{max-width:90%}.bubble-stack{max-width:100%}.bubble-row>.avatar{display:none}.composer-inner{padding-top:8px;padding-bottom:max(16px,env(safe-area-inset-bottom))}.composer input{font-size:16px}.composer .mic-button:not(.mic-button--active){display:none}.send-button{min-width:44px;padding:0}.follow-up-chip{min-height:44px;font-size:16px}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}.typing-dots{display:none}.typing-static{display:inline}} diff --git a/apps/desk/public/voice-demo.js b/apps/desk/public/voice-demo.js index 8cca632..153ca26 100644 --- a/apps/desk/public/voice-demo.js +++ b/apps/desk/public/voice-demo.js @@ -1,4 +1,5 @@ -"use strict";(()=>{var Pp=Object.defineProperty;var ae=(e,r)=>{for(var i in r)Pp(e,i,{get:r[i],enumerable:!0})};(!globalThis.EventTarget||!globalThis.Event)&&console.error(` +"use strict";(()=>{var yg=Object.create;var eo=Object.defineProperty;var $g=Object.getOwnPropertyDescriptor;var _g=Object.getOwnPropertyNames;var kg=Object.getPrototypeOf,wg=Object.prototype.hasOwnProperty;var me=(e,r)=>()=>{try{return r||e((r={exports:{}}).exports,r),r.exports}catch(n){throw r=0,n}},$e=(e,r)=>{for(var n in r)eo(e,n,{get:r[n],enumerable:!0})},Sg=(e,r,n,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of _g(r))!wg.call(e,t)&&t!==n&&eo(e,t,{get:()=>r[t],enumerable:!(i=$g(r,t))||i.enumerable});return e};var zg=(e,r,n)=>(n=e!=null?yg(kg(e)):{},Sg(r||!e||!e.__esModule?eo(n,"default",{value:e,enumerable:!0}):n,e));var bo=me(lt=>{function Id(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function Cv(e,r,n){}function Rv(e,r,n){}var Mv=/javascript\s*\:/img;function Fv(e,r){return Mv.test(r)?"":r}lt.whiteList=Id();lt.getDefaultWhiteList=Id;lt.onAttr=Cv;lt.onIgnoreAttr=Rv;lt.safeAttrValue=Fv});var xo=me((g_,Td)=>{Td.exports={indexOf:function(e,r){var n,i;if(Array.prototype.indexOf)return e.indexOf(r);for(n=0,i=e.length;n{var Yt=xo();function Vv(e,r){e=Yt.trimRight(e),e[e.length-1]!==";"&&(e+=";");var n=e.length,i=!1,t=0,o=0,a="";function s(){if(!i){var u=Yt.trim(e.slice(t,o)),d=u.indexOf(":");if(d!==-1){var f=Yt.trim(u.slice(0,d)),g=Yt.trim(u.slice(d+1));if(f){var x=r(t,a.length,f,g,u);x&&(a+=x+"; ")}}}t=o+1}for(;o{var Hr=bo(),Jv=Ed(),v_=xo();function Od(e){return e==null}function Bv(e){var r={};for(var n in e)r[n]=e[n];return r}function jd(e){e=Bv(e||{}),e.whiteList=e.whiteList||Hr.whiteList,e.onAttr=e.onAttr||Hr.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||Hr.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||Hr.safeAttrValue,this.options=e}jd.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var r=this,n=r.options,i=n.whiteList,t=n.onAttr,o=n.onIgnoreAttr,a=n.safeAttrValue,s=Jv(e,function(c,l,u,d,f){var g=i[u],x=!1;if(g===!0?x=g:typeof g=="function"?x=g(d):g instanceof RegExp&&(x=g.test(d)),x!==!0&&(x=!1),d=a(u,d),!!d){var T={position:l,sourcePosition:c,source:f,isWhite:x};if(x){var w=t(u,d,T);return Od(w)?u+":"+d:w}else{var w=o(u,d,T);if(!Od(w))return w}}});return s};Ud.exports=jd});var Yr=me((Xr,$o)=>{var Nd=bo(),Zd=Dd();function Wv(e,r){var n=new Zd(r);return n.process(e)}Xr=$o.exports=Wv;Xr.FilterCSS=Zd;for(yo in Nd)Xr[yo]=Nd[yo];var yo;typeof window<"u"&&(window.filterCSS=$o.exports)});var Qr=me((x_,Ad)=>{Ad.exports={indexOf:function(e,r){var n,i;if(Array.prototype.indexOf)return e.indexOf(r);for(n=0,i=e.length;n{var qv=Yr().FilterCSS,Gv=Yr().getDefaultWhiteList,tn=Qr();function Rd(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height","loading"],ins:["datetime"],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var Md=new qv;function Kv(e,r,n){}function Hv(e,r,n){}function Xv(e,r,n){}function Yv(e,r,n){}function Fd(e){return e.replace(eb,"<").replace(tb,">")}function Qv(e,r,n,i){if(n=Gd(n),r==="href"||r==="src"){if(n=tn.trim(n),n==="#")return"#";if(!(n.substr(0,7)==="http://"||n.substr(0,8)==="https://"||n.substr(0,7)==="mailto:"||n.substr(0,4)==="tel:"||n.substr(0,11)==="data:image/"||n.substr(0,6)==="ftp://"||n.substr(0,2)==="./"||n.substr(0,3)==="../"||n[0]==="#"||n[0]==="/"))return""}else if(r==="background"){if(en.lastIndex=0,en.test(n))return""}else if(r==="style"){if(Ld.lastIndex=0,Ld.test(n)||(Cd.lastIndex=0,Cd.test(n)&&(en.lastIndex=0,en.test(n))))return"";i!==!1&&(i=i||Md,n=i.process(n))}return n=Kd(n),n}var eb=//g,rb=/"/g,nb=/"/g,ib=/&#([a-zA-Z0-9]*);?/gim,ob=/:?/gim,ab=/&newline;?/gim,en=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,Ld=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,Cd=/u\s*r\s*l\s*\(.*/gi;function Vd(e){return e.replace(rb,""")}function Jd(e){return e.replace(nb,'"')}function Bd(e){return e.replace(ib,function(n,i){return i[0]==="x"||i[0]==="X"?String.fromCharCode(parseInt(i.substr(1),16)):String.fromCharCode(parseInt(i,10))})}function Wd(e){return e.replace(ob,":").replace(ab," ")}function qd(e){for(var r="",n=0,i=e.length;n",i);if(t===-1)break;n=t+3}return r}function ub(e){var r=e.split("");return r=r.filter(function(n){var i=n.charCodeAt(0);return i===127?!1:i<=31?i===10||i===13:!0}),r.join("")}L.whiteList=Rd();L.getDefaultWhiteList=Rd;L.onTag=Kv;L.onIgnoreTag=Hv;L.onTagAttr=Xv;L.onIgnoreTagAttr=Yv;L.safeAttrValue=Qv;L.escapeHtml=Fd;L.escapeQuote=Vd;L.unescapeQuote=Jd;L.escapeHtmlEntities=Bd;L.escapeDangerHtml5Entities=Wd;L.clearNonPrintableCharacter=qd;L.friendlyAttrValue=Gd;L.escapeAttrValue=Kd;L.onIgnoreTagStripAll=sb;L.StripTagBody=cb;L.stripCommentTag=lb;L.stripBlankChar=ub;L.attributeWrapSign='"';L.cssFilter=Md;L.getDefaultCSSWhiteList=Gv});var wo=me(ko=>{var De=Qr();function db(e){var r=De.spaceIndex(e),n;return r===-1?n=e.slice(1,-1):n=e.slice(1,r+1),n=De.trim(n).toLowerCase(),n.slice(0,1)==="/"&&(n=n.slice(1)),n.slice(-1)==="/"&&(n=n.slice(0,-1)),n}function pb(e){return e.slice(0,2)===""||s===c-1){i+=n(e.slice(t,o)),u=e.slice(o,s+1),l=db(u),i+=r(o,i.length,l,u,pb(u)),t=s+1,o=!1;continue}if(d==='"'||d==="'")for(var f=1,g=e.charAt(s-f);g.trim()===""||g==="=";){if(g==="="){a=d;continue e}g=e.charAt(s-++f)}}else if(d===a){a=!1;continue}}return t0;r--){var n=e[r];if(n!==" ")return n==="="?r:-1}}function xb(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function Hd(e){return xb(e)?e.substr(1,e.length-2):e}ko.parseTag=fb;ko.parseAttr=gb});var ep=me((__,Qd)=>{var yb=Yr().FilterCSS,ae=_o(),Xd=wo(),$b=Xd.parseTag,_b=Xd.parseAttr,nn=Qr();function rn(e){return e==null}function kb(e){var r=nn.spaceIndex(e);if(r===-1)return{html:"",closing:e[e.length-2]==="/"};e=nn.trim(e.slice(r+1,-1));var n=e[e.length-1]==="/";return n&&(e=nn.trim(e.slice(0,-1))),{html:e,closing:n}}function wb(e){var r={};for(var n in e)r[n]=e[n];return r}function Sb(e){var r={};for(var n in e)Array.isArray(e[n])?r[n.toLowerCase()]=e[n].map(function(i){return i.toLowerCase()}):r[n.toLowerCase()]=e[n];return r}function Yd(e){e=wb(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=ae.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=Sb(e.whiteList||e.allowList):e.whiteList=ae.whiteList,this.attributeWrapSign=e.singleQuotedAttributeValue===!0?"'":ae.attributeWrapSign,e.onTag=e.onTag||ae.onTag,e.onTagAttr=e.onTagAttr||ae.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||ae.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||ae.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||ae.safeAttrValue,e.escapeHtml=e.escapeHtml||ae.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new yb(e.css))}Yd.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var r=this,n=r.options,i=n.whiteList,t=n.onTag,o=n.onIgnoreTag,a=n.onTagAttr,s=n.onIgnoreTagAttr,c=n.safeAttrValue,l=n.escapeHtml,u=r.attributeWrapSign,d=r.cssFilter;n.stripBlankChar&&(e=ae.stripBlankChar(e)),n.allowCommentTag||(e=ae.stripCommentTag(e));var f=!1;n.stripIgnoreTagBody&&(f=ae.StripTagBody(n.stripIgnoreTagBody,o),o=f.onIgnoreTag);var g=$b(e,function(x,T,w,M,Te){var F={sourcePosition:x,position:T,isClosing:Te,isWhite:Object.prototype.hasOwnProperty.call(i,w)},P=t(w,M,F);if(!rn(P))return P;if(F.isWhite){if(F.isClosing)return"";var A=kb(M),fe=i[w],qt=_b(A.html,function(Pe,at){var Qi=nn.indexOf(fe,Pe)!==-1,Gt=a(w,Pe,at,Qi);return rn(Gt)?Qi?(at=c(w,Pe,at,d),at?Pe+"="+u+at+u:Pe):(Gt=s(w,Pe,at,Qi),rn(Gt)?void 0:Gt):Gt});return M="<"+w,qt&&(M+=" "+qt),A.closing&&(M+=" /"),M+=">",M}else return P=o(w,M,F),rn(P)?l(M):P},l);return f&&(g=f.remove(g)),g};Qd.exports=Yd});var op=me((ut,on)=>{var tp=_o(),rp=wo(),np=ep();function ip(e,r){var n=new np(r);return n.process(e)}ut=on.exports=ip;ut.filterXSS=ip;ut.FilterXSS=np;(function(){for(var e in tp)ut[e]=tp[e];for(var r in rp)ut[r]=rp[r]})();typeof window<"u"&&(window.filterXSS=on.exports);function zb(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}zb()&&(self.filterXSS=on.exports)});(!globalThis.EventTarget||!globalThis.Event)&&console.error(` PartySocket requires a global 'EventTarget' class to be available! You can polyfill this global by adding this to your code before any partysocket imports: @@ -6,7 +7,7 @@ import 'partysocket/event-target-polyfill'; \`\`\` Please file an issue at https://github.com/partykit/partykit if you're still having trouble. -`);var su=class extends Event{message;error;constructor(e,r){super("error",r),this.message=e.message,this.error=e}},uu=class extends Event{code;reason;wasClean=!0;constructor(e=1e3,r="",i){super("close",i),this.code=e,this.reason=r}},Wn={Event,ErrorEvent:su,CloseEvent:uu};function jp(e,r){if(!e)throw new Error(r)}function Tp(e){return new e.constructor(e.type,e)}function Op(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new uu(e.code||1999,e.reason||"unknown reason",e):"error"in e?new su(e.error,e):new Event(e.type,e)}var Up=typeof process<"u"&&typeof process.versions?.node<"u",Ep=typeof navigator<"u"&&navigator.product==="ReactNative",er=Up||Ep?Op:Tp,xe={maxReconnectionDelay:1e4,minReconnectionDelay:3e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:Number.POSITIVE_INFINITY,maxEnqueuedMessages:Number.POSITIVE_INFINITY,startClosed:!1,debug:!1},cu=!1;function Dp(){}var lu=class de extends EventTarget{_ws;_retryCount=-1;_uptimeTimeout;_connectTimeout;_shouldReconnect=!0;_connectLock=!1;_binaryType="blob";_closeCalled=!1;_didWarnAboutClosedSend=!1;_messageQueue=[];_debugLogger=console.log.bind(console);_url;_protocols;_options;constructor(r,i,o={}){super(),this._url=r,this._protocols=i,this._options=o,this._options.startClosed&&(this._shouldReconnect=!1),this._options.debugLogger&&(this._debugLogger=this._options.debugLogger),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return de.CONNECTING}get OPEN(){return de.OPEN}get CLOSING(){return de.CLOSING}get CLOSED(){return de.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(r){this._binaryType=r,this._ws&&(this._ws.binaryType=r)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((r,i)=>(typeof i=="string"?r+=i.length:i instanceof Blob?r+=i.size:r+=i.byteLength,r),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._closeCalled?de.CLOSED:this._ws?this._ws.readyState:this._options.startClosed?de.CLOSED:de.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}onclose=null;onerror=null;onmessage=null;onopen=null;close(r=1e3,i){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED||this._ws.readyState===this.CLOSING){this._debug("close: already closing or closed");return}this._disconnect(r,i)}reconnect(r,i){this._shouldReconnect=!0,this._closeCalled=!1,this._didWarnAboutClosedSend=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED||this._ws.readyState===this.CLOSING?this._connect():(this._disconnect(r,i),this._connect())}send(r){if(this._ws&&this._ws.readyState===this.OPEN)return this._debug("send",r),this._ws.send(r),!0;this._closeCalled&&!this._didWarnAboutClosedSend&&(this._didWarnAboutClosedSend=!0,console.warn("ReconnectingWebSocket: send() was called after close(). The message has been buffered, but it will only be delivered if reconnect() is called on this socket. If this socket has been discarded, the message is lost \u2014 this usually means a stale socket reference is being used."));let{maxEnqueuedMessages:i=xe.maxEnqueuedMessages}=this._options;return this._messageQueue.length",...r)}_getNextDelay(){let{reconnectionDelayGrowFactor:r=xe.reconnectionDelayGrowFactor,minReconnectionDelay:i=xe.minReconnectionDelay,maxReconnectionDelay:o=xe.maxReconnectionDelay}=this._options,t=0;return this._retryCount>0&&(t=i*r**(this._retryCount-1),t>o&&(t=o)),this._debug("next delay",t),t}_wait(){return new Promise(r=>{setTimeout(r,this._getNextDelay())})}_getNextProtocols(r){if(!r)return Promise.resolve(null);if(typeof r=="string"||Array.isArray(r))return Promise.resolve(r);if(typeof r=="function"){let i=r();if(!i)return Promise.resolve(null);if(typeof i=="string"||Array.isArray(i))return Promise.resolve(i);if(i.then)return i}throw Error("Invalid protocols")}_getNextUrl(r){if(typeof r=="string")return Promise.resolve(r);if(typeof r=="function"){let i=r();if(typeof i=="string")return Promise.resolve(i);if(i.then)return i}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;let{maxRetries:r=xe.maxRetries,connectionTimeout:i=xe.connectionTimeout}=this._options;if(this._retryCount>=r){this._debug("max retries reached",this._retryCount,">=",r),this._connectLock=!1;return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([o,t])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!cu&&(console.error(`\u203C\uFE0F No WebSocket implementation available. You should define options.WebSocket. +`);var Ru=class extends Event{message;error;constructor(e,r){super("error",r),this.message=e.message,this.error=e}},Mu=class extends Event{code;reason;wasClean=!0;constructor(e=1e3,r="",n){super("close",n),this.code=e,this.reason=r}},to={Event,ErrorEvent:Ru,CloseEvent:Mu};function Ig(e,r){if(!e)throw new Error(r)}function Tg(e){return new e.constructor(e.type,e)}function Pg(e){return"data"in e?new MessageEvent(e.type,e):"code"in e||"reason"in e?new Mu(e.code||1999,e.reason||"unknown reason",e):"error"in e?new Ru(e.error,e):new Event(e.type,e)}var Eg=typeof process<"u"&&typeof process.versions?.node<"u",Og=typeof navigator<"u"&&navigator.product==="ReactNative",Fr=Eg||Og?Pg:Tg,Be={maxReconnectionDelay:1e4,minReconnectionDelay:3e3,minUptime:5e3,reconnectionDelayGrowFactor:1.3,connectionTimeout:4e3,maxRetries:Number.POSITIVE_INFINITY,maxEnqueuedMessages:Number.POSITIVE_INFINITY,startClosed:!1,debug:!1},Cu=!1;function jg(){}var Fu=class Ee extends EventTarget{_ws;_retryCount=-1;_uptimeTimeout;_connectTimeout;_shouldReconnect=!0;_connectLock=!1;_binaryType="blob";_closeCalled=!1;_didWarnAboutClosedSend=!1;_messageQueue=[];_debugLogger=console.log.bind(console);_url;_protocols;_options;constructor(r,n,i={}){super(),this._url=r,this._protocols=n,this._options=i,this._options.startClosed&&(this._shouldReconnect=!1),this._options.debugLogger&&(this._debugLogger=this._options.debugLogger),this._connect()}static get CONNECTING(){return 0}static get OPEN(){return 1}static get CLOSING(){return 2}static get CLOSED(){return 3}get CONNECTING(){return Ee.CONNECTING}get OPEN(){return Ee.OPEN}get CLOSING(){return Ee.CLOSING}get CLOSED(){return Ee.CLOSED}get binaryType(){return this._ws?this._ws.binaryType:this._binaryType}set binaryType(r){this._binaryType=r,this._ws&&(this._ws.binaryType=r)}get retryCount(){return Math.max(this._retryCount,0)}get bufferedAmount(){return this._messageQueue.reduce((r,n)=>(typeof n=="string"?r+=n.length:n instanceof Blob?r+=n.size:r+=n.byteLength,r),0)+(this._ws?this._ws.bufferedAmount:0)}get extensions(){return this._ws?this._ws.extensions:""}get protocol(){return this._ws?this._ws.protocol:""}get readyState(){return this._closeCalled?Ee.CLOSED:this._ws?this._ws.readyState:this._options.startClosed?Ee.CLOSED:Ee.CONNECTING}get url(){return this._ws?this._ws.url:""}get shouldReconnect(){return this._shouldReconnect}onclose=null;onerror=null;onmessage=null;onopen=null;close(r=1e3,n){if(this._closeCalled=!0,this._shouldReconnect=!1,this._clearTimeouts(),!this._ws){this._debug("close enqueued: no ws instance");return}if(this._ws.readyState===this.CLOSED||this._ws.readyState===this.CLOSING){this._debug("close: already closing or closed");return}this._disconnect(r,n)}reconnect(r,n){this._shouldReconnect=!0,this._closeCalled=!1,this._didWarnAboutClosedSend=!1,this._retryCount=-1,!this._ws||this._ws.readyState===this.CLOSED||this._ws.readyState===this.CLOSING?this._connect():(this._disconnect(r,n),this._connect())}send(r){if(this._ws&&this._ws.readyState===this.OPEN)return this._debug("send",r),this._ws.send(r),!0;this._closeCalled&&!this._didWarnAboutClosedSend&&(this._didWarnAboutClosedSend=!0,console.warn("ReconnectingWebSocket: send() was called after close(). The message has been buffered, but it will only be delivered if reconnect() is called on this socket. If this socket has been discarded, the message is lost \u2014 this usually means a stale socket reference is being used."));let{maxEnqueuedMessages:n=Be.maxEnqueuedMessages}=this._options;return this._messageQueue.length",...r)}_getNextDelay(){let{reconnectionDelayGrowFactor:r=Be.reconnectionDelayGrowFactor,minReconnectionDelay:n=Be.minReconnectionDelay,maxReconnectionDelay:i=Be.maxReconnectionDelay}=this._options,t=0;return this._retryCount>0&&(t=n*r**(this._retryCount-1),t>i&&(t=i)),this._debug("next delay",t),t}_wait(){return new Promise(r=>{setTimeout(r,this._getNextDelay())})}_getNextProtocols(r){if(!r)return Promise.resolve(null);if(typeof r=="string"||Array.isArray(r))return Promise.resolve(r);if(typeof r=="function"){let n=r();if(!n)return Promise.resolve(null);if(typeof n=="string"||Array.isArray(n))return Promise.resolve(n);if(n.then)return n}throw Error("Invalid protocols")}_getNextUrl(r){if(typeof r=="string")return Promise.resolve(r);if(typeof r=="function"){let n=r();if(typeof n=="string")return Promise.resolve(n);if(n.then)return n}throw Error("Invalid URL")}_connect(){if(this._connectLock||!this._shouldReconnect)return;this._connectLock=!0;let{maxRetries:r=Be.maxRetries,connectionTimeout:n=Be.connectionTimeout}=this._options;if(this._retryCount>=r){this._debug("max retries reached",this._retryCount,">=",r),this._connectLock=!1;return}this._retryCount++,this._debug("connect",this._retryCount),this._removeListeners(),this._wait().then(()=>Promise.all([this._getNextUrl(this._url),this._getNextProtocols(this._protocols||null)])).then(([i,t])=>{if(this._closeCalled){this._connectLock=!1;return}!this._options.WebSocket&&typeof WebSocket>"u"&&!Cu&&(console.error(`\u203C\uFE0F No WebSocket implementation available. You should define options.WebSocket. For example, if you're using node.js, run \`npm install ws\`, and then in your code: @@ -19,7 +20,7 @@ const partysocket = new PartySocket({ WebSocket: WS }); -`),cu=!0);let n=this._options.WebSocket||WebSocket;this._debug("connect",{url:o,protocols:t}),this._ws=t?new n(o,t):new n(o),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),i)}).catch(o=>{this._connectLock=!1,this._handleError(new Wn.ErrorEvent(Error(o.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new Wn.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(r=1e3,i){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{(this._ws.readyState===this.OPEN||this._ws.readyState===this.CONNECTING)&&this._ws.close(r,i),this._handleClose(new Wn.CloseEvent(r,i,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_handleOpen=r=>{this._debug("open event");let{minUptime:i=xe.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),i),jp(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(o=>{this._ws?.send(o)}),this._messageQueue=[],this.onopen&&this.onopen(r),this.dispatchEvent(er(r))};_handleMessage=r=>{this._debug("message event"),this.onmessage&&this.onmessage(r),this.dispatchEvent(er(r))};_handleError=r=>{this._debug("error event",r.message),this._disconnect(void 0,r.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(r),this._debug("exec error listeners"),this.dispatchEvent(er(r)),this._connect()};_handleClose=r=>{this._debug("close event"),this._clearTimeouts(),this._options.shouldReconnectOnClose&&!this._options.shouldReconnectOnClose(r)&&(this._shouldReconnect=!1),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(r),this.dispatchEvent(er(r))};_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError),this._ws.addEventListener("error",Dp))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};var Np=e=>e[1]!==null&&e[1]!==void 0;function Zp(){if(crypto?.randomUUID)return crypto.randomUUID();let e=Date.now(),r=performance?.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(i){let o=Math.random()*16;return e>0?(o=(e+o)%16|0,e=Math.floor(e/16)):(o=(r+o)%16|0,r=Math.floor(r/16)),(i==="x"?o:o&3|8).toString(16)})}function pu(e,r,i={}){let{host:o,path:t,protocol:n,room:a,party:c,basePath:u,prefix:s,query:d}=e,m=o.replace(/^(http|https|ws|wss):\/\//,"");if(m.endsWith("/")&&(m=m.slice(0,-1)),t?.startsWith("/"))throw new Error("path must not start with a slash");let $=c??"main",h=t?`/${t}`:"",x=n||(m.startsWith("localhost:")||m.startsWith("127.0.0.1:")||m.startsWith("192.168.")||m.startsWith("10.")||m.startsWith("172.")&&m.split(".")[1]>="16"&&m.split(".")[1]<="31"||m.startsWith("[::ffff:7f00:1]:")?r:`${r}s`),N=`${x}://${m}/${u||`${s||"parties"}/${$}/${a}`}${h}`,U=(Bn={})=>`${N}?${new URLSearchParams([...Object.entries(i),...Object.entries(Bn).filter(Np)])}`,ft=typeof d=="function"?async()=>U(await d()):U(d);return{host:m,path:h,room:a,name:$,protocol:x,partyUrl:N,urlProvider:ft}}var mu=class extends lu{_pk;_pkurl;name;room;host;path;basePath;constructor(e){let r=du(e);if(super(r.urlProvider,r.protocols,r.socketOptions),this.partySocketOptions=e,this.setWSProperties(r),!e.startClosed&&!this.room&&!this.basePath)throw this.close(),new Error("Either room or basePath must be provided to connect. Use startClosed: true to create a socket and set them via updateProperties before calling reconnect().");e.disableNameValidation||(e.party?.includes("/")&&console.warn(`PartySocket: party name "${e.party}" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`),e.room?.includes("/")&&console.warn(`PartySocket: room name "${e.room}" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`))}updateProperties(e){let r=du({...this.partySocketOptions,...e,host:e.host??this.host,room:e.room??this.room,path:e.path??this.path,basePath:e.basePath??this.basePath});this._url=r.urlProvider,this._protocols=r.protocols,this._options=r.socketOptions,this.setWSProperties(r)}setWSProperties(e){let{_pk:r,_pkurl:i,name:o,room:t,host:n,path:a,basePath:c}=e;this._pk=r,this._pkurl=i,this.name=o,this.room=t,this.host=n,this.path=a,this.basePath=c}reconnect(e,r){if(!this.host)throw new Error("The host must be set before connecting, use `updateProperties` method to set it or pass it to the constructor.");if(!this.room&&!this.basePath)throw new Error("The room (or basePath) must be set before connecting, use `updateProperties` method to set it or pass it to the constructor.");super.reconnect(e,r)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(e,r){let i=pu(e,"http"),o=typeof i.urlProvider=="string"?i.urlProvider:await i.urlProvider();return(e.fetch??fetch)(o,r)}};function du(e){let{id:r,host:i,path:o,party:t,room:n,protocol:a,query:c,protocols:u,...s}=e,d=r||Zp(),m=pu(e,"ws",{_pk:d});return{_pk:d,_pkurl:m.partyUrl,name:m.name,room:m.room,host:m.host,path:m.path,basePath:e.basePath,protocols:u,socketOptions:s,urlProvider:m.urlProvider}}function Lp(e){if(e===e.toUpperCase()&&e!==e.toLowerCase())return e.toLowerCase().replace(/_/g,"-");let r=e.replace(/[A-Z]/g,i=>`-${i.toLowerCase()}`);return r=r.startsWith("-")?r.slice(1):r,r.replace(/_/g,"-").replace(/-$/,"")}var fu="Audio output device selection is not supported in this browser.",gu="Could not switch audio output device.",Ap=` +`),Cu=!0);let o=this._options.WebSocket||WebSocket;this._debug("connect",{url:i,protocols:t}),this._ws=t?new o(i,t):new o(i),this._ws.binaryType=this._binaryType,this._connectLock=!1,this._addListeners(),this._connectTimeout=setTimeout(()=>this._handleTimeout(),n)}).catch(i=>{this._connectLock=!1,this._handleError(new to.ErrorEvent(Error(i.message),this))})}_handleTimeout(){this._debug("timeout event"),this._handleError(new to.ErrorEvent(Error("TIMEOUT"),this))}_disconnect(r=1e3,n){if(this._clearTimeouts(),!!this._ws){this._removeListeners();try{(this._ws.readyState===this.OPEN||this._ws.readyState===this.CONNECTING)&&this._ws.close(r,n),this._handleClose(new to.CloseEvent(r,n,this))}catch{}}}_acceptOpen(){this._debug("accept open"),this._retryCount=0}_handleOpen=r=>{this._debug("open event");let{minUptime:n=Be.minUptime}=this._options;clearTimeout(this._connectTimeout),this._uptimeTimeout=setTimeout(()=>this._acceptOpen(),n),Ig(this._ws,"WebSocket is not defined"),this._ws.binaryType=this._binaryType,this._messageQueue.forEach(i=>{this._ws?.send(i)}),this._messageQueue=[],this.onopen&&this.onopen(r),this.dispatchEvent(Fr(r))};_handleMessage=r=>{this._debug("message event"),this.onmessage&&this.onmessage(r),this.dispatchEvent(Fr(r))};_handleError=r=>{this._debug("error event",r.message),this._disconnect(void 0,r.message==="TIMEOUT"?"timeout":void 0),this.onerror&&this.onerror(r),this._debug("exec error listeners"),this.dispatchEvent(Fr(r)),this._connect()};_handleClose=r=>{this._debug("close event"),this._clearTimeouts(),this._options.shouldReconnectOnClose&&!this._options.shouldReconnectOnClose(r)&&(this._shouldReconnect=!1),this._shouldReconnect&&this._connect(),this.onclose&&this.onclose(r),this.dispatchEvent(Fr(r))};_removeListeners(){this._ws&&(this._debug("removeListeners"),this._ws.removeEventListener("open",this._handleOpen),this._ws.removeEventListener("close",this._handleClose),this._ws.removeEventListener("message",this._handleMessage),this._ws.removeEventListener("error",this._handleError),this._ws.addEventListener("error",jg))}_addListeners(){this._ws&&(this._debug("addListeners"),this._ws.addEventListener("open",this._handleOpen),this._ws.addEventListener("close",this._handleClose),this._ws.addEventListener("message",this._handleMessage),this._ws.addEventListener("error",this._handleError))}_clearTimeouts(){clearTimeout(this._connectTimeout),clearTimeout(this._uptimeTimeout)}};var Ug=e=>e[1]!==null&&e[1]!==void 0;function Dg(){if(crypto?.randomUUID)return crypto.randomUUID();let e=Date.now(),r=performance?.now&&performance.now()*1e3||0;return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let i=Math.random()*16;return e>0?(i=(e+i)%16|0,e=Math.floor(e/16)):(i=(r+i)%16|0,r=Math.floor(r/16)),(n==="x"?i:i&3|8).toString(16)})}function Ju(e,r,n={}){let{host:i,path:t,protocol:o,room:a,party:s,basePath:c,prefix:l,query:u}=e,d=i.replace(/^(http|https|ws|wss):\/\//,"");if(d.endsWith("/")&&(d=d.slice(0,-1)),t?.startsWith("/"))throw new Error("path must not start with a slash");let f=s??"main",g=t?`/${t}`:"",x=o||(d.startsWith("localhost:")||d.startsWith("127.0.0.1:")||d.startsWith("192.168.")||d.startsWith("10.")||d.startsWith("172.")&&d.split(".")[1]>="16"&&d.split(".")[1]<="31"||d.startsWith("[::ffff:7f00:1]:")?r:`${r}s`),T=`${x}://${d}/${c||`${l||"parties"}/${f}/${a}`}${g}`,w=(Te={})=>`${T}?${new URLSearchParams([...Object.entries(n),...Object.entries(Te).filter(Ug)])}`,M=typeof u=="function"?async()=>w(await u()):w(u);return{host:d,path:g,room:a,name:f,protocol:x,partyUrl:T,urlProvider:M}}var Bu=class extends Fu{_pk;_pkurl;name;room;host;path;basePath;constructor(e){let r=Vu(e);if(super(r.urlProvider,r.protocols,r.socketOptions),this.partySocketOptions=e,this.setWSProperties(r),!e.startClosed&&!this.room&&!this.basePath)throw this.close(),new Error("Either room or basePath must be provided to connect. Use startClosed: true to create a socket and set them via updateProperties before calling reconnect().");e.disableNameValidation||(e.party?.includes("/")&&console.warn(`PartySocket: party name "${e.party}" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`),e.room?.includes("/")&&console.warn(`PartySocket: room name "${e.room}" contains forward slash which may cause routing issues. Consider using a name without forward slashes or set disableNameValidation: true to bypass this warning.`))}updateProperties(e){let r=Vu({...this.partySocketOptions,...e,host:e.host??this.host,room:e.room??this.room,path:e.path??this.path,basePath:e.basePath??this.basePath});this._url=r.urlProvider,this._protocols=r.protocols,this._options=r.socketOptions,this.setWSProperties(r)}setWSProperties(e){let{_pk:r,_pkurl:n,name:i,room:t,host:o,path:a,basePath:s}=e;this._pk=r,this._pkurl=n,this.name=i,this.room=t,this.host=o,this.path=a,this.basePath=s}reconnect(e,r){if(!this.host)throw new Error("The host must be set before connecting, use `updateProperties` method to set it or pass it to the constructor.");if(!this.room&&!this.basePath)throw new Error("The room (or basePath) must be set before connecting, use `updateProperties` method to set it or pass it to the constructor.");super.reconnect(e,r)}get id(){return this._pk}get roomUrl(){return this._pkurl}static async fetch(e,r){let n=Ju(e,"http"),i=typeof n.urlProvider=="string"?n.urlProvider:await n.urlProvider();return(e.fetch??fetch)(i,r)}};function Vu(e){let{id:r,host:n,path:i,party:t,room:o,protocol:a,query:s,protocols:c,...l}=e,u=r||Dg(),d=Ju(e,"ws",{_pk:u});return{_pk:u,_pkurl:d.partyUrl,name:d.name,room:d.room,host:d.host,path:d.path,basePath:e.basePath,protocols:c,socketOptions:l,urlProvider:d.urlProvider}}function Ng(e){if(e===e.toUpperCase()&&e!==e.toLowerCase())return e.toLowerCase().replace(/_/g,"-");let r=e.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`);return r=r.startsWith("-")?r.slice(1):r,r.replace(/_/g,"-").replace(/-$/,"")}var Wu="Audio output device selection is not supported in this browser.",qu="Could not switch audio output device.",Zg=` class AudioCaptureProcessor extends AudioWorkletProcessor { constructor() { super(); @@ -60,68 +61,152 @@ class AudioCaptureProcessor extends AudioWorkletProcessor { } registerProcessor('audio-capture-processor', AudioCaptureProcessor); -`;function Cp(e){let r=new ArrayBuffer(e.length*2),i=new DataView(r);for(let o=0;othis.onopen?.(),e.onclose=()=>this.onclose?.(),e.onerror=()=>this.onerror?.(),e.onmessage=r=>{this.onmessage?.(r.data)},this.#n=e}disconnect(){this.#n?.close(),this.#n=null}},hu=class{#n="idle";#t=[];#k=null;#w=0;#u=!1;#z=!1;#o=null;#_=null;#K=null;#N=null;#Z=16e3;#S=null;#q=null;#l=!1;#I=0;#d=!1;#H;#X;#Y;#Q;#L;#r=null;#i;#c=null;#A=!1;#C=null;#R=null;#a=null;#p=!1;#m=[];#h=!1;#b=!1;#f=new Set;#P=0;#j=null;#s=null;#T=null;#v=null;#M=!1;#y;#$=0;#F=0;#g=0;#x=0;#O=new Map;constructor(e){this.#i=e,this.#H=e.silenceThreshold??.04,this.#X=e.silenceDurationMs??500,this.#Y=e.interruptThreshold??.05,this.#Q=e.interruptChunks??2,this.#L=e.maxTranscriptMessages??200,this.#y=e.outputDeviceId??"default"}get status(){return this.#n}get transcript(){return this.#t}get metrics(){return this.#k}get audioLevel(){return this.#w}get isMuted(){return this.#u}get connected(){return this.#z}get error(){return this.#o}get outputDeviceError(){return this.#_}get interimTranscript(){return this.#S}get serverProtocolVersion(){return this.#q}addEventListener(e,r){let i=this.#O.get(e);i||(i=new Set,this.#O.set(e,i)),i.add(r)}removeEventListener(e,r){this.#O.get(e)?.delete(r)}#e(e,r){let i=this.#O.get(e);if(i)for(let o of i)o(r)}#ee(){this.#t.length>this.#L&&(this.#t=this.#t.slice(-this.#L))}#U(e){this.#_!==e&&(this.#_=e,this.#e("outputdeviceerror",e))}connect(){if(this.#r)return;let e=this.#i.transport??new Mp({agent:this.#i.agent,name:this.#i.name,host:this.#i.host,query:this.#i.query});e.onopen=()=>{this.#z=!0,this.#o=null,e.sendJSON({type:"hello",protocol_version:1}),this.#e("connectionchange",!0),this.#e("error",null),this.#l&&(this.#d=!1,e.sendJSON({type:"start_call"}))},e.onclose=()=>{this.#z=!1,this.#e("connectionchange",!1)},e.onerror=()=>{this.#o="Connection lost. Reconnecting...",this.#e("error",this.#o)},e.onmessage=r=>{typeof r=="string"?this.#ce(r):r instanceof Blob?r.arrayBuffer().then(i=>{this.#m.push(i),this.#ne()}):r instanceof ArrayBuffer&&(this.#m.push(r),this.#ne())},this.#r=e,e.connect()}disconnect(){this.endCall(),this.#r?.disconnect(),this.#r=null,this.#z=!1,this.#e("connectionchange",!1)}async startCall(){if(!this.#r?.connected){this.#o="Cannot start call: not connected. Call connect() first.",this.#e("error",this.#o);return}if(this.#l)return;let e=++this.#I;this.#l=!0,this.#d=!1,this.#o=null,this.#k=null,this.#e("error",null),this.#e("metricschange",null);let r={type:"start_call"};this.#i.preferredFormat&&(r.preferred_format=this.#i.preferredFormat),this.#r.sendJSON(r);let i=await this.#B();this.#V(e)||(await this.#te(i),!this.#V(e)&&(this.#i.audioInput?(this.#i.audioInput.onAudioLevel=o=>this.#ie(o),this.#i.audioInput.onAudioData=o=>{this.#r?.connected&&!this.#u&&this.#r.sendBinary(o)},await this.#i.audioInput.start()):await this.#de(),this.#V(e)))}endCall(){this.#I++,this.#l=!1,this.#d=!1,this.#r?.connected&&this.#r.sendJSON({type:"end_call"}),this.#J(),this.#n="idle",this.#e("statuschange","idle")}#ae(e){return this.#l&&this.#I===e}#V(e){return this.#ae(e)?!1:(this.#l||this.#J(),!0)}#J(){this.#i.audioInput?(this.#i.audioInput.stop(),this.#i.audioInput.onAudioLevel=null,this.#i.audioInput.onAudioData=null):this.#pe(),this.#D(),this.#se(),this.#oe()}toggleMute(){this.#u=!this.#u,this.#u&&(this.#w=0,this.#e("audiolevelchange",0)),this.#u&&this.#p&&(this.#p=!1,this.#a&&(clearTimeout(this.#a),this.#a=null),this.#r?.connected&&this.#r.sendJSON({type:"end_of_speech"})),this.#e("mutechange",this.#u)}sendText(e){this.#r?.connected&&this.#r.sendJSON({type:"text_message",text:e})}sendJSON(e){this.#r?.connected&&this.#r.sendJSON(e)}async setOutputDevice(e){this.#y=e??"default";let r=++this.#$;this.#s&&await this.#E(this.#s,r)}get lastCustomMessage(){return this.#K}get audioFormat(){return this.#N}get sampleRate(){return this.#Z}#ce(e){let r;try{r=JSON.parse(e)}catch{return}switch(r.type){case"welcome":this.#q=r.protocol_version,r.protocol_version!==1&&console.warn(`[VoiceClient] Protocol version mismatch: client=1, server=${r.protocol_version}`);break;case"audio_config":this.#d=!0,this.#N=r.format,this.#Z=typeof r.sampleRate=="number"&&r.sampleRate>0?r.sampleRate:16e3;break;case"status":if(this.#n=r.status,r.status==="idle"&&this.#l){if(!(this.#d||this.#o!==null)){this.#e("statuschange",this.#n);break}this.#I++,this.#l=!1,this.#d=!1,this.#J()}r.status==="listening"?(this.#d=!0,this.#o=null,this.#e("error",null)):(r.status==="thinking"||r.status==="speaking")&&(this.#d=!0),this.#e("statuschange",this.#n);break;case"transcript_interim":this.#S=r.text,this.#e("interimtranscript",this.#S);break;case"playback_interrupt":this.#D();break;case"transcript":this.#S=null,this.#e("interimtranscript",null),r.role==="user"&&this.#h&&this.#D(),this.#t=[...this.#t,{role:r.role,text:r.text,timestamp:Date.now()}],this.#ee(),this.#e("transcriptchange",this.#t);break;case"transcript_start":this.#t=[...this.#t,{role:"assistant",text:"",timestamp:Date.now()}],this.#ee(),this.#e("transcriptchange",this.#t);break;case"transcript_delta":{if(this.#t.length===0)break;let i=[...this.#t],o=i[i.length-1];o.role==="assistant"&&(i[i.length-1]={...o,text:o.text+r.text},this.#t=i,this.#e("transcriptchange",this.#t));break}case"transcript_end":{if(this.#t.length===0)break;let i=[...this.#t],o=i[i.length-1];o.role==="assistant"&&(i[i.length-1]={...o,text:r.text},this.#t=i,this.#e("transcriptchange",this.#t));break}case"metrics":this.#k={llm_ms:r.llm_ms,tts_ms:r.tts_ms,first_audio_ms:r.first_audio_ms,total_ms:r.total_ms},this.#e("metricschange",this.#k);break;case"error":this.#o=r.message,this.#e("error",this.#o);break;default:this.#K=r,this.#e("custommessage",r);break}}async#B(){return this.#c||(this.#c=new AudioContext({sampleRate:48e3})),this.#c.state==="suspended"&&await this.#c.resume(),this.#c}#se(){this.#c&&(this.#W(),this.#c.close().catch(()=>{}),this.#c=null,this.#A=!1)}async#te(e){if(this.#v)return this.#v;if(this.#T)return this.#T;if(this.#M)return e.destination;let r=this.#F,i=this.#ue(e,r);this.#v=i;try{return await i}finally{this.#v===i&&(this.#v=null)}}async#ue(e,r){try{let i=e.createMediaStreamDestination(),o=new Audio;return o.autoplay=!0,o.srcObject=i.stream,this.#s=o,this.#T=i,await this.#E(o,this.#$),this.#re(o,r)?(await o.play(),this.#re(o,r)?i:(this.#G(o),e.destination)):(this.#G(o),e.destination)}catch(i){return console.warn("[VoiceClient] HTMLAudioElement playback output unavailable; using default AudioContext destination.",i),this.#W(),this.#M=!0,e.destination}}#re(e,r){return this.#s===e&&this.#F===r}async#E(e,r){let i=this.#y,o=e.setSinkId;if(!o){if(i==="default"){this.#U(null);return}this.#U(fu);return}try{if(await o.call(e,i),r!==this.#$||i!==this.#y){this.#s===e&&await this.#E(e,this.#$);return}(this.#_===fu||this.#_===gu)&&this.#U(null)}catch{if(r!==this.#$||i!==this.#y){this.#s===e&&await this.#E(e,this.#$);return}this.#U(gu)}}#W(){this.#F++,this.#s&&(this.#G(this.#s),this.#s=null),this.#T=null,this.#v=null,this.#M=!1}#G(e){e.pause(),e.srcObject=null}async#le(e,r){try{let i=await this.#B(),o;if(this.#N==="pcm16"){let c=new Int16Array(e);o=i.createBuffer(1,c.length,this.#Z);let u=o.getChannelData(0);for(let s=0;s.3&&this.#W();let t=await this.#te(i);if(r!==this.#g)return;let n=i.createBufferSource();n.buffer=o,n.connect(t),this.#f.add(n),n.onended=()=>{this.#f.delete(n),r===this.#g&&!this.#b&&this.#f.size===0&&this.#m.length===0&&(this.#h=!1)};let a=Math.max(i.currentTime,this.#P);this.#P=a+o.duration,this.#j=this.#P,n.start(a)}catch(i){console.error("[VoiceClient] Audio playback error:",i)}}async#ne(){if(this.#b||this.#m.length===0)return;this.#b=!0,this.#h=!0;let e=this.#g;for(;e===this.#g&&this.#m.length>0;){let r=this.#m.shift();await this.#le(r,e)}e===this.#g&&(this.#b=!1,this.#f.size===0&&(this.#h=!1))}#D(){this.#g++;let e=[...this.#f];this.#f.clear();for(let r of e)try{r.stop()}catch{}this.#m=[],this.#h=!1,this.#b=!1,this.#P=0,this.#j=this.#c?this.#c.currentTime:null}async#de(){try{let e=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:{ideal:48e3},channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});this.#R=e;let r=await this.#B();if(!this.#A){let t=new Blob([Ap],{type:"application/javascript"}),n=URL.createObjectURL(t);await r.audioWorklet.addModule(n),URL.revokeObjectURL(n),this.#A=!0}let i=r.createMediaStreamSource(e),o=new AudioWorkletNode(r,"audio-capture-processor");this.#C=o,o.port.onmessage=t=>{if(t.data.type==="audio"&&!this.#u){let n=t.data.samples,a=Rp(n),c=Cp(n);this.#r?.connected&&this.#r.sendBinary(c),this.#ie(a)}},i.connect(o),o.connect(r.destination)}catch(e){console.error("[VoiceClient] Mic error:",e),this.#o="Microphone access denied. Please allow microphone access and try again.",this.#e("error",this.#o)}}#pe(){this.#C?.disconnect(),this.#C=null,this.#R?.getTracks().forEach(e=>e.stop()),this.#R=null,this.#oe()}#ie(e){this.#u||(this.#w=e,this.#e("audiolevelchange",e),this.#h&&e>this.#Y?(this.#x++,this.#x>=this.#Q&&(this.#D(),this.#x=0,this.#r?.connected&&this.#r.sendJSON({type:"interrupt"}))):this.#x=0,e>this.#H?(this.#p||(this.#p=!0,this.#r?.connected&&this.#r.sendJSON({type:"start_of_speech"})),this.#a&&(clearTimeout(this.#a),this.#a=null)):this.#p&&(this.#a||(this.#a=setTimeout(()=>{this.#p=!1,this.#a=null,this.#r?.connected&&this.#r.sendJSON({type:"end_of_speech"})},this.#X))))}#oe(){this.#a&&(clearTimeout(this.#a),this.#a=null),this.#p=!1,this.#x=0,this.#w=0,this.#e("audiolevelchange",0)}};var dt={};ae(dt,{$brand:()=>Kn,$input:()=>ha,$output:()=>ga,NEVER:()=>Gn,TimePrecision:()=>ba,ZodAny:()=>us,ZodArray:()=>ms,ZodBase64:()=>Pn,ZodBase64URL:()=>jn,ZodBigInt:()=>lt,ZodBigIntFormat:()=>Un,ZodBoolean:()=>ut,ZodCIDRv4:()=>Sn,ZodCIDRv6:()=>In,ZodCUID:()=>_n,ZodCUID2:()=>bn,ZodCatch:()=>Ns,ZodCodec:()=>Wt,ZodCustom:()=>Gt,ZodCustomStringFormat:()=>ct,ZodDate:()=>Mt,ZodDefault:()=>js,ZodDiscriminatedUnion:()=>gs,ZodE164:()=>Tn,ZodEmail:()=>hn,ZodEmoji:()=>vn,ZodEnum:()=>ot,ZodError:()=>_g,ZodExactOptional:()=>Ss,ZodFile:()=>ws,ZodFirstPartyTypeKind:()=>Ks,ZodFunction:()=>Bs,ZodGUID:()=>Zt,ZodIPv4:()=>wn,ZodIPv6:()=>zn,ZodISODate:()=>ln,ZodISODateTime:()=>un,ZodISODuration:()=>pn,ZodISOTime:()=>dn,ZodIntersection:()=>hs,ZodIssueCode:()=>yg,ZodJWT:()=>On,ZodKSUID:()=>kn,ZodLazy:()=>Fs,ZodLiteral:()=>ks,ZodMAC:()=>rs,ZodMap:()=>ys,ZodNaN:()=>Ls,ZodNanoID:()=>$n,ZodNever:()=>ds,ZodNonOptional:()=>An,ZodNull:()=>cs,ZodNullable:()=>Ps,ZodNumber:()=>st,ZodNumberFormat:()=>Oe,ZodObject:()=>Vt,ZodOptional:()=>Ln,ZodPipe:()=>Bt,ZodPrefault:()=>Os,ZodPreprocess:()=>As,ZodPromise:()=>Js,ZodReadonly:()=>Cs,ZodRealError:()=>W,ZodRecord:()=>it,ZodSet:()=>xs,ZodString:()=>at,ZodStringFormat:()=>j,ZodSuccess:()=>Ds,ZodSymbol:()=>os,ZodTemplateLiteral:()=>Ms,ZodTransform:()=>zs,ZodTuple:()=>$s,ZodType:()=>w,ZodULID:()=>yn,ZodURL:()=>Rt,ZodUUID:()=>ie,ZodUndefined:()=>as,ZodUnion:()=>Jt,ZodUnknown:()=>ls,ZodVoid:()=>ps,ZodXID:()=>xn,ZodXor:()=>fs,_ZodString:()=>gn,_default:()=>Ts,_function:()=>ip,any:()=>Nd,array:()=>Ft,base64:()=>$d,base64url:()=>_d,bigint:()=>Td,boolean:()=>is,catch:()=>Zs,check:()=>op,cidrv4:()=>hd,cidrv6:()=>vd,clone:()=>R,codec:()=>ep,coerce:()=>qs,config:()=>D,core:()=>ue,cuid:()=>sd,cuid2:()=>ud,custom:()=>ap,date:()=>Ld,decode:()=>qc,decodeAsync:()=>Xc,describe:()=>cp,discriminatedUnion:()=>Vd,e164:()=>bd,email:()=>Yl,emoji:()=>ad,encode:()=>Kc,encodeAsync:()=>Hc,endsWith:()=>Ke,enum:()=>Nn,exactOptional:()=>Is,file:()=>Hd,flattenError:()=>xt,float32:()=>Sd,float64:()=>Id,formatError:()=>kt,fromJSONSchema:()=>fp,function:()=>ip,getErrorMap:()=>kg,globalRegistry:()=>L,gt:()=>re,gte:()=>F,guid:()=>Ql,hash:()=>zd,hex:()=>wd,hostname:()=>kd,httpUrl:()=>od,includes:()=>We,instanceof:()=>up,int:()=>mn,int32:()=>Pd,int64:()=>Od,intersection:()=>vs,invertCodec:()=>tp,ipv4:()=>md,ipv6:()=>gd,iso:()=>nt,json:()=>dp,jwt:()=>yd,keyof:()=>Ad,ksuid:()=>pd,lazy:()=>Vs,length:()=>je,literal:()=>qd,locales:()=>Ot,looseObject:()=>Md,looseRecord:()=>Bd,lowercase:()=>Je,lt:()=>te,lte:()=>q,mac:()=>fd,map:()=>Wd,maxLength:()=>Pe,maxSize:()=>$e,meta:()=>sp,mime:()=>qe,minLength:()=>se,minSize:()=>ne,multipleOf:()=>ve,nan:()=>Qd,nanoid:()=>cd,nativeEnum:()=>Kd,negative:()=>Yr,never:()=>En,nonnegative:()=>en,nonoptional:()=>Es,nonpositive:()=>Qr,normalize:()=>He,null:()=>ss,nullable:()=>At,nullish:()=>Xd,number:()=>ns,object:()=>Cd,optional:()=>Lt,overwrite:()=>Y,parse:()=>Jc,parseAsync:()=>Bc,partialRecord:()=>Jd,pipe:()=>fn,positive:()=>Xr,prefault:()=>Us,preprocess:()=>pp,prettifyError:()=>ci,promise:()=>np,property:()=>tn,readonly:()=>Rs,record:()=>bs,refine:()=>Ws,regex:()=>Ve,regexes:()=>K,registry:()=>Tr,safeDecode:()=>Qc,safeDecodeAsync:()=>ts,safeEncode:()=>Yc,safeEncodeAsync:()=>es,safeParse:()=>Wc,safeParseAsync:()=>Gc,set:()=>Gd,setErrorMap:()=>xg,size:()=>Ie,slugify:()=>et,startsWith:()=>Ge,strictObject:()=>Rd,string:()=>Nt,stringFormat:()=>xd,stringbool:()=>lp,success:()=>Yd,superRefine:()=>Gs,symbol:()=>Ed,templateLiteral:()=>rp,toJSONSchema:()=>an,toLowerCase:()=>Ye,toUpperCase:()=>Qe,transform:()=>Zn,treeifyError:()=>ai,trim:()=>Xe,tuple:()=>_s,uint32:()=>jd,uint64:()=>Ud,ulid:()=>ld,undefined:()=>Dd,union:()=>Dn,unknown:()=>Te,uppercase:()=>Be,url:()=>id,util:()=>v,uuid:()=>ed,uuidv4:()=>td,uuidv6:()=>rd,uuidv7:()=>nd,void:()=>Zd,xid:()=>dd,xor:()=>Fd});var ue={};ae(ue,{$ZodAny:()=>Lo,$ZodArray:()=>Fo,$ZodAsyncError:()=>X,$ZodBase64:()=>Io,$ZodBase64URL:()=>Po,$ZodBigInt:()=>xr,$ZodBigIntFormat:()=>Eo,$ZodBoolean:()=>It,$ZodCIDRv4:()=>wo,$ZodCIDRv6:()=>zo,$ZodCUID:()=>po,$ZodCUID2:()=>mo,$ZodCatch:()=>aa,$ZodCheck:()=>T,$ZodCheckBigIntFormat:()=>Mi,$ZodCheckEndsWith:()=>Qi,$ZodCheckGreaterThan:()=>hr,$ZodCheckIncludes:()=>Xi,$ZodCheckLengthEquals:()=>Gi,$ZodCheckLessThan:()=>gr,$ZodCheckLowerCase:()=>qi,$ZodCheckMaxLength:()=>Bi,$ZodCheckMaxSize:()=>Fi,$ZodCheckMimeType:()=>to,$ZodCheckMinLength:()=>Wi,$ZodCheckMinSize:()=>Vi,$ZodCheckMultipleOf:()=>Ci,$ZodCheckNumberFormat:()=>Ri,$ZodCheckOverwrite:()=>ro,$ZodCheckProperty:()=>eo,$ZodCheckRegex:()=>Ki,$ZodCheckSizeEquals:()=>Ji,$ZodCheckStartsWith:()=>Yi,$ZodCheckStringFormat:()=>Me,$ZodCheckUpperCase:()=>Hi,$ZodCodec:()=>jt,$ZodCustom:()=>fa,$ZodCustomStringFormat:()=>Oo,$ZodDate:()=>Mo,$ZodDefault:()=>ra,$ZodDiscriminatedUnion:()=>Bo,$ZodE164:()=>jo,$ZodEmail:()=>co,$ZodEmoji:()=>uo,$ZodEncodeError:()=>pe,$ZodEnum:()=>Ho,$ZodError:()=>yt,$ZodExactOptional:()=>ea,$ZodFile:()=>Yo,$ZodFunction:()=>da,$ZodGUID:()=>oo,$ZodIPv4:()=>yo,$ZodIPv6:()=>xo,$ZodISODate:()=>$o,$ZodISODateTime:()=>vo,$ZodISODuration:()=>bo,$ZodISOTime:()=>_o,$ZodIntersection:()=>Wo,$ZodJWT:()=>To,$ZodKSUID:()=>ho,$ZodLazy:()=>ma,$ZodLiteral:()=>Xo,$ZodMAC:()=>ko,$ZodMap:()=>Ko,$ZodNaN:()=>ca,$ZodNanoID:()=>lo,$ZodNever:()=>Co,$ZodNonOptional:()=>ia,$ZodNull:()=>Zo,$ZodNullable:()=>ta,$ZodNumber:()=>yr,$ZodNumberFormat:()=>Uo,$ZodObject:()=>Gu,$ZodObjectJIT:()=>Vo,$ZodOptional:()=>wr,$ZodPipe:()=>zr,$ZodPrefault:()=>na,$ZodPreprocess:()=>sa,$ZodPromise:()=>pa,$ZodReadonly:()=>ua,$ZodRealError:()=>B,$ZodRecord:()=>Go,$ZodRegistry:()=>jr,$ZodSet:()=>qo,$ZodString:()=>Se,$ZodStringFormat:()=>P,$ZodSuccess:()=>oa,$ZodSymbol:()=>Do,$ZodTemplateLiteral:()=>la,$ZodTransform:()=>Qo,$ZodTuple:()=>kr,$ZodType:()=>k,$ZodULID:()=>fo,$ZodURL:()=>so,$ZodUUID:()=>ao,$ZodUndefined:()=>No,$ZodUnion:()=>Pt,$ZodUnknown:()=>Ao,$ZodVoid:()=>Ro,$ZodXID:()=>go,$ZodXor:()=>Jo,$brand:()=>Kn,$constructor:()=>l,$input:()=>ha,$output:()=>ga,Doc:()=>St,JSONSchema:()=>ql,JSONSchemaGenerator:()=>cn,NEVER:()=>Gn,TimePrecision:()=>ba,_any:()=>Ma,_array:()=>Ka,_base64:()=>Gr,_base64url:()=>Kr,_bigint:()=>Da,_boolean:()=>Ua,_catch:()=>dg,_check:()=>Kl,_cidrv4:()=>Br,_cidrv6:()=>Wr,_coercedBigint:()=>Na,_coercedBoolean:()=>Ea,_coercedDate:()=>Wa,_coercedNumber:()=>Sa,_coercedString:()=>$a,_cuid:()=>Ar,_cuid2:()=>Cr,_custom:()=>Ha,_date:()=>Ba,_decode:()=>ar,_decodeAsync:()=>sr,_default:()=>sg,_discriminatedUnion:()=>Hf,_e164:()=>qr,_email:()=>Or,_emoji:()=>Zr,_encode:()=>or,_encodeAsync:()=>cr,_endsWith:()=>Ke,_enum:()=>rg,_file:()=>qa,_float32:()=>Pa,_float64:()=>ja,_gt:()=>re,_gte:()=>F,_guid:()=>Ut,_includes:()=>We,_int:()=>Ia,_int32:()=>Ta,_int64:()=>Za,_intersection:()=>Xf,_ipv4:()=>Vr,_ipv6:()=>Jr,_isoDate:()=>xa,_isoDateTime:()=>ya,_isoDuration:()=>wa,_isoTime:()=>ka,_jwt:()=>Hr,_ksuid:()=>Fr,_lazy:()=>gg,_length:()=>je,_literal:()=>ig,_lowercase:()=>Je,_lt:()=>te,_lte:()=>q,_mac:()=>_a,_map:()=>eg,_max:()=>q,_maxLength:()=>Pe,_maxSize:()=>$e,_mime:()=>qe,_min:()=>F,_minLength:()=>se,_minSize:()=>ne,_multipleOf:()=>ve,_nan:()=>Ga,_nanoid:()=>Lr,_nativeEnum:()=>ng,_negative:()=>Yr,_never:()=>Va,_nonnegative:()=>en,_nonoptional:()=>ug,_nonpositive:()=>Qr,_normalize:()=>He,_null:()=>Ra,_nullable:()=>cg,_number:()=>za,_optional:()=>ag,_overwrite:()=>Y,_parse:()=>Le,_parseAsync:()=>Ae,_pipe:()=>pg,_positive:()=>Xr,_promise:()=>hg,_property:()=>tn,_readonly:()=>mg,_record:()=>Qf,_refine:()=>Xa,_regex:()=>Ve,_safeDecode:()=>lr,_safeDecodeAsync:()=>pr,_safeEncode:()=>ur,_safeEncodeAsync:()=>dr,_safeParse:()=>Ce,_safeParseAsync:()=>Re,_set:()=>tg,_size:()=>Ie,_slugify:()=>et,_startsWith:()=>Ge,_string:()=>va,_stringFormat:()=>tt,_stringbool:()=>tc,_success:()=>lg,_superRefine:()=>Ya,_symbol:()=>Aa,_templateLiteral:()=>fg,_toLowerCase:()=>Ye,_toUpperCase:()=>Qe,_transform:()=>og,_trim:()=>Xe,_tuple:()=>Yf,_uint32:()=>Oa,_uint64:()=>La,_ulid:()=>Rr,_undefined:()=>Ca,_union:()=>Kf,_unknown:()=>Fa,_uppercase:()=>Be,_url:()=>Et,_uuid:()=>Ur,_uuidv4:()=>Er,_uuidv6:()=>Dr,_uuidv7:()=>Nr,_void:()=>Ja,_xid:()=>Mr,_xor:()=>qf,clone:()=>R,config:()=>D,createStandardJSONSchemaMethod:()=>rt,createToJSONSchemaMethod:()=>rc,decode:()=>gm,decodeAsync:()=>vm,describe:()=>Qa,encode:()=>fm,encodeAsync:()=>hm,extractDefs:()=>be,finalize:()=>ye,flattenError:()=>xt,formatError:()=>kt,globalConfig:()=>ke,globalRegistry:()=>L,initializeContext:()=>_e,isValidBase64:()=>So,isValidBase64URL:()=>Vu,isValidJWT:()=>Ju,locales:()=>Ot,meta:()=>ec,parse:()=>nr,parseAsync:()=>ir,prettifyError:()=>ci,process:()=>S,regexes:()=>K,registry:()=>Tr,safeDecode:()=>_m,safeDecodeAsync:()=>ym,safeEncode:()=>$m,safeEncodeAsync:()=>bm,safeParse:()=>si,safeParseAsync:()=>ui,toDotPath:()=>xu,toJSONSchema:()=>an,treeifyError:()=>ai,util:()=>v,version:()=>no});var vu,Gn=Object.freeze({status:"aborted"});function l(e,r,i){function o(c,u){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:u,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(e))return;c._zod.traits.add(e),r(c,u);let s=a.prototype,d=Object.keys(s);for(let m=0;mi?.Parent&&c instanceof i.Parent?!0:c?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var Kn=Symbol("zod_brand"),X=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},pe=class extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}};(vu=globalThis).__zod_globalConfig??(vu.__zod_globalConfig={});var ke=globalThis.__zod_globalConfig;function D(e){return e&&Object.assign(ke,e),ke}var v={};ae(v,{BIGINT_FORMAT_RANGES:()=>ii,Class:()=>Hn,NUMBER_FORMAT_RANGES:()=>ni,aborted:()=>he,allowsEval:()=>Qn,assert:()=>Wp,assertEqual:()=>Fp,assertIs:()=>Jp,assertNever:()=>Bp,assertNotEqual:()=>Vp,assignProp:()=>fe,base64ToUint8Array:()=>_u,base64urlToUint8Array:()=>um,cached:()=>Ne,captureStackTrace:()=>rr,cleanEnum:()=>sm,cleanRegex:()=>vt,clone:()=>R,cloneDef:()=>Kp,createTransparentProxy:()=>em,defineLazy:()=>z,esc:()=>tr,escapeRegex:()=>H,explicitlyAborted:()=>oi,extend:()=>nm,finalizeIssue:()=>M,floatSafeRemainder:()=>Xn,getElementAtPath:()=>qp,getEnumValues:()=>ht,getLengthableOrigin:()=>bt,getParsedType:()=>Qp,getSizableOrigin:()=>_t,hexToUint8Array:()=>dm,isObject:()=>we,isPlainObject:()=>ge,issue:()=>Ze,joinValues:()=>p,jsonStringifyReplacer:()=>De,merge:()=>om,mergeDefs:()=>ce,normalizeParams:()=>_,nullish:()=>me,numKeys:()=>Yp,objectClone:()=>Gp,omit:()=>rm,optionalKeys:()=>ri,parsedType:()=>g,partial:()=>am,pick:()=>tm,prefixIssues:()=>J,primitiveTypes:()=>ti,promiseAllObject:()=>Hp,propertyKeyTypes:()=>$t,randomString:()=>Xp,required:()=>cm,safeExtend:()=>im,shallowClone:()=>ei,slugify:()=>Yn,stringifyPrimitive:()=>f,uint8ArrayToBase64:()=>bu,uint8ArrayToBase64url:()=>lm,uint8ArrayToHex:()=>pm,unwrapMessage:()=>gt});function Fp(e){return e}function Vp(e){return e}function Jp(e){}function Bp(e){throw new Error("Unexpected value in exhaustive check")}function Wp(e){}function ht(e){let r=Object.values(e).filter(o=>typeof o=="number");return Object.entries(e).filter(([o,t])=>r.indexOf(+o)===-1).map(([o,t])=>t)}function p(e,r="|"){return e.map(i=>f(i)).join(r)}function De(e,r){return typeof r=="bigint"?r.toString():r}function Ne(e){return{get value(){{let i=e();return Object.defineProperty(this,"value",{value:i}),i}throw new Error("cached value already set")}}}function me(e){return e==null}function vt(e){let r=e.startsWith("^")?1:0,i=e.endsWith("$")?e.length-1:e.length;return e.slice(r,i)}function Xn(e,r){let i=e/r,o=Math.round(i),t=Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-o)i?.[o],e):e}function Hp(e){let r=Object.keys(e),i=r.map(o=>e[o]);return Promise.all(i).then(o=>{let t={};for(let n=0;n{};function we(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Qn=Ne(()=>{if(ke.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function ge(e){if(we(e)===!1)return!1;let r=e.constructor;if(r===void 0||typeof r!="function")return!0;let i=r.prototype;return!(we(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function ei(e){return ge(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Yp(e){let r=0;for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&r++;return r}var Qp=e=>{let r=typeof e;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${r}`)}},$t=new Set(["string","number","symbol"]),ti=new Set(["string","number","bigint","boolean","symbol","undefined"]);function H(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function R(e,r,i){let o=new e._zod.constr(r??e._zod.def);return(!r||i?.parent)&&(o._zod.parent=e),o}function _(e){let r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function em(e){let r;return new Proxy({},{get(i,o,t){return r??(r=e()),Reflect.get(r,o,t)},set(i,o,t,n){return r??(r=e()),Reflect.set(r,o,t,n)},has(i,o){return r??(r=e()),Reflect.has(r,o)},deleteProperty(i,o){return r??(r=e()),Reflect.deleteProperty(r,o)},ownKeys(i){return r??(r=e()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(i,o){return r??(r=e()),Reflect.getOwnPropertyDescriptor(r,o)},defineProperty(i,o,t){return r??(r=e()),Reflect.defineProperty(r,o,t)}})}function f(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ri(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}var ni={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},ii={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function tm(e,r){let i=e._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let n=ce(e._zod.def,{get shape(){let a={};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(a[c]=i.shape[c])}return fe(this,"shape",a),a},checks:[]});return R(e,n)}function rm(e,r){let i=e._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let n=ce(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&delete a[c]}return fe(this,"shape",a),a},checks:[]});return R(e,n)}function nm(e,r){if(!ge(r))throw new Error("Invalid input to extend: expected a plain object");let i=e._zod.def.checks;if(i&&i.length>0){let n=e._zod.def.shape;for(let a in r)if(Object.getOwnPropertyDescriptor(n,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let t=ce(e._zod.def,{get shape(){let n={...e._zod.def.shape,...r};return fe(this,"shape",n),n}});return R(e,t)}function im(e,r){if(!ge(r))throw new Error("Invalid input to safeExtend: expected a plain object");let i=ce(e._zod.def,{get shape(){let o={...e._zod.def.shape,...r};return fe(this,"shape",o),o}});return R(e,i)}function om(e,r){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let i=ce(e._zod.def,{get shape(){let o={...e._zod.def.shape,...r._zod.def.shape};return fe(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:r._zod.def.checks??[]});return R(e,i)}function am(e,r,i){let t=r._zod.def.checks;if(t&&t.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=ce(r._zod.def,{get shape(){let c=r._zod.def.shape,u={...c};if(i)for(let s in i){if(!(s in c))throw new Error(`Unrecognized key: "${s}"`);i[s]&&(u[s]=e?new e({type:"optional",innerType:c[s]}):c[s])}else for(let s in c)u[s]=e?new e({type:"optional",innerType:c[s]}):c[s];return fe(this,"shape",u),u},checks:[]});return R(r,a)}function cm(e,r,i){let o=ce(r._zod.def,{get shape(){let t=r._zod.def.shape,n={...t};if(i)for(let a in i){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);i[a]&&(n[a]=new e({type:"nonoptional",innerType:t[a]}))}else for(let a in t)n[a]=new e({type:"nonoptional",innerType:t[a]});return fe(this,"shape",n),n}});return R(r,o)}function he(e,r=0){if(e.aborted===!0)return!0;for(let i=r;i{var o;return(o=i).path??(o.path=[]),i.path.unshift(e),i})}function gt(e){return typeof e=="string"?e:e?.message}function M(e,r,i){let o=e.message?e.message:gt(e.inst?._zod.def?.error?.(e))??gt(r?.error?.(e))??gt(i.customError?.(e))??gt(i.localeError?.(e))??"Invalid input",{inst:t,continue:n,input:a,...c}=e;return c.path??(c.path=[]),c.message=o,r?.reportInput&&(c.input=a),c}function _t(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function bt(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function g(e){let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let i=e;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return r}function Ze(...e){let[r,i,o]=e;return typeof r=="string"?{message:r,code:"custom",input:i,inst:o}:{...r}}function sm(e){return Object.entries(e).filter(([r,i])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function _u(e){let r=atob(e),i=new Uint8Array(r.length);for(let o=0;or.toString(16).padStart(2,"0")).join("")}var Hn=class{constructor(...r){}};var yu=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,De,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},yt=l("$ZodError",yu),B=l("$ZodError",yu,{Parent:Error});function xt(e,r=i=>i.message){let i={},o=[];for(let t of e.issues)t.path.length>0?(i[t.path[0]]=i[t.path[0]]||[],i[t.path[0]].push(r(t))):o.push(r(t));return{formErrors:o,fieldErrors:i}}function kt(e,r=i=>i.message){let i={_errors:[]},o=(t,n=[])=>{for(let a of t.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>o({issues:c},[...n,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...n,...a.path]);else{let c=[...n,...a.path];if(c.length===0)i._errors.push(r(a));else{let u=i,s=0;for(;si.message){let i={errors:[]},o=(t,n=[])=>{var a,c;for(let u of t.issues)if(u.code==="invalid_union"&&u.errors.length)u.errors.map(s=>o({issues:s},[...n,...u.path]));else if(u.code==="invalid_key")o({issues:u.issues},[...n,...u.path]);else if(u.code==="invalid_element")o({issues:u.issues},[...n,...u.path]);else{let s=[...n,...u.path];if(s.length===0){i.errors.push(r(u));continue}let d=i,m=0;for(;mtypeof o=="object"?o.key:o);for(let o of i)typeof o=="number"?r.push(`[${o}]`):typeof o=="symbol"?r.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?r.push(`[${JSON.stringify(o)}]`):(r.length&&r.push("."),r.push(o));return r.join("")}function ci(e){let r=[],i=[...e.issues].sort((o,t)=>(o.path??[]).length-(t.path??[]).length);for(let o of i)r.push(`\u2716 ${o.message}`),o.path?.length&&r.push(` \u2192 at ${xu(o.path)}`);return r.join(` -`)}var Le=e=>(r,i,o,t)=>{let n=o?{...o,async:!1}:{async:!1},a=r._zod.run({value:i,issues:[]},n);if(a instanceof Promise)throw new X;if(a.issues.length){let c=new(t?.Err??e)(a.issues.map(u=>M(u,n,D())));throw rr(c,t?.callee),c}return a.value},nr=Le(B),Ae=e=>async(r,i,o,t)=>{let n=o?{...o,async:!0}:{async:!0},a=r._zod.run({value:i,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(t?.Err??e)(a.issues.map(u=>M(u,n,D())));throw rr(c,t?.callee),c}return a.value},ir=Ae(B),Ce=e=>(r,i,o)=>{let t=o?{...o,async:!1}:{async:!1},n=r._zod.run({value:i,issues:[]},t);if(n instanceof Promise)throw new X;return n.issues.length?{success:!1,error:new(e??yt)(n.issues.map(a=>M(a,t,D())))}:{success:!0,data:n.value}},si=Ce(B),Re=e=>async(r,i,o)=>{let t=o?{...o,async:!0}:{async:!0},n=r._zod.run({value:i,issues:[]},t);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new e(n.issues.map(a=>M(a,t,D())))}:{success:!0,data:n.value}},ui=Re(B),or=e=>(r,i,o)=>{let t=o?{...o,direction:"backward"}:{direction:"backward"};return Le(e)(r,i,t)},fm=or(B),ar=e=>(r,i,o)=>Le(e)(r,i,o),gm=ar(B),cr=e=>async(r,i,o)=>{let t=o?{...o,direction:"backward"}:{direction:"backward"};return Ae(e)(r,i,t)},hm=cr(B),sr=e=>async(r,i,o)=>Ae(e)(r,i,o),vm=sr(B),ur=e=>(r,i,o)=>{let t=o?{...o,direction:"backward"}:{direction:"backward"};return Ce(e)(r,i,t)},$m=ur(B),lr=e=>(r,i,o)=>Ce(e)(r,i,o),_m=lr(B),dr=e=>async(r,i,o)=>{let t=o?{...o,direction:"backward"}:{direction:"backward"};return Re(e)(r,i,t)},bm=dr(B),pr=e=>async(r,i,o)=>Re(e)(r,i,o),ym=pr(B);var K={};ae(K,{base64:()=>zi,base64url:()=>mr,bigint:()=>Ui,boolean:()=>Di,browserEmail:()=>jm,cidrv4:()=>ki,cidrv6:()=>wi,cuid:()=>li,cuid2:()=>di,date:()=>Pi,datetime:()=>Ti,domain:()=>Um,duration:()=>hi,e164:()=>Ii,email:()=>$i,emoji:()=>_i,extendedDuration:()=>xm,guid:()=>vi,hex:()=>Em,hostname:()=>Om,html5Email:()=>Sm,httpProtocol:()=>Si,idnEmail:()=>Pm,integer:()=>Ei,ipv4:()=>bi,ipv6:()=>yi,ksuid:()=>fi,lowercase:()=>Li,mac:()=>xi,md5_base64:()=>Nm,md5_base64url:()=>Zm,md5_hex:()=>Dm,nanoid:()=>gi,null:()=>Ni,number:()=>fr,rfc5322Email:()=>Im,sha1_base64:()=>Am,sha1_base64url:()=>Cm,sha1_hex:()=>Lm,sha256_base64:()=>Mm,sha256_base64url:()=>Fm,sha256_hex:()=>Rm,sha384_base64:()=>Jm,sha384_base64url:()=>Bm,sha384_hex:()=>Vm,sha512_base64:()=>Gm,sha512_base64url:()=>Km,sha512_hex:()=>Wm,string:()=>Oi,time:()=>ji,ulid:()=>pi,undefined:()=>Zi,unicodeEmail:()=>ku,uppercase:()=>Ai,uuid:()=>ze,uuid4:()=>km,uuid6:()=>wm,uuid7:()=>zm,xid:()=>mi});var li=/^[cC][0-9a-z]{6,}$/,di=/^[0-9a-z]+$/,pi=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,mi=/^[0-9a-vA-V]{20}$/,fi=/^[A-Za-z0-9]{27}$/,gi=/^[a-zA-Z0-9_-]{21}$/,hi=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,xm=/^[-+]?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)?)??$/,vi=/^([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})$/,ze=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,km=ze(4),wm=ze(6),zm=ze(7),$i=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Sm=/^[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])?)*$/,Im=/^(([^<>()\[\]\\.,;:\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,}))$/,ku=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Pm=ku,jm=/^[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])?)*$/,Tm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function _i(){return new RegExp(Tm,"u")}var bi=/^(?:(?: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])$/,yi=/^(([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}|:))$/,xi=e=>{let r=H(e??":");return new RegExp(`^(?:[0-9A-F]{2}${r}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${r}){5}[0-9a-f]{2}$`)},ki=/^((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])$/,wi=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,zi=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,mr=/^[A-Za-z0-9_-]*$/,Om=/^(?=.{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])?)*\.?$/,Um=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Si=/^https?$/,Ii=/^\+[1-9]\d{6,14}$/,wu="(?:(?:\\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])))",Pi=new RegExp(`^${wu}$`);function zu(e){let r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function ji(e){return new RegExp(`^${zu(e)}$`)}function Ti(e){let r=zu({precision:e.precision}),i=["Z"];e.local&&i.push(""),e.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${r}(?:${i.join("|")})`;return new RegExp(`^${wu}T(?:${o})$`)}var Oi=e=>{let r=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},Ui=/^-?\d+n?$/,Ei=/^-?\d+$/,fr=/^-?\d+(?:\.\d+)?$/,Di=/^(?:true|false)$/i,Ni=/^null$/i;var Zi=/^undefined$/i;var Li=/^[^A-Z]*$/,Ai=/^[^a-z]*$/,Em=/^[0-9a-fA-F]*$/;function wt(e,r){return new RegExp(`^[A-Za-z0-9+/]{${e}}${r}$`)}function zt(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var Dm=/^[0-9a-fA-F]{32}$/,Nm=wt(22,"=="),Zm=zt(22),Lm=/^[0-9a-fA-F]{40}$/,Am=wt(27,"="),Cm=zt(27),Rm=/^[0-9a-fA-F]{64}$/,Mm=wt(43,"="),Fm=zt(43),Vm=/^[0-9a-fA-F]{96}$/,Jm=wt(64,""),Bm=zt(64),Wm=/^[0-9a-fA-F]{128}$/,Gm=wt(86,"=="),Km=zt(86);var T=l("$ZodCheck",(e,r)=>{var i;e._zod??(e._zod={}),e._zod.def=r,(i=e._zod).onattach??(i.onattach=[])}),Iu={number:"number",bigint:"bigint",object:"date"},gr=l("$ZodCheckLessThan",(e,r)=>{T.init(e,r);let i=Iu[typeof r.value];e._zod.onattach.push(o=>{let t=o._zod.bag,n=(r.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value{(r.inclusive?o.value<=r.value:o.value{T.init(e,r);let i=Iu[typeof r.value];e._zod.onattach.push(o=>{let t=o._zod.bag,n=(r.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>n&&(r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value)}),e._zod.check=o=>{(r.inclusive?o.value>=r.value:o.value>r.value)||o.issues.push({origin:i,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Ci=l("$ZodCheckMultipleOf",(e,r)=>{T.init(e,r),e._zod.onattach.push(i=>{var o;(o=i._zod.bag).multipleOf??(o.multipleOf=r.value)}),e._zod.check=i=>{if(typeof i.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%r.value===BigInt(0):Xn(i.value,r.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:r.value,input:i.value,inst:e,continue:!r.abort})}}),Ri=l("$ZodCheckNumberFormat",(e,r)=>{T.init(e,r),r.format=r.format||"float64";let i=r.format?.includes("int"),o=i?"int":"number",[t,n]=ni[r.format];e._zod.onattach.push(a=>{let c=a._zod.bag;c.format=r.format,c.minimum=t,c.maximum=n,i&&(c.pattern=Ei)}),e._zod.check=a=>{let c=a.value;if(i){if(!Number.isInteger(c)){a.issues.push({expected:o,format:r.format,code:"invalid_type",continue:!1,input:c,inst:e});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!r.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:o,inclusive:!0,continue:!r.abort});return}}cn&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:n,inclusive:!0,inst:e,continue:!r.abort})}}),Mi=l("$ZodCheckBigIntFormat",(e,r)=>{T.init(e,r);let[i,o]=ii[r.format];e._zod.onattach.push(t=>{let n=t._zod.bag;n.format=r.format,n.minimum=i,n.maximum=o}),e._zod.check=t=>{let n=t.value;no&&t.issues.push({origin:"bigint",input:n,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!r.abort})}}),Fi=l("$ZodCheckMaxSize",(e,r)=>{var i;T.init(e,r),(i=e._zod.def).when??(i.when=o=>{let t=o.value;return!me(t)&&t.size!==void 0}),e._zod.onattach.push(o=>{let t=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum{let t=o.value;t.size<=r.maximum||o.issues.push({origin:_t(t),code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),Vi=l("$ZodCheckMinSize",(e,r)=>{var i;T.init(e,r),(i=e._zod.def).when??(i.when=o=>{let t=o.value;return!me(t)&&t.size!==void 0}),e._zod.onattach.push(o=>{let t=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(o._zod.bag.minimum=r.minimum)}),e._zod.check=o=>{let t=o.value;t.size>=r.minimum||o.issues.push({origin:_t(t),code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),Ji=l("$ZodCheckSizeEquals",(e,r)=>{var i;T.init(e,r),(i=e._zod.def).when??(i.when=o=>{let t=o.value;return!me(t)&&t.size!==void 0}),e._zod.onattach.push(o=>{let t=o._zod.bag;t.minimum=r.size,t.maximum=r.size,t.size=r.size}),e._zod.check=o=>{let t=o.value,n=t.size;if(n===r.size)return;let a=n>r.size;o.issues.push({origin:_t(t),...a?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!r.abort})}}),Bi=l("$ZodCheckMaxLength",(e,r)=>{var i;T.init(e,r),(i=e._zod.def).when??(i.when=o=>{let t=o.value;return!me(t)&&t.length!==void 0}),e._zod.onattach.push(o=>{let t=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum{let t=o.value;if(t.length<=r.maximum)return;let a=bt(t);o.issues.push({origin:a,code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),Wi=l("$ZodCheckMinLength",(e,r)=>{var i;T.init(e,r),(i=e._zod.def).when??(i.when=o=>{let t=o.value;return!me(t)&&t.length!==void 0}),e._zod.onattach.push(o=>{let t=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(o._zod.bag.minimum=r.minimum)}),e._zod.check=o=>{let t=o.value;if(t.length>=r.minimum)return;let a=bt(t);o.issues.push({origin:a,code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),Gi=l("$ZodCheckLengthEquals",(e,r)=>{var i;T.init(e,r),(i=e._zod.def).when??(i.when=o=>{let t=o.value;return!me(t)&&t.length!==void 0}),e._zod.onattach.push(o=>{let t=o._zod.bag;t.minimum=r.length,t.maximum=r.length,t.length=r.length}),e._zod.check=o=>{let t=o.value,n=t.length;if(n===r.length)return;let a=bt(t),c=n>r.length;o.issues.push({origin:a,...c?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!r.abort})}}),Me=l("$ZodCheckStringFormat",(e,r)=>{var i,o;T.init(e,r),e._zod.onattach.push(t=>{let n=t._zod.bag;n.format=r.format,r.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(r.pattern))}),r.pattern?(i=e._zod).check??(i.check=t=>{r.pattern.lastIndex=0,!r.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:r.format,input:t.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(o=e._zod).check??(o.check=()=>{})}),Ki=l("$ZodCheckRegex",(e,r)=>{Me.init(e,r),e._zod.check=i=>{r.pattern.lastIndex=0,!r.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),qi=l("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=Li),Me.init(e,r)}),Hi=l("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=Ai),Me.init(e,r)}),Xi=l("$ZodCheckIncludes",(e,r)=>{T.init(e,r);let i=H(r.includes),o=new RegExp(typeof r.position=="number"?`^.{${r.position}}${i}`:i);r.pattern=o,e._zod.onattach.push(t=>{let n=t._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),e._zod.check=t=>{t.value.includes(r.includes,r.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),Yi=l("$ZodCheckStartsWith",(e,r)=>{T.init(e,r);let i=new RegExp(`^${H(r.prefix)}.*`);r.pattern??(r.pattern=i),e._zod.onattach.push(o=>{let t=o._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=o=>{o.value.startsWith(r.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:o.value,inst:e,continue:!r.abort})}}),Qi=l("$ZodCheckEndsWith",(e,r)=>{T.init(e,r);let i=new RegExp(`.*${H(r.suffix)}$`);r.pattern??(r.pattern=i),e._zod.onattach.push(o=>{let t=o._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(i)}),e._zod.check=o=>{o.value.endsWith(r.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:o.value,inst:e,continue:!r.abort})}});function Su(e,r,i){e.issues.length&&r.issues.push(...J(i,e.issues))}var eo=l("$ZodCheckProperty",(e,r)=>{T.init(e,r),e._zod.check=i=>{let o=r.schema._zod.run({value:i.value[r.property],issues:[]},{});if(o instanceof Promise)return o.then(t=>Su(t,i,r.property));Su(o,i,r.property)}}),to=l("$ZodCheckMimeType",(e,r)=>{T.init(e,r);let i=new Set(r.mime);e._zod.onattach.push(o=>{o._zod.bag.mime=r.mime}),e._zod.check=o=>{i.has(o.value.type)||o.issues.push({code:"invalid_value",values:r.mime,input:o.value.type,inst:e,continue:!r.abort})}}),ro=l("$ZodCheckOverwrite",(e,r)=>{T.init(e,r),e._zod.check=i=>{i.value=r.tx(i.value)}});var St=class{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let o=r.split(` -`).filter(a=>a),t=Math.min(...o.map(a=>a.length-a.trimStart().length)),n=o.map(a=>a.slice(t)).map(a=>" ".repeat(this.indent*2)+a);for(let a of n)this.content.push(a)}compile(){let r=Function,i=this?.args,t=[...(this?.content??[""]).map(n=>` ${n}`)];return new r(...i,t.join(` -`))}};var no={major:4,minor:4,patch:3};var k=l("$ZodType",(e,r)=>{var i;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=no;let o=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&o.unshift(e);for(let t of o)for(let n of t._zod.onattach)n(e);if(o.length===0)(i=e._zod).deferred??(i.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(a,c,u)=>{let s=he(a),d;for(let m of c){if(m._zod.def.when){if(oi(a)||!m._zod.def.when(a))continue}else if(s)continue;let $=a.issues.length,h=m._zod.check(a);if(h instanceof Promise&&u?.async===!1)throw new X;if(d||h instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await h,a.issues.length!==$&&(s||(s=he(a,$)))});else{if(a.issues.length===$)continue;s||(s=he(a,$))}}return d?d.then(()=>a):a},n=(a,c,u)=>{if(he(a))return a.aborted=!0,a;let s=t(c,o,u);if(s instanceof Promise){if(u.async===!1)throw new X;return s.then(d=>e._zod.parse(d,u))}return e._zod.parse(s,u)};e._zod.run=(a,c)=>{if(c.skipChecks)return e._zod.parse(a,c);if(c.direction==="backward"){let s=e._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return s instanceof Promise?s.then(d=>n(d,a,c)):n(s,a,c)}let u=e._zod.parse(a,c);if(u instanceof Promise){if(c.async===!1)throw new X;return u.then(s=>t(s,o,c))}return t(u,o,c)}}z(e,"~standard",()=>({validate:t=>{try{let n=si(e,t);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return ui(e,t).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Se=l("$ZodString",(e,r)=>{k.init(e,r),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Oi(e._zod.bag),e._zod.parse=(i,o)=>{if(r.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:e}),i}}),P=l("$ZodStringFormat",(e,r)=>{Me.init(e,r),Se.init(e,r)}),oo=l("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=vi),P.init(e,r)}),ao=l("$ZodUUID",(e,r)=>{if(r.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=ze(o))}else r.pattern??(r.pattern=ze());P.init(e,r)}),co=l("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=$i),P.init(e,r)}),so=l("$ZodURL",(e,r)=>{P.init(e,r),e._zod.check=i=>{try{let o=i.value.trim();if(!r.normalize&&r.protocol?.source===Si.source&&!/^https?:\/\//i.test(o)){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:e,continue:!r.abort});return}let t=new URL(o);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(t.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:i.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:i.value,inst:e,continue:!r.abort})),r.normalize?i.value=t.href:i.value=o;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:e,continue:!r.abort})}}}),uo=l("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=_i()),P.init(e,r)}),lo=l("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=gi),P.init(e,r)}),po=l("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=li),P.init(e,r)}),mo=l("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=di),P.init(e,r)}),fo=l("$ZodULID",(e,r)=>{r.pattern??(r.pattern=pi),P.init(e,r)}),go=l("$ZodXID",(e,r)=>{r.pattern??(r.pattern=mi),P.init(e,r)}),ho=l("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=fi),P.init(e,r)}),vo=l("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=Ti(r)),P.init(e,r)}),$o=l("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=Pi),P.init(e,r)}),_o=l("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=ji(r)),P.init(e,r)}),bo=l("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=hi),P.init(e,r)}),yo=l("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=bi),P.init(e,r),e._zod.bag.format="ipv4"}),xo=l("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=yi),P.init(e,r),e._zod.bag.format="ipv6",e._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:e,continue:!r.abort})}}}),ko=l("$ZodMAC",(e,r)=>{r.pattern??(r.pattern=xi(r.delimiter)),P.init(e,r),e._zod.bag.format="mac"}),wo=l("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=ki),P.init(e,r)}),zo=l("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=wi),P.init(e,r),e._zod.check=i=>{let o=i.value.split("/");try{if(o.length!==2)throw new Error;let[t,n]=o;if(!n)throw new Error;let a=Number(n);if(`${a}`!==n)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${t}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:e,continue:!r.abort})}}});function So(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var Io=l("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=zi),P.init(e,r),e._zod.bag.contentEncoding="base64",e._zod.check=i=>{So(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:e,continue:!r.abort})}});function Vu(e){if(!mr.test(e))return!1;let r=e.replace(/[-_]/g,o=>o==="-"?"+":"/"),i=r.padEnd(Math.ceil(r.length/4)*4,"=");return So(i)}var Po=l("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=mr),P.init(e,r),e._zod.bag.contentEncoding="base64url",e._zod.check=i=>{Vu(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:e,continue:!r.abort})}}),jo=l("$ZodE164",(e,r)=>{r.pattern??(r.pattern=Ii),P.init(e,r)});function Ju(e,r=null){try{let i=e.split(".");if(i.length!==3)return!1;let[o]=i;if(!o)return!1;let t=JSON.parse(atob(o));return!("typ"in t&&t?.typ!=="JWT"||!t.alg||r&&(!("alg"in t)||t.alg!==r))}catch{return!1}}var To=l("$ZodJWT",(e,r)=>{P.init(e,r),e._zod.check=i=>{Ju(i.value,r.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:e,continue:!r.abort})}}),Oo=l("$ZodCustomStringFormat",(e,r)=>{P.init(e,r),e._zod.check=i=>{r.fn(i.value)||i.issues.push({code:"invalid_format",format:r.format,input:i.value,inst:e,continue:!r.abort})}}),yr=l("$ZodNumber",(e,r)=>{k.init(e,r),e._zod.pattern=e._zod.bag.pattern??fr,e._zod.parse=(i,o)=>{if(r.coerce)try{i.value=Number(i.value)}catch{}let t=i.value;if(typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t))return i;let n=typeof t=="number"?Number.isNaN(t)?"NaN":Number.isFinite(t)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:t,inst:e,...n?{received:n}:{}}),i}}),Uo=l("$ZodNumberFormat",(e,r)=>{Ri.init(e,r),yr.init(e,r)}),It=l("$ZodBoolean",(e,r)=>{k.init(e,r),e._zod.pattern=Di,e._zod.parse=(i,o)=>{if(r.coerce)try{i.value=!!i.value}catch{}let t=i.value;return typeof t=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),i}}),xr=l("$ZodBigInt",(e,r)=>{k.init(e,r),e._zod.pattern=Ui,e._zod.parse=(i,o)=>{if(r.coerce)try{i.value=BigInt(i.value)}catch{}return typeof i.value=="bigint"||i.issues.push({expected:"bigint",code:"invalid_type",input:i.value,inst:e}),i}}),Eo=l("$ZodBigIntFormat",(e,r)=>{Mi.init(e,r),xr.init(e,r)}),Do=l("$ZodSymbol",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>{let t=i.value;return typeof t=="symbol"||i.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),i}}),No=l("$ZodUndefined",(e,r)=>{k.init(e,r),e._zod.pattern=Zi,e._zod.values=new Set([void 0]),e._zod.parse=(i,o)=>{let t=i.value;return typeof t>"u"||i.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),i}}),Zo=l("$ZodNull",(e,r)=>{k.init(e,r),e._zod.pattern=Ni,e._zod.values=new Set([null]),e._zod.parse=(i,o)=>{let t=i.value;return t===null||i.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),i}}),Lo=l("$ZodAny",(e,r)=>{k.init(e,r),e._zod.parse=i=>i}),Ao=l("$ZodUnknown",(e,r)=>{k.init(e,r),e._zod.parse=i=>i}),Co=l("$ZodNever",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:e}),i)}),Ro=l("$ZodVoid",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>{let t=i.value;return typeof t>"u"||i.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),i}}),Mo=l("$ZodDate",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>{if(r.coerce)try{i.value=new Date(i.value)}catch{}let t=i.value,n=t instanceof Date;return n&&!Number.isNaN(t.getTime())||i.issues.push({expected:"date",code:"invalid_type",input:t,...n?{received:"Invalid Date"}:{},inst:e}),i}});function ju(e,r,i){e.issues.length&&r.issues.push(...J(i,e.issues)),r.value[i]=e.value}var Fo=l("$ZodArray",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>{let t=i.value;if(!Array.isArray(t))return i.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),i;i.value=Array(t.length);let n=[];for(let a=0;aju(s,i,a))):ju(u,i,a)}return n.length?Promise.all(n).then(()=>i):i}});function br(e,r,i,o,t,n){let a=i in o;if(e.issues.length){if(t&&n&&!a)return;r.issues.push(...J(i,e.issues))}if(!a&&!t){e.issues.length||r.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}e.value===void 0?a&&(r.value[i]=void 0):r.value[i]=e.value}function Bu(e){let r=Object.keys(e.shape);for(let o of r)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let i=ri(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(i)}}function Wu(e,r,i,o,t,n){let a=[],c=t.keySet,u=t.catchall._zod,s=u.def.type,d=u.optin==="optional",m=u.optout==="optional";for(let $ in r){if($==="__proto__"||c.has($))continue;if(s==="never"){a.push($);continue}let h=u.run({value:r[$],issues:[]},o);h instanceof Promise?e.push(h.then(x=>br(x,i,$,r,d,m))):br(h,i,$,r,d,m)}return a.length&&i.issues.push({code:"unrecognized_keys",keys:a,input:r,inst:n}),e.length?Promise.all(e).then(()=>i):i}var Gu=l("$ZodObject",(e,r)=>{if(k.init(e,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){let c=r.shape;Object.defineProperty(r,"shape",{get:()=>{let u={...c};return Object.defineProperty(r,"shape",{value:u}),u}})}let o=Ne(()=>Bu(r));z(e._zod,"propValues",()=>{let c=r.shape,u={};for(let s in c){let d=c[s]._zod;if(d.values){u[s]??(u[s]=new Set);for(let m of d.values)u[s].add(m)}}return u});let t=we,n=r.catchall,a;e._zod.parse=(c,u)=>{a??(a=o.value);let s=c.value;if(!t(s))return c.issues.push({expected:"object",code:"invalid_type",input:s,inst:e}),c;c.value={};let d=[],m=a.shape;for(let $ of a.keys){let h=m[$],x=h._zod.optin==="optional",N=h._zod.optout==="optional",U=h._zod.run({value:s[$],issues:[]},u);U instanceof Promise?d.push(U.then(ft=>br(ft,c,$,s,x,N))):br(U,c,$,s,x,N)}return n?Wu(d,s,c,u,o.value,e):d.length?Promise.all(d).then(()=>c):c}}),Vo=l("$ZodObjectJIT",(e,r)=>{Gu.init(e,r);let i=e._zod.parse,o=Ne(()=>Bu(r)),t=$=>{let h=new St(["shape","payload","ctx"]),x=o.value,N=ee=>{let E=tr(ee);return`shape[${E}]._zod.run({ value: input[${E}], issues: [] }, ctx)`};h.write("const input = payload.value;");let U=Object.create(null),ft=0;for(let ee of x.keys)U[ee]=`key_${ft++}`;h.write("const newResult = {};");for(let ee of x.keys){let E=U[ee],Z=tr(ee),ou=$[ee],au=ou?._zod?.optin==="optional",Ip=ou?._zod?.optout==="optional";h.write(`const ${E} = ${N(ee)};`),au&&Ip?h.write(` - if (${E}.issues.length) { - if (${Z} in input) { - payload.issues = payload.issues.concat(${E}.issues.map(iss => ({ +`;function Ag(e){let r=new ArrayBuffer(e.length*2),n=new DataView(r);for(let i=0;ithis.onopen?.(),e.onclose=()=>this.onclose?.(),e.onerror=()=>this.onerror?.(),e.onmessage=r=>{this.onmessage?.(r.data)},this.#n=e}disconnect(){this.#n?.close(),this.#n=null}},Gu=class{#n="idle";#t=[];#k=null;#w=0;#l=!1;#S=!1;#o=null;#x=null;#G=null;#N=null;#Z=16e3;#z=null;#K=null;#u=!1;#I=0;#d=!1;#H;#X;#Y;#Q;#A;#r=null;#i;#s=null;#L=!1;#C=null;#R=null;#a=null;#p=!1;#f=[];#h=!1;#y=!1;#m=new Set;#T=0;#P=null;#c=null;#E=null;#v=null;#M=!1;#$;#b=0;#F=0;#g=0;#_=0;#O=new Map;constructor(e){this.#i=e,this.#H=e.silenceThreshold??.04,this.#X=e.silenceDurationMs??500,this.#Y=e.interruptThreshold??.05,this.#Q=e.interruptChunks??2,this.#A=e.maxTranscriptMessages??200,this.#$=e.outputDeviceId??"default"}get status(){return this.#n}get transcript(){return this.#t}get metrics(){return this.#k}get audioLevel(){return this.#w}get isMuted(){return this.#l}get connected(){return this.#S}get error(){return this.#o}get outputDeviceError(){return this.#x}get interimTranscript(){return this.#z}get serverProtocolVersion(){return this.#K}addEventListener(e,r){let n=this.#O.get(e);n||(n=new Set,this.#O.set(e,n)),n.add(r)}removeEventListener(e,r){this.#O.get(e)?.delete(r)}#e(e,r){let n=this.#O.get(e);if(n)for(let i of n)i(r)}#ee(){this.#t.length>this.#A&&(this.#t=this.#t.slice(-this.#A))}#j(e){this.#x!==e&&(this.#x=e,this.#e("outputdeviceerror",e))}connect(){if(this.#r)return;let e=this.#i.transport??new Cg({agent:this.#i.agent,name:this.#i.name,host:this.#i.host,query:this.#i.query});e.onopen=()=>{this.#S=!0,this.#o=null,e.sendJSON({type:"hello",protocol_version:1}),this.#e("connectionchange",!0),this.#e("error",null),this.#u&&(this.#d=!1,e.sendJSON({type:"start_call"}))},e.onclose=()=>{this.#S=!1,this.#e("connectionchange",!1)},e.onerror=()=>{this.#o="Connection lost. Reconnecting...",this.#e("error",this.#o)},e.onmessage=r=>{typeof r=="string"?this.#se(r):r instanceof Blob?r.arrayBuffer().then(n=>{this.#f.push(n),this.#ne()}):r instanceof ArrayBuffer&&(this.#f.push(r),this.#ne())},this.#r=e,e.connect()}disconnect(){this.endCall(),this.#r?.disconnect(),this.#r=null,this.#S=!1,this.#e("connectionchange",!1)}async startCall(){if(!this.#r?.connected){this.#o="Cannot start call: not connected. Call connect() first.",this.#e("error",this.#o);return}if(this.#u)return;let e=++this.#I;this.#u=!0,this.#d=!1,this.#o=null,this.#k=null,this.#e("error",null),this.#e("metricschange",null);let r={type:"start_call"};this.#i.preferredFormat&&(r.preferred_format=this.#i.preferredFormat),this.#r.sendJSON(r);let n=await this.#B();this.#V(e)||(await this.#te(n),!this.#V(e)&&(this.#i.audioInput?(this.#i.audioInput.onAudioLevel=i=>this.#ie(i),this.#i.audioInput.onAudioData=i=>{this.#r?.connected&&!this.#l&&this.#r.sendBinary(i)},await this.#i.audioInput.start()):await this.#de(),this.#V(e)))}endCall(){this.#I++,this.#u=!1,this.#d=!1,this.#r?.connected&&this.#r.sendJSON({type:"end_call"}),this.#J(),this.#n="idle",this.#e("statuschange","idle")}#ae(e){return this.#u&&this.#I===e}#V(e){return this.#ae(e)?!1:(this.#u||this.#J(),!0)}#J(){this.#i.audioInput?(this.#i.audioInput.stop(),this.#i.audioInput.onAudioLevel=null,this.#i.audioInput.onAudioData=null):this.#pe(),this.#D(),this.#ce(),this.#oe()}toggleMute(){this.#l=!this.#l,this.#l&&(this.#w=0,this.#e("audiolevelchange",0)),this.#l&&this.#p&&(this.#p=!1,this.#a&&(clearTimeout(this.#a),this.#a=null),this.#r?.connected&&this.#r.sendJSON({type:"end_of_speech"})),this.#e("mutechange",this.#l)}sendText(e){this.#r?.connected&&this.#r.sendJSON({type:"text_message",text:e})}sendJSON(e){this.#r?.connected&&this.#r.sendJSON(e)}async setOutputDevice(e){this.#$=e??"default";let r=++this.#b;this.#c&&await this.#U(this.#c,r)}get lastCustomMessage(){return this.#G}get audioFormat(){return this.#N}get sampleRate(){return this.#Z}#se(e){let r;try{r=JSON.parse(e)}catch{return}switch(r.type){case"welcome":this.#K=r.protocol_version,r.protocol_version!==1&&console.warn(`[VoiceClient] Protocol version mismatch: client=1, server=${r.protocol_version}`);break;case"audio_config":this.#d=!0,this.#N=r.format,this.#Z=typeof r.sampleRate=="number"&&r.sampleRate>0?r.sampleRate:16e3;break;case"status":if(this.#n=r.status,r.status==="idle"&&this.#u){if(!(this.#d||this.#o!==null)){this.#e("statuschange",this.#n);break}this.#I++,this.#u=!1,this.#d=!1,this.#J()}r.status==="listening"?(this.#d=!0,this.#o=null,this.#e("error",null)):(r.status==="thinking"||r.status==="speaking")&&(this.#d=!0),this.#e("statuschange",this.#n);break;case"transcript_interim":this.#z=r.text,this.#e("interimtranscript",this.#z);break;case"playback_interrupt":this.#D();break;case"transcript":this.#z=null,this.#e("interimtranscript",null),r.role==="user"&&this.#h&&this.#D(),this.#t=[...this.#t,{role:r.role,text:r.text,timestamp:Date.now()}],this.#ee(),this.#e("transcriptchange",this.#t);break;case"transcript_start":this.#t=[...this.#t,{role:"assistant",text:"",timestamp:Date.now()}],this.#ee(),this.#e("transcriptchange",this.#t);break;case"transcript_delta":{if(this.#t.length===0)break;let n=[...this.#t],i=n[n.length-1];i.role==="assistant"&&(n[n.length-1]={...i,text:i.text+r.text},this.#t=n,this.#e("transcriptchange",this.#t));break}case"transcript_end":{if(this.#t.length===0)break;let n=[...this.#t],i=n[n.length-1];i.role==="assistant"&&(n[n.length-1]={...i,text:r.text},this.#t=n,this.#e("transcriptchange",this.#t));break}case"metrics":this.#k={llm_ms:r.llm_ms,tts_ms:r.tts_ms,first_audio_ms:r.first_audio_ms,total_ms:r.total_ms},this.#e("metricschange",this.#k);break;case"error":this.#o=r.message,this.#e("error",this.#o);break;default:this.#G=r,this.#e("custommessage",r);break}}async#B(){return this.#s||(this.#s=new AudioContext({sampleRate:48e3})),this.#s.state==="suspended"&&await this.#s.resume(),this.#s}#ce(){this.#s&&(this.#W(),this.#s.close().catch(()=>{}),this.#s=null,this.#L=!1)}async#te(e){if(this.#v)return this.#v;if(this.#E)return this.#E;if(this.#M)return e.destination;let r=this.#F,n=this.#le(e,r);this.#v=n;try{return await n}finally{this.#v===n&&(this.#v=null)}}async#le(e,r){try{let n=e.createMediaStreamDestination(),i=new Audio;return i.autoplay=!0,i.srcObject=n.stream,this.#c=i,this.#E=n,await this.#U(i,this.#b),this.#re(i,r)?(await i.play(),this.#re(i,r)?n:(this.#q(i),e.destination)):(this.#q(i),e.destination)}catch(n){return console.warn("[VoiceClient] HTMLAudioElement playback output unavailable; using default AudioContext destination.",n),this.#W(),this.#M=!0,e.destination}}#re(e,r){return this.#c===e&&this.#F===r}async#U(e,r){let n=this.#$,i=e.setSinkId;if(!i){if(n==="default"){this.#j(null);return}this.#j(Wu);return}try{if(await i.call(e,n),r!==this.#b||n!==this.#$){this.#c===e&&await this.#U(e,this.#b);return}(this.#x===Wu||this.#x===qu)&&this.#j(null)}catch{if(r!==this.#b||n!==this.#$){this.#c===e&&await this.#U(e,this.#b);return}this.#j(qu)}}#W(){this.#F++,this.#c&&(this.#q(this.#c),this.#c=null),this.#E=null,this.#v=null,this.#M=!1}#q(e){e.pause(),e.srcObject=null}async#ue(e,r){try{let n=await this.#B(),i;if(this.#N==="pcm16"){let s=new Int16Array(e);i=n.createBuffer(1,s.length,this.#Z);let c=i.getChannelData(0);for(let l=0;l.3&&this.#W();let t=await this.#te(n);if(r!==this.#g)return;let o=n.createBufferSource();o.buffer=i,o.connect(t),this.#m.add(o),o.onended=()=>{this.#m.delete(o),r===this.#g&&!this.#y&&this.#m.size===0&&this.#f.length===0&&(this.#h=!1)};let a=Math.max(n.currentTime,this.#T);this.#T=a+i.duration,this.#P=this.#T,o.start(a)}catch(n){console.error("[VoiceClient] Audio playback error:",n)}}async#ne(){if(this.#y||this.#f.length===0)return;this.#y=!0,this.#h=!0;let e=this.#g;for(;e===this.#g&&this.#f.length>0;){let r=this.#f.shift();await this.#ue(r,e)}e===this.#g&&(this.#y=!1,this.#m.size===0&&(this.#h=!1))}#D(){this.#g++;let e=[...this.#m];this.#m.clear();for(let r of e)try{r.stop()}catch{}this.#f=[],this.#h=!1,this.#y=!1,this.#T=0,this.#P=this.#s?this.#s.currentTime:null}async#de(){try{let e=await navigator.mediaDevices.getUserMedia({audio:{sampleRate:{ideal:48e3},channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});this.#R=e;let r=await this.#B();if(!this.#L){let t=new Blob([Zg],{type:"application/javascript"}),o=URL.createObjectURL(t);await r.audioWorklet.addModule(o),URL.revokeObjectURL(o),this.#L=!0}let n=r.createMediaStreamSource(e),i=new AudioWorkletNode(r,"audio-capture-processor");this.#C=i,i.port.onmessage=t=>{if(t.data.type==="audio"&&!this.#l){let o=t.data.samples,a=Lg(o),s=Ag(o);this.#r?.connected&&this.#r.sendBinary(s),this.#ie(a)}},n.connect(i),i.connect(r.destination)}catch(e){console.error("[VoiceClient] Mic error:",e),this.#o="Microphone access denied. Please allow microphone access and try again.",this.#e("error",this.#o)}}#pe(){this.#C?.disconnect(),this.#C=null,this.#R?.getTracks().forEach(e=>e.stop()),this.#R=null,this.#oe()}#ie(e){this.#l||(this.#w=e,this.#e("audiolevelchange",e),this.#h&&e>this.#Y?(this.#_++,this.#_>=this.#Q&&(this.#D(),this.#_=0,this.#r?.connected&&this.#r.sendJSON({type:"interrupt"}))):this.#_=0,e>this.#H?(this.#p||(this.#p=!0,this.#r?.connected&&this.#r.sendJSON({type:"start_of_speech"})),this.#a&&(clearTimeout(this.#a),this.#a=null)):this.#p&&(this.#a||(this.#a=setTimeout(()=>{this.#p=!1,this.#a=null,this.#r?.connected&&this.#r.sendJSON({type:"end_of_speech"})},this.#X))))}#oe(){this.#a&&(clearTimeout(this.#a),this.#a=null),this.#p=!1,this.#_=0,this.#w=0,this.#e("audiolevelchange",0)}};function oo(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ge=oo();function rd(e){Ge=e}var We={exec:()=>null};function st(e){let r=[];return n=>{let i=Math.max(0,Math.min(3,n-1)),t=r[i];return t||(t=e(i),r[i]=t),t}}function I(e,r=""){let n=typeof e=="string"?e:e.source,i={replace:(t,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(J.caret,"$1"),n=n.replace(t,a),i},getRegex:()=>new RegExp(n,r)};return i}var Rg=((e="")=>{try{return!!new RegExp("(?<=1)(?/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:st(e=>new RegExp(`^ {0,${e}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:st(e=>new RegExp(`^ {0,${e}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:st(e=>new RegExp(`^ {0,${e}}(?:\`\`\`|~~~)`)),headingBeginRegex:st(e=>new RegExp(`^ {0,${e}}#`)),htmlBeginRegex:st(e=>new RegExp(`^ {0,${e}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:st(e=>new RegExp(`^ {0,${e}}>`))},Mg=/^(?:[ \t]*(?:\n|$))+/,Fg=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Vg=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Xt=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Jg=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ao=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,nd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,id=I(nd).replace(/bull/g,ao).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Bg=I(nd).replace(/bull/g,ao).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),so=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Wg=/^[^\n]+/,co=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,qg=I(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",co).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Gg=I(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,ao).getRegex(),qr="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",lo=/|$))/,Kg=I("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|[^\\n]*\\n*|$)|[^\\n]*\\n*|$)|)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",lo).replace("tag",qr).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),od=e=>I(so).replace("hr",Xt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list",e).replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",qr).getRegex(),Hg=od(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Xg=od(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Yg=I(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Xg).getRegex(),uo={blockquote:Yg,code:Fg,def:qg,fences:Vg,heading:Jg,hr:Xt,html:Kg,lheading:id,list:Gg,newline:Mg,paragraph:Hg,table:We,text:Wg},Ku=I("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Xt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",qr).getRegex(),Qg={...uo,lheading:Bg,table:Ku,paragraph:I(so).replace("hr",Xt).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ku).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~~~)[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html",")|<(?:script|pre|style|textarea|!--)").replace("tag",qr).getRegex()},eh={...uo,html:I(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",lo).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:We,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:I(so).replace("hr",Xt).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",id).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},th=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,rh=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ad=/^( {2,}|\\)\n(?!\s*$)/,nh=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\`+)[^`]+\k(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Rg?"(?`+)[^`]+\k(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),cd=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,ch=I(cd,"u").replace(/punct/g,ct).getRegex(),lh=I(cd,"u").replace(/punct/g,sd).getRegex(),ld="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",uh=I(ld,"gu").replace(/notPunctSpace/g,po).replace(/punctSpace/g,Gr).replace(/punct/g,ct).getRegex(),dh=I(ld,"gu").replace(/notPunctSpace/g,ah).replace(/punctSpace/g,oh).replace(/punct/g,sd).getRegex(),ph=I("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,po).replace(/punctSpace/g,Gr).replace(/punct/g,ct).getRegex(),fh=I(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,ct).getRegex(),mh="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",gh=I(mh,"gu").replace(/notPunctSpace/g,po).replace(/punctSpace/g,Gr).replace(/punct/g,ct).getRegex(),hh=I(/\\(punct)/,"gu").replace(/punct/g,ct).getRegex(),vh=I(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[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])?)+(?![-_])/).getRegex(),bh=I(lo).replace("(?:-->|$)","-->").getRegex(),xh=I("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",bh).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Jr=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/,yh=I(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",Jr).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ud=I(/^!?\[(label)\]\[(ref)\]/).replace("label",Jr).replace("ref",co).getRegex(),dd=I(/^!?\[(ref)\](?:\[\])?/).replace("ref",co).getRegex(),$h=I("reflink|nolink(?!\\()","g").replace("reflink",ud).replace("nolink",dd).getRegex(),Hu=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,fo={_backpedal:We,anyPunctuation:hh,autolink:vh,blockSkip:sh,br:ad,code:rh,del:We,delLDelim:We,delRDelim:We,emStrongLDelim:ch,emStrongRDelimAst:uh,emStrongRDelimUnd:ph,escape:th,link:yh,nolink:dd,punctuation:ih,reflink:ud,reflinkSearch:$h,tag:xh,text:nh,url:We},_h={...fo,link:I(/^!?\[(label)\]\((.*?)\)/).replace("label",Jr).getRegex(),reflink:I(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Jr).getRegex()},ro={...fo,emStrongRDelimAst:dh,emStrongLDelim:lh,delLDelim:fh,delRDelim:gh,url:I(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Hu).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:I(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},Xu=e=>wh[e];function ge(e,r){if(r){if(J.escapeTest.test(e))return e.replace(J.escapeReplace,Xu)}else if(J.escapeTestNoEncode.test(e))return e.replace(J.escapeReplaceNoEncode,Xu);return e}function Yu(e){try{e=encodeURI(e).replace(J.percentDecode,"%")}catch{return null}return e}function Qu(e,r){let n=e.replace(J.findPipe,(o,a,s)=>{let c=!1,l=a;for(;--l>=0&&s[l]==="\\";)c=!c;return c?"|":" |"}),i=n.split(J.splitPipe),t=0;if(i[0].trim()||i.shift(),i.length>0&&!i.at(-1)?.trim()&&i.pop(),r)if(i.length>r)i.splice(r);else for(;i.length=0&&J.blankLine.test(r[n]);)n--;return r.length-n<=2?e:r.slice(0,n+1).join(` +`)}function Sh(e,r){if(e.indexOf(r[1])===-1)return-1;let n=0;for(let i=0;i0?-2:-1}function zh(e,r=0){let n=r,i="";for(let t of e)if(t===" "){let o=4-n%4;i+=" ".repeat(o),n+=o}else i+=t,n++;return i}function td(e,r,n,i,t){let o=r.href,a=r.title||null,s=e[1].replace(t.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:n,href:o,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,c}function Ih(e,r,n){let i=e.match(n.other.indentCodeCompensation);if(i===null)return r;let t=i[1];return r.split(` +`).map(o=>{let a=o.match(n.other.beginningSpace);if(a===null)return o;let[s]=a;return s.length>=t.length?o.slice(t.length):o}).join(` +`)}var Br=class{options;rules;lexer;constructor(e){this.options=e||Ge}space(e){let r=this.rules.block.newline.exec(e);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(e){let r=this.rules.block.code.exec(e);if(r){let n=this.options.pedantic?r[0]:ed(r[0]),i=n.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:n,codeBlockStyle:"indented",text:i}}}fences(e){let r=this.rules.block.fences.exec(e);if(r){let n=r[0],i=Ih(n,r[3]||"",this.rules);return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(e){let r=this.rules.block.heading.exec(e);if(r){let n=r[2].trim();if(this.rules.other.endingHash.test(n)){let i=Oe(n,"#");(this.options.pedantic||!i||this.rules.other.endingSpaceChar.test(i))&&(n=i.trim())}return{type:"heading",raw:Oe(r[0],` +`),depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(e){let r=this.rules.block.hr.exec(e);if(r)return{type:"hr",raw:Oe(r[0],` +`)}}blockquote(e){let r=this.rules.block.blockquote.exec(e);if(r){let n=Oe(r[0],` +`).split(` +`),i="",t="",o=[];for(;n.length>0;){let a=!1,s=[],c;for(c=0;c1,t={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let o=this.rules.other.listItemRegex(n),a=!1;for(;e;){let c=!1,l="",u="";if(!(r=o.exec(e))||this.rules.block.hr.test(e))break;l=r[0],e=e.substring(l.length);let d=zh(r[2].split(` +`,1)[0],r[1].length),f=e.split(` +`,1)[0],g=!d.trim(),x=0;if(this.options.pedantic?(x=2,u=d.trimStart()):g?x=r[1].length+1:(x=d.search(this.rules.other.nonSpaceChar),x=x>4?1:x,u=d.slice(x),x+=r[1].length),g&&this.rules.other.blankLine.test(f)&&(l+=f+` +`,e=e.substring(f.length+1),c=!0),!c){let T=this.rules.other.nextBulletRegex(x),w=this.rules.other.hrRegex(x),M=this.rules.other.fencesBeginRegex(x),Te=this.rules.other.headingBeginRegex(x),F=this.rules.other.htmlBeginRegex(x),P=this.rules.other.blockquoteBeginRegex(x);for(;e;){let A=e.split(` +`,1)[0],fe;if(f=A,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),fe=f):fe=f.replace(this.rules.other.tabCharGlobal," "),M.test(f)||Te.test(f)||F.test(f)||P.test(f)||T.test(f)||w.test(f))break;if(fe.search(this.rules.other.nonSpaceChar)>=x||!f.trim())u+=` +`+fe.slice(x);else{if(g||d.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||M.test(d)||Te.test(d)||w.test(d))break;u+=` +`+f}g=!f.trim(),l+=A+` +`,e=e.substring(A.length+1),d=fe.slice(x)}}t.loose||(a?t.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(a=!0)),t.items.push({type:"list_item",raw:l,task:!!this.options.gfm&&this.rules.other.listIsTask.test(u),loose:!1,text:u,tokens:[]}),t.raw+=l}let s=t.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;t.raw=t.raw.trimEnd();for(let c of t.items){this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]);let l=c.tokens[0];if(c.task&&(l?.type==="text"||l?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),l.raw=l.raw.replace(this.rules.other.listReplaceTask,""),l.text=l.text.replace(this.rules.other.listReplaceTask,"");for(let d=this.lexer.inlineQueue.length-1;d>=0;d--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[d].src)){this.lexer.inlineQueue[d].src=this.lexer.inlineQueue[d].src.replace(this.rules.other.listReplaceTask,"");break}let u=this.rules.other.listTaskCheckbox.exec(c.raw);if(u){let d={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};c.checked=d.checked,t.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=d.raw+c.tokens[0].raw,c.tokens[0].text=d.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(d)):c.tokens.unshift({type:"paragraph",raw:d.raw,text:d.raw,tokens:[d]}):c.tokens.unshift(d)}}else c.task&&(c.task=!1);if(!t.loose){let u=c.tokens.filter(f=>f.type==="space"),d=u.length>0&&u.some(f=>this.rules.other.anyLine.test(f.raw));t.loose=d}}if(t.loose)for(let c of t.items){c.loose=!0;for(let l of c.tokens)l.type==="text"&&(l.type="paragraph")}return t}}html(e){let r=this.rules.block.html.exec(e);if(r){let n=ed(r[0]);return{type:"html",block:!0,raw:n,pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:n}}}def(e){let r=this.rules.block.def.exec(e);if(r){let n=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),i=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",t=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:Oe(r[0],` +`),href:i,title:t}}}table(e){let r=this.rules.block.table.exec(e);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let n=Qu(r[1]),i=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),t=r[3]?.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(` +`):[],o={type:"table",raw:Oe(r[0],` +`),header:[],align:[],rows:[]};if(n.length===i.length){for(let a of i)this.rules.other.tableAlignRight.test(a)?o.align.push("right"):this.rules.other.tableAlignCenter.test(a)?o.align.push("center"):this.rules.other.tableAlignLeft.test(a)?o.align.push("left"):o.align.push(null);for(let a=0;a({text:s,tokens:this.lexer.inline(s),header:!1,align:o.align[c]})));return o}}lheading(e){let r=this.rules.block.lheading.exec(e);if(r){let n=r[1].trim();return{type:"heading",raw:Oe(r[0],` +`),depth:r[2].charAt(0)==="="?1:2,text:n,tokens:this.lexer.inline(n)}}}paragraph(e){let r=this.rules.block.paragraph.exec(e);if(r){let n=r[1].charAt(r[1].length-1)===` +`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(e){let r=this.rules.block.text.exec(e);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(e){let r=this.rules.inline.escape.exec(e);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(e){let r=this.rules.inline.tag.exec(e);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(e){let r=this.rules.inline.link.exec(e);if(r){let n=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(n)){if(!this.rules.other.endAngleBracket.test(n))return;let o=Oe(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=Sh(r[2],"()");if(o===-2)return;if(o>-1){let a=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,a).trim(),r[3]=""}}let i=r[2],t="";if(this.options.pedantic){let o=this.rules.other.pedanticHrefTitle.exec(i);o&&(i=o[1],t=o[3])}else t=r[3]?r[3].slice(1,-1):"";return i=i.trim(),this.rules.other.startAngleBracket.test(i)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(n)?i=i.slice(1):i=i.slice(1,-1)),td(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,r){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let i=(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal," "),t=r[i.toLowerCase()];if(!t){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return td(n,t,n[0],this.lexer,this.rules)}}emStrong(e,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(e);if(!(!i||!i[1]&&!i[2]&&!i[3]&&!i[4]||i[4]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(i[1]||i[3])||!n||this.rules.inline.punctuation.exec(n))){let t=[...i[0]].length-1,o,a,s=t,c=0,l=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,r=r.slice(-1*e.length+t);(i=l.exec(r))!==null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o)continue;if(a=[...o].length,i[3]||i[4]){s+=a;continue}else if((i[5]||i[6])&&t%3&&!((t+a)%3)){c+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s+c);let u=[...i[0]][0].length,d=e.slice(0,t+i.index+u+a);if(Math.min(t,a)%2){let g=d.slice(1,-1);return{type:"em",raw:d,text:g,tokens:this.lexer.inlineTokens(g)}}let f=d.slice(2,-2);return{type:"strong",raw:d,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let r=this.rules.inline.code.exec(e);if(r){let n=r[2].replace(this.rules.other.newLineCharGlobal," "),i=this.rules.other.nonSpaceChar.test(n),t=this.rules.other.startingSpaceChar.test(n)&&this.rules.other.endingSpaceChar.test(n);return i&&t&&(n=n.substring(1,n.length-1)),{type:"codespan",raw:r[0],text:n}}}br(e){let r=this.rules.inline.br.exec(e);if(r)return{type:"br",raw:r[0]}}del(e,r,n=""){let i=this.rules.inline.delLDelim.exec(e);if(i&&(!i[1]||!n||this.rules.inline.punctuation.exec(n))){let t=[...i[0]].length-1,o,a,s=t,c=this.rules.inline.delRDelim;for(c.lastIndex=0,r=r.slice(-1*e.length+t);(i=c.exec(r))!==null;){if(o=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!o||(a=[...o].length,a!==t))continue;if(i[3]||i[4]){s+=a;continue}if(s-=a,s>0)continue;a=Math.min(a,a+s);let l=[...i[0]][0].length,u=e.slice(0,t+i.index+l+a),d=u.slice(t,-t);return{type:"del",raw:u,text:d,tokens:this.lexer.inlineTokens(d)}}}}autolink(e){let r=this.rules.inline.autolink.exec(e);if(r){let n,i;return r[2]==="@"?(n=r[1],i="mailto:"+n):(n=r[1],i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(e){let r;if(r=this.rules.inline.url.exec(e)){let n,i;if(r[2]==="@")n=r[0],i="mailto:"+n;else{let t;do t=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(t!==r[0]);n=r[0],r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(e){let r=this.rules.inline.text.exec(e);if(r){let n=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:n}}}},ce=class no{tokens;options;state;inlineQueue;tokenizer;constructor(r){this.tokens=[],this.tokens.links=Object.create(null),this.options=r||Ge,this.options.tokenizer=this.options.tokenizer||new Br,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let n={other:J,block:Vr.normal,inline:Kt.normal};this.options.pedantic?(n.block=Vr.pedantic,n.inline=Kt.pedantic):this.options.gfm&&(n.block=Vr.gfm,this.options.breaks?n.inline=Kt.breaks:n.inline=Kt.gfm),this.tokenizer.rules=n}static get rules(){return{block:Vr,inline:Kt}}static lex(r,n){return new no(n).lex(r)}static lexInline(r,n){return new no(n).inlineTokens(r)}lex(r){r=r.replace(J.carriageReturn,` +`),this.blockTokens(r,this.tokens);for(let n=0;n(o=s.call({lexer:this},r,n))?(r=r.substring(o.raw.length),n.push(o),!0):!1))continue;if(o=this.tokenizer.space(r)){r=r.substring(o.raw.length);let s=n.at(-1);o.raw.length===1&&s!==void 0?s.raw+=` +`:n.push(o);continue}if(o=this.tokenizer.code(r)){r=r.substring(o.raw.length);let s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+o.raw,s.text+=` +`+o.text,this.inlineQueue.at(-1).src=s.text):n.push(o);continue}if(o=this.tokenizer.fences(r)){r=r.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.heading(r)){r=r.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.hr(r)){r=r.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.blockquote(r)){r=r.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.list(r)){r=r.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.html(r)){r=r.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.def(r)){r=r.substring(o.raw.length);let s=n.at(-1);s?.type==="paragraph"||s?.type==="text"?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+o.raw,s.text+=` +`+o.raw,this.inlineQueue.at(-1).src=s.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},n.push(o));continue}if(o=this.tokenizer.table(r)){r=r.substring(o.raw.length),n.push(o);continue}if(o=this.tokenizer.lheading(r)){r=r.substring(o.raw.length),n.push(o);continue}let a=r;if(this.options.extensions?.startBlock){let s=1/0,c=r.slice(1),l;this.options.extensions.startBlock.forEach(u=>{l=u.call({lexer:this},c),typeof l=="number"&&l>=0&&(s=Math.min(s,l))}),s<1/0&&s>=0&&(a=r.substring(0,s+1))}if(this.state.top&&(o=this.tokenizer.paragraph(a))){let s=n.at(-1);i&&s?.type==="paragraph"?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+o.raw,s.text+=` +`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(o),i=a.length!==r.length,r=r.substring(o.raw.length);continue}if(o=this.tokenizer.text(r)){r=r.substring(o.raw.length);let s=n.at(-1);s?.type==="text"?(s.raw+=(s.raw.endsWith(` +`)?"":` +`)+o.raw,s.text+=` +`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):n.push(o);continue}if(r){this.infiniteLoopError(r.charCodeAt(0));break}}return this.state.top=!0,n}inline(r,n=[]){return this.inlineQueue.push({src:r,tokens:n}),n}inlineTokens(r,n=[]){this.tokenizer.lexer=this;let i=r;if(this.tokens.links){let s=Object.keys(this.tokens.links);s.length>0&&(i=i.replace(this.tokenizer.rules.inline.reflinkSearch,c=>s.includes(c.slice(c.lastIndexOf("[")+1,-1))?"["+"a".repeat(c.length-2)+"]":c))}i=i.replace(this.tokenizer.rules.inline.anyPunctuation,"++"),i=i.replace(this.tokenizer.rules.inline.blockSkip,(s,c,l)=>{let u=l?l.length:0;return s.slice(0,u)+"["+"a".repeat(s.length-u-2)+"]"}),i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let t=!1,o="",a=1/0;for(;r;){if(r.length(s=l.call({lexer:this},r,n))?(r=r.substring(s.raw.length),n.push(s),!0):!1))continue;if(s=this.tokenizer.escape(r)){r=r.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.tag(r)){r=r.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.link(r)){r=r.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.reflink(r,this.tokens.links)){r=r.substring(s.raw.length);let l=n.at(-1);s.type==="text"&&l?.type==="text"?(l.raw+=s.raw,l.text+=s.text):n.push(s);continue}if(s=this.tokenizer.emStrong(r,i,o)){r=r.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.codespan(r)){r=r.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.br(r)){r=r.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.del(r,i,o)){r=r.substring(s.raw.length),n.push(s);continue}if(s=this.tokenizer.autolink(r)){r=r.substring(s.raw.length),n.push(s);continue}if(!this.state.inLink&&(s=this.tokenizer.url(r))){r=r.substring(s.raw.length),n.push(s);continue}let c=r;if(this.options.extensions?.startInline){let l=1/0,u=r.slice(1),d;this.options.extensions.startInline.forEach(f=>{d=f.call({lexer:this},u),typeof d=="number"&&d>=0&&(l=Math.min(l,d))}),l<1/0&&l>=0&&(c=r.substring(0,l+1))}if(s=this.tokenizer.inlineText(c)){r=r.substring(s.raw.length),s.raw.slice(-1)!=="_"&&(o=s.raw.slice(-1)),t=!0;let l=n.at(-1);l?.type==="text"?(l.raw+=s.raw,l.text+=s.text):n.push(s);continue}if(r){this.infiniteLoopError(r.charCodeAt(0));break}}return n}infiniteLoopError(r){let n="Infinite loop on byte: "+r;if(this.options.silent)console.error(n);else throw new Error(n)}},Wr=class{options;parser;constructor(e){this.options=e||Ge}space(e){return""}code({text:e,lang:r,escaped:n}){let i=(r||"").match(J.notSpaceStart)?.[0],t=e.replace(J.endingNewline,"")+` +`;return i?'
'+(n?t:ge(t,!0))+`
+`:"
"+(n?t:ge(t,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:r}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(e){let r=e.ordered,n=e.start,i="";for(let a=0;a +`+i+" +`}listitem(e){return`
  • ${this.parser.parse(e.tokens)}
  • +`}checkbox({checked:e}){return" '}paragraph({tokens:e}){return`

    ${this.parser.parseInline(e)}

    +`}table(e){let r="",n="";for(let t=0;t${i}`),` + +`+r+` +`+i+`
    +`}tablerow({text:e}){return` +${e} +`}tablecell(e){let r=this.parser.parseInline(e.tokens),n=e.header?"th":"td";return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+r+` +`}strong({tokens:e}){return`${this.parser.parseInline(e)}`}em({tokens:e}){return`${this.parser.parseInline(e)}`}codespan({text:e}){return`${ge(e,!0)}`}br(e){return"
    "}del({tokens:e}){return`${this.parser.parseInline(e)}`}link({href:e,title:r,tokens:n}){let i=this.parser.parseInline(n),t=Yu(e);if(t===null)return i;e=t;let o='
    ",o}image({href:e,title:r,text:n,tokens:i}){i&&(n=this.parser.parseInline(i,this.parser.textRenderer));let t=Yu(e);if(t===null)return ge(n);e=t;let o=`${ge(n)}{let a=t[o].flat(1/0);n=n.concat(this.walkTokens(a,r))}):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,r)))}}return n}use(...e){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(n=>{let i={...n};if(i.async=this.defaults.async||i.async||!1,n.extensions&&(n.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let o=r.renderers[t.name];o?r.renderers[t.name]=function(...a){let s=t.renderer.apply(this,a);return s===!1&&(s=o.apply(this,a)),s}:r.renderers[t.name]=t.renderer}if("tokenizer"in t){if(!t.level||t.level!=="block"&&t.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let o=r[t.level];o?o.unshift(t.tokenizer):r[t.level]=[t.tokenizer],t.start&&(t.level==="block"?r.startBlock?r.startBlock.push(t.start):r.startBlock=[t.start]:t.level==="inline"&&(r.startInline?r.startInline.push(t.start):r.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(r.childTokens[t.name]=t.childTokens)}),i.extensions=r),n.renderer){let t=this.defaults.renderer||new Wr(this.defaults);for(let o in n.renderer){if(!(o in t))throw new Error(`renderer '${o}' does not exist`);if(["options","parser"].includes(o))continue;let a=o,s=n.renderer[a],c=t[a];t[a]=(...l)=>{let u=s.apply(t,l);return u===!1&&(u=c.apply(t,l)),u||""}}i.renderer=t}if(n.tokenizer){let t=this.defaults.tokenizer||new Br(this.defaults);for(let o in n.tokenizer){if(!(o in t))throw new Error(`tokenizer '${o}' does not exist`);if(["options","rules","lexer"].includes(o))continue;let a=o,s=n.tokenizer[a],c=t[a];t[a]=(...l)=>{let u=s.apply(t,l);return u===!1&&(u=c.apply(t,l)),u}}i.tokenizer=t}if(n.hooks){let t=this.defaults.hooks||new Ht;for(let o in n.hooks){if(!(o in t))throw new Error(`hook '${o}' does not exist`);if(["options","block"].includes(o))continue;let a=o,s=n.hooks[a],c=t[a];Ht.passThroughHooks.has(o)?t[a]=l=>{if(this.defaults.async&&Ht.passThroughHooksRespectAsync.has(o))return(async()=>{let d=await s.call(t,l);return c.call(t,d)})();let u=s.call(t,l);return c.call(t,u)}:t[a]=(...l)=>{if(this.defaults.async)return(async()=>{let d=await s.apply(t,l);return d===!1&&(d=await c.apply(t,l)),d})();let u=s.apply(t,l);return u===!1&&(u=c.apply(t,l)),u}}i.hooks=t}if(n.walkTokens){let t=this.defaults.walkTokens,o=n.walkTokens;i.walkTokens=function(a){let s=[];return s.push(o.call(this,a)),t&&(s=s.concat(t.call(this,a))),s}}this.defaults={...this.defaults,...i}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,r){return ce.lex(e,r??this.defaults)}parser(e,r){return le.parse(e,r??this.defaults)}parseMarkdown(e){return(r,n)=>{let i={...n},t={...this.defaults,...i},o=this.onError(!!t.silent,!!t.async);if(this.defaults.async===!0&&i.async===!1)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return o(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(t.hooks&&(t.hooks.options=t,t.hooks.block=e),t.async)return(async()=>{let a=t.hooks?await t.hooks.preprocess(r):r,s=await(t.hooks?await t.hooks.provideLexer(e):e?ce.lex:ce.lexInline)(a,t),c=t.hooks?await t.hooks.processAllTokens(s):s;t.walkTokens&&await Promise.all(this.walkTokens(c,t.walkTokens));let l=await(t.hooks?await t.hooks.provideParser(e):e?le.parse:le.parseInline)(c,t);return t.hooks?await t.hooks.postprocess(l):l})().catch(o);try{t.hooks&&(r=t.hooks.preprocess(r));let a=(t.hooks?t.hooks.provideLexer(e):e?ce.lex:ce.lexInline)(r,t);t.hooks&&(a=t.hooks.processAllTokens(a)),t.walkTokens&&this.walkTokens(a,t.walkTokens);let s=(t.hooks?t.hooks.provideParser(e):e?le.parse:le.parseInline)(a,t);return t.hooks&&(s=t.hooks.postprocess(s)),s}catch(a){return o(a)}}}onError(e,r){return n=>{if(n.message+=` +Please report this to https://github.com/markedjs/marked.`,e){let i="

    An error occurred:

    "+ge(n.message+"",!0)+"
    ";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},qe=new Th;function E(e,r){return qe.parse(e,r)}E.options=E.setOptions=function(e){return qe.setOptions(e),E.defaults=qe.defaults,rd(E.defaults),E};E.getDefaults=oo;E.defaults=Ge;E.use=function(...e){return qe.use(...e),E.defaults=qe.defaults,rd(E.defaults),E};E.walkTokens=function(e,r){return qe.walkTokens(e,r)};E.parseInline=qe.parseInline;E.Parser=le;E.parser=le.parse;E.Renderer=Wr;E.TextRenderer=mo;E.Lexer=ce;E.lexer=ce.lex;E.Tokenizer=Br;E.Hooks=Ht;E.parse=E;var e_=E.options,t_=E.setOptions,r_=E.use,n_=E.walkTokens,i_=E.parseInline;var o_=le.parse,a_=ce.lex;var Ph=Object.defineProperty,Eh=Object.defineProperties,Oh=Object.getOwnPropertyDescriptors,pd=Object.getOwnPropertySymbols,jh=Object.prototype.hasOwnProperty,Uh=Object.prototype.propertyIsEnumerable,fd=(e,r,n)=>r in e?Ph(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,vd=(e,r)=>{for(var n in r||(r={}))jh.call(r,n)&&fd(e,n,r[n]);if(pd)for(var n of pd(r))Uh.call(r,n)&&fd(e,n,r[n]);return e},bd=(e,r)=>Eh(e,Oh(r)),q=(e,r)=>{let n=!1,i=!1;for(let t=0;t{let n=e.substring(r,r+3)==="```",i=r>0&&e.substring(r-1,r+2)==="```",t=r>1&&e.substring(r-2,r+1)==="```";return n||i||t},Nh=e=>{let r=0;for(let n=0;n{let n=!1,i=!1,t=-1;for(let o=0;o(=?\s*[$]?\d)/gm,Ah=e=>!e||typeof e!="string"||!e.includes(">")?e:e.replace(Zh,(r,n,i,t)=>q(e,t)?r:`${n}\\>${i}`),Lh=/(\*\*)([^*]*\*?)$/,Ch=/(__)([^_]*?)$/,Rh=/(\*\*\*)([^*]*?)$/,Mh=/(\*)([^*]*?)$/,Fh=/(_)([^_]*?)$/,Vh=/(`)([^`]*?)$/,Jh=/(~~)([^~]*?)$/,Ke=/^[\s_~*`]*$/,xd=/^[\s]*[-*+][\s]+$/,Bh=/[\p{L}\p{N}_]/u,Wh=/^```[^`\n]*```?$/,qh=/^\*{4,}$/,Gh=/(__)([^_]+)_$/,Kh=/(~~)([^~]+)~$/,md=/~~/g,Ue=e=>{if(!e)return!1;let r=e.charCodeAt(0);return r>=48&&r<=57||r>=65&&r<=90||r>=97&&r<=122||r===95?!0:Bh.test(e)};var Hh=(e,r)=>{let n=1;for(let i=r-1;i>=0;i-=1)if(e[i]==="]")n+=1;else if(e[i]==="["&&(n-=1,n===0))return i;return-1},yd=(e,r)=>{let n=1;for(let i=r+1;i{let n=!1,i=!1;for(let t=0;t{for(let n=r;n{for(let n=r-1;n>=0;n-=1){if(e[n]===")")return!1;if(e[n]==="(")return n>0&&e[n-1]==="]"?Xh(e,r):!1;if(e[n]===` +`)return!1}return!1},Yh=(e,r)=>{for(let n=r-1;n>=0;n-=1){if(e[n]===">")return!1;if(e[n]==="<"){let i=n+1="a"&&i<="z"||i>="A"&&i<="Z"||i==="/"}if(e[n]===` +`)return!1}return!1},ho=(e,r,n)=>{let i=0;for(let c=r-1;c>=0;c-=1)if(e[c]===` +`){i=c+1;break}let t=e.length;for(let c=r;c=3&&!s},Qh=(e,r,n,i)=>n==="\\"||e.includes("$")&&Kr(e,r)?!0:n!=="*"&&i==="*"?(r{let r=0,n=!1,i=e.length;for(let t=0;t0?e[t-1]:"",a=t!!(n==="\\"||e.includes("$")&&Kr(e,r)||$d(e,r)||Yh(e,r)||n==="_"||i==="_"||n&&i&&Ue(n)&&Ue(i)),tv=e=>{let r=0,n=!1,i=e.length;for(let t=0;t0?e[t-1]:"",a=t{let r=0,n=0,i=!1;for(let t=0;t=3&&(r+=Math.floor(n/3)),n=0,i=!i,t+=2;continue}i||(e[t]==="*"?n+=1:(n>=3&&(r+=Math.floor(n/3)),n=0))}return n>=3&&(r+=Math.floor(n/3)),r},vo=e=>{let r=0,n=!1;for(let i=0;i{let r=0,n=!1;for(let i=0;i{if(!r||Ke.test(r))return!0;let i=e.substring(0,n).lastIndexOf(` +`),t=i===-1?0:i+1,o=e.substring(t,n);return xd.test(o)&&r.includes(` +`)?!0:ho(e,n,"*")},iv=e=>{let r=e.match(Lh);if(!r)return e;let n=r[2],i=e.lastIndexOf(r[1]);return q(e,i)||je(e,i)||nv(e,n,i)?e:vo(e)%2===1?n.endsWith("*")?`${e}*`:`${e}**`:e},ov=(e,r,n)=>{if(!r||Ke.test(r))return!0;let i=e.substring(0,n).lastIndexOf(` +`),t=i===-1?0:i+1,o=e.substring(t,n);return xd.test(o)&&r.includes(` +`)?!0:ho(e,n,"_")},av=e=>{let r=e.match(Ch);if(!r){let t=e.match(Gh);if(t){let o=e.lastIndexOf(t[1]);if(!(q(e,o)||je(e,o))&&gd(e)%2===1)return`${e}_`}return e}let n=r[2],i=e.lastIndexOf(r[1]);return q(e,i)||je(e,i)||ov(e,n,i)?e:gd(e)%2===1?`${e}__`:e},sv=e=>{let r=!1;for(let n=0;n0?e[n-1]:"",t=n{if(!e.match(Mh))return e;let r=sv(e);if(r===-1||q(e,r)||je(e,r))return e;let n=e.substring(r+1);return!n||Ke.test(n)?e:_d(e)%2===1?`${e}*`:e},kd=e=>{let r=!1;for(let n=0;n0?e[n-1]:"",t=n{let r=e.length;for(;r>0&&e[r-1]===` +`;)r-=1;if(r{if(!e.endsWith("**"))return null;let r=e.slice(0,-2);if(vo(r)%2!==1)return null;let n=r.indexOf("**"),i=kd(r);return n!==-1&&i!==-1&&n{if(!e.match(Fh))return e;let r=kd(e);if(r===-1)return e;let n=e.substring(r+1);if(!n||Ke.test(n)||q(e,r)||je(e,r))return e;if(tv(e)%2===1){let i=uv(e);return i!==null?i:lv(e)}return e},pv=e=>{let r=vo(e),n=_d(e);return r%2===0&&n%2===0},fv=(e,r,n)=>!r||Ke.test(r)||q(e,n)||je(e,n)?!0:ho(e,n,"*"),mv=e=>{if(qh.test(e))return e;let r=e.match(Rh);if(!r)return e;let n=r[2],i=e.lastIndexOf(r[1]);return fv(e,n,i)?e:rv(e)%2===1?pv(e)?e:`${e}***`:e},gv=/<[a-zA-Z/][^>]*$/,hv=e=>{let r=e.match(gv);return!r||r.index===void 0||q(e,r.index)?e:e.substring(0,r.index).trimEnd()},vv=e=>!e.match(Wh)||e.includes(` +`)?null:e.endsWith("``")&&!e.endsWith("```")?`${e}\``:e,bv=e=>(e.match(/```/g)||[]).length%2===1,xv=e=>{let r=vv(e);if(r!==null)return r;let n=e.match(Vh);if(n&&!bv(e)){let i=n[2];if(!i||Ke.test(i))return e;if(Nh(e)%2===1)return`${e}\``}return e},wd=(e,r)=>r>=2&&e.substring(r-2,r+1)==="```"||r>=1&&e.substring(r-1,r+2)==="```"||r<=e.length-3&&e.substring(r,r+3)==="```",yv=e=>{let r=0,n=!1;for(let i=0;i{let r=0,n=!1;for(let i=0;i{if(e.endsWith("$")&&!e.endsWith("$$"))return`${e}$`;let r=e.indexOf("$$");return r!==-1&&e.indexOf(` +`,r)!==-1&&!e.endsWith(` +`)?`${e} +$$`:`${e}$$`},kv=e=>yv(e)%2===0?e:_v(e),wv=e=>$v(e)%2===1?`${e}$`:e,Sv=(e,r,n)=>{if(e.substring(r+2).includes(")"))return null;let i=Hh(e,r);if(i===-1||q(e,i))return null;let t=i>0&&e[i-1]==="!",o=t?i-1:i,a=e.substring(0,o);if(t)return a;let s=e.substring(i+1,r);return n==="text-only"?`${a}${s}`:`${a}[${s}](streamdown:incomplete-link)`},hd=(e,r)=>{for(let n=0;n0&&e[n-1]==="!")continue;let i=yd(e,n);if(i===-1)return n;if(i+1{let i=r>0&&e[r-1]==="!",t=i?r-1:r;if(!e.substring(r+1).includes("]")){let o=e.substring(0,t);if(i)return o;if(n==="text-only"){let a=hd(e,r);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}if(yd(e,r)===-1){let o=e.substring(0,t);if(i)return o;if(n==="text-only"){let a=hd(e,r);return e.substring(0,a)+e.substring(a+1)}return`${e}](streamdown:incomplete-link)`}return null},Sd=(e,r="protocol")=>{let n=e.lastIndexOf("](");if(n!==-1&&!q(e,n)){let i=Sv(e,n,r);if(i!==null)return i}for(let i=e.length-1;i>=0;i-=1)if(e[i]==="["&&!q(e,i)){let t=zv(e,i,r);if(t!==null)return t}return e},Iv=/^-{1,2}$/,Tv=/^[\s]*-{1,2}[\s]+$/,Pv=/^={1,2}$/,Ev=/^[\s]*={1,2}[\s]+$/,Ov=e=>{if(!e||typeof e!="string")return e;let r=e.lastIndexOf(` +`);if(r===-1)return e;let n=e.substring(r+1),i=e.substring(0,r),t=n.trim();if(Iv.test(t)&&!n.match(Tv)){let o=i.split(` +`).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}if(Pv.test(t)&&!n.match(Ev)){let o=i.split(` +`).at(-1);if(o&&o.trim().length>0)return`${e}\u200B`}return e},jv=new RegExp("(?<=[\\p{L}\\p{N}_])~(?!~)(?=[\\p{L}\\p{N}_])","gu"),Uv=e=>!e||typeof e!="string"||!e.includes("~")?e:e.replace(jv,(r,n)=>q(e,n)?r:"\\~"),Dv=e=>{var r,n;let i=e.match(Jh);if(i){let t=i[2];if(!t||Ke.test(t))return e;let o=e.lastIndexOf(i[1]);if(q(e,o)||je(e,o))return e;if(((r=e.match(md))==null?void 0:r.length)%2===1)return`${e}~~`}else{let t=e.match(Kh);if(t){let o=e.lastIndexOf(t[0].slice(0,2));if(q(e,o)||je(e,o))return e;if(((n=e.match(md))==null?void 0:n.length)%2===1)return`${e}~`}}return e},go=e=>e!==!1,Nv=e=>e===!0,W={SINGLE_TILDE:0,COMPARISON_OPERATORS:5,HTML_TAGS:10,SETEXT_HEADINGS:15,LINKS:20,BOLD_ITALIC:30,BOLD:35,ITALIC_DOUBLE_UNDERSCORE:40,ITALIC_SINGLE_ASTERISK:41,ITALIC_SINGLE_UNDERSCORE:42,INLINE_CODE:50,STRIKETHROUGH:60,KATEX:70,INLINE_KATEX:75,DEFAULT:100},Zv=[{handler:{name:"singleTilde",handle:Uv,priority:W.SINGLE_TILDE},optionKey:"singleTilde"},{handler:{name:"comparisonOperators",handle:Ah,priority:W.COMPARISON_OPERATORS},optionKey:"comparisonOperators"},{handler:{name:"htmlTags",handle:hv,priority:W.HTML_TAGS},optionKey:"htmlTags"},{handler:{name:"setextHeadings",handle:Ov,priority:W.SETEXT_HEADINGS},optionKey:"setextHeadings"},{handler:{name:"links",handle:Sd,priority:W.LINKS},optionKey:"links",earlyReturn:e=>e.endsWith("](streamdown:incomplete-link)")},{handler:{name:"boldItalic",handle:mv,priority:W.BOLD_ITALIC},optionKey:"boldItalic"},{handler:{name:"bold",handle:iv,priority:W.BOLD},optionKey:"bold"},{handler:{name:"italicDoubleUnderscore",handle:av,priority:W.ITALIC_DOUBLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"italicSingleAsterisk",handle:cv,priority:W.ITALIC_SINGLE_ASTERISK},optionKey:"italic"},{handler:{name:"italicSingleUnderscore",handle:dv,priority:W.ITALIC_SINGLE_UNDERSCORE},optionKey:"italic"},{handler:{name:"inlineCode",handle:xv,priority:W.INLINE_CODE},optionKey:"inlineCode"},{handler:{name:"strikethrough",handle:Dv,priority:W.STRIKETHROUGH},optionKey:"strikethrough"},{handler:{name:"katex",handle:kv,priority:W.KATEX},optionKey:"katex"},{handler:{name:"inlineKatex",handle:wv,priority:W.INLINE_KATEX},optionKey:"inlineKatex"}],Av=e=>{var r;let n=(r=e?.linkMode)!=null?r:"protocol";return Zv.filter(({handler:i,optionKey:t})=>i.name==="links"?go(e?.links)||go(e?.images):i.name==="inlineKatex"?Nv(e?.inlineKatex):go(e?.[t])).map(({handler:i,earlyReturn:t})=>i.name==="links"?{handler:bd(vd({},i),{handle:o=>Sd(o,n)}),earlyReturn:n==="protocol"?t:void 0}:{handler:i,earlyReturn:t})},Lv=(e,r)=>{var n;if(!e||typeof e!="string")return e;let i=e.endsWith(" ")&&!e.endsWith(" ")?e.slice(0,-1):e,t=Av(r),o=((n=r?.handlers)!=null?n:[]).map(s=>{var c;return{handler:bd(vd({},s),{priority:(c=s.priority)!=null?c:W.DEFAULT}),earlyReturn:void 0}}),a=[...t,...o].sort((s,c)=>{var l,u;return((l=s.handler.priority)!=null?l:0)-((u=c.handler.priority)!=null?u:0)});for(let{handler:s,earlyReturn:c}of a)if(i=s.handle(i),c!=null&&c(i))return i;return i},zd=Lv;var ap=zg(op(),1),Ib=new ap.FilterXSS({whiteList:{a:["href","title"],p:[],br:[],hr:[],blockquote:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],ul:[],ol:["start"],li:[],strong:[],em:[],b:[],i:[],del:[],s:[],code:["class"],pre:[],table:[],thead:[],tbody:[],tr:[],th:["align"],td:["align"]},stripIgnoreTag:!0,stripIgnoreTagBody:["script","style","iframe","object"],onTagAttr(e,r,n){if(e==="a"&&r==="href"){let i=n.trim().toLowerCase();if(!i.startsWith("/")&&!i.startsWith("#")&&!i.startsWith("https://")&&!i.startsWith("mailto:"))return""}}});function Tb(e){let r=E.parse(e,{async:!1});return Ib.process(r)}function sp(e){return Tb(zd(e,{inlineKatex:!1,linkMode:"text-only"}))}function cp(e,r){e.classList.add("markdown-body"),e.innerHTML=sp(r);for(let n of e.querySelectorAll("a[href]"))n.origin!==window.location.origin&&(n.target="_blank",n.rel="noopener noreferrer")}var Ft={};$e(Ft,{$brand:()=>zo,$input:()=>qs,$output:()=>Ws,NEVER:()=>So,TimePrecision:()=>Xs,ZodAny:()=>Rl,ZodArray:()=>Jl,ZodBase64:()=>ji,ZodBase64URL:()=>Ui,ZodBigInt:()=>Mt,ZodBigIntFormat:()=>Zi,ZodBoolean:()=>Rt,ZodCIDRv4:()=>Ei,ZodCIDRv6:()=>Oi,ZodCUID:()=>ki,ZodCUID2:()=>wi,ZodCatch:()=>pu,ZodCodec:()=>Er,ZodCustom:()=>Or,ZodCustomStringFormat:()=>Lt,ZodDate:()=>Sr,ZodDefault:()=>au,ZodDiscriminatedUnion:()=>Wl,ZodE164:()=>Di,ZodEmail:()=>yi,ZodEmoji:()=>$i,ZodEnum:()=>Zt,ZodError:()=>o$,ZodExactOptional:()=>nu,ZodFile:()=>tu,ZodFirstPartyTypeKind:()=>Su,ZodFunction:()=>_u,ZodGUID:()=>yr,ZodIPv4:()=>Ti,ZodIPv6:()=>Pi,ZodISODate:()=>mi,ZodISODateTime:()=>fi,ZodISODuration:()=>hi,ZodISOTime:()=>gi,ZodIntersection:()=>ql,ZodIssueCode:()=>s$,ZodJWT:()=>Ni,ZodKSUID:()=>Ii,ZodLazy:()=>xu,ZodLiteral:()=>eu,ZodMAC:()=>Ul,ZodMap:()=>Yl,ZodNaN:()=>mu,ZodNanoID:()=>_i,ZodNever:()=>Fl,ZodNonOptional:()=>Fi,ZodNull:()=>Ll,ZodNullable:()=>ou,ZodNumber:()=>Ct,ZodNumberFormat:()=>it,ZodObject:()=>Ir,ZodOptional:()=>Mi,ZodPipe:()=>Pr,ZodPrefault:()=>cu,ZodPreprocess:()=>gu,ZodPromise:()=>$u,ZodReadonly:()=>hu,ZodRealError:()=>re,ZodRecord:()=>Nt,ZodSet:()=>Ql,ZodString:()=>At,ZodStringFormat:()=>N,ZodSuccess:()=>du,ZodSymbol:()=>Zl,ZodTemplateLiteral:()=>bu,ZodTransform:()=>ru,ZodTuple:()=>Kl,ZodType:()=>S,ZodULID:()=>Si,ZodURL:()=>wr,ZodUUID:()=>xe,ZodUndefined:()=>Al,ZodUnion:()=>Tr,ZodUnknown:()=>Ml,ZodVoid:()=>Vl,ZodXID:()=>zi,ZodXor:()=>Bl,_ZodString:()=>xi,_default:()=>su,_function:()=>Xm,any:()=>Tm,array:()=>zr,base64:()=>dm,base64url:()=>pm,bigint:()=>km,boolean:()=>Nl,catch:()=>fu,check:()=>Ym,cidrv4:()=>lm,cidrv6:()=>um,clone:()=>G,codec:()=>qm,coerce:()=>zu,config:()=>C,core:()=>we,cuid:()=>tm,cuid2:()=>rm,custom:()=>Qm,date:()=>Em,decode:()=>zl,decodeAsync:()=>Tl,describe:()=>eg,discriminatedUnion:()=>Zm,e164:()=>fm,email:()=>Bf,emoji:()=>Qf,encode:()=>Sl,encodeAsync:()=>Il,endsWith:()=>St,enum:()=>Ci,exactOptional:()=>iu,file:()=>Vm,flattenError:()=>ar,float32:()=>xm,float64:()=>ym,formatError:()=>sr,fromJSONSchema:()=>sg,function:()=>Xm,getErrorMap:()=>l$,globalRegistry:()=>V,gt:()=>ve,gte:()=>H,guid:()=>Wf,hash:()=>bm,hex:()=>vm,hostname:()=>hm,httpUrl:()=>Yf,includes:()=>kt,instanceof:()=>rg,int:()=>vi,int32:()=>$m,int64:()=>wm,intersection:()=>Gl,invertCodec:()=>Gm,ipv4:()=>am,ipv6:()=>cm,iso:()=>Dt,json:()=>ig,jwt:()=>mm,keyof:()=>Om,ksuid:()=>om,lazy:()=>yu,length:()=>rt,literal:()=>Fm,locales:()=>gr,looseObject:()=>Dm,looseRecord:()=>Lm,lowercase:()=>$t,lt:()=>he,lte:()=>oe,mac:()=>sm,map:()=>Cm,maxLength:()=>tt,maxSize:()=>Me,meta:()=>tg,mime:()=>zt,minLength:()=>ke,minSize:()=>be,multipleOf:()=>Re,nan:()=>Wm,nanoid:()=>em,nativeEnum:()=>Mm,negative:()=>ni,never:()=>Ai,nonnegative:()=>oi,nonoptional:()=>uu,nonpositive:()=>ii,normalize:()=>It,null:()=>Cl,nullable:()=>_r,nullish:()=>Jm,number:()=>Dl,object:()=>jm,optional:()=>$r,overwrite:()=>de,parse:()=>$l,parseAsync:()=>_l,partialRecord:()=>Am,pipe:()=>bi,positive:()=>ri,prefault:()=>lu,preprocess:()=>og,prettifyError:()=>Co,promise:()=>Hm,property:()=>ai,readonly:()=>vu,record:()=>Xl,refine:()=>ku,regex:()=>yt,regexes:()=>ie,registry:()=>Nn,safeDecode:()=>El,safeDecodeAsync:()=>jl,safeEncode:()=>Pl,safeEncodeAsync:()=>Ol,safeParse:()=>kl,safeParseAsync:()=>wl,set:()=>Rm,setErrorMap:()=>c$,size:()=>et,slugify:()=>Ot,startsWith:()=>wt,strictObject:()=>Um,string:()=>xr,stringFormat:()=>gm,stringbool:()=>ng,success:()=>Bm,superRefine:()=>wu,symbol:()=>zm,templateLiteral:()=>Km,toJSONSchema:()=>ui,toLowerCase:()=>Pt,toUpperCase:()=>Et,transform:()=>Ri,treeifyError:()=>Lo,trim:()=>Tt,tuple:()=>Hl,uint32:()=>_m,uint64:()=>Sm,ulid:()=>nm,undefined:()=>Im,union:()=>Li,unknown:()=>nt,uppercase:()=>_t,url:()=>Xf,util:()=>b,uuid:()=>qf,uuidv4:()=>Gf,uuidv6:()=>Kf,uuidv7:()=>Hf,void:()=>Pm,xid:()=>im,xor:()=>Nm});var we={};$e(we,{$ZodAny:()=>ms,$ZodArray:()=>xs,$ZodAsyncError:()=>ue,$ZodBase64:()=>is,$ZodBase64URL:()=>os,$ZodBigInt:()=>In,$ZodBigIntFormat:()=>us,$ZodBoolean:()=>dr,$ZodCIDRv4:()=>ts,$ZodCIDRv6:()=>rs,$ZodCUID:()=>Va,$ZodCUID2:()=>Ja,$ZodCatch:()=>As,$ZodCheck:()=>Z,$ZodCheckBigIntFormat:()=>xa,$ZodCheckEndsWith:()=>Oa,$ZodCheckGreaterThan:()=>$n,$ZodCheckIncludes:()=>Pa,$ZodCheckLengthEquals:()=>Sa,$ZodCheckLessThan:()=>yn,$ZodCheckLowerCase:()=>Ia,$ZodCheckMaxLength:()=>ka,$ZodCheckMaxSize:()=>ya,$ZodCheckMimeType:()=>Ua,$ZodCheckMinLength:()=>wa,$ZodCheckMinSize:()=>$a,$ZodCheckMultipleOf:()=>va,$ZodCheckNumberFormat:()=>ba,$ZodCheckOverwrite:()=>Da,$ZodCheckProperty:()=>ja,$ZodCheckRegex:()=>za,$ZodCheckSizeEquals:()=>_a,$ZodCheckStartsWith:()=>Ea,$ZodCheckStringFormat:()=>bt,$ZodCheckUpperCase:()=>Ta,$ZodCodec:()=>fr,$ZodCustom:()=>Bs,$ZodCustomStringFormat:()=>cs,$ZodDate:()=>bs,$ZodDefault:()=>Us,$ZodDiscriminatedUnion:()=>_s,$ZodE164:()=>as,$ZodEmail:()=>Ca,$ZodEmoji:()=>Ma,$ZodEncodeError:()=>Ne,$ZodEnum:()=>Is,$ZodError:()=>or,$ZodExactOptional:()=>Os,$ZodFile:()=>Ps,$ZodFunction:()=>Fs,$ZodGUID:()=>Aa,$ZodIPv4:()=>Ya,$ZodIPv6:()=>Qa,$ZodISODate:()=>Ka,$ZodISODateTime:()=>Ga,$ZodISODuration:()=>Xa,$ZodISOTime:()=>Ha,$ZodIntersection:()=>ks,$ZodJWT:()=>ss,$ZodKSUID:()=>qa,$ZodLazy:()=>Js,$ZodLiteral:()=>Ts,$ZodMAC:()=>es,$ZodMap:()=>Ss,$ZodNaN:()=>Ls,$ZodNanoID:()=>Fa,$ZodNever:()=>hs,$ZodNonOptional:()=>Ns,$ZodNull:()=>fs,$ZodNullable:()=>js,$ZodNumber:()=>zn,$ZodNumberFormat:()=>ls,$ZodObject:()=>Cp,$ZodObjectJIT:()=>ys,$ZodOptional:()=>Pn,$ZodPipe:()=>En,$ZodPrefault:()=>Ds,$ZodPreprocess:()=>Cs,$ZodPromise:()=>Vs,$ZodReadonly:()=>Rs,$ZodRealError:()=>te,$ZodRecord:()=>ws,$ZodRegistry:()=>Dn,$ZodSet:()=>zs,$ZodString:()=>Qe,$ZodStringFormat:()=>D,$ZodSuccess:()=>Zs,$ZodSymbol:()=>ds,$ZodTemplateLiteral:()=>Ms,$ZodTransform:()=>Es,$ZodTuple:()=>Tn,$ZodType:()=>k,$ZodULID:()=>Ba,$ZodURL:()=>Ra,$ZodUUID:()=>La,$ZodUndefined:()=>ps,$ZodUnion:()=>pr,$ZodUnknown:()=>gs,$ZodVoid:()=>vs,$ZodXID:()=>Wa,$ZodXor:()=>$s,$brand:()=>zo,$constructor:()=>p,$input:()=>qs,$output:()=>Ws,Doc:()=>ur,JSONSchema:()=>Ff,JSONSchemaGenerator:()=>di,NEVER:()=>So,TimePrecision:()=>Xs,_any:()=>bc,_array:()=>Sc,_base64:()=>Yn,_base64url:()=>Qn,_bigint:()=>dc,_boolean:()=>lc,_catch:()=>Xy,_check:()=>Mf,_cidrv4:()=>Hn,_cidrv6:()=>Xn,_coercedBigint:()=>pc,_coercedBoolean:()=>uc,_coercedDate:()=>kc,_coercedNumber:()=>nc,_coercedString:()=>Ks,_cuid:()=>Vn,_cuid2:()=>Jn,_custom:()=>Ic,_date:()=>_c,_decode:()=>dn,_decodeAsync:()=>fn,_default:()=>Gy,_discriminatedUnion:()=>Zy,_e164:()=>ei,_email:()=>Zn,_emoji:()=>Mn,_encode:()=>un,_encodeAsync:()=>pn,_endsWith:()=>St,_enum:()=>Fy,_file:()=>zc,_float32:()=>oc,_float64:()=>ac,_gt:()=>ve,_gte:()=>H,_guid:()=>hr,_includes:()=>kt,_int:()=>ic,_int32:()=>sc,_int64:()=>fc,_intersection:()=>Ay,_ipv4:()=>Gn,_ipv6:()=>Kn,_isoDate:()=>Qs,_isoDateTime:()=>Ys,_isoDuration:()=>tc,_isoTime:()=>ec,_jwt:()=>ti,_ksuid:()=>qn,_lazy:()=>t$,_length:()=>rt,_literal:()=>Jy,_lowercase:()=>$t,_lt:()=>he,_lte:()=>oe,_mac:()=>Hs,_map:()=>Ry,_max:()=>oe,_maxLength:()=>tt,_maxSize:()=>Me,_mime:()=>zt,_min:()=>H,_minLength:()=>ke,_minSize:()=>be,_multipleOf:()=>Re,_nan:()=>wc,_nanoid:()=>Fn,_nativeEnum:()=>Vy,_negative:()=>ni,_never:()=>yc,_nonnegative:()=>oi,_nonoptional:()=>Ky,_nonpositive:()=>ii,_normalize:()=>It,_null:()=>vc,_nullable:()=>qy,_number:()=>rc,_optional:()=>Wy,_overwrite:()=>de,_parse:()=>mt,_parseAsync:()=>gt,_pipe:()=>Yy,_positive:()=>ri,_promise:()=>r$,_property:()=>ai,_readonly:()=>Qy,_record:()=>Cy,_refine:()=>Tc,_regex:()=>yt,_safeDecode:()=>gn,_safeDecodeAsync:()=>vn,_safeEncode:()=>mn,_safeEncodeAsync:()=>hn,_safeParse:()=>ht,_safeParseAsync:()=>vt,_set:()=>My,_size:()=>et,_slugify:()=>Ot,_startsWith:()=>wt,_string:()=>Gs,_stringFormat:()=>jt,_stringbool:()=>jc,_success:()=>Hy,_superRefine:()=>Pc,_symbol:()=>gc,_templateLiteral:()=>e$,_toLowerCase:()=>Pt,_toUpperCase:()=>Et,_transform:()=>By,_trim:()=>Tt,_tuple:()=>Ly,_uint32:()=>cc,_uint64:()=>mc,_ulid:()=>Bn,_undefined:()=>hc,_union:()=>Dy,_unknown:()=>xc,_uppercase:()=>_t,_url:()=>vr,_uuid:()=>An,_uuidv4:()=>Ln,_uuidv6:()=>Cn,_uuidv7:()=>Rn,_void:()=>$c,_xid:()=>Wn,_xor:()=>Ny,clone:()=>G,config:()=>C,createStandardJSONSchemaMethod:()=>Ut,createToJSONSchemaMethod:()=>Uc,decode:()=>rx,decodeAsync:()=>ix,describe:()=>Ec,encode:()=>tx,encodeAsync:()=>nx,extractDefs:()=>Ve,finalize:()=>Je,flattenError:()=>ar,formatError:()=>sr,globalConfig:()=>He,globalRegistry:()=>V,initializeContext:()=>Fe,isValidBase64:()=>ns,isValidBase64URL:()=>Np,isValidJWT:()=>Zp,locales:()=>gr,meta:()=>Oc,parse:()=>cn,parseAsync:()=>ln,prettifyError:()=>Co,process:()=>O,regexes:()=>ie,registry:()=>Nn,safeDecode:()=>ax,safeDecodeAsync:()=>cx,safeEncode:()=>ox,safeEncodeAsync:()=>sx,safeParse:()=>Ro,safeParseAsync:()=>Mo,toDotPath:()=>mp,toJSONSchema:()=>ui,treeifyError:()=>Lo,util:()=>b,version:()=>Na});var lp,So=Object.freeze({status:"aborted"});function p(e,r,n){function i(s,c){if(s._zod||Object.defineProperty(s,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),s._zod.traits.has(e))return;s._zod.traits.add(e),r(s,c);let l=a.prototype,u=Object.keys(l);for(let d=0;dn?.Parent&&s instanceof n.Parent?!0:s?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var zo=Symbol("zod_brand"),ue=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Ne=class extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}};(lp=globalThis).__zod_globalConfig??(lp.__zod_globalConfig={});var He=globalThis.__zod_globalConfig;function C(e){return e&&Object.assign(He,e),He}var b={};$e(b,{BIGINT_FORMAT_RANGES:()=>Zo,Class:()=>To,NUMBER_FORMAT_RANGES:()=>No,aborted:()=>Ce,allowsEval:()=>Oo,assert:()=>Ub,assertEqual:()=>Pb,assertIs:()=>Ob,assertNever:()=>jb,assertNotEqual:()=>Eb,assignProp:()=>Ae,base64ToUint8Array:()=>dp,base64urlToUint8Array:()=>Hb,cached:()=>pt,captureStackTrace:()=>sn,cleanEnum:()=>Kb,cleanRegex:()=>tr,clone:()=>G,cloneDef:()=>Nb,createTransparentProxy:()=>Mb,defineLazy:()=>z,esc:()=>an,escapeRegex:()=>se,explicitlyAborted:()=>Ao,extend:()=>Jb,finalizeIssue:()=>K,floatSafeRemainder:()=>Po,getElementAtPath:()=>Zb,getEnumValues:()=>er,getLengthableOrigin:()=>ir,getParsedType:()=>Rb,getSizableOrigin:()=>nr,hexToUint8Array:()=>Yb,isObject:()=>Xe,isPlainObject:()=>Le,issue:()=>ft,joinValues:()=>m,jsonStringifyReplacer:()=>dt,merge:()=>Wb,mergeDefs:()=>_e,normalizeParams:()=>y,nullish:()=>Ze,numKeys:()=>Cb,objectClone:()=>Db,omit:()=>Vb,optionalKeys:()=>Do,parsedType:()=>v,partial:()=>qb,pick:()=>Fb,prefixIssues:()=>ee,primitiveTypes:()=>Uo,promiseAllObject:()=>Ab,propertyKeyTypes:()=>rr,randomString:()=>Lb,required:()=>Gb,safeExtend:()=>Bb,shallowClone:()=>jo,slugify:()=>Eo,stringifyPrimitive:()=>h,uint8ArrayToBase64:()=>pp,uint8ArrayToBase64url:()=>Xb,uint8ArrayToHex:()=>Qb,unwrapMessage:()=>Qt});function Pb(e){return e}function Eb(e){return e}function Ob(e){}function jb(e){throw new Error("Unexpected value in exhaustive check")}function Ub(e){}function er(e){let r=Object.values(e).filter(i=>typeof i=="number");return Object.entries(e).filter(([i,t])=>r.indexOf(+i)===-1).map(([i,t])=>t)}function m(e,r="|"){return e.map(n=>h(n)).join(r)}function dt(e,r){return typeof r=="bigint"?r.toString():r}function pt(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Ze(e){return e==null}function tr(e){let r=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(r,n)}function Po(e,r){let n=e/r,i=Math.round(n),t=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-i)n?.[i],e):e}function Ab(e){let r=Object.keys(e),n=r.map(i=>e[i]);return Promise.all(n).then(i=>{let t={};for(let o=0;o{};function Xe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var Oo=pt(()=>{if(He.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Le(e){if(Xe(e)===!1)return!1;let r=e.constructor;if(r===void 0||typeof r!="function")return!0;let n=r.prototype;return!(Xe(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function jo(e){return Le(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function Cb(e){let r=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&r++;return r}var Rb=e=>{let r=typeof e;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${r}`)}},rr=new Set(["string","number","symbol"]),Uo=new Set(["string","number","bigint","boolean","symbol","undefined"]);function se(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function G(e,r,n){let i=new e._zod.constr(r??e._zod.def);return(!r||n?.parent)&&(i._zod.parent=e),i}function y(e){let r=e;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function Mb(e){let r;return new Proxy({},{get(n,i,t){return r??(r=e()),Reflect.get(r,i,t)},set(n,i,t,o){return r??(r=e()),Reflect.set(r,i,t,o)},has(n,i){return r??(r=e()),Reflect.has(r,i)},deleteProperty(n,i){return r??(r=e()),Reflect.deleteProperty(r,i)},ownKeys(n){return r??(r=e()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(n,i){return r??(r=e()),Reflect.getOwnPropertyDescriptor(r,i)},defineProperty(n,i,t){return r??(r=e()),Reflect.defineProperty(r,i,t)}})}function h(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function Do(e){return Object.keys(e).filter(r=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}var No={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Zo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Fb(e,r){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=_e(e._zod.def,{get shape(){let a={};for(let s in r){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);r[s]&&(a[s]=n.shape[s])}return Ae(this,"shape",a),a},checks:[]});return G(e,o)}function Vb(e,r){let n=e._zod.def,i=n.checks;if(i&&i.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=_e(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let s in r){if(!(s in n.shape))throw new Error(`Unrecognized key: "${s}"`);r[s]&&delete a[s]}return Ae(this,"shape",a),a},checks:[]});return G(e,o)}function Jb(e,r){if(!Le(r))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let a in r)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let t=_e(e._zod.def,{get shape(){let o={...e._zod.def.shape,...r};return Ae(this,"shape",o),o}});return G(e,t)}function Bb(e,r){if(!Le(r))throw new Error("Invalid input to safeExtend: expected a plain object");let n=_e(e._zod.def,{get shape(){let i={...e._zod.def.shape,...r};return Ae(this,"shape",i),i}});return G(e,n)}function Wb(e,r){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=_e(e._zod.def,{get shape(){let i={...e._zod.def.shape,...r._zod.def.shape};return Ae(this,"shape",i),i},get catchall(){return r._zod.def.catchall},checks:r._zod.def.checks??[]});return G(e,n)}function qb(e,r,n){let t=r._zod.def.checks;if(t&&t.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=_e(r._zod.def,{get shape(){let s=r._zod.def.shape,c={...s};if(n)for(let l in n){if(!(l in s))throw new Error(`Unrecognized key: "${l}"`);n[l]&&(c[l]=e?new e({type:"optional",innerType:s[l]}):s[l])}else for(let l in s)c[l]=e?new e({type:"optional",innerType:s[l]}):s[l];return Ae(this,"shape",c),c},checks:[]});return G(r,a)}function Gb(e,r,n){let i=_e(r._zod.def,{get shape(){let t=r._zod.def.shape,o={...t};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:t[a]}))}else for(let a in t)o[a]=new e({type:"nonoptional",innerType:t[a]});return Ae(this,"shape",o),o}});return G(r,i)}function Ce(e,r=0){if(e.aborted===!0)return!0;for(let n=r;n{var i;return(i=n).path??(i.path=[]),n.path.unshift(e),n})}function Qt(e){return typeof e=="string"?e:e?.message}function K(e,r,n){let i=e.message?e.message:Qt(e.inst?._zod.def?.error?.(e))??Qt(r?.error?.(e))??Qt(n.customError?.(e))??Qt(n.localeError?.(e))??"Invalid input",{inst:t,continue:o,input:a,...s}=e;return s.path??(s.path=[]),s.message=i,r?.reportInput&&(s.input=a),s}function nr(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function ir(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function v(e){let r=typeof e;switch(r){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return r}function ft(...e){let[r,n,i]=e;return typeof r=="string"?{message:r,code:"custom",input:n,inst:i}:{...r}}function Kb(e){return Object.entries(e).filter(([r,n])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function dp(e){let r=atob(e),n=new Uint8Array(r.length);for(let i=0;ir.toString(16).padStart(2,"0")).join("")}var To=class{constructor(...r){}};var fp=(e,r)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:r,enumerable:!1}),e.message=JSON.stringify(r,dt,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},or=p("$ZodError",fp),te=p("$ZodError",fp,{Parent:Error});function ar(e,r=n=>n.message){let n={},i=[];for(let t of e.issues)t.path.length>0?(n[t.path[0]]=n[t.path[0]]||[],n[t.path[0]].push(r(t))):i.push(r(t));return{formErrors:i,fieldErrors:n}}function sr(e,r=n=>n.message){let n={_errors:[]},i=(t,o=[])=>{for(let a of t.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(s=>i({issues:s},[...o,...a.path]));else if(a.code==="invalid_key")i({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")i({issues:a.issues},[...o,...a.path]);else{let s=[...o,...a.path];if(s.length===0)n._errors.push(r(a));else{let c=n,l=0;for(;ln.message){let n={errors:[]},i=(t,o=[])=>{var a,s;for(let c of t.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(l=>i({issues:l},[...o,...c.path]));else if(c.code==="invalid_key")i({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")i({issues:c.issues},[...o,...c.path]);else{let l=[...o,...c.path];if(l.length===0){n.errors.push(r(c));continue}let u=n,d=0;for(;dtypeof i=="object"?i.key:i);for(let i of n)typeof i=="number"?r.push(`[${i}]`):typeof i=="symbol"?r.push(`[${JSON.stringify(String(i))}]`):/[^\w$]/.test(i)?r.push(`[${JSON.stringify(i)}]`):(r.length&&r.push("."),r.push(i));return r.join("")}function Co(e){let r=[],n=[...e.issues].sort((i,t)=>(i.path??[]).length-(t.path??[]).length);for(let i of n)r.push(`\u2716 ${i.message}`),i.path?.length&&r.push(` \u2192 at ${mp(i.path)}`);return r.join(` +`)}var mt=e=>(r,n,i,t)=>{let o=i?{...i,async:!1}:{async:!1},a=r._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new ue;if(a.issues.length){let s=new(t?.Err??e)(a.issues.map(c=>K(c,o,C())));throw sn(s,t?.callee),s}return a.value},cn=mt(te),gt=e=>async(r,n,i,t)=>{let o=i?{...i,async:!0}:{async:!0},a=r._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let s=new(t?.Err??e)(a.issues.map(c=>K(c,o,C())));throw sn(s,t?.callee),s}return a.value},ln=gt(te),ht=e=>(r,n,i)=>{let t=i?{...i,async:!1}:{async:!1},o=r._zod.run({value:n,issues:[]},t);if(o instanceof Promise)throw new ue;return o.issues.length?{success:!1,error:new(e??or)(o.issues.map(a=>K(a,t,C())))}:{success:!0,data:o.value}},Ro=ht(te),vt=e=>async(r,n,i)=>{let t=i?{...i,async:!0}:{async:!0},o=r._zod.run({value:n,issues:[]},t);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>K(a,t,C())))}:{success:!0,data:o.value}},Mo=vt(te),un=e=>(r,n,i)=>{let t=i?{...i,direction:"backward"}:{direction:"backward"};return mt(e)(r,n,t)},tx=un(te),dn=e=>(r,n,i)=>mt(e)(r,n,i),rx=dn(te),pn=e=>async(r,n,i)=>{let t=i?{...i,direction:"backward"}:{direction:"backward"};return gt(e)(r,n,t)},nx=pn(te),fn=e=>async(r,n,i)=>gt(e)(r,n,i),ix=fn(te),mn=e=>(r,n,i)=>{let t=i?{...i,direction:"backward"}:{direction:"backward"};return ht(e)(r,n,t)},ox=mn(te),gn=e=>(r,n,i)=>ht(e)(r,n,i),ax=gn(te),hn=e=>async(r,n,i)=>{let t=i?{...i,direction:"backward"}:{direction:"backward"};return vt(e)(r,n,t)},sx=hn(te),vn=e=>async(r,n,i)=>vt(e)(r,n,i),cx=vn(te);var ie={};$e(ie,{base64:()=>na,base64url:()=>bn,bigint:()=>ua,boolean:()=>pa,browserEmail:()=>hx,cidrv4:()=>ta,cidrv6:()=>ra,cuid:()=>Fo,cuid2:()=>Vo,date:()=>aa,datetime:()=>ca,domain:()=>xx,duration:()=>Go,e164:()=>oa,email:()=>Ho,emoji:()=>Xo,extendedDuration:()=>lx,guid:()=>Ko,hex:()=>yx,hostname:()=>bx,html5Email:()=>fx,httpProtocol:()=>ia,idnEmail:()=>gx,integer:()=>da,ipv4:()=>Yo,ipv6:()=>Qo,ksuid:()=>Wo,lowercase:()=>ga,mac:()=>ea,md5_base64:()=>_x,md5_base64url:()=>kx,md5_hex:()=>$x,nanoid:()=>qo,null:()=>fa,number:()=>xn,rfc5322Email:()=>mx,sha1_base64:()=>Sx,sha1_base64url:()=>zx,sha1_hex:()=>wx,sha256_base64:()=>Tx,sha256_base64url:()=>Px,sha256_hex:()=>Ix,sha384_base64:()=>Ox,sha384_base64url:()=>jx,sha384_hex:()=>Ex,sha512_base64:()=>Dx,sha512_base64url:()=>Nx,sha512_hex:()=>Ux,string:()=>la,time:()=>sa,ulid:()=>Jo,undefined:()=>ma,unicodeEmail:()=>gp,uppercase:()=>ha,uuid:()=>Ye,uuid4:()=>ux,uuid6:()=>dx,uuid7:()=>px,xid:()=>Bo});var Fo=/^[cC][0-9a-z]{6,}$/,Vo=/^[0-9a-z]+$/,Jo=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Bo=/^[0-9a-vA-V]{20}$/,Wo=/^[A-Za-z0-9]{27}$/,qo=/^[a-zA-Z0-9_-]{21}$/,Go=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,lx=/^[-+]?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)?)??$/,Ko=/^([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})$/,Ye=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,ux=Ye(4),dx=Ye(6),px=Ye(7),Ho=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,fx=/^[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])?)*$/,mx=/^(([^<>()\[\]\\.,;:\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,}))$/,gp=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,gx=gp,hx=/^[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])?)*$/,vx="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Xo(){return new RegExp(vx,"u")}var Yo=/^(?:(?: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])$/,Qo=/^(([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}|:))$/,ea=e=>{let r=se(e??":");return new RegExp(`^(?:[0-9A-F]{2}${r}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${r}){5}[0-9a-f]{2}$`)},ta=/^((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])$/,ra=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,na=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,bn=/^[A-Za-z0-9_-]*$/,bx=/^(?=.{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])?)*\.?$/,xx=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ia=/^https?$/,oa=/^\+[1-9]\d{6,14}$/,hp="(?:(?:\\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])))",aa=new RegExp(`^${hp}$`);function vp(e){let r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${r}`:e.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${e.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function sa(e){return new RegExp(`^${vp(e)}$`)}function ca(e){let r=vp({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let i=`${r}(?:${n.join("|")})`;return new RegExp(`^${hp}T(?:${i})$`)}var la=e=>{let r=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},ua=/^-?\d+n?$/,da=/^-?\d+$/,xn=/^-?\d+(?:\.\d+)?$/,pa=/^(?:true|false)$/i,fa=/^null$/i;var ma=/^undefined$/i;var ga=/^[^A-Z]*$/,ha=/^[^a-z]*$/,yx=/^[0-9a-fA-F]*$/;function cr(e,r){return new RegExp(`^[A-Za-z0-9+/]{${e}}${r}$`)}function lr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var $x=/^[0-9a-fA-F]{32}$/,_x=cr(22,"=="),kx=lr(22),wx=/^[0-9a-fA-F]{40}$/,Sx=cr(27,"="),zx=lr(27),Ix=/^[0-9a-fA-F]{64}$/,Tx=cr(43,"="),Px=lr(43),Ex=/^[0-9a-fA-F]{96}$/,Ox=cr(64,""),jx=lr(64),Ux=/^[0-9a-fA-F]{128}$/,Dx=cr(86,"=="),Nx=lr(86);var Z=p("$ZodCheck",(e,r)=>{var n;e._zod??(e._zod={}),e._zod.def=r,(n=e._zod).onattach??(n.onattach=[])}),xp={number:"number",bigint:"bigint",object:"date"},yn=p("$ZodCheckLessThan",(e,r)=>{Z.init(e,r);let n=xp[typeof r.value];e._zod.onattach.push(i=>{let t=i._zod.bag,o=(r.inclusive?t.maximum:t.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value{(r.inclusive?i.value<=r.value:i.value{Z.init(e,r);let n=xp[typeof r.value];e._zod.onattach.push(i=>{let t=i._zod.bag,o=(r.inclusive?t.minimum:t.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>o&&(r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value)}),e._zod.check=i=>{(r.inclusive?i.value>=r.value:i.value>r.value)||i.issues.push({origin:n,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:i.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),va=p("$ZodCheckMultipleOf",(e,r)=>{Z.init(e,r),e._zod.onattach.push(n=>{var i;(i=n._zod.bag).multipleOf??(i.multipleOf=r.value)}),e._zod.check=n=>{if(typeof n.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%r.value===BigInt(0):Po(n.value,r.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:r.value,input:n.value,inst:e,continue:!r.abort})}}),ba=p("$ZodCheckNumberFormat",(e,r)=>{Z.init(e,r),r.format=r.format||"float64";let n=r.format?.includes("int"),i=n?"int":"number",[t,o]=No[r.format];e._zod.onattach.push(a=>{let s=a._zod.bag;s.format=r.format,s.minimum=t,s.maximum=o,n&&(s.pattern=da)}),e._zod.check=a=>{let s=a.value;if(n){if(!Number.isInteger(s)){a.issues.push({expected:i,format:r.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?a.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!r.abort}):a.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:i,inclusive:!0,continue:!r.abort});return}}so&&a.issues.push({origin:"number",input:s,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!r.abort})}}),xa=p("$ZodCheckBigIntFormat",(e,r)=>{Z.init(e,r);let[n,i]=Zo[r.format];e._zod.onattach.push(t=>{let o=t._zod.bag;o.format=r.format,o.minimum=n,o.maximum=i}),e._zod.check=t=>{let o=t.value;oi&&t.issues.push({origin:"bigint",input:o,code:"too_big",maximum:i,inclusive:!0,inst:e,continue:!r.abort})}}),ya=p("$ZodCheckMaxSize",(e,r)=>{var n;Z.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!Ze(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum{let t=i.value;t.size<=r.maximum||i.issues.push({origin:nr(t),code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),$a=p("$ZodCheckMinSize",(e,r)=>{var n;Z.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!Ze(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(i._zod.bag.minimum=r.minimum)}),e._zod.check=i=>{let t=i.value;t.size>=r.minimum||i.issues.push({origin:nr(t),code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),_a=p("$ZodCheckSizeEquals",(e,r)=>{var n;Z.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!Ze(t)&&t.size!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag;t.minimum=r.size,t.maximum=r.size,t.size=r.size}),e._zod.check=i=>{let t=i.value,o=t.size;if(o===r.size)return;let a=o>r.size;i.issues.push({origin:nr(t),...a?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!r.abort})}}),ka=p("$ZodCheckMaxLength",(e,r)=>{var n;Z.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!Ze(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum{let t=i.value;if(t.length<=r.maximum)return;let a=ir(t);i.issues.push({origin:a,code:"too_big",maximum:r.maximum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),wa=p("$ZodCheckMinLength",(e,r)=>{var n;Z.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!Ze(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>t&&(i._zod.bag.minimum=r.minimum)}),e._zod.check=i=>{let t=i.value;if(t.length>=r.minimum)return;let a=ir(t);i.issues.push({origin:a,code:"too_small",minimum:r.minimum,inclusive:!0,input:t,inst:e,continue:!r.abort})}}),Sa=p("$ZodCheckLengthEquals",(e,r)=>{var n;Z.init(e,r),(n=e._zod.def).when??(n.when=i=>{let t=i.value;return!Ze(t)&&t.length!==void 0}),e._zod.onattach.push(i=>{let t=i._zod.bag;t.minimum=r.length,t.maximum=r.length,t.length=r.length}),e._zod.check=i=>{let t=i.value,o=t.length;if(o===r.length)return;let a=ir(t),s=o>r.length;i.issues.push({origin:a,...s?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:i.value,inst:e,continue:!r.abort})}}),bt=p("$ZodCheckStringFormat",(e,r)=>{var n,i;Z.init(e,r),e._zod.onattach.push(t=>{let o=t._zod.bag;o.format=r.format,r.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(r.pattern))}),r.pattern?(n=e._zod).check??(n.check=t=>{r.pattern.lastIndex=0,!r.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:r.format,input:t.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})}):(i=e._zod).check??(i.check=()=>{})}),za=p("$ZodCheckRegex",(e,r)=>{bt.init(e,r),e._zod.check=n=>{r.pattern.lastIndex=0,!r.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),Ia=p("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=ga),bt.init(e,r)}),Ta=p("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=ha),bt.init(e,r)}),Pa=p("$ZodCheckIncludes",(e,r)=>{Z.init(e,r);let n=se(r.includes),i=new RegExp(typeof r.position=="number"?`^.{${r.position}}${n}`:n);r.pattern=i,e._zod.onattach.push(t=>{let o=t._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(i)}),e._zod.check=t=>{t.value.includes(r.includes,r.position)||t.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:t.value,inst:e,continue:!r.abort})}}),Ea=p("$ZodCheckStartsWith",(e,r)=>{Z.init(e,r);let n=new RegExp(`^${se(r.prefix)}.*`);r.pattern??(r.pattern=n),e._zod.onattach.push(i=>{let t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=i=>{i.value.startsWith(r.prefix)||i.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:i.value,inst:e,continue:!r.abort})}}),Oa=p("$ZodCheckEndsWith",(e,r)=>{Z.init(e,r);let n=new RegExp(`.*${se(r.suffix)}$`);r.pattern??(r.pattern=n),e._zod.onattach.push(i=>{let t=i._zod.bag;t.patterns??(t.patterns=new Set),t.patterns.add(n)}),e._zod.check=i=>{i.value.endsWith(r.suffix)||i.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:i.value,inst:e,continue:!r.abort})}});function bp(e,r,n){e.issues.length&&r.issues.push(...ee(n,e.issues))}var ja=p("$ZodCheckProperty",(e,r)=>{Z.init(e,r),e._zod.check=n=>{let i=r.schema._zod.run({value:n.value[r.property],issues:[]},{});if(i instanceof Promise)return i.then(t=>bp(t,n,r.property));bp(i,n,r.property)}}),Ua=p("$ZodCheckMimeType",(e,r)=>{Z.init(e,r);let n=new Set(r.mime);e._zod.onattach.push(i=>{i._zod.bag.mime=r.mime}),e._zod.check=i=>{n.has(i.value.type)||i.issues.push({code:"invalid_value",values:r.mime,input:i.value.type,inst:e,continue:!r.abort})}}),Da=p("$ZodCheckOverwrite",(e,r)=>{Z.init(e,r),e._zod.check=n=>{n.value=r.tx(n.value)}});var ur=class{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let i=r.split(` +`).filter(a=>a),t=Math.min(...i.map(a=>a.length-a.trimStart().length)),o=i.map(a=>a.slice(t)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let r=Function,n=this?.args,t=[...(this?.content??[""]).map(o=>` ${o}`)];return new r(...n,t.join(` +`))}};var Na={major:4,minor:4,patch:3};var k=p("$ZodType",(e,r)=>{var n;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=Na;let i=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&i.unshift(e);for(let t of i)for(let o of t._zod.onattach)o(e);if(i.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t=(a,s,c)=>{let l=Ce(a),u;for(let d of s){if(d._zod.def.when){if(Ao(a)||!d._zod.def.when(a))continue}else if(l)continue;let f=a.issues.length,g=d._zod.check(a);if(g instanceof Promise&&c?.async===!1)throw new ue;if(u||g instanceof Promise)u=(u??Promise.resolve()).then(async()=>{await g,a.issues.length!==f&&(l||(l=Ce(a,f)))});else{if(a.issues.length===f)continue;l||(l=Ce(a,f))}}return u?u.then(()=>a):a},o=(a,s,c)=>{if(Ce(a))return a.aborted=!0,a;let l=t(s,i,c);if(l instanceof Promise){if(c.async===!1)throw new ue;return l.then(u=>e._zod.parse(u,c))}return e._zod.parse(l,c)};e._zod.run=(a,s)=>{if(s.skipChecks)return e._zod.parse(a,s);if(s.direction==="backward"){let l=e._zod.parse({value:a.value,issues:[]},{...s,skipChecks:!0});return l instanceof Promise?l.then(u=>o(u,a,s)):o(l,a,s)}let c=e._zod.parse(a,s);if(c instanceof Promise){if(s.async===!1)throw new ue;return c.then(l=>t(l,i,s))}return t(c,i,s)}}z(e,"~standard",()=>({validate:t=>{try{let o=Ro(e,t);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Mo(e,t).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Qe=p("$ZodString",(e,r)=>{k.init(e,r),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??la(e._zod.bag),e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),D=p("$ZodStringFormat",(e,r)=>{bt.init(e,r),Qe.init(e,r)}),Aa=p("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=Ko),D.init(e,r)}),La=p("$ZodUUID",(e,r)=>{if(r.version){let i={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(i===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=Ye(i))}else r.pattern??(r.pattern=Ye());D.init(e,r)}),Ca=p("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=Ho),D.init(e,r)}),Ra=p("$ZodURL",(e,r)=>{D.init(e,r),e._zod.check=n=>{try{let i=n.value.trim();if(!r.normalize&&r.protocol?.source===ia.source&&!/^https?:\/\//i.test(i)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!r.abort});return}let t=new URL(i);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(t.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:n.value,inst:e,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:n.value,inst:e,continue:!r.abort})),r.normalize?n.value=t.href:n.value=i;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!r.abort})}}}),Ma=p("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=Xo()),D.init(e,r)}),Fa=p("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=qo),D.init(e,r)}),Va=p("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=Fo),D.init(e,r)}),Ja=p("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=Vo),D.init(e,r)}),Ba=p("$ZodULID",(e,r)=>{r.pattern??(r.pattern=Jo),D.init(e,r)}),Wa=p("$ZodXID",(e,r)=>{r.pattern??(r.pattern=Bo),D.init(e,r)}),qa=p("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=Wo),D.init(e,r)}),Ga=p("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=ca(r)),D.init(e,r)}),Ka=p("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=aa),D.init(e,r)}),Ha=p("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=sa(r)),D.init(e,r)}),Xa=p("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=Go),D.init(e,r)}),Ya=p("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=Yo),D.init(e,r),e._zod.bag.format="ipv4"}),Qa=p("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=Qo),D.init(e,r),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!r.abort})}}}),es=p("$ZodMAC",(e,r)=>{r.pattern??(r.pattern=ea(r.delimiter)),D.init(e,r),e._zod.bag.format="mac"}),ts=p("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=ta),D.init(e,r)}),rs=p("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=ra),D.init(e,r),e._zod.check=n=>{let i=n.value.split("/");try{if(i.length!==2)throw new Error;let[t,o]=i;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${t}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!r.abort})}}});function ns(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var is=p("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=na),D.init(e,r),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{ns(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!r.abort})}});function Np(e){if(!bn.test(e))return!1;let r=e.replace(/[-_]/g,i=>i==="-"?"+":"/"),n=r.padEnd(Math.ceil(r.length/4)*4,"=");return ns(n)}var os=p("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=bn),D.init(e,r),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Np(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!r.abort})}}),as=p("$ZodE164",(e,r)=>{r.pattern??(r.pattern=oa),D.init(e,r)});function Zp(e,r=null){try{let n=e.split(".");if(n.length!==3)return!1;let[i]=n;if(!i)return!1;let t=JSON.parse(atob(i));return!("typ"in t&&t?.typ!=="JWT"||!t.alg||r&&(!("alg"in t)||t.alg!==r))}catch{return!1}}var ss=p("$ZodJWT",(e,r)=>{D.init(e,r),e._zod.check=n=>{Zp(n.value,r.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!r.abort})}}),cs=p("$ZodCustomStringFormat",(e,r)=>{D.init(e,r),e._zod.check=n=>{r.fn(n.value)||n.issues.push({code:"invalid_format",format:r.format,input:n.value,inst:e,continue:!r.abort})}}),zn=p("$ZodNumber",(e,r)=>{k.init(e,r),e._zod.pattern=e._zod.bag.pattern??xn,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=Number(n.value)}catch{}let t=n.value;if(typeof t=="number"&&!Number.isNaN(t)&&Number.isFinite(t))return n;let o=typeof t=="number"?Number.isNaN(t)?"NaN":Number.isFinite(t)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:t,inst:e,...o?{received:o}:{}}),n}}),ls=p("$ZodNumberFormat",(e,r)=>{ba.init(e,r),zn.init(e,r)}),dr=p("$ZodBoolean",(e,r)=>{k.init(e,r),e._zod.pattern=pa,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=!!n.value}catch{}let t=n.value;return typeof t=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:t,inst:e}),n}}),In=p("$ZodBigInt",(e,r)=>{k.init(e,r),e._zod.pattern=ua,e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),us=p("$ZodBigIntFormat",(e,r)=>{xa.init(e,r),In.init(e,r)}),ds=p("$ZodSymbol",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:t,inst:e}),n}}),ps=p("$ZodUndefined",(e,r)=>{k.init(e,r),e._zod.pattern=ma,e._zod.values=new Set([void 0]),e._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:t,inst:e}),n}}),fs=p("$ZodNull",(e,r)=>{k.init(e,r),e._zod.pattern=fa,e._zod.values=new Set([null]),e._zod.parse=(n,i)=>{let t=n.value;return t===null||n.issues.push({expected:"null",code:"invalid_type",input:t,inst:e}),n}}),ms=p("$ZodAny",(e,r)=>{k.init(e,r),e._zod.parse=n=>n}),gs=p("$ZodUnknown",(e,r)=>{k.init(e,r),e._zod.parse=n=>n}),hs=p("$ZodNever",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),vs=p("$ZodVoid",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return typeof t>"u"||n.issues.push({expected:"void",code:"invalid_type",input:t,inst:e}),n}}),bs=p("$ZodDate",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>{if(r.coerce)try{n.value=new Date(n.value)}catch{}let t=n.value,o=t instanceof Date;return o&&!Number.isNaN(t.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:t,...o?{received:"Invalid Date"}:{},inst:e}),n}});function $p(e,r,n){e.issues.length&&r.issues.push(...ee(n,e.issues)),r.value[n]=e.value}var xs=p("$ZodArray",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!Array.isArray(t))return n.issues.push({expected:"array",code:"invalid_type",input:t,inst:e}),n;n.value=Array(t.length);let o=[];for(let a=0;a$p(l,n,a))):$p(c,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function Sn(e,r,n,i,t,o){let a=n in i;if(e.issues.length){if(t&&o&&!a)return;r.issues.push(...ee(n,e.issues))}if(!a&&!t){e.issues.length||r.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(r.value[n]=void 0):r.value[n]=e.value}function Ap(e){let r=Object.keys(e.shape);for(let i of r)if(!e.shape?.[i]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${i}": expected a Zod schema`);let n=Do(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(n)}}function Lp(e,r,n,i,t,o){let a=[],s=t.keySet,c=t.catchall._zod,l=c.def.type,u=c.optin==="optional",d=c.optout==="optional";for(let f in r){if(f==="__proto__"||s.has(f))continue;if(l==="never"){a.push(f);continue}let g=c.run({value:r[f],issues:[]},i);g instanceof Promise?e.push(g.then(x=>Sn(x,n,f,r,u,d))):Sn(g,n,f,r,u,d)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:r,inst:o}),e.length?Promise.all(e).then(()=>n):n}var Cp=p("$ZodObject",(e,r)=>{if(k.init(e,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){let s=r.shape;Object.defineProperty(r,"shape",{get:()=>{let c={...s};return Object.defineProperty(r,"shape",{value:c}),c}})}let i=pt(()=>Ap(r));z(e._zod,"propValues",()=>{let s=r.shape,c={};for(let l in s){let u=s[l]._zod;if(u.values){c[l]??(c[l]=new Set);for(let d of u.values)c[l].add(d)}}return c});let t=Xe,o=r.catchall,a;e._zod.parse=(s,c)=>{a??(a=i.value);let l=s.value;if(!t(l))return s.issues.push({expected:"object",code:"invalid_type",input:l,inst:e}),s;s.value={};let u=[],d=a.shape;for(let f of a.keys){let g=d[f],x=g._zod.optin==="optional",T=g._zod.optout==="optional",w=g._zod.run({value:l[f],issues:[]},c);w instanceof Promise?u.push(w.then(M=>Sn(M,s,f,l,x,T))):Sn(w,s,f,l,x,T)}return o?Lp(u,l,s,c,i.value,e):u.length?Promise.all(u).then(()=>s):s}}),ys=p("$ZodObjectJIT",(e,r)=>{Cp.init(e,r);let n=e._zod.parse,i=pt(()=>Ap(r)),t=f=>{let g=new ur(["shape","payload","ctx"]),x=i.value,T=F=>{let P=an(F);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};g.write("const input = payload.value;");let w=Object.create(null),M=0;for(let F of x.keys)w[F]=`key_${M++}`;g.write("const newResult = {};");for(let F of x.keys){let P=w[F],A=an(F),fe=f[F],qt=fe?._zod?.optin==="optional",Pe=fe?._zod?.optout==="optional";g.write(`const ${P} = ${T(F)};`),qt&&Pe?g.write(` + if (${P}.issues.length) { + if (${A} in input) { + payload.issues = payload.issues.concat(${P}.issues.map(iss => ({ ...iss, - path: iss.path ? [${Z}, ...iss.path] : [${Z}] + path: iss.path ? [${A}, ...iss.path] : [${A}] }))); } } - if (${E}.value === undefined) { - if (${Z} in input) { - newResult[${Z}] = undefined; + if (${P}.value === undefined) { + if (${A} in input) { + newResult[${A}] = undefined; } } else { - newResult[${Z}] = ${E}.value; + newResult[${A}] = ${P}.value; } - `):au?h.write(` - if (${E}.issues.length) { - payload.issues = payload.issues.concat(${E}.issues.map(iss => ({ + `):qt?g.write(` + if (${P}.issues.length) { + payload.issues = payload.issues.concat(${P}.issues.map(iss => ({ ...iss, - path: iss.path ? [${Z}, ...iss.path] : [${Z}] + path: iss.path ? [${A}, ...iss.path] : [${A}] }))); } - if (${E}.value === undefined) { - if (${Z} in input) { - newResult[${Z}] = undefined; + if (${P}.value === undefined) { + if (${A} in input) { + newResult[${A}] = undefined; } } else { - newResult[${Z}] = ${E}.value; + newResult[${A}] = ${P}.value; } - `):h.write(` - const ${E}_present = ${Z} in input; - if (${E}.issues.length) { - payload.issues = payload.issues.concat(${E}.issues.map(iss => ({ + `):g.write(` + const ${P}_present = ${A} in input; + if (${P}.issues.length) { + payload.issues = payload.issues.concat(${P}.issues.map(iss => ({ ...iss, - path: iss.path ? [${Z}, ...iss.path] : [${Z}] + path: iss.path ? [${A}, ...iss.path] : [${A}] }))); } - if (!${E}_present && !${E}.issues.length) { + if (!${P}_present && !${P}.issues.length) { payload.issues.push({ code: "invalid_type", expected: "nonoptional", input: undefined, - path: [${Z}] + path: [${A}] }); } - if (${E}_present) { - if (${E}.value === undefined) { - newResult[${Z}] = undefined; + if (${P}_present) { + if (${P}.value === undefined) { + newResult[${A}] = undefined; } else { - newResult[${Z}] = ${E}.value; + newResult[${A}] = ${P}.value; } } - `)}h.write("payload.value = newResult;"),h.write("return payload;");let Bn=h.compile();return(ee,E)=>Bn($,ee,E)},n,a=we,c=!ke.jitless,s=c&&Qn.value,d=r.catchall,m;e._zod.parse=($,h)=>{m??(m=o.value);let x=$.value;return a(x)?c&&s&&h?.async===!1&&h.jitless!==!0?(n||(n=t(r.shape)),$=n($,h),d?Wu([],x,$,h,m,e):$):i($,h):($.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),$)}});function Tu(e,r,i,o){for(let n of e)if(n.issues.length===0)return r.value=n.value,r;let t=e.filter(n=>!he(n));return t.length===1?(r.value=t[0].value,t[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:i,errors:e.map(n=>n.issues.map(a=>M(a,o,D())))}),r)}var Pt=l("$ZodUnion",(e,r)=>{k.init(e,r),z(e._zod,"optin",()=>r.options.some(o=>o._zod.optin==="optional")?"optional":void 0),z(e._zod,"optout",()=>r.options.some(o=>o._zod.optout==="optional")?"optional":void 0),z(e._zod,"values",()=>{if(r.options.every(o=>o._zod.values))return new Set(r.options.flatMap(o=>Array.from(o._zod.values)))}),z(e._zod,"pattern",()=>{if(r.options.every(o=>o._zod.pattern)){let o=r.options.map(t=>t._zod.pattern);return new RegExp(`^(${o.map(t=>vt(t.source)).join("|")})$`)}});let i=r.options.length===1?r.options[0]._zod.run:null;e._zod.parse=(o,t)=>{if(i)return i(o,t);let n=!1,a=[];for(let c of r.options){let u=c._zod.run({value:o.value,issues:[]},t);if(u instanceof Promise)a.push(u),n=!0;else{if(u.issues.length===0)return u;a.push(u)}}return n?Promise.all(a).then(c=>Tu(c,o,e,t)):Tu(a,o,e,t)}});function Ou(e,r,i,o){let t=e.filter(n=>n.issues.length===0);return t.length===1?(r.value=t[0].value,r):(t.length===0?r.issues.push({code:"invalid_union",input:r.value,inst:i,errors:e.map(n=>n.issues.map(a=>M(a,o,D())))}):r.issues.push({code:"invalid_union",input:r.value,inst:i,errors:[],inclusive:!1}),r)}var Jo=l("$ZodXor",(e,r)=>{Pt.init(e,r),r.inclusive=!1;let i=r.options.length===1?r.options[0]._zod.run:null;e._zod.parse=(o,t)=>{if(i)return i(o,t);let n=!1,a=[];for(let c of r.options){let u=c._zod.run({value:o.value,issues:[]},t);u instanceof Promise?(a.push(u),n=!0):a.push(u)}return n?Promise.all(a).then(c=>Ou(c,o,e,t)):Ou(a,o,e,t)}}),Bo=l("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,Pt.init(e,r);let i=e._zod.parse;z(e._zod,"propValues",()=>{let t={};for(let n of r.options){let a=n._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(n)}"`);for(let[c,u]of Object.entries(a)){t[c]||(t[c]=new Set);for(let s of u)t[c].add(s)}}return t});let o=Ne(()=>{let t=r.options,n=new Map;for(let a of t){let c=a._zod.propValues?.[r.discriminator];if(!c||c.size===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(a)}"`);for(let u of c){if(n.has(u))throw new Error(`Duplicate discriminator value "${String(u)}"`);n.set(u,a)}}return n});e._zod.parse=(t,n)=>{let a=t.value;if(!we(a))return t.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),t;let c=o.value.get(a?.[r.discriminator]);return c?c._zod.run(t,n):r.unionFallback||n.direction==="backward"?i(t,n):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,options:Array.from(o.value.keys()),input:a,path:[r.discriminator],inst:e}),t)}}),Wo=l("$ZodIntersection",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>{let t=i.value,n=r.left._zod.run({value:t,issues:[]},o),a=r.right._zod.run({value:t,issues:[]},o);return n instanceof Promise||a instanceof Promise?Promise.all([n,a]).then(([u,s])=>Uu(i,u,s)):Uu(i,n,a)}});function io(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(ge(e)&&ge(r)){let i=Object.keys(r),o=Object.keys(e).filter(n=>i.indexOf(n)!==-1),t={...e,...r};for(let n of o){let a=io(e[n],r[n]);if(!a.valid)return{valid:!1,mergeErrorPath:[n,...a.mergeErrorPath]};t[n]=a.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};let i=[];for(let o=0;oc.l&&c.r).map(([c])=>c);if(n.length&&t&&e.issues.push({...t,keys:n}),he(e))return e;let a=io(r.value,i.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var kr=l("$ZodTuple",(e,r)=>{k.init(e,r);let i=r.items;e._zod.parse=(o,t)=>{let n=o.value;if(!Array.isArray(n))return o.issues.push({input:n,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let a=[],c=Eu(i,"optin"),u=Eu(i,"optout");if(!r.rest){if(n.lengthi.length&&o.issues.push({code:"too_big",maximum:i.length,inclusive:!0,input:n,inst:e,origin:"array"})}let s=new Array(i.length);for(let d=0;d{s[d]=$})):s[d]=m}if(r.rest){let d=i.length-1,m=n.slice(i.length);for(let $ of m){d++;let h=r.rest._zod.run({value:$,issues:[]},t);h instanceof Promise?a.push(h.then(x=>Du(x,o,d))):Du(h,o,d)}}return a.length?Promise.all(a).then(()=>Nu(s,o,i,n,u)):Nu(s,o,i,n,u)}});function Eu(e,r){for(let i=e.length-1;i>=0;i--)if(e[i]._zod[r]!=="optional")return i+1;return 0}function Du(e,r,i){e.issues.length&&r.issues.push(...J(i,e.issues)),r.value[i]=e.value}function Nu(e,r,i,o,t){for(let n=0;n=t){r.value.length=n;break}r.issues.push(...J(n,a.issues))}r.value[n]=a.value}for(let n=r.value.length-1;n>=o.length&&(i[n]._zod.optout==="optional"&&r.value[n]===void 0);n--)r.value.length=n;return r}var Go=l("$ZodRecord",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>{let t=i.value;if(!ge(t))return i.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),i;let n=[],a=r.keyType._zod.values;if(a){i.value={};let c=new Set;for(let s of a)if(typeof s=="string"||typeof s=="number"||typeof s=="symbol"){c.add(typeof s=="number"?s.toString():s);let d=r.keyType._zod.run({value:s,issues:[]},o);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){i.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(h=>M(h,o,D())),input:s,path:[s],inst:e});continue}let m=d.value,$=r.valueType._zod.run({value:t[s],issues:[]},o);$ instanceof Promise?n.push($.then(h=>{h.issues.length&&i.issues.push(...J(s,h.issues)),i.value[m]=h.value})):($.issues.length&&i.issues.push(...J(s,$.issues)),i.value[m]=$.value)}let u;for(let s in t)c.has(s)||(u=u??[],u.push(s));u&&u.length>0&&i.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:u})}else{i.value={};for(let c of Reflect.ownKeys(t)){if(c==="__proto__"||!Object.prototype.propertyIsEnumerable.call(t,c))continue;let u=r.keyType._zod.run({value:c,issues:[]},o);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof c=="string"&&fr.test(c)&&u.issues.length){let m=r.keyType._zod.run({value:Number(c),issues:[]},o);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(u=m)}if(u.issues.length){r.mode==="loose"?i.value[c]=t[c]:i.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(m=>M(m,o,D())),input:c,path:[c],inst:e});continue}let d=r.valueType._zod.run({value:t[c],issues:[]},o);d instanceof Promise?n.push(d.then(m=>{m.issues.length&&i.issues.push(...J(c,m.issues)),i.value[u.value]=m.value})):(d.issues.length&&i.issues.push(...J(c,d.issues)),i.value[u.value]=d.value)}}return n.length?Promise.all(n).then(()=>i):i}}),Ko=l("$ZodMap",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>{let t=i.value;if(!(t instanceof Map))return i.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),i;let n=[];i.value=new Map;for(let[a,c]of t){let u=r.keyType._zod.run({value:a,issues:[]},o),s=r.valueType._zod.run({value:c,issues:[]},o);u instanceof Promise||s instanceof Promise?n.push(Promise.all([u,s]).then(([d,m])=>{Zu(d,m,i,a,t,e,o)})):Zu(u,s,i,a,t,e,o)}return n.length?Promise.all(n).then(()=>i):i}});function Zu(e,r,i,o,t,n,a){e.issues.length&&($t.has(typeof o)?i.issues.push(...J(o,e.issues)):i.issues.push({code:"invalid_key",origin:"map",input:t,inst:n,issues:e.issues.map(c=>M(c,a,D()))})),r.issues.length&&($t.has(typeof o)?i.issues.push(...J(o,r.issues)):i.issues.push({origin:"map",code:"invalid_element",input:t,inst:n,key:o,issues:r.issues.map(c=>M(c,a,D()))})),i.value.set(e.value,r.value)}var qo=l("$ZodSet",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>{let t=i.value;if(!(t instanceof Set))return i.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),i;let n=[];i.value=new Set;for(let a of t){let c=r.valueType._zod.run({value:a,issues:[]},o);c instanceof Promise?n.push(c.then(u=>Lu(u,i))):Lu(c,i)}return n.length?Promise.all(n).then(()=>i):i}});function Lu(e,r){e.issues.length&&r.issues.push(...e.issues),r.value.add(e.value)}var Ho=l("$ZodEnum",(e,r)=>{k.init(e,r);let i=ht(r.entries),o=new Set(i);e._zod.values=o,e._zod.pattern=new RegExp(`^(${i.filter(t=>$t.has(typeof t)).map(t=>typeof t=="string"?H(t):t.toString()).join("|")})$`),e._zod.parse=(t,n)=>{let a=t.value;return o.has(a)||t.issues.push({code:"invalid_value",values:i,input:a,inst:e}),t}}),Xo=l("$ZodLiteral",(e,r)=>{if(k.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");let i=new Set(r.values);e._zod.values=i,e._zod.pattern=new RegExp(`^(${r.values.map(o=>typeof o=="string"?H(o):o?H(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,t)=>{let n=o.value;return i.has(n)||o.issues.push({code:"invalid_value",values:r.values,input:n,inst:e}),o}}),Yo=l("$ZodFile",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>{let t=i.value;return t instanceof File||i.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),i}}),Qo=l("$ZodTransform",(e,r)=>{k.init(e,r),e._zod.optin="optional",e._zod.parse=(i,o)=>{if(o.direction==="backward")throw new pe(e.constructor.name);let t=r.transform(i.value,i);if(o.async)return(t instanceof Promise?t:Promise.resolve(t)).then(a=>(i.value=a,i.fallback=!0,i));if(t instanceof Promise)throw new X;return i.value=t,i.fallback=!0,i}});function Au(e,r){return r===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var wr=l("$ZodOptional",(e,r)=>{k.init(e,r),e._zod.optin="optional",e._zod.optout="optional",z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),z(e._zod,"pattern",()=>{let i=r.innerType._zod.pattern;return i?new RegExp(`^(${vt(i.source)})?$`):void 0}),e._zod.parse=(i,o)=>{if(r.innerType._zod.optin==="optional"){let t=i.value,n=r.innerType._zod.run(i,o);return n instanceof Promise?n.then(a=>Au(a,t)):Au(n,t)}return i.value===void 0?i:r.innerType._zod.run(i,o)}}),ea=l("$ZodExactOptional",(e,r)=>{wr.init(e,r),z(e._zod,"values",()=>r.innerType._zod.values),z(e._zod,"pattern",()=>r.innerType._zod.pattern),e._zod.parse=(i,o)=>r.innerType._zod.run(i,o)}),ta=l("$ZodNullable",(e,r)=>{k.init(e,r),z(e._zod,"optin",()=>r.innerType._zod.optin),z(e._zod,"optout",()=>r.innerType._zod.optout),z(e._zod,"pattern",()=>{let i=r.innerType._zod.pattern;return i?new RegExp(`^(${vt(i.source)}|null)$`):void 0}),z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(i,o)=>i.value===null?i:r.innerType._zod.run(i,o)}),ra=l("$ZodDefault",(e,r)=>{k.init(e,r),e._zod.optin="optional",z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(i,o)=>{if(o.direction==="backward")return r.innerType._zod.run(i,o);if(i.value===void 0)return i.value=r.defaultValue,i;let t=r.innerType._zod.run(i,o);return t instanceof Promise?t.then(n=>Cu(n,r)):Cu(t,r)}});function Cu(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}var na=l("$ZodPrefault",(e,r)=>{k.init(e,r),e._zod.optin="optional",z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(i,o)=>(o.direction==="backward"||i.value===void 0&&(i.value=r.defaultValue),r.innerType._zod.run(i,o))}),ia=l("$ZodNonOptional",(e,r)=>{k.init(e,r),z(e._zod,"values",()=>{let i=r.innerType._zod.values;return i?new Set([...i].filter(o=>o!==void 0)):void 0}),e._zod.parse=(i,o)=>{let t=r.innerType._zod.run(i,o);return t instanceof Promise?t.then(n=>Ru(n,e)):Ru(t,e)}});function Ru(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}var oa=l("$ZodSuccess",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>{if(o.direction==="backward")throw new pe("ZodSuccess");let t=r.innerType._zod.run(i,o);return t instanceof Promise?t.then(n=>(i.value=n.issues.length===0,i)):(i.value=t.issues.length===0,i)}}),aa=l("$ZodCatch",(e,r)=>{k.init(e,r),e._zod.optin="optional",z(e._zod,"optout",()=>r.innerType._zod.optout),z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(i,o)=>{if(o.direction==="backward")return r.innerType._zod.run(i,o);let t=r.innerType._zod.run(i,o);return t instanceof Promise?t.then(n=>(i.value=n.value,n.issues.length&&(i.value=r.catchValue({...i,error:{issues:n.issues.map(a=>M(a,o,D()))},input:i.value}),i.issues=[],i.fallback=!0),i)):(i.value=t.value,t.issues.length&&(i.value=r.catchValue({...i,error:{issues:t.issues.map(n=>M(n,o,D()))},input:i.value}),i.issues=[],i.fallback=!0),i)}}),ca=l("$ZodNaN",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>((typeof i.value!="number"||!Number.isNaN(i.value))&&i.issues.push({input:i.value,inst:e,expected:"nan",code:"invalid_type"}),i)}),zr=l("$ZodPipe",(e,r)=>{k.init(e,r),z(e._zod,"values",()=>r.in._zod.values),z(e._zod,"optin",()=>r.in._zod.optin),z(e._zod,"optout",()=>r.out._zod.optout),z(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(i,o)=>{if(o.direction==="backward"){let n=r.out._zod.run(i,o);return n instanceof Promise?n.then(a=>vr(a,r.in,o)):vr(n,r.in,o)}let t=r.in._zod.run(i,o);return t instanceof Promise?t.then(n=>vr(n,r.out,o)):vr(t,r.out,o)}});function vr(e,r,i){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},i)}var jt=l("$ZodCodec",(e,r)=>{k.init(e,r),z(e._zod,"values",()=>r.in._zod.values),z(e._zod,"optin",()=>r.in._zod.optin),z(e._zod,"optout",()=>r.out._zod.optout),z(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(i,o)=>{if((o.direction||"forward")==="forward"){let n=r.in._zod.run(i,o);return n instanceof Promise?n.then(a=>$r(a,r,o)):$r(n,r,o)}else{let n=r.out._zod.run(i,o);return n instanceof Promise?n.then(a=>$r(a,r,o)):$r(n,r,o)}}});function $r(e,r,i){if(e.issues.length)return e.aborted=!0,e;if((i.direction||"forward")==="forward"){let t=r.transform(e.value,e);return t instanceof Promise?t.then(n=>_r(e,n,r.out,i)):_r(e,t,r.out,i)}else{let t=r.reverseTransform(e.value,e);return t instanceof Promise?t.then(n=>_r(e,n,r.in,i)):_r(e,t,r.in,i)}}function _r(e,r,i,o){return e.issues.length?(e.aborted=!0,e):i._zod.run({value:r,issues:e.issues},o)}var sa=l("$ZodPreprocess",(e,r)=>{zr.init(e,r)}),ua=l("$ZodReadonly",(e,r)=>{k.init(e,r),z(e._zod,"propValues",()=>r.innerType._zod.propValues),z(e._zod,"values",()=>r.innerType._zod.values),z(e._zod,"optin",()=>r.innerType?._zod?.optin),z(e._zod,"optout",()=>r.innerType?._zod?.optout),e._zod.parse=(i,o)=>{if(o.direction==="backward")return r.innerType._zod.run(i,o);let t=r.innerType._zod.run(i,o);return t instanceof Promise?t.then(Mu):Mu(t)}});function Mu(e){return e.value=Object.freeze(e.value),e}var la=l("$ZodTemplateLiteral",(e,r)=>{k.init(e,r);let i=[];for(let o of r.parts)if(typeof o=="object"&&o!==null){if(!o._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let t=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${o._zod.traits}`);let n=t.startsWith("^")?1:0,a=t.endsWith("$")?t.length-1:t.length;i.push(t.slice(n,a))}else if(o===null||ti.has(typeof o))i.push(H(`${o}`));else throw new Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${i.join("")}$`),e._zod.parse=(o,t)=>typeof o.value!="string"?(o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(o.value)||o.issues.push({input:o.value,inst:e,code:"invalid_format",format:r.format??"template_literal",pattern:e._zod.pattern.source}),o)}),da=l("$ZodFunction",(e,r)=>(k.init(e,r),e._def=r,e._zod.def=r,e.implement=i=>{if(typeof i!="function")throw new Error("implement() must be called with a function");return function(...o){let t=e._def.input?nr(e._def.input,o):o,n=Reflect.apply(i,this,t);return e._def.output?nr(e._def.output,n):n}},e.implementAsync=i=>{if(typeof i!="function")throw new Error("implementAsync() must be called with a function");return async function(...o){let t=e._def.input?await ir(e._def.input,o):o,n=await Reflect.apply(i,this,t);return e._def.output?await ir(e._def.output,n):n}},e._zod.parse=(i,o)=>typeof i.value!="function"?(i.issues.push({code:"invalid_type",expected:"function",input:i.value,inst:e}),i):(e._def.output&&e._def.output._zod.def.type==="promise"?i.value=e.implementAsync(i.value):i.value=e.implement(i.value),i),e.input=(...i)=>{let o=e.constructor;return Array.isArray(i[0])?new o({type:"function",input:new kr({type:"tuple",items:i[0],rest:i[1]}),output:e._def.output}):new o({type:"function",input:i[0],output:e._def.output})},e.output=i=>{let o=e.constructor;return new o({type:"function",input:e._def.input,output:i})},e)),pa=l("$ZodPromise",(e,r)=>{k.init(e,r),e._zod.parse=(i,o)=>Promise.resolve(i.value).then(t=>r.innerType._zod.run({value:t,issues:[]},o))}),ma=l("$ZodLazy",(e,r)=>{k.init(e,r),z(e._zod,"innerType",()=>{let i=r;return i._cachedInner||(i._cachedInner=r.getter()),i._cachedInner}),z(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),z(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),z(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),z(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(i,o)=>e._zod.innerType._zod.run(i,o)}),fa=l("$ZodCustom",(e,r)=>{T.init(e,r),k.init(e,r),e._zod.parse=(i,o)=>i,e._zod.check=i=>{let o=i.value,t=r.fn(o);if(t instanceof Promise)return t.then(n=>Fu(n,i,o,e));Fu(t,i,o,e)}});function Fu(e,r,i,o){if(!e){let t={code:"custom",input:i,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};o._zod.def.params&&(t.params=o._zod.def.params),r.issues.push(Ze(t))}}var Ot={};ae(Ot,{ar:()=>Ku,az:()=>qu,be:()=>Xu,bg:()=>Yu,ca:()=>Qu,cs:()=>el,da:()=>tl,de:()=>rl,el:()=>nl,en:()=>Sr,eo:()=>il,es:()=>ol,fa:()=>al,fi:()=>cl,fr:()=>sl,frCA:()=>ul,he:()=>ll,hr:()=>dl,hu:()=>pl,hy:()=>fl,id:()=>gl,is:()=>hl,it:()=>vl,ja:()=>$l,ka:()=>_l,kh:()=>bl,km:()=>Ir,ko:()=>yl,lt:()=>kl,mk:()=>wl,ms:()=>zl,nl:()=>Sl,no:()=>Il,ota:()=>Pl,pl:()=>Tl,ps:()=>jl,pt:()=>Ol,ro:()=>Ul,ru:()=>Dl,sl:()=>Nl,sv:()=>Zl,ta:()=>Ll,th:()=>Al,tr:()=>Cl,ua:()=>Rl,uk:()=>Pr,ur:()=>Ml,uz:()=>Fl,vi:()=>Vl,yo:()=>Wl,zhCN:()=>Jl,zhTW:()=>Bl});var Hm=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function r(t){return e[t]??null}let i={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},o={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${t.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${n}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${c}`}case"invalid_value":return t.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${f(t.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${t.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${t.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${n} ${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${t.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${n} ${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${t.prefix}"`:n.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${n.suffix}"`:n.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${n.includes}"`:n.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${n.pattern}`:`${i[n.format]??t.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${t.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${t.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${t.keys.length>1?"\u0629":""}: ${p(t.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Ku(){return{localeError:Hm()}}var Xm=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function r(t){return e[t]??null}let i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${t.expected}, daxil olan ${c}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${n}, daxil olan ${c}`}case"invalid_value":return t.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${f(t.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${t.origin??"d\u0259y\u0259r"} ${n}${t.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${t.origin??"d\u0259y\u0259r"} ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${n}${t.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${n.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:n.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${n.suffix}" il\u0259 bitm\u0259lidir`:n.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${n.includes}" daxil olmal\u0131d\u0131r`:n.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${n.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${i[n.format]??t.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${t.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${t.keys.length>1?"lar":""}: ${p(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${t.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function qu(){return{localeError:Xm()}}function Hu(e,r,i,o){let t=Math.abs(e),n=t%10,a=t%100;return a>=11&&a<=19?o:n===1?r:n>=2&&n<=4?i:o}var Ym=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function r(t){return e[t]??null}let i={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},o={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${t.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${n}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${c}`}case"invalid_value":return t.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${f(t.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);if(a){let c=Number(t.maximum),u=Hu(c,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${t.maximum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);if(a){let c=Number(t.minimum),u=Hu(c,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${n}${t.minimum.toString()} ${u}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${n.includes}"`:n.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${i[n.format]??t.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${t.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${p(t.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${t.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${t.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Xu(){return{localeError:Ym()}}var Qm=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function r(t){return e[t]??null}let i={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${t.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${c}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${f(t.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${t.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${n}${t.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;if(n.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${n.prefix}"`;if(n.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${n.suffix}"`;if(n.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${n.includes}"`;if(n.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${n.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return n.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),n.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),n.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${i[n.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${t.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${t.keys.length>1?"\u043E\u0432\u0435":""}: ${p(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${t.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Yu(){return{localeError:Qm()}}var ef=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function r(t){return e[t]??null}let i={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${t.expected}, s'ha rebut ${c}`:`Tipus inv\xE0lid: s'esperava ${n}, s'ha rebut ${c}`}case"invalid_value":return t.values.length===1?`Valor inv\xE0lid: s'esperava ${f(t.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${p(t.values," o ")}`;case"too_big":{let n=t.inclusive?"com a m\xE0xim":"menys de",a=r(t.origin);return a?`Massa gran: s'esperava que ${t.origin??"el valor"} contingu\xE9s ${n} ${t.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${n} ${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?"com a m\xEDnim":"m\xE9s de",a=r(t.origin);return a?`Massa petit: s'esperava que ${t.origin} contingu\xE9s ${n} ${t.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${t.origin} fos ${n} ${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${n.prefix}"`:n.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${n.suffix}"`:n.format==="includes"?`Format inv\xE0lid: ha d'incloure "${n.includes}"`:n.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${n.pattern}`:`Format inv\xE0lid per a ${i[n.format]??t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${t.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${t.origin}`;default:return"Entrada inv\xE0lida"}}};function Qu(){return{localeError:ef()}}var tf=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function r(t){return e[t]??null}let i={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},o={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${t.expected}, obdr\u017Eeno ${c}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${n}, obdr\u017Eeno ${c}`}case"invalid_value":return t.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${f(t.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${t.origin??"hodnota"} mus\xED m\xEDt ${n}${t.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${t.origin??"hodnota"} mus\xED b\xFDt ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${t.origin??"hodnota"} mus\xED m\xEDt ${n}${t.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${t.origin??"hodnota"} mus\xED b\xFDt ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${n.prefix}"`:n.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${n.suffix}"`:n.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${n.includes}"`:n.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${n.pattern}`:`Neplatn\xFD form\xE1t ${i[n.format]??t.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${t.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${p(t.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${t.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${t.origin}`;default:return"Neplatn\xFD vstup"}}};function el(){return{localeError:tf()}}var rf=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function r(t){return e[t]??null}let i={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Ugyldigt input: forventede instanceof ${t.expected}, fik ${c}`:`Ugyldigt input: forventede ${n}, fik ${c}`}case"invalid_value":return t.values.length===1?`Ugyldig v\xE6rdi: forventede ${f(t.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin),c=o[t.origin]??t.origin;return a?`For stor: forventede ${c??"value"} ${a.verb} ${n} ${t.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${c??"value"} havde ${n} ${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin),c=o[t.origin]??t.origin;return a?`For lille: forventede ${c} ${a.verb} ${n} ${t.minimum.toString()} ${a.unit}`:`For lille: forventede ${c} havde ${n} ${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Ugyldig streng: skal starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: skal ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: skal indeholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${i[n.format]??t.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${p(t.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${t.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${t.origin}`;default:return"Ugyldigt input"}}};function tl(){return{localeError:rf()}}var nf=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function r(t){return e[t]??null}let i={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},o={nan:"NaN",number:"Zahl",array:"Array"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${t.expected}, erhalten ${c}`:`Ung\xFCltige Eingabe: erwartet ${n}, erhalten ${c}`}case"invalid_value":return t.values.length===1?`Ung\xFCltige Eingabe: erwartet ${f(t.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Zu gro\xDF: erwartet, dass ${t.origin??"Wert"} ${n}${t.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${t.origin??"Wert"} ${n}${t.maximum.toString()} ist`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Zu klein: erwartet, dass ${t.origin} ${n}${t.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${t.origin} ${n}${t.minimum.toString()} ist`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Ung\xFCltiger String: muss mit "${n.prefix}" beginnen`:n.format==="ends_with"?`Ung\xFCltiger String: muss mit "${n.suffix}" enden`:n.format==="includes"?`Ung\xFCltiger String: muss "${n.includes}" enthalten`:n.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${n.pattern} entsprechen`:`Ung\xFCltig: ${i[n.format]??t.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${p(t.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${t.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${t.origin}`;default:return"Ung\xFCltige Eingabe"}}};function rl(){return{localeError:nf()}}var of=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function r(t){return e[t]??null}let i={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},o={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return typeof t.expected=="string"&&/^[A-Z]/.test(t.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${t.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${n}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${c}`}case"invalid_value":return t.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${f(t.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${t.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${n}${t.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${n.prefix}"`:n.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${n.suffix}"`:n.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${n.includes}"`:n.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${n.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${i[n.format]??t.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${t.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${t.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${t.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${p(t.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${t.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${t.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function nl(){return{localeError:of()}}var af=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function r(t){return e[t]??null}let i={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return`Invalid input: expected ${n}, received ${c}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${f(t.values[0])}`:`Invalid option: expected one of ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Too big: expected ${t.origin??"value"} to have ${n}${t.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${t.origin??"value"} to be ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Too small: expected ${t.origin} to have ${n}${t.minimum.toString()} ${a.unit}`:`Too small: expected ${t.origin} to be ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Invalid string: must start with "${n.prefix}"`:n.format==="ends_with"?`Invalid string: must end with "${n.suffix}"`:n.format==="includes"?`Invalid string: must include "${n.includes}"`:n.format==="regex"?`Invalid string: must match pattern ${n.pattern}`:`Invalid ${i[n.format]??t.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${t.divisor}`;case"unrecognized_keys":return`Unrecognized key${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Invalid key in ${t.origin}`;case"invalid_union":return t.options&&Array.isArray(t.options)&&t.options.length>0?`Invalid discriminator value. Expected ${t.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${t.origin}`;default:return"Invalid input"}}};function Sr(){return{localeError:af()}}var cf=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(t){return e[t]??null}let i={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},o={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${t.expected}, ricevi\u011Dis ${c}`:`Nevalida enigo: atendi\u011Dis ${n}, ricevi\u011Dis ${c}`}case"invalid_value":return t.values.length===1?`Nevalida enigo: atendi\u011Dis ${f(t.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Tro granda: atendi\u011Dis ke ${t.origin??"valoro"} havu ${n}${t.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${t.origin??"valoro"} havu ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Tro malgranda: atendi\u011Dis ke ${t.origin} havu ${n}${t.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${t.origin} estu ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${n.prefix}"`:n.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${n.suffix}"`:n.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${n.includes}"`:n.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${n.pattern}`:`Nevalida ${i[n.format]??t.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${t.divisor}`;case"unrecognized_keys":return`Nekonata${t.keys.length>1?"j":""} \u015Dlosilo${t.keys.length>1?"j":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${t.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${t.origin}`;default:return"Nevalida enigo"}}};function il(){return{localeError:cf()}}var sf=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function r(t){return e[t]??null}let i={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${t.expected}, recibido ${c}`:`Entrada inv\xE1lida: se esperaba ${n}, recibido ${c}`}case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: se esperaba ${f(t.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin),c=o[t.origin]??t.origin;return a?`Demasiado grande: se esperaba que ${c??"valor"} tuviera ${n}${t.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${c??"valor"} fuera ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin),c=o[t.origin]??t.origin;return a?`Demasiado peque\xF1o: se esperaba que ${c} tuviera ${n}${t.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${c} fuera ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${n.prefix}"`:n.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${n.suffix}"`:n.format==="includes"?`Cadena inv\xE1lida: debe incluir "${n.includes}"`:n.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${n.pattern}`:`Inv\xE1lido ${i[n.format]??t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${o[t.origin]??t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${o[t.origin]??t.origin}`;default:return"Entrada inv\xE1lida"}}};function ol(){return{localeError:sf()}}var uf=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function r(t){return e[t]??null}let i={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${t.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${n} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${c} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return t.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${f(t.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${p(t.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${t.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${t.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${n}${t.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${n}${t.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${n}${t.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:n.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${n.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:n.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${n.includes}" \u0628\u0627\u0634\u062F`:n.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${n.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${i[n.format]??t.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${t.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${t.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${p(t.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${t.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${t.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function al(){return{localeError:uf()}}var lf=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function r(t){return e[t]??null}let i={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},o={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Virheellinen tyyppi: odotettiin instanceof ${t.expected}, oli ${c}`:`Virheellinen tyyppi: odotettiin ${n}, oli ${c}`}case"invalid_value":return t.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${f(t.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${n}${t.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${n}${t.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${n.prefix}"`:n.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${n.suffix}"`:n.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${n.includes}"`:n.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${n.pattern}`:`Virheellinen ${i[n.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${p(t.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function cl(){return{localeError:lf()}}var df=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function r(t){return e[t]??null}let i={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Entr\xE9e invalide : instanceof ${t.expected} attendu, ${c} re\xE7u`:`Entr\xE9e invalide : ${n} attendu, ${c} re\xE7u`}case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : ${f(t.values[0])} attendu`:`Option invalide : une valeur parmi ${p(t.values,"|")} attendue`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Trop grand : ${o[t.origin]??"valeur"} doit ${a.verb} ${n}${t.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${o[t.origin]??"valeur"} doit \xEAtre ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Trop petit : ${o[t.origin]??"valeur"} doit ${a.verb} ${n}${t.minimum.toString()} ${a.unit}`:`Trop petit : ${o[t.origin]??"valeur"} doit \xEAtre ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${n.pattern}`:`${i[n.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${p(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function sl(){return{localeError:df()}}var pf=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function r(t){return e[t]??null}let i={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},o={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Entr\xE9e invalide : attendu instanceof ${t.expected}, re\xE7u ${c}`:`Entr\xE9e invalide : attendu ${n}, re\xE7u ${c}`}case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : attendu ${f(t.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"\u2264":"<",a=r(t.origin);return a?`Trop grand : attendu que ${t.origin??"la valeur"} ait ${n}${t.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${t.origin??"la valeur"} soit ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?"\u2265":">",a=r(t.origin);return a?`Trop petit : attendu que ${t.origin} ait ${n}${t.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${t.origin} soit ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${n.prefix}"`:n.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${n.suffix}"`:n.format==="includes"?`Cha\xEEne invalide : doit inclure "${n.includes}"`:n.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${n.pattern}`:`${i[n.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${p(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function ul(){return{localeError:pf()}}var mf=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},r={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},i=s=>s?e[s]:void 0,o=s=>{let d=i(s);return d?d.label:s??e.unknown.label},t=s=>`\u05D4${o(s)}`,n=s=>(i(s)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=s=>s?r[s]??null:null,c={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},u={nan:"NaN"};return s=>{switch(s.code){case"invalid_type":{let d=s.expected,m=u[d??""]??o(d),$=g(s.input),h=u[$]??e[$]?.label??$;return/^[A-Z]/.test(s.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${s.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${h}`}case"invalid_value":{if(s.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${f(s.values[0])}`;let d=s.values.map(h=>f(h));if(s.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let m=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${m}`}case"too_big":{let d=a(s.origin),m=t(s.origin??"value");if(s.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${s.maximum.toString()} ${d?.unit??""} ${s.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(s.origin==="number"){let x=s.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${s.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${s.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}`}if(s.origin==="array"||s.origin==="set"){let x=s.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",N=s.inclusive?`${s.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${s.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${N}`.trim()}let $=s.inclusive?"<=":"<",h=n(s.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${$}${s.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${h} ${$}${s.maximum.toString()}`}case"too_small":{let d=a(s.origin),m=t(s.origin??"value");if(s.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${s.minimum.toString()} ${d?.unit??""} ${s.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(s.origin==="number"){let x=s.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${s.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${s.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}`}if(s.origin==="array"||s.origin==="set"){let x=s.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(s.minimum===1&&s.inclusive){let U=(s.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${U}`}let N=s.inclusive?`${s.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${s.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${N}`.trim()}let $=s.inclusive?">=":">",h=n(s.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${m} ${h} ${$}${s.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${h} ${$}${s.minimum.toString()}`}case"invalid_format":{let d=s;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let m=c[d.format],$=m?.label??d.format,x=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${$} \u05DC\u05D0 ${x}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${s.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${s.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${s.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${p(s.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${t(s.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function ll(){return{localeError:mf()}}var ff=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function r(t){return e[t]??null}let i={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},o={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${t.expected}, a primljeno je ${c}`:`Neispravan unos: o\u010Dekuje se ${n}, a primljeno je ${c}`}case"invalid_value":return t.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${f(t.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin),c=o[t.origin]??t.origin;return a?`Preveliko: o\u010Dekivano da ${c??"vrijednost"} ima ${n}${t.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${c??"vrijednost"} bude ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin),c=o[t.origin]??t.origin;return a?`Premalo: o\u010Dekivano da ${c} ima ${n}${t.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${c} bude ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${n.prefix}"`:n.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${n.suffix}"`:n.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${n.includes}"`:n.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${n.pattern}`:`Neispravna ${i[n.format]??t.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${t.divisor}`;case"unrecognized_keys":return`Neprepoznat${t.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${p(t.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${o[t.origin]??t.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${o[t.origin]??t.origin}`;default:return"Neispravan unos"}}};function dl(){return{localeError:ff()}}var gf=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function r(t){return e[t]??null}let i={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},o={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${t.expected}, a kapott \xE9rt\xE9k ${c}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${n}, a kapott \xE9rt\xE9k ${c}`}case"invalid_value":return t.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${f(t.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`T\xFAl nagy: ${t.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${n}${t.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${t.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} m\xE9rete t\xFAl kicsi ${n}${t.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} t\xFAl kicsi ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\xC9rv\xE9nytelen string: "${n.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:n.format==="ends_with"?`\xC9rv\xE9nytelen string: "${n.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:n.format==="includes"?`\xC9rv\xE9nytelen string: "${n.includes}" \xE9rt\xE9ket kell tartalmaznia`:n.format==="regex"?`\xC9rv\xE9nytelen string: ${n.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${i[n.format]??t.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${t.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${t.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${t.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function pl(){return{localeError:gf()}}function ml(e,r,i){return Math.abs(e)===1?r:i}function Fe(e){if(!e)return"";let r=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],i=e[e.length-1];return e+(r.includes(i)?"\u0576":"\u0568")}var hf=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function r(t){return e[t]??null}let i={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},o={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${t.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${n}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${c}`}case"invalid_value":return t.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${f(t.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);if(a){let c=Number(t.maximum),u=ml(c,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Fe(t.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${t.maximum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Fe(t.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);if(a){let c=Number(t.minimum),u=ml(c,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Fe(t.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${n}${t.minimum.toString()} ${u}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${Fe(t.origin)} \u056C\u056B\u0576\u056B ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${n.prefix}"-\u0578\u057E`:n.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${n.suffix}"-\u0578\u057E`:n.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${n.includes}"`:n.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${n.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${i[n.format]??t.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${t.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${t.keys.length>1?"\u0576\u0565\u0580":""}. ${p(t.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${Fe(t.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${Fe(t.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function fl(){return{localeError:hf()}}var vf=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function r(t){return e[t]??null}let i={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Input tidak valid: diharapkan instanceof ${t.expected}, diterima ${c}`:`Input tidak valid: diharapkan ${n}, diterima ${c}`}case"invalid_value":return t.values.length===1?`Input tidak valid: diharapkan ${f(t.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${n}${t.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Terlalu kecil: diharapkan ${t.origin} memiliki ${n}${t.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${t.origin} menjadi ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`String tidak valid: harus dimulai dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak valid: harus berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak valid: harus menyertakan "${n.includes}"`:n.format==="regex"?`String tidak valid: harus sesuai pola ${n.pattern}`:`${i[n.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function gl(){return{localeError:vf()}}var $f=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function r(t){return e[t]??null}let i={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},o={nan:"NaN",number:"n\xFAmer",array:"fylki"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera instanceof ${t.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${c} \xFEar sem \xE1 a\xF0 vera ${n}`}case"invalid_value":return t.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${f(t.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin??"gildi"} hafi ${n}${t.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin??"gildi"} s\xE9 ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin} hafi ${n}${t.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin} s\xE9 ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${n.prefix}"`:n.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${n.suffix}"`:n.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${n.includes}"`:n.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${n.pattern}`:`Rangt ${i[n.format]??t.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${t.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${t.keys.length>1?"ir lyklar":"ur lykill"}: ${p(t.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${t.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${t.origin}`;default:return"Rangt gildi"}}};function hl(){return{localeError:$f()}}var _f=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function r(t){return e[t]??null}let i={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"numero",array:"vettore"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Input non valido: atteso instanceof ${t.expected}, ricevuto ${c}`:`Input non valido: atteso ${n}, ricevuto ${c}`}case"invalid_value":return t.values.length===1?`Input non valido: atteso ${f(t.values[0])}`:`Opzione non valida: atteso uno tra ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Troppo grande: ${t.origin??"valore"} deve avere ${n}${t.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${t.origin??"valore"} deve essere ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Troppo piccolo: ${t.origin} deve avere ${n}${t.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${t.origin} deve essere ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Stringa non valida: deve iniziare con "${n.prefix}"`:n.format==="ends_with"?`Stringa non valida: deve terminare con "${n.suffix}"`:n.format==="includes"?`Stringa non valida: deve includere "${n.includes}"`:n.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${n.pattern}`:`Input non valido: ${i[n.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${p(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function vl(){return{localeError:_f()}}var bf=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function r(t){return e[t]??null}let i={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},o={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${t.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${n}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${c}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return t.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${f(t.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${p(t.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let n=t.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=r(t.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${t.origin??"\u5024"}\u306F${t.maximum.toString()}${a.unit??"\u8981\u7D20"}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${t.origin??"\u5024"}\u306F${t.maximum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let n=t.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=r(t.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${a.unit}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${n}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${n.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:n.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${n.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${i[n.format]??t.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${t.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${t.keys.length>1?"\u7FA4":""}: ${p(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function $l(){return{localeError:bf()}}var yf=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function r(t){return e[t]??null}let i={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},o={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${t.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${n}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${c}`}case"invalid_value":return t.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${f(t.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${p(t.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${n}${t.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin} ${a.verb} ${n}${t.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin} \u10D8\u10E7\u10DD\u10E1 ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.prefix}"-\u10D8\u10D7`:n.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${n.suffix}"-\u10D8\u10D7`:n.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${n.includes}"-\u10E1`:n.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${n.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${i[n.format]??t.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${t.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${t.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${p(t.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${t.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${t.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function _l(){return{localeError:yf()}}var xf=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function r(t){return e[t]??null}let i={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},o={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${t.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${n} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${c}`}case"invalid_value":return t.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${f(t.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${t.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${n} ${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${n} ${t.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${n} ${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${n.prefix}"`:n.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${n.suffix}"`:n.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${n.includes}"`:n.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${n.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${i[n.format]??t.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${t.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${p(t.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${t.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${t.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Ir(){return{localeError:xf()}}function bl(){return Ir()}var kf=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function r(t){return e[t]??null}let i={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},o={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${t.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${n}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${c}\uC785\uB2C8\uB2E4`}case"invalid_value":return t.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${f(t.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${p(t.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let n=t.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=n==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=r(t.origin),u=c?.unit??"\uC694\uC18C";return c?`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()}${u} ${n}${a}`:`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()} ${n}${a}`}case"too_small":{let n=t.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=n==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",c=r(t.origin),u=c?.unit??"\uC694\uC18C";return c?`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()}${u} ${n}${a}`:`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()} ${n}${a}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:n.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${n.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:n.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${n.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${i[n.format]??t.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${t.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${p(t.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${t.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${t.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function yl(){return{localeError:kf()}}var Tt=e=>e.charAt(0).toUpperCase()+e.slice(1);function xl(e){let r=Math.abs(e),i=r%10,o=r%100;return o>=11&&o<=19||i===0?"many":i===1?"one":"few"}var wf=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function r(t,n,a,c){let u=e[t]??null;return u===null?u:{unit:u.unit[n],verb:u.verb[c][a?"inclusive":"notInclusive"]}}let i={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},o={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Gautas tipas ${c}, o tik\u0117tasi - instanceof ${t.expected}`:`Gautas tipas ${c}, o tik\u0117tasi - ${n}`}case"invalid_value":return t.values.length===1?`Privalo b\u016Bti ${f(t.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${p(t.values,"|")} pasirinkim\u0173`;case"too_big":{let n=o[t.origin]??t.origin,a=r(t.origin,xl(Number(t.maximum)),t.inclusive??!1,"smaller");if(a?.verb)return`${Tt(n??t.origin??"reik\u0161m\u0117")} ${a.verb} ${t.maximum.toString()} ${a.unit??"element\u0173"}`;let c=t.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${Tt(n??t.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${t.maximum.toString()} ${a?.unit}`}case"too_small":{let n=o[t.origin]??t.origin,a=r(t.origin,xl(Number(t.minimum)),t.inclusive??!1,"bigger");if(a?.verb)return`${Tt(n??t.origin??"reik\u0161m\u0117")} ${a.verb} ${t.minimum.toString()} ${a.unit??"element\u0173"}`;let c=t.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${Tt(n??t.origin??"reik\u0161m\u0117")} turi b\u016Bti ${c} ${t.minimum.toString()} ${a?.unit}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${n.prefix}"`:n.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${n.suffix}"`:n.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${n.includes}"`:n.format==="regex"?`Eilut\u0117 privalo atitikti ${n.pattern}`:`Neteisingas ${i[n.format]??t.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${t.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${t.keys.length>1?"i":"as"} rakt${t.keys.length>1?"ai":"as"}: ${p(t.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let n=o[t.origin]??t.origin;return`${Tt(n??t.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function kl(){return{localeError:wf()}}var zf=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function r(t){return e[t]??null}let i={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},o={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${t.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${n}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${c}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${f(t.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${n}${t.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0438\u043C\u0430 ${n}${t.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${n.pattern}`:`Invalid ${i[n.format]??t.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${p(t.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${t.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${t.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function wl(){return{localeError:zf()}}var Sf=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function r(t){return e[t]??null}let i={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"nombor"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Input tidak sah: dijangka instanceof ${t.expected}, diterima ${c}`:`Input tidak sah: dijangka ${n}, diterima ${c}`}case"invalid_value":return t.values.length===1?`Input tidak sah: dijangka ${f(t.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Terlalu besar: dijangka ${t.origin??"nilai"} ${a.verb} ${n}${t.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Terlalu kecil: dijangka ${t.origin} ${a.verb} ${n}${t.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${t.origin} adalah ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`String tidak sah: mesti bermula dengan "${n.prefix}"`:n.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${n.suffix}"`:n.format==="includes"?`String tidak sah: mesti mengandungi "${n.includes}"`:n.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${n.pattern}`:`${i[n.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${p(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function zl(){return{localeError:Sf()}}var If=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function r(t){return e[t]??null}let i={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},o={nan:"NaN",number:"getal"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Ongeldige invoer: verwacht instanceof ${t.expected}, ontving ${c}`:`Ongeldige invoer: verwacht ${n}, ontving ${c}`}case"invalid_value":return t.values.length===1?`Ongeldige invoer: verwacht ${f(t.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin),c=t.origin==="date"?"laat":t.origin==="string"?"lang":"groot";return a?`Te ${c}: verwacht dat ${t.origin??"waarde"} ${n}${t.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${c}: verwacht dat ${t.origin??"waarde"} ${n}${t.maximum.toString()} is`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin),c=t.origin==="date"?"vroeg":t.origin==="string"?"kort":"klein";return a?`Te ${c}: verwacht dat ${t.origin} ${n}${t.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${c}: verwacht dat ${t.origin} ${n}${t.minimum.toString()} is`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Ongeldige tekst: moet met "${n.prefix}" beginnen`:n.format==="ends_with"?`Ongeldige tekst: moet op "${n.suffix}" eindigen`:n.format==="includes"?`Ongeldige tekst: moet "${n.includes}" bevatten`:n.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${n.pattern}`:`Ongeldig: ${i[n.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function Sl(){return{localeError:If()}}var Pf=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function r(t){return e[t]??null}let i={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"tall",array:"liste"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Ugyldig input: forventet instanceof ${t.expected}, fikk ${c}`:`Ugyldig input: forventet ${n}, fikk ${c}`}case"invalid_value":return t.values.length===1?`Ugyldig verdi: forventet ${f(t.values[0])}`:`Ugyldig valg: forventet en av ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`For stor(t): forventet ${t.origin??"value"} til \xE5 ha ${n}${t.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${t.origin??"value"} til \xE5 ha ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`For lite(n): forventet ${t.origin} til \xE5 ha ${n}${t.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${t.origin} til \xE5 ha ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${n.prefix}"`:n.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${n.suffix}"`:n.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${n.includes}"`:n.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${n.pattern}`:`Ugyldig ${i[n.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${p(t.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function Il(){return{localeError:Pf()}}var jf=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function r(t){return e[t]??null}let i={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},o={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`F\xE2sit giren: umulan instanceof ${t.expected}, al\u0131nan ${c}`:`F\xE2sit giren: umulan ${n}, al\u0131nan ${c}`}case"invalid_value":return t.values.length===1?`F\xE2sit giren: umulan ${f(t.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Fazla b\xFCy\xFCk: ${t.origin??"value"}, ${n}${t.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${t.origin??"value"}, ${n}${t.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${n}${t.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${n}${t.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let n=t;return n.format==="starts_with"?`F\xE2sit metin: "${n.prefix}" ile ba\u015Flamal\u0131.`:n.format==="ends_with"?`F\xE2sit metin: "${n.suffix}" ile bitmeli.`:n.format==="includes"?`F\xE2sit metin: "${n.includes}" ihtiv\xE2 etmeli.`:n.format==="regex"?`F\xE2sit metin: ${n.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${i[n.format]??t.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${t.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`${t.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${t.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function Pl(){return{localeError:jf()}}var Tf=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function r(t){return e[t]??null}let i={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},o={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${t.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${n} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${c} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return t.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${f(t.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${p(t.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${t.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${t.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${n}${t.maximum.toString()} \u0648\u064A`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${n}${t.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${n}${t.minimum.toString()} \u0648\u064A`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:n.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${n.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:n.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${n.includes}" \u0648\u0644\u0631\u064A`:n.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${n.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${i[n.format]??t.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${t.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${t.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${p(t.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${t.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${t.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function jl(){return{localeError:Tf()}}var Of=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function r(t){return e[t]??null}let i={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},o={nan:"NaN",number:"liczba",array:"tablica"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${t.expected}, otrzymano ${c}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${n}, otrzymano ${c}`}case"invalid_value":return t.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${f(t.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${t.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${n}${t.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${n.prefix}"`:n.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${n.suffix}"`:n.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${n.includes}"`:n.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${n.pattern}`:`Nieprawid\u0142ow(y/a/e) ${i[n.format]??t.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${t.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${t.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function Tl(){return{localeError:Of()}}var Uf=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function r(t){return e[t]??null}let i={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},o={nan:"NaN",number:"n\xFAmero",null:"nulo"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Tipo inv\xE1lido: esperado instanceof ${t.expected}, recebido ${c}`:`Tipo inv\xE1lido: esperado ${n}, recebido ${c}`}case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: esperado ${f(t.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Muito grande: esperado que ${t.origin??"valor"} tivesse ${n}${t.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${t.origin??"valor"} fosse ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Muito pequeno: esperado que ${t.origin} tivesse ${n}${t.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${t.origin} fosse ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${n.prefix}"`:n.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${n.suffix}"`:n.format==="includes"?`Texto inv\xE1lido: deve incluir "${n.includes}"`:n.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${n.pattern}`:`${i[n.format]??t.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${p(t.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${t.origin}`;default:return"Campo inv\xE1lido"}}};function Ol(){return{localeError:Uf()}}var Ef=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function r(t){return e[t]??null}let i={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},o={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${n}, primit ${c}`}case"invalid_value":return t.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${f(t.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Prea mare: a\u0219teptat ca ${t.origin??"valoarea"} ${a.verb} ${n}${t.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${t.origin??"valoarea"} s\u0103 fie ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Prea mic: a\u0219teptat ca ${t.origin} ${a.verb} ${n}${t.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${t.origin} s\u0103 fie ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${n.prefix}"`:n.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${n.suffix}"`:n.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${n.includes}"`:n.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${n.pattern}`:`Format invalid: ${i[n.format]??t.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${t.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${p(t.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${t.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${t.origin}`;default:return"Intrare invalid\u0103"}}};function Ul(){return{localeError:Ef()}}function El(e,r,i,o){let t=Math.abs(e),n=t%10,a=t%100;return a>=11&&a<=19?o:n===1?r:n>=2&&n<=4?i:o}var Df=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function r(t){return e[t]??null}let i={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${t.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${n}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${c}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${f(t.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);if(a){let c=Number(t.maximum),u=El(c,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${t.maximum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);if(a){let c=Number(t.minimum),u=El(c,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${n}${t.minimum.toString()} ${u}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin} \u0431\u0443\u0434\u0435\u0442 ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${i[n.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${t.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0438":""}: ${p(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${t.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function Dl(){return{localeError:Df()}}var Nf=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function r(t){return e[t]??null}let i={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},o={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${t.expected}, prejeto ${c}`:`Neveljaven vnos: pri\u010Dakovano ${n}, prejeto ${c}`}case"invalid_value":return t.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${f(t.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${t.origin??"vrednost"} imelo ${n}${t.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${t.origin??"vrednost"} ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${t.origin} imelo ${n}${t.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${t.origin} ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${n.prefix}"`:n.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${n.suffix}"`:n.format==="includes"?`Neveljaven niz: mora vsebovati "${n.includes}"`:n.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${n.pattern}`:`Neveljaven ${i[n.format]??t.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${p(t.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function Nl(){return{localeError:Nf()}}var Zf=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function r(t){return e[t]??null}let i={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},o={nan:"NaN",number:"antal",array:"lista"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${t.expected}, fick ${c}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${n}, fick ${c}`}case"invalid_value":return t.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${f(t.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${n}${t.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${t.origin??"v\xE4rdet"} att ha ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${n}${t.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${n.prefix}"`:n.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${n.suffix}"`:n.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${n.includes}"`:n.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${n.pattern}"`:`Ogiltig(t) ${i[n.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${p(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${t.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Zl(){return{localeError:Zf()}}var Lf=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function r(t){return e[t]??null}let i={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},o={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${t.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${n}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${c}`}case"invalid_value":return t.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${f(t.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${p(t.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${t.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${n}${t.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin} ${n}${t.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin} ${n}${t.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${n.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:n.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${n.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${i[n.format]??t.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${t.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${t.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${p(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${t.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Ll(){return{localeError:Lf()}}var Af=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function r(t){return e[t]??null}let i={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},o={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${t.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${n} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${c}`}case"invalid_value":return t.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${f(t.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=r(t.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${t.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=r(t.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${t.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${n} ${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${n.prefix}"`:n.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${n.suffix}"`:n.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${n.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:n.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${n.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${i[n.format]??t.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${t.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${p(t.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Al(){return{localeError:Af()}}var Cf=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function r(t){return e[t]??null}let i={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},o={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${t.expected}, al\u0131nan ${c}`:`Ge\xE7ersiz de\u011Fer: beklenen ${n}, al\u0131nan ${c}`}case"invalid_value":return t.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${f(t.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${t.origin??"de\u011Fer"} ${n}${t.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${t.origin??"de\u011Fer"} ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${t.origin} ${n}${t.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${t.origin} ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Ge\xE7ersiz metin: "${n.prefix}" ile ba\u015Flamal\u0131`:n.format==="ends_with"?`Ge\xE7ersiz metin: "${n.suffix}" ile bitmeli`:n.format==="includes"?`Ge\xE7ersiz metin: "${n.includes}" i\xE7ermeli`:n.format==="regex"?`Ge\xE7ersiz metin: ${n.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${i[n.format]??t.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${t.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${t.keys.length>1?"lar":""}: ${p(t.keys,", ")}`;case"invalid_key":return`${t.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${t.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function Cl(){return{localeError:Cf()}}var Rf=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function r(t){return e[t]??null}let i={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},o={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${t.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${n}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${c}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${f(t.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${n}${t.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} ${a.verb} ${n}${t.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} \u0431\u0443\u0434\u0435 ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${n.prefix}"`:n.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${n.suffix}"`:n.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${n.includes}"`:n.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${n.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${i[n.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0456":""}: ${p(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${t.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Pr(){return{localeError:Rf()}}function Rl(){return Pr()}var Mf=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function r(t){return e[t]??null}let i={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},o={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${t.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${n} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${c} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return t.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${f(t.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${p(t.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${t.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${n}${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${t.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${n}${t.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u06D2 ${n}${t.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u0627 ${n}${t.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${n.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:n.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${n.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${i[n.format]??t.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${t.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${t.keys.length>1?"\u0632":""}: ${p(t.keys,"\u060C ")}`;case"invalid_key":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Ml(){return{localeError:Mf()}}var Ff=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function r(t){return e[t]??null}let i={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},o={nan:"NaN",number:"raqam",array:"massiv"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${t.expected}, qabul qilingan ${c}`:`Noto\u2018g\u2018ri kirish: kutilgan ${n}, qabul qilingan ${c}`}case"invalid_value":return t.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${f(t.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Juda katta: kutilgan ${t.origin??"qiymat"} ${n}${t.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${t.origin??"qiymat"} ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Juda kichik: kutilgan ${t.origin} ${n}${t.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${t.origin} ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${n.prefix}" bilan boshlanishi kerak`:n.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${n.suffix}" bilan tugashi kerak`:n.format==="includes"?`Noto\u2018g\u2018ri satr: "${n.includes}" ni o\u2018z ichiga olishi kerak`:n.format==="regex"?`Noto\u2018g\u2018ri satr: ${n.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${i[n.format]??t.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${t.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${t.keys.length>1?"lar":""}: ${p(t.keys,", ")}`;case"invalid_key":return`${t.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${t.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function Fl(){return{localeError:Ff()}}var Vf=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function r(t){return e[t]??null}let i={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},o={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${t.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${n}, nh\u1EADn \u0111\u01B0\u1EE3c ${c}`}case"invalid_value":return t.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${f(t.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${t.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${n}${t.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${t.origin??"gi\xE1 tr\u1ECB"} ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${a.verb} ${n}${t.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${n.prefix}"`:n.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${n.suffix}"`:n.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${n.includes}"`:n.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${n.pattern}`:`${i[n.format]??t.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${t.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${p(t.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Vl(){return{localeError:Vf()}}var Jf=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function r(t){return e[t]??null}let i={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},o={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${t.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${n}\uFF0C\u5B9E\u9645\u63A5\u6536 ${c}`}case"invalid_value":return t.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${f(t.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${t.origin??"\u503C"} ${n}${t.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${t.origin??"\u503C"} ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${n}${t.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.prefix}" \u5F00\u5934`:n.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${n.suffix}" \u7ED3\u5C3E`:n.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${n.pattern}`:`\u65E0\u6548${i[n.format]??t.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${t.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${p(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${t.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Jl(){return{localeError:Jf()}}var Bf=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function r(t){return e[t]??null}let i={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},o={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${t.expected}\uFF0C\u4F46\u6536\u5230 ${c}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${n}\uFF0C\u4F46\u6536\u5230 ${c}`}case"invalid_value":return t.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${f(t.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${t.origin??"\u503C"} \u61C9\u70BA ${n}${t.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${t.origin??"\u503C"} \u61C9\u70BA ${n}${t.maximum.toString()}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${n}${t.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${n}${t.minimum.toString()}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.prefix}" \u958B\u982D`:n.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${n.suffix}" \u7D50\u5C3E`:n.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${n.includes}"`:n.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${n.pattern}`:`\u7121\u6548\u7684 ${i[n.format]??t.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${t.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${t.keys.length>1?"\u5011":""}\uFF1A${p(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Bl(){return{localeError:Bf()}}var Wf=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function r(t){return e[t]??null}let i={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},o={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return t=>{switch(t.code){case"invalid_type":{let n=o[t.expected]??t.expected,a=g(t.input),c=o[a]??a;return/^[A-Z]/.test(t.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${t.expected}, \xE0m\u1ECD\u0300 a r\xED ${c}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${n}, \xE0m\u1ECD\u0300 a r\xED ${c}`}case"invalid_value":return t.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${f(t.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${p(t.values,"|")}`;case"too_big":{let n=t.inclusive?"<=":"<",a=r(t.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${t.origin??"iye"} ${a.verb} ${n}${t.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${t.maximum}`}case"too_small":{let n=t.inclusive?">=":">",a=r(t.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${t.origin} ${a.verb} ${n}${t.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${n}${t.minimum}`}case"invalid_format":{let n=t;return n.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${n.prefix}"`:n.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${n.suffix}"`:n.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${n.includes}"`:n.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${n.pattern}`:`A\u1E63\xEC\u1E63e: ${i[n.format]??t.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${t.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${p(t.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${t.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${t.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Wl(){return{localeError:Wf()}}var Gl,ga=Symbol("ZodOutput"),ha=Symbol("ZodInput"),jr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...i){let o=i[0];return this._map.set(r,o),o&&typeof o=="object"&&"id"in o&&this._idmap.set(o.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){let i=this._map.get(r);return i&&typeof i=="object"&&"id"in i&&this._idmap.delete(i.id),this._map.delete(r),this}get(r){let i=r._zod.parent;if(i){let o={...this.get(i)??{}};delete o.id;let t={...o,...this._map.get(r)};return Object.keys(t).length?t:void 0}return this._map.get(r)}has(r){return this._map.has(r)}};function Tr(){return new jr}(Gl=globalThis).__zod_globalRegistry??(Gl.__zod_globalRegistry=Tr());var L=globalThis.__zod_globalRegistry;function va(e,r){return new e({type:"string",..._(r)})}function $a(e,r){return new e({type:"string",coerce:!0,..._(r)})}function Or(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,..._(r)})}function Ut(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,..._(r)})}function Ur(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,..._(r)})}function Er(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",..._(r)})}function Dr(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",..._(r)})}function Nr(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",..._(r)})}function Et(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,..._(r)})}function Zr(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,..._(r)})}function Lr(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,..._(r)})}function Ar(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,..._(r)})}function Cr(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,..._(r)})}function Rr(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,..._(r)})}function Mr(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,..._(r)})}function Fr(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,..._(r)})}function Vr(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,..._(r)})}function Jr(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,..._(r)})}function _a(e,r){return new e({type:"string",format:"mac",check:"string_format",abort:!1,..._(r)})}function Br(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,..._(r)})}function Wr(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,..._(r)})}function Gr(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,..._(r)})}function Kr(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,..._(r)})}function qr(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,..._(r)})}function Hr(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,..._(r)})}var ba={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function ya(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,..._(r)})}function xa(e,r){return new e({type:"string",format:"date",check:"string_format",..._(r)})}function ka(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,..._(r)})}function wa(e,r){return new e({type:"string",format:"duration",check:"string_format",..._(r)})}function za(e,r){return new e({type:"number",checks:[],..._(r)})}function Sa(e,r){return new e({type:"number",coerce:!0,checks:[],..._(r)})}function Ia(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",..._(r)})}function Pa(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float32",..._(r)})}function ja(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float64",..._(r)})}function Ta(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"int32",..._(r)})}function Oa(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",..._(r)})}function Ua(e,r){return new e({type:"boolean",..._(r)})}function Ea(e,r){return new e({type:"boolean",coerce:!0,..._(r)})}function Da(e,r){return new e({type:"bigint",..._(r)})}function Na(e,r){return new e({type:"bigint",coerce:!0,..._(r)})}function Za(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",..._(r)})}function La(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",..._(r)})}function Aa(e,r){return new e({type:"symbol",..._(r)})}function Ca(e,r){return new e({type:"undefined",..._(r)})}function Ra(e,r){return new e({type:"null",..._(r)})}function Ma(e){return new e({type:"any"})}function Fa(e){return new e({type:"unknown"})}function Va(e,r){return new e({type:"never",..._(r)})}function Ja(e,r){return new e({type:"void",..._(r)})}function Ba(e,r){return new e({type:"date",..._(r)})}function Wa(e,r){return new e({type:"date",coerce:!0,..._(r)})}function Ga(e,r){return new e({type:"nan",..._(r)})}function te(e,r){return new gr({check:"less_than",..._(r),value:e,inclusive:!1})}function q(e,r){return new gr({check:"less_than",..._(r),value:e,inclusive:!0})}function re(e,r){return new hr({check:"greater_than",..._(r),value:e,inclusive:!1})}function F(e,r){return new hr({check:"greater_than",..._(r),value:e,inclusive:!0})}function Xr(e){return re(0,e)}function Yr(e){return te(0,e)}function Qr(e){return q(0,e)}function en(e){return F(0,e)}function ve(e,r){return new Ci({check:"multiple_of",..._(r),value:e})}function $e(e,r){return new Fi({check:"max_size",..._(r),maximum:e})}function ne(e,r){return new Vi({check:"min_size",..._(r),minimum:e})}function Ie(e,r){return new Ji({check:"size_equals",..._(r),size:e})}function Pe(e,r){return new Bi({check:"max_length",..._(r),maximum:e})}function se(e,r){return new Wi({check:"min_length",..._(r),minimum:e})}function je(e,r){return new Gi({check:"length_equals",..._(r),length:e})}function Ve(e,r){return new Ki({check:"string_format",format:"regex",..._(r),pattern:e})}function Je(e){return new qi({check:"string_format",format:"lowercase",..._(e)})}function Be(e){return new Hi({check:"string_format",format:"uppercase",..._(e)})}function We(e,r){return new Xi({check:"string_format",format:"includes",..._(r),includes:e})}function Ge(e,r){return new Yi({check:"string_format",format:"starts_with",..._(r),prefix:e})}function Ke(e,r){return new Qi({check:"string_format",format:"ends_with",..._(r),suffix:e})}function tn(e,r,i){return new eo({check:"property",property:e,schema:r,..._(i)})}function qe(e,r){return new to({check:"mime_type",mime:e,..._(r)})}function Y(e){return new ro({check:"overwrite",tx:e})}function He(e){return Y(r=>r.normalize(e))}function Xe(){return Y(e=>e.trim())}function Ye(){return Y(e=>e.toLowerCase())}function Qe(){return Y(e=>e.toUpperCase())}function et(){return Y(e=>Yn(e))}function Ka(e,r,i){return new e({type:"array",element:r,..._(i)})}function Kf(e,r,i){return new e({type:"union",options:r,..._(i)})}function qf(e,r,i){return new e({type:"union",options:r,inclusive:!1,..._(i)})}function Hf(e,r,i,o){return new e({type:"union",options:i,discriminator:r,..._(o)})}function Xf(e,r,i){return new e({type:"intersection",left:r,right:i})}function Yf(e,r,i,o){let t=i instanceof k,n=t?o:i,a=t?i:null;return new e({type:"tuple",items:r,rest:a,..._(n)})}function Qf(e,r,i,o){return new e({type:"record",keyType:r,valueType:i,..._(o)})}function eg(e,r,i,o){return new e({type:"map",keyType:r,valueType:i,..._(o)})}function tg(e,r,i){return new e({type:"set",valueType:r,..._(i)})}function rg(e,r,i){let o=Array.isArray(r)?Object.fromEntries(r.map(t=>[t,t])):r;return new e({type:"enum",entries:o,..._(i)})}function ng(e,r,i){return new e({type:"enum",entries:r,..._(i)})}function ig(e,r,i){return new e({type:"literal",values:Array.isArray(r)?r:[r],..._(i)})}function qa(e,r){return new e({type:"file",..._(r)})}function og(e,r){return new e({type:"transform",transform:r})}function ag(e,r){return new e({type:"optional",innerType:r})}function cg(e,r){return new e({type:"nullable",innerType:r})}function sg(e,r,i){return new e({type:"default",innerType:r,get defaultValue(){return typeof i=="function"?i():ei(i)}})}function ug(e,r,i){return new e({type:"nonoptional",innerType:r,..._(i)})}function lg(e,r){return new e({type:"success",innerType:r})}function dg(e,r,i){return new e({type:"catch",innerType:r,catchValue:typeof i=="function"?i:()=>i})}function pg(e,r,i){return new e({type:"pipe",in:r,out:i})}function mg(e,r){return new e({type:"readonly",innerType:r})}function fg(e,r,i){return new e({type:"template_literal",parts:r,..._(i)})}function gg(e,r){return new e({type:"lazy",getter:r})}function hg(e,r){return new e({type:"promise",innerType:r})}function Ha(e,r,i){let o=_(i);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:r,...o})}function Xa(e,r,i){return new e({type:"custom",check:"custom",fn:r,..._(i)})}function Ya(e,r){let i=Kl(o=>(o.addIssue=t=>{if(typeof t=="string")o.issues.push(Ze(t,o.value,i._zod.def));else{let n=t;n.fatal&&(n.continue=!1),n.code??(n.code="custom"),n.input??(n.input=o.value),n.inst??(n.inst=i),n.continue??(n.continue=!i._zod.def.abort),o.issues.push(Ze(n))}},e(o.value,o)),r);return i}function Kl(e,r){let i=new T({check:"custom",..._(r)});return i._zod.check=e,i}function Qa(e){let r=new T({check:"describe"});return r._zod.onattach=[i=>{let o=L.get(i)??{};L.add(i,{...o,description:e})}],r._zod.check=()=>{},r}function ec(e){let r=new T({check:"meta"});return r._zod.onattach=[i=>{let o=L.get(i)??{};L.add(i,{...o,...e})}],r._zod.check=()=>{},r}function tc(e,r){let i=_(r),o=i.truthy??["true","1","yes","on","y","enabled"],t=i.falsy??["false","0","no","off","n","disabled"];i.case!=="sensitive"&&(o=o.map(h=>typeof h=="string"?h.toLowerCase():h),t=t.map(h=>typeof h=="string"?h.toLowerCase():h));let n=new Set(o),a=new Set(t),c=e.Codec??jt,u=e.Boolean??It,s=e.String??Se,d=new s({type:"string",error:i.error}),m=new u({type:"boolean",error:i.error}),$=new c({type:"pipe",in:d,out:m,transform:((h,x)=>{let N=h;return i.case!=="sensitive"&&(N=N.toLowerCase()),n.has(N)?!0:a.has(N)?!1:(x.issues.push({code:"invalid_value",expected:"stringbool",values:[...n,...a],input:x.value,inst:$,continue:!1}),{})}),reverseTransform:((h,x)=>h===!0?o[0]||"true":t[0]||"false"),error:i.error});return $}function tt(e,r,i,o={}){let t=_(o),n={..._(o),check:"string_format",type:"string",format:r,fn:typeof i=="function"?i:c=>i.test(c),...t};return i instanceof RegExp&&(n.pattern=i),new e(n)}function _e(e){let r=e?.target??"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??L,target:r,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function S(e,r,i={path:[],schemaPath:[]}){var o;let t=e._zod.def,n=r.seen.get(e);if(n)return n.count++,i.schemaPath.includes(e)&&(n.cycle=i.path),n.schema;let a={schema:{},count:1,cycle:void 0,path:i.path};r.seen.set(e,a);let c=e._zod.toJSONSchema?.();if(c)a.schema=c;else{let d={...i,schemaPath:[...i.schemaPath,e],path:i.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(r,a.schema,d);else{let $=a.schema,h=r.processors[t.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);h(e,r,$,d)}let m=e._zod.parent;m&&(a.ref||(a.ref=m),S(m,r,d),r.seen.get(m).isParent=!0)}let u=r.metadataRegistry.get(e);return u&&Object.assign(a.schema,u),r.io==="input"&&V(e)&&(delete a.schema.examples,delete a.schema.default),r.io==="input"&&"_prefault"in a.schema&&((o=a.schema).default??(o.default=a.schema._prefault)),delete a.schema._prefault,r.seen.get(e).schema}function be(e,r){let i=e.seen.get(r);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=new Map;for(let a of e.seen.entries()){let c=e.metadataRegistry.get(a[0])?.id;if(c){let u=o.get(c);if(u&&u!==a[0])throw new Error(`Duplicate schema id "${c}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);o.set(c,a[0])}}let t=a=>{let c=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(a[0])?.id,$=e.external.uri??(x=>x);if(m)return{ref:$(m)};let h=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=h,{defId:h,ref:`${$("__shared")}#/${c}/${h}`}}if(a[1]===i)return{ref:"#"};let s=`#/${c}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:s+d}},n=a=>{if(a[1].schema.$ref)return;let c=a[1],{ref:u,defId:s}=t(a);c.def={...c.schema},s&&(c.defId=s);let d=c.schema;for(let m in d)delete d[m];d.$ref=u};if(e.cycles==="throw")for(let a of e.seen.entries()){let c=a[1];if(c.cycle)throw new Error(`Cycle detected: #/${c.cycle?.join("/")}/ + `)}g.write("payload.value = newResult;"),g.write("return payload;");let Te=g.compile();return(F,P)=>Te(f,F,P)},o,a=Xe,s=!He.jitless,l=s&&Oo.value,u=r.catchall,d;e._zod.parse=(f,g)=>{d??(d=i.value);let x=f.value;return a(x)?s&&l&&g?.async===!1&&g.jitless!==!0?(o||(o=t(r.shape)),f=o(f,g),u?Lp([],x,f,g,d,e):f):n(f,g):(f.issues.push({expected:"object",code:"invalid_type",input:x,inst:e}),f)}});function _p(e,r,n,i){for(let o of e)if(o.issues.length===0)return r.value=o.value,r;let t=e.filter(o=>!Ce(o));return t.length===1?(r.value=t[0].value,t[0]):(r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(o=>o.issues.map(a=>K(a,i,C())))}),r)}var pr=p("$ZodUnion",(e,r)=>{k.init(e,r),z(e._zod,"optin",()=>r.options.some(i=>i._zod.optin==="optional")?"optional":void 0),z(e._zod,"optout",()=>r.options.some(i=>i._zod.optout==="optional")?"optional":void 0),z(e._zod,"values",()=>{if(r.options.every(i=>i._zod.values))return new Set(r.options.flatMap(i=>Array.from(i._zod.values)))}),z(e._zod,"pattern",()=>{if(r.options.every(i=>i._zod.pattern)){let i=r.options.map(t=>t._zod.pattern);return new RegExp(`^(${i.map(t=>tr(t.source)).join("|")})$`)}});let n=r.options.length===1?r.options[0]._zod.run:null;e._zod.parse=(i,t)=>{if(n)return n(i,t);let o=!1,a=[];for(let s of r.options){let c=s._zod.run({value:i.value,issues:[]},t);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(s=>_p(s,i,e,t)):_p(a,i,e,t)}});function kp(e,r,n,i){let t=e.filter(o=>o.issues.length===0);return t.length===1?(r.value=t[0].value,r):(t.length===0?r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:e.map(o=>o.issues.map(a=>K(a,i,C())))}):r.issues.push({code:"invalid_union",input:r.value,inst:n,errors:[],inclusive:!1}),r)}var $s=p("$ZodXor",(e,r)=>{pr.init(e,r),r.inclusive=!1;let n=r.options.length===1?r.options[0]._zod.run:null;e._zod.parse=(i,t)=>{if(n)return n(i,t);let o=!1,a=[];for(let s of r.options){let c=s._zod.run({value:i.value,issues:[]},t);c instanceof Promise?(a.push(c),o=!0):a.push(c)}return o?Promise.all(a).then(s=>kp(s,i,e,t)):kp(a,i,e,t)}}),_s=p("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,pr.init(e,r);let n=e._zod.parse;z(e._zod,"propValues",()=>{let t={};for(let o of r.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(o)}"`);for(let[s,c]of Object.entries(a)){t[s]||(t[s]=new Set);for(let l of c)t[s].add(l)}}return t});let i=pt(()=>{let t=r.options,o=new Map;for(let a of t){let s=a._zod.propValues?.[r.discriminator];if(!s||s.size===0)throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(a)}"`);for(let c of s){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,a)}}return o});e._zod.parse=(t,o)=>{let a=t.value;if(!Xe(a))return t.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),t;let s=i.value.get(a?.[r.discriminator]);return s?s._zod.run(t,o):r.unionFallback||o.direction==="backward"?n(t,o):(t.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,options:Array.from(i.value.keys()),input:a,path:[r.discriminator],inst:e}),t)}}),ks=p("$ZodIntersection",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>{let t=n.value,o=r.left._zod.run({value:t,issues:[]},i),a=r.right._zod.run({value:t,issues:[]},i);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,l])=>wp(n,c,l)):wp(n,o,a)}});function Za(e,r){if(e===r)return{valid:!0,data:e};if(e instanceof Date&&r instanceof Date&&+e==+r)return{valid:!0,data:e};if(Le(e)&&Le(r)){let n=Object.keys(r),i=Object.keys(e).filter(o=>n.indexOf(o)!==-1),t={...e,...r};for(let o of i){let a=Za(e[o],r[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};t[o]=a.data}return{valid:!0,data:t}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let i=0;is.l&&s.r).map(([s])=>s);if(o.length&&t&&e.issues.push({...t,keys:o}),Ce(e))return e;let a=Za(r.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Tn=p("$ZodTuple",(e,r)=>{k.init(e,r);let n=r.items;e._zod.parse=(i,t)=>{let o=i.value;if(!Array.isArray(o))return i.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),i;i.value=[];let a=[],s=Sp(n,"optin"),c=Sp(n,"optout");if(!r.rest){if(o.lengthn.length&&i.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}let l=new Array(n.length);for(let u=0;u{l[u]=f})):l[u]=d}if(r.rest){let u=n.length-1,d=o.slice(n.length);for(let f of d){u++;let g=r.rest._zod.run({value:f,issues:[]},t);g instanceof Promise?a.push(g.then(x=>zp(x,i,u))):zp(g,i,u)}}return a.length?Promise.all(a).then(()=>Ip(l,i,n,o,c)):Ip(l,i,n,o,c)}});function Sp(e,r){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[r]!=="optional")return n+1;return 0}function zp(e,r,n){e.issues.length&&r.issues.push(...ee(n,e.issues)),r.value[n]=e.value}function Ip(e,r,n,i,t){for(let o=0;o=t){r.value.length=o;break}r.issues.push(...ee(o,a.issues))}r.value[o]=a.value}for(let o=r.value.length-1;o>=i.length&&(n[o]._zod.optout==="optional"&&r.value[o]===void 0);o--)r.value.length=o;return r}var ws=p("$ZodRecord",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!Le(t))return n.issues.push({expected:"record",code:"invalid_type",input:t,inst:e}),n;let o=[],a=r.keyType._zod.values;if(a){n.value={};let s=new Set;for(let l of a)if(typeof l=="string"||typeof l=="number"||typeof l=="symbol"){s.add(typeof l=="number"?l.toString():l);let u=r.keyType._zod.run({value:l,issues:[]},i);if(u instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(u.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:u.issues.map(g=>K(g,i,C())),input:l,path:[l],inst:e});continue}let d=u.value,f=r.valueType._zod.run({value:t[l],issues:[]},i);f instanceof Promise?o.push(f.then(g=>{g.issues.length&&n.issues.push(...ee(l,g.issues)),n.value[d]=g.value})):(f.issues.length&&n.issues.push(...ee(l,f.issues)),n.value[d]=f.value)}let c;for(let l in t)s.has(l)||(c=c??[],c.push(l));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:t,inst:e,keys:c})}else{n.value={};for(let s of Reflect.ownKeys(t)){if(s==="__proto__"||!Object.prototype.propertyIsEnumerable.call(t,s))continue;let c=r.keyType._zod.run({value:s,issues:[]},i);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof s=="string"&&xn.test(s)&&c.issues.length){let d=r.keyType._zod.run({value:Number(s),issues:[]},i);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");d.issues.length===0&&(c=d)}if(c.issues.length){r.mode==="loose"?n.value[s]=t[s]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(d=>K(d,i,C())),input:s,path:[s],inst:e});continue}let u=r.valueType._zod.run({value:t[s],issues:[]},i);u instanceof Promise?o.push(u.then(d=>{d.issues.length&&n.issues.push(...ee(s,d.issues)),n.value[c.value]=d.value})):(u.issues.length&&n.issues.push(...ee(s,u.issues)),n.value[c.value]=u.value)}}return o.length?Promise.all(o).then(()=>n):n}}),Ss=p("$ZodMap",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:t,inst:e}),n;let o=[];n.value=new Map;for(let[a,s]of t){let c=r.keyType._zod.run({value:a,issues:[]},i),l=r.valueType._zod.run({value:s,issues:[]},i);c instanceof Promise||l instanceof Promise?o.push(Promise.all([c,l]).then(([u,d])=>{Tp(u,d,n,a,t,e,i)})):Tp(c,l,n,a,t,e,i)}return o.length?Promise.all(o).then(()=>n):n}});function Tp(e,r,n,i,t,o,a){e.issues.length&&(rr.has(typeof i)?n.issues.push(...ee(i,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:t,inst:o,issues:e.issues.map(s=>K(s,a,C()))})),r.issues.length&&(rr.has(typeof i)?n.issues.push(...ee(i,r.issues)):n.issues.push({origin:"map",code:"invalid_element",input:t,inst:o,key:i,issues:r.issues.map(s=>K(s,a,C()))})),n.value.set(e.value,r.value)}var zs=p("$ZodSet",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;if(!(t instanceof Set))return n.issues.push({input:t,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let a of t){let s=r.valueType._zod.run({value:a,issues:[]},i);s instanceof Promise?o.push(s.then(c=>Pp(c,n))):Pp(s,n)}return o.length?Promise.all(o).then(()=>n):n}});function Pp(e,r){e.issues.length&&r.issues.push(...e.issues),r.value.add(e.value)}var Is=p("$ZodEnum",(e,r)=>{k.init(e,r);let n=er(r.entries),i=new Set(n);e._zod.values=i,e._zod.pattern=new RegExp(`^(${n.filter(t=>rr.has(typeof t)).map(t=>typeof t=="string"?se(t):t.toString()).join("|")})$`),e._zod.parse=(t,o)=>{let a=t.value;return i.has(a)||t.issues.push({code:"invalid_value",values:n,input:a,inst:e}),t}}),Ts=p("$ZodLiteral",(e,r)=>{if(k.init(e,r),r.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(r.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${r.values.map(i=>typeof i=="string"?se(i):i?se(i.toString()):String(i)).join("|")})$`),e._zod.parse=(i,t)=>{let o=i.value;return n.has(o)||i.issues.push({code:"invalid_value",values:r.values,input:o,inst:e}),i}}),Ps=p("$ZodFile",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>{let t=n.value;return t instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:t,inst:e}),n}}),Es=p("$ZodTransform",(e,r)=>{k.init(e,r),e._zod.optin="optional",e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Ne(e.constructor.name);let t=r.transform(n.value,n);if(i.async)return(t instanceof Promise?t:Promise.resolve(t)).then(a=>(n.value=a,n.fallback=!0,n));if(t instanceof Promise)throw new ue;return n.value=t,n.fallback=!0,n}});function Ep(e,r){return r===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Pn=p("$ZodOptional",(e,r)=>{k.init(e,r),e._zod.optin="optional",e._zod.optout="optional",z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,void 0]):void 0),z(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${tr(n.source)})?$`):void 0}),e._zod.parse=(n,i)=>{if(r.innerType._zod.optin==="optional"){let t=n.value,o=r.innerType._zod.run(n,i);return o instanceof Promise?o.then(a=>Ep(a,t)):Ep(o,t)}return n.value===void 0?n:r.innerType._zod.run(n,i)}}),Os=p("$ZodExactOptional",(e,r)=>{Pn.init(e,r),z(e._zod,"values",()=>r.innerType._zod.values),z(e._zod,"pattern",()=>r.innerType._zod.pattern),e._zod.parse=(n,i)=>r.innerType._zod.run(n,i)}),js=p("$ZodNullable",(e,r)=>{k.init(e,r),z(e._zod,"optin",()=>r.innerType._zod.optin),z(e._zod,"optout",()=>r.innerType._zod.optout),z(e._zod,"pattern",()=>{let n=r.innerType._zod.pattern;return n?new RegExp(`^(${tr(n.source)}|null)$`):void 0}),z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(n,i)=>n.value===null?n:r.innerType._zod.run(n,i)}),Us=p("$ZodDefault",(e,r)=>{k.init(e,r),e._zod.optin="optional",z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);if(n.value===void 0)return n.value=r.defaultValue,n;let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>Op(o,r)):Op(t,r)}});function Op(e,r){return e.value===void 0&&(e.value=r.defaultValue),e}var Ds=p("$ZodPrefault",(e,r)=>{k.init(e,r),e._zod.optin="optional",z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>(i.direction==="backward"||n.value===void 0&&(n.value=r.defaultValue),r.innerType._zod.run(n,i))}),Ns=p("$ZodNonOptional",(e,r)=>{k.init(e,r),z(e._zod,"values",()=>{let n=r.innerType._zod.values;return n?new Set([...n].filter(i=>i!==void 0)):void 0}),e._zod.parse=(n,i)=>{let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>jp(o,e)):jp(t,e)}});function jp(e,r){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r}),e}var Zs=p("$ZodSuccess",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Ne("ZodSuccess");let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>(n.value=o.issues.length===0,n)):(n.value=t.issues.length===0,n)}}),As=p("$ZodCatch",(e,r)=>{k.init(e,r),e._zod.optin="optional",z(e._zod,"optout",()=>r.innerType._zod.optout),z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(o=>(n.value=o.value,o.issues.length&&(n.value=r.catchValue({...n,error:{issues:o.issues.map(a=>K(a,i,C()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=t.value,t.issues.length&&(n.value=r.catchValue({...n,error:{issues:t.issues.map(o=>K(o,i,C()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),Ls=p("$ZodNaN",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),En=p("$ZodPipe",(e,r)=>{k.init(e,r),z(e._zod,"values",()=>r.in._zod.values),z(e._zod,"optin",()=>r.in._zod.optin),z(e._zod,"optout",()=>r.out._zod.optout),z(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if(i.direction==="backward"){let o=r.out._zod.run(n,i);return o instanceof Promise?o.then(a=>_n(a,r.in,i)):_n(o,r.in,i)}let t=r.in._zod.run(n,i);return t instanceof Promise?t.then(o=>_n(o,r.out,i)):_n(t,r.out,i)}});function _n(e,r,n){return e.issues.length?(e.aborted=!0,e):r._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var fr=p("$ZodCodec",(e,r)=>{k.init(e,r),z(e._zod,"values",()=>r.in._zod.values),z(e._zod,"optin",()=>r.in._zod.optin),z(e._zod,"optout",()=>r.out._zod.optout),z(e._zod,"propValues",()=>r.in._zod.propValues),e._zod.parse=(n,i)=>{if((i.direction||"forward")==="forward"){let o=r.in._zod.run(n,i);return o instanceof Promise?o.then(a=>kn(a,r,i)):kn(o,r,i)}else{let o=r.out._zod.run(n,i);return o instanceof Promise?o.then(a=>kn(a,r,i)):kn(o,r,i)}}});function kn(e,r,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let t=r.transform(e.value,e);return t instanceof Promise?t.then(o=>wn(e,o,r.out,n)):wn(e,t,r.out,n)}else{let t=r.reverseTransform(e.value,e);return t instanceof Promise?t.then(o=>wn(e,o,r.in,n)):wn(e,t,r.in,n)}}function wn(e,r,n,i){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:r,issues:e.issues},i)}var Cs=p("$ZodPreprocess",(e,r)=>{En.init(e,r)}),Rs=p("$ZodReadonly",(e,r)=>{k.init(e,r),z(e._zod,"propValues",()=>r.innerType._zod.propValues),z(e._zod,"values",()=>r.innerType._zod.values),z(e._zod,"optin",()=>r.innerType?._zod?.optin),z(e._zod,"optout",()=>r.innerType?._zod?.optout),e._zod.parse=(n,i)=>{if(i.direction==="backward")return r.innerType._zod.run(n,i);let t=r.innerType._zod.run(n,i);return t instanceof Promise?t.then(Up):Up(t)}});function Up(e){return e.value=Object.freeze(e.value),e}var Ms=p("$ZodTemplateLiteral",(e,r)=>{k.init(e,r);let n=[];for(let i of r.parts)if(typeof i=="object"&&i!==null){if(!i._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...i._zod.traits].shift()}`);let t=i._zod.pattern instanceof RegExp?i._zod.pattern.source:i._zod.pattern;if(!t)throw new Error(`Invalid template literal part: ${i._zod.traits}`);let o=t.startsWith("^")?1:0,a=t.endsWith("$")?t.length-1:t.length;n.push(t.slice(o,a))}else if(i===null||Uo.has(typeof i))n.push(se(`${i}`));else throw new Error(`Invalid template literal part: ${i}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(i,t)=>typeof i.value!="string"?(i.issues.push({input:i.value,inst:e,expected:"string",code:"invalid_type"}),i):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(i.value)||i.issues.push({input:i.value,inst:e,code:"invalid_format",format:r.format??"template_literal",pattern:e._zod.pattern.source}),i)}),Fs=p("$ZodFunction",(e,r)=>(k.init(e,r),e._def=r,e._zod.def=r,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...i){let t=e._def.input?cn(e._def.input,i):i,o=Reflect.apply(n,this,t);return e._def.output?cn(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...i){let t=e._def.input?await ln(e._def.input,i):i,o=await Reflect.apply(n,this,t);return e._def.output?await ln(e._def.output,o):o}},e._zod.parse=(n,i)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let i=e.constructor;return Array.isArray(n[0])?new i({type:"function",input:new Tn({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new i({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let i=e.constructor;return new i({type:"function",input:e._def.input,output:n})},e)),Vs=p("$ZodPromise",(e,r)=>{k.init(e,r),e._zod.parse=(n,i)=>Promise.resolve(n.value).then(t=>r.innerType._zod.run({value:t,issues:[]},i))}),Js=p("$ZodLazy",(e,r)=>{k.init(e,r),z(e._zod,"innerType",()=>{let n=r;return n._cachedInner||(n._cachedInner=r.getter()),n._cachedInner}),z(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),z(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),z(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),z(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,i)=>e._zod.innerType._zod.run(n,i)}),Bs=p("$ZodCustom",(e,r)=>{Z.init(e,r),k.init(e,r),e._zod.parse=(n,i)=>n,e._zod.check=n=>{let i=n.value,t=r.fn(i);if(t instanceof Promise)return t.then(o=>Dp(o,n,i,e));Dp(t,n,i,e)}});function Dp(e,r,n,i){if(!e){let t={code:"custom",input:n,inst:i,path:[...i._zod.def.path??[]],continue:!i._zod.def.abort};i._zod.def.params&&(t.params=i._zod.def.params),r.issues.push(ft(t))}}var gr={};$e(gr,{ar:()=>Rp,az:()=>Mp,be:()=>Vp,bg:()=>Jp,ca:()=>Bp,cs:()=>Wp,da:()=>qp,de:()=>Gp,el:()=>Kp,en:()=>On,eo:()=>Hp,es:()=>Xp,fa:()=>Yp,fi:()=>Qp,fr:()=>ef,frCA:()=>tf,he:()=>rf,hr:()=>nf,hu:()=>of,hy:()=>sf,id:()=>cf,is:()=>lf,it:()=>uf,ja:()=>df,ka:()=>pf,kh:()=>ff,km:()=>jn,ko:()=>mf,lt:()=>hf,mk:()=>vf,ms:()=>bf,nl:()=>xf,no:()=>yf,ota:()=>$f,pl:()=>kf,ps:()=>_f,pt:()=>wf,ro:()=>Sf,ru:()=>If,sl:()=>Tf,sv:()=>Pf,ta:()=>Ef,th:()=>Of,tr:()=>jf,ua:()=>Uf,uk:()=>Un,ur:()=>Df,uz:()=>Nf,vi:()=>Zf,yo:()=>Cf,zhCN:()=>Af,zhTW:()=>Lf});var Ax=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function r(t){return e[t]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${t.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${s}`}case"invalid_value":return t.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${h(t.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${t.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${t.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${t.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${t.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${t.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??t.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${t.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${t.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${t.keys.length>1?"\u0629":""}: ${m(t.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${t.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function Rp(){return{localeError:Ax()}}var Lx=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function r(t){return e[t]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${t.expected}, daxil olan ${s}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${s}`}case"invalid_value":return t.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${h(t.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${t.origin??"d\u0259y\u0259r"} ${o}${t.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${t.origin??"d\u0259y\u0259r"} ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${o}${t.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${t.origin} ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??t.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${t.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${t.keys.length>1?"lar":""}: ${m(t.keys,", ")}`;case"invalid_key":return`${t.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${t.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Mp(){return{localeError:Lx()}}function Fp(e,r,n,i){let t=Math.abs(e),o=t%10,a=t%100;return a>=11&&a<=19?i:o===1?r:o>=2&&o<=4?n:i}var Cx=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function r(t){return e[t]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},i={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${t.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${s}`}case"invalid_value":return t.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${h(t.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);if(a){let s=Number(t.maximum),c=Fp(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${t.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);if(a){let s=Number(t.minimum),c=Fp(s,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${t.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${t.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??t.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${t.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${m(t.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${t.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${t.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Vp(){return{localeError:Cx()}}var Rx=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function r(t){return e[t]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${t.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${s}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${h(t.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${t.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${t.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${t.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${t.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${t.keys.length>1?"\u043E\u0432\u0435":""}: ${m(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${t.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Jp(){return{localeError:Rx()}}var Mx=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function r(t){return e[t]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${t.expected}, s'ha rebut ${s}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${s}`}case"invalid_value":return t.values.length===1?`Valor inv\xE0lid: s'esperava ${h(t.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${m(t.values," o ")}`;case"too_big":{let o=t.inclusive?"com a m\xE0xim":"menys de",a=r(t.origin);return a?`Massa gran: s'esperava que ${t.origin??"el valor"} contingu\xE9s ${o} ${t.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${t.origin??"el valor"} fos ${o} ${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?"com a m\xEDnim":"m\xE9s de",a=r(t.origin);return a?`Massa petit: s'esperava que ${t.origin} contingu\xE9s ${o} ${t.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${t.origin} fos ${o} ${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${t.divisor}`;case"unrecognized_keys":return`Clau${t.keys.length>1?"s":""} no reconeguda${t.keys.length>1?"s":""}: ${m(t.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${t.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${t.origin}`;default:return"Entrada inv\xE0lida"}}};function Bp(){return{localeError:Mx()}}var Fx=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function r(t){return e[t]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},i={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${t.expected}, obdr\u017Eeno ${s}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${s}`}case"invalid_value":return t.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${h(t.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${t.origin??"hodnota"} mus\xED m\xEDt ${o}${t.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${t.origin??"hodnota"} mus\xED b\xFDt ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${t.origin??"hodnota"} mus\xED m\xEDt ${o}${t.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${t.origin??"hodnota"} mus\xED b\xFDt ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??t.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${t.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${m(t.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${t.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${t.origin}`;default:return"Neplatn\xFD vstup"}}};function Wp(){return{localeError:Fx()}}var Vx=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function r(t){return e[t]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Ugyldigt input: forventede instanceof ${t.expected}, fik ${s}`:`Ugyldigt input: forventede ${o}, fik ${s}`}case"invalid_value":return t.values.length===1?`Ugyldig v\xE6rdi: forventede ${h(t.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin),s=i[t.origin]??t.origin;return a?`For stor: forventede ${s??"value"} ${a.verb} ${o} ${t.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${s??"value"} havde ${o} ${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin),s=i[t.origin]??t.origin;return a?`For lille: forventede ${s} ${a.verb} ${o} ${t.minimum.toString()} ${a.unit}`:`For lille: forventede ${s} havde ${o} ${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??t.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${m(t.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${t.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${t.origin}`;default:return"Ugyldigt input"}}};function qp(){return{localeError:Vx()}}var Jx=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function r(t){return e[t]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},i={nan:"NaN",number:"Zahl",array:"Array"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${t.expected}, erhalten ${s}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${s}`}case"invalid_value":return t.values.length===1?`Ung\xFCltige Eingabe: erwartet ${h(t.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Zu gro\xDF: erwartet, dass ${t.origin??"Wert"} ${o}${t.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${t.origin??"Wert"} ${o}${t.maximum.toString()} ist`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Zu klein: erwartet, dass ${t.origin} ${o}${t.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${t.origin} ${o}${t.minimum.toString()} ist`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??t.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${t.divisor} sein`;case"unrecognized_keys":return`${t.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${m(t.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${t.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${t.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Gp(){return{localeError:Jx()}}var Bx=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function r(t){return e[t]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return typeof t.expected=="string"&&/^[A-Z]/.test(t.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${t.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${s}`}case"invalid_value":return t.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${h(t.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${t.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${t.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${t.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??t.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${t.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${t.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${t.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${m(t.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${t.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${t.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Kp(){return{localeError:Bx()}}var Wx=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function r(t){return e[t]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return`Invalid input: expected ${o}, received ${s}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${h(t.values[0])}`:`Invalid option: expected one of ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Too big: expected ${t.origin??"value"} to have ${o}${t.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${t.origin??"value"} to be ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Too small: expected ${t.origin} to have ${o}${t.minimum.toString()} ${a.unit}`:`Too small: expected ${t.origin} to be ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??t.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${t.divisor}`;case"unrecognized_keys":return`Unrecognized key${t.keys.length>1?"s":""}: ${m(t.keys,", ")}`;case"invalid_key":return`Invalid key in ${t.origin}`;case"invalid_union":return t.options&&Array.isArray(t.options)&&t.options.length>0?`Invalid discriminator value. Expected ${t.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${t.origin}`;default:return"Invalid input"}}};function On(){return{localeError:Wx()}}var qx=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function r(t){return e[t]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},i={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${t.expected}, ricevi\u011Dis ${s}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${s}`}case"invalid_value":return t.values.length===1?`Nevalida enigo: atendi\u011Dis ${h(t.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Tro granda: atendi\u011Dis ke ${t.origin??"valoro"} havu ${o}${t.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${t.origin??"valoro"} havu ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Tro malgranda: atendi\u011Dis ke ${t.origin} havu ${o}${t.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${t.origin} estu ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??t.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${t.divisor}`;case"unrecognized_keys":return`Nekonata${t.keys.length>1?"j":""} \u015Dlosilo${t.keys.length>1?"j":""}: ${m(t.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${t.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${t.origin}`;default:return"Nevalida enigo"}}};function Hp(){return{localeError:qx()}}var Gx=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function r(t){return e[t]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${t.expected}, recibido ${s}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${s}`}case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: se esperaba ${h(t.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin),s=i[t.origin]??t.origin;return a?`Demasiado grande: se esperaba que ${s??"valor"} tuviera ${o}${t.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${s??"valor"} fuera ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin),s=i[t.origin]??t.origin;return a?`Demasiado peque\xF1o: se esperaba que ${s} tuviera ${o}${t.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${s} fuera ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??t.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Llave${t.keys.length>1?"s":""} desconocida${t.keys.length>1?"s":""}: ${m(t.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${i[t.origin]??t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${i[t.origin]??t.origin}`;default:return"Entrada inv\xE1lida"}}};function Xp(){return{localeError:Gx()}}var Kx=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function r(t){return e[t]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${t.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${s} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return t.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${h(t.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${m(t.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${t.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${t.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${t.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${o}${t.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${t.origin} \u0628\u0627\u06CC\u062F ${o}${t.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??t.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${t.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${t.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${m(t.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${t.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${t.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Yp(){return{localeError:Kx()}}var Hx=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function r(t){return e[t]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Virheellinen tyyppi: odotettiin instanceof ${t.expected}, oli ${s}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${s}`}case"invalid_value":return t.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${h(t.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${t.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${t.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??t.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${t.divisor} monikerta`;case"unrecognized_keys":return`${t.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${m(t.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function Qp(){return{localeError:Hx()}}var Xx=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function r(t){return e[t]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Entr\xE9e invalide : instanceof ${t.expected} attendu, ${s} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${s} re\xE7u`}case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : ${h(t.values[0])} attendu`:`Option invalide : une valeur parmi ${m(t.values,"|")} attendue`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Trop grand : ${i[t.origin]??"valeur"} doit ${a.verb} ${o}${t.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${i[t.origin]??"valeur"} doit \xEAtre ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Trop petit : ${i[t.origin]??"valeur"} doit ${a.verb} ${o}${t.minimum.toString()} ${a.unit}`:`Trop petit : ${i[t.origin]??"valeur"} doit \xEAtre ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${m(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function ef(){return{localeError:Xx()}}var Yx=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function r(t){return e[t]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Entr\xE9e invalide : attendu instanceof ${t.expected}, re\xE7u ${s}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${s}`}case"invalid_value":return t.values.length===1?`Entr\xE9e invalide : attendu ${h(t.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"\u2264":"<",a=r(t.origin);return a?`Trop grand : attendu que ${t.origin??"la valeur"} ait ${o}${t.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${t.origin??"la valeur"} soit ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?"\u2265":">",a=r(t.origin);return a?`Trop petit : attendu que ${t.origin} ait ${o}${t.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${t.origin} soit ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??t.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${t.divisor}`;case"unrecognized_keys":return`Cl\xE9${t.keys.length>1?"s":""} non reconnue${t.keys.length>1?"s":""} : ${m(t.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${t.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${t.origin}`;default:return"Entr\xE9e invalide"}}};function tf(){return{localeError:Yx()}}var Qx=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},r={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=l=>l?e[l]:void 0,i=l=>{let u=n(l);return u?u.label:l??e.unknown.label},t=l=>`\u05D4${i(l)}`,o=l=>(n(l)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=l=>l?r[l]??null:null,s={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return l=>{switch(l.code){case"invalid_type":{let u=l.expected,d=c[u??""]??i(u),f=v(l.input),g=c[f]??e[f]?.label??f;return/^[A-Z]/.test(l.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${l.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${g}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${d}, \u05D4\u05EA\u05E7\u05D1\u05DC ${g}`}case"invalid_value":{if(l.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${h(l.values[0])}`;let u=l.values.map(g=>h(g));if(l.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u[0]} \u05D0\u05D5 ${u[1]}`;let d=u[u.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${u.slice(0,-1).join(", ")} \u05D0\u05D5 ${d}`}case"too_big":{let u=a(l.origin),d=t(l.origin??"value");if(l.origin==="string")return`${u?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.maximum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(l.origin==="number"){let x=l.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${l.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}`}if(l.origin==="array"||l.origin==="set"){let x=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",T=l.inclusive?`${l.maximum} ${u?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${l.maximum} ${u?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${d} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${T}`.trim()}let f=l.inclusive?"<=":"<",g=o(l.origin??"value");return u?.unit?`${u.longLabel} \u05DE\u05D3\u05D9: ${d} ${g} ${f}${l.maximum.toString()} ${u.unit}`:`${u?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${d} ${g} ${f}${l.maximum.toString()}`}case"too_small":{let u=a(l.origin),d=t(l.origin??"value");if(l.origin==="string")return`${u?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${l.minimum.toString()} ${u?.unit??""} ${l.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(l.origin==="number"){let x=l.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${l.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${l.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${x}`}if(l.origin==="array"||l.origin==="set"){let x=l.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(l.minimum===1&&l.inclusive){let w=(l.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${w}`}let T=l.inclusive?`${l.minimum} ${u?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${l.minimum} ${u?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${d} ${x} \u05DC\u05D4\u05DB\u05D9\u05DC ${T}`.trim()}let f=l.inclusive?">=":">",g=o(l.origin??"value");return u?.unit?`${u.shortLabel} \u05DE\u05D3\u05D9: ${d} ${g} ${f}${l.minimum.toString()} ${u.unit}`:`${u?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${d} ${g} ${f}${l.minimum.toString()}`}case"invalid_format":{let u=l;if(u.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${u.prefix}"`;if(u.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${u.suffix}"`;if(u.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${u.includes}"`;if(u.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${u.pattern}`;let d=s[u.format],f=d?.label??u.format,x=(d?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${f} \u05DC\u05D0 ${x}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${l.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${l.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${l.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${m(l.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${t(l.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function rf(){return{localeError:Qx()}}var ey=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function r(t){return e[t]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},i={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${t.expected}, a primljeno je ${s}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${s}`}case"invalid_value":return t.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${h(t.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin),s=i[t.origin]??t.origin;return a?`Preveliko: o\u010Dekivano da ${s??"vrijednost"} ima ${o}${t.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${s??"vrijednost"} bude ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin),s=i[t.origin]??t.origin;return a?`Premalo: o\u010Dekivano da ${s} ima ${o}${t.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${s} bude ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??t.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${t.divisor}`;case"unrecognized_keys":return`Neprepoznat${t.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${m(t.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${i[t.origin]??t.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${i[t.origin]??t.origin}`;default:return"Neispravan unos"}}};function nf(){return{localeError:ey()}}var ty=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function r(t){return e[t]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},i={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${t.expected}, a kapott \xE9rt\xE9k ${s}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${s}`}case"invalid_value":return t.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${h(t.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`T\xFAl nagy: ${t.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${t.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${t.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} m\xE9rete t\xFAl kicsi ${o}${t.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${t.origin} t\xFAl kicsi ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??t.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${t.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${t.keys.length>1?"s":""}: ${m(t.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${t.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${t.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function of(){return{localeError:ty()}}function af(e,r,n){return Math.abs(e)===1?r:n}function xt(e){if(!e)return"";let r=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(r.includes(n)?"\u0576":"\u0568")}var ry=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function r(t){return e[t]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},i={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${t.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${s}`}case"invalid_value":return t.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${h(t.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);if(a){let s=Number(t.maximum),c=af(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${xt(t.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${t.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${xt(t.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);if(a){let s=Number(t.minimum),c=af(s,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${xt(t.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${t.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${xt(t.origin)} \u056C\u056B\u0576\u056B ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??t.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${t.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${t.keys.length>1?"\u0576\u0565\u0580":""}. ${m(t.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${xt(t.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${xt(t.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function sf(){return{localeError:ry()}}var ny=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function r(t){return e[t]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Input tidak valid: diharapkan instanceof ${t.expected}, diterima ${s}`:`Input tidak valid: diharapkan ${o}, diterima ${s}`}case"invalid_value":return t.values.length===1?`Input tidak valid: diharapkan ${h(t.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Terlalu besar: diharapkan ${t.origin??"value"} memiliki ${o}${t.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${t.origin??"value"} menjadi ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Terlalu kecil: diharapkan ${t.origin} memiliki ${o}${t.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${t.origin} menjadi ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??t.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${t.keys.length>1?"s":""}: ${m(t.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${t.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${t.origin}`;default:return"Input tidak valid"}}};function cf(){return{localeError:ny()}}var iy=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function r(t){return e[t]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},i={nan:"NaN",number:"n\xFAmer",array:"fylki"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera instanceof ${t.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${s} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return t.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${h(t.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin??"gildi"} hafi ${o}${t.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin??"gildi"} s\xE9 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin} hafi ${o}${t.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${t.origin} s\xE9 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??t.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${t.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${t.keys.length>1?"ir lyklar":"ur lykill"}: ${m(t.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${t.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${t.origin}`;default:return"Rangt gildi"}}};function lf(){return{localeError:iy()}}var oy=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function r(t){return e[t]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"numero",array:"vettore"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Input non valido: atteso instanceof ${t.expected}, ricevuto ${s}`:`Input non valido: atteso ${o}, ricevuto ${s}`}case"invalid_value":return t.values.length===1?`Input non valido: atteso ${h(t.values[0])}`:`Opzione non valida: atteso uno tra ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Troppo grande: ${t.origin??"valore"} deve avere ${o}${t.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${t.origin??"valore"} deve essere ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Troppo piccolo: ${t.origin} deve avere ${o}${t.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${t.origin} deve essere ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??t.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${t.divisor}`;case"unrecognized_keys":return`Chiav${t.keys.length>1?"i":"e"} non riconosciut${t.keys.length>1?"e":"a"}: ${m(t.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${t.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${t.origin}`;default:return"Input non valido"}}};function uf(){return{localeError:oy()}}var ay=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function r(t){return e[t]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},i={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${t.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${s}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return t.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${h(t.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${m(t.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=t.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=r(t.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${t.origin??"\u5024"}\u306F${t.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${t.origin??"\u5024"}\u306F${t.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=t.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=r(t.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${t.origin}\u306F${t.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??t.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${t.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${t.keys.length>1?"\u7FA4":""}: ${m(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${t.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function df(){return{localeError:ay()}}var sy=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function r(t){return e[t]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},i={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${t.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${s}`}case"invalid_value":return t.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${h(t.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${m(t.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${t.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin} ${a.verb} ${o}${t.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${t.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${t.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${t.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${m(t.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${t.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${t.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function pf(){return{localeError:sy()}}var cy=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function r(t){return e[t]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},i={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${t.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${s}`}case"invalid_value":return t.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${h(t.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${t.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${o} ${t.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${t.origin} ${o} ${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${t.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${m(t.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${t.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${t.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function jn(){return{localeError:cy()}}function ff(){return jn()}var ly=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function r(t){return e[t]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${t.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${s}\uC785\uB2C8\uB2E4`}case"invalid_value":return t.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${h(t.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${m(t.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=t.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=r(t.origin),c=s?.unit??"\uC694\uC18C";return s?`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()}${c} ${o}${a}`:`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${t.maximum.toString()} ${o}${a}`}case"too_small":{let o=t.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",s=r(t.origin),c=s?.unit??"\uC694\uC18C";return s?`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()}${c} ${o}${a}`:`${t.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${t.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??t.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${t.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${m(t.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${t.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${t.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function mf(){return{localeError:ly()}}var mr=e=>e.charAt(0).toUpperCase()+e.slice(1);function gf(e){let r=Math.abs(e),n=r%10,i=r%100;return i>=11&&i<=19||n===0?"many":n===1?"one":"few"}var uy=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function r(t,o,a,s){let c=e[t]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[s][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},i={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Gautas tipas ${s}, o tik\u0117tasi - instanceof ${t.expected}`:`Gautas tipas ${s}, o tik\u0117tasi - ${o}`}case"invalid_value":return t.values.length===1?`Privalo b\u016Bti ${h(t.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${m(t.values,"|")} pasirinkim\u0173`;case"too_big":{let o=i[t.origin]??t.origin,a=r(t.origin,gf(Number(t.maximum)),t.inclusive??!1,"smaller");if(a?.verb)return`${mr(o??t.origin??"reik\u0161m\u0117")} ${a.verb} ${t.maximum.toString()} ${a.unit??"element\u0173"}`;let s=t.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${mr(o??t.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${t.maximum.toString()} ${a?.unit}`}case"too_small":{let o=i[t.origin]??t.origin,a=r(t.origin,gf(Number(t.minimum)),t.inclusive??!1,"bigger");if(a?.verb)return`${mr(o??t.origin??"reik\u0161m\u0117")} ${a.verb} ${t.minimum.toString()} ${a.unit??"element\u0173"}`;let s=t.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${mr(o??t.origin??"reik\u0161m\u0117")} turi b\u016Bti ${s} ${t.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??t.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${t.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${t.keys.length>1?"i":"as"} rakt${t.keys.length>1?"ai":"as"}: ${m(t.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=i[t.origin]??t.origin;return`${mr(o??t.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function hf(){return{localeError:uy()}}var dy=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function r(t){return e[t]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},i={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${t.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${s}`}case"invalid_value":return t.values.length===1?`Invalid input: expected ${h(t.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${t.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${t.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${t.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??t.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${m(t.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${t.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${t.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function vf(){return{localeError:dy()}}var py=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function r(t){return e[t]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"nombor"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Input tidak sah: dijangka instanceof ${t.expected}, diterima ${s}`:`Input tidak sah: dijangka ${o}, diterima ${s}`}case"invalid_value":return t.values.length===1?`Input tidak sah: dijangka ${h(t.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Terlalu besar: dijangka ${t.origin??"nilai"} ${a.verb} ${o}${t.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${t.origin??"nilai"} adalah ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Terlalu kecil: dijangka ${t.origin} ${a.verb} ${o}${t.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${t.origin} adalah ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??t.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${t.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${m(t.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${t.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${t.origin}`;default:return"Input tidak sah"}}};function bf(){return{localeError:py()}}var fy=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function r(t){return e[t]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},i={nan:"NaN",number:"getal"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Ongeldige invoer: verwacht instanceof ${t.expected}, ontving ${s}`:`Ongeldige invoer: verwacht ${o}, ontving ${s}`}case"invalid_value":return t.values.length===1?`Ongeldige invoer: verwacht ${h(t.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin),s=t.origin==="date"?"laat":t.origin==="string"?"lang":"groot";return a?`Te ${s}: verwacht dat ${t.origin??"waarde"} ${o}${t.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${s}: verwacht dat ${t.origin??"waarde"} ${o}${t.maximum.toString()} is`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin),s=t.origin==="date"?"vroeg":t.origin==="string"?"kort":"klein";return a?`Te ${s}: verwacht dat ${t.origin} ${o}${t.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${s}: verwacht dat ${t.origin} ${o}${t.minimum.toString()} is`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??t.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${t.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${t.keys.length>1?"s":""}: ${m(t.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${t.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${t.origin}`;default:return"Ongeldige invoer"}}};function xf(){return{localeError:fy()}}var my=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function r(t){return e[t]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"tall",array:"liste"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Ugyldig input: forventet instanceof ${t.expected}, fikk ${s}`:`Ugyldig input: forventet ${o}, fikk ${s}`}case"invalid_value":return t.values.length===1?`Ugyldig verdi: forventet ${h(t.values[0])}`:`Ugyldig valg: forventet en av ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`For stor(t): forventet ${t.origin??"value"} til \xE5 ha ${o}${t.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${t.origin??"value"} til \xE5 ha ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`For lite(n): forventet ${t.origin} til \xE5 ha ${o}${t.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${t.origin} til \xE5 ha ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??t.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${m(t.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${t.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${t.origin}`;default:return"Ugyldig input"}}};function yf(){return{localeError:my()}}var gy=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function r(t){return e[t]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},i={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`F\xE2sit giren: umulan instanceof ${t.expected}, al\u0131nan ${s}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${s}`}case"invalid_value":return t.values.length===1?`F\xE2sit giren: umulan ${h(t.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Fazla b\xFCy\xFCk: ${t.origin??"value"}, ${o}${t.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${t.origin??"value"}, ${o}${t.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${o}${t.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${t.origin}, ${o}${t.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=t;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??t.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${t.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${t.keys.length>1?"s":""}: ${m(t.keys,", ")}`;case"invalid_key":return`${t.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${t.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function $f(){return{localeError:gy()}}var hy=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function r(t){return e[t]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},i={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${t.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${s} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return t.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${h(t.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${m(t.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${t.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${t.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${t.maximum.toString()} \u0648\u064A`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${o}${t.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${t.origin} \u0628\u0627\u06CC\u062F ${o}${t.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??t.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${t.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${t.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${m(t.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${t.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${t.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function _f(){return{localeError:hy()}}var vy=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function r(t){return e[t]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},i={nan:"NaN",number:"liczba",array:"tablica"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${t.expected}, otrzymano ${s}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${s}`}case"invalid_value":return t.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${h(t.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${t.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${t.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${t.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??t.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${t.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${t.keys.length>1?"s":""}: ${m(t.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${t.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${t.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function kf(){return{localeError:vy()}}var by=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function r(t){return e[t]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},i={nan:"NaN",number:"n\xFAmero",null:"nulo"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Tipo inv\xE1lido: esperado instanceof ${t.expected}, recebido ${s}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${s}`}case"invalid_value":return t.values.length===1?`Entrada inv\xE1lida: esperado ${h(t.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Muito grande: esperado que ${t.origin??"valor"} tivesse ${o}${t.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${t.origin??"valor"} fosse ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Muito pequeno: esperado que ${t.origin} tivesse ${o}${t.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${t.origin} fosse ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??t.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${t.divisor}`;case"unrecognized_keys":return`Chave${t.keys.length>1?"s":""} desconhecida${t.keys.length>1?"s":""}: ${m(t.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${t.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${t.origin}`;default:return"Campo inv\xE1lido"}}};function wf(){return{localeError:by()}}var xy=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function r(t){return e[t]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},i={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${s}`}case"invalid_value":return t.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${h(t.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Prea mare: a\u0219teptat ca ${t.origin??"valoarea"} ${a.verb} ${o}${t.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${t.origin??"valoarea"} s\u0103 fie ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Prea mic: a\u0219teptat ca ${t.origin} ${a.verb} ${o}${t.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${t.origin} s\u0103 fie ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??t.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${t.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${m(t.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${t.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${t.origin}`;default:return"Intrare invalid\u0103"}}};function Sf(){return{localeError:xy()}}function zf(e,r,n,i){let t=Math.abs(e),o=t%10,a=t%100;return a>=11&&a<=19?i:o===1?r:o>=2&&o<=4?n:i}var yy=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function r(t){return e[t]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${t.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${s}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${h(t.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);if(a){let s=Number(t.maximum),c=zf(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${t.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);if(a){let s=Number(t.minimum),c=zf(s,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${t.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${t.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${t.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0438":""}: ${m(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${t.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function If(){return{localeError:yy()}}var $y=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function r(t){return e[t]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},i={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${t.expected}, prejeto ${s}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${s}`}case"invalid_value":return t.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${h(t.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${t.origin??"vrednost"} imelo ${o}${t.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${t.origin??"vrednost"} ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${t.origin} imelo ${o}${t.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${t.origin} ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??t.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${t.divisor}`;case"unrecognized_keys":return`Neprepoznan${t.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${m(t.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${t.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${t.origin}`;default:return"Neveljaven vnos"}}};function Tf(){return{localeError:$y()}}var _y=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function r(t){return e[t]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},i={nan:"NaN",number:"antal",array:"lista"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${t.expected}, fick ${s}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${s}`}case"invalid_value":return t.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${h(t.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${o}${t.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${t.origin??"v\xE4rdet"} att ha ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${o}${t.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${t.origin??"v\xE4rdet"} att ha ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??t.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${t.divisor}`;case"unrecognized_keys":return`${t.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${m(t.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${t.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${t.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Pf(){return{localeError:_y()}}var ky=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function r(t){return e[t]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},i={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${t.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${s}`}case"invalid_value":return t.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${h(t.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${m(t.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${t.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${t.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin} ${o}${t.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${t.origin} ${o}${t.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${t.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${t.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${m(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${t.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function Ef(){return{localeError:ky()}}var wy=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function r(t){return e[t]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},i={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${t.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${s}`}case"invalid_value":return t.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${h(t.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=r(t.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${t.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=r(t.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${t.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${t.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??t.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${t.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${m(t.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${t.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function Of(){return{localeError:wy()}}var Sy=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function r(t){return e[t]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${t.expected}, al\u0131nan ${s}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${s}`}case"invalid_value":return t.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${h(t.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${t.origin??"de\u011Fer"} ${o}${t.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${t.origin??"de\u011Fer"} ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${t.origin} ${o}${t.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${t.origin} ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??t.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${t.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${t.keys.length>1?"lar":""}: ${m(t.keys,", ")}`;case"invalid_key":return`${t.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${t.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function jf(){return{localeError:Sy()}}var zy=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function r(t){return e[t]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},i={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${t.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${s}`}case"invalid_value":return t.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${h(t.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${t.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} ${a.verb} ${o}${t.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${t.origin} \u0431\u0443\u0434\u0435 ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${t.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${t.keys.length>1?"\u0456":""}: ${m(t.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${t.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${t.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Un(){return{localeError:zy()}}function Uf(){return Un()}var Iy=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function r(t){return e[t]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},i={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${t.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${s} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return t.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${h(t.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${m(t.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${t.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${t.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${t.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${t.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u06D2 ${o}${t.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${t.origin} \u06A9\u0627 ${o}${t.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${t.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${t.keys.length>1?"\u0632":""}: ${m(t.keys,"\u060C ")}`;case"invalid_key":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${t.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function Df(){return{localeError:Iy()}}var Ty=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function r(t){return e[t]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},i={nan:"NaN",number:"raqam",array:"massiv"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${t.expected}, qabul qilingan ${s}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${s}`}case"invalid_value":return t.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${h(t.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Juda katta: kutilgan ${t.origin??"qiymat"} ${o}${t.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${t.origin??"qiymat"} ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Juda kichik: kutilgan ${t.origin} ${o}${t.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${t.origin} ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??t.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${t.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${t.keys.length>1?"lar":""}: ${m(t.keys,", ")}`;case"invalid_key":return`${t.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${t.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function Nf(){return{localeError:Ty()}}var Py=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function r(t){return e[t]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},i={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${t.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${s}`}case"invalid_value":return t.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${h(t.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${t.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${t.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${t.origin??"gi\xE1 tr\u1ECB"} ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${a.verb} ${o}${t.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${t.origin} ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??t.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${t.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${m(t.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${t.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Zf(){return{localeError:Py()}}var Ey=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function r(t){return e[t]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},i={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${t.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${s}`}case"invalid_value":return t.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${h(t.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${t.origin??"\u503C"} ${o}${t.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${t.origin??"\u503C"} ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${o}${t.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${t.origin} ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??t.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${t.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${m(t.keys,", ")}`;case"invalid_key":return`${t.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${t.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Af(){return{localeError:Ey()}}var Oy=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function r(t){return e[t]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},i={nan:"NaN"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${t.expected}\uFF0C\u4F46\u6536\u5230 ${s}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${s}`}case"invalid_value":return t.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${h(t.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${t.origin??"\u503C"} \u61C9\u70BA ${o}${t.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${t.origin??"\u503C"} \u61C9\u70BA ${o}${t.maximum.toString()}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${o}${t.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${t.origin} \u61C9\u70BA ${o}${t.minimum.toString()}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??t.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${t.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${t.keys.length>1?"\u5011":""}\uFF1A${m(t.keys,"\u3001")}`;case"invalid_key":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${t.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Lf(){return{localeError:Oy()}}var jy=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function r(t){return e[t]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},i={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return t=>{switch(t.code){case"invalid_type":{let o=i[t.expected]??t.expected,a=v(t.input),s=i[a]??a;return/^[A-Z]/.test(t.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${t.expected}, \xE0m\u1ECD\u0300 a r\xED ${s}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${s}`}case"invalid_value":return t.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${h(t.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${m(t.values,"|")}`;case"too_big":{let o=t.inclusive?"<=":"<",a=r(t.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${t.origin??"iye"} ${a.verb} ${o}${t.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${t.maximum}`}case"too_small":{let o=t.inclusive?">=":">",a=r(t.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${t.origin} ${a.verb} ${o}${t.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${t.minimum}`}case"invalid_format":{let o=t;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??t.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${t.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${m(t.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${t.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${t.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Cf(){return{localeError:jy()}}var Rf,Ws=Symbol("ZodOutput"),qs=Symbol("ZodInput"),Dn=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(r,...n){let i=n[0];return this._map.set(r,i),i&&typeof i=="object"&&"id"in i&&this._idmap.set(i.id,r),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(r){let n=this._map.get(r);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(r),this}get(r){let n=r._zod.parent;if(n){let i={...this.get(n)??{}};delete i.id;let t={...i,...this._map.get(r)};return Object.keys(t).length?t:void 0}return this._map.get(r)}has(r){return this._map.has(r)}};function Nn(){return new Dn}(Rf=globalThis).__zod_globalRegistry??(Rf.__zod_globalRegistry=Nn());var V=globalThis.__zod_globalRegistry;function Gs(e,r){return new e({type:"string",...y(r)})}function Ks(e,r){return new e({type:"string",coerce:!0,...y(r)})}function Zn(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...y(r)})}function hr(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...y(r)})}function An(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...y(r)})}function Ln(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...y(r)})}function Cn(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...y(r)})}function Rn(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...y(r)})}function vr(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...y(r)})}function Mn(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...y(r)})}function Fn(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...y(r)})}function Vn(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...y(r)})}function Jn(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...y(r)})}function Bn(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...y(r)})}function Wn(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...y(r)})}function qn(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...y(r)})}function Gn(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...y(r)})}function Kn(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...y(r)})}function Hs(e,r){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...y(r)})}function Hn(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...y(r)})}function Xn(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...y(r)})}function Yn(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...y(r)})}function Qn(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...y(r)})}function ei(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...y(r)})}function ti(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...y(r)})}var Xs={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Ys(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...y(r)})}function Qs(e,r){return new e({type:"string",format:"date",check:"string_format",...y(r)})}function ec(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...y(r)})}function tc(e,r){return new e({type:"string",format:"duration",check:"string_format",...y(r)})}function rc(e,r){return new e({type:"number",checks:[],...y(r)})}function nc(e,r){return new e({type:"number",coerce:!0,checks:[],...y(r)})}function ic(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...y(r)})}function oc(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...y(r)})}function ac(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...y(r)})}function sc(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...y(r)})}function cc(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...y(r)})}function lc(e,r){return new e({type:"boolean",...y(r)})}function uc(e,r){return new e({type:"boolean",coerce:!0,...y(r)})}function dc(e,r){return new e({type:"bigint",...y(r)})}function pc(e,r){return new e({type:"bigint",coerce:!0,...y(r)})}function fc(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...y(r)})}function mc(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...y(r)})}function gc(e,r){return new e({type:"symbol",...y(r)})}function hc(e,r){return new e({type:"undefined",...y(r)})}function vc(e,r){return new e({type:"null",...y(r)})}function bc(e){return new e({type:"any"})}function xc(e){return new e({type:"unknown"})}function yc(e,r){return new e({type:"never",...y(r)})}function $c(e,r){return new e({type:"void",...y(r)})}function _c(e,r){return new e({type:"date",...y(r)})}function kc(e,r){return new e({type:"date",coerce:!0,...y(r)})}function wc(e,r){return new e({type:"nan",...y(r)})}function he(e,r){return new yn({check:"less_than",...y(r),value:e,inclusive:!1})}function oe(e,r){return new yn({check:"less_than",...y(r),value:e,inclusive:!0})}function ve(e,r){return new $n({check:"greater_than",...y(r),value:e,inclusive:!1})}function H(e,r){return new $n({check:"greater_than",...y(r),value:e,inclusive:!0})}function ri(e){return ve(0,e)}function ni(e){return he(0,e)}function ii(e){return oe(0,e)}function oi(e){return H(0,e)}function Re(e,r){return new va({check:"multiple_of",...y(r),value:e})}function Me(e,r){return new ya({check:"max_size",...y(r),maximum:e})}function be(e,r){return new $a({check:"min_size",...y(r),minimum:e})}function et(e,r){return new _a({check:"size_equals",...y(r),size:e})}function tt(e,r){return new ka({check:"max_length",...y(r),maximum:e})}function ke(e,r){return new wa({check:"min_length",...y(r),minimum:e})}function rt(e,r){return new Sa({check:"length_equals",...y(r),length:e})}function yt(e,r){return new za({check:"string_format",format:"regex",...y(r),pattern:e})}function $t(e){return new Ia({check:"string_format",format:"lowercase",...y(e)})}function _t(e){return new Ta({check:"string_format",format:"uppercase",...y(e)})}function kt(e,r){return new Pa({check:"string_format",format:"includes",...y(r),includes:e})}function wt(e,r){return new Ea({check:"string_format",format:"starts_with",...y(r),prefix:e})}function St(e,r){return new Oa({check:"string_format",format:"ends_with",...y(r),suffix:e})}function ai(e,r,n){return new ja({check:"property",property:e,schema:r,...y(n)})}function zt(e,r){return new Ua({check:"mime_type",mime:e,...y(r)})}function de(e){return new Da({check:"overwrite",tx:e})}function It(e){return de(r=>r.normalize(e))}function Tt(){return de(e=>e.trim())}function Pt(){return de(e=>e.toLowerCase())}function Et(){return de(e=>e.toUpperCase())}function Ot(){return de(e=>Eo(e))}function Sc(e,r,n){return new e({type:"array",element:r,...y(n)})}function Dy(e,r,n){return new e({type:"union",options:r,...y(n)})}function Ny(e,r,n){return new e({type:"union",options:r,inclusive:!1,...y(n)})}function Zy(e,r,n,i){return new e({type:"union",options:n,discriminator:r,...y(i)})}function Ay(e,r,n){return new e({type:"intersection",left:r,right:n})}function Ly(e,r,n,i){let t=n instanceof k,o=t?i:n,a=t?n:null;return new e({type:"tuple",items:r,rest:a,...y(o)})}function Cy(e,r,n,i){return new e({type:"record",keyType:r,valueType:n,...y(i)})}function Ry(e,r,n,i){return new e({type:"map",keyType:r,valueType:n,...y(i)})}function My(e,r,n){return new e({type:"set",valueType:r,...y(n)})}function Fy(e,r,n){let i=Array.isArray(r)?Object.fromEntries(r.map(t=>[t,t])):r;return new e({type:"enum",entries:i,...y(n)})}function Vy(e,r,n){return new e({type:"enum",entries:r,...y(n)})}function Jy(e,r,n){return new e({type:"literal",values:Array.isArray(r)?r:[r],...y(n)})}function zc(e,r){return new e({type:"file",...y(r)})}function By(e,r){return new e({type:"transform",transform:r})}function Wy(e,r){return new e({type:"optional",innerType:r})}function qy(e,r){return new e({type:"nullable",innerType:r})}function Gy(e,r,n){return new e({type:"default",innerType:r,get defaultValue(){return typeof n=="function"?n():jo(n)}})}function Ky(e,r,n){return new e({type:"nonoptional",innerType:r,...y(n)})}function Hy(e,r){return new e({type:"success",innerType:r})}function Xy(e,r,n){return new e({type:"catch",innerType:r,catchValue:typeof n=="function"?n:()=>n})}function Yy(e,r,n){return new e({type:"pipe",in:r,out:n})}function Qy(e,r){return new e({type:"readonly",innerType:r})}function e$(e,r,n){return new e({type:"template_literal",parts:r,...y(n)})}function t$(e,r){return new e({type:"lazy",getter:r})}function r$(e,r){return new e({type:"promise",innerType:r})}function Ic(e,r,n){let i=y(n);return i.abort??(i.abort=!0),new e({type:"custom",check:"custom",fn:r,...i})}function Tc(e,r,n){return new e({type:"custom",check:"custom",fn:r,...y(n)})}function Pc(e,r){let n=Mf(i=>(i.addIssue=t=>{if(typeof t=="string")i.issues.push(ft(t,i.value,n._zod.def));else{let o=t;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=i.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),i.issues.push(ft(o))}},e(i.value,i)),r);return n}function Mf(e,r){let n=new Z({check:"custom",...y(r)});return n._zod.check=e,n}function Ec(e){let r=new Z({check:"describe"});return r._zod.onattach=[n=>{let i=V.get(n)??{};V.add(n,{...i,description:e})}],r._zod.check=()=>{},r}function Oc(e){let r=new Z({check:"meta"});return r._zod.onattach=[n=>{let i=V.get(n)??{};V.add(n,{...i,...e})}],r._zod.check=()=>{},r}function jc(e,r){let n=y(r),i=n.truthy??["true","1","yes","on","y","enabled"],t=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(i=i.map(g=>typeof g=="string"?g.toLowerCase():g),t=t.map(g=>typeof g=="string"?g.toLowerCase():g));let o=new Set(i),a=new Set(t),s=e.Codec??fr,c=e.Boolean??dr,l=e.String??Qe,u=new l({type:"string",error:n.error}),d=new c({type:"boolean",error:n.error}),f=new s({type:"pipe",in:u,out:d,transform:((g,x)=>{let T=g;return n.case!=="sensitive"&&(T=T.toLowerCase()),o.has(T)?!0:a.has(T)?!1:(x.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:x.value,inst:f,continue:!1}),{})}),reverseTransform:((g,x)=>g===!0?i[0]||"true":t[0]||"false"),error:n.error});return f}function jt(e,r,n,i={}){let t=y(i),o={...y(i),check:"string_format",type:"string",format:r,fn:typeof n=="function"?n:s=>n.test(s),...t};return n instanceof RegExp&&(o.pattern=n),new e(o)}function Fe(e){let r=e?.target??"draft-2020-12";return r==="draft-4"&&(r="draft-04"),r==="draft-7"&&(r="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??V,target:r,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function O(e,r,n={path:[],schemaPath:[]}){var i;let t=e._zod.def,o=r.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};r.seen.set(e,a);let s=e._zod.toJSONSchema?.();if(s)a.schema=s;else{let u={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(r,a.schema,u);else{let f=a.schema,g=r.processors[t.type];if(!g)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${t.type}`);g(e,r,f,u)}let d=e._zod.parent;d&&(a.ref||(a.ref=d),O(d,r,u),r.seen.get(d).isParent=!0)}let c=r.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),r.io==="input"&&X(e)&&(delete a.schema.examples,delete a.schema.default),r.io==="input"&&"_prefault"in a.schema&&((i=a.schema).default??(i.default=a.schema._prefault)),delete a.schema._prefault,r.seen.get(e).schema}function Ve(e,r){let n=e.seen.get(r);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=new Map;for(let a of e.seen.entries()){let s=e.metadataRegistry.get(a[0])?.id;if(s){let c=i.get(s);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);i.set(s,a[0])}}let t=a=>{let s=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let d=e.external.registry.get(a[0])?.id,f=e.external.uri??(x=>x);if(d)return{ref:f(d)};let g=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=g,{defId:g,ref:`${f("__shared")}#/${s}/${g}`}}if(a[1]===n)return{ref:"#"};let l=`#/${s}/`,u=a[1].schema.id??`__schema${e.counter++}`;return{defId:u,ref:l+u}},o=a=>{if(a[1].schema.$ref)return;let s=a[1],{ref:c,defId:l}=t(a);s.def={...s.schema},l&&(s.defId=l);let u=s.schema;for(let d in u)delete u[d];u.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let s=a[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/ -Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let c=a[1];if(r===a[0]){n(a);continue}if(e.external){let s=e.external.registry.get(a[0])?.id;if(r!==a[0]&&s){n(a);continue}}if(e.metadataRegistry.get(a[0])?.id){n(a);continue}if(c.cycle){n(a);continue}if(c.count>1&&e.reused==="ref"){n(a);continue}}}function ye(e,r){let i=e.seen.get(r);if(!i)throw new Error("Unprocessed schema. This is a bug in Zod.");let o=c=>{let u=e.seen.get(c);if(u.ref===null)return;let s=u.def??u.schema,d={...s},m=u.ref;if(u.ref=null,m){o(m);let h=e.seen.get(m),x=h.schema;if(x.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(s.allOf=s.allOf??[],s.allOf.push(x)):Object.assign(s,x),Object.assign(s,d),c._zod.parent===m)for(let U in s)U==="$ref"||U==="allOf"||U in d||delete s[U];if(x.$ref&&h.def)for(let U in s)U==="$ref"||U==="allOf"||U in h.def&&JSON.stringify(s[U])===JSON.stringify(h.def[U])&&delete s[U]}let $=c._zod.parent;if($&&$!==m){o($);let h=e.seen.get($);if(h?.schema.$ref&&(s.$ref=h.schema.$ref,h.def))for(let x in s)x==="$ref"||x==="allOf"||x in h.def&&JSON.stringify(s[x])===JSON.stringify(h.def[x])&&delete s[x]}e.override({zodSchema:c,jsonSchema:s,path:u.path??[]})};for(let c of[...e.seen.entries()].reverse())o(c[0]);let t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let c=e.external.registry.get(r)?.id;if(!c)throw new Error("Schema is missing an `id` property");t.$id=e.external.uri(c)}Object.assign(t,i.def??i.schema);let n=e.metadataRegistry.get(r)?.id;n!==void 0&&t.id===n&&delete t.id;let a=e.external?.defs??{};for(let c of e.seen.entries()){let u=c[1];u.def&&u.defId&&(u.def.id===u.defId&&delete u.def.id,a[u.defId]=u.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?t.$defs=a:t.definitions=a);try{let c=JSON.parse(JSON.stringify(t));return Object.defineProperty(c,"~standard",{value:{...r["~standard"],jsonSchema:{input:rt(r,"input",e.processors),output:rt(r,"output",e.processors)}},enumerable:!1,writable:!1}),c}catch{throw new Error("Error converting schema to JSON.")}}function V(e,r){let i=r??{seen:new Set};if(i.seen.has(e))return!1;i.seen.add(e);let o=e._zod.def;if(o.type==="transform")return!0;if(o.type==="array")return V(o.element,i);if(o.type==="set")return V(o.valueType,i);if(o.type==="lazy")return V(o.getter(),i);if(o.type==="promise"||o.type==="optional"||o.type==="nonoptional"||o.type==="nullable"||o.type==="readonly"||o.type==="default"||o.type==="prefault")return V(o.innerType,i);if(o.type==="intersection")return V(o.left,i)||V(o.right,i);if(o.type==="record"||o.type==="map")return V(o.keyType,i)||V(o.valueType,i);if(o.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:V(o.in,i)||V(o.out,i);if(o.type==="object"){for(let t in o.shape)if(V(o.shape[t],i))return!0;return!1}if(o.type==="union"){for(let t of o.options)if(V(t,i))return!0;return!1}if(o.type==="tuple"){for(let t of o.items)if(V(t,i))return!0;return!!(o.rest&&V(o.rest,i))}return!1}var rc=(e,r={})=>i=>{let o=_e({...i,processors:r});return S(e,o),be(o,e),ye(o,e)},rt=(e,r,i={})=>o=>{let{libraryOptions:t,target:n}=o??{},a=_e({...t??{},target:n,io:r,processors:i});return S(e,a),be(a,e),ye(a,e)};var vg={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},nc=(e,r,i,o)=>{let t=i;t.type="string";let{minimum:n,maximum:a,format:c,patterns:u,contentEncoding:s}=e._zod.bag;if(typeof n=="number"&&(t.minLength=n),typeof a=="number"&&(t.maxLength=a),c&&(t.format=vg[c]??c,t.format===""&&delete t.format,c==="time"&&delete t.format),s&&(t.contentEncoding=s),u&&u.size>0){let d=[...u];d.length===1?t.pattern=d[0].source:d.length>1&&(t.allOf=[...d.map(m=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},ic=(e,r,i,o)=>{let t=i,{minimum:n,maximum:a,format:c,multipleOf:u,exclusiveMaximum:s,exclusiveMinimum:d}=e._zod.bag;typeof c=="string"&&c.includes("int")?t.type="integer":t.type="number";let m=typeof d=="number"&&d>=(n??Number.NEGATIVE_INFINITY),$=typeof s=="number"&&s<=(a??Number.POSITIVE_INFINITY),h=r.target==="draft-04"||r.target==="openapi-3.0";m?h?(t.minimum=d,t.exclusiveMinimum=!0):t.exclusiveMinimum=d:typeof n=="number"&&(t.minimum=n),$?h?(t.maximum=s,t.exclusiveMaximum=!0):t.exclusiveMaximum=s:typeof a=="number"&&(t.maximum=a),typeof u=="number"&&(t.multipleOf=u)},oc=(e,r,i,o)=>{i.type="boolean"},ac=(e,r,i,o)=>{if(r.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},cc=(e,r,i,o)=>{if(r.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},sc=(e,r,i,o)=>{r.target==="openapi-3.0"?(i.type="string",i.nullable=!0,i.enum=[null]):i.type="null"},uc=(e,r,i,o)=>{if(r.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},lc=(e,r,i,o)=>{if(r.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},dc=(e,r,i,o)=>{i.not={}},pc=(e,r,i,o)=>{},mc=(e,r,i,o)=>{},fc=(e,r,i,o)=>{if(r.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},gc=(e,r,i,o)=>{let t=e._zod.def,n=ht(t.entries);n.every(a=>typeof a=="number")&&(i.type="number"),n.every(a=>typeof a=="string")&&(i.type="string"),i.enum=n},hc=(e,r,i,o)=>{let t=e._zod.def,n=[];for(let a of t.values)if(a===void 0){if(r.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(r.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");n.push(Number(a))}else n.push(a);if(n.length!==0)if(n.length===1){let a=n[0];i.type=a===null?"null":typeof a,r.target==="draft-04"||r.target==="openapi-3.0"?i.enum=[a]:i.const=a}else n.every(a=>typeof a=="number")&&(i.type="number"),n.every(a=>typeof a=="string")&&(i.type="string"),n.every(a=>typeof a=="boolean")&&(i.type="boolean"),n.every(a=>a===null)&&(i.type="null"),i.enum=n},vc=(e,r,i,o)=>{if(r.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},$c=(e,r,i,o)=>{let t=i,n=e._zod.pattern;if(!n)throw new Error("Pattern not found in template literal");t.type="string",t.pattern=n.source},_c=(e,r,i,o)=>{let t=i,n={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:c,mime:u}=e._zod.bag;a!==void 0&&(n.minLength=a),c!==void 0&&(n.maxLength=c),u?u.length===1?(n.contentMediaType=u[0],Object.assign(t,n)):(Object.assign(t,n),t.anyOf=u.map(s=>({contentMediaType:s}))):Object.assign(t,n)},bc=(e,r,i,o)=>{i.type="boolean"},yc=(e,r,i,o)=>{if(r.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},xc=(e,r,i,o)=>{if(r.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},kc=(e,r,i,o)=>{if(r.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},wc=(e,r,i,o)=>{if(r.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},zc=(e,r,i,o)=>{if(r.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Sc=(e,r,i,o)=>{let t=i,n=e._zod.def,{minimum:a,maximum:c}=e._zod.bag;typeof a=="number"&&(t.minItems=a),typeof c=="number"&&(t.maxItems=c),t.type="array",t.items=S(n.element,r,{...o,path:[...o.path,"items"]})},Ic=(e,r,i,o)=>{let t=i,n=e._zod.def;t.type="object",t.properties={};let a=n.shape;for(let s in a)t.properties[s]=S(a[s],r,{...o,path:[...o.path,"properties",s]});let c=new Set(Object.keys(a)),u=new Set([...c].filter(s=>{let d=n.shape[s]._zod;return r.io==="input"?d.optin===void 0:d.optout===void 0}));u.size>0&&(t.required=Array.from(u)),n.catchall?._zod.def.type==="never"?t.additionalProperties=!1:n.catchall?n.catchall&&(t.additionalProperties=S(n.catchall,r,{...o,path:[...o.path,"additionalProperties"]})):r.io==="output"&&(t.additionalProperties=!1)},nn=(e,r,i,o)=>{let t=e._zod.def,n=t.inclusive===!1,a=t.options.map((c,u)=>S(c,r,{...o,path:[...o.path,n?"oneOf":"anyOf",u]}));n?i.oneOf=a:i.anyOf=a},Pc=(e,r,i,o)=>{let t=e._zod.def,n=S(t.left,r,{...o,path:[...o.path,"allOf",0]}),a=S(t.right,r,{...o,path:[...o.path,"allOf",1]}),c=s=>"allOf"in s&&Object.keys(s).length===1,u=[...c(n)?n.allOf:[n],...c(a)?a.allOf:[a]];i.allOf=u},jc=(e,r,i,o)=>{let t=i,n=e._zod.def;t.type="array";let a=r.target==="draft-2020-12"?"prefixItems":"items",c=r.target==="draft-2020-12"||r.target==="openapi-3.0"?"items":"additionalItems",u=n.items.map(($,h)=>S($,r,{...o,path:[...o.path,a,h]})),s=n.rest?S(n.rest,r,{...o,path:[...o.path,c,...r.target==="openapi-3.0"?[n.items.length]:[]]}):null;r.target==="draft-2020-12"?(t.prefixItems=u,s&&(t.items=s)):r.target==="openapi-3.0"?(t.items={anyOf:u},s&&t.items.anyOf.push(s),t.minItems=u.length,s||(t.maxItems=u.length)):(t.items=u,s&&(t.additionalItems=s));let{minimum:d,maximum:m}=e._zod.bag;typeof d=="number"&&(t.minItems=d),typeof m=="number"&&(t.maxItems=m)},Tc=(e,r,i,o)=>{let t=i,n=e._zod.def;t.type="object";let a=n.keyType,u=a._zod.bag?.patterns;if(n.mode==="loose"&&u&&u.size>0){let d=S(n.valueType,r,{...o,path:[...o.path,"patternProperties","*"]});t.patternProperties={};for(let m of u)t.patternProperties[m.source]=d}else(r.target==="draft-07"||r.target==="draft-2020-12")&&(t.propertyNames=S(n.keyType,r,{...o,path:[...o.path,"propertyNames"]})),t.additionalProperties=S(n.valueType,r,{...o,path:[...o.path,"additionalProperties"]});let s=a._zod.values;if(s){let d=[...s].filter(m=>typeof m=="string"||typeof m=="number");d.length>0&&(t.required=d)}},Oc=(e,r,i,o)=>{let t=e._zod.def,n=S(t.innerType,r,o),a=r.seen.get(e);r.target==="openapi-3.0"?(a.ref=t.innerType,i.nullable=!0):i.anyOf=[n,{type:"null"}]},Uc=(e,r,i,o)=>{let t=e._zod.def;S(t.innerType,r,o);let n=r.seen.get(e);n.ref=t.innerType},Ec=(e,r,i,o)=>{let t=e._zod.def;S(t.innerType,r,o);let n=r.seen.get(e);n.ref=t.innerType,i.default=JSON.parse(JSON.stringify(t.defaultValue))},Dc=(e,r,i,o)=>{let t=e._zod.def;S(t.innerType,r,o);let n=r.seen.get(e);n.ref=t.innerType,r.io==="input"&&(i._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},Nc=(e,r,i,o)=>{let t=e._zod.def;S(t.innerType,r,o);let n=r.seen.get(e);n.ref=t.innerType;let a;try{a=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}i.default=a},Zc=(e,r,i,o)=>{let t=e._zod.def,n=t.in._zod.traits.has("$ZodTransform"),a=r.io==="input"?n?t.out:t.in:t.out;S(a,r,o);let c=r.seen.get(e);c.ref=a},Lc=(e,r,i,o)=>{let t=e._zod.def;S(t.innerType,r,o);let n=r.seen.get(e);n.ref=t.innerType,i.readOnly=!0},Ac=(e,r,i,o)=>{let t=e._zod.def;S(t.innerType,r,o);let n=r.seen.get(e);n.ref=t.innerType},on=(e,r,i,o)=>{let t=e._zod.def;S(t.innerType,r,o);let n=r.seen.get(e);n.ref=t.innerType},Cc=(e,r,i,o)=>{let t=e._zod.innerType;S(t,r,o);let n=r.seen.get(e);n.ref=t},rn={string:nc,number:ic,boolean:oc,bigint:ac,symbol:cc,null:sc,undefined:uc,void:lc,never:dc,any:pc,unknown:mc,date:fc,enum:gc,literal:hc,nan:vc,template_literal:$c,file:_c,success:bc,custom:yc,function:xc,transform:kc,map:wc,set:zc,array:Sc,object:Ic,union:nn,intersection:Pc,tuple:jc,record:Tc,nullable:Oc,nonoptional:Uc,default:Ec,prefault:Dc,catch:Nc,pipe:Zc,readonly:Lc,promise:Ac,optional:on,lazy:Cc};function an(e,r){if("_idmap"in e){let o=e,t=_e({...r,processors:rn}),n={};for(let u of o._idmap.entries()){let[s,d]=u;S(d,t)}let a={},c={registry:o,uri:r?.uri,defs:n};t.external=c;for(let u of o._idmap.entries()){let[s,d]=u;be(t,d),a[s]=ye(t,d)}if(Object.keys(n).length>0){let u=t.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[u]:n}}return{schemas:a}}let i=_e({...r,processors:rn});return S(e,i),be(i,e),ye(i,e)}var cn=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(r){this.ctx.counter=r}get seen(){return this.ctx.seen}constructor(r){let i=r?.target??"draft-2020-12";i==="draft-4"&&(i="draft-04"),i==="draft-7"&&(i="draft-07"),this.ctx=_e({processors:rn,target:i,...r?.metadata&&{metadata:r.metadata},...r?.unrepresentable&&{unrepresentable:r.unrepresentable},...r?.override&&{override:r.override},...r?.io&&{io:r.io}})}process(r,i={path:[],schemaPath:[]}){return S(r,this.ctx,i)}emit(r,i){i&&(i.cycles&&(this.ctx.cycles=i.cycles),i.reused&&(this.ctx.reused=i.reused),i.external&&(this.ctx.external=i.external)),be(this.ctx,r);let o=ye(this.ctx,r),{"~standard":t,...n}=o;return n}};var ql={};var Dt={};ae(Dt,{ZodAny:()=>us,ZodArray:()=>ms,ZodBase64:()=>Pn,ZodBase64URL:()=>jn,ZodBigInt:()=>lt,ZodBigIntFormat:()=>Un,ZodBoolean:()=>ut,ZodCIDRv4:()=>Sn,ZodCIDRv6:()=>In,ZodCUID:()=>_n,ZodCUID2:()=>bn,ZodCatch:()=>Ns,ZodCodec:()=>Wt,ZodCustom:()=>Gt,ZodCustomStringFormat:()=>ct,ZodDate:()=>Mt,ZodDefault:()=>js,ZodDiscriminatedUnion:()=>gs,ZodE164:()=>Tn,ZodEmail:()=>hn,ZodEmoji:()=>vn,ZodEnum:()=>ot,ZodExactOptional:()=>Ss,ZodFile:()=>ws,ZodFunction:()=>Bs,ZodGUID:()=>Zt,ZodIPv4:()=>wn,ZodIPv6:()=>zn,ZodIntersection:()=>hs,ZodJWT:()=>On,ZodKSUID:()=>kn,ZodLazy:()=>Fs,ZodLiteral:()=>ks,ZodMAC:()=>rs,ZodMap:()=>ys,ZodNaN:()=>Ls,ZodNanoID:()=>$n,ZodNever:()=>ds,ZodNonOptional:()=>An,ZodNull:()=>cs,ZodNullable:()=>Ps,ZodNumber:()=>st,ZodNumberFormat:()=>Oe,ZodObject:()=>Vt,ZodOptional:()=>Ln,ZodPipe:()=>Bt,ZodPrefault:()=>Os,ZodPreprocess:()=>As,ZodPromise:()=>Js,ZodReadonly:()=>Cs,ZodRecord:()=>it,ZodSet:()=>xs,ZodString:()=>at,ZodStringFormat:()=>j,ZodSuccess:()=>Ds,ZodSymbol:()=>os,ZodTemplateLiteral:()=>Ms,ZodTransform:()=>zs,ZodTuple:()=>$s,ZodType:()=>w,ZodULID:()=>yn,ZodURL:()=>Rt,ZodUUID:()=>ie,ZodUndefined:()=>as,ZodUnion:()=>Jt,ZodUnknown:()=>ls,ZodVoid:()=>ps,ZodXID:()=>xn,ZodXor:()=>fs,_ZodString:()=>gn,_default:()=>Ts,_function:()=>ip,any:()=>Nd,array:()=>Ft,base64:()=>$d,base64url:()=>_d,bigint:()=>Td,boolean:()=>is,catch:()=>Zs,check:()=>op,cidrv4:()=>hd,cidrv6:()=>vd,codec:()=>ep,cuid:()=>sd,cuid2:()=>ud,custom:()=>ap,date:()=>Ld,describe:()=>cp,discriminatedUnion:()=>Vd,e164:()=>bd,email:()=>Yl,emoji:()=>ad,enum:()=>Nn,exactOptional:()=>Is,file:()=>Hd,float32:()=>Sd,float64:()=>Id,function:()=>ip,guid:()=>Ql,hash:()=>zd,hex:()=>wd,hostname:()=>kd,httpUrl:()=>od,instanceof:()=>up,int:()=>mn,int32:()=>Pd,int64:()=>Od,intersection:()=>vs,invertCodec:()=>tp,ipv4:()=>md,ipv6:()=>gd,json:()=>dp,jwt:()=>yd,keyof:()=>Ad,ksuid:()=>pd,lazy:()=>Vs,literal:()=>qd,looseObject:()=>Md,looseRecord:()=>Bd,mac:()=>fd,map:()=>Wd,meta:()=>sp,nan:()=>Qd,nanoid:()=>cd,nativeEnum:()=>Kd,never:()=>En,nonoptional:()=>Es,null:()=>ss,nullable:()=>At,nullish:()=>Xd,number:()=>ns,object:()=>Cd,optional:()=>Lt,partialRecord:()=>Jd,pipe:()=>fn,prefault:()=>Us,preprocess:()=>pp,promise:()=>np,readonly:()=>Rs,record:()=>bs,refine:()=>Ws,set:()=>Gd,strictObject:()=>Rd,string:()=>Nt,stringFormat:()=>xd,stringbool:()=>lp,success:()=>Yd,superRefine:()=>Gs,symbol:()=>Ed,templateLiteral:()=>rp,transform:()=>Zn,tuple:()=>_s,uint32:()=>jd,uint64:()=>Ud,ulid:()=>ld,undefined:()=>Dd,union:()=>Dn,unknown:()=>Te,url:()=>id,uuid:()=>ed,uuidv4:()=>td,uuidv6:()=>rd,uuidv7:()=>nd,void:()=>Zd,xid:()=>dd,xor:()=>Fd});var sn={};ae(sn,{endsWith:()=>Ke,gt:()=>re,gte:()=>F,includes:()=>We,length:()=>je,lowercase:()=>Je,lt:()=>te,lte:()=>q,maxLength:()=>Pe,maxSize:()=>$e,mime:()=>qe,minLength:()=>se,minSize:()=>ne,multipleOf:()=>ve,negative:()=>Yr,nonnegative:()=>en,nonpositive:()=>Qr,normalize:()=>He,overwrite:()=>Y,positive:()=>Xr,property:()=>tn,regex:()=>Ve,size:()=>Ie,slugify:()=>et,startsWith:()=>Ge,toLowerCase:()=>Ye,toUpperCase:()=>Qe,trim:()=>Xe,uppercase:()=>Be});var nt={};ae(nt,{ZodISODate:()=>ln,ZodISODateTime:()=>un,ZodISODuration:()=>pn,ZodISOTime:()=>dn,date:()=>Mc,datetime:()=>Rc,duration:()=>Vc,time:()=>Fc});var un=l("ZodISODateTime",(e,r)=>{vo.init(e,r),j.init(e,r)});function Rc(e){return ya(un,e)}var ln=l("ZodISODate",(e,r)=>{$o.init(e,r),j.init(e,r)});function Mc(e){return xa(ln,e)}var dn=l("ZodISOTime",(e,r)=>{_o.init(e,r),j.init(e,r)});function Fc(e){return ka(dn,e)}var pn=l("ZodISODuration",(e,r)=>{bo.init(e,r),j.init(e,r)});function Vc(e){return wa(pn,e)}var Hl=(e,r)=>{yt.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:i=>kt(e,i)},flatten:{value:i=>xt(e,i)},addIssue:{value:i=>{e.issues.push(i),e.message=JSON.stringify(e.issues,De,2)}},addIssues:{value:i=>{e.issues.push(...i),e.message=JSON.stringify(e.issues,De,2)}},isEmpty:{get(){return e.issues.length===0}}})},_g=l("ZodError",Hl),W=l("ZodError",Hl,{Parent:Error});var Jc=Le(W),Bc=Ae(W),Wc=Ce(W),Gc=Re(W),Kc=or(W),qc=ar(W),Hc=cr(W),Xc=sr(W),Yc=ur(W),Qc=lr(W),es=dr(W),ts=pr(W);var Xl=new WeakMap;function Ct(e,r,i){let o=Object.getPrototypeOf(e),t=Xl.get(o);if(t||(t=new Set,Xl.set(o,t)),!t.has(r)){t.add(r);for(let n in i){let a=i[n];Object.defineProperty(o,n,{configurable:!0,enumerable:!1,get(){let c=a.bind(this);return Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:c}),c},set(c){Object.defineProperty(this,n,{configurable:!0,writable:!0,enumerable:!0,value:c})}})}}}var w=l("ZodType",(e,r)=>(k.init(e,r),Object.assign(e["~standard"],{jsonSchema:{input:rt(e,"input"),output:rt(e,"output")}}),e.toJSONSchema=rc(e,{}),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.parse=(i,o)=>Jc(e,i,o,{callee:e.parse}),e.safeParse=(i,o)=>Wc(e,i,o),e.parseAsync=async(i,o)=>Bc(e,i,o,{callee:e.parseAsync}),e.safeParseAsync=async(i,o)=>Gc(e,i,o),e.spa=e.safeParseAsync,e.encode=(i,o)=>Kc(e,i,o),e.decode=(i,o)=>qc(e,i,o),e.encodeAsync=async(i,o)=>Hc(e,i,o),e.decodeAsync=async(i,o)=>Xc(e,i,o),e.safeEncode=(i,o)=>Yc(e,i,o),e.safeDecode=(i,o)=>Qc(e,i,o),e.safeEncodeAsync=async(i,o)=>es(e,i,o),e.safeDecodeAsync=async(i,o)=>ts(e,i,o),Ct(e,"ZodType",{check(...i){let o=this.def;return this.clone(v.mergeDefs(o,{checks:[...o.checks??[],...i.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...i){return this.check(...i)},clone(i,o){return R(this,i,o)},brand(){return this},register(i,o){return i.add(this,o),this},refine(i,o){return this.check(Ws(i,o))},superRefine(i,o){return this.check(Gs(i,o))},overwrite(i){return this.check(Y(i))},optional(){return Lt(this)},exactOptional(){return Is(this)},nullable(){return At(this)},nullish(){return Lt(At(this))},nonoptional(i){return Es(this,i)},array(){return Ft(this)},or(i){return Dn([this,i])},and(i){return vs(this,i)},transform(i){return fn(this,Zn(i))},default(i){return Ts(this,i)},prefault(i){return Us(this,i)},catch(i){return Zs(this,i)},pipe(i){return fn(this,i)},readonly(){return Rs(this)},describe(i){let o=this.clone();return L.add(o,{description:i}),o},meta(...i){if(i.length===0)return L.get(this);let o=this.clone();return L.add(o,i[0]),o},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(i){return i(this)}}),Object.defineProperty(e,"description",{get(){return L.get(e)?.description},configurable:!0}),e)),gn=l("_ZodString",(e,r)=>{Se.init(e,r),w.init(e,r),e._zod.processJSONSchema=(o,t,n)=>nc(e,o,t,n);let i=e._zod.bag;e.format=i.format??null,e.minLength=i.minimum??null,e.maxLength=i.maximum??null,Ct(e,"_ZodString",{regex(...o){return this.check(Ve(...o))},includes(...o){return this.check(We(...o))},startsWith(...o){return this.check(Ge(...o))},endsWith(...o){return this.check(Ke(...o))},min(...o){return this.check(se(...o))},max(...o){return this.check(Pe(...o))},length(...o){return this.check(je(...o))},nonempty(...o){return this.check(se(1,...o))},lowercase(o){return this.check(Je(o))},uppercase(o){return this.check(Be(o))},trim(){return this.check(Xe())},normalize(...o){return this.check(He(...o))},toLowerCase(){return this.check(Ye())},toUpperCase(){return this.check(Qe())},slugify(){return this.check(et())}})}),at=l("ZodString",(e,r)=>{Se.init(e,r),gn.init(e,r),e.email=i=>e.check(Or(hn,i)),e.url=i=>e.check(Et(Rt,i)),e.jwt=i=>e.check(Hr(On,i)),e.emoji=i=>e.check(Zr(vn,i)),e.guid=i=>e.check(Ut(Zt,i)),e.uuid=i=>e.check(Ur(ie,i)),e.uuidv4=i=>e.check(Er(ie,i)),e.uuidv6=i=>e.check(Dr(ie,i)),e.uuidv7=i=>e.check(Nr(ie,i)),e.nanoid=i=>e.check(Lr($n,i)),e.guid=i=>e.check(Ut(Zt,i)),e.cuid=i=>e.check(Ar(_n,i)),e.cuid2=i=>e.check(Cr(bn,i)),e.ulid=i=>e.check(Rr(yn,i)),e.base64=i=>e.check(Gr(Pn,i)),e.base64url=i=>e.check(Kr(jn,i)),e.xid=i=>e.check(Mr(xn,i)),e.ksuid=i=>e.check(Fr(kn,i)),e.ipv4=i=>e.check(Vr(wn,i)),e.ipv6=i=>e.check(Jr(zn,i)),e.cidrv4=i=>e.check(Br(Sn,i)),e.cidrv6=i=>e.check(Wr(In,i)),e.e164=i=>e.check(qr(Tn,i)),e.datetime=i=>e.check(Rc(i)),e.date=i=>e.check(Mc(i)),e.time=i=>e.check(Fc(i)),e.duration=i=>e.check(Vc(i))});function Nt(e){return va(at,e)}var j=l("ZodStringFormat",(e,r)=>{P.init(e,r),gn.init(e,r)}),hn=l("ZodEmail",(e,r)=>{co.init(e,r),j.init(e,r)});function Yl(e){return Or(hn,e)}var Zt=l("ZodGUID",(e,r)=>{oo.init(e,r),j.init(e,r)});function Ql(e){return Ut(Zt,e)}var ie=l("ZodUUID",(e,r)=>{ao.init(e,r),j.init(e,r)});function ed(e){return Ur(ie,e)}function td(e){return Er(ie,e)}function rd(e){return Dr(ie,e)}function nd(e){return Nr(ie,e)}var Rt=l("ZodURL",(e,r)=>{so.init(e,r),j.init(e,r)});function id(e){return Et(Rt,e)}function od(e){return Et(Rt,{protocol:K.httpProtocol,hostname:K.domain,...v.normalizeParams(e)})}var vn=l("ZodEmoji",(e,r)=>{uo.init(e,r),j.init(e,r)});function ad(e){return Zr(vn,e)}var $n=l("ZodNanoID",(e,r)=>{lo.init(e,r),j.init(e,r)});function cd(e){return Lr($n,e)}var _n=l("ZodCUID",(e,r)=>{po.init(e,r),j.init(e,r)});function sd(e){return Ar(_n,e)}var bn=l("ZodCUID2",(e,r)=>{mo.init(e,r),j.init(e,r)});function ud(e){return Cr(bn,e)}var yn=l("ZodULID",(e,r)=>{fo.init(e,r),j.init(e,r)});function ld(e){return Rr(yn,e)}var xn=l("ZodXID",(e,r)=>{go.init(e,r),j.init(e,r)});function dd(e){return Mr(xn,e)}var kn=l("ZodKSUID",(e,r)=>{ho.init(e,r),j.init(e,r)});function pd(e){return Fr(kn,e)}var wn=l("ZodIPv4",(e,r)=>{yo.init(e,r),j.init(e,r)});function md(e){return Vr(wn,e)}var rs=l("ZodMAC",(e,r)=>{ko.init(e,r),j.init(e,r)});function fd(e){return _a(rs,e)}var zn=l("ZodIPv6",(e,r)=>{xo.init(e,r),j.init(e,r)});function gd(e){return Jr(zn,e)}var Sn=l("ZodCIDRv4",(e,r)=>{wo.init(e,r),j.init(e,r)});function hd(e){return Br(Sn,e)}var In=l("ZodCIDRv6",(e,r)=>{zo.init(e,r),j.init(e,r)});function vd(e){return Wr(In,e)}var Pn=l("ZodBase64",(e,r)=>{Io.init(e,r),j.init(e,r)});function $d(e){return Gr(Pn,e)}var jn=l("ZodBase64URL",(e,r)=>{Po.init(e,r),j.init(e,r)});function _d(e){return Kr(jn,e)}var Tn=l("ZodE164",(e,r)=>{jo.init(e,r),j.init(e,r)});function bd(e){return qr(Tn,e)}var On=l("ZodJWT",(e,r)=>{To.init(e,r),j.init(e,r)});function yd(e){return Hr(On,e)}var ct=l("ZodCustomStringFormat",(e,r)=>{Oo.init(e,r),j.init(e,r)});function xd(e,r,i={}){return tt(ct,e,r,i)}function kd(e){return tt(ct,"hostname",K.hostname,e)}function wd(e){return tt(ct,"hex",K.hex,e)}function zd(e,r){let i=r?.enc??"hex",o=`${e}_${i}`,t=K[o];if(!t)throw new Error(`Unrecognized hash format: ${o}`);return tt(ct,o,t,r)}var st=l("ZodNumber",(e,r)=>{yr.init(e,r),w.init(e,r),e._zod.processJSONSchema=(o,t,n)=>ic(e,o,t,n),Ct(e,"ZodNumber",{gt(o,t){return this.check(re(o,t))},gte(o,t){return this.check(F(o,t))},min(o,t){return this.check(F(o,t))},lt(o,t){return this.check(te(o,t))},lte(o,t){return this.check(q(o,t))},max(o,t){return this.check(q(o,t))},int(o){return this.check(mn(o))},safe(o){return this.check(mn(o))},positive(o){return this.check(re(0,o))},nonnegative(o){return this.check(F(0,o))},negative(o){return this.check(te(0,o))},nonpositive(o){return this.check(q(0,o))},multipleOf(o,t){return this.check(ve(o,t))},step(o,t){return this.check(ve(o,t))},finite(){return this}});let i=e._zod.bag;e.minValue=Math.max(i.minimum??Number.NEGATIVE_INFINITY,i.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(i.maximum??Number.POSITIVE_INFINITY,i.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(i.format??"").includes("int")||Number.isSafeInteger(i.multipleOf??.5),e.isFinite=!0,e.format=i.format??null});function ns(e){return za(st,e)}var Oe=l("ZodNumberFormat",(e,r)=>{Uo.init(e,r),st.init(e,r)});function mn(e){return Ia(Oe,e)}function Sd(e){return Pa(Oe,e)}function Id(e){return ja(Oe,e)}function Pd(e){return Ta(Oe,e)}function jd(e){return Oa(Oe,e)}var ut=l("ZodBoolean",(e,r)=>{It.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>oc(e,i,o,t)});function is(e){return Ua(ut,e)}var lt=l("ZodBigInt",(e,r)=>{xr.init(e,r),w.init(e,r),e._zod.processJSONSchema=(o,t,n)=>ac(e,o,t,n),e.gte=(o,t)=>e.check(F(o,t)),e.min=(o,t)=>e.check(F(o,t)),e.gt=(o,t)=>e.check(re(o,t)),e.gte=(o,t)=>e.check(F(o,t)),e.min=(o,t)=>e.check(F(o,t)),e.lt=(o,t)=>e.check(te(o,t)),e.lte=(o,t)=>e.check(q(o,t)),e.max=(o,t)=>e.check(q(o,t)),e.positive=o=>e.check(re(BigInt(0),o)),e.negative=o=>e.check(te(BigInt(0),o)),e.nonpositive=o=>e.check(q(BigInt(0),o)),e.nonnegative=o=>e.check(F(BigInt(0),o)),e.multipleOf=(o,t)=>e.check(ve(o,t));let i=e._zod.bag;e.minValue=i.minimum??null,e.maxValue=i.maximum??null,e.format=i.format??null});function Td(e){return Da(lt,e)}var Un=l("ZodBigIntFormat",(e,r)=>{Eo.init(e,r),lt.init(e,r)});function Od(e){return Za(Un,e)}function Ud(e){return La(Un,e)}var os=l("ZodSymbol",(e,r)=>{Do.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>cc(e,i,o,t)});function Ed(e){return Aa(os,e)}var as=l("ZodUndefined",(e,r)=>{No.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>uc(e,i,o,t)});function Dd(e){return Ca(as,e)}var cs=l("ZodNull",(e,r)=>{Zo.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>sc(e,i,o,t)});function ss(e){return Ra(cs,e)}var us=l("ZodAny",(e,r)=>{Lo.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>pc(e,i,o,t)});function Nd(){return Ma(us)}var ls=l("ZodUnknown",(e,r)=>{Ao.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>mc(e,i,o,t)});function Te(){return Fa(ls)}var ds=l("ZodNever",(e,r)=>{Co.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>dc(e,i,o,t)});function En(e){return Va(ds,e)}var ps=l("ZodVoid",(e,r)=>{Ro.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>lc(e,i,o,t)});function Zd(e){return Ja(ps,e)}var Mt=l("ZodDate",(e,r)=>{Mo.init(e,r),w.init(e,r),e._zod.processJSONSchema=(o,t,n)=>fc(e,o,t,n),e.min=(o,t)=>e.check(F(o,t)),e.max=(o,t)=>e.check(q(o,t));let i=e._zod.bag;e.minDate=i.minimum?new Date(i.minimum):null,e.maxDate=i.maximum?new Date(i.maximum):null});function Ld(e){return Ba(Mt,e)}var ms=l("ZodArray",(e,r)=>{Fo.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Sc(e,i,o,t),e.element=r.element,Ct(e,"ZodArray",{min(i,o){return this.check(se(i,o))},nonempty(i){return this.check(se(1,i))},max(i,o){return this.check(Pe(i,o))},length(i,o){return this.check(je(i,o))},unwrap(){return this.element}})});function Ft(e,r){return Ka(ms,e,r)}function Ad(e){let r=e._zod.def.shape;return Nn(Object.keys(r))}var Vt=l("ZodObject",(e,r)=>{Vo.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Ic(e,i,o,t),v.defineLazy(e,"shape",()=>r.shape),Ct(e,"ZodObject",{keyof(){return Nn(Object.keys(this._zod.def.shape))},catchall(i){return this.clone({...this._zod.def,catchall:i})},passthrough(){return this.clone({...this._zod.def,catchall:Te()})},loose(){return this.clone({...this._zod.def,catchall:Te()})},strict(){return this.clone({...this._zod.def,catchall:En()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(i){return v.extend(this,i)},safeExtend(i){return v.safeExtend(this,i)},merge(i){return v.merge(this,i)},pick(i){return v.pick(this,i)},omit(i){return v.omit(this,i)},partial(...i){return v.partial(Ln,this,i[0])},required(...i){return v.required(An,this,i[0])}})});function Cd(e,r){let i={type:"object",shape:e??{},...v.normalizeParams(r)};return new Vt(i)}function Rd(e,r){return new Vt({type:"object",shape:e,catchall:En(),...v.normalizeParams(r)})}function Md(e,r){return new Vt({type:"object",shape:e,catchall:Te(),...v.normalizeParams(r)})}var Jt=l("ZodUnion",(e,r)=>{Pt.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>nn(e,i,o,t),e.options=r.options});function Dn(e,r){return new Jt({type:"union",options:e,...v.normalizeParams(r)})}var fs=l("ZodXor",(e,r)=>{Jt.init(e,r),Jo.init(e,r),e._zod.processJSONSchema=(i,o,t)=>nn(e,i,o,t),e.options=r.options});function Fd(e,r){return new fs({type:"union",options:e,inclusive:!1,...v.normalizeParams(r)})}var gs=l("ZodDiscriminatedUnion",(e,r)=>{Jt.init(e,r),Bo.init(e,r)});function Vd(e,r,i){return new gs({type:"union",options:r,discriminator:e,...v.normalizeParams(i)})}var hs=l("ZodIntersection",(e,r)=>{Wo.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Pc(e,i,o,t)});function vs(e,r){return new hs({type:"intersection",left:e,right:r})}var $s=l("ZodTuple",(e,r)=>{kr.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>jc(e,i,o,t),e.rest=i=>e.clone({...e._zod.def,rest:i})});function _s(e,r,i){let o=r instanceof k,t=o?i:r,n=o?r:null;return new $s({type:"tuple",items:e,rest:n,...v.normalizeParams(t)})}var it=l("ZodRecord",(e,r)=>{Go.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Tc(e,i,o,t),e.keyType=r.keyType,e.valueType=r.valueType});function bs(e,r,i){return!r||!r._zod?new it({type:"record",keyType:Nt(),valueType:e,...v.normalizeParams(r)}):new it({type:"record",keyType:e,valueType:r,...v.normalizeParams(i)})}function Jd(e,r,i){let o=R(e);return o._zod.values=void 0,new it({type:"record",keyType:o,valueType:r,...v.normalizeParams(i)})}function Bd(e,r,i){return new it({type:"record",keyType:e,valueType:r,mode:"loose",...v.normalizeParams(i)})}var ys=l("ZodMap",(e,r)=>{Ko.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>wc(e,i,o,t),e.keyType=r.keyType,e.valueType=r.valueType,e.min=(...i)=>e.check(ne(...i)),e.nonempty=i=>e.check(ne(1,i)),e.max=(...i)=>e.check($e(...i)),e.size=(...i)=>e.check(Ie(...i))});function Wd(e,r,i){return new ys({type:"map",keyType:e,valueType:r,...v.normalizeParams(i)})}var xs=l("ZodSet",(e,r)=>{qo.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>zc(e,i,o,t),e.min=(...i)=>e.check(ne(...i)),e.nonempty=i=>e.check(ne(1,i)),e.max=(...i)=>e.check($e(...i)),e.size=(...i)=>e.check(Ie(...i))});function Gd(e,r){return new xs({type:"set",valueType:e,...v.normalizeParams(r)})}var ot=l("ZodEnum",(e,r)=>{Ho.init(e,r),w.init(e,r),e._zod.processJSONSchema=(o,t,n)=>gc(e,o,t,n),e.enum=r.entries,e.options=Object.values(r.entries);let i=new Set(Object.keys(r.entries));e.extract=(o,t)=>{let n={};for(let a of o)if(i.has(a))n[a]=r.entries[a];else throw new Error(`Key ${a} not found in enum`);return new ot({...r,checks:[],...v.normalizeParams(t),entries:n})},e.exclude=(o,t)=>{let n={...r.entries};for(let a of o)if(i.has(a))delete n[a];else throw new Error(`Key ${a} not found in enum`);return new ot({...r,checks:[],...v.normalizeParams(t),entries:n})}});function Nn(e,r){let i=Array.isArray(e)?Object.fromEntries(e.map(o=>[o,o])):e;return new ot({type:"enum",entries:i,...v.normalizeParams(r)})}function Kd(e,r){return new ot({type:"enum",entries:e,...v.normalizeParams(r)})}var ks=l("ZodLiteral",(e,r)=>{Xo.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>hc(e,i,o,t),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function qd(e,r){return new ks({type:"literal",values:Array.isArray(e)?e:[e],...v.normalizeParams(r)})}var ws=l("ZodFile",(e,r)=>{Yo.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>_c(e,i,o,t),e.min=(i,o)=>e.check(ne(i,o)),e.max=(i,o)=>e.check($e(i,o)),e.mime=(i,o)=>e.check(qe(Array.isArray(i)?i:[i],o))});function Hd(e){return qa(ws,e)}var zs=l("ZodTransform",(e,r)=>{Qo.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>kc(e,i,o,t),e._zod.parse=(i,o)=>{if(o.direction==="backward")throw new pe(e.constructor.name);i.addIssue=n=>{if(typeof n=="string")i.issues.push(v.issue(n,i.value,r));else{let a=n;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=i.value),a.inst??(a.inst=e),i.issues.push(v.issue(a))}};let t=r.transform(i.value,i);return t instanceof Promise?t.then(n=>(i.value=n,i.fallback=!0,i)):(i.value=t,i.fallback=!0,i)}});function Zn(e){return new zs({type:"transform",transform:e})}var Ln=l("ZodOptional",(e,r)=>{wr.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>on(e,i,o,t),e.unwrap=()=>e._zod.def.innerType});function Lt(e){return new Ln({type:"optional",innerType:e})}var Ss=l("ZodExactOptional",(e,r)=>{ea.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>on(e,i,o,t),e.unwrap=()=>e._zod.def.innerType});function Is(e){return new Ss({type:"optional",innerType:e})}var Ps=l("ZodNullable",(e,r)=>{ta.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Oc(e,i,o,t),e.unwrap=()=>e._zod.def.innerType});function At(e){return new Ps({type:"nullable",innerType:e})}function Xd(e){return Lt(At(e))}var js=l("ZodDefault",(e,r)=>{ra.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Ec(e,i,o,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ts(e,r){return new js({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():v.shallowClone(r)}})}var Os=l("ZodPrefault",(e,r)=>{na.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Dc(e,i,o,t),e.unwrap=()=>e._zod.def.innerType});function Us(e,r){return new Os({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():v.shallowClone(r)}})}var An=l("ZodNonOptional",(e,r)=>{ia.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Uc(e,i,o,t),e.unwrap=()=>e._zod.def.innerType});function Es(e,r){return new An({type:"nonoptional",innerType:e,...v.normalizeParams(r)})}var Ds=l("ZodSuccess",(e,r)=>{oa.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>bc(e,i,o,t),e.unwrap=()=>e._zod.def.innerType});function Yd(e){return new Ds({type:"success",innerType:e})}var Ns=l("ZodCatch",(e,r)=>{aa.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Nc(e,i,o,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Zs(e,r){return new Ns({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}var Ls=l("ZodNaN",(e,r)=>{ca.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>vc(e,i,o,t)});function Qd(e){return Ga(Ls,e)}var Bt=l("ZodPipe",(e,r)=>{zr.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Zc(e,i,o,t),e.in=r.in,e.out=r.out});function fn(e,r){return new Bt({type:"pipe",in:e,out:r})}var Wt=l("ZodCodec",(e,r)=>{Bt.init(e,r),jt.init(e,r)});function ep(e,r,i){return new Wt({type:"pipe",in:e,out:r,transform:i.decode,reverseTransform:i.encode})}function tp(e){let r=e._zod.def;return new Wt({type:"pipe",in:r.out,out:r.in,transform:r.reverseTransform,reverseTransform:r.transform})}var As=l("ZodPreprocess",(e,r)=>{Bt.init(e,r),sa.init(e,r)}),Cs=l("ZodReadonly",(e,r)=>{ua.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Lc(e,i,o,t),e.unwrap=()=>e._zod.def.innerType});function Rs(e){return new Cs({type:"readonly",innerType:e})}var Ms=l("ZodTemplateLiteral",(e,r)=>{la.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>$c(e,i,o,t)});function rp(e,r){return new Ms({type:"template_literal",parts:e,...v.normalizeParams(r)})}var Fs=l("ZodLazy",(e,r)=>{ma.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Cc(e,i,o,t),e.unwrap=()=>e._zod.def.getter()});function Vs(e){return new Fs({type:"lazy",getter:e})}var Js=l("ZodPromise",(e,r)=>{pa.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>Ac(e,i,o,t),e.unwrap=()=>e._zod.def.innerType});function np(e){return new Js({type:"promise",innerType:e})}var Bs=l("ZodFunction",(e,r)=>{da.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>xc(e,i,o,t)});function ip(e){return new Bs({type:"function",input:Array.isArray(e?.input)?_s(e?.input):e?.input??Ft(Te()),output:e?.output??Te()})}var Gt=l("ZodCustom",(e,r)=>{fa.init(e,r),w.init(e,r),e._zod.processJSONSchema=(i,o,t)=>yc(e,i,o,t)});function op(e){let r=new T({check:"custom"});return r._zod.check=e,r}function ap(e,r){return Ha(Gt,e??(()=>!0),r)}function Ws(e,r={}){return Xa(Gt,e,r)}function Gs(e,r){return Ya(e,r)}var cp=Qa,sp=ec;function up(e,r={}){let i=new Gt({type:"custom",check:"custom",fn:o=>o instanceof e,abort:!0,...v.normalizeParams(r)});return i._zod.bag.Class=e,i._zod.check=o=>{o.value instanceof e||o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:i,path:[...i._zod.def.path??[]]})},i}var lp=(...e)=>tc({Codec:Wt,Boolean:ut,String:at},...e);function dp(e){let r=Vs(()=>Dn([Nt(e),ns(),is(),ss(),Ft(r),bs(Nt(),r)]));return r}function pp(e,r){return new As({type:"pipe",in:Zn(e),out:r})}var yg={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function xg(e){D({customError:e})}function kg(){return D().customError}var Ks;Ks||(Ks={});var y={...Dt,...sn,iso:nt},wg=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function zg(e,r){let i=e.$schema;return i==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":i==="http://json-schema.org/draft-07/schema#"?"draft-7":i==="http://json-schema.org/draft-04/schema#"?"draft-4":r??"draft-2020-12"}function Sg(e,r){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let i=e.slice(1).split("/").filter(Boolean);if(i.length===0)return r.rootSchema;let o=r.version==="draft-2020-12"?"$defs":"definitions";if(i[0]===o){let t=i[1];if(!t||!r.defs[t])throw new Error(`Reference not found: ${e}`);return r.defs[t]}throw new Error(`Reference not found: ${e}`)}function mp(e,r){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return y.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let t=e.$ref;if(r.refs.has(t))return r.refs.get(t);if(r.processing.has(t))return y.lazy(()=>{if(!r.refs.has(t))throw new Error(`Circular reference not resolved: ${t}`);return r.refs.get(t)});r.processing.add(t);let n=Sg(t,r),a=C(n,r);return r.refs.set(t,a),r.processing.delete(t),a}if(e.enum!==void 0){let t=e.enum;if(r.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return y.null();if(t.length===0)return y.never();if(t.length===1)return y.literal(t[0]);if(t.every(a=>typeof a=="string"))return y.enum(t);let n=t.map(a=>y.literal(a));return n.length<2?n[0]:y.union([n[0],n[1],...n.slice(2)])}if(e.const!==void 0)return y.literal(e.const);let i=e.type;if(Array.isArray(i)){let t=i.map(n=>{let a={...e,type:n};return mp(a,r)});return t.length===0?y.never():t.length===1?t[0]:y.union(t)}if(!i)return y.any();let o;switch(i){case"string":{let t=y.string();if(e.format){let n=e.format;n==="email"?t=t.check(y.email()):n==="uri"||n==="uri-reference"?t=t.check(y.url()):n==="uuid"||n==="guid"?t=t.check(y.uuid()):n==="date-time"?t=t.check(y.iso.datetime()):n==="date"?t=t.check(y.iso.date()):n==="time"?t=t.check(y.iso.time()):n==="duration"?t=t.check(y.iso.duration()):n==="ipv4"?t=t.check(y.ipv4()):n==="ipv6"?t=t.check(y.ipv6()):n==="mac"?t=t.check(y.mac()):n==="cidr"?t=t.check(y.cidrv4()):n==="cidr-v6"?t=t.check(y.cidrv6()):n==="base64"?t=t.check(y.base64()):n==="base64url"?t=t.check(y.base64url()):n==="e164"?t=t.check(y.e164()):n==="jwt"?t=t.check(y.jwt()):n==="emoji"?t=t.check(y.emoji()):n==="nanoid"?t=t.check(y.nanoid()):n==="cuid"?t=t.check(y.cuid()):n==="cuid2"?t=t.check(y.cuid2()):n==="ulid"?t=t.check(y.ulid()):n==="xid"?t=t.check(y.xid()):n==="ksuid"&&(t=t.check(y.ksuid()))}typeof e.minLength=="number"&&(t=t.min(e.minLength)),typeof e.maxLength=="number"&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),o=t;break}case"number":case"integer":{let t=i==="integer"?y.number().int():y.number();typeof e.minimum=="number"&&(t=t.min(e.minimum)),typeof e.maximum=="number"&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum=="number"?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(t=t.lt(e.maximum)),typeof e.multipleOf=="number"&&(t=t.multipleOf(e.multipleOf)),o=t;break}case"boolean":{o=y.boolean();break}case"null":{o=y.null();break}case"object":{let t={},n=e.properties||{},a=new Set(e.required||[]);for(let[u,s]of Object.entries(n)){let d=C(s,r);t[u]=a.has(u)?d:d.optional()}if(e.propertyNames){let u=C(e.propertyNames,r),s=e.additionalProperties&&typeof e.additionalProperties=="object"?C(e.additionalProperties,r):y.any();if(Object.keys(t).length===0){o=y.record(u,s);break}let d=y.object(t).passthrough(),m=y.looseRecord(u,s);o=y.intersection(d,m);break}if(e.patternProperties){let u=e.patternProperties,s=Object.keys(u),d=[];for(let $ of s){let h=C(u[$],r),x=y.string().regex(new RegExp($));d.push(y.looseRecord(x,h))}let m=[];if(Object.keys(t).length>0&&m.push(y.object(t).passthrough()),m.push(...d),m.length===0)o=y.object({}).passthrough();else if(m.length===1)o=m[0];else{let $=y.intersection(m[0],m[1]);for(let h=2;hC(u,r)),c=n&&typeof n=="object"&&!Array.isArray(n)?C(n,r):void 0;c?o=y.tuple(a).rest(c):o=y.tuple(a),typeof e.minItems=="number"&&(o=o.check(y.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(y.maxLength(e.maxItems)))}else if(Array.isArray(n)){let a=n.map(u=>C(u,r)),c=e.additionalItems&&typeof e.additionalItems=="object"?C(e.additionalItems,r):void 0;c?o=y.tuple(a).rest(c):o=y.tuple(a),typeof e.minItems=="number"&&(o=o.check(y.minLength(e.minItems))),typeof e.maxItems=="number"&&(o=o.check(y.maxLength(e.maxItems)))}else if(n!==void 0){let a=C(n,r),c=y.array(a);typeof e.minItems=="number"&&(c=c.min(e.minItems)),typeof e.maxItems=="number"&&(c=c.max(e.maxItems)),o=c}else o=y.array(y.any());break}default:throw new Error(`Unsupported type: ${i}`)}return o}function C(e,r){if(typeof e=="boolean")return e?y.any():y.never();let i=mp(e,r),o=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let c=e.anyOf.map(s=>C(s,r)),u=y.union(c);i=o?y.intersection(i,u):u}if(e.oneOf&&Array.isArray(e.oneOf)){let c=e.oneOf.map(s=>C(s,r)),u=y.xor(c);i=o?y.intersection(i,u):u}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)i=o?i:y.any();else{let c=o?i:C(e.allOf[0],r),u=o?0:1;for(let s=u;s0&&r.registry.add(i,t),e.description&&(i=i.describe(e.description)),i}function fp(e,r){if(typeof e=="boolean")return e?y.any():y.never();let i;try{i=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let o=zg(i,r?.defaultTarget),t=i.$defs||i.definitions||{},n={version:o,defs:t,refs:new Map,processing:new Set,rootSchema:i,registry:r?.registry??L};return C(i,n)}var qs={};ae(qs,{bigint:()=>Tg,boolean:()=>jg,date:()=>Og,number:()=>Pg,string:()=>Ig});function Ig(e){return $a(at,e)}function Pg(e){return Sa(st,e)}function jg(e){return Ea(ut,e)}function Tg(e){return Na(lt,e)}function Og(e){return Wa(Mt,e)}D(Sr());var u_=dt.object({name:dt.string().trim().min(1).max(120),email:dt.string().trim().max(254).email().transform(e=>e.toLowerCase())});var Hs="I have signed in with my store account. Continue what I asked for before signing in.";var gp="I want to open a support request for email follow-up.";function I(e){let r=document.querySelector(e);if(!r)throw new Error(`Voice support element missing: ${e}`);return r}var b={app:I("#support-app"),thread:I("#thread"),transcript:I("#transcript"),landingPanel:I("#landing-panel"),landingForm:I("#landing-form"),landingInput:I("#landing-input"),landingSubmit:I("#landing-submit"),landingMicButton:I("#landing-mic-button"),humanHelpButton:I("#human-help-button"),conversationHumanButton:I("#conversation-human-button"),landingStatus:I("#landing-status"),composerBar:I("#composer-bar"),signinFlow:I("#signin-flow"),signinLead:I("#signin-card-lead"),signinCopy:I("#signin-card-copy"),signinButton:I("#signin-button"),sessionTurnstile:I("#session-turnstile"),reconnectBanner:I("#reconnect-banner"),clearButton:I("#clear-button"),micButton:I("#mic-button"),muteButton:I("#mute-button"),textForm:I("#text-form"),textInput:I("#text-input"),textSubmit:I('#text-form button[type="submit"]'),handoffCard:I("#handoff-card"),handoffCategory:I("#handoff-category"),handoffDescription:I("#handoff-description"),handoffReference:I("#handoff-reference"),handoffStatus:I("#handoff-status")},_p=[...document.querySelectorAll("[data-support-message]")],Ys="able-voice-support-reset-focus",Qs="able-signin-resume-session",tu=new URLSearchParams(window.location.search).has("signed_in");function Ug(){if(tu)try{let e=sessionStorage.getItem(Qs);if(sessionStorage.removeItem(Qs),e&&/^voice-[a-z0-9]{20}$/.test(e))return e}catch{}return`voice-${crypto.randomUUID().replaceAll("-","").slice(0,20)}`}var bp=Ug();tu&&history.replaceState(null,"",window.location.pathname);var O=new hu({agent:"AbleDeskAgent",name:bp,preferredFormat:"mp3"}),Xt=!1,hp=!1,G=!1,mt=!1,vp=tu,ru=null,A=[],yp=new Set,Kt=[],pt=[],Ue=null,oe=null,qt="",Ht=!1,Rn=null,Eg=window.matchMedia("(prefers-reduced-motion: reduce)"),Vn=new AbortController;function Yt(){let e=b.app.dataset.view==="conversation"&&kp(),r=window.visualViewport,i=Math.max(1,Math.round(r?.height??window.innerHeight)),o=Math.max(0,Math.round(r?.offsetTop??0));document.documentElement.style.setProperty("--support-viewport-height",`${i}px`),document.documentElement.style.setProperty("--support-viewport-top",`${o}px`),e&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{b.thread.scrollTop=b.thread.scrollHeight})})}window.addEventListener("resize",Yt,{signal:Vn.signal});window.visualViewport?.addEventListener("resize",Yt,{signal:Vn.signal});window.visualViewport?.addEventListener("scroll",Yt,{signal:Vn.signal});Yt();function Jn(){return Xt&&mt}function xp(){try{sessionStorage.setItem(Ys,"1")}catch{}window.location.reload()}function Dg(){try{return sessionStorage.getItem(Ys)!=="1"?!1:(sessionStorage.removeItem(Ys),!0)}catch{return!1}}function kp(){let e=b.thread;return e.scrollHeight-e.scrollTop-e.clientHeight<120}function nu(){b.thread.scrollTo({top:b.thread.scrollHeight,behavior:Eg.matches?"auto":"smooth"})}function iu(e){let r=document.createElement("span");return r.className="sr-only",r.textContent=e,r}function Ng(e){let r=e.role==="assistant",i=document.createElement("li");i.className=`answer-turn answer-turn--${r?"assistant":"user"}`;let o=document.createElement("p");o.className="turn-label",o.textContent=r?"Answer":"You asked";let t=document.createElement("div");t.className="turn-copy";let n=document.createElement(r?"p":"h2");return n.textContent=e.text,t.append(iu(r?"Ava: ":"You: "),n),r&&i.append(o),i.append(t),i}function Zg(e){let r=document.createElement("li");r.className="answer-turn answer-turn--user answer-turn--pending";let i=document.createElement("p");i.className="turn-label",i.textContent="You, speaking";let o=document.createElement("div");o.className="turn-copy";let t=document.createElement("p");return t.textContent=e,o.append(iu("You, speaking: "),t),r.append(i,o),r}function Lg(){let e=document.createElement("li");e.className="answer-turn answer-turn--assistant";let r=document.createElement("p");r.className="turn-label",r.textContent="Answer";let i=document.createElement("div");i.className="turn-copy typing-bubble";let o=document.createElement("span");o.className="typing-dots",o.setAttribute("aria-hidden","true"),o.append(document.createElement("span"),document.createElement("span"),document.createElement("span"));let t=document.createElement("span");return t.className="typing-static",t.setAttribute("aria-hidden","true"),t.textContent="\u2026",i.append(o,t,iu("Ava is typing")),e.append(r,i),e}function Ag(e){let r=document.createElement("li");return r.className="system-note",r.textContent=e,r}function Cg(e,r,i){let o=document.createElement("li");o.className="sources-row";let t=document.createElement("details");t.className="sources-card",t.dataset.anchor=String(e),t.open=i;let n=document.createElement("summary");n.textContent=`Based on (${r.length})`,t.append(n);let a=document.createElement("div");a.className="sources-list";for(let d of r){let m=document.createElement("a");m.className="source-chip",m.href=d.url,m.target="_blank",m.rel="noopener";let $=document.createElement("span");$.textContent=d.title;let h=document.createElement("small");h.textContent=d.section,m.append($,h),a.append(m)}t.append(a);let c=document.createElement("div");c.className="follow-up-prompts";let u=document.createElement("p");u.textContent="You can also ask";let s=document.createElement("div");s.className="follow-up-list";for(let d of r.slice(0,2)){let m=document.createElement("button");m.className="follow-up-chip",m.type="button",m.textContent=`Tell me more about ${d.title}`,m.addEventListener("click",()=>Qt(`Tell me more about "${d.title}".`)),s.append(m)}return c.append(u,s),o.append(t,c),o}function le(e,r=!1){Yt(),b.app.dataset.view=e?"conversation":"landing",document.documentElement.classList.toggle("support-conversation",e),document.body.classList.toggle("support-conversation",e),b.landingPanel.hidden=e,b.transcript.hidden=!e,b.composerBar.hidden=!e,b.clearButton.hidden=!e,r&&(e?b.textInput:b.landingInput).focus()}function wp(){return A.at(-1)?.role==="assistant"?A.length:A.length+1}function Rg(e){if(typeof e!="string")return null;if(e.startsWith("/")&&!e.startsWith("//"))return e;try{let r=new URL(e);return r.protocol==="https:"||r.origin===window.location.origin?r.toString():null}catch{return null}}function Q(){(A.length>0||qt||Ht||oe!==null||Ue!==null)&&le(!0);let e=kp(),r=A.length,i=new Map([...b.transcript.querySelectorAll(".sources-card")].map(n=>[Number(n.dataset.anchor),n.open]).filter(([n])=>Number.isFinite(n))),o=[],t=n=>{for(let a of Kt)a.anchor<=r&&a.anchor===n&&o.push(Ag(a.text));for(let a of pt)a.anchor<=r&&a.anchor===n&&o.push(Cg(a.anchor,a.articles,i.get(a.anchor)??!0));oe!==null&&oe<=r&&oe===n&&(b.signinFlow.hidden=!1,o.push(b.signinFlow)),Ue!==null&&Ue<=r&&Ue===n&&(b.handoffCard.hidden=!1,o.push(b.handoffCard))};for(let n=0;nA.length&&(n.anchor=A.length,r=!0);oe!==null&&oe>A.length&&(oe=A.length,r=!0)}let i=!G&&e!=="idle",o=Jn();b.micButton.disabled=!o||i,b.landingMicButton.disabled=!o||i;for(let n of[b.micButton,b.landingMicButton])n.classList.toggle("mic-button--active",G),n.setAttribute("aria-label",G?"Stop voice":"Use voice"),n.setAttribute("aria-pressed",String(G)),n.title=G?"Stop the voice call":"Talk instead of typing";b.muteButton.hidden=!G,b.muteButton.disabled=!o||!G,b.clearButton.disabled=!Xt,b.app.setAttribute("aria-busy",String(!o)),b.landingInput.disabled=!1,b.landingSubmit.disabled=!o;for(let n of _p)n.disabled=!o;b.humanHelpButton.disabled=!o,b.textInput.disabled=!1,b.textSubmit.disabled=!o,b.conversationHumanButton.disabled=!o;let t=e==="thinking";t!==Ht?(Ht=t,Q()):r&&Q()}function Mg(){let e=ru==="order_lookup"?{lead:"Sign in to check your order",copy:"Use your store account \u2014 a quick code by email, no password. I\u2019ll pull your orders up right after."}:{lead:"Sign in to continue",copy:"Use your store account \u2014 a quick code by email, no password. You\u2019ll come right back to this conversation."};b.signinLead.textContent=e.lead,b.signinCopy.textContent=e.copy}function Fg(e){return e==="order_lookup"||e==="open_ticket"?e:null}function Vg(e){le(!0),oe===null&&(oe=e==="after_reply"?wp():A.length),Mg(),b.signinButton.disabled=!1,Q(),nu()}function eu(){oe=null,b.signinFlow.hidden=!0,Q()}function Jg(){try{sessionStorage.setItem(Qs,bp)}catch{}b.signinButton.disabled=!0,window.location.assign("/auth/shopify/start")}function Bg(){return window.turnstile}var Cn=null,Mn=null,$p=b.sessionTurnstile.dataset.sitekey??"";function Xs(e){if(!Xt){Mn=e;return}O.sendJSON({type:"start_voice_session",turnstileToken:e})}function zp(){if(mt||!Xt)return;if(Mn!==null){let r=Mn;Mn=null,Xs(r);return}if(!$p){Xs("");return}let e=Bg();if(!e){window.setTimeout(zp,200);return}if(Cn===null)try{Cn=e.render(b.sessionTurnstile,{sitekey:$p,action:"voice_session",size:"flexible",appearance:"interaction-only",callback:r=>Xs(r)})}catch{Cn=null}else e.reset(Cn)}var Wg={rate_limited:"Too many chat sessions from this connection. Wait a minute, then reload the page.",turnstile_not_configured:"This chat is not fully set up yet. Please try again later."};function Gg(e){if(!e||typeof e!="object")return;let r=e;b.handoffCategory.textContent=typeof r.label=="string"?r.label:"Support ticket opened",b.handoffDescription.textContent="A support ticket was opened under your store account. The team will follow up by email.",b.handoffReference.textContent=typeof r.reference=="string"?r.reference:"\u2014",b.handoffStatus.textContent=typeof r.status=="string"?r.status:"open",Ue=A.length,le(!0),Q(),nu()}function Kg(e){if(!e||typeof e!="object")return;let r=e;if(r.type==="voice_session_ready"){mt=!0,b.sessionTurnstile.hidden=!0,b.landingStatus.textContent="",Ee(O.status),vp&&(vp=!1,eu(),yp.add(Hs),le(!0),O.sendText(Hs)),Dg()&&b.landingInput.focus();return}if(r.type==="voice_session_error"||r.type==="voice_session_required"){mt=!1;let i=typeof r.reason=="string"?r.reason:"",o=Wg[i]??"The anti-spam check could not be completed. Reload the page to try again.";b.landingStatus.textContent=o,b.app.dataset.view==="conversation"&&Fn(o),Ee(O.status);return}if(r.type==="voice_signin_required"){ru=Fg(r.reason),Vg(r.anchor==="after_reply"?"after_reply":"now");return}if(r.type==="voice_sources"){let i=(Array.isArray(r.articles)?r.articles:[]).flatMap(o=>{if(!o||typeof o!="object")return[];let t=o,n=Rg(t.url);return n&&typeof t.title=="string"&&typeof t.section=="string"?[{title:t.title,section:t.section,url:n}]:[]}).slice(0,3);if(i.length>0){let o=wp(),t=pt.find(n=>n.anchor===o);t?t.articles=[...t.articles,...i].filter((n,a,c)=>c.findIndex(u=>u.url===n.url)===a).slice(0,3):pt.push({anchor:o,articles:i}),Q()}return}if(r.type==="demo_session_cleared"){Ue=null,pt=[],b.handoffCard.hidden=!0,eu(),Q(),Rn!==null&&(clearTimeout(Rn),Rn=null,xp());return}r.type==="voice_ticket_created"&&Gg(r.ticket)}O.addEventListener("connectionchange",e=>{Xt=e,e?(hp=!0,b.reconnectBanner.hidden=!0,mt=!1,b.sessionTurnstile.hidden=!1,zp()):(G=!1,mt=!1,hp&&(b.reconnectBanner.hidden=!1)),Ee(O.status)});O.addEventListener("statuschange",Ee);O.addEventListener("transcriptchange",e=>{A=e,e.length>0&&le(!0),Q()});O.addEventListener("interimtranscript",e=>{qt=e??"",Q()});O.addEventListener("mutechange",e=>{b.muteButton.textContent=e?"Unmute":"Mute"});O.addEventListener("custommessage",Kg);O.addEventListener("error",e=>{e&&(b.app.dataset.view==="landing"?b.landingStatus.textContent=e:Fn(e))});async function Sp(){G?(O.endCall(),G=!1,Fn("Voice off")):(le(!0),await O.startCall(),G=!0,Fn("Voice on \u2014 speak naturally")),Ee(O.status)}b.micButton.addEventListener("click",Sp);b.landingMicButton.addEventListener("click",Sp);b.muteButton.addEventListener("click",()=>O.toggleMute());b.signinButton.addEventListener("click",Jg);b.clearButton.addEventListener("click",()=>{G&&O.endCall(),G=!1,b.clearButton.disabled=!0,O.sendJSON({type:"clear_demo_session"}),Rn=setTimeout(xp,2e3),A=[],Kt=[],pt=[],Ue=null,b.handoffCard.hidden=!0,eu(),qt="",Ht=!1,b.landingInput.value="",b.textInput.value="",ru=null,le(!1,!0),Q(),Ee(O.status)});function Qt(e){return!e||!Jn()?!1:(le(!0),O.sendText(e),!0)}function qg(){Jn()&&(b.landingInput.placeholder="Briefly describe what you need help with",b.landingStatus.textContent="Describe the issue first. Ava will ask you to sign in only if a private request is needed.",b.landingInput.focus())}function Hg(){let e=[...A].reverse().find(r=>r.role==="user")?.text.trim();if(!e){b.textInput.placeholder="Briefly describe what you need help with",b.textInput.focus();return}Qt(`${gp} My issue is: ${e}`)}b.landingForm.addEventListener("submit",e=>{e.preventDefault();let r=b.landingInput.value.trim();if(r){if(!Jn()){b.landingStatus.textContent="Preparing secure chat\u2026";return}b.landingInput.blur(),Qt(r)&&(b.landingInput.value="")}});b.humanHelpButton.addEventListener("click",()=>{qg()});for(let e of _p)e.addEventListener("click",()=>{let r=e.dataset.supportMessage;r&&Qt(r)});b.conversationHumanButton.addEventListener("click",()=>{Hg()});b.textForm.addEventListener("submit",e=>{e.preventDefault();let r=b.textInput.value.trim();r&&Qt(r)&&(b.textInput.value="")});window.addEventListener("beforeunload",()=>{Vn.abort(),G&&O.endCall(),O.disconnect()});Ee(O.status);le(!1);O.connect();})(); +Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let s=a[1];if(r===a[0]){o(a);continue}if(e.external){let l=e.external.registry.get(a[0])?.id;if(r!==a[0]&&l){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(s.cycle){o(a);continue}if(s.count>1&&e.reused==="ref"){o(a);continue}}}function Je(e,r){let n=e.seen.get(r);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let i=s=>{let c=e.seen.get(s);if(c.ref===null)return;let l=c.def??c.schema,u={...l},d=c.ref;if(c.ref=null,d){i(d);let g=e.seen.get(d),x=g.schema;if(x.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(x)):Object.assign(l,x),Object.assign(l,u),s._zod.parent===d)for(let w in l)w==="$ref"||w==="allOf"||w in u||delete l[w];if(x.$ref&&g.def)for(let w in l)w==="$ref"||w==="allOf"||w in g.def&&JSON.stringify(l[w])===JSON.stringify(g.def[w])&&delete l[w]}let f=s._zod.parent;if(f&&f!==d){i(f);let g=e.seen.get(f);if(g?.schema.$ref&&(l.$ref=g.schema.$ref,g.def))for(let x in l)x==="$ref"||x==="allOf"||x in g.def&&JSON.stringify(l[x])===JSON.stringify(g.def[x])&&delete l[x]}e.override({zodSchema:s,jsonSchema:l,path:c.path??[]})};for(let s of[...e.seen.entries()].reverse())i(s[0]);let t={};if(e.target==="draft-2020-12"?t.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?t.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?t.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let s=e.external.registry.get(r)?.id;if(!s)throw new Error("Schema is missing an `id` property");t.$id=e.external.uri(s)}Object.assign(t,n.def??n.schema);let o=e.metadataRegistry.get(r)?.id;o!==void 0&&t.id===o&&delete t.id;let a=e.external?.defs??{};for(let s of e.seen.entries()){let c=s[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?t.$defs=a:t.definitions=a);try{let s=JSON.parse(JSON.stringify(t));return Object.defineProperty(s,"~standard",{value:{...r["~standard"],jsonSchema:{input:Ut(r,"input",e.processors),output:Ut(r,"output",e.processors)}},enumerable:!1,writable:!1}),s}catch{throw new Error("Error converting schema to JSON.")}}function X(e,r){let n=r??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let i=e._zod.def;if(i.type==="transform")return!0;if(i.type==="array")return X(i.element,n);if(i.type==="set")return X(i.valueType,n);if(i.type==="lazy")return X(i.getter(),n);if(i.type==="promise"||i.type==="optional"||i.type==="nonoptional"||i.type==="nullable"||i.type==="readonly"||i.type==="default"||i.type==="prefault")return X(i.innerType,n);if(i.type==="intersection")return X(i.left,n)||X(i.right,n);if(i.type==="record"||i.type==="map")return X(i.keyType,n)||X(i.valueType,n);if(i.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:X(i.in,n)||X(i.out,n);if(i.type==="object"){for(let t in i.shape)if(X(i.shape[t],n))return!0;return!1}if(i.type==="union"){for(let t of i.options)if(X(t,n))return!0;return!1}if(i.type==="tuple"){for(let t of i.items)if(X(t,n))return!0;return!!(i.rest&&X(i.rest,n))}return!1}var Uc=(e,r={})=>n=>{let i=Fe({...n,processors:r});return O(e,i),Ve(i,e),Je(i,e)},Ut=(e,r,n={})=>i=>{let{libraryOptions:t,target:o}=i??{},a=Fe({...t??{},target:o,io:r,processors:n});return O(e,a),Ve(a,e),Je(a,e)};var n$={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Dc=(e,r,n,i)=>{let t=n;t.type="string";let{minimum:o,maximum:a,format:s,patterns:c,contentEncoding:l}=e._zod.bag;if(typeof o=="number"&&(t.minLength=o),typeof a=="number"&&(t.maxLength=a),s&&(t.format=n$[s]??s,t.format===""&&delete t.format,s==="time"&&delete t.format),l&&(t.contentEncoding=l),c&&c.size>0){let u=[...c];u.length===1?t.pattern=u[0].source:u.length>1&&(t.allOf=[...u.map(d=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))])}},Nc=(e,r,n,i)=>{let t=n,{minimum:o,maximum:a,format:s,multipleOf:c,exclusiveMaximum:l,exclusiveMinimum:u}=e._zod.bag;typeof s=="string"&&s.includes("int")?t.type="integer":t.type="number";let d=typeof u=="number"&&u>=(o??Number.NEGATIVE_INFINITY),f=typeof l=="number"&&l<=(a??Number.POSITIVE_INFINITY),g=r.target==="draft-04"||r.target==="openapi-3.0";d?g?(t.minimum=u,t.exclusiveMinimum=!0):t.exclusiveMinimum=u:typeof o=="number"&&(t.minimum=o),f?g?(t.maximum=l,t.exclusiveMaximum=!0):t.exclusiveMaximum=l:typeof a=="number"&&(t.maximum=a),typeof c=="number"&&(t.multipleOf=c)},Zc=(e,r,n,i)=>{n.type="boolean"},Ac=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},Lc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Cc=(e,r,n,i)=>{r.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Rc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Mc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Fc=(e,r,n,i)=>{n.not={}},Vc=(e,r,n,i)=>{},Jc=(e,r,n,i)=>{},Bc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Wc=(e,r,n,i)=>{let t=e._zod.def,o=er(t.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},qc=(e,r,n,i)=>{let t=e._zod.def,o=[];for(let a of t.values)if(a===void 0){if(r.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(r.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,r.target==="draft-04"||r.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},Gc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Kc=(e,r,n,i)=>{let t=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");t.type="string",t.pattern=o.source},Hc=(e,r,n,i)=>{let t=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:s,mime:c}=e._zod.bag;a!==void 0&&(o.minLength=a),s!==void 0&&(o.maxLength=s),c?c.length===1?(o.contentMediaType=c[0],Object.assign(t,o)):(Object.assign(t,o),t.anyOf=c.map(l=>({contentMediaType:l}))):Object.assign(t,o)},Xc=(e,r,n,i)=>{n.type="boolean"},Yc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Qc=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},el=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},tl=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},rl=(e,r,n,i)=>{if(r.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},nl=(e,r,n,i)=>{let t=n,o=e._zod.def,{minimum:a,maximum:s}=e._zod.bag;typeof a=="number"&&(t.minItems=a),typeof s=="number"&&(t.maxItems=s),t.type="array",t.items=O(o.element,r,{...i,path:[...i.path,"items"]})},il=(e,r,n,i)=>{let t=n,o=e._zod.def;t.type="object",t.properties={};let a=o.shape;for(let l in a)t.properties[l]=O(a[l],r,{...i,path:[...i.path,"properties",l]});let s=new Set(Object.keys(a)),c=new Set([...s].filter(l=>{let u=o.shape[l]._zod;return r.io==="input"?u.optin===void 0:u.optout===void 0}));c.size>0&&(t.required=Array.from(c)),o.catchall?._zod.def.type==="never"?t.additionalProperties=!1:o.catchall?o.catchall&&(t.additionalProperties=O(o.catchall,r,{...i,path:[...i.path,"additionalProperties"]})):r.io==="output"&&(t.additionalProperties=!1)},ci=(e,r,n,i)=>{let t=e._zod.def,o=t.inclusive===!1,a=t.options.map((s,c)=>O(s,r,{...i,path:[...i.path,o?"oneOf":"anyOf",c]}));o?n.oneOf=a:n.anyOf=a},ol=(e,r,n,i)=>{let t=e._zod.def,o=O(t.left,r,{...i,path:[...i.path,"allOf",0]}),a=O(t.right,r,{...i,path:[...i.path,"allOf",1]}),s=l=>"allOf"in l&&Object.keys(l).length===1,c=[...s(o)?o.allOf:[o],...s(a)?a.allOf:[a]];n.allOf=c},al=(e,r,n,i)=>{let t=n,o=e._zod.def;t.type="array";let a=r.target==="draft-2020-12"?"prefixItems":"items",s=r.target==="draft-2020-12"||r.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((f,g)=>O(f,r,{...i,path:[...i.path,a,g]})),l=o.rest?O(o.rest,r,{...i,path:[...i.path,s,...r.target==="openapi-3.0"?[o.items.length]:[]]}):null;r.target==="draft-2020-12"?(t.prefixItems=c,l&&(t.items=l)):r.target==="openapi-3.0"?(t.items={anyOf:c},l&&t.items.anyOf.push(l),t.minItems=c.length,l||(t.maxItems=c.length)):(t.items=c,l&&(t.additionalItems=l));let{minimum:u,maximum:d}=e._zod.bag;typeof u=="number"&&(t.minItems=u),typeof d=="number"&&(t.maxItems=d)},sl=(e,r,n,i)=>{let t=n,o=e._zod.def;t.type="object";let a=o.keyType,c=a._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let u=O(o.valueType,r,{...i,path:[...i.path,"patternProperties","*"]});t.patternProperties={};for(let d of c)t.patternProperties[d.source]=u}else(r.target==="draft-07"||r.target==="draft-2020-12")&&(t.propertyNames=O(o.keyType,r,{...i,path:[...i.path,"propertyNames"]})),t.additionalProperties=O(o.valueType,r,{...i,path:[...i.path,"additionalProperties"]});let l=a._zod.values;if(l){let u=[...l].filter(d=>typeof d=="string"||typeof d=="number");u.length>0&&(t.required=u)}},cl=(e,r,n,i)=>{let t=e._zod.def,o=O(t.innerType,r,i),a=r.seen.get(e);r.target==="openapi-3.0"?(a.ref=t.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},ll=(e,r,n,i)=>{let t=e._zod.def;O(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType},ul=(e,r,n,i)=>{let t=e._zod.def;O(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType,n.default=JSON.parse(JSON.stringify(t.defaultValue))},dl=(e,r,n,i)=>{let t=e._zod.def;O(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType,r.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(t.defaultValue)))},pl=(e,r,n,i)=>{let t=e._zod.def;O(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType;let a;try{a=t.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},fl=(e,r,n,i)=>{let t=e._zod.def,o=t.in._zod.traits.has("$ZodTransform"),a=r.io==="input"?o?t.out:t.in:t.out;O(a,r,i);let s=r.seen.get(e);s.ref=a},ml=(e,r,n,i)=>{let t=e._zod.def;O(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType,n.readOnly=!0},gl=(e,r,n,i)=>{let t=e._zod.def;O(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType},li=(e,r,n,i)=>{let t=e._zod.def;O(t.innerType,r,i);let o=r.seen.get(e);o.ref=t.innerType},hl=(e,r,n,i)=>{let t=e._zod.innerType;O(t,r,i);let o=r.seen.get(e);o.ref=t},si={string:Dc,number:Nc,boolean:Zc,bigint:Ac,symbol:Lc,null:Cc,undefined:Rc,void:Mc,never:Fc,any:Vc,unknown:Jc,date:Bc,enum:Wc,literal:qc,nan:Gc,template_literal:Kc,file:Hc,success:Xc,custom:Yc,function:Qc,transform:el,map:tl,set:rl,array:nl,object:il,union:ci,intersection:ol,tuple:al,record:sl,nullable:cl,nonoptional:ll,default:ul,prefault:dl,catch:pl,pipe:fl,readonly:ml,promise:gl,optional:li,lazy:hl};function ui(e,r){if("_idmap"in e){let i=e,t=Fe({...r,processors:si}),o={};for(let c of i._idmap.entries()){let[l,u]=c;O(u,t)}let a={},s={registry:i,uri:r?.uri,defs:o};t.external=s;for(let c of i._idmap.entries()){let[l,u]=c;Ve(t,u),a[l]=Je(t,u)}if(Object.keys(o).length>0){let c=t.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}let n=Fe({...r,processors:si});return O(e,n),Ve(n,e),Je(n,e)}var di=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(r){this.ctx.counter=r}get seen(){return this.ctx.seen}constructor(r){let n=r?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Fe({processors:si,target:n,...r?.metadata&&{metadata:r.metadata},...r?.unrepresentable&&{unrepresentable:r.unrepresentable},...r?.override&&{override:r.override},...r?.io&&{io:r.io}})}process(r,n={path:[],schemaPath:[]}){return O(r,this.ctx,n)}emit(r,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Ve(this.ctx,r);let i=Je(this.ctx,r),{"~standard":t,...o}=i;return o}};var Ff={};var br={};$e(br,{ZodAny:()=>Rl,ZodArray:()=>Jl,ZodBase64:()=>ji,ZodBase64URL:()=>Ui,ZodBigInt:()=>Mt,ZodBigIntFormat:()=>Zi,ZodBoolean:()=>Rt,ZodCIDRv4:()=>Ei,ZodCIDRv6:()=>Oi,ZodCUID:()=>ki,ZodCUID2:()=>wi,ZodCatch:()=>pu,ZodCodec:()=>Er,ZodCustom:()=>Or,ZodCustomStringFormat:()=>Lt,ZodDate:()=>Sr,ZodDefault:()=>au,ZodDiscriminatedUnion:()=>Wl,ZodE164:()=>Di,ZodEmail:()=>yi,ZodEmoji:()=>$i,ZodEnum:()=>Zt,ZodExactOptional:()=>nu,ZodFile:()=>tu,ZodFunction:()=>_u,ZodGUID:()=>yr,ZodIPv4:()=>Ti,ZodIPv6:()=>Pi,ZodIntersection:()=>ql,ZodJWT:()=>Ni,ZodKSUID:()=>Ii,ZodLazy:()=>xu,ZodLiteral:()=>eu,ZodMAC:()=>Ul,ZodMap:()=>Yl,ZodNaN:()=>mu,ZodNanoID:()=>_i,ZodNever:()=>Fl,ZodNonOptional:()=>Fi,ZodNull:()=>Ll,ZodNullable:()=>ou,ZodNumber:()=>Ct,ZodNumberFormat:()=>it,ZodObject:()=>Ir,ZodOptional:()=>Mi,ZodPipe:()=>Pr,ZodPrefault:()=>cu,ZodPreprocess:()=>gu,ZodPromise:()=>$u,ZodReadonly:()=>hu,ZodRecord:()=>Nt,ZodSet:()=>Ql,ZodString:()=>At,ZodStringFormat:()=>N,ZodSuccess:()=>du,ZodSymbol:()=>Zl,ZodTemplateLiteral:()=>bu,ZodTransform:()=>ru,ZodTuple:()=>Kl,ZodType:()=>S,ZodULID:()=>Si,ZodURL:()=>wr,ZodUUID:()=>xe,ZodUndefined:()=>Al,ZodUnion:()=>Tr,ZodUnknown:()=>Ml,ZodVoid:()=>Vl,ZodXID:()=>zi,ZodXor:()=>Bl,_ZodString:()=>xi,_default:()=>su,_function:()=>Xm,any:()=>Tm,array:()=>zr,base64:()=>dm,base64url:()=>pm,bigint:()=>km,boolean:()=>Nl,catch:()=>fu,check:()=>Ym,cidrv4:()=>lm,cidrv6:()=>um,codec:()=>qm,cuid:()=>tm,cuid2:()=>rm,custom:()=>Qm,date:()=>Em,describe:()=>eg,discriminatedUnion:()=>Zm,e164:()=>fm,email:()=>Bf,emoji:()=>Qf,enum:()=>Ci,exactOptional:()=>iu,file:()=>Vm,float32:()=>xm,float64:()=>ym,function:()=>Xm,guid:()=>Wf,hash:()=>bm,hex:()=>vm,hostname:()=>hm,httpUrl:()=>Yf,instanceof:()=>rg,int:()=>vi,int32:()=>$m,int64:()=>wm,intersection:()=>Gl,invertCodec:()=>Gm,ipv4:()=>am,ipv6:()=>cm,json:()=>ig,jwt:()=>mm,keyof:()=>Om,ksuid:()=>om,lazy:()=>yu,literal:()=>Fm,looseObject:()=>Dm,looseRecord:()=>Lm,mac:()=>sm,map:()=>Cm,meta:()=>tg,nan:()=>Wm,nanoid:()=>em,nativeEnum:()=>Mm,never:()=>Ai,nonoptional:()=>uu,null:()=>Cl,nullable:()=>_r,nullish:()=>Jm,number:()=>Dl,object:()=>jm,optional:()=>$r,partialRecord:()=>Am,pipe:()=>bi,prefault:()=>lu,preprocess:()=>og,promise:()=>Hm,readonly:()=>vu,record:()=>Xl,refine:()=>ku,set:()=>Rm,strictObject:()=>Um,string:()=>xr,stringFormat:()=>gm,stringbool:()=>ng,success:()=>Bm,superRefine:()=>wu,symbol:()=>zm,templateLiteral:()=>Km,transform:()=>Ri,tuple:()=>Hl,uint32:()=>_m,uint64:()=>Sm,ulid:()=>nm,undefined:()=>Im,union:()=>Li,unknown:()=>nt,url:()=>Xf,uuid:()=>qf,uuidv4:()=>Gf,uuidv6:()=>Kf,uuidv7:()=>Hf,void:()=>Pm,xid:()=>im,xor:()=>Nm});var pi={};$e(pi,{endsWith:()=>St,gt:()=>ve,gte:()=>H,includes:()=>kt,length:()=>rt,lowercase:()=>$t,lt:()=>he,lte:()=>oe,maxLength:()=>tt,maxSize:()=>Me,mime:()=>zt,minLength:()=>ke,minSize:()=>be,multipleOf:()=>Re,negative:()=>ni,nonnegative:()=>oi,nonpositive:()=>ii,normalize:()=>It,overwrite:()=>de,positive:()=>ri,property:()=>ai,regex:()=>yt,size:()=>et,slugify:()=>Ot,startsWith:()=>wt,toLowerCase:()=>Pt,toUpperCase:()=>Et,trim:()=>Tt,uppercase:()=>_t});var Dt={};$e(Dt,{ZodISODate:()=>mi,ZodISODateTime:()=>fi,ZodISODuration:()=>hi,ZodISOTime:()=>gi,date:()=>bl,datetime:()=>vl,duration:()=>yl,time:()=>xl});var fi=p("ZodISODateTime",(e,r)=>{Ga.init(e,r),N.init(e,r)});function vl(e){return Ys(fi,e)}var mi=p("ZodISODate",(e,r)=>{Ka.init(e,r),N.init(e,r)});function bl(e){return Qs(mi,e)}var gi=p("ZodISOTime",(e,r)=>{Ha.init(e,r),N.init(e,r)});function xl(e){return ec(gi,e)}var hi=p("ZodISODuration",(e,r)=>{Xa.init(e,r),N.init(e,r)});function yl(e){return tc(hi,e)}var Vf=(e,r)=>{or.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>sr(e,n)},flatten:{value:n=>ar(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,dt,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,dt,2)}},isEmpty:{get(){return e.issues.length===0}}})},o$=p("ZodError",Vf),re=p("ZodError",Vf,{Parent:Error});var $l=mt(re),_l=gt(re),kl=ht(re),wl=vt(re),Sl=un(re),zl=dn(re),Il=pn(re),Tl=fn(re),Pl=mn(re),El=gn(re),Ol=hn(re),jl=vn(re);var Jf=new WeakMap;function kr(e,r,n){let i=Object.getPrototypeOf(e),t=Jf.get(i);if(t||(t=new Set,Jf.set(i,t)),!t.has(r)){t.add(r);for(let o in n){let a=n[o];Object.defineProperty(i,o,{configurable:!0,enumerable:!1,get(){let s=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s}),s},set(s){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:s})}})}}}var S=p("ZodType",(e,r)=>(k.init(e,r),Object.assign(e["~standard"],{jsonSchema:{input:Ut(e,"input"),output:Ut(e,"output")}}),e.toJSONSchema=Uc(e,{}),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.parse=(n,i)=>$l(e,n,i,{callee:e.parse}),e.safeParse=(n,i)=>kl(e,n,i),e.parseAsync=async(n,i)=>_l(e,n,i,{callee:e.parseAsync}),e.safeParseAsync=async(n,i)=>wl(e,n,i),e.spa=e.safeParseAsync,e.encode=(n,i)=>Sl(e,n,i),e.decode=(n,i)=>zl(e,n,i),e.encodeAsync=async(n,i)=>Il(e,n,i),e.decodeAsync=async(n,i)=>Tl(e,n,i),e.safeEncode=(n,i)=>Pl(e,n,i),e.safeDecode=(n,i)=>El(e,n,i),e.safeEncodeAsync=async(n,i)=>Ol(e,n,i),e.safeDecodeAsync=async(n,i)=>jl(e,n,i),kr(e,"ZodType",{check(...n){let i=this.def;return this.clone(b.mergeDefs(i,{checks:[...i.checks??[],...n.map(t=>typeof t=="function"?{_zod:{check:t,def:{check:"custom"},onattach:[]}}:t)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,i){return G(this,n,i)},brand(){return this},register(n,i){return n.add(this,i),this},refine(n,i){return this.check(ku(n,i))},superRefine(n,i){return this.check(wu(n,i))},overwrite(n){return this.check(de(n))},optional(){return $r(this)},exactOptional(){return iu(this)},nullable(){return _r(this)},nullish(){return $r(_r(this))},nonoptional(n){return uu(this,n)},array(){return zr(this)},or(n){return Li([this,n])},and(n){return Gl(this,n)},transform(n){return bi(this,Ri(n))},default(n){return su(this,n)},prefault(n){return lu(this,n)},catch(n){return fu(this,n)},pipe(n){return bi(this,n)},readonly(){return vu(this)},describe(n){let i=this.clone();return V.add(i,{description:n}),i},meta(...n){if(n.length===0)return V.get(this);let i=this.clone();return V.add(i,n[0]),i},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return V.get(e)?.description},configurable:!0}),e)),xi=p("_ZodString",(e,r)=>{Qe.init(e,r),S.init(e,r),e._zod.processJSONSchema=(i,t,o)=>Dc(e,i,t,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,kr(e,"_ZodString",{regex(...i){return this.check(yt(...i))},includes(...i){return this.check(kt(...i))},startsWith(...i){return this.check(wt(...i))},endsWith(...i){return this.check(St(...i))},min(...i){return this.check(ke(...i))},max(...i){return this.check(tt(...i))},length(...i){return this.check(rt(...i))},nonempty(...i){return this.check(ke(1,...i))},lowercase(i){return this.check($t(i))},uppercase(i){return this.check(_t(i))},trim(){return this.check(Tt())},normalize(...i){return this.check(It(...i))},toLowerCase(){return this.check(Pt())},toUpperCase(){return this.check(Et())},slugify(){return this.check(Ot())}})}),At=p("ZodString",(e,r)=>{Qe.init(e,r),xi.init(e,r),e.email=n=>e.check(Zn(yi,n)),e.url=n=>e.check(vr(wr,n)),e.jwt=n=>e.check(ti(Ni,n)),e.emoji=n=>e.check(Mn($i,n)),e.guid=n=>e.check(hr(yr,n)),e.uuid=n=>e.check(An(xe,n)),e.uuidv4=n=>e.check(Ln(xe,n)),e.uuidv6=n=>e.check(Cn(xe,n)),e.uuidv7=n=>e.check(Rn(xe,n)),e.nanoid=n=>e.check(Fn(_i,n)),e.guid=n=>e.check(hr(yr,n)),e.cuid=n=>e.check(Vn(ki,n)),e.cuid2=n=>e.check(Jn(wi,n)),e.ulid=n=>e.check(Bn(Si,n)),e.base64=n=>e.check(Yn(ji,n)),e.base64url=n=>e.check(Qn(Ui,n)),e.xid=n=>e.check(Wn(zi,n)),e.ksuid=n=>e.check(qn(Ii,n)),e.ipv4=n=>e.check(Gn(Ti,n)),e.ipv6=n=>e.check(Kn(Pi,n)),e.cidrv4=n=>e.check(Hn(Ei,n)),e.cidrv6=n=>e.check(Xn(Oi,n)),e.e164=n=>e.check(ei(Di,n)),e.datetime=n=>e.check(vl(n)),e.date=n=>e.check(bl(n)),e.time=n=>e.check(xl(n)),e.duration=n=>e.check(yl(n))});function xr(e){return Gs(At,e)}var N=p("ZodStringFormat",(e,r)=>{D.init(e,r),xi.init(e,r)}),yi=p("ZodEmail",(e,r)=>{Ca.init(e,r),N.init(e,r)});function Bf(e){return Zn(yi,e)}var yr=p("ZodGUID",(e,r)=>{Aa.init(e,r),N.init(e,r)});function Wf(e){return hr(yr,e)}var xe=p("ZodUUID",(e,r)=>{La.init(e,r),N.init(e,r)});function qf(e){return An(xe,e)}function Gf(e){return Ln(xe,e)}function Kf(e){return Cn(xe,e)}function Hf(e){return Rn(xe,e)}var wr=p("ZodURL",(e,r)=>{Ra.init(e,r),N.init(e,r)});function Xf(e){return vr(wr,e)}function Yf(e){return vr(wr,{protocol:ie.httpProtocol,hostname:ie.domain,...b.normalizeParams(e)})}var $i=p("ZodEmoji",(e,r)=>{Ma.init(e,r),N.init(e,r)});function Qf(e){return Mn($i,e)}var _i=p("ZodNanoID",(e,r)=>{Fa.init(e,r),N.init(e,r)});function em(e){return Fn(_i,e)}var ki=p("ZodCUID",(e,r)=>{Va.init(e,r),N.init(e,r)});function tm(e){return Vn(ki,e)}var wi=p("ZodCUID2",(e,r)=>{Ja.init(e,r),N.init(e,r)});function rm(e){return Jn(wi,e)}var Si=p("ZodULID",(e,r)=>{Ba.init(e,r),N.init(e,r)});function nm(e){return Bn(Si,e)}var zi=p("ZodXID",(e,r)=>{Wa.init(e,r),N.init(e,r)});function im(e){return Wn(zi,e)}var Ii=p("ZodKSUID",(e,r)=>{qa.init(e,r),N.init(e,r)});function om(e){return qn(Ii,e)}var Ti=p("ZodIPv4",(e,r)=>{Ya.init(e,r),N.init(e,r)});function am(e){return Gn(Ti,e)}var Ul=p("ZodMAC",(e,r)=>{es.init(e,r),N.init(e,r)});function sm(e){return Hs(Ul,e)}var Pi=p("ZodIPv6",(e,r)=>{Qa.init(e,r),N.init(e,r)});function cm(e){return Kn(Pi,e)}var Ei=p("ZodCIDRv4",(e,r)=>{ts.init(e,r),N.init(e,r)});function lm(e){return Hn(Ei,e)}var Oi=p("ZodCIDRv6",(e,r)=>{rs.init(e,r),N.init(e,r)});function um(e){return Xn(Oi,e)}var ji=p("ZodBase64",(e,r)=>{is.init(e,r),N.init(e,r)});function dm(e){return Yn(ji,e)}var Ui=p("ZodBase64URL",(e,r)=>{os.init(e,r),N.init(e,r)});function pm(e){return Qn(Ui,e)}var Di=p("ZodE164",(e,r)=>{as.init(e,r),N.init(e,r)});function fm(e){return ei(Di,e)}var Ni=p("ZodJWT",(e,r)=>{ss.init(e,r),N.init(e,r)});function mm(e){return ti(Ni,e)}var Lt=p("ZodCustomStringFormat",(e,r)=>{cs.init(e,r),N.init(e,r)});function gm(e,r,n={}){return jt(Lt,e,r,n)}function hm(e){return jt(Lt,"hostname",ie.hostname,e)}function vm(e){return jt(Lt,"hex",ie.hex,e)}function bm(e,r){let n=r?.enc??"hex",i=`${e}_${n}`,t=ie[i];if(!t)throw new Error(`Unrecognized hash format: ${i}`);return jt(Lt,i,t,r)}var Ct=p("ZodNumber",(e,r)=>{zn.init(e,r),S.init(e,r),e._zod.processJSONSchema=(i,t,o)=>Nc(e,i,t,o),kr(e,"ZodNumber",{gt(i,t){return this.check(ve(i,t))},gte(i,t){return this.check(H(i,t))},min(i,t){return this.check(H(i,t))},lt(i,t){return this.check(he(i,t))},lte(i,t){return this.check(oe(i,t))},max(i,t){return this.check(oe(i,t))},int(i){return this.check(vi(i))},safe(i){return this.check(vi(i))},positive(i){return this.check(ve(0,i))},nonnegative(i){return this.check(H(0,i))},negative(i){return this.check(he(0,i))},nonpositive(i){return this.check(oe(0,i))},multipleOf(i,t){return this.check(Re(i,t))},step(i,t){return this.check(Re(i,t))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function Dl(e){return rc(Ct,e)}var it=p("ZodNumberFormat",(e,r)=>{ls.init(e,r),Ct.init(e,r)});function vi(e){return ic(it,e)}function xm(e){return oc(it,e)}function ym(e){return ac(it,e)}function $m(e){return sc(it,e)}function _m(e){return cc(it,e)}var Rt=p("ZodBoolean",(e,r)=>{dr.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Zc(e,n,i,t)});function Nl(e){return lc(Rt,e)}var Mt=p("ZodBigInt",(e,r)=>{In.init(e,r),S.init(e,r),e._zod.processJSONSchema=(i,t,o)=>Ac(e,i,t,o),e.gte=(i,t)=>e.check(H(i,t)),e.min=(i,t)=>e.check(H(i,t)),e.gt=(i,t)=>e.check(ve(i,t)),e.gte=(i,t)=>e.check(H(i,t)),e.min=(i,t)=>e.check(H(i,t)),e.lt=(i,t)=>e.check(he(i,t)),e.lte=(i,t)=>e.check(oe(i,t)),e.max=(i,t)=>e.check(oe(i,t)),e.positive=i=>e.check(ve(BigInt(0),i)),e.negative=i=>e.check(he(BigInt(0),i)),e.nonpositive=i=>e.check(oe(BigInt(0),i)),e.nonnegative=i=>e.check(H(BigInt(0),i)),e.multipleOf=(i,t)=>e.check(Re(i,t));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function km(e){return dc(Mt,e)}var Zi=p("ZodBigIntFormat",(e,r)=>{us.init(e,r),Mt.init(e,r)});function wm(e){return fc(Zi,e)}function Sm(e){return mc(Zi,e)}var Zl=p("ZodSymbol",(e,r)=>{ds.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Lc(e,n,i,t)});function zm(e){return gc(Zl,e)}var Al=p("ZodUndefined",(e,r)=>{ps.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Rc(e,n,i,t)});function Im(e){return hc(Al,e)}var Ll=p("ZodNull",(e,r)=>{fs.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Cc(e,n,i,t)});function Cl(e){return vc(Ll,e)}var Rl=p("ZodAny",(e,r)=>{ms.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Vc(e,n,i,t)});function Tm(){return bc(Rl)}var Ml=p("ZodUnknown",(e,r)=>{gs.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Jc(e,n,i,t)});function nt(){return xc(Ml)}var Fl=p("ZodNever",(e,r)=>{hs.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Fc(e,n,i,t)});function Ai(e){return yc(Fl,e)}var Vl=p("ZodVoid",(e,r)=>{vs.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Mc(e,n,i,t)});function Pm(e){return $c(Vl,e)}var Sr=p("ZodDate",(e,r)=>{bs.init(e,r),S.init(e,r),e._zod.processJSONSchema=(i,t,o)=>Bc(e,i,t,o),e.min=(i,t)=>e.check(H(i,t)),e.max=(i,t)=>e.check(oe(i,t));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function Em(e){return _c(Sr,e)}var Jl=p("ZodArray",(e,r)=>{xs.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>nl(e,n,i,t),e.element=r.element,kr(e,"ZodArray",{min(n,i){return this.check(ke(n,i))},nonempty(n){return this.check(ke(1,n))},max(n,i){return this.check(tt(n,i))},length(n,i){return this.check(rt(n,i))},unwrap(){return this.element}})});function zr(e,r){return Sc(Jl,e,r)}function Om(e){let r=e._zod.def.shape;return Ci(Object.keys(r))}var Ir=p("ZodObject",(e,r)=>{ys.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>il(e,n,i,t),b.defineLazy(e,"shape",()=>r.shape),kr(e,"ZodObject",{keyof(){return Ci(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:nt()})},loose(){return this.clone({...this._zod.def,catchall:nt()})},strict(){return this.clone({...this._zod.def,catchall:Ai()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return b.extend(this,n)},safeExtend(n){return b.safeExtend(this,n)},merge(n){return b.merge(this,n)},pick(n){return b.pick(this,n)},omit(n){return b.omit(this,n)},partial(...n){return b.partial(Mi,this,n[0])},required(...n){return b.required(Fi,this,n[0])}})});function jm(e,r){let n={type:"object",shape:e??{},...b.normalizeParams(r)};return new Ir(n)}function Um(e,r){return new Ir({type:"object",shape:e,catchall:Ai(),...b.normalizeParams(r)})}function Dm(e,r){return new Ir({type:"object",shape:e,catchall:nt(),...b.normalizeParams(r)})}var Tr=p("ZodUnion",(e,r)=>{pr.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ci(e,n,i,t),e.options=r.options});function Li(e,r){return new Tr({type:"union",options:e,...b.normalizeParams(r)})}var Bl=p("ZodXor",(e,r)=>{Tr.init(e,r),$s.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ci(e,n,i,t),e.options=r.options});function Nm(e,r){return new Bl({type:"union",options:e,inclusive:!1,...b.normalizeParams(r)})}var Wl=p("ZodDiscriminatedUnion",(e,r)=>{Tr.init(e,r),_s.init(e,r)});function Zm(e,r,n){return new Wl({type:"union",options:r,discriminator:e,...b.normalizeParams(n)})}var ql=p("ZodIntersection",(e,r)=>{ks.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ol(e,n,i,t)});function Gl(e,r){return new ql({type:"intersection",left:e,right:r})}var Kl=p("ZodTuple",(e,r)=>{Tn.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>al(e,n,i,t),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Hl(e,r,n){let i=r instanceof k,t=i?n:r,o=i?r:null;return new Kl({type:"tuple",items:e,rest:o,...b.normalizeParams(t)})}var Nt=p("ZodRecord",(e,r)=>{ws.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>sl(e,n,i,t),e.keyType=r.keyType,e.valueType=r.valueType});function Xl(e,r,n){return!r||!r._zod?new Nt({type:"record",keyType:xr(),valueType:e,...b.normalizeParams(r)}):new Nt({type:"record",keyType:e,valueType:r,...b.normalizeParams(n)})}function Am(e,r,n){let i=G(e);return i._zod.values=void 0,new Nt({type:"record",keyType:i,valueType:r,...b.normalizeParams(n)})}function Lm(e,r,n){return new Nt({type:"record",keyType:e,valueType:r,mode:"loose",...b.normalizeParams(n)})}var Yl=p("ZodMap",(e,r)=>{Ss.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>tl(e,n,i,t),e.keyType=r.keyType,e.valueType=r.valueType,e.min=(...n)=>e.check(be(...n)),e.nonempty=n=>e.check(be(1,n)),e.max=(...n)=>e.check(Me(...n)),e.size=(...n)=>e.check(et(...n))});function Cm(e,r,n){return new Yl({type:"map",keyType:e,valueType:r,...b.normalizeParams(n)})}var Ql=p("ZodSet",(e,r)=>{zs.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>rl(e,n,i,t),e.min=(...n)=>e.check(be(...n)),e.nonempty=n=>e.check(be(1,n)),e.max=(...n)=>e.check(Me(...n)),e.size=(...n)=>e.check(et(...n))});function Rm(e,r){return new Ql({type:"set",valueType:e,...b.normalizeParams(r)})}var Zt=p("ZodEnum",(e,r)=>{Is.init(e,r),S.init(e,r),e._zod.processJSONSchema=(i,t,o)=>Wc(e,i,t,o),e.enum=r.entries,e.options=Object.values(r.entries);let n=new Set(Object.keys(r.entries));e.extract=(i,t)=>{let o={};for(let a of i)if(n.has(a))o[a]=r.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Zt({...r,checks:[],...b.normalizeParams(t),entries:o})},e.exclude=(i,t)=>{let o={...r.entries};for(let a of i)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new Zt({...r,checks:[],...b.normalizeParams(t),entries:o})}});function Ci(e,r){let n=Array.isArray(e)?Object.fromEntries(e.map(i=>[i,i])):e;return new Zt({type:"enum",entries:n,...b.normalizeParams(r)})}function Mm(e,r){return new Zt({type:"enum",entries:e,...b.normalizeParams(r)})}var eu=p("ZodLiteral",(e,r)=>{Ts.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>qc(e,n,i,t),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function Fm(e,r){return new eu({type:"literal",values:Array.isArray(e)?e:[e],...b.normalizeParams(r)})}var tu=p("ZodFile",(e,r)=>{Ps.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Hc(e,n,i,t),e.min=(n,i)=>e.check(be(n,i)),e.max=(n,i)=>e.check(Me(n,i)),e.mime=(n,i)=>e.check(zt(Array.isArray(n)?n:[n],i))});function Vm(e){return zc(tu,e)}var ru=p("ZodTransform",(e,r)=>{Es.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>el(e,n,i,t),e._zod.parse=(n,i)=>{if(i.direction==="backward")throw new Ne(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(b.issue(o,n.value,r));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(b.issue(a))}};let t=r.transform(n.value,n);return t instanceof Promise?t.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=t,n.fallback=!0,n)}});function Ri(e){return new ru({type:"transform",transform:e})}var Mi=p("ZodOptional",(e,r)=>{Pn.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>li(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function $r(e){return new Mi({type:"optional",innerType:e})}var nu=p("ZodExactOptional",(e,r)=>{Os.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>li(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function iu(e){return new nu({type:"optional",innerType:e})}var ou=p("ZodNullable",(e,r)=>{js.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>cl(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function _r(e){return new ou({type:"nullable",innerType:e})}function Jm(e){return $r(_r(e))}var au=p("ZodDefault",(e,r)=>{Us.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ul(e,n,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function su(e,r){return new au({type:"default",innerType:e,get defaultValue(){return typeof r=="function"?r():b.shallowClone(r)}})}var cu=p("ZodPrefault",(e,r)=>{Ds.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>dl(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function lu(e,r){return new cu({type:"prefault",innerType:e,get defaultValue(){return typeof r=="function"?r():b.shallowClone(r)}})}var Fi=p("ZodNonOptional",(e,r)=>{Ns.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ll(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function uu(e,r){return new Fi({type:"nonoptional",innerType:e,...b.normalizeParams(r)})}var du=p("ZodSuccess",(e,r)=>{Zs.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Xc(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Bm(e){return new du({type:"success",innerType:e})}var pu=p("ZodCatch",(e,r)=>{As.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>pl(e,n,i,t),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function fu(e,r){return new pu({type:"catch",innerType:e,catchValue:typeof r=="function"?r:()=>r})}var mu=p("ZodNaN",(e,r)=>{Ls.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Gc(e,n,i,t)});function Wm(e){return wc(mu,e)}var Pr=p("ZodPipe",(e,r)=>{En.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>fl(e,n,i,t),e.in=r.in,e.out=r.out});function bi(e,r){return new Pr({type:"pipe",in:e,out:r})}var Er=p("ZodCodec",(e,r)=>{Pr.init(e,r),fr.init(e,r)});function qm(e,r,n){return new Er({type:"pipe",in:e,out:r,transform:n.decode,reverseTransform:n.encode})}function Gm(e){let r=e._zod.def;return new Er({type:"pipe",in:r.out,out:r.in,transform:r.reverseTransform,reverseTransform:r.transform})}var gu=p("ZodPreprocess",(e,r)=>{Pr.init(e,r),Cs.init(e,r)}),hu=p("ZodReadonly",(e,r)=>{Rs.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>ml(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function vu(e){return new hu({type:"readonly",innerType:e})}var bu=p("ZodTemplateLiteral",(e,r)=>{Ms.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Kc(e,n,i,t)});function Km(e,r){return new bu({type:"template_literal",parts:e,...b.normalizeParams(r)})}var xu=p("ZodLazy",(e,r)=>{Js.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>hl(e,n,i,t),e.unwrap=()=>e._zod.def.getter()});function yu(e){return new xu({type:"lazy",getter:e})}var $u=p("ZodPromise",(e,r)=>{Vs.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>gl(e,n,i,t),e.unwrap=()=>e._zod.def.innerType});function Hm(e){return new $u({type:"promise",innerType:e})}var _u=p("ZodFunction",(e,r)=>{Fs.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Qc(e,n,i,t)});function Xm(e){return new _u({type:"function",input:Array.isArray(e?.input)?Hl(e?.input):e?.input??zr(nt()),output:e?.output??nt()})}var Or=p("ZodCustom",(e,r)=>{Bs.init(e,r),S.init(e,r),e._zod.processJSONSchema=(n,i,t)=>Yc(e,n,i,t)});function Ym(e){let r=new Z({check:"custom"});return r._zod.check=e,r}function Qm(e,r){return Ic(Or,e??(()=>!0),r)}function ku(e,r={}){return Tc(Or,e,r)}function wu(e,r){return Pc(e,r)}var eg=Ec,tg=Oc;function rg(e,r={}){let n=new Or({type:"custom",check:"custom",fn:i=>i instanceof e,abort:!0,...b.normalizeParams(r)});return n._zod.bag.Class=e,n._zod.check=i=>{i.value instanceof e||i.issues.push({code:"invalid_type",expected:e.name,input:i.value,inst:n,path:[...n._zod.def.path??[]]})},n}var ng=(...e)=>jc({Codec:Er,Boolean:Rt,String:At},...e);function ig(e){let r=yu(()=>Li([xr(e),Dl(),Nl(),Cl(),zr(r),Xl(xr(),r)]));return r}function og(e,r){return new gu({type:"pipe",in:Ri(e),out:r})}var s$={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function c$(e){C({customError:e})}function l$(){return C().customError}var Su;Su||(Su={});var _={...br,...pi,iso:Dt},u$=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function d$(e,r){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":r??"draft-2020-12"}function p$(e,r){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return r.rootSchema;let i=r.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===i){let t=n[1];if(!t||!r.defs[t])throw new Error(`Reference not found: ${e}`);return r.defs[t]}throw new Error(`Reference not found: ${e}`)}function ag(e,r){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return _.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let t=e.$ref;if(r.refs.has(t))return r.refs.get(t);if(r.processing.has(t))return _.lazy(()=>{if(!r.refs.has(t))throw new Error(`Circular reference not resolved: ${t}`);return r.refs.get(t)});r.processing.add(t);let o=p$(t,r),a=B(o,r);return r.refs.set(t,a),r.processing.delete(t),a}if(e.enum!==void 0){let t=e.enum;if(r.version==="openapi-3.0"&&e.nullable===!0&&t.length===1&&t[0]===null)return _.null();if(t.length===0)return _.never();if(t.length===1)return _.literal(t[0]);if(t.every(a=>typeof a=="string"))return _.enum(t);let o=t.map(a=>_.literal(a));return o.length<2?o[0]:_.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return _.literal(e.const);let n=e.type;if(Array.isArray(n)){let t=n.map(o=>{let a={...e,type:o};return ag(a,r)});return t.length===0?_.never():t.length===1?t[0]:_.union(t)}if(!n)return _.any();let i;switch(n){case"string":{let t=_.string();if(e.format){let o=e.format;o==="email"?t=t.check(_.email()):o==="uri"||o==="uri-reference"?t=t.check(_.url()):o==="uuid"||o==="guid"?t=t.check(_.uuid()):o==="date-time"?t=t.check(_.iso.datetime()):o==="date"?t=t.check(_.iso.date()):o==="time"?t=t.check(_.iso.time()):o==="duration"?t=t.check(_.iso.duration()):o==="ipv4"?t=t.check(_.ipv4()):o==="ipv6"?t=t.check(_.ipv6()):o==="mac"?t=t.check(_.mac()):o==="cidr"?t=t.check(_.cidrv4()):o==="cidr-v6"?t=t.check(_.cidrv6()):o==="base64"?t=t.check(_.base64()):o==="base64url"?t=t.check(_.base64url()):o==="e164"?t=t.check(_.e164()):o==="jwt"?t=t.check(_.jwt()):o==="emoji"?t=t.check(_.emoji()):o==="nanoid"?t=t.check(_.nanoid()):o==="cuid"?t=t.check(_.cuid()):o==="cuid2"?t=t.check(_.cuid2()):o==="ulid"?t=t.check(_.ulid()):o==="xid"?t=t.check(_.xid()):o==="ksuid"&&(t=t.check(_.ksuid()))}typeof e.minLength=="number"&&(t=t.min(e.minLength)),typeof e.maxLength=="number"&&(t=t.max(e.maxLength)),e.pattern&&(t=t.regex(new RegExp(e.pattern))),i=t;break}case"number":case"integer":{let t=n==="integer"?_.number().int():_.number();typeof e.minimum=="number"&&(t=t.min(e.minimum)),typeof e.maximum=="number"&&(t=t.max(e.maximum)),typeof e.exclusiveMinimum=="number"?t=t.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(t=t.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?t=t.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(t=t.lt(e.maximum)),typeof e.multipleOf=="number"&&(t=t.multipleOf(e.multipleOf)),i=t;break}case"boolean":{i=_.boolean();break}case"null":{i=_.null();break}case"object":{let t={},o=e.properties||{},a=new Set(e.required||[]);for(let[c,l]of Object.entries(o)){let u=B(l,r);t[c]=a.has(c)?u:u.optional()}if(e.propertyNames){let c=B(e.propertyNames,r),l=e.additionalProperties&&typeof e.additionalProperties=="object"?B(e.additionalProperties,r):_.any();if(Object.keys(t).length===0){i=_.record(c,l);break}let u=_.object(t).passthrough(),d=_.looseRecord(c,l);i=_.intersection(u,d);break}if(e.patternProperties){let c=e.patternProperties,l=Object.keys(c),u=[];for(let f of l){let g=B(c[f],r),x=_.string().regex(new RegExp(f));u.push(_.looseRecord(x,g))}let d=[];if(Object.keys(t).length>0&&d.push(_.object(t).passthrough()),d.push(...u),d.length===0)i=_.object({}).passthrough();else if(d.length===1)i=d[0];else{let f=_.intersection(d[0],d[1]);for(let g=2;gB(c,r)),s=o&&typeof o=="object"&&!Array.isArray(o)?B(o,r):void 0;s?i=_.tuple(a).rest(s):i=_.tuple(a),typeof e.minItems=="number"&&(i=i.check(_.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(_.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(c=>B(c,r)),s=e.additionalItems&&typeof e.additionalItems=="object"?B(e.additionalItems,r):void 0;s?i=_.tuple(a).rest(s):i=_.tuple(a),typeof e.minItems=="number"&&(i=i.check(_.minLength(e.minItems))),typeof e.maxItems=="number"&&(i=i.check(_.maxLength(e.maxItems)))}else if(o!==void 0){let a=B(o,r),s=_.array(a);typeof e.minItems=="number"&&(s=s.min(e.minItems)),typeof e.maxItems=="number"&&(s=s.max(e.maxItems)),i=s}else i=_.array(_.any());break}default:throw new Error(`Unsupported type: ${n}`)}return i}function B(e,r){if(typeof e=="boolean")return e?_.any():_.never();let n=ag(e,r),i=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let s=e.anyOf.map(l=>B(l,r)),c=_.union(s);n=i?_.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let s=e.oneOf.map(l=>B(l,r)),c=_.xor(s);n=i?_.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=i?n:_.any();else{let s=i?n:B(e.allOf[0],r),c=i?0:1;for(let l=c;l0&&r.registry.add(n,t),e.description&&(n=n.describe(e.description)),n}function sg(e,r){if(typeof e=="boolean")return e?_.any():_.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let i=d$(n,r?.defaultTarget),t=n.$defs||n.definitions||{},o={version:i,defs:t,refs:new Map,processing:new Set,rootSchema:n,registry:r?.registry??V};return B(n,o)}var zu={};$e(zu,{bigint:()=>h$,boolean:()=>g$,date:()=>v$,number:()=>m$,string:()=>f$});function f$(e){return Ks(At,e)}function m$(e){return nc(Ct,e)}function g$(e){return uc(Rt,e)}function h$(e){return pc(Mt,e)}function v$(e){return kc(Sr,e)}C(On());var wS=Ft.object({name:Ft.string().trim().min(1).max(120),email:Ft.string().trim().max(254).email().transform(e=>e.toLowerCase())});var Iu="I have signed in with my store account. Continue what I asked for before signing in.";var cg="I want to open a support request for email follow-up.";function j(e){let r=document.querySelector(e);if(!r)throw new Error(`Voice support element missing: ${e}`);return r}var $={app:j("#support-app"),thread:j("#thread"),transcript:j("#transcript"),landingPanel:j("#landing-panel"),landingForm:j("#landing-form"),landingInput:j("#landing-input"),landingSubmit:j("#landing-submit"),landingMicButton:j("#landing-mic-button"),humanHelpButton:j("#human-help-button"),conversationHumanButton:j("#conversation-human-button"),landingStatusCopy:j("#landing-status-copy"),composerBar:j("#composer-bar"),signinFlow:j("#signin-flow"),signinLead:j("#signin-card-lead"),signinCopy:j("#signin-card-copy"),signinButton:j("#signin-button"),sessionTurnstile:j("#session-turnstile"),reconnectBanner:j("#reconnect-banner"),clearButton:j("#clear-button"),micButton:j("#mic-button"),muteButton:j("#mute-button"),textForm:j("#text-form"),textInput:j("#text-input"),textSubmit:j('#text-form button[type="submit"]'),handoffCard:j("#handoff-card"),handoffCategory:j("#handoff-category"),handoffDescription:j("#handoff-description"),handoffReference:j("#handoff-reference"),handoffStatus:j("#handoff-status")},pg=[...document.querySelectorAll("[data-support-message]")],Vi=$.app.dataset.voiceInput!=="unavailable",Eu="able-voice-support-reset-focus",Ou="able-signin-resume-session",Zu=new URLSearchParams(window.location.search).has("signed_in");function b$(){if(Zu)try{let e=sessionStorage.getItem(Ou);if(sessionStorage.removeItem(Ou),e&&/^voice-[a-z0-9]{20}$/.test(e))return e}catch{}return`voice-${crypto.randomUUID().replaceAll("-","").slice(0,20)}`}var fg=b$();Zu&&history.replaceState(null,"",window.location.pathname);var U=new Gu({agent:"AbleDeskAgent",name:fg,preferredFormat:"mp3"}),Cr=!1,qi=!1,ne=!1,Bt=!1,lg=Zu,Au=null,R=[],mg=new Set,jr=[],Vt=[],Ur=[],ot=null,ye=null,Dr="",Lr=!1,Y=null,ze=!1,Jt=!1,Gi=!1,Bi=null,Nr=null,Zr=null,Ar=null,x$=window.matchMedia("(prefers-reduced-motion: reduce)"),Ki=new AbortController;function Rr(){let e=$.app.dataset.view==="conversation"&&vg(),r=window.visualViewport,n=Math.max(1,Math.round(r?.height??window.innerHeight)),i=Math.max(0,Math.round(r?.offsetTop??0));document.documentElement.style.setProperty("--support-viewport-height",`${n}px`),document.documentElement.style.setProperty("--support-viewport-top",`${i}px`),e&&requestAnimationFrame(()=>{requestAnimationFrame(()=>{$.thread.scrollTop=$.thread.scrollHeight})})}window.addEventListener("resize",Rr,{signal:Ki.signal});window.visualViewport?.addEventListener("resize",Rr,{signal:Ki.signal});window.visualViewport?.addEventListener("scroll",Rr,{signal:Ki.signal});Rr();function Hi(){return Cr&&Bt}function Se(e,r){$.app.dataset.connection=e,$.landingStatusCopy.textContent=r}function ju(){Nr!==null&&(clearTimeout(Nr),Nr=null)}function Uu(){ju(),Nr=setTimeout(()=>{Nr=null,!Hi()&&Se(qi?"verifying":"connecting","Still connecting \u2014 you can ask now. Your question will send automatically.")},1200)}function Xi(){Jt=!1,Zr!==null&&clearTimeout(Zr),Ar!==null&&clearTimeout(Ar),Zr=null,Ar=null}function gg(){Xi(),Gi=!1,Jt=!0,Zr=setTimeout(()=>{Zr=null,Jt&&Wt("Ava is checking this now \u2014 some answers take a little longer.")},6e3),Ar=setTimeout(()=>{Ar=null,Jt&&Wt("This is taking longer than usual. You can try again or contact support.")},18e3)}function hg(){try{sessionStorage.setItem(Eu,"1")}catch{}window.location.reload()}function y$(){try{return sessionStorage.getItem(Eu)!=="1"?!1:(sessionStorage.removeItem(Eu),!0)}catch{return!1}}function vg(){let e=$.thread;return e.scrollHeight-e.scrollTop-e.clientHeight<120}function Lu(){$.thread.scrollTo({top:$.thread.scrollHeight,behavior:x$.matches?"auto":"smooth"})}function Yi(e){let r=document.createElement("span");return r.className="sr-only",r.textContent=e,r}function $$(e){let r=e.role==="assistant",n=document.createElement("li");n.className=`answer-turn answer-turn--${r?"assistant":"user"}`;let i=document.createElement("p");i.className="turn-label",i.textContent=r?"Ava":"You";let t=document.createElement("div");t.className="turn-copy";let o=document.createElement(r?"div":"h2");return r?cp(o,e.text):o.textContent=e.text,t.append(Yi(r?"Ava: ":"You: "),o),n.append(i,t),n}function _$(e){let r=document.createElement("li");r.className="answer-turn answer-turn--user answer-turn--pending";let n=document.createElement("p");n.className="turn-label",n.textContent="You, speaking";let i=document.createElement("div");i.className="turn-copy";let t=document.createElement("p");return t.textContent=e,i.append(Yi("You, speaking: "),t),r.append(n,i),r}function k$(e){let r=document.createElement("li");r.className="answer-turn answer-turn--user answer-turn--pending";let n=document.createElement("p");n.className="turn-label",n.textContent="You";let i=document.createElement("div");i.className="turn-copy";let t=document.createElement("h2");return t.textContent=e,i.append(Yi("You: "),t),r.append(n,i),r}function ug(e="Ava is working on this\u2026"){let r=document.createElement("li");r.className="answer-turn answer-turn--assistant";let n=document.createElement("p");n.className="turn-label",n.textContent="Ava";let i=document.createElement("div");i.className="turn-copy typing-bubble";let t=document.createElement("span");t.className="typing-dots",t.setAttribute("aria-hidden","true"),t.append(document.createElement("span"),document.createElement("span"),document.createElement("span"));let o=document.createElement("span");o.className="typing-static",o.setAttribute("aria-hidden","true"),o.textContent="\u2026";let a=document.createElement("span");return a.className="typing-copy",a.setAttribute("aria-hidden","true"),a.textContent=e,i.append(t,o,a,Yi(e)),r.append(n,i),r}function w$(e){let r=document.createElement("li");return r.className="system-note",r.textContent=e,r}function S$(e,r,n){let i=document.createElement("li");i.className="sources-row";let t=document.createElement("details");t.className="sources-card",t.dataset.anchor=String(e),t.open=n;let o=document.createElement("summary");o.textContent=`Based on (${r.length})`,t.append(o);let a=document.createElement("div");a.className="sources-list";for(let u of r){let d=document.createElement("a");d.className="source-chip",d.href=u.url,d.target="_blank",d.rel="noopener";let f=document.createElement("span");f.textContent=u.title;let g=document.createElement("small");g.textContent=u.section,d.append(f,g),a.append(d)}t.append(a);let s=document.createElement("div");s.className="follow-up-prompts";let c=document.createElement("p");c.textContent="You can also ask";let l=document.createElement("div");l.className="follow-up-list";for(let u of r.slice(0,2)){let d=document.createElement("button");d.className="follow-up-chip",d.type="button",d.textContent=`Tell me more about ${u.title}`,d.addEventListener("click",()=>Mr(`Tell me more about "${u.title}".`)),l.append(d)}return s.append(c,l),i.append(t,s),i}function z$(e){let r=document.createElement("li");r.className="products-row";let n=document.createElement("div");n.className="product-results",n.setAttribute("aria-label","Products from the storefront");for(let i of e){let t=document.createElement(i.url?"a":"article");if(t.className="product-result",t instanceof HTMLAnchorElement&&i.url&&(t.href=i.url,t.target="_blank",t.rel="noopener"),i.image){let l=document.createElement("img");l.src=i.image.url,l.alt=i.image.altText,l.loading="lazy",t.append(l)}let o=document.createElement("span");o.className="product-result-copy";let a=document.createElement("strong");a.textContent=i.title;let s=document.createElement("span");s.textContent=i.price;let c=document.createElement("small");c.textContent=i.availableForSale?"Available":"Currently unavailable",o.append(a,s,c),t.append(o),n.append(t)}return r.append(n),r}function Ie(e,r=!1){Rr(),$.app.dataset.view=e?"conversation":"landing",document.documentElement.classList.toggle("support-conversation",e),document.body.classList.toggle("support-conversation",e),$.landingPanel.hidden=e,$.transcript.hidden=!e,$.composerBar.hidden=!e,$.clearButton.hidden=!e,r&&(e?$.textInput:$.landingInput).focus()}function Du(){return R.at(-1)?.role==="assistant"?R.length:R.length+1}function Tu(e){if(typeof e!="string")return null;if(e.startsWith("/")&&!e.startsWith("//"))return e;try{let r=new URL(e);return r.protocol==="https:"||r.origin===window.location.origin?r.toString():null}catch{return null}}function Q(){(R.length>0||Dr||Lr||ye!==null||ot!==null)&&Ie(!0);let e=vg(),r=R.length,n=new Map([...$.transcript.querySelectorAll(".sources-card")].map(o=>[Number(o.dataset.anchor),o.open]).filter(([o])=>Number.isFinite(o))),i=[],t=o=>{for(let a of jr)a.anchor<=r&&a.anchor===o&&i.push(w$(a.text));for(let a of Vt)a.anchor<=r&&a.anchor===o&&i.push(S$(a.anchor,a.articles,n.get(a.anchor)??!0));for(let a of Ur)a.anchor<=r&&a.anchor===o&&i.push(z$(a.items));ye!==null&&ye<=r&&ye===o&&($.signinFlow.hidden=!1,i.push($.signinFlow)),ot!==null&&ot<=r&&ot===o&&($.handoffCard.hidden=!1,i.push($.handoffCard))};for(let o=0;oo.role==="user"&&o.text===Y)&&i.push(k$(Y)),Y!==null&&!ze?i.push(ug("Connecting securely\u2026")):Lr&&i.push(ug()),$.transcript.replaceChildren(...i),e&&Lu()}function Wt(e){let r=jr[jr.length-1];r&&r.text===e&&r.anchor===R.length||(jr.push({anchor:R.length,text:e}),Q())}function pe(e){let r=!1;if(e==="idle"){for(let a of Vt)a.anchor>R.length&&(a.anchor=R.length,r=!0);ye!==null&&ye>R.length&&(ye=R.length,r=!0)}let n=!ne&&e!=="idle",i=Hi(),t=Y===null;$.micButton.disabled=!Vi||!i||n,$.landingMicButton.disabled=!Vi||!i||n;for(let a of[$.micButton,$.landingMicButton])a.classList.toggle("mic-button--active",ne),a.setAttribute("aria-label",ne?"Stop voice":Vi?"Use voice":"Voice requires a deployed preview"),a.setAttribute("aria-pressed",String(ne)),a.title=ne?"Stop the voice call":Vi?"Talk instead of typing":"Streaming voice is available on deployed Workers";$.muteButton.hidden=!ne,$.muteButton.disabled=!i||!ne,$.clearButton.disabled=!1,$.app.setAttribute("aria-busy",String(Jt||e==="thinking")),$.landingInput.disabled=!1,$.landingSubmit.disabled=!t;for(let a of pg)a.disabled=!t;$.humanHelpButton.disabled=!1,$.textInput.disabled=!1,$.textSubmit.disabled=!t,$.conversationHumanButton.disabled=!t;let o=!Gi&&(e==="thinking"||Jt);o!==Lr?(Lr=o,Q()):r&&Q()}function I$(){let e=Au==="order_lookup"?{lead:"Sign in to check your order",copy:"Use your store account \u2014 a quick code by email, no password. I\u2019ll pull your orders up right after."}:{lead:"Sign in to continue",copy:"Use your store account \u2014 a quick code by email, no password. You\u2019ll come right back to this conversation."};$.signinLead.textContent=e.lead,$.signinCopy.textContent=e.copy}function T$(e){return e==="order_lookup"||e==="open_ticket"?e:null}function P$(e){Ie(!0),ye===null&&(ye=e==="after_reply"?Du():R.length),I$(),$.signinButton.disabled=!1,Q(),Lu()}function Nu(){ye=null,$.signinFlow.hidden=!0,Q()}function E$(){try{sessionStorage.setItem(Ou,fg)}catch{}$.signinButton.disabled=!0,window.location.assign("/auth/shopify/start")}function O$(){return window.turnstile}var Ji=null,Wi=null,dg=$.sessionTurnstile.dataset.sitekey??"";function Pu(e){if(!Cr){Wi=e;return}U.sendJSON({type:"start_voice_session",turnstileToken:e})}function bg(){if(Bt||!Cr)return;if(Wi!==null){let r=Wi;Wi=null,Pu(r);return}if(!dg){Pu("");return}let e=O$();if(!e){window.setTimeout(bg,200);return}if(Ji===null)try{Ji=e.render($.sessionTurnstile,{sitekey:dg,action:"voice_session",size:"flexible",appearance:"interaction-only",callback:r=>Pu(r)})}catch{Ji=null}else e.reset(Ji)}var j$={rate_limited:"Too many chat sessions from this connection. Wait a minute, then reload the page.",turnstile_not_configured:"This chat is not fully set up yet. Please try again later."};function U$(){!Hi()||Y===null||ze||(ze=!0,gg(),U.sendText(Y),Q(),pe(U.status))}function D$(e){if(!e||typeof e!="object")return;let r=e;$.handoffCategory.textContent=typeof r.label=="string"?r.label:"Support ticket opened",$.handoffDescription.textContent="A support ticket was opened under your store account. The team will follow up by email.",$.handoffReference.textContent=typeof r.reference=="string"?r.reference:"\u2014",$.handoffStatus.textContent=typeof r.status=="string"?r.status:"open",ot=R.length,Ie(!0),Q(),Lu()}function N$(e){if(!e||typeof e!="object")return;let r=e;if(r.type==="voice_session_ready"){Bt=!0,ju(),Se("ready",Y===null?"Ava is ready.":"Ava is ready \u2014 sending your question\u2026"),$.sessionTurnstile.hidden=!0,pe(U.status),U$(),lg&&(lg=!1,Nu(),mg.add(Iu),Ie(!0),U.sendText(Iu)),y$()&&$.landingInput.focus();return}if(r.type==="voice_session_error"||r.type==="voice_session_required"){Bt=!1,ju();let n=typeof r.reason=="string"?r.reason:"",i=j$[n]??"The anti-spam check could not be completed. Reload the page to try again.";Se("error",i),$.app.dataset.view==="conversation"&&Wt(i),pe(U.status);return}if(r.type==="voice_signin_required"){Au=T$(r.reason),P$(r.anchor==="after_reply"?"after_reply":"now");return}if(r.type==="voice_sources"){let n=(Array.isArray(r.articles)?r.articles:[]).flatMap(i=>{if(!i||typeof i!="object")return[];let t=i,o=Tu(t.url);return o&&typeof t.title=="string"&&typeof t.section=="string"?[{title:t.title,section:t.section,url:o}]:[]}).slice(0,3);if(n.length>0){let i=Du(),t=Vt.find(o=>o.anchor===i);t?t.articles=[...t.articles,...n].filter((o,a,s)=>s.findIndex(c=>c.url===o.url)===a).slice(0,3):Vt.push({anchor:i,articles:n}),Q()}return}if(r.type==="voice_products"){let n=(Array.isArray(r.products)?r.products:[]).flatMap(i=>{if(!i||typeof i!="object")return[];let t=i,o=t.priceRange&&typeof t.priceRange=="object"?t.priceRange:null,a=o?.min&&typeof o.min=="object"?o.min:null,s=o?.max&&typeof o.max=="object"?o.max:null;if(typeof t.handle!="string"||typeof t.title!="string"||typeof t.availableForSale!="boolean"||typeof a?.amount!="string"||typeof a.currencyCode!="string"||typeof s?.amount!="string")return[];let c=Tu(t.url),l=t.image&&typeof t.image=="object"?t.image:null,u=Tu(l?.url),d=new Intl.NumberFormat("en-IN",{style:"currency",currency:a.currencyCode,maximumFractionDigits:2}),f=Number(a.amount),g=Number(s.amount),x=Number.isFinite(f)&&Number.isFinite(g)?f===g?d.format(f):`${d.format(f)}\u2013${d.format(g)}`:`${a.currencyCode} ${a.amount}`;return[{handle:t.handle,title:t.title,availableForSale:t.availableForSale,price:x,url:c,image:u?{url:u,altText:typeof l?.altText=="string"?l.altText:""}:null}]}).slice(0,5);if(n.length>0){let i=Du(),t=Ur.find(o=>o.anchor===i);t?t.items=n:Ur.push({anchor:i,items:n}),Q()}return}if(r.type==="demo_session_cleared"){ot=null,Vt=[],Ur=[],$.handoffCard.hidden=!0,Nu(),Q(),Bi!==null&&(clearTimeout(Bi),Bi=null,hg());return}r.type==="voice_ticket_created"&&D$(r.ticket)}U.addEventListener("connectionchange",e=>{Cr=e,e?(qi=!0,$.reconnectBanner.hidden=!0,Bt=!1,$.sessionTurnstile.hidden=!1,Se("verifying","Secure connection found \u2014 finishing setup\u2026"),Uu(),bg()):(ne=!1,Bt=!1,qi?($.reconnectBanner.hidden=!1,Se("reconnecting","Connection interrupted. Your question will send when Ava is back.")):Se("connecting","Ava is getting ready \u2014 you can ask now."),Uu()),pe(U.status)});U.addEventListener("statuschange",pe);U.addEventListener("transcriptchange",e=>{let r=e.some((i,t)=>i.role==="assistant"&&R[t]?.text!==i.text),n=e.some((i,t)=>i.role==="user"&&R[t]?.text!==i.text);R=e,n&&(Gi=!1),ze&&Y!==null&&e.some(i=>i.role==="user"&&i.text===Y)&&(Y=null,ze=!1),r&&Xi(),e.length>0&&Ie(!0),pe(U.status),Q()});U.addEventListener("interimtranscript",e=>{Dr=e??"",Q()});U.addEventListener("mutechange",e=>{$.muteButton.textContent=e?"Unmute":"Mute"});U.addEventListener("custommessage",N$);U.addEventListener("error",e=>{if(!e)return;Xi(),Gi=!0,ze&&(Y=null,ze=!1);let r="Ava couldn\u2019t finish that answer. Please try again, or contact support if it keeps happening.";$.app.dataset.view==="landing"?Se("error",r):Wt(r),pe(U.status),Q()});async function xg(){ne?(U.endCall(),ne=!1,Wt("Voice off")):(Ie(!0),await U.startCall(),ne=!0,Wt("Voice on \u2014 speak naturally")),pe(U.status)}$.micButton.addEventListener("click",xg);$.landingMicButton.addEventListener("click",xg);$.muteButton.addEventListener("click",()=>U.toggleMute());$.signinButton.addEventListener("click",E$);$.clearButton.addEventListener("click",()=>{ne&&U.endCall(),ne=!1,Xi(),Y=null,ze=!1,$.clearButton.disabled=!0,U.sendJSON({type:"clear_demo_session"}),Bi=setTimeout(hg,2e3),R=[],jr=[],Vt=[],Ur=[],ot=null,$.handoffCard.hidden=!0,Nu(),Dr="",Lr=!1,$.landingInput.value="",$.textInput.value="",Au=null,Ie(!1,!0),Q(),pe(U.status)});function Mr(e){return!e||Y!==null?!1:(Ie(!0),Hi()?(gg(),U.sendText(e)):(Y=e,ze=!1,Se(Cr?"verifying":qi?"reconnecting":"connecting","Your question is saved and will send as soon as Ava is ready.")),pe(U.status),Q(),!0)}function Z$(){$.landingInput.placeholder="Briefly describe what you need help with",$.landingStatusCopy.textContent="Describe the issue first. Ava will ask you to sign in only if a private request is needed.",$.landingInput.focus()}function A$(){let e=[...R].reverse().find(r=>r.role==="user")?.text.trim();if(!e){$.textInput.placeholder="Briefly describe what you need help with",$.textInput.focus();return}Mr(`${cg} My issue is: ${e}`)}$.landingForm.addEventListener("submit",e=>{e.preventDefault();let r=$.landingInput.value.trim();r&&($.landingInput.blur(),Mr(r)&&($.landingInput.value=""))});$.humanHelpButton.addEventListener("click",()=>{Z$()});for(let e of pg)e.addEventListener("click",()=>{let r=e.dataset.supportMessage;r&&Mr(r)});$.conversationHumanButton.addEventListener("click",()=>{A$()});$.textForm.addEventListener("submit",e=>{e.preventDefault();let r=$.textInput.value.trim();r&&Mr(r)&&($.textInput.value="")});window.addEventListener("beforeunload",()=>{Ki.abort(),ne&&U.endCall(),U.disconnect()});pe(U.status);Ie(!1);Se("connecting","Ava is getting ready \u2014 you can ask now.");Uu();U.connect();})(); diff --git a/apps/desk/scripts/local-parity-seed.sql b/apps/desk/scripts/local-parity-seed.sql new file mode 100644 index 0000000..63ffa18 --- /dev/null +++ b/apps/desk/scripts/local-parity-seed.sql @@ -0,0 +1,52 @@ +PRAGMA foreign_keys = ON; + +-- Local-only readiness data for the browser assistant. These reserved example +-- addresses cannot deliver email and contain no tenant or customer data. +UPDATE workspace_settings +SET display_name = CASE + WHEN trim(display_name) = '' THEN 'Able Desk' + ELSE display_name + END, + portal_title = 'How can we help?', + support_email = 'support@example.test', + outbound_sender = 'support@example.test', + portal_base_url = 'http://127.0.0.1:8787', + public_intake_enabled = 1, + email_tested_at = '2026-01-01T00:00:00.000Z', + setup_completed_at = '2026-01-01T00:00:00.000Z', + updated_at = CURRENT_TIMESTAMP +WHERE id = 1; + +INSERT INTO kb_sections + (id, slug, name, description, sort_order, created_at, updated_at) +VALUES + ('local-parity-getting-started', 'getting-started', 'Getting started', + 'Neutral local fixtures for exercising grounded assistant answers.', 10, + '2026-01-01T00:00:00.000Z', '2026-01-01T00:00:00.000Z') +ON CONFLICT(id) DO UPDATE SET + name = excluded.name, + description = excluded.description, + sort_order = excluded.sort_order, + updated_at = excluded.updated_at; + +INSERT INTO kb_articles + (id, section_id, slug, title, body_markdown, excerpt, published, revision, + source_created_at, source_updated_at, created_at, updated_at) +VALUES + ('local-parity-private-links', 'local-parity-getting-started', + 'keep-your-private-request-link-safe', 'Keep your private request link safe', + 'A private request link opens one support conversation. Do not forward it or paste it into a public channel. If it is lost, use **Find a request** with the same email address and case reference.', + 'How to handle the private link for a support request.', 1, + 'local-parity-rev-1', '2026-01-01T00:00:00.000Z', + '2026-01-01T00:00:00.000Z', '2026-01-01T00:00:00.000Z', + '2026-01-01T00:00:00.000Z') +ON CONFLICT(id) DO UPDATE SET + section_id = excluded.section_id, + slug = excluded.slug, + title = excluded.title, + body_markdown = excluded.body_markdown, + excerpt = excluded.excerpt, + published = excluded.published, + revision = excluded.revision, + source_updated_at = excluded.source_updated_at, + updated_at = excluded.updated_at; diff --git a/apps/desk/scripts/local-parity-server.mjs b/apps/desk/scripts/local-parity-server.mjs new file mode 100644 index 0000000..172eed6 --- /dev/null +++ b/apps/desk/scripts/local-parity-server.mjs @@ -0,0 +1,67 @@ +#!/usr/bin/env node +import { spawn } from 'node:child_process' +import { mkdirSync } from 'node:fs' +import path from 'node:path' +import process from 'node:process' +import { fileURLToPath } from 'node:url' + +const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..') +const wrangler = process.platform === 'win32' ? 'wrangler.cmd' : 'wrangler' +const config = path.join(root, 'wrangler.jsonc') +const seed = path.join(root, 'scripts', 'local-parity-seed.sql') +const persistence = path.join(root, '.wrangler', 'local-parity') +const port = 8787 + +mkdirSync(persistence, { recursive: true }) + +function run(arguments_) { + return new Promise((resolve, reject) => { + const child = spawn(wrangler, arguments_, { + cwd: root, + env: process.env, + stdio: 'inherit', + }) + child.once('error', reject) + child.once('exit', (code, signal) => { + if (code === 0) resolve() + else reject(new Error(`wrangler ${arguments_.join(' ')} exited with ${code ?? signal}`)) + }) + }) +} + +await run(['d1', 'migrations', 'apply', 'DB', '--local', '--persist-to', persistence, '--config', config]) +await run(['d1', 'execute', 'DB', '--local', '--persist-to', persistence, '--file', seed, '--config', config]) + +console.log('Local production-like data is ready. Open http://127.0.0.1:8787/') +console.log('Text inference uses remote Workers AI; D1, R2, queues, Durable Objects, email, and customer data remain local.') +console.log('Streaming STT/TTS is unavailable through Wrangler remote bindings. Use a deployed staging or production Worker for microphone testing.') + +const server = spawn(wrangler, [ + 'dev', + '--ip', '127.0.0.1', + '--port', String(port), + '--persist-to', persistence, + '--var', 'ABLE_DEV_EMAIL:owner@example.test', + '--var', 'ABLE_VOICE_DEMO_ENABLED:1', + '--var', 'ABLE_LOCAL_VOICE_UNAVAILABLE:1', + '--config', config, +], { + cwd: root, + env: process.env, + stdio: 'inherit', +}) + +function stop(signal) { + if (!server.killed) server.kill(signal) +} + +process.on('SIGINT', () => stop('SIGINT')) +process.on('SIGTERM', () => stop('SIGTERM')) +server.once('error', (error) => { + console.error(error) + process.exitCode = 1 +}) +server.once('exit', (code, signal) => { + if (code && code !== 0) process.exitCode = code + else if (signal && !['SIGINT', 'SIGTERM'].includes(signal)) process.exitCode = 1 +}) diff --git a/apps/desk/scripts/run-voice-evals.mjs b/apps/desk/scripts/run-voice-evals.mjs index a5185e6..c0e44a9 100644 --- a/apps/desk/scripts/run-voice-evals.mjs +++ b/apps/desk/scripts/run-voice-evals.mjs @@ -102,6 +102,70 @@ try { console.log(`PASS support_scope: ${reply}`) } + const hinglishResult = await turn( + [{ role: 'user', content: 'Mujhe home espresso ke liye machine chahiye. Warranty kaise kaam karti hai?' }], + null, + { + locale: 'en-IN', + timezone: 'Asia/Kolkata', + kb: { + articles: [{ + title: 'Machine warranty', + content: 'Espresso machines include a one-year limited warranty. Keep the original invoice for a claim.', + }], + }, + }, + ) + const hinglishReply = String(hinglishResult.text ?? '') + const hinglishTools = Array.isArray(hinglishResult.toolCalls) ? hinglishResult.toolCalls : [] + assert( + hinglishTools.some((call) => call?.name === 'search_help_center'), + `Hinglish warranty question must search the help centre: ${JSON.stringify(hinglishResult)}`, + ) + assert( + /warranty/i.test(hinglishReply) && /one.year|1.year|ek saal/i.test(hinglishReply), + `Hinglish answer must preserve the grounded warranty fact: ${hinglishReply}`, + ) + assert( + /\b(?:aap|hai|ka|ki|ke|mein|liye|rakhiye|hogi|kar)\b/i.test(hinglishReply), + `Hinglish question should receive a natural Hinglish answer: ${hinglishReply}`, + ) + assertNoRepeatedSentence(hinglishReply, 'Hinglish reply') + console.log(`PASS india_hinglish_grounding: ${hinglishReply}`) + + const hinglishTroubleshooting = await turn( + [{ role: 'user', content: 'DF54 grinder clean karne ke baad start nahi ho raha. Kya check karoon?' }], + null, + { + locale: 'en-IN', + timezone: 'Asia/Kolkata', + kb: { + articles: [{ + title: 'Grinder not working after cleaning? Check the reassembly', + content: 'Unplug the grinder. Remove and reinstall the upper burr carrier, aligning its marks before locking it into place. Then reinstall the hopper and try power again.', + }], + }, + }, + ) + const troubleshootingReply = String(hinglishTroubleshooting.text ?? '') + const troubleshootingTools = Array.isArray(hinglishTroubleshooting.toolCalls) + ? hinglishTroubleshooting.toolCalls + : [] + assert( + troubleshootingTools.some((call) => call?.name === 'search_help_center'), + `Hinglish troubleshooting must search the help centre: ${JSON.stringify(hinglishTroubleshooting)}`, + ) + assert( + /burr carrier|align|marks|reinstall/i.test(troubleshootingReply), + `Hinglish troubleshooting must use the returned reassembly step: ${troubleshootingReply}`, + ) + assert( + !/no (?:direct )?guide|no information|koi (?:direct )?guide nahi|ticket (?:open|raise)/i.test(troubleshootingReply), + `A successful help result must not be described as missing: ${troubleshootingReply}`, + ) + assertNoRepeatedSentence(troubleshootingReply, 'Hinglish troubleshooting reply') + console.log(`PASS india_hinglish_troubleshooting: ${troubleshootingReply}`) + const intakeHistory = [] const intakeResults = [] intakeResults.push(await converse(intakeHistory, 'Can you open a new support')) diff --git a/apps/desk/scripts/voice-eval-worker.ts b/apps/desk/scripts/voice-eval-worker.ts index 0a8f727..7648d0c 100644 --- a/apps/desk/scripts/voice-eval-worker.ts +++ b/apps/desk/scripts/voice-eval-worker.ts @@ -3,6 +3,7 @@ import { createWorkersAI } from 'workers-ai-provider' import { z } from 'zod' import { directVoiceResponse, + isHelpCenterSupportRequest, prepareVoiceModelMessages, UNDOCUMENTED_PRODUCT_SIGNIN_ORDER_REPLY, UNDOCUMENTED_PRODUCT_SIGNIN_TICKET_REPLY, @@ -11,6 +12,8 @@ import { } from '../src/voice/conversation' import { dedupAssistantText, dedupRepeatedSentences } from '../src/voice/dedup' import { ESCALATION_CATEGORIES } from '../src/voice/escalation' +import { SIGN_IN_CONTINUATION } from '../src/voice/contact' +import { findOrderNumber } from '../src/voice/orders' type EvalEnv = { AI: Ai } @@ -44,6 +47,8 @@ export default { stream?: unknown contact?: unknown signedIn?: unknown + locale?: unknown + timezone?: unknown } | null const messages = messagesFrom(body?.messages) if (!messages) return Response.json({ error: 'invalid_messages' }, { status: 400 }) @@ -68,6 +73,54 @@ export default { : null if (directResponse) return Response.json({ text: directResponse, toolCalls: [], direct: true }) + // Production persists an ordinary ticket request as a pending escalation + // before navigating to Shopify sign-in, then opens it deterministically on + // return. Mirror that state transition here instead of asking the model to + // remember a privileged tool call after the identity boundary. + if (latest?.role === 'user' && latest.content === SIGN_IN_CONTINUATION && signedInCase && !ordersCase) { + const originalRequest = [...messages] + .reverse() + .find((message) => message.role === 'user' && message.content !== SIGN_IN_CONTINUATION) + const caseNotes = String(originalRequest?.content ?? 'Customer requested support after signing in.') + return Response.json({ + text: 'I’ve opened support ticket EVAL-101. A support team member will follow up with you.', + toolCalls: [{ + name: 'create_ticket', + input: { internalSummary: 'Signed-in support request', caseNotes }, + }], + direct: true, + }) + } + + if (latest?.role === 'user' && latest.content === SIGN_IN_CONTINUATION && signedInCase && ordersCase) { + const history = messages + .filter((message) => message.content !== SIGN_IN_CONTINUATION) + .map((message) => ({ role: message.role as 'user' | 'assistant', content: String(message.content) })) + const orderNumber = findOrderNumber(history) + const fixtures = Array.isArray(ordersCase.fixtures) ? ordersCase.fixtures : [] + if (orderNumber) { + const normalized = orderNumber.replace(/\s+/g, '').replace(/^#/, '').toUpperCase() + const match = fixtures.find((fixture) => typeof fixture?.name === 'string' + && fixture.name.replace(/\s+/g, '').replace(/^#/, '').toUpperCase() === normalized) + const status = match as { name?: string; financialStatus?: string; fulfillmentStatus?: string } | undefined + return Response.json({ + text: status + ? `Order ${status.name ?? `#${orderNumber}`} is ${status.financialStatus ?? 'recorded'} and ${status.fulfillmentStatus ?? 'being processed'}.` + : `I could not find order #${orderNumber} for this store account.`, + toolCalls: [{ name: 'get_order_status', input: { orderNumber: `#${orderNumber}` } }], + direct: true, + }) + } + const first = fixtures[0] as { name?: string; financialStatus?: string; fulfillmentStatus?: string; lineItems?: { title?: string }[] } | undefined + return Response.json({ + text: first + ? `Your recent order is ${first.name ?? 'listed'} for ${first.lineItems?.[0]?.title ?? 'a store product'}, ${first.financialStatus?.toLowerCase() ?? 'recorded'} and ${first.fulfillmentStatus?.toLowerCase() ?? 'being processed'}.` + : 'I did not find a recent order on this store account.', + toolCalls: [{ name: 'list_my_orders', input: {} }], + direct: true, + }) + } + const workersAI = createWorkersAI({ binding: env.AI }) // `stream: true` exercises the same streaming invocation production uses // (streamText + fullStream) instead of generateText, so eval cases can @@ -77,8 +130,18 @@ export default { reasoning_effort: null, chat_template_kwargs: { enable_thinking: false }, }), - system: voiceAgentSystemPrompt('Example Company', { orders: Boolean(ordersCase), signedIn: signedInCase }), + system: voiceAgentSystemPrompt('Example Company', { + orders: Boolean(ordersCase), + signedIn: signedInCase, + ...(typeof body?.locale === 'string' ? { locale: body.locale } : {}), + ...(typeof body?.timezone === 'string' ? { timezone: body.timezone } : {}), + }), messages: prepareVoiceModelMessages(messages as Array<{ role: 'user' | 'assistant'; content: string }>), + ...(isHelpCenterSupportRequest(String(messages.at(-1)?.content ?? '')) ? { + prepareStep: ({ stepNumber }: { stepNumber: number }) => stepNumber === 0 + ? { toolChoice: { type: 'tool' as const, toolName: 'search_help_center' as const } } + : { toolChoice: 'auto' as const }, + } : {}), tools: { // Mirrors production: the help-centre tool is always registered. search_help_center: tool({ @@ -91,7 +154,11 @@ export default { const articles = (Array.isArray(kbCase?.articles) ? kbCase.articles : []) .map((article) => ({ title: String(article?.title ?? ''), content: String(article?.content ?? '') })) .filter((article) => article.title && article.content) - return articles.length > 0 ? { status: 'ok', articles } : { status: 'no_match' } + return articles.length > 0 ? { + status: 'ok', + articles, + responseRequirement: 'Give the documented answer in natural prose and stop after the sourced step. Do not mention, offer, open, or suggest a support ticket in this reply; wait for the customer to say whether the step failed.', + } : { status: 'no_match' } }, }), ...(signedInCase && ordersCase ? { @@ -108,13 +175,19 @@ export default { orderNumber: z.string().min(1).max(32).describe("The customer's order number from their confirmation email, e.g. #1234."), }), execute: async ({ orderNumber }) => { - if (ordersCase.unavailable === true) return { status: 'unavailable' } + if (ordersCase.unavailable === true) return { + status: 'unavailable', + responseRequirement: 'Say order lookup is temporarily unavailable and offer to open a support ticket. Do not ask for an email address.', + } const normalized = orderNumber.replace(/\s+/g, '').replace(/^#/, '').toUpperCase() const fixtures = Array.isArray(ordersCase.fixtures) ? ordersCase.fixtures : [] const match = fixtures.find((fixture) => typeof fixture?.name === 'string' && fixture.name.replace(/\s+/g, '').replace(/^#/, '').toUpperCase() === normalized) - return match ? { status: 'ok', order: match } : { status: 'not_found' } + return match ? { status: 'ok', order: match } : { + status: 'not_found', + responseRequirement: 'Say the order was not found for this store account, mention it may use a different checkout email, and offer to open a support ticket. Do not offer another lookup instead.', + } }, }), } : {}), @@ -156,7 +229,7 @@ export default { }), }), }, - maxOutputTokens: 120, + maxOutputTokens: 512, temperature: 0, stopWhen: stepCountIs(4), } @@ -179,12 +252,21 @@ export default { } const result = await generateText(turnOptions) + const text = dedupRepeatedSentences(result.text) + const toolCalls = result.steps.flatMap((step) => step.toolCalls.flatMap((call) => (call ? [{ + name: call.toolName, + input: call.input, + }] : []))) + // Mirror the production anonymous safety net: if the model speaks the + // scripted sign-in line without firing the tool, the agent still emits the + // sign-in event so the caller is never stranded in front of missing UI. + if (!signedInCase && /\bsign[ -]?in\b/i.test(text) + && !toolCalls.some((call) => call.name === 'request_sign_in')) { + toolCalls.push({ name: 'request_sign_in', input: { reason: 'product_help', recovered: true } }) + } return Response.json({ - text: dedupRepeatedSentences(result.text), - toolCalls: result.steps.flatMap((step) => step.toolCalls.flatMap((call) => (call ? [{ - name: call.toolName, - input: call.input, - }] : []))), + text, + toolCalls, }) }, } diff --git a/apps/desk/src/env.ts b/apps/desk/src/env.ts index 3cc803e..26e0ff8 100644 --- a/apps/desk/src/env.ts +++ b/apps/desk/src/env.ts @@ -36,8 +36,22 @@ export type Env = Cloudflare.Env & { SHOPIFY_CLIENT_SECRET?: string /** Legacy custom-app Admin token; still honored as an alternative to the client credentials grant. */ SHOPIFY_ADMIN_TOKEN?: string + /** Public Able UCP profile override for local parity; deployments derive it from the portal origin. */ + SHOPIFY_UCP_AGENT_PROFILE_URL?: string + /** Optional ISO 3166-1 alpha-2 country used for localized Storefront prices and availability. */ + SHOPIFY_STOREFRONT_COUNTRY?: string + /** Optional BCP 47 language tag used for localized Storefront content. */ + SHOPIFY_STOREFRONT_LANGUAGE?: string /** Customer Account API public client ID enabling optional customer sign-in on the support portal. */ SHOPIFY_CUSTOMER_CLIENT_ID?: string + /** Optional comma-separated product and brand vocabulary boosted by streaming speech recognition. */ + ABLE_VOICE_KEYTERMS?: string + /** Deepgram API credential enabling an optional Indian-English Flux TTS voice. */ + DEEPGRAM_API_KEY?: string + /** Optional Deepgram Flux TTS voice model; defaults to flux-priya-en. */ + ABLE_VOICE_TTS_MODEL?: string + /** Local-parity guard: streaming Workers AI WebSockets require remote Worker execution. */ + ABLE_LOCAL_VOICE_UNAVAILABLE?: string /** Meta callback token used only for the WhatsApp webhook GET challenge. */ WHATSAPP_VERIFY_TOKEN?: string /** Meta app secret used to verify X-Hub-Signature-256 on webhook POSTs. */ diff --git a/apps/desk/src/integrations/shopify-storefront.ts b/apps/desk/src/integrations/shopify-storefront.ts new file mode 100644 index 0000000..8fb9611 --- /dev/null +++ b/apps/desk/src/integrations/shopify-storefront.ts @@ -0,0 +1,488 @@ +/** + * Read-only Shopify Storefront Catalog MCP adapter for public product discovery. + * + * The model receives Able's bounded product projection, never Shopify's raw + * MCP tool catalog or UCP payload. This keeps provider protocol details, + * product GIDs, merchandising metadata, and raw errors outside the agent tool + * surface while letting Shopify own current catalog search and localization. + */ + +import { FilterXSS } from 'xss' +import { z } from 'zod' + +export const SHOPIFY_UCP_VERSION = '2026-04-08' +export const SHOPIFY_UCP_PROFILE_PATH = '/.well-known/ucp' + +const SEARCH_LIMIT = 5 +const BUDGET_SEARCH_LIMIT = 12 +const VARIANT_LIMIT = 8 +const DEFAULT_TIMEOUT_MS = 4_000 +const MAX_RESPONSE_BYTES = 512 * 1024 +const PRODUCT_REFERENCE_PREFIX = 'shopify_product_' + +type ShopifyStorefrontEnv = { + SHOPIFY_SHOP_DOMAIN?: string + /** Public profile override for local parity, where localhost cannot be fetched by Shopify. */ + SHOPIFY_UCP_AGENT_PROFILE_URL?: string + SHOPIFY_STOREFRONT_COUNTRY?: string + SHOPIFY_STOREFRONT_LANGUAGE?: string +} + +export type ShopifyMoney = { + amount: string + currencyCode: string +} + +export type ShopifyProductSummary = { + /** Opaque Able reference accepted by get_storefront_product. */ + reference: string + handle: string + title: string + description: string | null + vendor: string | null + productType: string | null + availableForSale: boolean + priceRange: { min: ShopifyMoney; max: ShopifyMoney } + url: string | null + image: { url: string; altText: string | null } | null +} + +export type ShopifyProductDetail = ShopifyProductSummary & { + options: { name: string; values: string[] }[] + variants: { + title: string + availableForSale: boolean + price: ShopifyMoney + compareAtPrice: ShopifyMoney | null + selectedOptions: { name: string; value: string }[] + }[] +} + +export type ShopifyProductSearchResult = + | { status: 'ok'; products: ShopifyProductSummary[] } + | { status: 'no_match' } + | { status: 'unavailable' } + +export type ShopifyProductDetailResult = + | { status: 'ok'; product: ShopifyProductDetail } + | { status: 'not_found' } + | { status: 'unavailable' } + +type StorefrontOptions = { + fetcher?: typeof fetch + timeoutMs?: number + profileUrl?: string | null + shopperBudget?: { amount: number; currencyCode: string } + requireBundle?: boolean +} + +const descriptionSchema = z.object({ + plain: z.string().optional(), + html: z.string().optional(), +}).passthrough() + +const priceSchema = z.object({ + amount: z.number().int().safe().nonnegative(), + currency: z.string().regex(/^[A-Z]{3}$/), +}).passthrough() + +const mediaSchema = z.object({ + type: z.string(), + url: z.string(), + alt_text: z.string().optional(), +}).passthrough() + +const selectedOptionSchema = z.object({ + name: z.string(), + label: z.string(), +}).passthrough() + +const variantSchema = z.object({ + title: z.string(), + price: priceSchema, + list_price: priceSchema.optional(), + availability: z.object({ available: z.boolean().optional() }).passthrough().optional(), + options: z.array(selectedOptionSchema).optional(), +}).passthrough() + +const productSchema = z.object({ + id: z.string().regex(/^gid:\/\/shopify\/Product\/[A-Za-z0-9._~?=&%-]+$/), + handle: z.string().regex(/^[a-zA-Z0-9][a-zA-Z0-9-]{0,199}$/), + title: z.string(), + description: descriptionSchema.optional(), + url: z.string().optional(), + categories: z.array(z.object({ + value: z.string(), + taxonomy: z.string().optional(), + }).passthrough()).optional(), + price_range: z.object({ min: priceSchema, max: priceSchema }).passthrough(), + media: z.array(mediaSchema).optional(), + options: z.array(z.object({ + name: z.string(), + values: z.array(z.object({ label: z.string() }).passthrough()), + }).passthrough()).optional(), + variants: z.array(variantSchema), +}).passthrough() + +const structuredContentSchema = z.object({ + ucp: z.object({ version: z.literal(SHOPIFY_UCP_VERSION) }).passthrough(), + products: z.array(productSchema).optional(), + product: productSchema.nullable().optional(), +}).passthrough() + +const rpcResponseSchema = z.object({ + jsonrpc: z.literal('2.0'), + result: z.object({ + structuredContent: structuredContentSchema.optional(), + isError: z.boolean().optional(), + }).passthrough().optional(), + error: z.object({ code: z.number() }).passthrough().optional(), +}).passthrough() + +const descriptionSanitizer = new FilterXSS({ + whiteList: {}, + stripIgnoreTag: true, + stripIgnoreTagBody: ['script', 'style', 'iframe', 'object'], +}) + +export const SHOPIFY_UCP_AGENT_PROFILE = Object.freeze({ + ucp: { + version: SHOPIFY_UCP_VERSION, + capabilities: { + 'dev.ucp.shopping.catalog.search': [{ version: SHOPIFY_UCP_VERSION }], + 'dev.ucp.shopping.catalog.lookup': [{ version: SHOPIFY_UCP_VERSION }], + 'dev.shopify.catalog': [{ version: SHOPIFY_UCP_VERSION }], + }, + }, +}) + +function shopHostname(domain: string | undefined): string | null { + const trimmed = (domain ?? '').trim().replace(/^https?:\/\//i, '').replace(/\/.*$/, '') + return /^[a-z0-9][a-z0-9.-]+\.[a-z]{2,}$/i.test(trimmed) ? trimmed.toLowerCase() : null +} + +function httpsUrl(value: string | undefined): string | null { + try { + const parsed = new URL((value ?? '').trim()) + return parsed.protocol === 'https:' ? parsed.toString() : null + } catch { + return null + } +} + +export function shopifyStorefrontProfileUrl(env: ShopifyStorefrontEnv, requestOrigin?: string): string | null { + const override = httpsUrl(env.SHOPIFY_UCP_AGENT_PROFILE_URL) + if (override) return override + const origin = httpsUrl(requestOrigin) + return origin ? new URL(SHOPIFY_UCP_PROFILE_PATH, origin).toString() : null +} + +export function shopifyStorefrontConfigured(env: ShopifyStorefrontEnv, requestOrigin?: string): boolean { + return shopHostname(env.SHOPIFY_SHOP_DOMAIN) !== null + && shopifyStorefrontProfileUrl(env, requestOrigin) !== null +} + +export function shopifyUcpProfileResponse(request: Request): Response { + if (request.method !== 'GET' && request.method !== 'HEAD') { + return new Response('Method Not Allowed', { + status: 405, + headers: { allow: 'GET, HEAD', 'cache-control': 'no-store', 'x-content-type-options': 'nosniff' }, + }) + } + return new Response(request.method === 'HEAD' ? null : JSON.stringify(SHOPIFY_UCP_AGENT_PROFILE), { + headers: { + 'cache-control': 'public, max-age=3600', + 'content-type': 'application/json; charset=utf-8', + 'x-content-type-options': 'nosniff', + }, + }) +} + +function storefrontContext(env: ShopifyStorefrontEnv): Record { + const country = env.SHOPIFY_STOREFRONT_COUNTRY?.trim().toUpperCase() + const rawLanguage = env.SHOPIFY_STOREFRONT_LANGUAGE?.trim().replace('_', '-') + const language = rawLanguage && /^[A-Za-z]{2,3}(?:-[A-Za-z]{2})?$/.test(rawLanguage) + ? rawLanguage.split('-').map((part, index) => index === 0 ? part.toLowerCase() : part.toUpperCase()).join('-') + : null + return { + ...(/^[A-Z]{2}$/.test(country ?? '') ? { address_country: country! } : {}), + ...(language ? { language } : {}), + } +} + +function text(value: unknown, limit = 500): string | null { + if (typeof value !== 'string') return null + const normalized = value.replace(/\s+/g, ' ').trim() + return normalized ? normalized.slice(0, limit) : null +} + +function description(value: z.infer | undefined, limit: number): string | null { + const plain = text(value?.plain, limit) + if (plain) return plain + const stripped = value?.html ? descriptionSanitizer.process(value.html) : null + return text(stripped, limit) +} + +function url(value: unknown): string | null { + const candidate = text(value, 1_000) + if (!candidate) return null + try { + const parsed = new URL(candidate) + return parsed.protocol === 'https:' || parsed.protocol === 'http:' ? parsed.toString() : null + } catch { + return null + } +} + +function currencyFractionDigits(currency: string): number | null { + try { + const digits = new Intl.NumberFormat('en', { style: 'currency', currency }).resolvedOptions().maximumFractionDigits + return typeof digits === 'number' && Number.isInteger(digits) && digits >= 0 && digits <= 6 ? digits : null + } catch { + return null + } +} + +function minorAmount(amount: number, currency: string): string | null { + const digits = currencyFractionDigits(currency) + if (digits === null || !Number.isSafeInteger(amount) || amount < 0) return null + if (digits === 0) return String(amount) + const padded = String(amount).padStart(digits + 1, '0') + return `${padded.slice(0, -digits)}.${padded.slice(-digits)}` +} + +function money(value: z.infer | undefined): ShopifyMoney | null { + if (!value) return null + const amount = minorAmount(value.amount, value.currency) + return amount ? { amount, currencyCode: value.currency } : null +} + +function productReference(id: string): string { + return PRODUCT_REFERENCE_PREFIX + btoa(id).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/g, '') +} + +function productId(reference: string): string | null { + if (!reference.startsWith(PRODUCT_REFERENCE_PREFIX)) return null + try { + const encoded = reference.slice(PRODUCT_REFERENCE_PREFIX.length).replace(/-/g, '+').replace(/_/g, '/') + const decoded = atob(encoded.padEnd(Math.ceil(encoded.length / 4) * 4, '=')) + return /^gid:\/\/shopify\/Product\/[A-Za-z0-9._~?=&%-]+$/.test(decoded) ? decoded : null + } catch { + return null + } +} + +function productSummary( + product: z.infer, + descriptionLimit = 500, +): ShopifyProductSummary | null { + const min = money(product.price_range.min) + const max = money(product.price_range.max) + const title = text(product.title, 300) + if (!title || !min || !max || min.currencyCode !== max.currencyCode) return null + const featuredImage = product.media?.find((entry) => entry.type === 'image') + const imageUrl = url(featuredImage?.url) + const merchantCategory = product.categories?.find((category) => category.taxonomy === 'merchant') + + return { + reference: productReference(product.id), + handle: product.handle.toLowerCase(), + title, + description: description(product.description, descriptionLimit), + vendor: null, + productType: text(merchantCategory?.value, 200), + availableForSale: product.variants.some((variant) => variant.availability?.available === true), + priceRange: { min, max }, + url: url(product.url), + image: imageUrl ? { url: imageUrl, altText: text(featuredImage?.alt_text, 300) } : null, + } +} + +function productDetail(product: z.infer): ShopifyProductDetail | null { + const summary = productSummary(product, 1_200) + if (!summary) return null + const options = (product.options ?? []).slice(0, 3).flatMap((option) => { + const name = text(option.name, 100) + if (!name) return [] + const values = option.values.slice(0, 30).flatMap((entry) => text(entry.label, 100) ?? []) + return [{ name, values }] + }) + const variants = product.variants.slice(0, VARIANT_LIMIT).flatMap((variant) => { + const title = text(variant.title, 200) + const price = money(variant.price) + if (!title || !price) return [] + const selectedOptions = (variant.options ?? []).slice(0, 3).flatMap((option) => { + const name = text(option.name, 100) + const value = text(option.label, 100) + return name && value ? [{ name, value }] : [] + }) + return [{ + title, + availableForSale: variant.availability?.available === true, + price, + compareAtPrice: money(variant.list_price), + selectedOptions, + }] + }) + return { ...summary, options, variants } +} + +function logStorefrontOutcome(operation: 'search' | 'detail', outcome: string, detail: Record = {}): void { + const entry = JSON.stringify({ event: 'shopify_storefront_catalog_read', operation, outcome, ...detail }) + if (outcome === 'ok' || outcome === 'no_match' || outcome === 'not_found') { + console.info(entry) + } else { + console.warn(entry) + } +} + +async function boundedJson(response: Response): Promise { + const declaredLength = Number(response.headers.get('content-length')) + if (Number.isFinite(declaredLength) && declaredLength > MAX_RESPONSE_BYTES) throw new Error('ResponseTooLarge') + if (!response.body) return null + const reader = response.body.getReader() + const chunks: Uint8Array[] = [] + let length = 0 + try { + while (true) { + const { done, value } = await reader.read() + if (done) break + length += value.byteLength + if (length > MAX_RESPONSE_BYTES) { + await reader.cancel() + throw new Error('ResponseTooLarge') + } + chunks.push(value) + } + } finally { + reader.releaseLock() + } + const bytes = new Uint8Array(length) + let offset = 0 + for (const chunk of chunks) { + bytes.set(chunk, offset) + offset += chunk.byteLength + } + return JSON.parse(new TextDecoder().decode(bytes)) +} + +async function storefrontTool( + env: ShopifyStorefrontEnv, + toolName: 'search_catalog' | 'get_product', + catalog: Record, + operation: 'search' | 'detail', + options: StorefrontOptions, +): Promise | null> { + const hostname = shopHostname(env.SHOPIFY_SHOP_DOMAIN) + const profile = httpsUrl(options.profileUrl ?? env.SHOPIFY_UCP_AGENT_PROFILE_URL) + if (!hostname || !profile) { + logStorefrontOutcome(operation, 'unconfigured') + return null + } + + try { + const response = await (options.fetcher ?? fetch)(`https://${hostname}/api/ucp/mcp`, { + method: 'POST', + headers: { + accept: 'application/json', + 'content-type': 'application/json', + 'user-agent': 'Able-Desk/1.0', + }, + body: JSON.stringify({ + jsonrpc: '2.0', + method: 'tools/call', + id: `${operation}-catalog`, + params: { + name: toolName, + arguments: { + meta: { 'ucp-agent': { profile } }, + catalog, + }, + }, + }), + signal: AbortSignal.timeout(options.timeoutMs ?? DEFAULT_TIMEOUT_MS), + }) + if (!response.ok) { + logStorefrontOutcome(operation, 'http_error', { httpStatus: response.status }) + return null + } + const parsed = rpcResponseSchema.safeParse(await boundedJson(response)) + if (!parsed.success || parsed.data.error || parsed.data.result?.isError || !parsed.data.result?.structuredContent) { + logStorefrontOutcome(operation, 'invalid_response') + return null + } + return parsed.data.result.structuredContent + } catch (error) { + logStorefrontOutcome(operation, 'exception', { name: error instanceof Error ? error.name : null }) + return null + } +} + +/** Search only products currently exposed by Shopify's merchant-scoped UCP catalog. */ +export async function searchStorefrontProducts( + env: ShopifyStorefrontEnv, + query: string, + options: StorefrontOptions = {}, +): Promise { + const normalizedQuery = query.replace(/\s+/g, ' ').trim().slice(0, 120) + if (normalizedQuery.length < 2) return { status: 'no_match' } + const candidateLimit = options.shopperBudget ? BUDGET_SEARCH_LIMIT : SEARCH_LIMIT + const data = await storefrontTool(env, 'search_catalog', { + query: normalizedQuery, + context: storefrontContext(env), + filters: { available: true }, + pagination: { limit: candidateLimit }, + }, 'search', options) + if (!data?.products) return { status: 'unavailable' } + const candidates = data.products.slice(0, candidateLimit).flatMap((product) => productSummary(product) ?? []) + const budgetMatches = options.shopperBudget + ? candidates.filter((product) => { + const maximum = Number(product.priceRange.max.amount) + const withinBudget = product.priceRange.max.currencyCode === options.shopperBudget!.currencyCode + && Number.isFinite(maximum) + && maximum <= options.shopperBudget!.amount + if (!withinBudget) return false + return !options.requireBundle + || product.productType?.toLowerCase() === 'bundle' + || /\b(?:bundle|combo|with|kit)\b/i.test(product.title) + }) + : [] + const products = [...new Map([...budgetMatches, ...candidates].map((product) => [product.reference, product])).values()] + .slice(0, SEARCH_LIMIT) + if (products.length === 0) { + logStorefrontOutcome('search', 'no_match') + return { status: 'no_match' } + } + logStorefrontOutcome('search', 'ok', { resultCount: products.length }) + return { status: 'ok', products } +} + +/** Fetch bounded public detail using the opaque reference returned by search. */ +export async function getStorefrontProduct( + env: ShopifyStorefrontEnv, + reference: string, + options: StorefrontOptions = {}, +): Promise { + const id = productId(reference.trim()) + if (!id) return { status: 'not_found' } + const data = await storefrontTool(env, 'get_product', { + id, + context: storefrontContext(env), + }, 'detail', options) + if (!data) return { status: 'unavailable' } + if (data.product === null) { + logStorefrontOutcome('detail', 'not_found') + return { status: 'not_found' } + } + if (data.product === undefined) { + logStorefrontOutcome('detail', 'invalid_response') + return { status: 'unavailable' } + } + const product = productDetail(data.product) + if (!product) { + logStorefrontOutcome('detail', 'invalid_response') + return { status: 'unavailable' } + } + logStorefrontOutcome('detail', 'ok') + return { status: 'ok', product } +} diff --git a/apps/desk/src/ui/markdown-client.ts b/apps/desk/src/ui/markdown-client.ts new file mode 100644 index 0000000..74bdeed --- /dev/null +++ b/apps/desk/src/ui/markdown-client.ts @@ -0,0 +1,14 @@ +import { safeStreamingMarkdown } from './markdown-core' + +/** Mount a safe, stream-tolerant Markdown response into a browser surface. */ +export function renderStreamingMarkdown(target: HTMLElement, markdown: string): void { + target.classList.add('markdown-body') + target.innerHTML = safeStreamingMarkdown(markdown) + + for (const link of target.querySelectorAll('a[href]')) { + if (link.origin !== window.location.origin) { + link.target = '_blank' + link.rel = 'noopener noreferrer' + } + } +} diff --git a/apps/desk/src/ui/markdown-core.ts b/apps/desk/src/ui/markdown-core.ts new file mode 100644 index 0000000..148e8e2 --- /dev/null +++ b/apps/desk/src/ui/markdown-core.ts @@ -0,0 +1,64 @@ +import { marked } from 'marked' +import remend from 'remend' +import { FilterXSS } from 'xss' + +const sanitizer = new FilterXSS({ + whiteList: { + a: ['href', 'title'], + p: [], + br: [], + hr: [], + blockquote: [], + h1: [], + h2: [], + h3: [], + h4: [], + h5: [], + h6: [], + ul: [], + ol: ['start'], + li: [], + strong: [], + em: [], + b: [], + i: [], + del: [], + s: [], + code: ['class'], + pre: [], + table: [], + thead: [], + tbody: [], + tr: [], + th: ['align'], + td: ['align'], + }, + stripIgnoreTag: true, + stripIgnoreTagBody: ['script', 'style', 'iframe', 'object'], + onTagAttr(tag, name, value) { + if (tag === 'a' && name === 'href') { + const normalized = value.trim().toLowerCase() + if (!normalized.startsWith('/') && !normalized.startsWith('#') && !normalized.startsWith('https://') && !normalized.startsWith('mailto:')) { + return '' + } + } + return undefined + }, +}) + +export function safeMarkdown(markdown: string): string { + const rendered = marked.parse(markdown, { async: false }) as string + return sanitizer.process(rendered) +} + +/** + * Render an in-progress model response without leaking partial Markdown + * delimiters into the UI. Remend is the framework-independent termination + * layer used by Streamdown; marked and xss own parsing and sanitisation. + */ +export function safeStreamingMarkdown(markdown: string): string { + return safeMarkdown(remend(markdown, { + inlineKatex: false, + linkMode: 'text-only', + })) +} diff --git a/apps/desk/src/ui/markdown.tsx b/apps/desk/src/ui/markdown.tsx index 3e10c01..b7113ba 100644 --- a/apps/desk/src/ui/markdown.tsx +++ b/apps/desk/src/ui/markdown.tsx @@ -1,54 +1,6 @@ -import { marked } from 'marked' -import { FilterXSS } from 'xss' +import { safeMarkdown } from './markdown-core' -const sanitizer = new FilterXSS({ - whiteList: { - a: ['href', 'title'], - p: [], - br: [], - hr: [], - blockquote: [], - h1: [], - h2: [], - h3: [], - h4: [], - h5: [], - h6: [], - ul: [], - ol: ['start'], - li: [], - strong: [], - em: [], - b: [], - i: [], - del: [], - s: [], - code: ['class'], - pre: [], - table: [], - thead: [], - tbody: [], - tr: [], - th: ['align'], - td: ['align'], - }, - stripIgnoreTag: true, - stripIgnoreTagBody: ['script', 'style', 'iframe', 'object'], - onTagAttr(tag, name, value) { - if (tag === 'a' && name === 'href') { - const normalized = value.trim().toLowerCase() - if (!normalized.startsWith('/') && !normalized.startsWith('#') && !normalized.startsWith('https://') && !normalized.startsWith('mailto:')) { - return '' - } - } - return undefined - }, -}) - -export function safeMarkdown(markdown: string): string { - const rendered = marked.parse(markdown, { async: false }) as string - return sanitizer.process(rendered) -} +export { safeMarkdown, safeStreamingMarkdown } from './markdown-core' export function Markdown({ body }: { body: string }) { return
    diff --git a/apps/desk/src/voice/conversation.ts b/apps/desk/src/voice/conversation.ts index 7d8376d..a38e2e0 100644 --- a/apps/desk/src/voice/conversation.ts +++ b/apps/desk/src/voice/conversation.ts @@ -9,8 +9,189 @@ export const UNDOCUMENTED_PRODUCT_FORM_REPLY = export type VoiceModelMessage = { role: 'user' | 'assistant'; content: string } +/** + * Remove visual-only syntax before TTS without shortening or dropping any + * sentence. The full Markdown response still reaches the on-screen transcript. + */ +export function speechText(text: string): string | null { + const spoken = text + .replace(/\[([^\]]+)]\([^\s)]+\)/g, '$1') + .replace(/https?:\/\/\S+/gi, '') + .replace(/^\s*(?:[-+*]|\d+[.)])\s+/gm, '') + .replace(/[*_`#>~]/g, '') + .replace(/₹\s*([\d,]+(?:\.\d+)?)/g, '$1 rupees') + .replace(/\s+/g, ' ') + .trim() + .replace(/:\s*$/, '.') + return spoken || null +} + const INCOMPLETE_SUPPORT_ACTION = /\b(?:open|create|raise|start)\s+(?:me\s+)?(?:a\s+)?(?:new\s+)?(?:support)?$/i const SENSITIVE_DATA_OFFER = /\b(?:tell|give|share|send|provide)\b.{0,60}\b(password|passcode|card number|security code|access token|government id)\b/i +const STOREFRONT_SHOPPING_INTENT = /\b(?:buy|purchase|recommend|suggest|choose|compare|price|priced|cost|availability|available|in stock|stock|budget|under|below|cheaper|best|show me|do you have|looking for|find|what should i (?:buy|get)|which .{0,40} should i (?:buy|get))\b/i +const HELP_CENTER_SUPPORT_INTENT = /\b(?:how (?:do|can|should) i|troubleshoot|not working|doesn['’]?t work|won['’]?t (?:start|turn on|work)|warranty|shipping|delivery|returns?|refund policy|care|maintenance|clean|repair|fix|adjust|alignment|align|install|setup|set up|configure|use)\b/i + +export function isStorefrontShoppingRequest(transcript: string): boolean { + return STOREFRONT_SHOPPING_INTENT.test(transcript.replace(/\s+/g, ' ').trim()) +} + +/** + * Identify turns that must be grounded in published support content. This is + * an orchestration guard, not merely a prompt hint: hosted models can + * otherwise skip the tool for unfamiliar or oddly worded products. + */ +export function isHelpCenterSupportRequest(transcript: string): boolean { + return HELP_CENTER_SUPPORT_INTENT.test(transcript.replace(/\s+/g, ' ').trim()) +} + +export function inrBudgetFromTranscript(transcript: string): number | null { + const normalized = transcript.replace(/\s+/g, ' ') + const match = /(?:₹|\bINR\s*|\bRs\.?\s*)(\d[\d,]*(?:\.\d+)?)\s*([kK])?/i.exec(normalized) + ?? /\b(?:budget|under|below|up to|around)\D{0,24}(\d[\d,]*(?:\.\d+)?)\s*([kK])?/i.exec(normalized) + if (!match?.[1]) return null + const parsed = Number(match[1].replace(/,/g, '')) * (match[2] ? 1_000 : 1) + return Number.isFinite(parsed) && parsed >= 100 ? Math.round(parsed) : null +} + +type BudgetBundleProduct = { + handle?: string + title: string + description?: string | null + productType?: string | null + availableForSale: boolean + priceRange: { + min: { amount: string; currencyCode: string } + max: { amount: string; currencyCode: string } + } +} + +function productPrice(product: BudgetBundleProduct): number | null { + if (product.priceRange.min.currencyCode !== 'INR' || product.priceRange.max.currencyCode !== 'INR') return null + const minimum = Number(product.priceRange.min.amount) + const maximum = Number(product.priceRange.max.amount) + return Number.isFinite(minimum) && minimum === maximum ? minimum : null +} + +export function productDiscoveryReply(products: BudgetBundleProduct[], maximumINR: number | null): string | null { + const verified = products.filter((product) => { + const minimum = Number(product.priceRange.min.amount) + const maximum = Number(product.priceRange.max.amount) + return product.availableForSale + && product.priceRange.min.currencyCode === 'INR' + && product.priceRange.max.currencyCode === 'INR' + && Number.isFinite(minimum) + && Number.isFinite(maximum) + && minimum <= maximum + }) + const matches = maximumINR === null + ? verified + : verified.filter((product) => Number(product.priceRange.max.amount) <= maximumINR) + const formatter = new Intl.NumberFormat('en-IN', { + style: 'currency', + currency: 'INR', + maximumFractionDigits: 0, + }) + if (matches.length === 0) { + return maximumINR === null + ? 'I did not find a verified available match in the storefront. What product type should I narrow this to?' + : `I did not find a verified available match within ${formatter.format(maximumINR)}. Would you like to adjust the budget or the product type?` + } + const examples = matches.slice(0, 2).map((product) => { + const minimum = Number(product.priceRange.min.amount) + const maximum = Number(product.priceRange.max.amount) + const price = minimum === maximum + ? formatter.format(minimum) + : `${formatter.format(minimum)}–${formatter.format(maximum)}` + return `${product.title} at ${price}` + }) + const budgetCopy = maximumINR === null ? '' : ` within ${formatter.format(maximumINR)}` + return `I found ${matches.length} available ${matches.length === 1 ? 'match' : 'matches'}${budgetCopy}, including ${examples.join(' and ')}. The cards show live prices and availability. What matters most to you—budget, workflow, or size?` +} + +export function productComparisonTerms(transcript: string): [string, string] | null { + const match = /\bcompare\s+(?:the\s+)?(.+?)\s+(?:and|vs\.?|versus)\s+(?:the\s+)?(.+?)(?:\s+for\b|[?.]|$)/i + .exec(transcript.replace(/\s+/g, ' ').trim()) + const first = match?.[1]?.trim() + const second = match?.[2]?.trim() + return first && second ? [first, second] : null +} + +function bestNamedProduct(products: BudgetBundleProduct[], term: string): BudgetBundleProduct | null { + const tokens = term.toLowerCase().match(/[a-z0-9]+/g)?.filter((token) => token.length > 1) ?? [] + return products + .map((product) => { + const title = product.title.toLowerCase() + const matches = tokens.filter((token) => title.includes(token)).length + const bundlePenalty = product.productType?.toLowerCase() === 'bundle' + || /\b(?:bundle|combo|with|kit)\b/i.test(product.title) + ? 10 + : 0 + return { product, score: matches * 4 - bundlePenalty } + }) + .filter(({ score }) => score > 0) + .sort((left, right) => right.score - left.score)[0]?.product ?? null +} + +function inrPrice(product: BudgetBundleProduct): number | null { + return productPrice(product) +} + +function burrDescription(product: BudgetBundleProduct): string | null { + const description = product.description ?? '' + const size = /\b(\d{2})\s*mm\b/i.exec(description)?.[1] + const shape = /\b(flat|conical)(?:[-\s][a-z]+){0,2}\s+burrs?\b/i.exec(description)?.[1]?.toLowerCase() + return size && shape ? `${size}mm ${shape} burrs` : null +} + +export function productComparisonReply( + firstTerm: string, + firstProducts: BudgetBundleProduct[], + secondTerm: string, + secondProducts: BudgetBundleProduct[], +): string | null { + const first = bestNamedProduct(firstProducts, firstTerm) + const second = bestNamedProduct(secondProducts, secondTerm) + if (!first || !second) return null + const firstPrice = inrPrice(first) + const secondPrice = inrPrice(second) + if (firstPrice === null || secondPrice === null) return null + const formatter = new Intl.NumberFormat('en-IN', { style: 'currency', currency: 'INR', maximumFractionDigits: 0 }) + const difference = Math.abs(firstPrice - secondPrice) + const dearer = firstPrice === secondPrice ? null : firstPrice > secondPrice ? first.title : second.title + const priceSentence = dearer + ? `${first.title} is ${formatter.format(firstPrice)} and ${second.title} is ${formatter.format(secondPrice)}, so ${dearer} costs ${formatter.format(difference)} more.` + : `${first.title} and ${second.title} are both ${formatter.format(firstPrice)}.` + const firstBurr = burrDescription(first) + const secondBurr = burrDescription(second) + const featureSentence = firstBurr && secondBurr + ? `For espresso, the main returned distinction is ${firstBurr} versus ${secondBurr}.` + : 'Both are listed as available for espresso use.' + return `${priceSentence} ${featureSentence}` +} + +export function budgetBundleReply(products: BudgetBundleProduct[], maximumINR: number): string | null { + const bundle = products.find((product) => { + const maximum = Number(product.priceRange.max.amount) + return /\b(?:bundle|combo|with|kit)\b/i.test(product.title) + && product.priceRange.max.currencyCode === 'INR' + && Number.isFinite(maximum) + && maximum <= maximumINR + }) + if (!bundle) return null + const minimum = Number(bundle.priceRange.min.amount) + const maximum = Number(bundle.priceRange.max.amount) + if (!Number.isFinite(minimum) || !Number.isFinite(maximum)) return null + const formatter = new Intl.NumberFormat('en-IN', { + style: 'currency', + currency: 'INR', + maximumFractionDigits: 0, + }) + const price = minimum === maximum + ? formatter.format(minimum) + : `${formatter.format(minimum)}–${formatter.format(maximum)}` + const availability = bundle.availableForSale ? 'currently available' : 'currently unavailable' + return `The ${bundle.title} is ${availability} at ${price}, so its highest listed price fits your ${formatter.format(maximumINR)} budget. It combines the machine and grinder in one storefront item.` +} function isSupportContinuation( previousUser: VoiceModelMessage | undefined, @@ -54,12 +235,27 @@ export function prepareVoiceModelMessages(messages: VoiceModelMessage[]): VoiceM export function voiceAgentSystemPrompt( workspaceName: string, - options: { orders?: boolean; signedIn?: boolean; signInAvailable?: boolean } = {}, + options: { + orders?: boolean + products?: boolean + signedIn?: boolean + signInAvailable?: boolean + locale?: string + timezone?: string + } = {}, ): string { const name = workspaceName.trim() || 'this workspace' const ordersAvailable = options.orders === true + const productsAvailable = options.products === true const signedIn = options.signedIn === true const signInAvailable = options.signInAvailable !== false + const indiaExperience = options.locale?.toLowerCase() === 'en-in' || options.timezone === 'Asia/Kolkata' + ? `\nINDIA CUSTOMER EXPERIENCE +Serve customers fluently in Indian English, Hindi, and Hinglish. Understand Hindi in Devanagari, Roman-script Hindi, and natural English-Hindi code-switching without asking the customer to translate or repeat themselves. +Mirror the customer's language naturally: answer English in clear Indian English; answer Hindi or mixed-language messages in conversational Hinglish. For Hinglish, prefer Roman script unless the customer writes in Devanagari or asks for it. If they ask to continue in Hindi, English, or Hinglish, keep that preference for the rest of the conversation. Keep product names, model numbers, technical terms, and sourced facts exactly as returned by tools. +Sound locally familiar without caricaturing an accent. Do not force Hindi into every sentence, translate the same answer twice, or overuse "ji", "sir", "ma'am", or filmi/slang expressions. A natural Hinglish response is concise, for example: "Haan, main check karti hoon. Aapka budget kitna hai?" +Format sourced INR amounts with ₹ and Indian digit grouping, dates as DD MMM YYYY, and times in IST. Treat Indian phone numbers, six-digit PIN codes, states, and cities naturally. Never assume GST invoice eligibility, COD, delivery coverage, warranty, voltage compatibility, or service availability; verify those facts from a tool or published help article.` + : '' const orderCapability = ordersAvailable && signedIn ? `\nYou can look up the caller's order. The caller is signed in with their store account, so their identity and email are already verified. For an order question without an order number, call list_my_orders first and confirm which order the caller means — never ask them to find the number. When a specific order number is given, call get_order_status with it. The order tools return only the signed-in caller’s own data. If any caller message already includes an order number, reuse it and call get_order_status — never ask for it twice. Never ask the caller for an email address; the server already holds this session's email and matches the order automatically. If the tool returns not_found, say you could not find that order for this store account: it may have been placed with a different email, so they can double-check the number. If the tool returns unavailable, say you are having trouble checking orders right now — never say the order could not be found. In both cases the reply must end by offering to open a support ticket for the team; never omit that offer. Answer order questions only from tool data — never invent order details, and never speculate about whether an order number exists for a different account. When a product question has no documented answer, offer to check the caller's order so a ticket for the team carries the exact product and purchase date. Do not create a ticket or claim an order check is underway before the lookup.` : ordersAvailable @@ -73,20 +269,32 @@ export function voiceAgentSystemPrompt( : signInAvailable ? `Identity is Shopify-first: before you can open a ticket, check an order, or hand off to a person, the caller must sign in with their store account. When the caller asks about their order, wants a ticket, needs human review, or has a product problem with no documented answer, call request_sign_in — it makes a sign-in button appear under your reply. The button exists only after request_sign_in returns, so never mention signing in without calling request_sign_in in the same turn. After it returns, reply with one short sentence such as "Sure — sign in below and I'll take care of that." If the help-centre search returned no_match, call request_sign_in with reason product_help and reply exactly: "${ordersAvailable ? UNDOCUMENTED_PRODUCT_SIGNIN_ORDER_REPLY : UNDOCUMENTED_PRODUCT_SIGNIN_TICKET_REPLY}" Never ask the caller to type their name, email, or password in the chat, and never claim a ticket or order lookup happened before the caller signed in.${orderCapability}` : `Store-account sign-in is not configured for this workspace, so no ticket, order lookup, or human hand-off can happen in this chat. When the caller needs one of those, reply exactly: "${UNDOCUMENTED_PRODUCT_FORM_REPLY}" and point them to the support request form. Never ask the caller to type their name or email in the chat.${orderCapability}` + const productCapability = productsAvailable + ? `For shopping questions—finding, choosing, comparing, pricing, or checking the availability of a product—call search_storefront_products first. Search using concise catalog nouns from the customer's need or the product name. Answer only from returned storefront data; never invent specifications, compatibility, price, availability, variants, or recommendations. For a stated INR budget, use the tool's budgetEvidence: never claim a product fits unless its handle appears in withinBudgetHandles. For a multi-item setup, recommend only one returned bundle whose handle appears in bundleWithinBudgetHandles; never add separate product prices yourself or claim that separate products fit the total budget. If no qualifying result is returned, say you did not find a verified match within budget and ask one useful narrowing question. Shopping answers are natural conversational prose with no Markdown list. The matching products are shown as cards, so say only the facts that answer the customer's question instead of reciting every returned field. When the caller selects one result or asks for its options or variants, call get_storefront_product with the exact opaque reference returned by search. If search returns no_match, say you could not find a matching product in the storefront and ask one useful narrowing question. If it returns unavailable, say you cannot check the storefront right now. Name the best match, but never read, spell, or invent a URL.` + : '' + const productSourceRouting = productsAvailable + ? 'A product-support question uses the help centre; a shopping, selection, price, or catalog-availability question uses the storefront tools described above.' + : 'Use the help centre for product support. Do not claim current catalog prices, availability, variants, or specifications when storefront discovery is unavailable.' return `You are Ava, the concise browser support assistant for ${name}. Only ever present yourself as ${name}'s assistant. ${identityLine} SCOPE -Only help with the caller's product, service, order, account, or existing support case. Do not answer unrelated general-knowledge, programming, entertainment, political, medical, legal-advice, or financial-advice questions. Briefly say that you can only help with support, then invite the caller to describe the support problem. Do not continue discussing the unrelated topic even if the caller insists. +Only help with shopping for ${name}'s products or with the caller's product, service, order, account, or existing support case. Do not answer unrelated general-knowledge, programming, entertainment, political, medical, legal-advice, or financial-advice questions. Briefly say that you can only help with ${name} shopping and support, then invite the caller to describe what they need. Do not continue discussing the unrelated topic even if the caller insists. +Shopping for ${name}'s products is explicitly in scope. Never refuse a product-selection, comparison, budget, price, or availability question as "not support" and never send the caller away to browse the storefront when storefront tools are available. A question about warranty or another support policy is in scope even when it does not name a product, order, or account. Treat it as support context, never as unrelated general knowledge. +A question about using the help centre, a private request link, or the support-request process is also in scope. Call search_help_center before answering it. CAPABILITIES You can answer support questions from the published help-centre articles and open a support ticket for the caller. Never ask the user for their name or email in tool calls; identity is enforced by the server. -For policy or warranty questions, call search_help_center first. For how-to, product care, shipping, or troubleshooting questions, also call search_help_center first with a short topic query of two to six words. Even when you do not recognize the product or the question sounds unusual, search before deciding: never call a product or device question unsupported or out of scope without a search_help_center result for it, and never say you lack information or a documented answer unless search_help_center already returned no_match in this turn. Answer only from the returned article content in at most two short sentences. The matching articles are shown to the caller as links automatically, so point them to the linked guide for the full steps. If the search returns no_match, say you do not have a documented answer for that and offer to open a ticket — do not answer such questions from memory. If it returns unavailable, say you cannot check the help articles right now and offer a ticket. Never include a URL or a link in your reply — the matching articles are already linked for the caller. +When a tool is needed, call it before writing any reply. Never narrate that you are checking, searching, or looking something up before the tool result; write the customer-facing answer only after the result arrives. +${productCapability} +For policy or warranty questions, call search_help_center first. For every how-to, product care, shipping, repair, or troubleshooting question, always call search_help_center first with a short topic query of two to six words. Do not ask the caller to identify or correct the product before that search. ${productSourceRouting} Even when you do not recognize the product or the question sounds unusual, search the appropriate source before deciding: never call a product or device question unsupported or out of scope without a search result for it, and never say you lack information unless the appropriate search already returned no_match in this turn. When search_help_center returns status ok with one or more articles, that is a documented answer: answer from the closest returned article and never say that no guide, no direct guide, or no information was found. If the closest guide is general rather than model-specific, say that precisely while still giving its sourced next step. Answer only from the returned article or storefront content. The matching help articles are shown to the caller as links automatically, so give a complete useful answer in natural prose and point them to the linked guide when it contains additional steps. After a successful help result, end the reply after the documented answer. Do not mention or offer a ticket in that reply, even conditionally; wait for the customer to say whether the step worked. If help-centre search returns no_match, say you do not have a documented support answer for that and offer to open a ticket — do not answer such questions from memory. If it returns unavailable, say you cannot check the help articles right now and offer a ticket. Never include a help-centre URL in your reply — the matching articles are already linked for the caller. ${actionCapability} You cannot look up or report ticket status in this channel. If the caller asks about an existing ticket's status, say that updates arrive by email through their private case link and that you cannot check status here. Never invent or guess a status. Offer to open a new ticket only if they describe a new problem. CONVERSATION Sound like an experienced, calm support person, not a form or workflow. Briefly acknowledge the customer's situation before the next useful step, using plain and sincere language. Do not use canned enthusiasm. +${indiaExperience} +Everything you write is both shown and spoken. Give a complete answer in natural conversational prose, with no headings, tables, or lists. Never truncate a thought or turn tool output into a catalog-style recital. Select the facts that answer the customer, then offer the one most useful next step or question. Product cards and linked guides carry the remaining structured detail. Make any empathy specific to the problem or impact, and usually acknowledge it only once. Do not begin each reply with an apology or repeat generic reassurance. Specifically, never use stock transitions such as "let's get this moving." After the first acknowledgment, lead with the new fact learned, the answer, or the next useful question. Speech transcripts can be split at natural pauses. Treat a short latest message as a possible continuation of the preceding user message. Reconstruct the caller's meaning from the whole conversation, do not make them repeat themselves, and do not restart an answer that was already underway. If a transcript is clearly unfinished, say only "Go ahead, I'm listening." Ask at most one question per turn. Ask only for information that changes safety, diagnosis, or the next support action. Prefer a natural question such as "What happens when you press the power button?" Never ask the customer for a subject, short description, long description, ticket details, category, priority, or any other internal field. @@ -103,5 +311,5 @@ Do not give a checklist when one focused question would move the case forward. SAFETY AND STYLE Never claim a phone call, refund, repair, or live human transfer occurred. A human-review ticket is not a live transfer. Never ask for passwords, card numbers, government IDs, access tokens, or other sensitive data. If the caller offers sensitive data, name the type they offered and clearly tell them not to share it. Continue with a safe troubleshooting question or human-review path that does not require the secret. -Keep spoken answers to at most two short sentences. Start with a complete 4-to-10-word sentence so speech can begin quickly. Ask one clarifying question when necessary.` +Let sentence length and answer length follow the customer's need. Use short, speakable sentences and finish the answer fully; never impose an arbitrary word, sentence, or character cutoff. Ask one clarifying question when necessary.` } diff --git a/apps/desk/src/voice/dedup.ts b/apps/desk/src/voice/dedup.ts index cd95b31..3049f0c 100644 --- a/apps/desk/src/voice/dedup.ts +++ b/apps/desk/src/voice/dedup.ts @@ -97,3 +97,41 @@ export async function* dedupAssistantText( yield part } } + +/** + * Converts a provider-side stream failure into a short assistant reply. + * + * The AI SDK can surface provider failures either as an `error` part or by + * throwing while the stream is consumed. Passing either through leaves the + * Voice client with a user turn and no assistant turn. This boundary keeps + * provider details server-side and guarantees that the conversation returns + * to an actionable state. + */ +export async function* recoverAssistantText( + stream: AsyncIterable, + fallback: string, + onError: () => void = () => {}, +): AsyncIterable { + let template: Part | null = null + const fallbackPart = (): Part => ({ + ...(template ?? {} as Part), + type: 'text-delta', + text: fallback, + } as Part) + + try { + for await (const part of stream) { + const candidate = part as { type: string; text?: unknown } + if (candidate.type === 'text-delta') template = part + if (candidate.type === 'error') { + onError() + yield fallbackPart() + return + } + yield part + } + } catch { + onError() + yield fallbackPart() + } +} diff --git a/apps/desk/src/voice/deepgram-flux-tts.ts b/apps/desk/src/voice/deepgram-flux-tts.ts new file mode 100644 index 0000000..7a01cb0 --- /dev/null +++ b/apps/desk/src/voice/deepgram-flux-tts.ts @@ -0,0 +1,328 @@ +import type { StreamingTTSProvider, TTSProvider } from '@cloudflare/voice' + +const DEEPGRAM_FLUX_TTS_URL = 'https://api.deepgram.com/v2/speak' +const DEFAULT_MODEL = 'flux-priya-en' +const CONNECT_TIMEOUT_MS = 4_000 +const GENERATION_TIMEOUT_MS = 15_000 +const MAX_TEXT_LENGTH = 2_000 +const OUTPUT_SAMPLE_RATE = 24_000 +const MODEL_PATTERN = /^flux-[a-z0-9-]+-en$/ + +type DeepgramUpgradeResponse = { + status: number + webSocket?: WebSocket | null +} + +export type DeepgramFetch = ( + url: URL, + init: RequestInit, +) => Promise + +export type DeepgramFluxTTSOptions = { + apiKey: string + /** Flux TTS model identifier, for example `flux-priya-en`. */ + model?: string + fetcher?: DeepgramFetch +} + +type StreamCapableTTS = TTSProvider & Partial + +function isStreaming(provider: StreamCapableTTS): provider is TTSProvider & StreamingTTSProvider { + return typeof provider.synthesizeStream === 'function' +} + +async function* providerStream( + provider: StreamCapableTTS, + text: string, + signal?: AbortSignal, +): AsyncGenerator { + if (isStreaming(provider)) { + yield* provider.synthesizeStream(text, signal) + return + } + + const audio = await provider.synthesize(text, signal) + if (audio) yield audio +} + +export class FallbackTTS implements TTSProvider, StreamingTTSProvider { + constructor( + readonly primary: StreamCapableTTS, + readonly fallback: StreamCapableTTS, + ) {} + + async synthesize(text: string, signal?: AbortSignal): Promise { + const audio = await this.primary.synthesize(text, signal) + if (audio || signal?.aborted) return audio + return this.fallback.synthesize(text, signal) + } + + async *synthesizeStream(text: string, signal?: AbortSignal): AsyncGenerator { + let producedAudio = false + for await (const audio of providerStream(this.primary, text, signal)) { + producedAudio = true + yield audio + } + if (producedAudio || signal?.aborted) return + yield* providerStream(this.fallback, text, signal) + } +} + +type WorkersAIBinding = { + run( + model: string, + input: Record, + options?: Record, + ): Promise +} + +/** Cloudflare-hosted Aura fallback that matches Flux's raw PCM wire format. */ +export class WorkersAIPcmTTS implements TTSProvider { + constructor( + readonly ai: WorkersAIBinding, + readonly speaker = 'harmonia', + ) {} + + async synthesize(text: string, signal?: AbortSignal): Promise { + const speech = normalizeSpeech(text) + if (!speech) return null + if (speech.length > MAX_TEXT_LENGTH) { + logTTSFailure('workers_ai_aura_2', { reason: 'input_too_long' }) + return null + } + + try { + const response = await this.ai.run( + '@cf/deepgram/aura-2-en', + { + text: speech, + speaker: this.speaker, + encoding: 'linear16', + container: 'none', + sample_rate: OUTPUT_SAMPLE_RATE, + }, + { returnRawResponse: true, ...(signal ? { signal } : {}) }, + ) as Response + if (!response.ok) { + logTTSFailure('workers_ai_aura_2', { status: response.status }) + return null + } + const audio = await response.arrayBuffer() + return audio.byteLength > 0 ? audio : null + } catch (error) { + if (signal?.aborted) return null + logTTSFailure('workers_ai_aura_2', { + reason: error instanceof Error && error.name === 'AbortError' ? 'timeout' : 'provider', + }) + return null + } + } +} + +class AudioFrameQueue { + readonly #frames: ArrayBuffer[] = [] + readonly #waiters = new Set<() => void>() + #closed = false + #error: Error | null = null + + push(frame: ArrayBuffer): void { + if (this.#closed) return + this.#frames.push(frame) + this.#wake() + } + + finish(): void { + this.#closed = true + this.#wake() + } + + fail(error: Error): void { + this.#error = error + this.#closed = true + this.#wake() + } + + async next(): Promise> { + while (this.#frames.length === 0 && !this.#closed) { + await new Promise((resolve) => this.#waiters.add(resolve)) + } + const frame = this.#frames.shift() + if (frame) return { done: false, value: frame } + if (this.#error) throw this.#error + return { done: true, value: undefined } + } + + #wake(): void { + for (const resolve of this.#waiters) resolve() + this.#waiters.clear() + } +} + +/** + * Indian-English Flux TTS over Deepgram's voice-agent WebSocket. Audio is + * yielded as 24 kHz PCM frames so the Cloudflare Voice client can begin + * playback before the complete sentence has been synthesized. + */ +export class DeepgramFluxTTS implements TTSProvider, StreamingTTSProvider { + readonly model: string + readonly #apiKey: string + readonly #fetch: DeepgramFetch + + constructor(options: DeepgramFluxTTSOptions) { + const apiKey = options.apiKey.trim() + if (!apiKey) throw new Error('Deepgram Flux TTS requires an API key') + + const model = (options.model ?? DEFAULT_MODEL).trim().toLowerCase() + if (!MODEL_PATTERN.test(model)) { + throw new Error('Deepgram Flux TTS model must match flux-{voice}-en') + } + + this.#apiKey = apiKey + this.model = model + this.#fetch = options.fetcher ?? (async (url, init) => { + const response = await fetch(url, init) + return response as Response & { webSocket?: WebSocket | null } + }) + } + + async synthesize(text: string, signal?: AbortSignal): Promise { + const frames: ArrayBuffer[] = [] + let byteLength = 0 + for await (const frame of this.synthesizeStream(text, signal)) { + frames.push(frame) + byteLength += frame.byteLength + } + if (byteLength === 0) return null + + const joined = new Uint8Array(byteLength) + let offset = 0 + for (const frame of frames) { + joined.set(new Uint8Array(frame), offset) + offset += frame.byteLength + } + return joined.buffer + } + + async *synthesizeStream(text: string, signal?: AbortSignal): AsyncGenerator { + const speech = normalizeSpeech(text) + if (!speech) return + if (speech.length > MAX_TEXT_LENGTH) { + logTTSFailure('deepgram_flux', { reason: 'input_too_long' }) + return + } + + const url = new URL(DEEPGRAM_FLUX_TTS_URL) + url.searchParams.set('model', this.model) + url.searchParams.set('encoding', 'linear16') + url.searchParams.set('sample_rate', String(OUTPUT_SAMPLE_RATE)) + + const connectTimeout = AbortSignal.timeout(CONNECT_TIMEOUT_MS) + const connectSignal = signal ? AbortSignal.any([signal, connectTimeout]) : connectTimeout + let socket: WebSocket | null = null + let generationTimeout: ReturnType | null = null + + try { + const response = await this.#fetch(url, { + headers: { + Authorization: `Token ${this.#apiKey}`, + Upgrade: 'websocket', + }, + signal: connectSignal, + }) + socket = response.webSocket ?? null + if (!socket) { + logTTSFailure('deepgram_flux', { status: response.status }) + return + } + + socket.binaryType = 'arraybuffer' + socket.accept() + const frames = new AudioFrameQueue() + let completed = false + + const onAbort = () => { + frames.finish() + socket?.close(1000, 'interrupted') + } + signal?.addEventListener('abort', onAbort, { once: true }) + + socket.addEventListener('message', (event) => { + if (event.data instanceof ArrayBuffer) { + frames.push(event.data) + return + } + if (ArrayBuffer.isView(event.data)) { + const view = event.data as ArrayBufferView + frames.push(view.buffer.slice(view.byteOffset, view.byteOffset + view.byteLength) as ArrayBuffer) + return + } + if (typeof event.data !== 'string') return + const message = parseControlMessage(event.data) + if (message === 'SpeechMetadata') { + completed = true + frames.finish() + } else if (message === 'Error') { + frames.fail(new Error('provider')) + } + }) + socket.addEventListener('error', () => frames.fail(new Error('network'))) + socket.addEventListener('close', () => { + if (!completed && !signal?.aborted) frames.fail(new Error('closed')) + else frames.finish() + }) + + generationTimeout = setTimeout( + () => frames.fail(new DOMException('TTS generation timed out', 'TimeoutError')), + GENERATION_TIMEOUT_MS, + ) + socket.send(JSON.stringify({ type: 'Speak', text: speech })) + socket.send(JSON.stringify({ type: 'Flush' })) + + while (true) { + const next = await frames.next() + if (next.done) break + yield next.value + } + + if (!signal?.aborted) socket.send(JSON.stringify({ type: 'Close' })) + signal?.removeEventListener('abort', onAbort) + } catch (error) { + if (!signal?.aborted) { + logTTSFailure('deepgram_flux', { + reason: error instanceof Error && error.name === 'TimeoutError' + ? 'timeout' + : error instanceof Error && error.message === 'provider' + ? 'provider' + : 'network', + }) + } + } finally { + if (generationTimeout !== null) clearTimeout(generationTimeout) + if (socket && socket.readyState < WebSocket.CLOSING) socket.close(1000, 'complete') + } + } +} + +function normalizeSpeech(text: string): string { + return text.replace(/\s+/g, ' ').trim() +} + +function parseControlMessage(value: string): string | null { + try { + const parsed = JSON.parse(value) as { type?: unknown } + return typeof parsed.type === 'string' ? parsed.type : null + } catch { + return null + } +} + +function logTTSFailure(provider: string, detail: { status?: number; reason?: string }): void { + console.error(JSON.stringify({ event: 'voice_tts_failed', provider, ...detail })) +} + +export function deepgramFluxTTSModel(configured: string | undefined): string { + const model = configured?.trim().toLowerCase() + return model && MODEL_PATTERN.test(model) ? model : DEFAULT_MODEL +} + +export const VOICE_OUTPUT_SAMPLE_RATE = OUTPUT_SAMPLE_RATE diff --git a/apps/desk/src/voice/demo-agent.ts b/apps/desk/src/voice/demo-agent.ts index 6660e0c..04df48f 100644 --- a/apps/desk/src/voice/demo-agent.ts +++ b/apps/desk/src/voice/demo-agent.ts @@ -2,7 +2,7 @@ import { Agent, type Connection, type ConnectionContext, type WSMessage } from ' import { withVoice, WorkersAIFluxSTT, - WorkersAITTS, + type TTSProvider, type VoiceTurnContext, } from '@cloudflare/voice' import { stepCountIs, streamText, tool } from 'ai' @@ -28,8 +28,16 @@ import { } from './escalation' import { claimVoiceTicketCapacity, openVoiceSupportCase } from './support' import { + budgetBundleReply, directVoiceResponse, + inrBudgetFromTranscript, + isHelpCenterSupportRequest, + isStorefrontShoppingRequest, + productDiscoveryReply, + productComparisonReply, + productComparisonTerms, prepareVoiceModelMessages, + speechText, UNDOCUMENTED_PRODUCT_FORM_REPLY, UNDOCUMENTED_PRODUCT_SIGNIN_ORDER_REPLY, UNDOCUMENTED_PRODUCT_SIGNIN_TICKET_REPLY, @@ -37,6 +45,12 @@ import { voiceAgentSystemPrompt, } from './conversation' import { shopifyConfigured } from '../integrations/shopify' +import { + getStorefrontProduct, + searchStorefrontProducts, + shopifyStorefrontConfigured, + shopifyStorefrontProfileUrl, +} from '../integrations/shopify-storefront' import { bareOrderNumber, findOrderNumber, @@ -45,7 +59,14 @@ import { orderStatusForSession, orderStatusReply, } from './orders' -import { dedupAssistantText } from './dedup' +import { dedupAssistantText, recoverAssistantText } from './dedup' +import { + DeepgramFluxTTS, + FallbackTTS, + VOICE_OUTPUT_SAMPLE_RATE, + WorkersAIPcmTTS, + deepgramFluxTTSModel, +} from './deepgram-flux-tts' import { SHOPIFY_CUSTOMER_SESSION_COOKIE, shopifyCustomerConfigured, @@ -54,7 +75,12 @@ import { type ShopifyCustomerSession, } from '../identity/shopify-customer' -const VoiceAgent = withVoice(Agent, { historyLimit: 16, maxMessageCount: 80 }) +const VoiceAgent = withVoice(Agent, { + historyLimit: 16, + maxMessageCount: 80, + audioFormat: 'pcm16', + sampleRate: VOICE_OUTPUT_SAMPLE_RATE, +}) const LOCAL_SECRET = 'able-local-capability-secret-not-for-production' function readShopifyCustomerCookie(request: Request): string | null { @@ -122,16 +148,40 @@ function cleanError(): string { return 'Voice support could not complete that action. Please use the support request form.' } +const DEFAULT_VOICE_KEYTERMS = ['printer', 'router', 'paper tray'] + +export function voiceKeyterms(configured: string | undefined): string[] { + const terms = (configured ?? '') + .split(',') + .map((term) => term.replace(/\s+/g, ' ').trim()) + .filter((term) => term.length >= 2 && term.length <= 60) + const unique = [...new Set(terms)].slice(0, 30) + return unique.length > 0 ? unique : DEFAULT_VOICE_KEYTERMS +} + export class AbleDeskAgent extends VoiceAgent { transcriber = new WorkersAIFluxSTT(this.env.AI, { - eotThreshold: 0.7, - keyterms: ['printer', 'router', 'paper tray'], + keyterms: voiceKeyterms(this.env.ABLE_VOICE_KEYTERMS), }) - tts = new WorkersAITTS(this.env.AI, { speaker: 'asteria' }) + tts: TTSProvider = this.#tts() #activeSpeaker: string | null = null + #tts(): TTSProvider { + const cloudflare = new WorkersAIPcmTTS(this.env.AI) + const apiKey = this.env.DEEPGRAM_API_KEY?.trim() + if (!apiKey) return cloudflare + + return new FallbackTTS( + new DeepgramFluxTTS({ + apiKey, + model: deepgramFluxTTSModel(this.env.ABLE_VOICE_TTS_MODEL), + }), + cloudflare, + ) + } + onConnect(connection: Connection, context: ConnectionContext): void { const url = new URL(context.request.url) connection.setState({ @@ -218,6 +268,31 @@ export class AbleDeskAgent extends VoiceAgent { return bounded.length >= 2 ? bounded : null } + beforeSynthesize(text: string): string | null { + return speechText(text) + } + + #showProducts(connection: Connection, products: Array<{ + handle: string + title: string + availableForSale: boolean + priceRange: { min: { amount: string; currencyCode: string }; max: { amount: string; currencyCode: string } } + url: string | null + image: { url: string; altText: string | null } | null + }>): void { + connection.send(JSON.stringify({ + type: 'voice_products', + products: products.map((product) => ({ + handle: product.handle, + title: product.title, + availableForSale: product.availableForSale, + priceRange: product.priceRange, + url: product.url, + image: product.image, + })), + })) + } + async onTurn(transcript: string, context: VoiceTurnContext) { const state = connectionState(context.connection) if (state.sessionProofPassed !== true) { @@ -240,9 +315,9 @@ export class AbleDeskAgent extends VoiceAgent { const messages = context.messages.map(({ role, content }) => ({ role, content })) // The client sends this as its first turn after returning from the hosted - // store login; escalations and order flows complete deterministically, - // while a pending ticket request falls through to the model, which holds - // the original request in history and the create_ticket tool. + // store login. Escalations, ordinary ticket requests, and order flows all + // complete deterministically; verified actions must never depend on the + // model remembering to call the corresponding tool after navigation. if (transcript.trim() === SIGN_IN_CONTINUATION) { const continuationReply = await this.#completeSignInContinuation(context.connection, shopifyCustomer, contact) if (continuationReply !== null) return continuationReply @@ -281,7 +356,11 @@ export class AbleDeskAgent extends VoiceAgent { } } + const settings = await loadWorkspaceSettings(this.env.DB) + const storefrontOrigin = settings.portalBaseUrl ?? state.origin const ordersAvailable = shopifyConfigured(this.env) + const storefrontProfileUrl = shopifyStorefrontProfileUrl(this.env, storefrontOrigin) + const productsAvailable = shopifyStorefrontConfigured(this.env, storefrontOrigin) if (!contact && ordersAvailable && signInAvailable && isOrderLookupRequest(transcript)) { await this.#patchSession({ pendingSignInReason: 'order_lookup' }) this.#requestSignIn(context.connection, 'order_lookup') @@ -309,9 +388,59 @@ export class AbleDeskAgent extends VoiceAgent { const directResponse = directVoiceResponse(transcript, messages) if (directResponse) return directResponse + const maximumINR = inrBudgetFromTranscript(transcript) + const requiresBundle = /\bmachine\b/i.test(transcript) && /\bgrinder\b/i.test(transcript) + if (productsAvailable && maximumINR !== null && requiresBundle) { + const productResult = await searchStorefrontProducts(this.env, 'machine grinder', { + profileUrl: storefrontProfileUrl, + shopperBudget: { amount: maximumINR, currencyCode: 'INR' }, + requireBundle: true, + }) + if (productResult.status === 'ok') { + const reply = budgetBundleReply(productResult.products, maximumINR) + if (reply) return reply + } + if (productResult.status === 'unavailable') { + return 'I cannot check the storefront right now. Please try again shortly.' + } + return `I did not find a verified machine-and-grinder bundle within ₹${maximumINR.toLocaleString('en-IN')}. Would you consider a hand grinder?` + } + + const comparison = productsAvailable ? productComparisonTerms(transcript) : null + if (comparison) { + const [firstTerm, secondTerm] = comparison + const [firstResult, secondResult] = await Promise.all([ + searchStorefrontProducts(this.env, firstTerm, { profileUrl: storefrontProfileUrl }), + searchStorefrontProducts(this.env, secondTerm, { profileUrl: storefrontProfileUrl }), + ]) + if (firstResult.status === 'ok' && secondResult.status === 'ok') { + const reply = productComparisonReply(firstTerm, firstResult.products, secondTerm, secondResult.products) + if (reply) return reply + } + if (firstResult.status === 'unavailable' || secondResult.status === 'unavailable') { + return 'I cannot compare those products right now. Please try again shortly.' + } + return 'I could not verify both products in the storefront. Which one should I look up first?' + } + + if (productsAvailable && isStorefrontShoppingRequest(transcript)) { + const result = await searchStorefrontProducts(this.env, transcript, { + profileUrl: storefrontProfileUrl, + ...(maximumINR === null ? {} : { shopperBudget: { amount: maximumINR, currencyCode: 'INR' } }), + }) + if (result.status === 'unavailable') return 'I cannot check the storefront right now. Please try again shortly.' + if (result.status === 'no_match') return 'I did not find a verified match in the storefront. What product type should I narrow this to?' + const visibleProducts = maximumINR === null + ? result.products + : result.products.filter((product) => product.priceRange.max.currencyCode === 'INR' + && Number(product.priceRange.max.amount) <= maximumINR) + this.#showProducts(context.connection, visibleProducts) + return productDiscoveryReply(result.products, maximumINR) + ?? 'I found matching products in the storefront. What matters most to you—budget, workflow, or size?' + } + const ordersEnabled = ordersAvailable && contact !== null let signInRequested = false - const settings = await loadWorkspaceSettings(this.env.DB) const workersAI = createWorkersAI({ binding: this.env.AI }) const result = streamText({ model: workersAI(VOICE_AGENT_MODEL, { @@ -321,10 +450,26 @@ export class AbleDeskAgent extends VoiceAgent { }), system: voiceAgentSystemPrompt(workspaceShortName(settings.displayName), { orders: ordersAvailable, + products: productsAvailable, signedIn: shopifyCustomer !== null, signInAvailable, + locale: settings.locale, + timezone: settings.timezone, }), messages: prepareVoiceModelMessages(messages), + ...((productsAvailable && isStorefrontShoppingRequest(transcript)) || isHelpCenterSupportRequest(transcript) ? { + prepareStep: ({ stepNumber }: { stepNumber: number }) => { + if (stepNumber !== 0) return { toolChoice: 'auto' as const } + return { + toolChoice: { + type: 'tool' as const, + toolName: productsAvailable && isStorefrontShoppingRequest(transcript) + ? 'search_storefront_products' + : 'search_help_center', + }, + } + }, + } : {}), tools: { search_help_center: tool({ description: 'Search the published help-centre articles for how-to steps, product care, policies, shipping, warranty, and troubleshooting. Returns article content to answer from; the matching articles are shown to the caller as links automatically.', @@ -345,12 +490,62 @@ export class AbleDeskAgent extends VoiceAgent { url: `${base}/kb/${encodeURIComponent(article.slug)}`, })), })) - return { status: 'ok', articles: articles.map(({ title, content }) => ({ title, content })) } + return { + status: 'ok', + articles: articles.map(({ title, content }) => ({ title, content })), + responseRequirement: 'Give the documented answer in natural prose and stop after the sourced step. Do not mention, offer, open, or suggest a support ticket in this reply; wait for the customer to say whether the step failed.', + } } catch { return { status: 'unavailable' } } }, }), + ...(productsAvailable ? { + search_storefront_products: tool({ + description: 'Search the public Shopify storefront for products a shopper can browse. Returns up to five relevant published products with descriptions, availability, price ranges, images, and product-page URLs. Use for product discovery, selection, comparison, pricing, or availability—not troubleshooting or policy answers. Never read or spell a URL aloud.', + inputSchema: z.object({ + query: z.string().min(2).max(120).describe('A concise natural-language product search, including the customer need or product name.'), + }), + execute: async ({ query }) => { + const maximumINR = inrBudgetFromTranscript(transcript) + const requiresBundle = /\bmachine\b/i.test(transcript) && /\bgrinder\b/i.test(transcript) + const result = await searchStorefrontProducts(this.env, requiresBundle ? 'machine grinder' : query, { + profileUrl: storefrontProfileUrl, + ...(maximumINR === null ? {} : { shopperBudget: { amount: maximumINR, currencyCode: 'INR' } }), + ...(requiresBundle ? { requireBundle: true } : {}), + }) + if (result.status === 'ok') { + this.#showProducts(context.connection, result.products) + } + if (maximumINR === null || result.status !== 'ok') return result + const withinBudget = result.products.filter((product) => { + if (product.priceRange.max.currencyCode !== 'INR') return false + const maximum = Number(product.priceRange.max.amount) + return Number.isFinite(maximum) && maximum <= maximumINR + }) + return { + ...result, + budgetEvidence: { + maximumINR, + withinBudgetHandles: withinBudget.map((product) => product.handle), + bundleWithinBudgetHandles: withinBudget + .filter((product) => product.productType?.toLowerCase() === 'bundle' + || /\b(?:bundle|combo|with|kit)\b/i.test(product.title)) + .map((product) => product.handle), + note: 'Budget fit applies to one returned product. Do not add separate product prices.', + }, + } + }, + }), + get_storefront_product: tool({ + description: 'Fetch bounded public storefront detail for one opaque product reference returned by search_storefront_products. Use when the caller selects a result or asks about its options, variants, price, availability, or description.', + inputSchema: z.object({ + reference: z.string().min(20).max(500).regex(/^shopify_product_[A-Za-z0-9_-]+$/) + .describe('The exact opaque product reference returned by search_storefront_products.'), + }), + execute: async ({ reference }) => getStorefrontProduct(this.env, reference, { profileUrl: storefrontProfileUrl }), + }), + } : {}), ...(shopifyCustomer ? { list_my_orders: tool({ description: "List the signed-in caller's most recent orders: names, dates, payment and fulfillment status, totals, and tracking. Use when they ask about an order without giving a number, then confirm which order they mean. Returns only the signed-in caller's own orders.", @@ -367,7 +562,18 @@ export class AbleDeskAgent extends VoiceAgent { inputSchema: z.object({ orderNumber: z.string().min(1).max(32).describe("The customer's order number from their confirmation email, e.g. #1234."), }), - execute: async ({ orderNumber }) => orderStatusForSession(this.env, { email: contact?.email ?? null }, orderNumber), + execute: async ({ orderNumber }) => { + const order = await orderStatusForSession(this.env, { email: contact?.email ?? null }, orderNumber) + if (order.status === 'not_found') return { + ...order, + responseRequirement: 'Say the order was not found for this store account, mention it may use a different checkout email, and offer to open a support ticket. Do not offer another lookup instead.', + } + if (order.status === 'unavailable') return { + ...order, + responseRequirement: 'Say order lookup is temporarily unavailable and offer to open a support ticket. Do not ask for an email address.', + } + return order + }, }), } : {}), ...(contact ? { @@ -414,7 +620,16 @@ export class AbleDeskAgent extends VoiceAgent { : reason === 'product_help' && ordersAvailable ? 'order_lookup' : 'open_ticket' - await this.#patchSession({ pendingSignInReason: continuationReason }) + await this.#patchSession({ + pendingSignInReason: continuationReason, + ...(continuationReason === 'open_ticket' ? { + pendingEscalation: { + category: classifyEscalation(transcript) ?? 'explicit_human_request', + customerMessage: transcript, + requestId: turnRequestId, + }, + } : {}), + }) this.#requestSignIn(context.connection, continuationReason) return reason === 'product_help' ? { status: 'requested', responseRequirement: `Reply exactly: "${ordersAvailable ? UNDOCUMENTED_PRODUCT_SIGNIN_ORDER_REPLY : UNDOCUMENTED_PRODUCT_SIGNIN_TICKET_REPLY}"` } @@ -424,7 +639,9 @@ export class AbleDeskAgent extends VoiceAgent { } : {}), }), }, - maxOutputTokens: 120, + // This bounds runaway model generation; TTS still speaks every generated + // sentence and never applies its own character or sentence cutoff. + maxOutputTokens: 512, temperature: 0, stopWhen: stepCountIs(4), abortSignal: context.signal, @@ -433,7 +650,11 @@ export class AbleDeskAgent extends VoiceAgent { // At temperature 0 the model sometimes restates its pre-tool-call sentence // verbatim after the tool result; the wrapper drops exact repeats within // the turn before they reach TTS and the transcript. - const stream = dedupAssistantText(result.fullStream) + const stream = recoverAssistantText( + dedupAssistantText(result.fullStream), + 'I couldn’t finish that answer just now. Please try again, or contact support if it keeps happening.', + () => console.warn(JSON.stringify({ event: 'voice_model_stream', outcome: 'provider_error' })), + ) if (contact) return stream // Safety net for the anonymous branch: the model occasionally speaks the @@ -530,8 +751,7 @@ export class AbleDeskAgent extends VoiceAgent { return ordersOverviewReply(overview.customer.orders) } - // A pending ticket request (or no pending flow at all) continues with the - // model: the original ask is in the conversation history. + // No pending verified action remains; ordinary conversation can continue. return null } diff --git a/apps/desk/src/voice/demo-client.ts b/apps/desk/src/voice/demo-client.ts index 519810a..3b905c0 100644 --- a/apps/desk/src/voice/demo-client.ts +++ b/apps/desk/src/voice/demo-client.ts @@ -1,5 +1,6 @@ import { VoiceClient, type TranscriptMessage, type VoiceStatus } from '@cloudflare/voice/client' import './demo.css' +import { renderStreamingMarkdown } from '../ui/markdown-client' import { SIGN_IN_CONTINUATION } from './contact' import { HUMAN_HELP_MESSAGE } from './escalation' @@ -20,7 +21,7 @@ const elements = { landingMicButton: required('#landing-mic-button'), humanHelpButton: required('#human-help-button'), conversationHumanButton: required('#conversation-human-button'), - landingStatus: required('#landing-status'), + landingStatusCopy: required('#landing-status-copy'), composerBar: required('#composer-bar'), signinFlow: required('#signin-flow'), signinLead: required('#signin-card-lead'), @@ -42,6 +43,7 @@ const elements = { } const supportTaskButtons = [...document.querySelectorAll('[data-support-message]')] +const voiceInputAvailable = elements.app.dataset.voiceInput !== 'unavailable' const RESET_FOCUS_KEY = 'able-voice-support-reset-focus' @@ -84,16 +86,32 @@ type SignInReason = 'order_lookup' | 'open_ticket' let signinReason: SignInReason | null = null type SourceArticle = { title: string; section: string; url: string } +type ProductCard = { + handle: string + title: string + availableForSale: boolean + price: string + url: string | null + image: { url: string; altText: string } | null +} let latestMessages: TranscriptMessage[] = [] const hiddenTranscriptMessages = new Set() let notes: { anchor: number; text: string }[] = [] let sources: { anchor: number; articles: SourceArticle[] }[] = [] +let products: { anchor: number; items: ProductCard[] }[] = [] let ticketAnchor: number | null = null let signinAnchor: number | null = null let interimText = '' let typing = false +let queuedMessage: string | null = null +let queuedMessageSent = false +let awaitingReply = false +let replyFailed = false let resetReload: ReturnType | null = null +let connectionDelayTimer: ReturnType | null = null +let replyDelayTimer: ReturnType | null = null +let replyTimeoutTimer: ReturnType | null = null const reducedMotion = window.matchMedia('(prefers-reduced-motion: reduce)') const viewportListenerAbort = new AbortController() @@ -123,6 +141,53 @@ function isReady(): boolean { return connected && sessionReady } +type ConnectionStage = 'connecting' | 'verifying' | 'ready' | 'reconnecting' | 'error' + +function setConnectionStage(stage: ConnectionStage, copy: string): void { + elements.app.dataset.connection = stage + elements.landingStatusCopy.textContent = copy +} + +function clearConnectionDelay(): void { + if (connectionDelayTimer === null) return + clearTimeout(connectionDelayTimer) + connectionDelayTimer = null +} + +function scheduleConnectionDelay(): void { + clearConnectionDelay() + connectionDelayTimer = setTimeout(() => { + connectionDelayTimer = null + if (isReady()) return + setConnectionStage( + hasConnected ? 'verifying' : 'connecting', + 'Still connecting — you can ask now. Your question will send automatically.', + ) + }, 1_200) +} + +function clearReplyWait(): void { + awaitingReply = false + if (replyDelayTimer !== null) clearTimeout(replyDelayTimer) + if (replyTimeoutTimer !== null) clearTimeout(replyTimeoutTimer) + replyDelayTimer = null + replyTimeoutTimer = null +} + +function beginReplyWait(): void { + clearReplyWait() + replyFailed = false + awaitingReply = true + replyDelayTimer = setTimeout(() => { + replyDelayTimer = null + if (awaitingReply) pushNote('Ava is checking this now — some answers take a little longer.') + }, 6_000) + replyTimeoutTimer = setTimeout(() => { + replyTimeoutTimer = null + if (awaitingReply) pushNote('This is taking longer than usual. You can try again or contact support.') + }, 18_000) +} + function reloadFreshSession(): void { try { sessionStorage.setItem(RESET_FOCUS_KEY, '1') @@ -168,14 +233,14 @@ function messageRow(message: TranscriptMessage): HTMLLIElement { row.className = `answer-turn answer-turn--${assistant ? 'assistant' : 'user'}` const label = document.createElement('p') label.className = 'turn-label' - label.textContent = assistant ? 'Answer' : 'You asked' + label.textContent = assistant ? 'Ava' : 'You' const copy = document.createElement('div') copy.className = 'turn-copy' - const text = document.createElement(assistant ? 'p' : 'h2') - text.textContent = message.text + const text = document.createElement(assistant ? 'div' : 'h2') + if (assistant) renderStreamingMarkdown(text, message.text) + else text.textContent = message.text copy.append(srLabel(assistant ? 'Ava: ' : 'You: '), text) - if (assistant) row.append(label) - row.append(copy) + row.append(label, copy) return row } @@ -194,12 +259,27 @@ function pendingRow(text: string): HTMLLIElement { return row } -function typingRow(): HTMLLIElement { +function queuedMessageRow(text: string): HTMLLIElement { + const row = document.createElement('li') + row.className = 'answer-turn answer-turn--user answer-turn--pending' + const label = document.createElement('p') + label.className = 'turn-label' + label.textContent = 'You' + const content = document.createElement('div') + content.className = 'turn-copy' + const copy = document.createElement('h2') + copy.textContent = text + content.append(srLabel('You: '), copy) + row.append(label, content) + return row +} + +function typingRow(activity = 'Ava is working on this…'): HTMLLIElement { const row = document.createElement('li') row.className = 'answer-turn answer-turn--assistant' const label = document.createElement('p') label.className = 'turn-label' - label.textContent = 'Answer' + label.textContent = 'Ava' const bubble = document.createElement('div') bubble.className = 'turn-copy typing-bubble' const dots = document.createElement('span') @@ -210,7 +290,11 @@ function typingRow(): HTMLLIElement { still.className = 'typing-static' still.setAttribute('aria-hidden', 'true') still.textContent = '…' - bubble.append(dots, still, srLabel('Ava is typing')) + const activityCopy = document.createElement('span') + activityCopy.className = 'typing-copy' + activityCopy.setAttribute('aria-hidden', 'true') + activityCopy.textContent = activity + bubble.append(dots, still, activityCopy, srLabel(activity)) row.append(label, bubble) return row } @@ -267,6 +351,43 @@ function sourcesRow(anchor: number, articles: SourceArticle[], open: boolean): H return row } +function productsRow(items: ProductCard[]): HTMLLIElement { + const row = document.createElement('li') + row.className = 'products-row' + const list = document.createElement('div') + list.className = 'product-results' + list.setAttribute('aria-label', 'Products from the storefront') + for (const product of items) { + const card = document.createElement(product.url ? 'a' : 'article') + card.className = 'product-result' + if (card instanceof HTMLAnchorElement && product.url) { + card.href = product.url + card.target = '_blank' + card.rel = 'noopener' + } + if (product.image) { + const image = document.createElement('img') + image.src = product.image.url + image.alt = product.image.altText + image.loading = 'lazy' + card.append(image) + } + const copy = document.createElement('span') + copy.className = 'product-result-copy' + const title = document.createElement('strong') + title.textContent = product.title + const price = document.createElement('span') + price.textContent = product.price + const availability = document.createElement('small') + availability.textContent = product.availableForSale ? 'Available' : 'Currently unavailable' + copy.append(title, price, availability) + card.append(copy) + list.append(card) + } + row.append(list) + return row +} + function setConversationMode(active: boolean, focus = false): void { syncSupportViewport() elements.app.dataset.view = active ? 'conversation' : 'landing' @@ -315,6 +436,9 @@ function renderThread(): void { rows.push(sourcesRow(entry.anchor, entry.articles, sourceOpenState.get(entry.anchor) ?? true)) } } + for (const entry of products) { + if (entry.anchor <= length && entry.anchor === index) rows.push(productsRow(entry.items)) + } if (signinAnchor !== null && signinAnchor <= length && signinAnchor === index) { elements.signinFlow.hidden = false rows.push(elements.signinFlow) @@ -333,7 +457,11 @@ function renderThread(): void { } pushExtras(length) if (interimText) rows.push(pendingRow(interimText)) - if (typing) rows.push(typingRow()) + if (queuedMessage !== null && !latestMessages.some((message) => message.role === 'user' && message.text === queuedMessage)) { + rows.push(queuedMessageRow(queuedMessage)) + } + if (queuedMessage !== null && !queuedMessageSent) rows.push(typingRow('Connecting securely…')) + else if (typing) rows.push(typingRow()) elements.transcript.replaceChildren(...rows) if (stick) scrollToBottom() } @@ -361,26 +489,27 @@ function updateControls(status: VoiceStatus): void { } const busyWithoutCall = !callActive && status !== 'idle' const ready = isReady() - elements.micButton.disabled = !ready || busyWithoutCall - elements.landingMicButton.disabled = !ready || busyWithoutCall + const canAcceptMessage = queuedMessage === null + elements.micButton.disabled = !voiceInputAvailable || !ready || busyWithoutCall + elements.landingMicButton.disabled = !voiceInputAvailable || !ready || busyWithoutCall for (const mic of [elements.micButton, elements.landingMicButton]) { mic.classList.toggle('mic-button--active', callActive) - mic.setAttribute('aria-label', callActive ? 'Stop voice' : 'Use voice') + mic.setAttribute('aria-label', callActive ? 'Stop voice' : voiceInputAvailable ? 'Use voice' : 'Voice requires a deployed preview') mic.setAttribute('aria-pressed', String(callActive)) - mic.title = callActive ? 'Stop the voice call' : 'Talk instead of typing' + mic.title = callActive ? 'Stop the voice call' : voiceInputAvailable ? 'Talk instead of typing' : 'Streaming voice is available on deployed Workers' } elements.muteButton.hidden = !callActive elements.muteButton.disabled = !ready || !callActive - elements.clearButton.disabled = !connected - elements.app.setAttribute('aria-busy', String(!ready)) + elements.clearButton.disabled = false + elements.app.setAttribute('aria-busy', String(awaitingReply || status === 'thinking')) elements.landingInput.disabled = false - elements.landingSubmit.disabled = !ready - for (const task of supportTaskButtons) task.disabled = !ready - elements.humanHelpButton.disabled = !ready + elements.landingSubmit.disabled = !canAcceptMessage + for (const task of supportTaskButtons) task.disabled = !canAcceptMessage + elements.humanHelpButton.disabled = false elements.textInput.disabled = false - elements.textSubmit.disabled = !ready - elements.conversationHumanButton.disabled = !ready - const nowTyping = status === 'thinking' + elements.textSubmit.disabled = !canAcceptMessage + elements.conversationHumanButton.disabled = !canAcceptMessage + const nowTyping = !replyFailed && (status === 'thinking' || awaitingReply) if (nowTyping !== typing) { typing = nowTyping renderThread() @@ -506,6 +635,15 @@ const SESSION_ERROR_COPY: Record = { turnstile_not_configured: 'This chat is not fully set up yet. Please try again later.', } +function flushQueuedMessage(): void { + if (!isReady() || queuedMessage === null || queuedMessageSent) return + queuedMessageSent = true + beginReplyWait() + client.sendText(queuedMessage) + renderThread() + updateControls(client.status) +} + function renderTicket(value: unknown): void { if (!value || typeof value !== 'object') return const ticket = value as { reference?: unknown; label?: unknown; status?: unknown } @@ -524,9 +662,11 @@ function renderCustomMessage(value: unknown): void { const message = value as Record if (message.type === 'voice_session_ready') { sessionReady = true + clearConnectionDelay() + setConnectionStage('ready', queuedMessage === null ? 'Ava is ready.' : 'Ava is ready — sending your question…') elements.sessionTurnstile.hidden = true - elements.landingStatus.textContent = '' updateControls(client.status) + flushQueuedMessage() if (signInContinuationPending) { // Back from the hosted store login: resume the interrupted flow. This is // a machine-readable continuation, not customer copy. @@ -541,9 +681,10 @@ function renderCustomMessage(value: unknown): void { } if (message.type === 'voice_session_error' || message.type === 'voice_session_required') { sessionReady = false + clearConnectionDelay() const reason = typeof message.reason === 'string' ? message.reason : '' const copy = SESSION_ERROR_COPY[reason] ?? 'The anti-spam check could not be completed. Reload the page to try again.' - elements.landingStatus.textContent = copy + setConnectionStage('error', copy) if (elements.app.dataset.view === 'conversation') pushNote(copy) updateControls(client.status) return @@ -580,9 +721,58 @@ function renderCustomMessage(value: unknown): void { } return } + if (message.type === 'voice_products') { + const items = (Array.isArray(message.products) ? message.products : []) + .flatMap((entry): ProductCard[] => { + if (!entry || typeof entry !== 'object') return [] + const record = entry as Record + const range = record.priceRange && typeof record.priceRange === 'object' + ? record.priceRange as Record + : null + const min = range?.min && typeof range.min === 'object' ? range.min as Record : null + const max = range?.max && typeof range.max === 'object' ? range.max as Record : null + if (typeof record.handle !== 'string' || typeof record.title !== 'string' + || typeof record.availableForSale !== 'boolean' || typeof min?.amount !== 'string' + || typeof min.currencyCode !== 'string' || typeof max?.amount !== 'string') return [] + const safeUrl = safeArticleUrl(record.url) + const rawImage = record.image && typeof record.image === 'object' ? record.image as Record : null + const imageUrl = safeArticleUrl(rawImage?.url) + const money = new Intl.NumberFormat('en-IN', { + style: 'currency', + currency: min.currencyCode, + maximumFractionDigits: 2, + }) + const low = Number(min.amount) + const high = Number(max.amount) + const price = Number.isFinite(low) && Number.isFinite(high) + ? low === high ? money.format(low) : `${money.format(low)}–${money.format(high)}` + : `${min.currencyCode} ${min.amount}` + return [{ + handle: record.handle, + title: record.title, + availableForSale: record.availableForSale, + price, + url: safeUrl, + image: imageUrl ? { + url: imageUrl, + altText: typeof rawImage?.altText === 'string' ? rawImage.altText : '', + } : null, + }] + }) + .slice(0, 5) + if (items.length > 0) { + const anchor = afterReplyAnchor() + const existing = products.find((entry) => entry.anchor === anchor) + if (existing) existing.items = items + else products.push({ anchor, items }) + renderThread() + } + return + } if (message.type === 'demo_session_cleared') { ticketAnchor = null sources = [] + products = [] elements.handoffCard.hidden = true hideSignInCard() renderThread() @@ -605,18 +795,43 @@ client.addEventListener('connectionchange', (isConnected) => { // starts unproven, so run the invisible session check again. sessionReady = false elements.sessionTurnstile.hidden = false + setConnectionStage('verifying', 'Secure connection found — finishing setup…') + scheduleConnectionDelay() beginSessionProof() } else { callActive = false sessionReady = false - if (hasConnected) elements.reconnectBanner.hidden = false + if (hasConnected) { + elements.reconnectBanner.hidden = false + setConnectionStage('reconnecting', 'Connection interrupted. Your question will send when Ava is back.') + } else { + setConnectionStage('connecting', 'Ava is getting ready — you can ask now.') + } + scheduleConnectionDelay() } updateControls(client.status) }) client.addEventListener('statuschange', updateControls) client.addEventListener('transcriptchange', (messages) => { + const receivedReply = messages.some((message, index) => ( + message.role === 'assistant' + && latestMessages[index]?.text !== message.text + )) + const receivedCustomerTurn = messages.some((message, index) => ( + message.role === 'user' + && latestMessages[index]?.text !== message.text + )) latestMessages = messages + if (receivedCustomerTurn) replyFailed = false + if (queuedMessageSent && queuedMessage !== null && messages.some((message) => ( + message.role === 'user' && message.text === queuedMessage + ))) { + queuedMessage = null + queuedMessageSent = false + } + if (receivedReply) clearReplyWait() if (messages.length > 0) setConversationMode(true) + updateControls(client.status) renderThread() }) client.addEventListener('interimtranscript', (text) => { @@ -629,8 +844,17 @@ client.addEventListener('mutechange', (muted) => { client.addEventListener('custommessage', renderCustomMessage) client.addEventListener('error', (error) => { if (!error) return - if (elements.app.dataset.view === 'landing') elements.landingStatus.textContent = error - else pushNote(error) + clearReplyWait() + replyFailed = true + if (queuedMessageSent) { + queuedMessage = null + queuedMessageSent = false + } + const copy = 'Ava couldn’t finish that answer. Please try again, or contact support if it keeps happening.' + if (elements.app.dataset.view === 'landing') setConnectionStage('error', copy) + else pushNote(copy) + updateControls(client.status) + renderThread() }) async function toggleVoice(): Promise { @@ -657,12 +881,16 @@ elements.signinButton.addEventListener('click', beginStoreSignIn) elements.clearButton.addEventListener('click', () => { if (callActive) client.endCall() callActive = false + clearReplyWait() + queuedMessage = null + queuedMessageSent = false elements.clearButton.disabled = true client.sendJSON({ type: 'clear_demo_session' }) resetReload = setTimeout(reloadFreshSession, 2_000) latestMessages = [] notes = [] sources = [] + products = [] ticketAnchor = null elements.handoffCard.hidden = true hideSignInCard() @@ -677,16 +905,27 @@ elements.clearButton.addEventListener('click', () => { }) function sendMessage(message: string): boolean { - if (!message || !isReady()) return false + if (!message || queuedMessage !== null) return false setConversationMode(true) - client.sendText(message) + if (isReady()) { + beginReplyWait() + client.sendText(message) + } else { + queuedMessage = message + queuedMessageSent = false + setConnectionStage( + connected ? 'verifying' : hasConnected ? 'reconnecting' : 'connecting', + 'Your question is saved and will send as soon as Ava is ready.', + ) + } + updateControls(client.status) + renderThread() return true } function focusSupportRequest(): void { - if (!isReady()) return elements.landingInput.placeholder = 'Briefly describe what you need help with' - elements.landingStatus.textContent = 'Describe the issue first. Ava will ask you to sign in only if a private request is needed.' + elements.landingStatusCopy.textContent = 'Describe the issue first. Ava will ask you to sign in only if a private request is needed.' elements.landingInput.focus() } @@ -704,10 +943,6 @@ elements.landingForm.addEventListener('submit', (event) => { event.preventDefault() const message = elements.landingInput.value.trim() if (!message) return - if (!isReady()) { - elements.landingStatus.textContent = 'Preparing secure chat…' - return - } elements.landingInput.blur() if (sendMessage(message)) elements.landingInput.value = '' }) @@ -742,4 +977,6 @@ window.addEventListener('beforeunload', () => { updateControls(client.status) setConversationMode(false) +setConnectionStage('connecting', 'Ava is getting ready — you can ask now.') +scheduleConnectionDelay() client.connect() diff --git a/apps/desk/src/voice/demo-page.ts b/apps/desk/src/voice/demo-page.ts index 8a13c7a..d5b5d06 100644 --- a/apps/desk/src/voice/demo-page.ts +++ b/apps/desk/src/voice/demo-page.ts @@ -80,7 +80,15 @@ export function voiceDemoPageResponse( ordersEnabled = false, topics: VoiceHelpTopic[] = [], identity: VoiceIdentityView = { configured: false, customerName: null }, + locale = 'en', + voiceInputAvailable = true, ): Response { + const indiaExperience = locale.toLowerCase() === 'en-in' + const pageLanguage = indiaExperience ? 'en-IN' : 'en' + const askPlaceholder = indiaExperience ? 'Ask in English or Hinglish' : 'Ask anything' + const languageInvitation = indiaExperience + ? ' English ya Hinglish—jismein aap comfortable hain.' + : '' const title = /\bsupport$/i.test(branding.displayName.trim()) ? `${branding.displayName} — assistant` : `${branding.displayName} support assistant` @@ -102,6 +110,21 @@ export function voiceDemoPageResponse( Track an order ${orderTaskCopy} ` + const accountMarkup = identity.customerName + ? `` + : identity.configured + ? '' + : '' const topicMarkup = topics.length > 0 ? topics.slice(0, 9).map((topic) => `

    ${escapeText(topic.name)}

    @@ -112,7 +135,7 @@ export function voiceDemoPageResponse(
    `).join('\n ') : `

    Help articles are being prepared. Ava can still help you now.

    ` return new Response(` - + @@ -126,7 +149,7 @@ export function voiceDemoPageResponse( -
    +
    @@ -138,17 +161,13 @@ export function voiceDemoPageResponse(
    -
    - +
    @@ -156,11 +175,11 @@ export function voiceDemoPageResponse(

    How can we help?

    -

    Ask Ava anything about ${escapeText(workspaceShortName(branding.displayName))}, start a common task, or open a private support request. She answers from our help articles and can bring in the team when you need them.

    +

    Ask Ava anything about ${escapeText(workspaceShortName(branding.displayName))}, start a common task, or open a private support request. She answers from our help articles and can bring in the team when you need them.${languageInvitation}

    - -
    @@ -190,9 +212,9 @@ export function voiceDemoPageResponse( Warranty or repair Tell Ava what needs repair or what you want to claim. -
    +
    +
    + ${avatar} + AvaSales & support assistant +
    +
    + + +
    +
    +
    diff --git a/apps/desk/src/voice/demo.css b/apps/desk/src/voice/demo.css index 45fe949..7d2fea1 100644 --- a/apps/desk/src/voice/demo.css +++ b/apps/desk/src/voice/demo.css @@ -12,8 +12,9 @@ --accent-soft: color-mix(in srgb, var(--accent, #c87942) 9%, #ffffff); --accent-line: color-mix(in srgb, var(--accent, #c87942) 34%, transparent); --focus-ring: color-mix(in srgb, var(--accent, #c87942) 50%, transparent); - --surface-width: 64rem; - --answer-width: 47.5rem; + --page: color-mix(in srgb, var(--canvas, #ffffff) 94%, var(--ink, #121212)); + --surface-width: 72rem; + --answer-width: 52rem; } * { box-sizing: border-box; } @@ -23,7 +24,14 @@ html.support-conversation, body.support-conversation { overflow: hidden; overscroll-behavior: none; } -body { margin: 0; min-width: 320px; font-family: inherit; background: var(--canvas, #fff); } +body { + margin: 0; + min-width: 320px; + font-family: inherit; + background: + radial-gradient(circle at 12% 0%, var(--accent-soft), transparent 30rem), + var(--page); +} button, input { font: inherit; } button { border: 0; cursor: pointer; touch-action: manipulation; } button:disabled { cursor: not-allowed; opacity: .45; } @@ -68,16 +76,23 @@ button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visibl overflow: hidden; } -.chat-header { flex: none; padding-top: env(safe-area-inset-top); background: var(--card); } +.chat-header { + position: relative; + z-index: 10; + flex: none; + padding-top: env(safe-area-inset-top); + border-bottom: 1px solid var(--line); + background: color-mix(in srgb, var(--card) 88%, transparent); + backdrop-filter: blur(18px); +} .chat-header-inner { width: min(var(--surface-width), 100% - 40px); - min-height: 64px; + min-height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; - border-bottom: 1px solid var(--line); } .header-actions, .support-nav { display: flex; align-items: center; gap: 8px; } .support-nav a, .text-button { @@ -94,9 +109,45 @@ button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visibl white-space: nowrap; } .support-nav a:hover, .text-button:not(:disabled):hover { color: var(--ink, #121212); background: var(--soft); } +.help-centre-link::before { content: '?'; width: 20px; height: 20px; display: grid; place-items: center; margin-right: 7px; border: 1px solid var(--line-strong); border-radius: 50%; font-size: 11px; font-weight: 800; } +.account-menu { position: relative; } +.account-menu summary { + min-height: 44px; + display: flex; + align-items: center; + gap: 8px; + border-radius: 12px; + padding: 4px 8px 4px 5px; + color: var(--ink, #121212); + cursor: pointer; + list-style: none; +} +.account-menu summary::-webkit-details-marker { display: none; } +.account-menu summary:hover, .account-menu[open] summary { background: var(--soft); } +.account-avatar { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--accent-ink, #000); background: var(--accent, #c87942); font-size: 11px; font-weight: 800; } +.account-name { max-width: 10rem; overflow: hidden; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; } +.account-chevron { color: var(--muted); font-size: 14px; transition: transform .15s ease; } +.account-menu[open] .account-chevron { transform: rotate(180deg); } +.account-popover { + position: absolute; + z-index: 20; + top: calc(100% + 8px); + right: 0; + width: 220px; + overflow: hidden; + border: 1px solid var(--line); + border-radius: 14px; + padding: 8px; + background: var(--card); + box-shadow: 0 18px 50px rgba(0, 0, 0, .14); +} +.account-popover p { margin: 0; display: grid; gap: 2px; padding: 10px 10px 12px; border-bottom: 1px solid var(--line); } +.account-popover p strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; } +.account-popover p span { color: var(--muted); font-size: 11px; } +.account-popover a { width: 100%; margin-top: 6px; justify-content: flex-start; } .brand { min-width: 0; display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; } -.brand-logo { display: block; height: 28px; max-width: 150px; object-fit: contain; } +.brand-logo { display: block; height: 32px; max-width: 160px; object-fit: contain; } .brand-mark, .avatar { flex: none; display: grid; @@ -106,10 +157,10 @@ button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visibl font-size: 11px; font-weight: 800; } -.brand-mark { width: 32px; height: 32px; border-radius: 9px; } +.brand-mark { width: 36px; height: 36px; border-radius: 11px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink, #121212) 10%, transparent); } .avatar { width: 28px; height: 28px; border-radius: 50%; } .brand-text { min-width: 0; display: grid; line-height: 1.25; } -.brand-name { overflow: hidden; font-size: 15px; font-weight: 720; letter-spacing: -.01em; text-overflow: ellipsis; white-space: nowrap; } +.brand-name { overflow: hidden; font-size: 15px; font-weight: 760; letter-spacing: -.015em; text-overflow: ellipsis; white-space: nowrap; } .brand-sub { color: var(--muted); font-size: 12px; } .reconnect-banner { @@ -124,32 +175,33 @@ button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visibl } .thread { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scroll-padding-block: 24px; scrollbar-color: var(--line-strong) transparent; } -.thread-inner { width: min(var(--answer-width), 100% - 40px); margin: 0 auto; padding: 36px 0 24px; } +.thread-inner { width: min(var(--answer-width), 100% - 40px); margin: 0 auto; padding: 24px 0 28px; } .app[data-view="landing"] .thread { flex: none; overflow: visible; } -.app[data-view="landing"] .thread-inner { width: min(var(--surface-width), 100% - 40px); padding: 104px 0 80px; } +.app[data-view="landing"] .thread-inner { width: min(var(--surface-width), 100% - 40px); padding: 84px 0 80px; } +.landing-hero { max-width: 54rem; } .landing-hero h1 { max-width: 18ch; margin: 0; - font-size: clamp(2.5rem, 4vw, 3rem); - font-weight: 650; + font-size: clamp(2.75rem, 5vw, 4.5rem); + font-weight: 680; letter-spacing: -.045em; line-height: 1; } -.landing-lede { max-width: 42rem; margin: 20px 0 0; color: var(--muted); font-size: 15px; line-height: 1.55; } +.landing-lede { max-width: 46rem; margin: 22px 0 0; color: var(--muted); font-size: 16px; line-height: 1.6; } .ask-composer { width: 100%; - min-height: 52px; + min-height: 64px; margin-top: 30px; display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); - border-radius: 13px; - padding: 4px 5px 4px 10px; + border-radius: 18px; + padding: 8px 8px 8px 14px; background: #fff; - box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 6px 18px rgba(0,0,0,.06); + box-shadow: 0 1px 0 rgba(0,0,0,.04), 0 18px 50px rgba(0,0,0,.09); } .ask-composer:focus-within { border-color: var(--line-strong); box-shadow: 0 0 0 3px var(--focus-ring), 0 8px 24px rgba(0,0,0,.08); } .ask-icon { flex: none; display: grid; place-items: center; } @@ -159,14 +211,20 @@ button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visibl .ask-composer input:focus-visible { outline: 0; } .ask-composer .mic-button, .ask-composer .ask-send-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; padding: 0; } .ask-composer .mic-button { border: 0; } -.ask-send-button { border-radius: 9px; display: grid; place-items: center; } +.ask-send-button { border-radius: 13px; display: grid; place-items: center; } .landing-trust { margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; } -.landing-status { min-height: 18px; margin: 6px 0 0; color: var(--ink, #121212); font-size: 12px; font-weight: 650; line-height: 1.5; } +.landing-status { min-height: 18px; margin: 6px 0 0; display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 650; line-height: 1.5; } +.connection-dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--accent, #c87942); box-shadow: 0 0 0 4px var(--accent-soft); animation: connection-pulse 1.6s ease-in-out infinite; } +.app[data-connection="ready"] .connection-dot { background: #27844c; box-shadow: 0 0 0 4px color-mix(in srgb, #27844c 13%, transparent); animation: none; } +.app[data-connection="ready"] .landing-status { color: var(--muted); } +.app[data-connection="reconnecting"] .connection-dot, +.app[data-connection="error"] .connection-dot { background: #b45c34; box-shadow: 0 0 0 4px color-mix(in srgb, #b45c34 14%, transparent); } +@keyframes connection-pulse { 50% { opacity: .42; transform: scale(.82); } } .support-tasks { margin-top: 48px; } .support-tasks-heading .eyebrow { margin: 0; } .support-tasks-heading h2 { margin: 5px 0 0; font-size: 21px; font-weight: 670; letter-spacing: -.025em; } -.support-task-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; } +.support-task-grid { margin-top: 20px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; } .support-task { min-height: 124px; display: flex; @@ -174,16 +232,19 @@ button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visibl justify-content: space-between; gap: 16px; border: 1px solid var(--line); - border-radius: 12px; - padding: 16px; + border-radius: 16px; + padding: 18px; color: var(--ink, #121212); background: var(--card); text-align: left; text-decoration: none; + box-shadow: 0 1px 0 rgba(0, 0, 0, .02); transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease; } -.support-task:not(:disabled):hover { border-color: var(--line-strong); box-shadow: 0 6px 18px rgba(0,0,0,.06); transform: translateY(-1px); } +.support-task:not(:disabled):hover { border-color: var(--accent-line); box-shadow: 0 12px 28px rgba(0,0,0,.08); transform: translateY(-2px); } .support-task--contact { border-color: var(--accent-line); background: var(--accent-soft); } +.support-task--featured { color: var(--accent-ink, #000); background: var(--accent, #c87942); } +.support-task--featured .support-task-copy { color: color-mix(in srgb, var(--accent-ink, #000) 72%, transparent); } .support-task-title { font-size: 14px; font-weight: 720; line-height: 1.35; } .support-task-copy { color: var(--muted); font-size: 12px; line-height: 1.45; } @@ -200,13 +261,93 @@ button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visibl .topic-card li { font-size: 13px; line-height: 1.45; } .topics-empty { grid-column: 1 / -1; margin: 0; color: var(--muted); } -.thread-list { margin: 0; padding: 0 0 36px; list-style: none; display: flex; flex-direction: column; gap: 28px; } +.conversation-toolbar { + min-height: 58px; + margin-bottom: 22px; + display: flex; + align-items: center; + justify-content: space-between; + gap: 16px; + border-bottom: 1px solid var(--line); + padding-bottom: 16px; +} +.app[data-view="landing"] .conversation-toolbar { display: none; } +.conversation-agent { display: flex; align-items: center; gap: 10px; } +.conversation-agent .avatar { width: 34px; height: 34px; box-shadow: 0 0 0 4px var(--accent-soft); } +.conversation-agent > span { display: grid; gap: 1px; } +.conversation-agent strong { font-size: 14px; } +.conversation-agent small { color: var(--muted); font-size: 11.5px; } +.conversation-actions { display: flex; align-items: center; gap: 7px; } +.conversation-help-button, +.new-conversation-button { + min-height: 40px; + display: inline-flex; + align-items: center; + gap: 7px; + border: 1px solid var(--line); + border-radius: 11px; + padding: 0 12px; + color: var(--muted); + background: var(--card); + font-size: 12px; + font-weight: 680; +} +.conversation-help-button { border-color: transparent; color: var(--ink, #121212); background: var(--accent-soft); } +.conversation-help-button:not(:disabled):hover, +.new-conversation-button:not(:disabled):hover { border-color: var(--line-strong); color: var(--ink, #121212); } +.new-conversation-button > span { font-size: 18px; font-weight: 400; line-height: 1; } + +.thread-list { margin: 0; padding: 0 0 36px; list-style: none; display: flex; flex-direction: column; gap: 20px; } .answer-turn { display: grid; gap: 8px; } -.answer-turn--user { width: 100%; } -.turn-label { margin: 0; color: var(--muted); font-size: 12px; font-weight: 700; } +.answer-turn--assistant { + max-width: 90%; + border: 1px solid var(--line); + border-radius: 18px 18px 18px 6px; + padding: 17px 19px 18px; + background: var(--card); + box-shadow: 0 8px 26px rgba(0, 0, 0, .055); +} +.answer-turn--user { width: 100%; justify-items: end; } +.turn-label { margin: 0; color: var(--muted); font-size: 11px; font-weight: 760; letter-spacing: .02em; } +.answer-turn--assistant .turn-label { display: flex; align-items: center; gap: 7px; color: var(--ink, #121212); } +.answer-turn--assistant .turn-label::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--accent, #c87942); box-shadow: 0 0 0 3px var(--accent-soft); } .turn-copy { color: var(--ink, #121212); font-size: 15px; line-height: 1.62; } -.turn-copy p { margin: 0; overflow-wrap: anywhere; } -.answer-turn--user .turn-copy { font-size: clamp(1.35rem, 4vw, 1.5rem); font-weight: 650; letter-spacing: -.025em; line-height: 1.25; } +.turn-copy p { overflow-wrap: anywhere; } +.markdown-body { min-width: 0; } +.markdown-body > :first-child { margin-top: 0; } +.markdown-body > :last-child { margin-bottom: 0; } +.markdown-body p { margin: 0 0 .72em; } +.markdown-body h1, +.markdown-body h2, +.markdown-body h3, +.markdown-body h4 { + margin: 1.15em 0 .42em; + font-weight: 750; + letter-spacing: -.018em; + line-height: 1.25; +} +.markdown-body h1 { font-size: 1.3em; } +.markdown-body h2 { font-size: 1.18em; } +.markdown-body h3, +.markdown-body h4 { font-size: 1em; } +.markdown-body ul, +.markdown-body ol { margin: .55em 0 .8em; padding-left: 1.35em; } +.markdown-body li { margin: .3em 0; padding-left: .15em; } +.markdown-body li::marker { color: var(--accent-text, var(--accent, #c87942)); font-weight: 750; } +.markdown-body strong { font-weight: 760; } +.markdown-body a { color: var(--accent-text, #9b542c); font-weight: 650; text-decoration-thickness: 1px; text-underline-offset: 3px; } +.markdown-body a:hover { text-decoration-thickness: 2px; } +.markdown-body blockquote { margin: .7em 0; border-left: 3px solid var(--accent, #c87942); padding: .1em 0 .1em 1em; color: var(--muted); } +.markdown-body code { border-radius: 5px; padding: .12em .35em; background: var(--soft); font: .88em/1.5 ui-monospace, SFMono-Regular, Consolas, monospace; } +.markdown-body pre { max-width: 100%; overflow-x: auto; margin: .75em 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; background: var(--soft); } +.markdown-body pre code { padding: 0; background: transparent; } +.markdown-body table { display: block; max-width: 100%; overflow-x: auto; margin: .8em 0; border-spacing: 0; font-size: .9em; } +.markdown-body th, +.markdown-body td { border-bottom: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; } +.markdown-body th { background: var(--soft); font-weight: 720; } +.markdown-body hr { height: 1px; margin: 1em 0; border: 0; background: var(--line); } +.answer-turn--user .turn-label { padding-right: 4px; } +.answer-turn--user .turn-copy { max-width: 82%; border: 1px solid var(--accent-line); border-radius: 17px 17px 6px 17px; padding: 12px 15px; background: var(--accent-soft); font-size: 15px; font-weight: 580; letter-spacing: -.01em; line-height: 1.45; } .answer-turn--user .turn-copy h2 { margin: 0; overflow-wrap: anywhere; font: inherit; } .answer-turn--pending { opacity: .65; } @@ -217,9 +358,10 @@ button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visibl .typing-dots span:nth-child(3) { animation-delay: .4s; } @keyframes typing-blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } } .typing-static { display: none; font-weight: 700; letter-spacing: 2px; } +.typing-copy { margin-left: 9px; color: var(--muted); font-size: 12.5px; font-weight: 600; } .system-note { padding: 2px 8px; color: var(--muted); text-align: center; font-size: 12.5px; line-height: 1.45; } -.sources-row { margin-top: -18px; } +.sources-row { margin-top: -8px; } .sources-card { width: 100%; } .sources-card summary { width: max-content; min-height: 44px; display: flex; align-items: center; border-radius: 7px; padding: 5px 7px; color: var(--muted); font-size: 12px; font-weight: 650; cursor: pointer; } .sources-card[open] summary { margin-bottom: 8px; } @@ -228,6 +370,15 @@ button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visibl .source-chip:hover { background: var(--accent-soft); } .source-chip span { color: var(--ink, #121212); font-size: 12.5px; font-weight: 650; } .source-chip small { color: var(--muted); font-size: 10.5px; } +.products-row { margin-top: -6px; } +.product-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; } +.product-result { min-width: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 14px; color: var(--ink, #121212); background: var(--card); text-decoration: none; } +.product-result:hover { border-color: var(--accent-line); box-shadow: 0 8px 24px rgba(0,0,0,.07); } +.product-result > img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft); } +.product-result-copy { display: grid; gap: 4px; padding: 12px; } +.product-result-copy strong { overflow: hidden; font-size: 13px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; } +.product-result-copy > span { font-size: 12.5px; font-weight: 680; } +.product-result-copy small { color: var(--muted); font-size: 10.5px; } .follow-up-prompts { margin-top: 9px; } .follow-up-prompts > p { margin: 0 0 7px; color: var(--muted); font-size: 12px; font-weight: 650; } .follow-up-list { display: flex; flex-wrap: wrap; gap: 7px; } @@ -266,21 +417,27 @@ button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visibl .ticket-card dt { color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: .1em; text-transform: uppercase; } .ticket-card dd { margin: 0; font-size: 13px; font-weight: 700; } -.composer-bar { flex: none; border-top: 1px solid var(--line); background: color-mix(in srgb, var(--card) 94%, transparent); backdrop-filter: blur(12px); } -.composer-inner { width: min(var(--answer-width), 100% - 40px); margin: 0 auto; padding: 10px 0 max(8px, env(safe-area-inset-bottom)); } -.composer { display: flex; align-items: center; gap: 8px; } -.composer input { flex: 1 1 auto; min-width: 0; min-height: 46px; border: 1px solid var(--line-strong); border-radius: 12px; padding: 0 14px; color: var(--ink, #121212); background: #fff; font-size: 16px; } -.mic-button, .human-action-button { width: 46px; height: 46px; flex: none; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink, #121212); background: var(--card); } +.composer-bar { flex: none; background: linear-gradient(to top, var(--page) 72%, transparent); } +.composer-inner { width: min(var(--answer-width), 100% - 40px); margin: 0 auto; padding: 10px 0 max(18px, env(safe-area-inset-bottom)); } +.composer { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 18px; padding: 7px; background: var(--card); box-shadow: 0 16px 46px rgba(0, 0, 0, .12); } +.composer:focus-within { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--focus-ring), 0 16px 46px rgba(0, 0, 0, .12); } +.composer input { flex: 1 1 auto; min-width: 0; min-height: 46px; border: 0; border-radius: 12px; padding: 0 10px; color: var(--ink, #121212); background: transparent; font-size: 16px; outline: 0; } +.composer input:focus-visible { outline: 0; } +.mic-button { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 12px; color: var(--muted); background: transparent; } .mic-button--active { border-color: transparent; color: var(--accent-ink, #000); background: var(--accent, #c87942); animation: mic-pulse 1.6s ease-in-out infinite; } @keyframes mic-pulse { 50% { box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent, #c87942) 18%, transparent); } } .mute-button { min-height: 44px; flex: none; border: 1px solid var(--line-strong); border-radius: 10px; padding: 0 13px; color: var(--ink, #121212); background: var(--card); font-size: 12.5px; font-weight: 650; } -.send-button { min-height: 46px; flex: none; border-radius: 10px; padding: 0 18px; color: var(--accent-ink, #000); background: var(--accent, #c87942); font-weight: 700; } -.send-button:not(:disabled):hover, .mic-button:not(:disabled):hover, .human-action-button:not(:disabled):hover { transform: translateY(-1px); } +.send-button { width: 44px; min-width: 44px; min-height: 44px; flex: none; display: grid; place-items: center; border-radius: 13px; padding: 0; color: var(--accent-ink, #000); background: var(--accent, #c87942); font-weight: 700; } +.send-button:not(:disabled):hover, .mic-button:not(:disabled):hover { transform: translateY(-1px); } @media (max-width: 700px) { .chat-header-inner { width: 100%; min-height: 58px; padding: 0 14px; } .brand-sub { display: none; } .support-nav a, .text-button { min-height: 44px; font-size: 14px; } + .help-centre-link::before { display: none; } + .account-name, .account-chevron { display: none; } + .account-menu summary { padding-right: 5px; } + .account-popover { position: fixed; top: calc(58px + env(safe-area-inset-top)); right: 12px; } .app[data-view="landing"] .thread-inner { width: 100%; padding: 44px 20px 80px; } .thread-inner, .composer-inner { width: 100%; padding-left: 16px; padding-right: 16px; } .landing-hero h1 { font-size: 2.25rem; line-height: 1.05; } @@ -300,14 +457,22 @@ button:focus-visible, input:focus-visible, a:focus-visible, summary:focus-visibl .topic-grid { grid-template-columns: 1fr; gap: 31px; } .topics-heading > a, .topic-card h3 a, .topic-card li a { min-height: 44px; display: flex; align-items: center; } .topic-card ul { margin-top: 4px; gap: 0; } - .thread-inner { padding-top: 24px; } + .thread-inner { padding-top: 16px; } + .conversation-toolbar { margin-bottom: 16px; } + .conversation-agent small { display: none; } + .conversation-actions { gap: 4px; } + .conversation-help-button { min-height: 44px; padding-inline: 10px; } + .new-conversation-button { min-height: 44px; font-size: 0; padding: 0 11px; } + .new-conversation-button > span { font-size: 22px; } .thread-list { padding-bottom: 28px; } + .answer-turn--assistant { max-width: 96%; padding: 15px 16px 16px; } + .answer-turn--user .turn-copy { max-width: 90%; } .bubble-stack { max-width: 100%; } .bubble-row > .avatar { display: none; } .composer-inner { padding-top: 8px; padding-bottom: max(16px, env(safe-area-inset-bottom)); } .composer input { font-size: 16px; } .composer .mic-button:not(.mic-button--active) { display: none; } - .send-button { min-width: 54px; padding: 0 12px; } + .send-button { min-width: 44px; padding: 0; } .follow-up-chip { min-height: 44px; font-size: 16px; } } diff --git a/apps/desk/src/worker.tsx b/apps/desk/src/worker.tsx index a116e6b..762e75c 100644 --- a/apps/desk/src/worker.tsx +++ b/apps/desk/src/worker.tsx @@ -33,6 +33,7 @@ import { verifyPublicWrite } from './security/public-write' import { isLocalUrl, requestSurface } from './security/operator-host' import { loadWorkspaceSettings, updateWorkspaceSettings, type WorkspaceSettings } from './settings' import { shopifyConfigured } from './integrations/shopify' +import { SHOPIFY_UCP_PROFILE_PATH, shopifyUcpProfileResponse } from './integrations/shopify-storefront' import { beginShopifyCustomerLogin, completeShopifyCustomerLogin, @@ -256,6 +257,8 @@ async function portalResponse(request: Request, env: Env, ctx: ExecutionContext) configured: shopifyCustomerConfigured(env), customerName: customerSession?.name ?? null, }, + settings.locale, + env.ABLE_LOCAL_VOICE_UNAVAILABLE !== '1', ) } const helpdesk = createHelpdesk({ @@ -408,6 +411,9 @@ async function fetchHandler(request: Request, env: Env, ctx: ExecutionContext): if (url.pathname === '/healthz') { return Response.json({ status: 'ok' }, { headers: { 'cache-control': 'no-store', 'x-content-type-options': 'nosniff' } }) } + if (url.pathname === SHOPIFY_UCP_PROFILE_PATH) { + return shopifyUcpProfileResponse(request) + } if ((url.pathname === '/voice' || url.pathname === '/demo/voice') && request.method === 'GET') { return Response.redirect(new URL('/', request.url), 308) } diff --git a/apps/desk/test/ui-markdown.test.ts b/apps/desk/test/ui-markdown.test.ts new file mode 100644 index 0000000..c3215b6 --- /dev/null +++ b/apps/desk/test/ui-markdown.test.ts @@ -0,0 +1,27 @@ +import { describe, expect, it } from 'vitest' + +import { safeStreamingMarkdown } from '../src/ui/markdown' + +describe('streaming markdown', () => { + it('formats structured assistant answers', () => { + const html = safeStreamingMarkdown('## Options\n\n- **G5** — ₹19,999\n- DF54 — ₹29,999') + + expect(html).toContain('

    Options

    ') + expect(html).toContain('
      ') + expect(html).toContain('G5') + }) + + it('repairs incomplete emphasis while a response streams', () => { + expect(safeStreamingMarkdown('The **Example G5')).toContain('Example G5') + }) + + it('renders incomplete links as text and rejects unsafe completed links', () => { + expect(safeStreamingMarkdown('See [the grinder](https://shop.example')).toContain('See the grinder') + expect(safeStreamingMarkdown('[bad](javascript:alert(1))')).not.toContain('href=') + }) + + it('allows safe storefront links', () => { + expect(safeStreamingMarkdown('[View product](https://shop.example.test/products/g5)')) + .toContain('href="https://shop.example.test/products/g5"') + }) +}) diff --git a/apps/desk/test/visual/portal.visual.spec.ts b/apps/desk/test/visual/portal.visual.spec.ts index 607918e..aa8e63b 100644 --- a/apps/desk/test/visual/portal.visual.spec.ts +++ b/apps/desk/test/visual/portal.visual.spec.ts @@ -147,6 +147,7 @@ async function installVoiceSocketFixture( options: { holdSessionReady?: boolean signinReason?: 'order_lookup' | 'open_ticket' + errorOnReply?: boolean } = {}, ): Promise { let socket: WebSocketRoute | null = null @@ -181,6 +182,10 @@ async function installVoiceSocketFixture( const answer = `Deterministic support answer ${turn}. Keep the machine unplugged while checking the removable parts. Use the published care instructions below, and stop if anything looks damaged.` send({ type: 'status', status: 'thinking' }) send({ type: 'transcript', role: 'user', text: parsed.text }) + if (options.errorOnReply) { + send({ type: 'error', message: 'Workers AI internal error' }) + return + } if (turn === 1 && options.signinReason) { send({ type: 'voice_signin_required', anchor: 'after_reply', reason: options.signinReason }) } @@ -254,7 +259,7 @@ test('support home opens with the agent as the primary help experience', async ( await expect(page.getByRole('heading', { level: 1, name: 'How can we help?' })).toBeVisible() await expect(page.getByLabel('Ask anything')).toBeEnabled() await expect(page.getByRole('search')).toHaveCount(0) - await expect(page.getByRole('link', { name: 'Browse help' })).toHaveAttribute('href', '/kb') + await expect(page.getByRole('link', { name: 'Help centre' })).toHaveAttribute('href', '/kb') await expect(page.getByRole('heading', { level: 2, name: 'Browse by topic' })).toBeVisible() await expect(page.getByRole('button', { name: 'Contact support' })).toBeEnabled() @@ -329,30 +334,38 @@ test('contact support asks for the issue before it asks for identity', async ({ await expect(page.getByLabel('Conversation with Ava')).toBeHidden() }) -test('mobile landing remains stable while the agent session becomes ready', async ({ page }, testInfo) => { +test('a first question queues immediately while the agent session becomes ready', async ({ page }, testInfo) => { test.skip(testInfo.project.name !== 'mobile-390', 'The delayed readiness lifecycle is covered at one phone viewport.') const fixture = await installVoiceSocketFixture(page, { holdSessionReady: true }) await page.goto('/', { waitUntil: 'domcontentloaded' }) const input = page.getByLabel('Ask anything') const submit = page.getByRole('button', { name: 'Send question' }) - const hero = page.locator('.landing-hero') - const before = await hero.evaluate((element) => element.getBoundingClientRect().top) await expect(input).toBeEnabled() - await expect(submit).toBeDisabled() + await expect(submit).toBeEnabled() await expect(input).toHaveAttribute('placeholder', 'Ask anything') await input.fill('Keep this question while the session connects') - await expect(input).toHaveValue('Keep this question while the session connects') + await submit.click() + await expect(page.getByText('Keep this question while the session connects', { exact: true })).toBeVisible() + await expect(page.locator('.typing-copy', { hasText: 'Connecting securely…' })).toBeVisible() fixture.releaseSession() - await expect(input).toBeEnabled() - await expect(submit).toBeEnabled() - await expect(input).toHaveAttribute('placeholder', 'Ask anything') - await expect(input).toHaveValue('Keep this question while the session connects') - const after = await hero.evaluate((element) => element.getBoundingClientRect().top) + await expect(page.getByText('Deterministic support answer 1.', { exact: false })).toBeVisible() +}) - expect(Math.abs(after - before)).toBeLessThanOrEqual(1) +test('an agent error stops the activity state and offers a clear next step', async ({ page }, testInfo) => { + test.skip(testInfo.project.name !== 'mobile-390', 'The failed reply lifecycle is covered at one phone viewport.') + await installVoiceSocketFixture(page, { errorOnReply: true }) + await page.goto('/', { waitUntil: 'domcontentloaded' }) + + await page.getByLabel('Ask anything').fill('Why is there no answer?') + await page.getByRole('button', { name: 'Send question' }).click() + + await expect(page.getByText('Ava couldn’t finish that answer.', { exact: false })).toBeVisible() + await expect(page.locator('.typing-copy')).toHaveCount(0) + await expect(page.getByRole('button', { name: 'Contact support' })).toBeVisible() + await expect(page.getByText('Workers AI internal error')).toHaveCount(0) }) test('an interactive mobile Turnstile challenge does not move the landing hero', async ({ page }, testInfo) => { @@ -500,9 +513,9 @@ test('first question transitions into the focused answer experience', async ({ p await expect(page.locator('#landing-panel')).toBeHidden() await expect(page.locator('#transcript')).toBeVisible() await expect(page.getByLabel('Ask a follow-up')).toBeVisible() - await expect(page.getByRole('button', { name: 'Start over' })).toBeVisible() + await expect(page.getByRole('button', { name: 'New conversation' })).toBeVisible() - await page.getByRole('button', { name: 'Start over' }).click() + await page.getByRole('button', { name: 'New conversation' }).click() await expect(page.locator('#support-app')).toHaveAttribute('data-view', 'landing') await expect(page.getByRole('heading', { level: 1, name: 'How can we help?' })).toBeVisible() await expect(page.getByLabel('Ask anything')).toBeEnabled() diff --git a/apps/desk/test/visual/snapshots/darwin/desktop-1440/agent-home.png b/apps/desk/test/visual/snapshots/darwin/desktop-1440/agent-home.png index 483c4d7..e850445 100644 Binary files a/apps/desk/test/visual/snapshots/darwin/desktop-1440/agent-home.png and b/apps/desk/test/visual/snapshots/darwin/desktop-1440/agent-home.png differ diff --git a/apps/desk/test/visual/snapshots/darwin/desktop-1440/request-active.png b/apps/desk/test/visual/snapshots/darwin/desktop-1440/request-active.png index b621256..0332eb2 100644 Binary files a/apps/desk/test/visual/snapshots/darwin/desktop-1440/request-active.png and b/apps/desk/test/visual/snapshots/darwin/desktop-1440/request-active.png differ diff --git a/apps/desk/test/visual/snapshots/darwin/desktop-1440/request-recovery.png b/apps/desk/test/visual/snapshots/darwin/desktop-1440/request-recovery.png index f5a17f2..87d6258 100644 Binary files a/apps/desk/test/visual/snapshots/darwin/desktop-1440/request-recovery.png and b/apps/desk/test/visual/snapshots/darwin/desktop-1440/request-recovery.png differ diff --git a/apps/desk/test/visual/snapshots/darwin/mobile-360/agent-home.png b/apps/desk/test/visual/snapshots/darwin/mobile-360/agent-home.png index 9a6be4a..fede6fe 100644 Binary files a/apps/desk/test/visual/snapshots/darwin/mobile-360/agent-home.png and b/apps/desk/test/visual/snapshots/darwin/mobile-360/agent-home.png differ diff --git a/apps/desk/test/visual/snapshots/darwin/mobile-360/request-active.png b/apps/desk/test/visual/snapshots/darwin/mobile-360/request-active.png index 00da81e..11a6bad 100644 Binary files a/apps/desk/test/visual/snapshots/darwin/mobile-360/request-active.png and b/apps/desk/test/visual/snapshots/darwin/mobile-360/request-active.png differ diff --git a/apps/desk/test/visual/snapshots/darwin/mobile-360/request-recovery.png b/apps/desk/test/visual/snapshots/darwin/mobile-360/request-recovery.png index 53995e5..405e0aa 100644 Binary files a/apps/desk/test/visual/snapshots/darwin/mobile-360/request-recovery.png and b/apps/desk/test/visual/snapshots/darwin/mobile-360/request-recovery.png differ diff --git a/apps/desk/test/visual/snapshots/darwin/mobile-390/agent-home.png b/apps/desk/test/visual/snapshots/darwin/mobile-390/agent-home.png index 72d5bb8..27e2391 100644 Binary files a/apps/desk/test/visual/snapshots/darwin/mobile-390/agent-home.png and b/apps/desk/test/visual/snapshots/darwin/mobile-390/agent-home.png differ diff --git a/apps/desk/test/visual/snapshots/darwin/mobile-390/request-recovery.png b/apps/desk/test/visual/snapshots/darwin/mobile-390/request-recovery.png index 3bab17a..e14c759 100644 Binary files a/apps/desk/test/visual/snapshots/darwin/mobile-390/request-recovery.png and b/apps/desk/test/visual/snapshots/darwin/mobile-390/request-recovery.png differ diff --git a/apps/desk/test/visual/snapshots/darwin/tablet-768/agent-home.png b/apps/desk/test/visual/snapshots/darwin/tablet-768/agent-home.png index fbefd0e..c058267 100644 Binary files a/apps/desk/test/visual/snapshots/darwin/tablet-768/agent-home.png and b/apps/desk/test/visual/snapshots/darwin/tablet-768/agent-home.png differ diff --git a/apps/desk/test/visual/snapshots/darwin/tablet-768/request-active.png b/apps/desk/test/visual/snapshots/darwin/tablet-768/request-active.png index 85dfcc4..c63afc1 100644 Binary files a/apps/desk/test/visual/snapshots/darwin/tablet-768/request-active.png and b/apps/desk/test/visual/snapshots/darwin/tablet-768/request-active.png differ diff --git a/apps/desk/test/visual/snapshots/darwin/tablet-768/request-recovery.png b/apps/desk/test/visual/snapshots/darwin/tablet-768/request-recovery.png index f87b7fb..5fc25fa 100644 Binary files a/apps/desk/test/visual/snapshots/darwin/tablet-768/request-recovery.png and b/apps/desk/test/visual/snapshots/darwin/tablet-768/request-recovery.png differ diff --git a/apps/desk/test/visual/snapshots/linux/desktop-1440/agent-home.png b/apps/desk/test/visual/snapshots/linux/desktop-1440/agent-home.png index 95f56e1..372a23e 100644 Binary files a/apps/desk/test/visual/snapshots/linux/desktop-1440/agent-home.png and b/apps/desk/test/visual/snapshots/linux/desktop-1440/agent-home.png differ diff --git a/apps/desk/test/visual/snapshots/linux/mobile-360/agent-home.png b/apps/desk/test/visual/snapshots/linux/mobile-360/agent-home.png index 0e0c77b..bbdcfae 100644 Binary files a/apps/desk/test/visual/snapshots/linux/mobile-360/agent-home.png and b/apps/desk/test/visual/snapshots/linux/mobile-360/agent-home.png differ diff --git a/apps/desk/test/visual/snapshots/linux/mobile-390/agent-home.png b/apps/desk/test/visual/snapshots/linux/mobile-390/agent-home.png index 4b5d404..0fe99a8 100644 Binary files a/apps/desk/test/visual/snapshots/linux/mobile-390/agent-home.png and b/apps/desk/test/visual/snapshots/linux/mobile-390/agent-home.png differ diff --git a/apps/desk/test/visual/snapshots/linux/tablet-768/agent-home.png b/apps/desk/test/visual/snapshots/linux/tablet-768/agent-home.png index 6edded6..424c60e 100644 Binary files a/apps/desk/test/visual/snapshots/linux/tablet-768/agent-home.png and b/apps/desk/test/visual/snapshots/linux/tablet-768/agent-home.png differ diff --git a/apps/desk/test/voice-conversation.test.ts b/apps/desk/test/voice-conversation.test.ts index fbc15dc..9759827 100644 --- a/apps/desk/test/voice-conversation.test.ts +++ b/apps/desk/test/voice-conversation.test.ts @@ -1,11 +1,84 @@ import { describe, expect, it } from 'vitest' import { + budgetBundleReply, directVoiceResponse, + inrBudgetFromTranscript, + isHelpCenterSupportRequest, + isStorefrontShoppingRequest, prepareVoiceModelMessages, + speechText, + productComparisonReply, + productDiscoveryReply, + productComparisonTerms, voiceAgentSystemPrompt, } from '../src/voice/conversation' describe('voice conversation policy', () => { + it('deterministically recognizes storefront shopping intent', () => { + expect(isStorefrontShoppingRequest('What should I buy for two cappuccinos with a ₹45,000 budget?')).toBe(true) + expect(isStorefrontShoppingRequest('Do you have the Example G5 in stock?')).toBe(true) + expect(isStorefrontShoppingRequest('Compare the FlatMill 54 and FlatMill 64 grinders')).toBe(true) + expect(isStorefrontShoppingRequest('Help me find an espresso grinder under ₹30,000')).toBe(true) + expect(isStorefrontShoppingRequest('How do I clean my grinder?')).toBe(false) + expect(isStorefrontShoppingRequest('What does the warranty cover?')).toBe(false) + }) + + it('deterministically recognizes support questions that require grounding', () => { + expect(isHelpCenterSupportRequest('How do I adjust the print alignment on my router?')).toBe(true) + expect(isHelpCenterSupportRequest("My grinder doesn't work after cleaning")).toBe(true) + expect(isHelpCenterSupportRequest('Find me an espresso grinder under ₹30,000')).toBe(false) + }) + + it('extracts explicit Indian shopping budgets without guessing other numbers', () => { + expect(inrBudgetFromTranscript('My total budget is around ₹45,000')).toBe(45_000) + expect(inrBudgetFromTranscript('Need a grinder under INR 20k')).toBe(20_000) + expect(inrBudgetFromTranscript('Budget 35000 for a machine')).toBe(35_000) + expect(inrBudgetFromTranscript('I make two cappuccinos every morning')).toBeNull() + }) + + it('renders only a live returned bundle whose maximum price fits the INR budget', () => { + const products = [{ + title: 'Example Machine with Grinder', + availableForSale: true, + priceRange: { + min: { amount: '43499.0', currencyCode: 'INR' }, + max: { amount: '44499.0', currencyCode: 'INR' }, + }, + }] + expect(budgetBundleReply(products, 45_000)).toBe( + 'The Example Machine with Grinder is currently available at ₹43,499–₹44,499, so its highest listed price fits your ₹45,000 budget. It combines the machine and grinder in one storefront item.', + ) + expect(budgetBundleReply(products, 40_000)).toBeNull() + }) + + it('compares the two requested standalone products instead of similarly named bundles', () => { + expect(productComparisonTerms('Compare the FlatMill V4 and the ConeMill G5 for home espresso. What is the price difference?')) + .toEqual(['FlatMill V4', 'ConeMill G5']) + const flatProducts = [{ + title: 'Example Machine with FlatMill Grinder', + description: 'A bundle with a grinder.', + productType: 'Bundle', + availableForSale: true, + priceRange: { min: { amount: '52499', currencyCode: 'INR' }, max: { amount: '53499', currencyCode: 'INR' } }, + }, { + title: 'FlatMill V4 - 54mm Flat Burr Coffee Grinder', + description: 'For espresso with 54mm stainless-steel flat burrs.', + productType: 'Grinder', + availableForSale: true, + priceRange: { min: { amount: '29999', currencyCode: 'INR' }, max: { amount: '29999', currencyCode: 'INR' } }, + }] + const coneProducts = [{ + title: 'ConeMill G5 48mm Conical Burr Electric Coffee Grinder', + description: 'For espresso with 48mm stainless-steel conical burrs.', + productType: 'Grinder', + availableForSale: true, + priceRange: { min: { amount: '19999', currencyCode: 'INR' }, max: { amount: '19999', currencyCode: 'INR' } }, + }] + expect(productComparisonReply('FlatMill V4', flatProducts, 'ConeMill G5', coneProducts)).toBe( + 'FlatMill V4 - 54mm Flat Burr Coffee Grinder is ₹29,999 and ConeMill G5 48mm Conical Burr Electric Coffee Grinder is ₹19,999, so FlatMill V4 - 54mm Flat Burr Coffee Grinder costs ₹10,000 more. For espresso, the main returned distinction is 54mm flat burrs versus 48mm conical burrs.', + ) + }) + it('joins a spoken ticket request split at a natural pause', () => { const messages = [ { role: 'user' as const, content: 'Can you open a new support' }, @@ -65,6 +138,34 @@ describe('voice conversation policy', () => { 'A question about warranty or another support policy is in scope even when it does not name a product, order, or account.', ) expect(prompt).toContain('For policy or warranty questions, call search_help_center first.') + expect(prompt).toContain('a private request link, or the support-request process is also in scope') + }) + + it('separates storefront discovery from help-centre support grounding', () => { + const configured = voiceAgentSystemPrompt('Example Company', { + orders: true, + products: true, + signedIn: false, + }) + expect(configured).toContain('call search_storefront_products first') + expect(configured).toContain('call it before writing any reply') + expect(configured).toContain('call get_storefront_product with the exact opaque reference returned by search') + expect(configured).toContain('shopping, selection, price, or catalog-availability question uses the storefront tools') + expect(configured).toContain('repair, or troubleshooting question') + expect(configured).toContain('Do not ask the caller to identify or correct the product before that search') + expect(configured).toContain('After a successful help result, end the reply after the documented answer') + expect(configured).toContain('Do not mention or offer a ticket in that reply, even conditionally') + expect(configured).toContain('that is a documented answer') + expect(configured).toContain('never say that no guide, no direct guide, or no information was found') + expect(configured).toContain('never invent specifications, compatibility, price, availability, variants, or recommendations') + + const unavailable = voiceAgentSystemPrompt('Example Company', { + orders: false, + products: false, + signedIn: false, + }) + expect(unavailable).not.toContain('call search_storefront_products first') + expect(unavailable).toContain('Use the help centre for product support') }) it('uses specific empathy without repeating canned apologies', () => { @@ -76,4 +177,72 @@ describe('voice conversation policy', () => { expect(prompt).toContain("A machine that won't start is frustrating. What kind of machine is it?") expect(prompt).not.toContain("I'm sorry, let's get this moving") }) + + it('adds factual India customer guidance only for an India workspace', () => { + const india = voiceAgentSystemPrompt('Example Company', { + products: true, + locale: 'en-IN', + timezone: 'Asia/Kolkata', + }) + expect(india).toContain('INDIA CUSTOMER EXPERIENCE') + expect(india).toContain('Indian English, Hindi, and Hinglish') + expect(india).toContain('Hindi in Devanagari, Roman-script Hindi') + expect(india).toContain("Mirror the customer's language naturally") + expect(india).toContain('prefer Roman script') + expect(india).toContain('without caricaturing an accent') + expect(india).toContain('Aapka budget kitna hai?') + expect(india).toContain('₹') + expect(india).toContain('Never assume GST invoice eligibility') + expect(voiceAgentSystemPrompt('Example Company', { locale: 'en-SG' })) + .not.toContain('INDIA CUSTOMER EXPERIENCE') + }) + + it('keeps voice answers complete while structured detail moves to cards', () => { + const longAnswer = `This is the full answer. ${'Every useful detail remains. '.repeat(30)}` + expect(speechText(longAnswer)).toBe(longAnswer.trim()) + expect(speechText( + '**DF54 V4** is ₹29,999. [See the product](https://example.test/products/df54)', + )).toBe('DF54 V4 is 29,999 rupees. See the product') + + const prompt = voiceAgentSystemPrompt('Example Company', { locale: 'en-IN' }) + expect(prompt).toContain('Everything you write is both shown and spoken') + expect(prompt).toContain('Product cards and linked guides carry the remaining structured detail') + expect(prompt).toContain('never impose an arbitrary word, sentence, or character cutoff') + expect(prompt).not.toContain('at most two short sentences') + }) + + it('summarizes storefront discovery without reciting every product field', () => { + const products = [ + { + title: 'Compact hand grinder', + availableForSale: true, + priceRange: { + min: { amount: '12999', currencyCode: 'INR' }, + max: { amount: '12999', currencyCode: 'INR' }, + }, + }, + { + title: 'Electric espresso grinder', + availableForSale: true, + priceRange: { + min: { amount: '19999', currencyCode: 'INR' }, + max: { amount: '19999', currencyCode: 'INR' }, + }, + }, + { + title: 'Premium grinder', + availableForSale: true, + priceRange: { + min: { amount: '39999', currencyCode: 'INR' }, + max: { amount: '39999', currencyCode: 'INR' }, + }, + }, + ] + const reply = productDiscoveryReply(products, 30_000) + expect(reply).toContain('2 available matches within ₹30,000') + expect(reply).toContain('Compact hand grinder at ₹12,999') + expect(reply).toContain('Electric espresso grinder at ₹19,999') + expect(reply).not.toContain('Premium grinder') + expect(reply).toContain('The cards show live prices and availability') + }) }) diff --git a/apps/desk/test/voice-dedup.test.ts b/apps/desk/test/voice-dedup.test.ts index 5fffe0c..e408c85 100644 --- a/apps/desk/test/voice-dedup.test.ts +++ b/apps/desk/test/voice-dedup.test.ts @@ -1,6 +1,11 @@ import { describe, expect, it } from 'vitest' -import { createSentenceDedup, dedupAssistantText, dedupRepeatedSentences } from '../src/voice/dedup' +import { + createSentenceDedup, + dedupAssistantText, + dedupRepeatedSentences, + recoverAssistantText, +} from '../src/voice/dedup' describe('sentence dedup', () => { it('drops a verbatim repeated block within one turn', () => { @@ -47,4 +52,28 @@ describe('sentence dedup', () => { expect(parts.some((part) => part.type === 'tool-call')).toBe(true) expect(parts.at(-1)?.type).toBe('finish') }) + + it('turns provider error parts into an assistant fallback', async () => { + async function* stream() { + yield { type: 'start' } + yield { type: 'error', error: new Error('provider detail') } + } + const parts = [] + for await (const part of recoverAssistantText(stream(), 'Please try again.')) parts.push(part) + + expect(parts).toEqual([ + { type: 'start' }, + { type: 'text-delta', text: 'Please try again.' }, + ]) + }) + + it('turns thrown stream failures into an assistant fallback', async () => { + async function* stream() { + throw new Error('provider detail') + } + const parts = [] + for await (const part of recoverAssistantText(stream(), 'Please try again.')) parts.push(part) + + expect(parts).toEqual([{ type: 'text-delta', text: 'Please try again.' }]) + }) }) diff --git a/apps/desk/test/voice-deepgram-flux-tts.test.ts b/apps/desk/test/voice-deepgram-flux-tts.test.ts new file mode 100644 index 0000000..d89c7c3 --- /dev/null +++ b/apps/desk/test/voice-deepgram-flux-tts.test.ts @@ -0,0 +1,171 @@ +import { describe, expect, it, vi } from 'vitest' +import { + DeepgramFluxTTS, + FallbackTTS, + WorkersAIPcmTTS, + deepgramFluxTTSModel, + type DeepgramFetch, +} from '../src/voice/deepgram-flux-tts' + +type SocketListener = (event: { data?: unknown }) => void + +class FakeDeepgramSocket { + readonly sent: string[] = [] + readonly listeners = new Map() + binaryType = 'blob' + readyState = WebSocket.OPEN + + accept(): void {} + + addEventListener(type: string, listener: SocketListener): void { + const listeners = this.listeners.get(type) ?? [] + listeners.push(listener) + this.listeners.set(type, listeners) + } + + send(value: string): void { + this.sent.push(value) + if (value !== JSON.stringify({ type: 'Flush' })) return + queueMicrotask(() => { + this.emit('message', { data: new Uint8Array([1, 2]).buffer }) + this.emit('message', { data: new Uint8Array([3]).buffer }) + this.emit('message', { data: JSON.stringify({ type: 'SpeechMetadata' }) }) + }) + } + + close(): void { + this.readyState = WebSocket.CLOSED + } + + emit(type: string, event: { data?: unknown }): void { + for (const listener of this.listeners.get(type) ?? []) listener(event) + } +} + +describe('DeepgramFluxTTS', () => { + it('uses the Indian-English Priya voice by default', () => { + expect(deepgramFluxTTSModel(undefined)).toBe('flux-priya-en') + expect(deepgramFluxTTSModel('not-a-flux-model')).toBe('flux-priya-en') + }) + + it('accepts another valid Flux English voice', () => { + expect(deepgramFluxTTSModel(' Flux-Meena-En ')).toBe('flux-meena-en') + }) + + it('streams 24 kHz PCM from the voice-agent WebSocket', async () => { + const socket = new FakeDeepgramSocket() + const fetcher = vi.fn(async () => ({ + status: 101, + webSocket: socket as unknown as WebSocket, + })) + const tts = new DeepgramFluxTTS({ apiKey: 'test-secret', fetcher }) + + const frames: number[][] = [] + for await (const frame of tts.synthesizeStream(' Hello, how can I help? ')) { + frames.push([...new Uint8Array(frame)]) + } + + expect(frames).toEqual([[1, 2], [3]]) + expect(fetcher).toHaveBeenCalledOnce() + const [url, init] = fetcher.mock.calls[0] + expect(url.origin + url.pathname).toBe('https://api.deepgram.com/v2/speak') + expect(url.searchParams.get('model')).toBe('flux-priya-en') + expect(url.searchParams.get('encoding')).toBe('linear16') + expect(url.searchParams.get('sample_rate')).toBe('24000') + expect(init.headers).toMatchObject({ + Authorization: 'Token test-secret', + Upgrade: 'websocket', + }) + expect(socket.binaryType).toBe('arraybuffer') + expect(socket.sent).toEqual([ + JSON.stringify({ type: 'Speak', text: 'Hello, how can I help?' }), + JSON.stringify({ type: 'Flush' }), + JSON.stringify({ type: 'Close' }), + ]) + }) + + it('returns null when the WebSocket upgrade fails', async () => { + const fetcher = vi.fn(async () => ({ status: 503 })) + const tts = new DeepgramFluxTTS({ apiKey: 'test-secret', fetcher }) + const error = vi.spyOn(console, 'error').mockImplementation(() => undefined) + + await expect(tts.synthesize('Hello')).resolves.toBeNull() + expect(error).toHaveBeenCalledWith(JSON.stringify({ + event: 'voice_tts_failed', + provider: 'deepgram_flux', + status: 503, + })) + error.mockRestore() + }) + + it('rejects an unexpectedly large sentence before making a request', async () => { + const fetcher = vi.fn() + const tts = new DeepgramFluxTTS({ apiKey: 'test-secret', fetcher }) + const error = vi.spyOn(console, 'error').mockImplementation(() => undefined) + + await expect(tts.synthesize('a'.repeat(2_001))).resolves.toBeNull() + expect(fetcher).not.toHaveBeenCalled() + expect(error).toHaveBeenCalledWith(JSON.stringify({ + event: 'voice_tts_failed', + provider: 'deepgram_flux', + reason: 'input_too_long', + })) + error.mockRestore() + }) + + it('falls back only when the primary produces no audio', async () => { + const primary = { synthesize: vi.fn(async () => null) } + const fallbackAudio = new Uint8Array([4, 5, 6]).buffer + const fallback = { synthesize: vi.fn(async () => fallbackAudio) } + const tts = new FallbackTTS(primary, fallback) + + await expect(tts.synthesize('Hello')).resolves.toEqual(fallbackAudio) + expect(primary.synthesize).toHaveBeenCalledOnce() + expect(fallback.synthesize).toHaveBeenCalledOnce() + }) + + it('streams the fallback when the primary produces no frames', async () => { + const primary = { + synthesize: vi.fn(async () => null), + synthesizeStream: vi.fn(async function* () {}), + } + const fallbackAudio = new Uint8Array([4, 5, 6]).buffer + const fallback = { synthesize: vi.fn(async () => fallbackAudio) } + const tts = new FallbackTTS(primary, fallback) + + const frames: ArrayBuffer[] = [] + for await (const frame of tts.synthesizeStream('Hello')) frames.push(frame) + expect(frames).toEqual([fallbackAudio]) + }) + + it('does not speak a fallback after interruption', async () => { + const controller = new AbortController() + controller.abort() + const fallback = { synthesize: vi.fn(async () => new ArrayBuffer(1)) } + const tts = new FallbackTTS({ synthesize: vi.fn(async () => null) }, fallback) + + await expect(tts.synthesize('Hello', controller.signal)).resolves.toBeNull() + expect(fallback.synthesize).not.toHaveBeenCalled() + }) +}) + +describe('WorkersAIPcmTTS', () => { + it('requests the Cloudflare fallback in the same PCM format', async () => { + const audio = new Uint8Array([9, 8]).buffer + const run = vi.fn(async () => new Response(audio)) + const tts = new WorkersAIPcmTTS({ run }) + + await expect(tts.synthesize('Hello')).resolves.toEqual(audio) + expect(run).toHaveBeenCalledWith( + '@cf/deepgram/aura-2-en', + { + text: 'Hello', + speaker: 'harmonia', + encoding: 'linear16', + container: 'none', + sample_rate: 24_000, + }, + { returnRawResponse: true }, + ) + }) +}) diff --git a/apps/desk/test/voice-demo.test.ts b/apps/desk/test/voice-demo.test.ts index c58f0f7..1d1ce4d 100644 --- a/apps/desk/test/voice-demo.test.ts +++ b/apps/desk/test/voice-demo.test.ts @@ -79,6 +79,22 @@ describe('voice demo boundary', () => { expect(signedIn).not.toContain('href="/auth/shopify/start"') }) + it('marks microphone input unavailable for local parity without disabling text chat', async () => { + const html = await voiceDemoPageResponse( + BRANDING, + '', + false, + [], + { configured: false, customerName: null }, + 'en-IN', + false, + ).text() + + expect(html).toContain('data-voice-input="unavailable"') + expect(html).toContain('aria-label="Voice requires a deployed preview"') + expect(html).toContain('id="landing-input"') + }) + it('keeps the hosted store login as the only identity step', async () => { const html = await voiceDemoPageResponse(BRANDING, 'turnstile-site-key', true, [], { configured: true, customerName: null }).text() @@ -113,19 +129,21 @@ describe('voice demo boundary', () => { expect(html).toContain('placeholder="Ask anything"') expect(html).toContain('data-support-message="My delivery is delayed."') expect(html).toContain('data-support-message="I need help with warranty or a repair."') - expect(html).toContain('data-support-message="I need help with my invoice."') + expect(html).toContain('data-support-message="Help me choose the right product for my needs."') expect(html).toContain('href="/requests/recover"') expect(html).toContain('placeholder="Ask a follow-up…"') - expect(html).toContain('Preparing secure chat…') + expect(html).toContain('data-connection="connecting"') + expect(html).toContain('Ava is getting ready — you can ask now.') expect(html).toContain('id="mic-button"') expect(html).toContain('id="landing-mic-button"') expect(html).toContain('aria-label="Use voice"') expect(html).toContain('title="Talk instead of typing"') - expect(html).toContain('Start over') - expect(html).toContain('href="/kb">Browse help') + expect(html).toContain('New conversation') + expect(html).toContain('href="/kb">Help centre') expect(html).toContain('id="human-help-button"') expect(html).toContain('id="conversation-human-button"') - expect(html).toContain('aria-label="Open a support request"') + expect(html).toContain('class="conversation-help-button" type="button">Contact support') + expect(html).not.toContain('class="human-action-button"') expect(html).toContain('Describe your issue first. Sign-in is needed only when a private request is opened.') expect(html).toContain('id="reconnect-banner"') expect(html).not.toContain('class="privacy-note"') @@ -143,6 +161,22 @@ describe('voice demo boundary', () => { expect(composer).toBeGreaterThan(signinFlow) }) + it('invites India customers to use English or Hinglish', async () => { + const html = await voiceDemoPageResponse( + BRANDING, + 'turnstile-site-key', + true, + [], + { configured: false, customerName: null }, + 'en-IN', + ).text() + + expect(html).toContain('') + expect(html).toContain('English ya Hinglish—jismein aap comfortable hain.') + expect(html).toContain('placeholder="Ask in English or Hinglish"') + expect(html).toContain('aria-label="Ask in English or Hinglish"') + }) + it('renders escaped live help topics with conventional knowledge links', async () => { const html = await voiceDemoPageResponse(BRANDING, '', false, [{ slug: 'machines & care', diff --git a/apps/desk/test/voice-products.test.ts b/apps/desk/test/voice-products.test.ts new file mode 100644 index 0000000..a82bc70 --- /dev/null +++ b/apps/desk/test/voice-products.test.ts @@ -0,0 +1,284 @@ +import { describe, expect, it, vi } from 'vitest' +import { + getStorefrontProduct, + searchStorefrontProducts, + SHOPIFY_UCP_VERSION, + shopifyStorefrontConfigured, + shopifyStorefrontProfileUrl, +} from '../src/integrations/shopify-storefront' + +const PROFILE_URL = 'https://support.example.test/.well-known/ucp' +const ENV = { + SHOPIFY_SHOP_DOMAIN: 'example-store.myshopify.com', + SHOPIFY_UCP_AGENT_PROFILE_URL: PROFILE_URL, +} +const ENDPOINT = 'https://example-store.myshopify.com/api/ucp/mcp' + +const PRODUCT = { + id: 'gid://shopify/Product/1001', + handle: 'quiet-grinder', + title: 'Quiet Grinder', + description: { plain: 'A compact grinder for home espresso.' }, + url: 'https://shop.example.test/products/quiet-grinder', + categories: [{ value: 'Coffee Grinder', taxonomy: 'merchant' }], + price_range: { + min: { amount: 12_000, currency: 'SGD' }, + max: { amount: 14_000, currency: 'SGD' }, + }, + media: [{ + type: 'image', + url: 'https://cdn.shopify.com/grinder.jpg', + alt_text: 'Black coffee grinder', + }], + options: [{ name: 'Colour', values: [{ label: 'Black' }, { label: 'White' }] }], + variants: [{ + id: 'gid://shopify/ProductVariant/2001', + title: 'Black', + description: { plain: 'Black grinder' }, + price: { amount: 12_000, currency: 'SGD' }, + list_price: { amount: 13_500, currency: 'SGD' }, + availability: { available: true }, + options: [{ name: 'Colour', label: 'Black' }], + sku: 'MUST-NOT-LEAK', + }], +} + +const PRODUCT_REFERENCE = `shopify_product_${btoa(PRODUCT.id).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/g, '')}` + +function response(structuredContent: unknown, options: { isError?: boolean; status?: number } = {}): Response { + return new Response(JSON.stringify({ + jsonrpc: '2.0', + id: 'catalog-test', + result: { structuredContent, ...(options.isError ? { isError: true } : {}) }, + }), { + status: options.status ?? 200, + headers: { 'content-type': 'application/json' }, + }) +} + +function content(value: Record): Record { + return { + ucp: { + version: SHOPIFY_UCP_VERSION, + capabilities: { 'dev.ucp.shopping.catalog.search': [{ version: SHOPIFY_UCP_VERSION }] }, + }, + ...value, + } +} + +describe('Shopify storefront UCP product adapter', () => { + it('requires a plausible shop domain and a public Able agent profile', () => { + expect(shopifyStorefrontConfigured({})).toBe(false) + expect(shopifyStorefrontConfigured({ SHOPIFY_SHOP_DOMAIN: 'not a domain' }, 'https://support.example.test')).toBe(false) + expect(shopifyStorefrontConfigured({ SHOPIFY_SHOP_DOMAIN: 'example-store.myshopify.com' })).toBe(false) + expect(shopifyStorefrontConfigured(ENV)).toBe(true) + expect(shopifyStorefrontConfigured( + { SHOPIFY_SHOP_DOMAIN: 'https://Example-Store.myshopify.com/products/x' }, + 'https://support.example.test', + )).toBe(true) + expect(shopifyStorefrontConfigured( + { SHOPIFY_SHOP_DOMAIN: 'example-store.myshopify.com' }, + 'http://localhost:8787', + )).toBe(false) + expect(shopifyStorefrontProfileUrl({}, 'https://support.example.test')).toBe(PROFILE_URL) + }) + + it('calls merchant-scoped Catalog MCP and returns only a bounded public projection', async () => { + const fetcher = vi.fn(async () => response(content({ products: [PRODUCT] }))) + const result = await searchStorefrontProducts(ENV, ' quiet home espresso grinder ', { + fetcher: fetcher as unknown as typeof fetch, + }) + + expect(fetcher).toHaveBeenCalledTimes(1) + const [endpoint, init] = fetcher.mock.calls[0] as unknown as [string, RequestInit] + expect(endpoint).toBe(ENDPOINT) + expect(init.method).toBe('POST') + expect(init.headers).toMatchObject({ + accept: 'application/json', + 'content-type': 'application/json', + 'user-agent': 'Able-Desk/1.0', + }) + const body = JSON.parse(String(init.body)) as { + jsonrpc: string + method: string + params: { name: string; arguments: { meta: Record; catalog: Record } } + } + expect(body).toMatchObject({ + jsonrpc: '2.0', + method: 'tools/call', + params: { + name: 'search_catalog', + arguments: { + meta: { 'ucp-agent': { profile: PROFILE_URL } }, + catalog: { + query: 'quiet home espresso grinder', + context: {}, + filters: { available: true }, + pagination: { limit: 5 }, + }, + }, + }, + }) + + expect(result).toEqual({ + status: 'ok', + products: [{ + reference: PRODUCT_REFERENCE, + handle: 'quiet-grinder', + title: 'Quiet Grinder', + description: 'A compact grinder for home espresso.', + vendor: null, + productType: 'Coffee Grinder', + availableForSale: true, + priceRange: { + min: { amount: '120.00', currencyCode: 'SGD' }, + max: { amount: '140.00', currencyCode: 'SGD' }, + }, + url: 'https://shop.example.test/products/quiet-grinder', + image: { url: 'https://cdn.shopify.com/grinder.jpg', altText: 'Black coffee grinder' }, + }], + }) + expect(JSON.stringify(result)).not.toMatch(/gid:\/\/|inventory|metafield|sku|tag/i) + }) + + it('localizes catalog reads with validated UCP country and BCP 47 language context', async () => { + const fetcher = vi.fn(async () => response(content({ products: [PRODUCT] }))) + await searchStorefrontProducts({ + ...ENV, + SHOPIFY_STOREFRONT_COUNTRY: 'in', + SHOPIFY_STOREFRONT_LANGUAGE: 'en_in', + }, 'grinder', { fetcher: fetcher as unknown as typeof fetch }) + + const [, init] = fetcher.mock.calls[0] as unknown as [string, RequestInit] + const body = JSON.parse(String(init.body)) as { + params: { arguments: { catalog: { context: Record } } } + } + expect(body.params.arguments.catalog.context).toEqual({ address_country: 'IN', language: 'en-IN' }) + }) + + it('looks deeper but still returns five products when finding a budget-safe bundle', async () => { + const separate = Array.from({ length: 5 }, (_, index) => ({ + ...PRODUCT, + id: `gid://shopify/Product/30${index}`, + handle: `separate-${index}`, + title: `Separate grinder ${index}`, + price_range: { + min: { amount: 1_200_000, currency: 'INR' }, + max: { amount: 1_200_000, currency: 'INR' }, + }, + variants: [{ + ...PRODUCT.variants[0], + id: `gid://shopify/ProductVariant/40${index}`, + price: { amount: 1_200_000, currency: 'INR' }, + }], + })) + const bundle = { + ...PRODUCT, + id: 'gid://shopify/Product/399', + handle: 'machine-with-grinder', + title: 'Espresso Machine with Grinder', + price_range: { + min: { amount: 4_300_000, currency: 'INR' }, + max: { amount: 4_400_000, currency: 'INR' }, + }, + variants: [{ + ...PRODUCT.variants[0], + id: 'gid://shopify/ProductVariant/499', + price: { amount: 4_300_000, currency: 'INR' }, + }], + } + const fetcher = vi.fn(async () => response(content({ products: [...separate, bundle] }))) + const result = await searchStorefrontProducts(ENV, 'machine grinder', { + fetcher: fetcher as unknown as typeof fetch, + shopperBudget: { amount: 45_000, currencyCode: 'INR' }, + requireBundle: true, + }) + + const [, init] = fetcher.mock.calls[0] as unknown as [string, RequestInit] + const body = JSON.parse(String(init.body)) as { + params: { arguments: { catalog: { pagination: { limit: number } } } } + } + expect(body.params.arguments.catalog.pagination.limit).toBe(12) + expect(result.status).toBe('ok') + if (result.status === 'ok') { + expect(result.products).toHaveLength(5) + expect(result.products[0]?.handle).toBe('machine-with-grinder') + expect(result.products[0]?.priceRange.max.amount).toBe('44000.00') + } + }) + + it('fetches bounded detail by the opaque reference returned from search', async () => { + const fetcher = vi.fn(async () => response(content({ + product: { + ...PRODUCT, + description: { html: '

      Detailed product context.

      ' }, + }, + }))) + + const result = await getStorefrontProduct(ENV, PRODUCT_REFERENCE, { + fetcher: fetcher as unknown as typeof fetch, + }) + const [, init] = fetcher.mock.calls[0] as unknown as [string, RequestInit] + const body = JSON.parse(String(init.body)) as { + params: { name: string; arguments: { catalog: Record } } + } + expect(body.params.name).toBe('get_product') + expect(body.params.arguments.catalog).toEqual({ id: PRODUCT.id, context: {} }) + expect(result).toMatchObject({ + status: 'ok', + product: { + reference: PRODUCT_REFERENCE, + handle: 'quiet-grinder', + description: 'Detailed product context.', + options: [{ name: 'Colour', values: ['Black', 'White'] }], + variants: [{ + title: 'Black', + availableForSale: true, + price: { amount: '120.00', currencyCode: 'SGD' }, + compareAtPrice: { amount: '135.00', currencyCode: 'SGD' }, + selectedOptions: [{ name: 'Colour', value: 'Black' }], + }], + }, + }) + expect(JSON.stringify(result)).not.toMatch(/MUST-NOT-LEAK|gid:\/\//) + }) + + it('does not call Shopify for malformed references or unusable search text', async () => { + const fetcher = vi.fn() + await expect(getStorefrontProduct(ENV, '../private', { fetcher: fetcher as unknown as typeof fetch })) + .resolves.toEqual({ status: 'not_found' }) + await expect(searchStorefrontProducts(ENV, ' ', { fetcher: fetcher as unknown as typeof fetch })) + .resolves.toEqual({ status: 'no_match' }) + expect(fetcher).not.toHaveBeenCalled() + }) + + it('distinguishes no match from outages and bounds provider responses', async () => { + const noMatch = vi.fn(async () => response(content({ products: [] }))) + await expect(searchStorefrontProducts(ENV, 'missing product', { fetcher: noMatch as unknown as typeof fetch })) + .resolves.toEqual({ status: 'no_match' }) + + const missing = vi.fn(async () => response(content({ product: null }))) + await expect(getStorefrontProduct(ENV, PRODUCT_REFERENCE, { fetcher: missing as unknown as typeof fetch })) + .resolves.toEqual({ status: 'not_found' }) + + const rpcError = vi.fn(async () => new Response(JSON.stringify({ + jsonrpc: '2.0', + id: 'catalog-test', + error: { code: -32603, message: 'private provider detail' }, + }), { status: 200 })) + await expect(searchStorefrontProducts(ENV, 'grinder', { fetcher: rpcError as unknown as typeof fetch })) + .resolves.toEqual({ status: 'unavailable' }) + + const oversized = vi.fn(async () => new Response('{}', { + headers: { 'content-length': String(512 * 1024 + 1) }, + })) + await expect(searchStorefrontProducts(ENV, 'grinder', { fetcher: oversized as unknown as typeof fetch })) + .resolves.toEqual({ status: 'unavailable' }) + + const hanging = ((_url: string, init?: RequestInit) => new Promise((_resolve, reject) => { + init?.signal?.addEventListener('abort', () => reject(new Error('aborted'))) + })) as unknown as typeof fetch + await expect(searchStorefrontProducts(ENV, 'grinder', { fetcher: hanging, timeoutMs: 5 })) + .resolves.toEqual({ status: 'unavailable' }) + }) +}) diff --git a/apps/desk/test/worker.test.ts b/apps/desk/test/worker.test.ts index 602a00f..b9f33f3 100644 --- a/apps/desk/test/worker.test.ts +++ b/apps/desk/test/worker.test.ts @@ -81,16 +81,31 @@ describe('Able Desk Worker boundary', () => { const publicMcp = await SELF.fetch('https://support.example.test/mcp') const publicOps = await SELF.fetch('https://support.example.test/ops') + const publicUcpProfile = await SELF.fetch('https://support.example.test/.well-known/ucp') expect(publicMcp.status).toBe(404) expect(publicOps.status).toBe(404) expect(publicMcp.headers.get('cache-control')).toBe('no-store') + expect(publicUcpProfile.status).toBe(200) + expect(publicUcpProfile.headers.get('content-type')).toContain('application/json') + expect(await publicUcpProfile.json()).toEqual({ + ucp: { + version: '2026-04-08', + capabilities: { + 'dev.ucp.shopping.catalog.search': [{ version: '2026-04-08' }], + 'dev.ucp.shopping.catalog.lookup': [{ version: '2026-04-08' }], + 'dev.shopify.catalog': [{ version: '2026-04-08' }], + }, + }, + }) const operatorHome = await SELF.fetch('https://operators.example.test/') const operatorKnowledge = await SELF.fetch('https://operators.example.test/kb') const operatorHealth = await SELF.fetch('https://operators.example.test/healthz') + const operatorUcpProfile = await SELF.fetch('https://operators.example.test/.well-known/ucp') expect(operatorHome.status).toBe(404) expect(operatorKnowledge.status).toBe(404) expect(operatorHealth.status).toBe(404) + expect(operatorUcpProfile.status).toBe(404) const operatorOps = await SELF.fetch('https://operators.example.test/ops') expect(operatorOps.status).toBe(200) diff --git a/apps/desk/tsconfig.json b/apps/desk/tsconfig.json index 928a5aa..2f43a52 100644 --- a/apps/desk/tsconfig.json +++ b/apps/desk/tsconfig.json @@ -16,5 +16,5 @@ "noEmit": true }, "include": ["src/**/*.ts", "src/**/*.tsx", "worker-configuration.d.ts"], - "exclude": ["src/adapters/mcp/app/**/*.ts", "src/voice/demo-client.ts", "src/portal/search-client.ts"] + "exclude": ["src/adapters/mcp/app/**/*.ts", "src/voice/demo-client.ts", "src/ui/markdown-client.ts", "src/portal/search-client.ts"] } diff --git a/apps/desk/wrangler.jsonc b/apps/desk/wrangler.jsonc index a4338db..b930b5f 100644 --- a/apps/desk/wrangler.jsonc +++ b/apps/desk/wrangler.jsonc @@ -4,12 +4,12 @@ "main": "src/worker.tsx", "workers_dev": false, "preview_urls": false, - "compatibility_date": "2026-07-18", + "compatibility_date": "2026-08-13", "compatibility_flags": ["nodejs_compat"], "assets": { "binding": "ASSETS", "directory": "./public", - "run_worker_first": ["/", "/healthz", "/mcp", "/ops", "/ops/*", "/webhooks/whatsapp", "/kb*", "/requests*", "/workspace-theme.css", "/portal/*", "/voice", "/demo/voice", "/agents/*", "/auth/*"] + "run_worker_first": ["/", "/healthz", "/.well-known/ucp", "/mcp", "/ops", "/ops/*", "/webhooks/whatsapp", "/kb*", "/requests*", "/workspace-theme.css", "/portal/*", "/voice", "/demo/voice", "/agents/*", "/auth/*"] }, "vars": { "ABLE_VOICE_DEMO_ENABLED": "1" diff --git a/apps/desk/wrangler.test.jsonc b/apps/desk/wrangler.test.jsonc index d632214..3615cad 100644 --- a/apps/desk/wrangler.test.jsonc +++ b/apps/desk/wrangler.test.jsonc @@ -2,12 +2,12 @@ "$schema": "node_modules/wrangler/config-schema.json", "name": "able-test", "main": "src/worker.tsx", - "compatibility_date": "2026-07-18", + "compatibility_date": "2026-08-13", "compatibility_flags": ["nodejs_compat"], "assets": { "binding": "ASSETS", "directory": "./public", - "run_worker_first": ["/", "/healthz", "/mcp", "/ops", "/ops/*", "/webhooks/whatsapp", "/kb*", "/requests*", "/workspace-theme.css", "/portal/*", "/voice", "/demo/voice", "/agents/*"] + "run_worker_first": ["/", "/healthz", "/.well-known/ucp", "/mcp", "/ops", "/ops/*", "/webhooks/whatsapp", "/kb*", "/requests*", "/workspace-theme.css", "/portal/*", "/voice", "/demo/voice", "/agents/*"] }, "vars": { "ABLE_VOICE_DEMO_ENABLED": "0" diff --git a/apps/desk/wrangler.voice-eval.jsonc b/apps/desk/wrangler.voice-eval.jsonc index 909f045..e8b2ebb 100644 --- a/apps/desk/wrangler.voice-eval.jsonc +++ b/apps/desk/wrangler.voice-eval.jsonc @@ -4,7 +4,7 @@ "main": "scripts/voice-eval-worker.ts", "workers_dev": false, "preview_urls": false, - "compatibility_date": "2026-07-18", + "compatibility_date": "2026-08-13", "compatibility_flags": ["nodejs_compat"], "ai": { "binding": "AI", diff --git a/docs/deployment.md b/docs/deployment.md index 8feb8b7..a734da3 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -19,6 +19,14 @@ At this point the Worker is provisioned, but the support desk is intentionally n The browser support assistant is published as the public homepage at `/` when `ABLE_VOICE_DEMO_ENABLED` is `1`; `/voice` and `/demo/voice` redirect there. It requires the production Email Service, Turnstile, rate-limit, D1, R2, Workers AI, and `CUSTOMER_CAPABILITY_SECRET` bindings. A session-level Turnstile proof enables anonymous text or voice help. The assistant collects a rate-limited name and email in-thread only before an identity-bearing order, ticket, or human-review action. Those details are unverified contact information used to name tickets, scope order lookup, and deliver follow-up. If the assistant is disabled or its required production setup is incomplete, `/` fails safely back to the conventional portal. +`DEEPGRAM_API_KEY` is an optional deployment secret for Indian-English Flux TTS; +never put it in `vars` or a committed `.dev.vars` file. With the secret absent, +or if Deepgram synthesis fails, the assistant uses Cloudflare-hosted Aura 2. +`ABLE_VOICE_TTS_MODEL` may select a `flux-{voice}-en` model and defaults to +`flux-priya-en`. Flux TTS is currently Early Access, so production rollout must +retain Aura 2 fallback and verify first audio plus interruption in a deployed +microphone canary. + For an already-provisioned production Worker, use `npm run deploy:production`. It refuses a non-`main` Cloudflare Builds branch, applies pending additive D1 migrations, rebuilds the embedded MCP App, and then deploys the Worker. ### Cloudflare Workers Builds @@ -98,7 +106,23 @@ Provider acceptance records the setup test as accepted. It does not prove inbox Create a Turnstile widget for the portal hostname and expose only its site key through private workspace/deployment configuration. Keep the secret in Wrangler. The Worker also applies a rate-limit binding; production deployments should add appropriate WAF rules and bot controls for their risk profile. -## 5a. Optional: store-account sign-in for order help +## 5a. Optional: Shopify product discovery + +Set `SHOPIFY_SHOP_DOMAIN` in the deployment's private configuration to enable +read-only shopping help against that merchant's Storefront Catalog MCP. The +public portal serves Able's catalog-only UCP agent profile at +`/.well-known/ucp`; Shopify fetches that profile during capability negotiation. +No Storefront access token is used. Optional `SHOPIFY_STOREFRONT_COUNTRY` and +`SHOPIFY_STOREFRONT_LANGUAGE` values provide provisional market and BCP 47 +language hints, while Shopify remains authoritative for current prices and +availability. Do not cache catalog results or product images. + +Before enabling the feature, confirm that the public portal hostname returns +the UCP profile, the development store's `/api/ucp/mcp` accepts that profile, +and product search returns only the intended published catalog. A localhost +profile is not sufficient because Shopify must fetch it from the public web. + +## 5b. Optional: store-account sign-in for order help When the deployment's Shopify store uses new customer accounts, the support portal can offer "Sign in for order help": a signed-in customer skips the diff --git a/docs/development.md b/docs/development.md index 3104763..d24de19 100644 --- a/docs/development.md +++ b/docs/development.md @@ -14,6 +14,65 @@ Able's public repository is the canonical source for product work. A private hos An urgent hosted fix may be developed against the affected public commit, but it must still be generalized and merged upstream before it becomes the maintained solution. Do not let a proving environment accumulate a long-lived source fork. +## Production-like local assistant + +Use the dedicated local workflow when testing the customer-facing assistant: + +```sh +npm install +npx wrangler login +npm run dev:parity +``` + +Open `http://127.0.0.1:8787/`. The command builds the same browser assets and +Worker entry point used for deployment, applies every D1 migration, and adds +only reserved `example.test` workspace readiness data plus a neutral knowledge +fixture. Its state persists under the ignored +`apps/desk/.wrangler/local-parity` directory, so agent conversations and local +requests behave consistently across restarts. No production database export, +customer record, attachment, resource ID, or secret is required. + +The command intentionally uses a hybrid Cloudflare development topology: + +- Text inference uses a remote Workers AI binding and consumes the authenticated + account's inference quota. Wrangler's local remote-binding proxy does not + preserve the raw response and WebSocket shapes required by Cloudflare Voice, + so `dev:parity` deliberately disables the microphone instead of presenting a + silent call. Test Nova-3 STT and Aura-2 TTS on a deployed staging or production + Worker, where the code and AI binding both execute on Cloudflare. +- D1, R2, queues, Durable Objects, Email Service, rate limits, and fixtures are + local simulations. Email acceptance and edge security controls therefore + need separate staging smoke tests. +- Durable Object state is newly local; it cannot mirror a deployed object's + identity, location, connection state, or warm/cold timing. Do not copy its + production storage into the local workspace. +- Turnstile and Cloudflare Access are bypassed only for the localhost surface. + Test their real policies on an isolated staging hostname. +- Local data is neutral. Production knowledge articles, storefront content, + and customer history are absent by design, so answers grounded in those + sources differ until equivalent non-customer fixtures or a staging provider + are configured. + +For Shopify product-discovery parity, copy +`apps/desk/.dev.vars.parity.example` to the ignored `apps/desk/.dev.vars` and +set `SHOPIFY_SHOP_DOMAIN` to a dedicated development store. Product discovery +uses that merchant's unauthenticated UCP Catalog MCP endpoint. Because Shopify +must fetch the agent profile, set `SHOPIFY_UCP_AGENT_PROFILE_URL` to the +`/.well-known/ucp` route on a public staging Able deployment; localhost is not +reachable by Shopify. For order and customer-account testing, also supply the +corresponding least-authority development app values shown in the template. +Never reuse production credentials. Product answers then use the development +store's live published catalog; they will not match production unless the +staging catalog intentionally contains equivalent neutral products. Catalog +results and images remain live provider data and are not cached. Do not copy +`.dev.vars.example` for this workflow: that file documents deployment setup +and its placeholders intentionally fail closed. + +Use plain `npm run dev` when you want to preserve and manage the default local +Wrangler state yourself. Unlike `dev:parity`, it does not seed the support +sender and accepted email-test values required for the assistant homepage, so +a fresh database may correctly fall back to the conventional portal. + ## Repository boundaries - `apps/desk` is the first deployable product workspace. diff --git a/docs/voice-demo.md b/docs/voice-demo.md index 794bf14..3223118 100644 --- a/docs/voice-demo.md +++ b/docs/voice-demo.md @@ -26,13 +26,29 @@ The browser uses `VoiceClient` from `@cloudflare/voice`. Audio travels over a We - `@cf/deepgram/flux` for streaming speech-to-text and turn detection; - `@cf/zai-org/glm-4.7-flash` with thinking disabled for concise responses and tool selection; -- `@cf/deepgram/aura-1` for text-to-speech. +- `@cf/deepgram/aura-2-en` for default text-to-speech. + +Deployments can set the `DEEPGRAM_API_KEY` secret to use Deepgram's newer Flux +TTS service for Indian-English playback. The default model is +`flux-priya-en`; `ABLE_VOICE_TTS_MODEL` can select another Flux English voice. +Audio uses Flux TTS's live WebSocket transport and streams as 24 kHz PCM, so +playback can begin before synthesis completes and caller interruption still +stops queued audio. Flux TTS is currently an Early Access Deepgram service; +keep the Cloudflare fallback enabled and re-run deployed voice checks when its +wire contract or voice catalog changes. +If that provider is unavailable, playback falls back to the Cloudflare-hosted +Aura 2 voice in the same PCM format instead of leaving the customer without audio. Provider errors +are logged only as bounded status/reason fields and never include credentials +or upstream response bodies. Every browser tab gets a random Durable Object instance name. The voice mixin keeps bounded conversation context in that object's SQLite storage. Ending a call, closing its WebSocket, or choosing **Start over** deletes the voice-message rows. The stated contact lasts only for the WebSocket connection. +For an `en-IN` / `Asia/Kolkata` workspace, Ava understands Indian English, Hindi, Roman Hindi, and Hinglish, mirrors the customer's language, uses Roman-script Hinglish unless the customer prefers Devanagari, and keeps prices, dates, and times in the expected India formats. The page explicitly invites English or Hinglish. This language behaviour is part of the model and text experience; the built-in `@cf/deepgram/aura-1` speaker is not presented as a native Indian/Hindi voice. A deployment that needs native Hindi/Hinglish speech must configure a multilingual speech provider and an India-trained voice after its Cloudflare voice adapter is available and tested. + ## Agent capabilities - answer support questions grounded in the published knowledge base via `search_help_center`, with the matching articles linked in the UI; +- search and inspect the deployment's live Shopify catalog through the merchant-scoped UCP Catalog MCP when configured, projecting only bounded shopper-visible fields and never caching catalog results or images; - create a real Helpdesk ticket addressed to the caller's stated contact; - automatically open a ticket when the deterministic escalation policy detects a serious issue; - speak the result and show newly created ticket references in the UI. @@ -51,6 +67,21 @@ npm run dev Open `http://localhost:8787/`. The legacy `/voice` and `/demo/voice` routes permanently redirect there. The production flag is committed on; set `ABLE_VOICE_DEMO_ENABLED:0` as a kill switch when the channel must be withdrawn, which restores the conventional portal home. +`npm run dev:parity` supports the complete text-agent flow but intentionally +disables its microphone. Cloudflare Voice's Nova-3 stream and Aura-2 raw audio +response require Worker-side execution on Cloudflare; Wrangler's local remote +AI binding currently proxies neither shape faithfully. Use an isolated deployed +preview or the protected production deployment for end-to-end microphone tests. + +For India deployments, voice input uses Workers AI Flux because it is the +Cloudflare Voice provider designed for conversational `withVoice` agents and +includes model-native turn detection. The Cloudflare-hosted Flux endpoint does +not currently expose Deepgram's multilingual model selector. Ava still +understands Indian-English text and answers with Indian context. When the +Deepgram secret is configured, playback uses an Indian-English Flux TTS voice; +without it, Aura 2's hosted English catalog remains the fallback and must not be +described as a native Indian voice. + ## Conversation guardrails and evals Ava is restricted to product, service, order, account, and existing-case support. She must treat short speech segments as possible continuations, acknowledge the customer's situation, ask at most one useful question per turn, infer internal case fields from the conversation, and explicitly stop callers from sharing secrets. @@ -62,7 +93,7 @@ npx wrangler login npm run eval:voice ``` -The suite runs the configured production model through an isolated local Worker with fake ticket creation, order fixtures, and help-centre article fixtures. It checks support scope, fragmented ticket intake, non-repetitive and empathetic progression, truthful status-unavailable handling, one-shot ticket creation with a spoken case reference, sensitive-data refusal, order lookup (asks for the number, grounded read-back, oracle-safe not-found, honest outage copy), anonymous grounded help, in-thread contact requests, and post-contact continuation. A how-to question must call `search_help_center` and answer only from returned article content without inventing facts or URLs; a no-match search must admit the gap and offer the appropriate order or ticket path. It uses remote Workers AI and therefore consumes inference quota, but it cannot read or mutate production Helpdesk data. Deterministic fragment and secret checks also run in the normal `npm test` gate. +The suite runs the configured production model through an isolated local Worker with fake ticket creation, order fixtures, and help-centre article fixtures. It checks support scope, grounded Hinglish for an India workspace, fragmented ticket intake, non-repetitive and empathetic progression, truthful status-unavailable handling, one-shot ticket creation with a spoken case reference, sensitive-data refusal, order lookup (asks for the number, grounded read-back, oracle-safe not-found, honest outage copy), anonymous grounded help, in-thread contact requests, and post-contact continuation. A how-to question must call `search_help_center` and answer only from returned article content without inventing facts or URLs; a no-match search must admit the gap and offer the appropriate order or ticket path. It uses remote Workers AI and therefore consumes inference quota, but it cannot read or mutate production Helpdesk data. Deterministic fragment and secret checks also run in the normal `npm test` gate. ## Security and operations diff --git a/package-lock.json b/package-lock.json index 2275951..0b2c0ab 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,24 +25,25 @@ "@modelcontextprotocol/ext-apps": "^1.7.5", "@modelcontextprotocol/sdk": "^1.29.0", "agents": "0.20.1", - "ai": "7.0.37", - "hono": "^4.12.32", + "ai": "7.0.64", + "hono": "^4.13.1", "marked": "^18.0.7", "postal-mime": "^2.7.5", + "remend": "^1.3.0", "workers-ai-provider": "4.0.0", "xss": "^1.0.15", "zod": "^4.4.3" }, "devDependencies": { - "@cloudflare/vitest-pool-workers": "^0.18.8", - "@cloudflare/workers-types": "^5.20260719.1", + "@cloudflare/vitest-pool-workers": "^0.21.2", + "@cloudflare/workers-types": "^5.20260813.1", "@playwright/test": "^1.62.0", "@types/node": "^24.0.0", "esbuild": "^0.28.1", "jsonc-parser": "3.3.1", "typescript": "^7.0.0", "vitest": "^4.1.0", - "wrangler": "^4.112.0" + "wrangler": "^4.122.0" }, "engines": { "node": "^22.22.0 || ^24.0.0" @@ -53,13 +54,13 @@ "link": true }, "node_modules/@ai-sdk/gateway": { - "version": "4.0.28", - "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-4.0.28.tgz", - "integrity": "sha512-ee9TsNO3mkgHDWmTmJ8Fvltr6PFh52zhrV2+FaKJY3F3iu7kWZi5tCRJCR1HVhhlpj6lHniUb28nLQdPHkA/1Q==", + "version": "4.0.51", + "resolved": "https://registry.npmjs.org/@ai-sdk/gateway/-/gateway-4.0.51.tgz", + "integrity": "sha512-tQxWGUbg/O3A5EgekJo/C2byLVQ1r+vL6QdEVWmxUSnPhdCupcOeDbQO1tv9Um40VrdwYuSWlYzcbWvtlG5bOA==", "license": "Apache-2.0", "dependencies": { - "@ai-sdk/provider": "4.0.3", - "@ai-sdk/provider-utils": "5.0.12", + "@ai-sdk/provider": "4.0.7", + "@ai-sdk/provider-utils": "5.0.27", "@vercel/oidc": "3.2.0" }, "engines": { @@ -69,24 +70,11 @@ "zod": "^3.25.76 || ^4.1.8" } }, - "node_modules/@ai-sdk/gateway/node_modules/@ai-sdk/provider": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-4.0.3.tgz", - "integrity": "sha512-e0CpNWJUY7OxAFAnCZkw+ri9QOHWwTs1tXP42782KFGCU07qt8NiXCrCVowyCB5dP2r5/Uls+g2oPd8kOJn9dw==", - "license": "Apache-2.0", - "dependencies": { - "json-schema": "^0.4.0" - }, - "engines": { - "node": ">=22" - } - }, "node_modules/@ai-sdk/provider": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-4.0.4.tgz", - "integrity": "sha512-tbHKNLirllUNF3ZlkCsXnwab2ZV1Sl4b1H/Cp9ruCce15IBmskE8Gwkk0yo9xDWY+jho2of7lVXtwSsyrq7cwQ==", + "version": "4.0.7", + "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-4.0.7.tgz", + "integrity": "sha512-6or44XprPzKbr8zkmzosowSE0pxkvJcoojBL+mCZvPUt3kvXp3XSNqeVun9golb1acEfSo6yaEBRT18h2VU+1Q==", "license": "Apache-2.0", - "peer": true, "dependencies": { "json-schema": "^0.4.0" }, @@ -95,15 +83,16 @@ } }, "node_modules/@ai-sdk/provider-utils": { - "version": "5.0.12", - "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-5.0.12.tgz", - "integrity": "sha512-bbhlOgHeYwrIGheLkM6fhS8hVger8uFPmcOLg+kxc9EFh7y30XYorWhthlYAgpadO3SJhFZrIcEknN7qEqEVvA==", + "version": "5.0.27", + "resolved": "https://registry.npmjs.org/@ai-sdk/provider-utils/-/provider-utils-5.0.27.tgz", + "integrity": "sha512-EzAn4pdgG5g0xXtH6lE2zyNmfjDQIDjATkfqzuidEI35g++hh4+07vnjzkT/RmGmIClPZiRj/Q2GMPV2V7mkHw==", "license": "Apache-2.0", "dependencies": { - "@ai-sdk/provider": "4.0.3", + "@ai-sdk/provider": "4.0.7", "@standard-schema/spec": "^1.1.0", "@workflow/serde": "4.1.0", - "eventsource-parser": "^3.0.8" + "eventsource-parser": "^3.0.8", + "undici": "^7.28.0" }, "engines": { "node": ">=22" @@ -112,18 +101,6 @@ "zod": "^3.25.76 || ^4.1.8" } }, - "node_modules/@ai-sdk/provider-utils/node_modules/@ai-sdk/provider": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-4.0.3.tgz", - "integrity": "sha512-e0CpNWJUY7OxAFAnCZkw+ri9QOHWwTs1tXP42782KFGCU07qt8NiXCrCVowyCB5dP2r5/Uls+g2oPd8kOJn9dw==", - "license": "Apache-2.0", - "dependencies": { - "json-schema": "^0.4.0" - }, - "engines": { - "node": ">=22" - } - }, "node_modules/@babel/code-frame": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-8.0.0.tgz", @@ -510,17 +487,17 @@ } }, "node_modules/@cloudflare/vitest-pool-workers": { - "version": "0.18.8", - "resolved": "https://registry.npmjs.org/@cloudflare/vitest-pool-workers/-/vitest-pool-workers-0.18.8.tgz", - "integrity": "sha512-O1kOMZqapidlezNFiBZ7Lbd+8mMEpkGmWwPj+nPLvOngxSL11lmWq7xl7vxyjDxbeD/7l22KqgvRGM7XFaYd9w==", + "version": "0.21.2", + "resolved": "https://registry.npmjs.org/@cloudflare/vitest-pool-workers/-/vitest-pool-workers-0.21.2.tgz", + "integrity": "sha512-728q7/ydJQtyAsQqw/ptxpp1hYaqQbK0i6kgFHV5HwWcaVFDh0/LWgbRcJBQ3b4ABz77O3MrdHppPu/CPMqimw==", "dev": true, "license": "MIT", "dependencies": { "cjs-module-lexer": "1.2.3", "esbuild": "0.28.1", - "miniflare": "4.20260722.0", - "wrangler": "4.114.0", - "zod": "3.25.76" + "miniflare": "5.20260811.0-alpha", + "wrangler": "4.122.0", + "zod": "4.4.3" }, "peerDependencies": { "@vitest/runner": "^4.1.0", @@ -528,74 +505,6 @@ "vitest": "^4.1.0" } }, - "node_modules/@cloudflare/vitest-pool-workers/node_modules/fsevents": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", - "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", - "dev": true, - "hasInstallScript": true, - "license": "MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/@cloudflare/vitest-pool-workers/node_modules/path-to-regexp": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", - "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", - "dev": true, - "license": "MIT" - }, - "node_modules/@cloudflare/vitest-pool-workers/node_modules/wrangler": { - "version": "4.114.0", - "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.114.0.tgz", - "integrity": "sha512-M65P25t5UHA1TIJfgZXDcj+YzVobgKdRguM2QPz0xnxLFuOcuE3ErgllDht0iaho7MS4o0g/Bb4YK2+GT+bibg==", - "dev": true, - "license": "MIT OR Apache-2.0", - "dependencies": { - "@cloudflare/kv-asset-handler": "0.5.0", - "@cloudflare/unenv-preset": "2.16.1", - "blake3-wasm": "2.1.5", - "esbuild": "0.28.1", - "miniflare": "4.20260722.0", - "path-to-regexp": "6.3.0", - "unenv": "2.0.0-rc.24", - "workerd": "1.20260722.1" - }, - "bin": { - "cf-wrangler": "bin/cf-wrangler.js", - "wrangler": "bin/wrangler.js", - "wrangler2": "bin/wrangler.js" - }, - "engines": { - "node": ">=22.0.0" - }, - "optionalDependencies": { - "fsevents": "2.3.3" - }, - "peerDependencies": { - "@cloudflare/workers-types": "^5.20260722.1" - }, - "peerDependenciesMeta": { - "@cloudflare/workers-types": { - "optional": true - } - } - }, - "node_modules/@cloudflare/vitest-pool-workers/node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/@cloudflare/voice": { "version": "0.3.5", "resolved": "https://registry.npmjs.org/@cloudflare/voice/-/voice-0.3.5.tgz", @@ -616,9 +525,9 @@ } }, "node_modules/@cloudflare/workerd-darwin-64": { - "version": "1.20260722.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260722.1.tgz", - "integrity": "sha512-vZOP8vIS3NwnuaO+gz0FZ7kIGeiO3bZmxV35Ph9zOXKSREhDFlH7wQ7mkCdhW3O4jnXsew+XT7b+DNEI2CcJGQ==", + "version": "1.20260811.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260811.1.tgz", + "integrity": "sha512-i5jqz+ywtOefr0AJbiAc8qxBLfSim/B0WJG7aW3B+pWnoVfMJdUQvi+BWcFKZJ0MoCci3KadTx6g31VfuEEqpQ==", "cpu": [ "x64" ], @@ -633,9 +542,9 @@ } }, "node_modules/@cloudflare/workerd-darwin-arm64": { - "version": "1.20260722.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260722.1.tgz", - "integrity": "sha512-EmIQymihDq6WNdER4+LF8Qn80yqayBUpJ+tkOO7wmY8pmgfyXjIUFNXotl21AHovTeu2seR7HdVUgeN/BilCWw==", + "version": "1.20260811.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260811.1.tgz", + "integrity": "sha512-NoOUM/nvaDdm2Onlnz33FikWjtatzulNtvwvy4xs0IrHaTCHwC0c8NwIt6s+AI13FkDs02/vm2I3GTPLCT9+hQ==", "cpu": [ "arm64" ], @@ -650,9 +559,9 @@ } }, "node_modules/@cloudflare/workerd-linux-64": { - "version": "1.20260722.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260722.1.tgz", - "integrity": "sha512-jvZ3k9fxcnEn04s80CgIYxQfpOyAiz/8qC42DP8EBa9tR27qWyg9wmm31zIobVlrgBZn/+8NfdP73avRGcQOjQ==", + "version": "1.20260811.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260811.1.tgz", + "integrity": "sha512-sdYq2jL1AD1supa3fsi5O4zTB28wSjvTHj7Migh6/ts8EROPdvrSwv+rdGHhv8HJNAz/wbIAY3wZsi1Rw4uUIg==", "cpu": [ "x64" ], @@ -667,9 +576,9 @@ } }, "node_modules/@cloudflare/workerd-linux-arm64": { - "version": "1.20260722.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260722.1.tgz", - "integrity": "sha512-BOSB55SMNdy+DA5uj2WirgiNanpHGis5PVvXH1wSfvjRKr4JGgWK+EZzxz0RFUo6QjjQQC/NimEzNZ7va7jmKg==", + "version": "1.20260811.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260811.1.tgz", + "integrity": "sha512-RIRv4shbu1kg05sD+DHTpSFCNnb5Dl2SkPDMUykqZa508tkPqe7VVw7gO0Q5msTBGyL0FfFrLuRxwwfA8u5Sow==", "cpu": [ "arm64" ], @@ -684,9 +593,9 @@ } }, "node_modules/@cloudflare/workerd-windows-64": { - "version": "1.20260722.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260722.1.tgz", - "integrity": "sha512-sYM8YgUpKnRz2xjvdJLX1Ojzoi4MlA4gk8WTTExhGydjYB2UTs5NIbv0ZmpKgMoK9io3ixgmiW56ZnTbcWOdiA==", + "version": "1.20260811.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260811.1.tgz", + "integrity": "sha512-g6VquwjASlYAibcNW/0E6Zszht4qLkmnXOGwIjjRHl2A0Qz48kVeMcGvyH6eA0G9U3OzZojjYFpP+YeyQmmdjw==", "cpu": [ "x64" ], @@ -701,9 +610,9 @@ } }, "node_modules/@cloudflare/workers-types": { - "version": "5.20260801.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-5.20260801.1.tgz", - "integrity": "sha512-XCv5xWi47WQOK0LpLa6997Mrpz8Ct+nZmp/M5Xp8Z4BFsarf7nYjkznGOcOoYK5m1GfbMFEEuQ2OIZnbIWoe9A==", + "version": "5.20260813.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-5.20260813.1.tgz", + "integrity": "sha512-RQNfm7xD10hNHEQZFxQPmyGMJ9+aDGPcdFZ0x1LtmjRoLFcgZkGvfaqJAbOMQBAUFSESO3bYJS4p9mOLv28Ihg==", "license": "MIT OR Apache-2.0" }, "node_modules/@cspotcode/source-map-support": { @@ -2860,14 +2769,14 @@ } }, "node_modules/ai": { - "version": "7.0.37", - "resolved": "https://registry.npmjs.org/ai/-/ai-7.0.37.tgz", - "integrity": "sha512-stF+SEQJgKY3Qfe3FwNzqUrehHviOp2l7LemoI8YMOa0Zk5PxKsRNgUk3cHXz0RAue9RRyCAis2fz6LSCP6EKw==", + "version": "7.0.64", + "resolved": "https://registry.npmjs.org/ai/-/ai-7.0.64.tgz", + "integrity": "sha512-29Ufm56e53pRzIPueWzZiwJsgxmZStaBFpwEkVM89sqyIIax/pzDm+ez/ksJ/CcY9UCuYzvCQpE2zkFHICvS3w==", "license": "Apache-2.0", "dependencies": { - "@ai-sdk/gateway": "4.0.28", - "@ai-sdk/provider": "4.0.3", - "@ai-sdk/provider-utils": "5.0.12" + "@ai-sdk/gateway": "4.0.51", + "@ai-sdk/provider": "4.0.7", + "@ai-sdk/provider-utils": "5.0.27" }, "engines": { "node": ">=22" @@ -2876,18 +2785,6 @@ "zod": "^3.25.76 || ^4.1.8" } }, - "node_modules/ai/node_modules/@ai-sdk/provider": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/@ai-sdk/provider/-/provider-4.0.3.tgz", - "integrity": "sha512-e0CpNWJUY7OxAFAnCZkw+ri9QOHWwTs1tXP42782KFGCU07qt8NiXCrCVowyCB5dP2r5/Uls+g2oPd8kOJn9dw==", - "license": "Apache-2.0", - "dependencies": { - "json-schema": "^0.4.0" - }, - "engines": { - "node": ">=22" - } - }, "node_modules/ajv": { "version": "8.20.0", "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz", @@ -3779,9 +3676,9 @@ } }, "node_modules/hono": { - "version": "4.12.33", - "resolved": "https://registry.npmjs.org/hono/-/hono-4.12.33.tgz", - "integrity": "sha512-+SwvkaiJtxsiPjhy9LivY/1m7UsNqCJetM1BrZl9A5DkQhlbHQDU730mMiDPWjnoCYOM8Chf3WrCJw27kNTPFQ==", + "version": "4.13.1", + "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.1.tgz", + "integrity": "sha512-kdJoFVv2xmayw6cY09H7AbMJMt8Jn5jdlEdXsP7AGBdF2DIptVlKlOLKXP41yPip4/a3yQPv9gVcJYI8YY04dw==", "license": "MIT", "engines": { "node": ">=16.9.0" @@ -4341,22 +4238,19 @@ } }, "node_modules/miniflare": { - "version": "4.20260722.0", - "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-4.20260722.0.tgz", - "integrity": "sha512-LW6ABMhCx/yIEFBLC/DO4yAhdm2T/G7jp7pr5T2kj895+CCIaHZqpMXdW9O6YE48LcYcCJChwWc8aEs1vpbTXw==", + "version": "5.20260811.0-alpha", + "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20260811.0-alpha.tgz", + "integrity": "sha512-sypXsD5fjY88fZNedPqnwrwR1dwfnfbfW7MfvMyIfPJdtRiCCOpUnjWGeFVYYZ+0fQVICye6Juu+vZgzTEx8XA==", "dev": true, "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "0.8.1", "sharp": "0.35.2", - "undici": "7.28.0", - "workerd": "1.20260722.1", + "undici": "7.29.0", + "workerd": "1.20260811.1", "ws": "8.21.0", "youch": "4.1.0-beta.10" }, - "bin": { - "miniflare": "bootstrap.js" - }, "engines": { "node": ">=22.0.0" } @@ -4618,9 +4512,9 @@ } }, "node_modules/postcss/node_modules/nanoid": { - "version": "3.3.16", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", - "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "version": "3.3.18", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.18.tgz", + "integrity": "sha512-DTg4MJbGMWkfi6VZFdNt2/caMbQy4Ou+Op/hJQvGEWcnVfoA1QA+xzRKAzw9jD6+GVOOeYr/mIcuDSdug6F6+w==", "devOptional": true, "funding": [ { @@ -4703,6 +4597,12 @@ "node": ">=0.10.0" } }, + "node_modules/remend": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/remend/-/remend-1.3.0.tgz", + "integrity": "sha512-iIhggPkhW3hFImKtB10w0dz4EZbs28mV/dmbcYVonWEJ6UGHHpP+bFZnTh6GNWJONg5m+U56JrL+8IxZRdgWjw==", + "license": "Apache-2.0" + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -5179,10 +5079,9 @@ } }, "node_modules/undici": { - "version": "7.28.0", - "resolved": "https://registry.npmjs.org/undici/-/undici-7.28.0.tgz", - "integrity": "sha512-cRZYrTDwWznlnRiPjggAGxZXanty6M8RV1ff8Wm4LWXBp7/IG8v5DnOm74DtUBp9OONpK75YlPnIjQqX0dBDtA==", - "dev": true, + "version": "7.29.0", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.29.0.tgz", + "integrity": "sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==", "license": "MIT", "engines": { "node": ">=20.18.1" @@ -5470,9 +5369,9 @@ } }, "node_modules/workerd": { - "version": "1.20260722.1", - "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20260722.1.tgz", - "integrity": "sha512-NycKuc1x2onvsRfGGpM093vRlLFU2zHDAM0+APpccfg4+gZxDGCH27RmdDvkeBuoZyYqgLo3oAfF6re4mvC3vQ==", + "version": "1.20260811.1", + "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20260811.1.tgz", + "integrity": "sha512-kh+FFm55JQ4ssxhHZV9VPdMQq3D1nHxNJgwxMtWGD4dGppJvLySdguTRDKgeNTvgq6heSz+6TTXyPSDGj8Yllw==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -5483,11 +5382,11 @@ "node": ">=16" }, "optionalDependencies": { - "@cloudflare/workerd-darwin-64": "1.20260722.1", - "@cloudflare/workerd-darwin-arm64": "1.20260722.1", - "@cloudflare/workerd-linux-64": "1.20260722.1", - "@cloudflare/workerd-linux-arm64": "1.20260722.1", - "@cloudflare/workerd-windows-64": "1.20260722.1" + "@cloudflare/workerd-darwin-64": "1.20260811.1", + "@cloudflare/workerd-darwin-arm64": "1.20260811.1", + "@cloudflare/workerd-linux-64": "1.20260811.1", + "@cloudflare/workerd-linux-arm64": "1.20260811.1", + "@cloudflare/workerd-windows-64": "1.20260811.1" } }, "node_modules/workers-ai-provider": { @@ -5515,9 +5414,9 @@ } }, "node_modules/wrangler": { - "version": "4.118.0", - "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.118.0.tgz", - "integrity": "sha512-9pkBw/b8zWqGx2S+oLhgHMR1M/4VOE8SynUFABnGWiSFGlcOQ4xiI/B71Xf66RYP2xzngU37IQFPtUruij3lYw==", + "version": "4.122.0", + "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.122.0.tgz", + "integrity": "sha512-qkskzgQ76Y1qvVe5JARgvc3RISq6BC2rPoxQhFoKH1dKIwQc3GDFttQ/7m2OfeQ+tmQRzynv2dy/DXnxFCj2Lw==", "dev": true, "license": "MIT OR Apache-2.0", "dependencies": { @@ -5525,10 +5424,10 @@ "@cloudflare/unenv-preset": "2.16.1", "blake3-wasm": "2.1.5", "esbuild": "0.28.1", - "miniflare": "5.20260730.0-alpha", + "miniflare": "5.20260811.0-alpha", "path-to-regexp": "6.3.0", "unenv": "2.0.0-rc.24", - "workerd": "1.20260730.1" + "workerd": "1.20260811.1" }, "bin": { "cf-wrangler": "bin/cf-wrangler.js", @@ -5542,7 +5441,7 @@ "fsevents": "2.3.3" }, "peerDependencies": { - "@cloudflare/workers-types": "^5.20260730.1" + "@cloudflare/workers-types": "^5.20260811.1" }, "peerDependenciesMeta": { "@cloudflare/workers-types": { @@ -5550,91 +5449,6 @@ } } }, - "node_modules/wrangler/node_modules/@cloudflare/workerd-darwin-64": { - "version": "1.20260730.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260730.1.tgz", - "integrity": "sha512-+MBHmPaiTe2KajryW0T24rZvWFxb41hD3d8anNzQqHzft6vSEb18+sp0znSwxgij7ApPhSM1+vhkNg4f3YMguA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/wrangler/node_modules/@cloudflare/workerd-darwin-arm64": { - "version": "1.20260730.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260730.1.tgz", - "integrity": "sha512-SBHKntPkKvNPgaCrTe99xC1CAl8ygJDzlYfK0LbuJ1muKadIw35WnhO0wu894fKBtllsVQdNzDLee+cm0ppLSQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/wrangler/node_modules/@cloudflare/workerd-linux-64": { - "version": "1.20260730.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260730.1.tgz", - "integrity": "sha512-ouyPOSMbiKPeSwUJUvxtMcxGAXs2J4aPE4T5ABIYX5ClcQx5j5bbHTmnqOQEY8sAuLTPjH7dY+iB6UI5ISlwwA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/wrangler/node_modules/@cloudflare/workerd-linux-arm64": { - "version": "1.20260730.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260730.1.tgz", - "integrity": "sha512-YQ+Mi78U3TPdgBPtwq+Sm6rJU+Ihl2y0pjYtuuKkdmUbYzL7oLR6Xqq9wljhasnuCFICssDJaqhMep5WizYoEQ==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/wrangler/node_modules/@cloudflare/workerd-windows-64": { - "version": "1.20260730.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260730.1.tgz", - "integrity": "sha512-27fAN+vUECW1oYVc1KOcHYpkL8COM2Uxtxql7TL595kxbjoqS5yckw7NLz7bTf2pALFCZWjqXDjZGJ/xbG4ZKQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=16" - } - }, "node_modules/wrangler/node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -5650,24 +5464,6 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/wrangler/node_modules/miniflare": { - "version": "5.20260730.0-alpha", - "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20260730.0-alpha.tgz", - "integrity": "sha512-8/dspSXDshP6nSkCpjKO7BYc2qZoYSXm7iM+QxY7qJyJpAB3onnQSaiu0cvKJlfuMGwULl55hG69FJCcCMXU1Q==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "0.8.1", - "sharp": "0.35.2", - "undici": "7.28.0", - "workerd": "1.20260730.1", - "ws": "8.21.0", - "youch": "4.1.0-beta.10" - }, - "engines": { - "node": ">=22.0.0" - } - }, "node_modules/wrangler/node_modules/path-to-regexp": { "version": "6.3.0", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", @@ -5675,27 +5471,6 @@ "dev": true, "license": "MIT" }, - "node_modules/wrangler/node_modules/workerd": { - "version": "1.20260730.1", - "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20260730.1.tgz", - "integrity": "sha512-zmfNIjwYSWFY5chGBOjWtH3xAE7p97FTC6vR4Ep98290ho6AeAR/NVcBD274YCLEUYzqm8yxdtZlxMybU8a3jA==", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "bin": { - "workerd": "bin/workerd" - }, - "engines": { - "node": ">=16" - }, - "optionalDependencies": { - "@cloudflare/workerd-darwin-64": "1.20260730.1", - "@cloudflare/workerd-darwin-arm64": "1.20260730.1", - "@cloudflare/workerd-linux-64": "1.20260730.1", - "@cloudflare/workerd-linux-arm64": "1.20260730.1", - "@cloudflare/workerd-windows-64": "1.20260730.1" - } - }, "node_modules/wrap-ansi": { "version": "9.0.2", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-9.0.2.tgz", diff --git a/package.json b/package.json index 18fcc43..0a6450f 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "build": "npm run build:assets", "build:assets": "npm run build:assets --workspace @able/desk", "dev": "npm run dev --workspace @able/desk", + "dev:parity": "npm run dev:parity --workspace @able/desk", "deploy": "npm run deploy --workspace @able/desk", "deploy:production": "npm run deploy:production --workspace @able/desk", "build:production-config": "npm run build:production-config --workspace @able/desk",