@hiai-gg/docsmint 1.0.3 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -4
- package/dist/backend/index.js +14297 -12972
- package/dist/frontend/{CategoryDialog-B1yQFy54.js → CategoryDialog-CJeAYxcd.js} +7 -7
- package/dist/frontend/{ConfirmDialog-9N3dJGHt.js → ConfirmDialog-B1MjKlVQ.js} +5 -5
- package/dist/frontend/{CreateSnapshotDialog-CR5BHpsb.js → CreateSnapshotDialog-BTMoPFdj.js} +4 -4
- package/dist/frontend/{DatePicker-B7p5pH4-.js → DatePicker-Bmjko3X7.js} +12 -12
- package/dist/frontend/{DeleteDialog-BqR7AQrP.js → DeleteDialog-BkfIeKXO.js} +3 -3
- package/dist/frontend/{FolderNode-BQcEuZe3.js → FolderNode-Do8pIfyA.js} +4 -4
- package/dist/frontend/{FolderTreeSelector-DqO-f0nt.js → FolderTreeSelector-FyxhcHjr.js} +3 -3
- package/dist/frontend/{HiAiEditor-BFpfeft6.js → HiAiEditor-DDpfdQEg.js} +38 -38
- package/dist/frontend/{Icon-y7xxAIC6.js → Icon-3EYzvNyk.js} +1 -1
- package/dist/frontend/{SettingsDialog-eyTOtZcw.js → SettingsDialog-DzlYW50I.js} +18 -18
- package/dist/frontend/{ShareDialog-gCbk5Rrv.js → ShareDialog-Ddvl7xvb.js} +1 -1
- package/dist/frontend/{Sidebar-3ridIx_X.js → Sidebar-rFiVen96.js} +29 -29
- package/dist/frontend/{TagCreateDialog-B0M1gqk6.js → TagCreateDialog-DQmMJe_E.js} +5 -5
- package/dist/frontend/api/categories.js +1 -1
- package/dist/frontend/api/settings.js +1 -1
- package/dist/frontend/api/tags.js +1 -1
- package/dist/frontend/app-shell.js +6 -6
- package/dist/frontend/{auth-client-DuY45VqK.js → auth-client-CXR-7mIO.js} +11 -11
- package/dist/frontend/{camera-BI-BtnIm.js → camera-DtgHzfVI.js} +2 -2
- package/dist/frontend/{categories-Bjcc41We.js → categories-C8AAkhCR.js} +1 -1
- package/dist/frontend/{check-sdTlLwi9.js → check-DVx65aSv.js} +2 -2
- package/dist/frontend/{chevron-down-DlBnIE7Y.js → chevron-down-C2tbZ8Ol.js} +2 -2
- package/dist/frontend/{circle-check-hWC-HeKu.js → circle-check-BAN-D7yg.js} +2 -2
- package/dist/frontend/{clock-C4FHq-9q.js → clock-ByiB0SwQ.js} +2 -2
- package/dist/frontend/components/category-dialog.js +1 -1
- package/dist/frontend/components/create-snapshot-dialog.js +1 -1
- package/dist/frontend/components/delete-dialog.js +1 -1
- package/dist/frontend/components/editor/compact-editor.js +1 -1
- package/dist/frontend/components/editor/document-editor.js +1 -1
- package/dist/frontend/components/editor/markdown-toggle.js +2 -2
- package/dist/frontend/components/folder-node.js +1 -1
- package/dist/frontend/components/folder-tree-selector.js +1 -1
- package/dist/frontend/components/save-as-dialog.js +7 -7
- package/dist/frontend/components/settings.js +1 -1
- package/dist/frontend/components/share-dialog.js +1 -1
- package/dist/frontend/components/sidebar.js +1 -1
- package/dist/frontend/components/tag-create-dialog.js +1 -1
- package/dist/frontend/components/version-history.js +10 -10
- package/dist/frontend/{copy-4H99lwAQ.js → copy-CRzvfZGb.js} +2 -2
- package/dist/frontend/dashboard.js +48 -48
- package/dist/frontend/{db-rWMRdDfv.js → db-Dya0HRhS.js} +1 -1
- package/dist/frontend/{dialog-dq74xSum.js → dialog-a_ZcpEC5.js} +9 -9
- package/dist/frontend/{dist-BUuz1oVW.js → dist-CcHOStsA.js} +1 -1
- package/dist/frontend/dist-DcHl92QO.js +316 -0
- package/dist/frontend/{dndzone-BrakBHwm.js → dndzone-CDhrbpTg.js} +1 -1
- package/dist/frontend/{dropdown-menu-ChtRLf5S.js → dropdown-menu-DrHYReIC.js} +12 -12
- package/dist/frontend/{ellipsis-vertical-CObXWXZW.js → ellipsis-vertical-qxNgoXu-.js} +2 -2
- package/dist/frontend/{folder-BAX6qBYy.js → folder-D74E-Kdp.js} +3 -3
- package/dist/frontend/frontend.css +1 -1
- package/dist/frontend/{identity-BCcv0x22.js → identity-BOA7Jejv.js} +1 -1
- package/dist/frontend/{input-DTrIztSF.js → input-Q_7qCfnU.js} +2 -2
- package/dist/frontend/{label-BidWF619.js → label-Dj8FDEhf.js} +2 -2
- package/dist/frontend/{loader-circle-DnyUzAmN.js → loader-circle-D3t5NkvC.js} +2 -2
- package/dist/frontend/offline/identity.js +1 -1
- package/dist/frontend/{popper-layer-force-mount-DeBbICF4.js → popper-layer-force-mount-CNtiLgbV.js} +63 -63
- package/dist/frontend/{rotate-ccw-DtZDfSK3.js → rotate-ccw-B1ybQ8oQ.js} +2 -2
- package/dist/frontend/schemas-1Na35n71.js +3988 -0
- package/dist/frontend/search.js +13 -13
- package/dist/frontend/{select-value-BlBmN1Vp.js → select-value-BkI1W1bn.js} +19 -19
- package/dist/frontend/{settings-BsuxLoxv.js → settings-BRcYFQa_.js} +1 -1
- package/dist/frontend/{share-context-CX9pmtDz.js → share-context-BJ4GF4yT.js} +8 -8
- package/dist/frontend/{tag-ChpMfbfa.js → tag-qbTBLj-g.js} +3 -3
- package/dist/frontend/{tags-CzPNUoFw.js → tags-CF_cqzSV.js} +1 -1
- package/dist/frontend/{textarea-704DccHJ.js → textarea-BNK0LFUK.js} +2 -2
- package/dist/frontend/theme.js +1 -1
- package/dist/frontend/{theme.svelte-B6hsI5me.js → theme.svelte-BRdxXd-B.js} +3 -3
- package/dist/frontend/utils/dndzone.js +1 -1
- package/dist/frontend/{utils-j7qLkF4C.js → utils-BlHvR6OL.js} +1 -1
- package/dist/frontend/{x-B2ifxSH7.js → x-CvSSnrjl.js} +2 -2
- package/dist/frontend-ssr/api/settings.js +1 -1
- package/dist/frontend-ssr/app-shell.js +6 -6
- package/dist/frontend-ssr/assets/{CategoryDialog-Ch4RlhLg.js → CategoryDialog-DuZLLlt7.js} +7 -7
- package/dist/frontend-ssr/assets/{ConfirmDialog-B9sc7xt5.js → ConfirmDialog-0WVu9BCE.js} +8 -8
- package/dist/frontend-ssr/assets/{CreateSnapshotDialog-XLsNLzRf.js → CreateSnapshotDialog-3vhDTFNu.js} +4 -4
- package/dist/frontend-ssr/assets/{DatePicker-BwLyP3b_.js → DatePicker-t12leL2Y.js} +7 -7
- package/dist/frontend-ssr/assets/{DeleteDialog-C0a-RBKC.js → DeleteDialog-B0AU1fJR.js} +3 -3
- package/dist/frontend-ssr/assets/{FolderNode-imYW-MNe.js → FolderNode-C-B-s8x1.js} +5 -5
- package/dist/frontend-ssr/assets/{FolderTreeSelector-DnrKCYtl.js → FolderTreeSelector-DdQuEcj0.js} +4 -4
- package/dist/frontend-ssr/assets/{HiAiEditor-CXq29oHf.js → HiAiEditor-Bj6tiE97.js} +30 -30
- package/dist/frontend-ssr/assets/{Icon-Clqe8D8X.js → Icon-DE_3EnuF.js} +4 -4
- package/dist/frontend-ssr/assets/{SettingsDialog-CH5B9IOK.js → SettingsDialog-h4SFwpUa.js} +16 -16
- package/dist/frontend-ssr/assets/{ShareDialog-CcKZFHo8.js → ShareDialog-CpE9zd_f.js} +1 -1
- package/dist/frontend-ssr/assets/{Sidebar-DQcwbR0y.js → Sidebar-BFBpsd3L.js} +26 -26
- package/dist/frontend-ssr/assets/{TagCreateDialog-DCz6I-FH.js → TagCreateDialog-DBHO1DPU.js} +4 -4
- package/dist/frontend-ssr/assets/{auth-client-CokKgEB-.js → auth-client-BC4hSFKF.js} +13 -13
- package/dist/frontend-ssr/assets/{camera-Dwwtgvfn.js → camera-B6ldo_Js.js} +2 -2
- package/dist/frontend-ssr/assets/{chevron-down-C6BTPJFz.js → chevron-down-DQcr6JUc.js} +2 -2
- package/dist/frontend-ssr/assets/{chevron-right-CseGE1qd.js → chevron-right-9szrliZx.js} +2 -2
- package/dist/frontend-ssr/assets/{circle-check-BRhWPZo1.js → circle-check-BgP9MRRv.js} +2 -2
- package/dist/frontend-ssr/assets/{clock-DpP_Y7WP.js → clock-roNtGlT6.js} +2 -2
- package/dist/frontend-ssr/assets/{copy-DRMKiRZ0.js → copy-BYqYnBIQ.js} +2 -2
- package/dist/frontend-ssr/assets/{db-BxaCyM9B.js → db-C3rFdTZa.js} +1 -1
- package/dist/frontend-ssr/assets/{dialog-Bjm7PhCc.js → dialog-SqCnTT43.js} +9 -9
- package/dist/frontend-ssr/assets/{dist-71eunluk.js → dist-CaZQ1FhA.js} +10 -10
- package/dist/frontend-ssr/assets/{dist-CshZmNmp.js → dist-CqxHwOlp.js} +3 -3
- package/dist/frontend-ssr/assets/{dndzone-WtNaDxoQ.js → dndzone-CnTCMhPd.js} +1 -1
- package/dist/frontend-ssr/assets/{dropdown-menu-dg8hpDGz.js → dropdown-menu-CE6U0f1b.js} +12 -12
- package/dist/frontend-ssr/assets/{ellipsis-vertical-BErUuhWg.js → ellipsis-vertical-Cg1MrZsl.js} +2 -2
- package/dist/frontend-ssr/assets/{folder-DszunwKc.js → folder-DHB-CEcQ.js} +2 -2
- package/dist/frontend-ssr/assets/{identity-BHNrcgU5.js → identity-DNIo1bgc.js} +1 -1
- package/dist/frontend-ssr/assets/{input-BzlpgSwc.js → input-DVrBVPgs.js} +2 -2
- package/dist/frontend-ssr/assets/{label-uycYYCYF.js → label-vtCK3pTp.js} +2 -2
- package/dist/frontend-ssr/assets/{loader-circle-BpRVrMZg.js → loader-circle-D3NWhCif.js} +2 -2
- package/dist/frontend-ssr/assets/{popper-layer-force-mount-X3deg3KH.js → popper-layer-force-mount-C4dMMt-f.js} +71 -71
- package/dist/frontend-ssr/assets/{rotate-ccw-1GOD_yt_.js → rotate-ccw-DNf3nwMD.js} +2 -2
- package/dist/frontend-ssr/assets/{select-value-BRQxTiFP.js → select-value-Ce5c_fuA.js} +18 -18
- package/dist/frontend-ssr/assets/{settings-Dy4eZk45.js → settings-DWCpfCPj.js} +1 -1
- package/dist/frontend-ssr/assets/{share-context-dIAQ413Z.js → share-context-B4UpvTSw.js} +9 -9
- package/dist/frontend-ssr/assets/{tag-DFh6nF9R.js → tag-Cqv0fWVG.js} +3 -3
- package/dist/frontend-ssr/assets/{textarea-CEUFQIma.js → textarea-BdjOJJVb.js} +2 -2
- package/dist/frontend-ssr/assets/{theme.svelte-dM8TietK.js → theme.svelte-D6bbaJ9m.js} +3 -3
- package/dist/frontend-ssr/assets/{utils-0rlYZMNr.js → utils-D3X7I8nz.js} +1 -1
- package/dist/frontend-ssr/components/category-dialog.js +1 -1
- package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -1
- package/dist/frontend-ssr/components/delete-dialog.js +1 -1
- package/dist/frontend-ssr/components/editor/compact-editor.js +1 -1
- package/dist/frontend-ssr/components/editor/document-editor.js +1 -1
- package/dist/frontend-ssr/components/editor/markdown-toggle.js +1 -1
- package/dist/frontend-ssr/components/folder-node.js +1 -1
- package/dist/frontend-ssr/components/folder-tree-selector.js +1 -1
- package/dist/frontend-ssr/components/save-as-dialog.js +6 -6
- package/dist/frontend-ssr/components/settings.js +1 -1
- package/dist/frontend-ssr/components/share-dialog.js +1 -1
- package/dist/frontend-ssr/components/sidebar.js +1 -1
- package/dist/frontend-ssr/components/tag-create-dialog.js +1 -1
- package/dist/frontend-ssr/components/version-history.js +10 -10
- package/dist/frontend-ssr/dashboard.js +40 -40
- package/dist/frontend-ssr/offline/identity.js +1 -1
- package/dist/frontend-ssr/search.js +8 -8
- package/dist/frontend-ssr/theme.js +1 -1
- package/dist/frontend-ssr/utils/dndzone.js +1 -1
- package/dist/lifecycle-runtime.js +7129 -1986
- package/dist/mcp-cli.js +133 -72
- package/dist/mcp-server.d.ts +15 -0
- package/dist/mcp-server.js +137 -72
- package/package.json +15 -6
- package/packages/cli/src/index.ts +1 -1
- package/server.json +2 -2
- package/dist/frontend/dist-COPpfjrc.js +0 -316
- package/dist/frontend/schemas-CdPhcuru.js +0 -3001
|
@@ -0,0 +1,3988 @@
|
|
|
1
|
+
//#region ../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/util.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = Object.values(e).filter((e) => typeof e == "number");
|
|
4
|
+
return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
|
|
5
|
+
}
|
|
6
|
+
function t(e, t = "|") {
|
|
7
|
+
return e.map((e) => se(e)).join(t);
|
|
8
|
+
}
|
|
9
|
+
function n(e, t) {
|
|
10
|
+
return typeof t == "bigint" ? t.toString() : t;
|
|
11
|
+
}
|
|
12
|
+
var r = class {
|
|
13
|
+
constructor(e) {
|
|
14
|
+
this._getter = e, this._value = void 0;
|
|
15
|
+
}
|
|
16
|
+
get value() {
|
|
17
|
+
let e = this._getter;
|
|
18
|
+
return e !== void 0 && (this._value = e(), this._getter = void 0), this._value;
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
function i(e) {
|
|
22
|
+
return new r(e);
|
|
23
|
+
}
|
|
24
|
+
function a(e) {
|
|
25
|
+
return e == null;
|
|
26
|
+
}
|
|
27
|
+
function o(e) {
|
|
28
|
+
let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
29
|
+
return e.slice(t, n);
|
|
30
|
+
}
|
|
31
|
+
function s(e, t) {
|
|
32
|
+
let n = e / t, r = Math.round(n), i = 4 * 2 ** -52 * Math.max(Math.abs(n), 1);
|
|
33
|
+
return Math.abs(n - r) < i ? 0 : n - r;
|
|
34
|
+
}
|
|
35
|
+
function c(e, t, n) {
|
|
36
|
+
Object.defineProperty(e, t, {
|
|
37
|
+
value: n,
|
|
38
|
+
writable: !0,
|
|
39
|
+
enumerable: !0,
|
|
40
|
+
configurable: !0
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function l(e) {
|
|
44
|
+
let t = Object.getOwnPropertyDescriptor(e, "shape");
|
|
45
|
+
return t?.get ? t.get.raw : t?.value;
|
|
46
|
+
}
|
|
47
|
+
function u(e) {
|
|
48
|
+
return l(e._zod.def) ?? e._zod.def.shape;
|
|
49
|
+
}
|
|
50
|
+
function d(e, t, n) {
|
|
51
|
+
Object.defineProperty(e, t, {
|
|
52
|
+
get() {
|
|
53
|
+
let e = n();
|
|
54
|
+
return c(this, t, e), e;
|
|
55
|
+
},
|
|
56
|
+
enumerable: !0,
|
|
57
|
+
configurable: !0
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
function f(e, t, n) {
|
|
61
|
+
t in e ? c(e, t, n) : e[t] = n;
|
|
62
|
+
}
|
|
63
|
+
function p(e, t, n, r) {
|
|
64
|
+
let i = u(t);
|
|
65
|
+
for (let a of n) {
|
|
66
|
+
let n = Object.getOwnPropertyDescriptor(i, a);
|
|
67
|
+
n.enumerable && (n.get ? d(e, a, () => {
|
|
68
|
+
let e = t._zod.def.shape[a];
|
|
69
|
+
return r ? r(e, a) : e;
|
|
70
|
+
}) : f(e, a, r ? r(n.value, a) : n.value));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
function m(e, t) {
|
|
74
|
+
for (let n of Reflect.ownKeys(t)) {
|
|
75
|
+
let r = Object.getOwnPropertyDescriptor(t, n);
|
|
76
|
+
r.enumerable && (r.get ? d(e, n, () => t[n]) : f(e, n, r.value));
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function h(...e) {
|
|
80
|
+
let t = {};
|
|
81
|
+
for (let n of e) {
|
|
82
|
+
let e = Object.getOwnPropertyDescriptors(n);
|
|
83
|
+
Object.assign(t, e);
|
|
84
|
+
}
|
|
85
|
+
return Object.defineProperties({}, t);
|
|
86
|
+
}
|
|
87
|
+
function ee(e) {
|
|
88
|
+
return JSON.stringify(e);
|
|
89
|
+
}
|
|
90
|
+
function te(e) {
|
|
91
|
+
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
92
|
+
}
|
|
93
|
+
var ne = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
|
|
94
|
+
function g(e) {
|
|
95
|
+
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
96
|
+
}
|
|
97
|
+
var re = /* @__PURE__*/ i(() => {
|
|
98
|
+
if (A.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
99
|
+
try {
|
|
100
|
+
return Function(""), !0;
|
|
101
|
+
} catch {
|
|
102
|
+
return !1;
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
function _(e) {
|
|
106
|
+
if (g(e) === !1) return !1;
|
|
107
|
+
let t = e.constructor;
|
|
108
|
+
if (t === void 0 || typeof t != "function") return !0;
|
|
109
|
+
let n = t.prototype;
|
|
110
|
+
return g(n) !== !1 && Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") !== !1;
|
|
111
|
+
}
|
|
112
|
+
function ie(e) {
|
|
113
|
+
return _(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
|
|
114
|
+
}
|
|
115
|
+
var ae = /* @__PURE__*/ new Set([
|
|
116
|
+
"string",
|
|
117
|
+
"number",
|
|
118
|
+
"symbol"
|
|
119
|
+
]);
|
|
120
|
+
function oe(e) {
|
|
121
|
+
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
122
|
+
}
|
|
123
|
+
function v(e, t, n) {
|
|
124
|
+
let r = new e._zod.constr(t ?? e._zod.def);
|
|
125
|
+
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
126
|
+
}
|
|
127
|
+
function y(e) {
|
|
128
|
+
let t = e;
|
|
129
|
+
if (!t) return {};
|
|
130
|
+
if (typeof t == "string") return { error: () => t };
|
|
131
|
+
if (t?.message !== void 0) {
|
|
132
|
+
if (t?.error !== void 0) throw Error("Cannot specify both `message` and `error` params");
|
|
133
|
+
t.error = t.message;
|
|
134
|
+
}
|
|
135
|
+
return delete t.message, typeof t.error == "string" ? {
|
|
136
|
+
...t,
|
|
137
|
+
error: () => t.error
|
|
138
|
+
} : t;
|
|
139
|
+
}
|
|
140
|
+
function se(e) {
|
|
141
|
+
return typeof e == "bigint" ? e.toString() + "n" : typeof e == "string" ? `"${e}"` : `${e}`;
|
|
142
|
+
}
|
|
143
|
+
function ce(e) {
|
|
144
|
+
return Object.keys(e).filter((t) => e[t]._zod.optin !== void 0 && e[t]._zod.optout === "optional");
|
|
145
|
+
}
|
|
146
|
+
var le = {
|
|
147
|
+
safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
|
|
148
|
+
int32: [-2147483648, 2147483647],
|
|
149
|
+
uint32: [0, 4294967295],
|
|
150
|
+
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
151
|
+
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
152
|
+
}, ue = {
|
|
153
|
+
int64: [/* @__PURE__*/ BigInt("-9223372036854775808"), /* @__PURE__*/ BigInt("9223372036854775807")],
|
|
154
|
+
uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")]
|
|
155
|
+
};
|
|
156
|
+
function de(e, t) {
|
|
157
|
+
let n = e._zod.def, r = n.checks;
|
|
158
|
+
if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
|
|
159
|
+
let i = {};
|
|
160
|
+
return p(i, e, b(e, t)), v(e, h(n, {
|
|
161
|
+
shape: i,
|
|
162
|
+
checks: []
|
|
163
|
+
}));
|
|
164
|
+
}
|
|
165
|
+
function b(e, t) {
|
|
166
|
+
let n = u(e), r = [];
|
|
167
|
+
for (let e of Reflect.ownKeys(t)) {
|
|
168
|
+
if (!Object.getOwnPropertyDescriptor(n, e)?.enumerable) throw Error(`Unrecognized key: "${String(e)}"`);
|
|
169
|
+
t[e] && r.push(e);
|
|
170
|
+
}
|
|
171
|
+
return r;
|
|
172
|
+
}
|
|
173
|
+
function fe(e, t) {
|
|
174
|
+
let n = e._zod.def, r = n.checks;
|
|
175
|
+
if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
|
|
176
|
+
let i = new Set(b(e, t)), a = {};
|
|
177
|
+
return p(a, e, Reflect.ownKeys(u(e)).filter((e) => !i.has(e))), v(e, h(n, {
|
|
178
|
+
shape: a,
|
|
179
|
+
checks: []
|
|
180
|
+
}));
|
|
181
|
+
}
|
|
182
|
+
function pe(e, t) {
|
|
183
|
+
if (!_(t)) throw Error("Invalid input to extend: expected a plain object");
|
|
184
|
+
let n = e._zod.def.checks;
|
|
185
|
+
if (n && n.length > 0) {
|
|
186
|
+
let n = u(e);
|
|
187
|
+
for (let e of Reflect.ownKeys(t)) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
188
|
+
}
|
|
189
|
+
return v(e, h(e._zod.def, { shape: me(e, t) }));
|
|
190
|
+
}
|
|
191
|
+
function me(e, t) {
|
|
192
|
+
let n = {};
|
|
193
|
+
return p(n, e, Reflect.ownKeys(u(e))), m(n, t), n;
|
|
194
|
+
}
|
|
195
|
+
function he(e, t) {
|
|
196
|
+
if (!_(t)) throw Error("Invalid input to safeExtend: expected a plain object");
|
|
197
|
+
return v(e, h(e._zod.def, { shape: me(e, t) }));
|
|
198
|
+
}
|
|
199
|
+
function ge(e, t) {
|
|
200
|
+
if (!t?._zod?.def) throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");
|
|
201
|
+
if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
|
|
202
|
+
let n = {};
|
|
203
|
+
return p(n, e, Reflect.ownKeys(u(e))), p(n, t, Reflect.ownKeys(u(t))), v(e, h(e._zod.def, {
|
|
204
|
+
shape: n,
|
|
205
|
+
get catchall() {
|
|
206
|
+
return t._zod.def.catchall;
|
|
207
|
+
},
|
|
208
|
+
checks: t._zod.def.checks ?? []
|
|
209
|
+
}));
|
|
210
|
+
}
|
|
211
|
+
function _e(e, t, n, r = "partial") {
|
|
212
|
+
let i = t._zod.def.checks;
|
|
213
|
+
if (i && i.length > 0) throw Error(`.${r}() cannot be used on object schemas containing refinements`);
|
|
214
|
+
let a = n ? new Set(b(t, n)) : void 0, o = {};
|
|
215
|
+
return p(o, t, Reflect.ownKeys(u(t)), e && ((t, n) => a && !a.has(n) ? t : new e({
|
|
216
|
+
type: "optional",
|
|
217
|
+
innerType: t
|
|
218
|
+
}))), v(t, h(t._zod.def, {
|
|
219
|
+
shape: o,
|
|
220
|
+
checks: []
|
|
221
|
+
}));
|
|
222
|
+
}
|
|
223
|
+
function ve(e, t, n) {
|
|
224
|
+
let r = n ? new Set(b(t, n)) : void 0, i = {};
|
|
225
|
+
return p(i, t, Reflect.ownKeys(u(t)), (t, n) => r && !r.has(n) ? t : new e({
|
|
226
|
+
type: "nonoptional",
|
|
227
|
+
innerType: t
|
|
228
|
+
})), v(t, h(t._zod.def, { shape: i }));
|
|
229
|
+
}
|
|
230
|
+
function x(e, t = 0) {
|
|
231
|
+
if (e.aborted === !0) return !0;
|
|
232
|
+
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
|
|
233
|
+
return !1;
|
|
234
|
+
}
|
|
235
|
+
function ye(e, t = 0) {
|
|
236
|
+
if (e.aborted === !0) return !0;
|
|
237
|
+
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
|
|
238
|
+
return !1;
|
|
239
|
+
}
|
|
240
|
+
function be(e, t) {
|
|
241
|
+
return t.map((t) => {
|
|
242
|
+
var n;
|
|
243
|
+
return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
function S(e) {
|
|
247
|
+
return typeof e == "string" ? e : e?.message;
|
|
248
|
+
}
|
|
249
|
+
function xe(e) {
|
|
250
|
+
let t = [];
|
|
251
|
+
for (let n of e ?? []) {
|
|
252
|
+
let e = n._zod.def;
|
|
253
|
+
if (!/_(length|size)$|_equals$/.test(e.check)) break;
|
|
254
|
+
let r = e.maximum ?? e.length ?? e.size;
|
|
255
|
+
r >= 0 && t.push([r, n]);
|
|
256
|
+
}
|
|
257
|
+
return t;
|
|
258
|
+
}
|
|
259
|
+
function Se(e, t, n) {
|
|
260
|
+
var r;
|
|
261
|
+
for (let i = t; i < e.length; i++) (r = e[i]).schema ?? (r.schema = n);
|
|
262
|
+
}
|
|
263
|
+
function C(e, t, n) {
|
|
264
|
+
var r;
|
|
265
|
+
let i = e.inst?._zod?.traits;
|
|
266
|
+
i?.has("$ZodType") && (i.has("$ZodCheck") ? (r = e).schema ?? (r.schema = e.inst) : e.schema = e.inst);
|
|
267
|
+
let a = e.schema === e.inst ? void 0 : e.schema?._zod.def?.error, o = e.message ? e.message : S(e.inst?._zod.def?.error?.(e)) ?? S(a?.(e)) ?? S(t?.error?.(e)) ?? S(n.customError?.(e)) ?? S(n.localeError?.(e)) ?? "Invalid input", s = {};
|
|
268
|
+
for (let t of Object.keys(e)) t !== "inst" && t !== "schema" && t !== "continue" && t !== "input" && t !== "__proto__" && (s[t] = e[t]);
|
|
269
|
+
return s.path ??= [], s.message = o, t?.reportInput && (s.input = e.input), s;
|
|
270
|
+
}
|
|
271
|
+
var Ce = /[\uD800-\uDBFF]/;
|
|
272
|
+
function we(e) {
|
|
273
|
+
let t = e.length;
|
|
274
|
+
if (!Ce.test(e)) return t;
|
|
275
|
+
let n = t;
|
|
276
|
+
for (let r = 0; r < t - 1; r++) (e.charCodeAt(r) & 64512) == 55296 && (e.charCodeAt(r + 1) & 64512) == 56320 && (n--, r++);
|
|
277
|
+
return n;
|
|
278
|
+
}
|
|
279
|
+
function Te(e) {
|
|
280
|
+
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
281
|
+
}
|
|
282
|
+
function Ee(e) {
|
|
283
|
+
let t = typeof e;
|
|
284
|
+
switch (t) {
|
|
285
|
+
case "number": return Number.isNaN(e) ? "nan" : "number";
|
|
286
|
+
case "object": {
|
|
287
|
+
if (e === null) return "null";
|
|
288
|
+
if (Array.isArray(e)) return "array";
|
|
289
|
+
let t = e;
|
|
290
|
+
if (t && Object.getPrototypeOf(t) !== Object.prototype && "constructor" in t && t.constructor) return t.constructor.name;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return t;
|
|
294
|
+
}
|
|
295
|
+
function w(...e) {
|
|
296
|
+
let [t, n, r] = e;
|
|
297
|
+
return typeof t == "string" ? {
|
|
298
|
+
message: t,
|
|
299
|
+
code: "custom",
|
|
300
|
+
input: n,
|
|
301
|
+
inst: r
|
|
302
|
+
} : { ...t };
|
|
303
|
+
}
|
|
304
|
+
function De(e, t) {
|
|
305
|
+
for (let n in t) {
|
|
306
|
+
let r = Object.getOwnPropertyDescriptor(t, n);
|
|
307
|
+
r.get ? Object.defineProperty(e, n, {
|
|
308
|
+
...r,
|
|
309
|
+
enumerable: !1
|
|
310
|
+
}) : Ae(e, n, r.value);
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
function T(e, t, n, r = !0) {
|
|
314
|
+
return Object.defineProperty(e, t, {
|
|
315
|
+
configurable: !0,
|
|
316
|
+
writable: !0,
|
|
317
|
+
enumerable: r,
|
|
318
|
+
value: n
|
|
319
|
+
}), n;
|
|
320
|
+
}
|
|
321
|
+
function Oe(e, t, n) {
|
|
322
|
+
return T(e, t, n, !1);
|
|
323
|
+
}
|
|
324
|
+
function ke(e, t) {
|
|
325
|
+
for (let n in e) {
|
|
326
|
+
let r = e[n];
|
|
327
|
+
Object.defineProperty(t, n, {
|
|
328
|
+
configurable: !0,
|
|
329
|
+
enumerable: !0,
|
|
330
|
+
get() {
|
|
331
|
+
return T(this, n, r(this));
|
|
332
|
+
},
|
|
333
|
+
set(e) {
|
|
334
|
+
T(this, n, e);
|
|
335
|
+
}
|
|
336
|
+
});
|
|
337
|
+
}
|
|
338
|
+
return t;
|
|
339
|
+
}
|
|
340
|
+
function Ae(e, t, n) {
|
|
341
|
+
Object.defineProperty(e, t, {
|
|
342
|
+
configurable: !0,
|
|
343
|
+
get() {
|
|
344
|
+
return this == null ? n : T(this, t, n.bind(this));
|
|
345
|
+
},
|
|
346
|
+
set(e) {
|
|
347
|
+
T(this, t, e);
|
|
348
|
+
}
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
function je(e, t) {
|
|
352
|
+
let n = Object.getPrototypeOf(e);
|
|
353
|
+
return t in n ? void 0 : n;
|
|
354
|
+
}
|
|
355
|
+
var Me, E = !1, Ne = {
|
|
356
|
+
configurable: !0,
|
|
357
|
+
get() {
|
|
358
|
+
E = !0;
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
function D(e, t, n) {
|
|
362
|
+
let r = Object.getPrototypeOf(e._zod);
|
|
363
|
+
if (t in r && Me !== e._zod) {
|
|
364
|
+
Me = void 0;
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
Me = e._zod, Object.defineProperty(r, t, {
|
|
368
|
+
configurable: !0,
|
|
369
|
+
get() {
|
|
370
|
+
Object.defineProperty(this, t, Ne);
|
|
371
|
+
let e = E;
|
|
372
|
+
E = !1;
|
|
373
|
+
try {
|
|
374
|
+
let r = n(this);
|
|
375
|
+
return E ? delete this[t] : Object.defineProperty(this, t, {
|
|
376
|
+
configurable: !0,
|
|
377
|
+
writable: !0,
|
|
378
|
+
value: r
|
|
379
|
+
}), E ||= e, r;
|
|
380
|
+
} catch (n) {
|
|
381
|
+
throw delete this[t], E ||= e, n;
|
|
382
|
+
}
|
|
383
|
+
},
|
|
384
|
+
set(e) {
|
|
385
|
+
Object.defineProperty(this, t, {
|
|
386
|
+
configurable: !0,
|
|
387
|
+
writable: !0,
|
|
388
|
+
value: e
|
|
389
|
+
});
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
function Pe(e, t, n, r) {
|
|
394
|
+
let i = je(e, t);
|
|
395
|
+
i && Object.defineProperty(i, t, {
|
|
396
|
+
configurable: !0,
|
|
397
|
+
get() {
|
|
398
|
+
let e = {
|
|
399
|
+
configurable: !0,
|
|
400
|
+
writable: !0,
|
|
401
|
+
enumerable: r,
|
|
402
|
+
value: void 0
|
|
403
|
+
};
|
|
404
|
+
return Object.defineProperty(this, t, e), e.value = n(this), Object.defineProperty(this, t, e), e.value;
|
|
405
|
+
},
|
|
406
|
+
set(e) {
|
|
407
|
+
Object.defineProperty(this, t, {
|
|
408
|
+
configurable: !0,
|
|
409
|
+
writable: !0,
|
|
410
|
+
enumerable: r,
|
|
411
|
+
value: e
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
var Fe = "~constantCatch";
|
|
417
|
+
function Ie(e) {
|
|
418
|
+
let t = () => e;
|
|
419
|
+
return t[Fe] = !0, t;
|
|
420
|
+
}
|
|
421
|
+
//#endregion
|
|
422
|
+
//#region ../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/core.js
|
|
423
|
+
var Le, Re = {
|
|
424
|
+
value: void 0,
|
|
425
|
+
enumerable: !1
|
|
426
|
+
}, ze = "captureStackTrace" in Error ? Error : null;
|
|
427
|
+
function Be(e) {
|
|
428
|
+
let t = ze;
|
|
429
|
+
if (t) {
|
|
430
|
+
let n = t.stackTraceLimit;
|
|
431
|
+
if (typeof n == "number") {
|
|
432
|
+
try {
|
|
433
|
+
t.stackTraceLimit = 0;
|
|
434
|
+
} catch {
|
|
435
|
+
return ze = null, new e();
|
|
436
|
+
}
|
|
437
|
+
try {
|
|
438
|
+
return new e();
|
|
439
|
+
} finally {
|
|
440
|
+
t.stackTraceLimit = n;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
return new e();
|
|
445
|
+
}
|
|
446
|
+
function O(e, t, n, r) {
|
|
447
|
+
let i = {};
|
|
448
|
+
function a(e) {
|
|
449
|
+
this.def = e, this.constr = d, this.traits = /* @__PURE__ */ new Set();
|
|
450
|
+
}
|
|
451
|
+
a.prototype = i;
|
|
452
|
+
let o = n, s = o && /* @__PURE__ */ new WeakSet();
|
|
453
|
+
function c(n, r) {
|
|
454
|
+
if (!n._zod) {
|
|
455
|
+
Re.value = new a(r);
|
|
456
|
+
try {
|
|
457
|
+
Object.defineProperty(n, "_zod", Re);
|
|
458
|
+
} finally {
|
|
459
|
+
Re.value = void 0;
|
|
460
|
+
}
|
|
461
|
+
} else if (n._zod.traits.has(e)) return;
|
|
462
|
+
if (n._zod.traits.add(e), t(n, r), s) {
|
|
463
|
+
let e = Object.getPrototypeOf(n), t = n._zod.constr.prototype, r = e;
|
|
464
|
+
for (; r && r !== t;) r = Object.getPrototypeOf(r);
|
|
465
|
+
let i = r ?? e;
|
|
466
|
+
s.has(i) || (s.add(i), De(i, o));
|
|
467
|
+
}
|
|
468
|
+
let i = d.prototype;
|
|
469
|
+
for (let e in i) Object.prototype.hasOwnProperty.call(i, e) && (e in n || (n[e] = i[e].bind(n)));
|
|
470
|
+
}
|
|
471
|
+
let l = r?.Parent ?? Object;
|
|
472
|
+
class u extends l {}
|
|
473
|
+
Object.defineProperty(u, "name", { value: e });
|
|
474
|
+
function d(e) {
|
|
475
|
+
let t = r?.Parent ? Be(u) : this;
|
|
476
|
+
c(t, e);
|
|
477
|
+
let n = t._zod.deferred;
|
|
478
|
+
if (n) {
|
|
479
|
+
for (let e of n) e();
|
|
480
|
+
t._zod.deferred = void 0;
|
|
481
|
+
}
|
|
482
|
+
let i = globalThis.__zod_globalConfig?.postProcessor;
|
|
483
|
+
return i && i(t), t;
|
|
484
|
+
}
|
|
485
|
+
return Object.defineProperty(d, "init", { value: c }), Object.defineProperty(d, Symbol.hasInstance, { value: (t) => r?.Parent && t instanceof r.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(d, "name", { value: e }), d;
|
|
486
|
+
}
|
|
487
|
+
var k = class extends Error {
|
|
488
|
+
constructor() {
|
|
489
|
+
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
490
|
+
}
|
|
491
|
+
}, Ve = class extends Error {
|
|
492
|
+
constructor(e) {
|
|
493
|
+
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
494
|
+
}
|
|
495
|
+
};
|
|
496
|
+
(Le = globalThis).__zod_globalConfig ?? (Le.__zod_globalConfig = {});
|
|
497
|
+
var A = globalThis.__zod_globalConfig;
|
|
498
|
+
function j(e) {
|
|
499
|
+
return e && Object.assign(A, e), A;
|
|
500
|
+
}
|
|
501
|
+
//#endregion
|
|
502
|
+
//#region ../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/errors.js
|
|
503
|
+
function He() {
|
|
504
|
+
let e = this._zod;
|
|
505
|
+
return e.message ??= JSON.stringify(e.def, n, 2), e.message;
|
|
506
|
+
}
|
|
507
|
+
function Ue(e) {
|
|
508
|
+
this._zod.message = e;
|
|
509
|
+
}
|
|
510
|
+
var We = {
|
|
511
|
+
get: He,
|
|
512
|
+
set: Ue,
|
|
513
|
+
enumerable: !0,
|
|
514
|
+
configurable: !0
|
|
515
|
+
}, Ge = {
|
|
516
|
+
value: void 0,
|
|
517
|
+
enumerable: !1
|
|
518
|
+
}, Ke = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), qe = (e, t) => {
|
|
519
|
+
e.name = "$ZodError", Ge.value = t, Object.defineProperty(e, "issues", Ge), Ge.value = void 0, Object.defineProperty(e, "message", We);
|
|
520
|
+
let n = Object.getPrototypeOf(e);
|
|
521
|
+
Ke.has(n) || (Ke.add(n), Object.defineProperty(n, "toString", {
|
|
522
|
+
configurable: !0,
|
|
523
|
+
enumerable: !1,
|
|
524
|
+
get() {
|
|
525
|
+
let e = () => this.message;
|
|
526
|
+
return Object.defineProperty(this, "toString", {
|
|
527
|
+
value: e,
|
|
528
|
+
configurable: !0,
|
|
529
|
+
writable: !0
|
|
530
|
+
}), e;
|
|
531
|
+
},
|
|
532
|
+
set(e) {
|
|
533
|
+
Object.defineProperty(this, "toString", {
|
|
534
|
+
value: e,
|
|
535
|
+
configurable: !0,
|
|
536
|
+
writable: !0
|
|
537
|
+
});
|
|
538
|
+
}
|
|
539
|
+
}));
|
|
540
|
+
}, Je = O("$ZodError", qe);
|
|
541
|
+
O("$ZodError", qe, void 0, { Parent: Error });
|
|
542
|
+
function Ye(e, t, n) {
|
|
543
|
+
return Object.prototype.hasOwnProperty.call(e, t) || (t === "__proto__" ? Object.defineProperty(e, t, {
|
|
544
|
+
value: n(),
|
|
545
|
+
writable: !0,
|
|
546
|
+
enumerable: !0,
|
|
547
|
+
configurable: !0
|
|
548
|
+
}) : e[t] = n()), e[t];
|
|
549
|
+
}
|
|
550
|
+
function Xe(e, t = (e) => e.message) {
|
|
551
|
+
let n = {}, r = [];
|
|
552
|
+
for (let i of e.issues) i.path.length > 0 ? Ye(n, i.path[0], () => []).push(t(i)) : r.push(t(i));
|
|
553
|
+
return {
|
|
554
|
+
formErrors: r,
|
|
555
|
+
fieldErrors: n
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
function Ze(e, t = (e) => e.message) {
|
|
559
|
+
let n = { _errors: [] }, r = (e, i = []) => {
|
|
560
|
+
for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
|
|
561
|
+
else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
|
|
562
|
+
else if (a.code === "invalid_element") r({ issues: a.issues }, [...i, ...a.path]);
|
|
563
|
+
else {
|
|
564
|
+
let e = [...i, ...a.path];
|
|
565
|
+
if (e.length === 0) n._errors.push(t(a));
|
|
566
|
+
else {
|
|
567
|
+
let r = n, i = 0;
|
|
568
|
+
for (; i < e.length;) {
|
|
569
|
+
let n = e[i], o = i === e.length - 1;
|
|
570
|
+
if (n === "_errors") {
|
|
571
|
+
o && r._errors.push(t(a)), i++;
|
|
572
|
+
continue;
|
|
573
|
+
}
|
|
574
|
+
Object.prototype.hasOwnProperty.call(r, n) || Object.defineProperty(r, n, {
|
|
575
|
+
value: { _errors: [] },
|
|
576
|
+
enumerable: !0,
|
|
577
|
+
writable: !0,
|
|
578
|
+
configurable: !0
|
|
579
|
+
});
|
|
580
|
+
let s = r[n];
|
|
581
|
+
o && s._errors.push(t(a)), r = s, i++;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
};
|
|
586
|
+
return r(e), n;
|
|
587
|
+
}
|
|
588
|
+
//#endregion
|
|
589
|
+
//#region ../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/parse.js
|
|
590
|
+
function M(e, t) {
|
|
591
|
+
return {
|
|
592
|
+
callee: t?.callee ?? e,
|
|
593
|
+
Err: t?.Err
|
|
594
|
+
};
|
|
595
|
+
}
|
|
596
|
+
var Qe = (e) => {
|
|
597
|
+
let t = (n, r, i, a) => {
|
|
598
|
+
let o = i ? {
|
|
599
|
+
...i,
|
|
600
|
+
async: !1
|
|
601
|
+
} : { async: !1 }, s = n._zod.run({
|
|
602
|
+
value: r,
|
|
603
|
+
issues: []
|
|
604
|
+
}, o);
|
|
605
|
+
if (s instanceof Promise) throw new k();
|
|
606
|
+
if (s.issues.length) {
|
|
607
|
+
let n = new ((a?.Err) ?? e)(s.issues.map((e) => C(e, o, j())));
|
|
608
|
+
throw ne(n, a?.callee ?? t), n;
|
|
609
|
+
}
|
|
610
|
+
return s.value;
|
|
611
|
+
};
|
|
612
|
+
return t;
|
|
613
|
+
}, $e = (e) => {
|
|
614
|
+
let t = async (n, r, i, a) => {
|
|
615
|
+
let o = i ? {
|
|
616
|
+
...i,
|
|
617
|
+
async: !0
|
|
618
|
+
} : { async: !0 }, s = n._zod.run({
|
|
619
|
+
value: r,
|
|
620
|
+
issues: []
|
|
621
|
+
}, o);
|
|
622
|
+
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
623
|
+
let n = new ((a?.Err) ?? e)(s.issues.map((e) => C(e, o, j())));
|
|
624
|
+
throw ne(n, a?.callee ?? t), n;
|
|
625
|
+
}
|
|
626
|
+
return s.value;
|
|
627
|
+
};
|
|
628
|
+
return t;
|
|
629
|
+
}, et = (e) => (t, n, r) => {
|
|
630
|
+
let i = r ? {
|
|
631
|
+
...r,
|
|
632
|
+
async: !1
|
|
633
|
+
} : { async: !1 }, a = t._zod.run({
|
|
634
|
+
value: n,
|
|
635
|
+
issues: []
|
|
636
|
+
}, i);
|
|
637
|
+
if (a instanceof Promise) throw new k();
|
|
638
|
+
return a.issues.length ? tt(e, a.issues, i) : {
|
|
639
|
+
success: !0,
|
|
640
|
+
data: a.value
|
|
641
|
+
};
|
|
642
|
+
};
|
|
643
|
+
function tt(e, t, n) {
|
|
644
|
+
let r;
|
|
645
|
+
return {
|
|
646
|
+
success: !1,
|
|
647
|
+
get error() {
|
|
648
|
+
return r || (r = new e(t.map((e) => C(e, n, j()))), t = void 0, n = void 0), r;
|
|
649
|
+
},
|
|
650
|
+
set error(e) {
|
|
651
|
+
r = e, t = void 0, n = void 0;
|
|
652
|
+
}
|
|
653
|
+
};
|
|
654
|
+
}
|
|
655
|
+
var nt = (e) => async (t, n, r) => {
|
|
656
|
+
let i = r ? {
|
|
657
|
+
...r,
|
|
658
|
+
async: !0
|
|
659
|
+
} : { async: !0 }, a = t._zod.run({
|
|
660
|
+
value: n,
|
|
661
|
+
issues: []
|
|
662
|
+
}, i);
|
|
663
|
+
return a instanceof Promise && (a = await a), a.issues.length ? tt(e, a.issues, i) : {
|
|
664
|
+
success: !0,
|
|
665
|
+
data: a.value
|
|
666
|
+
};
|
|
667
|
+
}, rt = /* @__PURE__ */ Symbol.for("zod.compile.invalid"), it = /* @__PURE__ */ Symbol.for("zod.compile.fallback"), at = ((e, t, n) => {
|
|
668
|
+
let r = e._zod.bag.validator;
|
|
669
|
+
if (r !== void 0) {
|
|
670
|
+
if (r(t) !== rt) return !0;
|
|
671
|
+
if (r.definite === !0 && n === void 0) return !1;
|
|
672
|
+
}
|
|
673
|
+
return ot(e, t, n);
|
|
674
|
+
});
|
|
675
|
+
function ot(e, t, n) {
|
|
676
|
+
let r = n ? {
|
|
677
|
+
...n,
|
|
678
|
+
async: !1,
|
|
679
|
+
abortEarly: !0
|
|
680
|
+
} : {
|
|
681
|
+
async: !1,
|
|
682
|
+
abortEarly: !0
|
|
683
|
+
}, i = e._zod.bag.fallbackRun, a;
|
|
684
|
+
if (i ? (r[it] = !0, a = i({
|
|
685
|
+
value: t,
|
|
686
|
+
issues: []
|
|
687
|
+
}, r)) : a = e._zod.run({
|
|
688
|
+
value: t,
|
|
689
|
+
issues: []
|
|
690
|
+
}, r), a instanceof Promise) throw new k();
|
|
691
|
+
return a.issues.length === 0;
|
|
692
|
+
}
|
|
693
|
+
var st = async (e, t, n) => {
|
|
694
|
+
let r = n ? {
|
|
695
|
+
...n,
|
|
696
|
+
async: !0,
|
|
697
|
+
abortEarly: !0
|
|
698
|
+
} : {
|
|
699
|
+
async: !0,
|
|
700
|
+
abortEarly: !0
|
|
701
|
+
}, i = e._zod.run({
|
|
702
|
+
value: t,
|
|
703
|
+
issues: []
|
|
704
|
+
}, r);
|
|
705
|
+
return i instanceof Promise && (i = await i), i.issues.length === 0;
|
|
706
|
+
}, ct = (e) => {
|
|
707
|
+
let t = Qe(e), n = (e, r, i, a) => {
|
|
708
|
+
let o = i ? {
|
|
709
|
+
...i,
|
|
710
|
+
direction: "backward"
|
|
711
|
+
} : { direction: "backward" };
|
|
712
|
+
return t(e, r, o, M(n, a));
|
|
713
|
+
};
|
|
714
|
+
return n;
|
|
715
|
+
}, lt = (e) => {
|
|
716
|
+
let t = Qe(e), n = (e, r, i, a) => t(e, r, i, M(n, a));
|
|
717
|
+
return n;
|
|
718
|
+
}, ut = (e) => {
|
|
719
|
+
let t = $e(e), n = async (e, r, i, a) => {
|
|
720
|
+
let o = i ? {
|
|
721
|
+
...i,
|
|
722
|
+
direction: "backward"
|
|
723
|
+
} : { direction: "backward" };
|
|
724
|
+
return await t(e, r, o, M(n, a));
|
|
725
|
+
};
|
|
726
|
+
return n;
|
|
727
|
+
}, dt = (e) => {
|
|
728
|
+
let t = $e(e), n = async (e, r, i, a) => await t(e, r, i, M(n, a));
|
|
729
|
+
return n;
|
|
730
|
+
}, ft = (e) => (t, n, r) => {
|
|
731
|
+
let i = r ? {
|
|
732
|
+
...r,
|
|
733
|
+
direction: "backward"
|
|
734
|
+
} : { direction: "backward" };
|
|
735
|
+
return et(e)(t, n, i);
|
|
736
|
+
}, pt = (e) => (t, n, r) => et(e)(t, n, r), mt = (e) => async (t, n, r) => {
|
|
737
|
+
let i = r ? {
|
|
738
|
+
...r,
|
|
739
|
+
direction: "backward"
|
|
740
|
+
} : { direction: "backward" };
|
|
741
|
+
return nt(e)(t, n, i);
|
|
742
|
+
}, ht = (e) => async (t, n, r) => nt(e)(t, n, r), gt = /^[cC][0-9a-z]{6,}$/, _t = /^[0-9a-z]+$/, vt = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/, yt = /^[0-9a-vA-V]{20}$/, bt = /^[A-Za-z0-9]{27}$/, xt = /^[a-zA-Z0-9_-]{21}$/;
|
|
743
|
+
function St(e) {
|
|
744
|
+
return RegExp(`^[a-zA-Z0-9_-]{${e}}$`);
|
|
745
|
+
}
|
|
746
|
+
var Ct = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, wt = /^([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})$/, Tt = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, Et = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Dt = "^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";
|
|
747
|
+
function Ot() {
|
|
748
|
+
return new RegExp(Dt, "u");
|
|
749
|
+
}
|
|
750
|
+
var kt = /^(?:(?: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])$/, At = /^(([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}|:))$/, jt = /^((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])$/, Mt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Nt = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Pt = /^(?:[A-Za-z0-9_-]{4})*(?:[A-Za-z0-9_-]{2,3})?$/, Ft = /^https?$/, It = /^\+[1-9]\d{6,14}$/, Lt = "(?:(?:\\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])))";
|
|
751
|
+
function Rt(e) {
|
|
752
|
+
return RegExp(`^${e}$`);
|
|
753
|
+
}
|
|
754
|
+
var zt = /*@__PURE__*/ Rt(Lt);
|
|
755
|
+
function Bt(e) {
|
|
756
|
+
let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
757
|
+
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : e.seconds ? `${t}:[0-5]\\d(?:\\.\\d+)?` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
758
|
+
}
|
|
759
|
+
function Vt(e) {
|
|
760
|
+
return RegExp(`^${Bt(e)}$`);
|
|
761
|
+
}
|
|
762
|
+
function Ht(e) {
|
|
763
|
+
let t = ["Z"];
|
|
764
|
+
e.offset && t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
765
|
+
let n = `${Bt({
|
|
766
|
+
precision: e.precision,
|
|
767
|
+
seconds: !0
|
|
768
|
+
})}(?:${t.join("|")})`, r = e.local ? `${n}|${Bt({ precision: e.precision })}` : n;
|
|
769
|
+
return RegExp(`^${Lt}T(?:${r})$`);
|
|
770
|
+
}
|
|
771
|
+
var Ut = /^[\s\S]{0,}$/, Wt = /^-?\d+(?:\.\d+)?$/, Gt = /^(?:true|false)$/i, Kt = /^[^A-Z]*$/, qt = /^[^a-z]*$/, N = /*@__PURE__*/ O("$ZodCheck", (e, t) => {
|
|
772
|
+
var n;
|
|
773
|
+
e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
774
|
+
}), Jt = (e) => {
|
|
775
|
+
let t = e.value;
|
|
776
|
+
return !a(t) && t.length !== void 0;
|
|
777
|
+
}, Yt = {
|
|
778
|
+
number: "number",
|
|
779
|
+
bigint: "bigint",
|
|
780
|
+
object: "date"
|
|
781
|
+
}, Xt = /*@__PURE__*/ O("$ZodCheckLessThan", (e, t) => {
|
|
782
|
+
N.init(e, t);
|
|
783
|
+
let n = Yt[typeof t.value];
|
|
784
|
+
e._zod.check = (r) => {
|
|
785
|
+
(t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
|
|
786
|
+
origin: Yt[typeof r.value] ?? n,
|
|
787
|
+
code: "too_big",
|
|
788
|
+
maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
|
|
789
|
+
input: r.value,
|
|
790
|
+
inclusive: t.inclusive,
|
|
791
|
+
inst: e,
|
|
792
|
+
continue: !t.abort
|
|
793
|
+
});
|
|
794
|
+
};
|
|
795
|
+
}), Zt = /*@__PURE__*/ O("$ZodCheckGreaterThan", (e, t) => {
|
|
796
|
+
N.init(e, t);
|
|
797
|
+
let n = Yt[typeof t.value];
|
|
798
|
+
e._zod.check = (r) => {
|
|
799
|
+
(t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
|
|
800
|
+
origin: Yt[typeof r.value] ?? n,
|
|
801
|
+
code: "too_small",
|
|
802
|
+
minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
|
|
803
|
+
input: r.value,
|
|
804
|
+
inclusive: t.inclusive,
|
|
805
|
+
inst: e,
|
|
806
|
+
continue: !t.abort
|
|
807
|
+
});
|
|
808
|
+
};
|
|
809
|
+
}), Qt = /*@__PURE__*/ O("$ZodCheckMultipleOf", (e, t) => {
|
|
810
|
+
N.init(e, t), e._zod.check = (n) => {
|
|
811
|
+
if (typeof n.value != typeof t.value) throw Error("Cannot mix number and bigint in multiple_of check.");
|
|
812
|
+
(typeof n.value == "bigint" ? t.value !== BigInt(0) && n.value % t.value === BigInt(0) : s(n.value, t.value) === 0) || n.issues.push({
|
|
813
|
+
origin: typeof n.value,
|
|
814
|
+
code: "not_multiple_of",
|
|
815
|
+
divisor: t.value,
|
|
816
|
+
input: n.value,
|
|
817
|
+
inst: e,
|
|
818
|
+
continue: !t.abort
|
|
819
|
+
});
|
|
820
|
+
};
|
|
821
|
+
}), $t = /*@__PURE__*/ O("$ZodCheckNumberFormat", (e, t) => {
|
|
822
|
+
N.init(e, t), t.format = t.format || "float64";
|
|
823
|
+
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = le[t.format];
|
|
824
|
+
e._zod.check = (o) => {
|
|
825
|
+
let s = o.value;
|
|
826
|
+
if (n) {
|
|
827
|
+
if (!Number.isInteger(s)) {
|
|
828
|
+
o.issues.push({
|
|
829
|
+
expected: r,
|
|
830
|
+
format: t.format,
|
|
831
|
+
code: "invalid_type",
|
|
832
|
+
continue: !1,
|
|
833
|
+
input: s,
|
|
834
|
+
inst: e
|
|
835
|
+
});
|
|
836
|
+
return;
|
|
837
|
+
}
|
|
838
|
+
if (!Number.isSafeInteger(s)) {
|
|
839
|
+
s > 0 ? o.issues.push({
|
|
840
|
+
input: s,
|
|
841
|
+
code: "too_big",
|
|
842
|
+
maximum: 2 ** 53 - 1,
|
|
843
|
+
note: "Integers must be within the safe integer range.",
|
|
844
|
+
inst: e,
|
|
845
|
+
origin: r,
|
|
846
|
+
inclusive: !0,
|
|
847
|
+
continue: !t.abort
|
|
848
|
+
}) : o.issues.push({
|
|
849
|
+
input: s,
|
|
850
|
+
code: "too_small",
|
|
851
|
+
minimum: -(2 ** 53 - 1),
|
|
852
|
+
note: "Integers must be within the safe integer range.",
|
|
853
|
+
inst: e,
|
|
854
|
+
origin: r,
|
|
855
|
+
inclusive: !0,
|
|
856
|
+
continue: !t.abort
|
|
857
|
+
});
|
|
858
|
+
return;
|
|
859
|
+
}
|
|
860
|
+
}
|
|
861
|
+
s < i && o.issues.push({
|
|
862
|
+
origin: "number",
|
|
863
|
+
input: s,
|
|
864
|
+
code: "too_small",
|
|
865
|
+
minimum: i,
|
|
866
|
+
inclusive: !0,
|
|
867
|
+
inst: e,
|
|
868
|
+
continue: !t.abort
|
|
869
|
+
}), s > a && o.issues.push({
|
|
870
|
+
origin: "number",
|
|
871
|
+
input: s,
|
|
872
|
+
code: "too_big",
|
|
873
|
+
maximum: a,
|
|
874
|
+
inclusive: !0,
|
|
875
|
+
inst: e,
|
|
876
|
+
continue: !t.abort
|
|
877
|
+
});
|
|
878
|
+
};
|
|
879
|
+
}), en = /*@__PURE__*/ O("$ZodCheckMaxLength", (e, t) => {
|
|
880
|
+
var n;
|
|
881
|
+
N.init(e, t), (n = e._zod.def).when ?? (n.when = Jt), e._zod.check = (n) => {
|
|
882
|
+
let r = n.value, i = r.length;
|
|
883
|
+
if ((typeof r == "string" && i > t.maximum ? we(r) : i) <= t.maximum) return;
|
|
884
|
+
let a = Te(r);
|
|
885
|
+
n.issues.push({
|
|
886
|
+
origin: a,
|
|
887
|
+
code: "too_big",
|
|
888
|
+
maximum: t.maximum,
|
|
889
|
+
inclusive: !0,
|
|
890
|
+
input: r,
|
|
891
|
+
inst: e,
|
|
892
|
+
continue: !t.abort
|
|
893
|
+
});
|
|
894
|
+
};
|
|
895
|
+
}), tn = /*@__PURE__*/ O("$ZodCheckMinLength", (e, t) => {
|
|
896
|
+
var n;
|
|
897
|
+
N.init(e, t), (n = e._zod.def).when ?? (n.when = Jt), e._zod.check = (n) => {
|
|
898
|
+
let r = n.value, i = r.length;
|
|
899
|
+
if ((typeof r == "string" && i >= t.minimum && i < t.minimum * 2 ? we(r) : i) >= t.minimum) return;
|
|
900
|
+
let a = Te(r);
|
|
901
|
+
n.issues.push({
|
|
902
|
+
origin: a,
|
|
903
|
+
code: "too_small",
|
|
904
|
+
minimum: t.minimum,
|
|
905
|
+
inclusive: !0,
|
|
906
|
+
input: r,
|
|
907
|
+
inst: e,
|
|
908
|
+
continue: !t.abort
|
|
909
|
+
});
|
|
910
|
+
};
|
|
911
|
+
}), nn = /*@__PURE__*/ O("$ZodCheckLengthEquals", (e, t) => {
|
|
912
|
+
var n;
|
|
913
|
+
N.init(e, t), (n = e._zod.def).when ?? (n.when = Jt), e._zod.check = (n) => {
|
|
914
|
+
let r = n.value, i = r.length, a = typeof r == "string" && i >= t.length && i <= t.length * 2 ? we(r) : i;
|
|
915
|
+
if (a === t.length) return;
|
|
916
|
+
let o = Te(r), s = a > t.length;
|
|
917
|
+
n.issues.push({
|
|
918
|
+
origin: o,
|
|
919
|
+
...s ? {
|
|
920
|
+
code: "too_big",
|
|
921
|
+
maximum: t.length
|
|
922
|
+
} : {
|
|
923
|
+
code: "too_small",
|
|
924
|
+
minimum: t.length
|
|
925
|
+
},
|
|
926
|
+
inclusive: !0,
|
|
927
|
+
exact: !0,
|
|
928
|
+
input: n.value,
|
|
929
|
+
inst: e,
|
|
930
|
+
continue: !t.abort
|
|
931
|
+
});
|
|
932
|
+
};
|
|
933
|
+
}), rn = /*@__PURE__*/ O("$ZodCheckStringFormat", (e, t) => {
|
|
934
|
+
var n, r;
|
|
935
|
+
N.init(e, t), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
|
|
936
|
+
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
937
|
+
origin: "string",
|
|
938
|
+
code: "invalid_format",
|
|
939
|
+
format: t.format,
|
|
940
|
+
input: n.value,
|
|
941
|
+
...t.pattern ? { pattern: t.pattern.toString() } : {},
|
|
942
|
+
inst: e,
|
|
943
|
+
continue: !t.abort
|
|
944
|
+
});
|
|
945
|
+
}) : (r = e._zod).check ?? (r.check = () => {});
|
|
946
|
+
}), an = /*@__PURE__*/ O("$ZodCheckRegex", (e, t) => {
|
|
947
|
+
rn.init(e, t), e._zod.check = (n) => {
|
|
948
|
+
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
949
|
+
origin: "string",
|
|
950
|
+
code: "invalid_format",
|
|
951
|
+
format: "regex",
|
|
952
|
+
input: n.value,
|
|
953
|
+
pattern: t.pattern.toString(),
|
|
954
|
+
inst: e,
|
|
955
|
+
continue: !t.abort
|
|
956
|
+
});
|
|
957
|
+
};
|
|
958
|
+
}), on = /*@__PURE__*/ O("$ZodCheckLowerCase", (e, t) => {
|
|
959
|
+
t.pattern ??= Kt, rn.init(e, t);
|
|
960
|
+
}), sn = /*@__PURE__*/ O("$ZodCheckUpperCase", (e, t) => {
|
|
961
|
+
t.pattern ??= qt, rn.init(e, t);
|
|
962
|
+
}), cn = /*@__PURE__*/ O("$ZodCheckIncludes", (e, t) => {
|
|
963
|
+
N.init(e, t);
|
|
964
|
+
let n = oe(t.includes);
|
|
965
|
+
t.pattern = new RegExp(typeof t.position == "number" ? `^.{${t.position},}${n}` : n), e._zod.check = (n) => {
|
|
966
|
+
n.value.includes(t.includes, t.position) || n.issues.push({
|
|
967
|
+
origin: "string",
|
|
968
|
+
code: "invalid_format",
|
|
969
|
+
format: "includes",
|
|
970
|
+
includes: t.includes,
|
|
971
|
+
input: n.value,
|
|
972
|
+
inst: e,
|
|
973
|
+
continue: !t.abort
|
|
974
|
+
});
|
|
975
|
+
};
|
|
976
|
+
}), ln = /*@__PURE__*/ O("$ZodCheckStartsWith", (e, t) => {
|
|
977
|
+
N.init(e, t);
|
|
978
|
+
let n = RegExp(`^${oe(t.prefix)}.*`);
|
|
979
|
+
t.pattern ??= n, e._zod.check = (n) => {
|
|
980
|
+
n.value.startsWith(t.prefix) || n.issues.push({
|
|
981
|
+
origin: "string",
|
|
982
|
+
code: "invalid_format",
|
|
983
|
+
format: "starts_with",
|
|
984
|
+
prefix: t.prefix,
|
|
985
|
+
input: n.value,
|
|
986
|
+
inst: e,
|
|
987
|
+
continue: !t.abort
|
|
988
|
+
});
|
|
989
|
+
};
|
|
990
|
+
}), un = /*@__PURE__*/ O("$ZodCheckEndsWith", (e, t) => {
|
|
991
|
+
N.init(e, t);
|
|
992
|
+
let n = RegExp(`.*${oe(t.suffix)}$`);
|
|
993
|
+
t.pattern ??= n, e._zod.check = (n) => {
|
|
994
|
+
n.value.endsWith(t.suffix) || n.issues.push({
|
|
995
|
+
origin: "string",
|
|
996
|
+
code: "invalid_format",
|
|
997
|
+
format: "ends_with",
|
|
998
|
+
suffix: t.suffix,
|
|
999
|
+
input: n.value,
|
|
1000
|
+
inst: e,
|
|
1001
|
+
continue: !t.abort
|
|
1002
|
+
});
|
|
1003
|
+
};
|
|
1004
|
+
}), dn = /*@__PURE__*/ O("$ZodCheckOverwrite", (e, t) => {
|
|
1005
|
+
N.init(e, t), e._zod.check = (e) => {
|
|
1006
|
+
e.value = t.tx(e.value);
|
|
1007
|
+
};
|
|
1008
|
+
}), fn = class {
|
|
1009
|
+
constructor(e = [], t = {}) {
|
|
1010
|
+
this.content = [], this.indent = 0, this.args = e, this.closed = t;
|
|
1011
|
+
}
|
|
1012
|
+
indented(e) {
|
|
1013
|
+
this.indent += 1;
|
|
1014
|
+
try {
|
|
1015
|
+
e(this);
|
|
1016
|
+
} finally {
|
|
1017
|
+
--this.indent;
|
|
1018
|
+
}
|
|
1019
|
+
}
|
|
1020
|
+
write(e) {
|
|
1021
|
+
if (typeof e == "function") {
|
|
1022
|
+
e(this, { execution: "sync" }), e(this, { execution: "async" });
|
|
1023
|
+
return;
|
|
1024
|
+
}
|
|
1025
|
+
let t = e.split("\n").filter((e) => e), n = Math.min(...t.map((e) => e.length - e.trimStart().length)), r = t.map((e) => e.slice(n)).map((e) => " ".repeat(this.indent * 2) + e);
|
|
1026
|
+
for (let e of r) this.content.push(e);
|
|
1027
|
+
}
|
|
1028
|
+
compile() {
|
|
1029
|
+
let e = Function, t = this?.content ?? [""];
|
|
1030
|
+
return new e(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${t.join("\n")}\n};`)(...Object.values(this.closed));
|
|
1031
|
+
}
|
|
1032
|
+
}, pn = {
|
|
1033
|
+
major: 4,
|
|
1034
|
+
minor: 6,
|
|
1035
|
+
patch: 7
|
|
1036
|
+
}, P = /*@__PURE__*/ O("$ZodType", (e, t) => {
|
|
1037
|
+
var n;
|
|
1038
|
+
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = pn;
|
|
1039
|
+
let r = e._zod.def.checks, i = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
|
|
1040
|
+
for (let t of i) for (let n of t._zod.onattach) n(e);
|
|
1041
|
+
if (i.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
|
|
1042
|
+
e._zod.run = e._zod.parse;
|
|
1043
|
+
});
|
|
1044
|
+
else {
|
|
1045
|
+
let t = (t, n, r) => {
|
|
1046
|
+
if (t.memo) return t;
|
|
1047
|
+
let i = x(t), a;
|
|
1048
|
+
for (let o of n) {
|
|
1049
|
+
if (o._zod.def.when) {
|
|
1050
|
+
if (ye(t) || !o._zod.def.when(t)) continue;
|
|
1051
|
+
} else if (i) continue;
|
|
1052
|
+
let n = t.issues.length, s = o._zod.check(t);
|
|
1053
|
+
if (s instanceof Promise && r?.async === !1) throw new k();
|
|
1054
|
+
if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
|
|
1055
|
+
await s, t.issues.length !== n && (Se(t.issues, n, e), i ||= x(t, n));
|
|
1056
|
+
});
|
|
1057
|
+
else {
|
|
1058
|
+
if (t.issues.length === n) continue;
|
|
1059
|
+
Se(t.issues, n, e), i ||= x(t, n);
|
|
1060
|
+
}
|
|
1061
|
+
}
|
|
1062
|
+
return a ? a.then(() => t) : t;
|
|
1063
|
+
}, n = (n, r, a) => {
|
|
1064
|
+
if (x(n)) return n.aborted = !0, n;
|
|
1065
|
+
let o = t(r, i, a);
|
|
1066
|
+
if (o instanceof Promise) {
|
|
1067
|
+
if (a.async === !1) throw new k();
|
|
1068
|
+
return o.then((t) => e._zod.parse(t, a));
|
|
1069
|
+
}
|
|
1070
|
+
return e._zod.parse(o, a);
|
|
1071
|
+
};
|
|
1072
|
+
e._zod.run = (r, a) => {
|
|
1073
|
+
if (a.skipChecks) return e._zod.parse(r, a);
|
|
1074
|
+
if (a.direction === "backward") {
|
|
1075
|
+
let t = e._zod.parse({
|
|
1076
|
+
value: r.value,
|
|
1077
|
+
issues: []
|
|
1078
|
+
}, {
|
|
1079
|
+
...a,
|
|
1080
|
+
skipChecks: !0
|
|
1081
|
+
});
|
|
1082
|
+
return t instanceof Promise ? t.then((e) => n(e, r, a)) : n(t, r, a);
|
|
1083
|
+
}
|
|
1084
|
+
let o = e._zod.parse(r, a);
|
|
1085
|
+
if (o instanceof Promise) {
|
|
1086
|
+
if (a.async === !1) throw new k();
|
|
1087
|
+
return o.then((e) => t(e, i, a));
|
|
1088
|
+
}
|
|
1089
|
+
return t(o, i, a);
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
}, {
|
|
1093
|
+
get "~standard"() {
|
|
1094
|
+
return Oe(this, "~standard", gn(this));
|
|
1095
|
+
},
|
|
1096
|
+
set "~standard"(e) {
|
|
1097
|
+
T(this, "~standard", e);
|
|
1098
|
+
}
|
|
1099
|
+
}), mn = (e, t) => e.issues.length ? { issues: e.issues.map((e) => C(e, t, j())) } : { value: e.value };
|
|
1100
|
+
async function hn(e, t) {
|
|
1101
|
+
let n = { async: !0 };
|
|
1102
|
+
return mn(await e._zod.run({
|
|
1103
|
+
value: t,
|
|
1104
|
+
issues: []
|
|
1105
|
+
}, n), n);
|
|
1106
|
+
}
|
|
1107
|
+
function gn(e) {
|
|
1108
|
+
return {
|
|
1109
|
+
validate: (t) => {
|
|
1110
|
+
let n = { async: !1 };
|
|
1111
|
+
try {
|
|
1112
|
+
let r = e._zod.run({
|
|
1113
|
+
value: t,
|
|
1114
|
+
issues: []
|
|
1115
|
+
}, n);
|
|
1116
|
+
if (!(r instanceof Promise)) return mn(r, n);
|
|
1117
|
+
} catch {}
|
|
1118
|
+
return hn(e, t);
|
|
1119
|
+
},
|
|
1120
|
+
vendor: "zod",
|
|
1121
|
+
version: 1
|
|
1122
|
+
};
|
|
1123
|
+
}
|
|
1124
|
+
var _n = /*@__PURE__*/ O("$ZodString", (e, t) => {
|
|
1125
|
+
P.init(e, t), e._zod.pattern = t.pattern ?? Ut, e._zod.parse = (n, r) => {
|
|
1126
|
+
if (t.coerce) try {
|
|
1127
|
+
n.value = String(n.value);
|
|
1128
|
+
} catch {}
|
|
1129
|
+
return typeof n.value == "string" || n.issues.push({
|
|
1130
|
+
expected: "string",
|
|
1131
|
+
code: "invalid_type",
|
|
1132
|
+
input: n.value,
|
|
1133
|
+
inst: e
|
|
1134
|
+
}), n;
|
|
1135
|
+
};
|
|
1136
|
+
}), F = /*@__PURE__*/ O("$ZodStringFormat", (e, t) => {
|
|
1137
|
+
rn.init(e, t), _n.init(e, t);
|
|
1138
|
+
}), vn = /*@__PURE__*/ O("$ZodGUID", (e, t) => {
|
|
1139
|
+
t.pattern ??= wt, F.init(e, t);
|
|
1140
|
+
}), yn = /*@__PURE__*/ O("$ZodUUID", (e, t) => {
|
|
1141
|
+
if (t.version) {
|
|
1142
|
+
let e = {
|
|
1143
|
+
v1: 1,
|
|
1144
|
+
v2: 2,
|
|
1145
|
+
v3: 3,
|
|
1146
|
+
v4: 4,
|
|
1147
|
+
v5: 5,
|
|
1148
|
+
v6: 6,
|
|
1149
|
+
v7: 7,
|
|
1150
|
+
v8: 8
|
|
1151
|
+
}[t.version];
|
|
1152
|
+
if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
|
|
1153
|
+
t.pattern ??= Tt(e);
|
|
1154
|
+
} else t.pattern ??= Tt();
|
|
1155
|
+
F.init(e, t);
|
|
1156
|
+
}), bn = /*@__PURE__*/ O("$ZodEmail", (e, t) => {
|
|
1157
|
+
t.pattern ??= Et, F.init(e, t);
|
|
1158
|
+
});
|
|
1159
|
+
function xn(e) {
|
|
1160
|
+
try {
|
|
1161
|
+
return typeof URL < "u" && typeof URL.canParse == "function" ? URL.canParse(e) : (new URL(e), !0);
|
|
1162
|
+
} catch {
|
|
1163
|
+
return !1;
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
function Sn(e, t) {
|
|
1167
|
+
return !("normalize" in t) && !("hostname" in t) && !("protocol" in t) ? xn(e) || 2 : Cn(e, t);
|
|
1168
|
+
}
|
|
1169
|
+
function Cn(e, t) {
|
|
1170
|
+
if (!t.normalize && t.protocol?.source === Ft.source && !/^https?:\/\//i.test(e)) return 1;
|
|
1171
|
+
try {
|
|
1172
|
+
if (typeof URL < "u") {
|
|
1173
|
+
let t = URL;
|
|
1174
|
+
if (typeof t.parse == "function") return t.parse(e) ?? 2;
|
|
1175
|
+
}
|
|
1176
|
+
return new URL(e);
|
|
1177
|
+
} catch {
|
|
1178
|
+
return 2;
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
var wn = /[\t\n\r]/g;
|
|
1182
|
+
function Tn(e) {
|
|
1183
|
+
return e.replace(wn, "");
|
|
1184
|
+
}
|
|
1185
|
+
function En(e, t) {
|
|
1186
|
+
return t.lastIndex = 0, t.test(e.hostname);
|
|
1187
|
+
}
|
|
1188
|
+
function Dn(e, t) {
|
|
1189
|
+
return t.lastIndex = 0, t.test(e.protocol.endsWith(":") ? e.protocol.slice(0, -1) : e.protocol);
|
|
1190
|
+
}
|
|
1191
|
+
var On = /*@__PURE__*/ O("$ZodURL", (e, t) => {
|
|
1192
|
+
F.init(e, t), e._zod.check = (n) => {
|
|
1193
|
+
try {
|
|
1194
|
+
let r = n.value.trim(), i = Sn(r, t);
|
|
1195
|
+
if (i === 1) {
|
|
1196
|
+
n.issues.push({
|
|
1197
|
+
code: "invalid_format",
|
|
1198
|
+
format: "url",
|
|
1199
|
+
note: "Invalid URL format",
|
|
1200
|
+
input: n.value,
|
|
1201
|
+
inst: e,
|
|
1202
|
+
continue: !t.abort
|
|
1203
|
+
});
|
|
1204
|
+
return;
|
|
1205
|
+
}
|
|
1206
|
+
if (i === 2) {
|
|
1207
|
+
n.issues.push({
|
|
1208
|
+
code: "invalid_format",
|
|
1209
|
+
format: "url",
|
|
1210
|
+
input: n.value,
|
|
1211
|
+
inst: e,
|
|
1212
|
+
continue: !t.abort
|
|
1213
|
+
});
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
if (i === !0) {
|
|
1217
|
+
n.value = Tn(r);
|
|
1218
|
+
return;
|
|
1219
|
+
}
|
|
1220
|
+
t.hostname && !En(i, t.hostname) && n.issues.push({
|
|
1221
|
+
code: "invalid_format",
|
|
1222
|
+
format: "url",
|
|
1223
|
+
note: "Invalid hostname",
|
|
1224
|
+
pattern: t.hostname.source,
|
|
1225
|
+
input: n.value,
|
|
1226
|
+
inst: e,
|
|
1227
|
+
continue: !t.abort
|
|
1228
|
+
}), t.protocol && !Dn(i, t.protocol) && n.issues.push({
|
|
1229
|
+
code: "invalid_format",
|
|
1230
|
+
format: "url",
|
|
1231
|
+
note: "Invalid protocol",
|
|
1232
|
+
pattern: t.protocol.source,
|
|
1233
|
+
input: n.value,
|
|
1234
|
+
inst: e,
|
|
1235
|
+
continue: !t.abort
|
|
1236
|
+
}), n.value = t.normalize ? i.href : Tn(r);
|
|
1237
|
+
return;
|
|
1238
|
+
} catch {
|
|
1239
|
+
n.issues.push({
|
|
1240
|
+
code: "invalid_format",
|
|
1241
|
+
format: "url",
|
|
1242
|
+
input: n.value,
|
|
1243
|
+
inst: e,
|
|
1244
|
+
continue: !t.abort
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1247
|
+
};
|
|
1248
|
+
}), kn = /*@__PURE__*/ O("$ZodEmoji", (e, t) => {
|
|
1249
|
+
t.pattern ??= Ot(), F.init(e, t);
|
|
1250
|
+
}), An = /*@__PURE__*/ O("$ZodNanoID", (e, t) => {
|
|
1251
|
+
if (t.length !== void 0 && (!Number.isInteger(t.length) || t.length < 1)) throw Error(`Invalid nanoid length: ${t.length}`);
|
|
1252
|
+
t.pattern ??= t.length === void 0 ? xt : St(t.length), F.init(e, t);
|
|
1253
|
+
}), jn = /*@__PURE__*/ O("$ZodCUID", (e, t) => {
|
|
1254
|
+
t.pattern ??= gt, F.init(e, t);
|
|
1255
|
+
}), Mn = /*@__PURE__*/ O("$ZodCUID2", (e, t) => {
|
|
1256
|
+
t.pattern ??= _t, F.init(e, t);
|
|
1257
|
+
}), Nn = /*@__PURE__*/ O("$ZodULID", (e, t) => {
|
|
1258
|
+
t.pattern ??= vt, F.init(e, t);
|
|
1259
|
+
}), Pn = /*@__PURE__*/ O("$ZodXID", (e, t) => {
|
|
1260
|
+
t.pattern ??= yt, F.init(e, t);
|
|
1261
|
+
}), Fn = /*@__PURE__*/ O("$ZodKSUID", (e, t) => {
|
|
1262
|
+
t.pattern ??= bt, F.init(e, t);
|
|
1263
|
+
}), In = /*@__PURE__*/ O("$ZodISODateTime", (e, t) => {
|
|
1264
|
+
t.pattern ??= Ht(t), F.init(e, t);
|
|
1265
|
+
}), Ln = /*@__PURE__*/ O("$ZodISODate", (e, t) => {
|
|
1266
|
+
t.pattern ??= zt, F.init(e, t);
|
|
1267
|
+
}), Rn = /*@__PURE__*/ O("$ZodISOTime", (e, t) => {
|
|
1268
|
+
t.pattern ??= Vt(t), F.init(e, t);
|
|
1269
|
+
}), zn = /*@__PURE__*/ O("$ZodISODuration", (e, t) => {
|
|
1270
|
+
t.pattern ??= Ct, F.init(e, t);
|
|
1271
|
+
}), Bn = /*@__PURE__*/ O("$ZodIPv4", (e, t) => {
|
|
1272
|
+
t.pattern ??= kt, F.init(e, t);
|
|
1273
|
+
}), Vn = /^[0-9a-fA-F:.]+$/;
|
|
1274
|
+
function Hn(e) {
|
|
1275
|
+
return Vn.test(e) ? xn(`http://[${e}]`) : !1;
|
|
1276
|
+
}
|
|
1277
|
+
var Un = /*@__PURE__*/ O("$ZodIPv6", (e, t) => {
|
|
1278
|
+
t.pattern ??= At, F.init(e, t), e._zod.check = (n) => {
|
|
1279
|
+
Hn(n.value) || n.issues.push({
|
|
1280
|
+
code: "invalid_format",
|
|
1281
|
+
format: "ipv6",
|
|
1282
|
+
input: n.value,
|
|
1283
|
+
inst: e,
|
|
1284
|
+
continue: !t.abort
|
|
1285
|
+
});
|
|
1286
|
+
};
|
|
1287
|
+
}), Wn = /*@__PURE__*/ O("$ZodCIDRv4", (e, t) => {
|
|
1288
|
+
t.pattern ??= jt, F.init(e, t);
|
|
1289
|
+
});
|
|
1290
|
+
function Gn(e) {
|
|
1291
|
+
let t = e.split("/");
|
|
1292
|
+
if (t.length !== 2) return !1;
|
|
1293
|
+
let [n, r] = t;
|
|
1294
|
+
if (!r) return !1;
|
|
1295
|
+
let i = Number(r);
|
|
1296
|
+
return `${i}` !== r || i < 0 || i > 128 ? !1 : Hn(n);
|
|
1297
|
+
}
|
|
1298
|
+
var Kn = /*@__PURE__*/ O("$ZodCIDRv6", (e, t) => {
|
|
1299
|
+
t.pattern ??= Mt, F.init(e, t), e._zod.check = (n) => {
|
|
1300
|
+
Gn(n.value) || n.issues.push({
|
|
1301
|
+
code: "invalid_format",
|
|
1302
|
+
format: "cidrv6",
|
|
1303
|
+
input: n.value,
|
|
1304
|
+
inst: e,
|
|
1305
|
+
continue: !t.abort
|
|
1306
|
+
});
|
|
1307
|
+
};
|
|
1308
|
+
});
|
|
1309
|
+
function qn(e) {
|
|
1310
|
+
if (e === "") return !0;
|
|
1311
|
+
if (/\s/.test(e) || e.length % 4 != 0) return !1;
|
|
1312
|
+
try {
|
|
1313
|
+
return atob(e), !0;
|
|
1314
|
+
} catch {
|
|
1315
|
+
return !1;
|
|
1316
|
+
}
|
|
1317
|
+
}
|
|
1318
|
+
var Jn = /^[0-9a-zA-Z+/]*={0,2}$/, Yn = /*@__PURE__*/ O("$ZodBase64", (e, t) => {
|
|
1319
|
+
t.pattern ??= Jn, F.init(e, t), e._zod.check = (n) => {
|
|
1320
|
+
qn(n.value) || n.issues.push({
|
|
1321
|
+
code: "invalid_format",
|
|
1322
|
+
format: "base64",
|
|
1323
|
+
input: n.value,
|
|
1324
|
+
inst: e,
|
|
1325
|
+
continue: !t.abort
|
|
1326
|
+
});
|
|
1327
|
+
};
|
|
1328
|
+
}), Xn = /^[A-Za-z0-9_-]*$/;
|
|
1329
|
+
function Zn(e) {
|
|
1330
|
+
if (!Xn.test(e)) return !1;
|
|
1331
|
+
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
1332
|
+
return qn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
1333
|
+
}
|
|
1334
|
+
var Qn = /*@__PURE__*/ O("$ZodBase64URL", (e, t) => {
|
|
1335
|
+
t.pattern ??= Xn, F.init(e, t), e._zod.check = (n) => {
|
|
1336
|
+
Zn(n.value) || n.issues.push({
|
|
1337
|
+
code: "invalid_format",
|
|
1338
|
+
format: "base64url",
|
|
1339
|
+
input: n.value,
|
|
1340
|
+
inst: e,
|
|
1341
|
+
continue: !t.abort
|
|
1342
|
+
});
|
|
1343
|
+
};
|
|
1344
|
+
}), $n = /*@__PURE__*/ O("$ZodE164", (e, t) => {
|
|
1345
|
+
t.pattern ??= It, F.init(e, t);
|
|
1346
|
+
});
|
|
1347
|
+
function er(e, t = null) {
|
|
1348
|
+
try {
|
|
1349
|
+
let n = e.split(".");
|
|
1350
|
+
if (n.length !== 3) return !1;
|
|
1351
|
+
let [r] = n;
|
|
1352
|
+
if (!r) return !1;
|
|
1353
|
+
let i = JSON.parse(atob(r));
|
|
1354
|
+
return !("typ" in i && i?.typ !== "JWT" || !i.alg || t && (!("alg" in i) || i.alg !== t));
|
|
1355
|
+
} catch {
|
|
1356
|
+
return !1;
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
var tr = /*@__PURE__*/ O("$ZodJWT", (e, t) => {
|
|
1360
|
+
F.init(e, t), e._zod.check = (n) => {
|
|
1361
|
+
er(n.value, t.alg) || n.issues.push({
|
|
1362
|
+
code: "invalid_format",
|
|
1363
|
+
format: "jwt",
|
|
1364
|
+
input: n.value,
|
|
1365
|
+
inst: e,
|
|
1366
|
+
continue: !t.abort
|
|
1367
|
+
});
|
|
1368
|
+
};
|
|
1369
|
+
}), nr = /*@__PURE__*/ O("$ZodNumber", (e, t) => {
|
|
1370
|
+
P.init(e, t), e._zod.pattern = Wt, e._zod.parse = (n, r) => {
|
|
1371
|
+
if (t.coerce) try {
|
|
1372
|
+
n.value = Number(n.value);
|
|
1373
|
+
} catch {}
|
|
1374
|
+
let i = n.value;
|
|
1375
|
+
if (typeof i == "number" && !Number.isNaN(i) && Number.isFinite(i)) return n;
|
|
1376
|
+
let a = typeof i == "number" ? Number.isNaN(i) ? "NaN" : Number.isFinite(i) ? void 0 : String(i) : void 0;
|
|
1377
|
+
return n.issues.push({
|
|
1378
|
+
expected: "number",
|
|
1379
|
+
code: "invalid_type",
|
|
1380
|
+
input: i,
|
|
1381
|
+
inst: e,
|
|
1382
|
+
...a ? { received: a } : {}
|
|
1383
|
+
}), n;
|
|
1384
|
+
};
|
|
1385
|
+
}), rr = /*@__PURE__*/ O("$ZodNumberFormat", (e, t) => {
|
|
1386
|
+
$t.init(e, t), nr.init(e, t);
|
|
1387
|
+
}), ir = /*@__PURE__*/ O("$ZodBoolean", (e, t) => {
|
|
1388
|
+
P.init(e, t), e._zod.pattern = Gt, e._zod.parse = (n, r) => {
|
|
1389
|
+
if (t.coerce) try {
|
|
1390
|
+
n.value = !!n.value;
|
|
1391
|
+
} catch {}
|
|
1392
|
+
let i = n.value;
|
|
1393
|
+
return typeof i == "boolean" || n.issues.push({
|
|
1394
|
+
expected: "boolean",
|
|
1395
|
+
code: "invalid_type",
|
|
1396
|
+
input: i,
|
|
1397
|
+
inst: e
|
|
1398
|
+
}), n;
|
|
1399
|
+
};
|
|
1400
|
+
}), ar = /*@__PURE__*/ O("$ZodUnknown", (e, t) => {
|
|
1401
|
+
P.init(e, t), e._zod.parse = (e) => e;
|
|
1402
|
+
}), or = /*@__PURE__*/ O("$ZodNever", (e, t) => {
|
|
1403
|
+
P.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
1404
|
+
expected: "never",
|
|
1405
|
+
code: "invalid_type",
|
|
1406
|
+
input: t.value,
|
|
1407
|
+
inst: e
|
|
1408
|
+
}), t);
|
|
1409
|
+
});
|
|
1410
|
+
function sr(e, t) {
|
|
1411
|
+
let n = xe(e._zod.def.checks);
|
|
1412
|
+
if (!n.length) return;
|
|
1413
|
+
let r = Math.min(...n.map((e) => e[0])), i = e._zod.parse;
|
|
1414
|
+
e._zod.parse = (n, a) => {
|
|
1415
|
+
let o = t(n.value);
|
|
1416
|
+
if (o > r && !a?.skipChecks && a?.direction !== "backward") {
|
|
1417
|
+
for (let [t, r] of xe(e._zod.def.checks)) if (o > t && r._zod.def.when(n)) {
|
|
1418
|
+
let t = n.issues.length;
|
|
1419
|
+
return r._zod.check(n), n.issues[t].continue = !1, Se(n.issues, t, e), n;
|
|
1420
|
+
}
|
|
1421
|
+
}
|
|
1422
|
+
return i(n, a);
|
|
1423
|
+
};
|
|
1424
|
+
}
|
|
1425
|
+
var cr = (e) => Array.isArray(e) ? e.length : -1;
|
|
1426
|
+
function lr(e, t, n) {
|
|
1427
|
+
e.issues.length && t.issues.push(...be(n, e.issues)), t.value[n] = e.value;
|
|
1428
|
+
}
|
|
1429
|
+
var ur = /*@__PURE__*/ O("$ZodArray", (e, t) => {
|
|
1430
|
+
P.init(e, t);
|
|
1431
|
+
let n = A.memoizer;
|
|
1432
|
+
n?.attach(e), e._zod.parse = (r, i) => {
|
|
1433
|
+
let a = r.value;
|
|
1434
|
+
if (!Array.isArray(a)) return r.issues.push({
|
|
1435
|
+
expected: "array",
|
|
1436
|
+
code: "invalid_type",
|
|
1437
|
+
input: a,
|
|
1438
|
+
inst: e
|
|
1439
|
+
}), r;
|
|
1440
|
+
r.value = n ? n.alloc(e, r, Array(a.length), i) : Array(a.length);
|
|
1441
|
+
let o = [], s = i?.abortEarly;
|
|
1442
|
+
for (let e = 0; e < a.length; e++) {
|
|
1443
|
+
let n = a[e], c = t.element._zod.run({
|
|
1444
|
+
value: n,
|
|
1445
|
+
issues: []
|
|
1446
|
+
}, i);
|
|
1447
|
+
if (c instanceof Promise) o.push(c.then((t) => lr(t, r, e)));
|
|
1448
|
+
else if (lr(c, r, e), s && c.issues.length !== 0 && x(c)) break;
|
|
1449
|
+
}
|
|
1450
|
+
return o.length ? Promise.all(o).then(() => r) : r;
|
|
1451
|
+
}, sr(e, cr);
|
|
1452
|
+
});
|
|
1453
|
+
function I(e, t, n, r, i, a) {
|
|
1454
|
+
let o = n in r, s = a === "optional";
|
|
1455
|
+
if (!(!o && s && i === "optional")) {
|
|
1456
|
+
if (e.issues.length) {
|
|
1457
|
+
if (i !== void 0 && s && !o) return;
|
|
1458
|
+
t.issues.push(...be(n, e.issues));
|
|
1459
|
+
}
|
|
1460
|
+
if (!o && i === void 0) {
|
|
1461
|
+
e.issues.length || t.issues.push({
|
|
1462
|
+
code: "invalid_type",
|
|
1463
|
+
expected: "nonoptional",
|
|
1464
|
+
input: void 0,
|
|
1465
|
+
path: [n]
|
|
1466
|
+
});
|
|
1467
|
+
return;
|
|
1468
|
+
}
|
|
1469
|
+
e.value === void 0 ? (o || i === "defaulted" && !s) && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
var dr = [];
|
|
1473
|
+
function fr(e) {
|
|
1474
|
+
let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : dr, i = r.length ? [...t, ...r] : t;
|
|
1475
|
+
for (let t of i) if (!e.shape?.[t]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);
|
|
1476
|
+
let a = ce(e.shape);
|
|
1477
|
+
return {
|
|
1478
|
+
...e,
|
|
1479
|
+
allKeys: i,
|
|
1480
|
+
symbolKeys: r,
|
|
1481
|
+
keySet: new Set(t),
|
|
1482
|
+
numKeys: t.length,
|
|
1483
|
+
optionalKeys: new Set(a)
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
function pr(e, t, n, r, i, a, o) {
|
|
1487
|
+
let s = [], c = i.keySet, l = i.catchall._zod, u = l.def.type, d = l.optin, f = l.optout, p = 0;
|
|
1488
|
+
for (let i in t) {
|
|
1489
|
+
if (o && n.issues.length !== p) {
|
|
1490
|
+
if (x(n, p)) break;
|
|
1491
|
+
p = n.issues.length;
|
|
1492
|
+
}
|
|
1493
|
+
if (c.has(i)) continue;
|
|
1494
|
+
if (i === "__proto__") {
|
|
1495
|
+
u === "never" && s.push(i);
|
|
1496
|
+
continue;
|
|
1497
|
+
}
|
|
1498
|
+
if (u === "never") {
|
|
1499
|
+
s.push(i);
|
|
1500
|
+
continue;
|
|
1501
|
+
}
|
|
1502
|
+
let a = l.run({
|
|
1503
|
+
value: t[i],
|
|
1504
|
+
issues: []
|
|
1505
|
+
}, r);
|
|
1506
|
+
a instanceof Promise ? e.push(a.then((e) => I(e, n, i, t, d, f))) : I(a, n, i, t, d, f);
|
|
1507
|
+
}
|
|
1508
|
+
return s.length && n.issues.push({
|
|
1509
|
+
code: "unrecognized_keys",
|
|
1510
|
+
keys: s,
|
|
1511
|
+
input: t,
|
|
1512
|
+
inst: a,
|
|
1513
|
+
continue: !0
|
|
1514
|
+
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1515
|
+
}
|
|
1516
|
+
var mr = /*@__PURE__*/ O("$ZodObject", (e, t) => {
|
|
1517
|
+
P.init(e, t);
|
|
1518
|
+
let n = Object.getOwnPropertyDescriptor(t, "shape"), r = n?.get ? n.get.raw : t.shape ?? {};
|
|
1519
|
+
if (r) {
|
|
1520
|
+
let e = () => {
|
|
1521
|
+
let n = { ...r };
|
|
1522
|
+
return Object.defineProperty(t, "shape", { value: n }), e.raw = n, n;
|
|
1523
|
+
};
|
|
1524
|
+
e.raw = r, Object.defineProperty(t, "shape", { get: e });
|
|
1525
|
+
}
|
|
1526
|
+
let a = i(() => fr(t));
|
|
1527
|
+
D(e, "propValues", (e) => {
|
|
1528
|
+
let t = e.def.shape, n = {};
|
|
1529
|
+
for (let e in t) {
|
|
1530
|
+
let r = t[e]._zod;
|
|
1531
|
+
if (r.values) {
|
|
1532
|
+
Object.prototype.hasOwnProperty.call(n, e) || c(n, e, /* @__PURE__ */ new Set());
|
|
1533
|
+
for (let t of r.values) n[e].add(t);
|
|
1534
|
+
r.optin !== void 0 && n[e].add(void 0);
|
|
1535
|
+
}
|
|
1536
|
+
}
|
|
1537
|
+
return n;
|
|
1538
|
+
});
|
|
1539
|
+
let o = g, s = t.catchall, l, u = A.memoizer;
|
|
1540
|
+
u?.attach(e), e._zod.parse = (t, n) => {
|
|
1541
|
+
l ??= a.value;
|
|
1542
|
+
let r = t.value;
|
|
1543
|
+
if (!o(r)) return t.issues.push({
|
|
1544
|
+
expected: "object",
|
|
1545
|
+
code: "invalid_type",
|
|
1546
|
+
input: r,
|
|
1547
|
+
inst: e
|
|
1548
|
+
}), t;
|
|
1549
|
+
t.value = u ? u.alloc(e, t, {}, n) : {};
|
|
1550
|
+
let i = [], c = l.shape, d = n?.abortEarly, f = t.issues.length;
|
|
1551
|
+
for (let e of l.allKeys) {
|
|
1552
|
+
if (d && t.issues.length !== f) {
|
|
1553
|
+
if (x(t, f)) break;
|
|
1554
|
+
f = t.issues.length;
|
|
1555
|
+
}
|
|
1556
|
+
if (e === "__proto__") continue;
|
|
1557
|
+
let a = c[e], o = a._zod.optin, s = a._zod.optout, l = a._zod.run({
|
|
1558
|
+
value: r[e],
|
|
1559
|
+
issues: []
|
|
1560
|
+
}, n);
|
|
1561
|
+
l instanceof Promise ? i.push(l.then((n) => I(n, t, e, r, o, s))) : I(l, t, e, r, o, s);
|
|
1562
|
+
}
|
|
1563
|
+
return s ? pr(i, r, t, n, a.value, e, d === !0) : i.length ? Promise.all(i).then(() => t) : t;
|
|
1564
|
+
};
|
|
1565
|
+
}), hr = /*@__PURE__*/ O("$ZodObjectJIT", (e, t) => {
|
|
1566
|
+
mr.init(e, t);
|
|
1567
|
+
let n = e._zod.parse, r = i(() => fr(t)), a = A.memoizer, o = (t) => {
|
|
1568
|
+
let n = r.value, i = n.symbolKeys, o = new fn(["payload", "ctx"], {
|
|
1569
|
+
shape: t,
|
|
1570
|
+
inst: e,
|
|
1571
|
+
memo: a,
|
|
1572
|
+
syms: i
|
|
1573
|
+
}), s = (e) => `shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`, c = (e, t) => `
|
|
1574
|
+
let ${e}_ab = false;
|
|
1575
|
+
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
1576
|
+
const iss = ${e}.issues[i];
|
|
1577
|
+
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
1578
|
+
payload.issues.push(iss);
|
|
1579
|
+
if (iss.continue !== true) ${e}_ab = true;
|
|
1580
|
+
}
|
|
1581
|
+
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
1582
|
+
payload.value = newResult;
|
|
1583
|
+
return payload;
|
|
1584
|
+
}`;
|
|
1585
|
+
o.write("const input = payload.value;");
|
|
1586
|
+
let l = Object.create(null), u = 0;
|
|
1587
|
+
for (let e of n.allKeys) l[e] = `key_${u++}`;
|
|
1588
|
+
o.write(a ? "const newResult = memo.alloc(inst, payload, {}, ctx);" : "const newResult = {};");
|
|
1589
|
+
for (let e of n.allKeys) {
|
|
1590
|
+
if (e === "__proto__") continue;
|
|
1591
|
+
let n = l[e], r = typeof e == "symbol" ? `syms[${i.indexOf(e)}]` : ee(e), a = `${r} in input`, u = t[e], d = u?._zod?.optin, f = d !== void 0, p = u?._zod?.optout === "optional";
|
|
1592
|
+
if (o.write(`const ${n} = ${s(r)};`), f && p) {
|
|
1593
|
+
let e = d === "optional" ? `${n}_present` : `${n}.value !== undefined || ${n}_present`;
|
|
1594
|
+
o.write(`
|
|
1595
|
+
const ${n}_present = ${a};
|
|
1596
|
+
if (!${n}.issues.length || ${n}_present) {
|
|
1597
|
+
if (${n}.issues.length) {${c(n, r)}
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
if (${e}) {
|
|
1601
|
+
newResult[${r}] = ${n}.value;
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
`);
|
|
1606
|
+
} else f ? (o.write(`
|
|
1607
|
+
if (${n}.issues.length) {${c(n, r)}
|
|
1608
|
+
}
|
|
1609
|
+
`), d === "defaulted" ? o.write(`newResult[${r}] = ${n}.value;`) : o.write(`
|
|
1610
|
+
if (${n}.value !== undefined || ${a}) {
|
|
1611
|
+
newResult[${r}] = ${n}.value;
|
|
1612
|
+
}
|
|
1613
|
+
`)) : o.write(`
|
|
1614
|
+
const ${n}_present = ${a};
|
|
1615
|
+
if (${n}.issues.length) {${c(n, r)}
|
|
1616
|
+
}
|
|
1617
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
1618
|
+
payload.issues.push({
|
|
1619
|
+
code: "invalid_type",
|
|
1620
|
+
expected: "nonoptional",
|
|
1621
|
+
input: undefined,
|
|
1622
|
+
path: [${r}]
|
|
1623
|
+
});
|
|
1624
|
+
if (ctx && ctx.abortEarly) {
|
|
1625
|
+
payload.value = newResult;
|
|
1626
|
+
return payload;
|
|
1627
|
+
}
|
|
1628
|
+
}
|
|
1629
|
+
|
|
1630
|
+
if (${n}_present) {
|
|
1631
|
+
newResult[${r}] = ${n}.value;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
`);
|
|
1635
|
+
}
|
|
1636
|
+
return o.write("payload.value = newResult;"), o.write("return payload;"), o.compile();
|
|
1637
|
+
}, s, c = g, l = !A.jitless, u = l && re.value, d = t.catchall, f;
|
|
1638
|
+
e._zod.parse = (i, a) => {
|
|
1639
|
+
f ??= r.value;
|
|
1640
|
+
let p = i.value;
|
|
1641
|
+
return c(p) ? l && u && a?.async === !1 && a.jitless !== !0 ? (s ||= o(t.shape), i = s(i, a), d ? pr([], p, i, a, f, e, a?.abortEarly === !0) : i) : n(i, a) : (i.issues.push({
|
|
1642
|
+
expected: "object",
|
|
1643
|
+
code: "invalid_type",
|
|
1644
|
+
input: p,
|
|
1645
|
+
inst: e
|
|
1646
|
+
}), i);
|
|
1647
|
+
};
|
|
1648
|
+
});
|
|
1649
|
+
function gr(e, t, n, r) {
|
|
1650
|
+
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
1651
|
+
let i = e.filter((e) => !x(e));
|
|
1652
|
+
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
1653
|
+
code: "invalid_union",
|
|
1654
|
+
input: t.value,
|
|
1655
|
+
inst: n,
|
|
1656
|
+
errors: e.map((e) => e.issues.map((e) => C(e, r, j())))
|
|
1657
|
+
}), t);
|
|
1658
|
+
}
|
|
1659
|
+
var _r = /*@__PURE__*/ O("$ZodUnion", (e, t) => {
|
|
1660
|
+
P.init(e, t), D(e, "optin", (e) => e.def.options.some((e) => e._zod.optin === "defaulted") ? "defaulted" : e.def.options.some((e) => e._zod.optin !== void 0) ? "optional" : void 0), D(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), D(e, "values", (e) => {
|
|
1661
|
+
if (e.def.options.every((e) => e._zod.values)) return new Set(e.def.options.flatMap((e) => Array.from(e._zod.values)));
|
|
1662
|
+
}), D(e, "pattern", (e) => {
|
|
1663
|
+
if (e.def.options.every((e) => e._zod.pattern)) {
|
|
1664
|
+
let t = e.def.options.map((e) => e._zod.pattern);
|
|
1665
|
+
return RegExp(`^(${t.map((e) => o(e.source)).join("|")})$`);
|
|
1666
|
+
}
|
|
1667
|
+
});
|
|
1668
|
+
let n = t.options.length === 1 ? t.options[0]._zod.run : null;
|
|
1669
|
+
e._zod.parse = (r, i) => {
|
|
1670
|
+
if (n) return n(r, i);
|
|
1671
|
+
let a = !1, o = [];
|
|
1672
|
+
for (let e of t.options) {
|
|
1673
|
+
let t = e._zod.run({
|
|
1674
|
+
value: r.value,
|
|
1675
|
+
issues: []
|
|
1676
|
+
}, i);
|
|
1677
|
+
if (t instanceof Promise) o.push(t), a = !0;
|
|
1678
|
+
else {
|
|
1679
|
+
if (t.issues.length === 0) return t;
|
|
1680
|
+
o.push(t);
|
|
1681
|
+
}
|
|
1682
|
+
}
|
|
1683
|
+
return a ? Promise.all(o).then((t) => gr(t, r, e, i)) : gr(o, r, e, i);
|
|
1684
|
+
};
|
|
1685
|
+
}), vr = /*@__PURE__*/ O("$ZodIntersection", (e, t) => {
|
|
1686
|
+
P.init(e, t), e._zod.parse = (e, n) => {
|
|
1687
|
+
let r = e.value, i = t.left._zod.run({
|
|
1688
|
+
value: r,
|
|
1689
|
+
issues: []
|
|
1690
|
+
}, n), a = t.right._zod.run({
|
|
1691
|
+
value: r,
|
|
1692
|
+
issues: []
|
|
1693
|
+
}, n);
|
|
1694
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => br(e, t, n)) : br(e, i, a);
|
|
1695
|
+
};
|
|
1696
|
+
});
|
|
1697
|
+
function yr(e, t) {
|
|
1698
|
+
if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
|
|
1699
|
+
valid: !0,
|
|
1700
|
+
data: e
|
|
1701
|
+
};
|
|
1702
|
+
if (_(e) && _(t)) {
|
|
1703
|
+
let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
|
|
1704
|
+
...e,
|
|
1705
|
+
...t
|
|
1706
|
+
};
|
|
1707
|
+
Object.prototype.hasOwnProperty.call(i, "__proto__") && delete i.__proto__;
|
|
1708
|
+
for (let n of r) {
|
|
1709
|
+
if (n === "__proto__") continue;
|
|
1710
|
+
let r = yr(e[n], t[n]);
|
|
1711
|
+
if (!r.valid) return {
|
|
1712
|
+
valid: !1,
|
|
1713
|
+
mergeErrorPath: [n, ...r.mergeErrorPath]
|
|
1714
|
+
};
|
|
1715
|
+
i[n] = r.data;
|
|
1716
|
+
}
|
|
1717
|
+
return {
|
|
1718
|
+
valid: !0,
|
|
1719
|
+
data: i
|
|
1720
|
+
};
|
|
1721
|
+
}
|
|
1722
|
+
if (Array.isArray(e) && Array.isArray(t)) {
|
|
1723
|
+
if (e.length !== t.length) return {
|
|
1724
|
+
valid: !1,
|
|
1725
|
+
mergeErrorPath: []
|
|
1726
|
+
};
|
|
1727
|
+
let n = [];
|
|
1728
|
+
for (let r = 0; r < e.length; r++) {
|
|
1729
|
+
let i = e[r], a = t[r], o = yr(i, a);
|
|
1730
|
+
if (!o.valid) return {
|
|
1731
|
+
valid: !1,
|
|
1732
|
+
mergeErrorPath: [r, ...o.mergeErrorPath]
|
|
1733
|
+
};
|
|
1734
|
+
n.push(o.data);
|
|
1735
|
+
}
|
|
1736
|
+
return {
|
|
1737
|
+
valid: !0,
|
|
1738
|
+
data: n
|
|
1739
|
+
};
|
|
1740
|
+
}
|
|
1741
|
+
return {
|
|
1742
|
+
valid: !1,
|
|
1743
|
+
mergeErrorPath: []
|
|
1744
|
+
};
|
|
1745
|
+
}
|
|
1746
|
+
function br(e, t, n) {
|
|
1747
|
+
let r = /* @__PURE__ */ new Map(), i, a = /* @__PURE__ */ new Map(), o = (e, t) => {
|
|
1748
|
+
let n;
|
|
1749
|
+
if (e.code === "unrecognized_keys" && !e.path?.length) i ??= e, n = e.keys;
|
|
1750
|
+
else if (e.code === "invalid_key" && e.origin === "record" && e.path?.length === 1) {
|
|
1751
|
+
let t = String(e.path[0]);
|
|
1752
|
+
a.has(t) || a.set(t, e), n = [t];
|
|
1753
|
+
} else return !1;
|
|
1754
|
+
for (let e of n) r.has(e) || r.set(e, {}), r.get(e)[t] = !0;
|
|
1755
|
+
return !0;
|
|
1756
|
+
};
|
|
1757
|
+
for (let n of t.issues) o(n, "l") || e.issues.push(n);
|
|
1758
|
+
for (let t of n.issues) o(t, "r") || e.issues.push(t);
|
|
1759
|
+
let s = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e);
|
|
1760
|
+
if (s.length) {
|
|
1761
|
+
let t = i ? s.filter((e) => i.keys.includes(e)) : [];
|
|
1762
|
+
t.length && e.issues.push({
|
|
1763
|
+
...i,
|
|
1764
|
+
keys: t
|
|
1765
|
+
});
|
|
1766
|
+
for (let n of s) !t.includes(n) && a.has(n) && e.issues.push(a.get(n));
|
|
1767
|
+
}
|
|
1768
|
+
let c = yr(t.value, n.value);
|
|
1769
|
+
if (!c.valid) {
|
|
1770
|
+
if (x(e)) return e;
|
|
1771
|
+
throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);
|
|
1772
|
+
}
|
|
1773
|
+
return e.value = c.data, e;
|
|
1774
|
+
}
|
|
1775
|
+
var xr = /*@__PURE__*/ O("$ZodEnum", (t, n) => {
|
|
1776
|
+
P.init(t, n);
|
|
1777
|
+
let r = e(n.entries), i = new Set(r);
|
|
1778
|
+
t._zod.values = i, D(t, "pattern", (t) => {
|
|
1779
|
+
let n = e(t.def.entries).filter((e) => ae.has(typeof e));
|
|
1780
|
+
return RegExp(n.length ? `^(${n.map((e) => oe(e.toString())).join("|")})$` : "^[^\\s\\S]$");
|
|
1781
|
+
}), t._zod.parse = (e, n) => {
|
|
1782
|
+
let a = e.value;
|
|
1783
|
+
return i.has(a) || e.issues.push({
|
|
1784
|
+
code: "invalid_value",
|
|
1785
|
+
values: r,
|
|
1786
|
+
input: a,
|
|
1787
|
+
inst: t
|
|
1788
|
+
}), e;
|
|
1789
|
+
};
|
|
1790
|
+
}), Sr = /*@__PURE__*/ O("$ZodTransform", (e, t) => {
|
|
1791
|
+
P.init(e, t), e._zod.optin = "optional", A.memoizer?.guard(e), e._zod.parse = (n, r) => {
|
|
1792
|
+
if (r.direction === "backward") throw new Ve(e.constructor.name);
|
|
1793
|
+
let i = t.transform(n.value, n);
|
|
1794
|
+
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n));
|
|
1795
|
+
if (i instanceof Promise) throw new k();
|
|
1796
|
+
return n.value = i, n;
|
|
1797
|
+
};
|
|
1798
|
+
});
|
|
1799
|
+
function Cr(e, t) {
|
|
1800
|
+
return e.value = t.issues.length ? void 0 : t.value, e;
|
|
1801
|
+
}
|
|
1802
|
+
var wr = /*@__PURE__*/ O("$ZodOptional", (e, t) => {
|
|
1803
|
+
P.init(e, t), D(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", D(e, "values", (e) => {
|
|
1804
|
+
let t = e.def.innerType._zod.values;
|
|
1805
|
+
return t ? /* @__PURE__ */ new Set([...t, void 0]) : void 0;
|
|
1806
|
+
}), D(e, "pattern", (e) => {
|
|
1807
|
+
let t = e.def.innerType._zod.pattern;
|
|
1808
|
+
return t ? RegExp(`^(${o(t.source)})?$`) : void 0;
|
|
1809
|
+
}), e._zod.parse = (e, n) => {
|
|
1810
|
+
if (e.value === void 0) {
|
|
1811
|
+
if (t.innerType._zod.optin !== "defaulted") return e;
|
|
1812
|
+
let r = t.innerType._zod.run({
|
|
1813
|
+
value: e.value,
|
|
1814
|
+
issues: []
|
|
1815
|
+
}, n);
|
|
1816
|
+
return r instanceof Promise ? r.then((t) => Cr(e, t)) : Cr(e, r);
|
|
1817
|
+
}
|
|
1818
|
+
return t.innerType._zod.run(e, n);
|
|
1819
|
+
};
|
|
1820
|
+
}), Tr = /*@__PURE__*/ O("$ZodExactOptional", (e, t) => {
|
|
1821
|
+
wr.init(e, t), D(e, "values", (e) => e.def.innerType._zod.values), D(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
1822
|
+
}), Er = /*@__PURE__*/ O("$ZodNullable", (e, t) => {
|
|
1823
|
+
P.init(e, t), D(e, "optin", (e) => e.def.innerType._zod.optin), D(e, "optout", (e) => e.def.innerType._zod.optout), D(e, "pattern", (e) => {
|
|
1824
|
+
let t = e.def.innerType._zod.pattern;
|
|
1825
|
+
return t ? RegExp(`^(${o(t.source)}|null)$`) : void 0;
|
|
1826
|
+
}), D(e, "values", (e) => e.def.innerType._zod.values ? /* @__PURE__ */ new Set([...e.def.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
|
|
1827
|
+
}), Dr = /*@__PURE__*/ O("$ZodDefault", (e, t) => {
|
|
1828
|
+
P.init(e, t), e._zod.optin = "defaulted", D(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1829
|
+
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1830
|
+
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
1831
|
+
let r = t.innerType._zod.run(e, n);
|
|
1832
|
+
return r instanceof Promise ? r.then((e) => Or(e, t)) : Or(r, t);
|
|
1833
|
+
};
|
|
1834
|
+
});
|
|
1835
|
+
function Or(e, t) {
|
|
1836
|
+
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1837
|
+
}
|
|
1838
|
+
var kr = /*@__PURE__*/ O("$ZodPrefault", (e, t) => {
|
|
1839
|
+
P.init(e, t), e._zod.optin = "defaulted", D(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
|
|
1840
|
+
}), Ar = /*@__PURE__*/ O("$ZodNonOptional", (e, t) => {
|
|
1841
|
+
P.init(e, t), D(e, "values", (e) => {
|
|
1842
|
+
let t = e.def.innerType._zod.values;
|
|
1843
|
+
return t ? new Set([...t].filter((e) => e !== void 0)) : void 0;
|
|
1844
|
+
}), e._zod.parse = (n, r) => {
|
|
1845
|
+
let i = t.innerType._zod.run(n, r);
|
|
1846
|
+
return i instanceof Promise ? i.then((t) => jr(t, e)) : jr(i, e);
|
|
1847
|
+
};
|
|
1848
|
+
});
|
|
1849
|
+
function jr(e, t) {
|
|
1850
|
+
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
1851
|
+
code: "invalid_type",
|
|
1852
|
+
expected: "nonoptional",
|
|
1853
|
+
input: e.value,
|
|
1854
|
+
inst: t
|
|
1855
|
+
}), e;
|
|
1856
|
+
}
|
|
1857
|
+
function Mr(e, t, n, r) {
|
|
1858
|
+
return t.issues.length ? (e.value = n.catchValue({
|
|
1859
|
+
...t,
|
|
1860
|
+
value: e.value,
|
|
1861
|
+
error: { issues: t.issues.map((e) => C(e, r, j())) },
|
|
1862
|
+
input: e.value
|
|
1863
|
+
}), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
|
|
1864
|
+
}
|
|
1865
|
+
var Nr = /*@__PURE__*/ O("$ZodCatch", (e, t) => {
|
|
1866
|
+
P.init(e, t), D(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), D(e, "optout", (e) => e.def.innerType._zod.optout), D(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1867
|
+
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1868
|
+
let r = t.innerType._zod.run({
|
|
1869
|
+
value: e.value,
|
|
1870
|
+
issues: []
|
|
1871
|
+
}, n);
|
|
1872
|
+
return r instanceof Promise ? r.then((r) => Mr(e, r, t, n)) : Mr(e, r, t, n);
|
|
1873
|
+
};
|
|
1874
|
+
}), Pr = /*@__PURE__*/ O("$ZodPipe", (e, t) => {
|
|
1875
|
+
P.init(e, t), D(e, "values", (e) => e.def.in._zod.values), D(e, "optin", (e) => e.def.in._zod.optin), D(e, "optout", (e) => e.def.out._zod.optout), D(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
1876
|
+
if (n.direction === "backward") {
|
|
1877
|
+
let r = t.out._zod.run(e, n);
|
|
1878
|
+
return r instanceof Promise ? r.then((e) => L(e, t.in, n)) : L(r, t.in, n);
|
|
1879
|
+
}
|
|
1880
|
+
let r = t.in._zod.run(e, n);
|
|
1881
|
+
return r instanceof Promise ? r.then((e) => L(e, t.out, n)) : L(r, t.out, n);
|
|
1882
|
+
};
|
|
1883
|
+
});
|
|
1884
|
+
function L(e, t, n) {
|
|
1885
|
+
return e.issues.some((e) => e.code !== "unrecognized_keys") ? (e.aborted = !0, e) : t._zod.run({
|
|
1886
|
+
value: e.value,
|
|
1887
|
+
issues: e.issues
|
|
1888
|
+
}, n);
|
|
1889
|
+
}
|
|
1890
|
+
var Fr = /*@__PURE__*/ O("$ZodReadonly", (e, t) => {
|
|
1891
|
+
P.init(e, t), D(e, "propValues", (e) => e.def.innerType._zod.propValues), D(e, "values", (e) => e.def.innerType._zod.values), D(e, "optin", (e) => e.def.innerType?._zod?.optin), D(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
1892
|
+
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1893
|
+
let r = t.innerType._zod.run(e, n);
|
|
1894
|
+
return r instanceof Promise ? r.then(Ir) : Ir(r);
|
|
1895
|
+
};
|
|
1896
|
+
});
|
|
1897
|
+
function Ir(e) {
|
|
1898
|
+
return e.memo || (e.value = Object.freeze(e.value)), e;
|
|
1899
|
+
}
|
|
1900
|
+
var Lr = /*@__PURE__*/ O("$ZodCustom", (e, t) => {
|
|
1901
|
+
N.init(e, t), P.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
|
|
1902
|
+
let r = n.value, i = t.fn(r);
|
|
1903
|
+
if (i instanceof Promise) return i.then((t) => Rr(t, n, r, e));
|
|
1904
|
+
Rr(i, n, r, e);
|
|
1905
|
+
};
|
|
1906
|
+
});
|
|
1907
|
+
function Rr(e, t, n, r) {
|
|
1908
|
+
if (!e) {
|
|
1909
|
+
let e = {
|
|
1910
|
+
code: "custom",
|
|
1911
|
+
input: n,
|
|
1912
|
+
inst: r,
|
|
1913
|
+
path: [...r._zod.def.path ?? []],
|
|
1914
|
+
continue: !r._zod.def.abort
|
|
1915
|
+
};
|
|
1916
|
+
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(w(e));
|
|
1917
|
+
}
|
|
1918
|
+
}
|
|
1919
|
+
//#endregion
|
|
1920
|
+
//#region ../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/memoizer.js
|
|
1921
|
+
var zr = class extends Error {
|
|
1922
|
+
constructor() {
|
|
1923
|
+
super("Cannot parse a reference cycle that closes through a transform"), this.name = "ZodCyclicError";
|
|
1924
|
+
}
|
|
1925
|
+
}, Br = "~memo", Vr = [];
|
|
1926
|
+
function Hr(e) {
|
|
1927
|
+
return typeof e == "object" && !!e;
|
|
1928
|
+
}
|
|
1929
|
+
function Ur(e) {
|
|
1930
|
+
return e.map((e) => e.path ? {
|
|
1931
|
+
...e,
|
|
1932
|
+
path: e.path.slice()
|
|
1933
|
+
} : { ...e });
|
|
1934
|
+
}
|
|
1935
|
+
var Wr = /*@__PURE__*/ new WeakMap(), R = 0, z = 1, B = 2;
|
|
1936
|
+
function V(e, t, n) {
|
|
1937
|
+
let r = Wr.get(e);
|
|
1938
|
+
if (r !== void 0) return r ? B : R;
|
|
1939
|
+
if (t.has(e)) return B;
|
|
1940
|
+
t.add(e);
|
|
1941
|
+
let i = R, a = (e) => {
|
|
1942
|
+
if (i !== B && e?._zod) {
|
|
1943
|
+
let r = V(e, t, n);
|
|
1944
|
+
r > i && (i = r);
|
|
1945
|
+
}
|
|
1946
|
+
}, o = (e, r) => {
|
|
1947
|
+
let i = R;
|
|
1948
|
+
for (let a of Reflect.ownKeys(e)) {
|
|
1949
|
+
let o = Object.getOwnPropertyDescriptor(e, a);
|
|
1950
|
+
if (r && !o.enumerable) continue;
|
|
1951
|
+
let s = o.get ? z : o.value?._zod ? V(o.value, t, n) : R;
|
|
1952
|
+
s > i && (i = s);
|
|
1953
|
+
}
|
|
1954
|
+
return i;
|
|
1955
|
+
}, s = (e) => {
|
|
1956
|
+
e > i && (i = e);
|
|
1957
|
+
}, c = e._zod.def;
|
|
1958
|
+
switch (c.type) {
|
|
1959
|
+
case "object": {
|
|
1960
|
+
let e = l(c);
|
|
1961
|
+
s(e ? o(e, !0) : z), a(c.catchall);
|
|
1962
|
+
break;
|
|
1963
|
+
}
|
|
1964
|
+
case "array":
|
|
1965
|
+
a(c.element);
|
|
1966
|
+
break;
|
|
1967
|
+
case "tuple":
|
|
1968
|
+
for (let e of c.items) a(e);
|
|
1969
|
+
a(c.rest);
|
|
1970
|
+
break;
|
|
1971
|
+
case "record":
|
|
1972
|
+
case "map":
|
|
1973
|
+
a(c.keyType), a(c.valueType);
|
|
1974
|
+
break;
|
|
1975
|
+
case "set":
|
|
1976
|
+
a(c.valueType);
|
|
1977
|
+
break;
|
|
1978
|
+
case "union":
|
|
1979
|
+
for (let e of c.options) a(e);
|
|
1980
|
+
break;
|
|
1981
|
+
case "intersection":
|
|
1982
|
+
a(c.left), a(c.right);
|
|
1983
|
+
break;
|
|
1984
|
+
case "optional":
|
|
1985
|
+
case "nullable":
|
|
1986
|
+
case "default":
|
|
1987
|
+
case "prefault":
|
|
1988
|
+
case "catch":
|
|
1989
|
+
case "readonly":
|
|
1990
|
+
case "nonoptional":
|
|
1991
|
+
case "promise":
|
|
1992
|
+
case "success":
|
|
1993
|
+
a(c.innerType);
|
|
1994
|
+
break;
|
|
1995
|
+
case "pipe":
|
|
1996
|
+
a(c.in), a(c.out);
|
|
1997
|
+
break;
|
|
1998
|
+
case "function":
|
|
1999
|
+
a(c.input), a(c.output);
|
|
2000
|
+
break;
|
|
2001
|
+
case "lazy": {
|
|
2002
|
+
let r = c._cachedInner ?? (n ? e._zod.innerType : void 0);
|
|
2003
|
+
s(r ? V(r, t, !1) : z);
|
|
2004
|
+
break;
|
|
2005
|
+
}
|
|
2006
|
+
case "template_literal":
|
|
2007
|
+
case "string":
|
|
2008
|
+
case "number":
|
|
2009
|
+
case "int":
|
|
2010
|
+
case "boolean":
|
|
2011
|
+
case "bigint":
|
|
2012
|
+
case "symbol":
|
|
2013
|
+
case "undefined":
|
|
2014
|
+
case "null":
|
|
2015
|
+
case "void":
|
|
2016
|
+
case "never":
|
|
2017
|
+
case "any":
|
|
2018
|
+
case "unknown":
|
|
2019
|
+
case "date":
|
|
2020
|
+
case "nan":
|
|
2021
|
+
case "enum":
|
|
2022
|
+
case "literal":
|
|
2023
|
+
case "file":
|
|
2024
|
+
case "transform":
|
|
2025
|
+
case "custom": break;
|
|
2026
|
+
default: for (let e in c) {
|
|
2027
|
+
let t = Object.getOwnPropertyDescriptor(c, e);
|
|
2028
|
+
if (!t || t.get) continue;
|
|
2029
|
+
let n = t.value;
|
|
2030
|
+
if (!(!n || typeof n != "object")) {
|
|
2031
|
+
if (n._zod) a(n);
|
|
2032
|
+
else if (Array.isArray(n)) for (let e of n) a(e);
|
|
2033
|
+
}
|
|
2034
|
+
}
|
|
2035
|
+
}
|
|
2036
|
+
return t.delete(e), Gr(e, i);
|
|
2037
|
+
}
|
|
2038
|
+
function Gr(e, t) {
|
|
2039
|
+
return t !== z && Wr.set(e, t === B), t;
|
|
2040
|
+
}
|
|
2041
|
+
function Kr(e, t) {
|
|
2042
|
+
let n = e.buckets.get(t);
|
|
2043
|
+
return n || (n = /* @__PURE__ */ new WeakMap(), e.buckets.set(t, n)), n;
|
|
2044
|
+
}
|
|
2045
|
+
var qr, Jr = [], Yr = {
|
|
2046
|
+
alloc(e, t, n) {
|
|
2047
|
+
let r = qr;
|
|
2048
|
+
if (!r) return n;
|
|
2049
|
+
qr = void 0;
|
|
2050
|
+
let i = {
|
|
2051
|
+
value: n,
|
|
2052
|
+
issues: null
|
|
2053
|
+
};
|
|
2054
|
+
return r.set(t.value, i), Jr.push(i), n;
|
|
2055
|
+
},
|
|
2056
|
+
guard(e) {
|
|
2057
|
+
var t;
|
|
2058
|
+
(t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
|
|
2059
|
+
let t = e._zod.parse, n = (e, n) => {
|
|
2060
|
+
if (n.direction !== "backward" && Zr(n, e.value)) throw new zr();
|
|
2061
|
+
return t(e, n);
|
|
2062
|
+
};
|
|
2063
|
+
e._zod.parse = n, e._zod.run === t && (e._zod.run = n);
|
|
2064
|
+
});
|
|
2065
|
+
},
|
|
2066
|
+
attach(e) {
|
|
2067
|
+
var t;
|
|
2068
|
+
let n, r = !1, i, a;
|
|
2069
|
+
(t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
|
|
2070
|
+
let t = e._zod.parse, o = (s, c) => {
|
|
2071
|
+
if (n === void 0) {
|
|
2072
|
+
let i = V(e, /* @__PURE__ */ new Set(), !1);
|
|
2073
|
+
if (i === R) return e._zod.parse = t, e._zod.run === o && (e._zod.run = t), t(s, c);
|
|
2074
|
+
i === B || r ? n = !0 : r = !0;
|
|
2075
|
+
}
|
|
2076
|
+
let l = s.value;
|
|
2077
|
+
if (!Hr(l)) return t(s, c);
|
|
2078
|
+
let u = c[Br];
|
|
2079
|
+
u || (u = {
|
|
2080
|
+
buckets: /* @__PURE__ */ new WeakMap(),
|
|
2081
|
+
backEdges: void 0
|
|
2082
|
+
}, c[Br] = u);
|
|
2083
|
+
let d;
|
|
2084
|
+
i === c ? d = a : (d = Kr(u, e), i = c, a = d);
|
|
2085
|
+
let f = d.get(l);
|
|
2086
|
+
if (f) return s.value = f.value, f.issues ? f.issues.length && s.issues.push(...Ur(f.issues)) : (s.memo = !0, u.backEdges ?? (u.backEdges = /* @__PURE__ */ new WeakSet()), u.backEdges.add(f.value)), s;
|
|
2087
|
+
qr = d;
|
|
2088
|
+
let p = Jr.length, m = t(s, c);
|
|
2089
|
+
qr = void 0;
|
|
2090
|
+
let h = Jr.length > p ? Jr.pop() : void 0;
|
|
2091
|
+
return m instanceof Promise ? m.then((e) => (h && (h.issues = e.issues.length ? Ur(e.issues) : Vr), e)) : (h && (h.issues = m.issues.length ? Ur(m.issues) : Vr), m);
|
|
2092
|
+
};
|
|
2093
|
+
e._zod.parse = o, e._zod.run === t && (e._zod.run = o);
|
|
2094
|
+
});
|
|
2095
|
+
}
|
|
2096
|
+
};
|
|
2097
|
+
function Xr() {
|
|
2098
|
+
return Yr;
|
|
2099
|
+
}
|
|
2100
|
+
function Zr(e, t) {
|
|
2101
|
+
let n = e[Br]?.backEdges;
|
|
2102
|
+
return n !== void 0 && Hr(t) && n.has(t);
|
|
2103
|
+
}
|
|
2104
|
+
//#endregion
|
|
2105
|
+
//#region ../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/locales/en.js
|
|
2106
|
+
var Qr = () => {
|
|
2107
|
+
let e = {
|
|
2108
|
+
string: {
|
|
2109
|
+
unit: "characters",
|
|
2110
|
+
verb: "to have"
|
|
2111
|
+
},
|
|
2112
|
+
file: {
|
|
2113
|
+
unit: "bytes",
|
|
2114
|
+
verb: "to have"
|
|
2115
|
+
},
|
|
2116
|
+
array: {
|
|
2117
|
+
unit: "items",
|
|
2118
|
+
verb: "to have"
|
|
2119
|
+
},
|
|
2120
|
+
set: {
|
|
2121
|
+
unit: "items",
|
|
2122
|
+
verb: "to have"
|
|
2123
|
+
},
|
|
2124
|
+
map: {
|
|
2125
|
+
unit: "entries",
|
|
2126
|
+
verb: "to have"
|
|
2127
|
+
}
|
|
2128
|
+
};
|
|
2129
|
+
function n(t) {
|
|
2130
|
+
return e[t] ?? null;
|
|
2131
|
+
}
|
|
2132
|
+
let r = {
|
|
2133
|
+
regex: "input",
|
|
2134
|
+
email: "email address",
|
|
2135
|
+
url: "URL",
|
|
2136
|
+
emoji: "emoji",
|
|
2137
|
+
uuid: "UUID",
|
|
2138
|
+
uuidv4: "UUIDv4",
|
|
2139
|
+
uuidv6: "UUIDv6",
|
|
2140
|
+
nanoid: "nanoid",
|
|
2141
|
+
guid: "GUID",
|
|
2142
|
+
cuid: "cuid",
|
|
2143
|
+
cuid2: "cuid2",
|
|
2144
|
+
ulid: "ULID",
|
|
2145
|
+
xid: "XID",
|
|
2146
|
+
ksuid: "KSUID",
|
|
2147
|
+
datetime: "ISO datetime",
|
|
2148
|
+
date: "ISO date",
|
|
2149
|
+
time: "ISO time",
|
|
2150
|
+
duration: "ISO duration",
|
|
2151
|
+
ipv4: "IPv4 address",
|
|
2152
|
+
ipv6: "IPv6 address",
|
|
2153
|
+
mac: "MAC address",
|
|
2154
|
+
cidrv4: "IPv4 range",
|
|
2155
|
+
cidrv6: "IPv6 range",
|
|
2156
|
+
base64: "base64-encoded string",
|
|
2157
|
+
base64url: "base64url-encoded string",
|
|
2158
|
+
json_string: "JSON string",
|
|
2159
|
+
e164: "E.164 number",
|
|
2160
|
+
currency_code: "currency code",
|
|
2161
|
+
credit_card: "credit card number",
|
|
2162
|
+
iban: "IBAN",
|
|
2163
|
+
jwt: "JWT",
|
|
2164
|
+
template_literal: "input"
|
|
2165
|
+
}, i = { nan: "NaN" };
|
|
2166
|
+
function a(e, t) {
|
|
2167
|
+
return e === "number" && typeof t == "number" && !Number.isFinite(t) ? String(t) : i[e] ?? e;
|
|
2168
|
+
}
|
|
2169
|
+
return (e) => {
|
|
2170
|
+
switch (e.code) {
|
|
2171
|
+
case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(Ee(e.input), e.input)}`;
|
|
2172
|
+
case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${se(e.values[0])}` : `Invalid option: expected one of ${t(e.values, "|")}`;
|
|
2173
|
+
case "too_big": {
|
|
2174
|
+
let t = e.exact ? "exactly " : e.inclusive ? "<=" : "<", r = n(e.origin);
|
|
2175
|
+
return r ? `Too big: expected ${e.origin ?? "value"} to have ${t}${e.maximum.toString()} ${r.unit ?? "elements"}` : `Too big: expected ${e.origin ?? "value"} to be ${t}${e.maximum.toString()}`;
|
|
2176
|
+
}
|
|
2177
|
+
case "too_small": {
|
|
2178
|
+
let t = e.exact ? "exactly " : e.inclusive ? ">=" : ">", r = n(e.origin);
|
|
2179
|
+
return r ? `Too small: expected ${e.origin} to have ${t}${e.minimum.toString()} ${r.unit}` : `Too small: expected ${e.origin} to be ${t}${e.minimum.toString()}`;
|
|
2180
|
+
}
|
|
2181
|
+
case "invalid_format": {
|
|
2182
|
+
let t = e;
|
|
2183
|
+
return t.format === "starts_with" ? `Invalid string: must start with "${t.prefix}"` : t.format === "ends_with" ? `Invalid string: must end with "${t.suffix}"` : t.format === "includes" ? `Invalid string: must include "${t.includes}"` : t.format === "regex" ? `Invalid string: must match pattern ${t.pattern}` : `Invalid ${r[t.format] ?? e.format}`;
|
|
2184
|
+
}
|
|
2185
|
+
case "not_multiple_of": return `Invalid number: must be a multiple of ${e.divisor}`;
|
|
2186
|
+
case "unrecognized_keys": return `Unrecognized key${e.keys.length > 1 ? "s" : ""}: ${t(e.keys, ", ")}`;
|
|
2187
|
+
case "invalid_key": return `Invalid key in ${e.origin}`;
|
|
2188
|
+
case "invalid_union": return e.options && Array.isArray(e.options) && e.options.length > 0 ? `Invalid discriminator value. Expected ${e.options.map((e) => `'${e}'`).join(" | ")}` : e.inclusive === !1 ? "Invalid input: more than one option matched" : "Invalid input";
|
|
2189
|
+
case "invalid_element": return `Invalid value in ${e.origin}`;
|
|
2190
|
+
default: return "Invalid input";
|
|
2191
|
+
}
|
|
2192
|
+
};
|
|
2193
|
+
};
|
|
2194
|
+
function $r() {
|
|
2195
|
+
return { localeError: Qr() };
|
|
2196
|
+
}
|
|
2197
|
+
//#endregion
|
|
2198
|
+
//#region ../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/registries.js
|
|
2199
|
+
var ei, ti = class {
|
|
2200
|
+
constructor() {
|
|
2201
|
+
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
2202
|
+
}
|
|
2203
|
+
add(e, ...t) {
|
|
2204
|
+
let n = t[0];
|
|
2205
|
+
return this._map.set(e, n), n && typeof n == "object" && "id" in n && this._idmap.set(n.id, e), this;
|
|
2206
|
+
}
|
|
2207
|
+
clear() {
|
|
2208
|
+
return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
|
|
2209
|
+
}
|
|
2210
|
+
remove(e) {
|
|
2211
|
+
let t = this._map.get(e);
|
|
2212
|
+
return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(e), this;
|
|
2213
|
+
}
|
|
2214
|
+
get(e) {
|
|
2215
|
+
let t = e._zod.parent;
|
|
2216
|
+
if (t) {
|
|
2217
|
+
let n = { ...this.get(t) ?? {} };
|
|
2218
|
+
delete n.id;
|
|
2219
|
+
let r = {
|
|
2220
|
+
...n,
|
|
2221
|
+
...this._map.get(e)
|
|
2222
|
+
};
|
|
2223
|
+
return Object.keys(r).length ? r : void 0;
|
|
2224
|
+
}
|
|
2225
|
+
return this._map.get(e);
|
|
2226
|
+
}
|
|
2227
|
+
has(e) {
|
|
2228
|
+
return this._map.has(e);
|
|
2229
|
+
}
|
|
2230
|
+
};
|
|
2231
|
+
function ni() {
|
|
2232
|
+
return new ti();
|
|
2233
|
+
}
|
|
2234
|
+
(ei = globalThis).__zod_globalRegistry ?? (ei.__zod_globalRegistry = ni());
|
|
2235
|
+
var H = globalThis.__zod_globalRegistry;
|
|
2236
|
+
//#endregion
|
|
2237
|
+
//#region ../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/api.js
|
|
2238
|
+
function ri(e) {
|
|
2239
|
+
return e.checks &&= [...e.checks], e;
|
|
2240
|
+
}
|
|
2241
|
+
// @__NO_SIDE_EFFECTS__
|
|
2242
|
+
function ii(e, t) {
|
|
2243
|
+
return new e(ri({
|
|
2244
|
+
type: "string",
|
|
2245
|
+
...y(t)
|
|
2246
|
+
}));
|
|
2247
|
+
}
|
|
2248
|
+
// @__NO_SIDE_EFFECTS__
|
|
2249
|
+
function ai(e, t) {
|
|
2250
|
+
return new e({
|
|
2251
|
+
type: "string",
|
|
2252
|
+
format: "email",
|
|
2253
|
+
check: "string_format",
|
|
2254
|
+
abort: !1,
|
|
2255
|
+
...y(t)
|
|
2256
|
+
});
|
|
2257
|
+
}
|
|
2258
|
+
// @__NO_SIDE_EFFECTS__
|
|
2259
|
+
function oi(e, t) {
|
|
2260
|
+
return new e({
|
|
2261
|
+
type: "string",
|
|
2262
|
+
format: "guid",
|
|
2263
|
+
check: "string_format",
|
|
2264
|
+
abort: !1,
|
|
2265
|
+
...y(t)
|
|
2266
|
+
});
|
|
2267
|
+
}
|
|
2268
|
+
// @__NO_SIDE_EFFECTS__
|
|
2269
|
+
function si(e, t) {
|
|
2270
|
+
return new e({
|
|
2271
|
+
type: "string",
|
|
2272
|
+
format: "uuid",
|
|
2273
|
+
check: "string_format",
|
|
2274
|
+
abort: !1,
|
|
2275
|
+
...y(t)
|
|
2276
|
+
});
|
|
2277
|
+
}
|
|
2278
|
+
// @__NO_SIDE_EFFECTS__
|
|
2279
|
+
function ci(e, t) {
|
|
2280
|
+
return new e({
|
|
2281
|
+
type: "string",
|
|
2282
|
+
format: "uuid",
|
|
2283
|
+
check: "string_format",
|
|
2284
|
+
abort: !1,
|
|
2285
|
+
version: "v4",
|
|
2286
|
+
...y(t)
|
|
2287
|
+
});
|
|
2288
|
+
}
|
|
2289
|
+
// @__NO_SIDE_EFFECTS__
|
|
2290
|
+
function li(e, t) {
|
|
2291
|
+
return new e({
|
|
2292
|
+
type: "string",
|
|
2293
|
+
format: "uuid",
|
|
2294
|
+
check: "string_format",
|
|
2295
|
+
abort: !1,
|
|
2296
|
+
version: "v6",
|
|
2297
|
+
...y(t)
|
|
2298
|
+
});
|
|
2299
|
+
}
|
|
2300
|
+
// @__NO_SIDE_EFFECTS__
|
|
2301
|
+
function ui(e, t) {
|
|
2302
|
+
return new e({
|
|
2303
|
+
type: "string",
|
|
2304
|
+
format: "uuid",
|
|
2305
|
+
check: "string_format",
|
|
2306
|
+
abort: !1,
|
|
2307
|
+
version: "v7",
|
|
2308
|
+
...y(t)
|
|
2309
|
+
});
|
|
2310
|
+
}
|
|
2311
|
+
// @__NO_SIDE_EFFECTS__
|
|
2312
|
+
function di(e, t) {
|
|
2313
|
+
return new e({
|
|
2314
|
+
type: "string",
|
|
2315
|
+
format: "url",
|
|
2316
|
+
check: "string_format",
|
|
2317
|
+
abort: !1,
|
|
2318
|
+
...y(t)
|
|
2319
|
+
});
|
|
2320
|
+
}
|
|
2321
|
+
// @__NO_SIDE_EFFECTS__
|
|
2322
|
+
function fi(e, t) {
|
|
2323
|
+
return new e({
|
|
2324
|
+
type: "string",
|
|
2325
|
+
format: "emoji",
|
|
2326
|
+
check: "string_format",
|
|
2327
|
+
abort: !1,
|
|
2328
|
+
...y(t)
|
|
2329
|
+
});
|
|
2330
|
+
}
|
|
2331
|
+
// @__NO_SIDE_EFFECTS__
|
|
2332
|
+
function pi(e, t) {
|
|
2333
|
+
return new e({
|
|
2334
|
+
type: "string",
|
|
2335
|
+
format: "nanoid",
|
|
2336
|
+
check: "string_format",
|
|
2337
|
+
abort: !1,
|
|
2338
|
+
...y(t)
|
|
2339
|
+
});
|
|
2340
|
+
}
|
|
2341
|
+
// @__NO_SIDE_EFFECTS__
|
|
2342
|
+
function mi(e, t) {
|
|
2343
|
+
return new e({
|
|
2344
|
+
type: "string",
|
|
2345
|
+
format: "cuid",
|
|
2346
|
+
check: "string_format",
|
|
2347
|
+
abort: !1,
|
|
2348
|
+
...y(t)
|
|
2349
|
+
});
|
|
2350
|
+
}
|
|
2351
|
+
// @__NO_SIDE_EFFECTS__
|
|
2352
|
+
function hi(e, t) {
|
|
2353
|
+
return new e({
|
|
2354
|
+
type: "string",
|
|
2355
|
+
format: "cuid2",
|
|
2356
|
+
check: "string_format",
|
|
2357
|
+
abort: !1,
|
|
2358
|
+
...y(t)
|
|
2359
|
+
});
|
|
2360
|
+
}
|
|
2361
|
+
// @__NO_SIDE_EFFECTS__
|
|
2362
|
+
function gi(e, t) {
|
|
2363
|
+
return new e({
|
|
2364
|
+
type: "string",
|
|
2365
|
+
format: "ulid",
|
|
2366
|
+
check: "string_format",
|
|
2367
|
+
abort: !1,
|
|
2368
|
+
...y(t)
|
|
2369
|
+
});
|
|
2370
|
+
}
|
|
2371
|
+
// @__NO_SIDE_EFFECTS__
|
|
2372
|
+
function _i(e, t) {
|
|
2373
|
+
return new e({
|
|
2374
|
+
type: "string",
|
|
2375
|
+
format: "xid",
|
|
2376
|
+
check: "string_format",
|
|
2377
|
+
abort: !1,
|
|
2378
|
+
...y(t)
|
|
2379
|
+
});
|
|
2380
|
+
}
|
|
2381
|
+
// @__NO_SIDE_EFFECTS__
|
|
2382
|
+
function vi(e, t) {
|
|
2383
|
+
return new e({
|
|
2384
|
+
type: "string",
|
|
2385
|
+
format: "ksuid",
|
|
2386
|
+
check: "string_format",
|
|
2387
|
+
abort: !1,
|
|
2388
|
+
...y(t)
|
|
2389
|
+
});
|
|
2390
|
+
}
|
|
2391
|
+
// @__NO_SIDE_EFFECTS__
|
|
2392
|
+
function yi(e, t) {
|
|
2393
|
+
return new e({
|
|
2394
|
+
type: "string",
|
|
2395
|
+
format: "ipv4",
|
|
2396
|
+
check: "string_format",
|
|
2397
|
+
abort: !1,
|
|
2398
|
+
...y(t)
|
|
2399
|
+
});
|
|
2400
|
+
}
|
|
2401
|
+
// @__NO_SIDE_EFFECTS__
|
|
2402
|
+
function bi(e, t) {
|
|
2403
|
+
return new e({
|
|
2404
|
+
type: "string",
|
|
2405
|
+
format: "ipv6",
|
|
2406
|
+
check: "string_format",
|
|
2407
|
+
abort: !1,
|
|
2408
|
+
...y(t)
|
|
2409
|
+
});
|
|
2410
|
+
}
|
|
2411
|
+
// @__NO_SIDE_EFFECTS__
|
|
2412
|
+
function xi(e, t) {
|
|
2413
|
+
return new e({
|
|
2414
|
+
type: "string",
|
|
2415
|
+
format: "cidrv4",
|
|
2416
|
+
check: "string_format",
|
|
2417
|
+
abort: !1,
|
|
2418
|
+
...y(t)
|
|
2419
|
+
});
|
|
2420
|
+
}
|
|
2421
|
+
// @__NO_SIDE_EFFECTS__
|
|
2422
|
+
function Si(e, t) {
|
|
2423
|
+
return new e({
|
|
2424
|
+
type: "string",
|
|
2425
|
+
format: "cidrv6",
|
|
2426
|
+
check: "string_format",
|
|
2427
|
+
abort: !1,
|
|
2428
|
+
...y(t)
|
|
2429
|
+
});
|
|
2430
|
+
}
|
|
2431
|
+
// @__NO_SIDE_EFFECTS__
|
|
2432
|
+
function Ci(e, t) {
|
|
2433
|
+
return new e({
|
|
2434
|
+
type: "string",
|
|
2435
|
+
format: "base64",
|
|
2436
|
+
check: "string_format",
|
|
2437
|
+
abort: !1,
|
|
2438
|
+
...y(t)
|
|
2439
|
+
});
|
|
2440
|
+
}
|
|
2441
|
+
// @__NO_SIDE_EFFECTS__
|
|
2442
|
+
function wi(e, t) {
|
|
2443
|
+
return new e({
|
|
2444
|
+
type: "string",
|
|
2445
|
+
format: "base64url",
|
|
2446
|
+
check: "string_format",
|
|
2447
|
+
abort: !1,
|
|
2448
|
+
...y(t)
|
|
2449
|
+
});
|
|
2450
|
+
}
|
|
2451
|
+
// @__NO_SIDE_EFFECTS__
|
|
2452
|
+
function Ti(e, t) {
|
|
2453
|
+
return new e({
|
|
2454
|
+
type: "string",
|
|
2455
|
+
format: "e164",
|
|
2456
|
+
check: "string_format",
|
|
2457
|
+
abort: !1,
|
|
2458
|
+
...y(t)
|
|
2459
|
+
});
|
|
2460
|
+
}
|
|
2461
|
+
// @__NO_SIDE_EFFECTS__
|
|
2462
|
+
function Ei(e, t) {
|
|
2463
|
+
return new e({
|
|
2464
|
+
type: "string",
|
|
2465
|
+
format: "jwt",
|
|
2466
|
+
check: "string_format",
|
|
2467
|
+
abort: !1,
|
|
2468
|
+
...y(t)
|
|
2469
|
+
});
|
|
2470
|
+
}
|
|
2471
|
+
// @__NO_SIDE_EFFECTS__
|
|
2472
|
+
function Di(e, t) {
|
|
2473
|
+
return new e({
|
|
2474
|
+
type: "string",
|
|
2475
|
+
format: "datetime",
|
|
2476
|
+
check: "string_format",
|
|
2477
|
+
offset: !1,
|
|
2478
|
+
local: !1,
|
|
2479
|
+
precision: null,
|
|
2480
|
+
...y(t)
|
|
2481
|
+
});
|
|
2482
|
+
}
|
|
2483
|
+
// @__NO_SIDE_EFFECTS__
|
|
2484
|
+
function Oi(e, t) {
|
|
2485
|
+
return new e({
|
|
2486
|
+
type: "string",
|
|
2487
|
+
format: "date",
|
|
2488
|
+
check: "string_format",
|
|
2489
|
+
...y(t)
|
|
2490
|
+
});
|
|
2491
|
+
}
|
|
2492
|
+
// @__NO_SIDE_EFFECTS__
|
|
2493
|
+
function ki(e, t) {
|
|
2494
|
+
return new e({
|
|
2495
|
+
type: "string",
|
|
2496
|
+
format: "time",
|
|
2497
|
+
check: "string_format",
|
|
2498
|
+
precision: null,
|
|
2499
|
+
...y(t)
|
|
2500
|
+
});
|
|
2501
|
+
}
|
|
2502
|
+
// @__NO_SIDE_EFFECTS__
|
|
2503
|
+
function Ai(e, t) {
|
|
2504
|
+
return new e({
|
|
2505
|
+
type: "string",
|
|
2506
|
+
format: "duration",
|
|
2507
|
+
check: "string_format",
|
|
2508
|
+
...y(t)
|
|
2509
|
+
});
|
|
2510
|
+
}
|
|
2511
|
+
// @__NO_SIDE_EFFECTS__
|
|
2512
|
+
function ji(e, t) {
|
|
2513
|
+
return new e(ri({
|
|
2514
|
+
type: "number",
|
|
2515
|
+
checks: [],
|
|
2516
|
+
...y(t)
|
|
2517
|
+
}));
|
|
2518
|
+
}
|
|
2519
|
+
// @__NO_SIDE_EFFECTS__
|
|
2520
|
+
function Mi(e, t) {
|
|
2521
|
+
return new e({
|
|
2522
|
+
type: "number",
|
|
2523
|
+
check: "number_format",
|
|
2524
|
+
abort: !1,
|
|
2525
|
+
format: "safeint",
|
|
2526
|
+
...y(t)
|
|
2527
|
+
});
|
|
2528
|
+
}
|
|
2529
|
+
// @__NO_SIDE_EFFECTS__
|
|
2530
|
+
function Ni(e, t) {
|
|
2531
|
+
return new e({
|
|
2532
|
+
type: "boolean",
|
|
2533
|
+
...y(t)
|
|
2534
|
+
});
|
|
2535
|
+
}
|
|
2536
|
+
// @__NO_SIDE_EFFECTS__
|
|
2537
|
+
function Pi(e) {
|
|
2538
|
+
return new e({ type: "unknown" });
|
|
2539
|
+
}
|
|
2540
|
+
// @__NO_SIDE_EFFECTS__
|
|
2541
|
+
function Fi(e, t) {
|
|
2542
|
+
return new e({
|
|
2543
|
+
type: "never",
|
|
2544
|
+
...y(t)
|
|
2545
|
+
});
|
|
2546
|
+
}
|
|
2547
|
+
// @__NO_SIDE_EFFECTS__
|
|
2548
|
+
function Ii(e, t) {
|
|
2549
|
+
return new Xt({
|
|
2550
|
+
check: "less_than",
|
|
2551
|
+
...y(t),
|
|
2552
|
+
value: e,
|
|
2553
|
+
inclusive: !1
|
|
2554
|
+
});
|
|
2555
|
+
}
|
|
2556
|
+
// @__NO_SIDE_EFFECTS__
|
|
2557
|
+
function Li(e, t) {
|
|
2558
|
+
return new Xt({
|
|
2559
|
+
check: "less_than",
|
|
2560
|
+
...y(t),
|
|
2561
|
+
value: e,
|
|
2562
|
+
inclusive: !0
|
|
2563
|
+
});
|
|
2564
|
+
}
|
|
2565
|
+
// @__NO_SIDE_EFFECTS__
|
|
2566
|
+
function Ri(e, t) {
|
|
2567
|
+
return new Zt({
|
|
2568
|
+
check: "greater_than",
|
|
2569
|
+
...y(t),
|
|
2570
|
+
value: e,
|
|
2571
|
+
inclusive: !1
|
|
2572
|
+
});
|
|
2573
|
+
}
|
|
2574
|
+
// @__NO_SIDE_EFFECTS__
|
|
2575
|
+
function zi(e, t) {
|
|
2576
|
+
return new Zt({
|
|
2577
|
+
check: "greater_than",
|
|
2578
|
+
...y(t),
|
|
2579
|
+
value: e,
|
|
2580
|
+
inclusive: !0
|
|
2581
|
+
});
|
|
2582
|
+
}
|
|
2583
|
+
// @__NO_SIDE_EFFECTS__
|
|
2584
|
+
function Bi(e, t) {
|
|
2585
|
+
return new Qt({
|
|
2586
|
+
check: "multiple_of",
|
|
2587
|
+
...y(t),
|
|
2588
|
+
value: e
|
|
2589
|
+
});
|
|
2590
|
+
}
|
|
2591
|
+
// @__NO_SIDE_EFFECTS__
|
|
2592
|
+
function Vi(e, t) {
|
|
2593
|
+
return new en({
|
|
2594
|
+
check: "max_length",
|
|
2595
|
+
...y(t),
|
|
2596
|
+
maximum: e
|
|
2597
|
+
});
|
|
2598
|
+
}
|
|
2599
|
+
// @__NO_SIDE_EFFECTS__
|
|
2600
|
+
function Hi(e, t) {
|
|
2601
|
+
return new tn({
|
|
2602
|
+
check: "min_length",
|
|
2603
|
+
...y(t),
|
|
2604
|
+
minimum: e
|
|
2605
|
+
});
|
|
2606
|
+
}
|
|
2607
|
+
// @__NO_SIDE_EFFECTS__
|
|
2608
|
+
function Ui(e, t) {
|
|
2609
|
+
return new nn({
|
|
2610
|
+
check: "length_equals",
|
|
2611
|
+
...y(t),
|
|
2612
|
+
length: e
|
|
2613
|
+
});
|
|
2614
|
+
}
|
|
2615
|
+
// @__NO_SIDE_EFFECTS__
|
|
2616
|
+
function Wi(e, t) {
|
|
2617
|
+
return new an({
|
|
2618
|
+
check: "string_format",
|
|
2619
|
+
format: "regex",
|
|
2620
|
+
...y(t),
|
|
2621
|
+
pattern: e
|
|
2622
|
+
});
|
|
2623
|
+
}
|
|
2624
|
+
// @__NO_SIDE_EFFECTS__
|
|
2625
|
+
function Gi(e) {
|
|
2626
|
+
return new on({
|
|
2627
|
+
check: "string_format",
|
|
2628
|
+
format: "lowercase",
|
|
2629
|
+
...y(e)
|
|
2630
|
+
});
|
|
2631
|
+
}
|
|
2632
|
+
// @__NO_SIDE_EFFECTS__
|
|
2633
|
+
function Ki(e) {
|
|
2634
|
+
return new sn({
|
|
2635
|
+
check: "string_format",
|
|
2636
|
+
format: "uppercase",
|
|
2637
|
+
...y(e)
|
|
2638
|
+
});
|
|
2639
|
+
}
|
|
2640
|
+
// @__NO_SIDE_EFFECTS__
|
|
2641
|
+
function qi(e, t) {
|
|
2642
|
+
return new cn({
|
|
2643
|
+
check: "string_format",
|
|
2644
|
+
format: "includes",
|
|
2645
|
+
...y(t),
|
|
2646
|
+
includes: e
|
|
2647
|
+
});
|
|
2648
|
+
}
|
|
2649
|
+
// @__NO_SIDE_EFFECTS__
|
|
2650
|
+
function Ji(e, t) {
|
|
2651
|
+
return new ln({
|
|
2652
|
+
check: "string_format",
|
|
2653
|
+
format: "starts_with",
|
|
2654
|
+
...y(t),
|
|
2655
|
+
prefix: e
|
|
2656
|
+
});
|
|
2657
|
+
}
|
|
2658
|
+
// @__NO_SIDE_EFFECTS__
|
|
2659
|
+
function Yi(e, t) {
|
|
2660
|
+
return new un({
|
|
2661
|
+
check: "string_format",
|
|
2662
|
+
format: "ends_with",
|
|
2663
|
+
...y(t),
|
|
2664
|
+
suffix: e
|
|
2665
|
+
});
|
|
2666
|
+
}
|
|
2667
|
+
// @__NO_SIDE_EFFECTS__
|
|
2668
|
+
function U(e) {
|
|
2669
|
+
return new dn({
|
|
2670
|
+
check: "overwrite",
|
|
2671
|
+
tx: e
|
|
2672
|
+
});
|
|
2673
|
+
}
|
|
2674
|
+
// @__NO_SIDE_EFFECTS__
|
|
2675
|
+
function Xi(e) {
|
|
2676
|
+
return /* @__PURE__ */ U((t) => t.normalize(e));
|
|
2677
|
+
}
|
|
2678
|
+
// @__NO_SIDE_EFFECTS__
|
|
2679
|
+
function Zi() {
|
|
2680
|
+
return /* @__PURE__ */ U((e) => e.trim());
|
|
2681
|
+
}
|
|
2682
|
+
// @__NO_SIDE_EFFECTS__
|
|
2683
|
+
function Qi() {
|
|
2684
|
+
return /* @__PURE__ */ U((e) => e.toLowerCase());
|
|
2685
|
+
}
|
|
2686
|
+
// @__NO_SIDE_EFFECTS__
|
|
2687
|
+
function $i() {
|
|
2688
|
+
return /* @__PURE__ */ U((e) => e.toUpperCase());
|
|
2689
|
+
}
|
|
2690
|
+
// @__NO_SIDE_EFFECTS__
|
|
2691
|
+
function ea() {
|
|
2692
|
+
return /* @__PURE__ */ U((e) => te(e));
|
|
2693
|
+
}
|
|
2694
|
+
// @__NO_SIDE_EFFECTS__
|
|
2695
|
+
function ta(e, t, n) {
|
|
2696
|
+
return new e({
|
|
2697
|
+
type: "array",
|
|
2698
|
+
element: t,
|
|
2699
|
+
...y(n)
|
|
2700
|
+
});
|
|
2701
|
+
}
|
|
2702
|
+
// @__NO_SIDE_EFFECTS__
|
|
2703
|
+
function na(e, t, n) {
|
|
2704
|
+
return new e({
|
|
2705
|
+
type: "custom",
|
|
2706
|
+
check: "custom",
|
|
2707
|
+
fn: t,
|
|
2708
|
+
...y(n)
|
|
2709
|
+
});
|
|
2710
|
+
}
|
|
2711
|
+
// @__NO_SIDE_EFFECTS__
|
|
2712
|
+
function ra(e, t) {
|
|
2713
|
+
let n = /* @__PURE__ */ ia((t) => (t.addIssue = (e) => {
|
|
2714
|
+
if (typeof e == "string") t.issues.push(w(e, t.value, n._zod.def));
|
|
2715
|
+
else {
|
|
2716
|
+
let r = e;
|
|
2717
|
+
r.fatal && (r.continue = !1), r.code ??= "custom", "input" in r || (r.input = t.value), r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(w(r));
|
|
2718
|
+
}
|
|
2719
|
+
}, e(t.value, t)), t);
|
|
2720
|
+
return n;
|
|
2721
|
+
}
|
|
2722
|
+
// @__NO_SIDE_EFFECTS__
|
|
2723
|
+
function ia(e, t) {
|
|
2724
|
+
let n = new N({
|
|
2725
|
+
check: "custom",
|
|
2726
|
+
...y(t)
|
|
2727
|
+
});
|
|
2728
|
+
return n._zod.check = e, n;
|
|
2729
|
+
}
|
|
2730
|
+
//#endregion
|
|
2731
|
+
//#region ../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/core/to-json-schema.js
|
|
2732
|
+
function W(e, ...t) {
|
|
2733
|
+
for (let n of t) for (let t of Reflect.ownKeys(n)) Object.prototype.propertyIsEnumerable.call(n, t) && c(e, t, n[t]);
|
|
2734
|
+
return e;
|
|
2735
|
+
}
|
|
2736
|
+
function aa(e) {
|
|
2737
|
+
let t = e?.target ?? "draft-2020-12";
|
|
2738
|
+
return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
|
|
2739
|
+
processors: e.processors ?? {},
|
|
2740
|
+
metadataRegistry: e?.metadata ?? H,
|
|
2741
|
+
target: t,
|
|
2742
|
+
unrepresentable: e?.unrepresentable ?? "throw",
|
|
2743
|
+
override: e?.override ?? (() => {}),
|
|
2744
|
+
io: e?.io ?? "output",
|
|
2745
|
+
counter: 0,
|
|
2746
|
+
seen: /* @__PURE__ */ new Map(),
|
|
2747
|
+
sharedDefsExtractedFor: void 0,
|
|
2748
|
+
sharedEmitDoneFor: void 0,
|
|
2749
|
+
cycles: e?.cycles ?? "ref",
|
|
2750
|
+
reused: e?.reused ?? "inline",
|
|
2751
|
+
intersections: [],
|
|
2752
|
+
deferred: [],
|
|
2753
|
+
external: e?.external ?? void 0
|
|
2754
|
+
};
|
|
2755
|
+
}
|
|
2756
|
+
function G(e, t, n, r, i) {
|
|
2757
|
+
let a = typeof t.unrepresentable == "function" ? t.unrepresentable({
|
|
2758
|
+
zodSchema: e,
|
|
2759
|
+
path: r.path,
|
|
2760
|
+
message: i
|
|
2761
|
+
}) : t.unrepresentable;
|
|
2762
|
+
if (a === "any") return !1;
|
|
2763
|
+
if (a === void 0 || a === "throw") throw Error(i);
|
|
2764
|
+
return Object.assign(n, a), !0;
|
|
2765
|
+
}
|
|
2766
|
+
function K(e, t, n = {
|
|
2767
|
+
path: [],
|
|
2768
|
+
schemaPath: []
|
|
2769
|
+
}) {
|
|
2770
|
+
var r;
|
|
2771
|
+
let i = e._zod.def, a = t.seen.get(e);
|
|
2772
|
+
if (a) return a.count++, n.schemaPath.includes(e) && (a.cycle = n.path), a.schema;
|
|
2773
|
+
let o = {
|
|
2774
|
+
schema: {},
|
|
2775
|
+
count: 1,
|
|
2776
|
+
cycle: void 0,
|
|
2777
|
+
path: n.path
|
|
2778
|
+
};
|
|
2779
|
+
t.seen.set(e, o), t.sharedDefsExtractedFor = void 0, t.sharedEmitDoneFor = void 0;
|
|
2780
|
+
let s = e._zod.toJSONSchema?.();
|
|
2781
|
+
if (s) o.schema = s;
|
|
2782
|
+
else {
|
|
2783
|
+
let r = {
|
|
2784
|
+
...n,
|
|
2785
|
+
schemaPath: [...n.schemaPath, e],
|
|
2786
|
+
path: n.path
|
|
2787
|
+
};
|
|
2788
|
+
if (e._zod.processJSONSchema) e._zod.processJSONSchema(t, o.schema, r);
|
|
2789
|
+
else {
|
|
2790
|
+
let n = o.schema, a = t.processors[i.type];
|
|
2791
|
+
if (!a) throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);
|
|
2792
|
+
a(e, t, n, r);
|
|
2793
|
+
}
|
|
2794
|
+
let a = e._zod.parent;
|
|
2795
|
+
a && (o.ref ||= a, K(a, t, r), t.seen.get(a).isParent = !0);
|
|
2796
|
+
}
|
|
2797
|
+
let c = t.metadataRegistry.get(e);
|
|
2798
|
+
return c && W(o.schema, c), t.io === "input" && q(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
|
|
2799
|
+
}
|
|
2800
|
+
function oa(e) {
|
|
2801
|
+
return e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
2802
|
+
}
|
|
2803
|
+
function sa(e, t) {
|
|
2804
|
+
let n = e.seen.get(t);
|
|
2805
|
+
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2806
|
+
if (e.external && e.sharedDefsExtractedFor === e.external) return;
|
|
2807
|
+
let r = /* @__PURE__ */ new Map();
|
|
2808
|
+
for (let t of e.seen.entries()) {
|
|
2809
|
+
let n = e.metadataRegistry.get(t[0])?.id;
|
|
2810
|
+
if (n) {
|
|
2811
|
+
let e = r.get(n);
|
|
2812
|
+
if (e && e !== t[0]) throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
|
|
2813
|
+
r.set(n, t[0]);
|
|
2814
|
+
}
|
|
2815
|
+
}
|
|
2816
|
+
let i = (t) => {
|
|
2817
|
+
let r = e.target === "draft-2020-12" ? "$defs" : "definitions";
|
|
2818
|
+
if (e.external) {
|
|
2819
|
+
let n = e.external.registry.get(t[0])?.id, i = e.external.uri ?? ((e) => e);
|
|
2820
|
+
if (n) return { ref: i(n) };
|
|
2821
|
+
let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
|
|
2822
|
+
return t[1].defId = a, {
|
|
2823
|
+
defId: a,
|
|
2824
|
+
ref: `${i("__shared")}#/${r}/${oa(a)}`
|
|
2825
|
+
};
|
|
2826
|
+
}
|
|
2827
|
+
let i = `#/${r}/`;
|
|
2828
|
+
if (t[1] === n && !t[1].schema.id) return { ref: "#" };
|
|
2829
|
+
let a = t[1].schema.id ?? `__schema${e.counter++}`;
|
|
2830
|
+
return {
|
|
2831
|
+
defId: a,
|
|
2832
|
+
ref: i + oa(a)
|
|
2833
|
+
};
|
|
2834
|
+
}, a = (e) => {
|
|
2835
|
+
if (e[1].schema.$ref) return;
|
|
2836
|
+
let t = e[1], { ref: n, defId: r } = i(e);
|
|
2837
|
+
t.def = { ...t.schema }, r && (t.defId = r);
|
|
2838
|
+
let a = t.schema;
|
|
2839
|
+
for (let e in a) delete a[e];
|
|
2840
|
+
a.$ref = n;
|
|
2841
|
+
};
|
|
2842
|
+
if (e.cycles === "throw") for (let t of e.seen.entries()) {
|
|
2843
|
+
let e = t[1];
|
|
2844
|
+
if (e.cycle) throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
|
|
2845
|
+
|
|
2846
|
+
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
|
|
2847
|
+
}
|
|
2848
|
+
for (let n of e.seen.entries()) {
|
|
2849
|
+
let r = n[1];
|
|
2850
|
+
if (t === n[0]) {
|
|
2851
|
+
a(n);
|
|
2852
|
+
continue;
|
|
2853
|
+
}
|
|
2854
|
+
if (e.external) {
|
|
2855
|
+
let r = e.external.registry.get(n[0])?.id;
|
|
2856
|
+
if (t !== n[0] && r) {
|
|
2857
|
+
a(n);
|
|
2858
|
+
continue;
|
|
2859
|
+
}
|
|
2860
|
+
}
|
|
2861
|
+
if (e.metadataRegistry.get(n[0])?.id) {
|
|
2862
|
+
a(n);
|
|
2863
|
+
continue;
|
|
2864
|
+
}
|
|
2865
|
+
if (r.cycle) {
|
|
2866
|
+
a(n);
|
|
2867
|
+
continue;
|
|
2868
|
+
}
|
|
2869
|
+
r.count > 1 && e.reused === "ref" && a(n);
|
|
2870
|
+
}
|
|
2871
|
+
e.external && (e.sharedDefsExtractedFor = e.external);
|
|
2872
|
+
}
|
|
2873
|
+
function ca(e) {
|
|
2874
|
+
let t = e.anyOf;
|
|
2875
|
+
if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
|
|
2876
|
+
let n = [];
|
|
2877
|
+
for (let e of t) {
|
|
2878
|
+
if (!e || typeof e != "object") return;
|
|
2879
|
+
ca(e);
|
|
2880
|
+
let t = Object.keys(e);
|
|
2881
|
+
if (t.length !== 1 || t[0] !== "type") return;
|
|
2882
|
+
let r = e.type;
|
|
2883
|
+
for (let e of Array.isArray(r) ? r : [r]) {
|
|
2884
|
+
if (typeof e != "string") return;
|
|
2885
|
+
n.includes(e) || n.push(e);
|
|
2886
|
+
}
|
|
2887
|
+
}
|
|
2888
|
+
delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
|
|
2889
|
+
}
|
|
2890
|
+
var la = /* @__PURE__ */ new Set([
|
|
2891
|
+
"type",
|
|
2892
|
+
"properties",
|
|
2893
|
+
"required",
|
|
2894
|
+
"additionalProperties"
|
|
2895
|
+
]), ua = ["oneOf", "anyOf"];
|
|
2896
|
+
function da(e) {
|
|
2897
|
+
let t = e.additionalProperties;
|
|
2898
|
+
return t === void 0 || t === !1 || typeof t != "object" || !t ? null : Object.keys(t).length ? t : null;
|
|
2899
|
+
}
|
|
2900
|
+
function fa(e) {
|
|
2901
|
+
let t = [];
|
|
2902
|
+
for (let n of e) {
|
|
2903
|
+
if (typeof n != "object" || n.type !== "object") return null;
|
|
2904
|
+
for (let e in n) if (!la.has(e)) return null;
|
|
2905
|
+
t.push(n);
|
|
2906
|
+
}
|
|
2907
|
+
let n = {}, r = /* @__PURE__ */ new Set();
|
|
2908
|
+
for (let e of t) {
|
|
2909
|
+
for (let r in e.properties) {
|
|
2910
|
+
if (Object.prototype.hasOwnProperty.call(n, r)) continue;
|
|
2911
|
+
let e = [];
|
|
2912
|
+
for (let n of t) {
|
|
2913
|
+
let t = n.properties?.[r] ?? da(n);
|
|
2914
|
+
t != null && (e.some((e) => JSON.stringify(e) === JSON.stringify(t)) || e.push(t));
|
|
2915
|
+
}
|
|
2916
|
+
c(n, r, e.length === 1 ? e[0] : fa(e) ?? { allOf: e });
|
|
2917
|
+
}
|
|
2918
|
+
for (let t of e.required ?? []) r.add(t);
|
|
2919
|
+
}
|
|
2920
|
+
let i = {
|
|
2921
|
+
type: "object",
|
|
2922
|
+
properties: n
|
|
2923
|
+
};
|
|
2924
|
+
if (r.size && (i.required = [...r]), t.every((e) => e.additionalProperties === !1)) i.additionalProperties = !1;
|
|
2925
|
+
else {
|
|
2926
|
+
let e = [];
|
|
2927
|
+
for (let n of t) {
|
|
2928
|
+
let t = da(n);
|
|
2929
|
+
t && !e.some((e) => JSON.stringify(e) === JSON.stringify(t)) && e.push(t);
|
|
2930
|
+
}
|
|
2931
|
+
e.length === 1 ? i.additionalProperties = e[0] : e.length > 1 && (i.additionalProperties = { allOf: e });
|
|
2932
|
+
}
|
|
2933
|
+
return i;
|
|
2934
|
+
}
|
|
2935
|
+
function pa(e) {
|
|
2936
|
+
let t = e.allOf;
|
|
2937
|
+
if (!Array.isArray(t) || t.length < 2) return;
|
|
2938
|
+
for (let t of la) if (t in e) return;
|
|
2939
|
+
let n = t.filter((e) => ua.some((t) => Array.isArray(e[t]))), r = null;
|
|
2940
|
+
if (!n.length) r = fa(t);
|
|
2941
|
+
else {
|
|
2942
|
+
let e = n[0], i = ua.find((t) => Array.isArray(e[t]));
|
|
2943
|
+
if (Object.keys(e).length !== 1) return;
|
|
2944
|
+
let a = t.filter((t) => t !== e), o = e[i].map((e) => fa([...a, e]));
|
|
2945
|
+
if (o.some((e) => !e)) return;
|
|
2946
|
+
r = { [i]: o };
|
|
2947
|
+
}
|
|
2948
|
+
r && (delete e.allOf, W(e, r));
|
|
2949
|
+
}
|
|
2950
|
+
function ma(e, t) {
|
|
2951
|
+
let n = e.seen.get(t);
|
|
2952
|
+
if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
|
|
2953
|
+
let r = (t) => {
|
|
2954
|
+
let n = e.seen.get(t);
|
|
2955
|
+
if (n.ref === null) return;
|
|
2956
|
+
let i = n.def ?? n.schema, a = { ...i }, o = n.ref;
|
|
2957
|
+
if (n.ref = null, o) {
|
|
2958
|
+
r(o);
|
|
2959
|
+
let n = e.seen.get(o), s = n.schema;
|
|
2960
|
+
if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : W(i, s), W(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
|
|
2961
|
+
if (s.$ref && n.def) for (let e in i) e !== "$ref" && e !== "allOf" && e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e];
|
|
2962
|
+
}
|
|
2963
|
+
let s = t._zod.parent;
|
|
2964
|
+
if (s && s !== o) {
|
|
2965
|
+
r(s);
|
|
2966
|
+
let t = e.seen.get(s);
|
|
2967
|
+
if (t?.schema.$ref && (i.$ref = t.schema.$ref, t.def)) for (let e in i) e !== "$ref" && e !== "allOf" && e in t.def && JSON.stringify(i[e]) === JSON.stringify(t.def[e]) && delete i[e];
|
|
2968
|
+
}
|
|
2969
|
+
e.override({
|
|
2970
|
+
zodSchema: t,
|
|
2971
|
+
jsonSchema: i,
|
|
2972
|
+
path: n.path ?? []
|
|
2973
|
+
});
|
|
2974
|
+
};
|
|
2975
|
+
if (!e.external || e.sharedEmitDoneFor !== e.external) {
|
|
2976
|
+
for (let t of [...e.seen.entries()].reverse()) r(t[0]);
|
|
2977
|
+
if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) ca(t[1].def ?? t[1].schema);
|
|
2978
|
+
for (let t of e.deferred) t();
|
|
2979
|
+
if (e.intersections.length) {
|
|
2980
|
+
let t = /* @__PURE__ */ new Map();
|
|
2981
|
+
for (let n of e.seen.values()) for (let e of [n.schema, n.def]) {
|
|
2982
|
+
let n = e?.allOf;
|
|
2983
|
+
if (!Array.isArray(n)) continue;
|
|
2984
|
+
let r = t.get(n);
|
|
2985
|
+
r ? r.push(e) : t.set(n, [e]);
|
|
2986
|
+
}
|
|
2987
|
+
for (let n of e.intersections) for (let e of t.get(n) ?? []) pa(e);
|
|
2988
|
+
}
|
|
2989
|
+
}
|
|
2990
|
+
let i = {};
|
|
2991
|
+
if (e.target === "draft-2020-12" ? i.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? i.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? i.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
|
|
2992
|
+
let n = e.external.registry.get(t)?.id;
|
|
2993
|
+
if (!n) throw Error("Schema is missing an `id` property");
|
|
2994
|
+
i.$id = e.external.uri(n);
|
|
2995
|
+
}
|
|
2996
|
+
W(i, n.defId ? n.schema : n.def ?? n.schema);
|
|
2997
|
+
let a = e.metadataRegistry.get(t)?.id;
|
|
2998
|
+
a !== void 0 && i.id === a && delete i.id;
|
|
2999
|
+
let o = e.external?.defs ?? {};
|
|
3000
|
+
if (!e.external || e.sharedEmitDoneFor !== e.external) for (let t of e.seen.entries()) {
|
|
3001
|
+
let e = t[1];
|
|
3002
|
+
e.def && e.defId && (e.def.id === e.defId && delete e.def.id, c(o, e.defId, e.def));
|
|
3003
|
+
}
|
|
3004
|
+
e.external && (e.sharedEmitDoneFor = e.external), e.external || Object.keys(o).length > 0 && (e.target === "draft-2020-12" ? i.$defs = o : i.definitions = o);
|
|
3005
|
+
try {
|
|
3006
|
+
let n = JSON.parse(JSON.stringify(i));
|
|
3007
|
+
return Object.defineProperty(n, "~standard", {
|
|
3008
|
+
value: {
|
|
3009
|
+
...t["~standard"],
|
|
3010
|
+
jsonSchema: {
|
|
3011
|
+
input: ga(t, "input", e.processors),
|
|
3012
|
+
output: ga(t, "output", e.processors)
|
|
3013
|
+
}
|
|
3014
|
+
},
|
|
3015
|
+
enumerable: !1,
|
|
3016
|
+
writable: !1
|
|
3017
|
+
}), n;
|
|
3018
|
+
} catch {
|
|
3019
|
+
throw Error("Error converting schema to JSON.");
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
function q(e, t) {
|
|
3023
|
+
let n = t ?? { seen: /* @__PURE__ */ new Set() };
|
|
3024
|
+
if (n.seen.has(e)) return !1;
|
|
3025
|
+
n.seen.add(e);
|
|
3026
|
+
let r = e._zod.def;
|
|
3027
|
+
if (r.type === "transform") return !0;
|
|
3028
|
+
if (r.type === "array") return q(r.element, n);
|
|
3029
|
+
if (r.type === "set") return q(r.valueType, n);
|
|
3030
|
+
if (r.type === "lazy") return q(r.getter(), n);
|
|
3031
|
+
if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return q(r.innerType, n);
|
|
3032
|
+
if (r.type === "intersection") return q(r.left, n) || q(r.right, n);
|
|
3033
|
+
if (r.type === "record" || r.type === "map") return q(r.keyType, n) || q(r.valueType, n);
|
|
3034
|
+
if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : q(r.in, n) || q(r.out, n);
|
|
3035
|
+
if (r.type === "object") {
|
|
3036
|
+
for (let e in r.shape) if (q(r.shape[e], n)) return !0;
|
|
3037
|
+
return !1;
|
|
3038
|
+
}
|
|
3039
|
+
if (r.type === "union") {
|
|
3040
|
+
for (let e of r.options) if (q(e, n)) return !0;
|
|
3041
|
+
return !1;
|
|
3042
|
+
}
|
|
3043
|
+
if (r.type === "tuple") {
|
|
3044
|
+
for (let e of r.items) if (q(e, n)) return !0;
|
|
3045
|
+
return !!(r.rest && q(r.rest, n));
|
|
3046
|
+
}
|
|
3047
|
+
return !1;
|
|
3048
|
+
}
|
|
3049
|
+
var ha = (e, t = {}) => (n) => {
|
|
3050
|
+
let r = aa({
|
|
3051
|
+
...n,
|
|
3052
|
+
processors: t
|
|
3053
|
+
});
|
|
3054
|
+
return K(e, r), sa(r, e), ma(r, e);
|
|
3055
|
+
}, ga = (e, t, n = {}) => (r) => {
|
|
3056
|
+
let { libraryOptions: i, target: a } = r ?? {}, o = aa({
|
|
3057
|
+
...i ?? {},
|
|
3058
|
+
target: a,
|
|
3059
|
+
io: t,
|
|
3060
|
+
processors: n
|
|
3061
|
+
});
|
|
3062
|
+
return K(e, o), sa(o, e), ma(o, e);
|
|
3063
|
+
}, J = (e, t, n) => {
|
|
3064
|
+
(e[t] === void 0 || n > e[t]) && (e[t] = n);
|
|
3065
|
+
}, Y = (e, t, n) => {
|
|
3066
|
+
(e[t] === void 0 || n < e[t]) && (e[t] = n);
|
|
3067
|
+
}, _a = (e, t) => {
|
|
3068
|
+
J(e, "minimum", t), Y(e, "maximum", t);
|
|
3069
|
+
}, va = (e, t) => {
|
|
3070
|
+
e.multipleOf ??= [], e.multipleOf.includes(t) || e.multipleOf.push(t);
|
|
3071
|
+
}, ya = (e, t) => {
|
|
3072
|
+
e.patterns ??= /* @__PURE__ */ new Set(), e.patterns.add(t);
|
|
3073
|
+
}, ba = (e, t) => {
|
|
3074
|
+
e.mime = e.mime ? e.mime.filter((e) => t.includes(e)) : [...t];
|
|
3075
|
+
}, xa = (e, t) => {
|
|
3076
|
+
e.format = t, t.includes("int") && (e.isInt = !0);
|
|
3077
|
+
}, Sa = (e, t) => J(e, "minimum", t.minimum), Ca = (e, t) => Y(e, "maximum", t.maximum), wa = (e) => (t, n) => {
|
|
3078
|
+
xa(t, n.format);
|
|
3079
|
+
let [r, i] = e[n.format];
|
|
3080
|
+
J(t, "minimum", r), Y(t, "maximum", i);
|
|
3081
|
+
}, Ta = {
|
|
3082
|
+
greater_than: (e, t) => J(e, t.inclusive ? "minimum" : "exclusiveMinimum", t.value),
|
|
3083
|
+
less_than: (e, t) => Y(e, t.inclusive ? "maximum" : "exclusiveMaximum", t.value),
|
|
3084
|
+
multiple_of: (e, t) => va(e, t.value),
|
|
3085
|
+
number_format: wa(le),
|
|
3086
|
+
bigint_format: wa(ue),
|
|
3087
|
+
min_length: Sa,
|
|
3088
|
+
max_length: Ca,
|
|
3089
|
+
length_equals: (e, t) => _a(e, t.length),
|
|
3090
|
+
min_size: Sa,
|
|
3091
|
+
max_size: Ca,
|
|
3092
|
+
size_equals: (e, t) => _a(e, t.size),
|
|
3093
|
+
string_format: (e, t) => {
|
|
3094
|
+
xa(e, t.format), t.pattern && ya(e, t.pattern), (t.format === "base64" || t.format === "base64url") && (e.contentEncoding = t.format), (t.local || t.precision === -1) && (e.laxFormat = !0);
|
|
3095
|
+
},
|
|
3096
|
+
mime_type: (e, t) => ba(e, t.mime)
|
|
3097
|
+
};
|
|
3098
|
+
function X(e) {
|
|
3099
|
+
let t = {}, n = e._zod.def, r = e._zod.traits.has("$ZodCheck") ? [e, ...n.checks ?? []] : n.checks ?? [];
|
|
3100
|
+
for (let e of r) Ta[e._zod.def.check]?.(t, e._zod.def);
|
|
3101
|
+
let i = e._zod.bag;
|
|
3102
|
+
i.minimum !== void 0 && J(t, "minimum", i.minimum), i.exclusiveMinimum !== void 0 && J(t, "exclusiveMinimum", i.exclusiveMinimum), i.maximum !== void 0 && Y(t, "maximum", i.maximum), i.exclusiveMaximum !== void 0 && Y(t, "exclusiveMaximum", i.exclusiveMaximum), i.multipleOf !== void 0 && va(t, i.multipleOf), i.format !== void 0 && (t.format ??= i.format, i.format.includes("int") && (t.isInt = !0)), i.mime && ba(t, i.mime);
|
|
3103
|
+
for (let e of i.patterns ?? []) ya(t, e);
|
|
3104
|
+
return t;
|
|
3105
|
+
}
|
|
3106
|
+
var Ea = {
|
|
3107
|
+
guid: "uuid",
|
|
3108
|
+
url: "uri",
|
|
3109
|
+
datetime: "date-time",
|
|
3110
|
+
json_string: "json-string",
|
|
3111
|
+
regex: ""
|
|
3112
|
+
}, Da = /* @__PURE__ */ new Map([[Jn, Nt], [Xn, Pt]]), Oa = (e) => Da.get(e) ?? e, ka = (e, t, n, r) => {
|
|
3113
|
+
let i = n;
|
|
3114
|
+
i.type = "string";
|
|
3115
|
+
let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l, laxFormat: u } = X(e);
|
|
3116
|
+
if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = Ea[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
|
|
3117
|
+
let e = [...c].map(Oa);
|
|
3118
|
+
e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
|
|
3119
|
+
...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
|
|
3120
|
+
pattern: e.source
|
|
3121
|
+
}))]);
|
|
3122
|
+
}
|
|
3123
|
+
}, Aa = (e, t, n, r) => {
|
|
3124
|
+
let i = n, { minimum: a, maximum: o, multipleOf: s, exclusiveMaximum: c, exclusiveMinimum: l, isInt: u } = X(e);
|
|
3125
|
+
i.type = u ? "integer" : "number";
|
|
3126
|
+
let d = typeof l == "number" && l >= (a ?? -Infinity), f = typeof c == "number" && c <= (o ?? Infinity), p = t.target === "draft-04" || t.target === "openapi-3.0";
|
|
3127
|
+
if (d ? p ? (i.minimum = l, i.exclusiveMinimum = !0) : i.exclusiveMinimum = l : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = c, i.exclusiveMaximum = !0) : i.exclusiveMaximum = c : typeof o == "number" && (i.maximum = o), s) {
|
|
3128
|
+
let n = /* @__PURE__ */ new Set();
|
|
3129
|
+
for (let a of s) Number.isFinite(a) && a !== 0 ? n.add(Math.abs(a)) : G(e, t, i, r, `A multipleOf divisor of ${a} cannot be represented in JSON Schema`);
|
|
3130
|
+
let [a, ...o] = n;
|
|
3131
|
+
a !== void 0 && (i.multipleOf = a), o.length && (i.allOf = [...i.allOf ?? [], ...o.map((e) => ({ multipleOf: e }))]);
|
|
3132
|
+
}
|
|
3133
|
+
}, ja = (e, t, n, r) => {
|
|
3134
|
+
n.type = "boolean";
|
|
3135
|
+
}, Ma = (e, t, n, r) => {
|
|
3136
|
+
n.not = {};
|
|
3137
|
+
}, Na = (t, n, r, i) => {
|
|
3138
|
+
let a = t._zod.def, o = e(a.entries);
|
|
3139
|
+
if (o.length === 0) {
|
|
3140
|
+
r.not = {};
|
|
3141
|
+
return;
|
|
3142
|
+
}
|
|
3143
|
+
o.every((e) => typeof e == "number") && (r.type = "number"), o.every((e) => typeof e == "string") && (r.type = "string"), r.enum = o;
|
|
3144
|
+
}, Pa = (e, t, n, r) => {
|
|
3145
|
+
G(e, t, n, r, "Custom types cannot be represented in JSON Schema");
|
|
3146
|
+
}, Fa = (e, t, n, r) => {
|
|
3147
|
+
G(e, t, n, r, "Transforms cannot be represented in JSON Schema");
|
|
3148
|
+
}, Ia = (e, t, n, r) => {
|
|
3149
|
+
let i = n, a = e._zod.def, { minimum: o, maximum: s } = X(e);
|
|
3150
|
+
typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = K(a.element, t, {
|
|
3151
|
+
...r,
|
|
3152
|
+
path: [...r.path, "items"]
|
|
3153
|
+
});
|
|
3154
|
+
};
|
|
3155
|
+
function La(e) {
|
|
3156
|
+
let t = e._zod.def;
|
|
3157
|
+
return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? La(t.out) : t.type === "catch" ? La(t.innerType) : e._zod.optin;
|
|
3158
|
+
}
|
|
3159
|
+
var Ra = (e, t, n, r) => {
|
|
3160
|
+
let i = n, a = e._zod.def, o = a.shape;
|
|
3161
|
+
if (Object.getOwnPropertySymbols(o).length && G(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
|
|
3162
|
+
i.type = "object", i.properties = {};
|
|
3163
|
+
for (let e in o) c(i.properties, e, K(o[e], t, {
|
|
3164
|
+
...r,
|
|
3165
|
+
path: [
|
|
3166
|
+
...r.path,
|
|
3167
|
+
"properties",
|
|
3168
|
+
e
|
|
3169
|
+
]
|
|
3170
|
+
}));
|
|
3171
|
+
let s = [];
|
|
3172
|
+
for (let e of Object.keys(o)) {
|
|
3173
|
+
let n = a.shape[e];
|
|
3174
|
+
(t.io === "input" ? La(n) === void 0 : n._zod.optout === void 0) && s.push(e);
|
|
3175
|
+
}
|
|
3176
|
+
s.length > 0 && (i.required = s), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = K(a.catchall, t, {
|
|
3177
|
+
...r,
|
|
3178
|
+
path: [...r.path, "additionalProperties"]
|
|
3179
|
+
})) : t.io === "output" && (i.additionalProperties = !1);
|
|
3180
|
+
}, za = (e, t, n, r) => {
|
|
3181
|
+
let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => K(e, t, {
|
|
3182
|
+
...r,
|
|
3183
|
+
path: [
|
|
3184
|
+
...r.path,
|
|
3185
|
+
a ? "oneOf" : "anyOf",
|
|
3186
|
+
n
|
|
3187
|
+
]
|
|
3188
|
+
}));
|
|
3189
|
+
a ? n.oneOf = o : n.anyOf = o;
|
|
3190
|
+
}, Ba = (e, t, n, r) => {
|
|
3191
|
+
let i = e._zod.def, a = K(i.left, t, {
|
|
3192
|
+
...r,
|
|
3193
|
+
path: [
|
|
3194
|
+
...r.path,
|
|
3195
|
+
"allOf",
|
|
3196
|
+
0
|
|
3197
|
+
]
|
|
3198
|
+
}), o = K(i.right, t, {
|
|
3199
|
+
...r,
|
|
3200
|
+
path: [
|
|
3201
|
+
...r.path,
|
|
3202
|
+
"allOf",
|
|
3203
|
+
1
|
|
3204
|
+
]
|
|
3205
|
+
}), s = (e) => "allOf" in e && Object.keys(e).length === 1, c = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
|
|
3206
|
+
n.allOf = c, t.intersections.push(c);
|
|
3207
|
+
}, Va = (e, t, n, r) => {
|
|
3208
|
+
let i = e._zod.def, a = K(i.innerType, t, r), o = t.seen.get(e);
|
|
3209
|
+
t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
|
|
3210
|
+
}, Ha = (e, t, n, r) => {
|
|
3211
|
+
let i = e._zod.def;
|
|
3212
|
+
K(i.innerType, t, r);
|
|
3213
|
+
let a = t.seen.get(e);
|
|
3214
|
+
a.ref = i.innerType;
|
|
3215
|
+
}, Ua = Symbol();
|
|
3216
|
+
function Wa(e, t, n, r, i) {
|
|
3217
|
+
let a = !1, o = JSON.stringify(e, (e, t) => typeof t == "bigint" ? (a = !0, null) : t);
|
|
3218
|
+
return a ? (G(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), Ua) : JSON.parse(o);
|
|
3219
|
+
}
|
|
3220
|
+
var Ga = (e, t, n, r) => {
|
|
3221
|
+
let i = e._zod.def;
|
|
3222
|
+
K(i.innerType, t, r);
|
|
3223
|
+
let a = t.seen.get(e);
|
|
3224
|
+
a.ref = i.innerType;
|
|
3225
|
+
let o = Wa(i.defaultValue, e, t, n, r);
|
|
3226
|
+
o !== Ua && (n.default = o);
|
|
3227
|
+
}, Ka = (e, t, n, r) => {
|
|
3228
|
+
let i = e._zod.def;
|
|
3229
|
+
K(i.innerType, t, r);
|
|
3230
|
+
let a = t.seen.get(e);
|
|
3231
|
+
if (a.ref = i.innerType, t.io !== "input") return;
|
|
3232
|
+
let o = Wa(i.defaultValue, e, t, n, r);
|
|
3233
|
+
o !== Ua && (n._prefault = o);
|
|
3234
|
+
}, qa = (e, t, n, r) => {
|
|
3235
|
+
let i = e._zod.def;
|
|
3236
|
+
K(i.innerType, t, r);
|
|
3237
|
+
let a = t.seen.get(e);
|
|
3238
|
+
a.ref = i.innerType;
|
|
3239
|
+
let o;
|
|
3240
|
+
try {
|
|
3241
|
+
o = i.catchValue(void 0);
|
|
3242
|
+
} catch {
|
|
3243
|
+
G(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
|
|
3244
|
+
return;
|
|
3245
|
+
}
|
|
3246
|
+
n.default = o;
|
|
3247
|
+
}, Ja = (e, t, n, r) => {
|
|
3248
|
+
let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
|
|
3249
|
+
K(o, t, r);
|
|
3250
|
+
let s = t.seen.get(e);
|
|
3251
|
+
s.ref = o;
|
|
3252
|
+
}, Ya = (e, t, n, r) => {
|
|
3253
|
+
let i = e._zod.def;
|
|
3254
|
+
K(i.innerType, t, r);
|
|
3255
|
+
let a = t.seen.get(e);
|
|
3256
|
+
a.ref = i.innerType, n.readOnly = !0;
|
|
3257
|
+
}, Xa = (e, t, n, r) => {
|
|
3258
|
+
let i = e._zod.def;
|
|
3259
|
+
K(i.innerType, t, r);
|
|
3260
|
+
let a = t.seen.get(e);
|
|
3261
|
+
a.ref = i.innerType;
|
|
3262
|
+
}, Za = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
|
|
3263
|
+
function Qa(e, t, n) {
|
|
3264
|
+
Object.defineProperty(e, t, {
|
|
3265
|
+
configurable: !0,
|
|
3266
|
+
enumerable: !1,
|
|
3267
|
+
get() {
|
|
3268
|
+
let e = n(this);
|
|
3269
|
+
return Object.defineProperty(this, t, {
|
|
3270
|
+
value: e,
|
|
3271
|
+
configurable: !0,
|
|
3272
|
+
writable: !0
|
|
3273
|
+
}), e;
|
|
3274
|
+
},
|
|
3275
|
+
set(e) {
|
|
3276
|
+
Object.defineProperty(this, t, {
|
|
3277
|
+
value: e,
|
|
3278
|
+
configurable: !0,
|
|
3279
|
+
writable: !0
|
|
3280
|
+
});
|
|
3281
|
+
}
|
|
3282
|
+
});
|
|
3283
|
+
}
|
|
3284
|
+
var Z = /*@__PURE__*/ O("ZodError", (e, t) => {
|
|
3285
|
+
Je.init(e, t), e.name = "ZodError";
|
|
3286
|
+
let r = Object.getPrototypeOf(e);
|
|
3287
|
+
Za.has(r) || (Za.add(r), Qa(r, "format", (e) => (t) => Ze(e, t)), Qa(r, "flatten", (e) => (t) => Xe(e, t)), Qa(r, "addIssue", (e) => (t) => {
|
|
3288
|
+
e.issues.push(t), e.message = JSON.stringify(e.issues, n, 2);
|
|
3289
|
+
}), Qa(r, "addIssues", (e) => (t) => {
|
|
3290
|
+
e.issues.push(...t), e.message = JSON.stringify(e.issues, n, 2);
|
|
3291
|
+
}), Object.defineProperty(r, "isEmpty", {
|
|
3292
|
+
configurable: !0,
|
|
3293
|
+
enumerable: !1,
|
|
3294
|
+
get() {
|
|
3295
|
+
return this.issues.length === 0;
|
|
3296
|
+
}
|
|
3297
|
+
}));
|
|
3298
|
+
}, void 0, { Parent: Error }), $a = /* @__PURE__ */ Qe(Z), eo = /* @__PURE__ */ $e(Z), to = /* @__PURE__ */ et(Z), no = /* @__PURE__ */ nt(Z), ro = /* @__PURE__ */ ct(Z), io = /* @__PURE__ */ lt(Z), ao = /* @__PURE__ */ ut(Z), oo = /* @__PURE__ */ dt(Z), so = /* @__PURE__ */ ft(Z), co = /* @__PURE__ */ pt(Z), lo = /* @__PURE__ */ mt(Z), uo = /* @__PURE__ */ ht(Z);
|
|
3299
|
+
//#endregion
|
|
3300
|
+
//#region ../node_modules/.bun/zod@4.6.7/node_modules/zod/v4/classic/schemas.js
|
|
3301
|
+
function fo() {
|
|
3302
|
+
A.localeError || j($r());
|
|
3303
|
+
}
|
|
3304
|
+
function po() {
|
|
3305
|
+
A.memoizer || j({ memoizer: Xr() });
|
|
3306
|
+
}
|
|
3307
|
+
var Q = /*@__PURE__*/ O("ZodType", (e, t) => (fo(), P.init(e, t), e.def = t, e.type = t.type, e), {
|
|
3308
|
+
check(...e) {
|
|
3309
|
+
let t = this.def;
|
|
3310
|
+
return this.clone(h(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
|
|
3311
|
+
check: e,
|
|
3312
|
+
def: { check: "custom" },
|
|
3313
|
+
onattach: []
|
|
3314
|
+
} } : e)] }), { parent: !0 });
|
|
3315
|
+
},
|
|
3316
|
+
with(...e) {
|
|
3317
|
+
return this.check(...e);
|
|
3318
|
+
},
|
|
3319
|
+
clone(e, t) {
|
|
3320
|
+
return v(this, e, t);
|
|
3321
|
+
},
|
|
3322
|
+
brand() {
|
|
3323
|
+
return this;
|
|
3324
|
+
},
|
|
3325
|
+
register(e, t) {
|
|
3326
|
+
return e.add(this, t), this;
|
|
3327
|
+
},
|
|
3328
|
+
refine(e, t) {
|
|
3329
|
+
return this.check(Ds(e, t));
|
|
3330
|
+
},
|
|
3331
|
+
superRefine(e, t) {
|
|
3332
|
+
return this.check(Os(e, t));
|
|
3333
|
+
},
|
|
3334
|
+
overwrite(e) {
|
|
3335
|
+
return this.check(/* @__PURE__ */ U(e));
|
|
3336
|
+
},
|
|
3337
|
+
optional() {
|
|
3338
|
+
return ls(this);
|
|
3339
|
+
},
|
|
3340
|
+
exactOptional() {
|
|
3341
|
+
return ds(this);
|
|
3342
|
+
},
|
|
3343
|
+
nullable() {
|
|
3344
|
+
return ps(this);
|
|
3345
|
+
},
|
|
3346
|
+
nullish() {
|
|
3347
|
+
return ls(ps(this));
|
|
3348
|
+
},
|
|
3349
|
+
nonoptional(e) {
|
|
3350
|
+
return ys(this, e);
|
|
3351
|
+
},
|
|
3352
|
+
array() {
|
|
3353
|
+
return Zo(this);
|
|
3354
|
+
},
|
|
3355
|
+
or(e) {
|
|
3356
|
+
return ts([this, e]);
|
|
3357
|
+
},
|
|
3358
|
+
and(e) {
|
|
3359
|
+
return rs(this, e);
|
|
3360
|
+
},
|
|
3361
|
+
transform(e) {
|
|
3362
|
+
return Cs(this, ss(e));
|
|
3363
|
+
},
|
|
3364
|
+
default(e) {
|
|
3365
|
+
return hs(this, e);
|
|
3366
|
+
},
|
|
3367
|
+
prefault(e) {
|
|
3368
|
+
return _s(this, e);
|
|
3369
|
+
},
|
|
3370
|
+
catch(e) {
|
|
3371
|
+
return xs(this, e);
|
|
3372
|
+
},
|
|
3373
|
+
pipe(e) {
|
|
3374
|
+
return Cs(this, e);
|
|
3375
|
+
},
|
|
3376
|
+
readonly() {
|
|
3377
|
+
return Ts(this);
|
|
3378
|
+
},
|
|
3379
|
+
describe(e) {
|
|
3380
|
+
let t = this.clone();
|
|
3381
|
+
return H.add(t, { description: e }), t;
|
|
3382
|
+
},
|
|
3383
|
+
meta(...e) {
|
|
3384
|
+
if (e.length === 0) return H.get(this);
|
|
3385
|
+
let t = this.clone();
|
|
3386
|
+
return H.add(t, e[0]), t;
|
|
3387
|
+
},
|
|
3388
|
+
isOptional() {
|
|
3389
|
+
return this.safeParse(void 0).success;
|
|
3390
|
+
},
|
|
3391
|
+
isNullable() {
|
|
3392
|
+
return this.safeParse(null).success;
|
|
3393
|
+
},
|
|
3394
|
+
apply(e, ...t) {
|
|
3395
|
+
return t.length === 0 ? e(this) : e(this, ...t);
|
|
3396
|
+
},
|
|
3397
|
+
get "~standard"() {
|
|
3398
|
+
return Oe(this, "~standard", {
|
|
3399
|
+
...gn(this),
|
|
3400
|
+
jsonSchema: {
|
|
3401
|
+
input: ga(this, "input"),
|
|
3402
|
+
output: ga(this, "output")
|
|
3403
|
+
}
|
|
3404
|
+
});
|
|
3405
|
+
},
|
|
3406
|
+
set "~standard"(e) {
|
|
3407
|
+
T(this, "~standard", e);
|
|
3408
|
+
},
|
|
3409
|
+
parse: function e(t, n) {
|
|
3410
|
+
return $a(this, t, n, { callee: e });
|
|
3411
|
+
},
|
|
3412
|
+
parseAsync: async function e(t, n) {
|
|
3413
|
+
return await eo(this, t, n, { callee: e });
|
|
3414
|
+
},
|
|
3415
|
+
safeParse(e, t) {
|
|
3416
|
+
return to(this, e, t);
|
|
3417
|
+
},
|
|
3418
|
+
async safeParseAsync(e, t) {
|
|
3419
|
+
return no(this, e, t);
|
|
3420
|
+
},
|
|
3421
|
+
get spa() {
|
|
3422
|
+
return this?.safeParseAsync;
|
|
3423
|
+
},
|
|
3424
|
+
set spa(e) {
|
|
3425
|
+
T(this, "spa", e);
|
|
3426
|
+
},
|
|
3427
|
+
validate(e, t) {
|
|
3428
|
+
return at(this, e, t);
|
|
3429
|
+
},
|
|
3430
|
+
validateAsync(e, t) {
|
|
3431
|
+
return st(this, e, t);
|
|
3432
|
+
},
|
|
3433
|
+
encode: function e(t, n) {
|
|
3434
|
+
return ro(this, t, n, { callee: e });
|
|
3435
|
+
},
|
|
3436
|
+
decode: function e(t, n) {
|
|
3437
|
+
return io(this, t, n, { callee: e });
|
|
3438
|
+
},
|
|
3439
|
+
encodeAsync: async function e(t, n) {
|
|
3440
|
+
return await ao(this, t, n, { callee: e });
|
|
3441
|
+
},
|
|
3442
|
+
decodeAsync: async function e(t, n) {
|
|
3443
|
+
return await oo(this, t, n, { callee: e });
|
|
3444
|
+
},
|
|
3445
|
+
safeEncode(e, t) {
|
|
3446
|
+
return so(this, e, t);
|
|
3447
|
+
},
|
|
3448
|
+
safeDecode(e, t) {
|
|
3449
|
+
return co(this, e, t);
|
|
3450
|
+
},
|
|
3451
|
+
async safeEncodeAsync(e, t) {
|
|
3452
|
+
return lo(this, e, t);
|
|
3453
|
+
},
|
|
3454
|
+
async safeDecodeAsync(e, t) {
|
|
3455
|
+
return uo(this, e, t);
|
|
3456
|
+
},
|
|
3457
|
+
toJSONSchema(e) {
|
|
3458
|
+
return ha(this, {})(e);
|
|
3459
|
+
},
|
|
3460
|
+
get description() {
|
|
3461
|
+
return H.get(this)?.description;
|
|
3462
|
+
},
|
|
3463
|
+
get _def() {
|
|
3464
|
+
return this._zod.def;
|
|
3465
|
+
}
|
|
3466
|
+
}), mo = /*@__PURE__*/ O("_ZodString", (e, t) => {
|
|
3467
|
+
_n.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => ka(e, t, n, r);
|
|
3468
|
+
}, /*@__PURE__*/ ke({
|
|
3469
|
+
format: (e) => X(e).format ?? null,
|
|
3470
|
+
minLength: (e) => X(e).minimum ?? null,
|
|
3471
|
+
maxLength: (e) => X(e).maximum ?? null
|
|
3472
|
+
}, {
|
|
3473
|
+
regex(...e) {
|
|
3474
|
+
return this.check(/* @__PURE__ */ Wi(...e));
|
|
3475
|
+
},
|
|
3476
|
+
includes(...e) {
|
|
3477
|
+
return this.check(/* @__PURE__ */ qi(...e));
|
|
3478
|
+
},
|
|
3479
|
+
startsWith(...e) {
|
|
3480
|
+
return this.check(/* @__PURE__ */ Ji(...e));
|
|
3481
|
+
},
|
|
3482
|
+
endsWith(...e) {
|
|
3483
|
+
return this.check(/* @__PURE__ */ Yi(...e));
|
|
3484
|
+
},
|
|
3485
|
+
min(...e) {
|
|
3486
|
+
return this.check(/* @__PURE__ */ Hi(...e));
|
|
3487
|
+
},
|
|
3488
|
+
max(...e) {
|
|
3489
|
+
return this.check(/* @__PURE__ */ Vi(...e));
|
|
3490
|
+
},
|
|
3491
|
+
length(...e) {
|
|
3492
|
+
return this.check(/* @__PURE__ */ Ui(...e));
|
|
3493
|
+
},
|
|
3494
|
+
nonempty(...e) {
|
|
3495
|
+
return this.check(/* @__PURE__ */ Hi(1, ...e));
|
|
3496
|
+
},
|
|
3497
|
+
lowercase(e) {
|
|
3498
|
+
return this.check(/* @__PURE__ */ Gi(e));
|
|
3499
|
+
},
|
|
3500
|
+
uppercase(e) {
|
|
3501
|
+
return this.check(/* @__PURE__ */ Ki(e));
|
|
3502
|
+
},
|
|
3503
|
+
trim() {
|
|
3504
|
+
return this.check(/* @__PURE__ */ Zi());
|
|
3505
|
+
},
|
|
3506
|
+
normalize(...e) {
|
|
3507
|
+
return this.check(/* @__PURE__ */ Xi(...e));
|
|
3508
|
+
},
|
|
3509
|
+
toLowerCase() {
|
|
3510
|
+
return this.check(/* @__PURE__ */ Qi());
|
|
3511
|
+
},
|
|
3512
|
+
toUpperCase() {
|
|
3513
|
+
return this.check(/* @__PURE__ */ $i());
|
|
3514
|
+
},
|
|
3515
|
+
slugify() {
|
|
3516
|
+
return this.check(/* @__PURE__ */ ea());
|
|
3517
|
+
}
|
|
3518
|
+
})), ho = /*@__PURE__*/ O("ZodString", (e, t) => {
|
|
3519
|
+
_n.init(e, t), mo.init(e, t);
|
|
3520
|
+
}, {
|
|
3521
|
+
email(e) {
|
|
3522
|
+
return this.check(/* @__PURE__ */ ai(xo, e));
|
|
3523
|
+
},
|
|
3524
|
+
url(e) {
|
|
3525
|
+
return this.check(/* @__PURE__ */ di(wo, e));
|
|
3526
|
+
},
|
|
3527
|
+
jwt(e) {
|
|
3528
|
+
return this.check(/* @__PURE__ */ Ei(zo, e));
|
|
3529
|
+
},
|
|
3530
|
+
emoji(e) {
|
|
3531
|
+
return this.check(/* @__PURE__ */ fi(To, e));
|
|
3532
|
+
},
|
|
3533
|
+
guid(e) {
|
|
3534
|
+
return this.check(/* @__PURE__ */ oi(So, e));
|
|
3535
|
+
},
|
|
3536
|
+
uuid(e) {
|
|
3537
|
+
return this.check(/* @__PURE__ */ si(Co, e));
|
|
3538
|
+
},
|
|
3539
|
+
uuidv4(e) {
|
|
3540
|
+
return this.check(/* @__PURE__ */ ci(Co, e));
|
|
3541
|
+
},
|
|
3542
|
+
uuidv6(e) {
|
|
3543
|
+
return this.check(/* @__PURE__ */ li(Co, e));
|
|
3544
|
+
},
|
|
3545
|
+
uuidv7(e) {
|
|
3546
|
+
return this.check(/* @__PURE__ */ ui(Co, e));
|
|
3547
|
+
},
|
|
3548
|
+
nanoid(e) {
|
|
3549
|
+
return this.check(/* @__PURE__ */ pi(Eo, e));
|
|
3550
|
+
},
|
|
3551
|
+
cuid(e) {
|
|
3552
|
+
return this.check(/* @__PURE__ */ mi(Do, e));
|
|
3553
|
+
},
|
|
3554
|
+
cuid2(e) {
|
|
3555
|
+
return this.check(/* @__PURE__ */ hi(Oo, e));
|
|
3556
|
+
},
|
|
3557
|
+
ulid(e) {
|
|
3558
|
+
return this.check(/* @__PURE__ */ gi(ko, e));
|
|
3559
|
+
},
|
|
3560
|
+
base64(e) {
|
|
3561
|
+
return this.check(/* @__PURE__ */ Ci(Io, e));
|
|
3562
|
+
},
|
|
3563
|
+
base64url(e) {
|
|
3564
|
+
return this.check(/* @__PURE__ */ wi(Lo, e));
|
|
3565
|
+
},
|
|
3566
|
+
xid(e) {
|
|
3567
|
+
return this.check(/* @__PURE__ */ _i(Ao, e));
|
|
3568
|
+
},
|
|
3569
|
+
ksuid(e) {
|
|
3570
|
+
return this.check(/* @__PURE__ */ vi(jo, e));
|
|
3571
|
+
},
|
|
3572
|
+
ipv4(e) {
|
|
3573
|
+
return this.check(/* @__PURE__ */ yi(Mo, e));
|
|
3574
|
+
},
|
|
3575
|
+
ipv6(e) {
|
|
3576
|
+
return this.check(/* @__PURE__ */ bi(No, e));
|
|
3577
|
+
},
|
|
3578
|
+
cidrv4(e) {
|
|
3579
|
+
return this.check(/* @__PURE__ */ xi(Po, e));
|
|
3580
|
+
},
|
|
3581
|
+
cidrv6(e) {
|
|
3582
|
+
return this.check(/* @__PURE__ */ Si(Fo, e));
|
|
3583
|
+
},
|
|
3584
|
+
e164(e) {
|
|
3585
|
+
return this.check(/* @__PURE__ */ Ti(Ro, e));
|
|
3586
|
+
},
|
|
3587
|
+
datetime(e) {
|
|
3588
|
+
return this.check(/* @__PURE__ */ Di(_o, e));
|
|
3589
|
+
},
|
|
3590
|
+
date(e) {
|
|
3591
|
+
return this.check(/* @__PURE__ */ Oi(vo, e));
|
|
3592
|
+
},
|
|
3593
|
+
time(e) {
|
|
3594
|
+
return this.check(/* @__PURE__ */ ki(yo, e));
|
|
3595
|
+
},
|
|
3596
|
+
duration(e) {
|
|
3597
|
+
return this.check(/* @__PURE__ */ Ai(bo, e));
|
|
3598
|
+
}
|
|
3599
|
+
});
|
|
3600
|
+
function go(e) {
|
|
3601
|
+
return /* @__PURE__ */ ii(ho, e);
|
|
3602
|
+
}
|
|
3603
|
+
var $ = /*@__PURE__*/ O("ZodStringFormat", (e, t) => {
|
|
3604
|
+
F.init(e, t), mo.init(e, t);
|
|
3605
|
+
}), _o = /*@__PURE__*/ O("ZodISODateTime", (e, t) => {
|
|
3606
|
+
In.init(e, t), $.init(e, t);
|
|
3607
|
+
}), vo = /*@__PURE__*/ O("ZodISODate", (e, t) => {
|
|
3608
|
+
Ln.init(e, t), $.init(e, t);
|
|
3609
|
+
}), yo = /*@__PURE__*/ O("ZodISOTime", (e, t) => {
|
|
3610
|
+
Rn.init(e, t), $.init(e, t);
|
|
3611
|
+
}), bo = /*@__PURE__*/ O("ZodISODuration", (e, t) => {
|
|
3612
|
+
zn.init(e, t), $.init(e, t);
|
|
3613
|
+
}), xo = /*@__PURE__*/ O("ZodEmail", (e, t) => {
|
|
3614
|
+
bn.init(e, t), $.init(e, t);
|
|
3615
|
+
}), So = /*@__PURE__*/ O("ZodGUID", (e, t) => {
|
|
3616
|
+
vn.init(e, t), $.init(e, t);
|
|
3617
|
+
}), Co = /*@__PURE__*/ O("ZodUUID", (e, t) => {
|
|
3618
|
+
yn.init(e, t), $.init(e, t);
|
|
3619
|
+
}), wo = /*@__PURE__*/ O("ZodURL", (e, t) => {
|
|
3620
|
+
On.init(e, t), $.init(e, t);
|
|
3621
|
+
}), To = /*@__PURE__*/ O("ZodEmoji", (e, t) => {
|
|
3622
|
+
kn.init(e, t), $.init(e, t);
|
|
3623
|
+
}), Eo = /*@__PURE__*/ O("ZodNanoID", (e, t) => {
|
|
3624
|
+
An.init(e, t), $.init(e, t);
|
|
3625
|
+
}), Do = /*@__PURE__*/ O("ZodCUID", (e, t) => {
|
|
3626
|
+
jn.init(e, t), $.init(e, t);
|
|
3627
|
+
}), Oo = /*@__PURE__*/ O("ZodCUID2", (e, t) => {
|
|
3628
|
+
Mn.init(e, t), $.init(e, t);
|
|
3629
|
+
}), ko = /*@__PURE__*/ O("ZodULID", (e, t) => {
|
|
3630
|
+
Nn.init(e, t), $.init(e, t);
|
|
3631
|
+
}), Ao = /*@__PURE__*/ O("ZodXID", (e, t) => {
|
|
3632
|
+
Pn.init(e, t), $.init(e, t);
|
|
3633
|
+
}), jo = /*@__PURE__*/ O("ZodKSUID", (e, t) => {
|
|
3634
|
+
Fn.init(e, t), $.init(e, t);
|
|
3635
|
+
}), Mo = /*@__PURE__*/ O("ZodIPv4", (e, t) => {
|
|
3636
|
+
Bn.init(e, t), $.init(e, t);
|
|
3637
|
+
}), No = /*@__PURE__*/ O("ZodIPv6", (e, t) => {
|
|
3638
|
+
Un.init(e, t), $.init(e, t);
|
|
3639
|
+
}), Po = /*@__PURE__*/ O("ZodCIDRv4", (e, t) => {
|
|
3640
|
+
Wn.init(e, t), $.init(e, t);
|
|
3641
|
+
}), Fo = /*@__PURE__*/ O("ZodCIDRv6", (e, t) => {
|
|
3642
|
+
Kn.init(e, t), $.init(e, t);
|
|
3643
|
+
}), Io = /*@__PURE__*/ O("ZodBase64", (e, t) => {
|
|
3644
|
+
Yn.init(e, t), $.init(e, t);
|
|
3645
|
+
}), Lo = /*@__PURE__*/ O("ZodBase64URL", (e, t) => {
|
|
3646
|
+
Qn.init(e, t), $.init(e, t);
|
|
3647
|
+
}), Ro = /*@__PURE__*/ O("ZodE164", (e, t) => {
|
|
3648
|
+
$n.init(e, t), $.init(e, t);
|
|
3649
|
+
}), zo = /*@__PURE__*/ O("ZodJWT", (e, t) => {
|
|
3650
|
+
tr.init(e, t), $.init(e, t);
|
|
3651
|
+
}), Bo = /*@__PURE__*/ O("ZodNumber", (e, t) => {
|
|
3652
|
+
nr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Aa(e, t, n, r), e.isFinite = !0;
|
|
3653
|
+
}, /*@__PURE__*/ ke({
|
|
3654
|
+
minValue: (e) => {
|
|
3655
|
+
let { minimum: t, exclusiveMinimum: n } = X(e);
|
|
3656
|
+
return Math.max(t ?? -Infinity, n ?? -Infinity);
|
|
3657
|
+
},
|
|
3658
|
+
maxValue: (e) => {
|
|
3659
|
+
let { maximum: t, exclusiveMaximum: n } = X(e);
|
|
3660
|
+
return Math.min(t ?? Infinity, n ?? Infinity);
|
|
3661
|
+
},
|
|
3662
|
+
isInt: (e) => {
|
|
3663
|
+
let { isInt: t, multipleOf: n } = X(e);
|
|
3664
|
+
return !!t || !!n?.some(Number.isSafeInteger);
|
|
3665
|
+
},
|
|
3666
|
+
format: (e) => X(e).format ?? null
|
|
3667
|
+
}, {
|
|
3668
|
+
gt(e, t) {
|
|
3669
|
+
return this.check(/* @__PURE__ */ Ri(e, t));
|
|
3670
|
+
},
|
|
3671
|
+
gte(e, t) {
|
|
3672
|
+
return this.check(/* @__PURE__ */ zi(e, t));
|
|
3673
|
+
},
|
|
3674
|
+
min(e, t) {
|
|
3675
|
+
return this.check(/* @__PURE__ */ zi(e, t));
|
|
3676
|
+
},
|
|
3677
|
+
lt(e, t) {
|
|
3678
|
+
return this.check(/* @__PURE__ */ Ii(e, t));
|
|
3679
|
+
},
|
|
3680
|
+
lte(e, t) {
|
|
3681
|
+
return this.check(/* @__PURE__ */ Li(e, t));
|
|
3682
|
+
},
|
|
3683
|
+
max(e, t) {
|
|
3684
|
+
return this.check(/* @__PURE__ */ Li(e, t));
|
|
3685
|
+
},
|
|
3686
|
+
int(e) {
|
|
3687
|
+
return this.check(Uo(e));
|
|
3688
|
+
},
|
|
3689
|
+
safe(e) {
|
|
3690
|
+
return this.check(Uo(e));
|
|
3691
|
+
},
|
|
3692
|
+
positive(e) {
|
|
3693
|
+
return this.check(/* @__PURE__ */ Ri(0, e));
|
|
3694
|
+
},
|
|
3695
|
+
nonnegative(e) {
|
|
3696
|
+
return this.check(/* @__PURE__ */ zi(0, e));
|
|
3697
|
+
},
|
|
3698
|
+
negative(e) {
|
|
3699
|
+
return this.check(/* @__PURE__ */ Ii(0, e));
|
|
3700
|
+
},
|
|
3701
|
+
nonpositive(e) {
|
|
3702
|
+
return this.check(/* @__PURE__ */ Li(0, e));
|
|
3703
|
+
},
|
|
3704
|
+
multipleOf(e, t) {
|
|
3705
|
+
return this.check(/* @__PURE__ */ Bi(e, t));
|
|
3706
|
+
},
|
|
3707
|
+
step(e, t) {
|
|
3708
|
+
return this.check(/* @__PURE__ */ Bi(e, t));
|
|
3709
|
+
},
|
|
3710
|
+
finite() {
|
|
3711
|
+
return this;
|
|
3712
|
+
}
|
|
3713
|
+
}));
|
|
3714
|
+
function Vo(e) {
|
|
3715
|
+
return /* @__PURE__ */ ji(Bo, e);
|
|
3716
|
+
}
|
|
3717
|
+
var Ho = /*@__PURE__*/ O("ZodNumberFormat", (e, t) => {
|
|
3718
|
+
rr.init(e, t), Bo.init(e, t);
|
|
3719
|
+
});
|
|
3720
|
+
function Uo(e) {
|
|
3721
|
+
return /* @__PURE__ */ Mi(Ho, e);
|
|
3722
|
+
}
|
|
3723
|
+
var Wo = /*@__PURE__*/ O("ZodBoolean", (e, t) => {
|
|
3724
|
+
ir.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => ja(e, t, n, r);
|
|
3725
|
+
});
|
|
3726
|
+
function Go(e) {
|
|
3727
|
+
return /* @__PURE__ */ Ni(Wo, e);
|
|
3728
|
+
}
|
|
3729
|
+
var Ko = /*@__PURE__*/ O("ZodUnknown", (e, t) => {
|
|
3730
|
+
ar.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
3731
|
+
});
|
|
3732
|
+
function qo() {
|
|
3733
|
+
return /* @__PURE__ */ Pi(Ko);
|
|
3734
|
+
}
|
|
3735
|
+
var Jo = /*@__PURE__*/ O("ZodNever", (e, t) => {
|
|
3736
|
+
or.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ma(e, t, n, r);
|
|
3737
|
+
});
|
|
3738
|
+
function Yo(e) {
|
|
3739
|
+
return /* @__PURE__ */ Fi(Jo, e);
|
|
3740
|
+
}
|
|
3741
|
+
var Xo = /*@__PURE__*/ O("ZodArray", (e, t) => {
|
|
3742
|
+
po(), ur.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ia(e, t, n, r), e.element = t.element;
|
|
3743
|
+
}, {
|
|
3744
|
+
min(e, t) {
|
|
3745
|
+
return this.check(/* @__PURE__ */ Hi(e, t));
|
|
3746
|
+
},
|
|
3747
|
+
nonempty(e) {
|
|
3748
|
+
return this.check(/* @__PURE__ */ Hi(1, e));
|
|
3749
|
+
},
|
|
3750
|
+
max(e, t) {
|
|
3751
|
+
return this.check(/* @__PURE__ */ Vi(e, t));
|
|
3752
|
+
},
|
|
3753
|
+
length(e, t) {
|
|
3754
|
+
return this.check(/* @__PURE__ */ Ui(e, t));
|
|
3755
|
+
},
|
|
3756
|
+
unwrap() {
|
|
3757
|
+
return this.element;
|
|
3758
|
+
}
|
|
3759
|
+
});
|
|
3760
|
+
function Zo(e, t) {
|
|
3761
|
+
return /* @__PURE__ */ ta(Xo, e, t);
|
|
3762
|
+
}
|
|
3763
|
+
var Qo = /*@__PURE__*/ O("ZodObject", (e, t) => {
|
|
3764
|
+
po(), hr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ra(e, t, n, r), Pe(e, "shape", (e) => e._zod.def.shape, !1);
|
|
3765
|
+
}, {
|
|
3766
|
+
keyof() {
|
|
3767
|
+
return as(Object.keys(this._zod.def.shape));
|
|
3768
|
+
},
|
|
3769
|
+
catchall(e) {
|
|
3770
|
+
return this.clone(h(this._zod.def, { catchall: e }));
|
|
3771
|
+
},
|
|
3772
|
+
passthrough() {
|
|
3773
|
+
return this.clone(h(this._zod.def, { catchall: qo() }));
|
|
3774
|
+
},
|
|
3775
|
+
loose() {
|
|
3776
|
+
return this.clone(h(this._zod.def, { catchall: qo() }));
|
|
3777
|
+
},
|
|
3778
|
+
strict() {
|
|
3779
|
+
return this.clone(h(this._zod.def, { catchall: Yo() }));
|
|
3780
|
+
},
|
|
3781
|
+
strip() {
|
|
3782
|
+
return this.clone(h(this._zod.def, { catchall: void 0 }));
|
|
3783
|
+
},
|
|
3784
|
+
extend(e) {
|
|
3785
|
+
return pe(this, e);
|
|
3786
|
+
},
|
|
3787
|
+
safeExtend(e) {
|
|
3788
|
+
return he(this, e);
|
|
3789
|
+
},
|
|
3790
|
+
merge(e) {
|
|
3791
|
+
return ge(this, e);
|
|
3792
|
+
},
|
|
3793
|
+
pick(e) {
|
|
3794
|
+
return de(this, e);
|
|
3795
|
+
},
|
|
3796
|
+
omit(e) {
|
|
3797
|
+
return fe(this, e);
|
|
3798
|
+
},
|
|
3799
|
+
partial(...e) {
|
|
3800
|
+
return _e(cs, this, e[0]);
|
|
3801
|
+
},
|
|
3802
|
+
exactPartial(...e) {
|
|
3803
|
+
return _e(us, this, e[0], "exactPartial");
|
|
3804
|
+
},
|
|
3805
|
+
required(...e) {
|
|
3806
|
+
return ve(vs, this, e[0]);
|
|
3807
|
+
}
|
|
3808
|
+
});
|
|
3809
|
+
function $o(e, t) {
|
|
3810
|
+
return new Qo({
|
|
3811
|
+
type: "object",
|
|
3812
|
+
shape: e ?? {},
|
|
3813
|
+
...y(t)
|
|
3814
|
+
});
|
|
3815
|
+
}
|
|
3816
|
+
var es = /*@__PURE__*/ O("ZodUnion", (e, t) => {
|
|
3817
|
+
_r.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => za(e, t, n, r), e.options = t.options;
|
|
3818
|
+
});
|
|
3819
|
+
function ts(e, t) {
|
|
3820
|
+
return new es({
|
|
3821
|
+
type: "union",
|
|
3822
|
+
options: e,
|
|
3823
|
+
...y(t)
|
|
3824
|
+
});
|
|
3825
|
+
}
|
|
3826
|
+
var ns = /*@__PURE__*/ O("ZodIntersection", (e, t) => {
|
|
3827
|
+
vr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ba(e, t, n, r);
|
|
3828
|
+
});
|
|
3829
|
+
function rs(e, t) {
|
|
3830
|
+
return new ns({
|
|
3831
|
+
type: "intersection",
|
|
3832
|
+
left: e,
|
|
3833
|
+
right: t
|
|
3834
|
+
});
|
|
3835
|
+
}
|
|
3836
|
+
var is = /*@__PURE__*/ O("ZodEnum", (e, t) => {
|
|
3837
|
+
xr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Na(e, t, n, r), e.enum = t.entries, e.options = [...e._zod.values];
|
|
3838
|
+
let n = new Set(Object.keys(t.entries));
|
|
3839
|
+
e.extract = (e, r) => {
|
|
3840
|
+
let i = {};
|
|
3841
|
+
for (let r of e) if (n.has(r)) i[r] = t.entries[r];
|
|
3842
|
+
else throw Error(`Key ${r} not found in enum`);
|
|
3843
|
+
return new is({
|
|
3844
|
+
...t,
|
|
3845
|
+
checks: [],
|
|
3846
|
+
...y(r),
|
|
3847
|
+
entries: i
|
|
3848
|
+
});
|
|
3849
|
+
}, e.exclude = (e, r) => {
|
|
3850
|
+
let i = { ...t.entries };
|
|
3851
|
+
for (let t of e) if (n.has(t)) delete i[t];
|
|
3852
|
+
else throw Error(`Key ${t} not found in enum`);
|
|
3853
|
+
return new is({
|
|
3854
|
+
...t,
|
|
3855
|
+
checks: [],
|
|
3856
|
+
...y(r),
|
|
3857
|
+
entries: i
|
|
3858
|
+
});
|
|
3859
|
+
};
|
|
3860
|
+
});
|
|
3861
|
+
function as(e, t) {
|
|
3862
|
+
return new is({
|
|
3863
|
+
type: "enum",
|
|
3864
|
+
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
3865
|
+
...y(t)
|
|
3866
|
+
});
|
|
3867
|
+
}
|
|
3868
|
+
var os = /*@__PURE__*/ O("ZodTransform", (e, t) => {
|
|
3869
|
+
po(), Sr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fa(e, t, n, r), e._zod.parse = (n, r) => {
|
|
3870
|
+
if (r.direction === "backward") throw new Ve(e.constructor.name);
|
|
3871
|
+
n.addIssue = (r) => {
|
|
3872
|
+
if (typeof r == "string") n.issues.push(w(r, n.value, t));
|
|
3873
|
+
else {
|
|
3874
|
+
let t = r;
|
|
3875
|
+
t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(w(t));
|
|
3876
|
+
}
|
|
3877
|
+
};
|
|
3878
|
+
let i = t.transform(n.value, n);
|
|
3879
|
+
return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
|
|
3880
|
+
};
|
|
3881
|
+
});
|
|
3882
|
+
function ss(e) {
|
|
3883
|
+
return new os({
|
|
3884
|
+
type: "transform",
|
|
3885
|
+
transform: e
|
|
3886
|
+
});
|
|
3887
|
+
}
|
|
3888
|
+
var cs = /*@__PURE__*/ O("ZodOptional", (e, t) => {
|
|
3889
|
+
wr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3890
|
+
});
|
|
3891
|
+
function ls(e) {
|
|
3892
|
+
return new cs({
|
|
3893
|
+
type: "optional",
|
|
3894
|
+
innerType: e
|
|
3895
|
+
});
|
|
3896
|
+
}
|
|
3897
|
+
var us = /*@__PURE__*/ O("ZodExactOptional", (e, t) => {
|
|
3898
|
+
Tr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3899
|
+
});
|
|
3900
|
+
function ds(e) {
|
|
3901
|
+
return new us({
|
|
3902
|
+
type: "optional",
|
|
3903
|
+
innerType: e
|
|
3904
|
+
});
|
|
3905
|
+
}
|
|
3906
|
+
var fs = /*@__PURE__*/ O("ZodNullable", (e, t) => {
|
|
3907
|
+
Er.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Va(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3908
|
+
});
|
|
3909
|
+
function ps(e) {
|
|
3910
|
+
return new fs({
|
|
3911
|
+
type: "nullable",
|
|
3912
|
+
innerType: e
|
|
3913
|
+
});
|
|
3914
|
+
}
|
|
3915
|
+
var ms = /*@__PURE__*/ O("ZodDefault", (e, t) => {
|
|
3916
|
+
Dr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ga(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
3917
|
+
});
|
|
3918
|
+
function hs(e, t) {
|
|
3919
|
+
return new ms({
|
|
3920
|
+
type: "default",
|
|
3921
|
+
innerType: e,
|
|
3922
|
+
get defaultValue() {
|
|
3923
|
+
return typeof t == "function" ? t() : ie(t);
|
|
3924
|
+
}
|
|
3925
|
+
});
|
|
3926
|
+
}
|
|
3927
|
+
var gs = /*@__PURE__*/ O("ZodPrefault", (e, t) => {
|
|
3928
|
+
kr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ka(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3929
|
+
});
|
|
3930
|
+
function _s(e, t) {
|
|
3931
|
+
return new gs({
|
|
3932
|
+
type: "prefault",
|
|
3933
|
+
innerType: e,
|
|
3934
|
+
get defaultValue() {
|
|
3935
|
+
return typeof t == "function" ? t() : ie(t);
|
|
3936
|
+
}
|
|
3937
|
+
});
|
|
3938
|
+
}
|
|
3939
|
+
var vs = /*@__PURE__*/ O("ZodNonOptional", (e, t) => {
|
|
3940
|
+
Ar.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ha(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3941
|
+
});
|
|
3942
|
+
function ys(e, t) {
|
|
3943
|
+
return new vs({
|
|
3944
|
+
type: "nonoptional",
|
|
3945
|
+
innerType: e,
|
|
3946
|
+
...y(t)
|
|
3947
|
+
});
|
|
3948
|
+
}
|
|
3949
|
+
var bs = /*@__PURE__*/ O("ZodCatch", (e, t) => {
|
|
3950
|
+
Nr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => qa(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
3951
|
+
});
|
|
3952
|
+
function xs(e, t) {
|
|
3953
|
+
return new bs({
|
|
3954
|
+
type: "catch",
|
|
3955
|
+
innerType: e,
|
|
3956
|
+
catchValue: typeof t == "function" ? t : Ie(t)
|
|
3957
|
+
});
|
|
3958
|
+
}
|
|
3959
|
+
var Ss = /*@__PURE__*/ O("ZodPipe", (e, t) => {
|
|
3960
|
+
Pr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ja(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
3961
|
+
});
|
|
3962
|
+
function Cs(e, t) {
|
|
3963
|
+
return new Ss({
|
|
3964
|
+
type: "pipe",
|
|
3965
|
+
in: e,
|
|
3966
|
+
out: t
|
|
3967
|
+
});
|
|
3968
|
+
}
|
|
3969
|
+
var ws = /*@__PURE__*/ O("ZodReadonly", (e, t) => {
|
|
3970
|
+
Fr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ya(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3971
|
+
});
|
|
3972
|
+
function Ts(e) {
|
|
3973
|
+
return new ws({
|
|
3974
|
+
type: "readonly",
|
|
3975
|
+
innerType: e
|
|
3976
|
+
});
|
|
3977
|
+
}
|
|
3978
|
+
var Es = /*@__PURE__*/ O("ZodCustom", (e, t) => {
|
|
3979
|
+
Lr.init(e, t), Q.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pa(e, t, n, r);
|
|
3980
|
+
});
|
|
3981
|
+
function Ds(e, t = {}) {
|
|
3982
|
+
return /* @__PURE__ */ na(Es, e, t);
|
|
3983
|
+
}
|
|
3984
|
+
function Os(e, t) {
|
|
3985
|
+
return /* @__PURE__ */ ra(e, t);
|
|
3986
|
+
}
|
|
3987
|
+
//#endregion
|
|
3988
|
+
export { go as a, $o as i, Go as n, Vo as r, as as t };
|