@ogc-maps/storybook-components 0.6.2 → 0.7.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/{Legend-B6uIqOSw.js → Legend-DNjVLgsd.js} +20 -20
- package/dist/components/LayerEditor/LayerEditor.d.ts.map +1 -1
- package/dist/components/Legend/index.js +1 -1
- package/dist/{index-B4i0zJXf.js → index-RzZtWlUz.js} +259 -238
- package/dist/main.js +795 -723
- package/dist/schemas/__tests__/config.test.d.ts +2 -0
- package/dist/schemas/__tests__/config.test.d.ts.map +1 -0
- package/dist/schemas/config.d.ts +398 -313
- package/dist/schemas/config.d.ts.map +1 -1
- package/dist/schemas/index.js +1 -1
- 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 +19 -18
- package/dist/utils/__tests__/queryableHelpers.test.d.ts +2 -0
- package/dist/utils/__tests__/queryableHelpers.test.d.ts.map +1 -0
- package/dist/utils/queryableHelpers.d.ts +16 -2
- package/dist/utils/queryableHelpers.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -35,14 +35,14 @@ var x;
|
|
|
35
35
|
}
|
|
36
36
|
a.joinValues = n, a.jsonStringifyReplacer = (r, s) => typeof s == "bigint" ? s.toString() : s;
|
|
37
37
|
})(x || (x = {}));
|
|
38
|
-
var
|
|
38
|
+
var be;
|
|
39
39
|
(function(a) {
|
|
40
40
|
a.mergeShapes = (e, t) => ({
|
|
41
41
|
...e,
|
|
42
42
|
...t
|
|
43
43
|
// second overwrites first
|
|
44
44
|
});
|
|
45
|
-
})(
|
|
45
|
+
})(be || (be = {}));
|
|
46
46
|
const u = x.arrayToEnum([
|
|
47
47
|
"string",
|
|
48
48
|
"nan",
|
|
@@ -167,7 +167,7 @@ class $ extends Error {
|
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
$.create = (a) => new $(a);
|
|
170
|
-
const
|
|
170
|
+
const de = (a, e) => {
|
|
171
171
|
let t;
|
|
172
172
|
switch (a.code) {
|
|
173
173
|
case c.invalid_type:
|
|
@@ -223,11 +223,11 @@ const le = (a, e) => {
|
|
|
223
223
|
}
|
|
224
224
|
return { message: t };
|
|
225
225
|
};
|
|
226
|
-
let
|
|
227
|
-
function
|
|
228
|
-
return
|
|
226
|
+
let ze = de;
|
|
227
|
+
function De() {
|
|
228
|
+
return ze;
|
|
229
229
|
}
|
|
230
|
-
const
|
|
230
|
+
const Fe = (a) => {
|
|
231
231
|
const { data: e, path: t, errorMaps: n, issueData: r } = a, s = [...t, ...r.path || []], i = {
|
|
232
232
|
...r,
|
|
233
233
|
path: s
|
|
@@ -249,7 +249,7 @@ const De = (a) => {
|
|
|
249
249
|
};
|
|
250
250
|
};
|
|
251
251
|
function l(a, e) {
|
|
252
|
-
const t =
|
|
252
|
+
const t = De(), n = Fe({
|
|
253
253
|
issueData: e,
|
|
254
254
|
data: a.data,
|
|
255
255
|
path: a.path,
|
|
@@ -260,13 +260,13 @@ function l(a, e) {
|
|
|
260
260
|
// then schema-bound map if available
|
|
261
261
|
t,
|
|
262
262
|
// then global override map
|
|
263
|
-
t ===
|
|
263
|
+
t === de ? void 0 : de
|
|
264
264
|
// then global default map
|
|
265
265
|
].filter((r) => !!r)
|
|
266
266
|
});
|
|
267
267
|
a.common.issues.push(n);
|
|
268
268
|
}
|
|
269
|
-
class
|
|
269
|
+
class O {
|
|
270
270
|
constructor() {
|
|
271
271
|
this.value = "valid";
|
|
272
272
|
}
|
|
@@ -294,7 +294,7 @@ class C {
|
|
|
294
294
|
value: i
|
|
295
295
|
});
|
|
296
296
|
}
|
|
297
|
-
return
|
|
297
|
+
return O.mergeObjectSync(e, n);
|
|
298
298
|
}
|
|
299
299
|
static mergeObjectSync(e, t) {
|
|
300
300
|
const n = {};
|
|
@@ -309,7 +309,7 @@ class C {
|
|
|
309
309
|
}
|
|
310
310
|
const m = Object.freeze({
|
|
311
311
|
status: "aborted"
|
|
312
|
-
}),
|
|
312
|
+
}), G = (a) => ({ status: "dirty", value: a }), N = (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
313
|
var f;
|
|
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;
|
|
@@ -322,8 +322,8 @@ class Z {
|
|
|
322
322
|
return this._cachedPath.length || (Array.isArray(this._key) ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
const
|
|
326
|
-
if (
|
|
325
|
+
const Te = (a, e) => {
|
|
326
|
+
if (W(e))
|
|
327
327
|
return { success: !0, data: e.value };
|
|
328
328
|
if (!a.common.issues.length)
|
|
329
329
|
throw new Error("Validation failed but no issues detected.");
|
|
@@ -367,7 +367,7 @@ class _ {
|
|
|
367
367
|
}
|
|
368
368
|
_processInputParams(e) {
|
|
369
369
|
return {
|
|
370
|
-
status: new
|
|
370
|
+
status: new O(),
|
|
371
371
|
ctx: {
|
|
372
372
|
common: e.parent.common,
|
|
373
373
|
data: e.data,
|
|
@@ -407,7 +407,7 @@ class _ {
|
|
|
407
407
|
data: e,
|
|
408
408
|
parsedType: M(e)
|
|
409
409
|
}, r = this._parseSync({ data: e, path: n.path, parent: n });
|
|
410
|
-
return
|
|
410
|
+
return Te(n, r);
|
|
411
411
|
}
|
|
412
412
|
"~validate"(e) {
|
|
413
413
|
var n, r;
|
|
@@ -425,7 +425,7 @@ class _ {
|
|
|
425
425
|
if (!this["~standard"].async)
|
|
426
426
|
try {
|
|
427
427
|
const s = this._parseSync({ data: e, path: [], parent: t });
|
|
428
|
-
return
|
|
428
|
+
return W(s) ? {
|
|
429
429
|
value: s.value
|
|
430
430
|
} : {
|
|
431
431
|
issues: t.common.issues
|
|
@@ -436,7 +436,7 @@ class _ {
|
|
|
436
436
|
async: !0
|
|
437
437
|
};
|
|
438
438
|
}
|
|
439
|
-
return this._parseAsync({ data: e, path: [], parent: t }).then((s) =>
|
|
439
|
+
return this._parseAsync({ data: e, path: [], parent: t }).then((s) => W(s) ? {
|
|
440
440
|
value: s.value
|
|
441
441
|
} : {
|
|
442
442
|
issues: t.common.issues
|
|
@@ -461,7 +461,7 @@ class _ {
|
|
|
461
461
|
data: e,
|
|
462
462
|
parsedType: M(e)
|
|
463
463
|
}, r = this._parse({ data: e, path: n.path, parent: n }), s = await (Q(r) ? r : Promise.resolve(r));
|
|
464
|
-
return
|
|
464
|
+
return Te(n, s);
|
|
465
465
|
}
|
|
466
466
|
refine(e, t) {
|
|
467
467
|
const n = (r) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(r) : t;
|
|
@@ -477,7 +477,7 @@ class _ {
|
|
|
477
477
|
return this._refinement((n, r) => e(n) ? !0 : (r.addIssue(typeof t == "function" ? t(n, r) : t), !1));
|
|
478
478
|
}
|
|
479
479
|
_refinement(e) {
|
|
480
|
-
return new
|
|
480
|
+
return new P({
|
|
481
481
|
schema: this,
|
|
482
482
|
typeName: y.ZodEffects,
|
|
483
483
|
effect: { type: "refinement", refinement: e }
|
|
@@ -515,7 +515,7 @@ class _ {
|
|
|
515
515
|
return ee.create(this, e, this._def);
|
|
516
516
|
}
|
|
517
517
|
transform(e) {
|
|
518
|
-
return new
|
|
518
|
+
return new P({
|
|
519
519
|
...g(this._def),
|
|
520
520
|
schema: this,
|
|
521
521
|
typeName: y.ZodEffects,
|
|
@@ -532,7 +532,7 @@ class _ {
|
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
534
|
brand() {
|
|
535
|
-
return new
|
|
535
|
+
return new Ee({
|
|
536
536
|
typeName: y.ZodBranded,
|
|
537
537
|
type: this,
|
|
538
538
|
...g(this._def)
|
|
@@ -555,7 +555,7 @@ class _ {
|
|
|
555
555
|
});
|
|
556
556
|
}
|
|
557
557
|
pipe(e) {
|
|
558
|
-
return
|
|
558
|
+
return ve.create(this, e);
|
|
559
559
|
}
|
|
560
560
|
readonly() {
|
|
561
561
|
return ie.create(this);
|
|
@@ -567,28 +567,28 @@ class _ {
|
|
|
567
567
|
return this.safeParse(null).success;
|
|
568
568
|
}
|
|
569
569
|
}
|
|
570
|
-
const
|
|
571
|
-
let
|
|
572
|
-
const
|
|
573
|
-
function
|
|
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, Ge = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ye = /^[-+]?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)?)??$/, He = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Qe = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
571
|
+
let le;
|
|
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
|
+
function je(a) {
|
|
574
574
|
let e = "[0-5]\\d";
|
|
575
575
|
a.precision ? e = `${e}\\.\\d{${a.precision}}` : a.precision == null && (e = `${e}(\\.\\d+)?`);
|
|
576
576
|
const t = a.precision ? "+" : "?";
|
|
577
577
|
return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`;
|
|
578
578
|
}
|
|
579
|
-
function rt(a) {
|
|
580
|
-
return new RegExp(`^${Re(a)}$`);
|
|
581
|
-
}
|
|
582
579
|
function st(a) {
|
|
583
|
-
|
|
580
|
+
return new RegExp(`^${je(a)}$`);
|
|
581
|
+
}
|
|
582
|
+
function it(a) {
|
|
583
|
+
let e = `${Re}T${je(a)}`;
|
|
584
584
|
const t = [];
|
|
585
585
|
return t.push(a.local ? "Z?" : "Z"), a.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
586
586
|
}
|
|
587
|
-
function it(a, e) {
|
|
588
|
-
return !!((e === "v4" || !e) && Qe.test(a) || (e === "v6" || !e) && Ke.test(a));
|
|
589
|
-
}
|
|
590
587
|
function ot(a, e) {
|
|
591
|
-
|
|
588
|
+
return !!((e === "v4" || !e) && Xe.test(a) || (e === "v6" || !e) && et.test(a));
|
|
589
|
+
}
|
|
590
|
+
function ct(a, e) {
|
|
591
|
+
if (!Ge.test(a))
|
|
592
592
|
return !1;
|
|
593
593
|
try {
|
|
594
594
|
const [t] = a.split(".");
|
|
@@ -600,8 +600,8 @@ function ot(a, e) {
|
|
|
600
600
|
return !1;
|
|
601
601
|
}
|
|
602
602
|
}
|
|
603
|
-
function
|
|
604
|
-
return !!((e === "v4" || !e) &&
|
|
603
|
+
function lt(a, e) {
|
|
604
|
+
return !!((e === "v4" || !e) && Ke.test(a) || (e === "v6" || !e) && tt.test(a));
|
|
605
605
|
}
|
|
606
606
|
class j extends _ {
|
|
607
607
|
_parse(e) {
|
|
@@ -613,7 +613,7 @@ class j extends _ {
|
|
|
613
613
|
received: s.parsedType
|
|
614
614
|
}), m;
|
|
615
615
|
}
|
|
616
|
-
const n = new
|
|
616
|
+
const n = new O();
|
|
617
617
|
let r;
|
|
618
618
|
for (const s of this._def.checks)
|
|
619
619
|
if (s.kind === "min")
|
|
@@ -658,7 +658,7 @@ class j extends _ {
|
|
|
658
658
|
message: s.message
|
|
659
659
|
}), n.dirty());
|
|
660
660
|
else if (s.kind === "emoji")
|
|
661
|
-
|
|
661
|
+
le || (le = new RegExp(Qe, "u")), le.test(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
662
662
|
validation: "emoji",
|
|
663
663
|
code: c.invalid_string,
|
|
664
664
|
message: s.message
|
|
@@ -670,25 +670,25 @@ class j extends _ {
|
|
|
670
670
|
message: s.message
|
|
671
671
|
}), n.dirty());
|
|
672
672
|
else if (s.kind === "nanoid")
|
|
673
|
-
|
|
673
|
+
Je.test(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
674
674
|
validation: "nanoid",
|
|
675
675
|
code: c.invalid_string,
|
|
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), l(r, {
|
|
680
680
|
validation: "cuid",
|
|
681
681
|
code: c.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), l(r, {
|
|
686
686
|
validation: "cuid2",
|
|
687
687
|
code: c.invalid_string,
|
|
688
688
|
message: s.message
|
|
689
689
|
}), n.dirty());
|
|
690
690
|
else if (s.kind === "ulid")
|
|
691
|
-
|
|
691
|
+
We.test(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
692
692
|
validation: "ulid",
|
|
693
693
|
code: c.invalid_string,
|
|
694
694
|
message: s.message
|
|
@@ -719,15 +719,15 @@ class j extends _ {
|
|
|
719
719
|
code: c.invalid_string,
|
|
720
720
|
validation: { endsWith: s.value },
|
|
721
721
|
message: s.message
|
|
722
|
-
}), n.dirty()) : s.kind === "datetime" ?
|
|
722
|
+
}), n.dirty()) : s.kind === "datetime" ? it(s).test(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
723
723
|
code: c.invalid_string,
|
|
724
724
|
validation: "datetime",
|
|
725
725
|
message: s.message
|
|
726
|
-
}), n.dirty()) : s.kind === "date" ?
|
|
726
|
+
}), n.dirty()) : s.kind === "date" ? rt.test(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
727
727
|
code: c.invalid_string,
|
|
728
728
|
validation: "date",
|
|
729
729
|
message: s.message
|
|
730
|
-
}), n.dirty()) : s.kind === "time" ?
|
|
730
|
+
}), n.dirty()) : s.kind === "time" ? st(s).test(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
731
731
|
code: c.invalid_string,
|
|
732
732
|
validation: "time",
|
|
733
733
|
message: s.message
|
|
@@ -735,23 +735,23 @@ class j extends _ {
|
|
|
735
735
|
validation: "duration",
|
|
736
736
|
code: c.invalid_string,
|
|
737
737
|
message: s.message
|
|
738
|
-
}), n.dirty()) : s.kind === "ip" ?
|
|
738
|
+
}), n.dirty()) : s.kind === "ip" ? ot(e.data, s.version) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
739
739
|
validation: "ip",
|
|
740
740
|
code: c.invalid_string,
|
|
741
741
|
message: s.message
|
|
742
|
-
}), n.dirty()) : s.kind === "jwt" ?
|
|
742
|
+
}), n.dirty()) : s.kind === "jwt" ? ct(e.data, s.alg) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
743
743
|
validation: "jwt",
|
|
744
744
|
code: c.invalid_string,
|
|
745
745
|
message: s.message
|
|
746
|
-
}), n.dirty()) : s.kind === "cidr" ?
|
|
746
|
+
}), n.dirty()) : s.kind === "cidr" ? lt(e.data, s.version) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
747
747
|
validation: "cidr",
|
|
748
748
|
code: c.invalid_string,
|
|
749
749
|
message: s.message
|
|
750
|
-
}), n.dirty()) : s.kind === "base64" ?
|
|
750
|
+
}), n.dirty()) : s.kind === "base64" ? at.test(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
751
751
|
validation: "base64",
|
|
752
752
|
code: c.invalid_string,
|
|
753
753
|
message: s.message
|
|
754
|
-
}), n.dirty()) : s.kind === "base64url" ?
|
|
754
|
+
}), n.dirty()) : s.kind === "base64url" ? nt.test(e.data) || (r = this._getOrReturnCtx(e, r), l(r, {
|
|
755
755
|
validation: "base64url",
|
|
756
756
|
code: c.invalid_string,
|
|
757
757
|
message: s.message
|
|
@@ -986,11 +986,11 @@ j.create = (a) => new j({
|
|
|
986
986
|
coerce: (a == null ? void 0 : a.coerce) ?? !1,
|
|
987
987
|
...g(a)
|
|
988
988
|
});
|
|
989
|
-
function
|
|
989
|
+
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
|
|
993
|
+
class q extends _ {
|
|
994
994
|
constructor() {
|
|
995
995
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
996
996
|
}
|
|
@@ -1004,7 +1004,7 @@ class W extends _ {
|
|
|
1004
1004
|
}), m;
|
|
1005
1005
|
}
|
|
1006
1006
|
let n;
|
|
1007
|
-
const r = new
|
|
1007
|
+
const r = new O();
|
|
1008
1008
|
for (const s of this._def.checks)
|
|
1009
1009
|
s.kind === "int" ? x.isInteger(e.data) || (n = this._getOrReturnCtx(e, n), l(n, {
|
|
1010
1010
|
code: c.invalid_type,
|
|
@@ -1025,7 +1025,7 @@ class W extends _ {
|
|
|
1025
1025
|
inclusive: s.inclusive,
|
|
1026
1026
|
exact: !1,
|
|
1027
1027
|
message: s.message
|
|
1028
|
-
}), r.dirty()) : s.kind === "multipleOf" ?
|
|
1028
|
+
}), r.dirty()) : s.kind === "multipleOf" ? dt(e.data, s.value) !== 0 && (n = this._getOrReturnCtx(e, n), l(n, {
|
|
1029
1029
|
code: c.not_multiple_of,
|
|
1030
1030
|
multipleOf: s.value,
|
|
1031
1031
|
message: s.message
|
|
@@ -1048,7 +1048,7 @@ class W extends _ {
|
|
|
1048
1048
|
return this.setLimit("max", e, !1, f.toString(t));
|
|
1049
1049
|
}
|
|
1050
1050
|
setLimit(e, t, n, r) {
|
|
1051
|
-
return new
|
|
1051
|
+
return new q({
|
|
1052
1052
|
...this._def,
|
|
1053
1053
|
checks: [
|
|
1054
1054
|
...this._def.checks,
|
|
@@ -1062,7 +1062,7 @@ class W extends _ {
|
|
|
1062
1062
|
});
|
|
1063
1063
|
}
|
|
1064
1064
|
_addCheck(e) {
|
|
1065
|
-
return new
|
|
1065
|
+
return new q({
|
|
1066
1066
|
...this._def,
|
|
1067
1067
|
checks: [...this._def.checks, e]
|
|
1068
1068
|
});
|
|
@@ -1156,13 +1156,13 @@ class W extends _ {
|
|
|
1156
1156
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
1157
1157
|
}
|
|
1158
1158
|
}
|
|
1159
|
-
|
|
1159
|
+
q.create = (a) => new q({
|
|
1160
1160
|
checks: [],
|
|
1161
1161
|
typeName: y.ZodNumber,
|
|
1162
1162
|
coerce: (a == null ? void 0 : a.coerce) || !1,
|
|
1163
1163
|
...g(a)
|
|
1164
1164
|
});
|
|
1165
|
-
class
|
|
1165
|
+
class Y extends _ {
|
|
1166
1166
|
constructor() {
|
|
1167
1167
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
1168
1168
|
}
|
|
@@ -1176,7 +1176,7 @@ class H extends _ {
|
|
|
1176
1176
|
if (this._getType(e) !== u.bigint)
|
|
1177
1177
|
return this._getInvalidInput(e);
|
|
1178
1178
|
let n;
|
|
1179
|
-
const r = new
|
|
1179
|
+
const r = new O();
|
|
1180
1180
|
for (const s of this._def.checks)
|
|
1181
1181
|
s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (n = this._getOrReturnCtx(e, n), l(n, {
|
|
1182
1182
|
code: c.too_small,
|
|
@@ -1218,7 +1218,7 @@ class H extends _ {
|
|
|
1218
1218
|
return this.setLimit("max", e, !1, f.toString(t));
|
|
1219
1219
|
}
|
|
1220
1220
|
setLimit(e, t, n, r) {
|
|
1221
|
-
return new
|
|
1221
|
+
return new Y({
|
|
1222
1222
|
...this._def,
|
|
1223
1223
|
checks: [
|
|
1224
1224
|
...this._def.checks,
|
|
@@ -1232,7 +1232,7 @@ class H extends _ {
|
|
|
1232
1232
|
});
|
|
1233
1233
|
}
|
|
1234
1234
|
_addCheck(e) {
|
|
1235
|
-
return new
|
|
1235
|
+
return new Y({
|
|
1236
1236
|
...this._def,
|
|
1237
1237
|
checks: [...this._def.checks, e]
|
|
1238
1238
|
});
|
|
@@ -1289,13 +1289,13 @@ class H extends _ {
|
|
|
1289
1289
|
return e;
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
|
-
|
|
1292
|
+
Y.create = (a) => new Y({
|
|
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
|
|
1298
|
+
class ue extends _ {
|
|
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);
|
|
@@ -1308,7 +1308,7 @@ class de extends _ {
|
|
|
1308
1308
|
return N(e.data);
|
|
1309
1309
|
}
|
|
1310
1310
|
}
|
|
1311
|
-
|
|
1311
|
+
ue.create = (a) => new ue({
|
|
1312
1312
|
typeName: y.ZodBoolean,
|
|
1313
1313
|
coerce: (a == null ? void 0 : a.coerce) || !1,
|
|
1314
1314
|
...g(a)
|
|
@@ -1329,7 +1329,7 @@ class X extends _ {
|
|
|
1329
1329
|
code: c.invalid_date
|
|
1330
1330
|
}), m;
|
|
1331
1331
|
}
|
|
1332
|
-
const n = new
|
|
1332
|
+
const n = new O();
|
|
1333
1333
|
let r;
|
|
1334
1334
|
for (const s of this._def.checks)
|
|
1335
1335
|
s.kind === "min" ? e.data.getTime() < s.value && (r = this._getOrReturnCtx(e, r), l(r, {
|
|
@@ -1391,7 +1391,7 @@ X.create = (a) => new X({
|
|
|
1391
1391
|
typeName: y.ZodDate,
|
|
1392
1392
|
...g(a)
|
|
1393
1393
|
});
|
|
1394
|
-
class
|
|
1394
|
+
class Ce extends _ {
|
|
1395
1395
|
_parse(e) {
|
|
1396
1396
|
if (this._getType(e) !== u.symbol) {
|
|
1397
1397
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1404,11 +1404,11 @@ class Te extends _ {
|
|
|
1404
1404
|
return N(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 fe extends _ {
|
|
1412
1412
|
_parse(e) {
|
|
1413
1413
|
if (this._getType(e) !== u.undefined) {
|
|
1414
1414
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1421,11 +1421,11 @@ class ue extends _ {
|
|
|
1421
1421
|
return N(e.data);
|
|
1422
1422
|
}
|
|
1423
1423
|
}
|
|
1424
|
-
|
|
1424
|
+
fe.create = (a) => new fe({
|
|
1425
1425
|
typeName: y.ZodUndefined,
|
|
1426
1426
|
...g(a)
|
|
1427
1427
|
});
|
|
1428
|
-
class
|
|
1428
|
+
class he extends _ {
|
|
1429
1429
|
_parse(e) {
|
|
1430
1430
|
if (this._getType(e) !== u.null) {
|
|
1431
1431
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1438,11 +1438,11 @@ class fe extends _ {
|
|
|
1438
1438
|
return N(e.data);
|
|
1439
1439
|
}
|
|
1440
1440
|
}
|
|
1441
|
-
|
|
1441
|
+
he.create = (a) => new he({
|
|
1442
1442
|
typeName: y.ZodNull,
|
|
1443
1443
|
...g(a)
|
|
1444
1444
|
});
|
|
1445
|
-
class
|
|
1445
|
+
class Oe extends _ {
|
|
1446
1446
|
constructor() {
|
|
1447
1447
|
super(...arguments), this._any = !0;
|
|
1448
1448
|
}
|
|
@@ -1450,11 +1450,11 @@ class Ce extends _ {
|
|
|
1450
1450
|
return N(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
|
|
1457
|
+
class pe extends _ {
|
|
1458
1458
|
constructor() {
|
|
1459
1459
|
super(...arguments), this._unknown = !0;
|
|
1460
1460
|
}
|
|
@@ -1462,7 +1462,7 @@ class he extends _ {
|
|
|
1462
1462
|
return N(e.data);
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
|
-
|
|
1465
|
+
pe.create = (a) => new pe({
|
|
1466
1466
|
typeName: y.ZodUnknown,
|
|
1467
1467
|
...g(a)
|
|
1468
1468
|
});
|
|
@@ -1480,7 +1480,7 @@ L.create = (a) => new L({
|
|
|
1480
1480
|
typeName: y.ZodNever,
|
|
1481
1481
|
...g(a)
|
|
1482
1482
|
});
|
|
1483
|
-
class
|
|
1483
|
+
class Ne extends _ {
|
|
1484
1484
|
_parse(e) {
|
|
1485
1485
|
if (this._getType(e) !== u.undefined) {
|
|
1486
1486
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1493,7 +1493,7 @@ class Oe extends _ {
|
|
|
1493
1493
|
return N(e.data);
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
|
-
|
|
1496
|
+
Ne.create = (a) => new Ne({
|
|
1497
1497
|
typeName: y.ZodVoid,
|
|
1498
1498
|
...g(a)
|
|
1499
1499
|
});
|
|
@@ -1533,9 +1533,9 @@ class A extends _ {
|
|
|
1533
1533
|
exact: !1,
|
|
1534
1534
|
message: r.maxLength.message
|
|
1535
1535
|
}), n.dirty()), t.common.async)
|
|
1536
|
-
return Promise.all([...t.data].map((i, o) => r.type._parseAsync(new Z(t, i, t.path, o)))).then((i) =>
|
|
1536
|
+
return Promise.all([...t.data].map((i, o) => r.type._parseAsync(new Z(t, i, t.path, o)))).then((i) => O.mergeArray(n, i));
|
|
1537
1537
|
const s = [...t.data].map((i, o) => r.type._parseSync(new Z(t, i, t.path, o)));
|
|
1538
|
-
return
|
|
1538
|
+
return O.mergeArray(n, s);
|
|
1539
1539
|
}
|
|
1540
1540
|
get element() {
|
|
1541
1541
|
return this._def.type;
|
|
@@ -1584,7 +1584,7 @@ function U(a) {
|
|
|
1584
1584
|
} else return a instanceof A ? new A({
|
|
1585
1585
|
...a._def,
|
|
1586
1586
|
type: U(a.element)
|
|
1587
|
-
}) : a instanceof I ? I.create(U(a.unwrap())) : a instanceof F ? F.create(U(a.unwrap())) : a instanceof
|
|
1587
|
+
}) : a instanceof I ? I.create(U(a.unwrap())) : a instanceof F ? F.create(U(a.unwrap())) : a instanceof z ? z.create(a.items.map((e) => U(e))) : a;
|
|
1588
1588
|
}
|
|
1589
1589
|
class T extends _ {
|
|
1590
1590
|
constructor() {
|
|
@@ -1657,7 +1657,7 @@ class T extends _ {
|
|
|
1657
1657
|
});
|
|
1658
1658
|
}
|
|
1659
1659
|
return p;
|
|
1660
|
-
}).then((p) =>
|
|
1660
|
+
}).then((p) => O.mergeObjectSync(n, p)) : O.mergeObjectSync(n, h);
|
|
1661
1661
|
}
|
|
1662
1662
|
get shape() {
|
|
1663
1663
|
return this._def.shape();
|
|
@@ -1850,7 +1850,7 @@ class T extends _ {
|
|
|
1850
1850
|
});
|
|
1851
1851
|
}
|
|
1852
1852
|
keyof() {
|
|
1853
|
-
return
|
|
1853
|
+
return Ie(x.objectKeys(this.shape));
|
|
1854
1854
|
}
|
|
1855
1855
|
}
|
|
1856
1856
|
T.create = (a, e) => new T({
|
|
@@ -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
|
|
1951
|
-
class
|
|
1950
|
+
const R = (a) => a instanceof ye ? R(a.schema) : a instanceof P ? R(a.innerType()) : a instanceof ae ? [a.value] : a instanceof D ? a.options : a instanceof ge ? x.objectValues(a.enum) : a instanceof re ? R(a._def.innerType) : a instanceof fe ? [void 0] : a instanceof he ? [null] : a instanceof I ? [void 0, ...R(a.unwrap())] : a instanceof F ? [null, ...R(a.unwrap())] : a instanceof Ee || a instanceof ie ? R(a.unwrap()) : a instanceof se ? R(a._def.innerType) : [];
|
|
1951
|
+
class _e extends _ {
|
|
1952
1952
|
_parse(e) {
|
|
1953
1953
|
const { ctx: t } = this._processInputParams(e);
|
|
1954
1954
|
if (t.parsedType !== u.object)
|
|
@@ -2001,7 +2001,7 @@ class ge extends _ {
|
|
|
2001
2001
|
r.set(o, s);
|
|
2002
2002
|
}
|
|
2003
2003
|
}
|
|
2004
|
-
return new
|
|
2004
|
+
return new _e({
|
|
2005
2005
|
typeName: y.ZodDiscriminatedUnion,
|
|
2006
2006
|
discriminator: e,
|
|
2007
2007
|
options: t,
|
|
@@ -2010,14 +2010,14 @@ class ge extends _ {
|
|
|
2010
2010
|
});
|
|
2011
2011
|
}
|
|
2012
2012
|
}
|
|
2013
|
-
function
|
|
2013
|
+
function me(a, e) {
|
|
2014
2014
|
const t = M(a), n = M(e);
|
|
2015
2015
|
if (a === e)
|
|
2016
2016
|
return { valid: !0, data: a };
|
|
2017
2017
|
if (t === u.object && n === u.object) {
|
|
2018
2018
|
const r = x.objectKeys(e), s = x.objectKeys(a).filter((o) => r.indexOf(o) !== -1), i = { ...a, ...e };
|
|
2019
2019
|
for (const o of s) {
|
|
2020
|
-
const h =
|
|
2020
|
+
const h = me(a[o], e[o]);
|
|
2021
2021
|
if (!h.valid)
|
|
2022
2022
|
return { valid: !1 };
|
|
2023
2023
|
i[o] = h.data;
|
|
@@ -2028,7 +2028,7 @@ function pe(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], h =
|
|
2031
|
+
const i = a[s], o = e[s], h = me(i, o);
|
|
2032
2032
|
if (!h.valid)
|
|
2033
2033
|
return { valid: !1 };
|
|
2034
2034
|
r.push(h.data);
|
|
@@ -2039,10 +2039,10 @@ function pe(a, e) {
|
|
|
2039
2039
|
class ee extends _ {
|
|
2040
2040
|
_parse(e) {
|
|
2041
2041
|
const { status: t, ctx: n } = this._processInputParams(e), r = (s, i) => {
|
|
2042
|
-
if (
|
|
2042
|
+
if (we(s) || we(i))
|
|
2043
2043
|
return m;
|
|
2044
|
-
const o =
|
|
2045
|
-
return o.valid ? ((
|
|
2044
|
+
const o = me(s.value, i.value);
|
|
2045
|
+
return o.valid ? ((Se(s) || Se(i)) && t.dirty(), { status: t.value, value: o.data }) : (l(n, {
|
|
2046
2046
|
code: c.invalid_intersection_types
|
|
2047
2047
|
}), m);
|
|
2048
2048
|
};
|
|
@@ -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 z extends _ {
|
|
2078
2078
|
_parse(e) {
|
|
2079
2079
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2080
2080
|
if (n.parsedType !== u.array)
|
|
@@ -2102,22 +2102,22 @@ class P extends _ {
|
|
|
2102
2102
|
const h = this._def.items[o] || this._def.rest;
|
|
2103
2103
|
return h ? h._parse(new Z(n, i, n.path, o)) : null;
|
|
2104
2104
|
}).filter((i) => !!i);
|
|
2105
|
-
return n.common.async ? Promise.all(s).then((i) =>
|
|
2105
|
+
return n.common.async ? Promise.all(s).then((i) => O.mergeArray(t, i)) : O.mergeArray(t, s);
|
|
2106
2106
|
}
|
|
2107
2107
|
get items() {
|
|
2108
2108
|
return this._def.items;
|
|
2109
2109
|
}
|
|
2110
2110
|
rest(e) {
|
|
2111
|
-
return new
|
|
2111
|
+
return new z({
|
|
2112
2112
|
...this._def,
|
|
2113
2113
|
rest: e
|
|
2114
2114
|
});
|
|
2115
2115
|
}
|
|
2116
2116
|
}
|
|
2117
|
-
|
|
2117
|
+
z.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 z({
|
|
2121
2121
|
items: a,
|
|
2122
2122
|
typeName: y.ZodTuple,
|
|
2123
2123
|
rest: null,
|
|
@@ -2146,7 +2146,7 @@ class te extends _ {
|
|
|
2146
2146
|
value: i._parse(new Z(n, n.data[o], n.path, o)),
|
|
2147
2147
|
alwaysSet: o in n.data
|
|
2148
2148
|
});
|
|
2149
|
-
return n.common.async ?
|
|
2149
|
+
return n.common.async ? O.mergeObjectAsync(t, r) : O.mergeObjectSync(t, r);
|
|
2150
2150
|
}
|
|
2151
2151
|
get element() {
|
|
2152
2152
|
return this._def.valueType;
|
|
@@ -2165,7 +2165,7 @@ class te extends _ {
|
|
|
2165
2165
|
});
|
|
2166
2166
|
}
|
|
2167
2167
|
}
|
|
2168
|
-
class
|
|
2168
|
+
class Ae extends _ {
|
|
2169
2169
|
get keySchema() {
|
|
2170
2170
|
return this._def.keyType;
|
|
2171
2171
|
}
|
|
@@ -2207,13 +2207,13 @@ class Ne extends _ {
|
|
|
2207
2207
|
}
|
|
2208
2208
|
}
|
|
2209
2209
|
}
|
|
2210
|
-
|
|
2210
|
+
Ae.create = (a, e, t) => new Ae({
|
|
2211
2211
|
valueType: e,
|
|
2212
2212
|
keyType: a,
|
|
2213
2213
|
typeName: y.ZodMap,
|
|
2214
2214
|
...g(t)
|
|
2215
2215
|
});
|
|
2216
|
-
class
|
|
2216
|
+
class H extends _ {
|
|
2217
2217
|
_parse(e) {
|
|
2218
2218
|
const { status: t, ctx: n } = this._processInputParams(e);
|
|
2219
2219
|
if (n.parsedType !== u.set)
|
|
@@ -2252,13 +2252,13 @@ class G extends _ {
|
|
|
2252
2252
|
return n.common.async ? Promise.all(o).then((h) => i(h)) : i(o);
|
|
2253
2253
|
}
|
|
2254
2254
|
min(e, t) {
|
|
2255
|
-
return new
|
|
2255
|
+
return new H({
|
|
2256
2256
|
...this._def,
|
|
2257
2257
|
minSize: { value: e, message: f.toString(t) }
|
|
2258
2258
|
});
|
|
2259
2259
|
}
|
|
2260
2260
|
max(e, t) {
|
|
2261
|
-
return new
|
|
2261
|
+
return new H({
|
|
2262
2262
|
...this._def,
|
|
2263
2263
|
maxSize: { value: e, message: f.toString(t) }
|
|
2264
2264
|
});
|
|
@@ -2270,14 +2270,14 @@ class G extends _ {
|
|
|
2270
2270
|
return this.min(1, e);
|
|
2271
2271
|
}
|
|
2272
2272
|
}
|
|
2273
|
-
|
|
2273
|
+
H.create = (a, e) => new H({
|
|
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
|
|
2280
|
+
class ye extends _ {
|
|
2281
2281
|
get schema() {
|
|
2282
2282
|
return this._def.getter();
|
|
2283
2283
|
}
|
|
@@ -2286,7 +2286,7 @@ class me extends _ {
|
|
|
2286
2286
|
return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
|
|
2287
2287
|
}
|
|
2288
2288
|
}
|
|
2289
|
-
|
|
2289
|
+
ye.create = (a, e) => new ye({
|
|
2290
2290
|
getter: a,
|
|
2291
2291
|
typeName: y.ZodLazy,
|
|
2292
2292
|
...g(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 Ie(a, e) {
|
|
2316
|
+
return new D({
|
|
2317
2317
|
values: a,
|
|
2318
2318
|
typeName: y.ZodEnum,
|
|
2319
2319
|
...g(e)
|
|
2320
2320
|
});
|
|
2321
2321
|
}
|
|
2322
|
-
class
|
|
2322
|
+
class D extends _ {
|
|
2323
2323
|
_parse(e) {
|
|
2324
2324
|
if (typeof e.data != "string") {
|
|
2325
2325
|
const t = this._getOrReturnCtx(e), n = this._def.values;
|
|
@@ -2361,20 +2361,20 @@ class z extends _ {
|
|
|
2361
2361
|
return e;
|
|
2362
2362
|
}
|
|
2363
2363
|
extract(e, t = this._def) {
|
|
2364
|
-
return
|
|
2364
|
+
return D.create(e, {
|
|
2365
2365
|
...this._def,
|
|
2366
2366
|
...t
|
|
2367
2367
|
});
|
|
2368
2368
|
}
|
|
2369
2369
|
exclude(e, t = this._def) {
|
|
2370
|
-
return
|
|
2370
|
+
return D.create(this.options.filter((n) => !e.includes(n)), {
|
|
2371
2371
|
...this._def,
|
|
2372
2372
|
...t
|
|
2373
2373
|
});
|
|
2374
2374
|
}
|
|
2375
2375
|
}
|
|
2376
|
-
|
|
2377
|
-
class
|
|
2376
|
+
D.create = Ie;
|
|
2377
|
+
class ge extends _ {
|
|
2378
2378
|
_parse(e) {
|
|
2379
2379
|
const t = x.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
2380
2380
|
if (n.parsedType !== u.string && n.parsedType !== u.number) {
|
|
@@ -2399,7 +2399,7 @@ class ye extends _ {
|
|
|
2399
2399
|
return this._def.values;
|
|
2400
2400
|
}
|
|
2401
2401
|
}
|
|
2402
|
-
|
|
2402
|
+
ge.create = (a, e) => new ge({
|
|
2403
2403
|
values: a,
|
|
2404
2404
|
typeName: y.ZodNativeEnum,
|
|
2405
2405
|
...g(e)
|
|
@@ -2428,7 +2428,7 @@ ne.create = (a, e) => new ne({
|
|
|
2428
2428
|
typeName: y.ZodPromise,
|
|
2429
2429
|
...g(e)
|
|
2430
2430
|
});
|
|
2431
|
-
class
|
|
2431
|
+
class P extends _ {
|
|
2432
2432
|
innerType() {
|
|
2433
2433
|
return this._def.schema;
|
|
2434
2434
|
}
|
|
@@ -2455,7 +2455,7 @@ class D extends _ {
|
|
|
2455
2455
|
path: n.path,
|
|
2456
2456
|
parent: n
|
|
2457
2457
|
});
|
|
2458
|
-
return h.status === "aborted" ? m : h.status === "dirty" || t.value === "dirty" ?
|
|
2458
|
+
return h.status === "aborted" ? m : h.status === "dirty" || t.value === "dirty" ? G(h.value) : h;
|
|
2459
2459
|
});
|
|
2460
2460
|
{
|
|
2461
2461
|
if (t.value === "aborted")
|
|
@@ -2465,7 +2465,7 @@ class D 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" ? G(o.value) : o;
|
|
2469
2469
|
}
|
|
2470
2470
|
}
|
|
2471
2471
|
if (r.type === "refinement") {
|
|
@@ -2494,27 +2494,27 @@ class D extends _ {
|
|
|
2494
2494
|
path: n.path,
|
|
2495
2495
|
parent: n
|
|
2496
2496
|
});
|
|
2497
|
-
if (!
|
|
2497
|
+
if (!W(i))
|
|
2498
2498
|
return m;
|
|
2499
2499
|
const o = r.transform(i.value, s);
|
|
2500
2500
|
if (o instanceof Promise)
|
|
2501
2501
|
throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");
|
|
2502
2502
|
return { status: t.value, value: o };
|
|
2503
2503
|
} else
|
|
2504
|
-
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((i) =>
|
|
2504
|
+
return this._def.schema._parseAsync({ data: n.data, path: n.path, parent: n }).then((i) => W(i) ? Promise.resolve(r.transform(i.value, s)).then((o) => ({
|
|
2505
2505
|
status: t.value,
|
|
2506
2506
|
value: o
|
|
2507
2507
|
})) : m);
|
|
2508
2508
|
x.assertNever(r);
|
|
2509
2509
|
}
|
|
2510
2510
|
}
|
|
2511
|
-
|
|
2511
|
+
P.create = (a, e, t) => new P({
|
|
2512
2512
|
schema: a,
|
|
2513
2513
|
typeName: y.ZodEffects,
|
|
2514
2514
|
effect: e,
|
|
2515
2515
|
...g(t)
|
|
2516
2516
|
});
|
|
2517
|
-
|
|
2517
|
+
P.createWithPreprocess = (a, e, t) => new P({
|
|
2518
2518
|
schema: e,
|
|
2519
2519
|
effect: { type: "preprocess", transform: a },
|
|
2520
2520
|
typeName: y.ZodEffects,
|
|
@@ -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
|
|
2612
|
+
class Ze extends _ {
|
|
2613
2613
|
_parse(e) {
|
|
2614
2614
|
if (this._getType(e) !== u.nan) {
|
|
2615
2615
|
const n = this._getOrReturnCtx(e);
|
|
@@ -2622,11 +2622,11 @@ class Ae extends _ {
|
|
|
2622
2622
|
return { status: "valid", value: e.data };
|
|
2623
2623
|
}
|
|
2624
2624
|
}
|
|
2625
|
-
|
|
2625
|
+
Ze.create = (a) => new Ze({
|
|
2626
2626
|
typeName: y.ZodNaN,
|
|
2627
2627
|
...g(a)
|
|
2628
2628
|
});
|
|
2629
|
-
class
|
|
2629
|
+
class Ee extends _ {
|
|
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 Ie extends _ {
|
|
|
2639
2639
|
return this._def.type;
|
|
2640
2640
|
}
|
|
2641
2641
|
}
|
|
2642
|
-
class
|
|
2642
|
+
class ve extends _ {
|
|
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 _e 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(), G(s.value)) : this._def.out._parseAsync({
|
|
2653
2653
|
data: s.value,
|
|
2654
2654
|
path: n.path,
|
|
2655
2655
|
parent: n
|
|
@@ -2672,7 +2672,7 @@ class _e extends _ {
|
|
|
2672
2672
|
}
|
|
2673
2673
|
}
|
|
2674
2674
|
static create(e, t) {
|
|
2675
|
-
return new
|
|
2675
|
+
return new ve({
|
|
2676
2676
|
in: e,
|
|
2677
2677
|
out: t,
|
|
2678
2678
|
typeName: y.ZodPipeline
|
|
@@ -2681,7 +2681,7 @@ class _e extends _ {
|
|
|
2681
2681
|
}
|
|
2682
2682
|
class ie extends _ {
|
|
2683
2683
|
_parse(e) {
|
|
2684
|
-
const t = this._def.innerType._parse(e), n = (r) => (
|
|
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);
|
|
2686
2686
|
}
|
|
2687
2687
|
unwrap() {
|
|
@@ -2697,38 +2697,45 @@ 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 v = j.create, d =
|
|
2700
|
+
const v = j.create, d = q.create, S = ue.create, ut = pe.create;
|
|
2701
2701
|
L.create;
|
|
2702
|
-
const
|
|
2702
|
+
const C = A.create, w = T.create, xe = K.create, $e = _e.create;
|
|
2703
2703
|
ee.create;
|
|
2704
|
-
const E =
|
|
2704
|
+
const E = z.create, Me = te.create, V = ae.create, b = D.create;
|
|
2705
2705
|
ne.create;
|
|
2706
2706
|
I.create;
|
|
2707
2707
|
F.create;
|
|
2708
|
-
const
|
|
2708
|
+
const ft = P.createWithPreprocess, oe = b([
|
|
2709
|
+
"Point",
|
|
2710
|
+
"MultiPoint",
|
|
2711
|
+
"LineString",
|
|
2712
|
+
"MultiLineString",
|
|
2713
|
+
"Polygon",
|
|
2714
|
+
"MultiPolygon"
|
|
2715
|
+
]), Le = C(ut()), ke = (a) => xe([v(), Le]).default(a), B = () => xe([v(), Le]).optional(), ht = w({
|
|
2709
2716
|
latitude: d().min(-90).max(90),
|
|
2710
2717
|
longitude: d().min(-180).max(180),
|
|
2711
2718
|
zoom: d().min(0).max(24),
|
|
2712
2719
|
pitch: d().min(0).max(85).default(0),
|
|
2713
2720
|
bearing: d().min(-180).max(180).default(0)
|
|
2714
|
-
}),
|
|
2721
|
+
}), pt = w({
|
|
2715
2722
|
id: v().min(1),
|
|
2716
2723
|
url: v().url(),
|
|
2717
2724
|
label: v().optional(),
|
|
2718
2725
|
tileMatrixSetId: v().optional().default("WebMercatorQuad")
|
|
2719
|
-
}),
|
|
2720
|
-
"fill-color":
|
|
2726
|
+
}), mt = w({
|
|
2727
|
+
"fill-color": ke("#000000"),
|
|
2721
2728
|
"fill-opacity": d().min(0).max(1).default(1),
|
|
2722
2729
|
"fill-outline-color": B(),
|
|
2723
2730
|
"fill-antialias": S().optional(),
|
|
2724
2731
|
"fill-translate": E([d(), d()]).optional(),
|
|
2725
2732
|
"fill-translate-anchor": b(["map", "viewport"]).optional(),
|
|
2726
2733
|
"fill-pattern": v().optional()
|
|
2727
|
-
}),
|
|
2728
|
-
"line-color":
|
|
2734
|
+
}), yt = w({
|
|
2735
|
+
"line-color": ke("#000000"),
|
|
2729
2736
|
"line-width": d().min(0).default(1),
|
|
2730
2737
|
"line-opacity": d().min(0).max(1).default(1),
|
|
2731
|
-
"line-dasharray":
|
|
2738
|
+
"line-dasharray": C(d()).optional(),
|
|
2732
2739
|
"line-translate": E([d(), d()]).optional(),
|
|
2733
2740
|
"line-translate-anchor": b(["map", "viewport"]).optional(),
|
|
2734
2741
|
"line-gap-width": d().min(0).optional(),
|
|
@@ -2736,8 +2743,8 @@ const Me = O(dt()), xe = (a) => ve([v(), Me]).default(a), B = () => ve([v(), Me]
|
|
|
2736
2743
|
"line-blur": d().min(0).optional(),
|
|
2737
2744
|
"line-pattern": v().optional(),
|
|
2738
2745
|
"line-gradient": v().optional()
|
|
2739
|
-
}),
|
|
2740
|
-
"circle-color":
|
|
2746
|
+
}), gt = w({
|
|
2747
|
+
"circle-color": ke("#000000"),
|
|
2741
2748
|
"circle-radius": d().min(0).default(5),
|
|
2742
2749
|
"circle-opacity": d().min(0).max(1).default(1),
|
|
2743
2750
|
"circle-stroke-color": B(),
|
|
@@ -2748,7 +2755,7 @@ const Me = O(dt()), xe = (a) => ve([v(), Me]).default(a), B = () => ve([v(), Me]
|
|
|
2748
2755
|
"circle-pitch-scale": b(["map", "viewport"]).optional(),
|
|
2749
2756
|
"circle-pitch-alignment": b(["map", "viewport"]).optional(),
|
|
2750
2757
|
"circle-stroke-opacity": d().min(0).max(1).optional()
|
|
2751
|
-
}),
|
|
2758
|
+
}), _t = w({
|
|
2752
2759
|
"icon-opacity": d().min(0).max(1).optional(),
|
|
2753
2760
|
"icon-color": B(),
|
|
2754
2761
|
"icon-halo-color": B(),
|
|
@@ -2763,20 +2770,20 @@ const Me = O(dt()), xe = (a) => ve([v(), Me]).default(a), B = () => ve([v(), Me]
|
|
|
2763
2770
|
"text-halo-blur": d().min(0).optional(),
|
|
2764
2771
|
"text-translate": E([d(), d()]).optional(),
|
|
2765
2772
|
"text-translate-anchor": b(["map", "viewport"]).optional()
|
|
2766
|
-
}),
|
|
2773
|
+
}), vt = w({
|
|
2767
2774
|
"fill-sort-key": d().optional(),
|
|
2768
2775
|
visibility: b(["visible", "none"]).optional()
|
|
2769
|
-
}),
|
|
2776
|
+
}), xt = w({
|
|
2770
2777
|
"line-cap": b(["butt", "round", "square"]).optional(),
|
|
2771
2778
|
"line-join": b(["bevel", "round", "miter"]).optional(),
|
|
2772
2779
|
"line-miter-limit": d().optional(),
|
|
2773
2780
|
"line-round-limit": d().optional(),
|
|
2774
2781
|
"line-sort-key": d().optional(),
|
|
2775
2782
|
visibility: b(["visible", "none"]).optional()
|
|
2776
|
-
}),
|
|
2783
|
+
}), kt = w({
|
|
2777
2784
|
"circle-sort-key": d().optional(),
|
|
2778
2785
|
visibility: b(["visible", "none"]).optional()
|
|
2779
|
-
}),
|
|
2786
|
+
}), bt = w({
|
|
2780
2787
|
"symbol-placement": b(["point", "line", "line-center"]).optional(),
|
|
2781
2788
|
"symbol-spacing": d().min(1).optional(),
|
|
2782
2789
|
"symbol-avoid-edges": S().optional(),
|
|
@@ -2799,7 +2806,7 @@ const Me = O(dt()), xe = (a) => ve([v(), Me]).default(a), B = () => ve([v(), Me]
|
|
|
2799
2806
|
"text-pitch-alignment": b(["map", "viewport", "auto"]).optional(),
|
|
2800
2807
|
"text-rotation-alignment": b(["map", "viewport", "viewport-glyph", "auto"]).optional(),
|
|
2801
2808
|
"text-field": v().optional(),
|
|
2802
|
-
"text-font":
|
|
2809
|
+
"text-font": C(v()).optional(),
|
|
2803
2810
|
"text-size": d().min(0).optional(),
|
|
2804
2811
|
"text-max-width": d().min(0).optional(),
|
|
2805
2812
|
"text-line-height": d().optional(),
|
|
@@ -2816,98 +2823,111 @@ const Me = O(dt()), xe = (a) => ve([v(), Me]).default(a), B = () => ve([v(), Me]
|
|
|
2816
2823
|
"text-ignore-placement": S().optional(),
|
|
2817
2824
|
"text-optional": S().optional(),
|
|
2818
2825
|
visibility: b(["visible", "none"]).optional()
|
|
2819
|
-
}), kt = w({
|
|
2820
|
-
type: V("fill"),
|
|
2821
|
-
paint: ht,
|
|
2822
|
-
layout: gt.optional()
|
|
2823
|
-
}), bt = w({
|
|
2824
|
-
type: V("line"),
|
|
2825
|
-
paint: pt,
|
|
2826
|
-
layout: _t.optional()
|
|
2827
2826
|
}), wt = w({
|
|
2828
|
-
type: V("
|
|
2827
|
+
type: V("fill"),
|
|
2829
2828
|
paint: mt,
|
|
2830
|
-
layout: vt.optional()
|
|
2829
|
+
layout: vt.optional(),
|
|
2830
|
+
geometryFilter: C(oe).optional()
|
|
2831
2831
|
}), St = w({
|
|
2832
|
-
type: V("
|
|
2832
|
+
type: V("line"),
|
|
2833
2833
|
paint: yt,
|
|
2834
|
-
layout: xt.optional()
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2834
|
+
layout: xt.optional(),
|
|
2835
|
+
geometryFilter: C(oe).optional()
|
|
2836
|
+
}), Tt = w({
|
|
2837
|
+
type: V("circle"),
|
|
2838
|
+
paint: gt,
|
|
2839
|
+
layout: kt.optional(),
|
|
2840
|
+
geometryFilter: C(oe).optional()
|
|
2841
|
+
}), Ct = w({
|
|
2842
|
+
type: V("symbol"),
|
|
2843
|
+
paint: _t,
|
|
2844
|
+
layout: bt.optional(),
|
|
2845
|
+
geometryFilter: C(oe).optional()
|
|
2846
|
+
}), Ot = $e("type", [
|
|
2838
2847
|
wt,
|
|
2839
|
-
St
|
|
2840
|
-
|
|
2848
|
+
St,
|
|
2849
|
+
Tt,
|
|
2850
|
+
Ct
|
|
2851
|
+
]), Nt = w({
|
|
2841
2852
|
label: v(),
|
|
2842
2853
|
color: v(),
|
|
2843
2854
|
shape: b(["circle", "line", "square"]).optional()
|
|
2844
|
-
}),
|
|
2845
|
-
entries:
|
|
2855
|
+
}), At = w({
|
|
2856
|
+
entries: C(Nt).min(1),
|
|
2846
2857
|
displayMode: b(["categorical", "gradient", "simple"]).optional(),
|
|
2847
2858
|
showLabelsCollapsed: S().optional(),
|
|
2848
2859
|
gradientProperty: v().optional()
|
|
2849
|
-
}),
|
|
2860
|
+
}), ce = {
|
|
2850
2861
|
property: v().min(1),
|
|
2851
2862
|
label: v(),
|
|
2852
2863
|
placeholder: v().optional()
|
|
2853
|
-
},
|
|
2854
|
-
...
|
|
2864
|
+
}, Zt = w({
|
|
2865
|
+
...ce,
|
|
2855
2866
|
type: V("text"),
|
|
2856
2867
|
autocomplete: S().default(!1),
|
|
2857
2868
|
prefetch: S().optional(),
|
|
2858
|
-
options:
|
|
2859
|
-
}),
|
|
2860
|
-
...
|
|
2869
|
+
options: C(v()).optional()
|
|
2870
|
+
}), Rt = w({
|
|
2871
|
+
...ce,
|
|
2861
2872
|
type: V("number"),
|
|
2862
2873
|
inputMode: b(["input", "slider"]).default("input"),
|
|
2863
2874
|
operator: b(["eq", "gt", "lt", "gte", "lte", "between"]).default("eq"),
|
|
2864
2875
|
min: d().optional(),
|
|
2865
2876
|
max: d().optional(),
|
|
2866
2877
|
step: d().optional()
|
|
2867
|
-
}),
|
|
2868
|
-
...
|
|
2878
|
+
}), jt = w({
|
|
2879
|
+
...ce,
|
|
2869
2880
|
type: V("datetime"),
|
|
2870
2881
|
range: S().default(!1)
|
|
2871
|
-
}),
|
|
2872
|
-
...
|
|
2882
|
+
}), It = w({
|
|
2883
|
+
...ce,
|
|
2873
2884
|
type: V("select"),
|
|
2874
|
-
options:
|
|
2885
|
+
options: C(v()).optional(),
|
|
2875
2886
|
prefetch: S().optional()
|
|
2876
|
-
}),
|
|
2877
|
-
Nt,
|
|
2878
|
-
At,
|
|
2887
|
+
}), Et = $e("type", [
|
|
2879
2888
|
Zt,
|
|
2880
|
-
Rt
|
|
2881
|
-
|
|
2882
|
-
|
|
2883
|
-
|
|
2889
|
+
Rt,
|
|
2890
|
+
jt,
|
|
2891
|
+
It
|
|
2892
|
+
]), $t = w({
|
|
2893
|
+
fields: C(Et).min(1)
|
|
2894
|
+
}), Mt = w({
|
|
2884
2895
|
label: v().optional(),
|
|
2885
2896
|
visible: S().optional().default(!0)
|
|
2886
|
-
}),
|
|
2887
|
-
properties:
|
|
2897
|
+
}), Lt = Me(v(), Mt), Pt = w({
|
|
2898
|
+
properties: Me(xe([v(), d(), S(), C(v())])).optional(),
|
|
2888
2899
|
bbox: E([d(), d(), d(), d()]).optional(),
|
|
2889
2900
|
datetime: v().optional()
|
|
2890
|
-
}),
|
|
2901
|
+
}), Vt = {
|
|
2891
2902
|
id: v().min(1),
|
|
2892
2903
|
sourceId: v().min(1),
|
|
2893
2904
|
collection: v().min(1),
|
|
2894
2905
|
label: v(),
|
|
2895
2906
|
visible: S().default(!0),
|
|
2896
2907
|
dataMode: b(["vector-tiles", "geojson"]),
|
|
2897
|
-
|
|
2898
|
-
legend:
|
|
2899
|
-
filters:
|
|
2900
|
-
search:
|
|
2901
|
-
propertyDisplay:
|
|
2902
|
-
}
|
|
2908
|
+
styles: C(Ot).optional(),
|
|
2909
|
+
legend: At.optional(),
|
|
2910
|
+
filters: Pt.optional(),
|
|
2911
|
+
search: $t.optional(),
|
|
2912
|
+
propertyDisplay: Lt.optional()
|
|
2913
|
+
}, zt = ft(
|
|
2914
|
+
(a) => {
|
|
2915
|
+
if (a && typeof a == "object" && "style" in a && !("styles" in a)) {
|
|
2916
|
+
const { style: e, ...t } = a;
|
|
2917
|
+
return { ...t, styles: e ? [e] : void 0 };
|
|
2918
|
+
}
|
|
2919
|
+
return a;
|
|
2920
|
+
},
|
|
2921
|
+
w(Vt)
|
|
2922
|
+
), Dt = w({
|
|
2903
2923
|
id: v().min(1),
|
|
2904
2924
|
label: v(),
|
|
2905
2925
|
url: v().url(),
|
|
2906
2926
|
thumbnail: v().url().optional()
|
|
2907
|
-
}),
|
|
2927
|
+
}), Ft = w({
|
|
2908
2928
|
id: v().min(1),
|
|
2909
2929
|
url: v().url()
|
|
2910
|
-
}),
|
|
2930
|
+
}), Ut = w({
|
|
2911
2931
|
showLayerPanel: S().default(!0),
|
|
2912
2932
|
showLegend: S().default(!0),
|
|
2913
2933
|
showBasemapSwitcher: S().default(!0),
|
|
@@ -2917,52 +2937,53 @@ const Me = O(dt()), xe = (a) => ve([v(), Me]).default(a), B = () => ve([v(), Me]
|
|
|
2917
2937
|
showFeatureTooltip: S().default(!0),
|
|
2918
2938
|
showExportButton: S().default(!0),
|
|
2919
2939
|
showLegendOpacity: S().default(!1)
|
|
2920
|
-
}),
|
|
2921
|
-
sources:
|
|
2922
|
-
layers:
|
|
2923
|
-
basemaps:
|
|
2924
|
-
sprites:
|
|
2925
|
-
ui:
|
|
2926
|
-
initialView:
|
|
2940
|
+
}), Pe = w({
|
|
2941
|
+
sources: C(pt).min(1),
|
|
2942
|
+
layers: C(zt),
|
|
2943
|
+
basemaps: C(Dt).min(1),
|
|
2944
|
+
sprites: C(Ft).optional(),
|
|
2945
|
+
ui: Ut.default({}),
|
|
2946
|
+
initialView: ht
|
|
2927
2947
|
});
|
|
2928
|
-
function
|
|
2929
|
-
return
|
|
2948
|
+
function Bt(a) {
|
|
2949
|
+
return Pe.parse(a);
|
|
2930
2950
|
}
|
|
2931
|
-
function
|
|
2932
|
-
return
|
|
2951
|
+
function Wt(a) {
|
|
2952
|
+
return Pe.safeParse(a);
|
|
2933
2953
|
}
|
|
2934
2954
|
export {
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2955
|
+
Dt as B,
|
|
2956
|
+
kt as C,
|
|
2957
|
+
jt as D,
|
|
2958
|
+
vt as F,
|
|
2959
|
+
oe as G,
|
|
2960
|
+
zt as L,
|
|
2961
|
+
Pe as M,
|
|
2962
|
+
Rt as N,
|
|
2963
|
+
pt as O,
|
|
2964
|
+
Lt as P,
|
|
2965
|
+
$t as S,
|
|
2966
|
+
Zt as T,
|
|
2967
|
+
Ut as U,
|
|
2968
|
+
ht as V,
|
|
2969
|
+
gt as a,
|
|
2970
|
+
Tt as b,
|
|
2971
|
+
mt as c,
|
|
2972
|
+
wt as d,
|
|
2973
|
+
Pt as e,
|
|
2974
|
+
At as f,
|
|
2975
|
+
Nt as g,
|
|
2976
|
+
xt as h,
|
|
2977
|
+
yt as i,
|
|
2978
|
+
St as j,
|
|
2979
|
+
Mt as k,
|
|
2980
|
+
Et as l,
|
|
2981
|
+
It as m,
|
|
2982
|
+
Ft as n,
|
|
2983
|
+
Ot as o,
|
|
2984
|
+
bt as p,
|
|
2985
|
+
_t as q,
|
|
2986
|
+
Ct as r,
|
|
2987
|
+
Wt as s,
|
|
2988
|
+
Bt as v
|
|
2968
2989
|
};
|