@directus/themes 1.1.4 → 1.1.5
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/index.js +823 -837
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,38 +1,35 @@
|
|
|
1
|
-
import { computed as Ee, unref as
|
|
1
|
+
import { computed as Ee, unref as re, reactive as Si, defineComponent as Pi, toRefs as Zi, createBlock as ji, openBlock as Ci, Teleport as Ei, createTextVNode as Ni, toDisplayString as Ui } from "vue";
|
|
2
2
|
import { useHead as Li } from "@unhead/vue";
|
|
3
3
|
import { get as Zt, merge as An, mapKeys as Mi } from "lodash-es";
|
|
4
4
|
import { defineStore as Di, storeToRefs as Wi } from "pinia";
|
|
5
5
|
import Bi from "decamelize";
|
|
6
6
|
import { flatten as Ki } from "flat";
|
|
7
7
|
import { cssVar as Vi } from "@directus/utils/browser";
|
|
8
|
-
function
|
|
9
|
-
function t(
|
|
10
|
-
var
|
|
11
|
-
Object.defineProperty(
|
|
12
|
-
value:
|
|
8
|
+
function s(e, r, n) {
|
|
9
|
+
function t(f, p) {
|
|
10
|
+
var l;
|
|
11
|
+
Object.defineProperty(f, "_zod", {
|
|
12
|
+
value: f._zod ?? {},
|
|
13
13
|
enumerable: !1
|
|
14
|
-
}), (
|
|
15
|
-
for (const
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
}), (l = f._zod).traits ?? (l.traits = /* @__PURE__ */ new Set()), f._zod.traits.add(e), r(f, p);
|
|
15
|
+
for (const y in c.prototype)
|
|
16
|
+
y in f || Object.defineProperty(f, y, { value: c.prototype[y].bind(f) });
|
|
17
|
+
f._zod.constr = c, f._zod.def = p;
|
|
18
18
|
}
|
|
19
|
-
const o =
|
|
19
|
+
const o = n?.Parent ?? Object;
|
|
20
20
|
class u extends o {
|
|
21
21
|
}
|
|
22
22
|
Object.defineProperty(u, "name", { value: e });
|
|
23
|
-
function c(
|
|
24
|
-
var
|
|
25
|
-
const
|
|
26
|
-
t(
|
|
27
|
-
for (const
|
|
28
|
-
|
|
29
|
-
return
|
|
23
|
+
function c(f) {
|
|
24
|
+
var p;
|
|
25
|
+
const l = n?.Parent ? new u() : this;
|
|
26
|
+
t(l, f), (p = l._zod).deferred ?? (p.deferred = []);
|
|
27
|
+
for (const y of l._zod.deferred)
|
|
28
|
+
y();
|
|
29
|
+
return l;
|
|
30
30
|
}
|
|
31
31
|
return Object.defineProperty(c, "init", { value: t }), Object.defineProperty(c, Symbol.hasInstance, {
|
|
32
|
-
value: (
|
|
33
|
-
var m, p;
|
|
34
|
-
return n != null && n.Parent && s instanceof n.Parent ? !0 : (p = (m = s == null ? void 0 : s._zod) == null ? void 0 : m.traits) == null ? void 0 : p.has(e);
|
|
35
|
-
}
|
|
32
|
+
value: (f) => n?.Parent && f instanceof n.Parent ? !0 : f?._zod?.traits?.has(e)
|
|
36
33
|
}), Object.defineProperty(c, "name", { value: e }), c;
|
|
37
34
|
}
|
|
38
35
|
class _r extends Error {
|
|
@@ -40,9 +37,9 @@ class _r extends Error {
|
|
|
40
37
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
41
38
|
}
|
|
42
39
|
}
|
|
43
|
-
const
|
|
40
|
+
const go = {};
|
|
44
41
|
function Ne(e) {
|
|
45
|
-
return
|
|
42
|
+
return go;
|
|
46
43
|
}
|
|
47
44
|
function Hi(e) {
|
|
48
45
|
const r = Object.values(e).filter((t) => typeof t == "number");
|
|
@@ -51,7 +48,7 @@ function Hi(e) {
|
|
|
51
48
|
function Zn(e, r) {
|
|
52
49
|
return typeof r == "bigint" ? r.toString() : r;
|
|
53
50
|
}
|
|
54
|
-
function
|
|
51
|
+
function ho(e) {
|
|
55
52
|
return {
|
|
56
53
|
get value() {
|
|
57
54
|
{
|
|
@@ -72,11 +69,11 @@ function Gi(e, r) {
|
|
|
72
69
|
const n = (e.toString().split(".")[1] || "").length, t = r.toString();
|
|
73
70
|
let o = (t.split(".")[1] || "").length;
|
|
74
71
|
if (o === 0 && /\d?e-\d?/.test(t)) {
|
|
75
|
-
const
|
|
76
|
-
|
|
72
|
+
const p = t.match(/\d?e-(\d?)/);
|
|
73
|
+
p?.[1] && (o = Number.parseInt(p[1]));
|
|
77
74
|
}
|
|
78
|
-
const u = n > o ? n : o, c = Number.parseInt(e.toFixed(u).replace(".", "")),
|
|
79
|
-
return c %
|
|
75
|
+
const u = n > o ? n : o, c = Number.parseInt(e.toFixed(u).replace(".", "")), f = Number.parseInt(r.toFixed(u).replace(".", ""));
|
|
76
|
+
return c % f / 10 ** u;
|
|
80
77
|
}
|
|
81
78
|
const jt = Symbol("evaluating");
|
|
82
79
|
function k(e, r, n) {
|
|
@@ -119,13 +116,12 @@ const bo = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
|
119
116
|
function jn(e) {
|
|
120
117
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
121
118
|
}
|
|
122
|
-
const qi =
|
|
123
|
-
|
|
124
|
-
if (typeof navigator < "u" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
|
|
119
|
+
const qi = ho(() => {
|
|
120
|
+
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
125
121
|
return !1;
|
|
126
122
|
try {
|
|
127
|
-
const
|
|
128
|
-
return new
|
|
123
|
+
const e = Function;
|
|
124
|
+
return new e(""), !0;
|
|
129
125
|
} catch {
|
|
130
126
|
return !1;
|
|
131
127
|
}
|
|
@@ -145,16 +141,16 @@ function rr(e) {
|
|
|
145
141
|
}
|
|
146
142
|
function We(e, r, n) {
|
|
147
143
|
const t = new e._zod.constr(r ?? e._zod.def);
|
|
148
|
-
return (!r || n
|
|
144
|
+
return (!r || n?.parent) && (t._zod.parent = e), t;
|
|
149
145
|
}
|
|
150
|
-
function
|
|
146
|
+
function g(e) {
|
|
151
147
|
const r = e;
|
|
152
148
|
if (!r)
|
|
153
149
|
return {};
|
|
154
150
|
if (typeof r == "string")
|
|
155
151
|
return { error: () => r };
|
|
156
|
-
if (
|
|
157
|
-
if (
|
|
152
|
+
if (r?.message !== void 0) {
|
|
153
|
+
if (r?.error !== void 0)
|
|
158
154
|
throw new Error("Cannot specify both `message` and `error` params");
|
|
159
155
|
r.error = r.message;
|
|
160
156
|
}
|
|
@@ -277,9 +273,8 @@ function ou(e, r, n) {
|
|
|
277
273
|
return We(r, t);
|
|
278
274
|
}
|
|
279
275
|
function Or(e, r = 0) {
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
if (((n = e.issues[t]) == null ? void 0 : n.continue) !== !0)
|
|
276
|
+
for (let n = r; n < e.issues.length; n++)
|
|
277
|
+
if (e.issues[n]?.continue !== !0)
|
|
283
278
|
return !0;
|
|
284
279
|
return !1;
|
|
285
280
|
}
|
|
@@ -290,16 +285,15 @@ function Fo(e, r) {
|
|
|
290
285
|
});
|
|
291
286
|
}
|
|
292
287
|
function Kr(e) {
|
|
293
|
-
return typeof e == "string" ? e : e
|
|
288
|
+
return typeof e == "string" ? e : e?.message;
|
|
294
289
|
}
|
|
295
290
|
function Ue(e, r, n) {
|
|
296
|
-
var o, u, c, s, m, p;
|
|
297
291
|
const t = { ...e, path: e.path ?? [] };
|
|
298
292
|
if (!e.message) {
|
|
299
|
-
const
|
|
300
|
-
t.message =
|
|
293
|
+
const o = Kr(e.inst?._zod.def?.error?.(e)) ?? Kr(r?.error?.(e)) ?? Kr(n.customError?.(e)) ?? Kr(n.localeError?.(e)) ?? "Invalid input";
|
|
294
|
+
t.message = o;
|
|
301
295
|
}
|
|
302
|
-
return delete t.inst, delete t.continue, r
|
|
296
|
+
return delete t.inst, delete t.continue, r?.reportInput || delete t.input, t;
|
|
303
297
|
}
|
|
304
298
|
function Gn(e) {
|
|
305
299
|
return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
|
|
@@ -324,7 +318,7 @@ const vo = (e, r) => {
|
|
|
324
318
|
value: () => e.message,
|
|
325
319
|
enumerable: !1
|
|
326
320
|
});
|
|
327
|
-
}, Oo =
|
|
321
|
+
}, Oo = s("$ZodError", vo), $o = s("$ZodError", vo, { Parent: Error });
|
|
328
322
|
function iu(e, r = (n) => n.message) {
|
|
329
323
|
const n = {}, t = [];
|
|
330
324
|
for (const o of e.issues)
|
|
@@ -337,7 +331,7 @@ function uu(e, r) {
|
|
|
337
331
|
}, t = { _errors: [] }, o = (u) => {
|
|
338
332
|
for (const c of u.issues)
|
|
339
333
|
if (c.code === "invalid_union" && c.errors.length)
|
|
340
|
-
c.errors.map((
|
|
334
|
+
c.errors.map((f) => o({ issues: f }));
|
|
341
335
|
else if (c.code === "invalid_key")
|
|
342
336
|
o({ issues: c.issues });
|
|
343
337
|
else if (c.code === "invalid_element")
|
|
@@ -345,10 +339,10 @@ function uu(e, r) {
|
|
|
345
339
|
else if (c.path.length === 0)
|
|
346
340
|
t._errors.push(n(c));
|
|
347
341
|
else {
|
|
348
|
-
let
|
|
349
|
-
for (;
|
|
350
|
-
const
|
|
351
|
-
|
|
342
|
+
let f = t, p = 0;
|
|
343
|
+
for (; p < c.path.length; ) {
|
|
344
|
+
const l = c.path[p];
|
|
345
|
+
p === c.path.length - 1 ? (f[l] = f[l] || { _errors: [] }, f[l]._errors.push(n(c))) : f[l] = f[l] || { _errors: [] }, f = f[l], p++;
|
|
352
346
|
}
|
|
353
347
|
}
|
|
354
348
|
};
|
|
@@ -359,16 +353,16 @@ const cu = (e) => (r, n, t, o) => {
|
|
|
359
353
|
if (c instanceof Promise)
|
|
360
354
|
throw new _r();
|
|
361
355
|
if (c.issues.length) {
|
|
362
|
-
const
|
|
363
|
-
throw bo(
|
|
356
|
+
const f = new (o?.Err ?? e)(c.issues.map((p) => Ue(p, u, Ne())));
|
|
357
|
+
throw bo(f, o?.callee), f;
|
|
364
358
|
}
|
|
365
359
|
return c.value;
|
|
366
360
|
}, au = (e) => async (r, n, t, o) => {
|
|
367
361
|
const u = t ? Object.assign(t, { async: !0 }) : { async: !0 };
|
|
368
362
|
let c = r._zod.run({ value: n, issues: [] }, u);
|
|
369
363
|
if (c instanceof Promise && (c = await c), c.issues.length) {
|
|
370
|
-
const
|
|
371
|
-
throw bo(
|
|
364
|
+
const f = new (o?.Err ?? e)(c.issues.map((p) => Ue(p, u, Ne())));
|
|
365
|
+
throw bo(f, o?.callee), f;
|
|
372
366
|
}
|
|
373
367
|
return c.value;
|
|
374
368
|
}, _o = (e) => (r, n, t) => {
|
|
@@ -386,7 +380,7 @@ const cu = (e) => (r, n, t, o) => {
|
|
|
386
380
|
success: !1,
|
|
387
381
|
error: new e(u.issues.map((c) => Ue(c, o, Ne())))
|
|
388
382
|
} : { success: !0, data: u.value };
|
|
389
|
-
}, fu = /* @__PURE__ */ wo($o), du = /^[cC][^\s-]{8,}$/, mu = /^[0-9a-z]+$/, lu = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, pu = /^[0-9a-vA-V]{20}$/,
|
|
383
|
+
}, fu = /* @__PURE__ */ wo($o), du = /^[cC][^\s-]{8,}$/, mu = /^[0-9a-z]+$/, lu = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, pu = /^[0-9a-vA-V]{20}$/, gu = /^[A-Za-z0-9]{27}$/, hu = /^[a-zA-Z0-9_-]{21}$/, bu = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Fu = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, Et = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$/, vu = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Ou = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
390
384
|
function $u() {
|
|
391
385
|
return new RegExp(Ou, "u");
|
|
392
386
|
}
|
|
@@ -405,17 +399,17 @@ function Tu(e) {
|
|
|
405
399
|
return new RegExp(`^${Io}T(?:${t})$`);
|
|
406
400
|
}
|
|
407
401
|
const Su = (e) => {
|
|
408
|
-
const r = e ? `[\\s\\S]{${
|
|
402
|
+
const r = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
409
403
|
return new RegExp(`^${r}$`);
|
|
410
|
-
}, Pu = /^\d+$/, Zu = /^-?\d+(?:\.\d+)?/i, ju = /true|false/i, Cu = /^[^A-Z]*$/, Eu = /^[^a-z]*$/,
|
|
404
|
+
}, Pu = /^\d+$/, Zu = /^-?\d+(?:\.\d+)?/i, ju = /true|false/i, Cu = /^[^A-Z]*$/, Eu = /^[^a-z]*$/, Q = /* @__PURE__ */ s("$ZodCheck", (e, r) => {
|
|
411
405
|
var n;
|
|
412
406
|
e._zod ?? (e._zod = {}), e._zod.def = r, (n = e._zod).onattach ?? (n.onattach = []);
|
|
413
407
|
}), Ro = {
|
|
414
408
|
number: "number",
|
|
415
409
|
bigint: "bigint",
|
|
416
410
|
object: "date"
|
|
417
|
-
}, xo = /* @__PURE__ */
|
|
418
|
-
|
|
411
|
+
}, xo = /* @__PURE__ */ s("$ZodCheckLessThan", (e, r) => {
|
|
412
|
+
Q.init(e, r);
|
|
419
413
|
const n = Ro[typeof r.value];
|
|
420
414
|
e._zod.onattach.push((t) => {
|
|
421
415
|
const o = t._zod.bag, u = (r.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
@@ -431,8 +425,8 @@ const Su = (e) => {
|
|
|
431
425
|
continue: !r.abort
|
|
432
426
|
});
|
|
433
427
|
};
|
|
434
|
-
}), Ao = /* @__PURE__ */
|
|
435
|
-
|
|
428
|
+
}), Ao = /* @__PURE__ */ s("$ZodCheckGreaterThan", (e, r) => {
|
|
429
|
+
Q.init(e, r);
|
|
436
430
|
const n = Ro[typeof r.value];
|
|
437
431
|
e._zod.onattach.push((t) => {
|
|
438
432
|
const o = t._zod.bag, u = (r.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
@@ -448,8 +442,8 @@ const Su = (e) => {
|
|
|
448
442
|
continue: !r.abort
|
|
449
443
|
});
|
|
450
444
|
};
|
|
451
|
-
}), Nu = /* @__PURE__ */
|
|
452
|
-
|
|
445
|
+
}), Nu = /* @__PURE__ */ s("$ZodCheckMultipleOf", (e, r) => {
|
|
446
|
+
Q.init(e, r), e._zod.onattach.push((n) => {
|
|
453
447
|
var t;
|
|
454
448
|
(t = n._zod.bag).multipleOf ?? (t.multipleOf = r.value);
|
|
455
449
|
}), e._zod.check = (n) => {
|
|
@@ -464,38 +458,37 @@ const Su = (e) => {
|
|
|
464
458
|
continue: !r.abort
|
|
465
459
|
});
|
|
466
460
|
};
|
|
467
|
-
}), Uu = /* @__PURE__ */
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
const m = s.value;
|
|
461
|
+
}), Uu = /* @__PURE__ */ s("$ZodCheckNumberFormat", (e, r) => {
|
|
462
|
+
Q.init(e, r), r.format = r.format || "float64";
|
|
463
|
+
const n = r.format?.includes("int"), t = n ? "int" : "number", [o, u] = Xi[r.format];
|
|
464
|
+
e._zod.onattach.push((c) => {
|
|
465
|
+
const f = c._zod.bag;
|
|
466
|
+
f.format = r.format, f.minimum = o, f.maximum = u, n && (f.pattern = Pu);
|
|
467
|
+
}), e._zod.check = (c) => {
|
|
468
|
+
const f = c.value;
|
|
476
469
|
if (n) {
|
|
477
|
-
if (!Number.isInteger(
|
|
478
|
-
|
|
470
|
+
if (!Number.isInteger(f)) {
|
|
471
|
+
c.issues.push({
|
|
479
472
|
expected: t,
|
|
480
473
|
format: r.format,
|
|
481
474
|
code: "invalid_type",
|
|
482
475
|
continue: !1,
|
|
483
|
-
input:
|
|
476
|
+
input: f,
|
|
484
477
|
inst: e
|
|
485
478
|
});
|
|
486
479
|
return;
|
|
487
480
|
}
|
|
488
|
-
if (!Number.isSafeInteger(
|
|
489
|
-
|
|
490
|
-
input:
|
|
481
|
+
if (!Number.isSafeInteger(f)) {
|
|
482
|
+
f > 0 ? c.issues.push({
|
|
483
|
+
input: f,
|
|
491
484
|
code: "too_big",
|
|
492
485
|
maximum: Number.MAX_SAFE_INTEGER,
|
|
493
486
|
note: "Integers must be within the safe integer range.",
|
|
494
487
|
inst: e,
|
|
495
488
|
origin: t,
|
|
496
489
|
continue: !r.abort
|
|
497
|
-
}) :
|
|
498
|
-
input:
|
|
490
|
+
}) : c.issues.push({
|
|
491
|
+
input: f,
|
|
499
492
|
code: "too_small",
|
|
500
493
|
minimum: Number.MIN_SAFE_INTEGER,
|
|
501
494
|
note: "Integers must be within the safe integer range.",
|
|
@@ -506,25 +499,25 @@ const Su = (e) => {
|
|
|
506
499
|
return;
|
|
507
500
|
}
|
|
508
501
|
}
|
|
509
|
-
|
|
502
|
+
f < o && c.issues.push({
|
|
510
503
|
origin: "number",
|
|
511
|
-
input:
|
|
504
|
+
input: f,
|
|
512
505
|
code: "too_small",
|
|
513
506
|
minimum: o,
|
|
514
507
|
inclusive: !0,
|
|
515
508
|
inst: e,
|
|
516
509
|
continue: !r.abort
|
|
517
|
-
}),
|
|
510
|
+
}), f > u && c.issues.push({
|
|
518
511
|
origin: "number",
|
|
519
|
-
input:
|
|
512
|
+
input: f,
|
|
520
513
|
code: "too_big",
|
|
521
514
|
maximum: u,
|
|
522
515
|
inst: e
|
|
523
516
|
});
|
|
524
517
|
};
|
|
525
|
-
}), Lu = /* @__PURE__ */
|
|
518
|
+
}), Lu = /* @__PURE__ */ s("$ZodCheckMaxLength", (e, r) => {
|
|
526
519
|
var n;
|
|
527
|
-
|
|
520
|
+
Q.init(e, r), (n = e._zod.def).when ?? (n.when = (t) => {
|
|
528
521
|
const o = t.value;
|
|
529
522
|
return !Vn(o) && o.length !== void 0;
|
|
530
523
|
}), e._zod.onattach.push((t) => {
|
|
@@ -545,9 +538,9 @@ const Su = (e) => {
|
|
|
545
538
|
continue: !r.abort
|
|
546
539
|
});
|
|
547
540
|
};
|
|
548
|
-
}), Mu = /* @__PURE__ */
|
|
541
|
+
}), Mu = /* @__PURE__ */ s("$ZodCheckMinLength", (e, r) => {
|
|
549
542
|
var n;
|
|
550
|
-
|
|
543
|
+
Q.init(e, r), (n = e._zod.def).when ?? (n.when = (t) => {
|
|
551
544
|
const o = t.value;
|
|
552
545
|
return !Vn(o) && o.length !== void 0;
|
|
553
546
|
}), e._zod.onattach.push((t) => {
|
|
@@ -568,9 +561,9 @@ const Su = (e) => {
|
|
|
568
561
|
continue: !r.abort
|
|
569
562
|
});
|
|
570
563
|
};
|
|
571
|
-
}), Du = /* @__PURE__ */
|
|
564
|
+
}), Du = /* @__PURE__ */ s("$ZodCheckLengthEquals", (e, r) => {
|
|
572
565
|
var n;
|
|
573
|
-
|
|
566
|
+
Q.init(e, r), (n = e._zod.def).when ?? (n.when = (t) => {
|
|
574
567
|
const o = t.value;
|
|
575
568
|
return !Vn(o) && o.length !== void 0;
|
|
576
569
|
}), e._zod.onattach.push((t) => {
|
|
@@ -580,10 +573,10 @@ const Su = (e) => {
|
|
|
580
573
|
const o = t.value, u = o.length;
|
|
581
574
|
if (u === r.length)
|
|
582
575
|
return;
|
|
583
|
-
const c = Gn(o),
|
|
576
|
+
const c = Gn(o), f = u > r.length;
|
|
584
577
|
t.issues.push({
|
|
585
578
|
origin: c,
|
|
586
|
-
...
|
|
579
|
+
...f ? { code: "too_big", maximum: r.length } : { code: "too_small", minimum: r.length },
|
|
587
580
|
inclusive: !0,
|
|
588
581
|
exact: !0,
|
|
589
582
|
input: t.value,
|
|
@@ -591,9 +584,9 @@ const Su = (e) => {
|
|
|
591
584
|
continue: !r.abort
|
|
592
585
|
});
|
|
593
586
|
};
|
|
594
|
-
}), nn = /* @__PURE__ */
|
|
587
|
+
}), nn = /* @__PURE__ */ s("$ZodCheckStringFormat", (e, r) => {
|
|
595
588
|
var n, t;
|
|
596
|
-
|
|
589
|
+
Q.init(e, r), e._zod.onattach.push((o) => {
|
|
597
590
|
const u = o._zod.bag;
|
|
598
591
|
u.format = r.format, r.pattern && (u.patterns ?? (u.patterns = /* @__PURE__ */ new Set()), u.patterns.add(r.pattern));
|
|
599
592
|
}), r.pattern ? (n = e._zod).check ?? (n.check = (o) => {
|
|
@@ -608,7 +601,7 @@ const Su = (e) => {
|
|
|
608
601
|
});
|
|
609
602
|
}) : (t = e._zod).check ?? (t.check = () => {
|
|
610
603
|
});
|
|
611
|
-
}), Wu = /* @__PURE__ */
|
|
604
|
+
}), Wu = /* @__PURE__ */ s("$ZodCheckRegex", (e, r) => {
|
|
612
605
|
nn.init(e, r), e._zod.check = (n) => {
|
|
613
606
|
r.pattern.lastIndex = 0, !r.pattern.test(n.value) && n.issues.push({
|
|
614
607
|
origin: "string",
|
|
@@ -620,12 +613,12 @@ const Su = (e) => {
|
|
|
620
613
|
continue: !r.abort
|
|
621
614
|
});
|
|
622
615
|
};
|
|
623
|
-
}), Bu = /* @__PURE__ */
|
|
616
|
+
}), Bu = /* @__PURE__ */ s("$ZodCheckLowerCase", (e, r) => {
|
|
624
617
|
r.pattern ?? (r.pattern = Cu), nn.init(e, r);
|
|
625
|
-
}), Ku = /* @__PURE__ */
|
|
618
|
+
}), Ku = /* @__PURE__ */ s("$ZodCheckUpperCase", (e, r) => {
|
|
626
619
|
r.pattern ?? (r.pattern = Eu), nn.init(e, r);
|
|
627
|
-
}), Vu = /* @__PURE__ */
|
|
628
|
-
|
|
620
|
+
}), Vu = /* @__PURE__ */ s("$ZodCheckIncludes", (e, r) => {
|
|
621
|
+
Q.init(e, r);
|
|
629
622
|
const n = rr(r.includes), t = new RegExp(typeof r.position == "number" ? `^.{${r.position}}${n}` : n);
|
|
630
623
|
r.pattern = t, e._zod.onattach.push((o) => {
|
|
631
624
|
const u = o._zod.bag;
|
|
@@ -641,8 +634,8 @@ const Su = (e) => {
|
|
|
641
634
|
continue: !r.abort
|
|
642
635
|
});
|
|
643
636
|
};
|
|
644
|
-
}), Hu = /* @__PURE__ */
|
|
645
|
-
|
|
637
|
+
}), Hu = /* @__PURE__ */ s("$ZodCheckStartsWith", (e, r) => {
|
|
638
|
+
Q.init(e, r);
|
|
646
639
|
const n = new RegExp(`^${rr(r.prefix)}.*`);
|
|
647
640
|
r.pattern ?? (r.pattern = n), e._zod.onattach.push((t) => {
|
|
648
641
|
const o = t._zod.bag;
|
|
@@ -658,8 +651,8 @@ const Su = (e) => {
|
|
|
658
651
|
continue: !r.abort
|
|
659
652
|
});
|
|
660
653
|
};
|
|
661
|
-
}), Gu = /* @__PURE__ */
|
|
662
|
-
|
|
654
|
+
}), Gu = /* @__PURE__ */ s("$ZodCheckEndsWith", (e, r) => {
|
|
655
|
+
Q.init(e, r);
|
|
663
656
|
const n = new RegExp(`.*${rr(r.suffix)}$`);
|
|
664
657
|
r.pattern ?? (r.pattern = n), e._zod.onattach.push((t) => {
|
|
665
658
|
const o = t._zod.bag;
|
|
@@ -675,8 +668,8 @@ const Su = (e) => {
|
|
|
675
668
|
continue: !r.abort
|
|
676
669
|
});
|
|
677
670
|
};
|
|
678
|
-
}), qu = /* @__PURE__ */
|
|
679
|
-
|
|
671
|
+
}), qu = /* @__PURE__ */ s("$ZodCheckOverwrite", (e, r) => {
|
|
672
|
+
Q.init(e, r), e._zod.check = (n) => {
|
|
680
673
|
n.value = r.tx(n.value);
|
|
681
674
|
};
|
|
682
675
|
});
|
|
@@ -698,7 +691,7 @@ class Ju {
|
|
|
698
691
|
this.content.push(c);
|
|
699
692
|
}
|
|
700
693
|
compile() {
|
|
701
|
-
const r = Function, n = this
|
|
694
|
+
const r = Function, n = this?.args, o = [...(this?.content ?? [""]).map((u) => ` ${u}`)];
|
|
702
695
|
return new r(...n, o.join(`
|
|
703
696
|
`));
|
|
704
697
|
}
|
|
@@ -707,89 +700,83 @@ const Yu = {
|
|
|
707
700
|
major: 4,
|
|
708
701
|
minor: 0,
|
|
709
702
|
patch: 14
|
|
710
|
-
}, x = /* @__PURE__ */
|
|
711
|
-
var o;
|
|
703
|
+
}, x = /* @__PURE__ */ s("$ZodType", (e, r) => {
|
|
712
704
|
var n;
|
|
713
705
|
e ?? (e = {}), e._zod.def = r, e._zod.bag = e._zod.bag || {}, e._zod.version = Yu;
|
|
714
706
|
const t = [...e._zod.def.checks ?? []];
|
|
715
707
|
e._zod.traits.has("$ZodCheck") && t.unshift(e);
|
|
716
|
-
for (const
|
|
717
|
-
for (const
|
|
718
|
-
|
|
708
|
+
for (const o of t)
|
|
709
|
+
for (const u of o._zod.onattach)
|
|
710
|
+
u(e);
|
|
719
711
|
if (t.length === 0)
|
|
720
|
-
(n = e._zod).deferred ?? (n.deferred = []),
|
|
712
|
+
(n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
|
|
721
713
|
e._zod.run = e._zod.parse;
|
|
722
714
|
});
|
|
723
715
|
else {
|
|
724
|
-
const
|
|
725
|
-
let p = Or(
|
|
726
|
-
for (const
|
|
727
|
-
if (
|
|
728
|
-
if (!
|
|
716
|
+
const o = (u, c, f) => {
|
|
717
|
+
let p = Or(u), l;
|
|
718
|
+
for (const y of c) {
|
|
719
|
+
if (y._zod.def.when) {
|
|
720
|
+
if (!y._zod.def.when(u))
|
|
729
721
|
continue;
|
|
730
722
|
} else if (p)
|
|
731
723
|
continue;
|
|
732
|
-
const
|
|
733
|
-
if (
|
|
724
|
+
const b = u.issues.length, O = y._zod.check(u);
|
|
725
|
+
if (O instanceof Promise && f?.async === !1)
|
|
734
726
|
throw new _r();
|
|
735
|
-
if (
|
|
736
|
-
|
|
737
|
-
await
|
|
727
|
+
if (l || O instanceof Promise)
|
|
728
|
+
l = (l ?? Promise.resolve()).then(async () => {
|
|
729
|
+
await O, u.issues.length !== b && (p || (p = Or(u, b)));
|
|
738
730
|
});
|
|
739
731
|
else {
|
|
740
|
-
if (
|
|
732
|
+
if (u.issues.length === b)
|
|
741
733
|
continue;
|
|
742
|
-
p || (p = Or(
|
|
734
|
+
p || (p = Or(u, b));
|
|
743
735
|
}
|
|
744
736
|
}
|
|
745
|
-
return
|
|
737
|
+
return l ? l.then(() => u) : u;
|
|
746
738
|
};
|
|
747
|
-
e._zod.run = (
|
|
748
|
-
const
|
|
749
|
-
if (
|
|
750
|
-
if (
|
|
739
|
+
e._zod.run = (u, c) => {
|
|
740
|
+
const f = e._zod.parse(u, c);
|
|
741
|
+
if (f instanceof Promise) {
|
|
742
|
+
if (c.async === !1)
|
|
751
743
|
throw new _r();
|
|
752
|
-
return
|
|
744
|
+
return f.then((p) => o(p, t, c));
|
|
753
745
|
}
|
|
754
|
-
return
|
|
746
|
+
return o(f, t, c);
|
|
755
747
|
};
|
|
756
748
|
}
|
|
757
749
|
e["~standard"] = {
|
|
758
|
-
validate: (
|
|
759
|
-
var c;
|
|
750
|
+
validate: (o) => {
|
|
760
751
|
try {
|
|
761
|
-
const
|
|
762
|
-
return
|
|
752
|
+
const u = su(e, o);
|
|
753
|
+
return u.success ? { value: u.data } : { issues: u.error?.issues };
|
|
763
754
|
} catch {
|
|
764
|
-
return fu(e,
|
|
765
|
-
var p;
|
|
766
|
-
return m.success ? { value: m.data } : { issues: (p = m.error) == null ? void 0 : p.issues };
|
|
767
|
-
});
|
|
755
|
+
return fu(e, o).then((c) => c.success ? { value: c.data } : { issues: c.error?.issues });
|
|
768
756
|
}
|
|
769
757
|
},
|
|
770
758
|
vendor: "zod",
|
|
771
759
|
version: 1
|
|
772
760
|
};
|
|
773
|
-
}), qn = /* @__PURE__ */
|
|
774
|
-
|
|
775
|
-
x.init(e, r), e._zod.pattern = [...((n = e == null ? void 0 : e._zod.bag) == null ? void 0 : n.patterns) ?? []].pop() ?? Su(e._zod.bag), e._zod.parse = (t, o) => {
|
|
761
|
+
}), qn = /* @__PURE__ */ s("$ZodString", (e, r) => {
|
|
762
|
+
x.init(e, r), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Su(e._zod.bag), e._zod.parse = (n, t) => {
|
|
776
763
|
if (r.coerce)
|
|
777
764
|
try {
|
|
778
|
-
|
|
765
|
+
n.value = String(n.value);
|
|
779
766
|
} catch {
|
|
780
767
|
}
|
|
781
|
-
return typeof
|
|
768
|
+
return typeof n.value == "string" || n.issues.push({
|
|
782
769
|
expected: "string",
|
|
783
770
|
code: "invalid_type",
|
|
784
|
-
input:
|
|
771
|
+
input: n.value,
|
|
785
772
|
inst: e
|
|
786
|
-
}),
|
|
773
|
+
}), n;
|
|
787
774
|
};
|
|
788
|
-
}), R = /* @__PURE__ */
|
|
775
|
+
}), R = /* @__PURE__ */ s("$ZodStringFormat", (e, r) => {
|
|
789
776
|
nn.init(e, r), qn.init(e, r);
|
|
790
|
-
}), Xu = /* @__PURE__ */
|
|
777
|
+
}), Xu = /* @__PURE__ */ s("$ZodGUID", (e, r) => {
|
|
791
778
|
r.pattern ?? (r.pattern = Fu), R.init(e, r);
|
|
792
|
-
}), Qu = /* @__PURE__ */
|
|
779
|
+
}), Qu = /* @__PURE__ */ s("$ZodUUID", (e, r) => {
|
|
793
780
|
if (r.version) {
|
|
794
781
|
const t = {
|
|
795
782
|
v1: 1,
|
|
@@ -807,9 +794,9 @@ const Yu = {
|
|
|
807
794
|
} else
|
|
808
795
|
r.pattern ?? (r.pattern = Et());
|
|
809
796
|
R.init(e, r);
|
|
810
|
-
}), ec = /* @__PURE__ */
|
|
797
|
+
}), ec = /* @__PURE__ */ s("$ZodEmail", (e, r) => {
|
|
811
798
|
r.pattern ?? (r.pattern = vu), R.init(e, r);
|
|
812
|
-
}), rc = /* @__PURE__ */
|
|
799
|
+
}), rc = /* @__PURE__ */ s("$ZodURL", (e, r) => {
|
|
813
800
|
R.init(e, r), e._zod.check = (n) => {
|
|
814
801
|
try {
|
|
815
802
|
const t = n.value.trim(), o = new URL(t);
|
|
@@ -841,34 +828,34 @@ const Yu = {
|
|
|
841
828
|
});
|
|
842
829
|
}
|
|
843
830
|
};
|
|
844
|
-
}), nc = /* @__PURE__ */
|
|
831
|
+
}), nc = /* @__PURE__ */ s("$ZodEmoji", (e, r) => {
|
|
845
832
|
r.pattern ?? (r.pattern = $u()), R.init(e, r);
|
|
846
|
-
}), tc = /* @__PURE__ */
|
|
847
|
-
r.pattern ?? (r.pattern =
|
|
848
|
-
}), oc = /* @__PURE__ */
|
|
833
|
+
}), tc = /* @__PURE__ */ s("$ZodNanoID", (e, r) => {
|
|
834
|
+
r.pattern ?? (r.pattern = hu), R.init(e, r);
|
|
835
|
+
}), oc = /* @__PURE__ */ s("$ZodCUID", (e, r) => {
|
|
849
836
|
r.pattern ?? (r.pattern = du), R.init(e, r);
|
|
850
|
-
}), ic = /* @__PURE__ */
|
|
837
|
+
}), ic = /* @__PURE__ */ s("$ZodCUID2", (e, r) => {
|
|
851
838
|
r.pattern ?? (r.pattern = mu), R.init(e, r);
|
|
852
|
-
}), uc = /* @__PURE__ */
|
|
839
|
+
}), uc = /* @__PURE__ */ s("$ZodULID", (e, r) => {
|
|
853
840
|
r.pattern ?? (r.pattern = lu), R.init(e, r);
|
|
854
|
-
}), cc = /* @__PURE__ */
|
|
841
|
+
}), cc = /* @__PURE__ */ s("$ZodXID", (e, r) => {
|
|
855
842
|
r.pattern ?? (r.pattern = pu), R.init(e, r);
|
|
856
|
-
}), ac = /* @__PURE__ */
|
|
857
|
-
r.pattern ?? (r.pattern =
|
|
858
|
-
}), sc = /* @__PURE__ */
|
|
843
|
+
}), ac = /* @__PURE__ */ s("$ZodKSUID", (e, r) => {
|
|
844
|
+
r.pattern ?? (r.pattern = gu), R.init(e, r);
|
|
845
|
+
}), sc = /* @__PURE__ */ s("$ZodISODateTime", (e, r) => {
|
|
859
846
|
r.pattern ?? (r.pattern = Tu(r)), R.init(e, r);
|
|
860
|
-
}), fc = /* @__PURE__ */
|
|
847
|
+
}), fc = /* @__PURE__ */ s("$ZodISODate", (e, r) => {
|
|
861
848
|
r.pattern ?? (r.pattern = Au), R.init(e, r);
|
|
862
|
-
}), dc = /* @__PURE__ */
|
|
849
|
+
}), dc = /* @__PURE__ */ s("$ZodISOTime", (e, r) => {
|
|
863
850
|
r.pattern ?? (r.pattern = zu(r)), R.init(e, r);
|
|
864
|
-
}), mc = /* @__PURE__ */
|
|
851
|
+
}), mc = /* @__PURE__ */ s("$ZodISODuration", (e, r) => {
|
|
865
852
|
r.pattern ?? (r.pattern = bu), R.init(e, r);
|
|
866
|
-
}), lc = /* @__PURE__ */
|
|
853
|
+
}), lc = /* @__PURE__ */ s("$ZodIPv4", (e, r) => {
|
|
867
854
|
r.pattern ?? (r.pattern = _u), R.init(e, r), e._zod.onattach.push((n) => {
|
|
868
855
|
const t = n._zod.bag;
|
|
869
856
|
t.format = "ipv4";
|
|
870
857
|
});
|
|
871
|
-
}), pc = /* @__PURE__ */
|
|
858
|
+
}), pc = /* @__PURE__ */ s("$ZodIPv6", (e, r) => {
|
|
872
859
|
r.pattern ?? (r.pattern = wu), R.init(e, r), e._zod.onattach.push((n) => {
|
|
873
860
|
const t = n._zod.bag;
|
|
874
861
|
t.format = "ipv6";
|
|
@@ -885,9 +872,9 @@ const Yu = {
|
|
|
885
872
|
});
|
|
886
873
|
}
|
|
887
874
|
};
|
|
888
|
-
}),
|
|
875
|
+
}), gc = /* @__PURE__ */ s("$ZodCIDRv4", (e, r) => {
|
|
889
876
|
r.pattern ?? (r.pattern = yu), R.init(e, r);
|
|
890
|
-
}),
|
|
877
|
+
}), hc = /* @__PURE__ */ s("$ZodCIDRv6", (e, r) => {
|
|
891
878
|
r.pattern ?? (r.pattern = Iu), R.init(e, r), e._zod.check = (n) => {
|
|
892
879
|
const [t, o] = n.value.split("/");
|
|
893
880
|
try {
|
|
@@ -921,7 +908,7 @@ function zo(e) {
|
|
|
921
908
|
return !1;
|
|
922
909
|
}
|
|
923
910
|
}
|
|
924
|
-
const bc = /* @__PURE__ */
|
|
911
|
+
const bc = /* @__PURE__ */ s("$ZodBase64", (e, r) => {
|
|
925
912
|
r.pattern ?? (r.pattern = ku), R.init(e, r), e._zod.onattach.push((n) => {
|
|
926
913
|
n._zod.bag.contentEncoding = "base64";
|
|
927
914
|
}), e._zod.check = (n) => {
|
|
@@ -940,7 +927,7 @@ function Fc(e) {
|
|
|
940
927
|
const r = e.replace(/[-_]/g, (t) => t === "-" ? "+" : "/"), n = r.padEnd(Math.ceil(r.length / 4) * 4, "=");
|
|
941
928
|
return zo(n);
|
|
942
929
|
}
|
|
943
|
-
const vc = /* @__PURE__ */
|
|
930
|
+
const vc = /* @__PURE__ */ s("$ZodBase64URL", (e, r) => {
|
|
944
931
|
r.pattern ?? (r.pattern = yo), R.init(e, r), e._zod.onattach.push((n) => {
|
|
945
932
|
n._zod.bag.contentEncoding = "base64url";
|
|
946
933
|
}), e._zod.check = (n) => {
|
|
@@ -952,7 +939,7 @@ const vc = /* @__PURE__ */ f("$ZodBase64URL", (e, r) => {
|
|
|
952
939
|
continue: !r.abort
|
|
953
940
|
});
|
|
954
941
|
};
|
|
955
|
-
}), Oc = /* @__PURE__ */
|
|
942
|
+
}), Oc = /* @__PURE__ */ s("$ZodE164", (e, r) => {
|
|
956
943
|
r.pattern ?? (r.pattern = xu), R.init(e, r);
|
|
957
944
|
});
|
|
958
945
|
function $c(e, r = null) {
|
|
@@ -964,12 +951,12 @@ function $c(e, r = null) {
|
|
|
964
951
|
if (!t)
|
|
965
952
|
return !1;
|
|
966
953
|
const o = JSON.parse(atob(t));
|
|
967
|
-
return !("typ" in o &&
|
|
954
|
+
return !("typ" in o && o?.typ !== "JWT" || !o.alg || r && (!("alg" in o) || o.alg !== r));
|
|
968
955
|
} catch {
|
|
969
956
|
return !1;
|
|
970
957
|
}
|
|
971
958
|
}
|
|
972
|
-
const _c = /* @__PURE__ */
|
|
959
|
+
const _c = /* @__PURE__ */ s("$ZodJWT", (e, r) => {
|
|
973
960
|
R.init(e, r), e._zod.check = (n) => {
|
|
974
961
|
$c(n.value, r.alg) || n.issues.push({
|
|
975
962
|
code: "invalid_format",
|
|
@@ -979,7 +966,7 @@ const _c = /* @__PURE__ */ f("$ZodJWT", (e, r) => {
|
|
|
979
966
|
continue: !r.abort
|
|
980
967
|
});
|
|
981
968
|
};
|
|
982
|
-
}), To = /* @__PURE__ */
|
|
969
|
+
}), To = /* @__PURE__ */ s("$ZodNumber", (e, r) => {
|
|
983
970
|
x.init(e, r), e._zod.pattern = e._zod.bag.pattern ?? Zu, e._zod.parse = (n, t) => {
|
|
984
971
|
if (r.coerce)
|
|
985
972
|
try {
|
|
@@ -998,9 +985,9 @@ const _c = /* @__PURE__ */ f("$ZodJWT", (e, r) => {
|
|
|
998
985
|
...u ? { received: u } : {}
|
|
999
986
|
}), n;
|
|
1000
987
|
};
|
|
1001
|
-
}), wc = /* @__PURE__ */
|
|
988
|
+
}), wc = /* @__PURE__ */ s("$ZodNumber", (e, r) => {
|
|
1002
989
|
Uu.init(e, r), To.init(e, r);
|
|
1003
|
-
}), yc = /* @__PURE__ */
|
|
990
|
+
}), yc = /* @__PURE__ */ s("$ZodBoolean", (e, r) => {
|
|
1004
991
|
x.init(e, r), e._zod.pattern = ju, e._zod.parse = (n, t) => {
|
|
1005
992
|
if (r.coerce)
|
|
1006
993
|
try {
|
|
@@ -1015,9 +1002,9 @@ const _c = /* @__PURE__ */ f("$ZodJWT", (e, r) => {
|
|
|
1015
1002
|
inst: e
|
|
1016
1003
|
}), n;
|
|
1017
1004
|
};
|
|
1018
|
-
}), Ic = /* @__PURE__ */
|
|
1005
|
+
}), Ic = /* @__PURE__ */ s("$ZodUnknown", (e, r) => {
|
|
1019
1006
|
x.init(e, r), e._zod.parse = (n) => n;
|
|
1020
|
-
}), kc = /* @__PURE__ */
|
|
1007
|
+
}), kc = /* @__PURE__ */ s("$ZodNever", (e, r) => {
|
|
1021
1008
|
x.init(e, r), e._zod.parse = (n, t) => (n.issues.push({
|
|
1022
1009
|
expected: "never",
|
|
1023
1010
|
code: "invalid_type",
|
|
@@ -1028,7 +1015,7 @@ const _c = /* @__PURE__ */ f("$ZodJWT", (e, r) => {
|
|
|
1028
1015
|
function Nt(e, r, n) {
|
|
1029
1016
|
e.issues.length && r.issues.push(...Fo(n, e.issues)), r.value[n] = e.value;
|
|
1030
1017
|
}
|
|
1031
|
-
const Rc = /* @__PURE__ */
|
|
1018
|
+
const Rc = /* @__PURE__ */ s("$ZodArray", (e, r) => {
|
|
1032
1019
|
x.init(e, r), e._zod.parse = (n, t) => {
|
|
1033
1020
|
const o = n.value;
|
|
1034
1021
|
if (!Array.isArray(o))
|
|
@@ -1041,11 +1028,11 @@ const Rc = /* @__PURE__ */ f("$ZodArray", (e, r) => {
|
|
|
1041
1028
|
n.value = Array(o.length);
|
|
1042
1029
|
const u = [];
|
|
1043
1030
|
for (let c = 0; c < o.length; c++) {
|
|
1044
|
-
const
|
|
1045
|
-
value:
|
|
1031
|
+
const f = o[c], p = r.element._zod.run({
|
|
1032
|
+
value: f,
|
|
1046
1033
|
issues: []
|
|
1047
1034
|
}, t);
|
|
1048
|
-
|
|
1035
|
+
p instanceof Promise ? u.push(p.then((l) => Nt(l, n, c))) : Nt(p, n, c);
|
|
1049
1036
|
}
|
|
1050
1037
|
return u.length ? Promise.all(u).then(() => n) : n;
|
|
1051
1038
|
};
|
|
@@ -1053,111 +1040,111 @@ const Rc = /* @__PURE__ */ f("$ZodArray", (e, r) => {
|
|
|
1053
1040
|
function Vr(e, r, n, t) {
|
|
1054
1041
|
e.issues.length && r.issues.push(...Fo(n, e.issues)), e.value === void 0 ? n in t && (r.value[n] = void 0) : r.value[n] = e.value;
|
|
1055
1042
|
}
|
|
1056
|
-
const xc = /* @__PURE__ */
|
|
1043
|
+
const xc = /* @__PURE__ */ s("$ZodObject", (e, r) => {
|
|
1057
1044
|
x.init(e, r);
|
|
1058
|
-
const n =
|
|
1045
|
+
const n = ho(() => {
|
|
1059
1046
|
const b = Object.keys(r.shape);
|
|
1060
|
-
for (const
|
|
1061
|
-
if (!(r.shape[
|
|
1062
|
-
throw new Error(`Invalid element at key "${
|
|
1063
|
-
const
|
|
1047
|
+
for (const $ of b)
|
|
1048
|
+
if (!(r.shape[$] instanceof x))
|
|
1049
|
+
throw new Error(`Invalid element at key "${$}": expected a Zod schema`);
|
|
1050
|
+
const O = Yi(r.shape);
|
|
1064
1051
|
return {
|
|
1065
1052
|
shape: r.shape,
|
|
1066
1053
|
keys: b,
|
|
1067
1054
|
keySet: new Set(b),
|
|
1068
1055
|
numKeys: b.length,
|
|
1069
|
-
optionalKeys: new Set(
|
|
1056
|
+
optionalKeys: new Set(O)
|
|
1070
1057
|
};
|
|
1071
1058
|
});
|
|
1072
1059
|
k(e._zod, "propValues", () => {
|
|
1073
|
-
const b = r.shape,
|
|
1074
|
-
for (const
|
|
1075
|
-
const
|
|
1076
|
-
if (
|
|
1077
|
-
|
|
1078
|
-
for (const ye of
|
|
1079
|
-
|
|
1060
|
+
const b = r.shape, O = {};
|
|
1061
|
+
for (const $ in b) {
|
|
1062
|
+
const de = b[$]._zod;
|
|
1063
|
+
if (de.values) {
|
|
1064
|
+
O[$] ?? (O[$] = /* @__PURE__ */ new Set());
|
|
1065
|
+
for (const ye of de.values)
|
|
1066
|
+
O[$].add(ye);
|
|
1080
1067
|
}
|
|
1081
1068
|
}
|
|
1082
|
-
return
|
|
1069
|
+
return O;
|
|
1083
1070
|
});
|
|
1084
1071
|
const t = (b) => {
|
|
1085
|
-
const
|
|
1072
|
+
const O = new Ju(["shape", "payload", "ctx"]), $ = n.value, de = (me) => {
|
|
1086
1073
|
const L = Ct(me);
|
|
1087
1074
|
return `shape[${L}]._zod.run({ value: input[${L}], issues: [] }, ctx)`;
|
|
1088
1075
|
};
|
|
1089
|
-
|
|
1076
|
+
O.write("const input = payload.value;");
|
|
1090
1077
|
const ye = /* @__PURE__ */ Object.create(null);
|
|
1091
1078
|
let Rn = 0;
|
|
1092
|
-
for (const me of
|
|
1079
|
+
for (const me of $.keys)
|
|
1093
1080
|
ye[me] = `key_${Rn++}`;
|
|
1094
|
-
|
|
1095
|
-
for (const me of
|
|
1096
|
-
const L = ye[me],
|
|
1097
|
-
|
|
1081
|
+
O.write("const newResult = {}");
|
|
1082
|
+
for (const me of $.keys) {
|
|
1083
|
+
const L = ye[me], G = Ct(me);
|
|
1084
|
+
O.write(`const ${L} = ${de(me)};`), O.write(`
|
|
1098
1085
|
if (${L}.issues.length) {
|
|
1099
1086
|
payload.issues = payload.issues.concat(${L}.issues.map(iss => ({
|
|
1100
1087
|
...iss,
|
|
1101
|
-
path: iss.path ? [${
|
|
1088
|
+
path: iss.path ? [${G}, ...iss.path] : [${G}]
|
|
1102
1089
|
})));
|
|
1103
1090
|
}
|
|
1104
1091
|
|
|
1105
1092
|
if (${L}.value === undefined) {
|
|
1106
|
-
if (${
|
|
1107
|
-
newResult[${
|
|
1093
|
+
if (${G} in input) {
|
|
1094
|
+
newResult[${G}] = undefined;
|
|
1108
1095
|
}
|
|
1109
1096
|
} else {
|
|
1110
|
-
newResult[${
|
|
1097
|
+
newResult[${G}] = ${L}.value;
|
|
1111
1098
|
}
|
|
1112
1099
|
`);
|
|
1113
1100
|
}
|
|
1114
|
-
|
|
1115
|
-
const Br =
|
|
1101
|
+
O.write("payload.value = newResult;"), O.write("return payload;");
|
|
1102
|
+
const Br = O.compile();
|
|
1116
1103
|
return (me, L) => Br(b, me, L);
|
|
1117
1104
|
};
|
|
1118
1105
|
let o;
|
|
1119
|
-
const u = jn, c = !
|
|
1120
|
-
let
|
|
1121
|
-
e._zod.parse = (b,
|
|
1122
|
-
|
|
1123
|
-
const
|
|
1124
|
-
if (!u(
|
|
1106
|
+
const u = jn, c = !go.jitless, p = c && qi.value, l = r.catchall;
|
|
1107
|
+
let y;
|
|
1108
|
+
e._zod.parse = (b, O) => {
|
|
1109
|
+
y ?? (y = n.value);
|
|
1110
|
+
const $ = b.value;
|
|
1111
|
+
if (!u($))
|
|
1125
1112
|
return b.issues.push({
|
|
1126
1113
|
expected: "object",
|
|
1127
1114
|
code: "invalid_type",
|
|
1128
|
-
input:
|
|
1115
|
+
input: $,
|
|
1129
1116
|
inst: e
|
|
1130
1117
|
}), b;
|
|
1131
|
-
const
|
|
1132
|
-
if (c &&
|
|
1133
|
-
o || (o = t(r.shape)), b = o(b,
|
|
1118
|
+
const de = [];
|
|
1119
|
+
if (c && p && O?.async === !1 && O.jitless !== !0)
|
|
1120
|
+
o || (o = t(r.shape)), b = o(b, O);
|
|
1134
1121
|
else {
|
|
1135
1122
|
b.value = {};
|
|
1136
|
-
const L =
|
|
1137
|
-
for (const
|
|
1138
|
-
const xn = L[
|
|
1139
|
-
xn instanceof Promise ?
|
|
1123
|
+
const L = y.shape;
|
|
1124
|
+
for (const G of y.keys) {
|
|
1125
|
+
const xn = L[G]._zod.run({ value: $[G], issues: [] }, O);
|
|
1126
|
+
xn instanceof Promise ? de.push(xn.then((Ti) => Vr(Ti, b, G, $))) : Vr(xn, b, G, $);
|
|
1140
1127
|
}
|
|
1141
1128
|
}
|
|
1142
|
-
if (!
|
|
1143
|
-
return
|
|
1144
|
-
const ye = [], Rn =
|
|
1145
|
-
for (const L of Object.keys(
|
|
1129
|
+
if (!l)
|
|
1130
|
+
return de.length ? Promise.all(de).then(() => b) : b;
|
|
1131
|
+
const ye = [], Rn = y.keySet, Br = l._zod, me = Br.def.type;
|
|
1132
|
+
for (const L of Object.keys($)) {
|
|
1146
1133
|
if (Rn.has(L))
|
|
1147
1134
|
continue;
|
|
1148
1135
|
if (me === "never") {
|
|
1149
1136
|
ye.push(L);
|
|
1150
1137
|
continue;
|
|
1151
1138
|
}
|
|
1152
|
-
const
|
|
1153
|
-
|
|
1139
|
+
const G = Br.run({ value: $[L], issues: [] }, O);
|
|
1140
|
+
G instanceof Promise ? de.push(G.then((Pt) => Vr(Pt, b, L, $))) : Vr(G, b, L, $);
|
|
1154
1141
|
}
|
|
1155
1142
|
return ye.length && b.issues.push({
|
|
1156
1143
|
code: "unrecognized_keys",
|
|
1157
1144
|
keys: ye,
|
|
1158
|
-
input:
|
|
1145
|
+
input: $,
|
|
1159
1146
|
inst: e
|
|
1160
|
-
}),
|
|
1147
|
+
}), de.length ? Promise.all(de).then(() => b) : b;
|
|
1161
1148
|
};
|
|
1162
1149
|
});
|
|
1163
1150
|
function Ut(e, r, n, t) {
|
|
@@ -1172,7 +1159,7 @@ function Ut(e, r, n, t) {
|
|
|
1172
1159
|
errors: e.map((u) => u.issues.map((c) => Ue(c, t, Ne())))
|
|
1173
1160
|
}), r);
|
|
1174
1161
|
}
|
|
1175
|
-
const Ac = /* @__PURE__ */
|
|
1162
|
+
const Ac = /* @__PURE__ */ s("$ZodUnion", (e, r) => {
|
|
1176
1163
|
x.init(e, r), k(e._zod, "optin", () => r.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), k(e._zod, "optout", () => r.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), k(e._zod, "values", () => {
|
|
1177
1164
|
if (r.options.every((o) => o._zod.values))
|
|
1178
1165
|
return new Set(r.options.flatMap((o) => Array.from(o._zod.values)));
|
|
@@ -1187,26 +1174,26 @@ const Ac = /* @__PURE__ */ f("$ZodUnion", (e, r) => {
|
|
|
1187
1174
|
if (n)
|
|
1188
1175
|
return t(o, u);
|
|
1189
1176
|
let c = !1;
|
|
1190
|
-
const
|
|
1191
|
-
for (const
|
|
1192
|
-
const
|
|
1177
|
+
const f = [];
|
|
1178
|
+
for (const p of r.options) {
|
|
1179
|
+
const l = p._zod.run({
|
|
1193
1180
|
value: o.value,
|
|
1194
1181
|
issues: []
|
|
1195
1182
|
}, u);
|
|
1196
|
-
if (
|
|
1197
|
-
|
|
1183
|
+
if (l instanceof Promise)
|
|
1184
|
+
f.push(l), c = !0;
|
|
1198
1185
|
else {
|
|
1199
|
-
if (
|
|
1200
|
-
return
|
|
1201
|
-
|
|
1186
|
+
if (l.issues.length === 0)
|
|
1187
|
+
return l;
|
|
1188
|
+
f.push(l);
|
|
1202
1189
|
}
|
|
1203
1190
|
}
|
|
1204
|
-
return c ? Promise.all(
|
|
1191
|
+
return c ? Promise.all(f).then((p) => Ut(p, o, e, u)) : Ut(f, o, e, u);
|
|
1205
1192
|
};
|
|
1206
|
-
}), zc = /* @__PURE__ */
|
|
1193
|
+
}), zc = /* @__PURE__ */ s("$ZodIntersection", (e, r) => {
|
|
1207
1194
|
x.init(e, r), e._zod.parse = (n, t) => {
|
|
1208
1195
|
const o = n.value, u = r.left._zod.run({ value: o, issues: [] }, t), c = r.right._zod.run({ value: o, issues: [] }, t);
|
|
1209
|
-
return u instanceof Promise || c instanceof Promise ? Promise.all([u, c]).then(([
|
|
1196
|
+
return u instanceof Promise || c instanceof Promise ? Promise.all([u, c]).then(([p, l]) => Lt(n, p, l)) : Lt(n, u, c);
|
|
1210
1197
|
};
|
|
1211
1198
|
});
|
|
1212
1199
|
function En(e, r) {
|
|
@@ -1252,7 +1239,7 @@ function Lt(e, r, n) {
|
|
|
1252
1239
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(t.mergeErrorPath)}`);
|
|
1253
1240
|
return e.value = t.data, e;
|
|
1254
1241
|
}
|
|
1255
|
-
const Tc = /* @__PURE__ */
|
|
1242
|
+
const Tc = /* @__PURE__ */ s("$ZodEnum", (e, r) => {
|
|
1256
1243
|
x.init(e, r);
|
|
1257
1244
|
const n = Hi(r.entries), t = new Set(n);
|
|
1258
1245
|
e._zod.values = t, e._zod.pattern = new RegExp(`^(${n.filter((o) => Ji.has(typeof o)).map((o) => typeof o == "string" ? rr(o) : o.toString()).join("|")})$`), e._zod.parse = (o, u) => {
|
|
@@ -1264,7 +1251,7 @@ const Tc = /* @__PURE__ */ f("$ZodEnum", (e, r) => {
|
|
|
1264
1251
|
inst: e
|
|
1265
1252
|
}), o;
|
|
1266
1253
|
};
|
|
1267
|
-
}), Sc = /* @__PURE__ */
|
|
1254
|
+
}), Sc = /* @__PURE__ */ s("$ZodLiteral", (e, r) => {
|
|
1268
1255
|
if (x.init(e, r), r.values.length === 0)
|
|
1269
1256
|
throw new Error("Cannot create literal schema with no valid values");
|
|
1270
1257
|
e._zod.values = new Set(r.values), e._zod.pattern = new RegExp(`^(${r.values.map((n) => typeof n == "string" ? rr(n) : n ? rr(n.toString()) : String(n)).join("|")})$`), e._zod.parse = (n, t) => {
|
|
@@ -1276,7 +1263,7 @@ const Tc = /* @__PURE__ */ f("$ZodEnum", (e, r) => {
|
|
|
1276
1263
|
inst: e
|
|
1277
1264
|
}), n;
|
|
1278
1265
|
};
|
|
1279
|
-
}), Pc = /* @__PURE__ */
|
|
1266
|
+
}), Pc = /* @__PURE__ */ s("$ZodTransform", (e, r) => {
|
|
1280
1267
|
x.init(e, r), e._zod.parse = (n, t) => {
|
|
1281
1268
|
const o = r.transform(n.value, n);
|
|
1282
1269
|
if (t.async)
|
|
@@ -1289,7 +1276,7 @@ const Tc = /* @__PURE__ */ f("$ZodEnum", (e, r) => {
|
|
|
1289
1276
|
function Mt(e, r) {
|
|
1290
1277
|
return e.issues.length && r === void 0 ? { issues: [], value: void 0 } : e;
|
|
1291
1278
|
}
|
|
1292
|
-
const Zc = /* @__PURE__ */
|
|
1279
|
+
const Zc = /* @__PURE__ */ s("$ZodOptional", (e, r) => {
|
|
1293
1280
|
x.init(e, r), e._zod.optin = "optional", e._zod.optout = "optional", k(e._zod, "values", () => r.innerType._zod.values ? /* @__PURE__ */ new Set([...r.innerType._zod.values, void 0]) : void 0), k(e._zod, "pattern", () => {
|
|
1294
1281
|
const n = r.innerType._zod.pattern;
|
|
1295
1282
|
return n ? new RegExp(`^(${Hn(n.source)})?$`) : void 0;
|
|
@@ -1300,12 +1287,12 @@ const Zc = /* @__PURE__ */ f("$ZodOptional", (e, r) => {
|
|
|
1300
1287
|
}
|
|
1301
1288
|
return n.value === void 0 ? n : r.innerType._zod.run(n, t);
|
|
1302
1289
|
};
|
|
1303
|
-
}), jc = /* @__PURE__ */
|
|
1290
|
+
}), jc = /* @__PURE__ */ s("$ZodNullable", (e, r) => {
|
|
1304
1291
|
x.init(e, r), k(e._zod, "optin", () => r.innerType._zod.optin), k(e._zod, "optout", () => r.innerType._zod.optout), k(e._zod, "pattern", () => {
|
|
1305
1292
|
const n = r.innerType._zod.pattern;
|
|
1306
1293
|
return n ? new RegExp(`^(${Hn(n.source)}|null)$`) : void 0;
|
|
1307
1294
|
}), k(e._zod, "values", () => r.innerType._zod.values ? /* @__PURE__ */ new Set([...r.innerType._zod.values, null]) : void 0), e._zod.parse = (n, t) => n.value === null ? n : r.innerType._zod.run(n, t);
|
|
1308
|
-
}), Cc = /* @__PURE__ */
|
|
1295
|
+
}), Cc = /* @__PURE__ */ s("$ZodDefault", (e, r) => {
|
|
1309
1296
|
x.init(e, r), e._zod.optin = "optional", k(e._zod, "values", () => r.innerType._zod.values), e._zod.parse = (n, t) => {
|
|
1310
1297
|
if (n.value === void 0)
|
|
1311
1298
|
return n.value = r.defaultValue, n;
|
|
@@ -1316,9 +1303,9 @@ const Zc = /* @__PURE__ */ f("$ZodOptional", (e, r) => {
|
|
|
1316
1303
|
function Dt(e, r) {
|
|
1317
1304
|
return e.value === void 0 && (e.value = r.defaultValue), e;
|
|
1318
1305
|
}
|
|
1319
|
-
const Ec = /* @__PURE__ */
|
|
1306
|
+
const Ec = /* @__PURE__ */ s("$ZodPrefault", (e, r) => {
|
|
1320
1307
|
x.init(e, r), e._zod.optin = "optional", k(e._zod, "values", () => r.innerType._zod.values), e._zod.parse = (n, t) => (n.value === void 0 && (n.value = r.defaultValue), r.innerType._zod.run(n, t));
|
|
1321
|
-
}), Nc = /* @__PURE__ */
|
|
1308
|
+
}), Nc = /* @__PURE__ */ s("$ZodNonOptional", (e, r) => {
|
|
1322
1309
|
x.init(e, r), k(e._zod, "values", () => {
|
|
1323
1310
|
const n = r.innerType._zod.values;
|
|
1324
1311
|
return n ? new Set([...n].filter((t) => t !== void 0)) : void 0;
|
|
@@ -1335,7 +1322,7 @@ function Wt(e, r) {
|
|
|
1335
1322
|
inst: r
|
|
1336
1323
|
}), e;
|
|
1337
1324
|
}
|
|
1338
|
-
const Uc = /* @__PURE__ */
|
|
1325
|
+
const Uc = /* @__PURE__ */ s("$ZodCatch", (e, r) => {
|
|
1339
1326
|
x.init(e, r), k(e._zod, "optin", () => r.innerType._zod.optin), k(e._zod, "optout", () => r.innerType._zod.optout), k(e._zod, "values", () => r.innerType._zod.values), e._zod.parse = (n, t) => {
|
|
1340
1327
|
const o = r.innerType._zod.run(n, t);
|
|
1341
1328
|
return o instanceof Promise ? o.then((u) => (n.value = u.value, u.issues.length && (n.value = r.catchValue({
|
|
@@ -1352,7 +1339,7 @@ const Uc = /* @__PURE__ */ f("$ZodCatch", (e, r) => {
|
|
|
1352
1339
|
input: n.value
|
|
1353
1340
|
}), n.issues = []), n);
|
|
1354
1341
|
};
|
|
1355
|
-
}), Lc = /* @__PURE__ */
|
|
1342
|
+
}), Lc = /* @__PURE__ */ s("$ZodPipe", (e, r) => {
|
|
1356
1343
|
x.init(e, r), k(e._zod, "values", () => r.in._zod.values), k(e._zod, "optin", () => r.in._zod.optin), k(e._zod, "optout", () => r.out._zod.optout), k(e._zod, "propValues", () => r.in._zod.propValues), e._zod.parse = (n, t) => {
|
|
1357
1344
|
const o = r.in._zod.run(n, t);
|
|
1358
1345
|
return o instanceof Promise ? o.then((u) => Bt(u, r, t)) : Bt(o, r, t);
|
|
@@ -1361,7 +1348,7 @@ const Uc = /* @__PURE__ */ f("$ZodCatch", (e, r) => {
|
|
|
1361
1348
|
function Bt(e, r, n) {
|
|
1362
1349
|
return e.issues.length ? e : r.out._zod.run({ value: e.value, issues: e.issues }, n);
|
|
1363
1350
|
}
|
|
1364
|
-
const Mc = /* @__PURE__ */
|
|
1351
|
+
const Mc = /* @__PURE__ */ s("$ZodReadonly", (e, r) => {
|
|
1365
1352
|
x.init(e, r), k(e._zod, "propValues", () => r.innerType._zod.propValues), k(e._zod, "values", () => r.innerType._zod.values), k(e._zod, "optin", () => r.innerType._zod.optin), k(e._zod, "optout", () => r.innerType._zod.optout), e._zod.parse = (n, t) => {
|
|
1366
1353
|
const o = r.innerType._zod.run(n, t);
|
|
1367
1354
|
return o instanceof Promise ? o.then(Kt) : Kt(o);
|
|
@@ -1370,8 +1357,8 @@ const Mc = /* @__PURE__ */ f("$ZodReadonly", (e, r) => {
|
|
|
1370
1357
|
function Kt(e) {
|
|
1371
1358
|
return e.value = Object.freeze(e.value), e;
|
|
1372
1359
|
}
|
|
1373
|
-
const Dc = /* @__PURE__ */
|
|
1374
|
-
|
|
1360
|
+
const Dc = /* @__PURE__ */ s("$ZodCustom", (e, r) => {
|
|
1361
|
+
Q.init(e, r), x.init(e, r), e._zod.parse = (n, t) => n, e._zod.check = (n) => {
|
|
1375
1362
|
const t = n.value, o = r.fn(t);
|
|
1376
1363
|
if (o instanceof Promise)
|
|
1377
1364
|
return o.then((u) => Vt(u, n, t, e));
|
|
@@ -1434,7 +1421,7 @@ const Hr = /* @__PURE__ */ Bc();
|
|
|
1434
1421
|
function Kc(e, r) {
|
|
1435
1422
|
return new e({
|
|
1436
1423
|
type: "string",
|
|
1437
|
-
...
|
|
1424
|
+
...g(r)
|
|
1438
1425
|
});
|
|
1439
1426
|
}
|
|
1440
1427
|
function Vc(e, r) {
|
|
@@ -1443,7 +1430,7 @@ function Vc(e, r) {
|
|
|
1443
1430
|
format: "email",
|
|
1444
1431
|
check: "string_format",
|
|
1445
1432
|
abort: !1,
|
|
1446
|
-
...
|
|
1433
|
+
...g(r)
|
|
1447
1434
|
});
|
|
1448
1435
|
}
|
|
1449
1436
|
function Ht(e, r) {
|
|
@@ -1452,7 +1439,7 @@ function Ht(e, r) {
|
|
|
1452
1439
|
format: "guid",
|
|
1453
1440
|
check: "string_format",
|
|
1454
1441
|
abort: !1,
|
|
1455
|
-
...
|
|
1442
|
+
...g(r)
|
|
1456
1443
|
});
|
|
1457
1444
|
}
|
|
1458
1445
|
function Hc(e, r) {
|
|
@@ -1461,7 +1448,7 @@ function Hc(e, r) {
|
|
|
1461
1448
|
format: "uuid",
|
|
1462
1449
|
check: "string_format",
|
|
1463
1450
|
abort: !1,
|
|
1464
|
-
...
|
|
1451
|
+
...g(r)
|
|
1465
1452
|
});
|
|
1466
1453
|
}
|
|
1467
1454
|
function Gc(e, r) {
|
|
@@ -1471,7 +1458,7 @@ function Gc(e, r) {
|
|
|
1471
1458
|
check: "string_format",
|
|
1472
1459
|
abort: !1,
|
|
1473
1460
|
version: "v4",
|
|
1474
|
-
...
|
|
1461
|
+
...g(r)
|
|
1475
1462
|
});
|
|
1476
1463
|
}
|
|
1477
1464
|
function qc(e, r) {
|
|
@@ -1481,7 +1468,7 @@ function qc(e, r) {
|
|
|
1481
1468
|
check: "string_format",
|
|
1482
1469
|
abort: !1,
|
|
1483
1470
|
version: "v6",
|
|
1484
|
-
...
|
|
1471
|
+
...g(r)
|
|
1485
1472
|
});
|
|
1486
1473
|
}
|
|
1487
1474
|
function Jc(e, r) {
|
|
@@ -1491,7 +1478,7 @@ function Jc(e, r) {
|
|
|
1491
1478
|
check: "string_format",
|
|
1492
1479
|
abort: !1,
|
|
1493
1480
|
version: "v7",
|
|
1494
|
-
...
|
|
1481
|
+
...g(r)
|
|
1495
1482
|
});
|
|
1496
1483
|
}
|
|
1497
1484
|
function Yc(e, r) {
|
|
@@ -1500,7 +1487,7 @@ function Yc(e, r) {
|
|
|
1500
1487
|
format: "url",
|
|
1501
1488
|
check: "string_format",
|
|
1502
1489
|
abort: !1,
|
|
1503
|
-
...
|
|
1490
|
+
...g(r)
|
|
1504
1491
|
});
|
|
1505
1492
|
}
|
|
1506
1493
|
function Xc(e, r) {
|
|
@@ -1509,7 +1496,7 @@ function Xc(e, r) {
|
|
|
1509
1496
|
format: "emoji",
|
|
1510
1497
|
check: "string_format",
|
|
1511
1498
|
abort: !1,
|
|
1512
|
-
...
|
|
1499
|
+
...g(r)
|
|
1513
1500
|
});
|
|
1514
1501
|
}
|
|
1515
1502
|
function Qc(e, r) {
|
|
@@ -1518,7 +1505,7 @@ function Qc(e, r) {
|
|
|
1518
1505
|
format: "nanoid",
|
|
1519
1506
|
check: "string_format",
|
|
1520
1507
|
abort: !1,
|
|
1521
|
-
...
|
|
1508
|
+
...g(r)
|
|
1522
1509
|
});
|
|
1523
1510
|
}
|
|
1524
1511
|
function ea(e, r) {
|
|
@@ -1527,7 +1514,7 @@ function ea(e, r) {
|
|
|
1527
1514
|
format: "cuid",
|
|
1528
1515
|
check: "string_format",
|
|
1529
1516
|
abort: !1,
|
|
1530
|
-
...
|
|
1517
|
+
...g(r)
|
|
1531
1518
|
});
|
|
1532
1519
|
}
|
|
1533
1520
|
function ra(e, r) {
|
|
@@ -1536,7 +1523,7 @@ function ra(e, r) {
|
|
|
1536
1523
|
format: "cuid2",
|
|
1537
1524
|
check: "string_format",
|
|
1538
1525
|
abort: !1,
|
|
1539
|
-
...
|
|
1526
|
+
...g(r)
|
|
1540
1527
|
});
|
|
1541
1528
|
}
|
|
1542
1529
|
function na(e, r) {
|
|
@@ -1545,7 +1532,7 @@ function na(e, r) {
|
|
|
1545
1532
|
format: "ulid",
|
|
1546
1533
|
check: "string_format",
|
|
1547
1534
|
abort: !1,
|
|
1548
|
-
...
|
|
1535
|
+
...g(r)
|
|
1549
1536
|
});
|
|
1550
1537
|
}
|
|
1551
1538
|
function ta(e, r) {
|
|
@@ -1554,7 +1541,7 @@ function ta(e, r) {
|
|
|
1554
1541
|
format: "xid",
|
|
1555
1542
|
check: "string_format",
|
|
1556
1543
|
abort: !1,
|
|
1557
|
-
...
|
|
1544
|
+
...g(r)
|
|
1558
1545
|
});
|
|
1559
1546
|
}
|
|
1560
1547
|
function oa(e, r) {
|
|
@@ -1563,7 +1550,7 @@ function oa(e, r) {
|
|
|
1563
1550
|
format: "ksuid",
|
|
1564
1551
|
check: "string_format",
|
|
1565
1552
|
abort: !1,
|
|
1566
|
-
...
|
|
1553
|
+
...g(r)
|
|
1567
1554
|
});
|
|
1568
1555
|
}
|
|
1569
1556
|
function ia(e, r) {
|
|
@@ -1572,7 +1559,7 @@ function ia(e, r) {
|
|
|
1572
1559
|
format: "ipv4",
|
|
1573
1560
|
check: "string_format",
|
|
1574
1561
|
abort: !1,
|
|
1575
|
-
...
|
|
1562
|
+
...g(r)
|
|
1576
1563
|
});
|
|
1577
1564
|
}
|
|
1578
1565
|
function ua(e, r) {
|
|
@@ -1581,7 +1568,7 @@ function ua(e, r) {
|
|
|
1581
1568
|
format: "ipv6",
|
|
1582
1569
|
check: "string_format",
|
|
1583
1570
|
abort: !1,
|
|
1584
|
-
...
|
|
1571
|
+
...g(r)
|
|
1585
1572
|
});
|
|
1586
1573
|
}
|
|
1587
1574
|
function ca(e, r) {
|
|
@@ -1590,7 +1577,7 @@ function ca(e, r) {
|
|
|
1590
1577
|
format: "cidrv4",
|
|
1591
1578
|
check: "string_format",
|
|
1592
1579
|
abort: !1,
|
|
1593
|
-
...
|
|
1580
|
+
...g(r)
|
|
1594
1581
|
});
|
|
1595
1582
|
}
|
|
1596
1583
|
function aa(e, r) {
|
|
@@ -1599,7 +1586,7 @@ function aa(e, r) {
|
|
|
1599
1586
|
format: "cidrv6",
|
|
1600
1587
|
check: "string_format",
|
|
1601
1588
|
abort: !1,
|
|
1602
|
-
...
|
|
1589
|
+
...g(r)
|
|
1603
1590
|
});
|
|
1604
1591
|
}
|
|
1605
1592
|
function sa(e, r) {
|
|
@@ -1608,7 +1595,7 @@ function sa(e, r) {
|
|
|
1608
1595
|
format: "base64",
|
|
1609
1596
|
check: "string_format",
|
|
1610
1597
|
abort: !1,
|
|
1611
|
-
...
|
|
1598
|
+
...g(r)
|
|
1612
1599
|
});
|
|
1613
1600
|
}
|
|
1614
1601
|
function fa(e, r) {
|
|
@@ -1617,7 +1604,7 @@ function fa(e, r) {
|
|
|
1617
1604
|
format: "base64url",
|
|
1618
1605
|
check: "string_format",
|
|
1619
1606
|
abort: !1,
|
|
1620
|
-
...
|
|
1607
|
+
...g(r)
|
|
1621
1608
|
});
|
|
1622
1609
|
}
|
|
1623
1610
|
function da(e, r) {
|
|
@@ -1626,7 +1613,7 @@ function da(e, r) {
|
|
|
1626
1613
|
format: "e164",
|
|
1627
1614
|
check: "string_format",
|
|
1628
1615
|
abort: !1,
|
|
1629
|
-
...
|
|
1616
|
+
...g(r)
|
|
1630
1617
|
});
|
|
1631
1618
|
}
|
|
1632
1619
|
function ma(e, r) {
|
|
@@ -1635,7 +1622,7 @@ function ma(e, r) {
|
|
|
1635
1622
|
format: "jwt",
|
|
1636
1623
|
check: "string_format",
|
|
1637
1624
|
abort: !1,
|
|
1638
|
-
...
|
|
1625
|
+
...g(r)
|
|
1639
1626
|
});
|
|
1640
1627
|
}
|
|
1641
1628
|
function la(e, r) {
|
|
@@ -1646,7 +1633,7 @@ function la(e, r) {
|
|
|
1646
1633
|
offset: !1,
|
|
1647
1634
|
local: !1,
|
|
1648
1635
|
precision: null,
|
|
1649
|
-
...
|
|
1636
|
+
...g(r)
|
|
1650
1637
|
});
|
|
1651
1638
|
}
|
|
1652
1639
|
function pa(e, r) {
|
|
@@ -1654,31 +1641,31 @@ function pa(e, r) {
|
|
|
1654
1641
|
type: "string",
|
|
1655
1642
|
format: "date",
|
|
1656
1643
|
check: "string_format",
|
|
1657
|
-
...
|
|
1644
|
+
...g(r)
|
|
1658
1645
|
});
|
|
1659
1646
|
}
|
|
1660
|
-
function
|
|
1647
|
+
function ga(e, r) {
|
|
1661
1648
|
return new e({
|
|
1662
1649
|
type: "string",
|
|
1663
1650
|
format: "time",
|
|
1664
1651
|
check: "string_format",
|
|
1665
1652
|
precision: null,
|
|
1666
|
-
...
|
|
1653
|
+
...g(r)
|
|
1667
1654
|
});
|
|
1668
1655
|
}
|
|
1669
|
-
function
|
|
1656
|
+
function ha(e, r) {
|
|
1670
1657
|
return new e({
|
|
1671
1658
|
type: "string",
|
|
1672
1659
|
format: "duration",
|
|
1673
1660
|
check: "string_format",
|
|
1674
|
-
...
|
|
1661
|
+
...g(r)
|
|
1675
1662
|
});
|
|
1676
1663
|
}
|
|
1677
1664
|
function ba(e, r) {
|
|
1678
1665
|
return new e({
|
|
1679
1666
|
type: "number",
|
|
1680
1667
|
checks: [],
|
|
1681
|
-
...
|
|
1668
|
+
...g(r)
|
|
1682
1669
|
});
|
|
1683
1670
|
}
|
|
1684
1671
|
function Fa(e, r) {
|
|
@@ -1687,13 +1674,13 @@ function Fa(e, r) {
|
|
|
1687
1674
|
check: "number_format",
|
|
1688
1675
|
abort: !1,
|
|
1689
1676
|
format: "safeint",
|
|
1690
|
-
...
|
|
1677
|
+
...g(r)
|
|
1691
1678
|
});
|
|
1692
1679
|
}
|
|
1693
1680
|
function va(e, r) {
|
|
1694
1681
|
return new e({
|
|
1695
1682
|
type: "boolean",
|
|
1696
|
-
...
|
|
1683
|
+
...g(r)
|
|
1697
1684
|
});
|
|
1698
1685
|
}
|
|
1699
1686
|
function Oa(e) {
|
|
@@ -1704,13 +1691,13 @@ function Oa(e) {
|
|
|
1704
1691
|
function $a(e, r) {
|
|
1705
1692
|
return new e({
|
|
1706
1693
|
type: "never",
|
|
1707
|
-
...
|
|
1694
|
+
...g(r)
|
|
1708
1695
|
});
|
|
1709
1696
|
}
|
|
1710
1697
|
function Gt(e, r) {
|
|
1711
1698
|
return new xo({
|
|
1712
1699
|
check: "less_than",
|
|
1713
|
-
...
|
|
1700
|
+
...g(r),
|
|
1714
1701
|
value: e,
|
|
1715
1702
|
inclusive: !1
|
|
1716
1703
|
});
|
|
@@ -1718,7 +1705,7 @@ function Gt(e, r) {
|
|
|
1718
1705
|
function zn(e, r) {
|
|
1719
1706
|
return new xo({
|
|
1720
1707
|
check: "less_than",
|
|
1721
|
-
...
|
|
1708
|
+
...g(r),
|
|
1722
1709
|
value: e,
|
|
1723
1710
|
inclusive: !0
|
|
1724
1711
|
});
|
|
@@ -1726,7 +1713,7 @@ function zn(e, r) {
|
|
|
1726
1713
|
function qt(e, r) {
|
|
1727
1714
|
return new Ao({
|
|
1728
1715
|
check: "greater_than",
|
|
1729
|
-
...
|
|
1716
|
+
...g(r),
|
|
1730
1717
|
value: e,
|
|
1731
1718
|
inclusive: !1
|
|
1732
1719
|
});
|
|
@@ -1734,7 +1721,7 @@ function qt(e, r) {
|
|
|
1734
1721
|
function Tn(e, r) {
|
|
1735
1722
|
return new Ao({
|
|
1736
1723
|
check: "greater_than",
|
|
1737
|
-
...
|
|
1724
|
+
...g(r),
|
|
1738
1725
|
value: e,
|
|
1739
1726
|
inclusive: !0
|
|
1740
1727
|
});
|
|
@@ -1742,28 +1729,28 @@ function Tn(e, r) {
|
|
|
1742
1729
|
function Jt(e, r) {
|
|
1743
1730
|
return new Nu({
|
|
1744
1731
|
check: "multiple_of",
|
|
1745
|
-
...
|
|
1732
|
+
...g(r),
|
|
1746
1733
|
value: e
|
|
1747
1734
|
});
|
|
1748
1735
|
}
|
|
1749
1736
|
function So(e, r) {
|
|
1750
1737
|
return new Lu({
|
|
1751
1738
|
check: "max_length",
|
|
1752
|
-
...
|
|
1739
|
+
...g(r),
|
|
1753
1740
|
maximum: e
|
|
1754
1741
|
});
|
|
1755
1742
|
}
|
|
1756
1743
|
function Yr(e, r) {
|
|
1757
1744
|
return new Mu({
|
|
1758
1745
|
check: "min_length",
|
|
1759
|
-
...
|
|
1746
|
+
...g(r),
|
|
1760
1747
|
minimum: e
|
|
1761
1748
|
});
|
|
1762
1749
|
}
|
|
1763
1750
|
function Po(e, r) {
|
|
1764
1751
|
return new Du({
|
|
1765
1752
|
check: "length_equals",
|
|
1766
|
-
...
|
|
1753
|
+
...g(r),
|
|
1767
1754
|
length: e
|
|
1768
1755
|
});
|
|
1769
1756
|
}
|
|
@@ -1771,7 +1758,7 @@ function _a(e, r) {
|
|
|
1771
1758
|
return new Wu({
|
|
1772
1759
|
check: "string_format",
|
|
1773
1760
|
format: "regex",
|
|
1774
|
-
...
|
|
1761
|
+
...g(r),
|
|
1775
1762
|
pattern: e
|
|
1776
1763
|
});
|
|
1777
1764
|
}
|
|
@@ -1779,21 +1766,21 @@ function wa(e) {
|
|
|
1779
1766
|
return new Bu({
|
|
1780
1767
|
check: "string_format",
|
|
1781
1768
|
format: "lowercase",
|
|
1782
|
-
...
|
|
1769
|
+
...g(e)
|
|
1783
1770
|
});
|
|
1784
1771
|
}
|
|
1785
1772
|
function ya(e) {
|
|
1786
1773
|
return new Ku({
|
|
1787
1774
|
check: "string_format",
|
|
1788
1775
|
format: "uppercase",
|
|
1789
|
-
...
|
|
1776
|
+
...g(e)
|
|
1790
1777
|
});
|
|
1791
1778
|
}
|
|
1792
1779
|
function Ia(e, r) {
|
|
1793
1780
|
return new Vu({
|
|
1794
1781
|
check: "string_format",
|
|
1795
1782
|
format: "includes",
|
|
1796
|
-
...
|
|
1783
|
+
...g(r),
|
|
1797
1784
|
includes: e
|
|
1798
1785
|
});
|
|
1799
1786
|
}
|
|
@@ -1801,7 +1788,7 @@ function ka(e, r) {
|
|
|
1801
1788
|
return new Hu({
|
|
1802
1789
|
check: "string_format",
|
|
1803
1790
|
format: "starts_with",
|
|
1804
|
-
...
|
|
1791
|
+
...g(r),
|
|
1805
1792
|
prefix: e
|
|
1806
1793
|
});
|
|
1807
1794
|
}
|
|
@@ -1809,7 +1796,7 @@ function Ra(e, r) {
|
|
|
1809
1796
|
return new Gu({
|
|
1810
1797
|
check: "string_format",
|
|
1811
1798
|
format: "ends_with",
|
|
1812
|
-
...
|
|
1799
|
+
...g(r),
|
|
1813
1800
|
suffix: e
|
|
1814
1801
|
});
|
|
1815
1802
|
}
|
|
@@ -1838,7 +1825,7 @@ function Sa(e, r, n) {
|
|
|
1838
1825
|
// get element() {
|
|
1839
1826
|
// return element;
|
|
1840
1827
|
// },
|
|
1841
|
-
...
|
|
1828
|
+
...g(n)
|
|
1842
1829
|
});
|
|
1843
1830
|
}
|
|
1844
1831
|
function Pa(e, r, n) {
|
|
@@ -1846,7 +1833,7 @@ function Pa(e, r, n) {
|
|
|
1846
1833
|
type: "custom",
|
|
1847
1834
|
check: "custom",
|
|
1848
1835
|
fn: r,
|
|
1849
|
-
...
|
|
1836
|
+
...g(n)
|
|
1850
1837
|
});
|
|
1851
1838
|
}
|
|
1852
1839
|
function Za(e) {
|
|
@@ -1861,35 +1848,35 @@ function Za(e) {
|
|
|
1861
1848
|
return r;
|
|
1862
1849
|
}
|
|
1863
1850
|
function ja(e, r) {
|
|
1864
|
-
const n = new
|
|
1851
|
+
const n = new Q({
|
|
1865
1852
|
check: "custom",
|
|
1866
|
-
...
|
|
1853
|
+
...g(r)
|
|
1867
1854
|
});
|
|
1868
1855
|
return n._zod.check = e, n;
|
|
1869
1856
|
}
|
|
1870
|
-
const Ca = /* @__PURE__ */
|
|
1857
|
+
const Ca = /* @__PURE__ */ s("ZodISODateTime", (e, r) => {
|
|
1871
1858
|
sc.init(e, r), A.init(e, r);
|
|
1872
1859
|
});
|
|
1873
1860
|
function Ea(e) {
|
|
1874
1861
|
return la(Ca, e);
|
|
1875
1862
|
}
|
|
1876
|
-
const Na = /* @__PURE__ */
|
|
1863
|
+
const Na = /* @__PURE__ */ s("ZodISODate", (e, r) => {
|
|
1877
1864
|
fc.init(e, r), A.init(e, r);
|
|
1878
1865
|
});
|
|
1879
1866
|
function Ua(e) {
|
|
1880
1867
|
return pa(Na, e);
|
|
1881
1868
|
}
|
|
1882
|
-
const La = /* @__PURE__ */
|
|
1869
|
+
const La = /* @__PURE__ */ s("ZodISOTime", (e, r) => {
|
|
1883
1870
|
dc.init(e, r), A.init(e, r);
|
|
1884
1871
|
});
|
|
1885
1872
|
function Ma(e) {
|
|
1886
|
-
return
|
|
1873
|
+
return ga(La, e);
|
|
1887
1874
|
}
|
|
1888
|
-
const Da = /* @__PURE__ */
|
|
1875
|
+
const Da = /* @__PURE__ */ s("ZodISODuration", (e, r) => {
|
|
1889
1876
|
mc.init(e, r), A.init(e, r);
|
|
1890
1877
|
});
|
|
1891
1878
|
function Wa(e) {
|
|
1892
|
-
return
|
|
1879
|
+
return ha(Da, e);
|
|
1893
1880
|
}
|
|
1894
1881
|
const Ba = (e, r) => {
|
|
1895
1882
|
Oo.init(e, r), e.name = "ZodError", Object.defineProperties(e, {
|
|
@@ -1920,9 +1907,9 @@ const Ba = (e, r) => {
|
|
|
1920
1907
|
// enumerable: false,
|
|
1921
1908
|
}
|
|
1922
1909
|
});
|
|
1923
|
-
}, tn =
|
|
1910
|
+
}, tn = s("ZodError", Ba, {
|
|
1924
1911
|
Parent: Error
|
|
1925
|
-
}), Ka = /* @__PURE__ */ cu(tn), Va = /* @__PURE__ */ au(tn), Ha = /* @__PURE__ */ _o(tn), Ga = /* @__PURE__ */ wo(tn), S = /* @__PURE__ */
|
|
1912
|
+
}), Ka = /* @__PURE__ */ cu(tn), Va = /* @__PURE__ */ au(tn), Ha = /* @__PURE__ */ _o(tn), Ga = /* @__PURE__ */ wo(tn), S = /* @__PURE__ */ s("ZodType", (e, r) => (x.init(e, r), e.def = r, Object.defineProperty(e, "_def", { value: r }), e.check = (...n) => e.clone(
|
|
1926
1913
|
{
|
|
1927
1914
|
...r,
|
|
1928
1915
|
checks: [
|
|
@@ -1931,13 +1918,12 @@ const Ba = (e, r) => {
|
|
|
1931
1918
|
]
|
|
1932
1919
|
}
|
|
1933
1920
|
// { parent: true }
|
|
1934
|
-
), e.clone = (n, t) => We(e, n, t), e.brand = () => e, e.register = (n, t) => (n.add(e, t), e), e.parse = (n, t) => Ka(e, n, t, { callee: e.parse }), e.safeParse = (n, t) => Ha(e, n, t), e.parseAsync = async (n, t) => Va(e, n, t, { callee: e.parseAsync }), e.safeParseAsync = async (n, t) => Ga(e, n, t), e.spa = e.safeParseAsync, e.refine = (n, t) => e.check(Ms(n, t)), e.superRefine = (n) => e.check(Ds(n)), e.overwrite = (n) => e.check(Tr(n)), e.optional = () => er(e), e.nullable = () => eo(e), e.nullish = () => er(eo(e)), e.nonoptional = (n) => Zs(e, n), e.array = () => Nn(e), e.or = (n) => Jn([e, n]), e.and = (n) => ys(e, n), e.transform = (n) => ro(e, xs(n)), e.default = (n) => Ts(e, n), e.prefault = (n) => Ps(e, n), e.catch = (n) => Cs(e, n), e.pipe = (n) => ro(e, n), e.readonly = () => Us(e), e.describe = (n) => {
|
|
1921
|
+
), e.clone = (n, t) => We(e, n, t), e.brand = () => e, e.register = ((n, t) => (n.add(e, t), e)), e.parse = (n, t) => Ka(e, n, t, { callee: e.parse }), e.safeParse = (n, t) => Ha(e, n, t), e.parseAsync = async (n, t) => Va(e, n, t, { callee: e.parseAsync }), e.safeParseAsync = async (n, t) => Ga(e, n, t), e.spa = e.safeParseAsync, e.refine = (n, t) => e.check(Ms(n, t)), e.superRefine = (n) => e.check(Ds(n)), e.overwrite = (n) => e.check(Tr(n)), e.optional = () => er(e), e.nullable = () => eo(e), e.nullish = () => er(eo(e)), e.nonoptional = (n) => Zs(e, n), e.array = () => Nn(e), e.or = (n) => Jn([e, n]), e.and = (n) => ys(e, n), e.transform = (n) => ro(e, xs(n)), e.default = (n) => Ts(e, n), e.prefault = (n) => Ps(e, n), e.catch = (n) => Cs(e, n), e.pipe = (n) => ro(e, n), e.readonly = () => Us(e), e.describe = (n) => {
|
|
1935
1922
|
const t = e.clone();
|
|
1936
1923
|
return Hr.add(t, { description: n }), t;
|
|
1937
1924
|
}, Object.defineProperty(e, "description", {
|
|
1938
1925
|
get() {
|
|
1939
|
-
|
|
1940
|
-
return (n = Hr.get(e)) == null ? void 0 : n.description;
|
|
1926
|
+
return Hr.get(e)?.description;
|
|
1941
1927
|
},
|
|
1942
1928
|
configurable: !0
|
|
1943
1929
|
}), e.meta = (...n) => {
|
|
@@ -1945,57 +1931,57 @@ const Ba = (e, r) => {
|
|
|
1945
1931
|
return Hr.get(e);
|
|
1946
1932
|
const t = e.clone();
|
|
1947
1933
|
return Hr.add(t, n[0]), t;
|
|
1948
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Zo = /* @__PURE__ */
|
|
1934
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Zo = /* @__PURE__ */ s("_ZodString", (e, r) => {
|
|
1949
1935
|
qn.init(e, r), S.init(e, r);
|
|
1950
1936
|
const n = e._zod.bag;
|
|
1951
1937
|
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...t) => e.check(_a(...t)), e.includes = (...t) => e.check(Ia(...t)), e.startsWith = (...t) => e.check(ka(...t)), e.endsWith = (...t) => e.check(Ra(...t)), e.min = (...t) => e.check(Yr(...t)), e.max = (...t) => e.check(So(...t)), e.length = (...t) => e.check(Po(...t)), e.nonempty = (...t) => e.check(Yr(1, ...t)), e.lowercase = (t) => e.check(wa(t)), e.uppercase = (t) => e.check(ya(t)), e.trim = () => e.check(Aa()), e.normalize = (...t) => e.check(xa(...t)), e.toLowerCase = () => e.check(za()), e.toUpperCase = () => e.check(Ta());
|
|
1952
|
-
}), qa = /* @__PURE__ */
|
|
1938
|
+
}), qa = /* @__PURE__ */ s("ZodString", (e, r) => {
|
|
1953
1939
|
qn.init(e, r), Zo.init(e, r), e.email = (n) => e.check(Vc(Ja, n)), e.url = (n) => e.check(Yc(Ya, n)), e.jwt = (n) => e.check(ma(ms, n)), e.emoji = (n) => e.check(Xc(Xa, n)), e.guid = (n) => e.check(Ht(Yt, n)), e.uuid = (n) => e.check(Hc(Gr, n)), e.uuidv4 = (n) => e.check(Gc(Gr, n)), e.uuidv6 = (n) => e.check(qc(Gr, n)), e.uuidv7 = (n) => e.check(Jc(Gr, n)), e.nanoid = (n) => e.check(Qc(Qa, n)), e.guid = (n) => e.check(Ht(Yt, n)), e.cuid = (n) => e.check(ea(es, n)), e.cuid2 = (n) => e.check(ra(rs, n)), e.ulid = (n) => e.check(na(ns, n)), e.base64 = (n) => e.check(sa(ss, n)), e.base64url = (n) => e.check(fa(fs, n)), e.xid = (n) => e.check(ta(ts, n)), e.ksuid = (n) => e.check(oa(os, n)), e.ipv4 = (n) => e.check(ia(is, n)), e.ipv6 = (n) => e.check(ua(us, n)), e.cidrv4 = (n) => e.check(ca(cs, n)), e.cidrv6 = (n) => e.check(aa(as, n)), e.e164 = (n) => e.check(da(ds, n)), e.datetime = (n) => e.check(Ea(n)), e.date = (n) => e.check(Ua(n)), e.time = (n) => e.check(Ma(n)), e.duration = (n) => e.check(Wa(n));
|
|
1954
1940
|
});
|
|
1955
1941
|
function yr(e) {
|
|
1956
1942
|
return Kc(qa, e);
|
|
1957
1943
|
}
|
|
1958
|
-
const A = /* @__PURE__ */
|
|
1944
|
+
const A = /* @__PURE__ */ s("ZodStringFormat", (e, r) => {
|
|
1959
1945
|
R.init(e, r), Zo.init(e, r);
|
|
1960
|
-
}), Ja = /* @__PURE__ */
|
|
1946
|
+
}), Ja = /* @__PURE__ */ s("ZodEmail", (e, r) => {
|
|
1961
1947
|
ec.init(e, r), A.init(e, r);
|
|
1962
|
-
}), Yt = /* @__PURE__ */
|
|
1948
|
+
}), Yt = /* @__PURE__ */ s("ZodGUID", (e, r) => {
|
|
1963
1949
|
Xu.init(e, r), A.init(e, r);
|
|
1964
|
-
}), Gr = /* @__PURE__ */
|
|
1950
|
+
}), Gr = /* @__PURE__ */ s("ZodUUID", (e, r) => {
|
|
1965
1951
|
Qu.init(e, r), A.init(e, r);
|
|
1966
|
-
}), Ya = /* @__PURE__ */
|
|
1952
|
+
}), Ya = /* @__PURE__ */ s("ZodURL", (e, r) => {
|
|
1967
1953
|
rc.init(e, r), A.init(e, r);
|
|
1968
|
-
}), Xa = /* @__PURE__ */
|
|
1954
|
+
}), Xa = /* @__PURE__ */ s("ZodEmoji", (e, r) => {
|
|
1969
1955
|
nc.init(e, r), A.init(e, r);
|
|
1970
|
-
}), Qa = /* @__PURE__ */
|
|
1956
|
+
}), Qa = /* @__PURE__ */ s("ZodNanoID", (e, r) => {
|
|
1971
1957
|
tc.init(e, r), A.init(e, r);
|
|
1972
|
-
}), es = /* @__PURE__ */
|
|
1958
|
+
}), es = /* @__PURE__ */ s("ZodCUID", (e, r) => {
|
|
1973
1959
|
oc.init(e, r), A.init(e, r);
|
|
1974
|
-
}), rs = /* @__PURE__ */
|
|
1960
|
+
}), rs = /* @__PURE__ */ s("ZodCUID2", (e, r) => {
|
|
1975
1961
|
ic.init(e, r), A.init(e, r);
|
|
1976
|
-
}), ns = /* @__PURE__ */
|
|
1962
|
+
}), ns = /* @__PURE__ */ s("ZodULID", (e, r) => {
|
|
1977
1963
|
uc.init(e, r), A.init(e, r);
|
|
1978
|
-
}), ts = /* @__PURE__ */
|
|
1964
|
+
}), ts = /* @__PURE__ */ s("ZodXID", (e, r) => {
|
|
1979
1965
|
cc.init(e, r), A.init(e, r);
|
|
1980
|
-
}), os = /* @__PURE__ */
|
|
1966
|
+
}), os = /* @__PURE__ */ s("ZodKSUID", (e, r) => {
|
|
1981
1967
|
ac.init(e, r), A.init(e, r);
|
|
1982
|
-
}), is = /* @__PURE__ */
|
|
1968
|
+
}), is = /* @__PURE__ */ s("ZodIPv4", (e, r) => {
|
|
1983
1969
|
lc.init(e, r), A.init(e, r);
|
|
1984
|
-
}), us = /* @__PURE__ */
|
|
1970
|
+
}), us = /* @__PURE__ */ s("ZodIPv6", (e, r) => {
|
|
1985
1971
|
pc.init(e, r), A.init(e, r);
|
|
1986
|
-
}), cs = /* @__PURE__ */
|
|
1987
|
-
hc.init(e, r), A.init(e, r);
|
|
1988
|
-
}), as = /* @__PURE__ */ f("ZodCIDRv6", (e, r) => {
|
|
1972
|
+
}), cs = /* @__PURE__ */ s("ZodCIDRv4", (e, r) => {
|
|
1989
1973
|
gc.init(e, r), A.init(e, r);
|
|
1990
|
-
}),
|
|
1974
|
+
}), as = /* @__PURE__ */ s("ZodCIDRv6", (e, r) => {
|
|
1975
|
+
hc.init(e, r), A.init(e, r);
|
|
1976
|
+
}), ss = /* @__PURE__ */ s("ZodBase64", (e, r) => {
|
|
1991
1977
|
bc.init(e, r), A.init(e, r);
|
|
1992
|
-
}), fs = /* @__PURE__ */
|
|
1978
|
+
}), fs = /* @__PURE__ */ s("ZodBase64URL", (e, r) => {
|
|
1993
1979
|
vc.init(e, r), A.init(e, r);
|
|
1994
|
-
}), ds = /* @__PURE__ */
|
|
1980
|
+
}), ds = /* @__PURE__ */ s("ZodE164", (e, r) => {
|
|
1995
1981
|
Oc.init(e, r), A.init(e, r);
|
|
1996
|
-
}), ms = /* @__PURE__ */
|
|
1982
|
+
}), ms = /* @__PURE__ */ s("ZodJWT", (e, r) => {
|
|
1997
1983
|
_c.init(e, r), A.init(e, r);
|
|
1998
|
-
}), jo = /* @__PURE__ */
|
|
1984
|
+
}), jo = /* @__PURE__ */ s("ZodNumber", (e, r) => {
|
|
1999
1985
|
To.init(e, r), S.init(e, r), e.gt = (t, o) => e.check(qt(t, o)), e.gte = (t, o) => e.check(Tn(t, o)), e.min = (t, o) => e.check(Tn(t, o)), e.lt = (t, o) => e.check(Gt(t, o)), e.lte = (t, o) => e.check(zn(t, o)), e.max = (t, o) => e.check(zn(t, o)), e.int = (t) => e.check(Xt(t)), e.safe = (t) => e.check(Xt(t)), e.positive = (t) => e.check(qt(0, t)), e.nonnegative = (t) => e.check(Tn(0, t)), e.negative = (t) => e.check(Gt(0, t)), e.nonpositive = (t) => e.check(zn(0, t)), e.multipleOf = (t, o) => e.check(Jt(t, o)), e.step = (t, o) => e.check(Jt(t, o)), e.finite = () => e;
|
|
2000
1986
|
const n = e._zod.bag;
|
|
2001
1987
|
e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
|
|
@@ -2003,37 +1989,37 @@ const A = /* @__PURE__ */ f("ZodStringFormat", (e, r) => {
|
|
|
2003
1989
|
function ls(e) {
|
|
2004
1990
|
return ba(jo, e);
|
|
2005
1991
|
}
|
|
2006
|
-
const ps = /* @__PURE__ */
|
|
1992
|
+
const ps = /* @__PURE__ */ s("ZodNumberFormat", (e, r) => {
|
|
2007
1993
|
wc.init(e, r), jo.init(e, r);
|
|
2008
1994
|
});
|
|
2009
1995
|
function Xt(e) {
|
|
2010
1996
|
return Fa(ps, e);
|
|
2011
1997
|
}
|
|
2012
|
-
const
|
|
1998
|
+
const gs = /* @__PURE__ */ s("ZodBoolean", (e, r) => {
|
|
2013
1999
|
yc.init(e, r), S.init(e, r);
|
|
2014
2000
|
});
|
|
2015
|
-
function
|
|
2016
|
-
return va(
|
|
2001
|
+
function hs(e) {
|
|
2002
|
+
return va(gs, e);
|
|
2017
2003
|
}
|
|
2018
|
-
const bs = /* @__PURE__ */
|
|
2004
|
+
const bs = /* @__PURE__ */ s("ZodUnknown", (e, r) => {
|
|
2019
2005
|
Ic.init(e, r), S.init(e, r);
|
|
2020
2006
|
});
|
|
2021
2007
|
function Qt() {
|
|
2022
2008
|
return Oa(bs);
|
|
2023
2009
|
}
|
|
2024
|
-
const Fs = /* @__PURE__ */
|
|
2010
|
+
const Fs = /* @__PURE__ */ s("ZodNever", (e, r) => {
|
|
2025
2011
|
kc.init(e, r), S.init(e, r);
|
|
2026
2012
|
});
|
|
2027
2013
|
function vs(e) {
|
|
2028
2014
|
return $a(Fs, e);
|
|
2029
2015
|
}
|
|
2030
|
-
const Os = /* @__PURE__ */
|
|
2016
|
+
const Os = /* @__PURE__ */ s("ZodArray", (e, r) => {
|
|
2031
2017
|
Rc.init(e, r), S.init(e, r), e.element = r.element, e.min = (n, t) => e.check(Yr(n, t)), e.nonempty = (n) => e.check(Yr(1, n)), e.max = (n, t) => e.check(So(n, t)), e.length = (n, t) => e.check(Po(n, t)), e.unwrap = () => e.element;
|
|
2032
2018
|
});
|
|
2033
2019
|
function Nn(e, r) {
|
|
2034
2020
|
return Sa(Os, e, r);
|
|
2035
2021
|
}
|
|
2036
|
-
const $s = /* @__PURE__ */
|
|
2022
|
+
const $s = /* @__PURE__ */ s("ZodObject", (e, r) => {
|
|
2037
2023
|
xc.init(e, r), S.init(e, r), k(e, "shape", () => r.shape), e.keyof = () => Is(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Qt() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Qt() }), e.strict = () => e.clone({ ...e._zod.def, catchall: vs() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => ru(e, n), e.merge = (n) => nu(e, n), e.pick = (n) => Qi(e, n), e.omit = (n) => eu(e, n), e.partial = (...n) => tu(Co, e, n[0]), e.required = (...n) => ou(Eo, e, n[0]);
|
|
2038
2024
|
});
|
|
2039
2025
|
function Ce(e, r) {
|
|
@@ -2042,21 +2028,21 @@ function Ce(e, r) {
|
|
|
2042
2028
|
get shape() {
|
|
2043
2029
|
return De(this, "shape", { ...e }), this.shape;
|
|
2044
2030
|
},
|
|
2045
|
-
...
|
|
2031
|
+
...g(r)
|
|
2046
2032
|
};
|
|
2047
2033
|
return new $s(n);
|
|
2048
2034
|
}
|
|
2049
|
-
const _s = /* @__PURE__ */
|
|
2035
|
+
const _s = /* @__PURE__ */ s("ZodUnion", (e, r) => {
|
|
2050
2036
|
Ac.init(e, r), S.init(e, r), e.options = r.options;
|
|
2051
2037
|
});
|
|
2052
2038
|
function Jn(e, r) {
|
|
2053
2039
|
return new _s({
|
|
2054
2040
|
type: "union",
|
|
2055
2041
|
options: e,
|
|
2056
|
-
...
|
|
2042
|
+
...g(r)
|
|
2057
2043
|
});
|
|
2058
2044
|
}
|
|
2059
|
-
const ws = /* @__PURE__ */
|
|
2045
|
+
const ws = /* @__PURE__ */ s("ZodIntersection", (e, r) => {
|
|
2060
2046
|
zc.init(e, r), S.init(e, r);
|
|
2061
2047
|
});
|
|
2062
2048
|
function ys(e, r) {
|
|
@@ -2066,7 +2052,7 @@ function ys(e, r) {
|
|
|
2066
2052
|
right: r
|
|
2067
2053
|
});
|
|
2068
2054
|
}
|
|
2069
|
-
const Un = /* @__PURE__ */
|
|
2055
|
+
const Un = /* @__PURE__ */ s("ZodEnum", (e, r) => {
|
|
2070
2056
|
Tc.init(e, r), S.init(e, r), e.enum = r.entries, e.options = Object.values(r.entries);
|
|
2071
2057
|
const n = new Set(Object.keys(r.entries));
|
|
2072
2058
|
e.extract = (t, o) => {
|
|
@@ -2079,7 +2065,7 @@ const Un = /* @__PURE__ */ f("ZodEnum", (e, r) => {
|
|
|
2079
2065
|
return new Un({
|
|
2080
2066
|
...r,
|
|
2081
2067
|
checks: [],
|
|
2082
|
-
...
|
|
2068
|
+
...g(o),
|
|
2083
2069
|
entries: u
|
|
2084
2070
|
});
|
|
2085
2071
|
}, e.exclude = (t, o) => {
|
|
@@ -2092,7 +2078,7 @@ const Un = /* @__PURE__ */ f("ZodEnum", (e, r) => {
|
|
|
2092
2078
|
return new Un({
|
|
2093
2079
|
...r,
|
|
2094
2080
|
checks: [],
|
|
2095
|
-
...
|
|
2081
|
+
...g(o),
|
|
2096
2082
|
entries: u
|
|
2097
2083
|
});
|
|
2098
2084
|
};
|
|
@@ -2102,10 +2088,10 @@ function Is(e, r) {
|
|
|
2102
2088
|
return new Un({
|
|
2103
2089
|
type: "enum",
|
|
2104
2090
|
entries: n,
|
|
2105
|
-
...
|
|
2091
|
+
...g(r)
|
|
2106
2092
|
});
|
|
2107
2093
|
}
|
|
2108
|
-
const ks = /* @__PURE__ */
|
|
2094
|
+
const ks = /* @__PURE__ */ s("ZodLiteral", (e, r) => {
|
|
2109
2095
|
Sc.init(e, r), S.init(e, r), e.values = new Set(r.values), Object.defineProperty(e, "value", {
|
|
2110
2096
|
get() {
|
|
2111
2097
|
if (r.values.length > 1)
|
|
@@ -2118,10 +2104,10 @@ function br(e, r) {
|
|
|
2118
2104
|
return new ks({
|
|
2119
2105
|
type: "literal",
|
|
2120
2106
|
values: Array.isArray(e) ? e : [e],
|
|
2121
|
-
...
|
|
2107
|
+
...g(r)
|
|
2122
2108
|
});
|
|
2123
2109
|
}
|
|
2124
|
-
const Rs = /* @__PURE__ */
|
|
2110
|
+
const Rs = /* @__PURE__ */ s("ZodTransform", (e, r) => {
|
|
2125
2111
|
Pc.init(e, r), S.init(e, r), e._zod.parse = (n, t) => {
|
|
2126
2112
|
n.addIssue = (u) => {
|
|
2127
2113
|
if (typeof u == "string")
|
|
@@ -2141,7 +2127,7 @@ function xs(e) {
|
|
|
2141
2127
|
transform: e
|
|
2142
2128
|
});
|
|
2143
2129
|
}
|
|
2144
|
-
const Co = /* @__PURE__ */
|
|
2130
|
+
const Co = /* @__PURE__ */ s("ZodOptional", (e, r) => {
|
|
2145
2131
|
Zc.init(e, r), S.init(e, r), e.unwrap = () => e._zod.def.innerType;
|
|
2146
2132
|
});
|
|
2147
2133
|
function er(e) {
|
|
@@ -2150,7 +2136,7 @@ function er(e) {
|
|
|
2150
2136
|
innerType: e
|
|
2151
2137
|
});
|
|
2152
2138
|
}
|
|
2153
|
-
const As = /* @__PURE__ */
|
|
2139
|
+
const As = /* @__PURE__ */ s("ZodNullable", (e, r) => {
|
|
2154
2140
|
jc.init(e, r), S.init(e, r), e.unwrap = () => e._zod.def.innerType;
|
|
2155
2141
|
});
|
|
2156
2142
|
function eo(e) {
|
|
@@ -2159,7 +2145,7 @@ function eo(e) {
|
|
|
2159
2145
|
innerType: e
|
|
2160
2146
|
});
|
|
2161
2147
|
}
|
|
2162
|
-
const zs = /* @__PURE__ */
|
|
2148
|
+
const zs = /* @__PURE__ */ s("ZodDefault", (e, r) => {
|
|
2163
2149
|
Cc.init(e, r), S.init(e, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
2164
2150
|
});
|
|
2165
2151
|
function Ts(e, r) {
|
|
@@ -2171,7 +2157,7 @@ function Ts(e, r) {
|
|
|
2171
2157
|
}
|
|
2172
2158
|
});
|
|
2173
2159
|
}
|
|
2174
|
-
const Ss = /* @__PURE__ */
|
|
2160
|
+
const Ss = /* @__PURE__ */ s("ZodPrefault", (e, r) => {
|
|
2175
2161
|
Ec.init(e, r), S.init(e, r), e.unwrap = () => e._zod.def.innerType;
|
|
2176
2162
|
});
|
|
2177
2163
|
function Ps(e, r) {
|
|
@@ -2183,17 +2169,17 @@ function Ps(e, r) {
|
|
|
2183
2169
|
}
|
|
2184
2170
|
});
|
|
2185
2171
|
}
|
|
2186
|
-
const Eo = /* @__PURE__ */
|
|
2172
|
+
const Eo = /* @__PURE__ */ s("ZodNonOptional", (e, r) => {
|
|
2187
2173
|
Nc.init(e, r), S.init(e, r), e.unwrap = () => e._zod.def.innerType;
|
|
2188
2174
|
});
|
|
2189
2175
|
function Zs(e, r) {
|
|
2190
2176
|
return new Eo({
|
|
2191
2177
|
type: "nonoptional",
|
|
2192
2178
|
innerType: e,
|
|
2193
|
-
...
|
|
2179
|
+
...g(r)
|
|
2194
2180
|
});
|
|
2195
2181
|
}
|
|
2196
|
-
const js = /* @__PURE__ */
|
|
2182
|
+
const js = /* @__PURE__ */ s("ZodCatch", (e, r) => {
|
|
2197
2183
|
Uc.init(e, r), S.init(e, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
2198
2184
|
});
|
|
2199
2185
|
function Cs(e, r) {
|
|
@@ -2203,7 +2189,7 @@ function Cs(e, r) {
|
|
|
2203
2189
|
catchValue: typeof r == "function" ? r : () => r
|
|
2204
2190
|
});
|
|
2205
2191
|
}
|
|
2206
|
-
const Es = /* @__PURE__ */
|
|
2192
|
+
const Es = /* @__PURE__ */ s("ZodPipe", (e, r) => {
|
|
2207
2193
|
Lc.init(e, r), S.init(e, r), e.in = r.in, e.out = r.out;
|
|
2208
2194
|
});
|
|
2209
2195
|
function ro(e, r) {
|
|
@@ -2214,7 +2200,7 @@ function ro(e, r) {
|
|
|
2214
2200
|
// ...util.normalizeParams(params),
|
|
2215
2201
|
});
|
|
2216
2202
|
}
|
|
2217
|
-
const Ns = /* @__PURE__ */
|
|
2203
|
+
const Ns = /* @__PURE__ */ s("ZodReadonly", (e, r) => {
|
|
2218
2204
|
Mc.init(e, r), S.init(e, r), e.unwrap = () => e._zod.def.innerType;
|
|
2219
2205
|
});
|
|
2220
2206
|
function Us(e) {
|
|
@@ -2223,7 +2209,7 @@ function Us(e) {
|
|
|
2223
2209
|
innerType: e
|
|
2224
2210
|
});
|
|
2225
2211
|
}
|
|
2226
|
-
const Ls = /* @__PURE__ */
|
|
2212
|
+
const Ls = /* @__PURE__ */ s("ZodCustom", (e, r) => {
|
|
2227
2213
|
Dc.init(e, r), S.init(e, r);
|
|
2228
2214
|
});
|
|
2229
2215
|
function Ms(e, r = {}) {
|
|
@@ -2245,13 +2231,13 @@ const Ws = Ce({
|
|
|
2245
2231
|
sleep: er(Ce({}))
|
|
2246
2232
|
});
|
|
2247
2233
|
er(Ce({
|
|
2248
|
-
enabled:
|
|
2234
|
+
enabled: hs(),
|
|
2249
2235
|
requestedScopes: Ws
|
|
2250
2236
|
}));
|
|
2251
2237
|
function Bs(e) {
|
|
2252
|
-
return j(e) && !
|
|
2238
|
+
return j(e) && !ee(e) && !Pr(e) && Symbol.asyncIterator in e;
|
|
2253
2239
|
}
|
|
2254
|
-
function
|
|
2240
|
+
function ee(e) {
|
|
2255
2241
|
return Array.isArray(e);
|
|
2256
2242
|
}
|
|
2257
2243
|
function No(e) {
|
|
@@ -2267,7 +2253,7 @@ function Ks(e) {
|
|
|
2267
2253
|
return typeof e == "function";
|
|
2268
2254
|
}
|
|
2269
2255
|
function Vs(e) {
|
|
2270
|
-
return j(e) && !
|
|
2256
|
+
return j(e) && !ee(e) && !Pr(e) && Symbol.iterator in e;
|
|
2271
2257
|
}
|
|
2272
2258
|
function Hs(e) {
|
|
2273
2259
|
return e === null;
|
|
@@ -2314,13 +2300,13 @@ function Qs(e) {
|
|
|
2314
2300
|
return r;
|
|
2315
2301
|
}
|
|
2316
2302
|
function Xr(e) {
|
|
2317
|
-
return
|
|
2303
|
+
return ee(e) ? qs(e) : Yn(e) ? Js(e) : Pr(e) ? Ys(e) : Uo(e) ? Xs(e) : j(e) ? Qs(e) : e;
|
|
2318
2304
|
}
|
|
2319
|
-
function
|
|
2305
|
+
function ne(e) {
|
|
2320
2306
|
return Xr(e);
|
|
2321
2307
|
}
|
|
2322
2308
|
function Xn(e, r) {
|
|
2323
|
-
return
|
|
2309
|
+
return ne(r === void 0 ? e : { ...r, ...e });
|
|
2324
2310
|
}
|
|
2325
2311
|
function ef(e) {
|
|
2326
2312
|
return e !== null && typeof e == "object";
|
|
@@ -2337,13 +2323,13 @@ function tf(e) {
|
|
|
2337
2323
|
var Ln;
|
|
2338
2324
|
(function(e) {
|
|
2339
2325
|
e.InstanceMode = "default", e.ExactOptionalPropertyTypes = !1, e.AllowArrayObject = !1, e.AllowNaN = !1, e.AllowNullVoid = !1;
|
|
2340
|
-
function r(c,
|
|
2341
|
-
return e.ExactOptionalPropertyTypes ?
|
|
2326
|
+
function r(c, f) {
|
|
2327
|
+
return e.ExactOptionalPropertyTypes ? f in c : c[f] !== void 0;
|
|
2342
2328
|
}
|
|
2343
2329
|
e.IsExactOptionalProperty = r;
|
|
2344
2330
|
function n(c) {
|
|
2345
|
-
const
|
|
2346
|
-
return e.AllowArrayObject ?
|
|
2331
|
+
const f = ef(c);
|
|
2332
|
+
return e.AllowArrayObject ? f : f && !rf(c);
|
|
2347
2333
|
}
|
|
2348
2334
|
e.IsObjectLike = n;
|
|
2349
2335
|
function t(c) {
|
|
@@ -2355,8 +2341,8 @@ var Ln;
|
|
|
2355
2341
|
}
|
|
2356
2342
|
e.IsNumberLike = o;
|
|
2357
2343
|
function u(c) {
|
|
2358
|
-
const
|
|
2359
|
-
return e.AllowNullVoid ?
|
|
2344
|
+
const f = nf(c);
|
|
2345
|
+
return e.AllowNullVoid ? f || c === null : f;
|
|
2360
2346
|
}
|
|
2361
2347
|
e.IsVoidLike = u;
|
|
2362
2348
|
})(Ln || (Ln = {}));
|
|
@@ -2372,15 +2358,15 @@ function uf(e) {
|
|
|
2372
2358
|
return globalThis.Object.freeze(r);
|
|
2373
2359
|
}
|
|
2374
2360
|
function Qr(e) {
|
|
2375
|
-
return
|
|
2361
|
+
return ee(e) ? of(e) : Yn(e) ? e : Pr(e) ? e : Uo(e) ? e : j(e) ? uf(e) : e;
|
|
2376
2362
|
}
|
|
2377
|
-
function
|
|
2363
|
+
function m(e, r) {
|
|
2378
2364
|
const n = r !== void 0 ? { ...r, ...e } : e;
|
|
2379
2365
|
switch (Ln.InstanceMode) {
|
|
2380
2366
|
case "freeze":
|
|
2381
2367
|
return Qr(n);
|
|
2382
2368
|
case "clone":
|
|
2383
|
-
return
|
|
2369
|
+
return ne(n);
|
|
2384
2370
|
default:
|
|
2385
2371
|
return n;
|
|
2386
2372
|
}
|
|
@@ -2390,7 +2376,7 @@ class Be extends Error {
|
|
|
2390
2376
|
super(r);
|
|
2391
2377
|
}
|
|
2392
2378
|
}
|
|
2393
|
-
const
|
|
2379
|
+
const ce = Symbol.for("TypeBox.Transform"), Zr = Symbol.for("TypeBox.Readonly"), _e = Symbol.for("TypeBox.Optional"), on = Symbol.for("TypeBox.Hint"), h = Symbol.for("TypeBox.Kind");
|
|
2394
2380
|
function Qn(e) {
|
|
2395
2381
|
return j(e) && e[Zr] === "Readonly";
|
|
2396
2382
|
}
|
|
@@ -2398,129 +2384,129 @@ function Ae(e) {
|
|
|
2398
2384
|
return j(e) && e[_e] === "Optional";
|
|
2399
2385
|
}
|
|
2400
2386
|
function Lo(e) {
|
|
2401
|
-
return
|
|
2387
|
+
return F(e, "Any");
|
|
2402
2388
|
}
|
|
2403
2389
|
function Mo(e) {
|
|
2404
|
-
return
|
|
2390
|
+
return F(e, "Argument");
|
|
2405
2391
|
}
|
|
2406
2392
|
function cr(e) {
|
|
2407
|
-
return
|
|
2393
|
+
return F(e, "Array");
|
|
2408
2394
|
}
|
|
2409
2395
|
function un(e) {
|
|
2410
|
-
return
|
|
2396
|
+
return F(e, "AsyncIterator");
|
|
2411
2397
|
}
|
|
2412
2398
|
function cn(e) {
|
|
2413
|
-
return
|
|
2399
|
+
return F(e, "BigInt");
|
|
2414
2400
|
}
|
|
2415
2401
|
function jr(e) {
|
|
2416
|
-
return
|
|
2402
|
+
return F(e, "Boolean");
|
|
2417
2403
|
}
|
|
2418
2404
|
function ar(e) {
|
|
2419
|
-
return
|
|
2405
|
+
return F(e, "Computed");
|
|
2420
2406
|
}
|
|
2421
2407
|
function sr(e) {
|
|
2422
|
-
return
|
|
2408
|
+
return F(e, "Constructor");
|
|
2423
2409
|
}
|
|
2424
2410
|
function cf(e) {
|
|
2425
|
-
return
|
|
2411
|
+
return F(e, "Date");
|
|
2426
2412
|
}
|
|
2427
2413
|
function fr(e) {
|
|
2428
|
-
return
|
|
2414
|
+
return F(e, "Function");
|
|
2429
2415
|
}
|
|
2430
2416
|
function dr(e) {
|
|
2431
|
-
return
|
|
2417
|
+
return F(e, "Integer");
|
|
2432
2418
|
}
|
|
2433
|
-
function
|
|
2434
|
-
return
|
|
2419
|
+
function se(e) {
|
|
2420
|
+
return F(e, "Intersect");
|
|
2435
2421
|
}
|
|
2436
2422
|
function an(e) {
|
|
2437
|
-
return
|
|
2423
|
+
return F(e, "Iterator");
|
|
2438
2424
|
}
|
|
2439
|
-
function
|
|
2440
|
-
return j(e) &&
|
|
2425
|
+
function F(e, r) {
|
|
2426
|
+
return j(e) && h in e && e[h] === r;
|
|
2441
2427
|
}
|
|
2442
2428
|
function Do(e) {
|
|
2443
2429
|
return Sr(e) || Fe(e) || T(e);
|
|
2444
2430
|
}
|
|
2445
2431
|
function Ke(e) {
|
|
2446
|
-
return
|
|
2432
|
+
return F(e, "Literal");
|
|
2447
2433
|
}
|
|
2448
2434
|
function Ve(e) {
|
|
2449
|
-
return
|
|
2435
|
+
return F(e, "MappedKey");
|
|
2450
2436
|
}
|
|
2451
|
-
function
|
|
2452
|
-
return
|
|
2437
|
+
function ie(e) {
|
|
2438
|
+
return F(e, "MappedResult");
|
|
2453
2439
|
}
|
|
2454
2440
|
function Cr(e) {
|
|
2455
|
-
return
|
|
2441
|
+
return F(e, "Never");
|
|
2456
2442
|
}
|
|
2457
2443
|
function af(e) {
|
|
2458
|
-
return
|
|
2444
|
+
return F(e, "Not");
|
|
2459
2445
|
}
|
|
2460
2446
|
function et(e) {
|
|
2461
|
-
return
|
|
2447
|
+
return F(e, "Null");
|
|
2462
2448
|
}
|
|
2463
2449
|
function mr(e) {
|
|
2464
|
-
return
|
|
2450
|
+
return F(e, "Number");
|
|
2465
2451
|
}
|
|
2466
2452
|
function be(e) {
|
|
2467
|
-
return
|
|
2453
|
+
return F(e, "Object");
|
|
2468
2454
|
}
|
|
2469
2455
|
function sn(e) {
|
|
2470
|
-
return
|
|
2456
|
+
return F(e, "Promise");
|
|
2471
2457
|
}
|
|
2472
2458
|
function fn(e) {
|
|
2473
|
-
return
|
|
2459
|
+
return F(e, "Record");
|
|
2474
2460
|
}
|
|
2475
|
-
function
|
|
2476
|
-
return
|
|
2461
|
+
function Y(e) {
|
|
2462
|
+
return F(e, "Ref");
|
|
2477
2463
|
}
|
|
2478
2464
|
function Wo(e) {
|
|
2479
|
-
return
|
|
2465
|
+
return F(e, "RegExp");
|
|
2480
2466
|
}
|
|
2481
2467
|
function Er(e) {
|
|
2482
|
-
return
|
|
2468
|
+
return F(e, "String");
|
|
2483
2469
|
}
|
|
2484
2470
|
function rt(e) {
|
|
2485
|
-
return
|
|
2471
|
+
return F(e, "Symbol");
|
|
2486
2472
|
}
|
|
2487
2473
|
function He(e) {
|
|
2488
|
-
return
|
|
2474
|
+
return F(e, "TemplateLiteral");
|
|
2489
2475
|
}
|
|
2490
2476
|
function sf(e) {
|
|
2491
|
-
return
|
|
2477
|
+
return F(e, "This");
|
|
2492
2478
|
}
|
|
2493
2479
|
function dn(e) {
|
|
2494
|
-
return j(e) &&
|
|
2480
|
+
return j(e) && ce in e;
|
|
2495
2481
|
}
|
|
2496
2482
|
function Ge(e) {
|
|
2497
|
-
return
|
|
2483
|
+
return F(e, "Tuple");
|
|
2498
2484
|
}
|
|
2499
2485
|
function nt(e) {
|
|
2500
|
-
return
|
|
2486
|
+
return F(e, "Undefined");
|
|
2501
2487
|
}
|
|
2502
2488
|
function D(e) {
|
|
2503
|
-
return
|
|
2489
|
+
return F(e, "Union");
|
|
2504
2490
|
}
|
|
2505
2491
|
function ff(e) {
|
|
2506
|
-
return
|
|
2492
|
+
return F(e, "Uint8Array");
|
|
2507
2493
|
}
|
|
2508
2494
|
function df(e) {
|
|
2509
|
-
return
|
|
2495
|
+
return F(e, "Unknown");
|
|
2510
2496
|
}
|
|
2511
2497
|
function mf(e) {
|
|
2512
|
-
return
|
|
2498
|
+
return F(e, "Unsafe");
|
|
2513
2499
|
}
|
|
2514
2500
|
function lf(e) {
|
|
2515
|
-
return
|
|
2501
|
+
return F(e, "Void");
|
|
2516
2502
|
}
|
|
2517
2503
|
function pf(e) {
|
|
2518
|
-
return j(e) &&
|
|
2504
|
+
return j(e) && h in e && T(e[h]);
|
|
2519
2505
|
}
|
|
2520
2506
|
function xe(e) {
|
|
2521
|
-
return Lo(e) || Mo(e) || cr(e) || jr(e) || cn(e) || un(e) || ar(e) || sr(e) || cf(e) || fr(e) || dr(e) ||
|
|
2507
|
+
return Lo(e) || Mo(e) || cr(e) || jr(e) || cn(e) || un(e) || ar(e) || sr(e) || cf(e) || fr(e) || dr(e) || se(e) || an(e) || Ke(e) || Ve(e) || ie(e) || Cr(e) || af(e) || et(e) || mr(e) || be(e) || sn(e) || fn(e) || Y(e) || Wo(e) || Er(e) || rt(e) || He(e) || sf(e) || Ge(e) || nt(e) || D(e) || ff(e) || df(e) || mf(e) || lf(e) || pf(e);
|
|
2522
2508
|
}
|
|
2523
|
-
const
|
|
2509
|
+
const gf = [
|
|
2524
2510
|
"Argument",
|
|
2525
2511
|
"Any",
|
|
2526
2512
|
"Array",
|
|
@@ -2586,10 +2572,10 @@ function I(e) {
|
|
|
2586
2572
|
function ot(e) {
|
|
2587
2573
|
return P(e) || Sr(e);
|
|
2588
2574
|
}
|
|
2589
|
-
function
|
|
2575
|
+
function w(e) {
|
|
2590
2576
|
return P(e) || T(e);
|
|
2591
2577
|
}
|
|
2592
|
-
function
|
|
2578
|
+
function hf(e) {
|
|
2593
2579
|
return P(e) || T(e) && tt(e) && Bo(e);
|
|
2594
2580
|
}
|
|
2595
2581
|
function bf(e) {
|
|
@@ -2602,49 +2588,49 @@ function en(e) {
|
|
|
2602
2588
|
return j(e) && e[_e] === "Optional";
|
|
2603
2589
|
}
|
|
2604
2590
|
function le(e) {
|
|
2605
|
-
return
|
|
2591
|
+
return v(e, "Any") && w(e.$id);
|
|
2606
2592
|
}
|
|
2607
2593
|
function Ff(e) {
|
|
2608
|
-
return
|
|
2594
|
+
return v(e, "Argument") && Fe(e.index);
|
|
2609
2595
|
}
|
|
2610
2596
|
function qe(e) {
|
|
2611
|
-
return
|
|
2597
|
+
return v(e, "Array") && e.type === "array" && w(e.$id) && B(e.items) && I(e.minItems) && I(e.maxItems) && ot(e.uniqueItems) && Vo(e.contains) && I(e.minContains) && I(e.maxContains);
|
|
2612
2598
|
}
|
|
2613
2599
|
function it(e) {
|
|
2614
|
-
return
|
|
2600
|
+
return v(e, "AsyncIterator") && e.type === "AsyncIterator" && w(e.$id) && B(e.items);
|
|
2615
2601
|
}
|
|
2616
2602
|
function mn(e) {
|
|
2617
|
-
return
|
|
2603
|
+
return v(e, "BigInt") && e.type === "bigint" && w(e.$id) && Fr(e.exclusiveMaximum) && Fr(e.exclusiveMinimum) && Fr(e.maximum) && Fr(e.minimum) && Fr(e.multipleOf);
|
|
2618
2604
|
}
|
|
2619
2605
|
function Je(e) {
|
|
2620
|
-
return
|
|
2606
|
+
return v(e, "Boolean") && e.type === "boolean" && w(e.$id);
|
|
2621
2607
|
}
|
|
2622
2608
|
function vf(e) {
|
|
2623
|
-
return
|
|
2609
|
+
return v(e, "Computed") && T(e.target) && ee(e.parameters) && e.parameters.every((r) => B(r));
|
|
2624
2610
|
}
|
|
2625
2611
|
function ln(e) {
|
|
2626
|
-
return
|
|
2612
|
+
return v(e, "Constructor") && e.type === "Constructor" && w(e.$id) && ee(e.parameters) && e.parameters.every((r) => B(r)) && B(e.returns);
|
|
2627
2613
|
}
|
|
2628
2614
|
function pn(e) {
|
|
2629
|
-
return
|
|
2615
|
+
return v(e, "Date") && e.type === "Date" && w(e.$id) && I(e.exclusiveMaximumTimestamp) && I(e.exclusiveMinimumTimestamp) && I(e.maximumTimestamp) && I(e.minimumTimestamp) && I(e.multipleOfTimestamp);
|
|
2630
2616
|
}
|
|
2631
|
-
function
|
|
2632
|
-
return
|
|
2617
|
+
function gn(e) {
|
|
2618
|
+
return v(e, "Function") && e.type === "Function" && w(e.$id) && ee(e.parameters) && e.parameters.every((r) => B(r)) && B(e.returns);
|
|
2633
2619
|
}
|
|
2634
2620
|
function we(e) {
|
|
2635
|
-
return
|
|
2621
|
+
return v(e, "Integer") && e.type === "integer" && w(e.$id) && I(e.exclusiveMaximum) && I(e.exclusiveMinimum) && I(e.maximum) && I(e.minimum) && I(e.multipleOf);
|
|
2636
2622
|
}
|
|
2637
2623
|
function Ho(e) {
|
|
2638
2624
|
return j(e) && Object.entries(e).every(([r, n]) => tt(r) && B(n));
|
|
2639
2625
|
}
|
|
2640
2626
|
function Ye(e) {
|
|
2641
|
-
return
|
|
2627
|
+
return v(e, "Intersect") && !(T(e.type) && e.type !== "object") && ee(e.allOf) && e.allOf.every((r) => B(r) && !If(r)) && w(e.type) && (ot(e.unevaluatedProperties) || Vo(e.unevaluatedProperties)) && w(e.$id);
|
|
2642
2628
|
}
|
|
2643
2629
|
function ut(e) {
|
|
2644
|
-
return
|
|
2630
|
+
return v(e, "Iterator") && e.type === "Iterator" && w(e.$id) && B(e.items);
|
|
2645
2631
|
}
|
|
2646
|
-
function
|
|
2647
|
-
return j(e) &&
|
|
2632
|
+
function v(e, r) {
|
|
2633
|
+
return j(e) && h in e && e[h] === r;
|
|
2648
2634
|
}
|
|
2649
2635
|
function Go(e) {
|
|
2650
2636
|
return ze(e) && T(e.const);
|
|
@@ -2656,89 +2642,89 @@ function Jo(e) {
|
|
|
2656
2642
|
return ze(e) && Sr(e.const);
|
|
2657
2643
|
}
|
|
2658
2644
|
function ze(e) {
|
|
2659
|
-
return
|
|
2645
|
+
return v(e, "Literal") && w(e.$id) && Of(e.const);
|
|
2660
2646
|
}
|
|
2661
2647
|
function Of(e) {
|
|
2662
2648
|
return Sr(e) || Fe(e) || T(e);
|
|
2663
2649
|
}
|
|
2664
2650
|
function $f(e) {
|
|
2665
|
-
return
|
|
2651
|
+
return v(e, "MappedKey") && ee(e.keys) && e.keys.every((r) => Fe(r) || T(r));
|
|
2666
2652
|
}
|
|
2667
2653
|
function _f(e) {
|
|
2668
|
-
return
|
|
2654
|
+
return v(e, "MappedResult") && Ho(e.properties);
|
|
2669
2655
|
}
|
|
2670
2656
|
function Te(e) {
|
|
2671
|
-
return
|
|
2657
|
+
return v(e, "Never") && j(e.not) && Object.getOwnPropertyNames(e.not).length === 0;
|
|
2672
2658
|
}
|
|
2673
2659
|
function nr(e) {
|
|
2674
|
-
return
|
|
2660
|
+
return v(e, "Not") && B(e.not);
|
|
2675
2661
|
}
|
|
2676
2662
|
function ct(e) {
|
|
2677
|
-
return
|
|
2663
|
+
return v(e, "Null") && e.type === "null" && w(e.$id);
|
|
2678
2664
|
}
|
|
2679
|
-
function
|
|
2680
|
-
return
|
|
2665
|
+
function J(e) {
|
|
2666
|
+
return v(e, "Number") && e.type === "number" && w(e.$id) && I(e.exclusiveMaximum) && I(e.exclusiveMinimum) && I(e.maximum) && I(e.minimum) && I(e.multipleOf);
|
|
2681
2667
|
}
|
|
2682
2668
|
function z(e) {
|
|
2683
|
-
return
|
|
2669
|
+
return v(e, "Object") && e.type === "object" && w(e.$id) && Ho(e.properties) && Ko(e.additionalProperties) && I(e.minProperties) && I(e.maxProperties);
|
|
2684
2670
|
}
|
|
2685
2671
|
function at(e) {
|
|
2686
|
-
return
|
|
2672
|
+
return v(e, "Promise") && e.type === "Promise" && w(e.$id) && B(e.item);
|
|
2687
2673
|
}
|
|
2688
2674
|
function W(e) {
|
|
2689
|
-
return
|
|
2675
|
+
return v(e, "Record") && e.type === "object" && w(e.$id) && Ko(e.additionalProperties) && j(e.patternProperties) && ((r) => {
|
|
2690
2676
|
const n = Object.getOwnPropertyNames(r.patternProperties);
|
|
2691
2677
|
return n.length === 1 && Bo(n[0]) && j(r.patternProperties) && B(r.patternProperties[n[0]]);
|
|
2692
2678
|
})(e);
|
|
2693
2679
|
}
|
|
2694
2680
|
function wf(e) {
|
|
2695
|
-
return
|
|
2681
|
+
return v(e, "Ref") && w(e.$id) && T(e.$ref);
|
|
2696
2682
|
}
|
|
2697
2683
|
function Ir(e) {
|
|
2698
|
-
return
|
|
2684
|
+
return v(e, "RegExp") && w(e.$id) && T(e.source) && T(e.flags) && I(e.maxLength) && I(e.minLength);
|
|
2699
2685
|
}
|
|
2700
2686
|
function pe(e) {
|
|
2701
|
-
return
|
|
2687
|
+
return v(e, "String") && e.type === "string" && w(e.$id) && I(e.minLength) && I(e.maxLength) && hf(e.pattern) && bf(e.format);
|
|
2702
2688
|
}
|
|
2703
2689
|
function kr(e) {
|
|
2704
|
-
return
|
|
2690
|
+
return v(e, "Symbol") && e.type === "symbol" && w(e.$id);
|
|
2705
2691
|
}
|
|
2706
2692
|
function Rr(e) {
|
|
2707
|
-
return
|
|
2693
|
+
return v(e, "TemplateLiteral") && e.type === "string" && T(e.pattern) && e.pattern[0] === "^" && e.pattern[e.pattern.length - 1] === "$";
|
|
2708
2694
|
}
|
|
2709
2695
|
function yf(e) {
|
|
2710
|
-
return
|
|
2696
|
+
return v(e, "This") && w(e.$id) && T(e.$ref);
|
|
2711
2697
|
}
|
|
2712
2698
|
function If(e) {
|
|
2713
|
-
return j(e) &&
|
|
2699
|
+
return j(e) && ce in e;
|
|
2714
2700
|
}
|
|
2715
|
-
function
|
|
2716
|
-
return
|
|
2717
|
-
(P(e.items) && P(e.additionalItems) && e.minItems === 0 ||
|
|
2701
|
+
function hn(e) {
|
|
2702
|
+
return v(e, "Tuple") && e.type === "array" && w(e.$id) && Fe(e.minItems) && Fe(e.maxItems) && e.minItems === e.maxItems && // empty
|
|
2703
|
+
(P(e.items) && P(e.additionalItems) && e.minItems === 0 || ee(e.items) && e.items.every((r) => B(r)));
|
|
2718
2704
|
}
|
|
2719
2705
|
function Le(e) {
|
|
2720
|
-
return
|
|
2706
|
+
return v(e, "Undefined") && e.type === "undefined" && w(e.$id);
|
|
2721
2707
|
}
|
|
2722
2708
|
function $e(e) {
|
|
2723
|
-
return
|
|
2709
|
+
return v(e, "Union") && w(e.$id) && j(e) && ee(e.anyOf) && e.anyOf.every((r) => B(r));
|
|
2724
2710
|
}
|
|
2725
2711
|
function Nr(e) {
|
|
2726
|
-
return
|
|
2712
|
+
return v(e, "Uint8Array") && e.type === "Uint8Array" && w(e.$id) && I(e.minByteLength) && I(e.maxByteLength);
|
|
2727
2713
|
}
|
|
2728
|
-
function
|
|
2729
|
-
return
|
|
2714
|
+
function ge(e) {
|
|
2715
|
+
return v(e, "Unknown") && w(e.$id);
|
|
2730
2716
|
}
|
|
2731
2717
|
function kf(e) {
|
|
2732
|
-
return
|
|
2718
|
+
return v(e, "Unsafe");
|
|
2733
2719
|
}
|
|
2734
2720
|
function bn(e) {
|
|
2735
|
-
return
|
|
2721
|
+
return v(e, "Void") && e.type === "void" && w(e.$id);
|
|
2736
2722
|
}
|
|
2737
2723
|
function Rf(e) {
|
|
2738
|
-
return j(e) &&
|
|
2724
|
+
return j(e) && h in e && T(e[h]) && !gf.includes(e[h]);
|
|
2739
2725
|
}
|
|
2740
2726
|
function B(e) {
|
|
2741
|
-
return j(e) && (le(e) || Ff(e) || qe(e) || Je(e) || mn(e) || it(e) || vf(e) || ln(e) || pn(e) ||
|
|
2727
|
+
return j(e) && (le(e) || Ff(e) || qe(e) || Je(e) || mn(e) || it(e) || vf(e) || ln(e) || pn(e) || gn(e) || we(e) || Ye(e) || ut(e) || ze(e) || $f(e) || _f(e) || Te(e) || nr(e) || ct(e) || J(e) || z(e) || at(e) || W(e) || wf(e) || Ir(e) || pe(e) || kr(e) || Rr(e) || yf(e) || hn(e) || Le(e) || $e(e) || Nr(e) || ge(e) || kf(e) || bn(e) || Rf(e));
|
|
2742
2728
|
}
|
|
2743
2729
|
const xf = "(true|false)", Jr = "(0|[1-9][0-9]*)", Yo = "(.*)", Af = "(?!.*)", tr = `^${Jr}$`, or = `^${Yo}$`, zf = `^${Af}$`;
|
|
2744
2730
|
function Tf(e, r) {
|
|
@@ -2763,44 +2749,44 @@ function Cf(e) {
|
|
|
2763
2749
|
return r;
|
|
2764
2750
|
}
|
|
2765
2751
|
function xr(e) {
|
|
2766
|
-
return
|
|
2752
|
+
return m({ [h]: "Any" }, e);
|
|
2767
2753
|
}
|
|
2768
2754
|
function st(e, r) {
|
|
2769
|
-
return
|
|
2755
|
+
return m({ [h]: "Array", type: "array", items: e }, r);
|
|
2770
2756
|
}
|
|
2771
2757
|
function Ef(e) {
|
|
2772
|
-
return
|
|
2758
|
+
return m({ [h]: "Argument", index: e });
|
|
2773
2759
|
}
|
|
2774
2760
|
function ft(e, r) {
|
|
2775
|
-
return
|
|
2761
|
+
return m({ [h]: "AsyncIterator", type: "AsyncIterator", items: e }, r);
|
|
2776
2762
|
}
|
|
2777
2763
|
function U(e, r, n) {
|
|
2778
|
-
return
|
|
2764
|
+
return m({ [h]: "Computed", target: e, parameters: r }, n);
|
|
2779
2765
|
}
|
|
2780
2766
|
function Nf(e, r) {
|
|
2781
2767
|
const { [r]: n, ...t } = e;
|
|
2782
2768
|
return t;
|
|
2783
2769
|
}
|
|
2784
|
-
function
|
|
2770
|
+
function te(e, r) {
|
|
2785
2771
|
return r.reduce((n, t) => Nf(n, t), e);
|
|
2786
2772
|
}
|
|
2787
2773
|
function C(e) {
|
|
2788
|
-
return
|
|
2774
|
+
return m({ [h]: "Never", not: {} }, e);
|
|
2789
2775
|
}
|
|
2790
2776
|
function K(e) {
|
|
2791
|
-
return
|
|
2792
|
-
[
|
|
2777
|
+
return m({
|
|
2778
|
+
[h]: "MappedResult",
|
|
2793
2779
|
properties: e
|
|
2794
2780
|
});
|
|
2795
2781
|
}
|
|
2796
2782
|
function dt(e, r, n) {
|
|
2797
|
-
return
|
|
2783
|
+
return m({ [h]: "Constructor", type: "Constructor", parameters: e, returns: r }, n);
|
|
2798
2784
|
}
|
|
2799
2785
|
function Ur(e, r, n) {
|
|
2800
|
-
return
|
|
2786
|
+
return m({ [h]: "Function", type: "Function", parameters: e, returns: r }, n);
|
|
2801
2787
|
}
|
|
2802
2788
|
function Mn(e, r) {
|
|
2803
|
-
return
|
|
2789
|
+
return m({ [h]: "Union", anyOf: e }, r);
|
|
2804
2790
|
}
|
|
2805
2791
|
function Uf(e) {
|
|
2806
2792
|
return e.some((r) => Ae(r));
|
|
@@ -2809,16 +2795,16 @@ function no(e) {
|
|
|
2809
2795
|
return e.map((r) => Ae(r) ? Lf(r) : r);
|
|
2810
2796
|
}
|
|
2811
2797
|
function Lf(e) {
|
|
2812
|
-
return
|
|
2798
|
+
return te(e, [_e]);
|
|
2813
2799
|
}
|
|
2814
2800
|
function Mf(e, r) {
|
|
2815
2801
|
return Uf(e) ? Ze(Mn(no(e), r)) : Mn(no(e), r);
|
|
2816
2802
|
}
|
|
2817
2803
|
function lr(e, r) {
|
|
2818
|
-
return e.length === 1 ?
|
|
2804
|
+
return e.length === 1 ? m(e[0], r) : e.length === 0 ? C(r) : Mf(e, r);
|
|
2819
2805
|
}
|
|
2820
2806
|
function V(e, r) {
|
|
2821
|
-
return e.length === 0 ? C(r) : e.length === 1 ?
|
|
2807
|
+
return e.length === 0 ? C(r) : e.length === 1 ? m(e[0], r) : Mn(e, r);
|
|
2822
2808
|
}
|
|
2823
2809
|
class to extends Be {
|
|
2824
2810
|
}
|
|
@@ -2878,9 +2864,9 @@ function Gf(e) {
|
|
|
2878
2864
|
if (!Oe(o, u))
|
|
2879
2865
|
throw new to("TemplateLiteralParser: Index must point to open parens");
|
|
2880
2866
|
let c = 0;
|
|
2881
|
-
for (let
|
|
2882
|
-
if (Oe(o,
|
|
2883
|
-
return [u,
|
|
2867
|
+
for (let f = u; f < o.length; f++)
|
|
2868
|
+
if (Oe(o, f) && (c += 1), Ar(o, f) && (c -= 1), c === 0)
|
|
2869
|
+
return [u, f];
|
|
2884
2870
|
throw new to("TemplateLiteralParser: Unclosed group parens in expression");
|
|
2885
2871
|
}
|
|
2886
2872
|
function n(o, u) {
|
|
@@ -2892,11 +2878,11 @@ function Gf(e) {
|
|
|
2892
2878
|
const t = [];
|
|
2893
2879
|
for (let o = 0; o < e.length; o++)
|
|
2894
2880
|
if (Oe(e, o)) {
|
|
2895
|
-
const [u, c] = r(e, o),
|
|
2896
|
-
t.push(ir(
|
|
2881
|
+
const [u, c] = r(e, o), f = e.slice(u, c + 1);
|
|
2882
|
+
t.push(ir(f)), o = c;
|
|
2897
2883
|
} else {
|
|
2898
|
-
const [u, c] = n(e, o),
|
|
2899
|
-
|
|
2884
|
+
const [u, c] = n(e, o), f = e.slice(u, c);
|
|
2885
|
+
f.length > 0 && t.push(ir(f)), o = c - 1;
|
|
2900
2886
|
}
|
|
2901
2887
|
return t.length === 0 ? { type: "const", const: "" } : t.length === 1 ? t[0] : { type: "and", expr: t };
|
|
2902
2888
|
}
|
|
@@ -2955,23 +2941,23 @@ function ei(e) {
|
|
|
2955
2941
|
return zr(r) ? [...Fn(r)] : [];
|
|
2956
2942
|
}
|
|
2957
2943
|
function Z(e, r) {
|
|
2958
|
-
return
|
|
2959
|
-
[
|
|
2944
|
+
return m({
|
|
2945
|
+
[h]: "Literal",
|
|
2960
2946
|
const: e,
|
|
2961
2947
|
type: typeof e
|
|
2962
2948
|
}, r);
|
|
2963
2949
|
}
|
|
2964
2950
|
function ri(e) {
|
|
2965
|
-
return
|
|
2951
|
+
return m({ [h]: "Boolean", type: "boolean" }, e);
|
|
2966
2952
|
}
|
|
2967
2953
|
function pt(e) {
|
|
2968
|
-
return
|
|
2954
|
+
return m({ [h]: "BigInt", type: "bigint" }, e);
|
|
2969
2955
|
}
|
|
2970
2956
|
function Xe(e) {
|
|
2971
|
-
return
|
|
2957
|
+
return m({ [h]: "Number", type: "number" }, e);
|
|
2972
2958
|
}
|
|
2973
2959
|
function Me(e) {
|
|
2974
|
-
return
|
|
2960
|
+
return m({ [h]: "String", type: "string" }, e);
|
|
2975
2961
|
}
|
|
2976
2962
|
function* od(e) {
|
|
2977
2963
|
const r = e.trim().replace(/"|'/g, "");
|
|
@@ -3010,7 +2996,7 @@ function ad(e) {
|
|
|
3010
2996
|
}
|
|
3011
2997
|
function ni(e, r) {
|
|
3012
2998
|
return He(e) ? e.pattern.slice(1, e.pattern.length - 1) : D(e) ? `(${e.anyOf.map((n) => ni(n, r)).join("|")})` : mr(e) ? `${r}${Jr}` : dr(e) ? `${r}${Jr}` : cn(e) ? `${r}${Jr}` : Er(e) ? `${r}${Yo}` : Ke(e) ? `${r}${ad(e.const.toString())}` : jr(e) ? `${r}${xf}` : (() => {
|
|
3013
|
-
throw new cd(`Unexpected Kind '${e[
|
|
2999
|
+
throw new cd(`Unexpected Kind '${e[h]}'`);
|
|
3014
3000
|
})();
|
|
3015
3001
|
}
|
|
3016
3002
|
function oo(e) {
|
|
@@ -3022,7 +3008,7 @@ function rn(e) {
|
|
|
3022
3008
|
}
|
|
3023
3009
|
function ti(e, r) {
|
|
3024
3010
|
const n = T(e) ? oo(ud(e)) : oo(e);
|
|
3025
|
-
return
|
|
3011
|
+
return m({ [h]: "TemplateLiteral", type: "string", pattern: n }, r);
|
|
3026
3012
|
}
|
|
3027
3013
|
function sd(e) {
|
|
3028
3014
|
return ei(e).map((n) => n.toString());
|
|
@@ -3055,11 +3041,11 @@ function pd(e, r, n) {
|
|
|
3055
3041
|
function oi(e, r) {
|
|
3056
3042
|
return e.map((n) => ii(n, r));
|
|
3057
3043
|
}
|
|
3058
|
-
function
|
|
3044
|
+
function gd(e) {
|
|
3059
3045
|
return e.filter((r) => !Cr(r));
|
|
3060
3046
|
}
|
|
3061
|
-
function
|
|
3062
|
-
return si(
|
|
3047
|
+
function hd(e, r) {
|
|
3048
|
+
return si(gd(oi(e, r)));
|
|
3063
3049
|
}
|
|
3064
3050
|
function bd(e) {
|
|
3065
3051
|
return e.some((r) => Cr(r)) ? [] : e;
|
|
@@ -3077,7 +3063,7 @@ function $d(e, r) {
|
|
|
3077
3063
|
return r in e ? e[r] : C();
|
|
3078
3064
|
}
|
|
3079
3065
|
function ii(e, r) {
|
|
3080
|
-
return
|
|
3066
|
+
return se(e) ? hd(e.allOf, r) : D(e) ? Fd(e.anyOf, r) : Ge(e) ? vd(e.items ?? [], r) : cr(e) ? Od(e.items, r) : be(e) ? $d(e.properties, r) : C();
|
|
3081
3067
|
}
|
|
3082
3068
|
function ui(e, r) {
|
|
3083
3069
|
return r.map((n) => ii(e, n));
|
|
@@ -3086,16 +3072,16 @@ function io(e, r) {
|
|
|
3086
3072
|
return lr(ui(e, r));
|
|
3087
3073
|
}
|
|
3088
3074
|
function vn(e, r, n) {
|
|
3089
|
-
if (
|
|
3075
|
+
if (Y(e) || Y(r)) {
|
|
3090
3076
|
const t = "Index types using Ref parameters require both Type and Key to be of TSchema";
|
|
3091
3077
|
if (!xe(e) || !xe(r))
|
|
3092
3078
|
throw new Be(t);
|
|
3093
3079
|
return U("Index", [e, r]);
|
|
3094
3080
|
}
|
|
3095
|
-
return
|
|
3081
|
+
return ie(r) ? pd(e, r, n) : Ve(r) ? Id(e, r, n) : m(xe(r) ? io(e, Se(r)) : io(e, r), n);
|
|
3096
3082
|
}
|
|
3097
3083
|
function _d(e, r, n) {
|
|
3098
|
-
return { [r]: vn(e, [r],
|
|
3084
|
+
return { [r]: vn(e, [r], ne(n)) };
|
|
3099
3085
|
}
|
|
3100
3086
|
function wd(e, r, n) {
|
|
3101
3087
|
return r.reduce((t, o) => ({ ...t, ..._d(e, o, n) }), {});
|
|
@@ -3107,8 +3093,8 @@ function Id(e, r, n) {
|
|
|
3107
3093
|
const t = yd(e, r, n);
|
|
3108
3094
|
return K(t);
|
|
3109
3095
|
}
|
|
3110
|
-
function
|
|
3111
|
-
return
|
|
3096
|
+
function gt(e, r) {
|
|
3097
|
+
return m({ [h]: "Iterator", type: "Iterator", items: e }, r);
|
|
3112
3098
|
}
|
|
3113
3099
|
function kd(e) {
|
|
3114
3100
|
const r = [];
|
|
@@ -3117,25 +3103,25 @@ function kd(e) {
|
|
|
3117
3103
|
return r;
|
|
3118
3104
|
}
|
|
3119
3105
|
function Rd(e, r) {
|
|
3120
|
-
const n = kd(e), t = n.length > 0 ? { [
|
|
3121
|
-
return
|
|
3106
|
+
const n = kd(e), t = n.length > 0 ? { [h]: "Object", type: "object", properties: e, required: n } : { [h]: "Object", type: "object", properties: e };
|
|
3107
|
+
return m(t, r);
|
|
3122
3108
|
}
|
|
3123
3109
|
var M = Rd;
|
|
3124
3110
|
function ci(e, r) {
|
|
3125
|
-
return
|
|
3111
|
+
return m({ [h]: "Promise", type: "Promise", item: e }, r);
|
|
3126
3112
|
}
|
|
3127
3113
|
function xd(e) {
|
|
3128
|
-
return
|
|
3114
|
+
return m(te(e, [Zr]));
|
|
3129
3115
|
}
|
|
3130
3116
|
function Ad(e) {
|
|
3131
|
-
return
|
|
3117
|
+
return m({ ...e, [Zr]: "Readonly" });
|
|
3132
3118
|
}
|
|
3133
3119
|
function zd(e, r) {
|
|
3134
3120
|
return r === !1 ? xd(e) : Ad(e);
|
|
3135
3121
|
}
|
|
3136
3122
|
function Pe(e, r) {
|
|
3137
3123
|
const n = r ?? !0;
|
|
3138
|
-
return
|
|
3124
|
+
return ie(e) ? Pd(e, n) : zd(e, n);
|
|
3139
3125
|
}
|
|
3140
3126
|
function Td(e, r) {
|
|
3141
3127
|
const n = {};
|
|
@@ -3151,10 +3137,10 @@ function Pd(e, r) {
|
|
|
3151
3137
|
return K(n);
|
|
3152
3138
|
}
|
|
3153
3139
|
function pr(e, r) {
|
|
3154
|
-
return
|
|
3140
|
+
return m(e.length > 0 ? { [h]: "Tuple", type: "array", items: e, additionalItems: !1, minItems: e.length, maxItems: e.length } : { [h]: "Tuple", type: "array", minItems: e.length, maxItems: e.length }, r);
|
|
3155
3141
|
}
|
|
3156
3142
|
function ai(e, r) {
|
|
3157
|
-
return e in r ?
|
|
3143
|
+
return e in r ? ue(e, r[e]) : K(r);
|
|
3158
3144
|
}
|
|
3159
3145
|
function Zd(e) {
|
|
3160
3146
|
return { [e]: Z(e) };
|
|
@@ -3173,23 +3159,23 @@ function Ed(e, r) {
|
|
|
3173
3159
|
return ai(e, n);
|
|
3174
3160
|
}
|
|
3175
3161
|
function vr(e, r) {
|
|
3176
|
-
return r.map((n) =>
|
|
3162
|
+
return r.map((n) => ue(e, n));
|
|
3177
3163
|
}
|
|
3178
3164
|
function Nd(e, r) {
|
|
3179
3165
|
const n = {};
|
|
3180
3166
|
for (const t of globalThis.Object.getOwnPropertyNames(r))
|
|
3181
|
-
n[t] =
|
|
3167
|
+
n[t] = ue(e, r[t]);
|
|
3182
3168
|
return n;
|
|
3183
3169
|
}
|
|
3184
|
-
function
|
|
3170
|
+
function ue(e, r) {
|
|
3185
3171
|
const n = { ...r };
|
|
3186
3172
|
return (
|
|
3187
3173
|
// unevaluated modifier types
|
|
3188
|
-
Ae(r) ? Ze(
|
|
3174
|
+
Ae(r) ? Ze(ue(e, te(r, [_e]))) : Qn(r) ? Pe(ue(e, te(r, [Zr]))) : (
|
|
3189
3175
|
// unevaluated mapped types
|
|
3190
|
-
|
|
3176
|
+
ie(r) ? ai(e, r.properties) : Ve(r) ? Ed(e, r.keys) : (
|
|
3191
3177
|
// unevaluated types
|
|
3192
|
-
sr(r) ? dt(vr(e, r.parameters),
|
|
3178
|
+
sr(r) ? dt(vr(e, r.parameters), ue(e, r.returns), n) : fr(r) ? Ur(vr(e, r.parameters), ue(e, r.returns), n) : un(r) ? ft(ue(e, r.items), n) : an(r) ? gt(ue(e, r.items), n) : se(r) ? je(vr(e, r.allOf), n) : D(r) ? V(vr(e, r.anyOf), n) : Ge(r) ? pr(vr(e, r.items ?? []), n) : be(r) ? M(Nd(e, r.properties), n) : cr(r) ? st(ue(e, r.items), n) : sn(r) ? ci(ue(e, r.item), n) : r
|
|
3193
3179
|
)
|
|
3194
3180
|
)
|
|
3195
3181
|
);
|
|
@@ -3197,25 +3183,25 @@ function ce(e, r) {
|
|
|
3197
3183
|
function Ud(e, r) {
|
|
3198
3184
|
const n = {};
|
|
3199
3185
|
for (const t of e)
|
|
3200
|
-
n[t] =
|
|
3186
|
+
n[t] = ue(t, r);
|
|
3201
3187
|
return n;
|
|
3202
3188
|
}
|
|
3203
3189
|
function Ld(e, r, n) {
|
|
3204
|
-
const t = xe(e) ? Se(e) : e, o = r({ [
|
|
3190
|
+
const t = xe(e) ? Se(e) : e, o = r({ [h]: "MappedKey", keys: t }), u = Ud(t, o);
|
|
3205
3191
|
return M(u, n);
|
|
3206
3192
|
}
|
|
3207
3193
|
function Md(e) {
|
|
3208
|
-
return
|
|
3194
|
+
return m(te(e, [_e]));
|
|
3209
3195
|
}
|
|
3210
3196
|
function Dd(e) {
|
|
3211
|
-
return
|
|
3197
|
+
return m({ ...e, [_e]: "Optional" });
|
|
3212
3198
|
}
|
|
3213
3199
|
function Wd(e, r) {
|
|
3214
3200
|
return r === !1 ? Md(e) : Dd(e);
|
|
3215
3201
|
}
|
|
3216
3202
|
function Ze(e, r) {
|
|
3217
3203
|
const n = r ?? !0;
|
|
3218
|
-
return
|
|
3204
|
+
return ie(e) ? Vd(e, n) : Wd(e, n);
|
|
3219
3205
|
}
|
|
3220
3206
|
function Bd(e, r) {
|
|
3221
3207
|
const n = {};
|
|
@@ -3232,13 +3218,13 @@ function Vd(e, r) {
|
|
|
3232
3218
|
}
|
|
3233
3219
|
function Wn(e, r = {}) {
|
|
3234
3220
|
const n = e.every((o) => be(o)), t = xe(r.unevaluatedProperties) ? { unevaluatedProperties: r.unevaluatedProperties } : {};
|
|
3235
|
-
return
|
|
3221
|
+
return m(r.unevaluatedProperties === !1 || xe(r.unevaluatedProperties) || n ? { ...t, [h]: "Intersect", type: "object", allOf: e } : { ...t, [h]: "Intersect", allOf: e }, r);
|
|
3236
3222
|
}
|
|
3237
3223
|
function Hd(e) {
|
|
3238
3224
|
return e.every((r) => Ae(r));
|
|
3239
3225
|
}
|
|
3240
3226
|
function Gd(e) {
|
|
3241
|
-
return
|
|
3227
|
+
return te(e, [_e]);
|
|
3242
3228
|
}
|
|
3243
3229
|
function uo(e) {
|
|
3244
3230
|
return e.map((r) => Ae(r) ? Gd(r) : r);
|
|
@@ -3248,7 +3234,7 @@ function qd(e, r) {
|
|
|
3248
3234
|
}
|
|
3249
3235
|
function si(e, r = {}) {
|
|
3250
3236
|
if (e.length === 1)
|
|
3251
|
-
return
|
|
3237
|
+
return m(e[0], r);
|
|
3252
3238
|
if (e.length === 0)
|
|
3253
3239
|
return C(r);
|
|
3254
3240
|
if (e.some((n) => dn(n)))
|
|
@@ -3257,7 +3243,7 @@ function si(e, r = {}) {
|
|
|
3257
3243
|
}
|
|
3258
3244
|
function je(e, r) {
|
|
3259
3245
|
if (e.length === 1)
|
|
3260
|
-
return
|
|
3246
|
+
return m(e[0], r);
|
|
3261
3247
|
if (e.length === 0)
|
|
3262
3248
|
return C(r);
|
|
3263
3249
|
if (e.some((n) => dn(n)))
|
|
@@ -3268,7 +3254,7 @@ function Lr(...e) {
|
|
|
3268
3254
|
const [r, n] = typeof e[0] == "string" ? [e[0], e[1]] : [e[0].$id, e[1]];
|
|
3269
3255
|
if (typeof r != "string")
|
|
3270
3256
|
throw new Be("Ref: $ref must be a string");
|
|
3271
|
-
return
|
|
3257
|
+
return m({ [h]: "Ref", $ref: r }, n);
|
|
3272
3258
|
}
|
|
3273
3259
|
function Jd(e, r) {
|
|
3274
3260
|
return U("Awaited", [U(e, r)]);
|
|
@@ -3289,12 +3275,12 @@ function fi(e) {
|
|
|
3289
3275
|
return e.map((r) => On(r));
|
|
3290
3276
|
}
|
|
3291
3277
|
function On(e, r) {
|
|
3292
|
-
return
|
|
3278
|
+
return m(ar(e) ? Jd(e.target, e.parameters) : se(e) ? Xd(e.allOf) : D(e) ? Qd(e.anyOf) : sn(e) ? em(e.item) : Y(e) ? Yd(e.$ref) : e, r);
|
|
3293
3279
|
}
|
|
3294
3280
|
function di(e) {
|
|
3295
3281
|
const r = [];
|
|
3296
3282
|
for (const n of e)
|
|
3297
|
-
r.push(
|
|
3283
|
+
r.push(ht(n));
|
|
3298
3284
|
return r;
|
|
3299
3285
|
}
|
|
3300
3286
|
function rm(e) {
|
|
@@ -3317,8 +3303,8 @@ function im(e) {
|
|
|
3317
3303
|
function um(e) {
|
|
3318
3304
|
return [];
|
|
3319
3305
|
}
|
|
3320
|
-
function
|
|
3321
|
-
return
|
|
3306
|
+
function ht(e) {
|
|
3307
|
+
return se(e) ? rm(e.allOf) : D(e) ? nm(e.anyOf) : Ge(e) ? tm(e.items ?? []) : cr(e) ? om(e.items) : be(e) ? im(e.properties) : fn(e) ? um(e.patternProperties) : [];
|
|
3322
3308
|
}
|
|
3323
3309
|
function cm(e, r) {
|
|
3324
3310
|
return U("KeyOf", [U(e, r)]);
|
|
@@ -3327,19 +3313,19 @@ function am(e) {
|
|
|
3327
3313
|
return U("KeyOf", [Lr(e)]);
|
|
3328
3314
|
}
|
|
3329
3315
|
function sm(e, r) {
|
|
3330
|
-
const n =
|
|
3331
|
-
return
|
|
3316
|
+
const n = ht(e), t = fm(n), o = lr(t);
|
|
3317
|
+
return m(o, r);
|
|
3332
3318
|
}
|
|
3333
3319
|
function fm(e) {
|
|
3334
3320
|
return e.map((r) => r === "[number]" ? Xe() : Z(r));
|
|
3335
3321
|
}
|
|
3336
3322
|
function bt(e, r) {
|
|
3337
|
-
return ar(e) ? cm(e.target, e.parameters) :
|
|
3323
|
+
return ar(e) ? cm(e.target, e.parameters) : Y(e) ? am(e.$ref) : ie(e) ? lm(e, r) : sm(e, r);
|
|
3338
3324
|
}
|
|
3339
3325
|
function dm(e, r) {
|
|
3340
3326
|
const n = {};
|
|
3341
3327
|
for (const t of globalThis.Object.getOwnPropertyNames(e))
|
|
3342
|
-
n[t] = bt(e[t],
|
|
3328
|
+
n[t] = bt(e[t], ne(r));
|
|
3343
3329
|
return n;
|
|
3344
3330
|
}
|
|
3345
3331
|
function mm(e, r) {
|
|
@@ -3352,22 +3338,22 @@ function lm(e, r) {
|
|
|
3352
3338
|
function pm(e) {
|
|
3353
3339
|
const r = [];
|
|
3354
3340
|
for (const n of e)
|
|
3355
|
-
r.push(...
|
|
3341
|
+
r.push(...ht(n));
|
|
3356
3342
|
return Sf(r);
|
|
3357
3343
|
}
|
|
3358
|
-
function
|
|
3344
|
+
function gm(e) {
|
|
3359
3345
|
return e.filter((r) => !Cr(r));
|
|
3360
3346
|
}
|
|
3361
|
-
function
|
|
3347
|
+
function hm(e, r) {
|
|
3362
3348
|
const n = [];
|
|
3363
3349
|
for (const t of e)
|
|
3364
3350
|
n.push(...ui(t, [r]));
|
|
3365
|
-
return
|
|
3351
|
+
return gm(n);
|
|
3366
3352
|
}
|
|
3367
3353
|
function bm(e, r) {
|
|
3368
3354
|
const n = {};
|
|
3369
3355
|
for (const t of r)
|
|
3370
|
-
n[t] = si(
|
|
3356
|
+
n[t] = si(hm(e, t));
|
|
3371
3357
|
return n;
|
|
3372
3358
|
}
|
|
3373
3359
|
function Fm(e, r) {
|
|
@@ -3375,22 +3361,22 @@ function Fm(e, r) {
|
|
|
3375
3361
|
return M(t, r);
|
|
3376
3362
|
}
|
|
3377
3363
|
function mi(e) {
|
|
3378
|
-
return
|
|
3364
|
+
return m({ [h]: "Date", type: "Date" }, e);
|
|
3379
3365
|
}
|
|
3380
3366
|
function li(e) {
|
|
3381
|
-
return
|
|
3367
|
+
return m({ [h]: "Null", type: "null" }, e);
|
|
3382
3368
|
}
|
|
3383
3369
|
function pi(e) {
|
|
3384
|
-
return
|
|
3385
|
-
}
|
|
3386
|
-
function hi(e) {
|
|
3387
|
-
return l({ [g]: "Undefined", type: "undefined" }, e);
|
|
3370
|
+
return m({ [h]: "Symbol", type: "symbol" }, e);
|
|
3388
3371
|
}
|
|
3389
3372
|
function gi(e) {
|
|
3390
|
-
return
|
|
3373
|
+
return m({ [h]: "Undefined", type: "undefined" }, e);
|
|
3374
|
+
}
|
|
3375
|
+
function hi(e) {
|
|
3376
|
+
return m({ [h]: "Uint8Array", type: "Uint8Array" }, e);
|
|
3391
3377
|
}
|
|
3392
3378
|
function $n(e) {
|
|
3393
|
-
return
|
|
3379
|
+
return m({ [h]: "Unknown" }, e);
|
|
3394
3380
|
}
|
|
3395
3381
|
function vm(e) {
|
|
3396
3382
|
return e.map((r) => Ft(r, !1));
|
|
@@ -3405,10 +3391,10 @@ function qr(e, r) {
|
|
|
3405
3391
|
return r === !0 ? e : Pe(e);
|
|
3406
3392
|
}
|
|
3407
3393
|
function Ft(e, r) {
|
|
3408
|
-
return Bs(e) || Vs(e) ? qr(xr(), r) :
|
|
3394
|
+
return Bs(e) || Vs(e) ? qr(xr(), r) : ee(e) ? Pe(pr(vm(e))) : Pr(e) ? hi() : Yn(e) ? mi() : j(e) ? qr(M(Om(e)), r) : Ks(e) ? qr(Ur([], $n()), r) : P(e) ? gi() : Hs(e) ? li() : Gs(e) ? pi() : No(e) ? pt() : Fe(e) || Sr(e) || T(e) ? Z(e) : M({});
|
|
3409
3395
|
}
|
|
3410
3396
|
function $m(e, r) {
|
|
3411
|
-
return
|
|
3397
|
+
return m(Ft(e, !0), r);
|
|
3412
3398
|
}
|
|
3413
3399
|
function _m(e, r) {
|
|
3414
3400
|
return sr(e) ? pr(e.parameters, r) : C(r);
|
|
@@ -3425,68 +3411,68 @@ var a;
|
|
|
3425
3411
|
(function(e) {
|
|
3426
3412
|
e[e.Union = 0] = "Union", e[e.True = 1] = "True", e[e.False = 2] = "False";
|
|
3427
3413
|
})(a || (a = {}));
|
|
3428
|
-
function
|
|
3414
|
+
function ae(e) {
|
|
3429
3415
|
return e === a.False ? e : a.True;
|
|
3430
3416
|
}
|
|
3431
|
-
function
|
|
3417
|
+
function gr(e) {
|
|
3432
3418
|
throw new ym(e);
|
|
3433
3419
|
}
|
|
3434
3420
|
function E(e) {
|
|
3435
|
-
return Te(e) || Ye(e) || $e(e) ||
|
|
3421
|
+
return Te(e) || Ye(e) || $e(e) || ge(e) || le(e);
|
|
3436
3422
|
}
|
|
3437
3423
|
function N(e, r) {
|
|
3438
|
-
return Te(r) ? vi() : Ye(r) ? _n(e, r) : $e(r) ? Ot(e, r) :
|
|
3424
|
+
return Te(r) ? vi() : Ye(r) ? _n(e, r) : $e(r) ? Ot(e, r) : ge(r) ? wi() : le(r) ? vt() : gr("StructuralRight");
|
|
3439
3425
|
}
|
|
3440
3426
|
function vt(e, r) {
|
|
3441
3427
|
return a.True;
|
|
3442
3428
|
}
|
|
3443
3429
|
function Im(e, r) {
|
|
3444
|
-
return Ye(r) ? _n(e, r) : $e(r) && r.anyOf.some((n) => le(n) ||
|
|
3430
|
+
return Ye(r) ? _n(e, r) : $e(r) && r.anyOf.some((n) => le(n) || ge(n)) ? a.True : $e(r) ? a.Union : ge(r) || le(r) ? a.True : a.Union;
|
|
3445
3431
|
}
|
|
3446
3432
|
function km(e, r) {
|
|
3447
|
-
return
|
|
3433
|
+
return ge(e) ? a.False : le(e) ? a.Union : Te(e) ? a.True : a.False;
|
|
3448
3434
|
}
|
|
3449
3435
|
function Rm(e, r) {
|
|
3450
|
-
return z(r) && wn(r) ? a.True : E(r) ? N(e, r) : qe(r) ?
|
|
3436
|
+
return z(r) && wn(r) ? a.True : E(r) ? N(e, r) : qe(r) ? ae(_(e.items, r.items)) : a.False;
|
|
3451
3437
|
}
|
|
3452
3438
|
function xm(e, r) {
|
|
3453
|
-
return E(r) ? N(e, r) : it(r) ?
|
|
3439
|
+
return E(r) ? N(e, r) : it(r) ? ae(_(e.items, r.items)) : a.False;
|
|
3454
3440
|
}
|
|
3455
3441
|
function Am(e, r) {
|
|
3456
|
-
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ?
|
|
3442
|
+
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ? fe(e, r) : mn(r) ? a.True : a.False;
|
|
3457
3443
|
}
|
|
3458
3444
|
function bi(e, r) {
|
|
3459
3445
|
return Jo(e) || Je(e) ? a.True : a.False;
|
|
3460
3446
|
}
|
|
3461
3447
|
function zm(e, r) {
|
|
3462
|
-
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ?
|
|
3448
|
+
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ? fe(e, r) : Je(r) ? a.True : a.False;
|
|
3463
3449
|
}
|
|
3464
3450
|
function Tm(e, r) {
|
|
3465
|
-
return E(r) ? N(e, r) : z(r) ? H(e, r) : ln(r) ? e.parameters.length > r.parameters.length ? a.False : e.parameters.every((n, t) =>
|
|
3451
|
+
return E(r) ? N(e, r) : z(r) ? H(e, r) : ln(r) ? e.parameters.length > r.parameters.length ? a.False : e.parameters.every((n, t) => ae(_(r.parameters[t], n)) === a.True) ? ae(_(e.returns, r.returns)) : a.False : a.False;
|
|
3466
3452
|
}
|
|
3467
3453
|
function Sm(e, r) {
|
|
3468
|
-
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ?
|
|
3454
|
+
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ? fe(e, r) : pn(r) ? a.True : a.False;
|
|
3469
3455
|
}
|
|
3470
3456
|
function Pm(e, r) {
|
|
3471
|
-
return E(r) ? N(e, r) : z(r) ? H(e, r) :
|
|
3457
|
+
return E(r) ? N(e, r) : z(r) ? H(e, r) : gn(r) ? e.parameters.length > r.parameters.length ? a.False : e.parameters.every((n, t) => ae(_(r.parameters[t], n)) === a.True) ? ae(_(e.returns, r.returns)) : a.False : a.False;
|
|
3472
3458
|
}
|
|
3473
3459
|
function Fi(e, r) {
|
|
3474
|
-
return ze(e) && Fe(e.const) ||
|
|
3460
|
+
return ze(e) && Fe(e.const) || J(e) || we(e) ? a.True : a.False;
|
|
3475
3461
|
}
|
|
3476
3462
|
function Zm(e, r) {
|
|
3477
|
-
return we(r) ||
|
|
3463
|
+
return we(r) || J(r) ? a.True : E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ? fe(e, r) : a.False;
|
|
3478
3464
|
}
|
|
3479
3465
|
function _n(e, r) {
|
|
3480
|
-
return r.allOf.every((n) =>
|
|
3466
|
+
return r.allOf.every((n) => _(e, n) === a.True) ? a.True : a.False;
|
|
3481
3467
|
}
|
|
3482
3468
|
function jm(e, r) {
|
|
3483
|
-
return e.allOf.some((n) =>
|
|
3469
|
+
return e.allOf.some((n) => _(n, r) === a.True) ? a.True : a.False;
|
|
3484
3470
|
}
|
|
3485
3471
|
function Cm(e, r) {
|
|
3486
|
-
return E(r) ? N(e, r) : ut(r) ?
|
|
3472
|
+
return E(r) ? N(e, r) : ut(r) ? ae(_(e.items, r.items)) : a.False;
|
|
3487
3473
|
}
|
|
3488
3474
|
function Em(e, r) {
|
|
3489
|
-
return ze(r) && r.const === e.const ? a.True : E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ?
|
|
3475
|
+
return ze(r) && r.const === e.const ? a.True : E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ? fe(e, r) : pe(r) ? _i(e) : J(r) ? Oi(e) : we(r) ? Fi(e) : Je(r) ? bi(e) : a.False;
|
|
3490
3476
|
}
|
|
3491
3477
|
function vi(e, r) {
|
|
3492
3478
|
return a.False;
|
|
@@ -3501,64 +3487,64 @@ function co(e) {
|
|
|
3501
3487
|
return n % 2 === 0 ? r : $n();
|
|
3502
3488
|
}
|
|
3503
3489
|
function Um(e, r) {
|
|
3504
|
-
return nr(e) ?
|
|
3490
|
+
return nr(e) ? _(co(e), r) : nr(r) ? _(e, co(r)) : gr("Invalid fallthrough for Not");
|
|
3505
3491
|
}
|
|
3506
3492
|
function Lm(e, r) {
|
|
3507
|
-
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ?
|
|
3493
|
+
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ? fe(e, r) : ct(r) ? a.True : a.False;
|
|
3508
3494
|
}
|
|
3509
3495
|
function Oi(e, r) {
|
|
3510
|
-
return qo(e) ||
|
|
3496
|
+
return qo(e) || J(e) || we(e) ? a.True : a.False;
|
|
3511
3497
|
}
|
|
3512
3498
|
function Mm(e, r) {
|
|
3513
|
-
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ?
|
|
3499
|
+
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ? fe(e, r) : we(r) || J(r) ? a.True : a.False;
|
|
3514
3500
|
}
|
|
3515
|
-
function
|
|
3501
|
+
function X(e, r) {
|
|
3516
3502
|
return Object.getOwnPropertyNames(e.properties).length === r;
|
|
3517
3503
|
}
|
|
3518
3504
|
function ao(e) {
|
|
3519
3505
|
return wn(e);
|
|
3520
3506
|
}
|
|
3521
3507
|
function so(e) {
|
|
3522
|
-
return
|
|
3508
|
+
return X(e, 0) || X(e, 1) && "description" in e.properties && $e(e.properties.description) && e.properties.description.anyOf.length === 2 && (pe(e.properties.description.anyOf[0]) && Le(e.properties.description.anyOf[1]) || pe(e.properties.description.anyOf[1]) && Le(e.properties.description.anyOf[0]));
|
|
3523
3509
|
}
|
|
3524
3510
|
function Sn(e) {
|
|
3525
|
-
return
|
|
3511
|
+
return X(e, 0);
|
|
3526
3512
|
}
|
|
3527
3513
|
function fo(e) {
|
|
3528
|
-
return
|
|
3514
|
+
return X(e, 0);
|
|
3529
3515
|
}
|
|
3530
3516
|
function Dm(e) {
|
|
3531
|
-
return
|
|
3517
|
+
return X(e, 0);
|
|
3532
3518
|
}
|
|
3533
3519
|
function Wm(e) {
|
|
3534
|
-
return
|
|
3520
|
+
return X(e, 0);
|
|
3535
3521
|
}
|
|
3536
3522
|
function Bm(e) {
|
|
3537
3523
|
return wn(e);
|
|
3538
3524
|
}
|
|
3539
3525
|
function Km(e) {
|
|
3540
3526
|
const r = Xe();
|
|
3541
|
-
return
|
|
3527
|
+
return X(e, 0) || X(e, 1) && "length" in e.properties && ae(_(e.properties.length, r)) === a.True;
|
|
3542
3528
|
}
|
|
3543
3529
|
function Vm(e) {
|
|
3544
|
-
return
|
|
3530
|
+
return X(e, 0);
|
|
3545
3531
|
}
|
|
3546
3532
|
function wn(e) {
|
|
3547
3533
|
const r = Xe();
|
|
3548
|
-
return
|
|
3534
|
+
return X(e, 0) || X(e, 1) && "length" in e.properties && ae(_(e.properties.length, r)) === a.True;
|
|
3549
3535
|
}
|
|
3550
3536
|
function Hm(e) {
|
|
3551
3537
|
const r = Ur([xr()], xr());
|
|
3552
|
-
return
|
|
3538
|
+
return X(e, 0) || X(e, 1) && "then" in e.properties && ae(_(e.properties.then, r)) === a.True;
|
|
3553
3539
|
}
|
|
3554
3540
|
function $i(e, r) {
|
|
3555
|
-
return
|
|
3541
|
+
return _(e, r) === a.False || en(e) && !en(r) ? a.False : a.True;
|
|
3556
3542
|
}
|
|
3557
3543
|
function H(e, r) {
|
|
3558
|
-
return
|
|
3544
|
+
return ge(e) ? a.False : le(e) ? a.Union : Te(e) || Go(e) && ao(r) || qo(e) && Sn(r) || Jo(e) && fo(r) || kr(e) && so(r) || mn(e) && Dm(r) || pe(e) && ao(r) || kr(e) && so(r) || J(e) && Sn(r) || we(e) && Sn(r) || Je(e) && fo(r) || Nr(e) && Bm(r) || pn(e) && Wm(r) || ln(e) && Vm(r) || gn(e) && Km(r) ? a.True : W(e) && pe(Bn(e)) ? r[on] === "Record" ? a.True : a.False : W(e) && J(Bn(e)) ? X(r, 0) ? a.True : a.False : a.False;
|
|
3559
3545
|
}
|
|
3560
3546
|
function Gm(e, r) {
|
|
3561
|
-
return E(r) ? N(e, r) : W(r) ?
|
|
3547
|
+
return E(r) ? N(e, r) : W(r) ? fe(e, r) : z(r) ? (() => {
|
|
3562
3548
|
for (const n of Object.getOwnPropertyNames(r.properties)) {
|
|
3563
3549
|
if (!(n in e.properties) && !en(r.properties[n]))
|
|
3564
3550
|
return a.False;
|
|
@@ -3571,17 +3557,17 @@ function Gm(e, r) {
|
|
|
3571
3557
|
})() : a.False;
|
|
3572
3558
|
}
|
|
3573
3559
|
function qm(e, r) {
|
|
3574
|
-
return E(r) ? N(e, r) : z(r) && Hm(r) ? a.True : at(r) ?
|
|
3560
|
+
return E(r) ? N(e, r) : z(r) && Hm(r) ? a.True : at(r) ? ae(_(e.item, r.item)) : a.False;
|
|
3575
3561
|
}
|
|
3576
3562
|
function Bn(e) {
|
|
3577
|
-
return tr in e.patternProperties ? Xe() : or in e.patternProperties ? Me() :
|
|
3563
|
+
return tr in e.patternProperties ? Xe() : or in e.patternProperties ? Me() : gr("Unknown record key pattern");
|
|
3578
3564
|
}
|
|
3579
3565
|
function Kn(e) {
|
|
3580
|
-
return tr in e.patternProperties ? e.patternProperties[tr] : or in e.patternProperties ? e.patternProperties[or] :
|
|
3566
|
+
return tr in e.patternProperties ? e.patternProperties[tr] : or in e.patternProperties ? e.patternProperties[or] : gr("Unable to get record value schema");
|
|
3581
3567
|
}
|
|
3582
|
-
function
|
|
3568
|
+
function fe(e, r) {
|
|
3583
3569
|
const [n, t] = [Bn(r), Kn(r)];
|
|
3584
|
-
return Go(e) &&
|
|
3570
|
+
return Go(e) && J(n) && ae(_(e, t)) === a.True ? a.True : Nr(e) && J(n) || pe(e) && J(n) || qe(e) && J(n) ? _(e, t) : z(e) ? (() => {
|
|
3585
3571
|
for (const o of Object.getOwnPropertyNames(e.properties))
|
|
3586
3572
|
if ($i(t, e.properties[o]) === a.False)
|
|
3587
3573
|
return a.False;
|
|
@@ -3589,73 +3575,73 @@ function de(e, r) {
|
|
|
3589
3575
|
})() : a.False;
|
|
3590
3576
|
}
|
|
3591
3577
|
function Jm(e, r) {
|
|
3592
|
-
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ?
|
|
3578
|
+
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ? _(Kn(e), Kn(r)) : a.False;
|
|
3593
3579
|
}
|
|
3594
3580
|
function Ym(e, r) {
|
|
3595
3581
|
const n = Ir(e) ? Me() : e, t = Ir(r) ? Me() : r;
|
|
3596
|
-
return
|
|
3582
|
+
return _(n, t);
|
|
3597
3583
|
}
|
|
3598
3584
|
function _i(e, r) {
|
|
3599
3585
|
return ze(e) && T(e.const) || pe(e) ? a.True : a.False;
|
|
3600
3586
|
}
|
|
3601
3587
|
function Xm(e, r) {
|
|
3602
|
-
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ?
|
|
3588
|
+
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ? fe(e, r) : pe(r) ? a.True : a.False;
|
|
3603
3589
|
}
|
|
3604
3590
|
function Qm(e, r) {
|
|
3605
|
-
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ?
|
|
3591
|
+
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ? fe(e, r) : kr(r) ? a.True : a.False;
|
|
3606
3592
|
}
|
|
3607
3593
|
function el(e, r) {
|
|
3608
|
-
return Rr(e) ?
|
|
3594
|
+
return Rr(e) ? _(rn(e), r) : Rr(r) ? _(e, rn(r)) : gr("Invalid fallthrough for TemplateLiteral");
|
|
3609
3595
|
}
|
|
3610
3596
|
function rl(e, r) {
|
|
3611
|
-
return qe(r) && e.items !== void 0 && e.items.every((n) =>
|
|
3597
|
+
return qe(r) && e.items !== void 0 && e.items.every((n) => _(n, r.items) === a.True);
|
|
3612
3598
|
}
|
|
3613
3599
|
function nl(e, r) {
|
|
3614
|
-
return Te(e) ? a.True :
|
|
3600
|
+
return Te(e) ? a.True : ge(e) ? a.False : le(e) ? a.Union : a.False;
|
|
3615
3601
|
}
|
|
3616
3602
|
function tl(e, r) {
|
|
3617
|
-
return E(r) ? N(e, r) : z(r) && wn(r) || qe(r) && rl(e, r) ? a.True :
|
|
3603
|
+
return E(r) ? N(e, r) : z(r) && wn(r) || qe(r) && rl(e, r) ? a.True : hn(r) ? P(e.items) && !P(r.items) || !P(e.items) && P(r.items) ? a.False : P(e.items) && !P(r.items) || e.items.every((n, t) => _(n, r.items[t]) === a.True) ? a.True : a.False : a.False;
|
|
3618
3604
|
}
|
|
3619
3605
|
function ol(e, r) {
|
|
3620
|
-
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ?
|
|
3606
|
+
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ? fe(e, r) : Nr(r) ? a.True : a.False;
|
|
3621
3607
|
}
|
|
3622
3608
|
function il(e, r) {
|
|
3623
|
-
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ?
|
|
3609
|
+
return E(r) ? N(e, r) : z(r) ? H(e, r) : W(r) ? fe(e, r) : bn(r) ? al(e) : Le(r) ? a.True : a.False;
|
|
3624
3610
|
}
|
|
3625
3611
|
function Ot(e, r) {
|
|
3626
|
-
return r.anyOf.some((n) =>
|
|
3612
|
+
return r.anyOf.some((n) => _(e, n) === a.True) ? a.True : a.False;
|
|
3627
3613
|
}
|
|
3628
3614
|
function ul(e, r) {
|
|
3629
|
-
return e.anyOf.every((n) =>
|
|
3615
|
+
return e.anyOf.every((n) => _(n, r) === a.True) ? a.True : a.False;
|
|
3630
3616
|
}
|
|
3631
3617
|
function wi(e, r) {
|
|
3632
3618
|
return a.True;
|
|
3633
3619
|
}
|
|
3634
3620
|
function cl(e, r) {
|
|
3635
|
-
return Te(r) ? vi() : Ye(r) ? _n(e, r) : $e(r) ? Ot(e, r) : le(r) ? vt() : pe(r) ? _i(e) :
|
|
3621
|
+
return Te(r) ? vi() : Ye(r) ? _n(e, r) : $e(r) ? Ot(e, r) : le(r) ? vt() : pe(r) ? _i(e) : J(r) ? Oi(e) : we(r) ? Fi(e) : Je(r) ? bi(e) : qe(r) ? km(e) : hn(r) ? nl(e) : z(r) ? H(e, r) : ge(r) ? a.True : a.False;
|
|
3636
3622
|
}
|
|
3637
3623
|
function al(e, r) {
|
|
3638
3624
|
return Le(e) || Le(e) ? a.True : a.False;
|
|
3639
3625
|
}
|
|
3640
3626
|
function sl(e, r) {
|
|
3641
|
-
return Ye(r) ? _n(e, r) : $e(r) ? Ot(e, r) :
|
|
3627
|
+
return Ye(r) ? _n(e, r) : $e(r) ? Ot(e, r) : ge(r) ? wi() : le(r) ? vt() : z(r) ? H(e, r) : bn(r) ? a.True : a.False;
|
|
3642
3628
|
}
|
|
3643
|
-
function
|
|
3629
|
+
function _(e, r) {
|
|
3644
3630
|
return (
|
|
3645
3631
|
// resolvable
|
|
3646
3632
|
Rr(e) || Rr(r) ? el(e, r) : Ir(e) || Ir(r) ? Ym(e, r) : nr(e) || nr(r) ? Um(e, r) : (
|
|
3647
3633
|
// standard
|
|
3648
|
-
le(e) ? Im(e, r) : qe(e) ? Rm(e, r) : mn(e) ? Am(e, r) : Je(e) ? zm(e, r) : it(e) ? xm(e, r) : ln(e) ? Tm(e, r) : pn(e) ? Sm(e, r) :
|
|
3634
|
+
le(e) ? Im(e, r) : qe(e) ? Rm(e, r) : mn(e) ? Am(e, r) : Je(e) ? zm(e, r) : it(e) ? xm(e, r) : ln(e) ? Tm(e, r) : pn(e) ? Sm(e, r) : gn(e) ? Pm(e, r) : we(e) ? Zm(e, r) : Ye(e) ? jm(e, r) : ut(e) ? Cm(e, r) : ze(e) ? Em(e, r) : Te(e) ? Nm() : ct(e) ? Lm(e, r) : J(e) ? Mm(e, r) : z(e) ? Gm(e, r) : W(e) ? Jm(e, r) : pe(e) ? Xm(e, r) : kr(e) ? Qm(e, r) : hn(e) ? tl(e, r) : at(e) ? qm(e, r) : Nr(e) ? ol(e, r) : Le(e) ? il(e, r) : $e(e) ? ul(e, r) : ge(e) ? cl(e, r) : bn(e) ? sl(e, r) : gr(`Unknown left type operand '${e[h]}'`)
|
|
3649
3635
|
)
|
|
3650
3636
|
);
|
|
3651
3637
|
}
|
|
3652
3638
|
function Mr(e, r) {
|
|
3653
|
-
return
|
|
3639
|
+
return _(e, r);
|
|
3654
3640
|
}
|
|
3655
3641
|
function fl(e, r, n, t, o) {
|
|
3656
3642
|
const u = {};
|
|
3657
3643
|
for (const c of globalThis.Object.getOwnPropertyNames(e))
|
|
3658
|
-
u[c] = $t(e[c], r, n, t,
|
|
3644
|
+
u[c] = $t(e[c], r, n, t, ne(o));
|
|
3659
3645
|
return u;
|
|
3660
3646
|
}
|
|
3661
3647
|
function dl(e, r, n, t, o) {
|
|
@@ -3670,21 +3656,21 @@ function ll(e, r, n, t) {
|
|
|
3670
3656
|
return o === a.Union ? V([n, t]) : o === a.True ? n : t;
|
|
3671
3657
|
}
|
|
3672
3658
|
function $t(e, r, n, t, o) {
|
|
3673
|
-
return
|
|
3659
|
+
return ie(e) ? ml(e, r, n, t, o) : Ve(e) ? m(bl(e, r, n, t, o)) : m(ll(e, r, n, t), o);
|
|
3674
3660
|
}
|
|
3675
3661
|
function pl(e, r, n, t, o) {
|
|
3676
3662
|
return {
|
|
3677
|
-
[e]: $t(Z(e), r, n, t,
|
|
3663
|
+
[e]: $t(Z(e), r, n, t, ne(o))
|
|
3678
3664
|
};
|
|
3679
3665
|
}
|
|
3680
|
-
function
|
|
3666
|
+
function gl(e, r, n, t, o) {
|
|
3681
3667
|
return e.reduce((u, c) => ({ ...u, ...pl(c, r, n, t, o) }), {});
|
|
3682
3668
|
}
|
|
3683
|
-
function
|
|
3684
|
-
return
|
|
3669
|
+
function hl(e, r, n, t, o) {
|
|
3670
|
+
return gl(e.keys, r, n, t, o);
|
|
3685
3671
|
}
|
|
3686
3672
|
function bl(e, r, n, t, o) {
|
|
3687
|
-
const u =
|
|
3673
|
+
const u = hl(e, r, n, t, o);
|
|
3688
3674
|
return K(u);
|
|
3689
3675
|
}
|
|
3690
3676
|
function Fl(e, r) {
|
|
@@ -3695,7 +3681,7 @@ function vl(e, r) {
|
|
|
3695
3681
|
return n.length === 1 ? n[0] : V(n);
|
|
3696
3682
|
}
|
|
3697
3683
|
function _t(e, r, n = {}) {
|
|
3698
|
-
return He(e) ?
|
|
3684
|
+
return He(e) ? m(Fl(e, r), n) : ie(e) ? m(_l(e, r), n) : m(D(e) ? vl(e.anyOf, r) : Mr(e, r) !== a.False ? C() : e, n);
|
|
3699
3685
|
}
|
|
3700
3686
|
function Ol(e, r) {
|
|
3701
3687
|
const n = {};
|
|
@@ -3718,7 +3704,7 @@ function yl(e, r) {
|
|
|
3718
3704
|
return n.length === 1 ? n[0] : V(n);
|
|
3719
3705
|
}
|
|
3720
3706
|
function wt(e, r, n) {
|
|
3721
|
-
return He(e) ?
|
|
3707
|
+
return He(e) ? m(wl(e, r), n) : ie(e) ? m(Rl(e, r), n) : m(D(e) ? yl(e.anyOf, r) : Mr(e, r) !== a.False ? e : C(), n);
|
|
3722
3708
|
}
|
|
3723
3709
|
function Il(e, r) {
|
|
3724
3710
|
const n = {};
|
|
@@ -3734,13 +3720,13 @@ function Rl(e, r) {
|
|
|
3734
3720
|
return K(n);
|
|
3735
3721
|
}
|
|
3736
3722
|
function xl(e, r) {
|
|
3737
|
-
return sr(e) ?
|
|
3723
|
+
return sr(e) ? m(e.returns, r) : C(r);
|
|
3738
3724
|
}
|
|
3739
3725
|
function yi(e) {
|
|
3740
3726
|
return Pe(Ze(e));
|
|
3741
3727
|
}
|
|
3742
3728
|
function Qe(e, r, n) {
|
|
3743
|
-
return
|
|
3729
|
+
return m({ [h]: "Record", type: "object", patternProperties: { [e]: r } }, n);
|
|
3744
3730
|
}
|
|
3745
3731
|
function yt(e, r, n) {
|
|
3746
3732
|
const t = {};
|
|
@@ -3793,10 +3779,10 @@ function ki(e) {
|
|
|
3793
3779
|
return e.patternProperties[It(e)];
|
|
3794
3780
|
}
|
|
3795
3781
|
function Ll(e, r) {
|
|
3796
|
-
return r.parameters = Dr(e, r.parameters), r.returns =
|
|
3782
|
+
return r.parameters = Dr(e, r.parameters), r.returns = he(e, r.returns), r;
|
|
3797
3783
|
}
|
|
3798
3784
|
function Ml(e, r) {
|
|
3799
|
-
return r.parameters = Dr(e, r.parameters), r.returns =
|
|
3785
|
+
return r.parameters = Dr(e, r.parameters), r.returns = he(e, r.returns), r;
|
|
3800
3786
|
}
|
|
3801
3787
|
function Dl(e, r) {
|
|
3802
3788
|
return r.allOf = Dr(e, r.allOf), r;
|
|
@@ -3808,50 +3794,50 @@ function Bl(e, r) {
|
|
|
3808
3794
|
return P(r.items) || (r.items = Dr(e, r.items)), r;
|
|
3809
3795
|
}
|
|
3810
3796
|
function Kl(e, r) {
|
|
3811
|
-
return r.items =
|
|
3797
|
+
return r.items = he(e, r.items), r;
|
|
3812
3798
|
}
|
|
3813
3799
|
function Vl(e, r) {
|
|
3814
|
-
return r.items =
|
|
3800
|
+
return r.items = he(e, r.items), r;
|
|
3815
3801
|
}
|
|
3816
3802
|
function Hl(e, r) {
|
|
3817
|
-
return r.items =
|
|
3803
|
+
return r.items = he(e, r.items), r;
|
|
3818
3804
|
}
|
|
3819
3805
|
function Gl(e, r) {
|
|
3820
|
-
return r.item =
|
|
3806
|
+
return r.item = he(e, r.item), r;
|
|
3821
3807
|
}
|
|
3822
3808
|
function ql(e, r) {
|
|
3823
3809
|
const n = Ql(e, r.properties);
|
|
3824
3810
|
return { ...r, ...M(n) };
|
|
3825
3811
|
}
|
|
3826
3812
|
function Jl(e, r) {
|
|
3827
|
-
const n =
|
|
3813
|
+
const n = he(e, Ul(r)), t = he(e, ki(r)), o = Ii(n, t);
|
|
3828
3814
|
return { ...r, ...o };
|
|
3829
3815
|
}
|
|
3830
3816
|
function Yl(e, r) {
|
|
3831
3817
|
return r.index in e ? e[r.index] : $n();
|
|
3832
3818
|
}
|
|
3833
3819
|
function Xl(e, r) {
|
|
3834
|
-
const n = Qn(r), t = Ae(r), o =
|
|
3820
|
+
const n = Qn(r), t = Ae(r), o = he(e, r);
|
|
3835
3821
|
return n && t ? yi(o) : n && !t ? Pe(o) : !n && t ? Ze(o) : o;
|
|
3836
3822
|
}
|
|
3837
3823
|
function Ql(e, r) {
|
|
3838
3824
|
return globalThis.Object.getOwnPropertyNames(r).reduce((n, t) => ({ ...n, [t]: Xl(e, r[t]) }), {});
|
|
3839
3825
|
}
|
|
3840
3826
|
function Dr(e, r) {
|
|
3841
|
-
return r.map((n) =>
|
|
3827
|
+
return r.map((n) => he(e, n));
|
|
3842
3828
|
}
|
|
3843
|
-
function
|
|
3844
|
-
return sr(r) ? Ll(e, r) : fr(r) ? Ml(e, r) :
|
|
3829
|
+
function he(e, r) {
|
|
3830
|
+
return sr(r) ? Ll(e, r) : fr(r) ? Ml(e, r) : se(r) ? Dl(e, r) : D(r) ? Wl(e, r) : Ge(r) ? Bl(e, r) : cr(r) ? Kl(e, r) : un(r) ? Vl(e, r) : an(r) ? Hl(e, r) : sn(r) ? Gl(e, r) : be(r) ? ql(e, r) : fn(r) ? Jl(e, r) : Mo(r) ? Yl(e, r) : r;
|
|
3845
3831
|
}
|
|
3846
3832
|
function ep(e, r) {
|
|
3847
|
-
return
|
|
3833
|
+
return he(r, Xn(e));
|
|
3848
3834
|
}
|
|
3849
3835
|
function rp(e) {
|
|
3850
|
-
return
|
|
3836
|
+
return m({ [h]: "Integer", type: "integer" }, e);
|
|
3851
3837
|
}
|
|
3852
3838
|
function np(e, r, n) {
|
|
3853
3839
|
return {
|
|
3854
|
-
[e]:
|
|
3840
|
+
[e]: hr(Z(e), r, ne(n))
|
|
3855
3841
|
};
|
|
3856
3842
|
}
|
|
3857
3843
|
function tp(e, r, n) {
|
|
@@ -3882,50 +3868,50 @@ function fp(e, r, n) {
|
|
|
3882
3868
|
const t = lt(e.pattern);
|
|
3883
3869
|
if (!zr(t))
|
|
3884
3870
|
return { ...e, pattern: Ri(e.pattern, r) };
|
|
3885
|
-
const c = [...Fn(t)].map((
|
|
3886
|
-
return ti([
|
|
3871
|
+
const c = [...Fn(t)].map((l) => Z(l)), f = xi(c, r), p = V(f);
|
|
3872
|
+
return ti([p], n);
|
|
3887
3873
|
}
|
|
3888
3874
|
function Ri(e, r) {
|
|
3889
3875
|
return typeof e == "string" ? r === "Uncapitalize" ? up(e) : r === "Capitalize" ? cp(e) : r === "Uppercase" ? ap(e) : r === "Lowercase" ? sp(e) : e : e.toString();
|
|
3890
3876
|
}
|
|
3891
3877
|
function xi(e, r) {
|
|
3892
|
-
return e.map((n) =>
|
|
3878
|
+
return e.map((n) => hr(n, r));
|
|
3893
3879
|
}
|
|
3894
|
-
function
|
|
3880
|
+
function hr(e, r, n = {}) {
|
|
3895
3881
|
return (
|
|
3896
3882
|
// Intrinsic-Mapped-Inference
|
|
3897
3883
|
Ve(e) ? ip(e, r, n) : (
|
|
3898
3884
|
// Standard-Inference
|
|
3899
3885
|
He(e) ? fp(e, r, n) : D(e) ? V(xi(e.anyOf, r), n) : Ke(e) ? Z(Ri(e.const, r), n) : (
|
|
3900
3886
|
// Default Type
|
|
3901
|
-
|
|
3887
|
+
m(e, n)
|
|
3902
3888
|
)
|
|
3903
3889
|
)
|
|
3904
3890
|
);
|
|
3905
3891
|
}
|
|
3906
3892
|
function dp(e, r = {}) {
|
|
3907
|
-
return
|
|
3893
|
+
return hr(e, "Capitalize", r);
|
|
3908
3894
|
}
|
|
3909
3895
|
function mp(e, r = {}) {
|
|
3910
|
-
return
|
|
3896
|
+
return hr(e, "Lowercase", r);
|
|
3911
3897
|
}
|
|
3912
3898
|
function lp(e, r = {}) {
|
|
3913
|
-
return
|
|
3899
|
+
return hr(e, "Uncapitalize", r);
|
|
3914
3900
|
}
|
|
3915
3901
|
function pp(e, r = {}) {
|
|
3916
|
-
return
|
|
3902
|
+
return hr(e, "Uppercase", r);
|
|
3917
3903
|
}
|
|
3918
|
-
function
|
|
3904
|
+
function gp(e, r, n) {
|
|
3919
3905
|
const t = {};
|
|
3920
3906
|
for (const o of globalThis.Object.getOwnPropertyNames(e))
|
|
3921
|
-
t[o] = yn(e[o], r,
|
|
3907
|
+
t[o] = yn(e[o], r, ne(n));
|
|
3922
3908
|
return t;
|
|
3923
3909
|
}
|
|
3924
|
-
function
|
|
3925
|
-
return
|
|
3910
|
+
function hp(e, r, n) {
|
|
3911
|
+
return gp(e.properties, r, n);
|
|
3926
3912
|
}
|
|
3927
3913
|
function bp(e, r, n) {
|
|
3928
|
-
const t =
|
|
3914
|
+
const t = hp(e, r, n);
|
|
3929
3915
|
return K(t);
|
|
3930
3916
|
}
|
|
3931
3917
|
function Fp(e, r) {
|
|
@@ -3942,7 +3928,7 @@ function $p(e, r) {
|
|
|
3942
3928
|
return r.reduce((n, t) => Op(n, t), e);
|
|
3943
3929
|
}
|
|
3944
3930
|
function _p(e, r) {
|
|
3945
|
-
const n =
|
|
3931
|
+
const n = te(e, [ce, "$id", "required", "properties"]), t = $p(e.properties, r);
|
|
3946
3932
|
return M(t, n);
|
|
3947
3933
|
}
|
|
3948
3934
|
function wp(e) {
|
|
@@ -3950,14 +3936,14 @@ function wp(e) {
|
|
|
3950
3936
|
return V(r);
|
|
3951
3937
|
}
|
|
3952
3938
|
function kt(e, r) {
|
|
3953
|
-
return
|
|
3939
|
+
return se(e) ? je(Fp(e.allOf, r)) : D(e) ? V(vp(e.anyOf, r)) : be(e) ? _p(e, r) : M({});
|
|
3954
3940
|
}
|
|
3955
3941
|
function yn(e, r, n) {
|
|
3956
|
-
const t =
|
|
3957
|
-
return
|
|
3942
|
+
const t = ee(r) ? wp(r) : r, o = xe(r) ? Se(r) : r, u = Y(e), c = Y(r);
|
|
3943
|
+
return ie(e) ? bp(e, o, n) : Ve(r) ? Rp(e, r, n) : u && c ? U("Omit", [e, t], n) : !u && c ? U("Omit", [e, t], n) : u && !c ? U("Omit", [e, t], n) : m({ ...kt(e, o), ...n });
|
|
3958
3944
|
}
|
|
3959
3945
|
function yp(e, r, n) {
|
|
3960
|
-
return { [r]: yn(e, [r],
|
|
3946
|
+
return { [r]: yn(e, [r], ne(n)) };
|
|
3961
3947
|
}
|
|
3962
3948
|
function Ip(e, r, n) {
|
|
3963
3949
|
return r.reduce((t, o) => ({ ...t, ...yp(e, o, n) }), {});
|
|
@@ -3972,7 +3958,7 @@ function Rp(e, r, n) {
|
|
|
3972
3958
|
function xp(e, r, n) {
|
|
3973
3959
|
const t = {};
|
|
3974
3960
|
for (const o of globalThis.Object.getOwnPropertyNames(e))
|
|
3975
|
-
t[o] = In(e[o], r,
|
|
3961
|
+
t[o] = In(e[o], r, ne(n));
|
|
3976
3962
|
return t;
|
|
3977
3963
|
}
|
|
3978
3964
|
function Ap(e, r, n) {
|
|
@@ -3995,7 +3981,7 @@ function Pp(e, r) {
|
|
|
3995
3981
|
return n;
|
|
3996
3982
|
}
|
|
3997
3983
|
function Zp(e, r) {
|
|
3998
|
-
const n =
|
|
3984
|
+
const n = te(e, [ce, "$id", "required", "properties"]), t = Pp(e.properties, r);
|
|
3999
3985
|
return M(t, n);
|
|
4000
3986
|
}
|
|
4001
3987
|
function jp(e) {
|
|
@@ -4003,15 +3989,15 @@ function jp(e) {
|
|
|
4003
3989
|
return V(r);
|
|
4004
3990
|
}
|
|
4005
3991
|
function Rt(e, r) {
|
|
4006
|
-
return
|
|
3992
|
+
return se(e) ? je(Tp(e.allOf, r)) : D(e) ? V(Sp(e.anyOf, r)) : be(e) ? Zp(e, r) : M({});
|
|
4007
3993
|
}
|
|
4008
3994
|
function In(e, r, n) {
|
|
4009
|
-
const t =
|
|
4010
|
-
return
|
|
3995
|
+
const t = ee(r) ? jp(r) : r, o = xe(r) ? Se(r) : r, u = Y(e), c = Y(r);
|
|
3996
|
+
return ie(e) ? zp(e, o, n) : Ve(r) ? Up(e, r, n) : u && c ? U("Pick", [e, t], n) : !u && c ? U("Pick", [e, t], n) : u && !c ? U("Pick", [e, t], n) : m({ ...Rt(e, o), ...n });
|
|
4011
3997
|
}
|
|
4012
3998
|
function Cp(e, r, n) {
|
|
4013
3999
|
return {
|
|
4014
|
-
[r]: In(e, [r],
|
|
4000
|
+
[r]: In(e, [r], ne(n))
|
|
4015
4001
|
};
|
|
4016
4002
|
}
|
|
4017
4003
|
function Ep(e, r, n) {
|
|
@@ -4037,7 +4023,7 @@ function Dp(e) {
|
|
|
4037
4023
|
return r;
|
|
4038
4024
|
}
|
|
4039
4025
|
function Wp(e) {
|
|
4040
|
-
const r =
|
|
4026
|
+
const r = te(e, [ce, "$id", "required", "properties"]), n = Dp(e.properties);
|
|
4041
4027
|
return M(n, r);
|
|
4042
4028
|
}
|
|
4043
4029
|
function mo(e) {
|
|
@@ -4046,7 +4032,7 @@ function mo(e) {
|
|
|
4046
4032
|
function Ai(e) {
|
|
4047
4033
|
return (
|
|
4048
4034
|
// Mappable
|
|
4049
|
-
ar(e) ? Lp(e.target, e.parameters) :
|
|
4035
|
+
ar(e) ? Lp(e.target, e.parameters) : Y(e) ? Mp(e.$ref) : se(e) ? je(mo(e.allOf)) : D(e) ? V(mo(e.anyOf)) : be(e) ? Wp(e) : (
|
|
4050
4036
|
// Intrinsic
|
|
4051
4037
|
cn(e) || jr(e) || dr(e) || Ke(e) || et(e) || mr(e) || Er(e) || rt(e) || nt(e) ? e : (
|
|
4052
4038
|
// Passthrough
|
|
@@ -4056,12 +4042,12 @@ function Ai(e) {
|
|
|
4056
4042
|
);
|
|
4057
4043
|
}
|
|
4058
4044
|
function xt(e, r) {
|
|
4059
|
-
return
|
|
4045
|
+
return ie(e) ? Vp(e, r) : m({ ...Ai(e), ...r });
|
|
4060
4046
|
}
|
|
4061
4047
|
function Bp(e, r) {
|
|
4062
4048
|
const n = {};
|
|
4063
4049
|
for (const t of globalThis.Object.getOwnPropertyNames(e))
|
|
4064
|
-
n[t] = xt(e[t],
|
|
4050
|
+
n[t] = xt(e[t], ne(r));
|
|
4065
4051
|
return n;
|
|
4066
4052
|
}
|
|
4067
4053
|
function Kp(e, r) {
|
|
@@ -4080,11 +4066,11 @@ function Gp(e) {
|
|
|
4080
4066
|
function qp(e) {
|
|
4081
4067
|
const r = {};
|
|
4082
4068
|
for (const n of globalThis.Object.getOwnPropertyNames(e))
|
|
4083
|
-
r[n] =
|
|
4069
|
+
r[n] = te(e[n], [_e]);
|
|
4084
4070
|
return r;
|
|
4085
4071
|
}
|
|
4086
4072
|
function Jp(e) {
|
|
4087
|
-
const r =
|
|
4073
|
+
const r = te(e, [ce, "$id", "required", "properties"]), n = qp(e.properties);
|
|
4088
4074
|
return M(n, r);
|
|
4089
4075
|
}
|
|
4090
4076
|
function lo(e) {
|
|
@@ -4093,7 +4079,7 @@ function lo(e) {
|
|
|
4093
4079
|
function zi(e) {
|
|
4094
4080
|
return (
|
|
4095
4081
|
// Mappable
|
|
4096
|
-
ar(e) ? Hp(e.target, e.parameters) :
|
|
4082
|
+
ar(e) ? Hp(e.target, e.parameters) : Y(e) ? Gp(e.$ref) : se(e) ? je(lo(e.allOf)) : D(e) ? V(lo(e.anyOf)) : be(e) ? Jp(e) : (
|
|
4097
4083
|
// Intrinsic
|
|
4098
4084
|
cn(e) || jr(e) || dr(e) || Ke(e) || et(e) || mr(e) || Er(e) || rt(e) || nt(e) ? e : (
|
|
4099
4085
|
// Passthrough
|
|
@@ -4103,7 +4089,7 @@ function zi(e) {
|
|
|
4103
4089
|
);
|
|
4104
4090
|
}
|
|
4105
4091
|
function At(e, r) {
|
|
4106
|
-
return
|
|
4092
|
+
return ie(e) ? Qp(e, r) : m({ ...zi(e), ...r });
|
|
4107
4093
|
}
|
|
4108
4094
|
function Yp(e, r) {
|
|
4109
4095
|
const n = {};
|
|
@@ -4118,169 +4104,169 @@ function Qp(e, r) {
|
|
|
4118
4104
|
const n = Xp(e, r);
|
|
4119
4105
|
return K(n);
|
|
4120
4106
|
}
|
|
4121
|
-
function
|
|
4122
|
-
return r.map((n) =>
|
|
4107
|
+
function eg(e, r) {
|
|
4108
|
+
return r.map((n) => Y(n) ? zt(e, n.$ref) : oe(e, n));
|
|
4123
4109
|
}
|
|
4124
4110
|
function zt(e, r) {
|
|
4125
|
-
return r in e ?
|
|
4111
|
+
return r in e ? Y(e[r]) ? zt(e, e[r].$ref) : oe(e, e[r]) : C();
|
|
4126
4112
|
}
|
|
4127
|
-
function
|
|
4113
|
+
function rg(e) {
|
|
4128
4114
|
return On(e[0]);
|
|
4129
4115
|
}
|
|
4130
|
-
function
|
|
4116
|
+
function ng(e) {
|
|
4131
4117
|
return vn(e[0], e[1]);
|
|
4132
4118
|
}
|
|
4133
|
-
function
|
|
4119
|
+
function tg(e) {
|
|
4134
4120
|
return bt(e[0]);
|
|
4135
4121
|
}
|
|
4136
|
-
function
|
|
4122
|
+
function og(e) {
|
|
4137
4123
|
return xt(e[0]);
|
|
4138
4124
|
}
|
|
4139
|
-
function
|
|
4125
|
+
function ig(e) {
|
|
4140
4126
|
return yn(e[0], e[1]);
|
|
4141
4127
|
}
|
|
4142
|
-
function
|
|
4128
|
+
function ug(e) {
|
|
4143
4129
|
return In(e[0], e[1]);
|
|
4144
4130
|
}
|
|
4145
|
-
function
|
|
4131
|
+
function cg(e) {
|
|
4146
4132
|
return At(e[0]);
|
|
4147
4133
|
}
|
|
4148
|
-
function
|
|
4149
|
-
const t =
|
|
4150
|
-
return r === "Awaited" ?
|
|
4134
|
+
function ag(e, r, n) {
|
|
4135
|
+
const t = eg(e, n);
|
|
4136
|
+
return r === "Awaited" ? rg(t) : r === "Index" ? ng(t) : r === "KeyOf" ? tg(t) : r === "Partial" ? og(t) : r === "Omit" ? ig(t) : r === "Pick" ? ug(t) : r === "Required" ? cg(t) : C();
|
|
4151
4137
|
}
|
|
4152
|
-
function
|
|
4153
|
-
return st(
|
|
4138
|
+
function sg(e, r) {
|
|
4139
|
+
return st(oe(e, r));
|
|
4154
4140
|
}
|
|
4155
|
-
function
|
|
4156
|
-
return ft(
|
|
4141
|
+
function fg(e, r) {
|
|
4142
|
+
return ft(oe(e, r));
|
|
4157
4143
|
}
|
|
4158
|
-
function
|
|
4159
|
-
return dt(Wr(e, r),
|
|
4144
|
+
function dg(e, r, n) {
|
|
4145
|
+
return dt(Wr(e, r), oe(e, n));
|
|
4160
4146
|
}
|
|
4161
|
-
function
|
|
4162
|
-
return Ur(Wr(e, r),
|
|
4147
|
+
function mg(e, r, n) {
|
|
4148
|
+
return Ur(Wr(e, r), oe(e, n));
|
|
4163
4149
|
}
|
|
4164
|
-
function
|
|
4150
|
+
function lg(e, r) {
|
|
4165
4151
|
return je(Wr(e, r));
|
|
4166
4152
|
}
|
|
4167
|
-
function
|
|
4168
|
-
return
|
|
4153
|
+
function pg(e, r) {
|
|
4154
|
+
return gt(oe(e, r));
|
|
4169
4155
|
}
|
|
4170
|
-
function
|
|
4171
|
-
return M(globalThis.Object.keys(r).reduce((n, t) => ({ ...n, [t]:
|
|
4156
|
+
function gg(e, r) {
|
|
4157
|
+
return M(globalThis.Object.keys(r).reduce((n, t) => ({ ...n, [t]: oe(e, r[t]) }), {}));
|
|
4172
4158
|
}
|
|
4173
|
-
function
|
|
4174
|
-
const [n, t] = [
|
|
4159
|
+
function hg(e, r) {
|
|
4160
|
+
const [n, t] = [oe(e, ki(r)), It(r)], o = Xn(r);
|
|
4175
4161
|
return o.patternProperties[t] = n, o;
|
|
4176
4162
|
}
|
|
4177
|
-
function
|
|
4178
|
-
return
|
|
4163
|
+
function bg(e, r) {
|
|
4164
|
+
return Y(r) ? { ...zt(e, r.$ref), [ce]: r[ce] } : r;
|
|
4179
4165
|
}
|
|
4180
|
-
function
|
|
4166
|
+
function Fg(e, r) {
|
|
4181
4167
|
return pr(Wr(e, r));
|
|
4182
4168
|
}
|
|
4183
|
-
function
|
|
4169
|
+
function vg(e, r) {
|
|
4184
4170
|
return V(Wr(e, r));
|
|
4185
4171
|
}
|
|
4186
4172
|
function Wr(e, r) {
|
|
4187
|
-
return r.map((n) =>
|
|
4173
|
+
return r.map((n) => oe(e, n));
|
|
4188
4174
|
}
|
|
4189
|
-
function
|
|
4175
|
+
function oe(e, r) {
|
|
4190
4176
|
return (
|
|
4191
4177
|
// Modifiers
|
|
4192
|
-
Ae(r) ?
|
|
4178
|
+
Ae(r) ? m(oe(e, te(r, [_e])), r) : Qn(r) ? m(oe(e, te(r, [Zr])), r) : (
|
|
4193
4179
|
// Transform
|
|
4194
|
-
dn(r) ?
|
|
4180
|
+
dn(r) ? m(bg(e, r), r) : (
|
|
4195
4181
|
// Types
|
|
4196
|
-
cr(r) ?
|
|
4182
|
+
cr(r) ? m(sg(e, r.items), r) : un(r) ? m(fg(e, r.items), r) : ar(r) ? m(ag(e, r.target, r.parameters)) : sr(r) ? m(dg(e, r.parameters, r.returns), r) : fr(r) ? m(mg(e, r.parameters, r.returns), r) : se(r) ? m(lg(e, r.allOf), r) : an(r) ? m(pg(e, r.items), r) : be(r) ? m(gg(e, r.properties), r) : fn(r) ? m(hg(e, r)) : Ge(r) ? m(Fg(e, r.items || []), r) : D(r) ? m(vg(e, r.anyOf), r) : r
|
|
4197
4183
|
)
|
|
4198
4184
|
)
|
|
4199
4185
|
);
|
|
4200
4186
|
}
|
|
4201
|
-
function
|
|
4202
|
-
return r in e ?
|
|
4187
|
+
function Og(e, r) {
|
|
4188
|
+
return r in e ? oe(e, e[r]) : C();
|
|
4203
4189
|
}
|
|
4204
|
-
function $
|
|
4205
|
-
return globalThis.Object.getOwnPropertyNames(e).reduce((r, n) => ({ ...r, [n]:
|
|
4190
|
+
function $g(e) {
|
|
4191
|
+
return globalThis.Object.getOwnPropertyNames(e).reduce((r, n) => ({ ...r, [n]: Og(e, n) }), {});
|
|
4206
4192
|
}
|
|
4207
|
-
class
|
|
4193
|
+
class _g {
|
|
4208
4194
|
constructor(r) {
|
|
4209
|
-
const n = $
|
|
4195
|
+
const n = $g(r), t = this.WithIdentifiers(n);
|
|
4210
4196
|
this.$defs = t;
|
|
4211
4197
|
}
|
|
4212
4198
|
/** `[Json]` Imports a Type by Key. */
|
|
4213
4199
|
Import(r, n) {
|
|
4214
|
-
const t = { ...this.$defs, [r]:
|
|
4215
|
-
return
|
|
4200
|
+
const t = { ...this.$defs, [r]: m(this.$defs[r], n) };
|
|
4201
|
+
return m({ [h]: "Import", $defs: t, $ref: r });
|
|
4216
4202
|
}
|
|
4217
4203
|
// prettier-ignore
|
|
4218
4204
|
WithIdentifiers(r) {
|
|
4219
4205
|
return globalThis.Object.getOwnPropertyNames(r).reduce((n, t) => ({ ...n, [t]: { ...r[t], $id: t } }), {});
|
|
4220
4206
|
}
|
|
4221
4207
|
}
|
|
4222
|
-
function
|
|
4223
|
-
return new
|
|
4208
|
+
function wg(e) {
|
|
4209
|
+
return new _g(e);
|
|
4224
4210
|
}
|
|
4225
|
-
function
|
|
4226
|
-
return
|
|
4211
|
+
function yg(e, r) {
|
|
4212
|
+
return m({ [h]: "Not", not: e }, r);
|
|
4227
4213
|
}
|
|
4228
|
-
function
|
|
4214
|
+
function Ig(e, r) {
|
|
4229
4215
|
return fr(e) ? pr(e.parameters, r) : C();
|
|
4230
4216
|
}
|
|
4231
|
-
let
|
|
4232
|
-
function
|
|
4233
|
-
P(r.$id) && (r.$id = `T${
|
|
4234
|
-
const n = Xn(e({ [
|
|
4235
|
-
return n.$id = r.$id,
|
|
4217
|
+
let kg = 0;
|
|
4218
|
+
function Rg(e, r = {}) {
|
|
4219
|
+
P(r.$id) && (r.$id = `T${kg++}`);
|
|
4220
|
+
const n = Xn(e({ [h]: "This", $ref: `${r.$id}` }));
|
|
4221
|
+
return n.$id = r.$id, m({ [on]: "Recursive", ...n }, r);
|
|
4236
4222
|
}
|
|
4237
|
-
function
|
|
4223
|
+
function xg(e, r) {
|
|
4238
4224
|
const n = T(e) ? new globalThis.RegExp(e) : e;
|
|
4239
|
-
return
|
|
4225
|
+
return m({ [h]: "RegExp", type: "RegExp", source: n.source, flags: n.flags }, r);
|
|
4240
4226
|
}
|
|
4241
|
-
function
|
|
4242
|
-
return
|
|
4227
|
+
function Ag(e) {
|
|
4228
|
+
return se(e) ? e.allOf : D(e) ? e.anyOf : Ge(e) ? e.items ?? [] : [];
|
|
4243
4229
|
}
|
|
4244
|
-
function
|
|
4245
|
-
return
|
|
4230
|
+
function zg(e) {
|
|
4231
|
+
return Ag(e);
|
|
4246
4232
|
}
|
|
4247
|
-
function
|
|
4248
|
-
return fr(e) ?
|
|
4233
|
+
function Tg(e, r) {
|
|
4234
|
+
return fr(e) ? m(e.returns, r) : C(r);
|
|
4249
4235
|
}
|
|
4250
|
-
class
|
|
4236
|
+
class Sg {
|
|
4251
4237
|
constructor(r) {
|
|
4252
4238
|
this.schema = r;
|
|
4253
4239
|
}
|
|
4254
4240
|
Decode(r) {
|
|
4255
|
-
return new
|
|
4241
|
+
return new Pg(this.schema, r);
|
|
4256
4242
|
}
|
|
4257
4243
|
}
|
|
4258
|
-
class
|
|
4244
|
+
class Pg {
|
|
4259
4245
|
constructor(r, n) {
|
|
4260
4246
|
this.schema = r, this.decode = n;
|
|
4261
4247
|
}
|
|
4262
4248
|
EncodeTransform(r, n) {
|
|
4263
|
-
const u = { Encode: (c) => n[
|
|
4264
|
-
return { ...n, [
|
|
4249
|
+
const u = { Encode: (c) => n[ce].Encode(r(c)), Decode: (c) => this.decode(n[ce].Decode(c)) };
|
|
4250
|
+
return { ...n, [ce]: u };
|
|
4265
4251
|
}
|
|
4266
4252
|
EncodeSchema(r, n) {
|
|
4267
4253
|
const t = { Decode: this.decode, Encode: r };
|
|
4268
|
-
return { ...n, [
|
|
4254
|
+
return { ...n, [ce]: t };
|
|
4269
4255
|
}
|
|
4270
4256
|
Encode(r) {
|
|
4271
4257
|
return dn(this.schema) ? this.EncodeTransform(r, this.schema) : this.EncodeSchema(r, this.schema);
|
|
4272
4258
|
}
|
|
4273
4259
|
}
|
|
4274
|
-
function
|
|
4275
|
-
return new
|
|
4260
|
+
function Zg(e) {
|
|
4261
|
+
return new Sg(e);
|
|
4276
4262
|
}
|
|
4277
|
-
function
|
|
4278
|
-
return
|
|
4263
|
+
function jg(e = {}) {
|
|
4264
|
+
return m({ [h]: e[h] ?? "Unsafe" }, e);
|
|
4279
4265
|
}
|
|
4280
|
-
function
|
|
4281
|
-
return
|
|
4266
|
+
function Cg(e) {
|
|
4267
|
+
return m({ [h]: "Void", type: "void" }, e);
|
|
4282
4268
|
}
|
|
4283
|
-
const
|
|
4269
|
+
const Eg = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4284
4270
|
__proto__: null,
|
|
4285
4271
|
Any: xr,
|
|
4286
4272
|
Argument: Ef,
|
|
@@ -4305,46 +4291,46 @@ const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4305
4291
|
Instantiate: ep,
|
|
4306
4292
|
Integer: rp,
|
|
4307
4293
|
Intersect: je,
|
|
4308
|
-
Iterator:
|
|
4294
|
+
Iterator: gt,
|
|
4309
4295
|
KeyOf: bt,
|
|
4310
4296
|
Literal: Z,
|
|
4311
4297
|
Lowercase: mp,
|
|
4312
4298
|
Mapped: Ld,
|
|
4313
|
-
Module:
|
|
4299
|
+
Module: wg,
|
|
4314
4300
|
Never: C,
|
|
4315
|
-
Not:
|
|
4301
|
+
Not: yg,
|
|
4316
4302
|
Null: li,
|
|
4317
4303
|
Number: Xe,
|
|
4318
4304
|
Object: M,
|
|
4319
4305
|
Omit: yn,
|
|
4320
4306
|
Optional: Ze,
|
|
4321
|
-
Parameters:
|
|
4307
|
+
Parameters: Ig,
|
|
4322
4308
|
Partial: xt,
|
|
4323
4309
|
Pick: In,
|
|
4324
4310
|
Promise: ci,
|
|
4325
4311
|
Readonly: Pe,
|
|
4326
4312
|
ReadonlyOptional: yi,
|
|
4327
4313
|
Record: Ii,
|
|
4328
|
-
Recursive:
|
|
4314
|
+
Recursive: Rg,
|
|
4329
4315
|
Ref: Lr,
|
|
4330
|
-
RegExp:
|
|
4316
|
+
RegExp: xg,
|
|
4331
4317
|
Required: At,
|
|
4332
|
-
Rest:
|
|
4333
|
-
ReturnType:
|
|
4318
|
+
Rest: zg,
|
|
4319
|
+
ReturnType: Tg,
|
|
4334
4320
|
String: Me,
|
|
4335
4321
|
Symbol: pi,
|
|
4336
4322
|
TemplateLiteral: ti,
|
|
4337
|
-
Transform:
|
|
4323
|
+
Transform: Zg,
|
|
4338
4324
|
Tuple: pr,
|
|
4339
|
-
Uint8Array:
|
|
4325
|
+
Uint8Array: hi,
|
|
4340
4326
|
Uncapitalize: lp,
|
|
4341
|
-
Undefined:
|
|
4327
|
+
Undefined: gi,
|
|
4342
4328
|
Union: V,
|
|
4343
4329
|
Unknown: $n,
|
|
4344
|
-
Unsafe:
|
|
4330
|
+
Unsafe: jg,
|
|
4345
4331
|
Uppercase: pp,
|
|
4346
|
-
Void:
|
|
4347
|
-
}, Symbol.toStringTag, { value: "Module" })), i =
|
|
4332
|
+
Void: Cg
|
|
4333
|
+
}, Symbol.toStringTag, { value: "Module" })), i = Eg, d = i.String({ $id: "Color" }), q = i.String({ $id: "FamilyName" }), ve = i.String({ $id: "FontWeight" }), ke = i.String({ $id: "Length" }), Re = i.String({ $id: "Percentage" }), $r = i.String({ $id: "BoxShadow" }), Ng = i.String({ $id: "Number" }), Ug = i.String({ $id: "Size" }), Ie = i.Union([i.String(), i.Literal("thin"), i.Literal("medium"), i.Literal("thick")], {
|
|
4348
4334
|
$id: "LineWidth"
|
|
4349
4335
|
}), Pn = i.Optional(i.Object({
|
|
4350
4336
|
columnGap: i.Optional(i.Union([i.Ref(ke), i.Ref(Re)])),
|
|
@@ -4352,7 +4338,7 @@ const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4352
4338
|
field: i.Optional(i.Object({
|
|
4353
4339
|
label: i.Optional(i.Object({
|
|
4354
4340
|
foreground: i.Optional(i.Ref(d)),
|
|
4355
|
-
fontFamily: i.Optional(i.Ref(
|
|
4341
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4356
4342
|
fontWeight: i.Optional(i.Ref(ve))
|
|
4357
4343
|
})),
|
|
4358
4344
|
input: i.Optional(i.Object({
|
|
@@ -4366,11 +4352,11 @@ const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4366
4352
|
boxShadow: i.Optional(i.Ref($r)),
|
|
4367
4353
|
boxShadowHover: i.Optional(i.Ref($r)),
|
|
4368
4354
|
boxShadowFocus: i.Optional(i.Ref($r)),
|
|
4369
|
-
height: i.Optional(i.Ref(
|
|
4355
|
+
height: i.Optional(i.Ref(Ug)),
|
|
4370
4356
|
padding: i.Optional(i.Union([i.Ref(ke), i.Ref(Re)]))
|
|
4371
4357
|
}))
|
|
4372
4358
|
}))
|
|
4373
|
-
})),
|
|
4359
|
+
})), Lg = i.Object({
|
|
4374
4360
|
//////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
4375
4361
|
// Base border styles
|
|
4376
4362
|
borderRadius: i.Optional(i.Union([i.Ref(ke), i.Ref(Re)])),
|
|
@@ -4411,19 +4397,19 @@ const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4411
4397
|
// Base fonts
|
|
4412
4398
|
fonts: i.Optional(i.Object({
|
|
4413
4399
|
display: i.Optional(i.Object({
|
|
4414
|
-
fontFamily: i.Optional(i.Ref(
|
|
4400
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4415
4401
|
fontWeight: i.Optional(i.Ref(ve))
|
|
4416
4402
|
})),
|
|
4417
4403
|
sans: i.Optional(i.Object({
|
|
4418
|
-
fontFamily: i.Optional(i.Ref(
|
|
4404
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4419
4405
|
fontWeight: i.Optional(i.Ref(ve))
|
|
4420
4406
|
})),
|
|
4421
4407
|
serif: i.Optional(i.Object({
|
|
4422
|
-
fontFamily: i.Optional(i.Ref(
|
|
4408
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4423
4409
|
fontWeight: i.Optional(i.Ref(ve))
|
|
4424
4410
|
})),
|
|
4425
4411
|
monospace: i.Optional(i.Object({
|
|
4426
|
-
fontFamily: i.Optional(i.Ref(
|
|
4412
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4427
4413
|
fontWeight: i.Optional(i.Ref(ve))
|
|
4428
4414
|
}))
|
|
4429
4415
|
})),
|
|
@@ -4437,7 +4423,7 @@ const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4437
4423
|
project: i.Optional(i.Object({
|
|
4438
4424
|
background: i.Optional(i.Ref(d)),
|
|
4439
4425
|
foreground: i.Optional(i.Ref(d)),
|
|
4440
|
-
fontFamily: i.Optional(i.Ref(
|
|
4426
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4441
4427
|
borderWidth: i.Optional(i.Ref(Ie)),
|
|
4442
4428
|
borderColor: i.Optional(i.Ref(d))
|
|
4443
4429
|
})),
|
|
@@ -4466,7 +4452,7 @@ const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4466
4452
|
background: i.Optional(i.Ref(d)),
|
|
4467
4453
|
backgroundHover: i.Optional(i.Ref(d)),
|
|
4468
4454
|
backgroundActive: i.Optional(i.Ref(d)),
|
|
4469
|
-
fontFamily: i.Optional(i.Ref(
|
|
4455
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4470
4456
|
divider: i.Object({
|
|
4471
4457
|
borderColor: i.Optional(i.Ref(d)),
|
|
4472
4458
|
borderWidth: i.Optional(i.Ref(Ie))
|
|
@@ -4480,11 +4466,11 @@ const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4480
4466
|
boxShadow: i.Optional(i.Ref($r)),
|
|
4481
4467
|
headline: i.Optional(i.Object({
|
|
4482
4468
|
foreground: i.Optional(i.Ref(d)),
|
|
4483
|
-
fontFamily: i.Optional(i.Ref(
|
|
4469
|
+
fontFamily: i.Optional(i.Ref(q))
|
|
4484
4470
|
})),
|
|
4485
4471
|
title: i.Optional(i.Object({
|
|
4486
4472
|
foreground: i.Optional(i.Ref(d)),
|
|
4487
|
-
fontFamily: i.Optional(i.Ref(
|
|
4473
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4488
4474
|
fontWeight: i.Optional(i.Ref(ve))
|
|
4489
4475
|
}))
|
|
4490
4476
|
})),
|
|
@@ -4492,7 +4478,7 @@ const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4492
4478
|
sidebar: i.Optional(i.Object({
|
|
4493
4479
|
background: i.Optional(i.Ref(d)),
|
|
4494
4480
|
foreground: i.Optional(i.Ref(d)),
|
|
4495
|
-
fontFamily: i.Optional(i.Ref(
|
|
4481
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4496
4482
|
borderWidth: i.Optional(i.Ref(Ie)),
|
|
4497
4483
|
borderColor: i.Optional(i.Ref(d)),
|
|
4498
4484
|
section: i.Optional(i.Object({
|
|
@@ -4508,7 +4494,7 @@ const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4508
4494
|
background: i.Optional(i.Ref(d)),
|
|
4509
4495
|
backgroundHover: i.Optional(i.Ref(d)),
|
|
4510
4496
|
backgroundActive: i.Optional(i.Ref(d)),
|
|
4511
|
-
fontFamily: i.Optional(i.Ref(
|
|
4497
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4512
4498
|
borderWidth: i.Optional(i.Ref(Ie)),
|
|
4513
4499
|
borderColor: i.Optional(i.Ref(d))
|
|
4514
4500
|
})),
|
|
@@ -4523,7 +4509,7 @@ const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4523
4509
|
background: i.Optional(i.Ref(d)),
|
|
4524
4510
|
primary: i.Optional(i.Ref(d)),
|
|
4525
4511
|
secondary: i.Optional(i.Ref(d)),
|
|
4526
|
-
speed: i.Optional(i.Ref(
|
|
4512
|
+
speed: i.Optional(i.Ref(Ng))
|
|
4527
4513
|
})),
|
|
4528
4514
|
form: Pn
|
|
4529
4515
|
})),
|
|
@@ -4545,61 +4531,61 @@ const Eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4545
4531
|
})),
|
|
4546
4532
|
headline: i.Optional(i.Object({
|
|
4547
4533
|
foreground: i.Optional(i.Ref(d)),
|
|
4548
|
-
fontFamily: i.Optional(i.Ref(
|
|
4534
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4549
4535
|
fontWeight: i.Optional(i.Ref(ve))
|
|
4550
4536
|
})),
|
|
4551
4537
|
title: i.Optional(i.Object({
|
|
4552
4538
|
foreground: i.Optional(i.Ref(d)),
|
|
4553
|
-
fontFamily: i.Optional(i.Ref(
|
|
4539
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4554
4540
|
fontWeight: i.Optional(i.Ref(ve))
|
|
4555
4541
|
})),
|
|
4556
4542
|
subtitle: i.Optional(i.Object({
|
|
4557
4543
|
foreground: i.Optional(i.Ref(d)),
|
|
4558
|
-
fontFamily: i.Optional(i.Ref(
|
|
4544
|
+
fontFamily: i.Optional(i.Ref(q)),
|
|
4559
4545
|
fontWeight: i.Optional(i.Ref(ve))
|
|
4560
4546
|
})),
|
|
4561
4547
|
art: i.Optional(i.Object({
|
|
4562
4548
|
foreground: i.Optional(i.Ref(d))
|
|
4563
4549
|
}))
|
|
4564
4550
|
}))
|
|
4565
|
-
}),
|
|
4551
|
+
}), Mg = i.Object({
|
|
4566
4552
|
id: i.String(),
|
|
4567
4553
|
name: i.String(),
|
|
4568
4554
|
appearance: i.Union([i.Literal("light"), i.Literal("dark")]),
|
|
4569
|
-
rules:
|
|
4555
|
+
rules: Lg
|
|
4570
4556
|
});
|
|
4571
4557
|
var po;
|
|
4572
4558
|
(function(e) {
|
|
4573
4559
|
e[e.None = 0] = "None", e[e.RemainingAdmins = 1] = "RemainingAdmins", e[e.UserLimits = 2] = "UserLimits", e[e.All = 3] = "All";
|
|
4574
4560
|
})(po || (po = {}));
|
|
4575
|
-
const
|
|
4561
|
+
const Dg = Jn([yr(), ls()]);
|
|
4576
4562
|
Ce({
|
|
4577
4563
|
type: yr(),
|
|
4578
|
-
uid:
|
|
4564
|
+
uid: Dg.optional()
|
|
4579
4565
|
}).passthrough();
|
|
4580
|
-
const
|
|
4566
|
+
const Wg = (e) => {
|
|
4581
4567
|
const r = Ee(() => {
|
|
4582
|
-
const o = /* @__PURE__ */ new Map(), u = (c,
|
|
4583
|
-
for (const [
|
|
4584
|
-
typeof
|
|
4568
|
+
const o = /* @__PURE__ */ new Map(), u = (c, f = []) => {
|
|
4569
|
+
for (const [p, l] of Object.entries(c))
|
|
4570
|
+
typeof l == "object" && l !== null && ("type" in l && l.type === "object" && "properties" in l && u(l.properties, [...f, p]), "$ref" in l && l.$ref === "FamilyName" && (o.has(f) ? o.set(f, { family: p, weight: o.get(f).weight }) : o.set(f, { family: p, weight: null })), "$ref" in l && l.$ref === "FontWeight" && (o.has(f) ? o.set(f, { family: o.get(f).family, weight: p }) : o.set(f, { family: null, weight: p })));
|
|
4585
4571
|
};
|
|
4586
|
-
return u(
|
|
4572
|
+
return u(Mg.properties.rules.properties), o;
|
|
4587
4573
|
}), n = Ee(() => {
|
|
4588
4574
|
const o = /* @__PURE__ */ new Map();
|
|
4589
|
-
for (const [u, { family: c, weight:
|
|
4590
|
-
let
|
|
4591
|
-
if (c && (
|
|
4592
|
-
const
|
|
4593
|
-
for (const b of
|
|
4594
|
-
const
|
|
4595
|
-
if (
|
|
4596
|
-
|
|
4575
|
+
for (const [u, { family: c, weight: f }] of r.value.entries()) {
|
|
4576
|
+
let p = null, l = null;
|
|
4577
|
+
if (c && (p = Zt(re(e).rules, [...u, c])), f && (l = Zt(re(e).rules, [...u, f])), p) {
|
|
4578
|
+
const y = p.split(",");
|
|
4579
|
+
for (const b of y) {
|
|
4580
|
+
const O = b.trim();
|
|
4581
|
+
if (O.startsWith("var(--")) {
|
|
4582
|
+
y.push(Vi(O.slice(6, -1)));
|
|
4597
4583
|
continue;
|
|
4598
4584
|
}
|
|
4599
|
-
if ((
|
|
4585
|
+
if ((O.startsWith('"') && O.endsWith('"')) === !1)
|
|
4600
4586
|
continue;
|
|
4601
|
-
const
|
|
4602
|
-
o.has(
|
|
4587
|
+
const $ = O.slice(1, -1);
|
|
4588
|
+
o.has($) ? o.get($).add(l ?? "400") : o.set($, /* @__PURE__ */ new Set([l ?? "400"]));
|
|
4603
4589
|
}
|
|
4604
4590
|
}
|
|
4605
4591
|
}
|
|
@@ -4609,8 +4595,8 @@ const Wh = (e) => {
|
|
|
4609
4595
|
const o = [];
|
|
4610
4596
|
for (const [u, c] of n.value.entries())
|
|
4611
4597
|
if (["Inter", "Merriweather", "Fira Mono"].includes(u) === !1) {
|
|
4612
|
-
const
|
|
4613
|
-
o.push(`${u.replaceAll(" ", "+")}:wght@${
|
|
4598
|
+
const p = Array.from(c).sort((l, y) => Number(l) - Number(y)).join(";");
|
|
4599
|
+
o.push(`${u.replaceAll(" ", "+")}:wght@${p}`);
|
|
4614
4600
|
}
|
|
4615
4601
|
return o;
|
|
4616
4602
|
}) };
|
|
@@ -4871,7 +4857,7 @@ const Wh = (e) => {
|
|
|
4871
4857
|
}
|
|
4872
4858
|
}
|
|
4873
4859
|
}
|
|
4874
|
-
}),
|
|
4860
|
+
}), Bg = kn({
|
|
4875
4861
|
id: "Directus Color Match",
|
|
4876
4862
|
name: "$t:theme_directus_colormatch",
|
|
4877
4863
|
appearance: "light",
|
|
@@ -5213,7 +5199,7 @@ const Wh = (e) => {
|
|
|
5213
5199
|
}
|
|
5214
5200
|
}
|
|
5215
5201
|
}
|
|
5216
|
-
}),
|
|
5202
|
+
}), Kg = kn({
|
|
5217
5203
|
id: "Directus Minimal",
|
|
5218
5204
|
name: "$t:theme_directus_minimal",
|
|
5219
5205
|
appearance: "light",
|
|
@@ -5329,21 +5315,21 @@ const Wh = (e) => {
|
|
|
5329
5315
|
}
|
|
5330
5316
|
}
|
|
5331
5317
|
}
|
|
5332
|
-
}),
|
|
5333
|
-
const e = Si({ light:
|
|
5318
|
+
}), Vg = [Tt], Hg = [St, Kg, Bg], Gg = Di("🎨 Themes", () => {
|
|
5319
|
+
const e = Si({ light: Hg, dark: Vg });
|
|
5334
5320
|
return { themes: e, registerTheme: (n) => {
|
|
5335
5321
|
n.appearance === "light" ? e.light.push(n) : e.dark.push(n);
|
|
5336
5322
|
} };
|
|
5337
|
-
}),
|
|
5338
|
-
const { themes: u } = Wi(
|
|
5323
|
+
}), qg = (e, r, n, t, o) => {
|
|
5324
|
+
const { themes: u } = Wi(Gg());
|
|
5339
5325
|
return { theme: Ee(() => {
|
|
5340
|
-
const
|
|
5341
|
-
return
|
|
5326
|
+
const f = re(e) ? re(n) : re(r), p = re(e) ? Tt : St, l = re(e) ? re(o) : re(t), y = re(u)[re(e) ? "dark" : "light"].find((b) => b.id === f);
|
|
5327
|
+
return y ? l ? An({}, p, y, { rules: l }) : An(p, y) : (f && f !== p.id && console.warn(`Theme "${f}" doesn't exist.`), l ? An({}, p, { rules: l }) : p);
|
|
5342
5328
|
}) };
|
|
5343
|
-
},
|
|
5329
|
+
}, Jg = (e) => {
|
|
5344
5330
|
const r = Ki(e, { delimiter: "--" }), n = (t) => `--theme--${Bi(t, { separator: "-" })}`;
|
|
5345
5331
|
return Mi(r, (t, o) => n(o));
|
|
5346
|
-
},
|
|
5332
|
+
}, oh = /* @__PURE__ */ Pi({
|
|
5347
5333
|
__name: "theme-provider",
|
|
5348
5334
|
props: {
|
|
5349
5335
|
darkMode: { type: Boolean },
|
|
@@ -5353,13 +5339,13 @@ const Wh = (e) => {
|
|
|
5353
5339
|
themeDarkOverrides: { default: () => ({}) }
|
|
5354
5340
|
},
|
|
5355
5341
|
setup(e) {
|
|
5356
|
-
const r = e, { darkMode: n, themeLight: t, themeDark: o, themeLightOverrides: u, themeDarkOverrides: c } = Zi(r), { theme:
|
|
5342
|
+
const r = e, { darkMode: n, themeLight: t, themeDark: o, themeLightOverrides: u, themeDarkOverrides: c } = Zi(r), { theme: f } = qg(n, t, o, u, c), p = Ee(() => Jg(re(f).rules)), { googleFonts: l } = Wg(f);
|
|
5357
5343
|
Li({
|
|
5358
5344
|
link: Ee(() => {
|
|
5359
5345
|
let b = "";
|
|
5360
|
-
if (
|
|
5361
|
-
const
|
|
5362
|
-
b += `https://fonts.googleapis.com/css2?family=${
|
|
5346
|
+
if (l.value.length > 0) {
|
|
5347
|
+
const O = l.value.join("&family=");
|
|
5348
|
+
b += `https://fonts.googleapis.com/css2?family=${O}`, b += `
|
|
5363
5349
|
`;
|
|
5364
5350
|
}
|
|
5365
5351
|
return b ? [
|
|
@@ -5370,17 +5356,17 @@ const Wh = (e) => {
|
|
|
5370
5356
|
] : [];
|
|
5371
5357
|
})
|
|
5372
5358
|
});
|
|
5373
|
-
const
|
|
5374
|
-
return (b,
|
|
5375
|
-
Ni(Ui(
|
|
5359
|
+
const y = Ee(() => `:root {${Object.entries(re(p)).map(([O, $]) => `${O}: ${$};`).join(" ")}}`);
|
|
5360
|
+
return (b, O) => (Ci(), ji(Ei, { to: "#theme" }, [
|
|
5361
|
+
Ni(Ui(y.value), 1)
|
|
5376
5362
|
]));
|
|
5377
5363
|
}
|
|
5378
5364
|
});
|
|
5379
5365
|
export {
|
|
5380
|
-
|
|
5366
|
+
oh as ThemeProvider,
|
|
5381
5367
|
kn as defineTheme,
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5368
|
+
Jg as rulesToCssVars,
|
|
5369
|
+
Wg as useFonts,
|
|
5370
|
+
qg as useTheme,
|
|
5371
|
+
Gg as useThemeStore
|
|
5386
5372
|
};
|