cc-safety-net 2.3.3 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/amp/cc-safety-net/index.ts +44 -92
- package/dist/api.d.ts +0 -6
- package/dist/api.js +1 -1
- package/dist/bin/cc-safety-net.js +12 -5979
- package/dist/bin/hook.js +50 -0
- package/dist/bin/package.json +1 -0
- package/dist/chunks/index-chc1n91k.js +48 -0
- package/dist/chunks/index-n0tze7vr.js +2 -0
- package/dist/chunks/index-ver1bgty.js +4 -0
- package/dist/cli.js +5919 -0
- package/dist/index.js +1 -1
- package/dist/openclaw/cc-safety-net/index.js +44 -92
- package/dist/openclaw/cc-safety-net/openclaw.plugin.json +1 -1
- package/dist/openclaw/cc-safety-net/package.json +1 -1
- package/dist/pi/index.js +2 -2
- package/package.json +10 -14
- package/THIRD_PARTY_LICENSES.txt +0 -23
- package/dist/chunks/index-ebfx04sr.js +0 -18
- package/dist/chunks/index-tm5km50k.js +0 -46
- package/dist/chunks/index-y9vmf6ts.js +0 -2
- package/dist/vendor/zod.cjs +0 -38
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e="\n# CC Safety Net\n\nCC Safety Net hooks into coding agent CLIs (Claude Code, Codex, Cursor, Gemini CLI, and others)\nand blocks destructive commands and secret access before they run. The `cc-safety-net` CLI\ninspects and controls that protection. Run it as `npx -y cc-safety-net`.\n\n## Learn the current CLI\n\nThe installed CLI is the authority for command syntax. Do not guess flags.\n\n```bash\nnpx -y cc-safety-net --help\nnpx -y cc-safety-net help <command>\n```\n\nRun `npx -y cc-safety-net rule doc` and treat that output as the complete source of truth for\nrulebook schema, paths, GitHub sources, matching behavior, and validation.\n\nThese commands are read-only and safe to run for discovery: `--help`, `--version`, `status`,\n`doctor`, `logs` (without `--prune-legacy`), `explain`, `rule list`, `rule verify`, `rule doc`,\n`policy check`, `help`. Every other command mutates configuration or installed integrations; run\nthose only as part of a workflow below.\n\n## Core model\n\n- Built-in guards always apply. Custom rules only add restrictions; nothing in rule config can\n bypass built-in CC Safety Net protections.\n- Config files (`rule.json`) list rulebook sources. Rule definitions live in `rulebook.json`,\n not directly in `rule.json`.\n- Three scopes: user (all projects), project (current project only), and shareable GitHub\n rulebooks at `.cc-safety-net/rules/<rulebook-name>/rulebook.json` in a repository.\n- Rulebooks are live files. The runtime reads each `rulebook.json` on every tool call, so a saved\n edit applies to the next command with no sync step.\n- `policy.json` sets the safety level, per-feature toggles, per-rule overrides, and path lists. It\n has two scopes: the project file `.cc-safety-net/policy.json`, committed and shared with the\n team, layered on the user file that applies to every project.\n- The session safety level is `standard`, `strict`, or `paranoid`, set per session with the\n `CC_SAFETY_NET_LEVEL` environment variable.\n\n## Choose the workflow\n\n- The user asks why a command was blocked, or shows a `BLOCKED by CC Safety Net` message:\n explain a decision.\n- The user thinks a block was wrong: triage a false positive.\n- The user wants to add, edit, disable, or migrate blocking rules: configure rules.\n- The user wants to change the safety level, toggle a protection, or adjust path lists: configure\n the policy.\n- The user wants CC Safety Net installed into or removed from an agent CLI: manage integrations.\n- A rule does not fire, or the user asks whether protection is working: diagnose.\n- The user asks how or why the analyzer behaves a certain way, beyond what `explain` and\n `rule doc` show: answer from the source.\n\n## Explain a decision\n\n1. Get the exact blocked command. If the user does not have it, find it with\n `npx -y cc-safety-net logs` (narrow with `--project .`, `--agent <name>`, or `--since <days>`).\n2. Pass the exact command to `npx -y cc-safety-net explain` as one literal argument. Prefer an\n argv-capable tool; when invoking through a shell, shell-escape the whole command as one\n argument. Never interpolate raw command text into double quotes: `$()`, backticks, and\n variables would expand before `explain` receives it. Add `--cwd <path>` when the decision\n depends on the working directory. Once received, `explain` analyzes the string and never\n executes it.\n3. Read the trace: how the command was split, which rule matched, and the RESULT status and\n reason. `explain` exits 0 for both allowed and blocked verdicts; read the verdict from the\n output, not the exit status.\n4. Report the reason in plain language. For a genuine hazard, suggest the safer alternative the\n reason names, such as `git stash` before `git reset --hard`.\n\n## Triage a false positive\n\n1. List recent suspect denials with `npx -y cc-safety-net logs --suspect --since 7`, or fetch\n one entry with `npx -y cc-safety-net logs --id <id>`.\n2. Reproduce the decision with `explain` and read which rule fired.\n3. If a custom rule fired, fix that rulebook: disable or reword it with an override, or edit the\n rule (see configure rules), then re-run `explain` to confirm the new verdict.\n4. If a built-in rule fired, no rule edit can relax it. Check the reason for a documented escape\n hatch, such as `CC_SAFETY_NET_WORKTREE=1` for local git discards in linked worktrees, or\n `rule wrapper add` when a trusted transparent wrapper hid the real command from the analyzer.\n Pass the wrapper name as a separate argv value, or shell-escape it as one argument. If the\n user explicitly wants that built-in rule off, read its id from the `ruleId` field of\n `explain --json` and propose a per-rule policy override (see configure the policy). Otherwise\n explain the risk the rule guards against and suggest reporting the case at\n https://github.com/kenryu42/cc-safety-net/issues.\n\n## Configure rules\n\nUse information already provided in the user's prompt. Ask only when the scope, action, rule\nintent, merge behavior, or target command is unclear.\n\n1. Determine the requested scope from the prompt when possible:\n - User: applies to all projects.\n - Project: applies only to the current project.\n - GitHub: edits or creates a shareable rulebook structure in the current repository.\n2. Determine whether to add a rule, edit a rule, disable a rule, override a reason, trust a\n transparent wrapper, migrate legacy rules, or explain custom rules from the prompt when\n possible.\n3. Inspect existing configs before modifying installed local rules:\n - Run `npx -y cc-safety-net rule verify`\n - Run `npx -y cc-safety-net rule list`\n4. Inspect relevant project files only when the user asks for rule suggestions or the requested\n rule depends on project context. Look at manifests, scripts, task runners, CI, infrastructure,\n database, migration, and deployment files that explain risky commands.\n5. Convert the request into valid CC Safety Net JSON using `rule doc`.\n - For User or Project scope, add or edit the selected local `rule.json` and\n `<rulebook-name>/rulebook.json`.\n - For GitHub scope, add or edit `.cc-safety-net/rules/<rulebook-name>/rulebook.json` in the\n current repository.\n - Do not offer to add a GitHub source with `owner/repo`; installing rules from a GitHub\n source is outside this workflow.\n - If the user explicitly asks to install existing GitHub rulebooks instead of authoring them,\n use `npx -y cc-safety-net rule add owner/repo --only <rulebook...>`; omit `--only` only\n when they want every rulebook, and add `--ref <ref>` only when they name a non-default ref.\n `rule add --only <rulebook...>` with no source selects from the official\n `cc-safety-net/rulebooks` repository, whose curated rulebooks block destructive Terraform,\n AWS, gcloud, and Azure CLI operations; prefer installing one of those over authoring when it\n already covers the request.\n - For transparent wrappers, prefer `npx -y cc-safety-net rule wrapper add` with the trusted\n wrapper name passed as a separate argv value, or shell-escaped as one argument, over editing\n `rule.json` by hand.\n6. Preserve unrelated existing rulebook sources, overrides, and rulebooks. Preview proposed JSON\n before writing when creating a new rulebook, merging with existing config, or resolving\n ambiguity.\n7. For GitHub rules, ensure the repository layout is\n `.cc-safety-net/rules/<rulebook-name>/rulebook.json`, and ensure the source name, directory\n name, and rulebook `name` match exactly.\n8. Validate after edits:\n - User or Project rules: run `npx -y cc-safety-net rule verify` and `npx -y cc-safety-net rule\n list`. Both commands cover every scope, so neither takes `--global`.\n - Shareable GitHub rulebook-only edits: run `npx -y cc-safety-net rule verify`. Run `list` only\n if the rulebook is also installed in local `rule.json`.\n9. If validation fails, show the exact errors and make the smallest fix.\n10. Confirm the saved paths or GitHub rulebook path and summarize the added or updated rules.\n\nRule invariants:\n\n- Do not use legacy inline `.safety-net.json` or `~/.cc-safety-net/config.json` rules. Convert\n existing legacy files with `npx -y cc-safety-net rule migrate`.\n- Every rule command must be listed in `allowed_commands`. The `tests` fixtures are optional;\n `rule verify` evaluates `rulebook_version` 2 fixtures against the rulebook's own rules, and\n fixture commands are analyzer input that CC Safety Net never executes.\n- A blocked fixture, when present, must specify the expected `rule`, and that rule must exist in\n the rulebook.\n- Local source names are bare names such as `project-rules`; do not put filesystem paths in\n `rules`.\n- A saved rulebook is live. There is no pending state and nothing to run afterwards, so verify the\n edit rather than activating it.\n- A missing or invalid rulebook file makes that source inactive, and an unreadable or invalid\n `rule.json` makes every source in its scope inactive: those rules stop applying while other\n custom rules and built-in protections stay active. Fix the file named in the diagnostic.\n- A duplicate rulebook name keeps the first claim, user scope before project scope, and ignores\n the later rulebook.\n- `npx -y cc-safety-net rule add owner/repo` fetches remote rulebooks, validates them, and vendors\n each one into `<rulebook-name>/rulebook.json`; `npx -y cc-safety-net rule update [source]`\n re-fetches and overwrites those copies and prints what changed. The runtime never fetches, and a\n remote source with no vendored file reports that `rule update` has to vendor it first.\n- `rule sync` is deprecated: it only migrates lock and cache leftovers from an earlier version.\n Never run it as a validation or activation step.\n\n## Configure the policy\n\nBoth `policy.json` files are protected: you propose the change, the user applies it. Reading them\nis allowed, writing them is not.\n\n`policy.json` fields, all optional except `version: 1` (`policy check` reports every schema\nerror, so validate against it rather than guessing further fields):\n\n- `safety.level`: `standard`, `strict`, or `paranoid`. `safety.overrides`: booleans for\n `fail_closed`, `paranoid_rm`, and `paranoid_interpreters` that pin one capability apart from\n the level.\n- `workflow.worktree_mode`: boolean, allows local git discards in linked worktrees.\n- `destructive_command_protection` and `secret_protection`: an `enabled` boolean, and per-rule\n `overrides` mapping a built-in rule id (`git.reset-hard`, `secret.basename.env`) to `\"on\"` or\n `\"off\"`. Get the id for a blocked command from the `ruleId` field of `explain --json`.\n- `destructive_command_protection.allow_paths`: absolute or `~/` paths where recursive delete\n targets are permitted. `secret_protection.allow_paths`: exact user-managed paths exempted from\n secret protection, globs rejected. `secret_protection.deny_paths`: extra paths protected like\n built-in secrets.\n- `audit.retention_days`: days of audit history to keep, user scope only.\n\n1. Inspect the current state: `npx -y cc-safety-net status` for the effective policy and the file\n paths it loaded, `npx -y cc-safety-net rule list` for custom rules, plus whatever project\n context the request depends on. Read an existing `policy.json` before proposing changes to it.\n2. Write the proposed policy JSON to an unprotected path such as `policy-proposal.json`. For\n project scope, set only the fields the team intends to control; an unset field inherits\n from the user policy, and `apply` writes only the fields the proposal sets.\n Applying replaces the target file, so the proposal is the complete policy, not a patch. Audit\n settings are user scope only; a project proposal cannot set them.\n3. Run `npx -y cc-safety-net policy check policy-proposal.json` and show the user the printed\n diff. Add `--global` to target the user policy instead of the project one. Fix every reported\n error and re-check until it passes.\n4. Ask the user to run the apply in their own terminal and quote the exact command:\n `npx -y cc-safety-net policy apply policy-proposal.json` (with `--global` when that is the\n scope). It confirms interactively, there is no `--yes` flag, and agent invocations of\n `policy apply` are blocked by design, so never run it, wrap it, or write the file yourself.\n5. Once the user confirms they applied it, run `npx -y cc-safety-net status` and report the\n effective policy, including any project scope deltas it prints.\n\n## Manage integrations\n\n1. Run `npx -y cc-safety-net doctor` first. It reports each supported platform as detected,\n configured, and verified, and names outdated installs with the exact repair command.\n2. Install with an explicit target flag, such as `npx -y cc-safety-net install --claude-code`.\n Run `npx -y cc-safety-net help install` for the full target list. Bare `install` opens an\n interactive picker; leave that for the user's own terminal.\n3. Run `npx -y cc-safety-net@latest update` to update every installed integration at once.\n4. Uninstall only when the user explicitly asks to remove protection, with the matching target\n flag.\n5. After any install, update, or uninstall, run `doctor` again and confirm the affected platform\n rows read as verified.\n\n## Diagnose\n\n1. `npx -y cc-safety-net status` shows what the runtime enforces right now, including a degraded\n `policy.json` that `rule list` does not report.\n2. `npx -y cc-safety-net doctor` verifies the installation: platform detection and hook config,\n a synthetic guard self-test, and configuration scopes. Use `--json` when parsing the result.\n3. When a custom rule does not fire, run in order: `rule verify`, `rule list`, then re-test the\n command with `explain`.\n\n## Answer from the source\n\nFor questions the CLI output cannot settle, such as why the analyzer treats a construct a\ncertain way or whether a gap is a known limitation, read the source code of the installed\nversion.\n\n1. Get `<version>` from `npx -y cc-safety-net --version`.\n2. Locate the repository. Plugin installs ship the full repository, and this skill file lives\n at `<repo>/skills/cc-safety-net/SKILL.md` inside it, so the repository root is two\n directories above the skill file. Use the candidate only if its `package.json` has\n `\"name\": \"cc-safety-net\"` and version `<version>`, and a `src/` directory exists next to it.\n If the package version differs, run `doctor` to report the outdated integration, then treat\n the candidate as unavailable and continue to the next step.\n3. If no matching local root exists (skill-only installs, a mismatched plugin, or guidance\n without a file path), resolve the immutable commit recorded with the published package using\n `npm view \"cc-safety-net@<version>\" gitHead`. Require a 40-character lowercase hexadecimal\n commit and fetch that exact commit into a fresh owner-only temporary directory:\n\n ```bash\n set -euo pipefail\n git_head=$(npm view \"cc-safety-net@<version>\" gitHead)\n [[ $git_head =~ ^[0-9a-f]{40}$ ]] || { echo \"Invalid published gitHead\" >&2; exit 1; }\n source_dir=$(mktemp -d \"${TMPDIR:-/tmp}/cc-safety-net-v<version>-XXXXXXXX\")\n trap 'rm -rf -- \"$source_dir\"' EXIT\n chmod 700 \"$source_dir\"\n git -c init.templateDir= init \"$source_dir\"\n git -c core.hooksPath=/dev/null -C \"$source_dir\" fetch --depth 1 https://github.com/kenryu42/cc-safety-net \"$git_head\"\n git -c core.hooksPath=/dev/null -C \"$source_dir\" checkout --detach \"$git_head\"\n [[ $(git -C \"$source_dir\" rev-parse HEAD) == \"$git_head\" ]] || { echo \"Source checkout mismatch\" >&2; exit 1; }\n printf 'Source checkout: %s\\n' \"$source_dir\"\n trap - EXIT\n ```\n\n Never answer from `main`; it can contain unreleased behavior the installed version does not\n have.\n4. Read `docs/` first; `residual-risk.md` and `secret-protection-known-limitations.md` exist to\n answer whether something is a known gap. For behavior questions, continue into\n `src/analyzer`, `src/guards`, and `src/rules`.\n5. State in the answer which version the source came from. Treat the located source as\n read-only reference; do not edit, build, or run it.\n6. Remove a temporary checkout after the source inspection: `rm -rf -- \"<source_dir>\"`.\n\n## Safety rules\n\n- Help the user operate CC Safety Net, never evade it. Do not change levels, uninstall, edit\n config, or propose a policy that weakens protection to get a blocked command through unless the\n user explicitly asks for that outcome and understands what the block guards against.\n- Never run `hook`; it is the integration entry point that reads hook JSON from stdin, not a\n user-facing command.\n- `logs --prune-legacy` permanently deletes legacy logs. Run it only on an explicit request, and\n run it with `--dry-run` first.\n- `rule remove --delete-source` deletes the local source directory. Ask before using it.\n- Prefer `gui --no-open` and give the user the URL instead of opening a browser from a session.\n- If a command prints an `UPDATE_AVAILABLE:` line, ask the user once whether to run\n `npx -y cc-safety-net@latest update`, continue the workflow without waiting either way, and do\n not raise it again.\n";
|
|
2
|
-
export{e as a};
|
package/dist/vendor/zod.cjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
var{defineProperty:ko,getOwnPropertyNames:lp,getOwnPropertyDescriptor:mp}=Object,dp=Object.prototype.hasOwnProperty;function fp(e){return this[e]}var hp=(e)=>{var r=(pu??=new WeakMap).get(e),t;if(r)return r;if(r=ko({},"__esModule",{value:!0}),e&&typeof e==="object"||typeof e==="function"){for(var o of lp(e))if(!dp.call(r,o))ko(r,o,{get:fp.bind(e,o),enumerable:!(t=mp(e,o))||t.enumerable})}return pu.set(e,r),r},pu;var _p=(e)=>e;function gp(e,r){this[e]=_p.bind(null,r)}var te=(e,r)=>{for(var t in r)ko(e,t,{get:r[t],enumerable:!0,configurable:!0,set:gp.bind(r,t)})};var im={};te(im,{$brand:()=>Sr,$input:()=>ct,$output:()=>nt,NEVER:()=>Pr,TimePrecision:()=>kt,ZodAny:()=>Zs,ZodArray:()=>Ss,ZodBase64:()=>ao,ZodBase64URL:()=>po,ZodBigInt:()=>Be,ZodBigIntFormat:()=>fo,ZodBoolean:()=>Je,ZodCIDRv4:()=>so,ZodCIDRv6:()=>uo,ZodCUID:()=>eo,ZodCUID2:()=>ro,ZodCatch:()=>Xs,ZodCodec:()=>yo,ZodCustom:()=>wr,ZodCustomStringFormat:()=>Ue,ZodDate:()=>vr,ZodDefault:()=>Bs,ZodDiscriminatedUnion:()=>Os,ZodE164:()=>lo,ZodEmail:()=>Yt,ZodEmoji:()=>Ht,ZodEnum:()=>Le,ZodError:()=>Bu,ZodExactOptional:()=>Us,ZodFile:()=>Ls,ZodFirstPartyTypeKind:()=>bo,ZodFunction:()=>cu,ZodGUID:()=>hr,ZodIPv4:()=>co,ZodIPv6:()=>io,ZodISODate:()=>lr,ZodISODateTime:()=>pr,ZodISODuration:()=>dr,ZodISOTime:()=>mr,ZodIntersection:()=>Es,ZodIssueCode:()=>cp,ZodJWT:()=>mo,ZodKSUID:()=>no,ZodLazy:()=>tu,ZodLiteral:()=>Ds,ZodMAC:()=>gs,ZodMap:()=>Cs,ZodNaN:()=>Hs,ZodNanoID:()=>Qt,ZodNever:()=>ks,ZodNonOptional:()=>vo,ZodNull:()=>ys,ZodNullable:()=>Js,ZodNumber:()=>Me,ZodNumberFormat:()=>le,ZodObject:()=>yr,ZodOptional:()=>zo,ZodPipe:()=>$o,ZodPrefault:()=>Ws,ZodPromise:()=>nu,ZodReadonly:()=>Qs,ZodRealError:()=>I,ZodRecord:()=>Zr,ZodSet:()=>Rs,ZodString:()=>Fe,ZodStringFormat:()=>y,ZodSuccess:()=>qs,ZodSymbol:()=>vs,ZodTemplateLiteral:()=>ru,ZodTransform:()=>Fs,ZodTuple:()=>Ns,ZodType:()=>g,ZodULID:()=>to,ZodURL:()=>zr,ZodUUID:()=>K,ZodUndefined:()=>$s,ZodUnion:()=>br,ZodUnknown:()=>ws,ZodVoid:()=>Ps,ZodXID:()=>oo,ZodXor:()=>Is,_ZodString:()=>Xt,_default:()=>Vs,_function:()=>Xa,any:()=>Sa,array:()=>$r,base64:()=>la,base64url:()=>ma,bigint:()=>ba,boolean:()=>zs,catch:()=>Ys,check:()=>Ya,cidrv4:()=>aa,cidrv6:()=>pa,clone:()=>P,codec:()=>Ka,coerce:()=>Zo,config:()=>w,core:()=>W,cuid:()=>ra,cuid2:()=>ta,custom:()=>Ha,date:()=>Oa,decode:()=>Ut,decodeAsync:()=>Jt,default:()=>sm,describe:()=>Qa,discriminatedUnion:()=>Ca,e164:()=>da,email:()=>Vu,emoji:()=>Qu,encode:()=>Ft,encodeAsync:()=>Mt,endsWith:()=>Pe,enum:()=>go,exactOptional:()=>Ms,file:()=>Ja,flattenError:()=>he,float32:()=>za,float64:()=>va,formatError:()=>_e,fromJSONSchema:()=>au,function:()=>Xa,getErrorMap:()=>sp,globalRegistry:()=>N,gt:()=>B,gte:()=>S,guid:()=>Wu,hash:()=>xa,hex:()=>ga,hostname:()=>_a,httpUrl:()=>Hu,includes:()=>we,instanceof:()=>rp,int:()=>qt,int32:()=>$a,int64:()=>Za,intersection:()=>Ts,ipv4:()=>ia,ipv6:()=>ua,iso:()=>fr,json:()=>op,jwt:()=>fa,keyof:()=>Ea,ksuid:()=>ca,lazy:()=>ou,length:()=>ae,literal:()=>Ma,locales:()=>cr,looseObject:()=>Aa,looseRecord:()=>Da,lowercase:()=>be,lt:()=>J,lte:()=>C,mac:()=>sa,map:()=>La,maxLength:()=>ue,maxSize:()=>re,meta:()=>ep,mime:()=>Se,minLength:()=>q,minSize:()=>V,multipleOf:()=>ee,nan:()=>Wa,nanoid:()=>ea,nativeEnum:()=>Ua,negative:()=>St,never:()=>ho,nonnegative:()=>Ot,nonoptional:()=>Gs,nonpositive:()=>It,normalize:()=>Ie,null:()=>bs,nullable:()=>gr,nullish:()=>Ba,number:()=>xs,object:()=>Ta,optional:()=>_r,overwrite:()=>L,parse:()=>Ct,parseAsync:()=>Rt,partialRecord:()=>Ra,pipe:()=>xr,positive:()=>Pt,prefault:()=>Ks,preprocess:()=>np,prettifyError:()=>Ar,promise:()=>qa,property:()=>Et,readonly:()=>eu,record:()=>js,refine:()=>iu,regex:()=>ye,regexes:()=>j,registry:()=>ir,safeDecode:()=>Vt,safeDecodeAsync:()=>Kt,safeEncode:()=>Bt,safeEncodeAsync:()=>Wt,safeParse:()=>Dt,safeParseAsync:()=>Lt,set:()=>Fa,setErrorMap:()=>ip,size:()=>se,slugify:()=>Ne,startsWith:()=>ke,strictObject:()=>Na,string:()=>Gt,stringFormat:()=>ha,stringbool:()=>tp,success:()=>Va,superRefine:()=>su,symbol:()=>ka,templateLiteral:()=>Ga,toJSONSchema:()=>ar,toLowerCase:()=>Ee,toUpperCase:()=>Te,transform:()=>xo,treeifyError:()=>Nr,trim:()=>Oe,tuple:()=>As,uint32:()=>ya,uint64:()=>wa,ulid:()=>oa,undefined:()=>Pa,union:()=>_o,unknown:()=>pe,uppercase:()=>Ze,url:()=>Yu,util:()=>f,uuid:()=>Ku,uuidv4:()=>Gu,uuidv6:()=>qu,uuidv7:()=>Xu,void:()=>Ia,xid:()=>na,xor:()=>ja,z:()=>wo});module.exports=hp(im);var wo={};te(wo,{$brand:()=>Sr,$input:()=>ct,$output:()=>nt,NEVER:()=>Pr,TimePrecision:()=>kt,ZodAny:()=>Zs,ZodArray:()=>Ss,ZodBase64:()=>ao,ZodBase64URL:()=>po,ZodBigInt:()=>Be,ZodBigIntFormat:()=>fo,ZodBoolean:()=>Je,ZodCIDRv4:()=>so,ZodCIDRv6:()=>uo,ZodCUID:()=>eo,ZodCUID2:()=>ro,ZodCatch:()=>Xs,ZodCodec:()=>yo,ZodCustom:()=>wr,ZodCustomStringFormat:()=>Ue,ZodDate:()=>vr,ZodDefault:()=>Bs,ZodDiscriminatedUnion:()=>Os,ZodE164:()=>lo,ZodEmail:()=>Yt,ZodEmoji:()=>Ht,ZodEnum:()=>Le,ZodError:()=>Bu,ZodExactOptional:()=>Us,ZodFile:()=>Ls,ZodFirstPartyTypeKind:()=>bo,ZodFunction:()=>cu,ZodGUID:()=>hr,ZodIPv4:()=>co,ZodIPv6:()=>io,ZodISODate:()=>lr,ZodISODateTime:()=>pr,ZodISODuration:()=>dr,ZodISOTime:()=>mr,ZodIntersection:()=>Es,ZodIssueCode:()=>cp,ZodJWT:()=>mo,ZodKSUID:()=>no,ZodLazy:()=>tu,ZodLiteral:()=>Ds,ZodMAC:()=>gs,ZodMap:()=>Cs,ZodNaN:()=>Hs,ZodNanoID:()=>Qt,ZodNever:()=>ks,ZodNonOptional:()=>vo,ZodNull:()=>ys,ZodNullable:()=>Js,ZodNumber:()=>Me,ZodNumberFormat:()=>le,ZodObject:()=>yr,ZodOptional:()=>zo,ZodPipe:()=>$o,ZodPrefault:()=>Ws,ZodPromise:()=>nu,ZodReadonly:()=>Qs,ZodRealError:()=>I,ZodRecord:()=>Zr,ZodSet:()=>Rs,ZodString:()=>Fe,ZodStringFormat:()=>y,ZodSuccess:()=>qs,ZodSymbol:()=>vs,ZodTemplateLiteral:()=>ru,ZodTransform:()=>Fs,ZodTuple:()=>Ns,ZodType:()=>g,ZodULID:()=>to,ZodURL:()=>zr,ZodUUID:()=>K,ZodUndefined:()=>$s,ZodUnion:()=>br,ZodUnknown:()=>ws,ZodVoid:()=>Ps,ZodXID:()=>oo,ZodXor:()=>Is,_ZodString:()=>Xt,_default:()=>Vs,_function:()=>Xa,any:()=>Sa,array:()=>$r,base64:()=>la,base64url:()=>ma,bigint:()=>ba,boolean:()=>zs,catch:()=>Ys,check:()=>Ya,cidrv4:()=>aa,cidrv6:()=>pa,clone:()=>P,codec:()=>Ka,coerce:()=>Zo,config:()=>w,core:()=>W,cuid:()=>ra,cuid2:()=>ta,custom:()=>Ha,date:()=>Oa,decode:()=>Ut,decodeAsync:()=>Jt,describe:()=>Qa,discriminatedUnion:()=>Ca,e164:()=>da,email:()=>Vu,emoji:()=>Qu,encode:()=>Ft,encodeAsync:()=>Mt,endsWith:()=>Pe,enum:()=>go,exactOptional:()=>Ms,file:()=>Ja,flattenError:()=>he,float32:()=>za,float64:()=>va,formatError:()=>_e,fromJSONSchema:()=>au,function:()=>Xa,getErrorMap:()=>sp,globalRegistry:()=>N,gt:()=>B,gte:()=>S,guid:()=>Wu,hash:()=>xa,hex:()=>ga,hostname:()=>_a,httpUrl:()=>Hu,includes:()=>we,instanceof:()=>rp,int:()=>qt,int32:()=>$a,int64:()=>Za,intersection:()=>Ts,ipv4:()=>ia,ipv6:()=>ua,iso:()=>fr,json:()=>op,jwt:()=>fa,keyof:()=>Ea,ksuid:()=>ca,lazy:()=>ou,length:()=>ae,literal:()=>Ma,locales:()=>cr,looseObject:()=>Aa,looseRecord:()=>Da,lowercase:()=>be,lt:()=>J,lte:()=>C,mac:()=>sa,map:()=>La,maxLength:()=>ue,maxSize:()=>re,meta:()=>ep,mime:()=>Se,minLength:()=>q,minSize:()=>V,multipleOf:()=>ee,nan:()=>Wa,nanoid:()=>ea,nativeEnum:()=>Ua,negative:()=>St,never:()=>ho,nonnegative:()=>Ot,nonoptional:()=>Gs,nonpositive:()=>It,normalize:()=>Ie,null:()=>bs,nullable:()=>gr,nullish:()=>Ba,number:()=>xs,object:()=>Ta,optional:()=>_r,overwrite:()=>L,parse:()=>Ct,parseAsync:()=>Rt,partialRecord:()=>Ra,pipe:()=>xr,positive:()=>Pt,prefault:()=>Ks,preprocess:()=>np,prettifyError:()=>Ar,promise:()=>qa,property:()=>Et,readonly:()=>eu,record:()=>js,refine:()=>iu,regex:()=>ye,regexes:()=>j,registry:()=>ir,safeDecode:()=>Vt,safeDecodeAsync:()=>Kt,safeEncode:()=>Bt,safeEncodeAsync:()=>Wt,safeParse:()=>Dt,safeParseAsync:()=>Lt,set:()=>Fa,setErrorMap:()=>ip,size:()=>se,slugify:()=>Ne,startsWith:()=>ke,strictObject:()=>Na,string:()=>Gt,stringFormat:()=>ha,stringbool:()=>tp,success:()=>Va,superRefine:()=>su,symbol:()=>ka,templateLiteral:()=>Ga,toJSONSchema:()=>ar,toLowerCase:()=>Ee,toUpperCase:()=>Te,transform:()=>xo,treeifyError:()=>Nr,trim:()=>Oe,tuple:()=>As,uint32:()=>ya,uint64:()=>wa,ulid:()=>oa,undefined:()=>Pa,union:()=>_o,unknown:()=>pe,uppercase:()=>Ze,url:()=>Yu,util:()=>f,uuid:()=>Ku,uuidv4:()=>Gu,uuidv6:()=>qu,uuidv7:()=>Xu,void:()=>Ia,xid:()=>na,xor:()=>ja});var W={};te(W,{$ZodAny:()=>lc,$ZodArray:()=>_c,$ZodAsyncError:()=>M,$ZodBase64:()=>rc,$ZodBase64URL:()=>tc,$ZodBigInt:()=>rt,$ZodBigIntFormat:()=>sc,$ZodBoolean:()=>tr,$ZodCIDRv4:()=>Hn,$ZodCIDRv6:()=>Qn,$ZodCUID:()=>Fn,$ZodCUID2:()=>Un,$ZodCatch:()=>Ac,$ZodCheck:()=>b,$ZodCheckBigIntFormat:()=>_n,$ZodCheckEndsWith:()=>Sn,$ZodCheckGreaterThan:()=>Kr,$ZodCheckIncludes:()=>kn,$ZodCheckLengthEquals:()=>yn,$ZodCheckLessThan:()=>Wr,$ZodCheckLowerCase:()=>Zn,$ZodCheckMaxLength:()=>vn,$ZodCheckMaxSize:()=>gn,$ZodCheckMimeType:()=>On,$ZodCheckMinLength:()=>$n,$ZodCheckMinSize:()=>xn,$ZodCheckMultipleOf:()=>fn,$ZodCheckNumberFormat:()=>hn,$ZodCheckOverwrite:()=>En,$ZodCheckProperty:()=>In,$ZodCheckRegex:()=>bn,$ZodCheckSizeEquals:()=>zn,$ZodCheckStartsWith:()=>Pn,$ZodCheckStringFormat:()=>$e,$ZodCheckUpperCase:()=>wn,$ZodCodec:()=>nr,$ZodCustom:()=>Mc,$ZodCustomStringFormat:()=>cc,$ZodDate:()=>hc,$ZodDefault:()=>Oc,$ZodDiscriminatedUnion:()=>zc,$ZodE164:()=>oc,$ZodEmail:()=>Cn,$ZodEmoji:()=>Dn,$ZodEncodeError:()=>oe,$ZodEnum:()=>Zc,$ZodError:()=>He,$ZodExactOptional:()=>Sc,$ZodFile:()=>kc,$ZodFunction:()=>Lc,$ZodGUID:()=>An,$ZodIPv4:()=>qn,$ZodIPv6:()=>Xn,$ZodISODate:()=>Wn,$ZodISODateTime:()=>Vn,$ZodISODuration:()=>Gn,$ZodISOTime:()=>Kn,$ZodIntersection:()=>vc,$ZodJWT:()=>nc,$ZodKSUID:()=>Bn,$ZodLazy:()=>Uc,$ZodLiteral:()=>wc,$ZodMAC:()=>Yn,$ZodMap:()=>yc,$ZodNaN:()=>jc,$ZodNanoID:()=>Ln,$ZodNever:()=>dc,$ZodNonOptional:()=>Tc,$ZodNull:()=>pc,$ZodNullable:()=>Ic,$ZodNumber:()=>et,$ZodNumberFormat:()=>ic,$ZodObject:()=>Du,$ZodObjectJIT:()=>gc,$ZodOptional:()=>ot,$ZodPipe:()=>Cc,$ZodPrefault:()=>Ec,$ZodPromise:()=>Fc,$ZodReadonly:()=>Rc,$ZodRealError:()=>T,$ZodRecord:()=>$c,$ZodRegistry:()=>Jc,$ZodSet:()=>bc,$ZodString:()=>ie,$ZodStringFormat:()=>v,$ZodSuccess:()=>Nc,$ZodSymbol:()=>uc,$ZodTemplateLiteral:()=>Dc,$ZodTransform:()=>Pc,$ZodTuple:()=>tt,$ZodType:()=>_,$ZodULID:()=>Mn,$ZodURL:()=>Rn,$ZodUUID:()=>jn,$ZodUndefined:()=>ac,$ZodUnion:()=>or,$ZodUnknown:()=>mc,$ZodVoid:()=>fc,$ZodXID:()=>Jn,$ZodXor:()=>xc,$brand:()=>Sr,$constructor:()=>u,$input:()=>ct,$output:()=>nt,Doc:()=>Gr,JSONSchema:()=>Uu,JSONSchemaGenerator:()=>ms,NEVER:()=>Pr,TimePrecision:()=>kt,_any:()=>di,_array:()=>vi,_base64:()=>yt,_base64url:()=>bt,_bigint:()=>ii,_boolean:()=>ni,_catch:()=>Bl,_check:()=>Fu,_cidrv4:()=>vt,_cidrv6:()=>$t,_coercedBigint:()=>si,_coercedBoolean:()=>ci,_coercedDate:()=>xi,_coercedNumber:()=>Hc,_coercedString:()=>Vc,_cuid:()=>dt,_cuid2:()=>ft,_custom:()=>yi,_date:()=>gi,_decode:()=>Dr,_decodeAsync:()=>Fr,_default:()=>Ul,_discriminatedUnion:()=>Il,_e164:()=>Zt,_email:()=>it,_emoji:()=>lt,_encode:()=>Rr,_encodeAsync:()=>Lr,_endsWith:()=>Pe,_enum:()=>jl,_file:()=>$i,_float32:()=>ei,_float64:()=>ri,_gt:()=>B,_gte:()=>S,_guid:()=>sr,_includes:()=>we,_int:()=>Qc,_int32:()=>ti,_int64:()=>ui,_intersection:()=>Ol,_ipv4:()=>xt,_ipv6:()=>zt,_isoDate:()=>Gc,_isoDateTime:()=>Kc,_isoDuration:()=>Xc,_isoTime:()=>qc,_jwt:()=>wt,_ksuid:()=>gt,_lazy:()=>Gl,_length:()=>ae,_literal:()=>Rl,_lowercase:()=>be,_lt:()=>J,_lte:()=>C,_mac:()=>Wc,_map:()=>Nl,_max:()=>C,_maxLength:()=>ue,_maxSize:()=>re,_mime:()=>Se,_min:()=>S,_minLength:()=>q,_minSize:()=>V,_multipleOf:()=>ee,_nan:()=>zi,_nanoid:()=>mt,_nativeEnum:()=>Cl,_negative:()=>St,_never:()=>hi,_nonnegative:()=>Ot,_nonoptional:()=>Ml,_nonpositive:()=>It,_normalize:()=>Ie,_null:()=>mi,_nullable:()=>Fl,_number:()=>Yc,_optional:()=>Ll,_overwrite:()=>L,_parse:()=>ge,_parseAsync:()=>xe,_pipe:()=>Vl,_positive:()=>Pt,_promise:()=>ql,_property:()=>Et,_readonly:()=>Wl,_record:()=>Tl,_refine:()=>bi,_regex:()=>ye,_safeDecode:()=>Mr,_safeDecodeAsync:()=>Br,_safeEncode:()=>Ur,_safeEncodeAsync:()=>Jr,_safeParse:()=>ze,_safeParseAsync:()=>ve,_set:()=>Al,_size:()=>se,_slugify:()=>Ne,_startsWith:()=>ke,_string:()=>Bc,_stringFormat:()=>Ae,_stringbool:()=>Pi,_success:()=>Jl,_superRefine:()=>Zi,_symbol:()=>pi,_templateLiteral:()=>Kl,_toLowerCase:()=>Ee,_toUpperCase:()=>Te,_transform:()=>Dl,_trim:()=>Oe,_tuple:()=>El,_uint32:()=>oi,_uint64:()=>ai,_ulid:()=>ht,_undefined:()=>li,_union:()=>Pl,_unknown:()=>fi,_uppercase:()=>Ze,_url:()=>ur,_uuid:()=>st,_uuidv4:()=>ut,_uuidv6:()=>at,_uuidv7:()=>pt,_void:()=>_i,_xid:()=>_t,_xor:()=>Sl,clone:()=>P,config:()=>w,createStandardJSONSchemaMethod:()=>Tt,createToJSONSchemaMethod:()=>Si,decode:()=>Vp,decodeAsync:()=>Kp,describe:()=>wi,encode:()=>Bp,encodeAsync:()=>Wp,extractDefs:()=>Re,finalize:()=>De,flattenError:()=>he,formatError:()=>_e,globalConfig:()=>Ve,globalRegistry:()=>N,initializeContext:()=>Ce,isValidBase64:()=>ec,isValidBase64URL:()=>Au,isValidJWT:()=>ju,locales:()=>cr,meta:()=>ki,parse:()=>jr,parseAsync:()=>Cr,prettifyError:()=>Ar,process:()=>Z,regexes:()=>j,registry:()=>ir,safeDecode:()=>qp,safeDecodeAsync:()=>Yp,safeEncode:()=>Gp,safeEncodeAsync:()=>Xp,safeParse:()=>Ro,safeParseAsync:()=>Do,toDotPath:()=>_u,toJSONSchema:()=>ar,treeifyError:()=>Nr,util:()=>f,version:()=>Tn});var Pr=Object.freeze({status:"aborted"});function u(e,r,t){function o(s,a){if(!s._zod)Object.defineProperty(s,"_zod",{value:{def:a,constr:i,traits:new Set},enumerable:!1});if(s._zod.traits.has(e))return;s._zod.traits.add(e),r(s,a);let p=i.prototype,l=Object.keys(p);for(let d=0;d<l.length;d++){let h=l[d];if(!(h in s))s[h]=p[h].bind(s)}}let n=t?.Parent??Object;class c extends n{}Object.defineProperty(c,"name",{value:e});function i(s){var a;let p=t?.Parent?new c:this;o(p,s),(a=p._zod).deferred??(a.deferred=[]);for(let l of p._zod.deferred)l();return p}return Object.defineProperty(i,"init",{value:o}),Object.defineProperty(i,Symbol.hasInstance,{value:(s)=>{if(t?.Parent&&s instanceof t.Parent)return!0;return s?._zod?.traits?.has(e)}}),Object.defineProperty(i,"name",{value:e}),i}var Sr=Symbol("zod_brand");class M extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class oe extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`);this.name="ZodEncodeError"}}var Ve={};function w(e){if(e)Object.assign(Ve,e);return Ve}var f={};te(f,{BIGINT_FORMAT_RANGES:()=>jo,Class:()=>fu,NUMBER_FORMAT_RANGES:()=>Ao,aborted:()=>Q,allowsEval:()=>Oo,assert:()=>yp,assertEqual:()=>xp,assertIs:()=>vp,assertNever:()=>$p,assertNotEqual:()=>zp,assignProp:()=>Y,base64ToUint8Array:()=>mu,base64urlToUint8Array:()=>Lp,cached:()=>de,captureStackTrace:()=>Er,cleanEnum:()=>Dp,cleanRegex:()=>Ge,clone:()=>P,cloneDef:()=>Zp,createTransparentProxy:()=>Op,defineLazy:()=>z,esc:()=>Or,escapeRegex:()=>R,extend:()=>Np,finalizeIssue:()=>E,floatSafeRemainder:()=>So,getElementAtPath:()=>wp,getEnumValues:()=>Ke,getLengthableOrigin:()=>Ye,getParsedType:()=>Ip,getSizableOrigin:()=>Xe,hexToUint8Array:()=>Up,isObject:()=>ne,isPlainObject:()=>H,issue:()=>fe,joinValues:()=>Ir,jsonStringifyReplacer:()=>me,merge:()=>jp,mergeDefs:()=>G,normalizeParams:()=>m,nullish:()=>X,numKeys:()=>Sp,objectClone:()=>bp,omit:()=>Tp,optionalKeys:()=>No,parsedType:()=>Co,partial:()=>Cp,pick:()=>Ep,prefixIssues:()=>A,primitiveTypes:()=>To,promiseAllObject:()=>kp,propertyKeyTypes:()=>qe,randomString:()=>Pp,required:()=>Rp,safeExtend:()=>Ap,shallowClone:()=>Eo,slugify:()=>Io,stringifyPrimitive:()=>Tr,uint8ArrayToBase64:()=>du,uint8ArrayToBase64url:()=>Fp,uint8ArrayToHex:()=>Mp,unwrapMessage:()=>We});function xp(e){return e}function zp(e){return e}function vp(e){}function $p(e){throw Error("Unexpected value in exhaustive check")}function yp(e){}function Ke(e){let r=Object.values(e).filter((o)=>typeof o==="number");return Object.entries(e).filter(([o,n])=>r.indexOf(+o)===-1).map(([o,n])=>n)}function Ir(e,r="|"){return e.map((t)=>Tr(t)).join(r)}function me(e,r){if(typeof r==="bigint")return r.toString();return r}function de(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error("cached value already set")}}}function X(e){return e===null||e===void 0}function Ge(e){let r=e.startsWith("^")?1:0,t=e.endsWith("$")?e.length-1:e.length;return e.slice(r,t)}function So(e,r){let t=(e.toString().split(".")[1]||"").length,o=r.toString(),n=(o.split(".")[1]||"").length;if(n===0&&/\d?e-\d?/.test(o)){let a=o.match(/\d?e-(\d?)/);if(a?.[1])n=Number.parseInt(a[1])}let c=t>n?t:n,i=Number.parseInt(e.toFixed(c).replace(".","")),s=Number.parseInt(r.toFixed(c).replace(".",""));return i%s/10**c}var lu=Symbol("evaluating");function z(e,r,t){let o=void 0;Object.defineProperty(e,r,{get(){if(o===lu)return;if(o===void 0)o=lu,o=t();return o},set(n){Object.defineProperty(e,r,{value:n})},configurable:!0})}function bp(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Y(e,r,t){Object.defineProperty(e,r,{value:t,writable:!0,enumerable:!0,configurable:!0})}function G(...e){let r={};for(let t of e){let o=Object.getOwnPropertyDescriptors(t);Object.assign(r,o)}return Object.defineProperties({},r)}function Zp(e){return G(e._zod.def)}function wp(e,r){if(!r)return e;return r.reduce((t,o)=>t?.[o],e)}function kp(e){let r=Object.keys(e),t=r.map((o)=>e[o]);return Promise.all(t).then((o)=>{let n={};for(let c=0;c<r.length;c++)n[r[c]]=o[c];return n})}function Pp(e=10){let t="";for(let o=0;o<e;o++)t+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return t}function Or(e){return JSON.stringify(e)}function Io(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Er="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ne(e){return typeof e==="object"&&e!==null&&!Array.isArray(e)}var Oo=de(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return new Function(""),!0}catch(e){return!1}});function H(e){if(ne(e)===!1)return!1;let r=e.constructor;if(r===void 0)return!0;if(typeof r!=="function")return!0;let t=r.prototype;if(ne(t)===!1)return!1;if(Object.prototype.hasOwnProperty.call(t,"isPrototypeOf")===!1)return!1;return!0}function Eo(e){if(H(e))return{...e};if(Array.isArray(e))return[...e];return e}function Sp(e){let r=0;for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))r++;return r}var Ip=(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":if(Array.isArray(e))return"array";if(e===null)return"null";if(e.then&&typeof e.then==="function"&&e.catch&&typeof e.catch==="function")return"promise";if(typeof Map<"u"&&e instanceof Map)return"map";if(typeof Set<"u"&&e instanceof Set)return"set";if(typeof Date<"u"&&e instanceof Date)return"date";if(typeof File<"u"&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${r}`)}},qe=new Set(["string","number","symbol"]),To=new Set(["string","number","bigint","boolean","symbol","undefined"]);function R(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function P(e,r,t){let o=new e._zod.constr(r??e._zod.def);if(!r||t?.parent)o._zod.parent=e;return o}function m(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 Error("Cannot specify both `message` and `error` params");r.error=r.message}if(delete r.message,typeof r.error==="string")return{...r,error:()=>r.error};return r}function Op(e){let r;return new Proxy({},{get(t,o,n){return r??(r=e()),Reflect.get(r,o,n)},set(t,o,n,c){return r??(r=e()),Reflect.set(r,o,n,c)},has(t,o){return r??(r=e()),Reflect.has(r,o)},deleteProperty(t,o){return r??(r=e()),Reflect.deleteProperty(r,o)},ownKeys(t){return r??(r=e()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(t,o){return r??(r=e()),Reflect.getOwnPropertyDescriptor(r,o)},defineProperty(t,o,n){return r??(r=e()),Reflect.defineProperty(r,o,n)}})}function Tr(e){if(typeof e==="bigint")return e.toString()+"n";if(typeof e==="string")return`"${e}"`;return`${e}`}function No(e){return Object.keys(e).filter((r)=>e[r]._zod.optin==="optional"&&e[r]._zod.optout==="optional")}var Ao={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-340282346638528860000000000000000000000,340282346638528860000000000000000000000],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},jo={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Ep(e,r){let t=e._zod.def,o=t.checks;if(o&&o.length>0)throw Error(".pick() cannot be used on object schemas containing refinements");let c=G(e._zod.def,{get shape(){let i={};for(let s in r){if(!(s in t.shape))throw Error(`Unrecognized key: "${s}"`);if(!r[s])continue;i[s]=t.shape[s]}return Y(this,"shape",i),i},checks:[]});return P(e,c)}function Tp(e,r){let t=e._zod.def,o=t.checks;if(o&&o.length>0)throw Error(".omit() cannot be used on object schemas containing refinements");let c=G(e._zod.def,{get shape(){let i={...e._zod.def.shape};for(let s in r){if(!(s in t.shape))throw Error(`Unrecognized key: "${s}"`);if(!r[s])continue;delete i[s]}return Y(this,"shape",i),i},checks:[]});return P(e,c)}function Np(e,r){if(!H(r))throw Error("Invalid input to extend: expected a plain object");let t=e._zod.def.checks;if(t&&t.length>0){let c=e._zod.def.shape;for(let i in r)if(Object.getOwnPropertyDescriptor(c,i)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let n=G(e._zod.def,{get shape(){let c={...e._zod.def.shape,...r};return Y(this,"shape",c),c}});return P(e,n)}function Ap(e,r){if(!H(r))throw Error("Invalid input to safeExtend: expected a plain object");let t=G(e._zod.def,{get shape(){let o={...e._zod.def.shape,...r};return Y(this,"shape",o),o}});return P(e,t)}function jp(e,r){let t=G(e._zod.def,{get shape(){let o={...e._zod.def.shape,...r._zod.def.shape};return Y(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:[]});return P(e,t)}function Cp(e,r,t){let n=r._zod.def.checks;if(n&&n.length>0)throw Error(".partial() cannot be used on object schemas containing refinements");let i=G(r._zod.def,{get shape(){let s=r._zod.def.shape,a={...s};if(t)for(let p in t){if(!(p in s))throw Error(`Unrecognized key: "${p}"`);if(!t[p])continue;a[p]=e?new e({type:"optional",innerType:s[p]}):s[p]}else for(let p in s)a[p]=e?new e({type:"optional",innerType:s[p]}):s[p];return Y(this,"shape",a),a},checks:[]});return P(r,i)}function Rp(e,r,t){let o=G(r._zod.def,{get shape(){let n=r._zod.def.shape,c={...n};if(t)for(let i in t){if(!(i in c))throw Error(`Unrecognized key: "${i}"`);if(!t[i])continue;c[i]=new e({type:"nonoptional",innerType:n[i]})}else for(let i in n)c[i]=new e({type:"nonoptional",innerType:n[i]});return Y(this,"shape",c),c}});return P(r,o)}function Q(e,r=0){if(e.aborted===!0)return!0;for(let t=r;t<e.issues.length;t++)if(e.issues[t]?.continue!==!0)return!0;return!1}function A(e,r){return r.map((t)=>{var o;return(o=t).path??(o.path=[]),t.path.unshift(e),t})}function We(e){return typeof e==="string"?e:e?.message}function E(e,r,t){let o={...e,path:e.path??[]};if(!e.message){let n=We(e.inst?._zod.def?.error?.(e))??We(r?.error?.(e))??We(t.customError?.(e))??We(t.localeError?.(e))??"Invalid input";o.message=n}if(delete o.inst,delete o.continue,!r?.reportInput)delete o.input;return o}function Xe(e){if(e instanceof Set)return"set";if(e instanceof Map)return"map";if(e instanceof File)return"file";return"unknown"}function Ye(e){if(Array.isArray(e))return"array";if(typeof e==="string")return"string";return"unknown"}function Co(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 t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&"constructor"in t&&t.constructor)return t.constructor.name}}return r}function fe(...e){let[r,t,o]=e;if(typeof r==="string")return{message:r,code:"custom",input:t,inst:o};return{...r}}function Dp(e){return Object.entries(e).filter(([r,t])=>Number.isNaN(Number.parseInt(r,10))).map((r)=>r[1])}function mu(e){let r=atob(e),t=new Uint8Array(r.length);for(let o=0;o<r.length;o++)t[o]=r.charCodeAt(o);return t}function du(e){let r="";for(let t=0;t<e.length;t++)r+=String.fromCharCode(e[t]);return btoa(r)}function Lp(e){let r=e.replace(/-/g,"+").replace(/_/g,"/"),t="=".repeat((4-r.length%4)%4);return mu(r+t)}function Fp(e){return du(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Up(e){let r=e.replace(/^0x/,"");if(r.length%2!==0)throw Error("Invalid hex string length");let t=new Uint8Array(r.length/2);for(let o=0;o<r.length;o+=2)t[o/2]=Number.parseInt(r.slice(o,o+2),16);return t}function Mp(e){return Array.from(e).map((r)=>r.toString(16).padStart(2,"0")).join("")}class fu{constructor(...e){}}var hu=(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,me,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},He=u("$ZodError",hu),T=u("$ZodError",hu,{Parent:Error});function he(e,r=(t)=>t.message){let t={},o=[];for(let n of e.issues)if(n.path.length>0)t[n.path[0]]=t[n.path[0]]||[],t[n.path[0]].push(r(n));else o.push(r(n));return{formErrors:o,fieldErrors:t}}function _e(e,r=(t)=>t.message){let t={_errors:[]},o=(n)=>{for(let c of n.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map((i)=>o({issues:i}));else if(c.code==="invalid_key")o({issues:c.issues});else if(c.code==="invalid_element")o({issues:c.issues});else if(c.path.length===0)t._errors.push(r(c));else{let i=t,s=0;while(s<c.path.length){let a=c.path[s];if(s!==c.path.length-1)i[a]=i[a]||{_errors:[]};else i[a]=i[a]||{_errors:[]},i[a]._errors.push(r(c));i=i[a],s++}}};return o(e),t}function Nr(e,r=(t)=>t.message){let t={errors:[]},o=(n,c=[])=>{var i,s;for(let a of n.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map((p)=>o({issues:p},a.path));else if(a.code==="invalid_key")o({issues:a.issues},a.path);else if(a.code==="invalid_element")o({issues:a.issues},a.path);else{let p=[...c,...a.path];if(p.length===0){t.errors.push(r(a));continue}let l=t,d=0;while(d<p.length){let h=p[d],x=d===p.length-1;if(typeof h==="string")l.properties??(l.properties={}),(i=l.properties)[h]??(i[h]={errors:[]}),l=l.properties[h];else l.items??(l.items=[]),(s=l.items)[h]??(s[h]={errors:[]}),l=l.items[h];if(x)l.errors.push(r(a));d++}}};return o(e),t}function _u(e){let r=[],t=e.map((o)=>typeof o==="object"?o.key:o);for(let o of t)if(typeof o==="number")r.push(`[${o}]`);else if(typeof o==="symbol")r.push(`[${JSON.stringify(String(o))}]`);else if(/[^\w$]/.test(o))r.push(`[${JSON.stringify(o)}]`);else{if(r.length)r.push(".");r.push(o)}return r.join("")}function Ar(e){let r=[],t=[...e.issues].sort((o,n)=>(o.path??[]).length-(n.path??[]).length);for(let o of t)if(r.push(`✖ ${o.message}`),o.path?.length)r.push(` → at ${_u(o.path)}`);return r.join(`
|
|
2
|
-
`)}var ge=(e)=>(r,t,o,n)=>{let c=o?Object.assign(o,{async:!1}):{async:!1},i=r._zod.run({value:t,issues:[]},c);if(i instanceof Promise)throw new M;if(i.issues.length){let s=new(n?.Err??e)(i.issues.map((a)=>E(a,c,w())));throw Er(s,n?.callee),s}return i.value},jr=ge(T),xe=(e)=>async(r,t,o,n)=>{let c=o?Object.assign(o,{async:!0}):{async:!0},i=r._zod.run({value:t,issues:[]},c);if(i instanceof Promise)i=await i;if(i.issues.length){let s=new(n?.Err??e)(i.issues.map((a)=>E(a,c,w())));throw Er(s,n?.callee),s}return i.value},Cr=xe(T),ze=(e)=>(r,t,o)=>{let n=o?{...o,async:!1}:{async:!1},c=r._zod.run({value:t,issues:[]},n);if(c instanceof Promise)throw new M;return c.issues.length?{success:!1,error:new(e??He)(c.issues.map((i)=>E(i,n,w())))}:{success:!0,data:c.value}},Ro=ze(T),ve=(e)=>async(r,t,o)=>{let n=o?Object.assign(o,{async:!0}):{async:!0},c=r._zod.run({value:t,issues:[]},n);if(c instanceof Promise)c=await c;return c.issues.length?{success:!1,error:new e(c.issues.map((i)=>E(i,n,w())))}:{success:!0,data:c.value}},Do=ve(T),Rr=(e)=>(r,t,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ge(e)(r,t,n)},Bp=Rr(T),Dr=(e)=>(r,t,o)=>ge(e)(r,t,o),Vp=Dr(T),Lr=(e)=>async(r,t,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return xe(e)(r,t,n)},Wp=Lr(T),Fr=(e)=>async(r,t,o)=>xe(e)(r,t,o),Kp=Fr(T),Ur=(e)=>(r,t,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ze(e)(r,t,n)},Gp=Ur(T),Mr=(e)=>(r,t,o)=>ze(e)(r,t,o),qp=Mr(T),Jr=(e)=>async(r,t,o)=>{let n=o?Object.assign(o,{direction:"backward"}):{direction:"backward"};return ve(e)(r,t,n)},Xp=Jr(T),Br=(e)=>async(r,t,o)=>ve(e)(r,t,o),Yp=Br(T);var j={};te(j,{base64:()=>en,base64url:()=>Vr,bigint:()=>sn,boolean:()=>an,browserEmail:()=>cl,cidrv4:()=>Ho,cidrv6:()=>Qo,cuid:()=>Lo,cuid2:()=>Fo,date:()=>tn,datetime:()=>nn,domain:()=>ul,duration:()=>Vo,e164:()=>rn,email:()=>Ko,emoji:()=>Go,extendedDuration:()=>Hp,guid:()=>Wo,hex:()=>al,hostname:()=>sl,html5Email:()=>tl,idnEmail:()=>nl,integer:()=>un,ipv4:()=>qo,ipv6:()=>Xo,ksuid:()=>Jo,lowercase:()=>mn,mac:()=>Yo,md5_base64:()=>ll,md5_base64url:()=>ml,md5_hex:()=>pl,nanoid:()=>Bo,null:()=>pn,number:()=>Qe,rfc5322Email:()=>ol,sha1_base64:()=>fl,sha1_base64url:()=>hl,sha1_hex:()=>dl,sha256_base64:()=>gl,sha256_base64url:()=>xl,sha256_hex:()=>_l,sha384_base64:()=>vl,sha384_base64url:()=>$l,sha384_hex:()=>zl,sha512_base64:()=>bl,sha512_base64url:()=>Zl,sha512_hex:()=>yl,string:()=>cn,time:()=>on,ulid:()=>Uo,undefined:()=>ln,unicodeEmail:()=>gu,uppercase:()=>dn,uuid:()=>ce,uuid4:()=>Qp,uuid6:()=>el,uuid7:()=>rl,xid:()=>Mo});var Lo=/^[cC][^\s-]{8,}$/,Fo=/^[0-9a-z]+$/,Uo=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Mo=/^[0-9a-vA-V]{20}$/,Jo=/^[A-Za-z0-9]{27}$/,Bo=/^[a-zA-Z0-9_-]{21}$/,Vo=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Hp=/^[-+]?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)?)??$/,Wo=/^([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})$/,ce=(e)=>{if(!e)return/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/;return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`)},Qp=ce(4),el=ce(6),rl=ce(7),Ko=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,tl=/^[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])?)*$/,ol=/^(([^<>()\[\]\\.,;:\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,}))$/,gu=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,nl=gu,cl=/^[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])?)*$/,il="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Go(){return new RegExp(il,"u")}var qo=/^(?:(?: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])$/,Xo=/^(([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}|:))$/,Yo=(e)=>{let r=R(e??":");return new RegExp(`^(?:[0-9A-F]{2}${r}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${r}){5}[0-9a-f]{2}$`)},Ho=/^((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])$/,Qo=/^(([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])$/,en=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Vr=/^[A-Za-z0-9_-]*$/,sl=/^(?=.{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])?)*\.?$/,ul=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,rn=/^\+[1-9]\d{6,14}$/,xu="(?:(?:\\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])))",tn=new RegExp(`^${xu}$`);function zu(e){return typeof e.precision==="number"?e.precision===-1?"(?:[01]\\d|2[0-3]):[0-5]\\d":e.precision===0?"(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d":`(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d\\.\\d{${e.precision}}`:"(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?"}function on(e){return new RegExp(`^${zu(e)}$`)}function nn(e){let r=zu({precision:e.precision}),t=["Z"];if(e.local)t.push("");if(e.offset)t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${r}(?:${t.join("|")})`;return new RegExp(`^${xu}T(?:${o})$`)}var cn=(e)=>{let r=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},sn=/^-?\d+n?$/,un=/^-?\d+$/,Qe=/^-?\d+(?:\.\d+)?$/,an=/^(?:true|false)$/i,pn=/^null$/i;var ln=/^undefined$/i;var mn=/^[^A-Z]*$/,dn=/^[^a-z]*$/,al=/^[0-9a-fA-F]*$/;function er(e,r){return new RegExp(`^[A-Za-z0-9+/]{${e}}${r}$`)}function rr(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var pl=/^[0-9a-fA-F]{32}$/,ll=er(22,"=="),ml=rr(22),dl=/^[0-9a-fA-F]{40}$/,fl=er(27,"="),hl=rr(27),_l=/^[0-9a-fA-F]{64}$/,gl=er(43,"="),xl=rr(43),zl=/^[0-9a-fA-F]{96}$/,vl=er(64,""),$l=rr(64),yl=/^[0-9a-fA-F]{128}$/,bl=er(86,"=="),Zl=rr(86);var b=u("$ZodCheck",(e,r)=>{var t;e._zod??(e._zod={}),e._zod.def=r,(t=e._zod).onattach??(t.onattach=[])}),$u={number:"number",bigint:"bigint",object:"date"},Wr=u("$ZodCheckLessThan",(e,r)=>{b.init(e,r);let t=$u[typeof r.value];e._zod.onattach.push((o)=>{let n=o._zod.bag,c=(r.inclusive?n.maximum:n.exclusiveMaximum)??Number.POSITIVE_INFINITY;if(r.value<c)if(r.inclusive)n.maximum=r.value;else n.exclusiveMaximum=r.value}),e._zod.check=(o)=>{if(r.inclusive?o.value<=r.value:o.value<r.value)return;o.issues.push({origin:t,code:"too_big",maximum:typeof r.value==="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),Kr=u("$ZodCheckGreaterThan",(e,r)=>{b.init(e,r);let t=$u[typeof r.value];e._zod.onattach.push((o)=>{let n=o._zod.bag,c=(r.inclusive?n.minimum:n.exclusiveMinimum)??Number.NEGATIVE_INFINITY;if(r.value>c)if(r.inclusive)n.minimum=r.value;else n.exclusiveMinimum=r.value}),e._zod.check=(o)=>{if(r.inclusive?o.value>=r.value:o.value>r.value)return;o.issues.push({origin:t,code:"too_small",minimum:typeof r.value==="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:e,continue:!r.abort})}}),fn=u("$ZodCheckMultipleOf",(e,r)=>{b.init(e,r),e._zod.onattach.push((t)=>{var o;(o=t._zod.bag).multipleOf??(o.multipleOf=r.value)}),e._zod.check=(t)=>{if(typeof t.value!==typeof r.value)throw Error("Cannot mix number and bigint in multiple_of check.");if(typeof t.value==="bigint"?t.value%r.value===BigInt(0):So(t.value,r.value)===0)return;t.issues.push({origin:typeof t.value,code:"not_multiple_of",divisor:r.value,input:t.value,inst:e,continue:!r.abort})}}),hn=u("$ZodCheckNumberFormat",(e,r)=>{b.init(e,r),r.format=r.format||"float64";let t=r.format?.includes("int"),o=t?"int":"number",[n,c]=Ao[r.format];e._zod.onattach.push((i)=>{let s=i._zod.bag;if(s.format=r.format,s.minimum=n,s.maximum=c,t)s.pattern=un}),e._zod.check=(i)=>{let s=i.value;if(t){if(!Number.isInteger(s)){i.issues.push({expected:o,format:r.format,code:"invalid_type",continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){if(s>0)i.issues.push({input:s,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});else i.issues.push({input:s,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}}if(s<n)i.issues.push({origin:"number",input:s,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!r.abort});if(s>c)i.issues.push({origin:"number",input:s,code:"too_big",maximum:c,inclusive:!0,inst:e,continue:!r.abort})}}),_n=u("$ZodCheckBigIntFormat",(e,r)=>{b.init(e,r);let[t,o]=jo[r.format];e._zod.onattach.push((n)=>{let c=n._zod.bag;c.format=r.format,c.minimum=t,c.maximum=o}),e._zod.check=(n)=>{let c=n.value;if(c<t)n.issues.push({origin:"bigint",input:c,code:"too_small",minimum:t,inclusive:!0,inst:e,continue:!r.abort});if(c>o)n.issues.push({origin:"bigint",input:c,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!r.abort})}}),gn=u("$ZodCheckMaxSize",(e,r)=>{var t;b.init(e,r),(t=e._zod.def).when??(t.when=(o)=>{let n=o.value;return!X(n)&&n.size!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(r.maximum<n)o._zod.bag.maximum=r.maximum}),e._zod.check=(o)=>{let n=o.value;if(n.size<=r.maximum)return;o.issues.push({origin:Xe(n),code:"too_big",maximum:r.maximum,inclusive:!0,input:n,inst:e,continue:!r.abort})}}),xn=u("$ZodCheckMinSize",(e,r)=>{var t;b.init(e,r),(t=e._zod.def).when??(t.when=(o)=>{let n=o.value;return!X(n)&&n.size!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(r.minimum>n)o._zod.bag.minimum=r.minimum}),e._zod.check=(o)=>{let n=o.value;if(n.size>=r.minimum)return;o.issues.push({origin:Xe(n),code:"too_small",minimum:r.minimum,inclusive:!0,input:n,inst:e,continue:!r.abort})}}),zn=u("$ZodCheckSizeEquals",(e,r)=>{var t;b.init(e,r),(t=e._zod.def).when??(t.when=(o)=>{let n=o.value;return!X(n)&&n.size!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.minimum=r.size,n.maximum=r.size,n.size=r.size}),e._zod.check=(o)=>{let n=o.value,c=n.size;if(c===r.size)return;let i=c>r.size;o.issues.push({origin:Xe(n),...i?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!r.abort})}}),vn=u("$ZodCheckMaxLength",(e,r)=>{var t;b.init(e,r),(t=e._zod.def).when??(t.when=(o)=>{let n=o.value;return!X(n)&&n.length!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag.maximum??Number.POSITIVE_INFINITY;if(r.maximum<n)o._zod.bag.maximum=r.maximum}),e._zod.check=(o)=>{let n=o.value;if(n.length<=r.maximum)return;let i=Ye(n);o.issues.push({origin:i,code:"too_big",maximum:r.maximum,inclusive:!0,input:n,inst:e,continue:!r.abort})}}),$n=u("$ZodCheckMinLength",(e,r)=>{var t;b.init(e,r),(t=e._zod.def).when??(t.when=(o)=>{let n=o.value;return!X(n)&&n.length!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;if(r.minimum>n)o._zod.bag.minimum=r.minimum}),e._zod.check=(o)=>{let n=o.value;if(n.length>=r.minimum)return;let i=Ye(n);o.issues.push({origin:i,code:"too_small",minimum:r.minimum,inclusive:!0,input:n,inst:e,continue:!r.abort})}}),yn=u("$ZodCheckLengthEquals",(e,r)=>{var t;b.init(e,r),(t=e._zod.def).when??(t.when=(o)=>{let n=o.value;return!X(n)&&n.length!==void 0}),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.minimum=r.length,n.maximum=r.length,n.length=r.length}),e._zod.check=(o)=>{let n=o.value,c=n.length;if(c===r.length)return;let i=Ye(n),s=c>r.length;o.issues.push({origin:i,...s?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:o.value,inst:e,continue:!r.abort})}}),$e=u("$ZodCheckStringFormat",(e,r)=>{var t,o;if(b.init(e,r),e._zod.onattach.push((n)=>{let c=n._zod.bag;if(c.format=r.format,r.pattern)c.patterns??(c.patterns=new Set),c.patterns.add(r.pattern)}),r.pattern)(t=e._zod).check??(t.check=(n)=>{if(r.pattern.lastIndex=0,r.pattern.test(n.value))return;n.issues.push({origin:"string",code:"invalid_format",format:r.format,input:n.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:e,continue:!r.abort})});else(o=e._zod).check??(o.check=()=>{})}),bn=u("$ZodCheckRegex",(e,r)=>{$e.init(e,r),e._zod.check=(t)=>{if(r.pattern.lastIndex=0,r.pattern.test(t.value))return;t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:r.pattern.toString(),inst:e,continue:!r.abort})}}),Zn=u("$ZodCheckLowerCase",(e,r)=>{r.pattern??(r.pattern=mn),$e.init(e,r)}),wn=u("$ZodCheckUpperCase",(e,r)=>{r.pattern??(r.pattern=dn),$e.init(e,r)}),kn=u("$ZodCheckIncludes",(e,r)=>{b.init(e,r);let t=R(r.includes),o=new RegExp(typeof r.position==="number"?`^.{${r.position}}${t}`:t);r.pattern=o,e._zod.onattach.push((n)=>{let c=n._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(o)}),e._zod.check=(n)=>{if(n.value.includes(r.includes,r.position))return;n.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:n.value,inst:e,continue:!r.abort})}}),Pn=u("$ZodCheckStartsWith",(e,r)=>{b.init(e,r);let t=new RegExp(`^${R(r.prefix)}.*`);r.pattern??(r.pattern=t),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(t)}),e._zod.check=(o)=>{if(o.value.startsWith(r.prefix))return;o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:o.value,inst:e,continue:!r.abort})}}),Sn=u("$ZodCheckEndsWith",(e,r)=>{b.init(e,r);let t=new RegExp(`.*${R(r.suffix)}$`);r.pattern??(r.pattern=t),e._zod.onattach.push((o)=>{let n=o._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(t)}),e._zod.check=(o)=>{if(o.value.endsWith(r.suffix))return;o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:o.value,inst:e,continue:!r.abort})}});function vu(e,r,t){if(e.issues.length)r.issues.push(...A(t,e.issues))}var In=u("$ZodCheckProperty",(e,r)=>{b.init(e,r),e._zod.check=(t)=>{let o=r.schema._zod.run({value:t.value[r.property],issues:[]},{});if(o instanceof Promise)return o.then((n)=>vu(n,t,r.property));vu(o,t,r.property);return}}),On=u("$ZodCheckMimeType",(e,r)=>{b.init(e,r);let t=new Set(r.mime);e._zod.onattach.push((o)=>{o._zod.bag.mime=r.mime}),e._zod.check=(o)=>{if(t.has(o.value.type))return;o.issues.push({code:"invalid_value",values:r.mime,input:o.value.type,inst:e,continue:!r.abort})}}),En=u("$ZodCheckOverwrite",(e,r)=>{b.init(e,r),e._zod.check=(t)=>{t.value=r.tx(t.value)}});class Gr{constructor(e=[]){if(this.content=[],this.indent=0,this)this.args=e}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e==="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t=e.split(`
|
|
3
|
-
`).filter((c)=>c),o=Math.min(...t.map((c)=>c.length-c.trimStart().length)),n=t.map((c)=>c.slice(o)).map((c)=>" ".repeat(this.indent*2)+c);for(let c of n)this.content.push(c)}compile(){let e=Function,r=this?.args,o=[...(this?.content??[""]).map((n)=>` ${n}`)];return new e(...r,o.join(`
|
|
4
|
-
`))}}var Tn={major:4,minor:3,patch:5};var _=u("$ZodType",(e,r)=>{var t;e??(e={}),e._zod.def=r,e._zod.bag=e._zod.bag||{},e._zod.version=Tn;let o=[...e._zod.def.checks??[]];if(e._zod.traits.has("$ZodCheck"))o.unshift(e);for(let n of o)for(let c of n._zod.onattach)c(e);if(o.length===0)(t=e._zod).deferred??(t.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let n=(i,s,a)=>{let p=Q(i),l;for(let d of s){if(d._zod.def.when){if(!d._zod.def.when(i))continue}else if(p)continue;let h=i.issues.length,x=d._zod.check(i);if(x instanceof Promise&&a?.async===!1)throw new M;if(l||x instanceof Promise)l=(l??Promise.resolve()).then(async()=>{if(await x,i.issues.length===h)return;if(!p)p=Q(i,h)});else{if(i.issues.length===h)continue;if(!p)p=Q(i,h)}}if(l)return l.then(()=>i);return i},c=(i,s,a)=>{if(Q(i))return i.aborted=!0,i;let p=n(s,o,a);if(p instanceof Promise){if(a.async===!1)throw new M;return p.then((l)=>e._zod.parse(l,a))}return e._zod.parse(p,a)};e._zod.run=(i,s)=>{if(s.skipChecks)return e._zod.parse(i,s);if(s.direction==="backward"){let p=e._zod.parse({value:i.value,issues:[]},{...s,skipChecks:!0});if(p instanceof Promise)return p.then((l)=>c(l,i,s));return c(p,i,s)}let a=e._zod.parse(i,s);if(a instanceof Promise){if(s.async===!1)throw new M;return a.then((p)=>n(p,o,s))}return n(a,o,s)}}z(e,"~standard",()=>({validate:(n)=>{try{let c=Ro(e,n);return c.success?{value:c.data}:{issues:c.error?.issues}}catch(c){return Do(e,n).then((i)=>i.success?{value:i.data}:{issues:i.error?.issues})}},vendor:"zod",version:1}))}),ie=u("$ZodString",(e,r)=>{_.init(e,r),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??cn(e._zod.bag),e._zod.parse=(t,o)=>{if(r.coerce)try{t.value=String(t.value)}catch(n){}if(typeof t.value==="string")return t;return t.issues.push({expected:"string",code:"invalid_type",input:t.value,inst:e}),t}}),v=u("$ZodStringFormat",(e,r)=>{$e.init(e,r),ie.init(e,r)}),An=u("$ZodGUID",(e,r)=>{r.pattern??(r.pattern=Wo),v.init(e,r)}),jn=u("$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 Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=ce(o))}else r.pattern??(r.pattern=ce());v.init(e,r)}),Cn=u("$ZodEmail",(e,r)=>{r.pattern??(r.pattern=Ko),v.init(e,r)}),Rn=u("$ZodURL",(e,r)=>{v.init(e,r),e._zod.check=(t)=>{try{let o=t.value.trim(),n=new URL(o);if(r.hostname){if(r.hostname.lastIndex=0,!r.hostname.test(n.hostname))t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:t.value,inst:e,continue:!r.abort})}if(r.protocol){if(r.protocol.lastIndex=0,!r.protocol.test(n.protocol.endsWith(":")?n.protocol.slice(0,-1):n.protocol))t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:t.value,inst:e,continue:!r.abort})}if(r.normalize)t.value=n.href;else t.value=o;return}catch(o){t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:e,continue:!r.abort})}}}),Dn=u("$ZodEmoji",(e,r)=>{r.pattern??(r.pattern=Go()),v.init(e,r)}),Ln=u("$ZodNanoID",(e,r)=>{r.pattern??(r.pattern=Bo),v.init(e,r)}),Fn=u("$ZodCUID",(e,r)=>{r.pattern??(r.pattern=Lo),v.init(e,r)}),Un=u("$ZodCUID2",(e,r)=>{r.pattern??(r.pattern=Fo),v.init(e,r)}),Mn=u("$ZodULID",(e,r)=>{r.pattern??(r.pattern=Uo),v.init(e,r)}),Jn=u("$ZodXID",(e,r)=>{r.pattern??(r.pattern=Mo),v.init(e,r)}),Bn=u("$ZodKSUID",(e,r)=>{r.pattern??(r.pattern=Jo),v.init(e,r)}),Vn=u("$ZodISODateTime",(e,r)=>{r.pattern??(r.pattern=nn(r)),v.init(e,r)}),Wn=u("$ZodISODate",(e,r)=>{r.pattern??(r.pattern=tn),v.init(e,r)}),Kn=u("$ZodISOTime",(e,r)=>{r.pattern??(r.pattern=on(r)),v.init(e,r)}),Gn=u("$ZodISODuration",(e,r)=>{r.pattern??(r.pattern=Vo),v.init(e,r)}),qn=u("$ZodIPv4",(e,r)=>{r.pattern??(r.pattern=qo),v.init(e,r),e._zod.bag.format="ipv4"}),Xn=u("$ZodIPv6",(e,r)=>{r.pattern??(r.pattern=Xo),v.init(e,r),e._zod.bag.format="ipv6",e._zod.check=(t)=>{try{new URL(`http://[${t.value}]`)}catch{t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:e,continue:!r.abort})}}}),Yn=u("$ZodMAC",(e,r)=>{r.pattern??(r.pattern=Yo(r.delimiter)),v.init(e,r),e._zod.bag.format="mac"}),Hn=u("$ZodCIDRv4",(e,r)=>{r.pattern??(r.pattern=Ho),v.init(e,r)}),Qn=u("$ZodCIDRv6",(e,r)=>{r.pattern??(r.pattern=Qo),v.init(e,r),e._zod.check=(t)=>{let o=t.value.split("/");try{if(o.length!==2)throw Error();let[n,c]=o;if(!c)throw Error();let i=Number(c);if(`${i}`!==c)throw Error();if(i<0||i>128)throw Error();new URL(`http://[${n}]`)}catch{t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:e,continue:!r.abort})}}});function ec(e){if(e==="")return!0;if(e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var rc=u("$ZodBase64",(e,r)=>{r.pattern??(r.pattern=en),v.init(e,r),e._zod.bag.contentEncoding="base64",e._zod.check=(t)=>{if(ec(t.value))return;t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:e,continue:!r.abort})}});function Au(e){if(!Vr.test(e))return!1;let r=e.replace(/[-_]/g,(o)=>o==="-"?"+":"/"),t=r.padEnd(Math.ceil(r.length/4)*4,"=");return ec(t)}var tc=u("$ZodBase64URL",(e,r)=>{r.pattern??(r.pattern=Vr),v.init(e,r),e._zod.bag.contentEncoding="base64url",e._zod.check=(t)=>{if(Au(t.value))return;t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:e,continue:!r.abort})}}),oc=u("$ZodE164",(e,r)=>{r.pattern??(r.pattern=rn),v.init(e,r)});function ju(e,r=null){try{let t=e.split(".");if(t.length!==3)return!1;let[o]=t;if(!o)return!1;let n=JSON.parse(atob(o));if("typ"in n&&n?.typ!=="JWT")return!1;if(!n.alg)return!1;if(r&&(!("alg"in n)||n.alg!==r))return!1;return!0}catch{return!1}}var nc=u("$ZodJWT",(e,r)=>{v.init(e,r),e._zod.check=(t)=>{if(ju(t.value,r.alg))return;t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:e,continue:!r.abort})}}),cc=u("$ZodCustomStringFormat",(e,r)=>{v.init(e,r),e._zod.check=(t)=>{if(r.fn(t.value))return;t.issues.push({code:"invalid_format",format:r.format,input:t.value,inst:e,continue:!r.abort})}}),et=u("$ZodNumber",(e,r)=>{_.init(e,r),e._zod.pattern=e._zod.bag.pattern??Qe,e._zod.parse=(t,o)=>{if(r.coerce)try{t.value=Number(t.value)}catch(i){}let n=t.value;if(typeof n==="number"&&!Number.isNaN(n)&&Number.isFinite(n))return t;let c=typeof n==="number"?Number.isNaN(n)?"NaN":!Number.isFinite(n)?"Infinity":void 0:void 0;return t.issues.push({expected:"number",code:"invalid_type",input:n,inst:e,...c?{received:c}:{}}),t}}),ic=u("$ZodNumberFormat",(e,r)=>{hn.init(e,r),et.init(e,r)}),tr=u("$ZodBoolean",(e,r)=>{_.init(e,r),e._zod.pattern=an,e._zod.parse=(t,o)=>{if(r.coerce)try{t.value=Boolean(t.value)}catch(c){}let n=t.value;if(typeof n==="boolean")return t;return t.issues.push({expected:"boolean",code:"invalid_type",input:n,inst:e}),t}}),rt=u("$ZodBigInt",(e,r)=>{_.init(e,r),e._zod.pattern=sn,e._zod.parse=(t,o)=>{if(r.coerce)try{t.value=BigInt(t.value)}catch(n){}if(typeof t.value==="bigint")return t;return t.issues.push({expected:"bigint",code:"invalid_type",input:t.value,inst:e}),t}}),sc=u("$ZodBigIntFormat",(e,r)=>{_n.init(e,r),rt.init(e,r)}),uc=u("$ZodSymbol",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>{let n=t.value;if(typeof n==="symbol")return t;return t.issues.push({expected:"symbol",code:"invalid_type",input:n,inst:e}),t}}),ac=u("$ZodUndefined",(e,r)=>{_.init(e,r),e._zod.pattern=ln,e._zod.values=new Set([void 0]),e._zod.optin="optional",e._zod.optout="optional",e._zod.parse=(t,o)=>{let n=t.value;if(typeof n>"u")return t;return t.issues.push({expected:"undefined",code:"invalid_type",input:n,inst:e}),t}}),pc=u("$ZodNull",(e,r)=>{_.init(e,r),e._zod.pattern=pn,e._zod.values=new Set([null]),e._zod.parse=(t,o)=>{let n=t.value;if(n===null)return t;return t.issues.push({expected:"null",code:"invalid_type",input:n,inst:e}),t}}),lc=u("$ZodAny",(e,r)=>{_.init(e,r),e._zod.parse=(t)=>t}),mc=u("$ZodUnknown",(e,r)=>{_.init(e,r),e._zod.parse=(t)=>t}),dc=u("$ZodNever",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:e}),t)}),fc=u("$ZodVoid",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>{let n=t.value;if(typeof n>"u")return t;return t.issues.push({expected:"void",code:"invalid_type",input:n,inst:e}),t}}),hc=u("$ZodDate",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>{if(r.coerce)try{t.value=new Date(t.value)}catch(s){}let n=t.value,c=n instanceof Date;if(c&&!Number.isNaN(n.getTime()))return t;return t.issues.push({expected:"date",code:"invalid_type",input:n,...c?{received:"Invalid Date"}:{},inst:e}),t}});function bu(e,r,t){if(e.issues.length)r.issues.push(...A(t,e.issues));r.value[t]=e.value}var _c=u("$ZodArray",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>{let n=t.value;if(!Array.isArray(n))return t.issues.push({expected:"array",code:"invalid_type",input:n,inst:e}),t;t.value=Array(n.length);let c=[];for(let i=0;i<n.length;i++){let s=n[i],a=r.element._zod.run({value:s,issues:[]},o);if(a instanceof Promise)c.push(a.then((p)=>bu(p,t,i)));else bu(a,t,i)}if(c.length)return Promise.all(c).then(()=>t);return t}});function Qr(e,r,t,o,n){if(e.issues.length){if(n&&!(t in o))return;r.issues.push(...A(t,e.issues))}if(e.value===void 0){if(t in o)r.value[t]=void 0}else r.value[t]=e.value}function Cu(e){let r=Object.keys(e.shape);for(let o of r)if(!e.shape?.[o]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${o}": expected a Zod schema`);let t=No(e.shape);return{...e,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(t)}}function Ru(e,r,t,o,n,c){let i=[],s=n.keySet,a=n.catchall._zod,p=a.def.type,l=a.optout==="optional";for(let d in r){if(s.has(d))continue;if(p==="never"){i.push(d);continue}let h=a.run({value:r[d],issues:[]},o);if(h instanceof Promise)e.push(h.then((x)=>Qr(x,t,d,r,l)));else Qr(h,t,d,r,l)}if(i.length)t.issues.push({code:"unrecognized_keys",keys:i,input:r,inst:c});if(!e.length)return t;return Promise.all(e).then(()=>t)}var Du=u("$ZodObject",(e,r)=>{if(_.init(e,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){let s=r.shape;Object.defineProperty(r,"shape",{get:()=>{let a={...s};return Object.defineProperty(r,"shape",{value:a}),a}})}let o=de(()=>Cu(r));z(e._zod,"propValues",()=>{let s=r.shape,a={};for(let p in s){let l=s[p]._zod;if(l.values){a[p]??(a[p]=new Set);for(let d of l.values)a[p].add(d)}}return a});let n=ne,c=r.catchall,i;e._zod.parse=(s,a)=>{i??(i=o.value);let p=s.value;if(!n(p))return s.issues.push({expected:"object",code:"invalid_type",input:p,inst:e}),s;s.value={};let l=[],d=i.shape;for(let h of i.keys){let x=d[h],k=x._zod.optout==="optional",F=x._zod.run({value:p[h],issues:[]},a);if(F instanceof Promise)l.push(F.then((kr)=>Qr(kr,s,h,p,k)));else Qr(F,s,h,p,k)}if(!c)return l.length?Promise.all(l).then(()=>s):s;return Ru(l,p,s,a,o.value,e)}}),gc=u("$ZodObjectJIT",(e,r)=>{Du.init(e,r);let t=e._zod.parse,o=de(()=>Cu(r)),n=(h)=>{let x=new Gr(["shape","payload","ctx"]),k=o.value,F=(U)=>{let O=Or(U);return`shape[${O}]._zod.run({ value: input[${O}], issues: [] }, ctx)`};x.write("const input = payload.value;");let kr=Object.create(null),up=0;for(let U of k.keys)kr[U]=`key_${up++}`;x.write("const newResult = {};");for(let U of k.keys){let O=kr[U],D=Or(U),pp=h[U]?._zod?.optout==="optional";if(x.write(`const ${O} = ${F(U)};`),pp)x.write(`
|
|
5
|
-
if (${O}.issues.length) {
|
|
6
|
-
if (${D} in input) {
|
|
7
|
-
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
8
|
-
...iss,
|
|
9
|
-
path: iss.path ? [${D}, ...iss.path] : [${D}]
|
|
10
|
-
})));
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
if (${O}.value === undefined) {
|
|
15
|
-
if (${D} in input) {
|
|
16
|
-
newResult[${D}] = undefined;
|
|
17
|
-
}
|
|
18
|
-
} else {
|
|
19
|
-
newResult[${D}] = ${O}.value;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
`);else x.write(`
|
|
23
|
-
if (${O}.issues.length) {
|
|
24
|
-
payload.issues = payload.issues.concat(${O}.issues.map(iss => ({
|
|
25
|
-
...iss,
|
|
26
|
-
path: iss.path ? [${D}, ...iss.path] : [${D}]
|
|
27
|
-
})));
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (${O}.value === undefined) {
|
|
31
|
-
if (${D} in input) {
|
|
32
|
-
newResult[${D}] = undefined;
|
|
33
|
-
}
|
|
34
|
-
} else {
|
|
35
|
-
newResult[${D}] = ${O}.value;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
`)}x.write("payload.value = newResult;"),x.write("return payload;");let ap=x.compile();return(U,O)=>ap(h,U,O)},c,i=ne,s=!Ve.jitless,p=s&&Oo.value,l=r.catchall,d;e._zod.parse=(h,x)=>{d??(d=o.value);let k=h.value;if(!i(k))return h.issues.push({expected:"object",code:"invalid_type",input:k,inst:e}),h;if(s&&p&&x?.async===!1&&x.jitless!==!0){if(!c)c=n(r.shape);if(h=c(h,x),!l)return h;return Ru([],k,h,x,d,e)}return t(h,x)}});function Zu(e,r,t,o){for(let c of e)if(c.issues.length===0)return r.value=c.value,r;let n=e.filter((c)=>!Q(c));if(n.length===1)return r.value=n[0].value,n[0];return r.issues.push({code:"invalid_union",input:r.value,inst:t,errors:e.map((c)=>c.issues.map((i)=>E(i,o,w())))}),r}var or=u("$ZodUnion",(e,r)=>{_.init(e,r),z(e._zod,"optin",()=>r.options.some((n)=>n._zod.optin==="optional")?"optional":void 0),z(e._zod,"optout",()=>r.options.some((n)=>n._zod.optout==="optional")?"optional":void 0),z(e._zod,"values",()=>{if(r.options.every((n)=>n._zod.values))return new Set(r.options.flatMap((n)=>Array.from(n._zod.values)));return}),z(e._zod,"pattern",()=>{if(r.options.every((n)=>n._zod.pattern)){let n=r.options.map((c)=>c._zod.pattern);return new RegExp(`^(${n.map((c)=>Ge(c.source)).join("|")})$`)}return});let t=r.options.length===1,o=r.options[0]._zod.run;e._zod.parse=(n,c)=>{if(t)return o(n,c);let i=!1,s=[];for(let a of r.options){let p=a._zod.run({value:n.value,issues:[]},c);if(p instanceof Promise)s.push(p),i=!0;else{if(p.issues.length===0)return p;s.push(p)}}if(!i)return Zu(s,n,e,c);return Promise.all(s).then((a)=>Zu(a,n,e,c))}});function wu(e,r,t,o){let n=e.filter((c)=>c.issues.length===0);if(n.length===1)return r.value=n[0].value,r;if(n.length===0)r.issues.push({code:"invalid_union",input:r.value,inst:t,errors:e.map((c)=>c.issues.map((i)=>E(i,o,w())))});else r.issues.push({code:"invalid_union",input:r.value,inst:t,errors:[],inclusive:!1});return r}var xc=u("$ZodXor",(e,r)=>{or.init(e,r),r.inclusive=!1;let t=r.options.length===1,o=r.options[0]._zod.run;e._zod.parse=(n,c)=>{if(t)return o(n,c);let i=!1,s=[];for(let a of r.options){let p=a._zod.run({value:n.value,issues:[]},c);if(p instanceof Promise)s.push(p),i=!0;else s.push(p)}if(!i)return wu(s,n,e,c);return Promise.all(s).then((a)=>wu(a,n,e,c))}}),zc=u("$ZodDiscriminatedUnion",(e,r)=>{r.inclusive=!1,or.init(e,r);let t=e._zod.parse;z(e._zod,"propValues",()=>{let n={};for(let c of r.options){let i=c._zod.propValues;if(!i||Object.keys(i).length===0)throw Error(`Invalid discriminated union option at index "${r.options.indexOf(c)}"`);for(let[s,a]of Object.entries(i)){if(!n[s])n[s]=new Set;for(let p of a)n[s].add(p)}}return n});let o=de(()=>{let n=r.options,c=new Map;for(let i of n){let s=i._zod.propValues?.[r.discriminator];if(!s||s.size===0)throw Error(`Invalid discriminated union option at index "${r.options.indexOf(i)}"`);for(let a of s){if(c.has(a))throw Error(`Duplicate discriminator value "${String(a)}"`);c.set(a,i)}}return c});e._zod.parse=(n,c)=>{let i=n.value;if(!ne(i))return n.issues.push({code:"invalid_type",expected:"object",input:i,inst:e}),n;let s=o.value.get(i?.[r.discriminator]);if(s)return s._zod.run(n,c);if(r.unionFallback)return t(n,c);return n.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:r.discriminator,input:i,path:[r.discriminator],inst:e}),n}}),vc=u("$ZodIntersection",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>{let n=t.value,c=r.left._zod.run({value:n,issues:[]},o),i=r.right._zod.run({value:n,issues:[]},o);if(c instanceof Promise||i instanceof Promise)return Promise.all([c,i]).then(([a,p])=>ku(t,a,p));return ku(t,c,i)}});function Nn(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(H(e)&&H(r)){let t=Object.keys(r),o=Object.keys(e).filter((c)=>t.indexOf(c)!==-1),n={...e,...r};for(let c of o){let i=Nn(e[c],r[c]);if(!i.valid)return{valid:!1,mergeErrorPath:[c,...i.mergeErrorPath]};n[c]=i.data}return{valid:!0,data:n}}if(Array.isArray(e)&&Array.isArray(r)){if(e.length!==r.length)return{valid:!1,mergeErrorPath:[]};let t=[];for(let o=0;o<e.length;o++){let n=e[o],c=r[o],i=Nn(n,c);if(!i.valid)return{valid:!1,mergeErrorPath:[o,...i.mergeErrorPath]};t.push(i.data)}return{valid:!0,data:t}}return{valid:!1,mergeErrorPath:[]}}function ku(e,r,t){let o=new Map,n;for(let s of r.issues)if(s.code==="unrecognized_keys"){n??(n=s);for(let a of s.keys){if(!o.has(a))o.set(a,{});o.get(a).l=!0}}else e.issues.push(s);for(let s of t.issues)if(s.code==="unrecognized_keys")for(let a of s.keys){if(!o.has(a))o.set(a,{});o.get(a).r=!0}else e.issues.push(s);let c=[...o].filter(([,s])=>s.l&&s.r).map(([s])=>s);if(c.length&&n)e.issues.push({...n,keys:c});if(Q(e))return e;let i=Nn(r.value,t.value);if(!i.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);return e.value=i.data,e}var tt=u("$ZodTuple",(e,r)=>{_.init(e,r);let t=r.items;e._zod.parse=(o,n)=>{let c=o.value;if(!Array.isArray(c))return o.issues.push({input:c,inst:e,expected:"tuple",code:"invalid_type"}),o;o.value=[];let i=[],s=[...t].reverse().findIndex((l)=>l._zod.optin!=="optional"),a=s===-1?0:t.length-s;if(!r.rest){let l=c.length>t.length,d=c.length<a-1;if(l||d)return o.issues.push({...l?{code:"too_big",maximum:t.length,inclusive:!0}:{code:"too_small",minimum:t.length},input:c,inst:e,origin:"array"}),o}let p=-1;for(let l of t){if(p++,p>=c.length){if(p>=a)continue}let d=l._zod.run({value:c[p],issues:[]},n);if(d instanceof Promise)i.push(d.then((h)=>qr(h,o,p)));else qr(d,o,p)}if(r.rest){let l=c.slice(t.length);for(let d of l){p++;let h=r.rest._zod.run({value:d,issues:[]},n);if(h instanceof Promise)i.push(h.then((x)=>qr(x,o,p)));else qr(h,o,p)}}if(i.length)return Promise.all(i).then(()=>o);return o}});function qr(e,r,t){if(e.issues.length)r.issues.push(...A(t,e.issues));r.value[t]=e.value}var $c=u("$ZodRecord",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>{let n=t.value;if(!H(n))return t.issues.push({expected:"record",code:"invalid_type",input:n,inst:e}),t;let c=[],i=r.keyType._zod.values;if(i){t.value={};let s=new Set;for(let p of i)if(typeof p==="string"||typeof p==="number"||typeof p==="symbol"){s.add(typeof p==="number"?p.toString():p);let l=r.valueType._zod.run({value:n[p],issues:[]},o);if(l instanceof Promise)c.push(l.then((d)=>{if(d.issues.length)t.issues.push(...A(p,d.issues));t.value[p]=d.value}));else{if(l.issues.length)t.issues.push(...A(p,l.issues));t.value[p]=l.value}}let a;for(let p in n)if(!s.has(p))a=a??[],a.push(p);if(a&&a.length>0)t.issues.push({code:"unrecognized_keys",input:n,inst:e,keys:a})}else{t.value={};for(let s of Reflect.ownKeys(n)){if(s==="__proto__")continue;let a=r.keyType._zod.run({value:s,issues:[]},o);if(a instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(typeof s==="string"&&Qe.test(s)&&a.issues.length&&a.issues.some((d)=>d.code==="invalid_type"&&d.expected==="number")){let d=r.keyType._zod.run({value:Number(s),issues:[]},o);if(d instanceof Promise)throw Error("Async schemas not supported in object keys currently");if(d.issues.length===0)a=d}if(a.issues.length){if(r.mode==="loose")t.value[s]=n[s];else t.issues.push({code:"invalid_key",origin:"record",issues:a.issues.map((d)=>E(d,o,w())),input:s,path:[s],inst:e});continue}let l=r.valueType._zod.run({value:n[s],issues:[]},o);if(l instanceof Promise)c.push(l.then((d)=>{if(d.issues.length)t.issues.push(...A(s,d.issues));t.value[a.value]=d.value}));else{if(l.issues.length)t.issues.push(...A(s,l.issues));t.value[a.value]=l.value}}}if(c.length)return Promise.all(c).then(()=>t);return t}}),yc=u("$ZodMap",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>{let n=t.value;if(!(n instanceof Map))return t.issues.push({expected:"map",code:"invalid_type",input:n,inst:e}),t;let c=[];t.value=new Map;for(let[i,s]of n){let a=r.keyType._zod.run({value:i,issues:[]},o),p=r.valueType._zod.run({value:s,issues:[]},o);if(a instanceof Promise||p instanceof Promise)c.push(Promise.all([a,p]).then(([l,d])=>{Pu(l,d,t,i,n,e,o)}));else Pu(a,p,t,i,n,e,o)}if(c.length)return Promise.all(c).then(()=>t);return t}});function Pu(e,r,t,o,n,c,i){if(e.issues.length)if(qe.has(typeof o))t.issues.push(...A(o,e.issues));else t.issues.push({code:"invalid_key",origin:"map",input:n,inst:c,issues:e.issues.map((s)=>E(s,i,w()))});if(r.issues.length)if(qe.has(typeof o))t.issues.push(...A(o,r.issues));else t.issues.push({origin:"map",code:"invalid_element",input:n,inst:c,key:o,issues:r.issues.map((s)=>E(s,i,w()))});t.value.set(e.value,r.value)}var bc=u("$ZodSet",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>{let n=t.value;if(!(n instanceof Set))return t.issues.push({input:n,inst:e,expected:"set",code:"invalid_type"}),t;let c=[];t.value=new Set;for(let i of n){let s=r.valueType._zod.run({value:i,issues:[]},o);if(s instanceof Promise)c.push(s.then((a)=>Su(a,t)));else Su(s,t)}if(c.length)return Promise.all(c).then(()=>t);return t}});function Su(e,r){if(e.issues.length)r.issues.push(...e.issues);r.value.add(e.value)}var Zc=u("$ZodEnum",(e,r)=>{_.init(e,r);let t=Ke(r.entries),o=new Set(t);e._zod.values=o,e._zod.pattern=new RegExp(`^(${t.filter((n)=>qe.has(typeof n)).map((n)=>typeof n==="string"?R(n):n.toString()).join("|")})$`),e._zod.parse=(n,c)=>{let i=n.value;if(o.has(i))return n;return n.issues.push({code:"invalid_value",values:t,input:i,inst:e}),n}}),wc=u("$ZodLiteral",(e,r)=>{if(_.init(e,r),r.values.length===0)throw Error("Cannot create literal schema with no valid values");let t=new Set(r.values);e._zod.values=t,e._zod.pattern=new RegExp(`^(${r.values.map((o)=>typeof o==="string"?R(o):o?R(o.toString()):String(o)).join("|")})$`),e._zod.parse=(o,n)=>{let c=o.value;if(t.has(c))return o;return o.issues.push({code:"invalid_value",values:r.values,input:c,inst:e}),o}}),kc=u("$ZodFile",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>{let n=t.value;if(n instanceof File)return t;return t.issues.push({expected:"file",code:"invalid_type",input:n,inst:e}),t}}),Pc=u("$ZodTransform",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>{if(o.direction==="backward")throw new oe(e.constructor.name);let n=r.transform(t.value,t);if(o.async)return(n instanceof Promise?n:Promise.resolve(n)).then((i)=>(t.value=i,t));if(n instanceof Promise)throw new M;return t.value=n,t}});function Iu(e,r){if(e.issues.length&&r===void 0)return{issues:[],value:void 0};return e}var ot=u("$ZodOptional",(e,r)=>{_.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 t=r.innerType._zod.pattern;return t?new RegExp(`^(${Ge(t.source)})?$`):void 0}),e._zod.parse=(t,o)=>{if(r.innerType._zod.optin==="optional"){let n=r.innerType._zod.run(t,o);if(n instanceof Promise)return n.then((c)=>Iu(c,t.value));return Iu(n,t.value)}if(t.value===void 0)return t;return r.innerType._zod.run(t,o)}}),Sc=u("$ZodExactOptional",(e,r)=>{ot.init(e,r),z(e._zod,"values",()=>r.innerType._zod.values),z(e._zod,"pattern",()=>r.innerType._zod.pattern),e._zod.parse=(t,o)=>r.innerType._zod.run(t,o)}),Ic=u("$ZodNullable",(e,r)=>{_.init(e,r),z(e._zod,"optin",()=>r.innerType._zod.optin),z(e._zod,"optout",()=>r.innerType._zod.optout),z(e._zod,"pattern",()=>{let t=r.innerType._zod.pattern;return t?new RegExp(`^(${Ge(t.source)}|null)$`):void 0}),z(e._zod,"values",()=>r.innerType._zod.values?new Set([...r.innerType._zod.values,null]):void 0),e._zod.parse=(t,o)=>{if(t.value===null)return t;return r.innerType._zod.run(t,o)}}),Oc=u("$ZodDefault",(e,r)=>{_.init(e,r),e._zod.optin="optional",z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,o)=>{if(o.direction==="backward")return r.innerType._zod.run(t,o);if(t.value===void 0)return t.value=r.defaultValue,t;let n=r.innerType._zod.run(t,o);if(n instanceof Promise)return n.then((c)=>Ou(c,r));return Ou(n,r)}});function Ou(e,r){if(e.value===void 0)e.value=r.defaultValue;return e}var Ec=u("$ZodPrefault",(e,r)=>{_.init(e,r),e._zod.optin="optional",z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,o)=>{if(o.direction==="backward")return r.innerType._zod.run(t,o);if(t.value===void 0)t.value=r.defaultValue;return r.innerType._zod.run(t,o)}}),Tc=u("$ZodNonOptional",(e,r)=>{_.init(e,r),z(e._zod,"values",()=>{let t=r.innerType._zod.values;return t?new Set([...t].filter((o)=>o!==void 0)):void 0}),e._zod.parse=(t,o)=>{let n=r.innerType._zod.run(t,o);if(n instanceof Promise)return n.then((c)=>Eu(c,e));return Eu(n,e)}});function Eu(e,r){if(!e.issues.length&&e.value===void 0)e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:r});return e}var Nc=u("$ZodSuccess",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>{if(o.direction==="backward")throw new oe("ZodSuccess");let n=r.innerType._zod.run(t,o);if(n instanceof Promise)return n.then((c)=>(t.value=c.issues.length===0,t));return t.value=n.issues.length===0,t}}),Ac=u("$ZodCatch",(e,r)=>{_.init(e,r),z(e._zod,"optin",()=>r.innerType._zod.optin),z(e._zod,"optout",()=>r.innerType._zod.optout),z(e._zod,"values",()=>r.innerType._zod.values),e._zod.parse=(t,o)=>{if(o.direction==="backward")return r.innerType._zod.run(t,o);let n=r.innerType._zod.run(t,o);if(n instanceof Promise)return n.then((c)=>{if(t.value=c.value,c.issues.length)t.value=r.catchValue({...t,error:{issues:c.issues.map((i)=>E(i,o,w()))},input:t.value}),t.issues=[];return t});if(t.value=n.value,n.issues.length)t.value=r.catchValue({...t,error:{issues:n.issues.map((c)=>E(c,o,w()))},input:t.value}),t.issues=[];return t}}),jc=u("$ZodNaN",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>{if(typeof t.value!=="number"||!Number.isNaN(t.value))return t.issues.push({input:t.value,inst:e,expected:"nan",code:"invalid_type"}),t;return t}}),Cc=u("$ZodPipe",(e,r)=>{_.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=(t,o)=>{if(o.direction==="backward"){let c=r.out._zod.run(t,o);if(c instanceof Promise)return c.then((i)=>Xr(i,r.in,o));return Xr(c,r.in,o)}let n=r.in._zod.run(t,o);if(n instanceof Promise)return n.then((c)=>Xr(c,r.out,o));return Xr(n,r.out,o)}});function Xr(e,r,t){if(e.issues.length)return e.aborted=!0,e;return r._zod.run({value:e.value,issues:e.issues},t)}var nr=u("$ZodCodec",(e,r)=>{_.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=(t,o)=>{if((o.direction||"forward")==="forward"){let c=r.in._zod.run(t,o);if(c instanceof Promise)return c.then((i)=>Yr(i,r,o));return Yr(c,r,o)}else{let c=r.out._zod.run(t,o);if(c instanceof Promise)return c.then((i)=>Yr(i,r,o));return Yr(c,r,o)}}});function Yr(e,r,t){if(e.issues.length)return e.aborted=!0,e;if((t.direction||"forward")==="forward"){let n=r.transform(e.value,e);if(n instanceof Promise)return n.then((c)=>Hr(e,c,r.out,t));return Hr(e,n,r.out,t)}else{let n=r.reverseTransform(e.value,e);if(n instanceof Promise)return n.then((c)=>Hr(e,c,r.in,t));return Hr(e,n,r.in,t)}}function Hr(e,r,t,o){if(e.issues.length)return e.aborted=!0,e;return t._zod.run({value:r,issues:e.issues},o)}var Rc=u("$ZodReadonly",(e,r)=>{_.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=(t,o)=>{if(o.direction==="backward")return r.innerType._zod.run(t,o);let n=r.innerType._zod.run(t,o);if(n instanceof Promise)return n.then(Tu);return Tu(n)}});function Tu(e){return e.value=Object.freeze(e.value),e}var Dc=u("$ZodTemplateLiteral",(e,r)=>{_.init(e,r);let t=[];for(let o of r.parts)if(typeof o==="object"&&o!==null){if(!o._zod.pattern)throw Error(`Invalid template literal part, no pattern found: ${[...o._zod.traits].shift()}`);let n=o._zod.pattern instanceof RegExp?o._zod.pattern.source:o._zod.pattern;if(!n)throw Error(`Invalid template literal part: ${o._zod.traits}`);let c=n.startsWith("^")?1:0,i=n.endsWith("$")?n.length-1:n.length;t.push(n.slice(c,i))}else if(o===null||To.has(typeof o))t.push(R(`${o}`));else throw Error(`Invalid template literal part: ${o}`);e._zod.pattern=new RegExp(`^${t.join("")}$`),e._zod.parse=(o,n)=>{if(typeof o.value!=="string")return o.issues.push({input:o.value,inst:e,expected:"string",code:"invalid_type"}),o;if(e._zod.pattern.lastIndex=0,!e._zod.pattern.test(o.value))return o.issues.push({input:o.value,inst:e,code:"invalid_format",format:r.format??"template_literal",pattern:e._zod.pattern.source}),o;return o}}),Lc=u("$ZodFunction",(e,r)=>(_.init(e,r),e._def=r,e._zod.def=r,e.implement=(t)=>{if(typeof t!=="function")throw Error("implement() must be called with a function");return function(...o){let n=e._def.input?jr(e._def.input,o):o,c=Reflect.apply(t,this,n);if(e._def.output)return jr(e._def.output,c);return c}},e.implementAsync=(t)=>{if(typeof t!=="function")throw Error("implementAsync() must be called with a function");return async function(...o){let n=e._def.input?await Cr(e._def.input,o):o,c=await Reflect.apply(t,this,n);if(e._def.output)return await Cr(e._def.output,c);return c}},e._zod.parse=(t,o)=>{if(typeof t.value!=="function")return t.issues.push({code:"invalid_type",expected:"function",input:t.value,inst:e}),t;if(e._def.output&&e._def.output._zod.def.type==="promise")t.value=e.implementAsync(t.value);else t.value=e.implement(t.value);return t},e.input=(...t)=>{let o=e.constructor;if(Array.isArray(t[0]))return new o({type:"function",input:new tt({type:"tuple",items:t[0],rest:t[1]}),output:e._def.output});return new o({type:"function",input:t[0],output:e._def.output})},e.output=(t)=>new e.constructor({type:"function",input:e._def.input,output:t}),e)),Fc=u("$ZodPromise",(e,r)=>{_.init(e,r),e._zod.parse=(t,o)=>Promise.resolve(t.value).then((n)=>r.innerType._zod.run({value:n,issues:[]},o))}),Uc=u("$ZodLazy",(e,r)=>{_.init(e,r),z(e._zod,"innerType",()=>r.getter()),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=(t,o)=>e._zod.innerType._zod.run(t,o)}),Mc=u("$ZodCustom",(e,r)=>{b.init(e,r),_.init(e,r),e._zod.parse=(t,o)=>t,e._zod.check=(t)=>{let o=t.value,n=r.fn(o);if(n instanceof Promise)return n.then((c)=>Nu(c,t,o,e));Nu(n,t,o,e);return}});function Nu(e,r,t,o){if(!e){let n={code:"custom",input:t,inst:o,path:[...o._zod.def.path??[]],continue:!o._zod.def.abort};if(o._zod.def.params)n.params=o._zod.def.params;r.issues.push(fe(n))}}var cr={};var Lu,nt=Symbol("ZodOutput"),ct=Symbol("ZodInput");class Jc{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...r){let t=r[0];if(this._map.set(e,t),t&&typeof t==="object"&&"id"in t)this._idmap.set(t.id,e);return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let r=this._map.get(e);if(r&&typeof r==="object"&&"id"in r)this._idmap.delete(r.id);return this._map.delete(e),this}get(e){let r=e._zod.parent;if(r){let t={...this.get(r)??{}};delete t.id;let o={...t,...this._map.get(e)};return Object.keys(o).length?o:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function ir(){return new Jc}(Lu=globalThis).__zod_globalRegistry??(Lu.__zod_globalRegistry=ir());var N=globalThis.__zod_globalRegistry;function Bc(e,r){return new e({type:"string",...m(r)})}function Vc(e,r){return new e({type:"string",coerce:!0,...m(r)})}function it(e,r){return new e({type:"string",format:"email",check:"string_format",abort:!1,...m(r)})}function sr(e,r){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...m(r)})}function st(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...m(r)})}function ut(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...m(r)})}function at(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...m(r)})}function pt(e,r){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...m(r)})}function ur(e,r){return new e({type:"string",format:"url",check:"string_format",abort:!1,...m(r)})}function lt(e,r){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...m(r)})}function mt(e,r){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...m(r)})}function dt(e,r){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...m(r)})}function ft(e,r){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...m(r)})}function ht(e,r){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...m(r)})}function _t(e,r){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...m(r)})}function gt(e,r){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...m(r)})}function xt(e,r){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...m(r)})}function zt(e,r){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...m(r)})}function Wc(e,r){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...m(r)})}function vt(e,r){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...m(r)})}function $t(e,r){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...m(r)})}function yt(e,r){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...m(r)})}function bt(e,r){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...m(r)})}function Zt(e,r){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...m(r)})}function wt(e,r){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...m(r)})}var kt={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Kc(e,r){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...m(r)})}function Gc(e,r){return new e({type:"string",format:"date",check:"string_format",...m(r)})}function qc(e,r){return new e({type:"string",format:"time",check:"string_format",precision:null,...m(r)})}function Xc(e,r){return new e({type:"string",format:"duration",check:"string_format",...m(r)})}function Yc(e,r){return new e({type:"number",checks:[],...m(r)})}function Hc(e,r){return new e({type:"number",coerce:!0,checks:[],...m(r)})}function Qc(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...m(r)})}function ei(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...m(r)})}function ri(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...m(r)})}function ti(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...m(r)})}function oi(e,r){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...m(r)})}function ni(e,r){return new e({type:"boolean",...m(r)})}function ci(e,r){return new e({type:"boolean",coerce:!0,...m(r)})}function ii(e,r){return new e({type:"bigint",...m(r)})}function si(e,r){return new e({type:"bigint",coerce:!0,...m(r)})}function ui(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...m(r)})}function ai(e,r){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...m(r)})}function pi(e,r){return new e({type:"symbol",...m(r)})}function li(e,r){return new e({type:"undefined",...m(r)})}function mi(e,r){return new e({type:"null",...m(r)})}function di(e){return new e({type:"any"})}function fi(e){return new e({type:"unknown"})}function hi(e,r){return new e({type:"never",...m(r)})}function _i(e,r){return new e({type:"void",...m(r)})}function gi(e,r){return new e({type:"date",...m(r)})}function xi(e,r){return new e({type:"date",coerce:!0,...m(r)})}function zi(e,r){return new e({type:"nan",...m(r)})}function J(e,r){return new Wr({check:"less_than",...m(r),value:e,inclusive:!1})}function C(e,r){return new Wr({check:"less_than",...m(r),value:e,inclusive:!0})}function B(e,r){return new Kr({check:"greater_than",...m(r),value:e,inclusive:!1})}function S(e,r){return new Kr({check:"greater_than",...m(r),value:e,inclusive:!0})}function Pt(e){return B(0,e)}function St(e){return J(0,e)}function It(e){return C(0,e)}function Ot(e){return S(0,e)}function ee(e,r){return new fn({check:"multiple_of",...m(r),value:e})}function re(e,r){return new gn({check:"max_size",...m(r),maximum:e})}function V(e,r){return new xn({check:"min_size",...m(r),minimum:e})}function se(e,r){return new zn({check:"size_equals",...m(r),size:e})}function ue(e,r){return new vn({check:"max_length",...m(r),maximum:e})}function q(e,r){return new $n({check:"min_length",...m(r),minimum:e})}function ae(e,r){return new yn({check:"length_equals",...m(r),length:e})}function ye(e,r){return new bn({check:"string_format",format:"regex",...m(r),pattern:e})}function be(e){return new Zn({check:"string_format",format:"lowercase",...m(e)})}function Ze(e){return new wn({check:"string_format",format:"uppercase",...m(e)})}function we(e,r){return new kn({check:"string_format",format:"includes",...m(r),includes:e})}function ke(e,r){return new Pn({check:"string_format",format:"starts_with",...m(r),prefix:e})}function Pe(e,r){return new Sn({check:"string_format",format:"ends_with",...m(r),suffix:e})}function Et(e,r,t){return new In({check:"property",property:e,schema:r,...m(t)})}function Se(e,r){return new On({check:"mime_type",mime:e,...m(r)})}function L(e){return new En({check:"overwrite",tx:e})}function Ie(e){return L((r)=>r.normalize(e))}function Oe(){return L((e)=>e.trim())}function Ee(){return L((e)=>e.toLowerCase())}function Te(){return L((e)=>e.toUpperCase())}function Ne(){return L((e)=>Io(e))}function vi(e,r,t){return new e({type:"array",element:r,...m(t)})}function Pl(e,r,t){return new e({type:"union",options:r,...m(t)})}function Sl(e,r,t){return new e({type:"union",options:r,inclusive:!1,...m(t)})}function Il(e,r,t,o){return new e({type:"union",options:t,discriminator:r,...m(o)})}function Ol(e,r,t){return new e({type:"intersection",left:r,right:t})}function El(e,r,t,o){let n=t instanceof _;return new e({type:"tuple",items:r,rest:n?t:null,...m(n?o:t)})}function Tl(e,r,t,o){return new e({type:"record",keyType:r,valueType:t,...m(o)})}function Nl(e,r,t,o){return new e({type:"map",keyType:r,valueType:t,...m(o)})}function Al(e,r,t){return new e({type:"set",valueType:r,...m(t)})}function jl(e,r,t){let o=Array.isArray(r)?Object.fromEntries(r.map((n)=>[n,n])):r;return new e({type:"enum",entries:o,...m(t)})}function Cl(e,r,t){return new e({type:"enum",entries:r,...m(t)})}function Rl(e,r,t){return new e({type:"literal",values:Array.isArray(r)?r:[r],...m(t)})}function $i(e,r){return new e({type:"file",...m(r)})}function Dl(e,r){return new e({type:"transform",transform:r})}function Ll(e,r){return new e({type:"optional",innerType:r})}function Fl(e,r){return new e({type:"nullable",innerType:r})}function Ul(e,r,t){return new e({type:"default",innerType:r,get defaultValue(){return typeof t==="function"?t():Eo(t)}})}function Ml(e,r,t){return new e({type:"nonoptional",innerType:r,...m(t)})}function Jl(e,r){return new e({type:"success",innerType:r})}function Bl(e,r,t){return new e({type:"catch",innerType:r,catchValue:typeof t==="function"?t:()=>t})}function Vl(e,r,t){return new e({type:"pipe",in:r,out:t})}function Wl(e,r){return new e({type:"readonly",innerType:r})}function Kl(e,r,t){return new e({type:"template_literal",parts:r,...m(t)})}function Gl(e,r){return new e({type:"lazy",getter:r})}function ql(e,r){return new e({type:"promise",innerType:r})}function yi(e,r,t){let o=m(t);return o.abort??(o.abort=!0),new e({type:"custom",check:"custom",fn:r,...o})}function bi(e,r,t){return new e({type:"custom",check:"custom",fn:r,...m(t)})}function Zi(e){let r=Fu((t)=>(t.addIssue=(o)=>{if(typeof o==="string")t.issues.push(fe(o,t.value,r._zod.def));else{let n=o;if(n.fatal)n.continue=!1;n.code??(n.code="custom"),n.input??(n.input=t.value),n.inst??(n.inst=r),n.continue??(n.continue=!r._zod.def.abort),t.issues.push(fe(n))}},e(t.value,t)));return r}function Fu(e,r){let t=new b({check:"custom",...m(r)});return t._zod.check=e,t}function wi(e){let r=new b({check:"describe"});return r._zod.onattach=[(t)=>{let o=N.get(t)??{};N.add(t,{...o,description:e})}],r._zod.check=()=>{},r}function ki(e){let r=new b({check:"meta"});return r._zod.onattach=[(t)=>{let o=N.get(t)??{};N.add(t,{...o,...e})}],r._zod.check=()=>{},r}function Pi(e,r){let t=m(r),o=t.truthy??["true","1","yes","on","y","enabled"],n=t.falsy??["false","0","no","off","n","disabled"];if(t.case!=="sensitive")o=o.map((x)=>typeof x==="string"?x.toLowerCase():x),n=n.map((x)=>typeof x==="string"?x.toLowerCase():x);let c=new Set(o),i=new Set(n),s=e.Codec??nr,a=e.Boolean??tr,l=new(e.String??ie)({type:"string",error:t.error}),d=new a({type:"boolean",error:t.error}),h=new s({type:"pipe",in:l,out:d,transform:(x,k)=>{let F=x;if(t.case!=="sensitive")F=F.toLowerCase();if(c.has(F))return!0;else if(i.has(F))return!1;else return k.issues.push({code:"invalid_value",expected:"stringbool",values:[...c,...i],input:k.value,inst:h,continue:!1}),{}},reverseTransform:(x,k)=>{if(x===!0)return o[0]||"true";else return n[0]||"false"},error:t.error});return h}function Ae(e,r,t,o={}){let n=m(o),c={...m(o),check:"string_format",type:"string",format:r,fn:typeof t==="function"?t:(s)=>t.test(s),...n};if(t instanceof RegExp)c.pattern=t;return new e(c)}var je=()=>{throw Error("JSON Schema conversion is not bundled into this plugin artifact")},Si=()=>je,Tt=()=>je,Ce=je,Z=je,Re=je,De=je;var Xl={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},Ii=(e,r,t,o)=>{let n=t;n.type="string";let{minimum:c,maximum:i,format:s,patterns:a,contentEncoding:p}=e._zod.bag;if(typeof c==="number")n.minLength=c;if(typeof i==="number")n.maxLength=i;if(s){if(n.format=Xl[s]??s,n.format==="")delete n.format;if(s==="time")delete n.format}if(p)n.contentEncoding=p;if(a&&a.size>0){let l=[...a];if(l.length===1)n.pattern=l[0].source;else if(l.length>1)n.allOf=[...l.map((d)=>({...r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0"?{type:"string"}:{},pattern:d.source}))]}},Oi=(e,r,t,o)=>{let n=t,{minimum:c,maximum:i,format:s,multipleOf:a,exclusiveMaximum:p,exclusiveMinimum:l}=e._zod.bag;if(typeof s==="string"&&s.includes("int"))n.type="integer";else n.type="number";if(typeof l==="number")if(r.target==="draft-04"||r.target==="openapi-3.0")n.minimum=l,n.exclusiveMinimum=!0;else n.exclusiveMinimum=l;if(typeof c==="number"){if(n.minimum=c,typeof l==="number"&&r.target!=="draft-04")if(l>=c)delete n.minimum;else delete n.exclusiveMinimum}if(typeof p==="number")if(r.target==="draft-04"||r.target==="openapi-3.0")n.maximum=p,n.exclusiveMaximum=!0;else n.exclusiveMaximum=p;if(typeof i==="number"){if(n.maximum=i,typeof p==="number"&&r.target!=="draft-04")if(p<=i)delete n.maximum;else delete n.exclusiveMaximum}if(typeof a==="number")n.multipleOf=a},Ei=(e,r,t,o)=>{t.type="boolean"},Ti=(e,r,t,o)=>{if(r.unrepresentable==="throw")throw Error("BigInt cannot be represented in JSON Schema")},Ni=(e,r,t,o)=>{if(r.unrepresentable==="throw")throw Error("Symbols cannot be represented in JSON Schema")},Ai=(e,r,t,o)=>{if(r.target==="openapi-3.0")t.type="string",t.nullable=!0,t.enum=[null];else t.type="null"},ji=(e,r,t,o)=>{if(r.unrepresentable==="throw")throw Error("Undefined cannot be represented in JSON Schema")},Ci=(e,r,t,o)=>{if(r.unrepresentable==="throw")throw Error("Void cannot be represented in JSON Schema")},Ri=(e,r,t,o)=>{t.not={}},Di=(e,r,t,o)=>{},Li=(e,r,t,o)=>{},Fi=(e,r,t,o)=>{if(r.unrepresentable==="throw")throw Error("Date cannot be represented in JSON Schema")},Ui=(e,r,t,o)=>{let n=e._zod.def,c=Ke(n.entries);if(c.every((i)=>typeof i==="number"))t.type="number";if(c.every((i)=>typeof i==="string"))t.type="string";t.enum=c},Mi=(e,r,t,o)=>{let n=e._zod.def,c=[];for(let i of n.values)if(i===void 0){if(r.unrepresentable==="throw")throw Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof i==="bigint")if(r.unrepresentable==="throw")throw Error("BigInt literals cannot be represented in JSON Schema");else c.push(Number(i));else c.push(i);if(c.length===0);else if(c.length===1){let i=c[0];if(t.type=i===null?"null":typeof i,r.target==="draft-04"||r.target==="openapi-3.0")t.enum=[i];else t.const=i}else{if(c.every((i)=>typeof i==="number"))t.type="number";if(c.every((i)=>typeof i==="string"))t.type="string";if(c.every((i)=>typeof i==="boolean"))t.type="boolean";if(c.every((i)=>i===null))t.type="null";t.enum=c}},Ji=(e,r,t,o)=>{if(r.unrepresentable==="throw")throw Error("NaN cannot be represented in JSON Schema")},Bi=(e,r,t,o)=>{let n=t,c=e._zod.pattern;if(!c)throw Error("Pattern not found in template literal");n.type="string",n.pattern=c.source},Vi=(e,r,t,o)=>{let n=t,c={type:"string",format:"binary",contentEncoding:"binary"},{minimum:i,maximum:s,mime:a}=e._zod.bag;if(i!==void 0)c.minLength=i;if(s!==void 0)c.maxLength=s;if(a)if(a.length===1)c.contentMediaType=a[0],Object.assign(n,c);else Object.assign(n,c),n.anyOf=a.map((p)=>({contentMediaType:p}));else Object.assign(n,c)},Wi=(e,r,t,o)=>{t.type="boolean"},Ki=(e,r,t,o)=>{if(r.unrepresentable==="throw")throw Error("Custom types cannot be represented in JSON Schema")},Gi=(e,r,t,o)=>{if(r.unrepresentable==="throw")throw Error("Function types cannot be represented in JSON Schema")},qi=(e,r,t,o)=>{if(r.unrepresentable==="throw")throw Error("Transforms cannot be represented in JSON Schema")},Xi=(e,r,t,o)=>{if(r.unrepresentable==="throw")throw Error("Map cannot be represented in JSON Schema")},Yi=(e,r,t,o)=>{if(r.unrepresentable==="throw")throw Error("Set cannot be represented in JSON Schema")},Hi=(e,r,t,o)=>{let n=t,c=e._zod.def,{minimum:i,maximum:s}=e._zod.bag;if(typeof i==="number")n.minItems=i;if(typeof s==="number")n.maxItems=s;n.type="array",n.items=Z(c.element,r,{...o,path:[...o.path,"items"]})},Qi=(e,r,t,o)=>{let n=t,c=e._zod.def;n.type="object",n.properties={};let i=c.shape;for(let p in i)n.properties[p]=Z(i[p],r,{...o,path:[...o.path,"properties",p]});let s=new Set(Object.keys(i)),a=new Set([...s].filter((p)=>{let l=c.shape[p]._zod;if(r.io==="input")return l.optin===void 0;else return l.optout===void 0}));if(a.size>0)n.required=Array.from(a);if(c.catchall?._zod.def.type==="never")n.additionalProperties=!1;else if(!c.catchall){if(r.io==="output")n.additionalProperties=!1}else if(c.catchall)n.additionalProperties=Z(c.catchall,r,{...o,path:[...o.path,"additionalProperties"]})},At=(e,r,t,o)=>{let n=e._zod.def,c=n.inclusive===!1,i=n.options.map((s,a)=>Z(s,r,{...o,path:[...o.path,c?"oneOf":"anyOf",a]}));if(c)t.oneOf=i;else t.anyOf=i},es=(e,r,t,o)=>{let n=e._zod.def,c=Z(n.left,r,{...o,path:[...o.path,"allOf",0]}),i=Z(n.right,r,{...o,path:[...o.path,"allOf",1]}),s=(p)=>("allOf"in p)&&Object.keys(p).length===1,a=[...s(c)?c.allOf:[c],...s(i)?i.allOf:[i]];t.allOf=a},rs=(e,r,t,o)=>{let n=t,c=e._zod.def;n.type="array";let i=r.target==="draft-2020-12"?"prefixItems":"items",s=r.target==="draft-2020-12"?"items":r.target==="openapi-3.0"?"items":"additionalItems",a=c.items.map((h,x)=>Z(h,r,{...o,path:[...o.path,i,x]})),p=c.rest?Z(c.rest,r,{...o,path:[...o.path,s,...r.target==="openapi-3.0"?[c.items.length]:[]]}):null;if(r.target==="draft-2020-12"){if(n.prefixItems=a,p)n.items=p}else if(r.target==="openapi-3.0"){if(n.items={anyOf:a},p)n.items.anyOf.push(p);if(n.minItems=a.length,!p)n.maxItems=a.length}else if(n.items=a,p)n.additionalItems=p;let{minimum:l,maximum:d}=e._zod.bag;if(typeof l==="number")n.minItems=l;if(typeof d==="number")n.maxItems=d},ts=(e,r,t,o)=>{let n=t,c=e._zod.def;n.type="object";let i=c.keyType,a=i._zod.bag?.patterns;if(c.mode==="loose"&&a&&a.size>0){let l=Z(c.valueType,r,{...o,path:[...o.path,"patternProperties","*"]});n.patternProperties={};for(let d of a)n.patternProperties[d.source]=l}else{if(r.target==="draft-07"||r.target==="draft-2020-12")n.propertyNames=Z(c.keyType,r,{...o,path:[...o.path,"propertyNames"]});n.additionalProperties=Z(c.valueType,r,{...o,path:[...o.path,"additionalProperties"]})}let p=i._zod.values;if(p){let l=[...p].filter((d)=>typeof d==="string"||typeof d==="number");if(l.length>0)n.required=l}},os=(e,r,t,o)=>{let n=e._zod.def,c=Z(n.innerType,r,o),i=r.seen.get(e);if(r.target==="openapi-3.0")i.ref=n.innerType,t.nullable=!0;else t.anyOf=[c,{type:"null"}]},ns=(e,r,t,o)=>{let n=e._zod.def;Z(n.innerType,r,o);let c=r.seen.get(e);c.ref=n.innerType},cs=(e,r,t,o)=>{let n=e._zod.def;Z(n.innerType,r,o);let c=r.seen.get(e);c.ref=n.innerType,t.default=JSON.parse(JSON.stringify(n.defaultValue))},is=(e,r,t,o)=>{let n=e._zod.def;Z(n.innerType,r,o);let c=r.seen.get(e);if(c.ref=n.innerType,r.io==="input")t._prefault=JSON.parse(JSON.stringify(n.defaultValue))},ss=(e,r,t,o)=>{let n=e._zod.def;Z(n.innerType,r,o);let c=r.seen.get(e);c.ref=n.innerType;let i;try{i=n.catchValue(void 0)}catch{throw Error("Dynamic catch values are not supported in JSON Schema")}t.default=i},us=(e,r,t,o)=>{let n=e._zod.def,c=r.io==="input"?n.in._zod.def.type==="transform"?n.out:n.in:n.out;Z(c,r,o);let i=r.seen.get(e);i.ref=c},as=(e,r,t,o)=>{let n=e._zod.def;Z(n.innerType,r,o);let c=r.seen.get(e);c.ref=n.innerType,t.readOnly=!0},ps=(e,r,t,o)=>{let n=e._zod.def;Z(n.innerType,r,o);let c=r.seen.get(e);c.ref=n.innerType},jt=(e,r,t,o)=>{let n=e._zod.def;Z(n.innerType,r,o);let c=r.seen.get(e);c.ref=n.innerType},ls=(e,r,t,o)=>{let n=e._zod.innerType;Z(n,r,o);let c=r.seen.get(e);c.ref=n},Nt={string:Ii,number:Oi,boolean:Ei,bigint:Ti,symbol:Ni,null:Ai,undefined:ji,void:Ci,never:Ri,any:Di,unknown:Li,date:Fi,enum:Ui,literal:Mi,nan:Ji,template_literal:Bi,file:Vi,success:Wi,custom:Ki,function:Gi,transform:qi,map:Xi,set:Yi,array:Hi,object:Qi,union:At,intersection:es,tuple:rs,record:ts,nullable:os,nonoptional:ns,default:cs,prefault:is,catch:ss,pipe:us,readonly:as,promise:ps,optional:jt,lazy:ls};function ar(e,r){if("_idmap"in e){let o=e,n=Ce({...r,processors:Nt}),c={};for(let a of o._idmap.entries()){let[p,l]=a;Z(l,n)}let i={},s={registry:o,uri:r?.uri,defs:c};n.external=s;for(let a of o._idmap.entries()){let[p,l]=a;Re(n,l),i[p]=De(n,l)}if(Object.keys(c).length>0){let a=n.target==="draft-2020-12"?"$defs":"definitions";i.__shared={[a]:c}}return{schemas:i}}let t=Ce({...r,processors:Nt});return Z(e,t),Re(t,e),De(t,e)}class ms{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(e){this.ctx.counter=e}get seen(){return this.ctx.seen}constructor(e){let r=e?.target??"draft-2020-12";if(r==="draft-4")r="draft-04";if(r==="draft-7")r="draft-07";this.ctx=Ce({processors:Nt,target:r,...e?.metadata&&{metadata:e.metadata},...e?.unrepresentable&&{unrepresentable:e.unrepresentable},...e?.override&&{override:e.override},...e?.io&&{io:e.io}})}process(e,r={path:[],schemaPath:[]}){return Z(e,this.ctx,r)}emit(e,r){if(r){if(r.cycles)this.ctx.cycles=r.cycles;if(r.reused)this.ctx.reused=r.reused;if(r.external)this.ctx.external=r.external}Re(this.ctx,e);let t=De(this.ctx,e),{"~standard":o,...n}=t;return n}}var Uu={};var fr={};te(fr,{ZodISODate:()=>lr,ZodISODateTime:()=>pr,ZodISODuration:()=>dr,ZodISOTime:()=>mr,date:()=>fs,datetime:()=>ds,duration:()=>_s,time:()=>hs});var pr=u("ZodISODateTime",(e,r)=>{Vn.init(e,r),y.init(e,r)});function ds(e){return Kc(pr,e)}var lr=u("ZodISODate",(e,r)=>{Wn.init(e,r),y.init(e,r)});function fs(e){return Gc(lr,e)}var mr=u("ZodISOTime",(e,r)=>{Kn.init(e,r),y.init(e,r)});function hs(e){return qc(mr,e)}var dr=u("ZodISODuration",(e,r)=>{Gn.init(e,r),y.init(e,r)});function _s(e){return Xc(dr,e)}var Ju=(e,r)=>{He.init(e,r),e.name="ZodError",Object.defineProperties(e,{format:{value:(t)=>_e(e,t)},flatten:{value:(t)=>he(e,t)},addIssue:{value:(t)=>{e.issues.push(t),e.message=JSON.stringify(e.issues,me,2)}},addIssues:{value:(t)=>{e.issues.push(...t),e.message=JSON.stringify(e.issues,me,2)}},isEmpty:{get(){return e.issues.length===0}}})},Bu=u("ZodError",Ju),I=u("ZodError",Ju,{Parent:Error});var Ct=ge(I),Rt=xe(I),Dt=ze(I),Lt=ve(I),Ft=Rr(I),Ut=Dr(I),Mt=Lr(I),Jt=Fr(I),Bt=Ur(I),Vt=Mr(I),Wt=Jr(I),Kt=Br(I);var g=u("ZodType",(e,r)=>(_.init(e,r),Object.assign(e["~standard"],{jsonSchema:{input:Tt(e,"input"),output:Tt(e,"output")}}),e.toJSONSchema=Si(e,{}),e.def=r,e.type=r.type,Object.defineProperty(e,"_def",{value:r}),e.check=(...t)=>e.clone(f.mergeDefs(r,{checks:[...r.checks??[],...t.map((o)=>typeof o==="function"?{_zod:{check:o,def:{check:"custom"},onattach:[]}}:o)]}),{parent:!0}),e.with=e.check,e.clone=(t,o)=>P(e,t,o),e.brand=()=>e,e.register=(t,o)=>(t.add(e,o),e),e.parse=(t,o)=>Ct(e,t,o,{callee:e.parse}),e.safeParse=(t,o)=>Dt(e,t,o),e.parseAsync=async(t,o)=>Rt(e,t,o,{callee:e.parseAsync}),e.safeParseAsync=async(t,o)=>Lt(e,t,o),e.spa=e.safeParseAsync,e.encode=(t,o)=>Ft(e,t,o),e.decode=(t,o)=>Ut(e,t,o),e.encodeAsync=async(t,o)=>Mt(e,t,o),e.decodeAsync=async(t,o)=>Jt(e,t,o),e.safeEncode=(t,o)=>Bt(e,t,o),e.safeDecode=(t,o)=>Vt(e,t,o),e.safeEncodeAsync=async(t,o)=>Wt(e,t,o),e.safeDecodeAsync=async(t,o)=>Kt(e,t,o),e.refine=(t,o)=>e.check(iu(t,o)),e.superRefine=(t)=>e.check(su(t)),e.overwrite=(t)=>e.check(L(t)),e.optional=()=>_r(e),e.exactOptional=()=>Ms(e),e.nullable=()=>gr(e),e.nullish=()=>_r(gr(e)),e.nonoptional=(t)=>Gs(e,t),e.array=()=>$r(e),e.or=(t)=>_o([e,t]),e.and=(t)=>Ts(e,t),e.transform=(t)=>xr(e,xo(t)),e.default=(t)=>Vs(e,t),e.prefault=(t)=>Ks(e,t),e.catch=(t)=>Ys(e,t),e.pipe=(t)=>xr(e,t),e.readonly=()=>eu(e),e.describe=(t)=>{let o=e.clone();return N.add(o,{description:t}),o},Object.defineProperty(e,"description",{get(){return N.get(e)?.description},configurable:!0}),e.meta=(...t)=>{if(t.length===0)return N.get(e);let o=e.clone();return N.add(o,t[0]),o},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e.apply=(t)=>t(e),e)),Xt=u("_ZodString",(e,r)=>{ie.init(e,r),g.init(e,r),e._zod.processJSONSchema=(o,n,c)=>Ii(e,o,n,c);let t=e._zod.bag;e.format=t.format??null,e.minLength=t.minimum??null,e.maxLength=t.maximum??null,e.regex=(...o)=>e.check(ye(...o)),e.includes=(...o)=>e.check(we(...o)),e.startsWith=(...o)=>e.check(ke(...o)),e.endsWith=(...o)=>e.check(Pe(...o)),e.min=(...o)=>e.check(q(...o)),e.max=(...o)=>e.check(ue(...o)),e.length=(...o)=>e.check(ae(...o)),e.nonempty=(...o)=>e.check(q(1,...o)),e.lowercase=(o)=>e.check(be(o)),e.uppercase=(o)=>e.check(Ze(o)),e.trim=()=>e.check(Oe()),e.normalize=(...o)=>e.check(Ie(...o)),e.toLowerCase=()=>e.check(Ee()),e.toUpperCase=()=>e.check(Te()),e.slugify=()=>e.check(Ne())}),Fe=u("ZodString",(e,r)=>{ie.init(e,r),Xt.init(e,r),e.email=(t)=>e.check(it(Yt,t)),e.url=(t)=>e.check(ur(zr,t)),e.jwt=(t)=>e.check(wt(mo,t)),e.emoji=(t)=>e.check(lt(Ht,t)),e.guid=(t)=>e.check(sr(hr,t)),e.uuid=(t)=>e.check(st(K,t)),e.uuidv4=(t)=>e.check(ut(K,t)),e.uuidv6=(t)=>e.check(at(K,t)),e.uuidv7=(t)=>e.check(pt(K,t)),e.nanoid=(t)=>e.check(mt(Qt,t)),e.guid=(t)=>e.check(sr(hr,t)),e.cuid=(t)=>e.check(dt(eo,t)),e.cuid2=(t)=>e.check(ft(ro,t)),e.ulid=(t)=>e.check(ht(to,t)),e.base64=(t)=>e.check(yt(ao,t)),e.base64url=(t)=>e.check(bt(po,t)),e.xid=(t)=>e.check(_t(oo,t)),e.ksuid=(t)=>e.check(gt(no,t)),e.ipv4=(t)=>e.check(xt(co,t)),e.ipv6=(t)=>e.check(zt(io,t)),e.cidrv4=(t)=>e.check(vt(so,t)),e.cidrv6=(t)=>e.check($t(uo,t)),e.e164=(t)=>e.check(Zt(lo,t)),e.datetime=(t)=>e.check(ds(t)),e.date=(t)=>e.check(fs(t)),e.time=(t)=>e.check(hs(t)),e.duration=(t)=>e.check(_s(t))});function Gt(e){return Bc(Fe,e)}var y=u("ZodStringFormat",(e,r)=>{v.init(e,r),Xt.init(e,r)}),Yt=u("ZodEmail",(e,r)=>{Cn.init(e,r),y.init(e,r)});function Vu(e){return it(Yt,e)}var hr=u("ZodGUID",(e,r)=>{An.init(e,r),y.init(e,r)});function Wu(e){return sr(hr,e)}var K=u("ZodUUID",(e,r)=>{jn.init(e,r),y.init(e,r)});function Ku(e){return st(K,e)}function Gu(e){return ut(K,e)}function qu(e){return at(K,e)}function Xu(e){return pt(K,e)}var zr=u("ZodURL",(e,r)=>{Rn.init(e,r),y.init(e,r)});function Yu(e){return ur(zr,e)}function Hu(e){return ur(zr,{protocol:/^https?$/,hostname:j.domain,...f.normalizeParams(e)})}var Ht=u("ZodEmoji",(e,r)=>{Dn.init(e,r),y.init(e,r)});function Qu(e){return lt(Ht,e)}var Qt=u("ZodNanoID",(e,r)=>{Ln.init(e,r),y.init(e,r)});function ea(e){return mt(Qt,e)}var eo=u("ZodCUID",(e,r)=>{Fn.init(e,r),y.init(e,r)});function ra(e){return dt(eo,e)}var ro=u("ZodCUID2",(e,r)=>{Un.init(e,r),y.init(e,r)});function ta(e){return ft(ro,e)}var to=u("ZodULID",(e,r)=>{Mn.init(e,r),y.init(e,r)});function oa(e){return ht(to,e)}var oo=u("ZodXID",(e,r)=>{Jn.init(e,r),y.init(e,r)});function na(e){return _t(oo,e)}var no=u("ZodKSUID",(e,r)=>{Bn.init(e,r),y.init(e,r)});function ca(e){return gt(no,e)}var co=u("ZodIPv4",(e,r)=>{qn.init(e,r),y.init(e,r)});function ia(e){return xt(co,e)}var gs=u("ZodMAC",(e,r)=>{Yn.init(e,r),y.init(e,r)});function sa(e){return Wc(gs,e)}var io=u("ZodIPv6",(e,r)=>{Xn.init(e,r),y.init(e,r)});function ua(e){return zt(io,e)}var so=u("ZodCIDRv4",(e,r)=>{Hn.init(e,r),y.init(e,r)});function aa(e){return vt(so,e)}var uo=u("ZodCIDRv6",(e,r)=>{Qn.init(e,r),y.init(e,r)});function pa(e){return $t(uo,e)}var ao=u("ZodBase64",(e,r)=>{rc.init(e,r),y.init(e,r)});function la(e){return yt(ao,e)}var po=u("ZodBase64URL",(e,r)=>{tc.init(e,r),y.init(e,r)});function ma(e){return bt(po,e)}var lo=u("ZodE164",(e,r)=>{oc.init(e,r),y.init(e,r)});function da(e){return Zt(lo,e)}var mo=u("ZodJWT",(e,r)=>{nc.init(e,r),y.init(e,r)});function fa(e){return wt(mo,e)}var Ue=u("ZodCustomStringFormat",(e,r)=>{cc.init(e,r),y.init(e,r)});function ha(e,r,t={}){return Ae(Ue,e,r,t)}function _a(e){return Ae(Ue,"hostname",j.hostname,e)}function ga(e){return Ae(Ue,"hex",j.hex,e)}function xa(e,r){let t=r?.enc??"hex",o=`${e}_${t}`,n=j[o];if(!n)throw Error(`Unrecognized hash format: ${o}`);return Ae(Ue,o,n,r)}var Me=u("ZodNumber",(e,r)=>{et.init(e,r),g.init(e,r),e._zod.processJSONSchema=(o,n,c)=>Oi(e,o,n,c),e.gt=(o,n)=>e.check(B(o,n)),e.gte=(o,n)=>e.check(S(o,n)),e.min=(o,n)=>e.check(S(o,n)),e.lt=(o,n)=>e.check(J(o,n)),e.lte=(o,n)=>e.check(C(o,n)),e.max=(o,n)=>e.check(C(o,n)),e.int=(o)=>e.check(qt(o)),e.safe=(o)=>e.check(qt(o)),e.positive=(o)=>e.check(B(0,o)),e.nonnegative=(o)=>e.check(S(0,o)),e.negative=(o)=>e.check(J(0,o)),e.nonpositive=(o)=>e.check(C(0,o)),e.multipleOf=(o,n)=>e.check(ee(o,n)),e.step=(o,n)=>e.check(ee(o,n)),e.finite=()=>e;let t=e._zod.bag;e.minValue=Math.max(t.minimum??Number.NEGATIVE_INFINITY,t.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(t.maximum??Number.POSITIVE_INFINITY,t.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(t.format??"").includes("int")||Number.isSafeInteger(t.multipleOf??0.5),e.isFinite=!0,e.format=t.format??null});function xs(e){return Yc(Me,e)}var le=u("ZodNumberFormat",(e,r)=>{ic.init(e,r),Me.init(e,r)});function qt(e){return Qc(le,e)}function za(e){return ei(le,e)}function va(e){return ri(le,e)}function $a(e){return ti(le,e)}function ya(e){return oi(le,e)}var Je=u("ZodBoolean",(e,r)=>{tr.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Ei(e,t,o,n)});function zs(e){return ni(Je,e)}var Be=u("ZodBigInt",(e,r)=>{rt.init(e,r),g.init(e,r),e._zod.processJSONSchema=(o,n,c)=>Ti(e,o,n,c),e.gte=(o,n)=>e.check(S(o,n)),e.min=(o,n)=>e.check(S(o,n)),e.gt=(o,n)=>e.check(B(o,n)),e.gte=(o,n)=>e.check(S(o,n)),e.min=(o,n)=>e.check(S(o,n)),e.lt=(o,n)=>e.check(J(o,n)),e.lte=(o,n)=>e.check(C(o,n)),e.max=(o,n)=>e.check(C(o,n)),e.positive=(o)=>e.check(B(BigInt(0),o)),e.negative=(o)=>e.check(J(BigInt(0),o)),e.nonpositive=(o)=>e.check(C(BigInt(0),o)),e.nonnegative=(o)=>e.check(S(BigInt(0),o)),e.multipleOf=(o,n)=>e.check(ee(o,n));let t=e._zod.bag;e.minValue=t.minimum??null,e.maxValue=t.maximum??null,e.format=t.format??null});function ba(e){return ii(Be,e)}var fo=u("ZodBigIntFormat",(e,r)=>{sc.init(e,r),Be.init(e,r)});function Za(e){return ui(fo,e)}function wa(e){return ai(fo,e)}var vs=u("ZodSymbol",(e,r)=>{uc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Ni(e,t,o,n)});function ka(e){return pi(vs,e)}var $s=u("ZodUndefined",(e,r)=>{ac.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>ji(e,t,o,n)});function Pa(e){return li($s,e)}var ys=u("ZodNull",(e,r)=>{pc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Ai(e,t,o,n)});function bs(e){return mi(ys,e)}var Zs=u("ZodAny",(e,r)=>{lc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Di(e,t,o,n)});function Sa(){return di(Zs)}var ws=u("ZodUnknown",(e,r)=>{mc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Li(e,t,o,n)});function pe(){return fi(ws)}var ks=u("ZodNever",(e,r)=>{dc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Ri(e,t,o,n)});function ho(e){return hi(ks,e)}var Ps=u("ZodVoid",(e,r)=>{fc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Ci(e,t,o,n)});function Ia(e){return _i(Ps,e)}var vr=u("ZodDate",(e,r)=>{hc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(o,n,c)=>Fi(e,o,n,c),e.min=(o,n)=>e.check(S(o,n)),e.max=(o,n)=>e.check(C(o,n));let t=e._zod.bag;e.minDate=t.minimum?new Date(t.minimum):null,e.maxDate=t.maximum?new Date(t.maximum):null});function Oa(e){return gi(vr,e)}var Ss=u("ZodArray",(e,r)=>{_c.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Hi(e,t,o,n),e.element=r.element,e.min=(t,o)=>e.check(q(t,o)),e.nonempty=(t)=>e.check(q(1,t)),e.max=(t,o)=>e.check(ue(t,o)),e.length=(t,o)=>e.check(ae(t,o)),e.unwrap=()=>e.element});function $r(e,r){return vi(Ss,e,r)}function Ea(e){let r=e._zod.def.shape;return go(Object.keys(r))}var yr=u("ZodObject",(e,r)=>{gc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Qi(e,t,o,n),f.defineLazy(e,"shape",()=>r.shape),e.keyof=()=>go(Object.keys(e._zod.def.shape)),e.catchall=(t)=>e.clone({...e._zod.def,catchall:t}),e.passthrough=()=>e.clone({...e._zod.def,catchall:pe()}),e.loose=()=>e.clone({...e._zod.def,catchall:pe()}),e.strict=()=>e.clone({...e._zod.def,catchall:ho()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=(t)=>f.extend(e,t),e.safeExtend=(t)=>f.safeExtend(e,t),e.merge=(t)=>f.merge(e,t),e.pick=(t)=>f.pick(e,t),e.omit=(t)=>f.omit(e,t),e.partial=(...t)=>f.partial(zo,e,t[0]),e.required=(...t)=>f.required(vo,e,t[0])});function Ta(e,r){let t={type:"object",shape:e??{},...f.normalizeParams(r)};return new yr(t)}function Na(e,r){return new yr({type:"object",shape:e,catchall:ho(),...f.normalizeParams(r)})}function Aa(e,r){return new yr({type:"object",shape:e,catchall:pe(),...f.normalizeParams(r)})}var br=u("ZodUnion",(e,r)=>{or.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>At(e,t,o,n),e.options=r.options});function _o(e,r){return new br({type:"union",options:e,...f.normalizeParams(r)})}var Is=u("ZodXor",(e,r)=>{br.init(e,r),xc.init(e,r),e._zod.processJSONSchema=(t,o,n)=>At(e,t,o,n),e.options=r.options});function ja(e,r){return new Is({type:"union",options:e,inclusive:!1,...f.normalizeParams(r)})}var Os=u("ZodDiscriminatedUnion",(e,r)=>{br.init(e,r),zc.init(e,r)});function Ca(e,r,t){return new Os({type:"union",options:r,discriminator:e,...f.normalizeParams(t)})}var Es=u("ZodIntersection",(e,r)=>{vc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>es(e,t,o,n)});function Ts(e,r){return new Es({type:"intersection",left:e,right:r})}var Ns=u("ZodTuple",(e,r)=>{tt.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>rs(e,t,o,n),e.rest=(t)=>e.clone({...e._zod.def,rest:t})});function As(e,r,t){let o=r instanceof _,n=o?t:r;return new Ns({type:"tuple",items:e,rest:o?r:null,...f.normalizeParams(n)})}var Zr=u("ZodRecord",(e,r)=>{$c.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>ts(e,t,o,n),e.keyType=r.keyType,e.valueType=r.valueType});function js(e,r,t){return new Zr({type:"record",keyType:e,valueType:r,...f.normalizeParams(t)})}function Ra(e,r,t){let o=P(e);return o._zod.values=void 0,new Zr({type:"record",keyType:o,valueType:r,...f.normalizeParams(t)})}function Da(e,r,t){return new Zr({type:"record",keyType:e,valueType:r,mode:"loose",...f.normalizeParams(t)})}var Cs=u("ZodMap",(e,r)=>{yc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Xi(e,t,o,n),e.keyType=r.keyType,e.valueType=r.valueType,e.min=(...t)=>e.check(V(...t)),e.nonempty=(t)=>e.check(V(1,t)),e.max=(...t)=>e.check(re(...t)),e.size=(...t)=>e.check(se(...t))});function La(e,r,t){return new Cs({type:"map",keyType:e,valueType:r,...f.normalizeParams(t)})}var Rs=u("ZodSet",(e,r)=>{bc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Yi(e,t,o,n),e.min=(...t)=>e.check(V(...t)),e.nonempty=(t)=>e.check(V(1,t)),e.max=(...t)=>e.check(re(...t)),e.size=(...t)=>e.check(se(...t))});function Fa(e,r){return new Rs({type:"set",valueType:e,...f.normalizeParams(r)})}var Le=u("ZodEnum",(e,r)=>{Zc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(o,n,c)=>Ui(e,o,n,c),e.enum=r.entries,e.options=Object.values(r.entries);let t=new Set(Object.keys(r.entries));e.extract=(o,n)=>{let c={};for(let i of o)if(t.has(i))c[i]=r.entries[i];else throw Error(`Key ${i} not found in enum`);return new Le({...r,checks:[],...f.normalizeParams(n),entries:c})},e.exclude=(o,n)=>{let c={...r.entries};for(let i of o)if(t.has(i))delete c[i];else throw Error(`Key ${i} not found in enum`);return new Le({...r,checks:[],...f.normalizeParams(n),entries:c})}});function go(e,r){let t=Array.isArray(e)?Object.fromEntries(e.map((o)=>[o,o])):e;return new Le({type:"enum",entries:t,...f.normalizeParams(r)})}function Ua(e,r){return new Le({type:"enum",entries:e,...f.normalizeParams(r)})}var Ds=u("ZodLiteral",(e,r)=>{wc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Mi(e,t,o,n),e.values=new Set(r.values),Object.defineProperty(e,"value",{get(){if(r.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return r.values[0]}})});function Ma(e,r){return new Ds({type:"literal",values:Array.isArray(e)?e:[e],...f.normalizeParams(r)})}var Ls=u("ZodFile",(e,r)=>{kc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Vi(e,t,o,n),e.min=(t,o)=>e.check(V(t,o)),e.max=(t,o)=>e.check(re(t,o)),e.mime=(t,o)=>e.check(Se(Array.isArray(t)?t:[t],o))});function Ja(e){return $i(Ls,e)}var Fs=u("ZodTransform",(e,r)=>{Pc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>qi(e,t,o,n),e._zod.parse=(t,o)=>{if(o.direction==="backward")throw new oe(e.constructor.name);t.addIssue=(c)=>{if(typeof c==="string")t.issues.push(f.issue(c,t.value,r));else{let i=c;if(i.fatal)i.continue=!1;i.code??(i.code="custom"),i.input??(i.input=t.value),i.inst??(i.inst=e),t.issues.push(f.issue(i))}};let n=r.transform(t.value,t);if(n instanceof Promise)return n.then((c)=>(t.value=c,t));return t.value=n,t}});function xo(e){return new Fs({type:"transform",transform:e})}var zo=u("ZodOptional",(e,r)=>{ot.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>jt(e,t,o,n),e.unwrap=()=>e._zod.def.innerType});function _r(e){return new zo({type:"optional",innerType:e})}var Us=u("ZodExactOptional",(e,r)=>{Sc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>jt(e,t,o,n),e.unwrap=()=>e._zod.def.innerType});function Ms(e){return new Us({type:"optional",innerType:e})}var Js=u("ZodNullable",(e,r)=>{Ic.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>os(e,t,o,n),e.unwrap=()=>e._zod.def.innerType});function gr(e){return new Js({type:"nullable",innerType:e})}function Ba(e){return _r(gr(e))}var Bs=u("ZodDefault",(e,r)=>{Oc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>cs(e,t,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Vs(e,r){return new Bs({type:"default",innerType:e,get defaultValue(){return typeof r==="function"?r():f.shallowClone(r)}})}var Ws=u("ZodPrefault",(e,r)=>{Ec.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>is(e,t,o,n),e.unwrap=()=>e._zod.def.innerType});function Ks(e,r){return new Ws({type:"prefault",innerType:e,get defaultValue(){return typeof r==="function"?r():f.shallowClone(r)}})}var vo=u("ZodNonOptional",(e,r)=>{Tc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>ns(e,t,o,n),e.unwrap=()=>e._zod.def.innerType});function Gs(e,r){return new vo({type:"nonoptional",innerType:e,...f.normalizeParams(r)})}var qs=u("ZodSuccess",(e,r)=>{Nc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Wi(e,t,o,n),e.unwrap=()=>e._zod.def.innerType});function Va(e){return new qs({type:"success",innerType:e})}var Xs=u("ZodCatch",(e,r)=>{Ac.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>ss(e,t,o,n),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ys(e,r){return new Xs({type:"catch",innerType:e,catchValue:typeof r==="function"?r:()=>r})}var Hs=u("ZodNaN",(e,r)=>{jc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Ji(e,t,o,n)});function Wa(e){return zi(Hs,e)}var $o=u("ZodPipe",(e,r)=>{Cc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>us(e,t,o,n),e.in=r.in,e.out=r.out});function xr(e,r){return new $o({type:"pipe",in:e,out:r})}var yo=u("ZodCodec",(e,r)=>{$o.init(e,r),nr.init(e,r)});function Ka(e,r,t){return new yo({type:"pipe",in:e,out:r,transform:t.decode,reverseTransform:t.encode})}var Qs=u("ZodReadonly",(e,r)=>{Rc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>as(e,t,o,n),e.unwrap=()=>e._zod.def.innerType});function eu(e){return new Qs({type:"readonly",innerType:e})}var ru=u("ZodTemplateLiteral",(e,r)=>{Dc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Bi(e,t,o,n)});function Ga(e,r){return new ru({type:"template_literal",parts:e,...f.normalizeParams(r)})}var tu=u("ZodLazy",(e,r)=>{Uc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>ls(e,t,o,n),e.unwrap=()=>e._zod.def.getter()});function ou(e){return new tu({type:"lazy",getter:e})}var nu=u("ZodPromise",(e,r)=>{Fc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>ps(e,t,o,n),e.unwrap=()=>e._zod.def.innerType});function qa(e){return new nu({type:"promise",innerType:e})}var cu=u("ZodFunction",(e,r)=>{Lc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Gi(e,t,o,n)});function Xa(e){return new cu({type:"function",input:Array.isArray(e?.input)?As(e?.input):e?.input??$r(pe()),output:e?.output??pe()})}var wr=u("ZodCustom",(e,r)=>{Mc.init(e,r),g.init(e,r),e._zod.processJSONSchema=(t,o,n)=>Ki(e,t,o,n)});function Ya(e){let r=new b({check:"custom"});return r._zod.check=e,r}function Ha(e,r){return yi(wr,e??(()=>!0),r)}function iu(e,r={}){return bi(wr,e,r)}function su(e){return Zi(e)}var Qa=wi,ep=ki;function rp(e,r={}){let t=new wr({type:"custom",check:"custom",fn:(o)=>o instanceof e,abort:!0,...f.normalizeParams(r)});return t._zod.bag.Class=e,t._zod.check=(o)=>{if(!(o.value instanceof e))o.issues.push({code:"invalid_type",expected:e.name,input:o.value,inst:t,path:[...t._zod.def.path??[]]})},t}var tp=(...e)=>Pi({Codec:yo,Boolean:Je,String:Fe},...e);function op(e){let r=ou(()=>_o([Gt(e),xs(),zs(),bs(),$r(r),js(Gt(),r)]));return r}function np(e,r){return xr(xo(e),r)}var cp={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 ip(e){w({customError:e})}function sp(){return w().customError}var bo;(function(e){})(bo||(bo={}));var em=()=>{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(n){return e[n]??null}let t={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(n)=>{switch(n.code){case"invalid_type":{let c=o[n.expected]??n.expected,i=Co(n.input),s=o[i]??i;return`Invalid input: expected ${c}, received ${s}`}case"invalid_value":if(n.values.length===1)return`Invalid input: expected ${Tr(n.values[0])}`;return`Invalid option: expected one of ${Ir(n.values,"|")}`;case"too_big":{let c=n.inclusive?"<=":"<",i=r(n.origin);if(i)return`Too big: expected ${n.origin??"value"} to have ${c}${n.maximum.toString()} ${i.unit??"elements"}`;return`Too big: expected ${n.origin??"value"} to be ${c}${n.maximum.toString()}`}case"too_small":{let c=n.inclusive?">=":">",i=r(n.origin);if(i)return`Too small: expected ${n.origin} to have ${c}${n.minimum.toString()} ${i.unit}`;return`Too small: expected ${n.origin} to be ${c}${n.minimum.toString()}`}case"invalid_format":{let c=n;if(c.format==="starts_with")return`Invalid string: must start with "${c.prefix}"`;if(c.format==="ends_with")return`Invalid string: must end with "${c.suffix}"`;if(c.format==="includes")return`Invalid string: must include "${c.includes}"`;if(c.format==="regex")return`Invalid string: must match pattern ${c.pattern}`;return`Invalid ${t[c.format]??n.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${n.divisor}`;case"unrecognized_keys":return`Unrecognized key${n.keys.length>1?"s":""}: ${Ir(n.keys,", ")}`;case"invalid_key":return`Invalid key in ${n.origin}`;case"invalid_union":return"Invalid input";case"invalid_element":return`Invalid value in ${n.origin}`;default:return"Invalid input"}}};function uu(){return{localeError:em()}}var au=()=>{throw Error("JSON Schema conversion is not bundled into this plugin artifact")};var Zo={};te(Zo,{bigint:()=>nm,boolean:()=>om,date:()=>cm,number:()=>tm,string:()=>rm});function rm(e){return Vc(Fe,e)}function tm(e){return Hc(Me,e)}function om(e){return ci(Je,e)}function nm(e){return si(Be,e)}function cm(e){return xi(vr,e)}w(uu());var sm=wo;
|