@marimo-team/islands 0.13.7-dev3 → 0.13.7-dev32
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-0hK6M9Eq.js → ConnectedDataExplorerComponent-6UDvcK_5.js} +2 -2
- package/dist/{VegaLite-D__QIeJg.js → VegaLite-BsQjUR0d.js} +3 -3
- package/dist/{_baseUniq-ysdMgxCE.js → _baseUniq-zICw_zxN.js} +54 -54
- package/dist/{any-language-editor-Blzy4H9H.js → any-language-editor-JSocusic.js} +1 -1
- package/dist/{architectureDiagram-IEHRJDOE-BUSkFy3f.js → architectureDiagram-IEHRJDOE-1CEqQAg5.js} +5 -5
- package/dist/assets/{save-worker-9JEjyZ7F.js → save-worker-BPdUArx2.js} +441 -417
- package/dist/assets/{worker-CCjA_vqR.js → worker-ClUJakx7.js} +462 -438
- package/dist/assets/{worker-C9lFbiFX.js → worker-PjUOGXtl.js} +466 -442
- package/dist/{blockDiagram-JOT3LUYC-D5WhQpwu.js → blockDiagram-JOT3LUYC-rFk7T2kw.js} +4 -4
- package/dist/{c4Diagram-VJAJSXHY-CS3XAhJU.js → c4Diagram-VJAJSXHY-VLnPRt_4.js} +2 -2
- package/dist/{channel-UZ9GVyl-.js → channel-bKuZqnGv.js} +1 -1
- package/dist/{chunk-4BMEZGHF-48nryxjO.js → chunk-4BMEZGHF-DefviArv.js} +1 -1
- package/dist/{chunk-A2AXSNBT-DCb8pHD4.js → chunk-A2AXSNBT-CLpRtk6Q.js} +2 -2
- package/dist/{chunk-AEK57VVT-Q4j6Q4Fw.js → chunk-AEK57VVT-BG8F_oCZ.js} +2 -2
- package/dist/{chunk-D6G4REZN--8PO0KhP.js → chunk-D6G4REZN-C6XJ51u2.js} +1 -1
- package/dist/{chunk-RZ5BOZE2-DNsHnJqX.js → chunk-RZ5BOZE2-7qT18Tpz.js} +1 -1
- package/dist/{chunk-XZIHB7SX-_LTJYTjJ.js → chunk-XZIHB7SX-CVc8-4fY.js} +1 -1
- package/dist/{classDiagram-GIVACNV2-MG2VDP6A.js → classDiagram-GIVACNV2-Bi2RnisN.js} +2 -2
- package/dist/{classDiagram-v2-COTLJTTW-MG2VDP6A.js → classDiagram-v2-COTLJTTW-Bi2RnisN.js} +2 -2
- package/dist/{clone-DVJZ_ek8.js → clone-1N-yFV20.js} +1 -1
- package/dist/{dagre-OKDRZEBW-BafkftTS.js → dagre-OKDRZEBW-Cm7QvpVQ.js} +6 -6
- package/dist/{data-editor-DJZYYRec.js → data-editor-XX51HM0l.js} +1 -1
- package/dist/{diagram-SSKATNLV-DUWfFwb0.js → diagram-SSKATNLV-BhwoqYfM.js} +3 -3
- package/dist/{diagram-VNBRO52H-DrOzmMKl.js → diagram-VNBRO52H-CP9dIvwY.js} +3 -3
- package/dist/{erDiagram-Q7BY3M3F-RF2FOAJ5.js → erDiagram-Q7BY3M3F-BJ779wqc.js} +3 -3
- package/dist/{flowDiagram-4HSFHLVR-DCnhJTLf.js → flowDiagram-4HSFHLVR-Cpy50p28.js} +3 -3
- package/dist/{ganttDiagram-APWFNJXF-afUa7p_H.js → ganttDiagram-APWFNJXF-DYOpqf0Z.js} +55 -55
- package/dist/{gitGraphDiagram-7IBYFJ6S-DuvkdLHm.js → gitGraphDiagram-7IBYFJ6S-B4Jag51t.js} +4 -4
- package/dist/{graph-BVtZgHd3.js → graph-CDRv_pf9.js} +3 -3
- package/dist/{index-CyyQF26W.js → index-AVkbYu17.js} +1 -1
- package/dist/{index-D51q3TXX.js → index-C30v6JPF.js} +3 -3
- package/dist/{index-BvxPNq4a.js → index-CRPNgh7y.js} +1 -1
- package/dist/{index-BUVSqbtb.js → index-lSyZcrUc.js} +1 -1
- package/dist/{infoDiagram-PH2N3AL5-CB7Z1quM.js → infoDiagram-PH2N3AL5-CTYwqD3j.js} +2 -2
- package/dist/{journeyDiagram-U35MCT3I-BbhrJXeW.js → journeyDiagram-U35MCT3I-X3Dx-5Ob.js} +2 -2
- package/dist/{kanban-definition-NDS4AKOZ-DqByQ1di.js → kanban-definition-NDS4AKOZ-DGDF5V1c.js} +1 -1
- package/dist/{layout-CLHfJd_Q.js → layout-CGPBgjl8.js} +51 -51
- package/dist/{linear-Bx8s50AU.js → linear-CD8rSpb5.js} +32 -32
- package/dist/{main-DBDd1c2c.js → main-Bz9XNNHi.js} +38980 -37455
- package/dist/main.js +1 -1
- package/dist/{mermaid-_8ZkF6hH.js → mermaid-xNhQKyNd.js} +28 -28
- package/dist/min-PxftiN1F.js +85 -0
- package/dist/{mindmap-definition-ALO5MXBD-HT8qg2rP.js → mindmap-definition-ALO5MXBD-DCWb2z_h.js} +2 -2
- package/dist/{pieDiagram-IB7DONF6-CwLTNvee.js → pieDiagram-IB7DONF6-C-XOBZ3T.js} +3 -3
- package/dist/{quadrantDiagram-7GDLP6J5-OclLmoaJ.js → quadrantDiagram-7GDLP6J5-DErIKHS7.js} +2 -2
- package/dist/{radar-MK3ICKWK-CdLb4amB.js → radar-MK3ICKWK-Eqy8IpHB.js} +11 -11
- package/dist/{react-plotly-t47vusFp.js → react-plotly-eihMQaSy.js} +1 -1
- package/dist/{requirementDiagram-KVF5MWMF-0pwQlp9x.js → requirementDiagram-KVF5MWMF-B0ssdYvY.js} +2 -2
- package/dist/{sankeyDiagram-QLVOVGJD-Bp_7ddsH.js → sankeyDiagram-QLVOVGJD-BhDenF95.js} +1 -1
- package/dist/{sequenceDiagram-X6HHIX6F-BblhUSFX.js → sequenceDiagram-X6HHIX6F--5IAPnB4.js} +3 -3
- package/dist/{slides-component-DmWIsB5x.js → slides-component-CtT-ndMX.js} +1 -1
- package/dist/{stateDiagram-DGXRK772-B4cNQKYX.js → stateDiagram-DGXRK772-BOLJyc_S.js} +4 -4
- package/dist/{stateDiagram-v2-YXO3MK2T-D21cm7s9.js → stateDiagram-v2-YXO3MK2T-DjVOO6gL.js} +2 -2
- package/dist/style.css +1 -1
- package/dist/{time-BSVcJ_ZQ.js → time-Dx5NEBUh.js} +2 -2
- package/dist/{timeline-definition-BDJGKUSR-plBHXs7X.js → timeline-definition-BDJGKUSR-CM2sgvOw.js} +1 -1
- package/dist/{vega-component-B_-65kds.js → vega-component-yf3UAmGm.js} +2 -2
- package/dist/{xychartDiagram-VJFVF3MP-B-t7YLmw.js → xychartDiagram-VJFVF3MP-DOsyX8U_.js} +2 -2
- package/package.json +5 -4
- package/dist/min-CxEnG-Hs.js +0 -80
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var pr = (t, e) => () => (e || t((e = { exports: {} }).exports, e), e.exports);
|
|
2
|
+
var rs = pr((as, yt) => {
|
|
3
3
|
var b;
|
|
4
4
|
(function(t) {
|
|
5
5
|
t.assertEqual = (s) => s;
|
|
@@ -36,14 +36,14 @@ var Qn = ur((rs, pt) => {
|
|
|
36
36
|
}
|
|
37
37
|
t.joinValues = n, t.jsonStringifyReplacer = (s, a) => typeof a == "bigint" ? a.toString() : a;
|
|
38
38
|
})(b || (b = {}));
|
|
39
|
-
var
|
|
39
|
+
var at;
|
|
40
40
|
(function(t) {
|
|
41
41
|
t.mergeShapes = (e, r) => ({
|
|
42
42
|
...e,
|
|
43
43
|
...r
|
|
44
44
|
// second overwrites first
|
|
45
45
|
});
|
|
46
|
-
})(
|
|
46
|
+
})(at || (at = {}));
|
|
47
47
|
const p = b.arrayToEnum([
|
|
48
48
|
"string",
|
|
49
49
|
"nan",
|
|
@@ -103,7 +103,7 @@ var Qn = ur((rs, pt) => {
|
|
|
103
103
|
"invalid_intersection_types",
|
|
104
104
|
"not_multiple_of",
|
|
105
105
|
"not_finite"
|
|
106
|
-
]),
|
|
106
|
+
]), hr = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
|
|
107
107
|
class I extends Error {
|
|
108
108
|
get errors() {
|
|
109
109
|
return this.issues;
|
|
@@ -220,14 +220,14 @@ var Qn = ur((rs, pt) => {
|
|
|
220
220
|
}
|
|
221
221
|
return { message: r };
|
|
222
222
|
};
|
|
223
|
-
let
|
|
224
|
-
function
|
|
225
|
-
|
|
223
|
+
let Rt = me;
|
|
224
|
+
function mr(t) {
|
|
225
|
+
Rt = t;
|
|
226
226
|
}
|
|
227
|
-
function
|
|
228
|
-
return
|
|
227
|
+
function ze() {
|
|
228
|
+
return Rt;
|
|
229
229
|
}
|
|
230
|
-
const
|
|
230
|
+
const qe = (t) => {
|
|
231
231
|
const { data: e, path: r, errorMaps: n, issueData: s } = t, a = [...r, ...s.path || []], i = {
|
|
232
232
|
...s,
|
|
233
233
|
path: a
|
|
@@ -247,9 +247,9 @@ var Qn = ur((rs, pt) => {
|
|
|
247
247
|
path: a,
|
|
248
248
|
message: o
|
|
249
249
|
};
|
|
250
|
-
},
|
|
250
|
+
}, yr = [];
|
|
251
251
|
function f(t, e) {
|
|
252
|
-
const r =
|
|
252
|
+
const r = ze(), n = qe({
|
|
253
253
|
issueData: e,
|
|
254
254
|
data: t.data,
|
|
255
255
|
path: t.path,
|
|
@@ -309,12 +309,12 @@ var Qn = ur((rs, pt) => {
|
|
|
309
309
|
}
|
|
310
310
|
const y = Object.freeze({
|
|
311
311
|
status: "aborted"
|
|
312
|
-
}), pe = (t) => ({ status: "dirty", value: t }), A = (t) => ({ status: "valid", value: t }),
|
|
313
|
-
function
|
|
312
|
+
}), pe = (t) => ({ status: "dirty", value: t }), A = (t) => ({ status: "valid", value: t }), it = (t) => t.status === "aborted", ot = (t) => t.status === "dirty", se = (t) => t.status === "valid", Se = (t) => typeof Promise < "u" && t instanceof Promise;
|
|
313
|
+
function Be(t, e, r, n) {
|
|
314
314
|
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");
|
|
315
315
|
return e.get(t);
|
|
316
316
|
}
|
|
317
|
-
function
|
|
317
|
+
function At(t, e, r, n, s) {
|
|
318
318
|
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");
|
|
319
319
|
return e.set(t, r), r;
|
|
320
320
|
}
|
|
@@ -322,7 +322,7 @@ var Qn = ur((rs, pt) => {
|
|
|
322
322
|
(function(t) {
|
|
323
323
|
t.errToObj = (e) => typeof e == "string" ? { message: e } : e || {}, t.toString = (e) => typeof e == "string" ? e : e == null ? void 0 : e.message;
|
|
324
324
|
})(h || (h = {}));
|
|
325
|
-
var
|
|
325
|
+
var be, ke;
|
|
326
326
|
class L {
|
|
327
327
|
constructor(e, r, n, s) {
|
|
328
328
|
this._cachedPath = [], this.parent = e, this.data = r, this._path = n, this._key = s;
|
|
@@ -331,7 +331,7 @@ var Qn = ur((rs, pt) => {
|
|
|
331
331
|
return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
const
|
|
334
|
+
const xt = (t, e) => {
|
|
335
335
|
if (se(e))
|
|
336
336
|
return { success: !0, data: e.value };
|
|
337
337
|
if (!t.common.issues.length)
|
|
@@ -390,7 +390,7 @@ var Qn = ur((rs, pt) => {
|
|
|
390
390
|
}
|
|
391
391
|
_parseSync(e) {
|
|
392
392
|
const r = this._parse(e);
|
|
393
|
-
if (
|
|
393
|
+
if (Se(r))
|
|
394
394
|
throw new Error("Synchronous parse encountered promise.");
|
|
395
395
|
return r;
|
|
396
396
|
}
|
|
@@ -418,7 +418,7 @@ var Qn = ur((rs, pt) => {
|
|
|
418
418
|
data: e,
|
|
419
419
|
parsedType: q(e)
|
|
420
420
|
}, a = this._parseSync({ data: e, path: s.path, parent: s });
|
|
421
|
-
return
|
|
421
|
+
return xt(s, a);
|
|
422
422
|
}
|
|
423
423
|
"~validate"(e) {
|
|
424
424
|
var r, n;
|
|
@@ -471,8 +471,8 @@ var Qn = ur((rs, pt) => {
|
|
|
471
471
|
parent: null,
|
|
472
472
|
data: e,
|
|
473
473
|
parsedType: q(e)
|
|
474
|
-
}, s = this._parse({ data: e, path: n.path, parent: n }), a = await (
|
|
475
|
-
return
|
|
474
|
+
}, s = this._parse({ data: e, path: n.path, parent: n }), a = await (Se(s) ? s : Promise.resolve(s));
|
|
475
|
+
return xt(n, a);
|
|
476
476
|
}
|
|
477
477
|
refine(e, r) {
|
|
478
478
|
const n = (s) => typeof r == "string" || typeof r > "u" ? { message: r } : typeof r == "function" ? r(s) : r;
|
|
@@ -520,10 +520,10 @@ var Qn = ur((rs, pt) => {
|
|
|
520
520
|
return ge.create(this, this._def);
|
|
521
521
|
}
|
|
522
522
|
or(e) {
|
|
523
|
-
return
|
|
523
|
+
return Re.create([this, e], this._def);
|
|
524
524
|
}
|
|
525
525
|
and(e) {
|
|
526
|
-
return
|
|
526
|
+
return Ae.create(this, e, this._def);
|
|
527
527
|
}
|
|
528
528
|
transform(e) {
|
|
529
529
|
return new $({
|
|
@@ -535,7 +535,7 @@ var Qn = ur((rs, pt) => {
|
|
|
535
535
|
}
|
|
536
536
|
default(e) {
|
|
537
537
|
const r = typeof e == "function" ? e : () => e;
|
|
538
|
-
return new
|
|
538
|
+
return new je({
|
|
539
539
|
...v(this._def),
|
|
540
540
|
innerType: this,
|
|
541
541
|
defaultValue: r,
|
|
@@ -543,7 +543,7 @@ var Qn = ur((rs, pt) => {
|
|
|
543
543
|
});
|
|
544
544
|
}
|
|
545
545
|
brand() {
|
|
546
|
-
return new
|
|
546
|
+
return new gt({
|
|
547
547
|
typeName: m.ZodBranded,
|
|
548
548
|
type: this,
|
|
549
549
|
...v(this._def)
|
|
@@ -551,7 +551,7 @@ var Qn = ur((rs, pt) => {
|
|
|
551
551
|
}
|
|
552
552
|
catch(e) {
|
|
553
553
|
const r = typeof e == "function" ? e : () => e;
|
|
554
|
-
return new
|
|
554
|
+
return new $e({
|
|
555
555
|
...v(this._def),
|
|
556
556
|
innerType: this,
|
|
557
557
|
catchValue: r,
|
|
@@ -566,10 +566,10 @@ var Qn = ur((rs, pt) => {
|
|
|
566
566
|
});
|
|
567
567
|
}
|
|
568
568
|
pipe(e) {
|
|
569
|
-
return
|
|
569
|
+
return Me.create(this, e);
|
|
570
570
|
}
|
|
571
571
|
readonly() {
|
|
572
|
-
return
|
|
572
|
+
return Fe.create(this);
|
|
573
573
|
}
|
|
574
574
|
isOptional() {
|
|
575
575
|
return this.safeParse(void 0).success;
|
|
@@ -578,26 +578,26 @@ var Qn = ur((rs, pt) => {
|
|
|
578
578
|
return this.safeParse(null).success;
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
const
|
|
582
|
-
let
|
|
583
|
-
const
|
|
584
|
-
function
|
|
581
|
+
const gr = /^c[^\s-]{8,}$/i, vr = /^[0-9a-z]+$/, _r = /^[0-9A-HJKMNP-TV-Z]{26}$/i, wr = /^[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, br = /^[a-z0-9_-]{21}$/i, kr = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, xr = /^[-+]?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)?)??$/, Tr = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Sr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
|
|
582
|
+
let rt;
|
|
583
|
+
const Er = /^(?:(?: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])$/, Or = /^(?:(?: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])$/, Nr = /^(([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]))$/, Rr = /^(([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])$/, Ar = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Cr = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Ct = "((\\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])))", Ir = new RegExp(`^${Ct}$`);
|
|
584
|
+
function It(t) {
|
|
585
585
|
let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
|
|
586
586
|
return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
|
|
587
587
|
}
|
|
588
|
-
function
|
|
589
|
-
return new RegExp(`^${
|
|
588
|
+
function Pr(t) {
|
|
589
|
+
return new RegExp(`^${It(t)}$`);
|
|
590
590
|
}
|
|
591
|
-
function
|
|
592
|
-
let e = `${
|
|
591
|
+
function Pt(t) {
|
|
592
|
+
let e = `${Ct}T${It(t)}`;
|
|
593
593
|
const r = [];
|
|
594
594
|
return r.push(t.local ? "Z?" : "Z"), t.offset && r.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${r.join("|")})`, new RegExp(`^${e}$`);
|
|
595
595
|
}
|
|
596
|
-
function
|
|
597
|
-
return !!((e === "v4" || !e) &&
|
|
596
|
+
function Zr(t, e) {
|
|
597
|
+
return !!((e === "v4" || !e) && Er.test(t) || (e === "v6" || !e) && Nr.test(t));
|
|
598
598
|
}
|
|
599
|
-
function
|
|
600
|
-
if (!
|
|
599
|
+
function jr(t, e) {
|
|
600
|
+
if (!kr.test(t))
|
|
601
601
|
return !1;
|
|
602
602
|
try {
|
|
603
603
|
const [r] = t.split("."), n = r.replace(/-/g, "+").replace(/_/g, "/").padEnd(r.length + (4 - r.length % 4) % 4, "="), s = JSON.parse(atob(n));
|
|
@@ -606,10 +606,10 @@ var Qn = ur((rs, pt) => {
|
|
|
606
606
|
return !1;
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
|
-
function
|
|
610
|
-
return !!((e === "v4" || !e) &&
|
|
609
|
+
function $r(t, e) {
|
|
610
|
+
return !!((e === "v4" || !e) && Or.test(t) || (e === "v6" || !e) && Rr.test(t));
|
|
611
611
|
}
|
|
612
|
-
class
|
|
612
|
+
class Z extends _ {
|
|
613
613
|
_parse(e) {
|
|
614
614
|
if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== p.string) {
|
|
615
615
|
const a = this._getOrReturnCtx(e);
|
|
@@ -658,43 +658,43 @@ var Qn = ur((rs, pt) => {
|
|
|
658
658
|
message: a.message
|
|
659
659
|
}), n.dirty());
|
|
660
660
|
} else if (a.kind === "email")
|
|
661
|
-
|
|
661
|
+
Tr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
662
662
|
validation: "email",
|
|
663
663
|
code: u.invalid_string,
|
|
664
664
|
message: a.message
|
|
665
665
|
}), n.dirty());
|
|
666
666
|
else if (a.kind === "emoji")
|
|
667
|
-
|
|
667
|
+
rt || (rt = new RegExp(Sr, "u")), rt.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
668
668
|
validation: "emoji",
|
|
669
669
|
code: u.invalid_string,
|
|
670
670
|
message: a.message
|
|
671
671
|
}), n.dirty());
|
|
672
672
|
else if (a.kind === "uuid")
|
|
673
|
-
|
|
673
|
+
wr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
674
674
|
validation: "uuid",
|
|
675
675
|
code: u.invalid_string,
|
|
676
676
|
message: a.message
|
|
677
677
|
}), n.dirty());
|
|
678
678
|
else if (a.kind === "nanoid")
|
|
679
|
-
|
|
679
|
+
br.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
680
680
|
validation: "nanoid",
|
|
681
681
|
code: u.invalid_string,
|
|
682
682
|
message: a.message
|
|
683
683
|
}), n.dirty());
|
|
684
684
|
else if (a.kind === "cuid")
|
|
685
|
-
|
|
685
|
+
gr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
686
686
|
validation: "cuid",
|
|
687
687
|
code: u.invalid_string,
|
|
688
688
|
message: a.message
|
|
689
689
|
}), n.dirty());
|
|
690
690
|
else if (a.kind === "cuid2")
|
|
691
|
-
|
|
691
|
+
vr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
692
692
|
validation: "cuid2",
|
|
693
693
|
code: u.invalid_string,
|
|
694
694
|
message: a.message
|
|
695
695
|
}), n.dirty());
|
|
696
696
|
else if (a.kind === "ulid")
|
|
697
|
-
|
|
697
|
+
_r.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
698
698
|
validation: "ulid",
|
|
699
699
|
code: u.invalid_string,
|
|
700
700
|
message: a.message
|
|
@@ -725,39 +725,39 @@ var Qn = ur((rs, pt) => {
|
|
|
725
725
|
code: u.invalid_string,
|
|
726
726
|
validation: { endsWith: a.value },
|
|
727
727
|
message: a.message
|
|
728
|
-
}), n.dirty()) : a.kind === "datetime" ?
|
|
728
|
+
}), n.dirty()) : a.kind === "datetime" ? Pt(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
729
729
|
code: u.invalid_string,
|
|
730
730
|
validation: "datetime",
|
|
731
731
|
message: a.message
|
|
732
|
-
}), n.dirty()) : a.kind === "date" ?
|
|
732
|
+
}), n.dirty()) : a.kind === "date" ? Ir.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
733
733
|
code: u.invalid_string,
|
|
734
734
|
validation: "date",
|
|
735
735
|
message: a.message
|
|
736
|
-
}), n.dirty()) : a.kind === "time" ?
|
|
736
|
+
}), n.dirty()) : a.kind === "time" ? Pr(a).test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
737
737
|
code: u.invalid_string,
|
|
738
738
|
validation: "time",
|
|
739
739
|
message: a.message
|
|
740
|
-
}), n.dirty()) : a.kind === "duration" ?
|
|
740
|
+
}), n.dirty()) : a.kind === "duration" ? xr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
741
741
|
validation: "duration",
|
|
742
742
|
code: u.invalid_string,
|
|
743
743
|
message: a.message
|
|
744
|
-
}), n.dirty()) : a.kind === "ip" ?
|
|
744
|
+
}), n.dirty()) : a.kind === "ip" ? Zr(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
745
745
|
validation: "ip",
|
|
746
746
|
code: u.invalid_string,
|
|
747
747
|
message: a.message
|
|
748
|
-
}), n.dirty()) : a.kind === "jwt" ?
|
|
748
|
+
}), n.dirty()) : a.kind === "jwt" ? jr(e.data, a.alg) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
749
749
|
validation: "jwt",
|
|
750
750
|
code: u.invalid_string,
|
|
751
751
|
message: a.message
|
|
752
|
-
}), n.dirty()) : a.kind === "cidr" ?
|
|
752
|
+
}), n.dirty()) : a.kind === "cidr" ? $r(e.data, a.version) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
753
753
|
validation: "cidr",
|
|
754
754
|
code: u.invalid_string,
|
|
755
755
|
message: a.message
|
|
756
|
-
}), n.dirty()) : a.kind === "base64" ?
|
|
756
|
+
}), n.dirty()) : a.kind === "base64" ? Ar.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
757
757
|
validation: "base64",
|
|
758
758
|
code: u.invalid_string,
|
|
759
759
|
message: a.message
|
|
760
|
-
}), n.dirty()) : a.kind === "base64url" ?
|
|
760
|
+
}), n.dirty()) : a.kind === "base64url" ? Cr.test(e.data) || (s = this._getOrReturnCtx(e, s), f(s, {
|
|
761
761
|
validation: "base64url",
|
|
762
762
|
code: u.invalid_string,
|
|
763
763
|
message: a.message
|
|
@@ -772,7 +772,7 @@ var Qn = ur((rs, pt) => {
|
|
|
772
772
|
});
|
|
773
773
|
}
|
|
774
774
|
_addCheck(e) {
|
|
775
|
-
return new
|
|
775
|
+
return new Z({
|
|
776
776
|
...this._def,
|
|
777
777
|
checks: [...this._def.checks, e]
|
|
778
778
|
});
|
|
@@ -909,19 +909,19 @@ var Qn = ur((rs, pt) => {
|
|
|
909
909
|
return this.min(1, h.errToObj(e));
|
|
910
910
|
}
|
|
911
911
|
trim() {
|
|
912
|
-
return new
|
|
912
|
+
return new Z({
|
|
913
913
|
...this._def,
|
|
914
914
|
checks: [...this._def.checks, { kind: "trim" }]
|
|
915
915
|
});
|
|
916
916
|
}
|
|
917
917
|
toLowerCase() {
|
|
918
|
-
return new
|
|
918
|
+
return new Z({
|
|
919
919
|
...this._def,
|
|
920
920
|
checks: [...this._def.checks, { kind: "toLowerCase" }]
|
|
921
921
|
});
|
|
922
922
|
}
|
|
923
923
|
toUpperCase() {
|
|
924
|
-
return new
|
|
924
|
+
return new Z({
|
|
925
925
|
...this._def,
|
|
926
926
|
checks: [...this._def.checks, { kind: "toUpperCase" }]
|
|
927
927
|
});
|
|
@@ -987,16 +987,16 @@ var Qn = ur((rs, pt) => {
|
|
|
987
987
|
return e;
|
|
988
988
|
}
|
|
989
989
|
}
|
|
990
|
-
|
|
990
|
+
Z.create = (t) => {
|
|
991
991
|
var e;
|
|
992
|
-
return new
|
|
992
|
+
return new Z({
|
|
993
993
|
checks: [],
|
|
994
994
|
typeName: m.ZodString,
|
|
995
995
|
coerce: (e = t == null ? void 0 : t.coerce) !== null && e !== void 0 ? e : !1,
|
|
996
996
|
...v(t)
|
|
997
997
|
});
|
|
998
998
|
};
|
|
999
|
-
function
|
|
999
|
+
function Fr(t, e) {
|
|
1000
1000
|
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(".", ""));
|
|
1001
1001
|
return a % i / Math.pow(10, s);
|
|
1002
1002
|
}
|
|
@@ -1035,7 +1035,7 @@ var Qn = ur((rs, pt) => {
|
|
|
1035
1035
|
inclusive: a.inclusive,
|
|
1036
1036
|
exact: !1,
|
|
1037
1037
|
message: a.message
|
|
1038
|
-
}), s.dirty()) : a.kind === "multipleOf" ?
|
|
1038
|
+
}), s.dirty()) : a.kind === "multipleOf" ? Fr(e.data, a.value) !== 0 && (n = this._getOrReturnCtx(e, n), f(n, {
|
|
1039
1039
|
code: u.not_multiple_of,
|
|
1040
1040
|
multipleOf: a.value,
|
|
1041
1041
|
message: a.message
|
|
@@ -1308,7 +1308,7 @@ var Qn = ur((rs, pt) => {
|
|
|
1308
1308
|
...v(t)
|
|
1309
1309
|
});
|
|
1310
1310
|
};
|
|
1311
|
-
class
|
|
1311
|
+
class Ee extends _ {
|
|
1312
1312
|
_parse(e) {
|
|
1313
1313
|
if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== p.boolean) {
|
|
1314
1314
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1321,7 +1321,7 @@ var Qn = ur((rs, pt) => {
|
|
|
1321
1321
|
return A(e.data);
|
|
1322
1322
|
}
|
|
1323
1323
|
}
|
|
1324
|
-
|
|
1324
|
+
Ee.create = (t) => new Ee({
|
|
1325
1325
|
typeName: m.ZodBoolean,
|
|
1326
1326
|
coerce: (t == null ? void 0 : t.coerce) || !1,
|
|
1327
1327
|
...v(t)
|
|
@@ -1404,7 +1404,7 @@ var Qn = ur((rs, pt) => {
|
|
|
1404
1404
|
typeName: m.ZodDate,
|
|
1405
1405
|
...v(t)
|
|
1406
1406
|
});
|
|
1407
|
-
class
|
|
1407
|
+
class He extends _ {
|
|
1408
1408
|
_parse(e) {
|
|
1409
1409
|
if (this._getType(e) !== p.symbol) {
|
|
1410
1410
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1417,11 +1417,11 @@ var Qn = ur((rs, pt) => {
|
|
|
1417
1417
|
return A(e.data);
|
|
1418
1418
|
}
|
|
1419
1419
|
}
|
|
1420
|
-
|
|
1420
|
+
He.create = (t) => new He({
|
|
1421
1421
|
typeName: m.ZodSymbol,
|
|
1422
1422
|
...v(t)
|
|
1423
1423
|
});
|
|
1424
|
-
class
|
|
1424
|
+
class Oe extends _ {
|
|
1425
1425
|
_parse(e) {
|
|
1426
1426
|
if (this._getType(e) !== p.undefined) {
|
|
1427
1427
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1434,11 +1434,11 @@ var Qn = ur((rs, pt) => {
|
|
|
1434
1434
|
return A(e.data);
|
|
1435
1435
|
}
|
|
1436
1436
|
}
|
|
1437
|
-
|
|
1437
|
+
Oe.create = (t) => new Oe({
|
|
1438
1438
|
typeName: m.ZodUndefined,
|
|
1439
1439
|
...v(t)
|
|
1440
1440
|
});
|
|
1441
|
-
class
|
|
1441
|
+
class Ne extends _ {
|
|
1442
1442
|
_parse(e) {
|
|
1443
1443
|
if (this._getType(e) !== p.null) {
|
|
1444
1444
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1451,7 +1451,7 @@ var Qn = ur((rs, pt) => {
|
|
|
1451
1451
|
return A(e.data);
|
|
1452
1452
|
}
|
|
1453
1453
|
}
|
|
1454
|
-
|
|
1454
|
+
Ne.create = (t) => new Ne({
|
|
1455
1455
|
typeName: m.ZodNull,
|
|
1456
1456
|
...v(t)
|
|
1457
1457
|
});
|
|
@@ -1493,7 +1493,7 @@ var Qn = ur((rs, pt) => {
|
|
|
1493
1493
|
typeName: m.ZodNever,
|
|
1494
1494
|
...v(t)
|
|
1495
1495
|
});
|
|
1496
|
-
class
|
|
1496
|
+
class We extends _ {
|
|
1497
1497
|
_parse(e) {
|
|
1498
1498
|
if (this._getType(e) !== p.undefined) {
|
|
1499
1499
|
const n = this._getOrReturnCtx(e);
|
|
@@ -1506,7 +1506,7 @@ var Qn = ur((rs, pt) => {
|
|
|
1506
1506
|
return A(e.data);
|
|
1507
1507
|
}
|
|
1508
1508
|
}
|
|
1509
|
-
|
|
1509
|
+
We.create = (t) => new We({
|
|
1510
1510
|
typeName: m.ZodVoid,
|
|
1511
1511
|
...v(t)
|
|
1512
1512
|
});
|
|
@@ -1862,7 +1862,7 @@ var Qn = ur((rs, pt) => {
|
|
|
1862
1862
|
});
|
|
1863
1863
|
}
|
|
1864
1864
|
keyof() {
|
|
1865
|
-
return
|
|
1865
|
+
return Zt(b.objectKeys(this.shape));
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
1868
|
E.create = (t, e) => new E({
|
|
@@ -1886,7 +1886,7 @@ var Qn = ur((rs, pt) => {
|
|
|
1886
1886
|
typeName: m.ZodObject,
|
|
1887
1887
|
...v(e)
|
|
1888
1888
|
});
|
|
1889
|
-
class
|
|
1889
|
+
class Re extends _ {
|
|
1890
1890
|
_parse(e) {
|
|
1891
1891
|
const { ctx: r } = this._processInputParams(e), n = this._def.options;
|
|
1892
1892
|
function s(a) {
|
|
@@ -1954,13 +1954,13 @@ var Qn = ur((rs, pt) => {
|
|
|
1954
1954
|
return this._def.options;
|
|
1955
1955
|
}
|
|
1956
1956
|
}
|
|
1957
|
-
|
|
1957
|
+
Re.create = (t, e) => new Re({
|
|
1958
1958
|
options: t,
|
|
1959
1959
|
typeName: m.ZodUnion,
|
|
1960
1960
|
...v(e)
|
|
1961
1961
|
});
|
|
1962
|
-
const z = (t) => t instanceof
|
|
1963
|
-
class
|
|
1962
|
+
const z = (t) => t instanceof Ie ? z(t.schema) : t instanceof $ ? z(t.innerType()) : t instanceof Pe ? [t.value] : t instanceof Y ? t.options : t instanceof Ze ? b.objectValues(t.enum) : t instanceof je ? z(t._def.innerType) : t instanceof Oe ? [void 0] : t instanceof Ne ? [null] : t instanceof M ? [void 0, ...z(t.unwrap())] : t instanceof K ? [null, ...z(t.unwrap())] : t instanceof gt || t instanceof Fe ? z(t.unwrap()) : t instanceof $e ? z(t._def.innerType) : [];
|
|
1963
|
+
class Qe extends _ {
|
|
1964
1964
|
_parse(e) {
|
|
1965
1965
|
const { ctx: r } = this._processInputParams(e);
|
|
1966
1966
|
if (r.parsedType !== p.object)
|
|
@@ -2013,7 +2013,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2013
2013
|
s.set(o, a);
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
2016
|
-
return new
|
|
2016
|
+
return new Qe({
|
|
2017
2017
|
typeName: m.ZodDiscriminatedUnion,
|
|
2018
2018
|
discriminator: e,
|
|
2019
2019
|
options: r,
|
|
@@ -2022,14 +2022,14 @@ var Qn = ur((rs, pt) => {
|
|
|
2022
2022
|
});
|
|
2023
2023
|
}
|
|
2024
2024
|
}
|
|
2025
|
-
function
|
|
2025
|
+
function dt(t, e) {
|
|
2026
2026
|
const r = q(t), n = q(e);
|
|
2027
2027
|
if (t === e)
|
|
2028
2028
|
return { valid: !0, data: t };
|
|
2029
2029
|
if (r === p.object && n === p.object) {
|
|
2030
2030
|
const s = b.objectKeys(e), a = b.objectKeys(t).filter((o) => s.indexOf(o) !== -1), i = { ...t, ...e };
|
|
2031
2031
|
for (const o of a) {
|
|
2032
|
-
const d =
|
|
2032
|
+
const d = dt(t[o], e[o]);
|
|
2033
2033
|
if (!d.valid)
|
|
2034
2034
|
return { valid: !1 };
|
|
2035
2035
|
i[o] = d.data;
|
|
@@ -2040,7 +2040,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2040
2040
|
return { valid: !1 };
|
|
2041
2041
|
const s = [];
|
|
2042
2042
|
for (let a = 0; a < t.length; a++) {
|
|
2043
|
-
const i = t[a], o = e[a], d =
|
|
2043
|
+
const i = t[a], o = e[a], d = dt(i, o);
|
|
2044
2044
|
if (!d.valid)
|
|
2045
2045
|
return { valid: !1 };
|
|
2046
2046
|
s.push(d.data);
|
|
@@ -2048,13 +2048,13 @@ var Qn = ur((rs, pt) => {
|
|
|
2048
2048
|
return { valid: !0, data: s };
|
|
2049
2049
|
} else return r === p.date && n === p.date && +t == +e ? { valid: !0, data: t } : { valid: !1 };
|
|
2050
2050
|
}
|
|
2051
|
-
class
|
|
2051
|
+
class Ae extends _ {
|
|
2052
2052
|
_parse(e) {
|
|
2053
2053
|
const { status: r, ctx: n } = this._processInputParams(e), s = (a, i) => {
|
|
2054
|
-
if (
|
|
2054
|
+
if (it(a) || it(i))
|
|
2055
2055
|
return y;
|
|
2056
|
-
const o =
|
|
2057
|
-
return o.valid ? ((
|
|
2056
|
+
const o = dt(a.value, i.value);
|
|
2057
|
+
return o.valid ? ((ot(a) || ot(i)) && r.dirty(), { status: r.value, value: o.data }) : (f(n, {
|
|
2058
2058
|
code: u.invalid_intersection_types
|
|
2059
2059
|
}), y);
|
|
2060
2060
|
};
|
|
@@ -2080,7 +2080,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2080
2080
|
}));
|
|
2081
2081
|
}
|
|
2082
2082
|
}
|
|
2083
|
-
|
|
2083
|
+
Ae.create = (t, e, r) => new Ae({
|
|
2084
2084
|
left: t,
|
|
2085
2085
|
right: e,
|
|
2086
2086
|
typeName: m.ZodIntersection,
|
|
@@ -2136,7 +2136,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2136
2136
|
...v(e)
|
|
2137
2137
|
});
|
|
2138
2138
|
};
|
|
2139
|
-
class
|
|
2139
|
+
class Ce extends _ {
|
|
2140
2140
|
get keySchema() {
|
|
2141
2141
|
return this._def.keyType;
|
|
2142
2142
|
}
|
|
@@ -2164,20 +2164,20 @@ var Qn = ur((rs, pt) => {
|
|
|
2164
2164
|
return this._def.valueType;
|
|
2165
2165
|
}
|
|
2166
2166
|
static create(e, r, n) {
|
|
2167
|
-
return r instanceof _ ? new
|
|
2167
|
+
return r instanceof _ ? new Ce({
|
|
2168
2168
|
keyType: e,
|
|
2169
2169
|
valueType: r,
|
|
2170
2170
|
typeName: m.ZodRecord,
|
|
2171
2171
|
...v(n)
|
|
2172
|
-
}) : new
|
|
2173
|
-
keyType:
|
|
2172
|
+
}) : new Ce({
|
|
2173
|
+
keyType: Z.create(),
|
|
2174
2174
|
valueType: e,
|
|
2175
2175
|
typeName: m.ZodRecord,
|
|
2176
2176
|
...v(r)
|
|
2177
2177
|
});
|
|
2178
2178
|
}
|
|
2179
2179
|
}
|
|
2180
|
-
class
|
|
2180
|
+
class Je extends _ {
|
|
2181
2181
|
get keySchema() {
|
|
2182
2182
|
return this._def.keyType;
|
|
2183
2183
|
}
|
|
@@ -2219,7 +2219,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2219
2219
|
}
|
|
2220
2220
|
}
|
|
2221
2221
|
}
|
|
2222
|
-
|
|
2222
|
+
Je.create = (t, e, r) => new Je({
|
|
2223
2223
|
valueType: e,
|
|
2224
2224
|
keyType: t,
|
|
2225
2225
|
typeName: m.ZodMap,
|
|
@@ -2302,13 +2302,13 @@ var Qn = ur((rs, pt) => {
|
|
|
2302
2302
|
received: r.parsedType
|
|
2303
2303
|
}), y;
|
|
2304
2304
|
function n(o, d) {
|
|
2305
|
-
return
|
|
2305
|
+
return qe({
|
|
2306
2306
|
data: o,
|
|
2307
2307
|
path: r.path,
|
|
2308
2308
|
errorMaps: [
|
|
2309
2309
|
r.common.contextualErrorMap,
|
|
2310
2310
|
r.schemaErrorMap,
|
|
2311
|
-
|
|
2311
|
+
ze(),
|
|
2312
2312
|
me
|
|
2313
2313
|
].filter((c) => !!c),
|
|
2314
2314
|
issueData: {
|
|
@@ -2318,13 +2318,13 @@ var Qn = ur((rs, pt) => {
|
|
|
2318
2318
|
});
|
|
2319
2319
|
}
|
|
2320
2320
|
function s(o, d) {
|
|
2321
|
-
return
|
|
2321
|
+
return qe({
|
|
2322
2322
|
data: o,
|
|
2323
2323
|
path: r.path,
|
|
2324
2324
|
errorMaps: [
|
|
2325
2325
|
r.common.contextualErrorMap,
|
|
2326
2326
|
r.schemaErrorMap,
|
|
2327
|
-
|
|
2327
|
+
ze(),
|
|
2328
2328
|
me
|
|
2329
2329
|
].filter((c) => !!c),
|
|
2330
2330
|
issueData: {
|
|
@@ -2390,7 +2390,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2390
2390
|
});
|
|
2391
2391
|
}
|
|
2392
2392
|
}
|
|
2393
|
-
class
|
|
2393
|
+
class Ie extends _ {
|
|
2394
2394
|
get schema() {
|
|
2395
2395
|
return this._def.getter();
|
|
2396
2396
|
}
|
|
@@ -2399,12 +2399,12 @@ var Qn = ur((rs, pt) => {
|
|
|
2399
2399
|
return this._def.getter()._parse({ data: r.data, path: r.path, parent: r });
|
|
2400
2400
|
}
|
|
2401
2401
|
}
|
|
2402
|
-
|
|
2402
|
+
Ie.create = (t, e) => new Ie({
|
|
2403
2403
|
getter: t,
|
|
2404
2404
|
typeName: m.ZodLazy,
|
|
2405
2405
|
...v(e)
|
|
2406
2406
|
});
|
|
2407
|
-
class
|
|
2407
|
+
class Pe extends _ {
|
|
2408
2408
|
_parse(e) {
|
|
2409
2409
|
if (e.data !== this._def.value) {
|
|
2410
2410
|
const r = this._getOrReturnCtx(e);
|
|
@@ -2420,12 +2420,12 @@ var Qn = ur((rs, pt) => {
|
|
|
2420
2420
|
return this._def.value;
|
|
2421
2421
|
}
|
|
2422
2422
|
}
|
|
2423
|
-
|
|
2423
|
+
Pe.create = (t, e) => new Pe({
|
|
2424
2424
|
value: t,
|
|
2425
2425
|
typeName: m.ZodLiteral,
|
|
2426
2426
|
...v(e)
|
|
2427
2427
|
});
|
|
2428
|
-
function
|
|
2428
|
+
function Zt(t, e) {
|
|
2429
2429
|
return new Y({
|
|
2430
2430
|
values: t,
|
|
2431
2431
|
typeName: m.ZodEnum,
|
|
@@ -2434,7 +2434,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2434
2434
|
}
|
|
2435
2435
|
class Y extends _ {
|
|
2436
2436
|
constructor() {
|
|
2437
|
-
super(...arguments),
|
|
2437
|
+
super(...arguments), be.set(this, void 0);
|
|
2438
2438
|
}
|
|
2439
2439
|
_parse(e) {
|
|
2440
2440
|
if (typeof e.data != "string") {
|
|
@@ -2445,7 +2445,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2445
2445
|
code: u.invalid_type
|
|
2446
2446
|
}), y;
|
|
2447
2447
|
}
|
|
2448
|
-
if (
|
|
2448
|
+
if (Be(this, be) || At(this, be, new Set(this._def.values)), !Be(this, be).has(e.data)) {
|
|
2449
2449
|
const r = this._getOrReturnCtx(e), n = this._def.values;
|
|
2450
2450
|
return f(r, {
|
|
2451
2451
|
received: r.data,
|
|
@@ -2489,11 +2489,11 @@ var Qn = ur((rs, pt) => {
|
|
|
2489
2489
|
});
|
|
2490
2490
|
}
|
|
2491
2491
|
}
|
|
2492
|
-
|
|
2493
|
-
Y.create =
|
|
2492
|
+
be = /* @__PURE__ */ new WeakMap();
|
|
2493
|
+
Y.create = Zt;
|
|
2494
2494
|
class Ze extends _ {
|
|
2495
2495
|
constructor() {
|
|
2496
|
-
super(...arguments),
|
|
2496
|
+
super(...arguments), ke.set(this, void 0);
|
|
2497
2497
|
}
|
|
2498
2498
|
_parse(e) {
|
|
2499
2499
|
const r = b.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
|
|
@@ -2505,7 +2505,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2505
2505
|
code: u.invalid_type
|
|
2506
2506
|
}), y;
|
|
2507
2507
|
}
|
|
2508
|
-
if (
|
|
2508
|
+
if (Be(this, ke) || At(this, ke, new Set(b.getValidEnumValues(this._def.values))), !Be(this, ke).has(e.data)) {
|
|
2509
2509
|
const s = b.objectValues(r);
|
|
2510
2510
|
return f(n, {
|
|
2511
2511
|
received: n.data,
|
|
@@ -2519,7 +2519,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2519
2519
|
return this._def.values;
|
|
2520
2520
|
}
|
|
2521
2521
|
}
|
|
2522
|
-
|
|
2522
|
+
ke = /* @__PURE__ */ new WeakMap();
|
|
2523
2523
|
Ze.create = (t, e) => new Ze({
|
|
2524
2524
|
values: t,
|
|
2525
2525
|
typeName: m.ZodNativeEnum,
|
|
@@ -2664,7 +2664,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2664
2664
|
typeName: m.ZodNullable,
|
|
2665
2665
|
...v(e)
|
|
2666
2666
|
});
|
|
2667
|
-
class
|
|
2667
|
+
class je extends _ {
|
|
2668
2668
|
_parse(e) {
|
|
2669
2669
|
const { ctx: r } = this._processInputParams(e);
|
|
2670
2670
|
let n = r.data;
|
|
@@ -2678,13 +2678,13 @@ var Qn = ur((rs, pt) => {
|
|
|
2678
2678
|
return this._def.innerType;
|
|
2679
2679
|
}
|
|
2680
2680
|
}
|
|
2681
|
-
|
|
2681
|
+
je.create = (t, e) => new je({
|
|
2682
2682
|
innerType: t,
|
|
2683
2683
|
typeName: m.ZodDefault,
|
|
2684
2684
|
defaultValue: typeof e.default == "function" ? e.default : () => e.default,
|
|
2685
2685
|
...v(e)
|
|
2686
2686
|
});
|
|
2687
|
-
class
|
|
2687
|
+
class $e extends _ {
|
|
2688
2688
|
_parse(e) {
|
|
2689
2689
|
const { ctx: r } = this._processInputParams(e), n = {
|
|
2690
2690
|
...r,
|
|
@@ -2699,7 +2699,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2699
2699
|
...n
|
|
2700
2700
|
}
|
|
2701
2701
|
});
|
|
2702
|
-
return
|
|
2702
|
+
return Se(s) ? s.then((a) => ({
|
|
2703
2703
|
status: "valid",
|
|
2704
2704
|
value: a.status === "valid" ? a.value : this._def.catchValue({
|
|
2705
2705
|
get error() {
|
|
@@ -2721,13 +2721,13 @@ var Qn = ur((rs, pt) => {
|
|
|
2721
2721
|
return this._def.innerType;
|
|
2722
2722
|
}
|
|
2723
2723
|
}
|
|
2724
|
-
|
|
2724
|
+
$e.create = (t, e) => new $e({
|
|
2725
2725
|
innerType: t,
|
|
2726
2726
|
typeName: m.ZodCatch,
|
|
2727
2727
|
catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
|
|
2728
2728
|
...v(e)
|
|
2729
2729
|
});
|
|
2730
|
-
class
|
|
2730
|
+
class Ye extends _ {
|
|
2731
2731
|
_parse(e) {
|
|
2732
2732
|
if (this._getType(e) !== p.nan) {
|
|
2733
2733
|
const n = this._getOrReturnCtx(e);
|
|
@@ -2740,12 +2740,12 @@ var Qn = ur((rs, pt) => {
|
|
|
2740
2740
|
return { status: "valid", value: e.data };
|
|
2741
2741
|
}
|
|
2742
2742
|
}
|
|
2743
|
-
|
|
2743
|
+
Ye.create = (t) => new Ye({
|
|
2744
2744
|
typeName: m.ZodNaN,
|
|
2745
2745
|
...v(t)
|
|
2746
2746
|
});
|
|
2747
|
-
const
|
|
2748
|
-
class
|
|
2747
|
+
const Mr = Symbol("zod_brand");
|
|
2748
|
+
class gt extends _ {
|
|
2749
2749
|
_parse(e) {
|
|
2750
2750
|
const { ctx: r } = this._processInputParams(e), n = r.data;
|
|
2751
2751
|
return this._def.type._parse({
|
|
@@ -2758,7 +2758,7 @@ var Qn = ur((rs, pt) => {
|
|
|
2758
2758
|
return this._def.type;
|
|
2759
2759
|
}
|
|
2760
2760
|
}
|
|
2761
|
-
class
|
|
2761
|
+
class Me extends _ {
|
|
2762
2762
|
_parse(e) {
|
|
2763
2763
|
const { status: r, ctx: n } = this._processInputParams(e);
|
|
2764
2764
|
if (n.common.async)
|
|
@@ -2791,32 +2791,32 @@ var Qn = ur((rs, pt) => {
|
|
|
2791
2791
|
}
|
|
2792
2792
|
}
|
|
2793
2793
|
static create(e, r) {
|
|
2794
|
-
return new
|
|
2794
|
+
return new Me({
|
|
2795
2795
|
in: e,
|
|
2796
2796
|
out: r,
|
|
2797
2797
|
typeName: m.ZodPipeline
|
|
2798
2798
|
});
|
|
2799
2799
|
}
|
|
2800
2800
|
}
|
|
2801
|
-
class
|
|
2801
|
+
class Fe extends _ {
|
|
2802
2802
|
_parse(e) {
|
|
2803
2803
|
const r = this._def.innerType._parse(e), n = (s) => (se(s) && (s.value = Object.freeze(s.value)), s);
|
|
2804
|
-
return
|
|
2804
|
+
return Se(r) ? r.then((s) => n(s)) : n(r);
|
|
2805
2805
|
}
|
|
2806
2806
|
unwrap() {
|
|
2807
2807
|
return this._def.innerType;
|
|
2808
2808
|
}
|
|
2809
2809
|
}
|
|
2810
|
-
|
|
2810
|
+
Fe.create = (t, e) => new Fe({
|
|
2811
2811
|
innerType: t,
|
|
2812
2812
|
typeName: m.ZodReadonly,
|
|
2813
2813
|
...v(e)
|
|
2814
2814
|
});
|
|
2815
|
-
function
|
|
2815
|
+
function Tt(t, e) {
|
|
2816
2816
|
const r = typeof t == "function" ? t(e) : typeof t == "string" ? { message: t } : t;
|
|
2817
2817
|
return typeof r == "string" ? { message: r } : r;
|
|
2818
2818
|
}
|
|
2819
|
-
function
|
|
2819
|
+
function jt(t, e = {}, r) {
|
|
2820
2820
|
return t ? ye.create().superRefine((n, s) => {
|
|
2821
2821
|
var a, i;
|
|
2822
2822
|
const o = t(n);
|
|
@@ -2824,85 +2824,85 @@ var Qn = ur((rs, pt) => {
|
|
|
2824
2824
|
return o.then((d) => {
|
|
2825
2825
|
var c, l;
|
|
2826
2826
|
if (!d) {
|
|
2827
|
-
const w =
|
|
2827
|
+
const w = Tt(e, n), x = (l = (c = w.fatal) !== null && c !== void 0 ? c : r) !== null && l !== void 0 ? l : !0;
|
|
2828
2828
|
s.addIssue({ code: "custom", ...w, fatal: x });
|
|
2829
2829
|
}
|
|
2830
2830
|
});
|
|
2831
2831
|
if (!o) {
|
|
2832
|
-
const d =
|
|
2832
|
+
const d = Tt(e, n), c = (i = (a = d.fatal) !== null && a !== void 0 ? a : r) !== null && i !== void 0 ? i : !0;
|
|
2833
2833
|
s.addIssue({ code: "custom", ...d, fatal: c });
|
|
2834
2834
|
}
|
|
2835
2835
|
}) : ye.create();
|
|
2836
2836
|
}
|
|
2837
|
-
const
|
|
2837
|
+
const Lr = {
|
|
2838
2838
|
object: E.lazycreate
|
|
2839
2839
|
};
|
|
2840
2840
|
var m;
|
|
2841
2841
|
(function(t) {
|
|
2842
2842
|
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";
|
|
2843
2843
|
})(m || (m = {}));
|
|
2844
|
-
const
|
|
2844
|
+
const Dr = (t, e = {
|
|
2845
2845
|
message: `Input not instance of ${t.name}`
|
|
2846
|
-
}) =>
|
|
2847
|
-
string: (t) =>
|
|
2846
|
+
}) => jt((r) => r instanceof t, e), $t = Z.create, Ft = W.create, Vr = Ye.create, Ur = J.create, Mt = Ee.create, zr = ae.create, qr = He.create, Br = Oe.create, Hr = Ne.create, Wr = ye.create, Jr = ne.create, Yr = B.create, Kr = We.create, Gr = j.create, Xr = E.create, Qr = E.strictCreate, en = Re.create, tn = Qe.create, rn = Ae.create, nn = D.create, sn = Ce.create, an = Je.create, on = ie.create, dn = he.create, cn = Ie.create, un = Pe.create, ln = Y.create, fn = Ze.create, pn = ge.create, St = $.create, hn = M.create, mn = K.create, yn = $.createWithPreprocess, gn = Me.create, vn = () => $t().optional(), _n = () => Ft().optional(), wn = () => Mt().optional(), bn = {
|
|
2847
|
+
string: (t) => Z.create({ ...t, coerce: !0 }),
|
|
2848
2848
|
number: (t) => W.create({ ...t, coerce: !0 }),
|
|
2849
|
-
boolean: (t) =>
|
|
2849
|
+
boolean: (t) => Ee.create({
|
|
2850
2850
|
...t,
|
|
2851
2851
|
coerce: !0
|
|
2852
2852
|
}),
|
|
2853
2853
|
bigint: (t) => J.create({ ...t, coerce: !0 }),
|
|
2854
2854
|
date: (t) => ae.create({ ...t, coerce: !0 })
|
|
2855
|
-
},
|
|
2856
|
-
var
|
|
2855
|
+
}, kn = y;
|
|
2856
|
+
var Et = /* @__PURE__ */ Object.freeze({
|
|
2857
2857
|
__proto__: null,
|
|
2858
2858
|
defaultErrorMap: me,
|
|
2859
|
-
setErrorMap:
|
|
2860
|
-
getErrorMap:
|
|
2861
|
-
makeIssue:
|
|
2862
|
-
EMPTY_PATH:
|
|
2859
|
+
setErrorMap: mr,
|
|
2860
|
+
getErrorMap: ze,
|
|
2861
|
+
makeIssue: qe,
|
|
2862
|
+
EMPTY_PATH: yr,
|
|
2863
2863
|
addIssueToContext: f,
|
|
2864
2864
|
ParseStatus: R,
|
|
2865
2865
|
INVALID: y,
|
|
2866
2866
|
DIRTY: pe,
|
|
2867
2867
|
OK: A,
|
|
2868
|
-
isAborted:
|
|
2869
|
-
isDirty:
|
|
2868
|
+
isAborted: it,
|
|
2869
|
+
isDirty: ot,
|
|
2870
2870
|
isValid: se,
|
|
2871
|
-
isAsync:
|
|
2871
|
+
isAsync: Se,
|
|
2872
2872
|
get util() {
|
|
2873
2873
|
return b;
|
|
2874
2874
|
},
|
|
2875
2875
|
get objectUtil() {
|
|
2876
|
-
return
|
|
2876
|
+
return at;
|
|
2877
2877
|
},
|
|
2878
2878
|
ZodParsedType: p,
|
|
2879
2879
|
getParsedType: q,
|
|
2880
2880
|
ZodType: _,
|
|
2881
|
-
datetimeRegex:
|
|
2882
|
-
ZodString:
|
|
2881
|
+
datetimeRegex: Pt,
|
|
2882
|
+
ZodString: Z,
|
|
2883
2883
|
ZodNumber: W,
|
|
2884
2884
|
ZodBigInt: J,
|
|
2885
|
-
ZodBoolean:
|
|
2885
|
+
ZodBoolean: Ee,
|
|
2886
2886
|
ZodDate: ae,
|
|
2887
|
-
ZodSymbol:
|
|
2888
|
-
ZodUndefined:
|
|
2889
|
-
ZodNull:
|
|
2887
|
+
ZodSymbol: He,
|
|
2888
|
+
ZodUndefined: Oe,
|
|
2889
|
+
ZodNull: Ne,
|
|
2890
2890
|
ZodAny: ye,
|
|
2891
2891
|
ZodUnknown: ne,
|
|
2892
2892
|
ZodNever: B,
|
|
2893
|
-
ZodVoid:
|
|
2893
|
+
ZodVoid: We,
|
|
2894
2894
|
ZodArray: j,
|
|
2895
2895
|
ZodObject: E,
|
|
2896
|
-
ZodUnion:
|
|
2897
|
-
ZodDiscriminatedUnion:
|
|
2898
|
-
ZodIntersection:
|
|
2896
|
+
ZodUnion: Re,
|
|
2897
|
+
ZodDiscriminatedUnion: Qe,
|
|
2898
|
+
ZodIntersection: Ae,
|
|
2899
2899
|
ZodTuple: D,
|
|
2900
|
-
ZodRecord:
|
|
2901
|
-
ZodMap:
|
|
2900
|
+
ZodRecord: Ce,
|
|
2901
|
+
ZodMap: Je,
|
|
2902
2902
|
ZodSet: ie,
|
|
2903
2903
|
ZodFunction: he,
|
|
2904
|
-
ZodLazy:
|
|
2905
|
-
ZodLiteral:
|
|
2904
|
+
ZodLazy: Ie,
|
|
2905
|
+
ZodLiteral: Pe,
|
|
2906
2906
|
ZodEnum: Y,
|
|
2907
2907
|
ZodNativeEnum: Ze,
|
|
2908
2908
|
ZodPromise: ge,
|
|
@@ -2910,77 +2910,77 @@ var Qn = ur((rs, pt) => {
|
|
|
2910
2910
|
ZodTransformer: $,
|
|
2911
2911
|
ZodOptional: M,
|
|
2912
2912
|
ZodNullable: K,
|
|
2913
|
-
ZodDefault:
|
|
2914
|
-
ZodCatch:
|
|
2915
|
-
ZodNaN:
|
|
2916
|
-
BRAND:
|
|
2917
|
-
ZodBranded:
|
|
2918
|
-
ZodPipeline:
|
|
2919
|
-
ZodReadonly:
|
|
2920
|
-
custom:
|
|
2913
|
+
ZodDefault: je,
|
|
2914
|
+
ZodCatch: $e,
|
|
2915
|
+
ZodNaN: Ye,
|
|
2916
|
+
BRAND: Mr,
|
|
2917
|
+
ZodBranded: gt,
|
|
2918
|
+
ZodPipeline: Me,
|
|
2919
|
+
ZodReadonly: Fe,
|
|
2920
|
+
custom: jt,
|
|
2921
2921
|
Schema: _,
|
|
2922
2922
|
ZodSchema: _,
|
|
2923
|
-
late:
|
|
2923
|
+
late: Lr,
|
|
2924
2924
|
get ZodFirstPartyTypeKind() {
|
|
2925
2925
|
return m;
|
|
2926
2926
|
},
|
|
2927
|
-
coerce:
|
|
2928
|
-
any:
|
|
2929
|
-
array:
|
|
2930
|
-
bigint:
|
|
2931
|
-
boolean:
|
|
2932
|
-
date:
|
|
2933
|
-
discriminatedUnion:
|
|
2934
|
-
effect:
|
|
2935
|
-
enum:
|
|
2936
|
-
function:
|
|
2937
|
-
instanceof:
|
|
2938
|
-
intersection:
|
|
2939
|
-
lazy:
|
|
2940
|
-
literal:
|
|
2941
|
-
map:
|
|
2942
|
-
nan:
|
|
2943
|
-
nativeEnum:
|
|
2944
|
-
never:
|
|
2945
|
-
null:
|
|
2946
|
-
nullable:
|
|
2947
|
-
number:
|
|
2948
|
-
object:
|
|
2949
|
-
oboolean:
|
|
2950
|
-
onumber:
|
|
2951
|
-
optional:
|
|
2952
|
-
ostring:
|
|
2953
|
-
pipeline:
|
|
2954
|
-
preprocess:
|
|
2955
|
-
promise:
|
|
2956
|
-
record:
|
|
2957
|
-
set:
|
|
2958
|
-
strictObject:
|
|
2959
|
-
string:
|
|
2960
|
-
symbol:
|
|
2961
|
-
transformer:
|
|
2962
|
-
tuple:
|
|
2963
|
-
undefined:
|
|
2964
|
-
union:
|
|
2965
|
-
unknown:
|
|
2966
|
-
void:
|
|
2967
|
-
NEVER:
|
|
2927
|
+
coerce: bn,
|
|
2928
|
+
any: Wr,
|
|
2929
|
+
array: Gr,
|
|
2930
|
+
bigint: Ur,
|
|
2931
|
+
boolean: Mt,
|
|
2932
|
+
date: zr,
|
|
2933
|
+
discriminatedUnion: tn,
|
|
2934
|
+
effect: St,
|
|
2935
|
+
enum: ln,
|
|
2936
|
+
function: dn,
|
|
2937
|
+
instanceof: Dr,
|
|
2938
|
+
intersection: rn,
|
|
2939
|
+
lazy: cn,
|
|
2940
|
+
literal: un,
|
|
2941
|
+
map: an,
|
|
2942
|
+
nan: Vr,
|
|
2943
|
+
nativeEnum: fn,
|
|
2944
|
+
never: Yr,
|
|
2945
|
+
null: Hr,
|
|
2946
|
+
nullable: mn,
|
|
2947
|
+
number: Ft,
|
|
2948
|
+
object: Xr,
|
|
2949
|
+
oboolean: wn,
|
|
2950
|
+
onumber: _n,
|
|
2951
|
+
optional: hn,
|
|
2952
|
+
ostring: vn,
|
|
2953
|
+
pipeline: gn,
|
|
2954
|
+
preprocess: yn,
|
|
2955
|
+
promise: pn,
|
|
2956
|
+
record: sn,
|
|
2957
|
+
set: on,
|
|
2958
|
+
strictObject: Qr,
|
|
2959
|
+
string: $t,
|
|
2960
|
+
symbol: qr,
|
|
2961
|
+
transformer: St,
|
|
2962
|
+
tuple: nn,
|
|
2963
|
+
undefined: Br,
|
|
2964
|
+
union: en,
|
|
2965
|
+
unknown: Jr,
|
|
2966
|
+
void: Kr,
|
|
2967
|
+
NEVER: kn,
|
|
2968
2968
|
ZodIssueCode: u,
|
|
2969
|
-
quotelessJson:
|
|
2969
|
+
quotelessJson: hr,
|
|
2970
2970
|
ZodError: I
|
|
2971
2971
|
});
|
|
2972
|
-
const
|
|
2973
|
-
detail:
|
|
2972
|
+
const ct = Et.object({
|
|
2973
|
+
detail: Et.string()
|
|
2974
2974
|
});
|
|
2975
|
-
function
|
|
2975
|
+
function xn(t) {
|
|
2976
2976
|
if (!t)
|
|
2977
2977
|
return "Unknown error";
|
|
2978
2978
|
if (t instanceof Error) {
|
|
2979
|
-
const e =
|
|
2980
|
-
return e.success ? e.data.detail :
|
|
2979
|
+
const e = ct.safeParse(t.cause);
|
|
2980
|
+
return e.success ? e.data.detail : Tn(t.message);
|
|
2981
2981
|
}
|
|
2982
2982
|
if (typeof t == "object") {
|
|
2983
|
-
const e =
|
|
2983
|
+
const e = ct.safeParse(t);
|
|
2984
2984
|
if (e.success)
|
|
2985
2985
|
return e.data.detail;
|
|
2986
2986
|
}
|
|
@@ -2990,26 +2990,26 @@ var Qn = ur((rs, pt) => {
|
|
|
2990
2990
|
return String(t);
|
|
2991
2991
|
}
|
|
2992
2992
|
}
|
|
2993
|
-
function
|
|
2994
|
-
const e =
|
|
2993
|
+
function Tn(t) {
|
|
2994
|
+
const e = Sn(t);
|
|
2995
2995
|
if (!e)
|
|
2996
2996
|
return t;
|
|
2997
|
-
const r =
|
|
2997
|
+
const r = ct.safeParse(e);
|
|
2998
2998
|
return r.success ? r.data.detail : t;
|
|
2999
2999
|
}
|
|
3000
|
-
function
|
|
3000
|
+
function Sn(t) {
|
|
3001
3001
|
try {
|
|
3002
3002
|
return JSON.parse(t);
|
|
3003
3003
|
} catch {
|
|
3004
3004
|
return t;
|
|
3005
3005
|
}
|
|
3006
3006
|
}
|
|
3007
|
-
const
|
|
3008
|
-
function
|
|
3007
|
+
const En = 1e10, On = 1e3;
|
|
3008
|
+
function De(t, e) {
|
|
3009
3009
|
const r = t.map((n) => `"${n}"`).join(", ");
|
|
3010
3010
|
return new Error(`This RPC instance cannot ${e} because the transport did not provide one or more of these methods: ${r}`);
|
|
3011
3011
|
}
|
|
3012
|
-
function
|
|
3012
|
+
function Nn(t = {}) {
|
|
3013
3013
|
let e = {};
|
|
3014
3014
|
function r(g) {
|
|
3015
3015
|
e = g;
|
|
@@ -3017,7 +3017,7 @@ var Qn = ur((rs, pt) => {
|
|
|
3017
3017
|
let n = {};
|
|
3018
3018
|
function s(g) {
|
|
3019
3019
|
var T;
|
|
3020
|
-
n.unregisterHandler && n.unregisterHandler(), n = g, (T = n.registerHandler) == null || T.call(n,
|
|
3020
|
+
n.unregisterHandler && n.unregisterHandler(), n = g, (T = n.registerHandler) == null || T.call(n, fr);
|
|
3021
3021
|
}
|
|
3022
3022
|
let a;
|
|
3023
3023
|
function i(g) {
|
|
@@ -3035,11 +3035,11 @@ var Qn = ur((rs, pt) => {
|
|
|
3035
3035
|
return N(T, O);
|
|
3036
3036
|
};
|
|
3037
3037
|
}
|
|
3038
|
-
const { maxRequestTime: o =
|
|
3038
|
+
const { maxRequestTime: o = On } = t;
|
|
3039
3039
|
t.transport && s(t.transport), t.requestHandler && i(t.requestHandler), t._debugHooks && r(t._debugHooks);
|
|
3040
3040
|
let d = 0;
|
|
3041
3041
|
function c() {
|
|
3042
|
-
return d <=
|
|
3042
|
+
return d <= En ? ++d : d = 0;
|
|
3043
3043
|
}
|
|
3044
3044
|
const l = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map();
|
|
3045
3045
|
function x(g, ...T) {
|
|
@@ -3047,7 +3047,7 @@ var Qn = ur((rs, pt) => {
|
|
|
3047
3047
|
return new Promise((S, N) => {
|
|
3048
3048
|
var oe;
|
|
3049
3049
|
if (!n.send)
|
|
3050
|
-
throw
|
|
3050
|
+
throw De(["send"], "make requests");
|
|
3051
3051
|
const F = c(), Q = {
|
|
3052
3052
|
type: "request",
|
|
3053
3053
|
id: F,
|
|
@@ -3062,11 +3062,11 @@ var Qn = ur((rs, pt) => {
|
|
|
3062
3062
|
const C = new Proxy(x, {
|
|
3063
3063
|
get: (g, T, O) => T in g ? Reflect.get(g, T, O) : (S) => x(T, S)
|
|
3064
3064
|
}), U = C;
|
|
3065
|
-
function
|
|
3065
|
+
function Le(g, ...T) {
|
|
3066
3066
|
var N;
|
|
3067
3067
|
const O = T[0];
|
|
3068
3068
|
if (!n.send)
|
|
3069
|
-
throw
|
|
3069
|
+
throw De(["send"], "send messages");
|
|
3070
3070
|
const S = {
|
|
3071
3071
|
type: "message",
|
|
3072
3072
|
id: g,
|
|
@@ -3074,34 +3074,34 @@ var Qn = ur((rs, pt) => {
|
|
|
3074
3074
|
};
|
|
3075
3075
|
(N = e.onSend) == null || N.call(e, S), n.send(S);
|
|
3076
3076
|
}
|
|
3077
|
-
const
|
|
3078
|
-
get: (g, T, O) => T in g ? Reflect.get(g, T, O) : (S) =>
|
|
3079
|
-
}),
|
|
3080
|
-
function
|
|
3077
|
+
const bt = new Proxy(Le, {
|
|
3078
|
+
get: (g, T, O) => T in g ? Reflect.get(g, T, O) : (S) => Le(T, S)
|
|
3079
|
+
}), kt = bt, X = /* @__PURE__ */ new Map(), tt = /* @__PURE__ */ new Set();
|
|
3080
|
+
function ur(g, T) {
|
|
3081
3081
|
var O;
|
|
3082
3082
|
if (!n.registerHandler)
|
|
3083
|
-
throw
|
|
3083
|
+
throw De(["registerHandler"], "register message listeners");
|
|
3084
3084
|
if (g === "*") {
|
|
3085
|
-
|
|
3085
|
+
tt.add(T);
|
|
3086
3086
|
return;
|
|
3087
3087
|
}
|
|
3088
3088
|
X.has(g) || X.set(g, /* @__PURE__ */ new Set()), (O = X.get(g)) == null || O.add(T);
|
|
3089
3089
|
}
|
|
3090
|
-
function
|
|
3090
|
+
function lr(g, T) {
|
|
3091
3091
|
var O, S;
|
|
3092
3092
|
if (g === "*") {
|
|
3093
|
-
|
|
3093
|
+
tt.delete(T);
|
|
3094
3094
|
return;
|
|
3095
3095
|
}
|
|
3096
3096
|
(O = X.get(g)) == null || O.delete(T), ((S = X.get(g)) == null ? void 0 : S.size) === 0 && X.delete(g);
|
|
3097
3097
|
}
|
|
3098
|
-
async function
|
|
3098
|
+
async function fr(g) {
|
|
3099
3099
|
var T, O;
|
|
3100
3100
|
if ((T = e.onReceive) == null || T.call(e, g), !("type" in g))
|
|
3101
3101
|
throw new Error("Message does not contain a type.");
|
|
3102
3102
|
if (g.type === "request") {
|
|
3103
3103
|
if (!n.send || !a)
|
|
3104
|
-
throw
|
|
3104
|
+
throw De(["send", "requestHandler"], "handle requests");
|
|
3105
3105
|
const { id: S, method: N, params: F } = g;
|
|
3106
3106
|
let Q;
|
|
3107
3107
|
try {
|
|
@@ -3132,7 +3132,7 @@ var Qn = ur((rs, pt) => {
|
|
|
3132
3132
|
return;
|
|
3133
3133
|
}
|
|
3134
3134
|
if (g.type === "message") {
|
|
3135
|
-
for (const N of
|
|
3135
|
+
for (const N of tt)
|
|
3136
3136
|
N(g.id, g.payload);
|
|
3137
3137
|
const S = X.get(g.id);
|
|
3138
3138
|
if (!S)
|
|
@@ -3148,44 +3148,44 @@ var Qn = ur((rs, pt) => {
|
|
|
3148
3148
|
setRequestHandler: i,
|
|
3149
3149
|
request: C,
|
|
3150
3150
|
requestProxy: U,
|
|
3151
|
-
send:
|
|
3152
|
-
sendProxy:
|
|
3153
|
-
addMessageListener:
|
|
3154
|
-
removeMessageListener:
|
|
3155
|
-
proxy: { send:
|
|
3151
|
+
send: bt,
|
|
3152
|
+
sendProxy: kt,
|
|
3153
|
+
addMessageListener: ur,
|
|
3154
|
+
removeMessageListener: lr,
|
|
3155
|
+
proxy: { send: kt, request: U },
|
|
3156
3156
|
_setDebugHooks: r
|
|
3157
3157
|
};
|
|
3158
3158
|
}
|
|
3159
|
-
function
|
|
3160
|
-
return
|
|
3159
|
+
function Rn(t) {
|
|
3160
|
+
return Nn(t);
|
|
3161
3161
|
}
|
|
3162
|
-
const
|
|
3163
|
-
function
|
|
3162
|
+
const Lt = "[transport-id]";
|
|
3163
|
+
function An(t, e) {
|
|
3164
3164
|
const { transportId: r } = e;
|
|
3165
|
-
return r != null ? { [
|
|
3165
|
+
return r != null ? { [Lt]: r, data: t } : t;
|
|
3166
3166
|
}
|
|
3167
|
-
function
|
|
3167
|
+
function Cn(t, e) {
|
|
3168
3168
|
const { transportId: r, filter: n } = e, s = n == null ? void 0 : n();
|
|
3169
3169
|
if (r != null && s != null)
|
|
3170
3170
|
throw new Error("Cannot use both `transportId` and `filter` at the same time");
|
|
3171
3171
|
let a = t;
|
|
3172
3172
|
if (r) {
|
|
3173
|
-
if (t[
|
|
3173
|
+
if (t[Lt] !== r)
|
|
3174
3174
|
return [!0];
|
|
3175
3175
|
a = t.data;
|
|
3176
3176
|
}
|
|
3177
3177
|
return s === !1 ? [!0] : [!1, a];
|
|
3178
3178
|
}
|
|
3179
|
-
function
|
|
3179
|
+
function In(t, e = {}) {
|
|
3180
3180
|
const { transportId: r, filter: n, remotePort: s } = e, a = t, i = s ?? t;
|
|
3181
3181
|
let o;
|
|
3182
3182
|
return {
|
|
3183
3183
|
send(d) {
|
|
3184
|
-
i.postMessage(
|
|
3184
|
+
i.postMessage(An(d, { transportId: r }));
|
|
3185
3185
|
},
|
|
3186
3186
|
registerHandler(d) {
|
|
3187
3187
|
o = (c) => {
|
|
3188
|
-
const l = c.data, [w, x] =
|
|
3188
|
+
const l = c.data, [w, x] = Cn(l, {
|
|
3189
3189
|
transportId: r,
|
|
3190
3190
|
filter: () => n == null ? void 0 : n(c)
|
|
3191
3191
|
});
|
|
@@ -3197,10 +3197,24 @@ var Qn = ur((rs, pt) => {
|
|
|
3197
3197
|
}
|
|
3198
3198
|
};
|
|
3199
3199
|
}
|
|
3200
|
-
function
|
|
3201
|
-
return
|
|
3200
|
+
function Pn(t) {
|
|
3201
|
+
return In(self, t);
|
|
3202
3202
|
}
|
|
3203
|
-
const
|
|
3203
|
+
const ve = {
|
|
3204
|
+
NOOP: () => {
|
|
3205
|
+
}
|
|
3206
|
+
}, Dt = (t, e) => {
|
|
3207
|
+
const r = `[${t}]`;
|
|
3208
|
+
return {
|
|
3209
|
+
debug: (...n) => e.debug(r, ...n),
|
|
3210
|
+
log: (...n) => e.log(r, ...n),
|
|
3211
|
+
warn: (...n) => e.warn(r, ...n),
|
|
3212
|
+
error: (...n) => e.error(r, ...n),
|
|
3213
|
+
trace: (...n) => e.trace(r, ...n),
|
|
3214
|
+
get: (n) => Dt(`${t}.${n}`, e),
|
|
3215
|
+
disabled: (n = !0) => n ? Ge : e
|
|
3216
|
+
};
|
|
3217
|
+
}, Ke = {
|
|
3204
3218
|
debug: (...t) => {
|
|
3205
3219
|
console.debug(...t);
|
|
3206
3220
|
},
|
|
@@ -3215,36 +3229,46 @@ var Qn = ur((rs, pt) => {
|
|
|
3215
3229
|
},
|
|
3216
3230
|
trace: (...t) => {
|
|
3217
3231
|
console.trace(...t);
|
|
3218
|
-
}
|
|
3232
|
+
},
|
|
3233
|
+
get: (t) => Dt(t, Ke),
|
|
3234
|
+
disabled: (t = !0) => t ? Ge : Ke
|
|
3235
|
+
}, Ge = {
|
|
3236
|
+
debug: () => ve.NOOP,
|
|
3237
|
+
log: () => ve.NOOP,
|
|
3238
|
+
warn: () => ve.NOOP,
|
|
3239
|
+
error: () => ve.NOOP,
|
|
3240
|
+
trace: () => ve.NOOP,
|
|
3241
|
+
get: () => Ge,
|
|
3242
|
+
disabled: () => Ge
|
|
3219
3243
|
};
|
|
3220
|
-
function
|
|
3221
|
-
return typeof window < "u" && window.Logger ||
|
|
3244
|
+
function Zn() {
|
|
3245
|
+
return typeof window < "u" && window.Logger || Ke;
|
|
3222
3246
|
}
|
|
3223
|
-
const
|
|
3224
|
-
var
|
|
3247
|
+
const xe = Zn(), jn = "marimo-transport";
|
|
3248
|
+
var $n = Object.defineProperty, k = (t, e) => $n(t, "name", { value: e, configurable: !0 }), Vt = ((t) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(t, { get: (e, r) => (typeof require < "u" ? require : e)[r] }) : t)(function(t) {
|
|
3225
3249
|
if (typeof require < "u") return require.apply(this, arguments);
|
|
3226
3250
|
throw new Error('Dynamic require of "' + t + '" is not supported');
|
|
3227
3251
|
});
|
|
3228
|
-
function
|
|
3252
|
+
function Ut(t) {
|
|
3229
3253
|
return !isNaN(parseFloat(t)) && isFinite(t);
|
|
3230
3254
|
}
|
|
3231
|
-
k(
|
|
3255
|
+
k(Ut, "_isNumber");
|
|
3232
3256
|
function G(t) {
|
|
3233
3257
|
return t.charAt(0).toUpperCase() + t.substring(1);
|
|
3234
3258
|
}
|
|
3235
3259
|
k(G, "_capitalize");
|
|
3236
|
-
function
|
|
3260
|
+
function et(t) {
|
|
3237
3261
|
return function() {
|
|
3238
3262
|
return this[t];
|
|
3239
3263
|
};
|
|
3240
3264
|
}
|
|
3241
|
-
k(
|
|
3242
|
-
var ce = ["isConstructor", "isEval", "isNative", "isToplevel"], ue = ["columnNumber", "lineNumber"], le = ["fileName", "functionName", "source"],
|
|
3243
|
-
function
|
|
3244
|
-
if (t) for (var e = 0; e <
|
|
3265
|
+
k(et, "_getter");
|
|
3266
|
+
var ce = ["isConstructor", "isEval", "isNative", "isToplevel"], ue = ["columnNumber", "lineNumber"], le = ["fileName", "functionName", "source"], Fn = ["args"], Mn = ["evalOrigin"], Ve = ce.concat(ue, le, Fn, Mn);
|
|
3267
|
+
function P(t) {
|
|
3268
|
+
if (t) for (var e = 0; e < Ve.length; e++) t[Ve[e]] !== void 0 && this["set" + G(Ve[e])](t[Ve[e]]);
|
|
3245
3269
|
}
|
|
3246
|
-
k(
|
|
3247
|
-
|
|
3270
|
+
k(P, "StackFrame");
|
|
3271
|
+
P.prototype = { getArgs: function() {
|
|
3248
3272
|
return this.args;
|
|
3249
3273
|
}, setArgs: function(t) {
|
|
3250
3274
|
if (Object.prototype.toString.call(t) !== "[object Array]") throw new TypeError("Args must be an Array");
|
|
@@ -3252,38 +3276,38 @@ var Qn = ur((rs, pt) => {
|
|
|
3252
3276
|
}, getEvalOrigin: function() {
|
|
3253
3277
|
return this.evalOrigin;
|
|
3254
3278
|
}, setEvalOrigin: function(t) {
|
|
3255
|
-
if (t instanceof
|
|
3256
|
-
else if (t instanceof Object) this.evalOrigin = new
|
|
3279
|
+
if (t instanceof P) this.evalOrigin = t;
|
|
3280
|
+
else if (t instanceof Object) this.evalOrigin = new P(t);
|
|
3257
3281
|
else throw new TypeError("Eval Origin must be an Object or StackFrame");
|
|
3258
3282
|
}, toString: function() {
|
|
3259
3283
|
var t = this.getFileName() || "", e = this.getLineNumber() || "", r = this.getColumnNumber() || "", n = this.getFunctionName() || "";
|
|
3260
3284
|
return this.getIsEval() ? t ? "[eval] (" + t + ":" + e + ":" + r + ")" : "[eval]:" + e + ":" + r : n ? n + " (" + t + ":" + e + ":" + r + ")" : t + ":" + e + ":" + r;
|
|
3261
3285
|
} };
|
|
3262
|
-
|
|
3286
|
+
P.fromString = k(function(t) {
|
|
3263
3287
|
var e = t.indexOf("("), r = t.lastIndexOf(")"), n = t.substring(0, e), s = t.substring(e + 1, r).split(","), a = t.substring(r + 1);
|
|
3264
3288
|
if (a.indexOf("@") === 0) var i = /@(.+?)(?::(\d+))?(?::(\d+))?$/.exec(a, ""), o = i[1], d = i[2], c = i[3];
|
|
3265
|
-
return new
|
|
3289
|
+
return new P({ functionName: n, args: s || void 0, fileName: o, lineNumber: d || void 0, columnNumber: c || void 0 });
|
|
3266
3290
|
}, "StackFrame$$fromString");
|
|
3267
|
-
for (ee = 0; ee < ce.length; ee++)
|
|
3291
|
+
for (ee = 0; ee < ce.length; ee++) P.prototype["get" + G(ce[ee])] = et(ce[ee]), P.prototype["set" + G(ce[ee])] = /* @__PURE__ */ function(t) {
|
|
3268
3292
|
return function(e) {
|
|
3269
3293
|
this[t] = !!e;
|
|
3270
3294
|
};
|
|
3271
3295
|
}(ce[ee]);
|
|
3272
3296
|
var ee;
|
|
3273
|
-
for (te = 0; te < ue.length; te++)
|
|
3297
|
+
for (te = 0; te < ue.length; te++) P.prototype["get" + G(ue[te])] = et(ue[te]), P.prototype["set" + G(ue[te])] = /* @__PURE__ */ function(t) {
|
|
3274
3298
|
return function(e) {
|
|
3275
|
-
if (!
|
|
3299
|
+
if (!Ut(e)) throw new TypeError(t + " must be a Number");
|
|
3276
3300
|
this[t] = Number(e);
|
|
3277
3301
|
};
|
|
3278
3302
|
}(ue[te]);
|
|
3279
3303
|
var te;
|
|
3280
|
-
for (re = 0; re < le.length; re++)
|
|
3304
|
+
for (re = 0; re < le.length; re++) P.prototype["get" + G(le[re])] = et(le[re]), P.prototype["set" + G(le[re])] = /* @__PURE__ */ function(t) {
|
|
3281
3305
|
return function(e) {
|
|
3282
3306
|
this[t] = String(e);
|
|
3283
3307
|
};
|
|
3284
3308
|
}(le[re]);
|
|
3285
|
-
var re,
|
|
3286
|
-
function
|
|
3309
|
+
var re, nt = P;
|
|
3310
|
+
function zt() {
|
|
3287
3311
|
var t = /^\s*at .*(\S+:\d+|\(native\))/m, e = /^(eval@)?(\[native code])?$/;
|
|
3288
3312
|
return { parse: k(function(r) {
|
|
3289
3313
|
if (r.stack && r.stack.match(t)) return this.parseV8OrIE(r);
|
|
@@ -3303,7 +3327,7 @@ var Qn = ur((rs, pt) => {
|
|
|
3303
3327
|
var a = s.replace(/^\s+/, "").replace(/\(eval code/g, "(").replace(/^.*?\s+/, ""), i = a.match(/ (\(.+\)$)/);
|
|
3304
3328
|
a = i ? a.replace(i[0], "") : a;
|
|
3305
3329
|
var o = this.extractLocation(i ? i[1] : a), d = i && a || void 0, c = ["eval", "<anonymous>"].indexOf(o[0]) > -1 ? void 0 : o[0];
|
|
3306
|
-
return new
|
|
3330
|
+
return new nt({ functionName: d, fileName: c, lineNumber: o[1], columnNumber: o[2], source: s });
|
|
3307
3331
|
}, this);
|
|
3308
3332
|
}, "ErrorStackParser$$parseV8OrIE"), parseFFOrSafari: k(function(r) {
|
|
3309
3333
|
var n = r.stack.split(`
|
|
@@ -3311,58 +3335,58 @@ var Qn = ur((rs, pt) => {
|
|
|
3311
3335
|
return !s.match(e);
|
|
3312
3336
|
}, this);
|
|
3313
3337
|
return n.map(function(s) {
|
|
3314
|
-
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
|
|
3338
|
+
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 nt({ functionName: s });
|
|
3315
3339
|
var a = /((.*".+"[^@]*)?[^@]*)(?:@)/, i = s.match(a), o = i && i[1] ? i[1] : void 0, d = this.extractLocation(s.replace(a, ""));
|
|
3316
|
-
return new
|
|
3340
|
+
return new nt({ functionName: o, fileName: d[0], lineNumber: d[1], columnNumber: d[2], source: s });
|
|
3317
3341
|
}, this);
|
|
3318
3342
|
}, "ErrorStackParser$$parseFFOrSafari") };
|
|
3319
3343
|
}
|
|
3320
|
-
k(
|
|
3321
|
-
var
|
|
3344
|
+
k(zt, "ErrorStackParser");
|
|
3345
|
+
var Ln = new zt(), Dn = Ln, V = typeof process == "object" && typeof process.versions == "object" && typeof process.versions.node == "string" && !process.browser, qt = V && typeof yt < "u" && typeof yt.exports < "u" && typeof Vt < "u" && typeof __dirname < "u", Vn = V && !qt, Un = typeof Deno < "u", Bt = !V && !Un, zn = Bt && typeof window == "object" && typeof document == "object" && typeof document.createElement == "function" && "sessionStorage" in window && typeof importScripts != "function", qn = Bt && typeof importScripts == "function" && typeof self == "object";
|
|
3322
3346
|
typeof navigator == "object" && typeof navigator.userAgent == "string" && navigator.userAgent.indexOf("Chrome") == -1 && navigator.userAgent.indexOf("Safari") > -1;
|
|
3323
|
-
var
|
|
3324
|
-
async function
|
|
3325
|
-
if (!V || (
|
|
3326
|
-
let t =
|
|
3347
|
+
var Ht, ut, Wt, Ot, vt;
|
|
3348
|
+
async function _t() {
|
|
3349
|
+
if (!V || (Ht = (await import("./__vite-browser-external-CPvbk0mb.js")).default, Ot = await import("./__vite-browser-external-CPvbk0mb.js"), vt = await import("./__vite-browser-external-CPvbk0mb.js"), Wt = (await import("./__vite-browser-external-CPvbk0mb.js")).default, ut = await import("./__vite-browser-external-CPvbk0mb.js"), wt = ut.sep, typeof Vt < "u")) return;
|
|
3350
|
+
let t = Ot, 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 };
|
|
3327
3351
|
globalThis.require = function(a) {
|
|
3328
3352
|
return s[a];
|
|
3329
3353
|
};
|
|
3330
3354
|
}
|
|
3331
|
-
k(
|
|
3332
|
-
function
|
|
3333
|
-
return
|
|
3355
|
+
k(_t, "initNodeModules");
|
|
3356
|
+
function Jt(t, e) {
|
|
3357
|
+
return ut.resolve(e || ".", t);
|
|
3334
3358
|
}
|
|
3335
|
-
k(
|
|
3336
|
-
function
|
|
3359
|
+
k(Jt, "node_resolvePath");
|
|
3360
|
+
function Yt(t, e) {
|
|
3337
3361
|
return e === void 0 && (e = location), new URL(t, e).toString();
|
|
3338
3362
|
}
|
|
3339
|
-
k(
|
|
3340
|
-
var
|
|
3341
|
-
V ?
|
|
3342
|
-
var
|
|
3343
|
-
V || (
|
|
3344
|
-
function
|
|
3345
|
-
return t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? { response: fetch(t) } : { binary:
|
|
3363
|
+
k(Yt, "browser_resolvePath");
|
|
3364
|
+
var lt;
|
|
3365
|
+
V ? lt = Jt : lt = Yt;
|
|
3366
|
+
var wt;
|
|
3367
|
+
V || (wt = "/");
|
|
3368
|
+
function Kt(t, e) {
|
|
3369
|
+
return t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? { response: fetch(t) } : { binary: vt.readFile(t).then((r) => new Uint8Array(r.buffer, r.byteOffset, r.byteLength)) };
|
|
3346
3370
|
}
|
|
3347
|
-
k(
|
|
3348
|
-
function
|
|
3371
|
+
k(Kt, "node_getBinaryResponse");
|
|
3372
|
+
function Gt(t, e) {
|
|
3349
3373
|
let r = new URL(t, location);
|
|
3350
3374
|
return { response: fetch(r, e ? { integrity: e } : {}) };
|
|
3351
3375
|
}
|
|
3352
|
-
k(
|
|
3353
|
-
var
|
|
3354
|
-
V ?
|
|
3355
|
-
async function
|
|
3356
|
-
let { response: r, binary: n } =
|
|
3376
|
+
k(Gt, "browser_getBinaryResponse");
|
|
3377
|
+
var Xe;
|
|
3378
|
+
V ? Xe = Kt : Xe = Gt;
|
|
3379
|
+
async function Xt(t, e) {
|
|
3380
|
+
let { response: r, binary: n } = Xe(t, e);
|
|
3357
3381
|
if (n) return n;
|
|
3358
3382
|
let s = await r;
|
|
3359
3383
|
if (!s.ok) throw new Error(`Failed to load '${t}': request failed.`);
|
|
3360
3384
|
return new Uint8Array(await s.arrayBuffer());
|
|
3361
3385
|
}
|
|
3362
|
-
k(
|
|
3363
|
-
var
|
|
3364
|
-
if (
|
|
3365
|
-
else if (
|
|
3386
|
+
k(Xt, "loadBinaryFile");
|
|
3387
|
+
var Ue;
|
|
3388
|
+
if (zn) Ue = k(async (t) => await import(t), "loadScript");
|
|
3389
|
+
else if (qn) Ue = k(async (t) => {
|
|
3366
3390
|
try {
|
|
3367
3391
|
globalThis.importScripts(t);
|
|
3368
3392
|
} catch (e) {
|
|
@@ -3370,39 +3394,39 @@ var Qn = ur((rs, pt) => {
|
|
|
3370
3394
|
else throw e;
|
|
3371
3395
|
}
|
|
3372
3396
|
}, "loadScript");
|
|
3373
|
-
else if (V)
|
|
3397
|
+
else if (V) Ue = Qt;
|
|
3374
3398
|
else throw new Error("Cannot determine runtime environment");
|
|
3375
|
-
async function
|
|
3376
|
-
t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ?
|
|
3399
|
+
async function Qt(t) {
|
|
3400
|
+
t.startsWith("file://") && (t = t.slice(7)), t.includes("://") ? Wt.runInThisContext(await (await fetch(t)).text()) : await import(Ht.pathToFileURL(t).href);
|
|
3377
3401
|
}
|
|
3378
|
-
k(
|
|
3379
|
-
async function
|
|
3402
|
+
k(Qt, "nodeLoadScript");
|
|
3403
|
+
async function er(t) {
|
|
3380
3404
|
if (V) {
|
|
3381
|
-
await
|
|
3382
|
-
let e = await
|
|
3405
|
+
await _t();
|
|
3406
|
+
let e = await vt.readFile(t, { encoding: "utf8" });
|
|
3383
3407
|
return JSON.parse(e);
|
|
3384
3408
|
} else return await (await fetch(t)).json();
|
|
3385
3409
|
}
|
|
3386
|
-
k(
|
|
3387
|
-
async function
|
|
3388
|
-
if (
|
|
3410
|
+
k(er, "loadLockFile");
|
|
3411
|
+
async function tr() {
|
|
3412
|
+
if (qt) return __dirname;
|
|
3389
3413
|
let t;
|
|
3390
3414
|
try {
|
|
3391
3415
|
throw new Error();
|
|
3392
3416
|
} catch (n) {
|
|
3393
3417
|
t = n;
|
|
3394
3418
|
}
|
|
3395
|
-
let e =
|
|
3396
|
-
if (V && !e.startsWith("file://") && (e = `file://${e}`),
|
|
3419
|
+
let e = Dn.parse(t)[0].fileName;
|
|
3420
|
+
if (V && !e.startsWith("file://") && (e = `file://${e}`), Vn) {
|
|
3397
3421
|
let n = await import("./__vite-browser-external-CPvbk0mb.js");
|
|
3398
3422
|
return (await import("./__vite-browser-external-CPvbk0mb.js")).fileURLToPath(n.dirname(e));
|
|
3399
3423
|
}
|
|
3400
|
-
let r = e.lastIndexOf(
|
|
3424
|
+
let r = e.lastIndexOf(wt);
|
|
3401
3425
|
if (r === -1) throw new Error("Could not extract indexURL path from pyodide module location");
|
|
3402
3426
|
return e.slice(0, r);
|
|
3403
3427
|
}
|
|
3404
|
-
k(
|
|
3405
|
-
function
|
|
3428
|
+
k(tr, "calculateDirname");
|
|
3429
|
+
function rr(t) {
|
|
3406
3430
|
let e = t.FS, r = t.FS.filesystems.MEMFS, n = t.PATH, s = { DIR_MODE: 16895, FILE_MODE: 33279, mount: function(a) {
|
|
3407
3431
|
if (!a.opts.fileSystemHandle) throw new Error("opts.fileSystemHandle is required");
|
|
3408
3432
|
return r.mount.apply(null, arguments);
|
|
@@ -3430,7 +3454,7 @@ var Qn = ur((rs, pt) => {
|
|
|
3430
3454
|
}
|
|
3431
3455
|
return { type: "local", entries: i };
|
|
3432
3456
|
}, getRemoteSet: async (a) => {
|
|
3433
|
-
let i = /* @__PURE__ */ Object.create(null), o = await
|
|
3457
|
+
let i = /* @__PURE__ */ Object.create(null), o = await Bn(a.opts.fileSystemHandle);
|
|
3434
3458
|
for (let [d, c] of o) d !== "." && (i[n.join2(a.mountpoint, d)] = { timestamp: c.kind === "file" ? new Date((await c.getFile()).lastModified) : /* @__PURE__ */ new Date(), mode: c.kind === "file" ? s.FILE_MODE : s.DIR_MODE });
|
|
3435
3459
|
return { type: "remote", entries: i, handles: o };
|
|
3436
3460
|
}, loadLocalEntry: (a) => {
|
|
@@ -3477,8 +3501,8 @@ var Qn = ur((rs, pt) => {
|
|
|
3477
3501
|
for (let x of c) {
|
|
3478
3502
|
let C = n.normalize(x.replace(a.mountpoint, "/")).substring(1);
|
|
3479
3503
|
if (o.type === "local") {
|
|
3480
|
-
let U = w.get(C),
|
|
3481
|
-
s.storeLocalEntry(x,
|
|
3504
|
+
let U = w.get(C), Le = await s.loadRemoteEntry(U);
|
|
3505
|
+
s.storeLocalEntry(x, Le);
|
|
3482
3506
|
} else {
|
|
3483
3507
|
let U = s.loadLocalEntry(x);
|
|
3484
3508
|
await s.storeRemoteEntry(w, C, U);
|
|
@@ -3492,8 +3516,8 @@ var Qn = ur((rs, pt) => {
|
|
|
3492
3516
|
} };
|
|
3493
3517
|
t.FS.filesystems.NATIVEFS_ASYNC = s;
|
|
3494
3518
|
}
|
|
3495
|
-
k(
|
|
3496
|
-
var
|
|
3519
|
+
k(rr, "initializeNativeFS");
|
|
3520
|
+
var Bn = k(async (t) => {
|
|
3497
3521
|
let e = [];
|
|
3498
3522
|
async function r(s) {
|
|
3499
3523
|
for await (let a of s.values()) e.push(a), a.kind === "directory" && await r(a);
|
|
@@ -3507,14 +3531,14 @@ var Qn = ur((rs, pt) => {
|
|
|
3507
3531
|
}
|
|
3508
3532
|
return n;
|
|
3509
3533
|
}, "getFsHandles");
|
|
3510
|
-
function
|
|
3511
|
-
let e = { noImageDecoding: !0, noAudioDecoding: !0, noWasmDecoding: !1, preRun:
|
|
3534
|
+
function nr(t) {
|
|
3535
|
+
let e = { noImageDecoding: !0, noAudioDecoding: !0, noWasmDecoding: !1, preRun: dr(t), quit(r, n) {
|
|
3512
3536
|
throw e.exited = { status: r, toThrow: n }, n;
|
|
3513
|
-
}, print: t.stdout, printErr: t.stderr, thisProgram: t._sysExecutable, arguments: t.args, API: { config: t }, locateFile: (r) => t.indexURL + r, instantiateWasm:
|
|
3537
|
+
}, print: t.stdout, printErr: t.stderr, thisProgram: t._sysExecutable, arguments: t.args, API: { config: t }, locateFile: (r) => t.indexURL + r, instantiateWasm: cr(t.indexURL) };
|
|
3514
3538
|
return e;
|
|
3515
3539
|
}
|
|
3516
|
-
k(
|
|
3517
|
-
function
|
|
3540
|
+
k(nr, "createSettings");
|
|
3541
|
+
function sr(t) {
|
|
3518
3542
|
return function(e) {
|
|
3519
3543
|
let r = "/";
|
|
3520
3544
|
try {
|
|
@@ -3525,14 +3549,14 @@ var Qn = ur((rs, pt) => {
|
|
|
3525
3549
|
e.FS.chdir(t);
|
|
3526
3550
|
};
|
|
3527
3551
|
}
|
|
3528
|
-
k(
|
|
3529
|
-
function
|
|
3552
|
+
k(sr, "createHomeDirectory");
|
|
3553
|
+
function ar(t) {
|
|
3530
3554
|
return function(e) {
|
|
3531
3555
|
Object.assign(e.ENV, t);
|
|
3532
3556
|
};
|
|
3533
3557
|
}
|
|
3534
|
-
k(
|
|
3535
|
-
function
|
|
3558
|
+
k(ar, "setEnvironment");
|
|
3559
|
+
function ir(t) {
|
|
3536
3560
|
return t ? [async (e) => {
|
|
3537
3561
|
e.addRunDependency("fsInitHook");
|
|
3538
3562
|
try {
|
|
@@ -3542,9 +3566,9 @@ var Qn = ur((rs, pt) => {
|
|
|
3542
3566
|
}
|
|
3543
3567
|
}] : [];
|
|
3544
3568
|
}
|
|
3545
|
-
k(
|
|
3546
|
-
function
|
|
3547
|
-
let e =
|
|
3569
|
+
k(ir, "callFsInitHook");
|
|
3570
|
+
function or(t) {
|
|
3571
|
+
let e = Xt(t);
|
|
3548
3572
|
return async (r) => {
|
|
3549
3573
|
let n = r._py_version_major(), s = r._py_version_minor();
|
|
3550
3574
|
r.FS.mkdirTree("/lib"), r.API.sitePackages = `/lib/python${n}.${s}/site-packages`, r.FS.mkdirTree(r.API.sitePackages), r.addRunDependency("install-stdlib");
|
|
@@ -3558,15 +3582,15 @@ var Qn = ur((rs, pt) => {
|
|
|
3558
3582
|
}
|
|
3559
3583
|
};
|
|
3560
3584
|
}
|
|
3561
|
-
k(
|
|
3562
|
-
function
|
|
3585
|
+
k(or, "installStdlib");
|
|
3586
|
+
function dr(t) {
|
|
3563
3587
|
let e;
|
|
3564
|
-
return t.stdLibURL != null ? e = t.stdLibURL : e = t.indexURL + "python_stdlib.zip", [...
|
|
3588
|
+
return t.stdLibURL != null ? e = t.stdLibURL : e = t.indexURL + "python_stdlib.zip", [...ir(t.fsInit), or(e), sr(t.env.HOME), ar(t.env), rr];
|
|
3565
3589
|
}
|
|
3566
|
-
k(
|
|
3567
|
-
function
|
|
3590
|
+
k(dr, "getFileSystemInitializationFuncs");
|
|
3591
|
+
function cr(t) {
|
|
3568
3592
|
if (typeof WasmOffsetConverter < "u") return;
|
|
3569
|
-
let { binary: e, response: r } =
|
|
3593
|
+
let { binary: e, response: r } = Xe(t + "pyodide.asm.wasm");
|
|
3570
3594
|
return function(n, s) {
|
|
3571
3595
|
return async function() {
|
|
3572
3596
|
try {
|
|
@@ -3580,19 +3604,19 @@ var Qn = ur((rs, pt) => {
|
|
|
3580
3604
|
}(), {};
|
|
3581
3605
|
};
|
|
3582
3606
|
}
|
|
3583
|
-
k(
|
|
3584
|
-
var
|
|
3585
|
-
async function
|
|
3607
|
+
k(cr, "getInstantiateWasmFunc");
|
|
3608
|
+
var ft = "0.27.5";
|
|
3609
|
+
async function pt(t = {}) {
|
|
3586
3610
|
var e, r;
|
|
3587
|
-
await
|
|
3588
|
-
let n = t.indexURL || await
|
|
3589
|
-
n =
|
|
3611
|
+
await _t();
|
|
3612
|
+
let n = t.indexURL || await tr();
|
|
3613
|
+
n = lt(n), n.endsWith("/") || (n += "/"), t.indexURL = n;
|
|
3590
3614
|
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);
|
|
3591
3615
|
(e = a.env).HOME ?? (e.HOME = "/home/pyodide"), (r = a.env).PYTHONINSPECT ?? (r.PYTHONINSPECT = "1");
|
|
3592
|
-
let i =
|
|
3593
|
-
if (o.lockFilePromise =
|
|
3616
|
+
let i = nr(a), o = i.API;
|
|
3617
|
+
if (o.lockFilePromise = er(a.lockFileURL), typeof _createPyodideModule != "function") {
|
|
3594
3618
|
let x = `${a.indexURL}pyodide.asm.js`;
|
|
3595
|
-
await
|
|
3619
|
+
await Ue(x);
|
|
3596
3620
|
}
|
|
3597
3621
|
let d;
|
|
3598
3622
|
if (t._loadSnapshot) {
|
|
@@ -3601,7 +3625,7 @@ var Qn = ur((rs, pt) => {
|
|
|
3601
3625
|
}
|
|
3602
3626
|
let c = await _createPyodideModule(i);
|
|
3603
3627
|
if (i.exited) throw i.exited.toThrow;
|
|
3604
|
-
if (t.pyproxyToStringRepr && o.setPyProxyToStringMethod(!0), o.version !==
|
|
3628
|
+
if (t.pyproxyToStringRepr && o.setPyProxyToStringMethod(!0), o.version !== ft && a.checkAPIVersion) throw new Error(`Pyodide version does not match: '${ft}' <==> '${o.version}'. If you updated the Pyodide version, make sure you also updated the 'indexURL' parameter passed to loadPyodide.`);
|
|
3605
3629
|
c.locateFile = (x) => {
|
|
3606
3630
|
throw new Error("Didn't expect to load any more file_packager files!");
|
|
3607
3631
|
};
|
|
@@ -3610,47 +3634,47 @@ var Qn = ur((rs, pt) => {
|
|
|
3610
3634
|
let w = o.finalizeBootstrap(l, t._snapshotDeserializer);
|
|
3611
3635
|
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;
|
|
3612
3636
|
}
|
|
3613
|
-
k(
|
|
3614
|
-
const
|
|
3615
|
-
function
|
|
3616
|
-
return t.includes("dev") &&
|
|
3637
|
+
k(pt, "loadPyodide");
|
|
3638
|
+
const Hn = !1;
|
|
3639
|
+
function Wn(t) {
|
|
3640
|
+
return t.includes("dev") && Hn ? "dev" : `v${ft}`;
|
|
3617
3641
|
}
|
|
3618
|
-
function
|
|
3642
|
+
function Te(t) {
|
|
3619
3643
|
return t.FS;
|
|
3620
3644
|
}
|
|
3621
|
-
const
|
|
3622
|
-
NOTEBOOK_FILENAME:
|
|
3623
|
-
HOME_DIR:
|
|
3645
|
+
const ht = (t) => new TextDecoder().decode(t), _e = "notebook.py", we = "/marimo", H = {
|
|
3646
|
+
NOTEBOOK_FILENAME: _e,
|
|
3647
|
+
HOME_DIR: we,
|
|
3624
3648
|
createHomeDir: (t) => {
|
|
3625
|
-
const e =
|
|
3649
|
+
const e = Te(t);
|
|
3626
3650
|
try {
|
|
3627
|
-
e.mkdirTree(
|
|
3651
|
+
e.mkdirTree(we);
|
|
3628
3652
|
} catch {
|
|
3629
3653
|
}
|
|
3630
|
-
e.chdir(
|
|
3654
|
+
e.chdir(we);
|
|
3631
3655
|
},
|
|
3632
3656
|
mountFS: (t) => {
|
|
3633
|
-
|
|
3657
|
+
Te(t).mount(t.FS.filesystems.IDBFS, { root: "." }, we);
|
|
3634
3658
|
},
|
|
3635
3659
|
populateFilesToMemory: async (t) => {
|
|
3636
|
-
await
|
|
3660
|
+
await Nt(t, !0);
|
|
3637
3661
|
},
|
|
3638
3662
|
persistFilesToRemote: async (t) => {
|
|
3639
|
-
await
|
|
3663
|
+
await Nt(t, !1);
|
|
3640
3664
|
},
|
|
3641
3665
|
readNotebook: (t) => {
|
|
3642
|
-
const e =
|
|
3643
|
-
return
|
|
3666
|
+
const e = Te(t), r = `${we}/${_e}`;
|
|
3667
|
+
return ht(e.readFile(r));
|
|
3644
3668
|
},
|
|
3645
3669
|
initNotebookCode: (t) => {
|
|
3646
|
-
const { pyodide: e, filename: r, code: n } = t, s =
|
|
3670
|
+
const { pyodide: e, filename: r, code: n } = t, s = Te(e), a = (i) => {
|
|
3647
3671
|
try {
|
|
3648
|
-
return
|
|
3672
|
+
return ht(s.readFile(i));
|
|
3649
3673
|
} catch {
|
|
3650
3674
|
return null;
|
|
3651
3675
|
}
|
|
3652
3676
|
};
|
|
3653
|
-
if (r && r !==
|
|
3677
|
+
if (r && r !== _e) {
|
|
3654
3678
|
const i = a(r);
|
|
3655
3679
|
if (i)
|
|
3656
3680
|
return {
|
|
@@ -3658,15 +3682,15 @@ var Qn = ur((rs, pt) => {
|
|
|
3658
3682
|
filename: r
|
|
3659
3683
|
};
|
|
3660
3684
|
}
|
|
3661
|
-
return s.writeFile(
|
|
3685
|
+
return s.writeFile(_e, n), {
|
|
3662
3686
|
code: n,
|
|
3663
|
-
filename:
|
|
3687
|
+
filename: _e
|
|
3664
3688
|
};
|
|
3665
3689
|
}
|
|
3666
3690
|
};
|
|
3667
|
-
function
|
|
3691
|
+
function Nt(t, e) {
|
|
3668
3692
|
return new Promise((r, n) => {
|
|
3669
|
-
|
|
3693
|
+
Te(t).syncfs(e, (s) => {
|
|
3670
3694
|
if (s instanceof Error) {
|
|
3671
3695
|
n(s);
|
|
3672
3696
|
return;
|
|
@@ -3675,11 +3699,11 @@ var Qn = ur((rs, pt) => {
|
|
|
3675
3699
|
});
|
|
3676
3700
|
});
|
|
3677
3701
|
}
|
|
3678
|
-
function
|
|
3702
|
+
function Jn(t, e) {
|
|
3679
3703
|
if (!t)
|
|
3680
3704
|
throw new Error(e);
|
|
3681
3705
|
}
|
|
3682
|
-
class
|
|
3706
|
+
class Yn {
|
|
3683
3707
|
constructor() {
|
|
3684
3708
|
this.spans = [];
|
|
3685
3709
|
}
|
|
@@ -3721,25 +3745,25 @@ var Qn = ur((rs, pt) => {
|
|
|
3721
3745
|
logSpans() {
|
|
3722
3746
|
}
|
|
3723
3747
|
}
|
|
3724
|
-
const fe = new
|
|
3748
|
+
const fe = new Yn();
|
|
3725
3749
|
globalThis.t = fe;
|
|
3726
|
-
const
|
|
3727
|
-
class
|
|
3750
|
+
const Kn = !1;
|
|
3751
|
+
class Gn {
|
|
3728
3752
|
constructor() {
|
|
3729
3753
|
this.pyodide = null;
|
|
3730
3754
|
}
|
|
3731
3755
|
get requirePyodide() {
|
|
3732
|
-
return
|
|
3756
|
+
return Jn(this.pyodide, "Pyodide not loaded"), this.pyodide;
|
|
3733
3757
|
}
|
|
3734
3758
|
async bootstrap(e) {
|
|
3735
3759
|
return await this.loadPyodideAndPackages(e);
|
|
3736
3760
|
}
|
|
3737
3761
|
async loadPyodideAndPackages(e) {
|
|
3738
|
-
if (!
|
|
3762
|
+
if (!pt)
|
|
3739
3763
|
throw new Error("loadPyodide is not defined");
|
|
3740
3764
|
const r = fe.startSpan("loadPyodide");
|
|
3741
3765
|
try {
|
|
3742
|
-
const n = await
|
|
3766
|
+
const n = await pt({
|
|
3743
3767
|
// Perf: These get loaded while pyodide is being bootstrapped
|
|
3744
3768
|
packages: [
|
|
3745
3769
|
"micropip",
|
|
@@ -3749,7 +3773,7 @@ var Qn = ur((rs, pt) => {
|
|
|
3749
3773
|
"narwhals",
|
|
3750
3774
|
"packaging"
|
|
3751
3775
|
],
|
|
3752
|
-
_makeSnapshot:
|
|
3776
|
+
_makeSnapshot: Kn,
|
|
3753
3777
|
lockFileURL: `https://wasm.marimo.app/pyodide-lock.json?v=${e.version}&pyodide=${e.pyodideVersion}`,
|
|
3754
3778
|
// Without this, this fails in Firefox with
|
|
3755
3779
|
// `Could not extract indexURL path from pyodide module`
|
|
@@ -3758,7 +3782,7 @@ var Qn = ur((rs, pt) => {
|
|
|
3758
3782
|
});
|
|
3759
3783
|
return this.pyodide = n, r.end("ok"), n;
|
|
3760
3784
|
} catch (n) {
|
|
3761
|
-
throw
|
|
3785
|
+
throw xe.error("Failed to load Pyodide", n), n;
|
|
3762
3786
|
}
|
|
3763
3787
|
}
|
|
3764
3788
|
async mountFilesystem(e) {
|
|
@@ -3819,8 +3843,8 @@ ${e}`;
|
|
|
3819
3843
|
const s = [...r];
|
|
3820
3844
|
let a = fe.startSpan("pyodide.loadPackage");
|
|
3821
3845
|
await n.loadPackagesFromImports(e, {
|
|
3822
|
-
errorCallback:
|
|
3823
|
-
messageCallback:
|
|
3846
|
+
errorCallback: xe.error,
|
|
3847
|
+
messageCallback: xe.log
|
|
3824
3848
|
}), a.end(), a = fe.startSpan("micropip.install");
|
|
3825
3849
|
const i = s.filter(
|
|
3826
3850
|
(o) => !n.loadedPackages[o]
|
|
@@ -3834,54 +3858,54 @@ ${e}`;
|
|
|
3834
3858
|
print("Loading from micropip:", missing)
|
|
3835
3859
|
await micropip.install(missing)
|
|
3836
3860
|
`).catch((o) => {
|
|
3837
|
-
|
|
3861
|
+
xe.error("Failed to load packages from micropip", o);
|
|
3838
3862
|
}), a.end();
|
|
3839
3863
|
}
|
|
3840
3864
|
}
|
|
3841
|
-
async function
|
|
3865
|
+
async function Xn(t) {
|
|
3842
3866
|
try {
|
|
3843
3867
|
return await import(
|
|
3844
3868
|
/* @vite-ignore */
|
|
3845
3869
|
`/wasm/controller.js?version=${t}`
|
|
3846
3870
|
);
|
|
3847
3871
|
} catch {
|
|
3848
|
-
return new
|
|
3872
|
+
return new Gn();
|
|
3849
3873
|
}
|
|
3850
3874
|
}
|
|
3851
|
-
async function
|
|
3875
|
+
async function Qn() {
|
|
3852
3876
|
var t;
|
|
3853
3877
|
try {
|
|
3854
|
-
const e =
|
|
3878
|
+
const e = ts(), r = Wn(e), n = await Xn(e);
|
|
3855
3879
|
self.controller = n, self.pyodide = await n.bootstrap({
|
|
3856
3880
|
version: e,
|
|
3857
3881
|
pyodideVersion: r
|
|
3858
3882
|
}), await ((t = n.mountFilesystem) == null ? void 0 : t.call(n, {
|
|
3859
3883
|
code: "",
|
|
3860
3884
|
filename: null
|
|
3861
|
-
})),
|
|
3885
|
+
})), mt.send.initialized({});
|
|
3862
3886
|
} catch (e) {
|
|
3863
|
-
|
|
3887
|
+
xe.error("Error bootstrapping", e), mt.send.initializedError({ error: xn(e) });
|
|
3864
3888
|
}
|
|
3865
3889
|
}
|
|
3866
|
-
const
|
|
3867
|
-
readFile: async (t) => (await
|
|
3868
|
-
readNotebook: async () => (await
|
|
3890
|
+
const st = Qn(), es = {
|
|
3891
|
+
readFile: async (t) => (await st, ht(self.pyodide.FS.readFile(t))),
|
|
3892
|
+
readNotebook: async () => (await st, H.readNotebook(self.pyodide)),
|
|
3869
3893
|
saveNotebook: async (t) => {
|
|
3870
|
-
await
|
|
3894
|
+
await st, await self.pyodide.runPython(`
|
|
3871
3895
|
from marimo._pyodide.bootstrap import save_file
|
|
3872
3896
|
|
|
3873
3897
|
save_file
|
|
3874
3898
|
`)(JSON.stringify(t), H.NOTEBOOK_FILENAME), await H.persistFilesToRemote(self.pyodide);
|
|
3875
3899
|
}
|
|
3876
|
-
},
|
|
3877
|
-
transport:
|
|
3878
|
-
transportId:
|
|
3900
|
+
}, mt = Rn({
|
|
3901
|
+
transport: Pn({
|
|
3902
|
+
transportId: jn
|
|
3879
3903
|
}),
|
|
3880
|
-
requestHandler:
|
|
3904
|
+
requestHandler: es
|
|
3881
3905
|
});
|
|
3882
|
-
|
|
3883
|
-
function
|
|
3906
|
+
mt.send("ready", {});
|
|
3907
|
+
function ts() {
|
|
3884
3908
|
return self.name;
|
|
3885
3909
|
}
|
|
3886
3910
|
});
|
|
3887
|
-
export default
|
|
3911
|
+
export default rs();
|