@marimo-team/islands 0.25.3-dev438 → 0.25.3-dev439
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/{ErrorBoundary-Bvtsf3zB.js → ErrorBoundary-B4npV6Uy.js} +1 -1
- package/dist/{chat-ui-ZGXdN6Vr.js → chat-ui-2c_3M6FX.js} +3 -3
- package/dist/{code-visibility-CmfNaZAX.js → code-visibility-Dx3sTl1s.js} +2 -2
- package/dist/{common-i_ykKLxU.js → common-Cx3bd6pm.js} +3 -3
- package/dist/{data-grid-overlay-editor-kj617zpx.js → data-grid-overlay-editor-CqMKHPcR.js} +1 -1
- package/dist/{error-entries-DMgIKuK1.js → error-entries-CNB7O2yS.js} +313 -313
- package/dist/{feedback-button-CGAe5hFZ.js → feedback-button-CUPrIFyj.js} +3 -3
- package/dist/{glide-data-editor-BiU_hF9A.js → glide-data-editor-T1r8b4Cr.js} +3 -3
- package/dist/{globals-jz3DTWzC.js → globals-BweO1Da5.js} +1 -1
- package/dist/{html-to-image-Dopvv40j.js → html-to-image-B0UiwmMu.js} +1 -1
- package/dist/main.js +71 -70
- package/dist/{number-overlay-editor-D3OSLsDB.js → number-overlay-editor-eynzhDoK.js} +1 -1
- package/dist/{process-output-BidrKebE.js → process-output-3Epq3rw6.js} +2 -2
- package/dist/{reveal-component-CnyvRvqy.js → reveal-component-C-ZgAhoP.js} +3 -3
- package/package.json +1 -1
- package/src/__mocks__/executions.ts +1 -0
- package/src/core/executions/__tests__/atoms.test.ts +0 -18
- package/src/core/executions/__tests__/output-lifecycle.test.ts +90 -22
- package/src/core/executions/atoms.ts +51 -65
- package/src/core/notebook/replica/replica.ts +8 -0
|
@@ -7,16 +7,16 @@ import { f as s, h as c } from "./tooltip-CiJ919pg.js";
|
|
|
7
7
|
import { t as l } from "./check-CApwK1fD.js";
|
|
8
8
|
import { n as u, r as d } from "./assertNever-DOTNJ2Y4.js";
|
|
9
9
|
import { t as f } from "./jsx-runtime-D8btoEHk.js";
|
|
10
|
-
import { At as
|
|
11
|
-
import { n as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { H as
|
|
17
|
-
import { a as
|
|
18
|
-
import { t as
|
|
19
|
-
var
|
|
10
|
+
import { At as ee, Et as p, Ft as m, Nt as h, Pt as g, Rt as _, St as v, Tt as y, Vt as b, _n as te, f as x, fn as ne, gn as re, kt as S, mn as ie, pn as ae, wt as oe, xt as se } from "./use-restore-focus-BLj45Ibw.js";
|
|
11
|
+
import { n as ce } from "./toast-BGvv7tKS.js";
|
|
12
|
+
import { t as le } from "./objects-DCmMvZtn.js";
|
|
13
|
+
import { t as C } from "./invariant-DLmrl-hA.js";
|
|
14
|
+
import { t as ue } from "./purify.es-DmnrIjg4.js";
|
|
15
|
+
import { t as de } from "./createReducer-CXqSak4H.js";
|
|
16
|
+
import { H as fe, N as pe, P as me, _ as he } from "./dist-D92tYjLc.js";
|
|
17
|
+
import { a as ge, i as _e, l as ve, m as ye, u as be } from "./static-state-CWXd6dYX.js";
|
|
18
|
+
import { t as xe } from "./capabilities-DKqMqBzm.js";
|
|
19
|
+
var Se = c("external-link", [
|
|
20
20
|
["path", {
|
|
21
21
|
d: "M15 3h6v6",
|
|
22
22
|
key: "1q9fwt"
|
|
@@ -29,76 +29,76 @@ var xe = c("external-link", [
|
|
|
29
29
|
d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",
|
|
30
30
|
key: "a6xqqp"
|
|
31
31
|
}]
|
|
32
|
-
]),
|
|
32
|
+
]), Ce = c("minus", [["path", {
|
|
33
33
|
d: "M5 12h14",
|
|
34
34
|
key: "1ays0h"
|
|
35
|
-
}]]),
|
|
35
|
+
}]]), w = /* @__PURE__ */ e(i(), 1), T = f(), we = Object.defineProperty, E = (e, t) => we(e, "name", {
|
|
36
36
|
value: t,
|
|
37
37
|
configurable: !0
|
|
38
|
-
}),
|
|
39
|
-
function
|
|
40
|
-
let { __scopeCheckbox: t, checked: n, children: r, defaultChecked: i, disabled: a, form: o, name: s, onCheckedChange: c, required: l, value: u = "on", internal_do_not_use_render: d } = e, [f,
|
|
38
|
+
}), Te = "Checkbox", [Ee, De] = re(Te), [Oe, ke] = Ee(Te);
|
|
39
|
+
function Ae(e) {
|
|
40
|
+
let { __scopeCheckbox: t, checked: n, children: r, defaultChecked: i, disabled: a, form: o, name: s, onCheckedChange: c, required: l, value: u = "on", internal_do_not_use_render: d } = e, [f, ee] = ae({
|
|
41
41
|
prop: n,
|
|
42
42
|
defaultProp: i ?? !1,
|
|
43
43
|
onChange: c,
|
|
44
|
-
caller:
|
|
45
|
-
}), [
|
|
44
|
+
caller: Te
|
|
45
|
+
}), [p, m] = w.useState(null), [h, g] = w.useState(null), [_, v] = w.useState(null), y = !p || !!o || !!p.closest("form"), b = {
|
|
46
46
|
checked: f,
|
|
47
47
|
disabled: a,
|
|
48
|
-
setChecked:
|
|
49
|
-
control:
|
|
50
|
-
setControl:
|
|
48
|
+
setChecked: ee,
|
|
49
|
+
control: p,
|
|
50
|
+
setControl: m,
|
|
51
51
|
name: s,
|
|
52
52
|
form: o,
|
|
53
53
|
value: u,
|
|
54
|
-
userClick:
|
|
55
|
-
onUserClick:
|
|
54
|
+
userClick: _,
|
|
55
|
+
onUserClick: v,
|
|
56
56
|
required: l,
|
|
57
|
-
defaultChecked: !
|
|
58
|
-
isFormControl:
|
|
59
|
-
bubbleInput:
|
|
60
|
-
setBubbleInput:
|
|
57
|
+
defaultChecked: !D(i) && i,
|
|
58
|
+
isFormControl: y,
|
|
59
|
+
bubbleInput: h,
|
|
60
|
+
setBubbleInput: g
|
|
61
61
|
};
|
|
62
|
-
return /* @__PURE__ */ (0,
|
|
62
|
+
return /* @__PURE__ */ (0, T.jsx)(Oe, {
|
|
63
63
|
scope: t,
|
|
64
|
-
...
|
|
65
|
-
children:
|
|
64
|
+
...b,
|
|
65
|
+
children: Re(d) ? d(b) : r
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
|
-
|
|
69
|
-
var
|
|
70
|
-
let { control: o, value: s, disabled: c, checked: l, required: u, setControl: d, setChecked: f, onUserClick:
|
|
71
|
-
return
|
|
68
|
+
E(Ae, "CheckboxProvider");
|
|
69
|
+
var je = "CheckboxTrigger", Me = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ E(function({ __scopeCheckbox: e, onKeyDown: t, onClick: n, ...i }, a) {
|
|
70
|
+
let { control: o, value: s, disabled: c, checked: l, required: u, setControl: d, setChecked: f, onUserClick: ee, isFormControl: p, bubbleInput: m } = ke(je, e), h = r(a, d), g = w.useRef(l);
|
|
71
|
+
return w.useEffect(() => {
|
|
72
72
|
let e = o?.form;
|
|
73
73
|
if (e) {
|
|
74
|
-
let t = /* @__PURE__ */
|
|
74
|
+
let t = /* @__PURE__ */ E(() => f(g.current), "reset");
|
|
75
75
|
return e.addEventListener("reset", t), () => e.removeEventListener("reset", t);
|
|
76
76
|
}
|
|
77
|
-
}, [o, f]), /* @__PURE__ */ (0,
|
|
77
|
+
}, [o, f]), /* @__PURE__ */ (0, T.jsx)(te.button, {
|
|
78
78
|
type: "button",
|
|
79
79
|
role: "checkbox",
|
|
80
|
-
"aria-checked":
|
|
80
|
+
"aria-checked": D(l) ? "mixed" : l,
|
|
81
81
|
"aria-required": u,
|
|
82
|
-
"data-state":
|
|
82
|
+
"data-state": ze(l),
|
|
83
83
|
"data-disabled": c ? "" : void 0,
|
|
84
84
|
disabled: c,
|
|
85
85
|
value: s,
|
|
86
86
|
...i,
|
|
87
|
-
ref:
|
|
88
|
-
onKeyDown:
|
|
87
|
+
ref: h,
|
|
88
|
+
onKeyDown: ie(t, (e) => {
|
|
89
89
|
e.key === "Enter" && e.preventDefault();
|
|
90
90
|
}),
|
|
91
|
-
onClick:
|
|
91
|
+
onClick: ie(n, (e) => {
|
|
92
92
|
let t = e.isPropagationStopped();
|
|
93
|
-
|
|
94
|
-
requestedChecked:
|
|
93
|
+
ee({
|
|
94
|
+
requestedChecked: D(l) ? !0 : !l,
|
|
95
95
|
hasConsumerStoppedPropagation: t
|
|
96
|
-
}), f((e) =>
|
|
96
|
+
}), f((e) => D(e) ? !0 : !e), m && p && (t || e.stopPropagation());
|
|
97
97
|
})
|
|
98
98
|
});
|
|
99
|
-
}, "CheckboxTrigger")),
|
|
99
|
+
}, "CheckboxTrigger")), Ne = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ E(function(e, t) {
|
|
100
100
|
let { __scopeCheckbox: n, name: r, checked: i, defaultChecked: a, required: o, disabled: s, value: c, onCheckedChange: l, form: u, ...d } = e;
|
|
101
|
-
return /* @__PURE__ */ (0,
|
|
101
|
+
return /* @__PURE__ */ (0, T.jsx)(Ae, {
|
|
102
102
|
__scopeCheckbox: n,
|
|
103
103
|
checked: i,
|
|
104
104
|
defaultChecked: a,
|
|
@@ -108,18 +108,18 @@ var ke = "CheckboxTrigger", Ae = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ D(
|
|
|
108
108
|
name: r,
|
|
109
109
|
form: u,
|
|
110
110
|
value: c,
|
|
111
|
-
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ (0,
|
|
111
|
+
internal_do_not_use_render: ({ isFormControl: e }) => /* @__PURE__ */ (0, T.jsxs)(T.Fragment, { children: [/* @__PURE__ */ (0, T.jsx)(Me, {
|
|
112
112
|
...d,
|
|
113
113
|
ref: t,
|
|
114
114
|
__scopeCheckbox: n
|
|
115
|
-
}), e && /* @__PURE__ */ (0,
|
|
115
|
+
}), e && /* @__PURE__ */ (0, T.jsx)(Le, { __scopeCheckbox: n })] })
|
|
116
116
|
});
|
|
117
|
-
}, "Checkbox")),
|
|
118
|
-
let { __scopeCheckbox: n, forceMount: r, ...i } = e, a =
|
|
119
|
-
return /* @__PURE__ */ (0,
|
|
120
|
-
present: r ||
|
|
121
|
-
children: /* @__PURE__ */ (0,
|
|
122
|
-
"data-state":
|
|
117
|
+
}, "Checkbox")), Pe = "CheckboxIndicator", Fe = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ E(function(e, t) {
|
|
118
|
+
let { __scopeCheckbox: n, forceMount: r, ...i } = e, a = ke(Pe, n);
|
|
119
|
+
return /* @__PURE__ */ (0, T.jsx)(ne, {
|
|
120
|
+
present: r || D(a.checked) || a.checked === !0,
|
|
121
|
+
children: /* @__PURE__ */ (0, T.jsx)(te.span, {
|
|
122
|
+
"data-state": ze(a.checked),
|
|
123
123
|
"data-disabled": a.disabled ? "" : void 0,
|
|
124
124
|
...i,
|
|
125
125
|
ref: t,
|
|
@@ -129,47 +129,47 @@ var ke = "CheckboxTrigger", Ae = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ D(
|
|
|
129
129
|
}
|
|
130
130
|
})
|
|
131
131
|
});
|
|
132
|
-
}, "CheckboxIndicator")),
|
|
133
|
-
let { control: a, userClick: o, checked: c, defaultChecked: l, required: u, disabled: d, name: f, value:
|
|
134
|
-
|
|
135
|
-
let e =
|
|
132
|
+
}, "CheckboxIndicator")), Ie = "CheckboxBubbleInput", Le = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ E(function({ __scopeCheckbox: e, onClick: t, ...n }, i) {
|
|
133
|
+
let { control: a, userClick: o, checked: c, defaultChecked: l, required: u, disabled: d, name: f, value: ee, form: p, bubbleInput: m, setBubbleInput: h } = ke(Ie, e), g = r(i, h), _ = s(a), v = w.useRef(!1), y = w.useRef(c), b = w.useRef(o), x = w.useRef(null);
|
|
134
|
+
w.useEffect(() => {
|
|
135
|
+
let e = m;
|
|
136
136
|
if (!e) return;
|
|
137
137
|
let t = window.HTMLInputElement.prototype, n = Object.getOwnPropertyDescriptor(t, "checked").set;
|
|
138
138
|
if (!n) return;
|
|
139
|
-
let r =
|
|
140
|
-
|
|
141
|
-
let i = o !== null && o !==
|
|
142
|
-
if (
|
|
139
|
+
let r = y.current !== c;
|
|
140
|
+
y.current = c;
|
|
141
|
+
let i = o !== null && o !== b.current;
|
|
142
|
+
if (b.current = o, i) x.current = r ? null : o, r && (e.indeterminate = D(c), n.call(e, !D(c) && c)), e.dispatchEvent(new Event("click", { bubbles: !o.hasConsumerStoppedPropagation }));
|
|
143
143
|
else if (r) {
|
|
144
|
-
let t =
|
|
145
|
-
|
|
144
|
+
let t = x.current;
|
|
145
|
+
x.current = null;
|
|
146
146
|
let r = t?.requestedChecked === c;
|
|
147
|
-
|
|
147
|
+
v.current = !0, e.indeterminate = D(c), n.call(e, !D(c) && c), e.dispatchEvent(new Event("click", { bubbles: !(r && t.hasConsumerStoppedPropagation) })), v.current = !1;
|
|
148
148
|
}
|
|
149
149
|
}, [
|
|
150
|
-
|
|
150
|
+
m,
|
|
151
151
|
c,
|
|
152
152
|
o
|
|
153
153
|
]);
|
|
154
|
-
let
|
|
155
|
-
return /* @__PURE__ */ (0,
|
|
154
|
+
let ne = w.useRef(!D(c) && c);
|
|
155
|
+
return /* @__PURE__ */ (0, T.jsx)(te.input, {
|
|
156
156
|
type: "checkbox",
|
|
157
157
|
"aria-hidden": !0,
|
|
158
|
-
defaultChecked: l ??
|
|
158
|
+
defaultChecked: l ?? ne.current,
|
|
159
159
|
required: u,
|
|
160
160
|
disabled: d,
|
|
161
161
|
name: f,
|
|
162
|
-
value:
|
|
163
|
-
form:
|
|
162
|
+
value: ee,
|
|
163
|
+
form: p,
|
|
164
164
|
...n,
|
|
165
165
|
tabIndex: -1,
|
|
166
|
-
ref:
|
|
167
|
-
onClick:
|
|
168
|
-
|
|
166
|
+
ref: g,
|
|
167
|
+
onClick: ie(t, (e) => {
|
|
168
|
+
v.current && e.stopPropagation();
|
|
169
169
|
}),
|
|
170
170
|
style: {
|
|
171
171
|
...n.style,
|
|
172
|
-
...
|
|
172
|
+
..._,
|
|
173
173
|
position: "absolute",
|
|
174
174
|
pointerEvents: "none",
|
|
175
175
|
opacity: 0,
|
|
@@ -178,30 +178,30 @@ var ke = "CheckboxTrigger", Ae = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ D(
|
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
180
|
}, "CheckboxBubbleInput"));
|
|
181
|
-
function
|
|
181
|
+
function Re(e) {
|
|
182
182
|
return typeof e == "function";
|
|
183
183
|
}
|
|
184
|
-
|
|
185
|
-
function
|
|
184
|
+
E(Re, "isFunction");
|
|
185
|
+
function D(e) {
|
|
186
186
|
return e === "indeterminate";
|
|
187
187
|
}
|
|
188
|
-
D
|
|
189
|
-
function
|
|
190
|
-
return
|
|
188
|
+
E(D, "isIndeterminate");
|
|
189
|
+
function ze(e) {
|
|
190
|
+
return D(e) ? "indeterminate" : e ? "checked" : "unchecked";
|
|
191
191
|
}
|
|
192
|
-
|
|
192
|
+
E(ze, "getState");
|
|
193
193
|
//#endregion
|
|
194
194
|
//#region src/plugins/core/sanitize-html.ts
|
|
195
|
-
var
|
|
195
|
+
var Be = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix|zotero):|[^a-z]|[-a-z+.]+(?:[^-a-z+.:]|$))/i;
|
|
196
196
|
if (typeof document < "u") {
|
|
197
197
|
let e = "data-temp-href-target";
|
|
198
|
-
|
|
198
|
+
ue.addHook("beforeSanitizeAttributes", (t) => {
|
|
199
199
|
t.tagName === "A" && (t.hasAttribute("target") || t.setAttribute("target", "_self"), t.hasAttribute("target") && t.setAttribute(e, t.getAttribute("target") || ""));
|
|
200
|
-
}),
|
|
200
|
+
}), ue.addHook("afterSanitizeAttributes", (t) => {
|
|
201
201
|
t.tagName === "A" && t.hasAttribute(e) && (t.setAttribute("target", t.getAttribute(e) || ""), t.removeAttribute(e), t.getAttribute("target") === "_blank" && t.setAttribute("rel", "noopener noreferrer"));
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function Ve(e) {
|
|
205
205
|
let t = {
|
|
206
206
|
USE_PROFILES: {
|
|
207
207
|
html: !0,
|
|
@@ -210,7 +210,7 @@ function ze(e) {
|
|
|
210
210
|
},
|
|
211
211
|
ADD_TAGS: ["use"],
|
|
212
212
|
ADD_ATTR: ["href", "xlink:href"],
|
|
213
|
-
ALLOWED_URI_REGEXP:
|
|
213
|
+
ALLOWED_URI_REGEXP: Be,
|
|
214
214
|
FORCE_BODY: !0,
|
|
215
215
|
CUSTOM_ELEMENT_HANDLING: {
|
|
216
216
|
tagNameCheck: /^(marimo-[A-Za-z][\w-]*|iconify-icon)$/,
|
|
@@ -218,59 +218,59 @@ function ze(e) {
|
|
|
218
218
|
},
|
|
219
219
|
SAFE_FOR_XML: !e.includes("marimo-mermaid")
|
|
220
220
|
};
|
|
221
|
-
return
|
|
221
|
+
return ue.sanitize(e, t);
|
|
222
222
|
}
|
|
223
223
|
//#endregion
|
|
224
224
|
//#region src/core/dom/outline.ts
|
|
225
|
-
var
|
|
225
|
+
var He = [
|
|
226
226
|
"marimo-carousel",
|
|
227
227
|
"marimo-tabs",
|
|
228
228
|
"marimo-accordion",
|
|
229
229
|
"marimo-sidebar"
|
|
230
|
-
],
|
|
231
|
-
function
|
|
230
|
+
], Ue = "h1, h2, h3, h4, h5, h6";
|
|
231
|
+
function We(e) {
|
|
232
232
|
if (typeof DOMParser > "u") return null;
|
|
233
|
-
let t = [], n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(
|
|
233
|
+
let t = [], n = new DOMParser().parseFromString(e, "text/html").querySelectorAll(Ue);
|
|
234
234
|
for (let e of Array.from(n)) {
|
|
235
235
|
let n = e.textContent;
|
|
236
|
-
if (
|
|
236
|
+
if (He.some((t) => e.closest(t)) || !n) continue;
|
|
237
237
|
let r = Number.parseInt(e.tagName[1], 10), i = e.innerHTML, a = {
|
|
238
238
|
name: n,
|
|
239
239
|
level: r,
|
|
240
|
-
by:
|
|
240
|
+
by: Ke(e)
|
|
241
241
|
};
|
|
242
|
-
i !== n && (a.html =
|
|
242
|
+
i !== n && (a.html = Ve(i)), t.push(a);
|
|
243
243
|
}
|
|
244
244
|
return { items: t };
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function Ge(e) {
|
|
247
247
|
if (!e.includes("\"")) return `"${e}"`;
|
|
248
248
|
if (!e.includes("'")) return `'${e}'`;
|
|
249
249
|
let t = e.split("\""), n = [];
|
|
250
250
|
for (let [e, r] of t.entries()) r && n.push(`"${r}"`), e < t.length - 1 && n.push("'\"'");
|
|
251
251
|
return `concat(${n.join(", ")})`;
|
|
252
252
|
}
|
|
253
|
-
function
|
|
253
|
+
function Ke(e) {
|
|
254
254
|
let t = e.id;
|
|
255
255
|
if (t) return { id: t };
|
|
256
256
|
let n = e.textContent ?? "";
|
|
257
|
-
return { path: `//${e.tagName}[contains(., ${
|
|
257
|
+
return { path: `//${e.tagName}[contains(., ${Ge(n)})]` };
|
|
258
258
|
}
|
|
259
|
-
function
|
|
259
|
+
function qe(e) {
|
|
260
260
|
return { items: e.filter(Boolean).flatMap((e) => e.items) };
|
|
261
261
|
}
|
|
262
|
-
function
|
|
262
|
+
function Je(e) {
|
|
263
263
|
if (e == null || e.mimetype !== "text/html" && e.mimetype !== "text/markdown" || e.data == null) return null;
|
|
264
264
|
try {
|
|
265
|
-
return
|
|
265
|
+
return C(typeof e.data == "string", "expected string"), We(e.data);
|
|
266
266
|
} catch {
|
|
267
267
|
return t.error("Failed to parse outline"), null;
|
|
268
268
|
}
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Ye(e) {
|
|
271
271
|
return e != null && e.items.some((e) => e.level <= 3);
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function Xe(e, n) {
|
|
274
274
|
let r = (e) => e.items.length === 0 ? 7 : Math.min(...e.items.map((e) => e.level)), i = n[e];
|
|
275
275
|
if (i == null || i.items.length === 0) return t.warn("Failed to find a starting outline"), null;
|
|
276
276
|
let a = r(i), o = e + 1;
|
|
@@ -283,19 +283,19 @@ function Je(e, n) {
|
|
|
283
283
|
}
|
|
284
284
|
//#endregion
|
|
285
285
|
//#region src/core/notebook/replica/connection.ts
|
|
286
|
-
var
|
|
286
|
+
var O = {
|
|
287
287
|
NOT_STARTED: "NOT_STARTED",
|
|
288
288
|
CONNECTING: "CONNECTING",
|
|
289
289
|
OPEN: "OPEN",
|
|
290
290
|
CLOSED: "CLOSED"
|
|
291
|
-
},
|
|
291
|
+
}, Ze = {
|
|
292
292
|
KERNEL_DISCONNECTED: "KERNEL_DISCONNECTED",
|
|
293
293
|
KERNEL_STARTUP_ERROR: "KERNEL_STARTUP_ERROR"
|
|
294
|
-
},
|
|
294
|
+
}, Qe = {
|
|
295
295
|
sourceChanged: !1,
|
|
296
296
|
inputsChanged: !1
|
|
297
297
|
};
|
|
298
|
-
function
|
|
298
|
+
function $e(e) {
|
|
299
299
|
let t = /* @__PURE__ */ new Map();
|
|
300
300
|
for (let n of e.executions.values()) for (let e of n.variables.values()) {
|
|
301
301
|
let n = t.get(e.name);
|
|
@@ -303,8 +303,8 @@ function Ze(e) {
|
|
|
303
303
|
}
|
|
304
304
|
return t;
|
|
305
305
|
}
|
|
306
|
-
function
|
|
307
|
-
let t =
|
|
306
|
+
function et(e) {
|
|
307
|
+
let t = $e(e.executions), n = /* @__PURE__ */ new Map(), r = (t) => e.executions.executions.get(t)?.record;
|
|
308
308
|
function i(e, n) {
|
|
309
309
|
let i = new Set(n).add(e.id);
|
|
310
310
|
for (let [n, a] of Object.entries(e.depends_on)) {
|
|
@@ -341,54 +341,54 @@ function Qe(e) {
|
|
|
341
341
|
}
|
|
342
342
|
return (t) => {
|
|
343
343
|
let n = e.results.get(t)?.record;
|
|
344
|
-
return n == null ?
|
|
344
|
+
return n == null ? Qe : o(n, /* @__PURE__ */ new Set());
|
|
345
345
|
};
|
|
346
346
|
}
|
|
347
347
|
//#endregion
|
|
348
348
|
//#region src/core/executions/output.ts
|
|
349
|
-
var
|
|
350
|
-
function
|
|
349
|
+
var tt = /* @__PURE__ */ new Map(), nt = "application/vnd.marimo+error";
|
|
350
|
+
function k(e) {
|
|
351
351
|
return e;
|
|
352
352
|
}
|
|
353
|
-
function
|
|
353
|
+
function rt(e) {
|
|
354
354
|
return e.map(({ cell_id: e, message: t }) => ({
|
|
355
|
-
cell_id:
|
|
355
|
+
cell_id: k(e),
|
|
356
356
|
message: t
|
|
357
357
|
}));
|
|
358
358
|
}
|
|
359
|
-
function
|
|
359
|
+
function it(e) {
|
|
360
360
|
return e === null ? 0 : Date.parse(e) / 1e3;
|
|
361
361
|
}
|
|
362
|
-
function
|
|
363
|
-
return
|
|
362
|
+
function at(e) {
|
|
363
|
+
return it(e.completed_at ?? e.started_at);
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function ot(e, t) {
|
|
366
366
|
return {
|
|
367
367
|
channel: "output",
|
|
368
368
|
mimetype: t.mimetype,
|
|
369
369
|
data: t.data,
|
|
370
|
-
timestamp:
|
|
370
|
+
timestamp: at(e)
|
|
371
371
|
};
|
|
372
372
|
}
|
|
373
|
-
function
|
|
373
|
+
function A(e, t) {
|
|
374
374
|
return {
|
|
375
375
|
channel: "marimo-error",
|
|
376
|
-
mimetype:
|
|
376
|
+
mimetype: nt,
|
|
377
377
|
data: t,
|
|
378
|
-
timestamp:
|
|
378
|
+
timestamp: at(e)
|
|
379
379
|
};
|
|
380
380
|
}
|
|
381
|
-
function
|
|
381
|
+
function st(e) {
|
|
382
382
|
let t = e.related.at(0);
|
|
383
|
-
return t === void 0 ? null :
|
|
383
|
+
return t === void 0 ? null : k(t.cell_id);
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function ct(e) {
|
|
386
386
|
switch (e.kind) {
|
|
387
387
|
case "exception": return {
|
|
388
388
|
type: "exception",
|
|
389
389
|
exception_type: e.name ?? "Exception",
|
|
390
390
|
msg: e.message,
|
|
391
|
-
raising_cell:
|
|
391
|
+
raising_cell: st(e),
|
|
392
392
|
traceback: e.traceback?.data ?? null
|
|
393
393
|
};
|
|
394
394
|
case "invalid-syntax": return {
|
|
@@ -406,78 +406,78 @@ function ot(e) {
|
|
|
406
406
|
type: "diagnostic",
|
|
407
407
|
kind: e.kind,
|
|
408
408
|
msg: e.message,
|
|
409
|
-
related:
|
|
409
|
+
related: rt(e.related)
|
|
410
410
|
};
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function lt(e, t) {
|
|
414
414
|
let n = t.related[0];
|
|
415
|
-
if (n !== void 0 && t.reason === "upstream-stopped") return
|
|
415
|
+
if (n !== void 0 && t.reason === "upstream-stopped") return A(e, [{
|
|
416
416
|
type: "ancestor-stopped",
|
|
417
417
|
msg: t.message,
|
|
418
|
-
raising_cell:
|
|
418
|
+
raising_cell: k(n.cell_id)
|
|
419
419
|
}]);
|
|
420
420
|
if (n !== void 0 && t.reason === "upstream-failed") {
|
|
421
421
|
let r = t.related.slice(1).find((t) => t.cell_id !== e.cell_id);
|
|
422
|
-
return
|
|
422
|
+
return A(e, [{
|
|
423
423
|
type: "ancestor-prevented",
|
|
424
424
|
msg: t.message,
|
|
425
|
-
raising_cell:
|
|
426
|
-
blamed_cell: r === void 0 ? null :
|
|
425
|
+
raising_cell: k(n.cell_id),
|
|
426
|
+
blamed_cell: r === void 0 ? null : k(r.cell_id)
|
|
427
427
|
}]);
|
|
428
428
|
}
|
|
429
|
-
return
|
|
429
|
+
return A(e, [{
|
|
430
430
|
type: "diagnostic",
|
|
431
431
|
kind: t.reason,
|
|
432
432
|
msg: t.message,
|
|
433
|
-
related:
|
|
433
|
+
related: rt(t.related)
|
|
434
434
|
}]);
|
|
435
435
|
}
|
|
436
|
-
function
|
|
436
|
+
function ut(e, t) {
|
|
437
437
|
let n = e.cell_id === null ? void 0 : t.get(e.cell_id);
|
|
438
438
|
return n !== void 0 && n.code !== null && n.code_fingerprint === e.code_fingerprint ? n.code : void 0;
|
|
439
439
|
}
|
|
440
|
-
function
|
|
441
|
-
let n =
|
|
440
|
+
function dt(e, t = tt) {
|
|
441
|
+
let n = ft(e), r = ut(e, t);
|
|
442
442
|
return n === null || r === void 0 ? n : {
|
|
443
443
|
...n,
|
|
444
444
|
code: r
|
|
445
445
|
};
|
|
446
446
|
}
|
|
447
|
-
function
|
|
447
|
+
function ft(e) {
|
|
448
448
|
let t = e.outcome;
|
|
449
449
|
if (t === null) return null;
|
|
450
450
|
switch (t.kind) {
|
|
451
|
-
case "value": return t.display === null ? null :
|
|
452
|
-
case "error": return
|
|
453
|
-
case "interrupted": return
|
|
454
|
-
case "skipped": return
|
|
451
|
+
case "value": return t.display === null ? null : ot(e, t.display);
|
|
452
|
+
case "error": return A(e, [ct(t.error)]);
|
|
453
|
+
case "interrupted": return A(e, [{ type: "interruption" }]);
|
|
454
|
+
case "skipped": return lt(e, t);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
function
|
|
457
|
+
function pt(e, t) {
|
|
458
458
|
let n = e.executions.latest.get(t), r = n === void 0 ? void 0 : e.executions.executions.get(n);
|
|
459
459
|
if (r !== void 0 && r.record.outcome !== null && r.record.status !== "completed") return r;
|
|
460
460
|
let i = e.results.get(t) ?? null;
|
|
461
461
|
return r?.record.status === "running" && i?.record.outcome?.kind === "skipped" ? null : i;
|
|
462
462
|
}
|
|
463
|
-
function
|
|
463
|
+
function mt(e, t) {
|
|
464
464
|
return e?.execution === t.record.id && e.version === t.outputVersion;
|
|
465
465
|
}
|
|
466
|
-
function
|
|
467
|
-
let n =
|
|
468
|
-
return n === null ||
|
|
466
|
+
function ht(e, t) {
|
|
467
|
+
let n = pt(e, t);
|
|
468
|
+
return n === null || mt(e.cleared.get(t), n) ? null : dt(n.record, e.cells);
|
|
469
469
|
}
|
|
470
|
-
function
|
|
470
|
+
function gt(e) {
|
|
471
471
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Set([...e.results.keys(), ...e.executions.latest.keys()]);
|
|
472
472
|
for (let r of n) {
|
|
473
|
-
let n =
|
|
474
|
-
n !== null && t.set(
|
|
473
|
+
let n = ht(e, r);
|
|
474
|
+
n !== null && t.set(k(r), n);
|
|
475
475
|
}
|
|
476
476
|
return t;
|
|
477
477
|
}
|
|
478
478
|
//#endregion
|
|
479
479
|
//#region src/utils/time.ts
|
|
480
|
-
var
|
|
480
|
+
var _t = class e {
|
|
481
481
|
ms;
|
|
482
482
|
static fromMilliseconds(t) {
|
|
483
483
|
return t == null ? null : new e(t);
|
|
@@ -506,132 +506,127 @@ var ht = class e {
|
|
|
506
506
|
};
|
|
507
507
|
//#endregion
|
|
508
508
|
//#region src/core/executions/select.ts
|
|
509
|
-
function
|
|
509
|
+
function vt(e) {
|
|
510
510
|
let t = e.outcome;
|
|
511
511
|
return t === null ? null : t.kind;
|
|
512
512
|
}
|
|
513
|
-
function
|
|
514
|
-
return e === null ? null :
|
|
513
|
+
function yt(e) {
|
|
514
|
+
return e === null ? null : _t.parse(e).toMilliseconds();
|
|
515
515
|
}
|
|
516
|
-
function
|
|
516
|
+
function bt(e, t) {
|
|
517
517
|
let n = e.latest.get(t);
|
|
518
518
|
return n === void 0 ? null : e.executions.get(n) ?? null;
|
|
519
519
|
}
|
|
520
|
-
function
|
|
520
|
+
function xt(e, t) {
|
|
521
521
|
let n = e.cells.get(t);
|
|
522
522
|
return n !== void 0 && !n.config.disabled && !e.blocked.has(t);
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
if (!
|
|
524
|
+
function St(e, t) {
|
|
525
|
+
if (!xt(e, t)) return !1;
|
|
526
526
|
if (e.requested.has(t)) return !0;
|
|
527
|
-
let n =
|
|
527
|
+
let n = bt(e.executions, t)?.record.run_id ?? e.results.get(t)?.record.run_id;
|
|
528
528
|
for (let r of e.executions.runs.values()) if (r.status !== "completed" && r.id !== n && r.cells.includes(t)) return !0;
|
|
529
529
|
return !1;
|
|
530
530
|
}
|
|
531
|
-
function
|
|
532
|
-
let n =
|
|
533
|
-
n !== null && n.record.status !== "completed" ? (i = n.record.status, a =
|
|
534
|
-
let o = i === "idle", s = o && r !== null && r.started_at !== null && r.completed_at !== null ?
|
|
531
|
+
function Ct(e, t) {
|
|
532
|
+
let n = bt(e.executions, t), r = e.results.get(t)?.record ?? null, i = "idle", a = r === null ? null : yt(r.started_at);
|
|
533
|
+
n !== null && n.record.status !== "completed" ? (i = n.record.status, a = yt(n.record.started_at) ?? a) : St(e, t) && (i = "queued");
|
|
534
|
+
let o = i === "idle", s = o && r !== null && r.started_at !== null && r.completed_at !== null ? _t.parse(r.completed_at).since(_t.parse(r.started_at)) : null;
|
|
535
535
|
return {
|
|
536
536
|
status: i,
|
|
537
537
|
blocked: e.blocked.has(t),
|
|
538
|
-
outcome: o && r !== null ?
|
|
538
|
+
outcome: o && r !== null ? vt(r) : null,
|
|
539
539
|
live: r === null || e.runtimeId === null || r.runtime_id === e.runtimeId,
|
|
540
540
|
startedAt: a,
|
|
541
541
|
duration: s
|
|
542
542
|
};
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function wt(e) {
|
|
545
545
|
return [...e.executions.values()].filter((e) => e.record.status !== "completed");
|
|
546
546
|
}
|
|
547
|
-
function
|
|
548
|
-
return
|
|
547
|
+
function Tt(e) {
|
|
548
|
+
return wt(e).some((e) => e.record.status === "running");
|
|
549
549
|
}
|
|
550
|
-
function
|
|
551
|
-
let t =
|
|
550
|
+
function Et(e) {
|
|
551
|
+
let t = wt(e.executions), n = new Set(t.flatMap((e) => e.record.cell_id === null ? [] : [e.record.cell_id])), r = new Set(e.requested);
|
|
552
552
|
for (let t of e.executions.runs.values()) if (t.status !== "completed") for (let e of t.cells) r.add(e);
|
|
553
553
|
let i = 0;
|
|
554
|
-
for (let t of r) !n.has(t) &&
|
|
554
|
+
for (let t of r) !n.has(t) && St(e, t) && (i += 1);
|
|
555
555
|
return t.length + i;
|
|
556
556
|
}
|
|
557
557
|
//#endregion
|
|
558
558
|
//#region src/core/executions/atoms.ts
|
|
559
|
-
var
|
|
559
|
+
var Dt = {
|
|
560
560
|
runs: /* @__PURE__ */ new Map(),
|
|
561
561
|
executions: /* @__PURE__ */ new Map(),
|
|
562
562
|
latest: /* @__PURE__ */ new Map(),
|
|
563
563
|
results: /* @__PURE__ */ new Map(),
|
|
564
564
|
scratch: null
|
|
565
|
-
},
|
|
566
|
-
function
|
|
567
|
-
return
|
|
565
|
+
}, Ot = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map(), kt = /* @__PURE__ */ new Set(), At = /* @__PURE__ */ new Set(), jt = /* @__PURE__ */ new Set(), Mt = /* @__PURE__ */ new Map(), M = b(null), Nt = b(null);
|
|
566
|
+
function Pt(e, t) {
|
|
567
|
+
return t !== null && e.replica === t.replica && e.id === t.id && e.generation === t.generation;
|
|
568
|
+
}
|
|
569
|
+
function N(e, t, n) {
|
|
570
|
+
return e !== null && Pt(e.notebook, t) ? e.value : n;
|
|
568
571
|
}
|
|
569
|
-
|
|
570
|
-
let t = e
|
|
572
|
+
var P = b((e) => {
|
|
573
|
+
let t = e(p), n = t === null ? null : e(t.notebookAtom);
|
|
571
574
|
return t === null || n === null ? null : {
|
|
572
575
|
replica: t,
|
|
573
|
-
id: n.id
|
|
576
|
+
id: n.id,
|
|
577
|
+
generation: e(t.generationAtom)
|
|
574
578
|
};
|
|
575
|
-
}
|
|
576
|
-
function Pt(e, t) {
|
|
577
|
-
let n = Nt(e);
|
|
578
|
-
return n === null ? null : {
|
|
579
|
-
notebook: n,
|
|
580
|
-
value: t
|
|
581
|
-
};
|
|
582
|
-
}
|
|
579
|
+
});
|
|
583
580
|
function Ft(e, t) {
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
let t = e(
|
|
591
|
-
return r.size === 0 ? Ot : new Set([...r].flatMap((e) => e.cells));
|
|
592
|
-
}), F = x((e) => {
|
|
593
|
-
let t = e(m), n = t === null ? null : e(t.notebookAtom)?.id ?? null, r = t === null ? null : e(t.shownDocumentAtom);
|
|
581
|
+
return Pt(t.notebook, e.get(P));
|
|
582
|
+
}
|
|
583
|
+
var It = b((e) => {
|
|
584
|
+
let t = N(e(M), e(P), kt);
|
|
585
|
+
return t.size === 0 ? At : new Set([...t].flatMap((e) => e.cells));
|
|
586
|
+
}), F = b((e) => {
|
|
587
|
+
let t = e(p), n = t === null ? null : e(t.shownDocumentAtom);
|
|
594
588
|
return {
|
|
595
|
-
executions: t === null ?
|
|
596
|
-
results: t === null ?
|
|
597
|
-
cells:
|
|
589
|
+
executions: t === null ? Dt : e(t.executionsAtom),
|
|
590
|
+
results: t === null ? Ot : e(t.resultsAtom),
|
|
591
|
+
cells: n?.cells ?? j,
|
|
598
592
|
requested: e(It),
|
|
599
|
-
blocked:
|
|
593
|
+
blocked: N(e(Nt), e(P), jt),
|
|
600
594
|
runtimeId: t === null ? null : e(t.runtimeAtom)?.id ?? null
|
|
601
595
|
};
|
|
602
|
-
}), Lt =
|
|
603
|
-
let t = e(
|
|
596
|
+
}), Lt = b((e) => {
|
|
597
|
+
let t = e(p), n = t === null ? null : e(t.shownDocumentAtom);
|
|
604
598
|
return t === null || n === null ? {
|
|
605
|
-
cells:
|
|
606
|
-
executions:
|
|
607
|
-
results:
|
|
599
|
+
cells: j,
|
|
600
|
+
executions: Dt,
|
|
601
|
+
results: Ot
|
|
608
602
|
} : {
|
|
609
603
|
cells: n.cells,
|
|
610
604
|
executions: e(t.executionsAtom),
|
|
611
605
|
results: e(t.resultsAtom)
|
|
612
606
|
};
|
|
613
|
-
}), Rt =
|
|
614
|
-
let t = e(
|
|
607
|
+
}), Rt = b((e) => et(e(Lt))), zt = b(null), Bt = b((e) => {
|
|
608
|
+
let t = e(p), n = t === null ? null : e(t.shownDocumentAtom);
|
|
615
609
|
return t === null || n === null ? null : {
|
|
616
610
|
replica: t,
|
|
617
|
-
id: n.revision.notebook_id
|
|
611
|
+
id: n.revision.notebook_id,
|
|
612
|
+
generation: e(t.generationAtom)
|
|
618
613
|
};
|
|
619
|
-
}), Vt =
|
|
620
|
-
let t = e(
|
|
614
|
+
}), Vt = b((e) => {
|
|
615
|
+
let t = e(p);
|
|
621
616
|
return {
|
|
622
|
-
executions: t === null ?
|
|
623
|
-
results: t === null ?
|
|
624
|
-
cleared:
|
|
625
|
-
cells: t === null ?
|
|
617
|
+
executions: t === null ? Dt : e(t.executionsAtom),
|
|
618
|
+
results: t === null ? Ot : e(t.resultsAtom),
|
|
619
|
+
cleared: N(e(zt), e(Bt), Mt),
|
|
620
|
+
cells: t === null ? j : e(t.documentAtom)?.cells ?? j
|
|
626
621
|
};
|
|
627
|
-
}), Ht =
|
|
622
|
+
}), Ht = b((e) => gt(e(Vt))), I = S((e) => h(Ht, (t) => t.get(e) ?? null, m)), L = S((e) => b((t) => Je(t(I(e)))));
|
|
628
623
|
function Ut(e) {
|
|
629
624
|
I.remove(e), L.remove(e);
|
|
630
625
|
}
|
|
631
626
|
function Wt(e, t) {
|
|
632
627
|
let n = e.get(Vt), r = new Map(n.cleared);
|
|
633
628
|
for (let e of t) {
|
|
634
|
-
let t =
|
|
629
|
+
let t = pt(n, e);
|
|
635
630
|
t?.record.outcome != null && r.set(e, {
|
|
636
631
|
execution: t.record.id,
|
|
637
632
|
version: t.outputVersion
|
|
@@ -643,15 +638,15 @@ function Wt(e, t) {
|
|
|
643
638
|
value: r
|
|
644
639
|
});
|
|
645
640
|
}
|
|
646
|
-
var Gt =
|
|
647
|
-
let t = e(
|
|
641
|
+
var Gt = b((e) => {
|
|
642
|
+
let t = e(p);
|
|
648
643
|
return t === null ? null : e(t.runtimeAtom)?.status ?? null;
|
|
649
644
|
});
|
|
650
|
-
|
|
651
|
-
var Kt =
|
|
652
|
-
let t = e(
|
|
645
|
+
b((e) => Tt(e(F).executions)), b((e) => Et(e(F)));
|
|
646
|
+
var Kt = b((e) => {
|
|
647
|
+
let t = e(p);
|
|
653
648
|
if (t === null) return { refused: "No notebook is connected" };
|
|
654
|
-
if (e(t.connectionAtom).state ===
|
|
649
|
+
if (e(t.connectionAtom).state === O.CLOSED) return { refused: "The notebook is disconnected" };
|
|
655
650
|
if (e(t.notebookAtom) === null) return "waiting";
|
|
656
651
|
let n = e(t.runtimeAtom);
|
|
657
652
|
if (n === null) return { refused: "The notebook has no runtime" };
|
|
@@ -672,30 +667,30 @@ function qt(e) {
|
|
|
672
667
|
});
|
|
673
668
|
}
|
|
674
669
|
function Jt(e, t) {
|
|
675
|
-
let n =
|
|
670
|
+
let n = e.get(P);
|
|
676
671
|
if (n === null) return null;
|
|
677
672
|
let r = {
|
|
678
673
|
notebook: n,
|
|
679
674
|
cells: [...t]
|
|
680
|
-
}, i = e.get(
|
|
681
|
-
return e.set(
|
|
675
|
+
}, i = N(e.get(M), n, kt);
|
|
676
|
+
return e.set(M, {
|
|
682
677
|
notebook: n,
|
|
683
|
-
value: new Set(
|
|
678
|
+
value: new Set(i).add(r)
|
|
684
679
|
}), r;
|
|
685
680
|
}
|
|
686
681
|
function Yt(e, t) {
|
|
687
|
-
let n = e.get(
|
|
682
|
+
let n = e.get(M);
|
|
688
683
|
if (n === null || !n.value.has(t)) return;
|
|
689
684
|
let r = new Set(n.value);
|
|
690
|
-
r.delete(t), e.set(
|
|
685
|
+
r.delete(t), e.set(M, {
|
|
691
686
|
notebook: n.notebook,
|
|
692
687
|
value: r
|
|
693
688
|
});
|
|
694
689
|
}
|
|
695
690
|
function Xt(e, t, n) {
|
|
696
|
-
let
|
|
691
|
+
let r = b((e) => Pt(t.notebook, e(P)) && !e(t.notebook.replica.executionsAtom).runs.has(n.id)), i = e.sub(r, a);
|
|
697
692
|
function a() {
|
|
698
|
-
|
|
693
|
+
e.get(r) || (i(), Yt(e, t));
|
|
699
694
|
}
|
|
700
695
|
a();
|
|
701
696
|
}
|
|
@@ -703,7 +698,12 @@ function Zt(e, t, n) {
|
|
|
703
698
|
let r = e.get(F).blocked;
|
|
704
699
|
if (r.has(t) === n) return;
|
|
705
700
|
let i = new Set(r);
|
|
706
|
-
n ? i.add(t) : i.delete(t)
|
|
701
|
+
n ? i.add(t) : i.delete(t);
|
|
702
|
+
let a = e.get(P);
|
|
703
|
+
a !== null && e.set(Nt, {
|
|
704
|
+
notebook: a,
|
|
705
|
+
value: i
|
|
706
|
+
});
|
|
707
707
|
}
|
|
708
708
|
function Qt(e, t) {
|
|
709
709
|
t.status != null && Zt(e, t.cell_id, t.status === "disabled-transitively");
|
|
@@ -718,7 +718,7 @@ function en(e) {
|
|
|
718
718
|
return n;
|
|
719
719
|
};
|
|
720
720
|
}
|
|
721
|
-
var tn = en(
|
|
721
|
+
var tn = en(he), nn = en(me);
|
|
722
722
|
//#endregion
|
|
723
723
|
//#region src/utils/schedule-task.ts
|
|
724
724
|
function rn() {
|
|
@@ -1040,13 +1040,13 @@ function gn(e, t) {
|
|
|
1040
1040
|
return e instanceof z ? e.appendData(t.data) : z.create(e).appendData(t.data);
|
|
1041
1041
|
}
|
|
1042
1042
|
function _n(e) {
|
|
1043
|
-
|
|
1043
|
+
C(typeof e.data == "string", "expected string output");
|
|
1044
1044
|
}
|
|
1045
1045
|
function vn(e, t) {
|
|
1046
1046
|
let n = 0, r;
|
|
1047
1047
|
for (r = e.length - 1; r >= 0 && n < t; r--) {
|
|
1048
1048
|
let t = e[r];
|
|
1049
|
-
t.mimetype === "text/plain" ? (
|
|
1049
|
+
t.mimetype === "text/plain" ? (C(typeof t.data == "string", "expected string"), n += t.data.split("\n").length) : n++;
|
|
1050
1050
|
}
|
|
1051
1051
|
if (n < t) return e;
|
|
1052
1052
|
let i = r + 1, a = {
|
|
@@ -1057,7 +1057,7 @@ function vn(e, t) {
|
|
|
1057
1057
|
}, o = e[i];
|
|
1058
1058
|
if (o == null) return [a, ...e.slice(i + 1)];
|
|
1059
1059
|
if (o.mimetype === "text/plain") {
|
|
1060
|
-
|
|
1060
|
+
C(typeof o.data == "string", "expected string");
|
|
1061
1061
|
let r = o.data.split("\n"), s = t - (n - r.length);
|
|
1062
1062
|
return [
|
|
1063
1063
|
a,
|
|
@@ -1140,7 +1140,7 @@ var En = "object-id", Dn = "random-id", On = "abcdefghijklmnopqrstuvwxyz", kn =
|
|
|
1140
1140
|
return An.add(t), t;
|
|
1141
1141
|
} }, V = {
|
|
1142
1142
|
create(e) {
|
|
1143
|
-
return
|
|
1143
|
+
return C(e != null, "cellId is required"), `cell-${e}`;
|
|
1144
1144
|
},
|
|
1145
1145
|
parse(e) {
|
|
1146
1146
|
return e.slice(5);
|
|
@@ -1169,15 +1169,15 @@ var Pn = {
|
|
|
1169
1169
|
},
|
|
1170
1170
|
parseOrThrow(e) {
|
|
1171
1171
|
let t = Pn.parse(e);
|
|
1172
|
-
return
|
|
1172
|
+
return C(t, "<marimo-ui-element/> missing object-id attribute"), t;
|
|
1173
1173
|
}
|
|
1174
1174
|
}, Fn = { create(e) {
|
|
1175
1175
|
return `output-${e}`;
|
|
1176
|
-
} }, In =
|
|
1176
|
+
} }, In = b(/* @__PURE__ */ new Set()), H = b([]), U = b([]);
|
|
1177
1177
|
function Ln() {
|
|
1178
1178
|
return `column-${Mn.create()}`;
|
|
1179
1179
|
}
|
|
1180
|
-
var Rn =
|
|
1180
|
+
var Rn = b(null, (e, t, n) => {
|
|
1181
1181
|
let r = Tn(n).length, i = e(H);
|
|
1182
1182
|
if (i.length === r) return;
|
|
1183
1183
|
let a = e(U), o = [...i, ...a].slice(0, r);
|
|
@@ -1198,7 +1198,7 @@ function Bn(e, t, n) {
|
|
|
1198
1198
|
return e.forEach((i, a) => {
|
|
1199
1199
|
let o = t[a];
|
|
1200
1200
|
if (!n.has(i) || !o || o.items.length === 0) return;
|
|
1201
|
-
let s =
|
|
1201
|
+
let s = Xe(a, t);
|
|
1202
1202
|
s !== null && r.set(i, e.slice(a + 1, s[1] + 1));
|
|
1203
1203
|
}), r;
|
|
1204
1204
|
}
|
|
@@ -1213,10 +1213,10 @@ function Vn(e, t, n) {
|
|
|
1213
1213
|
};
|
|
1214
1214
|
}) };
|
|
1215
1215
|
}
|
|
1216
|
-
var Hn =
|
|
1217
|
-
let t = e(
|
|
1216
|
+
var Hn = b((e) => {
|
|
1217
|
+
let t = e(y), n = t === null ? null : e(t.documentAtom), r = e(Ki);
|
|
1218
1218
|
return Vn(zn(n, e(H), e(U)), (e) => r[e] ?? null, e(In));
|
|
1219
|
-
}), Un = () =>
|
|
1219
|
+
}), Un = () => _(Hn), Wn = b((e) => e(Hn).columns.length);
|
|
1220
1220
|
function Gn(e, t) {
|
|
1221
1221
|
return e.columns.find((e) => e.id === t);
|
|
1222
1222
|
}
|
|
@@ -1290,7 +1290,7 @@ function rr(e) {
|
|
|
1290
1290
|
//#endregion
|
|
1291
1291
|
//#region src/core/cells/document.ts
|
|
1292
1292
|
function ir(e, t) {
|
|
1293
|
-
let n = t.code ?? e.code, r =
|
|
1293
|
+
let n = t.code ?? e.code, r = m(e.config, t.config) ? e.config : nr(t.config);
|
|
1294
1294
|
return n === e.code && t.name === e.name && r === e.config ? e : n === e.code ? {
|
|
1295
1295
|
...e,
|
|
1296
1296
|
name: t.name,
|
|
@@ -1303,7 +1303,7 @@ function ir(e, t) {
|
|
|
1303
1303
|
};
|
|
1304
1304
|
}
|
|
1305
1305
|
function ar(e, t) {
|
|
1306
|
-
let n =
|
|
1306
|
+
let n = m(t.order, e.cellIds) ? e.cellIds : [...t.order], { cellData: r, cellRuntime: i, cellHandles: a } = e;
|
|
1307
1307
|
for (let o of n) {
|
|
1308
1308
|
let n = t.cells.get(o), s = e.cellData[o];
|
|
1309
1309
|
if (n === void 0) continue;
|
|
@@ -1321,7 +1321,7 @@ function ar(e, t) {
|
|
|
1321
1321
|
[o]: i[o] ?? rr()
|
|
1322
1322
|
}, a = {
|
|
1323
1323
|
...a,
|
|
1324
|
-
[o]: (0,
|
|
1324
|
+
[o]: (0, w.createRef)()
|
|
1325
1325
|
};
|
|
1326
1326
|
continue;
|
|
1327
1327
|
}
|
|
@@ -1352,23 +1352,23 @@ function or({ store: e, model: t, reconcile: n, signal: r }) {
|
|
|
1352
1352
|
r.addEventListener("abort", a, { once: !0 }), i();
|
|
1353
1353
|
}
|
|
1354
1354
|
async function sr() {
|
|
1355
|
-
let e =
|
|
1356
|
-
e !== null &&
|
|
1355
|
+
let e = v.get(y);
|
|
1356
|
+
e !== null && v.get(e.syncStatusAtom).status !== "unavailable" && await e.flush();
|
|
1357
1357
|
}
|
|
1358
1358
|
//#endregion
|
|
1359
1359
|
//#region src/core/cells/editor.ts
|
|
1360
|
-
var W =
|
|
1360
|
+
var W = b(/* @__PURE__ */ new Set());
|
|
1361
1361
|
function cr(e, t, n) {
|
|
1362
1362
|
return !!e && !t.has(n);
|
|
1363
1363
|
}
|
|
1364
|
-
|
|
1364
|
+
b(null, (e, t, { cellId: n }) => {
|
|
1365
1365
|
t(W, (e) => /* @__PURE__ */ new Set([...e, n]));
|
|
1366
|
-
}),
|
|
1366
|
+
}), b(null, (e, t, { cellId: n }) => e(W).has(n) ? (t(W, (e) => {
|
|
1367
1367
|
let t = new Set(e);
|
|
1368
1368
|
return t.delete(n), t;
|
|
1369
1369
|
}), !0) : !1);
|
|
1370
|
-
var lr =
|
|
1371
|
-
|
|
1370
|
+
var lr = b(/* @__PURE__ */ new Map());
|
|
1371
|
+
b(null, (e, t, { cellId: n }) => {
|
|
1372
1372
|
t(lr, (e) => {
|
|
1373
1373
|
let t = new Map(e);
|
|
1374
1374
|
return t.delete(n), t;
|
|
@@ -1377,7 +1377,7 @@ x(null, (e, t, { cellId: n }) => {
|
|
|
1377
1377
|
//#endregion
|
|
1378
1378
|
//#region ../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/fromUnixTime.js
|
|
1379
1379
|
function ur(e, t) {
|
|
1380
|
-
return
|
|
1380
|
+
return be(e * 1e3, t?.in);
|
|
1381
1381
|
}
|
|
1382
1382
|
//#endregion
|
|
1383
1383
|
//#region ../node_modules/.pnpm/ansi_up@6.0.6/node_modules/ansi_up/ansi_up.js
|
|
@@ -1766,7 +1766,7 @@ function yr(e) {
|
|
|
1766
1766
|
}
|
|
1767
1767
|
//#endregion
|
|
1768
1768
|
//#region src/core/errors/traceback-atom.ts
|
|
1769
|
-
var br =
|
|
1769
|
+
var br = b(null);
|
|
1770
1770
|
//#endregion
|
|
1771
1771
|
//#region src/core/cells/logs.ts
|
|
1772
1772
|
function xr(e) {
|
|
@@ -1810,7 +1810,7 @@ function Cr(e) {
|
|
|
1810
1810
|
message: JSON.stringify(t)
|
|
1811
1811
|
});
|
|
1812
1812
|
});
|
|
1813
|
-
let t = e.output.data.filter((e) => "type" in e && e.type === "exception" || e.type === "internal"), n =
|
|
1813
|
+
let t = e.output.data.filter((e) => "type" in e && e.type === "exception" || e.type === "internal"), n = v.get(_e) === "read";
|
|
1814
1814
|
if (t.length > 0 && !Sr && n) {
|
|
1815
1815
|
Sr = !0;
|
|
1816
1816
|
let e = t.find((e) => e.traceback);
|
|
@@ -1818,10 +1818,10 @@ function Cr(e) {
|
|
|
1818
1818
|
title: "An internal error occurred",
|
|
1819
1819
|
description: e.msg || "Click 'View' to see traceback",
|
|
1820
1820
|
variant: "danger",
|
|
1821
|
-
action:
|
|
1821
|
+
action: w.createElement(ce, {
|
|
1822
1822
|
altText: "View traceback",
|
|
1823
1823
|
onClick: () => {
|
|
1824
|
-
|
|
1824
|
+
v.set(br, {
|
|
1825
1825
|
traceback: e.traceback,
|
|
1826
1826
|
errorMessage: e.msg || "An internal error occurred"
|
|
1827
1827
|
});
|
|
@@ -1910,7 +1910,7 @@ function Fr(e, t, n) {
|
|
|
1910
1910
|
}
|
|
1911
1911
|
function* Ir(e, t, n) {
|
|
1912
1912
|
for (let r of e.cellIds) {
|
|
1913
|
-
let i =
|
|
1913
|
+
let i = Ct(t, r), a = n(r), o = Fr(i, a, e.cellData[r]);
|
|
1914
1914
|
o === null ? a.sourceChanged && Rr(t.executions, r) && (yield [r, "source"]) : yield [r, o];
|
|
1915
1915
|
}
|
|
1916
1916
|
}
|
|
@@ -1942,14 +1942,14 @@ function Vr({ errored: e, interrupted: t, stopped: n, output: r, showErrorTraceb
|
|
|
1942
1942
|
}
|
|
1943
1943
|
//#endregion
|
|
1944
1944
|
//#region src/core/network/requests.ts
|
|
1945
|
-
var Hr =
|
|
1945
|
+
var Hr = b(null);
|
|
1946
1946
|
function Ur() {
|
|
1947
|
-
let e =
|
|
1948
|
-
return
|
|
1947
|
+
let e = _(Hr);
|
|
1948
|
+
return C(e, "useRequestClient() requires setting requestClientAtom."), e;
|
|
1949
1949
|
}
|
|
1950
1950
|
function Wr() {
|
|
1951
|
-
let e =
|
|
1952
|
-
return
|
|
1951
|
+
let e = v.get(Hr);
|
|
1952
|
+
return C(e, "getRequestClient() requires requestClientAtom to be set."), e;
|
|
1953
1953
|
}
|
|
1954
1954
|
//#endregion
|
|
1955
1955
|
//#region src/utils/storage/storage.ts
|
|
@@ -1975,7 +1975,7 @@ var Gr = class {
|
|
|
1975
1975
|
}
|
|
1976
1976
|
};
|
|
1977
1977
|
function Kr() {
|
|
1978
|
-
let { hasLocalStorage: e, hasSessionStorage: t } =
|
|
1978
|
+
let { hasLocalStorage: e, hasSessionStorage: t } = xe();
|
|
1979
1979
|
return e ? window.localStorage : t ? window.sessionStorage : new Gr();
|
|
1980
1980
|
}
|
|
1981
1981
|
var qr = Kr(), Jr = /(https?:\/\/[^\s"<>`{}|\\^]+)/, Yr = /\.(png|jpe?g|gif|webp|svg|ico)(\?.*)?$/i, Xr = /^data:image\//i, Zr = ["avatars.githubusercontent.com"];
|
|
@@ -2068,29 +2068,29 @@ function oi(e) {
|
|
|
2068
2068
|
return ei(e ?? "");
|
|
2069
2069
|
}
|
|
2070
2070
|
function si(e) {
|
|
2071
|
-
return
|
|
2071
|
+
return le.mapValues(e.dataset, (e) => typeof e == "string" ? oi(e) : e);
|
|
2072
2072
|
}
|
|
2073
2073
|
function ci(e, t) {
|
|
2074
2074
|
let n = e.parentElement ? Pn.parse(e.parentElement) : void 0;
|
|
2075
2075
|
return n && t.has(n) ? t.lookupValue(n) : oi(e.dataset.initialValue);
|
|
2076
2076
|
}
|
|
2077
2077
|
function li() {
|
|
2078
|
-
if (
|
|
2079
|
-
if (
|
|
2078
|
+
if (x()) return document.title || null;
|
|
2079
|
+
if (ye()) {
|
|
2080
2080
|
let e = ai.getFilename();
|
|
2081
2081
|
if (e) return e;
|
|
2082
2082
|
}
|
|
2083
2083
|
let e = document.querySelector("marimo-filename");
|
|
2084
|
-
|
|
2084
|
+
ve(e, "marimo-filename tag not found");
|
|
2085
2085
|
let t = e.innerHTML;
|
|
2086
2086
|
return t.length === 0 ? null : t;
|
|
2087
2087
|
}
|
|
2088
2088
|
//#endregion
|
|
2089
2089
|
//#region src/core/saving/file-state.ts
|
|
2090
|
-
var q =
|
|
2091
|
-
|
|
2092
|
-
var ui =
|
|
2093
|
-
|
|
2090
|
+
var q = b(li());
|
|
2091
|
+
b(null);
|
|
2092
|
+
var ui = b(null);
|
|
2093
|
+
b(void 0);
|
|
2094
2094
|
//#endregion
|
|
2095
2095
|
//#region src/utils/storage/typed.ts
|
|
2096
2096
|
var di = class {
|
|
@@ -2140,11 +2140,11 @@ var di = class {
|
|
|
2140
2140
|
filename;
|
|
2141
2141
|
unsubscribeFromFilename;
|
|
2142
2142
|
constructor(e, t, n) {
|
|
2143
|
-
let r =
|
|
2143
|
+
let r = v.get(q);
|
|
2144
2144
|
super(t, n), this.filename = r;
|
|
2145
2145
|
try {
|
|
2146
|
-
this.unsubscribeFromFilename =
|
|
2147
|
-
let t =
|
|
2146
|
+
this.unsubscribeFromFilename = v.sub(q, () => {
|
|
2147
|
+
let t = v.get(q);
|
|
2148
2148
|
this.handleFilenameChange(e, t);
|
|
2149
2149
|
});
|
|
2150
2150
|
} catch {
|
|
@@ -2240,12 +2240,12 @@ function vi(e, t) {
|
|
|
2240
2240
|
anchor: t,
|
|
2241
2241
|
head: t
|
|
2242
2242
|
},
|
|
2243
|
-
effects:
|
|
2243
|
+
effects: fe.scrollIntoView(t, { y: "center" })
|
|
2244
2244
|
});
|
|
2245
2245
|
}), gi(e);
|
|
2246
2246
|
}
|
|
2247
2247
|
function yi(e, t) {
|
|
2248
|
-
let n =
|
|
2248
|
+
let n = pe(e), r = null;
|
|
2249
2249
|
return n.iterate({ enter: (n) => {
|
|
2250
2250
|
if (r !== null) return !1;
|
|
2251
2251
|
if (n.name === J.VariableName && e.doc.sliceString(n.from, n.to) === t) return r = n.from, !1;
|
|
@@ -2410,7 +2410,7 @@ function Ti(e, t) {
|
|
|
2410
2410
|
});
|
|
2411
2411
|
}
|
|
2412
2412
|
function Ei(e, t, n) {
|
|
2413
|
-
let r =
|
|
2413
|
+
let r = pe(e), i = [];
|
|
2414
2414
|
Ti(r, {
|
|
2415
2415
|
state: e,
|
|
2416
2416
|
variableName: t,
|
|
@@ -2433,24 +2433,24 @@ function Oi(e, t) {
|
|
|
2433
2433
|
}
|
|
2434
2434
|
//#endregion
|
|
2435
2435
|
//#region src/core/network/connection.ts
|
|
2436
|
-
var Z =
|
|
2437
|
-
|
|
2436
|
+
var Z = b({ state: O.NOT_STARTED });
|
|
2437
|
+
ee(null, (e, t) => t === null ? null : {
|
|
2438
2438
|
phase: t.phase,
|
|
2439
2439
|
logs: t.log_mode === "append" && e?.phase === t.phase ? e.logs + t.logs : t.logs
|
|
2440
2440
|
});
|
|
2441
2441
|
function ki() {
|
|
2442
|
-
return
|
|
2442
|
+
return oe(Z, (e) => e.state === O.OPEN);
|
|
2443
2443
|
}
|
|
2444
2444
|
function Ai() {
|
|
2445
|
-
return
|
|
2445
|
+
return ge() ? ki() : Promise.resolve();
|
|
2446
2446
|
}
|
|
2447
|
-
|
|
2447
|
+
b((e) => e(Z).state === O.CONNECTING), b((e) => e(Z).state === O.OPEN), b((e) => {
|
|
2448
2448
|
let t = e(Z);
|
|
2449
|
-
return t.state ===
|
|
2450
|
-
}),
|
|
2449
|
+
return t.state === O.OPEN || t.state === O.NOT_STARTED;
|
|
2450
|
+
}), b((e) => e(Z).state === O.CLOSED);
|
|
2451
2451
|
//#endregion
|
|
2452
2452
|
//#region src/components/ui/checkbox.tsx
|
|
2453
|
-
var ji =
|
|
2453
|
+
var ji = w.forwardRef((e, t) => {
|
|
2454
2454
|
let r = (0, $t.c)(13), i, a;
|
|
2455
2455
|
r[0] === e ? (i = r[1], a = r[2]) : ({className: i, ...a} = e, r[0] = e, r[1] = i, r[2] = a);
|
|
2456
2456
|
let o;
|
|
@@ -2458,19 +2458,19 @@ var ji = T.forwardRef((e, t) => {
|
|
|
2458
2458
|
let s;
|
|
2459
2459
|
r[5] === Symbol.for("react.memo_cache_sentinel") ? (s = n("flex items-center justify-center text-current max-h-[14px] overflow-hidden"), r[5] = s) : s = r[5];
|
|
2460
2460
|
let c;
|
|
2461
|
-
r[6] === a.checked ? c = r[7] : (c = /* @__PURE__ */ (0,
|
|
2461
|
+
r[6] === a.checked ? c = r[7] : (c = /* @__PURE__ */ (0, T.jsx)(Fe, {
|
|
2462
2462
|
className: s,
|
|
2463
|
-
children: a.checked === "indeterminate" ? /* @__PURE__ */ (0,
|
|
2463
|
+
children: a.checked === "indeterminate" ? /* @__PURE__ */ (0, T.jsx)(Ce, { className: "h-4 w-4" }) : /* @__PURE__ */ (0, T.jsx)(l, { className: "h-4 w-4" })
|
|
2464
2464
|
}), r[6] = a.checked, r[7] = c);
|
|
2465
2465
|
let u;
|
|
2466
|
-
return r[8] !== a || r[9] !== t || r[10] !== o || r[11] !== c ? (u = /* @__PURE__ */ (0,
|
|
2466
|
+
return r[8] !== a || r[9] !== t || r[10] !== o || r[11] !== c ? (u = /* @__PURE__ */ (0, T.jsx)(Ne, {
|
|
2467
2467
|
ref: t,
|
|
2468
2468
|
className: o,
|
|
2469
2469
|
...a,
|
|
2470
2470
|
children: c
|
|
2471
2471
|
}), r[8] = a, r[9] = t, r[10] = o, r[11] = c, r[12] = u) : u = r[12], u;
|
|
2472
2472
|
});
|
|
2473
|
-
ji.displayName =
|
|
2473
|
+
ji.displayName = Ne.displayName;
|
|
2474
2474
|
//#endregion
|
|
2475
2475
|
//#region src/core/cells/scrollCellIntoView.ts
|
|
2476
2476
|
function Mi({ cellId: e, cell: n, isCodeHidden: r, codeFocus: i, variableName: a }) {
|
|
@@ -2552,7 +2552,7 @@ function Ii(e) {
|
|
|
2552
2552
|
...e.cellRuntime
|
|
2553
2553
|
},
|
|
2554
2554
|
cellHandles: {
|
|
2555
|
-
[B]: (0,
|
|
2555
|
+
[B]: (0, w.createRef)(),
|
|
2556
2556
|
...e.cellHandles
|
|
2557
2557
|
}
|
|
2558
2558
|
};
|
|
@@ -2568,7 +2568,7 @@ function Li() {
|
|
|
2568
2568
|
cellLogs: []
|
|
2569
2569
|
});
|
|
2570
2570
|
}
|
|
2571
|
-
var { reducer: Ri, createActions: zi, useActions: Bi, valueAtom: Q } =
|
|
2571
|
+
var { reducer: Ri, createActions: zi, useActions: Bi, valueAtom: Q } = de(Li, {
|
|
2572
2572
|
prepareForRun: (e, t) => Hi({
|
|
2573
2573
|
state: e,
|
|
2574
2574
|
cellId: t.cellId,
|
|
@@ -2620,7 +2620,7 @@ var { reducer: Ri, createActions: zi, useActions: Bi, valueAtom: Q } = ue(Li, {
|
|
|
2620
2620
|
});
|
|
2621
2621
|
},
|
|
2622
2622
|
resetCellRuntimes: (e) => {
|
|
2623
|
-
let t =
|
|
2623
|
+
let t = ye(), n = { ...e.cellRuntime };
|
|
2624
2624
|
for (let r of [...e.cellIds, B]) {
|
|
2625
2625
|
let i = e.cellRuntime[r];
|
|
2626
2626
|
n[r] = t && i !== void 0 && i.consoleOutputs.length > 0 ? i : rr();
|
|
@@ -2637,7 +2637,7 @@ var { reducer: Ri, createActions: zi, useActions: Bi, valueAtom: Q } = ue(Li, {
|
|
|
2637
2637
|
return Mi({
|
|
2638
2638
|
cellId: n,
|
|
2639
2639
|
cell: e.cellHandles[n],
|
|
2640
|
-
isCodeHidden: cr(e.cellData[n]?.config.hide_code,
|
|
2640
|
+
isCodeHidden: cr(e.cellData[n]?.config.hide_code, v.get(W), n),
|
|
2641
2641
|
codeFocus: void 0,
|
|
2642
2642
|
variableName: void 0
|
|
2643
2643
|
}), {
|
|
@@ -2678,17 +2678,17 @@ function Hi({ state: e, cellId: n, cellReducer: r }) {
|
|
|
2678
2678
|
} : (t.warn(`Cell ${n} not found in state`), e);
|
|
2679
2679
|
}
|
|
2680
2680
|
var Ui = zi((e) => {
|
|
2681
|
-
|
|
2682
|
-
}).addLogs, $ =
|
|
2683
|
-
|
|
2684
|
-
var Wi =
|
|
2685
|
-
|
|
2686
|
-
var Gi =
|
|
2681
|
+
v.set(Q, (t) => Ri(t, e));
|
|
2682
|
+
}).addLogs, $ = b((e) => e(Q).cellIds);
|
|
2683
|
+
b((e) => e($).length === 1), b((e) => jr(e(Q)).length > 0), b((e) => Mr(e(Q)).length > 0), b((e) => Nr(e(Q))), b((e) => Pr(e(Q)));
|
|
2684
|
+
var Wi = b((e) => Lr(e(Q), e(F), e(Rt)));
|
|
2685
|
+
b((e) => e(Wi) !== null);
|
|
2686
|
+
var Gi = b((e) => {
|
|
2687
2687
|
let { cellIds: t, cellData: n } = e(Q);
|
|
2688
2688
|
return t.map((t) => {
|
|
2689
2689
|
let r = e(I(t)), { name: i } = n[t];
|
|
2690
2690
|
if (r !== null && R(r.mimetype)) {
|
|
2691
|
-
|
|
2691
|
+
C(Array.isArray(r.data), "Expected array data");
|
|
2692
2692
|
let e = r.data.filter((e) => !e.type.includes("ancestor"));
|
|
2693
2693
|
if (e.length > 0) return {
|
|
2694
2694
|
output: {
|
|
@@ -2701,31 +2701,31 @@ var Gi = x((e) => {
|
|
|
2701
2701
|
}
|
|
2702
2702
|
return null;
|
|
2703
2703
|
}).filter(Boolean);
|
|
2704
|
-
}), Ki =
|
|
2704
|
+
}), Ki = se(b((e) => {
|
|
2705
2705
|
let t = {};
|
|
2706
2706
|
for (let n of e($)) {
|
|
2707
2707
|
let r = e(L(n));
|
|
2708
2708
|
r !== null && r.items.length > 0 && (t[n] = r);
|
|
2709
2709
|
}
|
|
2710
2710
|
return t;
|
|
2711
|
-
})), qi =
|
|
2712
|
-
|
|
2713
|
-
var Ji =
|
|
2711
|
+
})), qi = b((e) => qe(e($).map((t) => e(L(t)))));
|
|
2712
|
+
b((e) => e(Gi).length);
|
|
2713
|
+
var Ji = se(b((e) => {
|
|
2714
2714
|
let { cellIds: t, cellData: n } = e(Q);
|
|
2715
|
-
return
|
|
2715
|
+
return le.fromEntries(t.map((e) => [e, n[e]?.name]));
|
|
2716
2716
|
}));
|
|
2717
|
-
|
|
2718
|
-
var Yi = () =>
|
|
2719
|
-
let { cellIds: e, cellData: t } =
|
|
2717
|
+
b((e) => e(Q).scrollKey);
|
|
2718
|
+
var Yi = () => _($), Xi = () => _(Ji), Zi = () => v.get(Q), Qi = () => v.get(Q).cellIds, $i = () => {
|
|
2719
|
+
let { cellIds: e, cellData: t } = v.get(Q);
|
|
2720
2720
|
return e.map((e) => t[e]?.name).filter(Boolean);
|
|
2721
2721
|
};
|
|
2722
|
-
|
|
2723
|
-
var ea =
|
|
2722
|
+
g(h(Q, (e) => e.cellIds.map((t) => e.cellData[t]))), b((e) => e(Q).cellIds.length > 0);
|
|
2723
|
+
var ea = S((e) => b((t) => t(Q).cellData[e])), ta = S((e) => b((t) => t(Q).cellRuntime[e])), na = S((e) => b((t) => t(Q).cellHandles[e]));
|
|
2724
2724
|
function ra(e) {
|
|
2725
2725
|
ea.remove(e), ta.remove(e), na.remove(e), Ut(e);
|
|
2726
2726
|
}
|
|
2727
2727
|
var ia = (e) => {
|
|
2728
|
-
let { cellHandles: t } =
|
|
2728
|
+
let { cellHandles: t } = v.get(Q);
|
|
2729
2729
|
return t[e].current?.editorView;
|
|
2730
2730
|
}, aa = (e) => (sn.promote(e), ia(e));
|
|
2731
2731
|
function oa() {
|
|
@@ -2785,4 +2785,4 @@ function ma(e) {
|
|
|
2785
2785
|
return e.tracebackHtml && t.push(K(e.tracebackHtml)), e.errorData.length > 0 && t.push(e.errorData.map(pa).join("\n\n")), t.join("\n\n");
|
|
2786
2786
|
}
|
|
2787
2787
|
//#endregion
|
|
2788
|
-
export { K as $,
|
|
2788
|
+
export { K as $, Ce as $t, Oi as A, Dn as At, ei as B, Wt as Bt, Ni as C, Fn as Ct, Z as D, Pn as Dt, ji as E, jn as Et, q as F, F as Ft, Hr as G, qt as Gt, Qr as H, Qt as Ht, ui as I, Rt as It, Ar as J, Ze as Jt, Ur as K, Yt as Kt, oi as L, L as Lt, pi as M, Sn as Mt, di as N, Cn as Nt, ki as O, Nn as Ot, fi as P, Xt as Pt, yr as Q, Ve as Qt, si as R, I as Rt, Mi as S, Mn as St, Pi as T, B as Tt, qr as U, Jt as Ut, ti as V, Ft as Vt, Wr as W, Gt as Wt, Vr as X, Ye as Xt, Br as Y, O as Yt, Er as Z, Ke as Zt, Ri as _, Jn as _t, Ui as a, or as at, Xi as b, Wn as bt, zi as c, er as ct, $i as d, H as dt, Se as en, fr as et, Qi as f, Kn as ft, qi as g, Yn as gt, Q as h, qn as ht, da as i, sr as it, hi as j, wn as jt, Ai as k, En as kt, aa as l, Zn as lt, Li as m, Gn as mt, ma as n, lr as nt, ea as o, $n as ot, Zi as p, U as pt, zr as q, Ct as qt, pa as r, W as rt, $ as s, Qn as st, fa as t, cr as tt, ia as u, In as ut, ra as v, Hn as vt, Fi as w, V as wt, oa as x, Un as xt, Yi as y, Ln as yt, ci as z, Vt as zt };
|