mlform 0.1.6 → 0.1.7
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/{engine-tP-QTA_5.js → engine-CEy1IX7y.js} +318 -318
- package/dist/{kit-fHGskli5.js → kit-DrrbtxI2.js} +2 -2
- package/dist/mlform/engine.mjs +1 -1
- package/dist/mlform/kit.mjs +1 -1
- package/dist/mlform/primitives.mjs +1 -1
- package/dist/mlform/questionnaire.mjs +2 -2
- package/dist/mlform.mjs +2 -2
- package/dist/{primitives-BtI1xyZz.js → primitives-BqjFDDhL.js} +1 -1
- package/package.json +1 -1
|
@@ -187,9 +187,9 @@ var r = class extends e {
|
|
|
187
187
|
listExplanations() {
|
|
188
188
|
return Array.from(this.explanationDefinitions.values());
|
|
189
189
|
}
|
|
190
|
-
}, S = () => new x(),
|
|
190
|
+
}, S = () => new x(), te = (e) => e, C = (e) => e, ne = (e) => e;
|
|
191
191
|
Object.freeze({ status: "aborted" });
|
|
192
|
-
function
|
|
192
|
+
function w(e, t, n) {
|
|
193
193
|
function r(n, r) {
|
|
194
194
|
if (n._zod || Object.defineProperty(n, "_zod", {
|
|
195
195
|
value: {
|
|
@@ -218,11 +218,11 @@ function T(e, t, n) {
|
|
|
218
218
|
}
|
|
219
219
|
return Object.defineProperty(o, "init", { value: r }), Object.defineProperty(o, Symbol.hasInstance, { value: (t) => n?.Parent && t instanceof n.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(o, "name", { value: e }), o;
|
|
220
220
|
}
|
|
221
|
-
var
|
|
221
|
+
var T = class extends Error {
|
|
222
222
|
constructor() {
|
|
223
223
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
224
224
|
}
|
|
225
|
-
},
|
|
225
|
+
}, E = class extends Error {
|
|
226
226
|
constructor(e) {
|
|
227
227
|
super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
|
|
228
228
|
}
|
|
@@ -285,22 +285,22 @@ function de(e, t, n) {
|
|
|
285
285
|
configurable: !0
|
|
286
286
|
});
|
|
287
287
|
}
|
|
288
|
-
function
|
|
288
|
+
function k(...e) {
|
|
289
289
|
let t = {};
|
|
290
290
|
for (let n of e) Object.assign(t, Object.getOwnPropertyDescriptors(n));
|
|
291
291
|
return Object.defineProperties({}, t);
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function fe(e) {
|
|
294
294
|
return JSON.stringify(e);
|
|
295
295
|
}
|
|
296
|
-
function
|
|
296
|
+
function pe(e) {
|
|
297
297
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
298
298
|
}
|
|
299
|
-
var
|
|
300
|
-
function
|
|
299
|
+
var me = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
|
|
300
|
+
function he(e) {
|
|
301
301
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
302
302
|
}
|
|
303
|
-
var
|
|
303
|
+
var ge = oe(() => {
|
|
304
304
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
|
|
305
305
|
try {
|
|
306
306
|
return Function(""), !0;
|
|
@@ -308,29 +308,29 @@ var _e = oe(() => {
|
|
|
308
308
|
return !1;
|
|
309
309
|
}
|
|
310
310
|
});
|
|
311
|
-
function
|
|
312
|
-
if (
|
|
311
|
+
function _e(e) {
|
|
312
|
+
if (he(e) === !1) return !1;
|
|
313
313
|
let t = e.constructor;
|
|
314
314
|
if (t === void 0 || typeof t != "function") return !0;
|
|
315
315
|
let n = t.prototype;
|
|
316
|
-
return !(
|
|
316
|
+
return !(he(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
return
|
|
318
|
+
function ve(e) {
|
|
319
|
+
return _e(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
320
320
|
}
|
|
321
|
-
var
|
|
321
|
+
var ye = new Set([
|
|
322
322
|
"string",
|
|
323
323
|
"number",
|
|
324
324
|
"symbol"
|
|
325
325
|
]);
|
|
326
|
-
function
|
|
326
|
+
function be(e) {
|
|
327
327
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
328
328
|
}
|
|
329
|
-
function
|
|
329
|
+
function A(e, t, n) {
|
|
330
330
|
let r = new e._zod.constr(t ?? e._zod.def);
|
|
331
331
|
return (!t || n?.parent) && (r._zod.parent = e), r;
|
|
332
332
|
}
|
|
333
|
-
function
|
|
333
|
+
function j(e) {
|
|
334
334
|
let t = e;
|
|
335
335
|
if (!t) return {};
|
|
336
336
|
if (typeof t == "string") return { error: () => t };
|
|
@@ -343,20 +343,20 @@ function A(e) {
|
|
|
343
343
|
error: () => t.error
|
|
344
344
|
} : t;
|
|
345
345
|
}
|
|
346
|
-
function
|
|
346
|
+
function xe(e) {
|
|
347
347
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
348
348
|
}
|
|
349
|
-
var
|
|
349
|
+
var Se = {
|
|
350
350
|
safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
|
|
351
351
|
int32: [-2147483648, 2147483647],
|
|
352
352
|
uint32: [0, 4294967295],
|
|
353
353
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
354
354
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
355
355
|
};
|
|
356
|
-
function
|
|
356
|
+
function Ce(e, t) {
|
|
357
357
|
let n = e._zod.def, r = n.checks;
|
|
358
358
|
if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
|
|
359
|
-
return
|
|
359
|
+
return A(e, k(e._zod.def, {
|
|
360
360
|
get shape() {
|
|
361
361
|
let e = {};
|
|
362
362
|
for (let r in t) {
|
|
@@ -368,10 +368,10 @@ function we(e, t) {
|
|
|
368
368
|
checks: []
|
|
369
369
|
}));
|
|
370
370
|
}
|
|
371
|
-
function
|
|
371
|
+
function we(e, t) {
|
|
372
372
|
let n = e._zod.def, r = n.checks;
|
|
373
373
|
if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
|
|
374
|
-
return
|
|
374
|
+
return A(e, k(e._zod.def, {
|
|
375
375
|
get shape() {
|
|
376
376
|
let r = { ...e._zod.def.shape };
|
|
377
377
|
for (let e in t) {
|
|
@@ -383,14 +383,14 @@ function Te(e, t) {
|
|
|
383
383
|
checks: []
|
|
384
384
|
}));
|
|
385
385
|
}
|
|
386
|
-
function
|
|
387
|
-
if (!
|
|
386
|
+
function Te(e, t) {
|
|
387
|
+
if (!_e(t)) throw Error("Invalid input to extend: expected a plain object");
|
|
388
388
|
let n = e._zod.def.checks;
|
|
389
389
|
if (n && n.length > 0) {
|
|
390
390
|
let n = e._zod.def.shape;
|
|
391
391
|
for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
|
|
392
392
|
}
|
|
393
|
-
return
|
|
393
|
+
return A(e, k(e._zod.def, { get shape() {
|
|
394
394
|
let n = {
|
|
395
395
|
...e._zod.def.shape,
|
|
396
396
|
...t
|
|
@@ -398,9 +398,9 @@ function Ee(e, t) {
|
|
|
398
398
|
return de(this, "shape", n), n;
|
|
399
399
|
} }));
|
|
400
400
|
}
|
|
401
|
-
function
|
|
402
|
-
if (!
|
|
403
|
-
return
|
|
401
|
+
function Ee(e, t) {
|
|
402
|
+
if (!_e(t)) throw Error("Invalid input to safeExtend: expected a plain object");
|
|
403
|
+
return A(e, k(e._zod.def, { get shape() {
|
|
404
404
|
let n = {
|
|
405
405
|
...e._zod.def.shape,
|
|
406
406
|
...t
|
|
@@ -408,8 +408,8 @@ function De(e, t) {
|
|
|
408
408
|
return de(this, "shape", n), n;
|
|
409
409
|
} }));
|
|
410
410
|
}
|
|
411
|
-
function
|
|
412
|
-
return
|
|
411
|
+
function De(e, t) {
|
|
412
|
+
return A(e, k(e._zod.def, {
|
|
413
413
|
get shape() {
|
|
414
414
|
let n = {
|
|
415
415
|
...e._zod.def.shape,
|
|
@@ -423,10 +423,10 @@ function Oe(e, t) {
|
|
|
423
423
|
checks: []
|
|
424
424
|
}));
|
|
425
425
|
}
|
|
426
|
-
function
|
|
426
|
+
function Oe(e, t, n) {
|
|
427
427
|
let r = t._zod.def.checks;
|
|
428
428
|
if (r && r.length > 0) throw Error(".partial() cannot be used on object schemas containing refinements");
|
|
429
|
-
return
|
|
429
|
+
return A(t, k(t._zod.def, {
|
|
430
430
|
get shape() {
|
|
431
431
|
let r = t._zod.def.shape, i = { ...r };
|
|
432
432
|
if (n) for (let t in n) {
|
|
@@ -445,8 +445,8 @@ function ke(e, t, n) {
|
|
|
445
445
|
checks: []
|
|
446
446
|
}));
|
|
447
447
|
}
|
|
448
|
-
function
|
|
449
|
-
return
|
|
448
|
+
function ke(e, t, n) {
|
|
449
|
+
return A(t, k(t._zod.def, { get shape() {
|
|
450
450
|
let r = t._zod.def.shape, i = { ...r };
|
|
451
451
|
if (n) for (let t in n) {
|
|
452
452
|
if (!(t in i)) throw Error(`Unrecognized key: "${t}"`);
|
|
@@ -462,26 +462,26 @@ function Ae(e, t, n) {
|
|
|
462
462
|
return de(this, "shape", i), i;
|
|
463
463
|
} }));
|
|
464
464
|
}
|
|
465
|
-
function
|
|
465
|
+
function Ae(e, t = 0) {
|
|
466
466
|
if (e.aborted === !0) return !0;
|
|
467
467
|
for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
|
|
468
468
|
return !1;
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function je(e, t) {
|
|
471
471
|
return t.map((t) => {
|
|
472
472
|
var n;
|
|
473
473
|
return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
|
-
function
|
|
476
|
+
function Me(e) {
|
|
477
477
|
return typeof e == "string" ? e : e?.message;
|
|
478
478
|
}
|
|
479
|
-
function
|
|
479
|
+
function Ne(e, t, n) {
|
|
480
480
|
let r = {
|
|
481
481
|
...e,
|
|
482
482
|
path: e.path ?? []
|
|
483
483
|
};
|
|
484
|
-
return e.message || (r.message =
|
|
484
|
+
return e.message || (r.message = Me(e.inst?._zod.def?.error?.(e)) ?? Me(t?.error?.(e)) ?? Me(n.customError?.(e)) ?? Me(n.localeError?.(e)) ?? "Invalid input"), delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
|
|
485
485
|
}
|
|
486
486
|
function Pe(e) {
|
|
487
487
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
@@ -508,7 +508,7 @@ var Ie = (e, t) => {
|
|
|
508
508
|
value: () => e.message,
|
|
509
509
|
enumerable: !1
|
|
510
510
|
});
|
|
511
|
-
}, Le =
|
|
511
|
+
}, Le = w("$ZodError", Ie), Re = w("$ZodError", Ie, { Parent: Error });
|
|
512
512
|
function ze(e, t = (e) => e.message) {
|
|
513
513
|
let n = {}, r = [];
|
|
514
514
|
for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i));
|
|
@@ -540,10 +540,10 @@ var Ve = (e) => (t, n, r, i) => {
|
|
|
540
540
|
value: n,
|
|
541
541
|
issues: []
|
|
542
542
|
}, a);
|
|
543
|
-
if (o instanceof Promise) throw new
|
|
543
|
+
if (o instanceof Promise) throw new T();
|
|
544
544
|
if (o.issues.length) {
|
|
545
|
-
let t = new (i?.Err ?? e)(o.issues.map((e) =>
|
|
546
|
-
throw
|
|
545
|
+
let t = new (i?.Err ?? e)(o.issues.map((e) => Ne(e, a, D())));
|
|
546
|
+
throw me(t, i?.callee), t;
|
|
547
547
|
}
|
|
548
548
|
return o.value;
|
|
549
549
|
}, He = (e) => async (t, n, r, i) => {
|
|
@@ -552,8 +552,8 @@ var Ve = (e) => (t, n, r, i) => {
|
|
|
552
552
|
issues: []
|
|
553
553
|
}, a);
|
|
554
554
|
if (o instanceof Promise && (o = await o), o.issues.length) {
|
|
555
|
-
let t = new (i?.Err ?? e)(o.issues.map((e) =>
|
|
556
|
-
throw
|
|
555
|
+
let t = new (i?.Err ?? e)(o.issues.map((e) => Ne(e, a, D())));
|
|
556
|
+
throw me(t, i?.callee), t;
|
|
557
557
|
}
|
|
558
558
|
return o.value;
|
|
559
559
|
}, Ue = (e) => (t, n, r) => {
|
|
@@ -564,10 +564,10 @@ var Ve = (e) => (t, n, r, i) => {
|
|
|
564
564
|
value: n,
|
|
565
565
|
issues: []
|
|
566
566
|
}, i);
|
|
567
|
-
if (a instanceof Promise) throw new
|
|
567
|
+
if (a instanceof Promise) throw new T();
|
|
568
568
|
return a.issues.length ? {
|
|
569
569
|
success: !1,
|
|
570
|
-
error: new (e ?? Le)(a.issues.map((e) =>
|
|
570
|
+
error: new (e ?? Le)(a.issues.map((e) => Ne(e, i, D())))
|
|
571
571
|
} : {
|
|
572
572
|
success: !0,
|
|
573
573
|
data: a.value
|
|
@@ -579,7 +579,7 @@ var Ve = (e) => (t, n, r, i) => {
|
|
|
579
579
|
}, i);
|
|
580
580
|
return a instanceof Promise && (a = await a), a.issues.length ? {
|
|
581
581
|
success: !1,
|
|
582
|
-
error: new e(a.issues.map((e) =>
|
|
582
|
+
error: new e(a.issues.map((e) => Ne(e, i, D())))
|
|
583
583
|
} : {
|
|
584
584
|
success: !0,
|
|
585
585
|
data: a.value
|
|
@@ -617,14 +617,14 @@ function wt(e) {
|
|
|
617
617
|
var Tt = (e) => {
|
|
618
618
|
let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
619
619
|
return RegExp(`^${t}$`);
|
|
620
|
-
}, Et = /^-?\d+$/, Dt = /^-?\d+(?:\.\d+)?$/, Ot = /^(?:true|false)$/i, kt = /^[^A-Z]*$/, At = /^[^a-z]*$/, M = /* @__PURE__ */
|
|
620
|
+
}, Et = /^-?\d+$/, Dt = /^-?\d+(?:\.\d+)?$/, Ot = /^(?:true|false)$/i, kt = /^[^A-Z]*$/, At = /^[^a-z]*$/, M = /* @__PURE__ */ w("$ZodCheck", (e, t) => {
|
|
621
621
|
var n;
|
|
622
622
|
e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
623
623
|
}), jt = {
|
|
624
624
|
number: "number",
|
|
625
625
|
bigint: "bigint",
|
|
626
626
|
object: "date"
|
|
627
|
-
}, Mt = /* @__PURE__ */
|
|
627
|
+
}, Mt = /* @__PURE__ */ w("$ZodCheckLessThan", (e, t) => {
|
|
628
628
|
M.init(e, t);
|
|
629
629
|
let n = jt[typeof t.value];
|
|
630
630
|
e._zod.onattach.push((e) => {
|
|
@@ -641,7 +641,7 @@ var Tt = (e) => {
|
|
|
641
641
|
continue: !t.abort
|
|
642
642
|
});
|
|
643
643
|
};
|
|
644
|
-
}), Nt = /* @__PURE__ */
|
|
644
|
+
}), Nt = /* @__PURE__ */ w("$ZodCheckGreaterThan", (e, t) => {
|
|
645
645
|
M.init(e, t);
|
|
646
646
|
let n = jt[typeof t.value];
|
|
647
647
|
e._zod.onattach.push((e) => {
|
|
@@ -658,7 +658,7 @@ var Tt = (e) => {
|
|
|
658
658
|
continue: !t.abort
|
|
659
659
|
});
|
|
660
660
|
};
|
|
661
|
-
}), Pt = /* @__PURE__ */
|
|
661
|
+
}), Pt = /* @__PURE__ */ w("$ZodCheckMultipleOf", (e, t) => {
|
|
662
662
|
M.init(e, t), e._zod.onattach.push((e) => {
|
|
663
663
|
var n;
|
|
664
664
|
(n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
|
|
@@ -673,9 +673,9 @@ var Tt = (e) => {
|
|
|
673
673
|
continue: !t.abort
|
|
674
674
|
});
|
|
675
675
|
};
|
|
676
|
-
}), Ft = /* @__PURE__ */
|
|
676
|
+
}), Ft = /* @__PURE__ */ w("$ZodCheckNumberFormat", (e, t) => {
|
|
677
677
|
M.init(e, t), t.format = t.format || "float64";
|
|
678
|
-
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] =
|
|
678
|
+
let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = Se[t.format];
|
|
679
679
|
e._zod.onattach.push((e) => {
|
|
680
680
|
let r = e._zod.bag;
|
|
681
681
|
r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = Et);
|
|
@@ -734,7 +734,7 @@ var Tt = (e) => {
|
|
|
734
734
|
continue: !t.abort
|
|
735
735
|
});
|
|
736
736
|
};
|
|
737
|
-
}), It = /* @__PURE__ */
|
|
737
|
+
}), It = /* @__PURE__ */ w("$ZodCheckMaxLength", (e, t) => {
|
|
738
738
|
var n;
|
|
739
739
|
M.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
740
740
|
let t = e.value;
|
|
@@ -756,7 +756,7 @@ var Tt = (e) => {
|
|
|
756
756
|
continue: !t.abort
|
|
757
757
|
});
|
|
758
758
|
};
|
|
759
|
-
}), Lt = /* @__PURE__ */
|
|
759
|
+
}), Lt = /* @__PURE__ */ w("$ZodCheckMinLength", (e, t) => {
|
|
760
760
|
var n;
|
|
761
761
|
M.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
762
762
|
let t = e.value;
|
|
@@ -778,7 +778,7 @@ var Tt = (e) => {
|
|
|
778
778
|
continue: !t.abort
|
|
779
779
|
});
|
|
780
780
|
};
|
|
781
|
-
}), Rt = /* @__PURE__ */
|
|
781
|
+
}), Rt = /* @__PURE__ */ w("$ZodCheckLengthEquals", (e, t) => {
|
|
782
782
|
var n;
|
|
783
783
|
M.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
|
|
784
784
|
let t = e.value;
|
|
@@ -806,7 +806,7 @@ var Tt = (e) => {
|
|
|
806
806
|
continue: !t.abort
|
|
807
807
|
});
|
|
808
808
|
};
|
|
809
|
-
}), zt = /* @__PURE__ */
|
|
809
|
+
}), zt = /* @__PURE__ */ w("$ZodCheckStringFormat", (e, t) => {
|
|
810
810
|
var n, r;
|
|
811
811
|
M.init(e, t), e._zod.onattach.push((e) => {
|
|
812
812
|
let n = e._zod.bag;
|
|
@@ -822,7 +822,7 @@ var Tt = (e) => {
|
|
|
822
822
|
continue: !t.abort
|
|
823
823
|
});
|
|
824
824
|
}) : (r = e._zod).check ?? (r.check = () => {});
|
|
825
|
-
}), Bt = /* @__PURE__ */
|
|
825
|
+
}), Bt = /* @__PURE__ */ w("$ZodCheckRegex", (e, t) => {
|
|
826
826
|
zt.init(e, t), e._zod.check = (n) => {
|
|
827
827
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
828
828
|
origin: "string",
|
|
@@ -834,13 +834,13 @@ var Tt = (e) => {
|
|
|
834
834
|
continue: !t.abort
|
|
835
835
|
});
|
|
836
836
|
};
|
|
837
|
-
}), Vt = /* @__PURE__ */
|
|
837
|
+
}), Vt = /* @__PURE__ */ w("$ZodCheckLowerCase", (e, t) => {
|
|
838
838
|
t.pattern ??= kt, zt.init(e, t);
|
|
839
|
-
}), Ht = /* @__PURE__ */
|
|
839
|
+
}), Ht = /* @__PURE__ */ w("$ZodCheckUpperCase", (e, t) => {
|
|
840
840
|
t.pattern ??= At, zt.init(e, t);
|
|
841
|
-
}), Ut = /* @__PURE__ */
|
|
841
|
+
}), Ut = /* @__PURE__ */ w("$ZodCheckIncludes", (e, t) => {
|
|
842
842
|
M.init(e, t);
|
|
843
|
-
let n =
|
|
843
|
+
let n = be(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
844
844
|
t.pattern = r, e._zod.onattach.push((e) => {
|
|
845
845
|
let t = e._zod.bag;
|
|
846
846
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
|
|
@@ -855,9 +855,9 @@ var Tt = (e) => {
|
|
|
855
855
|
continue: !t.abort
|
|
856
856
|
});
|
|
857
857
|
};
|
|
858
|
-
}), Wt = /* @__PURE__ */
|
|
858
|
+
}), Wt = /* @__PURE__ */ w("$ZodCheckStartsWith", (e, t) => {
|
|
859
859
|
M.init(e, t);
|
|
860
|
-
let n = RegExp(`^${
|
|
860
|
+
let n = RegExp(`^${be(t.prefix)}.*`);
|
|
861
861
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
862
862
|
let t = e._zod.bag;
|
|
863
863
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
@@ -872,9 +872,9 @@ var Tt = (e) => {
|
|
|
872
872
|
continue: !t.abort
|
|
873
873
|
});
|
|
874
874
|
};
|
|
875
|
-
}), Gt = /* @__PURE__ */
|
|
875
|
+
}), Gt = /* @__PURE__ */ w("$ZodCheckEndsWith", (e, t) => {
|
|
876
876
|
M.init(e, t);
|
|
877
|
-
let n = RegExp(`.*${
|
|
877
|
+
let n = RegExp(`.*${be(t.suffix)}$`);
|
|
878
878
|
t.pattern ??= n, e._zod.onattach.push((e) => {
|
|
879
879
|
let t = e._zod.bag;
|
|
880
880
|
t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
|
|
@@ -889,7 +889,7 @@ var Tt = (e) => {
|
|
|
889
889
|
continue: !t.abort
|
|
890
890
|
});
|
|
891
891
|
};
|
|
892
|
-
}), Kt = /* @__PURE__ */
|
|
892
|
+
}), Kt = /* @__PURE__ */ w("$ZodCheckOverwrite", (e, t) => {
|
|
893
893
|
M.init(e, t), e._zod.check = (e) => {
|
|
894
894
|
e.value = t.tx(e.value);
|
|
895
895
|
};
|
|
@@ -916,7 +916,7 @@ var Tt = (e) => {
|
|
|
916
916
|
major: 4,
|
|
917
917
|
minor: 3,
|
|
918
918
|
patch: 6
|
|
919
|
-
}, N = /* @__PURE__ */
|
|
919
|
+
}, N = /* @__PURE__ */ w("$ZodType", (e, t) => {
|
|
920
920
|
var n;
|
|
921
921
|
e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Jt;
|
|
922
922
|
let r = [...e._zod.def.checks ?? []];
|
|
@@ -927,27 +927,27 @@ var Tt = (e) => {
|
|
|
927
927
|
});
|
|
928
928
|
else {
|
|
929
929
|
let t = (e, t, n) => {
|
|
930
|
-
let r =
|
|
930
|
+
let r = Ae(e), i;
|
|
931
931
|
for (let a of t) {
|
|
932
932
|
if (a._zod.def.when) {
|
|
933
933
|
if (!a._zod.def.when(e)) continue;
|
|
934
934
|
} else if (r) continue;
|
|
935
935
|
let t = e.issues.length, o = a._zod.check(e);
|
|
936
|
-
if (o instanceof Promise && n?.async === !1) throw new
|
|
936
|
+
if (o instanceof Promise && n?.async === !1) throw new T();
|
|
937
937
|
if (i || o instanceof Promise) i = (i ?? Promise.resolve()).then(async () => {
|
|
938
|
-
await o, e.issues.length !== t && (r ||=
|
|
938
|
+
await o, e.issues.length !== t && (r ||= Ae(e, t));
|
|
939
939
|
});
|
|
940
940
|
else {
|
|
941
941
|
if (e.issues.length === t) continue;
|
|
942
|
-
r ||=
|
|
942
|
+
r ||= Ae(e, t);
|
|
943
943
|
}
|
|
944
944
|
}
|
|
945
945
|
return i ? i.then(() => e) : e;
|
|
946
946
|
}, n = (n, i, a) => {
|
|
947
|
-
if (
|
|
947
|
+
if (Ae(n)) return n.aborted = !0, n;
|
|
948
948
|
let o = t(i, r, a);
|
|
949
949
|
if (o instanceof Promise) {
|
|
950
|
-
if (a.async === !1) throw new
|
|
950
|
+
if (a.async === !1) throw new T();
|
|
951
951
|
return o.then((t) => e._zod.parse(t, a));
|
|
952
952
|
}
|
|
953
953
|
return e._zod.parse(o, a);
|
|
@@ -966,7 +966,7 @@ var Tt = (e) => {
|
|
|
966
966
|
}
|
|
967
967
|
let o = e._zod.parse(i, a);
|
|
968
968
|
if (o instanceof Promise) {
|
|
969
|
-
if (a.async === !1) throw new
|
|
969
|
+
if (a.async === !1) throw new T();
|
|
970
970
|
return o.then((e) => t(e, r, a));
|
|
971
971
|
}
|
|
972
972
|
return t(o, r, a);
|
|
@@ -984,7 +984,7 @@ var Tt = (e) => {
|
|
|
984
984
|
vendor: "zod",
|
|
985
985
|
version: 1
|
|
986
986
|
}));
|
|
987
|
-
}), Yt = /* @__PURE__ */
|
|
987
|
+
}), Yt = /* @__PURE__ */ w("$ZodString", (e, t) => {
|
|
988
988
|
N.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Tt(e._zod.bag), e._zod.parse = (n, r) => {
|
|
989
989
|
if (t.coerce) try {
|
|
990
990
|
n.value = String(n.value);
|
|
@@ -996,11 +996,11 @@ var Tt = (e) => {
|
|
|
996
996
|
inst: e
|
|
997
997
|
}), n;
|
|
998
998
|
};
|
|
999
|
-
}), P = /* @__PURE__ */
|
|
999
|
+
}), P = /* @__PURE__ */ w("$ZodStringFormat", (e, t) => {
|
|
1000
1000
|
zt.init(e, t), Yt.init(e, t);
|
|
1001
|
-
}), Xt = /* @__PURE__ */
|
|
1001
|
+
}), Xt = /* @__PURE__ */ w("$ZodGUID", (e, t) => {
|
|
1002
1002
|
t.pattern ??= ct, P.init(e, t);
|
|
1003
|
-
}), Zt = /* @__PURE__ */
|
|
1003
|
+
}), Zt = /* @__PURE__ */ w("$ZodUUID", (e, t) => {
|
|
1004
1004
|
if (t.version) {
|
|
1005
1005
|
let e = {
|
|
1006
1006
|
v1: 1,
|
|
@@ -1016,9 +1016,9 @@ var Tt = (e) => {
|
|
|
1016
1016
|
t.pattern ??= lt(e);
|
|
1017
1017
|
} else t.pattern ??= lt();
|
|
1018
1018
|
P.init(e, t);
|
|
1019
|
-
}), Qt = /* @__PURE__ */
|
|
1019
|
+
}), Qt = /* @__PURE__ */ w("$ZodEmail", (e, t) => {
|
|
1020
1020
|
t.pattern ??= ut, P.init(e, t);
|
|
1021
|
-
}), $t = /* @__PURE__ */
|
|
1021
|
+
}), $t = /* @__PURE__ */ w("$ZodURL", (e, t) => {
|
|
1022
1022
|
P.init(e, t), e._zod.check = (n) => {
|
|
1023
1023
|
try {
|
|
1024
1024
|
let r = n.value.trim(), i = new URL(r);
|
|
@@ -1050,31 +1050,31 @@ var Tt = (e) => {
|
|
|
1050
1050
|
});
|
|
1051
1051
|
}
|
|
1052
1052
|
};
|
|
1053
|
-
}), en = /* @__PURE__ */
|
|
1053
|
+
}), en = /* @__PURE__ */ w("$ZodEmoji", (e, t) => {
|
|
1054
1054
|
t.pattern ??= ft(), P.init(e, t);
|
|
1055
|
-
}), tn = /* @__PURE__ */
|
|
1055
|
+
}), tn = /* @__PURE__ */ w("$ZodNanoID", (e, t) => {
|
|
1056
1056
|
t.pattern ??= ot, P.init(e, t);
|
|
1057
|
-
}), nn = /* @__PURE__ */
|
|
1057
|
+
}), nn = /* @__PURE__ */ w("$ZodCUID", (e, t) => {
|
|
1058
1058
|
t.pattern ??= tt, P.init(e, t);
|
|
1059
|
-
}), rn = /* @__PURE__ */
|
|
1059
|
+
}), rn = /* @__PURE__ */ w("$ZodCUID2", (e, t) => {
|
|
1060
1060
|
t.pattern ??= nt, P.init(e, t);
|
|
1061
|
-
}), an = /* @__PURE__ */
|
|
1061
|
+
}), an = /* @__PURE__ */ w("$ZodULID", (e, t) => {
|
|
1062
1062
|
t.pattern ??= rt, P.init(e, t);
|
|
1063
|
-
}), on = /* @__PURE__ */
|
|
1063
|
+
}), on = /* @__PURE__ */ w("$ZodXID", (e, t) => {
|
|
1064
1064
|
t.pattern ??= it, P.init(e, t);
|
|
1065
|
-
}), sn = /* @__PURE__ */
|
|
1065
|
+
}), sn = /* @__PURE__ */ w("$ZodKSUID", (e, t) => {
|
|
1066
1066
|
t.pattern ??= at, P.init(e, t);
|
|
1067
|
-
}), cn = /* @__PURE__ */
|
|
1067
|
+
}), cn = /* @__PURE__ */ w("$ZodISODateTime", (e, t) => {
|
|
1068
1068
|
t.pattern ??= wt(t), P.init(e, t);
|
|
1069
|
-
}), ln = /* @__PURE__ */
|
|
1069
|
+
}), ln = /* @__PURE__ */ w("$ZodISODate", (e, t) => {
|
|
1070
1070
|
t.pattern ??= xt, P.init(e, t);
|
|
1071
|
-
}), un = /* @__PURE__ */
|
|
1071
|
+
}), un = /* @__PURE__ */ w("$ZodISOTime", (e, t) => {
|
|
1072
1072
|
t.pattern ??= Ct(t), P.init(e, t);
|
|
1073
|
-
}), dn = /* @__PURE__ */
|
|
1073
|
+
}), dn = /* @__PURE__ */ w("$ZodISODuration", (e, t) => {
|
|
1074
1074
|
t.pattern ??= st, P.init(e, t);
|
|
1075
|
-
}), fn = /* @__PURE__ */
|
|
1075
|
+
}), fn = /* @__PURE__ */ w("$ZodIPv4", (e, t) => {
|
|
1076
1076
|
t.pattern ??= pt, P.init(e, t), e._zod.bag.format = "ipv4";
|
|
1077
|
-
}), pn = /* @__PURE__ */
|
|
1077
|
+
}), pn = /* @__PURE__ */ w("$ZodIPv6", (e, t) => {
|
|
1078
1078
|
t.pattern ??= mt, P.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
1079
1079
|
try {
|
|
1080
1080
|
new URL(`http://[${n.value}]`);
|
|
@@ -1088,9 +1088,9 @@ var Tt = (e) => {
|
|
|
1088
1088
|
});
|
|
1089
1089
|
}
|
|
1090
1090
|
};
|
|
1091
|
-
}), mn = /* @__PURE__ */
|
|
1091
|
+
}), mn = /* @__PURE__ */ w("$ZodCIDRv4", (e, t) => {
|
|
1092
1092
|
t.pattern ??= ht, P.init(e, t);
|
|
1093
|
-
}), hn = /* @__PURE__ */
|
|
1093
|
+
}), hn = /* @__PURE__ */ w("$ZodCIDRv6", (e, t) => {
|
|
1094
1094
|
t.pattern ??= gt, P.init(e, t), e._zod.check = (n) => {
|
|
1095
1095
|
let r = n.value.split("/");
|
|
1096
1096
|
try {
|
|
@@ -1120,7 +1120,7 @@ function gn(e) {
|
|
|
1120
1120
|
return !1;
|
|
1121
1121
|
}
|
|
1122
1122
|
}
|
|
1123
|
-
var _n = /* @__PURE__ */
|
|
1123
|
+
var _n = /* @__PURE__ */ w("$ZodBase64", (e, t) => {
|
|
1124
1124
|
t.pattern ??= _t, P.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1125
1125
|
gn(n.value) || n.issues.push({
|
|
1126
1126
|
code: "invalid_format",
|
|
@@ -1136,7 +1136,7 @@ function vn(e) {
|
|
|
1136
1136
|
let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
|
|
1137
1137
|
return gn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
|
|
1138
1138
|
}
|
|
1139
|
-
var yn = /* @__PURE__ */
|
|
1139
|
+
var yn = /* @__PURE__ */ w("$ZodBase64URL", (e, t) => {
|
|
1140
1140
|
t.pattern ??= vt, P.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1141
1141
|
vn(n.value) || n.issues.push({
|
|
1142
1142
|
code: "invalid_format",
|
|
@@ -1146,7 +1146,7 @@ var yn = /* @__PURE__ */ T("$ZodBase64URL", (e, t) => {
|
|
|
1146
1146
|
continue: !t.abort
|
|
1147
1147
|
});
|
|
1148
1148
|
};
|
|
1149
|
-
}), bn = /* @__PURE__ */
|
|
1149
|
+
}), bn = /* @__PURE__ */ w("$ZodE164", (e, t) => {
|
|
1150
1150
|
t.pattern ??= yt, P.init(e, t);
|
|
1151
1151
|
});
|
|
1152
1152
|
function xn(e, t = null) {
|
|
@@ -1161,7 +1161,7 @@ function xn(e, t = null) {
|
|
|
1161
1161
|
return !1;
|
|
1162
1162
|
}
|
|
1163
1163
|
}
|
|
1164
|
-
var Sn = /* @__PURE__ */
|
|
1164
|
+
var Sn = /* @__PURE__ */ w("$ZodJWT", (e, t) => {
|
|
1165
1165
|
P.init(e, t), e._zod.check = (n) => {
|
|
1166
1166
|
xn(n.value, t.alg) || n.issues.push({
|
|
1167
1167
|
code: "invalid_format",
|
|
@@ -1171,7 +1171,7 @@ var Sn = /* @__PURE__ */ T("$ZodJWT", (e, t) => {
|
|
|
1171
1171
|
continue: !t.abort
|
|
1172
1172
|
});
|
|
1173
1173
|
};
|
|
1174
|
-
}), Cn = /* @__PURE__ */
|
|
1174
|
+
}), Cn = /* @__PURE__ */ w("$ZodNumber", (e, t) => {
|
|
1175
1175
|
N.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Dt, e._zod.parse = (n, r) => {
|
|
1176
1176
|
if (t.coerce) try {
|
|
1177
1177
|
n.value = Number(n.value);
|
|
@@ -1187,9 +1187,9 @@ var Sn = /* @__PURE__ */ T("$ZodJWT", (e, t) => {
|
|
|
1187
1187
|
...a ? { received: a } : {}
|
|
1188
1188
|
}), n;
|
|
1189
1189
|
};
|
|
1190
|
-
}), wn = /* @__PURE__ */
|
|
1190
|
+
}), wn = /* @__PURE__ */ w("$ZodNumberFormat", (e, t) => {
|
|
1191
1191
|
Ft.init(e, t), Cn.init(e, t);
|
|
1192
|
-
}), Tn = /* @__PURE__ */
|
|
1192
|
+
}), Tn = /* @__PURE__ */ w("$ZodBoolean", (e, t) => {
|
|
1193
1193
|
N.init(e, t), e._zod.pattern = Ot, e._zod.parse = (n, r) => {
|
|
1194
1194
|
if (t.coerce) try {
|
|
1195
1195
|
n.value = !!n.value;
|
|
@@ -1202,9 +1202,9 @@ var Sn = /* @__PURE__ */ T("$ZodJWT", (e, t) => {
|
|
|
1202
1202
|
inst: e
|
|
1203
1203
|
}), n;
|
|
1204
1204
|
};
|
|
1205
|
-
}), En = /* @__PURE__ */
|
|
1205
|
+
}), En = /* @__PURE__ */ w("$ZodUnknown", (e, t) => {
|
|
1206
1206
|
N.init(e, t), e._zod.parse = (e) => e;
|
|
1207
|
-
}), Dn = /* @__PURE__ */
|
|
1207
|
+
}), Dn = /* @__PURE__ */ w("$ZodNever", (e, t) => {
|
|
1208
1208
|
N.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
|
|
1209
1209
|
expected: "never",
|
|
1210
1210
|
code: "invalid_type",
|
|
@@ -1213,9 +1213,9 @@ var Sn = /* @__PURE__ */ T("$ZodJWT", (e, t) => {
|
|
|
1213
1213
|
}), t);
|
|
1214
1214
|
});
|
|
1215
1215
|
function On(e, t, n) {
|
|
1216
|
-
e.issues.length && t.issues.push(...
|
|
1216
|
+
e.issues.length && t.issues.push(...je(n, e.issues)), t.value[n] = e.value;
|
|
1217
1217
|
}
|
|
1218
|
-
var kn = /* @__PURE__ */
|
|
1218
|
+
var kn = /* @__PURE__ */ w("$ZodArray", (e, t) => {
|
|
1219
1219
|
N.init(e, t), e._zod.parse = (n, r) => {
|
|
1220
1220
|
let i = n.value;
|
|
1221
1221
|
if (!Array.isArray(i)) return n.issues.push({
|
|
@@ -1239,14 +1239,14 @@ var kn = /* @__PURE__ */ T("$ZodArray", (e, t) => {
|
|
|
1239
1239
|
function An(e, t, n, r, i) {
|
|
1240
1240
|
if (e.issues.length) {
|
|
1241
1241
|
if (i && !(n in r)) return;
|
|
1242
|
-
t.issues.push(...
|
|
1242
|
+
t.issues.push(...je(n, e.issues));
|
|
1243
1243
|
}
|
|
1244
1244
|
e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1245
1245
|
}
|
|
1246
1246
|
function jn(e) {
|
|
1247
1247
|
let t = Object.keys(e.shape);
|
|
1248
1248
|
for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${n}": expected a Zod schema`);
|
|
1249
|
-
let n =
|
|
1249
|
+
let n = xe(e.shape);
|
|
1250
1250
|
return {
|
|
1251
1251
|
...e,
|
|
1252
1252
|
keys: t,
|
|
@@ -1276,7 +1276,7 @@ function Mn(e, t, n, r, i, a) {
|
|
|
1276
1276
|
inst: a
|
|
1277
1277
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1278
1278
|
}
|
|
1279
|
-
var Nn = /* @__PURE__ */
|
|
1279
|
+
var Nn = /* @__PURE__ */ w("$ZodObject", (e, t) => {
|
|
1280
1280
|
if (N.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1281
1281
|
let e = t.shape;
|
|
1282
1282
|
Object.defineProperty(t, "shape", { get: () => {
|
|
@@ -1296,7 +1296,7 @@ var Nn = /* @__PURE__ */ T("$ZodObject", (e, t) => {
|
|
|
1296
1296
|
}
|
|
1297
1297
|
return n;
|
|
1298
1298
|
});
|
|
1299
|
-
let r =
|
|
1299
|
+
let r = he, i = t.catchall, a;
|
|
1300
1300
|
e._zod.parse = (t, o) => {
|
|
1301
1301
|
a ??= n.value;
|
|
1302
1302
|
let s = t.value;
|
|
@@ -1317,7 +1317,7 @@ var Nn = /* @__PURE__ */ T("$ZodObject", (e, t) => {
|
|
|
1317
1317
|
}
|
|
1318
1318
|
return i ? Mn(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t;
|
|
1319
1319
|
};
|
|
1320
|
-
}), Pn = /* @__PURE__ */
|
|
1320
|
+
}), Pn = /* @__PURE__ */ w("$ZodObjectJIT", (e, t) => {
|
|
1321
1321
|
Nn.init(e, t);
|
|
1322
1322
|
let n = e._zod.parse, r = oe(() => jn(t)), i = (e) => {
|
|
1323
1323
|
let t = new qt([
|
|
@@ -1325,7 +1325,7 @@ var Nn = /* @__PURE__ */ T("$ZodObject", (e, t) => {
|
|
|
1325
1325
|
"payload",
|
|
1326
1326
|
"ctx"
|
|
1327
1327
|
]), n = r.value, i = (e) => {
|
|
1328
|
-
let t =
|
|
1328
|
+
let t = fe(e);
|
|
1329
1329
|
return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`;
|
|
1330
1330
|
};
|
|
1331
1331
|
t.write("const input = payload.value;");
|
|
@@ -1333,7 +1333,7 @@ var Nn = /* @__PURE__ */ T("$ZodObject", (e, t) => {
|
|
|
1333
1333
|
for (let e of n.keys) a[e] = `key_${o++}`;
|
|
1334
1334
|
t.write("const newResult = {};");
|
|
1335
1335
|
for (let r of n.keys) {
|
|
1336
|
-
let n = a[r], o =
|
|
1336
|
+
let n = a[r], o = fe(r), s = e[r]?._zod?.optout === "optional";
|
|
1337
1337
|
t.write(`const ${n} = ${i(r)};`), s ? t.write(`
|
|
1338
1338
|
if (${n}.issues.length) {
|
|
1339
1339
|
if (${o} in input) {
|
|
@@ -1373,7 +1373,7 @@ var Nn = /* @__PURE__ */ T("$ZodObject", (e, t) => {
|
|
|
1373
1373
|
t.write("payload.value = newResult;"), t.write("return payload;");
|
|
1374
1374
|
let s = t.compile();
|
|
1375
1375
|
return (t, n) => s(e, t, n);
|
|
1376
|
-
}, a, o =
|
|
1376
|
+
}, a, o = he, s = !re.jitless, c = s && ge.value, l = t.catchall, u;
|
|
1377
1377
|
e._zod.parse = (d, f) => {
|
|
1378
1378
|
u ??= r.value;
|
|
1379
1379
|
let p = d.value;
|
|
@@ -1387,15 +1387,15 @@ var Nn = /* @__PURE__ */ T("$ZodObject", (e, t) => {
|
|
|
1387
1387
|
});
|
|
1388
1388
|
function Fn(e, t, n, r) {
|
|
1389
1389
|
for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
|
|
1390
|
-
let i = e.filter((e) => !
|
|
1390
|
+
let i = e.filter((e) => !Ae(e));
|
|
1391
1391
|
return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
|
|
1392
1392
|
code: "invalid_union",
|
|
1393
1393
|
input: t.value,
|
|
1394
1394
|
inst: n,
|
|
1395
|
-
errors: e.map((e) => e.issues.map((e) =>
|
|
1395
|
+
errors: e.map((e) => e.issues.map((e) => Ne(e, r, D())))
|
|
1396
1396
|
}), t);
|
|
1397
1397
|
}
|
|
1398
|
-
var In = /* @__PURE__ */
|
|
1398
|
+
var In = /* @__PURE__ */ w("$ZodUnion", (e, t) => {
|
|
1399
1399
|
N.init(e, t), O(e._zod, "optin", () => t.options.some((e) => e._zod.optin === "optional") ? "optional" : void 0), O(e._zod, "optout", () => t.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), O(e._zod, "values", () => {
|
|
1400
1400
|
if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values)));
|
|
1401
1401
|
}), O(e._zod, "pattern", () => {
|
|
@@ -1421,7 +1421,7 @@ var In = /* @__PURE__ */ T("$ZodUnion", (e, t) => {
|
|
|
1421
1421
|
}
|
|
1422
1422
|
return o ? Promise.all(s).then((t) => Fn(t, i, e, a)) : Fn(s, i, e, a);
|
|
1423
1423
|
};
|
|
1424
|
-
}), Ln = /* @__PURE__ */
|
|
1424
|
+
}), Ln = /* @__PURE__ */ w("$ZodIntersection", (e, t) => {
|
|
1425
1425
|
N.init(e, t), e._zod.parse = (e, n) => {
|
|
1426
1426
|
let r = e.value, i = t.left._zod.run({
|
|
1427
1427
|
value: r,
|
|
@@ -1438,7 +1438,7 @@ function Rn(e, t) {
|
|
|
1438
1438
|
valid: !0,
|
|
1439
1439
|
data: e
|
|
1440
1440
|
};
|
|
1441
|
-
if (
|
|
1441
|
+
if (_e(e) && _e(t)) {
|
|
1442
1442
|
let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
|
|
1443
1443
|
...e,
|
|
1444
1444
|
...t
|
|
@@ -1492,15 +1492,15 @@ function zn(e, t, n) {
|
|
|
1492
1492
|
if (a.length && i && e.issues.push({
|
|
1493
1493
|
...i,
|
|
1494
1494
|
keys: a
|
|
1495
|
-
}),
|
|
1495
|
+
}), Ae(e)) return e;
|
|
1496
1496
|
let o = Rn(t.value, n.value);
|
|
1497
1497
|
if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
|
|
1498
1498
|
return e.value = o.data, e;
|
|
1499
1499
|
}
|
|
1500
|
-
var Bn = /* @__PURE__ */
|
|
1500
|
+
var Bn = /* @__PURE__ */ w("$ZodRecord", (e, t) => {
|
|
1501
1501
|
N.init(e, t), e._zod.parse = (n, r) => {
|
|
1502
1502
|
let i = n.value;
|
|
1503
|
-
if (!
|
|
1503
|
+
if (!_e(i)) return n.issues.push({
|
|
1504
1504
|
expected: "record",
|
|
1505
1505
|
code: "invalid_type",
|
|
1506
1506
|
input: i,
|
|
@@ -1517,8 +1517,8 @@ var Bn = /* @__PURE__ */ T("$ZodRecord", (e, t) => {
|
|
|
1517
1517
|
issues: []
|
|
1518
1518
|
}, r);
|
|
1519
1519
|
o instanceof Promise ? a.push(o.then((t) => {
|
|
1520
|
-
t.issues.length && n.issues.push(...
|
|
1521
|
-
})) : (o.issues.length && n.issues.push(...
|
|
1520
|
+
t.issues.length && n.issues.push(...je(e, t.issues)), n.value[e] = t.value;
|
|
1521
|
+
})) : (o.issues.length && n.issues.push(...je(e, o.issues)), n.value[e] = o.value);
|
|
1522
1522
|
}
|
|
1523
1523
|
let c;
|
|
1524
1524
|
for (let e in i) s.has(e) || (c ??= [], c.push(e));
|
|
@@ -1549,7 +1549,7 @@ var Bn = /* @__PURE__ */ T("$ZodRecord", (e, t) => {
|
|
|
1549
1549
|
t.mode === "loose" ? n.value[o] = i[o] : n.issues.push({
|
|
1550
1550
|
code: "invalid_key",
|
|
1551
1551
|
origin: "record",
|
|
1552
|
-
issues: s.issues.map((e) =>
|
|
1552
|
+
issues: s.issues.map((e) => Ne(e, r, D())),
|
|
1553
1553
|
input: o,
|
|
1554
1554
|
path: [o],
|
|
1555
1555
|
inst: e
|
|
@@ -1561,16 +1561,16 @@ var Bn = /* @__PURE__ */ T("$ZodRecord", (e, t) => {
|
|
|
1561
1561
|
issues: []
|
|
1562
1562
|
}, r);
|
|
1563
1563
|
c instanceof Promise ? a.push(c.then((e) => {
|
|
1564
|
-
e.issues.length && n.issues.push(...
|
|
1565
|
-
})) : (c.issues.length && n.issues.push(...
|
|
1564
|
+
e.issues.length && n.issues.push(...je(o, e.issues)), n.value[s.value] = e.value;
|
|
1565
|
+
})) : (c.issues.length && n.issues.push(...je(o, c.issues)), n.value[s.value] = c.value);
|
|
1566
1566
|
}
|
|
1567
1567
|
}
|
|
1568
1568
|
return a.length ? Promise.all(a).then(() => n) : n;
|
|
1569
1569
|
};
|
|
1570
|
-
}), Vn = /* @__PURE__ */
|
|
1570
|
+
}), Vn = /* @__PURE__ */ w("$ZodEnum", (e, t) => {
|
|
1571
1571
|
N.init(e, t);
|
|
1572
1572
|
let n = ie(t.entries), r = new Set(n);
|
|
1573
|
-
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) =>
|
|
1573
|
+
e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => ye.has(typeof e)).map((e) => typeof e == "string" ? be(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
|
|
1574
1574
|
let a = t.value;
|
|
1575
1575
|
return r.has(a) || t.issues.push({
|
|
1576
1576
|
code: "invalid_value",
|
|
@@ -1579,10 +1579,10 @@ var Bn = /* @__PURE__ */ T("$ZodRecord", (e, t) => {
|
|
|
1579
1579
|
inst: e
|
|
1580
1580
|
}), t;
|
|
1581
1581
|
};
|
|
1582
|
-
}), Hn = /* @__PURE__ */
|
|
1582
|
+
}), Hn = /* @__PURE__ */ w("$ZodLiteral", (e, t) => {
|
|
1583
1583
|
if (N.init(e, t), t.values.length === 0) throw Error("Cannot create literal schema with no valid values");
|
|
1584
1584
|
let n = new Set(t.values);
|
|
1585
|
-
e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == "string" ?
|
|
1585
|
+
e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == "string" ? be(e) : e ? be(e.toString()) : String(e)).join("|")})$`), e._zod.parse = (r, i) => {
|
|
1586
1586
|
let a = r.value;
|
|
1587
1587
|
return n.has(a) || r.issues.push({
|
|
1588
1588
|
code: "invalid_value",
|
|
@@ -1591,12 +1591,12 @@ var Bn = /* @__PURE__ */ T("$ZodRecord", (e, t) => {
|
|
|
1591
1591
|
inst: e
|
|
1592
1592
|
}), r;
|
|
1593
1593
|
};
|
|
1594
|
-
}), Un = /* @__PURE__ */
|
|
1594
|
+
}), Un = /* @__PURE__ */ w("$ZodTransform", (e, t) => {
|
|
1595
1595
|
N.init(e, t), e._zod.parse = (n, r) => {
|
|
1596
|
-
if (r.direction === "backward") throw new
|
|
1596
|
+
if (r.direction === "backward") throw new E(e.constructor.name);
|
|
1597
1597
|
let i = t.transform(n.value, n);
|
|
1598
1598
|
if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n));
|
|
1599
|
-
if (i instanceof Promise) throw new
|
|
1599
|
+
if (i instanceof Promise) throw new T();
|
|
1600
1600
|
return n.value = i, n;
|
|
1601
1601
|
};
|
|
1602
1602
|
});
|
|
@@ -1606,7 +1606,7 @@ function Wn(e, t) {
|
|
|
1606
1606
|
value: void 0
|
|
1607
1607
|
} : e;
|
|
1608
1608
|
}
|
|
1609
|
-
var Gn = /* @__PURE__ */
|
|
1609
|
+
var Gn = /* @__PURE__ */ w("$ZodOptional", (e, t) => {
|
|
1610
1610
|
N.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", O(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, void 0]) : void 0), O(e._zod, "pattern", () => {
|
|
1611
1611
|
let e = t.innerType._zod.pattern;
|
|
1612
1612
|
return e ? RegExp(`^(${ce(e.source)})?$`) : void 0;
|
|
@@ -1617,14 +1617,14 @@ var Gn = /* @__PURE__ */ T("$ZodOptional", (e, t) => {
|
|
|
1617
1617
|
}
|
|
1618
1618
|
return e.value === void 0 ? e : t.innerType._zod.run(e, n);
|
|
1619
1619
|
};
|
|
1620
|
-
}), Kn = /* @__PURE__ */
|
|
1620
|
+
}), Kn = /* @__PURE__ */ w("$ZodExactOptional", (e, t) => {
|
|
1621
1621
|
Gn.init(e, t), O(e._zod, "values", () => t.innerType._zod.values), O(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
|
|
1622
|
-
}), qn = /* @__PURE__ */
|
|
1622
|
+
}), qn = /* @__PURE__ */ w("$ZodNullable", (e, t) => {
|
|
1623
1623
|
N.init(e, t), O(e._zod, "optin", () => t.innerType._zod.optin), O(e._zod, "optout", () => t.innerType._zod.optout), O(e._zod, "pattern", () => {
|
|
1624
1624
|
let e = t.innerType._zod.pattern;
|
|
1625
1625
|
return e ? RegExp(`^(${ce(e.source)}|null)$`) : void 0;
|
|
1626
1626
|
}), O(e._zod, "values", () => t.innerType._zod.values ? new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
|
|
1627
|
-
}), Jn = /* @__PURE__ */
|
|
1627
|
+
}), Jn = /* @__PURE__ */ w("$ZodDefault", (e, t) => {
|
|
1628
1628
|
N.init(e, t), e._zod.optin = "optional", O(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1629
1629
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1630
1630
|
if (e.value === void 0) return e.value = t.defaultValue, e;
|
|
@@ -1635,9 +1635,9 @@ var Gn = /* @__PURE__ */ T("$ZodOptional", (e, t) => {
|
|
|
1635
1635
|
function Yn(e, t) {
|
|
1636
1636
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
1637
1637
|
}
|
|
1638
|
-
var Xn = /* @__PURE__ */
|
|
1638
|
+
var Xn = /* @__PURE__ */ w("$ZodPrefault", (e, t) => {
|
|
1639
1639
|
N.init(e, t), e._zod.optin = "optional", O(e._zod, "values", () => t.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));
|
|
1640
|
-
}), Zn = /* @__PURE__ */
|
|
1640
|
+
}), Zn = /* @__PURE__ */ w("$ZodNonOptional", (e, t) => {
|
|
1641
1641
|
N.init(e, t), O(e._zod, "values", () => {
|
|
1642
1642
|
let e = t.innerType._zod.values;
|
|
1643
1643
|
return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
|
|
@@ -1654,21 +1654,21 @@ function Qn(e, t) {
|
|
|
1654
1654
|
inst: t
|
|
1655
1655
|
}), e;
|
|
1656
1656
|
}
|
|
1657
|
-
var $n = /* @__PURE__ */
|
|
1657
|
+
var $n = /* @__PURE__ */ w("$ZodCatch", (e, t) => {
|
|
1658
1658
|
N.init(e, t), O(e._zod, "optin", () => t.innerType._zod.optin), O(e._zod, "optout", () => t.innerType._zod.optout), O(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
|
|
1659
1659
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1660
1660
|
let r = t.innerType._zod.run(e, n);
|
|
1661
1661
|
return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1662
1662
|
...e,
|
|
1663
|
-
error: { issues: r.issues.map((e) =>
|
|
1663
|
+
error: { issues: r.issues.map((e) => Ne(e, n, D())) },
|
|
1664
1664
|
input: e.value
|
|
1665
1665
|
}), e.issues = []), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
|
|
1666
1666
|
...e,
|
|
1667
|
-
error: { issues: r.issues.map((e) =>
|
|
1667
|
+
error: { issues: r.issues.map((e) => Ne(e, n, D())) },
|
|
1668
1668
|
input: e.value
|
|
1669
1669
|
}), e.issues = []), e);
|
|
1670
1670
|
};
|
|
1671
|
-
}), er = /* @__PURE__ */
|
|
1671
|
+
}), er = /* @__PURE__ */ w("$ZodPipe", (e, t) => {
|
|
1672
1672
|
N.init(e, t), O(e._zod, "values", () => t.in._zod.values), O(e._zod, "optin", () => t.in._zod.optin), O(e._zod, "optout", () => t.out._zod.optout), O(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
|
|
1673
1673
|
if (n.direction === "backward") {
|
|
1674
1674
|
let r = t.out._zod.run(e, n);
|
|
@@ -1684,7 +1684,7 @@ function tr(e, t, n) {
|
|
|
1684
1684
|
issues: e.issues
|
|
1685
1685
|
}, n);
|
|
1686
1686
|
}
|
|
1687
|
-
var nr = /* @__PURE__ */
|
|
1687
|
+
var nr = /* @__PURE__ */ w("$ZodReadonly", (e, t) => {
|
|
1688
1688
|
N.init(e, t), O(e._zod, "propValues", () => t.innerType._zod.propValues), O(e._zod, "values", () => t.innerType._zod.values), O(e._zod, "optin", () => t.innerType?._zod?.optin), O(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => {
|
|
1689
1689
|
if (n.direction === "backward") return t.innerType._zod.run(e, n);
|
|
1690
1690
|
let r = t.innerType._zod.run(e, n);
|
|
@@ -1694,9 +1694,9 @@ var nr = /* @__PURE__ */ T("$ZodReadonly", (e, t) => {
|
|
|
1694
1694
|
function rr(e) {
|
|
1695
1695
|
return e.value = Object.freeze(e.value), e;
|
|
1696
1696
|
}
|
|
1697
|
-
var ir = /* @__PURE__ */
|
|
1697
|
+
var ir = /* @__PURE__ */ w("$ZodLazy", (e, t) => {
|
|
1698
1698
|
N.init(e, t), O(e._zod, "innerType", () => t.getter()), O(e._zod, "pattern", () => e._zod.innerType?._zod?.pattern), O(e._zod, "propValues", () => e._zod.innerType?._zod?.propValues), O(e._zod, "optin", () => e._zod.innerType?._zod?.optin ?? void 0), O(e._zod, "optout", () => e._zod.innerType?._zod?.optout ?? void 0), e._zod.parse = (t, n) => e._zod.innerType._zod.run(t, n);
|
|
1699
|
-
}), ar = /* @__PURE__ */
|
|
1699
|
+
}), ar = /* @__PURE__ */ w("$ZodCustom", (e, t) => {
|
|
1700
1700
|
M.init(e, t), N.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
|
|
1701
1701
|
let r = n.value, i = t.fn(r);
|
|
1702
1702
|
if (i instanceof Promise) return i.then((t) => or(t, n, r, e));
|
|
@@ -1760,7 +1760,7 @@ var ur = globalThis.__zod_globalRegistry;
|
|
|
1760
1760
|
function dr(e, t) {
|
|
1761
1761
|
return new e({
|
|
1762
1762
|
type: "string",
|
|
1763
|
-
...
|
|
1763
|
+
...j(t)
|
|
1764
1764
|
});
|
|
1765
1765
|
}
|
|
1766
1766
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1770,7 +1770,7 @@ function fr(e, t) {
|
|
|
1770
1770
|
format: "email",
|
|
1771
1771
|
check: "string_format",
|
|
1772
1772
|
abort: !1,
|
|
1773
|
-
...
|
|
1773
|
+
...j(t)
|
|
1774
1774
|
});
|
|
1775
1775
|
}
|
|
1776
1776
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1780,7 +1780,7 @@ function pr(e, t) {
|
|
|
1780
1780
|
format: "guid",
|
|
1781
1781
|
check: "string_format",
|
|
1782
1782
|
abort: !1,
|
|
1783
|
-
...
|
|
1783
|
+
...j(t)
|
|
1784
1784
|
});
|
|
1785
1785
|
}
|
|
1786
1786
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1790,7 +1790,7 @@ function mr(e, t) {
|
|
|
1790
1790
|
format: "uuid",
|
|
1791
1791
|
check: "string_format",
|
|
1792
1792
|
abort: !1,
|
|
1793
|
-
...
|
|
1793
|
+
...j(t)
|
|
1794
1794
|
});
|
|
1795
1795
|
}
|
|
1796
1796
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1801,7 +1801,7 @@ function hr(e, t) {
|
|
|
1801
1801
|
check: "string_format",
|
|
1802
1802
|
abort: !1,
|
|
1803
1803
|
version: "v4",
|
|
1804
|
-
...
|
|
1804
|
+
...j(t)
|
|
1805
1805
|
});
|
|
1806
1806
|
}
|
|
1807
1807
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1812,7 +1812,7 @@ function gr(e, t) {
|
|
|
1812
1812
|
check: "string_format",
|
|
1813
1813
|
abort: !1,
|
|
1814
1814
|
version: "v6",
|
|
1815
|
-
...
|
|
1815
|
+
...j(t)
|
|
1816
1816
|
});
|
|
1817
1817
|
}
|
|
1818
1818
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1823,7 +1823,7 @@ function _r(e, t) {
|
|
|
1823
1823
|
check: "string_format",
|
|
1824
1824
|
abort: !1,
|
|
1825
1825
|
version: "v7",
|
|
1826
|
-
...
|
|
1826
|
+
...j(t)
|
|
1827
1827
|
});
|
|
1828
1828
|
}
|
|
1829
1829
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1833,7 +1833,7 @@ function vr(e, t) {
|
|
|
1833
1833
|
format: "url",
|
|
1834
1834
|
check: "string_format",
|
|
1835
1835
|
abort: !1,
|
|
1836
|
-
...
|
|
1836
|
+
...j(t)
|
|
1837
1837
|
});
|
|
1838
1838
|
}
|
|
1839
1839
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1843,7 +1843,7 @@ function yr(e, t) {
|
|
|
1843
1843
|
format: "emoji",
|
|
1844
1844
|
check: "string_format",
|
|
1845
1845
|
abort: !1,
|
|
1846
|
-
...
|
|
1846
|
+
...j(t)
|
|
1847
1847
|
});
|
|
1848
1848
|
}
|
|
1849
1849
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1853,7 +1853,7 @@ function br(e, t) {
|
|
|
1853
1853
|
format: "nanoid",
|
|
1854
1854
|
check: "string_format",
|
|
1855
1855
|
abort: !1,
|
|
1856
|
-
...
|
|
1856
|
+
...j(t)
|
|
1857
1857
|
});
|
|
1858
1858
|
}
|
|
1859
1859
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1863,7 +1863,7 @@ function xr(e, t) {
|
|
|
1863
1863
|
format: "cuid",
|
|
1864
1864
|
check: "string_format",
|
|
1865
1865
|
abort: !1,
|
|
1866
|
-
...
|
|
1866
|
+
...j(t)
|
|
1867
1867
|
});
|
|
1868
1868
|
}
|
|
1869
1869
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1873,7 +1873,7 @@ function Sr(e, t) {
|
|
|
1873
1873
|
format: "cuid2",
|
|
1874
1874
|
check: "string_format",
|
|
1875
1875
|
abort: !1,
|
|
1876
|
-
...
|
|
1876
|
+
...j(t)
|
|
1877
1877
|
});
|
|
1878
1878
|
}
|
|
1879
1879
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1883,7 +1883,7 @@ function Cr(e, t) {
|
|
|
1883
1883
|
format: "ulid",
|
|
1884
1884
|
check: "string_format",
|
|
1885
1885
|
abort: !1,
|
|
1886
|
-
...
|
|
1886
|
+
...j(t)
|
|
1887
1887
|
});
|
|
1888
1888
|
}
|
|
1889
1889
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1893,7 +1893,7 @@ function wr(e, t) {
|
|
|
1893
1893
|
format: "xid",
|
|
1894
1894
|
check: "string_format",
|
|
1895
1895
|
abort: !1,
|
|
1896
|
-
...
|
|
1896
|
+
...j(t)
|
|
1897
1897
|
});
|
|
1898
1898
|
}
|
|
1899
1899
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1903,7 +1903,7 @@ function Tr(e, t) {
|
|
|
1903
1903
|
format: "ksuid",
|
|
1904
1904
|
check: "string_format",
|
|
1905
1905
|
abort: !1,
|
|
1906
|
-
...
|
|
1906
|
+
...j(t)
|
|
1907
1907
|
});
|
|
1908
1908
|
}
|
|
1909
1909
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1913,7 +1913,7 @@ function Er(e, t) {
|
|
|
1913
1913
|
format: "ipv4",
|
|
1914
1914
|
check: "string_format",
|
|
1915
1915
|
abort: !1,
|
|
1916
|
-
...
|
|
1916
|
+
...j(t)
|
|
1917
1917
|
});
|
|
1918
1918
|
}
|
|
1919
1919
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1923,7 +1923,7 @@ function Dr(e, t) {
|
|
|
1923
1923
|
format: "ipv6",
|
|
1924
1924
|
check: "string_format",
|
|
1925
1925
|
abort: !1,
|
|
1926
|
-
...
|
|
1926
|
+
...j(t)
|
|
1927
1927
|
});
|
|
1928
1928
|
}
|
|
1929
1929
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1933,7 +1933,7 @@ function Or(e, t) {
|
|
|
1933
1933
|
format: "cidrv4",
|
|
1934
1934
|
check: "string_format",
|
|
1935
1935
|
abort: !1,
|
|
1936
|
-
...
|
|
1936
|
+
...j(t)
|
|
1937
1937
|
});
|
|
1938
1938
|
}
|
|
1939
1939
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1943,7 +1943,7 @@ function kr(e, t) {
|
|
|
1943
1943
|
format: "cidrv6",
|
|
1944
1944
|
check: "string_format",
|
|
1945
1945
|
abort: !1,
|
|
1946
|
-
...
|
|
1946
|
+
...j(t)
|
|
1947
1947
|
});
|
|
1948
1948
|
}
|
|
1949
1949
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1953,7 +1953,7 @@ function Ar(e, t) {
|
|
|
1953
1953
|
format: "base64",
|
|
1954
1954
|
check: "string_format",
|
|
1955
1955
|
abort: !1,
|
|
1956
|
-
...
|
|
1956
|
+
...j(t)
|
|
1957
1957
|
});
|
|
1958
1958
|
}
|
|
1959
1959
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1963,7 +1963,7 @@ function jr(e, t) {
|
|
|
1963
1963
|
format: "base64url",
|
|
1964
1964
|
check: "string_format",
|
|
1965
1965
|
abort: !1,
|
|
1966
|
-
...
|
|
1966
|
+
...j(t)
|
|
1967
1967
|
});
|
|
1968
1968
|
}
|
|
1969
1969
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1973,7 +1973,7 @@ function Mr(e, t) {
|
|
|
1973
1973
|
format: "e164",
|
|
1974
1974
|
check: "string_format",
|
|
1975
1975
|
abort: !1,
|
|
1976
|
-
...
|
|
1976
|
+
...j(t)
|
|
1977
1977
|
});
|
|
1978
1978
|
}
|
|
1979
1979
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1983,7 +1983,7 @@ function Nr(e, t) {
|
|
|
1983
1983
|
format: "jwt",
|
|
1984
1984
|
check: "string_format",
|
|
1985
1985
|
abort: !1,
|
|
1986
|
-
...
|
|
1986
|
+
...j(t)
|
|
1987
1987
|
});
|
|
1988
1988
|
}
|
|
1989
1989
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -1995,7 +1995,7 @@ function Pr(e, t) {
|
|
|
1995
1995
|
offset: !1,
|
|
1996
1996
|
local: !1,
|
|
1997
1997
|
precision: null,
|
|
1998
|
-
...
|
|
1998
|
+
...j(t)
|
|
1999
1999
|
});
|
|
2000
2000
|
}
|
|
2001
2001
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -2004,7 +2004,7 @@ function Fr(e, t) {
|
|
|
2004
2004
|
type: "string",
|
|
2005
2005
|
format: "date",
|
|
2006
2006
|
check: "string_format",
|
|
2007
|
-
...
|
|
2007
|
+
...j(t)
|
|
2008
2008
|
});
|
|
2009
2009
|
}
|
|
2010
2010
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -2014,7 +2014,7 @@ function Ir(e, t) {
|
|
|
2014
2014
|
format: "time",
|
|
2015
2015
|
check: "string_format",
|
|
2016
2016
|
precision: null,
|
|
2017
|
-
...
|
|
2017
|
+
...j(t)
|
|
2018
2018
|
});
|
|
2019
2019
|
}
|
|
2020
2020
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -2023,7 +2023,7 @@ function Lr(e, t) {
|
|
|
2023
2023
|
type: "string",
|
|
2024
2024
|
format: "duration",
|
|
2025
2025
|
check: "string_format",
|
|
2026
|
-
...
|
|
2026
|
+
...j(t)
|
|
2027
2027
|
});
|
|
2028
2028
|
}
|
|
2029
2029
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -2031,7 +2031,7 @@ function Rr(e, t) {
|
|
|
2031
2031
|
return new e({
|
|
2032
2032
|
type: "number",
|
|
2033
2033
|
checks: [],
|
|
2034
|
-
...
|
|
2034
|
+
...j(t)
|
|
2035
2035
|
});
|
|
2036
2036
|
}
|
|
2037
2037
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -2041,14 +2041,14 @@ function zr(e, t) {
|
|
|
2041
2041
|
check: "number_format",
|
|
2042
2042
|
abort: !1,
|
|
2043
2043
|
format: "safeint",
|
|
2044
|
-
...
|
|
2044
|
+
...j(t)
|
|
2045
2045
|
});
|
|
2046
2046
|
}
|
|
2047
2047
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2048
2048
|
function Br(e, t) {
|
|
2049
2049
|
return new e({
|
|
2050
2050
|
type: "boolean",
|
|
2051
|
-
...
|
|
2051
|
+
...j(t)
|
|
2052
2052
|
});
|
|
2053
2053
|
}
|
|
2054
2054
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -2059,14 +2059,14 @@ function Vr(e) {
|
|
|
2059
2059
|
function Hr(e, t) {
|
|
2060
2060
|
return new e({
|
|
2061
2061
|
type: "never",
|
|
2062
|
-
...
|
|
2062
|
+
...j(t)
|
|
2063
2063
|
});
|
|
2064
2064
|
}
|
|
2065
2065
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2066
2066
|
function Ur(e, t) {
|
|
2067
2067
|
return new Mt({
|
|
2068
2068
|
check: "less_than",
|
|
2069
|
-
...
|
|
2069
|
+
...j(t),
|
|
2070
2070
|
value: e,
|
|
2071
2071
|
inclusive: !1
|
|
2072
2072
|
});
|
|
@@ -2075,7 +2075,7 @@ function Ur(e, t) {
|
|
|
2075
2075
|
function Wr(e, t) {
|
|
2076
2076
|
return new Mt({
|
|
2077
2077
|
check: "less_than",
|
|
2078
|
-
...
|
|
2078
|
+
...j(t),
|
|
2079
2079
|
value: e,
|
|
2080
2080
|
inclusive: !0
|
|
2081
2081
|
});
|
|
@@ -2084,7 +2084,7 @@ function Wr(e, t) {
|
|
|
2084
2084
|
function Gr(e, t) {
|
|
2085
2085
|
return new Nt({
|
|
2086
2086
|
check: "greater_than",
|
|
2087
|
-
...
|
|
2087
|
+
...j(t),
|
|
2088
2088
|
value: e,
|
|
2089
2089
|
inclusive: !1
|
|
2090
2090
|
});
|
|
@@ -2093,7 +2093,7 @@ function Gr(e, t) {
|
|
|
2093
2093
|
function Kr(e, t) {
|
|
2094
2094
|
return new Nt({
|
|
2095
2095
|
check: "greater_than",
|
|
2096
|
-
...
|
|
2096
|
+
...j(t),
|
|
2097
2097
|
value: e,
|
|
2098
2098
|
inclusive: !0
|
|
2099
2099
|
});
|
|
@@ -2102,7 +2102,7 @@ function Kr(e, t) {
|
|
|
2102
2102
|
function qr(e, t) {
|
|
2103
2103
|
return new Pt({
|
|
2104
2104
|
check: "multiple_of",
|
|
2105
|
-
...
|
|
2105
|
+
...j(t),
|
|
2106
2106
|
value: e
|
|
2107
2107
|
});
|
|
2108
2108
|
}
|
|
@@ -2110,7 +2110,7 @@ function qr(e, t) {
|
|
|
2110
2110
|
function Jr(e, t) {
|
|
2111
2111
|
return new It({
|
|
2112
2112
|
check: "max_length",
|
|
2113
|
-
...
|
|
2113
|
+
...j(t),
|
|
2114
2114
|
maximum: e
|
|
2115
2115
|
});
|
|
2116
2116
|
}
|
|
@@ -2118,7 +2118,7 @@ function Jr(e, t) {
|
|
|
2118
2118
|
function Yr(e, t) {
|
|
2119
2119
|
return new Lt({
|
|
2120
2120
|
check: "min_length",
|
|
2121
|
-
...
|
|
2121
|
+
...j(t),
|
|
2122
2122
|
minimum: e
|
|
2123
2123
|
});
|
|
2124
2124
|
}
|
|
@@ -2126,7 +2126,7 @@ function Yr(e, t) {
|
|
|
2126
2126
|
function Xr(e, t) {
|
|
2127
2127
|
return new Rt({
|
|
2128
2128
|
check: "length_equals",
|
|
2129
|
-
...
|
|
2129
|
+
...j(t),
|
|
2130
2130
|
length: e
|
|
2131
2131
|
});
|
|
2132
2132
|
}
|
|
@@ -2135,7 +2135,7 @@ function Zr(e, t) {
|
|
|
2135
2135
|
return new Bt({
|
|
2136
2136
|
check: "string_format",
|
|
2137
2137
|
format: "regex",
|
|
2138
|
-
...
|
|
2138
|
+
...j(t),
|
|
2139
2139
|
pattern: e
|
|
2140
2140
|
});
|
|
2141
2141
|
}
|
|
@@ -2144,7 +2144,7 @@ function Qr(e) {
|
|
|
2144
2144
|
return new Vt({
|
|
2145
2145
|
check: "string_format",
|
|
2146
2146
|
format: "lowercase",
|
|
2147
|
-
...
|
|
2147
|
+
...j(e)
|
|
2148
2148
|
});
|
|
2149
2149
|
}
|
|
2150
2150
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -2152,7 +2152,7 @@ function $r(e) {
|
|
|
2152
2152
|
return new Ht({
|
|
2153
2153
|
check: "string_format",
|
|
2154
2154
|
format: "uppercase",
|
|
2155
|
-
...
|
|
2155
|
+
...j(e)
|
|
2156
2156
|
});
|
|
2157
2157
|
}
|
|
2158
2158
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -2160,7 +2160,7 @@ function ei(e, t) {
|
|
|
2160
2160
|
return new Ut({
|
|
2161
2161
|
check: "string_format",
|
|
2162
2162
|
format: "includes",
|
|
2163
|
-
...
|
|
2163
|
+
...j(t),
|
|
2164
2164
|
includes: e
|
|
2165
2165
|
});
|
|
2166
2166
|
}
|
|
@@ -2169,7 +2169,7 @@ function ti(e, t) {
|
|
|
2169
2169
|
return new Wt({
|
|
2170
2170
|
check: "string_format",
|
|
2171
2171
|
format: "starts_with",
|
|
2172
|
-
...
|
|
2172
|
+
...j(t),
|
|
2173
2173
|
prefix: e
|
|
2174
2174
|
});
|
|
2175
2175
|
}
|
|
@@ -2178,7 +2178,7 @@ function ni(e, t) {
|
|
|
2178
2178
|
return new Gt({
|
|
2179
2179
|
check: "string_format",
|
|
2180
2180
|
format: "ends_with",
|
|
2181
|
-
...
|
|
2181
|
+
...j(t),
|
|
2182
2182
|
suffix: e
|
|
2183
2183
|
});
|
|
2184
2184
|
}
|
|
@@ -2207,19 +2207,19 @@ function si() {
|
|
|
2207
2207
|
}
|
|
2208
2208
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2209
2209
|
function ci() {
|
|
2210
|
-
return /* @__PURE__ */ ri((e) =>
|
|
2210
|
+
return /* @__PURE__ */ ri((e) => pe(e));
|
|
2211
2211
|
}
|
|
2212
2212
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2213
2213
|
function li(e, t, n) {
|
|
2214
2214
|
return new e({
|
|
2215
2215
|
type: "array",
|
|
2216
2216
|
element: t,
|
|
2217
|
-
...
|
|
2217
|
+
...j(n)
|
|
2218
2218
|
});
|
|
2219
2219
|
}
|
|
2220
2220
|
/* @__NO_SIDE_EFFECTS__ */
|
|
2221
2221
|
function ui(e, t, n) {
|
|
2222
|
-
let r =
|
|
2222
|
+
let r = j(n);
|
|
2223
2223
|
return r.abort ??= !0, new e({
|
|
2224
2224
|
type: "custom",
|
|
2225
2225
|
check: "custom",
|
|
@@ -2233,7 +2233,7 @@ function di(e, t, n) {
|
|
|
2233
2233
|
type: "custom",
|
|
2234
2234
|
check: "custom",
|
|
2235
2235
|
fn: t,
|
|
2236
|
-
...
|
|
2236
|
+
...j(n)
|
|
2237
2237
|
});
|
|
2238
2238
|
}
|
|
2239
2239
|
/* @__NO_SIDE_EFFECTS__ */
|
|
@@ -2251,7 +2251,7 @@ function fi(e) {
|
|
|
2251
2251
|
function pi(e, t) {
|
|
2252
2252
|
let n = new M({
|
|
2253
2253
|
check: "custom",
|
|
2254
|
-
...
|
|
2254
|
+
...j(t)
|
|
2255
2255
|
});
|
|
2256
2256
|
return n._zod.check = e, n;
|
|
2257
2257
|
}
|
|
@@ -2647,25 +2647,25 @@ var _i = (e, t = {}) => (n) => {
|
|
|
2647
2647
|
F(i, t, r);
|
|
2648
2648
|
let a = t.seen.get(e);
|
|
2649
2649
|
a.ref = i;
|
|
2650
|
-
}, Hi = /* @__PURE__ */
|
|
2650
|
+
}, Hi = /* @__PURE__ */ w("ZodISODateTime", (e, t) => {
|
|
2651
2651
|
cn.init(e, t), B.init(e, t);
|
|
2652
2652
|
});
|
|
2653
2653
|
function Ui(e) {
|
|
2654
2654
|
return /* @__PURE__ */ Pr(Hi, e);
|
|
2655
2655
|
}
|
|
2656
|
-
var Wi = /* @__PURE__ */
|
|
2656
|
+
var Wi = /* @__PURE__ */ w("ZodISODate", (e, t) => {
|
|
2657
2657
|
ln.init(e, t), B.init(e, t);
|
|
2658
2658
|
});
|
|
2659
2659
|
function Gi(e) {
|
|
2660
2660
|
return /* @__PURE__ */ Fr(Wi, e);
|
|
2661
2661
|
}
|
|
2662
|
-
var Ki = /* @__PURE__ */
|
|
2662
|
+
var Ki = /* @__PURE__ */ w("ZodISOTime", (e, t) => {
|
|
2663
2663
|
un.init(e, t), B.init(e, t);
|
|
2664
2664
|
});
|
|
2665
2665
|
function qi(e) {
|
|
2666
2666
|
return /* @__PURE__ */ Ir(Ki, e);
|
|
2667
2667
|
}
|
|
2668
|
-
var Ji = /* @__PURE__ */
|
|
2668
|
+
var Ji = /* @__PURE__ */ w("ZodISODuration", (e, t) => {
|
|
2669
2669
|
dn.init(e, t), B.init(e, t);
|
|
2670
2670
|
});
|
|
2671
2671
|
function Yi(e) {
|
|
@@ -2688,15 +2688,15 @@ var Xi = (e, t) => {
|
|
|
2688
2688
|
} }
|
|
2689
2689
|
});
|
|
2690
2690
|
};
|
|
2691
|
-
|
|
2692
|
-
var L =
|
|
2691
|
+
w("ZodError", Xi);
|
|
2692
|
+
var L = w("ZodError", Xi, { Parent: Error }), Zi = /* @__PURE__ */ Ve(L), Qi = /* @__PURE__ */ He(L), $i = /* @__PURE__ */ Ue(L), ea = /* @__PURE__ */ Ge(L), ta = /* @__PURE__ */ qe(L), na = /* @__PURE__ */ Je(L), ra = /* @__PURE__ */ Ye(L), ia = /* @__PURE__ */ Xe(L), aa = /* @__PURE__ */ Ze(L), oa = /* @__PURE__ */ Qe(L), sa = /* @__PURE__ */ $e(L), ca = /* @__PURE__ */ et(L), R = /* @__PURE__ */ w("ZodType", (e, t) => (N.init(e, t), Object.assign(e["~standard"], { jsonSchema: {
|
|
2693
2693
|
input: vi(e, "input"),
|
|
2694
2694
|
output: vi(e, "output")
|
|
2695
|
-
} }), e.toJSONSchema = _i(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(
|
|
2695
|
+
} }), e.toJSONSchema = _i(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(k(t, { checks: [...t.checks ?? [], ...n.map((e) => typeof e == "function" ? { _zod: {
|
|
2696
2696
|
check: e,
|
|
2697
2697
|
def: { check: "custom" },
|
|
2698
2698
|
onattach: []
|
|
2699
|
-
} } : e)] }), { parent: !0 }), e.with = e.check, e.clone = (t, n) =>
|
|
2699
|
+
} } : e)] }), { parent: !0 }), e.with = e.check, e.clone = (t, n) => A(e, t, n), e.brand = () => e, e.register = ((t, n) => (t.add(e, n), e)), e.parse = (t, n) => Zi(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => $i(e, t, n), e.parseAsync = async (t, n) => Qi(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => ea(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => ta(e, t, n), e.decode = (t, n) => na(e, t, n), e.encodeAsync = async (t, n) => ra(e, t, n), e.decodeAsync = async (t, n) => ia(e, t, n), e.safeEncode = (t, n) => aa(e, t, n), e.safeDecode = (t, n) => oa(e, t, n), e.safeEncodeAsync = async (t, n) => sa(e, t, n), e.safeDecodeAsync = async (t, n) => ca(e, t, n), e.refine = (t, n) => e.check(yo(t, n)), e.superRefine = (t) => e.check(bo(t)), e.overwrite = (t) => e.check(/* @__PURE__ */ ri(t)), e.optional = () => Za(e), e.exactOptional = () => $a(e), e.nullable = () => to(e), e.nullish = () => Za(to(e)), e.nonoptional = (t) => so(e, t), e.array = () => W(e), e.or = (t) => Ba([e, t]), e.and = (t) => Ha(e, t), e.transform = (t) => fo(e, Ya(t)), e.default = (t) => ro(e, t), e.prefault = (t) => ao(e, t), e.catch = (t) => lo(e, t), e.pipe = (t) => fo(e, t), e.readonly = () => mo(e), e.describe = (t) => {
|
|
2700
2700
|
let n = e.clone();
|
|
2701
2701
|
return ur.add(n, { description: t }), n;
|
|
2702
2702
|
}, Object.defineProperty(e, "description", {
|
|
@@ -2708,57 +2708,57 @@ var L = T("ZodError", Xi, { Parent: Error }), Zi = /* @__PURE__ */ Ve(L), Qi = /
|
|
|
2708
2708
|
if (t.length === 0) return ur.get(e);
|
|
2709
2709
|
let n = e.clone();
|
|
2710
2710
|
return ur.add(n, t[0]), n;
|
|
2711
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), la = /* @__PURE__ */
|
|
2711
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), la = /* @__PURE__ */ w("_ZodString", (e, t) => {
|
|
2712
2712
|
Yt.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => bi(e, t, n, r);
|
|
2713
2713
|
let n = e._zod.bag;
|
|
2714
2714
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...t) => e.check(/* @__PURE__ */ Zr(...t)), e.includes = (...t) => e.check(/* @__PURE__ */ ei(...t)), e.startsWith = (...t) => e.check(/* @__PURE__ */ ti(...t)), e.endsWith = (...t) => e.check(/* @__PURE__ */ ni(...t)), e.min = (...t) => e.check(/* @__PURE__ */ Yr(...t)), e.max = (...t) => e.check(/* @__PURE__ */ Jr(...t)), e.length = (...t) => e.check(/* @__PURE__ */ Xr(...t)), e.nonempty = (...t) => e.check(/* @__PURE__ */ Yr(1, ...t)), e.lowercase = (t) => e.check(/* @__PURE__ */ Qr(t)), e.uppercase = (t) => e.check(/* @__PURE__ */ $r(t)), e.trim = () => e.check(/* @__PURE__ */ ai()), e.normalize = (...t) => e.check(/* @__PURE__ */ ii(...t)), e.toLowerCase = () => e.check(/* @__PURE__ */ oi()), e.toUpperCase = () => e.check(/* @__PURE__ */ si()), e.slugify = () => e.check(/* @__PURE__ */ ci());
|
|
2715
|
-
}), ua = /* @__PURE__ */
|
|
2715
|
+
}), ua = /* @__PURE__ */ w("ZodString", (e, t) => {
|
|
2716
2716
|
Yt.init(e, t), la.init(e, t), e.email = (t) => e.check(/* @__PURE__ */ fr(da, t)), e.url = (t) => e.check(/* @__PURE__ */ vr(ma, t)), e.jwt = (t) => e.check(/* @__PURE__ */ Nr(ka, t)), e.emoji = (t) => e.check(/* @__PURE__ */ yr(ha, t)), e.guid = (t) => e.check(/* @__PURE__ */ pr(fa, t)), e.uuid = (t) => e.check(/* @__PURE__ */ mr(pa, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ hr(pa, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ gr(pa, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ _r(pa, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ br(ga, t)), e.guid = (t) => e.check(/* @__PURE__ */ pr(fa, t)), e.cuid = (t) => e.check(/* @__PURE__ */ xr(_a, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ Sr(va, t)), e.ulid = (t) => e.check(/* @__PURE__ */ Cr(ya, t)), e.base64 = (t) => e.check(/* @__PURE__ */ Ar(Ea, t)), e.base64url = (t) => e.check(/* @__PURE__ */ jr(Da, t)), e.xid = (t) => e.check(/* @__PURE__ */ wr(ba, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ Tr(xa, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ Er(Sa, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ Dr(Ca, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ Or(wa, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ kr(Ta, t)), e.e164 = (t) => e.check(/* @__PURE__ */ Mr(Oa, t)), e.datetime = (t) => e.check(Ui(t)), e.date = (t) => e.check(Gi(t)), e.time = (t) => e.check(qi(t)), e.duration = (t) => e.check(Yi(t));
|
|
2717
2717
|
});
|
|
2718
2718
|
function z(e) {
|
|
2719
2719
|
return /* @__PURE__ */ dr(ua, e);
|
|
2720
2720
|
}
|
|
2721
|
-
var B = /* @__PURE__ */
|
|
2721
|
+
var B = /* @__PURE__ */ w("ZodStringFormat", (e, t) => {
|
|
2722
2722
|
P.init(e, t), la.init(e, t);
|
|
2723
|
-
}), da = /* @__PURE__ */
|
|
2723
|
+
}), da = /* @__PURE__ */ w("ZodEmail", (e, t) => {
|
|
2724
2724
|
Qt.init(e, t), B.init(e, t);
|
|
2725
|
-
}), fa = /* @__PURE__ */
|
|
2725
|
+
}), fa = /* @__PURE__ */ w("ZodGUID", (e, t) => {
|
|
2726
2726
|
Xt.init(e, t), B.init(e, t);
|
|
2727
|
-
}), pa = /* @__PURE__ */
|
|
2727
|
+
}), pa = /* @__PURE__ */ w("ZodUUID", (e, t) => {
|
|
2728
2728
|
Zt.init(e, t), B.init(e, t);
|
|
2729
|
-
}), ma = /* @__PURE__ */
|
|
2729
|
+
}), ma = /* @__PURE__ */ w("ZodURL", (e, t) => {
|
|
2730
2730
|
$t.init(e, t), B.init(e, t);
|
|
2731
|
-
}), ha = /* @__PURE__ */
|
|
2731
|
+
}), ha = /* @__PURE__ */ w("ZodEmoji", (e, t) => {
|
|
2732
2732
|
en.init(e, t), B.init(e, t);
|
|
2733
|
-
}), ga = /* @__PURE__ */
|
|
2733
|
+
}), ga = /* @__PURE__ */ w("ZodNanoID", (e, t) => {
|
|
2734
2734
|
tn.init(e, t), B.init(e, t);
|
|
2735
|
-
}), _a = /* @__PURE__ */
|
|
2735
|
+
}), _a = /* @__PURE__ */ w("ZodCUID", (e, t) => {
|
|
2736
2736
|
nn.init(e, t), B.init(e, t);
|
|
2737
|
-
}), va = /* @__PURE__ */
|
|
2737
|
+
}), va = /* @__PURE__ */ w("ZodCUID2", (e, t) => {
|
|
2738
2738
|
rn.init(e, t), B.init(e, t);
|
|
2739
|
-
}), ya = /* @__PURE__ */
|
|
2739
|
+
}), ya = /* @__PURE__ */ w("ZodULID", (e, t) => {
|
|
2740
2740
|
an.init(e, t), B.init(e, t);
|
|
2741
|
-
}), ba = /* @__PURE__ */
|
|
2741
|
+
}), ba = /* @__PURE__ */ w("ZodXID", (e, t) => {
|
|
2742
2742
|
on.init(e, t), B.init(e, t);
|
|
2743
|
-
}), xa = /* @__PURE__ */
|
|
2743
|
+
}), xa = /* @__PURE__ */ w("ZodKSUID", (e, t) => {
|
|
2744
2744
|
sn.init(e, t), B.init(e, t);
|
|
2745
|
-
}), Sa = /* @__PURE__ */
|
|
2745
|
+
}), Sa = /* @__PURE__ */ w("ZodIPv4", (e, t) => {
|
|
2746
2746
|
fn.init(e, t), B.init(e, t);
|
|
2747
|
-
}), Ca = /* @__PURE__ */
|
|
2747
|
+
}), Ca = /* @__PURE__ */ w("ZodIPv6", (e, t) => {
|
|
2748
2748
|
pn.init(e, t), B.init(e, t);
|
|
2749
|
-
}), wa = /* @__PURE__ */
|
|
2749
|
+
}), wa = /* @__PURE__ */ w("ZodCIDRv4", (e, t) => {
|
|
2750
2750
|
mn.init(e, t), B.init(e, t);
|
|
2751
|
-
}), Ta = /* @__PURE__ */
|
|
2751
|
+
}), Ta = /* @__PURE__ */ w("ZodCIDRv6", (e, t) => {
|
|
2752
2752
|
hn.init(e, t), B.init(e, t);
|
|
2753
|
-
}), Ea = /* @__PURE__ */
|
|
2753
|
+
}), Ea = /* @__PURE__ */ w("ZodBase64", (e, t) => {
|
|
2754
2754
|
_n.init(e, t), B.init(e, t);
|
|
2755
|
-
}), Da = /* @__PURE__ */
|
|
2755
|
+
}), Da = /* @__PURE__ */ w("ZodBase64URL", (e, t) => {
|
|
2756
2756
|
yn.init(e, t), B.init(e, t);
|
|
2757
|
-
}), Oa = /* @__PURE__ */
|
|
2757
|
+
}), Oa = /* @__PURE__ */ w("ZodE164", (e, t) => {
|
|
2758
2758
|
bn.init(e, t), B.init(e, t);
|
|
2759
|
-
}), ka = /* @__PURE__ */
|
|
2759
|
+
}), ka = /* @__PURE__ */ w("ZodJWT", (e, t) => {
|
|
2760
2760
|
Sn.init(e, t), B.init(e, t);
|
|
2761
|
-
}), Aa = /* @__PURE__ */
|
|
2761
|
+
}), Aa = /* @__PURE__ */ w("ZodNumber", (e, t) => {
|
|
2762
2762
|
Cn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => xi(e, t, n, r), e.gt = (t, n) => e.check(/* @__PURE__ */ Gr(t, n)), e.gte = (t, n) => e.check(/* @__PURE__ */ Kr(t, n)), e.min = (t, n) => e.check(/* @__PURE__ */ Kr(t, n)), e.lt = (t, n) => e.check(/* @__PURE__ */ Ur(t, n)), e.lte = (t, n) => e.check(/* @__PURE__ */ Wr(t, n)), e.max = (t, n) => e.check(/* @__PURE__ */ Wr(t, n)), e.int = (t) => e.check(Ma(t)), e.safe = (t) => e.check(Ma(t)), e.positive = (t) => e.check(/* @__PURE__ */ Gr(0, t)), e.nonnegative = (t) => e.check(/* @__PURE__ */ Kr(0, t)), e.negative = (t) => e.check(/* @__PURE__ */ Ur(0, t)), e.nonpositive = (t) => e.check(/* @__PURE__ */ Wr(0, t)), e.multipleOf = (t, n) => e.check(/* @__PURE__ */ qr(t, n)), e.step = (t, n) => e.check(/* @__PURE__ */ qr(t, n)), e.finite = () => e;
|
|
2763
2763
|
let n = e._zod.bag;
|
|
2764
2764
|
e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null;
|
|
@@ -2766,37 +2766,37 @@ var B = /* @__PURE__ */ T("ZodStringFormat", (e, t) => {
|
|
|
2766
2766
|
function V(e) {
|
|
2767
2767
|
return /* @__PURE__ */ Rr(Aa, e);
|
|
2768
2768
|
}
|
|
2769
|
-
var ja = /* @__PURE__ */
|
|
2769
|
+
var ja = /* @__PURE__ */ w("ZodNumberFormat", (e, t) => {
|
|
2770
2770
|
wn.init(e, t), Aa.init(e, t);
|
|
2771
2771
|
});
|
|
2772
2772
|
function Ma(e) {
|
|
2773
2773
|
return /* @__PURE__ */ zr(ja, e);
|
|
2774
2774
|
}
|
|
2775
|
-
var Na = /* @__PURE__ */
|
|
2775
|
+
var Na = /* @__PURE__ */ w("ZodBoolean", (e, t) => {
|
|
2776
2776
|
Tn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Si(e, t, n, r);
|
|
2777
2777
|
});
|
|
2778
2778
|
function H(e) {
|
|
2779
2779
|
return /* @__PURE__ */ Br(Na, e);
|
|
2780
2780
|
}
|
|
2781
|
-
var Pa = /* @__PURE__ */
|
|
2781
|
+
var Pa = /* @__PURE__ */ w("ZodUnknown", (e, t) => {
|
|
2782
2782
|
En.init(e, t), R.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
|
|
2783
2783
|
});
|
|
2784
2784
|
function U() {
|
|
2785
2785
|
return /* @__PURE__ */ Vr(Pa);
|
|
2786
2786
|
}
|
|
2787
|
-
var Fa = /* @__PURE__ */
|
|
2787
|
+
var Fa = /* @__PURE__ */ w("ZodNever", (e, t) => {
|
|
2788
2788
|
Dn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ci(e, t, n, r);
|
|
2789
2789
|
});
|
|
2790
2790
|
function Ia(e) {
|
|
2791
2791
|
return /* @__PURE__ */ Hr(Fa, e);
|
|
2792
2792
|
}
|
|
2793
|
-
var La = /* @__PURE__ */
|
|
2793
|
+
var La = /* @__PURE__ */ w("ZodArray", (e, t) => {
|
|
2794
2794
|
kn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Oi(e, t, n, r), e.element = t.element, e.min = (t, n) => e.check(/* @__PURE__ */ Yr(t, n)), e.nonempty = (t) => e.check(/* @__PURE__ */ Yr(1, t)), e.max = (t, n) => e.check(/* @__PURE__ */ Jr(t, n)), e.length = (t, n) => e.check(/* @__PURE__ */ Xr(t, n)), e.unwrap = () => e.element;
|
|
2795
2795
|
});
|
|
2796
2796
|
function W(e, t) {
|
|
2797
2797
|
return /* @__PURE__ */ li(La, e, t);
|
|
2798
2798
|
}
|
|
2799
|
-
var Ra = /* @__PURE__ */
|
|
2799
|
+
var Ra = /* @__PURE__ */ w("ZodObject", (e, t) => {
|
|
2800
2800
|
Pn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => ki(e, t, n, r), O(e, "shape", () => t.shape), e.keyof = () => Ka(Object.keys(e._zod.def.shape)), e.catchall = (t) => e.clone({
|
|
2801
2801
|
...e._zod.def,
|
|
2802
2802
|
catchall: t
|
|
@@ -2812,26 +2812,26 @@ var Ra = /* @__PURE__ */ T("ZodObject", (e, t) => {
|
|
|
2812
2812
|
}), e.strip = () => e.clone({
|
|
2813
2813
|
...e._zod.def,
|
|
2814
2814
|
catchall: void 0
|
|
2815
|
-
}), e.extend = (t) =>
|
|
2815
|
+
}), e.extend = (t) => Te(e, t), e.safeExtend = (t) => Ee(e, t), e.merge = (t) => De(e, t), e.pick = (t) => Ce(e, t), e.omit = (t) => we(e, t), e.partial = (...t) => Oe(Xa, e, t[0]), e.required = (...t) => ke(oo, e, t[0]);
|
|
2816
2816
|
});
|
|
2817
2817
|
function G(e, t) {
|
|
2818
2818
|
return new Ra({
|
|
2819
2819
|
type: "object",
|
|
2820
2820
|
shape: e ?? {},
|
|
2821
|
-
...
|
|
2821
|
+
...j(t)
|
|
2822
2822
|
});
|
|
2823
2823
|
}
|
|
2824
|
-
var za = /* @__PURE__ */
|
|
2824
|
+
var za = /* @__PURE__ */ w("ZodUnion", (e, t) => {
|
|
2825
2825
|
In.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ai(e, t, n, r), e.options = t.options;
|
|
2826
2826
|
});
|
|
2827
2827
|
function Ba(e, t) {
|
|
2828
2828
|
return new za({
|
|
2829
2829
|
type: "union",
|
|
2830
2830
|
options: e,
|
|
2831
|
-
...
|
|
2831
|
+
...j(t)
|
|
2832
2832
|
});
|
|
2833
2833
|
}
|
|
2834
|
-
var Va = /* @__PURE__ */
|
|
2834
|
+
var Va = /* @__PURE__ */ w("ZodIntersection", (e, t) => {
|
|
2835
2835
|
Ln.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => ji(e, t, n, r);
|
|
2836
2836
|
});
|
|
2837
2837
|
function Ha(e, t) {
|
|
@@ -2841,7 +2841,7 @@ function Ha(e, t) {
|
|
|
2841
2841
|
right: t
|
|
2842
2842
|
});
|
|
2843
2843
|
}
|
|
2844
|
-
var Ua = /* @__PURE__ */
|
|
2844
|
+
var Ua = /* @__PURE__ */ w("ZodRecord", (e, t) => {
|
|
2845
2845
|
Bn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Mi(e, t, n, r), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
2846
2846
|
});
|
|
2847
2847
|
function Wa(e, t, n) {
|
|
@@ -2849,10 +2849,10 @@ function Wa(e, t, n) {
|
|
|
2849
2849
|
type: "record",
|
|
2850
2850
|
keyType: e,
|
|
2851
2851
|
valueType: t,
|
|
2852
|
-
...
|
|
2852
|
+
...j(n)
|
|
2853
2853
|
});
|
|
2854
2854
|
}
|
|
2855
|
-
var Ga = /* @__PURE__ */
|
|
2855
|
+
var Ga = /* @__PURE__ */ w("ZodEnum", (e, t) => {
|
|
2856
2856
|
Vn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => wi(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
2857
2857
|
let n = new Set(Object.keys(t.entries));
|
|
2858
2858
|
e.extract = (e, r) => {
|
|
@@ -2862,7 +2862,7 @@ var Ga = /* @__PURE__ */ T("ZodEnum", (e, t) => {
|
|
|
2862
2862
|
return new Ga({
|
|
2863
2863
|
...t,
|
|
2864
2864
|
checks: [],
|
|
2865
|
-
...
|
|
2865
|
+
...j(r),
|
|
2866
2866
|
entries: i
|
|
2867
2867
|
});
|
|
2868
2868
|
}, e.exclude = (e, r) => {
|
|
@@ -2872,7 +2872,7 @@ var Ga = /* @__PURE__ */ T("ZodEnum", (e, t) => {
|
|
|
2872
2872
|
return new Ga({
|
|
2873
2873
|
...t,
|
|
2874
2874
|
checks: [],
|
|
2875
|
-
...
|
|
2875
|
+
...j(r),
|
|
2876
2876
|
entries: i
|
|
2877
2877
|
});
|
|
2878
2878
|
};
|
|
@@ -2881,10 +2881,10 @@ function Ka(e, t) {
|
|
|
2881
2881
|
return new Ga({
|
|
2882
2882
|
type: "enum",
|
|
2883
2883
|
entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
|
|
2884
|
-
...
|
|
2884
|
+
...j(t)
|
|
2885
2885
|
});
|
|
2886
2886
|
}
|
|
2887
|
-
var qa = /* @__PURE__ */
|
|
2887
|
+
var qa = /* @__PURE__ */ w("ZodLiteral", (e, t) => {
|
|
2888
2888
|
Hn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ti(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
|
|
2889
2889
|
if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
2890
2890
|
return t.values[0];
|
|
@@ -2894,12 +2894,12 @@ function K(e, t) {
|
|
|
2894
2894
|
return new qa({
|
|
2895
2895
|
type: "literal",
|
|
2896
2896
|
values: Array.isArray(e) ? e : [e],
|
|
2897
|
-
...
|
|
2897
|
+
...j(t)
|
|
2898
2898
|
});
|
|
2899
2899
|
}
|
|
2900
|
-
var Ja = /* @__PURE__ */
|
|
2900
|
+
var Ja = /* @__PURE__ */ w("ZodTransform", (e, t) => {
|
|
2901
2901
|
Un.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Di(e, t, n, r), e._zod.parse = (n, r) => {
|
|
2902
|
-
if (r.direction === "backward") throw new
|
|
2902
|
+
if (r.direction === "backward") throw new E(e.constructor.name);
|
|
2903
2903
|
n.addIssue = (r) => {
|
|
2904
2904
|
if (typeof r == "string") n.issues.push(Fe(r, n.value, t));
|
|
2905
2905
|
else {
|
|
@@ -2917,7 +2917,7 @@ function Ya(e) {
|
|
|
2917
2917
|
transform: e
|
|
2918
2918
|
});
|
|
2919
2919
|
}
|
|
2920
|
-
var Xa = /* @__PURE__ */
|
|
2920
|
+
var Xa = /* @__PURE__ */ w("ZodOptional", (e, t) => {
|
|
2921
2921
|
Gn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Bi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2922
2922
|
});
|
|
2923
2923
|
function Za(e) {
|
|
@@ -2926,7 +2926,7 @@ function Za(e) {
|
|
|
2926
2926
|
innerType: e
|
|
2927
2927
|
});
|
|
2928
2928
|
}
|
|
2929
|
-
var Qa = /* @__PURE__ */
|
|
2929
|
+
var Qa = /* @__PURE__ */ w("ZodExactOptional", (e, t) => {
|
|
2930
2930
|
Kn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Bi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2931
2931
|
});
|
|
2932
2932
|
function $a(e) {
|
|
@@ -2935,7 +2935,7 @@ function $a(e) {
|
|
|
2935
2935
|
innerType: e
|
|
2936
2936
|
});
|
|
2937
2937
|
}
|
|
2938
|
-
var eo = /* @__PURE__ */
|
|
2938
|
+
var eo = /* @__PURE__ */ w("ZodNullable", (e, t) => {
|
|
2939
2939
|
qn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ni(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2940
2940
|
});
|
|
2941
2941
|
function to(e) {
|
|
@@ -2944,7 +2944,7 @@ function to(e) {
|
|
|
2944
2944
|
innerType: e
|
|
2945
2945
|
});
|
|
2946
2946
|
}
|
|
2947
|
-
var no = /* @__PURE__ */
|
|
2947
|
+
var no = /* @__PURE__ */ w("ZodDefault", (e, t) => {
|
|
2948
2948
|
Jn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Fi(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
2949
2949
|
});
|
|
2950
2950
|
function ro(e, t) {
|
|
@@ -2952,11 +2952,11 @@ function ro(e, t) {
|
|
|
2952
2952
|
type: "default",
|
|
2953
2953
|
innerType: e,
|
|
2954
2954
|
get defaultValue() {
|
|
2955
|
-
return typeof t == "function" ? t() :
|
|
2955
|
+
return typeof t == "function" ? t() : ve(t);
|
|
2956
2956
|
}
|
|
2957
2957
|
});
|
|
2958
2958
|
}
|
|
2959
|
-
var io = /* @__PURE__ */
|
|
2959
|
+
var io = /* @__PURE__ */ w("ZodPrefault", (e, t) => {
|
|
2960
2960
|
Xn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ii(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2961
2961
|
});
|
|
2962
2962
|
function ao(e, t) {
|
|
@@ -2964,21 +2964,21 @@ function ao(e, t) {
|
|
|
2964
2964
|
type: "prefault",
|
|
2965
2965
|
innerType: e,
|
|
2966
2966
|
get defaultValue() {
|
|
2967
|
-
return typeof t == "function" ? t() :
|
|
2967
|
+
return typeof t == "function" ? t() : ve(t);
|
|
2968
2968
|
}
|
|
2969
2969
|
});
|
|
2970
2970
|
}
|
|
2971
|
-
var oo = /* @__PURE__ */
|
|
2971
|
+
var oo = /* @__PURE__ */ w("ZodNonOptional", (e, t) => {
|
|
2972
2972
|
Zn.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Pi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
2973
2973
|
});
|
|
2974
2974
|
function so(e, t) {
|
|
2975
2975
|
return new oo({
|
|
2976
2976
|
type: "nonoptional",
|
|
2977
2977
|
innerType: e,
|
|
2978
|
-
...
|
|
2978
|
+
...j(t)
|
|
2979
2979
|
});
|
|
2980
2980
|
}
|
|
2981
|
-
var co = /* @__PURE__ */
|
|
2981
|
+
var co = /* @__PURE__ */ w("ZodCatch", (e, t) => {
|
|
2982
2982
|
$n.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Li(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
2983
2983
|
});
|
|
2984
2984
|
function lo(e, t) {
|
|
@@ -2988,7 +2988,7 @@ function lo(e, t) {
|
|
|
2988
2988
|
catchValue: typeof t == "function" ? t : () => t
|
|
2989
2989
|
});
|
|
2990
2990
|
}
|
|
2991
|
-
var uo = /* @__PURE__ */
|
|
2991
|
+
var uo = /* @__PURE__ */ w("ZodPipe", (e, t) => {
|
|
2992
2992
|
er.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ri(e, t, n, r), e.in = t.in, e.out = t.out;
|
|
2993
2993
|
});
|
|
2994
2994
|
function fo(e, t) {
|
|
@@ -2998,7 +2998,7 @@ function fo(e, t) {
|
|
|
2998
2998
|
out: t
|
|
2999
2999
|
});
|
|
3000
3000
|
}
|
|
3001
|
-
var po = /* @__PURE__ */
|
|
3001
|
+
var po = /* @__PURE__ */ w("ZodReadonly", (e, t) => {
|
|
3002
3002
|
nr.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => zi(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
|
|
3003
3003
|
});
|
|
3004
3004
|
function mo(e) {
|
|
@@ -3007,7 +3007,7 @@ function mo(e) {
|
|
|
3007
3007
|
innerType: e
|
|
3008
3008
|
});
|
|
3009
3009
|
}
|
|
3010
|
-
var ho = /* @__PURE__ */
|
|
3010
|
+
var ho = /* @__PURE__ */ w("ZodLazy", (e, t) => {
|
|
3011
3011
|
ir.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Vi(e, t, n, r), e.unwrap = () => e._zod.def.getter();
|
|
3012
3012
|
});
|
|
3013
3013
|
function go(e) {
|
|
@@ -3016,7 +3016,7 @@ function go(e) {
|
|
|
3016
3016
|
getter: e
|
|
3017
3017
|
});
|
|
3018
3018
|
}
|
|
3019
|
-
var _o = /* @__PURE__ */
|
|
3019
|
+
var _o = /* @__PURE__ */ w("ZodCustom", (e, t) => {
|
|
3020
3020
|
ar.init(e, t), R.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ei(e, t, n, r);
|
|
3021
3021
|
});
|
|
3022
3022
|
function vo(e, t) {
|
|
@@ -4501,7 +4501,7 @@ var xo = {
|
|
|
4501
4501
|
raw: Z(t.raw)
|
|
4502
4502
|
};
|
|
4503
4503
|
}, Tc = ({ store: e, transport: r, hooks: i, hookFailurePolicy: s, normalizedSchema: d, fields: f, reports: p, validate: m, getSubmitCount: h, markReportsLoading: g, resetReports: _, resetExplanations: v, syncDerivedFieldState: y, shouldResetInactiveFields: b, resolveInactiveFieldPolicy: ee, inactiveFieldPolicy: x }) => {
|
|
4504
|
-
let S = xc(),
|
|
4504
|
+
let S = xc(), te = Sc({
|
|
4505
4505
|
store: e,
|
|
4506
4506
|
resetReports: _,
|
|
4507
4507
|
resetExplanations: v,
|
|
@@ -4513,7 +4513,7 @@ var xo = {
|
|
|
4513
4513
|
inactiveFieldPolicy: x
|
|
4514
4514
|
});
|
|
4515
4515
|
}
|
|
4516
|
-
}),
|
|
4516
|
+
}), C = new Map(f.map((e) => [e.id, e])), ne = new Map(p.map((e) => [e.id, e])), w = async (e, t, n, r) => {
|
|
4517
4517
|
let a = Ls(t);
|
|
4518
4518
|
await i?.onSubmitError?.({
|
|
4519
4519
|
backend: e,
|
|
@@ -4521,12 +4521,12 @@ var xo = {
|
|
|
4521
4521
|
submitCount: n,
|
|
4522
4522
|
error: r
|
|
4523
4523
|
});
|
|
4524
|
-
},
|
|
4524
|
+
}, T = async (t, n, r, i, a, o) => {
|
|
4525
4525
|
let s = t instanceof c ? t : l(S.getAbortReason(n));
|
|
4526
|
-
throw S.getCurrentRequestId() === n && e.getState().lifecycleVersion === r &&
|
|
4527
|
-
},
|
|
4526
|
+
throw S.getCurrentRequestId() === n && e.getState().lifecycleVersion === r && te.abort(s.message), await w(o, a, i, s), s;
|
|
4527
|
+
}, E = async (t, n, r, i, a, s) => {
|
|
4528
4528
|
let c = t instanceof Error ? t.message : String(t);
|
|
4529
|
-
throw S.getCurrentRequestId() === n && e.getState().lifecycleVersion === r &&
|
|
4529
|
+
throw S.getCurrentRequestId() === n && e.getState().lifecycleVersion === r && te.fail(c), await w(s, a, i, t), new o(`Form submission failed: ${c}`, t);
|
|
4530
4530
|
}, re = (t, n, r) => {
|
|
4531
4531
|
S.getCurrentRequestId() !== n || e.getState().lifecycleVersion !== r || e.update((e) => ({
|
|
4532
4532
|
...e,
|
|
@@ -4611,14 +4611,14 @@ var xo = {
|
|
|
4611
4611
|
for (let [e, n] of Object.entries(t)) i[e] = e in i ? ie(i[e], n, "deep-merge") : Z(n);
|
|
4612
4612
|
return i;
|
|
4613
4613
|
}, ae = (e, t) => {
|
|
4614
|
-
let n =
|
|
4614
|
+
let n = ne.get(e);
|
|
4615
4615
|
n && n.commitState({
|
|
4616
4616
|
payload: Z(t),
|
|
4617
4617
|
error: null,
|
|
4618
4618
|
status: t === void 0 ? "idle" : "ready"
|
|
4619
4619
|
});
|
|
4620
4620
|
}, oe = (t, n, r, i) => {
|
|
4621
|
-
let a =
|
|
4621
|
+
let a = ne.get(r)?.config?.source ?? r, o = Z(e.getState().reportStates);
|
|
4622
4622
|
return {
|
|
4623
4623
|
backend: n,
|
|
4624
4624
|
values: Z(t.values),
|
|
@@ -4631,7 +4631,7 @@ var xo = {
|
|
|
4631
4631
|
raw: Z(i)
|
|
4632
4632
|
};
|
|
4633
4633
|
}, se = async (t, n, r, i) => {
|
|
4634
|
-
let a =
|
|
4634
|
+
let a = ne.get(t);
|
|
4635
4635
|
if (a) {
|
|
4636
4636
|
if (a.partialUpdatePolicy === "trust") {
|
|
4637
4637
|
ae(t, n);
|
|
@@ -4664,7 +4664,7 @@ var xo = {
|
|
|
4664
4664
|
}
|
|
4665
4665
|
}
|
|
4666
4666
|
}, ce = (t, n, r = "deep-merge") => {
|
|
4667
|
-
let i =
|
|
4667
|
+
let i = ne.get(t);
|
|
4668
4668
|
if (!i) return;
|
|
4669
4669
|
let a = e.getState().reportStates[t], o = ie(a?.payload, n, r);
|
|
4670
4670
|
i.commitState({
|
|
@@ -4673,7 +4673,7 @@ var xo = {
|
|
|
4673
4673
|
status: o === void 0 ? "idle" : "ready"
|
|
4674
4674
|
});
|
|
4675
4675
|
}, le = async (t, n, r = "deep-merge", i, a) => {
|
|
4676
|
-
let o =
|
|
4676
|
+
let o = ne.get(t);
|
|
4677
4677
|
if (!o) return;
|
|
4678
4678
|
if (o.partialUpdatePolicy === "trust") {
|
|
4679
4679
|
ce(t, n, r);
|
|
@@ -4707,7 +4707,7 @@ var xo = {
|
|
|
4707
4707
|
ce(t, n, r);
|
|
4708
4708
|
}
|
|
4709
4709
|
}, ue = (t) => {
|
|
4710
|
-
let n =
|
|
4710
|
+
let n = C.get(t.fieldId);
|
|
4711
4711
|
if (!n) return;
|
|
4712
4712
|
let r = e.getState().fieldStates[t.fieldId];
|
|
4713
4713
|
if (!r) return;
|
|
@@ -4747,17 +4747,17 @@ var xo = {
|
|
|
4747
4747
|
if (o?.signal?.aborted) throw S.clear(c), l(String(o.signal.reason ?? ""));
|
|
4748
4748
|
let y = zs(f, ee);
|
|
4749
4749
|
S.setActiveController(c, typeof AbortController < "u" ? new AbortController() : null), S.attachExternalSignal(o, c), e.batch(() => {
|
|
4750
|
-
g(),
|
|
4750
|
+
g(), te.start(c);
|
|
4751
4751
|
});
|
|
4752
|
-
let b = h(), x = e.getState().lifecycleVersion,
|
|
4752
|
+
let b = h(), x = e.getState().lifecycleVersion, C = S.createSignal(o);
|
|
4753
4753
|
try {
|
|
4754
4754
|
let a = Ls(y);
|
|
4755
4755
|
if (await i?.beforeSubmit?.({
|
|
4756
4756
|
backend: _,
|
|
4757
4757
|
...a,
|
|
4758
4758
|
submitCount: b,
|
|
4759
|
-
signal:
|
|
4760
|
-
}),
|
|
4759
|
+
signal: C
|
|
4760
|
+
}), C.aborted || S.isAborted(c)) throw l(S.getAbortReason(c));
|
|
4761
4761
|
let o = Ls(y), u = {
|
|
4762
4762
|
backend: _,
|
|
4763
4763
|
...o,
|
|
@@ -4767,7 +4767,7 @@ var xo = {
|
|
|
4767
4767
|
values: o.serializedValues,
|
|
4768
4768
|
fieldValues: o.serializedFieldValues
|
|
4769
4769
|
}) },
|
|
4770
|
-
signal:
|
|
4770
|
+
signal: C
|
|
4771
4771
|
}, f;
|
|
4772
4772
|
if (r.stream) {
|
|
4773
4773
|
let i = !1, a = await r.stream(u);
|
|
@@ -4779,7 +4779,7 @@ var xo = {
|
|
|
4779
4779
|
details: { backend: _ }
|
|
4780
4780
|
});
|
|
4781
4781
|
} else f = await r.submit(u);
|
|
4782
|
-
if (!(S.getCurrentRequestId() === c && e.getState().lifecycleVersion === x && !
|
|
4782
|
+
if (!(S.getCurrentRequestId() === c && e.getState().lifecycleVersion === x && !C.aborted && !S.isAborted(c))) throw l(S.getAbortReason(c));
|
|
4783
4783
|
let m = Bs(f), h = {
|
|
4784
4784
|
backend: _,
|
|
4785
4785
|
...y,
|
|
@@ -4791,7 +4791,7 @@ var xo = {
|
|
|
4791
4791
|
reportStates: {}
|
|
4792
4792
|
}), v = Cc(p, h, g), ee = wc(p, v);
|
|
4793
4793
|
e.batch(() => {
|
|
4794
|
-
Hs(p, g),
|
|
4794
|
+
Hs(p, g), te.succeed(ee);
|
|
4795
4795
|
});
|
|
4796
4796
|
try {
|
|
4797
4797
|
let e = Ls(y);
|
|
@@ -4803,13 +4803,13 @@ var xo = {
|
|
|
4803
4803
|
});
|
|
4804
4804
|
} catch (e) {
|
|
4805
4805
|
if (s?.afterSubmit !== "preserve-success") throw e;
|
|
4806
|
-
await
|
|
4806
|
+
await w(_, y, b, e);
|
|
4807
4807
|
}
|
|
4808
4808
|
return wc(p, v);
|
|
4809
4809
|
} catch (e) {
|
|
4810
|
-
return u(e) ||
|
|
4810
|
+
return u(e) || C.aborted || S.isAborted(c) ? await T(e, c, x, b, y, _) : await E(e, c, x, b, y, _);
|
|
4811
4811
|
} finally {
|
|
4812
|
-
S.clear(c),
|
|
4812
|
+
S.clear(c), te.clear(c);
|
|
4813
4813
|
}
|
|
4814
4814
|
},
|
|
4815
4815
|
abort(e) {
|
|
@@ -5152,7 +5152,7 @@ var xo = {
|
|
|
5152
5152
|
preserveExternalErrors: !1,
|
|
5153
5153
|
resetInactiveToInitial: d(),
|
|
5154
5154
|
inactiveFieldPolicy: e.inactiveFieldPolicy
|
|
5155
|
-
}),
|
|
5155
|
+
}), y(t, r);
|
|
5156
5156
|
});
|
|
5157
5157
|
}
|
|
5158
5158
|
});
|
|
@@ -5173,20 +5173,20 @@ var xo = {
|
|
|
5173
5173
|
store: n,
|
|
5174
5174
|
hooks: e.hooks
|
|
5175
5175
|
});
|
|
5176
|
-
}), g = new Map(p.map((e) => [e.id, e])), _ = /* @__PURE__ */ new Map();
|
|
5176
|
+
}), g = new Map(p.map((e) => [e.id, e])), _ = (e) => g.get(e) ?? g.get(Io(e)), v = /* @__PURE__ */ new Map();
|
|
5177
5177
|
for (let e of p) if (e.kind === "mapped-category") {
|
|
5178
5178
|
let t = e.config;
|
|
5179
5179
|
for (let n of t.options) if (n.mapping) {
|
|
5180
|
-
for (let t of Object.keys(n.mapping)) if (!
|
|
5180
|
+
for (let t of Object.keys(n.mapping)) if (!_(t)) throw new r(`mapped-category "${e.id}": mapping references unknown field "${t}".`);
|
|
5181
5181
|
}
|
|
5182
|
-
|
|
5182
|
+
v.set(e.id, t);
|
|
5183
5183
|
}
|
|
5184
|
-
let
|
|
5185
|
-
let a =
|
|
5184
|
+
let y = (t, i) => {
|
|
5185
|
+
let a = v.get(t);
|
|
5186
5186
|
if (!a) return;
|
|
5187
5187
|
let o = i[t], s = a.options.find((e) => e.value === o);
|
|
5188
5188
|
if (s?.mapping) for (let [a, o] of Object.entries(s.mapping)) {
|
|
5189
|
-
let s =
|
|
5189
|
+
let s = _(a);
|
|
5190
5190
|
if (!s) throw new r(`mapped-category "${t}": target field "${a}" not found in schema.`);
|
|
5191
5191
|
let l = s.coerceValue(o), u = e.registry.getField(s.kind);
|
|
5192
5192
|
if (u?.validate) {
|
|
@@ -5198,17 +5198,17 @@ var xo = {
|
|
|
5198
5198
|
});
|
|
5199
5199
|
if (Array.isArray(e) && e.length > 0) throw new r(`mapped-category "${t}": value ${JSON.stringify(o)} invalid for "${a}": ${e.join(", ")}`);
|
|
5200
5200
|
}
|
|
5201
|
-
let d = n.getState().fieldStates[
|
|
5201
|
+
let d = n.getState().fieldStates[s.id];
|
|
5202
5202
|
d && s.commitState({
|
|
5203
5203
|
...d,
|
|
5204
5204
|
value: l
|
|
5205
5205
|
});
|
|
5206
5206
|
}
|
|
5207
|
-
},
|
|
5207
|
+
}, b = new Map(m.map((e) => [e.id, e])), ee = new Map(h.map((e) => [e.id, e])), x = Object.freeze([...p]), S = Object.freeze([...m]), te = Object.freeze([...h]), C = () => {
|
|
5208
5208
|
for (let e of m) e.reset();
|
|
5209
|
-
},
|
|
5209
|
+
}, ne = () => {
|
|
5210
5210
|
for (let e of h) e.reset();
|
|
5211
|
-
},
|
|
5211
|
+
}, w = () => {
|
|
5212
5212
|
for (let e of m) e.markLoading();
|
|
5213
5213
|
}, T = () => (n.update((e) => $(e, { type: "bump-lifecycle" })), n.getState().lifecycleVersion);
|
|
5214
5214
|
function E(t) {
|
|
@@ -5224,7 +5224,7 @@ var xo = {
|
|
|
5224
5224
|
}
|
|
5225
5225
|
});
|
|
5226
5226
|
}
|
|
5227
|
-
let
|
|
5227
|
+
let re = bc({
|
|
5228
5228
|
store: n,
|
|
5229
5229
|
fields: p,
|
|
5230
5230
|
normalizedSchema: t,
|
|
@@ -5250,7 +5250,7 @@ var xo = {
|
|
|
5250
5250
|
},
|
|
5251
5251
|
shouldResetInactiveFields: d,
|
|
5252
5252
|
inactiveFieldPolicy: e.inactiveFieldPolicy
|
|
5253
|
-
}),
|
|
5253
|
+
}), D = Tc({
|
|
5254
5254
|
store: n,
|
|
5255
5255
|
transport: e.transport,
|
|
5256
5256
|
hooks: e.hooks,
|
|
@@ -5258,11 +5258,11 @@ var xo = {
|
|
|
5258
5258
|
normalizedSchema: t,
|
|
5259
5259
|
fields: p,
|
|
5260
5260
|
reports: m,
|
|
5261
|
-
validate: () =>
|
|
5261
|
+
validate: () => re.validate(),
|
|
5262
5262
|
getSubmitCount: c,
|
|
5263
|
-
markReportsLoading:
|
|
5263
|
+
markReportsLoading: w,
|
|
5264
5264
|
resetReports: C,
|
|
5265
|
-
resetExplanations:
|
|
5265
|
+
resetExplanations: ne,
|
|
5266
5266
|
syncDerivedFieldState: E,
|
|
5267
5267
|
shouldResetInactiveFields: d,
|
|
5268
5268
|
resolveInactiveFieldPolicy: f,
|
|
@@ -5275,13 +5275,13 @@ var xo = {
|
|
|
5275
5275
|
inactiveFieldPolicy: e.inactiveFieldPolicy
|
|
5276
5276
|
}), {
|
|
5277
5277
|
get fields() {
|
|
5278
|
-
return
|
|
5278
|
+
return x;
|
|
5279
5279
|
},
|
|
5280
5280
|
get reports() {
|
|
5281
|
-
return
|
|
5281
|
+
return S;
|
|
5282
5282
|
},
|
|
5283
5283
|
get explanations() {
|
|
5284
|
-
return
|
|
5284
|
+
return te;
|
|
5285
5285
|
},
|
|
5286
5286
|
get state() {
|
|
5287
5287
|
return o();
|
|
@@ -5290,10 +5290,10 @@ var xo = {
|
|
|
5290
5290
|
return g.get(e);
|
|
5291
5291
|
},
|
|
5292
5292
|
getReport(e) {
|
|
5293
|
-
return
|
|
5293
|
+
return b.get(e);
|
|
5294
5294
|
},
|
|
5295
5295
|
getExplanation(e) {
|
|
5296
|
-
return
|
|
5296
|
+
return ee.get(e);
|
|
5297
5297
|
},
|
|
5298
5298
|
getValues() {
|
|
5299
5299
|
return s();
|
|
@@ -5327,23 +5327,23 @@ var xo = {
|
|
|
5327
5327
|
resetInactiveToInitial: d(),
|
|
5328
5328
|
inactiveFieldPolicy: e.inactiveFieldPolicy
|
|
5329
5329
|
});
|
|
5330
|
-
for (let [e] of i)
|
|
5330
|
+
for (let [e] of i) y(e, a);
|
|
5331
5331
|
});
|
|
5332
5332
|
},
|
|
5333
5333
|
validate() {
|
|
5334
|
-
return
|
|
5334
|
+
return re.validate();
|
|
5335
5335
|
},
|
|
5336
5336
|
submit(e) {
|
|
5337
|
-
return
|
|
5337
|
+
return D.submit(e);
|
|
5338
5338
|
},
|
|
5339
5339
|
abortSubmit(e) {
|
|
5340
|
-
|
|
5340
|
+
D.abort(e);
|
|
5341
5341
|
},
|
|
5342
5342
|
reset() {
|
|
5343
5343
|
n.batch(() => {
|
|
5344
|
-
|
|
5344
|
+
D.abort("reset"), T();
|
|
5345
5345
|
for (let e of p) e.reset();
|
|
5346
|
-
C(),
|
|
5346
|
+
C(), ne(), D.reset(), n.update((e) => $(e, { type: "reset" })), E({
|
|
5347
5347
|
preserveValidationErrors: !1,
|
|
5348
5348
|
preserveExternalErrors: !1
|
|
5349
5349
|
});
|
|
@@ -5364,4 +5364,4 @@ var xo = {
|
|
|
5364
5364
|
};
|
|
5365
5365
|
};
|
|
5366
5366
|
//#endregion
|
|
5367
|
-
export {
|
|
5367
|
+
export { C as A, Fo as C, S as D, x as E, i as F, s as I, c as L, v as M, m as N, ne as O, r as P, o as R, Io as S, Mo as T, Ko as _, hs as a, Vo as b, _s as c, ds as d, us as f, qo as g, Jo as h, Os as i, ee as j, te as k, ps as l, Yo as m, Ns as n, gs as o, ls as p, As as r, vs as s, Hc as t, fs as u, Go as v, No as w, Ro as x, Wo as y, a as z };
|