@ogc-maps/storybook-components 0.11.0 → 0.12.0
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/components/LayerEditor/LayerEditor.d.ts.map +1 -1
- package/dist/components/LayerEditor/LayerList.d.ts.map +1 -1
- package/dist/{geo-CyDCsiW-.js → geo--Ta-t__y.js} +135 -127
- package/dist/hooks/index.d.ts +1 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +37 -35
- package/dist/{index-BrphSJJ2.js → index-CqBeCxon.js} +305 -293
- package/dist/main.js +934 -890
- package/dist/schemas/config.d.ts +107 -0
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +22 -20
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +30 -29
- package/dist/utils/ogcApi.d.ts +10 -0
- package/dist/utils/ogcApi.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -130,10 +130,10 @@ class $ extends Error {
|
|
|
130
130
|
else if (i.path.length === 0)
|
|
131
131
|
n._errors.push(t(i));
|
|
132
132
|
else {
|
|
133
|
-
let o = n,
|
|
134
|
-
for (;
|
|
135
|
-
const p = i.path[
|
|
136
|
-
|
|
133
|
+
let o = n, f = 0;
|
|
134
|
+
for (; f < i.path.length; ) {
|
|
135
|
+
const p = i.path[f];
|
|
136
|
+
f === i.path.length - 1 ? (o[p] = o[p] || { _errors: [] }, o[p]._errors.push(t(i))) : o[p] = o[p] || { _errors: [] }, o = o[p], f++;
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
};
|
|
@@ -223,9 +223,9 @@ const de = (a, e) => {
|
|
|
223
223
|
}
|
|
224
224
|
return { message: t };
|
|
225
225
|
};
|
|
226
|
-
let
|
|
227
|
-
function
|
|
228
|
-
return
|
|
226
|
+
let De = de;
|
|
227
|
+
function ze() {
|
|
228
|
+
return De;
|
|
229
229
|
}
|
|
230
230
|
const Fe = (a) => {
|
|
231
231
|
const { data: e, path: t, errorMaps: n, issueData: r } = a, s = [...t, ...r.path || []], i = {
|
|
@@ -239,8 +239,8 @@ const Fe = (a) => {
|
|
|
239
239
|
message: r.message
|
|
240
240
|
};
|
|
241
241
|
let o = "";
|
|
242
|
-
const
|
|
243
|
-
for (const p of
|
|
242
|
+
const f = n.filter((p) => !!p).slice().reverse();
|
|
243
|
+
for (const p of f)
|
|
244
244
|
o = p(i, { data: e, defaultError: o }).message;
|
|
245
245
|
return {
|
|
246
246
|
...r,
|
|
@@ -249,7 +249,7 @@ const Fe = (a) => {
|
|
|
249
249
|
};
|
|
250
250
|
};
|
|
251
251
|
function c(a, e) {
|
|
252
|
-
const t =
|
|
252
|
+
const t = ze(), n = Fe({
|
|
253
253
|
issueData: e,
|
|
254
254
|
data: a.data,
|
|
255
255
|
path: a.path,
|
|
@@ -309,11 +309,11 @@ class O {
|
|
|
309
309
|
}
|
|
310
310
|
const m = Object.freeze({
|
|
311
311
|
status: "aborted"
|
|
312
|
-
}),
|
|
313
|
-
var
|
|
312
|
+
}), H = (a) => ({ status: "dirty", value: a }), A = (a) => ({ status: "valid", value: a }), we = (a) => a.status === "aborted", Se = (a) => a.status === "dirty", W = (a) => a.status === "valid", Q = (a) => typeof Promise < "u" && a instanceof Promise;
|
|
313
|
+
var h;
|
|
314
314
|
(function(a) {
|
|
315
315
|
a.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, a.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
316
|
-
})(
|
|
316
|
+
})(h || (h = {}));
|
|
317
317
|
class Z {
|
|
318
318
|
constructor(e, t, n, r) {
|
|
319
319
|
this._cachedPath = [], this.parent = e, this.data = t, this._path = n, this._key = r;
|
|
@@ -344,11 +344,11 @@ function g(a) {
|
|
|
344
344
|
if (e && (t || n))
|
|
345
345
|
throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);
|
|
346
346
|
return e ? { errorMap: e, description: r } : { errorMap: (i, o) => {
|
|
347
|
-
const { message:
|
|
348
|
-
return i.code === "invalid_enum_value" ? { message:
|
|
347
|
+
const { message: f } = a;
|
|
348
|
+
return i.code === "invalid_enum_value" ? { message: f ?? o.defaultError } : typeof o.data > "u" ? { message: f ?? n ?? o.defaultError } : i.code !== "invalid_type" ? { message: o.defaultError } : { message: f ?? t ?? o.defaultError };
|
|
349
349
|
}, description: r };
|
|
350
350
|
}
|
|
351
|
-
class
|
|
351
|
+
class v {
|
|
352
352
|
get description() {
|
|
353
353
|
return this._def.description;
|
|
354
354
|
}
|
|
@@ -470,7 +470,7 @@ class _ {
|
|
|
470
470
|
code: l.custom,
|
|
471
471
|
...n(r)
|
|
472
472
|
});
|
|
473
|
-
return typeof Promise < "u" && i instanceof Promise ? i.then((
|
|
473
|
+
return typeof Promise < "u" && i instanceof Promise ? i.then((f) => f ? !0 : (o(), !1)) : i ? !0 : (o(), !1);
|
|
474
474
|
});
|
|
475
475
|
}
|
|
476
476
|
refinement(e, t) {
|
|
@@ -494,7 +494,7 @@ class _ {
|
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
496
|
optional() {
|
|
497
|
-
return
|
|
497
|
+
return E.create(this, this._def);
|
|
498
498
|
}
|
|
499
499
|
nullable() {
|
|
500
500
|
return F.create(this, this._def);
|
|
@@ -503,7 +503,7 @@ class _ {
|
|
|
503
503
|
return this.nullable().optional();
|
|
504
504
|
}
|
|
505
505
|
array() {
|
|
506
|
-
return
|
|
506
|
+
return N.create(this);
|
|
507
507
|
}
|
|
508
508
|
promise() {
|
|
509
509
|
return ne.create(this, this._def);
|
|
@@ -532,7 +532,7 @@ class _ {
|
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
534
|
brand() {
|
|
535
|
-
return new
|
|
535
|
+
return new Ie({
|
|
536
536
|
typeName: y.ZodBranded,
|
|
537
537
|
type: this,
|
|
538
538
|
...g(this._def)
|
|
@@ -567,7 +567,7 @@ class _ {
|
|
|
567
567
|
return this.safeParse(null).success;
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
const
|
|
570
|
+
const Ue = /^c[^\s-]{8,}$/i, Be = /^[0-9a-z]+$/, We = /^[0-9A-HJKMNP-TV-Z]{26}$/i, qe = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Je = /^[a-z0-9_-]{21}$/i, He = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ge = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ye = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Qe = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
571
571
|
let ce;
|
|
572
572
|
const Xe = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ke = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, et = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, tt = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, at = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, nt = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Re = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", rt = new RegExp(`^${Re}$`);
|
|
573
573
|
function je(a) {
|
|
@@ -588,7 +588,7 @@ function ot(a, e) {
|
|
|
588
588
|
return !!((e === "v4" || !e) && Xe.test(a) || (e === "v6" || !e) && et.test(a));
|
|
589
589
|
}
|
|
590
590
|
function lt(a, e) {
|
|
591
|
-
if (!
|
|
591
|
+
if (!He.test(a))
|
|
592
592
|
return !1;
|
|
593
593
|
try {
|
|
594
594
|
const [t] = a.split(".");
|
|
@@ -603,7 +603,7 @@ function lt(a, e) {
|
|
|
603
603
|
function ct(a, e) {
|
|
604
604
|
return !!((e === "v4" || !e) && Ke.test(a) || (e === "v6" || !e) && tt.test(a));
|
|
605
605
|
}
|
|
606
|
-
class j extends
|
|
606
|
+
class j extends v {
|
|
607
607
|
_parse(e) {
|
|
608
608
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== u.string) {
|
|
609
609
|
const s = this._getOrReturnCtx(e);
|
|
@@ -652,7 +652,7 @@ class j extends _ {
|
|
|
652
652
|
message: s.message
|
|
653
653
|
}), n.dirty());
|
|
654
654
|
} else if (s.kind === "email")
|
|
655
|
-
|
|
655
|
+
Ye.test(e.data) || (r = this._getOrReturnCtx(e, r), c(r, {
|
|
656
656
|
validation: "email",
|
|
657
657
|
code: l.invalid_string,
|
|
658
658
|
message: s.message
|
|
@@ -676,13 +676,13 @@ class j extends _ {
|
|
|
676
676
|
message: s.message
|
|
677
677
|
}), n.dirty());
|
|
678
678
|
else if (s.kind === "cuid")
|
|
679
|
-
|
|
679
|
+
Ue.test(e.data) || (r = this._getOrReturnCtx(e, r), c(r, {
|
|
680
680
|
validation: "cuid",
|
|
681
681
|
code: l.invalid_string,
|
|
682
682
|
message: s.message
|
|
683
683
|
}), n.dirty());
|
|
684
684
|
else if (s.kind === "cuid2")
|
|
685
|
-
|
|
685
|
+
Be.test(e.data) || (r = this._getOrReturnCtx(e, r), c(r, {
|
|
686
686
|
validation: "cuid2",
|
|
687
687
|
code: l.invalid_string,
|
|
688
688
|
message: s.message
|
|
@@ -731,7 +731,7 @@ class j extends _ {
|
|
|
731
731
|
code: l.invalid_string,
|
|
732
732
|
validation: "time",
|
|
733
733
|
message: s.message
|
|
734
|
-
}), n.dirty()) : s.kind === "duration" ?
|
|
734
|
+
}), n.dirty()) : s.kind === "duration" ? Ge.test(e.data) || (r = this._getOrReturnCtx(e, r), c(r, {
|
|
735
735
|
validation: "duration",
|
|
736
736
|
code: l.invalid_string,
|
|
737
737
|
message: s.message
|
|
@@ -762,7 +762,7 @@ class j extends _ {
|
|
|
762
762
|
return this.refinement((r) => e.test(r), {
|
|
763
763
|
validation: t,
|
|
764
764
|
code: l.invalid_string,
|
|
765
|
-
...
|
|
765
|
+
...h.errToObj(n)
|
|
766
766
|
});
|
|
767
767
|
}
|
|
768
768
|
_addCheck(e) {
|
|
@@ -772,46 +772,46 @@ class j extends _ {
|
|
|
772
772
|
});
|
|
773
773
|
}
|
|
774
774
|
email(e) {
|
|
775
|
-
return this._addCheck({ kind: "email", ...
|
|
775
|
+
return this._addCheck({ kind: "email", ...h.errToObj(e) });
|
|
776
776
|
}
|
|
777
777
|
url(e) {
|
|
778
|
-
return this._addCheck({ kind: "url", ...
|
|
778
|
+
return this._addCheck({ kind: "url", ...h.errToObj(e) });
|
|
779
779
|
}
|
|
780
780
|
emoji(e) {
|
|
781
|
-
return this._addCheck({ kind: "emoji", ...
|
|
781
|
+
return this._addCheck({ kind: "emoji", ...h.errToObj(e) });
|
|
782
782
|
}
|
|
783
783
|
uuid(e) {
|
|
784
|
-
return this._addCheck({ kind: "uuid", ...
|
|
784
|
+
return this._addCheck({ kind: "uuid", ...h.errToObj(e) });
|
|
785
785
|
}
|
|
786
786
|
nanoid(e) {
|
|
787
|
-
return this._addCheck({ kind: "nanoid", ...
|
|
787
|
+
return this._addCheck({ kind: "nanoid", ...h.errToObj(e) });
|
|
788
788
|
}
|
|
789
789
|
cuid(e) {
|
|
790
|
-
return this._addCheck({ kind: "cuid", ...
|
|
790
|
+
return this._addCheck({ kind: "cuid", ...h.errToObj(e) });
|
|
791
791
|
}
|
|
792
792
|
cuid2(e) {
|
|
793
|
-
return this._addCheck({ kind: "cuid2", ...
|
|
793
|
+
return this._addCheck({ kind: "cuid2", ...h.errToObj(e) });
|
|
794
794
|
}
|
|
795
795
|
ulid(e) {
|
|
796
|
-
return this._addCheck({ kind: "ulid", ...
|
|
796
|
+
return this._addCheck({ kind: "ulid", ...h.errToObj(e) });
|
|
797
797
|
}
|
|
798
798
|
base64(e) {
|
|
799
|
-
return this._addCheck({ kind: "base64", ...
|
|
799
|
+
return this._addCheck({ kind: "base64", ...h.errToObj(e) });
|
|
800
800
|
}
|
|
801
801
|
base64url(e) {
|
|
802
802
|
return this._addCheck({
|
|
803
803
|
kind: "base64url",
|
|
804
|
-
...
|
|
804
|
+
...h.errToObj(e)
|
|
805
805
|
});
|
|
806
806
|
}
|
|
807
807
|
jwt(e) {
|
|
808
|
-
return this._addCheck({ kind: "jwt", ...
|
|
808
|
+
return this._addCheck({ kind: "jwt", ...h.errToObj(e) });
|
|
809
809
|
}
|
|
810
810
|
ip(e) {
|
|
811
|
-
return this._addCheck({ kind: "ip", ...
|
|
811
|
+
return this._addCheck({ kind: "ip", ...h.errToObj(e) });
|
|
812
812
|
}
|
|
813
813
|
cidr(e) {
|
|
814
|
-
return this._addCheck({ kind: "cidr", ...
|
|
814
|
+
return this._addCheck({ kind: "cidr", ...h.errToObj(e) });
|
|
815
815
|
}
|
|
816
816
|
datetime(e) {
|
|
817
817
|
return typeof e == "string" ? this._addCheck({
|
|
@@ -825,7 +825,7 @@ class j extends _ {
|
|
|
825
825
|
precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
|
|
826
826
|
offset: (e == null ? void 0 : e.offset) ?? !1,
|
|
827
827
|
local: (e == null ? void 0 : e.local) ?? !1,
|
|
828
|
-
...
|
|
828
|
+
...h.errToObj(e == null ? void 0 : e.message)
|
|
829
829
|
});
|
|
830
830
|
}
|
|
831
831
|
date(e) {
|
|
@@ -839,17 +839,17 @@ class j extends _ {
|
|
|
839
839
|
}) : this._addCheck({
|
|
840
840
|
kind: "time",
|
|
841
841
|
precision: typeof (e == null ? void 0 : e.precision) > "u" ? null : e == null ? void 0 : e.precision,
|
|
842
|
-
...
|
|
842
|
+
...h.errToObj(e == null ? void 0 : e.message)
|
|
843
843
|
});
|
|
844
844
|
}
|
|
845
845
|
duration(e) {
|
|
846
|
-
return this._addCheck({ kind: "duration", ...
|
|
846
|
+
return this._addCheck({ kind: "duration", ...h.errToObj(e) });
|
|
847
847
|
}
|
|
848
848
|
regex(e, t) {
|
|
849
849
|
return this._addCheck({
|
|
850
850
|
kind: "regex",
|
|
851
851
|
regex: e,
|
|
852
|
-
...
|
|
852
|
+
...h.errToObj(t)
|
|
853
853
|
});
|
|
854
854
|
}
|
|
855
855
|
includes(e, t) {
|
|
@@ -857,49 +857,49 @@ class j extends _ {
|
|
|
857
857
|
kind: "includes",
|
|
858
858
|
value: e,
|
|
859
859
|
position: t == null ? void 0 : t.position,
|
|
860
|
-
...
|
|
860
|
+
...h.errToObj(t == null ? void 0 : t.message)
|
|
861
861
|
});
|
|
862
862
|
}
|
|
863
863
|
startsWith(e, t) {
|
|
864
864
|
return this._addCheck({
|
|
865
865
|
kind: "startsWith",
|
|
866
866
|
value: e,
|
|
867
|
-
...
|
|
867
|
+
...h.errToObj(t)
|
|
868
868
|
});
|
|
869
869
|
}
|
|
870
870
|
endsWith(e, t) {
|
|
871
871
|
return this._addCheck({
|
|
872
872
|
kind: "endsWith",
|
|
873
873
|
value: e,
|
|
874
|
-
...
|
|
874
|
+
...h.errToObj(t)
|
|
875
875
|
});
|
|
876
876
|
}
|
|
877
877
|
min(e, t) {
|
|
878
878
|
return this._addCheck({
|
|
879
879
|
kind: "min",
|
|
880
880
|
value: e,
|
|
881
|
-
...
|
|
881
|
+
...h.errToObj(t)
|
|
882
882
|
});
|
|
883
883
|
}
|
|
884
884
|
max(e, t) {
|
|
885
885
|
return this._addCheck({
|
|
886
886
|
kind: "max",
|
|
887
887
|
value: e,
|
|
888
|
-
...
|
|
888
|
+
...h.errToObj(t)
|
|
889
889
|
});
|
|
890
890
|
}
|
|
891
891
|
length(e, t) {
|
|
892
892
|
return this._addCheck({
|
|
893
893
|
kind: "length",
|
|
894
894
|
value: e,
|
|
895
|
-
...
|
|
895
|
+
...h.errToObj(t)
|
|
896
896
|
});
|
|
897
897
|
}
|
|
898
898
|
/**
|
|
899
899
|
* Equivalent to `.min(1)`
|
|
900
900
|
*/
|
|
901
901
|
nonempty(e) {
|
|
902
|
-
return this.min(1,
|
|
902
|
+
return this.min(1, h.errToObj(e));
|
|
903
903
|
}
|
|
904
904
|
trim() {
|
|
905
905
|
return new j({
|
|
@@ -990,7 +990,7 @@ function dt(a, e) {
|
|
|
990
990
|
const t = (a.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, r = t > n ? t : n, s = Number.parseInt(a.toFixed(r).replace(".", "")), i = Number.parseInt(e.toFixed(r).replace(".", ""));
|
|
991
991
|
return s % i / 10 ** r;
|
|
992
992
|
}
|
|
993
|
-
class q extends
|
|
993
|
+
class q extends v {
|
|
994
994
|
constructor() {
|
|
995
995
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
996
996
|
}
|
|
@@ -1036,16 +1036,16 @@ class q extends _ {
|
|
|
1036
1036
|
return { status: r.value, value: e.data };
|
|
1037
1037
|
}
|
|
1038
1038
|
gte(e, t) {
|
|
1039
|
-
return this.setLimit("min", e, !0,
|
|
1039
|
+
return this.setLimit("min", e, !0, h.toString(t));
|
|
1040
1040
|
}
|
|
1041
1041
|
gt(e, t) {
|
|
1042
|
-
return this.setLimit("min", e, !1,
|
|
1042
|
+
return this.setLimit("min", e, !1, h.toString(t));
|
|
1043
1043
|
}
|
|
1044
1044
|
lte(e, t) {
|
|
1045
|
-
return this.setLimit("max", e, !0,
|
|
1045
|
+
return this.setLimit("max", e, !0, h.toString(t));
|
|
1046
1046
|
}
|
|
1047
1047
|
lt(e, t) {
|
|
1048
|
-
return this.setLimit("max", e, !1,
|
|
1048
|
+
return this.setLimit("max", e, !1, h.toString(t));
|
|
1049
1049
|
}
|
|
1050
1050
|
setLimit(e, t, n, r) {
|
|
1051
1051
|
return new q({
|
|
@@ -1056,7 +1056,7 @@ class q extends _ {
|
|
|
1056
1056
|
kind: e,
|
|
1057
1057
|
value: t,
|
|
1058
1058
|
inclusive: n,
|
|
1059
|
-
message:
|
|
1059
|
+
message: h.toString(r)
|
|
1060
1060
|
}
|
|
1061
1061
|
]
|
|
1062
1062
|
});
|
|
@@ -1070,7 +1070,7 @@ class q extends _ {
|
|
|
1070
1070
|
int(e) {
|
|
1071
1071
|
return this._addCheck({
|
|
1072
1072
|
kind: "int",
|
|
1073
|
-
message:
|
|
1073
|
+
message: h.toString(e)
|
|
1074
1074
|
});
|
|
1075
1075
|
}
|
|
1076
1076
|
positive(e) {
|
|
@@ -1078,7 +1078,7 @@ class q extends _ {
|
|
|
1078
1078
|
kind: "min",
|
|
1079
1079
|
value: 0,
|
|
1080
1080
|
inclusive: !1,
|
|
1081
|
-
message:
|
|
1081
|
+
message: h.toString(e)
|
|
1082
1082
|
});
|
|
1083
1083
|
}
|
|
1084
1084
|
negative(e) {
|
|
@@ -1086,7 +1086,7 @@ class q extends _ {
|
|
|
1086
1086
|
kind: "max",
|
|
1087
1087
|
value: 0,
|
|
1088
1088
|
inclusive: !1,
|
|
1089
|
-
message:
|
|
1089
|
+
message: h.toString(e)
|
|
1090
1090
|
});
|
|
1091
1091
|
}
|
|
1092
1092
|
nonpositive(e) {
|
|
@@ -1094,7 +1094,7 @@ class q extends _ {
|
|
|
1094
1094
|
kind: "max",
|
|
1095
1095
|
value: 0,
|
|
1096
1096
|
inclusive: !0,
|
|
1097
|
-
message:
|
|
1097
|
+
message: h.toString(e)
|
|
1098
1098
|
});
|
|
1099
1099
|
}
|
|
1100
1100
|
nonnegative(e) {
|
|
@@ -1102,20 +1102,20 @@ class q extends _ {
|
|
|
1102
1102
|
kind: "min",
|
|
1103
1103
|
value: 0,
|
|
1104
1104
|
inclusive: !0,
|
|
1105
|
-
message:
|
|
1105
|
+
message: h.toString(e)
|
|
1106
1106
|
});
|
|
1107
1107
|
}
|
|
1108
1108
|
multipleOf(e, t) {
|
|
1109
1109
|
return this._addCheck({
|
|
1110
1110
|
kind: "multipleOf",
|
|
1111
1111
|
value: e,
|
|
1112
|
-
message:
|
|
1112
|
+
message: h.toString(t)
|
|
1113
1113
|
});
|
|
1114
1114
|
}
|
|
1115
1115
|
finite(e) {
|
|
1116
1116
|
return this._addCheck({
|
|
1117
1117
|
kind: "finite",
|
|
1118
|
-
message:
|
|
1118
|
+
message: h.toString(e)
|
|
1119
1119
|
});
|
|
1120
1120
|
}
|
|
1121
1121
|
safe(e) {
|
|
@@ -1123,12 +1123,12 @@ class q extends _ {
|
|
|
1123
1123
|
kind: "min",
|
|
1124
1124
|
inclusive: !0,
|
|
1125
1125
|
value: Number.MIN_SAFE_INTEGER,
|
|
1126
|
-
message:
|
|
1126
|
+
message: h.toString(e)
|
|
1127
1127
|
})._addCheck({
|
|
1128
1128
|
kind: "max",
|
|
1129
1129
|
inclusive: !0,
|
|
1130
1130
|
value: Number.MAX_SAFE_INTEGER,
|
|
1131
|
-
message:
|
|
1131
|
+
message: h.toString(e)
|
|
1132
1132
|
});
|
|
1133
1133
|
}
|
|
1134
1134
|
get minValue() {
|
|
@@ -1162,7 +1162,7 @@ q.create = (a) => new q({
|
|
|
1162
1162
|
coerce: (a == null ? void 0 : a.coerce) || !1,
|
|
1163
1163
|
...g(a)
|
|
1164
1164
|
});
|
|
1165
|
-
class
|
|
1165
|
+
class G extends v {
|
|
1166
1166
|
constructor() {
|
|
1167
1167
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
1168
1168
|
}
|
|
@@ -1206,19 +1206,19 @@ class Y extends _ {
|
|
|
1206
1206
|
}), m;
|
|
1207
1207
|
}
|
|
1208
1208
|
gte(e, t) {
|
|
1209
|
-
return this.setLimit("min", e, !0,
|
|
1209
|
+
return this.setLimit("min", e, !0, h.toString(t));
|
|
1210
1210
|
}
|
|
1211
1211
|
gt(e, t) {
|
|
1212
|
-
return this.setLimit("min", e, !1,
|
|
1212
|
+
return this.setLimit("min", e, !1, h.toString(t));
|
|
1213
1213
|
}
|
|
1214
1214
|
lte(e, t) {
|
|
1215
|
-
return this.setLimit("max", e, !0,
|
|
1215
|
+
return this.setLimit("max", e, !0, h.toString(t));
|
|
1216
1216
|
}
|
|
1217
1217
|
lt(e, t) {
|
|
1218
|
-
return this.setLimit("max", e, !1,
|
|
1218
|
+
return this.setLimit("max", e, !1, h.toString(t));
|
|
1219
1219
|
}
|
|
1220
1220
|
setLimit(e, t, n, r) {
|
|
1221
|
-
return new
|
|
1221
|
+
return new G({
|
|
1222
1222
|
...this._def,
|
|
1223
1223
|
checks: [
|
|
1224
1224
|
...this._def.checks,
|
|
@@ -1226,13 +1226,13 @@ class Y extends _ {
|
|
|
1226
1226
|
kind: e,
|
|
1227
1227
|
value: t,
|
|
1228
1228
|
inclusive: n,
|
|
1229
|
-
message:
|
|
1229
|
+
message: h.toString(r)
|
|
1230
1230
|
}
|
|
1231
1231
|
]
|
|
1232
1232
|
});
|
|
1233
1233
|
}
|
|
1234
1234
|
_addCheck(e) {
|
|
1235
|
-
return new
|
|
1235
|
+
return new G({
|
|
1236
1236
|
...this._def,
|
|
1237
1237
|
checks: [...this._def.checks, e]
|
|
1238
1238
|
});
|
|
@@ -1242,7 +1242,7 @@ class Y extends _ {
|
|
|
1242
1242
|
kind: "min",
|
|
1243
1243
|
value: BigInt(0),
|
|
1244
1244
|
inclusive: !1,
|
|
1245
|
-
message:
|
|
1245
|
+
message: h.toString(e)
|
|
1246
1246
|
});
|
|
1247
1247
|
}
|
|
1248
1248
|
negative(e) {
|
|
@@ -1250,7 +1250,7 @@ class Y extends _ {
|
|
|
1250
1250
|
kind: "max",
|
|
1251
1251
|
value: BigInt(0),
|
|
1252
1252
|
inclusive: !1,
|
|
1253
|
-
message:
|
|
1253
|
+
message: h.toString(e)
|
|
1254
1254
|
});
|
|
1255
1255
|
}
|
|
1256
1256
|
nonpositive(e) {
|
|
@@ -1258,7 +1258,7 @@ class Y extends _ {
|
|
|
1258
1258
|
kind: "max",
|
|
1259
1259
|
value: BigInt(0),
|
|
1260
1260
|
inclusive: !0,
|
|
1261
|
-
message:
|
|
1261
|
+
message: h.toString(e)
|
|
1262
1262
|
});
|
|
1263
1263
|
}
|
|
1264
1264
|
nonnegative(e) {
|
|
@@ -1266,14 +1266,14 @@ class Y extends _ {
|
|
|
1266
1266
|
kind: "min",
|
|
1267
1267
|
value: BigInt(0),
|
|
1268
1268
|
inclusive: !0,
|
|
1269
|
-
message:
|
|
1269
|
+
message: h.toString(e)
|
|
1270
1270
|
});
|
|
1271
1271
|
}
|
|
1272
1272
|
multipleOf(e, t) {
|
|
1273
1273
|
return this._addCheck({
|
|
1274
1274
|
kind: "multipleOf",
|
|
1275
1275
|
value: e,
|
|
1276
|
-
message:
|
|
1276
|
+
message: h.toString(t)
|
|
1277
1277
|
});
|
|
1278
1278
|
}
|
|
1279
1279
|
get minValue() {
|
|
@@ -1289,13 +1289,13 @@ class Y extends _ {
|
|
|
1289
1289
|
return e;
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
|
-
|
|
1292
|
+
G.create = (a) => new G({
|
|
1293
1293
|
checks: [],
|
|
1294
1294
|
typeName: y.ZodBigInt,
|
|
1295
1295
|
coerce: (a == null ? void 0 : a.coerce) ?? !1,
|
|
1296
1296
|
...g(a)
|
|
1297
1297
|
});
|
|
1298
|
-
class ue extends
|
|
1298
|
+
class ue extends v {
|
|
1299
1299
|
_parse(e) {
|
|
1300
1300
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== u.boolean) {
|
|
1301
1301
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1305,7 +1305,7 @@ class ue extends _ {
|
|
|
1305
1305
|
received: n.parsedType
|
|
1306
1306
|
}), m;
|
|
1307
1307
|
}
|
|
1308
|
-
return
|
|
1308
|
+
return A(e.data);
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|
|
1311
1311
|
ue.create = (a) => new ue({
|
|
@@ -1313,7 +1313,7 @@ ue.create = (a) => new ue({
|
|
|
1313
1313
|
coerce: (a == null ? void 0 : a.coerce) || !1,
|
|
1314
1314
|
...g(a)
|
|
1315
1315
|
});
|
|
1316
|
-
class X extends
|
|
1316
|
+
class X extends v {
|
|
1317
1317
|
_parse(e) {
|
|
1318
1318
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== u.date) {
|
|
1319
1319
|
const s = this._getOrReturnCtx(e);
|
|
@@ -1362,14 +1362,14 @@ class X extends _ {
|
|
|
1362
1362
|
return this._addCheck({
|
|
1363
1363
|
kind: "min",
|
|
1364
1364
|
value: e.getTime(),
|
|
1365
|
-
message:
|
|
1365
|
+
message: h.toString(t)
|
|
1366
1366
|
});
|
|
1367
1367
|
}
|
|
1368
1368
|
max(e, t) {
|
|
1369
1369
|
return this._addCheck({
|
|
1370
1370
|
kind: "max",
|
|
1371
1371
|
value: e.getTime(),
|
|
1372
|
-
message:
|
|
1372
|
+
message: h.toString(t)
|
|
1373
1373
|
});
|
|
1374
1374
|
}
|
|
1375
1375
|
get minDate() {
|
|
@@ -1391,7 +1391,7 @@ X.create = (a) => new X({
|
|
|
1391
1391
|
typeName: y.ZodDate,
|
|
1392
1392
|
...g(a)
|
|
1393
1393
|
});
|
|
1394
|
-
class Ce extends
|
|
1394
|
+
class Ce extends v {
|
|
1395
1395
|
_parse(e) {
|
|
1396
1396
|
if (this._getType(e) !== u.symbol) {
|
|
1397
1397
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1401,14 +1401,14 @@ class Ce extends _ {
|
|
|
1401
1401
|
received: n.parsedType
|
|
1402
1402
|
}), m;
|
|
1403
1403
|
}
|
|
1404
|
-
return
|
|
1404
|
+
return A(e.data);
|
|
1405
1405
|
}
|
|
1406
1406
|
}
|
|
1407
1407
|
Ce.create = (a) => new Ce({
|
|
1408
1408
|
typeName: y.ZodSymbol,
|
|
1409
1409
|
...g(a)
|
|
1410
1410
|
});
|
|
1411
|
-
class
|
|
1411
|
+
class he extends v {
|
|
1412
1412
|
_parse(e) {
|
|
1413
1413
|
if (this._getType(e) !== u.undefined) {
|
|
1414
1414
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1418,14 +1418,14 @@ class fe extends _ {
|
|
|
1418
1418
|
received: n.parsedType
|
|
1419
1419
|
}), m;
|
|
1420
1420
|
}
|
|
1421
|
-
return
|
|
1421
|
+
return A(e.data);
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
|
|
1424
|
+
he.create = (a) => new he({
|
|
1425
1425
|
typeName: y.ZodUndefined,
|
|
1426
1426
|
...g(a)
|
|
1427
1427
|
});
|
|
1428
|
-
class
|
|
1428
|
+
class fe extends v {
|
|
1429
1429
|
_parse(e) {
|
|
1430
1430
|
if (this._getType(e) !== u.null) {
|
|
1431
1431
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1435,38 +1435,38 @@ class he extends _ {
|
|
|
1435
1435
|
received: n.parsedType
|
|
1436
1436
|
}), m;
|
|
1437
1437
|
}
|
|
1438
|
-
return
|
|
1438
|
+
return A(e.data);
|
|
1439
1439
|
}
|
|
1440
1440
|
}
|
|
1441
|
-
|
|
1441
|
+
fe.create = (a) => new fe({
|
|
1442
1442
|
typeName: y.ZodNull,
|
|
1443
1443
|
...g(a)
|
|
1444
1444
|
});
|
|
1445
|
-
class Oe extends
|
|
1445
|
+
class Oe extends v {
|
|
1446
1446
|
constructor() {
|
|
1447
1447
|
super(...arguments), this._any = !0;
|
|
1448
1448
|
}
|
|
1449
1449
|
_parse(e) {
|
|
1450
|
-
return
|
|
1450
|
+
return A(e.data);
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
1453
|
Oe.create = (a) => new Oe({
|
|
1454
1454
|
typeName: y.ZodAny,
|
|
1455
1455
|
...g(a)
|
|
1456
1456
|
});
|
|
1457
|
-
class pe extends
|
|
1457
|
+
class pe extends v {
|
|
1458
1458
|
constructor() {
|
|
1459
1459
|
super(...arguments), this._unknown = !0;
|
|
1460
1460
|
}
|
|
1461
1461
|
_parse(e) {
|
|
1462
|
-
return
|
|
1462
|
+
return A(e.data);
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
1465
|
pe.create = (a) => new pe({
|
|
1466
1466
|
typeName: y.ZodUnknown,
|
|
1467
1467
|
...g(a)
|
|
1468
1468
|
});
|
|
1469
|
-
class L extends
|
|
1469
|
+
class L extends v {
|
|
1470
1470
|
_parse(e) {
|
|
1471
1471
|
const t = this._getOrReturnCtx(e);
|
|
1472
1472
|
return c(t, {
|
|
@@ -1480,7 +1480,7 @@ L.create = (a) => new L({
|
|
|
1480
1480
|
typeName: y.ZodNever,
|
|
1481
1481
|
...g(a)
|
|
1482
1482
|
});
|
|
1483
|
-
class
|
|
1483
|
+
class Ae extends v {
|
|
1484
1484
|
_parse(e) {
|
|
1485
1485
|
if (this._getType(e) !== u.undefined) {
|
|
1486
1486
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1490,14 +1490,14 @@ class Ne extends _ {
|
|
|
1490
1490
|
received: n.parsedType
|
|
1491
1491
|
}), m;
|
|
1492
1492
|
}
|
|
1493
|
-
return
|
|
1493
|
+
return A(e.data);
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
|
-
|
|
1496
|
+
Ae.create = (a) => new Ae({
|
|
1497
1497
|
typeName: y.ZodVoid,
|
|
1498
1498
|
...g(a)
|
|
1499
1499
|
});
|
|
1500
|
-
class
|
|
1500
|
+
class N extends v {
|
|
1501
1501
|
_parse(e) {
|
|
1502
1502
|
const { ctx: t, status: n } = this._processInputParams(e), r = this._def;
|
|
1503
1503
|
if (t.parsedType !== u.array)
|
|
@@ -1541,28 +1541,28 @@ class A extends _ {
|
|
|
1541
1541
|
return this._def.type;
|
|
1542
1542
|
}
|
|
1543
1543
|
min(e, t) {
|
|
1544
|
-
return new
|
|
1544
|
+
return new N({
|
|
1545
1545
|
...this._def,
|
|
1546
|
-
minLength: { value: e, message:
|
|
1546
|
+
minLength: { value: e, message: h.toString(t) }
|
|
1547
1547
|
});
|
|
1548
1548
|
}
|
|
1549
1549
|
max(e, t) {
|
|
1550
|
-
return new
|
|
1550
|
+
return new N({
|
|
1551
1551
|
...this._def,
|
|
1552
|
-
maxLength: { value: e, message:
|
|
1552
|
+
maxLength: { value: e, message: h.toString(t) }
|
|
1553
1553
|
});
|
|
1554
1554
|
}
|
|
1555
1555
|
length(e, t) {
|
|
1556
|
-
return new
|
|
1556
|
+
return new N({
|
|
1557
1557
|
...this._def,
|
|
1558
|
-
exactLength: { value: e, message:
|
|
1558
|
+
exactLength: { value: e, message: h.toString(t) }
|
|
1559
1559
|
});
|
|
1560
1560
|
}
|
|
1561
1561
|
nonempty(e) {
|
|
1562
1562
|
return this.min(1, e);
|
|
1563
1563
|
}
|
|
1564
1564
|
}
|
|
1565
|
-
|
|
1565
|
+
N.create = (a, e) => new N({
|
|
1566
1566
|
type: a,
|
|
1567
1567
|
minLength: null,
|
|
1568
1568
|
maxLength: null,
|
|
@@ -1570,23 +1570,23 @@ A.create = (a, e) => new A({
|
|
|
1570
1570
|
typeName: y.ZodArray,
|
|
1571
1571
|
...g(e)
|
|
1572
1572
|
});
|
|
1573
|
-
function
|
|
1573
|
+
function U(a) {
|
|
1574
1574
|
if (a instanceof T) {
|
|
1575
1575
|
const e = {};
|
|
1576
1576
|
for (const t in a.shape) {
|
|
1577
1577
|
const n = a.shape[t];
|
|
1578
|
-
e[t] =
|
|
1578
|
+
e[t] = E.create(U(n));
|
|
1579
1579
|
}
|
|
1580
1580
|
return new T({
|
|
1581
1581
|
...a._def,
|
|
1582
1582
|
shape: () => e
|
|
1583
1583
|
});
|
|
1584
|
-
} else return a instanceof
|
|
1584
|
+
} else return a instanceof N ? new N({
|
|
1585
1585
|
...a._def,
|
|
1586
|
-
type:
|
|
1587
|
-
}) : a instanceof
|
|
1586
|
+
type: U(a.element)
|
|
1587
|
+
}) : a instanceof E ? E.create(U(a.unwrap())) : a instanceof F ? F.create(U(a.unwrap())) : a instanceof D ? D.create(a.items.map((e) => U(e))) : a;
|
|
1588
1588
|
}
|
|
1589
|
-
class T extends
|
|
1589
|
+
class T extends v {
|
|
1590
1590
|
constructor() {
|
|
1591
1591
|
super(...arguments), this._cached = null, this.nonstrict = this.passthrough, this.augment = this.extend;
|
|
1592
1592
|
}
|
|
@@ -1609,10 +1609,10 @@ class T extends _ {
|
|
|
1609
1609
|
if (!(this._def.catchall instanceof L && this._def.unknownKeys === "strip"))
|
|
1610
1610
|
for (const p in r.data)
|
|
1611
1611
|
i.includes(p) || o.push(p);
|
|
1612
|
-
const
|
|
1612
|
+
const f = [];
|
|
1613
1613
|
for (const p of i) {
|
|
1614
1614
|
const b = s[p], J = r.data[p];
|
|
1615
|
-
|
|
1615
|
+
f.push({
|
|
1616
1616
|
key: { status: "valid", value: p },
|
|
1617
1617
|
value: b._parse(new Z(r, J, r.path, p)),
|
|
1618
1618
|
alwaysSet: p in r.data
|
|
@@ -1622,7 +1622,7 @@ class T extends _ {
|
|
|
1622
1622
|
const p = this._def.unknownKeys;
|
|
1623
1623
|
if (p === "passthrough")
|
|
1624
1624
|
for (const b of o)
|
|
1625
|
-
|
|
1625
|
+
f.push({
|
|
1626
1626
|
key: { status: "valid", value: b },
|
|
1627
1627
|
value: { status: "valid", value: r.data[b] }
|
|
1628
1628
|
});
|
|
@@ -1636,7 +1636,7 @@ class T extends _ {
|
|
|
1636
1636
|
const p = this._def.catchall;
|
|
1637
1637
|
for (const b of o) {
|
|
1638
1638
|
const J = r.data[b];
|
|
1639
|
-
|
|
1639
|
+
f.push({
|
|
1640
1640
|
key: { status: "valid", value: b },
|
|
1641
1641
|
value: p._parse(
|
|
1642
1642
|
new Z(r, J, r.path, b)
|
|
@@ -1648,7 +1648,7 @@ class T extends _ {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
return r.common.async ? Promise.resolve().then(async () => {
|
|
1650
1650
|
const p = [];
|
|
1651
|
-
for (const b of
|
|
1651
|
+
for (const b of f) {
|
|
1652
1652
|
const J = await b.key, Ve = await b.value;
|
|
1653
1653
|
p.push({
|
|
1654
1654
|
key: J,
|
|
@@ -1657,13 +1657,13 @@ class T extends _ {
|
|
|
1657
1657
|
});
|
|
1658
1658
|
}
|
|
1659
1659
|
return p;
|
|
1660
|
-
}).then((p) => O.mergeObjectSync(n, p)) : O.mergeObjectSync(n,
|
|
1660
|
+
}).then((p) => O.mergeObjectSync(n, p)) : O.mergeObjectSync(n, f);
|
|
1661
1661
|
}
|
|
1662
1662
|
get shape() {
|
|
1663
1663
|
return this._def.shape();
|
|
1664
1664
|
}
|
|
1665
1665
|
strict(e) {
|
|
1666
|
-
return
|
|
1666
|
+
return h.errToObj, new T({
|
|
1667
1667
|
...this._def,
|
|
1668
1668
|
unknownKeys: "strict",
|
|
1669
1669
|
...e !== void 0 ? {
|
|
@@ -1671,7 +1671,7 @@ class T extends _ {
|
|
|
1671
1671
|
var s, i;
|
|
1672
1672
|
const r = ((i = (s = this._def).errorMap) == null ? void 0 : i.call(s, t, n).message) ?? n.defaultError;
|
|
1673
1673
|
return t.code === "unrecognized_keys" ? {
|
|
1674
|
-
message:
|
|
1674
|
+
message: h.errToObj(e).message ?? r
|
|
1675
1675
|
} : {
|
|
1676
1676
|
message: r
|
|
1677
1677
|
};
|
|
@@ -1820,7 +1820,7 @@ class T extends _ {
|
|
|
1820
1820
|
* @deprecated
|
|
1821
1821
|
*/
|
|
1822
1822
|
deepPartial() {
|
|
1823
|
-
return
|
|
1823
|
+
return U(this);
|
|
1824
1824
|
}
|
|
1825
1825
|
partial(e) {
|
|
1826
1826
|
const t = {};
|
|
@@ -1840,7 +1840,7 @@ class T extends _ {
|
|
|
1840
1840
|
t[n] = this.shape[n];
|
|
1841
1841
|
else {
|
|
1842
1842
|
let s = this.shape[n];
|
|
1843
|
-
for (; s instanceof
|
|
1843
|
+
for (; s instanceof E; )
|
|
1844
1844
|
s = s._def.innerType;
|
|
1845
1845
|
t[n] = s;
|
|
1846
1846
|
}
|
|
@@ -1850,7 +1850,7 @@ class T extends _ {
|
|
|
1850
1850
|
});
|
|
1851
1851
|
}
|
|
1852
1852
|
keyof() {
|
|
1853
|
-
return
|
|
1853
|
+
return Ee(k.objectKeys(this.shape));
|
|
1854
1854
|
}
|
|
1855
1855
|
}
|
|
1856
1856
|
T.create = (a, e) => new T({
|
|
@@ -1874,7 +1874,7 @@ T.lazycreate = (a, e) => new T({
|
|
|
1874
1874
|
typeName: y.ZodObject,
|
|
1875
1875
|
...g(e)
|
|
1876
1876
|
});
|
|
1877
|
-
class K extends
|
|
1877
|
+
class K extends v {
|
|
1878
1878
|
_parse(e) {
|
|
1879
1879
|
const { ctx: t } = this._processInputParams(e), n = this._def.options;
|
|
1880
1880
|
function r(s) {
|
|
@@ -1912,7 +1912,7 @@ class K extends _ {
|
|
|
1912
1912
|
{
|
|
1913
1913
|
let s;
|
|
1914
1914
|
const i = [];
|
|
1915
|
-
for (const
|
|
1915
|
+
for (const f of n) {
|
|
1916
1916
|
const p = {
|
|
1917
1917
|
...t,
|
|
1918
1918
|
common: {
|
|
@@ -1920,7 +1920,7 @@ class K extends _ {
|
|
|
1920
1920
|
issues: []
|
|
1921
1921
|
},
|
|
1922
1922
|
parent: null
|
|
1923
|
-
}, b =
|
|
1923
|
+
}, b = f._parseSync({
|
|
1924
1924
|
data: t.data,
|
|
1925
1925
|
path: t.path,
|
|
1926
1926
|
parent: p
|
|
@@ -1931,7 +1931,7 @@ class K extends _ {
|
|
|
1931
1931
|
}
|
|
1932
1932
|
if (s)
|
|
1933
1933
|
return t.common.issues.push(...s.ctx.common.issues), s.result;
|
|
1934
|
-
const o = i.map((
|
|
1934
|
+
const o = i.map((f) => new $(f));
|
|
1935
1935
|
return c(t, {
|
|
1936
1936
|
code: l.invalid_union,
|
|
1937
1937
|
unionErrors: o
|
|
@@ -1947,8 +1947,8 @@ K.create = (a, e) => new K({
|
|
|
1947
1947
|
typeName: y.ZodUnion,
|
|
1948
1948
|
...g(e)
|
|
1949
1949
|
});
|
|
1950
|
-
const R = (a) => a instanceof ye ? R(a.schema) : a instanceof P ? R(a.innerType()) : a instanceof ae ? [a.value] : a instanceof
|
|
1951
|
-
class _e extends
|
|
1950
|
+
const R = (a) => a instanceof ye ? R(a.schema) : a instanceof P ? R(a.innerType()) : a instanceof ae ? [a.value] : a instanceof z ? a.options : a instanceof ge ? k.objectValues(a.enum) : a instanceof re ? R(a._def.innerType) : a instanceof he ? [void 0] : a instanceof fe ? [null] : a instanceof E ? [void 0, ...R(a.unwrap())] : a instanceof F ? [null, ...R(a.unwrap())] : a instanceof Ie || a instanceof ie ? R(a.unwrap()) : a instanceof se ? R(a._def.innerType) : [];
|
|
1951
|
+
class _e extends v {
|
|
1952
1952
|
_parse(e) {
|
|
1953
1953
|
const { ctx: t } = this._processInputParams(e);
|
|
1954
1954
|
if (t.parsedType !== u.object)
|
|
@@ -2017,10 +2017,10 @@ function me(a, e) {
|
|
|
2017
2017
|
if (t === u.object && n === u.object) {
|
|
2018
2018
|
const r = k.objectKeys(e), s = k.objectKeys(a).filter((o) => r.indexOf(o) !== -1), i = { ...a, ...e };
|
|
2019
2019
|
for (const o of s) {
|
|
2020
|
-
const
|
|
2021
|
-
if (!
|
|
2020
|
+
const f = me(a[o], e[o]);
|
|
2021
|
+
if (!f.valid)
|
|
2022
2022
|
return { valid: !1 };
|
|
2023
|
-
i[o] =
|
|
2023
|
+
i[o] = f.data;
|
|
2024
2024
|
}
|
|
2025
2025
|
return { valid: !0, data: i };
|
|
2026
2026
|
} else if (t === u.array && n === u.array) {
|
|
@@ -2028,15 +2028,15 @@ function me(a, e) {
|
|
|
2028
2028
|
return { valid: !1 };
|
|
2029
2029
|
const r = [];
|
|
2030
2030
|
for (let s = 0; s < a.length; s++) {
|
|
2031
|
-
const i = a[s], o = e[s],
|
|
2032
|
-
if (!
|
|
2031
|
+
const i = a[s], o = e[s], f = me(i, o);
|
|
2032
|
+
if (!f.valid)
|
|
2033
2033
|
return { valid: !1 };
|
|
2034
|
-
r.push(
|
|
2034
|
+
r.push(f.data);
|
|
2035
2035
|
}
|
|
2036
2036
|
return { valid: !0, data: r };
|
|
2037
2037
|
} else return t === u.date && n === u.date && +a == +e ? { valid: !0, data: a } : { valid: !1 };
|
|
2038
2038
|
}
|
|
2039
|
-
class ee extends
|
|
2039
|
+
class ee extends v {
|
|
2040
2040
|
_parse(e) {
|
|
2041
2041
|
const { status: t, ctx: n } = this._processInputParams(e), r = (s, i) => {
|
|
2042
2042
|
if (we(s) || we(i))
|
|
@@ -2074,7 +2074,7 @@ ee.create = (a, e, t) => new ee({
|
|
|
2074
2074
|
typeName: y.ZodIntersection,
|
|
2075
2075
|
...g(t)
|
|
2076
2076
|
});
|
|
2077
|
-
class
|
|
2077
|
+
class D extends v {
|
|
2078
2078
|
_parse(e) {
|
|
2079
2079
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2080
2080
|
if (n.parsedType !== u.array)
|
|
@@ -2099,8 +2099,8 @@ class z extends _ {
|
|
|
2099
2099
|
type: "array"
|
|
2100
2100
|
}), t.dirty());
|
|
2101
2101
|
const s = [...n.data].map((i, o) => {
|
|
2102
|
-
const
|
|
2103
|
-
return
|
|
2102
|
+
const f = this._def.items[o] || this._def.rest;
|
|
2103
|
+
return f ? f._parse(new Z(n, i, n.path, o)) : null;
|
|
2104
2104
|
}).filter((i) => !!i);
|
|
2105
2105
|
return n.common.async ? Promise.all(s).then((i) => O.mergeArray(t, i)) : O.mergeArray(t, s);
|
|
2106
2106
|
}
|
|
@@ -2108,23 +2108,23 @@ class z extends _ {
|
|
|
2108
2108
|
return this._def.items;
|
|
2109
2109
|
}
|
|
2110
2110
|
rest(e) {
|
|
2111
|
-
return new
|
|
2111
|
+
return new D({
|
|
2112
2112
|
...this._def,
|
|
2113
2113
|
rest: e
|
|
2114
2114
|
});
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
2117
|
-
|
|
2117
|
+
D.create = (a, e) => {
|
|
2118
2118
|
if (!Array.isArray(a))
|
|
2119
2119
|
throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
|
|
2120
|
-
return new
|
|
2120
|
+
return new D({
|
|
2121
2121
|
items: a,
|
|
2122
2122
|
typeName: y.ZodTuple,
|
|
2123
2123
|
rest: null,
|
|
2124
2124
|
...g(e)
|
|
2125
2125
|
});
|
|
2126
2126
|
};
|
|
2127
|
-
class te extends
|
|
2127
|
+
class te extends v {
|
|
2128
2128
|
get keySchema() {
|
|
2129
2129
|
return this._def.keyType;
|
|
2130
2130
|
}
|
|
@@ -2152,7 +2152,7 @@ class te extends _ {
|
|
|
2152
2152
|
return this._def.valueType;
|
|
2153
2153
|
}
|
|
2154
2154
|
static create(e, t, n) {
|
|
2155
|
-
return t instanceof
|
|
2155
|
+
return t instanceof v ? new te({
|
|
2156
2156
|
keyType: e,
|
|
2157
2157
|
valueType: t,
|
|
2158
2158
|
typeName: y.ZodRecord,
|
|
@@ -2165,7 +2165,7 @@ class te extends _ {
|
|
|
2165
2165
|
});
|
|
2166
2166
|
}
|
|
2167
2167
|
}
|
|
2168
|
-
class
|
|
2168
|
+
class Ne extends v {
|
|
2169
2169
|
get keySchema() {
|
|
2170
2170
|
return this._def.keyType;
|
|
2171
2171
|
}
|
|
@@ -2180,15 +2180,15 @@ class Ae extends _ {
|
|
|
2180
2180
|
expected: u.map,
|
|
2181
2181
|
received: n.parsedType
|
|
2182
2182
|
}), m;
|
|
2183
|
-
const r = this._def.keyType, s = this._def.valueType, i = [...n.data.entries()].map(([o,
|
|
2183
|
+
const r = this._def.keyType, s = this._def.valueType, i = [...n.data.entries()].map(([o, f], p) => ({
|
|
2184
2184
|
key: r._parse(new Z(n, o, n.path, [p, "key"])),
|
|
2185
|
-
value: s._parse(new Z(n,
|
|
2185
|
+
value: s._parse(new Z(n, f, n.path, [p, "value"]))
|
|
2186
2186
|
}));
|
|
2187
2187
|
if (n.common.async) {
|
|
2188
2188
|
const o = /* @__PURE__ */ new Map();
|
|
2189
2189
|
return Promise.resolve().then(async () => {
|
|
2190
|
-
for (const
|
|
2191
|
-
const p = await
|
|
2190
|
+
for (const f of i) {
|
|
2191
|
+
const p = await f.key, b = await f.value;
|
|
2192
2192
|
if (p.status === "aborted" || b.status === "aborted")
|
|
2193
2193
|
return m;
|
|
2194
2194
|
(p.status === "dirty" || b.status === "dirty") && t.dirty(), o.set(p.value, b.value);
|
|
@@ -2197,8 +2197,8 @@ class Ae extends _ {
|
|
|
2197
2197
|
});
|
|
2198
2198
|
} else {
|
|
2199
2199
|
const o = /* @__PURE__ */ new Map();
|
|
2200
|
-
for (const
|
|
2201
|
-
const p =
|
|
2200
|
+
for (const f of i) {
|
|
2201
|
+
const p = f.key, b = f.value;
|
|
2202
2202
|
if (p.status === "aborted" || b.status === "aborted")
|
|
2203
2203
|
return m;
|
|
2204
2204
|
(p.status === "dirty" || b.status === "dirty") && t.dirty(), o.set(p.value, b.value);
|
|
@@ -2207,13 +2207,13 @@ class Ae extends _ {
|
|
|
2207
2207
|
}
|
|
2208
2208
|
}
|
|
2209
2209
|
}
|
|
2210
|
-
|
|
2210
|
+
Ne.create = (a, e, t) => new Ne({
|
|
2211
2211
|
valueType: e,
|
|
2212
2212
|
keyType: a,
|
|
2213
2213
|
typeName: y.ZodMap,
|
|
2214
2214
|
...g(t)
|
|
2215
2215
|
});
|
|
2216
|
-
class
|
|
2216
|
+
class Y extends v {
|
|
2217
2217
|
_parse(e) {
|
|
2218
2218
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2219
2219
|
if (n.parsedType !== u.set)
|
|
@@ -2239,28 +2239,28 @@ class H extends _ {
|
|
|
2239
2239
|
message: r.maxSize.message
|
|
2240
2240
|
}), t.dirty());
|
|
2241
2241
|
const s = this._def.valueType;
|
|
2242
|
-
function i(
|
|
2242
|
+
function i(f) {
|
|
2243
2243
|
const p = /* @__PURE__ */ new Set();
|
|
2244
|
-
for (const b of
|
|
2244
|
+
for (const b of f) {
|
|
2245
2245
|
if (b.status === "aborted")
|
|
2246
2246
|
return m;
|
|
2247
2247
|
b.status === "dirty" && t.dirty(), p.add(b.value);
|
|
2248
2248
|
}
|
|
2249
2249
|
return { status: t.value, value: p };
|
|
2250
2250
|
}
|
|
2251
|
-
const o = [...n.data.values()].map((
|
|
2252
|
-
return n.common.async ? Promise.all(o).then((
|
|
2251
|
+
const o = [...n.data.values()].map((f, p) => s._parse(new Z(n, f, n.path, p)));
|
|
2252
|
+
return n.common.async ? Promise.all(o).then((f) => i(f)) : i(o);
|
|
2253
2253
|
}
|
|
2254
2254
|
min(e, t) {
|
|
2255
|
-
return new
|
|
2255
|
+
return new Y({
|
|
2256
2256
|
...this._def,
|
|
2257
|
-
minSize: { value: e, message:
|
|
2257
|
+
minSize: { value: e, message: h.toString(t) }
|
|
2258
2258
|
});
|
|
2259
2259
|
}
|
|
2260
2260
|
max(e, t) {
|
|
2261
|
-
return new
|
|
2261
|
+
return new Y({
|
|
2262
2262
|
...this._def,
|
|
2263
|
-
maxSize: { value: e, message:
|
|
2263
|
+
maxSize: { value: e, message: h.toString(t) }
|
|
2264
2264
|
});
|
|
2265
2265
|
}
|
|
2266
2266
|
size(e, t) {
|
|
@@ -2270,14 +2270,14 @@ class H extends _ {
|
|
|
2270
2270
|
return this.min(1, e);
|
|
2271
2271
|
}
|
|
2272
2272
|
}
|
|
2273
|
-
|
|
2273
|
+
Y.create = (a, e) => new Y({
|
|
2274
2274
|
valueType: a,
|
|
2275
2275
|
minSize: null,
|
|
2276
2276
|
maxSize: null,
|
|
2277
2277
|
typeName: y.ZodSet,
|
|
2278
2278
|
...g(e)
|
|
2279
2279
|
});
|
|
2280
|
-
class ye extends
|
|
2280
|
+
class ye extends v {
|
|
2281
2281
|
get schema() {
|
|
2282
2282
|
return this._def.getter();
|
|
2283
2283
|
}
|
|
@@ -2291,7 +2291,7 @@ ye.create = (a, e) => new ye({
|
|
|
2291
2291
|
typeName: y.ZodLazy,
|
|
2292
2292
|
...g(e)
|
|
2293
2293
|
});
|
|
2294
|
-
class ae extends
|
|
2294
|
+
class ae extends v {
|
|
2295
2295
|
_parse(e) {
|
|
2296
2296
|
if (e.data !== this._def.value) {
|
|
2297
2297
|
const t = this._getOrReturnCtx(e);
|
|
@@ -2312,14 +2312,14 @@ ae.create = (a, e) => new ae({
|
|
|
2312
2312
|
typeName: y.ZodLiteral,
|
|
2313
2313
|
...g(e)
|
|
2314
2314
|
});
|
|
2315
|
-
function
|
|
2316
|
-
return new
|
|
2315
|
+
function Ee(a, e) {
|
|
2316
|
+
return new z({
|
|
2317
2317
|
values: a,
|
|
2318
2318
|
typeName: y.ZodEnum,
|
|
2319
2319
|
...g(e)
|
|
2320
2320
|
});
|
|
2321
2321
|
}
|
|
2322
|
-
class
|
|
2322
|
+
class z extends v {
|
|
2323
2323
|
_parse(e) {
|
|
2324
2324
|
if (typeof e.data != "string") {
|
|
2325
2325
|
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
@@ -2337,7 +2337,7 @@ class D extends _ {
|
|
|
2337
2337
|
options: n
|
|
2338
2338
|
}), m;
|
|
2339
2339
|
}
|
|
2340
|
-
return
|
|
2340
|
+
return A(e.data);
|
|
2341
2341
|
}
|
|
2342
2342
|
get options() {
|
|
2343
2343
|
return this._def.values;
|
|
@@ -2361,20 +2361,20 @@ class D extends _ {
|
|
|
2361
2361
|
return e;
|
|
2362
2362
|
}
|
|
2363
2363
|
extract(e, t = this._def) {
|
|
2364
|
-
return
|
|
2364
|
+
return z.create(e, {
|
|
2365
2365
|
...this._def,
|
|
2366
2366
|
...t
|
|
2367
2367
|
});
|
|
2368
2368
|
}
|
|
2369
2369
|
exclude(e, t = this._def) {
|
|
2370
|
-
return
|
|
2370
|
+
return z.create(this.options.filter((n) => !e.includes(n)), {
|
|
2371
2371
|
...this._def,
|
|
2372
2372
|
...t
|
|
2373
2373
|
});
|
|
2374
2374
|
}
|
|
2375
2375
|
}
|
|
2376
|
-
|
|
2377
|
-
class ge extends
|
|
2376
|
+
z.create = Ee;
|
|
2377
|
+
class ge extends v {
|
|
2378
2378
|
_parse(e) {
|
|
2379
2379
|
const t = k.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
2380
2380
|
if (n.parsedType !== u.string && n.parsedType !== u.number) {
|
|
@@ -2393,7 +2393,7 @@ class ge extends _ {
|
|
|
2393
2393
|
options: r
|
|
2394
2394
|
}), m;
|
|
2395
2395
|
}
|
|
2396
|
-
return
|
|
2396
|
+
return A(e.data);
|
|
2397
2397
|
}
|
|
2398
2398
|
get enum() {
|
|
2399
2399
|
return this._def.values;
|
|
@@ -2404,7 +2404,7 @@ ge.create = (a, e) => new ge({
|
|
|
2404
2404
|
typeName: y.ZodNativeEnum,
|
|
2405
2405
|
...g(e)
|
|
2406
2406
|
});
|
|
2407
|
-
class ne extends
|
|
2407
|
+
class ne extends v {
|
|
2408
2408
|
unwrap() {
|
|
2409
2409
|
return this._def.type;
|
|
2410
2410
|
}
|
|
@@ -2417,7 +2417,7 @@ class ne extends _ {
|
|
|
2417
2417
|
received: t.parsedType
|
|
2418
2418
|
}), m;
|
|
2419
2419
|
const n = t.parsedType === u.promise ? t.data : Promise.resolve(t.data);
|
|
2420
|
-
return
|
|
2420
|
+
return A(n.then((r) => this._def.type.parseAsync(r, {
|
|
2421
2421
|
path: t.path,
|
|
2422
2422
|
errorMap: t.common.contextualErrorMap
|
|
2423
2423
|
})));
|
|
@@ -2428,7 +2428,7 @@ ne.create = (a, e) => new ne({
|
|
|
2428
2428
|
typeName: y.ZodPromise,
|
|
2429
2429
|
...g(e)
|
|
2430
2430
|
});
|
|
2431
|
-
class P extends
|
|
2431
|
+
class P extends v {
|
|
2432
2432
|
innerType() {
|
|
2433
2433
|
return this._def.schema;
|
|
2434
2434
|
}
|
|
@@ -2450,12 +2450,12 @@ class P extends _ {
|
|
|
2450
2450
|
return Promise.resolve(i).then(async (o) => {
|
|
2451
2451
|
if (t.value === "aborted")
|
|
2452
2452
|
return m;
|
|
2453
|
-
const
|
|
2453
|
+
const f = await this._def.schema._parseAsync({
|
|
2454
2454
|
data: o,
|
|
2455
2455
|
path: n.path,
|
|
2456
2456
|
parent: n
|
|
2457
2457
|
});
|
|
2458
|
-
return
|
|
2458
|
+
return f.status === "aborted" ? m : f.status === "dirty" || t.value === "dirty" ? H(f.value) : f;
|
|
2459
2459
|
});
|
|
2460
2460
|
{
|
|
2461
2461
|
if (t.value === "aborted")
|
|
@@ -2465,15 +2465,15 @@ class P extends _ {
|
|
|
2465
2465
|
path: n.path,
|
|
2466
2466
|
parent: n
|
|
2467
2467
|
});
|
|
2468
|
-
return o.status === "aborted" ? m : o.status === "dirty" || t.value === "dirty" ?
|
|
2468
|
+
return o.status === "aborted" ? m : o.status === "dirty" || t.value === "dirty" ? H(o.value) : o;
|
|
2469
2469
|
}
|
|
2470
2470
|
}
|
|
2471
2471
|
if (r.type === "refinement") {
|
|
2472
2472
|
const i = (o) => {
|
|
2473
|
-
const
|
|
2473
|
+
const f = r.refinement(o, s);
|
|
2474
2474
|
if (n.common.async)
|
|
2475
|
-
return Promise.resolve(
|
|
2476
|
-
if (
|
|
2475
|
+
return Promise.resolve(f);
|
|
2476
|
+
if (f instanceof Promise)
|
|
2477
2477
|
throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
2478
2478
|
return o;
|
|
2479
2479
|
};
|
|
@@ -2520,22 +2520,22 @@ P.createWithPreprocess = (a, e, t) => new P({
|
|
|
2520
2520
|
typeName: y.ZodEffects,
|
|
2521
2521
|
...g(t)
|
|
2522
2522
|
});
|
|
2523
|
-
class
|
|
2523
|
+
class E extends v {
|
|
2524
2524
|
_parse(e) {
|
|
2525
|
-
return this._getType(e) === u.undefined ?
|
|
2525
|
+
return this._getType(e) === u.undefined ? A(void 0) : this._def.innerType._parse(e);
|
|
2526
2526
|
}
|
|
2527
2527
|
unwrap() {
|
|
2528
2528
|
return this._def.innerType;
|
|
2529
2529
|
}
|
|
2530
2530
|
}
|
|
2531
|
-
|
|
2531
|
+
E.create = (a, e) => new E({
|
|
2532
2532
|
innerType: a,
|
|
2533
2533
|
typeName: y.ZodOptional,
|
|
2534
2534
|
...g(e)
|
|
2535
2535
|
});
|
|
2536
|
-
class F extends
|
|
2536
|
+
class F extends v {
|
|
2537
2537
|
_parse(e) {
|
|
2538
|
-
return this._getType(e) === u.null ?
|
|
2538
|
+
return this._getType(e) === u.null ? A(null) : this._def.innerType._parse(e);
|
|
2539
2539
|
}
|
|
2540
2540
|
unwrap() {
|
|
2541
2541
|
return this._def.innerType;
|
|
@@ -2546,7 +2546,7 @@ F.create = (a, e) => new F({
|
|
|
2546
2546
|
typeName: y.ZodNullable,
|
|
2547
2547
|
...g(e)
|
|
2548
2548
|
});
|
|
2549
|
-
class re extends
|
|
2549
|
+
class re extends v {
|
|
2550
2550
|
_parse(e) {
|
|
2551
2551
|
const { ctx: t } = this._processInputParams(e);
|
|
2552
2552
|
let n = t.data;
|
|
@@ -2566,7 +2566,7 @@ re.create = (a, e) => new re({
|
|
|
2566
2566
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
2567
2567
|
...g(e)
|
|
2568
2568
|
});
|
|
2569
|
-
class se extends
|
|
2569
|
+
class se extends v {
|
|
2570
2570
|
_parse(e) {
|
|
2571
2571
|
const { ctx: t } = this._processInputParams(e), n = {
|
|
2572
2572
|
...t,
|
|
@@ -2609,7 +2609,7 @@ se.create = (a, e) => new se({
|
|
|
2609
2609
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2610
2610
|
...g(e)
|
|
2611
2611
|
});
|
|
2612
|
-
class Ze extends
|
|
2612
|
+
class Ze extends v {
|
|
2613
2613
|
_parse(e) {
|
|
2614
2614
|
if (this._getType(e) !== u.nan) {
|
|
2615
2615
|
const n = this._getOrReturnCtx(e);
|
|
@@ -2626,7 +2626,7 @@ Ze.create = (a) => new Ze({
|
|
|
2626
2626
|
typeName: y.ZodNaN,
|
|
2627
2627
|
...g(a)
|
|
2628
2628
|
});
|
|
2629
|
-
class
|
|
2629
|
+
class Ie extends v {
|
|
2630
2630
|
_parse(e) {
|
|
2631
2631
|
const { ctx: t } = this._processInputParams(e), n = t.data;
|
|
2632
2632
|
return this._def.type._parse({
|
|
@@ -2639,7 +2639,7 @@ class Ee extends _ {
|
|
|
2639
2639
|
return this._def.type;
|
|
2640
2640
|
}
|
|
2641
2641
|
}
|
|
2642
|
-
class ve extends
|
|
2642
|
+
class ve extends v {
|
|
2643
2643
|
_parse(e) {
|
|
2644
2644
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2645
2645
|
if (n.common.async)
|
|
@@ -2649,7 +2649,7 @@ class ve extends _ {
|
|
|
2649
2649
|
path: n.path,
|
|
2650
2650
|
parent: n
|
|
2651
2651
|
});
|
|
2652
|
-
return s.status === "aborted" ? m : s.status === "dirty" ? (t.dirty(),
|
|
2652
|
+
return s.status === "aborted" ? m : s.status === "dirty" ? (t.dirty(), H(s.value)) : this._def.out._parseAsync({
|
|
2653
2653
|
data: s.value,
|
|
2654
2654
|
path: n.path,
|
|
2655
2655
|
parent: n
|
|
@@ -2679,7 +2679,7 @@ class ve extends _ {
|
|
|
2679
2679
|
});
|
|
2680
2680
|
}
|
|
2681
2681
|
}
|
|
2682
|
-
class ie extends
|
|
2682
|
+
class ie extends v {
|
|
2683
2683
|
_parse(e) {
|
|
2684
2684
|
const t = this._def.innerType._parse(e), n = (r) => (W(r) && (r.value = Object.freeze(r.value)), r);
|
|
2685
2685
|
return Q(t) ? t.then((r) => n(r)) : n(t);
|
|
@@ -2697,78 +2697,78 @@ var y;
|
|
|
2697
2697
|
(function(a) {
|
|
2698
2698
|
a.ZodString = "ZodString", a.ZodNumber = "ZodNumber", a.ZodNaN = "ZodNaN", a.ZodBigInt = "ZodBigInt", a.ZodBoolean = "ZodBoolean", a.ZodDate = "ZodDate", a.ZodSymbol = "ZodSymbol", a.ZodUndefined = "ZodUndefined", a.ZodNull = "ZodNull", a.ZodAny = "ZodAny", a.ZodUnknown = "ZodUnknown", a.ZodNever = "ZodNever", a.ZodVoid = "ZodVoid", a.ZodArray = "ZodArray", a.ZodObject = "ZodObject", a.ZodUnion = "ZodUnion", a.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", a.ZodIntersection = "ZodIntersection", a.ZodTuple = "ZodTuple", a.ZodRecord = "ZodRecord", a.ZodMap = "ZodMap", a.ZodSet = "ZodSet", a.ZodFunction = "ZodFunction", a.ZodLazy = "ZodLazy", a.ZodLiteral = "ZodLiteral", a.ZodEnum = "ZodEnum", a.ZodEffects = "ZodEffects", a.ZodNativeEnum = "ZodNativeEnum", a.ZodOptional = "ZodOptional", a.ZodNullable = "ZodNullable", a.ZodDefault = "ZodDefault", a.ZodCatch = "ZodCatch", a.ZodPromise = "ZodPromise", a.ZodBranded = "ZodBranded", a.ZodPipeline = "ZodPipeline", a.ZodReadonly = "ZodReadonly";
|
|
2699
2699
|
})(y || (y = {}));
|
|
2700
|
-
const
|
|
2700
|
+
const _ = j.create, d = q.create, x = ue.create, ut = pe.create;
|
|
2701
2701
|
L.create;
|
|
2702
|
-
const C =
|
|
2702
|
+
const C = N.create, S = T.create, xe = K.create, $e = _e.create;
|
|
2703
2703
|
ee.create;
|
|
2704
|
-
const
|
|
2704
|
+
const I = D.create, Me = te.create, V = ae.create, w = z.create;
|
|
2705
2705
|
ne.create;
|
|
2706
|
-
|
|
2706
|
+
E.create;
|
|
2707
2707
|
F.create;
|
|
2708
|
-
const
|
|
2708
|
+
const ht = P.createWithPreprocess, oe = w([
|
|
2709
2709
|
"Point",
|
|
2710
2710
|
"MultiPoint",
|
|
2711
2711
|
"LineString",
|
|
2712
2712
|
"MultiLineString",
|
|
2713
2713
|
"Polygon",
|
|
2714
2714
|
"MultiPolygon"
|
|
2715
|
-
]), Le = C(ut()), ke = (a) => xe([
|
|
2715
|
+
]), Le = C(ut()), ke = (a) => xe([_(), Le]).default(a), B = () => xe([_(), Le]).optional(), ft = S({
|
|
2716
2716
|
latitude: d().min(-90).max(90),
|
|
2717
2717
|
longitude: d().min(-180).max(180),
|
|
2718
2718
|
zoom: d().min(0).max(24),
|
|
2719
2719
|
pitch: d().min(0).max(85).default(0),
|
|
2720
2720
|
bearing: d().min(-180).max(180).default(0)
|
|
2721
2721
|
}), pt = S({
|
|
2722
|
-
id:
|
|
2723
|
-
url:
|
|
2724
|
-
label:
|
|
2725
|
-
tileMatrixSetId:
|
|
2722
|
+
id: _().min(1),
|
|
2723
|
+
url: _().url(),
|
|
2724
|
+
label: _().optional(),
|
|
2725
|
+
tileMatrixSetId: _().optional().default("WebMercatorQuad")
|
|
2726
2726
|
}), mt = S({
|
|
2727
2727
|
"fill-color": ke("#000000"),
|
|
2728
2728
|
"fill-opacity": d().min(0).max(1).default(1),
|
|
2729
|
-
"fill-outline-color":
|
|
2729
|
+
"fill-outline-color": B(),
|
|
2730
2730
|
"fill-antialias": x().optional(),
|
|
2731
|
-
"fill-translate":
|
|
2731
|
+
"fill-translate": I([d(), d()]).optional(),
|
|
2732
2732
|
"fill-translate-anchor": w(["map", "viewport"]).optional(),
|
|
2733
|
-
"fill-pattern":
|
|
2733
|
+
"fill-pattern": _().optional()
|
|
2734
2734
|
}), yt = S({
|
|
2735
2735
|
"line-color": ke("#000000"),
|
|
2736
2736
|
"line-width": d().min(0).default(1),
|
|
2737
2737
|
"line-opacity": d().min(0).max(1).default(1),
|
|
2738
2738
|
"line-dasharray": C(d()).optional(),
|
|
2739
|
-
"line-translate":
|
|
2739
|
+
"line-translate": I([d(), d()]).optional(),
|
|
2740
2740
|
"line-translate-anchor": w(["map", "viewport"]).optional(),
|
|
2741
2741
|
"line-gap-width": d().min(0).optional(),
|
|
2742
2742
|
"line-offset": d().optional(),
|
|
2743
2743
|
"line-blur": d().min(0).optional(),
|
|
2744
|
-
"line-pattern":
|
|
2745
|
-
"line-gradient":
|
|
2744
|
+
"line-pattern": _().optional(),
|
|
2745
|
+
"line-gradient": _().optional()
|
|
2746
2746
|
}), gt = S({
|
|
2747
2747
|
"circle-color": ke("#000000"),
|
|
2748
2748
|
"circle-radius": d().min(0).default(5),
|
|
2749
2749
|
"circle-opacity": d().min(0).max(1).default(1),
|
|
2750
|
-
"circle-stroke-color":
|
|
2750
|
+
"circle-stroke-color": B(),
|
|
2751
2751
|
"circle-stroke-width": d().min(0).optional(),
|
|
2752
2752
|
"circle-blur": d().min(0).optional(),
|
|
2753
|
-
"circle-translate":
|
|
2753
|
+
"circle-translate": I([d(), d()]).optional(),
|
|
2754
2754
|
"circle-translate-anchor": w(["map", "viewport"]).optional(),
|
|
2755
2755
|
"circle-pitch-scale": w(["map", "viewport"]).optional(),
|
|
2756
2756
|
"circle-pitch-alignment": w(["map", "viewport"]).optional(),
|
|
2757
2757
|
"circle-stroke-opacity": d().min(0).max(1).optional()
|
|
2758
2758
|
}), _t = S({
|
|
2759
2759
|
"icon-opacity": d().min(0).max(1).optional(),
|
|
2760
|
-
"icon-color":
|
|
2761
|
-
"icon-halo-color":
|
|
2760
|
+
"icon-color": B(),
|
|
2761
|
+
"icon-halo-color": B(),
|
|
2762
2762
|
"icon-halo-width": d().min(0).optional(),
|
|
2763
2763
|
"icon-halo-blur": d().min(0).optional(),
|
|
2764
|
-
"icon-translate":
|
|
2764
|
+
"icon-translate": I([d(), d()]).optional(),
|
|
2765
2765
|
"icon-translate-anchor": w(["map", "viewport"]).optional(),
|
|
2766
2766
|
"text-opacity": d().min(0).max(1).optional(),
|
|
2767
|
-
"text-color":
|
|
2768
|
-
"text-halo-color":
|
|
2767
|
+
"text-color": B(),
|
|
2768
|
+
"text-halo-color": B(),
|
|
2769
2769
|
"text-halo-width": d().min(0).optional(),
|
|
2770
2770
|
"text-halo-blur": d().min(0).optional(),
|
|
2771
|
-
"text-translate":
|
|
2771
|
+
"text-translate": I([d(), d()]).optional(),
|
|
2772
2772
|
"text-translate-anchor": w(["map", "viewport"]).optional()
|
|
2773
2773
|
}), vt = S({
|
|
2774
2774
|
"fill-sort-key": d().optional(),
|
|
@@ -2795,18 +2795,18 @@ const ft = P.createWithPreprocess, oe = w([
|
|
|
2795
2795
|
"icon-rotation-alignment": w(["map", "viewport", "auto"]).optional(),
|
|
2796
2796
|
"icon-size": d().min(0).optional(),
|
|
2797
2797
|
"icon-text-fit": w(["none", "width", "height", "both"]).optional(),
|
|
2798
|
-
"icon-text-fit-padding":
|
|
2799
|
-
"icon-image":
|
|
2798
|
+
"icon-text-fit-padding": I([d(), d(), d(), d()]).optional(),
|
|
2799
|
+
"icon-image": _().optional(),
|
|
2800
2800
|
"icon-rotate": d().optional(),
|
|
2801
2801
|
"icon-padding": d().min(0).optional(),
|
|
2802
2802
|
"icon-keep-upright": x().optional(),
|
|
2803
|
-
"icon-offset":
|
|
2803
|
+
"icon-offset": I([d(), d()]).optional(),
|
|
2804
2804
|
"icon-anchor": w(["center", "left", "right", "top", "bottom", "top-left", "top-right", "bottom-left", "bottom-right"]).optional(),
|
|
2805
2805
|
"icon-pitch-alignment": w(["map", "viewport", "auto"]).optional(),
|
|
2806
2806
|
"text-pitch-alignment": w(["map", "viewport", "auto"]).optional(),
|
|
2807
2807
|
"text-rotation-alignment": w(["map", "viewport", "viewport-glyph", "auto"]).optional(),
|
|
2808
|
-
"text-field":
|
|
2809
|
-
"text-font": C(
|
|
2808
|
+
"text-field": _().optional(),
|
|
2809
|
+
"text-font": C(_()).optional(),
|
|
2810
2810
|
"text-size": d().min(0).optional(),
|
|
2811
2811
|
"text-max-width": d().min(0).optional(),
|
|
2812
2812
|
"text-line-height": d().optional(),
|
|
@@ -2818,7 +2818,7 @@ const ft = P.createWithPreprocess, oe = w([
|
|
|
2818
2818
|
"text-padding": d().min(0).optional(),
|
|
2819
2819
|
"text-keep-upright": x().optional(),
|
|
2820
2820
|
"text-transform": w(["none", "uppercase", "lowercase"]).optional(),
|
|
2821
|
-
"text-offset":
|
|
2821
|
+
"text-offset": I([d(), d()]).optional(),
|
|
2822
2822
|
"text-allow-overlap": x().optional(),
|
|
2823
2823
|
"text-ignore-placement": x().optional(),
|
|
2824
2824
|
"text-optional": x().optional(),
|
|
@@ -2848,27 +2848,27 @@ const ft = P.createWithPreprocess, oe = w([
|
|
|
2848
2848
|
St,
|
|
2849
2849
|
Tt,
|
|
2850
2850
|
Ct
|
|
2851
|
-
]),
|
|
2852
|
-
label:
|
|
2853
|
-
color:
|
|
2851
|
+
]), At = S({
|
|
2852
|
+
label: _(),
|
|
2853
|
+
color: _(),
|
|
2854
2854
|
shape: w(["circle", "line", "square"]).optional()
|
|
2855
|
-
}),
|
|
2856
|
-
entries: C(
|
|
2855
|
+
}), Nt = S({
|
|
2856
|
+
entries: C(At).min(1),
|
|
2857
2857
|
displayMode: w(["categorical", "gradient", "simple"]).optional(),
|
|
2858
2858
|
showLabelsCollapsed: x().optional(),
|
|
2859
2859
|
showColorBar: x().optional(),
|
|
2860
2860
|
showDisclosureArrow: x().optional(),
|
|
2861
|
-
gradientProperty:
|
|
2861
|
+
gradientProperty: _().optional()
|
|
2862
2862
|
}), le = {
|
|
2863
|
-
property:
|
|
2864
|
-
label:
|
|
2865
|
-
placeholder:
|
|
2863
|
+
property: _().min(1),
|
|
2864
|
+
label: _(),
|
|
2865
|
+
placeholder: _().optional()
|
|
2866
2866
|
}, Zt = S({
|
|
2867
2867
|
...le,
|
|
2868
2868
|
type: V("text"),
|
|
2869
2869
|
autocomplete: x().default(!1),
|
|
2870
2870
|
prefetch: x().optional(),
|
|
2871
|
-
options: C(
|
|
2871
|
+
options: C(_()).optional(),
|
|
2872
2872
|
zoomTo: x().optional()
|
|
2873
2873
|
}), Rt = S({
|
|
2874
2874
|
...le,
|
|
@@ -2884,39 +2884,41 @@ const ft = P.createWithPreprocess, oe = w([
|
|
|
2884
2884
|
...le,
|
|
2885
2885
|
type: V("datetime"),
|
|
2886
2886
|
range: x().default(!1)
|
|
2887
|
-
}),
|
|
2887
|
+
}), Et = S({
|
|
2888
2888
|
...le,
|
|
2889
2889
|
type: V("select"),
|
|
2890
|
-
options: C(
|
|
2890
|
+
options: C(_()).optional(),
|
|
2891
2891
|
prefetch: x().optional(),
|
|
2892
2892
|
zoomTo: x().optional()
|
|
2893
|
-
}),
|
|
2893
|
+
}), It = $e("type", [
|
|
2894
2894
|
Zt,
|
|
2895
2895
|
Rt,
|
|
2896
2896
|
jt,
|
|
2897
|
-
|
|
2897
|
+
Et
|
|
2898
2898
|
]), $t = S({
|
|
2899
|
-
fields: C(
|
|
2899
|
+
fields: C(It).min(1)
|
|
2900
2900
|
}), Mt = S({
|
|
2901
|
-
label:
|
|
2901
|
+
label: _().optional(),
|
|
2902
2902
|
visible: x().optional().default(!0)
|
|
2903
|
-
}), Lt = Me(
|
|
2904
|
-
properties: Me(xe([
|
|
2905
|
-
bbox:
|
|
2906
|
-
datetime:
|
|
2903
|
+
}), Lt = Me(_(), Mt), Pt = S({
|
|
2904
|
+
properties: Me(xe([_(), d(), x(), C(_())])).optional(),
|
|
2905
|
+
bbox: I([d(), d(), d(), d()]).optional(),
|
|
2906
|
+
datetime: _().optional()
|
|
2907
2907
|
}), Vt = {
|
|
2908
|
-
id:
|
|
2909
|
-
sourceId:
|
|
2910
|
-
collection:
|
|
2911
|
-
label:
|
|
2908
|
+
id: _().min(1),
|
|
2909
|
+
sourceId: _().min(1),
|
|
2910
|
+
collection: _().min(1),
|
|
2911
|
+
label: _(),
|
|
2912
2912
|
visible: x().default(!0),
|
|
2913
2913
|
dataMode: w(["vector-tiles", "geojson"]),
|
|
2914
|
+
minZoom: d().min(0).max(24).optional(),
|
|
2915
|
+
maxZoom: d().min(0).max(24).optional(),
|
|
2914
2916
|
styles: C(Ot).optional(),
|
|
2915
|
-
legend:
|
|
2917
|
+
legend: Nt.optional(),
|
|
2916
2918
|
filters: Pt.optional(),
|
|
2917
2919
|
search: $t.optional(),
|
|
2918
2920
|
propertyDisplay: Lt.optional()
|
|
2919
|
-
},
|
|
2921
|
+
}, Dt = ht(
|
|
2920
2922
|
(a) => {
|
|
2921
2923
|
if (a && typeof a == "object" && "style" in a && !("styles" in a)) {
|
|
2922
2924
|
const { style: e, ...t } = a;
|
|
@@ -2925,15 +2927,15 @@ const ft = P.createWithPreprocess, oe = w([
|
|
|
2925
2927
|
return a;
|
|
2926
2928
|
},
|
|
2927
2929
|
S(Vt)
|
|
2928
|
-
),
|
|
2929
|
-
id:
|
|
2930
|
-
label:
|
|
2931
|
-
url:
|
|
2932
|
-
thumbnail:
|
|
2930
|
+
), zt = S({
|
|
2931
|
+
id: _().min(1),
|
|
2932
|
+
label: _(),
|
|
2933
|
+
url: _().url(),
|
|
2934
|
+
thumbnail: _().url().optional()
|
|
2933
2935
|
}), Ft = S({
|
|
2934
|
-
id:
|
|
2935
|
-
url:
|
|
2936
|
-
}),
|
|
2936
|
+
id: _().min(1),
|
|
2937
|
+
url: _().url()
|
|
2938
|
+
}), Ut = S({
|
|
2937
2939
|
showLayerPanel: x().default(!0),
|
|
2938
2940
|
showLegend: x().default(!0),
|
|
2939
2941
|
showBasemapSwitcher: x().default(!0),
|
|
@@ -2945,53 +2947,63 @@ const ft = P.createWithPreprocess, oe = w([
|
|
|
2945
2947
|
showLegendOpacity: x().default(!1),
|
|
2946
2948
|
showMeasureTool: x().default(!1),
|
|
2947
2949
|
showSelectionTool: x().default(!1)
|
|
2950
|
+
}), Wt = "#1e293b", Bt = S({
|
|
2951
|
+
headerTitle: _().optional(),
|
|
2952
|
+
headerColor: _().optional(),
|
|
2953
|
+
browserTitle: _().optional(),
|
|
2954
|
+
faviconDataUrl: _().optional(),
|
|
2955
|
+
logoDataUrl: _().optional(),
|
|
2956
|
+
logoHeight: d().int().min(16).max(200).optional()
|
|
2948
2957
|
}), Pe = S({
|
|
2949
2958
|
sources: C(pt).min(1),
|
|
2950
|
-
layers: C(
|
|
2951
|
-
basemaps: C(
|
|
2959
|
+
layers: C(Dt),
|
|
2960
|
+
basemaps: C(zt).min(1),
|
|
2952
2961
|
sprites: C(Ft).optional(),
|
|
2953
|
-
ui:
|
|
2954
|
-
initialView:
|
|
2962
|
+
ui: Ut.default({}),
|
|
2963
|
+
initialView: ft,
|
|
2964
|
+
branding: Bt.optional()
|
|
2955
2965
|
});
|
|
2956
|
-
function
|
|
2966
|
+
function qt(a) {
|
|
2957
2967
|
return Pe.parse(a);
|
|
2958
2968
|
}
|
|
2959
|
-
function
|
|
2969
|
+
function Jt(a) {
|
|
2960
2970
|
return Pe.safeParse(a);
|
|
2961
2971
|
}
|
|
2962
2972
|
export {
|
|
2963
|
-
|
|
2973
|
+
zt as B,
|
|
2964
2974
|
kt as C,
|
|
2965
|
-
|
|
2975
|
+
Wt as D,
|
|
2966
2976
|
vt as F,
|
|
2967
2977
|
oe as G,
|
|
2968
|
-
|
|
2978
|
+
Dt as L,
|
|
2969
2979
|
Pe as M,
|
|
2970
2980
|
Rt as N,
|
|
2971
2981
|
pt as O,
|
|
2972
2982
|
Lt as P,
|
|
2973
2983
|
$t as S,
|
|
2974
2984
|
Zt as T,
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2985
|
+
Ut as U,
|
|
2986
|
+
ft as V,
|
|
2987
|
+
Bt as a,
|
|
2988
|
+
gt as b,
|
|
2989
|
+
Tt as c,
|
|
2990
|
+
jt as d,
|
|
2991
|
+
mt as e,
|
|
2992
|
+
wt as f,
|
|
2993
|
+
Pt as g,
|
|
2994
|
+
Nt as h,
|
|
2995
|
+
At as i,
|
|
2996
|
+
xt as j,
|
|
2997
|
+
yt as k,
|
|
2998
|
+
St as l,
|
|
2999
|
+
Mt as m,
|
|
3000
|
+
It as n,
|
|
3001
|
+
Et as o,
|
|
3002
|
+
Ft as p,
|
|
3003
|
+
Ot as q,
|
|
3004
|
+
bt as r,
|
|
3005
|
+
Jt as s,
|
|
3006
|
+
_t as t,
|
|
3007
|
+
Ct as u,
|
|
3008
|
+
qt as v
|
|
2997
3009
|
};
|