@burdenoff/microfe-admin 2026.1123.1 → 2026.1123.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/admin/components/forms/SubscriptionForm.d.ts +19 -20
- package/dist/admin/components/forms/SubscriptionForm.js +6 -6
- package/dist/admin/components/forms/SubscriptionForm.js.map +1 -1
- package/dist/admin/components/forms/TenantForm.d.ts +4 -42
- package/dist/admin/components/forms/TenantForm.js +75 -75
- package/dist/admin/components/forms/TenantForm.js.map +1 -1
- package/dist/admin/components/forms/TicketForm.d.ts +21 -22
- package/dist/admin/components/forms/TicketForm.js +1 -1
- package/dist/admin/components/forms/TicketForm.js.map +1 -1
- package/dist/admin/components/forms/UserForm.d.ts +14 -20
- package/dist/admin/components/forms/UserForm.js +55 -55
- package/dist/admin/components/forms/UserForm.js.map +1 -1
- package/dist/admin/schemas/index.d.ts +128 -243
- package/dist/admin/schemas/index.js +58 -58
- package/dist/admin/schemas/index.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/errors.js +44 -0
- package/dist/node_modules/zod/v4/classic/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/parse.js +7 -0
- package/dist/node_modules/zod/v4/classic/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/classic/schemas.js +722 -0
- package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/api.js +498 -0
- package/dist/node_modules/zod/v4/core/api.js.map +1 -0
- package/dist/node_modules/zod/v4/core/checks.js +245 -0
- package/dist/node_modules/zod/v4/core/checks.js.map +1 -0
- package/dist/node_modules/zod/v4/core/core.js +84 -0
- package/dist/node_modules/zod/v4/core/core.js.map +1 -0
- package/dist/node_modules/zod/v4/core/doc.js +29 -0
- package/dist/node_modules/zod/v4/core/doc.js.map +1 -0
- package/dist/node_modules/zod/v4/core/errors.js +90 -0
- package/dist/node_modules/zod/v4/core/errors.js.map +1 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +223 -0
- package/dist/node_modules/zod/v4/core/json-schema-processors.js.map +1 -0
- package/dist/node_modules/zod/v4/core/memoizer.js +188 -0
- package/dist/node_modules/zod/v4/core/memoizer.js.map +1 -0
- package/dist/node_modules/zod/v4/core/parse.js +159 -0
- package/dist/node_modules/zod/v4/core/parse.js.map +1 -0
- package/dist/node_modules/zod/v4/core/regexes.js +34 -0
- package/dist/node_modules/zod/v4/core/regexes.js.map +1 -0
- package/dist/node_modules/zod/v4/core/registries.js +41 -0
- package/dist/node_modules/zod/v4/core/registries.js.map +1 -0
- package/dist/node_modules/zod/v4/core/schemas.js +904 -0
- package/dist/node_modules/zod/v4/core/schemas.js.map +1 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js +330 -0
- package/dist/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
- package/dist/node_modules/zod/v4/core/util.js +421 -0
- package/dist/node_modules/zod/v4/core/util.js.map +1 -0
- package/dist/node_modules/zod/v4/core/versions.js +9 -0
- package/dist/node_modules/zod/v4/core/versions.js.map +1 -0
- package/dist/node_modules/zod/v4/locales/en.js +96 -0
- package/dist/node_modules/zod/v4/locales/en.js.map +1 -0
- package/package.json +2 -2
- package/dist/node_modules/zod/v3/ZodError.js +0 -81
- package/dist/node_modules/zod/v3/ZodError.js.map +0 -1
- package/dist/node_modules/zod/v3/errors.js +0 -9
- package/dist/node_modules/zod/v3/errors.js.map +0 -1
- package/dist/node_modules/zod/v3/helpers/errorUtil.js +0 -8
- package/dist/node_modules/zod/v3/helpers/errorUtil.js.map +0 -1
- package/dist/node_modules/zod/v3/helpers/parseUtil.js +0 -92
- package/dist/node_modules/zod/v3/helpers/parseUtil.js.map +0 -1
- package/dist/node_modules/zod/v3/helpers/util.js +0 -75
- package/dist/node_modules/zod/v3/helpers/util.js.map +0 -1
- package/dist/node_modules/zod/v3/locales/en.js +0 -61
- package/dist/node_modules/zod/v3/locales/en.js.map +0 -1
- package/dist/node_modules/zod/v3/types.js +0 -2469
- package/dist/node_modules/zod/v3/types.js.map +0 -1
|
@@ -0,0 +1,904 @@
|
|
|
1
|
+
import { $ZodCheck as e, $ZodCheckNumberFormat as t, $ZodCheckStringFormat as n } from "./checks.js";
|
|
2
|
+
import { $ZodAsyncError as r, $ZodEncodeError as i, $constructor as a, config as o, globalConfig as s } from "./core.js";
|
|
3
|
+
import { Doc as c } from "./doc.js";
|
|
4
|
+
import { anyString as l, boolean as u, cidrv4 as d, cidrv6 as f, cuid as p, cuid2 as ee, date as te, datetime as ne, duration as re, e164 as ie, email as ae, emoji as oe, guid as se, httpProtocol as ce, ipv4 as le, ipv6 as ue, ksuid as de, nanoid as fe, nanoidOfLength as pe, number as me, time as he, ulid as ge, uuid as m, xid as _e } from "./regexes.js";
|
|
5
|
+
import { aborted as h, allowsEval as ve, assignProp as ye, attachSchema as g, cached as be, cleanRegex as _, defineLazyInternal as v, esc as xe, escapeRegex as y, explicitlyAborted as Se, finalizeIssue as b, getEnumValues as x, hide as Ce, isObject as S, isPlainObject as C, issue as we, optionalKeys as Te, own as Ee, prefixIssues as w, propertyKeyTypes as De, sizeCaps as T } from "./util.js";
|
|
6
|
+
import { version as Oe } from "./versions.js";
|
|
7
|
+
// node_modules/zod/v4/core/schemas.js
|
|
8
|
+
var E = /*@__PURE__*/ a("$ZodType", (e, t) => {
|
|
9
|
+
var n;
|
|
10
|
+
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Oe;
|
|
11
|
+
let i = e._zod.def.checks, a = e._zod.traits.has("$ZodCheck") ? [e, ...i ?? []] : i?.length ? [...i] : [];
|
|
12
|
+
for (let t of a) for (let n of t._zod.onattach) n(e);
|
|
13
|
+
if (a.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
|
|
14
|
+
e._zod.run = e._zod.parse;
|
|
15
|
+
});
|
|
16
|
+
else {
|
|
17
|
+
let t = (t, n, i) => {
|
|
18
|
+
if (t.memo) return t;
|
|
19
|
+
let a = h(t), o;
|
|
20
|
+
for (let s of n) {
|
|
21
|
+
if (s._zod.def.when) {
|
|
22
|
+
if (Se(t) || !s._zod.def.when(t)) continue;
|
|
23
|
+
} else if (a) continue;
|
|
24
|
+
let n = t.issues.length, c = s._zod.check(t);
|
|
25
|
+
if (c instanceof Promise && i?.async === !1) throw new r();
|
|
26
|
+
if (o || c instanceof Promise) o = (o ?? Promise.resolve()).then(async () => {
|
|
27
|
+
await c, t.issues.length !== n && (g(t.issues, n, e), a ||= h(t, n));
|
|
28
|
+
});
|
|
29
|
+
else {
|
|
30
|
+
if (t.issues.length === n) continue;
|
|
31
|
+
g(t.issues, n, e), a ||= h(t, n);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return o ? o.then(() => t) : t;
|
|
35
|
+
}, n = (n, i, o) => {
|
|
36
|
+
if (h(n)) return n.aborted = !0, n;
|
|
37
|
+
let s = t(i, a, o);
|
|
38
|
+
if (s instanceof Promise) {
|
|
39
|
+
if (o.async === !1) throw new r();
|
|
40
|
+
return s.then((t) => e._zod.parse(t, o));
|
|
41
|
+
}
|
|
42
|
+
return e._zod.parse(s, o);
|
|
43
|
+
};
|
|
44
|
+
e._zod.run = (i, o) => {
|
|
45
|
+
if (o.skipChecks) return e._zod.parse(i, o);
|
|
46
|
+
if (o.direction === "backward") {
|
|
47
|
+
let t = e._zod.parse({
|
|
48
|
+
value: i.value,
|
|
49
|
+
issues: []
|
|
50
|
+
}, {
|
|
51
|
+
...o,
|
|
52
|
+
skipChecks: !0
|
|
53
|
+
});
|
|
54
|
+
return t instanceof Promise ? t.then((e) => n(e, i, o)) : n(t, i, o);
|
|
55
|
+
}
|
|
56
|
+
let s = e._zod.parse(i, o);
|
|
57
|
+
if (s instanceof Promise) {
|
|
58
|
+
if (o.async === !1) throw new r();
|
|
59
|
+
return s.then((e) => t(e, a, o));
|
|
60
|
+
}
|
|
61
|
+
return t(s, a, o);
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
}, {
|
|
65
|
+
get "~standard"() {
|
|
66
|
+
return Ce(this, "~standard", O(this));
|
|
67
|
+
},
|
|
68
|
+
set "~standard"(e) {
|
|
69
|
+
Ee(this, "~standard", e);
|
|
70
|
+
}
|
|
71
|
+
}), D = (e, t) => e.issues.length ? { issues: e.issues.map((e) => b(e, t, o())) } : { value: e.value };
|
|
72
|
+
async function ke(e, t) {
|
|
73
|
+
let n = { async: !0 };
|
|
74
|
+
return D(await e._zod.run({
|
|
75
|
+
value: t,
|
|
76
|
+
issues: []
|
|
77
|
+
}, n), n);
|
|
78
|
+
}
|
|
79
|
+
function O(e) {
|
|
80
|
+
return {
|
|
81
|
+
validate: (t) => {
|
|
82
|
+
let n = { async: !1 };
|
|
83
|
+
try {
|
|
84
|
+
let r = e._zod.run({
|
|
85
|
+
value: t,
|
|
86
|
+
issues: []
|
|
87
|
+
}, n);
|
|
88
|
+
if (!(r instanceof Promise)) return D(r, n);
|
|
89
|
+
} catch {}
|
|
90
|
+
return ke(e, t);
|
|
91
|
+
},
|
|
92
|
+
vendor: "zod",
|
|
93
|
+
version: 1
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
var Ae = /*@__PURE__*/ a("$ZodString", (e, t) => {
|
|
97
|
+
E.init(e, t), e._zod.pattern = t.pattern ?? l, e._zod.parse = (n, r) => {
|
|
98
|
+
if (t.coerce) try {
|
|
99
|
+
n.value = String(n.value);
|
|
100
|
+
} catch {}
|
|
101
|
+
return typeof n.value == "string" || n.issues.push({
|
|
102
|
+
expected: "string",
|
|
103
|
+
code: "invalid_type",
|
|
104
|
+
input: n.value,
|
|
105
|
+
inst: e
|
|
106
|
+
}), n;
|
|
107
|
+
};
|
|
108
|
+
}), k = /*@__PURE__*/ a("$ZodStringFormat", (e, t) => {
|
|
109
|
+
n.init(e, t), Ae.init(e, t);
|
|
110
|
+
}), je = /*@__PURE__*/ a("$ZodGUID", (e, t) => {
|
|
111
|
+
t.pattern ??= se, k.init(e, t);
|
|
112
|
+
}), Me = /*@__PURE__*/ a("$ZodUUID", (e, t) => {
|
|
113
|
+
if (t.version) {
|
|
114
|
+
let e = {
|
|
115
|
+
v1: 1,
|
|
116
|
+
v2: 2,
|
|
117
|
+
v3: 3,
|
|
118
|
+
v4: 4,
|
|
119
|
+
v5: 5,
|
|
120
|
+
v6: 6,
|
|
121
|
+
v7: 7,
|
|
122
|
+
v8: 8
|
|
123
|
+
}[t.version];
|
|
124
|
+
if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
|
|
125
|
+
t.pattern ??= m(e);
|
|
126
|
+
} else t.pattern ??= m();
|
|
127
|
+
k.init(e, t);
|
|
128
|
+
}), Ne = /*@__PURE__*/ a("$ZodEmail", (e, t) => {
|
|
129
|
+
t.pattern ??= ae, k.init(e, t);
|
|
130
|
+
});
|
|
131
|
+
function A(e) {
|
|
132
|
+
try {
|
|
133
|
+
return typeof URL < "u" && typeof URL.canParse == "function" ? URL.canParse(e) : (new URL(e), !0);
|
|
134
|
+
} catch {
|
|
135
|
+
return !1;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
function j(e, t) {
|
|
139
|
+
return !("normalize" in t) && !("hostname" in t) && !("protocol" in t) ? A(e) || 2 : M(e, t);
|
|
140
|
+
}
|
|
141
|
+
function M(e, t) {
|
|
142
|
+
if (!t.normalize && t.protocol?.source === ce.source && !/^https?:\/\//i.test(e)) return 1;
|
|
143
|
+
try {
|
|
144
|
+
if (typeof URL < "u") {
|
|
145
|
+
let t = URL;
|
|
146
|
+
if (typeof t.parse == "function") return t.parse(e) ?? 2;
|
|
147
|
+
}
|
|
148
|
+
return new URL(e);
|
|
149
|
+
} catch {
|
|
150
|
+
return 2;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
var Pe = /[\t\n\r]/g;
|
|
154
|
+
function N(e) {
|
|
155
|
+
return e.replace(Pe, "");
|
|
156
|
+
}
|
|
157
|
+
function P(e, t) {
|
|
158
|
+
return t.lastIndex = 0, t.test(e.hostname);
|
|
159
|
+
}
|
|
160
|
+
function F(e, t) {
|
|
161
|
+
return t.lastIndex = 0, t.test(e.protocol.endsWith(":") ? e.protocol.slice(0, -1) : e.protocol);
|
|
162
|
+
}
|
|
163
|
+
var Fe = /*@__PURE__*/ a("$ZodURL", (e, t) => {
|
|
164
|
+
k.init(e, t), e._zod.check = (n) => {
|
|
165
|
+
try {
|
|
166
|
+
let r = n.value.trim(), i = j(r, t);
|
|
167
|
+
if (i === 1) {
|
|
168
|
+
n.issues.push({
|
|
169
|
+
code: "invalid_format",
|
|
170
|
+
format: "url",
|
|
171
|
+
note: "Invalid URL format",
|
|
172
|
+
input: n.value,
|
|
173
|
+
inst: e,
|
|
174
|
+
continue: !t.abort
|
|
175
|
+
});
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (i === 2) {
|
|
179
|
+
n.issues.push({
|
|
180
|
+
code: "invalid_format",
|
|
181
|
+
format: "url",
|
|
182
|
+
input: n.value,
|
|
183
|
+
inst: e,
|
|
184
|
+
continue: !t.abort
|
|
185
|
+
});
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
if (i === !0) {
|
|
189
|
+
n.value = N(r);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
t.hostname && !P(i, t.hostname) && n.issues.push({
|
|
193
|
+
code: "invalid_format",
|
|
194
|
+
format: "url",
|
|
195
|
+
note: "Invalid hostname",
|
|
196
|
+
pattern: t.hostname.source,
|
|
197
|
+
input: n.value,
|
|
198
|
+
inst: e,
|
|
199
|
+
continue: !t.abort
|
|
200
|
+
}), t.protocol && !F(i, t.protocol) && n.issues.push({
|
|
201
|
+
code: "invalid_format",
|
|
202
|
+
format: "url",
|
|
203
|
+
note: "Invalid protocol",
|
|
204
|
+
pattern: t.protocol.source,
|
|
205
|
+
input: n.value,
|
|
206
|
+
inst: e,
|
|
207
|
+
continue: !t.abort
|
|
208
|
+
}), n.value = t.normalize ? i.href : N(r);
|
|
209
|
+
return;
|
|
210
|
+
} catch {
|
|
211
|
+
n.issues.push({
|
|
212
|
+
code: "invalid_format",
|
|
213
|
+
format: "url",
|
|
214
|
+
input: n.value,
|
|
215
|
+
inst: e,
|
|
216
|
+
continue: !t.abort
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
}), Ie = /*@__PURE__*/ a("$ZodEmoji", (e, t) => {
|
|
221
|
+
t.pattern ??= oe(), k.init(e, t);
|
|
222
|
+
}), Le = /*@__PURE__*/ a("$ZodNanoID", (e, t) => {
|
|
223
|
+
if (t.length !== void 0 && (!Number.isInteger(t.length) || t.length < 1)) throw Error(`Invalid nanoid length: ${t.length}`);
|
|
224
|
+
t.pattern ??= t.length === void 0 ? fe : pe(t.length), k.init(e, t);
|
|
225
|
+
}), Re = /*@__PURE__*/ a("$ZodCUID", (e, t) => {
|
|
226
|
+
t.pattern ??= p, k.init(e, t);
|
|
227
|
+
}), ze = /*@__PURE__*/ a("$ZodCUID2", (e, t) => {
|
|
228
|
+
t.pattern ??= ee, k.init(e, t);
|
|
229
|
+
}), Be = /*@__PURE__*/ a("$ZodULID", (e, t) => {
|
|
230
|
+
t.pattern ??= ge, k.init(e, t);
|
|
231
|
+
}), Ve = /*@__PURE__*/ a("$ZodXID", (e, t) => {
|
|
232
|
+
t.pattern ??= _e, k.init(e, t);
|
|
233
|
+
}), He = /*@__PURE__*/ a("$ZodKSUID", (e, t) => {
|
|
234
|
+
t.pattern ??= de, k.init(e, t);
|
|
235
|
+
}), Ue = /*@__PURE__*/ a("$ZodISODateTime", (e, t) => {
|
|
236
|
+
t.pattern ??= ne(t), k.init(e, t);
|
|
237
|
+
}), We = /*@__PURE__*/ a("$ZodISODate", (e, t) => {
|
|
238
|
+
t.pattern ??= te, k.init(e, t);
|
|
239
|
+
}), Ge = /*@__PURE__*/ a("$ZodISOTime", (e, t) => {
|
|
240
|
+
t.pattern ??= he(t), k.init(e, t);
|
|
241
|
+
}), Ke = /*@__PURE__*/ a("$ZodISODuration", (e, t) => {
|
|
242
|
+
t.pattern ??= re, k.init(e, t);
|
|
243
|
+
}), qe = /*@__PURE__*/ a("$ZodIPv4", (e, t) => {
|
|
244
|
+
t.pattern ??= le, k.init(e, t);
|
|
245
|
+
}), Je = /^[0-9a-fA-F:.]+$/;
|
|
246
|
+
function I(e) {
|
|
247
|
+
return Je.test(e) ? A(`http://[${e}]`) : !1;
|
|
248
|
+
}
|
|
249
|
+
var Ye = /*@__PURE__*/ a("$ZodIPv6", (e, t) => {
|
|
250
|
+
t.pattern ??= ue, k.init(e, t), e._zod.check = (n) => {
|
|
251
|
+
I(n.value) || n.issues.push({
|
|
252
|
+
code: "invalid_format",
|
|
253
|
+
format: "ipv6",
|
|
254
|
+
input: n.value,
|
|
255
|
+
inst: e,
|
|
256
|
+
continue: !t.abort
|
|
257
|
+
});
|
|
258
|
+
};
|
|
259
|
+
}), Xe = /*@__PURE__*/ a("$ZodCIDRv4", (e, t) => {
|
|
260
|
+
t.pattern ??= d, k.init(e, t);
|
|
261
|
+
});
|
|
262
|
+
function L(e) {
|
|
263
|
+
let t = e.split("/");
|
|
264
|
+
if (t.length !== 2) return !1;
|
|
265
|
+
let [n, r] = t;
|
|
266
|
+
if (!r) return !1;
|
|
267
|
+
let i = Number(r);
|
|
268
|
+
return `${i}` !== r || i < 0 || i > 128 ? !1 : I(n);
|
|
269
|
+
}
|
|
270
|
+
var Ze = /*@__PURE__*/ a("$ZodCIDRv6", (e, t) => {
|
|
271
|
+
t.pattern ??= f, k.init(e, t), e._zod.check = (n) => {
|
|
272
|
+
L(n.value) || n.issues.push({
|
|
273
|
+
code: "invalid_format",
|
|
274
|
+
format: "cidrv6",
|
|
275
|
+
input: n.value,
|
|
276
|
+
inst: e,
|
|
277
|
+
continue: !t.abort
|
|
278
|
+
});
|
|
279
|
+
};
|
|
280
|
+
});
|
|
281
|
+
function R(e) {
|
|
282
|
+
if (e === "") return !0;
|
|
283
|
+
if (/\s/.test(e) || e.length % 4 != 0) return !1;
|
|
284
|
+
try {
|
|
285
|
+
return atob(e), !0;
|
|
286
|
+
} catch {
|
|
287
|
+
return !1;
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
var z = /^[0-9a-zA-Z+/]*={0,2}$/, Qe = /*@__PURE__*/ a("$ZodBase64", (e, t) => {
|
|
291
|
+
t.pattern ??= z, k.init(e, t), e._zod.check = (n) => {
|
|
292
|
+
R(n.value) || n.issues.push({
|
|
293
|
+
code: "invalid_format",
|
|
294
|
+
format: "base64",
|
|
295
|
+
input: n.value,
|
|
296
|
+
inst: e,
|
|
297
|
+
continue: !t.abort
|
|
298
|
+
});
|
|
299
|
+
};
|
|
300
|
+
}), B = /^[A-Za-z0-9_-]*$/;
|
|
301
|
+
function V(e) {
|
|
302
|
+
if (!B.test(e)) return !1;
|
|
303
|
+
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
304
|
+
return R(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
305
|
+
}
|
|
306
|
+
var $e = /*@__PURE__*/ a("$ZodBase64URL", (e, t) => {
|
|
307
|
+
t.pattern ??= B, k.init(e, t), e._zod.check = (n) => {
|
|
308
|
+
V(n.value) || n.issues.push({
|
|
309
|
+
code: "invalid_format",
|
|
310
|
+
format: "base64url",
|
|
311
|
+
input: n.value,
|
|
312
|
+
inst: e,
|
|
313
|
+
continue: !t.abort
|
|
314
|
+
});
|
|
315
|
+
};
|
|
316
|
+
}), et = /*@__PURE__*/ a("$ZodE164", (e, t) => {
|
|
317
|
+
t.pattern ??= ie, k.init(e, t);
|
|
318
|
+
});
|
|
319
|
+
function H(e, t = null) {
|
|
320
|
+
try {
|
|
321
|
+
let n = e.split(".");
|
|
322
|
+
if (n.length !== 3) return !1;
|
|
323
|
+
let [r] = n;
|
|
324
|
+
if (!r) return !1;
|
|
325
|
+
let i = JSON.parse(atob(r));
|
|
326
|
+
return !("typ" in i && i?.typ !== "JWT" || !i.alg || t && (!("alg" in i) || i.alg !== t));
|
|
327
|
+
} catch {
|
|
328
|
+
return !1;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
var tt = /*@__PURE__*/ a("$ZodJWT", (e, t) => {
|
|
332
|
+
k.init(e, t), e._zod.check = (n) => {
|
|
333
|
+
H(n.value, t.alg) || n.issues.push({
|
|
334
|
+
code: "invalid_format",
|
|
335
|
+
format: "jwt",
|
|
336
|
+
input: n.value,
|
|
337
|
+
inst: e,
|
|
338
|
+
continue: !t.abort
|
|
339
|
+
});
|
|
340
|
+
};
|
|
341
|
+
}), U = /*@__PURE__*/ a("$ZodNumber", (e, t) => {
|
|
342
|
+
E.init(e, t), e._zod.pattern = me, e._zod.parse = (n, r) => {
|
|
343
|
+
if (t.coerce) try {
|
|
344
|
+
n.value = Number(n.value);
|
|
345
|
+
} catch {}
|
|
346
|
+
let i = n.value;
|
|
347
|
+
if (typeof i == "number" && !Number.isNaN(i) && Number.isFinite(i)) return n;
|
|
348
|
+
let a = typeof i == "number" ? Number.isNaN(i) ? "NaN" : Number.isFinite(i) ? void 0 : String(i) : void 0;
|
|
349
|
+
return n.issues.push({
|
|
350
|
+
expected: "number",
|
|
351
|
+
code: "invalid_type",
|
|
352
|
+
input: i,
|
|
353
|
+
inst: e,
|
|
354
|
+
...a ? { received: a } : {}
|
|
355
|
+
}), n;
|
|
356
|
+
};
|
|
357
|
+
}), nt = /*@__PURE__*/ a("$ZodNumberFormat", (e, n) => {
|
|
358
|
+
t.init(e, n), U.init(e, n);
|
|
359
|
+
}), rt = /*@__PURE__*/ a("$ZodBoolean", (e, t) => {
|
|
360
|
+
E.init(e, t), e._zod.pattern = u, e._zod.parse = (n, r) => {
|
|
361
|
+
if (t.coerce) try {
|
|
362
|
+
n.value = !!n.value;
|
|
363
|
+
} catch {}
|
|
364
|
+
let i = n.value;
|
|
365
|
+
return typeof i == "boolean" || n.issues.push({
|
|
366
|
+
expected: "boolean",
|
|
367
|
+
code: "invalid_type",
|
|
368
|
+
input: i,
|
|
369
|
+
inst: e
|
|
370
|
+
}), n;
|
|
371
|
+
};
|
|
372
|
+
}), it = /*@__PURE__*/ a("$ZodUnknown", (e, t) => {
|
|
373
|
+
E.init(e, t), e._zod.parse = (e) => e;
|
|
374
|
+
}), at = /*@__PURE__*/ a("$ZodNever", (e, t) => {
|
|
375
|
+
E.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
376
|
+
expected: "never",
|
|
377
|
+
code: "invalid_type",
|
|
378
|
+
input: t.value,
|
|
379
|
+
inst: e
|
|
380
|
+
}), t);
|
|
381
|
+
});
|
|
382
|
+
function ot(e, t) {
|
|
383
|
+
let n = T(e._zod.def.checks);
|
|
384
|
+
if (!n.length) return;
|
|
385
|
+
let r = Math.min(...n.map((e) => e[0])), i = e._zod.parse;
|
|
386
|
+
e._zod.parse = (n, a) => {
|
|
387
|
+
let o = t(n.value);
|
|
388
|
+
if (o > r && !a?.skipChecks && a?.direction !== "backward") {
|
|
389
|
+
for (let [t, r] of T(e._zod.def.checks)) if (o > t && r._zod.def.when(n)) {
|
|
390
|
+
let t = n.issues.length;
|
|
391
|
+
return r._zod.check(n), n.issues[t].continue = !1, g(n.issues, t, e), n;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
return i(n, a);
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
var st = (e) => Array.isArray(e) ? e.length : -1;
|
|
398
|
+
function W(e, t, n) {
|
|
399
|
+
e.issues.length && t.issues.push(...w(n, e.issues)), t.value[n] = e.value;
|
|
400
|
+
}
|
|
401
|
+
var ct = /*@__PURE__*/ a("$ZodArray", (e, t) => {
|
|
402
|
+
E.init(e, t);
|
|
403
|
+
let n = s.memoizer;
|
|
404
|
+
n?.attach(e), e._zod.parse = (r, i) => {
|
|
405
|
+
let a = r.value;
|
|
406
|
+
if (!Array.isArray(a)) return r.issues.push({
|
|
407
|
+
expected: "array",
|
|
408
|
+
code: "invalid_type",
|
|
409
|
+
input: a,
|
|
410
|
+
inst: e
|
|
411
|
+
}), r;
|
|
412
|
+
r.value = n ? n.alloc(e, r, Array(a.length), i) : Array(a.length);
|
|
413
|
+
let o = [], s = i?.abortEarly;
|
|
414
|
+
for (let e = 0; e < a.length; e++) {
|
|
415
|
+
let n = a[e], c = t.element._zod.run({
|
|
416
|
+
value: n,
|
|
417
|
+
issues: []
|
|
418
|
+
}, i);
|
|
419
|
+
if (c instanceof Promise) o.push(c.then((t) => W(t, r, e)));
|
|
420
|
+
else if (W(c, r, e), s && c.issues.length !== 0 && h(c)) break;
|
|
421
|
+
}
|
|
422
|
+
return o.length ? Promise.all(o).then(() => r) : r;
|
|
423
|
+
}, ot(e, st);
|
|
424
|
+
});
|
|
425
|
+
function G(e, t, n, r, i, a) {
|
|
426
|
+
let o = n in r, s = a === "optional";
|
|
427
|
+
if (o || !s || i !== "optional") {
|
|
428
|
+
if (e.issues.length) {
|
|
429
|
+
if (i !== void 0 && s && !o) return;
|
|
430
|
+
t.issues.push(...w(n, e.issues));
|
|
431
|
+
}
|
|
432
|
+
!o && i === void 0 ? e.issues.length || t.issues.push({
|
|
433
|
+
code: "invalid_type",
|
|
434
|
+
expected: "nonoptional",
|
|
435
|
+
input: void 0,
|
|
436
|
+
path: [n]
|
|
437
|
+
}) : e.value === void 0 ? (o || i === "defaulted" && !s) && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
var lt = [];
|
|
441
|
+
function K(e) {
|
|
442
|
+
let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : lt, i = r.length ? [...t, ...r] : t;
|
|
443
|
+
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`);
|
|
444
|
+
let a = Te(e.shape);
|
|
445
|
+
return {
|
|
446
|
+
...e,
|
|
447
|
+
allKeys: i,
|
|
448
|
+
symbolKeys: r,
|
|
449
|
+
keySet: new Set(t),
|
|
450
|
+
numKeys: t.length,
|
|
451
|
+
optionalKeys: new Set(a)
|
|
452
|
+
};
|
|
453
|
+
}
|
|
454
|
+
function q(e, t, n, r, i, a, o) {
|
|
455
|
+
let s = [], c = i.keySet, l = i.catchall._zod, u = l.def.type, d = l.optin, f = l.optout, p = 0;
|
|
456
|
+
for (let i in t) {
|
|
457
|
+
if (o && n.issues.length !== p) {
|
|
458
|
+
if (h(n, p)) break;
|
|
459
|
+
p = n.issues.length;
|
|
460
|
+
}
|
|
461
|
+
if (c.has(i)) continue;
|
|
462
|
+
if (i === "__proto__") {
|
|
463
|
+
u === "never" && s.push(i);
|
|
464
|
+
continue;
|
|
465
|
+
}
|
|
466
|
+
if (u === "never") {
|
|
467
|
+
s.push(i);
|
|
468
|
+
continue;
|
|
469
|
+
}
|
|
470
|
+
let a = l.run({
|
|
471
|
+
value: t[i],
|
|
472
|
+
issues: []
|
|
473
|
+
}, r);
|
|
474
|
+
a instanceof Promise ? e.push(a.then((e) => G(e, n, i, t, d, f))) : G(a, n, i, t, d, f);
|
|
475
|
+
}
|
|
476
|
+
return s.length && n.issues.push({
|
|
477
|
+
code: "unrecognized_keys",
|
|
478
|
+
keys: s,
|
|
479
|
+
input: t,
|
|
480
|
+
inst: a,
|
|
481
|
+
continue: !0
|
|
482
|
+
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
483
|
+
}
|
|
484
|
+
var J = /*@__PURE__*/ a("$ZodObject", (e, t) => {
|
|
485
|
+
E.init(e, t);
|
|
486
|
+
let n = Object.getOwnPropertyDescriptor(t, "shape"), r = n?.get ? n.get.raw : t.shape ?? {};
|
|
487
|
+
if (r) {
|
|
488
|
+
let e = () => {
|
|
489
|
+
let n = { ...r };
|
|
490
|
+
return Object.defineProperty(t, "shape", { value: n }), e.raw = n, n;
|
|
491
|
+
};
|
|
492
|
+
e.raw = r, Object.defineProperty(t, "shape", { get: e });
|
|
493
|
+
}
|
|
494
|
+
let i = be(() => K(t));
|
|
495
|
+
v(e, "propValues", (e) => {
|
|
496
|
+
let t = e.def.shape, n = {};
|
|
497
|
+
for (let e in t) {
|
|
498
|
+
let r = t[e]._zod;
|
|
499
|
+
if (r.values) {
|
|
500
|
+
Object.prototype.hasOwnProperty.call(n, e) || ye(n, e, /* @__PURE__ */ new Set());
|
|
501
|
+
for (let t of r.values) n[e].add(t);
|
|
502
|
+
r.optin !== void 0 && n[e].add(void 0);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
return n;
|
|
506
|
+
});
|
|
507
|
+
let a = S, o = t.catchall, c, l = s.memoizer;
|
|
508
|
+
l?.attach(e), e._zod.parse = (t, n) => {
|
|
509
|
+
c ??= i.value;
|
|
510
|
+
let r = t.value;
|
|
511
|
+
if (!a(r)) return t.issues.push({
|
|
512
|
+
expected: "object",
|
|
513
|
+
code: "invalid_type",
|
|
514
|
+
input: r,
|
|
515
|
+
inst: e
|
|
516
|
+
}), t;
|
|
517
|
+
t.value = l ? l.alloc(e, t, {}, n) : {};
|
|
518
|
+
let s = [], u = c.shape, d = n?.abortEarly, f = t.issues.length;
|
|
519
|
+
for (let e of c.allKeys) {
|
|
520
|
+
if (d && t.issues.length !== f) {
|
|
521
|
+
if (h(t, f)) break;
|
|
522
|
+
f = t.issues.length;
|
|
523
|
+
}
|
|
524
|
+
if (e === "__proto__") continue;
|
|
525
|
+
let i = u[e], a = i._zod.optin, o = i._zod.optout, c = i._zod.run({
|
|
526
|
+
value: r[e],
|
|
527
|
+
issues: []
|
|
528
|
+
}, n);
|
|
529
|
+
c instanceof Promise ? s.push(c.then((n) => G(n, t, e, r, a, o))) : G(c, t, e, r, a, o);
|
|
530
|
+
}
|
|
531
|
+
return o ? q(s, r, t, n, i.value, e, d === !0) : s.length ? Promise.all(s).then(() => t) : t;
|
|
532
|
+
};
|
|
533
|
+
}), ut = /*@__PURE__*/ a("$ZodObjectJIT", (e, t) => {
|
|
534
|
+
J.init(e, t);
|
|
535
|
+
let n = e._zod.parse, r = be(() => K(t)), i = s.memoizer, a = (t) => {
|
|
536
|
+
let n = r.value, a = n.symbolKeys, o = new c(["payload", "ctx"], {
|
|
537
|
+
shape: t,
|
|
538
|
+
inst: e,
|
|
539
|
+
memo: i,
|
|
540
|
+
syms: a
|
|
541
|
+
}), s = (e) => `shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`, l = (e, t) => `
|
|
542
|
+
let ${e}_ab = false;
|
|
543
|
+
for (let i = 0; i < ${e}.issues.length; i++) {
|
|
544
|
+
const iss = ${e}.issues[i];
|
|
545
|
+
iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
|
|
546
|
+
payload.issues.push(iss);
|
|
547
|
+
if (iss.continue !== true) ${e}_ab = true;
|
|
548
|
+
}
|
|
549
|
+
if (${e}_ab && ctx && ctx.abortEarly) {
|
|
550
|
+
payload.value = newResult;
|
|
551
|
+
return payload;
|
|
552
|
+
}`;
|
|
553
|
+
o.write("const input = payload.value;");
|
|
554
|
+
let u = Object.create(null), d = 0;
|
|
555
|
+
for (let e of n.allKeys) u[e] = `key_${d++}`;
|
|
556
|
+
o.write(i ? "const newResult = memo.alloc(inst, payload, {}, ctx);" : "const newResult = {};");
|
|
557
|
+
for (let e of n.allKeys) {
|
|
558
|
+
if (e === "__proto__") continue;
|
|
559
|
+
let n = u[e], r = typeof e == "symbol" ? `syms[${a.indexOf(e)}]` : xe(e), i = `${r} in input`, c = t[e], d = c?._zod?.optin, f = d !== void 0, p = c?._zod?.optout === "optional";
|
|
560
|
+
if (o.write(`const ${n} = ${s(r)};`), f && p) {
|
|
561
|
+
let e = d === "optional" ? `${n}_present` : `${n}.value !== undefined || ${n}_present`;
|
|
562
|
+
o.write(`
|
|
563
|
+
const ${n}_present = ${i};
|
|
564
|
+
if (!${n}.issues.length || ${n}_present) {
|
|
565
|
+
if (${n}.issues.length) {${l(n, r)}
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
if (${e}) {
|
|
569
|
+
newResult[${r}] = ${n}.value;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
`);
|
|
574
|
+
} else f ? (o.write(`
|
|
575
|
+
if (${n}.issues.length) {${l(n, r)}
|
|
576
|
+
}
|
|
577
|
+
`), d === "defaulted" ? o.write(`newResult[${r}] = ${n}.value;`) : o.write(`
|
|
578
|
+
if (${n}.value !== undefined || ${i}) {
|
|
579
|
+
newResult[${r}] = ${n}.value;
|
|
580
|
+
}
|
|
581
|
+
`)) : o.write(`
|
|
582
|
+
const ${n}_present = ${i};
|
|
583
|
+
if (${n}.issues.length) {${l(n, r)}
|
|
584
|
+
}
|
|
585
|
+
if (!${n}_present && !${n}.issues.length) {
|
|
586
|
+
payload.issues.push({
|
|
587
|
+
code: "invalid_type",
|
|
588
|
+
expected: "nonoptional",
|
|
589
|
+
input: undefined,
|
|
590
|
+
path: [${r}]
|
|
591
|
+
});
|
|
592
|
+
if (ctx && ctx.abortEarly) {
|
|
593
|
+
payload.value = newResult;
|
|
594
|
+
return payload;
|
|
595
|
+
}
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
if (${n}_present) {
|
|
599
|
+
newResult[${r}] = ${n}.value;
|
|
600
|
+
}
|
|
601
|
+
|
|
602
|
+
`);
|
|
603
|
+
}
|
|
604
|
+
return o.write("payload.value = newResult;"), o.write("return payload;"), o.compile();
|
|
605
|
+
}, o, l = S, u = !s.jitless, d = u && ve.value, f = t.catchall, p;
|
|
606
|
+
e._zod.parse = (i, s) => {
|
|
607
|
+
p ??= r.value;
|
|
608
|
+
let c = i.value;
|
|
609
|
+
return l(c) ? u && d && s?.async === !1 && s.jitless !== !0 ? (o ||= a(t.shape), i = o(i, s), f ? q([], c, i, s, p, e, s?.abortEarly === !0) : i) : n(i, s) : (i.issues.push({
|
|
610
|
+
expected: "object",
|
|
611
|
+
code: "invalid_type",
|
|
612
|
+
input: c,
|
|
613
|
+
inst: e
|
|
614
|
+
}), i);
|
|
615
|
+
};
|
|
616
|
+
});
|
|
617
|
+
function Y(e, t, n, r) {
|
|
618
|
+
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
619
|
+
let i = e.filter((e) => !h(e));
|
|
620
|
+
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
621
|
+
code: "invalid_union",
|
|
622
|
+
input: t.value,
|
|
623
|
+
inst: n,
|
|
624
|
+
errors: e.map((e) => e.issues.map((e) => b(e, r, o())))
|
|
625
|
+
}), t);
|
|
626
|
+
}
|
|
627
|
+
var dt = /*@__PURE__*/ a("$ZodUnion", (e, t) => {
|
|
628
|
+
E.init(e, t), v(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), v(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), v(e, "values", (e) => {
|
|
629
|
+
if (e.def.options.every((e) => e._zod.values)) return new Set(e.def.options.flatMap((e) => Array.from(e._zod.values)));
|
|
630
|
+
}), v(e, "pattern", (e) => {
|
|
631
|
+
if (e.def.options.every((e) => e._zod.pattern)) {
|
|
632
|
+
let t = e.def.options.map((e) => e._zod.pattern);
|
|
633
|
+
return RegExp(`^(${t.map((e) => _(e.source)).join("|")})$`);
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
let n = t.options.length === 1 ? t.options[0]._zod.run : null;
|
|
637
|
+
e._zod.parse = (r, i) => {
|
|
638
|
+
if (n) return n(r, i);
|
|
639
|
+
let a = !1, o = [];
|
|
640
|
+
for (let e of t.options) {
|
|
641
|
+
let t = e._zod.run({
|
|
642
|
+
value: r.value,
|
|
643
|
+
issues: []
|
|
644
|
+
}, i);
|
|
645
|
+
if (t instanceof Promise) o.push(t), a = !0;
|
|
646
|
+
else {
|
|
647
|
+
if (t.issues.length === 0) return t;
|
|
648
|
+
o.push(t);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
return a ? Promise.all(o).then((t) => Y(t, r, e, i)) : Y(o, r, e, i);
|
|
652
|
+
};
|
|
653
|
+
}), ft = /*@__PURE__*/ a("$ZodIntersection", (e, t) => {
|
|
654
|
+
E.init(e, t), e._zod.parse = (e, n) => {
|
|
655
|
+
let r = e.value, i = t.left._zod.run({
|
|
656
|
+
value: r,
|
|
657
|
+
issues: []
|
|
658
|
+
}, n), a = t.right._zod.run({
|
|
659
|
+
value: r,
|
|
660
|
+
issues: []
|
|
661
|
+
}, n);
|
|
662
|
+
return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => Z(e, t, n)) : Z(e, i, a);
|
|
663
|
+
};
|
|
664
|
+
});
|
|
665
|
+
function X(e, t) {
|
|
666
|
+
if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
|
|
667
|
+
valid: !0,
|
|
668
|
+
data: e
|
|
669
|
+
};
|
|
670
|
+
if (C(e) && C(t)) {
|
|
671
|
+
let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
|
|
672
|
+
...e,
|
|
673
|
+
...t
|
|
674
|
+
};
|
|
675
|
+
Object.prototype.hasOwnProperty.call(i, "__proto__") && delete i.__proto__;
|
|
676
|
+
for (let n of r) {
|
|
677
|
+
if (n === "__proto__") continue;
|
|
678
|
+
let r = X(e[n], t[n]);
|
|
679
|
+
if (!r.valid) return {
|
|
680
|
+
valid: !1,
|
|
681
|
+
mergeErrorPath: [n, ...r.mergeErrorPath]
|
|
682
|
+
};
|
|
683
|
+
i[n] = r.data;
|
|
684
|
+
}
|
|
685
|
+
return {
|
|
686
|
+
valid: !0,
|
|
687
|
+
data: i
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
if (Array.isArray(e) && Array.isArray(t)) {
|
|
691
|
+
if (e.length !== t.length) return {
|
|
692
|
+
valid: !1,
|
|
693
|
+
mergeErrorPath: []
|
|
694
|
+
};
|
|
695
|
+
let n = [];
|
|
696
|
+
for (let r = 0; r < e.length; r++) {
|
|
697
|
+
let i = e[r], a = t[r], o = X(i, a);
|
|
698
|
+
if (!o.valid) return {
|
|
699
|
+
valid: !1,
|
|
700
|
+
mergeErrorPath: [r, ...o.mergeErrorPath]
|
|
701
|
+
};
|
|
702
|
+
n.push(o.data);
|
|
703
|
+
}
|
|
704
|
+
return {
|
|
705
|
+
valid: !0,
|
|
706
|
+
data: n
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
return {
|
|
710
|
+
valid: !1,
|
|
711
|
+
mergeErrorPath: []
|
|
712
|
+
};
|
|
713
|
+
}
|
|
714
|
+
function Z(e, t, n) {
|
|
715
|
+
let r = /* @__PURE__ */ new Map(), i, a = /* @__PURE__ */ new Map(), o = (e, t) => {
|
|
716
|
+
let n;
|
|
717
|
+
if (e.code === "unrecognized_keys" && !e.path?.length) i ??= e, n = e.keys;
|
|
718
|
+
else if (e.code === "invalid_key" && e.origin === "record" && e.path?.length === 1) {
|
|
719
|
+
let t = String(e.path[0]);
|
|
720
|
+
a.has(t) || a.set(t, e), n = [t];
|
|
721
|
+
} else return !1;
|
|
722
|
+
for (let e of n) r.has(e) || r.set(e, {}), r.get(e)[t] = !0;
|
|
723
|
+
return !0;
|
|
724
|
+
};
|
|
725
|
+
for (let n of t.issues) o(n, "l") || e.issues.push(n);
|
|
726
|
+
for (let t of n.issues) o(t, "r") || e.issues.push(t);
|
|
727
|
+
let s = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e);
|
|
728
|
+
if (s.length) {
|
|
729
|
+
let t = i ? s.filter((e) => i.keys.includes(e)) : [];
|
|
730
|
+
t.length && e.issues.push({
|
|
731
|
+
...i,
|
|
732
|
+
keys: t
|
|
733
|
+
});
|
|
734
|
+
for (let n of s) !t.includes(n) && a.has(n) && e.issues.push(a.get(n));
|
|
735
|
+
}
|
|
736
|
+
let c = X(t.value, n.value);
|
|
737
|
+
if (!c.valid) {
|
|
738
|
+
if (h(e)) return e;
|
|
739
|
+
throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);
|
|
740
|
+
}
|
|
741
|
+
return e.value = c.data, e;
|
|
742
|
+
}
|
|
743
|
+
var pt = /*@__PURE__*/ a("$ZodEnum", (e, t) => {
|
|
744
|
+
E.init(e, t);
|
|
745
|
+
let n = x(t.entries), r = new Set(n);
|
|
746
|
+
e._zod.values = r, v(e, "pattern", (e) => {
|
|
747
|
+
let t = x(e.def.entries).filter((e) => De.has(typeof e));
|
|
748
|
+
return RegExp(t.length ? `^(${t.map((e) => y(e.toString())).join("|")})$` : "^[^\\s\\S]$");
|
|
749
|
+
}), e._zod.parse = (t, i) => {
|
|
750
|
+
let a = t.value;
|
|
751
|
+
return r.has(a) || t.issues.push({
|
|
752
|
+
code: "invalid_value",
|
|
753
|
+
values: n,
|
|
754
|
+
input: a,
|
|
755
|
+
inst: e
|
|
756
|
+
}), t;
|
|
757
|
+
};
|
|
758
|
+
}), mt = /*@__PURE__*/ a("$ZodLiteral", (e, t) => {
|
|
759
|
+
E.init(e, t);
|
|
760
|
+
let n = new Set(t.values);
|
|
761
|
+
e._zod.values = n, v(e, "pattern", (e) => {
|
|
762
|
+
let t = e.def.values;
|
|
763
|
+
return RegExp(t.length ? `^(${t.map((e) => typeof e == "string" ? y(e) : e ? y(e.toString()) : String(e)).join("|")})$` : "^[^\\s\\S]$");
|
|
764
|
+
}), e._zod.parse = (r, i) => {
|
|
765
|
+
let a = r.value;
|
|
766
|
+
return n.has(a) || r.issues.push({
|
|
767
|
+
code: "invalid_value",
|
|
768
|
+
values: t.values,
|
|
769
|
+
input: a,
|
|
770
|
+
inst: e
|
|
771
|
+
}), r;
|
|
772
|
+
};
|
|
773
|
+
}), ht = /*@__PURE__*/ a("$ZodTransform", (e, t) => {
|
|
774
|
+
E.init(e, t), e._zod.optin = "optional", s.memoizer?.guard(e), e._zod.parse = (n, a) => {
|
|
775
|
+
if (a.direction === "backward") throw new i(e.constructor.name);
|
|
776
|
+
let o = t.transform(n.value, n);
|
|
777
|
+
if (a.async) return (o instanceof Promise ? o : Promise.resolve(o)).then((e) => (n.value = e, n));
|
|
778
|
+
if (o instanceof Promise) throw new r();
|
|
779
|
+
return n.value = o, n;
|
|
780
|
+
};
|
|
781
|
+
});
|
|
782
|
+
function Q(e, t) {
|
|
783
|
+
return e.value = t.issues.length ? void 0 : t.value, e;
|
|
784
|
+
}
|
|
785
|
+
var gt = /*@__PURE__*/ a("$ZodOptional", (e, t) => {
|
|
786
|
+
E.init(e, t), v(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", v(e, "values", (e) => {
|
|
787
|
+
let t = e.def.innerType._zod.values;
|
|
788
|
+
return t ? /* @__PURE__ */ new Set([...t, void 0]) : void 0;
|
|
789
|
+
}), v(e, "pattern", (e) => {
|
|
790
|
+
let t = e.def.innerType._zod.pattern;
|
|
791
|
+
return t ? RegExp(`^(${_(t.source)})?$`) : void 0;
|
|
792
|
+
}), e._zod.parse = (e, n) => {
|
|
793
|
+
if (e.value === void 0) {
|
|
794
|
+
if (t.innerType._zod.optin !== "defaulted") return e;
|
|
795
|
+
let r = t.innerType._zod.run({
|
|
796
|
+
value: e.value,
|
|
797
|
+
issues: []
|
|
798
|
+
}, n);
|
|
799
|
+
return r instanceof Promise ? r.then((t) => Q(e, t)) : Q(e, r);
|
|
800
|
+
}
|
|
801
|
+
return t.innerType._zod.run(e, n);
|
|
802
|
+
};
|
|
803
|
+
}), _t = /*@__PURE__*/ a("$ZodExactOptional", (e, t) => {
|
|
804
|
+
gt.init(e, t), v(e, "values", (e) => e.def.innerType._zod.values), v(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
805
|
+
}), vt = /*@__PURE__*/ a("$ZodNullable", (e, t) => {
|
|
806
|
+
E.init(e, t), v(e, "optin", (e) => e.def.innerType._zod.optin), v(e, "optout", (e) => e.def.innerType._zod.optout), v(e, "pattern", (e) => {
|
|
807
|
+
let t = e.def.innerType._zod.pattern;
|
|
808
|
+
return t ? RegExp(`^(${_(t.source)}|null)$`) : void 0;
|
|
809
|
+
}), v(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);
|
|
810
|
+
}), yt = /*@__PURE__*/ a("$ZodDefault", (e, t) => {
|
|
811
|
+
E.init(e, t), e._zod.optin = "defaulted", v(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
812
|
+
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
813
|
+
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
814
|
+
let r = t.innerType._zod.run(e, n);
|
|
815
|
+
return r instanceof Promise ? r.then((e) => bt(e, t)) : bt(r, t);
|
|
816
|
+
};
|
|
817
|
+
});
|
|
818
|
+
function bt(e, t) {
|
|
819
|
+
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
820
|
+
}
|
|
821
|
+
var xt = /*@__PURE__*/ a("$ZodPrefault", (e, t) => {
|
|
822
|
+
E.init(e, t), e._zod.optin = "defaulted", v(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));
|
|
823
|
+
}), St = /*@__PURE__*/ a("$ZodNonOptional", (e, t) => {
|
|
824
|
+
E.init(e, t), v(e, "values", (e) => {
|
|
825
|
+
let t = e.def.innerType._zod.values;
|
|
826
|
+
return t ? new Set([...t].filter((e) => e !== void 0)) : void 0;
|
|
827
|
+
}), e._zod.parse = (n, r) => {
|
|
828
|
+
let i = t.innerType._zod.run(n, r);
|
|
829
|
+
return i instanceof Promise ? i.then((t) => Ct(t, e)) : Ct(i, e);
|
|
830
|
+
};
|
|
831
|
+
});
|
|
832
|
+
function Ct(e, t) {
|
|
833
|
+
return !e.issues.length && e.value === void 0 && e.issues.push({
|
|
834
|
+
code: "invalid_type",
|
|
835
|
+
expected: "nonoptional",
|
|
836
|
+
input: e.value,
|
|
837
|
+
inst: t
|
|
838
|
+
}), e;
|
|
839
|
+
}
|
|
840
|
+
function wt(e, t, n, r) {
|
|
841
|
+
return t.issues.length ? (e.value = n.catchValue({
|
|
842
|
+
...t,
|
|
843
|
+
value: e.value,
|
|
844
|
+
error: { issues: t.issues.map((e) => b(e, r, o())) },
|
|
845
|
+
input: e.value
|
|
846
|
+
}), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
|
|
847
|
+
}
|
|
848
|
+
var Tt = /*@__PURE__*/ a("$ZodCatch", (e, t) => {
|
|
849
|
+
E.init(e, t), v(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), v(e, "optout", (e) => e.def.innerType._zod.optout), v(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
850
|
+
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
851
|
+
let r = t.innerType._zod.run({
|
|
852
|
+
value: e.value,
|
|
853
|
+
issues: []
|
|
854
|
+
}, n);
|
|
855
|
+
return r instanceof Promise ? r.then((r) => wt(e, r, t, n)) : wt(e, r, t, n);
|
|
856
|
+
};
|
|
857
|
+
}), Et = /*@__PURE__*/ a("$ZodPipe", (e, t) => {
|
|
858
|
+
E.init(e, t), v(e, "values", (e) => e.def.in._zod.values), v(e, "optin", (e) => e.def.in._zod.optin), v(e, "optout", (e) => e.def.out._zod.optout), v(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
859
|
+
if (n.direction === "backward") {
|
|
860
|
+
let r = t.out._zod.run(e, n);
|
|
861
|
+
return r instanceof Promise ? r.then((e) => $(e, t.in, n)) : $(r, t.in, n);
|
|
862
|
+
}
|
|
863
|
+
let r = t.in._zod.run(e, n);
|
|
864
|
+
return r instanceof Promise ? r.then((e) => $(e, t.out, n)) : $(r, t.out, n);
|
|
865
|
+
};
|
|
866
|
+
});
|
|
867
|
+
function $(e, t, n) {
|
|
868
|
+
return e.issues.some((e) => e.code !== "unrecognized_keys") ? (e.aborted = !0, e) : t._zod.run({
|
|
869
|
+
value: e.value,
|
|
870
|
+
issues: e.issues
|
|
871
|
+
}, n);
|
|
872
|
+
}
|
|
873
|
+
var Dt = /*@__PURE__*/ a("$ZodReadonly", (e, t) => {
|
|
874
|
+
E.init(e, t), v(e, "propValues", (e) => e.def.innerType._zod.propValues), v(e, "values", (e) => e.def.innerType._zod.values), v(e, "optin", (e) => e.def.innerType?._zod?.optin), v(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
875
|
+
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
876
|
+
let r = t.innerType._zod.run(e, n);
|
|
877
|
+
return r instanceof Promise ? r.then(Ot) : Ot(r);
|
|
878
|
+
};
|
|
879
|
+
});
|
|
880
|
+
function Ot(e) {
|
|
881
|
+
return e.memo || (e.value = Object.freeze(e.value)), e;
|
|
882
|
+
}
|
|
883
|
+
var kt = /*@__PURE__*/ a("$ZodCustom", (t, n) => {
|
|
884
|
+
e.init(t, n), E.init(t, n), t._zod.parse = (e, t) => e, t._zod.check = (e) => {
|
|
885
|
+
let r = e.value, i = n.fn(r);
|
|
886
|
+
if (i instanceof Promise) return i.then((n) => At(n, e, r, t));
|
|
887
|
+
At(i, e, r, t);
|
|
888
|
+
};
|
|
889
|
+
});
|
|
890
|
+
function At(e, t, n, r) {
|
|
891
|
+
if (!e) {
|
|
892
|
+
let e = {
|
|
893
|
+
code: "custom",
|
|
894
|
+
input: n,
|
|
895
|
+
inst: r,
|
|
896
|
+
path: [...r._zod.def.path ?? []],
|
|
897
|
+
continue: !r._zod.def.abort
|
|
898
|
+
};
|
|
899
|
+
r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(we(e));
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
export { ct as $ZodArray, Qe as $ZodBase64, $e as $ZodBase64URL, rt as $ZodBoolean, Xe as $ZodCIDRv4, Ze as $ZodCIDRv6, Re as $ZodCUID, ze as $ZodCUID2, Tt as $ZodCatch, kt as $ZodCustom, yt as $ZodDefault, et as $ZodE164, Ne as $ZodEmail, Ie as $ZodEmoji, pt as $ZodEnum, _t as $ZodExactOptional, je as $ZodGUID, qe as $ZodIPv4, Ye as $ZodIPv6, We as $ZodISODate, Ue as $ZodISODateTime, Ke as $ZodISODuration, Ge as $ZodISOTime, ft as $ZodIntersection, tt as $ZodJWT, He as $ZodKSUID, mt as $ZodLiteral, Le as $ZodNanoID, at as $ZodNever, St as $ZodNonOptional, vt as $ZodNullable, U as $ZodNumber, nt as $ZodNumberFormat, J as $ZodObject, ut as $ZodObjectJIT, gt as $ZodOptional, Et as $ZodPipe, xt as $ZodPrefault, Dt as $ZodReadonly, Ae as $ZodString, k as $ZodStringFormat, ht as $ZodTransform, E as $ZodType, Be as $ZodULID, Fe as $ZodURL, Me as $ZodUUID, dt as $ZodUnion, it as $ZodUnknown, Ve as $ZodXID, z as base64Charset, B as base64urlCharset, A as canParseURL, R as isValidBase64, V as isValidBase64URL, L as isValidCIDRv6, I as isValidIPv6, H as isValidJWT, X as mergeValues, M as parseURLObject, O as standardProps, N as stripTabAndNewline, P as urlHostnameOk, F as urlProtocolOk, j as validateURL };
|
|
903
|
+
|
|
904
|
+
//# sourceMappingURL=schemas.js.map
|