@pie-players/pie-section-player-tools-shared 0.3.17 → 0.3.19
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/DebugPanelToggles.svelte +20 -0
- package/SharedFloatingPanel.svelte +115 -8
- package/dist/index.js +1099 -1031
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
1
|
var rs = Object.defineProperty;
|
|
2
|
-
var
|
|
2
|
+
var Xn = (e) => {
|
|
3
3
|
throw TypeError(e);
|
|
4
4
|
};
|
|
5
5
|
var ss = (e, t, n) => t in e ? rs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
6
|
-
var
|
|
7
|
-
var h = (e, t, n) => (
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const is = 1, os = 2,
|
|
11
|
-
var
|
|
12
|
-
const
|
|
6
|
+
var Fe = (e, t, n) => ss(e, typeof t != "symbol" ? t + "" : t, n), fn = (e, t, n) => t.has(e) || Xn("Cannot " + n);
|
|
7
|
+
var h = (e, t, n) => (fn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), F = (e, t, n) => t.has(e) ? Xn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), Ce = (e, t, n, r) => (fn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), Re = (e, t, n) => (fn(e, t, "access private method"), n);
|
|
8
|
+
var tr;
|
|
9
|
+
typeof window < "u" && ((tr = window.__svelte ?? (window.__svelte = {})).v ?? (tr.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const is = 1, os = 2, nr = 4, as = 8, ls = 16, fs = 1, us = 2, V = /* @__PURE__ */ Symbol(), rr = "http://www.w3.org/1999/xhtml", pn = !1;
|
|
11
|
+
var sr = Array.isArray, cs = Array.prototype.indexOf, pt = Array.prototype.includes, Mn = Array.from, un = Object.getOwnPropertyDescriptor, ds = Object.getOwnPropertyDescriptors, vs = Object.prototype, hs = Array.prototype, ir = Object.getPrototypeOf;
|
|
12
|
+
const Kt = () => {
|
|
13
13
|
};
|
|
14
14
|
function _s(e) {
|
|
15
15
|
for (var t = 0; t < e.length; t++)
|
|
16
16
|
e[t]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function or() {
|
|
19
19
|
var e, t, n = new Promise((r, s) => {
|
|
20
20
|
e = r, t = s;
|
|
21
21
|
});
|
|
22
22
|
return { promise: n, resolve: e, reject: t };
|
|
23
23
|
}
|
|
24
|
-
const
|
|
24
|
+
const W = 2, xt = 4, Nt = 8, Tn = 1 << 24, Ue = 16, ye = 32, Et = 64, ps = 128, de = 512, X = 1024, G = 2048, Me = 4096, Z = 8192, De = 16384, St = 32768, mt = 65536, Wn = 1 << 17, ms = 1 << 18, rn = 1 << 19, gs = 1 << 20, ke = 1 << 25, nt = 65536, mn = 1 << 21, Cn = 1 << 22, Ye = 1 << 23, cn = /* @__PURE__ */ Symbol("$state"), ws = /* @__PURE__ */ Symbol(""), Ze = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
Fe(this, "name", "StaleReactionError");
|
|
28
|
+
Fe(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
30
|
}(), bs = (
|
|
31
31
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
32
32
|
!!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
|
|
33
33
|
);
|
|
34
|
-
function
|
|
34
|
+
function ar(e) {
|
|
35
35
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
36
36
|
}
|
|
37
37
|
function ys() {
|
|
@@ -52,31 +52,31 @@ function ks(e) {
|
|
|
52
52
|
function Ms() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Ts() {
|
|
56
56
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Cs() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Rs() {
|
|
62
62
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function lr(e) {
|
|
65
65
|
return e === this.v;
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function As(e, t) {
|
|
68
68
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
69
69
|
}
|
|
70
|
-
function
|
|
71
|
-
return !
|
|
70
|
+
function fr(e) {
|
|
71
|
+
return !As(e, this.v);
|
|
72
72
|
}
|
|
73
|
-
let Is = !1,
|
|
74
|
-
function
|
|
75
|
-
|
|
73
|
+
let Is = !1, he = null;
|
|
74
|
+
function Jt(e) {
|
|
75
|
+
he = e;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
|
|
79
|
-
p:
|
|
77
|
+
function Rn(e, t = !1, n) {
|
|
78
|
+
he = {
|
|
79
|
+
p: he,
|
|
80
80
|
i: !1,
|
|
81
81
|
c: null,
|
|
82
82
|
e: null,
|
|
@@ -85,48 +85,48 @@ function Mn(e, t = !1, n) {
|
|
|
85
85
|
l: null
|
|
86
86
|
};
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function An(e) {
|
|
89
89
|
var t = (
|
|
90
90
|
/** @type {ComponentContext} */
|
|
91
|
-
|
|
91
|
+
he
|
|
92
92
|
), n = t.e;
|
|
93
93
|
if (n !== null) {
|
|
94
94
|
t.e = null;
|
|
95
95
|
for (var r of n)
|
|
96
|
-
|
|
96
|
+
Er(r);
|
|
97
97
|
}
|
|
98
|
-
return t.i = !0,
|
|
98
|
+
return t.i = !0, he = t.p, /** @type {T} */
|
|
99
99
|
{};
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function ur() {
|
|
102
102
|
return !0;
|
|
103
103
|
}
|
|
104
|
-
let
|
|
105
|
-
function
|
|
106
|
-
var e =
|
|
107
|
-
|
|
104
|
+
let at = [];
|
|
105
|
+
function Ps() {
|
|
106
|
+
var e = at;
|
|
107
|
+
at = [], _s(e);
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
if (
|
|
111
|
-
var t =
|
|
109
|
+
function gn(e) {
|
|
110
|
+
if (at.length === 0) {
|
|
111
|
+
var t = at;
|
|
112
112
|
queueMicrotask(() => {
|
|
113
|
-
t ===
|
|
113
|
+
t === at && Ps();
|
|
114
114
|
});
|
|
115
115
|
}
|
|
116
|
-
|
|
116
|
+
at.push(e);
|
|
117
117
|
}
|
|
118
|
-
function
|
|
119
|
-
var t =
|
|
118
|
+
function Ds(e) {
|
|
119
|
+
var t = R;
|
|
120
120
|
if (t === null)
|
|
121
|
-
return
|
|
122
|
-
if ((t.f &
|
|
121
|
+
return E.f |= Ye, e;
|
|
122
|
+
if ((t.f & St) === 0 && (t.f & xt) === 0)
|
|
123
123
|
throw e;
|
|
124
|
-
|
|
124
|
+
Qt(e, t);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Qt(e, t) {
|
|
127
127
|
for (; t !== null; ) {
|
|
128
128
|
if ((t.f & ps) !== 0) {
|
|
129
|
-
if ((t.f &
|
|
129
|
+
if ((t.f & St) === 0)
|
|
130
130
|
throw e;
|
|
131
131
|
try {
|
|
132
132
|
t.b.error(e);
|
|
@@ -140,78 +140,78 @@ function Wt(e, t) {
|
|
|
140
140
|
throw e;
|
|
141
141
|
}
|
|
142
142
|
const Ns = -7169;
|
|
143
|
-
function
|
|
143
|
+
function L(e, t) {
|
|
144
144
|
e.f = e.f & Ns | t;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
147
|
-
(e.f &
|
|
146
|
+
function In(e) {
|
|
147
|
+
(e.f & de) !== 0 || e.deps === null ? L(e, X) : L(e, Me);
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function cr(e) {
|
|
150
150
|
if (e !== null)
|
|
151
151
|
for (const t of e)
|
|
152
|
-
(t.f &
|
|
152
|
+
(t.f & W) === 0 || (t.f & nt) === 0 || (t.f ^= nt, cr(
|
|
153
153
|
/** @type {Derived} */
|
|
154
154
|
t.deps
|
|
155
155
|
));
|
|
156
156
|
}
|
|
157
|
-
function
|
|
158
|
-
(e.f &
|
|
157
|
+
function zs(e, t, n) {
|
|
158
|
+
(e.f & G) !== 0 ? t.add(e) : (e.f & Me) !== 0 && n.add(e), cr(e.deps), L(e, X);
|
|
159
159
|
}
|
|
160
|
-
const
|
|
161
|
-
let
|
|
162
|
-
var
|
|
163
|
-
const
|
|
160
|
+
const Wt = /* @__PURE__ */ new Set();
|
|
161
|
+
let I = null, ge = null, ue = [], Pn = null, gt = null, Ls = 1;
|
|
162
|
+
var je, ct, Qe, dt, vt, ht, Be, Ee, _t, ee, wn, bn, yn, xn;
|
|
163
|
+
const Hn = class Hn {
|
|
164
164
|
constructor() {
|
|
165
|
-
|
|
165
|
+
F(this, ee);
|
|
166
166
|
// for debugging. TODO remove once async is stable
|
|
167
|
-
|
|
167
|
+
Fe(this, "id", Ls++);
|
|
168
168
|
/**
|
|
169
169
|
* The current values of any sources that are updated in this batch
|
|
170
170
|
* They keys of this map are identical to `this.#previous`
|
|
171
171
|
* @type {Map<Source, any>}
|
|
172
172
|
*/
|
|
173
|
-
|
|
173
|
+
Fe(this, "current", /* @__PURE__ */ new Map());
|
|
174
174
|
/**
|
|
175
175
|
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
176
176
|
* They keys of this map are identical to `this.#current`
|
|
177
177
|
* @type {Map<Source, any>}
|
|
178
178
|
*/
|
|
179
|
-
|
|
179
|
+
Fe(this, "previous", /* @__PURE__ */ new Map());
|
|
180
180
|
/**
|
|
181
181
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
182
182
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
183
183
|
* @type {Set<(batch: Batch) => void>}
|
|
184
184
|
*/
|
|
185
|
-
|
|
185
|
+
F(this, je, /* @__PURE__ */ new Set());
|
|
186
186
|
/**
|
|
187
187
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
188
188
|
* @type {Set<(batch: Batch) => void>}
|
|
189
189
|
*/
|
|
190
|
-
|
|
190
|
+
F(this, ct, /* @__PURE__ */ new Set());
|
|
191
191
|
/**
|
|
192
192
|
* The number of async effects that are currently in flight
|
|
193
193
|
*/
|
|
194
|
-
|
|
194
|
+
F(this, Qe, 0);
|
|
195
195
|
/**
|
|
196
196
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
197
197
|
*/
|
|
198
|
-
|
|
198
|
+
F(this, dt, 0);
|
|
199
199
|
/**
|
|
200
200
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
201
201
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
202
202
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
203
203
|
*/
|
|
204
|
-
|
|
204
|
+
F(this, vt, null);
|
|
205
205
|
/**
|
|
206
206
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
207
207
|
* @type {Set<Effect>}
|
|
208
208
|
*/
|
|
209
|
-
|
|
209
|
+
F(this, ht, /* @__PURE__ */ new Set());
|
|
210
210
|
/**
|
|
211
211
|
* Deferred effects that are MAYBE_DIRTY
|
|
212
212
|
* @type {Set<Effect>}
|
|
213
213
|
*/
|
|
214
|
-
|
|
214
|
+
F(this, Be, /* @__PURE__ */ new Set());
|
|
215
215
|
/**
|
|
216
216
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
217
217
|
* is committed — we skip over these during `process`.
|
|
@@ -219,16 +219,16 @@ const Fn = class Fn {
|
|
|
219
219
|
* so they can be rescheduled if the branch survives.
|
|
220
220
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
221
221
|
*/
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
222
|
+
F(this, Ee, /* @__PURE__ */ new Map());
|
|
223
|
+
Fe(this, "is_fork", !1);
|
|
224
|
+
F(this, _t, !1);
|
|
225
225
|
}
|
|
226
226
|
/**
|
|
227
227
|
* Add an effect to the #skipped_branches map and reset its children
|
|
228
228
|
* @param {Effect} effect
|
|
229
229
|
*/
|
|
230
230
|
skip_effect(t) {
|
|
231
|
-
h(this,
|
|
231
|
+
h(this, Ee).has(t) || h(this, Ee).set(t, { d: [], m: [] });
|
|
232
232
|
}
|
|
233
233
|
/**
|
|
234
234
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
@@ -236,13 +236,13 @@ const Fn = class Fn {
|
|
|
236
236
|
* @param {Effect} effect
|
|
237
237
|
*/
|
|
238
238
|
unskip_effect(t) {
|
|
239
|
-
var n = h(this,
|
|
239
|
+
var n = h(this, Ee).get(t);
|
|
240
240
|
if (n) {
|
|
241
|
-
h(this,
|
|
241
|
+
h(this, Ee).delete(t);
|
|
242
242
|
for (var r of n.d)
|
|
243
|
-
|
|
243
|
+
L(r, G), Ve(r);
|
|
244
244
|
for (r of n.m)
|
|
245
|
-
|
|
245
|
+
L(r, Me), Ve(r);
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
248
|
/**
|
|
@@ -250,20 +250,20 @@ const Fn = class Fn {
|
|
|
250
250
|
* @param {Effect[]} root_effects
|
|
251
251
|
*/
|
|
252
252
|
process(t) {
|
|
253
|
-
|
|
254
|
-
var n =
|
|
253
|
+
ue = [], this.apply();
|
|
254
|
+
var n = gt = [], r = [];
|
|
255
255
|
for (const s of t)
|
|
256
|
-
|
|
257
|
-
if (
|
|
258
|
-
|
|
259
|
-
for (const [s, i] of h(this,
|
|
260
|
-
|
|
256
|
+
Re(this, ee, bn).call(this, s, n, r);
|
|
257
|
+
if (gt = null, Re(this, ee, wn).call(this)) {
|
|
258
|
+
Re(this, ee, yn).call(this, r), Re(this, ee, yn).call(this, n);
|
|
259
|
+
for (const [s, i] of h(this, Ee))
|
|
260
|
+
hr(s, i);
|
|
261
261
|
} else {
|
|
262
|
-
|
|
263
|
-
for (const s of h(this,
|
|
264
|
-
h(this,
|
|
262
|
+
I = null;
|
|
263
|
+
for (const s of h(this, je)) s(this);
|
|
264
|
+
h(this, je).clear(), h(this, Qe) === 0 && Re(this, ee, xn).call(this), Un(r), Un(n), h(this, ht).clear(), h(this, Be).clear(), h(this, vt)?.resolve();
|
|
265
265
|
}
|
|
266
|
-
|
|
266
|
+
ge = null;
|
|
267
267
|
}
|
|
268
268
|
/**
|
|
269
269
|
* Associate a change to a given source with the current
|
|
@@ -272,75 +272,75 @@ const Fn = class Fn {
|
|
|
272
272
|
* @param {any} value
|
|
273
273
|
*/
|
|
274
274
|
capture(t, n) {
|
|
275
|
-
n !==
|
|
275
|
+
n !== V && !this.previous.has(t) && this.previous.set(t, n), (t.f & Ye) === 0 && (this.current.set(t, t.v), ge?.set(t, t.v));
|
|
276
276
|
}
|
|
277
277
|
activate() {
|
|
278
|
-
|
|
278
|
+
I = this, this.apply();
|
|
279
279
|
}
|
|
280
280
|
deactivate() {
|
|
281
|
-
|
|
281
|
+
I === this && (I = null, ge = null);
|
|
282
282
|
}
|
|
283
283
|
flush() {
|
|
284
|
-
if (
|
|
285
|
-
|
|
286
|
-
else if (h(this,
|
|
287
|
-
for (const t of h(this,
|
|
288
|
-
h(this,
|
|
284
|
+
if (ue.length > 0)
|
|
285
|
+
I = this, Os();
|
|
286
|
+
else if (h(this, Qe) === 0 && !this.is_fork) {
|
|
287
|
+
for (const t of h(this, je)) t(this);
|
|
288
|
+
h(this, je).clear(), Re(this, ee, xn).call(this), h(this, vt)?.resolve();
|
|
289
289
|
}
|
|
290
290
|
this.deactivate();
|
|
291
291
|
}
|
|
292
292
|
discard() {
|
|
293
|
-
for (const t of h(this,
|
|
294
|
-
h(this,
|
|
293
|
+
for (const t of h(this, ct)) t(this);
|
|
294
|
+
h(this, ct).clear();
|
|
295
295
|
}
|
|
296
296
|
/**
|
|
297
297
|
*
|
|
298
298
|
* @param {boolean} blocking
|
|
299
299
|
*/
|
|
300
300
|
increment(t) {
|
|
301
|
-
|
|
301
|
+
Ce(this, Qe, h(this, Qe) + 1), t && Ce(this, dt, h(this, dt) + 1);
|
|
302
302
|
}
|
|
303
303
|
/**
|
|
304
304
|
*
|
|
305
305
|
* @param {boolean} blocking
|
|
306
306
|
*/
|
|
307
307
|
decrement(t) {
|
|
308
|
-
|
|
309
|
-
|
|
308
|
+
Ce(this, Qe, h(this, Qe) - 1), t && Ce(this, dt, h(this, dt) - 1), !h(this, _t) && (Ce(this, _t, !0), gn(() => {
|
|
309
|
+
Ce(this, _t, !1), Re(this, ee, wn).call(this) ? ue.length > 0 && this.flush() : this.revive();
|
|
310
310
|
}));
|
|
311
311
|
}
|
|
312
312
|
revive() {
|
|
313
|
-
for (const t of h(this,
|
|
314
|
-
h(this,
|
|
315
|
-
for (const t of h(this,
|
|
316
|
-
|
|
313
|
+
for (const t of h(this, ht))
|
|
314
|
+
h(this, Be).delete(t), L(t, G), Ve(t);
|
|
315
|
+
for (const t of h(this, Be))
|
|
316
|
+
L(t, Me), Ve(t);
|
|
317
317
|
this.flush();
|
|
318
318
|
}
|
|
319
319
|
/** @param {(batch: Batch) => void} fn */
|
|
320
320
|
oncommit(t) {
|
|
321
|
-
h(this,
|
|
321
|
+
h(this, je).add(t);
|
|
322
322
|
}
|
|
323
323
|
/** @param {(batch: Batch) => void} fn */
|
|
324
324
|
ondiscard(t) {
|
|
325
|
-
h(this,
|
|
325
|
+
h(this, ct).add(t);
|
|
326
326
|
}
|
|
327
327
|
settled() {
|
|
328
|
-
return (h(this,
|
|
328
|
+
return (h(this, vt) ?? Ce(this, vt, or())).promise;
|
|
329
329
|
}
|
|
330
330
|
static ensure() {
|
|
331
|
-
if (
|
|
332
|
-
const t =
|
|
333
|
-
|
|
334
|
-
|
|
331
|
+
if (I === null) {
|
|
332
|
+
const t = I = new Hn();
|
|
333
|
+
Wt.add(I), gn(() => {
|
|
334
|
+
I === t && t.flush();
|
|
335
335
|
});
|
|
336
336
|
}
|
|
337
|
-
return
|
|
337
|
+
return I;
|
|
338
338
|
}
|
|
339
339
|
apply() {
|
|
340
340
|
}
|
|
341
341
|
};
|
|
342
|
-
|
|
343
|
-
return this.is_fork || h(this,
|
|
342
|
+
je = new WeakMap(), ct = new WeakMap(), Qe = new WeakMap(), dt = new WeakMap(), vt = new WeakMap(), ht = new WeakMap(), Be = new WeakMap(), Ee = new WeakMap(), _t = new WeakMap(), ee = new WeakSet(), wn = function() {
|
|
343
|
+
return this.is_fork || h(this, dt) > 0;
|
|
344
344
|
}, /**
|
|
345
345
|
* Traverse the effect tree, executing effects or stashing
|
|
346
346
|
* them for later execution as appropriate
|
|
@@ -348,12 +348,12 @@ Oe = new WeakMap(), at = new WeakMap(), Ke = new WeakMap(), ft = new WeakMap(),
|
|
|
348
348
|
* @param {Effect[]} effects
|
|
349
349
|
* @param {Effect[]} render_effects
|
|
350
350
|
*/
|
|
351
|
-
|
|
352
|
-
t.f ^=
|
|
351
|
+
bn = function(t, n, r) {
|
|
352
|
+
t.f ^= X;
|
|
353
353
|
for (var s = t.first; s !== null; ) {
|
|
354
|
-
var i = s.f, o = (i & (
|
|
354
|
+
var i = s.f, o = (i & (ye | Et)) !== 0, l = o && (i & X) !== 0, a = (i & Z) !== 0, f = l || h(this, Ee).has(s);
|
|
355
355
|
if (!f && s.fn !== null) {
|
|
356
|
-
o ?
|
|
356
|
+
o ? a || (s.f ^= X) : (i & xt) !== 0 ? n.push(s) : (i & (Nt | Tn)) !== 0 && a ? r.push(s) : Bt(s) && (yt(s), (i & Ue) !== 0 && (h(this, Be).add(s), a && L(s, G)));
|
|
357
357
|
var u = s.first;
|
|
358
358
|
if (u !== null) {
|
|
359
359
|
s = u;
|
|
@@ -372,122 +372,122 @@ pn = function(t, n, r) {
|
|
|
372
372
|
}, /**
|
|
373
373
|
* @param {Effect[]} effects
|
|
374
374
|
*/
|
|
375
|
-
|
|
375
|
+
yn = function(t) {
|
|
376
376
|
for (var n = 0; n < t.length; n += 1)
|
|
377
|
-
|
|
378
|
-
},
|
|
377
|
+
zs(t[n], h(this, ht), h(this, Be));
|
|
378
|
+
}, xn = function() {
|
|
379
379
|
var i;
|
|
380
|
-
if (
|
|
380
|
+
if (Wt.size > 1) {
|
|
381
381
|
this.previous.clear();
|
|
382
|
-
var t =
|
|
383
|
-
for (const o of
|
|
382
|
+
var t = I, n = ge, r = !0;
|
|
383
|
+
for (const o of Wt) {
|
|
384
384
|
if (o === this) {
|
|
385
385
|
r = !1;
|
|
386
386
|
continue;
|
|
387
387
|
}
|
|
388
|
-
const
|
|
388
|
+
const l = [];
|
|
389
389
|
for (const [f, u] of this.current) {
|
|
390
390
|
if (o.current.has(f))
|
|
391
391
|
if (r && u !== o.current.get(f))
|
|
392
392
|
o.current.set(f, u);
|
|
393
393
|
else
|
|
394
394
|
continue;
|
|
395
|
-
|
|
395
|
+
l.push(f);
|
|
396
396
|
}
|
|
397
|
-
if (
|
|
397
|
+
if (l.length === 0)
|
|
398
398
|
continue;
|
|
399
|
-
const
|
|
400
|
-
if (
|
|
401
|
-
var s =
|
|
402
|
-
|
|
399
|
+
const a = [...o.current.keys()].filter((f) => !this.current.has(f));
|
|
400
|
+
if (a.length > 0) {
|
|
401
|
+
var s = ue;
|
|
402
|
+
ue = [];
|
|
403
403
|
const f = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
|
|
404
|
-
for (const c of
|
|
405
|
-
|
|
406
|
-
if (
|
|
407
|
-
|
|
408
|
-
for (const c of
|
|
409
|
-
|
|
404
|
+
for (const c of l)
|
|
405
|
+
dr(c, a, f, u);
|
|
406
|
+
if (ue.length > 0) {
|
|
407
|
+
I = o, o.apply();
|
|
408
|
+
for (const c of ue)
|
|
409
|
+
Re(i = o, ee, bn).call(i, c, [], []);
|
|
410
410
|
o.deactivate();
|
|
411
411
|
}
|
|
412
|
-
|
|
412
|
+
ue = s;
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
|
|
415
|
+
I = t, ge = n;
|
|
416
416
|
}
|
|
417
|
-
h(this,
|
|
417
|
+
h(this, Ee).clear(), Wt.delete(this);
|
|
418
418
|
};
|
|
419
|
-
let
|
|
420
|
-
function
|
|
419
|
+
let $t = Hn;
|
|
420
|
+
function Os() {
|
|
421
421
|
var e = null;
|
|
422
422
|
try {
|
|
423
|
-
for (var t = 0;
|
|
424
|
-
var n =
|
|
423
|
+
for (var t = 0; ue.length > 0; ) {
|
|
424
|
+
var n = $t.ensure();
|
|
425
425
|
if (t++ > 1e3) {
|
|
426
426
|
var r, s;
|
|
427
|
-
|
|
427
|
+
qs();
|
|
428
428
|
}
|
|
429
|
-
n.process(
|
|
429
|
+
n.process(ue), Xe.clear();
|
|
430
430
|
}
|
|
431
431
|
} finally {
|
|
432
|
-
|
|
432
|
+
ue = [], Pn = null, gt = null;
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
|
-
function
|
|
435
|
+
function qs() {
|
|
436
436
|
try {
|
|
437
437
|
Ms();
|
|
438
438
|
} catch (e) {
|
|
439
|
-
|
|
439
|
+
Qt(e, Pn);
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
|
-
let
|
|
443
|
-
function
|
|
442
|
+
let Ae = null;
|
|
443
|
+
function Un(e) {
|
|
444
444
|
var t = e.length;
|
|
445
445
|
if (t !== 0) {
|
|
446
446
|
for (var n = 0; n < t; ) {
|
|
447
447
|
var r = e[n++];
|
|
448
|
-
if ((r.f & (
|
|
449
|
-
|
|
450
|
-
for (const s of
|
|
451
|
-
if ((s.f & (
|
|
448
|
+
if ((r.f & (De | Z)) === 0 && Bt(r) && (Ae = /* @__PURE__ */ new Set(), yt(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && kr(r), Ae?.size > 0)) {
|
|
449
|
+
Xe.clear();
|
|
450
|
+
for (const s of Ae) {
|
|
451
|
+
if ((s.f & (De | Z)) !== 0) continue;
|
|
452
452
|
const i = [s];
|
|
453
453
|
let o = s.parent;
|
|
454
454
|
for (; o !== null; )
|
|
455
|
-
|
|
456
|
-
for (let
|
|
457
|
-
const
|
|
458
|
-
(
|
|
455
|
+
Ae.has(o) && (Ae.delete(o), i.push(o)), o = o.parent;
|
|
456
|
+
for (let l = i.length - 1; l >= 0; l--) {
|
|
457
|
+
const a = i[l];
|
|
458
|
+
(a.f & (De | Z)) === 0 && yt(a);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
|
|
461
|
+
Ae.clear();
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
|
-
|
|
464
|
+
Ae = null;
|
|
465
465
|
}
|
|
466
466
|
}
|
|
467
|
-
function
|
|
467
|
+
function dr(e, t, n, r) {
|
|
468
468
|
if (!n.has(e) && (n.add(e), e.reactions !== null))
|
|
469
469
|
for (const s of e.reactions) {
|
|
470
470
|
const i = s.f;
|
|
471
|
-
(i &
|
|
471
|
+
(i & W) !== 0 ? dr(
|
|
472
472
|
/** @type {Derived} */
|
|
473
473
|
s,
|
|
474
474
|
t,
|
|
475
475
|
n,
|
|
476
476
|
r
|
|
477
|
-
) : (i & (
|
|
477
|
+
) : (i & (Cn | Ue)) !== 0 && (i & G) === 0 && vr(s, t, r) && (L(s, G), Ve(
|
|
478
478
|
/** @type {Effect} */
|
|
479
479
|
s
|
|
480
480
|
));
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
|
-
function
|
|
483
|
+
function vr(e, t, n) {
|
|
484
484
|
const r = n.get(e);
|
|
485
485
|
if (r !== void 0) return r;
|
|
486
486
|
if (e.deps !== null)
|
|
487
487
|
for (const s of e.deps) {
|
|
488
|
-
if (
|
|
488
|
+
if (pt.call(t, s))
|
|
489
489
|
return !0;
|
|
490
|
-
if ((s.f &
|
|
490
|
+
if ((s.f & W) !== 0 && vr(
|
|
491
491
|
/** @type {Derived} */
|
|
492
492
|
s,
|
|
493
493
|
t,
|
|
@@ -501,34 +501,34 @@ function cr(e, t, n) {
|
|
|
501
501
|
}
|
|
502
502
|
return n.set(e, !1), !1;
|
|
503
503
|
}
|
|
504
|
-
function
|
|
505
|
-
var t =
|
|
506
|
-
if (n?.is_pending && (e.f & (
|
|
504
|
+
function Ve(e) {
|
|
505
|
+
var t = Pn = e, n = t.b;
|
|
506
|
+
if (n?.is_pending && (e.f & (xt | Nt | Tn)) !== 0 && (e.f & St) === 0) {
|
|
507
507
|
n.defer_effect(e);
|
|
508
508
|
return;
|
|
509
509
|
}
|
|
510
510
|
for (; t.parent !== null; ) {
|
|
511
511
|
t = t.parent;
|
|
512
512
|
var r = t.f;
|
|
513
|
-
if (
|
|
513
|
+
if (gt !== null && t === R && (e.f & Nt) === 0)
|
|
514
514
|
return;
|
|
515
|
-
if ((r & (
|
|
516
|
-
if ((r &
|
|
515
|
+
if ((r & (Et | ye)) !== 0) {
|
|
516
|
+
if ((r & X) === 0)
|
|
517
517
|
return;
|
|
518
|
-
t.f ^=
|
|
518
|
+
t.f ^= X;
|
|
519
519
|
}
|
|
520
520
|
}
|
|
521
|
-
|
|
521
|
+
ue.push(t);
|
|
522
522
|
}
|
|
523
|
-
function
|
|
524
|
-
if (!((e.f &
|
|
525
|
-
(e.f &
|
|
523
|
+
function hr(e, t) {
|
|
524
|
+
if (!((e.f & ye) !== 0 && (e.f & X) !== 0)) {
|
|
525
|
+
(e.f & G) !== 0 ? t.d.push(e) : (e.f & Me) !== 0 && t.m.push(e), L(e, X);
|
|
526
526
|
for (var n = e.first; n !== null; )
|
|
527
|
-
|
|
527
|
+
hr(n, t), n = n.next;
|
|
528
528
|
}
|
|
529
529
|
}
|
|
530
|
-
function
|
|
531
|
-
const s =
|
|
530
|
+
function Fs(e, t, n, r) {
|
|
531
|
+
const s = Dn;
|
|
532
532
|
var i = e.filter((c) => !c.settled);
|
|
533
533
|
if (n.length === 0 && i.length === 0) {
|
|
534
534
|
r(t.map(s));
|
|
@@ -536,120 +536,120 @@ function zs(e, t, n, r) {
|
|
|
536
536
|
}
|
|
537
537
|
var o = (
|
|
538
538
|
/** @type {Effect} */
|
|
539
|
-
|
|
540
|
-
),
|
|
539
|
+
R
|
|
540
|
+
), l = Hs(), a = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((c) => c.promise)) : null;
|
|
541
541
|
function f(c) {
|
|
542
|
-
|
|
542
|
+
l();
|
|
543
543
|
try {
|
|
544
544
|
r(c);
|
|
545
545
|
} catch (v) {
|
|
546
|
-
(o.f &
|
|
546
|
+
(o.f & De) === 0 && Qt(v, o);
|
|
547
547
|
}
|
|
548
|
-
|
|
548
|
+
En();
|
|
549
549
|
}
|
|
550
550
|
if (n.length === 0) {
|
|
551
|
-
|
|
551
|
+
a.then(() => f(t.map(s)));
|
|
552
552
|
return;
|
|
553
553
|
}
|
|
554
554
|
function u() {
|
|
555
|
-
|
|
555
|
+
l(), Promise.all(n.map((c) => /* @__PURE__ */ Bs(c))).then((c) => f([...t.map(s), ...c])).catch((c) => Qt(c, o));
|
|
556
556
|
}
|
|
557
|
-
|
|
557
|
+
a ? a.then(u) : u();
|
|
558
558
|
}
|
|
559
559
|
function Hs() {
|
|
560
|
-
var e =
|
|
560
|
+
var e = R, t = E, n = he, r = I;
|
|
561
561
|
return function(i = !0) {
|
|
562
|
-
|
|
562
|
+
bt(e), We(t), Jt(n), i && r?.activate();
|
|
563
563
|
};
|
|
564
564
|
}
|
|
565
|
-
function
|
|
566
|
-
|
|
565
|
+
function En(e = !0) {
|
|
566
|
+
bt(null), We(null), Jt(null), e && I?.deactivate();
|
|
567
567
|
}
|
|
568
568
|
function js() {
|
|
569
569
|
var e = (
|
|
570
570
|
/** @type {Boundary} */
|
|
571
571
|
/** @type {Effect} */
|
|
572
|
-
|
|
572
|
+
R.b
|
|
573
573
|
), t = (
|
|
574
574
|
/** @type {Batch} */
|
|
575
|
-
|
|
575
|
+
I
|
|
576
576
|
), n = e.is_rendered();
|
|
577
577
|
return e.update_pending_count(1), t.increment(n), () => {
|
|
578
578
|
e.update_pending_count(-1), t.decrement(n);
|
|
579
579
|
};
|
|
580
580
|
}
|
|
581
581
|
// @__NO_SIDE_EFFECTS__
|
|
582
|
-
function
|
|
583
|
-
var t =
|
|
582
|
+
function Dn(e) {
|
|
583
|
+
var t = W | G, n = E !== null && (E.f & W) !== 0 ? (
|
|
584
584
|
/** @type {Derived} */
|
|
585
|
-
|
|
585
|
+
E
|
|
586
586
|
) : null;
|
|
587
|
-
return
|
|
588
|
-
ctx:
|
|
587
|
+
return R !== null && (R.f |= rn), {
|
|
588
|
+
ctx: he,
|
|
589
589
|
deps: null,
|
|
590
590
|
effects: null,
|
|
591
|
-
equals:
|
|
591
|
+
equals: lr,
|
|
592
592
|
f: t,
|
|
593
593
|
fn: e,
|
|
594
594
|
reactions: null,
|
|
595
595
|
rv: 0,
|
|
596
596
|
v: (
|
|
597
597
|
/** @type {V} */
|
|
598
|
-
|
|
598
|
+
V
|
|
599
599
|
),
|
|
600
600
|
wv: 0,
|
|
601
|
-
parent: n ??
|
|
601
|
+
parent: n ?? R,
|
|
602
602
|
ac: null
|
|
603
603
|
};
|
|
604
604
|
}
|
|
605
605
|
// @__NO_SIDE_EFFECTS__
|
|
606
606
|
function Bs(e, t, n) {
|
|
607
607
|
/** @type {Effect | null} */
|
|
608
|
-
|
|
608
|
+
R === null && ys();
|
|
609
609
|
var s = (
|
|
610
610
|
/** @type {Promise<V>} */
|
|
611
611
|
/** @type {unknown} */
|
|
612
612
|
void 0
|
|
613
|
-
), i =
|
|
613
|
+
), i = zt(
|
|
614
614
|
/** @type {V} */
|
|
615
|
-
|
|
616
|
-
), o = !
|
|
615
|
+
V
|
|
616
|
+
), o = !E, l = /* @__PURE__ */ new Map();
|
|
617
617
|
return ri(() => {
|
|
618
|
-
var
|
|
619
|
-
s =
|
|
618
|
+
var a = or();
|
|
619
|
+
s = a.promise;
|
|
620
620
|
try {
|
|
621
|
-
Promise.resolve(e()).then(
|
|
621
|
+
Promise.resolve(e()).then(a.resolve, a.reject).finally(En);
|
|
622
622
|
} catch (v) {
|
|
623
|
-
|
|
623
|
+
a.reject(v), En();
|
|
624
624
|
}
|
|
625
625
|
var f = (
|
|
626
626
|
/** @type {Batch} */
|
|
627
|
-
|
|
627
|
+
I
|
|
628
628
|
);
|
|
629
629
|
if (o) {
|
|
630
630
|
var u = js();
|
|
631
|
-
|
|
631
|
+
l.get(f)?.reject(Ze), l.delete(f), l.set(f, a);
|
|
632
632
|
}
|
|
633
|
-
const c = (v,
|
|
634
|
-
if (f.activate(),
|
|
635
|
-
|
|
633
|
+
const c = (v, m = void 0) => {
|
|
634
|
+
if (f.activate(), m)
|
|
635
|
+
m !== Ze && (i.f |= Ye, Lt(i, m));
|
|
636
636
|
else {
|
|
637
|
-
(i.f &
|
|
638
|
-
for (const [p,
|
|
639
|
-
if (
|
|
640
|
-
|
|
637
|
+
(i.f & Ye) !== 0 && (i.f ^= Ye), Lt(i, v);
|
|
638
|
+
for (const [p, k] of l) {
|
|
639
|
+
if (l.delete(p), p === f) break;
|
|
640
|
+
k.reject(Ze);
|
|
641
641
|
}
|
|
642
642
|
}
|
|
643
643
|
u && u();
|
|
644
644
|
};
|
|
645
|
-
|
|
645
|
+
a.promise.then(c, (v) => c(null, v || "unknown"));
|
|
646
646
|
}), ti(() => {
|
|
647
|
-
for (const
|
|
648
|
-
|
|
649
|
-
}), new Promise((
|
|
647
|
+
for (const a of l.values())
|
|
648
|
+
a.reject(Ze);
|
|
649
|
+
}), new Promise((a) => {
|
|
650
650
|
function f(u) {
|
|
651
651
|
function c() {
|
|
652
|
-
u === s ?
|
|
652
|
+
u === s ? a(i) : f(s);
|
|
653
653
|
}
|
|
654
654
|
u.then(c, c);
|
|
655
655
|
}
|
|
@@ -657,21 +657,21 @@ function Bs(e, t, n) {
|
|
|
657
657
|
});
|
|
658
658
|
}
|
|
659
659
|
// @__NO_SIDE_EFFECTS__
|
|
660
|
-
function
|
|
661
|
-
const t = /* @__PURE__ */
|
|
662
|
-
return
|
|
660
|
+
function lt(e) {
|
|
661
|
+
const t = /* @__PURE__ */ Dn(e);
|
|
662
|
+
return Rr(t), t;
|
|
663
663
|
}
|
|
664
664
|
// @__NO_SIDE_EFFECTS__
|
|
665
665
|
function Vs(e) {
|
|
666
|
-
const t = /* @__PURE__ */
|
|
667
|
-
return t.equals =
|
|
666
|
+
const t = /* @__PURE__ */ Dn(e);
|
|
667
|
+
return t.equals = fr, t;
|
|
668
668
|
}
|
|
669
669
|
function Ys(e) {
|
|
670
670
|
var t = e.effects;
|
|
671
671
|
if (t !== null) {
|
|
672
672
|
e.effects = null;
|
|
673
673
|
for (var n = 0; n < t.length; n += 1)
|
|
674
|
-
|
|
674
|
+
Ne(
|
|
675
675
|
/** @type {Effect} */
|
|
676
676
|
t[n]
|
|
677
677
|
);
|
|
@@ -679,8 +679,8 @@ function Ys(e) {
|
|
|
679
679
|
}
|
|
680
680
|
function Xs(e) {
|
|
681
681
|
for (var t = e.parent; t !== null; ) {
|
|
682
|
-
if ((t.f &
|
|
683
|
-
return (t.f &
|
|
682
|
+
if ((t.f & W) === 0)
|
|
683
|
+
return (t.f & De) === 0 ? (
|
|
684
684
|
/** @type {Effect} */
|
|
685
685
|
t
|
|
686
686
|
) : null;
|
|
@@ -688,172 +688,172 @@ function Xs(e) {
|
|
|
688
688
|
}
|
|
689
689
|
return null;
|
|
690
690
|
}
|
|
691
|
-
function
|
|
692
|
-
var t, n =
|
|
693
|
-
|
|
691
|
+
function Nn(e) {
|
|
692
|
+
var t, n = R;
|
|
693
|
+
bt(Xs(e));
|
|
694
694
|
try {
|
|
695
|
-
e.f &= ~
|
|
695
|
+
e.f &= ~nt, Ys(e), t = Dr(e);
|
|
696
696
|
} finally {
|
|
697
|
-
|
|
697
|
+
bt(n);
|
|
698
698
|
}
|
|
699
699
|
return t;
|
|
700
700
|
}
|
|
701
|
-
function
|
|
702
|
-
var t =
|
|
703
|
-
if (!e.equals(t) && (e.wv =
|
|
704
|
-
|
|
701
|
+
function _r(e) {
|
|
702
|
+
var t = Nn(e);
|
|
703
|
+
if (!e.equals(t) && (e.wv = Ir(), (!I?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
|
|
704
|
+
L(e, X);
|
|
705
705
|
return;
|
|
706
706
|
}
|
|
707
|
-
|
|
707
|
+
rt || (ge !== null ? (xr() || I?.is_fork) && ge.set(e, t) : In(e));
|
|
708
708
|
}
|
|
709
709
|
function Ws(e) {
|
|
710
710
|
if (e.effects !== null)
|
|
711
711
|
for (const t of e.effects)
|
|
712
|
-
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(
|
|
712
|
+
(t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Ze), t.teardown = Kt, t.ac = null, qt(t, 0), Ln(t));
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function pr(e) {
|
|
715
715
|
if (e.effects !== null)
|
|
716
716
|
for (const t of e.effects)
|
|
717
|
-
t.teardown &&
|
|
717
|
+
t.teardown && yt(t);
|
|
718
718
|
}
|
|
719
|
-
let
|
|
720
|
-
const
|
|
721
|
-
let
|
|
722
|
-
function
|
|
719
|
+
let Sn = /* @__PURE__ */ new Set();
|
|
720
|
+
const Xe = /* @__PURE__ */ new Map();
|
|
721
|
+
let mr = !1;
|
|
722
|
+
function zt(e, t) {
|
|
723
723
|
var n = {
|
|
724
724
|
f: 0,
|
|
725
725
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
726
726
|
v: e,
|
|
727
727
|
reactions: null,
|
|
728
|
-
equals:
|
|
728
|
+
equals: lr,
|
|
729
729
|
rv: 0,
|
|
730
730
|
wv: 0
|
|
731
731
|
};
|
|
732
732
|
return n;
|
|
733
733
|
}
|
|
734
734
|
// @__NO_SIDE_EFFECTS__
|
|
735
|
-
function
|
|
736
|
-
const n =
|
|
737
|
-
return
|
|
735
|
+
function A(e, t) {
|
|
736
|
+
const n = zt(e);
|
|
737
|
+
return Rr(n), n;
|
|
738
738
|
}
|
|
739
739
|
// @__NO_SIDE_EFFECTS__
|
|
740
740
|
function Us(e, t = !1, n = !0) {
|
|
741
|
-
const r =
|
|
742
|
-
return t || (r.equals =
|
|
741
|
+
const r = zt(e);
|
|
742
|
+
return t || (r.equals = fr), r;
|
|
743
743
|
}
|
|
744
744
|
function b(e, t, n = !1) {
|
|
745
|
-
|
|
745
|
+
E !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
746
746
|
// to ensure we error if state is set inside an inspect effect
|
|
747
|
-
(!
|
|
748
|
-
let r = n ?
|
|
749
|
-
return
|
|
747
|
+
(!we || (E.f & Wn) !== 0) && ur() && (E.f & (W | Ue | Cn | Wn)) !== 0 && (ve === null || !pt.call(ve, e)) && Rs();
|
|
748
|
+
let r = n ? Pe(t) : t;
|
|
749
|
+
return Lt(e, r);
|
|
750
750
|
}
|
|
751
|
-
function
|
|
751
|
+
function Lt(e, t) {
|
|
752
752
|
if (!e.equals(t)) {
|
|
753
753
|
var n = e.v;
|
|
754
|
-
|
|
755
|
-
var r =
|
|
756
|
-
if (r.capture(e, n), (e.f &
|
|
754
|
+
rt ? Xe.set(e, t) : Xe.set(e, n), e.v = t;
|
|
755
|
+
var r = $t.ensure();
|
|
756
|
+
if (r.capture(e, n), (e.f & W) !== 0) {
|
|
757
757
|
const s = (
|
|
758
758
|
/** @type {Derived} */
|
|
759
759
|
e
|
|
760
760
|
);
|
|
761
|
-
(e.f &
|
|
761
|
+
(e.f & G) !== 0 && Nn(s), In(s);
|
|
762
762
|
}
|
|
763
|
-
e.wv =
|
|
763
|
+
e.wv = Ir(), gr(e, G), R !== null && (R.f & X) !== 0 && (R.f & (ye | Et)) === 0 && (fe === null ? oi([e]) : fe.push(e)), !r.is_fork && Sn.size > 0 && !mr && Gs();
|
|
764
764
|
}
|
|
765
765
|
return t;
|
|
766
766
|
}
|
|
767
767
|
function Gs() {
|
|
768
|
-
|
|
769
|
-
for (const e of
|
|
770
|
-
(e.f &
|
|
771
|
-
|
|
768
|
+
mr = !1;
|
|
769
|
+
for (const e of Sn)
|
|
770
|
+
(e.f & X) !== 0 && L(e, Me), Bt(e) && yt(e);
|
|
771
|
+
Sn.clear();
|
|
772
772
|
}
|
|
773
|
-
function
|
|
773
|
+
function dn(e) {
|
|
774
774
|
b(e, e.v + 1);
|
|
775
775
|
}
|
|
776
|
-
function
|
|
776
|
+
function gr(e, t) {
|
|
777
777
|
var n = e.reactions;
|
|
778
778
|
if (n !== null)
|
|
779
779
|
for (var r = n.length, s = 0; s < r; s++) {
|
|
780
|
-
var i = n[s], o = i.f,
|
|
781
|
-
if (
|
|
782
|
-
var
|
|
780
|
+
var i = n[s], o = i.f, l = (o & G) === 0;
|
|
781
|
+
if (l && L(i, t), (o & W) !== 0) {
|
|
782
|
+
var a = (
|
|
783
783
|
/** @type {Derived} */
|
|
784
784
|
i
|
|
785
785
|
);
|
|
786
|
-
|
|
787
|
-
} else
|
|
786
|
+
ge?.delete(a), (o & nt) === 0 && (o & de && (i.f |= nt), gr(a, Me));
|
|
787
|
+
} else l && ((o & Ue) !== 0 && Ae !== null && Ae.add(
|
|
788
788
|
/** @type {Effect} */
|
|
789
789
|
i
|
|
790
|
-
),
|
|
790
|
+
), Ve(
|
|
791
791
|
/** @type {Effect} */
|
|
792
792
|
i
|
|
793
793
|
));
|
|
794
794
|
}
|
|
795
795
|
}
|
|
796
|
-
function
|
|
797
|
-
if (typeof e != "object" || e === null ||
|
|
796
|
+
function Pe(e) {
|
|
797
|
+
if (typeof e != "object" || e === null || cn in e)
|
|
798
798
|
return e;
|
|
799
|
-
const t =
|
|
799
|
+
const t = ir(e);
|
|
800
800
|
if (t !== vs && t !== hs)
|
|
801
801
|
return e;
|
|
802
|
-
var n = /* @__PURE__ */ new Map(), r =
|
|
803
|
-
if (
|
|
804
|
-
return
|
|
805
|
-
var
|
|
806
|
-
|
|
807
|
-
var u =
|
|
808
|
-
return
|
|
802
|
+
var n = /* @__PURE__ */ new Map(), r = sr(e), s = /* @__PURE__ */ A(0), i = et, o = (l) => {
|
|
803
|
+
if (et === i)
|
|
804
|
+
return l();
|
|
805
|
+
var a = E, f = et;
|
|
806
|
+
We(null), Kn(i);
|
|
807
|
+
var u = l();
|
|
808
|
+
return We(a), Kn(f), u;
|
|
809
809
|
};
|
|
810
|
-
return r && n.set("length", /* @__PURE__ */
|
|
810
|
+
return r && n.set("length", /* @__PURE__ */ A(
|
|
811
811
|
/** @type {any[]} */
|
|
812
812
|
e.length
|
|
813
813
|
)), new Proxy(
|
|
814
814
|
/** @type {any} */
|
|
815
815
|
e,
|
|
816
816
|
{
|
|
817
|
-
defineProperty(
|
|
818
|
-
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) &&
|
|
819
|
-
var u = n.get(
|
|
817
|
+
defineProperty(l, a, f) {
|
|
818
|
+
(!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && Ts();
|
|
819
|
+
var u = n.get(a);
|
|
820
820
|
return u === void 0 ? o(() => {
|
|
821
|
-
var c = /* @__PURE__ */
|
|
822
|
-
return n.set(
|
|
821
|
+
var c = /* @__PURE__ */ A(f.value);
|
|
822
|
+
return n.set(a, c), c;
|
|
823
823
|
}) : b(u, f.value, !0), !0;
|
|
824
824
|
},
|
|
825
|
-
deleteProperty(
|
|
826
|
-
var f = n.get(
|
|
825
|
+
deleteProperty(l, a) {
|
|
826
|
+
var f = n.get(a);
|
|
827
827
|
if (f === void 0) {
|
|
828
|
-
if (
|
|
829
|
-
const u = o(() => /* @__PURE__ */
|
|
830
|
-
n.set(
|
|
828
|
+
if (a in l) {
|
|
829
|
+
const u = o(() => /* @__PURE__ */ A(V));
|
|
830
|
+
n.set(a, u), dn(s);
|
|
831
831
|
}
|
|
832
832
|
} else
|
|
833
|
-
b(f,
|
|
833
|
+
b(f, V), dn(s);
|
|
834
834
|
return !0;
|
|
835
835
|
},
|
|
836
|
-
get(
|
|
837
|
-
if (
|
|
836
|
+
get(l, a, f) {
|
|
837
|
+
if (a === cn)
|
|
838
838
|
return e;
|
|
839
|
-
var u = n.get(
|
|
840
|
-
if (u === void 0 && (!c ||
|
|
841
|
-
var
|
|
839
|
+
var u = n.get(a), c = a in l;
|
|
840
|
+
if (u === void 0 && (!c || un(l, a)?.writable) && (u = o(() => {
|
|
841
|
+
var m = Pe(c ? l[a] : V), p = /* @__PURE__ */ A(m);
|
|
842
842
|
return p;
|
|
843
|
-
}), n.set(
|
|
843
|
+
}), n.set(a, u)), u !== void 0) {
|
|
844
844
|
var v = _(u);
|
|
845
|
-
return v ===
|
|
845
|
+
return v === V ? void 0 : v;
|
|
846
846
|
}
|
|
847
|
-
return Reflect.get(
|
|
847
|
+
return Reflect.get(l, a, f);
|
|
848
848
|
},
|
|
849
|
-
getOwnPropertyDescriptor(
|
|
850
|
-
var f = Reflect.getOwnPropertyDescriptor(
|
|
849
|
+
getOwnPropertyDescriptor(l, a) {
|
|
850
|
+
var f = Reflect.getOwnPropertyDescriptor(l, a);
|
|
851
851
|
if (f && "value" in f) {
|
|
852
|
-
var u = n.get(
|
|
852
|
+
var u = n.get(a);
|
|
853
853
|
u && (f.value = _(u));
|
|
854
854
|
} else if (f === void 0) {
|
|
855
|
-
var c = n.get(
|
|
856
|
-
if (c !== void 0 && v !==
|
|
855
|
+
var c = n.get(a), v = c?.v;
|
|
856
|
+
if (c !== void 0 && v !== V)
|
|
857
857
|
return {
|
|
858
858
|
enumerable: !0,
|
|
859
859
|
configurable: !0,
|
|
@@ -863,135 +863,135 @@ function Ce(e) {
|
|
|
863
863
|
}
|
|
864
864
|
return f;
|
|
865
865
|
},
|
|
866
|
-
has(
|
|
867
|
-
if (
|
|
866
|
+
has(l, a) {
|
|
867
|
+
if (a === cn)
|
|
868
868
|
return !0;
|
|
869
|
-
var f = n.get(
|
|
870
|
-
if (f !== void 0 ||
|
|
869
|
+
var f = n.get(a), u = f !== void 0 && f.v !== V || Reflect.has(l, a);
|
|
870
|
+
if (f !== void 0 || R !== null && (!u || un(l, a)?.writable)) {
|
|
871
871
|
f === void 0 && (f = o(() => {
|
|
872
|
-
var v = u ?
|
|
873
|
-
return
|
|
874
|
-
}), n.set(
|
|
872
|
+
var v = u ? Pe(l[a]) : V, m = /* @__PURE__ */ A(v);
|
|
873
|
+
return m;
|
|
874
|
+
}), n.set(a, f));
|
|
875
875
|
var c = _(f);
|
|
876
|
-
if (c ===
|
|
876
|
+
if (c === V)
|
|
877
877
|
return !1;
|
|
878
878
|
}
|
|
879
879
|
return u;
|
|
880
880
|
},
|
|
881
|
-
set(
|
|
882
|
-
var c = n.get(
|
|
883
|
-
if (r &&
|
|
884
|
-
for (var
|
|
885
|
-
c.v;
|
|
886
|
-
var p = n.get(
|
|
887
|
-
p !== void 0 ? b(p,
|
|
881
|
+
set(l, a, f, u) {
|
|
882
|
+
var c = n.get(a), v = a in l;
|
|
883
|
+
if (r && a === "length")
|
|
884
|
+
for (var m = f; m < /** @type {Source<number>} */
|
|
885
|
+
c.v; m += 1) {
|
|
886
|
+
var p = n.get(m + "");
|
|
887
|
+
p !== void 0 ? b(p, V) : m in l && (p = o(() => /* @__PURE__ */ A(V)), n.set(m + "", p));
|
|
888
888
|
}
|
|
889
889
|
if (c === void 0)
|
|
890
|
-
(!v ||
|
|
890
|
+
(!v || un(l, a)?.writable) && (c = o(() => /* @__PURE__ */ A(void 0)), b(c, Pe(f)), n.set(a, c));
|
|
891
891
|
else {
|
|
892
|
-
v = c.v !==
|
|
893
|
-
var
|
|
894
|
-
b(c,
|
|
892
|
+
v = c.v !== V;
|
|
893
|
+
var k = o(() => Pe(f));
|
|
894
|
+
b(c, k);
|
|
895
895
|
}
|
|
896
|
-
var d = Reflect.getOwnPropertyDescriptor(
|
|
896
|
+
var d = Reflect.getOwnPropertyDescriptor(l, a);
|
|
897
897
|
if (d?.set && d.set.call(u, f), !v) {
|
|
898
|
-
if (r && typeof
|
|
898
|
+
if (r && typeof a == "string") {
|
|
899
899
|
var w = (
|
|
900
900
|
/** @type {Source<number>} */
|
|
901
901
|
n.get("length")
|
|
902
|
-
),
|
|
903
|
-
Number.isInteger(
|
|
902
|
+
), N = Number(a);
|
|
903
|
+
Number.isInteger(N) && N >= w.v && b(w, N + 1);
|
|
904
904
|
}
|
|
905
|
-
|
|
905
|
+
dn(s);
|
|
906
906
|
}
|
|
907
907
|
return !0;
|
|
908
908
|
},
|
|
909
|
-
ownKeys(
|
|
909
|
+
ownKeys(l) {
|
|
910
910
|
_(s);
|
|
911
|
-
var
|
|
911
|
+
var a = Reflect.ownKeys(l).filter((c) => {
|
|
912
912
|
var v = n.get(c);
|
|
913
|
-
return v === void 0 || v.v !==
|
|
913
|
+
return v === void 0 || v.v !== V;
|
|
914
914
|
});
|
|
915
915
|
for (var [f, u] of n)
|
|
916
|
-
u.v !==
|
|
917
|
-
return
|
|
916
|
+
u.v !== V && !(f in l) && a.push(f);
|
|
917
|
+
return a;
|
|
918
918
|
},
|
|
919
919
|
setPrototypeOf() {
|
|
920
|
-
|
|
920
|
+
Cs();
|
|
921
921
|
}
|
|
922
922
|
}
|
|
923
923
|
);
|
|
924
924
|
}
|
|
925
|
-
var
|
|
926
|
-
function
|
|
925
|
+
var Ks, Zs, Js;
|
|
926
|
+
function ft(e = "") {
|
|
927
927
|
return document.createTextNode(e);
|
|
928
928
|
}
|
|
929
929
|
// @__NO_SIDE_EFFECTS__
|
|
930
|
-
function
|
|
930
|
+
function wt(e) {
|
|
931
931
|
return (
|
|
932
932
|
/** @type {TemplateNode | null} */
|
|
933
|
-
|
|
933
|
+
Zs.call(e)
|
|
934
934
|
);
|
|
935
935
|
}
|
|
936
936
|
// @__NO_SIDE_EFFECTS__
|
|
937
|
-
function
|
|
937
|
+
function jt(e) {
|
|
938
938
|
return (
|
|
939
939
|
/** @type {TemplateNode | null} */
|
|
940
940
|
Js.call(e)
|
|
941
941
|
);
|
|
942
942
|
}
|
|
943
|
-
function
|
|
944
|
-
return /* @__PURE__ */
|
|
943
|
+
function S(e, t) {
|
|
944
|
+
return /* @__PURE__ */ wt(e);
|
|
945
945
|
}
|
|
946
|
-
function
|
|
946
|
+
function ut(e, t = !1) {
|
|
947
947
|
{
|
|
948
|
-
var n = /* @__PURE__ */
|
|
949
|
-
return n instanceof Comment && n.data === "" ? /* @__PURE__ */
|
|
948
|
+
var n = /* @__PURE__ */ wt(e);
|
|
949
|
+
return n instanceof Comment && n.data === "" ? /* @__PURE__ */ jt(n) : n;
|
|
950
950
|
}
|
|
951
951
|
}
|
|
952
|
-
function
|
|
952
|
+
function C(e, t = 1, n = !1) {
|
|
953
953
|
let r = e;
|
|
954
954
|
for (; t--; )
|
|
955
955
|
r = /** @type {TemplateNode} */
|
|
956
|
-
/* @__PURE__ */
|
|
956
|
+
/* @__PURE__ */ jt(r);
|
|
957
957
|
return r;
|
|
958
958
|
}
|
|
959
959
|
function Qs(e) {
|
|
960
960
|
e.textContent = "";
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function wr() {
|
|
963
963
|
return !1;
|
|
964
964
|
}
|
|
965
|
-
function
|
|
965
|
+
function br(e, t, n) {
|
|
966
966
|
return (
|
|
967
967
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
968
|
-
document.createElementNS(
|
|
968
|
+
document.createElementNS(rr, e, void 0)
|
|
969
969
|
);
|
|
970
970
|
}
|
|
971
|
-
function
|
|
972
|
-
var t =
|
|
973
|
-
|
|
971
|
+
function yr(e) {
|
|
972
|
+
var t = E, n = R;
|
|
973
|
+
We(null), bt(null);
|
|
974
974
|
try {
|
|
975
975
|
return e();
|
|
976
976
|
} finally {
|
|
977
|
-
|
|
977
|
+
We(t), bt(n);
|
|
978
978
|
}
|
|
979
979
|
}
|
|
980
980
|
function $s(e) {
|
|
981
|
-
|
|
981
|
+
R === null && (E === null && ks(), Ss()), rt && Es();
|
|
982
982
|
}
|
|
983
983
|
function ei(e, t) {
|
|
984
984
|
var n = t.last;
|
|
985
985
|
n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
|
|
986
986
|
}
|
|
987
|
-
function
|
|
988
|
-
var n =
|
|
989
|
-
n !== null && (n.f &
|
|
987
|
+
function st(e, t) {
|
|
988
|
+
var n = R;
|
|
989
|
+
n !== null && (n.f & Z) !== 0 && (e |= Z);
|
|
990
990
|
var r = {
|
|
991
|
-
ctx:
|
|
991
|
+
ctx: he,
|
|
992
992
|
deps: null,
|
|
993
993
|
nodes: null,
|
|
994
|
-
f: e |
|
|
994
|
+
f: e | G | de,
|
|
995
995
|
first: null,
|
|
996
996
|
fn: t,
|
|
997
997
|
last: null,
|
|
@@ -1003,161 +1003,161 @@ function nt(e, t) {
|
|
|
1003
1003
|
wv: 0,
|
|
1004
1004
|
ac: null
|
|
1005
1005
|
}, s = r;
|
|
1006
|
-
if ((e &
|
|
1007
|
-
|
|
1006
|
+
if ((e & xt) !== 0)
|
|
1007
|
+
gt !== null ? gt.push(r) : Ve(r);
|
|
1008
1008
|
else if (t !== null) {
|
|
1009
1009
|
try {
|
|
1010
|
-
|
|
1010
|
+
yt(r);
|
|
1011
1011
|
} catch (o) {
|
|
1012
|
-
throw
|
|
1012
|
+
throw Ne(r), o;
|
|
1013
1013
|
}
|
|
1014
1014
|
s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
|
|
1015
|
-
(s.f &
|
|
1015
|
+
(s.f & rn) === 0 && (s = s.first, (e & Ue) !== 0 && (e & mt) !== 0 && s !== null && (s.f |= mt));
|
|
1016
1016
|
}
|
|
1017
|
-
if (s !== null && (s.parent = n, n !== null && ei(s, n),
|
|
1017
|
+
if (s !== null && (s.parent = n, n !== null && ei(s, n), E !== null && (E.f & W) !== 0 && (e & Et) === 0)) {
|
|
1018
1018
|
var i = (
|
|
1019
1019
|
/** @type {Derived} */
|
|
1020
|
-
|
|
1020
|
+
E
|
|
1021
1021
|
);
|
|
1022
1022
|
(i.effects ?? (i.effects = [])).push(s);
|
|
1023
1023
|
}
|
|
1024
1024
|
return r;
|
|
1025
1025
|
}
|
|
1026
|
-
function
|
|
1027
|
-
return
|
|
1026
|
+
function xr() {
|
|
1027
|
+
return E !== null && !we;
|
|
1028
1028
|
}
|
|
1029
1029
|
function ti(e) {
|
|
1030
|
-
const t =
|
|
1031
|
-
return
|
|
1030
|
+
const t = st(Nt, null);
|
|
1031
|
+
return L(t, X), t.teardown = e, t;
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1033
|
+
function en(e) {
|
|
1034
1034
|
$s();
|
|
1035
1035
|
var t = (
|
|
1036
1036
|
/** @type {Effect} */
|
|
1037
|
-
|
|
1038
|
-
), n = !
|
|
1037
|
+
R.f
|
|
1038
|
+
), n = !E && (t & ye) !== 0 && (t & St) === 0;
|
|
1039
1039
|
if (n) {
|
|
1040
1040
|
var r = (
|
|
1041
1041
|
/** @type {ComponentContext} */
|
|
1042
|
-
|
|
1042
|
+
he
|
|
1043
1043
|
);
|
|
1044
1044
|
(r.e ?? (r.e = [])).push(e);
|
|
1045
1045
|
} else
|
|
1046
|
-
return
|
|
1046
|
+
return Er(e);
|
|
1047
1047
|
}
|
|
1048
|
-
function
|
|
1049
|
-
return
|
|
1048
|
+
function Er(e) {
|
|
1049
|
+
return st(xt | gs, e);
|
|
1050
1050
|
}
|
|
1051
1051
|
function ni(e) {
|
|
1052
|
-
return
|
|
1052
|
+
return st(xt, e);
|
|
1053
1053
|
}
|
|
1054
1054
|
function ri(e) {
|
|
1055
|
-
return
|
|
1055
|
+
return st(Cn | rn, e);
|
|
1056
1056
|
}
|
|
1057
1057
|
function Y(e, t = [], n = [], r = []) {
|
|
1058
|
-
|
|
1059
|
-
|
|
1058
|
+
Fs(r, t, n, (s) => {
|
|
1059
|
+
st(Nt, () => e(...s.map(_)));
|
|
1060
1060
|
});
|
|
1061
1061
|
}
|
|
1062
|
-
function
|
|
1063
|
-
var n =
|
|
1062
|
+
function zn(e, t = 0) {
|
|
1063
|
+
var n = st(Ue | t, e);
|
|
1064
1064
|
return n;
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1067
|
-
return
|
|
1066
|
+
function Ot(e) {
|
|
1067
|
+
return st(ye | rn, e);
|
|
1068
1068
|
}
|
|
1069
|
-
function
|
|
1069
|
+
function Sr(e) {
|
|
1070
1070
|
var t = e.teardown;
|
|
1071
1071
|
if (t !== null) {
|
|
1072
|
-
const n =
|
|
1073
|
-
|
|
1072
|
+
const n = rt, r = E;
|
|
1073
|
+
Gn(!0), We(null);
|
|
1074
1074
|
try {
|
|
1075
1075
|
t.call(null);
|
|
1076
1076
|
} finally {
|
|
1077
|
-
|
|
1077
|
+
Gn(n), We(r);
|
|
1078
1078
|
}
|
|
1079
1079
|
}
|
|
1080
1080
|
}
|
|
1081
|
-
function
|
|
1081
|
+
function Ln(e, t = !1) {
|
|
1082
1082
|
var n = e.first;
|
|
1083
1083
|
for (e.first = e.last = null; n !== null; ) {
|
|
1084
1084
|
const s = n.ac;
|
|
1085
|
-
s !== null &&
|
|
1086
|
-
s.abort(
|
|
1085
|
+
s !== null && yr(() => {
|
|
1086
|
+
s.abort(Ze);
|
|
1087
1087
|
});
|
|
1088
1088
|
var r = n.next;
|
|
1089
|
-
(n.f &
|
|
1089
|
+
(n.f & Et) !== 0 ? n.parent = null : Ne(n, t), n = r;
|
|
1090
1090
|
}
|
|
1091
1091
|
}
|
|
1092
1092
|
function si(e) {
|
|
1093
1093
|
for (var t = e.first; t !== null; ) {
|
|
1094
1094
|
var n = t.next;
|
|
1095
|
-
(t.f &
|
|
1095
|
+
(t.f & ye) === 0 && Ne(t), t = n;
|
|
1096
1096
|
}
|
|
1097
1097
|
}
|
|
1098
|
-
function
|
|
1098
|
+
function Ne(e, t = !0) {
|
|
1099
1099
|
var n = !1;
|
|
1100
1100
|
(t || (e.f & ms) !== 0) && e.nodes !== null && e.nodes.end !== null && (ii(
|
|
1101
1101
|
e.nodes.start,
|
|
1102
1102
|
/** @type {TemplateNode} */
|
|
1103
1103
|
e.nodes.end
|
|
1104
|
-
), n = !0),
|
|
1104
|
+
), n = !0), Ln(e, t && !n), qt(e, 0), L(e, De);
|
|
1105
1105
|
var r = e.nodes && e.nodes.t;
|
|
1106
1106
|
if (r !== null)
|
|
1107
1107
|
for (const i of r)
|
|
1108
1108
|
i.stop();
|
|
1109
|
-
|
|
1109
|
+
Sr(e);
|
|
1110
1110
|
var s = e.parent;
|
|
1111
|
-
s !== null && s.first !== null &&
|
|
1111
|
+
s !== null && s.first !== null && kr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
|
|
1112
1112
|
}
|
|
1113
1113
|
function ii(e, t) {
|
|
1114
1114
|
for (; e !== null; ) {
|
|
1115
|
-
var n = e === t ? null : /* @__PURE__ */
|
|
1115
|
+
var n = e === t ? null : /* @__PURE__ */ jt(e);
|
|
1116
1116
|
e.remove(), e = n;
|
|
1117
1117
|
}
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1119
|
+
function kr(e) {
|
|
1120
1120
|
var t = e.parent, n = e.prev, r = e.next;
|
|
1121
1121
|
n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
|
|
1122
1122
|
}
|
|
1123
|
-
function
|
|
1123
|
+
function On(e, t, n = !0) {
|
|
1124
1124
|
var r = [];
|
|
1125
|
-
|
|
1125
|
+
Mr(e, r, !0);
|
|
1126
1126
|
var s = () => {
|
|
1127
|
-
n &&
|
|
1127
|
+
n && Ne(e), t && t();
|
|
1128
1128
|
}, i = r.length;
|
|
1129
1129
|
if (i > 0) {
|
|
1130
1130
|
var o = () => --i || s();
|
|
1131
|
-
for (var
|
|
1132
|
-
|
|
1131
|
+
for (var l of r)
|
|
1132
|
+
l.out(o);
|
|
1133
1133
|
} else
|
|
1134
1134
|
s();
|
|
1135
1135
|
}
|
|
1136
|
-
function
|
|
1137
|
-
if ((e.f &
|
|
1138
|
-
e.f ^=
|
|
1136
|
+
function Mr(e, t, n) {
|
|
1137
|
+
if ((e.f & Z) === 0) {
|
|
1138
|
+
e.f ^= Z;
|
|
1139
1139
|
var r = e.nodes && e.nodes.t;
|
|
1140
1140
|
if (r !== null)
|
|
1141
|
-
for (const
|
|
1142
|
-
(
|
|
1141
|
+
for (const l of r)
|
|
1142
|
+
(l.is_global || n) && t.push(l);
|
|
1143
1143
|
for (var s = e.first; s !== null; ) {
|
|
1144
|
-
var i = s.next, o = (s.f &
|
|
1144
|
+
var i = s.next, o = (s.f & mt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1145
1145
|
// it means the parent block effect was pruned. In that case,
|
|
1146
1146
|
// transparency information was transferred to the branch effect.
|
|
1147
|
-
(s.f &
|
|
1148
|
-
|
|
1147
|
+
(s.f & ye) !== 0 && (e.f & Ue) !== 0;
|
|
1148
|
+
Mr(s, t, o ? n : !1), s = i;
|
|
1149
1149
|
}
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1153
|
-
|
|
1152
|
+
function qn(e) {
|
|
1153
|
+
Tr(e, !0);
|
|
1154
1154
|
}
|
|
1155
|
-
function
|
|
1156
|
-
if ((e.f &
|
|
1157
|
-
e.f ^=
|
|
1155
|
+
function Tr(e, t) {
|
|
1156
|
+
if ((e.f & Z) !== 0) {
|
|
1157
|
+
e.f ^= Z;
|
|
1158
1158
|
for (var n = e.first; n !== null; ) {
|
|
1159
|
-
var r = n.next, s = (n.f &
|
|
1160
|
-
|
|
1159
|
+
var r = n.next, s = (n.f & mt) !== 0 || (n.f & ye) !== 0;
|
|
1160
|
+
Tr(n, s ? t : !1), n = r;
|
|
1161
1161
|
}
|
|
1162
1162
|
var i = e.nodes && e.nodes.t;
|
|
1163
1163
|
if (i !== null)
|
|
@@ -1165,133 +1165,133 @@ function kr(e, t) {
|
|
|
1165
1165
|
(o.is_global || t) && o.in();
|
|
1166
1166
|
}
|
|
1167
1167
|
}
|
|
1168
|
-
function
|
|
1168
|
+
function Cr(e, t) {
|
|
1169
1169
|
if (e.nodes)
|
|
1170
1170
|
for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
|
|
1171
|
-
var s = n === r ? null : /* @__PURE__ */
|
|
1171
|
+
var s = n === r ? null : /* @__PURE__ */ jt(n);
|
|
1172
1172
|
t.append(n), n = s;
|
|
1173
1173
|
}
|
|
1174
1174
|
}
|
|
1175
|
-
let
|
|
1176
|
-
function
|
|
1177
|
-
|
|
1175
|
+
let Zt = !1, rt = !1;
|
|
1176
|
+
function Gn(e) {
|
|
1177
|
+
rt = e;
|
|
1178
1178
|
}
|
|
1179
|
-
let
|
|
1180
|
-
function
|
|
1181
|
-
|
|
1179
|
+
let E = null, we = !1;
|
|
1180
|
+
function We(e) {
|
|
1181
|
+
E = e;
|
|
1182
1182
|
}
|
|
1183
|
-
let
|
|
1184
|
-
function
|
|
1185
|
-
|
|
1183
|
+
let R = null;
|
|
1184
|
+
function bt(e) {
|
|
1185
|
+
R = e;
|
|
1186
1186
|
}
|
|
1187
|
-
let
|
|
1188
|
-
function
|
|
1189
|
-
|
|
1187
|
+
let ve = null;
|
|
1188
|
+
function Rr(e) {
|
|
1189
|
+
E !== null && (ve === null ? ve = [e] : ve.push(e));
|
|
1190
1190
|
}
|
|
1191
|
-
let
|
|
1191
|
+
let $ = null, re = 0, fe = null;
|
|
1192
1192
|
function oi(e) {
|
|
1193
|
-
|
|
1193
|
+
fe = e;
|
|
1194
1194
|
}
|
|
1195
|
-
let
|
|
1196
|
-
function
|
|
1197
|
-
|
|
1195
|
+
let Ar = 1, Je = 0, et = Je;
|
|
1196
|
+
function Kn(e) {
|
|
1197
|
+
et = e;
|
|
1198
1198
|
}
|
|
1199
|
-
function
|
|
1200
|
-
return ++
|
|
1199
|
+
function Ir() {
|
|
1200
|
+
return ++Ar;
|
|
1201
1201
|
}
|
|
1202
|
-
function
|
|
1202
|
+
function Bt(e) {
|
|
1203
1203
|
var t = e.f;
|
|
1204
|
-
if ((t &
|
|
1204
|
+
if ((t & G) !== 0)
|
|
1205
1205
|
return !0;
|
|
1206
|
-
if (t &
|
|
1206
|
+
if (t & W && (e.f &= ~nt), (t & Me) !== 0) {
|
|
1207
1207
|
for (var n = (
|
|
1208
1208
|
/** @type {Value[]} */
|
|
1209
1209
|
e.deps
|
|
1210
1210
|
), r = n.length, s = 0; s < r; s++) {
|
|
1211
1211
|
var i = n[s];
|
|
1212
|
-
if (
|
|
1212
|
+
if (Bt(
|
|
1213
1213
|
/** @type {Derived} */
|
|
1214
1214
|
i
|
|
1215
|
-
) &&
|
|
1215
|
+
) && _r(
|
|
1216
1216
|
/** @type {Derived} */
|
|
1217
1217
|
i
|
|
1218
1218
|
), i.wv > e.wv)
|
|
1219
1219
|
return !0;
|
|
1220
1220
|
}
|
|
1221
|
-
(t &
|
|
1221
|
+
(t & de) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1222
1222
|
// traversal of the graph in the other batches still happens
|
|
1223
|
-
|
|
1223
|
+
ge === null && L(e, X);
|
|
1224
1224
|
}
|
|
1225
1225
|
return !1;
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1227
|
+
function Pr(e, t, n = !0) {
|
|
1228
1228
|
var r = e.reactions;
|
|
1229
|
-
if (r !== null && !(
|
|
1229
|
+
if (r !== null && !(ve !== null && pt.call(ve, e)))
|
|
1230
1230
|
for (var s = 0; s < r.length; s++) {
|
|
1231
1231
|
var i = r[s];
|
|
1232
|
-
(i.f &
|
|
1232
|
+
(i.f & W) !== 0 ? Pr(
|
|
1233
1233
|
/** @type {Derived} */
|
|
1234
1234
|
i,
|
|
1235
1235
|
t,
|
|
1236
1236
|
!1
|
|
1237
|
-
) : t === i && (n ?
|
|
1237
|
+
) : t === i && (n ? L(i, G) : (i.f & X) !== 0 && L(i, Me), Ve(
|
|
1238
1238
|
/** @type {Effect} */
|
|
1239
1239
|
i
|
|
1240
1240
|
));
|
|
1241
1241
|
}
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1244
|
-
var
|
|
1245
|
-
var t =
|
|
1246
|
-
|
|
1247
|
-
null,
|
|
1248
|
-
e.ac.abort(
|
|
1243
|
+
function Dr(e) {
|
|
1244
|
+
var k;
|
|
1245
|
+
var t = $, n = re, r = fe, s = E, i = ve, o = he, l = we, a = et, f = e.f;
|
|
1246
|
+
$ = /** @type {null | Value[]} */
|
|
1247
|
+
null, re = 0, fe = null, E = (f & (ye | Et)) === 0 ? e : null, ve = null, Jt(e.ctx), we = !1, et = ++Je, e.ac !== null && (yr(() => {
|
|
1248
|
+
e.ac.abort(Ze);
|
|
1249
1249
|
}), e.ac = null);
|
|
1250
1250
|
try {
|
|
1251
|
-
e.f |=
|
|
1251
|
+
e.f |= mn;
|
|
1252
1252
|
var u = (
|
|
1253
1253
|
/** @type {Function} */
|
|
1254
1254
|
e.fn
|
|
1255
1255
|
), c = u();
|
|
1256
|
-
e.f |=
|
|
1257
|
-
var v = e.deps,
|
|
1258
|
-
if (
|
|
1256
|
+
e.f |= St;
|
|
1257
|
+
var v = e.deps, m = I?.is_fork;
|
|
1258
|
+
if ($ !== null) {
|
|
1259
1259
|
var p;
|
|
1260
|
-
if (
|
|
1261
|
-
for (v.length =
|
|
1262
|
-
v[
|
|
1260
|
+
if (m || qt(e, re), v !== null && re > 0)
|
|
1261
|
+
for (v.length = re + $.length, p = 0; p < $.length; p++)
|
|
1262
|
+
v[re + p] = $[p];
|
|
1263
1263
|
else
|
|
1264
|
-
e.deps = v =
|
|
1265
|
-
if (
|
|
1266
|
-
for (p =
|
|
1267
|
-
((
|
|
1268
|
-
} else !
|
|
1269
|
-
if (
|
|
1264
|
+
e.deps = v = $;
|
|
1265
|
+
if (xr() && (e.f & de) !== 0)
|
|
1266
|
+
for (p = re; p < v.length; p++)
|
|
1267
|
+
((k = v[p]).reactions ?? (k.reactions = [])).push(e);
|
|
1268
|
+
} else !m && v !== null && re < v.length && (qt(e, re), v.length = re);
|
|
1269
|
+
if (ur() && fe !== null && !we && v !== null && (e.f & (W | Me | G)) === 0)
|
|
1270
1270
|
for (p = 0; p < /** @type {Source[]} */
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1271
|
+
fe.length; p++)
|
|
1272
|
+
Pr(
|
|
1273
|
+
fe[p],
|
|
1274
1274
|
/** @type {Effect} */
|
|
1275
1275
|
e
|
|
1276
1276
|
);
|
|
1277
1277
|
if (s !== null && s !== e) {
|
|
1278
|
-
if (
|
|
1278
|
+
if (Je++, s.deps !== null)
|
|
1279
1279
|
for (let d = 0; d < n; d += 1)
|
|
1280
|
-
s.deps[d].rv =
|
|
1280
|
+
s.deps[d].rv = Je;
|
|
1281
1281
|
if (t !== null)
|
|
1282
1282
|
for (const d of t)
|
|
1283
|
-
d.rv =
|
|
1284
|
-
|
|
1285
|
-
|
|
1283
|
+
d.rv = Je;
|
|
1284
|
+
fe !== null && (r === null ? r = fe : r.push(.../** @type {Source[]} */
|
|
1285
|
+
fe));
|
|
1286
1286
|
}
|
|
1287
|
-
return (e.f &
|
|
1287
|
+
return (e.f & Ye) !== 0 && (e.f ^= Ye), c;
|
|
1288
1288
|
} catch (d) {
|
|
1289
|
-
return
|
|
1289
|
+
return Ds(d);
|
|
1290
1290
|
} finally {
|
|
1291
|
-
e.f ^=
|
|
1291
|
+
e.f ^= mn, $ = t, re = n, fe = r, E = s, ve = i, Jt(o), we = l, et = a;
|
|
1292
1292
|
}
|
|
1293
1293
|
}
|
|
1294
|
-
function
|
|
1294
|
+
function ai(e, t) {
|
|
1295
1295
|
let n = t.reactions;
|
|
1296
1296
|
if (n !== null) {
|
|
1297
1297
|
var r = cs.call(n, e);
|
|
@@ -1300,112 +1300,112 @@ function li(e, t) {
|
|
|
1300
1300
|
s === 0 ? n = t.reactions = null : (n[r] = n[s], n.pop());
|
|
1301
1301
|
}
|
|
1302
1302
|
}
|
|
1303
|
-
if (n === null && (t.f &
|
|
1303
|
+
if (n === null && (t.f & W) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1304
1304
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1305
1305
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1306
|
-
(
|
|
1306
|
+
($ === null || !pt.call($, t))) {
|
|
1307
1307
|
var i = (
|
|
1308
1308
|
/** @type {Derived} */
|
|
1309
1309
|
t
|
|
1310
1310
|
);
|
|
1311
|
-
(i.f &
|
|
1311
|
+
(i.f & de) !== 0 && (i.f ^= de, i.f &= ~nt), In(i), Ws(i), qt(i, 0);
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
|
-
function
|
|
1314
|
+
function qt(e, t) {
|
|
1315
1315
|
var n = e.deps;
|
|
1316
1316
|
if (n !== null)
|
|
1317
1317
|
for (var r = t; r < n.length; r++)
|
|
1318
|
-
|
|
1318
|
+
ai(e, n[r]);
|
|
1319
1319
|
}
|
|
1320
|
-
function
|
|
1320
|
+
function yt(e) {
|
|
1321
1321
|
var t = e.f;
|
|
1322
|
-
if ((t &
|
|
1323
|
-
|
|
1324
|
-
var n =
|
|
1325
|
-
|
|
1322
|
+
if ((t & De) === 0) {
|
|
1323
|
+
L(e, X);
|
|
1324
|
+
var n = R, r = Zt;
|
|
1325
|
+
R = e, Zt = !0;
|
|
1326
1326
|
try {
|
|
1327
|
-
(t & (
|
|
1328
|
-
var s =
|
|
1329
|
-
e.teardown = typeof s == "function" ? s : null, e.wv =
|
|
1327
|
+
(t & (Ue | Tn)) !== 0 ? si(e) : Ln(e), Sr(e);
|
|
1328
|
+
var s = Dr(e);
|
|
1329
|
+
e.teardown = typeof s == "function" ? s : null, e.wv = Ar;
|
|
1330
1330
|
var i;
|
|
1331
|
-
|
|
1331
|
+
pn && Is && (e.f & G) !== 0 && e.deps;
|
|
1332
1332
|
} finally {
|
|
1333
|
-
|
|
1333
|
+
Zt = r, R = n;
|
|
1334
1334
|
}
|
|
1335
1335
|
}
|
|
1336
1336
|
}
|
|
1337
1337
|
function _(e) {
|
|
1338
|
-
var t = e.f, n = (t &
|
|
1339
|
-
if (
|
|
1340
|
-
var r =
|
|
1341
|
-
if (!r && (
|
|
1342
|
-
var s =
|
|
1343
|
-
if ((
|
|
1344
|
-
e.rv <
|
|
1338
|
+
var t = e.f, n = (t & W) !== 0;
|
|
1339
|
+
if (E !== null && !we) {
|
|
1340
|
+
var r = R !== null && (R.f & De) !== 0;
|
|
1341
|
+
if (!r && (ve === null || !pt.call(ve, e))) {
|
|
1342
|
+
var s = E.deps;
|
|
1343
|
+
if ((E.f & mn) !== 0)
|
|
1344
|
+
e.rv < Je && (e.rv = Je, $ === null && s !== null && s[re] === e ? re++ : $ === null ? $ = [e] : $.push(e));
|
|
1345
1345
|
else {
|
|
1346
|
-
(
|
|
1346
|
+
(E.deps ?? (E.deps = [])).push(e);
|
|
1347
1347
|
var i = e.reactions;
|
|
1348
|
-
i === null ? e.reactions = [
|
|
1348
|
+
i === null ? e.reactions = [E] : pt.call(i, E) || i.push(E);
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
1351
|
}
|
|
1352
|
-
if (
|
|
1353
|
-
return
|
|
1352
|
+
if (rt && Xe.has(e))
|
|
1353
|
+
return Xe.get(e);
|
|
1354
1354
|
if (n) {
|
|
1355
1355
|
var o = (
|
|
1356
1356
|
/** @type {Derived} */
|
|
1357
1357
|
e
|
|
1358
1358
|
);
|
|
1359
|
-
if (
|
|
1360
|
-
var
|
|
1361
|
-
return ((o.f &
|
|
1359
|
+
if (rt) {
|
|
1360
|
+
var l = o.v;
|
|
1361
|
+
return ((o.f & X) === 0 && o.reactions !== null || zr(o)) && (l = Nn(o)), Xe.set(o, l), l;
|
|
1362
1362
|
}
|
|
1363
|
-
var
|
|
1364
|
-
|
|
1363
|
+
var a = (o.f & de) === 0 && !we && E !== null && (Zt || (E.f & de) !== 0), f = (o.f & St) === 0;
|
|
1364
|
+
Bt(o) && (a && (o.f |= de), _r(o)), a && !f && (pr(o), Nr(o));
|
|
1365
1365
|
}
|
|
1366
|
-
if (
|
|
1367
|
-
return
|
|
1368
|
-
if ((e.f &
|
|
1366
|
+
if (ge?.has(e))
|
|
1367
|
+
return ge.get(e);
|
|
1368
|
+
if ((e.f & Ye) !== 0)
|
|
1369
1369
|
throw e.v;
|
|
1370
1370
|
return e.v;
|
|
1371
1371
|
}
|
|
1372
|
-
function
|
|
1373
|
-
if (e.f |=
|
|
1372
|
+
function Nr(e) {
|
|
1373
|
+
if (e.f |= de, e.deps !== null)
|
|
1374
1374
|
for (const t of e.deps)
|
|
1375
|
-
(t.reactions ?? (t.reactions = [])).push(e), (t.f &
|
|
1375
|
+
(t.reactions ?? (t.reactions = [])).push(e), (t.f & W) !== 0 && (t.f & de) === 0 && (pr(
|
|
1376
1376
|
/** @type {Derived} */
|
|
1377
1377
|
t
|
|
1378
|
-
),
|
|
1378
|
+
), Nr(
|
|
1379
1379
|
/** @type {Derived} */
|
|
1380
1380
|
t
|
|
1381
1381
|
));
|
|
1382
1382
|
}
|
|
1383
|
-
function
|
|
1384
|
-
if (e.v ===
|
|
1383
|
+
function zr(e) {
|
|
1384
|
+
if (e.v === V) return !0;
|
|
1385
1385
|
if (e.deps === null) return !1;
|
|
1386
1386
|
for (const t of e.deps)
|
|
1387
|
-
if (
|
|
1387
|
+
if (Xe.has(t) || (t.f & W) !== 0 && zr(
|
|
1388
1388
|
/** @type {Derived} */
|
|
1389
1389
|
t
|
|
1390
1390
|
))
|
|
1391
1391
|
return !0;
|
|
1392
1392
|
return !1;
|
|
1393
1393
|
}
|
|
1394
|
-
function
|
|
1395
|
-
var t =
|
|
1394
|
+
function Dt(e) {
|
|
1395
|
+
var t = we;
|
|
1396
1396
|
try {
|
|
1397
|
-
return
|
|
1397
|
+
return we = !0, e();
|
|
1398
1398
|
} finally {
|
|
1399
|
-
|
|
1399
|
+
we = t;
|
|
1400
1400
|
}
|
|
1401
1401
|
}
|
|
1402
|
-
const
|
|
1403
|
-
function
|
|
1404
|
-
(t[
|
|
1402
|
+
const vn = /* @__PURE__ */ Symbol("events"), li = /* @__PURE__ */ new Set(), fi = /* @__PURE__ */ new Set();
|
|
1403
|
+
function ce(e, t, n) {
|
|
1404
|
+
(t[vn] ?? (t[vn] = {}))[e] = n;
|
|
1405
1405
|
}
|
|
1406
|
-
function
|
|
1406
|
+
function Vt(e) {
|
|
1407
1407
|
for (var t = 0; t < e.length; t++)
|
|
1408
|
-
|
|
1408
|
+
li.add(e[t]);
|
|
1409
1409
|
for (var n of fi)
|
|
1410
1410
|
n(e);
|
|
1411
1411
|
}
|
|
@@ -1422,38 +1422,38 @@ function ci(e) {
|
|
|
1422
1422
|
ui?.createHTML(e) ?? e
|
|
1423
1423
|
);
|
|
1424
1424
|
}
|
|
1425
|
-
function
|
|
1426
|
-
var t =
|
|
1425
|
+
function Lr(e) {
|
|
1426
|
+
var t = br("template");
|
|
1427
1427
|
return t.innerHTML = ci(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1428
1428
|
}
|
|
1429
|
-
function
|
|
1429
|
+
function tn(e, t) {
|
|
1430
1430
|
var n = (
|
|
1431
1431
|
/** @type {Effect} */
|
|
1432
|
-
|
|
1432
|
+
R
|
|
1433
1433
|
);
|
|
1434
1434
|
n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
|
|
1435
1435
|
}
|
|
1436
1436
|
// @__NO_SIDE_EFFECTS__
|
|
1437
|
-
function
|
|
1437
|
+
function O(e, t) {
|
|
1438
1438
|
var n = (t & fs) !== 0, r = (t & us) !== 0, s, i = !e.startsWith("<!>");
|
|
1439
1439
|
return () => {
|
|
1440
|
-
s === void 0 && (s =
|
|
1441
|
-
/* @__PURE__ */
|
|
1440
|
+
s === void 0 && (s = Lr(i ? e : "<!>" + e), n || (s = /** @type {TemplateNode} */
|
|
1441
|
+
/* @__PURE__ */ wt(s)));
|
|
1442
1442
|
var o = (
|
|
1443
1443
|
/** @type {TemplateNode} */
|
|
1444
|
-
r ||
|
|
1444
|
+
r || Ks ? document.importNode(s, !0) : s.cloneNode(!0)
|
|
1445
1445
|
);
|
|
1446
1446
|
if (n) {
|
|
1447
|
-
var
|
|
1447
|
+
var l = (
|
|
1448
1448
|
/** @type {TemplateNode} */
|
|
1449
|
-
/* @__PURE__ */
|
|
1450
|
-
),
|
|
1449
|
+
/* @__PURE__ */ wt(o)
|
|
1450
|
+
), a = (
|
|
1451
1451
|
/** @type {TemplateNode} */
|
|
1452
1452
|
o.lastChild
|
|
1453
1453
|
);
|
|
1454
|
-
|
|
1454
|
+
tn(l, a);
|
|
1455
1455
|
} else
|
|
1456
|
-
|
|
1456
|
+
tn(o, o);
|
|
1457
1457
|
return o;
|
|
1458
1458
|
};
|
|
1459
1459
|
}
|
|
@@ -1464,40 +1464,40 @@ function di(e, t, n = "svg") {
|
|
|
1464
1464
|
if (!i) {
|
|
1465
1465
|
var o = (
|
|
1466
1466
|
/** @type {DocumentFragment} */
|
|
1467
|
-
|
|
1468
|
-
),
|
|
1467
|
+
Lr(s)
|
|
1468
|
+
), l = (
|
|
1469
1469
|
/** @type {Element} */
|
|
1470
|
-
/* @__PURE__ */
|
|
1470
|
+
/* @__PURE__ */ wt(o)
|
|
1471
1471
|
);
|
|
1472
1472
|
i = /** @type {Element} */
|
|
1473
|
-
/* @__PURE__ */
|
|
1473
|
+
/* @__PURE__ */ wt(l);
|
|
1474
1474
|
}
|
|
1475
|
-
var
|
|
1475
|
+
var a = (
|
|
1476
1476
|
/** @type {TemplateNode} */
|
|
1477
1477
|
i.cloneNode(!0)
|
|
1478
1478
|
);
|
|
1479
|
-
return
|
|
1479
|
+
return tn(a, a), a;
|
|
1480
1480
|
};
|
|
1481
1481
|
}
|
|
1482
1482
|
// @__NO_SIDE_EFFECTS__
|
|
1483
|
-
function
|
|
1483
|
+
function Or(e, t) {
|
|
1484
1484
|
return /* @__PURE__ */ di(e, t, "svg");
|
|
1485
1485
|
}
|
|
1486
1486
|
function vi() {
|
|
1487
|
-
var e = document.createDocumentFragment(), t = document.createComment(""), n =
|
|
1488
|
-
return e.append(t, n),
|
|
1487
|
+
var e = document.createDocumentFragment(), t = document.createComment(""), n = ft();
|
|
1488
|
+
return e.append(t, n), tn(t, n), e;
|
|
1489
1489
|
}
|
|
1490
|
-
function
|
|
1490
|
+
function P(e, t) {
|
|
1491
1491
|
e !== null && e.before(
|
|
1492
1492
|
/** @type {Node} */
|
|
1493
1493
|
t
|
|
1494
1494
|
);
|
|
1495
1495
|
}
|
|
1496
|
-
function
|
|
1496
|
+
function le(e, t) {
|
|
1497
1497
|
var n = t == null ? "" : typeof t == "object" ? `${t}` : t;
|
|
1498
1498
|
n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = `${n}`);
|
|
1499
1499
|
}
|
|
1500
|
-
var
|
|
1500
|
+
var me, Se, se, $e, Ft, Ht, nn;
|
|
1501
1501
|
class qr {
|
|
1502
1502
|
/**
|
|
1503
1503
|
* @param {TemplateNode} anchor
|
|
@@ -1505,9 +1505,9 @@ class qr {
|
|
|
1505
1505
|
*/
|
|
1506
1506
|
constructor(t, n = !0) {
|
|
1507
1507
|
/** @type {TemplateNode} */
|
|
1508
|
-
|
|
1508
|
+
Fe(this, "anchor");
|
|
1509
1509
|
/** @type {Map<Batch, Key>} */
|
|
1510
|
-
|
|
1510
|
+
F(this, me, /* @__PURE__ */ new Map());
|
|
1511
1511
|
/**
|
|
1512
1512
|
* Map of keys to effects that are currently rendered in the DOM.
|
|
1513
1513
|
* These effects are visible and actively part of the document tree.
|
|
@@ -1522,68 +1522,68 @@ class qr {
|
|
|
1522
1522
|
* Can result in the entries `true->Effect` and `false->Effect`
|
|
1523
1523
|
* @type {Map<Key, Effect>}
|
|
1524
1524
|
*/
|
|
1525
|
-
|
|
1525
|
+
F(this, Se, /* @__PURE__ */ new Map());
|
|
1526
1526
|
/**
|
|
1527
1527
|
* Similar to #onscreen with respect to the keys, but contains branches that are not yet
|
|
1528
1528
|
* in the DOM, because their insertion is deferred.
|
|
1529
1529
|
* @type {Map<Key, Branch>}
|
|
1530
1530
|
*/
|
|
1531
|
-
|
|
1531
|
+
F(this, se, /* @__PURE__ */ new Map());
|
|
1532
1532
|
/**
|
|
1533
1533
|
* Keys of effects that are currently outroing
|
|
1534
1534
|
* @type {Set<Key>}
|
|
1535
1535
|
*/
|
|
1536
|
-
|
|
1536
|
+
F(this, $e, /* @__PURE__ */ new Set());
|
|
1537
1537
|
/**
|
|
1538
1538
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
1539
1539
|
* This is necessary for `<svelte:element>`
|
|
1540
1540
|
*/
|
|
1541
|
-
|
|
1541
|
+
F(this, Ft, !0);
|
|
1542
1542
|
/**
|
|
1543
1543
|
* @param {Batch} batch
|
|
1544
1544
|
*/
|
|
1545
|
-
|
|
1546
|
-
if (h(this,
|
|
1545
|
+
F(this, Ht, (t) => {
|
|
1546
|
+
if (h(this, me).has(t)) {
|
|
1547
1547
|
var n = (
|
|
1548
1548
|
/** @type {Key} */
|
|
1549
|
-
h(this,
|
|
1550
|
-
), r = h(this,
|
|
1549
|
+
h(this, me).get(t)
|
|
1550
|
+
), r = h(this, Se).get(n);
|
|
1551
1551
|
if (r)
|
|
1552
|
-
|
|
1552
|
+
qn(r), h(this, $e).delete(n);
|
|
1553
1553
|
else {
|
|
1554
|
-
var s = h(this,
|
|
1555
|
-
s && (s.effect.f &
|
|
1554
|
+
var s = h(this, se).get(n);
|
|
1555
|
+
s && (s.effect.f & Z) === 0 && (h(this, Se).set(n, s.effect), h(this, se).delete(n), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), r = s.effect);
|
|
1556
1556
|
}
|
|
1557
|
-
for (const [i, o] of h(this,
|
|
1558
|
-
if (h(this,
|
|
1557
|
+
for (const [i, o] of h(this, me)) {
|
|
1558
|
+
if (h(this, me).delete(i), i === t)
|
|
1559
1559
|
break;
|
|
1560
|
-
const
|
|
1561
|
-
|
|
1560
|
+
const l = h(this, se).get(o);
|
|
1561
|
+
l && (Ne(l.effect), h(this, se).delete(o));
|
|
1562
1562
|
}
|
|
1563
|
-
for (const [i, o] of h(this,
|
|
1564
|
-
if (i === n || h(this,
|
|
1565
|
-
const
|
|
1566
|
-
if (Array.from(h(this,
|
|
1563
|
+
for (const [i, o] of h(this, Se)) {
|
|
1564
|
+
if (i === n || h(this, $e).has(i) || (o.f & Z) !== 0) continue;
|
|
1565
|
+
const l = () => {
|
|
1566
|
+
if (Array.from(h(this, me).values()).includes(i)) {
|
|
1567
1567
|
var f = document.createDocumentFragment();
|
|
1568
|
-
|
|
1568
|
+
Cr(o, f), f.append(ft()), h(this, se).set(i, { effect: o, fragment: f });
|
|
1569
1569
|
} else
|
|
1570
|
-
|
|
1571
|
-
h(this,
|
|
1570
|
+
Ne(o);
|
|
1571
|
+
h(this, $e).delete(i), h(this, Se).delete(i);
|
|
1572
1572
|
};
|
|
1573
|
-
h(this,
|
|
1573
|
+
h(this, Ft) || !r ? (h(this, $e).add(i), On(o, l, !1)) : l();
|
|
1574
1574
|
}
|
|
1575
1575
|
}
|
|
1576
1576
|
});
|
|
1577
1577
|
/**
|
|
1578
1578
|
* @param {Batch} batch
|
|
1579
1579
|
*/
|
|
1580
|
-
|
|
1581
|
-
h(this,
|
|
1582
|
-
const n = Array.from(h(this,
|
|
1583
|
-
for (const [r, s] of h(this,
|
|
1584
|
-
n.includes(r) || (
|
|
1580
|
+
F(this, nn, (t) => {
|
|
1581
|
+
h(this, me).delete(t);
|
|
1582
|
+
const n = Array.from(h(this, me).values());
|
|
1583
|
+
for (const [r, s] of h(this, se))
|
|
1584
|
+
n.includes(r) || (Ne(s.effect), h(this, se).delete(r));
|
|
1585
1585
|
});
|
|
1586
|
-
this.anchor = t,
|
|
1586
|
+
this.anchor = t, Ce(this, Ft, n);
|
|
1587
1587
|
}
|
|
1588
1588
|
/**
|
|
1589
1589
|
*
|
|
@@ -1593,41 +1593,41 @@ class qr {
|
|
|
1593
1593
|
ensure(t, n) {
|
|
1594
1594
|
var r = (
|
|
1595
1595
|
/** @type {Batch} */
|
|
1596
|
-
|
|
1597
|
-
), s =
|
|
1598
|
-
if (n && !h(this,
|
|
1596
|
+
I
|
|
1597
|
+
), s = wr();
|
|
1598
|
+
if (n && !h(this, Se).has(t) && !h(this, se).has(t))
|
|
1599
1599
|
if (s) {
|
|
1600
|
-
var i = document.createDocumentFragment(), o =
|
|
1601
|
-
i.append(o), h(this,
|
|
1602
|
-
effect:
|
|
1600
|
+
var i = document.createDocumentFragment(), o = ft();
|
|
1601
|
+
i.append(o), h(this, se).set(t, {
|
|
1602
|
+
effect: Ot(() => n(o)),
|
|
1603
1603
|
fragment: i
|
|
1604
1604
|
});
|
|
1605
1605
|
} else
|
|
1606
|
-
h(this,
|
|
1606
|
+
h(this, Se).set(
|
|
1607
1607
|
t,
|
|
1608
|
-
|
|
1608
|
+
Ot(() => n(this.anchor))
|
|
1609
1609
|
);
|
|
1610
|
-
if (h(this,
|
|
1611
|
-
for (const [
|
|
1612
|
-
|
|
1613
|
-
for (const [
|
|
1614
|
-
|
|
1615
|
-
r.oncommit(h(this,
|
|
1610
|
+
if (h(this, me).set(r, t), s) {
|
|
1611
|
+
for (const [l, a] of h(this, Se))
|
|
1612
|
+
l === t ? r.unskip_effect(a) : r.skip_effect(a);
|
|
1613
|
+
for (const [l, a] of h(this, se))
|
|
1614
|
+
l === t ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
|
|
1615
|
+
r.oncommit(h(this, Ht)), r.ondiscard(h(this, nn));
|
|
1616
1616
|
} else
|
|
1617
|
-
h(this,
|
|
1617
|
+
h(this, Ht).call(this, r);
|
|
1618
1618
|
}
|
|
1619
1619
|
}
|
|
1620
|
-
|
|
1621
|
-
function
|
|
1620
|
+
me = new WeakMap(), Se = new WeakMap(), se = new WeakMap(), $e = new WeakMap(), Ft = new WeakMap(), Ht = new WeakMap(), nn = new WeakMap();
|
|
1621
|
+
function hn(e, t, ...n) {
|
|
1622
1622
|
var r = new qr(e);
|
|
1623
|
-
|
|
1623
|
+
zn(() => {
|
|
1624
1624
|
const s = t() ?? null;
|
|
1625
1625
|
r.ensure(s, s && ((i) => s(i, ...n)));
|
|
1626
|
-
},
|
|
1626
|
+
}, mt);
|
|
1627
1627
|
}
|
|
1628
|
-
function
|
|
1629
|
-
|
|
1630
|
-
const t =
|
|
1628
|
+
function Fn(e) {
|
|
1629
|
+
he === null && ar(), en(() => {
|
|
1630
|
+
const t = Dt(e);
|
|
1631
1631
|
if (typeof t == "function") return (
|
|
1632
1632
|
/** @type {() => void} */
|
|
1633
1633
|
t
|
|
@@ -1635,27 +1635,27 @@ function qn(e) {
|
|
|
1635
1635
|
});
|
|
1636
1636
|
}
|
|
1637
1637
|
function hi(e) {
|
|
1638
|
-
|
|
1638
|
+
he === null && ar(), Fn(() => () => Dt(e));
|
|
1639
1639
|
}
|
|
1640
|
-
function
|
|
1641
|
-
var r = new qr(e), s = n ?
|
|
1642
|
-
function i(o,
|
|
1643
|
-
r.ensure(o,
|
|
1640
|
+
function Ie(e, t, n = !1) {
|
|
1641
|
+
var r = new qr(e), s = n ? mt : 0;
|
|
1642
|
+
function i(o, l) {
|
|
1643
|
+
r.ensure(o, l);
|
|
1644
1644
|
}
|
|
1645
|
-
|
|
1645
|
+
zn(() => {
|
|
1646
1646
|
var o = !1;
|
|
1647
|
-
t((
|
|
1648
|
-
o = !0, i(
|
|
1647
|
+
t((l, a = 0) => {
|
|
1648
|
+
o = !0, i(a, l);
|
|
1649
1649
|
}), o || i(-1, null);
|
|
1650
1650
|
}, s);
|
|
1651
1651
|
}
|
|
1652
|
-
function
|
|
1652
|
+
function Ut(e, t) {
|
|
1653
1653
|
return t;
|
|
1654
1654
|
}
|
|
1655
1655
|
function _i(e, t, n) {
|
|
1656
|
-
for (var r = [], s = t.length, i, o = t.length,
|
|
1657
|
-
let c = t[
|
|
1658
|
-
|
|
1656
|
+
for (var r = [], s = t.length, i, o = t.length, l = 0; l < s; l++) {
|
|
1657
|
+
let c = t[l];
|
|
1658
|
+
On(
|
|
1659
1659
|
c,
|
|
1660
1660
|
() => {
|
|
1661
1661
|
if (i) {
|
|
@@ -1664,7 +1664,7 @@ function _i(e, t, n) {
|
|
|
1664
1664
|
/** @type {Set<EachOutroGroup>} */
|
|
1665
1665
|
e.outrogroups
|
|
1666
1666
|
);
|
|
1667
|
-
|
|
1667
|
+
kn(e, Mn(i.done)), v.delete(i), v.size === 0 && (e.outrogroups = null);
|
|
1668
1668
|
}
|
|
1669
1669
|
} else
|
|
1670
1670
|
o -= 1;
|
|
@@ -1673,8 +1673,8 @@ function _i(e, t, n) {
|
|
|
1673
1673
|
);
|
|
1674
1674
|
}
|
|
1675
1675
|
if (o === 0) {
|
|
1676
|
-
var
|
|
1677
|
-
if (
|
|
1676
|
+
var a = r.length === 0 && n !== null;
|
|
1677
|
+
if (a) {
|
|
1678
1678
|
var f = (
|
|
1679
1679
|
/** @type {Element} */
|
|
1680
1680
|
n
|
|
@@ -1684,191 +1684,191 @@ function _i(e, t, n) {
|
|
|
1684
1684
|
);
|
|
1685
1685
|
Qs(u), u.append(f), e.items.clear();
|
|
1686
1686
|
}
|
|
1687
|
-
|
|
1687
|
+
kn(e, t, !a);
|
|
1688
1688
|
} else
|
|
1689
1689
|
i = {
|
|
1690
1690
|
pending: new Set(t),
|
|
1691
1691
|
done: /* @__PURE__ */ new Set()
|
|
1692
1692
|
}, (e.outrogroups ?? (e.outrogroups = /* @__PURE__ */ new Set())).add(i);
|
|
1693
1693
|
}
|
|
1694
|
-
function
|
|
1694
|
+
function kn(e, t, n = !0) {
|
|
1695
1695
|
var r;
|
|
1696
1696
|
if (e.pending.size > 0) {
|
|
1697
1697
|
r = /* @__PURE__ */ new Set();
|
|
1698
1698
|
for (const o of e.pending.values())
|
|
1699
|
-
for (const
|
|
1699
|
+
for (const l of o)
|
|
1700
1700
|
r.add(
|
|
1701
1701
|
/** @type {EachItem} */
|
|
1702
|
-
e.items.get(
|
|
1702
|
+
e.items.get(l).e
|
|
1703
1703
|
);
|
|
1704
1704
|
}
|
|
1705
1705
|
for (var s = 0; s < t.length; s++) {
|
|
1706
1706
|
var i = t[s];
|
|
1707
1707
|
if (r?.has(i)) {
|
|
1708
|
-
i.f |=
|
|
1708
|
+
i.f |= ke;
|
|
1709
1709
|
const o = document.createDocumentFragment();
|
|
1710
|
-
|
|
1710
|
+
Cr(i, o);
|
|
1711
1711
|
} else
|
|
1712
|
-
|
|
1712
|
+
Ne(t[s], n);
|
|
1713
1713
|
}
|
|
1714
1714
|
}
|
|
1715
|
-
var
|
|
1716
|
-
function
|
|
1717
|
-
var o = e,
|
|
1718
|
-
if (
|
|
1715
|
+
var Zn;
|
|
1716
|
+
function Gt(e, t, n, r, s, i = null) {
|
|
1717
|
+
var o = e, l = /* @__PURE__ */ new Map(), a = (t & nr) !== 0;
|
|
1718
|
+
if (a) {
|
|
1719
1719
|
var f = (
|
|
1720
1720
|
/** @type {Element} */
|
|
1721
1721
|
e
|
|
1722
1722
|
);
|
|
1723
|
-
o = f.appendChild(
|
|
1723
|
+
o = f.appendChild(ft());
|
|
1724
1724
|
}
|
|
1725
1725
|
var u = null, c = /* @__PURE__ */ Vs(() => {
|
|
1726
|
-
var
|
|
1727
|
-
return
|
|
1728
|
-
}), v,
|
|
1729
|
-
function T
|
|
1730
|
-
(
|
|
1726
|
+
var T = n();
|
|
1727
|
+
return sr(T) ? T : T == null ? [] : Mn(T);
|
|
1728
|
+
}), v, m = /* @__PURE__ */ new Map(), p = !0;
|
|
1729
|
+
function k(T) {
|
|
1730
|
+
(N.effect.f & De) === 0 && (N.pending.delete(T), N.fallback = u, pi(N, v, o, t, r), u !== null && (v.length === 0 ? (u.f & ke) === 0 ? qn(u) : (u.f ^= ke, Pt(u, null, o)) : On(u, () => {
|
|
1731
1731
|
u = null;
|
|
1732
1732
|
})));
|
|
1733
1733
|
}
|
|
1734
|
-
function d(
|
|
1735
|
-
|
|
1734
|
+
function d(T) {
|
|
1735
|
+
N.pending.delete(T);
|
|
1736
1736
|
}
|
|
1737
|
-
var w =
|
|
1737
|
+
var w = zn(() => {
|
|
1738
1738
|
v = /** @type {V[]} */
|
|
1739
1739
|
_(c);
|
|
1740
|
-
for (var
|
|
1740
|
+
for (var T = v.length, D = /* @__PURE__ */ new Set(), q = (
|
|
1741
1741
|
/** @type {Batch} */
|
|
1742
|
-
|
|
1743
|
-
),
|
|
1744
|
-
var
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
p ? o :
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1742
|
+
I
|
|
1743
|
+
), _e = wr(), j = 0; j < T; j += 1) {
|
|
1744
|
+
var oe = v[j], pe = r(oe, j), g = p ? null : l.get(pe);
|
|
1745
|
+
g ? (g.v && Lt(g.v, oe), g.i && Lt(g.i, j), _e && q.unskip_effect(g.e)) : (g = mi(
|
|
1746
|
+
l,
|
|
1747
|
+
p ? o : Zn ?? (Zn = ft()),
|
|
1748
|
+
oe,
|
|
1749
|
+
pe,
|
|
1750
|
+
j,
|
|
1751
1751
|
s,
|
|
1752
1752
|
t,
|
|
1753
1753
|
n
|
|
1754
|
-
), p || (
|
|
1754
|
+
), p || (g.e.f |= ke), l.set(pe, g)), D.add(pe);
|
|
1755
1755
|
}
|
|
1756
|
-
if (
|
|
1757
|
-
if (
|
|
1758
|
-
for (const [
|
|
1759
|
-
|
|
1760
|
-
|
|
1756
|
+
if (T === 0 && i && !u && (p ? u = Ot(() => i(o)) : (u = Ot(() => i(Zn ?? (Zn = ft()))), u.f |= ke)), T > D.size && xs(), !p)
|
|
1757
|
+
if (m.set(q, D), _e) {
|
|
1758
|
+
for (const [M, x] of l)
|
|
1759
|
+
D.has(M) || q.skip_effect(x.e);
|
|
1760
|
+
q.oncommit(k), q.ondiscard(d);
|
|
1761
1761
|
} else
|
|
1762
|
-
|
|
1762
|
+
k(q);
|
|
1763
1763
|
_(c);
|
|
1764
|
-
}),
|
|
1764
|
+
}), N = { effect: w, items: l, pending: m, outrogroups: null, fallback: u };
|
|
1765
1765
|
p = !1;
|
|
1766
1766
|
}
|
|
1767
|
-
function
|
|
1768
|
-
for (; e !== null && (e.f &
|
|
1767
|
+
function It(e) {
|
|
1768
|
+
for (; e !== null && (e.f & ye) === 0; )
|
|
1769
1769
|
e = e.next;
|
|
1770
1770
|
return e;
|
|
1771
1771
|
}
|
|
1772
1772
|
function pi(e, t, n, r, s) {
|
|
1773
|
-
var i = (r &
|
|
1773
|
+
var i = (r & as) !== 0, o = t.length, l = e.items, a = It(e.effect.first), f, u = null, c, v = [], m = [], p, k, d, w;
|
|
1774
1774
|
if (i)
|
|
1775
1775
|
for (w = 0; w < o; w += 1)
|
|
1776
|
-
p = t[w],
|
|
1777
|
-
|
|
1776
|
+
p = t[w], k = s(p, w), d = /** @type {EachItem} */
|
|
1777
|
+
l.get(k).e, (d.f & ke) === 0 && (d.nodes?.a?.measure(), (c ?? (c = /* @__PURE__ */ new Set())).add(d));
|
|
1778
1778
|
for (w = 0; w < o; w += 1) {
|
|
1779
|
-
if (p = t[w],
|
|
1780
|
-
|
|
1781
|
-
for (const
|
|
1782
|
-
|
|
1783
|
-
if ((d.f &
|
|
1784
|
-
if (d.f ^=
|
|
1785
|
-
|
|
1779
|
+
if (p = t[w], k = s(p, w), d = /** @type {EachItem} */
|
|
1780
|
+
l.get(k).e, e.outrogroups !== null)
|
|
1781
|
+
for (const g of e.outrogroups)
|
|
1782
|
+
g.pending.delete(d), g.done.delete(d);
|
|
1783
|
+
if ((d.f & ke) !== 0)
|
|
1784
|
+
if (d.f ^= ke, d === a)
|
|
1785
|
+
Pt(d, null, n);
|
|
1786
1786
|
else {
|
|
1787
|
-
var
|
|
1788
|
-
d === e.effect.last && (e.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev),
|
|
1787
|
+
var N = u ? u.next : a;
|
|
1788
|
+
d === e.effect.last && (e.effect.last = d.prev), d.prev && (d.prev.next = d.next), d.next && (d.next.prev = d.prev), He(e, u, d), He(e, d, N), Pt(d, N, n), u = d, v = [], m = [], a = It(u.next);
|
|
1789
1789
|
continue;
|
|
1790
1790
|
}
|
|
1791
|
-
if ((d.f &
|
|
1791
|
+
if ((d.f & Z) !== 0 && (qn(d), i && (d.nodes?.a?.unfix(), (c ?? (c = /* @__PURE__ */ new Set())).delete(d))), d !== a) {
|
|
1792
1792
|
if (f !== void 0 && f.has(d)) {
|
|
1793
|
-
if (v.length <
|
|
1794
|
-
var
|
|
1795
|
-
u =
|
|
1796
|
-
var
|
|
1797
|
-
for (
|
|
1798
|
-
|
|
1799
|
-
for (
|
|
1800
|
-
f.delete(
|
|
1801
|
-
|
|
1793
|
+
if (v.length < m.length) {
|
|
1794
|
+
var T = m[0], D;
|
|
1795
|
+
u = T.prev;
|
|
1796
|
+
var q = v[0], _e = v[v.length - 1];
|
|
1797
|
+
for (D = 0; D < v.length; D += 1)
|
|
1798
|
+
Pt(v[D], T, n);
|
|
1799
|
+
for (D = 0; D < m.length; D += 1)
|
|
1800
|
+
f.delete(m[D]);
|
|
1801
|
+
He(e, q.prev, _e.next), He(e, u, q), He(e, _e, T), a = T, u = _e, w -= 1, v = [], m = [];
|
|
1802
1802
|
} else
|
|
1803
|
-
f.delete(d),
|
|
1803
|
+
f.delete(d), Pt(d, a, n), He(e, d.prev, d.next), He(e, d, u === null ? e.effect.first : u.next), He(e, u, d), u = d;
|
|
1804
1804
|
continue;
|
|
1805
1805
|
}
|
|
1806
|
-
for (v = [],
|
|
1807
|
-
(f ?? (f = /* @__PURE__ */ new Set())).add(
|
|
1808
|
-
if (
|
|
1806
|
+
for (v = [], m = []; a !== null && a !== d; )
|
|
1807
|
+
(f ?? (f = /* @__PURE__ */ new Set())).add(a), m.push(a), a = It(a.next);
|
|
1808
|
+
if (a === null)
|
|
1809
1809
|
continue;
|
|
1810
1810
|
}
|
|
1811
|
-
(d.f &
|
|
1811
|
+
(d.f & ke) === 0 && v.push(d), u = d, a = It(d.next);
|
|
1812
1812
|
}
|
|
1813
1813
|
if (e.outrogroups !== null) {
|
|
1814
|
-
for (const
|
|
1815
|
-
|
|
1814
|
+
for (const g of e.outrogroups)
|
|
1815
|
+
g.pending.size === 0 && (kn(e, Mn(g.done)), e.outrogroups?.delete(g));
|
|
1816
1816
|
e.outrogroups.size === 0 && (e.outrogroups = null);
|
|
1817
1817
|
}
|
|
1818
|
-
if (
|
|
1819
|
-
var
|
|
1818
|
+
if (a !== null || f !== void 0) {
|
|
1819
|
+
var j = [];
|
|
1820
1820
|
if (f !== void 0)
|
|
1821
1821
|
for (d of f)
|
|
1822
|
-
(d.f &
|
|
1823
|
-
for (;
|
|
1824
|
-
(
|
|
1825
|
-
var
|
|
1826
|
-
if (
|
|
1827
|
-
var
|
|
1822
|
+
(d.f & Z) === 0 && j.push(d);
|
|
1823
|
+
for (; a !== null; )
|
|
1824
|
+
(a.f & Z) === 0 && a !== e.fallback && j.push(a), a = It(a.next);
|
|
1825
|
+
var oe = j.length;
|
|
1826
|
+
if (oe > 0) {
|
|
1827
|
+
var pe = (r & nr) !== 0 && o === 0 ? n : null;
|
|
1828
1828
|
if (i) {
|
|
1829
|
-
for (w = 0; w <
|
|
1830
|
-
|
|
1831
|
-
for (w = 0; w <
|
|
1832
|
-
|
|
1829
|
+
for (w = 0; w < oe; w += 1)
|
|
1830
|
+
j[w].nodes?.a?.measure();
|
|
1831
|
+
for (w = 0; w < oe; w += 1)
|
|
1832
|
+
j[w].nodes?.a?.fix();
|
|
1833
1833
|
}
|
|
1834
|
-
_i(e,
|
|
1834
|
+
_i(e, j, pe);
|
|
1835
1835
|
}
|
|
1836
1836
|
}
|
|
1837
|
-
i &&
|
|
1837
|
+
i && gn(() => {
|
|
1838
1838
|
if (c !== void 0)
|
|
1839
1839
|
for (d of c)
|
|
1840
1840
|
d.nodes?.a?.apply();
|
|
1841
1841
|
});
|
|
1842
1842
|
}
|
|
1843
|
-
function mi(e, t, n, r, s, i, o,
|
|
1844
|
-
var
|
|
1843
|
+
function mi(e, t, n, r, s, i, o, l) {
|
|
1844
|
+
var a = (o & is) !== 0 ? (o & ls) === 0 ? /* @__PURE__ */ Us(n, !1, !1) : zt(n) : null, f = (o & os) !== 0 ? zt(s) : null;
|
|
1845
1845
|
return {
|
|
1846
|
-
v:
|
|
1846
|
+
v: a,
|
|
1847
1847
|
i: f,
|
|
1848
|
-
e:
|
|
1848
|
+
e: Ot(() => (i(t, a ?? n, f ?? s, l), () => {
|
|
1849
1849
|
e.delete(r);
|
|
1850
1850
|
}))
|
|
1851
1851
|
};
|
|
1852
1852
|
}
|
|
1853
|
-
function
|
|
1853
|
+
function Pt(e, t, n) {
|
|
1854
1854
|
if (e.nodes)
|
|
1855
|
-
for (var r = e.nodes.start, s = e.nodes.end, i = t && (t.f &
|
|
1855
|
+
for (var r = e.nodes.start, s = e.nodes.end, i = t && (t.f & ke) === 0 ? (
|
|
1856
1856
|
/** @type {EffectNodes} */
|
|
1857
1857
|
t.nodes.start
|
|
1858
1858
|
) : n; r !== null; ) {
|
|
1859
1859
|
var o = (
|
|
1860
1860
|
/** @type {TemplateNode} */
|
|
1861
|
-
/* @__PURE__ */
|
|
1861
|
+
/* @__PURE__ */ jt(r)
|
|
1862
1862
|
);
|
|
1863
1863
|
if (i.before(r), r === s)
|
|
1864
1864
|
return;
|
|
1865
1865
|
r = o;
|
|
1866
1866
|
}
|
|
1867
1867
|
}
|
|
1868
|
-
function
|
|
1868
|
+
function He(e, t, n) {
|
|
1869
1869
|
t === null ? e.effect.first = n : t.next = n, n === null ? e.effect.last = t : n.prev = t;
|
|
1870
1870
|
}
|
|
1871
|
-
function
|
|
1871
|
+
function sn(e, t) {
|
|
1872
1872
|
ni(() => {
|
|
1873
1873
|
var n = e.getRootNode(), r = (
|
|
1874
1874
|
/** @type {ShadowRoot} */
|
|
@@ -1882,7 +1882,7 @@ function Jt(e, t) {
|
|
|
1882
1882
|
)
|
|
1883
1883
|
);
|
|
1884
1884
|
if (!r.querySelector("#" + t.hash)) {
|
|
1885
|
-
const s =
|
|
1885
|
+
const s = br("style");
|
|
1886
1886
|
s.id = t.hash, s.textContent = t.code, r.appendChild(s);
|
|
1887
1887
|
}
|
|
1888
1888
|
});
|
|
@@ -1900,10 +1900,10 @@ function gi() {
|
|
|
1900
1900
|
for (var e, t, n = 0, r = "", s = arguments.length; n < s; n++) (e = arguments[n]) && (t = Fr(e)) && (r && (r += " "), r += t);
|
|
1901
1901
|
return r;
|
|
1902
1902
|
}
|
|
1903
|
-
function
|
|
1903
|
+
function tt(e) {
|
|
1904
1904
|
return typeof e == "object" ? gi(e) : e ?? "";
|
|
1905
1905
|
}
|
|
1906
|
-
const
|
|
1906
|
+
const Jn = [...`
|
|
1907
1907
|
\r\f \v\uFEFF`];
|
|
1908
1908
|
function wi(e, t, n) {
|
|
1909
1909
|
var r = e == null ? "" : "" + e;
|
|
@@ -1913,8 +1913,8 @@ function wi(e, t, n) {
|
|
|
1913
1913
|
r = r ? r + " " + s : s;
|
|
1914
1914
|
else if (r.length)
|
|
1915
1915
|
for (var i = s.length, o = 0; (o = r.indexOf(s, o)) >= 0; ) {
|
|
1916
|
-
var
|
|
1917
|
-
(o === 0 ||
|
|
1916
|
+
var l = o + i;
|
|
1917
|
+
(o === 0 || Jn.includes(r[o - 1])) && (l === r.length || Jn.includes(r[l])) ? r = (o === 0 ? "" : r.substring(0, o)) + r.substring(l + 1) : o = l;
|
|
1918
1918
|
}
|
|
1919
1919
|
}
|
|
1920
1920
|
return r === "" ? null : r;
|
|
@@ -1922,15 +1922,15 @@ function wi(e, t, n) {
|
|
|
1922
1922
|
function bi(e, t) {
|
|
1923
1923
|
return e == null ? null : String(e);
|
|
1924
1924
|
}
|
|
1925
|
-
function
|
|
1925
|
+
function be(e, t, n, r, s, i) {
|
|
1926
1926
|
var o = e.__className;
|
|
1927
1927
|
if (o !== n || o === void 0) {
|
|
1928
|
-
var
|
|
1929
|
-
|
|
1928
|
+
var l = wi(n, r, i);
|
|
1929
|
+
l == null ? e.removeAttribute("class") : t ? e.className = l : e.setAttribute("class", l), e.__className = n;
|
|
1930
1930
|
} else if (i && s !== i)
|
|
1931
|
-
for (var
|
|
1932
|
-
var f = !!i[
|
|
1933
|
-
(s == null || f !== !!s[
|
|
1931
|
+
for (var a in i) {
|
|
1932
|
+
var f = !!i[a];
|
|
1933
|
+
(s == null || f !== !!s[a]) && e.classList.toggle(a, f);
|
|
1934
1934
|
}
|
|
1935
1935
|
return i;
|
|
1936
1936
|
}
|
|
@@ -1943,112 +1943,112 @@ function yi(e, t, n, r) {
|
|
|
1943
1943
|
return r;
|
|
1944
1944
|
}
|
|
1945
1945
|
const xi = /* @__PURE__ */ Symbol("is custom element"), Ei = /* @__PURE__ */ Symbol("is html"), Si = bs ? "progress" : "PROGRESS";
|
|
1946
|
-
function
|
|
1947
|
-
var n =
|
|
1946
|
+
function Qn(e, t) {
|
|
1947
|
+
var n = Hr(e);
|
|
1948
1948
|
n.value === (n.value = // treat null and undefined the same for the initial value
|
|
1949
1949
|
t ?? void 0) || // @ts-expect-error
|
|
1950
1950
|
// `progress` elements always need their value set when it's `0`
|
|
1951
1951
|
e.value === t && (t !== 0 || e.nodeName !== Si) || (e.value = t ?? "");
|
|
1952
1952
|
}
|
|
1953
|
-
function
|
|
1954
|
-
var s =
|
|
1953
|
+
function ie(e, t, n, r) {
|
|
1954
|
+
var s = Hr(e);
|
|
1955
1955
|
s[t] !== (s[t] = n) && (t === "loading" && (e[ws] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && ki(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
|
|
1956
1956
|
}
|
|
1957
|
-
function
|
|
1957
|
+
function Hr(e) {
|
|
1958
1958
|
return (
|
|
1959
1959
|
/** @type {Record<string | symbol, unknown>} **/
|
|
1960
1960
|
// @ts-expect-error
|
|
1961
1961
|
e.__attributes ?? (e.__attributes = {
|
|
1962
1962
|
[xi]: e.nodeName.includes("-"),
|
|
1963
|
-
[Ei]: e.namespaceURI ===
|
|
1963
|
+
[Ei]: e.namespaceURI === rr
|
|
1964
1964
|
})
|
|
1965
1965
|
);
|
|
1966
1966
|
}
|
|
1967
|
-
var
|
|
1967
|
+
var $n = /* @__PURE__ */ new Map();
|
|
1968
1968
|
function ki(e) {
|
|
1969
|
-
var t = e.getAttribute("is") || e.nodeName, n =
|
|
1969
|
+
var t = e.getAttribute("is") || e.nodeName, n = $n.get(t);
|
|
1970
1970
|
if (n) return n;
|
|
1971
|
-
|
|
1971
|
+
$n.set(t, n = []);
|
|
1972
1972
|
for (var r, s = e, i = Element.prototype; i !== s; ) {
|
|
1973
1973
|
r = ds(s);
|
|
1974
1974
|
for (var o in r)
|
|
1975
1975
|
r[o].set && n.push(o);
|
|
1976
|
-
s =
|
|
1976
|
+
s = ir(s);
|
|
1977
1977
|
}
|
|
1978
1978
|
return n;
|
|
1979
1979
|
}
|
|
1980
|
-
function
|
|
1980
|
+
function H(e, t, n, r) {
|
|
1981
1981
|
var s = (
|
|
1982
1982
|
/** @type {V} */
|
|
1983
1983
|
r
|
|
1984
1984
|
), i = !0, o = () => (i && (i = !1, s = /** @type {V} */
|
|
1985
|
-
r), s),
|
|
1986
|
-
|
|
1987
|
-
e[t],
|
|
1988
|
-
var
|
|
1989
|
-
return
|
|
1985
|
+
r), s), l;
|
|
1986
|
+
l = /** @type {V} */
|
|
1987
|
+
e[t], l === void 0 && r !== void 0 && (l = o());
|
|
1988
|
+
var a;
|
|
1989
|
+
return a = () => {
|
|
1990
1990
|
var f = (
|
|
1991
1991
|
/** @type {V} */
|
|
1992
1992
|
e[t]
|
|
1993
1993
|
);
|
|
1994
1994
|
return f === void 0 ? o() : (i = !0, f);
|
|
1995
|
-
},
|
|
1995
|
+
}, a;
|
|
1996
1996
|
}
|
|
1997
|
-
var Mi = /* @__PURE__ */
|
|
1998
|
-
const
|
|
1997
|
+
var Mi = /* @__PURE__ */ Or('<svg xmlns="http://www.w3.org/2000/svg" class="pie-window-controls__icon svelte-7vww0g" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path></svg>'), Ti = /* @__PURE__ */ Or('<svg xmlns="http://www.w3.org/2000/svg" class="pie-window-controls__icon svelte-7vww0g" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>'), Ci = /* @__PURE__ */ O('<button><!></button> <button title="Close" aria-label="Close panel"><svg xmlns="http://www.w3.org/2000/svg" class="pie-window-controls__icon svelte-7vww0g" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button>', 1);
|
|
1998
|
+
const Ri = {
|
|
1999
1999
|
hash: "svelte-7vww0g",
|
|
2000
2000
|
code: ".pie-window-controls__button.svelte-7vww0g {display:inline-flex;align-items:center;justify-content:center;width:1.35rem;height:1.35rem;padding:0;border:1px solid rgba(148, 163, 184, 0.7);border-radius:9999px;background:rgba(255, 255, 255, 0.65);color:#334155;cursor:pointer;}.pie-window-controls__button.svelte-7vww0g:hover {background:rgba(241, 245, 249, 0.95);}.pie-window-controls__button.svelte-7vww0g:focus-visible {outline:2px solid #3b82f6;outline-offset:1px;}.pie-window-controls__icon.svelte-7vww0g {display:block;}"
|
|
2001
2001
|
};
|
|
2002
|
-
function
|
|
2003
|
-
|
|
2004
|
-
let n =
|
|
2005
|
-
const s = /* @__PURE__ */
|
|
2006
|
-
var i =
|
|
2002
|
+
function Ai(e, t) {
|
|
2003
|
+
Rn(t, !0), sn(e, Ri);
|
|
2004
|
+
let n = H(t, "minimized", 3, !1), r = H(t, "buttonClass", 3, "");
|
|
2005
|
+
const s = /* @__PURE__ */ lt(() => (r() || "").trim() || "pie-window-controls__button");
|
|
2006
|
+
var i = Ci(), o = ut(i), l = S(o);
|
|
2007
2007
|
{
|
|
2008
|
-
var
|
|
2008
|
+
var a = (c) => {
|
|
2009
2009
|
var v = Mi();
|
|
2010
|
-
|
|
2010
|
+
P(c, v);
|
|
2011
2011
|
}, f = (c) => {
|
|
2012
|
-
var v =
|
|
2013
|
-
|
|
2012
|
+
var v = Ti();
|
|
2013
|
+
P(c, v);
|
|
2014
2014
|
};
|
|
2015
|
-
|
|
2016
|
-
n() ? c(
|
|
2015
|
+
Ie(l, (c) => {
|
|
2016
|
+
n() ? c(a) : c(f, -1);
|
|
2017
2017
|
});
|
|
2018
2018
|
}
|
|
2019
|
-
var u =
|
|
2019
|
+
var u = C(o, 2);
|
|
2020
2020
|
Y(() => {
|
|
2021
|
-
|
|
2022
|
-
}),
|
|
2021
|
+
be(o, 1, tt(_(s)), "svelte-7vww0g"), ie(o, "title", n() ? "Maximize" : "Minimize"), ie(o, "aria-label", n() ? "Maximize panel" : "Minimize panel"), be(u, 1, tt(_(s)), "svelte-7vww0g");
|
|
2022
|
+
}), ce("click", o, function(...c) {
|
|
2023
2023
|
t.onToggle?.apply(this, c);
|
|
2024
|
-
}),
|
|
2024
|
+
}), ce("click", u, function(...c) {
|
|
2025
2025
|
t.onClose?.apply(this, c);
|
|
2026
|
-
}),
|
|
2026
|
+
}), P(e, i), An();
|
|
2027
2027
|
}
|
|
2028
|
-
|
|
2029
|
-
var Ii = /* @__PURE__ */
|
|
2030
|
-
const
|
|
2028
|
+
Vt(["click"]);
|
|
2029
|
+
var Ii = /* @__PURE__ */ O('<div role="button" tabindex="0" title="Resize window" aria-label="Resize window"><svg viewBox="0 0 16 16" fill="currentColor"><path d="M16 16V14H14V16H16Z"></path><path d="M16 11V9H14V11H16Z"></path><path d="M13 16V14H11V16H13Z"></path></svg></div>');
|
|
2030
|
+
const Pi = {
|
|
2031
2031
|
hash: "svelte-uv6k3c",
|
|
2032
2032
|
code: ".pie-panel-resize-handle.svelte-uv6k3c {position:absolute;right:0;bottom:0;width:12px;height:12px;display:inline-flex;align-items:center;justify-content:center;cursor:nwse-resize;opacity:0.82;z-index:2;}.pie-panel-resize-handle.svelte-uv6k3c:hover {opacity:1;}.pie-panel-resize-icon.svelte-uv6k3c {width:100%;height:100%;color:color-mix(in srgb, var(--color-base-content, #334155) 30%, transparent);}"
|
|
2033
2033
|
};
|
|
2034
|
-
function
|
|
2035
|
-
|
|
2036
|
-
let n =
|
|
2037
|
-
var s = Ii(), i =
|
|
2034
|
+
function Di(e, t) {
|
|
2035
|
+
sn(e, Pi);
|
|
2036
|
+
let n = H(t, "handleClass", 3, "pie-panel-resize-handle"), r = H(t, "iconClass", 3, "pie-panel-resize-icon");
|
|
2037
|
+
var s = Ii(), i = S(s);
|
|
2038
2038
|
Y(() => {
|
|
2039
|
-
|
|
2040
|
-
}),
|
|
2039
|
+
be(s, 1, tt(n()), "svelte-uv6k3c"), be(i, 0, tt(r()), "svelte-uv6k3c");
|
|
2040
|
+
}), ce("mousedown", s, function(...o) {
|
|
2041
2041
|
t.onPointerDown?.apply(this, o);
|
|
2042
|
-
}),
|
|
2042
|
+
}), P(e, s);
|
|
2043
2043
|
}
|
|
2044
|
-
|
|
2045
|
-
const Ni = 9999,
|
|
2046
|
-
function
|
|
2047
|
-
const e = globalThis, t = e[
|
|
2048
|
-
return e[
|
|
2044
|
+
Vt(["mousedown"]);
|
|
2045
|
+
const Ni = 9999, er = "__pieFloatingPanelZIndex";
|
|
2046
|
+
function _n() {
|
|
2047
|
+
const e = globalThis, t = e[er], r = (typeof t == "number" && Number.isFinite(t) ? t : Ni) + 1;
|
|
2048
|
+
return e[er] = r, r;
|
|
2049
2049
|
}
|
|
2050
|
-
function
|
|
2051
|
-
const n = (c, v,
|
|
2050
|
+
function zi(e, t) {
|
|
2051
|
+
const n = (c, v, m) => Math.max(v, Math.min(c, m)), r = n(
|
|
2052
2052
|
Math.round(e.width * t.widthRatio),
|
|
2053
2053
|
t.minWidth,
|
|
2054
2054
|
t.maxWidth
|
|
@@ -2056,26 +2056,26 @@ function Li(e, t) {
|
|
|
2056
2056
|
Math.round(e.height * t.heightRatio),
|
|
2057
2057
|
t.minHeight,
|
|
2058
2058
|
t.maxHeight
|
|
2059
|
-
), i = t.paddingX ?? 16, o = t.paddingY ?? 16,
|
|
2059
|
+
), i = t.paddingX ?? 16, o = t.paddingY ?? 16, l = Math.max(i, e.width - r - i), a = Math.max(o, e.height - s - o), f = t.alignX === "left" ? i : t.alignX === "right" ? l : Math.max(i, Math.round((e.width - r) / 2)), u = t.alignY === "top" ? o : t.alignY === "bottom" ? a : Math.max(o, Math.round((e.height - s) / 2));
|
|
2060
2060
|
return { x: f, y: u, width: r, height: s };
|
|
2061
2061
|
}
|
|
2062
|
-
function
|
|
2062
|
+
function Li(e) {
|
|
2063
2063
|
const t = e.padding ?? 0;
|
|
2064
|
-
let n = !1, r = !1, s = 0, i = 0, o = 0,
|
|
2064
|
+
let n = !1, r = !1, s = 0, i = 0, o = 0, l = 0, a = 0, f = 0, u = 0, c = 0;
|
|
2065
2065
|
const v = (d) => {
|
|
2066
2066
|
if (!n) return;
|
|
2067
|
-
const w = e.getState(),
|
|
2067
|
+
const w = e.getState(), N = d.clientX - s, T = d.clientY - i, D = Math.max(t, window.innerWidth - w.width - t), q = Math.max(t, window.innerHeight - 100 - t);
|
|
2068
2068
|
e.setState({
|
|
2069
2069
|
...w,
|
|
2070
|
-
x: Math.max(t, Math.min(o +
|
|
2071
|
-
y: Math.max(t, Math.min(
|
|
2070
|
+
x: Math.max(t, Math.min(o + N, D)),
|
|
2071
|
+
y: Math.max(t, Math.min(l + T, q))
|
|
2072
2072
|
});
|
|
2073
|
-
},
|
|
2073
|
+
}, m = (d) => {
|
|
2074
2074
|
if (!r) return;
|
|
2075
|
-
const w = e.getState(),
|
|
2075
|
+
const w = e.getState(), N = d.clientX - a, T = d.clientY - f, D = Math.max(
|
|
2076
2076
|
e.minWidth,
|
|
2077
2077
|
window.innerWidth - w.x - t
|
|
2078
|
-
),
|
|
2078
|
+
), q = Math.max(
|
|
2079
2079
|
e.minHeight,
|
|
2080
2080
|
window.innerHeight - w.y - t
|
|
2081
2081
|
);
|
|
@@ -2083,144 +2083,197 @@ function qi(e) {
|
|
|
2083
2083
|
...w,
|
|
2084
2084
|
width: Math.max(
|
|
2085
2085
|
e.minWidth,
|
|
2086
|
-
Math.min(u +
|
|
2086
|
+
Math.min(u + N, D)
|
|
2087
2087
|
),
|
|
2088
2088
|
height: Math.max(
|
|
2089
2089
|
e.minHeight,
|
|
2090
|
-
Math.min(c +
|
|
2090
|
+
Math.min(c + T, q)
|
|
2091
2091
|
)
|
|
2092
2092
|
});
|
|
2093
2093
|
}, p = () => {
|
|
2094
2094
|
n = !1, document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", p);
|
|
2095
|
-
},
|
|
2096
|
-
r = !1, document.removeEventListener("mousemove",
|
|
2095
|
+
}, k = () => {
|
|
2096
|
+
r = !1, document.removeEventListener("mousemove", m), document.removeEventListener("mouseup", k);
|
|
2097
2097
|
};
|
|
2098
2098
|
return {
|
|
2099
2099
|
startDrag(d) {
|
|
2100
2100
|
e.onFocus?.(), n = !0, s = d.clientX, i = d.clientY;
|
|
2101
2101
|
const w = e.getState();
|
|
2102
|
-
o = w.x,
|
|
2102
|
+
o = w.x, l = w.y, document.addEventListener("mousemove", v), document.addEventListener("mouseup", p);
|
|
2103
2103
|
},
|
|
2104
2104
|
startResize(d) {
|
|
2105
|
-
e.onFocus?.(), r = !0,
|
|
2105
|
+
e.onFocus?.(), r = !0, a = d.clientX, f = d.clientY;
|
|
2106
2106
|
const w = e.getState();
|
|
2107
|
-
u = w.width, c = w.height, document.addEventListener("mousemove",
|
|
2107
|
+
u = w.width, c = w.height, document.addEventListener("mousemove", m), document.addEventListener("mouseup", k), d.preventDefault(), d.stopPropagation();
|
|
2108
2108
|
},
|
|
2109
2109
|
stop() {
|
|
2110
|
-
p(),
|
|
2110
|
+
p(), k();
|
|
2111
2111
|
}
|
|
2112
2112
|
};
|
|
2113
2113
|
}
|
|
2114
|
-
var
|
|
2115
|
-
const
|
|
2114
|
+
var Oi = /* @__PURE__ */ O("<div><!></div> <!>", 1), qi = /* @__PURE__ */ O('<section><header role="button" tabindex="0"><div class="pie-shared-floating-panel__header-main svelte-sqnpo9"><div class="pie-shared-floating-panel__header-title-wrap svelte-sqnpo9"><!> <h3 class="pie-shared-floating-panel__title svelte-sqnpo9"> </h3></div> <!></div> <div class="pie-shared-floating-panel__header-controls svelte-sqnpo9"><!></div></header> <!></section>');
|
|
2115
|
+
const Fi = {
|
|
2116
2116
|
hash: "svelte-sqnpo9",
|
|
2117
2117
|
code: ".pie-shared-floating-panel.svelte-sqnpo9 {position:fixed;display:flex;flex-direction:column;background:var(--color-base-100, #fff);color:var(--color-base-content, #1f2937);border:2px solid var(--color-base-300, #d1d5db);border-radius:8px;box-shadow:0 25px 50px -12px rgba(0, 0, 0, 0.25);overflow:hidden;font-family:var(--pie-font-family, Inter, system-ui, sans-serif);}.pie-shared-floating-panel__header.svelte-sqnpo9 {padding:8px 16px;display:flex;align-items:center;justify-content:space-between;background:var(--color-base-200, #f3f4f6);cursor:move;user-select:none;border-bottom:1px solid var(--color-base-300, #d1d5db);}.pie-shared-floating-panel__header-main.svelte-sqnpo9 {display:flex;align-items:center;gap:8px;min-width:0;flex:1;}.pie-shared-floating-panel__header-title-wrap.svelte-sqnpo9 {display:flex;align-items:center;gap:8px;min-width:0;}.pie-shared-floating-panel__title.svelte-sqnpo9 {margin:0;font-size:0.95rem;font-weight:700;}.pie-shared-floating-panel__header-controls.svelte-sqnpo9 {display:flex;gap:4px;}.pie-shared-floating-panel__body.svelte-sqnpo9 {flex:1;min-height:0;display:flex;flex-direction:column;}"
|
|
2118
2118
|
};
|
|
2119
2119
|
function Hi(e, t) {
|
|
2120
|
-
|
|
2121
|
-
let n =
|
|
2122
|
-
const T =
|
|
2120
|
+
Rn(t, !0), sn(e, Fi);
|
|
2121
|
+
let n = H(t, "ariaLabel", 3, "Drag panel"), r = H(t, "minWidth", 3, 320), s = H(t, "minHeight", 3, 260), i = H(t, "defaultMinimized", 3, !1), o = H(t, "persistenceScope", 3, ""), l = H(t, "persistencePanelId", 3, ""), a = H(t, "className", 3, ""), f = H(t, "bodyClass", 3, ""), u = H(t, "headerClass", 3, ""), c = /* @__PURE__ */ A(16), v = /* @__PURE__ */ A(16), m = /* @__PURE__ */ A(420), p = /* @__PURE__ */ A(480), k = /* @__PURE__ */ A(Pe(_n())), d = /* @__PURE__ */ A(Pe(Dt(() => i()))), w = /* @__PURE__ */ A(!1);
|
|
2122
|
+
const N = "pie:debug-panels:v1", T = Li({
|
|
2123
2123
|
getState: () => ({
|
|
2124
|
-
x: _(
|
|
2125
|
-
y: _(
|
|
2126
|
-
width: _(
|
|
2127
|
-
height: _(
|
|
2124
|
+
x: _(c),
|
|
2125
|
+
y: _(v),
|
|
2126
|
+
width: _(m),
|
|
2127
|
+
height: _(p)
|
|
2128
2128
|
}),
|
|
2129
|
-
setState: (
|
|
2130
|
-
b(
|
|
2129
|
+
setState: (y) => {
|
|
2130
|
+
b(c, y.x, !0), b(v, y.y, !0), b(m, y.width, !0), b(p, y.height, !0);
|
|
2131
2131
|
},
|
|
2132
|
-
minWidth:
|
|
2133
|
-
minHeight:
|
|
2132
|
+
minWidth: Dt(() => r()),
|
|
2133
|
+
minHeight: Dt(() => s()),
|
|
2134
2134
|
onFocus: () => {
|
|
2135
|
-
b(
|
|
2135
|
+
b(k, _n(), !0);
|
|
2136
2136
|
}
|
|
2137
2137
|
});
|
|
2138
|
-
function
|
|
2139
|
-
b(
|
|
2138
|
+
function D() {
|
|
2139
|
+
b(k, _n(), !0);
|
|
2140
|
+
}
|
|
2141
|
+
function q() {
|
|
2142
|
+
const y = String(o() || "").trim(), ne = String(l() || "").trim();
|
|
2143
|
+
return !y || !ne ? null : `${N}:${y}:${ne}:layout`;
|
|
2144
|
+
}
|
|
2145
|
+
function _e(y) {
|
|
2146
|
+
const ne = window.innerWidth, z = window.innerHeight, U = Math.max(r(), Math.min(ne, y.width)), Ct = Math.max(s(), Math.min(z, y.height)), Ge = Math.max(0, ne - U), Rt = Math.max(0, z - 100);
|
|
2147
|
+
return {
|
|
2148
|
+
x: Math.max(0, Math.min(Ge, y.x)),
|
|
2149
|
+
y: Math.max(0, Math.min(Rt, y.y)),
|
|
2150
|
+
width: U,
|
|
2151
|
+
height: Ct,
|
|
2152
|
+
minimized: !!y.minimized
|
|
2153
|
+
};
|
|
2154
|
+
}
|
|
2155
|
+
function j() {
|
|
2156
|
+
const y = q();
|
|
2157
|
+
if (!y || typeof localStorage > "u") return !1;
|
|
2158
|
+
try {
|
|
2159
|
+
const ne = localStorage.getItem(y);
|
|
2160
|
+
if (!ne) return !1;
|
|
2161
|
+
const z = JSON.parse(ne);
|
|
2162
|
+
if (typeof z.x != "number" || typeof z.y != "number" || typeof z.width != "number" || typeof z.height != "number")
|
|
2163
|
+
return !1;
|
|
2164
|
+
const U = _e({
|
|
2165
|
+
x: z.x,
|
|
2166
|
+
y: z.y,
|
|
2167
|
+
width: z.width,
|
|
2168
|
+
height: z.height,
|
|
2169
|
+
minimized: !!z.minimized
|
|
2170
|
+
});
|
|
2171
|
+
return b(c, U.x, !0), b(v, U.y, !0), b(m, U.width, !0), b(p, U.height, !0), b(d, U.minimized, !0), !0;
|
|
2172
|
+
} catch {
|
|
2173
|
+
return !1;
|
|
2174
|
+
}
|
|
2140
2175
|
}
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2176
|
+
Fn(() => {
|
|
2177
|
+
if (!j()) {
|
|
2178
|
+
const y = zi({ width: window.innerWidth, height: window.innerHeight }, t.initialSizing);
|
|
2179
|
+
b(c, y.x, !0), b(v, y.y, !0), b(m, y.width, !0), b(p, y.height, !0);
|
|
2180
|
+
}
|
|
2181
|
+
b(w, !0);
|
|
2144
2182
|
}), hi(() => {
|
|
2145
2183
|
T.stop();
|
|
2146
2184
|
});
|
|
2147
|
-
const
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2185
|
+
const oe = /* @__PURE__ */ lt(() => ["pie-shared-floating-panel", a() || ""].join(" ").trim()), pe = /* @__PURE__ */ lt(() => ["pie-shared-floating-panel__body", f() || ""].join(" ").trim()), g = /* @__PURE__ */ lt(() => ["pie-shared-floating-panel__header", u() || ""].join(" ").trim());
|
|
2186
|
+
en(() => {
|
|
2187
|
+
if (!_(w)) return;
|
|
2188
|
+
const y = q();
|
|
2189
|
+
if (y && !(typeof localStorage > "u"))
|
|
2190
|
+
try {
|
|
2191
|
+
localStorage.setItem(y, JSON.stringify({
|
|
2192
|
+
x: _(c),
|
|
2193
|
+
y: _(v),
|
|
2194
|
+
width: _(m),
|
|
2195
|
+
height: _(p),
|
|
2196
|
+
minimized: _(d)
|
|
2197
|
+
}));
|
|
2198
|
+
} catch {
|
|
2199
|
+
}
|
|
2200
|
+
});
|
|
2201
|
+
var M = qi(), x = S(M), te = S(x), K = S(te), Te = S(K);
|
|
2202
|
+
hn(Te, () => t.icon ?? Kt);
|
|
2203
|
+
var ae = C(Te, 2), it = S(ae), kt = C(K, 2);
|
|
2204
|
+
hn(kt, () => t.headerActions ?? Kt);
|
|
2205
|
+
var J = C(te, 2), ze = S(J);
|
|
2206
|
+
Ai(ze, {
|
|
2154
2207
|
get minimized() {
|
|
2155
|
-
return _(
|
|
2208
|
+
return _(d);
|
|
2156
2209
|
},
|
|
2157
|
-
onToggle: () => b(
|
|
2210
|
+
onToggle: () => b(d, !_(d)),
|
|
2158
2211
|
get onClose() {
|
|
2159
2212
|
return t.onClose;
|
|
2160
2213
|
}
|
|
2161
2214
|
});
|
|
2162
|
-
var
|
|
2215
|
+
var Mt = C(x, 2);
|
|
2163
2216
|
{
|
|
2164
|
-
var
|
|
2165
|
-
var
|
|
2166
|
-
|
|
2167
|
-
var
|
|
2168
|
-
|
|
2169
|
-
onPointerDown: (
|
|
2170
|
-
}), Y(() =>
|
|
2217
|
+
var Tt = (y) => {
|
|
2218
|
+
var ne = Oi(), z = ut(ne), U = S(z);
|
|
2219
|
+
hn(U, () => t.children ?? Kt);
|
|
2220
|
+
var Ct = C(z, 2);
|
|
2221
|
+
Di(Ct, {
|
|
2222
|
+
onPointerDown: (Ge) => T.startResize(Ge)
|
|
2223
|
+
}), Y(() => be(z, 1, tt(_(pe)), "svelte-sqnpo9")), P(y, ne);
|
|
2171
2224
|
};
|
|
2172
|
-
|
|
2173
|
-
_(
|
|
2225
|
+
Ie(Mt, (y) => {
|
|
2226
|
+
_(d) || y(Tt);
|
|
2174
2227
|
});
|
|
2175
2228
|
}
|
|
2176
2229
|
Y(() => {
|
|
2177
|
-
|
|
2178
|
-
}),
|
|
2179
|
-
|
|
2180
|
-
}),
|
|
2230
|
+
be(M, 1, tt(_(oe)), "svelte-sqnpo9"), yi(M, `left: ${_(c)}px; top: ${_(v)}px; width: ${_(m)}px; z-index: ${_(k)}; ${_(d) ? "height: auto;" : `height: ${_(p)}px;`}`), be(x, 1, tt(_(g)), "svelte-sqnpo9"), ie(x, "aria-label", n()), le(it, t.title);
|
|
2231
|
+
}), ce("mousedown", x, (y) => {
|
|
2232
|
+
D(), T.startDrag(y);
|
|
2233
|
+
}), P(e, M), An();
|
|
2181
2234
|
}
|
|
2182
|
-
|
|
2183
|
-
var ji = /* @__PURE__ */
|
|
2235
|
+
Vt(["mousedown"]);
|
|
2236
|
+
var ji = /* @__PURE__ */ O('<div><strong>sectionId:</strong> <code class="svelte-1ye6lmg"> </code></div>'), Bi = /* @__PURE__ */ O('<div class="pie-demo-session-db-panel__error svelte-1ye6lmg"> </div>'), Vi = /* @__PURE__ */ O('<th class="svelte-1ye6lmg"> </th>'), Yi = /* @__PURE__ */ O('<tr><td class="svelte-1ye6lmg">No rows</td></tr>'), Xi = /* @__PURE__ */ O('<td class="svelte-1ye6lmg"> </td>'), Wi = /* @__PURE__ */ O("<tr></tr>"), Ui = /* @__PURE__ */ O('<h4 class="pie-demo-session-db-panel__table-title svelte-1ye6lmg"> </h4> <div class="pie-demo-session-db-panel__table-wrap svelte-1ye6lmg"><table class="pie-demo-session-db-panel__table svelte-1ye6lmg"><thead><tr></tr></thead><tbody><!></tbody></table></div>', 1), Gi = /* @__PURE__ */ O('<div class="pie-demo-session-db-panel__tables svelte-1ye6lmg"></div>'), Ki = /* @__PURE__ */ O('<textarea class="pie-demo-session-db-panel__json svelte-1ye6lmg" readonly="" spellcheck="false"></textarea>'), Zi = /* @__PURE__ */ O('<div class="pie-demo-session-db-panel__error svelte-1ye6lmg"> </div>'), Ji = /* @__PURE__ */ O('<!> <textarea class="pie-demo-session-db-panel__json svelte-1ye6lmg" readonly="" spellcheck="false"></textarea>', 1), Qi = /* @__PURE__ */ O('<div class="pie-demo-session-db-panel__content svelte-1ye6lmg"><div class="pie-demo-session-db-panel__meta svelte-1ye6lmg"><div><strong>assessmentId:</strong> <code class="svelte-1ye6lmg"> </code></div> <!> <div><strong>attemptId:</strong> <code class="svelte-1ye6lmg"> </code></div> <div><strong>mode:</strong> <code class="svelte-1ye6lmg"> </code></div></div> <div class="pie-demo-session-db-panel__actions svelte-1ye6lmg"><button type="button" class="pie-demo-session-db-panel__button svelte-1ye6lmg"> </button> <button type="button" class="pie-demo-session-db-panel__button svelte-1ye6lmg">Show raw tables</button> <button type="button" class="pie-demo-session-db-panel__button svelte-1ye6lmg">Show reconstructed snapshots</button> <button type="button" class="pie-demo-session-db-panel__button svelte-1ye6lmg"> </button></div> <!> <!></div>');
|
|
2184
2237
|
const $i = {
|
|
2185
2238
|
hash: "svelte-1ye6lmg",
|
|
2186
2239
|
code: `.pie-demo-session-db-panel__content.svelte-1ye6lmg {display:flex;flex-direction:column;flex:1;height:100%;min-height:0;overflow-y:hidden;overflow-x:hidden;padding:12px;font-size:0.8rem;}.pie-demo-session-db-panel__meta.svelte-1ye6lmg {display:grid;gap:0.2rem;margin-bottom:0.55rem;font-size:0.78rem;}.pie-demo-session-db-panel__actions.svelte-1ye6lmg {display:flex;gap:0.45rem;margin-bottom:0.5rem;}.pie-demo-session-db-panel__button.svelte-1ye6lmg {border:1px solid var(--color-base-300, #d1d5db);background:var(--color-base-100, #fff);color:var(--color-base-content);border-radius:6px;padding:6px 8px;font-size:0.78rem;cursor:pointer;}.pie-demo-session-db-panel__button.svelte-1ye6lmg:hover {background:color-mix(in srgb, var(--color-base-200) 65%, white);}.pie-demo-session-db-panel__button[aria-pressed="true"].svelte-1ye6lmg {background:color-mix(in srgb, var(--color-primary, #2563eb) 18%, transparent);font-weight:600;}.pie-demo-session-db-panel__button.svelte-1ye6lmg:disabled {opacity:0.6;cursor:not-allowed;}.pie-demo-session-db-panel__error.svelte-1ye6lmg {margin-bottom:0.5rem;padding:0.4rem 0.45rem;border-radius:0.3rem;background:color-mix(in srgb, var(--color-error) 12%, var(--color-base-100));border:1px solid color-mix(in srgb, var(--color-error) 35%, var(--color-base-300));}.pie-demo-session-db-panel__tables.svelte-1ye6lmg {display:flex;flex-direction:column;gap:0.5rem;flex:1;min-height:0;overflow:auto;}.pie-demo-session-db-panel__table-title.svelte-1ye6lmg {margin:0;font-size:0.75rem;font-weight:700;text-transform:lowercase;}.pie-demo-session-db-panel__table-wrap.svelte-1ye6lmg {border:1px solid color-mix(in srgb, var(--color-base-content) 25%, transparent);border-radius:0.3rem;background:color-mix(in srgb, var(--color-base-200) 65%, white);overflow:auto;max-height:9.5rem;}.pie-demo-session-db-panel__table.svelte-1ye6lmg {width:100%;border-collapse:collapse;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;font-size:0.72rem;}.pie-demo-session-db-panel__table.svelte-1ye6lmg th:where(.svelte-1ye6lmg),
|
|
2187
2240
|
.pie-demo-session-db-panel__table.svelte-1ye6lmg td:where(.svelte-1ye6lmg) {padding:0.25rem 0.35rem;border-bottom:1px solid color-mix(in srgb, var(--color-base-content) 14%, transparent);vertical-align:top;text-align:left;}.pie-demo-session-db-panel__table.svelte-1ye6lmg th:where(.svelte-1ye6lmg) {position:sticky;top:0;background:color-mix(in srgb, var(--color-base-200) 85%, white);font-weight:700;font-size:0.66rem;line-height:1.15;padding:0.18rem 0.3rem;white-space:nowrap;}.pie-demo-session-db-panel__table.svelte-1ye6lmg td:where(.svelte-1ye6lmg) {white-space:nowrap;}.pie-demo-session-db-panel__meta.svelte-1ye6lmg code:where(.svelte-1ye6lmg),
|
|
2188
2241
|
.pie-demo-session-db-panel__json.svelte-1ye6lmg {font-family:ui-monospace, SFMono-Regular, Menlo, monospace;}.pie-demo-session-db-panel__json.svelte-1ye6lmg {width:100%;flex:1;min-height:14rem;resize:none;font-family:ui-monospace, SFMono-Regular, Menlo, monospace;font-size:0.75rem;border:1px solid color-mix(in srgb, var(--color-base-content) 25%, transparent);border-radius:0.3rem;padding:0.45rem;background:color-mix(in srgb, var(--color-base-200) 65%, white);color:var(--color-base-content);box-sizing:border-box;}`
|
|
2189
2242
|
};
|
|
2190
|
-
function
|
|
2191
|
-
|
|
2192
|
-
let n =
|
|
2243
|
+
function oo(e, t) {
|
|
2244
|
+
Rn(t, !0), sn(e, $i);
|
|
2245
|
+
let n = H(t, "mode", 3, "section"), r = H(t, "sectionId", 3, ""), s = H(t, "apiBasePath", 3, "/api/session-demo"), i = /* @__PURE__ */ A(null), o = /* @__PURE__ */ A("raw-tables"), l = /* @__PURE__ */ A(!1), a = /* @__PURE__ */ A("{}"), f = /* @__PURE__ */ A(null), u = /* @__PURE__ */ A(!1);
|
|
2193
2246
|
const c = 4500;
|
|
2194
|
-
let v = /* @__PURE__ */
|
|
2247
|
+
let v = /* @__PURE__ */ A(Pe({
|
|
2195
2248
|
attempt_sessions: [],
|
|
2196
2249
|
section_sessions: [],
|
|
2197
2250
|
item_sessions: [],
|
|
2198
2251
|
assessment_sessions: []
|
|
2199
|
-
})),
|
|
2252
|
+
})), m = /* @__PURE__ */ A(Pe({
|
|
2200
2253
|
attempt_sessions: [],
|
|
2201
2254
|
section_sessions: [],
|
|
2202
2255
|
item_sessions: [],
|
|
2203
2256
|
assessment_sessions: []
|
|
2204
|
-
})), p = /* @__PURE__ */
|
|
2205
|
-
const
|
|
2206
|
-
function w(
|
|
2207
|
-
const
|
|
2208
|
-
for (const
|
|
2209
|
-
for (const
|
|
2210
|
-
|
|
2211
|
-
return
|
|
2212
|
-
}
|
|
2213
|
-
function
|
|
2214
|
-
if (
|
|
2215
|
-
if (typeof
|
|
2257
|
+
})), p = /* @__PURE__ */ A("{}");
|
|
2258
|
+
const k = /* @__PURE__ */ lt(() => n() === "section" ? ["attempt_sessions", "section_sessions", "item_sessions"] : ["attempt_sessions", "assessment_sessions"]), d = /* @__PURE__ */ lt(() => n() === "section" ? "Show section request" : "Show assessment request");
|
|
2259
|
+
function w(g) {
|
|
2260
|
+
const M = /* @__PURE__ */ new Set(), x = [];
|
|
2261
|
+
for (const te of g)
|
|
2262
|
+
for (const K of Object.keys(te))
|
|
2263
|
+
M.has(K) || (M.add(K), x.push(K));
|
|
2264
|
+
return x;
|
|
2265
|
+
}
|
|
2266
|
+
function N(g) {
|
|
2267
|
+
if (g == null) return "";
|
|
2268
|
+
if (typeof g == "object")
|
|
2216
2269
|
try {
|
|
2217
|
-
return JSON.stringify(
|
|
2270
|
+
return JSON.stringify(g);
|
|
2218
2271
|
} catch {
|
|
2219
2272
|
return "[unserializable]";
|
|
2220
2273
|
}
|
|
2221
|
-
return String(
|
|
2274
|
+
return String(g);
|
|
2222
2275
|
}
|
|
2223
|
-
const
|
|
2276
|
+
const T = {
|
|
2224
2277
|
id: "id",
|
|
2225
2278
|
assessment_id: "asm_id",
|
|
2226
2279
|
attempt_id: "att_id",
|
|
@@ -2237,108 +2290,108 @@ function io(e, t) {
|
|
|
2237
2290
|
session_payload: "payload",
|
|
2238
2291
|
snapshot_payload: "payload"
|
|
2239
2292
|
};
|
|
2240
|
-
function
|
|
2241
|
-
const
|
|
2242
|
-
if (
|
|
2243
|
-
if (
|
|
2244
|
-
const
|
|
2245
|
-
return
|
|
2246
|
-
}
|
|
2247
|
-
function
|
|
2293
|
+
function D(g) {
|
|
2294
|
+
const M = T[g];
|
|
2295
|
+
if (M) return M;
|
|
2296
|
+
if (g.length <= 14) return g;
|
|
2297
|
+
const x = g.split("_").filter(Boolean);
|
|
2298
|
+
return x.length <= 1 ? g.slice(0, 14) : x.map((K, Te) => Te === x.length - 1 ? K.slice(0, 4) : K.slice(0, 3)).join("_").slice(0, 18);
|
|
2299
|
+
}
|
|
2300
|
+
function q() {
|
|
2248
2301
|
return n() === "section" ? `${t.assessmentId}:${r()}:${t.attemptId}` : `${t.assessmentId}:${t.attemptId}`;
|
|
2249
2302
|
}
|
|
2250
|
-
function
|
|
2251
|
-
const
|
|
2252
|
-
attempt_sessions:
|
|
2303
|
+
function _e(g) {
|
|
2304
|
+
const M = g?.state || {}, x = M?.tables || {}, K = (Array.isArray(x.attempt_sessions) ? x.attempt_sessions : []).filter((J) => J.assessment_id === t.assessmentId && J.attempt_id === t.attemptId), Te = new Set(K.map((J) => J.id).filter((J) => typeof J == "number")), ae = {
|
|
2305
|
+
attempt_sessions: K,
|
|
2253
2306
|
section_sessions: [],
|
|
2254
2307
|
item_sessions: [],
|
|
2255
2308
|
assessment_sessions: []
|
|
2256
2309
|
};
|
|
2257
2310
|
if (n() === "section") {
|
|
2258
|
-
const
|
|
2259
|
-
|
|
2260
|
-
const
|
|
2261
|
-
|
|
2311
|
+
const ze = (Array.isArray(x.section_sessions) ? x.section_sessions : []).filter((y) => Te.has(y.attempt_session_id) && y.section_id === r());
|
|
2312
|
+
ae.section_sessions = ze;
|
|
2313
|
+
const Mt = new Set(ze.map((y) => y.id).filter((y) => typeof y == "number")), Tt = Array.isArray(x.item_sessions) ? x.item_sessions : [];
|
|
2314
|
+
ae.item_sessions = Tt.filter((y) => Mt.has(y.section_session_id));
|
|
2262
2315
|
} else {
|
|
2263
|
-
const
|
|
2264
|
-
|
|
2316
|
+
const J = Array.isArray(x.assessment_sessions) ? x.assessment_sessions : [];
|
|
2317
|
+
ae.assessment_sessions = J.filter((ze) => Te.has(ze.attempt_session_id));
|
|
2265
2318
|
}
|
|
2266
|
-
b(v,
|
|
2267
|
-
|
|
2319
|
+
b(v, ae, !0), b(
|
|
2320
|
+
m,
|
|
2268
2321
|
{
|
|
2269
|
-
attempt_sessions: w(
|
|
2270
|
-
section_sessions: w(
|
|
2271
|
-
item_sessions: w(
|
|
2272
|
-
assessment_sessions: w(
|
|
2322
|
+
attempt_sessions: w(ae.attempt_sessions),
|
|
2323
|
+
section_sessions: w(ae.section_sessions),
|
|
2324
|
+
item_sessions: w(ae.item_sessions),
|
|
2325
|
+
assessment_sessions: w(ae.assessment_sessions)
|
|
2273
2326
|
},
|
|
2274
2327
|
!0
|
|
2275
2328
|
);
|
|
2276
|
-
const
|
|
2277
|
-
b(p, JSON.stringify(
|
|
2329
|
+
const it = M.reconstructedSnapshots || {}, kt = q();
|
|
2330
|
+
b(p, JSON.stringify(it[kt] || {}, null, 2), !0);
|
|
2278
2331
|
}
|
|
2279
|
-
async function
|
|
2280
|
-
if (!_(
|
|
2281
|
-
b(
|
|
2332
|
+
async function j() {
|
|
2333
|
+
if (!_(l)) {
|
|
2334
|
+
b(l, !0);
|
|
2282
2335
|
try {
|
|
2283
2336
|
await t.onResetDb();
|
|
2284
2337
|
} finally {
|
|
2285
|
-
b(
|
|
2338
|
+
b(l, !1);
|
|
2286
2339
|
}
|
|
2287
2340
|
}
|
|
2288
2341
|
}
|
|
2289
|
-
async function
|
|
2290
|
-
const
|
|
2342
|
+
async function oe() {
|
|
2343
|
+
const g = new AbortController(), M = setTimeout(() => g.abort(), c);
|
|
2291
2344
|
try {
|
|
2292
|
-
const
|
|
2293
|
-
if (!
|
|
2294
|
-
throw new Error(`DB state request failed (${
|
|
2295
|
-
|
|
2296
|
-
} catch (
|
|
2297
|
-
|
|
2345
|
+
const x = await fetch(`${s()}/state`, { signal: g.signal, cache: "no-store" });
|
|
2346
|
+
if (!x.ok)
|
|
2347
|
+
throw new Error(`DB state request failed (${x.status})`);
|
|
2348
|
+
_e(await x.json()), b(i, null);
|
|
2349
|
+
} catch (x) {
|
|
2350
|
+
x instanceof Error && x.name === "AbortError" ? b(i, `DB state request timed out after ${c}ms`) : b(i, x instanceof Error ? x.message : String(x), !0);
|
|
2298
2351
|
} finally {
|
|
2299
|
-
clearTimeout(
|
|
2352
|
+
clearTimeout(M);
|
|
2300
2353
|
}
|
|
2301
2354
|
}
|
|
2302
|
-
async function
|
|
2355
|
+
async function pe() {
|
|
2303
2356
|
if (_(o) !== "request-view") return;
|
|
2304
2357
|
b(u, !0), b(f, null);
|
|
2305
|
-
const
|
|
2358
|
+
const g = new URLSearchParams({
|
|
2306
2359
|
assessmentId: t.assessmentId,
|
|
2307
2360
|
attemptId: t.attemptId
|
|
2308
2361
|
});
|
|
2309
|
-
n() === "section" && r() &&
|
|
2362
|
+
n() === "section" && r() && g.set("sectionId", r());
|
|
2310
2363
|
try {
|
|
2311
|
-
const
|
|
2312
|
-
if (!
|
|
2313
|
-
throw new Error(`Request view failed (${
|
|
2314
|
-
b(
|
|
2315
|
-
} catch (
|
|
2316
|
-
b(f,
|
|
2364
|
+
const M = await fetch(`${s()}/activity/load?${g.toString()}`, { cache: "no-store" });
|
|
2365
|
+
if (!M.ok)
|
|
2366
|
+
throw new Error(`Request view failed (${M.status})`);
|
|
2367
|
+
b(a, JSON.stringify(await M.json(), null, 2), !0);
|
|
2368
|
+
} catch (M) {
|
|
2369
|
+
b(f, M instanceof Error ? M.message : String(M), !0);
|
|
2317
2370
|
} finally {
|
|
2318
2371
|
b(u, !1);
|
|
2319
2372
|
}
|
|
2320
2373
|
}
|
|
2321
|
-
|
|
2374
|
+
en(() => {
|
|
2322
2375
|
if (typeof EventSource > "u") {
|
|
2323
|
-
b(i, "Live updates are not supported in this browser"),
|
|
2376
|
+
b(i, "Live updates are not supported in this browser"), oe();
|
|
2324
2377
|
return;
|
|
2325
2378
|
}
|
|
2326
|
-
const
|
|
2379
|
+
const g = new EventSource(`${s()}/state/stream`), M = (x) => {
|
|
2327
2380
|
try {
|
|
2328
|
-
|
|
2329
|
-
} catch (
|
|
2330
|
-
b(i,
|
|
2381
|
+
_e(JSON.parse(x.data)), _(o) === "request-view" && pe(), b(i, null);
|
|
2382
|
+
} catch (te) {
|
|
2383
|
+
b(i, te instanceof Error ? te.message : String(te), !0);
|
|
2331
2384
|
}
|
|
2332
2385
|
};
|
|
2333
|
-
return
|
|
2386
|
+
return g.addEventListener("state", M), g.onerror = () => {
|
|
2334
2387
|
b(i, "Live updates disconnected; retrying...");
|
|
2335
2388
|
}, () => {
|
|
2336
|
-
|
|
2389
|
+
g.removeEventListener("state", M), g.close();
|
|
2337
2390
|
};
|
|
2338
|
-
}),
|
|
2339
|
-
_(o), t.assessmentId, r(), t.attemptId, n(), _(o) === "request-view" &&
|
|
2340
|
-
}),
|
|
2341
|
-
|
|
2391
|
+
}), en(() => {
|
|
2392
|
+
_(o), t.assessmentId, r(), t.attemptId, n(), _(o) === "request-view" && pe();
|
|
2393
|
+
}), Fn(() => {
|
|
2394
|
+
oe();
|
|
2342
2395
|
}), Hi(e, {
|
|
2343
2396
|
title: "Session DB (Server)",
|
|
2344
2397
|
ariaLabel: "Drag session DB panel",
|
|
@@ -2361,150 +2414,165 @@ function io(e, t) {
|
|
|
2361
2414
|
get onClose() {
|
|
2362
2415
|
return t.onClose;
|
|
2363
2416
|
},
|
|
2364
|
-
children: (
|
|
2365
|
-
var
|
|
2417
|
+
children: (g, M) => {
|
|
2418
|
+
var x = Qi(), te = S(x), K = S(te), Te = C(S(K), 2), ae = S(Te), it = C(K, 2);
|
|
2366
2419
|
{
|
|
2367
|
-
var
|
|
2368
|
-
var
|
|
2369
|
-
Y(() =>
|
|
2420
|
+
var kt = (B) => {
|
|
2421
|
+
var Q = ji(), Le = C(S(Q), 2), xe = S(Le);
|
|
2422
|
+
Y(() => le(xe, r())), P(B, Q);
|
|
2370
2423
|
};
|
|
2371
|
-
|
|
2372
|
-
n() === "section" &&
|
|
2424
|
+
Ie(it, (B) => {
|
|
2425
|
+
n() === "section" && B(kt);
|
|
2373
2426
|
});
|
|
2374
2427
|
}
|
|
2375
|
-
var
|
|
2428
|
+
var J = C(it, 2), ze = C(S(J), 2), Mt = S(ze), Tt = C(J, 2), y = C(S(Tt), 2), ne = S(y), z = C(te, 2), U = S(z), Ct = S(U), Ge = C(U, 2), Rt = C(Ge, 2), on = C(Rt, 2), jr = S(on), jn = C(z, 2);
|
|
2376
2429
|
{
|
|
2377
|
-
var Br = (
|
|
2378
|
-
var
|
|
2379
|
-
Y(() =>
|
|
2430
|
+
var Br = (B) => {
|
|
2431
|
+
var Q = Bi(), Le = S(Q);
|
|
2432
|
+
Y(() => le(Le, _(i))), P(B, Q);
|
|
2380
2433
|
};
|
|
2381
|
-
|
|
2382
|
-
_(i) &&
|
|
2434
|
+
Ie(jn, (B) => {
|
|
2435
|
+
_(i) && B(Br);
|
|
2383
2436
|
});
|
|
2384
2437
|
}
|
|
2385
|
-
var Vr =
|
|
2438
|
+
var Vr = C(jn, 2);
|
|
2386
2439
|
{
|
|
2387
|
-
var Yr = (
|
|
2388
|
-
var
|
|
2389
|
-
|
|
2390
|
-
var
|
|
2391
|
-
|
|
2392
|
-
var
|
|
2440
|
+
var Yr = (B) => {
|
|
2441
|
+
var Q = Gi();
|
|
2442
|
+
Gt(Q, 21, () => _(k), Ut, (Le, xe) => {
|
|
2443
|
+
var Yt = Ui(), ot = ut(Yt), Xt = S(ot), an = C(ot, 2), Ur = S(an), Bn = S(Ur), Gr = S(Bn);
|
|
2444
|
+
Gt(Gr, 21, () => _(m)[_(xe)], Ut, (Oe, qe) => {
|
|
2445
|
+
var Ke = Vi(), At = S(Ke);
|
|
2393
2446
|
Y(
|
|
2394
|
-
(
|
|
2395
|
-
|
|
2447
|
+
(ln) => {
|
|
2448
|
+
ie(Ke, "title", _(qe)), le(At, ln);
|
|
2396
2449
|
},
|
|
2397
|
-
[() =>
|
|
2398
|
-
),
|
|
2450
|
+
[() => D(_(qe))]
|
|
2451
|
+
), P(Oe, Ke);
|
|
2399
2452
|
});
|
|
2400
|
-
var
|
|
2453
|
+
var Kr = C(Bn), Zr = S(Kr);
|
|
2401
2454
|
{
|
|
2402
|
-
var Jr = (
|
|
2403
|
-
var
|
|
2404
|
-
Y((
|
|
2405
|
-
() => Math.max(_(
|
|
2406
|
-
]),
|
|
2407
|
-
}, Qr = (
|
|
2408
|
-
var
|
|
2409
|
-
|
|
2410
|
-
var
|
|
2411
|
-
|
|
2412
|
-
var
|
|
2413
|
-
Y((ns) =>
|
|
2414
|
-
}),
|
|
2415
|
-
}),
|
|
2455
|
+
var Jr = (Oe) => {
|
|
2456
|
+
var qe = Yi(), Ke = S(qe);
|
|
2457
|
+
Y((At) => ie(Ke, "colspan", At), [
|
|
2458
|
+
() => Math.max(_(m)[_(xe)].length, 1)
|
|
2459
|
+
]), P(Oe, qe);
|
|
2460
|
+
}, Qr = (Oe) => {
|
|
2461
|
+
var qe = vi(), Ke = ut(qe);
|
|
2462
|
+
Gt(Ke, 17, () => _(v)[_(xe)], Ut, (At, ln) => {
|
|
2463
|
+
var Vn = Wi();
|
|
2464
|
+
Gt(Vn, 21, () => _(m)[_(xe)], Ut, ($r, es) => {
|
|
2465
|
+
var Yn = Xi(), ts = S(Yn);
|
|
2466
|
+
Y((ns) => le(ts, ns), [() => N(_(ln)[_(es)])]), P($r, Yn);
|
|
2467
|
+
}), P(At, Vn);
|
|
2468
|
+
}), P(Oe, qe);
|
|
2416
2469
|
};
|
|
2417
|
-
|
|
2418
|
-
_(v)[_(
|
|
2470
|
+
Ie(Zr, (Oe) => {
|
|
2471
|
+
_(v)[_(xe)].length === 0 ? Oe(Jr) : Oe(Qr, -1);
|
|
2419
2472
|
});
|
|
2420
2473
|
}
|
|
2421
|
-
Y(() =>
|
|
2422
|
-
}),
|
|
2423
|
-
}, Xr = (
|
|
2424
|
-
var
|
|
2425
|
-
Y(() =>
|
|
2426
|
-
}, Wr = (
|
|
2427
|
-
var
|
|
2474
|
+
Y(() => le(Xt, _(xe))), P(Le, Yt);
|
|
2475
|
+
}), P(B, Q);
|
|
2476
|
+
}, Xr = (B) => {
|
|
2477
|
+
var Q = Ki();
|
|
2478
|
+
Y(() => Qn(Q, _(p))), P(B, Q);
|
|
2479
|
+
}, Wr = (B) => {
|
|
2480
|
+
var Q = Ji(), Le = ut(Q);
|
|
2428
2481
|
{
|
|
2429
|
-
var
|
|
2430
|
-
var
|
|
2431
|
-
Y(() =>
|
|
2482
|
+
var xe = (ot) => {
|
|
2483
|
+
var Xt = Zi(), an = S(Xt);
|
|
2484
|
+
Y(() => le(an, _(f))), P(ot, Xt);
|
|
2432
2485
|
};
|
|
2433
|
-
|
|
2434
|
-
_(f) &&
|
|
2486
|
+
Ie(Le, (ot) => {
|
|
2487
|
+
_(f) && ot(xe);
|
|
2435
2488
|
});
|
|
2436
2489
|
}
|
|
2437
|
-
var
|
|
2438
|
-
Y(() =>
|
|
2490
|
+
var Yt = C(Le, 2);
|
|
2491
|
+
Y(() => Qn(Yt, _(u) ? "Loading request view..." : _(a))), P(B, Q);
|
|
2439
2492
|
};
|
|
2440
|
-
|
|
2441
|
-
_(o) === "raw-tables" ?
|
|
2493
|
+
Ie(Vr, (B) => {
|
|
2494
|
+
_(o) === "raw-tables" ? B(Yr) : _(o) === "reconstructed" ? B(Xr, 1) : B(Wr, -1);
|
|
2442
2495
|
});
|
|
2443
2496
|
}
|
|
2444
2497
|
Y(() => {
|
|
2445
|
-
|
|
2446
|
-
}),
|
|
2447
|
-
|
|
2448
|
-
}),
|
|
2498
|
+
le(ae, t.assessmentId), le(Mt, t.attemptId), le(ne, n()), U.disabled = _(l), ie(U, "aria-busy", _(l)), le(Ct, _(l) ? "Resetting to baseline..." : "Reset DB to baseline"), ie(Ge, "aria-pressed", _(o) === "raw-tables"), ie(Rt, "aria-pressed", _(o) === "reconstructed"), ie(on, "aria-pressed", _(o) === "request-view"), le(jr, _(d));
|
|
2499
|
+
}), ce("click", U, () => {
|
|
2500
|
+
j();
|
|
2501
|
+
}), ce("click", Ge, () => b(o, "raw-tables")), ce("click", Rt, () => b(o, "reconstructed")), ce("click", on, () => b(o, "request-view")), P(g, x);
|
|
2449
2502
|
},
|
|
2450
2503
|
$$slots: { default: !0 }
|
|
2451
|
-
}),
|
|
2452
|
-
}
|
|
2453
|
-
|
|
2454
|
-
var eo = /* @__PURE__ */
|
|
2455
|
-
function
|
|
2456
|
-
let n =
|
|
2457
|
-
var
|
|
2458
|
-
let
|
|
2459
|
-
var
|
|
2504
|
+
}), An();
|
|
2505
|
+
}
|
|
2506
|
+
Vt(["click"]);
|
|
2507
|
+
var eo = /* @__PURE__ */ O('<button type="button" title="Database state" aria-label="Toggle database state panel"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><ellipse cx="12" cy="5" rx="7" ry="3" stroke-width="2"></ellipse><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 5v7c0 1.66 3.13 3 7 3s7-1.34 7-3V5M5 12v7c0 1.66 3.13 3 7 3s7-1.34 7-3v-7"></path></svg></button>'), to = /* @__PURE__ */ O('<button type="button" title="Instrumentation" aria-label="Toggle instrumentation panel"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 13h4l2 6 4-14 2 8h4"></path></svg></button>'), no = /* @__PURE__ */ O('<button type="button" title="Session" aria-label="Toggle session panel"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg></button> <button type="button" title="Events" aria-label="Toggle event broadcast panel"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" width="16" height="16" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 7h8m0 0l-3-3m3 3l-3 3M3 17h8m0 0l-3-3m3 3l-3 3M3 7h5m8 10h5"></path></svg></button> <!> <!>', 1);
|
|
2508
|
+
function ao(e, t) {
|
|
2509
|
+
let n = H(t, "showDbPanel", 3, !1), r = H(t, "showInstrumentationPanel", 3, !1);
|
|
2510
|
+
var s = no(), i = ut(s);
|
|
2511
|
+
let o;
|
|
2512
|
+
var l = C(i, 2);
|
|
2460
2513
|
let a;
|
|
2461
|
-
var
|
|
2514
|
+
var f = C(l, 2);
|
|
2515
|
+
{
|
|
2516
|
+
var u = (m) => {
|
|
2517
|
+
var p = eo();
|
|
2518
|
+
let k;
|
|
2519
|
+
Y(() => {
|
|
2520
|
+
k = be(p, 1, "btn btn-sm btn-outline btn-square", null, k, { "btn-active": n() }), ie(p, "aria-pressed", n());
|
|
2521
|
+
}), ce("click", p, function(...d) {
|
|
2522
|
+
t.onToggleDbPanel?.apply(this, d);
|
|
2523
|
+
}), P(m, p);
|
|
2524
|
+
};
|
|
2525
|
+
Ie(f, (m) => {
|
|
2526
|
+
t.onToggleDbPanel && m(u);
|
|
2527
|
+
});
|
|
2528
|
+
}
|
|
2529
|
+
var c = C(f, 2);
|
|
2462
2530
|
{
|
|
2463
|
-
var
|
|
2464
|
-
var
|
|
2465
|
-
let
|
|
2531
|
+
var v = (m) => {
|
|
2532
|
+
var p = to();
|
|
2533
|
+
let k;
|
|
2466
2534
|
Y(() => {
|
|
2467
|
-
|
|
2468
|
-
}),
|
|
2469
|
-
t.
|
|
2470
|
-
}),
|
|
2535
|
+
k = be(p, 1, "btn btn-sm btn-outline btn-square", null, k, { "btn-active": r() }), ie(p, "aria-pressed", r());
|
|
2536
|
+
}), ce("click", p, function(...d) {
|
|
2537
|
+
t.onToggleInstrumentationPanel?.apply(this, d);
|
|
2538
|
+
}), P(m, p);
|
|
2471
2539
|
};
|
|
2472
|
-
|
|
2473
|
-
t.
|
|
2540
|
+
Ie(c, (m) => {
|
|
2541
|
+
t.onToggleInstrumentationPanel && m(v);
|
|
2474
2542
|
});
|
|
2475
2543
|
}
|
|
2476
2544
|
Y(() => {
|
|
2477
|
-
|
|
2478
|
-
}),
|
|
2479
|
-
t.onToggleSessionPanel?.apply(this,
|
|
2480
|
-
}),
|
|
2481
|
-
t.onToggleEventPanel?.apply(this,
|
|
2482
|
-
}),
|
|
2483
|
-
}
|
|
2484
|
-
|
|
2485
|
-
function
|
|
2545
|
+
o = be(i, 1, "btn btn-sm btn-outline btn-square", null, o, { "btn-active": t.showSessionPanel }), ie(i, "aria-pressed", t.showSessionPanel), a = be(l, 1, "btn btn-sm btn-outline btn-square", null, a, { "btn-active": t.showEventPanel }), ie(l, "aria-pressed", t.showEventPanel);
|
|
2546
|
+
}), ce("click", i, function(...m) {
|
|
2547
|
+
t.onToggleSessionPanel?.apply(this, m);
|
|
2548
|
+
}), ce("click", l, function(...m) {
|
|
2549
|
+
t.onToggleEventPanel?.apply(this, m);
|
|
2550
|
+
}), P(e, s);
|
|
2551
|
+
}
|
|
2552
|
+
Vt(["click"]);
|
|
2553
|
+
function ro(e, t) {
|
|
2486
2554
|
return (e || void 0) === (t || void 0);
|
|
2487
2555
|
}
|
|
2488
2556
|
function lo(e, t, n) {
|
|
2489
2557
|
const r = e?.key?.sectionId || "", s = e?.key?.attemptId || void 0;
|
|
2490
|
-
return r !== t ? !1 :
|
|
2558
|
+
return r !== t ? !1 : ro(s, n);
|
|
2491
2559
|
}
|
|
2492
|
-
function
|
|
2560
|
+
function fo(e, t, n) {
|
|
2493
2561
|
return !e?.getSectionController || !t ? null : e.getSectionController({
|
|
2494
2562
|
sectionId: t,
|
|
2495
2563
|
attemptId: n
|
|
2496
2564
|
}) || null;
|
|
2497
2565
|
}
|
|
2498
2566
|
export {
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2567
|
+
ao as DebugPanelToggles,
|
|
2568
|
+
Di as PanelResizeHandle,
|
|
2569
|
+
Ai as PanelWindowControls,
|
|
2570
|
+
oo as SessionDbPanel,
|
|
2503
2571
|
Hi as SharedFloatingPanel,
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2572
|
+
_n as claimNextFloatingPanelZIndex,
|
|
2573
|
+
zi as computePanelSizeFromViewport,
|
|
2574
|
+
Li as createFloatingPanelPointerController,
|
|
2575
|
+
fo as getSectionControllerFromCoordinator,
|
|
2508
2576
|
lo as isMatchingSectionControllerLifecycleEvent,
|
|
2509
|
-
|
|
2577
|
+
ro as optionalIdsEqual
|
|
2510
2578
|
};
|