@pie-players/pie-tool-answer-eliminator 0.3.16 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index-BRKsQ6Im.js +460 -0
- package/dist/{index-DF-Dk87f.js → index-QLtHZ4Yz.js} +102 -50
- package/dist/tool-answer-eliminator.js +1214 -1128
- package/package.json +4 -4
- package/dist/index-CGqExkh0.js +0 -354
|
@@ -1,101 +1,101 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var qn = Object.defineProperty;
|
|
2
|
+
var _i = (t) => {
|
|
3
3
|
throw TypeError(t);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var d = (t, e, i) =>
|
|
7
|
-
var c = (t, e, i) => (
|
|
5
|
+
var Kn = (t, e, i) => e in t ? qn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
|
|
6
|
+
var d = (t, e, i) => Kn(t, typeof e != "symbol" ? e + "" : e, i), Vt = (t, e, i) => e.has(t) || _i("Cannot " + i);
|
|
7
|
+
var c = (t, e, i) => (Vt(t, e, "read from private field"), i ? i.call(t) : e.get(t)), T = (t, e, i) => e.has(t) ? _i("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), v = (t, e, i, n) => (Vt(t, e, "write to private field"), n ? n.call(t, i) : e.set(t, i), i), E = (t, e, i) => (Vt(t, e, "access private method"), i);
|
|
8
8
|
var xi;
|
|
9
9
|
typeof window < "u" && ((xi = window.__svelte ?? (window.__svelte = {})).v ?? (xi.v = /* @__PURE__ */ new Set())).add("5");
|
|
10
|
-
const
|
|
11
|
-
var
|
|
12
|
-
const
|
|
10
|
+
const Un = 2, Bi = "[", Vi = "[!", Ti = "[?", Gi = "]", $t = {}, N = /* @__PURE__ */ Symbol(), Wn = "http://www.w3.org/1999/xhtml", zt = !1;
|
|
11
|
+
var Yn = Array.isArray, Xn = Array.prototype.indexOf, tt = Array.prototype.includes, Qn = Array.from, kt = Object.keys, Lt = Object.defineProperty, Ke = Object.getOwnPropertyDescriptor, Jn = Object.prototype, Zn = Array.prototype, er = Object.getPrototypeOf, Ai = Object.isExtensible;
|
|
12
|
+
const tr = () => {
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function ir(t) {
|
|
15
15
|
for (var e = 0; e < t.length; e++)
|
|
16
16
|
t[e]();
|
|
17
17
|
}
|
|
18
|
-
function
|
|
18
|
+
function nr() {
|
|
19
19
|
var t, e, 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
|
|
24
|
+
const M = 2, rt = 4, Ot = 8, li = 1 << 24, Oe = 16, be = 32, Re = 64, jt = 128, X = 512, D = 1024, H = 2048, re = 4096, Ee = 8192, Ce = 16384, ze = 32768, Rt = 65536, wi = 1 << 17, rr = 1 << 18, ot = 1 << 19, or = 1 << 20, Ge = 65536, qt = 1 << 21, zi = 1 << 22, ft = 1 << 23, Tt = /* @__PURE__ */ Symbol("$state"), sr = /* @__PURE__ */ Symbol("legacy props"), ai = new class extends Error {
|
|
25
25
|
constructor() {
|
|
26
26
|
super(...arguments);
|
|
27
27
|
d(this, "name", "StaleReactionError");
|
|
28
28
|
d(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
29
29
|
}
|
|
30
|
-
}(),
|
|
31
|
-
function
|
|
30
|
+
}(), ci = 8;
|
|
31
|
+
function lr(t) {
|
|
32
32
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
34
|
+
function ar(t) {
|
|
35
35
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function cr() {
|
|
38
38
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
39
39
|
}
|
|
40
|
-
function
|
|
40
|
+
function ur(t) {
|
|
41
41
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function dr() {
|
|
44
44
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
45
45
|
}
|
|
46
|
-
function
|
|
46
|
+
function fr() {
|
|
47
47
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function hr() {
|
|
50
50
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function pr() {
|
|
53
53
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
54
54
|
}
|
|
55
|
-
function
|
|
55
|
+
function mr() {
|
|
56
56
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function gr() {
|
|
59
59
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
60
60
|
}
|
|
61
|
-
function
|
|
61
|
+
function ji(t) {
|
|
62
62
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function vr() {
|
|
65
65
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
66
66
|
}
|
|
67
|
-
let
|
|
68
|
-
function
|
|
69
|
-
|
|
67
|
+
let te = !1;
|
|
68
|
+
function vt(t) {
|
|
69
|
+
te = t;
|
|
70
70
|
}
|
|
71
|
-
let
|
|
72
|
-
function
|
|
71
|
+
let x;
|
|
72
|
+
function ht(t) {
|
|
73
73
|
if (t === null)
|
|
74
|
-
throw
|
|
75
|
-
return
|
|
74
|
+
throw ji(), $t;
|
|
75
|
+
return x = t;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return
|
|
77
|
+
function qi() {
|
|
78
|
+
return ht(/* @__PURE__ */ st(x));
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
if (
|
|
82
|
-
for (var e = t, i =
|
|
80
|
+
function br(t = 1) {
|
|
81
|
+
if (te) {
|
|
82
|
+
for (var e = t, i = x; e--; )
|
|
83
83
|
i = /** @type {TemplateNode} */
|
|
84
84
|
/* @__PURE__ */ st(i);
|
|
85
|
-
|
|
85
|
+
x = i;
|
|
86
86
|
}
|
|
87
87
|
}
|
|
88
|
-
function
|
|
89
|
-
for (var e = 0, i =
|
|
90
|
-
if (i.nodeType ===
|
|
88
|
+
function yr(t = !0) {
|
|
89
|
+
for (var e = 0, i = x; ; ) {
|
|
90
|
+
if (i.nodeType === ci) {
|
|
91
91
|
var n = (
|
|
92
92
|
/** @type {Comment} */
|
|
93
93
|
i.data
|
|
94
94
|
);
|
|
95
|
-
if (n ===
|
|
95
|
+
if (n === Gi) {
|
|
96
96
|
if (e === 0) return i;
|
|
97
97
|
e -= 1;
|
|
98
|
-
} else (n ===
|
|
98
|
+
} else (n === Bi || n === Vi || // "[1", "[2", etc. for if blocks
|
|
99
99
|
n[0] === "[" && !isNaN(Number(n.slice(1)))) && (e += 1);
|
|
100
100
|
}
|
|
101
101
|
var r = (
|
|
@@ -105,22 +105,22 @@ function br(t = !0) {
|
|
|
105
105
|
t && i.remove(), i = r;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
function
|
|
108
|
+
function Ki(t) {
|
|
109
109
|
return t === this.v;
|
|
110
110
|
}
|
|
111
|
-
function
|
|
111
|
+
function _r(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 Tr(t) {
|
|
115
|
+
return !_r(t, this.v);
|
|
116
116
|
}
|
|
117
|
-
let
|
|
118
|
-
function
|
|
119
|
-
|
|
117
|
+
let Ar = !1, J = null;
|
|
118
|
+
function Pt(t) {
|
|
119
|
+
J = t;
|
|
120
120
|
}
|
|
121
|
-
function
|
|
122
|
-
|
|
123
|
-
p:
|
|
121
|
+
function Ui(t, e = !1, i) {
|
|
122
|
+
J = {
|
|
123
|
+
p: J,
|
|
124
124
|
i: !1,
|
|
125
125
|
c: null,
|
|
126
126
|
e: null,
|
|
@@ -129,52 +129,52 @@ function Ki(t, e = !1, i) {
|
|
|
129
129
|
l: null
|
|
130
130
|
};
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function Wi(t) {
|
|
133
133
|
var e = (
|
|
134
134
|
/** @type {ComponentContext} */
|
|
135
|
-
|
|
135
|
+
J
|
|
136
136
|
), i = e.e;
|
|
137
137
|
if (i !== null) {
|
|
138
138
|
e.e = null;
|
|
139
139
|
for (var n of i)
|
|
140
|
-
|
|
140
|
+
Tn(n);
|
|
141
141
|
}
|
|
142
|
-
return t !== void 0 && (e.x = t), e.i = !0,
|
|
142
|
+
return t !== void 0 && (e.x = t), e.i = !0, J = e.p, t ?? /** @type {T} */
|
|
143
143
|
{};
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function Yi() {
|
|
146
146
|
return !0;
|
|
147
147
|
}
|
|
148
|
-
let
|
|
149
|
-
function
|
|
150
|
-
var t =
|
|
151
|
-
|
|
148
|
+
let Me = [];
|
|
149
|
+
function Xi() {
|
|
150
|
+
var t = Me;
|
|
151
|
+
Me = [], ir(t);
|
|
152
152
|
}
|
|
153
|
-
function
|
|
154
|
-
if (
|
|
155
|
-
var e =
|
|
153
|
+
function Be(t) {
|
|
154
|
+
if (Me.length === 0 && !ut) {
|
|
155
|
+
var e = Me;
|
|
156
156
|
queueMicrotask(() => {
|
|
157
|
-
e ===
|
|
157
|
+
e === Me && Xi();
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
Me.push(t);
|
|
161
161
|
}
|
|
162
|
-
function
|
|
163
|
-
for (;
|
|
164
|
-
|
|
162
|
+
function wr() {
|
|
163
|
+
for (; Me.length > 0; )
|
|
164
|
+
Xi();
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function Qi(t) {
|
|
167
167
|
var e = w;
|
|
168
168
|
if (e === null)
|
|
169
|
-
return b.f |=
|
|
170
|
-
if ((e.f &
|
|
169
|
+
return b.f |= ft, t;
|
|
170
|
+
if ((e.f & ze) === 0 && (e.f & rt) === 0)
|
|
171
171
|
throw t;
|
|
172
|
-
|
|
172
|
+
qe(t, e);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function qe(t, e) {
|
|
175
175
|
for (; e !== null; ) {
|
|
176
|
-
if ((e.f &
|
|
177
|
-
if ((e.f &
|
|
176
|
+
if ((e.f & jt) !== 0) {
|
|
177
|
+
if ((e.f & ze) === 0)
|
|
178
178
|
throw t;
|
|
179
179
|
try {
|
|
180
180
|
e.b.error(t);
|
|
@@ -187,32 +187,32 @@ function je(t, e) {
|
|
|
187
187
|
}
|
|
188
188
|
throw t;
|
|
189
189
|
}
|
|
190
|
-
const
|
|
190
|
+
const Ir = -7169;
|
|
191
191
|
function L(t, e) {
|
|
192
|
-
t.f = t.f &
|
|
192
|
+
t.f = t.f & Ir | e;
|
|
193
193
|
}
|
|
194
|
-
function
|
|
195
|
-
(t.f &
|
|
194
|
+
function ui(t) {
|
|
195
|
+
(t.f & X) !== 0 || t.deps === null ? L(t, D) : L(t, re);
|
|
196
196
|
}
|
|
197
|
-
function
|
|
197
|
+
function Ji(t) {
|
|
198
198
|
if (t !== null)
|
|
199
199
|
for (const e of t)
|
|
200
|
-
(e.f &
|
|
200
|
+
(e.f & M) === 0 || (e.f & Ge) === 0 || (e.f ^= Ge, Ji(
|
|
201
201
|
/** @type {Derived} */
|
|
202
202
|
e.deps
|
|
203
203
|
));
|
|
204
204
|
}
|
|
205
|
-
function
|
|
206
|
-
(t.f & H) !== 0 ? e.add(t) : (t.f &
|
|
205
|
+
function Zi(t, e, i) {
|
|
206
|
+
(t.f & H) !== 0 ? e.add(t) : (t.f & re) !== 0 && i.add(t), Ji(t.deps), L(t, D);
|
|
207
207
|
}
|
|
208
|
-
const
|
|
209
|
-
let P = null,
|
|
210
|
-
var
|
|
211
|
-
const
|
|
208
|
+
const bt = /* @__PURE__ */ new Set();
|
|
209
|
+
let P = null, ee = null, V = [], Nt = null, ut = !1, it = null, Sr = 1;
|
|
210
|
+
var we, Ue, De, We, Ye, Xe, Ie, se, Qe, z, Kt, Ut, Wt, Yt;
|
|
211
|
+
const bi = class bi {
|
|
212
212
|
constructor() {
|
|
213
213
|
T(this, z);
|
|
214
214
|
// for debugging. TODO remove once async is stable
|
|
215
|
-
d(this, "id",
|
|
215
|
+
d(this, "id", Sr++);
|
|
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`
|
|
@@ -230,36 +230,36 @@ const vi = class vi {
|
|
|
230
230
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
231
231
|
* @type {Set<(batch: Batch) => void>}
|
|
232
232
|
*/
|
|
233
|
-
T(this,
|
|
233
|
+
T(this, we, /* @__PURE__ */ new Set());
|
|
234
234
|
/**
|
|
235
235
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
236
236
|
* @type {Set<(batch: Batch) => void>}
|
|
237
237
|
*/
|
|
238
|
-
T(this,
|
|
238
|
+
T(this, Ue, /* @__PURE__ */ new Set());
|
|
239
239
|
/**
|
|
240
240
|
* The number of async effects that are currently in flight
|
|
241
241
|
*/
|
|
242
|
-
T(this,
|
|
242
|
+
T(this, De, 0);
|
|
243
243
|
/**
|
|
244
244
|
* The number of async effects that are currently in flight, _not_ inside a pending boundary
|
|
245
245
|
*/
|
|
246
|
-
T(this,
|
|
246
|
+
T(this, We, 0);
|
|
247
247
|
/**
|
|
248
248
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
249
249
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
250
250
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
251
251
|
*/
|
|
252
|
-
T(this,
|
|
252
|
+
T(this, Ye, null);
|
|
253
253
|
/**
|
|
254
254
|
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
255
255
|
* @type {Set<Effect>}
|
|
256
256
|
*/
|
|
257
|
-
T(this,
|
|
257
|
+
T(this, Xe, /* @__PURE__ */ new Set());
|
|
258
258
|
/**
|
|
259
259
|
* Deferred effects that are MAYBE_DIRTY
|
|
260
260
|
* @type {Set<Effect>}
|
|
261
261
|
*/
|
|
262
|
-
T(this,
|
|
262
|
+
T(this, Ie, /* @__PURE__ */ new Set());
|
|
263
263
|
/**
|
|
264
264
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
265
265
|
* is committed — we skip over these during `process`.
|
|
@@ -269,7 +269,7 @@ const vi = class vi {
|
|
|
269
269
|
*/
|
|
270
270
|
T(this, se, /* @__PURE__ */ new Map());
|
|
271
271
|
d(this, "is_fork", !1);
|
|
272
|
-
T(this,
|
|
272
|
+
T(this, Qe, !1);
|
|
273
273
|
}
|
|
274
274
|
/**
|
|
275
275
|
* Add an effect to the #skipped_branches map and reset its children
|
|
@@ -288,9 +288,9 @@ const vi = class vi {
|
|
|
288
288
|
if (i) {
|
|
289
289
|
c(this, se).delete(e);
|
|
290
290
|
for (var n of i.d)
|
|
291
|
-
L(n, H),
|
|
291
|
+
L(n, H), ce(n);
|
|
292
292
|
for (n of i.m)
|
|
293
|
-
L(n,
|
|
293
|
+
L(n, re), ce(n);
|
|
294
294
|
}
|
|
295
295
|
}
|
|
296
296
|
/**
|
|
@@ -299,19 +299,19 @@ const vi = class vi {
|
|
|
299
299
|
*/
|
|
300
300
|
process(e) {
|
|
301
301
|
V = [], this.apply();
|
|
302
|
-
var i =
|
|
302
|
+
var i = it = [], n = [];
|
|
303
303
|
for (const r of e)
|
|
304
|
-
E(this, z,
|
|
305
|
-
if (
|
|
306
|
-
E(this, z,
|
|
307
|
-
for (const [r,
|
|
308
|
-
|
|
304
|
+
E(this, z, Ut).call(this, r, i, n);
|
|
305
|
+
if (it = null, E(this, z, Kt).call(this)) {
|
|
306
|
+
E(this, z, Wt).call(this, n), E(this, z, Wt).call(this, i);
|
|
307
|
+
for (const [r, o] of c(this, se))
|
|
308
|
+
rn(r, o);
|
|
309
309
|
} else {
|
|
310
310
|
P = null;
|
|
311
|
-
for (const r of c(this,
|
|
312
|
-
c(this,
|
|
311
|
+
for (const r of c(this, we)) r(this);
|
|
312
|
+
c(this, we).clear(), c(this, De) === 0 && E(this, z, Yt).call(this), Ii(n), Ii(i), c(this, Xe).clear(), c(this, Ie).clear(), c(this, Ye)?.resolve();
|
|
313
313
|
}
|
|
314
|
-
|
|
314
|
+
ee = null;
|
|
315
315
|
}
|
|
316
316
|
/**
|
|
317
317
|
* Associate a change to a given source with the current
|
|
@@ -320,65 +320,65 @@ const vi = class vi {
|
|
|
320
320
|
* @param {any} value
|
|
321
321
|
*/
|
|
322
322
|
capture(e, i) {
|
|
323
|
-
i !==
|
|
323
|
+
i !== N && !this.previous.has(e) && this.previous.set(e, i), (e.f & ft) === 0 && (this.current.set(e, e.v), ee?.set(e, e.v));
|
|
324
324
|
}
|
|
325
325
|
activate() {
|
|
326
326
|
P = this, this.apply();
|
|
327
327
|
}
|
|
328
328
|
deactivate() {
|
|
329
|
-
P === this && (P = null,
|
|
329
|
+
P === this && (P = null, ee = null);
|
|
330
330
|
}
|
|
331
331
|
flush() {
|
|
332
332
|
if (V.length > 0)
|
|
333
|
-
P = this,
|
|
334
|
-
else if (c(this,
|
|
335
|
-
for (const e of c(this,
|
|
336
|
-
c(this,
|
|
333
|
+
P = this, en();
|
|
334
|
+
else if (c(this, De) === 0 && !this.is_fork) {
|
|
335
|
+
for (const e of c(this, we)) e(this);
|
|
336
|
+
c(this, we).clear(), E(this, z, Yt).call(this), c(this, Ye)?.resolve();
|
|
337
337
|
}
|
|
338
338
|
this.deactivate();
|
|
339
339
|
}
|
|
340
340
|
discard() {
|
|
341
|
-
for (const e of c(this,
|
|
342
|
-
c(this,
|
|
341
|
+
for (const e of c(this, Ue)) e(this);
|
|
342
|
+
c(this, Ue).clear();
|
|
343
343
|
}
|
|
344
344
|
/**
|
|
345
345
|
*
|
|
346
346
|
* @param {boolean} blocking
|
|
347
347
|
*/
|
|
348
348
|
increment(e) {
|
|
349
|
-
v(this,
|
|
349
|
+
v(this, De, c(this, De) + 1), e && v(this, We, c(this, We) + 1);
|
|
350
350
|
}
|
|
351
351
|
/**
|
|
352
352
|
*
|
|
353
353
|
* @param {boolean} blocking
|
|
354
354
|
*/
|
|
355
355
|
decrement(e) {
|
|
356
|
-
v(this,
|
|
357
|
-
v(this,
|
|
356
|
+
v(this, De, c(this, De) - 1), e && v(this, We, c(this, We) - 1), !c(this, Qe) && (v(this, Qe, !0), Be(() => {
|
|
357
|
+
v(this, Qe, !1), E(this, z, Kt).call(this) ? V.length > 0 && this.flush() : this.revive();
|
|
358
358
|
}));
|
|
359
359
|
}
|
|
360
360
|
revive() {
|
|
361
|
-
for (const e of c(this,
|
|
362
|
-
c(this,
|
|
363
|
-
for (const e of c(this,
|
|
364
|
-
L(e,
|
|
361
|
+
for (const e of c(this, Xe))
|
|
362
|
+
c(this, Ie).delete(e), L(e, H), ce(e);
|
|
363
|
+
for (const e of c(this, Ie))
|
|
364
|
+
L(e, re), ce(e);
|
|
365
365
|
this.flush();
|
|
366
366
|
}
|
|
367
367
|
/** @param {(batch: Batch) => void} fn */
|
|
368
368
|
oncommit(e) {
|
|
369
|
-
c(this,
|
|
369
|
+
c(this, we).add(e);
|
|
370
370
|
}
|
|
371
371
|
/** @param {(batch: Batch) => void} fn */
|
|
372
372
|
ondiscard(e) {
|
|
373
|
-
c(this,
|
|
373
|
+
c(this, Ue).add(e);
|
|
374
374
|
}
|
|
375
375
|
settled() {
|
|
376
|
-
return (c(this,
|
|
376
|
+
return (c(this, Ye) ?? v(this, Ye, nr())).promise;
|
|
377
377
|
}
|
|
378
378
|
static ensure() {
|
|
379
379
|
if (P === null) {
|
|
380
|
-
const e = P = new
|
|
381
|
-
|
|
380
|
+
const e = P = new bi();
|
|
381
|
+
bt.add(P), ut || Be(() => {
|
|
382
382
|
P === e && e.flush();
|
|
383
383
|
});
|
|
384
384
|
}
|
|
@@ -387,8 +387,8 @@ const vi = class vi {
|
|
|
387
387
|
apply() {
|
|
388
388
|
}
|
|
389
389
|
};
|
|
390
|
-
|
|
391
|
-
return this.is_fork || c(this,
|
|
390
|
+
we = new WeakMap(), Ue = new WeakMap(), De = new WeakMap(), We = new WeakMap(), Ye = new WeakMap(), Xe = new WeakMap(), Ie = new WeakMap(), se = new WeakMap(), Qe = new WeakMap(), z = new WeakSet(), Kt = function() {
|
|
391
|
+
return this.is_fork || c(this, We) > 0;
|
|
392
392
|
}, /**
|
|
393
393
|
* Traverse the effect tree, executing effects or stashing
|
|
394
394
|
* them for later execution as appropriate
|
|
@@ -396,12 +396,12 @@ Ae = new WeakMap(), Ke = new WeakMap(), Me = new WeakMap(), Ue = new WeakMap(),
|
|
|
396
396
|
* @param {Effect[]} effects
|
|
397
397
|
* @param {Effect[]} render_effects
|
|
398
398
|
*/
|
|
399
|
-
|
|
400
|
-
e.f ^=
|
|
399
|
+
Ut = function(e, i, n) {
|
|
400
|
+
e.f ^= D;
|
|
401
401
|
for (var r = e.first; r !== null; ) {
|
|
402
|
-
var
|
|
402
|
+
var o = r.f, s = (o & (be | Re)) !== 0, a = s && (o & D) !== 0, l = (o & Ee) !== 0, u = a || c(this, se).has(r);
|
|
403
403
|
if (!u && r.fn !== null) {
|
|
404
|
-
|
|
404
|
+
s ? l || (r.f ^= D) : (o & rt) !== 0 ? i.push(r) : (o & (Ot | li)) !== 0 && l ? n.push(r) : gt(r) && (nt(r), (o & Oe) !== 0 && (c(this, Ie).add(r), l && L(r, H)));
|
|
405
405
|
var f = r.first;
|
|
406
406
|
if (f !== null) {
|
|
407
407
|
r = f;
|
|
@@ -420,136 +420,136 @@ Kt = function(e, i, n) {
|
|
|
420
420
|
}, /**
|
|
421
421
|
* @param {Effect[]} effects
|
|
422
422
|
*/
|
|
423
|
-
|
|
423
|
+
Wt = function(e) {
|
|
424
424
|
for (var i = 0; i < e.length; i += 1)
|
|
425
|
-
|
|
426
|
-
},
|
|
427
|
-
var
|
|
428
|
-
if (
|
|
425
|
+
Zi(e[i], c(this, Xe), c(this, Ie));
|
|
426
|
+
}, Yt = function() {
|
|
427
|
+
var o;
|
|
428
|
+
if (bt.size > 1) {
|
|
429
429
|
this.previous.clear();
|
|
430
|
-
var e = P, i =
|
|
431
|
-
for (const
|
|
432
|
-
if (
|
|
430
|
+
var e = P, i = ee, n = !0;
|
|
431
|
+
for (const s of bt) {
|
|
432
|
+
if (s === this) {
|
|
433
433
|
n = !1;
|
|
434
434
|
continue;
|
|
435
435
|
}
|
|
436
436
|
const a = [];
|
|
437
437
|
for (const [u, f] of this.current) {
|
|
438
|
-
if (
|
|
439
|
-
if (n && f !==
|
|
440
|
-
|
|
438
|
+
if (s.current.has(u))
|
|
439
|
+
if (n && f !== s.current.get(u))
|
|
440
|
+
s.current.set(u, f);
|
|
441
441
|
else
|
|
442
442
|
continue;
|
|
443
443
|
a.push(u);
|
|
444
444
|
}
|
|
445
445
|
if (a.length === 0)
|
|
446
446
|
continue;
|
|
447
|
-
const l = [...
|
|
447
|
+
const l = [...s.current.keys()].filter((u) => !this.current.has(u));
|
|
448
448
|
if (l.length > 0) {
|
|
449
449
|
var r = V;
|
|
450
450
|
V = [];
|
|
451
451
|
const u = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
|
|
452
452
|
for (const h of a)
|
|
453
|
-
|
|
453
|
+
tn(h, l, u, f);
|
|
454
454
|
if (V.length > 0) {
|
|
455
|
-
P =
|
|
455
|
+
P = s, s.apply();
|
|
456
456
|
for (const h of V)
|
|
457
|
-
E(
|
|
458
|
-
|
|
457
|
+
E(o = s, z, Ut).call(o, h, [], []);
|
|
458
|
+
s.deactivate();
|
|
459
459
|
}
|
|
460
460
|
V = r;
|
|
461
461
|
}
|
|
462
462
|
}
|
|
463
|
-
P = e,
|
|
463
|
+
P = e, ee = i;
|
|
464
464
|
}
|
|
465
|
-
c(this, se).clear(),
|
|
465
|
+
c(this, se).clear(), bt.delete(this);
|
|
466
466
|
};
|
|
467
|
-
let
|
|
468
|
-
function
|
|
469
|
-
var e =
|
|
470
|
-
|
|
467
|
+
let ve = bi;
|
|
468
|
+
function fe(t) {
|
|
469
|
+
var e = ut;
|
|
470
|
+
ut = !0;
|
|
471
471
|
try {
|
|
472
472
|
for (var i; ; ) {
|
|
473
|
-
if (
|
|
473
|
+
if (wr(), V.length === 0 && (P?.flush(), V.length === 0))
|
|
474
474
|
return Nt = null, /** @type {T} */
|
|
475
475
|
i;
|
|
476
|
-
|
|
476
|
+
en();
|
|
477
477
|
}
|
|
478
478
|
} finally {
|
|
479
|
-
|
|
479
|
+
ut = e;
|
|
480
480
|
}
|
|
481
481
|
}
|
|
482
|
-
function
|
|
482
|
+
function en() {
|
|
483
483
|
var t = null;
|
|
484
484
|
try {
|
|
485
485
|
for (var e = 0; V.length > 0; ) {
|
|
486
|
-
var i =
|
|
486
|
+
var i = ve.ensure();
|
|
487
487
|
if (e++ > 1e3) {
|
|
488
488
|
var n, r;
|
|
489
|
-
|
|
489
|
+
Er();
|
|
490
490
|
}
|
|
491
|
-
i.process(V),
|
|
491
|
+
i.process(V), $e.clear();
|
|
492
492
|
}
|
|
493
493
|
} finally {
|
|
494
|
-
V = [], Nt = null,
|
|
494
|
+
V = [], Nt = null, it = null;
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
|
-
function
|
|
497
|
+
function Er() {
|
|
498
498
|
try {
|
|
499
|
-
|
|
499
|
+
dr();
|
|
500
500
|
} catch (t) {
|
|
501
|
-
|
|
501
|
+
qe(t, Nt);
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
let
|
|
505
|
-
function
|
|
504
|
+
let he = null;
|
|
505
|
+
function Ii(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 & (
|
|
511
|
-
|
|
512
|
-
for (const r of
|
|
513
|
-
if ((r.f & (
|
|
514
|
-
const
|
|
515
|
-
let
|
|
516
|
-
for (;
|
|
517
|
-
|
|
518
|
-
for (let a =
|
|
519
|
-
const l =
|
|
520
|
-
(l.f & (
|
|
510
|
+
if ((n.f & (Ce | Ee)) === 0 && gt(n) && (he = /* @__PURE__ */ new Set(), nt(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && wn(n), he?.size > 0)) {
|
|
511
|
+
$e.clear();
|
|
512
|
+
for (const r of he) {
|
|
513
|
+
if ((r.f & (Ce | Ee)) !== 0) continue;
|
|
514
|
+
const o = [r];
|
|
515
|
+
let s = r.parent;
|
|
516
|
+
for (; s !== null; )
|
|
517
|
+
he.has(s) && (he.delete(s), o.push(s)), s = s.parent;
|
|
518
|
+
for (let a = o.length - 1; a >= 0; a--) {
|
|
519
|
+
const l = o[a];
|
|
520
|
+
(l.f & (Ce | Ee)) === 0 && nt(l);
|
|
521
521
|
}
|
|
522
522
|
}
|
|
523
|
-
|
|
523
|
+
he.clear();
|
|
524
524
|
}
|
|
525
525
|
}
|
|
526
|
-
|
|
526
|
+
he = null;
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
function
|
|
529
|
+
function tn(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
|
-
const
|
|
533
|
-
(
|
|
532
|
+
const o = r.f;
|
|
533
|
+
(o & M) !== 0 ? tn(
|
|
534
534
|
/** @type {Derived} */
|
|
535
535
|
r,
|
|
536
536
|
e,
|
|
537
537
|
i,
|
|
538
538
|
n
|
|
539
|
-
) : (
|
|
539
|
+
) : (o & (zi | Oe)) !== 0 && (o & H) === 0 && nn(r, e, n) && (L(r, H), ce(
|
|
540
540
|
/** @type {Effect} */
|
|
541
541
|
r
|
|
542
542
|
));
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function nn(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
|
-
if (
|
|
550
|
+
if (tt.call(e, r))
|
|
551
551
|
return !0;
|
|
552
|
-
if ((r.f &
|
|
552
|
+
if ((r.f & M) !== 0 && nn(
|
|
553
553
|
/** @type {Derived} */
|
|
554
554
|
r,
|
|
555
555
|
e,
|
|
@@ -563,48 +563,48 @@ function tn(t, e, i) {
|
|
|
563
563
|
}
|
|
564
564
|
return i.set(t, !1), !1;
|
|
565
565
|
}
|
|
566
|
-
function
|
|
566
|
+
function ce(t) {
|
|
567
567
|
var e = Nt = t, i = e.b;
|
|
568
|
-
if (i?.is_pending && (t.f & (
|
|
568
|
+
if (i?.is_pending && (t.f & (rt | Ot | li)) !== 0 && (t.f & ze) === 0) {
|
|
569
569
|
i.defer_effect(t);
|
|
570
570
|
return;
|
|
571
571
|
}
|
|
572
572
|
for (; e.parent !== null; ) {
|
|
573
573
|
e = e.parent;
|
|
574
574
|
var n = e.f;
|
|
575
|
-
if (
|
|
575
|
+
if (it !== null && e === w && (t.f & Ot) === 0)
|
|
576
576
|
return;
|
|
577
|
-
if ((n & (Re |
|
|
578
|
-
if ((n &
|
|
577
|
+
if ((n & (Re | be)) !== 0) {
|
|
578
|
+
if ((n & D) === 0)
|
|
579
579
|
return;
|
|
580
|
-
e.f ^=
|
|
580
|
+
e.f ^= D;
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
583
|
V.push(e);
|
|
584
584
|
}
|
|
585
|
-
function
|
|
586
|
-
if (!((t.f &
|
|
587
|
-
(t.f & H) !== 0 ? e.d.push(t) : (t.f &
|
|
585
|
+
function rn(t, e) {
|
|
586
|
+
if (!((t.f & be) !== 0 && (t.f & D) !== 0)) {
|
|
587
|
+
(t.f & H) !== 0 ? e.d.push(t) : (t.f & re) !== 0 && e.m.push(t), L(t, D);
|
|
588
588
|
for (var i = t.first; i !== null; )
|
|
589
|
-
|
|
589
|
+
rn(i, e), i = i.next;
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
function
|
|
593
|
-
let e = 0, i =
|
|
592
|
+
function Cr(t) {
|
|
593
|
+
let e = 0, i = Dt(0), n;
|
|
594
594
|
return () => {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
e -= 1, e === 0 && (n?.(), n = void 0,
|
|
595
|
+
fi() && (m(i), hi(() => (e === 0 && (n = mi(() => t(() => dt(i)))), e += 1, () => {
|
|
596
|
+
Be(() => {
|
|
597
|
+
e -= 1, e === 0 && (n?.(), n = void 0, dt(i));
|
|
598
598
|
});
|
|
599
599
|
})));
|
|
600
600
|
};
|
|
601
601
|
}
|
|
602
|
-
var
|
|
603
|
-
function
|
|
604
|
-
new
|
|
602
|
+
var $r = Rt | ot;
|
|
603
|
+
function kr(t, e, i, n) {
|
|
604
|
+
new Lr(t, e, i, n);
|
|
605
605
|
}
|
|
606
|
-
var q,
|
|
607
|
-
class
|
|
606
|
+
var q, mt, le, Fe, B, ae, K, Z, pe, xe, Se, Je, Ze, et, me, Mt, $, on, sn, ln, Xt, At, wt, Qt;
|
|
607
|
+
class Lr {
|
|
608
608
|
/**
|
|
609
609
|
* @param {TemplateNode} node
|
|
610
610
|
* @param {BoundaryProps} props
|
|
@@ -625,28 +625,28 @@ class Or {
|
|
|
625
625
|
/** @type {TemplateNode} */
|
|
626
626
|
T(this, q);
|
|
627
627
|
/** @type {TemplateNode | null} */
|
|
628
|
-
T(this,
|
|
628
|
+
T(this, mt, te ? x : null);
|
|
629
629
|
/** @type {BoundaryProps} */
|
|
630
|
-
T(this,
|
|
630
|
+
T(this, le);
|
|
631
631
|
/** @type {((anchor: Node) => void)} */
|
|
632
632
|
T(this, Fe);
|
|
633
633
|
/** @type {Effect} */
|
|
634
634
|
T(this, B);
|
|
635
635
|
/** @type {Effect | null} */
|
|
636
|
-
T(this,
|
|
636
|
+
T(this, ae, null);
|
|
637
637
|
/** @type {Effect | null} */
|
|
638
638
|
T(this, K, null);
|
|
639
639
|
/** @type {Effect | null} */
|
|
640
|
-
T(this,
|
|
640
|
+
T(this, Z, null);
|
|
641
641
|
/** @type {DocumentFragment | null} */
|
|
642
|
-
T(this,
|
|
642
|
+
T(this, pe, null);
|
|
643
643
|
T(this, xe, 0);
|
|
644
|
-
T(this,
|
|
645
|
-
T(this,
|
|
646
|
-
/** @type {Set<Effect>} */
|
|
647
|
-
T(this, Je, /* @__PURE__ */ new Set());
|
|
644
|
+
T(this, Se, 0);
|
|
645
|
+
T(this, Je, !1);
|
|
648
646
|
/** @type {Set<Effect>} */
|
|
649
647
|
T(this, Ze, /* @__PURE__ */ new Set());
|
|
648
|
+
/** @type {Set<Effect>} */
|
|
649
|
+
T(this, et, /* @__PURE__ */ new Set());
|
|
650
650
|
/**
|
|
651
651
|
* A source containing the number of pending async deriveds/expressions.
|
|
652
652
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -654,39 +654,39 @@ class Or {
|
|
|
654
654
|
* calls followed by no-op flushes
|
|
655
655
|
* @type {Source<number> | null}
|
|
656
656
|
*/
|
|
657
|
-
T(this,
|
|
658
|
-
T(this,
|
|
659
|
-
v(this,
|
|
657
|
+
T(this, me, null);
|
|
658
|
+
T(this, Mt, Cr(() => (v(this, me, Dt(c(this, xe))), () => {
|
|
659
|
+
v(this, me, null);
|
|
660
660
|
})));
|
|
661
|
-
v(this, q, e), v(this,
|
|
662
|
-
var
|
|
661
|
+
v(this, q, e), v(this, le, i), v(this, Fe, (o) => {
|
|
662
|
+
var s = (
|
|
663
663
|
/** @type {Effect} */
|
|
664
664
|
w
|
|
665
665
|
);
|
|
666
|
-
|
|
666
|
+
s.b = this, s.f |= jt, n(o);
|
|
667
667
|
}), this.parent = /** @type {Effect} */
|
|
668
|
-
w.b, this.transform_error = r ?? this.parent?.transform_error ?? ((
|
|
669
|
-
if (
|
|
670
|
-
const
|
|
668
|
+
w.b, this.transform_error = r ?? this.parent?.transform_error ?? ((o) => o), v(this, B, Gr(() => {
|
|
669
|
+
if (te) {
|
|
670
|
+
const o = (
|
|
671
671
|
/** @type {Comment} */
|
|
672
|
-
c(this,
|
|
672
|
+
c(this, mt)
|
|
673
673
|
);
|
|
674
|
-
|
|
675
|
-
const
|
|
676
|
-
if (
|
|
677
|
-
const l = JSON.parse(
|
|
674
|
+
qi();
|
|
675
|
+
const s = o.data === Vi;
|
|
676
|
+
if (o.data.startsWith(Ti)) {
|
|
677
|
+
const l = JSON.parse(o.data.slice(Ti.length));
|
|
678
678
|
E(this, $, sn).call(this, l);
|
|
679
|
-
} else
|
|
679
|
+
} else s ? E(this, $, ln).call(this) : E(this, $, on).call(this);
|
|
680
680
|
} else
|
|
681
|
-
E(this, $,
|
|
682
|
-
},
|
|
681
|
+
E(this, $, Xt).call(this);
|
|
682
|
+
}, $r)), te && v(this, q, x);
|
|
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
|
+
Zi(e, c(this, Ze), c(this, et));
|
|
690
690
|
}
|
|
691
691
|
/**
|
|
692
692
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -696,7 +696,7 @@ class Or {
|
|
|
696
696
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
697
697
|
}
|
|
698
698
|
has_pending_snippet() {
|
|
699
|
-
return !!c(this,
|
|
699
|
+
return !!c(this, le).pending;
|
|
700
700
|
}
|
|
701
701
|
/**
|
|
702
702
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -705,59 +705,59 @@ class Or {
|
|
|
705
705
|
* @param {1 | -1} d
|
|
706
706
|
*/
|
|
707
707
|
update_pending_count(e) {
|
|
708
|
-
E(this, $,
|
|
709
|
-
v(this,
|
|
708
|
+
E(this, $, Qt).call(this, e), v(this, xe, c(this, xe) + e), !(!c(this, me) || c(this, Je)) && (v(this, Je, !0), Be(() => {
|
|
709
|
+
v(this, Je, !1), c(this, me) && fn(c(this, me), c(this, xe));
|
|
710
710
|
}));
|
|
711
711
|
}
|
|
712
712
|
get_effect_pending() {
|
|
713
|
-
return c(this,
|
|
713
|
+
return c(this, Mt).call(this), m(
|
|
714
714
|
/** @type {Source<number>} */
|
|
715
|
-
c(this,
|
|
715
|
+
c(this, me)
|
|
716
716
|
);
|
|
717
717
|
}
|
|
718
718
|
/** @param {unknown} error */
|
|
719
719
|
error(e) {
|
|
720
|
-
var i = c(this,
|
|
721
|
-
let n = c(this,
|
|
720
|
+
var i = c(this, le).onerror;
|
|
721
|
+
let n = c(this, le).failed;
|
|
722
722
|
if (!i && !n)
|
|
723
723
|
throw e;
|
|
724
|
-
c(this,
|
|
724
|
+
c(this, ae) && (ne(c(this, ae)), v(this, ae, null)), c(this, K) && (ne(c(this, K)), v(this, K, null)), c(this, Z) && (ne(c(this, Z)), v(this, Z, null)), te && (ht(
|
|
725
725
|
/** @type {TemplateNode} */
|
|
726
|
-
c(this,
|
|
727
|
-
),
|
|
728
|
-
var r = !1,
|
|
729
|
-
const
|
|
726
|
+
c(this, mt)
|
|
727
|
+
), br(), ht(yr()));
|
|
728
|
+
var r = !1, o = !1;
|
|
729
|
+
const s = () => {
|
|
730
730
|
if (r) {
|
|
731
|
-
|
|
731
|
+
vr();
|
|
732
732
|
return;
|
|
733
733
|
}
|
|
734
|
-
r = !0,
|
|
735
|
-
v(this,
|
|
736
|
-
}), E(this, $,
|
|
737
|
-
|
|
734
|
+
r = !0, o && gr(), c(this, Z) !== null && It(c(this, Z), () => {
|
|
735
|
+
v(this, Z, null);
|
|
736
|
+
}), E(this, $, wt).call(this, () => {
|
|
737
|
+
ve.ensure(), E(this, $, Xt).call(this);
|
|
738
738
|
});
|
|
739
739
|
}, a = (l) => {
|
|
740
740
|
try {
|
|
741
|
-
|
|
741
|
+
o = !0, i?.(l, s), o = !1;
|
|
742
742
|
} catch (u) {
|
|
743
|
-
|
|
743
|
+
qe(u, c(this, B) && c(this, B).parent);
|
|
744
744
|
}
|
|
745
|
-
n && v(this,
|
|
746
|
-
|
|
745
|
+
n && v(this, Z, E(this, $, wt).call(this, () => {
|
|
746
|
+
ve.ensure();
|
|
747
747
|
try {
|
|
748
|
-
return
|
|
748
|
+
return Pe(() => {
|
|
749
749
|
var u = (
|
|
750
750
|
/** @type {Effect} */
|
|
751
751
|
w
|
|
752
752
|
);
|
|
753
|
-
u.b = this, u.f |=
|
|
753
|
+
u.b = this, u.f |= jt, n(
|
|
754
754
|
c(this, q),
|
|
755
755
|
() => l,
|
|
756
|
-
() =>
|
|
756
|
+
() => s
|
|
757
757
|
);
|
|
758
758
|
});
|
|
759
759
|
} catch (u) {
|
|
760
|
-
return
|
|
760
|
+
return qe(
|
|
761
761
|
u,
|
|
762
762
|
/** @type {Effect} */
|
|
763
763
|
c(this, B).parent
|
|
@@ -765,26 +765,26 @@ class Or {
|
|
|
765
765
|
}
|
|
766
766
|
}));
|
|
767
767
|
};
|
|
768
|
-
|
|
768
|
+
Be(() => {
|
|
769
769
|
var l;
|
|
770
770
|
try {
|
|
771
771
|
l = this.transform_error(e);
|
|
772
772
|
} catch (u) {
|
|
773
|
-
|
|
773
|
+
qe(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
|
-
(u) =>
|
|
780
|
+
(u) => qe(u, c(this, B) && c(this, B).parent)
|
|
781
781
|
) : a(l);
|
|
782
782
|
});
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
q = new WeakMap(),
|
|
785
|
+
q = new WeakMap(), mt = new WeakMap(), le = new WeakMap(), Fe = new WeakMap(), B = new WeakMap(), ae = new WeakMap(), K = new WeakMap(), Z = new WeakMap(), pe = new WeakMap(), xe = new WeakMap(), Se = new WeakMap(), Je = new WeakMap(), Ze = new WeakMap(), et = new WeakMap(), me = new WeakMap(), Mt = new WeakMap(), $ = new WeakSet(), on = function() {
|
|
786
786
|
try {
|
|
787
|
-
v(this,
|
|
787
|
+
v(this, ae, Pe(() => c(this, Fe).call(this, c(this, q))));
|
|
788
788
|
} catch (e) {
|
|
789
789
|
this.error(e);
|
|
790
790
|
}
|
|
@@ -792,8 +792,8 @@ q = new WeakMap(), pt = new WeakMap(), oe = new WeakMap(), Fe = new WeakMap(), B
|
|
|
792
792
|
* @param {unknown} error The deserialized error from the server's hydration comment
|
|
793
793
|
*/
|
|
794
794
|
sn = function(e) {
|
|
795
|
-
const i = c(this,
|
|
796
|
-
i && v(this,
|
|
795
|
+
const i = c(this, le).failed;
|
|
796
|
+
i && v(this, Z, Pe(() => {
|
|
797
797
|
i(
|
|
798
798
|
c(this, q),
|
|
799
799
|
() => e,
|
|
@@ -801,89 +801,89 @@ sn = function(e) {
|
|
|
801
801
|
}
|
|
802
802
|
);
|
|
803
803
|
}));
|
|
804
|
-
},
|
|
805
|
-
const e = c(this,
|
|
806
|
-
e && (this.is_pending = !0, v(this, K,
|
|
807
|
-
var i = v(this,
|
|
808
|
-
i.append(n), v(this,
|
|
804
|
+
}, ln = function() {
|
|
805
|
+
const e = c(this, le).pending;
|
|
806
|
+
e && (this.is_pending = !0, v(this, K, Pe(() => e(c(this, q)))), Be(() => {
|
|
807
|
+
var i = v(this, pe, document.createDocumentFragment()), n = vn();
|
|
808
|
+
i.append(n), v(this, ae, E(this, $, wt).call(this, () => (ve.ensure(), Pe(() => c(this, Fe).call(this, n))))), c(this, Se) === 0 && (c(this, q).before(i), v(this, pe, null), It(
|
|
809
809
|
/** @type {Effect} */
|
|
810
810
|
c(this, K),
|
|
811
811
|
() => {
|
|
812
812
|
v(this, K, null);
|
|
813
813
|
}
|
|
814
|
-
), E(this, $,
|
|
814
|
+
), E(this, $, At).call(this));
|
|
815
815
|
}));
|
|
816
|
-
},
|
|
816
|
+
}, Xt = function() {
|
|
817
817
|
try {
|
|
818
|
-
if (this.is_pending = this.has_pending_snippet(), v(this,
|
|
818
|
+
if (this.is_pending = this.has_pending_snippet(), v(this, Se, 0), v(this, xe, 0), v(this, ae, Pe(() => {
|
|
819
819
|
c(this, Fe).call(this, c(this, q));
|
|
820
|
-
})), c(this,
|
|
821
|
-
var e = v(this,
|
|
822
|
-
|
|
820
|
+
})), c(this, Se) > 0) {
|
|
821
|
+
var e = v(this, pe, document.createDocumentFragment());
|
|
822
|
+
qr(c(this, ae), e);
|
|
823
823
|
const i = (
|
|
824
824
|
/** @type {(anchor: Node) => void} */
|
|
825
|
-
c(this,
|
|
825
|
+
c(this, le).pending
|
|
826
826
|
);
|
|
827
|
-
v(this, K,
|
|
827
|
+
v(this, K, Pe(() => i(c(this, q))));
|
|
828
828
|
} else
|
|
829
|
-
E(this, $,
|
|
829
|
+
E(this, $, At).call(this);
|
|
830
830
|
} catch (i) {
|
|
831
831
|
this.error(i);
|
|
832
832
|
}
|
|
833
|
-
},
|
|
833
|
+
}, At = function() {
|
|
834
834
|
this.is_pending = !1;
|
|
835
|
-
for (const e of c(this, Je))
|
|
836
|
-
L(e, H), ae(e);
|
|
837
835
|
for (const e of c(this, Ze))
|
|
838
|
-
L(e,
|
|
839
|
-
|
|
836
|
+
L(e, H), ce(e);
|
|
837
|
+
for (const e of c(this, et))
|
|
838
|
+
L(e, re), ce(e);
|
|
839
|
+
c(this, Ze).clear(), c(this, et).clear();
|
|
840
840
|
}, /**
|
|
841
841
|
* @template T
|
|
842
842
|
* @param {() => T} fn
|
|
843
843
|
*/
|
|
844
|
-
|
|
845
|
-
var i = w, n = b, r =
|
|
846
|
-
|
|
844
|
+
wt = function(e) {
|
|
845
|
+
var i = w, n = b, r = J;
|
|
846
|
+
Le(c(this, B)), ue(c(this, B)), Pt(c(this, B).ctx);
|
|
847
847
|
try {
|
|
848
848
|
return e();
|
|
849
|
-
} catch (
|
|
850
|
-
return
|
|
849
|
+
} catch (o) {
|
|
850
|
+
return Qi(o), null;
|
|
851
851
|
} finally {
|
|
852
|
-
|
|
852
|
+
Le(i), ue(n), Pt(r);
|
|
853
853
|
}
|
|
854
854
|
}, /**
|
|
855
855
|
* Updates the pending count associated with the currently visible pending snippet,
|
|
856
856
|
* if any, such that we can replace the snippet with content once work is done
|
|
857
857
|
* @param {1 | -1} d
|
|
858
858
|
*/
|
|
859
|
-
|
|
859
|
+
Qt = function(e) {
|
|
860
860
|
var i;
|
|
861
861
|
if (!this.has_pending_snippet()) {
|
|
862
|
-
this.parent && E(i = this.parent, $,
|
|
862
|
+
this.parent && E(i = this.parent, $, Qt).call(i, e);
|
|
863
863
|
return;
|
|
864
864
|
}
|
|
865
|
-
v(this,
|
|
865
|
+
v(this, Se, c(this, Se) + e), c(this, Se) === 0 && (E(this, $, At).call(this), c(this, K) && It(c(this, K), () => {
|
|
866
866
|
v(this, K, null);
|
|
867
|
-
}), c(this,
|
|
867
|
+
}), c(this, pe) && (c(this, q).before(c(this, pe)), v(this, pe, null)));
|
|
868
868
|
};
|
|
869
869
|
// @__NO_SIDE_EFFECTS__
|
|
870
|
-
function
|
|
871
|
-
var e =
|
|
870
|
+
function an(t) {
|
|
871
|
+
var e = M | H, i = b !== null && (b.f & M) !== 0 ? (
|
|
872
872
|
/** @type {Derived} */
|
|
873
873
|
b
|
|
874
874
|
) : null;
|
|
875
|
-
return w !== null && (w.f |=
|
|
876
|
-
ctx:
|
|
875
|
+
return w !== null && (w.f |= ot), {
|
|
876
|
+
ctx: J,
|
|
877
877
|
deps: null,
|
|
878
878
|
effects: null,
|
|
879
|
-
equals:
|
|
879
|
+
equals: Ki,
|
|
880
880
|
f: e,
|
|
881
881
|
fn: t,
|
|
882
882
|
reactions: null,
|
|
883
883
|
rv: 0,
|
|
884
884
|
v: (
|
|
885
885
|
/** @type {V} */
|
|
886
|
-
|
|
886
|
+
N
|
|
887
887
|
),
|
|
888
888
|
wv: 0,
|
|
889
889
|
parent: i ?? w,
|
|
@@ -891,16 +891,16 @@ function ln(t) {
|
|
|
891
891
|
};
|
|
892
892
|
}
|
|
893
893
|
// @__NO_SIDE_EFFECTS__
|
|
894
|
-
function
|
|
895
|
-
const e = /* @__PURE__ */
|
|
896
|
-
return
|
|
894
|
+
function Si(t) {
|
|
895
|
+
const e = /* @__PURE__ */ an(t);
|
|
896
|
+
return Sn(e), e;
|
|
897
897
|
}
|
|
898
|
-
function
|
|
898
|
+
function Or(t) {
|
|
899
899
|
var e = t.effects;
|
|
900
900
|
if (e !== null) {
|
|
901
901
|
t.effects = null;
|
|
902
902
|
for (var i = 0; i < e.length; i += 1)
|
|
903
|
-
|
|
903
|
+
ne(
|
|
904
904
|
/** @type {Effect} */
|
|
905
905
|
e[i]
|
|
906
906
|
);
|
|
@@ -908,8 +908,8 @@ function Lr(t) {
|
|
|
908
908
|
}
|
|
909
909
|
function Rr(t) {
|
|
910
910
|
for (var e = t.parent; e !== null; ) {
|
|
911
|
-
if ((e.f &
|
|
912
|
-
return (e.f &
|
|
911
|
+
if ((e.f & M) === 0)
|
|
912
|
+
return (e.f & Ce) === 0 ? (
|
|
913
913
|
/** @type {Effect} */
|
|
914
914
|
e
|
|
915
915
|
) : null;
|
|
@@ -917,126 +917,126 @@ function Rr(t) {
|
|
|
917
917
|
}
|
|
918
918
|
return null;
|
|
919
919
|
}
|
|
920
|
-
function
|
|
920
|
+
function di(t) {
|
|
921
921
|
var e, i = w;
|
|
922
|
-
|
|
922
|
+
Le(Rr(t));
|
|
923
923
|
try {
|
|
924
|
-
t.f &= ~
|
|
924
|
+
t.f &= ~Ge, Or(t), e = kn(t);
|
|
925
925
|
} finally {
|
|
926
|
-
|
|
926
|
+
Le(i);
|
|
927
927
|
}
|
|
928
928
|
return e;
|
|
929
929
|
}
|
|
930
|
-
function
|
|
931
|
-
var e =
|
|
932
|
-
if (!t.equals(e) && (t.wv =
|
|
933
|
-
L(t,
|
|
930
|
+
function cn(t) {
|
|
931
|
+
var e = di(t);
|
|
932
|
+
if (!t.equals(e) && (t.wv = Cn(), (!P?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
|
|
933
|
+
L(t, D);
|
|
934
934
|
return;
|
|
935
935
|
}
|
|
936
|
-
|
|
936
|
+
ke || (ee !== null ? (fi() || P?.is_fork) && ee.set(t, e) : ui(t));
|
|
937
937
|
}
|
|
938
|
-
function
|
|
938
|
+
function Pr(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(ai), e.teardown = tr, e.ac = null, pt(e, 0), pi(e));
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function un(t) {
|
|
944
944
|
if (t.effects !== null)
|
|
945
945
|
for (const e of t.effects)
|
|
946
|
-
e.teardown &&
|
|
946
|
+
e.teardown && nt(e);
|
|
947
947
|
}
|
|
948
|
-
let
|
|
949
|
-
const
|
|
950
|
-
let
|
|
951
|
-
function
|
|
948
|
+
let Jt = /* @__PURE__ */ new Set();
|
|
949
|
+
const $e = /* @__PURE__ */ new Map();
|
|
950
|
+
let dn = !1;
|
|
951
|
+
function Dt(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: Ki,
|
|
958
958
|
rv: 0,
|
|
959
959
|
wv: 0
|
|
960
960
|
};
|
|
961
961
|
return i;
|
|
962
962
|
}
|
|
963
963
|
// @__NO_SIDE_EFFECTS__
|
|
964
|
-
function
|
|
965
|
-
const i =
|
|
966
|
-
return
|
|
964
|
+
function F(t, e) {
|
|
965
|
+
const i = Dt(t);
|
|
966
|
+
return Sn(i), i;
|
|
967
967
|
}
|
|
968
968
|
// @__NO_SIDE_EFFECTS__
|
|
969
|
-
function
|
|
970
|
-
const n =
|
|
971
|
-
return e || (n.equals =
|
|
969
|
+
function Hr(t, e = !1, i = !0) {
|
|
970
|
+
const n = Dt(t);
|
|
971
|
+
return e || (n.equals = Tr), 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
|
-
(!
|
|
977
|
-
let n = i ?
|
|
978
|
-
return
|
|
976
|
+
(!ie || (b.f & wi) !== 0) && Yi() && (b.f & (M | Oe | zi | wi)) !== 0 && (Q === null || !tt.call(Q, t)) && mr();
|
|
977
|
+
let n = i ? ct(e) : e;
|
|
978
|
+
return fn(t, n);
|
|
979
979
|
}
|
|
980
|
-
function
|
|
980
|
+
function fn(t, e) {
|
|
981
981
|
if (!t.equals(e)) {
|
|
982
982
|
var i = t.v;
|
|
983
|
-
|
|
984
|
-
var n =
|
|
985
|
-
if (n.capture(t, i), (t.f &
|
|
983
|
+
ke ? $e.set(t, e) : $e.set(t, i), t.v = e;
|
|
984
|
+
var n = ve.ensure();
|
|
985
|
+
if (n.capture(t, i), (t.f & M) !== 0) {
|
|
986
986
|
const r = (
|
|
987
987
|
/** @type {Derived} */
|
|
988
988
|
t
|
|
989
989
|
);
|
|
990
|
-
(t.f & H) !== 0 &&
|
|
990
|
+
(t.f & H) !== 0 && di(r), ui(r);
|
|
991
991
|
}
|
|
992
|
-
t.wv =
|
|
992
|
+
t.wv = Cn(), hn(t, H), w !== null && (w.f & D) !== 0 && (w.f & (be | Re)) === 0 && (W === null ? Kr([t]) : W.push(t)), !n.is_fork && Jt.size > 0 && !dn && Mr();
|
|
993
993
|
}
|
|
994
994
|
return e;
|
|
995
995
|
}
|
|
996
|
-
function
|
|
997
|
-
|
|
998
|
-
for (const t of
|
|
999
|
-
(t.f &
|
|
1000
|
-
|
|
996
|
+
function Mr() {
|
|
997
|
+
dn = !1;
|
|
998
|
+
for (const t of Jt)
|
|
999
|
+
(t.f & D) !== 0 && L(t, re), gt(t) && nt(t);
|
|
1000
|
+
Jt.clear();
|
|
1001
1001
|
}
|
|
1002
|
-
function
|
|
1002
|
+
function dt(t) {
|
|
1003
1003
|
C(t, t.v + 1);
|
|
1004
1004
|
}
|
|
1005
|
-
function
|
|
1005
|
+
function hn(t, e) {
|
|
1006
1006
|
var i = t.reactions;
|
|
1007
1007
|
if (i !== null)
|
|
1008
1008
|
for (var n = i.length, r = 0; r < n; r++) {
|
|
1009
|
-
var
|
|
1010
|
-
if (a && L(
|
|
1009
|
+
var o = i[r], s = o.f, a = (s & H) === 0;
|
|
1010
|
+
if (a && L(o, e), (s & M) !== 0) {
|
|
1011
1011
|
var l = (
|
|
1012
1012
|
/** @type {Derived} */
|
|
1013
|
-
|
|
1013
|
+
o
|
|
1014
1014
|
);
|
|
1015
|
-
|
|
1016
|
-
} else a && ((
|
|
1015
|
+
ee?.delete(l), (s & Ge) === 0 && (s & X && (o.f |= Ge), hn(l, re));
|
|
1016
|
+
} else a && ((s & Oe) !== 0 && he !== null && he.add(
|
|
1017
1017
|
/** @type {Effect} */
|
|
1018
|
-
|
|
1019
|
-
),
|
|
1018
|
+
o
|
|
1019
|
+
), ce(
|
|
1020
1020
|
/** @type {Effect} */
|
|
1021
|
-
|
|
1021
|
+
o
|
|
1022
1022
|
));
|
|
1023
1023
|
}
|
|
1024
1024
|
}
|
|
1025
|
-
function
|
|
1026
|
-
if (typeof t != "object" || t === null ||
|
|
1025
|
+
function ct(t) {
|
|
1026
|
+
if (typeof t != "object" || t === null || Tt in t)
|
|
1027
1027
|
return t;
|
|
1028
|
-
const e =
|
|
1029
|
-
if (e !==
|
|
1028
|
+
const e = er(t);
|
|
1029
|
+
if (e !== Jn && e !== Zn)
|
|
1030
1030
|
return t;
|
|
1031
|
-
var i = /* @__PURE__ */ new Map(), n =
|
|
1032
|
-
if (
|
|
1031
|
+
var i = /* @__PURE__ */ new Map(), n = Yn(t), r = /* @__PURE__ */ F(0), o = Ve, s = (a) => {
|
|
1032
|
+
if (Ve === o)
|
|
1033
1033
|
return a();
|
|
1034
|
-
var l = b, u =
|
|
1035
|
-
|
|
1034
|
+
var l = b, u = Ve;
|
|
1035
|
+
ue(null), $i(o);
|
|
1036
1036
|
var f = a();
|
|
1037
|
-
return
|
|
1037
|
+
return ue(l), $i(u), f;
|
|
1038
1038
|
};
|
|
1039
|
-
return n && i.set("length", /* @__PURE__ */
|
|
1039
|
+
return n && i.set("length", /* @__PURE__ */ F(
|
|
1040
1040
|
/** @type {any[]} */
|
|
1041
1041
|
t.length
|
|
1042
1042
|
)), new Proxy(
|
|
@@ -1044,10 +1044,10 @@ function at(t) {
|
|
|
1044
1044
|
t,
|
|
1045
1045
|
{
|
|
1046
1046
|
defineProperty(a, l, u) {
|
|
1047
|
-
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) &&
|
|
1047
|
+
(!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && hr();
|
|
1048
1048
|
var f = i.get(l);
|
|
1049
|
-
return f === void 0 ?
|
|
1050
|
-
var h = /* @__PURE__ */
|
|
1049
|
+
return f === void 0 ? s(() => {
|
|
1050
|
+
var h = /* @__PURE__ */ F(u.value);
|
|
1051
1051
|
return i.set(l, h), h;
|
|
1052
1052
|
}) : C(f, u.value, !0), !0;
|
|
1053
1053
|
},
|
|
@@ -1055,23 +1055,23 @@ function at(t) {
|
|
|
1055
1055
|
var u = i.get(l);
|
|
1056
1056
|
if (u === void 0) {
|
|
1057
1057
|
if (l in a) {
|
|
1058
|
-
const f =
|
|
1059
|
-
i.set(l, f),
|
|
1058
|
+
const f = s(() => /* @__PURE__ */ F(N));
|
|
1059
|
+
i.set(l, f), dt(r);
|
|
1060
1060
|
}
|
|
1061
1061
|
} else
|
|
1062
|
-
C(u,
|
|
1062
|
+
C(u, N), dt(r);
|
|
1063
1063
|
return !0;
|
|
1064
1064
|
},
|
|
1065
1065
|
get(a, l, u) {
|
|
1066
|
-
if (l ===
|
|
1066
|
+
if (l === Tt)
|
|
1067
1067
|
return t;
|
|
1068
1068
|
var f = i.get(l), h = l in a;
|
|
1069
|
-
if (f === void 0 && (!h ||
|
|
1070
|
-
var y =
|
|
1069
|
+
if (f === void 0 && (!h || Ke(a, l)?.writable) && (f = s(() => {
|
|
1070
|
+
var y = ct(h ? a[l] : N), p = /* @__PURE__ */ F(y);
|
|
1071
1071
|
return p;
|
|
1072
1072
|
}), i.set(l, f)), f !== void 0) {
|
|
1073
1073
|
var g = m(f);
|
|
1074
|
-
return g ===
|
|
1074
|
+
return g === N ? void 0 : g;
|
|
1075
1075
|
}
|
|
1076
1076
|
return Reflect.get(a, l, u);
|
|
1077
1077
|
},
|
|
@@ -1082,7 +1082,7 @@ function at(t) {
|
|
|
1082
1082
|
f && (u.value = m(f));
|
|
1083
1083
|
} else if (u === void 0) {
|
|
1084
1084
|
var h = i.get(l), g = h?.v;
|
|
1085
|
-
if (h !== void 0 && g !==
|
|
1085
|
+
if (h !== void 0 && g !== N)
|
|
1086
1086
|
return {
|
|
1087
1087
|
enumerable: !0,
|
|
1088
1088
|
configurable: !0,
|
|
@@ -1093,16 +1093,16 @@ function at(t) {
|
|
|
1093
1093
|
return u;
|
|
1094
1094
|
},
|
|
1095
1095
|
has(a, l) {
|
|
1096
|
-
if (l ===
|
|
1096
|
+
if (l === Tt)
|
|
1097
1097
|
return !0;
|
|
1098
|
-
var u = i.get(l), f = u !== void 0 && u.v !==
|
|
1099
|
-
if (u !== void 0 || w !== null && (!f ||
|
|
1100
|
-
u === void 0 && (u =
|
|
1101
|
-
var g = f ?
|
|
1098
|
+
var u = i.get(l), f = u !== void 0 && u.v !== N || Reflect.has(a, l);
|
|
1099
|
+
if (u !== void 0 || w !== null && (!f || Ke(a, l)?.writable)) {
|
|
1100
|
+
u === void 0 && (u = s(() => {
|
|
1101
|
+
var g = f ? ct(a[l]) : N, y = /* @__PURE__ */ F(g);
|
|
1102
1102
|
return y;
|
|
1103
1103
|
}), i.set(l, u));
|
|
1104
1104
|
var h = m(u);
|
|
1105
|
-
if (h ===
|
|
1105
|
+
if (h === N)
|
|
1106
1106
|
return !1;
|
|
1107
1107
|
}
|
|
1108
1108
|
return f;
|
|
@@ -1113,25 +1113,25 @@ function at(t) {
|
|
|
1113
1113
|
for (var y = u; y < /** @type {Source<number>} */
|
|
1114
1114
|
h.v; y += 1) {
|
|
1115
1115
|
var p = i.get(y + "");
|
|
1116
|
-
p !== void 0 ? C(p,
|
|
1116
|
+
p !== void 0 ? C(p, N) : y in a && (p = s(() => /* @__PURE__ */ F(N)), i.set(y + "", p));
|
|
1117
1117
|
}
|
|
1118
1118
|
if (h === void 0)
|
|
1119
|
-
(!g ||
|
|
1119
|
+
(!g || Ke(a, l)?.writable) && (h = s(() => /* @__PURE__ */ F(void 0)), C(h, ct(u)), i.set(l, h));
|
|
1120
1120
|
else {
|
|
1121
|
-
g = h.v !==
|
|
1122
|
-
var S =
|
|
1121
|
+
g = h.v !== N;
|
|
1122
|
+
var S = s(() => ct(u));
|
|
1123
1123
|
C(h, S);
|
|
1124
1124
|
}
|
|
1125
1125
|
var _ = Reflect.getOwnPropertyDescriptor(a, l);
|
|
1126
1126
|
if (_?.set && _.set.call(f, u), !g) {
|
|
1127
1127
|
if (n && typeof l == "string") {
|
|
1128
|
-
var
|
|
1128
|
+
var O = (
|
|
1129
1129
|
/** @type {Source<number>} */
|
|
1130
1130
|
i.get("length")
|
|
1131
|
-
),
|
|
1132
|
-
Number.isInteger(
|
|
1131
|
+
), oe = Number(l);
|
|
1132
|
+
Number.isInteger(oe) && oe >= O.v && C(O, oe + 1);
|
|
1133
1133
|
}
|
|
1134
|
-
|
|
1134
|
+
dt(r);
|
|
1135
1135
|
}
|
|
1136
1136
|
return !0;
|
|
1137
1137
|
},
|
|
@@ -1139,76 +1139,76 @@ function at(t) {
|
|
|
1139
1139
|
m(r);
|
|
1140
1140
|
var l = Reflect.ownKeys(a).filter((h) => {
|
|
1141
1141
|
var g = i.get(h);
|
|
1142
|
-
return g === void 0 || g.v !==
|
|
1142
|
+
return g === void 0 || g.v !== N;
|
|
1143
1143
|
});
|
|
1144
1144
|
for (var [u, f] of i)
|
|
1145
|
-
f.v !==
|
|
1145
|
+
f.v !== N && !(u in a) && l.push(u);
|
|
1146
1146
|
return l;
|
|
1147
1147
|
},
|
|
1148
1148
|
setPrototypeOf() {
|
|
1149
|
-
|
|
1149
|
+
pr();
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
1152
|
);
|
|
1153
1153
|
}
|
|
1154
|
-
var
|
|
1155
|
-
function
|
|
1156
|
-
if (
|
|
1157
|
-
|
|
1154
|
+
var Ei, pn, mn, gn;
|
|
1155
|
+
function Zt() {
|
|
1156
|
+
if (Ei === void 0) {
|
|
1157
|
+
Ei = window, pn = /Firefox/.test(navigator.userAgent);
|
|
1158
1158
|
var t = Element.prototype, e = Node.prototype, i = Text.prototype;
|
|
1159
|
-
|
|
1159
|
+
mn = Ke(e, "firstChild").get, gn = Ke(e, "nextSibling").get, Ai(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), Ai(i) && (i.__t = void 0);
|
|
1160
1160
|
}
|
|
1161
1161
|
}
|
|
1162
|
-
function
|
|
1162
|
+
function vn(t = "") {
|
|
1163
1163
|
return document.createTextNode(t);
|
|
1164
1164
|
}
|
|
1165
1165
|
// @__NO_SIDE_EFFECTS__
|
|
1166
|
-
function
|
|
1166
|
+
function bn(t) {
|
|
1167
1167
|
return (
|
|
1168
1168
|
/** @type {TemplateNode | null} */
|
|
1169
|
-
|
|
1169
|
+
mn.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
|
+
gn.call(t)
|
|
1177
1177
|
);
|
|
1178
1178
|
}
|
|
1179
1179
|
function Nr(t) {
|
|
1180
1180
|
t.textContent = "";
|
|
1181
1181
|
}
|
|
1182
|
-
function
|
|
1182
|
+
function yn(t, e, i) {
|
|
1183
1183
|
return (
|
|
1184
1184
|
/** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
|
|
1185
|
-
document.createElementNS(
|
|
1185
|
+
document.createElementNS(Wn, t, void 0)
|
|
1186
1186
|
);
|
|
1187
1187
|
}
|
|
1188
|
-
function
|
|
1188
|
+
function _n(t) {
|
|
1189
1189
|
var e = b, i = w;
|
|
1190
|
-
|
|
1190
|
+
ue(null), Le(null);
|
|
1191
1191
|
try {
|
|
1192
1192
|
return t();
|
|
1193
1193
|
} finally {
|
|
1194
|
-
|
|
1194
|
+
ue(e), Le(i);
|
|
1195
1195
|
}
|
|
1196
1196
|
}
|
|
1197
|
-
function
|
|
1198
|
-
w === null && (b === null &&
|
|
1197
|
+
function Dr(t) {
|
|
1198
|
+
w === null && (b === null && ur(), cr()), ke && ar();
|
|
1199
1199
|
}
|
|
1200
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
|
}
|
|
1204
|
-
function
|
|
1204
|
+
function je(t, e) {
|
|
1205
1205
|
var i = w;
|
|
1206
|
-
i !== null && (i.f &
|
|
1206
|
+
i !== null && (i.f & Ee) !== 0 && (t |= Ee);
|
|
1207
1207
|
var n = {
|
|
1208
|
-
ctx:
|
|
1208
|
+
ctx: J,
|
|
1209
1209
|
deps: null,
|
|
1210
1210
|
nodes: null,
|
|
1211
|
-
f: t | H |
|
|
1211
|
+
f: t | H | X,
|
|
1212
1212
|
first: null,
|
|
1213
1213
|
fn: e,
|
|
1214
1214
|
last: null,
|
|
@@ -1220,265 +1220,265 @@ function ze(t, e) {
|
|
|
1220
1220
|
wv: 0,
|
|
1221
1221
|
ac: null
|
|
1222
1222
|
}, r = n;
|
|
1223
|
-
if ((t &
|
|
1224
|
-
|
|
1223
|
+
if ((t & rt) !== 0)
|
|
1224
|
+
it !== null ? it.push(n) : ce(n);
|
|
1225
1225
|
else if (e !== null) {
|
|
1226
1226
|
try {
|
|
1227
|
-
|
|
1228
|
-
} catch (
|
|
1229
|
-
throw
|
|
1227
|
+
nt(n);
|
|
1228
|
+
} catch (s) {
|
|
1229
|
+
throw ne(n), s;
|
|
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 &
|
|
1232
|
+
(r.f & ot) === 0 && (r = r.first, (t & Oe) !== 0 && (t & Rt) !== 0 && r !== null && (r.f |= Rt));
|
|
1233
1233
|
}
|
|
1234
|
-
if (r !== null && (r.parent = i, i !== null && Fr(r, i), b !== null && (b.f &
|
|
1235
|
-
var
|
|
1234
|
+
if (r !== null && (r.parent = i, i !== null && Fr(r, i), b !== null && (b.f & M) !== 0 && (t & Re) === 0)) {
|
|
1235
|
+
var o = (
|
|
1236
1236
|
/** @type {Derived} */
|
|
1237
1237
|
b
|
|
1238
1238
|
);
|
|
1239
|
-
(
|
|
1239
|
+
(o.effects ?? (o.effects = [])).push(r);
|
|
1240
1240
|
}
|
|
1241
1241
|
return n;
|
|
1242
1242
|
}
|
|
1243
|
-
function
|
|
1244
|
-
return b !== null && !
|
|
1243
|
+
function fi() {
|
|
1244
|
+
return b !== null && !ie;
|
|
1245
1245
|
}
|
|
1246
|
-
function
|
|
1247
|
-
|
|
1246
|
+
function He(t) {
|
|
1247
|
+
Dr();
|
|
1248
1248
|
var e = (
|
|
1249
1249
|
/** @type {Effect} */
|
|
1250
1250
|
w.f
|
|
1251
|
-
), i = !b && (e &
|
|
1251
|
+
), i = !b && (e & be) !== 0 && (e & ze) === 0;
|
|
1252
1252
|
if (i) {
|
|
1253
1253
|
var n = (
|
|
1254
1254
|
/** @type {ComponentContext} */
|
|
1255
|
-
|
|
1255
|
+
J
|
|
1256
1256
|
);
|
|
1257
1257
|
(n.e ?? (n.e = [])).push(t);
|
|
1258
1258
|
} else
|
|
1259
|
-
return
|
|
1259
|
+
return Tn(t);
|
|
1260
1260
|
}
|
|
1261
|
-
function
|
|
1262
|
-
return
|
|
1261
|
+
function Tn(t) {
|
|
1262
|
+
return je(rt | or, t);
|
|
1263
1263
|
}
|
|
1264
1264
|
function xr(t) {
|
|
1265
|
-
|
|
1266
|
-
const e =
|
|
1265
|
+
ve.ensure();
|
|
1266
|
+
const e = je(Re | ot, t);
|
|
1267
1267
|
return () => {
|
|
1268
|
-
|
|
1268
|
+
ne(e);
|
|
1269
1269
|
};
|
|
1270
1270
|
}
|
|
1271
|
-
function
|
|
1272
|
-
|
|
1273
|
-
const e =
|
|
1271
|
+
function Br(t) {
|
|
1272
|
+
ve.ensure();
|
|
1273
|
+
const e = je(Re | ot, t);
|
|
1274
1274
|
return (i = {}) => new Promise((n) => {
|
|
1275
|
-
i.outro ?
|
|
1276
|
-
|
|
1277
|
-
}) : (
|
|
1275
|
+
i.outro ? It(e, () => {
|
|
1276
|
+
ne(e), n(void 0);
|
|
1277
|
+
}) : (ne(e), n(void 0));
|
|
1278
1278
|
});
|
|
1279
1279
|
}
|
|
1280
|
-
function
|
|
1281
|
-
return
|
|
1280
|
+
function Vr(t) {
|
|
1281
|
+
return je(rt, t);
|
|
1282
1282
|
}
|
|
1283
|
-
function
|
|
1284
|
-
return
|
|
1283
|
+
function hi(t, e = 0) {
|
|
1284
|
+
return je(Ot | e, t);
|
|
1285
1285
|
}
|
|
1286
|
-
function
|
|
1287
|
-
var i =
|
|
1286
|
+
function Gr(t, e = 0) {
|
|
1287
|
+
var i = je(Oe | e, t);
|
|
1288
1288
|
return i;
|
|
1289
1289
|
}
|
|
1290
|
-
function
|
|
1291
|
-
return
|
|
1290
|
+
function Pe(t) {
|
|
1291
|
+
return je(be | ot, t);
|
|
1292
1292
|
}
|
|
1293
|
-
function
|
|
1293
|
+
function An(t) {
|
|
1294
1294
|
var e = t.teardown;
|
|
1295
1295
|
if (e !== null) {
|
|
1296
|
-
const i =
|
|
1297
|
-
|
|
1296
|
+
const i = ke, n = b;
|
|
1297
|
+
Ci(!0), ue(null);
|
|
1298
1298
|
try {
|
|
1299
1299
|
e.call(null);
|
|
1300
1300
|
} finally {
|
|
1301
|
-
|
|
1301
|
+
Ci(i), ue(n);
|
|
1302
1302
|
}
|
|
1303
1303
|
}
|
|
1304
1304
|
}
|
|
1305
|
-
function
|
|
1305
|
+
function pi(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 && _n(() => {
|
|
1310
|
+
r.abort(ai);
|
|
1311
1311
|
});
|
|
1312
1312
|
var n = i.next;
|
|
1313
|
-
(i.f & Re) !== 0 ? i.parent = null :
|
|
1313
|
+
(i.f & Re) !== 0 ? i.parent = null : ne(i, e), i = n;
|
|
1314
1314
|
}
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function zr(t) {
|
|
1317
1317
|
for (var e = t.first; e !== null; ) {
|
|
1318
1318
|
var i = e.next;
|
|
1319
|
-
(e.f &
|
|
1319
|
+
(e.f & be) === 0 && ne(e), e = i;
|
|
1320
1320
|
}
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function ne(t, e = !0) {
|
|
1323
1323
|
var i = !1;
|
|
1324
|
-
(e || (t.f &
|
|
1324
|
+
(e || (t.f & rr) !== 0) && t.nodes !== null && t.nodes.end !== null && (jr(
|
|
1325
1325
|
t.nodes.start,
|
|
1326
1326
|
/** @type {TemplateNode} */
|
|
1327
1327
|
t.nodes.end
|
|
1328
|
-
), i = !0),
|
|
1328
|
+
), i = !0), pi(t, e && !i), pt(t, 0), L(t, Ce);
|
|
1329
1329
|
var n = t.nodes && t.nodes.t;
|
|
1330
1330
|
if (n !== null)
|
|
1331
|
-
for (const
|
|
1332
|
-
|
|
1333
|
-
|
|
1331
|
+
for (const o of n)
|
|
1332
|
+
o.stop();
|
|
1333
|
+
An(t);
|
|
1334
1334
|
var r = t.parent;
|
|
1335
|
-
r !== null && r.first !== null &&
|
|
1335
|
+
r !== null && r.first !== null && wn(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function jr(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 wn(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
|
-
function
|
|
1347
|
+
function It(t, e, i = !0) {
|
|
1348
1348
|
var n = [];
|
|
1349
|
-
|
|
1349
|
+
In(t, n, !0);
|
|
1350
1350
|
var r = () => {
|
|
1351
|
-
i &&
|
|
1352
|
-
},
|
|
1353
|
-
if (
|
|
1354
|
-
var
|
|
1351
|
+
i && ne(t), e && e();
|
|
1352
|
+
}, o = n.length;
|
|
1353
|
+
if (o > 0) {
|
|
1354
|
+
var s = () => --o || r();
|
|
1355
1355
|
for (var a of n)
|
|
1356
|
-
a.out(
|
|
1356
|
+
a.out(s);
|
|
1357
1357
|
} else
|
|
1358
1358
|
r();
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1361
|
-
if ((t.f &
|
|
1362
|
-
t.f ^=
|
|
1360
|
+
function In(t, e, i) {
|
|
1361
|
+
if ((t.f & Ee) === 0) {
|
|
1362
|
+
t.f ^= Ee;
|
|
1363
1363
|
var n = t.nodes && t.nodes.t;
|
|
1364
1364
|
if (n !== null)
|
|
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
|
|
1368
|
+
var o = r.next, s = (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
|
-
(r.f &
|
|
1372
|
-
|
|
1371
|
+
(r.f & be) !== 0 && (t.f & Oe) !== 0;
|
|
1372
|
+
In(r, e, s ? i : !1), r = o;
|
|
1373
1373
|
}
|
|
1374
1374
|
}
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1376
|
+
function qr(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);
|
|
1380
1380
|
e.append(i), i = r;
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
1383
|
-
let
|
|
1384
|
-
function
|
|
1385
|
-
|
|
1383
|
+
let St = !1, ke = !1;
|
|
1384
|
+
function Ci(t) {
|
|
1385
|
+
ke = t;
|
|
1386
1386
|
}
|
|
1387
|
-
let b = null,
|
|
1388
|
-
function
|
|
1387
|
+
let b = null, ie = !1;
|
|
1388
|
+
function ue(t) {
|
|
1389
1389
|
b = t;
|
|
1390
1390
|
}
|
|
1391
1391
|
let w = null;
|
|
1392
|
-
function
|
|
1392
|
+
function Le(t) {
|
|
1393
1393
|
w = t;
|
|
1394
1394
|
}
|
|
1395
|
-
let
|
|
1396
|
-
function
|
|
1397
|
-
b !== null && (
|
|
1395
|
+
let Q = null;
|
|
1396
|
+
function Sn(t) {
|
|
1397
|
+
b !== null && (Q === null ? Q = [t] : Q.push(t));
|
|
1398
1398
|
}
|
|
1399
|
-
let G = null, j = 0,
|
|
1400
|
-
function
|
|
1401
|
-
|
|
1399
|
+
let G = null, j = 0, W = null;
|
|
1400
|
+
function Kr(t) {
|
|
1401
|
+
W = t;
|
|
1402
1402
|
}
|
|
1403
|
-
let
|
|
1404
|
-
function
|
|
1405
|
-
|
|
1403
|
+
let En = 1, Ne = 0, Ve = Ne;
|
|
1404
|
+
function $i(t) {
|
|
1405
|
+
Ve = t;
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1408
|
-
return ++
|
|
1407
|
+
function Cn() {
|
|
1408
|
+
return ++En;
|
|
1409
1409
|
}
|
|
1410
|
-
function
|
|
1410
|
+
function gt(t) {
|
|
1411
1411
|
var e = t.f;
|
|
1412
1412
|
if ((e & H) !== 0)
|
|
1413
1413
|
return !0;
|
|
1414
|
-
if (e &
|
|
1414
|
+
if (e & M && (t.f &= ~Ge), (e & re) !== 0) {
|
|
1415
1415
|
for (var i = (
|
|
1416
1416
|
/** @type {Value[]} */
|
|
1417
1417
|
t.deps
|
|
1418
1418
|
), n = i.length, r = 0; r < n; r++) {
|
|
1419
|
-
var
|
|
1420
|
-
if (
|
|
1419
|
+
var o = i[r];
|
|
1420
|
+
if (gt(
|
|
1421
1421
|
/** @type {Derived} */
|
|
1422
|
-
|
|
1423
|
-
) &&
|
|
1422
|
+
o
|
|
1423
|
+
) && cn(
|
|
1424
1424
|
/** @type {Derived} */
|
|
1425
|
-
|
|
1426
|
-
),
|
|
1425
|
+
o
|
|
1426
|
+
), o.wv > t.wv)
|
|
1427
1427
|
return !0;
|
|
1428
1428
|
}
|
|
1429
|
-
(e &
|
|
1429
|
+
(e & X) !== 0 && // During time traveling we don't want to reset the status so that
|
|
1430
1430
|
// traversal of the graph in the other batches still happens
|
|
1431
|
-
|
|
1431
|
+
ee === null && L(t, D);
|
|
1432
1432
|
}
|
|
1433
1433
|
return !1;
|
|
1434
1434
|
}
|
|
1435
|
-
function
|
|
1435
|
+
function $n(t, e, i = !0) {
|
|
1436
1436
|
var n = t.reactions;
|
|
1437
|
-
if (n !== null && !(
|
|
1437
|
+
if (n !== null && !(Q !== null && tt.call(Q, t)))
|
|
1438
1438
|
for (var r = 0; r < n.length; r++) {
|
|
1439
|
-
var
|
|
1440
|
-
(
|
|
1439
|
+
var o = n[r];
|
|
1440
|
+
(o.f & M) !== 0 ? $n(
|
|
1441
1441
|
/** @type {Derived} */
|
|
1442
|
-
|
|
1442
|
+
o,
|
|
1443
1443
|
e,
|
|
1444
1444
|
!1
|
|
1445
|
-
) : e ===
|
|
1445
|
+
) : e === o && (i ? L(o, H) : (o.f & D) !== 0 && L(o, re), ce(
|
|
1446
1446
|
/** @type {Effect} */
|
|
1447
|
-
|
|
1447
|
+
o
|
|
1448
1448
|
));
|
|
1449
1449
|
}
|
|
1450
1450
|
}
|
|
1451
|
-
function
|
|
1451
|
+
function kn(t) {
|
|
1452
1452
|
var S;
|
|
1453
|
-
var e = G, i = j, n =
|
|
1453
|
+
var e = G, i = j, n = W, r = b, o = Q, s = J, a = ie, l = Ve, u = t.f;
|
|
1454
1454
|
G = /** @type {null | Value[]} */
|
|
1455
|
-
null, j = 0,
|
|
1456
|
-
t.ac.abort(
|
|
1455
|
+
null, j = 0, W = null, b = (u & (be | Re)) === 0 ? t : null, Q = null, Pt(t.ctx), ie = !1, Ve = ++Ne, t.ac !== null && (_n(() => {
|
|
1456
|
+
t.ac.abort(ai);
|
|
1457
1457
|
}), t.ac = null);
|
|
1458
1458
|
try {
|
|
1459
|
-
t.f |=
|
|
1459
|
+
t.f |= qt;
|
|
1460
1460
|
var f = (
|
|
1461
1461
|
/** @type {Function} */
|
|
1462
1462
|
t.fn
|
|
1463
1463
|
), h = f();
|
|
1464
|
-
t.f |=
|
|
1464
|
+
t.f |= ze;
|
|
1465
1465
|
var g = t.deps, y = P?.is_fork;
|
|
1466
1466
|
if (G !== null) {
|
|
1467
1467
|
var p;
|
|
1468
|
-
if (y ||
|
|
1468
|
+
if (y || pt(t, j), g !== null && j > 0)
|
|
1469
1469
|
for (g.length = j + G.length, p = 0; p < G.length; p++)
|
|
1470
1470
|
g[j + p] = G[p];
|
|
1471
1471
|
else
|
|
1472
1472
|
t.deps = g = G;
|
|
1473
|
-
if (
|
|
1473
|
+
if (fi() && (t.f & X) !== 0)
|
|
1474
1474
|
for (p = j; p < g.length; p++)
|
|
1475
1475
|
((S = g[p]).reactions ?? (S.reactions = [])).push(t);
|
|
1476
|
-
} else !y && g !== null && j < g.length && (
|
|
1477
|
-
if (
|
|
1476
|
+
} else !y && g !== null && j < g.length && (pt(t, j), g.length = j);
|
|
1477
|
+
if (Yi() && W !== null && !ie && g !== null && (t.f & (M | re | H)) === 0)
|
|
1478
1478
|
for (p = 0; p < /** @type {Source[]} */
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1479
|
+
W.length; p++)
|
|
1480
|
+
$n(
|
|
1481
|
+
W[p],
|
|
1482
1482
|
/** @type {Effect} */
|
|
1483
1483
|
t
|
|
1484
1484
|
);
|
|
@@ -1489,174 +1489,174 @@ function $n(t) {
|
|
|
1489
1489
|
if (e !== null)
|
|
1490
1490
|
for (const _ of e)
|
|
1491
1491
|
_.rv = Ne;
|
|
1492
|
-
|
|
1493
|
-
|
|
1492
|
+
W !== null && (n === null ? n = W : n.push(.../** @type {Source[]} */
|
|
1493
|
+
W));
|
|
1494
1494
|
}
|
|
1495
|
-
return (t.f &
|
|
1495
|
+
return (t.f & ft) !== 0 && (t.f ^= ft), h;
|
|
1496
1496
|
} catch (_) {
|
|
1497
|
-
return
|
|
1497
|
+
return Qi(_);
|
|
1498
1498
|
} finally {
|
|
1499
|
-
t.f ^=
|
|
1499
|
+
t.f ^= qt, G = e, j = i, W = n, b = r, Q = o, Pt(s), ie = a, Ve = l;
|
|
1500
1500
|
}
|
|
1501
1501
|
}
|
|
1502
|
-
function
|
|
1502
|
+
function Ur(t, e) {
|
|
1503
1503
|
let i = e.reactions;
|
|
1504
1504
|
if (i !== null) {
|
|
1505
|
-
var n =
|
|
1505
|
+
var n = Xn.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());
|
|
1509
1509
|
}
|
|
1510
1510
|
}
|
|
1511
|
-
if (i === null && (e.f &
|
|
1511
|
+
if (i === null && (e.f & M) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
|
|
1512
1512
|
// to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
|
|
1513
1513
|
// allows us to skip the expensive work of disconnecting and immediately reconnecting it
|
|
1514
|
-
(G === null || !
|
|
1515
|
-
var
|
|
1514
|
+
(G === null || !tt.call(G, e))) {
|
|
1515
|
+
var o = (
|
|
1516
1516
|
/** @type {Derived} */
|
|
1517
1517
|
e
|
|
1518
1518
|
);
|
|
1519
|
-
(
|
|
1519
|
+
(o.f & X) !== 0 && (o.f ^= X, o.f &= ~Ge), ui(o), Pr(o), pt(o, 0);
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
|
-
function
|
|
1522
|
+
function pt(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
|
+
Ur(t, i[n]);
|
|
1527
1527
|
}
|
|
1528
|
-
function
|
|
1528
|
+
function nt(t) {
|
|
1529
1529
|
var e = t.f;
|
|
1530
|
-
if ((e &
|
|
1531
|
-
L(t,
|
|
1532
|
-
var i = w, n =
|
|
1533
|
-
w = t,
|
|
1530
|
+
if ((e & Ce) === 0) {
|
|
1531
|
+
L(t, D);
|
|
1532
|
+
var i = w, n = St;
|
|
1533
|
+
w = t, St = !0;
|
|
1534
1534
|
try {
|
|
1535
|
-
(e & (
|
|
1536
|
-
var r =
|
|
1537
|
-
t.teardown = typeof r == "function" ? r : null, t.wv =
|
|
1538
|
-
var
|
|
1539
|
-
|
|
1535
|
+
(e & (Oe | li)) !== 0 ? zr(t) : pi(t), An(t);
|
|
1536
|
+
var r = kn(t);
|
|
1537
|
+
t.teardown = typeof r == "function" ? r : null, t.wv = En;
|
|
1538
|
+
var o;
|
|
1539
|
+
zt && Ar && (t.f & H) !== 0 && t.deps;
|
|
1540
1540
|
} finally {
|
|
1541
|
-
|
|
1541
|
+
St = n, w = i;
|
|
1542
1542
|
}
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
1545
|
function m(t) {
|
|
1546
|
-
var e = t.f, i = (e &
|
|
1547
|
-
if (b !== null && !
|
|
1548
|
-
var n = w !== null && (w.f &
|
|
1549
|
-
if (!n && (
|
|
1546
|
+
var e = t.f, i = (e & M) !== 0;
|
|
1547
|
+
if (b !== null && !ie) {
|
|
1548
|
+
var n = w !== null && (w.f & Ce) !== 0;
|
|
1549
|
+
if (!n && (Q === null || !tt.call(Q, t))) {
|
|
1550
1550
|
var r = b.deps;
|
|
1551
|
-
if ((b.f &
|
|
1551
|
+
if ((b.f & qt) !== 0)
|
|
1552
1552
|
t.rv < Ne && (t.rv = Ne, G === null && r !== null && r[j] === t ? j++ : G === null ? G = [t] : G.push(t));
|
|
1553
1553
|
else {
|
|
1554
1554
|
(b.deps ?? (b.deps = [])).push(t);
|
|
1555
|
-
var
|
|
1556
|
-
|
|
1555
|
+
var o = t.reactions;
|
|
1556
|
+
o === null ? t.reactions = [b] : tt.call(o, b) || o.push(b);
|
|
1557
1557
|
}
|
|
1558
1558
|
}
|
|
1559
1559
|
}
|
|
1560
|
-
if (
|
|
1561
|
-
return
|
|
1560
|
+
if (ke && $e.has(t))
|
|
1561
|
+
return $e.get(t);
|
|
1562
1562
|
if (i) {
|
|
1563
|
-
var
|
|
1563
|
+
var s = (
|
|
1564
1564
|
/** @type {Derived} */
|
|
1565
1565
|
t
|
|
1566
1566
|
);
|
|
1567
|
-
if (
|
|
1568
|
-
var a =
|
|
1569
|
-
return ((
|
|
1567
|
+
if (ke) {
|
|
1568
|
+
var a = s.v;
|
|
1569
|
+
return ((s.f & D) === 0 && s.reactions !== null || On(s)) && (a = di(s)), $e.set(s, a), a;
|
|
1570
1570
|
}
|
|
1571
|
-
var l = (
|
|
1572
|
-
|
|
1571
|
+
var l = (s.f & X) === 0 && !ie && b !== null && (St || (b.f & X) !== 0), u = (s.f & ze) === 0;
|
|
1572
|
+
gt(s) && (l && (s.f |= X), cn(s)), l && !u && (un(s), Ln(s));
|
|
1573
1573
|
}
|
|
1574
|
-
if (
|
|
1575
|
-
return
|
|
1576
|
-
if ((t.f &
|
|
1574
|
+
if (ee?.has(t))
|
|
1575
|
+
return ee.get(t);
|
|
1576
|
+
if ((t.f & ft) !== 0)
|
|
1577
1577
|
throw t.v;
|
|
1578
1578
|
return t.v;
|
|
1579
1579
|
}
|
|
1580
|
-
function
|
|
1581
|
-
if (t.f |=
|
|
1580
|
+
function Ln(t) {
|
|
1581
|
+
if (t.f |= X, t.deps !== null)
|
|
1582
1582
|
for (const e of t.deps)
|
|
1583
|
-
(e.reactions ?? (e.reactions = [])).push(t), (e.f &
|
|
1583
|
+
(e.reactions ?? (e.reactions = [])).push(t), (e.f & M) !== 0 && (e.f & X) === 0 && (un(
|
|
1584
1584
|
/** @type {Derived} */
|
|
1585
1585
|
e
|
|
1586
|
-
),
|
|
1586
|
+
), Ln(
|
|
1587
1587
|
/** @type {Derived} */
|
|
1588
1588
|
e
|
|
1589
1589
|
));
|
|
1590
1590
|
}
|
|
1591
|
-
function
|
|
1592
|
-
if (t.v ===
|
|
1591
|
+
function On(t) {
|
|
1592
|
+
if (t.v === N) return !0;
|
|
1593
1593
|
if (t.deps === null) return !1;
|
|
1594
1594
|
for (const e of t.deps)
|
|
1595
|
-
if (
|
|
1595
|
+
if ($e.has(e) || (e.f & M) !== 0 && On(
|
|
1596
1596
|
/** @type {Derived} */
|
|
1597
1597
|
e
|
|
1598
1598
|
))
|
|
1599
1599
|
return !0;
|
|
1600
1600
|
return !1;
|
|
1601
1601
|
}
|
|
1602
|
-
function
|
|
1603
|
-
var e =
|
|
1602
|
+
function mi(t) {
|
|
1603
|
+
var e = ie;
|
|
1604
1604
|
try {
|
|
1605
|
-
return
|
|
1605
|
+
return ie = !0, t();
|
|
1606
1606
|
} finally {
|
|
1607
|
-
|
|
1607
|
+
ie = e;
|
|
1608
1608
|
}
|
|
1609
1609
|
}
|
|
1610
|
-
const
|
|
1611
|
-
let
|
|
1612
|
-
function
|
|
1610
|
+
const yt = /* @__PURE__ */ Symbol("events"), Wr = /* @__PURE__ */ new Set(), ki = /* @__PURE__ */ new Set();
|
|
1611
|
+
let Li = null;
|
|
1612
|
+
function Oi(t) {
|
|
1613
1613
|
var e = this, i = (
|
|
1614
1614
|
/** @type {Node} */
|
|
1615
1615
|
e.ownerDocument
|
|
1616
|
-
), n = t.type, r = t.composedPath?.() || [],
|
|
1616
|
+
), n = t.type, r = t.composedPath?.() || [], o = (
|
|
1617
1617
|
/** @type {null | Element} */
|
|
1618
1618
|
r[0] || t.target
|
|
1619
1619
|
);
|
|
1620
|
-
|
|
1621
|
-
var
|
|
1620
|
+
Li = t;
|
|
1621
|
+
var s = 0, a = Li === t && t[yt];
|
|
1622
1622
|
if (a) {
|
|
1623
1623
|
var l = r.indexOf(a);
|
|
1624
1624
|
if (l !== -1 && (e === document || e === /** @type {any} */
|
|
1625
1625
|
window)) {
|
|
1626
|
-
t[
|
|
1626
|
+
t[yt] = e;
|
|
1627
1627
|
return;
|
|
1628
1628
|
}
|
|
1629
1629
|
var u = r.indexOf(e);
|
|
1630
1630
|
if (u === -1)
|
|
1631
1631
|
return;
|
|
1632
|
-
l <= u && (
|
|
1632
|
+
l <= u && (s = l);
|
|
1633
1633
|
}
|
|
1634
|
-
if (
|
|
1635
|
-
r[
|
|
1636
|
-
|
|
1634
|
+
if (o = /** @type {Element} */
|
|
1635
|
+
r[s] || t.target, o !== e) {
|
|
1636
|
+
Lt(t, "currentTarget", {
|
|
1637
1637
|
configurable: !0,
|
|
1638
1638
|
get() {
|
|
1639
|
-
return
|
|
1639
|
+
return o || i;
|
|
1640
1640
|
}
|
|
1641
1641
|
});
|
|
1642
1642
|
var f = b, h = w;
|
|
1643
|
-
|
|
1643
|
+
ue(null), Le(null);
|
|
1644
1644
|
try {
|
|
1645
|
-
for (var g, y = [];
|
|
1646
|
-
var p =
|
|
1647
|
-
|
|
1645
|
+
for (var g, y = []; o !== null; ) {
|
|
1646
|
+
var p = o.assignedSlot || o.parentNode || /** @type {any} */
|
|
1647
|
+
o.host || null;
|
|
1648
1648
|
try {
|
|
1649
|
-
var S =
|
|
1649
|
+
var S = o[yt]?.[n];
|
|
1650
1650
|
S != null && (!/** @type {any} */
|
|
1651
|
-
|
|
1651
|
+
o.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
|
|
1652
1652
|
// -> the target could not have been disabled because it emits the event in the first place
|
|
1653
|
-
t.target ===
|
|
1653
|
+
t.target === o) && S.call(o, 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
|
+
o = p;
|
|
1660
1660
|
}
|
|
1661
1661
|
if (g) {
|
|
1662
1662
|
for (let _ of y)
|
|
@@ -1666,28 +1666,28 @@ function Li(t) {
|
|
|
1666
1666
|
throw g;
|
|
1667
1667
|
}
|
|
1668
1668
|
} finally {
|
|
1669
|
-
t[
|
|
1669
|
+
t[yt] = e, delete t.currentTarget, ue(f), Le(h);
|
|
1670
1670
|
}
|
|
1671
1671
|
}
|
|
1672
1672
|
}
|
|
1673
|
-
const
|
|
1673
|
+
const Yr = (
|
|
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 Xr(t) {
|
|
1681
1681
|
return (
|
|
1682
1682
|
/** @type {string} */
|
|
1683
|
-
|
|
1683
|
+
Yr?.createHTML(t) ?? t
|
|
1684
1684
|
);
|
|
1685
1685
|
}
|
|
1686
|
-
function
|
|
1687
|
-
var e =
|
|
1688
|
-
return e.innerHTML =
|
|
1686
|
+
function Qr(t) {
|
|
1687
|
+
var e = yn("template");
|
|
1688
|
+
return e.innerHTML = Xr(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1689
1689
|
}
|
|
1690
|
-
function
|
|
1690
|
+
function ei(t, e) {
|
|
1691
1691
|
var i = (
|
|
1692
1692
|
/** @type {Effect} */
|
|
1693
1693
|
w
|
|
@@ -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 Jr(t, e) {
|
|
1699
|
+
var i = (e & Un) !== 0, n, r = !t.startsWith("<!>");
|
|
1700
1700
|
return () => {
|
|
1701
|
-
if (
|
|
1702
|
-
return
|
|
1703
|
-
n === void 0 && (n =
|
|
1704
|
-
/* @__PURE__ */
|
|
1705
|
-
var
|
|
1701
|
+
if (te)
|
|
1702
|
+
return ei(x, null), x;
|
|
1703
|
+
n === void 0 && (n = Qr(r ? t : "<!>" + t), n = /** @type {TemplateNode} */
|
|
1704
|
+
/* @__PURE__ */ bn(n));
|
|
1705
|
+
var o = (
|
|
1706
1706
|
/** @type {TemplateNode} */
|
|
1707
|
-
i ||
|
|
1707
|
+
i || pn ? document.importNode(n, !0) : n.cloneNode(!0)
|
|
1708
1708
|
);
|
|
1709
|
-
return
|
|
1709
|
+
return ei(o, o), o;
|
|
1710
1710
|
};
|
|
1711
1711
|
}
|
|
1712
1712
|
function Rn(t, e) {
|
|
1713
|
-
if (
|
|
1713
|
+
if (te) {
|
|
1714
1714
|
var i = (
|
|
1715
1715
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1716
1716
|
w
|
|
1717
1717
|
);
|
|
1718
|
-
((i.f &
|
|
1718
|
+
((i.f & ze) === 0 || i.nodes.end === null) && (i.nodes.end = x), qi();
|
|
1719
1719
|
return;
|
|
1720
1720
|
}
|
|
1721
1721
|
t !== null && t.before(
|
|
@@ -1723,44 +1723,44 @@ function Rn(t, e) {
|
|
|
1723
1723
|
e
|
|
1724
1724
|
);
|
|
1725
1725
|
}
|
|
1726
|
-
const
|
|
1727
|
-
function
|
|
1728
|
-
return
|
|
1726
|
+
const Zr = ["touchstart", "touchmove"];
|
|
1727
|
+
function eo(t) {
|
|
1728
|
+
return Zr.includes(t);
|
|
1729
1729
|
}
|
|
1730
|
-
function
|
|
1731
|
-
return
|
|
1730
|
+
function Pn(t, e) {
|
|
1731
|
+
return Hn(t, e);
|
|
1732
1732
|
}
|
|
1733
|
-
function
|
|
1734
|
-
|
|
1735
|
-
const i = e.target, n =
|
|
1733
|
+
function to(t, e) {
|
|
1734
|
+
Zt(), e.intro = e.intro ?? !1;
|
|
1735
|
+
const i = e.target, n = te, r = x;
|
|
1736
1736
|
try {
|
|
1737
|
-
for (var
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
if (!
|
|
1741
|
-
throw
|
|
1742
|
-
|
|
1737
|
+
for (var o = /* @__PURE__ */ bn(i); o && (o.nodeType !== ci || /** @type {Comment} */
|
|
1738
|
+
o.data !== Bi); )
|
|
1739
|
+
o = /* @__PURE__ */ st(o);
|
|
1740
|
+
if (!o)
|
|
1741
|
+
throw $t;
|
|
1742
|
+
vt(!0), ht(
|
|
1743
1743
|
/** @type {Comment} */
|
|
1744
|
-
|
|
1744
|
+
o
|
|
1745
1745
|
);
|
|
1746
|
-
const
|
|
1747
|
-
return
|
|
1748
|
-
|
|
1749
|
-
} catch (
|
|
1750
|
-
if (
|
|
1746
|
+
const s = Hn(t, { ...e, anchor: o });
|
|
1747
|
+
return vt(!1), /** @type {Exports} */
|
|
1748
|
+
s;
|
|
1749
|
+
} catch (s) {
|
|
1750
|
+
if (s instanceof Error && s.message.split(`
|
|
1751
1751
|
`).some((a) => a.startsWith("https://svelte.dev/e/")))
|
|
1752
|
-
throw
|
|
1753
|
-
return
|
|
1752
|
+
throw s;
|
|
1753
|
+
return s !== $t && console.warn("Failed to hydrate: ", s), e.recover === !1 && fr(), Zt(), Nr(i), vt(!1), Pn(t, e);
|
|
1754
1754
|
} finally {
|
|
1755
|
-
|
|
1755
|
+
vt(n), ht(r);
|
|
1756
1756
|
}
|
|
1757
1757
|
}
|
|
1758
|
-
const
|
|
1759
|
-
function
|
|
1760
|
-
|
|
1761
|
-
var l = void 0, u =
|
|
1762
|
-
var f = i ?? e.appendChild(
|
|
1763
|
-
|
|
1758
|
+
const _t = /* @__PURE__ */ new Map();
|
|
1759
|
+
function Hn(t, { target: e, anchor: i, props: n = {}, events: r, context: o, intro: s = !0, transformError: a }) {
|
|
1760
|
+
Zt();
|
|
1761
|
+
var l = void 0, u = Br(() => {
|
|
1762
|
+
var f = i ?? e.appendChild(vn());
|
|
1763
|
+
kr(
|
|
1764
1764
|
/** @type {TemplateNode} */
|
|
1765
1765
|
f,
|
|
1766
1766
|
{
|
|
@@ -1768,19 +1768,19 @@ function Pn(t, { target: e, anchor: i, props: n = {}, events: r, context: s, int
|
|
|
1768
1768
|
}
|
|
1769
1769
|
},
|
|
1770
1770
|
(y) => {
|
|
1771
|
-
|
|
1771
|
+
Ui({});
|
|
1772
1772
|
var p = (
|
|
1773
1773
|
/** @type {ComponentContext} */
|
|
1774
|
-
|
|
1774
|
+
J
|
|
1775
1775
|
);
|
|
1776
|
-
if (
|
|
1776
|
+
if (o && (p.c = o), r && (n.$$events = r), te && ei(
|
|
1777
1777
|
/** @type {TemplateNode} */
|
|
1778
1778
|
y,
|
|
1779
1779
|
null
|
|
1780
|
-
), l = t(y, n) || {},
|
|
1781
|
-
|
|
1782
|
-
throw
|
|
1783
|
-
|
|
1780
|
+
), l = t(y, n) || {}, te && (w.nodes.end = x, x === null || x.nodeType !== ci || /** @type {Comment} */
|
|
1781
|
+
x.data !== Gi))
|
|
1782
|
+
throw ji(), $t;
|
|
1783
|
+
Wi();
|
|
1784
1784
|
},
|
|
1785
1785
|
a
|
|
1786
1786
|
);
|
|
@@ -1789,41 +1789,41 @@ function Pn(t, { target: e, anchor: i, props: n = {}, events: r, context: s, int
|
|
|
1789
1789
|
var S = y[p];
|
|
1790
1790
|
if (!h.has(S)) {
|
|
1791
1791
|
h.add(S);
|
|
1792
|
-
var _ =
|
|
1793
|
-
for (const
|
|
1794
|
-
var
|
|
1795
|
-
|
|
1796
|
-
var
|
|
1797
|
-
|
|
1792
|
+
var _ = eo(S);
|
|
1793
|
+
for (const lt of [e, document]) {
|
|
1794
|
+
var O = _t.get(lt);
|
|
1795
|
+
O === void 0 && (O = /* @__PURE__ */ new Map(), _t.set(lt, O));
|
|
1796
|
+
var oe = O.get(S);
|
|
1797
|
+
oe === void 0 ? (lt.addEventListener(S, Oi, { passive: _ }), O.set(S, 1)) : O.set(S, oe + 1);
|
|
1798
1798
|
}
|
|
1799
1799
|
}
|
|
1800
1800
|
}
|
|
1801
1801
|
};
|
|
1802
|
-
return g(
|
|
1802
|
+
return g(Qn(Wr)), ki.add(g), () => {
|
|
1803
1803
|
for (var y of h)
|
|
1804
1804
|
for (const _ of [e, document]) {
|
|
1805
1805
|
var p = (
|
|
1806
1806
|
/** @type {Map<string, number>} */
|
|
1807
|
-
|
|
1807
|
+
_t.get(_)
|
|
1808
1808
|
), S = (
|
|
1809
1809
|
/** @type {number} */
|
|
1810
1810
|
p.get(y)
|
|
1811
1811
|
);
|
|
1812
|
-
--S == 0 ? (_.removeEventListener(y,
|
|
1812
|
+
--S == 0 ? (_.removeEventListener(y, Oi), p.delete(y), p.size === 0 && _t.delete(_)) : p.set(y, S);
|
|
1813
1813
|
}
|
|
1814
|
-
|
|
1814
|
+
ki.delete(g), f !== i && f.parentNode?.removeChild(f);
|
|
1815
1815
|
};
|
|
1816
1816
|
});
|
|
1817
|
-
return
|
|
1817
|
+
return ti.set(l, u), l;
|
|
1818
1818
|
}
|
|
1819
|
-
let
|
|
1820
|
-
function
|
|
1821
|
-
const i =
|
|
1822
|
-
return i ? (
|
|
1819
|
+
let ti = /* @__PURE__ */ new WeakMap();
|
|
1820
|
+
function io(t, e) {
|
|
1821
|
+
const i = ti.get(t);
|
|
1822
|
+
return i ? (ti.delete(t), i(e)) : Promise.resolve();
|
|
1823
1823
|
}
|
|
1824
|
-
function
|
|
1825
|
-
|
|
1826
|
-
const e =
|
|
1824
|
+
function no(t) {
|
|
1825
|
+
J === null && lr(), He(() => {
|
|
1826
|
+
const e = mi(t);
|
|
1827
1827
|
if (typeof e == "function") return (
|
|
1828
1828
|
/** @type {() => void} */
|
|
1829
1829
|
e
|
|
@@ -1831,39 +1831,39 @@ function is(t) {
|
|
|
1831
1831
|
});
|
|
1832
1832
|
}
|
|
1833
1833
|
function Ri(t, e) {
|
|
1834
|
-
return t === e || t?.[
|
|
1835
|
-
}
|
|
1836
|
-
function
|
|
1837
|
-
return
|
|
1838
|
-
var r,
|
|
1839
|
-
return
|
|
1840
|
-
r =
|
|
1841
|
-
t !== i(...
|
|
1834
|
+
return t === e || t?.[Tt] === e;
|
|
1835
|
+
}
|
|
1836
|
+
function ro(t = {}, e, i, n) {
|
|
1837
|
+
return Vr(() => {
|
|
1838
|
+
var r, o;
|
|
1839
|
+
return hi(() => {
|
|
1840
|
+
r = o, o = [], mi(() => {
|
|
1841
|
+
t !== i(...o) && (e(t, ...o), r && Ri(i(...r), t) && e(null, ...r));
|
|
1842
1842
|
});
|
|
1843
1843
|
}), () => {
|
|
1844
|
-
|
|
1845
|
-
|
|
1844
|
+
Be(() => {
|
|
1845
|
+
o && Ri(i(...o), t) && e(null, ...o);
|
|
1846
1846
|
});
|
|
1847
1847
|
};
|
|
1848
1848
|
}), t;
|
|
1849
1849
|
}
|
|
1850
|
-
function
|
|
1850
|
+
function Te(t, e, i, n) {
|
|
1851
1851
|
var r = (
|
|
1852
1852
|
/** @type {V} */
|
|
1853
1853
|
n
|
|
1854
|
-
),
|
|
1854
|
+
), o = !0, s = () => (o && (o = !1, r = /** @type {V} */
|
|
1855
1855
|
n), r), a;
|
|
1856
1856
|
a = /** @type {V} */
|
|
1857
|
-
t[e], a === void 0 && n !== void 0 && (a =
|
|
1857
|
+
t[e], a === void 0 && n !== void 0 && (a = s());
|
|
1858
1858
|
var l;
|
|
1859
1859
|
l = () => {
|
|
1860
1860
|
var g = (
|
|
1861
1861
|
/** @type {V} */
|
|
1862
1862
|
t[e]
|
|
1863
1863
|
);
|
|
1864
|
-
return g === void 0 ?
|
|
1864
|
+
return g === void 0 ? s() : (o = !0, g);
|
|
1865
1865
|
};
|
|
1866
|
-
var u = !1, f = /* @__PURE__ */
|
|
1866
|
+
var u = !1, f = /* @__PURE__ */ an(() => (u = !1, l())), h = (
|
|
1867
1867
|
/** @type {Effect} */
|
|
1868
1868
|
w
|
|
1869
1869
|
);
|
|
@@ -1874,15 +1874,15 @@ function _e(t, e, i, n) {
|
|
|
1874
1874
|
const p = y ? m(f) : g;
|
|
1875
1875
|
return C(f, p), u = !0, r !== void 0 && (r = p), g;
|
|
1876
1876
|
}
|
|
1877
|
-
return
|
|
1877
|
+
return ke && u || (h.f & Ce) !== 0 ? f.v : m(f);
|
|
1878
1878
|
})
|
|
1879
1879
|
);
|
|
1880
1880
|
}
|
|
1881
|
-
function
|
|
1882
|
-
return new
|
|
1881
|
+
function oo(t) {
|
|
1882
|
+
return new so(t);
|
|
1883
1883
|
}
|
|
1884
|
-
var
|
|
1885
|
-
class
|
|
1884
|
+
var ge, Y;
|
|
1885
|
+
class so {
|
|
1886
1886
|
/**
|
|
1887
1887
|
* @param {ComponentConstructorOptions & {
|
|
1888
1888
|
* component: any;
|
|
@@ -1890,28 +1890,28 @@ class ss {
|
|
|
1890
1890
|
*/
|
|
1891
1891
|
constructor(e) {
|
|
1892
1892
|
/** @type {any} */
|
|
1893
|
-
T(this,
|
|
1893
|
+
T(this, ge);
|
|
1894
1894
|
/** @type {Record<string, any>} */
|
|
1895
|
-
T(this,
|
|
1896
|
-
var i = /* @__PURE__ */ new Map(), n = (
|
|
1897
|
-
var a = /* @__PURE__ */
|
|
1898
|
-
return i.set(
|
|
1895
|
+
T(this, Y);
|
|
1896
|
+
var i = /* @__PURE__ */ new Map(), n = (o, s) => {
|
|
1897
|
+
var a = /* @__PURE__ */ Hr(s, !1, !1);
|
|
1898
|
+
return i.set(o, a), a;
|
|
1899
1899
|
};
|
|
1900
1900
|
const r = new Proxy(
|
|
1901
1901
|
{ ...e.props || {}, $$events: {} },
|
|
1902
1902
|
{
|
|
1903
|
-
get(
|
|
1904
|
-
return m(i.get(
|
|
1903
|
+
get(o, s) {
|
|
1904
|
+
return m(i.get(s) ?? n(s, Reflect.get(o, s)));
|
|
1905
1905
|
},
|
|
1906
|
-
has(
|
|
1907
|
-
return
|
|
1906
|
+
has(o, s) {
|
|
1907
|
+
return s === sr ? !0 : (m(i.get(s) ?? n(s, Reflect.get(o, s))), Reflect.has(o, s));
|
|
1908
1908
|
},
|
|
1909
|
-
set(
|
|
1910
|
-
return C(i.get(
|
|
1909
|
+
set(o, s, a) {
|
|
1910
|
+
return C(i.get(s) ?? n(s, a), a), Reflect.set(o, s, a);
|
|
1911
1911
|
}
|
|
1912
1912
|
}
|
|
1913
1913
|
);
|
|
1914
|
-
v(this,
|
|
1914
|
+
v(this, Y, (e.hydrate ? to : Pn)(e.component, {
|
|
1915
1915
|
target: e.target,
|
|
1916
1916
|
anchor: e.anchor,
|
|
1917
1917
|
props: r,
|
|
@@ -1919,28 +1919,28 @@ class ss {
|
|
|
1919
1919
|
intro: e.intro ?? !1,
|
|
1920
1920
|
recover: e.recover,
|
|
1921
1921
|
transformError: e.transformError
|
|
1922
|
-
})), (!e?.props?.$$host || e.sync === !1) &&
|
|
1923
|
-
for (const
|
|
1924
|
-
|
|
1922
|
+
})), (!e?.props?.$$host || e.sync === !1) && fe(), v(this, ge, r.$$events);
|
|
1923
|
+
for (const o of Object.keys(c(this, Y)))
|
|
1924
|
+
o === "$set" || o === "$destroy" || o === "$on" || Lt(this, o, {
|
|
1925
1925
|
get() {
|
|
1926
|
-
return c(this,
|
|
1926
|
+
return c(this, Y)[o];
|
|
1927
1927
|
},
|
|
1928
1928
|
/** @param {any} value */
|
|
1929
|
-
set(
|
|
1930
|
-
c(this,
|
|
1929
|
+
set(s) {
|
|
1930
|
+
c(this, Y)[o] = s;
|
|
1931
1931
|
},
|
|
1932
1932
|
enumerable: !0
|
|
1933
1933
|
});
|
|
1934
|
-
c(this,
|
|
1935
|
-
(
|
|
1936
|
-
Object.assign(r,
|
|
1937
|
-
}, c(this,
|
|
1938
|
-
|
|
1934
|
+
c(this, Y).$set = /** @param {Record<string, any>} next */
|
|
1935
|
+
(o) => {
|
|
1936
|
+
Object.assign(r, o);
|
|
1937
|
+
}, c(this, Y).$destroy = () => {
|
|
1938
|
+
io(c(this, Y));
|
|
1939
1939
|
};
|
|
1940
1940
|
}
|
|
1941
1941
|
/** @param {Record<string, any>} props */
|
|
1942
1942
|
$set(e) {
|
|
1943
|
-
c(this,
|
|
1943
|
+
c(this, Y).$set(e);
|
|
1944
1944
|
}
|
|
1945
1945
|
/**
|
|
1946
1946
|
* @param {string} event
|
|
@@ -1948,22 +1948,22 @@ class ss {
|
|
|
1948
1948
|
* @returns {any}
|
|
1949
1949
|
*/
|
|
1950
1950
|
$on(e, i) {
|
|
1951
|
-
c(this,
|
|
1951
|
+
c(this, ge)[e] = c(this, ge)[e] || [];
|
|
1952
1952
|
const n = (...r) => i.call(this, ...r);
|
|
1953
|
-
return c(this,
|
|
1954
|
-
c(this,
|
|
1953
|
+
return c(this, ge)[e].push(n), () => {
|
|
1954
|
+
c(this, ge)[e] = c(this, ge)[e].filter(
|
|
1955
1955
|
/** @param {any} fn */
|
|
1956
1956
|
(r) => r !== n
|
|
1957
1957
|
);
|
|
1958
1958
|
};
|
|
1959
1959
|
}
|
|
1960
1960
|
$destroy() {
|
|
1961
|
-
c(this,
|
|
1961
|
+
c(this, Y).$destroy();
|
|
1962
1962
|
}
|
|
1963
1963
|
}
|
|
1964
|
-
|
|
1965
|
-
let
|
|
1966
|
-
typeof HTMLElement == "function" && (
|
|
1964
|
+
ge = new WeakMap(), Y = new WeakMap();
|
|
1965
|
+
let Mn;
|
|
1966
|
+
typeof HTMLElement == "function" && (Mn = class extends HTMLElement {
|
|
1967
1967
|
/**
|
|
1968
1968
|
* @param {*} $$componentCtor
|
|
1969
1969
|
* @param {*} $$slots
|
|
@@ -2021,23 +2021,23 @@ typeof HTMLElement == "function" && (Hn = class extends HTMLElement {
|
|
|
2021
2021
|
async connectedCallback() {
|
|
2022
2022
|
if (this.$$cn = !0, !this.$$c) {
|
|
2023
2023
|
let e = function(r) {
|
|
2024
|
-
return (
|
|
2025
|
-
const
|
|
2026
|
-
r !== "default" && (
|
|
2024
|
+
return (o) => {
|
|
2025
|
+
const s = yn("slot");
|
|
2026
|
+
r !== "default" && (s.name = r), Rn(o, s);
|
|
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 = lo(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) {
|
|
2035
|
-
const
|
|
2036
|
-
|
|
2035
|
+
const o = this.$$g_p(r.name);
|
|
2036
|
+
o in this.$$d || (this.$$d[o] = Et(o, r.value, this.$$p_d, "toProp"));
|
|
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 = oo({
|
|
2041
2041
|
component: this.$$ctor,
|
|
2042
2042
|
target: this.$$shadowRoot || this,
|
|
2043
2043
|
props: {
|
|
@@ -2046,26 +2046,26 @@ typeof HTMLElement == "function" && (Hn = class extends HTMLElement {
|
|
|
2046
2046
|
$$host: this
|
|
2047
2047
|
}
|
|
2048
2048
|
}), this.$$me = xr(() => {
|
|
2049
|
-
|
|
2049
|
+
hi(() => {
|
|
2050
2050
|
this.$$r = !0;
|
|
2051
|
-
for (const r of
|
|
2051
|
+
for (const r of kt(this.$$c)) {
|
|
2052
2052
|
if (!this.$$p_d[r]?.reflect) continue;
|
|
2053
2053
|
this.$$d[r] = this.$$c[r];
|
|
2054
|
-
const
|
|
2054
|
+
const o = Et(
|
|
2055
2055
|
r,
|
|
2056
2056
|
this.$$d[r],
|
|
2057
2057
|
this.$$p_d,
|
|
2058
2058
|
"toAttribute"
|
|
2059
2059
|
);
|
|
2060
|
-
|
|
2060
|
+
o == null ? this.removeAttribute(this.$$p_d[r].attribute || r) : this.setAttribute(this.$$p_d[r].attribute || r, o);
|
|
2061
2061
|
}
|
|
2062
2062
|
this.$$r = !1;
|
|
2063
2063
|
});
|
|
2064
2064
|
});
|
|
2065
2065
|
for (const r in this.$$l)
|
|
2066
|
-
for (const
|
|
2067
|
-
const
|
|
2068
|
-
this.$$l_u.set(
|
|
2066
|
+
for (const o of this.$$l[r]) {
|
|
2067
|
+
const s = this.$$c.$on(r, o);
|
|
2068
|
+
this.$$l_u.set(o, s);
|
|
2069
2069
|
}
|
|
2070
2070
|
this.$$l = {};
|
|
2071
2071
|
}
|
|
@@ -2078,7 +2078,7 @@ typeof HTMLElement == "function" && (Hn = class extends HTMLElement {
|
|
|
2078
2078
|
* @param {string} newValue
|
|
2079
2079
|
*/
|
|
2080
2080
|
attributeChangedCallback(e, i, n) {
|
|
2081
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
2081
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = Et(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
2082
2082
|
}
|
|
2083
2083
|
disconnectedCallback() {
|
|
2084
2084
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -2089,12 +2089,12 @@ typeof HTMLElement == "function" && (Hn = class extends HTMLElement {
|
|
|
2089
2089
|
* @param {string} attribute_name
|
|
2090
2090
|
*/
|
|
2091
2091
|
$$g_p(e) {
|
|
2092
|
-
return
|
|
2092
|
+
return kt(this.$$p_d).find(
|
|
2093
2093
|
(i) => this.$$p_d[i].attribute === e || !this.$$p_d[i].attribute && i.toLowerCase() === e
|
|
2094
2094
|
) || e;
|
|
2095
2095
|
}
|
|
2096
2096
|
});
|
|
2097
|
-
function
|
|
2097
|
+
function Et(t, e, i, n) {
|
|
2098
2098
|
const r = i[t]?.type;
|
|
2099
2099
|
if (e = r === "Boolean" && typeof e != "boolean" ? e != null : e, !n || !i[t])
|
|
2100
2100
|
return e;
|
|
@@ -2124,7 +2124,7 @@ function St(t, e, i, n) {
|
|
|
2124
2124
|
return e;
|
|
2125
2125
|
}
|
|
2126
2126
|
}
|
|
2127
|
-
function
|
|
2127
|
+
function lo(t) {
|
|
2128
2128
|
const e = {};
|
|
2129
2129
|
return t.childNodes.forEach((i) => {
|
|
2130
2130
|
e[
|
|
@@ -2133,51 +2133,51 @@ function os(t) {
|
|
|
2133
2133
|
] = !0;
|
|
2134
2134
|
}), e;
|
|
2135
2135
|
}
|
|
2136
|
-
function
|
|
2137
|
-
let
|
|
2136
|
+
function ao(t, e, i, n, r, o) {
|
|
2137
|
+
let s = class extends Mn {
|
|
2138
2138
|
constructor() {
|
|
2139
2139
|
super(t, i, r), this.$$p_d = e;
|
|
2140
2140
|
}
|
|
2141
2141
|
static get observedAttributes() {
|
|
2142
|
-
return
|
|
2142
|
+
return kt(e).map(
|
|
2143
2143
|
(a) => (e[a].attribute || a).toLowerCase()
|
|
2144
2144
|
);
|
|
2145
2145
|
}
|
|
2146
2146
|
};
|
|
2147
|
-
return
|
|
2148
|
-
|
|
2147
|
+
return kt(e).forEach((a) => {
|
|
2148
|
+
Lt(s.prototype, a, {
|
|
2149
2149
|
get() {
|
|
2150
2150
|
return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
|
|
2151
2151
|
},
|
|
2152
2152
|
set(l) {
|
|
2153
|
-
l =
|
|
2153
|
+
l = Et(a, l, e), this.$$d[a] = l;
|
|
2154
2154
|
var u = this.$$c;
|
|
2155
2155
|
if (u) {
|
|
2156
|
-
var f =
|
|
2156
|
+
var f = Ke(u, a)?.get;
|
|
2157
2157
|
f ? u[a] = l : u.$set({ [a]: l });
|
|
2158
2158
|
}
|
|
2159
2159
|
}
|
|
2160
2160
|
});
|
|
2161
2161
|
}), n.forEach((a) => {
|
|
2162
|
-
|
|
2162
|
+
Lt(s.prototype, a, {
|
|
2163
2163
|
get() {
|
|
2164
2164
|
return this.$$c?.[a];
|
|
2165
2165
|
}
|
|
2166
2166
|
});
|
|
2167
2167
|
}), t.element = /** @type {any} */
|
|
2168
|
-
|
|
2168
|
+
s, s;
|
|
2169
2169
|
}
|
|
2170
|
-
class
|
|
2171
|
-
constructor(i, n, r,
|
|
2170
|
+
class co extends Event {
|
|
2171
|
+
constructor(i, n, r, o) {
|
|
2172
2172
|
super("context-request", { bubbles: !0, composed: !0 });
|
|
2173
2173
|
d(this, "context");
|
|
2174
2174
|
d(this, "contextTarget");
|
|
2175
2175
|
d(this, "callback");
|
|
2176
2176
|
d(this, "subscribe");
|
|
2177
|
-
this.context = i, this.contextTarget = n, this.callback = r, this.subscribe =
|
|
2177
|
+
this.context = i, this.contextTarget = n, this.callback = r, this.subscribe = o ?? !1;
|
|
2178
2178
|
}
|
|
2179
2179
|
}
|
|
2180
|
-
class
|
|
2180
|
+
class uo {
|
|
2181
2181
|
constructor(e, i) {
|
|
2182
2182
|
d(this, "host");
|
|
2183
2183
|
d(this, "context");
|
|
@@ -2201,13 +2201,13 @@ class cs {
|
|
|
2201
2201
|
return this.currentValue;
|
|
2202
2202
|
}
|
|
2203
2203
|
requestValue() {
|
|
2204
|
-
this.host.dispatchEvent(new
|
|
2204
|
+
this.host.dispatchEvent(new co(this.context, this.host, this.handleValue, this.subscribe));
|
|
2205
2205
|
}
|
|
2206
2206
|
}
|
|
2207
|
-
const Nn = (t) => t,
|
|
2208
|
-
function
|
|
2207
|
+
const Nn = (t) => t, fo = Nn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), ho = Nn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext"));
|
|
2208
|
+
function Dn(t, e, i) {
|
|
2209
2209
|
let n = !1;
|
|
2210
|
-
const r = new
|
|
2210
|
+
const r = new uo(t, {
|
|
2211
2211
|
context: e,
|
|
2212
2212
|
subscribe: !0,
|
|
2213
2213
|
onValue: (u) => {
|
|
@@ -2215,51 +2215,47 @@ function Mn(t, e, i) {
|
|
|
2215
2215
|
}
|
|
2216
2216
|
});
|
|
2217
2217
|
r.connect();
|
|
2218
|
-
const
|
|
2218
|
+
const o = (u) => {
|
|
2219
2219
|
u.context === e && r.requestValue();
|
|
2220
2220
|
};
|
|
2221
|
-
t.addEventListener("context-provider",
|
|
2222
|
-
let
|
|
2221
|
+
t.addEventListener("context-provider", o);
|
|
2222
|
+
let s = 0;
|
|
2223
2223
|
const a = 200, l = globalThis.setInterval(() => {
|
|
2224
|
-
if (n ||
|
|
2224
|
+
if (n || s >= a) {
|
|
2225
2225
|
globalThis.clearInterval(l);
|
|
2226
2226
|
return;
|
|
2227
2227
|
}
|
|
2228
|
-
|
|
2228
|
+
s += 1, r.requestValue();
|
|
2229
2229
|
}, 50);
|
|
2230
2230
|
return () => {
|
|
2231
|
-
globalThis.clearInterval(l), t.removeEventListener("context-provider",
|
|
2231
|
+
globalThis.clearInterval(l), t.removeEventListener("context-provider", o), r.disconnect();
|
|
2232
2232
|
};
|
|
2233
2233
|
}
|
|
2234
|
-
function
|
|
2235
|
-
return
|
|
2234
|
+
function po(t, e) {
|
|
2235
|
+
return Dn(t, fo, e);
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2238
|
-
return
|
|
2237
|
+
function mo(t, e) {
|
|
2238
|
+
return Dn(t, ho, e);
|
|
2239
2239
|
}
|
|
2240
|
-
function
|
|
2241
|
-
return
|
|
2240
|
+
function go(t, e) {
|
|
2241
|
+
return po(t, e);
|
|
2242
2242
|
}
|
|
2243
|
-
function
|
|
2244
|
-
return
|
|
2243
|
+
function vo(t, e) {
|
|
2244
|
+
return mo(t, e);
|
|
2245
2245
|
}
|
|
2246
|
-
var
|
|
2246
|
+
var Pi;
|
|
2247
2247
|
(function(t) {
|
|
2248
2248
|
t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
|
|
2249
|
-
})(
|
|
2250
|
-
var
|
|
2249
|
+
})(Pi || (Pi = {}));
|
|
2250
|
+
var Hi;
|
|
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
|
-
|
|
2255
|
-
tts: "textToSpeech",
|
|
2256
|
-
colorScheme: "theme"
|
|
2257
|
-
};
|
|
2258
|
-
function vs(t) {
|
|
2253
|
+
})(Hi || (Hi = {}));
|
|
2254
|
+
function bo(t) {
|
|
2259
2255
|
const e = t.trim();
|
|
2260
|
-
return e
|
|
2256
|
+
return e || "";
|
|
2261
2257
|
}
|
|
2262
|
-
const
|
|
2258
|
+
const yo = [
|
|
2263
2259
|
"assessment",
|
|
2264
2260
|
"section",
|
|
2265
2261
|
"item",
|
|
@@ -2267,16 +2263,16 @@ const bs = [
|
|
|
2267
2263
|
"rubric",
|
|
2268
2264
|
"element"
|
|
2269
2265
|
];
|
|
2270
|
-
function
|
|
2266
|
+
function Ct(t, e) {
|
|
2271
2267
|
if (typeof t != "string" || t.trim().length === 0)
|
|
2272
2268
|
throw new Error(`Invalid tool registration: "${e}" must be a non-empty string.`);
|
|
2273
2269
|
}
|
|
2274
|
-
function
|
|
2275
|
-
if (
|
|
2270
|
+
function Mi(t) {
|
|
2271
|
+
if (Ct(t.toolId, "toolId"), Ct(t.name, "name"), Ct(t.description, "description"), typeof t.icon != "string" && typeof t.icon != "function")
|
|
2276
2272
|
throw new Error(`Invalid tool registration "${t.toolId}": "icon" must be a string or function.`);
|
|
2277
2273
|
if (!Array.isArray(t.supportedLevels) || t.supportedLevels.length === 0)
|
|
2278
2274
|
throw new Error(`Invalid tool registration "${t.toolId}": "supportedLevels" must be a non-empty array.`);
|
|
2279
|
-
const e = t.supportedLevels.find((i) => !
|
|
2275
|
+
const e = t.supportedLevels.find((i) => !yo.includes(i));
|
|
2280
2276
|
if (e)
|
|
2281
2277
|
throw new Error(`Invalid tool registration "${t.toolId}": unsupported level "${e}".`);
|
|
2282
2278
|
if (t.activation !== void 0 && t.activation !== "toolbar-toggle" && t.activation !== "selection-gateway")
|
|
@@ -2292,7 +2288,7 @@ function Hi(t) {
|
|
|
2292
2288
|
if (typeof t.renderToolbar != "function")
|
|
2293
2289
|
throw new Error(`Invalid tool registration "${t.toolId}": "renderToolbar" must be a function.`);
|
|
2294
2290
|
}
|
|
2295
|
-
class
|
|
2291
|
+
class _o {
|
|
2296
2292
|
constructor() {
|
|
2297
2293
|
d(this, "tools", /* @__PURE__ */ new Map());
|
|
2298
2294
|
d(this, "pnpIndex", /* @__PURE__ */ new Map());
|
|
@@ -2306,7 +2302,7 @@ class ys {
|
|
|
2306
2302
|
* Normalize a single tool alias to canonical toolId.
|
|
2307
2303
|
*/
|
|
2308
2304
|
normalizeToolId(e) {
|
|
2309
|
-
return
|
|
2305
|
+
return bo(e);
|
|
2310
2306
|
}
|
|
2311
2307
|
/**
|
|
2312
2308
|
* Normalize a list of tool aliases to canonical toolIds.
|
|
@@ -2321,7 +2317,7 @@ class ys {
|
|
|
2321
2317
|
* @throws Error if toolId is already registered
|
|
2322
2318
|
*/
|
|
2323
2319
|
register(e) {
|
|
2324
|
-
if (
|
|
2320
|
+
if (Mi(e), this.tools.has(e.toolId))
|
|
2325
2321
|
throw new Error(`Tool '${e.toolId}' is already registered`);
|
|
2326
2322
|
if (this.tools.set(e.toolId, e), e.pnpSupportIds)
|
|
2327
2323
|
for (const i of e.pnpSupportIds)
|
|
@@ -2333,7 +2329,7 @@ class ys {
|
|
|
2333
2329
|
* @param registration - New tool registration (must have existing toolId)
|
|
2334
2330
|
*/
|
|
2335
2331
|
override(e) {
|
|
2336
|
-
if (
|
|
2332
|
+
if (Mi(e), !this.tools.has(e.toolId))
|
|
2337
2333
|
throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
|
|
2338
2334
|
const i = this.tools.get(e.toolId);
|
|
2339
2335
|
if (i.pnpSupportIds)
|
|
@@ -2440,16 +2436,16 @@ class ys {
|
|
|
2440
2436
|
filterVisibleInContext(e, i) {
|
|
2441
2437
|
const n = [];
|
|
2442
2438
|
for (const r of e) {
|
|
2443
|
-
const
|
|
2444
|
-
if (!
|
|
2439
|
+
const o = this.get(r);
|
|
2440
|
+
if (!o) {
|
|
2445
2441
|
console.warn(`Tool '${r}' is allowed but not registered`);
|
|
2446
2442
|
continue;
|
|
2447
2443
|
}
|
|
2448
|
-
if (
|
|
2444
|
+
if (o.supportedLevels.includes(i.level))
|
|
2449
2445
|
try {
|
|
2450
|
-
|
|
2451
|
-
} catch (
|
|
2452
|
-
console.error(`Error evaluating visibility for tool '${r}':`,
|
|
2446
|
+
o.isVisibleInContext(i) && n.push(o);
|
|
2447
|
+
} catch (s) {
|
|
2448
|
+
console.error(`Error evaluating visibility for tool '${r}':`, s);
|
|
2453
2449
|
}
|
|
2454
2450
|
}
|
|
2455
2451
|
return n;
|
|
@@ -2483,8 +2479,8 @@ class ys {
|
|
|
2483
2479
|
for (const n of e) {
|
|
2484
2480
|
const r = this.get(n);
|
|
2485
2481
|
if (r?.pnpSupportIds)
|
|
2486
|
-
for (const
|
|
2487
|
-
i.add(
|
|
2482
|
+
for (const o of r.pnpSupportIds)
|
|
2483
|
+
i.add(o);
|
|
2488
2484
|
}
|
|
2489
2485
|
return Array.from(i);
|
|
2490
2486
|
}
|
|
@@ -2507,7 +2503,7 @@ class ys {
|
|
|
2507
2503
|
setToolModuleLoaders(e) {
|
|
2508
2504
|
for (const [i, n] of Object.entries(e))
|
|
2509
2505
|
if (n) {
|
|
2510
|
-
if (
|
|
2506
|
+
if (Ct(i, "tool module loader id"), typeof n != "function")
|
|
2511
2507
|
throw new Error(`Invalid tool module loader for "${i}": expected a function.`);
|
|
2512
2508
|
this.moduleLoaders.set(i, n);
|
|
2513
2509
|
}
|
|
@@ -2556,36 +2552,36 @@ class ys {
|
|
|
2556
2552
|
const r = this.get(e);
|
|
2557
2553
|
if (!r)
|
|
2558
2554
|
throw new Error(`Tool '${e}' is not registered`);
|
|
2559
|
-
const
|
|
2555
|
+
const o = {
|
|
2560
2556
|
...n,
|
|
2561
2557
|
componentOverrides: {
|
|
2562
2558
|
...this.componentOverrides || {},
|
|
2563
2559
|
...n.componentOverrides || {}
|
|
2564
2560
|
}
|
|
2565
2561
|
};
|
|
2566
|
-
return r.renderToolbar(i,
|
|
2562
|
+
return r.renderToolbar(i, o);
|
|
2567
2563
|
}
|
|
2568
2564
|
}
|
|
2569
2565
|
function Fn(t) {
|
|
2570
2566
|
return t.level === "item";
|
|
2571
2567
|
}
|
|
2572
|
-
function
|
|
2568
|
+
function To(t) {
|
|
2573
2569
|
return t.level === "passage";
|
|
2574
2570
|
}
|
|
2575
|
-
function
|
|
2571
|
+
function Ao(t) {
|
|
2576
2572
|
return t.level === "rubric";
|
|
2577
2573
|
}
|
|
2578
2574
|
function xn(t) {
|
|
2579
2575
|
return t.level === "element";
|
|
2580
2576
|
}
|
|
2581
|
-
function
|
|
2577
|
+
function gi(t) {
|
|
2582
2578
|
if (xn(t)) {
|
|
2583
2579
|
const e = t.item.config;
|
|
2584
2580
|
if (!e)
|
|
2585
2581
|
return "";
|
|
2586
2582
|
const i = [], n = (l) => l.replace(/<[^>]*>/g, " ").trim(), r = e.elements?.[t.elementId];
|
|
2587
2583
|
r && typeof r == "string" && i.push(n(r));
|
|
2588
|
-
const
|
|
2584
|
+
const o = e.models, a = (Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : []).find((l) => l && typeof l == "object" && l.id === t.elementId);
|
|
2589
2585
|
if (a) {
|
|
2590
2586
|
for (const l of Object.values(a))
|
|
2591
2587
|
if (typeof l == "string" && i.push(n(l)), Array.isArray(l)) {
|
|
@@ -2603,11 +2599,11 @@ function mi(t) {
|
|
|
2603
2599
|
return "";
|
|
2604
2600
|
const i = e.config, n = [], r = (l) => l.replace(/<[^>]*>/g, " ").trim();
|
|
2605
2601
|
typeof i.markup == "string" && n.push(r(i.markup));
|
|
2606
|
-
const
|
|
2607
|
-
if (
|
|
2608
|
-
for (const l of Object.values(
|
|
2602
|
+
const o = i.elements;
|
|
2603
|
+
if (o && typeof o == "object")
|
|
2604
|
+
for (const l of Object.values(o))
|
|
2609
2605
|
typeof l == "string" && n.push(r(l));
|
|
2610
|
-
const
|
|
2606
|
+
const s = i.models, a = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
|
|
2611
2607
|
for (const l of a)
|
|
2612
2608
|
if (!(!l || typeof l != "object")) {
|
|
2613
2609
|
for (const u of Object.values(l))
|
|
@@ -2620,17 +2616,17 @@ function mi(t) {
|
|
|
2620
2616
|
}
|
|
2621
2617
|
return n.filter(Boolean).join(" ").trim();
|
|
2622
2618
|
}
|
|
2623
|
-
if (
|
|
2619
|
+
if (To(t)) {
|
|
2624
2620
|
const e = t.passage;
|
|
2625
2621
|
if (!e?.config)
|
|
2626
2622
|
return "";
|
|
2627
2623
|
const i = e.config, n = [], r = (l) => l.replace(/<[^>]*>/g, " ").trim();
|
|
2628
2624
|
typeof i.markup == "string" && n.push(r(i.markup)), typeof i.content == "string" && n.push(r(i.content)), typeof i.prompt == "string" && n.push(r(i.prompt));
|
|
2629
|
-
const
|
|
2630
|
-
if (
|
|
2631
|
-
for (const l of Object.values(
|
|
2625
|
+
const o = i.elements;
|
|
2626
|
+
if (o && typeof o == "object")
|
|
2627
|
+
for (const l of Object.values(o))
|
|
2632
2628
|
typeof l == "string" && n.push(r(l));
|
|
2633
|
-
const
|
|
2629
|
+
const s = i.models, a = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
|
|
2634
2630
|
for (const l of a)
|
|
2635
2631
|
if (!(!l || typeof l != "object")) {
|
|
2636
2632
|
for (const u of Object.values(l))
|
|
@@ -2643,14 +2639,14 @@ function mi(t) {
|
|
|
2643
2639
|
}
|
|
2644
2640
|
return n.filter(Boolean).join(" ").trim();
|
|
2645
2641
|
}
|
|
2646
|
-
if (
|
|
2642
|
+
if (Ao(t)) {
|
|
2647
2643
|
const e = t.rubricBlock;
|
|
2648
2644
|
return e.passage?.config ? (e.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (e.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
2649
2645
|
}
|
|
2650
2646
|
return "";
|
|
2651
2647
|
}
|
|
2652
2648
|
function Ft(t) {
|
|
2653
|
-
const e =
|
|
2649
|
+
const e = gi(t);
|
|
2654
2650
|
return [
|
|
2655
2651
|
/<math[>\s]/i,
|
|
2656
2652
|
// MathML
|
|
@@ -2666,7 +2662,7 @@ function Ft(t) {
|
|
|
2666
2662
|
// Simple arithmetic
|
|
2667
2663
|
].some((n) => n.test(e));
|
|
2668
2664
|
}
|
|
2669
|
-
function
|
|
2665
|
+
function wo(t) {
|
|
2670
2666
|
const e = [
|
|
2671
2667
|
"pie-multiple-choice",
|
|
2672
2668
|
"pie-inline-choice",
|
|
@@ -2679,28 +2675,28 @@ function As(t) {
|
|
|
2679
2675
|
const i = t.item.config;
|
|
2680
2676
|
if (!i?.models)
|
|
2681
2677
|
return !1;
|
|
2682
|
-
const r = (Array.isArray(i.models) ? i.models : Object.values(i.models)).find((
|
|
2678
|
+
const r = (Array.isArray(i.models) ? i.models : Object.values(i.models)).find((s) => s && typeof s == "object" && s.id === t.elementId);
|
|
2683
2679
|
if (!r)
|
|
2684
2680
|
return !1;
|
|
2685
|
-
const
|
|
2686
|
-
return e.includes(
|
|
2681
|
+
const o = r.element || "";
|
|
2682
|
+
return e.includes(o);
|
|
2687
2683
|
}
|
|
2688
2684
|
if (Fn(t)) {
|
|
2689
2685
|
const i = t.item.config?.models;
|
|
2690
2686
|
return (Array.isArray(i) ? i : i && typeof i == "object" ? Object.values(i) : []).some((r) => {
|
|
2691
2687
|
if (!r || typeof r != "object")
|
|
2692
2688
|
return !1;
|
|
2693
|
-
const
|
|
2694
|
-
return e.includes(
|
|
2689
|
+
const o = r.element || "";
|
|
2690
|
+
return e.includes(o) ? !0 : Array.isArray(r.choices) && r.choices.length > 0;
|
|
2695
2691
|
});
|
|
2696
2692
|
}
|
|
2697
2693
|
return !1;
|
|
2698
2694
|
}
|
|
2699
2695
|
function xt(t) {
|
|
2700
|
-
return
|
|
2696
|
+
return gi(t).trim().length >= 10;
|
|
2701
2697
|
}
|
|
2702
|
-
function
|
|
2703
|
-
const e =
|
|
2698
|
+
function Io(t) {
|
|
2699
|
+
const e = gi(t);
|
|
2704
2700
|
return [
|
|
2705
2701
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
2706
2702
|
/periodic\s+table/i,
|
|
@@ -2712,25 +2708,25 @@ function ws(t) {
|
|
|
2712
2708
|
/physics|force|energy|velocity|acceleration/i
|
|
2713
2709
|
].some((n) => n.test(e));
|
|
2714
2710
|
}
|
|
2715
|
-
const
|
|
2711
|
+
const So = [
|
|
2716
2712
|
"assessment",
|
|
2717
2713
|
"section",
|
|
2718
2714
|
"item",
|
|
2719
2715
|
"passage",
|
|
2720
2716
|
"rubric"
|
|
2721
|
-
],
|
|
2722
|
-
function
|
|
2723
|
-
return
|
|
2717
|
+
], Eo = new Set(So);
|
|
2718
|
+
function Co(t) {
|
|
2719
|
+
return Eo.has(t);
|
|
2724
2720
|
}
|
|
2725
|
-
function
|
|
2721
|
+
function vi(t, e, i) {
|
|
2726
2722
|
const n = t.trim(), r = i.trim();
|
|
2727
2723
|
if (!n || !r)
|
|
2728
2724
|
throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
2729
|
-
if (!
|
|
2725
|
+
if (!Co(e))
|
|
2730
2726
|
throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
|
|
2731
2727
|
return `${n}:${e}:${r}`;
|
|
2732
2728
|
}
|
|
2733
|
-
class
|
|
2729
|
+
class $o {
|
|
2734
2730
|
constructor() {
|
|
2735
2731
|
d(this, "providerId", "desmos-calculator");
|
|
2736
2732
|
d(this, "providerName", "Desmos Calculator");
|
|
@@ -2740,6 +2736,13 @@ class Cs {
|
|
|
2740
2736
|
d(this, "desmosProvider", null);
|
|
2741
2737
|
d(this, "config", null);
|
|
2742
2738
|
}
|
|
2739
|
+
async emitTelemetry(e, i) {
|
|
2740
|
+
try {
|
|
2741
|
+
await this.config?.onTelemetry?.(e, i);
|
|
2742
|
+
} catch (n) {
|
|
2743
|
+
console.warn("[DesmosToolProvider] telemetry callback failed:", n);
|
|
2744
|
+
}
|
|
2745
|
+
}
|
|
2743
2746
|
/**
|
|
2744
2747
|
* Initialize Desmos calculator provider
|
|
2745
2748
|
*
|
|
@@ -2754,15 +2757,41 @@ class Cs {
|
|
|
2754
2757
|
return;
|
|
2755
2758
|
}
|
|
2756
2759
|
this.config = e;
|
|
2757
|
-
const i =
|
|
2758
|
-
this.
|
|
2760
|
+
const i = Date.now();
|
|
2761
|
+
await this.emitTelemetry("pie-tool-library-load-start", {
|
|
2762
|
+
toolId: "calculator",
|
|
2763
|
+
operation: "desmos-provider-module-import",
|
|
2764
|
+
backend: "desmos"
|
|
2765
|
+
});
|
|
2766
|
+
const n = await (async () => {
|
|
2767
|
+
try {
|
|
2768
|
+
const r = await import("./index-QLtHZ4Yz.js");
|
|
2769
|
+
return await this.emitTelemetry("pie-tool-library-load-success", {
|
|
2770
|
+
toolId: "calculator",
|
|
2771
|
+
operation: "desmos-provider-module-import",
|
|
2772
|
+
backend: "desmos",
|
|
2773
|
+
duration: Date.now() - i
|
|
2774
|
+
}), r;
|
|
2775
|
+
} catch (r) {
|
|
2776
|
+
throw await this.emitTelemetry("pie-tool-library-load-error", {
|
|
2777
|
+
toolId: "calculator",
|
|
2778
|
+
operation: "desmos-provider-module-import",
|
|
2779
|
+
backend: "desmos",
|
|
2780
|
+
duration: Date.now() - i,
|
|
2781
|
+
errorType: "ToolLibraryLoadError",
|
|
2782
|
+
message: r instanceof Error ? r.message : String(r)
|
|
2783
|
+
}), r;
|
|
2784
|
+
}
|
|
2785
|
+
})();
|
|
2786
|
+
this.desmosProvider = new n.DesmosCalculatorProvider();
|
|
2759
2787
|
try {
|
|
2760
2788
|
await this.desmosProvider.initialize({
|
|
2761
2789
|
apiKey: e.apiKey,
|
|
2762
|
-
proxyEndpoint: e.proxyEndpoint
|
|
2790
|
+
proxyEndpoint: e.proxyEndpoint,
|
|
2791
|
+
onTelemetry: e.onTelemetry
|
|
2763
2792
|
}), console.log(`[DesmosToolProvider] Initialized successfully ${e.proxyEndpoint ? "(using proxy)" : e.apiKey ? "(direct API key)" : "(no auth)"}`);
|
|
2764
|
-
} catch (
|
|
2765
|
-
throw console.error("[DesmosToolProvider] Initialization failed:",
|
|
2793
|
+
} catch (r) {
|
|
2794
|
+
throw console.error("[DesmosToolProvider] Initialization failed:", r), new Error("Failed to initialize Desmos calculator provider. Check API key or proxy endpoint.");
|
|
2766
2795
|
}
|
|
2767
2796
|
}
|
|
2768
2797
|
/**
|
|
@@ -2816,7 +2845,7 @@ class Cs {
|
|
|
2816
2845
|
this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
|
|
2817
2846
|
}
|
|
2818
2847
|
}
|
|
2819
|
-
const
|
|
2848
|
+
const ko = (t, e) => {
|
|
2820
2849
|
const i = e?.useSentenceSegmenter !== !1;
|
|
2821
2850
|
try {
|
|
2822
2851
|
if (!i)
|
|
@@ -2834,15 +2863,15 @@ const $s = (t, e) => {
|
|
|
2834
2863
|
}
|
|
2835
2864
|
} catch {
|
|
2836
2865
|
}
|
|
2837
|
-
const n = /[^.!?]+(?:[.!?]+|$)/g, r = t.match(n) || [t],
|
|
2838
|
-
let
|
|
2866
|
+
const n = /[^.!?]+(?:[.!?]+|$)/g, r = t.match(n) || [t], o = [];
|
|
2867
|
+
let s = 0;
|
|
2839
2868
|
for (const a of r) {
|
|
2840
|
-
const l = t.indexOf(a,
|
|
2841
|
-
l !== -1 && (
|
|
2869
|
+
const l = t.indexOf(a, s);
|
|
2870
|
+
l !== -1 && (o.push({ text: a, offset: l }), s = l + a.length);
|
|
2842
2871
|
}
|
|
2843
|
-
return
|
|
2872
|
+
return o.length > 0 ? o : [{ text: t, offset: 0 }];
|
|
2844
2873
|
};
|
|
2845
|
-
class
|
|
2874
|
+
class Lo {
|
|
2846
2875
|
constructor() {
|
|
2847
2876
|
d(this, "providerId", "browser");
|
|
2848
2877
|
d(this, "providerName", "Browser Speech Synthesis");
|
|
@@ -2853,7 +2882,7 @@ class Os {
|
|
|
2853
2882
|
throw new Error("BrowserTTSProvider requires browser environment");
|
|
2854
2883
|
if (!("speechSynthesis" in window))
|
|
2855
2884
|
throw new Error("Browser does not support Speech Synthesis API");
|
|
2856
|
-
return new
|
|
2885
|
+
return new Oo(e);
|
|
2857
2886
|
}
|
|
2858
2887
|
supportsFeature(e) {
|
|
2859
2888
|
return !0;
|
|
@@ -2871,7 +2900,7 @@ class Os {
|
|
|
2871
2900
|
destroy() {
|
|
2872
2901
|
}
|
|
2873
2902
|
}
|
|
2874
|
-
class
|
|
2903
|
+
class Oo {
|
|
2875
2904
|
constructor(e) {
|
|
2876
2905
|
d(this, "utterance", null);
|
|
2877
2906
|
d(this, "config", null);
|
|
@@ -2899,11 +2928,11 @@ class Ls {
|
|
|
2899
2928
|
if (i !== this.speakRunId)
|
|
2900
2929
|
break;
|
|
2901
2930
|
const r = this.splitIntoChunks(n.text);
|
|
2902
|
-
for (const
|
|
2903
|
-
if (i !== this.speakRunId || !await this.speakChunk(
|
|
2931
|
+
for (const s of r)
|
|
2932
|
+
if (i !== this.speakRunId || !await this.speakChunk(s.text, n.startOffset + s.offset, i))
|
|
2904
2933
|
break;
|
|
2905
|
-
const
|
|
2906
|
-
if (
|
|
2934
|
+
const o = Math.max(0, Number(n.pauseMsAfter || 0));
|
|
2935
|
+
if (o > 0 && i === this.speakRunId && !await this.waitForPause(o, i))
|
|
2907
2936
|
break;
|
|
2908
2937
|
}
|
|
2909
2938
|
}
|
|
@@ -2914,35 +2943,35 @@ class Ls {
|
|
|
2914
2943
|
if (e.length <= 260)
|
|
2915
2944
|
return [{ text: e, offset: 0 }];
|
|
2916
2945
|
const n = this.segmentSentences(e), r = [];
|
|
2917
|
-
let
|
|
2946
|
+
let o = "", s = 0;
|
|
2918
2947
|
for (const a of n) {
|
|
2919
2948
|
const l = a.text.trim();
|
|
2920
2949
|
if (!l)
|
|
2921
2950
|
continue;
|
|
2922
2951
|
const u = a.text.search(/\S/), f = a.offset + (u === -1 ? 0 : u);
|
|
2923
|
-
if (!
|
|
2924
|
-
|
|
2952
|
+
if (!o) {
|
|
2953
|
+
o = l, s = f;
|
|
2925
2954
|
continue;
|
|
2926
2955
|
}
|
|
2927
|
-
const h = `${
|
|
2928
|
-
h.length <= 260 ?
|
|
2956
|
+
const h = `${o} ${l}`;
|
|
2957
|
+
h.length <= 260 ? o = h : (r.push({ text: o, offset: s }), o = l, s = f);
|
|
2929
2958
|
}
|
|
2930
|
-
return
|
|
2959
|
+
return o && r.push({ text: o, offset: s }), r.length ? r : [{ text: e, offset: 0 }];
|
|
2931
2960
|
}
|
|
2932
2961
|
getHighlightMode() {
|
|
2933
2962
|
return (this.config?.providerOptions || {}).highlightMode === "word" ? "word" : "sentence";
|
|
2934
2963
|
}
|
|
2935
2964
|
getSegmentationPolicy() {
|
|
2936
|
-
const e = this.config?.providerOptions || {}, i = e.segmenter || {}, r = i.mode !== "regexOnly",
|
|
2965
|
+
const e = this.config?.providerOptions || {}, i = e.segmenter || {}, r = i.mode !== "regexOnly", o = typeof i.locale == "string" && i.locale.trim().length > 0 ? i.locale : typeof e.locale == "string" && e.locale.trim().length > 0 ? e.locale : void 0;
|
|
2937
2966
|
return {
|
|
2938
2967
|
useSentenceSegmenter: r,
|
|
2939
2968
|
useWordSegmenter: r,
|
|
2940
|
-
locale:
|
|
2969
|
+
locale: o
|
|
2941
2970
|
};
|
|
2942
2971
|
}
|
|
2943
2972
|
segmentSentences(e) {
|
|
2944
2973
|
const i = this.getSegmentationPolicy();
|
|
2945
|
-
return
|
|
2974
|
+
return ko(e, {
|
|
2946
2975
|
locale: i.locale,
|
|
2947
2976
|
useSentenceSegmenter: i.useSentenceSegmenter
|
|
2948
2977
|
});
|
|
@@ -2952,7 +2981,7 @@ class Ls {
|
|
|
2952
2981
|
return e.slice(n).match(/^\s*([^\s]+)/)?.[1]?.length || 1;
|
|
2953
2982
|
}
|
|
2954
2983
|
async speakChunk(e, i, n) {
|
|
2955
|
-
return new Promise((r,
|
|
2984
|
+
return new Promise((r, o) => {
|
|
2956
2985
|
if (n !== this.speakRunId) {
|
|
2957
2986
|
r(!1);
|
|
2958
2987
|
return;
|
|
@@ -2969,24 +2998,24 @@ class Ls {
|
|
|
2969
2998
|
return;
|
|
2970
2999
|
}
|
|
2971
3000
|
this._isPlaying = !1, this._isPaused = !1, r(!0);
|
|
2972
|
-
}, this.utterance.onerror = (
|
|
3001
|
+
}, this.utterance.onerror = (s) => {
|
|
2973
3002
|
if (n !== this.speakRunId) {
|
|
2974
3003
|
r(!1);
|
|
2975
3004
|
return;
|
|
2976
3005
|
}
|
|
2977
|
-
if (this._isPlaying = !1, this._isPaused = !1,
|
|
3006
|
+
if (this._isPlaying = !1, this._isPaused = !1, s.error === "interrupted" || s.error === "canceled") {
|
|
2978
3007
|
r(!1);
|
|
2979
3008
|
return;
|
|
2980
3009
|
}
|
|
2981
|
-
|
|
3010
|
+
o(new Error(`Speech synthesis error: ${s.error}`));
|
|
2982
3011
|
}, this.utterance.onpause = () => {
|
|
2983
3012
|
n === this.speakRunId && (this._isPaused = !0);
|
|
2984
3013
|
}, this.utterance.onresume = () => {
|
|
2985
3014
|
n === this.speakRunId && (this._isPaused = !1);
|
|
2986
|
-
}, this.utterance.onboundary = (
|
|
2987
|
-
if (n !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:",
|
|
3015
|
+
}, this.utterance.onboundary = (s) => {
|
|
3016
|
+
if (n !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", s.name, "charIndex:", s.charIndex, "charLength:", s.charLength), s.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence")
|
|
2988
3017
|
return;
|
|
2989
|
-
const a = Math.max(0, Math.min(
|
|
3018
|
+
const a = Math.max(0, Math.min(s.charIndex, Math.max(0, e.length - 1))), l = Number(s.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
3019
|
console.log("[BrowserProvider] Calling onWordBoundary with word:", h, "at position:", g), this.onWordBoundary(h, g, f);
|
|
2991
3020
|
}, speechSynthesis.speak(this.utterance);
|
|
2992
3021
|
});
|
|
@@ -3017,7 +3046,7 @@ class Ls {
|
|
|
3017
3046
|
});
|
|
3018
3047
|
}
|
|
3019
3048
|
}
|
|
3020
|
-
class
|
|
3049
|
+
class Ro {
|
|
3021
3050
|
/**
|
|
3022
3051
|
* Create TTS tool provider
|
|
3023
3052
|
*
|
|
@@ -3033,6 +3062,13 @@ class Rs {
|
|
|
3033
3062
|
d(this, "config", null);
|
|
3034
3063
|
this.requiresAuth = e !== "browser";
|
|
3035
3064
|
}
|
|
3065
|
+
async emitTelemetry(e, i) {
|
|
3066
|
+
try {
|
|
3067
|
+
await this.config?.onTelemetry?.(e, i);
|
|
3068
|
+
} catch (n) {
|
|
3069
|
+
console.warn("[TTSToolProvider] telemetry callback failed:", n);
|
|
3070
|
+
}
|
|
3071
|
+
}
|
|
3036
3072
|
/**
|
|
3037
3073
|
* Initialize TTS provider
|
|
3038
3074
|
*
|
|
@@ -3066,7 +3102,7 @@ class Rs {
|
|
|
3066
3102
|
async _initializeBrowserTTS(e) {
|
|
3067
3103
|
if (typeof window > "u" || !("speechSynthesis" in window))
|
|
3068
3104
|
throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
|
|
3069
|
-
this.ttsProvider = new
|
|
3105
|
+
this.ttsProvider = new Lo(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
|
|
3070
3106
|
}
|
|
3071
3107
|
/**
|
|
3072
3108
|
* Initialize server-based TTS (Polly, Google)
|
|
@@ -3074,8 +3110,33 @@ class Rs {
|
|
|
3074
3110
|
async _initializeServerTTS(e) {
|
|
3075
3111
|
if (!e.apiEndpoint)
|
|
3076
3112
|
throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
|
|
3077
|
-
const i =
|
|
3078
|
-
this.
|
|
3113
|
+
const i = Date.now();
|
|
3114
|
+
await this.emitTelemetry("pie-tool-library-load-start", {
|
|
3115
|
+
toolId: "tts",
|
|
3116
|
+
operation: "server-provider-module-import",
|
|
3117
|
+
backend: e.serverProvider || e.backend
|
|
3118
|
+
});
|
|
3119
|
+
const n = await (async () => {
|
|
3120
|
+
try {
|
|
3121
|
+
const r = await import("./index-BRKsQ6Im.js");
|
|
3122
|
+
return await this.emitTelemetry("pie-tool-library-load-success", {
|
|
3123
|
+
toolId: "tts",
|
|
3124
|
+
operation: "server-provider-module-import",
|
|
3125
|
+
backend: e.serverProvider || e.backend,
|
|
3126
|
+
duration: Date.now() - i
|
|
3127
|
+
}), r;
|
|
3128
|
+
} catch (r) {
|
|
3129
|
+
throw await this.emitTelemetry("pie-tool-library-load-error", {
|
|
3130
|
+
toolId: "tts",
|
|
3131
|
+
operation: "server-provider-module-import",
|
|
3132
|
+
backend: e.serverProvider || e.backend,
|
|
3133
|
+
duration: Date.now() - i,
|
|
3134
|
+
errorType: "ToolLibraryLoadError",
|
|
3135
|
+
message: r instanceof Error ? r.message : String(r)
|
|
3136
|
+
}), r;
|
|
3137
|
+
}
|
|
3138
|
+
})();
|
|
3139
|
+
this.ttsProvider = new n.ServerTTSProvider(), console.log(`[TTSToolProvider] Server TTS initialized (provider: ${e.serverProvider || e.backend})`);
|
|
3079
3140
|
}
|
|
3080
3141
|
/**
|
|
3081
3142
|
* Create a TTS provider instance
|
|
@@ -3132,7 +3193,7 @@ class Rs {
|
|
|
3132
3193
|
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
3133
3194
|
}
|
|
3134
3195
|
}
|
|
3135
|
-
const
|
|
3196
|
+
const Po = /* @__PURE__ */ new Set([
|
|
3136
3197
|
"annotation-xml",
|
|
3137
3198
|
"color-profile",
|
|
3138
3199
|
"font-face",
|
|
@@ -3141,7 +3202,7 @@ const ks = /* @__PURE__ */ new Set([
|
|
|
3141
3202
|
"font-face-format",
|
|
3142
3203
|
"font-face-name",
|
|
3143
3204
|
"missing-glyph"
|
|
3144
|
-
]),
|
|
3205
|
+
]), Ho = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Mo = (t, e = "custom element tag") => {
|
|
3145
3206
|
if (!t || typeof t != "string")
|
|
3146
3207
|
throw new Error(`Invalid ${e}: expected a non-empty string`);
|
|
3147
3208
|
const i = t.trim();
|
|
@@ -3151,12 +3212,12 @@ const ks = /* @__PURE__ */ new Set([
|
|
|
3151
3212
|
throw new Error(`Invalid ${e} "${i}": custom element names must be lowercase`);
|
|
3152
3213
|
if (!i.includes("-"))
|
|
3153
3214
|
throw new Error(`Invalid ${e} "${i}": custom element names must include a hyphen`);
|
|
3154
|
-
if (
|
|
3215
|
+
if (Po.has(i))
|
|
3155
3216
|
throw new Error(`Invalid ${e} "${i}": this name is reserved by the HTML spec`);
|
|
3156
|
-
if (!
|
|
3217
|
+
if (!Ho.test(i))
|
|
3157
3218
|
throw new Error(`Invalid ${e} "${i}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
3158
3219
|
return i;
|
|
3159
|
-
},
|
|
3220
|
+
}, Bn = {
|
|
3160
3221
|
calculator: "pie-tool-calculator",
|
|
3161
3222
|
textToSpeech: "pie-tool-text-to-speech",
|
|
3162
3223
|
ruler: "pie-tool-ruler",
|
|
@@ -3169,20 +3230,20 @@ const ks = /* @__PURE__ */ new Set([
|
|
|
3169
3230
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
3170
3231
|
graph: "pie-tool-graph",
|
|
3171
3232
|
periodicTable: "pie-tool-periodic-table"
|
|
3172
|
-
},
|
|
3173
|
-
const i = e?.toolTagMap?.[t] ??
|
|
3174
|
-
return
|
|
3175
|
-
},
|
|
3176
|
-
const r =
|
|
3177
|
-
return
|
|
3178
|
-
},
|
|
3233
|
+
}, No = (t, e) => {
|
|
3234
|
+
const i = e?.toolTagMap?.[t] ?? Bn[t] ?? t;
|
|
3235
|
+
return Mo(i, `tool component tag for "${t}"`);
|
|
3236
|
+
}, Do = (t) => document.createElement(t), de = (t, e, i, n) => {
|
|
3237
|
+
const r = No(t, n), s = n?.toolComponentFactories?.[t] ?? n?.toolComponentFactory;
|
|
3238
|
+
return s ? s({ toolId: t, tagName: r, context: e, toolbarContext: i }) : Do(r);
|
|
3239
|
+
}, Fo = {
|
|
3179
3240
|
toolId: "calculator",
|
|
3180
3241
|
name: "Calculator",
|
|
3181
3242
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
3182
3243
|
icon: "calculator",
|
|
3183
3244
|
provider: {
|
|
3184
3245
|
getProviderId: (t) => typeof t?.provider?.id == "string" && t.provider.id.length > 0 ? t.provider.id : "calculator-desmos",
|
|
3185
|
-
createProvider: () => new
|
|
3246
|
+
createProvider: () => new $o(),
|
|
3186
3247
|
getInitConfig: (t) => t?.provider?.init ?? {},
|
|
3187
3248
|
getAuthFetcher: (t) => {
|
|
3188
3249
|
const e = t?.provider?.runtime?.authFetcher;
|
|
@@ -3222,9 +3283,9 @@ const ks = /* @__PURE__ */ new Set([
|
|
|
3222
3283
|
return Ft(t);
|
|
3223
3284
|
},
|
|
3224
3285
|
renderToolbar(t, e) {
|
|
3225
|
-
const i =
|
|
3286
|
+
const i = vi(this.toolId, e.scope.level, e.scope.scopeId), n = e.componentOverrides, r = de(this.toolId, t, e, n);
|
|
3226
3287
|
r.setAttribute("tool-id", i), r.toolkitCoordinator = e.toolkitCoordinator;
|
|
3227
|
-
const
|
|
3288
|
+
const o = {
|
|
3228
3289
|
toolId: this.toolId,
|
|
3229
3290
|
label: this.name,
|
|
3230
3291
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -3234,8 +3295,8 @@ const ks = /* @__PURE__ */ new Set([
|
|
|
3234
3295
|
onClick: () => e.toggleTool(this.toolId),
|
|
3235
3296
|
active: e.isToolVisible(i)
|
|
3236
3297
|
};
|
|
3237
|
-
let
|
|
3238
|
-
return r.visible =
|
|
3298
|
+
let s = o.active;
|
|
3299
|
+
return r.visible = o.active, {
|
|
3239
3300
|
toolId: this.toolId,
|
|
3240
3301
|
elements: [
|
|
3241
3302
|
{
|
|
@@ -3253,10 +3314,10 @@ const ks = /* @__PURE__ */ new Set([
|
|
|
3253
3314
|
}
|
|
3254
3315
|
}
|
|
3255
3316
|
],
|
|
3256
|
-
button:
|
|
3317
|
+
button: o,
|
|
3257
3318
|
sync: () => {
|
|
3258
3319
|
const a = e.isToolVisible(i);
|
|
3259
|
-
|
|
3320
|
+
o.active = a, o.ariaLabel = a ? "Close scientific calculator" : "Open scientific calculator", o.tooltip = a ? "Close calculator" : "Calculator", s !== a && (r.visible = a, s = a), r.toolkitCoordinator !== e.toolkitCoordinator && (r.toolkitCoordinator = e.toolkitCoordinator);
|
|
3260
3321
|
},
|
|
3261
3322
|
subscribeActive: (a) => e.subscribeVisibility ? e.subscribeVisibility(() => {
|
|
3262
3323
|
a(e.isToolVisible(i));
|
|
@@ -3264,11 +3325,38 @@ const ks = /* @__PURE__ */ new Set([
|
|
|
3264
3325
|
}
|
|
3265
3326
|
};
|
|
3266
3327
|
}
|
|
3267
|
-
}, Ni = (t) => t && typeof t == "object" ? t : {},
|
|
3328
|
+
}, Ni = (t) => t && typeof t == "object" ? t : {}, xo = (t) => t === "polly" || t === "google" || t === "server", U = (t, e) => t === void 0 ? e : t, Bo = (t) => {
|
|
3329
|
+
const e = t.backend || "browser";
|
|
3330
|
+
if (!xo(e))
|
|
3331
|
+
return t;
|
|
3332
|
+
const i = {
|
|
3333
|
+
...t,
|
|
3334
|
+
apiEndpoint: U(t.apiEndpoint, "/api/tts"),
|
|
3335
|
+
transportMode: U(t.transportMode, "pie"),
|
|
3336
|
+
endpointValidationMode: U(t.endpointValidationMode, "voices"),
|
|
3337
|
+
validateEndpoint: U(t.validateEndpoint, !0),
|
|
3338
|
+
includeAuthOnAssetFetch: U(t.includeAuthOnAssetFetch, !1),
|
|
3339
|
+
rate: U(t.rate, 1),
|
|
3340
|
+
language: U(t.language, "en-US")
|
|
3341
|
+
};
|
|
3342
|
+
return e === "polly" ? {
|
|
3343
|
+
...i,
|
|
3344
|
+
defaultVoice: U(i.defaultVoice, "Joanna"),
|
|
3345
|
+
engine: U(i.engine, "neural"),
|
|
3346
|
+
format: U(i.format, "mp3"),
|
|
3347
|
+
speechMarksMode: U(i.speechMarksMode, "word+sentence")
|
|
3348
|
+
} : e === "google" ? {
|
|
3349
|
+
...i,
|
|
3350
|
+
defaultVoice: U(i.defaultVoice, "en-US-Wavenet-A")
|
|
3351
|
+
} : i;
|
|
3352
|
+
}, Gt = (t) => {
|
|
3268
3353
|
const e = Ni(t), i = Ni(t?.settings);
|
|
3269
|
-
return {
|
|
3270
|
-
|
|
3271
|
-
|
|
3354
|
+
return Bo({
|
|
3355
|
+
...e,
|
|
3356
|
+
...i
|
|
3357
|
+
});
|
|
3358
|
+
}, ii = (t) => t.backend || "browser", Vn = (t, e) => t.serverProvider || t.provider || (e === "polly" || e === "google" ? e : void 0), Gn = (t, e) => t.transportMode || (e === "custom" ? "custom" : "pie"), Vo = (t) => {
|
|
3359
|
+
const e = ii(t), i = Vn(t, e), n = Gn(t, i);
|
|
3272
3360
|
return {
|
|
3273
3361
|
voice: t.defaultVoice,
|
|
3274
3362
|
rate: t.rate,
|
|
@@ -3294,9 +3382,9 @@ const ks = /* @__PURE__ */ new Set([
|
|
|
3294
3382
|
includeAuthOnAssetFetch: t.includeAuthOnAssetFetch,
|
|
3295
3383
|
validateEndpoint: t.validateEndpoint
|
|
3296
3384
|
};
|
|
3297
|
-
},
|
|
3385
|
+
}, at = /* @__PURE__ */ new Map(), Go = "__pieToolElementUnmount", Di = Object.freeze([1.5, 2]), zo = (t) => {
|
|
3298
3386
|
if (!Array.isArray(t))
|
|
3299
|
-
return [...
|
|
3387
|
+
return [...Di];
|
|
3300
3388
|
const e = /* @__PURE__ */ new Set();
|
|
3301
3389
|
for (const i of t) {
|
|
3302
3390
|
if (typeof i != "number" || !Number.isFinite(i) || i <= 0)
|
|
@@ -3304,8 +3392,8 @@ const ks = /* @__PURE__ */ new Set([
|
|
|
3304
3392
|
const n = Math.round(i * 100) / 100;
|
|
3305
3393
|
n !== 1 && e.add(n);
|
|
3306
3394
|
}
|
|
3307
|
-
return e.size ? Array.from(e) : [...
|
|
3308
|
-
},
|
|
3395
|
+
return e.size ? Array.from(e) : [...Di];
|
|
3396
|
+
}, jo = {
|
|
3309
3397
|
toolId: "textToSpeech",
|
|
3310
3398
|
name: "Text to Speech",
|
|
3311
3399
|
description: "Read content aloud",
|
|
@@ -3313,16 +3401,16 @@ const ks = /* @__PURE__ */ new Set([
|
|
|
3313
3401
|
provider: {
|
|
3314
3402
|
getProviderId: () => "tts",
|
|
3315
3403
|
createProvider: (t) => {
|
|
3316
|
-
const e =
|
|
3317
|
-
return new
|
|
3404
|
+
const e = Gt(t);
|
|
3405
|
+
return new Ro(ii(e));
|
|
3318
3406
|
},
|
|
3319
3407
|
getInitConfig: (t) => {
|
|
3320
|
-
const e =
|
|
3408
|
+
const e = Gt(t), i = ii(e), n = Vn(e, i), r = Gn(e, n);
|
|
3321
3409
|
return {
|
|
3322
3410
|
backend: i,
|
|
3323
3411
|
serverProvider: n,
|
|
3324
3412
|
transportMode: r,
|
|
3325
|
-
...
|
|
3413
|
+
...Vo(e)
|
|
3326
3414
|
};
|
|
3327
3415
|
},
|
|
3328
3416
|
getAuthFetcher: (t) => {
|
|
@@ -3356,37 +3444,35 @@ const ks = /* @__PURE__ */ new Set([
|
|
|
3356
3444
|
},
|
|
3357
3445
|
renderToolbar(t, e) {
|
|
3358
3446
|
const i = () => {
|
|
3359
|
-
const
|
|
3360
|
-
return
|
|
3361
|
-
}, n =
|
|
3362
|
-
const
|
|
3363
|
-
return
|
|
3364
|
-
},
|
|
3365
|
-
let
|
|
3366
|
-
return
|
|
3367
|
-
|
|
3368
|
-
},
|
|
3447
|
+
const s = Gt(e.toolkitCoordinator?.getToolConfig(this.toolId) || void 0);
|
|
3448
|
+
return zo(s.speedOptions);
|
|
3449
|
+
}, n = vi(this.toolId, e.scope.level, e.scope.scopeId), r = () => {
|
|
3450
|
+
const s = e.ui?.size;
|
|
3451
|
+
return s === "sm" || s === "lg" ? s : "md";
|
|
3452
|
+
}, o = () => {
|
|
3453
|
+
let s = at.get(n);
|
|
3454
|
+
return s && typeof s.isConnected == "boolean" && !s.isConnected && (at.delete(n), s = void 0), s || (s = document.createElement("pie-tool-tts-inline"), s[Go] = () => {
|
|
3455
|
+
at.get(n) === s && at.delete(n);
|
|
3456
|
+
}, at.set(n, s)), s.setAttribute("tool-id", n), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", r()), s.speedOptions = i(), s;
|
|
3369
3457
|
};
|
|
3370
3458
|
return {
|
|
3371
3459
|
toolId: this.toolId,
|
|
3372
3460
|
button: null,
|
|
3373
3461
|
elements: [
|
|
3374
3462
|
{
|
|
3375
|
-
element:
|
|
3463
|
+
element: o(),
|
|
3376
3464
|
mount: "before-buttons"
|
|
3377
3465
|
}
|
|
3378
3466
|
],
|
|
3379
3467
|
sync: () => {
|
|
3380
|
-
const
|
|
3381
|
-
|
|
3382
|
-
console.error("[ttsToolRegistration] Failed to initialize TTS service:", a);
|
|
3383
|
-
});
|
|
3468
|
+
const s = o();
|
|
3469
|
+
s.setAttribute("tool-id", n), s.setAttribute("catalog-id", e.catalogId || e.itemId), s.setAttribute("language", e.language || "en-US"), s.setAttribute("size", r()), s.speedOptions = i();
|
|
3384
3470
|
}
|
|
3385
3471
|
};
|
|
3386
3472
|
}
|
|
3387
3473
|
};
|
|
3388
|
-
function
|
|
3389
|
-
const i =
|
|
3474
|
+
function ye(t, e) {
|
|
3475
|
+
const i = vi(t, e.scope.level, e.scope.scopeId);
|
|
3390
3476
|
return {
|
|
3391
3477
|
fullToolId: i,
|
|
3392
3478
|
isActive: () => e.isToolVisible(i),
|
|
@@ -3396,11 +3482,11 @@ function be(t, e) {
|
|
|
3396
3482
|
}
|
|
3397
3483
|
};
|
|
3398
3484
|
}
|
|
3399
|
-
function
|
|
3485
|
+
function _e(t) {
|
|
3400
3486
|
const e = t.isActive();
|
|
3401
3487
|
t.button.active = e, t.overlay.visible = e, t.onActiveChange?.(e);
|
|
3402
3488
|
}
|
|
3403
|
-
const
|
|
3489
|
+
const qo = {
|
|
3404
3490
|
toolId: "ruler",
|
|
3405
3491
|
name: "Ruler",
|
|
3406
3492
|
description: "On-screen ruler for measurements",
|
|
@@ -3422,7 +3508,7 @@ const Gs = {
|
|
|
3422
3508
|
return Ft(t);
|
|
3423
3509
|
},
|
|
3424
3510
|
renderToolbar(t, e) {
|
|
3425
|
-
const i =
|
|
3511
|
+
const i = ye(this.toolId, e), n = {
|
|
3426
3512
|
toolId: this.toolId,
|
|
3427
3513
|
label: this.name,
|
|
3428
3514
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -3431,22 +3517,22 @@ const Gs = {
|
|
|
3431
3517
|
tooltip: "Ruler",
|
|
3432
3518
|
onClick: () => e.toggleTool(this.toolId),
|
|
3433
3519
|
active: i.isActive()
|
|
3434
|
-
}, r = e.componentOverrides ?? {},
|
|
3435
|
-
return
|
|
3520
|
+
}, r = e.componentOverrides ?? {}, o = de(this.toolId, t, e, r);
|
|
3521
|
+
return o.setAttribute("tool-id", i.fullToolId), {
|
|
3436
3522
|
toolId: this.toolId,
|
|
3437
3523
|
button: n,
|
|
3438
|
-
elements: [{ element:
|
|
3524
|
+
elements: [{ element: o, mount: "after-buttons" }],
|
|
3439
3525
|
sync: () => {
|
|
3440
|
-
|
|
3526
|
+
_e({
|
|
3441
3527
|
button: n,
|
|
3442
|
-
overlay:
|
|
3528
|
+
overlay: o,
|
|
3443
3529
|
isActive: i.isActive
|
|
3444
|
-
}), e.toolkitCoordinator && (
|
|
3530
|
+
}), e.toolkitCoordinator && (o.toolkitCoordinator = e.toolkitCoordinator);
|
|
3445
3531
|
},
|
|
3446
3532
|
subscribeActive: i.subscribeActive
|
|
3447
3533
|
};
|
|
3448
3534
|
}
|
|
3449
|
-
},
|
|
3535
|
+
}, Ko = {
|
|
3450
3536
|
toolId: "protractor",
|
|
3451
3537
|
name: "Protractor",
|
|
3452
3538
|
description: "On-screen protractor for angle measurements",
|
|
@@ -3468,7 +3554,7 @@ const Gs = {
|
|
|
3468
3554
|
return Ft(t);
|
|
3469
3555
|
},
|
|
3470
3556
|
renderToolbar(t, e) {
|
|
3471
|
-
const i =
|
|
3557
|
+
const i = ye(this.toolId, e), n = {
|
|
3472
3558
|
toolId: this.toolId,
|
|
3473
3559
|
label: this.name,
|
|
3474
3560
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -3477,22 +3563,22 @@ const Gs = {
|
|
|
3477
3563
|
tooltip: "Protractor",
|
|
3478
3564
|
onClick: () => e.toggleTool(this.toolId),
|
|
3479
3565
|
active: i.isActive()
|
|
3480
|
-
}, r = e.componentOverrides ?? {},
|
|
3481
|
-
return
|
|
3566
|
+
}, r = e.componentOverrides ?? {}, o = de(this.toolId, t, e, r);
|
|
3567
|
+
return o.setAttribute("tool-id", i.fullToolId), {
|
|
3482
3568
|
toolId: this.toolId,
|
|
3483
3569
|
button: n,
|
|
3484
|
-
elements: [{ element:
|
|
3570
|
+
elements: [{ element: o, mount: "after-buttons" }],
|
|
3485
3571
|
sync: () => {
|
|
3486
|
-
|
|
3572
|
+
_e({
|
|
3487
3573
|
button: n,
|
|
3488
|
-
overlay:
|
|
3574
|
+
overlay: o,
|
|
3489
3575
|
isActive: i.isActive
|
|
3490
|
-
}), e.toolkitCoordinator && (
|
|
3576
|
+
}), e.toolkitCoordinator && (o.toolkitCoordinator = e.toolkitCoordinator);
|
|
3491
3577
|
},
|
|
3492
3578
|
subscribeActive: i.subscribeActive
|
|
3493
3579
|
};
|
|
3494
3580
|
}
|
|
3495
|
-
},
|
|
3581
|
+
}, Uo = {
|
|
3496
3582
|
toolId: "answerEliminator",
|
|
3497
3583
|
name: "Answer Eliminator",
|
|
3498
3584
|
description: "Strike through answer choices",
|
|
@@ -3515,12 +3601,12 @@ const Gs = {
|
|
|
3515
3601
|
* Pass 2: Answer eliminator is relevant only for choice-based questions
|
|
3516
3602
|
*/
|
|
3517
3603
|
isVisibleInContext(t) {
|
|
3518
|
-
return
|
|
3604
|
+
return wo(t);
|
|
3519
3605
|
},
|
|
3520
3606
|
renderToolbar(t, e) {
|
|
3521
|
-
const i =
|
|
3607
|
+
const i = ye(this.toolId, e), n = e.componentOverrides ?? {}, r = de(this.toolId, t, e, n);
|
|
3522
3608
|
r.setAttribute("tool-id", i.fullToolId), r.setAttribute("strategy", "strikethrough"), r.setAttribute("button-alignment", "inline");
|
|
3523
|
-
const
|
|
3609
|
+
const o = {
|
|
3524
3610
|
toolId: this.toolId,
|
|
3525
3611
|
label: this.name,
|
|
3526
3612
|
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M19,3H16.3H7.7H5A2,2 0 0,0 3,5V7.7V16.4V19A2,2 0 0,0 5,21H7.7H16.4H19A2,2 0 0,0 21,19V16.3V7.7V5A2,2 0 0,0 19,3M15.6,17L12,13.4L8.4,17L7,15.6L10.6,12L7,8.4L8.4,7L12,10.6L15.6,7L17,8.4L13.4,12L17,15.6L15.6,17Z"/></svg>',
|
|
@@ -3532,21 +3618,21 @@ const Gs = {
|
|
|
3532
3618
|
};
|
|
3533
3619
|
return {
|
|
3534
3620
|
toolId: this.toolId,
|
|
3535
|
-
button:
|
|
3621
|
+
button: o,
|
|
3536
3622
|
elements: [{ element: r, mount: "after-buttons" }],
|
|
3537
3623
|
sync: () => {
|
|
3538
|
-
|
|
3539
|
-
button:
|
|
3624
|
+
_e({
|
|
3625
|
+
button: o,
|
|
3540
3626
|
overlay: r,
|
|
3541
3627
|
isActive: i.isActive
|
|
3542
3628
|
}), e.toolCoordinator && (r.coordinator = e.toolCoordinator), r.scopeElement = e.getScopeElement?.() || null, e.elementToolStateStore && (r.elementToolStateStore = e.elementToolStateStore);
|
|
3543
|
-
const
|
|
3544
|
-
|
|
3629
|
+
const s = e.getGlobalElementId?.();
|
|
3630
|
+
s && (r.globalElementId = s);
|
|
3545
3631
|
},
|
|
3546
3632
|
subscribeActive: i.subscribeActive
|
|
3547
3633
|
};
|
|
3548
3634
|
}
|
|
3549
|
-
},
|
|
3635
|
+
}, Wo = {
|
|
3550
3636
|
toolId: "highlighter",
|
|
3551
3637
|
name: "Highlighter",
|
|
3552
3638
|
description: "Highlight text",
|
|
@@ -3563,7 +3649,7 @@ const Gs = {
|
|
|
3563
3649
|
return xt(t);
|
|
3564
3650
|
},
|
|
3565
3651
|
renderToolbar(t, e) {
|
|
3566
|
-
const i =
|
|
3652
|
+
const i = ye(this.toolId, e), n = {
|
|
3567
3653
|
toolId: this.toolId,
|
|
3568
3654
|
label: this.name,
|
|
3569
3655
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -3572,25 +3658,25 @@ const Gs = {
|
|
|
3572
3658
|
tooltip: "Highlight",
|
|
3573
3659
|
onClick: () => e.toggleTool(this.toolId),
|
|
3574
3660
|
active: i.isActive()
|
|
3575
|
-
}, r = e.componentOverrides ?? {},
|
|
3576
|
-
return
|
|
3661
|
+
}, r = e.componentOverrides ?? {}, o = de(this.toolId, t, e, r);
|
|
3662
|
+
return o.setAttribute("tool-id", i.fullToolId), {
|
|
3577
3663
|
toolId: this.toolId,
|
|
3578
3664
|
button: n,
|
|
3579
|
-
elements: [{ element:
|
|
3665
|
+
elements: [{ element: o, mount: "after-buttons" }],
|
|
3580
3666
|
sync: () => {
|
|
3581
|
-
|
|
3667
|
+
_e({
|
|
3582
3668
|
button: n,
|
|
3583
|
-
overlay:
|
|
3669
|
+
overlay: o,
|
|
3584
3670
|
isActive: i.isActive,
|
|
3585
|
-
onActiveChange: (
|
|
3586
|
-
|
|
3671
|
+
onActiveChange: (s) => {
|
|
3672
|
+
o.enabled = s;
|
|
3587
3673
|
}
|
|
3588
|
-
}), e.ttsService && (
|
|
3674
|
+
}), e.ttsService && (o.ttsService = e.ttsService);
|
|
3589
3675
|
},
|
|
3590
3676
|
subscribeActive: i.subscribeActive
|
|
3591
3677
|
};
|
|
3592
3678
|
}
|
|
3593
|
-
},
|
|
3679
|
+
}, Yo = {
|
|
3594
3680
|
toolId: "lineReader",
|
|
3595
3681
|
name: "Line Reader",
|
|
3596
3682
|
description: "Reading guide overlay",
|
|
@@ -3618,7 +3704,7 @@ const Gs = {
|
|
|
3618
3704
|
return xt(t);
|
|
3619
3705
|
},
|
|
3620
3706
|
renderToolbar(t, e) {
|
|
3621
|
-
const i =
|
|
3707
|
+
const i = ye(this.toolId, e), n = {
|
|
3622
3708
|
toolId: this.toolId,
|
|
3623
3709
|
label: this.name,
|
|
3624
3710
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -3627,22 +3713,22 @@ const Gs = {
|
|
|
3627
3713
|
tooltip: "Line Reader",
|
|
3628
3714
|
onClick: () => e.toggleTool(this.toolId),
|
|
3629
3715
|
active: i.isActive()
|
|
3630
|
-
}, r = e.componentOverrides ?? {},
|
|
3631
|
-
return
|
|
3716
|
+
}, r = e.componentOverrides ?? {}, o = de(this.toolId, t, e, r);
|
|
3717
|
+
return o.setAttribute("tool-id", i.fullToolId), {
|
|
3632
3718
|
toolId: this.toolId,
|
|
3633
3719
|
button: n,
|
|
3634
|
-
elements: [{ element:
|
|
3720
|
+
elements: [{ element: o, mount: "after-buttons" }],
|
|
3635
3721
|
sync: () => {
|
|
3636
|
-
|
|
3722
|
+
_e({
|
|
3637
3723
|
button: n,
|
|
3638
|
-
overlay:
|
|
3724
|
+
overlay: o,
|
|
3639
3725
|
isActive: i.isActive
|
|
3640
|
-
}), e.toolkitCoordinator && (
|
|
3726
|
+
}), e.toolkitCoordinator && (o.toolkitCoordinator = e.toolkitCoordinator);
|
|
3641
3727
|
},
|
|
3642
3728
|
subscribeActive: i.subscribeActive
|
|
3643
3729
|
};
|
|
3644
3730
|
}
|
|
3645
|
-
},
|
|
3731
|
+
}, Xo = {
|
|
3646
3732
|
toolId: "theme",
|
|
3647
3733
|
name: "Theme",
|
|
3648
3734
|
description: "Accessible themes and contrast",
|
|
@@ -3674,7 +3760,7 @@ const Gs = {
|
|
|
3674
3760
|
return !0;
|
|
3675
3761
|
},
|
|
3676
3762
|
renderToolbar(t, e) {
|
|
3677
|
-
const i =
|
|
3763
|
+
const i = ye(this.toolId, e), n = {
|
|
3678
3764
|
toolId: this.toolId,
|
|
3679
3765
|
label: this.name,
|
|
3680
3766
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -3683,13 +3769,13 @@ const Gs = {
|
|
|
3683
3769
|
tooltip: "Theme",
|
|
3684
3770
|
onClick: () => e.toggleTool(this.toolId),
|
|
3685
3771
|
active: i.isActive()
|
|
3686
|
-
}, r = e.componentOverrides ?? {},
|
|
3687
|
-
return
|
|
3772
|
+
}, r = e.componentOverrides ?? {}, o = de(this.toolId, t, e, r);
|
|
3773
|
+
return o.setAttribute("tool-id", i.fullToolId), {
|
|
3688
3774
|
toolId: this.toolId,
|
|
3689
3775
|
button: n,
|
|
3690
3776
|
elements: [
|
|
3691
3777
|
{
|
|
3692
|
-
element:
|
|
3778
|
+
element: o,
|
|
3693
3779
|
mount: "after-buttons",
|
|
3694
3780
|
shell: {
|
|
3695
3781
|
title: this.name,
|
|
@@ -3704,16 +3790,16 @@ const Gs = {
|
|
|
3704
3790
|
}
|
|
3705
3791
|
],
|
|
3706
3792
|
sync: () => {
|
|
3707
|
-
|
|
3793
|
+
_e({
|
|
3708
3794
|
button: n,
|
|
3709
|
-
overlay:
|
|
3795
|
+
overlay: o,
|
|
3710
3796
|
isActive: i.isActive
|
|
3711
|
-
}), e.toolkitCoordinator && (
|
|
3797
|
+
}), e.toolkitCoordinator && (o.toolkitCoordinator = e.toolkitCoordinator);
|
|
3712
3798
|
},
|
|
3713
3799
|
subscribeActive: i.subscribeActive
|
|
3714
3800
|
};
|
|
3715
3801
|
}
|
|
3716
|
-
},
|
|
3802
|
+
}, Qo = {
|
|
3717
3803
|
toolId: "annotationToolbar",
|
|
3718
3804
|
name: "Highlighter",
|
|
3719
3805
|
description: "Highlight and annotate text",
|
|
@@ -3743,7 +3829,7 @@ const Gs = {
|
|
|
3743
3829
|
return xt(t);
|
|
3744
3830
|
},
|
|
3745
3831
|
renderToolbar(t, e) {
|
|
3746
|
-
const i =
|
|
3832
|
+
const i = ye(this.toolId, e), n = {
|
|
3747
3833
|
toolId: this.toolId,
|
|
3748
3834
|
label: this.name,
|
|
3749
3835
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -3752,22 +3838,22 @@ const Gs = {
|
|
|
3752
3838
|
tooltip: "Highlight",
|
|
3753
3839
|
onClick: () => e.toggleTool(this.toolId),
|
|
3754
3840
|
active: i.isActive()
|
|
3755
|
-
}, r = e.componentOverrides ?? {},
|
|
3756
|
-
return
|
|
3841
|
+
}, r = e.componentOverrides ?? {}, o = de(this.toolId, t, e, r);
|
|
3842
|
+
return o.setAttribute("tool-id", i.fullToolId), {
|
|
3757
3843
|
toolId: this.toolId,
|
|
3758
3844
|
button: n,
|
|
3759
|
-
elements: [{ element:
|
|
3845
|
+
elements: [{ element: o, mount: "after-buttons" }],
|
|
3760
3846
|
sync: () => {
|
|
3761
|
-
|
|
3847
|
+
_e({
|
|
3762
3848
|
button: n,
|
|
3763
|
-
overlay:
|
|
3849
|
+
overlay: o,
|
|
3764
3850
|
isActive: i.isActive
|
|
3765
|
-
}), e.toolkitCoordinator && (
|
|
3851
|
+
}), e.toolkitCoordinator && (o.toolkitCoordinator = e.toolkitCoordinator);
|
|
3766
3852
|
},
|
|
3767
3853
|
subscribeActive: i.subscribeActive
|
|
3768
3854
|
};
|
|
3769
3855
|
}
|
|
3770
|
-
},
|
|
3856
|
+
}, Jo = {
|
|
3771
3857
|
toolId: "graph",
|
|
3772
3858
|
name: "Graph",
|
|
3773
3859
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -3793,7 +3879,7 @@ const Gs = {
|
|
|
3793
3879
|
return Ft(t);
|
|
3794
3880
|
},
|
|
3795
3881
|
renderToolbar(t, e) {
|
|
3796
|
-
const i =
|
|
3882
|
+
const i = ye(this.toolId, e), n = {
|
|
3797
3883
|
toolId: this.toolId,
|
|
3798
3884
|
label: this.name,
|
|
3799
3885
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -3802,13 +3888,13 @@ const Gs = {
|
|
|
3802
3888
|
tooltip: "Graph",
|
|
3803
3889
|
onClick: () => e.toggleTool(this.toolId),
|
|
3804
3890
|
active: i.isActive()
|
|
3805
|
-
}, r = e.componentOverrides ?? {},
|
|
3806
|
-
return
|
|
3891
|
+
}, r = e.componentOverrides ?? {}, o = de(this.toolId, t, e, r);
|
|
3892
|
+
return o.setAttribute("tool-id", i.fullToolId), {
|
|
3807
3893
|
toolId: this.toolId,
|
|
3808
3894
|
button: n,
|
|
3809
3895
|
elements: [
|
|
3810
3896
|
{
|
|
3811
|
-
element:
|
|
3897
|
+
element: o,
|
|
3812
3898
|
mount: "after-buttons",
|
|
3813
3899
|
shell: {
|
|
3814
3900
|
title: this.name,
|
|
@@ -3823,16 +3909,16 @@ const Gs = {
|
|
|
3823
3909
|
}
|
|
3824
3910
|
],
|
|
3825
3911
|
sync: () => {
|
|
3826
|
-
|
|
3912
|
+
_e({
|
|
3827
3913
|
button: n,
|
|
3828
|
-
overlay:
|
|
3914
|
+
overlay: o,
|
|
3829
3915
|
isActive: i.isActive
|
|
3830
3916
|
});
|
|
3831
3917
|
},
|
|
3832
3918
|
subscribeActive: i.subscribeActive
|
|
3833
3919
|
};
|
|
3834
3920
|
}
|
|
3835
|
-
},
|
|
3921
|
+
}, Zo = {
|
|
3836
3922
|
toolId: "periodicTable",
|
|
3837
3923
|
name: "Periodic Table",
|
|
3838
3924
|
description: "Chemistry periodic table reference",
|
|
@@ -3853,10 +3939,10 @@ const Gs = {
|
|
|
3853
3939
|
* Pass 2: Periodic table is relevant when science content is present
|
|
3854
3940
|
*/
|
|
3855
3941
|
isVisibleInContext(t) {
|
|
3856
|
-
return
|
|
3942
|
+
return Io(t);
|
|
3857
3943
|
},
|
|
3858
3944
|
renderToolbar(t, e) {
|
|
3859
|
-
const i =
|
|
3945
|
+
const i = ye(this.toolId, e), n = {
|
|
3860
3946
|
toolId: this.toolId,
|
|
3861
3947
|
label: this.name,
|
|
3862
3948
|
icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
|
|
@@ -3865,13 +3951,13 @@ const Gs = {
|
|
|
3865
3951
|
tooltip: "Periodic Table",
|
|
3866
3952
|
onClick: () => e.toggleTool(this.toolId),
|
|
3867
3953
|
active: i.isActive()
|
|
3868
|
-
}, r = e.componentOverrides ?? {},
|
|
3869
|
-
return
|
|
3954
|
+
}, r = e.componentOverrides ?? {}, o = de(this.toolId, t, e, r);
|
|
3955
|
+
return o.setAttribute("tool-id", i.fullToolId), {
|
|
3870
3956
|
toolId: this.toolId,
|
|
3871
3957
|
button: n,
|
|
3872
3958
|
elements: [
|
|
3873
3959
|
{
|
|
3874
|
-
element:
|
|
3960
|
+
element: o,
|
|
3875
3961
|
mount: "after-buttons",
|
|
3876
3962
|
shell: {
|
|
3877
3963
|
title: this.name,
|
|
@@ -3886,62 +3972,62 @@ const Gs = {
|
|
|
3886
3972
|
}
|
|
3887
3973
|
],
|
|
3888
3974
|
sync: () => {
|
|
3889
|
-
|
|
3975
|
+
_e({
|
|
3890
3976
|
button: n,
|
|
3891
|
-
overlay:
|
|
3977
|
+
overlay: o,
|
|
3892
3978
|
isActive: i.isActive
|
|
3893
3979
|
});
|
|
3894
3980
|
},
|
|
3895
3981
|
subscribeActive: i.subscribeActive
|
|
3896
3982
|
};
|
|
3897
3983
|
}
|
|
3898
|
-
},
|
|
3899
|
-
|
|
3900
|
-
|
|
3901
|
-
|
|
3902
|
-
|
|
3903
|
-
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
3909
|
-
|
|
3984
|
+
}, es = [
|
|
3985
|
+
Fo,
|
|
3986
|
+
jo,
|
|
3987
|
+
qo,
|
|
3988
|
+
Ko,
|
|
3989
|
+
Uo,
|
|
3990
|
+
Wo,
|
|
3991
|
+
Yo,
|
|
3992
|
+
Xo,
|
|
3993
|
+
Qo,
|
|
3994
|
+
Jo,
|
|
3995
|
+
Zo
|
|
3910
3996
|
];
|
|
3911
|
-
function
|
|
3912
|
-
const e = new
|
|
3997
|
+
function ts(t = {}) {
|
|
3998
|
+
const e = new _o(), i = {
|
|
3913
3999
|
toolTagMap: {
|
|
3914
|
-
...
|
|
4000
|
+
...Bn,
|
|
3915
4001
|
...t.toolTagMap || {}
|
|
3916
4002
|
},
|
|
3917
4003
|
toolComponentFactory: t.toolComponentFactory,
|
|
3918
4004
|
toolComponentFactories: t.toolComponentFactories
|
|
3919
4005
|
}, n = (r) => t.overrides?.[r.toolId] || r;
|
|
3920
|
-
return t.includePackagedTools &&
|
|
4006
|
+
return t.includePackagedTools && is(e, {
|
|
3921
4007
|
toolIds: t.toolIds,
|
|
3922
4008
|
applyOverrides: n
|
|
3923
4009
|
}), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(i), e;
|
|
3924
4010
|
}
|
|
3925
|
-
function
|
|
4011
|
+
function is(t, e = {}) {
|
|
3926
4012
|
const i = e.toolIds && e.toolIds.length > 0 ? new Set(e.toolIds) : null, n = e.applyOverrides || ((r) => r);
|
|
3927
|
-
for (const r of
|
|
4013
|
+
for (const r of es)
|
|
3928
4014
|
i && !i.has(r.toolId) || t.register(n(r));
|
|
3929
4015
|
}
|
|
3930
|
-
function
|
|
3931
|
-
return
|
|
4016
|
+
function ns(t = {}) {
|
|
4017
|
+
return ts({
|
|
3932
4018
|
...t,
|
|
3933
4019
|
includePackagedTools: !0
|
|
3934
4020
|
});
|
|
3935
4021
|
}
|
|
3936
|
-
function
|
|
3937
|
-
const t =
|
|
4022
|
+
function rs() {
|
|
4023
|
+
const t = ns(), e = /* @__PURE__ */ new Set();
|
|
3938
4024
|
for (const i of t.getAllTools())
|
|
3939
4025
|
for (const n of i.pnpSupportIds || [])
|
|
3940
4026
|
e.add(n);
|
|
3941
4027
|
return [...e].sort();
|
|
3942
4028
|
}
|
|
3943
|
-
|
|
3944
|
-
const
|
|
4029
|
+
rs();
|
|
4030
|
+
const os = {
|
|
3945
4031
|
/**
|
|
3946
4032
|
* Visual accessibility features
|
|
3947
4033
|
* For students with low vision, color blindness, or visual processing needs
|
|
@@ -4112,16 +4198,16 @@ const no = {
|
|
|
4112
4198
|
tutorialAvailable: "tutorialAvailable"
|
|
4113
4199
|
}
|
|
4114
4200
|
};
|
|
4115
|
-
Object.values(
|
|
4116
|
-
var
|
|
4201
|
+
Object.values(os).flatMap((t) => Object.values(t));
|
|
4202
|
+
var ni;
|
|
4117
4203
|
(function(t) {
|
|
4118
4204
|
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";
|
|
4119
|
-
})(
|
|
4205
|
+
})(ni || (ni = {}));
|
|
4120
4206
|
var Fi;
|
|
4121
4207
|
(function(t) {
|
|
4122
4208
|
t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
|
|
4123
4209
|
})(Fi || (Fi = {}));
|
|
4124
|
-
const
|
|
4210
|
+
const R = class R {
|
|
4125
4211
|
constructor() {
|
|
4126
4212
|
d(this, "elementType", "multiple-choice");
|
|
4127
4213
|
d(this, "priority", 100);
|
|
@@ -4130,9 +4216,9 @@ const k = class k {
|
|
|
4130
4216
|
return e.tagName.toLowerCase() === "multiple-choice" || e.classList.contains("multiple-choice");
|
|
4131
4217
|
}
|
|
4132
4218
|
findChoices(e) {
|
|
4133
|
-
e.setAttribute(
|
|
4219
|
+
e.setAttribute(R.ROOT_HOOK_ATTR, "true");
|
|
4134
4220
|
const i = Array.from(
|
|
4135
|
-
e.querySelectorAll(
|
|
4221
|
+
e.querySelectorAll(R.CHOICE_SELECTOR)
|
|
4136
4222
|
);
|
|
4137
4223
|
for (const n of i)
|
|
4138
4224
|
this.annotateChoice(n);
|
|
@@ -4158,27 +4244,27 @@ const k = class k {
|
|
|
4158
4244
|
const i = e.querySelector(
|
|
4159
4245
|
'input[type="checkbox"], input[type="radio"]'
|
|
4160
4246
|
);
|
|
4161
|
-
return !(!i || i.getAttribute("aria-checked") === "true" || i.disabled || (e.closest(`[${
|
|
4162
|
-
`[${
|
|
4247
|
+
return !(!i || i.getAttribute("aria-checked") === "true" || i.disabled || (e.closest(`[${R.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelector(
|
|
4248
|
+
`[${R.FEEDBACK_HOOK_ATTR}="true"]`
|
|
4163
4249
|
));
|
|
4164
4250
|
}
|
|
4165
4251
|
getButtonContainer(e) {
|
|
4166
4252
|
return e;
|
|
4167
4253
|
}
|
|
4168
4254
|
generateFallbackId(e) {
|
|
4169
|
-
const n = (e.closest(`[${
|
|
4170
|
-
`[${
|
|
4255
|
+
const n = (e.closest(`[${R.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelectorAll(
|
|
4256
|
+
`[${R.CHOICE_HOOK_ATTR}="true"]`
|
|
4171
4257
|
) || [];
|
|
4172
4258
|
return `choice-${Array.from(n).indexOf(e)}`;
|
|
4173
4259
|
}
|
|
4174
4260
|
annotateChoice(e) {
|
|
4175
|
-
e.setAttribute(
|
|
4261
|
+
e.setAttribute(R.CHOICE_HOOK_ATTR, "true");
|
|
4176
4262
|
const i = this.resolveLabelElement(e);
|
|
4177
|
-
i && i.setAttribute(
|
|
4263
|
+
i && i.setAttribute(R.LABEL_HOOK_ATTR, "true");
|
|
4178
4264
|
}
|
|
4179
4265
|
resolveLabelElement(e) {
|
|
4180
4266
|
return e.querySelector(
|
|
4181
|
-
`[${
|
|
4267
|
+
`[${R.LABEL_HOOK_ATTR}="true"]`
|
|
4182
4268
|
) || e.querySelector("label") || e.querySelector("span");
|
|
4183
4269
|
}
|
|
4184
4270
|
annotateFeedbackTicks(e) {
|
|
@@ -4186,18 +4272,18 @@ const k = class k {
|
|
|
4186
4272
|
".feedback-tick"
|
|
4187
4273
|
))
|
|
4188
4274
|
i.setAttribute(
|
|
4189
|
-
|
|
4275
|
+
R.FEEDBACK_HOOK_ATTR,
|
|
4190
4276
|
"true"
|
|
4191
4277
|
);
|
|
4192
4278
|
}
|
|
4193
4279
|
};
|
|
4194
|
-
d(
|
|
4195
|
-
let
|
|
4196
|
-
class
|
|
4280
|
+
d(R, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice"), d(R, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label"), d(R, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root"), d(R, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick"), d(R, "CHOICE_SELECTOR", `[${R.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
|
|
4281
|
+
let Ht = R;
|
|
4282
|
+
class ss {
|
|
4197
4283
|
constructor() {
|
|
4198
4284
|
d(this, "elementType", "ebsr");
|
|
4199
4285
|
d(this, "priority", 95);
|
|
4200
|
-
d(this, "mcAdapter", new
|
|
4286
|
+
d(this, "mcAdapter", new Ht());
|
|
4201
4287
|
}
|
|
4202
4288
|
canHandle(e) {
|
|
4203
4289
|
return e.tagName.toLowerCase() === "ebsr" || e.querySelector("ebsr-multiple-choice") !== null;
|
|
@@ -4224,7 +4310,7 @@ class ro {
|
|
|
4224
4310
|
return this.mcAdapter.getButtonContainer(e);
|
|
4225
4311
|
}
|
|
4226
4312
|
}
|
|
4227
|
-
class
|
|
4313
|
+
class ls {
|
|
4228
4314
|
constructor() {
|
|
4229
4315
|
d(this, "elementType", "inline-dropdown");
|
|
4230
4316
|
d(this, "priority", 90);
|
|
@@ -4252,13 +4338,13 @@ class so {
|
|
|
4252
4338
|
return e;
|
|
4253
4339
|
}
|
|
4254
4340
|
}
|
|
4255
|
-
class
|
|
4341
|
+
class as {
|
|
4256
4342
|
constructor() {
|
|
4257
4343
|
d(this, "adapters");
|
|
4258
4344
|
this.adapters = [
|
|
4259
|
-
new
|
|
4260
|
-
new
|
|
4261
|
-
new
|
|
4345
|
+
new Ht(),
|
|
4346
|
+
new ss(),
|
|
4347
|
+
new ls()
|
|
4262
4348
|
].sort((e, i) => i.priority - e.priority);
|
|
4263
4349
|
}
|
|
4264
4350
|
/**
|
|
@@ -4273,9 +4359,9 @@ class oo {
|
|
|
4273
4359
|
findAllChoicesWithAdapters(e) {
|
|
4274
4360
|
const i = [], n = /* @__PURE__ */ new Set();
|
|
4275
4361
|
for (const r of this.adapters) {
|
|
4276
|
-
const
|
|
4277
|
-
for (const
|
|
4278
|
-
n.has(
|
|
4362
|
+
const o = r.findChoices(e);
|
|
4363
|
+
for (const s of o)
|
|
4364
|
+
n.has(s) || (n.add(s), i.push({ choice: s, adapter: r }));
|
|
4279
4365
|
}
|
|
4280
4366
|
return i;
|
|
4281
4367
|
}
|
|
@@ -4286,7 +4372,7 @@ class oo {
|
|
|
4286
4372
|
this.adapters.push(e), this.adapters.sort((i, n) => n.priority - i.priority);
|
|
4287
4373
|
}
|
|
4288
4374
|
}
|
|
4289
|
-
const
|
|
4375
|
+
const k = class k {
|
|
4290
4376
|
constructor() {
|
|
4291
4377
|
d(this, "name", "mask");
|
|
4292
4378
|
d(this, "highlights", /* @__PURE__ */ new Map());
|
|
@@ -4306,7 +4392,7 @@ const O = class O {
|
|
|
4306
4392
|
this.injectHighlightCSS(e);
|
|
4307
4393
|
const n = new Highlight(i);
|
|
4308
4394
|
CSS.highlights.set(
|
|
4309
|
-
`${
|
|
4395
|
+
`${k.HIGHLIGHT_NAME_PREFIX}${e}`,
|
|
4310
4396
|
n
|
|
4311
4397
|
), this.highlights.set(e, n), this.ranges.set(e, i), this.addAriaAttributes(i);
|
|
4312
4398
|
}
|
|
@@ -4315,7 +4401,7 @@ const O = class O {
|
|
|
4315
4401
|
this.removeFallback(e);
|
|
4316
4402
|
return;
|
|
4317
4403
|
}
|
|
4318
|
-
CSS.highlights.delete(`${
|
|
4404
|
+
CSS.highlights.delete(`${k.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
|
|
4319
4405
|
const i = this.ranges.get(e);
|
|
4320
4406
|
i && this.removeAriaAttributes(i), this.highlights.delete(e), this.ranges.delete(e), this.fallbackContainers.delete(e);
|
|
4321
4407
|
}
|
|
@@ -4334,7 +4420,7 @@ const O = class O {
|
|
|
4334
4420
|
return typeof CSS < "u" && "highlights" in CSS;
|
|
4335
4421
|
}
|
|
4336
4422
|
injectHighlightCSS(e) {
|
|
4337
|
-
const i = `${
|
|
4423
|
+
const i = `${k.HIGHLIGHT_STYLE_PREFIX}${e}`;
|
|
4338
4424
|
if (document.getElementById(i)) return;
|
|
4339
4425
|
const n = document.createElement("style");
|
|
4340
4426
|
n.id = i, n.textContent = `
|
|
@@ -4345,20 +4431,20 @@ const O = class O {
|
|
|
4345
4431
|
`, document.head.appendChild(n);
|
|
4346
4432
|
}
|
|
4347
4433
|
removeHighlightCSS(e) {
|
|
4348
|
-
document.getElementById(`${
|
|
4434
|
+
document.getElementById(`${k.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
|
|
4349
4435
|
}
|
|
4350
4436
|
addAriaAttributes(e) {
|
|
4351
4437
|
const i = this.findChoiceContainer(e);
|
|
4352
|
-
i && (i.setAttribute(
|
|
4438
|
+
i && (i.setAttribute(k.ELIMINATED_ATTR, "true"), i.setAttribute("aria-hidden", "true"));
|
|
4353
4439
|
}
|
|
4354
4440
|
removeAriaAttributes(e) {
|
|
4355
4441
|
const i = this.findChoiceContainer(e);
|
|
4356
|
-
i && (i.removeAttribute(
|
|
4442
|
+
i && (i.removeAttribute(k.ELIMINATED_ATTR), i.removeAttribute("aria-hidden"));
|
|
4357
4443
|
}
|
|
4358
4444
|
findChoiceContainer(e) {
|
|
4359
4445
|
let i = e.startContainer;
|
|
4360
4446
|
for (i.nodeType === Node.TEXT_NODE && (i = i.parentElement); i && i !== document.body; ) {
|
|
4361
|
-
if (i.getAttribute(
|
|
4447
|
+
if (i.getAttribute(k.CHOICE_HOOK_ATTR) === "true")
|
|
4362
4448
|
return i;
|
|
4363
4449
|
i = i.parentElement;
|
|
4364
4450
|
}
|
|
@@ -4366,18 +4452,18 @@ const O = class O {
|
|
|
4366
4452
|
}
|
|
4367
4453
|
applyFallback(e, i) {
|
|
4368
4454
|
const n = this.findChoiceContainer(i);
|
|
4369
|
-
n && (n.classList.add(
|
|
4455
|
+
n && (n.classList.add(k.FALLBACK_CLASS), n.setAttribute(k.ELIMINATED_ATTR, "true"), n.setAttribute(k.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(i));
|
|
4370
4456
|
}
|
|
4371
4457
|
removeFallback(e) {
|
|
4372
4458
|
const i = this.fallbackContainers.get(e);
|
|
4373
4459
|
if (!i) return;
|
|
4374
|
-
i.classList.remove(
|
|
4460
|
+
i.classList.remove(k.FALLBACK_CLASS), i.removeAttribute(k.ELIMINATED_ATTR), i.removeAttribute(k.ELIMINATED_ID_ATTR);
|
|
4375
4461
|
const n = document.createRange();
|
|
4376
4462
|
n.selectNodeContents(i), this.removeAriaAttributes(n), this.fallbackContainers.delete(e);
|
|
4377
4463
|
}
|
|
4378
4464
|
};
|
|
4379
|
-
d(
|
|
4380
|
-
let
|
|
4465
|
+
d(k, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-"), d(k, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-"), d(k, "FALLBACK_CLASS", "pie-answer-masked-fallback"), d(k, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice"), d(k, "ELIMINATED_ATTR", "data-pie-answer-eliminated"), d(k, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
4466
|
+
let ri = k;
|
|
4381
4467
|
const I = class I {
|
|
4382
4468
|
constructor() {
|
|
4383
4469
|
d(this, "name", "strikethrough");
|
|
@@ -4491,8 +4577,8 @@ const I = class I {
|
|
|
4491
4577
|
}
|
|
4492
4578
|
};
|
|
4493
4579
|
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
|
|
4495
|
-
const
|
|
4580
|
+
let oi = I;
|
|
4581
|
+
const Ae = class Ae {
|
|
4496
4582
|
constructor(e = "strikethrough", i = "right") {
|
|
4497
4583
|
d(this, "registry");
|
|
4498
4584
|
d(this, "strategy");
|
|
@@ -4509,10 +4595,10 @@ const Te = class Te {
|
|
|
4509
4595
|
// Whether to restore eliminations from state storage
|
|
4510
4596
|
// Store integration (replaces session/localStorage)
|
|
4511
4597
|
d(this, "storeIntegration", null);
|
|
4512
|
-
this.registry = new
|
|
4598
|
+
this.registry = new as(), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.buttonAlignment = i;
|
|
4513
4599
|
}
|
|
4514
4600
|
createStrategy(e) {
|
|
4515
|
-
return e === "mask" ? new
|
|
4601
|
+
return e === "mask" ? new ri() : new oi();
|
|
4516
4602
|
}
|
|
4517
4603
|
/**
|
|
4518
4604
|
* Initialize eliminator for a question
|
|
@@ -4533,17 +4619,17 @@ const Te = class Te {
|
|
|
4533
4619
|
const r = this.createToggleButton(e, i);
|
|
4534
4620
|
if (!r) return;
|
|
4535
4621
|
this.choiceButtons.set(n, r);
|
|
4536
|
-
const
|
|
4537
|
-
|
|
4622
|
+
const o = i.getButtonContainer(e);
|
|
4623
|
+
o && (o.style.position = "relative", o.appendChild(r));
|
|
4538
4624
|
}
|
|
4539
4625
|
/**
|
|
4540
4626
|
* Create elimination toggle button
|
|
4541
4627
|
*/
|
|
4542
4628
|
createToggleButton(e, i) {
|
|
4543
|
-
const n = i.getChoiceId(e), r = i.getChoiceLabel(e),
|
|
4544
|
-
return
|
|
4545
|
-
|
|
4546
|
-
}),
|
|
4629
|
+
const n = i.getChoiceId(e), r = i.getChoiceLabel(e), o = document.createElement("button");
|
|
4630
|
+
return o.type = "button", o.className = Ae.TOGGLE_CLASS, o.setAttribute("aria-label", `Toggle elimination for ${r}`), o.setAttribute("data-choice-id", n), o.textContent = "⊗", this.applyButtonAlignment(o), o.addEventListener("click", (s) => {
|
|
4631
|
+
s.preventDefault(), s.stopPropagation(), this.toggleElimination(e, i);
|
|
4632
|
+
}), o;
|
|
4547
4633
|
}
|
|
4548
4634
|
/**
|
|
4549
4635
|
* Toggle elimination for a choice
|
|
@@ -4573,8 +4659,8 @@ const Te = class Te {
|
|
|
4573
4659
|
return;
|
|
4574
4660
|
}
|
|
4575
4661
|
this.strategy.apply(n, r), this.eliminatedChoices.add(n);
|
|
4576
|
-
const
|
|
4577
|
-
|
|
4662
|
+
const o = this.choiceButtons.get(n);
|
|
4663
|
+
o && (o.classList.add(Ae.TOGGLE_ACTIVE_CLASS), o.setAttribute("aria-pressed", "true")), this.saveState();
|
|
4578
4664
|
}
|
|
4579
4665
|
/**
|
|
4580
4666
|
* Restore a choice
|
|
@@ -4582,7 +4668,7 @@ const Te = class Te {
|
|
|
4582
4668
|
restoreChoice(e) {
|
|
4583
4669
|
this.strategy.remove(e), this.eliminatedChoices.delete(e);
|
|
4584
4670
|
const i = this.choiceButtons.get(e);
|
|
4585
|
-
i && (i.classList.remove(
|
|
4671
|
+
i && (i.classList.remove(Ae.TOGGLE_ACTIVE_CLASS), i.setAttribute("aria-pressed", "false")), this.saveState();
|
|
4586
4672
|
}
|
|
4587
4673
|
/**
|
|
4588
4674
|
* Reset all eliminations for current element
|
|
@@ -4638,13 +4724,13 @@ const Te = class Te {
|
|
|
4638
4724
|
for (const n of i) {
|
|
4639
4725
|
const r = this.choiceElements.get(n);
|
|
4640
4726
|
if (!r) continue;
|
|
4641
|
-
const
|
|
4642
|
-
if (!
|
|
4643
|
-
const
|
|
4644
|
-
if (
|
|
4645
|
-
this.strategy.apply(n,
|
|
4727
|
+
const o = this.choiceAdapters.get(n);
|
|
4728
|
+
if (!o) continue;
|
|
4729
|
+
const s = o.createChoiceRange(r);
|
|
4730
|
+
if (s) {
|
|
4731
|
+
this.strategy.apply(n, s), this.eliminatedChoices.add(n);
|
|
4646
4732
|
const a = this.choiceButtons.get(n);
|
|
4647
|
-
a && (a.classList.add(
|
|
4733
|
+
a && (a.classList.add(Ae.TOGGLE_ACTIVE_CLASS), a.setAttribute("aria-pressed", "true"));
|
|
4648
4734
|
}
|
|
4649
4735
|
}
|
|
4650
4736
|
} catch (i) {
|
|
@@ -4718,146 +4804,146 @@ const Te = class Te {
|
|
|
4718
4804
|
this.cleanupButtons(), this.strategy.destroy();
|
|
4719
4805
|
}
|
|
4720
4806
|
};
|
|
4721
|
-
d(
|
|
4722
|
-
let si =
|
|
4723
|
-
var
|
|
4724
|
-
function
|
|
4725
|
-
|
|
4726
|
-
let i =
|
|
4807
|
+
d(Ae, "TOGGLE_CLASS", "pie-answer-eliminator-toggle"), d(Ae, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
|
|
4808
|
+
let si = Ae;
|
|
4809
|
+
var cs = /* @__PURE__ */ Jr('<div style="display: none;" aria-hidden="true"></div>');
|
|
4810
|
+
function us(t, e) {
|
|
4811
|
+
Ui(e, !0);
|
|
4812
|
+
let i = Te(e, "visible", 7, !1), n = Te(e, "toolId", 7, "answerEliminator"), r = Te(e, "strategy", 7, "strikethrough"), o = Te(
|
|
4727
4813
|
e,
|
|
4728
4814
|
"alwaysOn",
|
|
4729
4815
|
7,
|
|
4730
4816
|
!1
|
|
4731
4817
|
// Set true for profile-based accommodation
|
|
4732
|
-
),
|
|
4818
|
+
), s = Te(
|
|
4733
4819
|
e,
|
|
4734
4820
|
"buttonAlignment",
|
|
4735
4821
|
7,
|
|
4736
4822
|
"right"
|
|
4737
4823
|
// Button placement: left, right, or inline with checkbox
|
|
4738
|
-
), a =
|
|
4824
|
+
), a = Te(
|
|
4739
4825
|
e,
|
|
4740
4826
|
"scopeElement",
|
|
4741
4827
|
7,
|
|
4742
4828
|
null
|
|
4743
4829
|
// Container element to limit DOM queries (for multi-item pages)
|
|
4744
|
-
), l =
|
|
4830
|
+
), l = Te(
|
|
4745
4831
|
e,
|
|
4746
4832
|
"elementToolStateStore",
|
|
4747
4833
|
7,
|
|
4748
4834
|
null
|
|
4749
4835
|
// ElementToolStateStore instance
|
|
4750
|
-
), u =
|
|
4836
|
+
), u = Te(
|
|
4751
4837
|
e,
|
|
4752
4838
|
"globalElementId",
|
|
4753
4839
|
7,
|
|
4754
4840
|
""
|
|
4755
4841
|
// Composite key: "assessmentId:sectionId:itemId:elementId"
|
|
4756
|
-
), f = /* @__PURE__ */
|
|
4757
|
-
const y = /* @__PURE__ */
|
|
4758
|
-
let p = /* @__PURE__ */
|
|
4759
|
-
|
|
4842
|
+
), f = /* @__PURE__ */ F(null), h = /* @__PURE__ */ F(null), g = /* @__PURE__ */ F(null);
|
|
4843
|
+
const y = /* @__PURE__ */ Si(() => m(h)?.toolCoordinator);
|
|
4844
|
+
let p = /* @__PURE__ */ F(null), S = /* @__PURE__ */ F(null), _ = /* @__PURE__ */ F(null), O = /* @__PURE__ */ F(null), oe = /* @__PURE__ */ Si(() => o() || i());
|
|
4845
|
+
He(() => {
|
|
4760
4846
|
if (m(f))
|
|
4761
|
-
return
|
|
4847
|
+
return go(m(f), (A) => {
|
|
4762
4848
|
C(h, A, !0);
|
|
4763
4849
|
});
|
|
4764
|
-
}),
|
|
4850
|
+
}), He(() => {
|
|
4765
4851
|
if (m(f))
|
|
4766
|
-
return
|
|
4852
|
+
return vo(m(f), (A) => {
|
|
4767
4853
|
C(g, A, !0);
|
|
4768
4854
|
});
|
|
4769
4855
|
});
|
|
4770
|
-
function
|
|
4856
|
+
function lt() {
|
|
4771
4857
|
return a() || m(g)?.scopeElement || null;
|
|
4772
4858
|
}
|
|
4773
|
-
function
|
|
4774
|
-
if (!m(
|
|
4775
|
-
const A =
|
|
4859
|
+
function Bt() {
|
|
4860
|
+
if (!m(oe) || !m(p)) return;
|
|
4861
|
+
const A = lt();
|
|
4776
4862
|
if (!A) {
|
|
4777
4863
|
console.warn("[AnswerEliminator] Missing shell scope context for question root");
|
|
4778
4864
|
return;
|
|
4779
4865
|
}
|
|
4780
4866
|
m(p).initializeForQuestion(A);
|
|
4781
4867
|
}
|
|
4782
|
-
function
|
|
4868
|
+
function zn() {
|
|
4783
4869
|
requestAnimationFrame(() => {
|
|
4784
4870
|
requestAnimationFrame(() => {
|
|
4785
|
-
|
|
4871
|
+
Bt();
|
|
4786
4872
|
});
|
|
4787
4873
|
});
|
|
4788
4874
|
}
|
|
4789
|
-
|
|
4790
|
-
!m(y) || !n() || (m(
|
|
4791
|
-
}),
|
|
4875
|
+
He(() => {
|
|
4876
|
+
!m(y) || !n() || (m(O) && m(_) && (m(O) !== m(y) || m(_) !== n()) && (m(O).unregisterTool(m(_)), C(O, null), C(_, null)), m(_) || (m(y).registerTool(n(), "Answer Eliminator", void 0, ni.MODAL), C(O, m(y), !0), C(_, n())));
|
|
4877
|
+
}), He(() => {
|
|
4792
4878
|
m(p) && l() && u() && m(p).setStoreIntegration(l(), u());
|
|
4793
|
-
}),
|
|
4794
|
-
m(p)?.destroy(), C(p, null), m(
|
|
4795
|
-
})),
|
|
4879
|
+
}), no(() => (C(p, new si(r(), s()), !0), m(p) && l() && u() && m(p).setStoreIntegration(l(), u()), m(oe) ? Bt() : m(p).cleanup(), () => {
|
|
4880
|
+
m(p)?.destroy(), C(p, null), m(O) && m(_) && (m(O).unregisterTool(m(_)), C(O, null), C(_, null));
|
|
4881
|
+
})), He(() => {
|
|
4796
4882
|
const A = m(g)?.contextVersion ?? null;
|
|
4797
4883
|
if (A !== null) {
|
|
4798
4884
|
if (m(S) === null) {
|
|
4799
4885
|
C(S, A, !0);
|
|
4800
4886
|
return;
|
|
4801
4887
|
}
|
|
4802
|
-
A !== m(S) && (C(S, A, !0),
|
|
4888
|
+
A !== m(S) && (C(S, A, !0), zn());
|
|
4803
4889
|
}
|
|
4804
|
-
}),
|
|
4805
|
-
m(p) && (m(
|
|
4890
|
+
}), He(() => {
|
|
4891
|
+
m(p) && (m(oe) ? (m(p).enableStateRestoration(), Bt()) : m(p).cleanup());
|
|
4806
4892
|
});
|
|
4807
|
-
var
|
|
4893
|
+
var jn = {
|
|
4808
4894
|
get visible() {
|
|
4809
4895
|
return i();
|
|
4810
4896
|
},
|
|
4811
4897
|
set visible(A = !1) {
|
|
4812
|
-
i(A),
|
|
4898
|
+
i(A), fe();
|
|
4813
4899
|
},
|
|
4814
4900
|
get toolId() {
|
|
4815
4901
|
return n();
|
|
4816
4902
|
},
|
|
4817
4903
|
set toolId(A = "answerEliminator") {
|
|
4818
|
-
n(A),
|
|
4904
|
+
n(A), fe();
|
|
4819
4905
|
},
|
|
4820
4906
|
get strategy() {
|
|
4821
4907
|
return r();
|
|
4822
4908
|
},
|
|
4823
4909
|
set strategy(A = "strikethrough") {
|
|
4824
|
-
r(A),
|
|
4910
|
+
r(A), fe();
|
|
4825
4911
|
},
|
|
4826
4912
|
get alwaysOn() {
|
|
4827
|
-
return
|
|
4913
|
+
return o();
|
|
4828
4914
|
},
|
|
4829
4915
|
set alwaysOn(A = !1) {
|
|
4830
|
-
|
|
4916
|
+
o(A), fe();
|
|
4831
4917
|
},
|
|
4832
4918
|
get buttonAlignment() {
|
|
4833
|
-
return
|
|
4919
|
+
return s();
|
|
4834
4920
|
},
|
|
4835
4921
|
set buttonAlignment(A = "right") {
|
|
4836
|
-
|
|
4922
|
+
s(A), fe();
|
|
4837
4923
|
},
|
|
4838
4924
|
get scopeElement() {
|
|
4839
4925
|
return a();
|
|
4840
4926
|
},
|
|
4841
4927
|
set scopeElement(A = null) {
|
|
4842
|
-
a(A),
|
|
4928
|
+
a(A), fe();
|
|
4843
4929
|
},
|
|
4844
4930
|
get elementToolStateStore() {
|
|
4845
4931
|
return l();
|
|
4846
4932
|
},
|
|
4847
4933
|
set elementToolStateStore(A = null) {
|
|
4848
|
-
l(A),
|
|
4934
|
+
l(A), fe();
|
|
4849
4935
|
},
|
|
4850
4936
|
get globalElementId() {
|
|
4851
4937
|
return u();
|
|
4852
4938
|
},
|
|
4853
4939
|
set globalElementId(A = "") {
|
|
4854
|
-
u(A),
|
|
4940
|
+
u(A), fe();
|
|
4855
4941
|
}
|
|
4856
|
-
},
|
|
4857
|
-
return
|
|
4942
|
+
}, yi = cs();
|
|
4943
|
+
return ro(yi, (A) => C(f, A), () => m(f)), Rn(t, yi), Wi(jn);
|
|
4858
4944
|
}
|
|
4859
|
-
customElements.define("pie-tool-answer-eliminator",
|
|
4860
|
-
|
|
4945
|
+
customElements.define("pie-tool-answer-eliminator", ao(
|
|
4946
|
+
us,
|
|
4861
4947
|
{
|
|
4862
4948
|
visible: { attribute: "visible", type: "Boolean" },
|
|
4863
4949
|
toolId: { attribute: "tool-id", type: "String" },
|
|
@@ -4873,5 +4959,5 @@ customElements.define("pie-tool-answer-eliminator", ls(
|
|
|
4873
4959
|
{ mode: "open" }
|
|
4874
4960
|
));
|
|
4875
4961
|
export {
|
|
4876
|
-
|
|
4962
|
+
us as default
|
|
4877
4963
|
};
|