@clockworkdog/cogs-client 3.0.0-alpha.1 → 3.0.0-alpha.3
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/AudioPlayer.js +1 -1
- package/dist/VideoPlayer.js +2 -3
- package/dist/browser/index.mjs +485 -486
- package/dist/browser/index.umd.js +4 -4
- package/package.json +2 -2
package/dist/browser/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var gt = /* @__PURE__ */ ((e) => (e.Setup = "setup", e.Preshow = "pre-show", e.InProgress = "in progress", e.Finished = "finished", e))(gt || {});
|
|
2
2
|
/*! *****************************************************************************
|
|
3
3
|
Copyright (c) Microsoft Corporation. All rights reserved.
|
|
4
4
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
@@ -20,14 +20,14 @@ var Se = function(e, t) {
|
|
|
20
20
|
for (var i in o) o.hasOwnProperty(i) && (n[i] = o[i]);
|
|
21
21
|
}, Se(e, t);
|
|
22
22
|
};
|
|
23
|
-
function
|
|
23
|
+
function yt(e, t) {
|
|
24
24
|
Se(e, t);
|
|
25
25
|
function n() {
|
|
26
26
|
this.constructor = e;
|
|
27
27
|
}
|
|
28
28
|
e.prototype = t === null ? Object.create(t) : (n.prototype = t.prototype, new n());
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function Jt(e) {
|
|
31
31
|
var t = typeof Symbol == "function" && e[Symbol.iterator], n = 0;
|
|
32
32
|
return t ? t.call(e) : {
|
|
33
33
|
next: function() {
|
|
@@ -35,7 +35,7 @@ function Ht(e) {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
|
-
function
|
|
38
|
+
function Ht(e, t) {
|
|
39
39
|
var n = typeof Symbol == "function" && e[Symbol.iterator];
|
|
40
40
|
if (!n) return e;
|
|
41
41
|
var o = n.call(e), i, u = [], c;
|
|
@@ -52,12 +52,12 @@ function Qt(e, t) {
|
|
|
52
52
|
}
|
|
53
53
|
return u;
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Qt() {
|
|
56
56
|
for (var e = [], t = 0; t < arguments.length; t++)
|
|
57
|
-
e = e.concat(
|
|
57
|
+
e = e.concat(Ht(arguments[t]));
|
|
58
58
|
return e;
|
|
59
59
|
}
|
|
60
|
-
var
|
|
60
|
+
var bt = (
|
|
61
61
|
/** @class */
|
|
62
62
|
/* @__PURE__ */ function() {
|
|
63
63
|
function e(t, n) {
|
|
@@ -65,27 +65,27 @@ var wt = (
|
|
|
65
65
|
}
|
|
66
66
|
return e;
|
|
67
67
|
}()
|
|
68
|
-
),
|
|
68
|
+
), Yt = (
|
|
69
69
|
/** @class */
|
|
70
70
|
function(e) {
|
|
71
|
-
|
|
71
|
+
yt(t, e);
|
|
72
72
|
function t(n, o) {
|
|
73
73
|
var i = e.call(this, "error", o) || this;
|
|
74
74
|
return i.message = n.message, i.error = n, i;
|
|
75
75
|
}
|
|
76
76
|
return t;
|
|
77
|
-
}(
|
|
78
|
-
),
|
|
77
|
+
}(bt)
|
|
78
|
+
), Xt = (
|
|
79
79
|
/** @class */
|
|
80
80
|
function(e) {
|
|
81
|
-
|
|
81
|
+
yt(t, e);
|
|
82
82
|
function t(n, o, i) {
|
|
83
83
|
n === void 0 && (n = 1e3), o === void 0 && (o = "");
|
|
84
84
|
var u = e.call(this, "close", i) || this;
|
|
85
85
|
return u.wasClean = !0, u.code = n, u.reason = o, u;
|
|
86
86
|
}
|
|
87
87
|
return t;
|
|
88
|
-
}(
|
|
88
|
+
}(bt)
|
|
89
89
|
);
|
|
90
90
|
/*!
|
|
91
91
|
* Reconnecting WebSocket
|
|
@@ -93,10 +93,10 @@ var wt = (
|
|
|
93
93
|
* https://github.com/pladaria/reconnecting-websocket
|
|
94
94
|
* License MIT
|
|
95
95
|
*/
|
|
96
|
-
var
|
|
96
|
+
var en = function() {
|
|
97
97
|
if (typeof WebSocket < "u")
|
|
98
98
|
return WebSocket;
|
|
99
|
-
},
|
|
99
|
+
}, tn = function(e) {
|
|
100
100
|
return typeof e < "u" && !!e && e.CLOSING === 2;
|
|
101
101
|
}, U = {
|
|
102
102
|
maxReconnectionDelay: 1e4,
|
|
@@ -106,7 +106,7 @@ var tn = function() {
|
|
|
106
106
|
connectionTimeout: 4e3,
|
|
107
107
|
maxRetries: 1 / 0,
|
|
108
108
|
maxEnqueuedMessages: 1 / 0
|
|
109
|
-
},
|
|
109
|
+
}, nn = (
|
|
110
110
|
/** @class */
|
|
111
111
|
function() {
|
|
112
112
|
function e(t, n, o) {
|
|
@@ -285,7 +285,7 @@ var tn = function() {
|
|
|
285
285
|
var n, o, i = this._listeners[t.type];
|
|
286
286
|
if (i)
|
|
287
287
|
try {
|
|
288
|
-
for (var u =
|
|
288
|
+
for (var u = Jt(i), c = u.next(); !c.done; c = u.next()) {
|
|
289
289
|
var l = c.value;
|
|
290
290
|
this._callEventListener(t, l);
|
|
291
291
|
}
|
|
@@ -306,7 +306,7 @@ var tn = function() {
|
|
|
306
306
|
}, e.prototype._debug = function() {
|
|
307
307
|
for (var t = [], n = 0; n < arguments.length; n++)
|
|
308
308
|
t[n] = arguments[n];
|
|
309
|
-
this._options.debug && console.log.apply(console,
|
|
309
|
+
this._options.debug && console.log.apply(console, Qt(["RWS>"], t));
|
|
310
310
|
}, e.prototype._getNextDelay = function() {
|
|
311
311
|
var t = this._options, n = t.reconnectionDelayGrowFactor, o = n === void 0 ? U.reconnectionDelayGrowFactor : n, i = t.minReconnectionDelay, u = i === void 0 ? U.minReconnectionDelay : i, c = t.maxReconnectionDelay, l = c === void 0 ? U.maxReconnectionDelay : c, p = 0;
|
|
312
312
|
return this._retryCount > 0 && (p = u * Math.pow(o, this._retryCount - 1), p > l && (p = l)), this._debug("next delay", p), p;
|
|
@@ -330,12 +330,12 @@ var tn = function() {
|
|
|
330
330
|
var t = this;
|
|
331
331
|
if (!(this._connectLock || !this._shouldReconnect)) {
|
|
332
332
|
this._connectLock = !0;
|
|
333
|
-
var n = this._options, o = n.maxRetries, i = o === void 0 ? U.maxRetries : o, u = n.connectionTimeout, c = u === void 0 ? U.connectionTimeout : u, l = n.WebSocket, p = l === void 0 ?
|
|
333
|
+
var n = this._options, o = n.maxRetries, i = o === void 0 ? U.maxRetries : o, u = n.connectionTimeout, c = u === void 0 ? U.connectionTimeout : u, l = n.WebSocket, p = l === void 0 ? en() : l;
|
|
334
334
|
if (this._retryCount >= i) {
|
|
335
335
|
this._debug("max retries reached", this._retryCount, ">=", i);
|
|
336
336
|
return;
|
|
337
337
|
}
|
|
338
|
-
if (this._retryCount++, this._debug("connect", this._retryCount), this._removeListeners(), !
|
|
338
|
+
if (this._retryCount++, this._debug("connect", this._retryCount), this._removeListeners(), !tn(p))
|
|
339
339
|
throw Error("No valid WebSocket class provided");
|
|
340
340
|
this._wait().then(function() {
|
|
341
341
|
return t._getNextUrl(t._url);
|
|
@@ -346,12 +346,12 @@ var tn = function() {
|
|
|
346
346
|
});
|
|
347
347
|
}
|
|
348
348
|
}, e.prototype._handleTimeout = function() {
|
|
349
|
-
this._debug("timeout event"), this._handleError(new
|
|
349
|
+
this._debug("timeout event"), this._handleError(new Yt(Error("TIMEOUT"), this));
|
|
350
350
|
}, e.prototype._disconnect = function(t, n) {
|
|
351
351
|
if (t === void 0 && (t = 1e3), this._clearTimeouts(), !!this._ws) {
|
|
352
352
|
this._removeListeners();
|
|
353
353
|
try {
|
|
354
|
-
this._ws.close(t, n), this._handleClose(new
|
|
354
|
+
this._ws.close(t, n), this._handleClose(new Xt(t, n, this));
|
|
355
355
|
} catch {
|
|
356
356
|
}
|
|
357
357
|
}
|
|
@@ -368,16 +368,16 @@ var tn = function() {
|
|
|
368
368
|
}, e;
|
|
369
369
|
}()
|
|
370
370
|
);
|
|
371
|
-
const
|
|
372
|
-
function
|
|
371
|
+
const wt = 12095;
|
|
372
|
+
function on(e) {
|
|
373
373
|
const t = typeof window < "u" ? window.location : void 0, n = `/assets/${encodeURIComponent(e)}`;
|
|
374
|
-
return `${t?.protocol}//${t?.hostname}:${
|
|
374
|
+
return `${t?.protocol}//${t?.hostname}:${wt}${n}`;
|
|
375
375
|
}
|
|
376
|
-
async function
|
|
376
|
+
async function oa(e) {
|
|
377
377
|
const t = await fetch(e);
|
|
378
378
|
return URL.createObjectURL(new Blob([await t.arrayBuffer()]));
|
|
379
379
|
}
|
|
380
|
-
class
|
|
380
|
+
class rn {
|
|
381
381
|
#e = new EventTarget();
|
|
382
382
|
constructor(t) {
|
|
383
383
|
this._items = { ...t };
|
|
@@ -420,7 +420,7 @@ class Be extends Event {
|
|
|
420
420
|
}
|
|
421
421
|
}
|
|
422
422
|
const te = globalThis.Date;
|
|
423
|
-
function
|
|
423
|
+
function sn(e) {
|
|
424
424
|
const t = e - te.now();
|
|
425
425
|
function n(...i) {
|
|
426
426
|
return i.length === 0 ? new te(n.now()) : new te(...i);
|
|
@@ -430,25 +430,25 @@ function an(e) {
|
|
|
430
430
|
return te.now() + t;
|
|
431
431
|
}, globalThis.Date = n;
|
|
432
432
|
}
|
|
433
|
-
let
|
|
434
|
-
function
|
|
435
|
-
return ++
|
|
433
|
+
let an = 0;
|
|
434
|
+
function un() {
|
|
435
|
+
return ++an;
|
|
436
436
|
}
|
|
437
|
-
const
|
|
438
|
-
function
|
|
437
|
+
const cn = 5, ln = 1e4;
|
|
438
|
+
function dn({ interval: e, send: t, onChange: n = sn, syncSampleSize: o = cn, syncRequestTimeout: i = ln }) {
|
|
439
439
|
const u = {};
|
|
440
440
|
async function c() {
|
|
441
441
|
const y = [];
|
|
442
442
|
for (let s = 0; s < o; s++) {
|
|
443
443
|
const a = new Promise((d) => {
|
|
444
|
-
const f =
|
|
444
|
+
const f = un(), v = Date.now(), h = performance.now();
|
|
445
445
|
t({ timesync: { id: f } });
|
|
446
446
|
const w = (k, C) => d({ sentAt: h, receivedAt: k, serverNow: C, clientNow: v });
|
|
447
447
|
u[f] = { complete: w }, setTimeout(() => d(null), i);
|
|
448
448
|
});
|
|
449
449
|
y.push(a), await a;
|
|
450
450
|
}
|
|
451
|
-
const g = (await Promise.all(y)).filter((s) => s !== null), r =
|
|
451
|
+
const g = (await Promise.all(y)).filter((s) => s !== null), r = pn(g);
|
|
452
452
|
isNaN(r) || n(Date.now() + r);
|
|
453
453
|
}
|
|
454
454
|
const l = (y) => {
|
|
@@ -464,22 +464,22 @@ function pn({ interval: e, send: t, onChange: n = an, syncSampleSize: o = ln, sy
|
|
|
464
464
|
}
|
|
465
465
|
};
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function pn(e) {
|
|
468
468
|
return e.map(({ sentAt: t, receivedAt: n, clientNow: o, serverNow: i }) => {
|
|
469
469
|
const u = (n - t) / 2;
|
|
470
470
|
return i - o - u;
|
|
471
471
|
}).reduce((t, n) => t + n, 0) / e.length;
|
|
472
472
|
}
|
|
473
|
-
class
|
|
474
|
-
constructor(t, { hostname: n = document.location.hostname, port: o =
|
|
475
|
-
this.manifest = t, this.eventTarget = new EventTarget(), this.currentConfig = {}, this.currentState = {}, this._showPhase =
|
|
476
|
-
const { useReconnectingWebsocket: c, path: l, pathParams: p } =
|
|
473
|
+
class ra {
|
|
474
|
+
constructor(t, { hostname: n = document.location.hostname, port: o = wt } = {}, i, u) {
|
|
475
|
+
this.manifest = t, this.eventTarget = new EventTarget(), this.currentConfig = {}, this.currentState = {}, this._showPhase = gt.Setup, this._timerState = null, this._mediaConfig = null, this.audioOutputs = void 0, this._selectedAudioOutput = "", this.currentState = { ...i }, this.store = new rn(u ?? {});
|
|
476
|
+
const { useReconnectingWebsocket: c, path: l, pathParams: p } = fn(document.location.href);
|
|
477
477
|
this.urlParams = new URLSearchParams(p), this.urlParams.set("screenWidth", window.screen.width.toString()), this.urlParams.set("screenHeight", window.screen.height.toString()), this.urlParams.set("screenPixelRatio", window.devicePixelRatio.toString());
|
|
478
478
|
const m = `ws://${n}:${o}${l}?${this.urlParams}`;
|
|
479
|
-
this.websocket = c ? new
|
|
479
|
+
this.websocket = c ? new nn(m) : new WebSocket(m);
|
|
480
480
|
let y;
|
|
481
481
|
this.websocket.onopen = () => {
|
|
482
|
-
this.currentConfig = {}, this.currentState = {}, this.dispatchEvent(new
|
|
482
|
+
this.currentConfig = {}, this.currentState = {}, this.dispatchEvent(new hn()), this.setState(this.currentState), y = dn({
|
|
483
483
|
interval: 6e4,
|
|
484
484
|
send: (g) => {
|
|
485
485
|
this.websocket.send(JSON.stringify(g));
|
|
@@ -496,18 +496,18 @@ class ia {
|
|
|
496
496
|
console.error(r);
|
|
497
497
|
}
|
|
498
498
|
}), this.websocket.onclose = () => {
|
|
499
|
-
y?.destroy(), this.dispatchEvent(new
|
|
499
|
+
y?.destroy(), this.dispatchEvent(new _n());
|
|
500
500
|
}, this.websocket.addEventListener("message", ({ data: g }) => {
|
|
501
501
|
try {
|
|
502
502
|
const r = JSON.parse(g);
|
|
503
503
|
try {
|
|
504
504
|
if (r.config)
|
|
505
|
-
this.currentConfig = r.config, this.dispatchEvent(new
|
|
505
|
+
this.currentConfig = r.config, this.dispatchEvent(new vn(this.currentConfig));
|
|
506
506
|
else if (r.updates)
|
|
507
|
-
this.currentState = { ...this.currentState, ...r.updates }, this.dispatchEvent(new
|
|
507
|
+
this.currentState = { ...this.currentState, ...r.updates }, this.dispatchEvent(new gn(r.updates));
|
|
508
508
|
else if (r.event && r.event.key)
|
|
509
509
|
this.dispatchEvent(
|
|
510
|
-
new
|
|
510
|
+
new yn(r.event.key, r.event.value)
|
|
511
511
|
);
|
|
512
512
|
else if (typeof r.message == "object") {
|
|
513
513
|
const s = r.message;
|
|
@@ -520,19 +520,19 @@ class ia {
|
|
|
520
520
|
};
|
|
521
521
|
break;
|
|
522
522
|
case "show_phase":
|
|
523
|
-
this._showPhase = s.phase, this.dispatchEvent(new
|
|
523
|
+
this._showPhase = s.phase, this.dispatchEvent(new wn(s.phase));
|
|
524
524
|
break;
|
|
525
525
|
case "media_config_update":
|
|
526
526
|
this._mediaConfig = s;
|
|
527
527
|
for (const a of ["preferOptimizedAudio", "preferOptimizedVideo", "preferOptimizedImages"])
|
|
528
528
|
s[a] ? this.urlParams.set(a, "true") : this.urlParams.delete(a);
|
|
529
|
-
this.dispatchEvent(new
|
|
529
|
+
this.dispatchEvent(new bn(s));
|
|
530
530
|
break;
|
|
531
531
|
case "data_store_items":
|
|
532
532
|
this.store.handleDataStoreItemsMessage(s);
|
|
533
533
|
break;
|
|
534
534
|
}
|
|
535
|
-
this.dispatchEvent(new
|
|
535
|
+
this.dispatchEvent(new mn(s));
|
|
536
536
|
}
|
|
537
537
|
} catch (s) {
|
|
538
538
|
console.warn("Error handling data", g, s);
|
|
@@ -574,7 +574,7 @@ class ia {
|
|
|
574
574
|
* Return asset URLs using the information about the client and server support for HTTP/2
|
|
575
575
|
*/
|
|
576
576
|
getAssetUrl(t) {
|
|
577
|
-
return `${
|
|
577
|
+
return `${on(t)}?${this.urlParams?.toString() ?? ""}`;
|
|
578
578
|
}
|
|
579
579
|
get selectedAudioOutput() {
|
|
580
580
|
return this._selectedAudioOutput;
|
|
@@ -632,7 +632,7 @@ class ia {
|
|
|
632
632
|
this.eventTarget.dispatchEvent(t);
|
|
633
633
|
}
|
|
634
634
|
}
|
|
635
|
-
function
|
|
635
|
+
function fn(e) {
|
|
636
636
|
const t = new URL(e), n = new URLSearchParams(t.searchParams), o = n.get("local_id"), i = n.get("simulator") === "true", u = n.get("display") ?? "", c = t.pathname.startsWith("/plugin/") ? decodeURIComponent(t.pathname.split("/")[2]) : void 0;
|
|
637
637
|
if (o) {
|
|
638
638
|
const l = n.get("t") ?? "";
|
|
@@ -668,42 +668,42 @@ function hn(e) {
|
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
670
|
}
|
|
671
|
-
class
|
|
671
|
+
class hn extends Event {
|
|
672
672
|
constructor() {
|
|
673
673
|
super("open"), this._cogsConnectionEventType = "open";
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
|
-
class
|
|
676
|
+
class _n extends Event {
|
|
677
677
|
constructor() {
|
|
678
678
|
super("close"), this._cogsConnectionEventType = "close";
|
|
679
679
|
}
|
|
680
680
|
}
|
|
681
|
-
class
|
|
681
|
+
class mn extends Event {
|
|
682
682
|
constructor(t) {
|
|
683
683
|
super("message"), this.message = t, this._cogsConnectionEventType = "message";
|
|
684
684
|
}
|
|
685
685
|
}
|
|
686
|
-
class
|
|
686
|
+
class vn extends Event {
|
|
687
687
|
constructor(t) {
|
|
688
688
|
super("config"), this.config = t, this._cogsConnectionEventType = "config";
|
|
689
689
|
}
|
|
690
690
|
}
|
|
691
|
-
class
|
|
691
|
+
class gn extends Event {
|
|
692
692
|
constructor(t) {
|
|
693
693
|
super("state"), this.state = t, this._cogsConnectionEventType = "state";
|
|
694
694
|
}
|
|
695
695
|
}
|
|
696
|
-
class
|
|
696
|
+
class yn extends Event {
|
|
697
697
|
constructor(t, n) {
|
|
698
698
|
super("event"), this.name = t, this.value = n, this._cogsConnectionEventType = "event";
|
|
699
699
|
}
|
|
700
700
|
}
|
|
701
|
-
class
|
|
701
|
+
class bn extends Event {
|
|
702
702
|
constructor(t) {
|
|
703
703
|
super("mediaConfig"), this.mediaConfig = t, this._cogsConnectionEventType = "mediaConfig";
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
|
-
class
|
|
706
|
+
class wn extends Event {
|
|
707
707
|
constructor(t) {
|
|
708
708
|
super("showPhase"), this.showPhase = t, this._cogsConnectionEventType = "showPhase";
|
|
709
709
|
}
|
|
@@ -748,16 +748,16 @@ class K extends Error {
|
|
|
748
748
|
super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
|
|
749
749
|
}
|
|
750
750
|
}
|
|
751
|
-
class
|
|
751
|
+
class kt extends Error {
|
|
752
752
|
constructor(t) {
|
|
753
753
|
super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
|
|
754
754
|
}
|
|
755
755
|
}
|
|
756
|
-
const
|
|
756
|
+
const Ct = {};
|
|
757
757
|
function N(e) {
|
|
758
|
-
return
|
|
758
|
+
return Ct;
|
|
759
759
|
}
|
|
760
|
-
function
|
|
760
|
+
function kn(e) {
|
|
761
761
|
const t = Object.values(e).filter((o) => typeof o == "number");
|
|
762
762
|
return Object.entries(e).filter(([o, i]) => t.indexOf(+o) === -1).map(([o, i]) => i);
|
|
763
763
|
}
|
|
@@ -781,7 +781,7 @@ function Pe(e) {
|
|
|
781
781
|
const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
|
|
782
782
|
return e.slice(t, n);
|
|
783
783
|
}
|
|
784
|
-
function
|
|
784
|
+
function Cn(e, t) {
|
|
785
785
|
const n = (e.toString().split(".")[1] || "").length, o = t.toString();
|
|
786
786
|
let i = (o.split(".")[1] || "").length;
|
|
787
787
|
if (i === 0 && /\d?e-\d?/.test(o)) {
|
|
@@ -827,15 +827,15 @@ function B(...e) {
|
|
|
827
827
|
function Ge(e) {
|
|
828
828
|
return JSON.stringify(e);
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function En(e) {
|
|
831
831
|
return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
832
832
|
}
|
|
833
|
-
const
|
|
833
|
+
const Et = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
|
|
834
834
|
};
|
|
835
835
|
function pe(e) {
|
|
836
836
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
837
837
|
}
|
|
838
|
-
const
|
|
838
|
+
const An = Ze(() => {
|
|
839
839
|
if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
|
|
840
840
|
return !1;
|
|
841
841
|
try {
|
|
@@ -854,10 +854,10 @@ function J(e) {
|
|
|
854
854
|
const n = t.prototype;
|
|
855
855
|
return !(pe(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
|
|
856
856
|
}
|
|
857
|
-
function
|
|
857
|
+
function At(e) {
|
|
858
858
|
return J(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
|
|
859
859
|
}
|
|
860
|
-
const
|
|
860
|
+
const Sn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
|
|
861
861
|
function H(e) {
|
|
862
862
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
863
863
|
}
|
|
@@ -878,17 +878,17 @@ function b(e) {
|
|
|
878
878
|
}
|
|
879
879
|
return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
|
|
880
880
|
}
|
|
881
|
-
function
|
|
881
|
+
function Tn(e) {
|
|
882
882
|
return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
|
|
883
883
|
}
|
|
884
|
-
const
|
|
884
|
+
const zn = {
|
|
885
885
|
safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
|
|
886
886
|
int32: [-2147483648, 2147483647],
|
|
887
887
|
uint32: [0, 4294967295],
|
|
888
888
|
float32: [-34028234663852886e22, 34028234663852886e22],
|
|
889
889
|
float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
|
|
890
890
|
};
|
|
891
|
-
function
|
|
891
|
+
function $n(e, t) {
|
|
892
892
|
const n = e._zod.def, o = B(e._zod.def, {
|
|
893
893
|
get shape() {
|
|
894
894
|
const i = {};
|
|
@@ -903,7 +903,7 @@ function In(e, t) {
|
|
|
903
903
|
});
|
|
904
904
|
return D(e, o);
|
|
905
905
|
}
|
|
906
|
-
function
|
|
906
|
+
function In(e, t) {
|
|
907
907
|
const n = e._zod.def, o = B(e._zod.def, {
|
|
908
908
|
get shape() {
|
|
909
909
|
const i = { ...e._zod.def.shape };
|
|
@@ -918,7 +918,7 @@ function Zn(e, t) {
|
|
|
918
918
|
});
|
|
919
919
|
return D(e, o);
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function Zn(e, t) {
|
|
922
922
|
if (!J(t))
|
|
923
923
|
throw new Error("Invalid input to extend: expected a plain object");
|
|
924
924
|
const n = e._zod.def.checks;
|
|
@@ -933,7 +933,7 @@ function On(e, t) {
|
|
|
933
933
|
});
|
|
934
934
|
return D(e, i);
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function On(e, t) {
|
|
937
937
|
if (!J(t))
|
|
938
938
|
throw new Error("Invalid input to safeExtend: expected a plain object");
|
|
939
939
|
const n = {
|
|
@@ -946,7 +946,7 @@ function Pn(e, t) {
|
|
|
946
946
|
};
|
|
947
947
|
return D(e, n);
|
|
948
948
|
}
|
|
949
|
-
function
|
|
949
|
+
function Pn(e, t) {
|
|
950
950
|
const n = B(e._zod.def, {
|
|
951
951
|
get shape() {
|
|
952
952
|
const o = { ...e._zod.def.shape, ...t._zod.def.shape };
|
|
@@ -960,7 +960,7 @@ function xn(e, t) {
|
|
|
960
960
|
});
|
|
961
961
|
return D(e, n);
|
|
962
962
|
}
|
|
963
|
-
function
|
|
963
|
+
function xn(e, t, n) {
|
|
964
964
|
const o = B(t._zod.def, {
|
|
965
965
|
get shape() {
|
|
966
966
|
const i = t._zod.def.shape, u = { ...i };
|
|
@@ -985,7 +985,7 @@ function Ln(e, t, n) {
|
|
|
985
985
|
});
|
|
986
986
|
return D(t, o);
|
|
987
987
|
}
|
|
988
|
-
function
|
|
988
|
+
function Ln(e, t, n) {
|
|
989
989
|
const o = B(t._zod.def, {
|
|
990
990
|
get shape() {
|
|
991
991
|
const i = t._zod.def.shape, u = { ...i };
|
|
@@ -1047,7 +1047,7 @@ function re(...e) {
|
|
|
1047
1047
|
inst: o
|
|
1048
1048
|
} : { ...t };
|
|
1049
1049
|
}
|
|
1050
|
-
const
|
|
1050
|
+
const St = (e, t) => {
|
|
1051
1051
|
e.name = "$ZodError", Object.defineProperty(e, "_zod", {
|
|
1052
1052
|
value: e._zod,
|
|
1053
1053
|
enumerable: !1
|
|
@@ -1058,14 +1058,14 @@ const Tt = (e, t) => {
|
|
|
1058
1058
|
value: () => e.message,
|
|
1059
1059
|
enumerable: !1
|
|
1060
1060
|
});
|
|
1061
|
-
},
|
|
1062
|
-
function
|
|
1061
|
+
}, Tt = /* @__PURE__ */ _("$ZodError", St), zt = /* @__PURE__ */ _("$ZodError", St, { Parent: Error });
|
|
1062
|
+
function jn(e, t = (n) => n.message) {
|
|
1063
1063
|
const n = {}, o = [];
|
|
1064
1064
|
for (const i of e.issues)
|
|
1065
1065
|
i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : o.push(t(i));
|
|
1066
1066
|
return { formErrors: o, fieldErrors: n };
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function Nn(e, t = (n) => n.message) {
|
|
1069
1069
|
const n = { _errors: [] }, o = (i) => {
|
|
1070
1070
|
for (const u of i.issues)
|
|
1071
1071
|
if (u.code === "invalid_union" && u.errors.length)
|
|
@@ -1092,7 +1092,7 @@ const Le = (e) => (t, n, o, i) => {
|
|
|
1092
1092
|
throw new K();
|
|
1093
1093
|
if (c.issues.length) {
|
|
1094
1094
|
const l = new (i?.Err ?? e)(c.issues.map((p) => R(p, u, N())));
|
|
1095
|
-
throw
|
|
1095
|
+
throw Et(l, i?.callee), l;
|
|
1096
1096
|
}
|
|
1097
1097
|
return c.value;
|
|
1098
1098
|
}, je = (e) => async (t, n, o, i) => {
|
|
@@ -1100,7 +1100,7 @@ const Le = (e) => (t, n, o, i) => {
|
|
|
1100
1100
|
let c = t._zod.run({ value: n, issues: [] }, u);
|
|
1101
1101
|
if (c instanceof Promise && (c = await c), c.issues.length) {
|
|
1102
1102
|
const l = new (i?.Err ?? e)(c.issues.map((p) => R(p, u, N())));
|
|
1103
|
-
throw
|
|
1103
|
+
throw Et(l, i?.callee), l;
|
|
1104
1104
|
}
|
|
1105
1105
|
return c.value;
|
|
1106
1106
|
}, _e = (e) => (t, n, o) => {
|
|
@@ -1109,58 +1109,58 @@ const Le = (e) => (t, n, o, i) => {
|
|
|
1109
1109
|
throw new K();
|
|
1110
1110
|
return u.issues.length ? {
|
|
1111
1111
|
success: !1,
|
|
1112
|
-
error: new (e ??
|
|
1112
|
+
error: new (e ?? Tt)(u.issues.map((c) => R(c, i, N())))
|
|
1113
1113
|
} : { success: !0, data: u.value };
|
|
1114
|
-
},
|
|
1114
|
+
}, Rn = /* @__PURE__ */ _e(zt), me = (e) => async (t, n, o) => {
|
|
1115
1115
|
const i = o ? Object.assign(o, { async: !0 }) : { async: !0 };
|
|
1116
1116
|
let u = t._zod.run({ value: n, issues: [] }, i);
|
|
1117
1117
|
return u instanceof Promise && (u = await u), u.issues.length ? {
|
|
1118
1118
|
success: !1,
|
|
1119
1119
|
error: new e(u.issues.map((c) => R(c, i, N())))
|
|
1120
1120
|
} : { success: !0, data: u.value };
|
|
1121
|
-
},
|
|
1121
|
+
}, Dn = /* @__PURE__ */ me(zt), Fn = (e) => (t, n, o) => {
|
|
1122
1122
|
const i = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
|
|
1123
1123
|
return Le(e)(t, n, i);
|
|
1124
|
-
},
|
|
1124
|
+
}, Un = (e) => (t, n, o) => Le(e)(t, n, o), Vn = (e) => async (t, n, o) => {
|
|
1125
1125
|
const i = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
|
|
1126
1126
|
return je(e)(t, n, i);
|
|
1127
|
-
},
|
|
1127
|
+
}, Mn = (e) => async (t, n, o) => je(e)(t, n, o), Bn = (e) => (t, n, o) => {
|
|
1128
1128
|
const i = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
|
|
1129
1129
|
return _e(e)(t, n, i);
|
|
1130
|
-
},
|
|
1130
|
+
}, Wn = (e) => (t, n, o) => _e(e)(t, n, o), Gn = (e) => async (t, n, o) => {
|
|
1131
1131
|
const i = o ? Object.assign(o, { direction: "backward" }) : { direction: "backward" };
|
|
1132
1132
|
return me(e)(t, n, i);
|
|
1133
|
-
},
|
|
1134
|
-
function
|
|
1135
|
-
return new RegExp(
|
|
1133
|
+
}, qn = (e) => async (t, n, o) => me(e)(t, n, o), Kn = /^[cC][^\s-]{8,}$/, Jn = /^[0-9a-z]+$/, Hn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Qn = /^[0-9a-vA-V]{20}$/, Yn = /^[A-Za-z0-9]{27}$/, Xn = /^[a-zA-Z0-9_-]{21}$/, eo = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, to = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, qe = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, no = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, oo = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
1134
|
+
function ro() {
|
|
1135
|
+
return new RegExp(oo, "u");
|
|
1136
1136
|
}
|
|
1137
|
-
const
|
|
1138
|
-
function
|
|
1137
|
+
const io = /^(?:(?: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])$/, so = /^(([0-9a-fA-F]{1,4}:){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}|:))$/, ao = /^((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])\/([0-9]|[1-2][0-9]|3[0-2])$/, uo = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, co = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, $t = /^[A-Za-z0-9_-]*$/, lo = /^\+(?:[0-9]){6,14}[0-9]$/, It = "(?:(?:\\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])))", po = /* @__PURE__ */ new RegExp(`^${It}$`);
|
|
1138
|
+
function Zt(e) {
|
|
1139
1139
|
const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
|
|
1140
1140
|
return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
|
|
1141
1141
|
}
|
|
1142
|
-
function
|
|
1143
|
-
return new RegExp(`^${
|
|
1142
|
+
function fo(e) {
|
|
1143
|
+
return new RegExp(`^${Zt(e)}$`);
|
|
1144
1144
|
}
|
|
1145
|
-
function
|
|
1146
|
-
const t =
|
|
1145
|
+
function ho(e) {
|
|
1146
|
+
const t = Zt({ precision: e.precision }), n = ["Z"];
|
|
1147
1147
|
e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
|
|
1148
1148
|
const o = `${t}(?:${n.join("|")})`;
|
|
1149
|
-
return new RegExp(`^${
|
|
1149
|
+
return new RegExp(`^${It}T(?:${o})$`);
|
|
1150
1150
|
}
|
|
1151
|
-
const
|
|
1151
|
+
const _o = (e) => {
|
|
1152
1152
|
const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
|
|
1153
1153
|
return new RegExp(`^${t}$`);
|
|
1154
|
-
},
|
|
1154
|
+
}, mo = /^-?\d+$/, vo = /^-?\d+(?:\.\d+)?/, go = /^null$/i, yo = /^[^A-Z]*$/, bo = /^[^a-z]*$/, Z = /* @__PURE__ */ _("$ZodCheck", (e, t) => {
|
|
1155
1155
|
var n;
|
|
1156
1156
|
e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
|
|
1157
|
-
}),
|
|
1157
|
+
}), Ot = {
|
|
1158
1158
|
number: "number",
|
|
1159
1159
|
bigint: "bigint",
|
|
1160
1160
|
object: "date"
|
|
1161
|
-
},
|
|
1161
|
+
}, Pt = /* @__PURE__ */ _("$ZodCheckLessThan", (e, t) => {
|
|
1162
1162
|
Z.init(e, t);
|
|
1163
|
-
const n =
|
|
1163
|
+
const n = Ot[typeof t.value];
|
|
1164
1164
|
e._zod.onattach.push((o) => {
|
|
1165
1165
|
const i = o._zod.bag, u = (t.inclusive ? i.maximum : i.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
|
|
1166
1166
|
t.value < u && (t.inclusive ? i.maximum = t.value : i.exclusiveMaximum = t.value);
|
|
@@ -1175,9 +1175,9 @@ const mo = (e) => {
|
|
|
1175
1175
|
continue: !t.abort
|
|
1176
1176
|
});
|
|
1177
1177
|
};
|
|
1178
|
-
}),
|
|
1178
|
+
}), xt = /* @__PURE__ */ _("$ZodCheckGreaterThan", (e, t) => {
|
|
1179
1179
|
Z.init(e, t);
|
|
1180
|
-
const n =
|
|
1180
|
+
const n = Ot[typeof t.value];
|
|
1181
1181
|
e._zod.onattach.push((o) => {
|
|
1182
1182
|
const i = o._zod.bag, u = (t.inclusive ? i.minimum : i.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
|
|
1183
1183
|
t.value > u && (t.inclusive ? i.minimum = t.value : i.exclusiveMinimum = t.value);
|
|
@@ -1192,14 +1192,14 @@ const mo = (e) => {
|
|
|
1192
1192
|
continue: !t.abort
|
|
1193
1193
|
});
|
|
1194
1194
|
};
|
|
1195
|
-
}),
|
|
1195
|
+
}), wo = /* @__PURE__ */ _("$ZodCheckMultipleOf", (e, t) => {
|
|
1196
1196
|
Z.init(e, t), e._zod.onattach.push((n) => {
|
|
1197
1197
|
var o;
|
|
1198
1198
|
(o = n._zod.bag).multipleOf ?? (o.multipleOf = t.value);
|
|
1199
1199
|
}), e._zod.check = (n) => {
|
|
1200
1200
|
if (typeof n.value != typeof t.value)
|
|
1201
1201
|
throw new Error("Cannot mix number and bigint in multiple_of check.");
|
|
1202
|
-
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) :
|
|
1202
|
+
(typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : Cn(n.value, t.value) === 0) || n.issues.push({
|
|
1203
1203
|
origin: typeof n.value,
|
|
1204
1204
|
code: "not_multiple_of",
|
|
1205
1205
|
divisor: t.value,
|
|
@@ -1208,12 +1208,12 @@ const mo = (e) => {
|
|
|
1208
1208
|
continue: !t.abort
|
|
1209
1209
|
});
|
|
1210
1210
|
};
|
|
1211
|
-
}),
|
|
1211
|
+
}), ko = /* @__PURE__ */ _("$ZodCheckNumberFormat", (e, t) => {
|
|
1212
1212
|
Z.init(e, t), t.format = t.format || "float64";
|
|
1213
|
-
const n = t.format?.includes("int"), o = n ? "int" : "number", [i, u] =
|
|
1213
|
+
const n = t.format?.includes("int"), o = n ? "int" : "number", [i, u] = zn[t.format];
|
|
1214
1214
|
e._zod.onattach.push((c) => {
|
|
1215
1215
|
const l = c._zod.bag;
|
|
1216
|
-
l.format = t.format, l.minimum = i, l.maximum = u, n && (l.pattern =
|
|
1216
|
+
l.format = t.format, l.minimum = i, l.maximum = u, n && (l.pattern = mo);
|
|
1217
1217
|
}), e._zod.check = (c) => {
|
|
1218
1218
|
const l = c.value;
|
|
1219
1219
|
if (n) {
|
|
@@ -1265,7 +1265,7 @@ const mo = (e) => {
|
|
|
1265
1265
|
inst: e
|
|
1266
1266
|
});
|
|
1267
1267
|
};
|
|
1268
|
-
}),
|
|
1268
|
+
}), Co = /* @__PURE__ */ _("$ZodCheckMaxLength", (e, t) => {
|
|
1269
1269
|
var n;
|
|
1270
1270
|
Z.init(e, t), (n = e._zod.def).when ?? (n.when = (o) => {
|
|
1271
1271
|
const i = o.value;
|
|
@@ -1288,7 +1288,7 @@ const mo = (e) => {
|
|
|
1288
1288
|
continue: !t.abort
|
|
1289
1289
|
});
|
|
1290
1290
|
};
|
|
1291
|
-
}),
|
|
1291
|
+
}), Eo = /* @__PURE__ */ _("$ZodCheckMinLength", (e, t) => {
|
|
1292
1292
|
var n;
|
|
1293
1293
|
Z.init(e, t), (n = e._zod.def).when ?? (n.when = (o) => {
|
|
1294
1294
|
const i = o.value;
|
|
@@ -1311,7 +1311,7 @@ const mo = (e) => {
|
|
|
1311
1311
|
continue: !t.abort
|
|
1312
1312
|
});
|
|
1313
1313
|
};
|
|
1314
|
-
}),
|
|
1314
|
+
}), Ao = /* @__PURE__ */ _("$ZodCheckLengthEquals", (e, t) => {
|
|
1315
1315
|
var n;
|
|
1316
1316
|
Z.init(e, t), (n = e._zod.def).when ?? (n.when = (o) => {
|
|
1317
1317
|
const i = o.value;
|
|
@@ -1351,7 +1351,7 @@ const mo = (e) => {
|
|
|
1351
1351
|
});
|
|
1352
1352
|
}) : (o = e._zod).check ?? (o.check = () => {
|
|
1353
1353
|
});
|
|
1354
|
-
}),
|
|
1354
|
+
}), So = /* @__PURE__ */ _("$ZodCheckRegex", (e, t) => {
|
|
1355
1355
|
ve.init(e, t), e._zod.check = (n) => {
|
|
1356
1356
|
t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
|
|
1357
1357
|
origin: "string",
|
|
@@ -1363,11 +1363,11 @@ const mo = (e) => {
|
|
|
1363
1363
|
continue: !t.abort
|
|
1364
1364
|
});
|
|
1365
1365
|
};
|
|
1366
|
-
}),
|
|
1366
|
+
}), To = /* @__PURE__ */ _("$ZodCheckLowerCase", (e, t) => {
|
|
1367
|
+
t.pattern ?? (t.pattern = yo), ve.init(e, t);
|
|
1368
|
+
}), zo = /* @__PURE__ */ _("$ZodCheckUpperCase", (e, t) => {
|
|
1367
1369
|
t.pattern ?? (t.pattern = bo), ve.init(e, t);
|
|
1368
|
-
}), $o = /* @__PURE__ */ _("$
|
|
1369
|
-
t.pattern ?? (t.pattern = wo), ve.init(e, t);
|
|
1370
|
-
}), Io = /* @__PURE__ */ _("$ZodCheckIncludes", (e, t) => {
|
|
1370
|
+
}), $o = /* @__PURE__ */ _("$ZodCheckIncludes", (e, t) => {
|
|
1371
1371
|
Z.init(e, t);
|
|
1372
1372
|
const n = H(t.includes), o = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
|
|
1373
1373
|
t.pattern = o, e._zod.onattach.push((i) => {
|
|
@@ -1384,7 +1384,7 @@ const mo = (e) => {
|
|
|
1384
1384
|
continue: !t.abort
|
|
1385
1385
|
});
|
|
1386
1386
|
};
|
|
1387
|
-
}),
|
|
1387
|
+
}), Io = /* @__PURE__ */ _("$ZodCheckStartsWith", (e, t) => {
|
|
1388
1388
|
Z.init(e, t);
|
|
1389
1389
|
const n = new RegExp(`^${H(t.prefix)}.*`);
|
|
1390
1390
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((o) => {
|
|
@@ -1401,7 +1401,7 @@ const mo = (e) => {
|
|
|
1401
1401
|
continue: !t.abort
|
|
1402
1402
|
});
|
|
1403
1403
|
};
|
|
1404
|
-
}),
|
|
1404
|
+
}), Zo = /* @__PURE__ */ _("$ZodCheckEndsWith", (e, t) => {
|
|
1405
1405
|
Z.init(e, t);
|
|
1406
1406
|
const n = new RegExp(`.*${H(t.suffix)}$`);
|
|
1407
1407
|
t.pattern ?? (t.pattern = n), e._zod.onattach.push((o) => {
|
|
@@ -1418,12 +1418,12 @@ const mo = (e) => {
|
|
|
1418
1418
|
continue: !t.abort
|
|
1419
1419
|
});
|
|
1420
1420
|
};
|
|
1421
|
-
}),
|
|
1421
|
+
}), Oo = /* @__PURE__ */ _("$ZodCheckOverwrite", (e, t) => {
|
|
1422
1422
|
Z.init(e, t), e._zod.check = (n) => {
|
|
1423
1423
|
n.value = t.tx(n.value);
|
|
1424
1424
|
};
|
|
1425
1425
|
});
|
|
1426
|
-
class
|
|
1426
|
+
class Po {
|
|
1427
1427
|
constructor(t = []) {
|
|
1428
1428
|
this.content = [], this.indent = 0, this && (this.args = t);
|
|
1429
1429
|
}
|
|
@@ -1446,13 +1446,13 @@ class xo {
|
|
|
1446
1446
|
`));
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
|
-
const
|
|
1449
|
+
const xo = {
|
|
1450
1450
|
major: 4,
|
|
1451
1451
|
minor: 1,
|
|
1452
1452
|
patch: 13
|
|
1453
1453
|
}, A = /* @__PURE__ */ _("$ZodType", (e, t) => {
|
|
1454
1454
|
var n;
|
|
1455
|
-
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version =
|
|
1455
|
+
e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = xo;
|
|
1456
1456
|
const o = [...e._zod.def.checks ?? []];
|
|
1457
1457
|
e._zod.traits.has("$ZodCheck") && o.unshift(e);
|
|
1458
1458
|
for (const i of o)
|
|
@@ -1515,17 +1515,17 @@ const Lo = {
|
|
|
1515
1515
|
e["~standard"] = {
|
|
1516
1516
|
validate: (i) => {
|
|
1517
1517
|
try {
|
|
1518
|
-
const u =
|
|
1518
|
+
const u = Rn(e, i);
|
|
1519
1519
|
return u.success ? { value: u.data } : { issues: u.error?.issues };
|
|
1520
1520
|
} catch {
|
|
1521
|
-
return
|
|
1521
|
+
return Dn(e, i).then((c) => c.success ? { value: c.data } : { issues: c.error?.issues });
|
|
1522
1522
|
}
|
|
1523
1523
|
},
|
|
1524
1524
|
vendor: "zod",
|
|
1525
1525
|
version: 1
|
|
1526
1526
|
};
|
|
1527
1527
|
}), Ne = /* @__PURE__ */ _("$ZodString", (e, t) => {
|
|
1528
|
-
A.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ??
|
|
1528
|
+
A.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? _o(e._zod.bag), e._zod.parse = (n, o) => {
|
|
1529
1529
|
if (t.coerce)
|
|
1530
1530
|
try {
|
|
1531
1531
|
n.value = String(n.value);
|
|
@@ -1540,9 +1540,9 @@ const Lo = {
|
|
|
1540
1540
|
};
|
|
1541
1541
|
}), z = /* @__PURE__ */ _("$ZodStringFormat", (e, t) => {
|
|
1542
1542
|
ve.init(e, t), Ne.init(e, t);
|
|
1543
|
-
}),
|
|
1544
|
-
t.pattern ?? (t.pattern =
|
|
1545
|
-
}),
|
|
1543
|
+
}), Lo = /* @__PURE__ */ _("$ZodGUID", (e, t) => {
|
|
1544
|
+
t.pattern ?? (t.pattern = to), z.init(e, t);
|
|
1545
|
+
}), jo = /* @__PURE__ */ _("$ZodUUID", (e, t) => {
|
|
1546
1546
|
if (t.version) {
|
|
1547
1547
|
const o = {
|
|
1548
1548
|
v1: 1,
|
|
@@ -1560,9 +1560,9 @@ const Lo = {
|
|
|
1560
1560
|
} else
|
|
1561
1561
|
t.pattern ?? (t.pattern = qe());
|
|
1562
1562
|
z.init(e, t);
|
|
1563
|
-
}),
|
|
1564
|
-
t.pattern ?? (t.pattern =
|
|
1565
|
-
}),
|
|
1563
|
+
}), No = /* @__PURE__ */ _("$ZodEmail", (e, t) => {
|
|
1564
|
+
t.pattern ?? (t.pattern = no), z.init(e, t);
|
|
1565
|
+
}), Ro = /* @__PURE__ */ _("$ZodURL", (e, t) => {
|
|
1566
1566
|
z.init(e, t), e._zod.check = (n) => {
|
|
1567
1567
|
try {
|
|
1568
1568
|
const o = n.value.trim(), i = new URL(o);
|
|
@@ -1594,32 +1594,32 @@ const Lo = {
|
|
|
1594
1594
|
});
|
|
1595
1595
|
}
|
|
1596
1596
|
};
|
|
1597
|
-
}),
|
|
1598
|
-
t.pattern ?? (t.pattern =
|
|
1599
|
-
}),
|
|
1600
|
-
t.pattern ?? (t.pattern =
|
|
1601
|
-
}),
|
|
1597
|
+
}), Do = /* @__PURE__ */ _("$ZodEmoji", (e, t) => {
|
|
1598
|
+
t.pattern ?? (t.pattern = ro()), z.init(e, t);
|
|
1599
|
+
}), Fo = /* @__PURE__ */ _("$ZodNanoID", (e, t) => {
|
|
1600
|
+
t.pattern ?? (t.pattern = Xn), z.init(e, t);
|
|
1601
|
+
}), Uo = /* @__PURE__ */ _("$ZodCUID", (e, t) => {
|
|
1602
|
+
t.pattern ?? (t.pattern = Kn), z.init(e, t);
|
|
1603
|
+
}), Vo = /* @__PURE__ */ _("$ZodCUID2", (e, t) => {
|
|
1602
1604
|
t.pattern ?? (t.pattern = Jn), z.init(e, t);
|
|
1603
|
-
}), Mo = /* @__PURE__ */ _("$
|
|
1605
|
+
}), Mo = /* @__PURE__ */ _("$ZodULID", (e, t) => {
|
|
1604
1606
|
t.pattern ?? (t.pattern = Hn), z.init(e, t);
|
|
1605
|
-
}), Bo = /* @__PURE__ */ _("$
|
|
1607
|
+
}), Bo = /* @__PURE__ */ _("$ZodXID", (e, t) => {
|
|
1606
1608
|
t.pattern ?? (t.pattern = Qn), z.init(e, t);
|
|
1607
|
-
}), Wo = /* @__PURE__ */ _("$
|
|
1609
|
+
}), Wo = /* @__PURE__ */ _("$ZodKSUID", (e, t) => {
|
|
1608
1610
|
t.pattern ?? (t.pattern = Yn), z.init(e, t);
|
|
1609
|
-
}), Go = /* @__PURE__ */ _("$
|
|
1610
|
-
t.pattern ?? (t.pattern = Xn), z.init(e, t);
|
|
1611
|
-
}), qo = /* @__PURE__ */ _("$ZodISODateTime", (e, t) => {
|
|
1612
|
-
t.pattern ?? (t.pattern = _o(t)), z.init(e, t);
|
|
1613
|
-
}), Ko = /* @__PURE__ */ _("$ZodISODate", (e, t) => {
|
|
1614
|
-
t.pattern ?? (t.pattern = fo), z.init(e, t);
|
|
1615
|
-
}), Jo = /* @__PURE__ */ _("$ZodISOTime", (e, t) => {
|
|
1611
|
+
}), Go = /* @__PURE__ */ _("$ZodISODateTime", (e, t) => {
|
|
1616
1612
|
t.pattern ?? (t.pattern = ho(t)), z.init(e, t);
|
|
1617
|
-
}),
|
|
1618
|
-
t.pattern ?? (t.pattern =
|
|
1619
|
-
}),
|
|
1620
|
-
t.pattern ?? (t.pattern =
|
|
1621
|
-
}),
|
|
1622
|
-
t.pattern ?? (t.pattern =
|
|
1613
|
+
}), qo = /* @__PURE__ */ _("$ZodISODate", (e, t) => {
|
|
1614
|
+
t.pattern ?? (t.pattern = po), z.init(e, t);
|
|
1615
|
+
}), Ko = /* @__PURE__ */ _("$ZodISOTime", (e, t) => {
|
|
1616
|
+
t.pattern ?? (t.pattern = fo(t)), z.init(e, t);
|
|
1617
|
+
}), Jo = /* @__PURE__ */ _("$ZodISODuration", (e, t) => {
|
|
1618
|
+
t.pattern ?? (t.pattern = eo), z.init(e, t);
|
|
1619
|
+
}), Ho = /* @__PURE__ */ _("$ZodIPv4", (e, t) => {
|
|
1620
|
+
t.pattern ?? (t.pattern = io), z.init(e, t), e._zod.bag.format = "ipv4";
|
|
1621
|
+
}), Qo = /* @__PURE__ */ _("$ZodIPv6", (e, t) => {
|
|
1622
|
+
t.pattern ?? (t.pattern = so), z.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
|
|
1623
1623
|
try {
|
|
1624
1624
|
new URL(`http://[${n.value}]`);
|
|
1625
1625
|
} catch {
|
|
@@ -1632,10 +1632,10 @@ const Lo = {
|
|
|
1632
1632
|
});
|
|
1633
1633
|
}
|
|
1634
1634
|
};
|
|
1635
|
-
}),
|
|
1636
|
-
t.pattern ?? (t.pattern =
|
|
1637
|
-
}),
|
|
1638
|
-
t.pattern ?? (t.pattern =
|
|
1635
|
+
}), Yo = /* @__PURE__ */ _("$ZodCIDRv4", (e, t) => {
|
|
1636
|
+
t.pattern ?? (t.pattern = ao), z.init(e, t);
|
|
1637
|
+
}), Xo = /* @__PURE__ */ _("$ZodCIDRv6", (e, t) => {
|
|
1638
|
+
t.pattern ?? (t.pattern = uo), z.init(e, t), e._zod.check = (n) => {
|
|
1639
1639
|
const o = n.value.split("/");
|
|
1640
1640
|
try {
|
|
1641
1641
|
if (o.length !== 2)
|
|
@@ -1660,7 +1660,7 @@ const Lo = {
|
|
|
1660
1660
|
}
|
|
1661
1661
|
};
|
|
1662
1662
|
});
|
|
1663
|
-
function
|
|
1663
|
+
function Lt(e) {
|
|
1664
1664
|
if (e === "")
|
|
1665
1665
|
return !0;
|
|
1666
1666
|
if (e.length % 4 !== 0)
|
|
@@ -1671,9 +1671,9 @@ function jt(e) {
|
|
|
1671
1671
|
return !1;
|
|
1672
1672
|
}
|
|
1673
1673
|
}
|
|
1674
|
-
const
|
|
1675
|
-
t.pattern ?? (t.pattern =
|
|
1676
|
-
|
|
1674
|
+
const er = /* @__PURE__ */ _("$ZodBase64", (e, t) => {
|
|
1675
|
+
t.pattern ?? (t.pattern = co), z.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
|
|
1676
|
+
Lt(n.value) || n.issues.push({
|
|
1677
1677
|
code: "invalid_format",
|
|
1678
1678
|
format: "base64",
|
|
1679
1679
|
input: n.value,
|
|
@@ -1682,15 +1682,15 @@ const tr = /* @__PURE__ */ _("$ZodBase64", (e, t) => {
|
|
|
1682
1682
|
});
|
|
1683
1683
|
};
|
|
1684
1684
|
});
|
|
1685
|
-
function
|
|
1686
|
-
if (
|
|
1685
|
+
function tr(e) {
|
|
1686
|
+
if (!$t.test(e))
|
|
1687
1687
|
return !1;
|
|
1688
1688
|
const t = e.replace(/[-_]/g, (o) => o === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
|
|
1689
|
-
return
|
|
1689
|
+
return Lt(n);
|
|
1690
1690
|
}
|
|
1691
|
-
const
|
|
1692
|
-
t.pattern ?? (t.pattern =
|
|
1693
|
-
|
|
1691
|
+
const nr = /* @__PURE__ */ _("$ZodBase64URL", (e, t) => {
|
|
1692
|
+
t.pattern ?? (t.pattern = $t), z.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
|
|
1693
|
+
tr(n.value) || n.issues.push({
|
|
1694
1694
|
code: "invalid_format",
|
|
1695
1695
|
format: "base64url",
|
|
1696
1696
|
input: n.value,
|
|
@@ -1698,10 +1698,10 @@ const or = /* @__PURE__ */ _("$ZodBase64URL", (e, t) => {
|
|
|
1698
1698
|
continue: !t.abort
|
|
1699
1699
|
});
|
|
1700
1700
|
};
|
|
1701
|
-
}),
|
|
1702
|
-
t.pattern ?? (t.pattern =
|
|
1701
|
+
}), or = /* @__PURE__ */ _("$ZodE164", (e, t) => {
|
|
1702
|
+
t.pattern ?? (t.pattern = lo), z.init(e, t);
|
|
1703
1703
|
});
|
|
1704
|
-
function
|
|
1704
|
+
function rr(e, t = null) {
|
|
1705
1705
|
try {
|
|
1706
1706
|
const n = e.split(".");
|
|
1707
1707
|
if (n.length !== 3)
|
|
@@ -1715,9 +1715,9 @@ function ir(e, t = null) {
|
|
|
1715
1715
|
return !1;
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
|
-
const
|
|
1718
|
+
const ir = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
|
|
1719
1719
|
z.init(e, t), e._zod.check = (n) => {
|
|
1720
|
-
|
|
1720
|
+
rr(n.value, t.alg) || n.issues.push({
|
|
1721
1721
|
code: "invalid_format",
|
|
1722
1722
|
format: "jwt",
|
|
1723
1723
|
input: n.value,
|
|
@@ -1725,8 +1725,8 @@ const sr = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
|
|
|
1725
1725
|
continue: !t.abort
|
|
1726
1726
|
});
|
|
1727
1727
|
};
|
|
1728
|
-
}),
|
|
1729
|
-
A.init(e, t), e._zod.pattern = e._zod.bag.pattern ??
|
|
1728
|
+
}), jt = /* @__PURE__ */ _("$ZodNumber", (e, t) => {
|
|
1729
|
+
A.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? vo, e._zod.parse = (n, o) => {
|
|
1730
1730
|
if (t.coerce)
|
|
1731
1731
|
try {
|
|
1732
1732
|
n.value = Number(n.value);
|
|
@@ -1744,10 +1744,10 @@ const sr = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
|
|
|
1744
1744
|
...u ? { received: u } : {}
|
|
1745
1745
|
}), n;
|
|
1746
1746
|
};
|
|
1747
|
-
}),
|
|
1748
|
-
|
|
1749
|
-
}),
|
|
1750
|
-
A.init(e, t), e._zod.pattern =
|
|
1747
|
+
}), sr = /* @__PURE__ */ _("$ZodNumberFormat", (e, t) => {
|
|
1748
|
+
ko.init(e, t), jt.init(e, t);
|
|
1749
|
+
}), ar = /* @__PURE__ */ _("$ZodNull", (e, t) => {
|
|
1750
|
+
A.init(e, t), e._zod.pattern = go, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (n, o) => {
|
|
1751
1751
|
const i = n.value;
|
|
1752
1752
|
return i === null || n.issues.push({
|
|
1753
1753
|
expected: "null",
|
|
@@ -1756,9 +1756,9 @@ const sr = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
|
|
|
1756
1756
|
inst: e
|
|
1757
1757
|
}), n;
|
|
1758
1758
|
};
|
|
1759
|
-
}),
|
|
1759
|
+
}), ur = /* @__PURE__ */ _("$ZodUnknown", (e, t) => {
|
|
1760
1760
|
A.init(e, t), e._zod.parse = (n) => n;
|
|
1761
|
-
}),
|
|
1761
|
+
}), cr = /* @__PURE__ */ _("$ZodNever", (e, t) => {
|
|
1762
1762
|
A.init(e, t), e._zod.parse = (n, o) => (n.issues.push({
|
|
1763
1763
|
expected: "never",
|
|
1764
1764
|
code: "invalid_type",
|
|
@@ -1769,7 +1769,7 @@ const sr = /* @__PURE__ */ _("$ZodJWT", (e, t) => {
|
|
|
1769
1769
|
function Ke(e, t, n) {
|
|
1770
1770
|
e.issues.length && t.issues.push(...V(n, e.issues)), t.value[n] = e.value;
|
|
1771
1771
|
}
|
|
1772
|
-
const
|
|
1772
|
+
const lr = /* @__PURE__ */ _("$ZodArray", (e, t) => {
|
|
1773
1773
|
A.init(e, t), e._zod.parse = (n, o) => {
|
|
1774
1774
|
const i = n.value;
|
|
1775
1775
|
if (!Array.isArray(i))
|
|
@@ -1794,12 +1794,12 @@ const dr = /* @__PURE__ */ _("$ZodArray", (e, t) => {
|
|
|
1794
1794
|
function fe(e, t, n, o) {
|
|
1795
1795
|
e.issues.length && t.issues.push(...V(n, e.issues)), e.value === void 0 ? n in o && (t.value[n] = void 0) : t.value[n] = e.value;
|
|
1796
1796
|
}
|
|
1797
|
-
function
|
|
1797
|
+
function Nt(e) {
|
|
1798
1798
|
const t = Object.keys(e.shape);
|
|
1799
1799
|
for (const o of t)
|
|
1800
1800
|
if (!e.shape?.[o]?._zod?.traits?.has("$ZodType"))
|
|
1801
1801
|
throw new Error(`Invalid element at key "${o}": expected a Zod schema`);
|
|
1802
|
-
const n =
|
|
1802
|
+
const n = Tn(e.shape);
|
|
1803
1803
|
return {
|
|
1804
1804
|
...e,
|
|
1805
1805
|
keys: t,
|
|
@@ -1808,7 +1808,7 @@ function Rt(e) {
|
|
|
1808
1808
|
optionalKeys: new Set(n)
|
|
1809
1809
|
};
|
|
1810
1810
|
}
|
|
1811
|
-
function
|
|
1811
|
+
function Rt(e, t, n, o, i, u) {
|
|
1812
1812
|
const c = [], l = i.keySet, p = i.catchall._zod, m = p.def.type;
|
|
1813
1813
|
for (const y in t) {
|
|
1814
1814
|
if (l.has(y))
|
|
@@ -1827,7 +1827,7 @@ function Dt(e, t, n, o, i, u) {
|
|
|
1827
1827
|
inst: u
|
|
1828
1828
|
}), e.length ? Promise.all(e).then(() => n) : n;
|
|
1829
1829
|
}
|
|
1830
|
-
const
|
|
1830
|
+
const dr = /* @__PURE__ */ _("$ZodObject", (e, t) => {
|
|
1831
1831
|
if (A.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
|
|
1832
1832
|
const l = t.shape;
|
|
1833
1833
|
Object.defineProperty(t, "shape", {
|
|
@@ -1839,7 +1839,7 @@ const pr = /* @__PURE__ */ _("$ZodObject", (e, t) => {
|
|
|
1839
1839
|
}
|
|
1840
1840
|
});
|
|
1841
1841
|
}
|
|
1842
|
-
const o = Ze(() =>
|
|
1842
|
+
const o = Ze(() => Nt(t));
|
|
1843
1843
|
E(e._zod, "propValues", () => {
|
|
1844
1844
|
const l = t.shape, p = {};
|
|
1845
1845
|
for (const m in l) {
|
|
@@ -1870,12 +1870,12 @@ const pr = /* @__PURE__ */ _("$ZodObject", (e, t) => {
|
|
|
1870
1870
|
const a = g[r]._zod.run({ value: m[r], issues: [] }, p);
|
|
1871
1871
|
a instanceof Promise ? y.push(a.then((d) => fe(d, l, r, m))) : fe(a, l, r, m);
|
|
1872
1872
|
}
|
|
1873
|
-
return u ?
|
|
1873
|
+
return u ? Rt(y, m, l, p, o.value, e) : y.length ? Promise.all(y).then(() => l) : l;
|
|
1874
1874
|
};
|
|
1875
|
-
}),
|
|
1876
|
-
|
|
1877
|
-
const n = e._zod.parse, o = Ze(() =>
|
|
1878
|
-
const s = new
|
|
1875
|
+
}), pr = /* @__PURE__ */ _("$ZodObjectJIT", (e, t) => {
|
|
1876
|
+
dr.init(e, t);
|
|
1877
|
+
const n = e._zod.parse, o = Ze(() => Nt(t)), i = (r) => {
|
|
1878
|
+
const s = new Po(["shape", "payload", "ctx"]), a = o.value, d = (w) => {
|
|
1879
1879
|
const k = Ge(w);
|
|
1880
1880
|
return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
|
|
1881
1881
|
};
|
|
@@ -1911,12 +1911,12 @@ const pr = /* @__PURE__ */ _("$ZodObject", (e, t) => {
|
|
|
1911
1911
|
return (w, k) => h(r, w, k);
|
|
1912
1912
|
};
|
|
1913
1913
|
let u;
|
|
1914
|
-
const c = pe, l = !
|
|
1914
|
+
const c = pe, l = !Ct.jitless, m = l && An.value, y = t.catchall;
|
|
1915
1915
|
let g;
|
|
1916
1916
|
e._zod.parse = (r, s) => {
|
|
1917
1917
|
g ?? (g = o.value);
|
|
1918
1918
|
const a = r.value;
|
|
1919
|
-
return c(a) ? l && m && s?.async === !1 && s.jitless !== !0 ? (u || (u = i(t.shape)), r = u(r, s), y ?
|
|
1919
|
+
return c(a) ? l && m && s?.async === !1 && s.jitless !== !0 ? (u || (u = i(t.shape)), r = u(r, s), y ? Rt([], a, r, s, g, e) : r) : n(r, s) : (r.issues.push({
|
|
1920
1920
|
expected: "object",
|
|
1921
1921
|
code: "invalid_type",
|
|
1922
1922
|
input: a,
|
|
@@ -1936,7 +1936,7 @@ function Je(e, t, n, o) {
|
|
|
1936
1936
|
errors: e.map((u) => u.issues.map((c) => R(c, o, N())))
|
|
1937
1937
|
}), t);
|
|
1938
1938
|
}
|
|
1939
|
-
const
|
|
1939
|
+
const fr = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
|
|
1940
1940
|
A.init(e, t), E(e._zod, "optin", () => t.options.some((i) => i._zod.optin === "optional") ? "optional" : void 0), E(e._zod, "optout", () => t.options.some((i) => i._zod.optout === "optional") ? "optional" : void 0), E(e._zod, "values", () => {
|
|
1941
1941
|
if (t.options.every((i) => i._zod.values))
|
|
1942
1942
|
return new Set(t.options.flatMap((i) => Array.from(i._zod.values)));
|
|
@@ -1967,7 +1967,7 @@ const hr = /* @__PURE__ */ _("$ZodUnion", (e, t) => {
|
|
|
1967
1967
|
}
|
|
1968
1968
|
return c ? Promise.all(l).then((p) => Je(p, i, e, u)) : Je(l, i, e, u);
|
|
1969
1969
|
};
|
|
1970
|
-
}),
|
|
1970
|
+
}), hr = /* @__PURE__ */ _("$ZodIntersection", (e, t) => {
|
|
1971
1971
|
A.init(e, t), e._zod.parse = (n, o) => {
|
|
1972
1972
|
const i = n.value, u = t.left._zod.run({ value: i, issues: [] }, o), c = t.right._zod.run({ value: i, issues: [] }, o);
|
|
1973
1973
|
return u instanceof Promise || c instanceof Promise ? Promise.all([u, c]).then(([p, m]) => He(n, p, m)) : He(n, u, c);
|
|
@@ -2016,7 +2016,7 @@ function He(e, t, n) {
|
|
|
2016
2016
|
throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
|
|
2017
2017
|
return e.value = o.data, e;
|
|
2018
2018
|
}
|
|
2019
|
-
const
|
|
2019
|
+
const _r = /* @__PURE__ */ _("$ZodTuple", (e, t) => {
|
|
2020
2020
|
A.init(e, t);
|
|
2021
2021
|
const n = t.items;
|
|
2022
2022
|
e._zod.parse = (o, i) => {
|
|
@@ -2067,7 +2067,7 @@ const mr = /* @__PURE__ */ _("$ZodTuple", (e, t) => {
|
|
|
2067
2067
|
function ae(e, t, n) {
|
|
2068
2068
|
e.issues.length && t.issues.push(...V(n, e.issues)), t.value[n] = e.value;
|
|
2069
2069
|
}
|
|
2070
|
-
const
|
|
2070
|
+
const mr = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
|
|
2071
2071
|
A.init(e, t), e._zod.parse = (n, o) => {
|
|
2072
2072
|
const i = n.value;
|
|
2073
2073
|
if (!J(i))
|
|
@@ -2125,10 +2125,10 @@ const vr = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
|
|
|
2125
2125
|
}
|
|
2126
2126
|
return u.length ? Promise.all(u).then(() => n) : n;
|
|
2127
2127
|
};
|
|
2128
|
-
}),
|
|
2128
|
+
}), vr = /* @__PURE__ */ _("$ZodEnum", (e, t) => {
|
|
2129
2129
|
A.init(e, t);
|
|
2130
|
-
const n =
|
|
2131
|
-
e._zod.values = o, e._zod.pattern = new RegExp(`^(${n.filter((i) =>
|
|
2130
|
+
const n = kn(t.entries), o = new Set(n);
|
|
2131
|
+
e._zod.values = o, e._zod.pattern = new RegExp(`^(${n.filter((i) => Sn.has(typeof i)).map((i) => typeof i == "string" ? H(i) : i.toString()).join("|")})$`), e._zod.parse = (i, u) => {
|
|
2132
2132
|
const c = i.value;
|
|
2133
2133
|
return o.has(c) || i.issues.push({
|
|
2134
2134
|
code: "invalid_value",
|
|
@@ -2137,7 +2137,7 @@ const vr = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
|
|
|
2137
2137
|
inst: e
|
|
2138
2138
|
}), i;
|
|
2139
2139
|
};
|
|
2140
|
-
}),
|
|
2140
|
+
}), gr = /* @__PURE__ */ _("$ZodLiteral", (e, t) => {
|
|
2141
2141
|
if (A.init(e, t), t.values.length === 0)
|
|
2142
2142
|
throw new Error("Cannot create literal schema with no valid values");
|
|
2143
2143
|
const n = new Set(t.values);
|
|
@@ -2150,10 +2150,10 @@ const vr = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
|
|
|
2150
2150
|
inst: e
|
|
2151
2151
|
}), o;
|
|
2152
2152
|
};
|
|
2153
|
-
}),
|
|
2153
|
+
}), yr = /* @__PURE__ */ _("$ZodTransform", (e, t) => {
|
|
2154
2154
|
A.init(e, t), e._zod.parse = (n, o) => {
|
|
2155
2155
|
if (o.direction === "backward")
|
|
2156
|
-
throw new
|
|
2156
|
+
throw new kt(e.constructor.name);
|
|
2157
2157
|
const i = t.transform(n.value, n);
|
|
2158
2158
|
if (o.async)
|
|
2159
2159
|
return (i instanceof Promise ? i : Promise.resolve(i)).then((c) => (n.value = c, n));
|
|
@@ -2165,7 +2165,7 @@ const vr = /* @__PURE__ */ _("$ZodRecord", (e, t) => {
|
|
|
2165
2165
|
function Qe(e, t) {
|
|
2166
2166
|
return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
|
|
2167
2167
|
}
|
|
2168
|
-
const
|
|
2168
|
+
const br = /* @__PURE__ */ _("$ZodOptional", (e, t) => {
|
|
2169
2169
|
A.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", E(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), E(e._zod, "pattern", () => {
|
|
2170
2170
|
const n = t.innerType._zod.pattern;
|
|
2171
2171
|
return n ? new RegExp(`^(${Pe(n.source)})?$`) : void 0;
|
|
@@ -2176,12 +2176,12 @@ const wr = /* @__PURE__ */ _("$ZodOptional", (e, t) => {
|
|
|
2176
2176
|
}
|
|
2177
2177
|
return n.value === void 0 ? n : t.innerType._zod.run(n, o);
|
|
2178
2178
|
};
|
|
2179
|
-
}),
|
|
2179
|
+
}), wr = /* @__PURE__ */ _("$ZodNullable", (e, t) => {
|
|
2180
2180
|
A.init(e, t), E(e._zod, "optin", () => t.innerType._zod.optin), E(e._zod, "optout", () => t.innerType._zod.optout), E(e._zod, "pattern", () => {
|
|
2181
2181
|
const n = t.innerType._zod.pattern;
|
|
2182
2182
|
return n ? new RegExp(`^(${Pe(n.source)}|null)$`) : void 0;
|
|
2183
2183
|
}), E(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, o) => n.value === null ? n : t.innerType._zod.run(n, o);
|
|
2184
|
-
}),
|
|
2184
|
+
}), kr = /* @__PURE__ */ _("$ZodDefault", (e, t) => {
|
|
2185
2185
|
A.init(e, t), e._zod.optin = "optional", E(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, o) => {
|
|
2186
2186
|
if (o.direction === "backward")
|
|
2187
2187
|
return t.innerType._zod.run(n, o);
|
|
@@ -2194,9 +2194,9 @@ const wr = /* @__PURE__ */ _("$ZodOptional", (e, t) => {
|
|
|
2194
2194
|
function Ye(e, t) {
|
|
2195
2195
|
return e.value === void 0 && (e.value = t.defaultValue), e;
|
|
2196
2196
|
}
|
|
2197
|
-
const
|
|
2197
|
+
const Cr = /* @__PURE__ */ _("$ZodPrefault", (e, t) => {
|
|
2198
2198
|
A.init(e, t), e._zod.optin = "optional", E(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, o) => (o.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, o));
|
|
2199
|
-
}),
|
|
2199
|
+
}), Er = /* @__PURE__ */ _("$ZodNonOptional", (e, t) => {
|
|
2200
2200
|
A.init(e, t), E(e._zod, "values", () => {
|
|
2201
2201
|
const n = t.innerType._zod.values;
|
|
2202
2202
|
return n ? new Set([...n].filter((o) => o !== void 0)) : void 0;
|
|
@@ -2213,7 +2213,7 @@ function Xe(e, t) {
|
|
|
2213
2213
|
inst: t
|
|
2214
2214
|
}), e;
|
|
2215
2215
|
}
|
|
2216
|
-
const
|
|
2216
|
+
const Ar = /* @__PURE__ */ _("$ZodCatch", (e, t) => {
|
|
2217
2217
|
A.init(e, t), E(e._zod, "optin", () => t.innerType._zod.optin), E(e._zod, "optout", () => t.innerType._zod.optout), E(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, o) => {
|
|
2218
2218
|
if (o.direction === "backward")
|
|
2219
2219
|
return t.innerType._zod.run(n, o);
|
|
@@ -2232,7 +2232,7 @@ const Sr = /* @__PURE__ */ _("$ZodCatch", (e, t) => {
|
|
|
2232
2232
|
input: n.value
|
|
2233
2233
|
}), n.issues = []), n);
|
|
2234
2234
|
};
|
|
2235
|
-
}),
|
|
2235
|
+
}), Sr = /* @__PURE__ */ _("$ZodPipe", (e, t) => {
|
|
2236
2236
|
A.init(e, t), E(e._zod, "values", () => t.in._zod.values), E(e._zod, "optin", () => t.in._zod.optin), E(e._zod, "optout", () => t.out._zod.optout), E(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, o) => {
|
|
2237
2237
|
if (o.direction === "backward") {
|
|
2238
2238
|
const u = t.out._zod.run(n, o);
|
|
@@ -2245,7 +2245,7 @@ const Sr = /* @__PURE__ */ _("$ZodCatch", (e, t) => {
|
|
|
2245
2245
|
function ue(e, t, n) {
|
|
2246
2246
|
return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
|
|
2247
2247
|
}
|
|
2248
|
-
const
|
|
2248
|
+
const Tr = /* @__PURE__ */ _("$ZodReadonly", (e, t) => {
|
|
2249
2249
|
A.init(e, t), E(e._zod, "propValues", () => t.innerType._zod.propValues), E(e._zod, "values", () => t.innerType._zod.values), E(e._zod, "optin", () => t.innerType?._zod?.optin), E(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, o) => {
|
|
2250
2250
|
if (o.direction === "backward")
|
|
2251
2251
|
return t.innerType._zod.run(n, o);
|
|
@@ -2256,7 +2256,7 @@ const zr = /* @__PURE__ */ _("$ZodReadonly", (e, t) => {
|
|
|
2256
2256
|
function et(e) {
|
|
2257
2257
|
return e.value = Object.freeze(e.value), e;
|
|
2258
2258
|
}
|
|
2259
|
-
const
|
|
2259
|
+
const zr = /* @__PURE__ */ _("$ZodCustom", (e, t) => {
|
|
2260
2260
|
Z.init(e, t), A.init(e, t), e._zod.parse = (n, o) => n, e._zod.check = (n) => {
|
|
2261
2261
|
const o = n.value, i = t.fn(o);
|
|
2262
2262
|
if (i instanceof Promise)
|
|
@@ -2280,7 +2280,7 @@ function tt(e, t, n, o) {
|
|
|
2280
2280
|
}
|
|
2281
2281
|
}
|
|
2282
2282
|
var nt;
|
|
2283
|
-
class
|
|
2283
|
+
class $r {
|
|
2284
2284
|
constructor() {
|
|
2285
2285
|
this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
|
|
2286
2286
|
}
|
|
@@ -2314,18 +2314,18 @@ class Ir {
|
|
|
2314
2314
|
return this._map.has(t);
|
|
2315
2315
|
}
|
|
2316
2316
|
}
|
|
2317
|
-
function
|
|
2318
|
-
return new
|
|
2317
|
+
function Ir() {
|
|
2318
|
+
return new $r();
|
|
2319
2319
|
}
|
|
2320
|
-
(nt = globalThis).__zod_globalRegistry ?? (nt.__zod_globalRegistry =
|
|
2320
|
+
(nt = globalThis).__zod_globalRegistry ?? (nt.__zod_globalRegistry = Ir());
|
|
2321
2321
|
const ce = globalThis.__zod_globalRegistry;
|
|
2322
|
-
function
|
|
2322
|
+
function Zr(e, t) {
|
|
2323
2323
|
return new e({
|
|
2324
2324
|
type: "string",
|
|
2325
2325
|
...b(t)
|
|
2326
2326
|
});
|
|
2327
2327
|
}
|
|
2328
|
-
function
|
|
2328
|
+
function Or(e, t) {
|
|
2329
2329
|
return new e({
|
|
2330
2330
|
type: "string",
|
|
2331
2331
|
format: "email",
|
|
@@ -2343,7 +2343,7 @@ function ot(e, t) {
|
|
|
2343
2343
|
...b(t)
|
|
2344
2344
|
});
|
|
2345
2345
|
}
|
|
2346
|
-
function
|
|
2346
|
+
function Pr(e, t) {
|
|
2347
2347
|
return new e({
|
|
2348
2348
|
type: "string",
|
|
2349
2349
|
format: "uuid",
|
|
@@ -2352,7 +2352,7 @@ function xr(e, t) {
|
|
|
2352
2352
|
...b(t)
|
|
2353
2353
|
});
|
|
2354
2354
|
}
|
|
2355
|
-
function
|
|
2355
|
+
function xr(e, t) {
|
|
2356
2356
|
return new e({
|
|
2357
2357
|
type: "string",
|
|
2358
2358
|
format: "uuid",
|
|
@@ -2362,7 +2362,7 @@ function Lr(e, t) {
|
|
|
2362
2362
|
...b(t)
|
|
2363
2363
|
});
|
|
2364
2364
|
}
|
|
2365
|
-
function
|
|
2365
|
+
function Lr(e, t) {
|
|
2366
2366
|
return new e({
|
|
2367
2367
|
type: "string",
|
|
2368
2368
|
format: "uuid",
|
|
@@ -2372,7 +2372,7 @@ function jr(e, t) {
|
|
|
2372
2372
|
...b(t)
|
|
2373
2373
|
});
|
|
2374
2374
|
}
|
|
2375
|
-
function
|
|
2375
|
+
function jr(e, t) {
|
|
2376
2376
|
return new e({
|
|
2377
2377
|
type: "string",
|
|
2378
2378
|
format: "uuid",
|
|
@@ -2382,7 +2382,7 @@ function Nr(e, t) {
|
|
|
2382
2382
|
...b(t)
|
|
2383
2383
|
});
|
|
2384
2384
|
}
|
|
2385
|
-
function
|
|
2385
|
+
function Nr(e, t) {
|
|
2386
2386
|
return new e({
|
|
2387
2387
|
type: "string",
|
|
2388
2388
|
format: "url",
|
|
@@ -2391,7 +2391,7 @@ function Rr(e, t) {
|
|
|
2391
2391
|
...b(t)
|
|
2392
2392
|
});
|
|
2393
2393
|
}
|
|
2394
|
-
function
|
|
2394
|
+
function Rr(e, t) {
|
|
2395
2395
|
return new e({
|
|
2396
2396
|
type: "string",
|
|
2397
2397
|
format: "emoji",
|
|
@@ -2400,7 +2400,7 @@ function Dr(e, t) {
|
|
|
2400
2400
|
...b(t)
|
|
2401
2401
|
});
|
|
2402
2402
|
}
|
|
2403
|
-
function
|
|
2403
|
+
function Dr(e, t) {
|
|
2404
2404
|
return new e({
|
|
2405
2405
|
type: "string",
|
|
2406
2406
|
format: "nanoid",
|
|
@@ -2409,7 +2409,7 @@ function Fr(e, t) {
|
|
|
2409
2409
|
...b(t)
|
|
2410
2410
|
});
|
|
2411
2411
|
}
|
|
2412
|
-
function
|
|
2412
|
+
function Fr(e, t) {
|
|
2413
2413
|
return new e({
|
|
2414
2414
|
type: "string",
|
|
2415
2415
|
format: "cuid",
|
|
@@ -2418,7 +2418,7 @@ function Ur(e, t) {
|
|
|
2418
2418
|
...b(t)
|
|
2419
2419
|
});
|
|
2420
2420
|
}
|
|
2421
|
-
function
|
|
2421
|
+
function Ur(e, t) {
|
|
2422
2422
|
return new e({
|
|
2423
2423
|
type: "string",
|
|
2424
2424
|
format: "cuid2",
|
|
@@ -2427,7 +2427,7 @@ function Vr(e, t) {
|
|
|
2427
2427
|
...b(t)
|
|
2428
2428
|
});
|
|
2429
2429
|
}
|
|
2430
|
-
function
|
|
2430
|
+
function Vr(e, t) {
|
|
2431
2431
|
return new e({
|
|
2432
2432
|
type: "string",
|
|
2433
2433
|
format: "ulid",
|
|
@@ -2436,7 +2436,7 @@ function Mr(e, t) {
|
|
|
2436
2436
|
...b(t)
|
|
2437
2437
|
});
|
|
2438
2438
|
}
|
|
2439
|
-
function
|
|
2439
|
+
function Mr(e, t) {
|
|
2440
2440
|
return new e({
|
|
2441
2441
|
type: "string",
|
|
2442
2442
|
format: "xid",
|
|
@@ -2445,7 +2445,7 @@ function Br(e, t) {
|
|
|
2445
2445
|
...b(t)
|
|
2446
2446
|
});
|
|
2447
2447
|
}
|
|
2448
|
-
function
|
|
2448
|
+
function Br(e, t) {
|
|
2449
2449
|
return new e({
|
|
2450
2450
|
type: "string",
|
|
2451
2451
|
format: "ksuid",
|
|
@@ -2454,7 +2454,7 @@ function Wr(e, t) {
|
|
|
2454
2454
|
...b(t)
|
|
2455
2455
|
});
|
|
2456
2456
|
}
|
|
2457
|
-
function
|
|
2457
|
+
function Wr(e, t) {
|
|
2458
2458
|
return new e({
|
|
2459
2459
|
type: "string",
|
|
2460
2460
|
format: "ipv4",
|
|
@@ -2463,7 +2463,7 @@ function Gr(e, t) {
|
|
|
2463
2463
|
...b(t)
|
|
2464
2464
|
});
|
|
2465
2465
|
}
|
|
2466
|
-
function
|
|
2466
|
+
function Gr(e, t) {
|
|
2467
2467
|
return new e({
|
|
2468
2468
|
type: "string",
|
|
2469
2469
|
format: "ipv6",
|
|
@@ -2472,7 +2472,7 @@ function qr(e, t) {
|
|
|
2472
2472
|
...b(t)
|
|
2473
2473
|
});
|
|
2474
2474
|
}
|
|
2475
|
-
function
|
|
2475
|
+
function qr(e, t) {
|
|
2476
2476
|
return new e({
|
|
2477
2477
|
type: "string",
|
|
2478
2478
|
format: "cidrv4",
|
|
@@ -2481,7 +2481,7 @@ function Kr(e, t) {
|
|
|
2481
2481
|
...b(t)
|
|
2482
2482
|
});
|
|
2483
2483
|
}
|
|
2484
|
-
function
|
|
2484
|
+
function Kr(e, t) {
|
|
2485
2485
|
return new e({
|
|
2486
2486
|
type: "string",
|
|
2487
2487
|
format: "cidrv6",
|
|
@@ -2490,7 +2490,7 @@ function Jr(e, t) {
|
|
|
2490
2490
|
...b(t)
|
|
2491
2491
|
});
|
|
2492
2492
|
}
|
|
2493
|
-
function
|
|
2493
|
+
function Jr(e, t) {
|
|
2494
2494
|
return new e({
|
|
2495
2495
|
type: "string",
|
|
2496
2496
|
format: "base64",
|
|
@@ -2499,7 +2499,7 @@ function Hr(e, t) {
|
|
|
2499
2499
|
...b(t)
|
|
2500
2500
|
});
|
|
2501
2501
|
}
|
|
2502
|
-
function
|
|
2502
|
+
function Hr(e, t) {
|
|
2503
2503
|
return new e({
|
|
2504
2504
|
type: "string",
|
|
2505
2505
|
format: "base64url",
|
|
@@ -2508,7 +2508,7 @@ function Qr(e, t) {
|
|
|
2508
2508
|
...b(t)
|
|
2509
2509
|
});
|
|
2510
2510
|
}
|
|
2511
|
-
function
|
|
2511
|
+
function Qr(e, t) {
|
|
2512
2512
|
return new e({
|
|
2513
2513
|
type: "string",
|
|
2514
2514
|
format: "e164",
|
|
@@ -2517,7 +2517,7 @@ function Yr(e, t) {
|
|
|
2517
2517
|
...b(t)
|
|
2518
2518
|
});
|
|
2519
2519
|
}
|
|
2520
|
-
function
|
|
2520
|
+
function Yr(e, t) {
|
|
2521
2521
|
return new e({
|
|
2522
2522
|
type: "string",
|
|
2523
2523
|
format: "jwt",
|
|
@@ -2526,7 +2526,7 @@ function Xr(e, t) {
|
|
|
2526
2526
|
...b(t)
|
|
2527
2527
|
});
|
|
2528
2528
|
}
|
|
2529
|
-
function
|
|
2529
|
+
function Xr(e, t) {
|
|
2530
2530
|
return new e({
|
|
2531
2531
|
type: "string",
|
|
2532
2532
|
format: "datetime",
|
|
@@ -2537,7 +2537,7 @@ function ei(e, t) {
|
|
|
2537
2537
|
...b(t)
|
|
2538
2538
|
});
|
|
2539
2539
|
}
|
|
2540
|
-
function
|
|
2540
|
+
function ei(e, t) {
|
|
2541
2541
|
return new e({
|
|
2542
2542
|
type: "string",
|
|
2543
2543
|
format: "date",
|
|
@@ -2545,7 +2545,7 @@ function ti(e, t) {
|
|
|
2545
2545
|
...b(t)
|
|
2546
2546
|
});
|
|
2547
2547
|
}
|
|
2548
|
-
function
|
|
2548
|
+
function ti(e, t) {
|
|
2549
2549
|
return new e({
|
|
2550
2550
|
type: "string",
|
|
2551
2551
|
format: "time",
|
|
@@ -2554,7 +2554,7 @@ function ni(e, t) {
|
|
|
2554
2554
|
...b(t)
|
|
2555
2555
|
});
|
|
2556
2556
|
}
|
|
2557
|
-
function
|
|
2557
|
+
function ni(e, t) {
|
|
2558
2558
|
return new e({
|
|
2559
2559
|
type: "string",
|
|
2560
2560
|
format: "duration",
|
|
@@ -2562,14 +2562,14 @@ function oi(e, t) {
|
|
|
2562
2562
|
...b(t)
|
|
2563
2563
|
});
|
|
2564
2564
|
}
|
|
2565
|
-
function
|
|
2565
|
+
function oi(e, t) {
|
|
2566
2566
|
return new e({
|
|
2567
2567
|
type: "number",
|
|
2568
2568
|
checks: [],
|
|
2569
2569
|
...b(t)
|
|
2570
2570
|
});
|
|
2571
2571
|
}
|
|
2572
|
-
function
|
|
2572
|
+
function ri(e, t) {
|
|
2573
2573
|
return new e({
|
|
2574
2574
|
type: "number",
|
|
2575
2575
|
check: "number_format",
|
|
@@ -2578,25 +2578,25 @@ function ii(e, t) {
|
|
|
2578
2578
|
...b(t)
|
|
2579
2579
|
});
|
|
2580
2580
|
}
|
|
2581
|
-
function
|
|
2581
|
+
function ii(e, t) {
|
|
2582
2582
|
return new e({
|
|
2583
2583
|
type: "null",
|
|
2584
2584
|
...b(t)
|
|
2585
2585
|
});
|
|
2586
2586
|
}
|
|
2587
|
-
function
|
|
2587
|
+
function si(e) {
|
|
2588
2588
|
return new e({
|
|
2589
2589
|
type: "unknown"
|
|
2590
2590
|
});
|
|
2591
2591
|
}
|
|
2592
|
-
function
|
|
2592
|
+
function ai(e, t) {
|
|
2593
2593
|
return new e({
|
|
2594
2594
|
type: "never",
|
|
2595
2595
|
...b(t)
|
|
2596
2596
|
});
|
|
2597
2597
|
}
|
|
2598
2598
|
function rt(e, t) {
|
|
2599
|
-
return new
|
|
2599
|
+
return new Pt({
|
|
2600
2600
|
check: "less_than",
|
|
2601
2601
|
...b(t),
|
|
2602
2602
|
value: e,
|
|
@@ -2604,7 +2604,7 @@ function rt(e, t) {
|
|
|
2604
2604
|
});
|
|
2605
2605
|
}
|
|
2606
2606
|
function be(e, t) {
|
|
2607
|
-
return new
|
|
2607
|
+
return new Pt({
|
|
2608
2608
|
check: "less_than",
|
|
2609
2609
|
...b(t),
|
|
2610
2610
|
value: e,
|
|
@@ -2612,7 +2612,7 @@ function be(e, t) {
|
|
|
2612
2612
|
});
|
|
2613
2613
|
}
|
|
2614
2614
|
function it(e, t) {
|
|
2615
|
-
return new
|
|
2615
|
+
return new xt({
|
|
2616
2616
|
check: "greater_than",
|
|
2617
2617
|
...b(t),
|
|
2618
2618
|
value: e,
|
|
@@ -2620,7 +2620,7 @@ function it(e, t) {
|
|
|
2620
2620
|
});
|
|
2621
2621
|
}
|
|
2622
2622
|
function we(e, t) {
|
|
2623
|
-
return new
|
|
2623
|
+
return new xt({
|
|
2624
2624
|
check: "greater_than",
|
|
2625
2625
|
...b(t),
|
|
2626
2626
|
value: e,
|
|
@@ -2628,73 +2628,73 @@ function we(e, t) {
|
|
|
2628
2628
|
});
|
|
2629
2629
|
}
|
|
2630
2630
|
function st(e, t) {
|
|
2631
|
-
return new
|
|
2631
|
+
return new wo({
|
|
2632
2632
|
check: "multiple_of",
|
|
2633
2633
|
...b(t),
|
|
2634
2634
|
value: e
|
|
2635
2635
|
});
|
|
2636
2636
|
}
|
|
2637
|
-
function
|
|
2638
|
-
return new
|
|
2637
|
+
function Dt(e, t) {
|
|
2638
|
+
return new Co({
|
|
2639
2639
|
check: "max_length",
|
|
2640
2640
|
...b(t),
|
|
2641
2641
|
maximum: e
|
|
2642
2642
|
});
|
|
2643
2643
|
}
|
|
2644
2644
|
function he(e, t) {
|
|
2645
|
-
return new
|
|
2645
|
+
return new Eo({
|
|
2646
2646
|
check: "min_length",
|
|
2647
2647
|
...b(t),
|
|
2648
2648
|
minimum: e
|
|
2649
2649
|
});
|
|
2650
2650
|
}
|
|
2651
|
-
function
|
|
2652
|
-
return new
|
|
2651
|
+
function Ft(e, t) {
|
|
2652
|
+
return new Ao({
|
|
2653
2653
|
check: "length_equals",
|
|
2654
2654
|
...b(t),
|
|
2655
2655
|
length: e
|
|
2656
2656
|
});
|
|
2657
2657
|
}
|
|
2658
|
-
function
|
|
2659
|
-
return new
|
|
2658
|
+
function ui(e, t) {
|
|
2659
|
+
return new So({
|
|
2660
2660
|
check: "string_format",
|
|
2661
2661
|
format: "regex",
|
|
2662
2662
|
...b(t),
|
|
2663
2663
|
pattern: e
|
|
2664
2664
|
});
|
|
2665
2665
|
}
|
|
2666
|
-
function
|
|
2667
|
-
return new
|
|
2666
|
+
function ci(e) {
|
|
2667
|
+
return new To({
|
|
2668
2668
|
check: "string_format",
|
|
2669
2669
|
format: "lowercase",
|
|
2670
2670
|
...b(e)
|
|
2671
2671
|
});
|
|
2672
2672
|
}
|
|
2673
|
-
function
|
|
2674
|
-
return new
|
|
2673
|
+
function li(e) {
|
|
2674
|
+
return new zo({
|
|
2675
2675
|
check: "string_format",
|
|
2676
2676
|
format: "uppercase",
|
|
2677
2677
|
...b(e)
|
|
2678
2678
|
});
|
|
2679
2679
|
}
|
|
2680
|
-
function
|
|
2681
|
-
return new
|
|
2680
|
+
function di(e, t) {
|
|
2681
|
+
return new $o({
|
|
2682
2682
|
check: "string_format",
|
|
2683
2683
|
format: "includes",
|
|
2684
2684
|
...b(t),
|
|
2685
2685
|
includes: e
|
|
2686
2686
|
});
|
|
2687
2687
|
}
|
|
2688
|
-
function
|
|
2689
|
-
return new
|
|
2688
|
+
function pi(e, t) {
|
|
2689
|
+
return new Io({
|
|
2690
2690
|
check: "string_format",
|
|
2691
2691
|
format: "starts_with",
|
|
2692
2692
|
...b(t),
|
|
2693
2693
|
prefix: e
|
|
2694
2694
|
});
|
|
2695
2695
|
}
|
|
2696
|
-
function
|
|
2697
|
-
return new
|
|
2696
|
+
function fi(e, t) {
|
|
2697
|
+
return new Zo({
|
|
2698
2698
|
check: "string_format",
|
|
2699
2699
|
format: "ends_with",
|
|
2700
2700
|
...b(t),
|
|
@@ -2702,27 +2702,27 @@ function hi(e, t) {
|
|
|
2702
2702
|
});
|
|
2703
2703
|
}
|
|
2704
2704
|
function ee(e) {
|
|
2705
|
-
return new
|
|
2705
|
+
return new Oo({
|
|
2706
2706
|
check: "overwrite",
|
|
2707
2707
|
tx: e
|
|
2708
2708
|
});
|
|
2709
2709
|
}
|
|
2710
|
-
function
|
|
2710
|
+
function hi(e) {
|
|
2711
2711
|
return ee((t) => t.normalize(e));
|
|
2712
2712
|
}
|
|
2713
|
-
function
|
|
2713
|
+
function _i() {
|
|
2714
2714
|
return ee((e) => e.trim());
|
|
2715
2715
|
}
|
|
2716
|
-
function
|
|
2716
|
+
function mi() {
|
|
2717
2717
|
return ee((e) => e.toLowerCase());
|
|
2718
2718
|
}
|
|
2719
|
-
function
|
|
2719
|
+
function vi() {
|
|
2720
2720
|
return ee((e) => e.toUpperCase());
|
|
2721
2721
|
}
|
|
2722
|
-
function
|
|
2723
|
-
return ee((e) =>
|
|
2722
|
+
function gi() {
|
|
2723
|
+
return ee((e) => En(e));
|
|
2724
2724
|
}
|
|
2725
|
-
function
|
|
2725
|
+
function yi(e, t, n) {
|
|
2726
2726
|
return new e({
|
|
2727
2727
|
type: "array",
|
|
2728
2728
|
element: t,
|
|
@@ -2732,7 +2732,7 @@ function bi(e, t, n) {
|
|
|
2732
2732
|
...b(n)
|
|
2733
2733
|
});
|
|
2734
2734
|
}
|
|
2735
|
-
function
|
|
2735
|
+
function bi(e, t, n) {
|
|
2736
2736
|
return new e({
|
|
2737
2737
|
type: "custom",
|
|
2738
2738
|
check: "custom",
|
|
@@ -2740,8 +2740,8 @@ function wi(e, t, n) {
|
|
|
2740
2740
|
...b(n)
|
|
2741
2741
|
});
|
|
2742
2742
|
}
|
|
2743
|
-
function
|
|
2744
|
-
const t =
|
|
2743
|
+
function wi(e) {
|
|
2744
|
+
const t = ki((n) => (n.addIssue = (o) => {
|
|
2745
2745
|
if (typeof o == "string")
|
|
2746
2746
|
n.issues.push(re(o, n.value, t._zod.def));
|
|
2747
2747
|
else {
|
|
@@ -2751,45 +2751,45 @@ function ki(e) {
|
|
|
2751
2751
|
}, e(n.value, n)));
|
|
2752
2752
|
return t;
|
|
2753
2753
|
}
|
|
2754
|
-
function
|
|
2754
|
+
function ki(e, t) {
|
|
2755
2755
|
const n = new Z({
|
|
2756
2756
|
check: "custom",
|
|
2757
2757
|
...b(t)
|
|
2758
2758
|
});
|
|
2759
2759
|
return n._zod.check = e, n;
|
|
2760
2760
|
}
|
|
2761
|
-
const
|
|
2761
|
+
const Ci = /* @__PURE__ */ _("ZodISODateTime", (e, t) => {
|
|
2762
|
+
Go.init(e, t), I.init(e, t);
|
|
2763
|
+
});
|
|
2764
|
+
function Ei(e) {
|
|
2765
|
+
return Xr(Ci, e);
|
|
2766
|
+
}
|
|
2767
|
+
const Ai = /* @__PURE__ */ _("ZodISODate", (e, t) => {
|
|
2762
2768
|
qo.init(e, t), I.init(e, t);
|
|
2763
2769
|
});
|
|
2764
|
-
function
|
|
2765
|
-
return ei(
|
|
2770
|
+
function Si(e) {
|
|
2771
|
+
return ei(Ai, e);
|
|
2766
2772
|
}
|
|
2767
|
-
const
|
|
2773
|
+
const Ti = /* @__PURE__ */ _("ZodISOTime", (e, t) => {
|
|
2768
2774
|
Ko.init(e, t), I.init(e, t);
|
|
2769
2775
|
});
|
|
2770
|
-
function
|
|
2771
|
-
return ti(
|
|
2776
|
+
function zi(e) {
|
|
2777
|
+
return ti(Ti, e);
|
|
2772
2778
|
}
|
|
2773
|
-
const
|
|
2779
|
+
const $i = /* @__PURE__ */ _("ZodISODuration", (e, t) => {
|
|
2774
2780
|
Jo.init(e, t), I.init(e, t);
|
|
2775
2781
|
});
|
|
2776
|
-
function
|
|
2777
|
-
return ni(
|
|
2778
|
-
}
|
|
2779
|
-
const Ii = /* @__PURE__ */ _("ZodISODuration", (e, t) => {
|
|
2780
|
-
Ho.init(e, t), I.init(e, t);
|
|
2781
|
-
});
|
|
2782
|
-
function Zi(e) {
|
|
2783
|
-
return oi(Ii, e);
|
|
2782
|
+
function Ii(e) {
|
|
2783
|
+
return ni($i, e);
|
|
2784
2784
|
}
|
|
2785
|
-
const
|
|
2786
|
-
|
|
2785
|
+
const Zi = (e, t) => {
|
|
2786
|
+
Tt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
|
|
2787
2787
|
format: {
|
|
2788
|
-
value: (n) =>
|
|
2788
|
+
value: (n) => Nn(e, n)
|
|
2789
2789
|
// enumerable: false,
|
|
2790
2790
|
},
|
|
2791
2791
|
flatten: {
|
|
2792
|
-
value: (n) =>
|
|
2792
|
+
value: (n) => jn(e, n)
|
|
2793
2793
|
// enumerable: false,
|
|
2794
2794
|
},
|
|
2795
2795
|
addIssue: {
|
|
@@ -2811,14 +2811,14 @@ const Oi = (e, t) => {
|
|
|
2811
2811
|
// enumerable: false,
|
|
2812
2812
|
}
|
|
2813
2813
|
});
|
|
2814
|
-
}, O = /* @__PURE__ */ _("ZodError",
|
|
2814
|
+
}, O = /* @__PURE__ */ _("ZodError", Zi, {
|
|
2815
2815
|
Parent: Error
|
|
2816
|
-
}),
|
|
2816
|
+
}), Oi = /* @__PURE__ */ Le(O), Pi = /* @__PURE__ */ je(O), xi = /* @__PURE__ */ _e(O), Li = /* @__PURE__ */ me(O), ji = /* @__PURE__ */ Fn(O), Ni = /* @__PURE__ */ Un(O), Ri = /* @__PURE__ */ Vn(O), Di = /* @__PURE__ */ Mn(O), Fi = /* @__PURE__ */ Bn(O), Ui = /* @__PURE__ */ Wn(O), Vi = /* @__PURE__ */ Gn(O), Mi = /* @__PURE__ */ qn(O), $ = /* @__PURE__ */ _("ZodType", (e, t) => (A.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(B(t, {
|
|
2817
2817
|
checks: [
|
|
2818
2818
|
...t.checks ?? [],
|
|
2819
2819
|
...n.map((o) => typeof o == "function" ? { _zod: { check: o, def: { check: "custom" }, onattach: [] } } : o)
|
|
2820
2820
|
]
|
|
2821
|
-
})), e.clone = (n, o) => D(e, n, o), e.brand = () => e, e.register = (n, o) => (n.add(e, o), e), e.parse = (n, o) =>
|
|
2821
|
+
})), e.clone = (n, o) => D(e, n, o), e.brand = () => e, e.register = (n, o) => (n.add(e, o), e), e.parse = (n, o) => Oi(e, n, o, { callee: e.parse }), e.safeParse = (n, o) => xi(e, n, o), e.parseAsync = async (n, o) => Pi(e, n, o, { callee: e.parseAsync }), e.safeParseAsync = async (n, o) => Li(e, n, o), e.spa = e.safeParseAsync, e.encode = (n, o) => ji(e, n, o), e.decode = (n, o) => Ni(e, n, o), e.encodeAsync = async (n, o) => Ri(e, n, o), e.decodeAsync = async (n, o) => Di(e, n, o), e.safeEncode = (n, o) => Fi(e, n, o), e.safeDecode = (n, o) => Ui(e, n, o), e.safeEncodeAsync = async (n, o) => Vi(e, n, o), e.safeDecodeAsync = async (n, o) => Mi(e, n, o), e.refine = (n, o) => e.check(Ds(n, o)), e.superRefine = (n) => e.check(Fs(n)), e.overwrite = (n) => e.check(ee(n)), e.optional = () => lt(e), e.nullable = () => dt(e), e.nullish = () => lt(dt(e)), e.nonoptional = (n) => Os(e, n), e.array = () => _s(e), e.or = (n) => W([e, n]), e.and = (n) => ys(e, n), e.transform = (n) => pt(e, Ss(n)), e.default = (n) => $s(e, n), e.prefault = (n) => Zs(e, n), e.catch = (n) => xs(e, n), e.pipe = (n) => pt(e, n), e.readonly = () => Ns(e), e.describe = (n) => {
|
|
2822
2822
|
const o = e.clone();
|
|
2823
2823
|
return ce.add(o, { description: n }), o;
|
|
2824
2824
|
}, Object.defineProperty(e, "description", {
|
|
@@ -2831,96 +2831,96 @@ const Oi = (e, t) => {
|
|
|
2831
2831
|
return ce.get(e);
|
|
2832
2832
|
const o = e.clone();
|
|
2833
2833
|
return ce.add(o, n[0]), o;
|
|
2834
|
-
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)),
|
|
2834
|
+
}, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Ut = /* @__PURE__ */ _("_ZodString", (e, t) => {
|
|
2835
2835
|
Ne.init(e, t), $.init(e, t);
|
|
2836
2836
|
const n = e._zod.bag;
|
|
2837
|
-
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...o) => e.check(
|
|
2838
|
-
}),
|
|
2839
|
-
Ne.init(e, t),
|
|
2837
|
+
e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...o) => e.check(ui(...o)), e.includes = (...o) => e.check(di(...o)), e.startsWith = (...o) => e.check(pi(...o)), e.endsWith = (...o) => e.check(fi(...o)), e.min = (...o) => e.check(he(...o)), e.max = (...o) => e.check(Dt(...o)), e.length = (...o) => e.check(Ft(...o)), e.nonempty = (...o) => e.check(he(1, ...o)), e.lowercase = (o) => e.check(ci(o)), e.uppercase = (o) => e.check(li(o)), e.trim = () => e.check(_i()), e.normalize = (...o) => e.check(hi(...o)), e.toLowerCase = () => e.check(mi()), e.toUpperCase = () => e.check(vi()), e.slugify = () => e.check(gi());
|
|
2838
|
+
}), Bi = /* @__PURE__ */ _("ZodString", (e, t) => {
|
|
2839
|
+
Ne.init(e, t), Ut.init(e, t), e.email = (n) => e.check(Or(Wi, n)), e.url = (n) => e.check(Nr(Gi, n)), e.jwt = (n) => e.check(Yr(as, n)), e.emoji = (n) => e.check(Rr(qi, n)), e.guid = (n) => e.check(ot(at, n)), e.uuid = (n) => e.check(Pr(le, n)), e.uuidv4 = (n) => e.check(xr(le, n)), e.uuidv6 = (n) => e.check(Lr(le, n)), e.uuidv7 = (n) => e.check(jr(le, n)), e.nanoid = (n) => e.check(Dr(Ki, n)), e.guid = (n) => e.check(ot(at, n)), e.cuid = (n) => e.check(Fr(Ji, n)), e.cuid2 = (n) => e.check(Ur(Hi, n)), e.ulid = (n) => e.check(Vr(Qi, n)), e.base64 = (n) => e.check(Jr(rs, n)), e.base64url = (n) => e.check(Hr(is, n)), e.xid = (n) => e.check(Mr(Yi, n)), e.ksuid = (n) => e.check(Br(Xi, n)), e.ipv4 = (n) => e.check(Wr(es, n)), e.ipv6 = (n) => e.check(Gr(ts, n)), e.cidrv4 = (n) => e.check(qr(ns, n)), e.cidrv6 = (n) => e.check(Kr(os, n)), e.e164 = (n) => e.check(Qr(ss, n)), e.datetime = (n) => e.check(Ei(n)), e.date = (n) => e.check(Si(n)), e.time = (n) => e.check(zi(n)), e.duration = (n) => e.check(Ii(n));
|
|
2840
2840
|
});
|
|
2841
2841
|
function Q(e) {
|
|
2842
|
-
return
|
|
2842
|
+
return Zr(Bi, e);
|
|
2843
2843
|
}
|
|
2844
2844
|
const I = /* @__PURE__ */ _("ZodStringFormat", (e, t) => {
|
|
2845
|
-
z.init(e, t),
|
|
2846
|
-
}),
|
|
2847
|
-
|
|
2845
|
+
z.init(e, t), Ut.init(e, t);
|
|
2846
|
+
}), Wi = /* @__PURE__ */ _("ZodEmail", (e, t) => {
|
|
2847
|
+
No.init(e, t), I.init(e, t);
|
|
2848
2848
|
}), at = /* @__PURE__ */ _("ZodGUID", (e, t) => {
|
|
2849
|
-
|
|
2849
|
+
Lo.init(e, t), I.init(e, t);
|
|
2850
2850
|
}), le = /* @__PURE__ */ _("ZodUUID", (e, t) => {
|
|
2851
|
-
|
|
2852
|
-
}),
|
|
2851
|
+
jo.init(e, t), I.init(e, t);
|
|
2852
|
+
}), Gi = /* @__PURE__ */ _("ZodURL", (e, t) => {
|
|
2853
|
+
Ro.init(e, t), I.init(e, t);
|
|
2854
|
+
}), qi = /* @__PURE__ */ _("ZodEmoji", (e, t) => {
|
|
2853
2855
|
Do.init(e, t), I.init(e, t);
|
|
2854
|
-
}), Ki = /* @__PURE__ */ _("
|
|
2856
|
+
}), Ki = /* @__PURE__ */ _("ZodNanoID", (e, t) => {
|
|
2855
2857
|
Fo.init(e, t), I.init(e, t);
|
|
2856
|
-
}), Ji = /* @__PURE__ */ _("
|
|
2858
|
+
}), Ji = /* @__PURE__ */ _("ZodCUID", (e, t) => {
|
|
2857
2859
|
Uo.init(e, t), I.init(e, t);
|
|
2858
|
-
}), Hi = /* @__PURE__ */ _("
|
|
2860
|
+
}), Hi = /* @__PURE__ */ _("ZodCUID2", (e, t) => {
|
|
2859
2861
|
Vo.init(e, t), I.init(e, t);
|
|
2860
|
-
}), Qi = /* @__PURE__ */ _("
|
|
2862
|
+
}), Qi = /* @__PURE__ */ _("ZodULID", (e, t) => {
|
|
2861
2863
|
Mo.init(e, t), I.init(e, t);
|
|
2862
|
-
}), Yi = /* @__PURE__ */ _("
|
|
2864
|
+
}), Yi = /* @__PURE__ */ _("ZodXID", (e, t) => {
|
|
2863
2865
|
Bo.init(e, t), I.init(e, t);
|
|
2864
|
-
}), Xi = /* @__PURE__ */ _("
|
|
2866
|
+
}), Xi = /* @__PURE__ */ _("ZodKSUID", (e, t) => {
|
|
2865
2867
|
Wo.init(e, t), I.init(e, t);
|
|
2866
|
-
}), es = /* @__PURE__ */ _("
|
|
2867
|
-
|
|
2868
|
-
}), ts = /* @__PURE__ */ _("
|
|
2868
|
+
}), es = /* @__PURE__ */ _("ZodIPv4", (e, t) => {
|
|
2869
|
+
Ho.init(e, t), I.init(e, t);
|
|
2870
|
+
}), ts = /* @__PURE__ */ _("ZodIPv6", (e, t) => {
|
|
2869
2871
|
Qo.init(e, t), I.init(e, t);
|
|
2870
|
-
}), ns = /* @__PURE__ */ _("
|
|
2872
|
+
}), ns = /* @__PURE__ */ _("ZodCIDRv4", (e, t) => {
|
|
2871
2873
|
Yo.init(e, t), I.init(e, t);
|
|
2872
|
-
}), os = /* @__PURE__ */ _("
|
|
2874
|
+
}), os = /* @__PURE__ */ _("ZodCIDRv6", (e, t) => {
|
|
2873
2875
|
Xo.init(e, t), I.init(e, t);
|
|
2874
|
-
}), rs = /* @__PURE__ */ _("
|
|
2876
|
+
}), rs = /* @__PURE__ */ _("ZodBase64", (e, t) => {
|
|
2875
2877
|
er.init(e, t), I.init(e, t);
|
|
2876
|
-
}), is = /* @__PURE__ */ _("
|
|
2877
|
-
|
|
2878
|
-
}), ss = /* @__PURE__ */ _("
|
|
2878
|
+
}), is = /* @__PURE__ */ _("ZodBase64URL", (e, t) => {
|
|
2879
|
+
nr.init(e, t), I.init(e, t);
|
|
2880
|
+
}), ss = /* @__PURE__ */ _("ZodE164", (e, t) => {
|
|
2879
2881
|
or.init(e, t), I.init(e, t);
|
|
2880
|
-
}), as = /* @__PURE__ */ _("
|
|
2881
|
-
|
|
2882
|
-
}),
|
|
2883
|
-
|
|
2884
|
-
}), Mt = /* @__PURE__ */ _("ZodNumber", (e, t) => {
|
|
2885
|
-
Nt.init(e, t), $.init(e, t), e.gt = (o, i) => e.check(it(o, i)), e.gte = (o, i) => e.check(we(o, i)), e.min = (o, i) => e.check(we(o, i)), e.lt = (o, i) => e.check(rt(o, i)), e.lte = (o, i) => e.check(be(o, i)), e.max = (o, i) => e.check(be(o, i)), e.int = (o) => e.check(ut(o)), e.safe = (o) => e.check(ut(o)), e.positive = (o) => e.check(it(0, o)), e.nonnegative = (o) => e.check(we(0, o)), e.negative = (o) => e.check(rt(0, o)), e.nonpositive = (o) => e.check(be(0, o)), e.multipleOf = (o, i) => e.check(st(o, i)), e.step = (o, i) => e.check(st(o, i)), e.finite = () => e;
|
|
2882
|
+
}), as = /* @__PURE__ */ _("ZodJWT", (e, t) => {
|
|
2883
|
+
ir.init(e, t), I.init(e, t);
|
|
2884
|
+
}), Vt = /* @__PURE__ */ _("ZodNumber", (e, t) => {
|
|
2885
|
+
jt.init(e, t), $.init(e, t), e.gt = (o, i) => e.check(it(o, i)), e.gte = (o, i) => e.check(we(o, i)), e.min = (o, i) => e.check(we(o, i)), e.lt = (o, i) => e.check(rt(o, i)), e.lte = (o, i) => e.check(be(o, i)), e.max = (o, i) => e.check(be(o, i)), e.int = (o) => e.check(ut(o)), e.safe = (o) => e.check(ut(o)), e.positive = (o) => e.check(it(0, o)), e.nonnegative = (o) => e.check(we(0, o)), e.negative = (o) => e.check(rt(0, o)), e.nonpositive = (o) => e.check(be(0, o)), e.multipleOf = (o, i) => e.check(st(o, i)), e.step = (o, i) => e.check(st(o, i)), e.finite = () => e;
|
|
2886
2886
|
const n = e._zod.bag;
|
|
2887
2887
|
e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
|
|
2888
2888
|
});
|
|
2889
2889
|
function P(e) {
|
|
2890
|
-
return
|
|
2890
|
+
return oi(Vt, e);
|
|
2891
2891
|
}
|
|
2892
|
-
const
|
|
2893
|
-
|
|
2892
|
+
const us = /* @__PURE__ */ _("ZodNumberFormat", (e, t) => {
|
|
2893
|
+
sr.init(e, t), Vt.init(e, t);
|
|
2894
2894
|
});
|
|
2895
2895
|
function ut(e) {
|
|
2896
|
-
return
|
|
2896
|
+
return ri(us, e);
|
|
2897
2897
|
}
|
|
2898
|
-
const
|
|
2899
|
-
|
|
2898
|
+
const cs = /* @__PURE__ */ _("ZodNull", (e, t) => {
|
|
2899
|
+
ar.init(e, t), $.init(e, t);
|
|
2900
2900
|
});
|
|
2901
|
-
function
|
|
2902
|
-
return
|
|
2901
|
+
function ls(e) {
|
|
2902
|
+
return ii(cs, e);
|
|
2903
2903
|
}
|
|
2904
|
-
const
|
|
2905
|
-
|
|
2904
|
+
const ds = /* @__PURE__ */ _("ZodUnknown", (e, t) => {
|
|
2905
|
+
ur.init(e, t), $.init(e, t);
|
|
2906
2906
|
});
|
|
2907
2907
|
function ct() {
|
|
2908
|
-
return
|
|
2908
|
+
return si(ds);
|
|
2909
2909
|
}
|
|
2910
|
-
const
|
|
2911
|
-
|
|
2910
|
+
const ps = /* @__PURE__ */ _("ZodNever", (e, t) => {
|
|
2911
|
+
cr.init(e, t), $.init(e, t);
|
|
2912
2912
|
});
|
|
2913
|
-
function
|
|
2914
|
-
return
|
|
2913
|
+
function fs(e) {
|
|
2914
|
+
return ai(ps, e);
|
|
2915
2915
|
}
|
|
2916
|
-
const
|
|
2917
|
-
|
|
2916
|
+
const hs = /* @__PURE__ */ _("ZodArray", (e, t) => {
|
|
2917
|
+
lr.init(e, t), $.init(e, t), e.element = t.element, e.min = (n, o) => e.check(he(n, o)), e.nonempty = (n) => e.check(he(1, n)), e.max = (n, o) => e.check(Dt(n, o)), e.length = (n, o) => e.check(Ft(n, o)), e.unwrap = () => e.element;
|
|
2918
2918
|
});
|
|
2919
|
-
function
|
|
2920
|
-
return
|
|
2919
|
+
function _s(e, t) {
|
|
2920
|
+
return yi(hs, e, t);
|
|
2921
2921
|
}
|
|
2922
|
-
const
|
|
2923
|
-
|
|
2922
|
+
const ms = /* @__PURE__ */ _("ZodObject", (e, t) => {
|
|
2923
|
+
pr.init(e, t), $.init(e, t), E(e, "shape", () => t.shape), e.keyof = () => Cs(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: ct() }), e.loose = () => e.clone({ ...e._zod.def, catchall: ct() }), e.strict = () => e.clone({ ...e._zod.def, catchall: fs() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Zn(e, n), e.safeExtend = (n) => On(e, n), e.merge = (n) => Pn(e, n), e.pick = (n) => $n(e, n), e.omit = (n) => In(e, n), e.partial = (...n) => xn(Mt, e, n[0]), e.required = (...n) => Ln(Bt, e, n[0]);
|
|
2924
2924
|
});
|
|
2925
2925
|
function T(e, t) {
|
|
2926
2926
|
const n = {
|
|
@@ -2928,48 +2928,48 @@ function T(e, t) {
|
|
|
2928
2928
|
shape: e ?? {},
|
|
2929
2929
|
...b(t)
|
|
2930
2930
|
};
|
|
2931
|
-
return new
|
|
2931
|
+
return new ms(n);
|
|
2932
2932
|
}
|
|
2933
|
-
const
|
|
2934
|
-
|
|
2933
|
+
const vs = /* @__PURE__ */ _("ZodUnion", (e, t) => {
|
|
2934
|
+
fr.init(e, t), $.init(e, t), e.options = t.options;
|
|
2935
2935
|
});
|
|
2936
2936
|
function W(e, t) {
|
|
2937
|
-
return new
|
|
2937
|
+
return new vs({
|
|
2938
2938
|
type: "union",
|
|
2939
2939
|
options: e,
|
|
2940
2940
|
...b(t)
|
|
2941
2941
|
});
|
|
2942
2942
|
}
|
|
2943
|
-
const
|
|
2944
|
-
|
|
2943
|
+
const gs = /* @__PURE__ */ _("ZodIntersection", (e, t) => {
|
|
2944
|
+
hr.init(e, t), $.init(e, t);
|
|
2945
2945
|
});
|
|
2946
|
-
function
|
|
2947
|
-
return new
|
|
2946
|
+
function ys(e, t) {
|
|
2947
|
+
return new gs({
|
|
2948
2948
|
type: "intersection",
|
|
2949
2949
|
left: e,
|
|
2950
2950
|
right: t
|
|
2951
2951
|
});
|
|
2952
2952
|
}
|
|
2953
|
-
const
|
|
2954
|
-
|
|
2953
|
+
const bs = /* @__PURE__ */ _("ZodTuple", (e, t) => {
|
|
2954
|
+
_r.init(e, t), $.init(e, t), e.rest = (n) => e.clone({
|
|
2955
2955
|
...e._zod.def,
|
|
2956
2956
|
rest: n
|
|
2957
2957
|
});
|
|
2958
2958
|
});
|
|
2959
2959
|
function L(e, t, n) {
|
|
2960
2960
|
const o = t instanceof A, i = o ? n : t, u = o ? t : null;
|
|
2961
|
-
return new
|
|
2961
|
+
return new bs({
|
|
2962
2962
|
type: "tuple",
|
|
2963
2963
|
items: e,
|
|
2964
2964
|
rest: u,
|
|
2965
2965
|
...b(i)
|
|
2966
2966
|
});
|
|
2967
2967
|
}
|
|
2968
|
-
const
|
|
2969
|
-
|
|
2968
|
+
const ws = /* @__PURE__ */ _("ZodRecord", (e, t) => {
|
|
2969
|
+
mr.init(e, t), $.init(e, t), e.keyType = t.keyType, e.valueType = t.valueType;
|
|
2970
2970
|
});
|
|
2971
|
-
function
|
|
2972
|
-
return new
|
|
2971
|
+
function ks(e, t, n) {
|
|
2972
|
+
return new ws({
|
|
2973
2973
|
type: "record",
|
|
2974
2974
|
keyType: e,
|
|
2975
2975
|
valueType: t,
|
|
@@ -2977,7 +2977,7 @@ function Cs(e, t, n) {
|
|
|
2977
2977
|
});
|
|
2978
2978
|
}
|
|
2979
2979
|
const $e = /* @__PURE__ */ _("ZodEnum", (e, t) => {
|
|
2980
|
-
|
|
2980
|
+
vr.init(e, t), $.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
|
|
2981
2981
|
const n = new Set(Object.keys(t.entries));
|
|
2982
2982
|
e.extract = (o, i) => {
|
|
2983
2983
|
const u = {};
|
|
@@ -3007,7 +3007,7 @@ const $e = /* @__PURE__ */ _("ZodEnum", (e, t) => {
|
|
|
3007
3007
|
});
|
|
3008
3008
|
};
|
|
3009
3009
|
});
|
|
3010
|
-
function
|
|
3010
|
+
function Cs(e, t) {
|
|
3011
3011
|
const n = Array.isArray(e) ? Object.fromEntries(e.map((o) => [o, o])) : e;
|
|
3012
3012
|
return new $e({
|
|
3013
3013
|
type: "enum",
|
|
@@ -3015,8 +3015,8 @@ function Es(e, t) {
|
|
|
3015
3015
|
...b(t)
|
|
3016
3016
|
});
|
|
3017
3017
|
}
|
|
3018
|
-
const
|
|
3019
|
-
|
|
3018
|
+
const Es = /* @__PURE__ */ _("ZodLiteral", (e, t) => {
|
|
3019
|
+
gr.init(e, t), $.init(e, t), e.values = new Set(t.values), Object.defineProperty(e, "value", {
|
|
3020
3020
|
get() {
|
|
3021
3021
|
if (t.values.length > 1)
|
|
3022
3022
|
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
@@ -3025,16 +3025,16 @@ const As = /* @__PURE__ */ _("ZodLiteral", (e, t) => {
|
|
|
3025
3025
|
});
|
|
3026
3026
|
});
|
|
3027
3027
|
function j(e, t) {
|
|
3028
|
-
return new
|
|
3028
|
+
return new Es({
|
|
3029
3029
|
type: "literal",
|
|
3030
3030
|
values: Array.isArray(e) ? e : [e],
|
|
3031
3031
|
...b(t)
|
|
3032
3032
|
});
|
|
3033
3033
|
}
|
|
3034
|
-
const
|
|
3035
|
-
|
|
3034
|
+
const As = /* @__PURE__ */ _("ZodTransform", (e, t) => {
|
|
3035
|
+
yr.init(e, t), $.init(e, t), e._zod.parse = (n, o) => {
|
|
3036
3036
|
if (o.direction === "backward")
|
|
3037
|
-
throw new
|
|
3037
|
+
throw new kt(e.constructor.name);
|
|
3038
3038
|
n.addIssue = (u) => {
|
|
3039
3039
|
if (typeof u == "string")
|
|
3040
3040
|
n.issues.push(re(u, n.value, t));
|
|
@@ -3047,102 +3047,102 @@ const Ss = /* @__PURE__ */ _("ZodTransform", (e, t) => {
|
|
|
3047
3047
|
return i instanceof Promise ? i.then((u) => (n.value = u, n)) : (n.value = i, n);
|
|
3048
3048
|
};
|
|
3049
3049
|
});
|
|
3050
|
-
function
|
|
3051
|
-
return new
|
|
3050
|
+
function Ss(e) {
|
|
3051
|
+
return new As({
|
|
3052
3052
|
type: "transform",
|
|
3053
3053
|
transform: e
|
|
3054
3054
|
});
|
|
3055
3055
|
}
|
|
3056
|
-
const
|
|
3057
|
-
|
|
3056
|
+
const Mt = /* @__PURE__ */ _("ZodOptional", (e, t) => {
|
|
3057
|
+
br.init(e, t), $.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
3058
3058
|
});
|
|
3059
3059
|
function lt(e) {
|
|
3060
|
-
return new
|
|
3060
|
+
return new Mt({
|
|
3061
3061
|
type: "optional",
|
|
3062
3062
|
innerType: e
|
|
3063
3063
|
});
|
|
3064
3064
|
}
|
|
3065
|
-
const
|
|
3066
|
-
|
|
3065
|
+
const Ts = /* @__PURE__ */ _("ZodNullable", (e, t) => {
|
|
3066
|
+
wr.init(e, t), $.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
3067
3067
|
});
|
|
3068
3068
|
function dt(e) {
|
|
3069
|
-
return new
|
|
3069
|
+
return new Ts({
|
|
3070
3070
|
type: "nullable",
|
|
3071
3071
|
innerType: e
|
|
3072
3072
|
});
|
|
3073
3073
|
}
|
|
3074
|
-
const
|
|
3075
|
-
|
|
3074
|
+
const zs = /* @__PURE__ */ _("ZodDefault", (e, t) => {
|
|
3075
|
+
kr.init(e, t), $.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
|
|
3076
3076
|
});
|
|
3077
|
-
function
|
|
3078
|
-
return new
|
|
3077
|
+
function $s(e, t) {
|
|
3078
|
+
return new zs({
|
|
3079
3079
|
type: "default",
|
|
3080
3080
|
innerType: e,
|
|
3081
3081
|
get defaultValue() {
|
|
3082
|
-
return typeof t == "function" ? t() :
|
|
3082
|
+
return typeof t == "function" ? t() : At(t);
|
|
3083
3083
|
}
|
|
3084
3084
|
});
|
|
3085
3085
|
}
|
|
3086
|
-
const
|
|
3087
|
-
|
|
3086
|
+
const Is = /* @__PURE__ */ _("ZodPrefault", (e, t) => {
|
|
3087
|
+
Cr.init(e, t), $.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
3088
3088
|
});
|
|
3089
|
-
function
|
|
3090
|
-
return new
|
|
3089
|
+
function Zs(e, t) {
|
|
3090
|
+
return new Is({
|
|
3091
3091
|
type: "prefault",
|
|
3092
3092
|
innerType: e,
|
|
3093
3093
|
get defaultValue() {
|
|
3094
|
-
return typeof t == "function" ? t() :
|
|
3094
|
+
return typeof t == "function" ? t() : At(t);
|
|
3095
3095
|
}
|
|
3096
3096
|
});
|
|
3097
3097
|
}
|
|
3098
|
-
const
|
|
3099
|
-
|
|
3098
|
+
const Bt = /* @__PURE__ */ _("ZodNonOptional", (e, t) => {
|
|
3099
|
+
Er.init(e, t), $.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
3100
3100
|
});
|
|
3101
|
-
function
|
|
3102
|
-
return new
|
|
3101
|
+
function Os(e, t) {
|
|
3102
|
+
return new Bt({
|
|
3103
3103
|
type: "nonoptional",
|
|
3104
3104
|
innerType: e,
|
|
3105
3105
|
...b(t)
|
|
3106
3106
|
});
|
|
3107
3107
|
}
|
|
3108
|
-
const
|
|
3109
|
-
|
|
3108
|
+
const Ps = /* @__PURE__ */ _("ZodCatch", (e, t) => {
|
|
3109
|
+
Ar.init(e, t), $.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
|
|
3110
3110
|
});
|
|
3111
|
-
function
|
|
3112
|
-
return new
|
|
3111
|
+
function xs(e, t) {
|
|
3112
|
+
return new Ps({
|
|
3113
3113
|
type: "catch",
|
|
3114
3114
|
innerType: e,
|
|
3115
3115
|
catchValue: typeof t == "function" ? t : () => t
|
|
3116
3116
|
});
|
|
3117
3117
|
}
|
|
3118
|
-
const
|
|
3119
|
-
|
|
3118
|
+
const Ls = /* @__PURE__ */ _("ZodPipe", (e, t) => {
|
|
3119
|
+
Sr.init(e, t), $.init(e, t), e.in = t.in, e.out = t.out;
|
|
3120
3120
|
});
|
|
3121
3121
|
function pt(e, t) {
|
|
3122
|
-
return new
|
|
3122
|
+
return new Ls({
|
|
3123
3123
|
type: "pipe",
|
|
3124
3124
|
in: e,
|
|
3125
3125
|
out: t
|
|
3126
3126
|
// ...util.normalizeParams(params),
|
|
3127
3127
|
});
|
|
3128
3128
|
}
|
|
3129
|
-
const
|
|
3130
|
-
|
|
3129
|
+
const js = /* @__PURE__ */ _("ZodReadonly", (e, t) => {
|
|
3130
|
+
Tr.init(e, t), $.init(e, t), e.unwrap = () => e._zod.def.innerType;
|
|
3131
3131
|
});
|
|
3132
|
-
function
|
|
3133
|
-
return new
|
|
3132
|
+
function Ns(e) {
|
|
3133
|
+
return new js({
|
|
3134
3134
|
type: "readonly",
|
|
3135
3135
|
innerType: e
|
|
3136
3136
|
});
|
|
3137
3137
|
}
|
|
3138
|
-
const
|
|
3139
|
-
|
|
3138
|
+
const Rs = /* @__PURE__ */ _("ZodCustom", (e, t) => {
|
|
3139
|
+
zr.init(e, t), $.init(e, t);
|
|
3140
3140
|
});
|
|
3141
|
-
function
|
|
3142
|
-
return
|
|
3141
|
+
function Ds(e, t = {}) {
|
|
3142
|
+
return bi(Rs, e, t);
|
|
3143
3143
|
}
|
|
3144
|
-
function
|
|
3145
|
-
return
|
|
3144
|
+
function Fs(e) {
|
|
3145
|
+
return wi(e);
|
|
3146
3146
|
}
|
|
3147
3147
|
const ge = T({
|
|
3148
3148
|
t: P().gte(0),
|
|
@@ -3151,27 +3151,27 @@ const ge = T({
|
|
|
3151
3151
|
opacity: P().gte(0).lte(1)
|
|
3152
3152
|
}), X = T({
|
|
3153
3153
|
volume: P().gte(0).lte(1)
|
|
3154
|
-
}),
|
|
3154
|
+
}), Us = T({
|
|
3155
3155
|
type: j("image"),
|
|
3156
3156
|
file: Q(),
|
|
3157
3157
|
fit: W([j("contain"), j("cover"), j("none")])
|
|
3158
|
-
}),
|
|
3158
|
+
}), Vs = T({
|
|
3159
3159
|
type: j("audio"),
|
|
3160
3160
|
file: Q(),
|
|
3161
3161
|
audioOutput: Q()
|
|
3162
|
-
}),
|
|
3162
|
+
}), Ms = T({
|
|
3163
3163
|
type: j("video"),
|
|
3164
3164
|
file: Q(),
|
|
3165
3165
|
audioOutput: Q(),
|
|
3166
3166
|
fit: W([j("contain"), j("cover"), j("none")])
|
|
3167
|
-
}), Re = L([P(),
|
|
3167
|
+
}), Re = L([P(), ls()]), Bs = L([
|
|
3168
3168
|
P(),
|
|
3169
3169
|
T({
|
|
3170
3170
|
set: T({
|
|
3171
3171
|
...Y.shape
|
|
3172
3172
|
}).partial()
|
|
3173
3173
|
}).partial()
|
|
3174
|
-
]),
|
|
3174
|
+
]), Ws = L([
|
|
3175
3175
|
P(),
|
|
3176
3176
|
T({
|
|
3177
3177
|
set: T({
|
|
@@ -3181,7 +3181,7 @@ const ge = T({
|
|
|
3181
3181
|
...Y.shape
|
|
3182
3182
|
}).partial()
|
|
3183
3183
|
}).partial()
|
|
3184
|
-
]),
|
|
3184
|
+
]), Gs = L([
|
|
3185
3185
|
P(),
|
|
3186
3186
|
T({
|
|
3187
3187
|
set: T({
|
|
@@ -3189,7 +3189,7 @@ const ge = T({
|
|
|
3189
3189
|
...X.shape
|
|
3190
3190
|
}).partial()
|
|
3191
3191
|
}).partial()
|
|
3192
|
-
]),
|
|
3192
|
+
]), qs = L([
|
|
3193
3193
|
P(),
|
|
3194
3194
|
T({
|
|
3195
3195
|
set: T({
|
|
@@ -3200,7 +3200,7 @@ const ge = T({
|
|
|
3200
3200
|
...X.shape
|
|
3201
3201
|
}).partial()
|
|
3202
3202
|
}).partial()
|
|
3203
|
-
]),
|
|
3203
|
+
]), Ks = L([
|
|
3204
3204
|
P(),
|
|
3205
3205
|
T({
|
|
3206
3206
|
set: T({
|
|
@@ -3209,7 +3209,7 @@ const ge = T({
|
|
|
3209
3209
|
...Y.shape
|
|
3210
3210
|
}).partial()
|
|
3211
3211
|
}).partial()
|
|
3212
|
-
]),
|
|
3212
|
+
]), Js = L([
|
|
3213
3213
|
P(),
|
|
3214
3214
|
T({
|
|
3215
3215
|
set: T({
|
|
@@ -3222,35 +3222,35 @@ const ge = T({
|
|
|
3222
3222
|
...Y.shape
|
|
3223
3223
|
}).partial()
|
|
3224
3224
|
}).partial()
|
|
3225
|
-
]),
|
|
3225
|
+
]), Hs = T({
|
|
3226
|
+
...Us.shape,
|
|
3227
|
+
keyframes: L([Ws], W([Bs, Re]))
|
|
3228
|
+
}), Qs = T({
|
|
3226
3229
|
...Vs.shape,
|
|
3227
|
-
keyframes: L([
|
|
3230
|
+
keyframes: L([qs], W([Gs, Re]))
|
|
3228
3231
|
}), Ys = T({
|
|
3229
3232
|
...Ms.shape,
|
|
3230
|
-
keyframes: L([
|
|
3231
|
-
}), Xs =
|
|
3232
|
-
...Bs.shape,
|
|
3233
|
-
keyframes: L([Hs], W([Js, Re]))
|
|
3234
|
-
}), ea = Cs(Q(), W([Qs, Ys, Xs])), Gt = {
|
|
3233
|
+
keyframes: L([Js], W([Ks, Re]))
|
|
3234
|
+
}), Xs = ks(Q(), W([Hs, Qs, Ys])), Wt = {
|
|
3235
3235
|
opacity: 1
|
|
3236
3236
|
}, De = {
|
|
3237
3237
|
t: 0,
|
|
3238
3238
|
rate: 1,
|
|
3239
3239
|
volume: 1
|
|
3240
|
-
},
|
|
3240
|
+
}, Gt = {
|
|
3241
3241
|
t: 0,
|
|
3242
3242
|
rate: 1,
|
|
3243
3243
|
volume: 1,
|
|
3244
3244
|
opacity: 1
|
|
3245
|
-
},
|
|
3245
|
+
}, ia = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3246
3246
|
__proto__: null,
|
|
3247
|
-
MediaSurfaceStateSchema:
|
|
3247
|
+
MediaSurfaceStateSchema: Xs,
|
|
3248
3248
|
defaultAudioOptions: De,
|
|
3249
|
-
defaultImageOptions:
|
|
3250
|
-
defaultVideoOptions:
|
|
3249
|
+
defaultImageOptions: Wt,
|
|
3250
|
+
defaultVideoOptions: Gt
|
|
3251
3251
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
3252
3252
|
var ke = {}, ft;
|
|
3253
|
-
function
|
|
3253
|
+
function ea() {
|
|
3254
3254
|
return ft || (ft = 1, function(e) {
|
|
3255
3255
|
var t = {};
|
|
3256
3256
|
/*! howler.js v2.2.1 | (c) 2013-2020, James Simpson of GoldFire Studios | MIT License | howlerjs.com */
|
|
@@ -3452,13 +3452,13 @@ function ta() {
|
|
|
3452
3452
|
r !== "__default" || h._loop ? a._endTimers[h._id] = setTimeout(a._ended.bind(a, h), x) : (a._endTimers[h._id] = function() {
|
|
3453
3453
|
a._ended(h), S.removeEventListener("ended", a._endTimers[h._id], !1);
|
|
3454
3454
|
}, S.addEventListener("ended", a._endTimers[h._id], !1));
|
|
3455
|
-
} catch (
|
|
3456
|
-
a._emit("playerror", h._id,
|
|
3455
|
+
} catch (Kt) {
|
|
3456
|
+
a._emit("playerror", h._id, Kt);
|
|
3457
3457
|
}
|
|
3458
3458
|
};
|
|
3459
3459
|
S.src === "data:audio/wav;base64,UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA" && (S.src = a._src, S.load());
|
|
3460
|
-
var
|
|
3461
|
-
if (S.readyState >= 3 ||
|
|
3460
|
+
var qt = window && window.ejecta || !S.readyState && o._navigator.isCocoonJS;
|
|
3461
|
+
if (S.readyState >= 3 || qt) Ue();
|
|
3462
3462
|
else {
|
|
3463
3463
|
a._playLock = !0;
|
|
3464
3464
|
var Ve = function() {
|
|
@@ -3796,9 +3796,9 @@ function ta() {
|
|
|
3796
3796
|
})();
|
|
3797
3797
|
}(ke)), ke;
|
|
3798
3798
|
}
|
|
3799
|
-
var ht =
|
|
3800
|
-
const
|
|
3801
|
-
class
|
|
3799
|
+
var ht = ea();
|
|
3800
|
+
const ta = typeof navigator < "u" && typeof navigator.standalone < "u";
|
|
3801
|
+
class sa {
|
|
3802
3802
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3803
3803
|
constructor(t) {
|
|
3804
3804
|
this.cogsConnection = t, this.eventTarget = new EventTarget(), this.globalVolume = 1, this.audioClipPlayers = {}, this.sinkId = "", this.addEventListener("audioClipState", ({ detail: o }) => {
|
|
@@ -3902,7 +3902,7 @@ class aa {
|
|
|
3902
3902
|
), u));
|
|
3903
3903
|
}
|
|
3904
3904
|
stopAudioClip(t, { fade: n }, o, i) {
|
|
3905
|
-
|
|
3905
|
+
na("Stop audio clip", { activeClips: this.audioClipPlayers[t]?.activeClips }), Object.keys(this.audioClipPlayers[t]?.activeClips ?? {}).length !== 0 && this.updateAudioClipPlayer(t, (u) => (u.activeClips = Object.fromEntries(
|
|
3906
3906
|
Object.entries(u.activeClips).map(([c, l]) => {
|
|
3907
3907
|
const p = parseInt(c);
|
|
3908
3908
|
return (o === void 0 || o === p) && (i && l.state.type === "stop_requested" || l.state.type === "playing" || l.state.type === "pausing" || l.state.type === "paused" || l.state.type === "stopping" ? ne(n) && l.state.type !== "paused" ? (u.player.off("fade", p), oe(u.player, 0, n * 1e3, p), u.player.once(
|
|
@@ -4026,10 +4026,10 @@ class aa {
|
|
|
4026
4026
|
return n.config.preload !== o.preload && (i.player.unload(), i.player = this.createPlayer(t, o)), i;
|
|
4027
4027
|
}
|
|
4028
4028
|
}
|
|
4029
|
-
function
|
|
4029
|
+
function na(...e) {
|
|
4030
4030
|
}
|
|
4031
4031
|
function ne(e) {
|
|
4032
|
-
return !
|
|
4032
|
+
return !ta && typeof e == "number" && !isNaN(e) && e > 0;
|
|
4033
4033
|
}
|
|
4034
4034
|
function Ce(e, t) {
|
|
4035
4035
|
t !== void 0 && (e._html5 ? e._sounds?.forEach((n) => {
|
|
@@ -4043,9 +4043,8 @@ function oe(e, t, n, o) {
|
|
|
4043
4043
|
e.fade(e.volume(o), t, n, o);
|
|
4044
4044
|
}
|
|
4045
4045
|
var Ie = /* @__PURE__ */ ((e) => (e.Paused = "paused", e.Playing = "playing", e))(Ie || {});
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
constructor(t, n = _t) {
|
|
4046
|
+
class aa {
|
|
4047
|
+
constructor(t, n = document.body) {
|
|
4049
4048
|
this.cogsConnection = t, this.eventTarget = new EventTarget(), this.globalVolume = 1, this.videoClipPlayers = {}, this.sinkId = "", this.parentElement = n, this.addEventListener("videoClipState", ({ detail: i }) => {
|
|
4050
4049
|
t.sendMediaClipState(i);
|
|
4051
4050
|
}), t.addEventListener("message", ({ message: i }) => {
|
|
@@ -4094,7 +4093,7 @@ class ua {
|
|
|
4094
4093
|
});
|
|
4095
4094
|
}
|
|
4096
4095
|
resetParentElement() {
|
|
4097
|
-
this.setParentElement(
|
|
4096
|
+
this.setParentElement(document.body);
|
|
4098
4097
|
}
|
|
4099
4098
|
setGlobalVolume(t) {
|
|
4100
4099
|
Object.values(this.videoClipPlayers).forEach((n) => {
|
|
@@ -4141,7 +4140,7 @@ class ua {
|
|
|
4141
4140
|
}
|
|
4142
4141
|
setAudioSink(t) {
|
|
4143
4142
|
for (const n of Object.values(this.videoClipPlayers))
|
|
4144
|
-
|
|
4143
|
+
mt(n, t);
|
|
4145
4144
|
this.sinkId = t;
|
|
4146
4145
|
}
|
|
4147
4146
|
updateConfig(t) {
|
|
@@ -4151,11 +4150,11 @@ class ua {
|
|
|
4151
4150
|
return Object.keys(o).filter((p) => !(p in n)).forEach((p) => {
|
|
4152
4151
|
this.activeClip?.path === p && o[p]?.config.ephemeral === !1 ? this.updateVideoClipPlayer(p, (m) => (m.config = { ...m.config, ephemeral: !0 }, m)) : (this.unloadClip(p), delete i[p]);
|
|
4153
4152
|
}), Object.entries(n).filter(([p]) => !o[p]).forEach(([p, m]) => {
|
|
4154
|
-
i[p] = this.createClipPlayer(p, { ...m, preload:
|
|
4153
|
+
i[p] = this.createClipPlayer(p, { ...m, preload: _t(m.preload), ephemeral: !1, fit: "contain" });
|
|
4155
4154
|
}), Object.entries(o).filter(([p]) => p in n).forEach(([p, m]) => {
|
|
4156
4155
|
m.config.preload !== n[p].preload && this.updateVideoClipPlayer(p, (y) => (y.config = {
|
|
4157
4156
|
...y.config,
|
|
4158
|
-
preload:
|
|
4157
|
+
preload: _t(n[p].preload),
|
|
4159
4158
|
ephemeral: !1
|
|
4160
4159
|
}, y.videoElement.preload = y.config.preload, y));
|
|
4161
4160
|
}), i;
|
|
@@ -4218,7 +4217,7 @@ class ua {
|
|
|
4218
4217
|
videoElement: this.createVideoElement(t, n, { volume: 1 }),
|
|
4219
4218
|
volume: 1
|
|
4220
4219
|
};
|
|
4221
|
-
return
|
|
4220
|
+
return mt(i, this.sinkId), i;
|
|
4222
4221
|
}
|
|
4223
4222
|
unloadClip(t) {
|
|
4224
4223
|
if (this.activeClip?.path === t) {
|
|
@@ -4228,36 +4227,36 @@ class ua {
|
|
|
4228
4227
|
this.videoClipPlayers[t]?.videoElement.remove(), this.updateVideoClipPlayer(t, () => null);
|
|
4229
4228
|
}
|
|
4230
4229
|
}
|
|
4231
|
-
function
|
|
4230
|
+
function _t(e) {
|
|
4232
4231
|
return typeof e == "string" ? e : e ? "auto" : "none";
|
|
4233
4232
|
}
|
|
4234
|
-
function
|
|
4233
|
+
function mt(e, t) {
|
|
4235
4234
|
t !== void 0 && typeof e.videoElement.setSinkId == "function" && e.videoElement.setSinkId(t);
|
|
4236
4235
|
}
|
|
4237
4236
|
function de(e, t) {
|
|
4238
4237
|
e.volume = t, e.muted = t === 0;
|
|
4239
4238
|
}
|
|
4240
|
-
function
|
|
4239
|
+
function ua(e, t) {
|
|
4241
4240
|
switch (e.type) {
|
|
4242
4241
|
case "image": {
|
|
4243
4242
|
if (e.keyframes[0][0] > t)
|
|
4244
4243
|
return;
|
|
4245
4244
|
const o = e.keyframes.filter((u) => u[1] !== null), i = Ae(o, t);
|
|
4246
|
-
return { ...
|
|
4245
|
+
return { ...Wt, ...i };
|
|
4247
4246
|
}
|
|
4248
4247
|
case "audio": {
|
|
4249
|
-
const n = e.keyframes.filter((u) => u[1] !== null), o =
|
|
4248
|
+
const n = e.keyframes.filter((u) => u[1] !== null), o = vt(n, t);
|
|
4250
4249
|
if (!o)
|
|
4251
4250
|
return;
|
|
4252
4251
|
const i = Ae(n, t);
|
|
4253
4252
|
return { ...De, ...i, ...o };
|
|
4254
4253
|
}
|
|
4255
4254
|
case "video": {
|
|
4256
|
-
const n = e.keyframes.filter((u) => u[1] !== null), o =
|
|
4255
|
+
const n = e.keyframes.filter((u) => u[1] !== null), o = vt(n, t);
|
|
4257
4256
|
if (!o)
|
|
4258
4257
|
return;
|
|
4259
4258
|
const i = Ae(n, t);
|
|
4260
|
-
return { ...
|
|
4259
|
+
return { ...Gt, ...i, ...o };
|
|
4261
4260
|
}
|
|
4262
4261
|
}
|
|
4263
4262
|
}
|
|
@@ -4289,7 +4288,7 @@ function Ae(e, t) {
|
|
|
4289
4288
|
}
|
|
4290
4289
|
), o;
|
|
4291
4290
|
}
|
|
4292
|
-
function
|
|
4291
|
+
function vt(e, t) {
|
|
4293
4292
|
const n = e[0];
|
|
4294
4293
|
if (!n || n[0] > t)
|
|
4295
4294
|
return;
|
|
@@ -4314,26 +4313,26 @@ function gt(e, t) {
|
|
|
4314
4313
|
t: p
|
|
4315
4314
|
};
|
|
4316
4315
|
}
|
|
4317
|
-
const
|
|
4316
|
+
const ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
4318
4317
|
__proto__: null
|
|
4319
4318
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4320
4319
|
export {
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
|
|
4331
|
-
|
|
4320
|
+
sa as CogsAudioPlayer,
|
|
4321
|
+
vn as CogsConfigChangedEvent,
|
|
4322
|
+
ra as CogsConnection,
|
|
4323
|
+
_n as CogsConnectionCloseEvent,
|
|
4324
|
+
hn as CogsConnectionOpenEvent,
|
|
4325
|
+
yn as CogsIncomingEvent,
|
|
4326
|
+
bn as CogsMediaConfigChangedEvent,
|
|
4327
|
+
mn as CogsMessageEvent,
|
|
4328
|
+
wn as CogsShowPhaseChangedEvent,
|
|
4329
|
+
gn as CogsStateChangedEvent,
|
|
4330
|
+
aa as CogsVideoPlayer,
|
|
4332
4331
|
Me as DataStoreItemEvent,
|
|
4333
4332
|
Be as DataStoreItemsEvent,
|
|
4334
|
-
|
|
4335
|
-
|
|
4336
|
-
|
|
4337
|
-
|
|
4338
|
-
|
|
4333
|
+
ca as ManifestTypes,
|
|
4334
|
+
ia as MediaSchema,
|
|
4335
|
+
on as assetUrl,
|
|
4336
|
+
ua as getStateAtTime,
|
|
4337
|
+
oa as preloadUrl
|
|
4339
4338
|
};
|