@jsfsi-core/ts-crossplatform 1.1.34 → 1.1.36
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 +31 -0
- package/dist/index.cjs +4 -4
- package/dist/index.mjs +363 -356
- package/dist/src/index.d.ts +1 -0
- package/dist/src/validation/SafeDomain.d.ts +4 -0
- package/dist/src/validation/SafeDomain.test.d.ts +1 -0
- package/dist/src/validation/index.d.ts +1 -0
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const zi = (e = {}) => e, _e = (e) => [e, void 0], T = (e) => [
|
|
2
2
|
void 0,
|
|
3
3
|
e
|
|
4
4
|
];
|
|
@@ -11,26 +11,26 @@ class ae {
|
|
|
11
11
|
const yi = (
|
|
12
12
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
13
13
|
((e) => (t) => !(t instanceof e))
|
|
14
|
-
),
|
|
14
|
+
), ki = (
|
|
15
15
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
16
16
|
((e) => (t) => t instanceof e)
|
|
17
|
-
),
|
|
17
|
+
), $i = (e, t = process.env) => {
|
|
18
18
|
const n = e.safeParse(t);
|
|
19
19
|
if (!n.success)
|
|
20
20
|
throw new Error(`Invalid environment variables: ${JSON.stringify(n.error.issues)}`);
|
|
21
21
|
return n.data;
|
|
22
22
|
};
|
|
23
|
-
function
|
|
23
|
+
function Zi(e) {
|
|
24
24
|
return new Promise((t) => setTimeout(t, e));
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function It(e, t) {
|
|
27
27
|
return new Date(e).toLocaleDateString(t, {
|
|
28
28
|
year: "numeric",
|
|
29
29
|
month: "2-digit",
|
|
30
30
|
day: "2-digit"
|
|
31
31
|
});
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Et(e, t) {
|
|
34
34
|
return new Date(e).toLocaleTimeString(t, {
|
|
35
35
|
hour12: !1,
|
|
36
36
|
hour: "2-digit",
|
|
@@ -38,10 +38,10 @@ function It(e, t) {
|
|
|
38
38
|
second: "2-digit"
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
return `${
|
|
41
|
+
function Si(e, t) {
|
|
42
|
+
return `${It(e, t)} ${Et(e, t)}`;
|
|
43
43
|
}
|
|
44
|
-
function
|
|
44
|
+
function Oi({
|
|
45
45
|
allDay: e,
|
|
46
46
|
startDate: t,
|
|
47
47
|
startTime: n,
|
|
@@ -73,47 +73,47 @@ function Si({
|
|
|
73
73
|
}
|
|
74
74
|
return o;
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const Pt = "00000000-0000-0000-0000-000000000000", Tt = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
|
|
77
77
|
function Ve(e) {
|
|
78
|
-
return typeof e == "string" &&
|
|
78
|
+
return typeof e == "string" && Tt.test(e);
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function Nt(e) {
|
|
81
81
|
if (!Ve(e))
|
|
82
82
|
throw TypeError("Invalid UUID");
|
|
83
83
|
let t;
|
|
84
84
|
return Uint8Array.of((t = parseInt(e.slice(0, 8), 16)) >>> 24, t >>> 16 & 255, t >>> 8 & 255, t & 255, (t = parseInt(e.slice(9, 13), 16)) >>> 8, t & 255, (t = parseInt(e.slice(14, 18), 16)) >>> 8, t & 255, (t = parseInt(e.slice(19, 23), 16)) >>> 8, t & 255, (t = parseInt(e.slice(24, 36), 16)) / 1099511627776 & 255, t / 4294967296 & 255, t >>> 24 & 255, t >>> 16 & 255, t >>> 8 & 255, t & 255);
|
|
85
85
|
}
|
|
86
|
-
const
|
|
86
|
+
const y = [];
|
|
87
87
|
for (let e = 0; e < 256; ++e)
|
|
88
|
-
|
|
89
|
-
function
|
|
90
|
-
return (
|
|
88
|
+
y.push((e + 256).toString(16).slice(1));
|
|
89
|
+
function jt(e, t = 0) {
|
|
90
|
+
return (y[e[t + 0]] + y[e[t + 1]] + y[e[t + 2]] + y[e[t + 3]] + "-" + y[e[t + 4]] + y[e[t + 5]] + "-" + y[e[t + 6]] + y[e[t + 7]] + "-" + y[e[t + 8]] + y[e[t + 9]] + "-" + y[e[t + 10]] + y[e[t + 11]] + y[e[t + 12]] + y[e[t + 13]] + y[e[t + 14]] + y[e[t + 15]]).toLowerCase();
|
|
91
91
|
}
|
|
92
92
|
let re;
|
|
93
|
-
const
|
|
94
|
-
function
|
|
93
|
+
const At = new Uint8Array(16);
|
|
94
|
+
function Dt() {
|
|
95
95
|
if (!re) {
|
|
96
96
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
97
97
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
98
98
|
re = crypto.getRandomValues.bind(crypto);
|
|
99
99
|
}
|
|
100
|
-
return re(
|
|
100
|
+
return re(At);
|
|
101
101
|
}
|
|
102
102
|
const xt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ve = { randomUUID: xt };
|
|
103
|
-
function
|
|
103
|
+
function Rt(e, t, n) {
|
|
104
104
|
e = e || {};
|
|
105
|
-
const r = e.random ?? e.rng?.() ??
|
|
105
|
+
const r = e.random ?? e.rng?.() ?? Dt();
|
|
106
106
|
if (r.length < 16)
|
|
107
107
|
throw new Error("Random bytes length must be >= 16");
|
|
108
|
-
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128,
|
|
108
|
+
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, jt(r);
|
|
109
109
|
}
|
|
110
|
-
function
|
|
111
|
-
return ve.randomUUID && !e ? ve.randomUUID() :
|
|
110
|
+
function Ct(e, t, n) {
|
|
111
|
+
return ve.randomUUID && !e ? ve.randomUUID() : Rt(e);
|
|
112
112
|
}
|
|
113
113
|
class J {
|
|
114
114
|
uuid;
|
|
115
115
|
constructor(t) {
|
|
116
|
-
|
|
116
|
+
Nt(t), this.uuid = t;
|
|
117
117
|
}
|
|
118
118
|
toString() {
|
|
119
119
|
return this.uuid;
|
|
@@ -122,10 +122,10 @@ class J {
|
|
|
122
122
|
return this.uuid === t.toString();
|
|
123
123
|
}
|
|
124
124
|
static new() {
|
|
125
|
-
return new J(
|
|
125
|
+
return new J(Ct());
|
|
126
126
|
}
|
|
127
127
|
static empty() {
|
|
128
|
-
return new J(
|
|
128
|
+
return new J(Pt);
|
|
129
129
|
}
|
|
130
130
|
static isValid(t) {
|
|
131
131
|
return !!(t && Ve(t));
|
|
@@ -206,7 +206,7 @@ function de(e) {
|
|
|
206
206
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
207
207
|
return e.slice(t, n);
|
|
208
208
|
}
|
|
209
|
-
function
|
|
209
|
+
function Ut(e, t) {
|
|
210
210
|
const n = (e.toString().split(".")[1] || "").length, r = t.toString();
|
|
211
211
|
let o = (r.split(".")[1] || "").length;
|
|
212
212
|
if (o === 0 && /\d?e-\d?/.test(r)) {
|
|
@@ -233,7 +233,7 @@ function g(e, t, n) {
|
|
|
233
233
|
configurable: !0
|
|
234
234
|
});
|
|
235
235
|
}
|
|
236
|
-
function
|
|
236
|
+
function x(e, t, n) {
|
|
237
237
|
Object.defineProperty(e, t, {
|
|
238
238
|
value: n,
|
|
239
239
|
writable: !0,
|
|
@@ -252,7 +252,7 @@ function N(...e) {
|
|
|
252
252
|
function be(e) {
|
|
253
253
|
return JSON.stringify(e);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function Ft(e) {
|
|
256
256
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
257
257
|
}
|
|
258
258
|
const Ke = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
@@ -260,7 +260,7 @@ const Ke = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
|
260
260
|
function G(e) {
|
|
261
261
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
262
262
|
}
|
|
263
|
-
const
|
|
263
|
+
const Jt = fe(() => {
|
|
264
264
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
265
265
|
return !1;
|
|
266
266
|
try {
|
|
@@ -282,7 +282,7 @@ function L(e) {
|
|
|
282
282
|
function Ge(e) {
|
|
283
283
|
return L(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
284
284
|
}
|
|
285
|
-
const
|
|
285
|
+
const Mt = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
286
286
|
function Q(e) {
|
|
287
287
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
288
288
|
}
|
|
@@ -303,17 +303,17 @@ function d(e) {
|
|
|
303
303
|
}
|
|
304
304
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
306
|
+
function Lt(e) {
|
|
307
307
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
308
308
|
}
|
|
309
|
-
const
|
|
309
|
+
const Vt = {
|
|
310
310
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
311
311
|
int32: [-2147483648, 2147483647],
|
|
312
312
|
uint32: [0, 4294967295],
|
|
313
313
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
314
314
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
315
315
|
};
|
|
316
|
-
function
|
|
316
|
+
function Wt(e, t) {
|
|
317
317
|
const n = e._zod.def, r = n.checks;
|
|
318
318
|
if (r && r.length > 0)
|
|
319
319
|
throw new Error(".pick() cannot be used on object schemas containing refinements");
|
|
@@ -325,13 +325,13 @@ function Vt(e, t) {
|
|
|
325
325
|
throw new Error(`Unrecognized key: "${c}"`);
|
|
326
326
|
t[c] && (s[c] = n.shape[c]);
|
|
327
327
|
}
|
|
328
|
-
return
|
|
328
|
+
return x(this, "shape", s), s;
|
|
329
329
|
},
|
|
330
330
|
checks: []
|
|
331
331
|
});
|
|
332
332
|
return j(e, i);
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function Bt(e, t) {
|
|
335
335
|
const n = e._zod.def, r = n.checks;
|
|
336
336
|
if (r && r.length > 0)
|
|
337
337
|
throw new Error(".omit() cannot be used on object schemas containing refinements");
|
|
@@ -343,13 +343,13 @@ function Wt(e, t) {
|
|
|
343
343
|
throw new Error(`Unrecognized key: "${c}"`);
|
|
344
344
|
t[c] && delete s[c];
|
|
345
345
|
}
|
|
346
|
-
return
|
|
346
|
+
return x(this, "shape", s), s;
|
|
347
347
|
},
|
|
348
348
|
checks: []
|
|
349
349
|
});
|
|
350
350
|
return j(e, i);
|
|
351
351
|
}
|
|
352
|
-
function
|
|
352
|
+
function Ht(e, t) {
|
|
353
353
|
if (!L(t))
|
|
354
354
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
355
355
|
const n = e._zod.def.checks;
|
|
@@ -362,27 +362,27 @@ function Bt(e, t) {
|
|
|
362
362
|
const o = N(e._zod.def, {
|
|
363
363
|
get shape() {
|
|
364
364
|
const i = { ...e._zod.def.shape, ...t };
|
|
365
|
-
return
|
|
365
|
+
return x(this, "shape", i), i;
|
|
366
366
|
}
|
|
367
367
|
});
|
|
368
368
|
return j(e, o);
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function Kt(e, t) {
|
|
371
371
|
if (!L(t))
|
|
372
372
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
373
373
|
const n = N(e._zod.def, {
|
|
374
374
|
get shape() {
|
|
375
375
|
const r = { ...e._zod.def.shape, ...t };
|
|
376
|
-
return
|
|
376
|
+
return x(this, "shape", r), r;
|
|
377
377
|
}
|
|
378
378
|
});
|
|
379
379
|
return j(e, n);
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function Gt(e, t) {
|
|
382
382
|
const n = N(e._zod.def, {
|
|
383
383
|
get shape() {
|
|
384
384
|
const r = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
385
|
-
return
|
|
385
|
+
return x(this, "shape", r), r;
|
|
386
386
|
},
|
|
387
387
|
get catchall() {
|
|
388
388
|
return t._zod.def.catchall;
|
|
@@ -392,7 +392,7 @@ function Kt(e, t) {
|
|
|
392
392
|
});
|
|
393
393
|
return j(e, n);
|
|
394
394
|
}
|
|
395
|
-
function
|
|
395
|
+
function Xt(e, t, n) {
|
|
396
396
|
const o = t._zod.def.checks;
|
|
397
397
|
if (o && o.length > 0)
|
|
398
398
|
throw new Error(".partial() cannot be used on object schemas containing refinements");
|
|
@@ -414,13 +414,13 @@ function Gt(e, t, n) {
|
|
|
414
414
|
type: "optional",
|
|
415
415
|
innerType: c[f]
|
|
416
416
|
}) : c[f];
|
|
417
|
-
return
|
|
417
|
+
return x(this, "shape", a), a;
|
|
418
418
|
},
|
|
419
419
|
checks: []
|
|
420
420
|
});
|
|
421
421
|
return j(t, s);
|
|
422
422
|
}
|
|
423
|
-
function
|
|
423
|
+
function Yt(e, t, n) {
|
|
424
424
|
const r = N(t._zod.def, {
|
|
425
425
|
get shape() {
|
|
426
426
|
const o = t._zod.def.shape, i = { ...o };
|
|
@@ -439,7 +439,7 @@ function Xt(e, t, n) {
|
|
|
439
439
|
type: "nonoptional",
|
|
440
440
|
innerType: o[s]
|
|
441
441
|
});
|
|
442
|
-
return
|
|
442
|
+
return x(this, "shape", i), i;
|
|
443
443
|
}
|
|
444
444
|
});
|
|
445
445
|
return j(t, r);
|
|
@@ -461,7 +461,7 @@ function Xe(e, t) {
|
|
|
461
461
|
function B(e) {
|
|
462
462
|
return typeof e == "string" ? e : e?.message;
|
|
463
463
|
}
|
|
464
|
-
function
|
|
464
|
+
function D(e, t, n) {
|
|
465
465
|
const r = { ...e, path: e.path ?? [] };
|
|
466
466
|
if (!e.message) {
|
|
467
467
|
const o = B(e.inst?._zod.def?.error?.(e)) ?? B(t?.error?.(e)) ?? B(n.customError?.(e)) ?? B(n.localeError?.(e)) ?? "Invalid input";
|
|
@@ -493,13 +493,13 @@ const Ye = (e, t) => {
|
|
|
493
493
|
enumerable: !1
|
|
494
494
|
});
|
|
495
495
|
}, qe = u("$ZodError", Ye), Qe = u("$ZodError", Ye, { Parent: Error });
|
|
496
|
-
function
|
|
496
|
+
function qt(e, t = (n) => n.message) {
|
|
497
497
|
const n = {}, r = [];
|
|
498
498
|
for (const o of e.issues)
|
|
499
499
|
o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
|
|
500
500
|
return { formErrors: r, fieldErrors: n };
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function Qt(e, t = (n) => n.message) {
|
|
503
503
|
const n = { _errors: [] }, r = (o) => {
|
|
504
504
|
for (const i of o.issues)
|
|
505
505
|
if (i.code === "invalid_union" && i.errors.length)
|
|
@@ -525,7 +525,7 @@ const he = (e) => (t, n, r, o) => {
|
|
|
525
525
|
if (s instanceof Promise)
|
|
526
526
|
throw new U();
|
|
527
527
|
if (s.issues.length) {
|
|
528
|
-
const c = new (o?.Err ?? e)(s.issues.map((a) =>
|
|
528
|
+
const c = new (o?.Err ?? e)(s.issues.map((a) => D(a, i, A())));
|
|
529
529
|
throw Ke(c, o?.callee), c;
|
|
530
530
|
}
|
|
531
531
|
return s.value;
|
|
@@ -533,7 +533,7 @@ const he = (e) => (t, n, r, o) => {
|
|
|
533
533
|
const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
534
534
|
let s = t._zod.run({ value: n, issues: [] }, i);
|
|
535
535
|
if (s instanceof Promise && (s = await s), s.issues.length) {
|
|
536
|
-
const c = new (o?.Err ?? e)(s.issues.map((a) =>
|
|
536
|
+
const c = new (o?.Err ?? e)(s.issues.map((a) => D(a, i, A())));
|
|
537
537
|
throw Ke(c, o?.callee), c;
|
|
538
538
|
}
|
|
539
539
|
return s.value;
|
|
@@ -543,49 +543,49 @@ const he = (e) => (t, n, r, o) => {
|
|
|
543
543
|
throw new U();
|
|
544
544
|
return i.issues.length ? {
|
|
545
545
|
success: !1,
|
|
546
|
-
error: new (e ?? qe)(i.issues.map((s) =>
|
|
546
|
+
error: new (e ?? qe)(i.issues.map((s) => D(s, o, A())))
|
|
547
547
|
} : { success: !0, data: i.value };
|
|
548
|
-
},
|
|
548
|
+
}, en = /* @__PURE__ */ ee(Qe), te = (e) => async (t, n, r) => {
|
|
549
549
|
const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
|
|
550
550
|
let i = t._zod.run({ value: n, issues: [] }, o);
|
|
551
551
|
return i instanceof Promise && (i = await i), i.issues.length ? {
|
|
552
552
|
success: !1,
|
|
553
|
-
error: new e(i.issues.map((s) =>
|
|
553
|
+
error: new e(i.issues.map((s) => D(s, o, A())))
|
|
554
554
|
} : { success: !0, data: i.value };
|
|
555
|
-
},
|
|
555
|
+
}, tn = /* @__PURE__ */ te(Qe), nn = (e) => (t, n, r) => {
|
|
556
556
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
557
557
|
return he(e)(t, n, o);
|
|
558
|
-
},
|
|
558
|
+
}, rn = (e) => (t, n, r) => he(e)(t, n, r), on = (e) => async (t, n, r) => {
|
|
559
559
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
560
560
|
return me(e)(t, n, o);
|
|
561
|
-
},
|
|
561
|
+
}, sn = (e) => async (t, n, r) => me(e)(t, n, r), cn = (e) => (t, n, r) => {
|
|
562
562
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
563
563
|
return ee(e)(t, n, o);
|
|
564
|
-
},
|
|
564
|
+
}, un = (e) => (t, n, r) => ee(e)(t, n, r), an = (e) => async (t, n, r) => {
|
|
565
565
|
const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
|
|
566
566
|
return te(e)(t, n, o);
|
|
567
|
-
},
|
|
568
|
-
function
|
|
569
|
-
return new RegExp(
|
|
567
|
+
}, fn = (e) => async (t, n, r) => te(e)(t, n, r), ln = /^[cC][^\s-]{8,}$/, dn = /^[0-9a-z]+$/, pn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, hn = /^[0-9a-vA-V]{20}$/, mn = /^[A-Za-z0-9]{27}$/, gn = /^[a-zA-Z0-9_-]{21}$/, _n = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, vn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, ze = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, wn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, bn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
568
|
+
function zn() {
|
|
569
|
+
return new RegExp(bn, "u");
|
|
570
570
|
}
|
|
571
|
-
const yn = /^(?:(?: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])$/,
|
|
571
|
+
const yn = /^(?:(?: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])$/, kn = /^(([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}|:))$/, $n = /^((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])$/, Zn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Sn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, et = /^[A-Za-z0-9_-]*$/, On = /^\+[1-9]\d{6,14}$/, tt = "(?:(?:\\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])))", In = /* @__PURE__ */ new RegExp(`^${tt}$`);
|
|
572
572
|
function nt(e) {
|
|
573
573
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
574
574
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
575
575
|
}
|
|
576
|
-
function
|
|
576
|
+
function En(e) {
|
|
577
577
|
return new RegExp(`^${nt(e)}$`);
|
|
578
578
|
}
|
|
579
|
-
function
|
|
579
|
+
function Pn(e) {
|
|
580
580
|
const t = nt({ precision: e.precision }), n = ["Z"];
|
|
581
581
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
582
582
|
const r = `${t}(?:${n.join("|")})`;
|
|
583
583
|
return new RegExp(`^${tt}T(?:${r})$`);
|
|
584
584
|
}
|
|
585
|
-
const
|
|
585
|
+
const Tn = (e) => {
|
|
586
586
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
587
587
|
return new RegExp(`^${t}$`);
|
|
588
|
-
},
|
|
588
|
+
}, Nn = /^-?\d+$/, jn = /^-?\d+(?:\.\d+)?$/, An = /^[^A-Z]*$/, Dn = /^[^a-z]*$/, O = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
|
|
589
589
|
var n;
|
|
590
590
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
591
591
|
}), rt = {
|
|
@@ -633,7 +633,7 @@ const Pn = (e) => {
|
|
|
633
633
|
}), e._zod.check = (n) => {
|
|
634
634
|
if (typeof n.value != typeof t.value)
|
|
635
635
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
636
|
-
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) :
|
|
636
|
+
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : Ut(n.value, t.value) === 0) || n.issues.push({
|
|
637
637
|
origin: typeof n.value,
|
|
638
638
|
code: "not_multiple_of",
|
|
639
639
|
divisor: t.value,
|
|
@@ -642,12 +642,12 @@ const Pn = (e) => {
|
|
|
642
642
|
continue: !t.abort
|
|
643
643
|
});
|
|
644
644
|
};
|
|
645
|
-
}),
|
|
645
|
+
}), Rn = /* @__PURE__ */ u("$ZodCheckNumberFormat", (e, t) => {
|
|
646
646
|
O.init(e, t), t.format = t.format || "float64";
|
|
647
|
-
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] =
|
|
647
|
+
const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] = Vt[t.format];
|
|
648
648
|
e._zod.onattach.push((s) => {
|
|
649
649
|
const c = s._zod.bag;
|
|
650
|
-
c.format = t.format, c.minimum = o, c.maximum = i, n && (c.pattern =
|
|
650
|
+
c.format = t.format, c.minimum = o, c.maximum = i, n && (c.pattern = Nn);
|
|
651
651
|
}), e._zod.check = (s) => {
|
|
652
652
|
const c = s.value;
|
|
653
653
|
if (n) {
|
|
@@ -703,7 +703,7 @@ const Pn = (e) => {
|
|
|
703
703
|
continue: !t.abort
|
|
704
704
|
});
|
|
705
705
|
};
|
|
706
|
-
}),
|
|
706
|
+
}), Cn = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
|
|
707
707
|
var n;
|
|
708
708
|
O.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
709
709
|
const o = r.value;
|
|
@@ -726,7 +726,7 @@ const Pn = (e) => {
|
|
|
726
726
|
continue: !t.abort
|
|
727
727
|
});
|
|
728
728
|
};
|
|
729
|
-
}),
|
|
729
|
+
}), Un = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
|
|
730
730
|
var n;
|
|
731
731
|
O.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
732
732
|
const o = r.value;
|
|
@@ -749,7 +749,7 @@ const Pn = (e) => {
|
|
|
749
749
|
continue: !t.abort
|
|
750
750
|
});
|
|
751
751
|
};
|
|
752
|
-
}),
|
|
752
|
+
}), Fn = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
|
|
753
753
|
var n;
|
|
754
754
|
O.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
|
|
755
755
|
const o = r.value;
|
|
@@ -789,7 +789,7 @@ const Pn = (e) => {
|
|
|
789
789
|
});
|
|
790
790
|
}) : (r = e._zod).check ?? (r.check = () => {
|
|
791
791
|
});
|
|
792
|
-
}),
|
|
792
|
+
}), Jn = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
|
|
793
793
|
ne.init(e, t), e._zod.check = (n) => {
|
|
794
794
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
795
795
|
origin: "string",
|
|
@@ -801,11 +801,11 @@ const Pn = (e) => {
|
|
|
801
801
|
continue: !t.abort
|
|
802
802
|
});
|
|
803
803
|
};
|
|
804
|
-
}),
|
|
805
|
-
t.pattern ?? (t.pattern = jn), ne.init(e, t);
|
|
806
|
-
}), Mn = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
|
|
804
|
+
}), Mn = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
|
|
807
805
|
t.pattern ?? (t.pattern = An), ne.init(e, t);
|
|
808
|
-
}), Ln = /* @__PURE__ */ u("$
|
|
806
|
+
}), Ln = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
|
|
807
|
+
t.pattern ?? (t.pattern = Dn), ne.init(e, t);
|
|
808
|
+
}), Vn = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
|
|
809
809
|
O.init(e, t);
|
|
810
810
|
const n = Q(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
811
811
|
t.pattern = r, e._zod.onattach.push((o) => {
|
|
@@ -822,7 +822,7 @@ const Pn = (e) => {
|
|
|
822
822
|
continue: !t.abort
|
|
823
823
|
});
|
|
824
824
|
};
|
|
825
|
-
}),
|
|
825
|
+
}), Wn = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
|
|
826
826
|
O.init(e, t);
|
|
827
827
|
const n = new RegExp(`^${Q(t.prefix)}.*`);
|
|
828
828
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
@@ -839,7 +839,7 @@ const Pn = (e) => {
|
|
|
839
839
|
continue: !t.abort
|
|
840
840
|
});
|
|
841
841
|
};
|
|
842
|
-
}),
|
|
842
|
+
}), Bn = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
|
|
843
843
|
O.init(e, t);
|
|
844
844
|
const n = new RegExp(`.*${Q(t.suffix)}$`);
|
|
845
845
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
|
|
@@ -856,12 +856,12 @@ const Pn = (e) => {
|
|
|
856
856
|
continue: !t.abort
|
|
857
857
|
});
|
|
858
858
|
};
|
|
859
|
-
}),
|
|
859
|
+
}), Hn = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
|
|
860
860
|
O.init(e, t), e._zod.check = (n) => {
|
|
861
861
|
n.value = t.tx(n.value);
|
|
862
862
|
};
|
|
863
863
|
});
|
|
864
|
-
class
|
|
864
|
+
class Kn {
|
|
865
865
|
constructor(t = []) {
|
|
866
866
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
867
867
|
}
|
|
@@ -884,13 +884,13 @@ class Hn {
|
|
|
884
884
|
`));
|
|
885
885
|
}
|
|
886
886
|
}
|
|
887
|
-
const
|
|
887
|
+
const Gn = {
|
|
888
888
|
major: 4,
|
|
889
889
|
minor: 3,
|
|
890
890
|
patch: 6
|
|
891
891
|
}, w = /* @__PURE__ */ u("$ZodType", (e, t) => {
|
|
892
892
|
var n;
|
|
893
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
893
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Gn;
|
|
894
894
|
const r = [...e._zod.def.checks ?? []];
|
|
895
895
|
e._zod.traits.has("$ZodCheck") && r.unshift(e);
|
|
896
896
|
for (const o of r)
|
|
@@ -953,17 +953,17 @@ const Kn = {
|
|
|
953
953
|
g(e, "~standard", () => ({
|
|
954
954
|
validate: (o) => {
|
|
955
955
|
try {
|
|
956
|
-
const i =
|
|
956
|
+
const i = en(e, o);
|
|
957
957
|
return i.success ? { value: i.data } : { issues: i.error?.issues };
|
|
958
958
|
} catch {
|
|
959
|
-
return
|
|
959
|
+
return tn(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
|
|
960
960
|
}
|
|
961
961
|
},
|
|
962
962
|
vendor: "zod",
|
|
963
963
|
version: 1
|
|
964
964
|
}));
|
|
965
965
|
}), ge = /* @__PURE__ */ u("$ZodString", (e, t) => {
|
|
966
|
-
w.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ??
|
|
966
|
+
w.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Tn(e._zod.bag), e._zod.parse = (n, r) => {
|
|
967
967
|
if (t.coerce)
|
|
968
968
|
try {
|
|
969
969
|
n.value = String(n.value);
|
|
@@ -978,9 +978,9 @@ const Kn = {
|
|
|
978
978
|
};
|
|
979
979
|
}), _ = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
|
|
980
980
|
ne.init(e, t), ge.init(e, t);
|
|
981
|
-
}),
|
|
982
|
-
t.pattern ?? (t.pattern =
|
|
983
|
-
}),
|
|
981
|
+
}), Xn = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
|
|
982
|
+
t.pattern ?? (t.pattern = vn), _.init(e, t);
|
|
983
|
+
}), Yn = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
|
|
984
984
|
if (t.version) {
|
|
985
985
|
const r = {
|
|
986
986
|
v1: 1,
|
|
@@ -994,13 +994,13 @@ const Kn = {
|
|
|
994
994
|
}[t.version];
|
|
995
995
|
if (r === void 0)
|
|
996
996
|
throw new Error(`Invalid UUID version: "${t.version}"`);
|
|
997
|
-
t.pattern ?? (t.pattern =
|
|
997
|
+
t.pattern ?? (t.pattern = ze(r));
|
|
998
998
|
} else
|
|
999
|
-
t.pattern ?? (t.pattern =
|
|
999
|
+
t.pattern ?? (t.pattern = ze());
|
|
1000
1000
|
_.init(e, t);
|
|
1001
|
-
}),
|
|
1002
|
-
t.pattern ?? (t.pattern =
|
|
1003
|
-
}),
|
|
1001
|
+
}), qn = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
|
|
1002
|
+
t.pattern ?? (t.pattern = wn), _.init(e, t);
|
|
1003
|
+
}), Qn = /* @__PURE__ */ u("$ZodURL", (e, t) => {
|
|
1004
1004
|
_.init(e, t), e._zod.check = (n) => {
|
|
1005
1005
|
try {
|
|
1006
1006
|
const r = n.value.trim(), o = new URL(r);
|
|
@@ -1032,32 +1032,32 @@ const Kn = {
|
|
|
1032
1032
|
});
|
|
1033
1033
|
}
|
|
1034
1034
|
};
|
|
1035
|
-
}),
|
|
1036
|
-
t.pattern ?? (t.pattern =
|
|
1037
|
-
}),
|
|
1038
|
-
t.pattern ?? (t.pattern =
|
|
1039
|
-
}),
|
|
1040
|
-
t.pattern ?? (t.pattern = fn), _.init(e, t);
|
|
1041
|
-
}), nr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
|
|
1035
|
+
}), er = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
|
|
1036
|
+
t.pattern ?? (t.pattern = zn()), _.init(e, t);
|
|
1037
|
+
}), tr = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
|
|
1038
|
+
t.pattern ?? (t.pattern = gn), _.init(e, t);
|
|
1039
|
+
}), nr = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
|
|
1042
1040
|
t.pattern ?? (t.pattern = ln), _.init(e, t);
|
|
1043
|
-
}), rr = /* @__PURE__ */ u("$
|
|
1041
|
+
}), rr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
|
|
1044
1042
|
t.pattern ?? (t.pattern = dn), _.init(e, t);
|
|
1045
|
-
}), or = /* @__PURE__ */ u("$
|
|
1043
|
+
}), or = /* @__PURE__ */ u("$ZodULID", (e, t) => {
|
|
1046
1044
|
t.pattern ?? (t.pattern = pn), _.init(e, t);
|
|
1047
|
-
}), sr = /* @__PURE__ */ u("$
|
|
1045
|
+
}), sr = /* @__PURE__ */ u("$ZodXID", (e, t) => {
|
|
1048
1046
|
t.pattern ?? (t.pattern = hn), _.init(e, t);
|
|
1049
|
-
}), ir = /* @__PURE__ */ u("$
|
|
1047
|
+
}), ir = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
|
|
1048
|
+
t.pattern ?? (t.pattern = mn), _.init(e, t);
|
|
1049
|
+
}), cr = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
|
|
1050
|
+
t.pattern ?? (t.pattern = Pn(t)), _.init(e, t);
|
|
1051
|
+
}), ur = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
|
|
1052
|
+
t.pattern ?? (t.pattern = In), _.init(e, t);
|
|
1053
|
+
}), ar = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
|
|
1050
1054
|
t.pattern ?? (t.pattern = En(t)), _.init(e, t);
|
|
1051
|
-
}),
|
|
1052
|
-
t.pattern ?? (t.pattern =
|
|
1053
|
-
}),
|
|
1054
|
-
t.pattern ?? (t.pattern = In(t)), _.init(e, t);
|
|
1055
|
-
}), ar = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
|
|
1056
|
-
t.pattern ?? (t.pattern = gn), _.init(e, t);
|
|
1057
|
-
}), fr = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
|
|
1055
|
+
}), fr = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
|
|
1056
|
+
t.pattern ?? (t.pattern = _n), _.init(e, t);
|
|
1057
|
+
}), lr = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
|
|
1058
1058
|
t.pattern ?? (t.pattern = yn), _.init(e, t), e._zod.bag.format = "ipv4";
|
|
1059
|
-
}),
|
|
1060
|
-
t.pattern ?? (t.pattern =
|
|
1059
|
+
}), dr = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
|
|
1060
|
+
t.pattern ?? (t.pattern = kn), _.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
1061
1061
|
try {
|
|
1062
1062
|
new URL(`http://[${n.value}]`);
|
|
1063
1063
|
} catch {
|
|
@@ -1070,10 +1070,10 @@ const Kn = {
|
|
|
1070
1070
|
});
|
|
1071
1071
|
}
|
|
1072
1072
|
};
|
|
1073
|
-
}),
|
|
1074
|
-
t.pattern ?? (t.pattern =
|
|
1075
|
-
}),
|
|
1076
|
-
t.pattern ?? (t.pattern =
|
|
1073
|
+
}), pr = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
|
|
1074
|
+
t.pattern ?? (t.pattern = $n), _.init(e, t);
|
|
1075
|
+
}), hr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
|
|
1076
|
+
t.pattern ?? (t.pattern = Zn), _.init(e, t), e._zod.check = (n) => {
|
|
1077
1077
|
const r = n.value.split("/");
|
|
1078
1078
|
try {
|
|
1079
1079
|
if (r.length !== 2)
|
|
@@ -1109,8 +1109,8 @@ function it(e) {
|
|
|
1109
1109
|
return !1;
|
|
1110
1110
|
}
|
|
1111
1111
|
}
|
|
1112
|
-
const
|
|
1113
|
-
t.pattern ?? (t.pattern =
|
|
1112
|
+
const mr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
|
|
1113
|
+
t.pattern ?? (t.pattern = Sn), _.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1114
1114
|
it(n.value) || n.issues.push({
|
|
1115
1115
|
code: "invalid_format",
|
|
1116
1116
|
format: "base64",
|
|
@@ -1120,15 +1120,15 @@ const hr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
|
|
|
1120
1120
|
});
|
|
1121
1121
|
};
|
|
1122
1122
|
});
|
|
1123
|
-
function
|
|
1123
|
+
function gr(e) {
|
|
1124
1124
|
if (!et.test(e))
|
|
1125
1125
|
return !1;
|
|
1126
1126
|
const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
1127
1127
|
return it(n);
|
|
1128
1128
|
}
|
|
1129
|
-
const
|
|
1129
|
+
const _r = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
|
|
1130
1130
|
t.pattern ?? (t.pattern = et), _.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1131
|
-
|
|
1131
|
+
gr(n.value) || n.issues.push({
|
|
1132
1132
|
code: "invalid_format",
|
|
1133
1133
|
format: "base64url",
|
|
1134
1134
|
input: n.value,
|
|
@@ -1136,10 +1136,10 @@ const gr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
|
|
|
1136
1136
|
continue: !t.abort
|
|
1137
1137
|
});
|
|
1138
1138
|
};
|
|
1139
|
-
}),
|
|
1140
|
-
t.pattern ?? (t.pattern =
|
|
1139
|
+
}), vr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
|
|
1140
|
+
t.pattern ?? (t.pattern = On), _.init(e, t);
|
|
1141
1141
|
});
|
|
1142
|
-
function
|
|
1142
|
+
function wr(e, t = null) {
|
|
1143
1143
|
try {
|
|
1144
1144
|
const n = e.split(".");
|
|
1145
1145
|
if (n.length !== 3)
|
|
@@ -1153,9 +1153,9 @@ function vr(e, t = null) {
|
|
|
1153
1153
|
return !1;
|
|
1154
1154
|
}
|
|
1155
1155
|
}
|
|
1156
|
-
const
|
|
1156
|
+
const br = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
1157
1157
|
_.init(e, t), e._zod.check = (n) => {
|
|
1158
|
-
|
|
1158
|
+
wr(n.value, t.alg) || n.issues.push({
|
|
1159
1159
|
code: "invalid_format",
|
|
1160
1160
|
format: "jwt",
|
|
1161
1161
|
input: n.value,
|
|
@@ -1164,7 +1164,7 @@ const wr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
|
1164
1164
|
});
|
|
1165
1165
|
};
|
|
1166
1166
|
}), ct = /* @__PURE__ */ u("$ZodNumber", (e, t) => {
|
|
1167
|
-
w.init(e, t), e._zod.pattern = e._zod.bag.pattern ??
|
|
1167
|
+
w.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? jn, e._zod.parse = (n, r) => {
|
|
1168
1168
|
if (t.coerce)
|
|
1169
1169
|
try {
|
|
1170
1170
|
n.value = Number(n.value);
|
|
@@ -1182,18 +1182,18 @@ const wr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
|
1182
1182
|
...i ? { received: i } : {}
|
|
1183
1183
|
}), n;
|
|
1184
1184
|
};
|
|
1185
|
-
}),
|
|
1186
|
-
|
|
1185
|
+
}), zr = /* @__PURE__ */ u("$ZodNumberFormat", (e, t) => {
|
|
1186
|
+
Rn.init(e, t), ct.init(e, t);
|
|
1187
1187
|
}), yr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
|
|
1188
1188
|
w.init(e, t), e._zod.parse = (n) => n;
|
|
1189
|
-
}),
|
|
1189
|
+
}), kr = /* @__PURE__ */ u("$ZodNever", (e, t) => {
|
|
1190
1190
|
w.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
|
|
1191
1191
|
expected: "never",
|
|
1192
1192
|
code: "invalid_type",
|
|
1193
1193
|
input: n.value,
|
|
1194
1194
|
inst: e
|
|
1195
1195
|
}), n);
|
|
1196
|
-
}),
|
|
1196
|
+
}), $r = /* @__PURE__ */ u("$ZodVoid", (e, t) => {
|
|
1197
1197
|
w.init(e, t), e._zod.parse = (n, r) => {
|
|
1198
1198
|
const o = n.value;
|
|
1199
1199
|
return typeof o > "u" || n.issues.push({
|
|
@@ -1204,10 +1204,10 @@ const wr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
|
|
|
1204
1204
|
}), n;
|
|
1205
1205
|
};
|
|
1206
1206
|
});
|
|
1207
|
-
function
|
|
1207
|
+
function ye(e, t, n) {
|
|
1208
1208
|
e.issues.length && t.issues.push(...Xe(n, e.issues)), t.value[n] = e.value;
|
|
1209
1209
|
}
|
|
1210
|
-
const
|
|
1210
|
+
const Zr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
|
|
1211
1211
|
w.init(e, t), e._zod.parse = (n, r) => {
|
|
1212
1212
|
const o = n.value;
|
|
1213
1213
|
if (!Array.isArray(o))
|
|
@@ -1224,7 +1224,7 @@ const $r = /* @__PURE__ */ u("$ZodArray", (e, t) => {
|
|
|
1224
1224
|
value: c,
|
|
1225
1225
|
issues: []
|
|
1226
1226
|
}, r);
|
|
1227
|
-
a instanceof Promise ? i.push(a.then((f) =>
|
|
1227
|
+
a instanceof Promise ? i.push(a.then((f) => ye(f, n, s))) : ye(a, n, s);
|
|
1228
1228
|
}
|
|
1229
1229
|
return i.length ? Promise.all(i).then(() => n) : n;
|
|
1230
1230
|
};
|
|
@@ -1242,7 +1242,7 @@ function ut(e) {
|
|
|
1242
1242
|
for (const r of t)
|
|
1243
1243
|
if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
|
|
1244
1244
|
throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
|
|
1245
|
-
const n =
|
|
1245
|
+
const n = Lt(e.shape);
|
|
1246
1246
|
return {
|
|
1247
1247
|
...e,
|
|
1248
1248
|
keys: t,
|
|
@@ -1270,7 +1270,7 @@ function at(e, t, n, r, o, i) {
|
|
|
1270
1270
|
inst: i
|
|
1271
1271
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1272
1272
|
}
|
|
1273
|
-
const
|
|
1273
|
+
const Sr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
1274
1274
|
if (w.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1275
1275
|
const c = t.shape;
|
|
1276
1276
|
Object.defineProperty(t, "shape", {
|
|
@@ -1310,27 +1310,27 @@ const Zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1310
1310
|
c.value = {};
|
|
1311
1311
|
const l = [], m = s.shape;
|
|
1312
1312
|
for (const p of s.keys) {
|
|
1313
|
-
const h = m[p], $ = h._zod.optout === "optional",
|
|
1314
|
-
|
|
1313
|
+
const h = m[p], $ = h._zod.optout === "optional", z = h._zod.run({ value: f[p], issues: [] }, a);
|
|
1314
|
+
z instanceof Promise ? l.push(z.then((W) => X(W, c, p, f, $))) : X(z, c, p, f, $);
|
|
1315
1315
|
}
|
|
1316
1316
|
return i ? at(l, f, c, a, r.value, e) : l.length ? Promise.all(l).then(() => c) : c;
|
|
1317
1317
|
};
|
|
1318
|
-
}),
|
|
1319
|
-
|
|
1318
|
+
}), Or = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
|
|
1319
|
+
Sr.init(e, t);
|
|
1320
1320
|
const n = e._zod.parse, r = fe(() => ut(t)), o = (p) => {
|
|
1321
|
-
const h = new
|
|
1321
|
+
const h = new Kn(["shape", "payload", "ctx"]), $ = r.value, z = (P) => {
|
|
1322
1322
|
const S = be(P);
|
|
1323
1323
|
return `shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`;
|
|
1324
1324
|
};
|
|
1325
1325
|
h.write("const input = payload.value;");
|
|
1326
1326
|
const W = /* @__PURE__ */ Object.create(null);
|
|
1327
|
-
let
|
|
1327
|
+
let Zt = 0;
|
|
1328
1328
|
for (const P of $.keys)
|
|
1329
|
-
W[P] = `key_${
|
|
1329
|
+
W[P] = `key_${Zt++}`;
|
|
1330
1330
|
h.write("const newResult = {};");
|
|
1331
1331
|
for (const P of $.keys) {
|
|
1332
|
-
const S = W[P], E = be(P),
|
|
1333
|
-
h.write(`const ${S} = ${
|
|
1332
|
+
const S = W[P], E = be(P), Ot = p[P]?._zod?.optout === "optional";
|
|
1333
|
+
h.write(`const ${S} = ${z(P)};`), Ot ? h.write(`
|
|
1334
1334
|
if (${S}.issues.length) {
|
|
1335
1335
|
if (${E} in input) {
|
|
1336
1336
|
payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
|
|
@@ -1367,11 +1367,11 @@ const Zr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
|
|
|
1367
1367
|
`);
|
|
1368
1368
|
}
|
|
1369
1369
|
h.write("payload.value = newResult;"), h.write("return payload;");
|
|
1370
|
-
const
|
|
1371
|
-
return (P, S) =>
|
|
1370
|
+
const St = h.compile();
|
|
1371
|
+
return (P, S) => St(p, P, S);
|
|
1372
1372
|
};
|
|
1373
1373
|
let i;
|
|
1374
|
-
const s = G, c = !Be.jitless, f = c &&
|
|
1374
|
+
const s = G, c = !Be.jitless, f = c && Jt.value, l = t.catchall;
|
|
1375
1375
|
let m;
|
|
1376
1376
|
e._zod.parse = (p, h) => {
|
|
1377
1377
|
m ?? (m = r.value);
|
|
@@ -1393,10 +1393,10 @@ function ke(e, t, n, r) {
|
|
|
1393
1393
|
code: "invalid_union",
|
|
1394
1394
|
input: t.value,
|
|
1395
1395
|
inst: n,
|
|
1396
|
-
errors: e.map((i) => i.issues.map((s) =>
|
|
1396
|
+
errors: e.map((i) => i.issues.map((s) => D(s, r, A())))
|
|
1397
1397
|
}), t);
|
|
1398
1398
|
}
|
|
1399
|
-
const
|
|
1399
|
+
const Ir = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
1400
1400
|
w.init(e, t), g(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), g(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), g(e._zod, "values", () => {
|
|
1401
1401
|
if (t.options.every((o) => o._zod.values))
|
|
1402
1402
|
return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
|
|
@@ -1427,7 +1427,7 @@ const Or = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
|
|
|
1427
1427
|
}
|
|
1428
1428
|
return s ? Promise.all(c).then((a) => ke(a, o, e, i)) : ke(c, o, e, i);
|
|
1429
1429
|
};
|
|
1430
|
-
}),
|
|
1430
|
+
}), Er = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
|
|
1431
1431
|
w.init(e, t), e._zod.parse = (n, r) => {
|
|
1432
1432
|
const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
|
|
1433
1433
|
return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([a, f]) => $e(n, a, f)) : $e(n, i, s);
|
|
@@ -1492,10 +1492,10 @@ function $e(e, t, n) {
|
|
|
1492
1492
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
|
|
1493
1493
|
return e.value = s.data, e;
|
|
1494
1494
|
}
|
|
1495
|
-
const
|
|
1495
|
+
const Pr = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
|
|
1496
1496
|
w.init(e, t);
|
|
1497
1497
|
const n = He(t.entries), r = new Set(n);
|
|
1498
|
-
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) =>
|
|
1498
|
+
e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => Mt.has(typeof o)).map((o) => typeof o == "string" ? Q(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
|
|
1499
1499
|
const s = o.value;
|
|
1500
1500
|
return r.has(s) || o.issues.push({
|
|
1501
1501
|
code: "invalid_value",
|
|
@@ -1504,7 +1504,7 @@ const Er = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
|
|
|
1504
1504
|
inst: e
|
|
1505
1505
|
}), o;
|
|
1506
1506
|
};
|
|
1507
|
-
}),
|
|
1507
|
+
}), Tr = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
|
|
1508
1508
|
w.init(e, t), e._zod.parse = (n, r) => {
|
|
1509
1509
|
if (r.direction === "backward")
|
|
1510
1510
|
throw new We(e.constructor.name);
|
|
@@ -1530,14 +1530,14 @@ const ft = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
return n.value === void 0 ? n : t.innerType._zod.run(n, r);
|
|
1532
1532
|
};
|
|
1533
|
-
}),
|
|
1533
|
+
}), Nr = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
|
|
1534
1534
|
ft.init(e, t), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
|
|
1535
|
-
}),
|
|
1535
|
+
}), jr = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
|
|
1536
1536
|
w.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "pattern", () => {
|
|
1537
1537
|
const n = t.innerType._zod.pattern;
|
|
1538
1538
|
return n ? new RegExp(`^(${de(n.source)}|null)$`) : void 0;
|
|
1539
1539
|
}), g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
|
|
1540
|
-
}),
|
|
1540
|
+
}), Ar = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
|
|
1541
1541
|
w.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
1542
1542
|
if (r.direction === "backward")
|
|
1543
1543
|
return t.innerType._zod.run(n, r);
|
|
@@ -1550,7 +1550,7 @@ const ft = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
|
|
|
1550
1550
|
function Se(e, t) {
|
|
1551
1551
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1552
1552
|
}
|
|
1553
|
-
const
|
|
1553
|
+
const Dr = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
|
|
1554
1554
|
w.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
|
|
1555
1555
|
}), xr = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
|
|
1556
1556
|
w.init(e, t), g(e._zod, "values", () => {
|
|
@@ -1569,7 +1569,7 @@ function Oe(e, t) {
|
|
|
1569
1569
|
inst: t
|
|
1570
1570
|
}), e;
|
|
1571
1571
|
}
|
|
1572
|
-
const
|
|
1572
|
+
const Rr = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
1573
1573
|
w.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
|
|
1574
1574
|
if (r.direction === "backward")
|
|
1575
1575
|
return t.innerType._zod.run(n, r);
|
|
@@ -1577,18 +1577,18 @@ const Dr = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
|
1577
1577
|
return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
|
|
1578
1578
|
...n,
|
|
1579
1579
|
error: {
|
|
1580
|
-
issues: i.issues.map((s) =>
|
|
1580
|
+
issues: i.issues.map((s) => D(s, r, A()))
|
|
1581
1581
|
},
|
|
1582
1582
|
input: n.value
|
|
1583
1583
|
}), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
|
|
1584
1584
|
...n,
|
|
1585
1585
|
error: {
|
|
1586
|
-
issues: o.issues.map((i) =>
|
|
1586
|
+
issues: o.issues.map((i) => D(i, r, A()))
|
|
1587
1587
|
},
|
|
1588
1588
|
input: n.value
|
|
1589
1589
|
}), n.issues = []), n);
|
|
1590
1590
|
};
|
|
1591
|
-
}),
|
|
1591
|
+
}), Cr = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
|
|
1592
1592
|
w.init(e, t), g(e._zod, "values", () => t.in._zod.values), g(e._zod, "optin", () => t.in._zod.optin), g(e._zod, "optout", () => t.out._zod.optout), g(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
|
|
1593
1593
|
if (r.direction === "backward") {
|
|
1594
1594
|
const i = t.out._zod.run(n, r);
|
|
@@ -1601,7 +1601,7 @@ const Dr = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
|
|
|
1601
1601
|
function H(e, t, n) {
|
|
1602
1602
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
|
|
1603
1603
|
}
|
|
1604
|
-
const
|
|
1604
|
+
const Ur = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
|
|
1605
1605
|
w.init(e, t), g(e._zod, "propValues", () => t.innerType._zod.propValues), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "optin", () => t.innerType?._zod?.optin), g(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
|
|
1606
1606
|
if (r.direction === "backward")
|
|
1607
1607
|
return t.innerType._zod.run(n, r);
|
|
@@ -1612,7 +1612,7 @@ const Cr = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
|
|
|
1612
1612
|
function Ie(e) {
|
|
1613
1613
|
return e.value = Object.freeze(e.value), e;
|
|
1614
1614
|
}
|
|
1615
|
-
const
|
|
1615
|
+
const Fr = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
|
|
1616
1616
|
O.init(e, t), w.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
|
|
1617
1617
|
const r = n.value, o = t.fn(r);
|
|
1618
1618
|
if (o instanceof Promise)
|
|
@@ -1636,7 +1636,7 @@ function Ee(e, t, n, r) {
|
|
|
1636
1636
|
}
|
|
1637
1637
|
}
|
|
1638
1638
|
var Pe;
|
|
1639
|
-
class
|
|
1639
|
+
class Jr {
|
|
1640
1640
|
constructor() {
|
|
1641
1641
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
1642
1642
|
}
|
|
@@ -1665,20 +1665,20 @@ class Fr {
|
|
|
1665
1665
|
return this._map.has(t);
|
|
1666
1666
|
}
|
|
1667
1667
|
}
|
|
1668
|
-
function
|
|
1669
|
-
return new
|
|
1668
|
+
function Mr() {
|
|
1669
|
+
return new Jr();
|
|
1670
1670
|
}
|
|
1671
|
-
(Pe = globalThis).__zod_globalRegistry ?? (Pe.__zod_globalRegistry =
|
|
1671
|
+
(Pe = globalThis).__zod_globalRegistry ?? (Pe.__zod_globalRegistry = Mr());
|
|
1672
1672
|
const M = globalThis.__zod_globalRegistry;
|
|
1673
1673
|
// @__NO_SIDE_EFFECTS__
|
|
1674
|
-
function
|
|
1674
|
+
function Lr(e, t) {
|
|
1675
1675
|
return new e({
|
|
1676
1676
|
type: "string",
|
|
1677
1677
|
...d(t)
|
|
1678
1678
|
});
|
|
1679
1679
|
}
|
|
1680
1680
|
// @__NO_SIDE_EFFECTS__
|
|
1681
|
-
function
|
|
1681
|
+
function Vr(e, t) {
|
|
1682
1682
|
return new e({
|
|
1683
1683
|
type: "string",
|
|
1684
1684
|
format: "email",
|
|
@@ -1698,7 +1698,7 @@ function Te(e, t) {
|
|
|
1698
1698
|
});
|
|
1699
1699
|
}
|
|
1700
1700
|
// @__NO_SIDE_EFFECTS__
|
|
1701
|
-
function
|
|
1701
|
+
function Wr(e, t) {
|
|
1702
1702
|
return new e({
|
|
1703
1703
|
type: "string",
|
|
1704
1704
|
format: "uuid",
|
|
@@ -1708,7 +1708,7 @@ function Vr(e, t) {
|
|
|
1708
1708
|
});
|
|
1709
1709
|
}
|
|
1710
1710
|
// @__NO_SIDE_EFFECTS__
|
|
1711
|
-
function
|
|
1711
|
+
function Br(e, t) {
|
|
1712
1712
|
return new e({
|
|
1713
1713
|
type: "string",
|
|
1714
1714
|
format: "uuid",
|
|
@@ -1719,7 +1719,7 @@ function Wr(e, t) {
|
|
|
1719
1719
|
});
|
|
1720
1720
|
}
|
|
1721
1721
|
// @__NO_SIDE_EFFECTS__
|
|
1722
|
-
function
|
|
1722
|
+
function Hr(e, t) {
|
|
1723
1723
|
return new e({
|
|
1724
1724
|
type: "string",
|
|
1725
1725
|
format: "uuid",
|
|
@@ -1730,7 +1730,7 @@ function Br(e, t) {
|
|
|
1730
1730
|
});
|
|
1731
1731
|
}
|
|
1732
1732
|
// @__NO_SIDE_EFFECTS__
|
|
1733
|
-
function
|
|
1733
|
+
function Kr(e, t) {
|
|
1734
1734
|
return new e({
|
|
1735
1735
|
type: "string",
|
|
1736
1736
|
format: "uuid",
|
|
@@ -1741,7 +1741,7 @@ function Hr(e, t) {
|
|
|
1741
1741
|
});
|
|
1742
1742
|
}
|
|
1743
1743
|
// @__NO_SIDE_EFFECTS__
|
|
1744
|
-
function
|
|
1744
|
+
function Gr(e, t) {
|
|
1745
1745
|
return new e({
|
|
1746
1746
|
type: "string",
|
|
1747
1747
|
format: "url",
|
|
@@ -1751,7 +1751,7 @@ function Kr(e, t) {
|
|
|
1751
1751
|
});
|
|
1752
1752
|
}
|
|
1753
1753
|
// @__NO_SIDE_EFFECTS__
|
|
1754
|
-
function
|
|
1754
|
+
function Xr(e, t) {
|
|
1755
1755
|
return new e({
|
|
1756
1756
|
type: "string",
|
|
1757
1757
|
format: "emoji",
|
|
@@ -1761,7 +1761,7 @@ function Gr(e, t) {
|
|
|
1761
1761
|
});
|
|
1762
1762
|
}
|
|
1763
1763
|
// @__NO_SIDE_EFFECTS__
|
|
1764
|
-
function
|
|
1764
|
+
function Yr(e, t) {
|
|
1765
1765
|
return new e({
|
|
1766
1766
|
type: "string",
|
|
1767
1767
|
format: "nanoid",
|
|
@@ -1771,7 +1771,7 @@ function Xr(e, t) {
|
|
|
1771
1771
|
});
|
|
1772
1772
|
}
|
|
1773
1773
|
// @__NO_SIDE_EFFECTS__
|
|
1774
|
-
function
|
|
1774
|
+
function qr(e, t) {
|
|
1775
1775
|
return new e({
|
|
1776
1776
|
type: "string",
|
|
1777
1777
|
format: "cuid",
|
|
@@ -1781,7 +1781,7 @@ function Yr(e, t) {
|
|
|
1781
1781
|
});
|
|
1782
1782
|
}
|
|
1783
1783
|
// @__NO_SIDE_EFFECTS__
|
|
1784
|
-
function
|
|
1784
|
+
function Qr(e, t) {
|
|
1785
1785
|
return new e({
|
|
1786
1786
|
type: "string",
|
|
1787
1787
|
format: "cuid2",
|
|
@@ -1791,7 +1791,7 @@ function qr(e, t) {
|
|
|
1791
1791
|
});
|
|
1792
1792
|
}
|
|
1793
1793
|
// @__NO_SIDE_EFFECTS__
|
|
1794
|
-
function
|
|
1794
|
+
function eo(e, t) {
|
|
1795
1795
|
return new e({
|
|
1796
1796
|
type: "string",
|
|
1797
1797
|
format: "ulid",
|
|
@@ -1801,7 +1801,7 @@ function Qr(e, t) {
|
|
|
1801
1801
|
});
|
|
1802
1802
|
}
|
|
1803
1803
|
// @__NO_SIDE_EFFECTS__
|
|
1804
|
-
function
|
|
1804
|
+
function to(e, t) {
|
|
1805
1805
|
return new e({
|
|
1806
1806
|
type: "string",
|
|
1807
1807
|
format: "xid",
|
|
@@ -1811,7 +1811,7 @@ function eo(e, t) {
|
|
|
1811
1811
|
});
|
|
1812
1812
|
}
|
|
1813
1813
|
// @__NO_SIDE_EFFECTS__
|
|
1814
|
-
function
|
|
1814
|
+
function no(e, t) {
|
|
1815
1815
|
return new e({
|
|
1816
1816
|
type: "string",
|
|
1817
1817
|
format: "ksuid",
|
|
@@ -1821,7 +1821,7 @@ function to(e, t) {
|
|
|
1821
1821
|
});
|
|
1822
1822
|
}
|
|
1823
1823
|
// @__NO_SIDE_EFFECTS__
|
|
1824
|
-
function
|
|
1824
|
+
function ro(e, t) {
|
|
1825
1825
|
return new e({
|
|
1826
1826
|
type: "string",
|
|
1827
1827
|
format: "ipv4",
|
|
@@ -1831,7 +1831,7 @@ function no(e, t) {
|
|
|
1831
1831
|
});
|
|
1832
1832
|
}
|
|
1833
1833
|
// @__NO_SIDE_EFFECTS__
|
|
1834
|
-
function
|
|
1834
|
+
function oo(e, t) {
|
|
1835
1835
|
return new e({
|
|
1836
1836
|
type: "string",
|
|
1837
1837
|
format: "ipv6",
|
|
@@ -1841,7 +1841,7 @@ function ro(e, t) {
|
|
|
1841
1841
|
});
|
|
1842
1842
|
}
|
|
1843
1843
|
// @__NO_SIDE_EFFECTS__
|
|
1844
|
-
function
|
|
1844
|
+
function so(e, t) {
|
|
1845
1845
|
return new e({
|
|
1846
1846
|
type: "string",
|
|
1847
1847
|
format: "cidrv4",
|
|
@@ -1851,7 +1851,7 @@ function oo(e, t) {
|
|
|
1851
1851
|
});
|
|
1852
1852
|
}
|
|
1853
1853
|
// @__NO_SIDE_EFFECTS__
|
|
1854
|
-
function
|
|
1854
|
+
function io(e, t) {
|
|
1855
1855
|
return new e({
|
|
1856
1856
|
type: "string",
|
|
1857
1857
|
format: "cidrv6",
|
|
@@ -1861,7 +1861,7 @@ function so(e, t) {
|
|
|
1861
1861
|
});
|
|
1862
1862
|
}
|
|
1863
1863
|
// @__NO_SIDE_EFFECTS__
|
|
1864
|
-
function
|
|
1864
|
+
function co(e, t) {
|
|
1865
1865
|
return new e({
|
|
1866
1866
|
type: "string",
|
|
1867
1867
|
format: "base64",
|
|
@@ -1871,7 +1871,7 @@ function io(e, t) {
|
|
|
1871
1871
|
});
|
|
1872
1872
|
}
|
|
1873
1873
|
// @__NO_SIDE_EFFECTS__
|
|
1874
|
-
function
|
|
1874
|
+
function uo(e, t) {
|
|
1875
1875
|
return new e({
|
|
1876
1876
|
type: "string",
|
|
1877
1877
|
format: "base64url",
|
|
@@ -1881,7 +1881,7 @@ function co(e, t) {
|
|
|
1881
1881
|
});
|
|
1882
1882
|
}
|
|
1883
1883
|
// @__NO_SIDE_EFFECTS__
|
|
1884
|
-
function
|
|
1884
|
+
function ao(e, t) {
|
|
1885
1885
|
return new e({
|
|
1886
1886
|
type: "string",
|
|
1887
1887
|
format: "e164",
|
|
@@ -1891,7 +1891,7 @@ function uo(e, t) {
|
|
|
1891
1891
|
});
|
|
1892
1892
|
}
|
|
1893
1893
|
// @__NO_SIDE_EFFECTS__
|
|
1894
|
-
function
|
|
1894
|
+
function fo(e, t) {
|
|
1895
1895
|
return new e({
|
|
1896
1896
|
type: "string",
|
|
1897
1897
|
format: "jwt",
|
|
@@ -1901,7 +1901,7 @@ function ao(e, t) {
|
|
|
1901
1901
|
});
|
|
1902
1902
|
}
|
|
1903
1903
|
// @__NO_SIDE_EFFECTS__
|
|
1904
|
-
function
|
|
1904
|
+
function lo(e, t) {
|
|
1905
1905
|
return new e({
|
|
1906
1906
|
type: "string",
|
|
1907
1907
|
format: "datetime",
|
|
@@ -1913,7 +1913,7 @@ function fo(e, t) {
|
|
|
1913
1913
|
});
|
|
1914
1914
|
}
|
|
1915
1915
|
// @__NO_SIDE_EFFECTS__
|
|
1916
|
-
function
|
|
1916
|
+
function po(e, t) {
|
|
1917
1917
|
return new e({
|
|
1918
1918
|
type: "string",
|
|
1919
1919
|
format: "date",
|
|
@@ -1922,7 +1922,7 @@ function lo(e, t) {
|
|
|
1922
1922
|
});
|
|
1923
1923
|
}
|
|
1924
1924
|
// @__NO_SIDE_EFFECTS__
|
|
1925
|
-
function
|
|
1925
|
+
function ho(e, t) {
|
|
1926
1926
|
return new e({
|
|
1927
1927
|
type: "string",
|
|
1928
1928
|
format: "time",
|
|
@@ -1932,7 +1932,7 @@ function po(e, t) {
|
|
|
1932
1932
|
});
|
|
1933
1933
|
}
|
|
1934
1934
|
// @__NO_SIDE_EFFECTS__
|
|
1935
|
-
function
|
|
1935
|
+
function mo(e, t) {
|
|
1936
1936
|
return new e({
|
|
1937
1937
|
type: "string",
|
|
1938
1938
|
format: "duration",
|
|
@@ -1941,7 +1941,7 @@ function ho(e, t) {
|
|
|
1941
1941
|
});
|
|
1942
1942
|
}
|
|
1943
1943
|
// @__NO_SIDE_EFFECTS__
|
|
1944
|
-
function
|
|
1944
|
+
function go(e, t) {
|
|
1945
1945
|
return new e({
|
|
1946
1946
|
type: "number",
|
|
1947
1947
|
checks: [],
|
|
@@ -1949,7 +1949,7 @@ function mo(e, t) {
|
|
|
1949
1949
|
});
|
|
1950
1950
|
}
|
|
1951
1951
|
// @__NO_SIDE_EFFECTS__
|
|
1952
|
-
function
|
|
1952
|
+
function _o(e, t) {
|
|
1953
1953
|
return new e({
|
|
1954
1954
|
type: "number",
|
|
1955
1955
|
check: "number_format",
|
|
@@ -1959,20 +1959,20 @@ function go(e, t) {
|
|
|
1959
1959
|
});
|
|
1960
1960
|
}
|
|
1961
1961
|
// @__NO_SIDE_EFFECTS__
|
|
1962
|
-
function
|
|
1962
|
+
function vo(e) {
|
|
1963
1963
|
return new e({
|
|
1964
1964
|
type: "unknown"
|
|
1965
1965
|
});
|
|
1966
1966
|
}
|
|
1967
1967
|
// @__NO_SIDE_EFFECTS__
|
|
1968
|
-
function
|
|
1968
|
+
function wo(e, t) {
|
|
1969
1969
|
return new e({
|
|
1970
1970
|
type: "never",
|
|
1971
1971
|
...d(t)
|
|
1972
1972
|
});
|
|
1973
1973
|
}
|
|
1974
1974
|
// @__NO_SIDE_EFFECTS__
|
|
1975
|
-
function
|
|
1975
|
+
function bo(e, t) {
|
|
1976
1976
|
return new e({
|
|
1977
1977
|
type: "void",
|
|
1978
1978
|
...d(t)
|
|
@@ -2024,7 +2024,7 @@ function Ae(e, t) {
|
|
|
2024
2024
|
}
|
|
2025
2025
|
// @__NO_SIDE_EFFECTS__
|
|
2026
2026
|
function lt(e, t) {
|
|
2027
|
-
return new
|
|
2027
|
+
return new Cn({
|
|
2028
2028
|
check: "max_length",
|
|
2029
2029
|
...d(t),
|
|
2030
2030
|
maximum: e
|
|
@@ -2032,7 +2032,7 @@ function lt(e, t) {
|
|
|
2032
2032
|
}
|
|
2033
2033
|
// @__NO_SIDE_EFFECTS__
|
|
2034
2034
|
function Y(e, t) {
|
|
2035
|
-
return new
|
|
2035
|
+
return new Un({
|
|
2036
2036
|
check: "min_length",
|
|
2037
2037
|
...d(t),
|
|
2038
2038
|
minimum: e
|
|
@@ -2040,15 +2040,15 @@ function Y(e, t) {
|
|
|
2040
2040
|
}
|
|
2041
2041
|
// @__NO_SIDE_EFFECTS__
|
|
2042
2042
|
function dt(e, t) {
|
|
2043
|
-
return new
|
|
2043
|
+
return new Fn({
|
|
2044
2044
|
check: "length_equals",
|
|
2045
2045
|
...d(t),
|
|
2046
2046
|
length: e
|
|
2047
2047
|
});
|
|
2048
2048
|
}
|
|
2049
2049
|
// @__NO_SIDE_EFFECTS__
|
|
2050
|
-
function
|
|
2051
|
-
return new
|
|
2050
|
+
function zo(e, t) {
|
|
2051
|
+
return new Jn({
|
|
2052
2052
|
check: "string_format",
|
|
2053
2053
|
format: "regex",
|
|
2054
2054
|
...d(t),
|
|
@@ -2057,23 +2057,23 @@ function bo(e, t) {
|
|
|
2057
2057
|
}
|
|
2058
2058
|
// @__NO_SIDE_EFFECTS__
|
|
2059
2059
|
function yo(e) {
|
|
2060
|
-
return new
|
|
2060
|
+
return new Mn({
|
|
2061
2061
|
check: "string_format",
|
|
2062
2062
|
format: "lowercase",
|
|
2063
2063
|
...d(e)
|
|
2064
2064
|
});
|
|
2065
2065
|
}
|
|
2066
2066
|
// @__NO_SIDE_EFFECTS__
|
|
2067
|
-
function
|
|
2068
|
-
return new
|
|
2067
|
+
function ko(e) {
|
|
2068
|
+
return new Ln({
|
|
2069
2069
|
check: "string_format",
|
|
2070
2070
|
format: "uppercase",
|
|
2071
2071
|
...d(e)
|
|
2072
2072
|
});
|
|
2073
2073
|
}
|
|
2074
2074
|
// @__NO_SIDE_EFFECTS__
|
|
2075
|
-
function
|
|
2076
|
-
return new
|
|
2075
|
+
function $o(e, t) {
|
|
2076
|
+
return new Vn({
|
|
2077
2077
|
check: "string_format",
|
|
2078
2078
|
format: "includes",
|
|
2079
2079
|
...d(t),
|
|
@@ -2081,8 +2081,8 @@ function ko(e, t) {
|
|
|
2081
2081
|
});
|
|
2082
2082
|
}
|
|
2083
2083
|
// @__NO_SIDE_EFFECTS__
|
|
2084
|
-
function
|
|
2085
|
-
return new
|
|
2084
|
+
function Zo(e, t) {
|
|
2085
|
+
return new Wn({
|
|
2086
2086
|
check: "string_format",
|
|
2087
2087
|
format: "starts_with",
|
|
2088
2088
|
...d(t),
|
|
@@ -2090,8 +2090,8 @@ function $o(e, t) {
|
|
|
2090
2090
|
});
|
|
2091
2091
|
}
|
|
2092
2092
|
// @__NO_SIDE_EFFECTS__
|
|
2093
|
-
function
|
|
2094
|
-
return new
|
|
2093
|
+
function So(e, t) {
|
|
2094
|
+
return new Bn({
|
|
2095
2095
|
check: "string_format",
|
|
2096
2096
|
format: "ends_with",
|
|
2097
2097
|
...d(t),
|
|
@@ -2100,33 +2100,33 @@ function Zo(e, t) {
|
|
|
2100
2100
|
}
|
|
2101
2101
|
// @__NO_SIDE_EFFECTS__
|
|
2102
2102
|
function F(e) {
|
|
2103
|
-
return new
|
|
2103
|
+
return new Hn({
|
|
2104
2104
|
check: "overwrite",
|
|
2105
2105
|
tx: e
|
|
2106
2106
|
});
|
|
2107
2107
|
}
|
|
2108
2108
|
// @__NO_SIDE_EFFECTS__
|
|
2109
|
-
function
|
|
2109
|
+
function Oo(e) {
|
|
2110
2110
|
return /* @__PURE__ */ F((t) => t.normalize(e));
|
|
2111
2111
|
}
|
|
2112
2112
|
// @__NO_SIDE_EFFECTS__
|
|
2113
|
-
function
|
|
2113
|
+
function Io() {
|
|
2114
2114
|
return /* @__PURE__ */ F((e) => e.trim());
|
|
2115
2115
|
}
|
|
2116
2116
|
// @__NO_SIDE_EFFECTS__
|
|
2117
|
-
function
|
|
2117
|
+
function Eo() {
|
|
2118
2118
|
return /* @__PURE__ */ F((e) => e.toLowerCase());
|
|
2119
2119
|
}
|
|
2120
2120
|
// @__NO_SIDE_EFFECTS__
|
|
2121
|
-
function
|
|
2121
|
+
function Po() {
|
|
2122
2122
|
return /* @__PURE__ */ F((e) => e.toUpperCase());
|
|
2123
2123
|
}
|
|
2124
2124
|
// @__NO_SIDE_EFFECTS__
|
|
2125
|
-
function
|
|
2126
|
-
return /* @__PURE__ */ F((e) =>
|
|
2125
|
+
function To() {
|
|
2126
|
+
return /* @__PURE__ */ F((e) => Ft(e));
|
|
2127
2127
|
}
|
|
2128
2128
|
// @__NO_SIDE_EFFECTS__
|
|
2129
|
-
function
|
|
2129
|
+
function No(e, t, n) {
|
|
2130
2130
|
return new e({
|
|
2131
2131
|
type: "array",
|
|
2132
2132
|
element: t,
|
|
@@ -2137,7 +2137,7 @@ function To(e, t, n) {
|
|
|
2137
2137
|
});
|
|
2138
2138
|
}
|
|
2139
2139
|
// @__NO_SIDE_EFFECTS__
|
|
2140
|
-
function
|
|
2140
|
+
function jo(e, t, n) {
|
|
2141
2141
|
return new e({
|
|
2142
2142
|
type: "custom",
|
|
2143
2143
|
check: "custom",
|
|
@@ -2146,8 +2146,8 @@ function No(e, t, n) {
|
|
|
2146
2146
|
});
|
|
2147
2147
|
}
|
|
2148
2148
|
// @__NO_SIDE_EFFECTS__
|
|
2149
|
-
function
|
|
2150
|
-
const t = /* @__PURE__ */
|
|
2149
|
+
function Ao(e) {
|
|
2150
|
+
const t = /* @__PURE__ */ Do((n) => (n.addIssue = (r) => {
|
|
2151
2151
|
if (typeof r == "string")
|
|
2152
2152
|
n.issues.push(V(r, n.value, t._zod.def));
|
|
2153
2153
|
else {
|
|
@@ -2158,7 +2158,7 @@ function jo(e) {
|
|
|
2158
2158
|
return t;
|
|
2159
2159
|
}
|
|
2160
2160
|
// @__NO_SIDE_EFFECTS__
|
|
2161
|
-
function
|
|
2161
|
+
function Do(e, t) {
|
|
2162
2162
|
const n = new O({
|
|
2163
2163
|
check: "custom",
|
|
2164
2164
|
...d(t)
|
|
@@ -2297,11 +2297,11 @@ function mt(e, t) {
|
|
|
2297
2297
|
r(l);
|
|
2298
2298
|
const p = e.seen.get(l), h = p.schema;
|
|
2299
2299
|
if (h.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (a.allOf = a.allOf ?? [], a.allOf.push(h)) : Object.assign(a, h), Object.assign(a, f), s._zod.parent === l)
|
|
2300
|
-
for (const
|
|
2301
|
-
|
|
2300
|
+
for (const z in a)
|
|
2301
|
+
z === "$ref" || z === "allOf" || z in f || delete a[z];
|
|
2302
2302
|
if (h.$ref && p.def)
|
|
2303
|
-
for (const
|
|
2304
|
-
|
|
2303
|
+
for (const z in a)
|
|
2304
|
+
z === "$ref" || z === "allOf" || z in p.def && JSON.stringify(a[z]) === JSON.stringify(p.def[z]) && delete a[z];
|
|
2305
2305
|
}
|
|
2306
2306
|
const m = s._zod.parent;
|
|
2307
2307
|
if (m && m !== l) {
|
|
@@ -2398,18 +2398,18 @@ const xo = (e, t = {}) => (n) => {
|
|
|
2398
2398
|
}, q = (e, t, n = {}) => (r) => {
|
|
2399
2399
|
const { libraryOptions: o, target: i } = r ?? {}, s = pt({ ...o ?? {}, target: i, io: t, processors: n });
|
|
2400
2400
|
return k(e, s), ht(s, e), mt(s, e);
|
|
2401
|
-
},
|
|
2401
|
+
}, Ro = {
|
|
2402
2402
|
guid: "uuid",
|
|
2403
2403
|
url: "uri",
|
|
2404
2404
|
datetime: "date-time",
|
|
2405
2405
|
json_string: "json-string",
|
|
2406
2406
|
regex: ""
|
|
2407
2407
|
// do not set
|
|
2408
|
-
},
|
|
2408
|
+
}, Co = (e, t, n, r) => {
|
|
2409
2409
|
const o = n;
|
|
2410
2410
|
o.type = "string";
|
|
2411
2411
|
const { minimum: i, maximum: s, format: c, patterns: a, contentEncoding: f } = e._zod.bag;
|
|
2412
|
-
if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), c && (o.format =
|
|
2412
|
+
if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), c && (o.format = Ro[c] ?? c, o.format === "" && delete o.format, c === "time" && delete o.format), f && (o.contentEncoding = f), a && a.size > 0) {
|
|
2413
2413
|
const l = [...a];
|
|
2414
2414
|
l.length === 1 ? o.pattern = l[0].source : l.length > 1 && (o.allOf = [
|
|
2415
2415
|
...l.map((m) => ({
|
|
@@ -2418,28 +2418,28 @@ const xo = (e, t = {}) => (n) => {
|
|
|
2418
2418
|
}))
|
|
2419
2419
|
]);
|
|
2420
2420
|
}
|
|
2421
|
-
},
|
|
2421
|
+
}, Uo = (e, t, n, r) => {
|
|
2422
2422
|
const o = n, { minimum: i, maximum: s, format: c, multipleOf: a, exclusiveMaximum: f, exclusiveMinimum: l } = e._zod.bag;
|
|
2423
2423
|
typeof c == "string" && c.includes("int") ? o.type = "integer" : o.type = "number", typeof l == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = l, o.exclusiveMinimum = !0) : o.exclusiveMinimum = l), typeof i == "number" && (o.minimum = i, typeof l == "number" && t.target !== "draft-04" && (l >= i ? delete o.minimum : delete o.exclusiveMinimum)), typeof f == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = f, o.exclusiveMaximum = !0) : o.exclusiveMaximum = f), typeof s == "number" && (o.maximum = s, typeof f == "number" && t.target !== "draft-04" && (f <= s ? delete o.maximum : delete o.exclusiveMaximum)), typeof a == "number" && (o.multipleOf = a);
|
|
2424
|
-
},
|
|
2424
|
+
}, Fo = (e, t, n, r) => {
|
|
2425
2425
|
if (t.unrepresentable === "throw")
|
|
2426
2426
|
throw new Error("Void cannot be represented in JSON Schema");
|
|
2427
|
-
}, Fo = (e, t, n, r) => {
|
|
2428
|
-
n.not = {};
|
|
2429
2427
|
}, Jo = (e, t, n, r) => {
|
|
2428
|
+
n.not = {};
|
|
2430
2429
|
}, Mo = (e, t, n, r) => {
|
|
2430
|
+
}, Lo = (e, t, n, r) => {
|
|
2431
2431
|
const o = e._zod.def, i = He(o.entries);
|
|
2432
2432
|
i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
|
|
2433
|
-
},
|
|
2433
|
+
}, Vo = (e, t, n, r) => {
|
|
2434
2434
|
if (t.unrepresentable === "throw")
|
|
2435
2435
|
throw new Error("Custom types cannot be represented in JSON Schema");
|
|
2436
|
-
},
|
|
2436
|
+
}, Wo = (e, t, n, r) => {
|
|
2437
2437
|
if (t.unrepresentable === "throw")
|
|
2438
2438
|
throw new Error("Transforms cannot be represented in JSON Schema");
|
|
2439
|
-
},
|
|
2439
|
+
}, Bo = (e, t, n, r) => {
|
|
2440
2440
|
const o = n, i = e._zod.def, { minimum: s, maximum: c } = e._zod.bag;
|
|
2441
2441
|
typeof s == "number" && (o.minItems = s), typeof c == "number" && (o.maxItems = c), o.type = "array", o.items = k(i.element, t, { ...r, path: [...r.path, "items"] });
|
|
2442
|
-
},
|
|
2442
|
+
}, Ho = (e, t, n, r) => {
|
|
2443
2443
|
const o = n, i = e._zod.def;
|
|
2444
2444
|
o.type = "object", o.properties = {};
|
|
2445
2445
|
const s = i.shape;
|
|
@@ -2456,13 +2456,13 @@ const xo = (e, t = {}) => (n) => {
|
|
|
2456
2456
|
...r,
|
|
2457
2457
|
path: [...r.path, "additionalProperties"]
|
|
2458
2458
|
})) : t.io === "output" && (o.additionalProperties = !1);
|
|
2459
|
-
},
|
|
2459
|
+
}, Ko = (e, t, n, r) => {
|
|
2460
2460
|
const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((c, a) => k(c, t, {
|
|
2461
2461
|
...r,
|
|
2462
2462
|
path: [...r.path, i ? "oneOf" : "anyOf", a]
|
|
2463
2463
|
}));
|
|
2464
2464
|
i ? n.oneOf = s : n.anyOf = s;
|
|
2465
|
-
},
|
|
2465
|
+
}, Go = (e, t, n, r) => {
|
|
2466
2466
|
const o = e._zod.def, i = k(o.left, t, {
|
|
2467
2467
|
...r,
|
|
2468
2468
|
path: [...r.path, "allOf", 0]
|
|
@@ -2474,25 +2474,25 @@ const xo = (e, t = {}) => (n) => {
|
|
|
2474
2474
|
...c(s) ? s.allOf : [s]
|
|
2475
2475
|
];
|
|
2476
2476
|
n.allOf = a;
|
|
2477
|
-
},
|
|
2477
|
+
}, Xo = (e, t, n, r) => {
|
|
2478
2478
|
const o = e._zod.def, i = k(o.innerType, t, r), s = t.seen.get(e);
|
|
2479
2479
|
t.target === "openapi-3.0" ? (s.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
|
|
2480
|
-
},
|
|
2480
|
+
}, Yo = (e, t, n, r) => {
|
|
2481
2481
|
const o = e._zod.def;
|
|
2482
2482
|
k(o.innerType, t, r);
|
|
2483
2483
|
const i = t.seen.get(e);
|
|
2484
2484
|
i.ref = o.innerType;
|
|
2485
|
-
},
|
|
2485
|
+
}, qo = (e, t, n, r) => {
|
|
2486
2486
|
const o = e._zod.def;
|
|
2487
2487
|
k(o.innerType, t, r);
|
|
2488
2488
|
const i = t.seen.get(e);
|
|
2489
2489
|
i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
|
|
2490
|
-
},
|
|
2490
|
+
}, Qo = (e, t, n, r) => {
|
|
2491
2491
|
const o = e._zod.def;
|
|
2492
2492
|
k(o.innerType, t, r);
|
|
2493
2493
|
const i = t.seen.get(e);
|
|
2494
2494
|
i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
|
|
2495
|
-
},
|
|
2495
|
+
}, es = (e, t, n, r) => {
|
|
2496
2496
|
const o = e._zod.def;
|
|
2497
2497
|
k(o.innerType, t, r);
|
|
2498
2498
|
const i = t.seen.get(e);
|
|
@@ -2504,12 +2504,12 @@ const xo = (e, t = {}) => (n) => {
|
|
|
2504
2504
|
throw new Error("Dynamic catch values are not supported in JSON Schema");
|
|
2505
2505
|
}
|
|
2506
2506
|
n.default = s;
|
|
2507
|
-
},
|
|
2507
|
+
}, ts = (e, t, n, r) => {
|
|
2508
2508
|
const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
|
|
2509
2509
|
k(i, t, r);
|
|
2510
2510
|
const s = t.seen.get(e);
|
|
2511
2511
|
s.ref = i;
|
|
2512
|
-
},
|
|
2512
|
+
}, ns = (e, t, n, r) => {
|
|
2513
2513
|
const o = e._zod.def;
|
|
2514
2514
|
k(o.innerType, t, r);
|
|
2515
2515
|
const i = t.seen.get(e);
|
|
@@ -2519,38 +2519,38 @@ const xo = (e, t = {}) => (n) => {
|
|
|
2519
2519
|
k(o.innerType, t, r);
|
|
2520
2520
|
const i = t.seen.get(e);
|
|
2521
2521
|
i.ref = o.innerType;
|
|
2522
|
-
},
|
|
2523
|
-
ir.init(e, t), v.init(e, t);
|
|
2524
|
-
});
|
|
2525
|
-
function rs(e) {
|
|
2526
|
-
return /* @__PURE__ */ fo(ns, e);
|
|
2527
|
-
}
|
|
2528
|
-
const os = /* @__PURE__ */ u("ZodISODate", (e, t) => {
|
|
2522
|
+
}, rs = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
|
|
2529
2523
|
cr.init(e, t), v.init(e, t);
|
|
2530
2524
|
});
|
|
2531
|
-
function
|
|
2532
|
-
return /* @__PURE__ */ lo(
|
|
2525
|
+
function os(e) {
|
|
2526
|
+
return /* @__PURE__ */ lo(rs, e);
|
|
2533
2527
|
}
|
|
2534
|
-
const
|
|
2528
|
+
const ss = /* @__PURE__ */ u("ZodISODate", (e, t) => {
|
|
2535
2529
|
ur.init(e, t), v.init(e, t);
|
|
2536
2530
|
});
|
|
2537
|
-
function
|
|
2538
|
-
return /* @__PURE__ */ po(
|
|
2531
|
+
function is(e) {
|
|
2532
|
+
return /* @__PURE__ */ po(ss, e);
|
|
2539
2533
|
}
|
|
2540
|
-
const
|
|
2534
|
+
const cs = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
|
|
2541
2535
|
ar.init(e, t), v.init(e, t);
|
|
2542
2536
|
});
|
|
2543
|
-
function
|
|
2544
|
-
return /* @__PURE__ */ ho(
|
|
2537
|
+
function us(e) {
|
|
2538
|
+
return /* @__PURE__ */ ho(cs, e);
|
|
2539
|
+
}
|
|
2540
|
+
const as = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
|
|
2541
|
+
fr.init(e, t), v.init(e, t);
|
|
2542
|
+
});
|
|
2543
|
+
function fs(e) {
|
|
2544
|
+
return /* @__PURE__ */ mo(as, e);
|
|
2545
2545
|
}
|
|
2546
|
-
const
|
|
2546
|
+
const ls = (e, t) => {
|
|
2547
2547
|
qe.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2548
2548
|
format: {
|
|
2549
|
-
value: (n) =>
|
|
2549
|
+
value: (n) => Qt(e, n)
|
|
2550
2550
|
// enumerable: false,
|
|
2551
2551
|
},
|
|
2552
2552
|
flatten: {
|
|
2553
|
-
value: (n) =>
|
|
2553
|
+
value: (n) => qt(e, n)
|
|
2554
2554
|
// enumerable: false,
|
|
2555
2555
|
},
|
|
2556
2556
|
addIssue: {
|
|
@@ -2572,9 +2572,9 @@ const fs = (e, t) => {
|
|
|
2572
2572
|
// enumerable: false,
|
|
2573
2573
|
}
|
|
2574
2574
|
});
|
|
2575
|
-
}, I = u("ZodError",
|
|
2575
|
+
}, I = u("ZodError", ls, {
|
|
2576
2576
|
Parent: Error
|
|
2577
|
-
}),
|
|
2577
|
+
}), ds = /* @__PURE__ */ he(I), ps = /* @__PURE__ */ me(I), hs = /* @__PURE__ */ ee(I), ms = /* @__PURE__ */ te(I), gs = /* @__PURE__ */ nn(I), _s = /* @__PURE__ */ rn(I), vs = /* @__PURE__ */ on(I), ws = /* @__PURE__ */ sn(I), bs = /* @__PURE__ */ cn(I), zs = /* @__PURE__ */ un(I), ys = /* @__PURE__ */ an(I), ks = /* @__PURE__ */ fn(I), b = /* @__PURE__ */ u("ZodType", (e, t) => (w.init(e, t), Object.assign(e["~standard"], {
|
|
2578
2578
|
jsonSchema: {
|
|
2579
2579
|
input: q(e, "input"),
|
|
2580
2580
|
output: q(e, "output")
|
|
@@ -2586,7 +2586,7 @@ const fs = (e, t) => {
|
|
|
2586
2586
|
]
|
|
2587
2587
|
}), {
|
|
2588
2588
|
parent: !0
|
|
2589
|
-
}), e.with = e.check, e.clone = (n, r) => j(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) =>
|
|
2589
|
+
}), e.with = e.check, e.clone = (n, r) => j(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => ds(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => hs(e, n, r), e.parseAsync = async (n, r) => ps(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => ms(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => gs(e, n, r), e.decode = (n, r) => _s(e, n, r), e.encodeAsync = async (n, r) => vs(e, n, r), e.decodeAsync = async (n, r) => ws(e, n, r), e.safeEncode = (n, r) => bs(e, n, r), e.safeDecode = (n, r) => zs(e, n, r), e.safeEncodeAsync = async (n, r) => ys(e, n, r), e.safeDecodeAsync = async (n, r) => ks(e, n, r), e.refine = (n, r) => e.check(gi(n, r)), e.superRefine = (n) => e.check(_i(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ F(n)), e.optional = () => Ce(e), e.exactOptional = () => ri(e), e.nullable = () => Ue(e), e.nullish = () => Ce(Ue(e)), e.nonoptional = (n) => ai(e, n), e.array = () => bt(e), e.or = (n) => yt([e, n]), e.and = (n) => qs(e, n), e.transform = (n) => Fe(e, ti(n)), e.default = (n) => ii(e, n), e.prefault = (n) => ui(e, n), e.catch = (n) => li(e, n), e.pipe = (n) => Fe(e, n), e.readonly = () => hi(e), e.describe = (n) => {
|
|
2590
2590
|
const r = e.clone();
|
|
2591
2591
|
return M.add(r, { description: n }), r;
|
|
2592
2592
|
}, Object.defineProperty(e, "description", {
|
|
@@ -2600,97 +2600,97 @@ const fs = (e, t) => {
|
|
|
2600
2600
|
const r = e.clone();
|
|
2601
2601
|
return M.add(r, n[0]), r;
|
|
2602
2602
|
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), _t = /* @__PURE__ */ u("_ZodString", (e, t) => {
|
|
2603
|
-
ge.init(e, t), b.init(e, t), e._zod.processJSONSchema = (r, o, i) =>
|
|
2603
|
+
ge.init(e, t), b.init(e, t), e._zod.processJSONSchema = (r, o, i) => Co(e, r, o);
|
|
2604
2604
|
const n = e._zod.bag;
|
|
2605
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */
|
|
2606
|
-
}),
|
|
2607
|
-
ge.init(e, t), _t.init(e, t), e.email = (n) => e.check(/* @__PURE__ */
|
|
2605
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ zo(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ $o(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Zo(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ So(...r)), e.min = (...r) => e.check(/* @__PURE__ */ Y(...r)), e.max = (...r) => e.check(/* @__PURE__ */ lt(...r)), e.length = (...r) => e.check(/* @__PURE__ */ dt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ Y(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ yo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ ko(r)), e.trim = () => e.check(/* @__PURE__ */ Io()), e.normalize = (...r) => e.check(/* @__PURE__ */ Oo(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Eo()), e.toUpperCase = () => e.check(/* @__PURE__ */ Po()), e.slugify = () => e.check(/* @__PURE__ */ To());
|
|
2606
|
+
}), $s = /* @__PURE__ */ u("ZodString", (e, t) => {
|
|
2607
|
+
ge.init(e, t), _t.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Vr(Zs, n)), e.url = (n) => e.check(/* @__PURE__ */ Gr(Ss, n)), e.jwt = (n) => e.check(/* @__PURE__ */ fo(Js, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Xr(Os, n)), e.guid = (n) => e.check(/* @__PURE__ */ Te(De, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Wr(K, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Br(K, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Hr(K, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Kr(K, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Yr(Is, n)), e.guid = (n) => e.check(/* @__PURE__ */ Te(De, n)), e.cuid = (n) => e.check(/* @__PURE__ */ qr(Es, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Qr(Ps, n)), e.ulid = (n) => e.check(/* @__PURE__ */ eo(Ts, n)), e.base64 = (n) => e.check(/* @__PURE__ */ co(Cs, n)), e.base64url = (n) => e.check(/* @__PURE__ */ uo(Us, n)), e.xid = (n) => e.check(/* @__PURE__ */ to(Ns, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ no(js, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ ro(As, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ oo(Ds, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ so(xs, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ io(Rs, n)), e.e164 = (n) => e.check(/* @__PURE__ */ ao(Fs, n)), e.datetime = (n) => e.check(os(n)), e.date = (n) => e.check(is(n)), e.time = (n) => e.check(us(n)), e.duration = (n) => e.check(fs(n));
|
|
2608
2608
|
});
|
|
2609
|
-
function
|
|
2610
|
-
return /* @__PURE__ */
|
|
2609
|
+
function vt(e) {
|
|
2610
|
+
return /* @__PURE__ */ Lr($s, e);
|
|
2611
2611
|
}
|
|
2612
2612
|
const v = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
|
|
2613
2613
|
_.init(e, t), _t.init(e, t);
|
|
2614
2614
|
}), Zs = /* @__PURE__ */ u("ZodEmail", (e, t) => {
|
|
2615
|
-
|
|
2616
|
-
}),
|
|
2617
|
-
Gn.init(e, t), v.init(e, t);
|
|
2618
|
-
}), K = /* @__PURE__ */ u("ZodUUID", (e, t) => {
|
|
2615
|
+
qn.init(e, t), v.init(e, t);
|
|
2616
|
+
}), De = /* @__PURE__ */ u("ZodGUID", (e, t) => {
|
|
2619
2617
|
Xn.init(e, t), v.init(e, t);
|
|
2618
|
+
}), K = /* @__PURE__ */ u("ZodUUID", (e, t) => {
|
|
2619
|
+
Yn.init(e, t), v.init(e, t);
|
|
2620
2620
|
}), Ss = /* @__PURE__ */ u("ZodURL", (e, t) => {
|
|
2621
|
-
qn.init(e, t), v.init(e, t);
|
|
2622
|
-
}), Os = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
|
|
2623
2621
|
Qn.init(e, t), v.init(e, t);
|
|
2624
|
-
}),
|
|
2622
|
+
}), Os = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
|
|
2625
2623
|
er.init(e, t), v.init(e, t);
|
|
2626
|
-
}),
|
|
2624
|
+
}), Is = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
|
|
2627
2625
|
tr.init(e, t), v.init(e, t);
|
|
2628
|
-
}),
|
|
2626
|
+
}), Es = /* @__PURE__ */ u("ZodCUID", (e, t) => {
|
|
2629
2627
|
nr.init(e, t), v.init(e, t);
|
|
2630
|
-
}),
|
|
2628
|
+
}), Ps = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
|
|
2631
2629
|
rr.init(e, t), v.init(e, t);
|
|
2632
|
-
}),
|
|
2630
|
+
}), Ts = /* @__PURE__ */ u("ZodULID", (e, t) => {
|
|
2633
2631
|
or.init(e, t), v.init(e, t);
|
|
2634
|
-
}),
|
|
2632
|
+
}), Ns = /* @__PURE__ */ u("ZodXID", (e, t) => {
|
|
2635
2633
|
sr.init(e, t), v.init(e, t);
|
|
2634
|
+
}), js = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
|
|
2635
|
+
ir.init(e, t), v.init(e, t);
|
|
2636
2636
|
}), As = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
|
|
2637
|
-
fr.init(e, t), v.init(e, t);
|
|
2638
|
-
}), xs = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
|
|
2639
2637
|
lr.init(e, t), v.init(e, t);
|
|
2640
|
-
}), Ds = /* @__PURE__ */ u("
|
|
2638
|
+
}), Ds = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
|
|
2641
2639
|
dr.init(e, t), v.init(e, t);
|
|
2642
|
-
}),
|
|
2640
|
+
}), xs = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
|
|
2643
2641
|
pr.init(e, t), v.init(e, t);
|
|
2644
|
-
}),
|
|
2642
|
+
}), Rs = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
|
|
2645
2643
|
hr.init(e, t), v.init(e, t);
|
|
2644
|
+
}), Cs = /* @__PURE__ */ u("ZodBase64", (e, t) => {
|
|
2645
|
+
mr.init(e, t), v.init(e, t);
|
|
2646
2646
|
}), Us = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
|
|
2647
|
-
gr.init(e, t), v.init(e, t);
|
|
2648
|
-
}), Fs = /* @__PURE__ */ u("ZodE164", (e, t) => {
|
|
2649
2647
|
_r.init(e, t), v.init(e, t);
|
|
2648
|
+
}), Fs = /* @__PURE__ */ u("ZodE164", (e, t) => {
|
|
2649
|
+
vr.init(e, t), v.init(e, t);
|
|
2650
2650
|
}), Js = /* @__PURE__ */ u("ZodJWT", (e, t) => {
|
|
2651
|
-
|
|
2652
|
-
}),
|
|
2653
|
-
ct.init(e, t), b.init(e, t), e._zod.processJSONSchema = (r, o, i) =>
|
|
2651
|
+
br.init(e, t), v.init(e, t);
|
|
2652
|
+
}), wt = /* @__PURE__ */ u("ZodNumber", (e, t) => {
|
|
2653
|
+
ct.init(e, t), b.init(e, t), e._zod.processJSONSchema = (r, o, i) => Uo(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ je(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ se(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ se(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ Ne(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ oe(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ oe(r, o)), e.int = (r) => e.check(xe(r)), e.safe = (r) => e.check(xe(r)), e.positive = (r) => e.check(/* @__PURE__ */ je(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ se(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ Ne(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ oe(0, r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ Ae(r, o)), e.step = (r, o) => e.check(/* @__PURE__ */ Ae(r, o)), e.finite = () => e;
|
|
2654
2654
|
const n = e._zod.bag;
|
|
2655
2655
|
e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
|
|
2656
2656
|
});
|
|
2657
2657
|
function R(e) {
|
|
2658
|
-
return /* @__PURE__ */
|
|
2658
|
+
return /* @__PURE__ */ go(wt, e);
|
|
2659
2659
|
}
|
|
2660
2660
|
const Ms = /* @__PURE__ */ u("ZodNumberFormat", (e, t) => {
|
|
2661
|
-
|
|
2661
|
+
zr.init(e, t), wt.init(e, t);
|
|
2662
2662
|
});
|
|
2663
|
-
function
|
|
2664
|
-
return /* @__PURE__ */
|
|
2663
|
+
function xe(e) {
|
|
2664
|
+
return /* @__PURE__ */ _o(Ms, e);
|
|
2665
2665
|
}
|
|
2666
2666
|
const Ls = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
|
|
2667
|
-
yr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) =>
|
|
2667
|
+
yr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mo();
|
|
2668
2668
|
});
|
|
2669
2669
|
function Re() {
|
|
2670
|
-
return /* @__PURE__ */
|
|
2670
|
+
return /* @__PURE__ */ vo(Ls);
|
|
2671
2671
|
}
|
|
2672
2672
|
const Vs = /* @__PURE__ */ u("ZodNever", (e, t) => {
|
|
2673
|
-
|
|
2673
|
+
kr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Jo(e, n, r);
|
|
2674
2674
|
});
|
|
2675
2675
|
function Ws(e) {
|
|
2676
|
-
return /* @__PURE__ */
|
|
2676
|
+
return /* @__PURE__ */ wo(Vs, e);
|
|
2677
2677
|
}
|
|
2678
2678
|
const Bs = /* @__PURE__ */ u("ZodVoid", (e, t) => {
|
|
2679
|
-
|
|
2679
|
+
$r.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Fo(e, n);
|
|
2680
2680
|
});
|
|
2681
2681
|
function Hs(e) {
|
|
2682
|
-
return /* @__PURE__ */
|
|
2682
|
+
return /* @__PURE__ */ bo(Bs, e);
|
|
2683
2683
|
}
|
|
2684
2684
|
const Ks = /* @__PURE__ */ u("ZodArray", (e, t) => {
|
|
2685
|
-
|
|
2685
|
+
Zr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Bo(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ Y(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ Y(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ lt(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ dt(n, r)), e.unwrap = () => e.element;
|
|
2686
2686
|
});
|
|
2687
|
-
function
|
|
2688
|
-
return /* @__PURE__ */
|
|
2687
|
+
function bt(e, t) {
|
|
2688
|
+
return /* @__PURE__ */ No(Ks, e, t);
|
|
2689
2689
|
}
|
|
2690
2690
|
const Gs = /* @__PURE__ */ u("ZodObject", (e, t) => {
|
|
2691
|
-
|
|
2691
|
+
Or.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ho(e, n, r, o), g(e, "shape", () => t.shape), e.keyof = () => Qs(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Re() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Re() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Ws() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Ht(e, n), e.safeExtend = (n) => Kt(e, n), e.merge = (n) => Gt(e, n), e.pick = (n) => Wt(e, n), e.omit = (n) => Bt(e, n), e.partial = (...n) => Xt(kt, e, n[0]), e.required = (...n) => Yt($t, e, n[0]);
|
|
2692
2692
|
});
|
|
2693
|
-
function
|
|
2693
|
+
function zt(e, t) {
|
|
2694
2694
|
const n = {
|
|
2695
2695
|
type: "object",
|
|
2696
2696
|
shape: e ?? {},
|
|
@@ -2699,7 +2699,7 @@ function bt(e, t) {
|
|
|
2699
2699
|
return new Gs(n);
|
|
2700
2700
|
}
|
|
2701
2701
|
const Xs = /* @__PURE__ */ u("ZodUnion", (e, t) => {
|
|
2702
|
-
|
|
2702
|
+
Ir.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ko(e, n, r, o), e.options = t.options;
|
|
2703
2703
|
});
|
|
2704
2704
|
function yt(e, t) {
|
|
2705
2705
|
return new Xs({
|
|
@@ -2709,7 +2709,7 @@ function yt(e, t) {
|
|
|
2709
2709
|
});
|
|
2710
2710
|
}
|
|
2711
2711
|
const Ys = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
|
|
2712
|
-
|
|
2712
|
+
Er.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Go(e, n, r, o);
|
|
2713
2713
|
});
|
|
2714
2714
|
function qs(e, t) {
|
|
2715
2715
|
return new Ys({
|
|
@@ -2719,7 +2719,7 @@ function qs(e, t) {
|
|
|
2719
2719
|
});
|
|
2720
2720
|
}
|
|
2721
2721
|
const ue = /* @__PURE__ */ u("ZodEnum", (e, t) => {
|
|
2722
|
-
|
|
2722
|
+
Pr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (r, o, i) => Lo(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
2723
2723
|
const n = new Set(Object.keys(t.entries));
|
|
2724
2724
|
e.extract = (r, o) => {
|
|
2725
2725
|
const i = {};
|
|
@@ -2758,7 +2758,7 @@ function Qs(e, t) {
|
|
|
2758
2758
|
});
|
|
2759
2759
|
}
|
|
2760
2760
|
const ei = /* @__PURE__ */ u("ZodTransform", (e, t) => {
|
|
2761
|
-
|
|
2761
|
+
Tr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Wo(e, n), e._zod.parse = (n, r) => {
|
|
2762
2762
|
if (r.direction === "backward")
|
|
2763
2763
|
throw new We(e.constructor.name);
|
|
2764
2764
|
n.addIssue = (i) => {
|
|
@@ -2779,17 +2779,17 @@ function ti(e) {
|
|
|
2779
2779
|
transform: e
|
|
2780
2780
|
});
|
|
2781
2781
|
}
|
|
2782
|
-
const
|
|
2782
|
+
const kt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
|
|
2783
2783
|
ft.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => gt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2784
2784
|
});
|
|
2785
2785
|
function Ce(e) {
|
|
2786
|
-
return new
|
|
2786
|
+
return new kt({
|
|
2787
2787
|
type: "optional",
|
|
2788
2788
|
innerType: e
|
|
2789
2789
|
});
|
|
2790
2790
|
}
|
|
2791
2791
|
const ni = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
|
|
2792
|
-
|
|
2792
|
+
Nr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => gt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2793
2793
|
});
|
|
2794
2794
|
function ri(e) {
|
|
2795
2795
|
return new ni({
|
|
@@ -2798,7 +2798,7 @@ function ri(e) {
|
|
|
2798
2798
|
});
|
|
2799
2799
|
}
|
|
2800
2800
|
const oi = /* @__PURE__ */ u("ZodNullable", (e, t) => {
|
|
2801
|
-
|
|
2801
|
+
jr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Xo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2802
2802
|
});
|
|
2803
2803
|
function Ue(e) {
|
|
2804
2804
|
return new oi({
|
|
@@ -2807,7 +2807,7 @@ function Ue(e) {
|
|
|
2807
2807
|
});
|
|
2808
2808
|
}
|
|
2809
2809
|
const si = /* @__PURE__ */ u("ZodDefault", (e, t) => {
|
|
2810
|
-
|
|
2810
|
+
Ar.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => qo(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
2811
2811
|
});
|
|
2812
2812
|
function ii(e, t) {
|
|
2813
2813
|
return new si({
|
|
@@ -2819,7 +2819,7 @@ function ii(e, t) {
|
|
|
2819
2819
|
});
|
|
2820
2820
|
}
|
|
2821
2821
|
const ci = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
|
|
2822
|
-
|
|
2822
|
+
Dr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Qo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2823
2823
|
});
|
|
2824
2824
|
function ui(e, t) {
|
|
2825
2825
|
return new ci({
|
|
@@ -2830,18 +2830,18 @@ function ui(e, t) {
|
|
|
2830
2830
|
}
|
|
2831
2831
|
});
|
|
2832
2832
|
}
|
|
2833
|
-
const
|
|
2834
|
-
xr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) =>
|
|
2833
|
+
const $t = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
|
|
2834
|
+
xr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Yo(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2835
2835
|
});
|
|
2836
2836
|
function ai(e, t) {
|
|
2837
|
-
return new
|
|
2837
|
+
return new $t({
|
|
2838
2838
|
type: "nonoptional",
|
|
2839
2839
|
innerType: e,
|
|
2840
2840
|
...d(t)
|
|
2841
2841
|
});
|
|
2842
2842
|
}
|
|
2843
2843
|
const fi = /* @__PURE__ */ u("ZodCatch", (e, t) => {
|
|
2844
|
-
|
|
2844
|
+
Rr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => es(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
2845
2845
|
});
|
|
2846
2846
|
function li(e, t) {
|
|
2847
2847
|
return new fi({
|
|
@@ -2851,7 +2851,7 @@ function li(e, t) {
|
|
|
2851
2851
|
});
|
|
2852
2852
|
}
|
|
2853
2853
|
const di = /* @__PURE__ */ u("ZodPipe", (e, t) => {
|
|
2854
|
-
|
|
2854
|
+
Cr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => ts(e, n, r, o), e.in = t.in, e.out = t.out;
|
|
2855
2855
|
});
|
|
2856
2856
|
function Fe(e, t) {
|
|
2857
2857
|
return new di({
|
|
@@ -2862,7 +2862,7 @@ function Fe(e, t) {
|
|
|
2862
2862
|
});
|
|
2863
2863
|
}
|
|
2864
2864
|
const pi = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
|
|
2865
|
-
|
|
2865
|
+
Ur.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => ns(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
|
|
2866
2866
|
});
|
|
2867
2867
|
function hi(e) {
|
|
2868
2868
|
return new pi({
|
|
@@ -2871,23 +2871,23 @@ function hi(e) {
|
|
|
2871
2871
|
});
|
|
2872
2872
|
}
|
|
2873
2873
|
const mi = /* @__PURE__ */ u("ZodCustom", (e, t) => {
|
|
2874
|
-
|
|
2874
|
+
Fr.init(e, t), b.init(e, t), e._zod.processJSONSchema = (n, r, o) => Vo(e, n);
|
|
2875
2875
|
});
|
|
2876
2876
|
function gi(e, t = {}) {
|
|
2877
|
-
return /* @__PURE__ */
|
|
2877
|
+
return /* @__PURE__ */ jo(mi, e, t);
|
|
2878
2878
|
}
|
|
2879
2879
|
function _i(e) {
|
|
2880
|
-
return /* @__PURE__ */
|
|
2880
|
+
return /* @__PURE__ */ Ao(e);
|
|
2881
2881
|
}
|
|
2882
|
-
const
|
|
2882
|
+
const Ii = (e) => zt({
|
|
2883
2883
|
pages: R(),
|
|
2884
2884
|
nextPage: R().optional(),
|
|
2885
2885
|
totalElements: R(),
|
|
2886
2886
|
currentPage: R(),
|
|
2887
2887
|
pageSize: R(),
|
|
2888
|
-
elements:
|
|
2888
|
+
elements: bt(e)
|
|
2889
2889
|
});
|
|
2890
|
-
function
|
|
2890
|
+
function Ei() {
|
|
2891
2891
|
return {
|
|
2892
2892
|
pages: 0,
|
|
2893
2893
|
nextPage: void 0,
|
|
@@ -2897,7 +2897,7 @@ function Ii() {
|
|
|
2897
2897
|
elements: []
|
|
2898
2898
|
};
|
|
2899
2899
|
}
|
|
2900
|
-
const Je = yt([R(),
|
|
2900
|
+
const Je = yt([R(), vt()]).optional().transform((e) => e === void 0 || e === "" ? void 0 : Number(e)).refine((e) => e === void 0 || !Number.isNaN(e), { message: "Must be a valid number" }), Pi = zt({
|
|
2901
2901
|
page: Je,
|
|
2902
2902
|
pageSize: Je
|
|
2903
2903
|
});
|
|
@@ -2916,7 +2916,7 @@ class Le extends ae {
|
|
|
2916
2916
|
super();
|
|
2917
2917
|
}
|
|
2918
2918
|
}
|
|
2919
|
-
class
|
|
2919
|
+
class Ti {
|
|
2920
2920
|
constructor(t) {
|
|
2921
2921
|
this.baseUrl = t;
|
|
2922
2922
|
}
|
|
@@ -2983,27 +2983,34 @@ class Pi {
|
|
|
2983
2983
|
return new Headers(t).forEach((o, i) => n.set(i, o)), n;
|
|
2984
2984
|
}
|
|
2985
2985
|
}
|
|
2986
|
-
const
|
|
2986
|
+
const Ni = Hs(), wi = /^(?!-)[A-Za-z0-9-]+([-.]{1}[a-z0-9]+)*\.[A-Za-z]{2,63}$/i;
|
|
2987
|
+
function ji(e) {
|
|
2988
|
+
const t = e?.message ?? "Please enter a valid domain";
|
|
2989
|
+
return vt().min(3, { message: t }).max(253).refine((n) => wi.test(n), {
|
|
2990
|
+
message: t
|
|
2991
|
+
});
|
|
2992
|
+
}
|
|
2987
2993
|
export {
|
|
2988
|
-
|
|
2989
|
-
|
|
2994
|
+
Ei as EmptyPage,
|
|
2995
|
+
Ni as EmptyResponse,
|
|
2990
2996
|
T as Fail,
|
|
2991
2997
|
ae as Failure,
|
|
2992
2998
|
J as Guid,
|
|
2993
|
-
|
|
2999
|
+
Ti as HttpSafeClient,
|
|
2994
3000
|
vi as NetworkConflictFailure,
|
|
2995
3001
|
Me as NetworkFailure,
|
|
2996
3002
|
Le as NotFoundFailure,
|
|
2997
3003
|
_e as Ok,
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
Oi as
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3004
|
+
Pi as PageQuery,
|
|
3005
|
+
ji as SafeDomain,
|
|
3006
|
+
Oi as convertDateInfoToDateRange,
|
|
3007
|
+
Ii as createPageSchema,
|
|
3008
|
+
It as formatDate,
|
|
3009
|
+
Si as formatDateTime,
|
|
3010
|
+
Et as formatTime,
|
|
3011
|
+
ki as isFailure,
|
|
3012
|
+
zi as mock,
|
|
3006
3013
|
yi as notFailure,
|
|
3007
|
-
|
|
3008
|
-
|
|
3014
|
+
$i as parseConfig,
|
|
3015
|
+
Zi as sleep
|
|
3009
3016
|
};
|