@pie-players/pie-tool-answer-eliminator 0.3.9 → 0.3.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/tool-answer-eliminator.js +793 -777
- package/package.json +4 -4
- package/tool-answer-eliminator.svelte +3 -3
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var jn = Object.defineProperty;
|
|
2
|
+
var yi = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var c = (t, e, i) => (Bt(t, e, "read from private field"), i ? i.call(t) : e.get(t)), T = (t, e, i) => e.has(t) ?
|
|
8
|
-
var
|
|
9
|
-
typeof window < "u" && ((
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
const
|
|
5
|
+
var qn = (t, e, i) => e in t ? jn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
|
|
6
|
+
var d = (t, e, i) => qn(t, typeof e != "symbol" ? e + "" : e, i), Bt = (t, e, i) => e.has(t) || yi("Cannot " + i);
|
|
7
|
+
var c = (t, e, i) => (Bt(t, e, "read from private field"), i ? i.call(t) : e.get(t)), T = (t, e, i) => e.has(t) ? yi("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), v = (t, e, i, n) => (Bt(t, e, "write to private field"), n ? n.call(t, i) : e.set(t, i), i), E = (t, e, i) => (Bt(t, e, "access private method"), i);
|
|
8
|
+
var xi;
|
|
9
|
+
typeof window < "u" && ((xi = window.__svelte ?? (window.__svelte = {})).v ?? (xi.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
+
const Kn = 2, Di = "[", Bi = "[!", _i = "[?", Vi = "]", Ct = {}, M = /* @__PURE__ */ Symbol(), Un = "http://www.w3.org/1999/xhtml", Gt = !1;
|
|
11
|
+
var Wn = Array.isArray, Yn = Array.prototype.indexOf, et = Array.prototype.includes, Xn = Array.from, $t = Object.keys, Ot = Object.defineProperty, qe = Object.getOwnPropertyDescriptor, Qn = Object.prototype, Jn = Array.prototype, Zn = Object.getPrototypeOf, Ti = Object.isExtensible;
|
|
12
|
+
const er = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function tr(t) {
|
|
15
15
|
for (var e = 0; e < t.length; e++)
|
|
16
16
|
t[e]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function ir() {
|
|
19
19
|
var t, e, i = new Promise((n, r) => {
|
|
20
20
|
t = n, e = r;
|
|
21
21
|
});
|
|
22
22
|
return { promise: i, resolve: t, reject: e };
|
|
23
23
|
}
|
|
24
|
-
const N = 2, nt = 4, Lt = 8,
|
|
24
|
+
const N = 2, nt = 4, Lt = 8, oi = 1 << 24, Le = 16, ve = 32, Re = 64, zt = 128, Y = 512, F = 1024, H = 2048, ne = 4096, Se = 8192, Ee = 16384, Ge = 32768, Rt = 65536, Ai = 1 << 17, nr = 1 << 18, rt = 1 << 19, rr = 1 << 20, Ve = 65536, jt = 1 << 21, Gi = 1 << 22, dt = 1 << 23, _t = /* @__PURE__ */ Symbol("$state"), sr = /* @__PURE__ */ Symbol("legacy props"), li = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
d(this, "name", "StaleReactionError");
|
|
28
|
+
d(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
|
-
}(),
|
|
31
|
-
function
|
|
30
|
+
}(), ai = 8;
|
|
31
|
+
function or(t) {
|
|
32
32
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function lr(t) {
|
|
35
35
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function ar() {
|
|
38
38
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function cr(t) {
|
|
41
41
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function ur() {
|
|
44
44
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function dr() {
|
|
47
47
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function fr() {
|
|
50
50
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function hr() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function pr() {
|
|
56
56
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function mr() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function zi(t) {
|
|
62
62
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function gr() {
|
|
65
65
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
66
66
|
}
|
|
67
67
|
let ee = !1;
|
|
68
|
-
function
|
|
68
|
+
function gt(t) {
|
|
69
69
|
ee = t;
|
|
70
70
|
}
|
|
71
71
|
let D;
|
|
72
|
-
function
|
|
72
|
+
function ft(t) {
|
|
73
73
|
if (t === null)
|
|
74
|
-
throw
|
|
74
|
+
throw zi(), Ct;
|
|
75
75
|
return D = t;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
77
|
+
function ji() {
|
|
78
|
+
return ft(/* @__PURE__ */ st(D));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function vr(t = 1) {
|
|
81
81
|
if (ee) {
|
|
82
82
|
for (var e = t, i = D; e--; )
|
|
83
83
|
i = /** @type {TemplateNode} */
|
|
@@ -85,17 +85,17 @@ function pr(t = 1) {
|
|
|
85
85
|
D = i;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
function
|
|
88
|
+
function br(t = !0) {
|
|
89
89
|
for (var e = 0, i = D; ; ) {
|
|
90
|
-
if (i.nodeType ===
|
|
90
|
+
if (i.nodeType === ai) {
|
|
91
91
|
var n = (
|
|
92
92
|
/** @type {Comment} */
|
|
93
93
|
i.data
|
|
94
94
|
);
|
|
95
|
-
if (n ===
|
|
95
|
+
if (n === Vi) {
|
|
96
96
|
if (e === 0) return i;
|
|
97
97
|
e -= 1;
|
|
98
|
-
} else (n ===
|
|
98
|
+
} else (n === Di || n === Bi || // "[1", "[2", etc. for if blocks
|
|
99
99
|
n[0] === "[" && !isNaN(Number(n.slice(1)))) && (e += 1);
|
|
100
100
|
}
|
|
101
101
|
var r = (
|
|
@@ -105,20 +105,20 @@ function gr(t = !0) {
|
|
|
105
105
|
t && i.remove(), i = r;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function qi(t) {
|
|
109
109
|
return t === this.v;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function yr(t, e) {
|
|
112
112
|
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
113
113
|
}
|
|
114
|
-
function
|
|
115
|
-
return !
|
|
114
|
+
function _r(t) {
|
|
115
|
+
return !yr(t, this.v);
|
|
116
116
|
}
|
|
117
|
-
let
|
|
118
|
-
function
|
|
117
|
+
let Tr = !1, Q = null;
|
|
118
|
+
function kt(t) {
|
|
119
119
|
Q = t;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
121
|
+
function Ki(t, e = !1, i) {
|
|
122
122
|
Q = {
|
|
123
123
|
p: Q,
|
|
124
124
|
i: !1,
|
|
@@ -129,7 +129,7 @@ function qi(t, e = !1, i) {
|
|
|
129
129
|
l: null
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Ui(t) {
|
|
133
133
|
var e = (
|
|
134
134
|
/** @type {ComponentContext} */
|
|
135
135
|
Q
|
|
@@ -137,36 +137,36 @@ function Ki(t) {
|
|
|
137
137
|
if (i !== null) {
|
|
138
138
|
e.e = null;
|
|
139
139
|
for (var n of i)
|
|
140
|
-
|
|
140
|
+
_n(n);
|
|
141
141
|
}
|
|
142
142
|
return t !== void 0 && (e.x = t), e.i = !0, Q = e.p, t ?? /** @type {T} */
|
|
143
143
|
{};
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function Wi() {
|
|
146
146
|
return !0;
|
|
147
147
|
}
|
|
148
148
|
let He = [];
|
|
149
|
-
function
|
|
149
|
+
function Yi() {
|
|
150
150
|
var t = He;
|
|
151
|
-
He = [],
|
|
151
|
+
He = [], tr(t);
|
|
152
152
|
}
|
|
153
153
|
function De(t) {
|
|
154
154
|
if (He.length === 0 && !ct) {
|
|
155
155
|
var e = He;
|
|
156
156
|
queueMicrotask(() => {
|
|
157
|
-
e === He &&
|
|
157
|
+
e === He && Yi();
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
He.push(t);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
162
|
+
function Ar() {
|
|
163
163
|
for (; He.length > 0; )
|
|
164
|
-
|
|
164
|
+
Yi();
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Xi(t) {
|
|
167
167
|
var e = w;
|
|
168
168
|
if (e === null)
|
|
169
|
-
return b.f |=
|
|
169
|
+
return b.f |= dt, t;
|
|
170
170
|
if ((e.f & Ge) === 0 && (e.f & nt) === 0)
|
|
171
171
|
throw t;
|
|
172
172
|
je(t, e);
|
|
@@ -187,44 +187,44 @@ function je(t, e) {
|
|
|
187
187
|
}
|
|
188
188
|
throw t;
|
|
189
189
|
}
|
|
190
|
-
const
|
|
190
|
+
const wr = -7169;
|
|
191
191
|
function L(t, e) {
|
|
192
|
-
t.f = t.f &
|
|
192
|
+
t.f = t.f & wr | e;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
194
|
+
function ci(t) {
|
|
195
195
|
(t.f & Y) !== 0 || t.deps === null ? L(t, F) : L(t, ne);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Qi(t) {
|
|
198
198
|
if (t !== null)
|
|
199
199
|
for (const e of t)
|
|
200
|
-
(e.f & N) === 0 || (e.f & Ve) === 0 || (e.f ^= Ve,
|
|
200
|
+
(e.f & N) === 0 || (e.f & Ve) === 0 || (e.f ^= Ve, Qi(
|
|
201
201
|
/** @type {Derived} */
|
|
202
202
|
e.deps
|
|
203
203
|
));
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
(t.f & H) !== 0 ? e.add(t) : (t.f & ne) !== 0 && i.add(t),
|
|
205
|
+
function Ji(t, e, i) {
|
|
206
|
+
(t.f & H) !== 0 ? e.add(t) : (t.f & ne) !== 0 && i.add(t), Qi(t.deps), L(t, F);
|
|
207
207
|
}
|
|
208
208
|
const vt = /* @__PURE__ */ new Set();
|
|
209
|
-
let P = null, Z = null, V = [], Nt = null, ct = !1, tt = null,
|
|
209
|
+
let P = null, Z = null, V = [], Nt = null, ct = !1, tt = null, Ir = 1;
|
|
210
210
|
var Ae, Ke, Me, Ue, We, Ye, we, se, Xe, z, qt, Kt, Ut, Wt;
|
|
211
|
-
const
|
|
211
|
+
const vi = class vi {
|
|
212
212
|
constructor() {
|
|
213
213
|
T(this, z);
|
|
214
214
|
// for debugging. TODO remove once async is stable
|
|
215
|
-
|
|
215
|
+
d(this, "id", Ir++);
|
|
216
216
|
/**
|
|
217
217
|
* The current values of any sources that are updated in this batch
|
|
218
218
|
* They keys of this map are identical to `this.#previous`
|
|
219
219
|
* @type {Map<Source, any>}
|
|
220
220
|
*/
|
|
221
|
-
|
|
221
|
+
d(this, "current", /* @__PURE__ */ new Map());
|
|
222
222
|
/**
|
|
223
223
|
* The values of any sources that are updated in this batch _before_ those updates took place.
|
|
224
224
|
* They keys of this map are identical to `this.#current`
|
|
225
225
|
* @type {Map<Source, any>}
|
|
226
226
|
*/
|
|
227
|
-
|
|
227
|
+
d(this, "previous", /* @__PURE__ */ new Map());
|
|
228
228
|
/**
|
|
229
229
|
* When the batch is committed (and the DOM is updated), we need to remove old branches
|
|
230
230
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
@@ -268,7 +268,7 @@ const mi = class mi {
|
|
|
268
268
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
269
269
|
*/
|
|
270
270
|
T(this, se, /* @__PURE__ */ new Map());
|
|
271
|
-
|
|
271
|
+
d(this, "is_fork", !1);
|
|
272
272
|
T(this, Xe, !1);
|
|
273
273
|
}
|
|
274
274
|
/**
|
|
@@ -305,11 +305,11 @@ const mi = class mi {
|
|
|
305
305
|
if (tt = null, E(this, z, qt).call(this)) {
|
|
306
306
|
E(this, z, Ut).call(this, n), E(this, z, Ut).call(this, i);
|
|
307
307
|
for (const [r, s] of c(this, se))
|
|
308
|
-
|
|
308
|
+
nn(r, s);
|
|
309
309
|
} else {
|
|
310
310
|
P = null;
|
|
311
311
|
for (const r of c(this, Ae)) r(this);
|
|
312
|
-
c(this, Ae).clear(), c(this, Me) === 0 && E(this, z, Wt).call(this),
|
|
312
|
+
c(this, Ae).clear(), c(this, Me) === 0 && E(this, z, Wt).call(this), wi(n), wi(i), c(this, Ye).clear(), c(this, we).clear(), c(this, We)?.resolve();
|
|
313
313
|
}
|
|
314
314
|
Z = null;
|
|
315
315
|
}
|
|
@@ -320,7 +320,7 @@ const mi = class mi {
|
|
|
320
320
|
* @param {any} value
|
|
321
321
|
*/
|
|
322
322
|
capture(e, i) {
|
|
323
|
-
i !== M && !this.previous.has(e) && this.previous.set(e, i), (e.f &
|
|
323
|
+
i !== M && !this.previous.has(e) && this.previous.set(e, i), (e.f & dt) === 0 && (this.current.set(e, e.v), Z?.set(e, e.v));
|
|
324
324
|
}
|
|
325
325
|
activate() {
|
|
326
326
|
P = this, this.apply();
|
|
@@ -330,7 +330,7 @@ const mi = class mi {
|
|
|
330
330
|
}
|
|
331
331
|
flush() {
|
|
332
332
|
if (V.length > 0)
|
|
333
|
-
P = this,
|
|
333
|
+
P = this, Zi();
|
|
334
334
|
else if (c(this, Me) === 0 && !this.is_fork) {
|
|
335
335
|
for (const e of c(this, Ae)) e(this);
|
|
336
336
|
c(this, Ae).clear(), E(this, z, Wt).call(this), c(this, We)?.resolve();
|
|
@@ -373,11 +373,11 @@ const mi = class mi {
|
|
|
373
373
|
c(this, Ke).add(e);
|
|
374
374
|
}
|
|
375
375
|
settled() {
|
|
376
|
-
return (c(this, We) ?? v(this, We,
|
|
376
|
+
return (c(this, We) ?? v(this, We, ir())).promise;
|
|
377
377
|
}
|
|
378
378
|
static ensure() {
|
|
379
379
|
if (P === null) {
|
|
380
|
-
const e = P = new
|
|
380
|
+
const e = P = new vi();
|
|
381
381
|
vt.add(P), ct || De(() => {
|
|
382
382
|
P === e && e.flush();
|
|
383
383
|
});
|
|
@@ -399,12 +399,12 @@ Ae = new WeakMap(), Ke = new WeakMap(), Me = new WeakMap(), Ue = new WeakMap(),
|
|
|
399
399
|
Kt = function(e, i, n) {
|
|
400
400
|
e.f ^= F;
|
|
401
401
|
for (var r = e.first; r !== null; ) {
|
|
402
|
-
var s = r.f, o = (s & (ve |
|
|
403
|
-
if (!
|
|
404
|
-
o ? l || (r.f ^= F) : (s & nt) !== 0 ? i.push(r) : (s & (Lt |
|
|
405
|
-
var
|
|
406
|
-
if (
|
|
407
|
-
r =
|
|
402
|
+
var s = r.f, o = (s & (ve | Re)) !== 0, a = o && (s & F) !== 0, l = (s & Se) !== 0, u = a || c(this, se).has(r);
|
|
403
|
+
if (!u && r.fn !== null) {
|
|
404
|
+
o ? l || (r.f ^= F) : (s & nt) !== 0 ? i.push(r) : (s & (Lt | oi)) !== 0 && l ? n.push(r) : mt(r) && (it(r), (s & Le) !== 0 && (c(this, we).add(r), l && L(r, H)));
|
|
405
|
+
var f = r.first;
|
|
406
|
+
if (f !== null) {
|
|
407
|
+
r = f;
|
|
408
408
|
continue;
|
|
409
409
|
}
|
|
410
410
|
}
|
|
@@ -422,7 +422,7 @@ Kt = function(e, i, n) {
|
|
|
422
422
|
*/
|
|
423
423
|
Ut = function(e) {
|
|
424
424
|
for (var i = 0; i < e.length; i += 1)
|
|
425
|
-
|
|
425
|
+
Ji(e[i], c(this, Ye), c(this, we));
|
|
426
426
|
}, Wt = function() {
|
|
427
427
|
var s;
|
|
428
428
|
if (vt.size > 1) {
|
|
@@ -434,23 +434,23 @@ Ut = function(e) {
|
|
|
434
434
|
continue;
|
|
435
435
|
}
|
|
436
436
|
const a = [];
|
|
437
|
-
for (const [
|
|
438
|
-
if (o.current.has(
|
|
439
|
-
if (n &&
|
|
440
|
-
o.current.set(
|
|
437
|
+
for (const [u, f] of this.current) {
|
|
438
|
+
if (o.current.has(u))
|
|
439
|
+
if (n && f !== o.current.get(u))
|
|
440
|
+
o.current.set(u, f);
|
|
441
441
|
else
|
|
442
442
|
continue;
|
|
443
|
-
a.push(
|
|
443
|
+
a.push(u);
|
|
444
444
|
}
|
|
445
445
|
if (a.length === 0)
|
|
446
446
|
continue;
|
|
447
|
-
const l = [...o.current.keys()].filter((
|
|
447
|
+
const l = [...o.current.keys()].filter((u) => !this.current.has(u));
|
|
448
448
|
if (l.length > 0) {
|
|
449
449
|
var r = V;
|
|
450
450
|
V = [];
|
|
451
|
-
const
|
|
451
|
+
const u = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
|
|
452
452
|
for (const h of a)
|
|
453
|
-
|
|
453
|
+
en(h, l, u, f);
|
|
454
454
|
if (V.length > 0) {
|
|
455
455
|
P = o, o.apply();
|
|
456
456
|
for (const h of V)
|
|
@@ -464,29 +464,29 @@ Ut = function(e) {
|
|
|
464
464
|
}
|
|
465
465
|
c(this, se).clear(), vt.delete(this);
|
|
466
466
|
};
|
|
467
|
-
let
|
|
468
|
-
function
|
|
467
|
+
let ge = vi;
|
|
468
|
+
function de(t) {
|
|
469
469
|
var e = ct;
|
|
470
470
|
ct = !0;
|
|
471
471
|
try {
|
|
472
472
|
for (var i; ; ) {
|
|
473
|
-
if (
|
|
473
|
+
if (Ar(), V.length === 0 && (P?.flush(), V.length === 0))
|
|
474
474
|
return Nt = null, /** @type {T} */
|
|
475
475
|
i;
|
|
476
|
-
|
|
476
|
+
Zi();
|
|
477
477
|
}
|
|
478
478
|
} finally {
|
|
479
479
|
ct = e;
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function Zi() {
|
|
483
483
|
var t = null;
|
|
484
484
|
try {
|
|
485
485
|
for (var e = 0; V.length > 0; ) {
|
|
486
|
-
var i =
|
|
486
|
+
var i = ge.ensure();
|
|
487
487
|
if (e++ > 1e3) {
|
|
488
488
|
var n, r;
|
|
489
|
-
|
|
489
|
+
Sr();
|
|
490
490
|
}
|
|
491
491
|
i.process(V), Ce.clear();
|
|
492
492
|
}
|
|
@@ -494,62 +494,62 @@ function Ji() {
|
|
|
494
494
|
V = [], Nt = null, tt = null;
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Sr() {
|
|
498
498
|
try {
|
|
499
|
-
|
|
499
|
+
ur();
|
|
500
500
|
} catch (t) {
|
|
501
501
|
je(t, Nt);
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
let
|
|
505
|
-
function
|
|
504
|
+
let fe = null;
|
|
505
|
+
function wi(t) {
|
|
506
506
|
var e = t.length;
|
|
507
507
|
if (e !== 0) {
|
|
508
508
|
for (var i = 0; i < e; ) {
|
|
509
509
|
var n = t[i++];
|
|
510
|
-
if ((n.f & (Ee | Se)) === 0 &&
|
|
510
|
+
if ((n.f & (Ee | Se)) === 0 && mt(n) && (fe = /* @__PURE__ */ new Set(), it(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && An(n), fe?.size > 0)) {
|
|
511
511
|
Ce.clear();
|
|
512
|
-
for (const r of
|
|
512
|
+
for (const r of fe) {
|
|
513
513
|
if ((r.f & (Ee | Se)) !== 0) continue;
|
|
514
514
|
const s = [r];
|
|
515
515
|
let o = r.parent;
|
|
516
516
|
for (; o !== null; )
|
|
517
|
-
|
|
517
|
+
fe.has(o) && (fe.delete(o), s.push(o)), o = o.parent;
|
|
518
518
|
for (let a = s.length - 1; a >= 0; a--) {
|
|
519
519
|
const l = s[a];
|
|
520
520
|
(l.f & (Ee | Se)) === 0 && it(l);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
|
|
523
|
+
fe.clear();
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
|
|
526
|
+
fe = null;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function en(t, e, i, n) {
|
|
530
530
|
if (!i.has(t) && (i.add(t), t.reactions !== null))
|
|
531
531
|
for (const r of t.reactions) {
|
|
532
532
|
const s = r.f;
|
|
533
|
-
(s & N) !== 0 ?
|
|
533
|
+
(s & N) !== 0 ? en(
|
|
534
534
|
/** @type {Derived} */
|
|
535
535
|
r,
|
|
536
536
|
e,
|
|
537
537
|
i,
|
|
538
538
|
n
|
|
539
|
-
) : (s & (
|
|
539
|
+
) : (s & (Gi | Le)) !== 0 && (s & H) === 0 && tn(r, e, n) && (L(r, H), ae(
|
|
540
540
|
/** @type {Effect} */
|
|
541
541
|
r
|
|
542
542
|
));
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function tn(t, e, i) {
|
|
546
546
|
const n = i.get(t);
|
|
547
547
|
if (n !== void 0) return n;
|
|
548
548
|
if (t.deps !== null)
|
|
549
549
|
for (const r of t.deps) {
|
|
550
550
|
if (et.call(e, r))
|
|
551
551
|
return !0;
|
|
552
|
-
if ((r.f & N) !== 0 &&
|
|
552
|
+
if ((r.f & N) !== 0 && tn(
|
|
553
553
|
/** @type {Derived} */
|
|
554
554
|
r,
|
|
555
555
|
e,
|
|
@@ -565,7 +565,7 @@ function en(t, e, i) {
|
|
|
565
565
|
}
|
|
566
566
|
function ae(t) {
|
|
567
567
|
var e = Nt = t, i = e.b;
|
|
568
|
-
if (i?.is_pending && (t.f & (nt | Lt |
|
|
568
|
+
if (i?.is_pending && (t.f & (nt | Lt | oi)) !== 0 && (t.f & Ge) === 0) {
|
|
569
569
|
i.defer_effect(t);
|
|
570
570
|
return;
|
|
571
571
|
}
|
|
@@ -574,7 +574,7 @@ function ae(t) {
|
|
|
574
574
|
var n = e.f;
|
|
575
575
|
if (tt !== null && e === w && (t.f & Lt) === 0)
|
|
576
576
|
return;
|
|
577
|
-
if ((n & (
|
|
577
|
+
if ((n & (Re | ve)) !== 0) {
|
|
578
578
|
if ((n & F) === 0)
|
|
579
579
|
return;
|
|
580
580
|
e.f ^= F;
|
|
@@ -582,29 +582,29 @@ function ae(t) {
|
|
|
582
582
|
}
|
|
583
583
|
V.push(e);
|
|
584
584
|
}
|
|
585
|
-
function
|
|
585
|
+
function nn(t, e) {
|
|
586
586
|
if (!((t.f & ve) !== 0 && (t.f & F) !== 0)) {
|
|
587
587
|
(t.f & H) !== 0 ? e.d.push(t) : (t.f & ne) !== 0 && e.m.push(t), L(t, F);
|
|
588
588
|
for (var i = t.first; i !== null; )
|
|
589
|
-
|
|
589
|
+
nn(i, e), i = i.next;
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
function
|
|
592
|
+
function Er(t) {
|
|
593
593
|
let e = 0, i = Mt(0), n;
|
|
594
594
|
return () => {
|
|
595
|
-
|
|
595
|
+
di() && (m(i), fi(() => (e === 0 && (n = pi(() => t(() => ut(i)))), e += 1, () => {
|
|
596
596
|
De(() => {
|
|
597
597
|
e -= 1, e === 0 && (n?.(), n = void 0, ut(i));
|
|
598
598
|
});
|
|
599
599
|
})));
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
|
-
var
|
|
603
|
-
function
|
|
604
|
-
new
|
|
602
|
+
var Cr = Rt | rt;
|
|
603
|
+
function $r(t, e, i, n) {
|
|
604
|
+
new Or(t, e, i, n);
|
|
605
605
|
}
|
|
606
|
-
var q, pt, oe, Fe, B, le, K, J, he, xe, Ie, Qe, Je, Ze, pe, Ht, $,
|
|
607
|
-
class
|
|
606
|
+
var q, pt, oe, Fe, B, le, K, J, he, xe, Ie, Qe, Je, Ze, pe, Ht, $, rn, sn, on, Yt, Tt, At, Xt;
|
|
607
|
+
class Or {
|
|
608
608
|
/**
|
|
609
609
|
* @param {TemplateNode} node
|
|
610
610
|
* @param {BoundaryProps} props
|
|
@@ -614,14 +614,14 @@ class Er {
|
|
|
614
614
|
constructor(e, i, n, r) {
|
|
615
615
|
T(this, $);
|
|
616
616
|
/** @type {Boundary | null} */
|
|
617
|
-
|
|
618
|
-
|
|
617
|
+
d(this, "parent");
|
|
618
|
+
d(this, "is_pending", !1);
|
|
619
619
|
/**
|
|
620
620
|
* API-level transformError transform function. Transforms errors before they reach the `failed` snippet.
|
|
621
621
|
* Inherited from parent boundary, or defaults to identity.
|
|
622
622
|
* @type {(error: unknown) => unknown}
|
|
623
623
|
*/
|
|
624
|
-
|
|
624
|
+
d(this, "transform_error");
|
|
625
625
|
/** @type {TemplateNode} */
|
|
626
626
|
T(this, q);
|
|
627
627
|
/** @type {TemplateNode | null} */
|
|
@@ -655,7 +655,7 @@ class Er {
|
|
|
655
655
|
* @type {Source<number> | null}
|
|
656
656
|
*/
|
|
657
657
|
T(this, pe, null);
|
|
658
|
-
T(this, Ht,
|
|
658
|
+
T(this, Ht, Er(() => (v(this, pe, Mt(c(this, xe))), () => {
|
|
659
659
|
v(this, pe, null);
|
|
660
660
|
})));
|
|
661
661
|
v(this, q, e), v(this, oe, i), v(this, Fe, (s) => {
|
|
@@ -665,28 +665,28 @@ class Er {
|
|
|
665
665
|
);
|
|
666
666
|
o.b = this, o.f |= zt, n(s);
|
|
667
667
|
}), this.parent = /** @type {Effect} */
|
|
668
|
-
w.b, this.transform_error = r ?? this.parent?.transform_error ?? ((s) => s), v(this, B,
|
|
668
|
+
w.b, this.transform_error = r ?? this.parent?.transform_error ?? ((s) => s), v(this, B, Vr(() => {
|
|
669
669
|
if (ee) {
|
|
670
670
|
const s = (
|
|
671
671
|
/** @type {Comment} */
|
|
672
672
|
c(this, pt)
|
|
673
673
|
);
|
|
674
|
-
|
|
675
|
-
const o = s.data ===
|
|
676
|
-
if (s.data.startsWith(
|
|
677
|
-
const l = JSON.parse(s.data.slice(
|
|
678
|
-
E(this, $,
|
|
679
|
-
} else o ? E(this, $,
|
|
674
|
+
ji();
|
|
675
|
+
const o = s.data === Bi;
|
|
676
|
+
if (s.data.startsWith(_i)) {
|
|
677
|
+
const l = JSON.parse(s.data.slice(_i.length));
|
|
678
|
+
E(this, $, sn).call(this, l);
|
|
679
|
+
} else o ? E(this, $, on).call(this) : E(this, $, rn).call(this);
|
|
680
680
|
} else
|
|
681
681
|
E(this, $, Yt).call(this);
|
|
682
|
-
},
|
|
682
|
+
}, Cr)), ee && v(this, q, D);
|
|
683
683
|
}
|
|
684
684
|
/**
|
|
685
685
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
686
686
|
* @param {Effect} effect
|
|
687
687
|
*/
|
|
688
688
|
defer_effect(e) {
|
|
689
|
-
|
|
689
|
+
Ji(e, c(this, Je), c(this, Ze));
|
|
690
690
|
}
|
|
691
691
|
/**
|
|
692
692
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -706,11 +706,11 @@ class Er {
|
|
|
706
706
|
*/
|
|
707
707
|
update_pending_count(e) {
|
|
708
708
|
E(this, $, Xt).call(this, e), v(this, xe, c(this, xe) + e), !(!c(this, pe) || c(this, Qe)) && (v(this, Qe, !0), De(() => {
|
|
709
|
-
v(this, Qe, !1), c(this, pe) &&
|
|
709
|
+
v(this, Qe, !1), c(this, pe) && dn(c(this, pe), c(this, xe));
|
|
710
710
|
}));
|
|
711
711
|
}
|
|
712
712
|
get_effect_pending() {
|
|
713
|
-
return c(this, Ht).call(this),
|
|
713
|
+
return c(this, Ht).call(this), m(
|
|
714
714
|
/** @type {Source<number>} */
|
|
715
715
|
c(this, pe)
|
|
716
716
|
);
|
|
@@ -721,44 +721,44 @@ class Er {
|
|
|
721
721
|
let n = c(this, oe).failed;
|
|
722
722
|
if (!i && !n)
|
|
723
723
|
throw e;
|
|
724
|
-
c(this, le) && (ie(c(this, le)), v(this, le, null)), c(this, K) && (ie(c(this, K)), v(this, K, null)), c(this, J) && (ie(c(this, J)), v(this, J, null)), ee && (
|
|
724
|
+
c(this, le) && (ie(c(this, le)), v(this, le, null)), c(this, K) && (ie(c(this, K)), v(this, K, null)), c(this, J) && (ie(c(this, J)), v(this, J, null)), ee && (ft(
|
|
725
725
|
/** @type {TemplateNode} */
|
|
726
726
|
c(this, pt)
|
|
727
|
-
),
|
|
727
|
+
), vr(), ft(br()));
|
|
728
728
|
var r = !1, s = !1;
|
|
729
729
|
const o = () => {
|
|
730
730
|
if (r) {
|
|
731
|
-
|
|
731
|
+
gr();
|
|
732
732
|
return;
|
|
733
733
|
}
|
|
734
|
-
r = !0, s &&
|
|
734
|
+
r = !0, s && mr(), c(this, J) !== null && wt(c(this, J), () => {
|
|
735
735
|
v(this, J, null);
|
|
736
736
|
}), E(this, $, At).call(this, () => {
|
|
737
|
-
|
|
737
|
+
ge.ensure(), E(this, $, Yt).call(this);
|
|
738
738
|
});
|
|
739
739
|
}, a = (l) => {
|
|
740
740
|
try {
|
|
741
741
|
s = !0, i?.(l, o), s = !1;
|
|
742
|
-
} catch (
|
|
743
|
-
je(
|
|
742
|
+
} catch (u) {
|
|
743
|
+
je(u, c(this, B) && c(this, B).parent);
|
|
744
744
|
}
|
|
745
745
|
n && v(this, J, E(this, $, At).call(this, () => {
|
|
746
|
-
|
|
746
|
+
ge.ensure();
|
|
747
747
|
try {
|
|
748
|
-
return
|
|
749
|
-
var
|
|
748
|
+
return ke(() => {
|
|
749
|
+
var u = (
|
|
750
750
|
/** @type {Effect} */
|
|
751
751
|
w
|
|
752
752
|
);
|
|
753
|
-
|
|
753
|
+
u.b = this, u.f |= zt, n(
|
|
754
754
|
c(this, q),
|
|
755
755
|
() => l,
|
|
756
756
|
() => o
|
|
757
757
|
);
|
|
758
758
|
});
|
|
759
|
-
} catch (
|
|
759
|
+
} catch (u) {
|
|
760
760
|
return je(
|
|
761
|
-
|
|
761
|
+
u,
|
|
762
762
|
/** @type {Effect} */
|
|
763
763
|
c(this, B).parent
|
|
764
764
|
), null;
|
|
@@ -769,31 +769,31 @@ class Er {
|
|
|
769
769
|
var l;
|
|
770
770
|
try {
|
|
771
771
|
l = this.transform_error(e);
|
|
772
|
-
} catch (
|
|
773
|
-
je(
|
|
772
|
+
} catch (u) {
|
|
773
|
+
je(u, c(this, B) && c(this, B).parent);
|
|
774
774
|
return;
|
|
775
775
|
}
|
|
776
776
|
l !== null && typeof l == "object" && typeof /** @type {any} */
|
|
777
777
|
l.then == "function" ? l.then(
|
|
778
778
|
a,
|
|
779
779
|
/** @param {unknown} e */
|
|
780
|
-
(
|
|
780
|
+
(u) => je(u, c(this, B) && c(this, B).parent)
|
|
781
781
|
) : a(l);
|
|
782
782
|
});
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
q = new WeakMap(), pt = new WeakMap(), oe = new WeakMap(), Fe = new WeakMap(), B = new WeakMap(), le = new WeakMap(), K = new WeakMap(), J = new WeakMap(), he = new WeakMap(), xe = new WeakMap(), Ie = new WeakMap(), Qe = new WeakMap(), Je = new WeakMap(), Ze = new WeakMap(), pe = new WeakMap(), Ht = new WeakMap(), $ = new WeakSet(),
|
|
785
|
+
q = new WeakMap(), pt = new WeakMap(), oe = new WeakMap(), Fe = new WeakMap(), B = new WeakMap(), le = new WeakMap(), K = new WeakMap(), J = new WeakMap(), he = new WeakMap(), xe = new WeakMap(), Ie = new WeakMap(), Qe = new WeakMap(), Je = new WeakMap(), Ze = new WeakMap(), pe = new WeakMap(), Ht = new WeakMap(), $ = new WeakSet(), rn = function() {
|
|
786
786
|
try {
|
|
787
|
-
v(this, le,
|
|
787
|
+
v(this, le, ke(() => c(this, Fe).call(this, c(this, q))));
|
|
788
788
|
} catch (e) {
|
|
789
789
|
this.error(e);
|
|
790
790
|
}
|
|
791
791
|
}, /**
|
|
792
792
|
* @param {unknown} error The deserialized error from the server's hydration comment
|
|
793
793
|
*/
|
|
794
|
-
|
|
794
|
+
sn = function(e) {
|
|
795
795
|
const i = c(this, oe).failed;
|
|
796
|
-
i && v(this, J,
|
|
796
|
+
i && v(this, J, ke(() => {
|
|
797
797
|
i(
|
|
798
798
|
c(this, q),
|
|
799
799
|
() => e,
|
|
@@ -801,11 +801,11 @@ rn = function(e) {
|
|
|
801
801
|
}
|
|
802
802
|
);
|
|
803
803
|
}));
|
|
804
|
-
},
|
|
804
|
+
}, on = function() {
|
|
805
805
|
const e = c(this, oe).pending;
|
|
806
|
-
e && (this.is_pending = !0, v(this, K,
|
|
806
|
+
e && (this.is_pending = !0, v(this, K, ke(() => e(c(this, q)))), De(() => {
|
|
807
807
|
var i = v(this, he, document.createDocumentFragment()), n = gn();
|
|
808
|
-
i.append(n), v(this, le, E(this, $, At).call(this, () => (
|
|
808
|
+
i.append(n), v(this, le, E(this, $, At).call(this, () => (ge.ensure(), ke(() => c(this, Fe).call(this, n))))), c(this, Ie) === 0 && (c(this, q).before(i), v(this, he, null), wt(
|
|
809
809
|
/** @type {Effect} */
|
|
810
810
|
c(this, K),
|
|
811
811
|
() => {
|
|
@@ -815,16 +815,16 @@ rn = function(e) {
|
|
|
815
815
|
}));
|
|
816
816
|
}, Yt = function() {
|
|
817
817
|
try {
|
|
818
|
-
if (this.is_pending = this.has_pending_snippet(), v(this, Ie, 0), v(this, xe, 0), v(this, le,
|
|
818
|
+
if (this.is_pending = this.has_pending_snippet(), v(this, Ie, 0), v(this, xe, 0), v(this, le, ke(() => {
|
|
819
819
|
c(this, Fe).call(this, c(this, q));
|
|
820
820
|
})), c(this, Ie) > 0) {
|
|
821
821
|
var e = v(this, he, document.createDocumentFragment());
|
|
822
|
-
|
|
822
|
+
jr(c(this, le), e);
|
|
823
823
|
const i = (
|
|
824
824
|
/** @type {(anchor: Node) => void} */
|
|
825
825
|
c(this, oe).pending
|
|
826
826
|
);
|
|
827
|
-
v(this, K,
|
|
827
|
+
v(this, K, ke(() => i(c(this, q))));
|
|
828
828
|
} else
|
|
829
829
|
E(this, $, Tt).call(this);
|
|
830
830
|
} catch (i) {
|
|
@@ -843,13 +843,13 @@ rn = function(e) {
|
|
|
843
843
|
*/
|
|
844
844
|
At = function(e) {
|
|
845
845
|
var i = w, n = b, r = Q;
|
|
846
|
-
Oe(c(this, B)), ce(c(this, B)),
|
|
846
|
+
Oe(c(this, B)), ce(c(this, B)), kt(c(this, B).ctx);
|
|
847
847
|
try {
|
|
848
848
|
return e();
|
|
849
849
|
} catch (s) {
|
|
850
|
-
return
|
|
850
|
+
return Xi(s), null;
|
|
851
851
|
} finally {
|
|
852
|
-
Oe(i), ce(n),
|
|
852
|
+
Oe(i), ce(n), kt(r);
|
|
853
853
|
}
|
|
854
854
|
}, /**
|
|
855
855
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
@@ -867,7 +867,7 @@ Xt = function(e) {
|
|
|
867
867
|
}), c(this, he) && (c(this, q).before(c(this, he)), v(this, he, null)));
|
|
868
868
|
};
|
|
869
869
|
// @__NO_SIDE_EFFECTS__
|
|
870
|
-
function
|
|
870
|
+
function ln(t) {
|
|
871
871
|
var e = N | H, i = b !== null && (b.f & N) !== 0 ? (
|
|
872
872
|
/** @type {Derived} */
|
|
873
873
|
b
|
|
@@ -876,7 +876,7 @@ function on(t) {
|
|
|
876
876
|
ctx: Q,
|
|
877
877
|
deps: null,
|
|
878
878
|
effects: null,
|
|
879
|
-
equals:
|
|
879
|
+
equals: qi,
|
|
880
880
|
f: e,
|
|
881
881
|
fn: t,
|
|
882
882
|
reactions: null,
|
|
@@ -891,11 +891,11 @@ function on(t) {
|
|
|
891
891
|
};
|
|
892
892
|
}
|
|
893
893
|
// @__NO_SIDE_EFFECTS__
|
|
894
|
-
function
|
|
895
|
-
const e = /* @__PURE__ */
|
|
896
|
-
return
|
|
894
|
+
function Ii(t) {
|
|
895
|
+
const e = /* @__PURE__ */ ln(t);
|
|
896
|
+
return In(e), e;
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function Lr(t) {
|
|
899
899
|
var e = t.effects;
|
|
900
900
|
if (e !== null) {
|
|
901
901
|
t.effects = null;
|
|
@@ -906,7 +906,7 @@ function Cr(t) {
|
|
|
906
906
|
);
|
|
907
907
|
}
|
|
908
908
|
}
|
|
909
|
-
function
|
|
909
|
+
function Rr(t) {
|
|
910
910
|
for (var e = t.parent; e !== null; ) {
|
|
911
911
|
if ((e.f & N) === 0)
|
|
912
912
|
return (e.f & Ee) === 0 ? (
|
|
@@ -917,44 +917,44 @@ function $r(t) {
|
|
|
917
917
|
}
|
|
918
918
|
return null;
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function ui(t) {
|
|
921
921
|
var e, i = w;
|
|
922
|
-
Oe(
|
|
922
|
+
Oe(Rr(t));
|
|
923
923
|
try {
|
|
924
|
-
t.f &= ~Ve,
|
|
924
|
+
t.f &= ~Ve, Lr(t), e = $n(t);
|
|
925
925
|
} finally {
|
|
926
926
|
Oe(i);
|
|
927
927
|
}
|
|
928
928
|
return e;
|
|
929
929
|
}
|
|
930
|
-
function
|
|
931
|
-
var e =
|
|
932
|
-
if (!t.equals(e) && (t.wv =
|
|
930
|
+
function an(t) {
|
|
931
|
+
var e = ui(t);
|
|
932
|
+
if (!t.equals(e) && (t.wv = En(), (!P?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
933
933
|
L(t, F);
|
|
934
934
|
return;
|
|
935
935
|
}
|
|
936
|
-
$e || (Z !== null ? (
|
|
936
|
+
$e || (Z !== null ? (di() || P?.is_fork) && Z.set(t, e) : ci(t));
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function kr(t) {
|
|
939
939
|
if (t.effects !== null)
|
|
940
940
|
for (const e of t.effects)
|
|
941
|
-
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(
|
|
941
|
+
(e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(li), e.teardown = er, e.ac = null, ht(e, 0), hi(e));
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function cn(t) {
|
|
944
944
|
if (t.effects !== null)
|
|
945
945
|
for (const e of t.effects)
|
|
946
946
|
e.teardown && it(e);
|
|
947
947
|
}
|
|
948
948
|
let Qt = /* @__PURE__ */ new Set();
|
|
949
949
|
const Ce = /* @__PURE__ */ new Map();
|
|
950
|
-
let
|
|
950
|
+
let un = !1;
|
|
951
951
|
function Mt(t, e) {
|
|
952
952
|
var i = {
|
|
953
953
|
f: 0,
|
|
954
954
|
// TODO ideally we could skip this altogether, but it causes type errors
|
|
955
955
|
v: t,
|
|
956
956
|
reactions: null,
|
|
957
|
-
equals:
|
|
957
|
+
equals: qi,
|
|
958
958
|
rv: 0,
|
|
959
959
|
wv: 0
|
|
960
960
|
};
|
|
@@ -963,40 +963,40 @@ function Mt(t, e) {
|
|
|
963
963
|
// @__NO_SIDE_EFFECTS__
|
|
964
964
|
function x(t, e) {
|
|
965
965
|
const i = Mt(t);
|
|
966
|
-
return
|
|
966
|
+
return In(i), i;
|
|
967
967
|
}
|
|
968
968
|
// @__NO_SIDE_EFFECTS__
|
|
969
|
-
function
|
|
969
|
+
function Pr(t, e = !1, i = !0) {
|
|
970
970
|
const n = Mt(t);
|
|
971
|
-
return e || (n.equals =
|
|
971
|
+
return e || (n.equals = _r), n;
|
|
972
972
|
}
|
|
973
973
|
function C(t, e, i = !1) {
|
|
974
974
|
b !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
975
975
|
// to ensure we error if state is set inside an inspect effect
|
|
976
|
-
(!te || (b.f &
|
|
976
|
+
(!te || (b.f & Ai) !== 0) && Wi() && (b.f & (N | Le | Gi | Ai)) !== 0 && (X === null || !et.call(X, t)) && pr();
|
|
977
977
|
let n = i ? at(e) : e;
|
|
978
|
-
return
|
|
978
|
+
return dn(t, n);
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function dn(t, e) {
|
|
981
981
|
if (!t.equals(e)) {
|
|
982
982
|
var i = t.v;
|
|
983
983
|
$e ? Ce.set(t, e) : Ce.set(t, i), t.v = e;
|
|
984
|
-
var n =
|
|
984
|
+
var n = ge.ensure();
|
|
985
985
|
if (n.capture(t, i), (t.f & N) !== 0) {
|
|
986
986
|
const r = (
|
|
987
987
|
/** @type {Derived} */
|
|
988
988
|
t
|
|
989
989
|
);
|
|
990
|
-
(t.f & H) !== 0 &&
|
|
990
|
+
(t.f & H) !== 0 && ui(r), ci(r);
|
|
991
991
|
}
|
|
992
|
-
t.wv =
|
|
992
|
+
t.wv = En(), fn(t, H), w !== null && (w.f & F) !== 0 && (w.f & (ve | Re)) === 0 && (U === null ? qr([t]) : U.push(t)), !n.is_fork && Qt.size > 0 && !un && Hr();
|
|
993
993
|
}
|
|
994
994
|
return e;
|
|
995
995
|
}
|
|
996
|
-
function
|
|
997
|
-
|
|
996
|
+
function Hr() {
|
|
997
|
+
un = !1;
|
|
998
998
|
for (const t of Qt)
|
|
999
|
-
(t.f & F) !== 0 && L(t, ne),
|
|
999
|
+
(t.f & F) !== 0 && L(t, ne), mt(t) && it(t);
|
|
1000
1000
|
Qt.clear();
|
|
1001
1001
|
}
|
|
1002
1002
|
function ut(t) {
|
|
@@ -1013,7 +1013,7 @@ function fn(t, e) {
|
|
|
1013
1013
|
s
|
|
1014
1014
|
);
|
|
1015
1015
|
Z?.delete(l), (o & Ve) === 0 && (o & Y && (s.f |= Ve), fn(l, ne));
|
|
1016
|
-
} else a && ((o & Le) !== 0 &&
|
|
1016
|
+
} else a && ((o & Le) !== 0 && fe !== null && fe.add(
|
|
1017
1017
|
/** @type {Effect} */
|
|
1018
1018
|
s
|
|
1019
1019
|
), ae(
|
|
@@ -1025,16 +1025,16 @@ function fn(t, e) {
|
|
|
1025
1025
|
function at(t) {
|
|
1026
1026
|
if (typeof t != "object" || t === null || _t in t)
|
|
1027
1027
|
return t;
|
|
1028
|
-
const e =
|
|
1029
|
-
if (e !==
|
|
1028
|
+
const e = Zn(t);
|
|
1029
|
+
if (e !== Qn && e !== Jn)
|
|
1030
1030
|
return t;
|
|
1031
|
-
var i = /* @__PURE__ */ new Map(), n =
|
|
1031
|
+
var i = /* @__PURE__ */ new Map(), n = Wn(t), r = /* @__PURE__ */ x(0), s = Be, o = (a) => {
|
|
1032
1032
|
if (Be === s)
|
|
1033
1033
|
return a();
|
|
1034
|
-
var l = b,
|
|
1035
|
-
ce(null),
|
|
1036
|
-
var
|
|
1037
|
-
return ce(l),
|
|
1034
|
+
var l = b, u = Be;
|
|
1035
|
+
ce(null), Ci(s);
|
|
1036
|
+
var f = a();
|
|
1037
|
+
return ce(l), Ci(u), f;
|
|
1038
1038
|
};
|
|
1039
1039
|
return n && i.set("length", /* @__PURE__ */ x(
|
|
1040
1040
|
/** @type {any[]} */
|
|
@@ -1043,149 +1043,149 @@ function at(t) {
|
|
|
1043
1043
|
/** @type {any} */
|
|
1044
1044
|
t,
|
|
1045
1045
|
{
|
|
1046
|
-
defineProperty(a, l,
|
|
1047
|
-
(!("value" in
|
|
1048
|
-
var
|
|
1049
|
-
return
|
|
1050
|
-
var h = /* @__PURE__ */ x(
|
|
1046
|
+
defineProperty(a, l, u) {
|
|
1047
|
+
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && fr();
|
|
1048
|
+
var f = i.get(l);
|
|
1049
|
+
return f === void 0 ? o(() => {
|
|
1050
|
+
var h = /* @__PURE__ */ x(u.value);
|
|
1051
1051
|
return i.set(l, h), h;
|
|
1052
|
-
}) : C(
|
|
1052
|
+
}) : C(f, u.value, !0), !0;
|
|
1053
1053
|
},
|
|
1054
1054
|
deleteProperty(a, l) {
|
|
1055
|
-
var
|
|
1056
|
-
if (
|
|
1055
|
+
var u = i.get(l);
|
|
1056
|
+
if (u === void 0) {
|
|
1057
1057
|
if (l in a) {
|
|
1058
|
-
const
|
|
1059
|
-
i.set(l,
|
|
1058
|
+
const f = o(() => /* @__PURE__ */ x(M));
|
|
1059
|
+
i.set(l, f), ut(r);
|
|
1060
1060
|
}
|
|
1061
1061
|
} else
|
|
1062
|
-
C(
|
|
1062
|
+
C(u, M), ut(r);
|
|
1063
1063
|
return !0;
|
|
1064
1064
|
},
|
|
1065
|
-
get(a, l,
|
|
1065
|
+
get(a, l, u) {
|
|
1066
1066
|
if (l === _t)
|
|
1067
1067
|
return t;
|
|
1068
|
-
var
|
|
1069
|
-
if (
|
|
1068
|
+
var f = i.get(l), h = l in a;
|
|
1069
|
+
if (f === void 0 && (!h || qe(a, l)?.writable) && (f = o(() => {
|
|
1070
1070
|
var y = at(h ? a[l] : M), p = /* @__PURE__ */ x(y);
|
|
1071
1071
|
return p;
|
|
1072
|
-
}), i.set(l,
|
|
1073
|
-
var
|
|
1074
|
-
return
|
|
1072
|
+
}), i.set(l, f)), f !== void 0) {
|
|
1073
|
+
var g = m(f);
|
|
1074
|
+
return g === M ? void 0 : g;
|
|
1075
1075
|
}
|
|
1076
|
-
return Reflect.get(a, l,
|
|
1076
|
+
return Reflect.get(a, l, u);
|
|
1077
1077
|
},
|
|
1078
1078
|
getOwnPropertyDescriptor(a, l) {
|
|
1079
|
-
var
|
|
1080
|
-
if (
|
|
1081
|
-
var
|
|
1082
|
-
|
|
1083
|
-
} else if (
|
|
1084
|
-
var h = i.get(l),
|
|
1085
|
-
if (h !== void 0 &&
|
|
1079
|
+
var u = Reflect.getOwnPropertyDescriptor(a, l);
|
|
1080
|
+
if (u && "value" in u) {
|
|
1081
|
+
var f = i.get(l);
|
|
1082
|
+
f && (u.value = m(f));
|
|
1083
|
+
} else if (u === void 0) {
|
|
1084
|
+
var h = i.get(l), g = h?.v;
|
|
1085
|
+
if (h !== void 0 && g !== M)
|
|
1086
1086
|
return {
|
|
1087
1087
|
enumerable: !0,
|
|
1088
1088
|
configurable: !0,
|
|
1089
|
-
value:
|
|
1089
|
+
value: g,
|
|
1090
1090
|
writable: !0
|
|
1091
1091
|
};
|
|
1092
1092
|
}
|
|
1093
|
-
return
|
|
1093
|
+
return u;
|
|
1094
1094
|
},
|
|
1095
1095
|
has(a, l) {
|
|
1096
1096
|
if (l === _t)
|
|
1097
1097
|
return !0;
|
|
1098
|
-
var
|
|
1099
|
-
if (
|
|
1100
|
-
|
|
1101
|
-
var
|
|
1098
|
+
var u = i.get(l), f = u !== void 0 && u.v !== M || Reflect.has(a, l);
|
|
1099
|
+
if (u !== void 0 || w !== null && (!f || qe(a, l)?.writable)) {
|
|
1100
|
+
u === void 0 && (u = o(() => {
|
|
1101
|
+
var g = f ? at(a[l]) : M, y = /* @__PURE__ */ x(g);
|
|
1102
1102
|
return y;
|
|
1103
|
-
}), i.set(l,
|
|
1104
|
-
var h =
|
|
1103
|
+
}), i.set(l, u));
|
|
1104
|
+
var h = m(u);
|
|
1105
1105
|
if (h === M)
|
|
1106
1106
|
return !1;
|
|
1107
1107
|
}
|
|
1108
|
-
return
|
|
1108
|
+
return f;
|
|
1109
1109
|
},
|
|
1110
|
-
set(a, l,
|
|
1111
|
-
var h = i.get(l),
|
|
1110
|
+
set(a, l, u, f) {
|
|
1111
|
+
var h = i.get(l), g = l in a;
|
|
1112
1112
|
if (n && l === "length")
|
|
1113
|
-
for (var y =
|
|
1113
|
+
for (var y = u; y < /** @type {Source<number>} */
|
|
1114
1114
|
h.v; y += 1) {
|
|
1115
1115
|
var p = i.get(y + "");
|
|
1116
1116
|
p !== void 0 ? C(p, M) : y in a && (p = o(() => /* @__PURE__ */ x(M)), i.set(y + "", p));
|
|
1117
1117
|
}
|
|
1118
1118
|
if (h === void 0)
|
|
1119
|
-
(!
|
|
1119
|
+
(!g || qe(a, l)?.writable) && (h = o(() => /* @__PURE__ */ x(void 0)), C(h, at(u)), i.set(l, h));
|
|
1120
1120
|
else {
|
|
1121
|
-
|
|
1122
|
-
var S = o(() => at(
|
|
1121
|
+
g = h.v !== M;
|
|
1122
|
+
var S = o(() => at(u));
|
|
1123
1123
|
C(h, S);
|
|
1124
1124
|
}
|
|
1125
1125
|
var _ = Reflect.getOwnPropertyDescriptor(a, l);
|
|
1126
|
-
if (_?.set && _.set.call(
|
|
1126
|
+
if (_?.set && _.set.call(f, u), !g) {
|
|
1127
1127
|
if (n && typeof l == "string") {
|
|
1128
|
-
var
|
|
1128
|
+
var R = (
|
|
1129
1129
|
/** @type {Source<number>} */
|
|
1130
1130
|
i.get("length")
|
|
1131
1131
|
), re = Number(l);
|
|
1132
|
-
Number.isInteger(re) && re >=
|
|
1132
|
+
Number.isInteger(re) && re >= R.v && C(R, re + 1);
|
|
1133
1133
|
}
|
|
1134
1134
|
ut(r);
|
|
1135
1135
|
}
|
|
1136
1136
|
return !0;
|
|
1137
1137
|
},
|
|
1138
1138
|
ownKeys(a) {
|
|
1139
|
-
|
|
1139
|
+
m(r);
|
|
1140
1140
|
var l = Reflect.ownKeys(a).filter((h) => {
|
|
1141
|
-
var
|
|
1142
|
-
return
|
|
1141
|
+
var g = i.get(h);
|
|
1142
|
+
return g === void 0 || g.v !== M;
|
|
1143
1143
|
});
|
|
1144
|
-
for (var [
|
|
1145
|
-
|
|
1144
|
+
for (var [u, f] of i)
|
|
1145
|
+
f.v !== M && !(u in a) && l.push(u);
|
|
1146
1146
|
return l;
|
|
1147
1147
|
},
|
|
1148
1148
|
setPrototypeOf() {
|
|
1149
|
-
|
|
1149
|
+
hr();
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
1152
|
);
|
|
1153
1153
|
}
|
|
1154
|
-
var
|
|
1154
|
+
var Si, hn, pn, mn;
|
|
1155
1155
|
function Jt() {
|
|
1156
|
-
if (
|
|
1157
|
-
|
|
1156
|
+
if (Si === void 0) {
|
|
1157
|
+
Si = window, hn = /Firefox/.test(navigator.userAgent);
|
|
1158
1158
|
var t = Element.prototype, e = Node.prototype, i = Text.prototype;
|
|
1159
|
-
|
|
1159
|
+
pn = qe(e, "firstChild").get, mn = qe(e, "nextSibling").get, Ti(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Ti(i) && (i.__t = void 0);
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
1162
|
function gn(t = "") {
|
|
1163
1163
|
return document.createTextNode(t);
|
|
1164
1164
|
}
|
|
1165
1165
|
// @__NO_SIDE_EFFECTS__
|
|
1166
|
-
function
|
|
1166
|
+
function vn(t) {
|
|
1167
1167
|
return (
|
|
1168
1168
|
/** @type {TemplateNode | null} */
|
|
1169
|
-
|
|
1169
|
+
pn.call(t)
|
|
1170
1170
|
);
|
|
1171
1171
|
}
|
|
1172
1172
|
// @__NO_SIDE_EFFECTS__
|
|
1173
1173
|
function st(t) {
|
|
1174
1174
|
return (
|
|
1175
1175
|
/** @type {TemplateNode | null} */
|
|
1176
|
-
|
|
1176
|
+
mn.call(t)
|
|
1177
1177
|
);
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1179
|
+
function Nr(t) {
|
|
1180
1180
|
t.textContent = "";
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1182
|
+
function bn(t, e, i) {
|
|
1183
1183
|
return (
|
|
1184
1184
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1185
|
-
document.createElementNS(
|
|
1185
|
+
document.createElementNS(Un, t, void 0)
|
|
1186
1186
|
);
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function yn(t) {
|
|
1189
1189
|
var e = b, i = w;
|
|
1190
1190
|
ce(null), Oe(null);
|
|
1191
1191
|
try {
|
|
@@ -1194,10 +1194,10 @@ function bn(t) {
|
|
|
1194
1194
|
ce(e), Oe(i);
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1198
|
-
w === null && (b === null &&
|
|
1197
|
+
function Mr(t) {
|
|
1198
|
+
w === null && (b === null && cr(), ar()), $e && lr();
|
|
1199
1199
|
}
|
|
1200
|
-
function
|
|
1200
|
+
function Fr(t, e) {
|
|
1201
1201
|
var i = e.last;
|
|
1202
1202
|
i === null ? e.last = e.first = t : (i.next = t, t.prev = i, e.last = t);
|
|
1203
1203
|
}
|
|
@@ -1229,9 +1229,9 @@ function ze(t, e) {
|
|
|
1229
1229
|
throw ie(n), o;
|
|
1230
1230
|
}
|
|
1231
1231
|
r.deps === null && r.teardown === null && r.nodes === null && r.first === r.last && // either `null`, or a singular child
|
|
1232
|
-
(r.f & rt) === 0 && (r = r.first, (t & Le) !== 0 && (t &
|
|
1232
|
+
(r.f & rt) === 0 && (r = r.first, (t & Le) !== 0 && (t & Rt) !== 0 && r !== null && (r.f |= Rt));
|
|
1233
1233
|
}
|
|
1234
|
-
if (r !== null && (r.parent = i, i !== null &&
|
|
1234
|
+
if (r !== null && (r.parent = i, i !== null && Fr(r, i), b !== null && (b.f & N) !== 0 && (t & Re) === 0)) {
|
|
1235
1235
|
var s = (
|
|
1236
1236
|
/** @type {Derived} */
|
|
1237
1237
|
b
|
|
@@ -1240,11 +1240,11 @@ function ze(t, e) {
|
|
|
1240
1240
|
}
|
|
1241
1241
|
return n;
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1243
|
+
function di() {
|
|
1244
1244
|
return b !== null && !te;
|
|
1245
1245
|
}
|
|
1246
1246
|
function Pe(t) {
|
|
1247
|
-
|
|
1247
|
+
Mr();
|
|
1248
1248
|
var e = (
|
|
1249
1249
|
/** @type {Effect} */
|
|
1250
1250
|
w.f
|
|
@@ -1256,64 +1256,64 @@ function Pe(t) {
|
|
|
1256
1256
|
);
|
|
1257
1257
|
(n.e ?? (n.e = [])).push(t);
|
|
1258
1258
|
} else
|
|
1259
|
-
return
|
|
1259
|
+
return _n(t);
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1262
|
-
return ze(nt |
|
|
1261
|
+
function _n(t) {
|
|
1262
|
+
return ze(nt | rr, t);
|
|
1263
1263
|
}
|
|
1264
|
-
function
|
|
1265
|
-
|
|
1266
|
-
const e = ze(
|
|
1264
|
+
function xr(t) {
|
|
1265
|
+
ge.ensure();
|
|
1266
|
+
const e = ze(Re | rt, t);
|
|
1267
1267
|
return () => {
|
|
1268
1268
|
ie(e);
|
|
1269
1269
|
};
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1272
|
-
|
|
1273
|
-
const e = ze(
|
|
1271
|
+
function Dr(t) {
|
|
1272
|
+
ge.ensure();
|
|
1273
|
+
const e = ze(Re | rt, t);
|
|
1274
1274
|
return (i = {}) => new Promise((n) => {
|
|
1275
1275
|
i.outro ? wt(e, () => {
|
|
1276
1276
|
ie(e), n(void 0);
|
|
1277
1277
|
}) : (ie(e), n(void 0));
|
|
1278
1278
|
});
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1280
|
+
function Br(t) {
|
|
1281
1281
|
return ze(nt, t);
|
|
1282
1282
|
}
|
|
1283
1283
|
function fi(t, e = 0) {
|
|
1284
1284
|
return ze(Lt | e, t);
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1286
|
+
function Vr(t, e = 0) {
|
|
1287
1287
|
var i = ze(Le | e, t);
|
|
1288
1288
|
return i;
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1290
|
+
function ke(t) {
|
|
1291
1291
|
return ze(ve | rt, t);
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function Tn(t) {
|
|
1294
1294
|
var e = t.teardown;
|
|
1295
1295
|
if (e !== null) {
|
|
1296
1296
|
const i = $e, n = b;
|
|
1297
|
-
|
|
1297
|
+
Ei(!0), ce(null);
|
|
1298
1298
|
try {
|
|
1299
1299
|
e.call(null);
|
|
1300
1300
|
} finally {
|
|
1301
|
-
|
|
1301
|
+
Ei(i), ce(n);
|
|
1302
1302
|
}
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1305
|
+
function hi(t, e = !1) {
|
|
1306
1306
|
var i = t.first;
|
|
1307
1307
|
for (t.first = t.last = null; i !== null; ) {
|
|
1308
1308
|
const r = i.ac;
|
|
1309
|
-
r !== null &&
|
|
1310
|
-
r.abort(
|
|
1309
|
+
r !== null && yn(() => {
|
|
1310
|
+
r.abort(li);
|
|
1311
1311
|
});
|
|
1312
1312
|
var n = i.next;
|
|
1313
|
-
(i.f &
|
|
1313
|
+
(i.f & Re) !== 0 ? i.parent = null : ie(i, e), i = n;
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function Gr(t) {
|
|
1317
1317
|
for (var e = t.first; e !== null; ) {
|
|
1318
1318
|
var i = e.next;
|
|
1319
1319
|
(e.f & ve) === 0 && ie(e), e = i;
|
|
@@ -1321,32 +1321,32 @@ function Dr(t) {
|
|
|
1321
1321
|
}
|
|
1322
1322
|
function ie(t, e = !0) {
|
|
1323
1323
|
var i = !1;
|
|
1324
|
-
(e || (t.f &
|
|
1324
|
+
(e || (t.f & nr) !== 0) && t.nodes !== null && t.nodes.end !== null && (zr(
|
|
1325
1325
|
t.nodes.start,
|
|
1326
1326
|
/** @type {TemplateNode} */
|
|
1327
1327
|
t.nodes.end
|
|
1328
|
-
), i = !0),
|
|
1328
|
+
), i = !0), hi(t, e && !i), ht(t, 0), L(t, Ee);
|
|
1329
1329
|
var n = t.nodes && t.nodes.t;
|
|
1330
1330
|
if (n !== null)
|
|
1331
1331
|
for (const s of n)
|
|
1332
1332
|
s.stop();
|
|
1333
|
-
|
|
1333
|
+
Tn(t);
|
|
1334
1334
|
var r = t.parent;
|
|
1335
|
-
r !== null && r.first !== null &&
|
|
1335
|
+
r !== null && r.first !== null && An(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function zr(t, e) {
|
|
1338
1338
|
for (; t !== null; ) {
|
|
1339
1339
|
var i = t === e ? null : /* @__PURE__ */ st(t);
|
|
1340
1340
|
t.remove(), t = i;
|
|
1341
1341
|
}
|
|
1342
1342
|
}
|
|
1343
|
-
function
|
|
1343
|
+
function An(t) {
|
|
1344
1344
|
var e = t.parent, i = t.prev, n = t.next;
|
|
1345
1345
|
i !== null && (i.next = n), n !== null && (n.prev = i), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = i));
|
|
1346
1346
|
}
|
|
1347
1347
|
function wt(t, e, i = !0) {
|
|
1348
1348
|
var n = [];
|
|
1349
|
-
|
|
1349
|
+
wn(t, n, !0);
|
|
1350
1350
|
var r = () => {
|
|
1351
1351
|
i && ie(t), e && e();
|
|
1352
1352
|
}, s = n.length;
|
|
@@ -1357,7 +1357,7 @@ function wt(t, e, i = !0) {
|
|
|
1357
1357
|
} else
|
|
1358
1358
|
r();
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function wn(t, e, i) {
|
|
1361
1361
|
if ((t.f & Se) === 0) {
|
|
1362
1362
|
t.f ^= Se;
|
|
1363
1363
|
var n = t.nodes && t.nodes.t;
|
|
@@ -1365,15 +1365,15 @@ function An(t, e, i) {
|
|
|
1365
1365
|
for (const a of n)
|
|
1366
1366
|
(a.is_global || i) && e.push(a);
|
|
1367
1367
|
for (var r = t.first; r !== null; ) {
|
|
1368
|
-
var s = r.next, o = (r.f &
|
|
1368
|
+
var s = r.next, o = (r.f & Rt) !== 0 || // If this is a branch effect without a block effect parent,
|
|
1369
1369
|
// it means the parent block effect was pruned. In that case,
|
|
1370
1370
|
// transparency information was transferred to the branch effect.
|
|
1371
1371
|
(r.f & ve) !== 0 && (t.f & Le) !== 0;
|
|
1372
|
-
|
|
1372
|
+
wn(r, e, o ? i : !1), r = s;
|
|
1373
1373
|
}
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1376
|
+
function jr(t, e) {
|
|
1377
1377
|
if (t.nodes)
|
|
1378
1378
|
for (var i = t.nodes.start, n = t.nodes.end; i !== null; ) {
|
|
1379
1379
|
var r = i === n ? null : /* @__PURE__ */ st(i);
|
|
@@ -1381,7 +1381,7 @@ function Vr(t, e) {
|
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
1383
1383
|
let It = !1, $e = !1;
|
|
1384
|
-
function
|
|
1384
|
+
function Ei(t) {
|
|
1385
1385
|
$e = t;
|
|
1386
1386
|
}
|
|
1387
1387
|
let b = null, te = !1;
|
|
@@ -1393,21 +1393,21 @@ function Oe(t) {
|
|
|
1393
1393
|
w = t;
|
|
1394
1394
|
}
|
|
1395
1395
|
let X = null;
|
|
1396
|
-
function
|
|
1396
|
+
function In(t) {
|
|
1397
1397
|
b !== null && (X === null ? X = [t] : X.push(t));
|
|
1398
1398
|
}
|
|
1399
1399
|
let G = null, j = 0, U = null;
|
|
1400
|
-
function
|
|
1400
|
+
function qr(t) {
|
|
1401
1401
|
U = t;
|
|
1402
1402
|
}
|
|
1403
|
-
let
|
|
1404
|
-
function
|
|
1403
|
+
let Sn = 1, Ne = 0, Be = Ne;
|
|
1404
|
+
function Ci(t) {
|
|
1405
1405
|
Be = t;
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1408
|
-
return ++
|
|
1407
|
+
function En() {
|
|
1408
|
+
return ++Sn;
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function mt(t) {
|
|
1411
1411
|
var e = t.f;
|
|
1412
1412
|
if ((e & H) !== 0)
|
|
1413
1413
|
return !0;
|
|
@@ -1417,10 +1417,10 @@ function gt(t) {
|
|
|
1417
1417
|
t.deps
|
|
1418
1418
|
), n = i.length, r = 0; r < n; r++) {
|
|
1419
1419
|
var s = i[r];
|
|
1420
|
-
if (
|
|
1420
|
+
if (mt(
|
|
1421
1421
|
/** @type {Derived} */
|
|
1422
1422
|
s
|
|
1423
|
-
) &&
|
|
1423
|
+
) && an(
|
|
1424
1424
|
/** @type {Derived} */
|
|
1425
1425
|
s
|
|
1426
1426
|
), s.wv > t.wv)
|
|
@@ -1432,12 +1432,12 @@ function gt(t) {
|
|
|
1432
1432
|
}
|
|
1433
1433
|
return !1;
|
|
1434
1434
|
}
|
|
1435
|
-
function
|
|
1435
|
+
function Cn(t, e, i = !0) {
|
|
1436
1436
|
var n = t.reactions;
|
|
1437
1437
|
if (n !== null && !(X !== null && et.call(X, t)))
|
|
1438
1438
|
for (var r = 0; r < n.length; r++) {
|
|
1439
1439
|
var s = n[r];
|
|
1440
|
-
(s.f & N) !== 0 ?
|
|
1440
|
+
(s.f & N) !== 0 ? Cn(
|
|
1441
1441
|
/** @type {Derived} */
|
|
1442
1442
|
s,
|
|
1443
1443
|
e,
|
|
@@ -1448,36 +1448,36 @@ function En(t, e, i = !0) {
|
|
|
1448
1448
|
));
|
|
1449
1449
|
}
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1451
|
+
function $n(t) {
|
|
1452
1452
|
var S;
|
|
1453
|
-
var e = G, i = j, n = U, r = b, s = X, o = Q, a = te, l = Be,
|
|
1453
|
+
var e = G, i = j, n = U, r = b, s = X, o = Q, a = te, l = Be, u = t.f;
|
|
1454
1454
|
G = /** @type {null | Value[]} */
|
|
1455
|
-
null, j = 0, U = null, b = (
|
|
1456
|
-
t.ac.abort(
|
|
1455
|
+
null, j = 0, U = null, b = (u & (ve | Re)) === 0 ? t : null, X = null, kt(t.ctx), te = !1, Be = ++Ne, t.ac !== null && (yn(() => {
|
|
1456
|
+
t.ac.abort(li);
|
|
1457
1457
|
}), t.ac = null);
|
|
1458
1458
|
try {
|
|
1459
1459
|
t.f |= jt;
|
|
1460
|
-
var
|
|
1460
|
+
var f = (
|
|
1461
1461
|
/** @type {Function} */
|
|
1462
1462
|
t.fn
|
|
1463
|
-
), h =
|
|
1463
|
+
), h = f();
|
|
1464
1464
|
t.f |= Ge;
|
|
1465
|
-
var
|
|
1465
|
+
var g = t.deps, y = P?.is_fork;
|
|
1466
1466
|
if (G !== null) {
|
|
1467
1467
|
var p;
|
|
1468
|
-
if (y || ht(t, j),
|
|
1469
|
-
for (
|
|
1470
|
-
|
|
1468
|
+
if (y || ht(t, j), g !== null && j > 0)
|
|
1469
|
+
for (g.length = j + G.length, p = 0; p < G.length; p++)
|
|
1470
|
+
g[j + p] = G[p];
|
|
1471
1471
|
else
|
|
1472
|
-
t.deps =
|
|
1473
|
-
if (
|
|
1474
|
-
for (p = j; p <
|
|
1475
|
-
((S =
|
|
1476
|
-
} else !y &&
|
|
1477
|
-
if (
|
|
1472
|
+
t.deps = g = G;
|
|
1473
|
+
if (di() && (t.f & Y) !== 0)
|
|
1474
|
+
for (p = j; p < g.length; p++)
|
|
1475
|
+
((S = g[p]).reactions ?? (S.reactions = [])).push(t);
|
|
1476
|
+
} else !y && g !== null && j < g.length && (ht(t, j), g.length = j);
|
|
1477
|
+
if (Wi() && U !== null && !te && g !== null && (t.f & (N | ne | H)) === 0)
|
|
1478
1478
|
for (p = 0; p < /** @type {Source[]} */
|
|
1479
1479
|
U.length; p++)
|
|
1480
|
-
|
|
1480
|
+
Cn(
|
|
1481
1481
|
U[p],
|
|
1482
1482
|
/** @type {Effect} */
|
|
1483
1483
|
t
|
|
@@ -1492,17 +1492,17 @@ function Cn(t) {
|
|
|
1492
1492
|
U !== null && (n === null ? n = U : n.push(.../** @type {Source[]} */
|
|
1493
1493
|
U));
|
|
1494
1494
|
}
|
|
1495
|
-
return (t.f &
|
|
1495
|
+
return (t.f & dt) !== 0 && (t.f ^= dt), h;
|
|
1496
1496
|
} catch (_) {
|
|
1497
|
-
return
|
|
1497
|
+
return Xi(_);
|
|
1498
1498
|
} finally {
|
|
1499
|
-
t.f ^= jt, G = e, j = i, U = n, b = r, X = s,
|
|
1499
|
+
t.f ^= jt, G = e, j = i, U = n, b = r, X = s, kt(o), te = a, Be = l;
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function Kr(t, e) {
|
|
1503
1503
|
let i = e.reactions;
|
|
1504
1504
|
if (i !== null) {
|
|
1505
|
-
var n =
|
|
1505
|
+
var n = Yn.call(i, t);
|
|
1506
1506
|
if (n !== -1) {
|
|
1507
1507
|
var r = i.length - 1;
|
|
1508
1508
|
r === 0 ? i = e.reactions = null : (i[n] = i[r], i.pop());
|
|
@@ -1516,14 +1516,14 @@ function zr(t, e) {
|
|
|
1516
1516
|
/** @type {Derived} */
|
|
1517
1517
|
e
|
|
1518
1518
|
);
|
|
1519
|
-
(s.f & Y) !== 0 && (s.f ^= Y, s.f &= ~Ve),
|
|
1519
|
+
(s.f & Y) !== 0 && (s.f ^= Y, s.f &= ~Ve), ci(s), kr(s), ht(s, 0);
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
function ht(t, e) {
|
|
1523
1523
|
var i = t.deps;
|
|
1524
1524
|
if (i !== null)
|
|
1525
1525
|
for (var n = e; n < i.length; n++)
|
|
1526
|
-
|
|
1526
|
+
Kr(t, i[n]);
|
|
1527
1527
|
}
|
|
1528
1528
|
function it(t) {
|
|
1529
1529
|
var e = t.f;
|
|
@@ -1532,17 +1532,17 @@ function it(t) {
|
|
|
1532
1532
|
var i = w, n = It;
|
|
1533
1533
|
w = t, It = !0;
|
|
1534
1534
|
try {
|
|
1535
|
-
(e & (Le |
|
|
1536
|
-
var r =
|
|
1537
|
-
t.teardown = typeof r == "function" ? r : null, t.wv =
|
|
1535
|
+
(e & (Le | oi)) !== 0 ? Gr(t) : hi(t), Tn(t);
|
|
1536
|
+
var r = $n(t);
|
|
1537
|
+
t.teardown = typeof r == "function" ? r : null, t.wv = Sn;
|
|
1538
1538
|
var s;
|
|
1539
|
-
Gt &&
|
|
1539
|
+
Gt && Tr && (t.f & H) !== 0 && t.deps;
|
|
1540
1540
|
} finally {
|
|
1541
1541
|
It = n, w = i;
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
|
-
function
|
|
1545
|
+
function m(t) {
|
|
1546
1546
|
var e = t.f, i = (e & N) !== 0;
|
|
1547
1547
|
if (b !== null && !te) {
|
|
1548
1548
|
var n = w !== null && (w.f & Ee) !== 0;
|
|
@@ -1566,40 +1566,40 @@ function g(t) {
|
|
|
1566
1566
|
);
|
|
1567
1567
|
if ($e) {
|
|
1568
1568
|
var a = o.v;
|
|
1569
|
-
return ((o.f & F) === 0 && o.reactions !== null ||
|
|
1569
|
+
return ((o.f & F) === 0 && o.reactions !== null || Ln(o)) && (a = ui(o)), Ce.set(o, a), a;
|
|
1570
1570
|
}
|
|
1571
|
-
var l = (o.f & Y) === 0 && !te && b !== null && (It || (b.f & Y) !== 0),
|
|
1572
|
-
|
|
1571
|
+
var l = (o.f & Y) === 0 && !te && b !== null && (It || (b.f & Y) !== 0), u = (o.f & Ge) === 0;
|
|
1572
|
+
mt(o) && (l && (o.f |= Y), an(o)), l && !u && (cn(o), On(o));
|
|
1573
1573
|
}
|
|
1574
1574
|
if (Z?.has(t))
|
|
1575
1575
|
return Z.get(t);
|
|
1576
|
-
if ((t.f &
|
|
1576
|
+
if ((t.f & dt) !== 0)
|
|
1577
1577
|
throw t.v;
|
|
1578
1578
|
return t.v;
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1580
|
+
function On(t) {
|
|
1581
1581
|
if (t.f |= Y, t.deps !== null)
|
|
1582
1582
|
for (const e of t.deps)
|
|
1583
|
-
(e.reactions ?? (e.reactions = [])).push(t), (e.f & N) !== 0 && (e.f & Y) === 0 && (
|
|
1583
|
+
(e.reactions ?? (e.reactions = [])).push(t), (e.f & N) !== 0 && (e.f & Y) === 0 && (cn(
|
|
1584
1584
|
/** @type {Derived} */
|
|
1585
1585
|
e
|
|
1586
|
-
),
|
|
1586
|
+
), On(
|
|
1587
1587
|
/** @type {Derived} */
|
|
1588
1588
|
e
|
|
1589
1589
|
));
|
|
1590
1590
|
}
|
|
1591
|
-
function
|
|
1591
|
+
function Ln(t) {
|
|
1592
1592
|
if (t.v === M) return !0;
|
|
1593
1593
|
if (t.deps === null) return !1;
|
|
1594
1594
|
for (const e of t.deps)
|
|
1595
|
-
if (Ce.has(e) || (e.f & N) !== 0 &&
|
|
1595
|
+
if (Ce.has(e) || (e.f & N) !== 0 && Ln(
|
|
1596
1596
|
/** @type {Derived} */
|
|
1597
1597
|
e
|
|
1598
1598
|
))
|
|
1599
1599
|
return !0;
|
|
1600
1600
|
return !1;
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1602
|
+
function pi(t) {
|
|
1603
1603
|
var e = te;
|
|
1604
1604
|
try {
|
|
1605
1605
|
return te = !0, t();
|
|
@@ -1607,9 +1607,9 @@ function hi(t) {
|
|
|
1607
1607
|
te = e;
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
|
-
const bt = /* @__PURE__ */ Symbol("events"),
|
|
1611
|
-
let
|
|
1612
|
-
function
|
|
1610
|
+
const bt = /* @__PURE__ */ Symbol("events"), Ur = /* @__PURE__ */ new Set(), $i = /* @__PURE__ */ new Set();
|
|
1611
|
+
let Oi = null;
|
|
1612
|
+
function Li(t) {
|
|
1613
1613
|
var e = this, i = (
|
|
1614
1614
|
/** @type {Node} */
|
|
1615
1615
|
e.ownerDocument
|
|
@@ -1617,8 +1617,8 @@ function Oi(t) {
|
|
|
1617
1617
|
/** @type {null | Element} */
|
|
1618
1618
|
r[0] || t.target
|
|
1619
1619
|
);
|
|
1620
|
-
|
|
1621
|
-
var o = 0, a =
|
|
1620
|
+
Oi = t;
|
|
1621
|
+
var o = 0, a = Oi === t && t[bt];
|
|
1622
1622
|
if (a) {
|
|
1623
1623
|
var l = r.indexOf(a);
|
|
1624
1624
|
if (l !== -1 && (e === document || e === /** @type {any} */
|
|
@@ -1626,10 +1626,10 @@ function Oi(t) {
|
|
|
1626
1626
|
t[bt] = e;
|
|
1627
1627
|
return;
|
|
1628
1628
|
}
|
|
1629
|
-
var
|
|
1630
|
-
if (
|
|
1629
|
+
var u = r.indexOf(e);
|
|
1630
|
+
if (u === -1)
|
|
1631
1631
|
return;
|
|
1632
|
-
l <=
|
|
1632
|
+
l <= u && (o = l);
|
|
1633
1633
|
}
|
|
1634
1634
|
if (s = /** @type {Element} */
|
|
1635
1635
|
r[o] || t.target, s !== e) {
|
|
@@ -1639,10 +1639,10 @@ function Oi(t) {
|
|
|
1639
1639
|
return s || i;
|
|
1640
1640
|
}
|
|
1641
1641
|
});
|
|
1642
|
-
var
|
|
1642
|
+
var f = b, h = w;
|
|
1643
1643
|
ce(null), Oe(null);
|
|
1644
1644
|
try {
|
|
1645
|
-
for (var
|
|
1645
|
+
for (var g, y = []; s !== null; ) {
|
|
1646
1646
|
var p = s.assignedSlot || s.parentNode || /** @type {any} */
|
|
1647
1647
|
s.host || null;
|
|
1648
1648
|
try {
|
|
@@ -1652,40 +1652,40 @@ function Oi(t) {
|
|
|
1652
1652
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1653
1653
|
t.target === s) && S.call(s, t);
|
|
1654
1654
|
} catch (_) {
|
|
1655
|
-
|
|
1655
|
+
g ? y.push(_) : g = _;
|
|
1656
1656
|
}
|
|
1657
1657
|
if (t.cancelBubble || p === e || p === null)
|
|
1658
1658
|
break;
|
|
1659
1659
|
s = p;
|
|
1660
1660
|
}
|
|
1661
|
-
if (
|
|
1661
|
+
if (g) {
|
|
1662
1662
|
for (let _ of y)
|
|
1663
1663
|
queueMicrotask(() => {
|
|
1664
1664
|
throw _;
|
|
1665
1665
|
});
|
|
1666
|
-
throw
|
|
1666
|
+
throw g;
|
|
1667
1667
|
}
|
|
1668
1668
|
} finally {
|
|
1669
|
-
t[bt] = e, delete t.currentTarget, ce(
|
|
1669
|
+
t[bt] = e, delete t.currentTarget, ce(f), Oe(h);
|
|
1670
1670
|
}
|
|
1671
1671
|
}
|
|
1672
1672
|
}
|
|
1673
|
-
const
|
|
1673
|
+
const Wr = (
|
|
1674
1674
|
// We gotta write it like this because after downleveling the pure comment may end up in the wrong location
|
|
1675
1675
|
globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
|
|
1676
1676
|
/** @param {string} html */
|
|
1677
1677
|
createHTML: (t) => t
|
|
1678
1678
|
})
|
|
1679
1679
|
);
|
|
1680
|
-
function
|
|
1680
|
+
function Yr(t) {
|
|
1681
1681
|
return (
|
|
1682
1682
|
/** @type {string} */
|
|
1683
|
-
|
|
1683
|
+
Wr?.createHTML(t) ?? t
|
|
1684
1684
|
);
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1687
|
-
var e =
|
|
1688
|
-
return e.innerHTML =
|
|
1686
|
+
function Xr(t) {
|
|
1687
|
+
var e = bn("template");
|
|
1688
|
+
return e.innerHTML = Yr(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1689
1689
|
}
|
|
1690
1690
|
function Zt(t, e) {
|
|
1691
1691
|
var i = (
|
|
@@ -1695,27 +1695,27 @@ function Zt(t, e) {
|
|
|
1695
1695
|
i.nodes === null && (i.nodes = { start: t, end: e, a: null, t: null });
|
|
1696
1696
|
}
|
|
1697
1697
|
// @__NO_SIDE_EFFECTS__
|
|
1698
|
-
function
|
|
1699
|
-
var i = (e &
|
|
1698
|
+
function Qr(t, e) {
|
|
1699
|
+
var i = (e & Kn) !== 0, n, r = !t.startsWith("<!>");
|
|
1700
1700
|
return () => {
|
|
1701
1701
|
if (ee)
|
|
1702
1702
|
return Zt(D, null), D;
|
|
1703
|
-
n === void 0 && (n =
|
|
1704
|
-
/* @__PURE__ */
|
|
1703
|
+
n === void 0 && (n = Xr(r ? t : "<!>" + t), n = /** @type {TemplateNode} */
|
|
1704
|
+
/* @__PURE__ */ vn(n));
|
|
1705
1705
|
var s = (
|
|
1706
1706
|
/** @type {TemplateNode} */
|
|
1707
|
-
i ||
|
|
1707
|
+
i || hn ? document.importNode(n, !0) : n.cloneNode(!0)
|
|
1708
1708
|
);
|
|
1709
1709
|
return Zt(s, s), s;
|
|
1710
1710
|
};
|
|
1711
1711
|
}
|
|
1712
|
-
function
|
|
1712
|
+
function Rn(t, e) {
|
|
1713
1713
|
if (ee) {
|
|
1714
1714
|
var i = (
|
|
1715
1715
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1716
1716
|
w
|
|
1717
1717
|
);
|
|
1718
|
-
((i.f & Ge) === 0 || i.nodes.end === null) && (i.nodes.end = D),
|
|
1718
|
+
((i.f & Ge) === 0 || i.nodes.end === null) && (i.nodes.end = D), ji();
|
|
1719
1719
|
return;
|
|
1720
1720
|
}
|
|
1721
1721
|
t !== null && t.before(
|
|
@@ -1723,52 +1723,52 @@ function Ln(t, e) {
|
|
|
1723
1723
|
e
|
|
1724
1724
|
);
|
|
1725
1725
|
}
|
|
1726
|
-
const
|
|
1727
|
-
function
|
|
1728
|
-
return
|
|
1726
|
+
const Jr = ["touchstart", "touchmove"];
|
|
1727
|
+
function Zr(t) {
|
|
1728
|
+
return Jr.includes(t);
|
|
1729
1729
|
}
|
|
1730
1730
|
function kn(t, e) {
|
|
1731
|
-
return
|
|
1731
|
+
return Pn(t, e);
|
|
1732
1732
|
}
|
|
1733
|
-
function
|
|
1733
|
+
function es(t, e) {
|
|
1734
1734
|
Jt(), e.intro = e.intro ?? !1;
|
|
1735
1735
|
const i = e.target, n = ee, r = D;
|
|
1736
1736
|
try {
|
|
1737
|
-
for (var s = /* @__PURE__ */
|
|
1738
|
-
s.data !==
|
|
1737
|
+
for (var s = /* @__PURE__ */ vn(i); s && (s.nodeType !== ai || /** @type {Comment} */
|
|
1738
|
+
s.data !== Di); )
|
|
1739
1739
|
s = /* @__PURE__ */ st(s);
|
|
1740
1740
|
if (!s)
|
|
1741
1741
|
throw Ct;
|
|
1742
|
-
|
|
1742
|
+
gt(!0), ft(
|
|
1743
1743
|
/** @type {Comment} */
|
|
1744
1744
|
s
|
|
1745
1745
|
);
|
|
1746
|
-
const o =
|
|
1747
|
-
return
|
|
1746
|
+
const o = Pn(t, { ...e, anchor: s });
|
|
1747
|
+
return gt(!1), /** @type {Exports} */
|
|
1748
1748
|
o;
|
|
1749
1749
|
} catch (o) {
|
|
1750
1750
|
if (o instanceof Error && o.message.split(`
|
|
1751
1751
|
`).some((a) => a.startsWith("https://svelte.dev/e/")))
|
|
1752
1752
|
throw o;
|
|
1753
|
-
return o !== Ct && console.warn("Failed to hydrate: ", o), e.recover === !1 &&
|
|
1753
|
+
return o !== Ct && console.warn("Failed to hydrate: ", o), e.recover === !1 && dr(), Jt(), Nr(i), gt(!1), kn(t, e);
|
|
1754
1754
|
} finally {
|
|
1755
|
-
|
|
1755
|
+
gt(n), ft(r);
|
|
1756
1756
|
}
|
|
1757
1757
|
}
|
|
1758
1758
|
const yt = /* @__PURE__ */ new Map();
|
|
1759
|
-
function
|
|
1759
|
+
function Pn(t, { target: e, anchor: i, props: n = {}, events: r, context: s, intro: o = !0, transformError: a }) {
|
|
1760
1760
|
Jt();
|
|
1761
|
-
var l = void 0,
|
|
1762
|
-
var
|
|
1763
|
-
|
|
1761
|
+
var l = void 0, u = Dr(() => {
|
|
1762
|
+
var f = i ?? e.appendChild(gn());
|
|
1763
|
+
$r(
|
|
1764
1764
|
/** @type {TemplateNode} */
|
|
1765
|
-
|
|
1765
|
+
f,
|
|
1766
1766
|
{
|
|
1767
1767
|
pending: () => {
|
|
1768
1768
|
}
|
|
1769
1769
|
},
|
|
1770
1770
|
(y) => {
|
|
1771
|
-
|
|
1771
|
+
Ki({});
|
|
1772
1772
|
var p = (
|
|
1773
1773
|
/** @type {ComponentContext} */
|
|
1774
1774
|
Q
|
|
@@ -1777,29 +1777,29 @@ function Rn(t, { target: e, anchor: i, props: n = {}, events: r, context: s, int
|
|
|
1777
1777
|
/** @type {TemplateNode} */
|
|
1778
1778
|
y,
|
|
1779
1779
|
null
|
|
1780
|
-
), l = t(y, n) || {}, ee && (w.nodes.end = D, D === null || D.nodeType !==
|
|
1781
|
-
D.data !==
|
|
1782
|
-
throw
|
|
1783
|
-
|
|
1780
|
+
), l = t(y, n) || {}, ee && (w.nodes.end = D, D === null || D.nodeType !== ai || /** @type {Comment} */
|
|
1781
|
+
D.data !== Vi))
|
|
1782
|
+
throw zi(), Ct;
|
|
1783
|
+
Ui();
|
|
1784
1784
|
},
|
|
1785
1785
|
a
|
|
1786
1786
|
);
|
|
1787
|
-
var h = /* @__PURE__ */ new Set(),
|
|
1787
|
+
var h = /* @__PURE__ */ new Set(), g = (y) => {
|
|
1788
1788
|
for (var p = 0; p < y.length; p++) {
|
|
1789
1789
|
var S = y[p];
|
|
1790
1790
|
if (!h.has(S)) {
|
|
1791
1791
|
h.add(S);
|
|
1792
|
-
var _ =
|
|
1792
|
+
var _ = Zr(S);
|
|
1793
1793
|
for (const ot of [e, document]) {
|
|
1794
|
-
var
|
|
1795
|
-
|
|
1796
|
-
var re =
|
|
1797
|
-
re === void 0 ? (ot.addEventListener(S,
|
|
1794
|
+
var R = yt.get(ot);
|
|
1795
|
+
R === void 0 && (R = /* @__PURE__ */ new Map(), yt.set(ot, R));
|
|
1796
|
+
var re = R.get(S);
|
|
1797
|
+
re === void 0 ? (ot.addEventListener(S, Li, { passive: _ }), R.set(S, 1)) : R.set(S, re + 1);
|
|
1798
1798
|
}
|
|
1799
1799
|
}
|
|
1800
1800
|
}
|
|
1801
1801
|
};
|
|
1802
|
-
return
|
|
1802
|
+
return g(Xn(Ur)), $i.add(g), () => {
|
|
1803
1803
|
for (var y of h)
|
|
1804
1804
|
for (const _ of [e, document]) {
|
|
1805
1805
|
var p = (
|
|
@@ -1809,40 +1809,40 @@ function Rn(t, { target: e, anchor: i, props: n = {}, events: r, context: s, int
|
|
|
1809
1809
|
/** @type {number} */
|
|
1810
1810
|
p.get(y)
|
|
1811
1811
|
);
|
|
1812
|
-
--S == 0 ? (_.removeEventListener(y,
|
|
1812
|
+
--S == 0 ? (_.removeEventListener(y, Li), p.delete(y), p.size === 0 && yt.delete(_)) : p.set(y, S);
|
|
1813
1813
|
}
|
|
1814
|
-
|
|
1814
|
+
$i.delete(g), f !== i && f.parentNode?.removeChild(f);
|
|
1815
1815
|
};
|
|
1816
1816
|
});
|
|
1817
|
-
return ei.set(l,
|
|
1817
|
+
return ei.set(l, u), l;
|
|
1818
1818
|
}
|
|
1819
1819
|
let ei = /* @__PURE__ */ new WeakMap();
|
|
1820
|
-
function
|
|
1820
|
+
function ts(t, e) {
|
|
1821
1821
|
const i = ei.get(t);
|
|
1822
1822
|
return i ? (ei.delete(t), i(e)) : Promise.resolve();
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1825
|
-
Q === null &&
|
|
1826
|
-
const e =
|
|
1824
|
+
function is(t) {
|
|
1825
|
+
Q === null && or(), Pe(() => {
|
|
1826
|
+
const e = pi(t);
|
|
1827
1827
|
if (typeof e == "function") return (
|
|
1828
1828
|
/** @type {() => void} */
|
|
1829
1829
|
e
|
|
1830
1830
|
);
|
|
1831
1831
|
});
|
|
1832
1832
|
}
|
|
1833
|
-
function
|
|
1833
|
+
function Ri(t, e) {
|
|
1834
1834
|
return t === e || t?.[_t] === e;
|
|
1835
1835
|
}
|
|
1836
|
-
function
|
|
1837
|
-
return
|
|
1836
|
+
function ns(t = {}, e, i, n) {
|
|
1837
|
+
return Br(() => {
|
|
1838
1838
|
var r, s;
|
|
1839
1839
|
return fi(() => {
|
|
1840
|
-
r = s, s = [],
|
|
1841
|
-
t !== i(...s) && (e(t, ...s), r &&
|
|
1840
|
+
r = s, s = [], pi(() => {
|
|
1841
|
+
t !== i(...s) && (e(t, ...s), r && Ri(i(...r), t) && e(null, ...r));
|
|
1842
1842
|
});
|
|
1843
1843
|
}), () => {
|
|
1844
1844
|
De(() => {
|
|
1845
|
-
s &&
|
|
1845
|
+
s && Ri(i(...s), t) && e(null, ...s);
|
|
1846
1846
|
});
|
|
1847
1847
|
};
|
|
1848
1848
|
}), t;
|
|
@@ -1857,32 +1857,32 @@ function _e(t, e, i, n) {
|
|
|
1857
1857
|
t[e], a === void 0 && n !== void 0 && (a = o());
|
|
1858
1858
|
var l;
|
|
1859
1859
|
l = () => {
|
|
1860
|
-
var
|
|
1860
|
+
var g = (
|
|
1861
1861
|
/** @type {V} */
|
|
1862
1862
|
t[e]
|
|
1863
1863
|
);
|
|
1864
|
-
return
|
|
1864
|
+
return g === void 0 ? o() : (s = !0, g);
|
|
1865
1865
|
};
|
|
1866
|
-
var
|
|
1866
|
+
var u = !1, f = /* @__PURE__ */ ln(() => (u = !1, l())), h = (
|
|
1867
1867
|
/** @type {Effect} */
|
|
1868
1868
|
w
|
|
1869
1869
|
);
|
|
1870
1870
|
return (
|
|
1871
1871
|
/** @type {() => V} */
|
|
1872
|
-
(function(
|
|
1872
|
+
(function(g, y) {
|
|
1873
1873
|
if (arguments.length > 0) {
|
|
1874
|
-
const p = y ?
|
|
1875
|
-
return C(
|
|
1874
|
+
const p = y ? m(f) : g;
|
|
1875
|
+
return C(f, p), u = !0, r !== void 0 && (r = p), g;
|
|
1876
1876
|
}
|
|
1877
|
-
return $e &&
|
|
1877
|
+
return $e && u || (h.f & Ee) !== 0 ? f.v : m(f);
|
|
1878
1878
|
})
|
|
1879
1879
|
);
|
|
1880
1880
|
}
|
|
1881
|
-
function
|
|
1882
|
-
return new
|
|
1881
|
+
function rs(t) {
|
|
1882
|
+
return new ss(t);
|
|
1883
1883
|
}
|
|
1884
|
-
var
|
|
1885
|
-
class
|
|
1884
|
+
var me, W;
|
|
1885
|
+
class ss {
|
|
1886
1886
|
/**
|
|
1887
1887
|
* @param {ComponentConstructorOptions & {
|
|
1888
1888
|
* component: any;
|
|
@@ -1890,28 +1890,28 @@ class is {
|
|
|
1890
1890
|
*/
|
|
1891
1891
|
constructor(e) {
|
|
1892
1892
|
/** @type {any} */
|
|
1893
|
-
T(this,
|
|
1893
|
+
T(this, me);
|
|
1894
1894
|
/** @type {Record<string, any>} */
|
|
1895
1895
|
T(this, W);
|
|
1896
1896
|
var i = /* @__PURE__ */ new Map(), n = (s, o) => {
|
|
1897
|
-
var a = /* @__PURE__ */
|
|
1897
|
+
var a = /* @__PURE__ */ Pr(o, !1, !1);
|
|
1898
1898
|
return i.set(s, a), a;
|
|
1899
1899
|
};
|
|
1900
1900
|
const r = new Proxy(
|
|
1901
1901
|
{ ...e.props || {}, $$events: {} },
|
|
1902
1902
|
{
|
|
1903
1903
|
get(s, o) {
|
|
1904
|
-
return
|
|
1904
|
+
return m(i.get(o) ?? n(o, Reflect.get(s, o)));
|
|
1905
1905
|
},
|
|
1906
1906
|
has(s, o) {
|
|
1907
|
-
return o ===
|
|
1907
|
+
return o === sr ? !0 : (m(i.get(o) ?? n(o, Reflect.get(s, o))), Reflect.has(s, o));
|
|
1908
1908
|
},
|
|
1909
1909
|
set(s, o, a) {
|
|
1910
1910
|
return C(i.get(o) ?? n(o, a), a), Reflect.set(s, o, a);
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
1913
|
);
|
|
1914
|
-
v(this, W, (e.hydrate ?
|
|
1914
|
+
v(this, W, (e.hydrate ? es : kn)(e.component, {
|
|
1915
1915
|
target: e.target,
|
|
1916
1916
|
anchor: e.anchor,
|
|
1917
1917
|
props: r,
|
|
@@ -1919,7 +1919,7 @@ class is {
|
|
|
1919
1919
|
intro: e.intro ?? !1,
|
|
1920
1920
|
recover: e.recover,
|
|
1921
1921
|
transformError: e.transformError
|
|
1922
|
-
})), (!e?.props?.$$host || e.sync === !1) &&
|
|
1922
|
+
})), (!e?.props?.$$host || e.sync === !1) && de(), v(this, me, r.$$events);
|
|
1923
1923
|
for (const s of Object.keys(c(this, W)))
|
|
1924
1924
|
s === "$set" || s === "$destroy" || s === "$on" || Ot(this, s, {
|
|
1925
1925
|
get() {
|
|
@@ -1935,7 +1935,7 @@ class is {
|
|
|
1935
1935
|
(s) => {
|
|
1936
1936
|
Object.assign(r, s);
|
|
1937
1937
|
}, c(this, W).$destroy = () => {
|
|
1938
|
-
|
|
1938
|
+
ts(c(this, W));
|
|
1939
1939
|
};
|
|
1940
1940
|
}
|
|
1941
1941
|
/** @param {Record<string, any>} props */
|
|
@@ -1948,10 +1948,10 @@ class is {
|
|
|
1948
1948
|
* @returns {any}
|
|
1949
1949
|
*/
|
|
1950
1950
|
$on(e, i) {
|
|
1951
|
-
c(this,
|
|
1951
|
+
c(this, me)[e] = c(this, me)[e] || [];
|
|
1952
1952
|
const n = (...r) => i.call(this, ...r);
|
|
1953
|
-
return c(this,
|
|
1954
|
-
c(this,
|
|
1953
|
+
return c(this, me)[e].push(n), () => {
|
|
1954
|
+
c(this, me)[e] = c(this, me)[e].filter(
|
|
1955
1955
|
/** @param {any} fn */
|
|
1956
1956
|
(r) => r !== n
|
|
1957
1957
|
);
|
|
@@ -1961,9 +1961,9 @@ class is {
|
|
|
1961
1961
|
c(this, W).$destroy();
|
|
1962
1962
|
}
|
|
1963
1963
|
}
|
|
1964
|
-
|
|
1965
|
-
let
|
|
1966
|
-
typeof HTMLElement == "function" && (
|
|
1964
|
+
me = new WeakMap(), W = new WeakMap();
|
|
1965
|
+
let Hn;
|
|
1966
|
+
typeof HTMLElement == "function" && (Hn = class extends HTMLElement {
|
|
1967
1967
|
/**
|
|
1968
1968
|
* @param {*} $$componentCtor
|
|
1969
1969
|
* @param {*} $$slots
|
|
@@ -1972,27 +1972,27 @@ typeof HTMLElement == "function" && (Pn = class extends HTMLElement {
|
|
|
1972
1972
|
constructor(e, i, n) {
|
|
1973
1973
|
super();
|
|
1974
1974
|
/** The Svelte component constructor */
|
|
1975
|
-
|
|
1975
|
+
d(this, "$$ctor");
|
|
1976
1976
|
/** Slots */
|
|
1977
|
-
|
|
1977
|
+
d(this, "$$s");
|
|
1978
1978
|
/** @type {any} The Svelte component instance */
|
|
1979
|
-
|
|
1979
|
+
d(this, "$$c");
|
|
1980
1980
|
/** Whether or not the custom element is connected */
|
|
1981
|
-
|
|
1981
|
+
d(this, "$$cn", !1);
|
|
1982
1982
|
/** @type {Record<string, any>} Component props data */
|
|
1983
|
-
|
|
1983
|
+
d(this, "$$d", {});
|
|
1984
1984
|
/** `true` if currently in the process of reflecting component props back to attributes */
|
|
1985
|
-
|
|
1985
|
+
d(this, "$$r", !1);
|
|
1986
1986
|
/** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
|
|
1987
|
-
|
|
1987
|
+
d(this, "$$p_d", {});
|
|
1988
1988
|
/** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
|
|
1989
|
-
|
|
1989
|
+
d(this, "$$l", {});
|
|
1990
1990
|
/** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
|
|
1991
|
-
|
|
1991
|
+
d(this, "$$l_u", /* @__PURE__ */ new Map());
|
|
1992
1992
|
/** @type {any} The managed render effect for reflecting attributes */
|
|
1993
|
-
|
|
1993
|
+
d(this, "$$me");
|
|
1994
1994
|
/** @type {ShadowRoot | null} The ShadowRoot of the custom element */
|
|
1995
|
-
|
|
1995
|
+
d(this, "$$shadowRoot", null);
|
|
1996
1996
|
this.$$ctor = e, this.$$s = i, n && (this.$$shadowRoot = this.attachShadow(n));
|
|
1997
1997
|
}
|
|
1998
1998
|
/**
|
|
@@ -2022,13 +2022,13 @@ typeof HTMLElement == "function" && (Pn = class extends HTMLElement {
|
|
|
2022
2022
|
if (this.$$cn = !0, !this.$$c) {
|
|
2023
2023
|
let e = function(r) {
|
|
2024
2024
|
return (s) => {
|
|
2025
|
-
const o =
|
|
2026
|
-
r !== "default" && (o.name = r),
|
|
2025
|
+
const o = bn("slot");
|
|
2026
|
+
r !== "default" && (o.name = r), Rn(s, o);
|
|
2027
2027
|
};
|
|
2028
2028
|
};
|
|
2029
2029
|
if (await Promise.resolve(), !this.$$cn || this.$$c)
|
|
2030
2030
|
return;
|
|
2031
|
-
const i = {}, n =
|
|
2031
|
+
const i = {}, n = os(this);
|
|
2032
2032
|
for (const r of this.$$s)
|
|
2033
2033
|
r in n && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), i.default = !0) : i[r] = e(r));
|
|
2034
2034
|
for (const r of this.attributes) {
|
|
@@ -2037,7 +2037,7 @@ typeof HTMLElement == "function" && (Pn = class extends HTMLElement {
|
|
|
2037
2037
|
}
|
|
2038
2038
|
for (const r in this.$$p_d)
|
|
2039
2039
|
!(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
|
|
2040
|
-
this.$$c =
|
|
2040
|
+
this.$$c = rs({
|
|
2041
2041
|
component: this.$$ctor,
|
|
2042
2042
|
target: this.$$shadowRoot || this,
|
|
2043
2043
|
props: {
|
|
@@ -2045,7 +2045,7 @@ typeof HTMLElement == "function" && (Pn = class extends HTMLElement {
|
|
|
2045
2045
|
$$slots: i,
|
|
2046
2046
|
$$host: this
|
|
2047
2047
|
}
|
|
2048
|
-
}), this.$$me =
|
|
2048
|
+
}), this.$$me = xr(() => {
|
|
2049
2049
|
fi(() => {
|
|
2050
2050
|
this.$$r = !0;
|
|
2051
2051
|
for (const r of $t(this.$$c)) {
|
|
@@ -2124,7 +2124,7 @@ function St(t, e, i, n) {
|
|
|
2124
2124
|
return e;
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
|
-
function
|
|
2127
|
+
function os(t) {
|
|
2128
2128
|
const e = {};
|
|
2129
2129
|
return t.childNodes.forEach((i) => {
|
|
2130
2130
|
e[
|
|
@@ -2133,8 +2133,8 @@ function ns(t) {
|
|
|
2133
2133
|
] = !0;
|
|
2134
2134
|
}), e;
|
|
2135
2135
|
}
|
|
2136
|
-
function
|
|
2137
|
-
let o = class extends
|
|
2136
|
+
function ls(t, e, i, n, r, s) {
|
|
2137
|
+
let o = class extends Hn {
|
|
2138
2138
|
constructor() {
|
|
2139
2139
|
super(t, i, r), this.$$p_d = e;
|
|
2140
2140
|
}
|
|
@@ -2151,10 +2151,10 @@ function rs(t, e, i, n, r, s) {
|
|
|
2151
2151
|
},
|
|
2152
2152
|
set(l) {
|
|
2153
2153
|
l = St(a, l, e), this.$$d[a] = l;
|
|
2154
|
-
var
|
|
2155
|
-
if (
|
|
2156
|
-
var
|
|
2157
|
-
|
|
2154
|
+
var u = this.$$c;
|
|
2155
|
+
if (u) {
|
|
2156
|
+
var f = qe(u, a)?.get;
|
|
2157
|
+
f ? u[a] = l : u.$set({ [a]: l });
|
|
2158
2158
|
}
|
|
2159
2159
|
}
|
|
2160
2160
|
});
|
|
@@ -2167,26 +2167,26 @@ function rs(t, e, i, n, r, s) {
|
|
|
2167
2167
|
}), t.element = /** @type {any} */
|
|
2168
2168
|
o, o;
|
|
2169
2169
|
}
|
|
2170
|
-
class
|
|
2170
|
+
class as extends Event {
|
|
2171
2171
|
constructor(i, n, r, s) {
|
|
2172
2172
|
super("context-request", { bubbles: !0, composed: !0 });
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2173
|
+
d(this, "context");
|
|
2174
|
+
d(this, "contextTarget");
|
|
2175
|
+
d(this, "callback");
|
|
2176
|
+
d(this, "subscribe");
|
|
2177
2177
|
this.context = i, this.contextTarget = n, this.callback = r, this.subscribe = s ?? !1;
|
|
2178
2178
|
}
|
|
2179
2179
|
}
|
|
2180
|
-
class
|
|
2180
|
+
class cs {
|
|
2181
2181
|
constructor(e, i) {
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2182
|
+
d(this, "host");
|
|
2183
|
+
d(this, "context");
|
|
2184
|
+
d(this, "subscribe");
|
|
2185
|
+
d(this, "onValue");
|
|
2186
|
+
d(this, "isConnected", !1);
|
|
2187
|
+
d(this, "unsubscribe");
|
|
2188
|
+
d(this, "currentValue");
|
|
2189
|
+
d(this, "handleValue", (e, i) => {
|
|
2190
2190
|
i !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = i), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = e, this.onValue?.(e);
|
|
2191
2191
|
});
|
|
2192
2192
|
this.host = e, this.context = i.context, this.subscribe = i.subscribe ?? !0, this.onValue = i.onValue;
|
|
@@ -2201,22 +2201,22 @@ class os {
|
|
|
2201
2201
|
return this.currentValue;
|
|
2202
2202
|
}
|
|
2203
2203
|
requestValue() {
|
|
2204
|
-
this.host.dispatchEvent(new
|
|
2204
|
+
this.host.dispatchEvent(new as(this.context, this.host, this.handleValue, this.subscribe));
|
|
2205
2205
|
}
|
|
2206
2206
|
}
|
|
2207
|
-
const
|
|
2208
|
-
function
|
|
2207
|
+
const Nn = (t) => t, us = Nn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), ds = Nn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext"));
|
|
2208
|
+
function Mn(t, e, i) {
|
|
2209
2209
|
let n = !1;
|
|
2210
|
-
const r = new
|
|
2210
|
+
const r = new cs(t, {
|
|
2211
2211
|
context: e,
|
|
2212
2212
|
subscribe: !0,
|
|
2213
|
-
onValue: (
|
|
2214
|
-
n = !0, i(
|
|
2213
|
+
onValue: (u) => {
|
|
2214
|
+
n = !0, i(u);
|
|
2215
2215
|
}
|
|
2216
2216
|
});
|
|
2217
2217
|
r.connect();
|
|
2218
|
-
const s = (
|
|
2219
|
-
|
|
2218
|
+
const s = (u) => {
|
|
2219
|
+
u.context === e && r.requestValue();
|
|
2220
2220
|
};
|
|
2221
2221
|
t.addEventListener("context-provider", s);
|
|
2222
2222
|
let o = 0;
|
|
@@ -2231,35 +2231,35 @@ function Nn(t, e, i) {
|
|
|
2231
2231
|
globalThis.clearInterval(l), t.removeEventListener("context-provider", s), r.disconnect();
|
|
2232
2232
|
};
|
|
2233
2233
|
}
|
|
2234
|
-
function
|
|
2235
|
-
return
|
|
2234
|
+
function fs(t, e) {
|
|
2235
|
+
return Mn(t, us, e);
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2238
|
-
return
|
|
2237
|
+
function hs(t, e) {
|
|
2238
|
+
return Mn(t, ds, e);
|
|
2239
2239
|
}
|
|
2240
|
-
function
|
|
2241
|
-
return
|
|
2240
|
+
function ps(t, e) {
|
|
2241
|
+
return fs(t, e);
|
|
2242
2242
|
}
|
|
2243
|
-
function
|
|
2244
|
-
return
|
|
2243
|
+
function ms(t, e) {
|
|
2244
|
+
return hs(t, e);
|
|
2245
2245
|
}
|
|
2246
2246
|
var ki;
|
|
2247
2247
|
(function(t) {
|
|
2248
2248
|
t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
|
|
2249
2249
|
})(ki || (ki = {}));
|
|
2250
|
-
var
|
|
2250
|
+
var Pi;
|
|
2251
2251
|
(function(t) {
|
|
2252
2252
|
t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
|
|
2253
|
-
})(
|
|
2254
|
-
const
|
|
2253
|
+
})(Pi || (Pi = {}));
|
|
2254
|
+
const gs = {
|
|
2255
2255
|
tts: "textToSpeech",
|
|
2256
2256
|
colorScheme: "theme"
|
|
2257
2257
|
};
|
|
2258
|
-
function
|
|
2258
|
+
function vs(t) {
|
|
2259
2259
|
const e = t.trim();
|
|
2260
|
-
return e ?
|
|
2260
|
+
return e ? gs[e] || e : "";
|
|
2261
2261
|
}
|
|
2262
|
-
const
|
|
2262
|
+
const bs = [
|
|
2263
2263
|
"assessment",
|
|
2264
2264
|
"section",
|
|
2265
2265
|
"item",
|
|
@@ -2271,12 +2271,12 @@ function Et(t, e) {
|
|
|
2271
2271
|
if (typeof t != "string" || t.trim().length === 0)
|
|
2272
2272
|
throw new Error(`Invalid tool registration: "${e}" must be a non-empty string.`);
|
|
2273
2273
|
}
|
|
2274
|
-
function
|
|
2274
|
+
function Hi(t) {
|
|
2275
2275
|
if (Et(t.toolId, "toolId"), Et(t.name, "name"), Et(t.description, "description"), typeof t.icon != "string" && typeof t.icon != "function")
|
|
2276
2276
|
throw new Error(`Invalid tool registration "${t.toolId}": "icon" must be a string or function.`);
|
|
2277
2277
|
if (!Array.isArray(t.supportedLevels) || t.supportedLevels.length === 0)
|
|
2278
2278
|
throw new Error(`Invalid tool registration "${t.toolId}": "supportedLevels" must be a non-empty array.`);
|
|
2279
|
-
const e = t.supportedLevels.find((i) => !
|
|
2279
|
+
const e = t.supportedLevels.find((i) => !bs.includes(i));
|
|
2280
2280
|
if (e)
|
|
2281
2281
|
throw new Error(`Invalid tool registration "${t.toolId}": unsupported level "${e}".`);
|
|
2282
2282
|
if (t.activation !== void 0 && t.activation !== "toolbar-toggle" && t.activation !== "selection-gateway")
|
|
@@ -2292,21 +2292,21 @@ function Pi(t) {
|
|
|
2292
2292
|
if (typeof t.renderToolbar != "function")
|
|
2293
2293
|
throw new Error(`Invalid tool registration "${t.toolId}": "renderToolbar" must be a function.`);
|
|
2294
2294
|
}
|
|
2295
|
-
class
|
|
2295
|
+
class ys {
|
|
2296
2296
|
constructor() {
|
|
2297
|
-
|
|
2298
|
-
|
|
2297
|
+
d(this, "tools", /* @__PURE__ */ new Map());
|
|
2298
|
+
d(this, "pnpIndex", /* @__PURE__ */ new Map());
|
|
2299
2299
|
// pnpSupportId → Set<toolId>
|
|
2300
|
-
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2300
|
+
d(this, "componentOverrides", {});
|
|
2301
|
+
d(this, "moduleLoaders", /* @__PURE__ */ new Map());
|
|
2302
|
+
d(this, "loadedToolModules", /* @__PURE__ */ new Set());
|
|
2303
|
+
d(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
|
|
2304
2304
|
}
|
|
2305
2305
|
/**
|
|
2306
2306
|
* Normalize a single tool alias to canonical toolId.
|
|
2307
2307
|
*/
|
|
2308
2308
|
normalizeToolId(e) {
|
|
2309
|
-
return
|
|
2309
|
+
return vs(e);
|
|
2310
2310
|
}
|
|
2311
2311
|
/**
|
|
2312
2312
|
* Normalize a list of tool aliases to canonical toolIds.
|
|
@@ -2321,7 +2321,7 @@ class ms {
|
|
|
2321
2321
|
* @throws Error if toolId is already registered
|
|
2322
2322
|
*/
|
|
2323
2323
|
register(e) {
|
|
2324
|
-
if (
|
|
2324
|
+
if (Hi(e), this.tools.has(e.toolId))
|
|
2325
2325
|
throw new Error(`Tool '${e.toolId}' is already registered`);
|
|
2326
2326
|
if (this.tools.set(e.toolId, e), e.pnpSupportIds)
|
|
2327
2327
|
for (const i of e.pnpSupportIds)
|
|
@@ -2333,7 +2333,7 @@ class ms {
|
|
|
2333
2333
|
* @param registration - New tool registration (must have existing toolId)
|
|
2334
2334
|
*/
|
|
2335
2335
|
override(e) {
|
|
2336
|
-
if (
|
|
2336
|
+
if (Hi(e), !this.tools.has(e.toolId))
|
|
2337
2337
|
throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
|
|
2338
2338
|
const i = this.tools.get(e.toolId);
|
|
2339
2339
|
if (i.pnpSupportIds)
|
|
@@ -2566,20 +2566,20 @@ class ms {
|
|
|
2566
2566
|
return r.renderToolbar(i, s);
|
|
2567
2567
|
}
|
|
2568
2568
|
}
|
|
2569
|
-
function
|
|
2569
|
+
function Fn(t) {
|
|
2570
2570
|
return t.level === "item";
|
|
2571
2571
|
}
|
|
2572
|
-
function
|
|
2572
|
+
function _s(t) {
|
|
2573
2573
|
return t.level === "passage";
|
|
2574
2574
|
}
|
|
2575
|
-
function
|
|
2575
|
+
function Ts(t) {
|
|
2576
2576
|
return t.level === "rubric";
|
|
2577
2577
|
}
|
|
2578
|
-
function
|
|
2578
|
+
function xn(t) {
|
|
2579
2579
|
return t.level === "element";
|
|
2580
2580
|
}
|
|
2581
|
-
function
|
|
2582
|
-
if (
|
|
2581
|
+
function mi(t) {
|
|
2582
|
+
if (xn(t)) {
|
|
2583
2583
|
const e = t.item.config;
|
|
2584
2584
|
if (!e)
|
|
2585
2585
|
return "";
|
|
@@ -2589,15 +2589,15 @@ function pi(t) {
|
|
|
2589
2589
|
if (a) {
|
|
2590
2590
|
for (const l of Object.values(a))
|
|
2591
2591
|
if (typeof l == "string" && i.push(n(l)), Array.isArray(l)) {
|
|
2592
|
-
for (const
|
|
2593
|
-
if (
|
|
2594
|
-
for (const
|
|
2595
|
-
typeof
|
|
2592
|
+
for (const u of l)
|
|
2593
|
+
if (u && typeof u == "object")
|
|
2594
|
+
for (const f of Object.values(u))
|
|
2595
|
+
typeof f == "string" && i.push(n(f));
|
|
2596
2596
|
}
|
|
2597
2597
|
}
|
|
2598
2598
|
return i.filter(Boolean).join(" ").trim();
|
|
2599
2599
|
}
|
|
2600
|
-
if (
|
|
2600
|
+
if (Fn(t)) {
|
|
2601
2601
|
const e = t.item;
|
|
2602
2602
|
if (!e?.config)
|
|
2603
2603
|
return "";
|
|
@@ -2610,17 +2610,17 @@ function pi(t) {
|
|
|
2610
2610
|
const o = i.models, a = Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : [];
|
|
2611
2611
|
for (const l of a)
|
|
2612
2612
|
if (!(!l || typeof l != "object")) {
|
|
2613
|
-
for (const
|
|
2614
|
-
if (typeof
|
|
2615
|
-
for (const
|
|
2616
|
-
if (
|
|
2617
|
-
for (const h of Object.values(
|
|
2613
|
+
for (const u of Object.values(l))
|
|
2614
|
+
if (typeof u == "string" && n.push(r(u)), Array.isArray(u)) {
|
|
2615
|
+
for (const f of u)
|
|
2616
|
+
if (f && typeof f == "object")
|
|
2617
|
+
for (const h of Object.values(f))
|
|
2618
2618
|
typeof h == "string" && n.push(r(h));
|
|
2619
2619
|
}
|
|
2620
2620
|
}
|
|
2621
2621
|
return n.filter(Boolean).join(" ").trim();
|
|
2622
2622
|
}
|
|
2623
|
-
if (
|
|
2623
|
+
if (_s(t)) {
|
|
2624
2624
|
const e = t.passage;
|
|
2625
2625
|
if (!e?.config)
|
|
2626
2626
|
return "";
|
|
@@ -2633,24 +2633,24 @@ function pi(t) {
|
|
|
2633
2633
|
const o = i.models, a = Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : [];
|
|
2634
2634
|
for (const l of a)
|
|
2635
2635
|
if (!(!l || typeof l != "object")) {
|
|
2636
|
-
for (const
|
|
2637
|
-
if (typeof
|
|
2638
|
-
for (const
|
|
2639
|
-
if (
|
|
2640
|
-
for (const h of Object.values(
|
|
2636
|
+
for (const u of Object.values(l))
|
|
2637
|
+
if (typeof u == "string" && n.push(r(u)), Array.isArray(u)) {
|
|
2638
|
+
for (const f of u)
|
|
2639
|
+
if (f && typeof f == "object")
|
|
2640
|
+
for (const h of Object.values(f))
|
|
2641
2641
|
typeof h == "string" && n.push(r(h));
|
|
2642
2642
|
}
|
|
2643
2643
|
}
|
|
2644
2644
|
return n.filter(Boolean).join(" ").trim();
|
|
2645
2645
|
}
|
|
2646
|
-
if (
|
|
2646
|
+
if (Ts(t)) {
|
|
2647
2647
|
const e = t.rubricBlock;
|
|
2648
2648
|
return e.passage?.config ? (e.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (e.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
2649
2649
|
}
|
|
2650
2650
|
return "";
|
|
2651
2651
|
}
|
|
2652
2652
|
function Ft(t) {
|
|
2653
|
-
const e =
|
|
2653
|
+
const e = mi(t);
|
|
2654
2654
|
return [
|
|
2655
2655
|
/<math[>\s]/i,
|
|
2656
2656
|
// MathML
|
|
@@ -2666,7 +2666,7 @@ function Ft(t) {
|
|
|
2666
2666
|
// Simple arithmetic
|
|
2667
2667
|
].some((n) => n.test(e));
|
|
2668
2668
|
}
|
|
2669
|
-
function
|
|
2669
|
+
function As(t) {
|
|
2670
2670
|
const e = [
|
|
2671
2671
|
"pie-multiple-choice",
|
|
2672
2672
|
"pie-inline-choice",
|
|
@@ -2675,7 +2675,7 @@ function ys(t) {
|
|
|
2675
2675
|
"inline-choice",
|
|
2676
2676
|
"select-text"
|
|
2677
2677
|
];
|
|
2678
|
-
if (
|
|
2678
|
+
if (xn(t)) {
|
|
2679
2679
|
const i = t.item.config;
|
|
2680
2680
|
if (!i?.models)
|
|
2681
2681
|
return !1;
|
|
@@ -2685,7 +2685,7 @@ function ys(t) {
|
|
|
2685
2685
|
const s = r.element || "";
|
|
2686
2686
|
return e.includes(s);
|
|
2687
2687
|
}
|
|
2688
|
-
if (
|
|
2688
|
+
if (Fn(t)) {
|
|
2689
2689
|
const i = t.item.config?.models;
|
|
2690
2690
|
return (Array.isArray(i) ? i : i && typeof i == "object" ? Object.values(i) : []).some((r) => {
|
|
2691
2691
|
if (!r || typeof r != "object")
|
|
@@ -2697,10 +2697,10 @@ function ys(t) {
|
|
|
2697
2697
|
return !1;
|
|
2698
2698
|
}
|
|
2699
2699
|
function xt(t) {
|
|
2700
|
-
return
|
|
2700
|
+
return mi(t).trim().length >= 10;
|
|
2701
2701
|
}
|
|
2702
|
-
function
|
|
2703
|
-
const e =
|
|
2702
|
+
function ws(t) {
|
|
2703
|
+
const e = mi(t);
|
|
2704
2704
|
return [
|
|
2705
2705
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
2706
2706
|
/periodic\s+table/i,
|
|
@@ -2712,33 +2712,33 @@ function _s(t) {
|
|
|
2712
2712
|
/physics|force|energy|velocity|acceleration/i
|
|
2713
2713
|
].some((n) => n.test(e));
|
|
2714
2714
|
}
|
|
2715
|
-
const
|
|
2715
|
+
const Is = [
|
|
2716
2716
|
"assessment",
|
|
2717
2717
|
"section",
|
|
2718
2718
|
"item",
|
|
2719
2719
|
"passage",
|
|
2720
2720
|
"rubric"
|
|
2721
|
-
],
|
|
2722
|
-
function
|
|
2723
|
-
return
|
|
2721
|
+
], Ss = new Set(Is);
|
|
2722
|
+
function Es(t) {
|
|
2723
|
+
return Ss.has(t);
|
|
2724
2724
|
}
|
|
2725
2725
|
function gi(t, e, i) {
|
|
2726
2726
|
const n = t.trim(), r = i.trim();
|
|
2727
2727
|
if (!n || !r)
|
|
2728
2728
|
throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
2729
|
-
if (!
|
|
2729
|
+
if (!Es(e))
|
|
2730
2730
|
throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
|
|
2731
2731
|
return `${n}:${e}:${r}`;
|
|
2732
2732
|
}
|
|
2733
|
-
class
|
|
2733
|
+
class Cs {
|
|
2734
2734
|
constructor() {
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2735
|
+
d(this, "providerId", "desmos-calculator");
|
|
2736
|
+
d(this, "providerName", "Desmos Calculator");
|
|
2737
|
+
d(this, "category", "calculator");
|
|
2738
|
+
d(this, "version", "1.10");
|
|
2739
|
+
d(this, "requiresAuth", !0);
|
|
2740
|
+
d(this, "desmosProvider", null);
|
|
2741
|
+
d(this, "config", null);
|
|
2742
2742
|
}
|
|
2743
2743
|
/**
|
|
2744
2744
|
* Initialize Desmos calculator provider
|
|
@@ -2816,18 +2816,44 @@ class Is {
|
|
|
2816
2816
|
this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
|
|
2817
2817
|
}
|
|
2818
2818
|
}
|
|
2819
|
-
|
|
2819
|
+
const $s = (t, e) => {
|
|
2820
|
+
const i = e?.useSentenceSegmenter !== !1;
|
|
2821
|
+
try {
|
|
2822
|
+
if (!i)
|
|
2823
|
+
throw new Error("Segmenter disabled by policy");
|
|
2824
|
+
const a = globalThis.Intl?.Segmenter;
|
|
2825
|
+
if (typeof a == "function") {
|
|
2826
|
+
const l = new a(e?.locale, {
|
|
2827
|
+
granularity: "sentence"
|
|
2828
|
+
}), u = Array.from(l.segment(t)).map((f) => ({
|
|
2829
|
+
text: f.segment,
|
|
2830
|
+
offset: f.index
|
|
2831
|
+
})).filter((f) => f.text.trim().length > 0);
|
|
2832
|
+
if (u.length > 0)
|
|
2833
|
+
return u;
|
|
2834
|
+
}
|
|
2835
|
+
} catch {
|
|
2836
|
+
}
|
|
2837
|
+
const n = /[^.!?]+(?:[.!?]+|$)/g, r = t.match(n) || [t], s = [];
|
|
2838
|
+
let o = 0;
|
|
2839
|
+
for (const a of r) {
|
|
2840
|
+
const l = t.indexOf(a, o);
|
|
2841
|
+
l !== -1 && (s.push({ text: a, offset: l }), o = l + a.length);
|
|
2842
|
+
}
|
|
2843
|
+
return s.length > 0 ? s : [{ text: t, offset: 0 }];
|
|
2844
|
+
};
|
|
2845
|
+
class Os {
|
|
2820
2846
|
constructor() {
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2847
|
+
d(this, "providerId", "browser");
|
|
2848
|
+
d(this, "providerName", "Browser Speech Synthesis");
|
|
2849
|
+
d(this, "version", "1.0.0");
|
|
2824
2850
|
}
|
|
2825
2851
|
async initialize(e) {
|
|
2826
2852
|
if (typeof window > "u")
|
|
2827
2853
|
throw new Error("BrowserTTSProvider requires browser environment");
|
|
2828
2854
|
if (!("speechSynthesis" in window))
|
|
2829
2855
|
throw new Error("Browser does not support Speech Synthesis API");
|
|
2830
|
-
return new
|
|
2856
|
+
return new Ls(e);
|
|
2831
2857
|
}
|
|
2832
2858
|
supportsFeature(e) {
|
|
2833
2859
|
return !0;
|
|
@@ -2845,14 +2871,14 @@ class Ss {
|
|
|
2845
2871
|
destroy() {
|
|
2846
2872
|
}
|
|
2847
2873
|
}
|
|
2848
|
-
class
|
|
2874
|
+
class Ls {
|
|
2849
2875
|
constructor(e) {
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2876
|
+
d(this, "utterance", null);
|
|
2877
|
+
d(this, "config", null);
|
|
2878
|
+
d(this, "_isPlaying", !1);
|
|
2879
|
+
d(this, "_isPaused", !1);
|
|
2880
|
+
d(this, "speakRunId", 0);
|
|
2881
|
+
d(this, "onWordBoundary");
|
|
2856
2882
|
this.config = e;
|
|
2857
2883
|
}
|
|
2858
2884
|
async speak(e) {
|
|
@@ -2893,13 +2919,13 @@ class Es {
|
|
|
2893
2919
|
const l = a.text.trim();
|
|
2894
2920
|
if (!l)
|
|
2895
2921
|
continue;
|
|
2896
|
-
const
|
|
2922
|
+
const u = a.text.search(/\S/), f = a.offset + (u === -1 ? 0 : u);
|
|
2897
2923
|
if (!s) {
|
|
2898
|
-
s = l, o =
|
|
2924
|
+
s = l, o = f;
|
|
2899
2925
|
continue;
|
|
2900
2926
|
}
|
|
2901
2927
|
const h = `${s} ${l}`;
|
|
2902
|
-
h.length <= 260 ? s = h : (r.push({ text: s, offset: o }), s = l, o =
|
|
2928
|
+
h.length <= 260 ? s = h : (r.push({ text: s, offset: o }), s = l, o = f);
|
|
2903
2929
|
}
|
|
2904
2930
|
return s && r.push({ text: s, offset: o }), r.length ? r : [{ text: e, offset: 0 }];
|
|
2905
2931
|
}
|
|
@@ -2915,30 +2941,11 @@ class Es {
|
|
|
2915
2941
|
};
|
|
2916
2942
|
}
|
|
2917
2943
|
segmentSentences(e) {
|
|
2918
|
-
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
if (typeof a == "function") {
|
|
2924
|
-
const l = new a(o.locale, {
|
|
2925
|
-
granularity: "sentence"
|
|
2926
|
-
}), d = Array.from(l.segment(e)).map((h) => ({
|
|
2927
|
-
text: h.segment,
|
|
2928
|
-
offset: h.index
|
|
2929
|
-
})).filter((h) => h.text.trim().length > 0);
|
|
2930
|
-
if (d.length > 0)
|
|
2931
|
-
return d;
|
|
2932
|
-
}
|
|
2933
|
-
} catch {
|
|
2934
|
-
}
|
|
2935
|
-
const i = /[^.!?]+(?:[.!?]+|$)/g, n = e.match(i) || [e], r = [];
|
|
2936
|
-
let s = 0;
|
|
2937
|
-
for (const o of n) {
|
|
2938
|
-
const a = e.indexOf(o, s);
|
|
2939
|
-
a !== -1 && (r.push({ text: o, offset: a }), s = a + o.length);
|
|
2940
|
-
}
|
|
2941
|
-
return r.length > 0 ? r : [{ text: e, offset: 0 }];
|
|
2944
|
+
const i = this.getSegmentationPolicy();
|
|
2945
|
+
return $s(e, {
|
|
2946
|
+
locale: i.locale,
|
|
2947
|
+
useSentenceSegmenter: i.useSentenceSegmenter
|
|
2948
|
+
});
|
|
2942
2949
|
}
|
|
2943
2950
|
inferWordLength(e, i) {
|
|
2944
2951
|
const n = Math.max(0, Math.min(i, Math.max(0, e.length - 1)));
|
|
@@ -2979,8 +2986,8 @@ class Es {
|
|
|
2979
2986
|
}, this.utterance.onboundary = (o) => {
|
|
2980
2987
|
if (n !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", o.name, "charIndex:", o.charIndex, "charLength:", o.charLength), o.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence")
|
|
2981
2988
|
return;
|
|
2982
|
-
const a = Math.max(0, Math.min(o.charIndex, Math.max(0, e.length - 1))), l = Number(o.charLength || 0),
|
|
2983
|
-
console.log("[BrowserProvider] Calling onWordBoundary with word:", h, "at position:",
|
|
2989
|
+
const a = Math.max(0, Math.min(o.charIndex, Math.max(0, e.length - 1))), l = Number(o.charLength || 0), u = this.inferWordLength(e, a), f = Number.isFinite(l) && l > 0 && l <= 80 && a + l <= e.length ? l : u, h = e.substring(a, Math.min(e.length, a + f)).trim(), g = i + a;
|
|
2990
|
+
console.log("[BrowserProvider] Calling onWordBoundary with word:", h, "at position:", g), this.onWordBoundary(h, g, f);
|
|
2984
2991
|
}, speechSynthesis.speak(this.utterance);
|
|
2985
2992
|
});
|
|
2986
2993
|
}
|
|
@@ -3010,20 +3017,20 @@ class Es {
|
|
|
3010
3017
|
});
|
|
3011
3018
|
}
|
|
3012
3019
|
}
|
|
3013
|
-
class
|
|
3020
|
+
class Rs {
|
|
3014
3021
|
/**
|
|
3015
3022
|
* Create TTS tool provider
|
|
3016
3023
|
*
|
|
3017
3024
|
* @param backend TTS backend to use (default: 'browser')
|
|
3018
3025
|
*/
|
|
3019
3026
|
constructor(e = "browser") {
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
+
d(this, "providerId", "tts-service");
|
|
3028
|
+
d(this, "providerName", "Text-to-Speech");
|
|
3029
|
+
d(this, "category", "tts");
|
|
3030
|
+
d(this, "version", "1.0");
|
|
3031
|
+
d(this, "requiresAuth");
|
|
3032
|
+
d(this, "ttsProvider", null);
|
|
3033
|
+
d(this, "config", null);
|
|
3027
3034
|
this.requiresAuth = e !== "browser";
|
|
3028
3035
|
}
|
|
3029
3036
|
/**
|
|
@@ -3059,7 +3066,7 @@ class Cs {
|
|
|
3059
3066
|
async _initializeBrowserTTS(e) {
|
|
3060
3067
|
if (typeof window > "u" || !("speechSynthesis" in window))
|
|
3061
3068
|
throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
|
|
3062
|
-
this.ttsProvider = new
|
|
3069
|
+
this.ttsProvider = new Os(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
|
|
3063
3070
|
}
|
|
3064
3071
|
/**
|
|
3065
3072
|
* Initialize server-based TTS (Polly, Google)
|
|
@@ -3125,7 +3132,7 @@ class Cs {
|
|
|
3125
3132
|
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
3126
3133
|
}
|
|
3127
3134
|
}
|
|
3128
|
-
const
|
|
3135
|
+
const ks = /* @__PURE__ */ new Set([
|
|
3129
3136
|
"annotation-xml",
|
|
3130
3137
|
"color-profile",
|
|
3131
3138
|
"font-face",
|
|
@@ -3134,7 +3141,7 @@ const $s = /* @__PURE__ */ new Set([
|
|
|
3134
3141
|
"font-face-format",
|
|
3135
3142
|
"font-face-name",
|
|
3136
3143
|
"missing-glyph"
|
|
3137
|
-
]),
|
|
3144
|
+
]), Ps = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Hs = (t, e = "custom element tag") => {
|
|
3138
3145
|
if (!t || typeof t != "string")
|
|
3139
3146
|
throw new Error(`Invalid ${e}: expected a non-empty string`);
|
|
3140
3147
|
const i = t.trim();
|
|
@@ -3144,12 +3151,12 @@ const $s = /* @__PURE__ */ new Set([
|
|
|
3144
3151
|
throw new Error(`Invalid ${e} "${i}": custom element names must be lowercase`);
|
|
3145
3152
|
if (!i.includes("-"))
|
|
3146
3153
|
throw new Error(`Invalid ${e} "${i}": custom element names must include a hyphen`);
|
|
3147
|
-
if (
|
|
3154
|
+
if (ks.has(i))
|
|
3148
3155
|
throw new Error(`Invalid ${e} "${i}": this name is reserved by the HTML spec`);
|
|
3149
|
-
if (!
|
|
3156
|
+
if (!Ps.test(i))
|
|
3150
3157
|
throw new Error(`Invalid ${e} "${i}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
3151
3158
|
return i;
|
|
3152
|
-
},
|
|
3159
|
+
}, Dn = {
|
|
3153
3160
|
calculator: "pie-tool-calculator",
|
|
3154
3161
|
textToSpeech: "pie-tool-text-to-speech",
|
|
3155
3162
|
ruler: "pie-tool-ruler",
|
|
@@ -3162,20 +3169,20 @@ const $s = /* @__PURE__ */ new Set([
|
|
|
3162
3169
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
3163
3170
|
graph: "pie-tool-graph",
|
|
3164
3171
|
periodicTable: "pie-tool-periodic-table"
|
|
3165
|
-
},
|
|
3166
|
-
const i = e?.toolTagMap?.[t] ??
|
|
3167
|
-
return
|
|
3168
|
-
},
|
|
3169
|
-
const r =
|
|
3170
|
-
return o ? o({ toolId: t, tagName: r, context: e, toolbarContext: i }) :
|
|
3171
|
-
},
|
|
3172
|
+
}, Ns = (t, e) => {
|
|
3173
|
+
const i = e?.toolTagMap?.[t] ?? Dn[t] ?? t;
|
|
3174
|
+
return Hs(i, `tool component tag for "${t}"`);
|
|
3175
|
+
}, Ms = (t) => document.createElement(t), ue = (t, e, i, n) => {
|
|
3176
|
+
const r = Ns(t, n), o = n?.toolComponentFactories?.[t] ?? n?.toolComponentFactory;
|
|
3177
|
+
return o ? o({ toolId: t, tagName: r, context: e, toolbarContext: i }) : Ms(r);
|
|
3178
|
+
}, Fs = {
|
|
3172
3179
|
toolId: "calculator",
|
|
3173
3180
|
name: "Calculator",
|
|
3174
3181
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
3175
3182
|
icon: "calculator",
|
|
3176
3183
|
provider: {
|
|
3177
3184
|
getProviderId: (t) => typeof t?.provider?.id == "string" && t.provider.id.length > 0 ? t.provider.id : "calculator-desmos",
|
|
3178
|
-
createProvider: () => new
|
|
3185
|
+
createProvider: () => new Cs(),
|
|
3179
3186
|
getInitConfig: (t) => t?.provider?.init ?? {},
|
|
3180
3187
|
getAuthFetcher: (t) => {
|
|
3181
3188
|
const e = t?.provider?.runtime?.authFetcher;
|
|
@@ -3257,12 +3264,39 @@ const $s = /* @__PURE__ */ new Set([
|
|
|
3257
3264
|
}
|
|
3258
3265
|
};
|
|
3259
3266
|
}
|
|
3260
|
-
},
|
|
3261
|
-
const e =
|
|
3267
|
+
}, Ni = (t) => t && typeof t == "object" ? t : {}, Vt = (t) => {
|
|
3268
|
+
const e = Ni(t), i = Ni(t?.settings);
|
|
3262
3269
|
return { ...e, ...i };
|
|
3263
|
-
},
|
|
3270
|
+
}, ti = (t) => t.backend || "browser", Bn = (t, e) => t.serverProvider || t.provider || (e === "polly" || e === "google" ? e : void 0), Vn = (t, e) => t.transportMode || (e === "custom" ? "custom" : "pie"), xs = (t) => {
|
|
3271
|
+
const e = ti(t), i = Bn(t, e), n = Vn(t, i);
|
|
3272
|
+
return {
|
|
3273
|
+
voice: t.defaultVoice,
|
|
3274
|
+
rate: t.rate,
|
|
3275
|
+
pitch: t.pitch,
|
|
3276
|
+
providerOptions: {
|
|
3277
|
+
...t.language ? { locale: t.language } : {},
|
|
3278
|
+
...e === "polly" && t.engine ? { engine: t.engine } : {},
|
|
3279
|
+
...e === "polly" && typeof t.sampleRate == "number" ? { sampleRate: t.sampleRate } : {},
|
|
3280
|
+
...e === "polly" && t.format ? { format: t.format } : {},
|
|
3281
|
+
...e === "polly" ? {
|
|
3282
|
+
speechMarkTypes: t.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"]
|
|
3283
|
+
} : {},
|
|
3284
|
+
...n === "custom" && typeof t.cache == "boolean" ? { cache: t.cache } : {},
|
|
3285
|
+
...n === "custom" && t.speedRate ? { speedRate: t.speedRate } : {},
|
|
3286
|
+
...n === "custom" && t.lang_id ? { lang_id: t.lang_id } : {}
|
|
3287
|
+
},
|
|
3288
|
+
apiEndpoint: t.apiEndpoint,
|
|
3289
|
+
provider: i,
|
|
3290
|
+
language: t.language,
|
|
3291
|
+
transportMode: n,
|
|
3292
|
+
endpointMode: t.endpointMode,
|
|
3293
|
+
endpointValidationMode: t.endpointValidationMode,
|
|
3294
|
+
includeAuthOnAssetFetch: t.includeAuthOnAssetFetch,
|
|
3295
|
+
validateEndpoint: t.validateEndpoint
|
|
3296
|
+
};
|
|
3297
|
+
}, lt = /* @__PURE__ */ new Map(), Ds = "__pieToolElementUnmount", Mi = Object.freeze([1.5, 2]), Bs = (t) => {
|
|
3264
3298
|
if (!Array.isArray(t))
|
|
3265
|
-
return [...
|
|
3299
|
+
return [...Mi];
|
|
3266
3300
|
const e = /* @__PURE__ */ new Set();
|
|
3267
3301
|
for (const i of t) {
|
|
3268
3302
|
if (typeof i != "number" || !Number.isFinite(i) || i <= 0)
|
|
@@ -3270,8 +3304,8 @@ const $s = /* @__PURE__ */ new Set([
|
|
|
3270
3304
|
const n = Math.round(i * 100) / 100;
|
|
3271
3305
|
n !== 1 && e.add(n);
|
|
3272
3306
|
}
|
|
3273
|
-
return e.size ? Array.from(e) : [...
|
|
3274
|
-
},
|
|
3307
|
+
return e.size ? Array.from(e) : [...Mi];
|
|
3308
|
+
}, Vs = {
|
|
3275
3309
|
toolId: "textToSpeech",
|
|
3276
3310
|
name: "Text to Speech",
|
|
3277
3311
|
description: "Read content aloud",
|
|
@@ -3280,33 +3314,15 @@ const $s = /* @__PURE__ */ new Set([
|
|
|
3280
3314
|
getProviderId: () => "tts",
|
|
3281
3315
|
createProvider: (t) => {
|
|
3282
3316
|
const e = Vt(t);
|
|
3283
|
-
return new
|
|
3317
|
+
return new Rs(ti(e));
|
|
3284
3318
|
},
|
|
3285
3319
|
getInitConfig: (t) => {
|
|
3286
|
-
const e = Vt(t), i = e
|
|
3320
|
+
const e = Vt(t), i = ti(e), n = Bn(e, i), r = Vn(e, n);
|
|
3287
3321
|
return {
|
|
3288
3322
|
backend: i,
|
|
3289
|
-
apiEndpoint: e.apiEndpoint,
|
|
3290
3323
|
serverProvider: n,
|
|
3291
|
-
providerOptions: i === "polly" || r === "custom" ? {
|
|
3292
|
-
...i === "polly" && e.engine ? { engine: e.engine } : {},
|
|
3293
|
-
...i === "polly" && typeof e.sampleRate == "number" ? { sampleRate: e.sampleRate } : {},
|
|
3294
|
-
...i === "polly" && e.format ? { format: e.format } : {},
|
|
3295
|
-
...i === "polly" ? {
|
|
3296
|
-
speechMarkTypes: e.speechMarksMode === "word+sentence" ? ["word", "sentence"] : ["word"]
|
|
3297
|
-
} : {},
|
|
3298
|
-
...r === "custom" && typeof e.cache == "boolean" ? { cache: e.cache } : {},
|
|
3299
|
-
...r === "custom" && e.speedRate ? { speedRate: e.speedRate } : {},
|
|
3300
|
-
...r === "custom" && e.lang_id ? { lang_id: e.lang_id } : {}
|
|
3301
|
-
} : void 0,
|
|
3302
|
-
voice: e.defaultVoice,
|
|
3303
|
-
rate: e.rate,
|
|
3304
|
-
pitch: e.pitch,
|
|
3305
3324
|
transportMode: r,
|
|
3306
|
-
|
|
3307
|
-
endpointValidationMode: e.endpointValidationMode,
|
|
3308
|
-
includeAuthOnAssetFetch: e.includeAuthOnAssetFetch,
|
|
3309
|
-
validateEndpoint: e.validateEndpoint
|
|
3325
|
+
...xs(e)
|
|
3310
3326
|
};
|
|
3311
3327
|
},
|
|
3312
3328
|
getAuthFetcher: (t) => {
|
|
@@ -3341,13 +3357,13 @@ const $s = /* @__PURE__ */ new Set([
|
|
|
3341
3357
|
renderToolbar(t, e) {
|
|
3342
3358
|
const i = () => {
|
|
3343
3359
|
const o = Vt(e.toolkitCoordinator?.getToolConfig(this.toolId) || void 0);
|
|
3344
|
-
return
|
|
3360
|
+
return Bs(o.speedOptions);
|
|
3345
3361
|
}, n = gi(this.toolId, e.scope.level, e.scope.scopeId), r = () => {
|
|
3346
3362
|
const o = e.ui?.size;
|
|
3347
3363
|
return o === "sm" || o === "lg" ? o : "md";
|
|
3348
3364
|
}, s = () => {
|
|
3349
3365
|
let o = lt.get(n);
|
|
3350
|
-
return o && typeof o.isConnected == "boolean" && !o.isConnected && (lt.delete(n), o = void 0), o || (o = document.createElement("pie-tool-tts-inline"), o[
|
|
3366
|
+
return o && typeof o.isConnected == "boolean" && !o.isConnected && (lt.delete(n), o = void 0), o || (o = document.createElement("pie-tool-tts-inline"), o[Ds] = () => {
|
|
3351
3367
|
lt.get(n) === o && lt.delete(n);
|
|
3352
3368
|
}, lt.set(n, o)), o.setAttribute("tool-id", n), o.setAttribute("catalog-id", e.catalogId || e.itemId), o.setAttribute("language", e.language || "en-US"), o.setAttribute("size", r()), o.speedOptions = i(), o;
|
|
3353
3369
|
};
|
|
@@ -3384,7 +3400,7 @@ function ye(t) {
|
|
|
3384
3400
|
const e = t.isActive();
|
|
3385
3401
|
t.button.active = e, t.overlay.visible = e, t.onActiveChange?.(e);
|
|
3386
3402
|
}
|
|
3387
|
-
const
|
|
3403
|
+
const Gs = {
|
|
3388
3404
|
toolId: "ruler",
|
|
3389
3405
|
name: "Ruler",
|
|
3390
3406
|
description: "On-screen ruler for measurements",
|
|
@@ -3430,7 +3446,7 @@ const Fs = {
|
|
|
3430
3446
|
subscribeActive: i.subscribeActive
|
|
3431
3447
|
};
|
|
3432
3448
|
}
|
|
3433
|
-
},
|
|
3449
|
+
}, zs = {
|
|
3434
3450
|
toolId: "protractor",
|
|
3435
3451
|
name: "Protractor",
|
|
3436
3452
|
description: "On-screen protractor for angle measurements",
|
|
@@ -3476,7 +3492,7 @@ const Fs = {
|
|
|
3476
3492
|
subscribeActive: i.subscribeActive
|
|
3477
3493
|
};
|
|
3478
3494
|
}
|
|
3479
|
-
},
|
|
3495
|
+
}, js = {
|
|
3480
3496
|
toolId: "answerEliminator",
|
|
3481
3497
|
name: "Answer Eliminator",
|
|
3482
3498
|
description: "Strike through answer choices",
|
|
@@ -3499,7 +3515,7 @@ const Fs = {
|
|
|
3499
3515
|
* Pass 2: Answer eliminator is relevant only for choice-based questions
|
|
3500
3516
|
*/
|
|
3501
3517
|
isVisibleInContext(t) {
|
|
3502
|
-
return
|
|
3518
|
+
return As(t);
|
|
3503
3519
|
},
|
|
3504
3520
|
renderToolbar(t, e) {
|
|
3505
3521
|
const i = be(this.toolId, e), n = e.componentOverrides ?? {}, r = ue(this.toolId, t, e, n);
|
|
@@ -3530,7 +3546,7 @@ const Fs = {
|
|
|
3530
3546
|
subscribeActive: i.subscribeActive
|
|
3531
3547
|
};
|
|
3532
3548
|
}
|
|
3533
|
-
},
|
|
3549
|
+
}, qs = {
|
|
3534
3550
|
toolId: "highlighter",
|
|
3535
3551
|
name: "Highlighter",
|
|
3536
3552
|
description: "Highlight text",
|
|
@@ -3574,7 +3590,7 @@ const Fs = {
|
|
|
3574
3590
|
subscribeActive: i.subscribeActive
|
|
3575
3591
|
};
|
|
3576
3592
|
}
|
|
3577
|
-
},
|
|
3593
|
+
}, Ks = {
|
|
3578
3594
|
toolId: "lineReader",
|
|
3579
3595
|
name: "Line Reader",
|
|
3580
3596
|
description: "Reading guide overlay",
|
|
@@ -3626,7 +3642,7 @@ const Fs = {
|
|
|
3626
3642
|
subscribeActive: i.subscribeActive
|
|
3627
3643
|
};
|
|
3628
3644
|
}
|
|
3629
|
-
},
|
|
3645
|
+
}, Us = {
|
|
3630
3646
|
toolId: "theme",
|
|
3631
3647
|
name: "Theme",
|
|
3632
3648
|
description: "Accessible themes and contrast",
|
|
@@ -3697,7 +3713,7 @@ const Fs = {
|
|
|
3697
3713
|
subscribeActive: i.subscribeActive
|
|
3698
3714
|
};
|
|
3699
3715
|
}
|
|
3700
|
-
},
|
|
3716
|
+
}, Ws = Us, Ys = {
|
|
3701
3717
|
toolId: "annotationToolbar",
|
|
3702
3718
|
name: "Highlighter",
|
|
3703
3719
|
description: "Highlight and annotate text",
|
|
@@ -3751,7 +3767,7 @@ const Fs = {
|
|
|
3751
3767
|
subscribeActive: i.subscribeActive
|
|
3752
3768
|
};
|
|
3753
3769
|
}
|
|
3754
|
-
},
|
|
3770
|
+
}, Xs = {
|
|
3755
3771
|
toolId: "graph",
|
|
3756
3772
|
name: "Graph",
|
|
3757
3773
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -3816,7 +3832,7 @@ const Fs = {
|
|
|
3816
3832
|
subscribeActive: i.subscribeActive
|
|
3817
3833
|
};
|
|
3818
3834
|
}
|
|
3819
|
-
},
|
|
3835
|
+
}, Qs = {
|
|
3820
3836
|
toolId: "periodicTable",
|
|
3821
3837
|
name: "Periodic Table",
|
|
3822
3838
|
description: "Chemistry periodic table reference",
|
|
@@ -3837,7 +3853,7 @@ const Fs = {
|
|
|
3837
3853
|
* Pass 2: Periodic table is relevant when science content is present
|
|
3838
3854
|
*/
|
|
3839
3855
|
isVisibleInContext(t) {
|
|
3840
|
-
return
|
|
3856
|
+
return ws(t);
|
|
3841
3857
|
},
|
|
3842
3858
|
renderToolbar(t, e) {
|
|
3843
3859
|
const i = be(this.toolId, e), n = {
|
|
@@ -3879,53 +3895,53 @@ const Fs = {
|
|
|
3879
3895
|
subscribeActive: i.subscribeActive
|
|
3880
3896
|
};
|
|
3881
3897
|
}
|
|
3882
|
-
},
|
|
3883
|
-
Ps,
|
|
3884
|
-
Ms,
|
|
3898
|
+
}, Js = [
|
|
3885
3899
|
Fs,
|
|
3886
|
-
xs,
|
|
3887
|
-
Ds,
|
|
3888
|
-
Bs,
|
|
3889
3900
|
Vs,
|
|
3901
|
+
Gs,
|
|
3890
3902
|
zs,
|
|
3891
3903
|
js,
|
|
3892
3904
|
qs,
|
|
3893
|
-
Ks
|
|
3905
|
+
Ks,
|
|
3906
|
+
Ws,
|
|
3907
|
+
Ys,
|
|
3908
|
+
Xs,
|
|
3909
|
+
Qs
|
|
3894
3910
|
];
|
|
3895
|
-
function
|
|
3896
|
-
const e = new
|
|
3911
|
+
function Zs(t = {}) {
|
|
3912
|
+
const e = new ys(), i = {
|
|
3897
3913
|
toolTagMap: {
|
|
3898
|
-
...
|
|
3914
|
+
...Dn,
|
|
3899
3915
|
...t.toolTagMap || {}
|
|
3900
3916
|
},
|
|
3901
3917
|
toolComponentFactory: t.toolComponentFactory,
|
|
3902
3918
|
toolComponentFactories: t.toolComponentFactories
|
|
3903
3919
|
}, n = (r) => t.overrides?.[r.toolId] || r;
|
|
3904
|
-
return t.includePackagedTools &&
|
|
3920
|
+
return t.includePackagedTools && eo(e, {
|
|
3905
3921
|
toolIds: t.toolIds,
|
|
3906
3922
|
applyOverrides: n
|
|
3907
3923
|
}), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(i), e;
|
|
3908
3924
|
}
|
|
3909
|
-
function
|
|
3925
|
+
function eo(t, e = {}) {
|
|
3910
3926
|
const i = e.toolIds && e.toolIds.length > 0 ? new Set(e.toolIds) : null, n = e.applyOverrides || ((r) => r);
|
|
3911
|
-
for (const r of
|
|
3927
|
+
for (const r of Js)
|
|
3912
3928
|
i && !i.has(r.toolId) || t.register(n(r));
|
|
3913
3929
|
}
|
|
3914
|
-
function
|
|
3915
|
-
return
|
|
3930
|
+
function to(t = {}) {
|
|
3931
|
+
return Zs({
|
|
3916
3932
|
...t,
|
|
3917
3933
|
includePackagedTools: !0
|
|
3918
3934
|
});
|
|
3919
3935
|
}
|
|
3920
|
-
function
|
|
3921
|
-
const t =
|
|
3936
|
+
function io() {
|
|
3937
|
+
const t = to(), e = /* @__PURE__ */ new Set();
|
|
3922
3938
|
for (const i of t.getAllTools())
|
|
3923
3939
|
for (const n of i.pnpSupportIds || [])
|
|
3924
3940
|
e.add(n);
|
|
3925
3941
|
return [...e].sort();
|
|
3926
3942
|
}
|
|
3927
|
-
|
|
3928
|
-
const
|
|
3943
|
+
io();
|
|
3944
|
+
const no = {
|
|
3929
3945
|
/**
|
|
3930
3946
|
* Visual accessibility features
|
|
3931
3947
|
* For students with low vision, color blindness, or visual processing needs
|
|
@@ -4096,27 +4112,27 @@ const Js = {
|
|
|
4096
4112
|
tutorialAvailable: "tutorialAvailable"
|
|
4097
4113
|
}
|
|
4098
4114
|
};
|
|
4099
|
-
Object.values(
|
|
4100
|
-
var
|
|
4115
|
+
Object.values(no).flatMap((t) => Object.values(t));
|
|
4116
|
+
var ii;
|
|
4101
4117
|
(function(t) {
|
|
4102
4118
|
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";
|
|
4103
|
-
})(
|
|
4104
|
-
var
|
|
4119
|
+
})(ii || (ii = {}));
|
|
4120
|
+
var Fi;
|
|
4105
4121
|
(function(t) {
|
|
4106
4122
|
t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
|
|
4107
|
-
})(
|
|
4108
|
-
const
|
|
4123
|
+
})(Fi || (Fi = {}));
|
|
4124
|
+
const k = class k {
|
|
4109
4125
|
constructor() {
|
|
4110
|
-
|
|
4111
|
-
|
|
4126
|
+
d(this, "elementType", "multiple-choice");
|
|
4127
|
+
d(this, "priority", 100);
|
|
4112
4128
|
}
|
|
4113
4129
|
canHandle(e) {
|
|
4114
4130
|
return e.tagName.toLowerCase() === "multiple-choice" || e.classList.contains("multiple-choice");
|
|
4115
4131
|
}
|
|
4116
4132
|
findChoices(e) {
|
|
4117
|
-
e.setAttribute(
|
|
4133
|
+
e.setAttribute(k.ROOT_HOOK_ATTR, "true");
|
|
4118
4134
|
const i = Array.from(
|
|
4119
|
-
e.querySelectorAll(
|
|
4135
|
+
e.querySelectorAll(k.CHOICE_SELECTOR)
|
|
4120
4136
|
);
|
|
4121
4137
|
for (const n of i)
|
|
4122
4138
|
this.annotateChoice(n);
|
|
@@ -4142,27 +4158,27 @@ const R = class R {
|
|
|
4142
4158
|
const i = e.querySelector(
|
|
4143
4159
|
'input[type="checkbox"], input[type="radio"]'
|
|
4144
4160
|
);
|
|
4145
|
-
return !(!i || i.getAttribute("aria-checked") === "true" || i.disabled || (e.closest(`[${
|
|
4146
|
-
`[${
|
|
4161
|
+
return !(!i || i.getAttribute("aria-checked") === "true" || i.disabled || (e.closest(`[${k.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelector(
|
|
4162
|
+
`[${k.FEEDBACK_HOOK_ATTR}="true"]`
|
|
4147
4163
|
));
|
|
4148
4164
|
}
|
|
4149
4165
|
getButtonContainer(e) {
|
|
4150
4166
|
return e;
|
|
4151
4167
|
}
|
|
4152
4168
|
generateFallbackId(e) {
|
|
4153
|
-
const n = (e.closest(`[${
|
|
4154
|
-
`[${
|
|
4169
|
+
const n = (e.closest(`[${k.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelectorAll(
|
|
4170
|
+
`[${k.CHOICE_HOOK_ATTR}="true"]`
|
|
4155
4171
|
) || [];
|
|
4156
4172
|
return `choice-${Array.from(n).indexOf(e)}`;
|
|
4157
4173
|
}
|
|
4158
4174
|
annotateChoice(e) {
|
|
4159
|
-
e.setAttribute(
|
|
4175
|
+
e.setAttribute(k.CHOICE_HOOK_ATTR, "true");
|
|
4160
4176
|
const i = this.resolveLabelElement(e);
|
|
4161
|
-
i && i.setAttribute(
|
|
4177
|
+
i && i.setAttribute(k.LABEL_HOOK_ATTR, "true");
|
|
4162
4178
|
}
|
|
4163
4179
|
resolveLabelElement(e) {
|
|
4164
4180
|
return e.querySelector(
|
|
4165
|
-
`[${
|
|
4181
|
+
`[${k.LABEL_HOOK_ATTR}="true"]`
|
|
4166
4182
|
) || e.querySelector("label") || e.querySelector("span");
|
|
4167
4183
|
}
|
|
4168
4184
|
annotateFeedbackTicks(e) {
|
|
@@ -4170,18 +4186,18 @@ const R = class R {
|
|
|
4170
4186
|
".feedback-tick"
|
|
4171
4187
|
))
|
|
4172
4188
|
i.setAttribute(
|
|
4173
|
-
|
|
4189
|
+
k.FEEDBACK_HOOK_ATTR,
|
|
4174
4190
|
"true"
|
|
4175
4191
|
);
|
|
4176
4192
|
}
|
|
4177
4193
|
};
|
|
4178
|
-
|
|
4179
|
-
let Pt =
|
|
4180
|
-
class
|
|
4194
|
+
d(k, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice"), d(k, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label"), d(k, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root"), d(k, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick"), d(k, "CHOICE_SELECTOR", `[${k.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
|
|
4195
|
+
let Pt = k;
|
|
4196
|
+
class ro {
|
|
4181
4197
|
constructor() {
|
|
4182
|
-
|
|
4183
|
-
|
|
4184
|
-
|
|
4198
|
+
d(this, "elementType", "ebsr");
|
|
4199
|
+
d(this, "priority", 95);
|
|
4200
|
+
d(this, "mcAdapter", new Pt());
|
|
4185
4201
|
}
|
|
4186
4202
|
canHandle(e) {
|
|
4187
4203
|
return e.tagName.toLowerCase() === "ebsr" || e.querySelector("ebsr-multiple-choice") !== null;
|
|
@@ -4208,10 +4224,10 @@ class Zs {
|
|
|
4208
4224
|
return this.mcAdapter.getButtonContainer(e);
|
|
4209
4225
|
}
|
|
4210
4226
|
}
|
|
4211
|
-
class
|
|
4227
|
+
class so {
|
|
4212
4228
|
constructor() {
|
|
4213
|
-
|
|
4214
|
-
|
|
4229
|
+
d(this, "elementType", "inline-dropdown");
|
|
4230
|
+
d(this, "priority", 90);
|
|
4215
4231
|
}
|
|
4216
4232
|
canHandle(e) {
|
|
4217
4233
|
return e.tagName.toLowerCase() === "inline-dropdown" || e.querySelector('[role="combobox"]') !== null;
|
|
@@ -4236,13 +4252,13 @@ class eo {
|
|
|
4236
4252
|
return e;
|
|
4237
4253
|
}
|
|
4238
4254
|
}
|
|
4239
|
-
class
|
|
4255
|
+
class oo {
|
|
4240
4256
|
constructor() {
|
|
4241
|
-
|
|
4257
|
+
d(this, "adapters");
|
|
4242
4258
|
this.adapters = [
|
|
4243
4259
|
new Pt(),
|
|
4244
|
-
new
|
|
4245
|
-
new
|
|
4260
|
+
new ro(),
|
|
4261
|
+
new so()
|
|
4246
4262
|
].sort((e, i) => i.priority - e.priority);
|
|
4247
4263
|
}
|
|
4248
4264
|
/**
|
|
@@ -4272,10 +4288,10 @@ class to {
|
|
|
4272
4288
|
}
|
|
4273
4289
|
const O = class O {
|
|
4274
4290
|
constructor() {
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4291
|
+
d(this, "name", "mask");
|
|
4292
|
+
d(this, "highlights", /* @__PURE__ */ new Map());
|
|
4293
|
+
d(this, "ranges", /* @__PURE__ */ new Map());
|
|
4294
|
+
d(this, "fallbackContainers", /* @__PURE__ */ new Map());
|
|
4279
4295
|
}
|
|
4280
4296
|
initialize() {
|
|
4281
4297
|
}
|
|
@@ -4360,14 +4376,14 @@ const O = class O {
|
|
|
4360
4376
|
n.selectNodeContents(i), this.removeAriaAttributes(n), this.fallbackContainers.delete(e);
|
|
4361
4377
|
}
|
|
4362
4378
|
};
|
|
4363
|
-
|
|
4364
|
-
let
|
|
4379
|
+
d(O, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-"), d(O, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-"), d(O, "FALLBACK_CLASS", "pie-answer-masked-fallback"), d(O, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice"), d(O, "ELIMINATED_ATTR", "data-pie-answer-eliminated"), d(O, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
4380
|
+
let ni = O;
|
|
4365
4381
|
const I = class I {
|
|
4366
4382
|
constructor() {
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4383
|
+
d(this, "name", "strikethrough");
|
|
4384
|
+
d(this, "highlights", /* @__PURE__ */ new Map());
|
|
4385
|
+
d(this, "ranges", /* @__PURE__ */ new Map());
|
|
4386
|
+
d(this, "fallbackContainers", /* @__PURE__ */ new Map());
|
|
4371
4387
|
}
|
|
4372
4388
|
initialize() {
|
|
4373
4389
|
this.isSupported() || console.warn("CSS Custom Highlight API not supported, using fallback");
|
|
@@ -4474,29 +4490,29 @@ const I = class I {
|
|
|
4474
4490
|
) || e.querySelector("label");
|
|
4475
4491
|
}
|
|
4476
4492
|
};
|
|
4477
|
-
|
|
4478
|
-
let
|
|
4493
|
+
d(I, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-highlight-"), d(I, "HIGHLIGHT_NAME_PREFIX", "pie-answer-eliminated-"), d(I, "FALLBACK_CLASS", "pie-answer-eliminator-eliminated-fallback"), d(I, "SR_CLASS", "pie-answer-eliminator-sr-announcement"), d(I, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice"), d(I, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label"), d(I, "ELIMINATED_ATTR", "data-pie-answer-eliminated"), d(I, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
4494
|
+
let ri = I;
|
|
4479
4495
|
const Te = class Te {
|
|
4480
4496
|
constructor(e = "strikethrough", i = "right") {
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4497
|
+
d(this, "registry");
|
|
4498
|
+
d(this, "strategy");
|
|
4499
|
+
d(this, "eliminatedChoices", /* @__PURE__ */ new Set());
|
|
4484
4500
|
// Set<choiceId> for current element
|
|
4485
|
-
|
|
4501
|
+
d(this, "choiceElements", /* @__PURE__ */ new Map());
|
|
4486
4502
|
// choiceId -> element
|
|
4487
|
-
|
|
4503
|
+
d(this, "choiceButtons", /* @__PURE__ */ new Map());
|
|
4488
4504
|
// choiceId -> button
|
|
4489
|
-
|
|
4505
|
+
d(this, "choiceAdapters", /* @__PURE__ */ new Map());
|
|
4490
4506
|
// choiceId -> adapter
|
|
4491
|
-
|
|
4492
|
-
|
|
4507
|
+
d(this, "buttonAlignment", "right");
|
|
4508
|
+
d(this, "shouldRestoreState", !0);
|
|
4493
4509
|
// Whether to restore eliminations from state storage
|
|
4494
4510
|
// Store integration (replaces session/localStorage)
|
|
4495
|
-
|
|
4496
|
-
this.registry = new
|
|
4511
|
+
d(this, "storeIntegration", null);
|
|
4512
|
+
this.registry = new oo(), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.buttonAlignment = i;
|
|
4497
4513
|
}
|
|
4498
4514
|
createStrategy(e) {
|
|
4499
|
-
return e === "mask" ? new
|
|
4515
|
+
return e === "mask" ? new ni() : new ri();
|
|
4500
4516
|
}
|
|
4501
4517
|
/**
|
|
4502
4518
|
* Initialize eliminator for a question
|
|
@@ -4702,11 +4718,11 @@ const Te = class Te {
|
|
|
4702
4718
|
this.cleanupButtons(), this.strategy.destroy();
|
|
4703
4719
|
}
|
|
4704
4720
|
};
|
|
4705
|
-
|
|
4706
|
-
let
|
|
4707
|
-
var
|
|
4708
|
-
function
|
|
4709
|
-
|
|
4721
|
+
d(Te, "TOGGLE_CLASS", "pie-answer-eliminator-toggle"), d(Te, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
|
|
4722
|
+
let si = Te;
|
|
4723
|
+
var lo = /* @__PURE__ */ Qr('<div style="display: none;" aria-hidden="true"></div>');
|
|
4724
|
+
function ao(t, e) {
|
|
4725
|
+
Ki(e, !0);
|
|
4710
4726
|
let i = _e(e, "visible", 7, !1), n = _e(e, "toolId", 7, "answerEliminator"), r = _e(e, "strategy", 7, "strikethrough"), s = _e(
|
|
4711
4727
|
e,
|
|
4712
4728
|
"alwaysOn",
|
|
@@ -4731,39 +4747,39 @@ function no(t, e) {
|
|
|
4731
4747
|
7,
|
|
4732
4748
|
null
|
|
4733
4749
|
// ElementToolStateStore instance
|
|
4734
|
-
),
|
|
4750
|
+
), u = _e(
|
|
4735
4751
|
e,
|
|
4736
4752
|
"globalElementId",
|
|
4737
4753
|
7,
|
|
4738
4754
|
""
|
|
4739
4755
|
// Composite key: "assessmentId:sectionId:itemId:elementId"
|
|
4740
|
-
),
|
|
4741
|
-
const y = /* @__PURE__ */
|
|
4742
|
-
let p = /* @__PURE__ */ x(null), S = /* @__PURE__ */ x(null), _ = /* @__PURE__ */ x(null),
|
|
4756
|
+
), f = /* @__PURE__ */ x(null), h = /* @__PURE__ */ x(null), g = /* @__PURE__ */ x(null);
|
|
4757
|
+
const y = /* @__PURE__ */ Ii(() => m(h)?.toolCoordinator);
|
|
4758
|
+
let p = /* @__PURE__ */ x(null), S = /* @__PURE__ */ x(null), _ = /* @__PURE__ */ x(null), R = /* @__PURE__ */ x(null), re = /* @__PURE__ */ Ii(() => s() || i());
|
|
4743
4759
|
Pe(() => {
|
|
4744
|
-
if (
|
|
4745
|
-
return
|
|
4760
|
+
if (m(f))
|
|
4761
|
+
return ps(m(f), (A) => {
|
|
4746
4762
|
C(h, A, !0);
|
|
4747
4763
|
});
|
|
4748
4764
|
}), Pe(() => {
|
|
4749
|
-
if (
|
|
4750
|
-
return
|
|
4751
|
-
C(
|
|
4765
|
+
if (m(f))
|
|
4766
|
+
return ms(m(f), (A) => {
|
|
4767
|
+
C(g, A, !0);
|
|
4752
4768
|
});
|
|
4753
4769
|
});
|
|
4754
4770
|
function ot() {
|
|
4755
|
-
return a() || g
|
|
4771
|
+
return a() || m(g)?.scopeElement || null;
|
|
4756
4772
|
}
|
|
4757
4773
|
function Dt() {
|
|
4758
|
-
if (!
|
|
4774
|
+
if (!m(re) || !m(p)) return;
|
|
4759
4775
|
const A = ot();
|
|
4760
4776
|
if (!A) {
|
|
4761
4777
|
console.warn("[AnswerEliminator] Missing shell scope context for question root");
|
|
4762
4778
|
return;
|
|
4763
4779
|
}
|
|
4764
|
-
|
|
4780
|
+
m(p).initializeForQuestion(A);
|
|
4765
4781
|
}
|
|
4766
|
-
function
|
|
4782
|
+
function Gn() {
|
|
4767
4783
|
requestAnimationFrame(() => {
|
|
4768
4784
|
requestAnimationFrame(() => {
|
|
4769
4785
|
Dt();
|
|
@@ -4771,77 +4787,77 @@ function no(t, e) {
|
|
|
4771
4787
|
});
|
|
4772
4788
|
}
|
|
4773
4789
|
Pe(() => {
|
|
4774
|
-
!
|
|
4790
|
+
!m(y) || !n() || (m(R) && m(_) && (m(R) !== m(y) || m(_) !== n()) && (m(R).unregisterTool(m(_)), C(R, null), C(_, null)), m(_) || (m(y).registerTool(n(), "Answer Eliminator", void 0, ii.MODAL), C(R, m(y), !0), C(_, n())));
|
|
4775
4791
|
}), Pe(() => {
|
|
4776
|
-
|
|
4777
|
-
}),
|
|
4778
|
-
|
|
4792
|
+
m(p) && l() && u() && m(p).setStoreIntegration(l(), u());
|
|
4793
|
+
}), is(() => (C(p, new si(r(), o()), !0), m(p) && l() && u() && m(p).setStoreIntegration(l(), u()), m(re) ? Dt() : m(p).cleanup(), () => {
|
|
4794
|
+
m(p)?.destroy(), C(p, null), m(R) && m(_) && (m(R).unregisterTool(m(_)), C(R, null), C(_, null));
|
|
4779
4795
|
})), Pe(() => {
|
|
4780
|
-
const A = g
|
|
4796
|
+
const A = m(g)?.contextVersion ?? null;
|
|
4781
4797
|
if (A !== null) {
|
|
4782
|
-
if (
|
|
4798
|
+
if (m(S) === null) {
|
|
4783
4799
|
C(S, A, !0);
|
|
4784
4800
|
return;
|
|
4785
4801
|
}
|
|
4786
|
-
A !==
|
|
4802
|
+
A !== m(S) && (C(S, A, !0), Gn());
|
|
4787
4803
|
}
|
|
4788
4804
|
}), Pe(() => {
|
|
4789
|
-
|
|
4805
|
+
m(p) && (m(re) ? (m(p).enableStateRestoration(), Dt()) : m(p).cleanup());
|
|
4790
4806
|
});
|
|
4791
|
-
var
|
|
4807
|
+
var zn = {
|
|
4792
4808
|
get visible() {
|
|
4793
4809
|
return i();
|
|
4794
4810
|
},
|
|
4795
4811
|
set visible(A = !1) {
|
|
4796
|
-
i(A),
|
|
4812
|
+
i(A), de();
|
|
4797
4813
|
},
|
|
4798
4814
|
get toolId() {
|
|
4799
4815
|
return n();
|
|
4800
4816
|
},
|
|
4801
4817
|
set toolId(A = "answerEliminator") {
|
|
4802
|
-
n(A),
|
|
4818
|
+
n(A), de();
|
|
4803
4819
|
},
|
|
4804
4820
|
get strategy() {
|
|
4805
4821
|
return r();
|
|
4806
4822
|
},
|
|
4807
4823
|
set strategy(A = "strikethrough") {
|
|
4808
|
-
r(A),
|
|
4824
|
+
r(A), de();
|
|
4809
4825
|
},
|
|
4810
4826
|
get alwaysOn() {
|
|
4811
4827
|
return s();
|
|
4812
4828
|
},
|
|
4813
4829
|
set alwaysOn(A = !1) {
|
|
4814
|
-
s(A),
|
|
4830
|
+
s(A), de();
|
|
4815
4831
|
},
|
|
4816
4832
|
get buttonAlignment() {
|
|
4817
4833
|
return o();
|
|
4818
4834
|
},
|
|
4819
4835
|
set buttonAlignment(A = "right") {
|
|
4820
|
-
o(A),
|
|
4836
|
+
o(A), de();
|
|
4821
4837
|
},
|
|
4822
4838
|
get scopeElement() {
|
|
4823
4839
|
return a();
|
|
4824
4840
|
},
|
|
4825
4841
|
set scopeElement(A = null) {
|
|
4826
|
-
a(A),
|
|
4842
|
+
a(A), de();
|
|
4827
4843
|
},
|
|
4828
4844
|
get elementToolStateStore() {
|
|
4829
4845
|
return l();
|
|
4830
4846
|
},
|
|
4831
4847
|
set elementToolStateStore(A = null) {
|
|
4832
|
-
l(A),
|
|
4848
|
+
l(A), de();
|
|
4833
4849
|
},
|
|
4834
4850
|
get globalElementId() {
|
|
4835
|
-
return
|
|
4851
|
+
return u();
|
|
4836
4852
|
},
|
|
4837
4853
|
set globalElementId(A = "") {
|
|
4838
|
-
|
|
4854
|
+
u(A), de();
|
|
4839
4855
|
}
|
|
4840
|
-
},
|
|
4841
|
-
return
|
|
4856
|
+
}, bi = lo();
|
|
4857
|
+
return ns(bi, (A) => C(f, A), () => m(f)), Rn(t, bi), Ui(zn);
|
|
4842
4858
|
}
|
|
4843
|
-
customElements.define("pie-tool-answer-eliminator",
|
|
4844
|
-
|
|
4859
|
+
customElements.define("pie-tool-answer-eliminator", ls(
|
|
4860
|
+
ao,
|
|
4845
4861
|
{
|
|
4846
4862
|
visible: { attribute: "visible", type: "Boolean" },
|
|
4847
4863
|
toolId: { attribute: "tool-id", type: "String" },
|
|
@@ -4857,5 +4873,5 @@ customElements.define("pie-tool-answer-eliminator", rs(
|
|
|
4857
4873
|
{ mode: "open" }
|
|
4858
4874
|
));
|
|
4859
4875
|
export {
|
|
4860
|
-
|
|
4876
|
+
ao as default
|
|
4861
4877
|
};
|