@marimo-team/islands 0.13.7-dev40 → 0.13.7-dev5
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/{ConnectedDataExplorerComponent-CYSgsp3O.js → ConnectedDataExplorerComponent-BatMCQTA.js} +2 -2
- package/dist/{VegaLite-CETomlHl.js → VegaLite-DoBJ-oNC.js} +3 -3
- package/dist/{_baseUniq-B7twUAvD.js → _baseUniq-Dj3N2HcF.js} +54 -54
- package/dist/{any-language-editor-DdPwSert.js → any-language-editor-CkLeYYWD.js} +1 -1
- package/dist/{architectureDiagram-IEHRJDOE-CZTgeC9W.js → architectureDiagram-IEHRJDOE-CJLQQT1w.js} +5 -5
- package/dist/assets/{save-worker-BPdUArx2.js → save-worker-9JEjyZ7F.js} +417 -441
- package/dist/assets/{worker-PjUOGXtl.js → worker-C9lFbiFX.js} +442 -466
- package/dist/assets/{worker-ClUJakx7.js → worker-CCjA_vqR.js} +438 -462
- package/dist/{blockDiagram-JOT3LUYC-ogIw9Q6a.js → blockDiagram-JOT3LUYC-CHvGBSp_.js} +4 -4
- package/dist/{c4Diagram-VJAJSXHY-Bqm8cbLv.js → c4Diagram-VJAJSXHY-DzKrCaoi.js} +2 -2
- package/dist/{channel-CHN_jIr2.js → channel-ClokAHrJ.js} +1 -1
- package/dist/{chunk-4BMEZGHF-CbeSKFRy.js → chunk-4BMEZGHF-BhOn4EkM.js} +1 -1
- package/dist/{chunk-A2AXSNBT-Dn7f3Ewk.js → chunk-A2AXSNBT-n51-aV_S.js} +2 -2
- package/dist/{chunk-AEK57VVT-0TnPcFlH.js → chunk-AEK57VVT-BJin9K3p.js} +2 -2
- package/dist/{chunk-D6G4REZN-fc3_hs4j.js → chunk-D6G4REZN-CrZlZQt-.js} +1 -1
- package/dist/{chunk-RZ5BOZE2-rSwqHJD9.js → chunk-RZ5BOZE2-4vdvZ4br.js} +1 -1
- package/dist/{chunk-XZIHB7SX-GDQFvTSk.js → chunk-XZIHB7SX-Dn_ElyDg.js} +1 -1
- package/dist/{classDiagram-GIVACNV2-BL810JL0.js → classDiagram-GIVACNV2-Dmk2Di0K.js} +2 -2
- package/dist/{classDiagram-v2-COTLJTTW-BL810JL0.js → classDiagram-v2-COTLJTTW-Dmk2Di0K.js} +2 -2
- package/dist/{clone-fWd3_zgI.js → clone-he3VerFm.js} +1 -1
- package/dist/{dagre-OKDRZEBW-BLtIB11x.js → dagre-OKDRZEBW-BT6YEYTi.js} +6 -6
- package/dist/{data-editor-CfyfNLDx.js → data-editor-ChfOV5jT.js} +1 -1
- package/dist/{diagram-SSKATNLV-AgjChDea.js → diagram-SSKATNLV-HV9gOWc1.js} +3 -3
- package/dist/{diagram-VNBRO52H-C-emK9RF.js → diagram-VNBRO52H-vomGWhLu.js} +3 -3
- package/dist/{erDiagram-Q7BY3M3F-BwcASwn7.js → erDiagram-Q7BY3M3F-DnXhE-_d.js} +3 -3
- package/dist/{flowDiagram-4HSFHLVR-nz523r1g.js → flowDiagram-4HSFHLVR-BkDor4hP.js} +3 -3
- package/dist/{ganttDiagram-APWFNJXF-B1QKw7Ch.js → ganttDiagram-APWFNJXF-CMFDT3AS.js} +55 -55
- package/dist/{gitGraphDiagram-7IBYFJ6S-D0SyEM22.js → gitGraphDiagram-7IBYFJ6S-DfMYAKY4.js} +4 -4
- package/dist/{graph-VtkoJaq5.js → graph-VyPlcTqI.js} +3 -3
- package/dist/{index-Bi5a26CP.js → index-C3TegfFl.js} +1 -1
- package/dist/{index-CYSn4MQO.js → index-DjiRSpPv.js} +1 -1
- package/dist/{index-DiNtp5qL.js → index-DlNPdrTi.js} +1 -1
- package/dist/{index-CmOf5tRo.js → index-NFxL83ko.js} +3 -3
- package/dist/{infoDiagram-PH2N3AL5-BIxrSXmr.js → infoDiagram-PH2N3AL5-C777ue1G.js} +2 -2
- package/dist/{journeyDiagram-U35MCT3I-BbP23w5E.js → journeyDiagram-U35MCT3I-JrTGZM4U.js} +2 -2
- package/dist/{kanban-definition-NDS4AKOZ-C-f7j6OQ.js → kanban-definition-NDS4AKOZ-DQ4vHHy5.js} +1 -1
- package/dist/{layout-DktFBqAM.js → layout-Ces-tp25.js} +51 -51
- package/dist/{linear-B1HvGnNk.js → linear-mZ09EekH.js} +32 -32
- package/dist/{main-DAGM_mgq.js → main-BMlqmbJw.js} +37406 -39009
- package/dist/main.js +1 -1
- package/dist/{mermaid-Ce0sG-6z.js → mermaid-CJHyJ79t.js} +28 -28
- package/dist/min-BO_Q2aOM.js +80 -0
- package/dist/{mindmap-definition-ALO5MXBD-UkhXkXZL.js → mindmap-definition-ALO5MXBD-Ds52zaiA.js} +2 -2
- package/dist/{pieDiagram-IB7DONF6-DZ8e0onv.js → pieDiagram-IB7DONF6-CSQMTe3u.js} +3 -3
- package/dist/{quadrantDiagram-7GDLP6J5-BAXFk__4.js → quadrantDiagram-7GDLP6J5-DXyk0snT.js} +2 -2
- package/dist/{radar-MK3ICKWK-OmeRgQkj.js → radar-MK3ICKWK-BZg467tO.js} +11 -11
- package/dist/{react-plotly-CgO_4KPh.js → react-plotly-1zj0gkfN.js} +1 -1
- package/dist/{requirementDiagram-KVF5MWMF-CF3z32w8.js → requirementDiagram-KVF5MWMF-B-4g7i_2.js} +2 -2
- package/dist/{sankeyDiagram-QLVOVGJD-Ch6UL6dg.js → sankeyDiagram-QLVOVGJD-fuaUIbDR.js} +1 -1
- package/dist/{sequenceDiagram-X6HHIX6F-BZsYEllc.js → sequenceDiagram-X6HHIX6F-BqRLi1wS.js} +3 -3
- package/dist/{slides-component-Dsd4Lg7x.js → slides-component-BqWKzK3P.js} +1 -1
- package/dist/{stateDiagram-DGXRK772-8Iyhejya.js → stateDiagram-DGXRK772-DO6ZMy0-.js} +4 -4
- package/dist/{stateDiagram-v2-YXO3MK2T-BRQFgcQj.js → stateDiagram-v2-YXO3MK2T-iWx1jAPN.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{time-DMbhhwKA.js → time-GI2U-K0W.js} +2 -2
- package/dist/{timeline-definition-BDJGKUSR-_LxohxBU.js → timeline-definition-BDJGKUSR-eJ2TL-1H.js} +1 -1
- package/dist/{vega-component-CeLN-OvT.js → vega-component-CXS4NF92.js} +2 -2
- package/dist/{xychartDiagram-VJFVF3MP-GgTfwu6o.js → xychartDiagram-VJFVF3MP-BS-5RLk2.js} +2 -2
- package/package.json +4 -5
- package/dist/min-1n828WT8.js +0 -85
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
class
|
|
1
|
+
var yr = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
|
|
2
|
+
var os = yr((ls, pt) => {
|
|
3
|
+
class gr {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.status = "pending", this.promise = new Promise((e, r) => {
|
|
6
6
|
this.reject = (n) => {
|
|
@@ -11,24 +11,10 @@ var ls = _r((ps, yt) => {
|
|
|
11
11
|
});
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
|
-
function
|
|
14
|
+
function xe(t) {
|
|
15
15
|
return t.FS;
|
|
16
16
|
}
|
|
17
|
-
const
|
|
18
|
-
NOOP: () => {
|
|
19
|
-
}
|
|
20
|
-
}, It = (t, e) => {
|
|
21
|
-
const r = `[${t}]`;
|
|
22
|
-
return {
|
|
23
|
-
debug: (...n) => e.debug(r, ...n),
|
|
24
|
-
log: (...n) => e.log(r, ...n),
|
|
25
|
-
warn: (...n) => e.warn(r, ...n),
|
|
26
|
-
error: (...n) => e.error(r, ...n),
|
|
27
|
-
trace: (...n) => e.trace(r, ...n),
|
|
28
|
-
get: (n) => It(`${t}.${n}`, e),
|
|
29
|
-
disabled: (n = !0) => n ? He : e
|
|
30
|
-
};
|
|
31
|
-
}, Be = {
|
|
17
|
+
const wt = {
|
|
32
18
|
debug: (...t) => {
|
|
33
19
|
console.debug(...t);
|
|
34
20
|
},
|
|
@@ -43,54 +29,44 @@ var ls = _r((ps, yt) => {
|
|
|
43
29
|
},
|
|
44
30
|
trace: (...t) => {
|
|
45
31
|
console.trace(...t);
|
|
46
|
-
}
|
|
47
|
-
get: (t) => It(t, Be),
|
|
48
|
-
disabled: (t = !0) => t ? He : Be
|
|
49
|
-
}, He = {
|
|
50
|
-
debug: () => ke.NOOP,
|
|
51
|
-
log: () => ke.NOOP,
|
|
52
|
-
warn: () => ke.NOOP,
|
|
53
|
-
error: () => ke.NOOP,
|
|
54
|
-
trace: () => ke.NOOP,
|
|
55
|
-
get: () => He,
|
|
56
|
-
disabled: () => He
|
|
32
|
+
}
|
|
57
33
|
};
|
|
58
|
-
function
|
|
59
|
-
return typeof window < "u" && window.Logger ||
|
|
34
|
+
function vr() {
|
|
35
|
+
return typeof window < "u" && window.Logger || wt;
|
|
60
36
|
}
|
|
61
|
-
const Y =
|
|
62
|
-
NOTEBOOK_FILENAME:
|
|
63
|
-
HOME_DIR:
|
|
37
|
+
const Y = vr(), nt = (t) => new TextDecoder().decode(t), ke = "notebook.py", be = "/marimo", ie = {
|
|
38
|
+
NOTEBOOK_FILENAME: ke,
|
|
39
|
+
HOME_DIR: be,
|
|
64
40
|
createHomeDir: (t) => {
|
|
65
|
-
const e =
|
|
41
|
+
const e = xe(t);
|
|
66
42
|
try {
|
|
67
|
-
e.mkdirTree(
|
|
43
|
+
e.mkdirTree(be);
|
|
68
44
|
} catch {
|
|
69
45
|
}
|
|
70
|
-
e.chdir(
|
|
46
|
+
e.chdir(be);
|
|
71
47
|
},
|
|
72
48
|
mountFS: (t) => {
|
|
73
|
-
|
|
49
|
+
xe(t).mount(t.FS.filesystems.IDBFS, { root: "." }, be);
|
|
74
50
|
},
|
|
75
51
|
populateFilesToMemory: async (t) => {
|
|
76
|
-
await
|
|
52
|
+
await kt(t, !0);
|
|
77
53
|
},
|
|
78
54
|
persistFilesToRemote: async (t) => {
|
|
79
|
-
await
|
|
55
|
+
await kt(t, !1);
|
|
80
56
|
},
|
|
81
57
|
readNotebook: (t) => {
|
|
82
|
-
const e =
|
|
83
|
-
return
|
|
58
|
+
const e = xe(t), r = `${be}/${ke}`;
|
|
59
|
+
return nt(e.readFile(r));
|
|
84
60
|
},
|
|
85
61
|
initNotebookCode: (t) => {
|
|
86
|
-
const { pyodide: e, filename: r, code: n } = t, s =
|
|
62
|
+
const { pyodide: e, filename: r, code: n } = t, s = xe(e), a = (i) => {
|
|
87
63
|
try {
|
|
88
|
-
return
|
|
64
|
+
return nt(s.readFile(i));
|
|
89
65
|
} catch {
|
|
90
66
|
return null;
|
|
91
67
|
}
|
|
92
68
|
};
|
|
93
|
-
if (r && r !==
|
|
69
|
+
if (r && r !== ke) {
|
|
94
70
|
const i = a(r);
|
|
95
71
|
if (i)
|
|
96
72
|
return {
|
|
@@ -98,15 +74,15 @@ var ls = _r((ps, yt) => {
|
|
|
98
74
|
filename: r
|
|
99
75
|
};
|
|
100
76
|
}
|
|
101
|
-
return s.writeFile(
|
|
77
|
+
return s.writeFile(ke, n), {
|
|
102
78
|
code: n,
|
|
103
|
-
filename:
|
|
79
|
+
filename: ke
|
|
104
80
|
};
|
|
105
81
|
}
|
|
106
82
|
};
|
|
107
|
-
function
|
|
83
|
+
function kt(t, e) {
|
|
108
84
|
return new Promise((r, n) => {
|
|
109
|
-
|
|
85
|
+
xe(t).syncfs(e, (s) => {
|
|
110
86
|
if (s instanceof Error) {
|
|
111
87
|
n(s);
|
|
112
88
|
return;
|
|
@@ -115,7 +91,7 @@ var ls = _r((ps, yt) => {
|
|
|
115
91
|
});
|
|
116
92
|
});
|
|
117
93
|
}
|
|
118
|
-
class
|
|
94
|
+
class _r {
|
|
119
95
|
constructor(e) {
|
|
120
96
|
this.onMessage = e, this.started = !1, this.push = (r) => {
|
|
121
97
|
this.started ? this.onMessage(r) : this.buffer.push(r);
|
|
@@ -160,14 +136,14 @@ var ls = _r((ps, yt) => {
|
|
|
160
136
|
}
|
|
161
137
|
t.joinValues = n, t.jsonStringifyReplacer = (s, a) => typeof a == "bigint" ? a.toString() : a;
|
|
162
138
|
})(k || (k = {}));
|
|
163
|
-
var
|
|
139
|
+
var st;
|
|
164
140
|
(function(t) {
|
|
165
141
|
t.mergeShapes = (e, r) => ({
|
|
166
142
|
...e,
|
|
167
143
|
...r
|
|
168
144
|
// second overwrites first
|
|
169
145
|
});
|
|
170
|
-
})(
|
|
146
|
+
})(st || (st = {}));
|
|
171
147
|
const p = k.arrayToEnum([
|
|
172
148
|
"string",
|
|
173
149
|
"nan",
|
|
@@ -227,7 +203,7 @@ var ls = _r((ps, yt) => {
|
|
|
227
203
|
"invalid_intersection_types",
|
|
228
204
|
"not_multiple_of",
|
|
229
205
|
"not_finite"
|
|
230
|
-
]),
|
|
206
|
+
]), wr = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
231
207
|
class P extends Error {
|
|
232
208
|
get errors() {
|
|
233
209
|
return this.issues;
|
|
@@ -344,14 +320,14 @@ var ls = _r((ps, yt) => {
|
|
|
344
320
|
}
|
|
345
321
|
return { message: r };
|
|
346
322
|
};
|
|
347
|
-
let
|
|
348
|
-
function
|
|
349
|
-
|
|
323
|
+
let At = ve;
|
|
324
|
+
function kr(t) {
|
|
325
|
+
At = t;
|
|
350
326
|
}
|
|
351
|
-
function
|
|
352
|
-
return
|
|
327
|
+
function Ue() {
|
|
328
|
+
return At;
|
|
353
329
|
}
|
|
354
|
-
const
|
|
330
|
+
const Be = (t) => {
|
|
355
331
|
const { data: e, path: r, errorMaps: n, issueData: s } = t, a = [...r, ...s.path || []], i = {
|
|
356
332
|
...s,
|
|
357
333
|
path: a
|
|
@@ -371,9 +347,9 @@ var ls = _r((ps, yt) => {
|
|
|
371
347
|
path: a,
|
|
372
348
|
message: o
|
|
373
349
|
};
|
|
374
|
-
},
|
|
350
|
+
}, br = [];
|
|
375
351
|
function f(t, e) {
|
|
376
|
-
const r =
|
|
352
|
+
const r = Ue(), n = Be({
|
|
377
353
|
issueData: e,
|
|
378
354
|
data: t.data,
|
|
379
355
|
path: t.path,
|
|
@@ -433,12 +409,12 @@ var ls = _r((ps, yt) => {
|
|
|
433
409
|
}
|
|
434
410
|
const y = Object.freeze({
|
|
435
411
|
status: "aborted"
|
|
436
|
-
}), ye = (t) => ({ status: "dirty", value: t }), C = (t) => ({ status: "valid", value: t }),
|
|
437
|
-
function
|
|
412
|
+
}), ye = (t) => ({ status: "dirty", value: t }), C = (t) => ({ status: "valid", value: t }), at = (t) => t.status === "aborted", it = (t) => t.status === "dirty", ce = (t) => t.status === "valid", Ee = (t) => typeof Promise < "u" && t instanceof Promise;
|
|
413
|
+
function He(t, e, r, n) {
|
|
438
414
|
if (typeof e == "function" ? t !== e || !0 : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
439
415
|
return e.get(t);
|
|
440
416
|
}
|
|
441
|
-
function
|
|
417
|
+
function Ct(t, e, r, n, s) {
|
|
442
418
|
if (typeof e == "function" ? t !== e || !0 : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
443
419
|
return e.set(t, r), r;
|
|
444
420
|
}
|
|
@@ -446,7 +422,7 @@ var ls = _r((ps, yt) => {
|
|
|
446
422
|
(function(t) {
|
|
447
423
|
t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
448
424
|
})(h || (h = {}));
|
|
449
|
-
var
|
|
425
|
+
var Se, Te;
|
|
450
426
|
class V {
|
|
451
427
|
constructor(e, r, n, s) {
|
|
452
428
|
this._cachedPath = [], this.parent = e, this.data = r, this._path = n, this._key = s;
|
|
@@ -455,7 +431,7 @@ var ls = _r((ps, yt) => {
|
|
|
455
431
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
456
432
|
}
|
|
457
433
|
}
|
|
458
|
-
const
|
|
434
|
+
const bt = (t, e) => {
|
|
459
435
|
if (ce(e))
|
|
460
436
|
return { success: !0, data: e.value };
|
|
461
437
|
if (!t.common.issues.length)
|
|
@@ -514,7 +490,7 @@ var ls = _r((ps, yt) => {
|
|
|
514
490
|
}
|
|
515
491
|
_parseSync(e) {
|
|
516
492
|
const r = this._parse(e);
|
|
517
|
-
if (
|
|
493
|
+
if (Ee(r))
|
|
518
494
|
throw new Error("Synchronous parse encountered promise.");
|
|
519
495
|
return r;
|
|
520
496
|
}
|
|
@@ -542,7 +518,7 @@ var ls = _r((ps, yt) => {
|
|
|
542
518
|
data: e,
|
|
543
519
|
parsedType: H(e)
|
|
544
520
|
}, a = this._parseSync({ data: e, path: s.path, parent: s });
|
|
545
|
-
return
|
|
521
|
+
return bt(s, a);
|
|
546
522
|
}
|
|
547
523
|
"~validate"(e) {
|
|
548
524
|
var r, n;
|
|
@@ -595,8 +571,8 @@ var ls = _r((ps, yt) => {
|
|
|
595
571
|
parent: null,
|
|
596
572
|
data: e,
|
|
597
573
|
parsedType: H(e)
|
|
598
|
-
}, s = this._parse({ data: e, path: n.path, parent: n }), a = await (
|
|
599
|
-
return
|
|
574
|
+
}, s = this._parse({ data: e, path: n.path, parent: n }), a = await (Ee(s) ? s : Promise.resolve(s));
|
|
575
|
+
return bt(n, a);
|
|
600
576
|
}
|
|
601
577
|
refine(e, r) {
|
|
602
578
|
const n = (s) => typeof r == "string" || typeof r > "u" ? { message: r } : typeof r == "function" ? r(s) : r;
|
|
@@ -612,7 +588,7 @@ var ls = _r((ps, yt) => {
|
|
|
612
588
|
return this._refinement((n, s) => e(n) ? !0 : (s.addIssue(typeof r == "function" ? r(n, s) : r), !1));
|
|
613
589
|
}
|
|
614
590
|
_refinement(e) {
|
|
615
|
-
return new
|
|
591
|
+
return new $({
|
|
616
592
|
schema: this,
|
|
617
593
|
typeName: m.ZodEffects,
|
|
618
594
|
effect: { type: "refinement", refinement: e }
|
|
@@ -638,19 +614,19 @@ var ls = _r((ps, yt) => {
|
|
|
638
614
|
return this.nullable().optional();
|
|
639
615
|
}
|
|
640
616
|
array() {
|
|
641
|
-
return
|
|
617
|
+
return M.create(this);
|
|
642
618
|
}
|
|
643
619
|
promise() {
|
|
644
620
|
return we.create(this, this._def);
|
|
645
621
|
}
|
|
646
622
|
or(e) {
|
|
647
|
-
return
|
|
623
|
+
return Ae.create([this, e], this._def);
|
|
648
624
|
}
|
|
649
625
|
and(e) {
|
|
650
|
-
return
|
|
626
|
+
return Ce.create(this, e, this._def);
|
|
651
627
|
}
|
|
652
628
|
transform(e) {
|
|
653
|
-
return new
|
|
629
|
+
return new $({
|
|
654
630
|
...v(this._def),
|
|
655
631
|
schema: this,
|
|
656
632
|
typeName: m.ZodEffects,
|
|
@@ -659,7 +635,7 @@ var ls = _r((ps, yt) => {
|
|
|
659
635
|
}
|
|
660
636
|
default(e) {
|
|
661
637
|
const r = typeof e == "function" ? e : () => e;
|
|
662
|
-
return new
|
|
638
|
+
return new Me({
|
|
663
639
|
...v(this._def),
|
|
664
640
|
innerType: this,
|
|
665
641
|
defaultValue: r,
|
|
@@ -667,7 +643,7 @@ var ls = _r((ps, yt) => {
|
|
|
667
643
|
});
|
|
668
644
|
}
|
|
669
645
|
brand() {
|
|
670
|
-
return new
|
|
646
|
+
return new ht({
|
|
671
647
|
typeName: m.ZodBranded,
|
|
672
648
|
type: this,
|
|
673
649
|
...v(this._def)
|
|
@@ -675,7 +651,7 @@ var ls = _r((ps, yt) => {
|
|
|
675
651
|
}
|
|
676
652
|
catch(e) {
|
|
677
653
|
const r = typeof e == "function" ? e : () => e;
|
|
678
|
-
return new
|
|
654
|
+
return new $e({
|
|
679
655
|
...v(this._def),
|
|
680
656
|
innerType: this,
|
|
681
657
|
catchValue: r,
|
|
@@ -690,10 +666,10 @@ var ls = _r((ps, yt) => {
|
|
|
690
666
|
});
|
|
691
667
|
}
|
|
692
668
|
pipe(e) {
|
|
693
|
-
return
|
|
669
|
+
return Le.create(this, e);
|
|
694
670
|
}
|
|
695
671
|
readonly() {
|
|
696
|
-
return
|
|
672
|
+
return Fe.create(this);
|
|
697
673
|
}
|
|
698
674
|
isOptional() {
|
|
699
675
|
return this.safeParse(void 0).success;
|
|
@@ -702,26 +678,26 @@ var ls = _r((ps, yt) => {
|
|
|
702
678
|
return this.safeParse(null).success;
|
|
703
679
|
}
|
|
704
680
|
}
|
|
705
|
-
const
|
|
706
|
-
let
|
|
707
|
-
const
|
|
708
|
-
function
|
|
681
|
+
const xr = /^c[^\s-]{8,}$/i, Sr = /^[0-9a-z]+$/, Tr = /^[0-9A-HJKMNP-TV-Z]{26}$/i, Er = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, Or = /^[a-z0-9_-]{21}$/i, Nr = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Rr = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ar = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Cr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
682
|
+
let tt;
|
|
683
|
+
const Ir = /^(?:(?: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])$/, Pr = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Zr = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, jr = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Mr = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, $r = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, 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])))", Fr = new RegExp(`^${It}$`);
|
|
684
|
+
function Pt(t) {
|
|
709
685
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
710
686
|
return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
711
687
|
}
|
|
712
|
-
function
|
|
713
|
-
return new RegExp(`^${
|
|
688
|
+
function Lr(t) {
|
|
689
|
+
return new RegExp(`^${Pt(t)}$`);
|
|
714
690
|
}
|
|
715
|
-
function
|
|
716
|
-
let e = `${
|
|
691
|
+
function Zt(t) {
|
|
692
|
+
let e = `${It}T${Pt(t)}`;
|
|
717
693
|
const r = [];
|
|
718
694
|
return r.push(t.local ? "Z?" : "Z"), t.offset && r.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${r.join("|")})`, new RegExp(`^${e}$`);
|
|
719
695
|
}
|
|
720
|
-
function
|
|
721
|
-
return !!((e === "v4" || !e) &&
|
|
696
|
+
function Dr(t, e) {
|
|
697
|
+
return !!((e === "v4" || !e) && Ir.test(t) || (e === "v6" || !e) && Zr.test(t));
|
|
722
698
|
}
|
|
723
|
-
function
|
|
724
|
-
if (!
|
|
699
|
+
function Vr(t, e) {
|
|
700
|
+
if (!Nr.test(t))
|
|
725
701
|
return !1;
|
|
726
702
|
try {
|
|
727
703
|
const [r] = t.split("."), n = r.replace(/-/g, "+").replace(/_/g, "/").padEnd(r.length + (4 - r.length % 4) % 4, "="), s = JSON.parse(atob(n));
|
|
@@ -730,8 +706,8 @@ var ls = _r((ps, yt) => {
|
|
|
730
706
|
return !1;
|
|
731
707
|
}
|
|
732
708
|
}
|
|
733
|
-
function
|
|
734
|
-
return !!((e === "v4" || !e) &&
|
|
709
|
+
function zr(t, e) {
|
|
710
|
+
return !!((e === "v4" || !e) && Pr.test(t) || (e === "v6" || !e) && jr.test(t));
|
|
735
711
|
}
|
|
736
712
|
class j extends _ {
|
|
737
713
|
_parse(e) {
|
|
@@ -782,43 +758,43 @@ var ls = _r((ps, yt) => {
|
|
|
782
758
|
message: a.message
|
|
783
759
|
}), n.dirty());
|
|
784
760
|
} else if (a.kind === "email")
|
|
785
|
-
|
|
761
|
+
Ar.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
786
762
|
validation: "email",
|
|
787
763
|
code: l.invalid_string,
|
|
788
764
|
message: a.message
|
|
789
765
|
}), n.dirty());
|
|
790
766
|
else if (a.kind === "emoji")
|
|
791
|
-
|
|
767
|
+
tt || (tt = new RegExp(Cr, "u")), tt.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
792
768
|
validation: "emoji",
|
|
793
769
|
code: l.invalid_string,
|
|
794
770
|
message: a.message
|
|
795
771
|
}), n.dirty());
|
|
796
772
|
else if (a.kind === "uuid")
|
|
797
|
-
|
|
773
|
+
Er.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
798
774
|
validation: "uuid",
|
|
799
775
|
code: l.invalid_string,
|
|
800
776
|
message: a.message
|
|
801
777
|
}), n.dirty());
|
|
802
778
|
else if (a.kind === "nanoid")
|
|
803
|
-
|
|
779
|
+
Or.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
804
780
|
validation: "nanoid",
|
|
805
781
|
code: l.invalid_string,
|
|
806
782
|
message: a.message
|
|
807
783
|
}), n.dirty());
|
|
808
784
|
else if (a.kind === "cuid")
|
|
809
|
-
|
|
785
|
+
xr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
810
786
|
validation: "cuid",
|
|
811
787
|
code: l.invalid_string,
|
|
812
788
|
message: a.message
|
|
813
789
|
}), n.dirty());
|
|
814
790
|
else if (a.kind === "cuid2")
|
|
815
|
-
|
|
791
|
+
Sr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
816
792
|
validation: "cuid2",
|
|
817
793
|
code: l.invalid_string,
|
|
818
794
|
message: a.message
|
|
819
795
|
}), n.dirty());
|
|
820
796
|
else if (a.kind === "ulid")
|
|
821
|
-
|
|
797
|
+
Tr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
822
798
|
validation: "ulid",
|
|
823
799
|
code: l.invalid_string,
|
|
824
800
|
message: a.message
|
|
@@ -849,39 +825,39 @@ var ls = _r((ps, yt) => {
|
|
|
849
825
|
code: l.invalid_string,
|
|
850
826
|
validation: { endsWith: a.value },
|
|
851
827
|
message: a.message
|
|
852
|
-
}), n.dirty()) : a.kind === "datetime" ?
|
|
828
|
+
}), n.dirty()) : a.kind === "datetime" ? Zt(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
853
829
|
code: l.invalid_string,
|
|
854
830
|
validation: "datetime",
|
|
855
831
|
message: a.message
|
|
856
|
-
}), n.dirty()) : a.kind === "date" ?
|
|
832
|
+
}), n.dirty()) : a.kind === "date" ? Fr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
857
833
|
code: l.invalid_string,
|
|
858
834
|
validation: "date",
|
|
859
835
|
message: a.message
|
|
860
|
-
}), n.dirty()) : a.kind === "time" ?
|
|
836
|
+
}), n.dirty()) : a.kind === "time" ? Lr(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
861
837
|
code: l.invalid_string,
|
|
862
838
|
validation: "time",
|
|
863
839
|
message: a.message
|
|
864
|
-
}), n.dirty()) : a.kind === "duration" ?
|
|
840
|
+
}), n.dirty()) : a.kind === "duration" ? Rr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
865
841
|
validation: "duration",
|
|
866
842
|
code: l.invalid_string,
|
|
867
843
|
message: a.message
|
|
868
|
-
}), n.dirty()) : a.kind === "ip" ?
|
|
844
|
+
}), n.dirty()) : a.kind === "ip" ? Dr(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
869
845
|
validation: "ip",
|
|
870
846
|
code: l.invalid_string,
|
|
871
847
|
message: a.message
|
|
872
|
-
}), n.dirty()) : a.kind === "jwt" ?
|
|
848
|
+
}), n.dirty()) : a.kind === "jwt" ? Vr(e.data, a.alg) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
873
849
|
validation: "jwt",
|
|
874
850
|
code: l.invalid_string,
|
|
875
851
|
message: a.message
|
|
876
|
-
}), n.dirty()) : a.kind === "cidr" ?
|
|
852
|
+
}), n.dirty()) : a.kind === "cidr" ? zr(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
877
853
|
validation: "cidr",
|
|
878
854
|
code: l.invalid_string,
|
|
879
855
|
message: a.message
|
|
880
|
-
}), n.dirty()) : a.kind === "base64" ?
|
|
856
|
+
}), n.dirty()) : a.kind === "base64" ? Mr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
881
857
|
validation: "base64",
|
|
882
858
|
code: l.invalid_string,
|
|
883
859
|
message: a.message
|
|
884
|
-
}), n.dirty()) : a.kind === "base64url" ?
|
|
860
|
+
}), n.dirty()) : a.kind === "base64url" ? $r.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
885
861
|
validation: "base64url",
|
|
886
862
|
code: l.invalid_string,
|
|
887
863
|
message: a.message
|
|
@@ -1120,7 +1096,7 @@ var ls = _r((ps, yt) => {
|
|
|
1120
1096
|
...v(t)
|
|
1121
1097
|
});
|
|
1122
1098
|
};
|
|
1123
|
-
function
|
|
1099
|
+
function qr(t, e) {
|
|
1124
1100
|
const r = (t.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, s = r > n ? r : n, a = parseInt(t.toFixed(s).replace(".", "")), i = parseInt(e.toFixed(s).replace(".", ""));
|
|
1125
1101
|
return a % i / Math.pow(10, s);
|
|
1126
1102
|
}
|
|
@@ -1159,7 +1135,7 @@ var ls = _r((ps, yt) => {
|
|
|
1159
1135
|
inclusive: a.inclusive,
|
|
1160
1136
|
exact: !1,
|
|
1161
1137
|
message: a.message
|
|
1162
|
-
}), s.dirty()) : a.kind === "multipleOf" ?
|
|
1138
|
+
}), s.dirty()) : a.kind === "multipleOf" ? qr(e.data, a.value) !== 0 && (n = this._getOrReturnCtx(e, n), f(n, {
|
|
1163
1139
|
code: l.not_multiple_of,
|
|
1164
1140
|
multipleOf: a.value,
|
|
1165
1141
|
message: a.message
|
|
@@ -1432,7 +1408,7 @@ var ls = _r((ps, yt) => {
|
|
|
1432
1408
|
...v(t)
|
|
1433
1409
|
});
|
|
1434
1410
|
};
|
|
1435
|
-
class
|
|
1411
|
+
class Oe extends _ {
|
|
1436
1412
|
_parse(e) {
|
|
1437
1413
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== p.boolean) {
|
|
1438
1414
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1445,7 +1421,7 @@ var ls = _r((ps, yt) => {
|
|
|
1445
1421
|
return C(e.data);
|
|
1446
1422
|
}
|
|
1447
1423
|
}
|
|
1448
|
-
|
|
1424
|
+
Oe.create = (t) => new Oe({
|
|
1449
1425
|
typeName: m.ZodBoolean,
|
|
1450
1426
|
coerce: (t == null ? void 0 : t.coerce) || !1,
|
|
1451
1427
|
...v(t)
|
|
@@ -1528,7 +1504,7 @@ var ls = _r((ps, yt) => {
|
|
|
1528
1504
|
typeName: m.ZodDate,
|
|
1529
1505
|
...v(t)
|
|
1530
1506
|
});
|
|
1531
|
-
class
|
|
1507
|
+
class We extends _ {
|
|
1532
1508
|
_parse(e) {
|
|
1533
1509
|
if (this._getType(e) !== p.symbol) {
|
|
1534
1510
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1541,11 +1517,11 @@ var ls = _r((ps, yt) => {
|
|
|
1541
1517
|
return C(e.data);
|
|
1542
1518
|
}
|
|
1543
1519
|
}
|
|
1544
|
-
|
|
1520
|
+
We.create = (t) => new We({
|
|
1545
1521
|
typeName: m.ZodSymbol,
|
|
1546
1522
|
...v(t)
|
|
1547
1523
|
});
|
|
1548
|
-
class
|
|
1524
|
+
class Ne extends _ {
|
|
1549
1525
|
_parse(e) {
|
|
1550
1526
|
if (this._getType(e) !== p.undefined) {
|
|
1551
1527
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1558,11 +1534,11 @@ var ls = _r((ps, yt) => {
|
|
|
1558
1534
|
return C(e.data);
|
|
1559
1535
|
}
|
|
1560
1536
|
}
|
|
1561
|
-
|
|
1537
|
+
Ne.create = (t) => new Ne({
|
|
1562
1538
|
typeName: m.ZodUndefined,
|
|
1563
1539
|
...v(t)
|
|
1564
1540
|
});
|
|
1565
|
-
class
|
|
1541
|
+
class Re extends _ {
|
|
1566
1542
|
_parse(e) {
|
|
1567
1543
|
if (this._getType(e) !== p.null) {
|
|
1568
1544
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1575,7 +1551,7 @@ var ls = _r((ps, yt) => {
|
|
|
1575
1551
|
return C(e.data);
|
|
1576
1552
|
}
|
|
1577
1553
|
}
|
|
1578
|
-
|
|
1554
|
+
Re.create = (t) => new Re({
|
|
1579
1555
|
typeName: m.ZodNull,
|
|
1580
1556
|
...v(t)
|
|
1581
1557
|
});
|
|
@@ -1617,7 +1593,7 @@ var ls = _r((ps, yt) => {
|
|
|
1617
1593
|
typeName: m.ZodNever,
|
|
1618
1594
|
...v(t)
|
|
1619
1595
|
});
|
|
1620
|
-
class
|
|
1596
|
+
class Je extends _ {
|
|
1621
1597
|
_parse(e) {
|
|
1622
1598
|
if (this._getType(e) !== p.undefined) {
|
|
1623
1599
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1630,11 +1606,11 @@ var ls = _r((ps, yt) => {
|
|
|
1630
1606
|
return C(e.data);
|
|
1631
1607
|
}
|
|
1632
1608
|
}
|
|
1633
|
-
|
|
1609
|
+
Je.create = (t) => new Je({
|
|
1634
1610
|
typeName: m.ZodVoid,
|
|
1635
1611
|
...v(t)
|
|
1636
1612
|
});
|
|
1637
|
-
class
|
|
1613
|
+
class M extends _ {
|
|
1638
1614
|
_parse(e) {
|
|
1639
1615
|
const { ctx: r, status: n } = this._processInputParams(e), s = this._def;
|
|
1640
1616
|
if (r.parsedType !== p.array)
|
|
@@ -1678,19 +1654,19 @@ var ls = _r((ps, yt) => {
|
|
|
1678
1654
|
return this._def.type;
|
|
1679
1655
|
}
|
|
1680
1656
|
min(e, r) {
|
|
1681
|
-
return new
|
|
1657
|
+
return new M({
|
|
1682
1658
|
...this._def,
|
|
1683
1659
|
minLength: { value: e, message: h.toString(r) }
|
|
1684
1660
|
});
|
|
1685
1661
|
}
|
|
1686
1662
|
max(e, r) {
|
|
1687
|
-
return new
|
|
1663
|
+
return new M({
|
|
1688
1664
|
...this._def,
|
|
1689
1665
|
maxLength: { value: e, message: h.toString(r) }
|
|
1690
1666
|
});
|
|
1691
1667
|
}
|
|
1692
1668
|
length(e, r) {
|
|
1693
|
-
return new
|
|
1669
|
+
return new M({
|
|
1694
1670
|
...this._def,
|
|
1695
1671
|
exactLength: { value: e, message: h.toString(r) }
|
|
1696
1672
|
});
|
|
@@ -1699,7 +1675,7 @@ var ls = _r((ps, yt) => {
|
|
|
1699
1675
|
return this.min(1, e);
|
|
1700
1676
|
}
|
|
1701
1677
|
}
|
|
1702
|
-
|
|
1678
|
+
M.create = (t, e) => new M({
|
|
1703
1679
|
type: t,
|
|
1704
1680
|
minLength: null,
|
|
1705
1681
|
maxLength: null,
|
|
@@ -1718,7 +1694,7 @@ var ls = _r((ps, yt) => {
|
|
|
1718
1694
|
...t._def,
|
|
1719
1695
|
shape: () => e
|
|
1720
1696
|
});
|
|
1721
|
-
} else return t instanceof
|
|
1697
|
+
} else return t instanceof M ? new M({
|
|
1722
1698
|
...t._def,
|
|
1723
1699
|
type: fe(t.element)
|
|
1724
1700
|
}) : t instanceof D ? D.create(fe(t.unwrap())) : t instanceof Q ? Q.create(fe(t.unwrap())) : t instanceof z ? z.create(t.items.map((e) => fe(e))) : t;
|
|
@@ -1986,7 +1962,7 @@ var ls = _r((ps, yt) => {
|
|
|
1986
1962
|
});
|
|
1987
1963
|
}
|
|
1988
1964
|
keyof() {
|
|
1989
|
-
return
|
|
1965
|
+
return jt(k.objectKeys(this.shape));
|
|
1990
1966
|
}
|
|
1991
1967
|
}
|
|
1992
1968
|
E.create = (t, e) => new E({
|
|
@@ -2010,7 +1986,7 @@ var ls = _r((ps, yt) => {
|
|
|
2010
1986
|
typeName: m.ZodObject,
|
|
2011
1987
|
...v(e)
|
|
2012
1988
|
});
|
|
2013
|
-
class
|
|
1989
|
+
class Ae extends _ {
|
|
2014
1990
|
_parse(e) {
|
|
2015
1991
|
const { ctx: r } = this._processInputParams(e), n = this._def.options;
|
|
2016
1992
|
function s(a) {
|
|
@@ -2078,13 +2054,13 @@ var ls = _r((ps, yt) => {
|
|
|
2078
2054
|
return this._def.options;
|
|
2079
2055
|
}
|
|
2080
2056
|
}
|
|
2081
|
-
|
|
2057
|
+
Ae.create = (t, e) => new Ae({
|
|
2082
2058
|
options: t,
|
|
2083
2059
|
typeName: m.ZodUnion,
|
|
2084
2060
|
...v(e)
|
|
2085
2061
|
});
|
|
2086
|
-
const B = (t) => t instanceof
|
|
2087
|
-
class
|
|
2062
|
+
const B = (t) => t instanceof Pe ? B(t.schema) : t instanceof $ ? B(t.innerType()) : t instanceof Ze ? [t.value] : t instanceof X ? t.options : t instanceof je ? k.objectValues(t.enum) : t instanceof Me ? B(t._def.innerType) : t instanceof Ne ? [void 0] : t instanceof Re ? [null] : t instanceof D ? [void 0, ...B(t.unwrap())] : t instanceof Q ? [null, ...B(t.unwrap())] : t instanceof ht || t instanceof Fe ? B(t.unwrap()) : t instanceof $e ? B(t._def.innerType) : [];
|
|
2063
|
+
class Xe extends _ {
|
|
2088
2064
|
_parse(e) {
|
|
2089
2065
|
const { ctx: r } = this._processInputParams(e);
|
|
2090
2066
|
if (r.parsedType !== p.object)
|
|
@@ -2137,7 +2113,7 @@ var ls = _r((ps, yt) => {
|
|
|
2137
2113
|
s.set(o, a);
|
|
2138
2114
|
}
|
|
2139
2115
|
}
|
|
2140
|
-
return new
|
|
2116
|
+
return new Xe({
|
|
2141
2117
|
typeName: m.ZodDiscriminatedUnion,
|
|
2142
2118
|
discriminator: e,
|
|
2143
2119
|
options: r,
|
|
@@ -2146,14 +2122,14 @@ var ls = _r((ps, yt) => {
|
|
|
2146
2122
|
});
|
|
2147
2123
|
}
|
|
2148
2124
|
}
|
|
2149
|
-
function
|
|
2125
|
+
function ot(t, e) {
|
|
2150
2126
|
const r = H(t), n = H(e);
|
|
2151
2127
|
if (t === e)
|
|
2152
2128
|
return { valid: !0, data: t };
|
|
2153
2129
|
if (r === p.object && n === p.object) {
|
|
2154
2130
|
const s = k.objectKeys(e), a = k.objectKeys(t).filter((o) => s.indexOf(o) !== -1), i = { ...t, ...e };
|
|
2155
2131
|
for (const o of a) {
|
|
2156
|
-
const c =
|
|
2132
|
+
const c = ot(t[o], e[o]);
|
|
2157
2133
|
if (!c.valid)
|
|
2158
2134
|
return { valid: !1 };
|
|
2159
2135
|
i[o] = c.data;
|
|
@@ -2164,7 +2140,7 @@ var ls = _r((ps, yt) => {
|
|
|
2164
2140
|
return { valid: !1 };
|
|
2165
2141
|
const s = [];
|
|
2166
2142
|
for (let a = 0; a < t.length; a++) {
|
|
2167
|
-
const i = t[a], o = e[a], c =
|
|
2143
|
+
const i = t[a], o = e[a], c = ot(i, o);
|
|
2168
2144
|
if (!c.valid)
|
|
2169
2145
|
return { valid: !1 };
|
|
2170
2146
|
s.push(c.data);
|
|
@@ -2172,13 +2148,13 @@ var ls = _r((ps, yt) => {
|
|
|
2172
2148
|
return { valid: !0, data: s };
|
|
2173
2149
|
} else return r === p.date && n === p.date && +t == +e ? { valid: !0, data: t } : { valid: !1 };
|
|
2174
2150
|
}
|
|
2175
|
-
class
|
|
2151
|
+
class Ce extends _ {
|
|
2176
2152
|
_parse(e) {
|
|
2177
2153
|
const { status: r, ctx: n } = this._processInputParams(e), s = (a, i) => {
|
|
2178
|
-
if (
|
|
2154
|
+
if (at(a) || at(i))
|
|
2179
2155
|
return y;
|
|
2180
|
-
const o =
|
|
2181
|
-
return o.valid ? ((
|
|
2156
|
+
const o = ot(a.value, i.value);
|
|
2157
|
+
return o.valid ? ((it(a) || it(i)) && r.dirty(), { status: r.value, value: o.data }) : (f(n, {
|
|
2182
2158
|
code: l.invalid_intersection_types
|
|
2183
2159
|
}), y);
|
|
2184
2160
|
};
|
|
@@ -2204,7 +2180,7 @@ var ls = _r((ps, yt) => {
|
|
|
2204
2180
|
}));
|
|
2205
2181
|
}
|
|
2206
2182
|
}
|
|
2207
|
-
|
|
2183
|
+
Ce.create = (t, e, r) => new Ce({
|
|
2208
2184
|
left: t,
|
|
2209
2185
|
right: e,
|
|
2210
2186
|
typeName: m.ZodIntersection,
|
|
@@ -2260,7 +2236,7 @@ var ls = _r((ps, yt) => {
|
|
|
2260
2236
|
...v(e)
|
|
2261
2237
|
});
|
|
2262
2238
|
};
|
|
2263
|
-
class
|
|
2239
|
+
class Ie extends _ {
|
|
2264
2240
|
get keySchema() {
|
|
2265
2241
|
return this._def.keyType;
|
|
2266
2242
|
}
|
|
@@ -2288,12 +2264,12 @@ var ls = _r((ps, yt) => {
|
|
|
2288
2264
|
return this._def.valueType;
|
|
2289
2265
|
}
|
|
2290
2266
|
static create(e, r, n) {
|
|
2291
|
-
return r instanceof _ ? new
|
|
2267
|
+
return r instanceof _ ? new Ie({
|
|
2292
2268
|
keyType: e,
|
|
2293
2269
|
valueType: r,
|
|
2294
2270
|
typeName: m.ZodRecord,
|
|
2295
2271
|
...v(n)
|
|
2296
|
-
}) : new
|
|
2272
|
+
}) : new Ie({
|
|
2297
2273
|
keyType: j.create(),
|
|
2298
2274
|
valueType: e,
|
|
2299
2275
|
typeName: m.ZodRecord,
|
|
@@ -2301,7 +2277,7 @@ var ls = _r((ps, yt) => {
|
|
|
2301
2277
|
});
|
|
2302
2278
|
}
|
|
2303
2279
|
}
|
|
2304
|
-
class
|
|
2280
|
+
class Ye extends _ {
|
|
2305
2281
|
get keySchema() {
|
|
2306
2282
|
return this._def.keyType;
|
|
2307
2283
|
}
|
|
@@ -2343,7 +2319,7 @@ var ls = _r((ps, yt) => {
|
|
|
2343
2319
|
}
|
|
2344
2320
|
}
|
|
2345
2321
|
}
|
|
2346
|
-
|
|
2322
|
+
Ye.create = (t, e, r) => new Ye({
|
|
2347
2323
|
valueType: e,
|
|
2348
2324
|
keyType: t,
|
|
2349
2325
|
typeName: m.ZodMap,
|
|
@@ -2426,13 +2402,13 @@ var ls = _r((ps, yt) => {
|
|
|
2426
2402
|
received: r.parsedType
|
|
2427
2403
|
}), y;
|
|
2428
2404
|
function n(o, c) {
|
|
2429
|
-
return
|
|
2405
|
+
return Be({
|
|
2430
2406
|
data: o,
|
|
2431
2407
|
path: r.path,
|
|
2432
2408
|
errorMaps: [
|
|
2433
2409
|
r.common.contextualErrorMap,
|
|
2434
2410
|
r.schemaErrorMap,
|
|
2435
|
-
|
|
2411
|
+
Ue(),
|
|
2436
2412
|
ve
|
|
2437
2413
|
].filter((d) => !!d),
|
|
2438
2414
|
issueData: {
|
|
@@ -2442,13 +2418,13 @@ var ls = _r((ps, yt) => {
|
|
|
2442
2418
|
});
|
|
2443
2419
|
}
|
|
2444
2420
|
function s(o, c) {
|
|
2445
|
-
return
|
|
2421
|
+
return Be({
|
|
2446
2422
|
data: o,
|
|
2447
2423
|
path: r.path,
|
|
2448
2424
|
errorMaps: [
|
|
2449
2425
|
r.common.contextualErrorMap,
|
|
2450
2426
|
r.schemaErrorMap,
|
|
2451
|
-
|
|
2427
|
+
Ue(),
|
|
2452
2428
|
ve
|
|
2453
2429
|
].filter((d) => !!d),
|
|
2454
2430
|
issueData: {
|
|
@@ -2514,7 +2490,7 @@ var ls = _r((ps, yt) => {
|
|
|
2514
2490
|
});
|
|
2515
2491
|
}
|
|
2516
2492
|
}
|
|
2517
|
-
class
|
|
2493
|
+
class Pe extends _ {
|
|
2518
2494
|
get schema() {
|
|
2519
2495
|
return this._def.getter();
|
|
2520
2496
|
}
|
|
@@ -2523,12 +2499,12 @@ var ls = _r((ps, yt) => {
|
|
|
2523
2499
|
return this._def.getter()._parse({ data: r.data, path: r.path, parent: r });
|
|
2524
2500
|
}
|
|
2525
2501
|
}
|
|
2526
|
-
|
|
2502
|
+
Pe.create = (t, e) => new Pe({
|
|
2527
2503
|
getter: t,
|
|
2528
2504
|
typeName: m.ZodLazy,
|
|
2529
2505
|
...v(e)
|
|
2530
2506
|
});
|
|
2531
|
-
class
|
|
2507
|
+
class Ze extends _ {
|
|
2532
2508
|
_parse(e) {
|
|
2533
2509
|
if (e.data !== this._def.value) {
|
|
2534
2510
|
const r = this._getOrReturnCtx(e);
|
|
@@ -2544,12 +2520,12 @@ var ls = _r((ps, yt) => {
|
|
|
2544
2520
|
return this._def.value;
|
|
2545
2521
|
}
|
|
2546
2522
|
}
|
|
2547
|
-
|
|
2523
|
+
Ze.create = (t, e) => new Ze({
|
|
2548
2524
|
value: t,
|
|
2549
2525
|
typeName: m.ZodLiteral,
|
|
2550
2526
|
...v(e)
|
|
2551
2527
|
});
|
|
2552
|
-
function
|
|
2528
|
+
function jt(t, e) {
|
|
2553
2529
|
return new X({
|
|
2554
2530
|
values: t,
|
|
2555
2531
|
typeName: m.ZodEnum,
|
|
@@ -2558,7 +2534,7 @@ var ls = _r((ps, yt) => {
|
|
|
2558
2534
|
}
|
|
2559
2535
|
class X extends _ {
|
|
2560
2536
|
constructor() {
|
|
2561
|
-
super(...arguments),
|
|
2537
|
+
super(...arguments), Se.set(this, void 0);
|
|
2562
2538
|
}
|
|
2563
2539
|
_parse(e) {
|
|
2564
2540
|
if (typeof e.data != "string") {
|
|
@@ -2569,7 +2545,7 @@ var ls = _r((ps, yt) => {
|
|
|
2569
2545
|
code: l.invalid_type
|
|
2570
2546
|
}), y;
|
|
2571
2547
|
}
|
|
2572
|
-
if (
|
|
2548
|
+
if (He(this, Se) || Ct(this, Se, new Set(this._def.values)), !He(this, Se).has(e.data)) {
|
|
2573
2549
|
const r = this._getOrReturnCtx(e), n = this._def.values;
|
|
2574
2550
|
return f(r, {
|
|
2575
2551
|
received: r.data,
|
|
@@ -2613,11 +2589,11 @@ var ls = _r((ps, yt) => {
|
|
|
2613
2589
|
});
|
|
2614
2590
|
}
|
|
2615
2591
|
}
|
|
2616
|
-
|
|
2617
|
-
X.create =
|
|
2618
|
-
class
|
|
2592
|
+
Se = /* @__PURE__ */ new WeakMap();
|
|
2593
|
+
X.create = jt;
|
|
2594
|
+
class je extends _ {
|
|
2619
2595
|
constructor() {
|
|
2620
|
-
super(...arguments),
|
|
2596
|
+
super(...arguments), Te.set(this, void 0);
|
|
2621
2597
|
}
|
|
2622
2598
|
_parse(e) {
|
|
2623
2599
|
const r = k.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
@@ -2629,7 +2605,7 @@ var ls = _r((ps, yt) => {
|
|
|
2629
2605
|
code: l.invalid_type
|
|
2630
2606
|
}), y;
|
|
2631
2607
|
}
|
|
2632
|
-
if (
|
|
2608
|
+
if (He(this, Te) || Ct(this, Te, new Set(k.getValidEnumValues(this._def.values))), !He(this, Te).has(e.data)) {
|
|
2633
2609
|
const s = k.objectValues(r);
|
|
2634
2610
|
return f(n, {
|
|
2635
2611
|
received: n.data,
|
|
@@ -2643,8 +2619,8 @@ var ls = _r((ps, yt) => {
|
|
|
2643
2619
|
return this._def.values;
|
|
2644
2620
|
}
|
|
2645
2621
|
}
|
|
2646
|
-
|
|
2647
|
-
|
|
2622
|
+
Te = /* @__PURE__ */ new WeakMap();
|
|
2623
|
+
je.create = (t, e) => new je({
|
|
2648
2624
|
values: t,
|
|
2649
2625
|
typeName: m.ZodNativeEnum,
|
|
2650
2626
|
...v(e)
|
|
@@ -2673,7 +2649,7 @@ var ls = _r((ps, yt) => {
|
|
|
2673
2649
|
typeName: m.ZodPromise,
|
|
2674
2650
|
...v(e)
|
|
2675
2651
|
});
|
|
2676
|
-
class
|
|
2652
|
+
class $ extends _ {
|
|
2677
2653
|
innerType() {
|
|
2678
2654
|
return this._def.schema;
|
|
2679
2655
|
}
|
|
@@ -2750,13 +2726,13 @@ var ls = _r((ps, yt) => {
|
|
|
2750
2726
|
k.assertNever(s);
|
|
2751
2727
|
}
|
|
2752
2728
|
}
|
|
2753
|
-
|
|
2729
|
+
$.create = (t, e, r) => new $({
|
|
2754
2730
|
schema: t,
|
|
2755
2731
|
typeName: m.ZodEffects,
|
|
2756
2732
|
effect: e,
|
|
2757
2733
|
...v(r)
|
|
2758
2734
|
});
|
|
2759
|
-
|
|
2735
|
+
$.createWithPreprocess = (t, e, r) => new $({
|
|
2760
2736
|
schema: e,
|
|
2761
2737
|
effect: { type: "preprocess", transform: t },
|
|
2762
2738
|
typeName: m.ZodEffects,
|
|
@@ -2788,7 +2764,7 @@ var ls = _r((ps, yt) => {
|
|
|
2788
2764
|
typeName: m.ZodNullable,
|
|
2789
2765
|
...v(e)
|
|
2790
2766
|
});
|
|
2791
|
-
class
|
|
2767
|
+
class Me extends _ {
|
|
2792
2768
|
_parse(e) {
|
|
2793
2769
|
const { ctx: r } = this._processInputParams(e);
|
|
2794
2770
|
let n = r.data;
|
|
@@ -2802,13 +2778,13 @@ var ls = _r((ps, yt) => {
|
|
|
2802
2778
|
return this._def.innerType;
|
|
2803
2779
|
}
|
|
2804
2780
|
}
|
|
2805
|
-
|
|
2781
|
+
Me.create = (t, e) => new Me({
|
|
2806
2782
|
innerType: t,
|
|
2807
2783
|
typeName: m.ZodDefault,
|
|
2808
2784
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
2809
2785
|
...v(e)
|
|
2810
2786
|
});
|
|
2811
|
-
class
|
|
2787
|
+
class $e extends _ {
|
|
2812
2788
|
_parse(e) {
|
|
2813
2789
|
const { ctx: r } = this._processInputParams(e), n = {
|
|
2814
2790
|
...r,
|
|
@@ -2823,7 +2799,7 @@ var ls = _r((ps, yt) => {
|
|
|
2823
2799
|
...n
|
|
2824
2800
|
}
|
|
2825
2801
|
});
|
|
2826
|
-
return
|
|
2802
|
+
return Ee(s) ? s.then((a) => ({
|
|
2827
2803
|
status: "valid",
|
|
2828
2804
|
value: a.status === "valid" ? a.value : this._def.catchValue({
|
|
2829
2805
|
get error() {
|
|
@@ -2845,13 +2821,13 @@ var ls = _r((ps, yt) => {
|
|
|
2845
2821
|
return this._def.innerType;
|
|
2846
2822
|
}
|
|
2847
2823
|
}
|
|
2848
|
-
|
|
2824
|
+
$e.create = (t, e) => new $e({
|
|
2849
2825
|
innerType: t,
|
|
2850
2826
|
typeName: m.ZodCatch,
|
|
2851
2827
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2852
2828
|
...v(e)
|
|
2853
2829
|
});
|
|
2854
|
-
class
|
|
2830
|
+
class Ke extends _ {
|
|
2855
2831
|
_parse(e) {
|
|
2856
2832
|
if (this._getType(e) !== p.nan) {
|
|
2857
2833
|
const n = this._getOrReturnCtx(e);
|
|
@@ -2864,12 +2840,12 @@ var ls = _r((ps, yt) => {
|
|
|
2864
2840
|
return { status: "valid", value: e.data };
|
|
2865
2841
|
}
|
|
2866
2842
|
}
|
|
2867
|
-
|
|
2843
|
+
Ke.create = (t) => new Ke({
|
|
2868
2844
|
typeName: m.ZodNaN,
|
|
2869
2845
|
...v(t)
|
|
2870
2846
|
});
|
|
2871
|
-
const
|
|
2872
|
-
class
|
|
2847
|
+
const Ur = Symbol("zod_brand");
|
|
2848
|
+
class ht extends _ {
|
|
2873
2849
|
_parse(e) {
|
|
2874
2850
|
const { ctx: r } = this._processInputParams(e), n = r.data;
|
|
2875
2851
|
return this._def.type._parse({
|
|
@@ -2882,7 +2858,7 @@ var ls = _r((ps, yt) => {
|
|
|
2882
2858
|
return this._def.type;
|
|
2883
2859
|
}
|
|
2884
2860
|
}
|
|
2885
|
-
class
|
|
2861
|
+
class Le extends _ {
|
|
2886
2862
|
_parse(e) {
|
|
2887
2863
|
const { status: r, ctx: n } = this._processInputParams(e);
|
|
2888
2864
|
if (n.common.async)
|
|
@@ -2915,32 +2891,32 @@ var ls = _r((ps, yt) => {
|
|
|
2915
2891
|
}
|
|
2916
2892
|
}
|
|
2917
2893
|
static create(e, r) {
|
|
2918
|
-
return new
|
|
2894
|
+
return new Le({
|
|
2919
2895
|
in: e,
|
|
2920
2896
|
out: r,
|
|
2921
2897
|
typeName: m.ZodPipeline
|
|
2922
2898
|
});
|
|
2923
2899
|
}
|
|
2924
2900
|
}
|
|
2925
|
-
class
|
|
2901
|
+
class Fe extends _ {
|
|
2926
2902
|
_parse(e) {
|
|
2927
2903
|
const r = this._def.innerType._parse(e), n = (s) => (ce(s) && (s.value = Object.freeze(s.value)), s);
|
|
2928
|
-
return
|
|
2904
|
+
return Ee(r) ? r.then((s) => n(s)) : n(r);
|
|
2929
2905
|
}
|
|
2930
2906
|
unwrap() {
|
|
2931
2907
|
return this._def.innerType;
|
|
2932
2908
|
}
|
|
2933
2909
|
}
|
|
2934
|
-
|
|
2910
|
+
Fe.create = (t, e) => new Fe({
|
|
2935
2911
|
innerType: t,
|
|
2936
2912
|
typeName: m.ZodReadonly,
|
|
2937
2913
|
...v(e)
|
|
2938
2914
|
});
|
|
2939
|
-
function
|
|
2915
|
+
function xt(t, e) {
|
|
2940
2916
|
const r = typeof t == "function" ? t(e) : typeof t == "string" ? { message: t } : t;
|
|
2941
2917
|
return typeof r == "string" ? { message: r } : r;
|
|
2942
2918
|
}
|
|
2943
|
-
function
|
|
2919
|
+
function Mt(t, e = {}, r) {
|
|
2944
2920
|
return t ? _e.create().superRefine((n, s) => {
|
|
2945
2921
|
var a, i;
|
|
2946
2922
|
const o = t(n);
|
|
@@ -2948,163 +2924,163 @@ var ls = _r((ps, yt) => {
|
|
|
2948
2924
|
return o.then((c) => {
|
|
2949
2925
|
var d, u;
|
|
2950
2926
|
if (!c) {
|
|
2951
|
-
const w =
|
|
2927
|
+
const w = xt(e, n), x = (u = (d = w.fatal) !== null && d !== void 0 ? d : r) !== null && u !== void 0 ? u : !0;
|
|
2952
2928
|
s.addIssue({ code: "custom", ...w, fatal: x });
|
|
2953
2929
|
}
|
|
2954
2930
|
});
|
|
2955
2931
|
if (!o) {
|
|
2956
|
-
const c =
|
|
2932
|
+
const c = xt(e, n), d = (i = (a = c.fatal) !== null && a !== void 0 ? a : r) !== null && i !== void 0 ? i : !0;
|
|
2957
2933
|
s.addIssue({ code: "custom", ...c, fatal: d });
|
|
2958
2934
|
}
|
|
2959
2935
|
}) : _e.create();
|
|
2960
2936
|
}
|
|
2961
|
-
const
|
|
2937
|
+
const Br = {
|
|
2962
2938
|
object: E.lazycreate
|
|
2963
2939
|
};
|
|
2964
2940
|
var m;
|
|
2965
2941
|
(function(t) {
|
|
2966
2942
|
t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
|
|
2967
2943
|
})(m || (m = {}));
|
|
2968
|
-
const
|
|
2944
|
+
const Hr = (t, e = {
|
|
2969
2945
|
message: `Input not instance of ${t.name}`
|
|
2970
|
-
}) =>
|
|
2946
|
+
}) => Mt((r) => r instanceof t, e), $t = j.create, Ft = K.create, Wr = Ke.create, Jr = G.create, Lt = Oe.create, Yr = de.create, Kr = We.create, Gr = Ne.create, Xr = Re.create, Qr = _e.create, en = oe.create, tn = J.create, rn = Je.create, nn = M.create, sn = E.create, an = E.strictCreate, on = Ae.create, cn = Xe.create, dn = Ce.create, ln = z.create, un = Ie.create, fn = Ye.create, pn = le.create, hn = ge.create, mn = Pe.create, yn = Ze.create, gn = X.create, vn = je.create, _n = we.create, St = $.create, wn = D.create, kn = Q.create, bn = $.createWithPreprocess, xn = Le.create, Sn = () => $t().optional(), Tn = () => Ft().optional(), En = () => Lt().optional(), On = {
|
|
2971
2947
|
string: (t) => j.create({ ...t, coerce: !0 }),
|
|
2972
2948
|
number: (t) => K.create({ ...t, coerce: !0 }),
|
|
2973
|
-
boolean: (t) =>
|
|
2949
|
+
boolean: (t) => Oe.create({
|
|
2974
2950
|
...t,
|
|
2975
2951
|
coerce: !0
|
|
2976
2952
|
}),
|
|
2977
2953
|
bigint: (t) => G.create({ ...t, coerce: !0 }),
|
|
2978
2954
|
date: (t) => de.create({ ...t, coerce: !0 })
|
|
2979
|
-
},
|
|
2980
|
-
var
|
|
2955
|
+
}, Nn = y;
|
|
2956
|
+
var Tt = /* @__PURE__ */ Object.freeze({
|
|
2981
2957
|
__proto__: null,
|
|
2982
2958
|
defaultErrorMap: ve,
|
|
2983
|
-
setErrorMap:
|
|
2984
|
-
getErrorMap:
|
|
2985
|
-
makeIssue:
|
|
2986
|
-
EMPTY_PATH:
|
|
2959
|
+
setErrorMap: kr,
|
|
2960
|
+
getErrorMap: Ue,
|
|
2961
|
+
makeIssue: Be,
|
|
2962
|
+
EMPTY_PATH: br,
|
|
2987
2963
|
addIssueToContext: f,
|
|
2988
2964
|
ParseStatus: R,
|
|
2989
2965
|
INVALID: y,
|
|
2990
2966
|
DIRTY: ye,
|
|
2991
2967
|
OK: C,
|
|
2992
|
-
isAborted:
|
|
2993
|
-
isDirty:
|
|
2968
|
+
isAborted: at,
|
|
2969
|
+
isDirty: it,
|
|
2994
2970
|
isValid: ce,
|
|
2995
|
-
isAsync:
|
|
2971
|
+
isAsync: Ee,
|
|
2996
2972
|
get util() {
|
|
2997
2973
|
return k;
|
|
2998
2974
|
},
|
|
2999
2975
|
get objectUtil() {
|
|
3000
|
-
return
|
|
2976
|
+
return st;
|
|
3001
2977
|
},
|
|
3002
2978
|
ZodParsedType: p,
|
|
3003
2979
|
getParsedType: H,
|
|
3004
2980
|
ZodType: _,
|
|
3005
|
-
datetimeRegex:
|
|
2981
|
+
datetimeRegex: Zt,
|
|
3006
2982
|
ZodString: j,
|
|
3007
2983
|
ZodNumber: K,
|
|
3008
2984
|
ZodBigInt: G,
|
|
3009
|
-
ZodBoolean:
|
|
2985
|
+
ZodBoolean: Oe,
|
|
3010
2986
|
ZodDate: de,
|
|
3011
|
-
ZodSymbol:
|
|
3012
|
-
ZodUndefined:
|
|
3013
|
-
ZodNull:
|
|
2987
|
+
ZodSymbol: We,
|
|
2988
|
+
ZodUndefined: Ne,
|
|
2989
|
+
ZodNull: Re,
|
|
3014
2990
|
ZodAny: _e,
|
|
3015
2991
|
ZodUnknown: oe,
|
|
3016
2992
|
ZodNever: J,
|
|
3017
|
-
ZodVoid:
|
|
3018
|
-
ZodArray:
|
|
2993
|
+
ZodVoid: Je,
|
|
2994
|
+
ZodArray: M,
|
|
3019
2995
|
ZodObject: E,
|
|
3020
|
-
ZodUnion:
|
|
3021
|
-
ZodDiscriminatedUnion:
|
|
3022
|
-
ZodIntersection:
|
|
2996
|
+
ZodUnion: Ae,
|
|
2997
|
+
ZodDiscriminatedUnion: Xe,
|
|
2998
|
+
ZodIntersection: Ce,
|
|
3023
2999
|
ZodTuple: z,
|
|
3024
|
-
ZodRecord:
|
|
3025
|
-
ZodMap:
|
|
3000
|
+
ZodRecord: Ie,
|
|
3001
|
+
ZodMap: Ye,
|
|
3026
3002
|
ZodSet: le,
|
|
3027
3003
|
ZodFunction: ge,
|
|
3028
|
-
ZodLazy:
|
|
3029
|
-
ZodLiteral:
|
|
3004
|
+
ZodLazy: Pe,
|
|
3005
|
+
ZodLiteral: Ze,
|
|
3030
3006
|
ZodEnum: X,
|
|
3031
|
-
ZodNativeEnum:
|
|
3007
|
+
ZodNativeEnum: je,
|
|
3032
3008
|
ZodPromise: we,
|
|
3033
|
-
ZodEffects:
|
|
3034
|
-
ZodTransformer:
|
|
3009
|
+
ZodEffects: $,
|
|
3010
|
+
ZodTransformer: $,
|
|
3035
3011
|
ZodOptional: D,
|
|
3036
3012
|
ZodNullable: Q,
|
|
3037
|
-
ZodDefault:
|
|
3038
|
-
ZodCatch:
|
|
3039
|
-
ZodNaN:
|
|
3040
|
-
BRAND:
|
|
3041
|
-
ZodBranded:
|
|
3042
|
-
ZodPipeline:
|
|
3043
|
-
ZodReadonly:
|
|
3044
|
-
custom:
|
|
3013
|
+
ZodDefault: Me,
|
|
3014
|
+
ZodCatch: $e,
|
|
3015
|
+
ZodNaN: Ke,
|
|
3016
|
+
BRAND: Ur,
|
|
3017
|
+
ZodBranded: ht,
|
|
3018
|
+
ZodPipeline: Le,
|
|
3019
|
+
ZodReadonly: Fe,
|
|
3020
|
+
custom: Mt,
|
|
3045
3021
|
Schema: _,
|
|
3046
3022
|
ZodSchema: _,
|
|
3047
|
-
late:
|
|
3023
|
+
late: Br,
|
|
3048
3024
|
get ZodFirstPartyTypeKind() {
|
|
3049
3025
|
return m;
|
|
3050
3026
|
},
|
|
3051
|
-
coerce:
|
|
3052
|
-
any:
|
|
3053
|
-
array:
|
|
3054
|
-
bigint:
|
|
3055
|
-
boolean:
|
|
3056
|
-
date:
|
|
3057
|
-
discriminatedUnion:
|
|
3058
|
-
effect:
|
|
3059
|
-
enum:
|
|
3060
|
-
function:
|
|
3061
|
-
instanceof:
|
|
3062
|
-
intersection:
|
|
3063
|
-
lazy:
|
|
3064
|
-
literal:
|
|
3065
|
-
map:
|
|
3066
|
-
nan:
|
|
3067
|
-
nativeEnum:
|
|
3068
|
-
never:
|
|
3069
|
-
null:
|
|
3070
|
-
nullable:
|
|
3071
|
-
number:
|
|
3072
|
-
object:
|
|
3073
|
-
oboolean:
|
|
3074
|
-
onumber:
|
|
3075
|
-
optional:
|
|
3076
|
-
ostring:
|
|
3077
|
-
pipeline:
|
|
3078
|
-
preprocess:
|
|
3079
|
-
promise:
|
|
3080
|
-
record:
|
|
3081
|
-
set:
|
|
3082
|
-
strictObject:
|
|
3083
|
-
string:
|
|
3084
|
-
symbol:
|
|
3085
|
-
transformer:
|
|
3086
|
-
tuple:
|
|
3087
|
-
undefined:
|
|
3088
|
-
union:
|
|
3089
|
-
unknown:
|
|
3090
|
-
void:
|
|
3091
|
-
NEVER:
|
|
3027
|
+
coerce: On,
|
|
3028
|
+
any: Qr,
|
|
3029
|
+
array: nn,
|
|
3030
|
+
bigint: Jr,
|
|
3031
|
+
boolean: Lt,
|
|
3032
|
+
date: Yr,
|
|
3033
|
+
discriminatedUnion: cn,
|
|
3034
|
+
effect: St,
|
|
3035
|
+
enum: gn,
|
|
3036
|
+
function: hn,
|
|
3037
|
+
instanceof: Hr,
|
|
3038
|
+
intersection: dn,
|
|
3039
|
+
lazy: mn,
|
|
3040
|
+
literal: yn,
|
|
3041
|
+
map: fn,
|
|
3042
|
+
nan: Wr,
|
|
3043
|
+
nativeEnum: vn,
|
|
3044
|
+
never: tn,
|
|
3045
|
+
null: Xr,
|
|
3046
|
+
nullable: kn,
|
|
3047
|
+
number: Ft,
|
|
3048
|
+
object: sn,
|
|
3049
|
+
oboolean: En,
|
|
3050
|
+
onumber: Tn,
|
|
3051
|
+
optional: wn,
|
|
3052
|
+
ostring: Sn,
|
|
3053
|
+
pipeline: xn,
|
|
3054
|
+
preprocess: bn,
|
|
3055
|
+
promise: _n,
|
|
3056
|
+
record: un,
|
|
3057
|
+
set: pn,
|
|
3058
|
+
strictObject: an,
|
|
3059
|
+
string: $t,
|
|
3060
|
+
symbol: Kr,
|
|
3061
|
+
transformer: St,
|
|
3062
|
+
tuple: ln,
|
|
3063
|
+
undefined: Gr,
|
|
3064
|
+
union: on,
|
|
3065
|
+
unknown: en,
|
|
3066
|
+
void: rn,
|
|
3067
|
+
NEVER: Nn,
|
|
3092
3068
|
ZodIssueCode: l,
|
|
3093
|
-
quotelessJson:
|
|
3069
|
+
quotelessJson: wr,
|
|
3094
3070
|
ZodError: P
|
|
3095
3071
|
});
|
|
3096
|
-
const
|
|
3097
|
-
detail:
|
|
3072
|
+
const ct = Tt.object({
|
|
3073
|
+
detail: Tt.string()
|
|
3098
3074
|
});
|
|
3099
|
-
function
|
|
3075
|
+
function Dt(t) {
|
|
3100
3076
|
if (!t)
|
|
3101
3077
|
return "Unknown error";
|
|
3102
3078
|
if (t instanceof Error) {
|
|
3103
|
-
const e =
|
|
3104
|
-
return e.success ? e.data.detail :
|
|
3079
|
+
const e = ct.safeParse(t.cause);
|
|
3080
|
+
return e.success ? e.data.detail : Rn(t.message);
|
|
3105
3081
|
}
|
|
3106
3082
|
if (typeof t == "object") {
|
|
3107
|
-
const e =
|
|
3083
|
+
const e = ct.safeParse(t);
|
|
3108
3084
|
if (e.success)
|
|
3109
3085
|
return e.data.detail;
|
|
3110
3086
|
}
|
|
@@ -3114,26 +3090,26 @@ var ls = _r((ps, yt) => {
|
|
|
3114
3090
|
return String(t);
|
|
3115
3091
|
}
|
|
3116
3092
|
}
|
|
3117
|
-
function
|
|
3118
|
-
const e =
|
|
3093
|
+
function Rn(t) {
|
|
3094
|
+
const e = An(t);
|
|
3119
3095
|
if (!e)
|
|
3120
3096
|
return t;
|
|
3121
|
-
const r =
|
|
3097
|
+
const r = ct.safeParse(e);
|
|
3122
3098
|
return r.success ? r.data.detail : t;
|
|
3123
3099
|
}
|
|
3124
|
-
function
|
|
3100
|
+
function An(t) {
|
|
3125
3101
|
try {
|
|
3126
3102
|
return JSON.parse(t);
|
|
3127
3103
|
} catch {
|
|
3128
3104
|
return t;
|
|
3129
3105
|
}
|
|
3130
3106
|
}
|
|
3131
|
-
const
|
|
3132
|
-
function
|
|
3107
|
+
const Cn = 1e10, In = 1e3;
|
|
3108
|
+
function Ve(t, e) {
|
|
3133
3109
|
const r = t.map((n) => `"${n}"`).join(", ");
|
|
3134
3110
|
return new Error(`This RPC instance cannot ${e} because the transport did not provide one or more of these methods: ${r}`);
|
|
3135
3111
|
}
|
|
3136
|
-
function
|
|
3112
|
+
function Pn(t = {}) {
|
|
3137
3113
|
let e = {};
|
|
3138
3114
|
function r(g) {
|
|
3139
3115
|
e = g;
|
|
@@ -3141,7 +3117,7 @@ var ls = _r((ps, yt) => {
|
|
|
3141
3117
|
let n = {};
|
|
3142
3118
|
function s(g) {
|
|
3143
3119
|
var S;
|
|
3144
|
-
n.unregisterHandler && n.unregisterHandler(), n = g, (S = n.registerHandler) == null || S.call(n,
|
|
3120
|
+
n.unregisterHandler && n.unregisterHandler(), n = g, (S = n.registerHandler) == null || S.call(n, mr);
|
|
3145
3121
|
}
|
|
3146
3122
|
let a;
|
|
3147
3123
|
function i(g) {
|
|
@@ -3159,11 +3135,11 @@ var ls = _r((ps, yt) => {
|
|
|
3159
3135
|
return N(S, O);
|
|
3160
3136
|
};
|
|
3161
3137
|
}
|
|
3162
|
-
const { maxRequestTime: o =
|
|
3138
|
+
const { maxRequestTime: o = In } = t;
|
|
3163
3139
|
t.transport && s(t.transport), t.requestHandler && i(t.requestHandler), t._debugHooks && r(t._debugHooks);
|
|
3164
3140
|
let c = 0;
|
|
3165
3141
|
function d() {
|
|
3166
|
-
return c <=
|
|
3142
|
+
return c <= Cn ? ++c : c = 0;
|
|
3167
3143
|
}
|
|
3168
3144
|
const u = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
|
|
3169
3145
|
function x(g, ...S) {
|
|
@@ -3171,26 +3147,26 @@ var ls = _r((ps, yt) => {
|
|
|
3171
3147
|
return new Promise((T, N) => {
|
|
3172
3148
|
var ue;
|
|
3173
3149
|
if (!n.send)
|
|
3174
|
-
throw
|
|
3175
|
-
const
|
|
3150
|
+
throw Ve(["send"], "make requests");
|
|
3151
|
+
const F = d(), re = {
|
|
3176
3152
|
type: "request",
|
|
3177
|
-
id:
|
|
3153
|
+
id: F,
|
|
3178
3154
|
method: g,
|
|
3179
3155
|
params: O
|
|
3180
3156
|
};
|
|
3181
|
-
u.set(
|
|
3182
|
-
w.delete(
|
|
3157
|
+
u.set(F, { resolve: T, reject: N }), o !== 1 / 0 && w.set(F, setTimeout(() => {
|
|
3158
|
+
w.delete(F), N(new Error("RPC request timed out."));
|
|
3183
3159
|
}, o)), (ue = e.onSend) == null || ue.call(e, re), n.send(re);
|
|
3184
3160
|
});
|
|
3185
3161
|
}
|
|
3186
3162
|
const I = new Proxy(x, {
|
|
3187
3163
|
get: (g, S, O) => S in g ? Reflect.get(g, S, O) : (T) => x(S, T)
|
|
3188
3164
|
}), U = I;
|
|
3189
|
-
function
|
|
3165
|
+
function De(g, ...S) {
|
|
3190
3166
|
var N;
|
|
3191
3167
|
const O = S[0];
|
|
3192
3168
|
if (!n.send)
|
|
3193
|
-
throw
|
|
3169
|
+
throw Ve(["send"], "send messages");
|
|
3194
3170
|
const T = {
|
|
3195
3171
|
type: "message",
|
|
3196
3172
|
id: g,
|
|
@@ -3198,42 +3174,42 @@ var ls = _r((ps, yt) => {
|
|
|
3198
3174
|
};
|
|
3199
3175
|
(N = e.onSend) == null || N.call(e, T), n.send(T);
|
|
3200
3176
|
}
|
|
3201
|
-
const
|
|
3202
|
-
get: (g, S, O) => S in g ? Reflect.get(g, S, O) : (T) =>
|
|
3203
|
-
}),
|
|
3204
|
-
function
|
|
3177
|
+
const vt = new Proxy(De, {
|
|
3178
|
+
get: (g, S, O) => S in g ? Reflect.get(g, S, O) : (T) => De(S, T)
|
|
3179
|
+
}), _t = vt, te = /* @__PURE__ */ new Map(), et = /* @__PURE__ */ new Set();
|
|
3180
|
+
function pr(g, S) {
|
|
3205
3181
|
var O;
|
|
3206
3182
|
if (!n.registerHandler)
|
|
3207
|
-
throw
|
|
3183
|
+
throw Ve(["registerHandler"], "register message listeners");
|
|
3208
3184
|
if (g === "*") {
|
|
3209
|
-
|
|
3185
|
+
et.add(S);
|
|
3210
3186
|
return;
|
|
3211
3187
|
}
|
|
3212
3188
|
te.has(g) || te.set(g, /* @__PURE__ */ new Set()), (O = te.get(g)) == null || O.add(S);
|
|
3213
3189
|
}
|
|
3214
|
-
function
|
|
3190
|
+
function hr(g, S) {
|
|
3215
3191
|
var O, T;
|
|
3216
3192
|
if (g === "*") {
|
|
3217
|
-
|
|
3193
|
+
et.delete(S);
|
|
3218
3194
|
return;
|
|
3219
3195
|
}
|
|
3220
3196
|
(O = te.get(g)) == null || O.delete(S), ((T = te.get(g)) == null ? void 0 : T.size) === 0 && te.delete(g);
|
|
3221
3197
|
}
|
|
3222
|
-
async function
|
|
3198
|
+
async function mr(g) {
|
|
3223
3199
|
var S, O;
|
|
3224
3200
|
if ((S = e.onReceive) == null || S.call(e, g), !("type" in g))
|
|
3225
3201
|
throw new Error("Message does not contain a type.");
|
|
3226
3202
|
if (g.type === "request") {
|
|
3227
3203
|
if (!n.send || !a)
|
|
3228
|
-
throw
|
|
3229
|
-
const { id: T, method: N, params:
|
|
3204
|
+
throw Ve(["send", "requestHandler"], "handle requests");
|
|
3205
|
+
const { id: T, method: N, params: F } = g;
|
|
3230
3206
|
let re;
|
|
3231
3207
|
try {
|
|
3232
3208
|
re = {
|
|
3233
3209
|
type: "response",
|
|
3234
3210
|
id: T,
|
|
3235
3211
|
success: !0,
|
|
3236
|
-
payload: await a(N,
|
|
3212
|
+
payload: await a(N, F)
|
|
3237
3213
|
};
|
|
3238
3214
|
} catch (ue) {
|
|
3239
3215
|
if (!(ue instanceof Error))
|
|
@@ -3251,12 +3227,12 @@ var ls = _r((ps, yt) => {
|
|
|
3251
3227
|
if (g.type === "response") {
|
|
3252
3228
|
const T = w.get(g.id);
|
|
3253
3229
|
T != null && clearTimeout(T);
|
|
3254
|
-
const { resolve: N, reject:
|
|
3255
|
-
g.success ? N == null || N(g.payload) :
|
|
3230
|
+
const { resolve: N, reject: F } = u.get(g.id) ?? {};
|
|
3231
|
+
g.success ? N == null || N(g.payload) : F == null || F(new Error(g.error));
|
|
3256
3232
|
return;
|
|
3257
3233
|
}
|
|
3258
3234
|
if (g.type === "message") {
|
|
3259
|
-
for (const N of
|
|
3235
|
+
for (const N of et)
|
|
3260
3236
|
N(g.id, g.payload);
|
|
3261
3237
|
const T = te.get(g.id);
|
|
3262
3238
|
if (!T)
|
|
@@ -3272,44 +3248,44 @@ var ls = _r((ps, yt) => {
|
|
|
3272
3248
|
setRequestHandler: i,
|
|
3273
3249
|
request: I,
|
|
3274
3250
|
requestProxy: U,
|
|
3275
|
-
send:
|
|
3276
|
-
sendProxy:
|
|
3277
|
-
addMessageListener:
|
|
3278
|
-
removeMessageListener:
|
|
3279
|
-
proxy: { send:
|
|
3251
|
+
send: vt,
|
|
3252
|
+
sendProxy: _t,
|
|
3253
|
+
addMessageListener: pr,
|
|
3254
|
+
removeMessageListener: hr,
|
|
3255
|
+
proxy: { send: _t, request: U },
|
|
3280
3256
|
_setDebugHooks: r
|
|
3281
3257
|
};
|
|
3282
3258
|
}
|
|
3283
|
-
function
|
|
3284
|
-
return
|
|
3259
|
+
function Zn(t) {
|
|
3260
|
+
return Pn(t);
|
|
3285
3261
|
}
|
|
3286
|
-
const
|
|
3287
|
-
function
|
|
3262
|
+
const Vt = "[transport-id]";
|
|
3263
|
+
function jn(t, e) {
|
|
3288
3264
|
const { transportId: r } = e;
|
|
3289
|
-
return r != null ? { [
|
|
3265
|
+
return r != null ? { [Vt]: r, data: t } : t;
|
|
3290
3266
|
}
|
|
3291
|
-
function
|
|
3267
|
+
function Mn(t, e) {
|
|
3292
3268
|
const { transportId: r, filter: n } = e, s = n == null ? void 0 : n();
|
|
3293
3269
|
if (r != null && s != null)
|
|
3294
3270
|
throw new Error("Cannot use both `transportId` and `filter` at the same time");
|
|
3295
3271
|
let a = t;
|
|
3296
3272
|
if (r) {
|
|
3297
|
-
if (t[
|
|
3273
|
+
if (t[Vt] !== r)
|
|
3298
3274
|
return [!0];
|
|
3299
3275
|
a = t.data;
|
|
3300
3276
|
}
|
|
3301
3277
|
return s === !1 ? [!0] : [!1, a];
|
|
3302
3278
|
}
|
|
3303
|
-
function
|
|
3279
|
+
function $n(t, e = {}) {
|
|
3304
3280
|
const { transportId: r, filter: n, remotePort: s } = e, a = t, i = s ?? t;
|
|
3305
3281
|
let o;
|
|
3306
3282
|
return {
|
|
3307
3283
|
send(c) {
|
|
3308
|
-
i.postMessage(
|
|
3284
|
+
i.postMessage(jn(c, { transportId: r }));
|
|
3309
3285
|
},
|
|
3310
3286
|
registerHandler(c) {
|
|
3311
3287
|
o = (d) => {
|
|
3312
|
-
const u = d.data, [w, x] =
|
|
3288
|
+
const u = d.data, [w, x] = Mn(u, {
|
|
3313
3289
|
transportId: r,
|
|
3314
3290
|
filter: () => n == null ? void 0 : n(d)
|
|
3315
3291
|
});
|
|
@@ -3321,35 +3297,35 @@ var ls = _r((ps, yt) => {
|
|
|
3321
3297
|
}
|
|
3322
3298
|
};
|
|
3323
3299
|
}
|
|
3324
|
-
function
|
|
3325
|
-
return
|
|
3300
|
+
function Fn(t) {
|
|
3301
|
+
return $n(self, t);
|
|
3326
3302
|
}
|
|
3327
|
-
const
|
|
3328
|
-
function
|
|
3303
|
+
const Ln = "marimo-transport";
|
|
3304
|
+
function zt(t, e) {
|
|
3329
3305
|
if (!t)
|
|
3330
3306
|
throw new Error(e);
|
|
3331
3307
|
}
|
|
3332
|
-
var
|
|
3308
|
+
var Dn = Object.defineProperty, b = (t, e) => Dn(t, "name", { value: e, configurable: !0 }), qt = ((t) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(t, { get: (e, r) => (typeof require < "u" ? require : e)[r] }) : t)(function(t) {
|
|
3333
3309
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
3334
3310
|
throw new Error('Dynamic require of "' + t + '" is not supported');
|
|
3335
3311
|
});
|
|
3336
|
-
function
|
|
3312
|
+
function Ut(t) {
|
|
3337
3313
|
return !isNaN(parseFloat(t)) && isFinite(t);
|
|
3338
3314
|
}
|
|
3339
|
-
b(
|
|
3315
|
+
b(Ut, "_isNumber");
|
|
3340
3316
|
function ee(t) {
|
|
3341
3317
|
return t.charAt(0).toUpperCase() + t.substring(1);
|
|
3342
3318
|
}
|
|
3343
3319
|
b(ee, "_capitalize");
|
|
3344
|
-
function
|
|
3320
|
+
function Qe(t) {
|
|
3345
3321
|
return function() {
|
|
3346
3322
|
return this[t];
|
|
3347
3323
|
};
|
|
3348
3324
|
}
|
|
3349
|
-
b(
|
|
3350
|
-
var pe = ["isConstructor", "isEval", "isNative", "isToplevel"], he = ["columnNumber", "lineNumber"], me = ["fileName", "functionName", "source"],
|
|
3325
|
+
b(Qe, "_getter");
|
|
3326
|
+
var pe = ["isConstructor", "isEval", "isNative", "isToplevel"], he = ["columnNumber", "lineNumber"], me = ["fileName", "functionName", "source"], Vn = ["args"], zn = ["evalOrigin"], ze = pe.concat(he, me, Vn, zn);
|
|
3351
3327
|
function Z(t) {
|
|
3352
|
-
if (t) for (var e = 0; e <
|
|
3328
|
+
if (t) for (var e = 0; e < ze.length; e++) t[ze[e]] !== void 0 && this["set" + ee(ze[e])](t[ze[e]]);
|
|
3353
3329
|
}
|
|
3354
3330
|
b(Z, "StackFrame");
|
|
3355
3331
|
Z.prototype = { getArgs: function() {
|
|
@@ -3372,26 +3348,26 @@ var ls = _r((ps, yt) => {
|
|
|
3372
3348
|
if (a.indexOf("@") === 0) var i = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a, ""), o = i[1], c = i[2], d = i[3];
|
|
3373
3349
|
return new Z({ functionName: n, args: s || void 0, fileName: o, lineNumber: c || void 0, columnNumber: d || void 0 });
|
|
3374
3350
|
}, "StackFrame$$fromString");
|
|
3375
|
-
for (ne = 0; ne < pe.length; ne++) Z.prototype["get" + ee(pe[ne])] =
|
|
3351
|
+
for (ne = 0; ne < pe.length; ne++) Z.prototype["get" + ee(pe[ne])] = Qe(pe[ne]), Z.prototype["set" + ee(pe[ne])] = /* @__PURE__ */ function(t) {
|
|
3376
3352
|
return function(e) {
|
|
3377
3353
|
this[t] = !!e;
|
|
3378
3354
|
};
|
|
3379
3355
|
}(pe[ne]);
|
|
3380
3356
|
var ne;
|
|
3381
|
-
for (se = 0; se < he.length; se++) Z.prototype["get" + ee(he[se])] =
|
|
3357
|
+
for (se = 0; se < he.length; se++) Z.prototype["get" + ee(he[se])] = Qe(he[se]), Z.prototype["set" + ee(he[se])] = /* @__PURE__ */ function(t) {
|
|
3382
3358
|
return function(e) {
|
|
3383
|
-
if (!
|
|
3359
|
+
if (!Ut(e)) throw new TypeError(t + " must be a Number");
|
|
3384
3360
|
this[t] = Number(e);
|
|
3385
3361
|
};
|
|
3386
3362
|
}(he[se]);
|
|
3387
3363
|
var se;
|
|
3388
|
-
for (ae = 0; ae < me.length; ae++) Z.prototype["get" + ee(me[ae])] =
|
|
3364
|
+
for (ae = 0; ae < me.length; ae++) Z.prototype["get" + ee(me[ae])] = Qe(me[ae]), Z.prototype["set" + ee(me[ae])] = /* @__PURE__ */ function(t) {
|
|
3389
3365
|
return function(e) {
|
|
3390
3366
|
this[t] = String(e);
|
|
3391
3367
|
};
|
|
3392
3368
|
}(me[ae]);
|
|
3393
|
-
var ae,
|
|
3394
|
-
function
|
|
3369
|
+
var ae, rt = Z;
|
|
3370
|
+
function Bt() {
|
|
3395
3371
|
var t = /^\s*at .*(\S+:\d+|\(native\))/m, e = /^(eval@)?(\[native code])?$/;
|
|
3396
3372
|
return { parse: b(function(r) {
|
|
3397
3373
|
if (r.stack && r.stack.match(t)) return this.parseV8OrIE(r);
|
|
@@ -3411,7 +3387,7 @@ var ls = _r((ps, yt) => {
|
|
|
3411
3387
|
var a = s.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), i = a.match(/ (\(.+\)$)/);
|
|
3412
3388
|
a = i ? a.replace(i[0], "") : a;
|
|
3413
3389
|
var o = this.extractLocation(i ? i[1] : a), c = i && a || void 0, d = ["eval", "<anonymous>"].indexOf(o[0]) > -1 ? void 0 : o[0];
|
|
3414
|
-
return new
|
|
3390
|
+
return new rt({ functionName: c, fileName: d, lineNumber: o[1], columnNumber: o[2], source: s });
|
|
3415
3391
|
}, this);
|
|
3416
3392
|
}, "ErrorStackParser$$parseV8OrIE"), parseFFOrSafari: b(function(r) {
|
|
3417
3393
|
var n = r.stack.split(`
|
|
@@ -3419,58 +3395,58 @@ var ls = _r((ps, yt) => {
|
|
|
3419
3395
|
return !s.match(e);
|
|
3420
3396
|
}, this);
|
|
3421
3397
|
return n.map(function(s) {
|
|
3422
|
-
if (s.indexOf(" > eval") > -1 && (s = s.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), s.indexOf("@") === -1 && s.indexOf(":") === -1) return new
|
|
3398
|
+
if (s.indexOf(" > eval") > -1 && (s = s.replace(/ line (\d+)(?: > eval line \d+)* > eval:\d+:\d+/g, ":$1")), s.indexOf("@") === -1 && s.indexOf(":") === -1) return new rt({ functionName: s });
|
|
3423
3399
|
var a = /((.*".+"[^@]*)?[^@]*)(?:@)/, i = s.match(a), o = i && i[1] ? i[1] : void 0, c = this.extractLocation(s.replace(a, ""));
|
|
3424
|
-
return new
|
|
3400
|
+
return new rt({ functionName: o, fileName: c[0], lineNumber: c[1], columnNumber: c[2], source: s });
|
|
3425
3401
|
}, this);
|
|
3426
3402
|
}, "ErrorStackParser$$parseFFOrSafari") };
|
|
3427
3403
|
}
|
|
3428
|
-
b(
|
|
3429
|
-
var
|
|
3404
|
+
b(Bt, "ErrorStackParser");
|
|
3405
|
+
var qn = new Bt(), Un = qn, q = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && !process.browser, Ht = q && typeof pt < "u" && typeof pt.exports < "u" && typeof qt < "u" && typeof __dirname < "u", Bn = q && !Ht, Hn = typeof Deno < "u", Wt = !q && !Hn, Wn = Wt && typeof window == "object" && typeof document == "object" && typeof document.createElement == "function" && "sessionStorage" in window && typeof importScripts != "function", Jn = Wt && typeof importScripts == "function" && typeof self == "object";
|
|
3430
3406
|
typeof navigator == "object" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome") == -1 && navigator.userAgent.indexOf("Safari") > -1;
|
|
3431
|
-
var
|
|
3432
|
-
async function
|
|
3433
|
-
if (!q || (
|
|
3434
|
-
let t =
|
|
3407
|
+
var Jt, dt, Yt, Et, mt;
|
|
3408
|
+
async function yt() {
|
|
3409
|
+
if (!q || (Jt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, Et = await import("./__vite-browser-external-CPvbk0mb.js"), mt = await import("./__vite-browser-external-CPvbk0mb.js"), Yt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, dt = await import("./__vite-browser-external-CPvbk0mb.js"), gt = dt.sep, typeof qt < "u")) return;
|
|
3410
|
+
let t = Et, e = await import("./__vite-browser-external-CPvbk0mb.js"), r = await import("./__vite-browser-external-CPvbk0mb.js"), n = await import("./__vite-browser-external-CPvbk0mb.js"), s = { fs: t, crypto: e, ws: r, child_process: n };
|
|
3435
3411
|
globalThis.require = function(a) {
|
|
3436
3412
|
return s[a];
|
|
3437
3413
|
};
|
|
3438
3414
|
}
|
|
3439
|
-
b(
|
|
3440
|
-
function
|
|
3441
|
-
return
|
|
3415
|
+
b(yt, "initNodeModules");
|
|
3416
|
+
function Kt(t, e) {
|
|
3417
|
+
return dt.resolve(e || ".", t);
|
|
3442
3418
|
}
|
|
3443
|
-
b(
|
|
3444
|
-
function
|
|
3419
|
+
b(Kt, "node_resolvePath");
|
|
3420
|
+
function Gt(t, e) {
|
|
3445
3421
|
return e === void 0 && (e = location), new URL(t, e).toString();
|
|
3446
3422
|
}
|
|
3447
|
-
b(
|
|
3448
|
-
var
|
|
3449
|
-
q ?
|
|
3450
|
-
var
|
|
3451
|
-
q || (
|
|
3452
|
-
function
|
|
3453
|
-
return t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? { response: fetch(t) } : { binary:
|
|
3423
|
+
b(Gt, "browser_resolvePath");
|
|
3424
|
+
var lt;
|
|
3425
|
+
q ? lt = Kt : lt = Gt;
|
|
3426
|
+
var gt;
|
|
3427
|
+
q || (gt = "/");
|
|
3428
|
+
function Xt(t, e) {
|
|
3429
|
+
return t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? { response: fetch(t) } : { binary: mt.readFile(t).then((r) => new Uint8Array(r.buffer, r.byteOffset, r.byteLength)) };
|
|
3454
3430
|
}
|
|
3455
|
-
b(
|
|
3456
|
-
function
|
|
3431
|
+
b(Xt, "node_getBinaryResponse");
|
|
3432
|
+
function Qt(t, e) {
|
|
3457
3433
|
let r = new URL(t, location);
|
|
3458
3434
|
return { response: fetch(r, e ? { integrity: e } : {}) };
|
|
3459
3435
|
}
|
|
3460
|
-
b(
|
|
3461
|
-
var
|
|
3462
|
-
q ?
|
|
3463
|
-
async function
|
|
3464
|
-
let { response: r, binary: n } =
|
|
3436
|
+
b(Qt, "browser_getBinaryResponse");
|
|
3437
|
+
var Ge;
|
|
3438
|
+
q ? Ge = Xt : Ge = Qt;
|
|
3439
|
+
async function er(t, e) {
|
|
3440
|
+
let { response: r, binary: n } = Ge(t, e);
|
|
3465
3441
|
if (n) return n;
|
|
3466
3442
|
let s = await r;
|
|
3467
3443
|
if (!s.ok) throw new Error(`Failed to load '${t}': request failed.`);
|
|
3468
3444
|
return new Uint8Array(await s.arrayBuffer());
|
|
3469
3445
|
}
|
|
3470
|
-
b(
|
|
3471
|
-
var
|
|
3472
|
-
if (
|
|
3473
|
-
else if (
|
|
3446
|
+
b(er, "loadBinaryFile");
|
|
3447
|
+
var qe;
|
|
3448
|
+
if (Wn) qe = b(async (t) => await import(t), "loadScript");
|
|
3449
|
+
else if (Jn) qe = b(async (t) => {
|
|
3474
3450
|
try {
|
|
3475
3451
|
globalThis.importScripts(t);
|
|
3476
3452
|
} catch (e) {
|
|
@@ -3478,39 +3454,39 @@ var ls = _r((ps, yt) => {
|
|
|
3478
3454
|
else throw e;
|
|
3479
3455
|
}
|
|
3480
3456
|
}, "loadScript");
|
|
3481
|
-
else if (q)
|
|
3457
|
+
else if (q) qe = tr;
|
|
3482
3458
|
else throw new Error("Cannot determine runtime environment");
|
|
3483
|
-
async function
|
|
3484
|
-
t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ?
|
|
3459
|
+
async function tr(t) {
|
|
3460
|
+
t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? Yt.runInThisContext(await (await fetch(t)).text()) : await import(Jt.pathToFileURL(t).href);
|
|
3485
3461
|
}
|
|
3486
|
-
b(
|
|
3487
|
-
async function
|
|
3462
|
+
b(tr, "nodeLoadScript");
|
|
3463
|
+
async function rr(t) {
|
|
3488
3464
|
if (q) {
|
|
3489
|
-
await
|
|
3490
|
-
let e = await
|
|
3465
|
+
await yt();
|
|
3466
|
+
let e = await mt.readFile(t, { encoding: "utf8" });
|
|
3491
3467
|
return JSON.parse(e);
|
|
3492
3468
|
} else return await (await fetch(t)).json();
|
|
3493
3469
|
}
|
|
3494
|
-
b(
|
|
3495
|
-
async function
|
|
3496
|
-
if (
|
|
3470
|
+
b(rr, "loadLockFile");
|
|
3471
|
+
async function nr() {
|
|
3472
|
+
if (Ht) return __dirname;
|
|
3497
3473
|
let t;
|
|
3498
3474
|
try {
|
|
3499
3475
|
throw new Error();
|
|
3500
3476
|
} catch (n) {
|
|
3501
3477
|
t = n;
|
|
3502
3478
|
}
|
|
3503
|
-
let e =
|
|
3504
|
-
if (q && !e.startsWith("file://") && (e = `file://${e}`),
|
|
3479
|
+
let e = Un.parse(t)[0].fileName;
|
|
3480
|
+
if (q && !e.startsWith("file://") && (e = `file://${e}`), Bn) {
|
|
3505
3481
|
let n = await import("./__vite-browser-external-CPvbk0mb.js");
|
|
3506
3482
|
return (await import("./__vite-browser-external-CPvbk0mb.js")).fileURLToPath(n.dirname(e));
|
|
3507
3483
|
}
|
|
3508
|
-
let r = e.lastIndexOf(
|
|
3484
|
+
let r = e.lastIndexOf(gt);
|
|
3509
3485
|
if (r === -1) throw new Error("Could not extract indexURL path from pyodide module location");
|
|
3510
3486
|
return e.slice(0, r);
|
|
3511
3487
|
}
|
|
3512
|
-
b(
|
|
3513
|
-
function
|
|
3488
|
+
b(nr, "calculateDirname");
|
|
3489
|
+
function sr(t) {
|
|
3514
3490
|
let e = t.FS, r = t.FS.filesystems.MEMFS, n = t.PATH, s = { DIR_MODE: 16895, FILE_MODE: 33279, mount: function(a) {
|
|
3515
3491
|
if (!a.opts.fileSystemHandle) throw new Error("opts.fileSystemHandle is required");
|
|
3516
3492
|
return r.mount.apply(null, arguments);
|
|
@@ -3538,7 +3514,7 @@ var ls = _r((ps, yt) => {
|
|
|
3538
3514
|
}
|
|
3539
3515
|
return { type: "local", entries: i };
|
|
3540
3516
|
}, getRemoteSet: async (a) => {
|
|
3541
|
-
let i = /* @__PURE__ */ Object.create(null), o = await
|
|
3517
|
+
let i = /* @__PURE__ */ Object.create(null), o = await Yn(a.opts.fileSystemHandle);
|
|
3542
3518
|
for (let [c, d] of o) c !== "." && (i[n.join2(a.mountpoint, c)] = { timestamp: d.kind === "file" ? new Date((await d.getFile()).lastModified) : /* @__PURE__ */ new Date(), mode: d.kind === "file" ? s.FILE_MODE : s.DIR_MODE });
|
|
3543
3519
|
return { type: "remote", entries: i, handles: o };
|
|
3544
3520
|
}, loadLocalEntry: (a) => {
|
|
@@ -3585,8 +3561,8 @@ var ls = _r((ps, yt) => {
|
|
|
3585
3561
|
for (let x of d) {
|
|
3586
3562
|
let I = n.normalize(x.replace(a.mountpoint, "/")).substring(1);
|
|
3587
3563
|
if (o.type === "local") {
|
|
3588
|
-
let U = w.get(I),
|
|
3589
|
-
s.storeLocalEntry(x,
|
|
3564
|
+
let U = w.get(I), De = await s.loadRemoteEntry(U);
|
|
3565
|
+
s.storeLocalEntry(x, De);
|
|
3590
3566
|
} else {
|
|
3591
3567
|
let U = s.loadLocalEntry(x);
|
|
3592
3568
|
await s.storeRemoteEntry(w, I, U);
|
|
@@ -3600,8 +3576,8 @@ var ls = _r((ps, yt) => {
|
|
|
3600
3576
|
} };
|
|
3601
3577
|
t.FS.filesystems.NATIVEFS_ASYNC = s;
|
|
3602
3578
|
}
|
|
3603
|
-
b(
|
|
3604
|
-
var
|
|
3579
|
+
b(sr, "initializeNativeFS");
|
|
3580
|
+
var Yn = b(async (t) => {
|
|
3605
3581
|
let e = [];
|
|
3606
3582
|
async function r(s) {
|
|
3607
3583
|
for await (let a of s.values()) e.push(a), a.kind === "directory" && await r(a);
|
|
@@ -3615,14 +3591,14 @@ var ls = _r((ps, yt) => {
|
|
|
3615
3591
|
}
|
|
3616
3592
|
return n;
|
|
3617
3593
|
}, "getFsHandles");
|
|
3618
|
-
function
|
|
3619
|
-
let e = { noImageDecoding: !0, noAudioDecoding: !0, noWasmDecoding: !1, preRun:
|
|
3594
|
+
function ar(t) {
|
|
3595
|
+
let e = { noImageDecoding: !0, noAudioDecoding: !0, noWasmDecoding: !1, preRun: lr(t), quit(r, n) {
|
|
3620
3596
|
throw e.exited = { status: r, toThrow: n }, n;
|
|
3621
|
-
}, print: t.stdout, printErr: t.stderr, thisProgram: t._sysExecutable, arguments: t.args, API: { config: t }, locateFile: (r) => t.indexURL + r, instantiateWasm:
|
|
3597
|
+
}, print: t.stdout, printErr: t.stderr, thisProgram: t._sysExecutable, arguments: t.args, API: { config: t }, locateFile: (r) => t.indexURL + r, instantiateWasm: ur(t.indexURL) };
|
|
3622
3598
|
return e;
|
|
3623
3599
|
}
|
|
3624
|
-
b(
|
|
3625
|
-
function
|
|
3600
|
+
b(ar, "createSettings");
|
|
3601
|
+
function ir(t) {
|
|
3626
3602
|
return function(e) {
|
|
3627
3603
|
let r = "/";
|
|
3628
3604
|
try {
|
|
@@ -3633,14 +3609,14 @@ var ls = _r((ps, yt) => {
|
|
|
3633
3609
|
e.FS.chdir(t);
|
|
3634
3610
|
};
|
|
3635
3611
|
}
|
|
3636
|
-
b(
|
|
3637
|
-
function
|
|
3612
|
+
b(ir, "createHomeDirectory");
|
|
3613
|
+
function or(t) {
|
|
3638
3614
|
return function(e) {
|
|
3639
3615
|
Object.assign(e.ENV, t);
|
|
3640
3616
|
};
|
|
3641
3617
|
}
|
|
3642
|
-
b(
|
|
3643
|
-
function
|
|
3618
|
+
b(or, "setEnvironment");
|
|
3619
|
+
function cr(t) {
|
|
3644
3620
|
return t ? [async (e) => {
|
|
3645
3621
|
e.addRunDependency("fsInitHook");
|
|
3646
3622
|
try {
|
|
@@ -3650,9 +3626,9 @@ var ls = _r((ps, yt) => {
|
|
|
3650
3626
|
}
|
|
3651
3627
|
}] : [];
|
|
3652
3628
|
}
|
|
3653
|
-
b(
|
|
3654
|
-
function
|
|
3655
|
-
let e =
|
|
3629
|
+
b(cr, "callFsInitHook");
|
|
3630
|
+
function dr(t) {
|
|
3631
|
+
let e = er(t);
|
|
3656
3632
|
return async (r) => {
|
|
3657
3633
|
let n = r._py_version_major(), s = r._py_version_minor();
|
|
3658
3634
|
r.FS.mkdirTree("/lib"), r.API.sitePackages = `/lib/python${n}.${s}/site-packages`, r.FS.mkdirTree(r.API.sitePackages), r.addRunDependency("install-stdlib");
|
|
@@ -3666,15 +3642,15 @@ var ls = _r((ps, yt) => {
|
|
|
3666
3642
|
}
|
|
3667
3643
|
};
|
|
3668
3644
|
}
|
|
3669
|
-
b(
|
|
3670
|
-
function
|
|
3645
|
+
b(dr, "installStdlib");
|
|
3646
|
+
function lr(t) {
|
|
3671
3647
|
let e;
|
|
3672
|
-
return t.stdLibURL != null ? e = t.stdLibURL : e = t.indexURL + "python_stdlib.zip", [...
|
|
3648
|
+
return t.stdLibURL != null ? e = t.stdLibURL : e = t.indexURL + "python_stdlib.zip", [...cr(t.fsInit), dr(e), ir(t.env.HOME), or(t.env), sr];
|
|
3673
3649
|
}
|
|
3674
|
-
b(
|
|
3675
|
-
function
|
|
3650
|
+
b(lr, "getFileSystemInitializationFuncs");
|
|
3651
|
+
function ur(t) {
|
|
3676
3652
|
if (typeof WasmOffsetConverter < "u") return;
|
|
3677
|
-
let { binary: e, response: r } =
|
|
3653
|
+
let { binary: e, response: r } = Ge(t + "pyodide.asm.wasm");
|
|
3678
3654
|
return function(n, s) {
|
|
3679
3655
|
return async function() {
|
|
3680
3656
|
try {
|
|
@@ -3688,19 +3664,19 @@ var ls = _r((ps, yt) => {
|
|
|
3688
3664
|
}(), {};
|
|
3689
3665
|
};
|
|
3690
3666
|
}
|
|
3691
|
-
b(
|
|
3692
|
-
var
|
|
3693
|
-
async function
|
|
3667
|
+
b(ur, "getInstantiateWasmFunc");
|
|
3668
|
+
var ut = "0.27.5";
|
|
3669
|
+
async function ft(t = {}) {
|
|
3694
3670
|
var e, r;
|
|
3695
|
-
await
|
|
3696
|
-
let n = t.indexURL || await
|
|
3697
|
-
n =
|
|
3671
|
+
await yt();
|
|
3672
|
+
let n = t.indexURL || await nr();
|
|
3673
|
+
n = lt(n), n.endsWith("/") || (n += "/"), t.indexURL = n;
|
|
3698
3674
|
let s = { fullStdLib: !1, jsglobals: globalThis, stdin: globalThis.prompt ? globalThis.prompt : void 0, lockFileURL: n + "pyodide-lock.json", args: [], env: {}, packageCacheDir: n, packages: [], enableRunUntilComplete: !1, checkAPIVersion: !0, BUILD_ID: "bd0388b62e760f8ba04185eb443fec955f25434f49c7b951efe5b1f792dbe5d4" }, a = Object.assign(s, t);
|
|
3699
3675
|
(e = a.env).HOME ?? (e.HOME = "/home/pyodide"), (r = a.env).PYTHONINSPECT ?? (r.PYTHONINSPECT = "1");
|
|
3700
|
-
let i =
|
|
3701
|
-
if (o.lockFilePromise =
|
|
3676
|
+
let i = ar(a), o = i.API;
|
|
3677
|
+
if (o.lockFilePromise = rr(a.lockFileURL), typeof _createPyodideModule != "function") {
|
|
3702
3678
|
let x = `${a.indexURL}pyodide.asm.js`;
|
|
3703
|
-
await
|
|
3679
|
+
await qe(x);
|
|
3704
3680
|
}
|
|
3705
3681
|
let c;
|
|
3706
3682
|
if (t._loadSnapshot) {
|
|
@@ -3709,7 +3685,7 @@ var ls = _r((ps, yt) => {
|
|
|
3709
3685
|
}
|
|
3710
3686
|
let d = await _createPyodideModule(i);
|
|
3711
3687
|
if (i.exited) throw i.exited.toThrow;
|
|
3712
|
-
if (t.pyproxyToStringRepr && o.setPyProxyToStringMethod(!0), o.version !==
|
|
3688
|
+
if (t.pyproxyToStringRepr && o.setPyProxyToStringMethod(!0), o.version !== ut && a.checkAPIVersion) throw new Error(`Pyodide version does not match: '${ut}' <==> '${o.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);
|
|
3713
3689
|
d.locateFile = (x) => {
|
|
3714
3690
|
throw new Error("Didn't expect to load any more file_packager files!");
|
|
3715
3691
|
};
|
|
@@ -3718,12 +3694,12 @@ var ls = _r((ps, yt) => {
|
|
|
3718
3694
|
let w = o.finalizeBootstrap(u, t._snapshotDeserializer);
|
|
3719
3695
|
return o.sys.path.insert(0, o.config.env.HOME), w.version.includes("dev") || o.setCdnUrl(`https://cdn.jsdelivr.net/pyodide/v${w.version}/full/`), o._pyodide.set_excepthook(), await o.packageIndexReady, o.initializeStreams(a.stdin, a.stdout, a.stderr), w;
|
|
3720
3696
|
}
|
|
3721
|
-
b(
|
|
3722
|
-
const
|
|
3723
|
-
function
|
|
3724
|
-
return t.includes("dev") &&
|
|
3697
|
+
b(ft, "loadPyodide");
|
|
3698
|
+
const Kn = !1;
|
|
3699
|
+
function Gn(t) {
|
|
3700
|
+
return t.includes("dev") && Kn ? "dev" : `v${ut}`;
|
|
3725
3701
|
}
|
|
3726
|
-
class
|
|
3702
|
+
class Xn {
|
|
3727
3703
|
constructor() {
|
|
3728
3704
|
this.spans = [];
|
|
3729
3705
|
}
|
|
@@ -3765,31 +3741,31 @@ var ls = _r((ps, yt) => {
|
|
|
3765
3741
|
logSpans() {
|
|
3766
3742
|
}
|
|
3767
3743
|
}
|
|
3768
|
-
const A = new
|
|
3744
|
+
const A = new Xn();
|
|
3769
3745
|
globalThis.t = A;
|
|
3770
|
-
function
|
|
3746
|
+
function Qn(t) {
|
|
3771
3747
|
let e, r = !1;
|
|
3772
3748
|
return function(...n) {
|
|
3773
3749
|
return r || (r = !0, e = t.apply(this, n)), e;
|
|
3774
3750
|
};
|
|
3775
3751
|
}
|
|
3776
|
-
const
|
|
3777
|
-
class
|
|
3752
|
+
const es = !1;
|
|
3753
|
+
class ts {
|
|
3778
3754
|
constructor() {
|
|
3779
3755
|
this.pyodide = null;
|
|
3780
3756
|
}
|
|
3781
3757
|
get requirePyodide() {
|
|
3782
|
-
return
|
|
3758
|
+
return zt(this.pyodide, "Pyodide not loaded"), this.pyodide;
|
|
3783
3759
|
}
|
|
3784
3760
|
async bootstrap(e) {
|
|
3785
3761
|
return await this.loadPyodideAndPackages(e);
|
|
3786
3762
|
}
|
|
3787
3763
|
async loadPyodideAndPackages(e) {
|
|
3788
|
-
if (!
|
|
3764
|
+
if (!ft)
|
|
3789
3765
|
throw new Error("loadPyodide is not defined");
|
|
3790
3766
|
const r = A.startSpan("loadPyodide");
|
|
3791
3767
|
try {
|
|
3792
|
-
const n = await
|
|
3768
|
+
const n = await ft({
|
|
3793
3769
|
// Perf: These get loaded while pyodide is being bootstrapped
|
|
3794
3770
|
packages: [
|
|
3795
3771
|
"micropip",
|
|
@@ -3799,7 +3775,7 @@ var ls = _r((ps, yt) => {
|
|
|
3799
3775
|
"narwhals",
|
|
3800
3776
|
"packaging"
|
|
3801
3777
|
],
|
|
3802
|
-
_makeSnapshot:
|
|
3778
|
+
_makeSnapshot: es,
|
|
3803
3779
|
lockFileURL: `https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,
|
|
3804
3780
|
// Without this, this fails in Firefox with
|
|
3805
3781
|
// `Could not extract indexURL path from pyodide module`
|
|
@@ -3888,20 +3864,20 @@ ${e}`;
|
|
|
3888
3864
|
}), a.end();
|
|
3889
3865
|
}
|
|
3890
3866
|
}
|
|
3891
|
-
async function
|
|
3867
|
+
async function rs(t) {
|
|
3892
3868
|
try {
|
|
3893
3869
|
return await import(
|
|
3894
3870
|
/* @vite-ignore */
|
|
3895
3871
|
`/wasm/controller.js?version=${t}`
|
|
3896
3872
|
);
|
|
3897
3873
|
} catch {
|
|
3898
|
-
return new
|
|
3874
|
+
return new ts();
|
|
3899
3875
|
}
|
|
3900
3876
|
}
|
|
3901
|
-
const
|
|
3902
|
-
async function
|
|
3877
|
+
const Ot = A.startSpan("worker:init");
|
|
3878
|
+
async function ns() {
|
|
3903
3879
|
try {
|
|
3904
|
-
const t =
|
|
3880
|
+
const t = is(), e = Gn(t), r = await A.wrapAsync(rs)(t);
|
|
3905
3881
|
self.controller = r, W.send.initializingMessage({
|
|
3906
3882
|
message: "Loading marimo..."
|
|
3907
3883
|
}), self.pyodide = await A.wrapAsync(r.bootstrap.bind(r))({
|
|
@@ -3910,35 +3886,35 @@ ${e}`;
|
|
|
3910
3886
|
});
|
|
3911
3887
|
} catch (t) {
|
|
3912
3888
|
Y.error("Error bootstrapping", t), W.send.initializedError({
|
|
3913
|
-
error:
|
|
3889
|
+
error: Dt(t)
|
|
3914
3890
|
});
|
|
3915
3891
|
}
|
|
3916
3892
|
}
|
|
3917
|
-
const
|
|
3893
|
+
const fr = new _r(
|
|
3918
3894
|
(t) => {
|
|
3919
3895
|
W.send.kernelMessage({ message: t });
|
|
3920
3896
|
}
|
|
3921
|
-
),
|
|
3922
|
-
let
|
|
3923
|
-
const
|
|
3897
|
+
), Nt = new gr();
|
|
3898
|
+
let Rt = !1;
|
|
3899
|
+
const ss = {
|
|
3924
3900
|
/**
|
|
3925
3901
|
* Start the session
|
|
3926
3902
|
*/
|
|
3927
3903
|
startSession: async (t) => {
|
|
3928
3904
|
var e, r;
|
|
3929
|
-
if (await L,
|
|
3905
|
+
if (await L, Rt) {
|
|
3930
3906
|
Y.warn("Session already started");
|
|
3931
3907
|
return;
|
|
3932
3908
|
}
|
|
3933
|
-
|
|
3909
|
+
Rt = !0;
|
|
3934
3910
|
try {
|
|
3935
|
-
|
|
3911
|
+
zt(self.controller, "Controller not loaded"), await ((r = (e = self.controller).mountFilesystem) == null ? void 0 : r.call(e, {
|
|
3936
3912
|
code: t.code,
|
|
3937
3913
|
filename: t.filename
|
|
3938
3914
|
}));
|
|
3939
3915
|
const n = A.wrapAsync(
|
|
3940
3916
|
self.controller.startSession.bind(self.controller)
|
|
3941
|
-
), s =
|
|
3917
|
+
), s = Qn(() => {
|
|
3942
3918
|
W.send.initializingMessage({
|
|
3943
3919
|
message: "Initializing notebook..."
|
|
3944
3920
|
}), W.send.initialized({});
|
|
@@ -3952,14 +3928,14 @@ ${e}`;
|
|
|
3952
3928
|
queryParameters: t.queryParameters,
|
|
3953
3929
|
userConfig: t.userConfig,
|
|
3954
3930
|
onMessage: (i) => {
|
|
3955
|
-
s(),
|
|
3931
|
+
s(), fr.push(i);
|
|
3956
3932
|
}
|
|
3957
3933
|
});
|
|
3958
|
-
|
|
3934
|
+
Nt.resolve(a), Ot.end("ok");
|
|
3959
3935
|
} catch (n) {
|
|
3960
3936
|
W.send.initializedError({
|
|
3961
|
-
error:
|
|
3962
|
-
}),
|
|
3937
|
+
error: Dt(n)
|
|
3938
|
+
}), Ot.end("error");
|
|
3963
3939
|
}
|
|
3964
3940
|
},
|
|
3965
3941
|
/**
|
|
@@ -3982,7 +3958,7 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
|
|
|
3982
3958
|
readFile: async (t) => {
|
|
3983
3959
|
const e = A.startSpan("readFile");
|
|
3984
3960
|
await L;
|
|
3985
|
-
const r =
|
|
3961
|
+
const r = nt(self.pyodide.FS.readFile(t));
|
|
3986
3962
|
return e.end(), r;
|
|
3987
3963
|
},
|
|
3988
3964
|
/**
|
|
@@ -4072,26 +4048,26 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
|
|
|
4072
4048
|
except ModuleNotFoundError:
|
|
4073
4049
|
await micropip.install("pyyaml")
|
|
4074
4050
|
`);
|
|
4075
|
-
const s = await
|
|
4051
|
+
const s = await Nt.promise, a = n == null ? null : typeof n == "string" ? n : JSON.stringify(n), i = a == null ? (
|
|
4076
4052
|
// @ts-expect-error ehh TypeScript
|
|
4077
4053
|
await s[r]()
|
|
4078
4054
|
) : (
|
|
4079
4055
|
// @ts-expect-error ehh TypeScript
|
|
4080
4056
|
await s[r](a)
|
|
4081
4057
|
);
|
|
4082
|
-
return
|
|
4058
|
+
return as.has(r) && ie.persistFilesToRemote(self.pyodide), e.end(), typeof i == "string" ? JSON.parse(i) : i;
|
|
4083
4059
|
}
|
|
4084
|
-
}, W =
|
|
4085
|
-
transport:
|
|
4086
|
-
transportId:
|
|
4060
|
+
}, W = Zn({
|
|
4061
|
+
transport: Fn({
|
|
4062
|
+
transportId: Ln
|
|
4087
4063
|
}),
|
|
4088
|
-
requestHandler:
|
|
4064
|
+
requestHandler: ss
|
|
4089
4065
|
});
|
|
4090
4066
|
W.send("ready", {});
|
|
4091
4067
|
W.addMessageListener("consumerReady", async () => {
|
|
4092
|
-
await L,
|
|
4068
|
+
await L, fr.start();
|
|
4093
4069
|
});
|
|
4094
|
-
const
|
|
4070
|
+
const as = /* @__PURE__ */ new Set([
|
|
4095
4071
|
"save",
|
|
4096
4072
|
"save_app_config",
|
|
4097
4073
|
"rename_file",
|
|
@@ -4100,9 +4076,9 @@ ${t}`)), await self.pyodide.loadPackagesFromImports(t, {
|
|
|
4100
4076
|
"move_file_or_directory",
|
|
4101
4077
|
"update_file"
|
|
4102
4078
|
]);
|
|
4103
|
-
function
|
|
4079
|
+
function is() {
|
|
4104
4080
|
return self.name;
|
|
4105
4081
|
}
|
|
4106
|
-
const L = A.wrapAsync(
|
|
4082
|
+
const L = A.wrapAsync(ns)();
|
|
4107
4083
|
});
|
|
4108
|
-
export default
|
|
4084
|
+
export default os();
|