@telemetryos/sdk 1.4.2 → 1.4.4
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/CHANGELOG.md +16 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +13 -1
- package/dist/index.js +459 -502
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -34,14 +34,14 @@ var w;
|
|
|
34
34
|
}
|
|
35
35
|
a.joinValues = s, a.jsonStringifyReplacer = (n, i) => typeof i == "bigint" ? i.toString() : i;
|
|
36
36
|
})(w || (w = {}));
|
|
37
|
-
var
|
|
37
|
+
var $e;
|
|
38
38
|
(function(a) {
|
|
39
39
|
a.mergeShapes = (e, t) => ({
|
|
40
40
|
...e,
|
|
41
41
|
...t
|
|
42
42
|
// second overwrites first
|
|
43
43
|
});
|
|
44
|
-
})(
|
|
44
|
+
})($e || ($e = {}));
|
|
45
45
|
const h = w.arrayToEnum([
|
|
46
46
|
"string",
|
|
47
47
|
"nan",
|
|
@@ -101,8 +101,8 @@ const h = w.arrayToEnum([
|
|
|
101
101
|
"invalid_intersection_types",
|
|
102
102
|
"not_multiple_of",
|
|
103
103
|
"not_finite"
|
|
104
|
-
]),
|
|
105
|
-
let C = class
|
|
104
|
+
]), it = (a) => JSON.stringify(a, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
105
|
+
let C = class He extends Error {
|
|
106
106
|
get errors() {
|
|
107
107
|
return this.issues;
|
|
108
108
|
}
|
|
@@ -139,7 +139,7 @@ let C = class Ve extends Error {
|
|
|
139
139
|
return n(this), s;
|
|
140
140
|
}
|
|
141
141
|
static assert(e) {
|
|
142
|
-
if (!(e instanceof
|
|
142
|
+
if (!(e instanceof He))
|
|
143
143
|
throw new Error(`Not a ZodError: ${e}`);
|
|
144
144
|
}
|
|
145
145
|
toString() {
|
|
@@ -162,7 +162,7 @@ let C = class Ve extends Error {
|
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
C.create = (a) => new C(a);
|
|
165
|
-
const
|
|
165
|
+
const H = (a, e) => {
|
|
166
166
|
let t;
|
|
167
167
|
switch (a.code) {
|
|
168
168
|
case d.invalid_type:
|
|
@@ -218,14 +218,14 @@ const W = (a, e) => {
|
|
|
218
218
|
}
|
|
219
219
|
return { message: t };
|
|
220
220
|
};
|
|
221
|
-
let
|
|
222
|
-
function
|
|
223
|
-
|
|
221
|
+
let Ke = H;
|
|
222
|
+
function rt(a) {
|
|
223
|
+
Ke = a;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
226
|
-
return
|
|
225
|
+
function be() {
|
|
226
|
+
return Ke;
|
|
227
227
|
}
|
|
228
|
-
const
|
|
228
|
+
const ke = (a) => {
|
|
229
229
|
const { data: e, path: t, errorMaps: s, issueData: n } = a, i = [...t, ...n.path || []], r = {
|
|
230
230
|
...n,
|
|
231
231
|
path: i
|
|
@@ -245,9 +245,9 @@ const be = (a) => {
|
|
|
245
245
|
path: i,
|
|
246
246
|
message: o
|
|
247
247
|
};
|
|
248
|
-
},
|
|
248
|
+
}, ot = [];
|
|
249
249
|
function l(a, e) {
|
|
250
|
-
const t =
|
|
250
|
+
const t = be(), s = ke({
|
|
251
251
|
issueData: e,
|
|
252
252
|
data: a.data,
|
|
253
253
|
path: a.path,
|
|
@@ -258,13 +258,13 @@ function l(a, e) {
|
|
|
258
258
|
// then schema-bound map if available
|
|
259
259
|
t,
|
|
260
260
|
// then global override map
|
|
261
|
-
t ===
|
|
261
|
+
t === H ? void 0 : H
|
|
262
262
|
// then global default map
|
|
263
263
|
].filter((n) => !!n)
|
|
264
264
|
});
|
|
265
265
|
a.common.issues.push(s);
|
|
266
266
|
}
|
|
267
|
-
let
|
|
267
|
+
let Z = class We {
|
|
268
268
|
constructor() {
|
|
269
269
|
this.value = "valid";
|
|
270
270
|
}
|
|
@@ -292,7 +292,7 @@ let x = class Ue {
|
|
|
292
292
|
value: r
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
|
-
return
|
|
295
|
+
return We.mergeObjectSync(e, s);
|
|
296
296
|
}
|
|
297
297
|
static mergeObjectSync(e, t) {
|
|
298
298
|
const s = {};
|
|
@@ -307,12 +307,12 @@ let x = class Ue {
|
|
|
307
307
|
};
|
|
308
308
|
const y = Object.freeze({
|
|
309
309
|
status: "aborted"
|
|
310
|
-
}),
|
|
311
|
-
function
|
|
310
|
+
}), xe = (a) => ({ status: "dirty", value: a }), x = (a) => ({ status: "valid", value: a }), Pe = (a) => a.status === "aborted", Re = (a) => a.status === "dirty", z = (a) => a.status === "valid", G = (a) => typeof Promise < "u" && a instanceof Promise;
|
|
311
|
+
function Ze(a, e, t, s) {
|
|
312
312
|
if (typeof e == "function" ? a !== e || !0 : !e.has(a)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
313
313
|
return e.get(a);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Je(a, e, t, s, n) {
|
|
316
316
|
if (typeof e == "function" ? a !== e || !0 : !e.has(a)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
317
317
|
return e.set(a, t), t;
|
|
318
318
|
}
|
|
@@ -320,7 +320,7 @@ var p;
|
|
|
320
320
|
(function(a) {
|
|
321
321
|
a.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, a.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
322
322
|
})(p || (p = {}));
|
|
323
|
-
var
|
|
323
|
+
var J, Y;
|
|
324
324
|
class E {
|
|
325
325
|
constructor(e, t, s, n) {
|
|
326
326
|
this._cachedPath = [], this.parent = e, this.data = t, this._path = s, this._key = n;
|
|
@@ -329,7 +329,7 @@ class E {
|
|
|
329
329
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
|
-
const
|
|
332
|
+
const Ve = (a, e) => {
|
|
333
333
|
if (z(e))
|
|
334
334
|
return { success: !0, data: e.value };
|
|
335
335
|
if (!a.common.issues.length)
|
|
@@ -356,7 +356,7 @@ function g(a) {
|
|
|
356
356
|
return i.code === "invalid_enum_value" ? { message: u ?? r.defaultError } : typeof r.data > "u" ? { message: (o = u ?? s) !== null && o !== void 0 ? o : r.defaultError } : i.code !== "invalid_type" ? { message: r.defaultError } : { message: (c = u ?? t) !== null && c !== void 0 ? c : r.defaultError };
|
|
357
357
|
}, description: n };
|
|
358
358
|
}
|
|
359
|
-
|
|
359
|
+
class _ {
|
|
360
360
|
get description() {
|
|
361
361
|
return this._def.description;
|
|
362
362
|
}
|
|
@@ -375,7 +375,7 @@ let _ = class {
|
|
|
375
375
|
}
|
|
376
376
|
_processInputParams(e) {
|
|
377
377
|
return {
|
|
378
|
-
status: new
|
|
378
|
+
status: new Z(),
|
|
379
379
|
ctx: {
|
|
380
380
|
common: e.parent.common,
|
|
381
381
|
data: e.data,
|
|
@@ -388,7 +388,7 @@ let _ = class {
|
|
|
388
388
|
}
|
|
389
389
|
_parseSync(e) {
|
|
390
390
|
const t = this._parse(e);
|
|
391
|
-
if (
|
|
391
|
+
if (G(t))
|
|
392
392
|
throw new Error("Synchronous parse encountered promise.");
|
|
393
393
|
return t;
|
|
394
394
|
}
|
|
@@ -416,7 +416,7 @@ let _ = class {
|
|
|
416
416
|
data: e,
|
|
417
417
|
parsedType: $(e)
|
|
418
418
|
}, i = this._parseSync({ data: e, path: n.path, parent: n });
|
|
419
|
-
return
|
|
419
|
+
return Ve(n, i);
|
|
420
420
|
}
|
|
421
421
|
"~validate"(e) {
|
|
422
422
|
var t, s;
|
|
@@ -469,8 +469,8 @@ let _ = class {
|
|
|
469
469
|
parent: null,
|
|
470
470
|
data: e,
|
|
471
471
|
parsedType: $(e)
|
|
472
|
-
}, n = this._parse({ data: e, path: s.path, parent: s }), i = await (
|
|
473
|
-
return
|
|
472
|
+
}, n = this._parse({ data: e, path: s.path, parent: s }), i = await (G(n) ? n : Promise.resolve(n));
|
|
473
|
+
return Ve(s, i);
|
|
474
474
|
}
|
|
475
475
|
refine(e, t) {
|
|
476
476
|
const s = (n) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(n) : t;
|
|
@@ -486,7 +486,7 @@ let _ = class {
|
|
|
486
486
|
return this._refinement((s, n) => e(s) ? !0 : (n.addIssue(typeof t == "function" ? t(s, n) : t), !1));
|
|
487
487
|
}
|
|
488
488
|
_refinement(e) {
|
|
489
|
-
return new
|
|
489
|
+
return new O({
|
|
490
490
|
schema: this,
|
|
491
491
|
typeName: m.ZodEffects,
|
|
492
492
|
effect: { type: "refinement", refinement: e }
|
|
@@ -503,7 +503,7 @@ let _ = class {
|
|
|
503
503
|
};
|
|
504
504
|
}
|
|
505
505
|
optional() {
|
|
506
|
-
return
|
|
506
|
+
return A.create(this, this._def);
|
|
507
507
|
}
|
|
508
508
|
nullable() {
|
|
509
509
|
return M.create(this, this._def);
|
|
@@ -515,16 +515,16 @@ let _ = class {
|
|
|
515
515
|
return V.create(this);
|
|
516
516
|
}
|
|
517
517
|
promise() {
|
|
518
|
-
return
|
|
518
|
+
return W.create(this, this._def);
|
|
519
519
|
}
|
|
520
520
|
or(e) {
|
|
521
|
-
return
|
|
521
|
+
return ae.create([this, e], this._def);
|
|
522
522
|
}
|
|
523
523
|
and(e) {
|
|
524
|
-
return
|
|
524
|
+
return ne.create(this, e, this._def);
|
|
525
525
|
}
|
|
526
526
|
transform(e) {
|
|
527
|
-
return new
|
|
527
|
+
return new O({
|
|
528
528
|
...g(this._def),
|
|
529
529
|
schema: this,
|
|
530
530
|
typeName: m.ZodEffects,
|
|
@@ -533,7 +533,7 @@ let _ = class {
|
|
|
533
533
|
}
|
|
534
534
|
default(e) {
|
|
535
535
|
const t = typeof e == "function" ? e : () => e;
|
|
536
|
-
return new
|
|
536
|
+
return new de({
|
|
537
537
|
...g(this._def),
|
|
538
538
|
innerType: this,
|
|
539
539
|
defaultValue: t,
|
|
@@ -541,7 +541,7 @@ let _ = class {
|
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
543
|
brand() {
|
|
544
|
-
return new
|
|
544
|
+
return new qe({
|
|
545
545
|
typeName: m.ZodBranded,
|
|
546
546
|
type: this,
|
|
547
547
|
...g(this._def)
|
|
@@ -549,7 +549,7 @@ let _ = class {
|
|
|
549
549
|
}
|
|
550
550
|
catch(e) {
|
|
551
551
|
const t = typeof e == "function" ? e : () => e;
|
|
552
|
-
return new
|
|
552
|
+
return new ue({
|
|
553
553
|
...g(this._def),
|
|
554
554
|
innerType: this,
|
|
555
555
|
catchValue: t,
|
|
@@ -564,10 +564,10 @@ let _ = class {
|
|
|
564
564
|
});
|
|
565
565
|
}
|
|
566
566
|
pipe(e) {
|
|
567
|
-
return
|
|
567
|
+
return pe.create(this, e);
|
|
568
568
|
}
|
|
569
569
|
readonly() {
|
|
570
|
-
return
|
|
570
|
+
return le.create(this);
|
|
571
571
|
}
|
|
572
572
|
isOptional() {
|
|
573
573
|
return this.safeParse(void 0).success;
|
|
@@ -575,29 +575,29 @@ let _ = class {
|
|
|
575
575
|
isNullable() {
|
|
576
576
|
return this.safeParse(null).success;
|
|
577
577
|
}
|
|
578
|
-
}
|
|
579
|
-
const
|
|
580
|
-
let
|
|
581
|
-
const
|
|
582
|
-
function
|
|
578
|
+
}
|
|
579
|
+
const ct = /^c[^\s-]{8,}$/i, dt = /^[0-9a-z]+$/, ut = /^[0-9A-HJKMNP-TV-Z]{26}$/i, lt = /^[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, ht = /^[a-z0-9_-]{21}$/i, pt = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, ft = /^[-+]?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)?)??$/, mt = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, yt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
580
|
+
let je;
|
|
581
|
+
const gt = /^(?:(?: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])$/, _t = /^(?:(?: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])$/, vt = /^(([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]))$/, wt = /^(([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])$/, bt = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, kt = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Ye = "((\\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])))", xt = new RegExp(`^${Ye}$`);
|
|
582
|
+
function Ge(a) {
|
|
583
583
|
let e = "[0-5]\\d";
|
|
584
584
|
a.precision ? e = `${e}\\.\\d{${a.precision}}` : a.precision == null && (e = `${e}(\\.\\d+)?`);
|
|
585
585
|
const t = a.precision ? "+" : "?";
|
|
586
586
|
return `([01]\\d|2[0-3]):[0-5]\\d(:${e})${t}`;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
return new RegExp(`^${
|
|
588
|
+
function Zt(a) {
|
|
589
|
+
return new RegExp(`^${Ge(a)}$`);
|
|
590
590
|
}
|
|
591
|
-
function
|
|
592
|
-
let e = `${
|
|
591
|
+
function Xe(a) {
|
|
592
|
+
let e = `${Ye}T${Ge(a)}`;
|
|
593
593
|
const t = [];
|
|
594
594
|
return t.push(a.local ? "Z?" : "Z"), a.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
return !!((e === "v4" || !e) &&
|
|
596
|
+
function St(a, e) {
|
|
597
|
+
return !!((e === "v4" || !e) && gt.test(a) || (e === "v6" || !e) && vt.test(a));
|
|
598
598
|
}
|
|
599
|
-
function
|
|
600
|
-
if (!
|
|
599
|
+
function Tt(a, e) {
|
|
600
|
+
if (!pt.test(a))
|
|
601
601
|
return !1;
|
|
602
602
|
try {
|
|
603
603
|
const [t] = a.split("."), s = t.replace(/-/g, "+").replace(/_/g, "/").padEnd(t.length + (4 - t.length % 4) % 4, "="), n = JSON.parse(atob(s));
|
|
@@ -606,8 +606,8 @@ function Zt(a, e) {
|
|
|
606
606
|
return !1;
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
return !!((e === "v4" || !e) &&
|
|
609
|
+
function Nt(a, e) {
|
|
610
|
+
return !!((e === "v4" || !e) && _t.test(a) || (e === "v6" || !e) && wt.test(a));
|
|
611
611
|
}
|
|
612
612
|
class N extends _ {
|
|
613
613
|
_parse(e) {
|
|
@@ -619,7 +619,7 @@ class N extends _ {
|
|
|
619
619
|
received: n.parsedType
|
|
620
620
|
}), y;
|
|
621
621
|
}
|
|
622
|
-
const t = new
|
|
622
|
+
const t = new Z();
|
|
623
623
|
let s;
|
|
624
624
|
for (const n of this._def.checks)
|
|
625
625
|
if (n.kind === "min")
|
|
@@ -658,43 +658,43 @@ class N extends _ {
|
|
|
658
658
|
message: n.message
|
|
659
659
|
}), t.dirty());
|
|
660
660
|
} else if (n.kind === "email")
|
|
661
|
-
|
|
661
|
+
mt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
662
662
|
validation: "email",
|
|
663
663
|
code: d.invalid_string,
|
|
664
664
|
message: n.message
|
|
665
665
|
}), t.dirty());
|
|
666
666
|
else if (n.kind === "emoji")
|
|
667
|
-
|
|
667
|
+
je || (je = new RegExp(yt, "u")), je.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
668
668
|
validation: "emoji",
|
|
669
669
|
code: d.invalid_string,
|
|
670
670
|
message: n.message
|
|
671
671
|
}), t.dirty());
|
|
672
672
|
else if (n.kind === "uuid")
|
|
673
|
-
|
|
673
|
+
lt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
674
674
|
validation: "uuid",
|
|
675
675
|
code: d.invalid_string,
|
|
676
676
|
message: n.message
|
|
677
677
|
}), t.dirty());
|
|
678
678
|
else if (n.kind === "nanoid")
|
|
679
|
-
|
|
679
|
+
ht.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
680
680
|
validation: "nanoid",
|
|
681
681
|
code: d.invalid_string,
|
|
682
682
|
message: n.message
|
|
683
683
|
}), t.dirty());
|
|
684
684
|
else if (n.kind === "cuid")
|
|
685
|
-
|
|
685
|
+
ct.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
686
686
|
validation: "cuid",
|
|
687
687
|
code: d.invalid_string,
|
|
688
688
|
message: n.message
|
|
689
689
|
}), t.dirty());
|
|
690
690
|
else if (n.kind === "cuid2")
|
|
691
|
-
|
|
691
|
+
dt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
692
692
|
validation: "cuid2",
|
|
693
693
|
code: d.invalid_string,
|
|
694
694
|
message: n.message
|
|
695
695
|
}), t.dirty());
|
|
696
696
|
else if (n.kind === "ulid")
|
|
697
|
-
|
|
697
|
+
ut.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
698
698
|
validation: "ulid",
|
|
699
699
|
code: d.invalid_string,
|
|
700
700
|
message: n.message
|
|
@@ -725,39 +725,39 @@ class N extends _ {
|
|
|
725
725
|
code: d.invalid_string,
|
|
726
726
|
validation: { endsWith: n.value },
|
|
727
727
|
message: n.message
|
|
728
|
-
}), t.dirty()) : n.kind === "datetime" ?
|
|
728
|
+
}), t.dirty()) : n.kind === "datetime" ? Xe(n).test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
729
729
|
code: d.invalid_string,
|
|
730
730
|
validation: "datetime",
|
|
731
731
|
message: n.message
|
|
732
|
-
}), t.dirty()) : n.kind === "date" ?
|
|
732
|
+
}), t.dirty()) : n.kind === "date" ? xt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
733
733
|
code: d.invalid_string,
|
|
734
734
|
validation: "date",
|
|
735
735
|
message: n.message
|
|
736
|
-
}), t.dirty()) : n.kind === "time" ?
|
|
736
|
+
}), t.dirty()) : n.kind === "time" ? Zt(n).test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
737
737
|
code: d.invalid_string,
|
|
738
738
|
validation: "time",
|
|
739
739
|
message: n.message
|
|
740
|
-
}), t.dirty()) : n.kind === "duration" ?
|
|
740
|
+
}), t.dirty()) : n.kind === "duration" ? ft.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
741
741
|
validation: "duration",
|
|
742
742
|
code: d.invalid_string,
|
|
743
743
|
message: n.message
|
|
744
|
-
}), t.dirty()) : n.kind === "ip" ?
|
|
744
|
+
}), t.dirty()) : n.kind === "ip" ? St(e.data, n.version) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
745
745
|
validation: "ip",
|
|
746
746
|
code: d.invalid_string,
|
|
747
747
|
message: n.message
|
|
748
|
-
}), t.dirty()) : n.kind === "jwt" ?
|
|
748
|
+
}), t.dirty()) : n.kind === "jwt" ? Tt(e.data, n.alg) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
749
749
|
validation: "jwt",
|
|
750
750
|
code: d.invalid_string,
|
|
751
751
|
message: n.message
|
|
752
|
-
}), t.dirty()) : n.kind === "cidr" ?
|
|
752
|
+
}), t.dirty()) : n.kind === "cidr" ? Nt(e.data, n.version) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
753
753
|
validation: "cidr",
|
|
754
754
|
code: d.invalid_string,
|
|
755
755
|
message: n.message
|
|
756
|
-
}), t.dirty()) : n.kind === "base64" ?
|
|
756
|
+
}), t.dirty()) : n.kind === "base64" ? bt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
757
757
|
validation: "base64",
|
|
758
758
|
code: d.invalid_string,
|
|
759
759
|
message: n.message
|
|
760
|
-
}), t.dirty()) : n.kind === "base64url" ?
|
|
760
|
+
}), t.dirty()) : n.kind === "base64url" ? kt.test(e.data) || (s = this._getOrReturnCtx(e, s), l(s, {
|
|
761
761
|
validation: "base64url",
|
|
762
762
|
code: d.invalid_string,
|
|
763
763
|
message: n.message
|
|
@@ -996,11 +996,11 @@ N.create = (a) => {
|
|
|
996
996
|
...g(a)
|
|
997
997
|
});
|
|
998
998
|
};
|
|
999
|
-
function
|
|
999
|
+
function Ct(a, e) {
|
|
1000
1000
|
const t = (a.toString().split(".")[1] || "").length, s = (e.toString().split(".")[1] || "").length, n = t > s ? t : s, i = parseInt(a.toFixed(n).replace(".", "")), r = parseInt(e.toFixed(n).replace(".", ""));
|
|
1001
1001
|
return i % r / Math.pow(10, n);
|
|
1002
1002
|
}
|
|
1003
|
-
class
|
|
1003
|
+
let X = class Me extends _ {
|
|
1004
1004
|
constructor() {
|
|
1005
1005
|
super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
|
|
1006
1006
|
}
|
|
@@ -1014,7 +1014,7 @@ class F extends _ {
|
|
|
1014
1014
|
}), y;
|
|
1015
1015
|
}
|
|
1016
1016
|
let t;
|
|
1017
|
-
const s = new
|
|
1017
|
+
const s = new Z();
|
|
1018
1018
|
for (const n of this._def.checks)
|
|
1019
1019
|
n.kind === "int" ? w.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), l(t, {
|
|
1020
1020
|
code: d.invalid_type,
|
|
@@ -1035,7 +1035,7 @@ class F extends _ {
|
|
|
1035
1035
|
inclusive: n.inclusive,
|
|
1036
1036
|
exact: !1,
|
|
1037
1037
|
message: n.message
|
|
1038
|
-
}), s.dirty()) : n.kind === "multipleOf" ?
|
|
1038
|
+
}), s.dirty()) : n.kind === "multipleOf" ? Ct(e.data, n.value) !== 0 && (t = this._getOrReturnCtx(e, t), l(t, {
|
|
1039
1039
|
code: d.not_multiple_of,
|
|
1040
1040
|
multipleOf: n.value,
|
|
1041
1041
|
message: n.message
|
|
@@ -1058,7 +1058,7 @@ class F extends _ {
|
|
|
1058
1058
|
return this.setLimit("max", e, !1, p.toString(t));
|
|
1059
1059
|
}
|
|
1060
1060
|
setLimit(e, t, s, n) {
|
|
1061
|
-
return new
|
|
1061
|
+
return new Me({
|
|
1062
1062
|
...this._def,
|
|
1063
1063
|
checks: [
|
|
1064
1064
|
...this._def.checks,
|
|
@@ -1072,7 +1072,7 @@ class F extends _ {
|
|
|
1072
1072
|
});
|
|
1073
1073
|
}
|
|
1074
1074
|
_addCheck(e) {
|
|
1075
|
-
return new
|
|
1075
|
+
return new Me({
|
|
1076
1076
|
...this._def,
|
|
1077
1077
|
checks: [...this._def.checks, e]
|
|
1078
1078
|
});
|
|
@@ -1165,14 +1165,14 @@ class F extends _ {
|
|
|
1165
1165
|
}
|
|
1166
1166
|
return Number.isFinite(t) && Number.isFinite(e);
|
|
1167
1167
|
}
|
|
1168
|
-
}
|
|
1169
|
-
|
|
1168
|
+
};
|
|
1169
|
+
X.create = (a) => new X({
|
|
1170
1170
|
checks: [],
|
|
1171
1171
|
typeName: m.ZodNumber,
|
|
1172
1172
|
coerce: (a == null ? void 0 : a.coerce) || !1,
|
|
1173
1173
|
...g(a)
|
|
1174
1174
|
});
|
|
1175
|
-
let Q = class
|
|
1175
|
+
let Q = class Fe extends _ {
|
|
1176
1176
|
constructor() {
|
|
1177
1177
|
super(...arguments), this.min = this.gte, this.max = this.lte;
|
|
1178
1178
|
}
|
|
@@ -1186,7 +1186,7 @@ let Q = class Re extends _ {
|
|
|
1186
1186
|
if (this._getType(e) !== h.bigint)
|
|
1187
1187
|
return this._getInvalidInput(e);
|
|
1188
1188
|
let t;
|
|
1189
|
-
const s = new
|
|
1189
|
+
const s = new Z();
|
|
1190
1190
|
for (const n of this._def.checks)
|
|
1191
1191
|
n.kind === "min" ? (n.inclusive ? e.data < n.value : e.data <= n.value) && (t = this._getOrReturnCtx(e, t), l(t, {
|
|
1192
1192
|
code: d.too_small,
|
|
@@ -1228,7 +1228,7 @@ let Q = class Re extends _ {
|
|
|
1228
1228
|
return this.setLimit("max", e, !1, p.toString(t));
|
|
1229
1229
|
}
|
|
1230
1230
|
setLimit(e, t, s, n) {
|
|
1231
|
-
return new
|
|
1231
|
+
return new Fe({
|
|
1232
1232
|
...this._def,
|
|
1233
1233
|
checks: [
|
|
1234
1234
|
...this._def.checks,
|
|
@@ -1242,7 +1242,7 @@ let Q = class Re extends _ {
|
|
|
1242
1242
|
});
|
|
1243
1243
|
}
|
|
1244
1244
|
_addCheck(e) {
|
|
1245
|
-
return new
|
|
1245
|
+
return new Fe({
|
|
1246
1246
|
...this._def,
|
|
1247
1247
|
checks: [...this._def.checks, e]
|
|
1248
1248
|
});
|
|
@@ -1318,7 +1318,7 @@ class ee extends _ {
|
|
|
1318
1318
|
received: t.parsedType
|
|
1319
1319
|
}), y;
|
|
1320
1320
|
}
|
|
1321
|
-
return
|
|
1321
|
+
return x(e.data);
|
|
1322
1322
|
}
|
|
1323
1323
|
}
|
|
1324
1324
|
ee.create = (a) => new ee({
|
|
@@ -1326,7 +1326,7 @@ ee.create = (a) => new ee({
|
|
|
1326
1326
|
coerce: (a == null ? void 0 : a.coerce) || !1,
|
|
1327
1327
|
...g(a)
|
|
1328
1328
|
});
|
|
1329
|
-
|
|
1329
|
+
class q extends _ {
|
|
1330
1330
|
_parse(e) {
|
|
1331
1331
|
if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== h.date) {
|
|
1332
1332
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1342,7 +1342,7 @@ let te = class Ye extends _ {
|
|
|
1342
1342
|
code: d.invalid_date
|
|
1343
1343
|
}), y;
|
|
1344
1344
|
}
|
|
1345
|
-
const t = new
|
|
1345
|
+
const t = new Z();
|
|
1346
1346
|
let s;
|
|
1347
1347
|
for (const n of this._def.checks)
|
|
1348
1348
|
n.kind === "min" ? e.data.getTime() < n.value && (s = this._getOrReturnCtx(e, s), l(s, {
|
|
@@ -1366,7 +1366,7 @@ let te = class Ye extends _ {
|
|
|
1366
1366
|
};
|
|
1367
1367
|
}
|
|
1368
1368
|
_addCheck(e) {
|
|
1369
|
-
return new
|
|
1369
|
+
return new q({
|
|
1370
1370
|
...this._def,
|
|
1371
1371
|
checks: [...this._def.checks, e]
|
|
1372
1372
|
});
|
|
@@ -1397,14 +1397,14 @@ let te = class Ye extends _ {
|
|
|
1397
1397
|
t.kind === "max" && (e === null || t.value < e) && (e = t.value);
|
|
1398
1398
|
return e != null ? new Date(e) : null;
|
|
1399
1399
|
}
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1400
|
+
}
|
|
1401
|
+
q.create = (a) => new q({
|
|
1402
1402
|
checks: [],
|
|
1403
1403
|
coerce: (a == null ? void 0 : a.coerce) || !1,
|
|
1404
1404
|
typeName: m.ZodDate,
|
|
1405
1405
|
...g(a)
|
|
1406
1406
|
});
|
|
1407
|
-
class
|
|
1407
|
+
class Se extends _ {
|
|
1408
1408
|
_parse(e) {
|
|
1409
1409
|
if (this._getType(e) !== h.symbol) {
|
|
1410
1410
|
const t = this._getOrReturnCtx(e);
|
|
@@ -1414,14 +1414,14 @@ class Ze extends _ {
|
|
|
1414
1414
|
received: t.parsedType
|
|
1415
1415
|
}), y;
|
|
1416
1416
|
}
|
|
1417
|
-
return
|
|
1417
|
+
return x(e.data);
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
|
-
|
|
1420
|
+
Se.create = (a) => new Se({
|
|
1421
1421
|
typeName: m.ZodSymbol,
|
|
1422
1422
|
...g(a)
|
|
1423
1423
|
});
|
|
1424
|
-
class
|
|
1424
|
+
class te extends _ {
|
|
1425
1425
|
_parse(e) {
|
|
1426
1426
|
if (this._getType(e) !== h.undefined) {
|
|
1427
1427
|
const t = this._getOrReturnCtx(e);
|
|
@@ -1431,14 +1431,14 @@ class se extends _ {
|
|
|
1431
1431
|
received: t.parsedType
|
|
1432
1432
|
}), y;
|
|
1433
1433
|
}
|
|
1434
|
-
return
|
|
1434
|
+
return x(e.data);
|
|
1435
1435
|
}
|
|
1436
1436
|
}
|
|
1437
|
-
|
|
1437
|
+
te.create = (a) => new te({
|
|
1438
1438
|
typeName: m.ZodUndefined,
|
|
1439
1439
|
...g(a)
|
|
1440
1440
|
});
|
|
1441
|
-
class
|
|
1441
|
+
class se extends _ {
|
|
1442
1442
|
_parse(e) {
|
|
1443
1443
|
if (this._getType(e) !== h.null) {
|
|
1444
1444
|
const t = this._getOrReturnCtx(e);
|
|
@@ -1448,34 +1448,34 @@ class ae extends _ {
|
|
|
1448
1448
|
received: t.parsedType
|
|
1449
1449
|
}), y;
|
|
1450
1450
|
}
|
|
1451
|
-
return
|
|
1451
|
+
return x(e.data);
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
|
-
|
|
1454
|
+
se.create = (a) => new se({
|
|
1455
1455
|
typeName: m.ZodNull,
|
|
1456
1456
|
...g(a)
|
|
1457
1457
|
});
|
|
1458
|
-
|
|
1458
|
+
class K extends _ {
|
|
1459
1459
|
constructor() {
|
|
1460
1460
|
super(...arguments), this._any = !0;
|
|
1461
1461
|
}
|
|
1462
1462
|
_parse(e) {
|
|
1463
|
-
return
|
|
1463
|
+
return x(e.data);
|
|
1464
1464
|
}
|
|
1465
|
-
}
|
|
1465
|
+
}
|
|
1466
1466
|
K.create = (a) => new K({
|
|
1467
1467
|
typeName: m.ZodAny,
|
|
1468
1468
|
...g(a)
|
|
1469
1469
|
});
|
|
1470
|
-
class
|
|
1470
|
+
class D extends _ {
|
|
1471
1471
|
constructor() {
|
|
1472
1472
|
super(...arguments), this._unknown = !0;
|
|
1473
1473
|
}
|
|
1474
1474
|
_parse(e) {
|
|
1475
|
-
return
|
|
1475
|
+
return x(e.data);
|
|
1476
1476
|
}
|
|
1477
1477
|
}
|
|
1478
|
-
|
|
1478
|
+
D.create = (a) => new D({
|
|
1479
1479
|
typeName: m.ZodUnknown,
|
|
1480
1480
|
...g(a)
|
|
1481
1481
|
});
|
|
@@ -1493,7 +1493,7 @@ P.create = (a) => new P({
|
|
|
1493
1493
|
typeName: m.ZodNever,
|
|
1494
1494
|
...g(a)
|
|
1495
1495
|
});
|
|
1496
|
-
class
|
|
1496
|
+
class Te extends _ {
|
|
1497
1497
|
_parse(e) {
|
|
1498
1498
|
if (this._getType(e) !== h.undefined) {
|
|
1499
1499
|
const t = this._getOrReturnCtx(e);
|
|
@@ -1503,14 +1503,14 @@ class Se extends _ {
|
|
|
1503
1503
|
received: t.parsedType
|
|
1504
1504
|
}), y;
|
|
1505
1505
|
}
|
|
1506
|
-
return
|
|
1506
|
+
return x(e.data);
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
|
-
|
|
1509
|
+
Te.create = (a) => new Te({
|
|
1510
1510
|
typeName: m.ZodVoid,
|
|
1511
1511
|
...g(a)
|
|
1512
1512
|
});
|
|
1513
|
-
let V = class
|
|
1513
|
+
let V = class ve extends _ {
|
|
1514
1514
|
_parse(e) {
|
|
1515
1515
|
const { ctx: t, status: s } = this._processInputParams(e), n = this._def;
|
|
1516
1516
|
if (t.parsedType !== h.array)
|
|
@@ -1546,27 +1546,27 @@ let V = class _e extends _ {
|
|
|
1546
1546
|
exact: !1,
|
|
1547
1547
|
message: n.maxLength.message
|
|
1548
1548
|
}), s.dirty()), t.common.async)
|
|
1549
|
-
return Promise.all([...t.data].map((r, o) => n.type._parseAsync(new E(t, r, t.path, o)))).then((r) =>
|
|
1549
|
+
return Promise.all([...t.data].map((r, o) => n.type._parseAsync(new E(t, r, t.path, o)))).then((r) => Z.mergeArray(s, r));
|
|
1550
1550
|
const i = [...t.data].map((r, o) => n.type._parseSync(new E(t, r, t.path, o)));
|
|
1551
|
-
return
|
|
1551
|
+
return Z.mergeArray(s, i);
|
|
1552
1552
|
}
|
|
1553
1553
|
get element() {
|
|
1554
1554
|
return this._def.type;
|
|
1555
1555
|
}
|
|
1556
1556
|
min(e, t) {
|
|
1557
|
-
return new
|
|
1557
|
+
return new ve({
|
|
1558
1558
|
...this._def,
|
|
1559
1559
|
minLength: { value: e, message: p.toString(t) }
|
|
1560
1560
|
});
|
|
1561
1561
|
}
|
|
1562
1562
|
max(e, t) {
|
|
1563
|
-
return new
|
|
1563
|
+
return new ve({
|
|
1564
1564
|
...this._def,
|
|
1565
1565
|
maxLength: { value: e, message: p.toString(t) }
|
|
1566
1566
|
});
|
|
1567
1567
|
}
|
|
1568
1568
|
length(e, t) {
|
|
1569
|
-
return new
|
|
1569
|
+
return new ve({
|
|
1570
1570
|
...this._def,
|
|
1571
1571
|
exactLength: { value: e, message: p.toString(t) }
|
|
1572
1572
|
});
|
|
@@ -1583,12 +1583,12 @@ V.create = (a, e) => new V({
|
|
|
1583
1583
|
typeName: m.ZodArray,
|
|
1584
1584
|
...g(e)
|
|
1585
1585
|
});
|
|
1586
|
-
function
|
|
1586
|
+
function U(a) {
|
|
1587
1587
|
if (a instanceof S) {
|
|
1588
1588
|
const e = {};
|
|
1589
1589
|
for (const t in a.shape) {
|
|
1590
1590
|
const s = a.shape[t];
|
|
1591
|
-
e[t] =
|
|
1591
|
+
e[t] = A.create(U(s));
|
|
1592
1592
|
}
|
|
1593
1593
|
return new S({
|
|
1594
1594
|
...a._def,
|
|
@@ -1596,8 +1596,8 @@ function H(a) {
|
|
|
1596
1596
|
});
|
|
1597
1597
|
} else return a instanceof V ? new V({
|
|
1598
1598
|
...a._def,
|
|
1599
|
-
type:
|
|
1600
|
-
}) : a instanceof
|
|
1599
|
+
type: U(a.element)
|
|
1600
|
+
}) : a instanceof A ? A.create(U(a.unwrap())) : a instanceof M ? M.create(U(a.unwrap())) : a instanceof I ? I.create(a.items.map((e) => U(e))) : a;
|
|
1601
1601
|
}
|
|
1602
1602
|
let S = class T extends _ {
|
|
1603
1603
|
constructor() {
|
|
@@ -1670,7 +1670,7 @@ let S = class T extends _ {
|
|
|
1670
1670
|
});
|
|
1671
1671
|
}
|
|
1672
1672
|
return c;
|
|
1673
|
-
}).then((c) =>
|
|
1673
|
+
}).then((c) => Z.mergeObjectSync(t, c)) : Z.mergeObjectSync(t, o);
|
|
1674
1674
|
}
|
|
1675
1675
|
get shape() {
|
|
1676
1676
|
return this._def.shape();
|
|
@@ -1833,7 +1833,7 @@ let S = class T extends _ {
|
|
|
1833
1833
|
* @deprecated
|
|
1834
1834
|
*/
|
|
1835
1835
|
deepPartial() {
|
|
1836
|
-
return
|
|
1836
|
+
return U(this);
|
|
1837
1837
|
}
|
|
1838
1838
|
partial(e) {
|
|
1839
1839
|
const t = {};
|
|
@@ -1852,7 +1852,7 @@ let S = class T extends _ {
|
|
|
1852
1852
|
t[s] = this.shape[s];
|
|
1853
1853
|
else {
|
|
1854
1854
|
let n = this.shape[s];
|
|
1855
|
-
for (; n instanceof
|
|
1855
|
+
for (; n instanceof A; )
|
|
1856
1856
|
n = n._def.innerType;
|
|
1857
1857
|
t[s] = n;
|
|
1858
1858
|
}
|
|
@@ -1862,7 +1862,7 @@ let S = class T extends _ {
|
|
|
1862
1862
|
});
|
|
1863
1863
|
}
|
|
1864
1864
|
keyof() {
|
|
1865
|
-
return
|
|
1865
|
+
return et(w.objectKeys(this.shape));
|
|
1866
1866
|
}
|
|
1867
1867
|
};
|
|
1868
1868
|
S.create = (a, e) => new S({
|
|
@@ -1886,7 +1886,7 @@ S.lazycreate = (a, e) => new S({
|
|
|
1886
1886
|
typeName: m.ZodObject,
|
|
1887
1887
|
...g(e)
|
|
1888
1888
|
});
|
|
1889
|
-
class
|
|
1889
|
+
class ae extends _ {
|
|
1890
1890
|
_parse(e) {
|
|
1891
1891
|
const { ctx: t } = this._processInputParams(e), s = this._def.options;
|
|
1892
1892
|
function n(i) {
|
|
@@ -1954,13 +1954,13 @@ class ne extends _ {
|
|
|
1954
1954
|
return this._def.options;
|
|
1955
1955
|
}
|
|
1956
1956
|
}
|
|
1957
|
-
|
|
1957
|
+
ae.create = (a, e) => new ae({
|
|
1958
1958
|
options: a,
|
|
1959
1959
|
typeName: m.ZodUnion,
|
|
1960
1960
|
...g(e)
|
|
1961
1961
|
});
|
|
1962
|
-
const R = (a) => a instanceof
|
|
1963
|
-
class
|
|
1962
|
+
const R = (a) => a instanceof re ? R(a.schema) : a instanceof O ? R(a.innerType()) : a instanceof oe ? [a.value] : a instanceof he ? a.options : a instanceof ce ? w.objectValues(a.enum) : a instanceof de ? R(a._def.innerType) : a instanceof te ? [void 0] : a instanceof se ? [null] : a instanceof A ? [void 0, ...R(a.unwrap())] : a instanceof M ? [null, ...R(a.unwrap())] : a instanceof qe || a instanceof le ? R(a.unwrap()) : a instanceof ue ? R(a._def.innerType) : [];
|
|
1963
|
+
class Ae extends _ {
|
|
1964
1964
|
_parse(e) {
|
|
1965
1965
|
const { ctx: t } = this._processInputParams(e);
|
|
1966
1966
|
if (t.parsedType !== h.object)
|
|
@@ -2013,7 +2013,7 @@ class Ce extends _ {
|
|
|
2013
2013
|
n.set(o, i);
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
2016
|
-
return new
|
|
2016
|
+
return new Ae({
|
|
2017
2017
|
typeName: m.ZodDiscriminatedUnion,
|
|
2018
2018
|
discriminator: e,
|
|
2019
2019
|
options: t,
|
|
@@ -2022,14 +2022,14 @@ class Ce extends _ {
|
|
|
2022
2022
|
});
|
|
2023
2023
|
}
|
|
2024
2024
|
}
|
|
2025
|
-
function
|
|
2025
|
+
function Le(a, e) {
|
|
2026
2026
|
const t = $(a), s = $(e);
|
|
2027
2027
|
if (a === e)
|
|
2028
2028
|
return { valid: !0, data: a };
|
|
2029
2029
|
if (t === h.object && s === h.object) {
|
|
2030
2030
|
const n = w.objectKeys(e), i = w.objectKeys(a).filter((o) => n.indexOf(o) !== -1), r = { ...a, ...e };
|
|
2031
2031
|
for (const o of i) {
|
|
2032
|
-
const c =
|
|
2032
|
+
const c = Le(a[o], e[o]);
|
|
2033
2033
|
if (!c.valid)
|
|
2034
2034
|
return { valid: !1 };
|
|
2035
2035
|
r[o] = c.data;
|
|
@@ -2040,7 +2040,7 @@ function Fe(a, e) {
|
|
|
2040
2040
|
return { valid: !1 };
|
|
2041
2041
|
const n = [];
|
|
2042
2042
|
for (let i = 0; i < a.length; i++) {
|
|
2043
|
-
const r = a[i], o = e[i], c =
|
|
2043
|
+
const r = a[i], o = e[i], c = Le(r, o);
|
|
2044
2044
|
if (!c.valid)
|
|
2045
2045
|
return { valid: !1 };
|
|
2046
2046
|
n.push(c.data);
|
|
@@ -2048,13 +2048,13 @@ function Fe(a, e) {
|
|
|
2048
2048
|
return { valid: !0, data: n };
|
|
2049
2049
|
} else return t === h.date && s === h.date && +a == +e ? { valid: !0, data: a } : { valid: !1 };
|
|
2050
2050
|
}
|
|
2051
|
-
class
|
|
2051
|
+
class ne extends _ {
|
|
2052
2052
|
_parse(e) {
|
|
2053
2053
|
const { status: t, ctx: s } = this._processInputParams(e), n = (i, r) => {
|
|
2054
|
-
if (
|
|
2054
|
+
if (Pe(i) || Pe(r))
|
|
2055
2055
|
return y;
|
|
2056
|
-
const o =
|
|
2057
|
-
return o.valid ? ((
|
|
2056
|
+
const o = Le(i.value, r.value);
|
|
2057
|
+
return o.valid ? ((Re(i) || Re(r)) && t.dirty(), { status: t.value, value: o.data }) : (l(s, {
|
|
2058
2058
|
code: d.invalid_intersection_types
|
|
2059
2059
|
}), y);
|
|
2060
2060
|
};
|
|
@@ -2080,7 +2080,7 @@ class ie extends _ {
|
|
|
2080
2080
|
}));
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
|
2083
|
-
|
|
2083
|
+
ne.create = (a, e, t) => new ne({
|
|
2084
2084
|
left: a,
|
|
2085
2085
|
right: e,
|
|
2086
2086
|
typeName: m.ZodIntersection,
|
|
@@ -2114,7 +2114,7 @@ class I extends _ {
|
|
|
2114
2114
|
const o = this._def.items[r] || this._def.rest;
|
|
2115
2115
|
return o ? o._parse(new E(s, i, s.path, r)) : null;
|
|
2116
2116
|
}).filter((i) => !!i);
|
|
2117
|
-
return s.common.async ? Promise.all(n).then((i) =>
|
|
2117
|
+
return s.common.async ? Promise.all(n).then((i) => Z.mergeArray(t, i)) : Z.mergeArray(t, n);
|
|
2118
2118
|
}
|
|
2119
2119
|
get items() {
|
|
2120
2120
|
return this._def.items;
|
|
@@ -2136,7 +2136,7 @@ I.create = (a, e) => {
|
|
|
2136
2136
|
...g(e)
|
|
2137
2137
|
});
|
|
2138
2138
|
};
|
|
2139
|
-
class
|
|
2139
|
+
class ie extends _ {
|
|
2140
2140
|
get keySchema() {
|
|
2141
2141
|
return this._def.keyType;
|
|
2142
2142
|
}
|
|
@@ -2158,18 +2158,18 @@ class re extends _ {
|
|
|
2158
2158
|
value: r._parse(new E(s, s.data[o], s.path, o)),
|
|
2159
2159
|
alwaysSet: o in s.data
|
|
2160
2160
|
});
|
|
2161
|
-
return s.common.async ?
|
|
2161
|
+
return s.common.async ? Z.mergeObjectAsync(t, n) : Z.mergeObjectSync(t, n);
|
|
2162
2162
|
}
|
|
2163
2163
|
get element() {
|
|
2164
2164
|
return this._def.valueType;
|
|
2165
2165
|
}
|
|
2166
2166
|
static create(e, t, s) {
|
|
2167
|
-
return t instanceof _ ? new
|
|
2167
|
+
return t instanceof _ ? new ie({
|
|
2168
2168
|
keyType: e,
|
|
2169
2169
|
valueType: t,
|
|
2170
2170
|
typeName: m.ZodRecord,
|
|
2171
2171
|
...g(s)
|
|
2172
|
-
}) : new
|
|
2172
|
+
}) : new ie({
|
|
2173
2173
|
keyType: N.create(),
|
|
2174
2174
|
valueType: e,
|
|
2175
2175
|
typeName: m.ZodRecord,
|
|
@@ -2177,7 +2177,7 @@ class re extends _ {
|
|
|
2177
2177
|
});
|
|
2178
2178
|
}
|
|
2179
2179
|
}
|
|
2180
|
-
class
|
|
2180
|
+
class Ne extends _ {
|
|
2181
2181
|
get keySchema() {
|
|
2182
2182
|
return this._def.keyType;
|
|
2183
2183
|
}
|
|
@@ -2219,13 +2219,13 @@ class Te extends _ {
|
|
|
2219
2219
|
}
|
|
2220
2220
|
}
|
|
2221
2221
|
}
|
|
2222
|
-
|
|
2222
|
+
Ne.create = (a, e, t) => new Ne({
|
|
2223
2223
|
valueType: e,
|
|
2224
2224
|
keyType: a,
|
|
2225
2225
|
typeName: m.ZodMap,
|
|
2226
2226
|
...g(t)
|
|
2227
2227
|
});
|
|
2228
|
-
class
|
|
2228
|
+
let Ce = class De extends _ {
|
|
2229
2229
|
_parse(e) {
|
|
2230
2230
|
const { status: t, ctx: s } = this._processInputParams(e);
|
|
2231
2231
|
if (s.parsedType !== h.set)
|
|
@@ -2264,13 +2264,13 @@ class B extends _ {
|
|
|
2264
2264
|
return s.common.async ? Promise.all(o).then((c) => r(c)) : r(o);
|
|
2265
2265
|
}
|
|
2266
2266
|
min(e, t) {
|
|
2267
|
-
return new
|
|
2267
|
+
return new De({
|
|
2268
2268
|
...this._def,
|
|
2269
2269
|
minSize: { value: e, message: p.toString(t) }
|
|
2270
2270
|
});
|
|
2271
2271
|
}
|
|
2272
2272
|
max(e, t) {
|
|
2273
|
-
return new
|
|
2273
|
+
return new De({
|
|
2274
2274
|
...this._def,
|
|
2275
2275
|
maxSize: { value: e, message: p.toString(t) }
|
|
2276
2276
|
});
|
|
@@ -2281,15 +2281,15 @@ class B extends _ {
|
|
|
2281
2281
|
nonempty(e) {
|
|
2282
2282
|
return this.min(1, e);
|
|
2283
2283
|
}
|
|
2284
|
-
}
|
|
2285
|
-
|
|
2284
|
+
};
|
|
2285
|
+
Ce.create = (a, e) => new Ce({
|
|
2286
2286
|
valueType: a,
|
|
2287
2287
|
minSize: null,
|
|
2288
2288
|
maxSize: null,
|
|
2289
2289
|
typeName: m.ZodSet,
|
|
2290
2290
|
...g(e)
|
|
2291
2291
|
});
|
|
2292
|
-
let
|
|
2292
|
+
let Qe = class we extends _ {
|
|
2293
2293
|
constructor() {
|
|
2294
2294
|
super(...arguments), this.validate = this.implement;
|
|
2295
2295
|
}
|
|
@@ -2302,14 +2302,14 @@ let Ge = class ve extends _ {
|
|
|
2302
2302
|
received: t.parsedType
|
|
2303
2303
|
}), y;
|
|
2304
2304
|
function s(o, c) {
|
|
2305
|
-
return
|
|
2305
|
+
return ke({
|
|
2306
2306
|
data: o,
|
|
2307
2307
|
path: t.path,
|
|
2308
2308
|
errorMaps: [
|
|
2309
2309
|
t.common.contextualErrorMap,
|
|
2310
2310
|
t.schemaErrorMap,
|
|
2311
|
-
|
|
2312
|
-
|
|
2311
|
+
be(),
|
|
2312
|
+
H
|
|
2313
2313
|
].filter((u) => !!u),
|
|
2314
2314
|
issueData: {
|
|
2315
2315
|
code: d.invalid_arguments,
|
|
@@ -2318,14 +2318,14 @@ let Ge = class ve extends _ {
|
|
|
2318
2318
|
});
|
|
2319
2319
|
}
|
|
2320
2320
|
function n(o, c) {
|
|
2321
|
-
return
|
|
2321
|
+
return ke({
|
|
2322
2322
|
data: o,
|
|
2323
2323
|
path: t.path,
|
|
2324
2324
|
errorMaps: [
|
|
2325
2325
|
t.common.contextualErrorMap,
|
|
2326
2326
|
t.schemaErrorMap,
|
|
2327
|
-
|
|
2328
|
-
|
|
2327
|
+
be(),
|
|
2328
|
+
H
|
|
2329
2329
|
].filter((u) => !!u),
|
|
2330
2330
|
issueData: {
|
|
2331
2331
|
code: d.invalid_return_type,
|
|
@@ -2334,9 +2334,9 @@ let Ge = class ve extends _ {
|
|
|
2334
2334
|
});
|
|
2335
2335
|
}
|
|
2336
2336
|
const i = { errorMap: t.common.contextualErrorMap }, r = t.data;
|
|
2337
|
-
if (this._def.returns instanceof
|
|
2337
|
+
if (this._def.returns instanceof W) {
|
|
2338
2338
|
const o = this;
|
|
2339
|
-
return
|
|
2339
|
+
return x(async function(...c) {
|
|
2340
2340
|
const u = new C([]), f = await o._def.args.parseAsync(c, i).catch((j) => {
|
|
2341
2341
|
throw u.addIssue(s(c, j)), u;
|
|
2342
2342
|
}), b = await Reflect.apply(r, this, f);
|
|
@@ -2346,7 +2346,7 @@ let Ge = class ve extends _ {
|
|
|
2346
2346
|
});
|
|
2347
2347
|
} else {
|
|
2348
2348
|
const o = this;
|
|
2349
|
-
return
|
|
2349
|
+
return x(function(...c) {
|
|
2350
2350
|
const u = o._def.args.safeParse(c, i);
|
|
2351
2351
|
if (!u.success)
|
|
2352
2352
|
throw new C([s(c, u.error)]);
|
|
@@ -2364,13 +2364,13 @@ let Ge = class ve extends _ {
|
|
|
2364
2364
|
return this._def.returns;
|
|
2365
2365
|
}
|
|
2366
2366
|
args(...e) {
|
|
2367
|
-
return new
|
|
2367
|
+
return new we({
|
|
2368
2368
|
...this._def,
|
|
2369
|
-
args: I.create(e).rest(
|
|
2369
|
+
args: I.create(e).rest(D.create())
|
|
2370
2370
|
});
|
|
2371
2371
|
}
|
|
2372
2372
|
returns(e) {
|
|
2373
|
-
return new
|
|
2373
|
+
return new we({
|
|
2374
2374
|
...this._def,
|
|
2375
2375
|
returns: e
|
|
2376
2376
|
});
|
|
@@ -2382,15 +2382,15 @@ let Ge = class ve extends _ {
|
|
|
2382
2382
|
return this.parse(e);
|
|
2383
2383
|
}
|
|
2384
2384
|
static create(e, t, s) {
|
|
2385
|
-
return new
|
|
2386
|
-
args: e || I.create([]).rest(
|
|
2387
|
-
returns: t ||
|
|
2385
|
+
return new we({
|
|
2386
|
+
args: e || I.create([]).rest(D.create()),
|
|
2387
|
+
returns: t || D.create(),
|
|
2388
2388
|
typeName: m.ZodFunction,
|
|
2389
2389
|
...g(s)
|
|
2390
2390
|
});
|
|
2391
2391
|
}
|
|
2392
2392
|
};
|
|
2393
|
-
class
|
|
2393
|
+
class re extends _ {
|
|
2394
2394
|
get schema() {
|
|
2395
2395
|
return this._def.getter();
|
|
2396
2396
|
}
|
|
@@ -2399,12 +2399,12 @@ class oe extends _ {
|
|
|
2399
2399
|
return this._def.getter()._parse({ data: t.data, path: t.path, parent: t });
|
|
2400
2400
|
}
|
|
2401
2401
|
}
|
|
2402
|
-
|
|
2402
|
+
re.create = (a, e) => new re({
|
|
2403
2403
|
getter: a,
|
|
2404
2404
|
typeName: m.ZodLazy,
|
|
2405
2405
|
...g(e)
|
|
2406
2406
|
});
|
|
2407
|
-
class
|
|
2407
|
+
class oe extends _ {
|
|
2408
2408
|
_parse(e) {
|
|
2409
2409
|
if (e.data !== this._def.value) {
|
|
2410
2410
|
const t = this._getOrReturnCtx(e);
|
|
@@ -2420,21 +2420,21 @@ class ce extends _ {
|
|
|
2420
2420
|
return this._def.value;
|
|
2421
2421
|
}
|
|
2422
2422
|
}
|
|
2423
|
-
|
|
2423
|
+
oe.create = (a, e) => new oe({
|
|
2424
2424
|
value: a,
|
|
2425
2425
|
typeName: m.ZodLiteral,
|
|
2426
2426
|
...g(e)
|
|
2427
2427
|
});
|
|
2428
|
-
function
|
|
2429
|
-
return new
|
|
2428
|
+
function et(a, e) {
|
|
2429
|
+
return new he({
|
|
2430
2430
|
values: a,
|
|
2431
2431
|
typeName: m.ZodEnum,
|
|
2432
2432
|
...g(e)
|
|
2433
2433
|
});
|
|
2434
2434
|
}
|
|
2435
|
-
let
|
|
2435
|
+
let he = class ze extends _ {
|
|
2436
2436
|
constructor() {
|
|
2437
|
-
super(...arguments),
|
|
2437
|
+
super(...arguments), J.set(this, void 0);
|
|
2438
2438
|
}
|
|
2439
2439
|
_parse(e) {
|
|
2440
2440
|
if (typeof e.data != "string") {
|
|
@@ -2445,7 +2445,7 @@ let pe = class Me extends _ {
|
|
|
2445
2445
|
code: d.invalid_type
|
|
2446
2446
|
}), y;
|
|
2447
2447
|
}
|
|
2448
|
-
if (
|
|
2448
|
+
if (Ze(this, J) || Je(this, J, new Set(this._def.values)), !Ze(this, J).has(e.data)) {
|
|
2449
2449
|
const t = this._getOrReturnCtx(e), s = this._def.values;
|
|
2450
2450
|
return l(t, {
|
|
2451
2451
|
received: t.data,
|
|
@@ -2453,7 +2453,7 @@ let pe = class Me extends _ {
|
|
|
2453
2453
|
options: s
|
|
2454
2454
|
}), y;
|
|
2455
2455
|
}
|
|
2456
|
-
return
|
|
2456
|
+
return x(e.data);
|
|
2457
2457
|
}
|
|
2458
2458
|
get options() {
|
|
2459
2459
|
return this._def.values;
|
|
@@ -2477,23 +2477,23 @@ let pe = class Me extends _ {
|
|
|
2477
2477
|
return e;
|
|
2478
2478
|
}
|
|
2479
2479
|
extract(e, t = this._def) {
|
|
2480
|
-
return
|
|
2480
|
+
return ze.create(e, {
|
|
2481
2481
|
...this._def,
|
|
2482
2482
|
...t
|
|
2483
2483
|
});
|
|
2484
2484
|
}
|
|
2485
2485
|
exclude(e, t = this._def) {
|
|
2486
|
-
return
|
|
2486
|
+
return ze.create(this.options.filter((s) => !e.includes(s)), {
|
|
2487
2487
|
...this._def,
|
|
2488
2488
|
...t
|
|
2489
2489
|
});
|
|
2490
2490
|
}
|
|
2491
2491
|
};
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
class
|
|
2492
|
+
J = /* @__PURE__ */ new WeakMap();
|
|
2493
|
+
he.create = et;
|
|
2494
|
+
class ce extends _ {
|
|
2495
2495
|
constructor() {
|
|
2496
|
-
super(...arguments),
|
|
2496
|
+
super(...arguments), Y.set(this, void 0);
|
|
2497
2497
|
}
|
|
2498
2498
|
_parse(e) {
|
|
2499
2499
|
const t = w.getValidEnumValues(this._def.values), s = this._getOrReturnCtx(e);
|
|
@@ -2505,7 +2505,7 @@ class de extends _ {
|
|
|
2505
2505
|
code: d.invalid_type
|
|
2506
2506
|
}), y;
|
|
2507
2507
|
}
|
|
2508
|
-
if (
|
|
2508
|
+
if (Ze(this, Y) || Je(this, Y, new Set(w.getValidEnumValues(this._def.values))), !Ze(this, Y).has(e.data)) {
|
|
2509
2509
|
const n = w.objectValues(t);
|
|
2510
2510
|
return l(s, {
|
|
2511
2511
|
received: s.data,
|
|
@@ -2513,19 +2513,19 @@ class de extends _ {
|
|
|
2513
2513
|
options: n
|
|
2514
2514
|
}), y;
|
|
2515
2515
|
}
|
|
2516
|
-
return
|
|
2516
|
+
return x(e.data);
|
|
2517
2517
|
}
|
|
2518
2518
|
get enum() {
|
|
2519
2519
|
return this._def.values;
|
|
2520
2520
|
}
|
|
2521
2521
|
}
|
|
2522
|
-
|
|
2523
|
-
|
|
2522
|
+
Y = /* @__PURE__ */ new WeakMap();
|
|
2523
|
+
ce.create = (a, e) => new ce({
|
|
2524
2524
|
values: a,
|
|
2525
2525
|
typeName: m.ZodNativeEnum,
|
|
2526
2526
|
...g(e)
|
|
2527
2527
|
});
|
|
2528
|
-
class
|
|
2528
|
+
class W extends _ {
|
|
2529
2529
|
unwrap() {
|
|
2530
2530
|
return this._def.type;
|
|
2531
2531
|
}
|
|
@@ -2538,18 +2538,18 @@ class J extends _ {
|
|
|
2538
2538
|
received: t.parsedType
|
|
2539
2539
|
}), y;
|
|
2540
2540
|
const s = t.parsedType === h.promise ? t.data : Promise.resolve(t.data);
|
|
2541
|
-
return
|
|
2541
|
+
return x(s.then((n) => this._def.type.parseAsync(n, {
|
|
2542
2542
|
path: t.path,
|
|
2543
2543
|
errorMap: t.common.contextualErrorMap
|
|
2544
2544
|
})));
|
|
2545
2545
|
}
|
|
2546
2546
|
}
|
|
2547
|
-
|
|
2547
|
+
W.create = (a, e) => new W({
|
|
2548
2548
|
type: a,
|
|
2549
2549
|
typeName: m.ZodPromise,
|
|
2550
2550
|
...g(e)
|
|
2551
2551
|
});
|
|
2552
|
-
class
|
|
2552
|
+
let O = class extends _ {
|
|
2553
2553
|
innerType() {
|
|
2554
2554
|
return this._def.schema;
|
|
2555
2555
|
}
|
|
@@ -2576,7 +2576,7 @@ class A extends _ {
|
|
|
2576
2576
|
path: s.path,
|
|
2577
2577
|
parent: s
|
|
2578
2578
|
});
|
|
2579
|
-
return c.status === "aborted" ? y : c.status === "dirty" || t.value === "dirty" ?
|
|
2579
|
+
return c.status === "aborted" ? y : c.status === "dirty" || t.value === "dirty" ? xe(c.value) : c;
|
|
2580
2580
|
});
|
|
2581
2581
|
{
|
|
2582
2582
|
if (t.value === "aborted")
|
|
@@ -2586,7 +2586,7 @@ class A extends _ {
|
|
|
2586
2586
|
path: s.path,
|
|
2587
2587
|
parent: s
|
|
2588
2588
|
});
|
|
2589
|
-
return o.status === "aborted" ? y : o.status === "dirty" || t.value === "dirty" ?
|
|
2589
|
+
return o.status === "aborted" ? y : o.status === "dirty" || t.value === "dirty" ? xe(o.value) : o;
|
|
2590
2590
|
}
|
|
2591
2591
|
}
|
|
2592
2592
|
if (n.type === "refinement") {
|
|
@@ -2625,35 +2625,35 @@ class A extends _ {
|
|
|
2625
2625
|
return this._def.schema._parseAsync({ data: s.data, path: s.path, parent: s }).then((r) => z(r) ? Promise.resolve(n.transform(r.value, i)).then((o) => ({ status: t.value, value: o })) : r);
|
|
2626
2626
|
w.assertNever(n);
|
|
2627
2627
|
}
|
|
2628
|
-
}
|
|
2629
|
-
|
|
2628
|
+
};
|
|
2629
|
+
O.create = (a, e, t) => new O({
|
|
2630
2630
|
schema: a,
|
|
2631
2631
|
typeName: m.ZodEffects,
|
|
2632
2632
|
effect: e,
|
|
2633
2633
|
...g(t)
|
|
2634
2634
|
});
|
|
2635
|
-
|
|
2635
|
+
O.createWithPreprocess = (a, e, t) => new O({
|
|
2636
2636
|
schema: e,
|
|
2637
2637
|
effect: { type: "preprocess", transform: a },
|
|
2638
2638
|
typeName: m.ZodEffects,
|
|
2639
2639
|
...g(t)
|
|
2640
2640
|
});
|
|
2641
|
-
let
|
|
2641
|
+
let A = class extends _ {
|
|
2642
2642
|
_parse(e) {
|
|
2643
|
-
return this._getType(e) === h.undefined ?
|
|
2643
|
+
return this._getType(e) === h.undefined ? x(void 0) : this._def.innerType._parse(e);
|
|
2644
2644
|
}
|
|
2645
2645
|
unwrap() {
|
|
2646
2646
|
return this._def.innerType;
|
|
2647
2647
|
}
|
|
2648
2648
|
};
|
|
2649
|
-
|
|
2649
|
+
A.create = (a, e) => new A({
|
|
2650
2650
|
innerType: a,
|
|
2651
2651
|
typeName: m.ZodOptional,
|
|
2652
2652
|
...g(e)
|
|
2653
2653
|
});
|
|
2654
2654
|
let M = class extends _ {
|
|
2655
2655
|
_parse(e) {
|
|
2656
|
-
return this._getType(e) === h.null ?
|
|
2656
|
+
return this._getType(e) === h.null ? x(null) : this._def.innerType._parse(e);
|
|
2657
2657
|
}
|
|
2658
2658
|
unwrap() {
|
|
2659
2659
|
return this._def.innerType;
|
|
@@ -2664,7 +2664,7 @@ M.create = (a, e) => new M({
|
|
|
2664
2664
|
typeName: m.ZodNullable,
|
|
2665
2665
|
...g(e)
|
|
2666
2666
|
});
|
|
2667
|
-
class
|
|
2667
|
+
class de extends _ {
|
|
2668
2668
|
_parse(e) {
|
|
2669
2669
|
const { ctx: t } = this._processInputParams(e);
|
|
2670
2670
|
let s = t.data;
|
|
@@ -2678,13 +2678,13 @@ class ue extends _ {
|
|
|
2678
2678
|
return this._def.innerType;
|
|
2679
2679
|
}
|
|
2680
2680
|
}
|
|
2681
|
-
|
|
2681
|
+
de.create = (a, e) => new de({
|
|
2682
2682
|
innerType: a,
|
|
2683
2683
|
typeName: m.ZodDefault,
|
|
2684
2684
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
2685
2685
|
...g(e)
|
|
2686
2686
|
});
|
|
2687
|
-
class
|
|
2687
|
+
class ue extends _ {
|
|
2688
2688
|
_parse(e) {
|
|
2689
2689
|
const { ctx: t } = this._processInputParams(e), s = {
|
|
2690
2690
|
...t,
|
|
@@ -2699,7 +2699,7 @@ class le extends _ {
|
|
|
2699
2699
|
...s
|
|
2700
2700
|
}
|
|
2701
2701
|
});
|
|
2702
|
-
return
|
|
2702
|
+
return G(n) ? n.then((i) => ({
|
|
2703
2703
|
status: "valid",
|
|
2704
2704
|
value: i.status === "valid" ? i.value : this._def.catchValue({
|
|
2705
2705
|
get error() {
|
|
@@ -2721,13 +2721,13 @@ class le extends _ {
|
|
|
2721
2721
|
return this._def.innerType;
|
|
2722
2722
|
}
|
|
2723
2723
|
}
|
|
2724
|
-
|
|
2724
|
+
ue.create = (a, e) => new ue({
|
|
2725
2725
|
innerType: a,
|
|
2726
2726
|
typeName: m.ZodCatch,
|
|
2727
2727
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2728
2728
|
...g(e)
|
|
2729
2729
|
});
|
|
2730
|
-
class
|
|
2730
|
+
class Oe extends _ {
|
|
2731
2731
|
_parse(e) {
|
|
2732
2732
|
if (this._getType(e) !== h.nan) {
|
|
2733
2733
|
const t = this._getOrReturnCtx(e);
|
|
@@ -2740,12 +2740,12 @@ class Ne extends _ {
|
|
|
2740
2740
|
return { status: "valid", value: e.data };
|
|
2741
2741
|
}
|
|
2742
2742
|
}
|
|
2743
|
-
|
|
2743
|
+
Oe.create = (a) => new Oe({
|
|
2744
2744
|
typeName: m.ZodNaN,
|
|
2745
2745
|
...g(a)
|
|
2746
2746
|
});
|
|
2747
|
-
const
|
|
2748
|
-
class
|
|
2747
|
+
const Ot = Symbol("zod_brand");
|
|
2748
|
+
class qe extends _ {
|
|
2749
2749
|
_parse(e) {
|
|
2750
2750
|
const { ctx: t } = this._processInputParams(e), s = t.data;
|
|
2751
2751
|
return this._def.type._parse({
|
|
@@ -2758,7 +2758,7 @@ class De extends _ {
|
|
|
2758
2758
|
return this._def.type;
|
|
2759
2759
|
}
|
|
2760
2760
|
}
|
|
2761
|
-
class
|
|
2761
|
+
class pe extends _ {
|
|
2762
2762
|
_parse(e) {
|
|
2763
2763
|
const { status: t, ctx: s } = this._processInputParams(e);
|
|
2764
2764
|
if (s.common.async)
|
|
@@ -2768,7 +2768,7 @@ class fe extends _ {
|
|
|
2768
2768
|
path: s.path,
|
|
2769
2769
|
parent: s
|
|
2770
2770
|
});
|
|
2771
|
-
return n.status === "aborted" ? y : n.status === "dirty" ? (t.dirty(),
|
|
2771
|
+
return n.status === "aborted" ? y : n.status === "dirty" ? (t.dirty(), xe(n.value)) : this._def.out._parseAsync({
|
|
2772
2772
|
data: n.value,
|
|
2773
2773
|
path: s.path,
|
|
2774
2774
|
parent: s
|
|
@@ -2791,32 +2791,32 @@ class fe extends _ {
|
|
|
2791
2791
|
}
|
|
2792
2792
|
}
|
|
2793
2793
|
static create(e, t) {
|
|
2794
|
-
return new
|
|
2794
|
+
return new pe({
|
|
2795
2795
|
in: e,
|
|
2796
2796
|
out: t,
|
|
2797
2797
|
typeName: m.ZodPipeline
|
|
2798
2798
|
});
|
|
2799
2799
|
}
|
|
2800
2800
|
}
|
|
2801
|
-
class
|
|
2801
|
+
class le extends _ {
|
|
2802
2802
|
_parse(e) {
|
|
2803
2803
|
const t = this._def.innerType._parse(e), s = (n) => (z(n) && (n.value = Object.freeze(n.value)), n);
|
|
2804
|
-
return
|
|
2804
|
+
return G(t) ? t.then((n) => s(n)) : s(t);
|
|
2805
2805
|
}
|
|
2806
2806
|
unwrap() {
|
|
2807
2807
|
return this._def.innerType;
|
|
2808
2808
|
}
|
|
2809
2809
|
}
|
|
2810
|
-
|
|
2810
|
+
le.create = (a, e) => new le({
|
|
2811
2811
|
innerType: a,
|
|
2812
2812
|
typeName: m.ZodReadonly,
|
|
2813
2813
|
...g(e)
|
|
2814
2814
|
});
|
|
2815
|
-
function
|
|
2815
|
+
function Be(a, e) {
|
|
2816
2816
|
const t = typeof a == "function" ? a(e) : typeof a == "string" ? { message: a } : a;
|
|
2817
2817
|
return typeof t == "string" ? { message: t } : t;
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2819
|
+
function tt(a, e = {}, t) {
|
|
2820
2820
|
return a ? K.create().superRefine((s, n) => {
|
|
2821
2821
|
var i, r;
|
|
2822
2822
|
const o = a(s);
|
|
@@ -2824,155 +2824,155 @@ function Qe(a, e = {}, t) {
|
|
|
2824
2824
|
return o.then((c) => {
|
|
2825
2825
|
var u, f;
|
|
2826
2826
|
if (!c) {
|
|
2827
|
-
const b =
|
|
2827
|
+
const b = Be(e, s), j = (f = (u = b.fatal) !== null && u !== void 0 ? u : t) !== null && f !== void 0 ? f : !0;
|
|
2828
2828
|
n.addIssue({ code: "custom", ...b, fatal: j });
|
|
2829
2829
|
}
|
|
2830
2830
|
});
|
|
2831
2831
|
if (!o) {
|
|
2832
|
-
const c =
|
|
2832
|
+
const c = Be(e, s), u = (r = (i = c.fatal) !== null && i !== void 0 ? i : t) !== null && r !== void 0 ? r : !0;
|
|
2833
2833
|
n.addIssue({ code: "custom", ...c, fatal: u });
|
|
2834
2834
|
}
|
|
2835
2835
|
}) : K.create();
|
|
2836
2836
|
}
|
|
2837
|
-
const
|
|
2837
|
+
const At = {
|
|
2838
2838
|
object: S.lazycreate
|
|
2839
2839
|
};
|
|
2840
2840
|
var m;
|
|
2841
2841
|
(function(a) {
|
|
2842
2842
|
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";
|
|
2843
2843
|
})(m || (m = {}));
|
|
2844
|
-
const
|
|
2844
|
+
const Et = (a, e = {
|
|
2845
2845
|
message: `Input not instance of ${a.name}`
|
|
2846
|
-
}) =>
|
|
2846
|
+
}) => tt((t) => t instanceof a, e), st = N.create, at = X.create, It = Oe.create, jt = Q.create, nt = ee.create, $t = q.create, Pt = Se.create, Rt = te.create, Mt = se.create, Ft = K.create, Lt = D.create, Dt = P.create, zt = Te.create, qt = V.create, Vt = S.create, Bt = S.strictCreate, Ut = ae.create, Ht = Ae.create, Kt = ne.create, Wt = I.create, Jt = ie.create, Yt = Ne.create, Gt = Ce.create, Xt = Qe.create, Qt = re.create, es = oe.create, ts = he.create, ss = ce.create, as = W.create, Ue = O.create, ns = A.create, is = M.create, rs = O.createWithPreprocess, os = pe.create, cs = () => st().optional(), ds = () => at().optional(), us = () => nt().optional(), ls = {
|
|
2847
2847
|
string: (a) => N.create({ ...a, coerce: !0 }),
|
|
2848
|
-
number: (a) =>
|
|
2848
|
+
number: (a) => X.create({ ...a, coerce: !0 }),
|
|
2849
2849
|
boolean: (a) => ee.create({
|
|
2850
2850
|
...a,
|
|
2851
2851
|
coerce: !0
|
|
2852
2852
|
}),
|
|
2853
2853
|
bigint: (a) => Q.create({ ...a, coerce: !0 }),
|
|
2854
|
-
date: (a) =>
|
|
2855
|
-
},
|
|
2856
|
-
var
|
|
2854
|
+
date: (a) => q.create({ ...a, coerce: !0 })
|
|
2855
|
+
}, hs = y;
|
|
2856
|
+
var fe = /* @__PURE__ */ Object.freeze({
|
|
2857
2857
|
__proto__: null,
|
|
2858
|
-
defaultErrorMap:
|
|
2859
|
-
setErrorMap:
|
|
2860
|
-
getErrorMap:
|
|
2861
|
-
makeIssue:
|
|
2862
|
-
EMPTY_PATH:
|
|
2858
|
+
defaultErrorMap: H,
|
|
2859
|
+
setErrorMap: rt,
|
|
2860
|
+
getErrorMap: be,
|
|
2861
|
+
makeIssue: ke,
|
|
2862
|
+
EMPTY_PATH: ot,
|
|
2863
2863
|
addIssueToContext: l,
|
|
2864
|
-
ParseStatus:
|
|
2864
|
+
ParseStatus: Z,
|
|
2865
2865
|
INVALID: y,
|
|
2866
|
-
DIRTY:
|
|
2867
|
-
OK:
|
|
2868
|
-
isAborted:
|
|
2869
|
-
isDirty:
|
|
2866
|
+
DIRTY: xe,
|
|
2867
|
+
OK: x,
|
|
2868
|
+
isAborted: Pe,
|
|
2869
|
+
isDirty: Re,
|
|
2870
2870
|
isValid: z,
|
|
2871
|
-
isAsync:
|
|
2871
|
+
isAsync: G,
|
|
2872
2872
|
get util() {
|
|
2873
2873
|
return w;
|
|
2874
2874
|
},
|
|
2875
2875
|
get objectUtil() {
|
|
2876
|
-
return
|
|
2876
|
+
return $e;
|
|
2877
2877
|
},
|
|
2878
2878
|
ZodParsedType: h,
|
|
2879
2879
|
getParsedType: $,
|
|
2880
2880
|
ZodType: _,
|
|
2881
|
-
datetimeRegex:
|
|
2881
|
+
datetimeRegex: Xe,
|
|
2882
2882
|
ZodString: N,
|
|
2883
|
-
ZodNumber:
|
|
2883
|
+
ZodNumber: X,
|
|
2884
2884
|
ZodBigInt: Q,
|
|
2885
2885
|
ZodBoolean: ee,
|
|
2886
|
-
ZodDate:
|
|
2887
|
-
ZodSymbol:
|
|
2888
|
-
ZodUndefined:
|
|
2889
|
-
ZodNull:
|
|
2886
|
+
ZodDate: q,
|
|
2887
|
+
ZodSymbol: Se,
|
|
2888
|
+
ZodUndefined: te,
|
|
2889
|
+
ZodNull: se,
|
|
2890
2890
|
ZodAny: K,
|
|
2891
|
-
ZodUnknown:
|
|
2891
|
+
ZodUnknown: D,
|
|
2892
2892
|
ZodNever: P,
|
|
2893
|
-
ZodVoid:
|
|
2893
|
+
ZodVoid: Te,
|
|
2894
2894
|
ZodArray: V,
|
|
2895
2895
|
ZodObject: S,
|
|
2896
|
-
ZodUnion:
|
|
2897
|
-
ZodDiscriminatedUnion:
|
|
2898
|
-
ZodIntersection:
|
|
2896
|
+
ZodUnion: ae,
|
|
2897
|
+
ZodDiscriminatedUnion: Ae,
|
|
2898
|
+
ZodIntersection: ne,
|
|
2899
2899
|
ZodTuple: I,
|
|
2900
|
-
ZodRecord:
|
|
2901
|
-
ZodMap:
|
|
2902
|
-
ZodSet:
|
|
2903
|
-
ZodFunction:
|
|
2904
|
-
ZodLazy:
|
|
2905
|
-
ZodLiteral:
|
|
2906
|
-
ZodEnum:
|
|
2907
|
-
ZodNativeEnum:
|
|
2908
|
-
ZodPromise:
|
|
2909
|
-
ZodEffects:
|
|
2910
|
-
ZodTransformer:
|
|
2911
|
-
ZodOptional:
|
|
2900
|
+
ZodRecord: ie,
|
|
2901
|
+
ZodMap: Ne,
|
|
2902
|
+
ZodSet: Ce,
|
|
2903
|
+
ZodFunction: Qe,
|
|
2904
|
+
ZodLazy: re,
|
|
2905
|
+
ZodLiteral: oe,
|
|
2906
|
+
ZodEnum: he,
|
|
2907
|
+
ZodNativeEnum: ce,
|
|
2908
|
+
ZodPromise: W,
|
|
2909
|
+
ZodEffects: O,
|
|
2910
|
+
ZodTransformer: O,
|
|
2911
|
+
ZodOptional: A,
|
|
2912
2912
|
ZodNullable: M,
|
|
2913
|
-
ZodDefault:
|
|
2914
|
-
ZodCatch:
|
|
2915
|
-
ZodNaN:
|
|
2916
|
-
BRAND:
|
|
2917
|
-
ZodBranded:
|
|
2918
|
-
ZodPipeline:
|
|
2919
|
-
ZodReadonly:
|
|
2920
|
-
custom:
|
|
2913
|
+
ZodDefault: de,
|
|
2914
|
+
ZodCatch: ue,
|
|
2915
|
+
ZodNaN: Oe,
|
|
2916
|
+
BRAND: Ot,
|
|
2917
|
+
ZodBranded: qe,
|
|
2918
|
+
ZodPipeline: pe,
|
|
2919
|
+
ZodReadonly: le,
|
|
2920
|
+
custom: tt,
|
|
2921
2921
|
Schema: _,
|
|
2922
2922
|
ZodSchema: _,
|
|
2923
|
-
late:
|
|
2923
|
+
late: At,
|
|
2924
2924
|
get ZodFirstPartyTypeKind() {
|
|
2925
2925
|
return m;
|
|
2926
2926
|
},
|
|
2927
|
-
coerce:
|
|
2928
|
-
any:
|
|
2929
|
-
array:
|
|
2930
|
-
bigint:
|
|
2931
|
-
boolean:
|
|
2932
|
-
date:
|
|
2933
|
-
discriminatedUnion:
|
|
2934
|
-
effect:
|
|
2935
|
-
enum:
|
|
2936
|
-
function:
|
|
2937
|
-
instanceof:
|
|
2938
|
-
intersection:
|
|
2939
|
-
lazy:
|
|
2940
|
-
literal:
|
|
2941
|
-
map:
|
|
2942
|
-
nan:
|
|
2943
|
-
nativeEnum:
|
|
2944
|
-
never:
|
|
2945
|
-
null:
|
|
2946
|
-
nullable:
|
|
2947
|
-
number:
|
|
2948
|
-
object:
|
|
2949
|
-
oboolean:
|
|
2950
|
-
onumber:
|
|
2951
|
-
optional:
|
|
2952
|
-
ostring:
|
|
2953
|
-
pipeline:
|
|
2954
|
-
preprocess:
|
|
2955
|
-
promise:
|
|
2956
|
-
record:
|
|
2957
|
-
set:
|
|
2958
|
-
strictObject:
|
|
2959
|
-
string:
|
|
2960
|
-
symbol:
|
|
2961
|
-
transformer:
|
|
2962
|
-
tuple:
|
|
2963
|
-
undefined:
|
|
2964
|
-
union:
|
|
2965
|
-
unknown:
|
|
2966
|
-
void:
|
|
2967
|
-
NEVER:
|
|
2927
|
+
coerce: ls,
|
|
2928
|
+
any: Ft,
|
|
2929
|
+
array: qt,
|
|
2930
|
+
bigint: jt,
|
|
2931
|
+
boolean: nt,
|
|
2932
|
+
date: $t,
|
|
2933
|
+
discriminatedUnion: Ht,
|
|
2934
|
+
effect: Ue,
|
|
2935
|
+
enum: ts,
|
|
2936
|
+
function: Xt,
|
|
2937
|
+
instanceof: Et,
|
|
2938
|
+
intersection: Kt,
|
|
2939
|
+
lazy: Qt,
|
|
2940
|
+
literal: es,
|
|
2941
|
+
map: Yt,
|
|
2942
|
+
nan: It,
|
|
2943
|
+
nativeEnum: ss,
|
|
2944
|
+
never: Dt,
|
|
2945
|
+
null: Mt,
|
|
2946
|
+
nullable: is,
|
|
2947
|
+
number: at,
|
|
2948
|
+
object: Vt,
|
|
2949
|
+
oboolean: us,
|
|
2950
|
+
onumber: ds,
|
|
2951
|
+
optional: ns,
|
|
2952
|
+
ostring: cs,
|
|
2953
|
+
pipeline: os,
|
|
2954
|
+
preprocess: rs,
|
|
2955
|
+
promise: as,
|
|
2956
|
+
record: Jt,
|
|
2957
|
+
set: Gt,
|
|
2958
|
+
strictObject: Bt,
|
|
2959
|
+
string: st,
|
|
2960
|
+
symbol: Pt,
|
|
2961
|
+
transformer: Ue,
|
|
2962
|
+
tuple: Wt,
|
|
2963
|
+
undefined: Rt,
|
|
2964
|
+
union: Ut,
|
|
2965
|
+
unknown: Lt,
|
|
2966
|
+
void: zt,
|
|
2967
|
+
NEVER: hs,
|
|
2968
2968
|
ZodIssueCode: d,
|
|
2969
|
-
quotelessJson:
|
|
2969
|
+
quotelessJson: it,
|
|
2970
2970
|
ZodError: C
|
|
2971
2971
|
});
|
|
2972
|
-
const
|
|
2973
|
-
version:
|
|
2972
|
+
const ps = "1.4.3", fs = {
|
|
2973
|
+
version: ps
|
|
2974
2974
|
};
|
|
2975
|
-
class
|
|
2975
|
+
class ms {
|
|
2976
2976
|
constructor(e) {
|
|
2977
2977
|
this._client = e;
|
|
2978
2978
|
}
|
|
@@ -2991,7 +2991,7 @@ class ps {
|
|
|
2991
2991
|
return e.account;
|
|
2992
2992
|
}
|
|
2993
2993
|
}
|
|
2994
|
-
class
|
|
2994
|
+
class ys {
|
|
2995
2995
|
constructor(e) {
|
|
2996
2996
|
this._client = e;
|
|
2997
2997
|
}
|
|
@@ -3053,7 +3053,7 @@ class fs {
|
|
|
3053
3053
|
});
|
|
3054
3054
|
}
|
|
3055
3055
|
}
|
|
3056
|
-
class
|
|
3056
|
+
class gs {
|
|
3057
3057
|
constructor(e) {
|
|
3058
3058
|
this._client = e;
|
|
3059
3059
|
}
|
|
@@ -3077,10 +3077,10 @@ class ms {
|
|
|
3077
3077
|
return e.deviceInformation;
|
|
3078
3078
|
}
|
|
3079
3079
|
}
|
|
3080
|
-
function
|
|
3080
|
+
function _s(a, e = console.error) {
|
|
3081
3081
|
a().catch(e);
|
|
3082
3082
|
}
|
|
3083
|
-
class
|
|
3083
|
+
class $s {
|
|
3084
3084
|
constructor(e) {
|
|
3085
3085
|
this._client = e;
|
|
3086
3086
|
}
|
|
@@ -3088,7 +3088,7 @@ class js {
|
|
|
3088
3088
|
return (await this._client.request("environment.getColorScheme", {})).colorScheme;
|
|
3089
3089
|
}
|
|
3090
3090
|
subscribeColorScheme(e) {
|
|
3091
|
-
|
|
3091
|
+
_s(async () => {
|
|
3092
3092
|
this._client.on("environment.colorSchemeChanged", e), e(await this.getColorScheme());
|
|
3093
3093
|
});
|
|
3094
3094
|
}
|
|
@@ -3096,7 +3096,7 @@ class js {
|
|
|
3096
3096
|
this._client.off("environment.colorSchemeChanged", e);
|
|
3097
3097
|
}
|
|
3098
3098
|
}
|
|
3099
|
-
class
|
|
3099
|
+
class vs {
|
|
3100
3100
|
constructor(e) {
|
|
3101
3101
|
this._client = e;
|
|
3102
3102
|
}
|
|
@@ -3142,7 +3142,7 @@ class gs {
|
|
|
3142
3142
|
})).content;
|
|
3143
3143
|
}
|
|
3144
3144
|
}
|
|
3145
|
-
class
|
|
3145
|
+
class ws {
|
|
3146
3146
|
constructor(e) {
|
|
3147
3147
|
this._client = e;
|
|
3148
3148
|
}
|
|
@@ -3272,7 +3272,7 @@ class me {
|
|
|
3272
3272
|
*
|
|
3273
3273
|
* @param key The key to unsubscribe from
|
|
3274
3274
|
* @param handler Optional. The specific handler to remove. If not provided, all handlers for this key will be removed.
|
|
3275
|
-
* @returns A promise that resolves to true if the
|
|
3275
|
+
* @returns A promise that resolves to true if the unsubscribe was successful
|
|
3276
3276
|
*/
|
|
3277
3277
|
async unsubscribe(e, t) {
|
|
3278
3278
|
return (await this._client.unsubscribe("store.unsubscribe", {
|
|
@@ -3298,7 +3298,7 @@ class me {
|
|
|
3298
3298
|
})).success;
|
|
3299
3299
|
}
|
|
3300
3300
|
}
|
|
3301
|
-
class
|
|
3301
|
+
class bs {
|
|
3302
3302
|
constructor(e) {
|
|
3303
3303
|
this._client = e;
|
|
3304
3304
|
}
|
|
@@ -3321,12 +3321,12 @@ class vs {
|
|
|
3321
3321
|
return e.user;
|
|
3322
3322
|
}
|
|
3323
3323
|
}
|
|
3324
|
-
class
|
|
3324
|
+
class ks {
|
|
3325
3325
|
constructor(e) {
|
|
3326
3326
|
this._client = e;
|
|
3327
3327
|
}
|
|
3328
3328
|
/**
|
|
3329
|
-
* Retrieves current weather conditions for a specified location
|
|
3329
|
+
* Retrieves current weather conditions for a specified location.
|
|
3330
3330
|
*
|
|
3331
3331
|
* @param params - Weather request parameters including location and units
|
|
3332
3332
|
* @returns A promise that resolves to the current weather conditions
|
|
@@ -3351,7 +3351,7 @@ class ws {
|
|
|
3351
3351
|
return t.conditions;
|
|
3352
3352
|
}
|
|
3353
3353
|
/**
|
|
3354
|
-
* Retrieves daily weather forecast for a specified location
|
|
3354
|
+
* Retrieves daily weather forecast for a specified location.
|
|
3355
3355
|
*
|
|
3356
3356
|
* @param params - Forecast request parameters including location, units, and number of days
|
|
3357
3357
|
* @returns A promise that resolves to an array of daily forecast data
|
|
@@ -3374,7 +3374,7 @@ class ws {
|
|
|
3374
3374
|
return t.forecast;
|
|
3375
3375
|
}
|
|
3376
3376
|
/**
|
|
3377
|
-
* Retrieves hourly weather forecast for a specified location
|
|
3377
|
+
* Retrieves hourly weather forecast for a specified location.
|
|
3378
3378
|
*
|
|
3379
3379
|
* @param params - Forecast request parameters including location, units, and number of hours
|
|
3380
3380
|
* @returns A promise that resolves to an array of hourly forecast data
|
|
@@ -3396,75 +3396,16 @@ class ws {
|
|
|
3396
3396
|
throw new Error(t.error || "Failed to fetch hourly forecast");
|
|
3397
3397
|
return t.forecast;
|
|
3398
3398
|
}
|
|
3399
|
-
/**
|
|
3400
|
-
* Retrieves current weather conditions using AccuWeather.
|
|
3401
|
-
*
|
|
3402
|
-
* @param params - Weather request parameters including location and units
|
|
3403
|
-
* @returns A promise that resolves to the AccuWeather conditions data
|
|
3404
|
-
* @throws {Error} If the request fails or location is invalid
|
|
3405
|
-
*
|
|
3406
|
-
* @example
|
|
3407
|
-
* ```typescript
|
|
3408
|
-
* const weather = await weather.getAccuWeatherConditions({
|
|
3409
|
-
* city: 'Paris',
|
|
3410
|
-
* units: 'metric'
|
|
3411
|
-
* })
|
|
3412
|
-
* ```
|
|
3413
|
-
*/
|
|
3414
|
-
async getAccuWeatherConditions(e) {
|
|
3415
|
-
const t = await this._client.request("weather.getAccuWeatherConditions", e);
|
|
3416
|
-
if (!t.success || !t.data)
|
|
3417
|
-
throw new Error(t.error || "Failed to fetch AccuWeather conditions");
|
|
3418
|
-
return t.data;
|
|
3419
|
-
}
|
|
3420
|
-
/**
|
|
3421
|
-
* Retrieves daily forecast using AccuWeather.
|
|
3422
|
-
*
|
|
3423
|
-
* @param params - Forecast request parameters including location and units
|
|
3424
|
-
* @returns A promise that resolves to the AccuWeather daily forecast data
|
|
3425
|
-
* @throws {Error} If the request fails or location is invalid
|
|
3426
|
-
*
|
|
3427
|
-
* @example
|
|
3428
|
-
* ```typescript
|
|
3429
|
-
* const forecast = await weather.getAccuWeatherDailyForecast({
|
|
3430
|
-
* city: 'Sydney',
|
|
3431
|
-
* units: 'metric'
|
|
3432
|
-
* })
|
|
3433
|
-
* ```
|
|
3434
|
-
*/
|
|
3435
|
-
async getAccuWeatherDailyForecast(e) {
|
|
3436
|
-
const t = await this._client.request("weather.getAccuWeatherDailyForecast", e);
|
|
3437
|
-
if (!t.success || !t.data)
|
|
3438
|
-
throw new Error(t.error || "Failed to fetch AccuWeather daily forecast");
|
|
3439
|
-
return t.data;
|
|
3440
|
-
}
|
|
3441
|
-
/**
|
|
3442
|
-
* Retrieves hourly forecast using AccuWeather.
|
|
3443
|
-
*
|
|
3444
|
-
* @param params - Forecast request parameters including location and units
|
|
3445
|
-
* @returns A promise that resolves to the AccuWeather hourly forecast data
|
|
3446
|
-
* @throws {Error} If the request fails or location is invalid
|
|
3447
|
-
*
|
|
3448
|
-
* @example
|
|
3449
|
-
* ```typescript
|
|
3450
|
-
* const forecast = await weather.getAccuWeatherHourlyForecast({
|
|
3451
|
-
* city: 'Berlin',
|
|
3452
|
-
* units: 'metric'
|
|
3453
|
-
* })
|
|
3454
|
-
* ```
|
|
3455
|
-
*/
|
|
3456
|
-
async getAccuWeatherHourlyForecast(e) {
|
|
3457
|
-
const t = await this._client.request("weather.getAccuWeatherHourlyForecast", e);
|
|
3458
|
-
if (!t.success || !t.data)
|
|
3459
|
-
throw new Error(t.error || "Failed to fetch AccuWeather hourly forecast");
|
|
3460
|
-
return t.data;
|
|
3461
|
-
}
|
|
3462
3399
|
}
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3400
|
+
function ye(a) {
|
|
3401
|
+
return { ...a, type: "client" };
|
|
3402
|
+
}
|
|
3403
|
+
const xs = fe.object({
|
|
3404
|
+
type: fe.literal("bridge"),
|
|
3405
|
+
name: fe.string(),
|
|
3406
|
+
data: fe.any()
|
|
3466
3407
|
});
|
|
3467
|
-
class
|
|
3408
|
+
class Zs {
|
|
3468
3409
|
/**
|
|
3469
3410
|
* Creates a new RootSettingsNavigation API instance.
|
|
3470
3411
|
*
|
|
@@ -3487,11 +3428,12 @@ class ks {
|
|
|
3487
3428
|
* @returns A promise that resolves when the navigation has been registered
|
|
3488
3429
|
*/
|
|
3489
3430
|
async setRootSettingsNavigation(e) {
|
|
3490
|
-
|
|
3491
|
-
s
|
|
3492
|
-
|
|
3431
|
+
var t;
|
|
3432
|
+
const s = this._store.shared("root-settings-navigation"), n = (t = await s.get("navigation")) !== null && t !== void 0 ? t : {}, i = this._store._client._applicationSpecifier;
|
|
3433
|
+
n[i] = {
|
|
3434
|
+
applicationSpecifier: i,
|
|
3493
3435
|
entries: e.entries
|
|
3494
|
-
},
|
|
3436
|
+
}, s.set("navigation", n);
|
|
3495
3437
|
}
|
|
3496
3438
|
/**
|
|
3497
3439
|
* Retrieves the current navigation entries for this root application.
|
|
@@ -3502,8 +3444,9 @@ class ks {
|
|
|
3502
3444
|
* @returns A promise that resolves to the navigation state for this application
|
|
3503
3445
|
*/
|
|
3504
3446
|
async getRootSettingsNavigation() {
|
|
3505
|
-
|
|
3506
|
-
|
|
3447
|
+
var e;
|
|
3448
|
+
const t = (e = await this._store.shared("root-settings-navigation").get("navigation")) !== null && e !== void 0 ? e : {}, s = this._store._client._applicationSpecifier;
|
|
3449
|
+
return t[s];
|
|
3507
3450
|
}
|
|
3508
3451
|
/**
|
|
3509
3452
|
* Retrieves the navigation entries for all root applications.
|
|
@@ -3515,10 +3458,11 @@ class ks {
|
|
|
3515
3458
|
* @returns A promise that resolves to the navigation state for all applications
|
|
3516
3459
|
*/
|
|
3517
3460
|
async getAllRootSettingsNavigation() {
|
|
3518
|
-
|
|
3461
|
+
var e;
|
|
3462
|
+
return (e = await this._store.shared("root-settings-navigation").get("navigation")) !== null && e !== void 0 ? e : {};
|
|
3519
3463
|
}
|
|
3520
3464
|
}
|
|
3521
|
-
class
|
|
3465
|
+
class Ss {
|
|
3522
3466
|
constructor(e) {
|
|
3523
3467
|
this._client = e;
|
|
3524
3468
|
}
|
|
@@ -3557,8 +3501,8 @@ class xs {
|
|
|
3557
3501
|
return i.body !== null && i.body !== void 0 && (typeof i.body == "string" || i.body instanceof ArrayBuffer ? c = i.body : typeof i.body == "object" && (c = JSON.stringify(i.body))), new Response(c, o);
|
|
3558
3502
|
}
|
|
3559
3503
|
}
|
|
3560
|
-
const
|
|
3561
|
-
class
|
|
3504
|
+
const B = 1e3 * 30;
|
|
3505
|
+
class Ts {
|
|
3562
3506
|
/**
|
|
3563
3507
|
* Creates a new Client instance for communicating with the TelemetryOS platform.
|
|
3564
3508
|
*
|
|
@@ -3584,7 +3528,7 @@ class Zs {
|
|
|
3584
3528
|
* @returns An Accounts instance bound to this client
|
|
3585
3529
|
*/
|
|
3586
3530
|
get accounts() {
|
|
3587
|
-
return new
|
|
3531
|
+
return new ms(this);
|
|
3588
3532
|
}
|
|
3589
3533
|
/**
|
|
3590
3534
|
* Provides access to the users API for retrieving TelemetryOS user information.
|
|
@@ -3598,7 +3542,7 @@ class Zs {
|
|
|
3598
3542
|
* @returns A Users instance bound to this client
|
|
3599
3543
|
*/
|
|
3600
3544
|
get users() {
|
|
3601
|
-
return new
|
|
3545
|
+
return new bs(this);
|
|
3602
3546
|
}
|
|
3603
3547
|
/**
|
|
3604
3548
|
* Provides access to the store API for data persistence with multiple storage scopes.
|
|
@@ -3612,7 +3556,7 @@ class Zs {
|
|
|
3612
3556
|
* @returns A Store instance bound to this client
|
|
3613
3557
|
*/
|
|
3614
3558
|
get store() {
|
|
3615
|
-
return new
|
|
3559
|
+
return new ws(this);
|
|
3616
3560
|
}
|
|
3617
3561
|
/**
|
|
3618
3562
|
* Provides access to the applications API for discovering other TelemetryOS applications.
|
|
@@ -3626,7 +3570,7 @@ class Zs {
|
|
|
3626
3570
|
* @returns An Applications instance bound to this client
|
|
3627
3571
|
*/
|
|
3628
3572
|
get applications() {
|
|
3629
|
-
return new
|
|
3573
|
+
return new ys(this);
|
|
3630
3574
|
}
|
|
3631
3575
|
/**
|
|
3632
3576
|
* Provides access to the media API for working with content hosted on the TelemetryOS platform.
|
|
@@ -3641,13 +3585,13 @@ class Zs {
|
|
|
3641
3585
|
* @returns A Media instance bound to this client
|
|
3642
3586
|
*/
|
|
3643
3587
|
get media() {
|
|
3644
|
-
return new
|
|
3588
|
+
return new vs(this);
|
|
3645
3589
|
}
|
|
3646
3590
|
/**
|
|
3647
|
-
* Provides access to the proxy API for fetching third-party content through the TelemetryOS
|
|
3591
|
+
* Provides access to the proxy API for fetching third-party content through the TelemetryOS API.
|
|
3648
3592
|
*
|
|
3649
3593
|
* This property returns a new Proxy instance that allows applications to fetch content from external
|
|
3650
|
-
* URLs through the platform
|
|
3594
|
+
* URLs through the platform, which handles authentication, caching, and CORS issues.
|
|
3651
3595
|
*
|
|
3652
3596
|
* NOTE: Most application developers should use the global proxy() function
|
|
3653
3597
|
* instead of accessing this property directly.
|
|
@@ -3655,7 +3599,7 @@ class Zs {
|
|
|
3655
3599
|
* @returns A Proxy instance bound to this client
|
|
3656
3600
|
*/
|
|
3657
3601
|
get proxy() {
|
|
3658
|
-
return new
|
|
3602
|
+
return new Ss(this);
|
|
3659
3603
|
}
|
|
3660
3604
|
/**
|
|
3661
3605
|
* Provides access to the devices API for interacting with the current device.
|
|
@@ -3670,7 +3614,7 @@ class Zs {
|
|
|
3670
3614
|
* @returns A Devices instance bound to this client
|
|
3671
3615
|
*/
|
|
3672
3616
|
get devices() {
|
|
3673
|
-
return new
|
|
3617
|
+
return new gs(this);
|
|
3674
3618
|
}
|
|
3675
3619
|
/**
|
|
3676
3620
|
* Provides access to the root settings navigation API for TelemetryOS administration UI integration.
|
|
@@ -3688,14 +3632,13 @@ class Zs {
|
|
|
3688
3632
|
* @throws {Error} If used by an application not mounted at the 'rootSettingsNavigation' mount point
|
|
3689
3633
|
*/
|
|
3690
3634
|
get rootSettingsNavigation() {
|
|
3691
|
-
return new
|
|
3635
|
+
return new Zs(this.store);
|
|
3692
3636
|
}
|
|
3693
3637
|
/**
|
|
3694
3638
|
* Provides access to the weather API for retrieving weather data.
|
|
3695
3639
|
*
|
|
3696
3640
|
* This property returns a new Weather instance that allows applications to fetch
|
|
3697
|
-
* current weather conditions and forecasts
|
|
3698
|
-
* through the General Integrations Service.
|
|
3641
|
+
* current weather conditions and forecasts through the TelemetryOS API.
|
|
3699
3642
|
*
|
|
3700
3643
|
* NOTE: Most application developers should use the global weather() function
|
|
3701
3644
|
* instead of accessing this property directly.
|
|
@@ -3703,7 +3646,7 @@ class Zs {
|
|
|
3703
3646
|
* @returns A Weather instance bound to this client
|
|
3704
3647
|
*/
|
|
3705
3648
|
get weather() {
|
|
3706
|
-
return new
|
|
3649
|
+
return new ks(this);
|
|
3707
3650
|
}
|
|
3708
3651
|
get applicationName() {
|
|
3709
3652
|
return this._applicationName;
|
|
@@ -3745,11 +3688,13 @@ class Zs {
|
|
|
3745
3688
|
if (!this._applicationInstance)
|
|
3746
3689
|
throw new Error("Missing telemetryApplicationId query parameter");
|
|
3747
3690
|
this._windowMessageHandler = (i) => {
|
|
3748
|
-
if (i.source === window)
|
|
3691
|
+
if (i.source === window || !i.data || !("type" in i.data) || i.data.type !== "client" && i.data.type !== "bridge")
|
|
3749
3692
|
return;
|
|
3750
|
-
|
|
3751
|
-
window.
|
|
3752
|
-
|
|
3693
|
+
if (i.data.type === "client") {
|
|
3694
|
+
window.parent.postMessage(i.data, "*");
|
|
3695
|
+
return;
|
|
3696
|
+
}
|
|
3697
|
+
const r = xs.safeParse(i.data);
|
|
3753
3698
|
if (!r.success)
|
|
3754
3699
|
return;
|
|
3755
3700
|
const o = r.data, c = this._onHandlers.get(o.name), u = this._onceHandlers.get(o.name);
|
|
@@ -3761,6 +3706,8 @@ class Zs {
|
|
|
3761
3706
|
f(o.data);
|
|
3762
3707
|
this._onceHandlers.delete(o.name);
|
|
3763
3708
|
}
|
|
3709
|
+
for (let f = 0; f < window.frames.length; f += 1)
|
|
3710
|
+
window.frames[f].postMessage(i.data, "*");
|
|
3764
3711
|
}, window.addEventListener("message", this._windowMessageHandler);
|
|
3765
3712
|
}
|
|
3766
3713
|
/**
|
|
@@ -3793,14 +3740,14 @@ class Zs {
|
|
|
3793
3740
|
* @param data The data payload to include with the message
|
|
3794
3741
|
*/
|
|
3795
3742
|
send(e, t) {
|
|
3796
|
-
const s = {
|
|
3797
|
-
telemetrySdkVersion:
|
|
3743
|
+
const s = ye({
|
|
3744
|
+
telemetrySdkVersion: _e,
|
|
3798
3745
|
applicationName: this._applicationName,
|
|
3799
3746
|
applicationSpecifier: this._applicationSpecifier,
|
|
3800
3747
|
applicationInstance: this._applicationInstance,
|
|
3801
3748
|
name: e,
|
|
3802
3749
|
data: t
|
|
3803
|
-
};
|
|
3750
|
+
});
|
|
3804
3751
|
window.parent.postMessage(s, "*");
|
|
3805
3752
|
}
|
|
3806
3753
|
/**
|
|
@@ -3821,22 +3768,22 @@ class Zs {
|
|
|
3821
3768
|
* @throws {Error} If the request times out
|
|
3822
3769
|
*/
|
|
3823
3770
|
request(e, t) {
|
|
3824
|
-
const s =
|
|
3825
|
-
telemetrySdkVersion:
|
|
3771
|
+
const s = ge(), n = ye({
|
|
3772
|
+
telemetrySdkVersion: _e,
|
|
3826
3773
|
applicationName: this._applicationName,
|
|
3827
3774
|
applicationSpecifier: this._applicationSpecifier,
|
|
3828
3775
|
applicationInstance: this._applicationInstance,
|
|
3829
3776
|
name: e,
|
|
3830
3777
|
data: t,
|
|
3831
3778
|
responseName: s
|
|
3832
|
-
};
|
|
3779
|
+
});
|
|
3833
3780
|
window.parent.postMessage(n, "*");
|
|
3834
3781
|
let i = !1, r;
|
|
3835
3782
|
const o = new Promise((u, f) => {
|
|
3836
|
-
const b = new Error(`${e} message request with response name of ${s} timed out after ${
|
|
3783
|
+
const b = new Error(`${e} message request with response name of ${s} timed out after ${B}`);
|
|
3837
3784
|
setTimeout(() => {
|
|
3838
3785
|
i = !0, this.off(s, r), f(b);
|
|
3839
|
-
},
|
|
3786
|
+
}, B);
|
|
3840
3787
|
}), c = new Promise((u) => {
|
|
3841
3788
|
r = (f) => {
|
|
3842
3789
|
i || u(f);
|
|
@@ -3847,11 +3794,11 @@ class Zs {
|
|
|
3847
3794
|
async subscribe(e, t, s) {
|
|
3848
3795
|
let n, i;
|
|
3849
3796
|
typeof t == "function" ? i = t : (n = t, i = s);
|
|
3850
|
-
const r =
|
|
3797
|
+
const r = ge(), o = ge();
|
|
3851
3798
|
let c = this._subscriptionNamesBySubjectName.get(e);
|
|
3852
3799
|
c || (c = [], this._subscriptionNamesBySubjectName.set(e, c)), c.push(r), this._subscriptionNamesByHandler.set(i, r), this.on(r, i);
|
|
3853
|
-
const u = {
|
|
3854
|
-
telemetrySdkVersion:
|
|
3800
|
+
const u = ye({
|
|
3801
|
+
telemetrySdkVersion: _e,
|
|
3855
3802
|
applicationName: this._applicationName,
|
|
3856
3803
|
applicationSpecifier: this._applicationSpecifier,
|
|
3857
3804
|
applicationInstance: this._applicationInstance,
|
|
@@ -3859,25 +3806,25 @@ class Zs {
|
|
|
3859
3806
|
data: n,
|
|
3860
3807
|
responseName: o,
|
|
3861
3808
|
subscriptionName: r
|
|
3862
|
-
};
|
|
3809
|
+
});
|
|
3863
3810
|
window.parent.postMessage(u, "*");
|
|
3864
3811
|
let f = !1, b;
|
|
3865
|
-
const j = new Promise((
|
|
3866
|
-
const
|
|
3812
|
+
const j = new Promise((F, L) => {
|
|
3813
|
+
const Ie = new Error(`${e} subscribe request with subscription name of ${r} and response name of ${o} timed out after ${B}`);
|
|
3867
3814
|
setTimeout(() => {
|
|
3868
|
-
f = !0, this.off(o, b), L(
|
|
3869
|
-
},
|
|
3870
|
-
}),
|
|
3815
|
+
f = !0, this.off(o, b), L(Ie);
|
|
3816
|
+
}, B);
|
|
3817
|
+
}), Ee = new Promise((F) => {
|
|
3871
3818
|
b = (L) => {
|
|
3872
|
-
f ||
|
|
3873
|
-
}, this.on(o,
|
|
3819
|
+
f || F(L);
|
|
3820
|
+
}, this.on(o, F);
|
|
3874
3821
|
});
|
|
3875
|
-
return Promise.race([j,
|
|
3822
|
+
return Promise.race([j, Ee]);
|
|
3876
3823
|
}
|
|
3877
3824
|
async unsubscribe(e, t, s) {
|
|
3878
3825
|
let n, i;
|
|
3879
3826
|
typeof t == "function" ? i = t : (n = t, i = s);
|
|
3880
|
-
const r =
|
|
3827
|
+
const r = ge();
|
|
3881
3828
|
let o = [];
|
|
3882
3829
|
if (i) {
|
|
3883
3830
|
const c = this._subscriptionNamesByHandler.get(i);
|
|
@@ -3888,8 +3835,8 @@ class Zs {
|
|
|
3888
3835
|
return { success: !1 };
|
|
3889
3836
|
for await (const c of o) {
|
|
3890
3837
|
this.off(c, i);
|
|
3891
|
-
const u = {
|
|
3892
|
-
telemetrySdkVersion:
|
|
3838
|
+
const u = ye({
|
|
3839
|
+
telemetrySdkVersion: _e,
|
|
3893
3840
|
applicationInstance: this._applicationInstance,
|
|
3894
3841
|
applicationName: this._applicationName,
|
|
3895
3842
|
applicationSpecifier: this._applicationSpecifier,
|
|
@@ -3897,20 +3844,20 @@ class Zs {
|
|
|
3897
3844
|
data: n,
|
|
3898
3845
|
responseName: r,
|
|
3899
3846
|
unsubscribeName: c
|
|
3900
|
-
};
|
|
3847
|
+
});
|
|
3901
3848
|
window.parent.postMessage(u, "*");
|
|
3902
3849
|
let f = !1, b;
|
|
3903
|
-
const j = new Promise((
|
|
3904
|
-
const
|
|
3850
|
+
const j = new Promise((F, L) => {
|
|
3851
|
+
const Ie = new Error(`${e} unsubscribe request with unsubscribe name of ${c} and response name of ${r} timed out after ${B}`);
|
|
3905
3852
|
setTimeout(() => {
|
|
3906
|
-
f = !0, this.off(r, b), L(
|
|
3907
|
-
},
|
|
3908
|
-
}),
|
|
3853
|
+
f = !0, this.off(r, b), L(Ie);
|
|
3854
|
+
}, B);
|
|
3855
|
+
}), Ee = new Promise((F) => {
|
|
3909
3856
|
b = (L) => {
|
|
3910
|
-
f ||
|
|
3911
|
-
}, this.once(r,
|
|
3857
|
+
f || F(L);
|
|
3858
|
+
}, this.once(r, F);
|
|
3912
3859
|
});
|
|
3913
|
-
if (!(await Promise.race([j,
|
|
3860
|
+
if (!(await Promise.race([j, Ee])).success)
|
|
3914
3861
|
return { success: !1 };
|
|
3915
3862
|
}
|
|
3916
3863
|
return { success: !0 };
|
|
@@ -3987,11 +3934,11 @@ class Zs {
|
|
|
3987
3934
|
}
|
|
3988
3935
|
}
|
|
3989
3936
|
}
|
|
3990
|
-
function
|
|
3937
|
+
function ge() {
|
|
3991
3938
|
return Math.random().toString(36).slice(2, 9);
|
|
3992
3939
|
}
|
|
3993
|
-
const
|
|
3994
|
-
class
|
|
3940
|
+
const _e = fs.version;
|
|
3941
|
+
class Ns {
|
|
3995
3942
|
constructor(e) {
|
|
3996
3943
|
this._client = e;
|
|
3997
3944
|
}
|
|
@@ -4040,7 +3987,7 @@ class Ss {
|
|
|
4040
3987
|
return !0;
|
|
4041
3988
|
}
|
|
4042
3989
|
}
|
|
4043
|
-
class
|
|
3990
|
+
class Cs {
|
|
4044
3991
|
constructor(e) {
|
|
4045
3992
|
this._client = e;
|
|
4046
3993
|
}
|
|
@@ -4096,93 +4043,103 @@ class Ts {
|
|
|
4096
4043
|
return !0;
|
|
4097
4044
|
}
|
|
4098
4045
|
}
|
|
4099
|
-
class
|
|
4046
|
+
class Os extends Ts {
|
|
4100
4047
|
get playlist() {
|
|
4101
|
-
return new
|
|
4048
|
+
return new Cs(this);
|
|
4102
4049
|
}
|
|
4103
4050
|
get overrides() {
|
|
4104
|
-
return new
|
|
4051
|
+
return new Ns(this);
|
|
4105
4052
|
}
|
|
4106
4053
|
}
|
|
4107
4054
|
let v = null;
|
|
4108
|
-
function
|
|
4055
|
+
function Ps() {
|
|
4109
4056
|
return v;
|
|
4110
4057
|
}
|
|
4111
|
-
function
|
|
4112
|
-
v = new
|
|
4058
|
+
function Rs(a) {
|
|
4059
|
+
v = new Os(a), v.bind();
|
|
4113
4060
|
}
|
|
4114
|
-
function
|
|
4061
|
+
function Ms() {
|
|
4115
4062
|
v == null || v.unbind(), v = null;
|
|
4116
4063
|
}
|
|
4117
4064
|
function Fs(...a) {
|
|
4118
|
-
return
|
|
4065
|
+
return k(v), v.on(...a);
|
|
4119
4066
|
}
|
|
4120
|
-
function
|
|
4121
|
-
return
|
|
4067
|
+
function Ls(...a) {
|
|
4068
|
+
return k(v), v.once(...a);
|
|
4122
4069
|
}
|
|
4123
4070
|
function Ds(...a) {
|
|
4124
|
-
return
|
|
4071
|
+
return k(v), v.off(...a);
|
|
4125
4072
|
}
|
|
4126
|
-
function
|
|
4127
|
-
return
|
|
4073
|
+
function zs(...a) {
|
|
4074
|
+
return k(v), v.send(...a);
|
|
4128
4075
|
}
|
|
4129
4076
|
function qs(...a) {
|
|
4130
|
-
return
|
|
4131
|
-
}
|
|
4132
|
-
function zs(...a) {
|
|
4133
|
-
return Z(v), v.subscribe(...a);
|
|
4077
|
+
return k(v), v.request(...a);
|
|
4134
4078
|
}
|
|
4135
4079
|
function Vs(...a) {
|
|
4136
|
-
return
|
|
4080
|
+
return k(v), v.subscribe(...a);
|
|
4137
4081
|
}
|
|
4138
|
-
function Bs() {
|
|
4139
|
-
return
|
|
4082
|
+
function Bs(...a) {
|
|
4083
|
+
return k(v), v.unsubscribe(...a);
|
|
4140
4084
|
}
|
|
4141
4085
|
function Us() {
|
|
4142
|
-
return
|
|
4086
|
+
return k(v), v.store;
|
|
4143
4087
|
}
|
|
4144
4088
|
function Hs() {
|
|
4145
|
-
return
|
|
4146
|
-
}
|
|
4147
|
-
function Ws() {
|
|
4148
|
-
return Z(v), v.playlist;
|
|
4089
|
+
return k(v), v.applications;
|
|
4149
4090
|
}
|
|
4150
4091
|
function Ks() {
|
|
4151
|
-
return
|
|
4092
|
+
return k(v), v.media;
|
|
4093
|
+
}
|
|
4094
|
+
function Ws() {
|
|
4095
|
+
return k(v), v.playlist;
|
|
4152
4096
|
}
|
|
4153
4097
|
function Js() {
|
|
4154
|
-
return
|
|
4098
|
+
return k(v), v.overrides;
|
|
4155
4099
|
}
|
|
4156
4100
|
function Ys() {
|
|
4157
|
-
return
|
|
4101
|
+
return k(v), v.accounts;
|
|
4102
|
+
}
|
|
4103
|
+
function Gs() {
|
|
4104
|
+
return k(v), v.users;
|
|
4105
|
+
}
|
|
4106
|
+
function Xs() {
|
|
4107
|
+
return k(v), v.devices;
|
|
4108
|
+
}
|
|
4109
|
+
function Qs() {
|
|
4110
|
+
return k(v), v.weather;
|
|
4158
4111
|
}
|
|
4159
|
-
function
|
|
4112
|
+
function k(a) {
|
|
4160
4113
|
if (!a)
|
|
4161
4114
|
throw new Error("SDK is not configured");
|
|
4162
4115
|
}
|
|
4163
4116
|
export {
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4171
|
-
|
|
4172
|
-
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4117
|
+
ms as Accounts,
|
|
4118
|
+
ys as Applications,
|
|
4119
|
+
gs as Devices,
|
|
4120
|
+
$s as Environment,
|
|
4121
|
+
vs as Media,
|
|
4122
|
+
ws as Store,
|
|
4123
|
+
bs as Users,
|
|
4124
|
+
ks as Weather,
|
|
4125
|
+
Ys as accounts,
|
|
4126
|
+
Hs as applications,
|
|
4127
|
+
Rs as configure,
|
|
4128
|
+
Ms as destroy,
|
|
4129
|
+
Xs as devices,
|
|
4130
|
+
Ps as globalClient,
|
|
4131
|
+
Ks as media,
|
|
4176
4132
|
Ds as off,
|
|
4177
4133
|
Fs as on,
|
|
4178
|
-
|
|
4179
|
-
|
|
4134
|
+
Ls as once,
|
|
4135
|
+
Js as overrides,
|
|
4180
4136
|
Ws as playlist,
|
|
4181
4137
|
qs as request,
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4138
|
+
zs as send,
|
|
4139
|
+
Us as store,
|
|
4140
|
+
Vs as subscribe,
|
|
4141
|
+
_e as telemetrySdkVersion,
|
|
4142
|
+
Bs as unsubscribe,
|
|
4143
|
+
Gs as users,
|
|
4144
|
+
Qs as weather
|
|
4188
4145
|
};
|