@pie-players/pie-tool-answer-eliminator 0.3.29 → 0.3.31
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/{dist-Bud4G4lv.js → dist-DIBQdekL.js} +193 -138
- package/dist/{dist-DwP27yIs.js → dist-rF11IR1B.js} +13 -1
- package/dist/tool-answer-eliminator.js +1563 -1398
- package/package.json +6 -7
- package/index.ts +0 -11
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { t as u } from "./defineProperty-CyepwRr5.js";
|
|
2
2
|
if (typeof window < "u") {
|
|
3
|
-
var
|
|
4
|
-
((
|
|
3
|
+
var Ir, Er;
|
|
4
|
+
((Ir = (Er = window).__svelte ?? (Er.__svelte = {})).v ?? (Ir.v = /* @__PURE__ */ new Set())).add("5");
|
|
5
5
|
}
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var kt = {}, M = Symbol(), Xs = Symbol("filename");
|
|
7
|
+
var ln = Array.isArray, cn = Array.prototype.indexOf, Ke = Array.prototype.includes, un = Array.from, Ct = Object.keys, $t = Object.defineProperty, Oe = Object.getOwnPropertyDescriptor, dn = Object.prototype, fn = Array.prototype, hn = Object.getPrototypeOf, kr = Object.isExtensible, pn = () => {
|
|
8
8
|
};
|
|
9
|
-
function
|
|
9
|
+
function vn(e) {
|
|
10
10
|
for (var t = 0; t < e.length; t++) e[t]();
|
|
11
11
|
}
|
|
12
|
-
function
|
|
12
|
+
function gn() {
|
|
13
13
|
var e, t;
|
|
14
14
|
return {
|
|
15
15
|
promise: new Promise((r, i) => {
|
|
@@ -19,71 +19,74 @@ function on() {
|
|
|
19
19
|
reject: t
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
var
|
|
22
|
+
var Qs = 1 << 24, re = 1024, le = 2048, Fe = 4096, Jr = 8192, mn = 16384, Zr = 32768, Cr = 1 << 25, ei = 65536, Js = 1 << 17, Zs = 1 << 18, ut = 1 << 19, _n = 1 << 20, dt = 65536, $r = 1 << 21, ea = 1 << 22, ti = 1 << 23, nt = Symbol("$state"), ri = Symbol("legacy props"), yn = Symbol("proxy path"), lr = new class extends Error {
|
|
23
23
|
constructor(...t) {
|
|
24
24
|
super(...t), u(this, "name", "StaleReactionError"), u(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
25
25
|
}
|
|
26
|
-
}(),
|
|
27
|
-
function
|
|
26
|
+
}(), ra = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
27
|
+
function bn(e) {
|
|
28
28
|
throw new Error("https://svelte.dev/e/lifecycle_outside_component");
|
|
29
29
|
}
|
|
30
|
-
function
|
|
30
|
+
function wn(e) {
|
|
31
31
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
32
32
|
}
|
|
33
|
-
function
|
|
33
|
+
function Tn() {
|
|
34
34
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function An(e) {
|
|
37
37
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
38
38
|
}
|
|
39
|
-
function
|
|
39
|
+
function Sn() {
|
|
40
40
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function In() {
|
|
43
43
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
44
44
|
}
|
|
45
|
-
function
|
|
45
|
+
function En(e) {
|
|
46
46
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function kn() {
|
|
49
49
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
50
50
|
}
|
|
51
|
-
function
|
|
51
|
+
function Cn() {
|
|
52
52
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function $n() {
|
|
55
55
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function Ln() {
|
|
58
58
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function On() {
|
|
61
|
+
console.warn("https://svelte.dev/e/derived_inert");
|
|
62
|
+
}
|
|
63
|
+
function ii(e) {
|
|
61
64
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
62
65
|
}
|
|
63
|
-
function
|
|
66
|
+
function Rn() {
|
|
64
67
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
65
68
|
}
|
|
66
|
-
var
|
|
67
|
-
function
|
|
68
|
-
|
|
69
|
+
var Z = !1;
|
|
70
|
+
function pt(e) {
|
|
71
|
+
Z = e;
|
|
69
72
|
}
|
|
70
|
-
var
|
|
71
|
-
function
|
|
73
|
+
var N;
|
|
74
|
+
function at(e) {
|
|
72
75
|
if (e === null)
|
|
73
|
-
throw
|
|
74
|
-
return
|
|
76
|
+
throw ii(), kt;
|
|
77
|
+
return N = e;
|
|
75
78
|
}
|
|
76
|
-
function
|
|
77
|
-
return
|
|
79
|
+
function ni() {
|
|
80
|
+
return at(/* @__PURE__ */ Ze(N));
|
|
78
81
|
}
|
|
79
|
-
function
|
|
80
|
-
if (
|
|
81
|
-
for (var t = e, r =
|
|
82
|
-
|
|
82
|
+
function Mn(e = 1) {
|
|
83
|
+
if (Z) {
|
|
84
|
+
for (var t = e, r = N; t--; ) r = /* @__PURE__ */ Ze(r);
|
|
85
|
+
N = r;
|
|
83
86
|
}
|
|
84
87
|
}
|
|
85
|
-
function
|
|
86
|
-
for (var t = 0, r =
|
|
88
|
+
function Pn(e = !0) {
|
|
89
|
+
for (var t = 0, r = N; ; ) {
|
|
87
90
|
if (r.nodeType === 8) {
|
|
88
91
|
var i = r.data;
|
|
89
92
|
if (i === "]") {
|
|
@@ -91,83 +94,83 @@ function An(e = !0) {
|
|
|
91
94
|
t -= 1;
|
|
92
95
|
} else (i === "[" || i === "[!" || i[0] === "[" && !isNaN(Number(i.slice(1)))) && (t += 1);
|
|
93
96
|
}
|
|
94
|
-
var n = /* @__PURE__ */
|
|
97
|
+
var n = /* @__PURE__ */ Ze(r);
|
|
95
98
|
e && r.remove(), r = n;
|
|
96
99
|
}
|
|
97
100
|
}
|
|
98
|
-
function
|
|
101
|
+
function oi(e) {
|
|
99
102
|
return e === this.v;
|
|
100
103
|
}
|
|
101
|
-
function
|
|
104
|
+
function xn(e, t) {
|
|
102
105
|
return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
|
|
103
106
|
}
|
|
104
|
-
function
|
|
105
|
-
return !
|
|
107
|
+
function si(e) {
|
|
108
|
+
return !xn(e, this.v);
|
|
106
109
|
}
|
|
107
|
-
var
|
|
108
|
-
function
|
|
109
|
-
return e.label = t,
|
|
110
|
+
var we = !1, ft = !1;
|
|
111
|
+
function Lr(e, t) {
|
|
112
|
+
return e.label = t, Hn(e.v, t), e;
|
|
110
113
|
}
|
|
111
|
-
function
|
|
112
|
-
return e?.[
|
|
114
|
+
function Hn(e, t) {
|
|
115
|
+
return e?.[yn]?.(t), e;
|
|
113
116
|
}
|
|
114
|
-
var
|
|
115
|
-
function
|
|
116
|
-
|
|
117
|
+
var L = null;
|
|
118
|
+
function Lt(e) {
|
|
119
|
+
L = e;
|
|
117
120
|
}
|
|
118
|
-
function
|
|
119
|
-
|
|
120
|
-
p:
|
|
121
|
+
function ai(e, t = !1, r) {
|
|
122
|
+
L = {
|
|
123
|
+
p: L,
|
|
121
124
|
i: !1,
|
|
122
125
|
c: null,
|
|
123
126
|
e: null,
|
|
124
127
|
s: e,
|
|
125
128
|
x: null,
|
|
126
|
-
r:
|
|
127
|
-
l:
|
|
129
|
+
r: A,
|
|
130
|
+
l: ft && !t ? {
|
|
128
131
|
s: null,
|
|
129
132
|
u: null,
|
|
130
133
|
$: []
|
|
131
134
|
} : null
|
|
132
135
|
};
|
|
133
136
|
}
|
|
134
|
-
function
|
|
135
|
-
var t =
|
|
137
|
+
function li(e) {
|
|
138
|
+
var t = L, r = t.e;
|
|
136
139
|
if (r !== null) {
|
|
137
140
|
t.e = null;
|
|
138
|
-
for (var i of r)
|
|
141
|
+
for (var i of r) Pi(i);
|
|
139
142
|
}
|
|
140
|
-
return e !== void 0 && (t.x = e), t.i = !0,
|
|
143
|
+
return e !== void 0 && (t.x = e), t.i = !0, L = t.p, e ?? {};
|
|
141
144
|
}
|
|
142
|
-
function
|
|
143
|
-
return !
|
|
145
|
+
function xt() {
|
|
146
|
+
return !ft || L !== null && L.l === null;
|
|
144
147
|
}
|
|
145
|
-
var
|
|
146
|
-
function
|
|
147
|
-
var e =
|
|
148
|
-
|
|
148
|
+
var $e = [];
|
|
149
|
+
function ci() {
|
|
150
|
+
var e = $e;
|
|
151
|
+
$e = [], vn(e);
|
|
149
152
|
}
|
|
150
|
-
function
|
|
151
|
-
if (
|
|
152
|
-
var t =
|
|
153
|
+
function Ue(e) {
|
|
154
|
+
if ($e.length === 0 && !ot) {
|
|
155
|
+
var t = $e;
|
|
153
156
|
queueMicrotask(() => {
|
|
154
|
-
t ===
|
|
157
|
+
t === $e && ci();
|
|
155
158
|
});
|
|
156
159
|
}
|
|
157
|
-
|
|
160
|
+
$e.push(e);
|
|
158
161
|
}
|
|
159
|
-
function
|
|
160
|
-
for (;
|
|
162
|
+
function Nn() {
|
|
163
|
+
for (; $e.length > 0; ) ci();
|
|
161
164
|
}
|
|
162
|
-
function
|
|
163
|
-
var t =
|
|
165
|
+
function ui(e) {
|
|
166
|
+
var t = A;
|
|
164
167
|
if (t === null)
|
|
165
|
-
return
|
|
168
|
+
return T.f |= ti, e;
|
|
166
169
|
if (!(t.f & 32768) && !(t.f & 4))
|
|
167
170
|
throw e;
|
|
168
|
-
|
|
171
|
+
Ge(e, t);
|
|
169
172
|
}
|
|
170
|
-
function
|
|
173
|
+
function Ge(e, t) {
|
|
171
174
|
for (; t !== null; ) {
|
|
172
175
|
if (t.f & 128) {
|
|
173
176
|
if (!(t.f & 32768)) throw e;
|
|
@@ -182,679 +185,727 @@ function Ve(e, t) {
|
|
|
182
185
|
}
|
|
183
186
|
throw e;
|
|
184
187
|
}
|
|
185
|
-
var
|
|
186
|
-
function
|
|
187
|
-
e.f = e.f &
|
|
188
|
+
var Dn = ~(le | Fe | re);
|
|
189
|
+
function O(e, t) {
|
|
190
|
+
e.f = e.f & Dn | t;
|
|
188
191
|
}
|
|
189
|
-
function
|
|
190
|
-
e.f & 512 || e.deps === null ?
|
|
192
|
+
function cr(e) {
|
|
193
|
+
e.f & 512 || e.deps === null ? O(e, re) : O(e, Fe);
|
|
191
194
|
}
|
|
192
|
-
function
|
|
195
|
+
function di(e) {
|
|
193
196
|
if (e !== null)
|
|
194
197
|
for (const t of e)
|
|
195
|
-
!(t.f & 2) || !(t.f & 65536) || (t.f ^=
|
|
198
|
+
!(t.f & 2) || !(t.f & 65536) || (t.f ^= dt, di(t.deps));
|
|
196
199
|
}
|
|
197
|
-
function
|
|
198
|
-
e.f & 2048 ? t.add(e) : e.f & 4096 && r.add(e),
|
|
200
|
+
function fi(e, t, r) {
|
|
201
|
+
e.f & 2048 ? t.add(e) : e.f & 4096 && r.add(e), di(e.deps), O(e, re);
|
|
199
202
|
}
|
|
200
|
-
var
|
|
201
|
-
function
|
|
202
|
-
var t =
|
|
203
|
+
var Fn = !1, vt = !1;
|
|
204
|
+
function Bn(e) {
|
|
205
|
+
var t = vt;
|
|
203
206
|
try {
|
|
204
|
-
return
|
|
207
|
+
return vt = !1, [e(), vt];
|
|
205
208
|
} finally {
|
|
206
|
-
|
|
209
|
+
vt = t;
|
|
207
210
|
}
|
|
208
211
|
}
|
|
209
|
-
function
|
|
212
|
+
function hi(e, t) {
|
|
210
213
|
if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
211
214
|
}
|
|
212
|
-
function
|
|
213
|
-
|
|
215
|
+
function ur(e, t) {
|
|
216
|
+
hi(e, t), t.add(e);
|
|
214
217
|
}
|
|
215
|
-
function
|
|
216
|
-
|
|
218
|
+
function w(e, t, r) {
|
|
219
|
+
hi(e, t), t.set(e, r);
|
|
217
220
|
}
|
|
218
|
-
function
|
|
221
|
+
function S(e, t, r) {
|
|
219
222
|
if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : r;
|
|
220
223
|
throw new TypeError("Private element is not present on this object");
|
|
221
224
|
}
|
|
222
|
-
function
|
|
223
|
-
return e.get(
|
|
225
|
+
function a(e, t) {
|
|
226
|
+
return e.get(S(e, t));
|
|
224
227
|
}
|
|
225
228
|
function b(e, t, r) {
|
|
226
|
-
return e.set(
|
|
229
|
+
return e.set(S(e, t), r), r;
|
|
227
230
|
}
|
|
228
|
-
var
|
|
229
|
-
var
|
|
231
|
+
var pi, oe = /* @__PURE__ */ new Set(), I = null, Or = null, x = null, Ut = null, ot = !1, zt = !1, Ye = null, Ot = null, vi = 0;
|
|
232
|
+
var jn = 1, Rt = /* @__PURE__ */ new WeakMap(), gt = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), ke = /* @__PURE__ */ new WeakMap(), ye = /* @__PURE__ */ new WeakMap(), wt = /* @__PURE__ */ new WeakMap(), Q = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), qe = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), Je = class gi {
|
|
230
233
|
constructor() {
|
|
231
|
-
|
|
234
|
+
ur(this, F), u(this, "id", jn++), u(this, "current", /* @__PURE__ */ new Map()), u(this, "previous", /* @__PURE__ */ new Map()), w(this, Rt, /* @__PURE__ */ new Set()), w(this, gt, /* @__PURE__ */ new Set()), w(this, tt, /* @__PURE__ */ new Set()), w(this, ke, /* @__PURE__ */ new Map()), w(this, ye, /* @__PURE__ */ new Map()), w(this, wt, null), w(this, Q, []), w(this, Yt, []), w(this, Xe, /* @__PURE__ */ new Set()), w(this, Re, /* @__PURE__ */ new Set()), w(this, be, /* @__PURE__ */ new Map()), w(this, Tt, /* @__PURE__ */ new Set()), u(this, "is_fork", !1), w(this, mt, !1), w(this, qe, /* @__PURE__ */ new Set());
|
|
232
235
|
}
|
|
233
236
|
skip_effect(t) {
|
|
234
|
-
|
|
237
|
+
a(be, this).has(t) || a(be, this).set(t, {
|
|
235
238
|
d: [],
|
|
236
239
|
m: []
|
|
237
|
-
});
|
|
238
|
-
}
|
|
239
|
-
unskip_effect(t) {
|
|
240
|
-
var
|
|
241
|
-
if (
|
|
242
|
-
|
|
243
|
-
for (var
|
|
244
|
-
|
|
245
|
-
for (
|
|
246
|
-
|
|
240
|
+
}), a(Tt, this).delete(t);
|
|
241
|
+
}
|
|
242
|
+
unskip_effect(t, r = (i) => this.schedule(i)) {
|
|
243
|
+
var i = a(be, this).get(t);
|
|
244
|
+
if (i) {
|
|
245
|
+
a(be, this).delete(t);
|
|
246
|
+
for (var n of i.d)
|
|
247
|
+
O(n, le), r(n);
|
|
248
|
+
for (n of i.m)
|
|
249
|
+
O(n, Fe), r(n);
|
|
247
250
|
}
|
|
251
|
+
a(Tt, this).add(t);
|
|
248
252
|
}
|
|
249
|
-
capture(t, r) {
|
|
250
|
-
|
|
253
|
+
capture(t, r, i = !1) {
|
|
254
|
+
t.v !== M && !this.previous.has(t) && this.previous.set(t, t.v), t.f & 8388608 || (this.current.set(t, [r, i]), x?.set(t, r)), this.is_fork || (t.v = r);
|
|
251
255
|
}
|
|
252
256
|
activate() {
|
|
253
|
-
|
|
257
|
+
I = this;
|
|
254
258
|
}
|
|
255
259
|
deactivate() {
|
|
256
|
-
|
|
260
|
+
I = null, x = null;
|
|
257
261
|
}
|
|
258
262
|
flush() {
|
|
259
263
|
var t = null;
|
|
260
264
|
try {
|
|
261
|
-
|
|
265
|
+
zt = !0, I = this, S(F, this, dr).call(this);
|
|
262
266
|
} finally {
|
|
263
|
-
|
|
267
|
+
vi = 0, Ut = null, Ye = null, Ot = null, zt = !1, I = null, x = null, xe.clear();
|
|
264
268
|
}
|
|
265
269
|
}
|
|
266
270
|
discard() {
|
|
267
|
-
for (const t of
|
|
268
|
-
|
|
271
|
+
for (const t of a(gt, this)) t(this);
|
|
272
|
+
a(gt, this).clear(), a(tt, this).clear(), oe.delete(this);
|
|
269
273
|
}
|
|
270
|
-
|
|
271
|
-
|
|
274
|
+
register_created_effect(t) {
|
|
275
|
+
a(Yt, this).push(t);
|
|
272
276
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
277
|
+
increment(t, r) {
|
|
278
|
+
let i = a(ke, this).get(r) ?? 0;
|
|
279
|
+
if (a(ke, this).set(r, i + 1), t) {
|
|
280
|
+
let n = a(ye, this).get(r) ?? 0;
|
|
281
|
+
a(ye, this).set(r, n + 1);
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
decrement(t, r, i) {
|
|
285
|
+
let n = a(ke, this).get(r) ?? 0;
|
|
286
|
+
if (n === 1 ? a(ke, this).delete(r) : a(ke, this).set(r, n - 1), t) {
|
|
287
|
+
let o = a(ye, this).get(r) ?? 0;
|
|
288
|
+
o === 1 ? a(ye, this).delete(r) : a(ye, this).set(r, o - 1);
|
|
289
|
+
}
|
|
290
|
+
a(mt, this) || i || (b(mt, this, !0), Ue(() => {
|
|
291
|
+
b(mt, this, !1), this.flush();
|
|
276
292
|
}));
|
|
277
293
|
}
|
|
278
294
|
transfer_effects(t, r) {
|
|
279
|
-
for (const i of t)
|
|
280
|
-
for (const i of r)
|
|
295
|
+
for (const i of t) a(Xe, this).add(i);
|
|
296
|
+
for (const i of r) a(Re, this).add(i);
|
|
281
297
|
t.clear(), r.clear();
|
|
282
298
|
}
|
|
283
299
|
oncommit(t) {
|
|
284
|
-
|
|
300
|
+
a(Rt, this).add(t);
|
|
285
301
|
}
|
|
286
302
|
ondiscard(t) {
|
|
287
|
-
|
|
303
|
+
a(gt, this).add(t);
|
|
304
|
+
}
|
|
305
|
+
on_fork_commit(t) {
|
|
306
|
+
a(tt, this).add(t);
|
|
307
|
+
}
|
|
308
|
+
run_fork_commit_callbacks() {
|
|
309
|
+
for (const t of a(tt, this)) t(this);
|
|
310
|
+
a(tt, this).clear();
|
|
288
311
|
}
|
|
289
312
|
settled() {
|
|
290
|
-
return (
|
|
313
|
+
return (a(wt, this) ?? b(wt, this, gn())).promise;
|
|
291
314
|
}
|
|
292
315
|
static ensure() {
|
|
293
|
-
if (
|
|
294
|
-
const t =
|
|
295
|
-
|
|
296
|
-
|
|
316
|
+
if (I === null) {
|
|
317
|
+
const t = I = new gi();
|
|
318
|
+
zt || (oe.add(I), ot || Ue(() => {
|
|
319
|
+
I === t && t.flush();
|
|
297
320
|
}));
|
|
298
321
|
}
|
|
299
|
-
return
|
|
322
|
+
return I;
|
|
300
323
|
}
|
|
301
324
|
apply() {
|
|
302
|
-
if (!
|
|
303
|
-
|
|
325
|
+
if (!we || !this.is_fork && oe.size === 1) {
|
|
326
|
+
x = null;
|
|
304
327
|
return;
|
|
305
328
|
}
|
|
306
|
-
|
|
307
|
-
for (const
|
|
308
|
-
|
|
309
|
-
|
|
329
|
+
x = /* @__PURE__ */ new Map();
|
|
330
|
+
for (const [i, [n]] of this.current) x.set(i, n);
|
|
331
|
+
for (const i of oe)
|
|
332
|
+
if (!(i === this || i.is_fork)) {
|
|
333
|
+
var t = !1, r = !1;
|
|
334
|
+
if (i.id < this.id) for (const [n, [, o]] of i.current)
|
|
335
|
+
o || (t || (t = this.current.has(n)), r || (r = !this.current.has(n)));
|
|
336
|
+
if (t && r) a(qe, this).add(i);
|
|
337
|
+
else for (const [n, o] of i.previous) x.has(n) || x.set(n, o);
|
|
338
|
+
}
|
|
310
339
|
}
|
|
311
340
|
schedule(t) {
|
|
312
|
-
if (
|
|
341
|
+
if (Ut = t, t.b?.is_pending && t.f & 16777228 && !(t.f & 32768)) {
|
|
313
342
|
t.b.defer_effect(t);
|
|
314
343
|
return;
|
|
315
344
|
}
|
|
316
345
|
for (var r = t; r.parent !== null; ) {
|
|
317
346
|
r = r.parent;
|
|
318
347
|
var i = r.f;
|
|
319
|
-
if (
|
|
348
|
+
if (Ye !== null && r === A && (we || (T === null || !(T.f & 2)) && !Fn))
|
|
320
349
|
return;
|
|
321
350
|
if (i & 96) {
|
|
322
351
|
if (!(i & 1024)) return;
|
|
323
|
-
r.f ^=
|
|
352
|
+
r.f ^= re;
|
|
324
353
|
}
|
|
325
354
|
}
|
|
326
|
-
|
|
355
|
+
a(Q, this).push(r);
|
|
327
356
|
}
|
|
328
357
|
};
|
|
329
|
-
|
|
330
|
-
function
|
|
331
|
-
return this.is_fork ||
|
|
332
|
-
}
|
|
333
|
-
function
|
|
334
|
-
|
|
335
|
-
for (
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
for (const
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
358
|
+
pi = Je;
|
|
359
|
+
function Xt() {
|
|
360
|
+
return this.is_fork || a(ye, this).size > 0;
|
|
361
|
+
}
|
|
362
|
+
function zn() {
|
|
363
|
+
for (const r of a(qe, this)) for (const i of a(ye, r).keys()) {
|
|
364
|
+
for (var e = !1, t = i; t.parent !== null; ) {
|
|
365
|
+
if (a(be, this).has(t)) {
|
|
366
|
+
e = !0;
|
|
367
|
+
break;
|
|
368
|
+
}
|
|
369
|
+
t = t.parent;
|
|
370
|
+
}
|
|
371
|
+
if (!e) return !0;
|
|
372
|
+
}
|
|
373
|
+
return !1;
|
|
374
|
+
}
|
|
375
|
+
function dr() {
|
|
376
|
+
if (vi++ > 1e3 && (oe.delete(this), Gn()), !S(F, this, Xt).call(this)) {
|
|
377
|
+
for (const s of a(Xe, this))
|
|
378
|
+
a(Re, this).delete(s), O(s, le), this.schedule(s);
|
|
379
|
+
for (const s of a(Re, this))
|
|
380
|
+
O(s, Fe), this.schedule(s);
|
|
381
|
+
}
|
|
382
|
+
const e = a(Q, this);
|
|
383
|
+
b(Q, this, []), this.apply();
|
|
384
|
+
var t = Ye = [], r = [], i = Ot = [];
|
|
385
|
+
for (const s of e) try {
|
|
386
|
+
S(F, this, mi).call(this, s, t, r);
|
|
387
|
+
} catch (l) {
|
|
388
|
+
throw bi(s), l;
|
|
389
|
+
}
|
|
390
|
+
if (I = null, i.length > 0) {
|
|
391
|
+
var n = pi.ensure();
|
|
392
|
+
for (const s of i) n.schedule(s);
|
|
393
|
+
}
|
|
394
|
+
if (Ye = null, Ot = null, S(F, this, Xt).call(this) || S(F, this, zn).call(this)) {
|
|
395
|
+
S(F, this, Qt).call(this, r), S(F, this, Qt).call(this, t);
|
|
396
|
+
for (const [s, l] of a(be, this)) yi(s, l);
|
|
355
397
|
} else {
|
|
356
|
-
|
|
357
|
-
for (const
|
|
358
|
-
|
|
398
|
+
a(ke, this).size === 0 && oe.delete(this), a(Xe, this).clear(), a(Re, this).clear();
|
|
399
|
+
for (const s of a(Rt, this)) s(this);
|
|
400
|
+
a(Rt, this).clear(), Or = this, Rr(r), Rr(t), Or = null, a(wt, this)?.resolve();
|
|
359
401
|
}
|
|
360
|
-
var
|
|
361
|
-
if (
|
|
362
|
-
const
|
|
363
|
-
|
|
402
|
+
var o = I;
|
|
403
|
+
if (a(Q, this).length > 0) {
|
|
404
|
+
const s = o ?? (o = this);
|
|
405
|
+
a(Q, s).push(...a(Q, this).filter((l) => !a(Q, s).includes(l)));
|
|
364
406
|
}
|
|
365
|
-
|
|
407
|
+
o !== null && (oe.add(o), S(F, o, dr).call(o)), we && !oe.has(this) && S(F, this, Vn).call(this);
|
|
366
408
|
}
|
|
367
|
-
function
|
|
368
|
-
e.f ^=
|
|
409
|
+
function mi(e, t, r) {
|
|
410
|
+
e.f ^= re;
|
|
369
411
|
for (var i = e.first; i !== null; ) {
|
|
370
|
-
var n = i.f,
|
|
371
|
-
if (!(
|
|
372
|
-
|
|
373
|
-
var
|
|
374
|
-
if (
|
|
375
|
-
i =
|
|
412
|
+
var n = i.f, o = (n & 96) !== 0;
|
|
413
|
+
if (!(o && n & 1024 || n & 8192 || a(be, this).has(i)) && i.fn !== null) {
|
|
414
|
+
o ? i.f ^= re : n & 4 ? t.push(i) : we && n & 16777224 ? r.push(i) : ht(i) && (n & 16 && a(Re, this).add(i), Qe(i));
|
|
415
|
+
var s = i.first;
|
|
416
|
+
if (s !== null) {
|
|
417
|
+
i = s;
|
|
376
418
|
continue;
|
|
377
419
|
}
|
|
378
420
|
}
|
|
379
421
|
for (; i !== null; ) {
|
|
380
|
-
var
|
|
381
|
-
if (
|
|
382
|
-
i =
|
|
422
|
+
var l = i.next;
|
|
423
|
+
if (l !== null) {
|
|
424
|
+
i = l;
|
|
383
425
|
break;
|
|
384
426
|
}
|
|
385
427
|
i = i.parent;
|
|
386
428
|
}
|
|
387
429
|
}
|
|
388
430
|
}
|
|
389
|
-
function
|
|
390
|
-
for (var t = 0; t < e.length; t += 1)
|
|
431
|
+
function Qt(e) {
|
|
432
|
+
for (var t = 0; t < e.length; t += 1) fi(e[t], a(Xe, this), a(Re, this));
|
|
391
433
|
}
|
|
392
|
-
function
|
|
393
|
-
for (const
|
|
394
|
-
var e =
|
|
395
|
-
for (const [
|
|
396
|
-
if (
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
434
|
+
function Vn() {
|
|
435
|
+
for (const d of oe) {
|
|
436
|
+
var e = d.id < this.id, t = [];
|
|
437
|
+
for (const [f, [v, h]] of this.current) {
|
|
438
|
+
if (d.current.has(f)) {
|
|
439
|
+
var r = d.current.get(f)[0];
|
|
440
|
+
if (e && v !== r) d.current.set(f, [v, h]);
|
|
441
|
+
else continue;
|
|
442
|
+
}
|
|
443
|
+
t.push(f);
|
|
444
|
+
}
|
|
445
|
+
var i = [...d.current.keys()].filter((f) => !this.current.has(f));
|
|
446
|
+
if (i.length === 0)
|
|
447
|
+
e && d.discard();
|
|
403
448
|
else if (t.length > 0) {
|
|
404
|
-
a.
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
449
|
+
if (e) for (const f of a(Tt, this)) d.unskip_effect(f, (v) => {
|
|
450
|
+
v.f & 4194320 ? d.schedule(v) : S(F, d, Qt).call(d, [v]);
|
|
451
|
+
});
|
|
452
|
+
d.activate();
|
|
453
|
+
var n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
|
|
454
|
+
for (var s of t) _i(s, i, n, o);
|
|
455
|
+
o = /* @__PURE__ */ new Map();
|
|
456
|
+
var l = [...d.current.keys()].filter((f) => this.current.has(f) ? this.current.get(f)[0] !== f : !0);
|
|
457
|
+
for (const f of a(Yt, this)) !(f.f & 155648) && fr(f, l, o) && (f.f & 4194320 ? (O(f, le), d.schedule(f)) : a(Xe, d).add(f));
|
|
458
|
+
if (a(Q, d).length > 0) {
|
|
459
|
+
d.apply();
|
|
460
|
+
for (var c of a(Q, d)) S(F, d, mi).call(d, c, [], []);
|
|
461
|
+
b(Q, d, []);
|
|
411
462
|
}
|
|
412
|
-
|
|
463
|
+
d.deactivate();
|
|
413
464
|
}
|
|
414
465
|
}
|
|
466
|
+
for (const d of oe) a(qe, d).has(this) && (a(qe, d).delete(this), a(qe, d).size === 0 && !S(F, d, Xt).call(d) && (d.activate(), S(F, d, dr).call(d)));
|
|
415
467
|
}
|
|
416
|
-
function
|
|
417
|
-
var t =
|
|
418
|
-
|
|
468
|
+
function ue(e) {
|
|
469
|
+
var t = ot;
|
|
470
|
+
ot = !0;
|
|
419
471
|
try {
|
|
420
472
|
var r;
|
|
421
|
-
for (e && (
|
|
422
|
-
if (
|
|
423
|
-
|
|
473
|
+
for (e && (I !== null && !I.is_fork && I.flush(), r = e()); ; ) {
|
|
474
|
+
if (Nn(), I === null) return r;
|
|
475
|
+
I.flush();
|
|
424
476
|
}
|
|
425
477
|
} finally {
|
|
426
|
-
|
|
478
|
+
ot = t;
|
|
427
479
|
}
|
|
428
480
|
}
|
|
429
|
-
function
|
|
481
|
+
function Gn() {
|
|
430
482
|
if (0) {
|
|
431
483
|
var e;
|
|
432
|
-
for (const r of
|
|
484
|
+
for (const r of I.current.keys()) for (const [i, n] of r.updated ?? [])
|
|
433
485
|
var t;
|
|
434
486
|
}
|
|
435
487
|
try {
|
|
436
|
-
|
|
488
|
+
Sn();
|
|
437
489
|
} catch (r) {
|
|
438
|
-
|
|
490
|
+
Ge(r, Ut);
|
|
439
491
|
}
|
|
440
492
|
}
|
|
441
|
-
var
|
|
442
|
-
function
|
|
493
|
+
var de = null;
|
|
494
|
+
function Rr(e) {
|
|
443
495
|
var t = e.length;
|
|
444
496
|
if (t !== 0) {
|
|
445
497
|
for (var r = 0; r < t; ) {
|
|
446
498
|
var i = e[r++];
|
|
447
|
-
if (!(i.f & 24576) &&
|
|
448
|
-
|
|
449
|
-
for (const n of
|
|
499
|
+
if (!(i.f & 24576) && ht(i) && (de = /* @__PURE__ */ new Set(), Qe(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && Hi(i), de?.size > 0)) {
|
|
500
|
+
xe.clear();
|
|
501
|
+
for (const n of de) {
|
|
450
502
|
if (n.f & 24576) continue;
|
|
451
|
-
const
|
|
452
|
-
let
|
|
453
|
-
for (;
|
|
454
|
-
|
|
455
|
-
for (let
|
|
456
|
-
const c =
|
|
457
|
-
c.f & 24576 ||
|
|
503
|
+
const o = [n];
|
|
504
|
+
let s = n.parent;
|
|
505
|
+
for (; s !== null; )
|
|
506
|
+
de.has(s) && (de.delete(s), o.push(s)), s = s.parent;
|
|
507
|
+
for (let l = o.length - 1; l >= 0; l--) {
|
|
508
|
+
const c = o[l];
|
|
509
|
+
c.f & 24576 || Qe(c);
|
|
458
510
|
}
|
|
459
511
|
}
|
|
460
|
-
|
|
512
|
+
de.clear();
|
|
461
513
|
}
|
|
462
514
|
}
|
|
463
|
-
|
|
515
|
+
de = null;
|
|
464
516
|
}
|
|
465
517
|
}
|
|
466
|
-
function
|
|
518
|
+
function _i(e, t, r, i) {
|
|
467
519
|
if (!r.has(e) && (r.add(e), e.reactions !== null))
|
|
468
520
|
for (const n of e.reactions) {
|
|
469
|
-
const
|
|
470
|
-
|
|
521
|
+
const o = n.f;
|
|
522
|
+
o & 2 ? _i(n, t, r, i) : o & 4194320 && !(o & 2048) && fr(n, t, i) && (O(n, le), hr(n));
|
|
471
523
|
}
|
|
472
524
|
}
|
|
473
|
-
function
|
|
525
|
+
function fr(e, t, r) {
|
|
474
526
|
const i = r.get(e);
|
|
475
527
|
if (i !== void 0) return i;
|
|
476
528
|
if (e.deps !== null) for (const n of e.deps) {
|
|
477
|
-
if (
|
|
478
|
-
if (n.f & 2 &&
|
|
529
|
+
if (Ke.call(t, n)) return !0;
|
|
530
|
+
if (n.f & 2 && fr(n, t, r))
|
|
479
531
|
return r.set(n, !0), !0;
|
|
480
532
|
}
|
|
481
533
|
return r.set(e, !1), !1;
|
|
482
534
|
}
|
|
483
|
-
function
|
|
484
|
-
|
|
535
|
+
function hr(e) {
|
|
536
|
+
I.schedule(e);
|
|
485
537
|
}
|
|
486
|
-
function
|
|
538
|
+
function yi(e, t) {
|
|
487
539
|
if (!(e.f & 32 && e.f & 1024)) {
|
|
488
|
-
e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e),
|
|
540
|
+
e.f & 2048 ? t.d.push(e) : e.f & 4096 && t.m.push(e), O(e, re);
|
|
489
541
|
for (var r = e.first; r !== null; )
|
|
490
|
-
|
|
542
|
+
yi(r, t), r = r.next;
|
|
491
543
|
}
|
|
492
544
|
}
|
|
493
|
-
function
|
|
494
|
-
|
|
545
|
+
function bi(e) {
|
|
546
|
+
O(e, re);
|
|
495
547
|
for (var t = e.first; t !== null; )
|
|
496
|
-
|
|
548
|
+
bi(t), t = t.next;
|
|
497
549
|
}
|
|
498
|
-
function
|
|
499
|
-
let t = 0, r =
|
|
550
|
+
function Wn(e) {
|
|
551
|
+
let t = 0, r = Ht(0), i;
|
|
500
552
|
return () => {
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
t -= 1, t === 0 && (i?.(), i = void 0,
|
|
553
|
+
mr() && (m(r), _r(() => (t === 0 && (i = Dt(() => e(() => st(r)))), t += 1, () => {
|
|
554
|
+
Ue(() => {
|
|
555
|
+
t -= 1, t === 0 && (i?.(), i = void 0, st(r));
|
|
504
556
|
});
|
|
505
557
|
})));
|
|
506
558
|
};
|
|
507
559
|
}
|
|
508
|
-
var
|
|
509
|
-
function
|
|
510
|
-
new
|
|
560
|
+
var qn = ei | ut;
|
|
561
|
+
function Kn(e, t, r, i) {
|
|
562
|
+
new Un(e, t, r, i);
|
|
511
563
|
}
|
|
512
|
-
var
|
|
564
|
+
var ee = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), ne = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), ze = /* @__PURE__ */ new WeakMap(), Pe = /* @__PURE__ */ new WeakMap(), _t = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), Ie = /* @__PURE__ */ new WeakMap(), Mr = /* @__PURE__ */ new WeakMap(), P = /* @__PURE__ */ new WeakSet(), Un = class {
|
|
513
565
|
constructor(e, t, r, i) {
|
|
514
|
-
|
|
515
|
-
b(
|
|
516
|
-
}))), b(
|
|
517
|
-
var
|
|
518
|
-
|
|
519
|
-
}), this.parent =
|
|
520
|
-
if (
|
|
521
|
-
const n =
|
|
522
|
-
|
|
523
|
-
const
|
|
566
|
+
ur(this, P), u(this, "parent", void 0), u(this, "is_pending", !1), u(this, "transform_error", void 0), w(this, ee, void 0), w(this, Jt, Z ? N : null), w(this, ne, void 0), w(this, lt, void 0), w(this, q, void 0), w(this, se, null), w(this, V, null), w(this, X, null), w(this, Me, null), w(this, ze, 0), w(this, Pe, 0), w(this, _t, !1), w(this, Zt, /* @__PURE__ */ new Set()), w(this, er, /* @__PURE__ */ new Set()), w(this, Ie, null), w(this, Mr, Wn(() => (b(Ie, this, Ht(a(ze, this))), () => {
|
|
567
|
+
b(Ie, this, null);
|
|
568
|
+
}))), b(ee, this, e), b(ne, this, t), b(lt, this, (n) => {
|
|
569
|
+
var o = A;
|
|
570
|
+
o.b = this, o.f |= 128, r(n);
|
|
571
|
+
}), this.parent = A.b, this.transform_error = i ?? this.parent?.transform_error ?? ((n) => n), b(q, this, ho(() => {
|
|
572
|
+
if (Z) {
|
|
573
|
+
const n = a(Jt, this);
|
|
574
|
+
ni();
|
|
575
|
+
const o = n.data === "[!";
|
|
524
576
|
if (n.data.startsWith("[?")) {
|
|
525
|
-
const
|
|
526
|
-
|
|
527
|
-
} else
|
|
528
|
-
} else
|
|
529
|
-
},
|
|
577
|
+
const s = JSON.parse(n.data.slice(2));
|
|
578
|
+
S(P, this, Xn).call(this, s);
|
|
579
|
+
} else o ? S(P, this, Qn).call(this) : S(P, this, Yn).call(this);
|
|
580
|
+
} else S(P, this, wi).call(this);
|
|
581
|
+
}, qn)), Z && b(ee, this, N);
|
|
530
582
|
}
|
|
531
583
|
defer_effect(e) {
|
|
532
|
-
|
|
584
|
+
fi(e, a(Zt, this), a(er, this));
|
|
533
585
|
}
|
|
534
586
|
is_rendered() {
|
|
535
587
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
536
588
|
}
|
|
537
589
|
has_pending_snippet() {
|
|
538
|
-
return !!
|
|
590
|
+
return !!a(ne, this).pending;
|
|
539
591
|
}
|
|
540
592
|
update_pending_count(e, t) {
|
|
541
|
-
|
|
542
|
-
b(
|
|
593
|
+
S(P, this, Ti).call(this, e, t), b(ze, this, a(ze, this) + e), !(!a(Ie, this) || a(_t, this)) && (b(_t, this, !0), Ue(() => {
|
|
594
|
+
b(_t, this, !1), a(Ie, this) && Ei(a(Ie, this), a(ze, this));
|
|
543
595
|
}));
|
|
544
596
|
}
|
|
545
597
|
get_effect_pending() {
|
|
546
|
-
return
|
|
598
|
+
return a(Mr, this).call(this), m(a(Ie, this));
|
|
547
599
|
}
|
|
548
600
|
error(e) {
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
var i = !1, n = !1;
|
|
554
|
-
const s = () => {
|
|
555
|
-
if (i) {
|
|
556
|
-
wn();
|
|
557
|
-
return;
|
|
558
|
-
}
|
|
559
|
-
i = !0, n && bn(), l(oe, this) !== null && Lt(l(oe, this), () => {
|
|
560
|
-
b(oe, this, null);
|
|
561
|
-
}), E(N, this, Wt).call(this, () => {
|
|
562
|
-
E(N, this, Sr).call(this);
|
|
563
|
-
});
|
|
564
|
-
}, o = (a) => {
|
|
565
|
-
try {
|
|
566
|
-
n = !0, t?.(a, s), n = !1;
|
|
567
|
-
} catch (c) {
|
|
568
|
-
Ve(c, l(z, this) && l(z, this).parent);
|
|
569
|
-
}
|
|
570
|
-
r && b(oe, this, E(N, this, Wt).call(this, () => {
|
|
571
|
-
try {
|
|
572
|
-
return Me(() => {
|
|
573
|
-
var c = T;
|
|
574
|
-
c.b = this, c.f |= 128, r(l(X, this), () => a, () => s);
|
|
575
|
-
});
|
|
576
|
-
} catch (c) {
|
|
577
|
-
return Ve(c, l(z, this).parent), null;
|
|
578
|
-
}
|
|
579
|
-
}));
|
|
580
|
-
};
|
|
581
|
-
Ge(() => {
|
|
582
|
-
var a;
|
|
583
|
-
try {
|
|
584
|
-
a = this.transform_error(e);
|
|
585
|
-
} catch (c) {
|
|
586
|
-
Ve(c, l(z, this) && l(z, this).parent);
|
|
587
|
-
return;
|
|
588
|
-
}
|
|
589
|
-
a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(o, (c) => Ve(c, l(z, this) && l(z, this).parent)) : o(a);
|
|
590
|
-
});
|
|
601
|
+
if (!a(ne, this).onerror && !a(ne, this).failed) throw e;
|
|
602
|
+
I?.is_fork ? (a(se, this) && I.skip_effect(a(se, this)), a(V, this) && I.skip_effect(a(V, this)), a(X, this) && I.skip_effect(a(X, this)), I.on_fork_commit(() => {
|
|
603
|
+
S(P, this, Pr).call(this, e);
|
|
604
|
+
})) : S(P, this, Pr).call(this, e);
|
|
591
605
|
}
|
|
592
606
|
};
|
|
593
|
-
function
|
|
607
|
+
function Yn() {
|
|
594
608
|
try {
|
|
595
|
-
b(
|
|
609
|
+
b(se, this, De(() => a(lt, this).call(this, a(ee, this))));
|
|
596
610
|
} catch (e) {
|
|
597
611
|
this.error(e);
|
|
598
612
|
}
|
|
599
613
|
}
|
|
600
|
-
function
|
|
601
|
-
const t =
|
|
602
|
-
t && b(
|
|
603
|
-
t(
|
|
614
|
+
function Xn(e) {
|
|
615
|
+
const t = a(ne, this).failed;
|
|
616
|
+
t && b(X, this, De(() => {
|
|
617
|
+
t(a(ee, this), () => e, () => () => {
|
|
604
618
|
});
|
|
605
619
|
}));
|
|
606
620
|
}
|
|
607
|
-
function
|
|
608
|
-
const e =
|
|
609
|
-
e && (this.is_pending = !0, b(
|
|
610
|
-
var t = b(
|
|
611
|
-
t.append(r), b(
|
|
612
|
-
b(
|
|
613
|
-
}),
|
|
621
|
+
function Qn() {
|
|
622
|
+
const e = a(ne, this).pending;
|
|
623
|
+
e && (this.is_pending = !0, b(V, this, De(() => e(a(ee, this)))), Ue(() => {
|
|
624
|
+
var t = b(Me, this, document.createDocumentFragment()), r = Oi();
|
|
625
|
+
t.append(r), b(se, this, S(P, this, tr).call(this, () => De(() => a(lt, this).call(this, r)))), a(Pe, this) === 0 && (a(ee, this).before(t), b(Me, this, null), Nt(a(V, this), () => {
|
|
626
|
+
b(V, this, null);
|
|
627
|
+
}), S(P, this, pr).call(this, I));
|
|
614
628
|
}));
|
|
615
629
|
}
|
|
616
|
-
function
|
|
630
|
+
function wi() {
|
|
617
631
|
try {
|
|
618
|
-
if (this.is_pending = this.has_pending_snippet(), b(
|
|
619
|
-
|
|
620
|
-
})),
|
|
621
|
-
var e = b(
|
|
622
|
-
|
|
623
|
-
const t =
|
|
624
|
-
b(
|
|
625
|
-
} else
|
|
632
|
+
if (this.is_pending = this.has_pending_snippet(), b(Pe, this, 0), b(ze, this, 0), b(se, this, De(() => {
|
|
633
|
+
a(lt, this).call(this, a(ee, this));
|
|
634
|
+
})), a(Pe, this) > 0) {
|
|
635
|
+
var e = b(Me, this, document.createDocumentFragment());
|
|
636
|
+
go(a(se, this), e);
|
|
637
|
+
const t = a(ne, this).pending;
|
|
638
|
+
b(V, this, De(() => t(a(ee, this))));
|
|
639
|
+
} else S(P, this, pr).call(this, I);
|
|
626
640
|
} catch (t) {
|
|
627
641
|
this.error(t);
|
|
628
642
|
}
|
|
629
643
|
}
|
|
630
|
-
function
|
|
631
|
-
this.is_pending = !1, e.transfer_effects(
|
|
644
|
+
function pr(e) {
|
|
645
|
+
this.is_pending = !1, e.transfer_effects(a(Zt, this), a(er, this));
|
|
632
646
|
}
|
|
633
|
-
function
|
|
634
|
-
var t =
|
|
635
|
-
|
|
647
|
+
function tr(e) {
|
|
648
|
+
var t = A, r = T, i = L;
|
|
649
|
+
Te(a(q, this)), ae(a(q, this)), Lt(a(q, this).ctx);
|
|
636
650
|
try {
|
|
637
|
-
return
|
|
651
|
+
return Je.ensure(), e();
|
|
638
652
|
} catch (n) {
|
|
639
|
-
return
|
|
653
|
+
return ui(n), null;
|
|
640
654
|
} finally {
|
|
641
|
-
|
|
655
|
+
Te(t), ae(r), Lt(i);
|
|
642
656
|
}
|
|
643
657
|
}
|
|
644
|
-
function
|
|
658
|
+
function Ti(e, t) {
|
|
645
659
|
if (!this.has_pending_snippet()) {
|
|
646
660
|
if (this.parent) {
|
|
647
661
|
var r;
|
|
648
|
-
|
|
662
|
+
S(P, r = this.parent, Ti).call(r, e, t);
|
|
649
663
|
}
|
|
650
664
|
return;
|
|
651
665
|
}
|
|
652
|
-
b(
|
|
653
|
-
b(
|
|
654
|
-
}),
|
|
666
|
+
b(Pe, this, a(Pe, this) + e), a(Pe, this) === 0 && (S(P, this, pr).call(this, t), a(V, this) && Nt(a(V, this), () => {
|
|
667
|
+
b(V, this, null);
|
|
668
|
+
}), a(Me, this) && (a(ee, this).before(a(Me, this)), b(Me, this, null)));
|
|
669
|
+
}
|
|
670
|
+
function Pr(e) {
|
|
671
|
+
a(se, this) && (te(a(se, this)), b(se, this, null)), a(V, this) && (te(a(V, this)), b(V, this, null)), a(X, this) && (te(a(X, this)), b(X, this, null)), Z && (at(a(Jt, this)), Mn(), at(Pn()));
|
|
672
|
+
var t = a(ne, this).onerror;
|
|
673
|
+
let r = a(ne, this).failed;
|
|
674
|
+
var i = !1, n = !1;
|
|
675
|
+
const o = () => {
|
|
676
|
+
if (i) {
|
|
677
|
+
Rn();
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
i = !0, n && Ln(), a(X, this) !== null && Nt(a(X, this), () => {
|
|
681
|
+
b(X, this, null);
|
|
682
|
+
}), S(P, this, tr).call(this, () => {
|
|
683
|
+
S(P, this, wi).call(this);
|
|
684
|
+
});
|
|
685
|
+
}, s = (l) => {
|
|
686
|
+
try {
|
|
687
|
+
n = !0, t?.(l, o), n = !1;
|
|
688
|
+
} catch (c) {
|
|
689
|
+
Ge(c, a(q, this) && a(q, this).parent);
|
|
690
|
+
}
|
|
691
|
+
r && b(X, this, S(P, this, tr).call(this, () => {
|
|
692
|
+
try {
|
|
693
|
+
return De(() => {
|
|
694
|
+
var c = A;
|
|
695
|
+
c.b = this, c.f |= 128, r(a(ee, this), () => l, () => o);
|
|
696
|
+
});
|
|
697
|
+
} catch (c) {
|
|
698
|
+
return Ge(c, a(q, this).parent), null;
|
|
699
|
+
}
|
|
700
|
+
}));
|
|
701
|
+
};
|
|
702
|
+
Ue(() => {
|
|
703
|
+
var l;
|
|
704
|
+
try {
|
|
705
|
+
l = this.transform_error(e);
|
|
706
|
+
} catch (c) {
|
|
707
|
+
Ge(c, a(q, this) && a(q, this).parent);
|
|
708
|
+
return;
|
|
709
|
+
}
|
|
710
|
+
l !== null && typeof l == "object" && typeof l.then == "function" ? l.then(s, (c) => Ge(c, a(q, this) && a(q, this).parent)) : s(l);
|
|
711
|
+
});
|
|
655
712
|
}
|
|
656
713
|
// @__NO_SIDE_EFFECTS__
|
|
657
|
-
function
|
|
658
|
-
var t = 2 |
|
|
659
|
-
return
|
|
660
|
-
ctx:
|
|
714
|
+
function vr(e) {
|
|
715
|
+
var t = 2 | le;
|
|
716
|
+
return A !== null && (A.f |= ut), {
|
|
717
|
+
ctx: L,
|
|
661
718
|
deps: null,
|
|
662
719
|
effects: null,
|
|
663
|
-
equals:
|
|
720
|
+
equals: oi,
|
|
664
721
|
f: t,
|
|
665
722
|
fn: e,
|
|
666
723
|
reactions: null,
|
|
667
724
|
rv: 0,
|
|
668
725
|
v: M,
|
|
669
726
|
wv: 0,
|
|
670
|
-
parent:
|
|
727
|
+
parent: A,
|
|
671
728
|
ac: null
|
|
672
729
|
};
|
|
673
730
|
}
|
|
674
731
|
// @__NO_SIDE_EFFECTS__
|
|
675
|
-
function
|
|
676
|
-
const t = /* @__PURE__ */
|
|
677
|
-
return
|
|
732
|
+
function xr(e) {
|
|
733
|
+
const t = /* @__PURE__ */ vr(e);
|
|
734
|
+
return we || Di(t), t;
|
|
678
735
|
}
|
|
679
736
|
// @__NO_SIDE_EFFECTS__
|
|
680
|
-
function
|
|
681
|
-
const t = /* @__PURE__ */
|
|
682
|
-
return t.equals =
|
|
737
|
+
function Jn(e) {
|
|
738
|
+
const t = /* @__PURE__ */ vr(e);
|
|
739
|
+
return t.equals = si, t;
|
|
683
740
|
}
|
|
684
|
-
function
|
|
741
|
+
function Zn(e) {
|
|
685
742
|
var t = e.effects;
|
|
686
743
|
if (t !== null) {
|
|
687
744
|
e.effects = null;
|
|
688
|
-
for (var r = 0; r < t.length; r += 1)
|
|
745
|
+
for (var r = 0; r < t.length; r += 1) te(t[r]);
|
|
689
746
|
}
|
|
690
747
|
}
|
|
691
|
-
function
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
return null;
|
|
697
|
-
}
|
|
698
|
-
function nr(e) {
|
|
699
|
-
var t, r = T;
|
|
700
|
-
if (_e(jn(e)), 0)
|
|
748
|
+
function gr(e) {
|
|
749
|
+
var t, r = A, i = e.parent;
|
|
750
|
+
if (!fe && i !== null && i.f & 24576)
|
|
751
|
+
return On(), e.v;
|
|
752
|
+
if (Te(i), 0)
|
|
701
753
|
try {
|
|
702
754
|
} finally {
|
|
703
755
|
}
|
|
704
756
|
else try {
|
|
705
|
-
e.f &= ~
|
|
757
|
+
e.f &= ~dt, Zn(e), t = zi(e);
|
|
706
758
|
} finally {
|
|
707
|
-
|
|
759
|
+
Te(r);
|
|
708
760
|
}
|
|
709
761
|
return t;
|
|
710
762
|
}
|
|
711
|
-
function
|
|
712
|
-
var t =
|
|
713
|
-
if (!e.equals(
|
|
714
|
-
|
|
763
|
+
function Ai(e) {
|
|
764
|
+
var t = gr(e);
|
|
765
|
+
if (!e.equals(t) && (e.wv = Bi(), (!I?.is_fork || e.deps === null) && (I !== null ? I.capture(e, t, !0) : e.v = t, e.deps === null))) {
|
|
766
|
+
O(e, re);
|
|
715
767
|
return;
|
|
716
768
|
}
|
|
717
|
-
|
|
769
|
+
fe || (x !== null ? (mr() || I?.is_fork) && x.set(e, t) : cr(e));
|
|
718
770
|
}
|
|
719
|
-
function
|
|
771
|
+
function eo(e) {
|
|
720
772
|
if (e.effects !== null)
|
|
721
|
-
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(
|
|
773
|
+
for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(lr), t.teardown = pn, t.ac = null, ct(t, 0), yr(t));
|
|
722
774
|
}
|
|
723
|
-
function
|
|
775
|
+
function Si(e) {
|
|
724
776
|
if (e.effects !== null)
|
|
725
|
-
for (const t of e.effects) t.teardown &&
|
|
777
|
+
for (const t of e.effects) t.teardown && Qe(t);
|
|
726
778
|
}
|
|
727
|
-
var
|
|
728
|
-
var
|
|
729
|
-
function
|
|
779
|
+
var rr = /* @__PURE__ */ new Set(), xe = /* @__PURE__ */ new Map();
|
|
780
|
+
var Ii = !1;
|
|
781
|
+
function Ht(e, t) {
|
|
730
782
|
var r = {
|
|
731
783
|
f: 0,
|
|
732
784
|
v: e,
|
|
733
785
|
reactions: null,
|
|
734
|
-
equals:
|
|
786
|
+
equals: oi,
|
|
735
787
|
rv: 0,
|
|
736
788
|
wv: 0
|
|
737
789
|
};
|
|
738
790
|
return r;
|
|
739
791
|
}
|
|
740
792
|
// @__NO_SIDE_EFFECTS__
|
|
741
|
-
function
|
|
742
|
-
const r =
|
|
743
|
-
return
|
|
793
|
+
function H(e, t) {
|
|
794
|
+
const r = Ht(e, t);
|
|
795
|
+
return Di(r), r;
|
|
744
796
|
}
|
|
745
797
|
// @__NO_SIDE_EFFECTS__
|
|
746
|
-
function
|
|
747
|
-
const i =
|
|
748
|
-
if (t || (i.equals =
|
|
798
|
+
function to(e, t = !1, r = !0) {
|
|
799
|
+
const i = Ht(e);
|
|
800
|
+
if (t || (i.equals = si), ft && r && L !== null && L.l !== null) {
|
|
749
801
|
var n;
|
|
750
|
-
((n =
|
|
802
|
+
((n = L.l).s ?? (n.s = [])).push(i);
|
|
751
803
|
}
|
|
752
804
|
return i;
|
|
753
805
|
}
|
|
754
806
|
function $(e, t, r = !1) {
|
|
755
|
-
|
|
756
|
-
let i = r ?
|
|
757
|
-
return
|
|
807
|
+
T !== null && (!J || T.f & 131072) && xt() && T.f & 4325394 && (K === null || !Ke.call(K, e)) && $n();
|
|
808
|
+
let i = r ? We(t) : t;
|
|
809
|
+
return Ei(e, i, Ot);
|
|
758
810
|
}
|
|
759
|
-
function
|
|
811
|
+
function Ei(e, t, r = null) {
|
|
760
812
|
if (!e.equals(t)) {
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
e.f & 2048 && nr(s), F === null && Zt(s);
|
|
813
|
+
xe.set(e, fe ? t : e.v);
|
|
814
|
+
var i = Je.ensure();
|
|
815
|
+
if (i.capture(e, t), e.f & 2) {
|
|
816
|
+
const n = e;
|
|
817
|
+
e.f & 2048 && gr(n), x === null && cr(n);
|
|
767
818
|
}
|
|
768
|
-
e.wv =
|
|
819
|
+
e.wv = Bi(), ki(e, le, r), xt() && A !== null && A.f & 1024 && !(A.f & 96) && (W === null ? _o([e]) : W.push(e)), !i.is_fork && rr.size > 0 && !Ii && ro();
|
|
769
820
|
}
|
|
770
821
|
return t;
|
|
771
822
|
}
|
|
772
|
-
function
|
|
773
|
-
|
|
774
|
-
for (const e of
|
|
775
|
-
e.f & 1024 &&
|
|
776
|
-
|
|
823
|
+
function ro() {
|
|
824
|
+
Ii = !1;
|
|
825
|
+
for (const e of rr)
|
|
826
|
+
e.f & 1024 && O(e, Fe), ht(e) && Qe(e);
|
|
827
|
+
rr.clear();
|
|
777
828
|
}
|
|
778
|
-
function
|
|
829
|
+
function st(e) {
|
|
779
830
|
$(e, e.v + 1);
|
|
780
831
|
}
|
|
781
|
-
function
|
|
832
|
+
function ki(e, t, r) {
|
|
782
833
|
var i = e.reactions;
|
|
783
834
|
if (i !== null)
|
|
784
|
-
for (var n =
|
|
785
|
-
var
|
|
786
|
-
if (!(!n &&
|
|
787
|
-
var
|
|
788
|
-
if (
|
|
789
|
-
var f =
|
|
790
|
-
|
|
791
|
-
} else if (
|
|
792
|
-
var
|
|
793
|
-
c & 16 &&
|
|
835
|
+
for (var n = xt(), o = i.length, s = 0; s < o; s++) {
|
|
836
|
+
var l = i[s], c = l.f;
|
|
837
|
+
if (!(!n && l === A)) {
|
|
838
|
+
var d = (c & le) === 0;
|
|
839
|
+
if (d && O(l, t), c & 2) {
|
|
840
|
+
var f = l;
|
|
841
|
+
x?.delete(f), c & 65536 || (c & 512 && (l.f |= dt), ki(f, Fe, r));
|
|
842
|
+
} else if (d) {
|
|
843
|
+
var v = l;
|
|
844
|
+
c & 16 && de !== null && de.add(v), r !== null ? r.push(v) : hr(v);
|
|
794
845
|
}
|
|
795
846
|
}
|
|
796
847
|
}
|
|
797
848
|
}
|
|
798
|
-
var
|
|
799
|
-
function
|
|
800
|
-
if (typeof e != "object" || e === null ||
|
|
801
|
-
const t =
|
|
802
|
-
if (t !==
|
|
803
|
-
var r = /* @__PURE__ */ new Map(), i =
|
|
804
|
-
if (
|
|
805
|
-
var h =
|
|
806
|
-
|
|
807
|
-
var
|
|
808
|
-
return
|
|
849
|
+
var io = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
850
|
+
function We(e) {
|
|
851
|
+
if (typeof e != "object" || e === null || nt in e) return e;
|
|
852
|
+
const t = hn(e);
|
|
853
|
+
if (t !== dn && t !== fn) return e;
|
|
854
|
+
var r = /* @__PURE__ */ new Map(), i = ln(e), n = /* @__PURE__ */ H(0), o = null, s = He, l = (v) => {
|
|
855
|
+
if (He === s) return v();
|
|
856
|
+
var h = T, g = He;
|
|
857
|
+
ae(null), Dr(s);
|
|
858
|
+
var p = v();
|
|
859
|
+
return ae(h), Dr(g), p;
|
|
809
860
|
};
|
|
810
|
-
i && r.set("length", /* @__PURE__ */
|
|
861
|
+
i && r.set("length", /* @__PURE__ */ H(e.length, o));
|
|
811
862
|
var c = "";
|
|
812
|
-
let
|
|
813
|
-
function f(
|
|
814
|
-
if (!
|
|
815
|
-
|
|
816
|
-
for (const [h,
|
|
817
|
-
|
|
863
|
+
let d = !1;
|
|
864
|
+
function f(v) {
|
|
865
|
+
if (!d) {
|
|
866
|
+
d = !0, c = v, Lr(n, `${c} version`);
|
|
867
|
+
for (const [h, g] of r) Lr(g, no(c, h));
|
|
868
|
+
d = !1;
|
|
818
869
|
}
|
|
819
870
|
}
|
|
820
871
|
return new Proxy(e, {
|
|
821
|
-
defineProperty(
|
|
822
|
-
(!("value" in
|
|
823
|
-
var
|
|
824
|
-
return
|
|
825
|
-
var y = /* @__PURE__ */
|
|
872
|
+
defineProperty(v, h, g) {
|
|
873
|
+
(!("value" in g) || g.configurable === !1 || g.enumerable === !1 || g.writable === !1) && kn();
|
|
874
|
+
var p = r.get(h);
|
|
875
|
+
return p === void 0 ? l(() => {
|
|
876
|
+
var y = /* @__PURE__ */ H(g.value, o);
|
|
826
877
|
return r.set(h, y), y;
|
|
827
|
-
}) : $(
|
|
878
|
+
}) : $(p, g.value, !0), !0;
|
|
828
879
|
},
|
|
829
|
-
deleteProperty(
|
|
830
|
-
var
|
|
831
|
-
if (
|
|
832
|
-
if (h in
|
|
833
|
-
const
|
|
834
|
-
r.set(h,
|
|
880
|
+
deleteProperty(v, h) {
|
|
881
|
+
var g = r.get(h);
|
|
882
|
+
if (g === void 0) {
|
|
883
|
+
if (h in v) {
|
|
884
|
+
const p = l(() => /* @__PURE__ */ H(M, o));
|
|
885
|
+
r.set(h, p), st(n);
|
|
835
886
|
}
|
|
836
887
|
} else
|
|
837
|
-
$(
|
|
888
|
+
$(g, M), st(n);
|
|
838
889
|
return !0;
|
|
839
890
|
},
|
|
840
|
-
get(
|
|
841
|
-
if (h ===
|
|
842
|
-
var
|
|
843
|
-
if (
|
|
844
|
-
var
|
|
845
|
-
return
|
|
846
|
-
}), r.set(h,
|
|
847
|
-
var _ =
|
|
891
|
+
get(v, h, g) {
|
|
892
|
+
if (h === nt) return e;
|
|
893
|
+
var p = r.get(h), y = h in v;
|
|
894
|
+
if (p === void 0 && (!y || Oe(v, h)?.writable) && (p = l(() => {
|
|
895
|
+
var E = /* @__PURE__ */ H(We(y ? v[h] : M), o);
|
|
896
|
+
return E;
|
|
897
|
+
}), r.set(h, p)), p !== void 0) {
|
|
898
|
+
var _ = m(p);
|
|
848
899
|
return _ === M ? void 0 : _;
|
|
849
900
|
}
|
|
850
|
-
return Reflect.get(
|
|
901
|
+
return Reflect.get(v, h, g);
|
|
851
902
|
},
|
|
852
|
-
getOwnPropertyDescriptor(
|
|
853
|
-
var
|
|
854
|
-
if (
|
|
855
|
-
var
|
|
856
|
-
|
|
857
|
-
} else if (
|
|
903
|
+
getOwnPropertyDescriptor(v, h) {
|
|
904
|
+
var g = Reflect.getOwnPropertyDescriptor(v, h);
|
|
905
|
+
if (g && "value" in g) {
|
|
906
|
+
var p = r.get(h);
|
|
907
|
+
p && (g.value = m(p));
|
|
908
|
+
} else if (g === void 0) {
|
|
858
909
|
var y = r.get(h), _ = y?.v;
|
|
859
910
|
if (y !== void 0 && _ !== M) return {
|
|
860
911
|
enumerable: !0,
|
|
@@ -863,106 +914,106 @@ function je(e) {
|
|
|
863
914
|
writable: !0
|
|
864
915
|
};
|
|
865
916
|
}
|
|
866
|
-
return
|
|
917
|
+
return g;
|
|
867
918
|
},
|
|
868
|
-
has(
|
|
869
|
-
if (h ===
|
|
870
|
-
var
|
|
871
|
-
return (
|
|
872
|
-
var y = /* @__PURE__ */
|
|
919
|
+
has(v, h) {
|
|
920
|
+
if (h === nt) return !0;
|
|
921
|
+
var g = r.get(h), p = g !== void 0 && g.v !== M || Reflect.has(v, h);
|
|
922
|
+
return (g !== void 0 || A !== null && (!p || Oe(v, h)?.writable)) && (g === void 0 && (g = l(() => {
|
|
923
|
+
var y = /* @__PURE__ */ H(p ? We(v[h]) : M, o);
|
|
873
924
|
return y;
|
|
874
|
-
}), r.set(h,
|
|
925
|
+
}), r.set(h, g)), m(g) === M) ? !1 : p;
|
|
875
926
|
},
|
|
876
|
-
set(
|
|
877
|
-
var y = r.get(h), _ = h in
|
|
878
|
-
if (i && h === "length") for (var
|
|
879
|
-
var
|
|
880
|
-
|
|
927
|
+
set(v, h, g, p) {
|
|
928
|
+
var y = r.get(h), _ = h in v;
|
|
929
|
+
if (i && h === "length") for (var E = g; E < y.v; E += 1) {
|
|
930
|
+
var j = r.get(E + "");
|
|
931
|
+
j !== void 0 ? $(j, M) : E in v && (j = l(() => /* @__PURE__ */ H(M, o)), r.set(E + "", j));
|
|
881
932
|
}
|
|
882
933
|
if (y === void 0)
|
|
883
|
-
(!_ ||
|
|
934
|
+
(!_ || Oe(v, h)?.writable) && (y = l(() => /* @__PURE__ */ H(void 0, o)), $(y, We(g)), r.set(h, y));
|
|
884
935
|
else {
|
|
885
936
|
_ = y.v !== M;
|
|
886
|
-
var
|
|
887
|
-
$(y,
|
|
937
|
+
var C = l(() => We(g));
|
|
938
|
+
$(y, C);
|
|
888
939
|
}
|
|
889
|
-
var
|
|
890
|
-
if (
|
|
940
|
+
var U = Reflect.getOwnPropertyDescriptor(v, h);
|
|
941
|
+
if (U?.set && U.set.call(p, g), !_) {
|
|
891
942
|
if (i && typeof h == "string") {
|
|
892
|
-
var
|
|
893
|
-
Number.isInteger(
|
|
943
|
+
var Se = r.get("length"), et = Number(h);
|
|
944
|
+
Number.isInteger(et) && et >= Se.v && $(Se, et + 1);
|
|
894
945
|
}
|
|
895
|
-
|
|
946
|
+
st(n);
|
|
896
947
|
}
|
|
897
948
|
return !0;
|
|
898
949
|
},
|
|
899
|
-
ownKeys(
|
|
900
|
-
|
|
901
|
-
var h = Reflect.ownKeys(
|
|
950
|
+
ownKeys(v) {
|
|
951
|
+
m(n);
|
|
952
|
+
var h = Reflect.ownKeys(v).filter((y) => {
|
|
902
953
|
var _ = r.get(y);
|
|
903
954
|
return _ === void 0 || _.v !== M;
|
|
904
955
|
});
|
|
905
|
-
for (var [
|
|
956
|
+
for (var [g, p] of r) p.v !== M && !(g in v) && h.push(g);
|
|
906
957
|
return h;
|
|
907
958
|
},
|
|
908
959
|
setPrototypeOf() {
|
|
909
|
-
|
|
960
|
+
Cn();
|
|
910
961
|
}
|
|
911
962
|
});
|
|
912
963
|
}
|
|
913
|
-
function
|
|
914
|
-
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` :
|
|
964
|
+
function no(e, t) {
|
|
965
|
+
return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : io.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
|
|
915
966
|
}
|
|
916
|
-
var
|
|
917
|
-
function
|
|
918
|
-
if (
|
|
919
|
-
|
|
967
|
+
var Hr, oo, Ci, $i, Li;
|
|
968
|
+
function ir() {
|
|
969
|
+
if (Hr === void 0) {
|
|
970
|
+
Hr = window, oo = document, Ci = /Firefox/.test(navigator.userAgent);
|
|
920
971
|
var e = Element.prototype, t = Node.prototype, r = Text.prototype;
|
|
921
|
-
|
|
972
|
+
$i = Oe(t, "firstChild").get, Li = Oe(t, "nextSibling").get, kr(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), kr(r) && (r.__t = void 0);
|
|
922
973
|
}
|
|
923
974
|
}
|
|
924
|
-
function
|
|
975
|
+
function Oi(e = "") {
|
|
925
976
|
return document.createTextNode(e);
|
|
926
977
|
}
|
|
927
978
|
// @__NO_SIDE_EFFECTS__
|
|
928
|
-
function
|
|
929
|
-
return
|
|
979
|
+
function nr(e) {
|
|
980
|
+
return $i.call(e);
|
|
930
981
|
}
|
|
931
982
|
// @__NO_SIDE_EFFECTS__
|
|
932
|
-
function
|
|
933
|
-
return
|
|
983
|
+
function Ze(e) {
|
|
984
|
+
return Li.call(e);
|
|
934
985
|
}
|
|
935
|
-
function
|
|
986
|
+
function so(e) {
|
|
936
987
|
e.textContent = "";
|
|
937
988
|
}
|
|
938
|
-
function
|
|
989
|
+
function Ri(e, t, r) {
|
|
939
990
|
let i = r ? { is: r } : void 0;
|
|
940
991
|
return document.createElementNS(t ?? "http://www.w3.org/1999/xhtml", e, i);
|
|
941
992
|
}
|
|
942
|
-
function
|
|
943
|
-
var t =
|
|
944
|
-
|
|
993
|
+
function Mi(e) {
|
|
994
|
+
var t = T, r = A;
|
|
995
|
+
ae(null), Te(null);
|
|
945
996
|
try {
|
|
946
997
|
return e();
|
|
947
998
|
} finally {
|
|
948
|
-
|
|
999
|
+
ae(t), Te(r);
|
|
949
1000
|
}
|
|
950
1001
|
}
|
|
951
|
-
function
|
|
952
|
-
|
|
1002
|
+
function ao(e) {
|
|
1003
|
+
A === null && (T === null && An(e), Tn()), fe && wn(e);
|
|
953
1004
|
}
|
|
954
|
-
function
|
|
1005
|
+
function lo(e, t) {
|
|
955
1006
|
var r = t.last;
|
|
956
1007
|
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
957
1008
|
}
|
|
958
|
-
function
|
|
959
|
-
var r =
|
|
960
|
-
r !== null && r.f & 8192 && (e |=
|
|
1009
|
+
function Be(e, t) {
|
|
1010
|
+
var r = A;
|
|
1011
|
+
r !== null && r.f & 8192 && (e |= Jr);
|
|
961
1012
|
var i = {
|
|
962
|
-
ctx:
|
|
1013
|
+
ctx: L,
|
|
963
1014
|
deps: null,
|
|
964
1015
|
nodes: null,
|
|
965
|
-
f: e |
|
|
1016
|
+
f: e | le | 512,
|
|
966
1017
|
first: null,
|
|
967
1018
|
fn: t,
|
|
968
1019
|
last: null,
|
|
@@ -973,307 +1024,313 @@ function xe(e, t) {
|
|
|
973
1024
|
teardown: null,
|
|
974
1025
|
wv: 0,
|
|
975
1026
|
ac: null
|
|
976
|
-
}
|
|
977
|
-
|
|
1027
|
+
};
|
|
1028
|
+
I?.register_created_effect(i);
|
|
1029
|
+
var n = i;
|
|
1030
|
+
if (e & 4) Ye !== null ? Ye.push(i) : Je.ensure().schedule(i);
|
|
978
1031
|
else if (t !== null) {
|
|
979
1032
|
try {
|
|
980
|
-
|
|
981
|
-
} catch (
|
|
982
|
-
throw
|
|
1033
|
+
Qe(i);
|
|
1034
|
+
} catch (s) {
|
|
1035
|
+
throw te(i), s;
|
|
983
1036
|
}
|
|
984
|
-
n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && !(n.f & 524288) && (n = n.first, e & 16 && e & 65536 && n !== null && (n.f |=
|
|
1037
|
+
n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && !(n.f & 524288) && (n = n.first, e & 16 && e & 65536 && n !== null && (n.f |= ei));
|
|
985
1038
|
}
|
|
986
|
-
if (n !== null && (n.parent = r, r !== null &&
|
|
987
|
-
var
|
|
988
|
-
(
|
|
1039
|
+
if (n !== null && (n.parent = r, r !== null && lo(n, r), T !== null && T.f & 2 && !(e & 64))) {
|
|
1040
|
+
var o = T;
|
|
1041
|
+
(o.effects ?? (o.effects = [])).push(n);
|
|
989
1042
|
}
|
|
990
1043
|
return i;
|
|
991
1044
|
}
|
|
992
|
-
function
|
|
993
|
-
return
|
|
1045
|
+
function mr() {
|
|
1046
|
+
return T !== null && !J;
|
|
994
1047
|
}
|
|
995
|
-
function
|
|
996
|
-
|
|
997
|
-
var t =
|
|
998
|
-
if (!
|
|
999
|
-
var r =
|
|
1048
|
+
function Ce(e) {
|
|
1049
|
+
ao("$effect");
|
|
1050
|
+
var t = A.f;
|
|
1051
|
+
if (!T && t & 32 && !(t & 32768)) {
|
|
1052
|
+
var r = L;
|
|
1000
1053
|
(r.e ?? (r.e = [])).push(e);
|
|
1001
|
-
} else return
|
|
1054
|
+
} else return Pi(e);
|
|
1002
1055
|
}
|
|
1003
|
-
function
|
|
1004
|
-
return
|
|
1056
|
+
function Pi(e) {
|
|
1057
|
+
return Be(4 | _n, e);
|
|
1005
1058
|
}
|
|
1006
|
-
function
|
|
1007
|
-
|
|
1008
|
-
const t =
|
|
1059
|
+
function co(e) {
|
|
1060
|
+
Je.ensure();
|
|
1061
|
+
const t = Be(64 | ut, e);
|
|
1009
1062
|
return () => {
|
|
1010
|
-
|
|
1063
|
+
te(t);
|
|
1011
1064
|
};
|
|
1012
1065
|
}
|
|
1013
|
-
function
|
|
1014
|
-
|
|
1015
|
-
const t =
|
|
1066
|
+
function uo(e) {
|
|
1067
|
+
Je.ensure();
|
|
1068
|
+
const t = Be(64 | ut, e);
|
|
1016
1069
|
return (r = {}) => new Promise((i) => {
|
|
1017
|
-
r.outro ?
|
|
1018
|
-
|
|
1019
|
-
}) : (
|
|
1070
|
+
r.outro ? Nt(t, () => {
|
|
1071
|
+
te(t), i(void 0);
|
|
1072
|
+
}) : (te(t), i(void 0));
|
|
1020
1073
|
});
|
|
1021
1074
|
}
|
|
1022
|
-
function
|
|
1023
|
-
return
|
|
1075
|
+
function fo(e) {
|
|
1076
|
+
return Be(4, e);
|
|
1024
1077
|
}
|
|
1025
|
-
function
|
|
1026
|
-
return
|
|
1078
|
+
function _r(e, t = 0) {
|
|
1079
|
+
return Be(8 | t, e);
|
|
1027
1080
|
}
|
|
1028
|
-
function
|
|
1029
|
-
var r =
|
|
1081
|
+
function ho(e, t = 0) {
|
|
1082
|
+
var r = Be(16 | t, e);
|
|
1030
1083
|
return r;
|
|
1031
1084
|
}
|
|
1032
|
-
function
|
|
1033
|
-
return
|
|
1085
|
+
function De(e) {
|
|
1086
|
+
return Be(32 | ut, e);
|
|
1034
1087
|
}
|
|
1035
|
-
function
|
|
1088
|
+
function xi(e) {
|
|
1036
1089
|
var t = e.teardown;
|
|
1037
1090
|
if (t !== null) {
|
|
1038
|
-
const r =
|
|
1039
|
-
|
|
1091
|
+
const r = fe, i = T;
|
|
1092
|
+
Nr(!0), ae(null);
|
|
1040
1093
|
try {
|
|
1041
1094
|
t.call(null);
|
|
1042
1095
|
} finally {
|
|
1043
|
-
|
|
1096
|
+
Nr(r), ae(i);
|
|
1044
1097
|
}
|
|
1045
1098
|
}
|
|
1046
1099
|
}
|
|
1047
|
-
function
|
|
1100
|
+
function yr(e, t = !1) {
|
|
1048
1101
|
var r = e.first;
|
|
1049
1102
|
for (e.first = e.last = null; r !== null; ) {
|
|
1050
1103
|
const n = r.ac;
|
|
1051
|
-
n !== null &&
|
|
1052
|
-
n.abort(
|
|
1104
|
+
n !== null && Mi(() => {
|
|
1105
|
+
n.abort(lr);
|
|
1053
1106
|
});
|
|
1054
1107
|
var i = r.next;
|
|
1055
|
-
r.f & 64 ? r.parent = null :
|
|
1108
|
+
r.f & 64 ? r.parent = null : te(r, t), r = i;
|
|
1056
1109
|
}
|
|
1057
1110
|
}
|
|
1058
|
-
function
|
|
1111
|
+
function po(e) {
|
|
1059
1112
|
for (var t = e.first; t !== null; ) {
|
|
1060
1113
|
var r = t.next;
|
|
1061
|
-
t.f & 32 ||
|
|
1114
|
+
t.f & 32 || te(t), t = r;
|
|
1062
1115
|
}
|
|
1063
1116
|
}
|
|
1064
|
-
function
|
|
1117
|
+
function te(e, t = !0) {
|
|
1065
1118
|
var r = !1;
|
|
1066
|
-
(t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (
|
|
1119
|
+
(t || e.f & 262144) && e.nodes !== null && e.nodes.end !== null && (vo(e.nodes.start, e.nodes.end), r = !0), O(e, Cr), yr(e, t && !r), ct(e, 0);
|
|
1067
1120
|
var i = e.nodes && e.nodes.t;
|
|
1068
|
-
if (i !== null) for (const
|
|
1069
|
-
|
|
1121
|
+
if (i !== null) for (const o of i) o.stop();
|
|
1122
|
+
xi(e), e.f ^= Cr, e.f |= mn;
|
|
1070
1123
|
var n = e.parent;
|
|
1071
|
-
n !== null && n.first !== null &&
|
|
1124
|
+
n !== null && n.first !== null && Hi(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
|
|
1072
1125
|
}
|
|
1073
|
-
function
|
|
1126
|
+
function vo(e, t) {
|
|
1074
1127
|
for (; e !== null; ) {
|
|
1075
|
-
var r = e === t ? null : /* @__PURE__ */
|
|
1128
|
+
var r = e === t ? null : /* @__PURE__ */ Ze(e);
|
|
1076
1129
|
e.remove(), e = r;
|
|
1077
1130
|
}
|
|
1078
1131
|
}
|
|
1079
|
-
function
|
|
1132
|
+
function Hi(e) {
|
|
1080
1133
|
var t = e.parent, r = e.prev, i = e.next;
|
|
1081
1134
|
r !== null && (r.next = i), i !== null && (i.prev = r), t !== null && (t.first === e && (t.first = i), t.last === e && (t.last = r));
|
|
1082
1135
|
}
|
|
1083
|
-
function
|
|
1136
|
+
function Nt(e, t, r = !0) {
|
|
1084
1137
|
var i = [];
|
|
1085
|
-
|
|
1138
|
+
Ni(e, i, !0);
|
|
1086
1139
|
var n = () => {
|
|
1087
|
-
r &&
|
|
1088
|
-
},
|
|
1089
|
-
if (
|
|
1090
|
-
var
|
|
1091
|
-
for (var
|
|
1140
|
+
r && te(e), t && t();
|
|
1141
|
+
}, o = i.length;
|
|
1142
|
+
if (o > 0) {
|
|
1143
|
+
var s = () => --o || n();
|
|
1144
|
+
for (var l of i) l.out(s);
|
|
1092
1145
|
} else n();
|
|
1093
1146
|
}
|
|
1094
|
-
function
|
|
1147
|
+
function Ni(e, t, r) {
|
|
1095
1148
|
if (!(e.f & 8192)) {
|
|
1096
|
-
e.f ^=
|
|
1149
|
+
e.f ^= Jr;
|
|
1097
1150
|
var i = e.nodes && e.nodes.t;
|
|
1098
1151
|
if (i !== null)
|
|
1099
|
-
for (const
|
|
1152
|
+
for (const l of i) (l.is_global || r) && t.push(l);
|
|
1100
1153
|
for (var n = e.first; n !== null; ) {
|
|
1101
|
-
var
|
|
1102
|
-
|
|
1154
|
+
var o = n.next;
|
|
1155
|
+
if (!(n.f & 64)) {
|
|
1156
|
+
var s = (n.f & 65536) !== 0 || (n.f & 32) !== 0 && (e.f & 16) !== 0;
|
|
1157
|
+
Ni(n, t, s ? r : !1);
|
|
1158
|
+
}
|
|
1159
|
+
n = o;
|
|
1103
1160
|
}
|
|
1104
1161
|
}
|
|
1105
1162
|
}
|
|
1106
|
-
function
|
|
1163
|
+
function go(e, t) {
|
|
1107
1164
|
if (e.nodes)
|
|
1108
1165
|
for (var r = e.nodes.start, i = e.nodes.end; r !== null; ) {
|
|
1109
|
-
var n = r === i ? null : /* @__PURE__ */
|
|
1166
|
+
var n = r === i ? null : /* @__PURE__ */ Ze(r);
|
|
1110
1167
|
t.append(r), r = n;
|
|
1111
1168
|
}
|
|
1112
1169
|
}
|
|
1113
|
-
var
|
|
1114
|
-
function
|
|
1115
|
-
|
|
1116
|
-
}
|
|
1117
|
-
var w = null, J = !1;
|
|
1118
|
-
function ie(e) {
|
|
1119
|
-
w = e;
|
|
1170
|
+
var mo = null, At = !1, fe = !1;
|
|
1171
|
+
function Nr(e) {
|
|
1172
|
+
fe = e;
|
|
1120
1173
|
}
|
|
1121
|
-
var T = null;
|
|
1122
|
-
function
|
|
1174
|
+
var T = null, J = !1;
|
|
1175
|
+
function ae(e) {
|
|
1123
1176
|
T = e;
|
|
1124
1177
|
}
|
|
1125
|
-
var
|
|
1126
|
-
function
|
|
1127
|
-
|
|
1178
|
+
var A = null;
|
|
1179
|
+
function Te(e) {
|
|
1180
|
+
A = e;
|
|
1128
1181
|
}
|
|
1129
|
-
var
|
|
1130
|
-
function
|
|
1131
|
-
|
|
1182
|
+
var K = null;
|
|
1183
|
+
function Di(e) {
|
|
1184
|
+
T !== null && (!we || T.f & 2) && (K === null ? K = [e] : K.push(e));
|
|
1132
1185
|
}
|
|
1133
|
-
var
|
|
1134
|
-
function
|
|
1135
|
-
|
|
1186
|
+
var B = null, z = 0, W = null;
|
|
1187
|
+
function _o(e) {
|
|
1188
|
+
W = e;
|
|
1136
1189
|
}
|
|
1137
|
-
|
|
1138
|
-
|
|
1190
|
+
var Fi = 1, Le = 0, He = Le;
|
|
1191
|
+
function Dr(e) {
|
|
1192
|
+
He = e;
|
|
1139
1193
|
}
|
|
1140
|
-
function
|
|
1194
|
+
function Bi() {
|
|
1195
|
+
return ++Fi;
|
|
1196
|
+
}
|
|
1197
|
+
function ht(e) {
|
|
1141
1198
|
var t = e.f;
|
|
1142
1199
|
if (t & 2048) return !0;
|
|
1143
|
-
if (t & 2 && (e.f &= ~
|
|
1200
|
+
if (t & 2 && (e.f &= ~dt), t & 4096) {
|
|
1144
1201
|
for (var r = e.deps, i = r.length, n = 0; n < i; n++) {
|
|
1145
|
-
var
|
|
1146
|
-
if (
|
|
1202
|
+
var o = r[n];
|
|
1203
|
+
if (ht(o) && Ai(o), o.wv > e.wv) return !0;
|
|
1147
1204
|
}
|
|
1148
|
-
t & 512 &&
|
|
1205
|
+
t & 512 && x === null && O(e, re);
|
|
1149
1206
|
}
|
|
1150
1207
|
return !1;
|
|
1151
1208
|
}
|
|
1152
|
-
function
|
|
1209
|
+
function ji(e, t, r = !0) {
|
|
1153
1210
|
var i = e.reactions;
|
|
1154
|
-
if (i !== null && !(!
|
|
1211
|
+
if (i !== null && !(!we && K !== null && Ke.call(K, e)))
|
|
1155
1212
|
for (var n = 0; n < i.length; n++) {
|
|
1156
|
-
var
|
|
1157
|
-
|
|
1213
|
+
var o = i[n];
|
|
1214
|
+
o.f & 2 ? ji(o, t, !1) : t === o && (r ? O(o, le) : o.f & 1024 && O(o, Fe), hr(o));
|
|
1158
1215
|
}
|
|
1159
1216
|
}
|
|
1160
|
-
function
|
|
1161
|
-
var t =
|
|
1162
|
-
|
|
1163
|
-
e.ac.abort(
|
|
1217
|
+
function zi(e) {
|
|
1218
|
+
var t = B, r = z, i = W, n = T, o = K, s = L, l = J, c = He, d = e.f;
|
|
1219
|
+
B = null, z = 0, W = null, T = d & 96 ? null : e, K = null, Lt(e.ctx), J = !1, He = ++Le, e.ac !== null && (Mi(() => {
|
|
1220
|
+
e.ac.abort(lr);
|
|
1164
1221
|
}), e.ac = null);
|
|
1165
1222
|
try {
|
|
1166
|
-
e.f |=
|
|
1167
|
-
var f = e.fn,
|
|
1168
|
-
e.f |=
|
|
1169
|
-
var h = e.deps,
|
|
1170
|
-
if (
|
|
1171
|
-
var
|
|
1172
|
-
if (
|
|
1173
|
-
for (h.length =
|
|
1174
|
-
else e.deps = h =
|
|
1175
|
-
if (
|
|
1223
|
+
e.f |= $r;
|
|
1224
|
+
var f = e.fn, v = f();
|
|
1225
|
+
e.f |= Zr;
|
|
1226
|
+
var h = e.deps, g = I?.is_fork;
|
|
1227
|
+
if (B !== null) {
|
|
1228
|
+
var p;
|
|
1229
|
+
if (g || ct(e, z), h !== null && z > 0)
|
|
1230
|
+
for (h.length = z + B.length, p = 0; p < B.length; p++) h[z + p] = B[p];
|
|
1231
|
+
else e.deps = h = B;
|
|
1232
|
+
if (mr() && e.f & 512) for (p = z; p < h.length; p++) {
|
|
1176
1233
|
var y;
|
|
1177
|
-
((y = h[
|
|
1234
|
+
((y = h[p]).reactions ?? (y.reactions = [])).push(e);
|
|
1178
1235
|
}
|
|
1179
|
-
} else !
|
|
1180
|
-
if (
|
|
1236
|
+
} else !g && h !== null && z < h.length && (ct(e, z), h.length = z);
|
|
1237
|
+
if (xt() && W !== null && !J && h !== null && !(e.f & 6146)) for (p = 0; p < W.length; p++) ji(W[p], e);
|
|
1181
1238
|
if (n !== null && n !== e) {
|
|
1182
|
-
if (
|
|
1183
|
-
if (t !== null) for (const _ of t) _.rv =
|
|
1184
|
-
|
|
1239
|
+
if (Le++, n.deps !== null) for (let _ = 0; _ < r; _ += 1) n.deps[_].rv = Le;
|
|
1240
|
+
if (t !== null) for (const _ of t) _.rv = Le;
|
|
1241
|
+
W !== null && (i === null ? i = W : i.push(...W));
|
|
1185
1242
|
}
|
|
1186
|
-
return e.f & 8388608 && (e.f ^=
|
|
1243
|
+
return e.f & 8388608 && (e.f ^= ti), v;
|
|
1187
1244
|
} catch (_) {
|
|
1188
|
-
return
|
|
1245
|
+
return ui(_);
|
|
1189
1246
|
} finally {
|
|
1190
|
-
e.f ^=
|
|
1247
|
+
e.f ^= $r, B = t, z = r, W = i, T = n, K = o, Lt(s), J = l, He = c;
|
|
1191
1248
|
}
|
|
1192
1249
|
}
|
|
1193
|
-
function
|
|
1250
|
+
function yo(e, t) {
|
|
1194
1251
|
let r = t.reactions;
|
|
1195
1252
|
if (r !== null) {
|
|
1196
|
-
var i =
|
|
1253
|
+
var i = cn.call(r, e);
|
|
1197
1254
|
if (i !== -1) {
|
|
1198
1255
|
var n = r.length - 1;
|
|
1199
1256
|
n === 0 ? r = t.reactions = null : (r[i] = r[n], r.pop());
|
|
1200
1257
|
}
|
|
1201
1258
|
}
|
|
1202
|
-
if (r === null && t.f & 2 && (
|
|
1203
|
-
var
|
|
1204
|
-
|
|
1259
|
+
if (r === null && t.f & 2 && (B === null || !Ke.call(B, t))) {
|
|
1260
|
+
var o = t;
|
|
1261
|
+
o.f & 512 && (o.f ^= 512, o.f &= ~dt), o.v !== M && cr(o), eo(o), ct(o, 0);
|
|
1205
1262
|
}
|
|
1206
1263
|
}
|
|
1207
|
-
function
|
|
1264
|
+
function ct(e, t) {
|
|
1208
1265
|
var r = e.deps;
|
|
1209
1266
|
if (r !== null)
|
|
1210
|
-
for (var i = t; i < r.length; i++)
|
|
1267
|
+
for (var i = t; i < r.length; i++) yo(e, r[i]);
|
|
1211
1268
|
}
|
|
1212
|
-
function
|
|
1269
|
+
function Qe(e) {
|
|
1213
1270
|
var t = e.f;
|
|
1214
1271
|
if (!(t & 16384)) {
|
|
1215
|
-
|
|
1216
|
-
var r =
|
|
1217
|
-
if (
|
|
1218
|
-
var n,
|
|
1272
|
+
O(e, re);
|
|
1273
|
+
var r = A, i = At;
|
|
1274
|
+
if (A = e, At = !0, 0)
|
|
1275
|
+
var n, o;
|
|
1219
1276
|
try {
|
|
1220
|
-
t & 16777232 ?
|
|
1221
|
-
var
|
|
1222
|
-
if (e.teardown = typeof
|
|
1223
|
-
for (var
|
|
1277
|
+
t & 16777232 ? po(e) : yr(e), xi(e);
|
|
1278
|
+
var s = zi(e);
|
|
1279
|
+
if (e.teardown = typeof s == "function" ? s : null, e.wv = Fi, 0)
|
|
1280
|
+
for (var l of e.deps) ;
|
|
1224
1281
|
} finally {
|
|
1225
|
-
|
|
1282
|
+
At = i, A = r;
|
|
1226
1283
|
}
|
|
1227
1284
|
}
|
|
1228
1285
|
}
|
|
1229
|
-
function
|
|
1286
|
+
function m(e) {
|
|
1230
1287
|
var t = (e.f & 2) !== 0;
|
|
1231
|
-
if (
|
|
1232
|
-
var r =
|
|
1233
|
-
if (
|
|
1234
|
-
e.rv <
|
|
1288
|
+
if (mo?.add(e), T !== null && !J && !(A !== null && A.f & 16384) && (K === null || !Ke.call(K, e))) {
|
|
1289
|
+
var r = T.deps;
|
|
1290
|
+
if (T.f & 2097152)
|
|
1291
|
+
e.rv < Le && (e.rv = Le, B === null && r !== null && r[z] === e ? z++ : B === null ? B = [e] : B.push(e));
|
|
1235
1292
|
else {
|
|
1236
1293
|
var i;
|
|
1237
|
-
((i =
|
|
1294
|
+
((i = T).deps ?? (i.deps = [])).push(e);
|
|
1238
1295
|
var n = e.reactions;
|
|
1239
|
-
n === null ? e.reactions = [
|
|
1296
|
+
n === null ? e.reactions = [T] : Ke.call(n, T) || n.push(T);
|
|
1240
1297
|
}
|
|
1241
1298
|
}
|
|
1242
1299
|
if (0) {
|
|
1243
|
-
if (!J && reactivity_loss_tracker && !reactivity_loss_tracker.warned && !(reactivity_loss_tracker.effect.f & 2097152))
|
|
1244
|
-
var
|
|
1245
|
-
if (tracing_mode_flag && !J && tracing_expressions !== null &&
|
|
1246
|
-
if (
|
|
1247
|
-
var
|
|
1300
|
+
if (!J && reactivity_loss_tracker && !reactivity_loss_tracker.warned && !(reactivity_loss_tracker.effect.f & 2097152) && !reactivity_loss_tracker.effect_deps.has(e))
|
|
1301
|
+
var o;
|
|
1302
|
+
if (tracing_mode_flag && !J && tracing_expressions !== null && T !== null && tracing_expressions.reaction === T && !e.trace) {
|
|
1303
|
+
if (o)
|
|
1304
|
+
var s, l;
|
|
1248
1305
|
}
|
|
1249
1306
|
}
|
|
1250
|
-
if (
|
|
1307
|
+
if (fe && xe.has(e)) return xe.get(e);
|
|
1251
1308
|
if (t) {
|
|
1252
1309
|
var c = e;
|
|
1253
|
-
if (
|
|
1254
|
-
var
|
|
1255
|
-
return (!(c.f & 1024) && c.reactions !== null ||
|
|
1310
|
+
if (fe) {
|
|
1311
|
+
var d = c.v;
|
|
1312
|
+
return (!(c.f & 1024) && c.reactions !== null || Gi(c)) && (d = gr(c)), xe.set(c, d), d;
|
|
1256
1313
|
}
|
|
1257
|
-
var f = (c.f & 512) === 0 && !J &&
|
|
1258
|
-
|
|
1314
|
+
var f = (c.f & 512) === 0 && !J && T !== null && (At || (T.f & 512) !== 0), v = (c.f & Zr) === 0;
|
|
1315
|
+
ht(c) && (f && (c.f |= 512), Ai(c)), f && !v && (Si(c), Vi(c));
|
|
1259
1316
|
}
|
|
1260
|
-
if (
|
|
1317
|
+
if (x?.has(e)) return x.get(e);
|
|
1261
1318
|
if (e.f & 8388608) throw e.v;
|
|
1262
1319
|
return e.v;
|
|
1263
1320
|
}
|
|
1264
|
-
function
|
|
1321
|
+
function Vi(e) {
|
|
1265
1322
|
if (e.f |= 512, e.deps !== null)
|
|
1266
1323
|
for (const t of e.deps)
|
|
1267
|
-
(t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (
|
|
1324
|
+
(t.reactions ?? (t.reactions = [])).push(e), t.f & 2 && !(t.f & 512) && (Si(t), Vi(t));
|
|
1268
1325
|
}
|
|
1269
|
-
function
|
|
1326
|
+
function Gi(e) {
|
|
1270
1327
|
if (e.v === M) return !0;
|
|
1271
1328
|
if (e.deps === null) return !1;
|
|
1272
1329
|
for (const t of e.deps)
|
|
1273
|
-
if (
|
|
1330
|
+
if (xe.has(t) || t.f & 2 && Gi(t)) return !0;
|
|
1274
1331
|
return !1;
|
|
1275
1332
|
}
|
|
1276
|
-
function
|
|
1333
|
+
function Dt(e) {
|
|
1277
1334
|
var t = J;
|
|
1278
1335
|
try {
|
|
1279
1336
|
return J = !0, e();
|
|
@@ -1281,63 +1338,63 @@ function Rt(e) {
|
|
|
1281
1338
|
J = t;
|
|
1282
1339
|
}
|
|
1283
1340
|
}
|
|
1284
|
-
var
|
|
1285
|
-
function
|
|
1286
|
-
var t = this, r = t.ownerDocument, i = e.type, n = e.composedPath?.() || [],
|
|
1287
|
-
|
|
1288
|
-
var
|
|
1289
|
-
if (
|
|
1290
|
-
var c = n.indexOf(
|
|
1341
|
+
var yt = Symbol("events"), bo = /* @__PURE__ */ new Set(), Fr = /* @__PURE__ */ new Set(), Br = null;
|
|
1342
|
+
function jr(e) {
|
|
1343
|
+
var t = this, r = t.ownerDocument, i = e.type, n = e.composedPath?.() || [], o = n[0] || e.target;
|
|
1344
|
+
Br = e;
|
|
1345
|
+
var s = 0, l = Br === e && e[yt];
|
|
1346
|
+
if (l) {
|
|
1347
|
+
var c = n.indexOf(l);
|
|
1291
1348
|
if (c !== -1 && (t === document || t === window)) {
|
|
1292
|
-
e[
|
|
1349
|
+
e[yt] = t;
|
|
1293
1350
|
return;
|
|
1294
1351
|
}
|
|
1295
|
-
var
|
|
1296
|
-
if (
|
|
1297
|
-
c <=
|
|
1352
|
+
var d = n.indexOf(t);
|
|
1353
|
+
if (d === -1) return;
|
|
1354
|
+
c <= d && (s = c);
|
|
1298
1355
|
}
|
|
1299
|
-
if (
|
|
1300
|
-
|
|
1356
|
+
if (o = n[s] || e.target, o !== t) {
|
|
1357
|
+
$t(e, "currentTarget", {
|
|
1301
1358
|
configurable: !0,
|
|
1302
1359
|
get() {
|
|
1303
|
-
return
|
|
1360
|
+
return o || r;
|
|
1304
1361
|
}
|
|
1305
1362
|
});
|
|
1306
|
-
var f =
|
|
1307
|
-
|
|
1363
|
+
var f = T, v = A;
|
|
1364
|
+
ae(null), Te(null);
|
|
1308
1365
|
try {
|
|
1309
|
-
for (var h,
|
|
1310
|
-
var
|
|
1366
|
+
for (var h, g = []; o !== null; ) {
|
|
1367
|
+
var p = o.assignedSlot || o.parentNode || o.host || null;
|
|
1311
1368
|
try {
|
|
1312
|
-
var y =
|
|
1313
|
-
y != null && (!
|
|
1369
|
+
var y = o[yt]?.[i];
|
|
1370
|
+
y != null && (!o.disabled || e.target === o) && y.call(o, e);
|
|
1314
1371
|
} catch (_) {
|
|
1315
|
-
h ?
|
|
1372
|
+
h ? g.push(_) : h = _;
|
|
1316
1373
|
}
|
|
1317
|
-
if (e.cancelBubble ||
|
|
1318
|
-
|
|
1374
|
+
if (e.cancelBubble || p === t || p === null) break;
|
|
1375
|
+
o = p;
|
|
1319
1376
|
}
|
|
1320
1377
|
if (h) {
|
|
1321
|
-
for (let _ of
|
|
1378
|
+
for (let _ of g) queueMicrotask(() => {
|
|
1322
1379
|
throw _;
|
|
1323
1380
|
});
|
|
1324
1381
|
throw h;
|
|
1325
1382
|
}
|
|
1326
1383
|
} finally {
|
|
1327
|
-
e[
|
|
1384
|
+
e[yt] = t, delete e.currentTarget, ae(f), Te(v);
|
|
1328
1385
|
}
|
|
1329
1386
|
}
|
|
1330
1387
|
}
|
|
1331
|
-
var
|
|
1332
|
-
function
|
|
1333
|
-
return
|
|
1388
|
+
var wo = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
|
|
1389
|
+
function To(e) {
|
|
1390
|
+
return wo?.createHTML(e) ?? e;
|
|
1334
1391
|
}
|
|
1335
|
-
function
|
|
1336
|
-
var t =
|
|
1337
|
-
return t.innerHTML =
|
|
1392
|
+
function Ao(e) {
|
|
1393
|
+
var t = Ri("template");
|
|
1394
|
+
return t.innerHTML = To(e.replaceAll("<!>", "<!---->")), t.content;
|
|
1338
1395
|
}
|
|
1339
|
-
function
|
|
1340
|
-
var r =
|
|
1396
|
+
function St(e, t) {
|
|
1397
|
+
var r = A;
|
|
1341
1398
|
r.nodes === null && (r.nodes = {
|
|
1342
1399
|
start: e,
|
|
1343
1400
|
end: t,
|
|
@@ -1346,29 +1403,29 @@ function _t(e, t) {
|
|
|
1346
1403
|
});
|
|
1347
1404
|
}
|
|
1348
1405
|
// @__NO_SIDE_EFFECTS__
|
|
1349
|
-
function
|
|
1350
|
-
var r = (t & 1) !== 0, i = (t & 2) !== 0, n,
|
|
1406
|
+
function So(e, t) {
|
|
1407
|
+
var r = (t & 1) !== 0, i = (t & 2) !== 0, n, o = !e.startsWith("<!>");
|
|
1351
1408
|
return () => {
|
|
1352
|
-
if (
|
|
1353
|
-
return
|
|
1354
|
-
n === void 0 && (n =
|
|
1355
|
-
var
|
|
1409
|
+
if (Z)
|
|
1410
|
+
return St(N, null), N;
|
|
1411
|
+
n === void 0 && (n = Ao(o ? e : "<!>" + e), r || (n = /* @__PURE__ */ nr(n)));
|
|
1412
|
+
var s = i || Ci ? document.importNode(n, !0) : n.cloneNode(!0);
|
|
1356
1413
|
if (r) {
|
|
1357
|
-
var
|
|
1358
|
-
|
|
1359
|
-
} else
|
|
1360
|
-
return
|
|
1414
|
+
var l = /* @__PURE__ */ nr(s), c = s.lastChild;
|
|
1415
|
+
St(l, c);
|
|
1416
|
+
} else St(s, s);
|
|
1417
|
+
return s;
|
|
1361
1418
|
};
|
|
1362
1419
|
}
|
|
1363
|
-
function
|
|
1364
|
-
if (
|
|
1365
|
-
var r =
|
|
1366
|
-
(!(r.f & 32768) || r.nodes.end === null) && (r.nodes.end =
|
|
1420
|
+
function Wi(e, t) {
|
|
1421
|
+
if (Z) {
|
|
1422
|
+
var r = A;
|
|
1423
|
+
(!(r.f & 32768) || r.nodes.end === null) && (r.nodes.end = N), ni();
|
|
1367
1424
|
return;
|
|
1368
1425
|
}
|
|
1369
1426
|
e !== null && e.before(t);
|
|
1370
1427
|
}
|
|
1371
|
-
var
|
|
1428
|
+
var Io = [
|
|
1372
1429
|
"allowfullscreen",
|
|
1373
1430
|
"async",
|
|
1374
1431
|
"autofocus",
|
|
@@ -1397,8 +1454,8 @@ var hs = [
|
|
|
1397
1454
|
"defer",
|
|
1398
1455
|
"disablepictureinpicture",
|
|
1399
1456
|
"disableremoteplayback"
|
|
1400
|
-
],
|
|
1401
|
-
...
|
|
1457
|
+
], ia = [
|
|
1458
|
+
...Io,
|
|
1402
1459
|
"formNoValidate",
|
|
1403
1460
|
"isMap",
|
|
1404
1461
|
"noModule",
|
|
@@ -1413,17 +1470,17 @@ var hs = [
|
|
|
1413
1470
|
"allowFullscreen",
|
|
1414
1471
|
"disablePictureInPicture",
|
|
1415
1472
|
"disableRemotePlayback"
|
|
1416
|
-
],
|
|
1417
|
-
function
|
|
1418
|
-
return
|
|
1473
|
+
], Eo = ["touchstart", "touchmove"];
|
|
1474
|
+
function ko(e) {
|
|
1475
|
+
return Eo.includes(e);
|
|
1419
1476
|
}
|
|
1420
|
-
var
|
|
1477
|
+
var Co = [
|
|
1421
1478
|
"$state",
|
|
1422
1479
|
"$state.raw",
|
|
1423
1480
|
"$derived",
|
|
1424
1481
|
"$derived.by"
|
|
1425
|
-
],
|
|
1426
|
-
...
|
|
1482
|
+
], na = [
|
|
1483
|
+
...Co,
|
|
1427
1484
|
"$state.eager",
|
|
1428
1485
|
"$state.snapshot",
|
|
1429
1486
|
"$props",
|
|
@@ -1438,80 +1495,80 @@ var ms = [
|
|
|
1438
1495
|
"$inspect().with",
|
|
1439
1496
|
"$inspect.trace",
|
|
1440
1497
|
"$host"
|
|
1441
|
-
],
|
|
1442
|
-
function
|
|
1443
|
-
return
|
|
1498
|
+
], zr = !0;
|
|
1499
|
+
function qi(e, t) {
|
|
1500
|
+
return Ki(e, t);
|
|
1444
1501
|
}
|
|
1445
|
-
function
|
|
1446
|
-
|
|
1447
|
-
const r = t.target, i =
|
|
1502
|
+
function $o(e, t) {
|
|
1503
|
+
ir(), t.intro = t.intro ?? !1;
|
|
1504
|
+
const r = t.target, i = Z, n = N;
|
|
1448
1505
|
try {
|
|
1449
|
-
for (var
|
|
1450
|
-
if (!
|
|
1451
|
-
|
|
1452
|
-
const
|
|
1506
|
+
for (var o = /* @__PURE__ */ nr(r); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ Ze(o);
|
|
1507
|
+
if (!o) throw kt;
|
|
1508
|
+
pt(!0), at(o);
|
|
1509
|
+
const s = Ki(e, {
|
|
1453
1510
|
...t,
|
|
1454
|
-
anchor:
|
|
1511
|
+
anchor: o
|
|
1455
1512
|
});
|
|
1456
|
-
return
|
|
1457
|
-
} catch (
|
|
1458
|
-
if (
|
|
1459
|
-
`).some((
|
|
1460
|
-
return
|
|
1513
|
+
return pt(!1), s;
|
|
1514
|
+
} catch (s) {
|
|
1515
|
+
if (s instanceof Error && s.message.split(`
|
|
1516
|
+
`).some((l) => l.startsWith("https://svelte.dev/e/"))) throw s;
|
|
1517
|
+
return s !== kt && console.warn("Failed to hydrate: ", s), t.recover === !1 && In(), ir(), so(r), pt(!1), qi(e, t);
|
|
1461
1518
|
} finally {
|
|
1462
|
-
|
|
1463
|
-
}
|
|
1464
|
-
}
|
|
1465
|
-
var
|
|
1466
|
-
function
|
|
1467
|
-
|
|
1468
|
-
var c = void 0,
|
|
1469
|
-
var f = r ?? t.appendChild(
|
|
1470
|
-
|
|
1471
|
-
} }, (
|
|
1472
|
-
|
|
1473
|
-
var
|
|
1474
|
-
if (
|
|
1475
|
-
throw
|
|
1476
|
-
|
|
1477
|
-
},
|
|
1478
|
-
var
|
|
1479
|
-
for (var
|
|
1480
|
-
var y =
|
|
1481
|
-
if (!
|
|
1482
|
-
|
|
1483
|
-
var _ =
|
|
1484
|
-
for (const
|
|
1485
|
-
var
|
|
1486
|
-
|
|
1487
|
-
var
|
|
1488
|
-
|
|
1519
|
+
pt(i), at(n);
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
var bt = /* @__PURE__ */ new Map();
|
|
1523
|
+
function Ki(e, { target: t, anchor: r, props: i = {}, events: n, context: o, intro: s = !0, transformError: l }) {
|
|
1524
|
+
ir();
|
|
1525
|
+
var c = void 0, d = uo(() => {
|
|
1526
|
+
var f = r ?? t.appendChild(Oi());
|
|
1527
|
+
Kn(f, { pending: () => {
|
|
1528
|
+
} }, (g) => {
|
|
1529
|
+
ai({});
|
|
1530
|
+
var p = L;
|
|
1531
|
+
if (o && (p.c = o), n && (i.$$events = n), Z && St(g, null), zr = s, c = e(g, i) || {}, zr = !0, Z && (A.nodes.end = N, N === null || N.nodeType !== 8 || N.data !== "]"))
|
|
1532
|
+
throw ii(), kt;
|
|
1533
|
+
li();
|
|
1534
|
+
}, l);
|
|
1535
|
+
var v = /* @__PURE__ */ new Set(), h = (g) => {
|
|
1536
|
+
for (var p = 0; p < g.length; p++) {
|
|
1537
|
+
var y = g[p];
|
|
1538
|
+
if (!v.has(y)) {
|
|
1539
|
+
v.add(y);
|
|
1540
|
+
var _ = ko(y);
|
|
1541
|
+
for (const C of [t, document]) {
|
|
1542
|
+
var E = bt.get(C);
|
|
1543
|
+
E === void 0 && (E = /* @__PURE__ */ new Map(), bt.set(C, E));
|
|
1544
|
+
var j = E.get(y);
|
|
1545
|
+
j === void 0 ? (C.addEventListener(y, jr, { passive: _ }), E.set(y, 1)) : E.set(y, j + 1);
|
|
1489
1546
|
}
|
|
1490
1547
|
}
|
|
1491
1548
|
}
|
|
1492
1549
|
};
|
|
1493
|
-
return h(
|
|
1494
|
-
for (var
|
|
1495
|
-
var
|
|
1496
|
-
--y == 0 ? (_.removeEventListener(
|
|
1550
|
+
return h(un(bo)), Fr.add(h), () => {
|
|
1551
|
+
for (var g of v) for (const _ of [t, document]) {
|
|
1552
|
+
var p = bt.get(_), y = p.get(g);
|
|
1553
|
+
--y == 0 ? (_.removeEventListener(g, jr), p.delete(g), p.size === 0 && bt.delete(_)) : p.set(g, y);
|
|
1497
1554
|
}
|
|
1498
|
-
|
|
1555
|
+
Fr.delete(h), f !== r && f.parentNode?.removeChild(f);
|
|
1499
1556
|
};
|
|
1500
1557
|
});
|
|
1501
|
-
return
|
|
1558
|
+
return or.set(c, d), c;
|
|
1502
1559
|
}
|
|
1503
|
-
var
|
|
1504
|
-
function
|
|
1505
|
-
const r =
|
|
1506
|
-
return r ? (
|
|
1560
|
+
var or = /* @__PURE__ */ new WeakMap();
|
|
1561
|
+
function Lo(e, t) {
|
|
1562
|
+
const r = or.get(e);
|
|
1563
|
+
return r ? (or.delete(e), r(t)) : Promise.resolve();
|
|
1507
1564
|
}
|
|
1508
|
-
function
|
|
1509
|
-
|
|
1510
|
-
const t =
|
|
1565
|
+
function Oo(e) {
|
|
1566
|
+
L === null && bn("onMount"), ft && L.l !== null ? Ro(L).m.push(e) : Ce(() => {
|
|
1567
|
+
const t = Dt(e);
|
|
1511
1568
|
if (typeof t == "function") return t;
|
|
1512
1569
|
});
|
|
1513
1570
|
}
|
|
1514
|
-
function
|
|
1571
|
+
function Ro(e) {
|
|
1515
1572
|
var t = e.l;
|
|
1516
1573
|
return t.u ?? (t.u = {
|
|
1517
1574
|
a: [],
|
|
@@ -1519,111 +1576,110 @@ function bs(e) {
|
|
|
1519
1576
|
m: []
|
|
1520
1577
|
});
|
|
1521
1578
|
}
|
|
1522
|
-
var
|
|
1523
|
-
\r\f \v\uFEFF`], Fi, Be = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), Dt = /* @__PURE__ */ new WeakMap(), Mr = /* @__PURE__ */ new WeakSet(), Bi = class {
|
|
1579
|
+
var Ui, Ve = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), Vt = /* @__PURE__ */ new WeakMap(), Vr = /* @__PURE__ */ new WeakSet(), Yi = class {
|
|
1524
1580
|
constructor(e) {
|
|
1525
|
-
|
|
1581
|
+
ur(this, Vr), w(this, Ve, /* @__PURE__ */ new WeakMap()), w(this, Mt, void 0), w(this, Vt, void 0), b(Vt, this, e);
|
|
1526
1582
|
}
|
|
1527
1583
|
observe(e, t) {
|
|
1528
|
-
var r =
|
|
1529
|
-
return r.add(t),
|
|
1530
|
-
var i =
|
|
1531
|
-
i.delete(t), i.size === 0 && (
|
|
1584
|
+
var r = a(Ve, this).get(e) || /* @__PURE__ */ new Set();
|
|
1585
|
+
return r.add(t), a(Ve, this).set(e, r), S(Vr, this, Mo).call(this).observe(e, a(Vt, this)), () => {
|
|
1586
|
+
var i = a(Ve, this).get(e);
|
|
1587
|
+
i.delete(t), i.size === 0 && (a(Ve, this).delete(e), a(Mt, this).unobserve(e));
|
|
1532
1588
|
};
|
|
1533
1589
|
}
|
|
1534
1590
|
};
|
|
1535
|
-
|
|
1536
|
-
function
|
|
1537
|
-
return
|
|
1591
|
+
Ui = Yi;
|
|
1592
|
+
function Mo() {
|
|
1593
|
+
return a(Mt, this) ?? b(Mt, this, new ResizeObserver((e) => {
|
|
1538
1594
|
for (var t of e) {
|
|
1539
|
-
|
|
1540
|
-
for (var r of
|
|
1595
|
+
Ui.entries.set(t.target, t);
|
|
1596
|
+
for (var r of a(Ve, this).get(t.target) || []) r(t);
|
|
1541
1597
|
}
|
|
1542
1598
|
}));
|
|
1543
1599
|
}
|
|
1544
|
-
u(
|
|
1545
|
-
function
|
|
1546
|
-
return e === t || e?.[
|
|
1547
|
-
}
|
|
1548
|
-
function
|
|
1549
|
-
var n =
|
|
1550
|
-
return
|
|
1551
|
-
var
|
|
1552
|
-
return
|
|
1553
|
-
|
|
1554
|
-
e !== r(...
|
|
1600
|
+
u(Yi, "entries", /* @__PURE__ */ new WeakMap());
|
|
1601
|
+
function Gr(e, t) {
|
|
1602
|
+
return e === t || e?.[nt] === t;
|
|
1603
|
+
}
|
|
1604
|
+
function Po(e = {}, t, r, i) {
|
|
1605
|
+
var n = L.r, o = A;
|
|
1606
|
+
return fo(() => {
|
|
1607
|
+
var s, l;
|
|
1608
|
+
return _r(() => {
|
|
1609
|
+
s = l, l = i?.() || [], Dt(() => {
|
|
1610
|
+
e !== r(...l) && (t(e, ...l), s && Gr(r(...s), e) && t(null, ...s));
|
|
1555
1611
|
});
|
|
1556
1612
|
}), () => {
|
|
1557
|
-
let c =
|
|
1613
|
+
let c = o;
|
|
1558
1614
|
for (; c !== n && c.parent !== null && c.parent.f & 33554432; ) c = c.parent;
|
|
1559
|
-
const
|
|
1560
|
-
|
|
1615
|
+
const d = () => {
|
|
1616
|
+
l && Gr(r(...l), e) && t(null, ...l);
|
|
1561
1617
|
}, f = c.teardown;
|
|
1562
1618
|
c.teardown = () => {
|
|
1563
|
-
|
|
1619
|
+
d(), f?.();
|
|
1564
1620
|
};
|
|
1565
1621
|
};
|
|
1566
1622
|
}), e;
|
|
1567
1623
|
}
|
|
1568
|
-
function
|
|
1569
|
-
var n = !
|
|
1624
|
+
function ge(e, t, r, i) {
|
|
1625
|
+
var n = !ft || (r & 2) !== 0, o = (r & 8) !== 0, s = (r & 16) !== 0, l = i, c = !0, d = () => (c && (c = !1, l = s ? Dt(i) : i), l);
|
|
1570
1626
|
let f;
|
|
1571
|
-
if (
|
|
1572
|
-
var
|
|
1573
|
-
f =
|
|
1574
|
-
}
|
|
1575
|
-
var h,
|
|
1576
|
-
|
|
1577
|
-
var
|
|
1578
|
-
if (n ?
|
|
1579
|
-
var
|
|
1580
|
-
return
|
|
1581
|
-
} :
|
|
1582
|
-
var
|
|
1583
|
-
return
|
|
1584
|
-
}, n && !(r & 4)) return
|
|
1627
|
+
if (o) {
|
|
1628
|
+
var v = nt in e || ri in e;
|
|
1629
|
+
f = Oe(e, t)?.set ?? (v && t in e ? (C) => e[t] = C : void 0);
|
|
1630
|
+
}
|
|
1631
|
+
var h, g = !1;
|
|
1632
|
+
o ? [h, g] = Bn(() => e[t]) : h = e[t], h === void 0 && i !== void 0 && (h = d(), f && (n && En(t), f(h)));
|
|
1633
|
+
var p;
|
|
1634
|
+
if (n ? p = () => {
|
|
1635
|
+
var C = e[t];
|
|
1636
|
+
return C === void 0 ? d() : (c = !0, C);
|
|
1637
|
+
} : p = () => {
|
|
1638
|
+
var C = e[t];
|
|
1639
|
+
return C !== void 0 && (l = void 0), C === void 0 ? l : C;
|
|
1640
|
+
}, n && !(r & 4)) return p;
|
|
1585
1641
|
if (f) {
|
|
1586
1642
|
var y = e.$$legacy;
|
|
1587
|
-
return function(
|
|
1588
|
-
return arguments.length > 0 ? ((!n || !
|
|
1643
|
+
return function(C, U) {
|
|
1644
|
+
return arguments.length > 0 ? ((!n || !U || y || g) && f(U ? p() : C), C) : p();
|
|
1589
1645
|
};
|
|
1590
1646
|
}
|
|
1591
|
-
var _ = !1,
|
|
1592
|
-
|
|
1593
|
-
var
|
|
1594
|
-
return function(
|
|
1647
|
+
var _ = !1, E = (r & 1 ? vr : Jn)(() => (_ = !1, p()));
|
|
1648
|
+
o && m(E);
|
|
1649
|
+
var j = A;
|
|
1650
|
+
return function(C, U) {
|
|
1595
1651
|
if (arguments.length > 0) {
|
|
1596
|
-
const
|
|
1597
|
-
return $(
|
|
1652
|
+
const Se = U ? m(E) : n && o ? We(C) : C;
|
|
1653
|
+
return $(E, Se), _ = !0, l !== void 0 && (l = Se), C;
|
|
1598
1654
|
}
|
|
1599
|
-
return
|
|
1655
|
+
return fe && _ || j.f & 16384 ? E.v : m(E);
|
|
1600
1656
|
};
|
|
1601
1657
|
}
|
|
1602
|
-
function
|
|
1603
|
-
return new
|
|
1658
|
+
function xo(e) {
|
|
1659
|
+
return new Ho(e);
|
|
1604
1660
|
}
|
|
1605
|
-
var
|
|
1661
|
+
var Ee = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ho = class {
|
|
1606
1662
|
constructor(e) {
|
|
1607
|
-
|
|
1608
|
-
var t = /* @__PURE__ */ new Map(), r = (n,
|
|
1609
|
-
var
|
|
1610
|
-
return t.set(n,
|
|
1663
|
+
w(this, Ee, void 0), w(this, ie, void 0);
|
|
1664
|
+
var t = /* @__PURE__ */ new Map(), r = (n, o) => {
|
|
1665
|
+
var s = /* @__PURE__ */ to(o, !1, !1);
|
|
1666
|
+
return t.set(n, s), s;
|
|
1611
1667
|
};
|
|
1612
1668
|
const i = new Proxy({
|
|
1613
1669
|
...e.props || {},
|
|
1614
1670
|
$$events: {}
|
|
1615
1671
|
}, {
|
|
1616
|
-
get(n,
|
|
1617
|
-
return
|
|
1672
|
+
get(n, o) {
|
|
1673
|
+
return m(t.get(o) ?? r(o, Reflect.get(n, o)));
|
|
1618
1674
|
},
|
|
1619
|
-
has(n,
|
|
1620
|
-
return
|
|
1675
|
+
has(n, o) {
|
|
1676
|
+
return o === ri ? !0 : (m(t.get(o) ?? r(o, Reflect.get(n, o))), Reflect.has(n, o));
|
|
1621
1677
|
},
|
|
1622
|
-
set(n,
|
|
1623
|
-
return $(t.get(
|
|
1678
|
+
set(n, o, s) {
|
|
1679
|
+
return $(t.get(o) ?? r(o, s), s), Reflect.set(n, o, s);
|
|
1624
1680
|
}
|
|
1625
1681
|
});
|
|
1626
|
-
b(
|
|
1682
|
+
b(ie, this, (e.hydrate ? $o : qi)(e.component, {
|
|
1627
1683
|
target: e.target,
|
|
1628
1684
|
anchor: e.anchor,
|
|
1629
1685
|
props: i,
|
|
@@ -1631,38 +1687,38 @@ var Te = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Ss =
|
|
|
1631
1687
|
intro: e.intro ?? !1,
|
|
1632
1688
|
recover: e.recover,
|
|
1633
1689
|
transformError: e.transformError
|
|
1634
|
-
})), !
|
|
1635
|
-
for (const n of Object.keys(
|
|
1636
|
-
n === "$set" || n === "$destroy" || n === "$on" ||
|
|
1690
|
+
})), !we && (!e?.props?.$$host || e.sync === !1) && ue(), b(Ee, this, i.$$events);
|
|
1691
|
+
for (const n of Object.keys(a(ie, this)))
|
|
1692
|
+
n === "$set" || n === "$destroy" || n === "$on" || $t(this, n, {
|
|
1637
1693
|
get() {
|
|
1638
|
-
return
|
|
1694
|
+
return a(ie, this)[n];
|
|
1639
1695
|
},
|
|
1640
|
-
set(
|
|
1641
|
-
|
|
1696
|
+
set(o) {
|
|
1697
|
+
a(ie, this)[n] = o;
|
|
1642
1698
|
},
|
|
1643
1699
|
enumerable: !0
|
|
1644
1700
|
});
|
|
1645
|
-
|
|
1701
|
+
a(ie, this).$set = (n) => {
|
|
1646
1702
|
Object.assign(i, n);
|
|
1647
|
-
},
|
|
1648
|
-
|
|
1703
|
+
}, a(ie, this).$destroy = () => {
|
|
1704
|
+
Lo(a(ie, this));
|
|
1649
1705
|
};
|
|
1650
1706
|
}
|
|
1651
1707
|
$set(e) {
|
|
1652
|
-
|
|
1708
|
+
a(ie, this).$set(e);
|
|
1653
1709
|
}
|
|
1654
1710
|
$on(e, t) {
|
|
1655
|
-
|
|
1711
|
+
a(Ee, this)[e] = a(Ee, this)[e] || [];
|
|
1656
1712
|
const r = (...i) => t.call(this, ...i);
|
|
1657
|
-
return
|
|
1658
|
-
|
|
1713
|
+
return a(Ee, this)[e].push(r), () => {
|
|
1714
|
+
a(Ee, this)[e] = a(Ee, this)[e].filter((i) => i !== r);
|
|
1659
1715
|
};
|
|
1660
1716
|
}
|
|
1661
1717
|
$destroy() {
|
|
1662
|
-
|
|
1718
|
+
a(ie, this).$destroy();
|
|
1663
1719
|
}
|
|
1664
|
-
},
|
|
1665
|
-
typeof HTMLElement == "function" && (
|
|
1720
|
+
}, Xi;
|
|
1721
|
+
typeof HTMLElement == "function" && (Xi = class extends HTMLElement {
|
|
1666
1722
|
constructor(e, t, r) {
|
|
1667
1723
|
super(), u(this, "$$ctor", void 0), u(this, "$$s", void 0), u(this, "$$c", void 0), u(this, "$$cn", !1), u(this, "$$d", {}), u(this, "$$r", !1), u(this, "$$p_d", {}), u(this, "$$l", {}), u(this, "$$l_u", /* @__PURE__ */ new Map()), u(this, "$$me", void 0), u(this, "$$shadowRoot", null), this.$$ctor = e, this.$$s = t, r && (this.$$shadowRoot = this.attachShadow(r));
|
|
1668
1724
|
}
|
|
@@ -1683,19 +1739,19 @@ typeof HTMLElement == "function" && (Vi = class extends HTMLElement {
|
|
|
1683
1739
|
if (this.$$cn = !0, !this.$$c) {
|
|
1684
1740
|
let e = function(i) {
|
|
1685
1741
|
return (n) => {
|
|
1686
|
-
const
|
|
1687
|
-
i !== "default" && (
|
|
1742
|
+
const o = Ri("slot");
|
|
1743
|
+
i !== "default" && (o.name = i), Wi(n, o);
|
|
1688
1744
|
};
|
|
1689
1745
|
};
|
|
1690
1746
|
if (await Promise.resolve(), !this.$$cn || this.$$c) return;
|
|
1691
|
-
const t = {}, r =
|
|
1747
|
+
const t = {}, r = No(this);
|
|
1692
1748
|
for (const i of this.$$s) i in r && (i === "default" && !this.$$d.children ? (this.$$d.children = e(i), t.default = !0) : t[i] = e(i));
|
|
1693
1749
|
for (const i of this.attributes) {
|
|
1694
1750
|
const n = this.$$g_p(i.name);
|
|
1695
|
-
n in this.$$d || (this.$$d[n] =
|
|
1751
|
+
n in this.$$d || (this.$$d[n] = It(n, i.value, this.$$p_d, "toProp"));
|
|
1696
1752
|
}
|
|
1697
1753
|
for (const i in this.$$p_d) !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
|
|
1698
|
-
this.$$c =
|
|
1754
|
+
this.$$c = xo({
|
|
1699
1755
|
component: this.$$ctor,
|
|
1700
1756
|
target: this.$$shadowRoot || this,
|
|
1701
1757
|
props: {
|
|
@@ -1703,27 +1759,27 @@ typeof HTMLElement == "function" && (Vi = class extends HTMLElement {
|
|
|
1703
1759
|
$$slots: t,
|
|
1704
1760
|
$$host: this
|
|
1705
1761
|
}
|
|
1706
|
-
}), this.$$me =
|
|
1707
|
-
|
|
1762
|
+
}), this.$$me = co(() => {
|
|
1763
|
+
_r(() => {
|
|
1708
1764
|
this.$$r = !0;
|
|
1709
|
-
for (const i of
|
|
1765
|
+
for (const i of Ct(this.$$c)) {
|
|
1710
1766
|
if (!this.$$p_d[i]?.reflect) continue;
|
|
1711
1767
|
this.$$d[i] = this.$$c[i];
|
|
1712
|
-
const n =
|
|
1768
|
+
const n = It(i, this.$$d[i], this.$$p_d, "toAttribute");
|
|
1713
1769
|
n == null ? this.removeAttribute(this.$$p_d[i].attribute || i) : this.setAttribute(this.$$p_d[i].attribute || i, n);
|
|
1714
1770
|
}
|
|
1715
1771
|
this.$$r = !1;
|
|
1716
1772
|
});
|
|
1717
1773
|
});
|
|
1718
1774
|
for (const i in this.$$l) for (const n of this.$$l[i]) {
|
|
1719
|
-
const
|
|
1720
|
-
this.$$l_u.set(n,
|
|
1775
|
+
const o = this.$$c.$on(i, n);
|
|
1776
|
+
this.$$l_u.set(n, o);
|
|
1721
1777
|
}
|
|
1722
1778
|
this.$$l = {};
|
|
1723
1779
|
}
|
|
1724
1780
|
}
|
|
1725
1781
|
attributeChangedCallback(e, t, r) {
|
|
1726
|
-
this.$$r || (e = this.$$g_p(e), this.$$d[e] =
|
|
1782
|
+
this.$$r || (e = this.$$g_p(e), this.$$d[e] = It(e, r, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
|
|
1727
1783
|
}
|
|
1728
1784
|
disconnectedCallback() {
|
|
1729
1785
|
this.$$cn = !1, Promise.resolve().then(() => {
|
|
@@ -1731,10 +1787,10 @@ typeof HTMLElement == "function" && (Vi = class extends HTMLElement {
|
|
|
1731
1787
|
});
|
|
1732
1788
|
}
|
|
1733
1789
|
$$g_p(e) {
|
|
1734
|
-
return
|
|
1790
|
+
return Ct(this.$$p_d).find((t) => this.$$p_d[t].attribute === e || !this.$$p_d[t].attribute && t.toLowerCase() === e) || e;
|
|
1735
1791
|
}
|
|
1736
1792
|
});
|
|
1737
|
-
function
|
|
1793
|
+
function It(e, t, r, i) {
|
|
1738
1794
|
const n = r[e]?.type;
|
|
1739
1795
|
if (t = n === "Boolean" && typeof t != "boolean" ? t != null : t, !i || !r[e]) return t;
|
|
1740
1796
|
if (i === "toAttribute") switch (n) {
|
|
@@ -1760,46 +1816,46 @@ function yt(e, t, r, i) {
|
|
|
1760
1816
|
return t;
|
|
1761
1817
|
}
|
|
1762
1818
|
}
|
|
1763
|
-
function
|
|
1819
|
+
function No(e) {
|
|
1764
1820
|
const t = {};
|
|
1765
1821
|
return e.childNodes.forEach((r) => {
|
|
1766
1822
|
t[r.slot || "default"] = !0;
|
|
1767
1823
|
}), t;
|
|
1768
1824
|
}
|
|
1769
|
-
function
|
|
1770
|
-
let
|
|
1825
|
+
function Do(e, t, r, i, n, o) {
|
|
1826
|
+
let s = class extends Xi {
|
|
1771
1827
|
constructor() {
|
|
1772
1828
|
super(e, r, n), this.$$p_d = t;
|
|
1773
1829
|
}
|
|
1774
1830
|
static get observedAttributes() {
|
|
1775
|
-
return
|
|
1831
|
+
return Ct(t).map((l) => (t[l].attribute || l).toLowerCase());
|
|
1776
1832
|
}
|
|
1777
1833
|
};
|
|
1778
|
-
return
|
|
1779
|
-
|
|
1834
|
+
return Ct(t).forEach((l) => {
|
|
1835
|
+
$t(s.prototype, l, {
|
|
1780
1836
|
get() {
|
|
1781
|
-
return this.$$c &&
|
|
1837
|
+
return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
|
|
1782
1838
|
},
|
|
1783
1839
|
set(c) {
|
|
1784
|
-
c =
|
|
1785
|
-
var
|
|
1786
|
-
|
|
1840
|
+
c = It(l, c, t), this.$$d[l] = c;
|
|
1841
|
+
var d = this.$$c;
|
|
1842
|
+
d && (Oe(d, l)?.get ? d[l] = c : d.$set({ [l]: c }));
|
|
1787
1843
|
}
|
|
1788
1844
|
});
|
|
1789
|
-
}), i.forEach((
|
|
1790
|
-
|
|
1791
|
-
return this.$$c?.[
|
|
1845
|
+
}), i.forEach((l) => {
|
|
1846
|
+
$t(s.prototype, l, { get() {
|
|
1847
|
+
return this.$$c?.[l];
|
|
1792
1848
|
} });
|
|
1793
|
-
}),
|
|
1849
|
+
}), o && (s = o(s)), e.element = s, s;
|
|
1794
1850
|
}
|
|
1795
|
-
var
|
|
1851
|
+
var Fo = class extends Event {
|
|
1796
1852
|
constructor(e, t, r, i) {
|
|
1797
1853
|
super("context-request", {
|
|
1798
1854
|
bubbles: !0,
|
|
1799
1855
|
composed: !0
|
|
1800
1856
|
}), u(this, "context", void 0), u(this, "contextTarget", void 0), u(this, "callback", void 0), u(this, "subscribe", void 0), this.context = e, this.contextTarget = t, this.callback = r, this.subscribe = i ?? !1;
|
|
1801
1857
|
}
|
|
1802
|
-
},
|
|
1858
|
+
}, Bo = class {
|
|
1803
1859
|
constructor(e, t) {
|
|
1804
1860
|
u(this, "host", void 0), u(this, "context", void 0), u(this, "subscribe", void 0), u(this, "onValue", void 0), u(this, "isConnected", !1), u(this, "unsubscribe", void 0), u(this, "currentValue", void 0), u(this, "handleValue", (r, i) => {
|
|
1805
1861
|
i !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = i), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = r, this.onValue?.(r);
|
|
@@ -1815,77 +1871,146 @@ var ks = class extends Event {
|
|
|
1815
1871
|
return this.currentValue;
|
|
1816
1872
|
}
|
|
1817
1873
|
requestValue() {
|
|
1818
|
-
this.host.dispatchEvent(new
|
|
1874
|
+
this.host.dispatchEvent(new Fo(this.context, this.host, this.handleValue, this.subscribe));
|
|
1819
1875
|
}
|
|
1820
|
-
},
|
|
1821
|
-
function
|
|
1876
|
+
}, Ft = (e) => e, jo = Ft(Symbol.for("pie.assessmentToolkit.runtimeContext")), oa = Ft(Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), zo = Ft(Symbol.for("pie.assessmentToolkit.shellContext")), sa = Ft(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
|
|
1877
|
+
function Qi(e, t, r) {
|
|
1822
1878
|
let i = !1;
|
|
1823
|
-
const n = new
|
|
1879
|
+
const n = new Bo(e, {
|
|
1824
1880
|
context: t,
|
|
1825
1881
|
subscribe: !0,
|
|
1826
|
-
onValue: (
|
|
1827
|
-
i = !0, r(
|
|
1882
|
+
onValue: (d) => {
|
|
1883
|
+
i = !0, r(d);
|
|
1828
1884
|
}
|
|
1829
1885
|
});
|
|
1830
1886
|
n.connect();
|
|
1831
|
-
const
|
|
1832
|
-
|
|
1887
|
+
const o = (d) => {
|
|
1888
|
+
d.context === t && n.requestValue();
|
|
1833
1889
|
};
|
|
1834
|
-
e.addEventListener("context-provider",
|
|
1835
|
-
let
|
|
1836
|
-
const
|
|
1837
|
-
if (i ||
|
|
1890
|
+
e.addEventListener("context-provider", o);
|
|
1891
|
+
let s = 0;
|
|
1892
|
+
const l = 200, c = globalThis.setInterval(() => {
|
|
1893
|
+
if (i || s >= l) {
|
|
1838
1894
|
globalThis.clearInterval(c);
|
|
1839
1895
|
return;
|
|
1840
1896
|
}
|
|
1841
|
-
|
|
1897
|
+
s += 1, n.requestValue();
|
|
1842
1898
|
}, 50);
|
|
1843
1899
|
return () => {
|
|
1844
|
-
globalThis.clearInterval(c), e.removeEventListener("context-provider",
|
|
1900
|
+
globalThis.clearInterval(c), e.removeEventListener("context-provider", o), n.disconnect();
|
|
1845
1901
|
};
|
|
1846
1902
|
}
|
|
1847
|
-
function
|
|
1848
|
-
return
|
|
1903
|
+
function Vo(e, t) {
|
|
1904
|
+
return Qi(e, jo, t);
|
|
1849
1905
|
}
|
|
1850
|
-
function
|
|
1851
|
-
return
|
|
1906
|
+
function Go(e, t) {
|
|
1907
|
+
return Qi(e, zo, t);
|
|
1852
1908
|
}
|
|
1853
|
-
function
|
|
1854
|
-
return
|
|
1909
|
+
function Wo(e, t) {
|
|
1910
|
+
return Vo(e, t);
|
|
1855
1911
|
}
|
|
1856
|
-
function
|
|
1857
|
-
return
|
|
1912
|
+
function qo(e, t) {
|
|
1913
|
+
return Go(e, t);
|
|
1858
1914
|
}
|
|
1859
|
-
var
|
|
1915
|
+
var Wr;
|
|
1860
1916
|
(function(e) {
|
|
1861
1917
|
e.TTS_WORD = "tts-word", e.TTS_SENTENCE = "tts-sentence", e.ANNOTATION = "annotation";
|
|
1862
|
-
})(
|
|
1863
|
-
var
|
|
1918
|
+
})(Wr || (Wr = {}));
|
|
1919
|
+
var qr;
|
|
1864
1920
|
(function(e) {
|
|
1865
1921
|
e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
|
|
1866
|
-
})(
|
|
1867
|
-
function
|
|
1922
|
+
})(qr || (qr = {}));
|
|
1923
|
+
function Ji(e) {
|
|
1868
1924
|
return (...t) => {
|
|
1869
1925
|
console.debug(`[${e}]`, ...t);
|
|
1870
1926
|
};
|
|
1871
1927
|
}
|
|
1872
|
-
var
|
|
1928
|
+
var aa = Ji("I18nService"), Gt = {
|
|
1873
1929
|
assessment: [],
|
|
1874
1930
|
section: [],
|
|
1875
1931
|
item: [],
|
|
1876
1932
|
passage: [],
|
|
1877
1933
|
rubric: [],
|
|
1878
1934
|
element: []
|
|
1879
|
-
},
|
|
1880
|
-
section: [...
|
|
1881
|
-
item: [...
|
|
1882
|
-
passage: [...
|
|
1935
|
+
}, Wt = {
|
|
1936
|
+
section: [...Gt.section],
|
|
1937
|
+
item: [...Gt.item],
|
|
1938
|
+
passage: [...Gt.passage]
|
|
1883
1939
|
};
|
|
1884
|
-
function
|
|
1940
|
+
function Ne(e) {
|
|
1941
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
1942
|
+
}
|
|
1943
|
+
function me(e, t) {
|
|
1944
|
+
if (e == null) return [];
|
|
1945
|
+
if (!Array.isArray(e)) throw new Error(`Invalid tools config at "${t}": expected an array of tool ids.`);
|
|
1946
|
+
if (e.find((r) => typeof r != "string") !== void 0) throw new Error(`Invalid tools config at "${t}": all entries must be strings.`);
|
|
1947
|
+
return e;
|
|
1948
|
+
}
|
|
1949
|
+
function Ko(e) {
|
|
1950
|
+
if (e != null) {
|
|
1951
|
+
if (!Ne(e)) throw new Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');
|
|
1952
|
+
return e;
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
function Uo(e) {
|
|
1956
|
+
if (e != null) {
|
|
1957
|
+
if (!Ne(e)) throw new Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');
|
|
1958
|
+
return e;
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
function Yo(e, t) {
|
|
1962
|
+
if (t == null) return;
|
|
1963
|
+
if (!Ne(t)) throw new Error(`Invalid tools config at "providers.${e}": expected an object.`);
|
|
1964
|
+
const r = t;
|
|
1965
|
+
if ("enabled" in r && r.enabled !== void 0 && typeof r.enabled != "boolean") throw new Error(`Invalid tools config at "providers.${e}.enabled": expected a boolean.`);
|
|
1966
|
+
if ("settings" in r && r.settings !== void 0 && !Ne(r.settings)) throw new Error(`Invalid tools config at "providers.${e}.settings": expected an object.`);
|
|
1967
|
+
if ("provider" in r && r.provider !== void 0 && !Ne(r.provider)) throw new Error(`Invalid tools config at "providers.${e}.provider": expected an object.`);
|
|
1968
|
+
return r;
|
|
1969
|
+
}
|
|
1970
|
+
function Xo(e) {
|
|
1971
|
+
if (e == null) return {};
|
|
1972
|
+
if (!Ne(e)) throw new Error('Invalid tools config at "providers": expected an object keyed by tool id.');
|
|
1973
|
+
const t = {};
|
|
1974
|
+
for (const [r, i] of Object.entries(e)) t[r] = Yo(r, i);
|
|
1975
|
+
return t;
|
|
1976
|
+
}
|
|
1977
|
+
function Zi(e) {
|
|
1885
1978
|
const t = e.trim();
|
|
1886
1979
|
return t || "";
|
|
1887
1980
|
}
|
|
1888
|
-
|
|
1981
|
+
function _e(e) {
|
|
1982
|
+
if (!e || e.length === 0) return [];
|
|
1983
|
+
const t = /* @__PURE__ */ new Set();
|
|
1984
|
+
for (const r of e) {
|
|
1985
|
+
if (typeof r != "string") throw new Error("Invalid tools config: tool list entries must be strings.");
|
|
1986
|
+
const i = Zi(r);
|
|
1987
|
+
i && t.add(i);
|
|
1988
|
+
}
|
|
1989
|
+
return Array.from(t);
|
|
1990
|
+
}
|
|
1991
|
+
function Qo(e) {
|
|
1992
|
+
if (e != null) {
|
|
1993
|
+
if (e === "on" || e === "off") return e;
|
|
1994
|
+
throw new Error(`Invalid tools config at "qtiEnforcement": expected "on" or "off", got ${JSON.stringify(e)}.`);
|
|
1995
|
+
}
|
|
1996
|
+
}
|
|
1997
|
+
function Jo(e) {
|
|
1998
|
+
if (e != null && !Ne(e)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
|
|
1999
|
+
const t = Uo(e?.policy), r = Ko(e?.placement), i = Xo(e?.providers), n = Qo(e?.qtiEnforcement), o = {
|
|
2000
|
+
policy: {
|
|
2001
|
+
allowed: _e(me(t?.allowed, "policy.allowed")),
|
|
2002
|
+
blocked: _e(me(t?.blocked, "policy.blocked"))
|
|
2003
|
+
},
|
|
2004
|
+
placement: {
|
|
2005
|
+
section: _e(me(r?.section, "placement.section")).length ? _e(me(r?.section, "placement.section")) : [...Wt.section],
|
|
2006
|
+
item: _e(me(r?.item, "placement.item")).length ? _e(me(r?.item, "placement.item")) : [...Wt.item],
|
|
2007
|
+
passage: _e(me(r?.passage, "placement.passage")).length ? _e(me(r?.passage, "placement.passage")) : [...Wt.passage]
|
|
2008
|
+
},
|
|
2009
|
+
providers: i
|
|
2010
|
+
};
|
|
2011
|
+
return n && (o.qtiEnforcement = n), o;
|
|
2012
|
+
}
|
|
2013
|
+
var Zo = [
|
|
1889
2014
|
"assessment",
|
|
1890
2015
|
"section",
|
|
1891
2016
|
"item",
|
|
@@ -1893,13 +2018,38 @@ var Hs = [
|
|
|
1893
2018
|
"rubric",
|
|
1894
2019
|
"element"
|
|
1895
2020
|
];
|
|
1896
|
-
function
|
|
2021
|
+
function Et(e, t) {
|
|
1897
2022
|
if (typeof e != "string" || e.trim().length === 0) throw new Error(`Invalid tool registration: "${t}" must be a non-empty string.`);
|
|
1898
2023
|
}
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
2024
|
+
var es = [
|
|
2025
|
+
{
|
|
2026
|
+
pattern: /<script\b/i,
|
|
2027
|
+
reason: "contains a <script> tag"
|
|
2028
|
+
},
|
|
2029
|
+
{
|
|
2030
|
+
pattern: /\son[a-z]+\s*=/i,
|
|
2031
|
+
reason: "contains an inline event handler (on*=) attribute"
|
|
2032
|
+
},
|
|
2033
|
+
{
|
|
2034
|
+
pattern: /javascript:/i,
|
|
2035
|
+
reason: "contains a javascript: URL"
|
|
2036
|
+
},
|
|
2037
|
+
{
|
|
2038
|
+
pattern: /<foreignObject\b/i,
|
|
2039
|
+
reason: "contains a <foreignObject> element"
|
|
2040
|
+
}
|
|
2041
|
+
];
|
|
2042
|
+
function ts(e, t, r) {
|
|
2043
|
+
const i = t.trimStart(), n = i.toLowerCase().startsWith("<svg"), o = /^https?:/i.test(i);
|
|
2044
|
+
if (/^data:/i.test(i)) throw new Error(`Invalid tool registration "${e}": "${r}" may not be a data: URL.`);
|
|
2045
|
+
if (!(!n && !o)) {
|
|
2046
|
+
for (const { pattern: s, reason: l } of es) if (s.test(t)) throw new Error(`Invalid tool registration "${e}": "${r}" ${l}. Inline SVG icons must not include scriptable content.`);
|
|
2047
|
+
}
|
|
2048
|
+
}
|
|
2049
|
+
function Kr(e) {
|
|
2050
|
+
if (Et(e.toolId, "toolId"), Et(e.name, "name"), Et(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
|
|
2051
|
+
if (typeof e.icon == "string" && ts(e.toolId, e.icon, "icon"), !Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
|
|
2052
|
+
const t = e.supportedLevels.find((r) => !Zo.includes(r));
|
|
1903
2053
|
if (t) throw new Error(`Invalid tool registration "${e.toolId}": unsupported level "${t}".`);
|
|
1904
2054
|
if (e.activation !== void 0 && e.activation !== "toolbar-toggle" && e.activation !== "selection-gateway") throw new Error(`Invalid tool registration "${e.toolId}": unsupported activation "${String(e.activation)}".`);
|
|
1905
2055
|
if (e.singletonScope !== void 0 && e.singletonScope !== "section") throw new Error(`Invalid tool registration "${e.toolId}": unsupported singletonScope "${String(e.singletonScope)}".`);
|
|
@@ -1908,23 +2058,23 @@ function Nr(e) {
|
|
|
1908
2058
|
if (typeof e.isVisibleInContext != "function") throw new Error(`Invalid tool registration "${e.toolId}": "isVisibleInContext" must be a function.`);
|
|
1909
2059
|
if (typeof e.renderToolbar != "function") throw new Error(`Invalid tool registration "${e.toolId}": "renderToolbar" must be a function.`);
|
|
1910
2060
|
}
|
|
1911
|
-
var
|
|
2061
|
+
var rs = class {
|
|
1912
2062
|
constructor() {
|
|
1913
2063
|
u(this, "tools", /* @__PURE__ */ new Map()), u(this, "pnpIndex", /* @__PURE__ */ new Map()), u(this, "componentOverrides", {}), u(this, "moduleLoaders", /* @__PURE__ */ new Map()), u(this, "loadedToolModules", /* @__PURE__ */ new Set()), u(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
|
|
1914
2064
|
}
|
|
1915
2065
|
normalizeToolId(e) {
|
|
1916
|
-
return
|
|
2066
|
+
return Zi(e);
|
|
1917
2067
|
}
|
|
1918
2068
|
normalizeToolIds(e) {
|
|
1919
2069
|
return e.map((t) => this.normalizeToolId(t));
|
|
1920
2070
|
}
|
|
1921
2071
|
register(e) {
|
|
1922
|
-
if (
|
|
2072
|
+
if (Kr(e), this.tools.has(e.toolId)) throw new Error(`Tool '${e.toolId}' is already registered`);
|
|
1923
2073
|
if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const t of e.pnpSupportIds)
|
|
1924
2074
|
this.pnpIndex.has(t) || this.pnpIndex.set(t, /* @__PURE__ */ new Set()), this.pnpIndex.get(t).add(e.toolId);
|
|
1925
2075
|
}
|
|
1926
2076
|
override(e) {
|
|
1927
|
-
if (
|
|
2077
|
+
if (Kr(e), !this.tools.has(e.toolId)) throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
|
|
1928
2078
|
const t = this.tools.get(e.toolId);
|
|
1929
2079
|
if (t.pnpSupportIds) for (const r of t.pnpSupportIds) this.pnpIndex.get(r)?.delete(e.toolId);
|
|
1930
2080
|
if (this.tools.set(e.toolId, e), e.pnpSupportIds) for (const r of e.pnpSupportIds)
|
|
@@ -1975,8 +2125,8 @@ var Ns = class {
|
|
|
1975
2125
|
if (n.supportedLevels.includes(t.level))
|
|
1976
2126
|
try {
|
|
1977
2127
|
n.isVisibleInContext(t) && r.push(n);
|
|
1978
|
-
} catch (
|
|
1979
|
-
console.error(`Error evaluating visibility for tool '${i}':`,
|
|
2128
|
+
} catch (o) {
|
|
2129
|
+
console.error(`Error evaluating visibility for tool '${i}':`, o);
|
|
1980
2130
|
}
|
|
1981
2131
|
}
|
|
1982
2132
|
return r;
|
|
@@ -2009,7 +2159,7 @@ var Ns = class {
|
|
|
2009
2159
|
setToolModuleLoaders(e) {
|
|
2010
2160
|
for (const [t, r] of Object.entries(e))
|
|
2011
2161
|
if (r) {
|
|
2012
|
-
if (
|
|
2162
|
+
if (Et(t, "tool module loader id"), typeof r != "function") throw new Error(`Invalid tool module loader for "${t}": expected a function.`);
|
|
2013
2163
|
this.moduleLoaders.set(t, r);
|
|
2014
2164
|
}
|
|
2015
2165
|
}
|
|
@@ -2051,80 +2201,80 @@ var Ns = class {
|
|
|
2051
2201
|
return i.renderToolbar(t, n);
|
|
2052
2202
|
}
|
|
2053
2203
|
};
|
|
2054
|
-
function
|
|
2204
|
+
function en(e) {
|
|
2055
2205
|
return e.level === "item";
|
|
2056
2206
|
}
|
|
2057
|
-
function
|
|
2207
|
+
function is(e) {
|
|
2058
2208
|
return e.level === "passage";
|
|
2059
2209
|
}
|
|
2060
|
-
function
|
|
2210
|
+
function ns(e) {
|
|
2061
2211
|
return e.level === "rubric";
|
|
2062
2212
|
}
|
|
2063
|
-
function
|
|
2213
|
+
function tn(e) {
|
|
2064
2214
|
return e.level === "element";
|
|
2065
2215
|
}
|
|
2066
|
-
function
|
|
2067
|
-
if (
|
|
2216
|
+
function br(e) {
|
|
2217
|
+
if (tn(e)) {
|
|
2068
2218
|
const t = e.item.config;
|
|
2069
2219
|
if (!t) return "";
|
|
2070
|
-
const r = [], i = (
|
|
2220
|
+
const r = [], i = (l) => l.replace(/<[^>]*>/g, " ").trim(), n = t.elements?.[e.elementId];
|
|
2071
2221
|
n && typeof n == "string" && r.push(i(n));
|
|
2072
|
-
const
|
|
2073
|
-
if (
|
|
2074
|
-
for (const
|
|
2075
|
-
if (typeof
|
|
2076
|
-
for (const c of
|
|
2077
|
-
for (const
|
|
2222
|
+
const o = t.models, s = (Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : []).find((l) => l && typeof l == "object" && l.id === e.elementId);
|
|
2223
|
+
if (s) {
|
|
2224
|
+
for (const l of Object.values(s))
|
|
2225
|
+
if (typeof l == "string" && r.push(i(l)), Array.isArray(l)) {
|
|
2226
|
+
for (const c of l) if (c && typeof c == "object")
|
|
2227
|
+
for (const d of Object.values(c)) typeof d == "string" && r.push(i(d));
|
|
2078
2228
|
}
|
|
2079
2229
|
}
|
|
2080
2230
|
return r.filter(Boolean).join(" ").trim();
|
|
2081
2231
|
}
|
|
2082
|
-
if (
|
|
2232
|
+
if (en(e)) {
|
|
2083
2233
|
const t = e.item;
|
|
2084
2234
|
if (!t?.config) return "";
|
|
2085
2235
|
const r = t.config, i = [], n = (c) => c.replace(/<[^>]*>/g, " ").trim();
|
|
2086
2236
|
typeof r.markup == "string" && i.push(n(r.markup));
|
|
2087
|
-
const
|
|
2088
|
-
if (
|
|
2089
|
-
for (const c of Object.values(
|
|
2090
|
-
const
|
|
2091
|
-
for (const c of
|
|
2237
|
+
const o = r.elements;
|
|
2238
|
+
if (o && typeof o == "object")
|
|
2239
|
+
for (const c of Object.values(o)) typeof c == "string" && i.push(n(c));
|
|
2240
|
+
const s = r.models, l = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
|
|
2241
|
+
for (const c of l)
|
|
2092
2242
|
if (!(!c || typeof c != "object")) {
|
|
2093
|
-
for (const
|
|
2094
|
-
if (typeof
|
|
2095
|
-
for (const f of
|
|
2096
|
-
for (const
|
|
2243
|
+
for (const d of Object.values(c))
|
|
2244
|
+
if (typeof d == "string" && i.push(n(d)), Array.isArray(d)) {
|
|
2245
|
+
for (const f of d) if (f && typeof f == "object")
|
|
2246
|
+
for (const v of Object.values(f)) typeof v == "string" && i.push(n(v));
|
|
2097
2247
|
}
|
|
2098
2248
|
}
|
|
2099
2249
|
return i.filter(Boolean).join(" ").trim();
|
|
2100
2250
|
}
|
|
2101
|
-
if (
|
|
2251
|
+
if (is(e)) {
|
|
2102
2252
|
const t = e.passage;
|
|
2103
2253
|
if (!t?.config) return "";
|
|
2104
2254
|
const r = t.config, i = [], n = (c) => c.replace(/<[^>]*>/g, " ").trim();
|
|
2105
2255
|
typeof r.markup == "string" && i.push(n(r.markup)), typeof r.content == "string" && i.push(n(r.content)), typeof r.prompt == "string" && i.push(n(r.prompt));
|
|
2106
|
-
const
|
|
2107
|
-
if (
|
|
2108
|
-
for (const c of Object.values(
|
|
2109
|
-
const
|
|
2110
|
-
for (const c of
|
|
2256
|
+
const o = r.elements;
|
|
2257
|
+
if (o && typeof o == "object")
|
|
2258
|
+
for (const c of Object.values(o)) typeof c == "string" && i.push(n(c));
|
|
2259
|
+
const s = r.models, l = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
|
|
2260
|
+
for (const c of l)
|
|
2111
2261
|
if (!(!c || typeof c != "object")) {
|
|
2112
|
-
for (const
|
|
2113
|
-
if (typeof
|
|
2114
|
-
for (const f of
|
|
2115
|
-
for (const
|
|
2262
|
+
for (const d of Object.values(c))
|
|
2263
|
+
if (typeof d == "string" && i.push(n(d)), Array.isArray(d)) {
|
|
2264
|
+
for (const f of d) if (f && typeof f == "object")
|
|
2265
|
+
for (const v of Object.values(f)) typeof v == "string" && i.push(n(v));
|
|
2116
2266
|
}
|
|
2117
2267
|
}
|
|
2118
2268
|
return i.filter(Boolean).join(" ").trim();
|
|
2119
2269
|
}
|
|
2120
|
-
if (
|
|
2270
|
+
if (ns(e)) {
|
|
2121
2271
|
const t = e.rubricBlock;
|
|
2122
2272
|
return t.passage?.config ? (t.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (t.content || "").replace(/<[^>]*>/g, " ").trim();
|
|
2123
2273
|
}
|
|
2124
2274
|
return "";
|
|
2125
2275
|
}
|
|
2126
|
-
function
|
|
2127
|
-
const t =
|
|
2276
|
+
function Bt(e) {
|
|
2277
|
+
const t = br(e);
|
|
2128
2278
|
return [
|
|
2129
2279
|
/<math[>\s]/i,
|
|
2130
2280
|
/\\\[([^\]]+)\\\]/,
|
|
@@ -2134,7 +2284,7 @@ function Pt(e) {
|
|
|
2134
2284
|
/\d+\s*[+\-*/=]\s*\d+/
|
|
2135
2285
|
].some((r) => r.test(t));
|
|
2136
2286
|
}
|
|
2137
|
-
function
|
|
2287
|
+
function os(e) {
|
|
2138
2288
|
const t = [
|
|
2139
2289
|
"pie-multiple-choice",
|
|
2140
2290
|
"pie-inline-choice",
|
|
@@ -2143,15 +2293,15 @@ function Bs(e) {
|
|
|
2143
2293
|
"inline-choice",
|
|
2144
2294
|
"select-text"
|
|
2145
2295
|
];
|
|
2146
|
-
if (
|
|
2296
|
+
if (tn(e)) {
|
|
2147
2297
|
const r = e.item.config;
|
|
2148
2298
|
if (!r?.models) return !1;
|
|
2149
|
-
const i = (Array.isArray(r.models) ? r.models : Object.values(r.models)).find((
|
|
2299
|
+
const i = (Array.isArray(r.models) ? r.models : Object.values(r.models)).find((o) => o && typeof o == "object" && o.id === e.elementId);
|
|
2150
2300
|
if (!i) return !1;
|
|
2151
2301
|
const n = i.element || "";
|
|
2152
2302
|
return t.includes(n);
|
|
2153
2303
|
}
|
|
2154
|
-
if (
|
|
2304
|
+
if (en(e)) {
|
|
2155
2305
|
const r = e.item.config?.models;
|
|
2156
2306
|
return (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).some((i) => {
|
|
2157
2307
|
if (!i || typeof i != "object") return !1;
|
|
@@ -2161,11 +2311,11 @@ function Bs(e) {
|
|
|
2161
2311
|
}
|
|
2162
2312
|
return !1;
|
|
2163
2313
|
}
|
|
2164
|
-
function
|
|
2165
|
-
return
|
|
2314
|
+
function jt(e) {
|
|
2315
|
+
return br(e).trim().length >= 10;
|
|
2166
2316
|
}
|
|
2167
|
-
function
|
|
2168
|
-
const t =
|
|
2317
|
+
function ss(e) {
|
|
2318
|
+
const t = br(e);
|
|
2169
2319
|
return [
|
|
2170
2320
|
/chemistry|chemical|element|atom|molecule|compound/i,
|
|
2171
2321
|
/periodic\s+table/i,
|
|
@@ -2175,23 +2325,23 @@ function Vs(e) {
|
|
|
2175
2325
|
/physics|force|energy|velocity|acceleration/i
|
|
2176
2326
|
].some((r) => r.test(t));
|
|
2177
2327
|
}
|
|
2178
|
-
var
|
|
2328
|
+
var as = [
|
|
2179
2329
|
"assessment",
|
|
2180
2330
|
"section",
|
|
2181
2331
|
"item",
|
|
2182
2332
|
"passage",
|
|
2183
2333
|
"rubric"
|
|
2184
|
-
],
|
|
2185
|
-
function
|
|
2186
|
-
return
|
|
2334
|
+
], ls = new Set(as);
|
|
2335
|
+
function cs(e) {
|
|
2336
|
+
return ls.has(e);
|
|
2187
2337
|
}
|
|
2188
|
-
function
|
|
2338
|
+
function wr(e, t, r) {
|
|
2189
2339
|
const i = e.trim(), n = r.trim();
|
|
2190
2340
|
if (!i || !n) throw new Error("Tool instance ids require non-empty tool and scope ids");
|
|
2191
|
-
if (!
|
|
2341
|
+
if (!cs(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
|
|
2192
2342
|
return `${i}:${t}:${n}`;
|
|
2193
2343
|
}
|
|
2194
|
-
var
|
|
2344
|
+
var us = class {
|
|
2195
2345
|
constructor() {
|
|
2196
2346
|
u(this, "providerId", "desmos-calculator"), u(this, "providerName", "Desmos Calculator"), u(this, "category", "calculator"), u(this, "version", "1.10"), u(this, "requiresAuth", !0), u(this, "desmosProvider", null), u(this, "config", null);
|
|
2197
2347
|
}
|
|
@@ -2213,34 +2363,36 @@ var Ws = class {
|
|
|
2213
2363
|
toolId: "calculator",
|
|
2214
2364
|
operation: "desmos-provider-module-import",
|
|
2215
2365
|
backend: "desmos"
|
|
2216
|
-
})
|
|
2366
|
+
});
|
|
2367
|
+
const r = await (async () => {
|
|
2217
2368
|
try {
|
|
2218
|
-
const
|
|
2369
|
+
const i = await import("./dist-rF11IR1B.js");
|
|
2219
2370
|
return await this.emitTelemetry("pie-tool-library-load-success", {
|
|
2220
2371
|
toolId: "calculator",
|
|
2221
2372
|
operation: "desmos-provider-module-import",
|
|
2222
2373
|
backend: "desmos",
|
|
2223
2374
|
duration: Date.now() - t
|
|
2224
|
-
}),
|
|
2225
|
-
} catch (
|
|
2375
|
+
}), i;
|
|
2376
|
+
} catch (i) {
|
|
2226
2377
|
throw await this.emitTelemetry("pie-tool-library-load-error", {
|
|
2227
2378
|
toolId: "calculator",
|
|
2228
2379
|
operation: "desmos-provider-module-import",
|
|
2229
2380
|
backend: "desmos",
|
|
2230
2381
|
duration: Date.now() - t,
|
|
2231
2382
|
errorType: "ToolLibraryLoadError",
|
|
2232
|
-
message:
|
|
2233
|
-
}),
|
|
2383
|
+
message: i instanceof Error ? i.message : String(i)
|
|
2384
|
+
}), i;
|
|
2234
2385
|
}
|
|
2235
|
-
})()
|
|
2386
|
+
})();
|
|
2387
|
+
this.desmosProvider = new r.DesmosCalculatorProvider();
|
|
2236
2388
|
try {
|
|
2237
2389
|
await this.desmosProvider.initialize({
|
|
2238
2390
|
apiKey: e.apiKey,
|
|
2239
2391
|
proxyEndpoint: e.proxyEndpoint,
|
|
2240
2392
|
onTelemetry: e.onTelemetry
|
|
2241
2393
|
}), console.log(`[DesmosToolProvider] Initialized successfully ${e.proxyEndpoint ? "(using proxy)" : e.apiKey ? "(direct API key)" : "(no auth)"}`);
|
|
2242
|
-
} catch (
|
|
2243
|
-
throw console.error("[DesmosToolProvider] Initialization failed:",
|
|
2394
|
+
} catch (i) {
|
|
2395
|
+
throw console.error("[DesmosToolProvider] Initialization failed:", i), new Error("Failed to initialize Desmos calculator provider. Check API key or proxy endpoint.");
|
|
2244
2396
|
}
|
|
2245
2397
|
}
|
|
2246
2398
|
async createInstance(e) {
|
|
@@ -2266,41 +2418,41 @@ var Ws = class {
|
|
|
2266
2418
|
destroy() {
|
|
2267
2419
|
this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
|
|
2268
2420
|
}
|
|
2269
|
-
},
|
|
2421
|
+
}, ds = (e, t) => {
|
|
2270
2422
|
const r = t?.useSentenceSegmenter !== !1;
|
|
2271
2423
|
try {
|
|
2272
2424
|
if (!r) throw new Error("Segmenter disabled by policy");
|
|
2273
|
-
const
|
|
2274
|
-
if (typeof
|
|
2275
|
-
const
|
|
2276
|
-
text:
|
|
2277
|
-
offset:
|
|
2278
|
-
})).filter((
|
|
2425
|
+
const s = globalThis.Intl?.Segmenter;
|
|
2426
|
+
if (typeof s == "function") {
|
|
2427
|
+
const l = new s(t?.locale, { granularity: "sentence" }), c = Array.from(l.segment(e)).map((d) => ({
|
|
2428
|
+
text: d.segment,
|
|
2429
|
+
offset: d.index
|
|
2430
|
+
})).filter((d) => d.text.trim().length > 0);
|
|
2279
2431
|
if (c.length > 0) return c;
|
|
2280
2432
|
}
|
|
2281
2433
|
} catch {
|
|
2282
2434
|
}
|
|
2283
2435
|
const i = e.match(/[^.!?]+(?:[.!?]+|$)/g) || [e], n = [];
|
|
2284
|
-
let
|
|
2285
|
-
for (const
|
|
2286
|
-
const
|
|
2287
|
-
|
|
2288
|
-
text:
|
|
2289
|
-
offset:
|
|
2290
|
-
}),
|
|
2436
|
+
let o = 0;
|
|
2437
|
+
for (const s of i) {
|
|
2438
|
+
const l = e.indexOf(s, o);
|
|
2439
|
+
l !== -1 && (n.push({
|
|
2440
|
+
text: s,
|
|
2441
|
+
offset: l
|
|
2442
|
+
}), o = l + s.length);
|
|
2291
2443
|
}
|
|
2292
2444
|
return n.length > 0 ? n : [{
|
|
2293
2445
|
text: e,
|
|
2294
2446
|
offset: 0
|
|
2295
2447
|
}];
|
|
2296
|
-
},
|
|
2448
|
+
}, fs = class {
|
|
2297
2449
|
constructor() {
|
|
2298
2450
|
u(this, "providerId", "browser"), u(this, "providerName", "Browser Speech Synthesis"), u(this, "version", "1.0.0");
|
|
2299
2451
|
}
|
|
2300
2452
|
async initialize(e) {
|
|
2301
2453
|
if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
|
|
2302
2454
|
if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
|
|
2303
|
-
return new
|
|
2455
|
+
return new hs(e);
|
|
2304
2456
|
}
|
|
2305
2457
|
supportsFeature(e) {
|
|
2306
2458
|
return !0;
|
|
@@ -2317,7 +2469,7 @@ var Ws = class {
|
|
|
2317
2469
|
}
|
|
2318
2470
|
destroy() {
|
|
2319
2471
|
}
|
|
2320
|
-
},
|
|
2472
|
+
}, hs = class {
|
|
2321
2473
|
constructor(e) {
|
|
2322
2474
|
u(this, "utterance", null), u(this, "config", null), u(this, "_isPlaying", !1), u(this, "_isPaused", !1), u(this, "speakRunId", 0), u(this, "onWordBoundary", void 0), this.config = e;
|
|
2323
2475
|
}
|
|
@@ -2335,8 +2487,8 @@ var Ws = class {
|
|
|
2335
2487
|
for (const r of e) {
|
|
2336
2488
|
if (t !== this.speakRunId) break;
|
|
2337
2489
|
const i = this.splitIntoChunks(r.text);
|
|
2338
|
-
for (const
|
|
2339
|
-
if (t !== this.speakRunId || !await this.speakChunk(
|
|
2490
|
+
for (const o of i)
|
|
2491
|
+
if (t !== this.speakRunId || !await this.speakChunk(o.text, r.startOffset + o.offset, t)) break;
|
|
2340
2492
|
const n = Math.max(0, Number(r.pauseMsAfter || 0));
|
|
2341
2493
|
if (n > 0 && t === this.speakRunId && !await this.waitForPause(n, t))
|
|
2342
2494
|
break;
|
|
@@ -2351,24 +2503,24 @@ var Ws = class {
|
|
|
2351
2503
|
offset: 0
|
|
2352
2504
|
}];
|
|
2353
2505
|
const r = this.segmentSentences(e), i = [];
|
|
2354
|
-
let n = "",
|
|
2355
|
-
for (const
|
|
2356
|
-
const
|
|
2357
|
-
if (!
|
|
2358
|
-
const c =
|
|
2506
|
+
let n = "", o = 0;
|
|
2507
|
+
for (const s of r) {
|
|
2508
|
+
const l = s.text.trim();
|
|
2509
|
+
if (!l) continue;
|
|
2510
|
+
const c = s.text.search(/\S/), d = s.offset + (c === -1 ? 0 : c);
|
|
2359
2511
|
if (!n) {
|
|
2360
|
-
n =
|
|
2512
|
+
n = l, o = d;
|
|
2361
2513
|
continue;
|
|
2362
2514
|
}
|
|
2363
|
-
const f = `${n} ${
|
|
2515
|
+
const f = `${n} ${l}`;
|
|
2364
2516
|
f.length <= 260 ? n = f : (i.push({
|
|
2365
2517
|
text: n,
|
|
2366
|
-
offset:
|
|
2367
|
-
}), n =
|
|
2518
|
+
offset: o
|
|
2519
|
+
}), n = l, o = d);
|
|
2368
2520
|
}
|
|
2369
2521
|
return n && i.push({
|
|
2370
2522
|
text: n,
|
|
2371
|
-
offset:
|
|
2523
|
+
offset: o
|
|
2372
2524
|
}), i.length ? i : [{
|
|
2373
2525
|
text: e,
|
|
2374
2526
|
offset: 0
|
|
@@ -2387,7 +2539,7 @@ var Ws = class {
|
|
|
2387
2539
|
}
|
|
2388
2540
|
segmentSentences(e) {
|
|
2389
2541
|
const t = this.getSegmentationPolicy();
|
|
2390
|
-
return
|
|
2542
|
+
return ds(e, {
|
|
2391
2543
|
locale: t.locale,
|
|
2392
2544
|
useSentenceSegmenter: t.useSentenceSegmenter
|
|
2393
2545
|
});
|
|
@@ -2403,8 +2555,8 @@ var Ws = class {
|
|
|
2403
2555
|
return;
|
|
2404
2556
|
}
|
|
2405
2557
|
if (this.utterance = new SpeechSynthesisUtterance(e), this.config?.voice) {
|
|
2406
|
-
const
|
|
2407
|
-
|
|
2558
|
+
const o = speechSynthesis.getVoices().find((s) => s.name === this.config.voice);
|
|
2559
|
+
o && (this.utterance.voice = o);
|
|
2408
2560
|
}
|
|
2409
2561
|
this.config?.rate && (this.utterance.rate = this.config.rate), this.config?.pitch && (this.utterance.pitch = this.config.pitch), this.utterance.onstart = () => {
|
|
2410
2562
|
r === this.speakRunId && (this._isPlaying = !0, this._isPaused = !1);
|
|
@@ -2414,24 +2566,24 @@ var Ws = class {
|
|
|
2414
2566
|
return;
|
|
2415
2567
|
}
|
|
2416
2568
|
this._isPlaying = !1, this._isPaused = !1, i(!0);
|
|
2417
|
-
}, this.utterance.onerror = (
|
|
2569
|
+
}, this.utterance.onerror = (o) => {
|
|
2418
2570
|
if (r !== this.speakRunId) {
|
|
2419
2571
|
i(!1);
|
|
2420
2572
|
return;
|
|
2421
2573
|
}
|
|
2422
|
-
if (this._isPlaying = !1, this._isPaused = !1,
|
|
2574
|
+
if (this._isPlaying = !1, this._isPaused = !1, o.error === "interrupted" || o.error === "canceled") {
|
|
2423
2575
|
i(!1);
|
|
2424
2576
|
return;
|
|
2425
2577
|
}
|
|
2426
|
-
n(/* @__PURE__ */ new Error(`Speech synthesis error: ${
|
|
2578
|
+
n(/* @__PURE__ */ new Error(`Speech synthesis error: ${o.error}`));
|
|
2427
2579
|
}, this.utterance.onpause = () => {
|
|
2428
2580
|
r === this.speakRunId && (this._isPaused = !0);
|
|
2429
2581
|
}, this.utterance.onresume = () => {
|
|
2430
2582
|
r === this.speakRunId && (this._isPaused = !1);
|
|
2431
|
-
}, this.utterance.onboundary = (
|
|
2432
|
-
if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:",
|
|
2433
|
-
const
|
|
2434
|
-
console.log("[BrowserProvider] Calling onWordBoundary with word:", f, "at position:",
|
|
2583
|
+
}, this.utterance.onboundary = (o) => {
|
|
2584
|
+
if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", o.name, "charIndex:", o.charIndex, "charLength:", o.charLength), o.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence") return;
|
|
2585
|
+
const s = Math.max(0, Math.min(o.charIndex, Math.max(0, e.length - 1))), l = Number(o.charLength || 0), c = this.inferWordLength(e, s), d = Number.isFinite(l) && l > 0 && l <= 80 && s + l <= e.length ? l : c, f = e.substring(s, Math.min(e.length, s + d)).trim(), v = t + s;
|
|
2586
|
+
console.log("[BrowserProvider] Calling onWordBoundary with word:", f, "at position:", v), this.onWordBoundary(f, v, d);
|
|
2435
2587
|
}, speechSynthesis.speak(this.utterance);
|
|
2436
2588
|
});
|
|
2437
2589
|
}
|
|
@@ -2456,7 +2608,7 @@ var Ws = class {
|
|
|
2456
2608
|
...e.providerOptions || {}
|
|
2457
2609
|
});
|
|
2458
2610
|
}
|
|
2459
|
-
},
|
|
2611
|
+
}, ps = class {
|
|
2460
2612
|
async emitTelemetry(e, t) {
|
|
2461
2613
|
try {
|
|
2462
2614
|
await this.config?.onTelemetry?.(e, t);
|
|
@@ -2488,7 +2640,7 @@ var Ws = class {
|
|
|
2488
2640
|
}
|
|
2489
2641
|
async _initializeBrowserTTS(e) {
|
|
2490
2642
|
if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
|
|
2491
|
-
this.ttsProvider = new
|
|
2643
|
+
this.ttsProvider = new fs(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
|
|
2492
2644
|
}
|
|
2493
2645
|
async _initializeServerTTS(e) {
|
|
2494
2646
|
if (!e.apiEndpoint) throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
|
|
@@ -2497,26 +2649,28 @@ var Ws = class {
|
|
|
2497
2649
|
toolId: "tts",
|
|
2498
2650
|
operation: "server-provider-module-import",
|
|
2499
2651
|
backend: e.serverProvider || e.backend
|
|
2500
|
-
})
|
|
2652
|
+
});
|
|
2653
|
+
const r = await (async () => {
|
|
2501
2654
|
try {
|
|
2502
|
-
const
|
|
2655
|
+
const i = await import("./dist-DIBQdekL.js");
|
|
2503
2656
|
return await this.emitTelemetry("pie-tool-library-load-success", {
|
|
2504
2657
|
toolId: "tts",
|
|
2505
2658
|
operation: "server-provider-module-import",
|
|
2506
2659
|
backend: e.serverProvider || e.backend,
|
|
2507
2660
|
duration: Date.now() - t
|
|
2508
|
-
}),
|
|
2509
|
-
} catch (
|
|
2661
|
+
}), i;
|
|
2662
|
+
} catch (i) {
|
|
2510
2663
|
throw await this.emitTelemetry("pie-tool-library-load-error", {
|
|
2511
2664
|
toolId: "tts",
|
|
2512
2665
|
operation: "server-provider-module-import",
|
|
2513
2666
|
backend: e.serverProvider || e.backend,
|
|
2514
2667
|
duration: Date.now() - t,
|
|
2515
2668
|
errorType: "ToolLibraryLoadError",
|
|
2516
|
-
message:
|
|
2517
|
-
}),
|
|
2669
|
+
message: i instanceof Error ? i.message : String(i)
|
|
2670
|
+
}), i;
|
|
2518
2671
|
}
|
|
2519
|
-
})()
|
|
2672
|
+
})();
|
|
2673
|
+
this.ttsProvider = new r.ServerTTSProvider(), console.log(`[TTSToolProvider] Server TTS initialized (provider: ${e.serverProvider || e.backend})`);
|
|
2520
2674
|
}
|
|
2521
2675
|
async createInstance(e) {
|
|
2522
2676
|
if (!this.ttsProvider) throw new Error("[TTSToolProvider] Provider not initialized. Call initialize() first.");
|
|
@@ -2544,7 +2698,7 @@ var Ws = class {
|
|
|
2544
2698
|
destroy() {
|
|
2545
2699
|
this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
|
|
2546
2700
|
}
|
|
2547
|
-
},
|
|
2701
|
+
}, vs = /* @__PURE__ */ new Set([
|
|
2548
2702
|
"annotation-xml",
|
|
2549
2703
|
"color-profile",
|
|
2550
2704
|
"font-face",
|
|
@@ -2553,16 +2707,16 @@ var Ws = class {
|
|
|
2553
2707
|
"font-face-format",
|
|
2554
2708
|
"font-face-name",
|
|
2555
2709
|
"missing-glyph"
|
|
2556
|
-
]),
|
|
2710
|
+
]), gs = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, ms = (e, t = "custom element tag") => {
|
|
2557
2711
|
if (!e || typeof e != "string") throw new Error(`Invalid ${t}: expected a non-empty string`);
|
|
2558
2712
|
const r = e.trim();
|
|
2559
2713
|
if (!r) throw new Error(`Invalid ${t}: tag is empty`);
|
|
2560
2714
|
if (r !== r.toLowerCase()) throw new Error(`Invalid ${t} "${r}": custom element names must be lowercase`);
|
|
2561
2715
|
if (!r.includes("-")) throw new Error(`Invalid ${t} "${r}": custom element names must include a hyphen`);
|
|
2562
|
-
if (
|
|
2563
|
-
if (!
|
|
2716
|
+
if (vs.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
|
|
2717
|
+
if (!gs.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
|
|
2564
2718
|
return r;
|
|
2565
|
-
},
|
|
2719
|
+
}, rn = {
|
|
2566
2720
|
calculator: "pie-tool-calculator",
|
|
2567
2721
|
textToSpeech: "pie-tool-text-to-speech",
|
|
2568
2722
|
ruler: "pie-tool-ruler",
|
|
@@ -2575,22 +2729,22 @@ var Ws = class {
|
|
|
2575
2729
|
annotationToolbar: "pie-tool-annotation-toolbar",
|
|
2576
2730
|
graph: "pie-tool-graph",
|
|
2577
2731
|
periodicTable: "pie-tool-periodic-table"
|
|
2578
|
-
},
|
|
2579
|
-
const n =
|
|
2580
|
-
return
|
|
2732
|
+
}, _s = (e, t) => ms(t?.toolTagMap?.[e] ?? rn[e] ?? e, `tool component tag for "${e}"`), ys = (e) => document.createElement(e), ce = (e, t, r, i) => {
|
|
2733
|
+
const n = _s(e, i), o = i?.toolComponentFactories?.[e] ?? i?.toolComponentFactory;
|
|
2734
|
+
return o ? o({
|
|
2581
2735
|
toolId: e,
|
|
2582
2736
|
tagName: n,
|
|
2583
2737
|
context: t,
|
|
2584
2738
|
toolbarContext: r
|
|
2585
|
-
}) :
|
|
2586
|
-
},
|
|
2739
|
+
}) : ys(n);
|
|
2740
|
+
}, bs = {
|
|
2587
2741
|
toolId: "calculator",
|
|
2588
2742
|
name: "Calculator",
|
|
2589
2743
|
description: "Multi-type calculator (basic, scientific, graphing)",
|
|
2590
2744
|
icon: "calculator",
|
|
2591
2745
|
provider: {
|
|
2592
2746
|
getProviderId: (e) => typeof e?.provider?.id == "string" && e.provider.id.length > 0 ? e.provider.id : "calculator-desmos",
|
|
2593
|
-
createProvider: () => new
|
|
2747
|
+
createProvider: () => new us(),
|
|
2594
2748
|
getInitConfig: (e) => e?.provider?.init ?? {},
|
|
2595
2749
|
getAuthFetcher: (e) => {
|
|
2596
2750
|
const t = e?.provider?.runtime?.authFetcher;
|
|
@@ -2613,12 +2767,12 @@ var Ws = class {
|
|
|
2613
2767
|
"scientificCalculator"
|
|
2614
2768
|
],
|
|
2615
2769
|
isVisibleInContext(e) {
|
|
2616
|
-
return
|
|
2770
|
+
return Bt(e);
|
|
2617
2771
|
},
|
|
2618
2772
|
renderToolbar(e, t) {
|
|
2619
|
-
const r =
|
|
2773
|
+
const r = wr(this.toolId, t.scope.level, t.scope.scopeId), i = t.componentOverrides, n = ce(this.toolId, e, t, i);
|
|
2620
2774
|
n.setAttribute("tool-id", r), n.toolkitCoordinator = t.toolkitCoordinator;
|
|
2621
|
-
const
|
|
2775
|
+
const o = {
|
|
2622
2776
|
toolId: this.toolId,
|
|
2623
2777
|
label: this.name,
|
|
2624
2778
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -2628,8 +2782,8 @@ var Ws = class {
|
|
|
2628
2782
|
onClick: () => t.toggleTool(this.toolId),
|
|
2629
2783
|
active: t.isToolVisible(r)
|
|
2630
2784
|
};
|
|
2631
|
-
let
|
|
2632
|
-
return n.visible =
|
|
2785
|
+
let s = o.active;
|
|
2786
|
+
return n.visible = o.active, {
|
|
2633
2787
|
toolId: this.toolId,
|
|
2634
2788
|
elements: [{
|
|
2635
2789
|
element: n,
|
|
@@ -2645,24 +2799,24 @@ var Ws = class {
|
|
|
2645
2799
|
minHeight: 420
|
|
2646
2800
|
}
|
|
2647
2801
|
}],
|
|
2648
|
-
button:
|
|
2802
|
+
button: o,
|
|
2649
2803
|
sync: () => {
|
|
2650
|
-
const
|
|
2651
|
-
|
|
2804
|
+
const l = t.isToolVisible(r);
|
|
2805
|
+
o.active = l, o.ariaLabel = l ? "Close scientific calculator" : "Open scientific calculator", o.tooltip = l ? "Close calculator" : "Calculator", s !== l && (n.visible = l, s = l), n.toolkitCoordinator !== t.toolkitCoordinator && (n.toolkitCoordinator = t.toolkitCoordinator);
|
|
2652
2806
|
},
|
|
2653
|
-
subscribeActive: (
|
|
2654
|
-
|
|
2807
|
+
subscribeActive: (l) => t.subscribeVisibility ? t.subscribeVisibility(() => {
|
|
2808
|
+
l(t.isToolVisible(r));
|
|
2655
2809
|
}) : () => {
|
|
2656
2810
|
}
|
|
2657
2811
|
};
|
|
2658
2812
|
}
|
|
2659
|
-
},
|
|
2813
|
+
}, ws = /* @__PURE__ */ new Set([
|
|
2660
2814
|
"reserved-row",
|
|
2661
2815
|
"expanding-row",
|
|
2662
2816
|
"floating-overlay",
|
|
2663
2817
|
"left-aligned"
|
|
2664
|
-
]),
|
|
2665
|
-
if (!Array.isArray(e)) return [...
|
|
2818
|
+
]), Ur = (e) => e && typeof e == "object" ? e : {}, Ts = (e) => e === "polly" || e === "google" || e === "server", G = (e, t) => e === void 0 ? t : e, Pt = (e, t = "left-aligned") => typeof e == "string" && ws.has(e) ? e : t, Yr = Object.freeze([0.8, 1.25]), qt = (e) => {
|
|
2819
|
+
if (!Array.isArray(e)) return [...Yr];
|
|
2666
2820
|
if (e.length === 0) return [];
|
|
2667
2821
|
const t = /* @__PURE__ */ new Set();
|
|
2668
2822
|
for (const r of e) {
|
|
@@ -2670,41 +2824,41 @@ var Ws = class {
|
|
|
2670
2824
|
const i = Math.round(r * 100) / 100;
|
|
2671
2825
|
i !== 1 && t.add(i);
|
|
2672
2826
|
}
|
|
2673
|
-
return t.size ? Array.from(t) : [...
|
|
2674
|
-
},
|
|
2827
|
+
return t.size ? Array.from(t) : [...Yr];
|
|
2828
|
+
}, As = (e) => {
|
|
2675
2829
|
const t = {
|
|
2676
2830
|
...e,
|
|
2677
|
-
layoutMode:
|
|
2831
|
+
layoutMode: Pt(e.layoutMode)
|
|
2678
2832
|
}, r = e.backend || "browser";
|
|
2679
|
-
if (!
|
|
2833
|
+
if (!Ts(r)) return t;
|
|
2680
2834
|
const i = {
|
|
2681
2835
|
...t,
|
|
2682
|
-
apiEndpoint:
|
|
2683
|
-
transportMode:
|
|
2684
|
-
endpointValidationMode:
|
|
2685
|
-
validateEndpoint:
|
|
2686
|
-
includeAuthOnAssetFetch:
|
|
2687
|
-
rate:
|
|
2688
|
-
language:
|
|
2836
|
+
apiEndpoint: G(t.apiEndpoint, "/api/tts"),
|
|
2837
|
+
transportMode: G(t.transportMode, "pie"),
|
|
2838
|
+
endpointValidationMode: G(t.endpointValidationMode, "voices"),
|
|
2839
|
+
validateEndpoint: G(t.validateEndpoint, !0),
|
|
2840
|
+
includeAuthOnAssetFetch: G(t.includeAuthOnAssetFetch, !1),
|
|
2841
|
+
rate: G(t.rate, 1),
|
|
2842
|
+
language: G(t.language, "en-US")
|
|
2689
2843
|
};
|
|
2690
2844
|
return r === "polly" ? {
|
|
2691
2845
|
...i,
|
|
2692
|
-
defaultVoice:
|
|
2693
|
-
engine:
|
|
2694
|
-
format:
|
|
2695
|
-
speechMarksMode:
|
|
2846
|
+
defaultVoice: G(i.defaultVoice, "Joanna"),
|
|
2847
|
+
engine: G(i.engine, "neural"),
|
|
2848
|
+
format: G(i.format, "mp3"),
|
|
2849
|
+
speechMarksMode: G(i.speechMarksMode, "word+sentence")
|
|
2696
2850
|
} : r === "google" ? {
|
|
2697
2851
|
...i,
|
|
2698
|
-
defaultVoice:
|
|
2852
|
+
defaultVoice: G(i.defaultVoice, "en-US-Wavenet-A")
|
|
2699
2853
|
} : i;
|
|
2700
|
-
},
|
|
2701
|
-
const t =
|
|
2702
|
-
return
|
|
2854
|
+
}, Kt = (e) => {
|
|
2855
|
+
const t = Ur(e), r = Ur(e?.settings);
|
|
2856
|
+
return As({
|
|
2703
2857
|
...t,
|
|
2704
2858
|
...r
|
|
2705
2859
|
});
|
|
2706
|
-
},
|
|
2707
|
-
const t =
|
|
2860
|
+
}, sr = (e) => e.backend || "browser", nn = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, on = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), Ss = (e) => {
|
|
2861
|
+
const t = sr(e), r = nn(e, t), i = on(e, r);
|
|
2708
2862
|
return {
|
|
2709
2863
|
voice: e.defaultVoice,
|
|
2710
2864
|
rate: e.rate,
|
|
@@ -2728,8 +2882,8 @@ var Ws = class {
|
|
|
2728
2882
|
includeAuthOnAssetFetch: e.includeAuthOnAssetFetch,
|
|
2729
2883
|
validateEndpoint: e.validateEndpoint
|
|
2730
2884
|
};
|
|
2731
|
-
},
|
|
2732
|
-
switch (
|
|
2885
|
+
}, sn = (e) => Pt(e.layoutMode), Is = (e) => {
|
|
2886
|
+
switch (sn(e)) {
|
|
2733
2887
|
case "reserved-row":
|
|
2734
2888
|
return {
|
|
2735
2889
|
mount: "before-buttons",
|
|
@@ -2755,21 +2909,21 @@ var Ws = class {
|
|
|
2755
2909
|
}
|
|
2756
2910
|
};
|
|
2757
2911
|
}
|
|
2758
|
-
},
|
|
2912
|
+
}, rt = /* @__PURE__ */ new Map(), Es = "__pieToolElementUnmount", Xr = "pie-tool-active-change", ks = {
|
|
2759
2913
|
toolId: "textToSpeech",
|
|
2760
2914
|
name: "Text to Speech",
|
|
2761
2915
|
description: "Read content aloud",
|
|
2762
2916
|
icon: "volume-up",
|
|
2763
2917
|
provider: {
|
|
2764
2918
|
getProviderId: () => "tts",
|
|
2765
|
-
createProvider: (e) => new
|
|
2919
|
+
createProvider: (e) => new ps(sr(Kt(e))),
|
|
2766
2920
|
getInitConfig: (e) => {
|
|
2767
|
-
const t =
|
|
2921
|
+
const t = Kt(e), r = sr(t), i = nn(t, r);
|
|
2768
2922
|
return {
|
|
2769
2923
|
backend: r,
|
|
2770
2924
|
serverProvider: i,
|
|
2771
|
-
transportMode:
|
|
2772
|
-
...
|
|
2925
|
+
transportMode: on(t, i),
|
|
2926
|
+
...Ss(t)
|
|
2773
2927
|
};
|
|
2774
2928
|
},
|
|
2775
2929
|
getAuthFetcher: (e) => {
|
|
@@ -2778,9 +2932,9 @@ var Ws = class {
|
|
|
2778
2932
|
},
|
|
2779
2933
|
sanitizeConfig: (e) => {
|
|
2780
2934
|
const t = e.settings && typeof e.settings == "object" ? { ...e.settings } : void 0;
|
|
2781
|
-
t && "layoutMode" in t && (t.layoutMode =
|
|
2935
|
+
t && "layoutMode" in t && (t.layoutMode = Pt(t.layoutMode)), t && "speedOptions" in t && (t.speedOptions = qt(t.speedOptions));
|
|
2782
2936
|
const r = { ...e };
|
|
2783
|
-
return "layoutMode" in r && (r.layoutMode =
|
|
2937
|
+
return "layoutMode" in r && (r.layoutMode = Pt(r.layoutMode)), "speedOptions" in r && (r.speedOptions = qt(r.speedOptions)), t && (r.settings = t), r;
|
|
2784
2938
|
},
|
|
2785
2939
|
lazy: !0
|
|
2786
2940
|
},
|
|
@@ -2792,47 +2946,47 @@ var Ws = class {
|
|
|
2792
2946
|
"speechOutput"
|
|
2793
2947
|
],
|
|
2794
2948
|
isVisibleInContext(e) {
|
|
2795
|
-
return
|
|
2949
|
+
return jt(e);
|
|
2796
2950
|
},
|
|
2797
2951
|
renderToolbar(e, t) {
|
|
2798
|
-
const r = () =>
|
|
2952
|
+
const r = () => Kt(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), i = () => qt(r().speedOptions), n = () => sn(r()), o = () => Is(r()), s = wr(this.toolId, t.scope.level, t.scope.scopeId), l = () => {
|
|
2799
2953
|
const f = t.ui?.size;
|
|
2800
2954
|
return f === "sm" || f === "lg" ? f : "md";
|
|
2801
2955
|
}, c = () => {
|
|
2802
|
-
let f =
|
|
2803
|
-
return f && typeof f.isConnected == "boolean" && !f.isConnected && (
|
|
2804
|
-
|
|
2805
|
-
},
|
|
2806
|
-
},
|
|
2956
|
+
let f = rt.get(s);
|
|
2957
|
+
return f && typeof f.isConnected == "boolean" && !f.isConnected && (rt.delete(s), f = void 0), f || (f = document.createElement("pie-tool-tts-inline"), f[Es] = () => {
|
|
2958
|
+
rt.get(s) === f && rt.delete(s);
|
|
2959
|
+
}, rt.set(s, f)), f.setAttribute("tool-id", s), f.setAttribute("catalog-id", t.catalogId || t.itemId), f.setAttribute("language", t.language || "en-US"), f.setAttribute("size", l()), f.setAttribute("layout-mode", n()), f.speedOptions = i(), f;
|
|
2960
|
+
}, d = o();
|
|
2807
2961
|
return {
|
|
2808
2962
|
toolId: this.toolId,
|
|
2809
2963
|
button: null,
|
|
2810
2964
|
elements: [{
|
|
2811
2965
|
element: c(),
|
|
2812
|
-
mount:
|
|
2966
|
+
mount: d.mount,
|
|
2813
2967
|
layoutHints: { controlsRow: {
|
|
2814
|
-
reserveSpace:
|
|
2815
|
-
showWhenToolActive:
|
|
2968
|
+
reserveSpace: d.controlsRow.reserveSpace,
|
|
2969
|
+
showWhenToolActive: d.controlsRow.expandWhenToolActive
|
|
2816
2970
|
} }
|
|
2817
2971
|
}],
|
|
2818
2972
|
subscribeActive: (f) => {
|
|
2819
|
-
const
|
|
2820
|
-
const
|
|
2821
|
-
f(
|
|
2973
|
+
const v = c(), h = (g) => {
|
|
2974
|
+
const p = g.detail;
|
|
2975
|
+
f(p?.active === !0);
|
|
2822
2976
|
};
|
|
2823
|
-
return
|
|
2824
|
-
|
|
2977
|
+
return v.addEventListener(Xr, h), () => {
|
|
2978
|
+
v.removeEventListener(Xr, h);
|
|
2825
2979
|
};
|
|
2826
2980
|
},
|
|
2827
2981
|
sync: () => {
|
|
2828
2982
|
const f = c();
|
|
2829
|
-
f.setAttribute("tool-id",
|
|
2983
|
+
f.setAttribute("tool-id", s), f.setAttribute("catalog-id", t.catalogId || t.itemId), f.setAttribute("language", t.language || "en-US"), f.setAttribute("size", l()), f.setAttribute("layout-mode", n()), f.speedOptions = i();
|
|
2830
2984
|
}
|
|
2831
2985
|
};
|
|
2832
2986
|
}
|
|
2833
2987
|
};
|
|
2834
|
-
function
|
|
2835
|
-
const r =
|
|
2988
|
+
function he(e, t) {
|
|
2989
|
+
const r = wr(e, t.scope.level, t.scope.scopeId);
|
|
2836
2990
|
return {
|
|
2837
2991
|
fullToolId: r,
|
|
2838
2992
|
isActive: () => t.isToolVisible(r),
|
|
@@ -2842,14 +2996,14 @@ function ue(e, t) {
|
|
|
2842
2996
|
}
|
|
2843
2997
|
};
|
|
2844
2998
|
}
|
|
2845
|
-
function
|
|
2999
|
+
function pe(e) {
|
|
2846
3000
|
const t = e.isActive();
|
|
2847
3001
|
e.button.active = t, e.overlay.visible = t, e.onActiveChange?.(t);
|
|
2848
3002
|
}
|
|
2849
|
-
function
|
|
3003
|
+
function Tr(e, t) {
|
|
2850
3004
|
e.setAttribute("data-pie-tool-surface", t);
|
|
2851
3005
|
}
|
|
2852
|
-
var
|
|
3006
|
+
var Cs = {
|
|
2853
3007
|
toolId: "ruler",
|
|
2854
3008
|
name: "Ruler",
|
|
2855
3009
|
description: "On-screen ruler for measurements",
|
|
@@ -2861,10 +3015,10 @@ var co = {
|
|
|
2861
3015
|
],
|
|
2862
3016
|
pnpSupportIds: ["ruler", "measurement"],
|
|
2863
3017
|
isVisibleInContext(e) {
|
|
2864
|
-
return
|
|
3018
|
+
return Bt(e);
|
|
2865
3019
|
},
|
|
2866
3020
|
renderToolbar(e, t) {
|
|
2867
|
-
const r =
|
|
3021
|
+
const r = he(this.toolId, t), i = {
|
|
2868
3022
|
toolId: this.toolId,
|
|
2869
3023
|
label: this.name,
|
|
2870
3024
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -2873,25 +3027,25 @@ var co = {
|
|
|
2873
3027
|
tooltip: "Ruler",
|
|
2874
3028
|
onClick: () => t.toggleTool(this.toolId),
|
|
2875
3029
|
active: r.isActive()
|
|
2876
|
-
}, n = t.componentOverrides ?? {},
|
|
2877
|
-
return
|
|
3030
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3031
|
+
return o.setAttribute("tool-id", r.fullToolId), Tr(o, "frameless"), {
|
|
2878
3032
|
toolId: this.toolId,
|
|
2879
3033
|
button: i,
|
|
2880
3034
|
elements: [{
|
|
2881
|
-
element:
|
|
3035
|
+
element: o,
|
|
2882
3036
|
mount: "after-buttons"
|
|
2883
3037
|
}],
|
|
2884
3038
|
sync: () => {
|
|
2885
|
-
|
|
3039
|
+
pe({
|
|
2886
3040
|
button: i,
|
|
2887
|
-
overlay:
|
|
3041
|
+
overlay: o,
|
|
2888
3042
|
isActive: r.isActive
|
|
2889
|
-
}), t.toolkitCoordinator && (
|
|
3043
|
+
}), t.toolkitCoordinator && (o.toolkitCoordinator = t.toolkitCoordinator);
|
|
2890
3044
|
},
|
|
2891
3045
|
subscribeActive: r.subscribeActive
|
|
2892
3046
|
};
|
|
2893
3047
|
}
|
|
2894
|
-
},
|
|
3048
|
+
}, $s = {
|
|
2895
3049
|
toolId: "protractor",
|
|
2896
3050
|
name: "Protractor",
|
|
2897
3051
|
description: "On-screen protractor for angle measurements",
|
|
@@ -2903,10 +3057,10 @@ var co = {
|
|
|
2903
3057
|
],
|
|
2904
3058
|
pnpSupportIds: ["protractor", "angleMeasurement"],
|
|
2905
3059
|
isVisibleInContext(e) {
|
|
2906
|
-
return
|
|
3060
|
+
return Bt(e);
|
|
2907
3061
|
},
|
|
2908
3062
|
renderToolbar(e, t) {
|
|
2909
|
-
const r =
|
|
3063
|
+
const r = he(this.toolId, t), i = {
|
|
2910
3064
|
toolId: this.toolId,
|
|
2911
3065
|
label: this.name,
|
|
2912
3066
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -2915,25 +3069,25 @@ var co = {
|
|
|
2915
3069
|
tooltip: "Protractor",
|
|
2916
3070
|
onClick: () => t.toggleTool(this.toolId),
|
|
2917
3071
|
active: r.isActive()
|
|
2918
|
-
}, n = t.componentOverrides ?? {},
|
|
2919
|
-
return
|
|
3072
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3073
|
+
return o.setAttribute("tool-id", r.fullToolId), Tr(o, "frameless"), {
|
|
2920
3074
|
toolId: this.toolId,
|
|
2921
3075
|
button: i,
|
|
2922
3076
|
elements: [{
|
|
2923
|
-
element:
|
|
3077
|
+
element: o,
|
|
2924
3078
|
mount: "after-buttons"
|
|
2925
3079
|
}],
|
|
2926
3080
|
sync: () => {
|
|
2927
|
-
|
|
3081
|
+
pe({
|
|
2928
3082
|
button: i,
|
|
2929
|
-
overlay:
|
|
3083
|
+
overlay: o,
|
|
2930
3084
|
isActive: r.isActive
|
|
2931
|
-
}), t.toolkitCoordinator && (
|
|
3085
|
+
}), t.toolkitCoordinator && (o.toolkitCoordinator = t.toolkitCoordinator);
|
|
2932
3086
|
},
|
|
2933
3087
|
subscribeActive: r.subscribeActive
|
|
2934
3088
|
};
|
|
2935
3089
|
}
|
|
2936
|
-
},
|
|
3090
|
+
}, Ls = {
|
|
2937
3091
|
toolId: "answerEliminator",
|
|
2938
3092
|
name: "Answer Eliminator",
|
|
2939
3093
|
description: "Strike through answer choices",
|
|
@@ -2946,12 +3100,12 @@ var co = {
|
|
|
2946
3100
|
"choiceMasking"
|
|
2947
3101
|
],
|
|
2948
3102
|
isVisibleInContext(e) {
|
|
2949
|
-
return
|
|
3103
|
+
return os(e);
|
|
2950
3104
|
},
|
|
2951
3105
|
renderToolbar(e, t) {
|
|
2952
|
-
const r =
|
|
3106
|
+
const r = he(this.toolId, t), i = t.componentOverrides ?? {}, n = ce(this.toolId, e, t, i);
|
|
2953
3107
|
n.setAttribute("tool-id", r.fullToolId), n.setAttribute("strategy", "strikethrough"), n.setAttribute("button-alignment", "inline");
|
|
2954
|
-
const
|
|
3108
|
+
const o = {
|
|
2955
3109
|
toolId: this.toolId,
|
|
2956
3110
|
label: this.name,
|
|
2957
3111
|
icon: '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="currentColor" aria-hidden="true"><path d="M19,3H16.3H7.7H5A2,2 0 0,0 3,5V7.7V16.4V19A2,2 0 0,0 5,21H7.7H16.4H19A2,2 0 0,0 21,19V16.3V7.7V5A2,2 0 0,0 19,3M15.6,17L12,13.4L8.4,17L7,15.6L10.6,12L7,8.4L8.4,7L12,10.6L15.6,7L17,8.4L13.4,12L17,15.6L15.6,17Z"/></svg>',
|
|
@@ -2963,24 +3117,24 @@ var co = {
|
|
|
2963
3117
|
};
|
|
2964
3118
|
return {
|
|
2965
3119
|
toolId: this.toolId,
|
|
2966
|
-
button:
|
|
3120
|
+
button: o,
|
|
2967
3121
|
elements: [{
|
|
2968
3122
|
element: n,
|
|
2969
3123
|
mount: "after-buttons"
|
|
2970
3124
|
}],
|
|
2971
3125
|
sync: () => {
|
|
2972
|
-
|
|
2973
|
-
button:
|
|
3126
|
+
pe({
|
|
3127
|
+
button: o,
|
|
2974
3128
|
overlay: n,
|
|
2975
3129
|
isActive: r.isActive
|
|
2976
3130
|
}), t.toolCoordinator && (n.coordinator = t.toolCoordinator), n.scopeElement = t.getScopeElement?.() || null, t.elementToolStateStore && (n.elementToolStateStore = t.elementToolStateStore);
|
|
2977
|
-
const
|
|
2978
|
-
|
|
3131
|
+
const s = t.getGlobalElementId?.();
|
|
3132
|
+
s && (n.globalElementId = s);
|
|
2979
3133
|
},
|
|
2980
3134
|
subscribeActive: r.subscribeActive
|
|
2981
3135
|
};
|
|
2982
3136
|
}
|
|
2983
|
-
},
|
|
3137
|
+
}, Os = {
|
|
2984
3138
|
toolId: "highlighter",
|
|
2985
3139
|
name: "Highlighter",
|
|
2986
3140
|
description: "Highlight text",
|
|
@@ -2998,10 +3152,10 @@ var co = {
|
|
|
2998
3152
|
"annotation"
|
|
2999
3153
|
],
|
|
3000
3154
|
isVisibleInContext(e) {
|
|
3001
|
-
return
|
|
3155
|
+
return jt(e);
|
|
3002
3156
|
},
|
|
3003
3157
|
renderToolbar(e, t) {
|
|
3004
|
-
const r =
|
|
3158
|
+
const r = he(this.toolId, t), i = {
|
|
3005
3159
|
toolId: this.toolId,
|
|
3006
3160
|
label: this.name,
|
|
3007
3161
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -3010,28 +3164,28 @@ var co = {
|
|
|
3010
3164
|
tooltip: "Highlight",
|
|
3011
3165
|
onClick: () => t.toggleTool(this.toolId),
|
|
3012
3166
|
active: r.isActive()
|
|
3013
|
-
}, n = t.componentOverrides ?? {},
|
|
3014
|
-
return
|
|
3167
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3168
|
+
return o.setAttribute("tool-id", r.fullToolId), {
|
|
3015
3169
|
toolId: this.toolId,
|
|
3016
3170
|
button: i,
|
|
3017
3171
|
elements: [{
|
|
3018
|
-
element:
|
|
3172
|
+
element: o,
|
|
3019
3173
|
mount: "after-buttons"
|
|
3020
3174
|
}],
|
|
3021
3175
|
sync: () => {
|
|
3022
|
-
|
|
3176
|
+
pe({
|
|
3023
3177
|
button: i,
|
|
3024
|
-
overlay:
|
|
3178
|
+
overlay: o,
|
|
3025
3179
|
isActive: r.isActive,
|
|
3026
|
-
onActiveChange: (
|
|
3027
|
-
|
|
3180
|
+
onActiveChange: (s) => {
|
|
3181
|
+
o.enabled = s;
|
|
3028
3182
|
}
|
|
3029
|
-
}), t.ttsService && (
|
|
3183
|
+
}), t.ttsService && (o.ttsService = t.ttsService);
|
|
3030
3184
|
},
|
|
3031
3185
|
subscribeActive: r.subscribeActive
|
|
3032
3186
|
};
|
|
3033
3187
|
}
|
|
3034
|
-
},
|
|
3188
|
+
}, Rs = {
|
|
3035
3189
|
toolId: "lineReader",
|
|
3036
3190
|
name: "Line Reader",
|
|
3037
3191
|
description: "Reading guide overlay",
|
|
@@ -3050,10 +3204,10 @@ var co = {
|
|
|
3050
3204
|
"trackingGuide"
|
|
3051
3205
|
],
|
|
3052
3206
|
isVisibleInContext(e) {
|
|
3053
|
-
return
|
|
3207
|
+
return jt(e);
|
|
3054
3208
|
},
|
|
3055
3209
|
renderToolbar(e, t) {
|
|
3056
|
-
const r =
|
|
3210
|
+
const r = he(this.toolId, t), i = {
|
|
3057
3211
|
toolId: this.toolId,
|
|
3058
3212
|
label: this.name,
|
|
3059
3213
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -3062,25 +3216,25 @@ var co = {
|
|
|
3062
3216
|
tooltip: "Line Reader",
|
|
3063
3217
|
onClick: () => t.toggleTool(this.toolId),
|
|
3064
3218
|
active: r.isActive()
|
|
3065
|
-
}, n = t.componentOverrides ?? {},
|
|
3066
|
-
return
|
|
3219
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3220
|
+
return o.setAttribute("tool-id", r.fullToolId), Tr(o, "frameless"), {
|
|
3067
3221
|
toolId: this.toolId,
|
|
3068
3222
|
button: i,
|
|
3069
3223
|
elements: [{
|
|
3070
|
-
element:
|
|
3224
|
+
element: o,
|
|
3071
3225
|
mount: "after-buttons"
|
|
3072
3226
|
}],
|
|
3073
3227
|
sync: () => {
|
|
3074
|
-
|
|
3228
|
+
pe({
|
|
3075
3229
|
button: i,
|
|
3076
|
-
overlay:
|
|
3230
|
+
overlay: o,
|
|
3077
3231
|
isActive: r.isActive
|
|
3078
|
-
}), t.toolkitCoordinator && (
|
|
3232
|
+
}), t.toolkitCoordinator && (o.toolkitCoordinator = t.toolkitCoordinator);
|
|
3079
3233
|
},
|
|
3080
3234
|
subscribeActive: r.subscribeActive
|
|
3081
3235
|
};
|
|
3082
3236
|
}
|
|
3083
|
-
},
|
|
3237
|
+
}, Ms = {
|
|
3084
3238
|
toolId: "theme",
|
|
3085
3239
|
name: "Theme",
|
|
3086
3240
|
description: "Accessible themes and contrast",
|
|
@@ -3099,7 +3253,7 @@ var co = {
|
|
|
3099
3253
|
return !0;
|
|
3100
3254
|
},
|
|
3101
3255
|
renderToolbar(e, t) {
|
|
3102
|
-
const r =
|
|
3256
|
+
const r = he(this.toolId, t), i = {
|
|
3103
3257
|
toolId: this.toolId,
|
|
3104
3258
|
label: this.name,
|
|
3105
3259
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -3108,12 +3262,12 @@ var co = {
|
|
|
3108
3262
|
tooltip: "Theme",
|
|
3109
3263
|
onClick: () => t.toggleTool(this.toolId),
|
|
3110
3264
|
active: r.isActive()
|
|
3111
|
-
}, n = t.componentOverrides ?? {},
|
|
3112
|
-
return
|
|
3265
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3266
|
+
return o.setAttribute("tool-id", r.fullToolId), {
|
|
3113
3267
|
toolId: this.toolId,
|
|
3114
3268
|
button: i,
|
|
3115
3269
|
elements: [{
|
|
3116
|
-
element:
|
|
3270
|
+
element: o,
|
|
3117
3271
|
mount: "after-buttons",
|
|
3118
3272
|
shell: {
|
|
3119
3273
|
title: this.name,
|
|
@@ -3127,16 +3281,16 @@ var co = {
|
|
|
3127
3281
|
}
|
|
3128
3282
|
}],
|
|
3129
3283
|
sync: () => {
|
|
3130
|
-
|
|
3284
|
+
pe({
|
|
3131
3285
|
button: i,
|
|
3132
|
-
overlay:
|
|
3286
|
+
overlay: o,
|
|
3133
3287
|
isActive: r.isActive
|
|
3134
|
-
}), t.toolkitCoordinator && (
|
|
3288
|
+
}), t.toolkitCoordinator && (o.toolkitCoordinator = t.toolkitCoordinator);
|
|
3135
3289
|
},
|
|
3136
3290
|
subscribeActive: r.subscribeActive
|
|
3137
3291
|
};
|
|
3138
3292
|
}
|
|
3139
|
-
},
|
|
3293
|
+
}, Ps = {
|
|
3140
3294
|
toolId: "annotationToolbar",
|
|
3141
3295
|
name: "Highlighter",
|
|
3142
3296
|
description: "Highlight and annotate text",
|
|
@@ -3157,10 +3311,10 @@ var co = {
|
|
|
3157
3311
|
"annotation"
|
|
3158
3312
|
],
|
|
3159
3313
|
isVisibleInContext(e) {
|
|
3160
|
-
return
|
|
3314
|
+
return jt(e);
|
|
3161
3315
|
},
|
|
3162
3316
|
renderToolbar(e, t) {
|
|
3163
|
-
const r =
|
|
3317
|
+
const r = he(this.toolId, t), i = {
|
|
3164
3318
|
toolId: this.toolId,
|
|
3165
3319
|
label: this.name,
|
|
3166
3320
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -3169,25 +3323,25 @@ var co = {
|
|
|
3169
3323
|
tooltip: "Highlight",
|
|
3170
3324
|
onClick: () => t.toggleTool(this.toolId),
|
|
3171
3325
|
active: r.isActive()
|
|
3172
|
-
}, n = t.componentOverrides ?? {},
|
|
3173
|
-
return
|
|
3326
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3327
|
+
return o.setAttribute("tool-id", r.fullToolId), {
|
|
3174
3328
|
toolId: this.toolId,
|
|
3175
3329
|
button: i,
|
|
3176
3330
|
elements: [{
|
|
3177
|
-
element:
|
|
3331
|
+
element: o,
|
|
3178
3332
|
mount: "after-buttons"
|
|
3179
3333
|
}],
|
|
3180
3334
|
sync: () => {
|
|
3181
|
-
|
|
3335
|
+
pe({
|
|
3182
3336
|
button: i,
|
|
3183
|
-
overlay:
|
|
3337
|
+
overlay: o,
|
|
3184
3338
|
isActive: r.isActive
|
|
3185
|
-
}), t.toolkitCoordinator && (
|
|
3339
|
+
}), t.toolkitCoordinator && (o.toolkitCoordinator = t.toolkitCoordinator);
|
|
3186
3340
|
},
|
|
3187
3341
|
subscribeActive: r.subscribeActive
|
|
3188
3342
|
};
|
|
3189
3343
|
}
|
|
3190
|
-
},
|
|
3344
|
+
}, xs = {
|
|
3191
3345
|
toolId: "graph",
|
|
3192
3346
|
name: "Graph",
|
|
3193
3347
|
description: "Graphing calculator and coordinate plane",
|
|
@@ -3200,10 +3354,10 @@ var co = {
|
|
|
3200
3354
|
"graphingTool"
|
|
3201
3355
|
],
|
|
3202
3356
|
isVisibleInContext(e) {
|
|
3203
|
-
return
|
|
3357
|
+
return Bt(e);
|
|
3204
3358
|
},
|
|
3205
3359
|
renderToolbar(e, t) {
|
|
3206
|
-
const r =
|
|
3360
|
+
const r = he(this.toolId, t), i = {
|
|
3207
3361
|
toolId: this.toolId,
|
|
3208
3362
|
label: this.name,
|
|
3209
3363
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -3212,12 +3366,12 @@ var co = {
|
|
|
3212
3366
|
tooltip: "Graph",
|
|
3213
3367
|
onClick: () => t.toggleTool(this.toolId),
|
|
3214
3368
|
active: r.isActive()
|
|
3215
|
-
}, n = t.componentOverrides ?? {},
|
|
3216
|
-
return
|
|
3369
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3370
|
+
return o.setAttribute("tool-id", r.fullToolId), {
|
|
3217
3371
|
toolId: this.toolId,
|
|
3218
3372
|
button: i,
|
|
3219
3373
|
elements: [{
|
|
3220
|
-
element:
|
|
3374
|
+
element: o,
|
|
3221
3375
|
mount: "after-buttons",
|
|
3222
3376
|
shell: {
|
|
3223
3377
|
title: this.name,
|
|
@@ -3231,16 +3385,16 @@ var co = {
|
|
|
3231
3385
|
}
|
|
3232
3386
|
}],
|
|
3233
3387
|
sync: () => {
|
|
3234
|
-
|
|
3388
|
+
pe({
|
|
3235
3389
|
button: i,
|
|
3236
|
-
overlay:
|
|
3390
|
+
overlay: o,
|
|
3237
3391
|
isActive: r.isActive
|
|
3238
3392
|
});
|
|
3239
3393
|
},
|
|
3240
3394
|
subscribeActive: r.subscribeActive
|
|
3241
3395
|
};
|
|
3242
3396
|
}
|
|
3243
|
-
},
|
|
3397
|
+
}, Hs = {
|
|
3244
3398
|
toolId: "periodicTable",
|
|
3245
3399
|
name: "Periodic Table",
|
|
3246
3400
|
description: "Chemistry periodic table reference",
|
|
@@ -3252,10 +3406,10 @@ var co = {
|
|
|
3252
3406
|
"elementReference"
|
|
3253
3407
|
],
|
|
3254
3408
|
isVisibleInContext(e) {
|
|
3255
|
-
return
|
|
3409
|
+
return ss(e);
|
|
3256
3410
|
},
|
|
3257
3411
|
renderToolbar(e, t) {
|
|
3258
|
-
const r =
|
|
3412
|
+
const r = he(this.toolId, t), i = {
|
|
3259
3413
|
toolId: this.toolId,
|
|
3260
3414
|
label: this.name,
|
|
3261
3415
|
icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
|
|
@@ -3264,12 +3418,12 @@ var co = {
|
|
|
3264
3418
|
tooltip: "Periodic Table",
|
|
3265
3419
|
onClick: () => t.toggleTool(this.toolId),
|
|
3266
3420
|
active: r.isActive()
|
|
3267
|
-
}, n = t.componentOverrides ?? {},
|
|
3268
|
-
return
|
|
3421
|
+
}, n = t.componentOverrides ?? {}, o = ce(this.toolId, e, t, n);
|
|
3422
|
+
return o.setAttribute("tool-id", r.fullToolId), {
|
|
3269
3423
|
toolId: this.toolId,
|
|
3270
3424
|
button: i,
|
|
3271
3425
|
elements: [{
|
|
3272
|
-
element:
|
|
3426
|
+
element: o,
|
|
3273
3427
|
mount: "after-buttons",
|
|
3274
3428
|
shell: {
|
|
3275
3429
|
title: this.name,
|
|
@@ -3283,63 +3437,63 @@ var co = {
|
|
|
3283
3437
|
}
|
|
3284
3438
|
}],
|
|
3285
3439
|
sync: () => {
|
|
3286
|
-
|
|
3440
|
+
pe({
|
|
3287
3441
|
button: i,
|
|
3288
|
-
overlay:
|
|
3442
|
+
overlay: o,
|
|
3289
3443
|
isActive: r.isActive
|
|
3290
3444
|
});
|
|
3291
3445
|
},
|
|
3292
3446
|
subscribeActive: r.subscribeActive
|
|
3293
3447
|
};
|
|
3294
3448
|
}
|
|
3295
|
-
},
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3449
|
+
}, Ns = [
|
|
3450
|
+
bs,
|
|
3451
|
+
ks,
|
|
3452
|
+
Cs,
|
|
3453
|
+
$s,
|
|
3454
|
+
Ls,
|
|
3455
|
+
Os,
|
|
3456
|
+
Rs,
|
|
3457
|
+
Ms,
|
|
3458
|
+
Ps,
|
|
3459
|
+
xs,
|
|
3460
|
+
Hs
|
|
3307
3461
|
];
|
|
3308
|
-
function
|
|
3309
|
-
const t = new
|
|
3462
|
+
function Ds(e = {}) {
|
|
3463
|
+
const t = new rs(), r = {
|
|
3310
3464
|
toolTagMap: {
|
|
3311
|
-
...
|
|
3465
|
+
...rn,
|
|
3312
3466
|
...e.toolTagMap || {}
|
|
3313
3467
|
},
|
|
3314
3468
|
toolComponentFactory: e.toolComponentFactory,
|
|
3315
3469
|
toolComponentFactories: e.toolComponentFactories
|
|
3316
3470
|
}, i = (n) => e.overrides?.[n.toolId] || n;
|
|
3317
|
-
return e.includePackagedTools &&
|
|
3471
|
+
return e.includePackagedTools && Fs(t, {
|
|
3318
3472
|
toolIds: e.toolIds,
|
|
3319
3473
|
applyOverrides: i
|
|
3320
3474
|
}), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(r), t;
|
|
3321
3475
|
}
|
|
3322
|
-
function
|
|
3476
|
+
function Fs(e, t = {}) {
|
|
3323
3477
|
const r = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, i = t.applyOverrides || ((n) => n);
|
|
3324
|
-
for (const n of
|
|
3478
|
+
for (const n of Ns)
|
|
3325
3479
|
r && !r.has(n.toolId) || e.register(i(n));
|
|
3326
3480
|
}
|
|
3327
|
-
function
|
|
3328
|
-
return
|
|
3481
|
+
function Bs(e = {}) {
|
|
3482
|
+
return Ds({
|
|
3329
3483
|
...e,
|
|
3330
3484
|
includePackagedTools: !0
|
|
3331
3485
|
});
|
|
3332
3486
|
}
|
|
3333
|
-
function
|
|
3334
|
-
const e =
|
|
3487
|
+
function js() {
|
|
3488
|
+
const e = Bs(), t = /* @__PURE__ */ new Set();
|
|
3335
3489
|
for (const r of e.getAllTools()) for (const i of r.pnpSupportIds || []) t.add(i);
|
|
3336
3490
|
return [...t].sort();
|
|
3337
3491
|
}
|
|
3338
|
-
var
|
|
3339
|
-
supports: [...
|
|
3492
|
+
var zs = js(), la = {
|
|
3493
|
+
supports: [...zs],
|
|
3340
3494
|
prohibitedSupports: [],
|
|
3341
3495
|
activateAtInit: []
|
|
3342
|
-
},
|
|
3496
|
+
}, Vs = {
|
|
3343
3497
|
visual: {
|
|
3344
3498
|
magnification: "magnification",
|
|
3345
3499
|
screenMagnifier: "screenMagnifier",
|
|
@@ -3452,15 +3606,26 @@ var So = Ao(), Ko = {
|
|
|
3452
3606
|
itemGlossary: "itemGlossary",
|
|
3453
3607
|
tutorialAvailable: "tutorialAvailable"
|
|
3454
3608
|
}
|
|
3455
|
-
},
|
|
3609
|
+
}, ca = Object.values(Vs).flatMap((e) => Object.values(e)), ua = Ji("ToolCoordinator"), ar;
|
|
3456
3610
|
(function(e) {
|
|
3457
3611
|
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";
|
|
3458
|
-
})(
|
|
3459
|
-
var
|
|
3612
|
+
})(ar || (ar = {}));
|
|
3613
|
+
var Qr;
|
|
3460
3614
|
(function(e) {
|
|
3461
3615
|
e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
|
|
3462
|
-
})(
|
|
3463
|
-
var
|
|
3616
|
+
})(Qr || (Qr = {}));
|
|
3617
|
+
var da = Jo({
|
|
3618
|
+
policy: {
|
|
3619
|
+
allowed: [],
|
|
3620
|
+
blocked: []
|
|
3621
|
+
},
|
|
3622
|
+
placement: {
|
|
3623
|
+
section: [],
|
|
3624
|
+
item: [],
|
|
3625
|
+
passage: []
|
|
3626
|
+
},
|
|
3627
|
+
providers: {}
|
|
3628
|
+
}), an, Ae = class Y {
|
|
3464
3629
|
constructor() {
|
|
3465
3630
|
u(this, "elementType", "multiple-choice"), u(this, "priority", 100);
|
|
3466
3631
|
}
|
|
@@ -3468,8 +3633,8 @@ var Xi, ye = class K {
|
|
|
3468
3633
|
return t.tagName.toLowerCase() === "multiple-choice" || t.classList.contains("multiple-choice");
|
|
3469
3634
|
}
|
|
3470
3635
|
findChoices(t) {
|
|
3471
|
-
t.setAttribute(
|
|
3472
|
-
const r = Array.from(t.querySelectorAll(
|
|
3636
|
+
t.setAttribute(Y.ROOT_HOOK_ATTR, "true");
|
|
3637
|
+
const r = Array.from(t.querySelectorAll(Y.CHOICE_SELECTOR));
|
|
3473
3638
|
for (const i of r) this.annotateChoice(i);
|
|
3474
3639
|
return this.annotateFeedbackTicks(t), r;
|
|
3475
3640
|
}
|
|
@@ -3488,36 +3653,36 @@ var Xi, ye = class K {
|
|
|
3488
3653
|
}
|
|
3489
3654
|
canEliminate(t) {
|
|
3490
3655
|
const r = t.querySelector('input[type="checkbox"], input[type="radio"]');
|
|
3491
|
-
return !(!r || r.getAttribute("aria-checked") === "true" || r.disabled || (t.closest(`[${
|
|
3656
|
+
return !(!r || r.getAttribute("aria-checked") === "true" || r.disabled || (t.closest(`[${Y.ROOT_HOOK_ATTR}="true"]`) || t.closest("multiple-choice"))?.querySelector(`[${Y.FEEDBACK_HOOK_ATTR}="true"]`));
|
|
3492
3657
|
}
|
|
3493
3658
|
getButtonContainer(t) {
|
|
3494
3659
|
return t;
|
|
3495
3660
|
}
|
|
3496
3661
|
generateFallbackId(t) {
|
|
3497
|
-
const r = (t.closest(`[${
|
|
3662
|
+
const r = (t.closest(`[${Y.ROOT_HOOK_ATTR}="true"]`) || t.closest("multiple-choice"))?.querySelectorAll(`[${Y.CHOICE_HOOK_ATTR}="true"]`) || [];
|
|
3498
3663
|
return `choice-${Array.from(r).indexOf(t)}`;
|
|
3499
3664
|
}
|
|
3500
3665
|
annotateChoice(t) {
|
|
3501
|
-
t.setAttribute(
|
|
3666
|
+
t.setAttribute(Y.CHOICE_HOOK_ATTR, "true");
|
|
3502
3667
|
const r = this.resolveLabelElement(t);
|
|
3503
|
-
r && r.setAttribute(
|
|
3668
|
+
r && r.setAttribute(Y.LABEL_HOOK_ATTR, "true");
|
|
3504
3669
|
}
|
|
3505
3670
|
resolveLabelElement(t) {
|
|
3506
|
-
return t.querySelector(`[${
|
|
3671
|
+
return t.querySelector(`[${Y.LABEL_HOOK_ATTR}="true"]`) || t.querySelector("label") || t.querySelector("span");
|
|
3507
3672
|
}
|
|
3508
3673
|
annotateFeedbackTicks(t) {
|
|
3509
|
-
for (const r of t.querySelectorAll(".feedback-tick")) r.setAttribute(
|
|
3674
|
+
for (const r of t.querySelectorAll(".feedback-tick")) r.setAttribute(Y.FEEDBACK_HOOK_ATTR, "true");
|
|
3510
3675
|
}
|
|
3511
3676
|
};
|
|
3512
|
-
|
|
3513
|
-
u(
|
|
3514
|
-
u(
|
|
3515
|
-
u(
|
|
3516
|
-
u(
|
|
3517
|
-
u(
|
|
3518
|
-
var
|
|
3677
|
+
an = Ae;
|
|
3678
|
+
u(Ae, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
3679
|
+
u(Ae, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
|
|
3680
|
+
u(Ae, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
|
|
3681
|
+
u(Ae, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
|
|
3682
|
+
u(Ae, "CHOICE_SELECTOR", `[${an.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
|
|
3683
|
+
var Gs = class {
|
|
3519
3684
|
constructor() {
|
|
3520
|
-
u(this, "elementType", "ebsr"), u(this, "priority", 95), u(this, "mcAdapter", new
|
|
3685
|
+
u(this, "elementType", "ebsr"), u(this, "priority", 95), u(this, "mcAdapter", new Ae());
|
|
3521
3686
|
}
|
|
3522
3687
|
canHandle(e) {
|
|
3523
3688
|
return e.tagName.toLowerCase() === "ebsr" || e.querySelector("ebsr-multiple-choice") !== null;
|
|
@@ -3541,7 +3706,7 @@ var Eo = class {
|
|
|
3541
3706
|
getButtonContainer(e) {
|
|
3542
3707
|
return this.mcAdapter.getButtonContainer(e);
|
|
3543
3708
|
}
|
|
3544
|
-
},
|
|
3709
|
+
}, Ws = class {
|
|
3545
3710
|
constructor() {
|
|
3546
3711
|
u(this, "elementType", "inline-dropdown"), u(this, "priority", 90);
|
|
3547
3712
|
}
|
|
@@ -3567,12 +3732,12 @@ var Eo = class {
|
|
|
3567
3732
|
getButtonContainer(e) {
|
|
3568
3733
|
return e;
|
|
3569
3734
|
}
|
|
3570
|
-
},
|
|
3735
|
+
}, qs = class {
|
|
3571
3736
|
constructor() {
|
|
3572
3737
|
u(this, "adapters", void 0), this.adapters = [
|
|
3573
|
-
new
|
|
3574
|
-
new
|
|
3575
|
-
new
|
|
3738
|
+
new Ae(),
|
|
3739
|
+
new Gs(),
|
|
3740
|
+
new Ws()
|
|
3576
3741
|
].sort((e, t) => t.priority - e.priority);
|
|
3577
3742
|
}
|
|
3578
3743
|
findAdapter(e) {
|
|
@@ -3582,9 +3747,9 @@ var Eo = class {
|
|
|
3582
3747
|
const t = [], r = /* @__PURE__ */ new Set();
|
|
3583
3748
|
for (const i of this.adapters) {
|
|
3584
3749
|
const n = i.findChoices(e);
|
|
3585
|
-
for (const
|
|
3586
|
-
r.has(
|
|
3587
|
-
choice:
|
|
3750
|
+
for (const o of n)
|
|
3751
|
+
r.has(o) || (r.add(o), t.push({
|
|
3752
|
+
choice: o,
|
|
3588
3753
|
adapter: i
|
|
3589
3754
|
}));
|
|
3590
3755
|
}
|
|
@@ -3593,7 +3758,7 @@ var Eo = class {
|
|
|
3593
3758
|
registerAdapter(e) {
|
|
3594
3759
|
this.adapters.push(e), this.adapters.sort((t, r) => r.priority - t.priority);
|
|
3595
3760
|
}
|
|
3596
|
-
},
|
|
3761
|
+
}, je = class D {
|
|
3597
3762
|
constructor() {
|
|
3598
3763
|
u(this, "name", "mask"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map());
|
|
3599
3764
|
}
|
|
@@ -3609,14 +3774,14 @@ var Eo = class {
|
|
|
3609
3774
|
}
|
|
3610
3775
|
this.injectHighlightCSS(t);
|
|
3611
3776
|
const i = new Highlight(r);
|
|
3612
|
-
CSS.highlights.set(`${
|
|
3777
|
+
CSS.highlights.set(`${D.HIGHLIGHT_NAME_PREFIX}${t}`, i), this.highlights.set(t, i), this.ranges.set(t, r), this.addAriaAttributes(r);
|
|
3613
3778
|
}
|
|
3614
3779
|
remove(t) {
|
|
3615
3780
|
if (!this.isSupported()) {
|
|
3616
3781
|
this.removeFallback(t);
|
|
3617
3782
|
return;
|
|
3618
3783
|
}
|
|
3619
|
-
CSS.highlights.delete(`${
|
|
3784
|
+
CSS.highlights.delete(`${D.HIGHLIGHT_NAME_PREFIX}${t}`), this.removeHighlightCSS(t);
|
|
3620
3785
|
const r = this.ranges.get(t);
|
|
3621
3786
|
r && this.removeAriaAttributes(r), this.highlights.delete(t), this.ranges.delete(t), this.fallbackContainers.delete(t);
|
|
3622
3787
|
}
|
|
@@ -3634,7 +3799,7 @@ var Eo = class {
|
|
|
3634
3799
|
return typeof CSS < "u" && "highlights" in CSS;
|
|
3635
3800
|
}
|
|
3636
3801
|
injectHighlightCSS(t) {
|
|
3637
|
-
const r = `${
|
|
3802
|
+
const r = `${D.HIGHLIGHT_STYLE_PREFIX}${t}`;
|
|
3638
3803
|
if (document.getElementById(r)) return;
|
|
3639
3804
|
const i = document.createElement("style");
|
|
3640
3805
|
i.id = r, i.textContent = `
|
|
@@ -3645,43 +3810,43 @@ var Eo = class {
|
|
|
3645
3810
|
`, document.head.appendChild(i);
|
|
3646
3811
|
}
|
|
3647
3812
|
removeHighlightCSS(t) {
|
|
3648
|
-
document.getElementById(`${
|
|
3813
|
+
document.getElementById(`${D.HIGHLIGHT_STYLE_PREFIX}${t}`)?.remove();
|
|
3649
3814
|
}
|
|
3650
3815
|
addAriaAttributes(t) {
|
|
3651
3816
|
const r = this.findChoiceContainer(t);
|
|
3652
|
-
r && (r.setAttribute(
|
|
3817
|
+
r && (r.setAttribute(D.ELIMINATED_ATTR, "true"), r.setAttribute("aria-hidden", "true"));
|
|
3653
3818
|
}
|
|
3654
3819
|
removeAriaAttributes(t) {
|
|
3655
3820
|
const r = this.findChoiceContainer(t);
|
|
3656
|
-
r && (r.removeAttribute(
|
|
3821
|
+
r && (r.removeAttribute(D.ELIMINATED_ATTR), r.removeAttribute("aria-hidden"));
|
|
3657
3822
|
}
|
|
3658
3823
|
findChoiceContainer(t) {
|
|
3659
3824
|
let r = t.startContainer;
|
|
3660
3825
|
for (r.nodeType === Node.TEXT_NODE && (r = r.parentElement); r && r !== document.body; ) {
|
|
3661
|
-
if (r.getAttribute(
|
|
3826
|
+
if (r.getAttribute(D.CHOICE_HOOK_ATTR) === "true") return r;
|
|
3662
3827
|
r = r.parentElement;
|
|
3663
3828
|
}
|
|
3664
3829
|
return null;
|
|
3665
3830
|
}
|
|
3666
3831
|
applyFallback(t, r) {
|
|
3667
3832
|
const i = this.findChoiceContainer(r);
|
|
3668
|
-
i && (i.classList.add(
|
|
3833
|
+
i && (i.classList.add(D.FALLBACK_CLASS), i.setAttribute(D.ELIMINATED_ATTR, "true"), i.setAttribute(D.ELIMINATED_ID_ATTR, t), this.fallbackContainers.set(t, i), this.addAriaAttributes(r));
|
|
3669
3834
|
}
|
|
3670
3835
|
removeFallback(t) {
|
|
3671
3836
|
const r = this.fallbackContainers.get(t);
|
|
3672
3837
|
if (!r) return;
|
|
3673
|
-
r.classList.remove(
|
|
3838
|
+
r.classList.remove(D.FALLBACK_CLASS), r.removeAttribute(D.ELIMINATED_ATTR), r.removeAttribute(D.ELIMINATED_ID_ATTR);
|
|
3674
3839
|
const i = document.createRange();
|
|
3675
3840
|
i.selectNodeContents(r), this.removeAriaAttributes(i), this.fallbackContainers.delete(t);
|
|
3676
3841
|
}
|
|
3677
3842
|
};
|
|
3678
|
-
u(
|
|
3679
|
-
u(
|
|
3680
|
-
u(
|
|
3681
|
-
u(
|
|
3682
|
-
u(
|
|
3683
|
-
u(
|
|
3684
|
-
var
|
|
3843
|
+
u(je, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-");
|
|
3844
|
+
u(je, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-");
|
|
3845
|
+
u(je, "FALLBACK_CLASS", "pie-answer-masked-fallback");
|
|
3846
|
+
u(je, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
3847
|
+
u(je, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
|
|
3848
|
+
u(je, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
3849
|
+
var ve = class R {
|
|
3685
3850
|
constructor() {
|
|
3686
3851
|
u(this, "name", "strikethrough"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map());
|
|
3687
3852
|
}
|
|
@@ -3698,14 +3863,14 @@ var fe = class L {
|
|
|
3698
3863
|
}
|
|
3699
3864
|
this.injectHighlightCSS(t);
|
|
3700
3865
|
const i = new Highlight(r);
|
|
3701
|
-
CSS.highlights.set(`${
|
|
3866
|
+
CSS.highlights.set(`${R.HIGHLIGHT_NAME_PREFIX}${t}`, i), this.highlights.set(t, i), this.ranges.set(t, r), this.addAriaAttributes(r);
|
|
3702
3867
|
}
|
|
3703
3868
|
remove(t) {
|
|
3704
3869
|
if (!this.isSupported()) {
|
|
3705
3870
|
this.removeFallback(t);
|
|
3706
3871
|
return;
|
|
3707
3872
|
}
|
|
3708
|
-
CSS.highlights.delete(`${
|
|
3873
|
+
CSS.highlights.delete(`${R.HIGHLIGHT_NAME_PREFIX}${t}`), this.removeHighlightCSS(t);
|
|
3709
3874
|
const r = this.ranges.get(t);
|
|
3710
3875
|
r && this.removeAriaAttributes(r), this.highlights.delete(t), this.ranges.delete(t), this.fallbackContainers.delete(t);
|
|
3711
3876
|
}
|
|
@@ -3723,7 +3888,7 @@ var fe = class L {
|
|
|
3723
3888
|
return typeof CSS < "u" && "highlights" in CSS;
|
|
3724
3889
|
}
|
|
3725
3890
|
injectHighlightCSS(t) {
|
|
3726
|
-
const r = `${
|
|
3891
|
+
const r = `${R.HIGHLIGHT_STYLE_PREFIX}${t}`;
|
|
3727
3892
|
if (document.getElementById(r)) return;
|
|
3728
3893
|
const i = document.createElement("style");
|
|
3729
3894
|
i.id = r, i.textContent = `
|
|
@@ -3736,63 +3901,63 @@ var fe = class L {
|
|
|
3736
3901
|
`, document.head.appendChild(i);
|
|
3737
3902
|
}
|
|
3738
3903
|
removeHighlightCSS(t) {
|
|
3739
|
-
document.getElementById(`${
|
|
3904
|
+
document.getElementById(`${R.HIGHLIGHT_STYLE_PREFIX}${t}`)?.remove();
|
|
3740
3905
|
}
|
|
3741
3906
|
addAriaAttributes(t) {
|
|
3742
3907
|
const r = this.findChoiceContainer(t);
|
|
3743
3908
|
if (!r) return;
|
|
3744
|
-
r.setAttribute(
|
|
3909
|
+
r.setAttribute(R.ELIMINATED_ATTR, "true"), r.setAttribute("aria-disabled", "true");
|
|
3745
3910
|
const i = this.resolveLabelElement(r);
|
|
3746
|
-
if (i && !i.querySelector(`.${
|
|
3911
|
+
if (i && !i.querySelector(`.${R.SR_CLASS}`)) {
|
|
3747
3912
|
const n = document.createElement("span");
|
|
3748
|
-
n.className =
|
|
3913
|
+
n.className = R.SR_CLASS, n.textContent = " (eliminated)", i.appendChild(n);
|
|
3749
3914
|
}
|
|
3750
3915
|
}
|
|
3751
3916
|
removeAriaAttributes(t) {
|
|
3752
3917
|
const r = this.findChoiceContainer(t);
|
|
3753
|
-
r && (r.removeAttribute(
|
|
3918
|
+
r && (r.removeAttribute(R.ELIMINATED_ATTR), r.removeAttribute("aria-disabled"), r.querySelector(`.${R.SR_CLASS}`)?.remove());
|
|
3754
3919
|
}
|
|
3755
3920
|
findChoiceContainer(t) {
|
|
3756
3921
|
let r = t.startContainer;
|
|
3757
3922
|
for (r.nodeType === Node.TEXT_NODE && (r = r.parentElement); r && r !== document.body; ) {
|
|
3758
|
-
if (r.getAttribute(
|
|
3923
|
+
if (r.getAttribute(R.CHOICE_HOOK_ATTR) === "true") return r;
|
|
3759
3924
|
r = r.parentElement;
|
|
3760
3925
|
}
|
|
3761
3926
|
return null;
|
|
3762
3927
|
}
|
|
3763
3928
|
applyFallback(t, r) {
|
|
3764
3929
|
const i = this.findChoiceContainer(r);
|
|
3765
|
-
i && (i.classList.add(
|
|
3930
|
+
i && (i.classList.add(R.FALLBACK_CLASS), i.setAttribute(R.ELIMINATED_ATTR, "true"), i.setAttribute(R.ELIMINATED_ID_ATTR, t), this.fallbackContainers.set(t, i), this.addAriaAttributes(r));
|
|
3766
3931
|
}
|
|
3767
3932
|
removeFallback(t) {
|
|
3768
3933
|
const r = this.fallbackContainers.get(t);
|
|
3769
3934
|
if (!r) return;
|
|
3770
|
-
r.classList.remove(
|
|
3935
|
+
r.classList.remove(R.FALLBACK_CLASS), r.removeAttribute(R.ELIMINATED_ATTR), r.removeAttribute(R.ELIMINATED_ID_ATTR);
|
|
3771
3936
|
const i = document.createRange();
|
|
3772
3937
|
i.selectNodeContents(r), this.removeAriaAttributes(i), this.fallbackContainers.delete(t);
|
|
3773
3938
|
}
|
|
3774
3939
|
resolveLabelElement(t) {
|
|
3775
|
-
return t.querySelector(`[${
|
|
3940
|
+
return t.querySelector(`[${R.LABEL_HOOK_ATTR}="true"]`) || t.querySelector("label");
|
|
3776
3941
|
}
|
|
3777
3942
|
};
|
|
3778
|
-
u(
|
|
3779
|
-
u(
|
|
3780
|
-
u(
|
|
3781
|
-
u(
|
|
3782
|
-
u(
|
|
3783
|
-
u(
|
|
3784
|
-
u(
|
|
3785
|
-
u(
|
|
3786
|
-
var
|
|
3943
|
+
u(ve, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-highlight-");
|
|
3944
|
+
u(ve, "HIGHLIGHT_NAME_PREFIX", "pie-answer-eliminated-");
|
|
3945
|
+
u(ve, "FALLBACK_CLASS", "pie-answer-eliminator-eliminated-fallback");
|
|
3946
|
+
u(ve, "SR_CLASS", "pie-answer-eliminator-sr-announcement");
|
|
3947
|
+
u(ve, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
3948
|
+
u(ve, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
|
|
3949
|
+
u(ve, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
|
|
3950
|
+
u(ve, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
3951
|
+
var Ar = class it {
|
|
3787
3952
|
constructor(t = "strikethrough", r = "right") {
|
|
3788
|
-
u(this, "registry", void 0), u(this, "strategy", void 0), u(this, "eliminatedChoices", /* @__PURE__ */ new Set()), u(this, "choiceElements", /* @__PURE__ */ new Map()), u(this, "choiceButtons", /* @__PURE__ */ new Map()), u(this, "choiceAdapters", /* @__PURE__ */ new Map()), u(this, "buttonAlignment", "right"), u(this, "shouldRestoreState", !0), u(this, "storeIntegration", null), this.registry = new
|
|
3953
|
+
u(this, "registry", void 0), u(this, "strategy", void 0), u(this, "eliminatedChoices", /* @__PURE__ */ new Set()), u(this, "choiceElements", /* @__PURE__ */ new Map()), u(this, "choiceButtons", /* @__PURE__ */ new Map()), u(this, "choiceAdapters", /* @__PURE__ */ new Map()), u(this, "buttonAlignment", "right"), u(this, "shouldRestoreState", !0), u(this, "storeIntegration", null), this.registry = new qs(), this.strategy = this.createStrategy(t), this.strategy.initialize(), this.buttonAlignment = r;
|
|
3789
3954
|
}
|
|
3790
3955
|
createStrategy(t) {
|
|
3791
3956
|
switch (t) {
|
|
3792
3957
|
case "mask":
|
|
3793
|
-
return new
|
|
3958
|
+
return new je();
|
|
3794
3959
|
default:
|
|
3795
|
-
return new
|
|
3960
|
+
return new ve();
|
|
3796
3961
|
}
|
|
3797
3962
|
}
|
|
3798
3963
|
initializeForQuestion(t) {
|
|
@@ -3807,14 +3972,14 @@ var dr = class Qe {
|
|
|
3807
3972
|
const n = this.createToggleButton(t, r);
|
|
3808
3973
|
if (!n) return;
|
|
3809
3974
|
this.choiceButtons.set(i, n);
|
|
3810
|
-
const
|
|
3811
|
-
|
|
3975
|
+
const o = r.getButtonContainer(t);
|
|
3976
|
+
o && (o.style.position = "relative", o.appendChild(n));
|
|
3812
3977
|
}
|
|
3813
3978
|
createToggleButton(t, r) {
|
|
3814
|
-
const i = r.getChoiceId(t), n = r.getChoiceLabel(t),
|
|
3815
|
-
return
|
|
3816
|
-
|
|
3817
|
-
}),
|
|
3979
|
+
const i = r.getChoiceId(t), n = r.getChoiceLabel(t), o = document.createElement("button");
|
|
3980
|
+
return o.type = "button", o.className = it.TOGGLE_CLASS, o.setAttribute("aria-label", `Toggle elimination for ${n}`), o.setAttribute("data-choice-id", i), o.textContent = "⊗", this.applyButtonAlignment(o), o.addEventListener("click", (s) => {
|
|
3981
|
+
s.preventDefault(), s.stopPropagation(), this.toggleElimination(t, r);
|
|
3982
|
+
}), o;
|
|
3818
3983
|
}
|
|
3819
3984
|
toggleElimination(t, r) {
|
|
3820
3985
|
const i = r.getChoiceId(t);
|
|
@@ -3835,13 +4000,13 @@ var dr = class Qe {
|
|
|
3835
4000
|
return;
|
|
3836
4001
|
}
|
|
3837
4002
|
this.strategy.apply(i, n), this.eliminatedChoices.add(i);
|
|
3838
|
-
const
|
|
3839
|
-
|
|
4003
|
+
const o = this.choiceButtons.get(i);
|
|
4004
|
+
o && (o.classList.add(it.TOGGLE_ACTIVE_CLASS), o.setAttribute("aria-pressed", "true")), this.saveState();
|
|
3840
4005
|
}
|
|
3841
4006
|
restoreChoice(t) {
|
|
3842
4007
|
this.strategy.remove(t), this.eliminatedChoices.delete(t);
|
|
3843
4008
|
const r = this.choiceButtons.get(t);
|
|
3844
|
-
r && (r.classList.remove(
|
|
4009
|
+
r && (r.classList.remove(it.TOGGLE_ACTIVE_CLASS), r.setAttribute("aria-pressed", "false")), this.saveState();
|
|
3845
4010
|
}
|
|
3846
4011
|
resetAll() {
|
|
3847
4012
|
if (this.eliminatedChoices.size !== 0) {
|
|
@@ -3873,13 +4038,13 @@ var dr = class Qe {
|
|
|
3873
4038
|
for (const i of r) {
|
|
3874
4039
|
const n = this.choiceElements.get(i);
|
|
3875
4040
|
if (!n) continue;
|
|
3876
|
-
const
|
|
3877
|
-
if (!
|
|
3878
|
-
const
|
|
3879
|
-
if (
|
|
3880
|
-
this.strategy.apply(i,
|
|
3881
|
-
const
|
|
3882
|
-
|
|
4041
|
+
const o = this.choiceAdapters.get(i);
|
|
4042
|
+
if (!o) continue;
|
|
4043
|
+
const s = o.createChoiceRange(n);
|
|
4044
|
+
if (s) {
|
|
4045
|
+
this.strategy.apply(i, s), this.eliminatedChoices.add(i);
|
|
4046
|
+
const l = this.choiceButtons.get(i);
|
|
4047
|
+
l && (l.classList.add(it.TOGGLE_ACTIVE_CLASS), l.setAttribute("aria-pressed", "true"));
|
|
3883
4048
|
}
|
|
3884
4049
|
}
|
|
3885
4050
|
} catch (r) {
|
|
@@ -3932,115 +4097,115 @@ var dr = class Qe {
|
|
|
3932
4097
|
this.cleanupButtons(), this.strategy.destroy();
|
|
3933
4098
|
}
|
|
3934
4099
|
};
|
|
3935
|
-
u(
|
|
3936
|
-
u(
|
|
3937
|
-
var
|
|
3938
|
-
function
|
|
3939
|
-
|
|
3940
|
-
let r =
|
|
3941
|
-
const
|
|
3942
|
-
let
|
|
3943
|
-
|
|
3944
|
-
if (
|
|
3945
|
-
return
|
|
3946
|
-
$(
|
|
4100
|
+
u(Ar, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
|
|
4101
|
+
u(Ar, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
|
|
4102
|
+
var Ks = /* @__PURE__ */ So('<div style="display: none;" aria-hidden="true"></div>');
|
|
4103
|
+
function Us(e, t) {
|
|
4104
|
+
ai(t, !0);
|
|
4105
|
+
let r = ge(t, "visible", 7, !1), i = ge(t, "toolId", 7, "answerEliminator"), n = ge(t, "strategy", 7, "strikethrough"), o = ge(t, "alwaysOn", 7, !1), s = ge(t, "buttonAlignment", 7, "right"), l = ge(t, "scopeElement", 7, null), c = ge(t, "elementToolStateStore", 7, null), d = ge(t, "globalElementId", 7, ""), f = /* @__PURE__ */ H(null), v = /* @__PURE__ */ H(null), h = /* @__PURE__ */ H(null);
|
|
4106
|
+
const g = /* @__PURE__ */ xr(() => m(v)?.toolCoordinator);
|
|
4107
|
+
let p = /* @__PURE__ */ H(null), y = /* @__PURE__ */ H(null), _ = /* @__PURE__ */ H(null), E = /* @__PURE__ */ H(null), j = /* @__PURE__ */ xr(() => o() || r());
|
|
4108
|
+
Ce(() => {
|
|
4109
|
+
if (m(f))
|
|
4110
|
+
return Wo(m(f), (k) => {
|
|
4111
|
+
$(v, k, !0);
|
|
3947
4112
|
});
|
|
3948
|
-
}),
|
|
3949
|
-
if (
|
|
3950
|
-
return
|
|
3951
|
-
$(h,
|
|
4113
|
+
}), Ce(() => {
|
|
4114
|
+
if (m(f))
|
|
4115
|
+
return qo(m(f), (k) => {
|
|
4116
|
+
$(h, k, !0);
|
|
3952
4117
|
});
|
|
3953
4118
|
});
|
|
3954
|
-
function
|
|
3955
|
-
return
|
|
4119
|
+
function C() {
|
|
4120
|
+
return l() || m(h)?.scopeElement || null;
|
|
3956
4121
|
}
|
|
3957
|
-
function
|
|
3958
|
-
if (!
|
|
3959
|
-
const
|
|
3960
|
-
if (!
|
|
4122
|
+
function U() {
|
|
4123
|
+
if (!m(j) || !m(p)) return;
|
|
4124
|
+
const k = C();
|
|
4125
|
+
if (!k) {
|
|
3961
4126
|
console.warn("[AnswerEliminator] Missing shell scope context for question root");
|
|
3962
4127
|
return;
|
|
3963
4128
|
}
|
|
3964
|
-
|
|
4129
|
+
m(p).initializeForQuestion(k);
|
|
3965
4130
|
}
|
|
3966
|
-
function
|
|
4131
|
+
function Se() {
|
|
3967
4132
|
requestAnimationFrame(() => {
|
|
3968
4133
|
requestAnimationFrame(() => {
|
|
3969
|
-
|
|
4134
|
+
U();
|
|
3970
4135
|
});
|
|
3971
4136
|
});
|
|
3972
4137
|
}
|
|
3973
|
-
|
|
3974
|
-
!g
|
|
3975
|
-
}),
|
|
3976
|
-
|
|
3977
|
-
}),
|
|
3978
|
-
|
|
3979
|
-
})),
|
|
3980
|
-
const
|
|
3981
|
-
if (
|
|
3982
|
-
if (
|
|
3983
|
-
$(y,
|
|
4138
|
+
Ce(() => {
|
|
4139
|
+
!m(g) || !i() || (m(E) && m(_) && (m(E) !== m(g) || m(_) !== i()) && (m(E).unregisterTool(m(_)), $(E, null), $(_, null)), m(_) || (m(g).registerTool(i(), "Answer Eliminator", void 0, ar.MODAL), $(E, m(g), !0), $(_, i())));
|
|
4140
|
+
}), Ce(() => {
|
|
4141
|
+
m(p) && c() && d() && m(p).setStoreIntegration(c(), d());
|
|
4142
|
+
}), Oo(() => ($(p, new Ar(n(), s()), !0), m(p) && c() && d() && m(p).setStoreIntegration(c(), d()), m(j) ? U() : m(p).cleanup(), () => {
|
|
4143
|
+
m(p)?.destroy(), $(p, null), m(E) && m(_) && (m(E).unregisterTool(m(_)), $(E, null), $(_, null));
|
|
4144
|
+
})), Ce(() => {
|
|
4145
|
+
const k = m(h)?.contextVersion ?? null;
|
|
4146
|
+
if (k !== null) {
|
|
4147
|
+
if (m(y) === null) {
|
|
4148
|
+
$(y, k, !0);
|
|
3984
4149
|
return;
|
|
3985
4150
|
}
|
|
3986
|
-
|
|
4151
|
+
k !== m(y) && ($(y, k, !0), Se());
|
|
3987
4152
|
}
|
|
3988
|
-
}),
|
|
3989
|
-
|
|
4153
|
+
}), Ce(() => {
|
|
4154
|
+
m(p) && (m(j) ? (m(p).enableStateRestoration(), U()) : m(p).cleanup());
|
|
3990
4155
|
});
|
|
3991
|
-
var
|
|
4156
|
+
var et = {
|
|
3992
4157
|
get visible() {
|
|
3993
4158
|
return r();
|
|
3994
4159
|
},
|
|
3995
|
-
set visible(
|
|
3996
|
-
r(
|
|
4160
|
+
set visible(k = !1) {
|
|
4161
|
+
r(k), ue();
|
|
3997
4162
|
},
|
|
3998
4163
|
get toolId() {
|
|
3999
4164
|
return i();
|
|
4000
4165
|
},
|
|
4001
|
-
set toolId(
|
|
4002
|
-
i(
|
|
4166
|
+
set toolId(k = "answerEliminator") {
|
|
4167
|
+
i(k), ue();
|
|
4003
4168
|
},
|
|
4004
4169
|
get strategy() {
|
|
4005
4170
|
return n();
|
|
4006
4171
|
},
|
|
4007
|
-
set strategy(
|
|
4008
|
-
n(
|
|
4172
|
+
set strategy(k = "strikethrough") {
|
|
4173
|
+
n(k), ue();
|
|
4009
4174
|
},
|
|
4010
4175
|
get alwaysOn() {
|
|
4011
|
-
return
|
|
4176
|
+
return o();
|
|
4012
4177
|
},
|
|
4013
|
-
set alwaysOn(
|
|
4014
|
-
|
|
4178
|
+
set alwaysOn(k = !1) {
|
|
4179
|
+
o(k), ue();
|
|
4015
4180
|
},
|
|
4016
4181
|
get buttonAlignment() {
|
|
4017
|
-
return
|
|
4182
|
+
return s();
|
|
4018
4183
|
},
|
|
4019
|
-
set buttonAlignment(
|
|
4020
|
-
|
|
4184
|
+
set buttonAlignment(k = "right") {
|
|
4185
|
+
s(k), ue();
|
|
4021
4186
|
},
|
|
4022
4187
|
get scopeElement() {
|
|
4023
|
-
return
|
|
4188
|
+
return l();
|
|
4024
4189
|
},
|
|
4025
|
-
set scopeElement(
|
|
4026
|
-
|
|
4190
|
+
set scopeElement(k = null) {
|
|
4191
|
+
l(k), ue();
|
|
4027
4192
|
},
|
|
4028
4193
|
get elementToolStateStore() {
|
|
4029
4194
|
return c();
|
|
4030
4195
|
},
|
|
4031
|
-
set elementToolStateStore(
|
|
4032
|
-
c(
|
|
4196
|
+
set elementToolStateStore(k = null) {
|
|
4197
|
+
c(k), ue();
|
|
4033
4198
|
},
|
|
4034
4199
|
get globalElementId() {
|
|
4035
|
-
return
|
|
4200
|
+
return d();
|
|
4036
4201
|
},
|
|
4037
|
-
set globalElementId(
|
|
4038
|
-
|
|
4202
|
+
set globalElementId(k = "") {
|
|
4203
|
+
d(k), ue();
|
|
4039
4204
|
}
|
|
4040
|
-
},
|
|
4041
|
-
return
|
|
4205
|
+
}, Sr = Ks();
|
|
4206
|
+
return Po(Sr, (k) => $(f, k), () => m(f)), Wi(e, Sr), li(et);
|
|
4042
4207
|
}
|
|
4043
|
-
customElements.define("pie-tool-answer-eliminator",
|
|
4208
|
+
customElements.define("pie-tool-answer-eliminator", Do(Us, {
|
|
4044
4209
|
visible: {
|
|
4045
4210
|
attribute: "visible",
|
|
4046
4211
|
type: "Boolean"
|
|
@@ -4066,5 +4231,5 @@ customElements.define("pie-tool-answer-eliminator", Es(Oo, {
|
|
|
4066
4231
|
globalElementId: { type: "String" }
|
|
4067
4232
|
}, [], [], { mode: "open" }));
|
|
4068
4233
|
export {
|
|
4069
|
-
|
|
4234
|
+
Us as default
|
|
4070
4235
|
};
|