@pie-players/pie-tool-line-reader 0.3.10 → 0.3.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tool-line-reader.js +696 -680
- package/package.json +4 -4
- package/tool-line-reader.svelte +2 -2
package/dist/tool-line-reader.js
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Fr = Object.defineProperty;
|
|
2
|
+
var Kn = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var p = (t, e, n) =>
|
|
7
|
-
var c = (t, e, n) => (sn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), b = (t, e, n) => e.has(t) ?
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
const
|
|
5
|
+
var jr = (t, e, n) => e in t ? Fr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
6
|
+
var p = (t, e, n) => jr(t, typeof e != "symbol" ? e + "" : e, n), sn = (t, e, n) => e.has(t) || Kn("Cannot " + n);
|
|
7
|
+
var c = (t, e, n) => (sn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), b = (t, e, n) => e.has(t) ? Kn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), m = (t, e, n, i) => (sn(t, e, "write to private field"), i ? i.call(t, n) : e.set(t, n), n), E = (t, e, n) => (sn(t, e, "access private method"), n);
|
|
8
|
+
var wi;
|
|
9
|
+
typeof window < "u" && ((wi = window.__svelte ?? (window.__svelte = {})).v ?? (wi.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const Hr = 2, Ti = "[", Ii = "[!", Xn = "[?", Si = "]", ft = {}, x = /* @__PURE__ */ Symbol(), Ai = "http://www.w3.org/1999/xhtml", cn = !1;
|
|
11
|
+
var Br = Array.isArray, Gr = Array.prototype.indexOf, ht = Array.prototype.includes, Ur = Array.from, qt = Object.keys, Wt = Object.defineProperty, it = Object.getOwnPropertyDescriptor, qr = Object.getOwnPropertyDescriptors, Wr = Object.prototype, Yr = Array.prototype, $i = Object.getPrototypeOf, Jn = Object.isExtensible;
|
|
12
|
+
const Kr = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function Xr(t) {
|
|
15
15
|
for (var e = 0; e < t.length; e++)
|
|
16
16
|
t[e]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function ki() {
|
|
19
19
|
var t, e, n = new Promise((i, r) => {
|
|
20
20
|
t = i, e = r;
|
|
21
21
|
});
|
|
22
22
|
return { promise: n, resolve: t, reject: e };
|
|
23
23
|
}
|
|
24
|
-
const D = 2, bt = 4, pt = 8,
|
|
24
|
+
const D = 2, bt = 4, pt = 8, $n = 1 << 24, Fe = 16, he = 32, je = 64, un = 128, J = 512, M = 1024, N = 2048, oe = 4096, Q = 8192, $e = 16384, Ze = 32768, vt = 65536, Qn = 1 << 17, Jr = 1 << 18, et = 1 << 19, Qr = 1 << 20, Qe = 65536, dn = 1 << 21, kn = 1 << 22, De = 1 << 23, Vt = /* @__PURE__ */ Symbol("$state"), Zr = /* @__PURE__ */ Symbol("legacy props"), He = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
27
|
p(this, "name", "StaleReactionError");
|
|
28
28
|
p(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
30
|
}(), Jt = 3, Qt = 8;
|
|
31
|
-
function
|
|
31
|
+
function eo(t) {
|
|
32
32
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function to() {
|
|
35
35
|
throw new Error("https://svelte.dev/e/async_derived_orphan");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function no(t) {
|
|
38
38
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function io() {
|
|
41
41
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ro(t) {
|
|
44
44
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function oo() {
|
|
47
47
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function so() {
|
|
50
50
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function lo() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function ao() {
|
|
56
56
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function co() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function uo() {
|
|
62
62
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
63
63
|
}
|
|
64
64
|
function Zt(t) {
|
|
65
65
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function fo() {
|
|
68
68
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
69
69
|
}
|
|
70
70
|
let $ = !1;
|
|
@@ -74,20 +74,20 @@ function nt(t) {
|
|
|
74
74
|
let I;
|
|
75
75
|
function se(t) {
|
|
76
76
|
if (t === null)
|
|
77
|
-
throw Zt(),
|
|
77
|
+
throw Zt(), ft;
|
|
78
78
|
return I = t;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function En() {
|
|
81
81
|
return se(/* @__PURE__ */ Oe(I));
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function Zn(t) {
|
|
84
84
|
if ($) {
|
|
85
85
|
if (/* @__PURE__ */ Oe(I) !== null)
|
|
86
|
-
throw Zt(),
|
|
86
|
+
throw Zt(), ft;
|
|
87
87
|
I = t;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function Ei(t = 1) {
|
|
91
91
|
if ($) {
|
|
92
92
|
for (var e = t, n = I; e--; )
|
|
93
93
|
n = /** @type {TemplateNode} */
|
|
@@ -95,17 +95,17 @@ function ki(t = 1) {
|
|
|
95
95
|
I = n;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function Oi(t = !0) {
|
|
99
99
|
for (var e = 0, n = I; ; ) {
|
|
100
100
|
if (n.nodeType === Qt) {
|
|
101
101
|
var i = (
|
|
102
102
|
/** @type {Comment} */
|
|
103
103
|
n.data
|
|
104
104
|
);
|
|
105
|
-
if (i ===
|
|
105
|
+
if (i === Si) {
|
|
106
106
|
if (e === 0) return n;
|
|
107
107
|
e -= 1;
|
|
108
|
-
} else (i ===
|
|
108
|
+
} else (i === Ti || i === Ii || // "[1", "[2", etc. for if blocks
|
|
109
109
|
i[0] === "[" && !isNaN(Number(i.slice(1)))) && (e += 1);
|
|
110
110
|
}
|
|
111
111
|
var r = (
|
|
@@ -115,28 +115,28 @@ function Ei(t = !0) {
|
|
|
115
115
|
t && n.remove(), n = r;
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
-
function
|
|
118
|
+
function ho(t) {
|
|
119
119
|
if (!t || t.nodeType !== Qt)
|
|
120
|
-
throw Zt(),
|
|
120
|
+
throw Zt(), ft;
|
|
121
121
|
return (
|
|
122
122
|
/** @type {Comment} */
|
|
123
123
|
t.data
|
|
124
124
|
);
|
|
125
125
|
}
|
|
126
|
-
function
|
|
126
|
+
function Ci(t) {
|
|
127
127
|
return t === this.v;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
129
|
+
function po(t, e) {
|
|
130
130
|
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
return !
|
|
132
|
+
function vo(t) {
|
|
133
|
+
return !po(t, this.v);
|
|
134
134
|
}
|
|
135
|
-
let
|
|
135
|
+
let go = !1, Y = null;
|
|
136
136
|
function gt(t) {
|
|
137
137
|
Y = t;
|
|
138
138
|
}
|
|
139
|
-
function
|
|
139
|
+
function Pi(t, e = !1, n) {
|
|
140
140
|
Y = {
|
|
141
141
|
p: Y,
|
|
142
142
|
i: !1,
|
|
@@ -147,7 +147,7 @@ function Ci(t, e = !1, n) {
|
|
|
147
147
|
l: null
|
|
148
148
|
};
|
|
149
149
|
}
|
|
150
|
-
function
|
|
150
|
+
function Ri(t) {
|
|
151
151
|
var e = (
|
|
152
152
|
/** @type {ComponentContext} */
|
|
153
153
|
Y
|
|
@@ -155,33 +155,33 @@ function Pi(t) {
|
|
|
155
155
|
if (n !== null) {
|
|
156
156
|
e.e = null;
|
|
157
157
|
for (var i of n)
|
|
158
|
-
|
|
158
|
+
Zi(i);
|
|
159
159
|
}
|
|
160
160
|
return t !== void 0 && (e.x = t), e.i = !0, Y = e.p, t ?? /** @type {T} */
|
|
161
161
|
{};
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function Li() {
|
|
164
164
|
return !0;
|
|
165
165
|
}
|
|
166
166
|
let Be = [];
|
|
167
|
-
function
|
|
167
|
+
function xi() {
|
|
168
168
|
var t = Be;
|
|
169
|
-
Be = [],
|
|
169
|
+
Be = [], Xr(t);
|
|
170
170
|
}
|
|
171
171
|
function Xe(t) {
|
|
172
172
|
if (Be.length === 0 && !St) {
|
|
173
173
|
var e = Be;
|
|
174
174
|
queueMicrotask(() => {
|
|
175
|
-
e === Be &&
|
|
175
|
+
e === Be && xi();
|
|
176
176
|
});
|
|
177
177
|
}
|
|
178
178
|
Be.push(t);
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function mo() {
|
|
181
181
|
for (; Be.length > 0; )
|
|
182
|
-
|
|
182
|
+
xi();
|
|
183
183
|
}
|
|
184
|
-
function
|
|
184
|
+
function Mi(t) {
|
|
185
185
|
var e = T;
|
|
186
186
|
if (e === null)
|
|
187
187
|
return w.f |= De, t;
|
|
@@ -205,32 +205,32 @@ function Ne(t, e) {
|
|
|
205
205
|
}
|
|
206
206
|
throw t;
|
|
207
207
|
}
|
|
208
|
-
const
|
|
208
|
+
const _o = -7169;
|
|
209
209
|
function R(t, e) {
|
|
210
|
-
t.f = t.f &
|
|
210
|
+
t.f = t.f & _o | e;
|
|
211
211
|
}
|
|
212
|
-
function
|
|
212
|
+
function On(t) {
|
|
213
213
|
(t.f & J) !== 0 || t.deps === null ? R(t, M) : R(t, oe);
|
|
214
214
|
}
|
|
215
|
-
function
|
|
215
|
+
function Ni(t) {
|
|
216
216
|
if (t !== null)
|
|
217
217
|
for (const e of t)
|
|
218
|
-
(e.f & D) === 0 || (e.f & Qe) === 0 || (e.f ^= Qe,
|
|
218
|
+
(e.f & D) === 0 || (e.f & Qe) === 0 || (e.f ^= Qe, Ni(
|
|
219
219
|
/** @type {Derived} */
|
|
220
220
|
e.deps
|
|
221
221
|
));
|
|
222
222
|
}
|
|
223
|
-
function
|
|
224
|
-
(t.f & N) !== 0 ? e.add(t) : (t.f & oe) !== 0 && n.add(t),
|
|
223
|
+
function Di(t, e, n) {
|
|
224
|
+
(t.f & N) !== 0 ? e.add(t) : (t.f & oe) !== 0 && n.add(t), Ni(t.deps), R(t, M);
|
|
225
225
|
}
|
|
226
226
|
const Dt = /* @__PURE__ */ new Set();
|
|
227
|
-
let O = null, ie = null, F = [], en = null, St = !1, mt = null,
|
|
228
|
-
var Le, rt, qe, ot, st, lt, xe, le, at, B,
|
|
229
|
-
const
|
|
227
|
+
let O = null, ie = null, F = [], en = null, St = !1, mt = null, bo = 1;
|
|
228
|
+
var Le, rt, qe, ot, st, lt, xe, le, at, B, fn, hn, pn, vn;
|
|
229
|
+
const Fn = class Fn {
|
|
230
230
|
constructor() {
|
|
231
231
|
b(this, B);
|
|
232
232
|
// for debugging. TODO remove once async is stable
|
|
233
|
-
p(this, "id",
|
|
233
|
+
p(this, "id", bo++);
|
|
234
234
|
/**
|
|
235
235
|
* The current values of any sources that are updated in this batch
|
|
236
236
|
* They keys of this map are identical to `this.#previous`
|
|
@@ -306,9 +306,9 @@ const Vn = class Vn {
|
|
|
306
306
|
if (n) {
|
|
307
307
|
c(this, le).delete(e);
|
|
308
308
|
for (var i of n.d)
|
|
309
|
-
R(i, N),
|
|
309
|
+
R(i, N), de(i);
|
|
310
310
|
for (i of n.m)
|
|
311
|
-
R(i, oe),
|
|
311
|
+
R(i, oe), de(i);
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
/**
|
|
@@ -320,14 +320,14 @@ const Vn = class Vn {
|
|
|
320
320
|
var n = mt = [], i = [];
|
|
321
321
|
for (const r of e)
|
|
322
322
|
E(this, B, hn).call(this, r, n, i);
|
|
323
|
-
if (mt = null, E(this, B,
|
|
323
|
+
if (mt = null, E(this, B, fn).call(this)) {
|
|
324
324
|
E(this, B, pn).call(this, i), E(this, B, pn).call(this, n);
|
|
325
325
|
for (const [r, o] of c(this, le))
|
|
326
|
-
|
|
326
|
+
ji(r, o);
|
|
327
327
|
} else {
|
|
328
328
|
O = null;
|
|
329
329
|
for (const r of c(this, Le)) r(this);
|
|
330
|
-
c(this, Le).clear(), c(this, qe) === 0 && E(this, B, vn).call(this),
|
|
330
|
+
c(this, Le).clear(), c(this, qe) === 0 && E(this, B, vn).call(this), ei(i), ei(n), c(this, lt).clear(), c(this, xe).clear(), c(this, st)?.resolve();
|
|
331
331
|
}
|
|
332
332
|
ie = null;
|
|
333
333
|
}
|
|
@@ -348,7 +348,7 @@ const Vn = class Vn {
|
|
|
348
348
|
}
|
|
349
349
|
flush() {
|
|
350
350
|
if (F.length > 0)
|
|
351
|
-
O = this,
|
|
351
|
+
O = this, zi();
|
|
352
352
|
else if (c(this, qe) === 0 && !this.is_fork) {
|
|
353
353
|
for (const e of c(this, Le)) e(this);
|
|
354
354
|
c(this, Le).clear(), E(this, B, vn).call(this), c(this, st)?.resolve();
|
|
@@ -372,14 +372,14 @@ const Vn = class Vn {
|
|
|
372
372
|
*/
|
|
373
373
|
decrement(e) {
|
|
374
374
|
m(this, qe, c(this, qe) - 1), e && m(this, ot, c(this, ot) - 1), !c(this, at) && (m(this, at, !0), Xe(() => {
|
|
375
|
-
m(this, at, !1), E(this, B,
|
|
375
|
+
m(this, at, !1), E(this, B, fn).call(this) ? F.length > 0 && this.flush() : this.revive();
|
|
376
376
|
}));
|
|
377
377
|
}
|
|
378
378
|
revive() {
|
|
379
379
|
for (const e of c(this, lt))
|
|
380
|
-
c(this, xe).delete(e), R(e, N),
|
|
380
|
+
c(this, xe).delete(e), R(e, N), de(e);
|
|
381
381
|
for (const e of c(this, xe))
|
|
382
|
-
R(e, oe),
|
|
382
|
+
R(e, oe), de(e);
|
|
383
383
|
this.flush();
|
|
384
384
|
}
|
|
385
385
|
/** @param {(batch: Batch) => void} fn */
|
|
@@ -391,11 +391,11 @@ const Vn = class Vn {
|
|
|
391
391
|
c(this, rt).add(e);
|
|
392
392
|
}
|
|
393
393
|
settled() {
|
|
394
|
-
return (c(this, st) ?? m(this, st,
|
|
394
|
+
return (c(this, st) ?? m(this, st, ki())).promise;
|
|
395
395
|
}
|
|
396
396
|
static ensure() {
|
|
397
397
|
if (O === null) {
|
|
398
|
-
const e = O = new
|
|
398
|
+
const e = O = new Fn();
|
|
399
399
|
Dt.add(O), St || Xe(() => {
|
|
400
400
|
O === e && e.flush();
|
|
401
401
|
});
|
|
@@ -405,7 +405,7 @@ const Vn = class Vn {
|
|
|
405
405
|
apply() {
|
|
406
406
|
}
|
|
407
407
|
};
|
|
408
|
-
Le = new WeakMap(), rt = new WeakMap(), qe = new WeakMap(), ot = new WeakMap(), st = new WeakMap(), lt = new WeakMap(), xe = new WeakMap(), le = new WeakMap(), at = new WeakMap(), B = new WeakSet(),
|
|
408
|
+
Le = new WeakMap(), rt = new WeakMap(), qe = new WeakMap(), ot = new WeakMap(), st = new WeakMap(), lt = new WeakMap(), xe = new WeakMap(), le = new WeakMap(), at = new WeakMap(), B = new WeakSet(), fn = function() {
|
|
409
409
|
return this.is_fork || c(this, ot) > 0;
|
|
410
410
|
}, /**
|
|
411
411
|
* Traverse the effect tree, executing effects or stashing
|
|
@@ -419,10 +419,10 @@ hn = function(e, n, i) {
|
|
|
419
419
|
for (var r = e.first; r !== null; ) {
|
|
420
420
|
var o = r.f, s = (o & (he | je)) !== 0, l = s && (o & M) !== 0, a = (o & Q) !== 0, u = l || c(this, le).has(r);
|
|
421
421
|
if (!u && r.fn !== null) {
|
|
422
|
-
s ? a || (r.f ^= M) : (o & bt) !== 0 ? n.push(r) : (o & (pt |
|
|
423
|
-
var
|
|
424
|
-
if (
|
|
425
|
-
r =
|
|
422
|
+
s ? a || (r.f ^= M) : (o & bt) !== 0 ? n.push(r) : (o & (pt | $n)) !== 0 && a ? i.push(r) : xt(r) && (_t(r), (o & Fe) !== 0 && (c(this, xe).add(r), a && R(r, N)));
|
|
423
|
+
var d = r.first;
|
|
424
|
+
if (d !== null) {
|
|
425
|
+
r = d;
|
|
426
426
|
continue;
|
|
427
427
|
}
|
|
428
428
|
}
|
|
@@ -440,7 +440,7 @@ hn = function(e, n, i) {
|
|
|
440
440
|
*/
|
|
441
441
|
pn = function(e) {
|
|
442
442
|
for (var n = 0; n < e.length; n += 1)
|
|
443
|
-
|
|
443
|
+
Di(e[n], c(this, lt), c(this, xe));
|
|
444
444
|
}, vn = function() {
|
|
445
445
|
var o;
|
|
446
446
|
if (Dt.size > 1) {
|
|
@@ -452,10 +452,10 @@ pn = function(e) {
|
|
|
452
452
|
continue;
|
|
453
453
|
}
|
|
454
454
|
const l = [];
|
|
455
|
-
for (const [u,
|
|
455
|
+
for (const [u, d] of this.current) {
|
|
456
456
|
if (s.current.has(u))
|
|
457
|
-
if (i &&
|
|
458
|
-
s.current.set(u,
|
|
457
|
+
if (i && d !== s.current.get(u))
|
|
458
|
+
s.current.set(u, d);
|
|
459
459
|
else
|
|
460
460
|
continue;
|
|
461
461
|
l.push(u);
|
|
@@ -466,9 +466,9 @@ pn = function(e) {
|
|
|
466
466
|
if (a.length > 0) {
|
|
467
467
|
var r = F;
|
|
468
468
|
F = [];
|
|
469
|
-
const u = /* @__PURE__ */ new Set(),
|
|
469
|
+
const u = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Map();
|
|
470
470
|
for (const h of l)
|
|
471
|
-
|
|
471
|
+
Vi(h, a, u, d);
|
|
472
472
|
if (F.length > 0) {
|
|
473
473
|
O = s, s.apply();
|
|
474
474
|
for (const h of F)
|
|
@@ -482,29 +482,29 @@ pn = function(e) {
|
|
|
482
482
|
}
|
|
483
483
|
c(this, le).clear(), Dt.delete(this);
|
|
484
484
|
};
|
|
485
|
-
let ke =
|
|
485
|
+
let ke = Fn;
|
|
486
486
|
function gn(t) {
|
|
487
487
|
var e = St;
|
|
488
488
|
St = !0;
|
|
489
489
|
try {
|
|
490
490
|
for (var n; ; ) {
|
|
491
|
-
if (
|
|
491
|
+
if (mo(), F.length === 0 && (O?.flush(), F.length === 0))
|
|
492
492
|
return en = null, /** @type {T} */
|
|
493
493
|
n;
|
|
494
|
-
|
|
494
|
+
zi();
|
|
495
495
|
}
|
|
496
496
|
} finally {
|
|
497
497
|
St = e;
|
|
498
498
|
}
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function zi() {
|
|
501
501
|
var t = null;
|
|
502
502
|
try {
|
|
503
503
|
for (var e = 0; F.length > 0; ) {
|
|
504
504
|
var n = ke.ensure();
|
|
505
505
|
if (e++ > 1e3) {
|
|
506
506
|
var i, r;
|
|
507
|
-
|
|
507
|
+
yo();
|
|
508
508
|
}
|
|
509
509
|
n.process(F), ze.clear();
|
|
510
510
|
}
|
|
@@ -512,20 +512,20 @@ function Di() {
|
|
|
512
512
|
F = [], en = null, mt = null;
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function yo() {
|
|
516
516
|
try {
|
|
517
|
-
|
|
517
|
+
oo();
|
|
518
518
|
} catch (t) {
|
|
519
519
|
Ne(t, en);
|
|
520
520
|
}
|
|
521
521
|
}
|
|
522
522
|
let ye = null;
|
|
523
|
-
function
|
|
523
|
+
function ei(t) {
|
|
524
524
|
var e = t.length;
|
|
525
525
|
if (e !== 0) {
|
|
526
526
|
for (var n = 0; n < e; ) {
|
|
527
527
|
var i = t[n++];
|
|
528
|
-
if ((i.f & ($e | Q)) === 0 && xt(i) && (ye = /* @__PURE__ */ new Set(), _t(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null &&
|
|
528
|
+
if ((i.f & ($e | Q)) === 0 && xt(i) && (ye = /* @__PURE__ */ new Set(), _t(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && ir(i), ye?.size > 0)) {
|
|
529
529
|
ze.clear();
|
|
530
530
|
for (const r of ye) {
|
|
531
531
|
if ((r.f & ($e | Q)) !== 0) continue;
|
|
@@ -544,30 +544,30 @@ function Zn(t) {
|
|
|
544
544
|
ye = null;
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
|
-
function
|
|
547
|
+
function Vi(t, e, n, i) {
|
|
548
548
|
if (!n.has(t) && (n.add(t), t.reactions !== null))
|
|
549
549
|
for (const r of t.reactions) {
|
|
550
550
|
const o = r.f;
|
|
551
|
-
(o & D) !== 0 ?
|
|
551
|
+
(o & D) !== 0 ? Vi(
|
|
552
552
|
/** @type {Derived} */
|
|
553
553
|
r,
|
|
554
554
|
e,
|
|
555
555
|
n,
|
|
556
556
|
i
|
|
557
|
-
) : (o & (
|
|
557
|
+
) : (o & (kn | Fe)) !== 0 && (o & N) === 0 && Fi(r, e, i) && (R(r, N), de(
|
|
558
558
|
/** @type {Effect} */
|
|
559
559
|
r
|
|
560
560
|
));
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function Fi(t, e, n) {
|
|
564
564
|
const i = n.get(t);
|
|
565
565
|
if (i !== void 0) return i;
|
|
566
566
|
if (t.deps !== null)
|
|
567
567
|
for (const r of t.deps) {
|
|
568
568
|
if (ht.call(e, r))
|
|
569
569
|
return !0;
|
|
570
|
-
if ((r.f & D) !== 0 &&
|
|
570
|
+
if ((r.f & D) !== 0 && Fi(
|
|
571
571
|
/** @type {Derived} */
|
|
572
572
|
r,
|
|
573
573
|
e,
|
|
@@ -581,9 +581,9 @@ function Vi(t, e, n) {
|
|
|
581
581
|
}
|
|
582
582
|
return n.set(t, !1), !1;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function de(t) {
|
|
585
585
|
var e = en = t, n = e.b;
|
|
586
|
-
if (n?.is_pending && (t.f & (bt | pt |
|
|
586
|
+
if (n?.is_pending && (t.f & (bt | pt | $n)) !== 0 && (t.f & Ze) === 0) {
|
|
587
587
|
n.defer_effect(t);
|
|
588
588
|
return;
|
|
589
589
|
}
|
|
@@ -600,29 +600,29 @@ function fe(t) {
|
|
|
600
600
|
}
|
|
601
601
|
F.push(e);
|
|
602
602
|
}
|
|
603
|
-
function
|
|
603
|
+
function ji(t, e) {
|
|
604
604
|
if (!((t.f & he) !== 0 && (t.f & M) !== 0)) {
|
|
605
605
|
(t.f & N) !== 0 ? e.d.push(t) : (t.f & oe) !== 0 && e.m.push(t), R(t, M);
|
|
606
606
|
for (var n = t.first; n !== null; )
|
|
607
|
-
|
|
607
|
+
ji(n, e), n = n.next;
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
|
-
function
|
|
610
|
+
function wo(t) {
|
|
611
611
|
let e = 0, n = Lt(0), i;
|
|
612
612
|
return () => {
|
|
613
|
-
|
|
613
|
+
xn() && (f(n), Mn(() => (e === 0 && (i = Dn(() => t(() => At(n)))), e += 1, () => {
|
|
614
614
|
Xe(() => {
|
|
615
615
|
e -= 1, e === 0 && (i?.(), i = void 0, At(n));
|
|
616
616
|
});
|
|
617
617
|
})));
|
|
618
618
|
};
|
|
619
619
|
}
|
|
620
|
-
var
|
|
621
|
-
function
|
|
622
|
-
new
|
|
620
|
+
var To = vt | et;
|
|
621
|
+
function Io(t, e, n, i) {
|
|
622
|
+
new So(t, e, n, i);
|
|
623
623
|
}
|
|
624
|
-
var U, Ct, ae, We, V, ce, q, te, Te, Ye, Me, ct, ut,
|
|
625
|
-
class
|
|
624
|
+
var U, Ct, ae, We, V, ce, q, te, Te, Ye, Me, ct, ut, dt, Ie, Kt, C, Hi, Bi, Gi, mn, Ft, jt, _n;
|
|
625
|
+
class So {
|
|
626
626
|
/**
|
|
627
627
|
* @param {TemplateNode} node
|
|
628
628
|
* @param {BoundaryProps} props
|
|
@@ -664,7 +664,7 @@ class wo {
|
|
|
664
664
|
/** @type {Set<Effect>} */
|
|
665
665
|
b(this, ut, /* @__PURE__ */ new Set());
|
|
666
666
|
/** @type {Set<Effect>} */
|
|
667
|
-
b(this,
|
|
667
|
+
b(this, dt, /* @__PURE__ */ new Set());
|
|
668
668
|
/**
|
|
669
669
|
* A source containing the number of pending async deriveds/expressions.
|
|
670
670
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -673,7 +673,7 @@ class wo {
|
|
|
673
673
|
* @type {Source<number> | null}
|
|
674
674
|
*/
|
|
675
675
|
b(this, Ie, null);
|
|
676
|
-
b(this, Kt,
|
|
676
|
+
b(this, Kt, wo(() => (m(this, Ie, Lt(c(this, Ye))), () => {
|
|
677
677
|
m(this, Ie, null);
|
|
678
678
|
})));
|
|
679
679
|
m(this, U, e), m(this, ae, n), m(this, We, (o) => {
|
|
@@ -683,28 +683,28 @@ class wo {
|
|
|
683
683
|
);
|
|
684
684
|
s.b = this, s.f |= un, i(o);
|
|
685
685
|
}), this.parent = /** @type {Effect} */
|
|
686
|
-
T.b, this.transform_error = r ?? this.parent?.transform_error ?? ((o) => o), m(this, V,
|
|
686
|
+
T.b, this.transform_error = r ?? this.parent?.transform_error ?? ((o) => o), m(this, V, tr(() => {
|
|
687
687
|
if ($) {
|
|
688
688
|
const o = (
|
|
689
689
|
/** @type {Comment} */
|
|
690
690
|
c(this, Ct)
|
|
691
691
|
);
|
|
692
|
-
|
|
693
|
-
const s = o.data ===
|
|
694
|
-
if (o.data.startsWith(
|
|
695
|
-
const a = JSON.parse(o.data.slice(
|
|
696
|
-
E(this, C,
|
|
697
|
-
} else s ? E(this, C,
|
|
692
|
+
En();
|
|
693
|
+
const s = o.data === Ii;
|
|
694
|
+
if (o.data.startsWith(Xn)) {
|
|
695
|
+
const a = JSON.parse(o.data.slice(Xn.length));
|
|
696
|
+
E(this, C, Bi).call(this, a);
|
|
697
|
+
} else s ? E(this, C, Gi).call(this) : E(this, C, Hi).call(this);
|
|
698
698
|
} else
|
|
699
699
|
E(this, C, mn).call(this);
|
|
700
|
-
},
|
|
700
|
+
}, To)), $ && m(this, U, I);
|
|
701
701
|
}
|
|
702
702
|
/**
|
|
703
703
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
704
704
|
* @param {Effect} effect
|
|
705
705
|
*/
|
|
706
706
|
defer_effect(e) {
|
|
707
|
-
|
|
707
|
+
Di(e, c(this, ut), c(this, dt));
|
|
708
708
|
}
|
|
709
709
|
/**
|
|
710
710
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -728,7 +728,7 @@ class wo {
|
|
|
728
728
|
}));
|
|
729
729
|
}
|
|
730
730
|
get_effect_pending() {
|
|
731
|
-
return c(this, Kt).call(this),
|
|
731
|
+
return c(this, Kt).call(this), f(
|
|
732
732
|
/** @type {Source<number>} */
|
|
733
733
|
c(this, Ie)
|
|
734
734
|
);
|
|
@@ -742,14 +742,14 @@ class wo {
|
|
|
742
742
|
c(this, ce) && (H(c(this, ce)), m(this, ce, null)), c(this, q) && (H(c(this, q)), m(this, q, null)), c(this, te) && (H(c(this, te)), m(this, te, null)), $ && (se(
|
|
743
743
|
/** @type {TemplateNode} */
|
|
744
744
|
c(this, Ct)
|
|
745
|
-
),
|
|
745
|
+
), Ei(), se(Oi()));
|
|
746
746
|
var r = !1, o = !1;
|
|
747
747
|
const s = () => {
|
|
748
748
|
if (r) {
|
|
749
|
-
|
|
749
|
+
fo();
|
|
750
750
|
return;
|
|
751
751
|
}
|
|
752
|
-
r = !0, o &&
|
|
752
|
+
r = !0, o && uo(), c(this, te) !== null && $t(c(this, te), () => {
|
|
753
753
|
m(this, te, null);
|
|
754
754
|
}), E(this, C, jt).call(this, () => {
|
|
755
755
|
ke.ensure(), E(this, C, mn).call(this);
|
|
@@ -800,7 +800,7 @@ class wo {
|
|
|
800
800
|
});
|
|
801
801
|
}
|
|
802
802
|
}
|
|
803
|
-
U = new WeakMap(), Ct = new WeakMap(), ae = new WeakMap(), We = new WeakMap(), V = new WeakMap(), ce = new WeakMap(), q = new WeakMap(), te = new WeakMap(), Te = new WeakMap(), Ye = new WeakMap(), Me = new WeakMap(), ct = new WeakMap(), ut = new WeakMap(),
|
|
803
|
+
U = new WeakMap(), Ct = new WeakMap(), ae = new WeakMap(), We = new WeakMap(), V = new WeakMap(), ce = new WeakMap(), q = new WeakMap(), te = new WeakMap(), Te = new WeakMap(), Ye = new WeakMap(), Me = new WeakMap(), ct = new WeakMap(), ut = new WeakMap(), dt = new WeakMap(), Ie = new WeakMap(), Kt = new WeakMap(), C = new WeakSet(), Hi = function() {
|
|
804
804
|
try {
|
|
805
805
|
m(this, ce, we(() => c(this, We).call(this, c(this, U))));
|
|
806
806
|
} catch (e) {
|
|
@@ -809,7 +809,7 @@ U = new WeakMap(), Ct = new WeakMap(), ae = new WeakMap(), We = new WeakMap(), V
|
|
|
809
809
|
}, /**
|
|
810
810
|
* @param {unknown} error The deserialized error from the server's hydration comment
|
|
811
811
|
*/
|
|
812
|
-
|
|
812
|
+
Bi = function(e) {
|
|
813
813
|
const n = c(this, ae).failed;
|
|
814
814
|
n && m(this, te, we(() => {
|
|
815
815
|
n(
|
|
@@ -819,7 +819,7 @@ Hi = function(e) {
|
|
|
819
819
|
}
|
|
820
820
|
);
|
|
821
821
|
}));
|
|
822
|
-
},
|
|
822
|
+
}, Gi = function() {
|
|
823
823
|
const e = c(this, ae).pending;
|
|
824
824
|
e && (this.is_pending = !0, m(this, q, we(() => e(c(this, U)))), Xe(() => {
|
|
825
825
|
var n = m(this, Te, document.createDocumentFragment()), i = Ee();
|
|
@@ -837,7 +837,7 @@ Hi = function(e) {
|
|
|
837
837
|
c(this, We).call(this, c(this, U));
|
|
838
838
|
})), c(this, Me) > 0) {
|
|
839
839
|
var e = m(this, Te, document.createDocumentFragment());
|
|
840
|
-
|
|
840
|
+
sr(c(this, ce), e);
|
|
841
841
|
const n = (
|
|
842
842
|
/** @type {(anchor: Node) => void} */
|
|
843
843
|
c(this, ae).pending
|
|
@@ -851,23 +851,23 @@ Hi = function(e) {
|
|
|
851
851
|
}, Ft = function() {
|
|
852
852
|
this.is_pending = !1;
|
|
853
853
|
for (const e of c(this, ut))
|
|
854
|
-
R(e, N),
|
|
855
|
-
for (const e of c(this,
|
|
856
|
-
R(e, oe),
|
|
857
|
-
c(this, ut).clear(), c(this,
|
|
854
|
+
R(e, N), de(e);
|
|
855
|
+
for (const e of c(this, dt))
|
|
856
|
+
R(e, oe), de(e);
|
|
857
|
+
c(this, ut).clear(), c(this, dt).clear();
|
|
858
858
|
}, /**
|
|
859
859
|
* @template T
|
|
860
860
|
* @param {() => T} fn
|
|
861
861
|
*/
|
|
862
862
|
jt = function(e) {
|
|
863
863
|
var n = T, i = w, r = Y;
|
|
864
|
-
|
|
864
|
+
fe(c(this, V)), ee(c(this, V)), gt(c(this, V).ctx);
|
|
865
865
|
try {
|
|
866
866
|
return e();
|
|
867
867
|
} catch (o) {
|
|
868
|
-
return
|
|
868
|
+
return Mi(o), null;
|
|
869
869
|
} finally {
|
|
870
|
-
|
|
870
|
+
fe(n), ee(i), gt(r);
|
|
871
871
|
}
|
|
872
872
|
}, /**
|
|
873
873
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
@@ -884,8 +884,8 @@ _n = function(e) {
|
|
|
884
884
|
m(this, q, null);
|
|
885
885
|
}), c(this, Te) && (c(this, U).before(c(this, Te)), m(this, Te, null)));
|
|
886
886
|
};
|
|
887
|
-
function
|
|
888
|
-
const r =
|
|
887
|
+
function Ao(t, e, n, i) {
|
|
888
|
+
const r = Cn;
|
|
889
889
|
var o = t.filter((h) => !h.settled);
|
|
890
890
|
if (n.length === 0 && o.length === 0) {
|
|
891
891
|
i(e.map(r));
|
|
@@ -894,7 +894,7 @@ function To(t, e, n, i) {
|
|
|
894
894
|
var s = (
|
|
895
895
|
/** @type {Effect} */
|
|
896
896
|
T
|
|
897
|
-
), l =
|
|
897
|
+
), l = $o(), a = o.length === 1 ? o[0].promise : o.length > 1 ? Promise.all(o.map((h) => h.promise)) : null;
|
|
898
898
|
function u(h) {
|
|
899
899
|
l();
|
|
900
900
|
try {
|
|
@@ -908,21 +908,21 @@ function To(t, e, n, i) {
|
|
|
908
908
|
a.then(() => u(e.map(r)));
|
|
909
909
|
return;
|
|
910
910
|
}
|
|
911
|
-
function
|
|
912
|
-
l(), Promise.all(n.map((h) => /* @__PURE__ */
|
|
911
|
+
function d() {
|
|
912
|
+
l(), Promise.all(n.map((h) => /* @__PURE__ */ Eo(h))).then((h) => u([...e.map(r), ...h])).catch((h) => Ne(h, s));
|
|
913
913
|
}
|
|
914
|
-
a ? a.then(
|
|
914
|
+
a ? a.then(d) : d();
|
|
915
915
|
}
|
|
916
|
-
function
|
|
916
|
+
function $o() {
|
|
917
917
|
var t = T, e = w, n = Y, i = O;
|
|
918
918
|
return function(o = !0) {
|
|
919
|
-
|
|
919
|
+
fe(t), ee(e), gt(n), o && i?.activate();
|
|
920
920
|
};
|
|
921
921
|
}
|
|
922
922
|
function bn(t = !0) {
|
|
923
|
-
|
|
923
|
+
fe(null), ee(null), gt(null), t && O?.deactivate();
|
|
924
924
|
}
|
|
925
|
-
function
|
|
925
|
+
function ko() {
|
|
926
926
|
var t = (
|
|
927
927
|
/** @type {Boundary} */
|
|
928
928
|
/** @type {Effect} */
|
|
@@ -936,7 +936,7 @@ function So() {
|
|
|
936
936
|
};
|
|
937
937
|
}
|
|
938
938
|
// @__NO_SIDE_EFFECTS__
|
|
939
|
-
function
|
|
939
|
+
function Cn(t) {
|
|
940
940
|
var e = D | N, n = w !== null && (w.f & D) !== 0 ? (
|
|
941
941
|
/** @type {Derived} */
|
|
942
942
|
w
|
|
@@ -945,7 +945,7 @@ function On(t) {
|
|
|
945
945
|
ctx: Y,
|
|
946
946
|
deps: null,
|
|
947
947
|
effects: null,
|
|
948
|
-
equals:
|
|
948
|
+
equals: Ci,
|
|
949
949
|
f: e,
|
|
950
950
|
fn: t,
|
|
951
951
|
reactions: null,
|
|
@@ -960,9 +960,9 @@ function On(t) {
|
|
|
960
960
|
};
|
|
961
961
|
}
|
|
962
962
|
// @__NO_SIDE_EFFECTS__
|
|
963
|
-
function
|
|
963
|
+
function Eo(t, e, n) {
|
|
964
964
|
/** @type {Effect | null} */
|
|
965
|
-
T === null &&
|
|
965
|
+
T === null && to();
|
|
966
966
|
var r = (
|
|
967
967
|
/** @type {Promise<V>} */
|
|
968
968
|
/** @type {unknown} */
|
|
@@ -971,8 +971,8 @@ function Ao(t, e, n) {
|
|
|
971
971
|
/** @type {V} */
|
|
972
972
|
x
|
|
973
973
|
), s = !w, l = /* @__PURE__ */ new Map();
|
|
974
|
-
return
|
|
975
|
-
var a =
|
|
974
|
+
return jo(() => {
|
|
975
|
+
var a = ki();
|
|
976
976
|
r = a.promise;
|
|
977
977
|
try {
|
|
978
978
|
Promise.resolve(t()).then(a.resolve, a.reject).finally(bn);
|
|
@@ -984,7 +984,7 @@ function Ao(t, e, n) {
|
|
|
984
984
|
O
|
|
985
985
|
);
|
|
986
986
|
if (s) {
|
|
987
|
-
var
|
|
987
|
+
var d = ko();
|
|
988
988
|
l.get(u)?.reject(He), l.delete(u), l.set(u, a);
|
|
989
989
|
}
|
|
990
990
|
const h = (v, y = void 0) => {
|
|
@@ -997,28 +997,28 @@ function Ao(t, e, n) {
|
|
|
997
997
|
A.reject(He);
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
|
-
|
|
1000
|
+
d && d();
|
|
1001
1001
|
};
|
|
1002
1002
|
a.promise.then(h, (v) => h(null, v || "unknown"));
|
|
1003
|
-
}),
|
|
1003
|
+
}), zo(() => {
|
|
1004
1004
|
for (const a of l.values())
|
|
1005
1005
|
a.reject(He);
|
|
1006
1006
|
}), new Promise((a) => {
|
|
1007
|
-
function u(
|
|
1007
|
+
function u(d) {
|
|
1008
1008
|
function h() {
|
|
1009
|
-
|
|
1009
|
+
d === r ? a(o) : u(r);
|
|
1010
1010
|
}
|
|
1011
|
-
|
|
1011
|
+
d.then(h, h);
|
|
1012
1012
|
}
|
|
1013
1013
|
u(r);
|
|
1014
1014
|
});
|
|
1015
1015
|
}
|
|
1016
1016
|
// @__NO_SIDE_EFFECTS__
|
|
1017
|
-
function
|
|
1018
|
-
const e = /* @__PURE__ */
|
|
1019
|
-
return
|
|
1017
|
+
function ti(t) {
|
|
1018
|
+
const e = /* @__PURE__ */ Cn(t);
|
|
1019
|
+
return lr(e), e;
|
|
1020
1020
|
}
|
|
1021
|
-
function
|
|
1021
|
+
function Oo(t) {
|
|
1022
1022
|
var e = t.effects;
|
|
1023
1023
|
if (e !== null) {
|
|
1024
1024
|
t.effects = null;
|
|
@@ -1029,7 +1029,7 @@ function $o(t) {
|
|
|
1029
1029
|
);
|
|
1030
1030
|
}
|
|
1031
1031
|
}
|
|
1032
|
-
function
|
|
1032
|
+
function Co(t) {
|
|
1033
1033
|
for (var e = t.parent; e !== null; ) {
|
|
1034
1034
|
if ((e.f & D) === 0)
|
|
1035
1035
|
return (e.f & $e) === 0 ? (
|
|
@@ -1040,44 +1040,44 @@ function ko(t) {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
return null;
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1043
|
+
function Pn(t) {
|
|
1044
1044
|
var e, n = T;
|
|
1045
|
-
|
|
1045
|
+
fe(Co(t));
|
|
1046
1046
|
try {
|
|
1047
|
-
t.f &= ~Qe,
|
|
1047
|
+
t.f &= ~Qe, Oo(t), e = dr(t);
|
|
1048
1048
|
} finally {
|
|
1049
|
-
|
|
1049
|
+
fe(n);
|
|
1050
1050
|
}
|
|
1051
1051
|
return e;
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1054
|
-
var e =
|
|
1055
|
-
if (!t.equals(e) && (t.wv =
|
|
1053
|
+
function Ui(t) {
|
|
1054
|
+
var e = Pn(t);
|
|
1055
|
+
if (!t.equals(e) && (t.wv = cr(), (!O?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
1056
1056
|
R(t, M);
|
|
1057
1057
|
return;
|
|
1058
1058
|
}
|
|
1059
|
-
Ve || (ie !== null ? (
|
|
1059
|
+
Ve || (ie !== null ? (xn() || O?.is_fork) && ie.set(t, e) : On(t));
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function Po(t) {
|
|
1062
1062
|
if (t.effects !== null)
|
|
1063
1063
|
for (const e of t.effects)
|
|
1064
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(He), e.teardown =
|
|
1064
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(He), e.teardown = Kr, e.ac = null, Et(e, 0), Nn(e));
|
|
1065
1065
|
}
|
|
1066
|
-
function
|
|
1066
|
+
function qi(t) {
|
|
1067
1067
|
if (t.effects !== null)
|
|
1068
1068
|
for (const e of t.effects)
|
|
1069
1069
|
e.teardown && _t(e);
|
|
1070
1070
|
}
|
|
1071
1071
|
let yn = /* @__PURE__ */ new Set();
|
|
1072
1072
|
const ze = /* @__PURE__ */ new Map();
|
|
1073
|
-
let
|
|
1073
|
+
let Wi = !1;
|
|
1074
1074
|
function Lt(t, e) {
|
|
1075
1075
|
var n = {
|
|
1076
1076
|
f: 0,
|
|
1077
1077
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
1078
1078
|
v: t,
|
|
1079
1079
|
reactions: null,
|
|
1080
|
-
equals:
|
|
1080
|
+
equals: Ci,
|
|
1081
1081
|
rv: 0,
|
|
1082
1082
|
wv: 0
|
|
1083
1083
|
};
|
|
@@ -1086,17 +1086,17 @@ function Lt(t, e) {
|
|
|
1086
1086
|
// @__NO_SIDE_EFFECTS__
|
|
1087
1087
|
function P(t, e) {
|
|
1088
1088
|
const n = Lt(t);
|
|
1089
|
-
return
|
|
1089
|
+
return lr(n), n;
|
|
1090
1090
|
}
|
|
1091
1091
|
// @__NO_SIDE_EFFECTS__
|
|
1092
|
-
function
|
|
1092
|
+
function Ro(t, e = !1, n = !0) {
|
|
1093
1093
|
const i = Lt(t);
|
|
1094
|
-
return e || (i.equals =
|
|
1094
|
+
return e || (i.equals = vo), i;
|
|
1095
1095
|
}
|
|
1096
1096
|
function k(t, e, n = !1) {
|
|
1097
1097
|
w !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1098
1098
|
// to ensure we error if state is set inside an inspect effect
|
|
1099
|
-
(!re || (w.f &
|
|
1099
|
+
(!re || (w.f & Qn) !== 0) && Li() && (w.f & (D | Fe | kn | Qn)) !== 0 && (Z === null || !ht.call(Z, t)) && co();
|
|
1100
1100
|
let i = n ? Ae(e) : e;
|
|
1101
1101
|
return Yt(t, i);
|
|
1102
1102
|
}
|
|
@@ -1110,14 +1110,14 @@ function Yt(t, e) {
|
|
|
1110
1110
|
/** @type {Derived} */
|
|
1111
1111
|
t
|
|
1112
1112
|
);
|
|
1113
|
-
(t.f & N) !== 0 &&
|
|
1113
|
+
(t.f & N) !== 0 && Pn(r), On(r);
|
|
1114
1114
|
}
|
|
1115
|
-
t.wv =
|
|
1115
|
+
t.wv = cr(), Yi(t, N), T !== null && (T.f & M) !== 0 && (T.f & (he | je)) === 0 && (K === null ? Uo([t]) : K.push(t)), !i.is_fork && yn.size > 0 && !Wi && Lo();
|
|
1116
1116
|
}
|
|
1117
1117
|
return e;
|
|
1118
1118
|
}
|
|
1119
|
-
function
|
|
1120
|
-
|
|
1119
|
+
function Lo() {
|
|
1120
|
+
Wi = !1;
|
|
1121
1121
|
for (const t of yn)
|
|
1122
1122
|
(t.f & M) !== 0 && R(t, oe), xt(t) && _t(t);
|
|
1123
1123
|
yn.clear();
|
|
@@ -1125,7 +1125,7 @@ function Co() {
|
|
|
1125
1125
|
function At(t) {
|
|
1126
1126
|
k(t, t.v + 1);
|
|
1127
1127
|
}
|
|
1128
|
-
function
|
|
1128
|
+
function Yi(t, e) {
|
|
1129
1129
|
var n = t.reactions;
|
|
1130
1130
|
if (n !== null)
|
|
1131
1131
|
for (var i = n.length, r = 0; r < i; r++) {
|
|
@@ -1135,11 +1135,11 @@ function Wi(t, e) {
|
|
|
1135
1135
|
/** @type {Derived} */
|
|
1136
1136
|
o
|
|
1137
1137
|
);
|
|
1138
|
-
ie?.delete(a), (s & Qe) === 0 && (s & J && (o.f |= Qe),
|
|
1138
|
+
ie?.delete(a), (s & Qe) === 0 && (s & J && (o.f |= Qe), Yi(a, oe));
|
|
1139
1139
|
} else l && ((s & Fe) !== 0 && ye !== null && ye.add(
|
|
1140
1140
|
/** @type {Effect} */
|
|
1141
1141
|
o
|
|
1142
|
-
),
|
|
1142
|
+
), de(
|
|
1143
1143
|
/** @type {Effect} */
|
|
1144
1144
|
o
|
|
1145
1145
|
));
|
|
@@ -1148,16 +1148,16 @@ function Wi(t, e) {
|
|
|
1148
1148
|
function Ae(t) {
|
|
1149
1149
|
if (typeof t != "object" || t === null || Vt in t)
|
|
1150
1150
|
return t;
|
|
1151
|
-
const e =
|
|
1152
|
-
if (e !==
|
|
1151
|
+
const e = $i(t);
|
|
1152
|
+
if (e !== Wr && e !== Yr)
|
|
1153
1153
|
return t;
|
|
1154
|
-
var n = /* @__PURE__ */ new Map(), i =
|
|
1154
|
+
var n = /* @__PURE__ */ new Map(), i = Br(t), r = /* @__PURE__ */ P(0), o = Je, s = (l) => {
|
|
1155
1155
|
if (Je === o)
|
|
1156
1156
|
return l();
|
|
1157
1157
|
var a = w, u = Je;
|
|
1158
|
-
ee(null),
|
|
1159
|
-
var
|
|
1160
|
-
return ee(a),
|
|
1158
|
+
ee(null), si(o);
|
|
1159
|
+
var d = l();
|
|
1160
|
+
return ee(a), si(u), d;
|
|
1161
1161
|
};
|
|
1162
1162
|
return i && n.set("length", /* @__PURE__ */ P(
|
|
1163
1163
|
/** @type {any[]} */
|
|
@@ -1167,19 +1167,19 @@ function Ae(t) {
|
|
|
1167
1167
|
t,
|
|
1168
1168
|
{
|
|
1169
1169
|
defineProperty(l, a, u) {
|
|
1170
|
-
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) &&
|
|
1171
|
-
var
|
|
1172
|
-
return
|
|
1170
|
+
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && lo();
|
|
1171
|
+
var d = n.get(a);
|
|
1172
|
+
return d === void 0 ? s(() => {
|
|
1173
1173
|
var h = /* @__PURE__ */ P(u.value);
|
|
1174
1174
|
return n.set(a, h), h;
|
|
1175
|
-
}) : k(
|
|
1175
|
+
}) : k(d, u.value, !0), !0;
|
|
1176
1176
|
},
|
|
1177
1177
|
deleteProperty(l, a) {
|
|
1178
1178
|
var u = n.get(a);
|
|
1179
1179
|
if (u === void 0) {
|
|
1180
1180
|
if (a in l) {
|
|
1181
|
-
const
|
|
1182
|
-
n.set(a,
|
|
1181
|
+
const d = s(() => /* @__PURE__ */ P(x));
|
|
1182
|
+
n.set(a, d), At(r);
|
|
1183
1183
|
}
|
|
1184
1184
|
} else
|
|
1185
1185
|
k(u, x), At(r);
|
|
@@ -1188,12 +1188,12 @@ function Ae(t) {
|
|
|
1188
1188
|
get(l, a, u) {
|
|
1189
1189
|
if (a === Vt)
|
|
1190
1190
|
return t;
|
|
1191
|
-
var
|
|
1192
|
-
if (
|
|
1191
|
+
var d = n.get(a), h = a in l;
|
|
1192
|
+
if (d === void 0 && (!h || it(l, a)?.writable) && (d = s(() => {
|
|
1193
1193
|
var y = Ae(h ? l[a] : x), g = /* @__PURE__ */ P(y);
|
|
1194
1194
|
return g;
|
|
1195
|
-
}), n.set(a,
|
|
1196
|
-
var v = d
|
|
1195
|
+
}), n.set(a, d)), d !== void 0) {
|
|
1196
|
+
var v = f(d);
|
|
1197
1197
|
return v === x ? void 0 : v;
|
|
1198
1198
|
}
|
|
1199
1199
|
return Reflect.get(l, a, u);
|
|
@@ -1201,8 +1201,8 @@ function Ae(t) {
|
|
|
1201
1201
|
getOwnPropertyDescriptor(l, a) {
|
|
1202
1202
|
var u = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1203
1203
|
if (u && "value" in u) {
|
|
1204
|
-
var
|
|
1205
|
-
|
|
1204
|
+
var d = n.get(a);
|
|
1205
|
+
d && (u.value = f(d));
|
|
1206
1206
|
} else if (u === void 0) {
|
|
1207
1207
|
var h = n.get(a), v = h?.v;
|
|
1208
1208
|
if (h !== void 0 && v !== x)
|
|
@@ -1218,19 +1218,19 @@ function Ae(t) {
|
|
|
1218
1218
|
has(l, a) {
|
|
1219
1219
|
if (a === Vt)
|
|
1220
1220
|
return !0;
|
|
1221
|
-
var u = n.get(a),
|
|
1222
|
-
if (u !== void 0 || T !== null && (!
|
|
1221
|
+
var u = n.get(a), d = u !== void 0 && u.v !== x || Reflect.has(l, a);
|
|
1222
|
+
if (u !== void 0 || T !== null && (!d || it(l, a)?.writable)) {
|
|
1223
1223
|
u === void 0 && (u = s(() => {
|
|
1224
|
-
var v =
|
|
1224
|
+
var v = d ? Ae(l[a]) : x, y = /* @__PURE__ */ P(v);
|
|
1225
1225
|
return y;
|
|
1226
1226
|
}), n.set(a, u));
|
|
1227
|
-
var h =
|
|
1227
|
+
var h = f(u);
|
|
1228
1228
|
if (h === x)
|
|
1229
1229
|
return !1;
|
|
1230
1230
|
}
|
|
1231
|
-
return
|
|
1231
|
+
return d;
|
|
1232
1232
|
},
|
|
1233
|
-
set(l, a, u,
|
|
1233
|
+
set(l, a, u, d) {
|
|
1234
1234
|
var h = n.get(a), v = a in l;
|
|
1235
1235
|
if (i && a === "length")
|
|
1236
1236
|
for (var y = u; y < /** @type {Source<number>} */
|
|
@@ -1246,7 +1246,7 @@ function Ae(t) {
|
|
|
1246
1246
|
k(h, A);
|
|
1247
1247
|
}
|
|
1248
1248
|
var S = Reflect.getOwnPropertyDescriptor(l, a);
|
|
1249
|
-
if (S?.set && S.set.call(
|
|
1249
|
+
if (S?.set && S.set.call(d, u), !v) {
|
|
1250
1250
|
if (i && typeof a == "string") {
|
|
1251
1251
|
var z = (
|
|
1252
1252
|
/** @type {Source<number>} */
|
|
@@ -1259,27 +1259,27 @@ function Ae(t) {
|
|
|
1259
1259
|
return !0;
|
|
1260
1260
|
},
|
|
1261
1261
|
ownKeys(l) {
|
|
1262
|
-
|
|
1262
|
+
f(r);
|
|
1263
1263
|
var a = Reflect.ownKeys(l).filter((h) => {
|
|
1264
1264
|
var v = n.get(h);
|
|
1265
1265
|
return v === void 0 || v.v !== x;
|
|
1266
1266
|
});
|
|
1267
|
-
for (var [u,
|
|
1268
|
-
|
|
1267
|
+
for (var [u, d] of n)
|
|
1268
|
+
d.v !== x && !(u in l) && a.push(u);
|
|
1269
1269
|
return a;
|
|
1270
1270
|
},
|
|
1271
1271
|
setPrototypeOf() {
|
|
1272
|
-
|
|
1272
|
+
ao();
|
|
1273
1273
|
}
|
|
1274
1274
|
}
|
|
1275
1275
|
);
|
|
1276
1276
|
}
|
|
1277
|
-
var
|
|
1277
|
+
var ni, Ki, Xi, Ji;
|
|
1278
1278
|
function wn() {
|
|
1279
|
-
if (
|
|
1280
|
-
|
|
1279
|
+
if (ni === void 0) {
|
|
1280
|
+
ni = window, Ki = /Firefox/.test(navigator.userAgent);
|
|
1281
1281
|
var t = Element.prototype, e = Node.prototype, n = Text.prototype;
|
|
1282
|
-
|
|
1282
|
+
Xi = it(e, "firstChild").get, Ji = it(e, "nextSibling").get, Jn(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Jn(n) && (n.__t = void 0);
|
|
1283
1283
|
}
|
|
1284
1284
|
}
|
|
1285
1285
|
function Ee(t = "") {
|
|
@@ -1289,17 +1289,17 @@ function Ee(t = "") {
|
|
|
1289
1289
|
function kt(t) {
|
|
1290
1290
|
return (
|
|
1291
1291
|
/** @type {TemplateNode | null} */
|
|
1292
|
-
|
|
1292
|
+
Xi.call(t)
|
|
1293
1293
|
);
|
|
1294
1294
|
}
|
|
1295
1295
|
// @__NO_SIDE_EFFECTS__
|
|
1296
1296
|
function Oe(t) {
|
|
1297
1297
|
return (
|
|
1298
1298
|
/** @type {TemplateNode | null} */
|
|
1299
|
-
|
|
1299
|
+
Ji.call(t)
|
|
1300
1300
|
);
|
|
1301
1301
|
}
|
|
1302
|
-
function
|
|
1302
|
+
function ii(t, e) {
|
|
1303
1303
|
if (!$)
|
|
1304
1304
|
return /* @__PURE__ */ kt(t);
|
|
1305
1305
|
var n = /* @__PURE__ */ kt(I);
|
|
@@ -1309,7 +1309,7 @@ function ni(t, e) {
|
|
|
1309
1309
|
var i = Ee();
|
|
1310
1310
|
return n?.before(i), se(i), i;
|
|
1311
1311
|
}
|
|
1312
|
-
return e &&
|
|
1312
|
+
return e && Ln(
|
|
1313
1313
|
/** @type {Text} */
|
|
1314
1314
|
n
|
|
1315
1315
|
), se(n), n;
|
|
@@ -1324,7 +1324,7 @@ function ln(t, e = !1) {
|
|
|
1324
1324
|
var i = Ee();
|
|
1325
1325
|
return I?.before(i), se(i), i;
|
|
1326
1326
|
}
|
|
1327
|
-
|
|
1327
|
+
Ln(
|
|
1328
1328
|
/** @type {Text} */
|
|
1329
1329
|
I
|
|
1330
1330
|
);
|
|
@@ -1343,26 +1343,26 @@ function wt(t, e = 1, n = !1) {
|
|
|
1343
1343
|
var o = Ee();
|
|
1344
1344
|
return i === null ? r?.after(o) : i.before(o), se(o), o;
|
|
1345
1345
|
}
|
|
1346
|
-
|
|
1346
|
+
Ln(
|
|
1347
1347
|
/** @type {Text} */
|
|
1348
1348
|
i
|
|
1349
1349
|
);
|
|
1350
1350
|
}
|
|
1351
1351
|
return se(i), i;
|
|
1352
1352
|
}
|
|
1353
|
-
function
|
|
1353
|
+
function xo(t) {
|
|
1354
1354
|
t.textContent = "";
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1356
|
+
function Mo() {
|
|
1357
1357
|
return !1;
|
|
1358
1358
|
}
|
|
1359
|
-
function
|
|
1359
|
+
function Rn(t, e, n) {
|
|
1360
1360
|
return (
|
|
1361
1361
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1362
|
-
document.createElementNS(
|
|
1362
|
+
document.createElementNS(Ai, t, void 0)
|
|
1363
1363
|
);
|
|
1364
1364
|
}
|
|
1365
|
-
function
|
|
1365
|
+
function Ln(t) {
|
|
1366
1366
|
if (
|
|
1367
1367
|
/** @type {string} */
|
|
1368
1368
|
t.nodeValue.length < 65536
|
|
@@ -1373,19 +1373,19 @@ function Rn(t) {
|
|
|
1373
1373
|
e.remove(), t.nodeValue += /** @type {string} */
|
|
1374
1374
|
e.nodeValue, e = t.nextSibling;
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1376
|
+
function Qi(t) {
|
|
1377
1377
|
var e = w, n = T;
|
|
1378
|
-
ee(null),
|
|
1378
|
+
ee(null), fe(null);
|
|
1379
1379
|
try {
|
|
1380
1380
|
return t();
|
|
1381
1381
|
} finally {
|
|
1382
|
-
ee(e),
|
|
1382
|
+
ee(e), fe(n);
|
|
1383
1383
|
}
|
|
1384
1384
|
}
|
|
1385
|
-
function
|
|
1386
|
-
T === null && (w === null &&
|
|
1385
|
+
function No(t) {
|
|
1386
|
+
T === null && (w === null && ro(), io()), Ve && no();
|
|
1387
1387
|
}
|
|
1388
|
-
function
|
|
1388
|
+
function Do(t, e) {
|
|
1389
1389
|
var n = e.last;
|
|
1390
1390
|
n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
|
|
1391
1391
|
}
|
|
@@ -1409,7 +1409,7 @@ function pe(t, e) {
|
|
|
1409
1409
|
ac: null
|
|
1410
1410
|
}, r = i;
|
|
1411
1411
|
if ((t & bt) !== 0)
|
|
1412
|
-
mt !== null ? mt.push(i) :
|
|
1412
|
+
mt !== null ? mt.push(i) : de(i);
|
|
1413
1413
|
else if (e !== null) {
|
|
1414
1414
|
try {
|
|
1415
1415
|
_t(i);
|
|
@@ -1419,7 +1419,7 @@ function pe(t, e) {
|
|
|
1419
1419
|
r.deps === null && r.teardown === null && r.nodes === null && r.first === r.last && // either `null`, or a singular child
|
|
1420
1420
|
(r.f & et) === 0 && (r = r.first, (t & Fe) !== 0 && (t & vt) !== 0 && r !== null && (r.f |= vt));
|
|
1421
1421
|
}
|
|
1422
|
-
if (r !== null && (r.parent = n, n !== null &&
|
|
1422
|
+
if (r !== null && (r.parent = n, n !== null && Do(r, n), w !== null && (w.f & D) !== 0 && (t & je) === 0)) {
|
|
1423
1423
|
var o = (
|
|
1424
1424
|
/** @type {Derived} */
|
|
1425
1425
|
w
|
|
@@ -1428,15 +1428,15 @@ function pe(t, e) {
|
|
|
1428
1428
|
}
|
|
1429
1429
|
return i;
|
|
1430
1430
|
}
|
|
1431
|
-
function
|
|
1431
|
+
function xn() {
|
|
1432
1432
|
return w !== null && !re;
|
|
1433
1433
|
}
|
|
1434
|
-
function
|
|
1434
|
+
function zo(t) {
|
|
1435
1435
|
const e = pe(pt, null);
|
|
1436
1436
|
return R(e, M), e.teardown = t, e;
|
|
1437
1437
|
}
|
|
1438
1438
|
function It(t) {
|
|
1439
|
-
|
|
1439
|
+
No();
|
|
1440
1440
|
var e = (
|
|
1441
1441
|
/** @type {Effect} */
|
|
1442
1442
|
T.f
|
|
@@ -1448,19 +1448,19 @@ function It(t) {
|
|
|
1448
1448
|
);
|
|
1449
1449
|
(i.e ?? (i.e = [])).push(t);
|
|
1450
1450
|
} else
|
|
1451
|
-
return
|
|
1451
|
+
return Zi(t);
|
|
1452
1452
|
}
|
|
1453
|
-
function
|
|
1454
|
-
return pe(bt |
|
|
1453
|
+
function Zi(t) {
|
|
1454
|
+
return pe(bt | Qr, t);
|
|
1455
1455
|
}
|
|
1456
|
-
function
|
|
1456
|
+
function Vo(t) {
|
|
1457
1457
|
ke.ensure();
|
|
1458
1458
|
const e = pe(je | et, t);
|
|
1459
1459
|
return () => {
|
|
1460
1460
|
H(e);
|
|
1461
1461
|
};
|
|
1462
1462
|
}
|
|
1463
|
-
function
|
|
1463
|
+
function Fo(t) {
|
|
1464
1464
|
ke.ensure();
|
|
1465
1465
|
const e = pe(je | et, t);
|
|
1466
1466
|
return (n = {}) => new Promise((i) => {
|
|
@@ -1469,51 +1469,51 @@ function Do(t) {
|
|
|
1469
1469
|
}) : (H(e), i(void 0));
|
|
1470
1470
|
});
|
|
1471
1471
|
}
|
|
1472
|
-
function
|
|
1472
|
+
function er(t) {
|
|
1473
1473
|
return pe(bt, t);
|
|
1474
1474
|
}
|
|
1475
|
-
function
|
|
1476
|
-
return pe(
|
|
1475
|
+
function jo(t) {
|
|
1476
|
+
return pe(kn | et, t);
|
|
1477
1477
|
}
|
|
1478
|
-
function
|
|
1478
|
+
function Mn(t, e = 0) {
|
|
1479
1479
|
return pe(pt | e, t);
|
|
1480
1480
|
}
|
|
1481
|
-
function
|
|
1482
|
-
|
|
1483
|
-
pe(pt, () => t(...r.map(
|
|
1481
|
+
function ri(t, e = [], n = [], i = []) {
|
|
1482
|
+
Ao(i, e, n, (r) => {
|
|
1483
|
+
pe(pt, () => t(...r.map(f)));
|
|
1484
1484
|
});
|
|
1485
1485
|
}
|
|
1486
|
-
function
|
|
1486
|
+
function tr(t, e = 0) {
|
|
1487
1487
|
var n = pe(Fe | e, t);
|
|
1488
1488
|
return n;
|
|
1489
1489
|
}
|
|
1490
1490
|
function we(t) {
|
|
1491
1491
|
return pe(he | et, t);
|
|
1492
1492
|
}
|
|
1493
|
-
function
|
|
1493
|
+
function nr(t) {
|
|
1494
1494
|
var e = t.teardown;
|
|
1495
1495
|
if (e !== null) {
|
|
1496
1496
|
const n = Ve, i = w;
|
|
1497
|
-
|
|
1497
|
+
oi(!0), ee(null);
|
|
1498
1498
|
try {
|
|
1499
1499
|
e.call(null);
|
|
1500
1500
|
} finally {
|
|
1501
|
-
|
|
1501
|
+
oi(n), ee(i);
|
|
1502
1502
|
}
|
|
1503
1503
|
}
|
|
1504
1504
|
}
|
|
1505
|
-
function
|
|
1505
|
+
function Nn(t, e = !1) {
|
|
1506
1506
|
var n = t.first;
|
|
1507
1507
|
for (t.first = t.last = null; n !== null; ) {
|
|
1508
1508
|
const r = n.ac;
|
|
1509
|
-
r !== null &&
|
|
1509
|
+
r !== null && Qi(() => {
|
|
1510
1510
|
r.abort(He);
|
|
1511
1511
|
});
|
|
1512
1512
|
var i = n.next;
|
|
1513
1513
|
(n.f & je) !== 0 ? n.parent = null : H(n, e), n = i;
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function Ho(t) {
|
|
1517
1517
|
for (var e = t.first; e !== null; ) {
|
|
1518
1518
|
var n = e.next;
|
|
1519
1519
|
(e.f & he) === 0 && H(e), e = n;
|
|
@@ -1521,32 +1521,32 @@ function Vo(t) {
|
|
|
1521
1521
|
}
|
|
1522
1522
|
function H(t, e = !0) {
|
|
1523
1523
|
var n = !1;
|
|
1524
|
-
(e || (t.f &
|
|
1524
|
+
(e || (t.f & Jr) !== 0) && t.nodes !== null && t.nodes.end !== null && (Bo(
|
|
1525
1525
|
t.nodes.start,
|
|
1526
1526
|
/** @type {TemplateNode} */
|
|
1527
1527
|
t.nodes.end
|
|
1528
|
-
), n = !0),
|
|
1528
|
+
), n = !0), Nn(t, e && !n), Et(t, 0), R(t, $e);
|
|
1529
1529
|
var i = t.nodes && t.nodes.t;
|
|
1530
1530
|
if (i !== null)
|
|
1531
1531
|
for (const o of i)
|
|
1532
1532
|
o.stop();
|
|
1533
|
-
|
|
1533
|
+
nr(t);
|
|
1534
1534
|
var r = t.parent;
|
|
1535
|
-
r !== null && r.first !== null &&
|
|
1535
|
+
r !== null && r.first !== null && ir(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1536
1536
|
}
|
|
1537
|
-
function
|
|
1537
|
+
function Bo(t, e) {
|
|
1538
1538
|
for (; t !== null; ) {
|
|
1539
1539
|
var n = t === e ? null : /* @__PURE__ */ Oe(t);
|
|
1540
1540
|
t.remove(), t = n;
|
|
1541
1541
|
}
|
|
1542
1542
|
}
|
|
1543
|
-
function
|
|
1543
|
+
function ir(t) {
|
|
1544
1544
|
var e = t.parent, n = t.prev, i = t.next;
|
|
1545
1545
|
n !== null && (n.next = i), i !== null && (i.prev = n), e !== null && (e.first === t && (e.first = i), e.last === t && (e.last = n));
|
|
1546
1546
|
}
|
|
1547
1547
|
function $t(t, e, n = !0) {
|
|
1548
1548
|
var i = [];
|
|
1549
|
-
|
|
1549
|
+
rr(t, i, !0);
|
|
1550
1550
|
var r = () => {
|
|
1551
1551
|
n && H(t), e && e();
|
|
1552
1552
|
}, o = i.length;
|
|
@@ -1557,7 +1557,7 @@ function $t(t, e, n = !0) {
|
|
|
1557
1557
|
} else
|
|
1558
1558
|
r();
|
|
1559
1559
|
}
|
|
1560
|
-
function
|
|
1560
|
+
function rr(t, e, n) {
|
|
1561
1561
|
if ((t.f & Q) === 0) {
|
|
1562
1562
|
t.f ^= Q;
|
|
1563
1563
|
var i = t.nodes && t.nodes.t;
|
|
@@ -1569,19 +1569,19 @@ function ir(t, e, n) {
|
|
|
1569
1569
|
// it means the parent block effect was pruned. In that case,
|
|
1570
1570
|
// transparency information was transferred to the branch effect.
|
|
1571
1571
|
(r.f & he) !== 0 && (t.f & Fe) !== 0;
|
|
1572
|
-
|
|
1572
|
+
rr(r, e, s ? n : !1), r = o;
|
|
1573
1573
|
}
|
|
1574
1574
|
}
|
|
1575
1575
|
}
|
|
1576
|
-
function
|
|
1577
|
-
|
|
1576
|
+
function Go(t) {
|
|
1577
|
+
or(t, !0);
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function or(t, e) {
|
|
1580
1580
|
if ((t.f & Q) !== 0) {
|
|
1581
1581
|
t.f ^= Q;
|
|
1582
1582
|
for (var n = t.first; n !== null; ) {
|
|
1583
1583
|
var i = n.next, r = (n.f & vt) !== 0 || (n.f & he) !== 0;
|
|
1584
|
-
|
|
1584
|
+
or(n, r ? e : !1), n = i;
|
|
1585
1585
|
}
|
|
1586
1586
|
var o = t.nodes && t.nodes.t;
|
|
1587
1587
|
if (o !== null)
|
|
@@ -1589,7 +1589,7 @@ function rr(t, e) {
|
|
|
1589
1589
|
(s.is_global || e) && s.in();
|
|
1590
1590
|
}
|
|
1591
1591
|
}
|
|
1592
|
-
function
|
|
1592
|
+
function sr(t, e) {
|
|
1593
1593
|
if (t.nodes)
|
|
1594
1594
|
for (var n = t.nodes.start, i = t.nodes.end; n !== null; ) {
|
|
1595
1595
|
var r = n === i ? null : /* @__PURE__ */ Oe(n);
|
|
@@ -1597,7 +1597,7 @@ function or(t, e) {
|
|
|
1597
1597
|
}
|
|
1598
1598
|
}
|
|
1599
1599
|
let Ht = !1, Ve = !1;
|
|
1600
|
-
function
|
|
1600
|
+
function oi(t) {
|
|
1601
1601
|
Ve = t;
|
|
1602
1602
|
}
|
|
1603
1603
|
let w = null, re = !1;
|
|
@@ -1605,23 +1605,23 @@ function ee(t) {
|
|
|
1605
1605
|
w = t;
|
|
1606
1606
|
}
|
|
1607
1607
|
let T = null;
|
|
1608
|
-
function
|
|
1608
|
+
function fe(t) {
|
|
1609
1609
|
T = t;
|
|
1610
1610
|
}
|
|
1611
1611
|
let Z = null;
|
|
1612
|
-
function
|
|
1612
|
+
function lr(t) {
|
|
1613
1613
|
w !== null && (Z === null ? Z = [t] : Z.push(t));
|
|
1614
1614
|
}
|
|
1615
1615
|
let j = null, G = 0, K = null;
|
|
1616
|
-
function
|
|
1616
|
+
function Uo(t) {
|
|
1617
1617
|
K = t;
|
|
1618
1618
|
}
|
|
1619
|
-
let
|
|
1620
|
-
function
|
|
1619
|
+
let ar = 1, Ge = 0, Je = Ge;
|
|
1620
|
+
function si(t) {
|
|
1621
1621
|
Je = t;
|
|
1622
1622
|
}
|
|
1623
|
-
function
|
|
1624
|
-
return ++
|
|
1623
|
+
function cr() {
|
|
1624
|
+
return ++ar;
|
|
1625
1625
|
}
|
|
1626
1626
|
function xt(t) {
|
|
1627
1627
|
var e = t.f;
|
|
@@ -1636,7 +1636,7 @@ function xt(t) {
|
|
|
1636
1636
|
if (xt(
|
|
1637
1637
|
/** @type {Derived} */
|
|
1638
1638
|
o
|
|
1639
|
-
) &&
|
|
1639
|
+
) && Ui(
|
|
1640
1640
|
/** @type {Derived} */
|
|
1641
1641
|
o
|
|
1642
1642
|
), o.wv > t.wv)
|
|
@@ -1648,35 +1648,35 @@ function xt(t) {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
return !1;
|
|
1650
1650
|
}
|
|
1651
|
-
function
|
|
1651
|
+
function ur(t, e, n = !0) {
|
|
1652
1652
|
var i = t.reactions;
|
|
1653
1653
|
if (i !== null && !(Z !== null && ht.call(Z, t)))
|
|
1654
1654
|
for (var r = 0; r < i.length; r++) {
|
|
1655
1655
|
var o = i[r];
|
|
1656
|
-
(o.f & D) !== 0 ?
|
|
1656
|
+
(o.f & D) !== 0 ? ur(
|
|
1657
1657
|
/** @type {Derived} */
|
|
1658
1658
|
o,
|
|
1659
1659
|
e,
|
|
1660
1660
|
!1
|
|
1661
|
-
) : e === o && (n ? R(o, N) : (o.f & M) !== 0 && R(o, oe),
|
|
1661
|
+
) : e === o && (n ? R(o, N) : (o.f & M) !== 0 && R(o, oe), de(
|
|
1662
1662
|
/** @type {Effect} */
|
|
1663
1663
|
o
|
|
1664
1664
|
));
|
|
1665
1665
|
}
|
|
1666
1666
|
}
|
|
1667
|
-
function
|
|
1667
|
+
function dr(t) {
|
|
1668
1668
|
var A;
|
|
1669
1669
|
var e = j, n = G, i = K, r = w, o = Z, s = Y, l = re, a = Je, u = t.f;
|
|
1670
1670
|
j = /** @type {null | Value[]} */
|
|
1671
|
-
null, G = 0, K = null, w = (u & (he | je)) === 0 ? t : null, Z = null, gt(t.ctx), re = !1, Je = ++Ge, t.ac !== null && (
|
|
1671
|
+
null, G = 0, K = null, w = (u & (he | je)) === 0 ? t : null, Z = null, gt(t.ctx), re = !1, Je = ++Ge, t.ac !== null && (Qi(() => {
|
|
1672
1672
|
t.ac.abort(He);
|
|
1673
1673
|
}), t.ac = null);
|
|
1674
1674
|
try {
|
|
1675
|
-
t.f |=
|
|
1676
|
-
var
|
|
1675
|
+
t.f |= dn;
|
|
1676
|
+
var d = (
|
|
1677
1677
|
/** @type {Function} */
|
|
1678
1678
|
t.fn
|
|
1679
|
-
), h =
|
|
1679
|
+
), h = d();
|
|
1680
1680
|
t.f |= Ze;
|
|
1681
1681
|
var v = t.deps, y = O?.is_fork;
|
|
1682
1682
|
if (j !== null) {
|
|
@@ -1686,14 +1686,14 @@ function ur(t) {
|
|
|
1686
1686
|
v[G + g] = j[g];
|
|
1687
1687
|
else
|
|
1688
1688
|
t.deps = v = j;
|
|
1689
|
-
if (
|
|
1689
|
+
if (xn() && (t.f & J) !== 0)
|
|
1690
1690
|
for (g = G; g < v.length; g++)
|
|
1691
1691
|
((A = v[g]).reactions ?? (A.reactions = [])).push(t);
|
|
1692
1692
|
} else !y && v !== null && G < v.length && (Et(t, G), v.length = G);
|
|
1693
|
-
if (
|
|
1693
|
+
if (Li() && K !== null && !re && v !== null && (t.f & (D | oe | N)) === 0)
|
|
1694
1694
|
for (g = 0; g < /** @type {Source[]} */
|
|
1695
1695
|
K.length; g++)
|
|
1696
|
-
|
|
1696
|
+
ur(
|
|
1697
1697
|
K[g],
|
|
1698
1698
|
/** @type {Effect} */
|
|
1699
1699
|
t
|
|
@@ -1710,15 +1710,15 @@ function ur(t) {
|
|
|
1710
1710
|
}
|
|
1711
1711
|
return (t.f & De) !== 0 && (t.f ^= De), h;
|
|
1712
1712
|
} catch (S) {
|
|
1713
|
-
return
|
|
1713
|
+
return Mi(S);
|
|
1714
1714
|
} finally {
|
|
1715
|
-
t.f ^=
|
|
1715
|
+
t.f ^= dn, j = e, G = n, K = i, w = r, Z = o, gt(s), re = l, Je = a;
|
|
1716
1716
|
}
|
|
1717
1717
|
}
|
|
1718
|
-
function
|
|
1718
|
+
function qo(t, e) {
|
|
1719
1719
|
let n = e.reactions;
|
|
1720
1720
|
if (n !== null) {
|
|
1721
|
-
var i =
|
|
1721
|
+
var i = Gr.call(n, t);
|
|
1722
1722
|
if (i !== -1) {
|
|
1723
1723
|
var r = n.length - 1;
|
|
1724
1724
|
r === 0 ? n = e.reactions = null : (n[i] = n[r], n.pop());
|
|
@@ -1732,14 +1732,14 @@ function Bo(t, e) {
|
|
|
1732
1732
|
/** @type {Derived} */
|
|
1733
1733
|
e
|
|
1734
1734
|
);
|
|
1735
|
-
(o.f & J) !== 0 && (o.f ^= J, o.f &= ~Qe),
|
|
1735
|
+
(o.f & J) !== 0 && (o.f ^= J, o.f &= ~Qe), On(o), Po(o), Et(o, 0);
|
|
1736
1736
|
}
|
|
1737
1737
|
}
|
|
1738
1738
|
function Et(t, e) {
|
|
1739
1739
|
var n = t.deps;
|
|
1740
1740
|
if (n !== null)
|
|
1741
1741
|
for (var i = e; i < n.length; i++)
|
|
1742
|
-
|
|
1742
|
+
qo(t, n[i]);
|
|
1743
1743
|
}
|
|
1744
1744
|
function _t(t) {
|
|
1745
1745
|
var e = t.f;
|
|
@@ -1748,23 +1748,23 @@ function _t(t) {
|
|
|
1748
1748
|
var n = T, i = Ht;
|
|
1749
1749
|
T = t, Ht = !0;
|
|
1750
1750
|
try {
|
|
1751
|
-
(e & (Fe |
|
|
1752
|
-
var r =
|
|
1753
|
-
t.teardown = typeof r == "function" ? r : null, t.wv =
|
|
1751
|
+
(e & (Fe | $n)) !== 0 ? Ho(t) : Nn(t), nr(t);
|
|
1752
|
+
var r = dr(t);
|
|
1753
|
+
t.teardown = typeof r == "function" ? r : null, t.wv = ar;
|
|
1754
1754
|
var o;
|
|
1755
|
-
cn &&
|
|
1755
|
+
cn && go && (t.f & N) !== 0 && t.deps;
|
|
1756
1756
|
} finally {
|
|
1757
1757
|
Ht = i, T = n;
|
|
1758
1758
|
}
|
|
1759
1759
|
}
|
|
1760
1760
|
}
|
|
1761
|
-
function
|
|
1761
|
+
function f(t) {
|
|
1762
1762
|
var e = t.f, n = (e & D) !== 0;
|
|
1763
1763
|
if (w !== null && !re) {
|
|
1764
1764
|
var i = T !== null && (T.f & $e) !== 0;
|
|
1765
1765
|
if (!i && (Z === null || !ht.call(Z, t))) {
|
|
1766
1766
|
var r = w.deps;
|
|
1767
|
-
if ((w.f &
|
|
1767
|
+
if ((w.f & dn) !== 0)
|
|
1768
1768
|
t.rv < Ge && (t.rv = Ge, j === null && r !== null && r[G] === t ? G++ : j === null ? j = [t] : j.push(t));
|
|
1769
1769
|
else {
|
|
1770
1770
|
(w.deps ?? (w.deps = [])).push(t);
|
|
@@ -1782,10 +1782,10 @@ function d(t) {
|
|
|
1782
1782
|
);
|
|
1783
1783
|
if (Ve) {
|
|
1784
1784
|
var l = s.v;
|
|
1785
|
-
return ((s.f & M) === 0 && s.reactions !== null ||
|
|
1785
|
+
return ((s.f & M) === 0 && s.reactions !== null || hr(s)) && (l = Pn(s)), ze.set(s, l), l;
|
|
1786
1786
|
}
|
|
1787
1787
|
var a = (s.f & J) === 0 && !re && w !== null && (Ht || (w.f & J) !== 0), u = (s.f & Ze) === 0;
|
|
1788
|
-
xt(s) && (a && (s.f |= J),
|
|
1788
|
+
xt(s) && (a && (s.f |= J), Ui(s)), a && !u && (qi(s), fr(s));
|
|
1789
1789
|
}
|
|
1790
1790
|
if (ie?.has(t))
|
|
1791
1791
|
return ie.get(t);
|
|
@@ -1796,7 +1796,7 @@ function d(t) {
|
|
|
1796
1796
|
function fr(t) {
|
|
1797
1797
|
if (t.f |= J, t.deps !== null)
|
|
1798
1798
|
for (const e of t.deps)
|
|
1799
|
-
(e.reactions ?? (e.reactions = [])).push(t), (e.f & D) !== 0 && (e.f & J) === 0 && (
|
|
1799
|
+
(e.reactions ?? (e.reactions = [])).push(t), (e.f & D) !== 0 && (e.f & J) === 0 && (qi(
|
|
1800
1800
|
/** @type {Derived} */
|
|
1801
1801
|
e
|
|
1802
1802
|
), fr(
|
|
@@ -1804,18 +1804,18 @@ function fr(t) {
|
|
|
1804
1804
|
e
|
|
1805
1805
|
));
|
|
1806
1806
|
}
|
|
1807
|
-
function
|
|
1807
|
+
function hr(t) {
|
|
1808
1808
|
if (t.v === x) return !0;
|
|
1809
1809
|
if (t.deps === null) return !1;
|
|
1810
1810
|
for (const e of t.deps)
|
|
1811
|
-
if (ze.has(e) || (e.f & D) !== 0 &&
|
|
1811
|
+
if (ze.has(e) || (e.f & D) !== 0 && hr(
|
|
1812
1812
|
/** @type {Derived} */
|
|
1813
1813
|
e
|
|
1814
1814
|
))
|
|
1815
1815
|
return !0;
|
|
1816
1816
|
return !1;
|
|
1817
1817
|
}
|
|
1818
|
-
function
|
|
1818
|
+
function Dn(t) {
|
|
1819
1819
|
var e = re;
|
|
1820
1820
|
try {
|
|
1821
1821
|
return re = !0, t();
|
|
@@ -1823,18 +1823,18 @@ function Nn(t) {
|
|
|
1823
1823
|
re = e;
|
|
1824
1824
|
}
|
|
1825
1825
|
}
|
|
1826
|
-
const Ue = /* @__PURE__ */ Symbol("events"),
|
|
1827
|
-
function
|
|
1826
|
+
const Ue = /* @__PURE__ */ Symbol("events"), pr = /* @__PURE__ */ new Set(), Tn = /* @__PURE__ */ new Set();
|
|
1827
|
+
function li(t, e, n) {
|
|
1828
1828
|
(e[Ue] ?? (e[Ue] = {}))[t] = n;
|
|
1829
1829
|
}
|
|
1830
|
-
function
|
|
1830
|
+
function Wo(t) {
|
|
1831
1831
|
for (var e = 0; e < t.length; e++)
|
|
1832
|
-
|
|
1832
|
+
pr.add(t[e]);
|
|
1833
1833
|
for (var n of Tn)
|
|
1834
1834
|
n(t);
|
|
1835
1835
|
}
|
|
1836
|
-
let
|
|
1837
|
-
function
|
|
1836
|
+
let ai = null;
|
|
1837
|
+
function ci(t) {
|
|
1838
1838
|
var e = this, n = (
|
|
1839
1839
|
/** @type {Node} */
|
|
1840
1840
|
e.ownerDocument
|
|
@@ -1842,8 +1842,8 @@ function ai(t) {
|
|
|
1842
1842
|
/** @type {null | Element} */
|
|
1843
1843
|
r[0] || t.target
|
|
1844
1844
|
);
|
|
1845
|
-
|
|
1846
|
-
var s = 0, l =
|
|
1845
|
+
ai = t;
|
|
1846
|
+
var s = 0, l = ai === t && t[Ue];
|
|
1847
1847
|
if (l) {
|
|
1848
1848
|
var a = r.indexOf(l);
|
|
1849
1849
|
if (a !== -1 && (e === document || e === /** @type {any} */
|
|
@@ -1864,8 +1864,8 @@ function ai(t) {
|
|
|
1864
1864
|
return o || n;
|
|
1865
1865
|
}
|
|
1866
1866
|
});
|
|
1867
|
-
var
|
|
1868
|
-
ee(null),
|
|
1867
|
+
var d = w, h = T;
|
|
1868
|
+
ee(null), fe(null);
|
|
1869
1869
|
try {
|
|
1870
1870
|
for (var v, y = []; o !== null; ) {
|
|
1871
1871
|
var g = o.assignedSlot || o.parentNode || /** @type {any} */
|
|
@@ -1891,26 +1891,26 @@ function ai(t) {
|
|
|
1891
1891
|
throw v;
|
|
1892
1892
|
}
|
|
1893
1893
|
} finally {
|
|
1894
|
-
t[Ue] = e, delete t.currentTarget, ee(
|
|
1894
|
+
t[Ue] = e, delete t.currentTarget, ee(d), fe(h);
|
|
1895
1895
|
}
|
|
1896
1896
|
}
|
|
1897
1897
|
}
|
|
1898
|
-
const
|
|
1898
|
+
const Yo = (
|
|
1899
1899
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1900
1900
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1901
1901
|
/** @param {string} html */
|
|
1902
1902
|
createHTML: (t) => t
|
|
1903
1903
|
})
|
|
1904
1904
|
);
|
|
1905
|
-
function
|
|
1905
|
+
function Ko(t) {
|
|
1906
1906
|
return (
|
|
1907
1907
|
/** @type {string} */
|
|
1908
|
-
|
|
1908
|
+
Yo?.createHTML(t) ?? t
|
|
1909
1909
|
);
|
|
1910
1910
|
}
|
|
1911
|
-
function
|
|
1912
|
-
var e =
|
|
1913
|
-
return e.innerHTML =
|
|
1911
|
+
function Xo(t) {
|
|
1912
|
+
var e = Rn("template");
|
|
1913
|
+
return e.innerHTML = Ko(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1914
1914
|
}
|
|
1915
1915
|
function Ot(t, e) {
|
|
1916
1916
|
var n = (
|
|
@@ -1920,15 +1920,15 @@ function Ot(t, e) {
|
|
|
1920
1920
|
n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
|
|
1921
1921
|
}
|
|
1922
1922
|
// @__NO_SIDE_EFFECTS__
|
|
1923
|
-
function
|
|
1924
|
-
var n = (e &
|
|
1923
|
+
function vr(t, e) {
|
|
1924
|
+
var n = (e & Hr) !== 0, i, r = !t.startsWith("<!>");
|
|
1925
1925
|
return () => {
|
|
1926
1926
|
if ($)
|
|
1927
1927
|
return Ot(I, null), I;
|
|
1928
|
-
i === void 0 && (i =
|
|
1928
|
+
i === void 0 && (i = Xo(r ? t : "<!>" + t));
|
|
1929
1929
|
var o = (
|
|
1930
1930
|
/** @type {TemplateNode} */
|
|
1931
|
-
n ||
|
|
1931
|
+
n || Ki ? document.importNode(i, !0) : i.cloneNode(!0)
|
|
1932
1932
|
);
|
|
1933
1933
|
{
|
|
1934
1934
|
var s = (
|
|
@@ -1943,7 +1943,7 @@ function pr(t, e) {
|
|
|
1943
1943
|
return o;
|
|
1944
1944
|
};
|
|
1945
1945
|
}
|
|
1946
|
-
function
|
|
1946
|
+
function Jo() {
|
|
1947
1947
|
if ($)
|
|
1948
1948
|
return Ot(I, null), I;
|
|
1949
1949
|
var t = document.createDocumentFragment(), e = document.createComment(""), n = Ee();
|
|
@@ -1955,7 +1955,7 @@ function Bt(t, e) {
|
|
|
1955
1955
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1956
1956
|
T
|
|
1957
1957
|
);
|
|
1958
|
-
((n.f & Ze) === 0 || n.nodes.end === null) && (n.nodes.end = I),
|
|
1958
|
+
((n.f & Ze) === 0 || n.nodes.end === null) && (n.nodes.end = I), En();
|
|
1959
1959
|
return;
|
|
1960
1960
|
}
|
|
1961
1961
|
t !== null && t.before(
|
|
@@ -1963,56 +1963,56 @@ function Bt(t, e) {
|
|
|
1963
1963
|
e
|
|
1964
1964
|
);
|
|
1965
1965
|
}
|
|
1966
|
-
const
|
|
1967
|
-
function
|
|
1968
|
-
return
|
|
1966
|
+
const Qo = ["touchstart", "touchmove"];
|
|
1967
|
+
function Zo(t) {
|
|
1968
|
+
return Qo.includes(t);
|
|
1969
1969
|
}
|
|
1970
|
-
function
|
|
1970
|
+
function es(t, e) {
|
|
1971
1971
|
var n = e == null ? "" : typeof e == "object" ? `${e}` : e;
|
|
1972
1972
|
n !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = n, t.nodeValue = `${n}`);
|
|
1973
1973
|
}
|
|
1974
|
-
function
|
|
1975
|
-
return
|
|
1974
|
+
function gr(t, e) {
|
|
1975
|
+
return mr(t, e);
|
|
1976
1976
|
}
|
|
1977
|
-
function
|
|
1977
|
+
function ts(t, e) {
|
|
1978
1978
|
wn(), e.intro = e.intro ?? !1;
|
|
1979
1979
|
const n = e.target, i = $, r = I;
|
|
1980
1980
|
try {
|
|
1981
1981
|
for (var o = /* @__PURE__ */ kt(n); o && (o.nodeType !== Qt || /** @type {Comment} */
|
|
1982
|
-
o.data !==
|
|
1982
|
+
o.data !== Ti); )
|
|
1983
1983
|
o = /* @__PURE__ */ Oe(o);
|
|
1984
1984
|
if (!o)
|
|
1985
|
-
throw
|
|
1985
|
+
throw ft;
|
|
1986
1986
|
nt(!0), se(
|
|
1987
1987
|
/** @type {Comment} */
|
|
1988
1988
|
o
|
|
1989
1989
|
);
|
|
1990
|
-
const s =
|
|
1990
|
+
const s = mr(t, { ...e, anchor: o });
|
|
1991
1991
|
return nt(!1), /** @type {Exports} */
|
|
1992
1992
|
s;
|
|
1993
1993
|
} catch (s) {
|
|
1994
1994
|
if (s instanceof Error && s.message.split(`
|
|
1995
1995
|
`).some((l) => l.startsWith("https://svelte.dev/e/")))
|
|
1996
1996
|
throw s;
|
|
1997
|
-
return s !==
|
|
1997
|
+
return s !== ft && console.warn("Failed to hydrate: ", s), e.recover === !1 && so(), wn(), xo(n), nt(!1), gr(t, e);
|
|
1998
1998
|
} finally {
|
|
1999
1999
|
nt(i), se(r);
|
|
2000
2000
|
}
|
|
2001
2001
|
}
|
|
2002
2002
|
const zt = /* @__PURE__ */ new Map();
|
|
2003
|
-
function
|
|
2003
|
+
function mr(t, { target: e, anchor: n, props: i = {}, events: r, context: o, intro: s = !0, transformError: l }) {
|
|
2004
2004
|
wn();
|
|
2005
|
-
var a = void 0, u =
|
|
2006
|
-
var
|
|
2007
|
-
|
|
2005
|
+
var a = void 0, u = Fo(() => {
|
|
2006
|
+
var d = n ?? e.appendChild(Ee());
|
|
2007
|
+
Io(
|
|
2008
2008
|
/** @type {TemplateNode} */
|
|
2009
|
-
|
|
2009
|
+
d,
|
|
2010
2010
|
{
|
|
2011
2011
|
pending: () => {
|
|
2012
2012
|
}
|
|
2013
2013
|
},
|
|
2014
2014
|
(y) => {
|
|
2015
|
-
|
|
2015
|
+
Pi({});
|
|
2016
2016
|
var g = (
|
|
2017
2017
|
/** @type {ComponentContext} */
|
|
2018
2018
|
Y
|
|
@@ -2022,9 +2022,9 @@ function gr(t, { target: e, anchor: n, props: i = {}, events: r, context: o, int
|
|
|
2022
2022
|
y,
|
|
2023
2023
|
null
|
|
2024
2024
|
), a = t(y, i) || {}, $ && (T.nodes.end = I, I === null || I.nodeType !== Qt || /** @type {Comment} */
|
|
2025
|
-
I.data !==
|
|
2026
|
-
throw Zt(),
|
|
2027
|
-
|
|
2025
|
+
I.data !== Si))
|
|
2026
|
+
throw Zt(), ft;
|
|
2027
|
+
Ri();
|
|
2028
2028
|
},
|
|
2029
2029
|
l
|
|
2030
2030
|
);
|
|
@@ -2033,17 +2033,17 @@ function gr(t, { target: e, anchor: n, props: i = {}, events: r, context: o, int
|
|
|
2033
2033
|
var A = y[g];
|
|
2034
2034
|
if (!h.has(A)) {
|
|
2035
2035
|
h.add(A);
|
|
2036
|
-
var S =
|
|
2036
|
+
var S = Zo(A);
|
|
2037
2037
|
for (const me of [e, document]) {
|
|
2038
2038
|
var z = zt.get(me);
|
|
2039
2039
|
z === void 0 && (z = /* @__PURE__ */ new Map(), zt.set(me, z));
|
|
2040
2040
|
var ge = z.get(A);
|
|
2041
|
-
ge === void 0 ? (me.addEventListener(A,
|
|
2041
|
+
ge === void 0 ? (me.addEventListener(A, ci, { passive: S }), z.set(A, 1)) : z.set(A, ge + 1);
|
|
2042
2042
|
}
|
|
2043
2043
|
}
|
|
2044
2044
|
}
|
|
2045
2045
|
};
|
|
2046
|
-
return v(
|
|
2046
|
+
return v(Ur(pr)), Tn.add(v), () => {
|
|
2047
2047
|
for (var y of h)
|
|
2048
2048
|
for (const S of [e, document]) {
|
|
2049
2049
|
var g = (
|
|
@@ -2053,20 +2053,20 @@ function gr(t, { target: e, anchor: n, props: i = {}, events: r, context: o, int
|
|
|
2053
2053
|
/** @type {number} */
|
|
2054
2054
|
g.get(y)
|
|
2055
2055
|
);
|
|
2056
|
-
--A == 0 ? (S.removeEventListener(y,
|
|
2056
|
+
--A == 0 ? (S.removeEventListener(y, ci), g.delete(y), g.size === 0 && zt.delete(S)) : g.set(y, A);
|
|
2057
2057
|
}
|
|
2058
|
-
Tn.delete(v),
|
|
2058
|
+
Tn.delete(v), d !== n && d.parentNode?.removeChild(d);
|
|
2059
2059
|
};
|
|
2060
2060
|
});
|
|
2061
2061
|
return In.set(a, u), a;
|
|
2062
2062
|
}
|
|
2063
2063
|
let In = /* @__PURE__ */ new WeakMap();
|
|
2064
|
-
function
|
|
2064
|
+
function ns(t, e) {
|
|
2065
2065
|
const n = In.get(t);
|
|
2066
2066
|
return n ? (In.delete(t), n(e)) : Promise.resolve();
|
|
2067
2067
|
}
|
|
2068
2068
|
var ne, ue, W, Ke, Pt, Rt, Xt;
|
|
2069
|
-
class
|
|
2069
|
+
class is {
|
|
2070
2070
|
/**
|
|
2071
2071
|
* @param {TemplateNode} anchor
|
|
2072
2072
|
* @param {boolean} transition
|
|
@@ -2117,7 +2117,7 @@ class es {
|
|
|
2117
2117
|
c(this, ne).get(e)
|
|
2118
2118
|
), i = c(this, ue).get(n);
|
|
2119
2119
|
if (i)
|
|
2120
|
-
|
|
2120
|
+
Go(i), c(this, Ke).delete(n);
|
|
2121
2121
|
else {
|
|
2122
2122
|
var r = c(this, W).get(n);
|
|
2123
2123
|
r && (r.effect.f & Q) === 0 && (c(this, ue).set(n, r.effect), c(this, W).delete(n), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), i = r.effect);
|
|
@@ -2133,7 +2133,7 @@ class es {
|
|
|
2133
2133
|
const l = () => {
|
|
2134
2134
|
if (Array.from(c(this, ne).values()).includes(o)) {
|
|
2135
2135
|
var u = document.createDocumentFragment();
|
|
2136
|
-
|
|
2136
|
+
sr(s, u), u.append(Ee()), c(this, W).set(o, { effect: s, fragment: u });
|
|
2137
2137
|
} else
|
|
2138
2138
|
H(s);
|
|
2139
2139
|
c(this, Ke).delete(o), c(this, ue).delete(o);
|
|
@@ -2162,7 +2162,7 @@ class es {
|
|
|
2162
2162
|
var i = (
|
|
2163
2163
|
/** @type {Batch} */
|
|
2164
2164
|
O
|
|
2165
|
-
), r =
|
|
2165
|
+
), r = Mo();
|
|
2166
2166
|
if (n && !c(this, ue).has(e) && !c(this, W).has(e))
|
|
2167
2167
|
if (r) {
|
|
2168
2168
|
var o = document.createDocumentFragment(), s = Ee();
|
|
@@ -2186,42 +2186,42 @@ class es {
|
|
|
2186
2186
|
}
|
|
2187
2187
|
}
|
|
2188
2188
|
ne = new WeakMap(), ue = new WeakMap(), W = new WeakMap(), Ke = new WeakMap(), Pt = new WeakMap(), Rt = new WeakMap(), Xt = new WeakMap();
|
|
2189
|
-
function
|
|
2190
|
-
Y === null &&
|
|
2191
|
-
const e =
|
|
2189
|
+
function rs(t) {
|
|
2190
|
+
Y === null && eo(), It(() => {
|
|
2191
|
+
const e = Dn(t);
|
|
2192
2192
|
if (typeof e == "function") return (
|
|
2193
2193
|
/** @type {() => void} */
|
|
2194
2194
|
e
|
|
2195
2195
|
);
|
|
2196
2196
|
});
|
|
2197
2197
|
}
|
|
2198
|
-
function
|
|
2198
|
+
function ui(t, e, n = !1) {
|
|
2199
2199
|
var i;
|
|
2200
|
-
$ && (i = I,
|
|
2201
|
-
var r = new
|
|
2200
|
+
$ && (i = I, En());
|
|
2201
|
+
var r = new is(t), o = n ? vt : 0;
|
|
2202
2202
|
function s(l, a) {
|
|
2203
2203
|
if ($) {
|
|
2204
|
-
var u =
|
|
2204
|
+
var u = ho(
|
|
2205
2205
|
/** @type {TemplateNode} */
|
|
2206
2206
|
i
|
|
2207
2207
|
);
|
|
2208
2208
|
if (l !== parseInt(u.substring(1))) {
|
|
2209
|
-
var
|
|
2210
|
-
se(
|
|
2209
|
+
var d = Oi();
|
|
2210
|
+
se(d), r.anchor = d, nt(!1), r.ensure(l, a), nt(!0);
|
|
2211
2211
|
return;
|
|
2212
2212
|
}
|
|
2213
2213
|
}
|
|
2214
2214
|
r.ensure(l, a);
|
|
2215
2215
|
}
|
|
2216
|
-
|
|
2216
|
+
tr(() => {
|
|
2217
2217
|
var l = !1;
|
|
2218
2218
|
e((a, u = 0) => {
|
|
2219
2219
|
l = !0, s(u, a);
|
|
2220
2220
|
}), l || s(-1, null);
|
|
2221
2221
|
}, o);
|
|
2222
2222
|
}
|
|
2223
|
-
function
|
|
2224
|
-
|
|
2223
|
+
function os(t, e) {
|
|
2224
|
+
er(() => {
|
|
2225
2225
|
var n = t.getRootNode(), i = (
|
|
2226
2226
|
/** @type {ShadowRoot} */
|
|
2227
2227
|
n.host ? (
|
|
@@ -2234,14 +2234,14 @@ function ns(t, e) {
|
|
|
2234
2234
|
)
|
|
2235
2235
|
);
|
|
2236
2236
|
if (!i.querySelector("#" + e.hash)) {
|
|
2237
|
-
const r =
|
|
2237
|
+
const r = Rn("style");
|
|
2238
2238
|
r.id = e.hash, r.textContent = e.code, i.appendChild(r);
|
|
2239
2239
|
}
|
|
2240
2240
|
});
|
|
2241
2241
|
}
|
|
2242
|
-
const
|
|
2242
|
+
const di = [...`
|
|
2243
2243
|
\r\f \v\uFEFF`];
|
|
2244
|
-
function
|
|
2244
|
+
function ss(t, e, n) {
|
|
2245
2245
|
var i = "" + t;
|
|
2246
2246
|
if (n) {
|
|
2247
2247
|
for (var r of Object.keys(n))
|
|
@@ -2250,18 +2250,18 @@ function is(t, e, n) {
|
|
|
2250
2250
|
else if (i.length)
|
|
2251
2251
|
for (var o = r.length, s = 0; (s = i.indexOf(r, s)) >= 0; ) {
|
|
2252
2252
|
var l = s + o;
|
|
2253
|
-
(s === 0 ||
|
|
2253
|
+
(s === 0 || di.includes(i[s - 1])) && (l === i.length || di.includes(i[l])) ? i = (s === 0 ? "" : i.substring(0, s)) + i.substring(l + 1) : s = l;
|
|
2254
2254
|
}
|
|
2255
2255
|
}
|
|
2256
2256
|
return i === "" ? null : i;
|
|
2257
2257
|
}
|
|
2258
|
-
function
|
|
2258
|
+
function ls(t, e) {
|
|
2259
2259
|
return t == null ? null : String(t);
|
|
2260
2260
|
}
|
|
2261
|
-
function
|
|
2261
|
+
function as(t, e, n, i, r, o) {
|
|
2262
2262
|
var s = t.__className;
|
|
2263
2263
|
if ($ || s !== n || s === void 0) {
|
|
2264
|
-
var l =
|
|
2264
|
+
var l = ss(n, i, o);
|
|
2265
2265
|
(!$ || l !== t.getAttribute("class")) && (l == null ? t.removeAttribute("class") : t.className = l), t.__className = n;
|
|
2266
2266
|
} else if (o && r !== o)
|
|
2267
2267
|
for (var a in o) {
|
|
@@ -2273,57 +2273,57 @@ function os(t, e, n, i, r, o) {
|
|
|
2273
2273
|
function tt(t, e, n, i) {
|
|
2274
2274
|
var r = t.__style;
|
|
2275
2275
|
if ($ || r !== e) {
|
|
2276
|
-
var o =
|
|
2276
|
+
var o = ls(e);
|
|
2277
2277
|
(!$ || o !== t.getAttribute("style")) && (o == null ? t.removeAttribute("style") : t.style.cssText = o), t.__style = e;
|
|
2278
2278
|
}
|
|
2279
2279
|
return i;
|
|
2280
2280
|
}
|
|
2281
|
-
const
|
|
2282
|
-
function
|
|
2283
|
-
var r =
|
|
2284
|
-
$ && (r[e] = t.getAttribute(e)), r[e] !== (r[e] = n) && (n == null ? t.removeAttribute(e) : typeof n != "string" &&
|
|
2281
|
+
const cs = /* @__PURE__ */ Symbol("is custom element"), us = /* @__PURE__ */ Symbol("is html");
|
|
2282
|
+
function ds(t, e, n, i) {
|
|
2283
|
+
var r = fs(t);
|
|
2284
|
+
$ && (r[e] = t.getAttribute(e)), r[e] !== (r[e] = n) && (n == null ? t.removeAttribute(e) : typeof n != "string" && hs(t).includes(e) ? t[e] = n : t.setAttribute(e, n));
|
|
2285
2285
|
}
|
|
2286
|
-
function
|
|
2286
|
+
function fs(t) {
|
|
2287
2287
|
return (
|
|
2288
2288
|
/** @type {Record<string | symbol, unknown>} **/
|
|
2289
2289
|
// @ts-expect-error
|
|
2290
2290
|
t.__attributes ?? (t.__attributes = {
|
|
2291
|
-
[
|
|
2292
|
-
[
|
|
2291
|
+
[cs]: t.nodeName.includes("-"),
|
|
2292
|
+
[us]: t.namespaceURI === Ai
|
|
2293
2293
|
})
|
|
2294
2294
|
);
|
|
2295
2295
|
}
|
|
2296
2296
|
var fi = /* @__PURE__ */ new Map();
|
|
2297
|
-
function
|
|
2297
|
+
function hs(t) {
|
|
2298
2298
|
var e = t.getAttribute("is") || t.nodeName, n = fi.get(e);
|
|
2299
2299
|
if (n) return n;
|
|
2300
2300
|
fi.set(e, n = []);
|
|
2301
2301
|
for (var i, r = t, o = Element.prototype; o !== r; ) {
|
|
2302
|
-
i =
|
|
2302
|
+
i = qr(r);
|
|
2303
2303
|
for (var s in i)
|
|
2304
2304
|
i[s].set && n.push(s);
|
|
2305
|
-
r =
|
|
2305
|
+
r = $i(r);
|
|
2306
2306
|
}
|
|
2307
2307
|
return n;
|
|
2308
2308
|
}
|
|
2309
|
-
function
|
|
2309
|
+
function hi(t, e) {
|
|
2310
2310
|
return t === e || t?.[Vt] === e;
|
|
2311
2311
|
}
|
|
2312
|
-
function
|
|
2313
|
-
return
|
|
2312
|
+
function ps(t = {}, e, n, i) {
|
|
2313
|
+
return er(() => {
|
|
2314
2314
|
var r, o;
|
|
2315
|
-
return
|
|
2316
|
-
r = o, o = [],
|
|
2317
|
-
t !== n(...o) && (e(t, ...o), r &&
|
|
2315
|
+
return Mn(() => {
|
|
2316
|
+
r = o, o = [], Dn(() => {
|
|
2317
|
+
t !== n(...o) && (e(t, ...o), r && hi(n(...r), t) && e(null, ...r));
|
|
2318
2318
|
});
|
|
2319
2319
|
}), () => {
|
|
2320
2320
|
Xe(() => {
|
|
2321
|
-
o &&
|
|
2321
|
+
o && hi(n(...o), t) && e(null, ...o);
|
|
2322
2322
|
});
|
|
2323
2323
|
};
|
|
2324
2324
|
}), t;
|
|
2325
2325
|
}
|
|
2326
|
-
function
|
|
2326
|
+
function pi(t, e, n, i) {
|
|
2327
2327
|
var r = (
|
|
2328
2328
|
/** @type {V} */
|
|
2329
2329
|
i
|
|
@@ -2339,7 +2339,7 @@ function hi(t, e, n, i) {
|
|
|
2339
2339
|
);
|
|
2340
2340
|
return v === void 0 ? s() : (o = !0, v);
|
|
2341
2341
|
};
|
|
2342
|
-
var u = !1,
|
|
2342
|
+
var u = !1, d = /* @__PURE__ */ Cn(() => (u = !1, a())), h = (
|
|
2343
2343
|
/** @type {Effect} */
|
|
2344
2344
|
T
|
|
2345
2345
|
);
|
|
@@ -2347,18 +2347,18 @@ function hi(t, e, n, i) {
|
|
|
2347
2347
|
/** @type {() => V} */
|
|
2348
2348
|
(function(v, y) {
|
|
2349
2349
|
if (arguments.length > 0) {
|
|
2350
|
-
const g = y ? d
|
|
2351
|
-
return k(
|
|
2350
|
+
const g = y ? f(d) : v;
|
|
2351
|
+
return k(d, g), u = !0, r !== void 0 && (r = g), v;
|
|
2352
2352
|
}
|
|
2353
|
-
return Ve && u || (h.f & $e) !== 0 ?
|
|
2353
|
+
return Ve && u || (h.f & $e) !== 0 ? d.v : f(d);
|
|
2354
2354
|
})
|
|
2355
2355
|
);
|
|
2356
2356
|
}
|
|
2357
|
-
function
|
|
2358
|
-
return new
|
|
2357
|
+
function vs(t) {
|
|
2358
|
+
return new gs(t);
|
|
2359
2359
|
}
|
|
2360
2360
|
var Se, X;
|
|
2361
|
-
class
|
|
2361
|
+
class gs {
|
|
2362
2362
|
/**
|
|
2363
2363
|
* @param {ComponentConstructorOptions & {
|
|
2364
2364
|
* component: any;
|
|
@@ -2370,24 +2370,24 @@ class hs {
|
|
|
2370
2370
|
/** @type {Record<string, any>} */
|
|
2371
2371
|
b(this, X);
|
|
2372
2372
|
var n = /* @__PURE__ */ new Map(), i = (o, s) => {
|
|
2373
|
-
var l = /* @__PURE__ */
|
|
2373
|
+
var l = /* @__PURE__ */ Ro(s, !1, !1);
|
|
2374
2374
|
return n.set(o, l), l;
|
|
2375
2375
|
};
|
|
2376
2376
|
const r = new Proxy(
|
|
2377
2377
|
{ ...e.props || {}, $$events: {} },
|
|
2378
2378
|
{
|
|
2379
2379
|
get(o, s) {
|
|
2380
|
-
return
|
|
2380
|
+
return f(n.get(s) ?? i(s, Reflect.get(o, s)));
|
|
2381
2381
|
},
|
|
2382
2382
|
has(o, s) {
|
|
2383
|
-
return s ===
|
|
2383
|
+
return s === Zr ? !0 : (f(n.get(s) ?? i(s, Reflect.get(o, s))), Reflect.has(o, s));
|
|
2384
2384
|
},
|
|
2385
2385
|
set(o, s, l) {
|
|
2386
2386
|
return k(n.get(s) ?? i(s, l), l), Reflect.set(o, s, l);
|
|
2387
2387
|
}
|
|
2388
2388
|
}
|
|
2389
2389
|
);
|
|
2390
|
-
m(this, X, (e.hydrate ?
|
|
2390
|
+
m(this, X, (e.hydrate ? ts : gr)(e.component, {
|
|
2391
2391
|
target: e.target,
|
|
2392
2392
|
anchor: e.anchor,
|
|
2393
2393
|
props: r,
|
|
@@ -2411,7 +2411,7 @@ class hs {
|
|
|
2411
2411
|
(o) => {
|
|
2412
2412
|
Object.assign(r, o);
|
|
2413
2413
|
}, c(this, X).$destroy = () => {
|
|
2414
|
-
|
|
2414
|
+
ns(c(this, X));
|
|
2415
2415
|
};
|
|
2416
2416
|
}
|
|
2417
2417
|
/** @param {Record<string, any>} props */
|
|
@@ -2438,8 +2438,8 @@ class hs {
|
|
|
2438
2438
|
}
|
|
2439
2439
|
}
|
|
2440
2440
|
Se = new WeakMap(), X = new WeakMap();
|
|
2441
|
-
let
|
|
2442
|
-
typeof HTMLElement == "function" && (
|
|
2441
|
+
let _r;
|
|
2442
|
+
typeof HTMLElement == "function" && (_r = class extends HTMLElement {
|
|
2443
2443
|
/**
|
|
2444
2444
|
* @param {*} $$componentCtor
|
|
2445
2445
|
* @param {*} $$slots
|
|
@@ -2498,13 +2498,13 @@ typeof HTMLElement == "function" && (mr = class extends HTMLElement {
|
|
|
2498
2498
|
if (this.$$cn = !0, !this.$$c) {
|
|
2499
2499
|
let e = function(r) {
|
|
2500
2500
|
return (o) => {
|
|
2501
|
-
const s =
|
|
2501
|
+
const s = Rn("slot");
|
|
2502
2502
|
r !== "default" && (s.name = r), Bt(o, s);
|
|
2503
2503
|
};
|
|
2504
2504
|
};
|
|
2505
2505
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2506
2506
|
return;
|
|
2507
|
-
const n = {}, i =
|
|
2507
|
+
const n = {}, i = ms(this);
|
|
2508
2508
|
for (const r of this.$$s)
|
|
2509
2509
|
r in i && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), n.default = !0) : n[r] = e(r));
|
|
2510
2510
|
for (const r of this.attributes) {
|
|
@@ -2513,7 +2513,7 @@ typeof HTMLElement == "function" && (mr = class extends HTMLElement {
|
|
|
2513
2513
|
}
|
|
2514
2514
|
for (const r in this.$$p_d)
|
|
2515
2515
|
!(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
|
|
2516
|
-
this.$$c =
|
|
2516
|
+
this.$$c = vs({
|
|
2517
2517
|
component: this.$$ctor,
|
|
2518
2518
|
target: this.$$shadowRoot || this,
|
|
2519
2519
|
props: {
|
|
@@ -2521,8 +2521,8 @@ typeof HTMLElement == "function" && (mr = class extends HTMLElement {
|
|
|
2521
2521
|
$$slots: n,
|
|
2522
2522
|
$$host: this
|
|
2523
2523
|
}
|
|
2524
|
-
}), this.$$me =
|
|
2525
|
-
|
|
2524
|
+
}), this.$$me = Vo(() => {
|
|
2525
|
+
Mn(() => {
|
|
2526
2526
|
this.$$r = !0;
|
|
2527
2527
|
for (const r of qt(this.$$c)) {
|
|
2528
2528
|
if (!this.$$p_d[r]?.reflect) continue;
|
|
@@ -2600,7 +2600,7 @@ function Gt(t, e, n, i) {
|
|
|
2600
2600
|
return e;
|
|
2601
2601
|
}
|
|
2602
2602
|
}
|
|
2603
|
-
function
|
|
2603
|
+
function ms(t) {
|
|
2604
2604
|
const e = {};
|
|
2605
2605
|
return t.childNodes.forEach((n) => {
|
|
2606
2606
|
e[
|
|
@@ -2609,8 +2609,8 @@ function ps(t) {
|
|
|
2609
2609
|
] = !0;
|
|
2610
2610
|
}), e;
|
|
2611
2611
|
}
|
|
2612
|
-
function
|
|
2613
|
-
let s = class extends
|
|
2612
|
+
function _s(t, e, n, i, r, o) {
|
|
2613
|
+
let s = class extends _r {
|
|
2614
2614
|
constructor() {
|
|
2615
2615
|
super(t, n, r), this.$$p_d = e;
|
|
2616
2616
|
}
|
|
@@ -2629,8 +2629,8 @@ function vs(t, e, n, i, r, o) {
|
|
|
2629
2629
|
a = Gt(l, a, e), this.$$d[l] = a;
|
|
2630
2630
|
var u = this.$$c;
|
|
2631
2631
|
if (u) {
|
|
2632
|
-
var
|
|
2633
|
-
|
|
2632
|
+
var d = it(u, l)?.get;
|
|
2633
|
+
d ? u[l] = a : u.$set({ [l]: a });
|
|
2634
2634
|
}
|
|
2635
2635
|
}
|
|
2636
2636
|
});
|
|
@@ -2643,7 +2643,7 @@ function vs(t, e, n, i, r, o) {
|
|
|
2643
2643
|
}), t.element = /** @type {any} */
|
|
2644
2644
|
s, s;
|
|
2645
2645
|
}
|
|
2646
|
-
class
|
|
2646
|
+
class bs extends Event {
|
|
2647
2647
|
constructor(n, i, r, o) {
|
|
2648
2648
|
super("context-request", { bubbles: !0, composed: !0 });
|
|
2649
2649
|
p(this, "context");
|
|
@@ -2653,7 +2653,7 @@ class gs extends Event {
|
|
|
2653
2653
|
this.context = n, this.contextTarget = i, this.callback = r, this.subscribe = o ?? !1;
|
|
2654
2654
|
}
|
|
2655
2655
|
}
|
|
2656
|
-
class
|
|
2656
|
+
class ys {
|
|
2657
2657
|
constructor(e, n) {
|
|
2658
2658
|
p(this, "host");
|
|
2659
2659
|
p(this, "context");
|
|
@@ -2677,13 +2677,13 @@ class ms {
|
|
|
2677
2677
|
return this.currentValue;
|
|
2678
2678
|
}
|
|
2679
2679
|
requestValue() {
|
|
2680
|
-
this.host.dispatchEvent(new
|
|
2680
|
+
this.host.dispatchEvent(new bs(this.context, this.host, this.handleValue, this.subscribe));
|
|
2681
2681
|
}
|
|
2682
2682
|
}
|
|
2683
|
-
const
|
|
2684
|
-
function
|
|
2683
|
+
const ws = (t) => t, Ts = ws(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext"));
|
|
2684
|
+
function Is(t, e, n) {
|
|
2685
2685
|
let i = !1;
|
|
2686
|
-
const r = new
|
|
2686
|
+
const r = new ys(t, {
|
|
2687
2687
|
context: e,
|
|
2688
2688
|
subscribe: !0,
|
|
2689
2689
|
onValue: (u) => {
|
|
@@ -2707,29 +2707,29 @@ function ys(t, e, n) {
|
|
|
2707
2707
|
globalThis.clearInterval(a), t.removeEventListener("context-provider", o), r.disconnect();
|
|
2708
2708
|
};
|
|
2709
2709
|
}
|
|
2710
|
-
function
|
|
2711
|
-
return
|
|
2710
|
+
function Ss(t, e) {
|
|
2711
|
+
return Is(t, Ts, e);
|
|
2712
2712
|
}
|
|
2713
|
-
function
|
|
2714
|
-
return
|
|
2713
|
+
function As(t, e) {
|
|
2714
|
+
return Ss(t, e);
|
|
2715
2715
|
}
|
|
2716
|
-
var
|
|
2716
|
+
var vi;
|
|
2717
2717
|
(function(t) {
|
|
2718
2718
|
t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
|
|
2719
|
-
})(
|
|
2720
|
-
var
|
|
2719
|
+
})(vi || (vi = {}));
|
|
2720
|
+
var gi;
|
|
2721
2721
|
(function(t) {
|
|
2722
2722
|
t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
|
|
2723
|
-
})(
|
|
2724
|
-
const
|
|
2723
|
+
})(gi || (gi = {}));
|
|
2724
|
+
const $s = {
|
|
2725
2725
|
tts: "textToSpeech",
|
|
2726
2726
|
colorScheme: "theme"
|
|
2727
2727
|
};
|
|
2728
|
-
function
|
|
2728
|
+
function ks(t) {
|
|
2729
2729
|
const e = t.trim();
|
|
2730
|
-
return e ?
|
|
2730
|
+
return e ? $s[e] || e : "";
|
|
2731
2731
|
}
|
|
2732
|
-
const
|
|
2732
|
+
const Es = [
|
|
2733
2733
|
"assessment",
|
|
2734
2734
|
"section",
|
|
2735
2735
|
"item",
|
|
@@ -2741,12 +2741,12 @@ function Ut(t, e) {
|
|
|
2741
2741
|
if (typeof t != "string" || t.trim().length === 0)
|
|
2742
2742
|
throw new Error(`Invalid tool registration: "${e}" must be a non-empty string.`);
|
|
2743
2743
|
}
|
|
2744
|
-
function
|
|
2744
|
+
function mi(t) {
|
|
2745
2745
|
if (Ut(t.toolId, "toolId"), Ut(t.name, "name"), Ut(t.description, "description"), typeof t.icon != "string" && typeof t.icon != "function")
|
|
2746
2746
|
throw new Error(`Invalid tool registration "${t.toolId}": "icon" must be a string or function.`);
|
|
2747
2747
|
if (!Array.isArray(t.supportedLevels) || t.supportedLevels.length === 0)
|
|
2748
2748
|
throw new Error(`Invalid tool registration "${t.toolId}": "supportedLevels" must be a non-empty array.`);
|
|
2749
|
-
const e = t.supportedLevels.find((n) => !
|
|
2749
|
+
const e = t.supportedLevels.find((n) => !Es.includes(n));
|
|
2750
2750
|
if (e)
|
|
2751
2751
|
throw new Error(`Invalid tool registration "${t.toolId}": unsupported level "${e}".`);
|
|
2752
2752
|
if (t.activation !== void 0 && t.activation !== "toolbar-toggle" && t.activation !== "selection-gateway")
|
|
@@ -2762,7 +2762,7 @@ function gi(t) {
|
|
|
2762
2762
|
if (typeof t.renderToolbar != "function")
|
|
2763
2763
|
throw new Error(`Invalid tool registration "${t.toolId}": "renderToolbar" must be a function.`);
|
|
2764
2764
|
}
|
|
2765
|
-
class
|
|
2765
|
+
class Os {
|
|
2766
2766
|
constructor() {
|
|
2767
2767
|
p(this, "tools", /* @__PURE__ */ new Map());
|
|
2768
2768
|
p(this, "pnpIndex", /* @__PURE__ */ new Map());
|
|
@@ -2776,7 +2776,7 @@ class $s {
|
|
|
2776
2776
|
* Normalize a single tool alias to canonical toolId.
|
|
2777
2777
|
*/
|
|
2778
2778
|
normalizeToolId(e) {
|
|
2779
|
-
return
|
|
2779
|
+
return ks(e);
|
|
2780
2780
|
}
|
|
2781
2781
|
/**
|
|
2782
2782
|
* Normalize a list of tool aliases to canonical toolIds.
|
|
@@ -2791,7 +2791,7 @@ class $s {
|
|
|
2791
2791
|
* @throws Error if toolId is already registered
|
|
2792
2792
|
*/
|
|
2793
2793
|
register(e) {
|
|
2794
|
-
if (
|
|
2794
|
+
if (mi(e), this.tools.has(e.toolId))
|
|
2795
2795
|
throw new Error(`Tool '${e.toolId}' is already registered`);
|
|
2796
2796
|
if (this.tools.set(e.toolId, e), e.pnpSupportIds)
|
|
2797
2797
|
for (const n of e.pnpSupportIds)
|
|
@@ -2803,7 +2803,7 @@ class $s {
|
|
|
2803
2803
|
* @param registration - New tool registration (must have existing toolId)
|
|
2804
2804
|
*/
|
|
2805
2805
|
override(e) {
|
|
2806
|
-
if (
|
|
2806
|
+
if (mi(e), !this.tools.has(e.toolId))
|
|
2807
2807
|
throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
|
|
2808
2808
|
const n = this.tools.get(e.toolId);
|
|
2809
2809
|
if (n.pnpSupportIds)
|
|
@@ -3036,20 +3036,20 @@ class $s {
|
|
|
3036
3036
|
return r.renderToolbar(n, o);
|
|
3037
3037
|
}
|
|
3038
3038
|
}
|
|
3039
|
-
function
|
|
3039
|
+
function br(t) {
|
|
3040
3040
|
return t.level === "item";
|
|
3041
3041
|
}
|
|
3042
|
-
function
|
|
3042
|
+
function Cs(t) {
|
|
3043
3043
|
return t.level === "passage";
|
|
3044
3044
|
}
|
|
3045
|
-
function
|
|
3045
|
+
function Ps(t) {
|
|
3046
3046
|
return t.level === "rubric";
|
|
3047
3047
|
}
|
|
3048
|
-
function
|
|
3048
|
+
function yr(t) {
|
|
3049
3049
|
return t.level === "element";
|
|
3050
3050
|
}
|
|
3051
|
-
function
|
|
3052
|
-
if (
|
|
3051
|
+
function zn(t) {
|
|
3052
|
+
if (yr(t)) {
|
|
3053
3053
|
const e = t.item.config;
|
|
3054
3054
|
if (!e)
|
|
3055
3055
|
return "";
|
|
@@ -3061,13 +3061,13 @@ function Dn(t) {
|
|
|
3061
3061
|
if (typeof a == "string" && n.push(i(a)), Array.isArray(a)) {
|
|
3062
3062
|
for (const u of a)
|
|
3063
3063
|
if (u && typeof u == "object")
|
|
3064
|
-
for (const
|
|
3065
|
-
typeof
|
|
3064
|
+
for (const d of Object.values(u))
|
|
3065
|
+
typeof d == "string" && n.push(i(d));
|
|
3066
3066
|
}
|
|
3067
3067
|
}
|
|
3068
3068
|
return n.filter(Boolean).join(" ").trim();
|
|
3069
3069
|
}
|
|
3070
|
-
if (
|
|
3070
|
+
if (br(t)) {
|
|
3071
3071
|
const e = t.item;
|
|
3072
3072
|
if (!e?.config)
|
|
3073
3073
|
return "";
|
|
@@ -3082,15 +3082,15 @@ function Dn(t) {
|
|
|
3082
3082
|
if (!(!a || typeof a != "object")) {
|
|
3083
3083
|
for (const u of Object.values(a))
|
|
3084
3084
|
if (typeof u == "string" && i.push(r(u)), Array.isArray(u)) {
|
|
3085
|
-
for (const
|
|
3086
|
-
if (
|
|
3087
|
-
for (const h of Object.values(
|
|
3085
|
+
for (const d of u)
|
|
3086
|
+
if (d && typeof d == "object")
|
|
3087
|
+
for (const h of Object.values(d))
|
|
3088
3088
|
typeof h == "string" && i.push(r(h));
|
|
3089
3089
|
}
|
|
3090
3090
|
}
|
|
3091
3091
|
return i.filter(Boolean).join(" ").trim();
|
|
3092
3092
|
}
|
|
3093
|
-
if (
|
|
3093
|
+
if (Cs(t)) {
|
|
3094
3094
|
const e = t.passage;
|
|
3095
3095
|
if (!e?.config)
|
|
3096
3096
|
return "";
|
|
@@ -3105,22 +3105,22 @@ function Dn(t) {
|
|
|
3105
3105
|
if (!(!a || typeof a != "object")) {
|
|
3106
3106
|
for (const u of Object.values(a))
|
|
3107
3107
|
if (typeof u == "string" && i.push(r(u)), Array.isArray(u)) {
|
|
3108
|
-
for (const
|
|
3109
|
-
if (
|
|
3110
|
-
for (const h of Object.values(
|
|
3108
|
+
for (const d of u)
|
|
3109
|
+
if (d && typeof d == "object")
|
|
3110
|
+
for (const h of Object.values(d))
|
|
3111
3111
|
typeof h == "string" && i.push(r(h));
|
|
3112
3112
|
}
|
|
3113
3113
|
}
|
|
3114
3114
|
return i.filter(Boolean).join(" ").trim();
|
|
3115
3115
|
}
|
|
3116
|
-
if (
|
|
3116
|
+
if (Ps(t)) {
|
|
3117
3117
|
const e = t.rubricBlock;
|
|
3118
3118
|
return e.passage?.config ? (e.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (e.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
3119
3119
|
}
|
|
3120
3120
|
return "";
|
|
3121
3121
|
}
|
|
3122
3122
|
function tn(t) {
|
|
3123
|
-
const e =
|
|
3123
|
+
const e = zn(t);
|
|
3124
3124
|
return [
|
|
3125
3125
|
/<math[>\s]/i,
|
|
3126
3126
|
// MathML
|
|
@@ -3136,7 +3136,7 @@ function tn(t) {
|
|
|
3136
3136
|
// Simple arithmetic
|
|
3137
3137
|
].some((i) => i.test(e));
|
|
3138
3138
|
}
|
|
3139
|
-
function
|
|
3139
|
+
function Rs(t) {
|
|
3140
3140
|
const e = [
|
|
3141
3141
|
"pie-multiple-choice",
|
|
3142
3142
|
"pie-inline-choice",
|
|
@@ -3145,7 +3145,7 @@ function Os(t) {
|
|
|
3145
3145
|
"inline-choice",
|
|
3146
3146
|
"select-text"
|
|
3147
3147
|
];
|
|
3148
|
-
if (
|
|
3148
|
+
if (yr(t)) {
|
|
3149
3149
|
const n = t.item.config;
|
|
3150
3150
|
if (!n?.models)
|
|
3151
3151
|
return !1;
|
|
@@ -3155,7 +3155,7 @@ function Os(t) {
|
|
|
3155
3155
|
const o = r.element || "";
|
|
3156
3156
|
return e.includes(o);
|
|
3157
3157
|
}
|
|
3158
|
-
if (
|
|
3158
|
+
if (br(t)) {
|
|
3159
3159
|
const n = t.item.config?.models;
|
|
3160
3160
|
return (Array.isArray(n) ? n : n && typeof n == "object" ? Object.values(n) : []).some((r) => {
|
|
3161
3161
|
if (!r || typeof r != "object")
|
|
@@ -3167,10 +3167,10 @@ function Os(t) {
|
|
|
3167
3167
|
return !1;
|
|
3168
3168
|
}
|
|
3169
3169
|
function nn(t) {
|
|
3170
|
-
return
|
|
3170
|
+
return zn(t).trim().length >= 10;
|
|
3171
3171
|
}
|
|
3172
|
-
function
|
|
3173
|
-
const e =
|
|
3172
|
+
function Ls(t) {
|
|
3173
|
+
const e = zn(t);
|
|
3174
3174
|
return [
|
|
3175
3175
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
3176
3176
|
/periodic\s+table/i,
|
|
@@ -3182,25 +3182,25 @@ function Cs(t) {
|
|
|
3182
3182
|
/physics|force|energy|velocity|acceleration/i
|
|
3183
3183
|
].some((i) => i.test(e));
|
|
3184
3184
|
}
|
|
3185
|
-
const
|
|
3185
|
+
const xs = [
|
|
3186
3186
|
"assessment",
|
|
3187
3187
|
"section",
|
|
3188
3188
|
"item",
|
|
3189
3189
|
"passage",
|
|
3190
3190
|
"rubric"
|
|
3191
|
-
],
|
|
3192
|
-
function
|
|
3193
|
-
return
|
|
3191
|
+
], Ms = new Set(xs);
|
|
3192
|
+
function Ns(t) {
|
|
3193
|
+
return Ms.has(t);
|
|
3194
3194
|
}
|
|
3195
|
-
function
|
|
3195
|
+
function Vn(t, e, n) {
|
|
3196
3196
|
const i = t.trim(), r = n.trim();
|
|
3197
3197
|
if (!i || !r)
|
|
3198
3198
|
throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
3199
|
-
if (!
|
|
3199
|
+
if (!Ns(e))
|
|
3200
3200
|
throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
|
|
3201
3201
|
return `${i}:${e}:${r}`;
|
|
3202
3202
|
}
|
|
3203
|
-
class
|
|
3203
|
+
class Ds {
|
|
3204
3204
|
constructor() {
|
|
3205
3205
|
p(this, "providerId", "desmos-calculator");
|
|
3206
3206
|
p(this, "providerName", "Desmos Calculator");
|
|
@@ -3286,7 +3286,33 @@ class xs {
|
|
|
3286
3286
|
this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
|
|
3287
3287
|
}
|
|
3288
3288
|
}
|
|
3289
|
-
|
|
3289
|
+
const zs = (t, e) => {
|
|
3290
|
+
const n = e?.useSentenceSegmenter !== !1;
|
|
3291
|
+
try {
|
|
3292
|
+
if (!n)
|
|
3293
|
+
throw new Error("Segmenter disabled by policy");
|
|
3294
|
+
const l = globalThis.Intl?.Segmenter;
|
|
3295
|
+
if (typeof l == "function") {
|
|
3296
|
+
const a = new l(e?.locale, {
|
|
3297
|
+
granularity: "sentence"
|
|
3298
|
+
}), u = Array.from(a.segment(t)).map((d) => ({
|
|
3299
|
+
text: d.segment,
|
|
3300
|
+
offset: d.index
|
|
3301
|
+
})).filter((d) => d.text.trim().length > 0);
|
|
3302
|
+
if (u.length > 0)
|
|
3303
|
+
return u;
|
|
3304
|
+
}
|
|
3305
|
+
} catch {
|
|
3306
|
+
}
|
|
3307
|
+
const i = /[^.!?]+(?:[.!?]+|$)/g, r = t.match(i) || [t], o = [];
|
|
3308
|
+
let s = 0;
|
|
3309
|
+
for (const l of r) {
|
|
3310
|
+
const a = t.indexOf(l, s);
|
|
3311
|
+
a !== -1 && (o.push({ text: l, offset: a }), s = a + l.length);
|
|
3312
|
+
}
|
|
3313
|
+
return o.length > 0 ? o : [{ text: t, offset: 0 }];
|
|
3314
|
+
};
|
|
3315
|
+
class Vs {
|
|
3290
3316
|
constructor() {
|
|
3291
3317
|
p(this, "providerId", "browser");
|
|
3292
3318
|
p(this, "providerName", "Browser Speech Synthesis");
|
|
@@ -3297,7 +3323,7 @@ class Ms {
|
|
|
3297
3323
|
throw new Error("BrowserTTSProvider requires browser environment");
|
|
3298
3324
|
if (!("speechSynthesis" in window))
|
|
3299
3325
|
throw new Error("Browser does not support Speech Synthesis API");
|
|
3300
|
-
return new
|
|
3326
|
+
return new Fs(e);
|
|
3301
3327
|
}
|
|
3302
3328
|
supportsFeature(e) {
|
|
3303
3329
|
return !0;
|
|
@@ -3315,7 +3341,7 @@ class Ms {
|
|
|
3315
3341
|
destroy() {
|
|
3316
3342
|
}
|
|
3317
3343
|
}
|
|
3318
|
-
class
|
|
3344
|
+
class Fs {
|
|
3319
3345
|
constructor(e) {
|
|
3320
3346
|
p(this, "utterance", null);
|
|
3321
3347
|
p(this, "config", null);
|
|
@@ -3363,13 +3389,13 @@ class Ns {
|
|
|
3363
3389
|
const a = l.text.trim();
|
|
3364
3390
|
if (!a)
|
|
3365
3391
|
continue;
|
|
3366
|
-
const u = l.text.search(/\S/),
|
|
3392
|
+
const u = l.text.search(/\S/), d = l.offset + (u === -1 ? 0 : u);
|
|
3367
3393
|
if (!o) {
|
|
3368
|
-
o = a, s =
|
|
3394
|
+
o = a, s = d;
|
|
3369
3395
|
continue;
|
|
3370
3396
|
}
|
|
3371
3397
|
const h = `${o} ${a}`;
|
|
3372
|
-
h.length <= 260 ? o = h : (r.push({ text: o, offset: s }), o = a, s =
|
|
3398
|
+
h.length <= 260 ? o = h : (r.push({ text: o, offset: s }), o = a, s = d);
|
|
3373
3399
|
}
|
|
3374
3400
|
return o && r.push({ text: o, offset: s }), r.length ? r : [{ text: e, offset: 0 }];
|
|
3375
3401
|
}
|
|
@@ -3385,30 +3411,11 @@ class Ns {
|
|
|
3385
3411
|
};
|
|
3386
3412
|
}
|
|
3387
3413
|
segmentSentences(e) {
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
if (typeof l == "function") {
|
|
3394
|
-
const a = new l(s.locale, {
|
|
3395
|
-
granularity: "sentence"
|
|
3396
|
-
}), f = Array.from(a.segment(e)).map((h) => ({
|
|
3397
|
-
text: h.segment,
|
|
3398
|
-
offset: h.index
|
|
3399
|
-
})).filter((h) => h.text.trim().length > 0);
|
|
3400
|
-
if (f.length > 0)
|
|
3401
|
-
return f;
|
|
3402
|
-
}
|
|
3403
|
-
} catch {
|
|
3404
|
-
}
|
|
3405
|
-
const n = /[^.!?]+(?:[.!?]+|$)/g, i = e.match(n) || [e], r = [];
|
|
3406
|
-
let o = 0;
|
|
3407
|
-
for (const s of i) {
|
|
3408
|
-
const l = e.indexOf(s, o);
|
|
3409
|
-
l !== -1 && (r.push({ text: s, offset: l }), o = l + s.length);
|
|
3410
|
-
}
|
|
3411
|
-
return r.length > 0 ? r : [{ text: e, offset: 0 }];
|
|
3414
|
+
const n = this.getSegmentationPolicy();
|
|
3415
|
+
return zs(e, {
|
|
3416
|
+
locale: n.locale,
|
|
3417
|
+
useSentenceSegmenter: n.useSentenceSegmenter
|
|
3418
|
+
});
|
|
3412
3419
|
}
|
|
3413
3420
|
inferWordLength(e, n) {
|
|
3414
3421
|
const i = Math.max(0, Math.min(n, Math.max(0, e.length - 1)));
|
|
@@ -3449,8 +3456,8 @@ class Ns {
|
|
|
3449
3456
|
}, this.utterance.onboundary = (s) => {
|
|
3450
3457
|
if (i !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", s.name, "charIndex:", s.charIndex, "charLength:", s.charLength), s.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence")
|
|
3451
3458
|
return;
|
|
3452
|
-
const l = Math.max(0, Math.min(s.charIndex, Math.max(0, e.length - 1))), a = Number(s.charLength || 0), u = this.inferWordLength(e, l),
|
|
3453
|
-
console.log("[BrowserProvider] Calling onWordBoundary with word:", h, "at position:", v), this.onWordBoundary(h, v,
|
|
3459
|
+
const l = Math.max(0, Math.min(s.charIndex, Math.max(0, e.length - 1))), a = Number(s.charLength || 0), u = this.inferWordLength(e, l), d = Number.isFinite(a) && a > 0 && a <= 80 && l + a <= e.length ? a : u, h = e.substring(l, Math.min(e.length, l + d)).trim(), v = n + l;
|
|
3460
|
+
console.log("[BrowserProvider] Calling onWordBoundary with word:", h, "at position:", v), this.onWordBoundary(h, v, d);
|
|
3454
3461
|
}, speechSynthesis.speak(this.utterance);
|
|
3455
3462
|
});
|
|
3456
3463
|
}
|
|
@@ -3480,7 +3487,7 @@ class Ns {
|
|
|
3480
3487
|
});
|
|
3481
3488
|
}
|
|
3482
3489
|
}
|
|
3483
|
-
class
|
|
3490
|
+
class js {
|
|
3484
3491
|
/**
|
|
3485
3492
|
* Create TTS tool provider
|
|
3486
3493
|
*
|
|
@@ -3529,7 +3536,7 @@ class Ds {
|
|
|
3529
3536
|
async _initializeBrowserTTS(e) {
|
|
3530
3537
|
if (typeof window > "u" || !("speechSynthesis" in window))
|
|
3531
3538
|
throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
|
|
3532
|
-
this.ttsProvider = new
|
|
3539
|
+
this.ttsProvider = new Vs(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
|
|
3533
3540
|
}
|
|
3534
3541
|
/**
|
|
3535
3542
|
* Initialize server-based TTS (Polly, Google)
|
|
@@ -3595,7 +3602,7 @@ class Ds {
|
|
|
3595
3602
|
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
3596
3603
|
}
|
|
3597
3604
|
}
|
|
3598
|
-
const
|
|
3605
|
+
const Hs = /* @__PURE__ */ new Set([
|
|
3599
3606
|
"annotation-xml",
|
|
3600
3607
|
"color-profile",
|
|
3601
3608
|
"font-face",
|
|
@@ -3604,7 +3611,7 @@ const zs = /* @__PURE__ */ new Set([
|
|
|
3604
3611
|
"font-face-format",
|
|
3605
3612
|
"font-face-name",
|
|
3606
3613
|
"missing-glyph"
|
|
3607
|
-
]),
|
|
3614
|
+
]), Bs = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Gs = (t, e = "custom element tag") => {
|
|
3608
3615
|
if (!t || typeof t != "string")
|
|
3609
3616
|
throw new Error(`Invalid ${e}: expected a non-empty string`);
|
|
3610
3617
|
const n = t.trim();
|
|
@@ -3614,12 +3621,12 @@ const zs = /* @__PURE__ */ new Set([
|
|
|
3614
3621
|
throw new Error(`Invalid ${e} "${n}": custom element names must be lowercase`);
|
|
3615
3622
|
if (!n.includes("-"))
|
|
3616
3623
|
throw new Error(`Invalid ${e} "${n}": custom element names must include a hyphen`);
|
|
3617
|
-
if (
|
|
3624
|
+
if (Hs.has(n))
|
|
3618
3625
|
throw new Error(`Invalid ${e} "${n}": this name is reserved by the HTML spec`);
|
|
3619
|
-
if (!
|
|
3626
|
+
if (!Bs.test(n))
|
|
3620
3627
|
throw new Error(`Invalid ${e} "${n}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
3621
3628
|
return n;
|
|
3622
|
-
},
|
|
3629
|
+
}, wr = {
|
|
3623
3630
|
calculator: "pie-tool-calculator",
|
|
3624
3631
|
textToSpeech: "pie-tool-text-to-speech",
|
|
3625
3632
|
ruler: "pie-tool-ruler",
|
|
@@ -3632,20 +3639,20 @@ const zs = /* @__PURE__ */ new Set([
|
|
|
3632
3639
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
3633
3640
|
graph: "pie-tool-graph",
|
|
3634
3641
|
periodicTable: "pie-tool-periodic-table"
|
|
3635
|
-
},
|
|
3636
|
-
const n = e?.toolTagMap?.[t] ??
|
|
3637
|
-
return
|
|
3638
|
-
},
|
|
3639
|
-
const r =
|
|
3640
|
-
return s ? s({ toolId: t, tagName: r, context: e, toolbarContext: n }) :
|
|
3641
|
-
},
|
|
3642
|
+
}, Us = (t, e) => {
|
|
3643
|
+
const n = e?.toolTagMap?.[t] ?? wr[t] ?? t;
|
|
3644
|
+
return Gs(n, `tool component tag for "${t}"`);
|
|
3645
|
+
}, qs = (t) => document.createElement(t), ve = (t, e, n, i) => {
|
|
3646
|
+
const r = Us(t, i), s = i?.toolComponentFactories?.[t] ?? i?.toolComponentFactory;
|
|
3647
|
+
return s ? s({ toolId: t, tagName: r, context: e, toolbarContext: n }) : qs(r);
|
|
3648
|
+
}, Ws = {
|
|
3642
3649
|
toolId: "calculator",
|
|
3643
3650
|
name: "Calculator",
|
|
3644
3651
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
3645
3652
|
icon: "calculator",
|
|
3646
3653
|
provider: {
|
|
3647
3654
|
getProviderId: (t) => typeof t?.provider?.id == "string" && t.provider.id.length > 0 ? t.provider.id : "calculator-desmos",
|
|
3648
|
-
createProvider: () => new
|
|
3655
|
+
createProvider: () => new Ds(),
|
|
3649
3656
|
getInitConfig: (t) => t?.provider?.init ?? {},
|
|
3650
3657
|
getAuthFetcher: (t) => {
|
|
3651
3658
|
const e = t?.provider?.runtime?.authFetcher;
|
|
@@ -3685,7 +3692,7 @@ const zs = /* @__PURE__ */ new Set([
|
|
|
3685
3692
|
return tn(t);
|
|
3686
3693
|
},
|
|
3687
3694
|
renderToolbar(t, e) {
|
|
3688
|
-
const n =
|
|
3695
|
+
const n = Vn(this.toolId, e.scope.level, e.scope.scopeId), i = e.componentOverrides, r = ve(this.toolId, t, e, i);
|
|
3689
3696
|
r.setAttribute("tool-id", n), r.toolkitCoordinator = e.toolkitCoordinator;
|
|
3690
3697
|
const o = {
|
|
3691
3698
|
toolId: this.toolId,
|
|
@@ -3727,12 +3734,39 @@ const zs = /* @__PURE__ */ new Set([
|
|
|
3727
3734
|
}
|
|
3728
3735
|
};
|
|
3729
3736
|
}
|
|
3730
|
-
},
|
|
3731
|
-
const e =
|
|
3737
|
+
}, _i = (t) => t && typeof t == "object" ? t : {}, an = (t) => {
|
|
3738
|
+
const e = _i(t), n = _i(t?.settings);
|
|
3732
3739
|
return { ...e, ...n };
|
|
3733
|
-
},
|
|
3740
|
+
}, Sn = (t) => t.backend || "browser", Tr = (t, e) => t.serverProvider || t.provider || (e === "polly" || e === "google" ? e : void 0), Ir = (t, e) => t.transportMode || (e === "custom" ? "custom" : "pie"), Ys = (t) => {
|
|
3741
|
+
const e = Sn(t), n = Tr(t, e), i = Ir(t, n);
|
|
3742
|
+
return {
|
|
3743
|
+
voice: t.defaultVoice,
|
|
3744
|
+
rate: t.rate,
|
|
3745
|
+
pitch: t.pitch,
|
|
3746
|
+
providerOptions: {
|
|
3747
|
+
...t.language ? { locale: t.language } : {},
|
|
3748
|
+
...e === "polly" && t.engine ? { engine: t.engine } : {},
|
|
3749
|
+
...e === "polly" && typeof t.sampleRate == "number" ? { sampleRate: t.sampleRate } : {},
|
|
3750
|
+
...e === "polly" && t.format ? { format: t.format } : {},
|
|
3751
|
+
...e === "polly" ? {
|
|
3752
|
+
speechMarkTypes: t.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"]
|
|
3753
|
+
} : {},
|
|
3754
|
+
...i === "custom" && typeof t.cache == "boolean" ? { cache: t.cache } : {},
|
|
3755
|
+
...i === "custom" && t.speedRate ? { speedRate: t.speedRate } : {},
|
|
3756
|
+
...i === "custom" && t.lang_id ? { lang_id: t.lang_id } : {}
|
|
3757
|
+
},
|
|
3758
|
+
apiEndpoint: t.apiEndpoint,
|
|
3759
|
+
provider: n,
|
|
3760
|
+
language: t.language,
|
|
3761
|
+
transportMode: i,
|
|
3762
|
+
endpointMode: t.endpointMode,
|
|
3763
|
+
endpointValidationMode: t.endpointValidationMode,
|
|
3764
|
+
includeAuthOnAssetFetch: t.includeAuthOnAssetFetch,
|
|
3765
|
+
validateEndpoint: t.validateEndpoint
|
|
3766
|
+
};
|
|
3767
|
+
}, Tt = /* @__PURE__ */ new Map(), Ks = "__pieToolElementUnmount", bi = Object.freeze([1.5, 2]), Xs = (t) => {
|
|
3734
3768
|
if (!Array.isArray(t))
|
|
3735
|
-
return [...
|
|
3769
|
+
return [...bi];
|
|
3736
3770
|
const e = /* @__PURE__ */ new Set();
|
|
3737
3771
|
for (const n of t) {
|
|
3738
3772
|
if (typeof n != "number" || !Number.isFinite(n) || n <= 0)
|
|
@@ -3740,8 +3774,8 @@ const zs = /* @__PURE__ */ new Set([
|
|
|
3740
3774
|
const i = Math.round(n * 100) / 100;
|
|
3741
3775
|
i !== 1 && e.add(i);
|
|
3742
3776
|
}
|
|
3743
|
-
return e.size ? Array.from(e) : [...
|
|
3744
|
-
},
|
|
3777
|
+
return e.size ? Array.from(e) : [...bi];
|
|
3778
|
+
}, Js = {
|
|
3745
3779
|
toolId: "textToSpeech",
|
|
3746
3780
|
name: "Text to Speech",
|
|
3747
3781
|
description: "Read content aloud",
|
|
@@ -3750,33 +3784,15 @@ const zs = /* @__PURE__ */ new Set([
|
|
|
3750
3784
|
getProviderId: () => "tts",
|
|
3751
3785
|
createProvider: (t) => {
|
|
3752
3786
|
const e = an(t);
|
|
3753
|
-
return new
|
|
3787
|
+
return new js(Sn(e));
|
|
3754
3788
|
},
|
|
3755
3789
|
getInitConfig: (t) => {
|
|
3756
|
-
const e = an(t), n = e
|
|
3790
|
+
const e = an(t), n = Sn(e), i = Tr(e, n), r = Ir(e, i);
|
|
3757
3791
|
return {
|
|
3758
3792
|
backend: n,
|
|
3759
|
-
apiEndpoint: e.apiEndpoint,
|
|
3760
3793
|
serverProvider: i,
|
|
3761
|
-
providerOptions: n === "polly" || r === "custom" ? {
|
|
3762
|
-
...n === "polly" && e.engine ? { engine: e.engine } : {},
|
|
3763
|
-
...n === "polly" && typeof e.sampleRate == "number" ? { sampleRate: e.sampleRate } : {},
|
|
3764
|
-
...n === "polly" && e.format ? { format: e.format } : {},
|
|
3765
|
-
...n === "polly" ? {
|
|
3766
|
-
speechMarkTypes: e.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"]
|
|
3767
|
-
} : {},
|
|
3768
|
-
...r === "custom" && typeof e.cache == "boolean" ? { cache: e.cache } : {},
|
|
3769
|
-
...r === "custom" && e.speedRate ? { speedRate: e.speedRate } : {},
|
|
3770
|
-
...r === "custom" && e.lang_id ? { lang_id: e.lang_id } : {}
|
|
3771
|
-
} : void 0,
|
|
3772
|
-
voice: e.defaultVoice,
|
|
3773
|
-
rate: e.rate,
|
|
3774
|
-
pitch: e.pitch,
|
|
3775
3794
|
transportMode: r,
|
|
3776
|
-
|
|
3777
|
-
endpointValidationMode: e.endpointValidationMode,
|
|
3778
|
-
includeAuthOnAssetFetch: e.includeAuthOnAssetFetch,
|
|
3779
|
-
validateEndpoint: e.validateEndpoint
|
|
3795
|
+
...Ys(e)
|
|
3780
3796
|
};
|
|
3781
3797
|
},
|
|
3782
3798
|
getAuthFetcher: (t) => {
|
|
@@ -3811,13 +3827,13 @@ const zs = /* @__PURE__ */ new Set([
|
|
|
3811
3827
|
renderToolbar(t, e) {
|
|
3812
3828
|
const n = () => {
|
|
3813
3829
|
const s = an(e.toolkitCoordinator?.getToolConfig(this.toolId) || void 0);
|
|
3814
|
-
return
|
|
3815
|
-
}, i =
|
|
3830
|
+
return Xs(s.speedOptions);
|
|
3831
|
+
}, i = Vn(this.toolId, e.scope.level, e.scope.scopeId), r = () => {
|
|
3816
3832
|
const s = e.ui?.size;
|
|
3817
3833
|
return s === "sm" || s === "lg" ? s : "md";
|
|
3818
3834
|
}, o = () => {
|
|
3819
3835
|
let s = Tt.get(i);
|
|
3820
|
-
return s && typeof s.isConnected == "boolean" && !s.isConnected && (Tt.delete(i), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[
|
|
3836
|
+
return s && typeof s.isConnected == "boolean" && !s.isConnected && (Tt.delete(i), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[Ks] = () => {
|
|
3821
3837
|
Tt.get(i) === s && Tt.delete(i);
|
|
3822
3838
|
}, Tt.set(i, s)), s.setAttribute("tool-id", i), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", r()), s.speedOptions = n(), s;
|
|
3823
3839
|
};
|
|
@@ -3840,7 +3856,7 @@ const zs = /* @__PURE__ */ new Set([
|
|
|
3840
3856
|
}
|
|
3841
3857
|
};
|
|
3842
3858
|
function Ce(t, e) {
|
|
3843
|
-
const n =
|
|
3859
|
+
const n = Vn(t, e.scope.level, e.scope.scopeId);
|
|
3844
3860
|
return {
|
|
3845
3861
|
fullToolId: n,
|
|
3846
3862
|
isActive: () => e.isToolVisible(n),
|
|
@@ -3854,7 +3870,7 @@ function Pe(t) {
|
|
|
3854
3870
|
const e = t.isActive();
|
|
3855
3871
|
t.button.active = e, t.overlay.visible = e, t.onActiveChange?.(e);
|
|
3856
3872
|
}
|
|
3857
|
-
const
|
|
3873
|
+
const Qs = {
|
|
3858
3874
|
toolId: "ruler",
|
|
3859
3875
|
name: "Ruler",
|
|
3860
3876
|
description: "On-screen ruler for measurements",
|
|
@@ -3900,7 +3916,7 @@ const Ws = {
|
|
|
3900
3916
|
subscribeActive: n.subscribeActive
|
|
3901
3917
|
};
|
|
3902
3918
|
}
|
|
3903
|
-
},
|
|
3919
|
+
}, Zs = {
|
|
3904
3920
|
toolId: "protractor",
|
|
3905
3921
|
name: "Protractor",
|
|
3906
3922
|
description: "On-screen protractor for angle measurements",
|
|
@@ -3946,7 +3962,7 @@ const Ws = {
|
|
|
3946
3962
|
subscribeActive: n.subscribeActive
|
|
3947
3963
|
};
|
|
3948
3964
|
}
|
|
3949
|
-
},
|
|
3965
|
+
}, el = {
|
|
3950
3966
|
toolId: "answerEliminator",
|
|
3951
3967
|
name: "Answer Eliminator",
|
|
3952
3968
|
description: "Strike through answer choices",
|
|
@@ -3969,7 +3985,7 @@ const Ws = {
|
|
|
3969
3985
|
* Pass 2: Answer eliminator is relevant only for choice-based questions
|
|
3970
3986
|
*/
|
|
3971
3987
|
isVisibleInContext(t) {
|
|
3972
|
-
return
|
|
3988
|
+
return Rs(t);
|
|
3973
3989
|
},
|
|
3974
3990
|
renderToolbar(t, e) {
|
|
3975
3991
|
const n = Ce(this.toolId, e), i = e.componentOverrides ?? {}, r = ve(this.toolId, t, e, i);
|
|
@@ -4000,7 +4016,7 @@ const Ws = {
|
|
|
4000
4016
|
subscribeActive: n.subscribeActive
|
|
4001
4017
|
};
|
|
4002
4018
|
}
|
|
4003
|
-
},
|
|
4019
|
+
}, tl = {
|
|
4004
4020
|
toolId: "highlighter",
|
|
4005
4021
|
name: "Highlighter",
|
|
4006
4022
|
description: "Highlight text",
|
|
@@ -4044,7 +4060,7 @@ const Ws = {
|
|
|
4044
4060
|
subscribeActive: n.subscribeActive
|
|
4045
4061
|
};
|
|
4046
4062
|
}
|
|
4047
|
-
},
|
|
4063
|
+
}, nl = {
|
|
4048
4064
|
toolId: "lineReader",
|
|
4049
4065
|
name: "Line Reader",
|
|
4050
4066
|
description: "Reading guide overlay",
|
|
@@ -4096,7 +4112,7 @@ const Ws = {
|
|
|
4096
4112
|
subscribeActive: n.subscribeActive
|
|
4097
4113
|
};
|
|
4098
4114
|
}
|
|
4099
|
-
},
|
|
4115
|
+
}, il = {
|
|
4100
4116
|
toolId: "theme",
|
|
4101
4117
|
name: "Theme",
|
|
4102
4118
|
description: "Accessible themes and contrast",
|
|
@@ -4167,7 +4183,7 @@ const Ws = {
|
|
|
4167
4183
|
subscribeActive: n.subscribeActive
|
|
4168
4184
|
};
|
|
4169
4185
|
}
|
|
4170
|
-
},
|
|
4186
|
+
}, rl = il, ol = {
|
|
4171
4187
|
toolId: "annotationToolbar",
|
|
4172
4188
|
name: "Highlighter",
|
|
4173
4189
|
description: "Highlight and annotate text",
|
|
@@ -4221,7 +4237,7 @@ const Ws = {
|
|
|
4221
4237
|
subscribeActive: n.subscribeActive
|
|
4222
4238
|
};
|
|
4223
4239
|
}
|
|
4224
|
-
},
|
|
4240
|
+
}, sl = {
|
|
4225
4241
|
toolId: "graph",
|
|
4226
4242
|
name: "Graph",
|
|
4227
4243
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -4286,7 +4302,7 @@ const Ws = {
|
|
|
4286
4302
|
subscribeActive: n.subscribeActive
|
|
4287
4303
|
};
|
|
4288
4304
|
}
|
|
4289
|
-
},
|
|
4305
|
+
}, ll = {
|
|
4290
4306
|
toolId: "periodicTable",
|
|
4291
4307
|
name: "Periodic Table",
|
|
4292
4308
|
description: "Chemistry periodic table reference",
|
|
@@ -4307,7 +4323,7 @@ const Ws = {
|
|
|
4307
4323
|
* Pass 2: Periodic table is relevant when science content is present
|
|
4308
4324
|
*/
|
|
4309
4325
|
isVisibleInContext(t) {
|
|
4310
|
-
return
|
|
4326
|
+
return Ls(t);
|
|
4311
4327
|
},
|
|
4312
4328
|
renderToolbar(t, e) {
|
|
4313
4329
|
const n = Ce(this.toolId, e), i = {
|
|
@@ -4349,53 +4365,53 @@ const Ws = {
|
|
|
4349
4365
|
subscribeActive: n.subscribeActive
|
|
4350
4366
|
};
|
|
4351
4367
|
}
|
|
4352
|
-
},
|
|
4353
|
-
Bs,
|
|
4354
|
-
qs,
|
|
4368
|
+
}, al = [
|
|
4355
4369
|
Ws,
|
|
4356
|
-
Ys,
|
|
4357
|
-
Ks,
|
|
4358
|
-
Xs,
|
|
4359
4370
|
Js,
|
|
4371
|
+
Qs,
|
|
4360
4372
|
Zs,
|
|
4361
4373
|
el,
|
|
4362
4374
|
tl,
|
|
4363
|
-
nl
|
|
4375
|
+
nl,
|
|
4376
|
+
rl,
|
|
4377
|
+
ol,
|
|
4378
|
+
sl,
|
|
4379
|
+
ll
|
|
4364
4380
|
];
|
|
4365
|
-
function
|
|
4366
|
-
const e = new
|
|
4381
|
+
function cl(t = {}) {
|
|
4382
|
+
const e = new Os(), n = {
|
|
4367
4383
|
toolTagMap: {
|
|
4368
|
-
...
|
|
4384
|
+
...wr,
|
|
4369
4385
|
...t.toolTagMap || {}
|
|
4370
4386
|
},
|
|
4371
4387
|
toolComponentFactory: t.toolComponentFactory,
|
|
4372
4388
|
toolComponentFactories: t.toolComponentFactories
|
|
4373
4389
|
}, i = (r) => t.overrides?.[r.toolId] || r;
|
|
4374
|
-
return t.includePackagedTools &&
|
|
4390
|
+
return t.includePackagedTools && ul(e, {
|
|
4375
4391
|
toolIds: t.toolIds,
|
|
4376
4392
|
applyOverrides: i
|
|
4377
4393
|
}), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(n), e;
|
|
4378
4394
|
}
|
|
4379
|
-
function
|
|
4395
|
+
function ul(t, e = {}) {
|
|
4380
4396
|
const n = e.toolIds && e.toolIds.length > 0 ? new Set(e.toolIds) : null, i = e.applyOverrides || ((r) => r);
|
|
4381
|
-
for (const r of
|
|
4397
|
+
for (const r of al)
|
|
4382
4398
|
n && !n.has(r.toolId) || t.register(i(r));
|
|
4383
4399
|
}
|
|
4384
|
-
function
|
|
4385
|
-
return
|
|
4400
|
+
function dl(t = {}) {
|
|
4401
|
+
return cl({
|
|
4386
4402
|
...t,
|
|
4387
4403
|
includePackagedTools: !0
|
|
4388
4404
|
});
|
|
4389
4405
|
}
|
|
4390
|
-
function
|
|
4391
|
-
const t =
|
|
4406
|
+
function fl() {
|
|
4407
|
+
const t = dl(), e = /* @__PURE__ */ new Set();
|
|
4392
4408
|
for (const n of t.getAllTools())
|
|
4393
4409
|
for (const i of n.pnpSupportIds || [])
|
|
4394
4410
|
e.add(i);
|
|
4395
4411
|
return [...e].sort();
|
|
4396
4412
|
}
|
|
4397
|
-
|
|
4398
|
-
const
|
|
4413
|
+
fl();
|
|
4414
|
+
const hl = {
|
|
4399
4415
|
/**
|
|
4400
4416
|
* Visual accessibility features
|
|
4401
4417
|
* For students with low vision, color blindness, or visual processing needs
|
|
@@ -4566,17 +4582,17 @@ const al = {
|
|
|
4566
4582
|
tutorialAvailable: "tutorialAvailable"
|
|
4567
4583
|
}
|
|
4568
4584
|
};
|
|
4569
|
-
Object.values(
|
|
4570
|
-
var
|
|
4585
|
+
Object.values(hl).flatMap((t) => Object.values(t));
|
|
4586
|
+
var An;
|
|
4571
4587
|
(function(t) {
|
|
4572
4588
|
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";
|
|
4573
|
-
})(
|
|
4574
|
-
var
|
|
4589
|
+
})(An || (An = {}));
|
|
4590
|
+
var yi;
|
|
4575
4591
|
(function(t) {
|
|
4576
4592
|
t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
|
|
4577
|
-
})(
|
|
4578
|
-
var
|
|
4579
|
-
const
|
|
4593
|
+
})(yi || (yi = {}));
|
|
4594
|
+
var pl = /* @__PURE__ */ vr('<div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--top svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--bottom svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--left svelte-1a3d6dx" aria-hidden="true"></div> <div class="pie-tool-line-reader__mask pie-tool-line-reader__mask--right svelte-1a3d6dx" aria-hidden="true"></div>', 1), vl = /* @__PURE__ */ vr('<div class="pie-sr-only svelte-1a3d6dx" role="status" aria-live="polite" aria-atomic="true"> </div> <!> <div role="group" tabindex="0" aria-roledescription="Draggable and resizable reading guide overlay"><div class="pie-tool-line-reader__container svelte-1a3d6dx"></div> <div class="pie-tool-line-reader__resize-handle pie-tool-line-reader__resize-handle--bottom svelte-1a3d6dx" title="Drag to resize height" role="button" tabindex="-1" aria-label="Resize handle - drag to adjust height"><svg width="20" height="8" viewBox="0 0 20 8" aria-hidden="true"><rect x="8" y="3" width="4" height="2" fill="var(--pie-primary, #4CAF50)" rx="1"></rect></svg></div></div>', 1);
|
|
4595
|
+
const gl = {
|
|
4580
4596
|
hash: "svelte-1a3d6dx",
|
|
4581
4597
|
code: `.pie-sr-only.svelte-1a3d6dx {position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;}.pie-tool-line-reader.svelte-1a3d6dx {border:none;cursor:move;overflow:visible;position:absolute;transform:translate(-50%, -50%);user-select:none;pointer-events:auto;touch-action:none;}.pie-tool-line-reader.svelte-1a3d6dx:focus {outline:3px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2));outline-offset:2px;}.pie-tool-line-reader.svelte-1a3d6dx:focus-visible {outline:3px solid var(--pie-button-focus-outline, var(--pie-primary, #4A90E2));outline-offset:2px;}.pie-tool-line-reader__container.svelte-1a3d6dx {width:100%;height:100%;position:relative;transition:background-color 0.2s ease;}.pie-tool-line-reader__resize-handle.svelte-1a3d6dx {position:absolute;cursor:ns-resize;z-index:10;display:flex;align-items:center;justify-content:center;}.pie-tool-line-reader__resize-handle--bottom.svelte-1a3d6dx {bottom:-12px;left:50%;transform:translateX(-50%);width:44px;height:24px;background-color:color-mix(in srgb, var(--pie-background, #fff) 90%, transparent);border-radius:12px;border:2px solid var(--pie-primary, #4caf50);}.pie-tool-line-reader__resize-handle.svelte-1a3d6dx:hover {background-color:color-mix(in srgb, var(--pie-primary, #4caf50) 20%, transparent);}.pie-tool-line-reader__resize-handle.svelte-1a3d6dx:active {cursor:ns-resize;}.pie-tool-line-reader.svelte-1a3d6dx:active {cursor:grabbing;}
|
|
4582
4598
|
|
|
@@ -4590,13 +4606,13 @@ const fl = {
|
|
|
4590
4606
|
|
|
4591
4607
|
/* In masking mode, the window should be transparent to show content underneath */.pie-tool-line-reader.pie-tool-line-reader--masking-mode.svelte-1a3d6dx .pie-tool-line-reader__container:where(.svelte-1a3d6dx) {background-color:transparent !important;}`
|
|
4592
4608
|
};
|
|
4593
|
-
function
|
|
4594
|
-
|
|
4595
|
-
let n =
|
|
4609
|
+
function ml(t, e) {
|
|
4610
|
+
Pi(e, !0), os(t, gl);
|
|
4611
|
+
let n = pi(e, "visible", 7, !1), i = pi(e, "toolId", 7, "lineReader");
|
|
4596
4612
|
const r = typeof window < "u";
|
|
4597
4613
|
let o = /* @__PURE__ */ P(void 0), s = /* @__PURE__ */ P(null);
|
|
4598
|
-
const l = /* @__PURE__ */
|
|
4599
|
-
let a = /* @__PURE__ */ P(!1), u = /* @__PURE__ */ P(!1),
|
|
4614
|
+
const l = /* @__PURE__ */ ti(() => f(s)?.toolCoordinator);
|
|
4615
|
+
let a = /* @__PURE__ */ P(!1), u = /* @__PURE__ */ P(!1), d = /* @__PURE__ */ P(Ae({
|
|
4600
4616
|
x: r ? window.innerWidth / 2 : 400,
|
|
4601
4617
|
y: r ? window.innerHeight / 2 : 300
|
|
4602
4618
|
})), h = /* @__PURE__ */ P(Ae({ width: 600, height: 60 })), v = /* @__PURE__ */ P(Ae({ x: 0, y: 0 })), y = /* @__PURE__ */ P(Ae({ width: 0, height: 0, mouseY: 0 })), g = /* @__PURE__ */ P(""), A = /* @__PURE__ */ P(
|
|
@@ -4609,119 +4625,119 @@ function dl(t, e) {
|
|
|
4609
4625
|
{ name: "Pink", value: "#ff69b4" },
|
|
4610
4626
|
{ name: "Green", value: "#00ff7f" },
|
|
4611
4627
|
{ name: "Orange", value: "#ffa500" }
|
|
4612
|
-
], Mt = 10,
|
|
4628
|
+
], Mt = 10, jn = 10;
|
|
4613
4629
|
It(() => {
|
|
4614
|
-
if (
|
|
4615
|
-
return
|
|
4630
|
+
if (f(o))
|
|
4631
|
+
return As(f(o), (_) => {
|
|
4616
4632
|
k(s, _, !0);
|
|
4617
4633
|
});
|
|
4618
4634
|
});
|
|
4619
4635
|
function _e(_) {
|
|
4620
4636
|
k(g, _, !0), setTimeout(() => k(g, ""), 1e3);
|
|
4621
4637
|
}
|
|
4622
|
-
function
|
|
4623
|
-
const L = (me.findIndex((yt) => yt.value ===
|
|
4638
|
+
function Sr() {
|
|
4639
|
+
const L = (me.findIndex((yt) => yt.value === f(A)) + 1) % me.length;
|
|
4624
4640
|
k(A, me[L].value, !0), _e(`Color changed to ${me[L].name}`);
|
|
4625
4641
|
}
|
|
4626
|
-
function
|
|
4627
|
-
k(S, Math.max(0.1, Math.min(0.9,
|
|
4642
|
+
function Hn(_) {
|
|
4643
|
+
k(S, Math.max(0.1, Math.min(0.9, f(S) + _)), !0), _e(`Opacity ${Math.round(f(S) * 100)}%`);
|
|
4628
4644
|
}
|
|
4629
|
-
function
|
|
4630
|
-
k(z,
|
|
4645
|
+
function Ar() {
|
|
4646
|
+
k(z, f(z) === "highlight" ? "obscure" : "highlight", !0), _e(`Mode changed to ${f(z) === "highlight" ? "highlight" : "masking"}`);
|
|
4631
4647
|
}
|
|
4632
|
-
function
|
|
4633
|
-
_.target.closest(".resize-handle") ?
|
|
4648
|
+
function $r(_) {
|
|
4649
|
+
_.target.closest(".resize-handle") ? Er(_) : kr(_);
|
|
4634
4650
|
}
|
|
4635
|
-
function
|
|
4636
|
-
|
|
4651
|
+
function kr(_) {
|
|
4652
|
+
f(o) && (f(o).setPointerCapture(_.pointerId), k(a, !0), k(
|
|
4637
4653
|
v,
|
|
4638
4654
|
{
|
|
4639
|
-
x: _.clientX - d
|
|
4640
|
-
y: _.clientY - d
|
|
4655
|
+
x: _.clientX - f(d).x,
|
|
4656
|
+
y: _.clientY - f(d).y
|
|
4641
4657
|
},
|
|
4642
4658
|
!0
|
|
4643
|
-
),
|
|
4659
|
+
), f(l)?.bringToFront(f(o)), f(o).addEventListener("pointermove", rn), f(o).addEventListener("pointerup", on), _.preventDefault());
|
|
4644
4660
|
}
|
|
4645
|
-
function
|
|
4646
|
-
|
|
4661
|
+
function Er(_) {
|
|
4662
|
+
f(o) && (f(o).setPointerCapture(_.pointerId), k(u, !0), k(
|
|
4647
4663
|
y,
|
|
4648
4664
|
{
|
|
4649
|
-
width:
|
|
4650
|
-
height:
|
|
4665
|
+
width: f(h).width,
|
|
4666
|
+
height: f(h).height,
|
|
4651
4667
|
mouseY: _.clientY
|
|
4652
4668
|
},
|
|
4653
4669
|
!0
|
|
4654
|
-
),
|
|
4670
|
+
), f(l)?.bringToFront(f(o)), f(o).addEventListener("pointermove", rn), f(o).addEventListener("pointerup", on), _.preventDefault(), _.stopPropagation());
|
|
4655
4671
|
}
|
|
4656
4672
|
function rn(_) {
|
|
4657
|
-
if (
|
|
4673
|
+
if (f(a))
|
|
4658
4674
|
k(
|
|
4659
|
-
|
|
4675
|
+
d,
|
|
4660
4676
|
{
|
|
4661
|
-
x: _.clientX -
|
|
4662
|
-
y: _.clientY -
|
|
4677
|
+
x: _.clientX - f(v).x,
|
|
4678
|
+
y: _.clientY - f(v).y
|
|
4663
4679
|
},
|
|
4664
4680
|
!0
|
|
4665
4681
|
);
|
|
4666
|
-
else if (
|
|
4667
|
-
const L = _.clientY -
|
|
4668
|
-
|
|
4682
|
+
else if (f(u)) {
|
|
4683
|
+
const L = _.clientY - f(y).mouseY;
|
|
4684
|
+
f(h).height = Math.max(20, Math.min(400, f(y).height + L));
|
|
4669
4685
|
}
|
|
4670
4686
|
}
|
|
4671
4687
|
function on(_) {
|
|
4672
|
-
|
|
4688
|
+
f(o) && (f(o).releasePointerCapture(_.pointerId), f(o).removeEventListener("pointermove", rn), f(o).removeEventListener("pointerup", on), k(a, !1), k(u, !1));
|
|
4673
4689
|
}
|
|
4674
|
-
function
|
|
4690
|
+
function Or(_) {
|
|
4675
4691
|
let L = !1;
|
|
4676
4692
|
switch (_.key) {
|
|
4677
4693
|
case "ArrowUp":
|
|
4678
|
-
d
|
|
4694
|
+
f(d).y -= Mt, _e(`Moved up to ${Math.round(f(d).y)}`), L = !0;
|
|
4679
4695
|
break;
|
|
4680
4696
|
case "ArrowDown":
|
|
4681
|
-
d
|
|
4697
|
+
f(d).y += Mt, _e(`Moved down to ${Math.round(f(d).y)}`), L = !0;
|
|
4682
4698
|
break;
|
|
4683
4699
|
case "ArrowLeft":
|
|
4684
|
-
d
|
|
4700
|
+
f(d).x -= Mt, _e(`Moved left to ${Math.round(f(d).x)}`), L = !0;
|
|
4685
4701
|
break;
|
|
4686
4702
|
case "ArrowRight":
|
|
4687
|
-
d
|
|
4703
|
+
f(d).x += Mt, _e(`Moved right to ${Math.round(f(d).x)}`), L = !0;
|
|
4688
4704
|
break;
|
|
4689
4705
|
case "+":
|
|
4690
4706
|
case "=":
|
|
4691
|
-
|
|
4707
|
+
f(h).height = Math.min(400, f(h).height + jn), _e(`Height ${f(h).height} pixels`), L = !0;
|
|
4692
4708
|
break;
|
|
4693
4709
|
case "-":
|
|
4694
4710
|
case "_":
|
|
4695
|
-
|
|
4711
|
+
f(h).height = Math.max(20, f(h).height - jn), _e(`Height ${f(h).height} pixels`), L = !0;
|
|
4696
4712
|
break;
|
|
4697
4713
|
case "c":
|
|
4698
4714
|
case "C":
|
|
4699
|
-
|
|
4715
|
+
Sr(), L = !0;
|
|
4700
4716
|
break;
|
|
4701
4717
|
case "]":
|
|
4702
|
-
|
|
4718
|
+
Hn(0.1), L = !0;
|
|
4703
4719
|
break;
|
|
4704
4720
|
case "[":
|
|
4705
|
-
|
|
4721
|
+
Hn(-0.1), L = !0;
|
|
4706
4722
|
break;
|
|
4707
4723
|
case "m":
|
|
4708
4724
|
case "M":
|
|
4709
|
-
|
|
4725
|
+
Ar(), L = !0;
|
|
4710
4726
|
break;
|
|
4711
4727
|
}
|
|
4712
4728
|
L && _.preventDefault();
|
|
4713
4729
|
}
|
|
4714
4730
|
It(() => {
|
|
4715
|
-
|
|
4716
|
-
}),
|
|
4717
|
-
|
|
4731
|
+
f(l) && i() && !f(ge) && (f(l).registerTool(i(), "Line Reader", void 0, An.TOOL), k(ge, !0));
|
|
4732
|
+
}), rs(() => () => {
|
|
4733
|
+
f(l) && i() && f(l).unregisterTool(i());
|
|
4718
4734
|
}), It(() => {
|
|
4719
|
-
|
|
4735
|
+
f(l) && f(o) && i() && f(l).updateToolElement(i(), f(o));
|
|
4720
4736
|
}), It(() => {
|
|
4721
|
-
n() &&
|
|
4737
|
+
n() && f(o) && setTimeout(() => f(o)?.focus(), 100);
|
|
4722
4738
|
});
|
|
4723
|
-
let
|
|
4724
|
-
var
|
|
4739
|
+
let Cr = /* @__PURE__ */ ti(() => f(A) + Math.round(f(S) * 255).toString(16).padStart(2, "0"));
|
|
4740
|
+
var Pr = {
|
|
4725
4741
|
get visible() {
|
|
4726
4742
|
return n();
|
|
4727
4743
|
},
|
|
@@ -4734,53 +4750,53 @@ function dl(t, e) {
|
|
|
4734
4750
|
set toolId(_ = "lineReader") {
|
|
4735
4751
|
i(_), gn();
|
|
4736
4752
|
}
|
|
4737
|
-
},
|
|
4753
|
+
}, Bn = Jo(), Rr = ln(Bn);
|
|
4738
4754
|
{
|
|
4739
|
-
var
|
|
4740
|
-
var L =
|
|
4741
|
-
|
|
4742
|
-
var
|
|
4755
|
+
var Lr = (_) => {
|
|
4756
|
+
var L = vl(), yt = ln(L), xr = ii(yt, !0);
|
|
4757
|
+
Zn(yt);
|
|
4758
|
+
var Gn = wt(yt, 2);
|
|
4743
4759
|
{
|
|
4744
|
-
var
|
|
4745
|
-
var Nt =
|
|
4746
|
-
|
|
4747
|
-
(
|
|
4748
|
-
tt(
|
|
4760
|
+
var Mr = (be) => {
|
|
4761
|
+
var Nt = pl(), qn = ln(Nt), Wn = wt(qn, 2), Yn = wt(Wn, 2), Dr = wt(Yn, 2);
|
|
4762
|
+
ri(
|
|
4763
|
+
(zr, Vr) => {
|
|
4764
|
+
tt(qn, `height: ${zr ?? ""}px;`), tt(Wn, `top: ${f(d).y + f(h).height / 2}px;`), tt(Yn, `top: ${f(d).y - f(h).height / 2}px; height: ${f(h).height ?? ""}px; width: ${Vr ?? ""}px;`), tt(Dr, `top: ${f(d).y - f(h).height / 2}px; height: ${f(h).height ?? ""}px; left: ${f(d).x + f(h).width / 2}px;`);
|
|
4749
4765
|
},
|
|
4750
4766
|
[
|
|
4751
|
-
() => Math.max(0, d
|
|
4752
|
-
() => Math.max(0, d
|
|
4767
|
+
() => Math.max(0, f(d).y - f(h).height / 2),
|
|
4768
|
+
() => Math.max(0, f(d).x - f(h).width / 2)
|
|
4753
4769
|
]
|
|
4754
4770
|
), Bt(be, Nt);
|
|
4755
4771
|
};
|
|
4756
|
-
|
|
4757
|
-
|
|
4772
|
+
ui(Gn, (be) => {
|
|
4773
|
+
f(z) === "obscure" && be(Mr);
|
|
4758
4774
|
});
|
|
4759
4775
|
}
|
|
4760
|
-
var Re = wt(
|
|
4761
|
-
let
|
|
4762
|
-
var
|
|
4763
|
-
|
|
4776
|
+
var Re = wt(Gn, 2);
|
|
4777
|
+
let Un;
|
|
4778
|
+
var Nr = ii(Re);
|
|
4779
|
+
Ei(2), Zn(Re), ps(Re, (be) => k(o, be), () => f(o)), ri(
|
|
4764
4780
|
(be, Nt) => {
|
|
4765
|
-
|
|
4766
|
-
"pie-tool-line-reader--masking-mode":
|
|
4767
|
-
}), tt(Re, `left: ${d
|
|
4781
|
+
es(xr, f(g)), Un = as(Re, 1, "pie-tool-line-reader svelte-1a3d6dx", null, Un, {
|
|
4782
|
+
"pie-tool-line-reader--masking-mode": f(z) === "obscure"
|
|
4783
|
+
}), tt(Re, `left: ${f(d).x ?? ""}px; top: ${f(d).y ?? ""}px; width: ${f(h).width ?? ""}px; height: ${f(h).height ?? ""}px;`), ds(Re, "aria-label", `Line Reader tool. Mode: ${f(z) === "highlight" ? "Highlight" : "Masking"}. Use arrow keys to move, +/- to resize height, C to change color, [ and ] to adjust opacity, M to toggle mode. Current color: ${be ?? ""}, Opacity: ${Nt ?? ""}%`), tt(Nr, `background-color: ${f(Cr) ?? ""};`);
|
|
4768
4784
|
},
|
|
4769
4785
|
[
|
|
4770
|
-
() => me.find((be) => be.value ===
|
|
4771
|
-
() => Math.round(
|
|
4786
|
+
() => me.find((be) => be.value === f(A))?.name,
|
|
4787
|
+
() => Math.round(f(S) * 100)
|
|
4772
4788
|
]
|
|
4773
|
-
),
|
|
4789
|
+
), li("pointerdown", Re, $r), li("keydown", Re, Or), Bt(_, L);
|
|
4774
4790
|
};
|
|
4775
|
-
|
|
4776
|
-
n() && _(
|
|
4791
|
+
ui(Rr, (_) => {
|
|
4792
|
+
n() && _(Lr);
|
|
4777
4793
|
});
|
|
4778
4794
|
}
|
|
4779
|
-
return Bt(t,
|
|
4795
|
+
return Bt(t, Bn), Ri(Pr);
|
|
4780
4796
|
}
|
|
4781
|
-
|
|
4782
|
-
customElements.define("pie-tool-line-reader",
|
|
4783
|
-
|
|
4797
|
+
Wo(["pointerdown", "keydown"]);
|
|
4798
|
+
customElements.define("pie-tool-line-reader", _s(
|
|
4799
|
+
ml,
|
|
4784
4800
|
{
|
|
4785
4801
|
visible: { attribute: "visible", type: "Boolean" },
|
|
4786
4802
|
toolId: { attribute: "tool-id", type: "String" }
|
|
@@ -4790,5 +4806,5 @@ customElements.define("pie-tool-line-reader", vs(
|
|
|
4790
4806
|
{ mode: "open" }
|
|
4791
4807
|
));
|
|
4792
4808
|
export {
|
|
4793
|
-
|
|
4809
|
+
ml as default
|
|
4794
4810
|
};
|