@pie-players/pie-tool-annotation-toolbar 0.3.9 → 0.3.11
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.
|
@@ -1,73 +1,73 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var fi = Object.defineProperty;
|
|
2
|
+
var $o = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var m = (t, e, n) =>
|
|
7
|
-
var u = (t, e, n) => (Dn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), T = (t, e, n) => e.has(t) ?
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
const
|
|
5
|
+
var di = (t, e, n) => e in t ? fi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
|
+
var m = (t, e, n) => di(t, typeof e != "symbol" ? e + "" : e, n), Dn = (t, e, n) => e.has(t) || $o("Cannot " + n);
|
|
7
|
+
var u = (t, e, n) => (Dn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), T = (t, e, n) => e.has(t) ? $o("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), y = (t, e, n, o) => (Dn(t, e, "write to private field"), o ? o.call(t, n) : e.set(t, n), n), P = (t, e, n) => (Dn(t, e, "access private method"), n);
|
|
8
|
+
var Jo;
|
|
9
|
+
typeof window < "u" && ((Jo = window.__svelte ?? (window.__svelte = {})).v ?? (Jo.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const hi = 1, pi = 2, vi = 16, gi = 1, mi = 2, Qo = "[", ro = "[!", ko = "[?", io = "]", Lt = {}, D = /* @__PURE__ */ Symbol(), Zo = "http://www.w3.org/1999/xhtml", Bn = !1;
|
|
11
|
+
var er = Array.isArray, bi = Array.prototype.indexOf, Pt = Array.prototype.includes, En = Array.from, wn = Object.keys, Tn = Object.defineProperty, It = Object.getOwnPropertyDescriptor, _i = Object.getOwnPropertyDescriptors, yi = Object.prototype, wi = Array.prototype, tr = Object.getPrototypeOf, Co = Object.isExtensible;
|
|
12
|
+
const Ti = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function Ii(t) {
|
|
15
15
|
for (var e = 0; e < t.length; e++)
|
|
16
16
|
t[e]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function nr() {
|
|
19
19
|
var t, e, n = new Promise((o, r) => {
|
|
20
20
|
t = o, e = r;
|
|
21
21
|
});
|
|
22
22
|
return { promise: n, resolve: t, reject: e };
|
|
23
23
|
}
|
|
24
|
-
const z = 2, zt = 4, xt = 8,
|
|
24
|
+
const z = 2, zt = 4, xt = 8, so = 1 << 24, et = 16, Ie = 32, tt = 64, jn = 128, se = 512, V = 1024, F = 2048, we = 4096, j = 8192, Ce = 16384, yt = 32768, Mt = 65536, Ro = 1 << 17, or = 1 << 18, nt = 1 << 19, Si = 1 << 20, Fe = 1 << 25, mt = 65536, qn = 1 << 21, lo = 1 << 22, Je = 1 << 23, hn = /* @__PURE__ */ Symbol("$state"), Ai = /* @__PURE__ */ Symbol("legacy props"), Ei = /* @__PURE__ */ Symbol(""), st = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
27
|
m(this, "name", "StaleReactionError");
|
|
28
28
|
m(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
|
-
}(),
|
|
30
|
+
}(), $i = (
|
|
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
|
), $n = 3, Ht = 8;
|
|
34
|
-
function
|
|
34
|
+
function ki() {
|
|
35
35
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function Ci(t, e, n) {
|
|
38
38
|
throw new Error("https://svelte.dev/e/each_key_duplicate");
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function Ri(t) {
|
|
41
41
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Oi() {
|
|
44
44
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function Li(t) {
|
|
47
47
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function Pi() {
|
|
50
50
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function xi() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function Mi() {
|
|
56
56
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Ni() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function Di() {
|
|
62
62
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function Vi() {
|
|
65
65
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
66
66
|
}
|
|
67
67
|
function kn(t) {
|
|
68
68
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Fi() {
|
|
71
71
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
72
72
|
}
|
|
73
73
|
let R = !1;
|
|
@@ -90,7 +90,7 @@ function an(t) {
|
|
|
90
90
|
k = t;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
function
|
|
93
|
+
function zi(t = 1) {
|
|
94
94
|
if (R) {
|
|
95
95
|
for (var e = t, n = k; e--; )
|
|
96
96
|
n = /** @type {TemplateNode} */
|
|
@@ -105,10 +105,10 @@ function In(t = !0) {
|
|
|
105
105
|
/** @type {Comment} */
|
|
106
106
|
n.data
|
|
107
107
|
);
|
|
108
|
-
if (o ===
|
|
108
|
+
if (o === io) {
|
|
109
109
|
if (e === 0) return n;
|
|
110
110
|
e -= 1;
|
|
111
|
-
} else (o ===
|
|
111
|
+
} else (o === Qo || o === ro || // "[1", "[2", etc. for if blocks
|
|
112
112
|
o[0] === "[" && !isNaN(Number(o.slice(1)))) && (e += 1);
|
|
113
113
|
}
|
|
114
114
|
var r = (
|
|
@@ -118,7 +118,7 @@ function In(t = !0) {
|
|
|
118
118
|
t && n.remove(), n = r;
|
|
119
119
|
}
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function rr(t) {
|
|
122
122
|
if (!t || t.nodeType !== Ht)
|
|
123
123
|
throw kn(), Lt;
|
|
124
124
|
return (
|
|
@@ -126,20 +126,20 @@ function or(t) {
|
|
|
126
126
|
t.data
|
|
127
127
|
);
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function ir(t) {
|
|
130
130
|
return t === this.v;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Hi(t, e) {
|
|
133
133
|
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
return !
|
|
135
|
+
function sr(t) {
|
|
136
|
+
return !Hi(t, this.v);
|
|
137
137
|
}
|
|
138
|
-
let
|
|
139
|
-
function
|
|
138
|
+
let Bi = !1, ae = null;
|
|
139
|
+
function Nt(t) {
|
|
140
140
|
ae = t;
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function lr(t, e = !1, n) {
|
|
143
143
|
ae = {
|
|
144
144
|
p: ae,
|
|
145
145
|
i: !1,
|
|
@@ -150,7 +150,7 @@ function sr(t, e = !1, n) {
|
|
|
150
150
|
l: null
|
|
151
151
|
};
|
|
152
152
|
}
|
|
153
|
-
function
|
|
153
|
+
function ar(t) {
|
|
154
154
|
var e = (
|
|
155
155
|
/** @type {ComponentContext} */
|
|
156
156
|
ae
|
|
@@ -158,36 +158,36 @@ function lr(t) {
|
|
|
158
158
|
if (n !== null) {
|
|
159
159
|
e.e = null;
|
|
160
160
|
for (var o of n)
|
|
161
|
-
|
|
161
|
+
Lr(o);
|
|
162
162
|
}
|
|
163
163
|
return t !== void 0 && (e.x = t), e.i = !0, ae = e.p, t ?? /** @type {T} */
|
|
164
164
|
{};
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function cr() {
|
|
167
167
|
return !0;
|
|
168
168
|
}
|
|
169
169
|
let lt = [];
|
|
170
|
-
function
|
|
170
|
+
function ur() {
|
|
171
171
|
var t = lt;
|
|
172
|
-
lt = [],
|
|
172
|
+
lt = [], Ii(t);
|
|
173
173
|
}
|
|
174
174
|
function pt(t) {
|
|
175
175
|
if (lt.length === 0 && !Xt) {
|
|
176
176
|
var e = lt;
|
|
177
177
|
queueMicrotask(() => {
|
|
178
|
-
e === lt &&
|
|
178
|
+
e === lt && ur();
|
|
179
179
|
});
|
|
180
180
|
}
|
|
181
181
|
lt.push(t);
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function ji() {
|
|
184
184
|
for (; lt.length > 0; )
|
|
185
|
-
|
|
185
|
+
ur();
|
|
186
186
|
}
|
|
187
|
-
function
|
|
187
|
+
function fr(t) {
|
|
188
188
|
var e = E;
|
|
189
189
|
if (e === null)
|
|
190
|
-
return
|
|
190
|
+
return S.f |= Je, t;
|
|
191
191
|
if ((e.f & yt) === 0 && (e.f & zt) === 0)
|
|
192
192
|
throw t;
|
|
193
193
|
Xe(t, e);
|
|
@@ -208,32 +208,32 @@ function Xe(t, e) {
|
|
|
208
208
|
}
|
|
209
209
|
throw t;
|
|
210
210
|
}
|
|
211
|
-
const
|
|
212
|
-
function
|
|
213
|
-
t.f = t.f &
|
|
211
|
+
const qi = -7169;
|
|
212
|
+
function M(t, e) {
|
|
213
|
+
t.f = t.f & qi | e;
|
|
214
214
|
}
|
|
215
|
-
function
|
|
216
|
-
(t.f & se) !== 0 || t.deps === null ?
|
|
215
|
+
function ao(t) {
|
|
216
|
+
(t.f & se) !== 0 || t.deps === null ? M(t, V) : M(t, we);
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function dr(t) {
|
|
219
219
|
if (t !== null)
|
|
220
220
|
for (const e of t)
|
|
221
|
-
(e.f & z) === 0 || (e.f & mt) === 0 || (e.f ^= mt,
|
|
221
|
+
(e.f & z) === 0 || (e.f & mt) === 0 || (e.f ^= mt, dr(
|
|
222
222
|
/** @type {Derived} */
|
|
223
223
|
e.deps
|
|
224
224
|
));
|
|
225
225
|
}
|
|
226
|
-
function
|
|
227
|
-
(t.f & F) !== 0 ? e.add(t) : (t.f & we) !== 0 && n.add(t),
|
|
226
|
+
function hr(t, e, n) {
|
|
227
|
+
(t.f & F) !== 0 ? e.add(t) : (t.f & we) !== 0 && n.add(t), dr(t.deps), M(t, V);
|
|
228
228
|
}
|
|
229
229
|
const cn = /* @__PURE__ */ new Set();
|
|
230
|
-
let L = null, be = null, W = [], Rn = null, Xt = !1, Dt = null,
|
|
231
|
-
var We,
|
|
232
|
-
const
|
|
230
|
+
let L = null, be = null, W = [], Rn = null, Xt = !1, Dt = null, Gi = 1;
|
|
231
|
+
var We, St, ut, At, Et, $t, Ke, Se, kt, Y, Gn, Un, Wn, Kn;
|
|
232
|
+
const yo = class yo {
|
|
233
233
|
constructor() {
|
|
234
234
|
T(this, Y);
|
|
235
235
|
// for debugging. TODO remove once async is stable
|
|
236
|
-
m(this, "id",
|
|
236
|
+
m(this, "id", Gi++);
|
|
237
237
|
/**
|
|
238
238
|
* The current values of any sources that are updated in this batch
|
|
239
239
|
* They keys of this map are identical to `this.#previous`
|
|
@@ -256,7 +256,7 @@ const _o = class _o {
|
|
|
256
256
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
257
257
|
* @type {Set<(batch: Batch) => void>}
|
|
258
258
|
*/
|
|
259
|
-
T(this,
|
|
259
|
+
T(this, St, /* @__PURE__ */ new Set());
|
|
260
260
|
/**
|
|
261
261
|
* The number of async effects that are currently in flight
|
|
262
262
|
*/
|
|
@@ -264,7 +264,7 @@ const _o = class _o {
|
|
|
264
264
|
/**
|
|
265
265
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
266
266
|
*/
|
|
267
|
-
T(this,
|
|
267
|
+
T(this, At, 0);
|
|
268
268
|
/**
|
|
269
269
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
270
270
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
@@ -288,7 +288,7 @@ const _o = class _o {
|
|
|
288
288
|
* so they can be rescheduled if the branch survives.
|
|
289
289
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
290
290
|
*/
|
|
291
|
-
T(this,
|
|
291
|
+
T(this, Se, /* @__PURE__ */ new Map());
|
|
292
292
|
m(this, "is_fork", !1);
|
|
293
293
|
T(this, kt, !1);
|
|
294
294
|
}
|
|
@@ -297,7 +297,7 @@ const _o = class _o {
|
|
|
297
297
|
* @param {Effect} effect
|
|
298
298
|
*/
|
|
299
299
|
skip_effect(e) {
|
|
300
|
-
u(this,
|
|
300
|
+
u(this, Se).has(e) || u(this, Se).set(e, { d: [], m: [] });
|
|
301
301
|
}
|
|
302
302
|
/**
|
|
303
303
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
@@ -305,13 +305,13 @@ const _o = class _o {
|
|
|
305
305
|
* @param {Effect} effect
|
|
306
306
|
*/
|
|
307
307
|
unskip_effect(e) {
|
|
308
|
-
var n = u(this,
|
|
308
|
+
var n = u(this, Se).get(e);
|
|
309
309
|
if (n) {
|
|
310
|
-
u(this,
|
|
310
|
+
u(this, Se).delete(e);
|
|
311
311
|
for (var o of n.d)
|
|
312
|
-
|
|
312
|
+
M(o, F), ke(o);
|
|
313
313
|
for (o of n.m)
|
|
314
|
-
|
|
314
|
+
M(o, we), ke(o);
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
/**
|
|
@@ -325,12 +325,12 @@ const _o = class _o {
|
|
|
325
325
|
P(this, Y, Un).call(this, r, n, o);
|
|
326
326
|
if (Dt = null, P(this, Y, Gn).call(this)) {
|
|
327
327
|
P(this, Y, Wn).call(this, o), P(this, Y, Wn).call(this, n);
|
|
328
|
-
for (const [r, i] of u(this,
|
|
329
|
-
|
|
328
|
+
for (const [r, i] of u(this, Se))
|
|
329
|
+
mr(r, i);
|
|
330
330
|
} else {
|
|
331
331
|
L = null;
|
|
332
332
|
for (const r of u(this, We)) r(this);
|
|
333
|
-
u(this, We).clear(), u(this, ut) === 0 && P(this, Y, Kn).call(this),
|
|
333
|
+
u(this, We).clear(), u(this, ut) === 0 && P(this, Y, Kn).call(this), Oo(o), Oo(n), u(this, $t).clear(), u(this, Ke).clear(), u(this, Et)?.resolve();
|
|
334
334
|
}
|
|
335
335
|
be = null;
|
|
336
336
|
}
|
|
@@ -351,7 +351,7 @@ const _o = class _o {
|
|
|
351
351
|
}
|
|
352
352
|
flush() {
|
|
353
353
|
if (W.length > 0)
|
|
354
|
-
L = this,
|
|
354
|
+
L = this, pr();
|
|
355
355
|
else if (u(this, ut) === 0 && !this.is_fork) {
|
|
356
356
|
for (const e of u(this, We)) e(this);
|
|
357
357
|
u(this, We).clear(), P(this, Y, Kn).call(this), u(this, Et)?.resolve();
|
|
@@ -359,30 +359,30 @@ const _o = class _o {
|
|
|
359
359
|
this.deactivate();
|
|
360
360
|
}
|
|
361
361
|
discard() {
|
|
362
|
-
for (const e of u(this,
|
|
363
|
-
u(this,
|
|
362
|
+
for (const e of u(this, St)) e(this);
|
|
363
|
+
u(this, St).clear();
|
|
364
364
|
}
|
|
365
365
|
/**
|
|
366
366
|
*
|
|
367
367
|
* @param {boolean} blocking
|
|
368
368
|
*/
|
|
369
369
|
increment(e) {
|
|
370
|
-
y(this, ut, u(this, ut) + 1), e && y(this,
|
|
370
|
+
y(this, ut, u(this, ut) + 1), e && y(this, At, u(this, At) + 1);
|
|
371
371
|
}
|
|
372
372
|
/**
|
|
373
373
|
*
|
|
374
374
|
* @param {boolean} blocking
|
|
375
375
|
*/
|
|
376
376
|
decrement(e) {
|
|
377
|
-
y(this, ut, u(this, ut) - 1), e && y(this,
|
|
377
|
+
y(this, ut, u(this, ut) - 1), e && y(this, At, u(this, At) - 1), !u(this, kt) && (y(this, kt, !0), pt(() => {
|
|
378
378
|
y(this, kt, !1), P(this, Y, Gn).call(this) ? W.length > 0 && this.flush() : this.revive();
|
|
379
379
|
}));
|
|
380
380
|
}
|
|
381
381
|
revive() {
|
|
382
382
|
for (const e of u(this, $t))
|
|
383
|
-
u(this, Ke).delete(e),
|
|
383
|
+
u(this, Ke).delete(e), M(e, F), ke(e);
|
|
384
384
|
for (const e of u(this, Ke))
|
|
385
|
-
|
|
385
|
+
M(e, we), ke(e);
|
|
386
386
|
this.flush();
|
|
387
387
|
}
|
|
388
388
|
/** @param {(batch: Batch) => void} fn */
|
|
@@ -391,14 +391,14 @@ const _o = class _o {
|
|
|
391
391
|
}
|
|
392
392
|
/** @param {(batch: Batch) => void} fn */
|
|
393
393
|
ondiscard(e) {
|
|
394
|
-
u(this,
|
|
394
|
+
u(this, St).add(e);
|
|
395
395
|
}
|
|
396
396
|
settled() {
|
|
397
|
-
return (u(this, Et) ?? y(this, Et,
|
|
397
|
+
return (u(this, Et) ?? y(this, Et, nr())).promise;
|
|
398
398
|
}
|
|
399
399
|
static ensure() {
|
|
400
400
|
if (L === null) {
|
|
401
|
-
const e = L = new
|
|
401
|
+
const e = L = new yo();
|
|
402
402
|
cn.add(L), Xt || pt(() => {
|
|
403
403
|
L === e && e.flush();
|
|
404
404
|
});
|
|
@@ -408,8 +408,8 @@ const _o = class _o {
|
|
|
408
408
|
apply() {
|
|
409
409
|
}
|
|
410
410
|
};
|
|
411
|
-
We = new WeakMap(),
|
|
412
|
-
return this.is_fork || u(this,
|
|
411
|
+
We = new WeakMap(), St = new WeakMap(), ut = new WeakMap(), At = new WeakMap(), Et = new WeakMap(), $t = new WeakMap(), Ke = new WeakMap(), Se = new WeakMap(), kt = new WeakMap(), Y = new WeakSet(), Gn = function() {
|
|
412
|
+
return this.is_fork || u(this, At) > 0;
|
|
413
413
|
}, /**
|
|
414
414
|
* Traverse the effect tree, executing effects or stashing
|
|
415
415
|
* them for later execution as appropriate
|
|
@@ -420,9 +420,9 @@ We = new WeakMap(), At = new WeakMap(), ut = new WeakMap(), St = new WeakMap(),
|
|
|
420
420
|
Un = function(e, n, o) {
|
|
421
421
|
e.f ^= V;
|
|
422
422
|
for (var r = e.first; r !== null; ) {
|
|
423
|
-
var i = r.f, s = (i & (Ie | tt)) !== 0,
|
|
423
|
+
var i = r.f, s = (i & (Ie | tt)) !== 0, a = s && (i & V) !== 0, l = (i & j) !== 0, c = a || u(this, Se).has(r);
|
|
424
424
|
if (!c && r.fn !== null) {
|
|
425
|
-
s ?
|
|
425
|
+
s ? l || (r.f ^= V) : (i & zt) !== 0 ? n.push(r) : (i & (xt | so)) !== 0 && l ? o.push(r) : nn(r) && (Ft(r), (i & et) !== 0 && (u(this, Ke).add(r), l && M(r, F)));
|
|
426
426
|
var f = r.first;
|
|
427
427
|
if (f !== null) {
|
|
428
428
|
r = f;
|
|
@@ -443,7 +443,7 @@ Un = function(e, n, o) {
|
|
|
443
443
|
*/
|
|
444
444
|
Wn = function(e) {
|
|
445
445
|
for (var n = 0; n < e.length; n += 1)
|
|
446
|
-
|
|
446
|
+
hr(e[n], u(this, $t), u(this, Ke));
|
|
447
447
|
}, Kn = function() {
|
|
448
448
|
var i;
|
|
449
449
|
if (cn.size > 1) {
|
|
@@ -454,24 +454,24 @@ Wn = function(e) {
|
|
|
454
454
|
o = !1;
|
|
455
455
|
continue;
|
|
456
456
|
}
|
|
457
|
-
const
|
|
457
|
+
const a = [];
|
|
458
458
|
for (const [c, f] of this.current) {
|
|
459
459
|
if (s.current.has(c))
|
|
460
460
|
if (o && f !== s.current.get(c))
|
|
461
461
|
s.current.set(c, f);
|
|
462
462
|
else
|
|
463
463
|
continue;
|
|
464
|
-
|
|
464
|
+
a.push(c);
|
|
465
465
|
}
|
|
466
|
-
if (
|
|
466
|
+
if (a.length === 0)
|
|
467
467
|
continue;
|
|
468
|
-
const
|
|
469
|
-
if (
|
|
468
|
+
const l = [...s.current.keys()].filter((c) => !this.current.has(c));
|
|
469
|
+
if (l.length > 0) {
|
|
470
470
|
var r = W;
|
|
471
471
|
W = [];
|
|
472
472
|
const c = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
|
|
473
|
-
for (const d of
|
|
474
|
-
|
|
473
|
+
for (const d of a)
|
|
474
|
+
vr(d, l, c, f);
|
|
475
475
|
if (W.length > 0) {
|
|
476
476
|
L = s, s.apply();
|
|
477
477
|
for (const d of W)
|
|
@@ -483,31 +483,31 @@ Wn = function(e) {
|
|
|
483
483
|
}
|
|
484
484
|
L = e, be = n;
|
|
485
485
|
}
|
|
486
|
-
u(this,
|
|
486
|
+
u(this, Se).clear(), cn.delete(this);
|
|
487
487
|
};
|
|
488
|
-
let ze =
|
|
488
|
+
let ze = yo;
|
|
489
489
|
function pn(t) {
|
|
490
490
|
var e = Xt;
|
|
491
491
|
Xt = !0;
|
|
492
492
|
try {
|
|
493
493
|
for (var n; ; ) {
|
|
494
|
-
if (
|
|
494
|
+
if (ji(), W.length === 0 && (L?.flush(), W.length === 0))
|
|
495
495
|
return Rn = null, /** @type {T} */
|
|
496
496
|
n;
|
|
497
|
-
|
|
497
|
+
pr();
|
|
498
498
|
}
|
|
499
499
|
} finally {
|
|
500
500
|
Xt = e;
|
|
501
501
|
}
|
|
502
502
|
}
|
|
503
|
-
function
|
|
503
|
+
function pr() {
|
|
504
504
|
var t = null;
|
|
505
505
|
try {
|
|
506
506
|
for (var e = 0; W.length > 0; ) {
|
|
507
507
|
var n = ze.ensure();
|
|
508
508
|
if (e++ > 1e3) {
|
|
509
509
|
var o, r;
|
|
510
|
-
|
|
510
|
+
Ui();
|
|
511
511
|
}
|
|
512
512
|
n.process(W), Qe.clear();
|
|
513
513
|
}
|
|
@@ -515,62 +515,62 @@ function hr() {
|
|
|
515
515
|
W = [], Rn = null, Dt = null;
|
|
516
516
|
}
|
|
517
517
|
}
|
|
518
|
-
function
|
|
518
|
+
function Ui() {
|
|
519
519
|
try {
|
|
520
|
-
|
|
520
|
+
Pi();
|
|
521
521
|
} catch (t) {
|
|
522
522
|
Xe(t, Rn);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
let
|
|
526
|
-
function
|
|
525
|
+
let Me = null;
|
|
526
|
+
function Oo(t) {
|
|
527
527
|
var e = t.length;
|
|
528
528
|
if (e !== 0) {
|
|
529
529
|
for (var n = 0; n < e; ) {
|
|
530
530
|
var o = t[n++];
|
|
531
|
-
if ((o.f & (Ce | j)) === 0 && nn(o) && (
|
|
531
|
+
if ((o.f & (Ce | j)) === 0 && nn(o) && (Me = /* @__PURE__ */ new Set(), Ft(o), o.deps === null && o.first === null && o.nodes === null && o.teardown === null && o.ac === null && Mr(o), Me?.size > 0)) {
|
|
532
532
|
Qe.clear();
|
|
533
|
-
for (const r of
|
|
533
|
+
for (const r of Me) {
|
|
534
534
|
if ((r.f & (Ce | j)) !== 0) continue;
|
|
535
535
|
const i = [r];
|
|
536
536
|
let s = r.parent;
|
|
537
537
|
for (; s !== null; )
|
|
538
|
-
|
|
539
|
-
for (let
|
|
540
|
-
const
|
|
541
|
-
(
|
|
538
|
+
Me.has(s) && (Me.delete(s), i.push(s)), s = s.parent;
|
|
539
|
+
for (let a = i.length - 1; a >= 0; a--) {
|
|
540
|
+
const l = i[a];
|
|
541
|
+
(l.f & (Ce | j)) === 0 && Ft(l);
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
|
|
544
|
+
Me.clear();
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
|
|
547
|
+
Me = null;
|
|
548
548
|
}
|
|
549
549
|
}
|
|
550
|
-
function
|
|
550
|
+
function vr(t, e, n, o) {
|
|
551
551
|
if (!n.has(t) && (n.add(t), t.reactions !== null))
|
|
552
552
|
for (const r of t.reactions) {
|
|
553
553
|
const i = r.f;
|
|
554
|
-
(i & z) !== 0 ?
|
|
554
|
+
(i & z) !== 0 ? vr(
|
|
555
555
|
/** @type {Derived} */
|
|
556
556
|
r,
|
|
557
557
|
e,
|
|
558
558
|
n,
|
|
559
559
|
o
|
|
560
|
-
) : (i & (
|
|
560
|
+
) : (i & (lo | et)) !== 0 && (i & F) === 0 && gr(r, e, o) && (M(r, F), ke(
|
|
561
561
|
/** @type {Effect} */
|
|
562
562
|
r
|
|
563
563
|
));
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function gr(t, e, n) {
|
|
567
567
|
const o = n.get(t);
|
|
568
568
|
if (o !== void 0) return o;
|
|
569
569
|
if (t.deps !== null)
|
|
570
570
|
for (const r of t.deps) {
|
|
571
571
|
if (Pt.call(e, r))
|
|
572
572
|
return !0;
|
|
573
|
-
if ((r.f & z) !== 0 &&
|
|
573
|
+
if ((r.f & z) !== 0 && gr(
|
|
574
574
|
/** @type {Derived} */
|
|
575
575
|
r,
|
|
576
576
|
e,
|
|
@@ -586,7 +586,7 @@ function vr(t, e, n) {
|
|
|
586
586
|
}
|
|
587
587
|
function ke(t) {
|
|
588
588
|
var e = Rn = t, n = e.b;
|
|
589
|
-
if (n?.is_pending && (t.f & (zt | xt |
|
|
589
|
+
if (n?.is_pending && (t.f & (zt | xt | so)) !== 0 && (t.f & yt) === 0) {
|
|
590
590
|
n.defer_effect(t);
|
|
591
591
|
return;
|
|
592
592
|
}
|
|
@@ -603,29 +603,29 @@ function ke(t) {
|
|
|
603
603
|
}
|
|
604
604
|
W.push(e);
|
|
605
605
|
}
|
|
606
|
-
function
|
|
606
|
+
function mr(t, e) {
|
|
607
607
|
if (!((t.f & Ie) !== 0 && (t.f & V) !== 0)) {
|
|
608
|
-
(t.f & F) !== 0 ? e.d.push(t) : (t.f & we) !== 0 && e.m.push(t),
|
|
608
|
+
(t.f & F) !== 0 ? e.d.push(t) : (t.f & we) !== 0 && e.m.push(t), M(t, V);
|
|
609
609
|
for (var n = t.first; n !== null; )
|
|
610
|
-
|
|
610
|
+
mr(n, e), n = n.next;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
function
|
|
613
|
+
function Wi(t) {
|
|
614
614
|
let e = 0, n = bt(0), o;
|
|
615
615
|
return () => {
|
|
616
|
-
|
|
616
|
+
ho() && (v(n), po(() => (e === 0 && (o = Gr(() => t(() => Jt(n)))), e += 1, () => {
|
|
617
617
|
pt(() => {
|
|
618
618
|
e -= 1, e === 0 && (o?.(), o = void 0, Jt(n));
|
|
619
619
|
});
|
|
620
620
|
})));
|
|
621
621
|
};
|
|
622
622
|
}
|
|
623
|
-
var
|
|
624
|
-
function
|
|
625
|
-
new
|
|
623
|
+
var Ki = Mt | nt;
|
|
624
|
+
function Yi(t, e, n, o) {
|
|
625
|
+
new Xi(t, e, n, o);
|
|
626
626
|
}
|
|
627
|
-
var Q, Zt,
|
|
628
|
-
class
|
|
627
|
+
var Q, Zt, Ae, ft, U, Ee, Z, ge, Ne, dt, Ye, Ct, Rt, Ot, De, Sn, x, br, _r, yr, Yn, vn, gn, Xn;
|
|
628
|
+
class Xi {
|
|
629
629
|
/**
|
|
630
630
|
* @param {TemplateNode} node
|
|
631
631
|
* @param {BoundaryProps} props
|
|
@@ -648,7 +648,7 @@ class Wi {
|
|
|
648
648
|
/** @type {TemplateNode | null} */
|
|
649
649
|
T(this, Zt, R ? k : null);
|
|
650
650
|
/** @type {BoundaryProps} */
|
|
651
|
-
T(this,
|
|
651
|
+
T(this, Ae);
|
|
652
652
|
/** @type {((anchor: Node) => void)} */
|
|
653
653
|
T(this, ft);
|
|
654
654
|
/** @type {Effect} */
|
|
@@ -660,7 +660,7 @@ class Wi {
|
|
|
660
660
|
/** @type {Effect | null} */
|
|
661
661
|
T(this, ge, null);
|
|
662
662
|
/** @type {DocumentFragment | null} */
|
|
663
|
-
T(this,
|
|
663
|
+
T(this, Ne, null);
|
|
664
664
|
T(this, dt, 0);
|
|
665
665
|
T(this, Ye, 0);
|
|
666
666
|
T(this, Ct, !1);
|
|
@@ -676,10 +676,10 @@ class Wi {
|
|
|
676
676
|
* @type {Source<number> | null}
|
|
677
677
|
*/
|
|
678
678
|
T(this, De, null);
|
|
679
|
-
T(this,
|
|
679
|
+
T(this, Sn, Wi(() => (y(this, De, bt(u(this, dt))), () => {
|
|
680
680
|
y(this, De, null);
|
|
681
681
|
})));
|
|
682
|
-
y(this, Q, e), y(this,
|
|
682
|
+
y(this, Q, e), y(this, Ae, n), y(this, ft, (i) => {
|
|
683
683
|
var s = (
|
|
684
684
|
/** @type {Effect} */
|
|
685
685
|
E
|
|
@@ -693,21 +693,21 @@ class Wi {
|
|
|
693
693
|
u(this, Zt)
|
|
694
694
|
);
|
|
695
695
|
Cn();
|
|
696
|
-
const s = i.data ===
|
|
697
|
-
if (i.data.startsWith(
|
|
698
|
-
const
|
|
699
|
-
P(this, x,
|
|
700
|
-
} else s ? P(this, x,
|
|
696
|
+
const s = i.data === ro;
|
|
697
|
+
if (i.data.startsWith(ko)) {
|
|
698
|
+
const l = JSON.parse(i.data.slice(ko.length));
|
|
699
|
+
P(this, x, _r).call(this, l);
|
|
700
|
+
} else s ? P(this, x, yr).call(this) : P(this, x, br).call(this);
|
|
701
701
|
} else
|
|
702
702
|
P(this, x, Yn).call(this);
|
|
703
|
-
},
|
|
703
|
+
}, Ki)), R && y(this, Q, k);
|
|
704
704
|
}
|
|
705
705
|
/**
|
|
706
706
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
707
707
|
* @param {Effect} effect
|
|
708
708
|
*/
|
|
709
709
|
defer_effect(e) {
|
|
710
|
-
|
|
710
|
+
hr(e, u(this, Rt), u(this, Ot));
|
|
711
711
|
}
|
|
712
712
|
/**
|
|
713
713
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -717,7 +717,7 @@ class Wi {
|
|
|
717
717
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
718
718
|
}
|
|
719
719
|
has_pending_snippet() {
|
|
720
|
-
return !!u(this,
|
|
720
|
+
return !!u(this, Ae).pending;
|
|
721
721
|
}
|
|
722
722
|
/**
|
|
723
723
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -731,35 +731,35 @@ class Wi {
|
|
|
731
731
|
}));
|
|
732
732
|
}
|
|
733
733
|
get_effect_pending() {
|
|
734
|
-
return u(this,
|
|
734
|
+
return u(this, Sn).call(this), v(
|
|
735
735
|
/** @type {Source<number>} */
|
|
736
736
|
u(this, De)
|
|
737
737
|
);
|
|
738
738
|
}
|
|
739
739
|
/** @param {unknown} error */
|
|
740
740
|
error(e) {
|
|
741
|
-
var n = u(this,
|
|
742
|
-
let o = u(this,
|
|
741
|
+
var n = u(this, Ae).onerror;
|
|
742
|
+
let o = u(this, Ae).failed;
|
|
743
743
|
if (!n && !o)
|
|
744
744
|
throw e;
|
|
745
745
|
u(this, Ee) && (q(u(this, Ee)), y(this, Ee, null)), u(this, Z) && (q(u(this, Z)), y(this, Z, null)), u(this, ge) && (q(u(this, ge)), y(this, ge, null)), R && (G(
|
|
746
746
|
/** @type {TemplateNode} */
|
|
747
747
|
u(this, Zt)
|
|
748
|
-
),
|
|
748
|
+
), zi(), G(In()));
|
|
749
749
|
var r = !1, i = !1;
|
|
750
750
|
const s = () => {
|
|
751
751
|
if (r) {
|
|
752
|
-
|
|
752
|
+
Fi();
|
|
753
753
|
return;
|
|
754
754
|
}
|
|
755
|
-
r = !0, i &&
|
|
755
|
+
r = !0, i && Vi(), u(this, ge) !== null && vt(u(this, ge), () => {
|
|
756
756
|
y(this, ge, null);
|
|
757
757
|
}), P(this, x, gn).call(this, () => {
|
|
758
758
|
ze.ensure(), P(this, x, Yn).call(this);
|
|
759
759
|
});
|
|
760
|
-
},
|
|
760
|
+
}, a = (l) => {
|
|
761
761
|
try {
|
|
762
|
-
i = !0, n?.(
|
|
762
|
+
i = !0, n?.(l, s), i = !1;
|
|
763
763
|
} catch (c) {
|
|
764
764
|
Xe(c, u(this, U) && u(this, U).parent);
|
|
765
765
|
}
|
|
@@ -773,7 +773,7 @@ class Wi {
|
|
|
773
773
|
);
|
|
774
774
|
c.b = this, c.f |= jn, o(
|
|
775
775
|
u(this, Q),
|
|
776
|
-
() =>
|
|
776
|
+
() => l,
|
|
777
777
|
() => s
|
|
778
778
|
);
|
|
779
779
|
});
|
|
@@ -787,23 +787,23 @@ class Wi {
|
|
|
787
787
|
}));
|
|
788
788
|
};
|
|
789
789
|
pt(() => {
|
|
790
|
-
var
|
|
790
|
+
var l;
|
|
791
791
|
try {
|
|
792
|
-
|
|
792
|
+
l = this.transform_error(e);
|
|
793
793
|
} catch (c) {
|
|
794
794
|
Xe(c, u(this, U) && u(this, U).parent);
|
|
795
795
|
return;
|
|
796
796
|
}
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
797
|
+
l !== null && typeof l == "object" && typeof /** @type {any} */
|
|
798
|
+
l.then == "function" ? l.then(
|
|
799
|
+
a,
|
|
800
800
|
/** @param {unknown} e */
|
|
801
801
|
(c) => Xe(c, u(this, U) && u(this, U).parent)
|
|
802
|
-
) : l
|
|
802
|
+
) : a(l);
|
|
803
803
|
});
|
|
804
804
|
}
|
|
805
805
|
}
|
|
806
|
-
Q = new WeakMap(), Zt = new WeakMap(),
|
|
806
|
+
Q = new WeakMap(), Zt = new WeakMap(), Ae = new WeakMap(), ft = new WeakMap(), U = new WeakMap(), Ee = new WeakMap(), Z = new WeakMap(), ge = new WeakMap(), Ne = new WeakMap(), dt = new WeakMap(), Ye = new WeakMap(), Ct = new WeakMap(), Rt = new WeakMap(), Ot = new WeakMap(), De = new WeakMap(), Sn = new WeakMap(), x = new WeakSet(), br = function() {
|
|
807
807
|
try {
|
|
808
808
|
y(this, Ee, ie(() => u(this, ft).call(this, u(this, Q))));
|
|
809
809
|
} catch (e) {
|
|
@@ -812,8 +812,8 @@ Q = new WeakMap(), Zt = new WeakMap(), Se = new WeakMap(), ft = new WeakMap(), U
|
|
|
812
812
|
}, /**
|
|
813
813
|
* @param {unknown} error The deserialized error from the server's hydration comment
|
|
814
814
|
*/
|
|
815
|
-
|
|
816
|
-
const n = u(this,
|
|
815
|
+
_r = function(e) {
|
|
816
|
+
const n = u(this, Ae).failed;
|
|
817
817
|
n && y(this, ge, ie(() => {
|
|
818
818
|
n(
|
|
819
819
|
u(this, Q),
|
|
@@ -822,11 +822,11 @@ br = function(e) {
|
|
|
822
822
|
}
|
|
823
823
|
);
|
|
824
824
|
}));
|
|
825
|
-
},
|
|
826
|
-
const e = u(this,
|
|
825
|
+
}, yr = function() {
|
|
826
|
+
const e = u(this, Ae).pending;
|
|
827
827
|
e && (this.is_pending = !0, y(this, Z, ie(() => e(u(this, Q)))), pt(() => {
|
|
828
|
-
var n = y(this,
|
|
829
|
-
n.append(o), y(this, Ee, P(this, x, gn).call(this, () => (ze.ensure(), ie(() => u(this, ft).call(this, o))))), u(this, Ye) === 0 && (u(this, Q).before(n), y(this,
|
|
828
|
+
var n = y(this, Ne, document.createDocumentFragment()), o = Te();
|
|
829
|
+
n.append(o), y(this, Ee, P(this, x, gn).call(this, () => (ze.ensure(), ie(() => u(this, ft).call(this, o))))), u(this, Ye) === 0 && (u(this, Q).before(n), y(this, Ne, null), vt(
|
|
830
830
|
/** @type {Effect} */
|
|
831
831
|
u(this, Z),
|
|
832
832
|
() => {
|
|
@@ -839,11 +839,11 @@ br = function(e) {
|
|
|
839
839
|
if (this.is_pending = this.has_pending_snippet(), y(this, Ye, 0), y(this, dt, 0), y(this, Ee, ie(() => {
|
|
840
840
|
u(this, ft).call(this, u(this, Q));
|
|
841
841
|
})), u(this, Ye) > 0) {
|
|
842
|
-
var e = y(this,
|
|
843
|
-
|
|
842
|
+
var e = y(this, Ne, document.createDocumentFragment());
|
|
843
|
+
mo(u(this, Ee), e);
|
|
844
844
|
const n = (
|
|
845
845
|
/** @type {(anchor: Node) => void} */
|
|
846
|
-
u(this,
|
|
846
|
+
u(this, Ae).pending
|
|
847
847
|
);
|
|
848
848
|
y(this, Z, ie(() => n(u(this, Q))));
|
|
849
849
|
} else
|
|
@@ -854,23 +854,23 @@ br = function(e) {
|
|
|
854
854
|
}, vn = function() {
|
|
855
855
|
this.is_pending = !1;
|
|
856
856
|
for (const e of u(this, Rt))
|
|
857
|
-
|
|
857
|
+
M(e, F), ke(e);
|
|
858
858
|
for (const e of u(this, Ot))
|
|
859
|
-
|
|
859
|
+
M(e, we), ke(e);
|
|
860
860
|
u(this, Rt).clear(), u(this, Ot).clear();
|
|
861
861
|
}, /**
|
|
862
862
|
* @template T
|
|
863
863
|
* @param {() => T} fn
|
|
864
864
|
*/
|
|
865
865
|
gn = function(e) {
|
|
866
|
-
var n = E, o =
|
|
867
|
-
Re(u(this, U)), ue(u(this, U)),
|
|
866
|
+
var n = E, o = S, r = ae;
|
|
867
|
+
Re(u(this, U)), ue(u(this, U)), Nt(u(this, U).ctx);
|
|
868
868
|
try {
|
|
869
869
|
return e();
|
|
870
870
|
} catch (i) {
|
|
871
|
-
return
|
|
871
|
+
return fr(i), null;
|
|
872
872
|
} finally {
|
|
873
|
-
Re(n), ue(o),
|
|
873
|
+
Re(n), ue(o), Nt(r);
|
|
874
874
|
}
|
|
875
875
|
}, /**
|
|
876
876
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
@@ -885,9 +885,9 @@ Xn = function(e) {
|
|
|
885
885
|
}
|
|
886
886
|
y(this, Ye, u(this, Ye) + e), u(this, Ye) === 0 && (P(this, x, vn).call(this), u(this, Z) && vt(u(this, Z), () => {
|
|
887
887
|
y(this, Z, null);
|
|
888
|
-
}), u(this,
|
|
888
|
+
}), u(this, Ne) && (u(this, Q).before(u(this, Ne)), y(this, Ne, null)));
|
|
889
889
|
};
|
|
890
|
-
function
|
|
890
|
+
function Ji(t, e, n, o) {
|
|
891
891
|
const r = On;
|
|
892
892
|
var i = t.filter((d) => !d.settled);
|
|
893
893
|
if (n.length === 0 && i.length === 0) {
|
|
@@ -897,9 +897,9 @@ function Ki(t, e, n, o) {
|
|
|
897
897
|
var s = (
|
|
898
898
|
/** @type {Effect} */
|
|
899
899
|
E
|
|
900
|
-
),
|
|
900
|
+
), a = Qi(), l = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((d) => d.promise)) : null;
|
|
901
901
|
function c(d) {
|
|
902
|
-
|
|
902
|
+
a();
|
|
903
903
|
try {
|
|
904
904
|
o(d);
|
|
905
905
|
} catch (g) {
|
|
@@ -908,24 +908,24 @@ function Ki(t, e, n, o) {
|
|
|
908
908
|
Jn();
|
|
909
909
|
}
|
|
910
910
|
if (n.length === 0) {
|
|
911
|
-
|
|
911
|
+
l.then(() => c(e.map(r)));
|
|
912
912
|
return;
|
|
913
913
|
}
|
|
914
914
|
function f() {
|
|
915
|
-
|
|
915
|
+
a(), Promise.all(n.map((d) => /* @__PURE__ */ es(d))).then((d) => c([...e.map(r), ...d])).catch((d) => Xe(d, s));
|
|
916
916
|
}
|
|
917
|
-
|
|
917
|
+
l ? l.then(f) : f();
|
|
918
918
|
}
|
|
919
|
-
function
|
|
920
|
-
var t = E, e =
|
|
919
|
+
function Qi() {
|
|
920
|
+
var t = E, e = S, n = ae, o = L;
|
|
921
921
|
return function(i = !0) {
|
|
922
|
-
Re(t), ue(e),
|
|
922
|
+
Re(t), ue(e), Nt(n), i && o?.activate();
|
|
923
923
|
};
|
|
924
924
|
}
|
|
925
925
|
function Jn(t = !0) {
|
|
926
|
-
Re(null), ue(null),
|
|
926
|
+
Re(null), ue(null), Nt(null), t && L?.deactivate();
|
|
927
927
|
}
|
|
928
|
-
function
|
|
928
|
+
function Zi() {
|
|
929
929
|
var t = (
|
|
930
930
|
/** @type {Boundary} */
|
|
931
931
|
/** @type {Effect} */
|
|
@@ -940,15 +940,15 @@ function Xi() {
|
|
|
940
940
|
}
|
|
941
941
|
// @__NO_SIDE_EFFECTS__
|
|
942
942
|
function On(t) {
|
|
943
|
-
var e = z | F, n =
|
|
943
|
+
var e = z | F, n = S !== null && (S.f & z) !== 0 ? (
|
|
944
944
|
/** @type {Derived} */
|
|
945
|
-
|
|
945
|
+
S
|
|
946
946
|
) : null;
|
|
947
947
|
return E !== null && (E.f |= nt), {
|
|
948
948
|
ctx: ae,
|
|
949
949
|
deps: null,
|
|
950
950
|
effects: null,
|
|
951
|
-
equals:
|
|
951
|
+
equals: ir,
|
|
952
952
|
f: e,
|
|
953
953
|
fn: t,
|
|
954
954
|
reactions: null,
|
|
@@ -963,9 +963,9 @@ function On(t) {
|
|
|
963
963
|
};
|
|
964
964
|
}
|
|
965
965
|
// @__NO_SIDE_EFFECTS__
|
|
966
|
-
function
|
|
966
|
+
function es(t, e, n) {
|
|
967
967
|
/** @type {Effect | null} */
|
|
968
|
-
E === null &&
|
|
968
|
+
E === null && ki();
|
|
969
969
|
var r = (
|
|
970
970
|
/** @type {Promise<V>} */
|
|
971
971
|
/** @type {unknown} */
|
|
@@ -973,43 +973,43 @@ function Ji(t, e, n) {
|
|
|
973
973
|
), i = bt(
|
|
974
974
|
/** @type {V} */
|
|
975
975
|
D
|
|
976
|
-
), s = !
|
|
977
|
-
return
|
|
978
|
-
var
|
|
979
|
-
r =
|
|
976
|
+
), s = !S, a = /* @__PURE__ */ new Map();
|
|
977
|
+
return fs(() => {
|
|
978
|
+
var l = nr();
|
|
979
|
+
r = l.promise;
|
|
980
980
|
try {
|
|
981
|
-
Promise.resolve(t()).then(
|
|
981
|
+
Promise.resolve(t()).then(l.resolve, l.reject).finally(Jn);
|
|
982
982
|
} catch (g) {
|
|
983
|
-
|
|
983
|
+
l.reject(g), Jn();
|
|
984
984
|
}
|
|
985
985
|
var c = (
|
|
986
986
|
/** @type {Batch} */
|
|
987
987
|
L
|
|
988
988
|
);
|
|
989
989
|
if (s) {
|
|
990
|
-
var f =
|
|
991
|
-
|
|
990
|
+
var f = Zi();
|
|
991
|
+
a.get(c)?.reject(st), a.delete(c), a.set(c, l);
|
|
992
992
|
}
|
|
993
993
|
const d = (g, b = void 0) => {
|
|
994
994
|
if (c.activate(), b)
|
|
995
995
|
b !== st && (i.f |= Je, Vt(i, b));
|
|
996
996
|
else {
|
|
997
997
|
(i.f & Je) !== 0 && (i.f ^= Je), Vt(i, g);
|
|
998
|
-
for (const [h,
|
|
999
|
-
if (
|
|
1000
|
-
|
|
998
|
+
for (const [h, A] of a) {
|
|
999
|
+
if (a.delete(h), h === c) break;
|
|
1000
|
+
A.reject(st);
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
1003
|
f && f();
|
|
1004
1004
|
};
|
|
1005
|
-
|
|
1006
|
-
}),
|
|
1007
|
-
for (const
|
|
1008
|
-
|
|
1009
|
-
}), new Promise((
|
|
1005
|
+
l.promise.then(d, (g) => d(null, g || "unknown"));
|
|
1006
|
+
}), as(() => {
|
|
1007
|
+
for (const l of a.values())
|
|
1008
|
+
l.reject(st);
|
|
1009
|
+
}), new Promise((l) => {
|
|
1010
1010
|
function c(f) {
|
|
1011
1011
|
function d() {
|
|
1012
|
-
f === r ?
|
|
1012
|
+
f === r ? l(i) : c(r);
|
|
1013
1013
|
}
|
|
1014
1014
|
f.then(d, d);
|
|
1015
1015
|
}
|
|
@@ -1019,14 +1019,14 @@ function Ji(t, e, n) {
|
|
|
1019
1019
|
// @__NO_SIDE_EFFECTS__
|
|
1020
1020
|
function Vn(t) {
|
|
1021
1021
|
const e = /* @__PURE__ */ On(t);
|
|
1022
|
-
return
|
|
1022
|
+
return Vr(e), e;
|
|
1023
1023
|
}
|
|
1024
1024
|
// @__NO_SIDE_EFFECTS__
|
|
1025
|
-
function
|
|
1025
|
+
function ts(t) {
|
|
1026
1026
|
const e = /* @__PURE__ */ On(t);
|
|
1027
|
-
return e.equals =
|
|
1027
|
+
return e.equals = sr, e;
|
|
1028
1028
|
}
|
|
1029
|
-
function
|
|
1029
|
+
function ns(t) {
|
|
1030
1030
|
var e = t.effects;
|
|
1031
1031
|
if (e !== null) {
|
|
1032
1032
|
t.effects = null;
|
|
@@ -1037,7 +1037,7 @@ function Zi(t) {
|
|
|
1037
1037
|
);
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
|
-
function
|
|
1040
|
+
function os(t) {
|
|
1041
1041
|
for (var e = t.parent; e !== null; ) {
|
|
1042
1042
|
if ((e.f & z) === 0)
|
|
1043
1043
|
return (e.f & Ce) === 0 ? (
|
|
@@ -1048,63 +1048,63 @@ function es(t) {
|
|
|
1048
1048
|
}
|
|
1049
1049
|
return null;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function co(t) {
|
|
1052
1052
|
var e, n = E;
|
|
1053
|
-
Re(
|
|
1053
|
+
Re(os(t));
|
|
1054
1054
|
try {
|
|
1055
|
-
t.f &= ~mt,
|
|
1055
|
+
t.f &= ~mt, ns(t), e = Br(t);
|
|
1056
1056
|
} finally {
|
|
1057
1057
|
Re(n);
|
|
1058
1058
|
}
|
|
1059
1059
|
return e;
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1062
|
-
var e =
|
|
1063
|
-
if (!t.equals(e) && (t.wv =
|
|
1064
|
-
|
|
1061
|
+
function wr(t) {
|
|
1062
|
+
var e = co(t);
|
|
1063
|
+
if (!t.equals(e) && (t.wv = zr(), (!L?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
1064
|
+
M(t, V);
|
|
1065
1065
|
return;
|
|
1066
1066
|
}
|
|
1067
|
-
Ze || (be !== null ? (
|
|
1067
|
+
Ze || (be !== null ? (ho() || L?.is_fork) && be.set(t, e) : ao(t));
|
|
1068
1068
|
}
|
|
1069
|
-
function
|
|
1069
|
+
function rs(t) {
|
|
1070
1070
|
if (t.effects !== null)
|
|
1071
1071
|
for (const e of t.effects)
|
|
1072
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(st), e.teardown =
|
|
1072
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(st), e.teardown = Ti, e.ac = null, Qt(e, 0), vo(e));
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1074
|
+
function Tr(t) {
|
|
1075
1075
|
if (t.effects !== null)
|
|
1076
1076
|
for (const e of t.effects)
|
|
1077
1077
|
e.teardown && Ft(e);
|
|
1078
1078
|
}
|
|
1079
1079
|
let Qn = /* @__PURE__ */ new Set();
|
|
1080
1080
|
const Qe = /* @__PURE__ */ new Map();
|
|
1081
|
-
let
|
|
1081
|
+
let Ir = !1;
|
|
1082
1082
|
function bt(t, e) {
|
|
1083
1083
|
var n = {
|
|
1084
1084
|
f: 0,
|
|
1085
1085
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
1086
1086
|
v: t,
|
|
1087
1087
|
reactions: null,
|
|
1088
|
-
equals:
|
|
1088
|
+
equals: ir,
|
|
1089
1089
|
rv: 0,
|
|
1090
1090
|
wv: 0
|
|
1091
1091
|
};
|
|
1092
1092
|
return n;
|
|
1093
1093
|
}
|
|
1094
1094
|
// @__NO_SIDE_EFFECTS__
|
|
1095
|
-
function
|
|
1095
|
+
function N(t, e) {
|
|
1096
1096
|
const n = bt(t);
|
|
1097
|
-
return
|
|
1097
|
+
return Vr(n), n;
|
|
1098
1098
|
}
|
|
1099
1099
|
// @__NO_SIDE_EFFECTS__
|
|
1100
|
-
function
|
|
1100
|
+
function Sr(t, e = !1, n = !0) {
|
|
1101
1101
|
const o = bt(t);
|
|
1102
|
-
return e || (o.equals =
|
|
1102
|
+
return e || (o.equals = sr), o;
|
|
1103
1103
|
}
|
|
1104
1104
|
function $(t, e, n = !1) {
|
|
1105
|
-
|
|
1105
|
+
S !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1106
1106
|
// to ensure we error if state is set inside an inspect effect
|
|
1107
|
-
(!ye || (
|
|
1107
|
+
(!ye || (S.f & Ro) !== 0) && cr() && (S.f & (z | et | lo | Ro)) !== 0 && (le === null || !Pt.call(le, t)) && Di();
|
|
1108
1108
|
let o = n ? Tt(e) : e;
|
|
1109
1109
|
return Vt(t, o);
|
|
1110
1110
|
}
|
|
@@ -1118,16 +1118,16 @@ function Vt(t, e) {
|
|
|
1118
1118
|
/** @type {Derived} */
|
|
1119
1119
|
t
|
|
1120
1120
|
);
|
|
1121
|
-
(t.f & F) !== 0 &&
|
|
1121
|
+
(t.f & F) !== 0 && co(r), ao(r);
|
|
1122
1122
|
}
|
|
1123
|
-
t.wv =
|
|
1123
|
+
t.wv = zr(), Ar(t, F), E !== null && (E.f & V) !== 0 && (E.f & (Ie | tt)) === 0 && (oe === null ? ps([t]) : oe.push(t)), !o.is_fork && Qn.size > 0 && !Ir && is();
|
|
1124
1124
|
}
|
|
1125
1125
|
return e;
|
|
1126
1126
|
}
|
|
1127
|
-
function
|
|
1128
|
-
|
|
1127
|
+
function is() {
|
|
1128
|
+
Ir = !1;
|
|
1129
1129
|
for (const t of Qn)
|
|
1130
|
-
(t.f & V) !== 0 &&
|
|
1130
|
+
(t.f & V) !== 0 && M(t, we), nn(t) && Ft(t);
|
|
1131
1131
|
Qn.clear();
|
|
1132
1132
|
}
|
|
1133
1133
|
function Jt(t) {
|
|
@@ -1137,14 +1137,14 @@ function Ar(t, e) {
|
|
|
1137
1137
|
var n = t.reactions;
|
|
1138
1138
|
if (n !== null)
|
|
1139
1139
|
for (var o = n.length, r = 0; r < o; r++) {
|
|
1140
|
-
var i = n[r], s = i.f,
|
|
1141
|
-
if (
|
|
1142
|
-
var
|
|
1140
|
+
var i = n[r], s = i.f, a = (s & F) === 0;
|
|
1141
|
+
if (a && M(i, e), (s & z) !== 0) {
|
|
1142
|
+
var l = (
|
|
1143
1143
|
/** @type {Derived} */
|
|
1144
1144
|
i
|
|
1145
1145
|
);
|
|
1146
|
-
be?.delete(
|
|
1147
|
-
} else
|
|
1146
|
+
be?.delete(l), (s & mt) === 0 && (s & se && (i.f |= mt), Ar(l, we));
|
|
1147
|
+
} else a && ((s & et) !== 0 && Me !== null && Me.add(
|
|
1148
1148
|
/** @type {Effect} */
|
|
1149
1149
|
i
|
|
1150
1150
|
), ke(
|
|
@@ -1156,63 +1156,63 @@ function Ar(t, e) {
|
|
|
1156
1156
|
function Tt(t) {
|
|
1157
1157
|
if (typeof t != "object" || t === null || hn in t)
|
|
1158
1158
|
return t;
|
|
1159
|
-
const e =
|
|
1160
|
-
if (e !==
|
|
1159
|
+
const e = tr(t);
|
|
1160
|
+
if (e !== yi && e !== wi)
|
|
1161
1161
|
return t;
|
|
1162
|
-
var n = /* @__PURE__ */ new Map(), o =
|
|
1162
|
+
var n = /* @__PURE__ */ new Map(), o = er(t), r = /* @__PURE__ */ N(0), i = gt, s = (a) => {
|
|
1163
1163
|
if (gt === i)
|
|
1164
|
-
return
|
|
1165
|
-
var
|
|
1166
|
-
ue(null),
|
|
1167
|
-
var f =
|
|
1168
|
-
return ue(
|
|
1164
|
+
return a();
|
|
1165
|
+
var l = S, c = gt;
|
|
1166
|
+
ue(null), Mo(i);
|
|
1167
|
+
var f = a();
|
|
1168
|
+
return ue(l), Mo(c), f;
|
|
1169
1169
|
};
|
|
1170
|
-
return o && n.set("length", /* @__PURE__ */
|
|
1170
|
+
return o && n.set("length", /* @__PURE__ */ N(
|
|
1171
1171
|
/** @type {any[]} */
|
|
1172
1172
|
t.length
|
|
1173
1173
|
)), new Proxy(
|
|
1174
1174
|
/** @type {any} */
|
|
1175
1175
|
t,
|
|
1176
1176
|
{
|
|
1177
|
-
defineProperty(
|
|
1178
|
-
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) &&
|
|
1179
|
-
var f = n.get(
|
|
1177
|
+
defineProperty(a, l, c) {
|
|
1178
|
+
(!("value" in c) || c.configurable === !1 || c.enumerable === !1 || c.writable === !1) && Mi();
|
|
1179
|
+
var f = n.get(l);
|
|
1180
1180
|
return f === void 0 ? s(() => {
|
|
1181
|
-
var d = /* @__PURE__ */
|
|
1182
|
-
return n.set(
|
|
1181
|
+
var d = /* @__PURE__ */ N(c.value);
|
|
1182
|
+
return n.set(l, d), d;
|
|
1183
1183
|
}) : $(f, c.value, !0), !0;
|
|
1184
1184
|
},
|
|
1185
|
-
deleteProperty(
|
|
1186
|
-
var c = n.get(
|
|
1185
|
+
deleteProperty(a, l) {
|
|
1186
|
+
var c = n.get(l);
|
|
1187
1187
|
if (c === void 0) {
|
|
1188
|
-
if (
|
|
1189
|
-
const f = s(() => /* @__PURE__ */
|
|
1190
|
-
n.set(
|
|
1188
|
+
if (l in a) {
|
|
1189
|
+
const f = s(() => /* @__PURE__ */ N(D));
|
|
1190
|
+
n.set(l, f), Jt(r);
|
|
1191
1191
|
}
|
|
1192
1192
|
} else
|
|
1193
1193
|
$(c, D), Jt(r);
|
|
1194
1194
|
return !0;
|
|
1195
1195
|
},
|
|
1196
|
-
get(
|
|
1197
|
-
if (
|
|
1196
|
+
get(a, l, c) {
|
|
1197
|
+
if (l === hn)
|
|
1198
1198
|
return t;
|
|
1199
|
-
var f = n.get(
|
|
1200
|
-
if (f === void 0 && (!d || It(
|
|
1201
|
-
var b = Tt(d ? l
|
|
1199
|
+
var f = n.get(l), d = l in a;
|
|
1200
|
+
if (f === void 0 && (!d || It(a, l)?.writable) && (f = s(() => {
|
|
1201
|
+
var b = Tt(d ? a[l] : D), h = /* @__PURE__ */ N(b);
|
|
1202
1202
|
return h;
|
|
1203
|
-
}), n.set(
|
|
1203
|
+
}), n.set(l, f)), f !== void 0) {
|
|
1204
1204
|
var g = v(f);
|
|
1205
1205
|
return g === D ? void 0 : g;
|
|
1206
1206
|
}
|
|
1207
|
-
return Reflect.get(
|
|
1207
|
+
return Reflect.get(a, l, c);
|
|
1208
1208
|
},
|
|
1209
|
-
getOwnPropertyDescriptor(
|
|
1210
|
-
var c = Reflect.getOwnPropertyDescriptor(
|
|
1209
|
+
getOwnPropertyDescriptor(a, l) {
|
|
1210
|
+
var c = Reflect.getOwnPropertyDescriptor(a, l);
|
|
1211
1211
|
if (c && "value" in c) {
|
|
1212
|
-
var f = n.get(
|
|
1212
|
+
var f = n.get(l);
|
|
1213
1213
|
f && (c.value = v(f));
|
|
1214
1214
|
} else if (c === void 0) {
|
|
1215
|
-
var d = n.get(
|
|
1215
|
+
var d = n.get(l), g = d?.v;
|
|
1216
1216
|
if (d !== void 0 && g !== D)
|
|
1217
1217
|
return {
|
|
1218
1218
|
enumerable: !0,
|
|
@@ -1223,71 +1223,71 @@ function Tt(t) {
|
|
|
1223
1223
|
}
|
|
1224
1224
|
return c;
|
|
1225
1225
|
},
|
|
1226
|
-
has(
|
|
1227
|
-
if (
|
|
1226
|
+
has(a, l) {
|
|
1227
|
+
if (l === hn)
|
|
1228
1228
|
return !0;
|
|
1229
|
-
var c = n.get(
|
|
1230
|
-
if (c !== void 0 || E !== null && (!f || It(
|
|
1229
|
+
var c = n.get(l), f = c !== void 0 && c.v !== D || Reflect.has(a, l);
|
|
1230
|
+
if (c !== void 0 || E !== null && (!f || It(a, l)?.writable)) {
|
|
1231
1231
|
c === void 0 && (c = s(() => {
|
|
1232
|
-
var g = f ? Tt(l
|
|
1232
|
+
var g = f ? Tt(a[l]) : D, b = /* @__PURE__ */ N(g);
|
|
1233
1233
|
return b;
|
|
1234
|
-
}), n.set(
|
|
1234
|
+
}), n.set(l, c));
|
|
1235
1235
|
var d = v(c);
|
|
1236
1236
|
if (d === D)
|
|
1237
1237
|
return !1;
|
|
1238
1238
|
}
|
|
1239
1239
|
return f;
|
|
1240
1240
|
},
|
|
1241
|
-
set(
|
|
1242
|
-
var d = n.get(
|
|
1243
|
-
if (o &&
|
|
1241
|
+
set(a, l, c, f) {
|
|
1242
|
+
var d = n.get(l), g = l in a;
|
|
1243
|
+
if (o && l === "length")
|
|
1244
1244
|
for (var b = c; b < /** @type {Source<number>} */
|
|
1245
1245
|
d.v; b += 1) {
|
|
1246
1246
|
var h = n.get(b + "");
|
|
1247
|
-
h !== void 0 ? $(h, D) : b in
|
|
1247
|
+
h !== void 0 ? $(h, D) : b in a && (h = s(() => /* @__PURE__ */ N(D)), n.set(b + "", h));
|
|
1248
1248
|
}
|
|
1249
1249
|
if (d === void 0)
|
|
1250
|
-
(!g || It(
|
|
1250
|
+
(!g || It(a, l)?.writable) && (d = s(() => /* @__PURE__ */ N(void 0)), $(d, Tt(c)), n.set(l, d));
|
|
1251
1251
|
else {
|
|
1252
1252
|
g = d.v !== D;
|
|
1253
|
-
var
|
|
1254
|
-
$(d,
|
|
1253
|
+
var A = s(() => Tt(c));
|
|
1254
|
+
$(d, A);
|
|
1255
1255
|
}
|
|
1256
|
-
var w = Reflect.getOwnPropertyDescriptor(
|
|
1256
|
+
var w = Reflect.getOwnPropertyDescriptor(a, l);
|
|
1257
1257
|
if (w?.set && w.set.call(f, c), !g) {
|
|
1258
|
-
if (o && typeof
|
|
1258
|
+
if (o && typeof l == "string") {
|
|
1259
1259
|
var I = (
|
|
1260
1260
|
/** @type {Source<number>} */
|
|
1261
1261
|
n.get("length")
|
|
1262
|
-
), O = Number(
|
|
1262
|
+
), O = Number(l);
|
|
1263
1263
|
Number.isInteger(O) && O >= I.v && $(I, O + 1);
|
|
1264
1264
|
}
|
|
1265
1265
|
Jt(r);
|
|
1266
1266
|
}
|
|
1267
1267
|
return !0;
|
|
1268
1268
|
},
|
|
1269
|
-
ownKeys(
|
|
1269
|
+
ownKeys(a) {
|
|
1270
1270
|
v(r);
|
|
1271
|
-
var
|
|
1271
|
+
var l = Reflect.ownKeys(a).filter((d) => {
|
|
1272
1272
|
var g = n.get(d);
|
|
1273
1273
|
return g === void 0 || g.v !== D;
|
|
1274
1274
|
});
|
|
1275
1275
|
for (var [c, f] of n)
|
|
1276
|
-
f.v !== D && !(c in
|
|
1277
|
-
return
|
|
1276
|
+
f.v !== D && !(c in a) && l.push(c);
|
|
1277
|
+
return l;
|
|
1278
1278
|
},
|
|
1279
1279
|
setPrototypeOf() {
|
|
1280
|
-
|
|
1280
|
+
Ni();
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
1283
|
);
|
|
1284
1284
|
}
|
|
1285
|
-
var
|
|
1285
|
+
var Lo, Er, $r, kr;
|
|
1286
1286
|
function Zn() {
|
|
1287
|
-
if (
|
|
1288
|
-
|
|
1287
|
+
if (Lo === void 0) {
|
|
1288
|
+
Lo = window, Er = /Firefox/.test(navigator.userAgent);
|
|
1289
1289
|
var t = Element.prototype, e = Node.prototype, n = Text.prototype;
|
|
1290
|
-
|
|
1290
|
+
$r = It(e, "firstChild").get, kr = It(e, "nextSibling").get, Co(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Co(n) && (n.__t = void 0);
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
1293
1293
|
function Te(t = "") {
|
|
@@ -1297,14 +1297,14 @@ function Te(t = "") {
|
|
|
1297
1297
|
function _t(t) {
|
|
1298
1298
|
return (
|
|
1299
1299
|
/** @type {TemplateNode | null} */
|
|
1300
|
-
|
|
1300
|
+
$r.call(t)
|
|
1301
1301
|
);
|
|
1302
1302
|
}
|
|
1303
1303
|
// @__NO_SIDE_EFFECTS__
|
|
1304
1304
|
function ce(t) {
|
|
1305
1305
|
return (
|
|
1306
1306
|
/** @type {TemplateNode | null} */
|
|
1307
|
-
|
|
1307
|
+
kr.call(t)
|
|
1308
1308
|
);
|
|
1309
1309
|
}
|
|
1310
1310
|
function un(t, e) {
|
|
@@ -1317,7 +1317,7 @@ function un(t, e) {
|
|
|
1317
1317
|
var o = Te();
|
|
1318
1318
|
return n?.before(o), G(o), o;
|
|
1319
1319
|
}
|
|
1320
|
-
return e &&
|
|
1320
|
+
return e && fo(
|
|
1321
1321
|
/** @type {Text} */
|
|
1322
1322
|
n
|
|
1323
1323
|
), G(n), n;
|
|
@@ -1332,7 +1332,7 @@ function Fn(t, e = !1) {
|
|
|
1332
1332
|
var o = Te();
|
|
1333
1333
|
return k?.before(o), G(o), o;
|
|
1334
1334
|
}
|
|
1335
|
-
|
|
1335
|
+
fo(
|
|
1336
1336
|
/** @type {Text} */
|
|
1337
1337
|
k
|
|
1338
1338
|
);
|
|
@@ -1351,26 +1351,26 @@ function qe(t, e = 1, n = !1) {
|
|
|
1351
1351
|
var i = Te();
|
|
1352
1352
|
return o === null ? r?.after(i) : o.before(i), G(i), i;
|
|
1353
1353
|
}
|
|
1354
|
-
|
|
1354
|
+
fo(
|
|
1355
1355
|
/** @type {Text} */
|
|
1356
1356
|
o
|
|
1357
1357
|
);
|
|
1358
1358
|
}
|
|
1359
1359
|
return G(o), o;
|
|
1360
1360
|
}
|
|
1361
|
-
function
|
|
1361
|
+
function Cr(t) {
|
|
1362
1362
|
t.textContent = "";
|
|
1363
1363
|
}
|
|
1364
|
-
function
|
|
1364
|
+
function Rr() {
|
|
1365
1365
|
return !1;
|
|
1366
1366
|
}
|
|
1367
|
-
function
|
|
1367
|
+
function uo(t, e, n) {
|
|
1368
1368
|
return (
|
|
1369
1369
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1370
|
-
document.createElementNS(
|
|
1370
|
+
document.createElementNS(Zo, t, void 0)
|
|
1371
1371
|
);
|
|
1372
1372
|
}
|
|
1373
|
-
function
|
|
1373
|
+
function fo(t) {
|
|
1374
1374
|
if (
|
|
1375
1375
|
/** @type {string} */
|
|
1376
1376
|
t.nodeValue.length < 65536
|
|
@@ -1381,8 +1381,8 @@ function uo(t) {
|
|
|
1381
1381
|
e.remove(), t.nodeValue += /** @type {string} */
|
|
1382
1382
|
e.nodeValue, e = t.nextSibling;
|
|
1383
1383
|
}
|
|
1384
|
-
function
|
|
1385
|
-
var e =
|
|
1384
|
+
function Or(t) {
|
|
1385
|
+
var e = S, n = E;
|
|
1386
1386
|
ue(null), Re(null);
|
|
1387
1387
|
try {
|
|
1388
1388
|
return t();
|
|
@@ -1390,10 +1390,10 @@ function Rr(t) {
|
|
|
1390
1390
|
ue(e), Re(n);
|
|
1391
1391
|
}
|
|
1392
1392
|
}
|
|
1393
|
-
function
|
|
1394
|
-
E === null && (
|
|
1393
|
+
function ss(t) {
|
|
1394
|
+
E === null && (S === null && Li(), Oi()), Ze && Ri();
|
|
1395
1395
|
}
|
|
1396
|
-
function
|
|
1396
|
+
function ls(t, e) {
|
|
1397
1397
|
var n = e.last;
|
|
1398
1398
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
1399
1399
|
}
|
|
@@ -1425,30 +1425,30 @@ function Oe(t, e) {
|
|
|
1425
1425
|
throw q(o), s;
|
|
1426
1426
|
}
|
|
1427
1427
|
r.deps === null && r.teardown === null && r.nodes === null && r.first === r.last && // either `null`, or a singular child
|
|
1428
|
-
(r.f & nt) === 0 && (r = r.first, (t & et) !== 0 && (t &
|
|
1428
|
+
(r.f & nt) === 0 && (r = r.first, (t & et) !== 0 && (t & Mt) !== 0 && r !== null && (r.f |= Mt));
|
|
1429
1429
|
}
|
|
1430
|
-
if (r !== null && (r.parent = n, n !== null &&
|
|
1430
|
+
if (r !== null && (r.parent = n, n !== null && ls(r, n), S !== null && (S.f & z) !== 0 && (t & tt) === 0)) {
|
|
1431
1431
|
var i = (
|
|
1432
1432
|
/** @type {Derived} */
|
|
1433
|
-
|
|
1433
|
+
S
|
|
1434
1434
|
);
|
|
1435
1435
|
(i.effects ?? (i.effects = [])).push(r);
|
|
1436
1436
|
}
|
|
1437
1437
|
return o;
|
|
1438
1438
|
}
|
|
1439
|
-
function
|
|
1440
|
-
return
|
|
1439
|
+
function ho() {
|
|
1440
|
+
return S !== null && !ye;
|
|
1441
1441
|
}
|
|
1442
|
-
function
|
|
1442
|
+
function as(t) {
|
|
1443
1443
|
const e = Oe(xt, null);
|
|
1444
|
-
return
|
|
1444
|
+
return M(e, V), e.teardown = t, e;
|
|
1445
1445
|
}
|
|
1446
|
-
function
|
|
1447
|
-
|
|
1446
|
+
function Po(t) {
|
|
1447
|
+
ss();
|
|
1448
1448
|
var e = (
|
|
1449
1449
|
/** @type {Effect} */
|
|
1450
1450
|
E.f
|
|
1451
|
-
), n = !
|
|
1451
|
+
), n = !S && (e & Ie) !== 0 && (e & yt) === 0;
|
|
1452
1452
|
if (n) {
|
|
1453
1453
|
var o = (
|
|
1454
1454
|
/** @type {ComponentContext} */
|
|
@@ -1456,19 +1456,19 @@ function Lo(t) {
|
|
|
1456
1456
|
);
|
|
1457
1457
|
(o.e ?? (o.e = [])).push(t);
|
|
1458
1458
|
} else
|
|
1459
|
-
return
|
|
1459
|
+
return Lr(t);
|
|
1460
1460
|
}
|
|
1461
|
-
function
|
|
1462
|
-
return Oe(zt |
|
|
1461
|
+
function Lr(t) {
|
|
1462
|
+
return Oe(zt | Si, t);
|
|
1463
1463
|
}
|
|
1464
|
-
function
|
|
1464
|
+
function cs(t) {
|
|
1465
1465
|
ze.ensure();
|
|
1466
1466
|
const e = Oe(tt | nt, t);
|
|
1467
1467
|
return () => {
|
|
1468
1468
|
q(e);
|
|
1469
1469
|
};
|
|
1470
1470
|
}
|
|
1471
|
-
function
|
|
1471
|
+
function us(t) {
|
|
1472
1472
|
ze.ensure();
|
|
1473
1473
|
const e = Oe(tt | nt, t);
|
|
1474
1474
|
return (n = {}) => new Promise((o) => {
|
|
@@ -1477,17 +1477,17 @@ function ls(t) {
|
|
|
1477
1477
|
}) : (q(e), o(void 0));
|
|
1478
1478
|
});
|
|
1479
1479
|
}
|
|
1480
|
-
function
|
|
1480
|
+
function Pr(t) {
|
|
1481
1481
|
return Oe(zt, t);
|
|
1482
1482
|
}
|
|
1483
|
-
function
|
|
1484
|
-
return Oe(
|
|
1483
|
+
function fs(t) {
|
|
1484
|
+
return Oe(lo | nt, t);
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1486
|
+
function po(t, e = 0) {
|
|
1487
1487
|
return Oe(xt | e, t);
|
|
1488
1488
|
}
|
|
1489
1489
|
function fn(t, e = [], n = [], o = []) {
|
|
1490
|
-
|
|
1490
|
+
Ji(o, e, n, (r) => {
|
|
1491
1491
|
Oe(xt, () => t(...r.map(v)));
|
|
1492
1492
|
});
|
|
1493
1493
|
}
|
|
@@ -1498,30 +1498,30 @@ function Ln(t, e = 0) {
|
|
|
1498
1498
|
function ie(t) {
|
|
1499
1499
|
return Oe(Ie | nt, t);
|
|
1500
1500
|
}
|
|
1501
|
-
function
|
|
1501
|
+
function xr(t) {
|
|
1502
1502
|
var e = t.teardown;
|
|
1503
1503
|
if (e !== null) {
|
|
1504
|
-
const n = Ze, o =
|
|
1505
|
-
|
|
1504
|
+
const n = Ze, o = S;
|
|
1505
|
+
xo(!0), ue(null);
|
|
1506
1506
|
try {
|
|
1507
1507
|
e.call(null);
|
|
1508
1508
|
} finally {
|
|
1509
|
-
|
|
1509
|
+
xo(n), ue(o);
|
|
1510
1510
|
}
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
|
-
function
|
|
1513
|
+
function vo(t, e = !1) {
|
|
1514
1514
|
var n = t.first;
|
|
1515
1515
|
for (t.first = t.last = null; n !== null; ) {
|
|
1516
1516
|
const r = n.ac;
|
|
1517
|
-
r !== null &&
|
|
1517
|
+
r !== null && Or(() => {
|
|
1518
1518
|
r.abort(st);
|
|
1519
1519
|
});
|
|
1520
1520
|
var o = n.next;
|
|
1521
1521
|
(n.f & tt) !== 0 ? n.parent = null : q(n, e), n = o;
|
|
1522
1522
|
}
|
|
1523
1523
|
}
|
|
1524
|
-
function
|
|
1524
|
+
function ds(t) {
|
|
1525
1525
|
for (var e = t.first; e !== null; ) {
|
|
1526
1526
|
var n = e.next;
|
|
1527
1527
|
(e.f & Ie) === 0 && q(e), e = n;
|
|
@@ -1529,26 +1529,26 @@ function cs(t) {
|
|
|
1529
1529
|
}
|
|
1530
1530
|
function q(t, e = !0) {
|
|
1531
1531
|
var n = !1;
|
|
1532
|
-
(e || (t.f &
|
|
1532
|
+
(e || (t.f & or) !== 0) && t.nodes !== null && t.nodes.end !== null && (hs(
|
|
1533
1533
|
t.nodes.start,
|
|
1534
1534
|
/** @type {TemplateNode} */
|
|
1535
1535
|
t.nodes.end
|
|
1536
|
-
), n = !0),
|
|
1536
|
+
), n = !0), vo(t, e && !n), Qt(t, 0), M(t, Ce);
|
|
1537
1537
|
var o = t.nodes && t.nodes.t;
|
|
1538
1538
|
if (o !== null)
|
|
1539
1539
|
for (const i of o)
|
|
1540
1540
|
i.stop();
|
|
1541
|
-
|
|
1541
|
+
xr(t);
|
|
1542
1542
|
var r = t.parent;
|
|
1543
|
-
r !== null && r.first !== null &&
|
|
1543
|
+
r !== null && r.first !== null && Mr(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1544
1544
|
}
|
|
1545
|
-
function
|
|
1545
|
+
function hs(t, e) {
|
|
1546
1546
|
for (; t !== null; ) {
|
|
1547
1547
|
var n = t === e ? null : /* @__PURE__ */ ce(t);
|
|
1548
1548
|
t.remove(), t = n;
|
|
1549
1549
|
}
|
|
1550
1550
|
}
|
|
1551
|
-
function
|
|
1551
|
+
function Mr(t) {
|
|
1552
1552
|
var e = t.parent, n = t.prev, o = t.next;
|
|
1553
1553
|
n !== null && (n.next = o), o !== null && (o.prev = n), e !== null && (e.first === t && (e.first = o), e.last === t && (e.last = n));
|
|
1554
1554
|
}
|
|
@@ -1560,8 +1560,8 @@ function vt(t, e, n = !0) {
|
|
|
1560
1560
|
}, i = o.length;
|
|
1561
1561
|
if (i > 0) {
|
|
1562
1562
|
var s = () => --i || r();
|
|
1563
|
-
for (var
|
|
1564
|
-
|
|
1563
|
+
for (var a of o)
|
|
1564
|
+
a.out(s);
|
|
1565
1565
|
} else
|
|
1566
1566
|
r();
|
|
1567
1567
|
}
|
|
@@ -1570,10 +1570,10 @@ function Nr(t, e, n) {
|
|
|
1570
1570
|
t.f ^= j;
|
|
1571
1571
|
var o = t.nodes && t.nodes.t;
|
|
1572
1572
|
if (o !== null)
|
|
1573
|
-
for (const
|
|
1574
|
-
(
|
|
1573
|
+
for (const a of o)
|
|
1574
|
+
(a.is_global || n) && e.push(a);
|
|
1575
1575
|
for (var r = t.first; r !== null; ) {
|
|
1576
|
-
var i = r.next, s = (r.f &
|
|
1576
|
+
var i = r.next, s = (r.f & Mt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1577
1577
|
// it means the parent block effect was pruned. In that case,
|
|
1578
1578
|
// transparency information was transferred to the branch effect.
|
|
1579
1579
|
(r.f & Ie) !== 0 && (t.f & et) !== 0;
|
|
@@ -1581,15 +1581,15 @@ function Nr(t, e, n) {
|
|
|
1581
1581
|
}
|
|
1582
1582
|
}
|
|
1583
1583
|
}
|
|
1584
|
-
function
|
|
1585
|
-
|
|
1584
|
+
function go(t) {
|
|
1585
|
+
Dr(t, !0);
|
|
1586
1586
|
}
|
|
1587
|
-
function
|
|
1587
|
+
function Dr(t, e) {
|
|
1588
1588
|
if ((t.f & j) !== 0) {
|
|
1589
1589
|
t.f ^= j;
|
|
1590
1590
|
for (var n = t.first; n !== null; ) {
|
|
1591
|
-
var o = n.next, r = (n.f &
|
|
1592
|
-
|
|
1591
|
+
var o = n.next, r = (n.f & Mt) !== 0 || (n.f & Ie) !== 0;
|
|
1592
|
+
Dr(n, r ? e : !1), n = o;
|
|
1593
1593
|
}
|
|
1594
1594
|
var i = t.nodes && t.nodes.t;
|
|
1595
1595
|
if (i !== null)
|
|
@@ -1597,7 +1597,7 @@ function Mr(t, e) {
|
|
|
1597
1597
|
(s.is_global || e) && s.in();
|
|
1598
1598
|
}
|
|
1599
1599
|
}
|
|
1600
|
-
function
|
|
1600
|
+
function mo(t, e) {
|
|
1601
1601
|
if (t.nodes)
|
|
1602
1602
|
for (var n = t.nodes.start, o = t.nodes.end; n !== null; ) {
|
|
1603
1603
|
var r = n === o ? null : /* @__PURE__ */ ce(n);
|
|
@@ -1605,31 +1605,31 @@ function go(t, e) {
|
|
|
1605
1605
|
}
|
|
1606
1606
|
}
|
|
1607
1607
|
let mn = !1, Ze = !1;
|
|
1608
|
-
function
|
|
1608
|
+
function xo(t) {
|
|
1609
1609
|
Ze = t;
|
|
1610
1610
|
}
|
|
1611
|
-
let
|
|
1611
|
+
let S = null, ye = !1;
|
|
1612
1612
|
function ue(t) {
|
|
1613
|
-
|
|
1613
|
+
S = t;
|
|
1614
1614
|
}
|
|
1615
1615
|
let E = null;
|
|
1616
1616
|
function Re(t) {
|
|
1617
1617
|
E = t;
|
|
1618
1618
|
}
|
|
1619
1619
|
let le = null;
|
|
1620
|
-
function
|
|
1621
|
-
|
|
1620
|
+
function Vr(t) {
|
|
1621
|
+
S !== null && (le === null ? le = [t] : le.push(t));
|
|
1622
1622
|
}
|
|
1623
1623
|
let K = null, J = 0, oe = null;
|
|
1624
|
-
function
|
|
1624
|
+
function ps(t) {
|
|
1625
1625
|
oe = t;
|
|
1626
1626
|
}
|
|
1627
|
-
let
|
|
1628
|
-
function
|
|
1627
|
+
let Fr = 1, at = 0, gt = at;
|
|
1628
|
+
function Mo(t) {
|
|
1629
1629
|
gt = t;
|
|
1630
1630
|
}
|
|
1631
|
-
function
|
|
1632
|
-
return ++
|
|
1631
|
+
function zr() {
|
|
1632
|
+
return ++Fr;
|
|
1633
1633
|
}
|
|
1634
1634
|
function nn(t) {
|
|
1635
1635
|
var e = t.f;
|
|
@@ -1644,7 +1644,7 @@ function nn(t) {
|
|
|
1644
1644
|
if (nn(
|
|
1645
1645
|
/** @type {Derived} */
|
|
1646
1646
|
i
|
|
1647
|
-
) &&
|
|
1647
|
+
) && wr(
|
|
1648
1648
|
/** @type {Derived} */
|
|
1649
1649
|
i
|
|
1650
1650
|
), i.wv > t.wv)
|
|
@@ -1652,31 +1652,31 @@ function nn(t) {
|
|
|
1652
1652
|
}
|
|
1653
1653
|
(e & se) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1654
1654
|
// traversal of the graph in the other batches still happens
|
|
1655
|
-
be === null &&
|
|
1655
|
+
be === null && M(t, V);
|
|
1656
1656
|
}
|
|
1657
1657
|
return !1;
|
|
1658
1658
|
}
|
|
1659
|
-
function
|
|
1659
|
+
function Hr(t, e, n = !0) {
|
|
1660
1660
|
var o = t.reactions;
|
|
1661
1661
|
if (o !== null && !(le !== null && Pt.call(le, t)))
|
|
1662
1662
|
for (var r = 0; r < o.length; r++) {
|
|
1663
1663
|
var i = o[r];
|
|
1664
|
-
(i.f & z) !== 0 ?
|
|
1664
|
+
(i.f & z) !== 0 ? Hr(
|
|
1665
1665
|
/** @type {Derived} */
|
|
1666
1666
|
i,
|
|
1667
1667
|
e,
|
|
1668
1668
|
!1
|
|
1669
|
-
) : e === i && (n ?
|
|
1669
|
+
) : e === i && (n ? M(i, F) : (i.f & V) !== 0 && M(i, we), ke(
|
|
1670
1670
|
/** @type {Effect} */
|
|
1671
1671
|
i
|
|
1672
1672
|
));
|
|
1673
1673
|
}
|
|
1674
1674
|
}
|
|
1675
|
-
function
|
|
1676
|
-
var
|
|
1677
|
-
var e = K, n = J, o = oe, r =
|
|
1675
|
+
function Br(t) {
|
|
1676
|
+
var A;
|
|
1677
|
+
var e = K, n = J, o = oe, r = S, i = le, s = ae, a = ye, l = gt, c = t.f;
|
|
1678
1678
|
K = /** @type {null | Value[]} */
|
|
1679
|
-
null, J = 0, oe = null,
|
|
1679
|
+
null, J = 0, oe = null, S = (c & (Ie | tt)) === 0 ? t : null, le = null, Nt(t.ctx), ye = !1, gt = ++at, t.ac !== null && (Or(() => {
|
|
1680
1680
|
t.ac.abort(st);
|
|
1681
1681
|
}), t.ac = null);
|
|
1682
1682
|
try {
|
|
@@ -1694,14 +1694,14 @@ function Hr(t) {
|
|
|
1694
1694
|
g[J + h] = K[h];
|
|
1695
1695
|
else
|
|
1696
1696
|
t.deps = g = K;
|
|
1697
|
-
if (
|
|
1697
|
+
if (ho() && (t.f & se) !== 0)
|
|
1698
1698
|
for (h = J; h < g.length; h++)
|
|
1699
|
-
((
|
|
1699
|
+
((A = g[h]).reactions ?? (A.reactions = [])).push(t);
|
|
1700
1700
|
} else !b && g !== null && J < g.length && (Qt(t, J), g.length = J);
|
|
1701
|
-
if (
|
|
1701
|
+
if (cr() && oe !== null && !ye && g !== null && (t.f & (z | we | F)) === 0)
|
|
1702
1702
|
for (h = 0; h < /** @type {Source[]} */
|
|
1703
1703
|
oe.length; h++)
|
|
1704
|
-
|
|
1704
|
+
Hr(
|
|
1705
1705
|
oe[h],
|
|
1706
1706
|
/** @type {Effect} */
|
|
1707
1707
|
t
|
|
@@ -1718,15 +1718,15 @@ function Hr(t) {
|
|
|
1718
1718
|
}
|
|
1719
1719
|
return (t.f & Je) !== 0 && (t.f ^= Je), d;
|
|
1720
1720
|
} catch (w) {
|
|
1721
|
-
return
|
|
1721
|
+
return fr(w);
|
|
1722
1722
|
} finally {
|
|
1723
|
-
t.f ^= qn, K = e, J = n, oe = o,
|
|
1723
|
+
t.f ^= qn, K = e, J = n, oe = o, S = r, le = i, Nt(s), ye = a, gt = l;
|
|
1724
1724
|
}
|
|
1725
1725
|
}
|
|
1726
|
-
function
|
|
1726
|
+
function vs(t, e) {
|
|
1727
1727
|
let n = e.reactions;
|
|
1728
1728
|
if (n !== null) {
|
|
1729
|
-
var o =
|
|
1729
|
+
var o = bi.call(n, t);
|
|
1730
1730
|
if (o !== -1) {
|
|
1731
1731
|
var r = n.length - 1;
|
|
1732
1732
|
r === 0 ? n = e.reactions = null : (n[o] = n[r], n.pop());
|
|
@@ -1740,27 +1740,27 @@ function ds(t, e) {
|
|
|
1740
1740
|
/** @type {Derived} */
|
|
1741
1741
|
e
|
|
1742
1742
|
);
|
|
1743
|
-
(i.f & se) !== 0 && (i.f ^= se, i.f &= ~mt),
|
|
1743
|
+
(i.f & se) !== 0 && (i.f ^= se, i.f &= ~mt), ao(i), rs(i), Qt(i, 0);
|
|
1744
1744
|
}
|
|
1745
1745
|
}
|
|
1746
1746
|
function Qt(t, e) {
|
|
1747
1747
|
var n = t.deps;
|
|
1748
1748
|
if (n !== null)
|
|
1749
1749
|
for (var o = e; o < n.length; o++)
|
|
1750
|
-
|
|
1750
|
+
vs(t, n[o]);
|
|
1751
1751
|
}
|
|
1752
1752
|
function Ft(t) {
|
|
1753
1753
|
var e = t.f;
|
|
1754
1754
|
if ((e & Ce) === 0) {
|
|
1755
|
-
|
|
1755
|
+
M(t, V);
|
|
1756
1756
|
var n = E, o = mn;
|
|
1757
1757
|
E = t, mn = !0;
|
|
1758
1758
|
try {
|
|
1759
|
-
(e & (et |
|
|
1760
|
-
var r =
|
|
1761
|
-
t.teardown = typeof r == "function" ? r : null, t.wv =
|
|
1759
|
+
(e & (et | so)) !== 0 ? ds(t) : vo(t), xr(t);
|
|
1760
|
+
var r = Br(t);
|
|
1761
|
+
t.teardown = typeof r == "function" ? r : null, t.wv = Fr;
|
|
1762
1762
|
var i;
|
|
1763
|
-
Bn &&
|
|
1763
|
+
Bn && Bi && (t.f & F) !== 0 && t.deps;
|
|
1764
1764
|
} finally {
|
|
1765
1765
|
mn = o, E = n;
|
|
1766
1766
|
}
|
|
@@ -1768,16 +1768,16 @@ function Ft(t) {
|
|
|
1768
1768
|
}
|
|
1769
1769
|
function v(t) {
|
|
1770
1770
|
var e = t.f, n = (e & z) !== 0;
|
|
1771
|
-
if (
|
|
1771
|
+
if (S !== null && !ye) {
|
|
1772
1772
|
var o = E !== null && (E.f & Ce) !== 0;
|
|
1773
1773
|
if (!o && (le === null || !Pt.call(le, t))) {
|
|
1774
|
-
var r =
|
|
1775
|
-
if ((
|
|
1774
|
+
var r = S.deps;
|
|
1775
|
+
if ((S.f & qn) !== 0)
|
|
1776
1776
|
t.rv < at && (t.rv = at, K === null && r !== null && r[J] === t ? J++ : K === null ? K = [t] : K.push(t));
|
|
1777
1777
|
else {
|
|
1778
|
-
(
|
|
1778
|
+
(S.deps ?? (S.deps = [])).push(t);
|
|
1779
1779
|
var i = t.reactions;
|
|
1780
|
-
i === null ? t.reactions = [
|
|
1780
|
+
i === null ? t.reactions = [S] : Pt.call(i, S) || i.push(S);
|
|
1781
1781
|
}
|
|
1782
1782
|
}
|
|
1783
1783
|
}
|
|
@@ -1789,11 +1789,11 @@ function v(t) {
|
|
|
1789
1789
|
t
|
|
1790
1790
|
);
|
|
1791
1791
|
if (Ze) {
|
|
1792
|
-
var
|
|
1793
|
-
return ((s.f & V) === 0 && s.reactions !== null ||
|
|
1792
|
+
var a = s.v;
|
|
1793
|
+
return ((s.f & V) === 0 && s.reactions !== null || qr(s)) && (a = co(s)), Qe.set(s, a), a;
|
|
1794
1794
|
}
|
|
1795
|
-
var
|
|
1796
|
-
nn(s) && (
|
|
1795
|
+
var l = (s.f & se) === 0 && !ye && S !== null && (mn || (S.f & se) !== 0), c = (s.f & yt) === 0;
|
|
1796
|
+
nn(s) && (l && (s.f |= se), wr(s)), l && !c && (Tr(s), jr(s));
|
|
1797
1797
|
}
|
|
1798
1798
|
if (be?.has(t))
|
|
1799
1799
|
return be.get(t);
|
|
@@ -1801,29 +1801,29 @@ function v(t) {
|
|
|
1801
1801
|
throw t.v;
|
|
1802
1802
|
return t.v;
|
|
1803
1803
|
}
|
|
1804
|
-
function
|
|
1804
|
+
function jr(t) {
|
|
1805
1805
|
if (t.f |= se, t.deps !== null)
|
|
1806
1806
|
for (const e of t.deps)
|
|
1807
|
-
(e.reactions ?? (e.reactions = [])).push(t), (e.f & z) !== 0 && (e.f & se) === 0 && (
|
|
1807
|
+
(e.reactions ?? (e.reactions = [])).push(t), (e.f & z) !== 0 && (e.f & se) === 0 && (Tr(
|
|
1808
1808
|
/** @type {Derived} */
|
|
1809
1809
|
e
|
|
1810
|
-
),
|
|
1810
|
+
), jr(
|
|
1811
1811
|
/** @type {Derived} */
|
|
1812
1812
|
e
|
|
1813
1813
|
));
|
|
1814
1814
|
}
|
|
1815
|
-
function
|
|
1815
|
+
function qr(t) {
|
|
1816
1816
|
if (t.v === D) return !0;
|
|
1817
1817
|
if (t.deps === null) return !1;
|
|
1818
1818
|
for (const e of t.deps)
|
|
1819
|
-
if (Qe.has(e) || (e.f & z) !== 0 &&
|
|
1819
|
+
if (Qe.has(e) || (e.f & z) !== 0 && qr(
|
|
1820
1820
|
/** @type {Derived} */
|
|
1821
1821
|
e
|
|
1822
1822
|
))
|
|
1823
1823
|
return !0;
|
|
1824
1824
|
return !1;
|
|
1825
1825
|
}
|
|
1826
|
-
function
|
|
1826
|
+
function Gr(t) {
|
|
1827
1827
|
var e = ye;
|
|
1828
1828
|
try {
|
|
1829
1829
|
return ye = !0, t();
|
|
@@ -1831,18 +1831,18 @@ function qr(t) {
|
|
|
1831
1831
|
ye = e;
|
|
1832
1832
|
}
|
|
1833
1833
|
}
|
|
1834
|
-
const ct = /* @__PURE__ */ Symbol("events"),
|
|
1834
|
+
const ct = /* @__PURE__ */ Symbol("events"), Ur = /* @__PURE__ */ new Set(), eo = /* @__PURE__ */ new Set();
|
|
1835
1835
|
function Gt(t, e, n) {
|
|
1836
1836
|
(e[ct] ?? (e[ct] = {}))[t] = n;
|
|
1837
1837
|
}
|
|
1838
|
-
function
|
|
1838
|
+
function gs(t) {
|
|
1839
1839
|
for (var e = 0; e < t.length; e++)
|
|
1840
|
-
|
|
1840
|
+
Ur.add(t[e]);
|
|
1841
1841
|
for (var n of eo)
|
|
1842
1842
|
n(t);
|
|
1843
1843
|
}
|
|
1844
1844
|
let No = null;
|
|
1845
|
-
function
|
|
1845
|
+
function Do(t) {
|
|
1846
1846
|
var e = this, n = (
|
|
1847
1847
|
/** @type {Node} */
|
|
1848
1848
|
e.ownerDocument
|
|
@@ -1851,10 +1851,10 @@ function Mo(t) {
|
|
|
1851
1851
|
r[0] || t.target
|
|
1852
1852
|
);
|
|
1853
1853
|
No = t;
|
|
1854
|
-
var s = 0,
|
|
1855
|
-
if (
|
|
1856
|
-
var
|
|
1857
|
-
if (
|
|
1854
|
+
var s = 0, a = No === t && t[ct];
|
|
1855
|
+
if (a) {
|
|
1856
|
+
var l = r.indexOf(a);
|
|
1857
|
+
if (l !== -1 && (e === document || e === /** @type {any} */
|
|
1858
1858
|
window)) {
|
|
1859
1859
|
t[ct] = e;
|
|
1860
1860
|
return;
|
|
@@ -1862,7 +1862,7 @@ function Mo(t) {
|
|
|
1862
1862
|
var c = r.indexOf(e);
|
|
1863
1863
|
if (c === -1)
|
|
1864
1864
|
return;
|
|
1865
|
-
|
|
1865
|
+
l <= c && (s = l);
|
|
1866
1866
|
}
|
|
1867
1867
|
if (i = /** @type {Element} */
|
|
1868
1868
|
r[s] || t.target, i !== e) {
|
|
@@ -1872,18 +1872,18 @@ function Mo(t) {
|
|
|
1872
1872
|
return i || n;
|
|
1873
1873
|
}
|
|
1874
1874
|
});
|
|
1875
|
-
var f =
|
|
1875
|
+
var f = S, d = E;
|
|
1876
1876
|
ue(null), Re(null);
|
|
1877
1877
|
try {
|
|
1878
1878
|
for (var g, b = []; i !== null; ) {
|
|
1879
1879
|
var h = i.assignedSlot || i.parentNode || /** @type {any} */
|
|
1880
1880
|
i.host || null;
|
|
1881
1881
|
try {
|
|
1882
|
-
var
|
|
1883
|
-
|
|
1882
|
+
var A = i[ct]?.[o];
|
|
1883
|
+
A != null && (!/** @type {any} */
|
|
1884
1884
|
i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1885
1885
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1886
|
-
t.target === i) &&
|
|
1886
|
+
t.target === i) && A.call(i, t);
|
|
1887
1887
|
} catch (w) {
|
|
1888
1888
|
g ? b.push(w) : g = w;
|
|
1889
1889
|
}
|
|
@@ -1903,22 +1903,22 @@ function Mo(t) {
|
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
1906
|
-
const
|
|
1906
|
+
const ms = (
|
|
1907
1907
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1908
1908
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1909
1909
|
/** @param {string} html */
|
|
1910
1910
|
createHTML: (t) => t
|
|
1911
1911
|
})
|
|
1912
1912
|
);
|
|
1913
|
-
function
|
|
1913
|
+
function bs(t) {
|
|
1914
1914
|
return (
|
|
1915
1915
|
/** @type {string} */
|
|
1916
|
-
|
|
1916
|
+
ms?.createHTML(t) ?? t
|
|
1917
1917
|
);
|
|
1918
1918
|
}
|
|
1919
|
-
function
|
|
1920
|
-
var e =
|
|
1921
|
-
return e.innerHTML =
|
|
1919
|
+
function _s(t) {
|
|
1920
|
+
var e = uo("template");
|
|
1921
|
+
return e.innerHTML = bs(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1922
1922
|
}
|
|
1923
1923
|
function bn(t, e) {
|
|
1924
1924
|
var n = (
|
|
@@ -1929,25 +1929,25 @@ function bn(t, e) {
|
|
|
1929
1929
|
}
|
|
1930
1930
|
// @__NO_SIDE_EFFECTS__
|
|
1931
1931
|
function ot(t, e) {
|
|
1932
|
-
var n = (e &
|
|
1932
|
+
var n = (e & gi) !== 0, o = (e & mi) !== 0, r, i = !t.startsWith("<!>");
|
|
1933
1933
|
return () => {
|
|
1934
1934
|
if (R)
|
|
1935
1935
|
return bn(k, null), k;
|
|
1936
|
-
r === void 0 && (r =
|
|
1936
|
+
r === void 0 && (r = _s(i ? t : "<!>" + t), n || (r = /** @type {TemplateNode} */
|
|
1937
1937
|
/* @__PURE__ */ _t(r)));
|
|
1938
1938
|
var s = (
|
|
1939
1939
|
/** @type {TemplateNode} */
|
|
1940
|
-
o ||
|
|
1940
|
+
o || Er ? document.importNode(r, !0) : r.cloneNode(!0)
|
|
1941
1941
|
);
|
|
1942
1942
|
if (n) {
|
|
1943
|
-
var
|
|
1943
|
+
var a = (
|
|
1944
1944
|
/** @type {TemplateNode} */
|
|
1945
1945
|
/* @__PURE__ */ _t(s)
|
|
1946
|
-
),
|
|
1946
|
+
), l = (
|
|
1947
1947
|
/** @type {TemplateNode} */
|
|
1948
1948
|
s.lastChild
|
|
1949
1949
|
);
|
|
1950
|
-
bn(
|
|
1950
|
+
bn(a, l);
|
|
1951
1951
|
} else
|
|
1952
1952
|
bn(s, s);
|
|
1953
1953
|
return s;
|
|
@@ -1967,23 +1967,23 @@ function xe(t, e) {
|
|
|
1967
1967
|
e
|
|
1968
1968
|
);
|
|
1969
1969
|
}
|
|
1970
|
-
const
|
|
1971
|
-
function
|
|
1972
|
-
return
|
|
1970
|
+
const ys = ["touchstart", "touchmove"];
|
|
1971
|
+
function ws(t) {
|
|
1972
|
+
return ys.includes(t);
|
|
1973
1973
|
}
|
|
1974
|
-
function
|
|
1974
|
+
function Vo(t, e) {
|
|
1975
1975
|
var n = e == null ? "" : typeof e == "object" ? `${e}` : e;
|
|
1976
1976
|
n !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = n, t.nodeValue = `${n}`);
|
|
1977
1977
|
}
|
|
1978
|
-
function
|
|
1979
|
-
return
|
|
1978
|
+
function Wr(t, e) {
|
|
1979
|
+
return Kr(t, e);
|
|
1980
1980
|
}
|
|
1981
|
-
function
|
|
1981
|
+
function Ts(t, e) {
|
|
1982
1982
|
Zn(), e.intro = e.intro ?? !1;
|
|
1983
1983
|
const n = e.target, o = R, r = k;
|
|
1984
1984
|
try {
|
|
1985
1985
|
for (var i = /* @__PURE__ */ _t(n); i && (i.nodeType !== Ht || /** @type {Comment} */
|
|
1986
|
-
i.data !==
|
|
1986
|
+
i.data !== Qo); )
|
|
1987
1987
|
i = /* @__PURE__ */ ce(i);
|
|
1988
1988
|
if (!i)
|
|
1989
1989
|
throw Lt;
|
|
@@ -1991,24 +1991,24 @@ function _s(t, e) {
|
|
|
1991
1991
|
/** @type {Comment} */
|
|
1992
1992
|
i
|
|
1993
1993
|
);
|
|
1994
|
-
const s =
|
|
1994
|
+
const s = Kr(t, { ...e, anchor: i });
|
|
1995
1995
|
return _e(!1), /** @type {Exports} */
|
|
1996
1996
|
s;
|
|
1997
1997
|
} catch (s) {
|
|
1998
1998
|
if (s instanceof Error && s.message.split(`
|
|
1999
|
-
`).some((
|
|
1999
|
+
`).some((a) => a.startsWith("https://svelte.dev/e/")))
|
|
2000
2000
|
throw s;
|
|
2001
|
-
return s !== Lt && console.warn("Failed to hydrate: ", s), e.recover === !1 &&
|
|
2001
|
+
return s !== Lt && console.warn("Failed to hydrate: ", s), e.recover === !1 && xi(), Zn(), Cr(n), _e(!1), Wr(t, e);
|
|
2002
2002
|
} finally {
|
|
2003
2003
|
_e(o), G(r);
|
|
2004
2004
|
}
|
|
2005
2005
|
}
|
|
2006
2006
|
const dn = /* @__PURE__ */ new Map();
|
|
2007
|
-
function
|
|
2007
|
+
function Kr(t, { target: e, anchor: n, props: o = {}, events: r, context: i, intro: s = !0, transformError: a }) {
|
|
2008
2008
|
Zn();
|
|
2009
|
-
var
|
|
2009
|
+
var l = void 0, c = us(() => {
|
|
2010
2010
|
var f = n ?? e.appendChild(Te());
|
|
2011
|
-
|
|
2011
|
+
Yi(
|
|
2012
2012
|
/** @type {TemplateNode} */
|
|
2013
2013
|
f,
|
|
2014
2014
|
{
|
|
@@ -2016,7 +2016,7 @@ function Wr(t, { target: e, anchor: n, props: o = {}, events: r, context: i, int
|
|
|
2016
2016
|
}
|
|
2017
2017
|
},
|
|
2018
2018
|
(b) => {
|
|
2019
|
-
|
|
2019
|
+
lr({});
|
|
2020
2020
|
var h = (
|
|
2021
2021
|
/** @type {ComponentContext} */
|
|
2022
2022
|
ae
|
|
@@ -2025,52 +2025,52 @@ function Wr(t, { target: e, anchor: n, props: o = {}, events: r, context: i, int
|
|
|
2025
2025
|
/** @type {TemplateNode} */
|
|
2026
2026
|
b,
|
|
2027
2027
|
null
|
|
2028
|
-
),
|
|
2029
|
-
k.data !==
|
|
2028
|
+
), l = t(b, o) || {}, R && (E.nodes.end = k, k === null || k.nodeType !== Ht || /** @type {Comment} */
|
|
2029
|
+
k.data !== io))
|
|
2030
2030
|
throw kn(), Lt;
|
|
2031
|
-
|
|
2031
|
+
ar();
|
|
2032
2032
|
},
|
|
2033
|
-
|
|
2033
|
+
a
|
|
2034
2034
|
);
|
|
2035
2035
|
var d = /* @__PURE__ */ new Set(), g = (b) => {
|
|
2036
2036
|
for (var h = 0; h < b.length; h++) {
|
|
2037
|
-
var
|
|
2038
|
-
if (!d.has(
|
|
2039
|
-
d.add(
|
|
2040
|
-
var w =
|
|
2037
|
+
var A = b[h];
|
|
2038
|
+
if (!d.has(A)) {
|
|
2039
|
+
d.add(A);
|
|
2040
|
+
var w = ws(A);
|
|
2041
2041
|
for (const fe of [e, document]) {
|
|
2042
2042
|
var I = dn.get(fe);
|
|
2043
2043
|
I === void 0 && (I = /* @__PURE__ */ new Map(), dn.set(fe, I));
|
|
2044
|
-
var O = I.get(
|
|
2045
|
-
O === void 0 ? (fe.addEventListener(
|
|
2044
|
+
var O = I.get(A);
|
|
2045
|
+
O === void 0 ? (fe.addEventListener(A, Do, { passive: w }), I.set(A, 1)) : I.set(A, O + 1);
|
|
2046
2046
|
}
|
|
2047
2047
|
}
|
|
2048
2048
|
}
|
|
2049
2049
|
};
|
|
2050
|
-
return g(En(
|
|
2050
|
+
return g(En(Ur)), eo.add(g), () => {
|
|
2051
2051
|
for (var b of d)
|
|
2052
2052
|
for (const w of [e, document]) {
|
|
2053
2053
|
var h = (
|
|
2054
2054
|
/** @type {Map<string, number>} */
|
|
2055
2055
|
dn.get(w)
|
|
2056
|
-
),
|
|
2056
|
+
), A = (
|
|
2057
2057
|
/** @type {number} */
|
|
2058
2058
|
h.get(b)
|
|
2059
2059
|
);
|
|
2060
|
-
--
|
|
2060
|
+
--A == 0 ? (w.removeEventListener(b, Do), h.delete(b), h.size === 0 && dn.delete(w)) : h.set(b, A);
|
|
2061
2061
|
}
|
|
2062
2062
|
eo.delete(g), f !== n && f.parentNode?.removeChild(f);
|
|
2063
2063
|
};
|
|
2064
2064
|
});
|
|
2065
|
-
return to.set(
|
|
2065
|
+
return to.set(l, c), l;
|
|
2066
2066
|
}
|
|
2067
2067
|
let to = /* @__PURE__ */ new WeakMap();
|
|
2068
|
-
function
|
|
2068
|
+
function Is(t, e) {
|
|
2069
2069
|
const n = to.get(t);
|
|
2070
2070
|
return n ? (to.delete(t), n(e)) : Promise.resolve();
|
|
2071
2071
|
}
|
|
2072
|
-
var me, $e, ee, ht, en, tn,
|
|
2073
|
-
class
|
|
2072
|
+
var me, $e, ee, ht, en, tn, An;
|
|
2073
|
+
class Ss {
|
|
2074
2074
|
/**
|
|
2075
2075
|
* @param {TemplateNode} anchor
|
|
2076
2076
|
* @param {boolean} transition
|
|
@@ -2121,7 +2121,7 @@ class ws {
|
|
|
2121
2121
|
u(this, me).get(e)
|
|
2122
2122
|
), o = u(this, $e).get(n);
|
|
2123
2123
|
if (o)
|
|
2124
|
-
|
|
2124
|
+
go(o), u(this, ht).delete(n);
|
|
2125
2125
|
else {
|
|
2126
2126
|
var r = u(this, ee).get(n);
|
|
2127
2127
|
r && (r.effect.f & j) === 0 && (u(this, $e).set(n, r.effect), u(this, ee).delete(n), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), o = r.effect);
|
|
@@ -2129,27 +2129,27 @@ class ws {
|
|
|
2129
2129
|
for (const [i, s] of u(this, me)) {
|
|
2130
2130
|
if (u(this, me).delete(i), i === e)
|
|
2131
2131
|
break;
|
|
2132
|
-
const
|
|
2133
|
-
|
|
2132
|
+
const a = u(this, ee).get(s);
|
|
2133
|
+
a && (q(a.effect), u(this, ee).delete(s));
|
|
2134
2134
|
}
|
|
2135
2135
|
for (const [i, s] of u(this, $e)) {
|
|
2136
2136
|
if (i === n || u(this, ht).has(i) || (s.f & j) !== 0) continue;
|
|
2137
|
-
const
|
|
2137
|
+
const a = () => {
|
|
2138
2138
|
if (Array.from(u(this, me).values()).includes(i)) {
|
|
2139
2139
|
var c = document.createDocumentFragment();
|
|
2140
|
-
|
|
2140
|
+
mo(s, c), c.append(Te()), u(this, ee).set(i, { effect: s, fragment: c });
|
|
2141
2141
|
} else
|
|
2142
2142
|
q(s);
|
|
2143
2143
|
u(this, ht).delete(i), u(this, $e).delete(i);
|
|
2144
2144
|
};
|
|
2145
|
-
u(this, en) || !o ? (u(this, ht).add(i), vt(s,
|
|
2145
|
+
u(this, en) || !o ? (u(this, ht).add(i), vt(s, a, !1)) : a();
|
|
2146
2146
|
}
|
|
2147
2147
|
}
|
|
2148
2148
|
});
|
|
2149
2149
|
/**
|
|
2150
2150
|
* @param {Batch} batch
|
|
2151
2151
|
*/
|
|
2152
|
-
T(this,
|
|
2152
|
+
T(this, An, (e) => {
|
|
2153
2153
|
u(this, me).delete(e);
|
|
2154
2154
|
const n = Array.from(u(this, me).values());
|
|
2155
2155
|
for (const [o, r] of u(this, ee))
|
|
@@ -2166,7 +2166,7 @@ class ws {
|
|
|
2166
2166
|
var o = (
|
|
2167
2167
|
/** @type {Batch} */
|
|
2168
2168
|
L
|
|
2169
|
-
), r =
|
|
2169
|
+
), r = Rr();
|
|
2170
2170
|
if (n && !u(this, $e).has(e) && !u(this, ee).has(e))
|
|
2171
2171
|
if (r) {
|
|
2172
2172
|
var i = document.createDocumentFragment(), s = Te();
|
|
@@ -2180,47 +2180,47 @@ class ws {
|
|
|
2180
2180
|
ie(() => n(this.anchor))
|
|
2181
2181
|
);
|
|
2182
2182
|
if (u(this, me).set(o, e), r) {
|
|
2183
|
-
for (const [
|
|
2184
|
-
|
|
2185
|
-
for (const [
|
|
2186
|
-
|
|
2187
|
-
o.oncommit(u(this, tn)), o.ondiscard(u(this,
|
|
2183
|
+
for (const [a, l] of u(this, $e))
|
|
2184
|
+
a === e ? o.unskip_effect(l) : o.skip_effect(l);
|
|
2185
|
+
for (const [a, l] of u(this, ee))
|
|
2186
|
+
a === e ? o.unskip_effect(l.effect) : o.skip_effect(l.effect);
|
|
2187
|
+
o.oncommit(u(this, tn)), o.ondiscard(u(this, An));
|
|
2188
2188
|
} else
|
|
2189
2189
|
R && (this.anchor = k), u(this, tn).call(this, o);
|
|
2190
2190
|
}
|
|
2191
2191
|
}
|
|
2192
|
-
me = new WeakMap(), $e = new WeakMap(), ee = new WeakMap(), ht = new WeakMap(), en = new WeakMap(), tn = new WeakMap(),
|
|
2192
|
+
me = new WeakMap(), $e = new WeakMap(), ee = new WeakMap(), ht = new WeakMap(), en = new WeakMap(), tn = new WeakMap(), An = new WeakMap();
|
|
2193
2193
|
function Ut(t, e, n = !1) {
|
|
2194
2194
|
var o;
|
|
2195
2195
|
R && (o = k, Cn());
|
|
2196
|
-
var r = new
|
|
2197
|
-
function s(
|
|
2196
|
+
var r = new Ss(t), i = n ? Mt : 0;
|
|
2197
|
+
function s(a, l) {
|
|
2198
2198
|
if (R) {
|
|
2199
|
-
var c =
|
|
2199
|
+
var c = rr(
|
|
2200
2200
|
/** @type {TemplateNode} */
|
|
2201
2201
|
o
|
|
2202
2202
|
);
|
|
2203
|
-
if (
|
|
2203
|
+
if (a !== parseInt(c.substring(1))) {
|
|
2204
2204
|
var f = In();
|
|
2205
|
-
G(f), r.anchor = f, _e(!1), r.ensure(
|
|
2205
|
+
G(f), r.anchor = f, _e(!1), r.ensure(a, l), _e(!0);
|
|
2206
2206
|
return;
|
|
2207
2207
|
}
|
|
2208
2208
|
}
|
|
2209
|
-
r.ensure(
|
|
2209
|
+
r.ensure(a, l);
|
|
2210
2210
|
}
|
|
2211
2211
|
Ln(() => {
|
|
2212
|
-
var
|
|
2213
|
-
e((
|
|
2214
|
-
|
|
2215
|
-
}),
|
|
2212
|
+
var a = !1;
|
|
2213
|
+
e((l, c = 0) => {
|
|
2214
|
+
a = !0, s(c, l);
|
|
2215
|
+
}), a || s(-1, null);
|
|
2216
2216
|
}, i);
|
|
2217
2217
|
}
|
|
2218
|
-
function
|
|
2218
|
+
function As(t, e) {
|
|
2219
2219
|
return e;
|
|
2220
2220
|
}
|
|
2221
|
-
function
|
|
2222
|
-
for (var o = [], r = e.length, i, s = e.length,
|
|
2223
|
-
let d = e[
|
|
2221
|
+
function Es(t, e, n) {
|
|
2222
|
+
for (var o = [], r = e.length, i, s = e.length, a = 0; a < r; a++) {
|
|
2223
|
+
let d = e[a];
|
|
2224
2224
|
vt(
|
|
2225
2225
|
d,
|
|
2226
2226
|
() => {
|
|
@@ -2239,8 +2239,8 @@ function Is(t, e, n) {
|
|
|
2239
2239
|
);
|
|
2240
2240
|
}
|
|
2241
2241
|
if (s === 0) {
|
|
2242
|
-
var
|
|
2243
|
-
if (
|
|
2242
|
+
var l = o.length === 0 && n !== null;
|
|
2243
|
+
if (l) {
|
|
2244
2244
|
var c = (
|
|
2245
2245
|
/** @type {Element} */
|
|
2246
2246
|
n
|
|
@@ -2248,9 +2248,9 @@ function Is(t, e, n) {
|
|
|
2248
2248
|
/** @type {Element} */
|
|
2249
2249
|
c.parentNode
|
|
2250
2250
|
);
|
|
2251
|
-
|
|
2251
|
+
Cr(f), f.append(c), t.items.clear();
|
|
2252
2252
|
}
|
|
2253
|
-
no(t, e, !
|
|
2253
|
+
no(t, e, !l);
|
|
2254
2254
|
} else
|
|
2255
2255
|
i = {
|
|
2256
2256
|
pending: new Set(e),
|
|
@@ -2262,10 +2262,10 @@ function no(t, e, n = !0) {
|
|
|
2262
2262
|
if (t.pending.size > 0) {
|
|
2263
2263
|
o = /* @__PURE__ */ new Set();
|
|
2264
2264
|
for (const s of t.pending.values())
|
|
2265
|
-
for (const
|
|
2265
|
+
for (const a of s)
|
|
2266
2266
|
o.add(
|
|
2267
2267
|
/** @type {EachItem} */
|
|
2268
|
-
t.items.get(
|
|
2268
|
+
t.items.get(a).e
|
|
2269
2269
|
);
|
|
2270
2270
|
}
|
|
2271
2271
|
for (var r = 0; r < e.length; r++) {
|
|
@@ -2273,64 +2273,64 @@ function no(t, e, n = !0) {
|
|
|
2273
2273
|
if (o?.has(i)) {
|
|
2274
2274
|
i.f |= Fe;
|
|
2275
2275
|
const s = document.createDocumentFragment();
|
|
2276
|
-
|
|
2276
|
+
mo(i, s);
|
|
2277
2277
|
} else
|
|
2278
2278
|
q(e[r], n);
|
|
2279
2279
|
}
|
|
2280
2280
|
}
|
|
2281
|
-
var
|
|
2282
|
-
function
|
|
2283
|
-
var s = t,
|
|
2281
|
+
var Fo;
|
|
2282
|
+
function $s(t, e, n, o, r, i = null) {
|
|
2283
|
+
var s = t, a = /* @__PURE__ */ new Map();
|
|
2284
2284
|
R && Cn();
|
|
2285
|
-
var
|
|
2285
|
+
var l = null, c = /* @__PURE__ */ ts(() => {
|
|
2286
2286
|
var I = n();
|
|
2287
|
-
return
|
|
2287
|
+
return er(I) ? I : I == null ? [] : En(I);
|
|
2288
2288
|
}), f, d = /* @__PURE__ */ new Map(), g = !0;
|
|
2289
2289
|
function b(I) {
|
|
2290
|
-
(w.effect.f & Ce) === 0 && (w.pending.delete(I), w.fallback =
|
|
2291
|
-
|
|
2290
|
+
(w.effect.f & Ce) === 0 && (w.pending.delete(I), w.fallback = l, ks(w, f, s, e, o), l !== null && (f.length === 0 ? (l.f & Fe) === 0 ? go(l) : (l.f ^= Fe, Yt(l, null, s)) : vt(l, () => {
|
|
2291
|
+
l = null;
|
|
2292
2292
|
})));
|
|
2293
2293
|
}
|
|
2294
2294
|
function h(I) {
|
|
2295
2295
|
w.pending.delete(I);
|
|
2296
2296
|
}
|
|
2297
|
-
var
|
|
2297
|
+
var A = Ln(() => {
|
|
2298
2298
|
f = /** @type {V[]} */
|
|
2299
2299
|
v(c);
|
|
2300
2300
|
var I = f.length;
|
|
2301
2301
|
let O = !1;
|
|
2302
2302
|
if (R) {
|
|
2303
|
-
var fe =
|
|
2303
|
+
var fe = rr(s) === ro;
|
|
2304
2304
|
fe !== (I === 0) && (s = In(), G(s), _e(!1), O = !0);
|
|
2305
2305
|
}
|
|
2306
2306
|
for (var de = /* @__PURE__ */ new Set(), H = (
|
|
2307
2307
|
/** @type {Batch} */
|
|
2308
2308
|
L
|
|
2309
|
-
), je =
|
|
2309
|
+
), je = Rr(), te = 0; te < I; te += 1) {
|
|
2310
2310
|
R && k.nodeType === Ht && /** @type {Comment} */
|
|
2311
|
-
k.data ===
|
|
2311
|
+
k.data === io && (s = /** @type {Comment} */
|
|
2312
2312
|
k, O = !0, _e(!1));
|
|
2313
|
-
var ne = f[te], wt = o(ne, te), he = g ? null :
|
|
2314
|
-
he ? (he.v && Vt(he.v, ne), he.i && Vt(he.i, te), je && H.unskip_effect(he.e)) : (he =
|
|
2315
|
-
|
|
2316
|
-
g ? s :
|
|
2313
|
+
var ne = f[te], wt = o(ne, te), he = g ? null : a.get(wt);
|
|
2314
|
+
he ? (he.v && Vt(he.v, ne), he.i && Vt(he.i, te), je && H.unskip_effect(he.e)) : (he = Cs(
|
|
2315
|
+
a,
|
|
2316
|
+
g ? s : Fo ?? (Fo = Te()),
|
|
2317
2317
|
ne,
|
|
2318
2318
|
wt,
|
|
2319
2319
|
te,
|
|
2320
2320
|
r,
|
|
2321
2321
|
e,
|
|
2322
2322
|
n
|
|
2323
|
-
), g || (he.e.f |= Fe),
|
|
2323
|
+
), g || (he.e.f |= Fe), a.set(wt, he)), de.add(wt);
|
|
2324
2324
|
}
|
|
2325
|
-
if (I === 0 && i && !
|
|
2325
|
+
if (I === 0 && i && !l && (g ? l = ie(() => i(s)) : (l = ie(() => i(Fo ?? (Fo = Te()))), l.f |= Fe)), I > de.size && Ci(), R && I > 0 && G(In()), !g)
|
|
2326
2326
|
if (d.set(H, de), je) {
|
|
2327
|
-
for (const [on,
|
|
2328
|
-
de.has(on) || H.skip_effect(
|
|
2327
|
+
for (const [on, Mn] of a)
|
|
2328
|
+
de.has(on) || H.skip_effect(Mn.e);
|
|
2329
2329
|
H.oncommit(b), H.ondiscard(h);
|
|
2330
2330
|
} else
|
|
2331
2331
|
b(H);
|
|
2332
2332
|
O && _e(!0), v(c);
|
|
2333
|
-
}), w = { effect:
|
|
2333
|
+
}), w = { effect: A, items: a, pending: d, outrogroups: null, fallback: l };
|
|
2334
2334
|
g = !1, R && (s = k);
|
|
2335
2335
|
}
|
|
2336
2336
|
function Wt(t) {
|
|
@@ -2338,23 +2338,23 @@ function Wt(t) {
|
|
|
2338
2338
|
t = t.next;
|
|
2339
2339
|
return t;
|
|
2340
2340
|
}
|
|
2341
|
-
function
|
|
2342
|
-
var i = e.length, s = t.items,
|
|
2343
|
-
for (
|
|
2344
|
-
if (g = e[
|
|
2341
|
+
function ks(t, e, n, o, r) {
|
|
2342
|
+
var i = e.length, s = t.items, a = Wt(t.effect.first), l, c = null, f = [], d = [], g, b, h, A;
|
|
2343
|
+
for (A = 0; A < i; A += 1) {
|
|
2344
|
+
if (g = e[A], b = r(g, A), h = /** @type {EachItem} */
|
|
2345
2345
|
s.get(b).e, t.outrogroups !== null)
|
|
2346
2346
|
for (const ne of t.outrogroups)
|
|
2347
2347
|
ne.pending.delete(h), ne.done.delete(h);
|
|
2348
2348
|
if ((h.f & Fe) !== 0)
|
|
2349
|
-
if (h.f ^= Fe, h ===
|
|
2349
|
+
if (h.f ^= Fe, h === a)
|
|
2350
2350
|
Yt(h, null, n);
|
|
2351
2351
|
else {
|
|
2352
|
-
var w = c ? c.next :
|
|
2353
|
-
h === t.effect.last && (t.effect.last = h.prev), h.prev && (h.prev.next = h.next), h.next && (h.next.prev = h.prev), Ge(t, c, h), Ge(t, h, w), Yt(h, w, n), c = h, f = [], d = [],
|
|
2352
|
+
var w = c ? c.next : a;
|
|
2353
|
+
h === t.effect.last && (t.effect.last = h.prev), h.prev && (h.prev.next = h.next), h.next && (h.next.prev = h.prev), Ge(t, c, h), Ge(t, h, w), Yt(h, w, n), c = h, f = [], d = [], a = Wt(c.next);
|
|
2354
2354
|
continue;
|
|
2355
2355
|
}
|
|
2356
|
-
if ((h.f & j) !== 0 &&
|
|
2357
|
-
if (
|
|
2356
|
+
if ((h.f & j) !== 0 && go(h), h !== a) {
|
|
2357
|
+
if (l !== void 0 && l.has(h)) {
|
|
2358
2358
|
if (f.length < d.length) {
|
|
2359
2359
|
var I = d[0], O;
|
|
2360
2360
|
c = I.prev;
|
|
@@ -2362,44 +2362,44 @@ function Ss(t, e, n, o, r) {
|
|
|
2362
2362
|
for (O = 0; O < f.length; O += 1)
|
|
2363
2363
|
Yt(f[O], I, n);
|
|
2364
2364
|
for (O = 0; O < d.length; O += 1)
|
|
2365
|
-
|
|
2366
|
-
Ge(t, fe.prev, de.next), Ge(t, c, fe), Ge(t, de, I),
|
|
2365
|
+
l.delete(d[O]);
|
|
2366
|
+
Ge(t, fe.prev, de.next), Ge(t, c, fe), Ge(t, de, I), a = I, c = de, A -= 1, f = [], d = [];
|
|
2367
2367
|
} else
|
|
2368
|
-
|
|
2368
|
+
l.delete(h), Yt(h, a, n), Ge(t, h.prev, h.next), Ge(t, h, c === null ? t.effect.first : c.next), Ge(t, c, h), c = h;
|
|
2369
2369
|
continue;
|
|
2370
2370
|
}
|
|
2371
|
-
for (f = [], d = [];
|
|
2372
|
-
(
|
|
2373
|
-
if (
|
|
2371
|
+
for (f = [], d = []; a !== null && a !== h; )
|
|
2372
|
+
(l ?? (l = /* @__PURE__ */ new Set())).add(a), d.push(a), a = Wt(a.next);
|
|
2373
|
+
if (a === null)
|
|
2374
2374
|
continue;
|
|
2375
2375
|
}
|
|
2376
|
-
(h.f & Fe) === 0 && f.push(h), c = h,
|
|
2376
|
+
(h.f & Fe) === 0 && f.push(h), c = h, a = Wt(h.next);
|
|
2377
2377
|
}
|
|
2378
2378
|
if (t.outrogroups !== null) {
|
|
2379
2379
|
for (const ne of t.outrogroups)
|
|
2380
2380
|
ne.pending.size === 0 && (no(t, En(ne.done)), t.outrogroups?.delete(ne));
|
|
2381
2381
|
t.outrogroups.size === 0 && (t.outrogroups = null);
|
|
2382
2382
|
}
|
|
2383
|
-
if (
|
|
2383
|
+
if (a !== null || l !== void 0) {
|
|
2384
2384
|
var H = [];
|
|
2385
|
-
if (
|
|
2386
|
-
for (h of
|
|
2385
|
+
if (l !== void 0)
|
|
2386
|
+
for (h of l)
|
|
2387
2387
|
(h.f & j) === 0 && H.push(h);
|
|
2388
|
-
for (;
|
|
2389
|
-
(
|
|
2388
|
+
for (; a !== null; )
|
|
2389
|
+
(a.f & j) === 0 && a !== t.fallback && H.push(a), a = Wt(a.next);
|
|
2390
2390
|
var je = H.length;
|
|
2391
2391
|
if (je > 0) {
|
|
2392
2392
|
var te = null;
|
|
2393
|
-
|
|
2393
|
+
Es(t, H, te);
|
|
2394
2394
|
}
|
|
2395
2395
|
}
|
|
2396
2396
|
}
|
|
2397
|
-
function
|
|
2398
|
-
var
|
|
2397
|
+
function Cs(t, e, n, o, r, i, s, a) {
|
|
2398
|
+
var l = (s & hi) !== 0 ? (s & vi) === 0 ? /* @__PURE__ */ Sr(n, !1, !1) : bt(n) : null, c = (s & pi) !== 0 ? bt(r) : null;
|
|
2399
2399
|
return {
|
|
2400
|
-
v:
|
|
2400
|
+
v: l,
|
|
2401
2401
|
i: c,
|
|
2402
|
-
e: ie(() => (i(e,
|
|
2402
|
+
e: ie(() => (i(e, l ?? n, c ?? r, a), () => {
|
|
2403
2403
|
t.delete(o);
|
|
2404
2404
|
}))
|
|
2405
2405
|
};
|
|
@@ -2422,7 +2422,7 @@ function Yt(t, e, n) {
|
|
|
2422
2422
|
function Ge(t, e, n) {
|
|
2423
2423
|
e === null ? t.effect.first = n : e.next = n, n === null ? t.effect.last = e : n.prev = e;
|
|
2424
2424
|
}
|
|
2425
|
-
function
|
|
2425
|
+
function Rs(t, e) {
|
|
2426
2426
|
let n = null, o = R;
|
|
2427
2427
|
var r;
|
|
2428
2428
|
if (R) {
|
|
@@ -2442,7 +2442,7 @@ function $s(t, e) {
|
|
|
2442
2442
|
}
|
|
2443
2443
|
R || (r = document.head.appendChild(Te()));
|
|
2444
2444
|
try {
|
|
2445
|
-
Ln(() => e(r),
|
|
2445
|
+
Ln(() => e(r), or | nt);
|
|
2446
2446
|
} finally {
|
|
2447
2447
|
o && (_e(!0), G(
|
|
2448
2448
|
/** @type {TemplateNode} */
|
|
@@ -2450,8 +2450,8 @@ function $s(t, e) {
|
|
|
2450
2450
|
));
|
|
2451
2451
|
}
|
|
2452
2452
|
}
|
|
2453
|
-
function
|
|
2454
|
-
|
|
2453
|
+
function Os(t, e) {
|
|
2454
|
+
Pr(() => {
|
|
2455
2455
|
var n = t.getRootNode(), o = (
|
|
2456
2456
|
/** @type {ShadowRoot} */
|
|
2457
2457
|
n.host ? (
|
|
@@ -2464,63 +2464,63 @@ function ks(t, e) {
|
|
|
2464
2464
|
)
|
|
2465
2465
|
);
|
|
2466
2466
|
if (!o.querySelector("#" + e.hash)) {
|
|
2467
|
-
const r =
|
|
2467
|
+
const r = uo("style");
|
|
2468
2468
|
r.id = e.hash, r.textContent = e.code, o.appendChild(r);
|
|
2469
2469
|
}
|
|
2470
2470
|
});
|
|
2471
2471
|
}
|
|
2472
|
-
function
|
|
2472
|
+
function Ls(t, e) {
|
|
2473
2473
|
return t == null ? null : String(t);
|
|
2474
2474
|
}
|
|
2475
|
-
function
|
|
2475
|
+
function zo(t, e, n, o) {
|
|
2476
2476
|
var r = t.__style;
|
|
2477
2477
|
if (R || r !== e) {
|
|
2478
|
-
var i =
|
|
2478
|
+
var i = Ls(e);
|
|
2479
2479
|
(!R || i !== t.getAttribute("style")) && (i == null ? t.removeAttribute("style") : t.style.cssText = i), t.__style = e;
|
|
2480
2480
|
}
|
|
2481
2481
|
return o;
|
|
2482
2482
|
}
|
|
2483
|
-
const
|
|
2484
|
-
function
|
|
2485
|
-
var r =
|
|
2486
|
-
R && (r[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName ===
|
|
2483
|
+
const Ps = /* @__PURE__ */ Symbol("is custom element"), xs = /* @__PURE__ */ Symbol("is html"), Ms = $i ? "link" : "LINK";
|
|
2484
|
+
function Ho(t, e, n, o) {
|
|
2485
|
+
var r = Ns(t);
|
|
2486
|
+
R && (r[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === Ms) || r[e] !== (r[e] = n) && (e === "loading" && (t[Ei] = n), n == null ? t.removeAttribute(e) : typeof n != "string" && Ds(t).includes(e) ? t[e] = n : t.setAttribute(e, n));
|
|
2487
2487
|
}
|
|
2488
|
-
function
|
|
2488
|
+
function Ns(t) {
|
|
2489
2489
|
return (
|
|
2490
2490
|
/** @type {Record<string | symbol, unknown>} **/
|
|
2491
2491
|
// @ts-expect-error
|
|
2492
2492
|
t.__attributes ?? (t.__attributes = {
|
|
2493
|
-
[
|
|
2494
|
-
[
|
|
2493
|
+
[Ps]: t.nodeName.includes("-"),
|
|
2494
|
+
[xs]: t.namespaceURI === Zo
|
|
2495
2495
|
})
|
|
2496
2496
|
);
|
|
2497
2497
|
}
|
|
2498
|
-
var
|
|
2499
|
-
function
|
|
2500
|
-
var e = t.getAttribute("is") || t.nodeName, n =
|
|
2498
|
+
var Bo = /* @__PURE__ */ new Map();
|
|
2499
|
+
function Ds(t) {
|
|
2500
|
+
var e = t.getAttribute("is") || t.nodeName, n = Bo.get(e);
|
|
2501
2501
|
if (n) return n;
|
|
2502
|
-
|
|
2502
|
+
Bo.set(e, n = []);
|
|
2503
2503
|
for (var o, r = t, i = Element.prototype; i !== r; ) {
|
|
2504
|
-
o =
|
|
2504
|
+
o = _i(r);
|
|
2505
2505
|
for (var s in o)
|
|
2506
2506
|
o[s].set && n.push(s);
|
|
2507
|
-
r =
|
|
2507
|
+
r = tr(r);
|
|
2508
2508
|
}
|
|
2509
2509
|
return n;
|
|
2510
2510
|
}
|
|
2511
|
-
function
|
|
2511
|
+
function jo(t, e) {
|
|
2512
2512
|
return t === e || t?.[hn] === e;
|
|
2513
2513
|
}
|
|
2514
|
-
function
|
|
2515
|
-
return
|
|
2514
|
+
function qo(t = {}, e, n, o) {
|
|
2515
|
+
return Pr(() => {
|
|
2516
2516
|
var r, i;
|
|
2517
|
-
return
|
|
2518
|
-
r = i, i = [],
|
|
2519
|
-
t !== n(...i) && (e(t, ...i), r &&
|
|
2517
|
+
return po(() => {
|
|
2518
|
+
r = i, i = [], Gr(() => {
|
|
2519
|
+
t !== n(...i) && (e(t, ...i), r && jo(n(...r), t) && e(null, ...r));
|
|
2520
2520
|
});
|
|
2521
2521
|
}), () => {
|
|
2522
2522
|
pt(() => {
|
|
2523
|
-
i &&
|
|
2523
|
+
i && jo(n(...i), t) && e(null, ...i);
|
|
2524
2524
|
});
|
|
2525
2525
|
};
|
|
2526
2526
|
}), t;
|
|
@@ -2530,18 +2530,18 @@ function zn(t, e, n, o) {
|
|
|
2530
2530
|
/** @type {V} */
|
|
2531
2531
|
o
|
|
2532
2532
|
), i = !0, s = () => (i && (i = !1, r = /** @type {V} */
|
|
2533
|
-
o), r),
|
|
2534
|
-
|
|
2535
|
-
t[e],
|
|
2536
|
-
var
|
|
2537
|
-
|
|
2533
|
+
o), r), a;
|
|
2534
|
+
a = /** @type {V} */
|
|
2535
|
+
t[e], a === void 0 && o !== void 0 && (a = s());
|
|
2536
|
+
var l;
|
|
2537
|
+
l = () => {
|
|
2538
2538
|
var g = (
|
|
2539
2539
|
/** @type {V} */
|
|
2540
2540
|
t[e]
|
|
2541
2541
|
);
|
|
2542
2542
|
return g === void 0 ? s() : (i = !0, g);
|
|
2543
2543
|
};
|
|
2544
|
-
var c = !1, f = /* @__PURE__ */ On(() => (c = !1,
|
|
2544
|
+
var c = !1, f = /* @__PURE__ */ On(() => (c = !1, l())), d = (
|
|
2545
2545
|
/** @type {Effect} */
|
|
2546
2546
|
E
|
|
2547
2547
|
);
|
|
@@ -2556,11 +2556,11 @@ function zn(t, e, n, o) {
|
|
|
2556
2556
|
})
|
|
2557
2557
|
);
|
|
2558
2558
|
}
|
|
2559
|
-
function
|
|
2560
|
-
return new
|
|
2559
|
+
function Vs(t) {
|
|
2560
|
+
return new Fs(t);
|
|
2561
2561
|
}
|
|
2562
2562
|
var Ve, re;
|
|
2563
|
-
class
|
|
2563
|
+
class Fs {
|
|
2564
2564
|
/**
|
|
2565
2565
|
* @param {ComponentConstructorOptions & {
|
|
2566
2566
|
* component: any;
|
|
@@ -2572,8 +2572,8 @@ class Ms {
|
|
|
2572
2572
|
/** @type {Record<string, any>} */
|
|
2573
2573
|
T(this, re);
|
|
2574
2574
|
var n = /* @__PURE__ */ new Map(), o = (i, s) => {
|
|
2575
|
-
var
|
|
2576
|
-
return n.set(i,
|
|
2575
|
+
var a = /* @__PURE__ */ Sr(s, !1, !1);
|
|
2576
|
+
return n.set(i, a), a;
|
|
2577
2577
|
};
|
|
2578
2578
|
const r = new Proxy(
|
|
2579
2579
|
{ ...e.props || {}, $$events: {} },
|
|
@@ -2582,14 +2582,14 @@ class Ms {
|
|
|
2582
2582
|
return v(n.get(s) ?? o(s, Reflect.get(i, s)));
|
|
2583
2583
|
},
|
|
2584
2584
|
has(i, s) {
|
|
2585
|
-
return s ===
|
|
2585
|
+
return s === Ai ? !0 : (v(n.get(s) ?? o(s, Reflect.get(i, s))), Reflect.has(i, s));
|
|
2586
2586
|
},
|
|
2587
|
-
set(i, s,
|
|
2588
|
-
return $(n.get(s) ?? o(s,
|
|
2587
|
+
set(i, s, a) {
|
|
2588
|
+
return $(n.get(s) ?? o(s, a), a), Reflect.set(i, s, a);
|
|
2589
2589
|
}
|
|
2590
2590
|
}
|
|
2591
2591
|
);
|
|
2592
|
-
y(this, re, (e.hydrate ?
|
|
2592
|
+
y(this, re, (e.hydrate ? Ts : Wr)(e.component, {
|
|
2593
2593
|
target: e.target,
|
|
2594
2594
|
anchor: e.anchor,
|
|
2595
2595
|
props: r,
|
|
@@ -2613,7 +2613,7 @@ class Ms {
|
|
|
2613
2613
|
(i) => {
|
|
2614
2614
|
Object.assign(r, i);
|
|
2615
2615
|
}, u(this, re).$destroy = () => {
|
|
2616
|
-
|
|
2616
|
+
Is(u(this, re));
|
|
2617
2617
|
};
|
|
2618
2618
|
}
|
|
2619
2619
|
/** @param {Record<string, any>} props */
|
|
@@ -2640,8 +2640,8 @@ class Ms {
|
|
|
2640
2640
|
}
|
|
2641
2641
|
}
|
|
2642
2642
|
Ve = new WeakMap(), re = new WeakMap();
|
|
2643
|
-
let
|
|
2644
|
-
typeof HTMLElement == "function" && (
|
|
2643
|
+
let Yr;
|
|
2644
|
+
typeof HTMLElement == "function" && (Yr = class extends HTMLElement {
|
|
2645
2645
|
/**
|
|
2646
2646
|
* @param {*} $$componentCtor
|
|
2647
2647
|
* @param {*} $$slots
|
|
@@ -2700,13 +2700,13 @@ typeof HTMLElement == "function" && (Kr = class extends HTMLElement {
|
|
|
2700
2700
|
if (this.$$cn = !0, !this.$$c) {
|
|
2701
2701
|
let e = function(r) {
|
|
2702
2702
|
return (i) => {
|
|
2703
|
-
const s =
|
|
2703
|
+
const s = uo("slot");
|
|
2704
2704
|
r !== "default" && (s.name = r), xe(i, s);
|
|
2705
2705
|
};
|
|
2706
2706
|
};
|
|
2707
2707
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2708
2708
|
return;
|
|
2709
|
-
const n = {}, o =
|
|
2709
|
+
const n = {}, o = zs(this);
|
|
2710
2710
|
for (const r of this.$$s)
|
|
2711
2711
|
r in o && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), n.default = !0) : n[r] = e(r));
|
|
2712
2712
|
for (const r of this.attributes) {
|
|
@@ -2715,7 +2715,7 @@ typeof HTMLElement == "function" && (Kr = class extends HTMLElement {
|
|
|
2715
2715
|
}
|
|
2716
2716
|
for (const r in this.$$p_d)
|
|
2717
2717
|
!(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
|
|
2718
|
-
this.$$c =
|
|
2718
|
+
this.$$c = Vs({
|
|
2719
2719
|
component: this.$$ctor,
|
|
2720
2720
|
target: this.$$shadowRoot || this,
|
|
2721
2721
|
props: {
|
|
@@ -2723,8 +2723,8 @@ typeof HTMLElement == "function" && (Kr = class extends HTMLElement {
|
|
|
2723
2723
|
$$slots: n,
|
|
2724
2724
|
$$host: this
|
|
2725
2725
|
}
|
|
2726
|
-
}), this.$$me =
|
|
2727
|
-
|
|
2726
|
+
}), this.$$me = cs(() => {
|
|
2727
|
+
po(() => {
|
|
2728
2728
|
this.$$r = !0;
|
|
2729
2729
|
for (const r of wn(this.$$c)) {
|
|
2730
2730
|
if (!this.$$p_d[r]?.reflect) continue;
|
|
@@ -2802,7 +2802,7 @@ function _n(t, e, n, o) {
|
|
|
2802
2802
|
return e;
|
|
2803
2803
|
}
|
|
2804
2804
|
}
|
|
2805
|
-
function
|
|
2805
|
+
function zs(t) {
|
|
2806
2806
|
const e = {};
|
|
2807
2807
|
return t.childNodes.forEach((n) => {
|
|
2808
2808
|
e[
|
|
@@ -2811,41 +2811,41 @@ function Ds(t) {
|
|
|
2811
2811
|
] = !0;
|
|
2812
2812
|
}), e;
|
|
2813
2813
|
}
|
|
2814
|
-
function
|
|
2815
|
-
let s = class extends
|
|
2814
|
+
function Hs(t, e, n, o, r, i) {
|
|
2815
|
+
let s = class extends Yr {
|
|
2816
2816
|
constructor() {
|
|
2817
2817
|
super(t, n, r), this.$$p_d = e;
|
|
2818
2818
|
}
|
|
2819
2819
|
static get observedAttributes() {
|
|
2820
2820
|
return wn(e).map(
|
|
2821
|
-
(
|
|
2821
|
+
(a) => (e[a].attribute || a).toLowerCase()
|
|
2822
2822
|
);
|
|
2823
2823
|
}
|
|
2824
2824
|
};
|
|
2825
|
-
return wn(e).forEach((
|
|
2826
|
-
Tn(s.prototype,
|
|
2825
|
+
return wn(e).forEach((a) => {
|
|
2826
|
+
Tn(s.prototype, a, {
|
|
2827
2827
|
get() {
|
|
2828
|
-
return this.$$c &&
|
|
2828
|
+
return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
|
|
2829
2829
|
},
|
|
2830
|
-
set(
|
|
2831
|
-
|
|
2830
|
+
set(l) {
|
|
2831
|
+
l = _n(a, l, e), this.$$d[a] = l;
|
|
2832
2832
|
var c = this.$$c;
|
|
2833
2833
|
if (c) {
|
|
2834
|
-
var f = It(c,
|
|
2835
|
-
f ? c[
|
|
2834
|
+
var f = It(c, a)?.get;
|
|
2835
|
+
f ? c[a] = l : c.$set({ [a]: l });
|
|
2836
2836
|
}
|
|
2837
2837
|
}
|
|
2838
2838
|
});
|
|
2839
|
-
}), o.forEach((
|
|
2840
|
-
Tn(s.prototype,
|
|
2839
|
+
}), o.forEach((a) => {
|
|
2840
|
+
Tn(s.prototype, a, {
|
|
2841
2841
|
get() {
|
|
2842
|
-
return this.$$c?.[
|
|
2842
|
+
return this.$$c?.[a];
|
|
2843
2843
|
}
|
|
2844
2844
|
});
|
|
2845
2845
|
}), t.element = /** @type {any} */
|
|
2846
2846
|
s, s;
|
|
2847
2847
|
}
|
|
2848
|
-
class
|
|
2848
|
+
class Bs extends Event {
|
|
2849
2849
|
constructor(n, o, r, i) {
|
|
2850
2850
|
super("context-request", { bubbles: !0, composed: !0 });
|
|
2851
2851
|
m(this, "context");
|
|
@@ -2855,7 +2855,7 @@ class Fs extends Event {
|
|
|
2855
2855
|
this.context = n, this.contextTarget = o, this.callback = r, this.subscribe = i ?? !1;
|
|
2856
2856
|
}
|
|
2857
2857
|
}
|
|
2858
|
-
class
|
|
2858
|
+
class js {
|
|
2859
2859
|
constructor(e, n) {
|
|
2860
2860
|
m(this, "host");
|
|
2861
2861
|
m(this, "context");
|
|
@@ -2879,13 +2879,13 @@ class zs {
|
|
|
2879
2879
|
return this.currentValue;
|
|
2880
2880
|
}
|
|
2881
2881
|
requestValue() {
|
|
2882
|
-
this.host.dispatchEvent(new
|
|
2882
|
+
this.host.dispatchEvent(new Bs(this.context, this.host, this.handleValue, this.subscribe));
|
|
2883
2883
|
}
|
|
2884
2884
|
}
|
|
2885
|
-
const
|
|
2886
|
-
function
|
|
2885
|
+
const Xr = (t) => t, qs = Xr(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), Gs = Xr(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
|
|
2886
|
+
function Jr(t, e, n) {
|
|
2887
2887
|
let o = !1;
|
|
2888
|
-
const r = new
|
|
2888
|
+
const r = new js(t, {
|
|
2889
2889
|
context: e,
|
|
2890
2890
|
subscribe: !0,
|
|
2891
2891
|
onValue: (c) => {
|
|
@@ -2898,40 +2898,40 @@ function Xr(t, e, n) {
|
|
|
2898
2898
|
};
|
|
2899
2899
|
t.addEventListener("context-provider", i);
|
|
2900
2900
|
let s = 0;
|
|
2901
|
-
const
|
|
2902
|
-
if (o || s >=
|
|
2903
|
-
globalThis.clearInterval(
|
|
2901
|
+
const a = 200, l = globalThis.setInterval(() => {
|
|
2902
|
+
if (o || s >= a) {
|
|
2903
|
+
globalThis.clearInterval(l);
|
|
2904
2904
|
return;
|
|
2905
2905
|
}
|
|
2906
2906
|
s += 1, r.requestValue();
|
|
2907
2907
|
}, 50);
|
|
2908
2908
|
return () => {
|
|
2909
|
-
globalThis.clearInterval(
|
|
2909
|
+
globalThis.clearInterval(l), t.removeEventListener("context-provider", i), r.disconnect();
|
|
2910
2910
|
};
|
|
2911
2911
|
}
|
|
2912
|
-
function
|
|
2913
|
-
return
|
|
2912
|
+
function Us(t, e) {
|
|
2913
|
+
return Jr(t, qs, e);
|
|
2914
2914
|
}
|
|
2915
|
-
function
|
|
2916
|
-
return
|
|
2915
|
+
function Ws(t, e) {
|
|
2916
|
+
return Jr(t, Gs, e);
|
|
2917
2917
|
}
|
|
2918
|
-
var
|
|
2918
|
+
var Go;
|
|
2919
2919
|
(function(t) {
|
|
2920
2920
|
t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
|
|
2921
|
-
})(
|
|
2921
|
+
})(Go || (Go = {}));
|
|
2922
2922
|
var Ue;
|
|
2923
2923
|
(function(t) {
|
|
2924
2924
|
t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
|
|
2925
2925
|
})(Ue || (Ue = {}));
|
|
2926
|
-
const
|
|
2926
|
+
const Ks = {
|
|
2927
2927
|
tts: "textToSpeech",
|
|
2928
2928
|
colorScheme: "theme"
|
|
2929
2929
|
};
|
|
2930
|
-
function
|
|
2930
|
+
function Ys(t) {
|
|
2931
2931
|
const e = t.trim();
|
|
2932
|
-
return e ?
|
|
2932
|
+
return e ? Ks[e] || e : "";
|
|
2933
2933
|
}
|
|
2934
|
-
const
|
|
2934
|
+
const Xs = [
|
|
2935
2935
|
"assessment",
|
|
2936
2936
|
"section",
|
|
2937
2937
|
"item",
|
|
@@ -2943,12 +2943,12 @@ function yn(t, e) {
|
|
|
2943
2943
|
if (typeof t != "string" || t.trim().length === 0)
|
|
2944
2944
|
throw new Error(`Invalid tool registration: "${e}" must be a non-empty string.`);
|
|
2945
2945
|
}
|
|
2946
|
-
function
|
|
2946
|
+
function Uo(t) {
|
|
2947
2947
|
if (yn(t.toolId, "toolId"), yn(t.name, "name"), yn(t.description, "description"), typeof t.icon != "string" && typeof t.icon != "function")
|
|
2948
2948
|
throw new Error(`Invalid tool registration "${t.toolId}": "icon" must be a string or function.`);
|
|
2949
2949
|
if (!Array.isArray(t.supportedLevels) || t.supportedLevels.length === 0)
|
|
2950
2950
|
throw new Error(`Invalid tool registration "${t.toolId}": "supportedLevels" must be a non-empty array.`);
|
|
2951
|
-
const e = t.supportedLevels.find((n) => !
|
|
2951
|
+
const e = t.supportedLevels.find((n) => !Xs.includes(n));
|
|
2952
2952
|
if (e)
|
|
2953
2953
|
throw new Error(`Invalid tool registration "${t.toolId}": unsupported level "${e}".`);
|
|
2954
2954
|
if (t.activation !== void 0 && t.activation !== "toolbar-toggle" && t.activation !== "selection-gateway")
|
|
@@ -2964,7 +2964,7 @@ function Go(t) {
|
|
|
2964
2964
|
if (typeof t.renderToolbar != "function")
|
|
2965
2965
|
throw new Error(`Invalid tool registration "${t.toolId}": "renderToolbar" must be a function.`);
|
|
2966
2966
|
}
|
|
2967
|
-
class
|
|
2967
|
+
class Js {
|
|
2968
2968
|
constructor() {
|
|
2969
2969
|
m(this, "tools", /* @__PURE__ */ new Map());
|
|
2970
2970
|
m(this, "pnpIndex", /* @__PURE__ */ new Map());
|
|
@@ -2978,7 +2978,7 @@ class Ks {
|
|
|
2978
2978
|
* Normalize a single tool alias to canonical toolId.
|
|
2979
2979
|
*/
|
|
2980
2980
|
normalizeToolId(e) {
|
|
2981
|
-
return
|
|
2981
|
+
return Ys(e);
|
|
2982
2982
|
}
|
|
2983
2983
|
/**
|
|
2984
2984
|
* Normalize a list of tool aliases to canonical toolIds.
|
|
@@ -2993,7 +2993,7 @@ class Ks {
|
|
|
2993
2993
|
* @throws Error if toolId is already registered
|
|
2994
2994
|
*/
|
|
2995
2995
|
register(e) {
|
|
2996
|
-
if (
|
|
2996
|
+
if (Uo(e), this.tools.has(e.toolId))
|
|
2997
2997
|
throw new Error(`Tool '${e.toolId}' is already registered`);
|
|
2998
2998
|
if (this.tools.set(e.toolId, e), e.pnpSupportIds)
|
|
2999
2999
|
for (const n of e.pnpSupportIds)
|
|
@@ -3005,7 +3005,7 @@ class Ks {
|
|
|
3005
3005
|
* @param registration - New tool registration (must have existing toolId)
|
|
3006
3006
|
*/
|
|
3007
3007
|
override(e) {
|
|
3008
|
-
if (
|
|
3008
|
+
if (Uo(e), !this.tools.has(e.toolId))
|
|
3009
3009
|
throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
|
|
3010
3010
|
const n = this.tools.get(e.toolId);
|
|
3011
3011
|
if (n.pnpSupportIds)
|
|
@@ -3238,30 +3238,30 @@ class Ks {
|
|
|
3238
3238
|
return r.renderToolbar(n, i);
|
|
3239
3239
|
}
|
|
3240
3240
|
}
|
|
3241
|
-
function
|
|
3241
|
+
function Qr(t) {
|
|
3242
3242
|
return t.level === "item";
|
|
3243
3243
|
}
|
|
3244
|
-
function
|
|
3244
|
+
function Qs(t) {
|
|
3245
3245
|
return t.level === "passage";
|
|
3246
3246
|
}
|
|
3247
|
-
function
|
|
3247
|
+
function Zs(t) {
|
|
3248
3248
|
return t.level === "rubric";
|
|
3249
3249
|
}
|
|
3250
|
-
function
|
|
3250
|
+
function Zr(t) {
|
|
3251
3251
|
return t.level === "element";
|
|
3252
3252
|
}
|
|
3253
|
-
function
|
|
3254
|
-
if (
|
|
3253
|
+
function bo(t) {
|
|
3254
|
+
if (Zr(t)) {
|
|
3255
3255
|
const e = t.item.config;
|
|
3256
3256
|
if (!e)
|
|
3257
3257
|
return "";
|
|
3258
|
-
const n = [], o = (
|
|
3258
|
+
const n = [], o = (l) => l.replace(/<[^>]*>/g, " ").trim(), r = e.elements?.[t.elementId];
|
|
3259
3259
|
r && typeof r == "string" && n.push(o(r));
|
|
3260
|
-
const i = e.models,
|
|
3261
|
-
if (
|
|
3262
|
-
for (const
|
|
3263
|
-
if (typeof
|
|
3264
|
-
for (const c of
|
|
3260
|
+
const i = e.models, a = (Array.isArray(i) ? i : i && typeof i == "object" ? Object.values(i) : []).find((l) => l && typeof l == "object" && l.id === t.elementId);
|
|
3261
|
+
if (a) {
|
|
3262
|
+
for (const l of Object.values(a))
|
|
3263
|
+
if (typeof l == "string" && n.push(o(l)), Array.isArray(l)) {
|
|
3264
|
+
for (const c of l)
|
|
3265
3265
|
if (c && typeof c == "object")
|
|
3266
3266
|
for (const f of Object.values(c))
|
|
3267
3267
|
typeof f == "string" && n.push(o(f));
|
|
@@ -3269,20 +3269,20 @@ function mo(t) {
|
|
|
3269
3269
|
}
|
|
3270
3270
|
return n.filter(Boolean).join(" ").trim();
|
|
3271
3271
|
}
|
|
3272
|
-
if (
|
|
3272
|
+
if (Qr(t)) {
|
|
3273
3273
|
const e = t.item;
|
|
3274
3274
|
if (!e?.config)
|
|
3275
3275
|
return "";
|
|
3276
|
-
const n = e.config, o = [], r = (
|
|
3276
|
+
const n = e.config, o = [], r = (l) => l.replace(/<[^>]*>/g, " ").trim();
|
|
3277
3277
|
typeof n.markup == "string" && o.push(r(n.markup));
|
|
3278
3278
|
const i = n.elements;
|
|
3279
3279
|
if (i && typeof i == "object")
|
|
3280
|
-
for (const
|
|
3281
|
-
typeof
|
|
3282
|
-
const s = n.models,
|
|
3283
|
-
for (const
|
|
3284
|
-
if (!(!
|
|
3285
|
-
for (const c of Object.values(
|
|
3280
|
+
for (const l of Object.values(i))
|
|
3281
|
+
typeof l == "string" && o.push(r(l));
|
|
3282
|
+
const s = n.models, a = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
|
|
3283
|
+
for (const l of a)
|
|
3284
|
+
if (!(!l || typeof l != "object")) {
|
|
3285
|
+
for (const c of Object.values(l))
|
|
3286
3286
|
if (typeof c == "string" && o.push(r(c)), Array.isArray(c)) {
|
|
3287
3287
|
for (const f of c)
|
|
3288
3288
|
if (f && typeof f == "object")
|
|
@@ -3292,20 +3292,20 @@ function mo(t) {
|
|
|
3292
3292
|
}
|
|
3293
3293
|
return o.filter(Boolean).join(" ").trim();
|
|
3294
3294
|
}
|
|
3295
|
-
if (
|
|
3295
|
+
if (Qs(t)) {
|
|
3296
3296
|
const e = t.passage;
|
|
3297
3297
|
if (!e?.config)
|
|
3298
3298
|
return "";
|
|
3299
|
-
const n = e.config, o = [], r = (
|
|
3299
|
+
const n = e.config, o = [], r = (l) => l.replace(/<[^>]*>/g, " ").trim();
|
|
3300
3300
|
typeof n.markup == "string" && o.push(r(n.markup)), typeof n.content == "string" && o.push(r(n.content)), typeof n.prompt == "string" && o.push(r(n.prompt));
|
|
3301
3301
|
const i = n.elements;
|
|
3302
3302
|
if (i && typeof i == "object")
|
|
3303
|
-
for (const
|
|
3304
|
-
typeof
|
|
3305
|
-
const s = n.models,
|
|
3306
|
-
for (const
|
|
3307
|
-
if (!(!
|
|
3308
|
-
for (const c of Object.values(
|
|
3303
|
+
for (const l of Object.values(i))
|
|
3304
|
+
typeof l == "string" && o.push(r(l));
|
|
3305
|
+
const s = n.models, a = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
|
|
3306
|
+
for (const l of a)
|
|
3307
|
+
if (!(!l || typeof l != "object")) {
|
|
3308
|
+
for (const c of Object.values(l))
|
|
3309
3309
|
if (typeof c == "string" && o.push(r(c)), Array.isArray(c)) {
|
|
3310
3310
|
for (const f of c)
|
|
3311
3311
|
if (f && typeof f == "object")
|
|
@@ -3315,14 +3315,14 @@ function mo(t) {
|
|
|
3315
3315
|
}
|
|
3316
3316
|
return o.filter(Boolean).join(" ").trim();
|
|
3317
3317
|
}
|
|
3318
|
-
if (
|
|
3318
|
+
if (Zs(t)) {
|
|
3319
3319
|
const e = t.rubricBlock;
|
|
3320
3320
|
return e.passage?.config ? (e.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (e.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
3321
3321
|
}
|
|
3322
3322
|
return "";
|
|
3323
3323
|
}
|
|
3324
3324
|
function Pn(t) {
|
|
3325
|
-
const e =
|
|
3325
|
+
const e = bo(t);
|
|
3326
3326
|
return [
|
|
3327
3327
|
/<math[>\s]/i,
|
|
3328
3328
|
// MathML
|
|
@@ -3338,7 +3338,7 @@ function Pn(t) {
|
|
|
3338
3338
|
// Simple arithmetic
|
|
3339
3339
|
].some((o) => o.test(e));
|
|
3340
3340
|
}
|
|
3341
|
-
function
|
|
3341
|
+
function el(t) {
|
|
3342
3342
|
const e = [
|
|
3343
3343
|
"pie-multiple-choice",
|
|
3344
3344
|
"pie-inline-choice",
|
|
@@ -3347,7 +3347,7 @@ function Js(t) {
|
|
|
3347
3347
|
"inline-choice",
|
|
3348
3348
|
"select-text"
|
|
3349
3349
|
];
|
|
3350
|
-
if (
|
|
3350
|
+
if (Zr(t)) {
|
|
3351
3351
|
const n = t.item.config;
|
|
3352
3352
|
if (!n?.models)
|
|
3353
3353
|
return !1;
|
|
@@ -3357,7 +3357,7 @@ function Js(t) {
|
|
|
3357
3357
|
const i = r.element || "";
|
|
3358
3358
|
return e.includes(i);
|
|
3359
3359
|
}
|
|
3360
|
-
if (
|
|
3360
|
+
if (Qr(t)) {
|
|
3361
3361
|
const n = t.item.config?.models;
|
|
3362
3362
|
return (Array.isArray(n) ? n : n && typeof n == "object" ? Object.values(n) : []).some((r) => {
|
|
3363
3363
|
if (!r || typeof r != "object")
|
|
@@ -3369,10 +3369,10 @@ function Js(t) {
|
|
|
3369
3369
|
return !1;
|
|
3370
3370
|
}
|
|
3371
3371
|
function xn(t) {
|
|
3372
|
-
return
|
|
3372
|
+
return bo(t).trim().length >= 10;
|
|
3373
3373
|
}
|
|
3374
|
-
function
|
|
3375
|
-
const e =
|
|
3374
|
+
function tl(t) {
|
|
3375
|
+
const e = bo(t);
|
|
3376
3376
|
return [
|
|
3377
3377
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
3378
3378
|
/periodic\s+table/i,
|
|
@@ -3384,25 +3384,25 @@ function Qs(t) {
|
|
|
3384
3384
|
/physics|force|energy|velocity|acceleration/i
|
|
3385
3385
|
].some((o) => o.test(e));
|
|
3386
3386
|
}
|
|
3387
|
-
const
|
|
3387
|
+
const nl = [
|
|
3388
3388
|
"assessment",
|
|
3389
3389
|
"section",
|
|
3390
3390
|
"item",
|
|
3391
3391
|
"passage",
|
|
3392
3392
|
"rubric"
|
|
3393
|
-
],
|
|
3394
|
-
function
|
|
3395
|
-
return
|
|
3393
|
+
], ol = new Set(nl);
|
|
3394
|
+
function rl(t) {
|
|
3395
|
+
return ol.has(t);
|
|
3396
3396
|
}
|
|
3397
|
-
function
|
|
3397
|
+
function _o(t, e, n) {
|
|
3398
3398
|
const o = t.trim(), r = n.trim();
|
|
3399
3399
|
if (!o || !r)
|
|
3400
3400
|
throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
3401
|
-
if (!
|
|
3401
|
+
if (!rl(e))
|
|
3402
3402
|
throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
|
|
3403
3403
|
return `${o}:${e}:${r}`;
|
|
3404
3404
|
}
|
|
3405
|
-
class
|
|
3405
|
+
class il {
|
|
3406
3406
|
constructor() {
|
|
3407
3407
|
m(this, "providerId", "desmos-calculator");
|
|
3408
3408
|
m(this, "providerName", "Desmos Calculator");
|
|
@@ -3488,7 +3488,33 @@ class nl {
|
|
|
3488
3488
|
this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
|
|
3489
3489
|
}
|
|
3490
3490
|
}
|
|
3491
|
-
|
|
3491
|
+
const sl = (t, e) => {
|
|
3492
|
+
const n = e?.useSentenceSegmenter !== !1;
|
|
3493
|
+
try {
|
|
3494
|
+
if (!n)
|
|
3495
|
+
throw new Error("Segmenter disabled by policy");
|
|
3496
|
+
const a = globalThis.Intl?.Segmenter;
|
|
3497
|
+
if (typeof a == "function") {
|
|
3498
|
+
const l = new a(e?.locale, {
|
|
3499
|
+
granularity: "sentence"
|
|
3500
|
+
}), c = Array.from(l.segment(t)).map((f) => ({
|
|
3501
|
+
text: f.segment,
|
|
3502
|
+
offset: f.index
|
|
3503
|
+
})).filter((f) => f.text.trim().length > 0);
|
|
3504
|
+
if (c.length > 0)
|
|
3505
|
+
return c;
|
|
3506
|
+
}
|
|
3507
|
+
} catch {
|
|
3508
|
+
}
|
|
3509
|
+
const o = /[^.!?]+(?:[.!?]+|$)/g, r = t.match(o) || [t], i = [];
|
|
3510
|
+
let s = 0;
|
|
3511
|
+
for (const a of r) {
|
|
3512
|
+
const l = t.indexOf(a, s);
|
|
3513
|
+
l !== -1 && (i.push({ text: a, offset: l }), s = l + a.length);
|
|
3514
|
+
}
|
|
3515
|
+
return i.length > 0 ? i : [{ text: t, offset: 0 }];
|
|
3516
|
+
};
|
|
3517
|
+
class ll {
|
|
3492
3518
|
constructor() {
|
|
3493
3519
|
m(this, "providerId", "browser");
|
|
3494
3520
|
m(this, "providerName", "Browser Speech Synthesis");
|
|
@@ -3499,7 +3525,7 @@ class ol {
|
|
|
3499
3525
|
throw new Error("BrowserTTSProvider requires browser environment");
|
|
3500
3526
|
if (!("speechSynthesis" in window))
|
|
3501
3527
|
throw new Error("Browser does not support Speech Synthesis API");
|
|
3502
|
-
return new
|
|
3528
|
+
return new al(e);
|
|
3503
3529
|
}
|
|
3504
3530
|
supportsFeature(e) {
|
|
3505
3531
|
return !0;
|
|
@@ -3517,7 +3543,7 @@ class ol {
|
|
|
3517
3543
|
destroy() {
|
|
3518
3544
|
}
|
|
3519
3545
|
}
|
|
3520
|
-
class
|
|
3546
|
+
class al {
|
|
3521
3547
|
constructor(e) {
|
|
3522
3548
|
m(this, "utterance", null);
|
|
3523
3549
|
m(this, "config", null);
|
|
@@ -3561,17 +3587,17 @@ class rl {
|
|
|
3561
3587
|
return [{ text: e, offset: 0 }];
|
|
3562
3588
|
const o = this.segmentSentences(e), r = [];
|
|
3563
3589
|
let i = "", s = 0;
|
|
3564
|
-
for (const
|
|
3565
|
-
const
|
|
3566
|
-
if (!
|
|
3590
|
+
for (const a of o) {
|
|
3591
|
+
const l = a.text.trim();
|
|
3592
|
+
if (!l)
|
|
3567
3593
|
continue;
|
|
3568
|
-
const c =
|
|
3594
|
+
const c = a.text.search(/\S/), f = a.offset + (c === -1 ? 0 : c);
|
|
3569
3595
|
if (!i) {
|
|
3570
|
-
i =
|
|
3596
|
+
i = l, s = f;
|
|
3571
3597
|
continue;
|
|
3572
3598
|
}
|
|
3573
|
-
const d = `${i} ${
|
|
3574
|
-
d.length <= 260 ? i = d : (r.push({ text: i, offset: s }), i =
|
|
3599
|
+
const d = `${i} ${l}`;
|
|
3600
|
+
d.length <= 260 ? i = d : (r.push({ text: i, offset: s }), i = l, s = f);
|
|
3575
3601
|
}
|
|
3576
3602
|
return i && r.push({ text: i, offset: s }), r.length ? r : [{ text: e, offset: 0 }];
|
|
3577
3603
|
}
|
|
@@ -3587,30 +3613,11 @@ class rl {
|
|
|
3587
3613
|
};
|
|
3588
3614
|
}
|
|
3589
3615
|
segmentSentences(e) {
|
|
3590
|
-
|
|
3591
|
-
|
|
3592
|
-
|
|
3593
|
-
|
|
3594
|
-
|
|
3595
|
-
if (typeof l == "function") {
|
|
3596
|
-
const a = new l(s.locale, {
|
|
3597
|
-
granularity: "sentence"
|
|
3598
|
-
}), f = Array.from(a.segment(e)).map((d) => ({
|
|
3599
|
-
text: d.segment,
|
|
3600
|
-
offset: d.index
|
|
3601
|
-
})).filter((d) => d.text.trim().length > 0);
|
|
3602
|
-
if (f.length > 0)
|
|
3603
|
-
return f;
|
|
3604
|
-
}
|
|
3605
|
-
} catch {
|
|
3606
|
-
}
|
|
3607
|
-
const n = /[^.!?]+(?:[.!?]+|$)/g, o = e.match(n) || [e], r = [];
|
|
3608
|
-
let i = 0;
|
|
3609
|
-
for (const s of o) {
|
|
3610
|
-
const l = e.indexOf(s, i);
|
|
3611
|
-
l !== -1 && (r.push({ text: s, offset: l }), i = l + s.length);
|
|
3612
|
-
}
|
|
3613
|
-
return r.length > 0 ? r : [{ text: e, offset: 0 }];
|
|
3616
|
+
const n = this.getSegmentationPolicy();
|
|
3617
|
+
return sl(e, {
|
|
3618
|
+
locale: n.locale,
|
|
3619
|
+
useSentenceSegmenter: n.useSentenceSegmenter
|
|
3620
|
+
});
|
|
3614
3621
|
}
|
|
3615
3622
|
inferWordLength(e, n) {
|
|
3616
3623
|
const o = Math.max(0, Math.min(n, Math.max(0, e.length - 1)));
|
|
@@ -3623,8 +3630,8 @@ class rl {
|
|
|
3623
3630
|
return;
|
|
3624
3631
|
}
|
|
3625
3632
|
if (this.utterance = new SpeechSynthesisUtterance(e), this.config?.voice) {
|
|
3626
|
-
const
|
|
3627
|
-
|
|
3633
|
+
const a = speechSynthesis.getVoices().find((l) => l.name === this.config.voice);
|
|
3634
|
+
a && (this.utterance.voice = a);
|
|
3628
3635
|
}
|
|
3629
3636
|
this.config?.rate && (this.utterance.rate = this.config.rate), this.config?.pitch && (this.utterance.pitch = this.config.pitch), this.utterance.onstart = () => {
|
|
3630
3637
|
o === this.speakRunId && (this._isPlaying = !0, this._isPaused = !1);
|
|
@@ -3651,7 +3658,7 @@ class rl {
|
|
|
3651
3658
|
}, this.utterance.onboundary = (s) => {
|
|
3652
3659
|
if (o !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", s.name, "charIndex:", s.charIndex, "charLength:", s.charLength), s.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence")
|
|
3653
3660
|
return;
|
|
3654
|
-
const
|
|
3661
|
+
const a = Math.max(0, Math.min(s.charIndex, Math.max(0, e.length - 1))), l = Number(s.charLength || 0), c = this.inferWordLength(e, a), f = Number.isFinite(l) && l > 0 && l <= 80 && a + l <= e.length ? l : c, d = e.substring(a, Math.min(e.length, a + f)).trim(), g = n + a;
|
|
3655
3662
|
console.log("[BrowserProvider] Calling onWordBoundary with word:", d, "at position:", g), this.onWordBoundary(d, g, f);
|
|
3656
3663
|
}, speechSynthesis.speak(this.utterance);
|
|
3657
3664
|
});
|
|
@@ -3682,7 +3689,7 @@ class rl {
|
|
|
3682
3689
|
});
|
|
3683
3690
|
}
|
|
3684
3691
|
}
|
|
3685
|
-
class
|
|
3692
|
+
class cl {
|
|
3686
3693
|
/**
|
|
3687
3694
|
* Create TTS tool provider
|
|
3688
3695
|
*
|
|
@@ -3731,7 +3738,7 @@ class il {
|
|
|
3731
3738
|
async _initializeBrowserTTS(e) {
|
|
3732
3739
|
if (typeof window > "u" || !("speechSynthesis" in window))
|
|
3733
3740
|
throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
|
|
3734
|
-
this.ttsProvider = new
|
|
3741
|
+
this.ttsProvider = new ll(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
|
|
3735
3742
|
}
|
|
3736
3743
|
/**
|
|
3737
3744
|
* Initialize server-based TTS (Polly, Google)
|
|
@@ -3797,7 +3804,7 @@ class il {
|
|
|
3797
3804
|
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
3798
3805
|
}
|
|
3799
3806
|
}
|
|
3800
|
-
const
|
|
3807
|
+
const ul = /* @__PURE__ */ new Set([
|
|
3801
3808
|
"annotation-xml",
|
|
3802
3809
|
"color-profile",
|
|
3803
3810
|
"font-face",
|
|
@@ -3806,7 +3813,7 @@ const sl = /* @__PURE__ */ new Set([
|
|
|
3806
3813
|
"font-face-format",
|
|
3807
3814
|
"font-face-name",
|
|
3808
3815
|
"missing-glyph"
|
|
3809
|
-
]),
|
|
3816
|
+
]), fl = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, dl = (t, e = "custom element tag") => {
|
|
3810
3817
|
if (!t || typeof t != "string")
|
|
3811
3818
|
throw new Error(`Invalid ${e}: expected a non-empty string`);
|
|
3812
3819
|
const n = t.trim();
|
|
@@ -3816,12 +3823,12 @@ const sl = /* @__PURE__ */ new Set([
|
|
|
3816
3823
|
throw new Error(`Invalid ${e} "${n}": custom element names must be lowercase`);
|
|
3817
3824
|
if (!n.includes("-"))
|
|
3818
3825
|
throw new Error(`Invalid ${e} "${n}": custom element names must include a hyphen`);
|
|
3819
|
-
if (
|
|
3826
|
+
if (ul.has(n))
|
|
3820
3827
|
throw new Error(`Invalid ${e} "${n}": this name is reserved by the HTML spec`);
|
|
3821
|
-
if (!
|
|
3828
|
+
if (!fl.test(n))
|
|
3822
3829
|
throw new Error(`Invalid ${e} "${n}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
3823
3830
|
return n;
|
|
3824
|
-
},
|
|
3831
|
+
}, ei = {
|
|
3825
3832
|
calculator: "pie-tool-calculator",
|
|
3826
3833
|
textToSpeech: "pie-tool-text-to-speech",
|
|
3827
3834
|
ruler: "pie-tool-ruler",
|
|
@@ -3834,20 +3841,20 @@ const sl = /* @__PURE__ */ new Set([
|
|
|
3834
3841
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
3835
3842
|
graph: "pie-tool-graph",
|
|
3836
3843
|
periodicTable: "pie-tool-periodic-table"
|
|
3837
|
-
},
|
|
3838
|
-
const n = e?.toolTagMap?.[t] ??
|
|
3839
|
-
return
|
|
3840
|
-
},
|
|
3841
|
-
const r =
|
|
3842
|
-
return s ? s({ toolId: t, tagName: r, context: e, toolbarContext: n }) :
|
|
3843
|
-
},
|
|
3844
|
+
}, hl = (t, e) => {
|
|
3845
|
+
const n = e?.toolTagMap?.[t] ?? ei[t] ?? t;
|
|
3846
|
+
return dl(n, `tool component tag for "${t}"`);
|
|
3847
|
+
}, pl = (t) => document.createElement(t), Le = (t, e, n, o) => {
|
|
3848
|
+
const r = hl(t, o), s = o?.toolComponentFactories?.[t] ?? o?.toolComponentFactory;
|
|
3849
|
+
return s ? s({ toolId: t, tagName: r, context: e, toolbarContext: n }) : pl(r);
|
|
3850
|
+
}, vl = {
|
|
3844
3851
|
toolId: "calculator",
|
|
3845
3852
|
name: "Calculator",
|
|
3846
3853
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
3847
3854
|
icon: "calculator",
|
|
3848
3855
|
provider: {
|
|
3849
3856
|
getProviderId: (t) => typeof t?.provider?.id == "string" && t.provider.id.length > 0 ? t.provider.id : "calculator-desmos",
|
|
3850
|
-
createProvider: () => new
|
|
3857
|
+
createProvider: () => new il(),
|
|
3851
3858
|
getInitConfig: (t) => t?.provider?.init ?? {},
|
|
3852
3859
|
getAuthFetcher: (t) => {
|
|
3853
3860
|
const e = t?.provider?.runtime?.authFetcher;
|
|
@@ -3887,7 +3894,7 @@ const sl = /* @__PURE__ */ new Set([
|
|
|
3887
3894
|
return Pn(t);
|
|
3888
3895
|
},
|
|
3889
3896
|
renderToolbar(t, e) {
|
|
3890
|
-
const n =
|
|
3897
|
+
const n = _o(this.toolId, e.scope.level, e.scope.scopeId), o = e.componentOverrides, r = Le(this.toolId, t, e, o);
|
|
3891
3898
|
r.setAttribute("tool-id", n), r.toolkitCoordinator = e.toolkitCoordinator;
|
|
3892
3899
|
const i = {
|
|
3893
3900
|
toolId: this.toolId,
|
|
@@ -3920,21 +3927,48 @@ const sl = /* @__PURE__ */ new Set([
|
|
|
3920
3927
|
],
|
|
3921
3928
|
button: i,
|
|
3922
3929
|
sync: () => {
|
|
3923
|
-
const
|
|
3924
|
-
i.active =
|
|
3930
|
+
const a = e.isToolVisible(n);
|
|
3931
|
+
i.active = a, i.ariaLabel = a ? "Close scientific calculator" : "Open scientific calculator", i.tooltip = a ? "Close calculator" : "Calculator", s !== a && (r.visible = a, s = a), r.toolkitCoordinator !== e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
3925
3932
|
},
|
|
3926
|
-
subscribeActive: (
|
|
3927
|
-
|
|
3933
|
+
subscribeActive: (a) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
3934
|
+
a(e.isToolVisible(n));
|
|
3928
3935
|
}) : () => {
|
|
3929
3936
|
}
|
|
3930
3937
|
};
|
|
3931
3938
|
}
|
|
3932
|
-
},
|
|
3933
|
-
const e =
|
|
3939
|
+
}, Wo = (t) => t && typeof t == "object" ? t : {}, Hn = (t) => {
|
|
3940
|
+
const e = Wo(t), n = Wo(t?.settings);
|
|
3934
3941
|
return { ...e, ...n };
|
|
3935
|
-
},
|
|
3942
|
+
}, oo = (t) => t.backend || "browser", ti = (t, e) => t.serverProvider || t.provider || (e === "polly" || e === "google" ? e : void 0), ni = (t, e) => t.transportMode || (e === "custom" ? "custom" : "pie"), gl = (t) => {
|
|
3943
|
+
const e = oo(t), n = ti(t, e), o = ni(t, n);
|
|
3944
|
+
return {
|
|
3945
|
+
voice: t.defaultVoice,
|
|
3946
|
+
rate: t.rate,
|
|
3947
|
+
pitch: t.pitch,
|
|
3948
|
+
providerOptions: {
|
|
3949
|
+
...t.language ? { locale: t.language } : {},
|
|
3950
|
+
...e === "polly" && t.engine ? { engine: t.engine } : {},
|
|
3951
|
+
...e === "polly" && typeof t.sampleRate == "number" ? { sampleRate: t.sampleRate } : {},
|
|
3952
|
+
...e === "polly" && t.format ? { format: t.format } : {},
|
|
3953
|
+
...e === "polly" ? {
|
|
3954
|
+
speechMarkTypes: t.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"]
|
|
3955
|
+
} : {},
|
|
3956
|
+
...o === "custom" && typeof t.cache == "boolean" ? { cache: t.cache } : {},
|
|
3957
|
+
...o === "custom" && t.speedRate ? { speedRate: t.speedRate } : {},
|
|
3958
|
+
...o === "custom" && t.lang_id ? { lang_id: t.lang_id } : {}
|
|
3959
|
+
},
|
|
3960
|
+
apiEndpoint: t.apiEndpoint,
|
|
3961
|
+
provider: n,
|
|
3962
|
+
language: t.language,
|
|
3963
|
+
transportMode: o,
|
|
3964
|
+
endpointMode: t.endpointMode,
|
|
3965
|
+
endpointValidationMode: t.endpointValidationMode,
|
|
3966
|
+
includeAuthOnAssetFetch: t.includeAuthOnAssetFetch,
|
|
3967
|
+
validateEndpoint: t.validateEndpoint
|
|
3968
|
+
};
|
|
3969
|
+
}, Kt = /* @__PURE__ */ new Map(), ml = "__pieToolElementUnmount", Ko = Object.freeze([1.5, 2]), bl = (t) => {
|
|
3936
3970
|
if (!Array.isArray(t))
|
|
3937
|
-
return [...
|
|
3971
|
+
return [...Ko];
|
|
3938
3972
|
const e = /* @__PURE__ */ new Set();
|
|
3939
3973
|
for (const n of t) {
|
|
3940
3974
|
if (typeof n != "number" || !Number.isFinite(n) || n <= 0)
|
|
@@ -3942,8 +3976,8 @@ const sl = /* @__PURE__ */ new Set([
|
|
|
3942
3976
|
const o = Math.round(n * 100) / 100;
|
|
3943
3977
|
o !== 1 && e.add(o);
|
|
3944
3978
|
}
|
|
3945
|
-
return e.size ? Array.from(e) : [...
|
|
3946
|
-
},
|
|
3979
|
+
return e.size ? Array.from(e) : [...Ko];
|
|
3980
|
+
}, _l = {
|
|
3947
3981
|
toolId: "textToSpeech",
|
|
3948
3982
|
name: "Text to Speech",
|
|
3949
3983
|
description: "Read content aloud",
|
|
@@ -3952,33 +3986,15 @@ const sl = /* @__PURE__ */ new Set([
|
|
|
3952
3986
|
getProviderId: () => "tts",
|
|
3953
3987
|
createProvider: (t) => {
|
|
3954
3988
|
const e = Hn(t);
|
|
3955
|
-
return new
|
|
3989
|
+
return new cl(oo(e));
|
|
3956
3990
|
},
|
|
3957
3991
|
getInitConfig: (t) => {
|
|
3958
|
-
const e = Hn(t), n = e
|
|
3992
|
+
const e = Hn(t), n = oo(e), o = ti(e, n), r = ni(e, o);
|
|
3959
3993
|
return {
|
|
3960
3994
|
backend: n,
|
|
3961
|
-
apiEndpoint: e.apiEndpoint,
|
|
3962
3995
|
serverProvider: o,
|
|
3963
|
-
providerOptions: n === "polly" || r === "custom" ? {
|
|
3964
|
-
...n === "polly" && e.engine ? { engine: e.engine } : {},
|
|
3965
|
-
...n === "polly" && typeof e.sampleRate == "number" ? { sampleRate: e.sampleRate } : {},
|
|
3966
|
-
...n === "polly" && e.format ? { format: e.format } : {},
|
|
3967
|
-
...n === "polly" ? {
|
|
3968
|
-
speechMarkTypes: e.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"]
|
|
3969
|
-
} : {},
|
|
3970
|
-
...r === "custom" && typeof e.cache == "boolean" ? { cache: e.cache } : {},
|
|
3971
|
-
...r === "custom" && e.speedRate ? { speedRate: e.speedRate } : {},
|
|
3972
|
-
...r === "custom" && e.lang_id ? { lang_id: e.lang_id } : {}
|
|
3973
|
-
} : void 0,
|
|
3974
|
-
voice: e.defaultVoice,
|
|
3975
|
-
rate: e.rate,
|
|
3976
|
-
pitch: e.pitch,
|
|
3977
3996
|
transportMode: r,
|
|
3978
|
-
|
|
3979
|
-
endpointValidationMode: e.endpointValidationMode,
|
|
3980
|
-
includeAuthOnAssetFetch: e.includeAuthOnAssetFetch,
|
|
3981
|
-
validateEndpoint: e.validateEndpoint
|
|
3997
|
+
...gl(e)
|
|
3982
3998
|
};
|
|
3983
3999
|
},
|
|
3984
4000
|
getAuthFetcher: (t) => {
|
|
@@ -4013,13 +4029,13 @@ const sl = /* @__PURE__ */ new Set([
|
|
|
4013
4029
|
renderToolbar(t, e) {
|
|
4014
4030
|
const n = () => {
|
|
4015
4031
|
const s = Hn(e.toolkitCoordinator?.getToolConfig(this.toolId) || void 0);
|
|
4016
|
-
return
|
|
4017
|
-
}, o =
|
|
4032
|
+
return bl(s.speedOptions);
|
|
4033
|
+
}, o = _o(this.toolId, e.scope.level, e.scope.scopeId), r = () => {
|
|
4018
4034
|
const s = e.ui?.size;
|
|
4019
4035
|
return s === "sm" || s === "lg" ? s : "md";
|
|
4020
4036
|
}, i = () => {
|
|
4021
4037
|
let s = Kt.get(o);
|
|
4022
|
-
return s && typeof s.isConnected == "boolean" && !s.isConnected && (Kt.delete(o), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[
|
|
4038
|
+
return s && typeof s.isConnected == "boolean" && !s.isConnected && (Kt.delete(o), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[ml] = () => {
|
|
4023
4039
|
Kt.get(o) === s && Kt.delete(o);
|
|
4024
4040
|
}, Kt.set(o, s)), s.setAttribute("tool-id", o), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", r()), s.speedOptions = n(), s;
|
|
4025
4041
|
};
|
|
@@ -4034,15 +4050,15 @@ const sl = /* @__PURE__ */ new Set([
|
|
|
4034
4050
|
],
|
|
4035
4051
|
sync: () => {
|
|
4036
4052
|
const s = i();
|
|
4037
|
-
s.setAttribute("tool-id", o), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", r()), s.speedOptions = n(), e.ensureTTSReady && e.ensureTTSReady().catch((
|
|
4038
|
-
console.error("[ttsToolRegistration] Failed to initialize TTS service:",
|
|
4053
|
+
s.setAttribute("tool-id", o), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", r()), s.speedOptions = n(), e.ensureTTSReady && e.ensureTTSReady().catch((a) => {
|
|
4054
|
+
console.error("[ttsToolRegistration] Failed to initialize TTS service:", a);
|
|
4039
4055
|
});
|
|
4040
4056
|
}
|
|
4041
4057
|
};
|
|
4042
4058
|
}
|
|
4043
4059
|
};
|
|
4044
4060
|
function He(t, e) {
|
|
4045
|
-
const n =
|
|
4061
|
+
const n = _o(t, e.scope.level, e.scope.scopeId);
|
|
4046
4062
|
return {
|
|
4047
4063
|
fullToolId: n,
|
|
4048
4064
|
isActive: () => e.isToolVisible(n),
|
|
@@ -4056,7 +4072,7 @@ function Be(t) {
|
|
|
4056
4072
|
const e = t.isActive();
|
|
4057
4073
|
t.button.active = e, t.overlay.visible = e, t.onActiveChange?.(e);
|
|
4058
4074
|
}
|
|
4059
|
-
const
|
|
4075
|
+
const yl = {
|
|
4060
4076
|
toolId: "ruler",
|
|
4061
4077
|
name: "Ruler",
|
|
4062
4078
|
description: "On-screen ruler for measurements",
|
|
@@ -4102,7 +4118,7 @@ const vl = {
|
|
|
4102
4118
|
subscribeActive: n.subscribeActive
|
|
4103
4119
|
};
|
|
4104
4120
|
}
|
|
4105
|
-
},
|
|
4121
|
+
}, wl = {
|
|
4106
4122
|
toolId: "protractor",
|
|
4107
4123
|
name: "Protractor",
|
|
4108
4124
|
description: "On-screen protractor for angle measurements",
|
|
@@ -4148,7 +4164,7 @@ const vl = {
|
|
|
4148
4164
|
subscribeActive: n.subscribeActive
|
|
4149
4165
|
};
|
|
4150
4166
|
}
|
|
4151
|
-
},
|
|
4167
|
+
}, Tl = {
|
|
4152
4168
|
toolId: "answerEliminator",
|
|
4153
4169
|
name: "Answer Eliminator",
|
|
4154
4170
|
description: "Strike through answer choices",
|
|
@@ -4171,7 +4187,7 @@ const vl = {
|
|
|
4171
4187
|
* Pass 2: Answer eliminator is relevant only for choice-based questions
|
|
4172
4188
|
*/
|
|
4173
4189
|
isVisibleInContext(t) {
|
|
4174
|
-
return
|
|
4190
|
+
return el(t);
|
|
4175
4191
|
},
|
|
4176
4192
|
renderToolbar(t, e) {
|
|
4177
4193
|
const n = He(this.toolId, e), o = e.componentOverrides ?? {}, r = Le(this.toolId, t, e, o);
|
|
@@ -4202,7 +4218,7 @@ const vl = {
|
|
|
4202
4218
|
subscribeActive: n.subscribeActive
|
|
4203
4219
|
};
|
|
4204
4220
|
}
|
|
4205
|
-
},
|
|
4221
|
+
}, Il = {
|
|
4206
4222
|
toolId: "highlighter",
|
|
4207
4223
|
name: "Highlighter",
|
|
4208
4224
|
description: "Highlight text",
|
|
@@ -4246,7 +4262,7 @@ const vl = {
|
|
|
4246
4262
|
subscribeActive: n.subscribeActive
|
|
4247
4263
|
};
|
|
4248
4264
|
}
|
|
4249
|
-
},
|
|
4265
|
+
}, Sl = {
|
|
4250
4266
|
toolId: "lineReader",
|
|
4251
4267
|
name: "Line Reader",
|
|
4252
4268
|
description: "Reading guide overlay",
|
|
@@ -4298,7 +4314,7 @@ const vl = {
|
|
|
4298
4314
|
subscribeActive: n.subscribeActive
|
|
4299
4315
|
};
|
|
4300
4316
|
}
|
|
4301
|
-
},
|
|
4317
|
+
}, Al = {
|
|
4302
4318
|
toolId: "theme",
|
|
4303
4319
|
name: "Theme",
|
|
4304
4320
|
description: "Accessible themes and contrast",
|
|
@@ -4369,7 +4385,7 @@ const vl = {
|
|
|
4369
4385
|
subscribeActive: n.subscribeActive
|
|
4370
4386
|
};
|
|
4371
4387
|
}
|
|
4372
|
-
},
|
|
4388
|
+
}, El = Al, $l = {
|
|
4373
4389
|
toolId: "annotationToolbar",
|
|
4374
4390
|
name: "Highlighter",
|
|
4375
4391
|
description: "Highlight and annotate text",
|
|
@@ -4423,7 +4439,7 @@ const vl = {
|
|
|
4423
4439
|
subscribeActive: n.subscribeActive
|
|
4424
4440
|
};
|
|
4425
4441
|
}
|
|
4426
|
-
},
|
|
4442
|
+
}, kl = {
|
|
4427
4443
|
toolId: "graph",
|
|
4428
4444
|
name: "Graph",
|
|
4429
4445
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -4488,7 +4504,7 @@ const vl = {
|
|
|
4488
4504
|
subscribeActive: n.subscribeActive
|
|
4489
4505
|
};
|
|
4490
4506
|
}
|
|
4491
|
-
},
|
|
4507
|
+
}, Cl = {
|
|
4492
4508
|
toolId: "periodicTable",
|
|
4493
4509
|
name: "Periodic Table",
|
|
4494
4510
|
description: "Chemistry periodic table reference",
|
|
@@ -4509,7 +4525,7 @@ const vl = {
|
|
|
4509
4525
|
* Pass 2: Periodic table is relevant when science content is present
|
|
4510
4526
|
*/
|
|
4511
4527
|
isVisibleInContext(t) {
|
|
4512
|
-
return
|
|
4528
|
+
return tl(t);
|
|
4513
4529
|
},
|
|
4514
4530
|
renderToolbar(t, e) {
|
|
4515
4531
|
const n = He(this.toolId, e), o = {
|
|
@@ -4551,53 +4567,53 @@ const vl = {
|
|
|
4551
4567
|
subscribeActive: n.subscribeActive
|
|
4552
4568
|
};
|
|
4553
4569
|
}
|
|
4554
|
-
},
|
|
4555
|
-
fl,
|
|
4556
|
-
pl,
|
|
4570
|
+
}, Rl = [
|
|
4557
4571
|
vl,
|
|
4558
|
-
gl,
|
|
4559
|
-
ml,
|
|
4560
|
-
bl,
|
|
4561
4572
|
_l,
|
|
4573
|
+
yl,
|
|
4562
4574
|
wl,
|
|
4563
4575
|
Tl,
|
|
4564
4576
|
Il,
|
|
4565
|
-
|
|
4577
|
+
Sl,
|
|
4578
|
+
El,
|
|
4579
|
+
$l,
|
|
4580
|
+
kl,
|
|
4581
|
+
Cl
|
|
4566
4582
|
];
|
|
4567
|
-
function
|
|
4568
|
-
const e = new
|
|
4583
|
+
function Ol(t = {}) {
|
|
4584
|
+
const e = new Js(), n = {
|
|
4569
4585
|
toolTagMap: {
|
|
4570
|
-
...
|
|
4586
|
+
...ei,
|
|
4571
4587
|
...t.toolTagMap || {}
|
|
4572
4588
|
},
|
|
4573
4589
|
toolComponentFactory: t.toolComponentFactory,
|
|
4574
4590
|
toolComponentFactories: t.toolComponentFactories
|
|
4575
4591
|
}, o = (r) => t.overrides?.[r.toolId] || r;
|
|
4576
|
-
return t.includePackagedTools &&
|
|
4592
|
+
return t.includePackagedTools && Ll(e, {
|
|
4577
4593
|
toolIds: t.toolIds,
|
|
4578
4594
|
applyOverrides: o
|
|
4579
4595
|
}), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(n), e;
|
|
4580
4596
|
}
|
|
4581
|
-
function
|
|
4597
|
+
function Ll(t, e = {}) {
|
|
4582
4598
|
const n = e.toolIds && e.toolIds.length > 0 ? new Set(e.toolIds) : null, o = e.applyOverrides || ((r) => r);
|
|
4583
|
-
for (const r of
|
|
4599
|
+
for (const r of Rl)
|
|
4584
4600
|
n && !n.has(r.toolId) || t.register(o(r));
|
|
4585
4601
|
}
|
|
4586
|
-
function
|
|
4587
|
-
return
|
|
4602
|
+
function Pl(t = {}) {
|
|
4603
|
+
return Ol({
|
|
4588
4604
|
...t,
|
|
4589
4605
|
includePackagedTools: !0
|
|
4590
4606
|
});
|
|
4591
4607
|
}
|
|
4592
|
-
function
|
|
4593
|
-
const t =
|
|
4608
|
+
function xl() {
|
|
4609
|
+
const t = Pl(), e = /* @__PURE__ */ new Set();
|
|
4594
4610
|
for (const n of t.getAllTools())
|
|
4595
4611
|
for (const o of n.pnpSupportIds || [])
|
|
4596
4612
|
e.add(o);
|
|
4597
4613
|
return [...e].sort();
|
|
4598
4614
|
}
|
|
4599
|
-
|
|
4600
|
-
const
|
|
4615
|
+
xl();
|
|
4616
|
+
const Ml = {
|
|
4601
4617
|
/**
|
|
4602
4618
|
* Visual accessibility features
|
|
4603
4619
|
* For students with low vision, color blindness, or visual processing needs
|
|
@@ -4768,17 +4784,17 @@ const Rl = {
|
|
|
4768
4784
|
tutorialAvailable: "tutorialAvailable"
|
|
4769
4785
|
}
|
|
4770
4786
|
};
|
|
4771
|
-
Object.values(
|
|
4772
|
-
var
|
|
4787
|
+
Object.values(Ml).flatMap((t) => Object.values(t));
|
|
4788
|
+
var Yo;
|
|
4773
4789
|
(function(t) {
|
|
4774
4790
|
t[t.BASE = 0] = "BASE", t[t.TOOL = 1e3] = "TOOL", t[t.MODAL = 2e3] = "MODAL", t[t.CONTROL = 3e3] = "CONTROL", t[t.HIGHLIGHT = 4e3] = "HIGHLIGHT";
|
|
4775
|
-
})(
|
|
4776
|
-
var
|
|
4791
|
+
})(Yo || (Yo = {}));
|
|
4792
|
+
var Xo;
|
|
4777
4793
|
(function(t) {
|
|
4778
4794
|
t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
|
|
4779
|
-
})(
|
|
4780
|
-
var
|
|
4781
|
-
const
|
|
4795
|
+
})(Xo || (Xo = {}));
|
|
4796
|
+
var Nl = /* @__PURE__ */ ot('<link rel="stylesheet" href="./highlights.css"/>'), Dl = /* @__PURE__ */ ot('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), Vl = /* @__PURE__ */ ot('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), Fl = /* @__PURE__ */ ot('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), zl = /* @__PURE__ */ ot('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), Hl = /* @__PURE__ */ ot('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), Bl = /* @__PURE__ */ ot('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), jl = /* @__PURE__ */ ot('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1);
|
|
4797
|
+
const ql = {
|
|
4782
4798
|
hash: "svelte-g8qu62",
|
|
4783
4799
|
code: `.pie-tool-annotation-toolbar.svelte-g8qu62 {position:fixed;z-index:4200;display:flex;gap:0.25rem;padding:0.5rem;border-radius:0.5rem;background:var(--pie-background, #fff);color:var(--pie-text, #111827);border:1px solid var(--pie-border, #d1d5db);box-shadow:0 10px 25px -8px rgb(0 0 0 / 0.3);user-select:none;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62 {width:2.5rem;height:2rem;border:2px solid color-mix(in srgb, var(--pie-border-dark, #111827) 20%, transparent);border-radius:0.375rem;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;padding:0;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:hover {transform:scale(1.1);border-color:color-mix(in srgb, var(--pie-border-dark, #111827) 45%, transparent);box-shadow:0 2px 8px rgb(0 0 0 / 0.15);}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar.svelte-g8qu62 .divider-horizontal:where(.svelte-g8qu62) {height:auto;width:1px;background-color:color-mix(in srgb, var(--pie-border, #d1d5db) 70%, transparent);}
|
|
4784
4800
|
|
|
@@ -4786,10 +4802,10 @@ const Fl = {
|
|
|
4786
4802
|
|
|
4787
4803
|
/* Button styling */.pie-tool-annotation-toolbar__button.svelte-g8qu62 {display:inline-flex;align-items:center;justify-content:center;gap:0.35rem;padding:0.4rem 0.55rem;border:1px solid var(--pie-button-border, #d1d5db);border-radius:0.4rem;background:var(--pie-button-bg, #fff);color:var(--pie-button-color, var(--pie-text, #111827));cursor:pointer;}.pie-tool-annotation-toolbar__button--icon.svelte-g8qu62 {min-width:2rem;min-height:2rem;padding:0.45rem;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:hover {background:var(--pie-button-hover-bg, #f9fafb);color:var(--pie-button-hover-color, var(--pie-text, #111827));border-color:var(--pie-button-hover-border, #9ca3af);}.pie-tool-annotation-toolbar__button.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:disabled {opacity:0.6;cursor:not-allowed;}.pie-tool-annotation-toolbar__button--warning.svelte-g8qu62 {color:var(--pie-missing-icon, #92400e);}.pie-tool-annotation-toolbar__button--danger.svelte-g8qu62 {color:var(--pie-incorrect-icon, #b91c1c);}.pie-tool-annotation-toolbar__button.svelte-g8qu62 svg:where(.svelte-g8qu62) {width:18px;height:18px;}`
|
|
4788
4804
|
};
|
|
4789
|
-
function
|
|
4790
|
-
|
|
4805
|
+
function Gl(t, e) {
|
|
4806
|
+
lr(e, !0), Os(t, ql);
|
|
4791
4807
|
let n = zn(e, "enabled", 7, !0), o = zn(e, "highlightCoordinator", 7, null), r = zn(e, "ttsService", 7, null);
|
|
4792
|
-
const i = typeof window < "u", s = "pie-annotations",
|
|
4808
|
+
const i = typeof window < "u", s = "pie-annotations", a = [
|
|
4793
4809
|
{
|
|
4794
4810
|
name: Ue.YELLOW,
|
|
4795
4811
|
hex: "#fde995",
|
|
@@ -4810,7 +4826,7 @@ function zl(t, e) {
|
|
|
4810
4826
|
hex: "#a6e1c5",
|
|
4811
4827
|
label: "Green highlight"
|
|
4812
4828
|
}
|
|
4813
|
-
],
|
|
4829
|
+
], l = [
|
|
4814
4830
|
"button",
|
|
4815
4831
|
"input",
|
|
4816
4832
|
"select",
|
|
@@ -4821,18 +4837,18 @@ function zl(t, e) {
|
|
|
4821
4837
|
'[role="button"]',
|
|
4822
4838
|
'[role="textbox"]'
|
|
4823
4839
|
];
|
|
4824
|
-
let c = /* @__PURE__ */
|
|
4840
|
+
let c = /* @__PURE__ */ N(null), f = /* @__PURE__ */ N(null), d = /* @__PURE__ */ N(null), g = /* @__PURE__ */ N(null), b = /* @__PURE__ */ N(Tt({
|
|
4825
4841
|
isVisible: !1,
|
|
4826
4842
|
selectedText: "",
|
|
4827
4843
|
selectedRange: null,
|
|
4828
4844
|
toolbarPosition: { x: 0, y: 0 }
|
|
4829
|
-
})), h = /* @__PURE__ */
|
|
4845
|
+
})), h = /* @__PURE__ */ N(!1), A = /* @__PURE__ */ N(
|
|
4830
4846
|
!1
|
|
4831
4847
|
// Flag to prevent immediate hiding after showing
|
|
4832
|
-
), w = /* @__PURE__ */
|
|
4848
|
+
), w = /* @__PURE__ */ N(
|
|
4833
4849
|
""
|
|
4834
4850
|
// For screen readers when toolbar is repositioned
|
|
4835
|
-
), I = /* @__PURE__ */
|
|
4851
|
+
), I = /* @__PURE__ */ N(0), O = /* @__PURE__ */ N(null), fe = /* @__PURE__ */ Vn(() => v(I) > 0), de = /* @__PURE__ */ Vn(() => v(O) !== null), H = /* @__PURE__ */ Vn(() => v(g)?.scopeElement || v(d)?.scopeElement || null);
|
|
4836
4852
|
function je() {
|
|
4837
4853
|
const p = v(c)?.ownerDocument;
|
|
4838
4854
|
return v(H) || p?.documentElement || document.documentElement;
|
|
@@ -4857,7 +4873,7 @@ function zl(t, e) {
|
|
|
4857
4873
|
if (p.nodeType !== Node.ELEMENT_NODE && p.nodeType !== Node.TEXT_NODE)
|
|
4858
4874
|
return !1;
|
|
4859
4875
|
const _ = p.nodeType === Node.TEXT_NODE ? p.parentElement : p;
|
|
4860
|
-
return _ ? !
|
|
4876
|
+
return _ ? !l.some((C) => {
|
|
4861
4877
|
try {
|
|
4862
4878
|
return _.closest(C) !== null;
|
|
4863
4879
|
} catch {
|
|
@@ -4879,7 +4895,7 @@ function zl(t, e) {
|
|
|
4879
4895
|
console.error("[AnnotationToolbar] Failed to save annotations:", p);
|
|
4880
4896
|
}
|
|
4881
4897
|
}
|
|
4882
|
-
function
|
|
4898
|
+
function Mn() {
|
|
4883
4899
|
if (!(!i || !o()))
|
|
4884
4900
|
try {
|
|
4885
4901
|
const p = sessionStorage.getItem(te());
|
|
@@ -4905,9 +4921,9 @@ function zl(t, e) {
|
|
|
4905
4921
|
$(w, "");
|
|
4906
4922
|
},
|
|
4907
4923
|
2e3
|
|
4908
|
-
), $(
|
|
4924
|
+
), $(A, !0), setTimeout(
|
|
4909
4925
|
() => {
|
|
4910
|
-
$(
|
|
4926
|
+
$(A, !1);
|
|
4911
4927
|
},
|
|
4912
4928
|
100
|
|
4913
4929
|
);
|
|
@@ -4915,7 +4931,7 @@ function zl(t, e) {
|
|
|
4915
4931
|
function Pe() {
|
|
4916
4932
|
v(h) && r() && (r().stop(), $(h, !1)), v(b).isVisible = !1, v(b).selectedText = "", v(b).selectedRange = null;
|
|
4917
4933
|
}
|
|
4918
|
-
function
|
|
4934
|
+
function wo(p) {
|
|
4919
4935
|
if (!v(b).selectedRange || !o()) return;
|
|
4920
4936
|
const _ = v(b).selectedText;
|
|
4921
4937
|
o().addAnnotation(v(b).selectedRange, p), $(I, o().getAnnotations().length, !0), on();
|
|
@@ -4927,7 +4943,7 @@ function zl(t, e) {
|
|
|
4927
4943
|
3e3
|
|
4928
4944
|
), Pe();
|
|
4929
4945
|
}
|
|
4930
|
-
function
|
|
4946
|
+
function oi() {
|
|
4931
4947
|
if (!v(O) || !o()) {
|
|
4932
4948
|
console.warn("[AnnotationToolbar] No overlapping annotation to remove");
|
|
4933
4949
|
return;
|
|
@@ -4950,7 +4966,7 @@ function zl(t, e) {
|
|
|
4950
4966
|
3e3
|
|
4951
4967
|
), Pe();
|
|
4952
4968
|
}
|
|
4953
|
-
function
|
|
4969
|
+
function ri() {
|
|
4954
4970
|
const p = v(I);
|
|
4955
4971
|
o()?.clearAnnotations(), $(I, 0), sessionStorage.removeItem(te()), $(w, `${p} annotation${p === 1 ? "" : "s"} cleared`), setTimeout(
|
|
4956
4972
|
() => {
|
|
@@ -4959,7 +4975,7 @@ function zl(t, e) {
|
|
|
4959
4975
|
3e3
|
|
4960
4976
|
), Pe();
|
|
4961
4977
|
}
|
|
4962
|
-
async function
|
|
4978
|
+
async function ii() {
|
|
4963
4979
|
if (!(!v(b).selectedRange || !r())) {
|
|
4964
4980
|
$(h, !0);
|
|
4965
4981
|
try {
|
|
@@ -4971,35 +4987,35 @@ function zl(t, e) {
|
|
|
4971
4987
|
}
|
|
4972
4988
|
}
|
|
4973
4989
|
}
|
|
4974
|
-
function
|
|
4990
|
+
function To(p) {
|
|
4975
4991
|
p.key === "Escape" && v(b).isVisible && (p.preventDefault(), Pe());
|
|
4976
4992
|
}
|
|
4977
4993
|
function sn(p) {
|
|
4978
|
-
!v(b).isVisible || v(
|
|
4994
|
+
!v(b).isVisible || v(A) || v(f) && !v(f).contains(p.target) && Pe();
|
|
4979
4995
|
}
|
|
4980
|
-
|
|
4996
|
+
Po(() => {
|
|
4981
4997
|
if (!i) return;
|
|
4982
4998
|
const p = setTimeout(
|
|
4983
4999
|
() => {
|
|
4984
|
-
|
|
5000
|
+
Mn();
|
|
4985
5001
|
},
|
|
4986
5002
|
2e3
|
|
4987
5003
|
), _ = v(H) || document;
|
|
4988
|
-
return _.addEventListener("mouseup", rn), _.addEventListener("click", sn), _.addEventListener("touchend", rn), _.addEventListener("touchstart", sn), document.addEventListener("keydown",
|
|
4989
|
-
clearTimeout(p), _.removeEventListener("mouseup", rn), _.removeEventListener("click", sn), _.removeEventListener("touchend", rn), _.removeEventListener("touchstart", sn), document.removeEventListener("keydown",
|
|
5004
|
+
return _.addEventListener("mouseup", rn), _.addEventListener("click", sn), _.addEventListener("touchend", rn), _.addEventListener("touchstart", sn), document.addEventListener("keydown", To), window.addEventListener("scroll", Pe, !0), () => {
|
|
5005
|
+
clearTimeout(p), _.removeEventListener("mouseup", rn), _.removeEventListener("click", sn), _.removeEventListener("touchend", rn), _.removeEventListener("touchstart", sn), document.removeEventListener("keydown", To), window.removeEventListener("scroll", Pe, !0);
|
|
4990
5006
|
};
|
|
4991
|
-
}),
|
|
5007
|
+
}), Po(() => {
|
|
4992
5008
|
if (!v(c)) return;
|
|
4993
|
-
const p =
|
|
5009
|
+
const p = Us(v(c), (C) => {
|
|
4994
5010
|
$(d, C, !0);
|
|
4995
|
-
}), _ =
|
|
5011
|
+
}), _ = Ws(v(c), (C) => {
|
|
4996
5012
|
$(g, C, !0);
|
|
4997
5013
|
});
|
|
4998
5014
|
return () => {
|
|
4999
5015
|
_(), p();
|
|
5000
5016
|
};
|
|
5001
5017
|
});
|
|
5002
|
-
var
|
|
5018
|
+
var si = {
|
|
5003
5019
|
get enabled() {
|
|
5004
5020
|
return n();
|
|
5005
5021
|
},
|
|
@@ -5018,28 +5034,28 @@ function zl(t, e) {
|
|
|
5018
5034
|
set ttsService(p = null) {
|
|
5019
5035
|
r(p), pn();
|
|
5020
5036
|
}
|
|
5021
|
-
},
|
|
5022
|
-
|
|
5023
|
-
var _ =
|
|
5037
|
+
}, Io = jl();
|
|
5038
|
+
Rs("g8qu62", (p) => {
|
|
5039
|
+
var _ = Nl();
|
|
5024
5040
|
xe(p, _);
|
|
5025
5041
|
});
|
|
5026
|
-
var
|
|
5027
|
-
|
|
5028
|
-
var Ao = qe(
|
|
5042
|
+
var So = Fn(Io);
|
|
5043
|
+
qo(So, (p) => $(c, p), () => v(c));
|
|
5044
|
+
var Ao = qe(So, 2);
|
|
5029
5045
|
{
|
|
5030
|
-
var
|
|
5031
|
-
var _ =
|
|
5032
|
-
|
|
5033
|
-
var X =
|
|
5046
|
+
var li = (p) => {
|
|
5047
|
+
var _ = Bl(), C = un(_);
|
|
5048
|
+
$s(C, 17, () => a, As, (pe, ve) => {
|
|
5049
|
+
var X = Dl(), ln = un(X), Nn = un(ln, !0);
|
|
5034
5050
|
an(ln), an(X), fn(() => {
|
|
5035
|
-
|
|
5036
|
-
}), Gt("click", X, () =>
|
|
5051
|
+
zo(X, `background-color: ${v(ve).hex ?? ""};`), Ho(X, "aria-label", v(ve).label), Ho(X, "title", v(ve).label), Vo(Nn, v(ve).label);
|
|
5052
|
+
}), Gt("click", X, () => wo(v(ve).name)), xe(pe, X);
|
|
5037
5053
|
});
|
|
5038
5054
|
var B = qe(C, 2), rt = qe(B, 2);
|
|
5039
5055
|
{
|
|
5040
5056
|
var Bt = (pe) => {
|
|
5041
|
-
var ve =
|
|
5042
|
-
fn(() => X.disabled = v(h)), Gt("click", X,
|
|
5057
|
+
var ve = Vl(), X = qe(Fn(ve), 2);
|
|
5058
|
+
fn(() => X.disabled = v(h)), Gt("click", X, ii), xe(pe, ve);
|
|
5043
5059
|
};
|
|
5044
5060
|
Ut(rt, (pe) => {
|
|
5045
5061
|
r() && pe(Bt);
|
|
@@ -5047,45 +5063,45 @@ function zl(t, e) {
|
|
|
5047
5063
|
}
|
|
5048
5064
|
var jt = qe(rt, 2);
|
|
5049
5065
|
{
|
|
5050
|
-
var
|
|
5051
|
-
var ve =
|
|
5066
|
+
var ci = (pe) => {
|
|
5067
|
+
var ve = Hl(), X = qe(Fn(ve), 2);
|
|
5052
5068
|
{
|
|
5053
5069
|
var ln = (it) => {
|
|
5054
|
-
var qt =
|
|
5055
|
-
Gt("click", qt,
|
|
5070
|
+
var qt = Fl();
|
|
5071
|
+
Gt("click", qt, oi), xe(it, qt);
|
|
5056
5072
|
};
|
|
5057
5073
|
Ut(X, (it) => {
|
|
5058
5074
|
v(de) && it(ln);
|
|
5059
5075
|
});
|
|
5060
5076
|
}
|
|
5061
|
-
var
|
|
5077
|
+
var Nn = qe(X, 2);
|
|
5062
5078
|
{
|
|
5063
|
-
var
|
|
5064
|
-
var qt =
|
|
5065
|
-
Gt("click", qt,
|
|
5079
|
+
var ui = (it) => {
|
|
5080
|
+
var qt = zl();
|
|
5081
|
+
Gt("click", qt, ri), xe(it, qt);
|
|
5066
5082
|
};
|
|
5067
|
-
Ut(
|
|
5068
|
-
v(fe) && it(
|
|
5083
|
+
Ut(Nn, (it) => {
|
|
5084
|
+
v(fe) && it(ui);
|
|
5069
5085
|
});
|
|
5070
5086
|
}
|
|
5071
5087
|
xe(pe, ve);
|
|
5072
5088
|
};
|
|
5073
5089
|
Ut(jt, (pe) => {
|
|
5074
|
-
(v(de) || v(fe)) && pe(
|
|
5090
|
+
(v(de) || v(fe)) && pe(ci);
|
|
5075
5091
|
});
|
|
5076
5092
|
}
|
|
5077
|
-
an(_),
|
|
5093
|
+
an(_), qo(_, (pe) => $(f, pe), () => v(f)), fn(() => zo(_, `left:${v(b).toolbarPosition.x}px; top:${v(b).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), Gt("click", B, () => wo(Ue.UNDERLINE)), xe(p, _);
|
|
5078
5094
|
};
|
|
5079
5095
|
Ut(Ao, (p) => {
|
|
5080
|
-
v(b).isVisible && p(
|
|
5096
|
+
v(b).isVisible && p(li);
|
|
5081
5097
|
});
|
|
5082
5098
|
}
|
|
5083
|
-
var
|
|
5084
|
-
return an(
|
|
5099
|
+
var Eo = qe(Ao, 2), ai = un(Eo, !0);
|
|
5100
|
+
return an(Eo), fn(() => Vo(ai, v(w))), xe(t, Io), ar(si);
|
|
5085
5101
|
}
|
|
5086
|
-
|
|
5087
|
-
customElements.define("pie-tool-annotation-toolbar",
|
|
5088
|
-
|
|
5102
|
+
gs(["click"]);
|
|
5103
|
+
customElements.define("pie-tool-annotation-toolbar", Hs(
|
|
5104
|
+
Gl,
|
|
5089
5105
|
{
|
|
5090
5106
|
enabled: { attribute: "enabled", type: "Boolean" },
|
|
5091
5107
|
highlightCoordinator: { type: "Object" },
|
|
@@ -5096,5 +5112,5 @@ customElements.define("pie-tool-annotation-toolbar", Vs(
|
|
|
5096
5112
|
{ mode: "open" }
|
|
5097
5113
|
));
|
|
5098
5114
|
export {
|
|
5099
|
-
|
|
5115
|
+
Gl as default
|
|
5100
5116
|
};
|