@pie-players/pie-tool-answer-eliminator 0.3.59 → 0.3.61
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/adapters/choice-adapter.d.ts +13 -0
- package/dist/adapters/ebsr-adapter.d.ts +2 -0
- package/dist/adapters/ebsr-adapter.js +6 -0
- package/dist/adapters/multiple-choice-adapter.d.ts +4 -0
- package/dist/adapters/multiple-choice-adapter.js +34 -1
- package/dist/answer-eliminator-core.d.ts +62 -3
- package/dist/tool-answer-eliminator.js +775 -600
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as
|
|
1
|
+
import { t as d } from "./defineProperty-Dt7ri80W.js";
|
|
2
2
|
var ts = Object.create, si = Object.defineProperty, ns = Object.getOwnPropertyDescriptor, rs = Object.getOwnPropertyNames, is = Object.getPrototypeOf, os = Object.prototype.hasOwnProperty, oh = (e, t) => () => (t || (e((t = { exports: {} }).exports, t), e = null), t.exports), ss = (e, t, n, r) => {
|
|
3
3
|
if (t && typeof t == "object" || typeof t == "function")
|
|
4
4
|
for (var i = rs(t), o = 0, s = i.length, a; o < s; o++)
|
|
@@ -15,11 +15,11 @@ var ts = Object.create, si = Object.defineProperty, ns = Object.getOwnPropertyDe
|
|
|
15
15
|
throw Error('Calling `require` for "' + e + "\" in an environment that doesn't expose the `require` function. See https://rolldown.rs/in-depth/bundling-cjs#require-external-modules for more details.");
|
|
16
16
|
});
|
|
17
17
|
if (typeof window < "u") {
|
|
18
|
-
var vr,
|
|
19
|
-
((vr = (
|
|
18
|
+
var vr, br;
|
|
19
|
+
((vr = (br = window).__svelte ?? (br.__svelte = {})).v ?? (vr.v = /* @__PURE__ */ new Set())).add("5");
|
|
20
20
|
}
|
|
21
21
|
var Vt = {}, H = /* @__PURE__ */ Symbol("uninitialized");
|
|
22
|
-
var ls = Array.isArray, cs = Array.prototype.indexOf,
|
|
22
|
+
var ls = Array.isArray, cs = Array.prototype.indexOf, Ut = Array.prototype.includes, us = Array.from, Gt = Object.keys, Kt = Object.defineProperty, Be = Object.getOwnPropertyDescriptor, hs = Object.prototype, ds = Array.prototype, fs = Object.getPrototypeOf, yr = Object.isExtensible, ps = () => {
|
|
23
23
|
};
|
|
24
24
|
function gs(e) {
|
|
25
25
|
for (var t = 0; t < e.length; t++) e[t]();
|
|
@@ -34,9 +34,9 @@ function ms() {
|
|
|
34
34
|
reject: t
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
-
var ah = 1 << 24, ae = 1024, le = 2048, Ye = 4096, ai = 8192, vs = 16384, li = 32768, Tr = 1 << 25, ci = 65536, lh = 1 << 17, ch = 1 << 18, Ct = 1 << 19,
|
|
37
|
+
var ah = 1 << 24, ae = 1024, le = 2048, Ye = 4096, ai = 8192, vs = 16384, li = 32768, Tr = 1 << 25, ci = 65536, lh = 1 << 17, ch = 1 << 18, Ct = 1 << 19, bs = 1 << 20, xt = 65536, Sr = 1 << 21, uh = 1 << 22, ui = 1 << 23, St = /* @__PURE__ */ Symbol("$state"), hi = /* @__PURE__ */ Symbol("legacy props"), ys = /* @__PURE__ */ Symbol("proxy path"), Ts = /* @__PURE__ */ Symbol("attributes"), Ss = /* @__PURE__ */ Symbol("class"), _s = /* @__PURE__ */ Symbol("style"), ws = /* @__PURE__ */ Symbol("text"), Jn = new class extends Error {
|
|
38
38
|
constructor(...t) {
|
|
39
|
-
super(...t),
|
|
39
|
+
super(...t), d(this, "name", "StaleReactionError"), d(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
40
40
|
}
|
|
41
41
|
}(), dh = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
42
42
|
function ks(e) {
|
|
@@ -100,7 +100,7 @@ function Hs(e = 1) {
|
|
|
100
100
|
D = n;
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function Bs(e = !0) {
|
|
104
104
|
for (var t = 0, n = D; ; ) {
|
|
105
105
|
if (n.nodeType === 8) {
|
|
106
106
|
var r = n.data;
|
|
@@ -116,18 +116,18 @@ function Ws(e = !0) {
|
|
|
116
116
|
function pi(e) {
|
|
117
117
|
return e === this.v;
|
|
118
118
|
}
|
|
119
|
-
function
|
|
119
|
+
function Ws(e, t) {
|
|
120
120
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
121
121
|
}
|
|
122
122
|
function gi(e) {
|
|
123
|
-
return !
|
|
123
|
+
return !Ws(e, this.v);
|
|
124
124
|
}
|
|
125
|
-
var
|
|
125
|
+
var xe = !1, Ot = !1;
|
|
126
126
|
function _r(e, t) {
|
|
127
|
-
return e.label = t,
|
|
127
|
+
return e.label = t, Fs(e.v, t), e;
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
return e?.[
|
|
129
|
+
function Fs(e, t) {
|
|
130
|
+
return e?.[ys]?.(t), e;
|
|
131
131
|
}
|
|
132
132
|
var L = null;
|
|
133
133
|
function Xt(e) {
|
|
@@ -161,7 +161,7 @@ function cn() {
|
|
|
161
161
|
return !Ot || L !== null && L.l === null;
|
|
162
162
|
}
|
|
163
163
|
var $e = [];
|
|
164
|
-
function
|
|
164
|
+
function bi() {
|
|
165
165
|
var e = $e;
|
|
166
166
|
$e = [], gs(e);
|
|
167
167
|
}
|
|
@@ -169,15 +169,15 @@ function at(e) {
|
|
|
169
169
|
if ($e.length === 0 && !_t) {
|
|
170
170
|
var t = $e;
|
|
171
171
|
queueMicrotask(() => {
|
|
172
|
-
t === $e &&
|
|
172
|
+
t === $e && bi();
|
|
173
173
|
});
|
|
174
174
|
}
|
|
175
175
|
$e.push(e);
|
|
176
176
|
}
|
|
177
|
-
function
|
|
178
|
-
for (; $e.length > 0; )
|
|
177
|
+
function zs() {
|
|
178
|
+
for (; $e.length > 0; ) bi();
|
|
179
179
|
}
|
|
180
|
-
function
|
|
180
|
+
function yi(e) {
|
|
181
181
|
var t = E;
|
|
182
182
|
if (t === null)
|
|
183
183
|
return k.f |= ui, e;
|
|
@@ -240,100 +240,100 @@ function _(e, t, n) {
|
|
|
240
240
|
function T(e, t, n) {
|
|
241
241
|
return e.set(_(e, t), n), n;
|
|
242
242
|
}
|
|
243
|
-
function
|
|
243
|
+
function f(e, t) {
|
|
244
244
|
return e.get(_(e, t));
|
|
245
245
|
}
|
|
246
|
-
var wi, Yt = null, et = null, x = null, An = null,
|
|
247
|
-
var Vs = 1, Qt = /* @__PURE__ */ new WeakMap(),
|
|
246
|
+
var wi, Yt = null, et = null, x = null, An = null, F = null, Cn = null, _t = !1, bn = !1, lt = null, Jt = null, ki = 0;
|
|
247
|
+
var Vs = 1, Qt = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), $t = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), xn = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), $ = /* @__PURE__ */ new WeakSet(), ht = class Ei {
|
|
248
248
|
constructor() {
|
|
249
|
-
Zn(this, $),
|
|
249
|
+
Zn(this, $), d(this, "id", Vs++), w(this, Qt, !1), d(this, "linked", !0), w(this, We, null), w(this, Pe, null), d(this, "async_deriveds", /* @__PURE__ */ new Map()), d(this, "current", /* @__PURE__ */ new Map()), d(this, "previous", /* @__PURE__ */ new Map()), w(this, Zt, /* @__PURE__ */ new Set()), w(this, $t, /* @__PURE__ */ new Set()), w(this, tt, 0), w(this, Re, /* @__PURE__ */ new Map()), w(this, mt, null), w(this, Q, []), w(this, xn, []), w(this, Ue, /* @__PURE__ */ new Set()), w(this, ve, /* @__PURE__ */ new Set()), w(this, Ce, /* @__PURE__ */ new Map()), w(this, Bt, /* @__PURE__ */ new Set()), d(this, "is_fork", !1), w(this, vt, !1), et === null ? Yt = et = this : (T(Pe, et, this), T(We, this, et)), et = this;
|
|
250
250
|
}
|
|
251
251
|
skip_effect(t) {
|
|
252
|
-
|
|
252
|
+
f(Ce, this).has(t) || f(Ce, this).set(t, {
|
|
253
253
|
d: [],
|
|
254
254
|
m: []
|
|
255
|
-
}),
|
|
255
|
+
}), f(Bt, this).delete(t);
|
|
256
256
|
}
|
|
257
257
|
unskip_effect(t, n = (r) => this.schedule(r)) {
|
|
258
|
-
var r =
|
|
258
|
+
var r = f(Ce, this).get(t);
|
|
259
259
|
if (r) {
|
|
260
|
-
|
|
260
|
+
f(Ce, this).delete(t);
|
|
261
261
|
for (var i of r.d)
|
|
262
262
|
P(i, le), n(i);
|
|
263
263
|
for (i of r.m)
|
|
264
264
|
P(i, Ye), n(i);
|
|
265
265
|
}
|
|
266
|
-
|
|
266
|
+
f(Bt, this).add(t);
|
|
267
267
|
}
|
|
268
268
|
capture(t, n, r = !1) {
|
|
269
|
-
t.v !== H && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [n, r]),
|
|
269
|
+
t.v !== H && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [n, r]), F?.set(t, n)), this.is_fork || (t.v = n);
|
|
270
270
|
}
|
|
271
271
|
activate() {
|
|
272
272
|
x = this;
|
|
273
273
|
}
|
|
274
274
|
deactivate() {
|
|
275
|
-
x = null,
|
|
275
|
+
x = null, F = null;
|
|
276
276
|
}
|
|
277
277
|
flush() {
|
|
278
278
|
try {
|
|
279
|
-
|
|
279
|
+
bn = !0, x = this, _($, this, en).call(this);
|
|
280
280
|
} finally {
|
|
281
|
-
ki = 0, Cn = null, lt = null, Jt = null,
|
|
281
|
+
ki = 0, Cn = null, lt = null, Jt = null, bn = !1, x = null, F = null, De.clear();
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
discard() {
|
|
285
|
-
for (const t of
|
|
286
|
-
|
|
285
|
+
for (const t of f($t, this)) t(this);
|
|
286
|
+
f($t, this).clear(), _($, this, tn).call(this), f(mt, this)?.resolve();
|
|
287
287
|
}
|
|
288
288
|
register_created_effect(t) {
|
|
289
|
-
|
|
289
|
+
f(xn, this).push(t);
|
|
290
290
|
}
|
|
291
291
|
increment(t, n) {
|
|
292
|
-
if (T(tt, this,
|
|
293
|
-
let r =
|
|
294
|
-
|
|
292
|
+
if (T(tt, this, f(tt, this) + 1), t) {
|
|
293
|
+
let r = f(Re, this).get(n) ?? 0;
|
|
294
|
+
f(Re, this).set(n, r + 1);
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
297
|
decrement(t, n) {
|
|
298
|
-
if (T(tt, this,
|
|
299
|
-
let r =
|
|
300
|
-
r === 1 ?
|
|
298
|
+
if (T(tt, this, f(tt, this) - 1), t) {
|
|
299
|
+
let r = f(Re, this).get(n) ?? 0;
|
|
300
|
+
r === 1 ? f(Re, this).delete(n) : f(Re, this).set(n, r - 1);
|
|
301
301
|
}
|
|
302
|
-
|
|
302
|
+
f(vt, this) || (T(vt, this, !0), at(() => {
|
|
303
303
|
T(vt, this, !1), this.linked && this.flush();
|
|
304
304
|
}));
|
|
305
305
|
}
|
|
306
306
|
transfer_effects(t, n) {
|
|
307
|
-
for (const r of t)
|
|
308
|
-
for (const r of n)
|
|
307
|
+
for (const r of t) f(Ue, this).add(r);
|
|
308
|
+
for (const r of n) f(ve, this).add(r);
|
|
309
309
|
t.clear(), n.clear();
|
|
310
310
|
}
|
|
311
311
|
oncommit(t) {
|
|
312
|
-
|
|
312
|
+
f(Zt, this).add(t);
|
|
313
313
|
}
|
|
314
314
|
ondiscard(t) {
|
|
315
|
-
|
|
315
|
+
f($t, this).add(t);
|
|
316
316
|
}
|
|
317
317
|
settled() {
|
|
318
|
-
return (
|
|
318
|
+
return (f(mt, this) ?? T(mt, this, ms())).promise;
|
|
319
319
|
}
|
|
320
320
|
static ensure() {
|
|
321
321
|
if (x === null) {
|
|
322
322
|
const t = x = new Ei();
|
|
323
|
-
!
|
|
324
|
-
|
|
323
|
+
!bn && !_t && at(() => {
|
|
324
|
+
f(Qt, t) || t.flush();
|
|
325
325
|
});
|
|
326
326
|
}
|
|
327
327
|
return x;
|
|
328
328
|
}
|
|
329
329
|
apply() {
|
|
330
|
-
if (!
|
|
331
|
-
|
|
330
|
+
if (!xe || !this.is_fork && f(We, this) === null && f(Pe, this) === null) {
|
|
331
|
+
F = null;
|
|
332
332
|
return;
|
|
333
333
|
}
|
|
334
|
-
|
|
335
|
-
for (const [n, [r]] of this.current)
|
|
336
|
-
for (let n = Yt; n !== null; n =
|
|
334
|
+
F = /* @__PURE__ */ new Map();
|
|
335
|
+
for (const [n, [r]] of this.current) F.set(n, r);
|
|
336
|
+
for (let n = Yt; n !== null; n = f(Pe, n))
|
|
337
337
|
if (!(n === this || n.is_fork)) {
|
|
338
338
|
var t = !1;
|
|
339
339
|
if (n.id < this.id) {
|
|
@@ -344,7 +344,7 @@ var Vs = 1, Qt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap
|
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
if (!t)
|
|
347
|
-
for (const [r, i] of n.previous)
|
|
347
|
+
for (const [r, i] of n.previous) F.has(r) || F.set(r, i);
|
|
348
348
|
}
|
|
349
349
|
}
|
|
350
350
|
schedule(t) {
|
|
@@ -355,22 +355,22 @@ var Vs = 1, Qt = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap
|
|
|
355
355
|
for (var n = t; n.parent !== null; ) {
|
|
356
356
|
n = n.parent;
|
|
357
357
|
var r = n.f;
|
|
358
|
-
if (lt !== null && n === E && (
|
|
358
|
+
if (lt !== null && n === E && (xe || (k === null || (k.f & 2) === 0) && !js))
|
|
359
359
|
return;
|
|
360
360
|
if ((r & 96) !== 0) {
|
|
361
361
|
if ((r & 1024) === 0) return;
|
|
362
362
|
n.f ^= ae;
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
|
|
365
|
+
f(Q, this).push(n);
|
|
366
366
|
}
|
|
367
367
|
};
|
|
368
368
|
wi = ht;
|
|
369
369
|
function wr() {
|
|
370
370
|
if (this.is_fork) return !0;
|
|
371
|
-
for (const n of
|
|
371
|
+
for (const n of f(Re, this).keys()) {
|
|
372
372
|
for (var e = n, t = !1; e.parent !== null; ) {
|
|
373
|
-
if (
|
|
373
|
+
if (f(Ce, this).has(e)) {
|
|
374
374
|
t = !0;
|
|
375
375
|
break;
|
|
376
376
|
}
|
|
@@ -382,12 +382,12 @@ function wr() {
|
|
|
382
382
|
}
|
|
383
383
|
function en() {
|
|
384
384
|
T(Qt, this, !0), ki++ > 1e3 && (_($, this, tn).call(this), Xs());
|
|
385
|
-
for (const a of
|
|
386
|
-
|
|
387
|
-
for (const a of
|
|
385
|
+
for (const a of f(Ue, this))
|
|
386
|
+
f(ve, this).delete(a), P(a, le), this.schedule(a);
|
|
387
|
+
for (const a of f(ve, this))
|
|
388
388
|
P(a, Ye), this.schedule(a);
|
|
389
|
-
const e =
|
|
390
|
-
T(
|
|
389
|
+
const e = f(Q, this);
|
|
390
|
+
T(Q, this, []), this.apply();
|
|
391
391
|
var t = lt = [], n = [], r = Jt = [];
|
|
392
392
|
for (const a of e) try {
|
|
393
393
|
_($, this, Ai).call(this, a, t, n);
|
|
@@ -399,23 +399,23 @@ function en() {
|
|
|
399
399
|
for (const a of r) i.schedule(a);
|
|
400
400
|
}
|
|
401
401
|
if (lt = null, Jt = null, _($, this, wr).call(this)) {
|
|
402
|
-
_($, this,
|
|
403
|
-
for (const [a, l] of
|
|
402
|
+
_($, this, bt).call(this, n), _($, this, bt).call(this, t);
|
|
403
|
+
for (const [a, l] of f(Ce, this)) xi(a, l);
|
|
404
404
|
r.length > 0 && _($, x, en).call(x);
|
|
405
405
|
return;
|
|
406
406
|
}
|
|
407
|
-
const o = _($, this,
|
|
407
|
+
const o = _($, this, Us).call(this);
|
|
408
408
|
if (o) {
|
|
409
|
-
_($, this,
|
|
409
|
+
_($, this, bt).call(this, n), _($, this, bt).call(this, t), _($, o, Gs).call(o, this);
|
|
410
410
|
return;
|
|
411
411
|
}
|
|
412
|
-
|
|
413
|
-
for (const a of
|
|
414
|
-
|
|
412
|
+
f(Ue, this).clear(), f(ve, this).clear();
|
|
413
|
+
for (const a of f(Zt, this)) a(this);
|
|
414
|
+
f(Zt, this).clear(), An = this, kr(n), kr(t), An = null, f(mt, this)?.resolve();
|
|
415
415
|
var s = x;
|
|
416
|
-
if (
|
|
416
|
+
if (f(tt, this) === 0 && (f(Q, this).length === 0 || s !== null) && (_($, this, tn).call(this), xe && (_($, this, Ks).call(this), x = s)), f(Q, this).length > 0) if (s !== null) {
|
|
417
417
|
const a = s;
|
|
418
|
-
|
|
418
|
+
f(Q, a).push(...f(Q, this).filter((l) => !f(Q, a).includes(l)));
|
|
419
419
|
} else s = this;
|
|
420
420
|
s !== null && _($, s, en).call(s);
|
|
421
421
|
}
|
|
@@ -423,8 +423,8 @@ function Ai(e, t, n) {
|
|
|
423
423
|
e.f ^= ae;
|
|
424
424
|
for (var r = e.first; r !== null; ) {
|
|
425
425
|
var i = r.f, o = (i & 96) !== 0;
|
|
426
|
-
if (!(o && (i & 1024) !== 0 || (i & 8192) !== 0 ||
|
|
427
|
-
o ? r.f ^= ae : (i & 4) !== 0 ? t.push(r) :
|
|
426
|
+
if (!(o && (i & 1024) !== 0 || (i & 8192) !== 0 || f(Ce, this).has(r)) && r.fn !== null) {
|
|
427
|
+
o ? r.f ^= ae : (i & 4) !== 0 ? t.push(r) : xe && (i & 16777224) !== 0 ? n.push(r) : It(r) && ((i & 16) !== 0 && f(ve, this).add(r), ct(r));
|
|
428
428
|
var s = r.first;
|
|
429
429
|
if (s !== null) {
|
|
430
430
|
r = s;
|
|
@@ -441,23 +441,23 @@ function Ai(e, t, n) {
|
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
443
|
}
|
|
444
|
-
function
|
|
445
|
-
for (var e =
|
|
444
|
+
function Us() {
|
|
445
|
+
for (var e = f(We, this); e !== null; ) {
|
|
446
446
|
if (!e.is_fork) {
|
|
447
447
|
for (const [t, [, n]] of this.current) if (e.current.has(t) && !n) return e;
|
|
448
448
|
}
|
|
449
|
-
e =
|
|
449
|
+
e = f(We, e);
|
|
450
450
|
}
|
|
451
451
|
return null;
|
|
452
452
|
}
|
|
453
|
-
function
|
|
453
|
+
function Gs(e) {
|
|
454
454
|
for (const [n, r] of e.current)
|
|
455
455
|
!this.previous.has(n) && e.previous.has(n) && this.previous.set(n, e.previous.get(n)), this.current.set(n, r);
|
|
456
456
|
for (const [n, r] of e.async_deriveds) {
|
|
457
457
|
const i = this.async_deriveds.get(n);
|
|
458
458
|
i && r.promise.then(i.resolve).catch(i.reject);
|
|
459
459
|
}
|
|
460
|
-
this.transfer_effects(
|
|
460
|
+
this.transfer_effects(f(Ue, e), f(ve, e));
|
|
461
461
|
const t = (n) => {
|
|
462
462
|
var r = n.reactions;
|
|
463
463
|
if (r !== null)
|
|
@@ -466,18 +466,18 @@ function Us(e) {
|
|
|
466
466
|
if ((i & 2) !== 0) t(s);
|
|
467
467
|
else {
|
|
468
468
|
var o = s;
|
|
469
|
-
i & 4194320 && !this.async_deriveds.has(o) && (
|
|
469
|
+
i & 4194320 && !this.async_deriveds.has(o) && (f(ve, this).delete(o), P(o, le), this.schedule(o));
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
};
|
|
473
473
|
for (const n of this.current.keys()) t(n);
|
|
474
474
|
this.oncommit(() => e.discard()), _($, e, tn).call(e), x = this, _($, this, en).call(this);
|
|
475
475
|
}
|
|
476
|
-
function
|
|
477
|
-
for (var t = 0; t < e.length; t += 1) Si(e[t],
|
|
476
|
+
function bt(e) {
|
|
477
|
+
for (var t = 0; t < e.length; t += 1) Si(e[t], f(Ue, this), f(ve, this));
|
|
478
478
|
}
|
|
479
479
|
function Ks() {
|
|
480
|
-
for (let c = Yt; c !== null; c =
|
|
480
|
+
for (let c = Yt; c !== null; c = f(Pe, c)) {
|
|
481
481
|
var e = c.id < this.id, t = [];
|
|
482
482
|
for (const [u, [h, p]] of this.current) {
|
|
483
483
|
if (c.current.has(u)) {
|
|
@@ -491,13 +491,13 @@ function Ks() {
|
|
|
491
491
|
const p = c.async_deriveds.get(u);
|
|
492
492
|
p && h.promise.then(p.resolve).catch(p.reject);
|
|
493
493
|
}
|
|
494
|
-
if (
|
|
494
|
+
if (f(Qt, c)) {
|
|
495
495
|
var r = [...c.current.keys()].filter((u) => !c.current.get(u)[1] && !this.current.has(u));
|
|
496
496
|
if (r.length === 0)
|
|
497
497
|
e && c.discard();
|
|
498
498
|
else if (t.length > 0) {
|
|
499
|
-
if (e) for (const u of
|
|
500
|
-
(h.f & 4194320) !== 0 ? c.schedule(h) : _($, c,
|
|
499
|
+
if (e) for (const u of f(Bt, this)) c.unskip_effect(u, (h) => {
|
|
500
|
+
(h.f & 4194320) !== 0 ? c.schedule(h) : _($, c, bt).call(c, [h]);
|
|
501
501
|
});
|
|
502
502
|
c.activate();
|
|
503
503
|
var i = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
@@ -508,11 +508,11 @@ function Ks() {
|
|
|
508
508
|
return p ? p[0] !== h[0] || p[1] !== h[1] : !0;
|
|
509
509
|
}).map(([u]) => u);
|
|
510
510
|
if (a.length > 0)
|
|
511
|
-
for (const u of
|
|
512
|
-
if (
|
|
511
|
+
for (const u of f(xn, this)) (u.f & 155648) === 0 && er(u, a, o) && ((u.f & 4194320) !== 0 ? (P(u, le), c.schedule(u)) : f(Ue, c).add(u));
|
|
512
|
+
if (f(Q, c).length > 0 && !f(vt, c)) {
|
|
513
513
|
c.apply();
|
|
514
|
-
for (var l of
|
|
515
|
-
T(
|
|
514
|
+
for (var l of f(Q, c)) _($, c, Ai).call(c, l, [], []);
|
|
515
|
+
T(Q, c, []);
|
|
516
516
|
}
|
|
517
517
|
c.deactivate();
|
|
518
518
|
}
|
|
@@ -521,17 +521,17 @@ function Ks() {
|
|
|
521
521
|
}
|
|
522
522
|
function tn() {
|
|
523
523
|
if (this.linked) {
|
|
524
|
-
var e =
|
|
525
|
-
e === null ? Yt = t : T(Pe, e, t), t === null ? et = e : T(
|
|
524
|
+
var e = f(We, this), t = f(Pe, this);
|
|
525
|
+
e === null ? Yt = t : T(Pe, e, t), t === null ? et = e : T(We, t, e), this.linked = !1;
|
|
526
526
|
}
|
|
527
527
|
}
|
|
528
|
-
function
|
|
528
|
+
function ge(e) {
|
|
529
529
|
var t = _t;
|
|
530
530
|
_t = !0;
|
|
531
531
|
try {
|
|
532
532
|
var n;
|
|
533
533
|
for (e && (x !== null && !x.is_fork && x.flush(), n = e()); ; ) {
|
|
534
|
-
if (
|
|
534
|
+
if (zs(), x === null) return n;
|
|
535
535
|
x.flush();
|
|
536
536
|
}
|
|
537
537
|
} finally {
|
|
@@ -550,29 +550,29 @@ function Xs() {
|
|
|
550
550
|
it(n, Cn);
|
|
551
551
|
}
|
|
552
552
|
}
|
|
553
|
-
var
|
|
553
|
+
var me = null;
|
|
554
554
|
function kr(e) {
|
|
555
555
|
var t = e.length;
|
|
556
556
|
if (t !== 0) {
|
|
557
557
|
for (var n = 0; n < t; ) {
|
|
558
558
|
var r = e[n++];
|
|
559
|
-
if ((r.f & 24576) === 0 && It(r) && (
|
|
559
|
+
if ((r.f & 24576) === 0 && It(r) && (me = /* @__PURE__ */ new Set(), ct(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Vi(r), me?.size > 0)) {
|
|
560
560
|
De.clear();
|
|
561
|
-
for (const i of
|
|
561
|
+
for (const i of me) {
|
|
562
562
|
if ((i.f & 24576) !== 0) continue;
|
|
563
563
|
const o = [i];
|
|
564
564
|
let s = i.parent;
|
|
565
565
|
for (; s !== null; )
|
|
566
|
-
|
|
566
|
+
me.has(s) && (me.delete(s), o.push(s)), s = s.parent;
|
|
567
567
|
for (let a = o.length - 1; a >= 0; a--) {
|
|
568
568
|
const l = o[a];
|
|
569
569
|
(l.f & 24576) === 0 && ct(l);
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
|
|
572
|
+
me.clear();
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
|
|
575
|
+
me = null;
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
578
|
function Ci(e, t, n, r) {
|
|
@@ -586,7 +586,7 @@ function er(e, t, n) {
|
|
|
586
586
|
const r = n.get(e);
|
|
587
587
|
if (r !== void 0) return r;
|
|
588
588
|
if (e.deps !== null) for (const i of e.deps) {
|
|
589
|
-
if (
|
|
589
|
+
if (Ut.call(t, i)) return !0;
|
|
590
590
|
if ((i.f & 2) !== 0 && er(i, t, n))
|
|
591
591
|
return n.set(i, !0), !0;
|
|
592
592
|
}
|
|
@@ -610,7 +610,7 @@ function Oi(e) {
|
|
|
610
610
|
function Ys(e) {
|
|
611
611
|
let t = 0, n = un(0), r;
|
|
612
612
|
return () => {
|
|
613
|
-
ir() && (
|
|
613
|
+
ir() && (y(n), or(() => (t === 0 && (r = dn(() => e(() => wt(n)))), t += 1, () => {
|
|
614
614
|
at(() => {
|
|
615
615
|
t -= 1, t === 0 && (r?.(), r = void 0, wt(n));
|
|
616
616
|
});
|
|
@@ -621,141 +621,141 @@ var Js = ci | Ct;
|
|
|
621
621
|
function Qs(e, t, n, r) {
|
|
622
622
|
new Zs(e, t, n, r);
|
|
623
623
|
}
|
|
624
|
-
var ie = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(),
|
|
624
|
+
var ie = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), Z = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), nt = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), Pt = /* @__PURE__ */ new WeakMap(), In = /* @__PURE__ */ new WeakMap(), Mn = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Er = /* @__PURE__ */ new WeakMap(), B = /* @__PURE__ */ new WeakSet(), Zs = class {
|
|
625
625
|
constructor(e, t, n, r) {
|
|
626
|
-
Zn(this,
|
|
626
|
+
Zn(this, B), d(this, "parent", void 0), d(this, "is_pending", !1), d(this, "transform_error", void 0), w(this, ie, void 0), w(this, On, re ? D : null), w(this, ue, void 0), w(this, Et, void 0), w(this, Z, void 0), w(this, he, null), w(this, X, null), w(this, te, null), w(this, Fe, null), w(this, nt, 0), w(this, ze, 0), w(this, Pt, !1), w(this, In, /* @__PURE__ */ new Set()), w(this, Mn, /* @__PURE__ */ new Set()), w(this, Ie, null), w(this, Er, Ys(() => (T(Ie, this, un(f(nt, this))), () => {
|
|
627
627
|
T(Ie, this, null);
|
|
628
628
|
}))), T(ie, this, e), T(ue, this, t), T(Et, this, (i) => {
|
|
629
629
|
var o = E;
|
|
630
630
|
o.b = this, o.f |= 128, n(i);
|
|
631
|
-
}), this.parent = E.b, this.transform_error = r ?? this.parent?.transform_error ?? ((i) => i), T(
|
|
631
|
+
}), this.parent = E.b, this.transform_error = r ?? this.parent?.transform_error ?? ((i) => i), T(Z, this, va(() => {
|
|
632
632
|
if (re) {
|
|
633
|
-
const i =
|
|
633
|
+
const i = f(On, this);
|
|
634
634
|
fi();
|
|
635
635
|
const o = i.data === "[!";
|
|
636
636
|
if (i.data.startsWith("[?")) {
|
|
637
637
|
const s = JSON.parse(i.data.slice(2));
|
|
638
|
-
_(
|
|
639
|
-
} else o ? _(
|
|
640
|
-
} else _(
|
|
638
|
+
_(B, this, ta).call(this, s);
|
|
639
|
+
} else o ? _(B, this, na).call(this) : _(B, this, ea).call(this);
|
|
640
|
+
} else _(B, this, Ii).call(this);
|
|
641
641
|
}, Js)), re && T(ie, this, D);
|
|
642
642
|
}
|
|
643
643
|
defer_effect(e) {
|
|
644
|
-
Si(e,
|
|
644
|
+
Si(e, f(In, this), f(Mn, this));
|
|
645
645
|
}
|
|
646
646
|
is_rendered() {
|
|
647
647
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
648
648
|
}
|
|
649
649
|
has_pending_snippet() {
|
|
650
|
-
return !!
|
|
650
|
+
return !!f(ue, this).pending;
|
|
651
651
|
}
|
|
652
652
|
update_pending_count(e, t) {
|
|
653
|
-
_(
|
|
654
|
-
T(Pt, this, !1),
|
|
653
|
+
_(B, this, Mi).call(this, e, t), T(nt, this, f(nt, this) + e), !(!f(Ie, this) || f(Pt, this)) && (T(Pt, this, !0), at(() => {
|
|
654
|
+
T(Pt, this, !1), f(Ie, this) && Pi(f(Ie, this), f(nt, this));
|
|
655
655
|
}));
|
|
656
656
|
}
|
|
657
657
|
get_effect_pending() {
|
|
658
|
-
return
|
|
658
|
+
return f(Er, this).call(this), y(f(Ie, this));
|
|
659
659
|
}
|
|
660
660
|
error(e) {
|
|
661
|
-
if (!
|
|
662
|
-
x?.is_fork ? (
|
|
663
|
-
_(
|
|
664
|
-
})) : _(
|
|
661
|
+
if (!f(ue, this).onerror && !f(ue, this).failed) throw e;
|
|
662
|
+
x?.is_fork ? (f(he, this) && x.skip_effect(f(he, this)), f(X, this) && x.skip_effect(f(X, this)), f(te, this) && x.skip_effect(f(te, this)), x.oncommit(() => {
|
|
663
|
+
_(B, this, Ar).call(this, e);
|
|
664
|
+
})) : _(B, this, Ar).call(this, e);
|
|
665
665
|
}
|
|
666
666
|
};
|
|
667
667
|
function ea() {
|
|
668
668
|
try {
|
|
669
|
-
T(he, this,
|
|
669
|
+
T(he, this, Ge(() => f(Et, this).call(this, f(ie, this))));
|
|
670
670
|
} catch (e) {
|
|
671
671
|
this.error(e);
|
|
672
672
|
}
|
|
673
673
|
}
|
|
674
674
|
function ta(e) {
|
|
675
|
-
const t =
|
|
676
|
-
t && T(te, this,
|
|
677
|
-
t(
|
|
675
|
+
const t = f(ue, this).failed;
|
|
676
|
+
t && T(te, this, Ge(() => {
|
|
677
|
+
t(f(ie, this), () => e, () => () => {
|
|
678
678
|
});
|
|
679
679
|
}));
|
|
680
680
|
}
|
|
681
681
|
function na() {
|
|
682
|
-
const e =
|
|
683
|
-
e && (this.is_pending = !0, T(
|
|
684
|
-
var t = T(
|
|
685
|
-
t.append(n), T(he, this, _(
|
|
686
|
-
T(
|
|
687
|
-
}), _(
|
|
682
|
+
const e = f(ue, this).pending;
|
|
683
|
+
e && (this.is_pending = !0, T(X, this, Ge(() => e(f(ie, this)))), at(() => {
|
|
684
|
+
var t = T(Fe, this, document.createDocumentFragment()), n = Fi();
|
|
685
|
+
t.append(n), T(he, this, _(B, this, Rn).call(this, () => Ge(() => f(Et, this).call(this, n)))), f(ze, this) === 0 && (f(ie, this).before(t), T(Fe, this, null), hn(f(X, this), () => {
|
|
686
|
+
T(X, this, null);
|
|
687
|
+
}), _(B, this, nr).call(this, x));
|
|
688
688
|
}));
|
|
689
689
|
}
|
|
690
690
|
function Ii() {
|
|
691
691
|
try {
|
|
692
|
-
if (this.is_pending = this.has_pending_snippet(), T(
|
|
693
|
-
|
|
694
|
-
})),
|
|
695
|
-
var e = T(
|
|
696
|
-
Ta(
|
|
697
|
-
const t =
|
|
698
|
-
T(
|
|
699
|
-
} else _(
|
|
692
|
+
if (this.is_pending = this.has_pending_snippet(), T(ze, this, 0), T(nt, this, 0), T(he, this, Ge(() => {
|
|
693
|
+
f(Et, this).call(this, f(ie, this));
|
|
694
|
+
})), f(ze, this) > 0) {
|
|
695
|
+
var e = T(Fe, this, document.createDocumentFragment());
|
|
696
|
+
Ta(f(he, this), e);
|
|
697
|
+
const t = f(ue, this).pending;
|
|
698
|
+
T(X, this, Ge(() => t(f(ie, this))));
|
|
699
|
+
} else _(B, this, nr).call(this, x);
|
|
700
700
|
} catch (t) {
|
|
701
701
|
this.error(t);
|
|
702
702
|
}
|
|
703
703
|
}
|
|
704
704
|
function nr(e) {
|
|
705
|
-
this.is_pending = !1, e.transfer_effects(
|
|
705
|
+
this.is_pending = !1, e.transfer_effects(f(In, this), f(Mn, this));
|
|
706
706
|
}
|
|
707
707
|
function Rn(e) {
|
|
708
708
|
var t = E, n = k, r = L;
|
|
709
|
-
|
|
709
|
+
Oe(f(Z, this)), de(f(Z, this)), Xt(f(Z, this).ctx);
|
|
710
710
|
try {
|
|
711
711
|
return ht.ensure(), e();
|
|
712
712
|
} catch (i) {
|
|
713
|
-
return
|
|
713
|
+
return yi(i), null;
|
|
714
714
|
} finally {
|
|
715
|
-
|
|
715
|
+
Oe(t), de(n), Xt(r);
|
|
716
716
|
}
|
|
717
717
|
}
|
|
718
718
|
function Mi(e, t) {
|
|
719
719
|
if (!this.has_pending_snippet()) {
|
|
720
720
|
if (this.parent) {
|
|
721
721
|
var n;
|
|
722
|
-
_(
|
|
722
|
+
_(B, n = this.parent, Mi).call(n, e, t);
|
|
723
723
|
}
|
|
724
724
|
return;
|
|
725
725
|
}
|
|
726
|
-
T(
|
|
727
|
-
T(
|
|
728
|
-
}),
|
|
726
|
+
T(ze, this, f(ze, this) + e), f(ze, this) === 0 && (_(B, this, nr).call(this, t), f(X, this) && hn(f(X, this), () => {
|
|
727
|
+
T(X, this, null);
|
|
728
|
+
}), f(Fe, this) && (f(ie, this).before(f(Fe, this)), T(Fe, this, null)));
|
|
729
729
|
}
|
|
730
730
|
function Ar(e) {
|
|
731
|
-
|
|
732
|
-
var t =
|
|
733
|
-
let n =
|
|
731
|
+
f(he, this) && (oe(f(he, this)), T(he, this, null)), f(X, this) && (oe(f(X, this)), T(X, this, null)), f(te, this) && (oe(f(te, this)), T(te, this, null)), re && (kt(f(On, this)), Hs(), kt(Bs()));
|
|
732
|
+
var t = f(ue, this).onerror;
|
|
733
|
+
let n = f(ue, this).failed;
|
|
734
734
|
var r = !1, i = !1;
|
|
735
735
|
const o = () => {
|
|
736
736
|
if (r) {
|
|
737
737
|
Ns();
|
|
738
738
|
return;
|
|
739
739
|
}
|
|
740
|
-
r = !0, i && $s(),
|
|
740
|
+
r = !0, i && $s(), f(te, this) !== null && hn(f(te, this), () => {
|
|
741
741
|
T(te, this, null);
|
|
742
|
-
}), _(
|
|
743
|
-
_(
|
|
742
|
+
}), _(B, this, Rn).call(this, () => {
|
|
743
|
+
_(B, this, Ii).call(this);
|
|
744
744
|
});
|
|
745
745
|
}, s = (a) => {
|
|
746
746
|
try {
|
|
747
747
|
i = !0, t?.(a, o), i = !1;
|
|
748
748
|
} catch (l) {
|
|
749
|
-
it(l,
|
|
749
|
+
it(l, f(Z, this) && f(Z, this).parent);
|
|
750
750
|
}
|
|
751
|
-
n && T(te, this, _(
|
|
751
|
+
n && T(te, this, _(B, this, Rn).call(this, () => {
|
|
752
752
|
try {
|
|
753
|
-
return
|
|
753
|
+
return Ge(() => {
|
|
754
754
|
var l = E;
|
|
755
|
-
l.b = this, l.f |= 128, n(
|
|
755
|
+
l.b = this, l.f |= 128, n(f(ie, this), () => a, () => o);
|
|
756
756
|
});
|
|
757
757
|
} catch (l) {
|
|
758
|
-
return it(l,
|
|
758
|
+
return it(l, f(Z, this).parent), null;
|
|
759
759
|
}
|
|
760
760
|
}));
|
|
761
761
|
};
|
|
@@ -764,10 +764,10 @@ function Ar(e) {
|
|
|
764
764
|
try {
|
|
765
765
|
a = this.transform_error(e);
|
|
766
766
|
} catch (l) {
|
|
767
|
-
it(l,
|
|
767
|
+
it(l, f(Z, this) && f(Z, this).parent);
|
|
768
768
|
return;
|
|
769
769
|
}
|
|
770
|
-
a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (l) => it(l,
|
|
770
|
+
a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (l) => it(l, f(Z, this) && f(Z, this).parent)) : s(a);
|
|
771
771
|
});
|
|
772
772
|
}
|
|
773
773
|
// @__NO_SIDE_EFFECTS__
|
|
@@ -791,7 +791,7 @@ function nn(e) {
|
|
|
791
791
|
// @__NO_SIDE_EFFECTS__
|
|
792
792
|
function Cr(e) {
|
|
793
793
|
const t = /* @__PURE__ */ nn(e);
|
|
794
|
-
return
|
|
794
|
+
return xe || Gi(t), t;
|
|
795
795
|
}
|
|
796
796
|
// @__NO_SIDE_EFFECTS__
|
|
797
797
|
function ra(e) {
|
|
@@ -807,13 +807,13 @@ function ia(e) {
|
|
|
807
807
|
}
|
|
808
808
|
function rr(e) {
|
|
809
809
|
var t, n = E, r = e.parent;
|
|
810
|
-
if (!
|
|
810
|
+
if (!be && r !== null && e.v !== H && (r.f & 24576) !== 0)
|
|
811
811
|
return Ps(), e.v;
|
|
812
|
-
|
|
812
|
+
Oe(r);
|
|
813
813
|
try {
|
|
814
814
|
e.f &= ~xt, ia(e), t = Ji(e);
|
|
815
815
|
} finally {
|
|
816
|
-
|
|
816
|
+
Oe(n);
|
|
817
817
|
}
|
|
818
818
|
return t;
|
|
819
819
|
}
|
|
@@ -823,7 +823,7 @@ function Ri(e) {
|
|
|
823
823
|
P(e, ae);
|
|
824
824
|
return;
|
|
825
825
|
}
|
|
826
|
-
|
|
826
|
+
be || (F !== null ? (ir() || x?.is_fork) && F.set(e, t) : Qn(e));
|
|
827
827
|
}
|
|
828
828
|
function oa(e) {
|
|
829
829
|
if (e.effects !== null)
|
|
@@ -847,9 +847,9 @@ function un(e, t) {
|
|
|
847
847
|
return n;
|
|
848
848
|
}
|
|
849
849
|
// @__NO_SIDE_EFFECTS__
|
|
850
|
-
function
|
|
850
|
+
function z(e, t) {
|
|
851
851
|
const n = un(e, t);
|
|
852
|
-
return
|
|
852
|
+
return Gi(n), n;
|
|
853
853
|
}
|
|
854
854
|
// @__NO_SIDE_EFFECTS__
|
|
855
855
|
function sa(e, t = !1, n = !0) {
|
|
@@ -867,13 +867,13 @@ function M(e, t, n = !1) {
|
|
|
867
867
|
}
|
|
868
868
|
function Pi(e, t, n = null) {
|
|
869
869
|
if (!e.equals(t)) {
|
|
870
|
-
De.set(e,
|
|
870
|
+
De.set(e, be ? t : e.v);
|
|
871
871
|
var r = ht.ensure();
|
|
872
872
|
if (r.capture(e, t), (e.f & 2) !== 0) {
|
|
873
873
|
const i = e;
|
|
874
|
-
(e.f & 2048) !== 0 && rr(i),
|
|
874
|
+
(e.f & 2048) !== 0 && rr(i), F === null && Qn(i);
|
|
875
875
|
}
|
|
876
|
-
e.wv = Xi(), Ni(e, le, n), cn() && E !== null && (E.f & 1024) !== 0 && (E.f & 96) === 0 && (
|
|
876
|
+
e.wv = Xi(), Ni(e, le, n), cn() && E !== null && (E.f & 1024) !== 0 && (E.f & 96) === 0 && (J === null ? _a([e]) : J.push(e)), !r.is_fork && rn.size > 0 && !$i && aa();
|
|
877
877
|
}
|
|
878
878
|
return t;
|
|
879
879
|
}
|
|
@@ -904,10 +904,10 @@ function Ni(e, t, n) {
|
|
|
904
904
|
if (c && P(a, t), (l & 131072) !== 0) rn.add(a);
|
|
905
905
|
else if ((l & 2) !== 0) {
|
|
906
906
|
var u = a;
|
|
907
|
-
|
|
907
|
+
F?.delete(u), (l & 65536) === 0 && (l & 512 && (E === null || (E.f & 2097152) === 0) && (a.f |= xt), Ni(u, Ye, n));
|
|
908
908
|
} else if (c) {
|
|
909
909
|
var h = a;
|
|
910
|
-
(l & 16) !== 0 &&
|
|
910
|
+
(l & 16) !== 0 && me !== null && me.add(h), n !== null ? n.push(h) : tr(h);
|
|
911
911
|
}
|
|
912
912
|
}
|
|
913
913
|
}
|
|
@@ -917,14 +917,14 @@ function ot(e) {
|
|
|
917
917
|
if (typeof e != "object" || e === null || St in e) return e;
|
|
918
918
|
const t = fs(e);
|
|
919
919
|
if (t !== hs && t !== ds) return e;
|
|
920
|
-
var n = /* @__PURE__ */ new Map(), r = ls(e), i = /* @__PURE__ */
|
|
920
|
+
var n = /* @__PURE__ */ new Map(), r = ls(e), i = /* @__PURE__ */ z(0), o = null, s = je, a = (h) => {
|
|
921
921
|
if (je === s) return h();
|
|
922
922
|
var p = k, g = je;
|
|
923
923
|
de(null), Ir(s);
|
|
924
924
|
var m = h();
|
|
925
925
|
return de(p), Ir(g), m;
|
|
926
926
|
};
|
|
927
|
-
r && n.set("length", /* @__PURE__ */
|
|
927
|
+
r && n.set("length", /* @__PURE__ */ z(e.length, o));
|
|
928
928
|
var l = "";
|
|
929
929
|
let c = !1;
|
|
930
930
|
function u(h) {
|
|
@@ -939,7 +939,7 @@ function ot(e) {
|
|
|
939
939
|
(!("value" in g) || g.configurable === !1 || g.enumerable === !1 || g.writable === !1) && Ms();
|
|
940
940
|
var m = n.get(p);
|
|
941
941
|
return m === void 0 ? a(() => {
|
|
942
|
-
var v = /* @__PURE__ */
|
|
942
|
+
var v = /* @__PURE__ */ z(g.value, o);
|
|
943
943
|
return n.set(p, v), v;
|
|
944
944
|
}) : M(m, g.value, !0), !0;
|
|
945
945
|
},
|
|
@@ -947,7 +947,7 @@ function ot(e) {
|
|
|
947
947
|
var g = n.get(p);
|
|
948
948
|
if (g === void 0) {
|
|
949
949
|
if (p in h) {
|
|
950
|
-
const m = a(() => /* @__PURE__ */
|
|
950
|
+
const m = a(() => /* @__PURE__ */ z(H, o));
|
|
951
951
|
n.set(p, m), wt(i);
|
|
952
952
|
}
|
|
953
953
|
} else
|
|
@@ -957,12 +957,12 @@ function ot(e) {
|
|
|
957
957
|
get(h, p, g) {
|
|
958
958
|
if (p === St) return e;
|
|
959
959
|
var m = n.get(p), v = p in h;
|
|
960
|
-
if (m === void 0 && (!v ||
|
|
961
|
-
var S = /* @__PURE__ */
|
|
960
|
+
if (m === void 0 && (!v || Be(h, p)?.writable) && (m = a(() => {
|
|
961
|
+
var S = /* @__PURE__ */ z(ot(v ? h[p] : H), o);
|
|
962
962
|
return S;
|
|
963
963
|
}), n.set(p, m)), m !== void 0) {
|
|
964
|
-
var
|
|
965
|
-
return
|
|
964
|
+
var b = y(m);
|
|
965
|
+
return b === H ? void 0 : b;
|
|
966
966
|
}
|
|
967
967
|
return Reflect.get(h, p, g);
|
|
968
968
|
},
|
|
@@ -970,13 +970,13 @@ function ot(e) {
|
|
|
970
970
|
var g = Reflect.getOwnPropertyDescriptor(h, p);
|
|
971
971
|
if (g && "value" in g) {
|
|
972
972
|
var m = n.get(p);
|
|
973
|
-
m && (g.value =
|
|
973
|
+
m && (g.value = y(m));
|
|
974
974
|
} else if (g === void 0) {
|
|
975
|
-
var v = n.get(p),
|
|
976
|
-
if (v !== void 0 &&
|
|
975
|
+
var v = n.get(p), b = v?.v;
|
|
976
|
+
if (v !== void 0 && b !== H) return {
|
|
977
977
|
enumerable: !0,
|
|
978
978
|
configurable: !0,
|
|
979
|
-
value:
|
|
979
|
+
value: b,
|
|
980
980
|
writable: !0
|
|
981
981
|
};
|
|
982
982
|
}
|
|
@@ -985,39 +985,39 @@ function ot(e) {
|
|
|
985
985
|
has(h, p) {
|
|
986
986
|
if (p === St) return !0;
|
|
987
987
|
var g = n.get(p), m = g !== void 0 && g.v !== H || Reflect.has(h, p);
|
|
988
|
-
return (g !== void 0 || E !== null && (!m ||
|
|
989
|
-
var v = /* @__PURE__ */
|
|
988
|
+
return (g !== void 0 || E !== null && (!m || Be(h, p)?.writable)) && (g === void 0 && (g = a(() => {
|
|
989
|
+
var v = /* @__PURE__ */ z(m ? ot(h[p]) : H, o);
|
|
990
990
|
return v;
|
|
991
|
-
}), n.set(p, g)),
|
|
991
|
+
}), n.set(p, g)), y(g) === H) ? !1 : m;
|
|
992
992
|
},
|
|
993
993
|
set(h, p, g, m) {
|
|
994
|
-
var v = n.get(p),
|
|
994
|
+
var v = n.get(p), b = p in h;
|
|
995
995
|
if (r && p === "length") for (var S = g; S < v.v; S += 1) {
|
|
996
996
|
var I = n.get(S + "");
|
|
997
|
-
I !== void 0 ? M(I, H) : S in h && (I = a(() => /* @__PURE__ */
|
|
997
|
+
I !== void 0 ? M(I, H) : S in h && (I = a(() => /* @__PURE__ */ z(H, o)), n.set(S + "", I));
|
|
998
998
|
}
|
|
999
999
|
if (v === void 0)
|
|
1000
|
-
(!
|
|
1000
|
+
(!b || Be(h, p)?.writable) && (v = a(() => /* @__PURE__ */ z(void 0, o)), M(v, ot(g)), n.set(p, v));
|
|
1001
1001
|
else {
|
|
1002
|
-
|
|
1002
|
+
b = v.v !== H;
|
|
1003
1003
|
var V = a(() => ot(g));
|
|
1004
1004
|
M(v, V);
|
|
1005
1005
|
}
|
|
1006
1006
|
var A = Reflect.getOwnPropertyDescriptor(h, p);
|
|
1007
|
-
if (A?.set && A.set.call(m, g), !
|
|
1007
|
+
if (A?.set && A.set.call(m, g), !b) {
|
|
1008
1008
|
if (r && typeof p == "string") {
|
|
1009
|
-
var
|
|
1010
|
-
Number.isInteger(
|
|
1009
|
+
var U = n.get("length"), ee = Number(p);
|
|
1010
|
+
Number.isInteger(ee) && ee >= U.v && M(U, ee + 1);
|
|
1011
1011
|
}
|
|
1012
1012
|
wt(i);
|
|
1013
1013
|
}
|
|
1014
1014
|
return !0;
|
|
1015
1015
|
},
|
|
1016
1016
|
ownKeys(h) {
|
|
1017
|
-
|
|
1017
|
+
y(i);
|
|
1018
1018
|
var p = Reflect.ownKeys(h).filter((v) => {
|
|
1019
|
-
var
|
|
1020
|
-
return
|
|
1019
|
+
var b = n.get(v);
|
|
1020
|
+
return b === void 0 || b.v !== H;
|
|
1021
1021
|
});
|
|
1022
1022
|
for (var [g, m] of n) m.v !== H && !(g in h) && p.push(g);
|
|
1023
1023
|
return p;
|
|
@@ -1030,42 +1030,42 @@ function ot(e) {
|
|
|
1030
1030
|
function ca(e, t) {
|
|
1031
1031
|
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : la.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
|
|
1032
1032
|
}
|
|
1033
|
-
var xr, ua, Hi,
|
|
1033
|
+
var xr, ua, Hi, Bi, Wi;
|
|
1034
1034
|
function Ln() {
|
|
1035
1035
|
if (xr === void 0) {
|
|
1036
1036
|
xr = window, ua = document, Hi = /Firefox/.test(navigator.userAgent);
|
|
1037
1037
|
var e = Element.prototype, t = Node.prototype, n = Text.prototype;
|
|
1038
|
-
|
|
1038
|
+
Bi = Be(t, "firstChild").get, Wi = Be(t, "nextSibling").get, yr(e) && (e[Ss] = void 0, e[Ts] = null, e[_s] = void 0, e.__e = void 0), yr(n) && (n[ws] = void 0);
|
|
1039
1039
|
}
|
|
1040
1040
|
}
|
|
1041
|
-
function
|
|
1041
|
+
function Fi(e = "") {
|
|
1042
1042
|
return document.createTextNode(e);
|
|
1043
1043
|
}
|
|
1044
1044
|
// @__NO_SIDE_EFFECTS__
|
|
1045
1045
|
function $n(e) {
|
|
1046
|
-
return
|
|
1046
|
+
return Bi.call(e);
|
|
1047
1047
|
}
|
|
1048
1048
|
// @__NO_SIDE_EFFECTS__
|
|
1049
1049
|
function dt(e) {
|
|
1050
|
-
return
|
|
1050
|
+
return Wi.call(e);
|
|
1051
1051
|
}
|
|
1052
1052
|
function ha(e) {
|
|
1053
1053
|
e.textContent = "";
|
|
1054
1054
|
}
|
|
1055
|
-
function
|
|
1055
|
+
function zi(e, t, n) {
|
|
1056
1056
|
return t == null || t === "http://www.w3.org/1999/xhtml" ? n ? document.createElement(e, { is: n }) : document.createElement(e) : n ? document.createElementNS(t, e, { is: n }) : document.createElementNS(t, e);
|
|
1057
1057
|
}
|
|
1058
1058
|
function Di(e) {
|
|
1059
1059
|
var t = k, n = E;
|
|
1060
|
-
de(null),
|
|
1060
|
+
de(null), Oe(null);
|
|
1061
1061
|
try {
|
|
1062
1062
|
return e();
|
|
1063
1063
|
} finally {
|
|
1064
|
-
de(t),
|
|
1064
|
+
de(t), Oe(n);
|
|
1065
1065
|
}
|
|
1066
1066
|
}
|
|
1067
1067
|
function da(e) {
|
|
1068
|
-
E === null && (k === null && Cs(e), As()),
|
|
1068
|
+
E === null && (k === null && Cs(e), As()), be && Es(e);
|
|
1069
1069
|
}
|
|
1070
1070
|
function fa(e, t) {
|
|
1071
1071
|
var n = t.last;
|
|
@@ -1119,7 +1119,7 @@ function Le(e) {
|
|
|
1119
1119
|
} else return ji(e);
|
|
1120
1120
|
}
|
|
1121
1121
|
function ji(e) {
|
|
1122
|
-
return Je(4 |
|
|
1122
|
+
return Je(4 | bs, e);
|
|
1123
1123
|
}
|
|
1124
1124
|
function pa(e) {
|
|
1125
1125
|
ht.ensure();
|
|
@@ -1147,13 +1147,13 @@ function va(e, t = 0) {
|
|
|
1147
1147
|
var n = Je(16 | t, e);
|
|
1148
1148
|
return n;
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1150
|
+
function Ge(e) {
|
|
1151
1151
|
return Je(32 | Ct, e);
|
|
1152
1152
|
}
|
|
1153
1153
|
function qi(e) {
|
|
1154
1154
|
var t = e.teardown;
|
|
1155
1155
|
if (t !== null) {
|
|
1156
|
-
const n =
|
|
1156
|
+
const n = be, r = k;
|
|
1157
1157
|
Or(!0), de(null);
|
|
1158
1158
|
try {
|
|
1159
1159
|
t.call(null);
|
|
@@ -1173,7 +1173,7 @@ function sr(e, t = !1) {
|
|
|
1173
1173
|
(n.f & 64) !== 0 ? n.parent = null : oe(n, t), n = r;
|
|
1174
1174
|
}
|
|
1175
1175
|
}
|
|
1176
|
-
function
|
|
1176
|
+
function ba(e) {
|
|
1177
1177
|
for (var t = e.first; t !== null; ) {
|
|
1178
1178
|
var n = t.next;
|
|
1179
1179
|
(t.f & 32) === 0 && oe(t), t = n;
|
|
@@ -1181,14 +1181,14 @@ function ya(e) {
|
|
|
1181
1181
|
}
|
|
1182
1182
|
function oe(e, t = !0) {
|
|
1183
1183
|
var n = !1;
|
|
1184
|
-
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (
|
|
1184
|
+
(t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (ya(e.nodes.start, e.nodes.end), n = !0), P(e, Tr), sr(e, t && !n), At(e, 0);
|
|
1185
1185
|
var r = e.nodes && e.nodes.t;
|
|
1186
1186
|
if (r !== null) for (const o of r) o.stop();
|
|
1187
1187
|
qi(e), e.f ^= Tr, e.f |= vs;
|
|
1188
1188
|
var i = e.parent;
|
|
1189
1189
|
i !== null && i.first !== null && Vi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
|
|
1190
1190
|
}
|
|
1191
|
-
function
|
|
1191
|
+
function ya(e, t) {
|
|
1192
1192
|
for (; e !== null; ) {
|
|
1193
1193
|
var n = e === t ? null : /* @__PURE__ */ dt(e);
|
|
1194
1194
|
e.remove(), e = n;
|
|
@@ -1200,7 +1200,7 @@ function Vi(e) {
|
|
|
1200
1200
|
}
|
|
1201
1201
|
function hn(e, t, n = !0) {
|
|
1202
1202
|
var r = [];
|
|
1203
|
-
|
|
1203
|
+
Ui(e, r, !0);
|
|
1204
1204
|
var i = () => {
|
|
1205
1205
|
n && oe(e), t && t();
|
|
1206
1206
|
}, o = r.length;
|
|
@@ -1209,7 +1209,7 @@ function hn(e, t, n = !0) {
|
|
|
1209
1209
|
for (var a of r) a.out(s);
|
|
1210
1210
|
} else i();
|
|
1211
1211
|
}
|
|
1212
|
-
function
|
|
1212
|
+
function Ui(e, t, n) {
|
|
1213
1213
|
if ((e.f & 8192) === 0) {
|
|
1214
1214
|
e.f ^= ai;
|
|
1215
1215
|
var r = e.nodes && e.nodes.t;
|
|
@@ -1219,7 +1219,7 @@ function Gi(e, t, n) {
|
|
|
1219
1219
|
var o = i.next;
|
|
1220
1220
|
if ((i.f & 64) === 0) {
|
|
1221
1221
|
var s = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (e.f & 16) !== 0;
|
|
1222
|
-
|
|
1222
|
+
Ui(i, t, s ? n : !1);
|
|
1223
1223
|
}
|
|
1224
1224
|
i = o;
|
|
1225
1225
|
}
|
|
@@ -1232,25 +1232,25 @@ function Ta(e, t) {
|
|
|
1232
1232
|
t.append(n), n = i;
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
|
-
var Sa = null,
|
|
1235
|
+
var Sa = null, Wt = !1, be = !1;
|
|
1236
1236
|
function Or(e) {
|
|
1237
|
-
|
|
1237
|
+
be = e;
|
|
1238
1238
|
}
|
|
1239
1239
|
var k = null, ne = !1;
|
|
1240
1240
|
function de(e) {
|
|
1241
1241
|
k = e;
|
|
1242
1242
|
}
|
|
1243
1243
|
var E = null;
|
|
1244
|
-
function
|
|
1244
|
+
function Oe(e) {
|
|
1245
1245
|
E = e;
|
|
1246
1246
|
}
|
|
1247
1247
|
var se = null;
|
|
1248
|
-
function
|
|
1249
|
-
k !== null && (!
|
|
1248
|
+
function Gi(e) {
|
|
1249
|
+
k !== null && (!xe || (k.f & 2) !== 0) && (se ?? (se = /* @__PURE__ */ new Set())).add(e);
|
|
1250
1250
|
}
|
|
1251
|
-
var q = null,
|
|
1251
|
+
var q = null, K = 0, J = null;
|
|
1252
1252
|
function _a(e) {
|
|
1253
|
-
|
|
1253
|
+
J = e;
|
|
1254
1254
|
}
|
|
1255
1255
|
var Ki = 1, Ne = 0, je = Ne;
|
|
1256
1256
|
function Ir(e) {
|
|
@@ -1267,21 +1267,21 @@ function It(e) {
|
|
|
1267
1267
|
var o = n[i];
|
|
1268
1268
|
if (It(o) && Ri(o), o.wv > e.wv) return !0;
|
|
1269
1269
|
}
|
|
1270
|
-
(t & 512) !== 0 &&
|
|
1270
|
+
(t & 512) !== 0 && F === null && P(e, ae);
|
|
1271
1271
|
}
|
|
1272
1272
|
return !1;
|
|
1273
1273
|
}
|
|
1274
1274
|
function Yi(e, t, n = !0) {
|
|
1275
1275
|
var r = e.reactions;
|
|
1276
|
-
if (r !== null && !(!
|
|
1276
|
+
if (r !== null && !(!xe && se !== null && se.has(e)))
|
|
1277
1277
|
for (var i = 0; i < r.length; i++) {
|
|
1278
1278
|
var o = r[i];
|
|
1279
1279
|
(o.f & 2) !== 0 ? Yi(o, t, !1) : t === o && (n ? P(o, le) : (o.f & 1024) !== 0 && P(o, Ye), tr(o));
|
|
1280
1280
|
}
|
|
1281
1281
|
}
|
|
1282
1282
|
function Ji(e) {
|
|
1283
|
-
var t = q, n =
|
|
1284
|
-
q = null,
|
|
1283
|
+
var t = q, n = K, r = J, i = k, o = se, s = L, a = ne, l = je, c = e.f;
|
|
1284
|
+
q = null, K = 0, J = null, k = (c & 96) === 0 ? e : null, se = null, Xt(e.ctx), ne = !1, je = ++Ne, e.ac !== null && (Di(() => {
|
|
1285
1285
|
e.ac.abort(Jn);
|
|
1286
1286
|
}), e.ac = null);
|
|
1287
1287
|
try {
|
|
@@ -1291,25 +1291,25 @@ function Ji(e) {
|
|
|
1291
1291
|
var p = e.deps, g = x?.is_fork;
|
|
1292
1292
|
if (q !== null) {
|
|
1293
1293
|
var m;
|
|
1294
|
-
if (g || At(e,
|
|
1295
|
-
for (p.length =
|
|
1294
|
+
if (g || At(e, K), p !== null && K > 0)
|
|
1295
|
+
for (p.length = K + q.length, m = 0; m < q.length; m++) p[K + m] = q[m];
|
|
1296
1296
|
else e.deps = p = q;
|
|
1297
|
-
if (ir() && (e.f & 512) !== 0) for (m =
|
|
1297
|
+
if (ir() && (e.f & 512) !== 0) for (m = K; m < p.length; m++) {
|
|
1298
1298
|
var v;
|
|
1299
1299
|
((v = p[m]).reactions ?? (v.reactions = [])).push(e);
|
|
1300
1300
|
}
|
|
1301
|
-
} else !g && p !== null &&
|
|
1302
|
-
if (cn() &&
|
|
1301
|
+
} else !g && p !== null && K < p.length && (At(e, K), p.length = K);
|
|
1302
|
+
if (cn() && J !== null && !ne && p !== null && (e.f & 6146) === 0) for (m = 0; m < J.length; m++) Yi(J[m], e);
|
|
1303
1303
|
if (i !== null && i !== e) {
|
|
1304
|
-
if (Ne++, i.deps !== null) for (let
|
|
1305
|
-
if (t !== null) for (const
|
|
1306
|
-
|
|
1304
|
+
if (Ne++, i.deps !== null) for (let b = 0; b < n; b += 1) i.deps[b].rv = Ne;
|
|
1305
|
+
if (t !== null) for (const b of t) b.rv = Ne;
|
|
1306
|
+
J !== null && (r === null ? r = J : r.push(...J));
|
|
1307
1307
|
}
|
|
1308
1308
|
return (e.f & 8388608) !== 0 && (e.f ^= ui), h;
|
|
1309
|
-
} catch (
|
|
1310
|
-
return
|
|
1309
|
+
} catch (b) {
|
|
1310
|
+
return yi(b);
|
|
1311
1311
|
} finally {
|
|
1312
|
-
e.f ^= Sr, q = t,
|
|
1312
|
+
e.f ^= Sr, q = t, K = n, J = r, k = i, se = o, Xt(s), ne = a, je = l;
|
|
1313
1313
|
}
|
|
1314
1314
|
}
|
|
1315
1315
|
function wa(e, t) {
|
|
@@ -1321,7 +1321,7 @@ function wa(e, t) {
|
|
|
1321
1321
|
i === 0 ? n = t.reactions = null : (n[r] = n[i], n.pop());
|
|
1322
1322
|
}
|
|
1323
1323
|
}
|
|
1324
|
-
if (n === null && (t.f & 2) !== 0 && (q === null || !
|
|
1324
|
+
if (n === null && (t.f & 2) !== 0 && (q === null || !Ut.call(q, t))) {
|
|
1325
1325
|
var o = t;
|
|
1326
1326
|
(o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~xt), o.v !== H && Qn(o), oa(o), At(o, 0);
|
|
1327
1327
|
}
|
|
@@ -1335,30 +1335,30 @@ function ct(e) {
|
|
|
1335
1335
|
var t = e.f;
|
|
1336
1336
|
if ((t & 16384) === 0) {
|
|
1337
1337
|
P(e, ae);
|
|
1338
|
-
var n = E, r =
|
|
1339
|
-
if (E = e,
|
|
1338
|
+
var n = E, r = Wt;
|
|
1339
|
+
if (E = e, Wt = !0, 0)
|
|
1340
1340
|
var i, o;
|
|
1341
1341
|
try {
|
|
1342
|
-
(t & 16777232) !== 0 ?
|
|
1342
|
+
(t & 16777232) !== 0 ? ba(e) : sr(e), qi(e);
|
|
1343
1343
|
var s = Ji(e);
|
|
1344
1344
|
if (e.teardown = typeof s == "function" ? s : null, e.wv = Ki, 0)
|
|
1345
1345
|
for (var a of e.deps) ;
|
|
1346
1346
|
} finally {
|
|
1347
|
-
|
|
1347
|
+
Wt = r, E = n;
|
|
1348
1348
|
}
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1351
|
+
function y(e) {
|
|
1352
1352
|
var t = (e.f & 2) !== 0;
|
|
1353
1353
|
if (Sa?.add(e), k !== null && !ne && !(E !== null && (E.f & 16384) !== 0) && (se === null || !se.has(e))) {
|
|
1354
1354
|
var n = k.deps;
|
|
1355
1355
|
if ((k.f & 2097152) !== 0)
|
|
1356
|
-
e.rv < Ne && (e.rv = Ne, q === null && n !== null && n[
|
|
1356
|
+
e.rv < Ne && (e.rv = Ne, q === null && n !== null && n[K] === e ? K++ : q === null ? q = [e] : q.push(e));
|
|
1357
1357
|
else {
|
|
1358
1358
|
var r;
|
|
1359
|
-
(r = k).deps ?? (r.deps = []),
|
|
1359
|
+
(r = k).deps ?? (r.deps = []), Ut.call(k.deps, e) || k.deps.push(e);
|
|
1360
1360
|
var i = e.reactions;
|
|
1361
|
-
i === null ? e.reactions = [k] :
|
|
1361
|
+
i === null ? e.reactions = [k] : Ut.call(i, k) || i.push(k);
|
|
1362
1362
|
}
|
|
1363
1363
|
}
|
|
1364
1364
|
if (0) {
|
|
@@ -1369,17 +1369,17 @@ function b(e) {
|
|
|
1369
1369
|
var s, a;
|
|
1370
1370
|
}
|
|
1371
1371
|
}
|
|
1372
|
-
if (
|
|
1372
|
+
if (be && De.has(e)) return De.get(e);
|
|
1373
1373
|
if (t) {
|
|
1374
1374
|
var l = e;
|
|
1375
|
-
if (
|
|
1375
|
+
if (be) {
|
|
1376
1376
|
var c = l.v;
|
|
1377
1377
|
return ((l.f & 1024) === 0 && l.reactions !== null || Zi(l)) && (c = rr(l)), De.set(l, c), c;
|
|
1378
1378
|
}
|
|
1379
|
-
var u = (l.f & 512) === 0 && !ne && k !== null && (
|
|
1379
|
+
var u = (l.f & 512) === 0 && !ne && k !== null && (Wt || (k.f & 512) !== 0), h = (l.f & li) === 0;
|
|
1380
1380
|
It(l) && (u && (l.f |= 512), Ri(l)), u && !h && (Li(l), Qi(l));
|
|
1381
1381
|
}
|
|
1382
|
-
if (
|
|
1382
|
+
if (F?.has(e)) return F.get(e);
|
|
1383
1383
|
if ((e.f & 8388608) !== 0) throw e.v;
|
|
1384
1384
|
return e.v;
|
|
1385
1385
|
}
|
|
@@ -1426,7 +1426,7 @@ function Lr(e) {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
});
|
|
1428
1428
|
var u = k, h = E;
|
|
1429
|
-
de(null),
|
|
1429
|
+
de(null), Oe(null);
|
|
1430
1430
|
try {
|
|
1431
1431
|
for (var p, g = []; o !== null && o !== t; ) {
|
|
1432
1432
|
try {
|
|
@@ -1445,7 +1445,7 @@ function Lr(e) {
|
|
|
1445
1445
|
throw p;
|
|
1446
1446
|
}
|
|
1447
1447
|
} finally {
|
|
1448
|
-
e[Nt] = t, delete e.currentTarget, de(u),
|
|
1448
|
+
e[Nt] = t, delete e.currentTarget, de(u), Oe(h);
|
|
1449
1449
|
}
|
|
1450
1450
|
}
|
|
1451
1451
|
}
|
|
@@ -1454,10 +1454,10 @@ function Aa(e) {
|
|
|
1454
1454
|
return Ea?.createHTML(e) ?? e;
|
|
1455
1455
|
}
|
|
1456
1456
|
function Ca(e) {
|
|
1457
|
-
var t =
|
|
1457
|
+
var t = zi("template");
|
|
1458
1458
|
return t.innerHTML = Aa(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1459
1459
|
}
|
|
1460
|
-
function
|
|
1460
|
+
function Ft(e, t) {
|
|
1461
1461
|
var n = E;
|
|
1462
1462
|
n.nodes === null && (n.nodes = {
|
|
1463
1463
|
start: e,
|
|
@@ -1471,13 +1471,13 @@ function xa(e, t) {
|
|
|
1471
1471
|
var n = (t & 1) !== 0, r = (t & 2) !== 0, i, o = !e.startsWith("<!>");
|
|
1472
1472
|
return () => {
|
|
1473
1473
|
if (re)
|
|
1474
|
-
return
|
|
1474
|
+
return Ft(D, null), D;
|
|
1475
1475
|
i === void 0 && (i = Ca(o ? e : "<!>" + e), n || (i = /* @__PURE__ */ $n(i)));
|
|
1476
1476
|
var s = r || Hi ? document.importNode(i, !0) : i.cloneNode(!0);
|
|
1477
1477
|
if (n) {
|
|
1478
1478
|
var a = /* @__PURE__ */ $n(s), l = s.lastChild;
|
|
1479
|
-
|
|
1480
|
-
} else
|
|
1479
|
+
Ft(a, l);
|
|
1480
|
+
} else Ft(s, s);
|
|
1481
1481
|
return s;
|
|
1482
1482
|
};
|
|
1483
1483
|
}
|
|
@@ -1587,12 +1587,12 @@ var Ht = /* @__PURE__ */ new Map();
|
|
|
1587
1587
|
function no(e, { target: t, anchor: n, props: r = {}, events: i, context: o, intro: s = !0, transformError: a }) {
|
|
1588
1588
|
Ln();
|
|
1589
1589
|
var l = void 0, c = ga(() => {
|
|
1590
|
-
var u = n ?? t.appendChild(
|
|
1590
|
+
var u = n ?? t.appendChild(Fi());
|
|
1591
1591
|
Qs(u, { pending: () => {
|
|
1592
1592
|
} }, (g) => {
|
|
1593
1593
|
mi({});
|
|
1594
1594
|
var m = L;
|
|
1595
|
-
if (o && (m.c = o), i && (r.$$events = i), re &&
|
|
1595
|
+
if (o && (m.c = o), i && (r.$$events = i), re && Ft(g, null), $r = s, l = e(g, r) || {}, $r = !0, re && (E.nodes.end = D, D === null || D.nodeType !== 8 || D.data !== "]"))
|
|
1596
1596
|
throw di(), Vt;
|
|
1597
1597
|
vi();
|
|
1598
1598
|
}, a);
|
|
@@ -1601,20 +1601,20 @@ function no(e, { target: t, anchor: n, props: r = {}, events: i, context: o, int
|
|
|
1601
1601
|
var v = g[m];
|
|
1602
1602
|
if (!h.has(v)) {
|
|
1603
1603
|
h.add(v);
|
|
1604
|
-
var
|
|
1604
|
+
var b = Ma(v);
|
|
1605
1605
|
for (const V of [t, document]) {
|
|
1606
1606
|
var S = Ht.get(V);
|
|
1607
1607
|
S === void 0 && (S = /* @__PURE__ */ new Map(), Ht.set(V, S));
|
|
1608
1608
|
var I = S.get(v);
|
|
1609
|
-
I === void 0 ? (V.addEventListener(v, Lr, { passive:
|
|
1609
|
+
I === void 0 ? (V.addEventListener(v, Lr, { passive: b }), S.set(v, 1)) : S.set(v, I + 1);
|
|
1610
1610
|
}
|
|
1611
1611
|
}
|
|
1612
1612
|
}
|
|
1613
1613
|
};
|
|
1614
1614
|
return p(us(ka)), Mr.add(p), () => {
|
|
1615
|
-
for (var g of h) for (const
|
|
1616
|
-
var m = Ht.get(
|
|
1617
|
-
--v == 0 ? (
|
|
1615
|
+
for (var g of h) for (const b of [t, document]) {
|
|
1616
|
+
var m = Ht.get(b), v = m.get(g);
|
|
1617
|
+
--v == 0 ? (b.removeEventListener(g, Lr), m.delete(g), m.size === 0 && Ht.delete(b)) : m.set(g, v);
|
|
1618
1618
|
}
|
|
1619
1619
|
Mr.delete(p), u !== n && u.parentNode?.removeChild(u);
|
|
1620
1620
|
};
|
|
@@ -1640,32 +1640,32 @@ function Na(e) {
|
|
|
1640
1640
|
m: []
|
|
1641
1641
|
});
|
|
1642
1642
|
}
|
|
1643
|
-
var ro, rt = /* @__PURE__ */ new WeakMap(), on = /* @__PURE__ */ new WeakMap(),
|
|
1643
|
+
var ro, rt = /* @__PURE__ */ new WeakMap(), on = /* @__PURE__ */ new WeakMap(), yn = /* @__PURE__ */ new WeakMap(), Pr = /* @__PURE__ */ new WeakSet(), io = class {
|
|
1644
1644
|
constructor(e) {
|
|
1645
|
-
Zn(this, Pr), w(this, rt, /* @__PURE__ */ new WeakMap()), w(this, on, void 0), w(this,
|
|
1645
|
+
Zn(this, Pr), w(this, rt, /* @__PURE__ */ new WeakMap()), w(this, on, void 0), w(this, yn, void 0), T(yn, this, e);
|
|
1646
1646
|
}
|
|
1647
1647
|
observe(e, t) {
|
|
1648
|
-
var n =
|
|
1649
|
-
return n.add(t),
|
|
1650
|
-
var r =
|
|
1651
|
-
r.delete(t), r.size === 0 && (
|
|
1648
|
+
var n = f(rt, this).get(e) || /* @__PURE__ */ new Set();
|
|
1649
|
+
return n.add(t), f(rt, this).set(e, n), _(Pr, this, Ha).call(this).observe(e, f(yn, this)), () => {
|
|
1650
|
+
var r = f(rt, this).get(e);
|
|
1651
|
+
r.delete(t), r.size === 0 && (f(rt, this).delete(e), f(on, this).unobserve(e));
|
|
1652
1652
|
};
|
|
1653
1653
|
}
|
|
1654
1654
|
};
|
|
1655
1655
|
ro = io;
|
|
1656
1656
|
function Ha() {
|
|
1657
|
-
return
|
|
1657
|
+
return f(on, this) ?? T(on, this, new ResizeObserver((e) => {
|
|
1658
1658
|
for (var t of e) {
|
|
1659
1659
|
ro.entries.set(t.target, t);
|
|
1660
|
-
for (var n of
|
|
1660
|
+
for (var n of f(rt, this).get(t.target) || []) n(t);
|
|
1661
1661
|
}
|
|
1662
1662
|
}));
|
|
1663
1663
|
}
|
|
1664
|
-
|
|
1664
|
+
d(io, "entries", /* @__PURE__ */ new WeakMap());
|
|
1665
1665
|
function Tn(e, t) {
|
|
1666
1666
|
return e === t || e?.[St] === t;
|
|
1667
1667
|
}
|
|
1668
|
-
function
|
|
1668
|
+
function Ba(e = {}, t, n, r) {
|
|
1669
1669
|
var i = L.r, o = E;
|
|
1670
1670
|
return ma(() => {
|
|
1671
1671
|
var s, a;
|
|
@@ -1685,12 +1685,12 @@ function Wa(e = {}, t, n, r) {
|
|
|
1685
1685
|
};
|
|
1686
1686
|
}), e;
|
|
1687
1687
|
}
|
|
1688
|
-
function
|
|
1689
|
-
var i = !Ot || (n & 2) !== 0, o = (n & 8) !== 0, s = (n & 16) !== 0, a = r, l = !0, c = void 0, u = () => s && i ? (c ?? (c = /* @__PURE__ */ nn(r)),
|
|
1688
|
+
function ke(e, t, n, r) {
|
|
1689
|
+
var i = !Ot || (n & 2) !== 0, o = (n & 8) !== 0, s = (n & 16) !== 0, a = r, l = !0, c = void 0, u = () => s && i ? (c ?? (c = /* @__PURE__ */ nn(r)), y(c)) : (l && (l = !1, a = s ? dn(r) : r), a);
|
|
1690
1690
|
let h;
|
|
1691
1691
|
if (o) {
|
|
1692
1692
|
var p = St in e || hi in e;
|
|
1693
|
-
h =
|
|
1693
|
+
h = Be(e, t)?.set ?? (p && t in e ? (A) => e[t] = A : void 0);
|
|
1694
1694
|
}
|
|
1695
1695
|
var g, m = !1;
|
|
1696
1696
|
o ? [g, m] = qs(() => e[t]) : g = e[t], g === void 0 && r !== void 0 && (g = u(), h && (i && Is(t), h(g)));
|
|
@@ -1703,26 +1703,26 @@ function we(e, t, n, r) {
|
|
|
1703
1703
|
return A !== void 0 && (a = void 0), A === void 0 ? a : A;
|
|
1704
1704
|
}, i && (n & 4) === 0) return v;
|
|
1705
1705
|
if (h) {
|
|
1706
|
-
var
|
|
1707
|
-
return (function(A,
|
|
1708
|
-
return arguments.length > 0 ? ((!i || !
|
|
1706
|
+
var b = e.$$legacy;
|
|
1707
|
+
return (function(A, U) {
|
|
1708
|
+
return arguments.length > 0 ? ((!i || !U || b || m) && h(U ? v() : A), A) : v();
|
|
1709
1709
|
});
|
|
1710
1710
|
}
|
|
1711
1711
|
var S = !1, I = ((n & 1) !== 0 ? nn : ra)(() => (S = !1, v()));
|
|
1712
|
-
o &&
|
|
1712
|
+
o && y(I);
|
|
1713
1713
|
var V = E;
|
|
1714
|
-
return (function(A,
|
|
1714
|
+
return (function(A, U) {
|
|
1715
1715
|
if (arguments.length > 0) {
|
|
1716
|
-
const
|
|
1717
|
-
return M(I,
|
|
1716
|
+
const ee = U ? y(I) : i && o ? ot(A) : A;
|
|
1717
|
+
return M(I, ee), S = !0, a !== void 0 && (a = ee), A;
|
|
1718
1718
|
}
|
|
1719
|
-
return
|
|
1719
|
+
return be && S || (V.f & 16384) !== 0 ? I.v : y(I);
|
|
1720
1720
|
});
|
|
1721
1721
|
}
|
|
1722
|
-
function
|
|
1723
|
-
return new
|
|
1722
|
+
function Wa(e) {
|
|
1723
|
+
return new Fa(e);
|
|
1724
1724
|
}
|
|
1725
|
-
var Me = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(),
|
|
1725
|
+
var Me = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), Fa = class {
|
|
1726
1726
|
constructor(e) {
|
|
1727
1727
|
w(this, Me, void 0), w(this, ce, void 0);
|
|
1728
1728
|
var t = /* @__PURE__ */ new Map(), n = (i, o) => {
|
|
@@ -1734,10 +1734,10 @@ var Me = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), za =
|
|
|
1734
1734
|
$$events: {}
|
|
1735
1735
|
}, {
|
|
1736
1736
|
get(i, o) {
|
|
1737
|
-
return
|
|
1737
|
+
return y(t.get(o) ?? n(o, Reflect.get(i, o)));
|
|
1738
1738
|
},
|
|
1739
1739
|
has(i, o) {
|
|
1740
|
-
return o === hi ? !0 : (
|
|
1740
|
+
return o === hi ? !0 : (y(t.get(o) ?? n(o, Reflect.get(i, o))), Reflect.has(i, o));
|
|
1741
1741
|
},
|
|
1742
1742
|
set(i, o, s) {
|
|
1743
1743
|
return M(t.get(o) ?? n(o, s), s), Reflect.set(i, o, s);
|
|
@@ -1751,40 +1751,40 @@ var Me = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), za =
|
|
|
1751
1751
|
intro: e.intro ?? !1,
|
|
1752
1752
|
recover: e.recover,
|
|
1753
1753
|
transformError: e.transformError
|
|
1754
|
-
})), !
|
|
1755
|
-
for (const i of Object.keys(
|
|
1754
|
+
})), !xe && (!e?.props?.$$host || e.sync === !1) && ge(), T(Me, this, r.$$events);
|
|
1755
|
+
for (const i of Object.keys(f(ce, this)))
|
|
1756
1756
|
i === "$set" || i === "$destroy" || i === "$on" || Kt(this, i, {
|
|
1757
1757
|
get() {
|
|
1758
|
-
return
|
|
1758
|
+
return f(ce, this)[i];
|
|
1759
1759
|
},
|
|
1760
1760
|
set(o) {
|
|
1761
|
-
|
|
1761
|
+
f(ce, this)[i] = o;
|
|
1762
1762
|
},
|
|
1763
1763
|
enumerable: !0
|
|
1764
1764
|
});
|
|
1765
|
-
|
|
1765
|
+
f(ce, this).$set = (i) => {
|
|
1766
1766
|
Object.assign(r, i);
|
|
1767
|
-
},
|
|
1768
|
-
$a(
|
|
1767
|
+
}, f(ce, this).$destroy = () => {
|
|
1768
|
+
$a(f(ce, this));
|
|
1769
1769
|
};
|
|
1770
1770
|
}
|
|
1771
1771
|
$set(e) {
|
|
1772
|
-
|
|
1772
|
+
f(ce, this).$set(e);
|
|
1773
1773
|
}
|
|
1774
1774
|
$on(e, t) {
|
|
1775
|
-
|
|
1775
|
+
f(Me, this)[e] = f(Me, this)[e] || [];
|
|
1776
1776
|
const n = (...r) => t.call(this, ...r);
|
|
1777
|
-
return
|
|
1778
|
-
|
|
1777
|
+
return f(Me, this)[e].push(n), () => {
|
|
1778
|
+
f(Me, this)[e] = f(Me, this)[e].filter((r) => r !== n);
|
|
1779
1779
|
};
|
|
1780
1780
|
}
|
|
1781
1781
|
$destroy() {
|
|
1782
|
-
|
|
1782
|
+
f(ce, this).$destroy();
|
|
1783
1783
|
}
|
|
1784
1784
|
}, oo;
|
|
1785
1785
|
typeof HTMLElement == "function" && (oo = class extends HTMLElement {
|
|
1786
1786
|
constructor(e, t, n) {
|
|
1787
|
-
super(),
|
|
1787
|
+
super(), d(this, "$$ctor", void 0), d(this, "$$s", void 0), d(this, "$$c", void 0), d(this, "$$cn", !1), d(this, "$$d", {}), d(this, "$$r", !1), d(this, "$$p_d", {}), d(this, "$$l", {}), d(this, "$$l_u", /* @__PURE__ */ new Map()), d(this, "$$me", void 0), d(this, "$$shadowRoot", null), this.$$ctor = e, this.$$s = t, n && (this.$$shadowRoot = this.attachShadow(n));
|
|
1788
1788
|
}
|
|
1789
1789
|
addEventListener(e, t, n) {
|
|
1790
1790
|
if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(t), this.$$c) {
|
|
@@ -1803,19 +1803,19 @@ typeof HTMLElement == "function" && (oo = class extends HTMLElement {
|
|
|
1803
1803
|
if (this.$$cn = !0, !this.$$c) {
|
|
1804
1804
|
let e = function(r) {
|
|
1805
1805
|
return (i) => {
|
|
1806
|
-
const o =
|
|
1806
|
+
const o = zi("slot");
|
|
1807
1807
|
r !== "default" && (o.name = r), eo(i, o);
|
|
1808
1808
|
};
|
|
1809
1809
|
};
|
|
1810
1810
|
if (await Promise.resolve(), !this.$$cn || this.$$c) return;
|
|
1811
|
-
const t = {}, n =
|
|
1811
|
+
const t = {}, n = za(this);
|
|
1812
1812
|
for (const r of this.$$s) r in n && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), t.default = !0) : t[r] = e(r));
|
|
1813
1813
|
for (const r of this.attributes) {
|
|
1814
1814
|
const i = this.$$g_p(r.name);
|
|
1815
|
-
i in this.$$d || (this.$$d[i] =
|
|
1815
|
+
i in this.$$d || (this.$$d[i] = zt(i, r.value, this.$$p_d, "toProp"));
|
|
1816
1816
|
}
|
|
1817
1817
|
for (const r in this.$$p_d) !(r in this.$$d) && this[r] !== void 0 && (this.$$d[r] = this[r], delete this[r]);
|
|
1818
|
-
this.$$c =
|
|
1818
|
+
this.$$c = Wa({
|
|
1819
1819
|
component: this.$$ctor,
|
|
1820
1820
|
target: this.$$shadowRoot || this,
|
|
1821
1821
|
props: {
|
|
@@ -1826,10 +1826,10 @@ typeof HTMLElement == "function" && (oo = class extends HTMLElement {
|
|
|
1826
1826
|
}), this.$$me = pa(() => {
|
|
1827
1827
|
or(() => {
|
|
1828
1828
|
this.$$r = !0;
|
|
1829
|
-
for (const r of
|
|
1829
|
+
for (const r of Gt(this.$$c)) {
|
|
1830
1830
|
if (!this.$$p_d[r]?.reflect) continue;
|
|
1831
1831
|
this.$$d[r] = this.$$c[r];
|
|
1832
|
-
const i =
|
|
1832
|
+
const i = zt(r, this.$$d[r], this.$$p_d, "toAttribute");
|
|
1833
1833
|
i == null ? this.removeAttribute(this.$$p_d[r].attribute || r) : this.setAttribute(this.$$p_d[r].attribute || r, i);
|
|
1834
1834
|
}
|
|
1835
1835
|
this.$$r = !1;
|
|
@@ -1843,7 +1843,7 @@ typeof HTMLElement == "function" && (oo = class extends HTMLElement {
|
|
|
1843
1843
|
}
|
|
1844
1844
|
}
|
|
1845
1845
|
attributeChangedCallback(e, t, n) {
|
|
1846
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
1846
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = zt(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
1847
1847
|
}
|
|
1848
1848
|
disconnectedCallback() {
|
|
1849
1849
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -1851,10 +1851,10 @@ typeof HTMLElement == "function" && (oo = class extends HTMLElement {
|
|
|
1851
1851
|
});
|
|
1852
1852
|
}
|
|
1853
1853
|
$$g_p(e) {
|
|
1854
|
-
return
|
|
1854
|
+
return Gt(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
|
|
1855
1855
|
}
|
|
1856
1856
|
});
|
|
1857
|
-
function
|
|
1857
|
+
function zt(e, t, n, r) {
|
|
1858
1858
|
const i = n[e]?.type;
|
|
1859
1859
|
if (t = i === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e]) return t;
|
|
1860
1860
|
if (r === "toAttribute") switch (i) {
|
|
@@ -1880,7 +1880,7 @@ function Ft(e, t, n, r) {
|
|
|
1880
1880
|
return t;
|
|
1881
1881
|
}
|
|
1882
1882
|
}
|
|
1883
|
-
function
|
|
1883
|
+
function za(e) {
|
|
1884
1884
|
const t = {};
|
|
1885
1885
|
return e.childNodes.forEach((n) => {
|
|
1886
1886
|
t[n.slot || "default"] = !0;
|
|
@@ -1892,18 +1892,18 @@ function Da(e, t, n, r, i, o) {
|
|
|
1892
1892
|
super(e, n, i), this.$$p_d = t;
|
|
1893
1893
|
}
|
|
1894
1894
|
static get observedAttributes() {
|
|
1895
|
-
return
|
|
1895
|
+
return Gt(t).map((a) => (t[a].attribute || a).toLowerCase());
|
|
1896
1896
|
}
|
|
1897
1897
|
};
|
|
1898
|
-
return
|
|
1898
|
+
return Gt(t).forEach((a) => {
|
|
1899
1899
|
Kt(s.prototype, a, {
|
|
1900
1900
|
get() {
|
|
1901
1901
|
return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
|
|
1902
1902
|
},
|
|
1903
1903
|
set(l) {
|
|
1904
|
-
l =
|
|
1904
|
+
l = zt(a, l, t), this.$$d[a] = l;
|
|
1905
1905
|
var c = this.$$c;
|
|
1906
|
-
c && (
|
|
1906
|
+
c && (Be(c, a)?.get ? c[a] = l : c.$set({ [a]: l }));
|
|
1907
1907
|
}
|
|
1908
1908
|
});
|
|
1909
1909
|
}), r.forEach((a) => {
|
|
@@ -1917,11 +1917,11 @@ var ja = class extends Event {
|
|
|
1917
1917
|
super("context-request", {
|
|
1918
1918
|
bubbles: !0,
|
|
1919
1919
|
composed: !0
|
|
1920
|
-
}),
|
|
1920
|
+
}), d(this, "context", void 0), d(this, "contextTarget", void 0), d(this, "callback", void 0), d(this, "subscribe", void 0), this.context = e, this.contextTarget = t, this.callback = n, this.subscribe = r ?? !1;
|
|
1921
1921
|
}
|
|
1922
1922
|
}, qa = class {
|
|
1923
1923
|
constructor(e, t) {
|
|
1924
|
-
|
|
1924
|
+
d(this, "host", void 0), d(this, "context", void 0), d(this, "subscribe", void 0), d(this, "onValue", void 0), d(this, "isConnected", !1), d(this, "unsubscribe", void 0), d(this, "currentValue", void 0), d(this, "handleValue", (n, r) => {
|
|
1925
1925
|
r !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = r), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = n, this.onValue?.(n);
|
|
1926
1926
|
}), this.host = e, this.context = t.context, this.subscribe = t.subscribe ?? !0, this.onValue = t.onValue;
|
|
1927
1927
|
}
|
|
@@ -1937,7 +1937,7 @@ var ja = class extends Event {
|
|
|
1937
1937
|
requestValue() {
|
|
1938
1938
|
this.host.dispatchEvent(new ja(this.context, this.host, this.handleValue, this.subscribe));
|
|
1939
1939
|
}
|
|
1940
|
-
}, fn = (e) => e, Va = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), gh = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")),
|
|
1940
|
+
}, fn = (e) => e, Va = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), gh = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), Ua = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), mh = fn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
|
|
1941
1941
|
function so(e, t, n) {
|
|
1942
1942
|
let r = !1;
|
|
1943
1943
|
const i = new qa(e, {
|
|
@@ -1964,14 +1964,14 @@ function so(e, t, n) {
|
|
|
1964
1964
|
globalThis.clearInterval(l), e.removeEventListener("context-provider", o), i.disconnect();
|
|
1965
1965
|
};
|
|
1966
1966
|
}
|
|
1967
|
-
function
|
|
1967
|
+
function Ga(e, t) {
|
|
1968
1968
|
return so(e, Va, t);
|
|
1969
1969
|
}
|
|
1970
1970
|
function Ka(e, t) {
|
|
1971
|
-
return so(e,
|
|
1971
|
+
return so(e, Ua, t);
|
|
1972
1972
|
}
|
|
1973
1973
|
function Xa(e, t) {
|
|
1974
|
-
return
|
|
1974
|
+
return Ga(e, t);
|
|
1975
1975
|
}
|
|
1976
1976
|
function Ya(e, t) {
|
|
1977
1977
|
return Ka(e, t);
|
|
@@ -2041,17 +2041,17 @@ var Ja = class {
|
|
|
2041
2041
|
deserializeMany(e, t) {
|
|
2042
2042
|
return e.map((n) => this.deserialize(n, t));
|
|
2043
2043
|
}
|
|
2044
|
-
},
|
|
2044
|
+
}, W;
|
|
2045
2045
|
(function(e) {
|
|
2046
2046
|
e.TTS_WORD = "tts-word", e.TTS_SENTENCE = "tts-sentence", e.ANNOTATION = "annotation";
|
|
2047
|
-
})(
|
|
2047
|
+
})(W || (W = {}));
|
|
2048
2048
|
var st;
|
|
2049
2049
|
(function(e) {
|
|
2050
2050
|
e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
|
|
2051
2051
|
})(st || (st = {}));
|
|
2052
2052
|
var ao = class Nn {
|
|
2053
2053
|
constructor(t = {}) {
|
|
2054
|
-
if (
|
|
2054
|
+
if (d(this, "config", void 0), d(this, "ttsWordHighlight", null), d(this, "ttsSentenceHighlight", null), d(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), d(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), d(this, "annotations", /* @__PURE__ */ new Map()), d(this, "colorHighlights", /* @__PURE__ */ new Map()), d(this, "nextAnnotationId", 1), d(this, "supported", !1), d(this, "rangeSerializer", void 0), d(this, "themeObserver", null), d(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new Ja(), typeof CSS > "u" || !("highlights" in CSS)) {
|
|
2055
2055
|
console.warn("CSS Custom Highlight API not supported (SSR or unsupported browser)");
|
|
2056
2056
|
return;
|
|
2057
2057
|
}
|
|
@@ -2160,15 +2160,15 @@ var ao = class Nn {
|
|
|
2160
2160
|
0.5
|
|
2161
2161
|
];
|
|
2162
2162
|
let h = u[u.length - 1], p = -1 / 0;
|
|
2163
|
-
for (const
|
|
2164
|
-
const
|
|
2163
|
+
for (const U of u) {
|
|
2164
|
+
const ee = this.blend(c, a, U), pt = this.contrastRatio(ee, a), C = this.contrastRatio(ee, l), mr = pt * 1.2 + C * 0.8;
|
|
2165
2165
|
if (pt >= 1.25 && C >= 2.4) {
|
|
2166
|
-
h =
|
|
2166
|
+
h = U;
|
|
2167
2167
|
break;
|
|
2168
2168
|
}
|
|
2169
|
-
mr > p && (p = mr, h =
|
|
2169
|
+
mr > p && (p = mr, h = U);
|
|
2170
2170
|
}
|
|
2171
|
-
const g = Math.max(0.24, Math.min(0.85, h * 0.55)), m = Math.max(0.55, Math.min(0.95, h + 0.2)), v = Math.max(0.22, Math.min(0.6, h * 0.45)),
|
|
2171
|
+
const g = Math.max(0.24, Math.min(0.85, h * 0.55)), m = Math.max(0.55, Math.min(0.95, h + 0.2)), v = Math.max(0.22, Math.min(0.6, h * 0.45)), b = l, S = this.blend(b, a, m), I = this.contrastRatio(S, a), V = this.relativeLuminance(a) > 0.45 ? [
|
|
2172
2172
|
0,
|
|
2173
2173
|
0,
|
|
2174
2174
|
0
|
|
@@ -2176,7 +2176,7 @@ var ao = class Nn {
|
|
|
2176
2176
|
255,
|
|
2177
2177
|
255,
|
|
2178
2178
|
255
|
|
2179
|
-
], A = I >= 1.35 ?
|
|
2179
|
+
], A = I >= 1.35 ? b : V;
|
|
2180
2180
|
return {
|
|
2181
2181
|
wordHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${h})`,
|
|
2182
2182
|
sentenceHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${g})`,
|
|
@@ -2268,6 +2268,116 @@ var ao = class Nn {
|
|
|
2268
2268
|
text-underline-offset: 2px;
|
|
2269
2269
|
color: inherit;
|
|
2270
2270
|
}
|
|
2271
|
+
|
|
2272
|
+
/* The blocks below cover annotation swatches, print, and reduced motion.
|
|
2273
|
+
They deliberately do NOT retune the TTS layers: applyAdaptiveTTSStyle()
|
|
2274
|
+
writes the pie-tts custom properties inline on documentElement on every
|
|
2275
|
+
paint and on theme change, so a media query that only varies a var()
|
|
2276
|
+
fallback for those can never take effect. Annotation colours have no such
|
|
2277
|
+
adaptive path -- they are fixed swatches a student chose -- so a media
|
|
2278
|
+
query is the only way to adjust them, and each keeps its var() so a host
|
|
2279
|
+
override still wins.
|
|
2280
|
+
|
|
2281
|
+
The names above are spelled without their leading dashes on purpose.
|
|
2282
|
+
check-theme-tokens scans comments, and its token pattern stops at the
|
|
2283
|
+
first non-alphanumeric character, so writing the wildcard form reads as
|
|
2284
|
+
consumption of a shorter token that is not in the registry and fails the
|
|
2285
|
+
check. Spell property names in full, or omit the dashes. */
|
|
2286
|
+
|
|
2287
|
+
@media (prefers-color-scheme: dark) {
|
|
2288
|
+
::highlight(annotation-yellow) {
|
|
2289
|
+
background-color: var(--pie-annotation-yellow-highlight, rgba(139, 117, 0, 0.6));
|
|
2290
|
+
}
|
|
2291
|
+
::highlight(annotation-green) {
|
|
2292
|
+
background-color: var(--pie-annotation-green-highlight, rgba(45, 92, 63, 0.6));
|
|
2293
|
+
}
|
|
2294
|
+
::highlight(annotation-blue) {
|
|
2295
|
+
background-color: var(--pie-annotation-blue-highlight, rgba(0, 102, 170, 0.6));
|
|
2296
|
+
}
|
|
2297
|
+
::highlight(annotation-pink) {
|
|
2298
|
+
background-color: var(--pie-annotation-pink-highlight, rgba(139, 51, 74, 0.6));
|
|
2299
|
+
}
|
|
2300
|
+
::highlight(annotation-orange) {
|
|
2301
|
+
background-color: var(--pie-annotation-orange-highlight, rgba(154, 99, 0, 0.6));
|
|
2302
|
+
}
|
|
2303
|
+
::highlight(annotation-underline) {
|
|
2304
|
+
text-decoration-color: var(--pie-primary, #4da6ff);
|
|
2305
|
+
}
|
|
2306
|
+
}
|
|
2307
|
+
|
|
2308
|
+
/* WCAG 2.2 SC 1.4.11 non-text contrast: a highlight is the only indication
|
|
2309
|
+
that text is annotated, so the swatches saturate and the underline
|
|
2310
|
+
thickens when the user asks for more contrast.
|
|
2311
|
+
|
|
2312
|
+
The value is "more", not "high". The stylesheet this was recovered from
|
|
2313
|
+
used prefers-contrast: high, which is not a valid value for the feature
|
|
2314
|
+
-- the keywords are no-preference, more, less, custom. An invalid query
|
|
2315
|
+
evaluates to "not all", so that block could never have matched in any
|
|
2316
|
+
browser even had the file been loaded. Verified with matchMedia under
|
|
2317
|
+
emulation: "high" stays false where "more" flips true. */
|
|
2318
|
+
@media (prefers-contrast: more) {
|
|
2319
|
+
::highlight(annotation-yellow) {
|
|
2320
|
+
background-color: var(--pie-annotation-yellow-highlight, rgba(255, 255, 0, 0.7));
|
|
2321
|
+
}
|
|
2322
|
+
::highlight(annotation-green) {
|
|
2323
|
+
background-color: var(--pie-annotation-green-highlight, rgba(0, 255, 127, 0.7));
|
|
2324
|
+
}
|
|
2325
|
+
::highlight(annotation-blue) {
|
|
2326
|
+
background-color: var(--pie-annotation-blue-highlight, rgba(0, 191, 255, 0.7));
|
|
2327
|
+
}
|
|
2328
|
+
::highlight(annotation-pink) {
|
|
2329
|
+
background-color: var(--pie-annotation-pink-highlight, rgba(255, 105, 180, 0.7));
|
|
2330
|
+
}
|
|
2331
|
+
::highlight(annotation-orange) {
|
|
2332
|
+
background-color: var(--pie-annotation-orange-highlight, rgba(255, 165, 0, 0.85));
|
|
2333
|
+
}
|
|
2334
|
+
::highlight(annotation-underline) {
|
|
2335
|
+
text-decoration-thickness: 3px;
|
|
2336
|
+
}
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
@media print {
|
|
2340
|
+
/* TTS highlighting is a transient read-along cue, not content. */
|
|
2341
|
+
::highlight(tts-word),
|
|
2342
|
+
::highlight(tts-sentence),
|
|
2343
|
+
[data-pie-tts-word-element="true"],
|
|
2344
|
+
[data-pie-tts-sentence-element="true"] {
|
|
2345
|
+
background-color: transparent;
|
|
2346
|
+
text-decoration: none;
|
|
2347
|
+
text-shadow: none;
|
|
2348
|
+
border-bottom: none;
|
|
2349
|
+
}
|
|
2350
|
+
|
|
2351
|
+
/* Annotations are student work and must survive printing, but a fill
|
|
2352
|
+
that reads fine on screen can print as an illegible wash, so each
|
|
2353
|
+
becomes an underline that keeps its colour coding. */
|
|
2354
|
+
::highlight(annotation-yellow),
|
|
2355
|
+
::highlight(annotation-green),
|
|
2356
|
+
::highlight(annotation-blue),
|
|
2357
|
+
::highlight(annotation-pink),
|
|
2358
|
+
::highlight(annotation-orange) {
|
|
2359
|
+
background-color: transparent;
|
|
2360
|
+
border-bottom: 2px solid currentColor;
|
|
2361
|
+
}
|
|
2362
|
+
::highlight(annotation-yellow) { border-bottom-color: #ffeb3b; }
|
|
2363
|
+
::highlight(annotation-green) { border-bottom-color: #a6e1c5; }
|
|
2364
|
+
::highlight(annotation-blue) { border-bottom-color: #a7e0f6; }
|
|
2365
|
+
::highlight(annotation-pink) { border-bottom-color: #ff9fae; }
|
|
2366
|
+
::highlight(annotation-orange) { border-bottom-color: #ffa500; }
|
|
2367
|
+
::highlight(annotation-underline) {
|
|
2368
|
+
text-decoration-color: #000;
|
|
2369
|
+
border-bottom: none;
|
|
2370
|
+
}
|
|
2371
|
+
}
|
|
2372
|
+
|
|
2373
|
+
/* text-shadow is a direct property rather than a var(), so unlike the
|
|
2374
|
+
other TTS rules this one is not overridden by the adaptive path. */
|
|
2375
|
+
@media (prefers-reduced-motion: reduce) {
|
|
2376
|
+
::highlight(tts-word),
|
|
2377
|
+
[data-pie-tts-word-element="true"] {
|
|
2378
|
+
text-shadow: none;
|
|
2379
|
+
}
|
|
2380
|
+
}
|
|
2271
2381
|
`, document.head.appendChild(t);
|
|
2272
2382
|
}
|
|
2273
2383
|
highlightTTSWord(t, n, r) {
|
|
@@ -2341,7 +2451,7 @@ var ao = class Nn {
|
|
|
2341
2451
|
const r = `annotation-${this.nextAnnotationId++}`, i = t.cloneRange(), o = {
|
|
2342
2452
|
id: r,
|
|
2343
2453
|
range: i,
|
|
2344
|
-
type:
|
|
2454
|
+
type: W.ANNOTATION,
|
|
2345
2455
|
color: n,
|
|
2346
2456
|
timestamp: Date.now()
|
|
2347
2457
|
};
|
|
@@ -2402,16 +2512,16 @@ var ao = class Nn {
|
|
|
2402
2512
|
highlightRange(t, n, r = st.YELLOW) {
|
|
2403
2513
|
if (this.supported)
|
|
2404
2514
|
switch (n) {
|
|
2405
|
-
case
|
|
2406
|
-
case
|
|
2407
|
-
const i = n ===
|
|
2408
|
-
if (i && (i.clear(), i.add(t), n ===
|
|
2515
|
+
case W.TTS_WORD:
|
|
2516
|
+
case W.TTS_SENTENCE: {
|
|
2517
|
+
const i = n === W.TTS_WORD ? this.ttsWordHighlight : this.ttsSentenceHighlight;
|
|
2518
|
+
if (i && (i.clear(), i.add(t), n === W.TTS_WORD)) {
|
|
2409
2519
|
for (const o of this.ttsWordElementHighlights) o.removeAttribute("data-pie-tts-word-element");
|
|
2410
2520
|
this.ttsWordElementHighlights.clear(), this.highlightTTSWordElementFallbacks([t]);
|
|
2411
2521
|
}
|
|
2412
2522
|
break;
|
|
2413
2523
|
}
|
|
2414
|
-
case
|
|
2524
|
+
case W.ANNOTATION:
|
|
2415
2525
|
this.addAnnotation(t, r);
|
|
2416
2526
|
break;
|
|
2417
2527
|
}
|
|
@@ -2419,13 +2529,13 @@ var ao = class Nn {
|
|
|
2419
2529
|
clearHighlights(t) {
|
|
2420
2530
|
if (this.supported)
|
|
2421
2531
|
switch (t) {
|
|
2422
|
-
case
|
|
2532
|
+
case W.TTS_WORD:
|
|
2423
2533
|
this.clearTTSWord();
|
|
2424
2534
|
break;
|
|
2425
|
-
case
|
|
2535
|
+
case W.TTS_SENTENCE:
|
|
2426
2536
|
this.clearTTSSentence();
|
|
2427
2537
|
break;
|
|
2428
|
-
case
|
|
2538
|
+
case W.ANNOTATION:
|
|
2429
2539
|
this.clearAnnotations();
|
|
2430
2540
|
break;
|
|
2431
2541
|
}
|
|
@@ -2461,8 +2571,8 @@ var ao = class Nn {
|
|
|
2461
2571
|
}
|
|
2462
2572
|
}
|
|
2463
2573
|
};
|
|
2464
|
-
|
|
2465
|
-
|
|
2574
|
+
d(ao, "SENTENCE_FALLBACK_SELECTOR", "math, mjx-container, svg, img, canvas, [role='img']");
|
|
2575
|
+
d(ao, "WORD_FALLBACK_SELECTOR", "svg, img, canvas, [role='img']");
|
|
2466
2576
|
function lo(e) {
|
|
2467
2577
|
return (...t) => {
|
|
2468
2578
|
console.debug(`[${e}]`, ...t);
|
|
@@ -2483,7 +2593,7 @@ var vh = lo("I18nService"), Sn = {
|
|
|
2483
2593
|
function qe(e) {
|
|
2484
2594
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
2485
2595
|
}
|
|
2486
|
-
function
|
|
2596
|
+
function Ee(e, t) {
|
|
2487
2597
|
if (e == null) return [];
|
|
2488
2598
|
if (!Array.isArray(e)) throw new Error(`Invalid tools config at "${t}": expected an array of tool ids.`);
|
|
2489
2599
|
if (e.find((n) => typeof n != "string") !== void 0) throw new Error(`Invalid tools config at "${t}": all entries must be strings.`);
|
|
@@ -2521,7 +2631,7 @@ function co(e) {
|
|
|
2521
2631
|
const t = e.trim();
|
|
2522
2632
|
return t || "";
|
|
2523
2633
|
}
|
|
2524
|
-
function
|
|
2634
|
+
function Ae(e) {
|
|
2525
2635
|
if (!e || e.length === 0) return [];
|
|
2526
2636
|
const t = /* @__PURE__ */ new Set();
|
|
2527
2637
|
for (const n of e) {
|
|
@@ -2541,13 +2651,13 @@ function rl(e) {
|
|
|
2541
2651
|
if (e != null && !qe(e)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
|
|
2542
2652
|
const t = Za(e?.policy), n = Qa(e?.placement), r = tl(e?.providers), i = nl(e?.pnpEnforcement, "pnpEnforcement"), o = {
|
|
2543
2653
|
policy: {
|
|
2544
|
-
allowed: Ee(
|
|
2545
|
-
blocked: Ee(
|
|
2654
|
+
allowed: Ae(Ee(t?.allowed, "policy.allowed")),
|
|
2655
|
+
blocked: Ae(Ee(t?.blocked, "policy.blocked"))
|
|
2546
2656
|
},
|
|
2547
2657
|
placement: {
|
|
2548
|
-
section: Ee(
|
|
2549
|
-
item: Ee(
|
|
2550
|
-
passage: Ee(
|
|
2658
|
+
section: Ae(Ee(n?.section, "placement.section")).length ? Ae(Ee(n?.section, "placement.section")) : [..._n.section],
|
|
2659
|
+
item: Ae(Ee(n?.item, "placement.item")).length ? Ae(Ee(n?.item, "placement.item")) : [..._n.item],
|
|
2660
|
+
passage: Ae(Ee(n?.passage, "placement.passage")).length ? Ae(Ee(n?.passage, "placement.passage")) : [..._n.passage]
|
|
2551
2661
|
},
|
|
2552
2662
|
providers: r
|
|
2553
2663
|
};
|
|
@@ -2603,7 +2713,7 @@ function Nr(e) {
|
|
|
2603
2713
|
}
|
|
2604
2714
|
var al = class {
|
|
2605
2715
|
constructor() {
|
|
2606
|
-
|
|
2716
|
+
d(this, "tools", /* @__PURE__ */ new Map()), d(this, "pnpIndex", /* @__PURE__ */ new Map()), d(this, "componentOverrides", {}), d(this, "moduleLoaders", /* @__PURE__ */ new Map()), d(this, "loadedToolModules", /* @__PURE__ */ new Set()), d(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
|
|
2607
2717
|
}
|
|
2608
2718
|
normalizeToolId(e) {
|
|
2609
2719
|
return co(e);
|
|
@@ -2832,9 +2942,11 @@ function ul(e) {
|
|
|
2832
2942
|
"pie-multiple-choice",
|
|
2833
2943
|
"pie-inline-choice",
|
|
2834
2944
|
"pie-select-text",
|
|
2945
|
+
"pie-ebsr",
|
|
2835
2946
|
"multiple-choice",
|
|
2836
2947
|
"inline-choice",
|
|
2837
|
-
"select-text"
|
|
2948
|
+
"select-text",
|
|
2949
|
+
"ebsr"
|
|
2838
2950
|
];
|
|
2839
2951
|
if (ho(e)) {
|
|
2840
2952
|
const n = e.item.config;
|
|
@@ -2886,7 +2998,7 @@ function lr(e, t, n) {
|
|
|
2886
2998
|
}
|
|
2887
2999
|
var gl = class {
|
|
2888
3000
|
constructor() {
|
|
2889
|
-
|
|
3001
|
+
d(this, "providerId", "desmos-calculator"), d(this, "providerName", "Desmos Calculator"), d(this, "category", "calculator"), d(this, "version", "1.12"), d(this, "requiresAuth", !0), d(this, "desmosProvider", null), d(this, "config", null);
|
|
2890
3002
|
}
|
|
2891
3003
|
async emitTelemetry(e, t) {
|
|
2892
3004
|
try {
|
|
@@ -3008,14 +3120,14 @@ var gl = class {
|
|
|
3008
3120
|
if (a) return a;
|
|
3009
3121
|
}
|
|
3010
3122
|
return e[0] || null;
|
|
3011
|
-
},
|
|
3123
|
+
}, bl = (e) => !e.default, po = class {
|
|
3012
3124
|
constructor() {
|
|
3013
|
-
|
|
3125
|
+
d(this, "providerId", "browser"), d(this, "providerName", "Browser Speech Synthesis"), d(this, "version", "1.0.0");
|
|
3014
3126
|
}
|
|
3015
3127
|
async initialize(e) {
|
|
3016
3128
|
if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
|
|
3017
3129
|
if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
|
|
3018
|
-
return new
|
|
3130
|
+
return new yl(e);
|
|
3019
3131
|
}
|
|
3020
3132
|
supportsFeature(e) {
|
|
3021
3133
|
return !0;
|
|
@@ -3033,9 +3145,9 @@ var gl = class {
|
|
|
3033
3145
|
}
|
|
3034
3146
|
destroy() {
|
|
3035
3147
|
}
|
|
3036
|
-
},
|
|
3148
|
+
}, yl = class {
|
|
3037
3149
|
constructor(e) {
|
|
3038
|
-
|
|
3150
|
+
d(this, "utterance", null), d(this, "config", null), d(this, "_isPlaying", !1), d(this, "_isPaused", !1), d(this, "speakRunId", 0), d(this, "onWordBoundary", void 0), this.config = e;
|
|
3039
3151
|
}
|
|
3040
3152
|
async speak(e) {
|
|
3041
3153
|
if (!this.config) throw new Error("TTS not initialized");
|
|
@@ -3121,7 +3233,7 @@ var gl = class {
|
|
|
3121
3233
|
const o = new SpeechSynthesisUtterance(e);
|
|
3122
3234
|
this.utterance = o;
|
|
3123
3235
|
const s = vl(speechSynthesis.getVoices(), this.config?.voice);
|
|
3124
|
-
s &&
|
|
3236
|
+
s && bl(s) && (o.voice = s), this.config?.rate && (o.rate = this.config.rate), this.config?.pitch && (o.pitch = this.config.pitch);
|
|
3125
3237
|
const a = () => {
|
|
3126
3238
|
this.utterance === o && (this.utterance = null);
|
|
3127
3239
|
};
|
|
@@ -3184,7 +3296,7 @@ var gl = class {
|
|
|
3184
3296
|
}
|
|
3185
3297
|
}
|
|
3186
3298
|
constructor(e = "browser") {
|
|
3187
|
-
|
|
3299
|
+
d(this, "providerId", "tts-service"), d(this, "providerName", "Text-to-Speech"), d(this, "category", "tts"), d(this, "version", "1.0"), d(this, "requiresAuth", void 0), d(this, "ttsProvider", null), d(this, "config", null), this.requiresAuth = e !== "browser";
|
|
3188
3300
|
}
|
|
3189
3301
|
async initialize(e) {
|
|
3190
3302
|
if (this.ttsProvider) {
|
|
@@ -3325,7 +3437,7 @@ function xl(e) {
|
|
|
3325
3437
|
displayName: n === "scientific" ? "Scientific Calculator" : n === "basic" ? "Basic Calculator" : "Calculator"
|
|
3326
3438
|
};
|
|
3327
3439
|
}
|
|
3328
|
-
function
|
|
3440
|
+
function Br(e, t, n) {
|
|
3329
3441
|
const r = e;
|
|
3330
3442
|
t ? (r.calculatorType = t, e.setAttribute("calculator-type", t)) : (delete r.calculatorType, e.removeAttribute("calculator-type")), n && n.length > 0 ? r.availableTypes = n : delete r.availableTypes;
|
|
3331
3443
|
}
|
|
@@ -3363,7 +3475,7 @@ var Ol = {
|
|
|
3363
3475
|
},
|
|
3364
3476
|
renderToolbar(e, t) {
|
|
3365
3477
|
const { calculatorType: n, availableTypes: r, displayName: i } = xl(t), o = lr(this.toolId, t.scope.level, t.scope.scopeId), s = t.componentOverrides, a = Al(t.toolCoordinator, o), l = a ?? fe(this.toolId, e, t, s);
|
|
3366
|
-
a || Cl(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator,
|
|
3478
|
+
a || Cl(t.toolCoordinator, o, l), l.setAttribute("tool-id", o), l.toolkitCoordinator = t.toolkitCoordinator, Br(l, n, r);
|
|
3367
3479
|
const c = n === null ? "Open scientific calculator" : `Open ${i.toLowerCase()}`, u = n === null ? "Close scientific calculator" : `Close ${i.toLowerCase()}`, h = {
|
|
3368
3480
|
toolId: this.toolId,
|
|
3369
3481
|
label: i,
|
|
@@ -3400,7 +3512,7 @@ var Ol = {
|
|
|
3400
3512
|
button: h,
|
|
3401
3513
|
sync: () => {
|
|
3402
3514
|
const g = t.isToolVisible(o);
|
|
3403
|
-
h.active = g, h.label = i, h.ariaLabel = g ? u : c, h.tooltip = g ? `Close ${i.toLowerCase()}` : i, p !== g && (l.visible = g, p = g), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator),
|
|
3515
|
+
h.active = g, h.label = i, h.ariaLabel = g ? u : c, h.tooltip = g ? `Close ${i.toLowerCase()}` : i, p !== g && (l.visible = g, p = g), l.toolkitCoordinator !== t.toolkitCoordinator && (l.toolkitCoordinator = t.toolkitCoordinator), Br(l, n, r);
|
|
3404
3516
|
},
|
|
3405
3517
|
subscribeActive: (g) => t.subscribeVisibility ? t.subscribeVisibility(() => {
|
|
3406
3518
|
g(t.isToolVisible(o));
|
|
@@ -3427,7 +3539,7 @@ var Ol = {
|
|
|
3427
3539
|
n = n.parentElement;
|
|
3428
3540
|
}
|
|
3429
3541
|
return !1;
|
|
3430
|
-
},
|
|
3542
|
+
}, bo = (e, t, n) => {
|
|
3431
3543
|
if (!e || !t || /\s/.test(e) || /\s/.test(t)) return !1;
|
|
3432
3544
|
const r = n?.boundarySpacingMode ?? "segmenterPreferred";
|
|
3433
3545
|
if (r === "none") return !1;
|
|
@@ -3455,27 +3567,27 @@ var Ol = {
|
|
|
3455
3567
|
const p = u;
|
|
3456
3568
|
if (p.parentElement && !ft(p, e)) {
|
|
3457
3569
|
const g = p.textContent || "", m = g.match(/\S/), v = m ? m[0] : null;
|
|
3458
|
-
!o && !s &&
|
|
3459
|
-
for (let
|
|
3460
|
-
const S = g[
|
|
3570
|
+
!o && !s && bo(l, v, t) && (r.push(" "), a && n.set(i, a), i++, s = !0);
|
|
3571
|
+
for (let b = 0; b < g.length; b++) {
|
|
3572
|
+
const S = g[b], I = /\s/.test(S);
|
|
3461
3573
|
o ? I || (o = !1, r.push(S), n.set(i, {
|
|
3462
3574
|
node: p,
|
|
3463
|
-
offset:
|
|
3575
|
+
offset: b
|
|
3464
3576
|
}), a = {
|
|
3465
3577
|
node: p,
|
|
3466
|
-
offset:
|
|
3578
|
+
offset: b
|
|
3467
3579
|
}, i++, s = !1, l = S) : I ? (s || (r.push(" "), n.set(i, {
|
|
3468
3580
|
node: p,
|
|
3469
|
-
offset:
|
|
3581
|
+
offset: b
|
|
3470
3582
|
}), a = {
|
|
3471
3583
|
node: p,
|
|
3472
|
-
offset:
|
|
3584
|
+
offset: b
|
|
3473
3585
|
}, i++), s = !0) : (r.push(S), n.set(i, {
|
|
3474
3586
|
node: p,
|
|
3475
|
-
offset:
|
|
3587
|
+
offset: b
|
|
3476
3588
|
}), a = {
|
|
3477
3589
|
node: p,
|
|
3478
|
-
offset:
|
|
3590
|
+
offset: b
|
|
3479
3591
|
}, i++, s = !1, l = S);
|
|
3480
3592
|
}
|
|
3481
3593
|
}
|
|
@@ -3487,13 +3599,13 @@ var Ol = {
|
|
|
3487
3599
|
text: h,
|
|
3488
3600
|
map: n
|
|
3489
3601
|
};
|
|
3490
|
-
}, wn = null,
|
|
3602
|
+
}, wn = null, Wr = Promise.resolve(), Il = (e) => (e || "en").split("-")[0].toLowerCase() || "en", Ml = async () => (wn || (wn = import("./sre-Dddi65jB.js").then((e) => /* @__PURE__ */ as(e.default, 1)).then((e) => {
|
|
3491
3603
|
const t = e.default || e;
|
|
3492
3604
|
if (!t || typeof t.toSpeech != "function") throw new Error("speech-rule-engine did not expose toSpeech");
|
|
3493
3605
|
return t;
|
|
3494
|
-
})), wn), Rl = (e) => e === "en" ? "clearspeak" : "mathspeak",
|
|
3495
|
-
if (!
|
|
3496
|
-
const t =
|
|
3606
|
+
})), wn), Rl = (e) => e === "en" ? "clearspeak" : "mathspeak", Fr = (e) => !!e && typeof e == "object" && !Array.isArray(e), zr = (e) => typeof e == "string" && e.trim() ? e.trim() : void 0, mn = (e) => {
|
|
3607
|
+
if (!Fr(e)) return;
|
|
3608
|
+
const t = zr(e.domain), n = zr(e.style), r = Fr(e.engineOptions) ? e.engineOptions : void 0;
|
|
3497
3609
|
if (!(!t && !n && !r))
|
|
3498
3610
|
return {
|
|
3499
3611
|
...t ? { domain: t } : {},
|
|
@@ -3511,13 +3623,13 @@ var Ol = {
|
|
|
3511
3623
|
markup: n
|
|
3512
3624
|
}), await e.engineReady?.();
|
|
3513
3625
|
}, $l = async (e) => {
|
|
3514
|
-
const t =
|
|
3515
|
-
return
|
|
3626
|
+
const t = Wr.then(e, e);
|
|
3627
|
+
return Wr = t.then(() => {
|
|
3516
3628
|
}, () => {
|
|
3517
3629
|
}), t;
|
|
3518
|
-
},
|
|
3630
|
+
}, yo = async (e, t, n, r, i) => $l(async () => (await Ll(e, n, r, i), e.toSpeech(t))), Pl = (e) => e.replace(/^\s*<\?xml[^>]*\?>\s*/i, ""), Nl = async (e, t, n, r) => {
|
|
3519
3631
|
try {
|
|
3520
|
-
const i = Pl(await
|
|
3632
|
+
const i = Pl(await yo(e, t, n, "ssml", r));
|
|
3521
3633
|
return i.includes("<speak") ? i : null;
|
|
3522
3634
|
} catch (i) {
|
|
3523
3635
|
return console.debug("[TTSService] Math SSML generation failed; using plain", { message: i instanceof Error ? i.message : String(i) }), null;
|
|
@@ -3537,7 +3649,7 @@ var Ol = {
|
|
|
3537
3649
|
}
|
|
3538
3650
|
try {
|
|
3539
3651
|
n || (n = await o());
|
|
3540
|
-
const u = R(await
|
|
3652
|
+
const u = R(await yo(n, c.mathml, t.language, "none", t.mathSpeech));
|
|
3541
3653
|
if (u) {
|
|
3542
3654
|
s.push(u), r = !0;
|
|
3543
3655
|
continue;
|
|
@@ -3560,7 +3672,7 @@ var Ol = {
|
|
|
3560
3672
|
"expanding-row",
|
|
3561
3673
|
"floating-overlay",
|
|
3562
3674
|
"left-aligned"
|
|
3563
|
-
]),
|
|
3675
|
+
]), Bn = (e) => e && typeof e == "object" ? e : {}, Bl = (e) => e === "polly" || e === "google" || e === "server", Y = (e, t) => e === void 0 ? t : e, an = (e, t = "left-aligned") => typeof e == "string" && Hl.has(e) ? e : t, bh = Object.freeze([0.8, 1.25]), Dr = Object.freeze([
|
|
3564
3676
|
{
|
|
3565
3677
|
rate: 0.8,
|
|
3566
3678
|
label: "Slow",
|
|
@@ -3584,15 +3696,15 @@ var Ol = {
|
|
|
3584
3696
|
if (typeof e != "string") return;
|
|
3585
3697
|
const t = e.trim();
|
|
3586
3698
|
return t.length ? t : void 0;
|
|
3587
|
-
}, Vr = (e) => `${e}x`, So = (e, t) => e.toLowerCase() === "normal" ? "Normal speed" : t ? `Speed ${e}` : `${e} speed`,
|
|
3699
|
+
}, Vr = (e) => `${e}x`, So = (e, t) => e.toLowerCase() === "normal" ? "Normal speed" : t ? `Speed ${e}` : `${e} speed`, Wl = (e, t, n) => t ? t.toLowerCase().includes(e.toLowerCase()) ? t : `${e} ${t}` : So(e, n), jt = (e) => {
|
|
3588
3700
|
const t = Array.isArray(e) ? e : [...Dr];
|
|
3589
3701
|
if (t.length === 0) return [];
|
|
3590
3702
|
const n = /* @__PURE__ */ new Set(), r = [];
|
|
3591
3703
|
for (const s of t) {
|
|
3592
|
-
const a =
|
|
3704
|
+
const a = Bn(s), l = jr(typeof s == "number" ? s : a.rate);
|
|
3593
3705
|
if (l === void 0 || n.has(l)) continue;
|
|
3594
3706
|
n.add(l);
|
|
3595
|
-
const c = l === 1 ? "Normal" : Vr(l), u = typeof s == "number" ? c : qr(a.label) || c, h = typeof s == "number" ? l === 1 ? "Normal speed" : So(u, !0) :
|
|
3707
|
+
const c = l === 1 ? "Normal" : Vr(l), u = typeof s == "number" ? c : qr(a.label) || c, h = typeof s == "number" ? l === 1 ? "Normal speed" : So(u, !0) : Wl(u, qr(a.ariaLabel), u === c);
|
|
3596
3708
|
r.push({
|
|
3597
3709
|
rate: l,
|
|
3598
3710
|
label: u,
|
|
@@ -3617,44 +3729,44 @@ var Ol = {
|
|
|
3617
3729
|
...a,
|
|
3618
3730
|
isDefault: l === o
|
|
3619
3731
|
}));
|
|
3620
|
-
},
|
|
3732
|
+
}, yh = Object.freeze([
|
|
3621
3733
|
0.8,
|
|
3622
3734
|
1,
|
|
3623
3735
|
1.25
|
|
3624
|
-
]),
|
|
3736
|
+
]), Fl = (e) => {
|
|
3625
3737
|
const t = {
|
|
3626
3738
|
...e,
|
|
3627
3739
|
layoutMode: an(e.layoutMode)
|
|
3628
3740
|
}, n = e.backend || "browser";
|
|
3629
|
-
if (!
|
|
3741
|
+
if (!Bl(n)) return t;
|
|
3630
3742
|
const r = {
|
|
3631
3743
|
...t,
|
|
3632
|
-
apiEndpoint:
|
|
3633
|
-
transportMode:
|
|
3634
|
-
endpointValidationMode:
|
|
3635
|
-
validateEndpoint:
|
|
3636
|
-
includeAuthOnAssetFetch:
|
|
3637
|
-
rate:
|
|
3638
|
-
language:
|
|
3744
|
+
apiEndpoint: Y(t.apiEndpoint, "/api/tts"),
|
|
3745
|
+
transportMode: Y(t.transportMode, "pie"),
|
|
3746
|
+
endpointValidationMode: Y(t.endpointValidationMode, "voices"),
|
|
3747
|
+
validateEndpoint: Y(t.validateEndpoint, !0),
|
|
3748
|
+
includeAuthOnAssetFetch: Y(t.includeAuthOnAssetFetch, !1),
|
|
3749
|
+
rate: Y(t.rate, 1),
|
|
3750
|
+
language: Y(t.language, "en-US")
|
|
3639
3751
|
};
|
|
3640
3752
|
return n === "polly" ? {
|
|
3641
3753
|
...r,
|
|
3642
|
-
defaultVoice:
|
|
3643
|
-
engine:
|
|
3644
|
-
format:
|
|
3645
|
-
speechMarksMode:
|
|
3754
|
+
defaultVoice: Y(r.defaultVoice, "Joanna"),
|
|
3755
|
+
engine: Y(r.engine, "neural"),
|
|
3756
|
+
format: Y(r.format, "mp3"),
|
|
3757
|
+
speechMarksMode: Y(r.speechMarksMode, "word+sentence")
|
|
3646
3758
|
} : n === "google" ? {
|
|
3647
3759
|
...r,
|
|
3648
|
-
defaultVoice:
|
|
3760
|
+
defaultVoice: Y(r.defaultVoice, "en-US-Wavenet-A")
|
|
3649
3761
|
} : r;
|
|
3650
3762
|
}, kn = (e) => {
|
|
3651
|
-
const t =
|
|
3652
|
-
return
|
|
3763
|
+
const t = Bn(e), n = Bn(t.settings);
|
|
3764
|
+
return Fl({
|
|
3653
3765
|
...t,
|
|
3654
3766
|
...n
|
|
3655
3767
|
});
|
|
3656
|
-
},
|
|
3657
|
-
const t =
|
|
3768
|
+
}, Wn = (e) => e.backend || "browser", _o = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, wo = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), zl = (e) => {
|
|
3769
|
+
const t = Wn(e), n = _o(e, t), r = wo(e, n), i = mn(e.mathSpeech);
|
|
3658
3770
|
return {
|
|
3659
3771
|
voice: e.defaultVoice,
|
|
3660
3772
|
rate: e.rate,
|
|
@@ -3719,21 +3831,21 @@ var Ol = {
|
|
|
3719
3831
|
headerOverlay: { expandWhenToolActive: !0 }
|
|
3720
3832
|
};
|
|
3721
3833
|
}
|
|
3722
|
-
}, gt = /* @__PURE__ */ new Map(), jl = "__pieToolElementUnmount",
|
|
3834
|
+
}, gt = /* @__PURE__ */ new Map(), jl = "__pieToolElementUnmount", Ur = "pie-tool-active-change", ql = {
|
|
3723
3835
|
toolId: "textToSpeech",
|
|
3724
3836
|
name: "Text to Speech",
|
|
3725
3837
|
description: "Read content aloud",
|
|
3726
3838
|
icon: "volume-up",
|
|
3727
3839
|
provider: {
|
|
3728
3840
|
getProviderId: () => "tts",
|
|
3729
|
-
createProvider: (e) => new Tl(
|
|
3841
|
+
createProvider: (e) => new Tl(Wn(kn(e))),
|
|
3730
3842
|
getInitConfig: (e) => {
|
|
3731
|
-
const t = kn(e), n =
|
|
3843
|
+
const t = kn(e), n = Wn(t), r = _o(t, n);
|
|
3732
3844
|
return {
|
|
3733
3845
|
backend: n,
|
|
3734
3846
|
serverProvider: r,
|
|
3735
3847
|
transportMode: wo(t, r),
|
|
3736
|
-
...
|
|
3848
|
+
...zl(t)
|
|
3737
3849
|
};
|
|
3738
3850
|
},
|
|
3739
3851
|
getAuthFetcher: (e) => {
|
|
@@ -3787,8 +3899,8 @@ var Ol = {
|
|
|
3787
3899
|
const m = g.detail;
|
|
3788
3900
|
u(m?.active === !0);
|
|
3789
3901
|
};
|
|
3790
|
-
return h.addEventListener(
|
|
3791
|
-
h.removeEventListener(
|
|
3902
|
+
return h.addEventListener(Ur, p), () => {
|
|
3903
|
+
h.removeEventListener(Ur, p);
|
|
3792
3904
|
};
|
|
3793
3905
|
},
|
|
3794
3906
|
sync: () => {
|
|
@@ -3798,7 +3910,7 @@ var Ol = {
|
|
|
3798
3910
|
};
|
|
3799
3911
|
}
|
|
3800
3912
|
};
|
|
3801
|
-
function
|
|
3913
|
+
function Se(e, t) {
|
|
3802
3914
|
const n = lr(e, t.scope.level, t.scope.scopeId);
|
|
3803
3915
|
return {
|
|
3804
3916
|
fullToolId: n,
|
|
@@ -3809,7 +3921,7 @@ function Te(e, t) {
|
|
|
3809
3921
|
}
|
|
3810
3922
|
};
|
|
3811
3923
|
}
|
|
3812
|
-
function
|
|
3924
|
+
function _e(e) {
|
|
3813
3925
|
const t = e.isActive();
|
|
3814
3926
|
e.button.active = t, e.overlay.visible = t, e.onActiveChange?.(t);
|
|
3815
3927
|
}
|
|
@@ -3831,7 +3943,7 @@ var Vl = {
|
|
|
3831
3943
|
return pn(e);
|
|
3832
3944
|
},
|
|
3833
3945
|
renderToolbar(e, t) {
|
|
3834
|
-
const n =
|
|
3946
|
+
const n = Se(this.toolId, t), r = {
|
|
3835
3947
|
toolId: this.toolId,
|
|
3836
3948
|
label: this.name,
|
|
3837
3949
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -3849,7 +3961,7 @@ var Vl = {
|
|
|
3849
3961
|
mount: "after-buttons"
|
|
3850
3962
|
}],
|
|
3851
3963
|
sync: () => {
|
|
3852
|
-
|
|
3964
|
+
_e({
|
|
3853
3965
|
button: r,
|
|
3854
3966
|
overlay: o,
|
|
3855
3967
|
isActive: n.isActive
|
|
@@ -3858,7 +3970,7 @@ var Vl = {
|
|
|
3858
3970
|
subscribeActive: n.subscribeActive
|
|
3859
3971
|
};
|
|
3860
3972
|
}
|
|
3861
|
-
},
|
|
3973
|
+
}, Ul = {
|
|
3862
3974
|
toolId: "protractor",
|
|
3863
3975
|
name: "Protractor",
|
|
3864
3976
|
description: "On-screen protractor for angle measurements",
|
|
@@ -3873,7 +3985,7 @@ var Vl = {
|
|
|
3873
3985
|
return pn(e);
|
|
3874
3986
|
},
|
|
3875
3987
|
renderToolbar(e, t) {
|
|
3876
|
-
const n =
|
|
3988
|
+
const n = Se(this.toolId, t), r = {
|
|
3877
3989
|
toolId: this.toolId,
|
|
3878
3990
|
label: this.name,
|
|
3879
3991
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -3891,7 +4003,7 @@ var Vl = {
|
|
|
3891
4003
|
mount: "after-buttons"
|
|
3892
4004
|
}],
|
|
3893
4005
|
sync: () => {
|
|
3894
|
-
|
|
4006
|
+
_e({
|
|
3895
4007
|
button: r,
|
|
3896
4008
|
overlay: o,
|
|
3897
4009
|
isActive: n.isActive
|
|
@@ -3900,7 +4012,7 @@ var Vl = {
|
|
|
3900
4012
|
subscribeActive: n.subscribeActive
|
|
3901
4013
|
};
|
|
3902
4014
|
}
|
|
3903
|
-
},
|
|
4015
|
+
}, Gl = {
|
|
3904
4016
|
toolId: "answerEliminator",
|
|
3905
4017
|
name: "Answer Eliminator",
|
|
3906
4018
|
description: "Strike through answer choices",
|
|
@@ -3916,7 +4028,7 @@ var Vl = {
|
|
|
3916
4028
|
return ul(e);
|
|
3917
4029
|
},
|
|
3918
4030
|
renderToolbar(e, t) {
|
|
3919
|
-
const n =
|
|
4031
|
+
const n = Se(this.toolId, t), r = t.componentOverrides ?? {}, i = fe(this.toolId, e, t, r);
|
|
3920
4032
|
i.setAttribute("tool-id", n.fullToolId), i.setAttribute("strategy", "strikethrough"), i.setAttribute("button-alignment", "inline");
|
|
3921
4033
|
const o = {
|
|
3922
4034
|
toolId: this.toolId,
|
|
@@ -3936,7 +4048,7 @@ var Vl = {
|
|
|
3936
4048
|
mount: "after-buttons"
|
|
3937
4049
|
}],
|
|
3938
4050
|
sync: () => {
|
|
3939
|
-
|
|
4051
|
+
_e({
|
|
3940
4052
|
button: o,
|
|
3941
4053
|
overlay: i,
|
|
3942
4054
|
isActive: n.isActive
|
|
@@ -3968,7 +4080,7 @@ var Vl = {
|
|
|
3968
4080
|
return gn(e);
|
|
3969
4081
|
},
|
|
3970
4082
|
renderToolbar(e, t) {
|
|
3971
|
-
const n =
|
|
4083
|
+
const n = Se(this.toolId, t), r = {
|
|
3972
4084
|
toolId: this.toolId,
|
|
3973
4085
|
label: this.name,
|
|
3974
4086
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -3986,7 +4098,7 @@ var Vl = {
|
|
|
3986
4098
|
mount: "after-buttons"
|
|
3987
4099
|
}],
|
|
3988
4100
|
sync: () => {
|
|
3989
|
-
|
|
4101
|
+
_e({
|
|
3990
4102
|
button: r,
|
|
3991
4103
|
overlay: o,
|
|
3992
4104
|
isActive: n.isActive,
|
|
@@ -4020,7 +4132,7 @@ var Vl = {
|
|
|
4020
4132
|
return gn(e);
|
|
4021
4133
|
},
|
|
4022
4134
|
renderToolbar(e, t) {
|
|
4023
|
-
const n =
|
|
4135
|
+
const n = Se(this.toolId, t), r = {
|
|
4024
4136
|
toolId: this.toolId,
|
|
4025
4137
|
label: this.name,
|
|
4026
4138
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -4038,7 +4150,7 @@ var Vl = {
|
|
|
4038
4150
|
mount: "after-buttons"
|
|
4039
4151
|
}],
|
|
4040
4152
|
sync: () => {
|
|
4041
|
-
|
|
4153
|
+
_e({
|
|
4042
4154
|
button: r,
|
|
4043
4155
|
overlay: o,
|
|
4044
4156
|
isActive: n.isActive
|
|
@@ -4065,7 +4177,7 @@ var Vl = {
|
|
|
4065
4177
|
return !0;
|
|
4066
4178
|
},
|
|
4067
4179
|
renderToolbar(e, t) {
|
|
4068
|
-
const n =
|
|
4180
|
+
const n = Se(this.toolId, t), r = {
|
|
4069
4181
|
toolId: this.toolId,
|
|
4070
4182
|
label: this.name,
|
|
4071
4183
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -4093,7 +4205,7 @@ var Vl = {
|
|
|
4093
4205
|
}
|
|
4094
4206
|
}],
|
|
4095
4207
|
sync: () => {
|
|
4096
|
-
|
|
4208
|
+
_e({
|
|
4097
4209
|
button: r,
|
|
4098
4210
|
overlay: o,
|
|
4099
4211
|
isActive: n.isActive
|
|
@@ -4126,7 +4238,7 @@ var Vl = {
|
|
|
4126
4238
|
return gn(e);
|
|
4127
4239
|
},
|
|
4128
4240
|
renderToolbar(e, t) {
|
|
4129
|
-
const n =
|
|
4241
|
+
const n = Se(this.toolId, t), r = {
|
|
4130
4242
|
toolId: this.toolId,
|
|
4131
4243
|
label: this.name,
|
|
4132
4244
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -4144,7 +4256,7 @@ var Vl = {
|
|
|
4144
4256
|
mount: "after-buttons"
|
|
4145
4257
|
}],
|
|
4146
4258
|
sync: () => {
|
|
4147
|
-
|
|
4259
|
+
_e({
|
|
4148
4260
|
button: r,
|
|
4149
4261
|
overlay: o,
|
|
4150
4262
|
isActive: n.isActive
|
|
@@ -4169,7 +4281,7 @@ var Vl = {
|
|
|
4169
4281
|
return pn(e);
|
|
4170
4282
|
},
|
|
4171
4283
|
renderToolbar(e, t) {
|
|
4172
|
-
const n =
|
|
4284
|
+
const n = Se(this.toolId, t), r = {
|
|
4173
4285
|
toolId: this.toolId,
|
|
4174
4286
|
label: this.name,
|
|
4175
4287
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -4197,7 +4309,7 @@ var Vl = {
|
|
|
4197
4309
|
}
|
|
4198
4310
|
}],
|
|
4199
4311
|
sync: () => {
|
|
4200
|
-
|
|
4312
|
+
_e({
|
|
4201
4313
|
button: r,
|
|
4202
4314
|
overlay: o,
|
|
4203
4315
|
isActive: n.isActive
|
|
@@ -4221,7 +4333,7 @@ var Vl = {
|
|
|
4221
4333
|
return hl(e);
|
|
4222
4334
|
},
|
|
4223
4335
|
renderToolbar(e, t) {
|
|
4224
|
-
const n =
|
|
4336
|
+
const n = Se(this.toolId, t), r = {
|
|
4225
4337
|
toolId: this.toolId,
|
|
4226
4338
|
label: this.name,
|
|
4227
4339
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -4249,7 +4361,7 @@ var Vl = {
|
|
|
4249
4361
|
}
|
|
4250
4362
|
}],
|
|
4251
4363
|
sync: () => {
|
|
4252
|
-
|
|
4364
|
+
_e({
|
|
4253
4365
|
button: r,
|
|
4254
4366
|
overlay: o,
|
|
4255
4367
|
isActive: n.isActive
|
|
@@ -4262,8 +4374,8 @@ var Vl = {
|
|
|
4262
4374
|
Ol,
|
|
4263
4375
|
ql,
|
|
4264
4376
|
Vl,
|
|
4265
|
-
Gl,
|
|
4266
4377
|
Ul,
|
|
4378
|
+
Gl,
|
|
4267
4379
|
Kl,
|
|
4268
4380
|
Xl,
|
|
4269
4381
|
Yl,
|
|
@@ -4418,10 +4530,10 @@ var oc = ic(), Th = {
|
|
|
4418
4530
|
itemGlossary: "itemGlossary",
|
|
4419
4531
|
tutorialAvailable: "tutorialAvailable"
|
|
4420
4532
|
}
|
|
4421
|
-
}, Sh = Object.values(sc).flatMap((e) => Object.values(e)), _h = lo("ToolCoordinator"),
|
|
4533
|
+
}, Sh = Object.values(sc).flatMap((e) => Object.values(e)), _h = lo("ToolCoordinator"), Fn;
|
|
4422
4534
|
(function(e) {
|
|
4423
4535
|
e[e.BASE = 0] = "BASE", e[e.TOOL = 1e3] = "TOOL", e[e.MODAL = 2e3] = "MODAL", e[e.CONTROL = 3e3] = "CONTROL", e[e.HIGHLIGHT = 4e3] = "HIGHLIGHT";
|
|
4424
|
-
})(
|
|
4536
|
+
})(Fn || (Fn = {}));
|
|
4425
4537
|
var ac = /* @__PURE__ */ new Set([
|
|
4426
4538
|
"speak",
|
|
4427
4539
|
"p",
|
|
@@ -4431,7 +4543,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4431
4543
|
"say-as",
|
|
4432
4544
|
"voice",
|
|
4433
4545
|
"lang"
|
|
4434
|
-
]),
|
|
4546
|
+
]), Gr = /* @__PURE__ */ new Set(["audio", "phoneme"]), Eo = (e) => e.replace(/"/g, '"').replace(/'/g, "'").replace(/</g, "<").replace(/>/g, ">").replace(/ /g, " ").replace(/ /g, " ").replace(/&/g, "&"), qt = (e, t, n) => {
|
|
4435
4547
|
for (let r = 0; r < t.length; r++) e.push({
|
|
4436
4548
|
char: t[r],
|
|
4437
4549
|
rawOffset: n === null ? null : n + r
|
|
@@ -4501,11 +4613,11 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4501
4613
|
Kr(t), i = a + 1;
|
|
4502
4614
|
continue;
|
|
4503
4615
|
}
|
|
4504
|
-
if (!u &&
|
|
4616
|
+
if (!u && Gr.has(c) && (n = !0, h)) {
|
|
4505
4617
|
i = a + 1;
|
|
4506
4618
|
continue;
|
|
4507
4619
|
}
|
|
4508
|
-
c && !ac.has(c) && !
|
|
4620
|
+
c && !ac.has(c) && !Gr.has(c) && c !== "break" && c !== "sub" && (n = !0), !u && (c === "p" || c === "s") && Kr(t), i = a + 1;
|
|
4509
4621
|
}
|
|
4510
4622
|
const o = cc(t);
|
|
4511
4623
|
return {
|
|
@@ -4601,7 +4713,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4601
4713
|
visible: "+",
|
|
4602
4714
|
score: 5
|
|
4603
4715
|
}
|
|
4604
|
-
],
|
|
4716
|
+
], zn = (e) => {
|
|
4605
4717
|
const t = [];
|
|
4606
4718
|
for (const n of e.matchAll(dc)) {
|
|
4607
4719
|
const r = n[0], i = n.index ?? 0;
|
|
@@ -4670,7 +4782,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4670
4782
|
const r = e.length / Math.max(1, Math.min(t.length, n.length)), i = e.reduce((o, s) => o + s.score, 0) / e.length / 10;
|
|
4671
4783
|
return Math.min(1, r * i);
|
|
4672
4784
|
}, xo = (e) => {
|
|
4673
|
-
const t = Ao(e.speechText), n = R(e.visibleText), r = t.spokenText, i =
|
|
4785
|
+
const t = Ao(e.speechText), n = R(e.visibleText), r = t.spokenText, i = zn(r), o = zn(n), s = t.unsupportedSemantic ? [] : gc(i, o), a = mc(s, i, o), l = r === n && r.length > 0, c = s.length === 1 && s[0].score === 10 && i.length <= 2 && o.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (s.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", h = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
|
|
4674
4786
|
return {
|
|
4675
4787
|
speechText: e.speechText,
|
|
4676
4788
|
spokenText: r,
|
|
@@ -4685,7 +4797,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4685
4797
|
};
|
|
4686
4798
|
}, hr = (e, t) => e.find((n) => n.start <= t && t < n.end) || null, Oo = (e) => {
|
|
4687
4799
|
if (!e || /^<[^>]+>$/.test(e.trim())) return null;
|
|
4688
|
-
const t =
|
|
4800
|
+
const t = zn(e)[0];
|
|
4689
4801
|
return t ? Co.get(t.normalized) || t.normalized : null;
|
|
4690
4802
|
}, Xr = (e, t, n) => {
|
|
4691
4803
|
const r = Oo(n);
|
|
@@ -4730,7 +4842,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4730
4842
|
return o || s;
|
|
4731
4843
|
}
|
|
4732
4844
|
return Qr(e, t, i) || Jr(e, t, i);
|
|
4733
|
-
},
|
|
4845
|
+
}, bc = (e, t) => {
|
|
4734
4846
|
if (e.playbackMode === "region-fallback") return null;
|
|
4735
4847
|
const n = e.anchors.find((o) => o.spokenStart <= t && t < o.spokenEnd);
|
|
4736
4848
|
if (n) return {
|
|
@@ -4752,7 +4864,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4752
4864
|
start: Math.min(r.visibleStart, i.visibleStart),
|
|
4753
4865
|
end: Math.max(r.visibleEnd, i.visibleEnd)
|
|
4754
4866
|
} : null;
|
|
4755
|
-
},
|
|
4867
|
+
}, yc = /* @__PURE__ */ new Map([
|
|
4756
4868
|
["+", ["plus"]],
|
|
4757
4869
|
["-", ["minus", "negative"]],
|
|
4758
4870
|
["−", ["minus", "negative"]],
|
|
@@ -4811,7 +4923,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4811
4923
|
default:
|
|
4812
4924
|
return "unknown";
|
|
4813
4925
|
}
|
|
4814
|
-
}, Ec = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), Ac = (e, t, n) => n === "fraction" ? ["over", "divided by"] : n === "superscript" ? Io.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ?
|
|
4926
|
+
}, Ec = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), Ac = (e, t, n) => n === "fraction" ? ["over", "divided by"] : n === "superscript" ? Io.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? yc.get(e) || [] : [], Ke = (e) => {
|
|
4815
4927
|
const t = e.normalized ?? Ec(e.text, e.kind || "unknown");
|
|
4816
4928
|
return {
|
|
4817
4929
|
id: `math-token-${e.state.nextId++}`,
|
|
@@ -4828,10 +4940,10 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4828
4940
|
}, Xe = (e, t, n = "tokens") => {
|
|
4829
4941
|
e[n].push(t);
|
|
4830
4942
|
}, Mo = (e, t, n) => {
|
|
4831
|
-
ut(e).forEach((r, i) =>
|
|
4943
|
+
ut(e).forEach((r, i) => Te(r, t, `${n}/${Ve(r)}[${i}]`));
|
|
4832
4944
|
}, Cc = (e, t, n) => {
|
|
4833
4945
|
const r = ut(e);
|
|
4834
|
-
r[0] &&
|
|
4946
|
+
r[0] && Te(r[0], t, `${n}/numerator`), Xe(t, Ke({
|
|
4835
4947
|
state: t,
|
|
4836
4948
|
kind: "structure",
|
|
4837
4949
|
role: "fraction",
|
|
@@ -4839,7 +4951,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4839
4951
|
sourceElement: e,
|
|
4840
4952
|
path: n,
|
|
4841
4953
|
target: ye(e, "element-range")
|
|
4842
|
-
})), r[1] &&
|
|
4954
|
+
})), r[1] && Te(r[1], t, `${n}/denominator`);
|
|
4843
4955
|
}, xc = (e, t, n) => {
|
|
4844
4956
|
const r = e.getAttribute("open") || "(", i = e.getAttribute("close") || ")";
|
|
4845
4957
|
Xe(t, Ke({
|
|
@@ -4861,7 +4973,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4861
4973
|
}));
|
|
4862
4974
|
}, Oc = (e, t, n) => {
|
|
4863
4975
|
const r = ut(e);
|
|
4864
|
-
r[0] &&
|
|
4976
|
+
r[0] && Te(r[0], t, `${n}/base`);
|
|
4865
4977
|
const i = r[1];
|
|
4866
4978
|
if (!i) return;
|
|
4867
4979
|
const o = dr(i);
|
|
@@ -4878,7 +4990,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4878
4990
|
}));
|
|
4879
4991
|
return;
|
|
4880
4992
|
}
|
|
4881
|
-
|
|
4993
|
+
Te(i, t, `${n}/exponent`);
|
|
4882
4994
|
}, Ic = (e, t, n, r) => {
|
|
4883
4995
|
Xe(t, Ke({
|
|
4884
4996
|
state: t,
|
|
@@ -4902,7 +5014,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4902
5014
|
sourceElement: i,
|
|
4903
5015
|
path: `${n}/row[${r}]`,
|
|
4904
5016
|
target: ye(i, "region-fallback")
|
|
4905
|
-
}), "layoutTargets")),
|
|
5017
|
+
}), "layoutTargets")), Te(i, t, `${n}/${Ve(i)}[${r}]`);
|
|
4906
5018
|
}, Rc = (e, t, n) => {
|
|
4907
5019
|
const r = dr(e);
|
|
4908
5020
|
if (!r) return;
|
|
@@ -4917,7 +5029,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4917
5029
|
target: o && e.parentElement ? ye(e.parentElement, "region-fallback") : void 0,
|
|
4918
5030
|
optional: !!o || s === "grouping-fence"
|
|
4919
5031
|
}));
|
|
4920
|
-
},
|
|
5032
|
+
}, Te = (e, t, n) => {
|
|
4921
5033
|
const r = Ve(e);
|
|
4922
5034
|
switch (r) {
|
|
4923
5035
|
case "annotation":
|
|
@@ -4928,7 +5040,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4928
5040
|
const s = Ve(o);
|
|
4929
5041
|
return s !== "annotation" && s !== "annotation-xml";
|
|
4930
5042
|
});
|
|
4931
|
-
i &&
|
|
5043
|
+
i && Te(i, t, `${n}/presentation`);
|
|
4932
5044
|
return;
|
|
4933
5045
|
}
|
|
4934
5046
|
case "mi":
|
|
@@ -4955,7 +5067,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4955
5067
|
return;
|
|
4956
5068
|
case "maction": {
|
|
4957
5069
|
const i = ut(e)[0];
|
|
4958
|
-
i &&
|
|
5070
|
+
i && Te(i, t, `${n}/action`);
|
|
4959
5071
|
return;
|
|
4960
5072
|
}
|
|
4961
5073
|
default: {
|
|
@@ -4973,7 +5085,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
4973
5085
|
layoutTargets: [],
|
|
4974
5086
|
nextId: 0
|
|
4975
5087
|
};
|
|
4976
|
-
return
|
|
5088
|
+
return Te(e, t, "/math"), {
|
|
4977
5089
|
tokens: t.tokens,
|
|
4978
5090
|
layoutTargets: t.layoutTargets,
|
|
4979
5091
|
expressionTarget: ye(e, "region-fallback")
|
|
@@ -5029,23 +5141,23 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5029
5141
|
}
|
|
5030
5142
|
}
|
|
5031
5143
|
return n;
|
|
5032
|
-
},
|
|
5144
|
+
}, Bc = (e, t, n) => {
|
|
5033
5145
|
const r = n.filter((s) => !s.optional).length, i = e.filter((s) => !s.math.optional).length, o = e.reduce((s, a) => s + a.speechTokens.length, 0);
|
|
5034
5146
|
return r > 0 && i === r && o === t.length;
|
|
5035
|
-
},
|
|
5147
|
+
}, Wc = (e) => e.map(({ speechTokens: t, math: n }) => ({
|
|
5036
5148
|
speechTokenIds: t.map((r) => r.id),
|
|
5037
5149
|
mathTokenIds: [n.id],
|
|
5038
5150
|
score: 1,
|
|
5039
5151
|
confidence: 1,
|
|
5040
5152
|
target: n.target
|
|
5041
|
-
})),
|
|
5042
|
-
const t = e.minExactWordConfidence ?? Pc, n = Hc(e.speech.tokens, e.math.tokens), r =
|
|
5153
|
+
})), Fc = (e) => {
|
|
5154
|
+
const t = e.minExactWordConfidence ?? Pc, n = Hc(e.speech.tokens, e.math.tokens), r = Bc(n, e.speech.tokens, e.math.tokens) ? 1 : 0;
|
|
5043
5155
|
return {
|
|
5044
|
-
segments: r >= t ?
|
|
5156
|
+
segments: r >= t ? Wc(n) : [],
|
|
5045
5157
|
confidence: r,
|
|
5046
5158
|
fallbackTarget: e.math.expressionTarget
|
|
5047
5159
|
};
|
|
5048
|
-
}, Ro = mo(),
|
|
5160
|
+
}, Ro = mo(), zc = /* @__PURE__ */ new Map([
|
|
5049
5161
|
["zero", "0"],
|
|
5050
5162
|
["one", "1"],
|
|
5051
5163
|
["two", "2"],
|
|
@@ -5059,7 +5171,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5059
5171
|
["ten", "10"]
|
|
5060
5172
|
]), Lo = (e) => {
|
|
5061
5173
|
const t = e.toLowerCase();
|
|
5062
|
-
return
|
|
5174
|
+
return zc.get(t) || t;
|
|
5063
5175
|
}, Dc = (e) => {
|
|
5064
5176
|
const t = [];
|
|
5065
5177
|
for (const n of e.matchAll(Ro)) {
|
|
@@ -5122,7 +5234,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5122
5234
|
...r,
|
|
5123
5235
|
confidence: 1
|
|
5124
5236
|
} : e.boundaryWord && fr(e.boundaryWord) ? null : e.tokenization.boundaryOffsetSpace === "raw-ssml" ? n || r : r || n;
|
|
5125
|
-
},
|
|
5237
|
+
}, Uc = (e) => {
|
|
5126
5238
|
if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
|
|
5127
5239
|
const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), n = jn(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
|
|
5128
5240
|
return qn(n, e.boundaryWord) ? {
|
|
@@ -5134,13 +5246,13 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5134
5246
|
return {
|
|
5135
5247
|
speech: t,
|
|
5136
5248
|
math: n,
|
|
5137
|
-
result:
|
|
5249
|
+
result: Fc({
|
|
5138
5250
|
speech: t,
|
|
5139
5251
|
math: n
|
|
5140
5252
|
})
|
|
5141
5253
|
};
|
|
5142
|
-
},
|
|
5143
|
-
const n =
|
|
5254
|
+
}, Gc = (e, t) => {
|
|
5255
|
+
const n = Uc({
|
|
5144
5256
|
tokenization: e.speech,
|
|
5145
5257
|
position: t.position,
|
|
5146
5258
|
length: t.length,
|
|
@@ -5290,7 +5402,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5290
5402
|
lastCharWasWhitespace: !1,
|
|
5291
5403
|
lastMapped: null,
|
|
5292
5404
|
options: e
|
|
5293
|
-
}), Ho = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container",
|
|
5405
|
+
}), Ho = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", Bo = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", Wo = (e) => {
|
|
5294
5406
|
const t = e.tagName?.toLowerCase();
|
|
5295
5407
|
return t === "annotation" || t === "annotation-xml";
|
|
5296
5408
|
}, tu = (e) => {
|
|
@@ -5349,11 +5461,11 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5349
5461
|
return r || t;
|
|
5350
5462
|
}, au = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || Ho(e), He = (e, t, n) => {
|
|
5351
5463
|
/[.,;:!?]/.test(t) && e.chars.length > 0 && e.chars[e.chars.length - 1] === " " && (e.chars.pop(), e.position--, e.map.delete(e.position)), e.chars.push(t), n ? (e.map.set(e.position, n), e.lastMapped = n) : e.lastMapped && e.map.set(e.position, e.lastMapped), e.position++;
|
|
5352
|
-
},
|
|
5464
|
+
}, Fo = (e, t) => {
|
|
5353
5465
|
if (e.inLeadingWhitespace || e.lastCharWasWhitespace || e.chars.length === 0) return !1;
|
|
5354
5466
|
const n = e.chars[e.chars.length - 1];
|
|
5355
|
-
return
|
|
5356
|
-
},
|
|
5467
|
+
return bo(n, t, e.options);
|
|
5468
|
+
}, zo = (e, t) => {
|
|
5357
5469
|
const n = t.textContent || "";
|
|
5358
5470
|
let r = !1;
|
|
5359
5471
|
for (let i = 0; i < n.length; i++) {
|
|
@@ -5372,7 +5484,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5372
5484
|
}), e.lastCharWasWhitespace = !0;
|
|
5373
5485
|
continue;
|
|
5374
5486
|
}
|
|
5375
|
-
!r &&
|
|
5487
|
+
!r && Fo(e, o) && He(e, " ", {
|
|
5376
5488
|
node: t,
|
|
5377
5489
|
offset: i
|
|
5378
5490
|
}), He(e, o, {
|
|
@@ -5397,7 +5509,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5397
5509
|
e.lastCharWasWhitespace || He(e, " ", l), e.lastCharWasWhitespace = !0;
|
|
5398
5510
|
continue;
|
|
5399
5511
|
}
|
|
5400
|
-
n === 0 &&
|
|
5512
|
+
n === 0 && Fo(e, r) && He(e, " ", l), He(e, r, l), e.lastCharWasWhitespace = !1, o ? (e.map.set(e.position - 1, {
|
|
5401
5513
|
node: o.node,
|
|
5402
5514
|
offset: o.offset
|
|
5403
5515
|
}), e.lastMapped = {
|
|
@@ -5420,7 +5532,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5420
5532
|
}
|
|
5421
5533
|
if (i.nodeType !== 1) return;
|
|
5422
5534
|
const o = i;
|
|
5423
|
-
if (!
|
|
5535
|
+
if (!Wo(o))
|
|
5424
5536
|
for (const s of Array.from(o.childNodes)) r(s);
|
|
5425
5537
|
};
|
|
5426
5538
|
return r(t.documentElement), R(n.join(" "));
|
|
@@ -5428,12 +5540,12 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5428
5540
|
const r = No(n), i = (a) => {
|
|
5429
5541
|
if (ft(a, e)) return;
|
|
5430
5542
|
if (a.nodeType === 3) {
|
|
5431
|
-
|
|
5543
|
+
zo(r, a);
|
|
5432
5544
|
return;
|
|
5433
5545
|
}
|
|
5434
5546
|
if (a.nodeType !== 1) return;
|
|
5435
5547
|
const l = a;
|
|
5436
|
-
if (!(
|
|
5548
|
+
if (!(Bo(l) || Wo(l)))
|
|
5437
5549
|
for (const c of Array.from(l.childNodes)) i(c);
|
|
5438
5550
|
};
|
|
5439
5551
|
i(e), Do(r);
|
|
@@ -5464,12 +5576,12 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5464
5576
|
if (ft(u, e)) return;
|
|
5465
5577
|
if (u.nodeType === Node.TEXT_NODE) {
|
|
5466
5578
|
const g = su(u, e);
|
|
5467
|
-
o && g !== o && a(), o = g,
|
|
5579
|
+
o && g !== o && a(), o = g, zo(n, u);
|
|
5468
5580
|
return;
|
|
5469
5581
|
}
|
|
5470
5582
|
if (u.nodeType !== Node.ELEMENT_NODE) return;
|
|
5471
5583
|
const h = u;
|
|
5472
|
-
if (
|
|
5584
|
+
if (Bo(h)) return;
|
|
5473
5585
|
const p = ru(h);
|
|
5474
5586
|
if (p) {
|
|
5475
5587
|
a();
|
|
@@ -5496,7 +5608,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5496
5608
|
chunks: r,
|
|
5497
5609
|
containsMathMarkup: s
|
|
5498
5610
|
};
|
|
5499
|
-
},
|
|
5611
|
+
}, yt = (e, t) => {
|
|
5500
5612
|
if (!au(e)) {
|
|
5501
5613
|
const { text: n, map: r } = sn(e, t);
|
|
5502
5614
|
return {
|
|
@@ -5549,14 +5661,14 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5549
5661
|
for (const m of g) {
|
|
5550
5662
|
const v = R(m.text);
|
|
5551
5663
|
if (!v) continue;
|
|
5552
|
-
const
|
|
5664
|
+
const b = o(v);
|
|
5553
5665
|
r.push({
|
|
5554
5666
|
sourceChunkIndex: a,
|
|
5555
5667
|
segment: {
|
|
5556
5668
|
kind: "prose",
|
|
5557
5669
|
spokenText: v,
|
|
5558
5670
|
visibleText: v,
|
|
5559
|
-
visibleSpan:
|
|
5671
|
+
visibleSpan: b
|
|
5560
5672
|
}
|
|
5561
5673
|
}), s.push(v);
|
|
5562
5674
|
}
|
|
@@ -5586,7 +5698,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5586
5698
|
visibleText: n,
|
|
5587
5699
|
plainSpeechText: R(s.join(" "))
|
|
5588
5700
|
};
|
|
5589
|
-
},
|
|
5701
|
+
}, bu = (e) => (e || "en").split("-")[0].toLowerCase() || "en", yu = "sre-v1", Tu = 256, Un = (e) => Array.isArray(e) ? `array:[${e.map(Un).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [n]) => t.localeCompare(n)).map(([t, n]) => `${JSON.stringify(t)}:${Un(n)}`).join(",")}}` : e === null ? "null:null" : typeof e > "u" ? "undefined:" : typeof e == "function" ? `function:${e.name || "anonymous"}` : typeof e == "symbol" ? `symbol:${String(e)}` : typeof e == "bigint" ? `bigint:${e.toString()}` : typeof e == "number" ? Number.isFinite(e) ? `number:${e}` : `number:${String(e)}` : `${typeof e}:${JSON.stringify(e)}`, ei = (e, t, n, r) => `${yu}\0${bu(e)}\0${t ? "ssml" : "plain"}\0${Un(n ?? null)}\0${r}`, Su = (e = {}) => {
|
|
5590
5702
|
const t = Math.max(1, e.maxEntries ?? Tu), n = e.resolve ?? ((o, s) => To([o], s)), r = /* @__PURE__ */ new Map(), i = (o, s) => {
|
|
5591
5703
|
for (r.delete(o), r.set(o, s); r.size > t; ) {
|
|
5592
5704
|
const a = r.keys().next().value;
|
|
@@ -5696,7 +5808,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5696
5808
|
["mn", "mjx-mn"],
|
|
5697
5809
|
["mo", "mjx-mo"],
|
|
5698
5810
|
["mtext", "mjx-mtext"]
|
|
5699
|
-
]),
|
|
5811
|
+
]), Gn = "mi,mn,mo,mtext", qo = "mjx-mi,mjx-mn,mjx-mo,mjx-mtext", Vo = [
|
|
5700
5812
|
"mjx-mfrac",
|
|
5701
5813
|
"mjx-msqrt",
|
|
5702
5814
|
"mjx-mroot",
|
|
@@ -5704,14 +5816,14 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5704
5816
|
"mjx-munder",
|
|
5705
5817
|
"mjx-mover",
|
|
5706
5818
|
"mjx-munderover"
|
|
5707
|
-
].join(","),
|
|
5819
|
+
].join(","), Uo = (e) => e.type === "text-range" ? e.node.parentElement : e.element, vn = (e) => {
|
|
5708
5820
|
let t = e;
|
|
5709
5821
|
for (; t; ) {
|
|
5710
5822
|
if (t.localName?.toLowerCase() === "mjx-container") return t;
|
|
5711
5823
|
t = t.parentElement;
|
|
5712
5824
|
}
|
|
5713
5825
|
return null;
|
|
5714
|
-
}, ti = (e) => !e || vn(e) ? !1 : !ft(e),
|
|
5826
|
+
}, ti = (e) => !e || vn(e) ? !1 : !ft(e), Go = (e) => {
|
|
5715
5827
|
const t = e.getBoundingClientRect?.();
|
|
5716
5828
|
return !!(t && t.width > 0 && t.height > 0);
|
|
5717
5829
|
}, Kn = (e) => {
|
|
@@ -5732,25 +5844,25 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5732
5844
|
if (!e || !jo.has(e.localName.toLowerCase()) || t.querySelector(Vo)) return null;
|
|
5733
5845
|
const n = Kn(e), r = t.querySelector("mjx-math");
|
|
5734
5846
|
if (!n || !r) return null;
|
|
5735
|
-
const i = Array.from(n.querySelectorAll(
|
|
5847
|
+
const i = Array.from(n.querySelectorAll(Gn)), o = i.indexOf(e);
|
|
5736
5848
|
if (o < 0) return null;
|
|
5737
5849
|
const s = Array.from(r.querySelectorAll(qo));
|
|
5738
5850
|
if (!Ko(i, s)) return null;
|
|
5739
5851
|
const a = s[o];
|
|
5740
|
-
return !a || !
|
|
5852
|
+
return !a || !Go(a) ? null : a;
|
|
5741
5853
|
}, Cu = (e) => {
|
|
5742
5854
|
const t = vn(e);
|
|
5743
5855
|
if (t) {
|
|
5744
5856
|
if (t.querySelector(Vo)) return "expression";
|
|
5745
5857
|
const r = Kn(e) ?? e, i = t.querySelector("mjx-math");
|
|
5746
5858
|
if (!i) return "expression";
|
|
5747
|
-
const o = Array.from(r.querySelectorAll(
|
|
5748
|
-
return Ko(o, s) && s.some((a) =>
|
|
5859
|
+
const o = Array.from(r.querySelectorAll(Gn)), s = Array.from(i.querySelectorAll(qo));
|
|
5860
|
+
return Ko(o, s) && s.some((a) => Go(a)) ? "token" : "expression";
|
|
5749
5861
|
}
|
|
5750
5862
|
const n = Kn(e) ?? e;
|
|
5751
|
-
return Array.from(n.querySelectorAll(
|
|
5863
|
+
return Array.from(n.querySelectorAll(Gn)).some((r) => !ft(r)) ? "token" : "expression";
|
|
5752
5864
|
}, Xn = (e) => {
|
|
5753
|
-
const t =
|
|
5865
|
+
const t = Uo(e), n = vn(t);
|
|
5754
5866
|
if (n) {
|
|
5755
5867
|
const r = Au(t, n);
|
|
5756
5868
|
return r ? {
|
|
@@ -5777,7 +5889,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5777
5889
|
}, xu = Xn, Ou = () => {
|
|
5778
5890
|
const e = /* @__PURE__ */ new WeakMap();
|
|
5779
5891
|
return (t) => {
|
|
5780
|
-
const n =
|
|
5892
|
+
const n = Uo(t), r = vn(n);
|
|
5781
5893
|
if (!n || !r) return Xn(t);
|
|
5782
5894
|
if (e.has(n)) return e.get(n) ?? null;
|
|
5783
5895
|
const i = Xn(t);
|
|
@@ -5787,7 +5899,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5787
5899
|
if (t.chunkSpokenStart === null || t.chunkSpokenEnd === null) return null;
|
|
5788
5900
|
let o = null;
|
|
5789
5901
|
for (const s of r) {
|
|
5790
|
-
const a =
|
|
5902
|
+
const a = Gc(s.alignment, {
|
|
5791
5903
|
position: t.chunkSpokenStart,
|
|
5792
5904
|
length: Math.max(1, t.chunkSpokenEnd - t.chunkSpokenStart),
|
|
5793
5905
|
boundaryWord: n.word
|
|
@@ -5814,7 +5926,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5814
5926
|
}
|
|
5815
5927
|
}, Mu = (e, t) => {
|
|
5816
5928
|
if (!e.catalogAlignment || t.chunkSpokenStart === null) return null;
|
|
5817
|
-
const n =
|
|
5929
|
+
const n = bc(e.catalogAlignment, t.chunkSpokenStart);
|
|
5818
5930
|
if (!n) return null;
|
|
5819
5931
|
const r = Xo(e.visibleMap, n.start, n.end);
|
|
5820
5932
|
return r ? {
|
|
@@ -5856,7 +5968,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5856
5968
|
renderedMathTargetResolver: Ou(),
|
|
5857
5969
|
mathCapabilityByElement: new Map(e.mathAlignments.map(({ element: n }) => [n, t ? Cu(n) : "expression"])),
|
|
5858
5970
|
heldTokenByElement: /* @__PURE__ */ new Map()
|
|
5859
|
-
}),
|
|
5971
|
+
}), Bu = (e) => {
|
|
5860
5972
|
const t = e.mathTokenHighlighting !== !1, n = new Map(e.chunks.map((r) => [r.id, Hu(r, t)]));
|
|
5861
5973
|
return {
|
|
5862
5974
|
chunks: e.chunks,
|
|
@@ -5918,14 +6030,14 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5918
6030
|
});
|
|
5919
6031
|
}
|
|
5920
6032
|
};
|
|
5921
|
-
},
|
|
6033
|
+
}, Wu = (e) => {
|
|
5922
6034
|
if (e.alignment?.boundaryOffsetMode) return e.alignment.boundaryOffsetMode;
|
|
5923
6035
|
const t = e.mathAlignment?.speech.boundaryOffsetSpace;
|
|
5924
6036
|
return t || "plain-spoken-text";
|
|
5925
|
-
},
|
|
6037
|
+
}, Fu = (e) => e.mathAlignments?.length ? e.mathAlignments : e.mathAlignment && e.sourceElement ? [{
|
|
5926
6038
|
element: e.sourceElement,
|
|
5927
6039
|
alignment: e.mathAlignment
|
|
5928
|
-
}] : [],
|
|
6040
|
+
}] : [], zu = (e) => (e.chunks && e.chunks.length ? e.chunks : [{
|
|
5929
6041
|
speechText: e.speechText || "",
|
|
5930
6042
|
visibleText: e.visibleText || e.speechText || "",
|
|
5931
6043
|
sourceElement: e.sourceElement || e.contentRoot,
|
|
@@ -5942,8 +6054,8 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5942
6054
|
regionRange: t.regionRange,
|
|
5943
6055
|
visibleMap: t.visibleMap,
|
|
5944
6056
|
catalogAlignment: t.alignment,
|
|
5945
|
-
mathAlignments:
|
|
5946
|
-
offsetSpace:
|
|
6057
|
+
mathAlignments: Fu(t),
|
|
6058
|
+
offsetSpace: Wu(t)
|
|
5947
6059
|
})), Du = [
|
|
5948
6060
|
"[data-pie-tts-region]",
|
|
5949
6061
|
"[data-catalog-region]",
|
|
@@ -5965,7 +6077,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
5965
6077
|
}
|
|
5966
6078
|
return r;
|
|
5967
6079
|
}, qu = async (e) => {
|
|
5968
|
-
const t =
|
|
6080
|
+
const t = yt(e.contentRoot, e.textProcessingOptions), n = await vu({
|
|
5969
6081
|
chunks: t.chunks,
|
|
5970
6082
|
visibleText: t.visibleText,
|
|
5971
6083
|
language: e.language,
|
|
@@ -6033,7 +6145,7 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
6033
6145
|
speechText: e.spokenText
|
|
6034
6146
|
}) : void 0
|
|
6035
6147
|
};
|
|
6036
|
-
},
|
|
6148
|
+
}, Uu = (e, t, n) => {
|
|
6037
6149
|
const r = t.sourceElement;
|
|
6038
6150
|
return {
|
|
6039
6151
|
speechText: n,
|
|
@@ -6047,13 +6159,13 @@ var ac = /* @__PURE__ */ new Set([
|
|
|
6047
6159
|
}) : void 0,
|
|
6048
6160
|
plainFallback: Jo(e, t)
|
|
6049
6161
|
};
|
|
6050
|
-
},
|
|
6162
|
+
}, Gu = (e, t = {}) => e.items.map(({ segment: n, anchor: r }) => n.kind === "prose" ? Vu(n, r) : t.format === "ssml" && n.ssml ? Uu(n, r, n.ssml) : Jo(n, r)), Ku = "pie-tts-control-handoff", O;
|
|
6051
6163
|
(function(e) {
|
|
6052
6164
|
e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
|
|
6053
6165
|
})(O || (O = {}));
|
|
6054
6166
|
var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOffset === t.startOffset && e.endContainer === t.endContainer && e.endOffset === t.endOffset, Xu = (e, t) => e === t ? !0 : !e || !t || e.type !== t.type || e.quality !== t.quality ? !1 : e.type === "range" && t.type === "range" ? Qo(e.range, t.range) : e.type === "element" && t.type === "element" ? e.element === t.element : e.type === "text-range" && t.type === "text-range" ? e.node === t.node && e.startOffset === t.startOffset && e.endOffset === t.endOffset : !1, Yu = class Yn {
|
|
6055
6167
|
constructor() {
|
|
6056
|
-
|
|
6168
|
+
d(this, "currentProvider", null), d(this, "provider", null), d(this, "highlightCoordinator", null), d(this, "highlightTargetResolverProvider", null), d(this, "catalogResolver", null), d(this, "state", O.IDLE), d(this, "ttsConfig", {}), d(this, "currentText", null), d(this, "currentContentElement", null), d(this, "normalizedToDOM", /* @__PURE__ */ new Map()), d(this, "listeners", /* @__PURE__ */ new Map()), d(this, "lastError", null), d(this, "speakRunId", 0), d(this, "currentBoundaryOffset", 0), d(this, "activeWordBoundaryOffset", 0), d(this, "seekSegments", []), d(this, "playbackChunks", []), d(this, "sentenceHighlightSegments", []), d(this, "currentSeekSegmentIndex", 0), d(this, "activeSentenceStartOffset", null), d(this, "activeHighlightMode", "word"), d(this, "lastRenderedRegionTarget", null), d(this, "telemetryReporter", null), d(this, "generatedMathSpeechResolver", Su());
|
|
6057
6169
|
}
|
|
6058
6170
|
debugLog(t, n) {
|
|
6059
6171
|
Yn.debugEnabled && (n === void 0 ? console.debug(t) : console.debug(t, n));
|
|
@@ -6204,7 +6316,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6204
6316
|
}
|
|
6205
6317
|
} catch {
|
|
6206
6318
|
}
|
|
6207
|
-
this.highlightCoordinator.highlightRange(t,
|
|
6319
|
+
this.highlightCoordinator.highlightRange(t, W.TTS_WORD, st.YELLOW);
|
|
6208
6320
|
}
|
|
6209
6321
|
}
|
|
6210
6322
|
paintTTSSentenceRanges(t) {
|
|
@@ -6412,9 +6524,9 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6412
6524
|
}
|
|
6413
6525
|
let u = a;
|
|
6414
6526
|
for (const h of [...c, l]) {
|
|
6415
|
-
const p = r.substring(u, h), g = p.match(/^\s*/)?.[0].length || 0, m = p.match(/\s*$/)?.[0].length || 0, v = u + g,
|
|
6416
|
-
|
|
6417
|
-
text: r.substring(v,
|
|
6527
|
+
const p = r.substring(u, h), g = p.match(/^\s*/)?.[0].length || 0, m = p.match(/\s*$/)?.[0].length || 0, v = u + g, b = h - m;
|
|
6528
|
+
b > v && o.push({
|
|
6529
|
+
text: r.substring(v, b),
|
|
6418
6530
|
startOffset: v,
|
|
6419
6531
|
pauseMsAfter: 0
|
|
6420
6532
|
}), u = h;
|
|
@@ -6637,7 +6749,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6637
6749
|
context: n.catalogContext
|
|
6638
6750
|
});
|
|
6639
6751
|
if (o) {
|
|
6640
|
-
const s = n?.contentElement &&
|
|
6752
|
+
const s = n?.contentElement && yt(n.contentElement, this.getTextProcessingOptions(n.language)).visibleText || r, a = R(o.content);
|
|
6641
6753
|
return this.debugLog(`[TTSService] Using catalog content for "${n.catalogId}" (${o.language})`), {
|
|
6642
6754
|
contentToSpeak: o.content,
|
|
6643
6755
|
speechText: o.content,
|
|
@@ -6671,7 +6783,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6671
6783
|
if (!this.catalogResolver) return null;
|
|
6672
6784
|
const i = this.collectCatalogSpeechChunks(t, r);
|
|
6673
6785
|
if (!i.some((a) => a.sourceElement)) return null;
|
|
6674
|
-
const o = R(i.map((a) => a.speechText).join(" ")), s =
|
|
6786
|
+
const o = R(i.map((a) => a.speechText).join(" ")), s = yt(t, this.getTextProcessingOptions(r.language)).visibleText || n;
|
|
6675
6787
|
return {
|
|
6676
6788
|
contentToSpeak: o,
|
|
6677
6789
|
speechText: o,
|
|
@@ -6707,7 +6819,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6707
6819
|
}, a = (u, h) => {
|
|
6708
6820
|
const p = l(u);
|
|
6709
6821
|
if (p.length !== 1) return null;
|
|
6710
|
-
const g = p[0], m =
|
|
6822
|
+
const g = p[0], m = yt(g, this.getTextProcessingOptions(n.language)).visibleText || R(g.textContent || ""), v = (b) => R(b).replace(/\s+/g, "");
|
|
6711
6823
|
return v(m) === v(h) ? g : null;
|
|
6712
6824
|
}, l = (u) => {
|
|
6713
6825
|
const h = Array.from(u.querySelectorAll("math"));
|
|
@@ -6722,11 +6834,11 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6722
6834
|
const h = u, p = s(h);
|
|
6723
6835
|
if (p) {
|
|
6724
6836
|
o();
|
|
6725
|
-
const g =
|
|
6837
|
+
const g = yt(h, this.getTextProcessingOptions(n.language)), m = g.visibleText || R(h.textContent || ""), v = xo({
|
|
6726
6838
|
speechText: p.content,
|
|
6727
6839
|
visibleText: m
|
|
6728
|
-
}),
|
|
6729
|
-
mathElement:
|
|
6840
|
+
}), b = a(h, m), S = b ? ln({
|
|
6841
|
+
mathElement: b,
|
|
6730
6842
|
speechText: p.content
|
|
6731
6843
|
}) : void 0, I = S ? void 0 : l(h).map((A) => ({
|
|
6732
6844
|
element: A,
|
|
@@ -6775,7 +6887,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6775
6887
|
containsMathMarkup: !1,
|
|
6776
6888
|
speechMatchesVisibleText: !0
|
|
6777
6889
|
};
|
|
6778
|
-
const c =
|
|
6890
|
+
const c = Gu(o, { format: i }), u = o.plainSpeechText;
|
|
6779
6891
|
return {
|
|
6780
6892
|
contentToSpeak: u,
|
|
6781
6893
|
speechText: u,
|
|
@@ -6831,12 +6943,12 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6831
6943
|
if (!(!n && !t.regionRange || !this.highlightCoordinator))
|
|
6832
6944
|
try {
|
|
6833
6945
|
if (this.lastRenderedRegionTarget = null, t.regionRange) {
|
|
6834
|
-
this.highlightCoordinator.clearHighlights?.(
|
|
6946
|
+
this.highlightCoordinator.clearHighlights?.(W.TTS_WORD), this.paintTTSSentenceRanges([t.regionRange]);
|
|
6835
6947
|
return;
|
|
6836
6948
|
}
|
|
6837
6949
|
if (!n) return;
|
|
6838
6950
|
const r = document.createRange();
|
|
6839
|
-
r.selectNodeContents(n), this.highlightCoordinator.clearHighlights?.(
|
|
6951
|
+
r.selectNodeContents(n), this.highlightCoordinator.clearHighlights?.(W.TTS_WORD), this.paintTTSSentenceRanges([r]);
|
|
6840
6952
|
} catch {
|
|
6841
6953
|
}
|
|
6842
6954
|
}
|
|
@@ -6860,7 +6972,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6860
6972
|
highlightRenderableActiveTarget(t) {
|
|
6861
6973
|
if (!this.highlightCoordinator || typeof document > "u") return;
|
|
6862
6974
|
if (!t) {
|
|
6863
|
-
this.highlightCoordinator.clearHighlights(
|
|
6975
|
+
this.highlightCoordinator.clearHighlights(W.TTS_WORD);
|
|
6864
6976
|
return;
|
|
6865
6977
|
}
|
|
6866
6978
|
if (t.type === "text-range") {
|
|
@@ -6903,10 +7015,10 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
6903
7015
|
async speakCatalogChunkOnce(t, n) {
|
|
6904
7016
|
if (!this.provider) return;
|
|
6905
7017
|
this.lastRenderedRegionTarget = null;
|
|
6906
|
-
const r = t.regionElement || t.sourceElement || this.currentContentElement, i = r ?
|
|
7018
|
+
const r = t.regionElement || t.sourceElement || this.currentContentElement, i = r ? zu({
|
|
6907
7019
|
contentRoot: r,
|
|
6908
7020
|
chunks: [t]
|
|
6909
|
-
})[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ?
|
|
7021
|
+
})[0] : null, o = this.ttsConfig.mathTokenHighlighting !== !1, s = i ? Bu({
|
|
6910
7022
|
chunks: [i],
|
|
6911
7023
|
mathTokenHighlighting: o
|
|
6912
7024
|
}) : null;
|
|
@@ -7114,7 +7226,7 @@ var Qo = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
|
|
|
7114
7226
|
});
|
|
7115
7227
|
}
|
|
7116
7228
|
};
|
|
7117
|
-
|
|
7229
|
+
d(Yu, "debugEnabled", (() => {
|
|
7118
7230
|
try {
|
|
7119
7231
|
if (typeof process < "u" && process.env?.PIE_TTS_DEBUG === "1") return !0;
|
|
7120
7232
|
} catch {
|
|
@@ -7132,16 +7244,16 @@ var wh = rl({
|
|
|
7132
7244
|
passage: []
|
|
7133
7245
|
},
|
|
7134
7246
|
providers: {}
|
|
7135
|
-
}), Zo,
|
|
7247
|
+
}), Zo, pe = class G {
|
|
7136
7248
|
constructor() {
|
|
7137
|
-
|
|
7249
|
+
d(this, "elementType", "multiple-choice"), d(this, "priority", 100);
|
|
7138
7250
|
}
|
|
7139
7251
|
canHandle(t) {
|
|
7140
7252
|
return t.tagName.toLowerCase() === "multiple-choice" || t.classList.contains("multiple-choice");
|
|
7141
7253
|
}
|
|
7142
7254
|
findChoices(t) {
|
|
7143
|
-
t.setAttribute(
|
|
7144
|
-
const n = Array.from(t.querySelectorAll(
|
|
7255
|
+
t.setAttribute(G.ROOT_HOOK_ATTR, "true");
|
|
7256
|
+
const n = Array.from(t.querySelectorAll(G.CHOICE_SELECTOR));
|
|
7145
7257
|
for (const r of n) this.annotateChoice(r);
|
|
7146
7258
|
return this.annotateFeedbackTicks(t), n;
|
|
7147
7259
|
}
|
|
@@ -7158,35 +7270,48 @@ var wh = rl({
|
|
|
7158
7270
|
getChoiceLabel(t) {
|
|
7159
7271
|
return this.resolveLabelElement(t)?.textContent?.trim() || "Unlabeled choice";
|
|
7160
7272
|
}
|
|
7273
|
+
isSelected(t) {
|
|
7274
|
+
const n = t.querySelector('input[type="checkbox"], input[type="radio"]');
|
|
7275
|
+
return n ? n.checked || n.getAttribute("aria-checked") === "true" : !1;
|
|
7276
|
+
}
|
|
7161
7277
|
canEliminate(t) {
|
|
7162
7278
|
const n = t.querySelector('input[type="checkbox"], input[type="radio"]');
|
|
7163
|
-
return !(!n ||
|
|
7279
|
+
return !(!n || this.isSelected(t) || n.disabled || (t.closest(`[${G.ROOT_HOOK_ATTR}="true"]`) || t.closest("multiple-choice"))?.querySelector(`[${G.FEEDBACK_HOOK_ATTR}="true"]`));
|
|
7280
|
+
}
|
|
7281
|
+
setSelectable(t, n) {
|
|
7282
|
+
const r = t.querySelector('input[type="checkbox"], input[type="radio"]');
|
|
7283
|
+
if (!r) return;
|
|
7284
|
+
r.disabled = !n, n ? r.removeAttribute("aria-disabled") : r.setAttribute("aria-disabled", "true");
|
|
7285
|
+
const i = r.closest(G.MUI_BUTTON_SELECTOR);
|
|
7286
|
+
i && i.classList.toggle(G.MUI_DISABLED_CLASS, !n);
|
|
7164
7287
|
}
|
|
7165
7288
|
getButtonContainer(t) {
|
|
7166
7289
|
return t;
|
|
7167
7290
|
}
|
|
7168
7291
|
generateFallbackId(t) {
|
|
7169
|
-
const n = (t.closest(`[${
|
|
7292
|
+
const n = (t.closest(`[${G.ROOT_HOOK_ATTR}="true"]`) || t.closest("multiple-choice"))?.querySelectorAll(`[${G.CHOICE_HOOK_ATTR}="true"]`) || [];
|
|
7170
7293
|
return `choice-${Array.from(n).indexOf(t)}`;
|
|
7171
7294
|
}
|
|
7172
7295
|
annotateChoice(t) {
|
|
7173
|
-
t.setAttribute(
|
|
7296
|
+
t.setAttribute(G.CHOICE_HOOK_ATTR, "true");
|
|
7174
7297
|
const n = this.resolveLabelElement(t);
|
|
7175
|
-
n && n.setAttribute(
|
|
7298
|
+
n && n.setAttribute(G.LABEL_HOOK_ATTR, "true");
|
|
7176
7299
|
}
|
|
7177
7300
|
resolveLabelElement(t) {
|
|
7178
|
-
return t.querySelector(`[${
|
|
7301
|
+
return t.querySelector(`[${G.LABEL_HOOK_ATTR}="true"]`) || t.querySelector("label") || t.querySelector("span");
|
|
7179
7302
|
}
|
|
7180
7303
|
annotateFeedbackTicks(t) {
|
|
7181
|
-
for (const n of t.querySelectorAll(".feedback-tick")) n.setAttribute(
|
|
7304
|
+
for (const n of t.querySelectorAll(".feedback-tick")) n.setAttribute(G.FEEDBACK_HOOK_ATTR, "true");
|
|
7182
7305
|
}
|
|
7183
7306
|
};
|
|
7184
|
-
Zo =
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7189
|
-
|
|
7307
|
+
Zo = pe;
|
|
7308
|
+
d(pe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
7309
|
+
d(pe, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
|
|
7310
|
+
d(pe, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
|
|
7311
|
+
d(pe, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
|
|
7312
|
+
d(pe, "CHOICE_SELECTOR", `[${Zo.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
|
|
7313
|
+
d(pe, "MUI_BUTTON_SELECTOR", ".MuiButtonBase-root, .MuiRadio-root, .MuiCheckbox-root");
|
|
7314
|
+
d(pe, "MUI_DISABLED_CLASS", "Mui-disabled");
|
|
7190
7315
|
var es = "ebsr-multiple-choice", Ju = `${es}--version-`, pr = (e) => {
|
|
7191
7316
|
if (!(e instanceof HTMLElement)) return !1;
|
|
7192
7317
|
const t = e.tagName.toLowerCase();
|
|
@@ -7200,7 +7325,7 @@ var es = "ebsr-multiple-choice", Ju = `${es}--version-`, pr = (e) => {
|
|
|
7200
7325
|
return null;
|
|
7201
7326
|
}, Zu = class {
|
|
7202
7327
|
constructor() {
|
|
7203
|
-
|
|
7328
|
+
d(this, "elementType", "ebsr"), d(this, "priority", 110), d(this, "mcAdapter", new pe());
|
|
7204
7329
|
}
|
|
7205
7330
|
canHandle(e) {
|
|
7206
7331
|
return e.tagName.toLowerCase() === "ebsr" || Array.from(e.querySelectorAll("*")).some(pr);
|
|
@@ -7218,15 +7343,21 @@ var es = "ebsr-multiple-choice", Ju = `${es}--version-`, pr = (e) => {
|
|
|
7218
7343
|
getChoiceLabel(e) {
|
|
7219
7344
|
return this.mcAdapter.getChoiceLabel(e);
|
|
7220
7345
|
}
|
|
7346
|
+
isSelected(e) {
|
|
7347
|
+
return this.mcAdapter.isSelected(e);
|
|
7348
|
+
}
|
|
7221
7349
|
canEliminate(e) {
|
|
7222
7350
|
return this.mcAdapter.canEliminate(e);
|
|
7223
7351
|
}
|
|
7352
|
+
setSelectable(e, t) {
|
|
7353
|
+
this.mcAdapter.setSelectable(e, t);
|
|
7354
|
+
}
|
|
7224
7355
|
getButtonContainer(e) {
|
|
7225
7356
|
return this.mcAdapter.getButtonContainer(e);
|
|
7226
7357
|
}
|
|
7227
7358
|
}, eh = class {
|
|
7228
7359
|
constructor() {
|
|
7229
|
-
|
|
7360
|
+
d(this, "elementType", "inline-dropdown"), d(this, "priority", 90);
|
|
7230
7361
|
}
|
|
7231
7362
|
canHandle(e) {
|
|
7232
7363
|
return e.tagName.toLowerCase() === "inline-dropdown" || e.querySelector('[role="combobox"]') !== null;
|
|
@@ -7252,8 +7383,8 @@ var es = "ebsr-multiple-choice", Ju = `${es}--version-`, pr = (e) => {
|
|
|
7252
7383
|
}
|
|
7253
7384
|
}, th = class {
|
|
7254
7385
|
constructor() {
|
|
7255
|
-
|
|
7256
|
-
new
|
|
7386
|
+
d(this, "adapters", void 0), this.adapters = [
|
|
7387
|
+
new pe(),
|
|
7257
7388
|
new Zu(),
|
|
7258
7389
|
new eh()
|
|
7259
7390
|
].sort((e, t) => t.priority - e.priority);
|
|
@@ -7278,7 +7409,7 @@ var es = "ebsr-multiple-choice", Ju = `${es}--version-`, pr = (e) => {
|
|
|
7278
7409
|
}
|
|
7279
7410
|
}, Qe = class j {
|
|
7280
7411
|
constructor() {
|
|
7281
|
-
|
|
7412
|
+
d(this, "name", "mask"), d(this, "highlights", /* @__PURE__ */ new Map()), d(this, "ranges", /* @__PURE__ */ new Map()), d(this, "fallbackContainers", /* @__PURE__ */ new Map());
|
|
7282
7413
|
}
|
|
7283
7414
|
initialize() {
|
|
7284
7415
|
}
|
|
@@ -7358,15 +7489,15 @@ var es = "ebsr-multiple-choice", Ju = `${es}--version-`, pr = (e) => {
|
|
|
7358
7489
|
r.selectNodeContents(n), this.removeAriaAttributes(r), this.fallbackContainers.delete(t);
|
|
7359
7490
|
}
|
|
7360
7491
|
};
|
|
7361
|
-
|
|
7362
|
-
|
|
7363
|
-
|
|
7364
|
-
|
|
7365
|
-
|
|
7366
|
-
|
|
7367
|
-
var
|
|
7492
|
+
d(Qe, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-");
|
|
7493
|
+
d(Qe, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-");
|
|
7494
|
+
d(Qe, "FALLBACK_CLASS", "pie-answer-masked-fallback");
|
|
7495
|
+
d(Qe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
7496
|
+
d(Qe, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
|
|
7497
|
+
d(Qe, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
7498
|
+
var we = class N {
|
|
7368
7499
|
constructor() {
|
|
7369
|
-
|
|
7500
|
+
d(this, "name", "strikethrough"), d(this, "highlights", /* @__PURE__ */ new Map()), d(this, "ranges", /* @__PURE__ */ new Map()), d(this, "fallbackContainers", /* @__PURE__ */ new Map());
|
|
7370
7501
|
}
|
|
7371
7502
|
initialize() {
|
|
7372
7503
|
this.isSupported() || console.warn("CSS Custom Highlight API not supported, using fallback");
|
|
@@ -7458,39 +7589,39 @@ var _e = class N {
|
|
|
7458
7589
|
return t.querySelector(`[${N.LABEL_HOOK_ATTR}="true"]`) || t.querySelector("label");
|
|
7459
7590
|
}
|
|
7460
7591
|
};
|
|
7461
|
-
|
|
7462
|
-
|
|
7463
|
-
|
|
7464
|
-
|
|
7465
|
-
|
|
7466
|
-
|
|
7467
|
-
|
|
7468
|
-
|
|
7592
|
+
d(we, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-highlight-");
|
|
7593
|
+
d(we, "HIGHLIGHT_NAME_PREFIX", "pie-answer-eliminated-");
|
|
7594
|
+
d(we, "FALLBACK_CLASS", "pie-answer-eliminator-eliminated-fallback");
|
|
7595
|
+
d(we, "SR_CLASS", "pie-answer-eliminator-sr-announcement");
|
|
7596
|
+
d(we, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
7597
|
+
d(we, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
|
|
7598
|
+
d(we, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
|
|
7599
|
+
d(we, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
7469
7600
|
var gr = class Tt {
|
|
7470
7601
|
constructor(t = "strikethrough", n = "right") {
|
|
7471
|
-
|
|
7602
|
+
d(this, "registry", void 0), d(this, "strategy", void 0), d(this, "eliminatedChoices", /* @__PURE__ */ new Set()), d(this, "choiceElements", /* @__PURE__ */ new Map()), d(this, "choiceButtons", /* @__PURE__ */ new Map()), d(this, "choiceAdapters", /* @__PURE__ */ new Map()), d(this, "buttonAlignment", "right"), d(this, "shouldRestoreState", !0), d(this, "active", !0), d(this, "questionRoot", null), d(this, "selectionChangeHandler", null), d(this, "selectionObserver", null), d(this, "selectionRefreshFrame", null), d(this, "storeIntegration", null), this.registry = new th(), this.strategy = this.createStrategy(t), this.strategy.initialize(), this.buttonAlignment = n;
|
|
7472
7603
|
}
|
|
7473
7604
|
createStrategy(t) {
|
|
7474
|
-
return t === "mask" ? new Qe() : new
|
|
7605
|
+
return t === "mask" ? new Qe() : new we();
|
|
7475
7606
|
}
|
|
7476
7607
|
initializeForQuestion(t) {
|
|
7477
|
-
this.cleanupButtons();
|
|
7608
|
+
this.active = !0, this.cleanupButtons();
|
|
7478
7609
|
const n = this.registry.findAllChoicesWithAdapters(t);
|
|
7479
7610
|
for (const { choice: r, adapter: i } of n) this.initializeChoice(r, i);
|
|
7480
|
-
this.shouldRestoreState && this.restoreState();
|
|
7611
|
+
this.shouldRestoreState && this.restoreState(), this.attachSelectionListener(t);
|
|
7481
7612
|
}
|
|
7482
7613
|
initializeChoice(t, n) {
|
|
7483
7614
|
const r = n.getChoiceId(t);
|
|
7484
7615
|
this.choiceElements.set(r, t), this.choiceAdapters.set(r, n);
|
|
7485
7616
|
const i = this.createToggleButton(t, n);
|
|
7486
7617
|
if (!i) return;
|
|
7487
|
-
this.choiceButtons.set(r, i);
|
|
7618
|
+
this.choiceButtons.set(r, i), this.setButtonHidden(i, this.shouldHideButton(r, t, n));
|
|
7488
7619
|
const o = n.getButtonContainer(t);
|
|
7489
7620
|
o && (o.style.position = "relative", o.appendChild(i));
|
|
7490
7621
|
}
|
|
7491
7622
|
createToggleButton(t, n) {
|
|
7492
7623
|
const r = n.getChoiceId(t), i = n.getChoiceLabel(t), o = document.createElement("button");
|
|
7493
|
-
return o.type = "button", o.className = Tt.TOGGLE_CLASS, o.setAttribute("aria-label", `Toggle elimination for ${i}`), o.setAttribute("data-choice-id", r), o.textContent = "⊗", this.applyButtonAlignment(o), o.addEventListener("click", (s) => {
|
|
7624
|
+
return o.type = "button", o.className = Tt.TOGGLE_CLASS, o.setAttribute("aria-label", `Toggle elimination for ${i}`), o.setAttribute("data-choice-id", r), o.textContent = "⊗", this.applyButtonAlignment(o), o.dataset.pieShownDisplay = o.style.display, o.addEventListener("click", (s) => {
|
|
7494
7625
|
s.preventDefault(), s.stopPropagation(), this.toggleElimination(t, n);
|
|
7495
7626
|
}), o;
|
|
7496
7627
|
}
|
|
@@ -7512,14 +7643,16 @@ var gr = class Tt {
|
|
|
7512
7643
|
console.error("Failed to create range for choice");
|
|
7513
7644
|
return;
|
|
7514
7645
|
}
|
|
7515
|
-
this.strategy.apply(r, i), this.eliminatedChoices.add(r);
|
|
7646
|
+
this.strategy.apply(r, i), this.eliminatedChoices.add(r), n.setSelectable?.(t, !1);
|
|
7516
7647
|
const o = this.choiceButtons.get(r);
|
|
7517
|
-
o && (o.classList.add(Tt.TOGGLE_ACTIVE_CLASS), o.setAttribute("aria-pressed", "true")), this.saveState();
|
|
7648
|
+
o && (o.classList.add(Tt.TOGGLE_ACTIVE_CLASS), o.setAttribute("aria-pressed", "true")), this.updateButtonVisibility(r), this.saveState();
|
|
7518
7649
|
}
|
|
7519
7650
|
restoreChoice(t) {
|
|
7520
7651
|
this.strategy.remove(t), this.eliminatedChoices.delete(t);
|
|
7521
|
-
const n = this.
|
|
7522
|
-
n &&
|
|
7652
|
+
const n = this.choiceElements.get(t), r = this.choiceAdapters.get(t);
|
|
7653
|
+
n && r && r.setSelectable?.(n, !0);
|
|
7654
|
+
const i = this.choiceButtons.get(t);
|
|
7655
|
+
i && (i.classList.remove(Tt.TOGGLE_ACTIVE_CLASS), i.setAttribute("aria-pressed", "false")), this.updateButtonVisibility(t), this.saveState();
|
|
7523
7656
|
}
|
|
7524
7657
|
resetAll() {
|
|
7525
7658
|
if (this.eliminatedChoices.size !== 0) {
|
|
@@ -7552,19 +7685,61 @@ var gr = class Tt {
|
|
|
7552
7685
|
const i = this.choiceElements.get(r);
|
|
7553
7686
|
if (!i) continue;
|
|
7554
7687
|
const o = this.choiceAdapters.get(r);
|
|
7555
|
-
if (!o) continue;
|
|
7688
|
+
if (!o || o.isSelected?.(i)) continue;
|
|
7556
7689
|
const s = o.createChoiceRange(i);
|
|
7557
7690
|
if (s) {
|
|
7558
|
-
this.strategy.apply(r, s), this.eliminatedChoices.add(r);
|
|
7691
|
+
this.strategy.apply(r, s), this.eliminatedChoices.add(r), o.setSelectable?.(i, !1);
|
|
7559
7692
|
const a = this.choiceButtons.get(r);
|
|
7560
|
-
a && (a.classList.add(Tt.TOGGLE_ACTIVE_CLASS), a.setAttribute("aria-pressed", "true"));
|
|
7693
|
+
a && (a.classList.add(Tt.TOGGLE_ACTIVE_CLASS), a.setAttribute("aria-pressed", "true")), this.updateButtonVisibility(r);
|
|
7561
7694
|
}
|
|
7562
7695
|
}
|
|
7563
7696
|
} catch (n) {
|
|
7564
7697
|
console.error("Failed to restore eliminator state:", n);
|
|
7565
7698
|
}
|
|
7566
7699
|
}
|
|
7700
|
+
restoreAllSelectable() {
|
|
7701
|
+
for (const t of this.eliminatedChoices) {
|
|
7702
|
+
const n = this.choiceElements.get(t), r = this.choiceAdapters.get(t);
|
|
7703
|
+
n && r && r.setSelectable?.(n, !0);
|
|
7704
|
+
}
|
|
7705
|
+
}
|
|
7706
|
+
setButtonHidden(t, n) {
|
|
7707
|
+
const r = n ? "none" : t.dataset.pieShownDisplay ?? "";
|
|
7708
|
+
t.style.display !== r && (t.style.display = r);
|
|
7709
|
+
}
|
|
7710
|
+
shouldHideButton(t, n, r) {
|
|
7711
|
+
return this.eliminatedChoices.has(t) ? !1 : this.active ? r.isSelected?.(n) ?? !1 : !0;
|
|
7712
|
+
}
|
|
7713
|
+
updateButtonVisibility(t) {
|
|
7714
|
+
const n = this.choiceElements.get(t), r = this.choiceAdapters.get(t), i = this.choiceButtons.get(t);
|
|
7715
|
+
!n || !r || !i || this.setButtonHidden(i, this.shouldHideButton(t, n, r));
|
|
7716
|
+
}
|
|
7717
|
+
refreshSelectionState() {
|
|
7718
|
+
for (const [t, n] of this.choiceElements) {
|
|
7719
|
+
const r = this.choiceAdapters.get(t), i = this.choiceButtons.get(t);
|
|
7720
|
+
!r || !i || this.setButtonHidden(i, this.shouldHideButton(t, n, r));
|
|
7721
|
+
}
|
|
7722
|
+
}
|
|
7723
|
+
scheduleSelectionRefresh() {
|
|
7724
|
+
this.selectionRefreshFrame === null && (this.selectionRefreshFrame = requestAnimationFrame(() => {
|
|
7725
|
+
this.selectionRefreshFrame = null, this.refreshSelectionState();
|
|
7726
|
+
}));
|
|
7727
|
+
}
|
|
7728
|
+
attachSelectionListener(t) {
|
|
7729
|
+
this.detachSelectionListener(), this.questionRoot = t, this.selectionChangeHandler = () => this.scheduleSelectionRefresh(), t.addEventListener("change", this.selectionChangeHandler), typeof MutationObserver < "u" && (this.selectionObserver = new MutationObserver((n) => {
|
|
7730
|
+
const r = new Set(this.choiceButtons.values());
|
|
7731
|
+
n.some((i) => !r.has(i.target)) && this.scheduleSelectionRefresh();
|
|
7732
|
+
}), this.selectionObserver.observe(t, {
|
|
7733
|
+
subtree: !0,
|
|
7734
|
+
childList: !0,
|
|
7735
|
+
attributes: !0
|
|
7736
|
+
}));
|
|
7737
|
+
}
|
|
7738
|
+
detachSelectionListener() {
|
|
7739
|
+
this.selectionRefreshFrame !== null && (cancelAnimationFrame(this.selectionRefreshFrame), this.selectionRefreshFrame = null), this.selectionObserver && (this.selectionObserver.disconnect(), this.selectionObserver = null), this.questionRoot && this.selectionChangeHandler && this.questionRoot.removeEventListener("change", this.selectionChangeHandler), this.questionRoot = null, this.selectionChangeHandler = null;
|
|
7740
|
+
}
|
|
7567
7741
|
cleanupButtons() {
|
|
7742
|
+
this.detachSelectionListener();
|
|
7568
7743
|
for (const t of this.choiceButtons.values()) t.remove();
|
|
7569
7744
|
this.choiceButtons.clear(), this.choiceElements.clear(), this.choiceAdapters.clear();
|
|
7570
7745
|
}
|
|
@@ -7604,44 +7779,44 @@ var gr = class Tt {
|
|
|
7604
7779
|
this.shouldRestoreState = !1;
|
|
7605
7780
|
}
|
|
7606
7781
|
cleanup() {
|
|
7607
|
-
this.
|
|
7782
|
+
this.active = !1, this.refreshSelectionState();
|
|
7608
7783
|
}
|
|
7609
7784
|
destroy() {
|
|
7610
|
-
this.cleanupButtons(), this.strategy.destroy();
|
|
7785
|
+
this.restoreAllSelectable(), this.cleanupButtons(), this.strategy.destroy();
|
|
7611
7786
|
}
|
|
7612
7787
|
};
|
|
7613
|
-
|
|
7614
|
-
|
|
7788
|
+
d(gr, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
|
|
7789
|
+
d(gr, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
|
|
7615
7790
|
var nh = /* @__PURE__ */ xa('<div style="display: none;" aria-hidden="true"></div>');
|
|
7616
7791
|
function rh(e, t) {
|
|
7617
7792
|
mi(t, !0);
|
|
7618
|
-
let n =
|
|
7619
|
-
const g = /* @__PURE__ */ Cr(() =>
|
|
7620
|
-
let m = /* @__PURE__ */
|
|
7793
|
+
let n = ke(t, "visible", 7, !1), r = ke(t, "toolId", 7, "answerEliminator"), i = ke(t, "strategy", 7, "strikethrough"), o = ke(t, "alwaysOn", 7, !1), s = ke(t, "buttonAlignment", 7, "right"), a = ke(t, "scopeElement", 7, null), l = ke(t, "elementToolStateStore", 7, null), c = ke(t, "globalElementId", 7, ""), u = /* @__PURE__ */ z(null), h = /* @__PURE__ */ z(null), p = /* @__PURE__ */ z(null);
|
|
7794
|
+
const g = /* @__PURE__ */ Cr(() => y(h)?.toolCoordinator);
|
|
7795
|
+
let m = /* @__PURE__ */ z(null), v = /* @__PURE__ */ z(null), b = /* @__PURE__ */ z(null), S = /* @__PURE__ */ z(null), I = /* @__PURE__ */ Cr(() => o() || n());
|
|
7621
7796
|
Le(() => {
|
|
7622
|
-
if (
|
|
7623
|
-
return Xa(
|
|
7797
|
+
if (y(u))
|
|
7798
|
+
return Xa(y(u), (C) => {
|
|
7624
7799
|
M(h, C, !0);
|
|
7625
7800
|
});
|
|
7626
7801
|
}), Le(() => {
|
|
7627
|
-
if (
|
|
7628
|
-
return Ya(
|
|
7802
|
+
if (y(u))
|
|
7803
|
+
return Ya(y(u), (C) => {
|
|
7629
7804
|
M(p, C, !0);
|
|
7630
7805
|
});
|
|
7631
7806
|
});
|
|
7632
7807
|
function V() {
|
|
7633
|
-
return a() ||
|
|
7808
|
+
return a() || y(p)?.scopeElement || null;
|
|
7634
7809
|
}
|
|
7635
7810
|
function A() {
|
|
7636
|
-
if (!
|
|
7811
|
+
if (!y(I) || !y(m)) return;
|
|
7637
7812
|
const C = V();
|
|
7638
7813
|
if (!C) {
|
|
7639
7814
|
console.warn("[AnswerEliminator] Missing shell scope context for question root");
|
|
7640
7815
|
return;
|
|
7641
7816
|
}
|
|
7642
|
-
|
|
7817
|
+
y(m).initializeForQuestion(C);
|
|
7643
7818
|
}
|
|
7644
|
-
function
|
|
7819
|
+
function U() {
|
|
7645
7820
|
requestAnimationFrame(() => {
|
|
7646
7821
|
requestAnimationFrame(() => {
|
|
7647
7822
|
A();
|
|
@@ -7649,74 +7824,74 @@ function rh(e, t) {
|
|
|
7649
7824
|
});
|
|
7650
7825
|
}
|
|
7651
7826
|
Le(() => {
|
|
7652
|
-
!
|
|
7827
|
+
!y(g) || !r() || (y(S) && y(b) && (y(S) !== y(g) || y(b) !== r()) && (y(S).unregisterTool(y(b)), M(S, null), M(b, null)), y(b) || (y(g).registerTool(r(), "Answer Eliminator", void 0, Fn.MODAL), M(S, y(g), !0), M(b, r())));
|
|
7653
7828
|
}), Le(() => {
|
|
7654
|
-
|
|
7655
|
-
}), Pa(() => (M(m, new gr(i(), s()), !0),
|
|
7656
|
-
|
|
7829
|
+
y(m) && l() && c() && y(m).setStoreIntegration(l(), c());
|
|
7830
|
+
}), Pa(() => (M(m, new gr(i(), s()), !0), y(m) && l() && c() && y(m).setStoreIntegration(l(), c()), y(I) ? A() : y(m).cleanup(), () => {
|
|
7831
|
+
y(m)?.destroy(), M(m, null), y(S) && y(b) && (y(S).unregisterTool(y(b)), M(S, null), M(b, null));
|
|
7657
7832
|
})), Le(() => {
|
|
7658
|
-
const C =
|
|
7833
|
+
const C = y(p)?.contextVersion ?? null;
|
|
7659
7834
|
if (C !== null) {
|
|
7660
|
-
if (
|
|
7835
|
+
if (y(v) === null) {
|
|
7661
7836
|
M(v, C, !0);
|
|
7662
7837
|
return;
|
|
7663
7838
|
}
|
|
7664
|
-
C !==
|
|
7839
|
+
C !== y(v) && (M(v, C, !0), U());
|
|
7665
7840
|
}
|
|
7666
7841
|
}), Le(() => {
|
|
7667
|
-
|
|
7842
|
+
y(m) && (y(I) ? (y(m).enableStateRestoration(), A()) : y(m).cleanup());
|
|
7668
7843
|
});
|
|
7669
|
-
var
|
|
7844
|
+
var ee = {
|
|
7670
7845
|
get visible() {
|
|
7671
7846
|
return n();
|
|
7672
7847
|
},
|
|
7673
7848
|
set visible(C = !1) {
|
|
7674
|
-
n(C),
|
|
7849
|
+
n(C), ge();
|
|
7675
7850
|
},
|
|
7676
7851
|
get toolId() {
|
|
7677
7852
|
return r();
|
|
7678
7853
|
},
|
|
7679
7854
|
set toolId(C = "answerEliminator") {
|
|
7680
|
-
r(C),
|
|
7855
|
+
r(C), ge();
|
|
7681
7856
|
},
|
|
7682
7857
|
get strategy() {
|
|
7683
7858
|
return i();
|
|
7684
7859
|
},
|
|
7685
7860
|
set strategy(C = "strikethrough") {
|
|
7686
|
-
i(C),
|
|
7861
|
+
i(C), ge();
|
|
7687
7862
|
},
|
|
7688
7863
|
get alwaysOn() {
|
|
7689
7864
|
return o();
|
|
7690
7865
|
},
|
|
7691
7866
|
set alwaysOn(C = !1) {
|
|
7692
|
-
o(C),
|
|
7867
|
+
o(C), ge();
|
|
7693
7868
|
},
|
|
7694
7869
|
get buttonAlignment() {
|
|
7695
7870
|
return s();
|
|
7696
7871
|
},
|
|
7697
7872
|
set buttonAlignment(C = "right") {
|
|
7698
|
-
s(C),
|
|
7873
|
+
s(C), ge();
|
|
7699
7874
|
},
|
|
7700
7875
|
get scopeElement() {
|
|
7701
7876
|
return a();
|
|
7702
7877
|
},
|
|
7703
7878
|
set scopeElement(C = null) {
|
|
7704
|
-
a(C),
|
|
7879
|
+
a(C), ge();
|
|
7705
7880
|
},
|
|
7706
7881
|
get elementToolStateStore() {
|
|
7707
7882
|
return l();
|
|
7708
7883
|
},
|
|
7709
7884
|
set elementToolStateStore(C = null) {
|
|
7710
|
-
l(C),
|
|
7885
|
+
l(C), ge();
|
|
7711
7886
|
},
|
|
7712
7887
|
get globalElementId() {
|
|
7713
7888
|
return c();
|
|
7714
7889
|
},
|
|
7715
7890
|
set globalElementId(C = "") {
|
|
7716
|
-
c(C),
|
|
7891
|
+
c(C), ge();
|
|
7717
7892
|
}
|
|
7718
7893
|
}, pt = nh();
|
|
7719
|
-
return
|
|
7894
|
+
return Ba(pt, (C) => M(u, C), () => y(u)), eo(e, pt), vi(ee);
|
|
7720
7895
|
}
|
|
7721
7896
|
customElements.define("pie-tool-answer-eliminator", Da(rh, {
|
|
7722
7897
|
visible: {
|