@pie-players/pie-tool-answer-eliminator 1.0.0-beta.6 → 1.0.0-beta.7
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/README.md +3 -1
- package/custom-elements.json +5 -3
- package/dist/element-props.d.ts +13 -0
- package/dist/index.d.ts +9 -7
- package/dist/tool-answer-eliminator.js +885 -843
- package/package.json +5 -5
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { coerceBooleanAttributes as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { coerceBooleanAttributes as Dn } from "@pie-players/pie-players-shared/ui/attribute-coercion";
|
|
2
|
+
import { resolveInterfaceI18n as zt, stampInterfaceLocale as pr } from "@pie-players/pie-players-shared/i18n/provider";
|
|
3
|
+
import { connectToolRuntimeContext as Wn, connectToolShellContext as jn } from "@pie-players/pie-assessment-toolkit/tools/registration";
|
|
4
|
+
import { parseVersionedTagName as qn } from "@pie-players/pie-players-shared/pie/tag-names";
|
|
4
5
|
if (typeof window < "u") {
|
|
5
|
-
var
|
|
6
|
-
((
|
|
6
|
+
var mr, gr;
|
|
7
|
+
((mr = (gr = window).__svelte ?? (gr.__svelte = {})).v ?? (mr.v = /* @__PURE__ */ new Set())).add("5");
|
|
7
8
|
}
|
|
8
|
-
var
|
|
9
|
-
var
|
|
9
|
+
var Ie = {}, x = /* @__PURE__ */ Symbol("uninitialized");
|
|
10
|
+
var Yn = Array.isArray, zn = Array.prototype.indexOf, rt = Array.prototype.includes, Vn = Array.from, St = Object.keys, nt = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, Xn = Object.prototype, Un = Array.prototype, Qn = Object.getPrototypeOf, yr = Object.isExtensible, Jn = () => {
|
|
10
11
|
};
|
|
11
|
-
function
|
|
12
|
+
function Zn(t) {
|
|
12
13
|
for (var e = 0; e < t.length; e++) t[e]();
|
|
13
14
|
}
|
|
14
|
-
function
|
|
15
|
+
function ei() {
|
|
15
16
|
var t, e;
|
|
16
17
|
return {
|
|
17
18
|
promise: new Promise((r, n) => {
|
|
@@ -29,7 +30,7 @@ function it(t) {
|
|
|
29
30
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
30
31
|
}, it(t);
|
|
31
32
|
}
|
|
32
|
-
function
|
|
33
|
+
function ti(t, e) {
|
|
33
34
|
if (it(t) != "object" || !t) return t;
|
|
34
35
|
var r = t[Symbol.toPrimitive];
|
|
35
36
|
if (r !== void 0) {
|
|
@@ -39,53 +40,53 @@ function Zn(t, e) {
|
|
|
39
40
|
}
|
|
40
41
|
return (e === "string" ? String : Number)(t);
|
|
41
42
|
}
|
|
42
|
-
function
|
|
43
|
-
var e =
|
|
43
|
+
function ri(t) {
|
|
44
|
+
var e = ti(t, "string");
|
|
44
45
|
return it(e) == "symbol" ? e : e + "";
|
|
45
46
|
}
|
|
46
47
|
function u(t, e, r) {
|
|
47
|
-
return (e =
|
|
48
|
+
return (e = ri(e)) in t ? Object.defineProperty(t, e, {
|
|
48
49
|
value: r,
|
|
49
50
|
enumerable: !0,
|
|
50
51
|
configurable: !0,
|
|
51
52
|
writable: !0
|
|
52
53
|
}) : t[e] = r, t;
|
|
53
54
|
}
|
|
54
|
-
var
|
|
55
|
+
var Ys = 1 << 24, re = 1024, z = 2048, He = 4096, Br = 8192, Fr = 16384, Gr = 32768, Vt = 1 << 25, Dr = 65536, zs = 1 << 17, Vs = 1 << 18, ut = 1 << 19, ni = 1 << 20, br = 1 << 21, Xs = 1 << 22, Wr = 1 << 23, Ze = /* @__PURE__ */ Symbol("$state"), jr = /* @__PURE__ */ Symbol("component"), qr = /* @__PURE__ */ Symbol("legacy props"), ii = /* @__PURE__ */ Symbol("proxy path"), si = /* @__PURE__ */ Symbol("attributes"), ai = /* @__PURE__ */ Symbol("class"), li = /* @__PURE__ */ Symbol("style"), oi = /* @__PURE__ */ Symbol("text"), xt = new class extends Error {
|
|
55
56
|
constructor(...e) {
|
|
56
57
|
super(...e), u(this, "name", "StaleReactionError"), u(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
|
|
57
58
|
}
|
|
58
|
-
}(),
|
|
59
|
-
function
|
|
59
|
+
}(), Qs = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
|
|
60
|
+
function ui() {
|
|
60
61
|
console.warn("https://svelte.dev/e/derived_inert");
|
|
61
62
|
}
|
|
62
|
-
function
|
|
63
|
+
function ir(t) {
|
|
63
64
|
console.warn("https://svelte.dev/e/hydration_mismatch");
|
|
64
65
|
}
|
|
65
|
-
function
|
|
66
|
+
function ci() {
|
|
66
67
|
console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
|
|
67
68
|
}
|
|
68
|
-
var
|
|
69
|
+
var Q = !1;
|
|
69
70
|
function ft(t) {
|
|
70
|
-
|
|
71
|
+
Q = t;
|
|
71
72
|
}
|
|
72
|
-
var
|
|
73
|
+
var B;
|
|
73
74
|
function st(t) {
|
|
74
75
|
if (t === null)
|
|
75
|
-
throw
|
|
76
|
-
return
|
|
76
|
+
throw ir(), Ie;
|
|
77
|
+
return B = t;
|
|
77
78
|
}
|
|
78
|
-
function
|
|
79
|
-
return st(/* @__PURE__ */ Ve(
|
|
79
|
+
function Yr() {
|
|
80
|
+
return st(/* @__PURE__ */ Ve(B));
|
|
80
81
|
}
|
|
81
|
-
function
|
|
82
|
-
if (
|
|
83
|
-
for (var e = t, r =
|
|
84
|
-
|
|
82
|
+
function fi(t = 1) {
|
|
83
|
+
if (Q) {
|
|
84
|
+
for (var e = t, r = B; e--; ) r = /* @__PURE__ */ Ve(r);
|
|
85
|
+
B = r;
|
|
85
86
|
}
|
|
86
87
|
}
|
|
87
|
-
function
|
|
88
|
-
for (var e = 0, r =
|
|
88
|
+
function hi(t = !0) {
|
|
89
|
+
for (var e = 0, r = B; ; ) {
|
|
89
90
|
if (r.nodeType === 8) {
|
|
90
91
|
var n = r.data;
|
|
91
92
|
if (n === "]") {
|
|
@@ -97,64 +98,64 @@ function ci(t = !0) {
|
|
|
97
98
|
t && r.remove(), r = i;
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
|
-
function
|
|
101
|
+
function di(t) {
|
|
101
102
|
if (!t || t.nodeType !== 8)
|
|
102
|
-
throw
|
|
103
|
+
throw ir(), Ie;
|
|
103
104
|
return t.data;
|
|
104
105
|
}
|
|
105
|
-
function
|
|
106
|
+
function zr(t) {
|
|
106
107
|
return t === this.v;
|
|
107
108
|
}
|
|
108
|
-
function
|
|
109
|
+
function vi(t, e) {
|
|
109
110
|
return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
|
|
110
111
|
}
|
|
111
|
-
function
|
|
112
|
-
return !
|
|
112
|
+
function Vr(t) {
|
|
113
|
+
return !vi(t, this.v);
|
|
113
114
|
}
|
|
114
|
-
function
|
|
115
|
+
function _i(t) {
|
|
115
116
|
throw new Error("https://svelte.dev/e/effect_in_teardown");
|
|
116
117
|
}
|
|
117
|
-
function
|
|
118
|
+
function pi() {
|
|
118
119
|
throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
|
|
119
120
|
}
|
|
120
|
-
function
|
|
121
|
+
function mi(t) {
|
|
121
122
|
throw new Error("https://svelte.dev/e/effect_orphan");
|
|
122
123
|
}
|
|
123
|
-
function
|
|
124
|
+
function gi() {
|
|
124
125
|
throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
|
|
125
126
|
}
|
|
126
|
-
function
|
|
127
|
+
function yi() {
|
|
127
128
|
throw new Error("https://svelte.dev/e/hydration_failed");
|
|
128
129
|
}
|
|
129
|
-
function
|
|
130
|
+
function bi(t) {
|
|
130
131
|
throw new Error("https://svelte.dev/e/props_invalid_value");
|
|
131
132
|
}
|
|
132
|
-
function
|
|
133
|
+
function wi() {
|
|
133
134
|
throw new Error("https://svelte.dev/e/state_descriptors_fixed");
|
|
134
135
|
}
|
|
135
|
-
function
|
|
136
|
+
function Si() {
|
|
136
137
|
throw new Error("https://svelte.dev/e/state_prototype_fixed");
|
|
137
138
|
}
|
|
138
|
-
function
|
|
139
|
+
function Ai() {
|
|
139
140
|
throw new Error("https://svelte.dev/e/state_unsafe_mutation");
|
|
140
141
|
}
|
|
141
|
-
function
|
|
142
|
+
function Ei() {
|
|
142
143
|
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
|
|
143
144
|
}
|
|
144
|
-
var
|
|
145
|
-
function
|
|
146
|
-
return t.label = e,
|
|
145
|
+
var Ne = !1, Ht = !1;
|
|
146
|
+
function wr(t, e) {
|
|
147
|
+
return t.label = e, Ti(t.v, e), t;
|
|
147
148
|
}
|
|
148
|
-
function
|
|
149
|
-
return t?.[
|
|
149
|
+
function Ti(t, e) {
|
|
150
|
+
return t?.[ii]?.(e), t;
|
|
150
151
|
}
|
|
151
|
-
var
|
|
152
|
+
var M = null;
|
|
152
153
|
function At(t) {
|
|
153
|
-
|
|
154
|
+
M = t;
|
|
154
155
|
}
|
|
155
|
-
function
|
|
156
|
-
|
|
157
|
-
p:
|
|
156
|
+
function Xr(t, e = !1, r) {
|
|
157
|
+
M = {
|
|
158
|
+
p: M,
|
|
158
159
|
i: !1,
|
|
159
160
|
c: null,
|
|
160
161
|
e: null,
|
|
@@ -168,46 +169,46 @@ function zr(t, e = !1, r) {
|
|
|
168
169
|
} : null
|
|
169
170
|
};
|
|
170
171
|
}
|
|
171
|
-
function
|
|
172
|
-
var e =
|
|
172
|
+
function Ur(t) {
|
|
173
|
+
var e = M, r = e.e;
|
|
173
174
|
if (r !== null) {
|
|
174
175
|
e.e = null;
|
|
175
|
-
for (var n of r)
|
|
176
|
+
for (var n of r) yn(n);
|
|
176
177
|
}
|
|
177
|
-
return t !== void 0 && (e.x = t), e.i = !0,
|
|
178
|
+
return t !== void 0 && (e.x = t), e.i = !0, M = e.p, sr(t);
|
|
178
179
|
}
|
|
179
|
-
function
|
|
180
|
-
return nt(t,
|
|
180
|
+
function sr(t = {}) {
|
|
181
|
+
return nt(t, jr, { value: !0 }), t;
|
|
181
182
|
}
|
|
182
183
|
function Nt() {
|
|
183
|
-
return !Ht ||
|
|
184
|
+
return !Ht || M !== null && M.l === null;
|
|
184
185
|
}
|
|
185
|
-
var
|
|
186
|
-
function
|
|
187
|
-
var t =
|
|
188
|
-
|
|
186
|
+
var Ae = [];
|
|
187
|
+
function Qr() {
|
|
188
|
+
var t = Ae;
|
|
189
|
+
Ae = [], Zn(t);
|
|
189
190
|
}
|
|
190
191
|
function Oe(t) {
|
|
191
|
-
if (
|
|
192
|
-
var e =
|
|
192
|
+
if (Ae.length === 0 && !et) {
|
|
193
|
+
var e = Ae;
|
|
193
194
|
queueMicrotask(() => {
|
|
194
|
-
e ===
|
|
195
|
+
e === Ae && Qr();
|
|
195
196
|
});
|
|
196
197
|
}
|
|
197
|
-
|
|
198
|
+
Ae.push(t);
|
|
198
199
|
}
|
|
199
|
-
function
|
|
200
|
-
for (;
|
|
200
|
+
function $i() {
|
|
201
|
+
for (; Ae.length > 0; ) Qr();
|
|
201
202
|
}
|
|
202
|
-
var
|
|
203
|
-
function
|
|
204
|
-
t.f = t.f &
|
|
203
|
+
var Ci = ~(z | He | re);
|
|
204
|
+
function O(t, e) {
|
|
205
|
+
t.f = t.f & Ci | e;
|
|
205
206
|
}
|
|
206
|
-
function
|
|
207
|
-
(t.f & 512) !== 0 || t.deps === null ?
|
|
207
|
+
function ar(t) {
|
|
208
|
+
(t.f & 512) !== 0 || t.deps === null ? O(t, re) : O(t, He);
|
|
208
209
|
}
|
|
209
|
-
function
|
|
210
|
-
(t.f & 2048) !== 0 ? e.add(t) : (t.f & 4096) !== 0 && r.add(t),
|
|
210
|
+
function Jr(t, e, r) {
|
|
211
|
+
(t.f & 2048) !== 0 ? e.add(t) : (t.f & 4096) !== 0 && r.add(t), O(t, re);
|
|
211
212
|
}
|
|
212
213
|
function Pt(t) {
|
|
213
214
|
var e = E, r = T;
|
|
@@ -220,78 +221,78 @@ function Pt(t) {
|
|
|
220
221
|
}
|
|
221
222
|
// @__NO_SIDE_EFFECTS__
|
|
222
223
|
function Et(t) {
|
|
223
|
-
var e = 2 |
|
|
224
|
+
var e = 2 | z;
|
|
224
225
|
return T !== null && (T.f |= ut), {
|
|
225
|
-
ctx:
|
|
226
|
+
ctx: M,
|
|
226
227
|
deps: null,
|
|
227
228
|
effects: null,
|
|
228
|
-
equals:
|
|
229
|
+
equals: zr,
|
|
229
230
|
f: e,
|
|
230
231
|
fn: t,
|
|
231
232
|
reactions: null,
|
|
232
233
|
rv: 0,
|
|
233
|
-
v:
|
|
234
|
+
v: x,
|
|
234
235
|
wv: 0,
|
|
235
236
|
parent: T,
|
|
236
237
|
ac: null
|
|
237
238
|
};
|
|
238
239
|
}
|
|
239
|
-
var
|
|
240
|
+
var ki = /* @__PURE__ */ Symbol("obsolete");
|
|
240
241
|
// @__NO_SIDE_EFFECTS__
|
|
241
|
-
function
|
|
242
|
+
function Gt(t) {
|
|
242
243
|
const e = /* @__PURE__ */ Et(t);
|
|
243
|
-
return
|
|
244
|
+
return Ne || An(e), e;
|
|
244
245
|
}
|
|
245
246
|
// @__NO_SIDE_EFFECTS__
|
|
246
|
-
function
|
|
247
|
+
function Ri(t) {
|
|
247
248
|
const e = /* @__PURE__ */ Et(t);
|
|
248
|
-
return e.equals =
|
|
249
|
+
return e.equals = Vr, e;
|
|
249
250
|
}
|
|
250
|
-
function
|
|
251
|
+
function Li(t) {
|
|
251
252
|
var e = t.effects;
|
|
252
253
|
if (e !== null) {
|
|
253
254
|
t.effects = null;
|
|
254
|
-
for (var r = 0; r < e.length; r += 1)
|
|
255
|
+
for (var r = 0; r < e.length; r += 1) J(e[r]);
|
|
255
256
|
}
|
|
256
257
|
}
|
|
257
|
-
function
|
|
258
|
+
function lr(t) {
|
|
258
259
|
var e, r = T, n = t.parent;
|
|
259
|
-
if (!fe && n !== null && t.v !==
|
|
260
|
-
return
|
|
260
|
+
if (!fe && n !== null && t.v !== x && (n.f & 24576) !== 0)
|
|
261
|
+
return ui(), t.v;
|
|
261
262
|
_e(n);
|
|
262
263
|
try {
|
|
263
|
-
|
|
264
|
+
Li(t), e = Cn(t);
|
|
264
265
|
} finally {
|
|
265
266
|
_e(r);
|
|
266
267
|
}
|
|
267
268
|
return e;
|
|
268
269
|
}
|
|
269
|
-
function
|
|
270
|
-
var e =
|
|
271
|
-
if (!t.equals(e) && (t.wv =
|
|
272
|
-
|
|
270
|
+
function Zr(t) {
|
|
271
|
+
var e = lr(t);
|
|
272
|
+
if (!t.equals(e) && (t.wv = Tn(), (!$?.is_fork || t.deps === null) && ($ !== null ? ($.capture(t, e, !0), qe?.capture(t, e, !0)) : t.v = e, t.deps === null))) {
|
|
273
|
+
O(t, re);
|
|
273
274
|
return;
|
|
274
275
|
}
|
|
275
|
-
fe || (
|
|
276
|
+
fe || (K !== null ? (fr() || $?.is_fork) && K.set(t, e) : ar(t));
|
|
276
277
|
}
|
|
277
|
-
function
|
|
278
|
+
function Ii(t) {
|
|
278
279
|
if (t.effects !== null)
|
|
279
280
|
for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac !== null && Pt(() => {
|
|
280
281
|
e.ac.abort(xt), e.ac = null;
|
|
281
|
-
}), e.fn !== null && (e.teardown =
|
|
282
|
+
}), e.fn !== null && (e.teardown = Jn), lt(e, 0), dr(e));
|
|
282
283
|
}
|
|
283
|
-
function
|
|
284
|
+
function en(t) {
|
|
284
285
|
if (t.effects !== null)
|
|
285
286
|
for (const e of t.effects) e.teardown && e.fn !== null && Ye(e);
|
|
286
287
|
}
|
|
287
|
-
function
|
|
288
|
+
function tn(t, e) {
|
|
288
289
|
if (e.has(t)) throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
289
290
|
}
|
|
290
|
-
function
|
|
291
|
-
|
|
291
|
+
function or(t, e) {
|
|
292
|
+
tn(t, e), e.add(t);
|
|
292
293
|
}
|
|
293
|
-
function
|
|
294
|
-
|
|
294
|
+
function A(t, e, r) {
|
|
295
|
+
tn(t, e), e.set(t, r);
|
|
295
296
|
}
|
|
296
297
|
function p(t, e, r) {
|
|
297
298
|
if (typeof t == "function" ? t === e : t.has(e)) return arguments.length < 3 ? e : r;
|
|
@@ -303,10 +304,10 @@ function g(t, e, r) {
|
|
|
303
304
|
function a(t, e) {
|
|
304
305
|
return t.get(p(t, e));
|
|
305
306
|
}
|
|
306
|
-
var
|
|
307
|
-
var
|
|
307
|
+
var rn, Tt = null, Fe = null, $ = null, qe = null, K = null, Xt = null, et = !1, Dt = !1, at = null, $t = null, nn = 0;
|
|
308
|
+
var Oi = 1, Ct = /* @__PURE__ */ new WeakMap(), Ce = /* @__PURE__ */ new WeakMap(), Ee = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), ht = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), V = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), Me = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), R = /* @__PURE__ */ new WeakSet(), ze = class sn {
|
|
308
309
|
constructor() {
|
|
309
|
-
|
|
310
|
+
or(this, R), u(this, "id", Oi++), A(this, Ct, !1), u(this, "linked", !0), A(this, Ce, null), A(this, Ee, null), u(this, "async_deriveds", /* @__PURE__ */ new Map()), u(this, "current", /* @__PURE__ */ new Map()), u(this, "previous", /* @__PURE__ */ new Map()), A(this, kt, /* @__PURE__ */ new Set()), A(this, ht, /* @__PURE__ */ new Set()), A(this, Ge, 0), A(this, be, /* @__PURE__ */ new Map()), A(this, Ue, null), A(this, V, []), A(this, Ut, []), A(this, Me, /* @__PURE__ */ new Set()), A(this, ce, /* @__PURE__ */ new Set()), A(this, he, /* @__PURE__ */ new Map()), A(this, mt, /* @__PURE__ */ new Set()), u(this, "is_fork", !1), A(this, Qe, !1), Fe === null ? Tt = Fe = this : (g(Ee, Fe, this), g(Ce, this, Fe)), Fe = this;
|
|
310
311
|
}
|
|
311
312
|
skip_effect(e) {
|
|
312
313
|
a(he, this).has(e) || a(he, this).set(e, {
|
|
@@ -319,47 +320,47 @@ var Li = 1, kt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap
|
|
|
319
320
|
if (n) {
|
|
320
321
|
a(he, this).delete(e);
|
|
321
322
|
for (var i of n.d)
|
|
322
|
-
|
|
323
|
+
O(i, z), r(i);
|
|
323
324
|
for (i of n.m)
|
|
324
|
-
|
|
325
|
+
O(i, He), r(i);
|
|
325
326
|
}
|
|
326
327
|
a(mt, this).add(e);
|
|
327
328
|
}
|
|
328
329
|
capture(e, r, n = !1) {
|
|
329
|
-
e.v !==
|
|
330
|
+
e.v !== x && !this.previous.has(e) && this.previous.set(e, e.v), (e.f & 8388608) === 0 && (this.current.set(e, [r, n]), K?.set(e, r)), this.is_fork || (e.v = r);
|
|
330
331
|
}
|
|
331
332
|
activate() {
|
|
332
333
|
$ = this;
|
|
333
334
|
}
|
|
334
335
|
deactivate() {
|
|
335
|
-
$ = null,
|
|
336
|
+
$ = null, K = null;
|
|
336
337
|
}
|
|
337
338
|
flush() {
|
|
338
339
|
try {
|
|
339
|
-
|
|
340
|
+
Dt = !0, $ = this, p(R, this, Rt).call(this);
|
|
340
341
|
} finally {
|
|
341
|
-
|
|
342
|
+
nn = 0, Xt = null, at = null, $t = null, Dt = !1, $ = null, K = null, ae.clear();
|
|
342
343
|
}
|
|
343
344
|
}
|
|
344
345
|
discard() {
|
|
345
346
|
for (const e of a(ht, this)) e(this);
|
|
346
347
|
a(ht, this).clear();
|
|
347
|
-
for (const e of this.async_deriveds.values()) e.reject(
|
|
348
|
-
p(
|
|
348
|
+
for (const e of this.async_deriveds.values()) e.reject(ki);
|
|
349
|
+
p(R, this, Lt).call(this), a(Ue, this)?.resolve();
|
|
349
350
|
}
|
|
350
351
|
register_created_effect(e) {
|
|
351
|
-
a(
|
|
352
|
+
a(Ut, this).push(e);
|
|
352
353
|
}
|
|
353
354
|
increment(e, r) {
|
|
354
355
|
if (g(Ge, this, a(Ge, this) + 1), e) {
|
|
355
|
-
let n = a(
|
|
356
|
-
a(
|
|
356
|
+
let n = a(be, this).get(r) ?? 0;
|
|
357
|
+
a(be, this).set(r, n + 1);
|
|
357
358
|
}
|
|
358
359
|
}
|
|
359
360
|
decrement(e, r) {
|
|
360
361
|
if (g(Ge, this, a(Ge, this) - 1), e) {
|
|
361
|
-
let n = a(
|
|
362
|
-
n === 1 ? a(
|
|
362
|
+
let n = a(be, this).get(r) ?? 0;
|
|
363
|
+
n === 1 ? a(be, this).delete(r) : a(be, this).set(r, n - 1);
|
|
363
364
|
}
|
|
364
365
|
a(Qe, this) || (g(Qe, this, !0), Oe(() => {
|
|
365
366
|
g(Qe, this, !1), this.linked && this.flush();
|
|
@@ -371,31 +372,31 @@ var Li = 1, kt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap
|
|
|
371
372
|
e.clear(), r.clear();
|
|
372
373
|
}
|
|
373
374
|
oncommit(e) {
|
|
374
|
-
a(
|
|
375
|
+
a(kt, this).add(e);
|
|
375
376
|
}
|
|
376
377
|
ondiscard(e) {
|
|
377
378
|
a(ht, this).add(e);
|
|
378
379
|
}
|
|
379
380
|
settled() {
|
|
380
|
-
return (a(Ue, this) ?? g(Ue, this,
|
|
381
|
+
return (a(Ue, this) ?? g(Ue, this, ei())).promise;
|
|
381
382
|
}
|
|
382
383
|
static ensure() {
|
|
383
384
|
if ($ === null) {
|
|
384
|
-
const e = $ = new
|
|
385
|
-
!
|
|
386
|
-
a(
|
|
385
|
+
const e = $ = new sn();
|
|
386
|
+
!Dt && !et && Oe(() => {
|
|
387
|
+
a(Ct, e) || e.flush();
|
|
387
388
|
});
|
|
388
389
|
}
|
|
389
390
|
return $;
|
|
390
391
|
}
|
|
391
392
|
apply() {
|
|
392
|
-
if (!
|
|
393
|
-
|
|
393
|
+
if (!Ne || !this.is_fork && a(Ce, this) === null && a(Ee, this) === null) {
|
|
394
|
+
K = null;
|
|
394
395
|
return;
|
|
395
396
|
}
|
|
396
|
-
|
|
397
|
-
for (const [r, [n]] of this.current)
|
|
398
|
-
for (let r = Tt; r !== null; r = a(
|
|
397
|
+
K = /* @__PURE__ */ new Map();
|
|
398
|
+
for (const [r, [n]] of this.current) K.set(r, n);
|
|
399
|
+
for (let r = Tt; r !== null; r = a(Ee, r))
|
|
399
400
|
if (!(r === this || r.is_fork)) {
|
|
400
401
|
var e = !1;
|
|
401
402
|
if (r.id < this.id) {
|
|
@@ -406,21 +407,21 @@ var Li = 1, kt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap
|
|
|
406
407
|
}
|
|
407
408
|
}
|
|
408
409
|
if (!e)
|
|
409
|
-
for (const [n, i] of r.previous)
|
|
410
|
+
for (const [n, i] of r.previous) K.has(n) || K.set(n, i);
|
|
410
411
|
}
|
|
411
412
|
}
|
|
412
413
|
schedule(e) {
|
|
413
|
-
if (
|
|
414
|
+
if (Xt = e, e.b?.is_pending && (e.f & 16777228) !== 0 && (e.f & 32768) === 0) {
|
|
414
415
|
e.b.defer_effect(e);
|
|
415
416
|
return;
|
|
416
417
|
}
|
|
417
|
-
a(
|
|
418
|
+
a(V, this).push(e);
|
|
418
419
|
}
|
|
419
420
|
};
|
|
420
|
-
|
|
421
|
-
function
|
|
421
|
+
rn = ze;
|
|
422
|
+
function Sr() {
|
|
422
423
|
if (this.is_fork) return !0;
|
|
423
|
-
for (const r of a(
|
|
424
|
+
for (const r of a(be, this).keys()) {
|
|
424
425
|
for (var t = r, e = !1; t.parent !== null; ) {
|
|
425
426
|
if (a(he, this).has(t)) {
|
|
426
427
|
e = !0;
|
|
@@ -432,9 +433,9 @@ function br() {
|
|
|
432
433
|
}
|
|
433
434
|
return !1;
|
|
434
435
|
}
|
|
435
|
-
function
|
|
436
|
+
function an() {
|
|
436
437
|
var t = [];
|
|
437
|
-
for (const i of a(
|
|
438
|
+
for (const i of a(V, this))
|
|
438
439
|
if (!((i.f & 16384) !== 0 || (i.f & 6144) === 0)) {
|
|
439
440
|
for (var e = i, r = !1; e.parent !== null; ) {
|
|
440
441
|
e = e.parent;
|
|
@@ -444,60 +445,60 @@ function nn() {
|
|
|
444
445
|
r = !0;
|
|
445
446
|
break;
|
|
446
447
|
}
|
|
447
|
-
e.f ^=
|
|
448
|
+
e.f ^= re;
|
|
448
449
|
}
|
|
449
450
|
}
|
|
450
451
|
r || t.push(e);
|
|
451
452
|
}
|
|
452
|
-
return g(
|
|
453
|
+
return g(V, this, []), t;
|
|
453
454
|
}
|
|
454
455
|
function Rt() {
|
|
455
|
-
g(
|
|
456
|
+
g(Ct, this, !0);
|
|
456
457
|
for (const l of a(Me, this))
|
|
457
|
-
a(ce, this).delete(l),
|
|
458
|
+
a(ce, this).delete(l), O(l, z), this.schedule(l);
|
|
458
459
|
for (const l of a(ce, this))
|
|
459
|
-
|
|
460
|
+
O(l, He), this.schedule(l);
|
|
460
461
|
this.apply();
|
|
461
|
-
for (var t = at = [], e = [], r = $t = []; a(
|
|
462
|
-
|
|
463
|
-
for (const l of p(
|
|
464
|
-
p(
|
|
462
|
+
for (var t = at = [], e = [], r = $t = []; a(V, this).length > 0; ) {
|
|
463
|
+
nn++ > 1e3 && (p(R, this, Lt).call(this), Ni());
|
|
464
|
+
for (const l of p(R, this, an).call(this)) try {
|
|
465
|
+
p(R, this, ln).call(this, l, t, e);
|
|
465
466
|
} catch (o) {
|
|
466
|
-
throw
|
|
467
|
+
throw cn(l), p(R, this, Sr).call(this) || this.discard(), o;
|
|
467
468
|
}
|
|
468
469
|
}
|
|
469
470
|
if ($ = null, r.length > 0) {
|
|
470
|
-
var n =
|
|
471
|
+
var n = rn.ensure();
|
|
471
472
|
for (const l of r) n.schedule(l);
|
|
472
473
|
}
|
|
473
|
-
if (at = null, $t = null, p(
|
|
474
|
-
p(
|
|
475
|
-
for (const [l, o] of a(he, this))
|
|
476
|
-
r.length > 0 && p(
|
|
474
|
+
if (at = null, $t = null, p(R, this, Sr).call(this)) {
|
|
475
|
+
p(R, this, Je).call(this, e), p(R, this, Je).call(this, t);
|
|
476
|
+
for (const [l, o] of a(he, this)) un(l, o);
|
|
477
|
+
r.length > 0 && p(R, $, Rt).call($);
|
|
477
478
|
return;
|
|
478
479
|
}
|
|
479
|
-
const i = p(
|
|
480
|
+
const i = p(R, this, Mi).call(this);
|
|
480
481
|
if (i) {
|
|
481
|
-
p(
|
|
482
|
+
p(R, this, Je).call(this, e), p(R, this, Je).call(this, t), p(R, i, xi).call(i, this);
|
|
482
483
|
return;
|
|
483
484
|
}
|
|
484
485
|
a(Me, this).clear(), a(ce, this).clear();
|
|
485
|
-
for (const l of a(
|
|
486
|
-
a(
|
|
486
|
+
for (const l of a(kt, this)) l(this);
|
|
487
|
+
a(kt, this).clear(), qe = this, Ar(e), Ar(t), qe = null, a(Ue, this)?.resolve();
|
|
487
488
|
var s = $;
|
|
488
|
-
if (a(Ge, this) === 0 && (a(
|
|
489
|
+
if (a(Ge, this) === 0 && (a(V, this).length === 0 || s !== null) && (p(R, this, Lt).call(this), Ne && (p(R, this, Hi).call(this), $ = s)), a(V, this).length > 0)
|
|
489
490
|
if (s !== null) {
|
|
490
|
-
for (const l of a(
|
|
491
|
-
g(
|
|
491
|
+
for (const l of a(V, this)) a(V, s).push(l);
|
|
492
|
+
g(V, this, []);
|
|
492
493
|
} else s = this;
|
|
493
|
-
s !== null && (ae.clear(), p(
|
|
494
|
+
s !== null && (ae.clear(), p(R, s, Rt).call(s));
|
|
494
495
|
}
|
|
495
|
-
function
|
|
496
|
-
t.f ^=
|
|
496
|
+
function ln(t, e, r) {
|
|
497
|
+
t.f ^= re;
|
|
497
498
|
for (var n = t.first; n !== null; ) {
|
|
498
499
|
var i = n.f, s = (i & 96) !== 0;
|
|
499
500
|
if (!(s && (i & 1024) !== 0 || (i & 8192) !== 0 || a(he, this).has(n)) && n.fn !== null) {
|
|
500
|
-
s ? n.f ^=
|
|
501
|
+
s ? n.f ^= re : (i & 4) !== 0 ? e.push(n) : Ne && (i & 16777224) !== 0 ? r.push(n) : ct(n) && ((i & 16) !== 0 && a(ce, this).add(n), Ye(n));
|
|
501
502
|
var l = n.first;
|
|
502
503
|
if (l !== null) {
|
|
503
504
|
n = l;
|
|
@@ -514,16 +515,16 @@ function sn(t, e, r) {
|
|
|
514
515
|
}
|
|
515
516
|
}
|
|
516
517
|
}
|
|
517
|
-
function
|
|
518
|
-
for (var t = a(
|
|
518
|
+
function Mi() {
|
|
519
|
+
for (var t = a(Ce, this); t !== null; ) {
|
|
519
520
|
if (!t.is_fork) {
|
|
520
521
|
for (const [e, [, r]] of this.current) if (t.current.has(e) && !r) return t;
|
|
521
522
|
}
|
|
522
|
-
t = a(
|
|
523
|
+
t = a(Ce, t);
|
|
523
524
|
}
|
|
524
525
|
return null;
|
|
525
526
|
}
|
|
526
|
-
function
|
|
527
|
+
function xi(t) {
|
|
527
528
|
for (const [r, n] of t.current)
|
|
528
529
|
!this.previous.has(r) && t.previous.has(r) && this.previous.set(r, t.previous.get(r)), this.current.set(r, n);
|
|
529
530
|
for (const [r, n] of t.async_deriveds) {
|
|
@@ -539,18 +540,18 @@ function Mi(t) {
|
|
|
539
540
|
if ((i & 2) !== 0) e(l);
|
|
540
541
|
else {
|
|
541
542
|
var s = l;
|
|
542
|
-
i & 4194320 && !this.async_deriveds.has(s) && (a(ce, this).delete(s),
|
|
543
|
+
i & 4194320 && !this.async_deriveds.has(s) && (a(ce, this).delete(s), O(s, z), this.schedule(s));
|
|
543
544
|
}
|
|
544
545
|
}
|
|
545
546
|
};
|
|
546
547
|
for (const r of this.current.keys()) e(r);
|
|
547
|
-
this.oncommit(() => t.discard()), p(
|
|
548
|
+
this.oncommit(() => t.discard()), p(R, t, Lt).call(t), $ = this, p(R, this, Rt).call(this);
|
|
548
549
|
}
|
|
549
550
|
function Je(t) {
|
|
550
|
-
for (var e = 0; e < t.length; e += 1)
|
|
551
|
+
for (var e = 0; e < t.length; e += 1) Jr(t[e], a(Me, this), a(ce, this));
|
|
551
552
|
}
|
|
552
|
-
function
|
|
553
|
-
for (let v = Tt; v !== null; v = a(
|
|
553
|
+
function Hi() {
|
|
554
|
+
for (let v = Tt; v !== null; v = a(Ee, v)) {
|
|
554
555
|
var t = v.id < this.id, e = [];
|
|
555
556
|
for (const [c, [d, h]] of this.current) {
|
|
556
557
|
if (v.current.has(c)) {
|
|
@@ -565,27 +566,27 @@ function Ii() {
|
|
|
565
566
|
h && d.promise.then(h.resolve).catch(h.reject);
|
|
566
567
|
}
|
|
567
568
|
var n = [...v.current.keys()].filter((c) => !v.current.get(c)[1]);
|
|
568
|
-
if (!(!a(
|
|
569
|
+
if (!(!a(Ct, v) || n.length === 0)) {
|
|
569
570
|
var i = n.filter((c) => !this.current.has(c));
|
|
570
571
|
if (i.length === 0)
|
|
571
572
|
t && v.discard();
|
|
572
573
|
else if (e.length > 0) {
|
|
573
574
|
if (t) for (const c of a(mt, this)) v.unskip_effect(c, (d) => {
|
|
574
|
-
(d.f & 4194320) !== 0 ? v.schedule(d) : p(
|
|
575
|
+
(d.f & 4194320) !== 0 ? v.schedule(d) : p(R, v, Je).call(v, [d]);
|
|
575
576
|
});
|
|
576
577
|
v.activate();
|
|
577
578
|
var s = /* @__PURE__ */ new Set(), l = /* @__PURE__ */ new Map();
|
|
578
|
-
for (var o of e)
|
|
579
|
+
for (var o of e) on(o, i, s, l);
|
|
579
580
|
l = /* @__PURE__ */ new Map();
|
|
580
581
|
var f = [...v.current].filter(([c, d]) => {
|
|
581
582
|
const h = this.current.get(c);
|
|
582
583
|
return h ? h[0] !== d[0] || h[1] !== d[1] : !0;
|
|
583
584
|
}).map(([c]) => c);
|
|
584
585
|
if (f.length > 0)
|
|
585
|
-
for (const c of a(
|
|
586
|
-
if (a(
|
|
586
|
+
for (const c of a(Ut, this)) (c.f & 155648) === 0 && ur(c, f, l) && ((c.f & 4194320) !== 0 ? (O(c, z), v.schedule(c)) : a(Me, v).add(c));
|
|
587
|
+
if (a(V, v).length > 0 && !a(Qe, v)) {
|
|
587
588
|
v.apply();
|
|
588
|
-
for (var
|
|
589
|
+
for (var b of p(R, v, an).call(v)) p(R, v, ln).call(v, b, [], []);
|
|
589
590
|
}
|
|
590
591
|
v.deactivate();
|
|
591
592
|
}
|
|
@@ -594,42 +595,42 @@ function Ii() {
|
|
|
594
595
|
}
|
|
595
596
|
function Lt() {
|
|
596
597
|
if (this.linked) {
|
|
597
|
-
var t = a(
|
|
598
|
-
t === null ? Tt = e : g(
|
|
598
|
+
var t = a(Ce, this), e = a(Ee, this);
|
|
599
|
+
t === null ? Tt = e : g(Ee, t, e), e === null ? Fe = t : g(Ce, e, t), this.linked = !1;
|
|
599
600
|
}
|
|
600
601
|
}
|
|
601
|
-
function
|
|
602
|
+
function we(t) {
|
|
602
603
|
var e = et, r = qe;
|
|
603
604
|
qe = null, et = !0;
|
|
604
605
|
try {
|
|
605
606
|
var n;
|
|
606
|
-
for (t && (
|
|
607
|
-
if (
|
|
607
|
+
for (t && (we(), n = t()); ; ) {
|
|
608
|
+
if ($i(), $ === null) return n;
|
|
608
609
|
$.flush();
|
|
609
610
|
}
|
|
610
611
|
} finally {
|
|
611
612
|
et = e, qe = r;
|
|
612
613
|
}
|
|
613
614
|
}
|
|
614
|
-
function
|
|
615
|
+
function Ni() {
|
|
615
616
|
if (0) {
|
|
616
617
|
var t;
|
|
617
618
|
for (const r of $.current.keys()) for (const [n, i] of r.updated ?? [])
|
|
618
619
|
var e;
|
|
619
620
|
}
|
|
620
621
|
try {
|
|
621
|
-
|
|
622
|
+
gi();
|
|
622
623
|
} catch (r) {
|
|
623
|
-
de(r,
|
|
624
|
+
de(r, Xt);
|
|
624
625
|
}
|
|
625
626
|
}
|
|
626
627
|
var ue = null;
|
|
627
|
-
function
|
|
628
|
+
function Ar(t) {
|
|
628
629
|
var e = t.length;
|
|
629
630
|
if (e !== 0) {
|
|
630
631
|
for (var r = 0; r < e; ) {
|
|
631
632
|
var n = t[r++];
|
|
632
|
-
if ((n.f & 24576) === 0 && ct(n) && (ue = /* @__PURE__ */ new Set(), Ye(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null &&
|
|
633
|
+
if ((n.f & 24576) === 0 && ct(n) && (ue = /* @__PURE__ */ new Set(), Ye(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && wn(n), ue?.size > 0)) {
|
|
633
634
|
ae.clear();
|
|
634
635
|
for (const i of ue) {
|
|
635
636
|
if ((i.f & 24576) !== 0) continue;
|
|
@@ -648,87 +649,87 @@ function wr(t) {
|
|
|
648
649
|
ue = null;
|
|
649
650
|
}
|
|
650
651
|
}
|
|
651
|
-
function
|
|
652
|
+
function on(t, e, r, n) {
|
|
652
653
|
if (!r.has(t) && (r.add(t), t.reactions !== null))
|
|
653
654
|
for (const i of t.reactions) {
|
|
654
655
|
const s = i.f;
|
|
655
|
-
(s & 2) !== 0 ?
|
|
656
|
+
(s & 2) !== 0 ? on(i, e, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && ur(i, e, n) && (O(i, z), cr(i));
|
|
656
657
|
}
|
|
657
658
|
}
|
|
658
|
-
function
|
|
659
|
+
function ur(t, e, r) {
|
|
659
660
|
const n = r.get(t);
|
|
660
661
|
if (n !== void 0) return n;
|
|
661
662
|
if (t.deps !== null) for (const i of t.deps) {
|
|
662
663
|
if (rt.call(e, i)) return !0;
|
|
663
|
-
if ((i.f & 2) !== 0 &&
|
|
664
|
+
if ((i.f & 2) !== 0 && ur(i, e, r))
|
|
664
665
|
return r.set(i, !0), !0;
|
|
665
666
|
}
|
|
666
667
|
return r.set(t, !1), !1;
|
|
667
668
|
}
|
|
668
|
-
function
|
|
669
|
+
function cr(t) {
|
|
669
670
|
$.schedule(t);
|
|
670
671
|
}
|
|
671
|
-
function
|
|
672
|
+
function un(t, e) {
|
|
672
673
|
if (!((t.f & 32) !== 0 && (t.f & 1024) !== 0)) {
|
|
673
|
-
(t.f & 2048) !== 0 ? e.d.push(t) : (t.f & 4096) !== 0 && e.m.push(t),
|
|
674
|
+
(t.f & 2048) !== 0 ? e.d.push(t) : (t.f & 4096) !== 0 && e.m.push(t), O(t, re);
|
|
674
675
|
for (var r = t.first; r !== null; )
|
|
675
|
-
|
|
676
|
+
un(r, e), r = r.next;
|
|
676
677
|
}
|
|
677
678
|
}
|
|
678
|
-
function
|
|
679
|
-
|
|
679
|
+
function cn(t) {
|
|
680
|
+
O(t, re);
|
|
680
681
|
for (var e = t.first; e !== null; )
|
|
681
|
-
|
|
682
|
+
cn(e), e = e.next;
|
|
682
683
|
}
|
|
683
|
-
var
|
|
684
|
-
var
|
|
684
|
+
var It = /* @__PURE__ */ new Set(), ae = /* @__PURE__ */ new Map();
|
|
685
|
+
var fn = !1;
|
|
685
686
|
function Kt(t, e) {
|
|
686
687
|
var r = {
|
|
687
688
|
f: 0,
|
|
688
689
|
v: t,
|
|
689
690
|
reactions: null,
|
|
690
|
-
equals:
|
|
691
|
+
equals: zr,
|
|
691
692
|
rv: 0,
|
|
692
693
|
wv: 0
|
|
693
694
|
};
|
|
694
695
|
return r;
|
|
695
696
|
}
|
|
696
697
|
// @__NO_SIDE_EFFECTS__
|
|
697
|
-
function
|
|
698
|
+
function W(t, e) {
|
|
698
699
|
const r = Kt(t, e);
|
|
699
|
-
return
|
|
700
|
+
return An(r), r;
|
|
700
701
|
}
|
|
701
702
|
// @__NO_SIDE_EFFECTS__
|
|
702
|
-
function
|
|
703
|
+
function Pi(t, e = !1, r = !0) {
|
|
703
704
|
const n = Kt(t);
|
|
704
|
-
if (e || (n.equals =
|
|
705
|
+
if (e || (n.equals = Vr), Ht && r && M !== null && M.l !== null) {
|
|
705
706
|
var i;
|
|
706
|
-
((i =
|
|
707
|
+
((i = M.l).s ?? (i.s = [])).push(n);
|
|
707
708
|
}
|
|
708
709
|
return n;
|
|
709
710
|
}
|
|
710
|
-
function
|
|
711
|
-
E !== null && (!
|
|
711
|
+
function N(t, e, r = !1) {
|
|
712
|
+
E !== null && (!X || (E.f & 131072) !== 0) && Nt() && (E.f & 4325394) !== 0 && (Z === null || !Z.has(t)) && Ai();
|
|
712
713
|
let n = r ? je(e) : e;
|
|
713
|
-
return
|
|
714
|
+
return hn(t, n, $t);
|
|
714
715
|
}
|
|
715
|
-
var
|
|
716
|
-
function
|
|
716
|
+
var Se = null, Qt = 0;
|
|
717
|
+
function hn(t, e, r = null) {
|
|
717
718
|
if (!t.equals(e)) {
|
|
718
719
|
fe ? ae.set(t, e) : ae.has(t) || ae.set(t, t.v);
|
|
719
720
|
var n = ze.ensure();
|
|
720
721
|
if (n.capture(t, e), (t.f & 2) !== 0) {
|
|
721
722
|
const i = t;
|
|
722
|
-
(t.f & 2048) !== 0 &&
|
|
723
|
+
(t.f & 2048) !== 0 && lr(i), K === null && ar(i);
|
|
723
724
|
}
|
|
724
|
-
t.wv =
|
|
725
|
+
t.wv = Tn(), Se = null, Qt = 0, dn(t, z, r), Se = null, Nt() && T !== null && (T.f & 1024) !== 0 && (T.f & 96) === 0 && (Y === null ? es([t]) : Y.push(t)), !n.is_fork && It.size > 0 && !fn && Ki();
|
|
725
726
|
}
|
|
726
727
|
return e;
|
|
727
728
|
}
|
|
728
|
-
function
|
|
729
|
-
|
|
730
|
-
for (const t of
|
|
731
|
-
(t.f & 1024) !== 0 &&
|
|
729
|
+
function Ki() {
|
|
730
|
+
fn = !1;
|
|
731
|
+
for (const t of It) {
|
|
732
|
+
(t.f & 1024) !== 0 && O(t, He);
|
|
732
733
|
let e;
|
|
733
734
|
try {
|
|
734
735
|
e = ct(t);
|
|
@@ -737,86 +738,86 @@ function Ni() {
|
|
|
737
738
|
}
|
|
738
739
|
e && Ye(t);
|
|
739
740
|
}
|
|
740
|
-
|
|
741
|
+
It.clear();
|
|
741
742
|
}
|
|
742
743
|
function tt(t) {
|
|
743
|
-
|
|
744
|
+
N(t, t.v + 1);
|
|
744
745
|
}
|
|
745
|
-
function
|
|
746
|
+
function dn(t, e, r) {
|
|
746
747
|
var n = t.reactions;
|
|
747
748
|
if (n !== null) {
|
|
748
749
|
var i = Nt(), s = n.length;
|
|
749
|
-
if (
|
|
750
|
-
if (
|
|
751
|
-
|
|
750
|
+
if (Qt += s, Qt > 1e5 && Se === null && (Se = /* @__PURE__ */ new Set()), Se !== null) {
|
|
751
|
+
if (Se.has(t)) return;
|
|
752
|
+
Se.add(t);
|
|
752
753
|
}
|
|
753
754
|
for (var l = 0; l < s; l++) {
|
|
754
755
|
var o = n[l], f = o.f;
|
|
755
756
|
if (!(!i && o === T)) {
|
|
756
|
-
var
|
|
757
|
-
if (
|
|
757
|
+
var b = (f & z) === 0;
|
|
758
|
+
if (b && O(o, e), (f & 131072) !== 0) It.add(o);
|
|
758
759
|
else if ((f & 2) !== 0) {
|
|
759
760
|
var v = o;
|
|
760
|
-
|
|
761
|
-
} else if (
|
|
761
|
+
K?.delete(v), dn(v, He, r);
|
|
762
|
+
} else if (b) {
|
|
762
763
|
var c = o;
|
|
763
|
-
(f & 16) !== 0 && ue !== null && ue.add(c), r !== null ? r.push(c) :
|
|
764
|
+
(f & 16) !== 0 && ue !== null && ue.add(c), r !== null ? r.push(c) : cr(c);
|
|
764
765
|
}
|
|
765
766
|
}
|
|
766
767
|
}
|
|
767
768
|
}
|
|
768
769
|
}
|
|
769
|
-
var
|
|
770
|
+
var Bi = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
|
|
770
771
|
function je(t) {
|
|
771
|
-
if (typeof t != "object" || t === null || Ze in t ||
|
|
772
|
-
const e =
|
|
773
|
-
if (e !==
|
|
774
|
-
var r = /* @__PURE__ */ new Map(), n =
|
|
772
|
+
if (typeof t != "object" || t === null || Ze in t || jr in t) return t;
|
|
773
|
+
const e = Qn(t);
|
|
774
|
+
if (e !== Xn && e !== Un) return t;
|
|
775
|
+
var r = /* @__PURE__ */ new Map(), n = Yn(t), i = /* @__PURE__ */ W(0), s = null, l = ke, o = (c) => {
|
|
775
776
|
if (ke === l) return c();
|
|
776
777
|
var d = E, h = ke;
|
|
777
|
-
le(null),
|
|
778
|
+
le(null), $r(l);
|
|
778
779
|
var _ = c();
|
|
779
|
-
return le(d),
|
|
780
|
+
return le(d), $r(h), _;
|
|
780
781
|
};
|
|
781
|
-
n && r.set("length", /* @__PURE__ */
|
|
782
|
+
n && r.set("length", /* @__PURE__ */ W(t.length, s));
|
|
782
783
|
var f = "";
|
|
783
|
-
let
|
|
784
|
+
let b = !1;
|
|
784
785
|
function v(c) {
|
|
785
|
-
if (!
|
|
786
|
-
|
|
787
|
-
for (const [d, h] of r)
|
|
788
|
-
|
|
786
|
+
if (!b) {
|
|
787
|
+
b = !0, f = c, wr(i, `${f} version`);
|
|
788
|
+
for (const [d, h] of r) wr(h, Fi(f, d));
|
|
789
|
+
b = !1;
|
|
789
790
|
}
|
|
790
791
|
}
|
|
791
792
|
return new Proxy(t, {
|
|
792
793
|
defineProperty(c, d, h) {
|
|
793
|
-
(!("value" in h) || h.configurable === !1 || h.enumerable === !1 || h.writable === !1) &&
|
|
794
|
+
(!("value" in h) || h.configurable === !1 || h.enumerable === !1 || h.writable === !1) && wi();
|
|
794
795
|
var _ = r.get(d);
|
|
795
796
|
return _ === void 0 ? o(() => {
|
|
796
|
-
var
|
|
797
|
-
return r.set(d,
|
|
798
|
-
}) :
|
|
797
|
+
var y = /* @__PURE__ */ W(h.value, s);
|
|
798
|
+
return r.set(d, y), y;
|
|
799
|
+
}) : N(_, h.value, !0), !0;
|
|
799
800
|
},
|
|
800
801
|
deleteProperty(c, d) {
|
|
801
802
|
var h = r.get(d);
|
|
802
803
|
if (h === void 0) {
|
|
803
804
|
if (d in c) {
|
|
804
|
-
const _ = o(() => /* @__PURE__ */
|
|
805
|
+
const _ = o(() => /* @__PURE__ */ W(x, s));
|
|
805
806
|
r.set(d, _), tt(i);
|
|
806
807
|
}
|
|
807
808
|
} else
|
|
808
|
-
|
|
809
|
+
N(h, x), tt(i);
|
|
809
810
|
return !0;
|
|
810
811
|
},
|
|
811
812
|
get(c, d, h) {
|
|
812
813
|
if (d === Ze) return t;
|
|
813
|
-
var _ = r.get(d),
|
|
814
|
-
if (_ === void 0 && (!
|
|
815
|
-
var
|
|
816
|
-
return
|
|
814
|
+
var _ = r.get(d), y = d in c;
|
|
815
|
+
if (_ === void 0 && (!y || $e(c, d)?.writable) && (_ = o(() => {
|
|
816
|
+
var I = je(y ? c[d] : x), H = /* @__PURE__ */ W(I, s);
|
|
817
|
+
return H;
|
|
817
818
|
}), r.set(d, _)), _ !== void 0) {
|
|
818
|
-
var
|
|
819
|
-
return
|
|
819
|
+
var k = S(_);
|
|
820
|
+
return k === x ? void 0 : k;
|
|
820
821
|
}
|
|
821
822
|
return Reflect.get(c, d, h);
|
|
822
823
|
},
|
|
@@ -824,13 +825,13 @@ function je(t) {
|
|
|
824
825
|
this.has?.(c, d);
|
|
825
826
|
var h = Reflect.getOwnPropertyDescriptor(c, d), _ = r.get(d);
|
|
826
827
|
if (_ !== void 0) {
|
|
827
|
-
var
|
|
828
|
-
if (
|
|
829
|
-
if (h && "value" in h) h.value =
|
|
828
|
+
var y = S(_);
|
|
829
|
+
if (y === x) return;
|
|
830
|
+
if (h && "value" in h) h.value = y;
|
|
830
831
|
else return {
|
|
831
832
|
enumerable: !0,
|
|
832
833
|
configurable: !0,
|
|
833
|
-
value:
|
|
834
|
+
value: y,
|
|
834
835
|
writable: !0
|
|
835
836
|
};
|
|
836
837
|
}
|
|
@@ -838,87 +839,87 @@ function je(t) {
|
|
|
838
839
|
},
|
|
839
840
|
has(c, d) {
|
|
840
841
|
if (d === Ze) return !0;
|
|
841
|
-
var h = r.get(d), _ = h !== void 0 && h.v !==
|
|
842
|
-
return (h !== void 0 || T !== null && (!_ ||
|
|
843
|
-
var
|
|
844
|
-
return
|
|
845
|
-
}), r.set(d, h)),
|
|
842
|
+
var h = r.get(d), _ = h !== void 0 && h.v !== x || Reflect.has(c, d);
|
|
843
|
+
return (h !== void 0 || T !== null && (!_ || $e(c, d)?.writable)) && (h === void 0 && (h = o(() => {
|
|
844
|
+
var y = _ ? je(c[d]) : x, k = /* @__PURE__ */ W(y, s);
|
|
845
|
+
return k;
|
|
846
|
+
}), r.set(d, h)), S(h) === x) ? !1 : _;
|
|
846
847
|
},
|
|
847
848
|
set(c, d, h, _) {
|
|
848
|
-
var
|
|
849
|
-
if (n && d === "length") for (var
|
|
850
|
-
var
|
|
851
|
-
|
|
849
|
+
var y = r.get(d), k = d in c;
|
|
850
|
+
if (n && d === "length") for (var I = h; I < y.v; I += 1) {
|
|
851
|
+
var H = r.get(I + "");
|
|
852
|
+
H !== void 0 ? N(H, x) : I in c && (H = o(() => /* @__PURE__ */ W(x, s)), r.set(I + "", H));
|
|
852
853
|
}
|
|
853
|
-
if (
|
|
854
|
-
(!
|
|
854
|
+
if (y === void 0)
|
|
855
|
+
(!k || $e(c, d)?.writable) && (y = o(() => /* @__PURE__ */ W(void 0, s)), N(y, je(h)), r.set(d, y));
|
|
855
856
|
else {
|
|
856
|
-
|
|
857
|
-
var
|
|
858
|
-
|
|
857
|
+
k = y.v !== x;
|
|
858
|
+
var ne = o(() => je(h));
|
|
859
|
+
N(y, ne);
|
|
859
860
|
}
|
|
860
|
-
var
|
|
861
|
-
if (
|
|
861
|
+
var m = Reflect.getOwnPropertyDescriptor(c, d);
|
|
862
|
+
if (m?.set && m.set.call(_, h), !k) {
|
|
862
863
|
if (n && typeof d == "string") {
|
|
863
|
-
var pe = r.get("length"),
|
|
864
|
-
Number.isInteger(
|
|
864
|
+
var pe = r.get("length"), Be = Number(d);
|
|
865
|
+
Number.isInteger(Be) && Be >= pe.v && N(pe, Be + 1);
|
|
865
866
|
}
|
|
866
867
|
tt(i);
|
|
867
868
|
}
|
|
868
869
|
return !0;
|
|
869
870
|
},
|
|
870
871
|
ownKeys(c) {
|
|
871
|
-
|
|
872
|
-
var d = Reflect.ownKeys(c).filter((
|
|
873
|
-
var
|
|
874
|
-
return
|
|
872
|
+
S(i);
|
|
873
|
+
var d = Reflect.ownKeys(c).filter((y) => {
|
|
874
|
+
var k = r.get(y);
|
|
875
|
+
return k === void 0 || k.v !== x;
|
|
875
876
|
});
|
|
876
|
-
for (var [h, _] of r) _.v !==
|
|
877
|
+
for (var [h, _] of r) _.v !== x && !(h in c) && d.push(h);
|
|
877
878
|
return d;
|
|
878
879
|
},
|
|
879
880
|
setPrototypeOf() {
|
|
880
|
-
|
|
881
|
+
Si();
|
|
881
882
|
}
|
|
882
883
|
});
|
|
883
884
|
}
|
|
884
|
-
function
|
|
885
|
-
return typeof e == "symbol" ? `${t}[Symbol(${e.description ?? ""})]` :
|
|
885
|
+
function Fi(t, e) {
|
|
886
|
+
return typeof e == "symbol" ? `${t}[Symbol(${e.description ?? ""})]` : Bi.test(e) ? `${t}.${e}` : /^\d+$/.test(e) ? `${t}[${e}]` : `${t}['${e}']`;
|
|
886
887
|
}
|
|
887
|
-
var
|
|
888
|
-
function
|
|
889
|
-
if (
|
|
890
|
-
|
|
888
|
+
var Er, Gi, vn, _n, pn;
|
|
889
|
+
function Jt() {
|
|
890
|
+
if (Er === void 0) {
|
|
891
|
+
Er = window, Gi = document, vn = /Firefox/.test(navigator.userAgent);
|
|
891
892
|
var t = Element.prototype, e = Node.prototype, r = Text.prototype;
|
|
892
|
-
|
|
893
|
+
_n = $e(e, "firstChild").get, pn = $e(e, "nextSibling").get, yr(t) && (t[ai] = void 0, t[si] = null, t[li] = void 0, t.__e = void 0), yr(r) && (r[oi] = void 0);
|
|
893
894
|
}
|
|
894
895
|
}
|
|
895
|
-
function
|
|
896
|
+
function mn(t = "") {
|
|
896
897
|
return document.createTextNode(t);
|
|
897
898
|
}
|
|
898
899
|
// @__NO_SIDE_EFFECTS__
|
|
899
|
-
function
|
|
900
|
-
return
|
|
900
|
+
function Zt(t) {
|
|
901
|
+
return _n.call(t);
|
|
901
902
|
}
|
|
902
903
|
// @__NO_SIDE_EFFECTS__
|
|
903
904
|
function Ve(t) {
|
|
904
|
-
return
|
|
905
|
+
return pn.call(t);
|
|
905
906
|
}
|
|
906
|
-
function
|
|
907
|
+
function Di(t) {
|
|
907
908
|
t.textContent = "";
|
|
908
909
|
}
|
|
909
|
-
function
|
|
910
|
+
function gn(t, e, r) {
|
|
910
911
|
return e == null || e === "http://www.w3.org/1999/xhtml" ? r ? document.createElement(t, { is: r }) : document.createElement(t) : r ? document.createElementNS(e, t, { is: r }) : document.createElementNS(e, t);
|
|
911
912
|
}
|
|
912
|
-
function
|
|
913
|
+
function Wi(t) {
|
|
913
914
|
var e = T;
|
|
914
915
|
if (e === null)
|
|
915
|
-
return E.f |=
|
|
916
|
+
return E.f |= Wr, t;
|
|
916
917
|
if ((e.f & 32768) === 0 && (e.f & 4) === 0)
|
|
917
918
|
throw t;
|
|
918
919
|
de(t, e);
|
|
919
920
|
}
|
|
920
921
|
function de(t, e) {
|
|
921
|
-
if (t ===
|
|
922
|
+
if (t === Ie) throw t;
|
|
922
923
|
if (!(e !== null && (e.f & 16384) !== 0)) {
|
|
923
924
|
for (; e !== null; ) {
|
|
924
925
|
if ((e.f & 128) !== 0 && (e.f & 33570816) === 0) {
|
|
@@ -935,21 +936,21 @@ function de(t, e) {
|
|
|
935
936
|
throw t;
|
|
936
937
|
}
|
|
937
938
|
}
|
|
938
|
-
function
|
|
939
|
-
T === null && (E === null &&
|
|
939
|
+
function ji(t) {
|
|
940
|
+
T === null && (E === null && mi(t), pi()), fe && _i(t);
|
|
940
941
|
}
|
|
941
|
-
function
|
|
942
|
+
function qi(t, e) {
|
|
942
943
|
var r = e.last;
|
|
943
944
|
r === null ? e.last = e.first = t : (r.next = t, t.prev = r, e.last = t);
|
|
944
945
|
}
|
|
945
|
-
function
|
|
946
|
+
function Pe(t, e) {
|
|
946
947
|
var r = T;
|
|
947
|
-
r !== null && (r.f & 8192) !== 0 && (t |=
|
|
948
|
+
r !== null && (r.f & 8192) !== 0 && (t |= Br);
|
|
948
949
|
var n = {
|
|
949
|
-
ctx:
|
|
950
|
+
ctx: M,
|
|
950
951
|
deps: null,
|
|
951
952
|
nodes: null,
|
|
952
|
-
f: t |
|
|
953
|
+
f: t | z | 512,
|
|
953
954
|
first: null,
|
|
954
955
|
fn: e,
|
|
955
956
|
last: null,
|
|
@@ -969,74 +970,74 @@ function Ne(t, e) {
|
|
|
969
970
|
try {
|
|
970
971
|
Ye(n);
|
|
971
972
|
} catch (l) {
|
|
972
|
-
throw
|
|
973
|
+
throw J(n), l;
|
|
973
974
|
}
|
|
974
|
-
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (t & 16) !== 0 && (t & 65536) !== 0 && i !== null && (i.f |=
|
|
975
|
+
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && (i.f & 524288) === 0 && (i = i.first, (t & 16) !== 0 && (t & 65536) !== 0 && i !== null && (i.f |= Dr));
|
|
975
976
|
}
|
|
976
|
-
if (i !== null && (i.parent = r, r !== null &&
|
|
977
|
+
if (i !== null && (i.parent = r, r !== null && qi(i, r), E !== null && (E.f & 2) !== 0 && (t & 64) === 0)) {
|
|
977
978
|
var s = E;
|
|
978
979
|
(s.effects ?? (s.effects = [])).push(i);
|
|
979
980
|
}
|
|
980
981
|
return n;
|
|
981
982
|
}
|
|
982
|
-
function
|
|
983
|
-
return E !== null && !
|
|
983
|
+
function fr() {
|
|
984
|
+
return E !== null && !X;
|
|
984
985
|
}
|
|
985
|
-
function
|
|
986
|
-
|
|
986
|
+
function me(t) {
|
|
987
|
+
ji("$effect");
|
|
987
988
|
var e = T.f;
|
|
988
|
-
if (!E && (e & 32) !== 0 &&
|
|
989
|
-
var r =
|
|
989
|
+
if (!E && (e & 32) !== 0 && M !== null && !M.i) {
|
|
990
|
+
var r = M;
|
|
990
991
|
(r.e ?? (r.e = [])).push(t);
|
|
991
|
-
} else return
|
|
992
|
+
} else return yn(t);
|
|
992
993
|
}
|
|
993
|
-
function
|
|
994
|
-
return
|
|
994
|
+
function yn(t) {
|
|
995
|
+
return Pe(4 | ni, t);
|
|
995
996
|
}
|
|
996
|
-
function
|
|
997
|
+
function Yi(t) {
|
|
997
998
|
ze.ensure();
|
|
998
|
-
const e =
|
|
999
|
+
const e = Pe(64 | ut, t);
|
|
999
1000
|
return () => {
|
|
1000
|
-
|
|
1001
|
+
J(e);
|
|
1001
1002
|
};
|
|
1002
1003
|
}
|
|
1003
|
-
function
|
|
1004
|
+
function zi(t) {
|
|
1004
1005
|
ze.ensure();
|
|
1005
|
-
const e =
|
|
1006
|
+
const e = Pe(64 | ut, t);
|
|
1006
1007
|
return (r = {}) => new Promise((n) => {
|
|
1007
1008
|
r.outro ? Bt(e, () => {
|
|
1008
|
-
|
|
1009
|
-
}) : (
|
|
1009
|
+
J(e), n(void 0);
|
|
1010
|
+
}) : (J(e), n(void 0));
|
|
1010
1011
|
});
|
|
1011
1012
|
}
|
|
1012
|
-
function
|
|
1013
|
-
return
|
|
1013
|
+
function Vi(t) {
|
|
1014
|
+
return Pe(4, t);
|
|
1014
1015
|
}
|
|
1015
|
-
function
|
|
1016
|
-
return
|
|
1016
|
+
function hr(t, e = 0) {
|
|
1017
|
+
return Pe(8 | e, t);
|
|
1017
1018
|
}
|
|
1018
|
-
function
|
|
1019
|
-
var r =
|
|
1019
|
+
function Xi(t, e = 0) {
|
|
1020
|
+
var r = Pe(16 | e, t);
|
|
1020
1021
|
return r;
|
|
1021
1022
|
}
|
|
1022
|
-
function
|
|
1023
|
-
return
|
|
1023
|
+
function xe(t) {
|
|
1024
|
+
return Pe(32 | ut, t);
|
|
1024
1025
|
}
|
|
1025
|
-
function
|
|
1026
|
+
function bn(t) {
|
|
1026
1027
|
var e = t.teardown;
|
|
1027
1028
|
if (e !== null) {
|
|
1028
1029
|
const r = fe, n = E;
|
|
1029
|
-
|
|
1030
|
+
Tr(!0), le(null);
|
|
1030
1031
|
try {
|
|
1031
1032
|
e.call(null);
|
|
1032
1033
|
} catch (i) {
|
|
1033
1034
|
de(i, t.parent);
|
|
1034
1035
|
} finally {
|
|
1035
|
-
|
|
1036
|
+
Tr(r), le(n);
|
|
1036
1037
|
}
|
|
1037
1038
|
}
|
|
1038
1039
|
}
|
|
1039
|
-
function
|
|
1040
|
+
function dr(t, e = !1) {
|
|
1040
1041
|
var r = t.first;
|
|
1041
1042
|
for (t.first = t.last = null; r !== null; ) {
|
|
1042
1043
|
const i = r.ac;
|
|
@@ -1044,48 +1045,48 @@ function fr(t, e = !1) {
|
|
|
1044
1045
|
i.abort(xt);
|
|
1045
1046
|
});
|
|
1046
1047
|
var n = r.next;
|
|
1047
|
-
(r.f & 64) !== 0 ? r.parent = null :
|
|
1048
|
+
(r.f & 64) !== 0 ? r.parent = null : J(r, e), r = n;
|
|
1048
1049
|
}
|
|
1049
1050
|
}
|
|
1050
|
-
function
|
|
1051
|
+
function Ui(t) {
|
|
1051
1052
|
for (var e = t.first; e !== null; ) {
|
|
1052
1053
|
var r = e.next;
|
|
1053
|
-
(e.f & 32) === 0 &&
|
|
1054
|
+
(e.f & 32) === 0 && J(e), e = r;
|
|
1054
1055
|
}
|
|
1055
1056
|
}
|
|
1056
|
-
function
|
|
1057
|
+
function J(t, e = !0) {
|
|
1057
1058
|
var r = !1;
|
|
1058
|
-
(e || (t.f & 262144) !== 0) && t.nodes !== null && t.nodes.end !== null && (
|
|
1059
|
+
(e || (t.f & 262144) !== 0) && t.nodes !== null && t.nodes.end !== null && (Qi(t.nodes.start, t.nodes.end), r = !0), t.f |= Vt, dr(t, e && !r), lt(t, 0);
|
|
1059
1060
|
var n = t.nodes && t.nodes.t;
|
|
1060
1061
|
if (n !== null) for (const s of n) s.stop();
|
|
1061
|
-
|
|
1062
|
+
bn(t), t.f ^= Vt, t.f |= Fr;
|
|
1062
1063
|
var i = t.parent;
|
|
1063
|
-
i !== null && i.first !== null &&
|
|
1064
|
+
i !== null && i.first !== null && wn(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = t.b = null;
|
|
1064
1065
|
}
|
|
1065
|
-
function
|
|
1066
|
+
function Qi(t, e) {
|
|
1066
1067
|
for (; t !== null; ) {
|
|
1067
1068
|
var r = t === e ? null : /* @__PURE__ */ Ve(t);
|
|
1068
1069
|
t.remove(), t = r;
|
|
1069
1070
|
}
|
|
1070
1071
|
}
|
|
1071
|
-
function
|
|
1072
|
+
function wn(t) {
|
|
1072
1073
|
var e = t.parent, r = t.prev, n = t.next;
|
|
1073
1074
|
r !== null && (r.next = n), n !== null && (n.prev = r), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = r));
|
|
1074
1075
|
}
|
|
1075
1076
|
function Bt(t, e, r = !0) {
|
|
1076
1077
|
var n = [];
|
|
1077
|
-
t.f |= 256,
|
|
1078
|
+
t.f |= 256, Sn(t, n, !0);
|
|
1078
1079
|
var i = () => {
|
|
1079
|
-
r &&
|
|
1080
|
+
r && J(t), e && e();
|
|
1080
1081
|
}, s = n.length;
|
|
1081
1082
|
if (s > 0) {
|
|
1082
1083
|
var l = () => --s || i();
|
|
1083
1084
|
for (var o of n) o.out(l);
|
|
1084
1085
|
} else i();
|
|
1085
1086
|
}
|
|
1086
|
-
function
|
|
1087
|
+
function Sn(t, e, r) {
|
|
1087
1088
|
if ((t.f & 8192) === 0) {
|
|
1088
|
-
t.f ^=
|
|
1089
|
+
t.f ^= Br;
|
|
1089
1090
|
var n = t.nodes && t.nodes.t;
|
|
1090
1091
|
if (n !== null)
|
|
1091
1092
|
for (const o of n) (o.is_global || r) && e.push(o);
|
|
@@ -1093,24 +1094,24 @@ function bn(t, e, r) {
|
|
|
1093
1094
|
var s = i.next;
|
|
1094
1095
|
if ((i.f & 64) === 0) {
|
|
1095
1096
|
var l = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (t.f & 16) !== 0;
|
|
1096
|
-
|
|
1097
|
+
Sn(i, e, l ? r : !1);
|
|
1097
1098
|
}
|
|
1098
1099
|
i = s;
|
|
1099
1100
|
}
|
|
1100
1101
|
}
|
|
1101
1102
|
}
|
|
1102
|
-
function
|
|
1103
|
+
function Ji(t, e) {
|
|
1103
1104
|
if (t.nodes)
|
|
1104
1105
|
for (var r = t.nodes.start, n = t.nodes.end; r !== null; ) {
|
|
1105
1106
|
var i = r === n ? null : /* @__PURE__ */ Ve(r);
|
|
1106
1107
|
e.append(r), r = i;
|
|
1107
1108
|
}
|
|
1108
1109
|
}
|
|
1109
|
-
var
|
|
1110
|
-
function
|
|
1110
|
+
var Zi = null, fe = !1;
|
|
1111
|
+
function Tr(t) {
|
|
1111
1112
|
fe = t;
|
|
1112
1113
|
}
|
|
1113
|
-
var E = null,
|
|
1114
|
+
var E = null, X = !1;
|
|
1114
1115
|
function le(t) {
|
|
1115
1116
|
E = t;
|
|
1116
1117
|
}
|
|
@@ -1118,20 +1119,20 @@ var T = null;
|
|
|
1118
1119
|
function _e(t) {
|
|
1119
1120
|
T = t;
|
|
1120
1121
|
}
|
|
1121
|
-
var
|
|
1122
|
-
function
|
|
1123
|
-
E !== null && (!
|
|
1122
|
+
var Z = null;
|
|
1123
|
+
function An(t) {
|
|
1124
|
+
E !== null && (!Ne && (E.f & 2097152) !== 0 || (E.f & 2) !== 0) && (Z ?? (Z = /* @__PURE__ */ new Set())).add(t);
|
|
1124
1125
|
}
|
|
1125
|
-
var
|
|
1126
|
-
function
|
|
1127
|
-
|
|
1126
|
+
var F = null, j = 0, Y = null;
|
|
1127
|
+
function es(t) {
|
|
1128
|
+
Y = t;
|
|
1128
1129
|
}
|
|
1129
|
-
var
|
|
1130
|
-
function
|
|
1130
|
+
var En = 1, Te = 0, ke = Te;
|
|
1131
|
+
function $r(t) {
|
|
1131
1132
|
ke = t;
|
|
1132
1133
|
}
|
|
1133
|
-
function
|
|
1134
|
-
return ++
|
|
1134
|
+
function Tn() {
|
|
1135
|
+
return ++En;
|
|
1135
1136
|
}
|
|
1136
1137
|
function ct(t) {
|
|
1137
1138
|
var e = t.f;
|
|
@@ -1139,101 +1140,101 @@ function ct(t) {
|
|
|
1139
1140
|
if ((e & 4096) !== 0) {
|
|
1140
1141
|
for (var r = t.deps, n = r.length, i = 0; i < n; i++) {
|
|
1141
1142
|
var s = r[i];
|
|
1142
|
-
if (ct(s) &&
|
|
1143
|
+
if (ct(s) && Zr(s), s.wv > t.wv) return !0;
|
|
1143
1144
|
}
|
|
1144
|
-
(e & 512) !== 0 &&
|
|
1145
|
+
(e & 512) !== 0 && K === null && O(t, re);
|
|
1145
1146
|
}
|
|
1146
1147
|
return !1;
|
|
1147
1148
|
}
|
|
1148
|
-
function
|
|
1149
|
+
function $n(t, e, r = !0) {
|
|
1149
1150
|
var n = t.reactions;
|
|
1150
|
-
if (n !== null && !(!
|
|
1151
|
+
if (n !== null && !(!Ne && Z !== null && Z.has(t)))
|
|
1151
1152
|
for (var i = 0; i < n.length; i++) {
|
|
1152
1153
|
var s = n[i];
|
|
1153
|
-
(s.f & 2) !== 0 ?
|
|
1154
|
+
(s.f & 2) !== 0 ? $n(s, e, !1) : e === s && (r ? O(s, z) : (s.f & 1024) !== 0 && O(s, He), cr(s));
|
|
1154
1155
|
}
|
|
1155
1156
|
}
|
|
1156
|
-
function
|
|
1157
|
-
var e =
|
|
1158
|
-
|
|
1157
|
+
function Cn(t) {
|
|
1158
|
+
var e = F, r = j, n = Y, i = E, s = Z, l = M, o = X, f = ke, b = t.f;
|
|
1159
|
+
F = null, j = 0, Y = null, E = (b & 96) === 0 ? t : null, Z = null, At(t.ctx), X = !1, ke = ++Te, t.ac !== null && (Pt(() => {
|
|
1159
1160
|
t.ac.abort(xt);
|
|
1160
1161
|
}), t.ac = null);
|
|
1161
1162
|
try {
|
|
1162
|
-
t.f |=
|
|
1163
|
+
t.f |= br;
|
|
1163
1164
|
var v = t.fn, c = v();
|
|
1164
|
-
t.f |=
|
|
1165
|
-
var d =
|
|
1166
|
-
if (Nt() &&
|
|
1165
|
+
t.f |= Gr;
|
|
1166
|
+
var d = Cr(t);
|
|
1167
|
+
if (Nt() && Y !== null && !X && d !== null && (t.f & 6146) === 0) for (var h = 0; h < Y.length; h++) $n(Y[h], t);
|
|
1167
1168
|
if (i !== null && i !== t) {
|
|
1168
|
-
if (
|
|
1169
|
-
if (e !== null) for (const _ of e) _.rv =
|
|
1170
|
-
|
|
1169
|
+
if (Te++, i.deps !== null) for (let _ = 0; _ < r; _ += 1) i.deps[_].rv = Te;
|
|
1170
|
+
if (e !== null) for (const _ of e) _.rv = Te;
|
|
1171
|
+
Y !== null && (n === null ? n = Y : n.push(...Y));
|
|
1171
1172
|
}
|
|
1172
|
-
return (t.f & 8388608) !== 0 && (t.f ^=
|
|
1173
|
+
return (t.f & 8388608) !== 0 && (t.f ^= Wr), c;
|
|
1173
1174
|
} catch (_) {
|
|
1174
|
-
return
|
|
1175
|
+
return Cr(t), Wi(_);
|
|
1175
1176
|
} finally {
|
|
1176
|
-
t.f ^=
|
|
1177
|
+
t.f ^= br, F = e, j = r, Y = n, E = i, Z = s, At(l), X = o, ke = f;
|
|
1177
1178
|
}
|
|
1178
1179
|
}
|
|
1179
|
-
function
|
|
1180
|
+
function Cr(t) {
|
|
1180
1181
|
var e = t.deps, r = $?.is_fork;
|
|
1181
|
-
if (
|
|
1182
|
+
if (F !== null) {
|
|
1182
1183
|
var n;
|
|
1183
|
-
if (r || lt(t,
|
|
1184
|
-
for (e.length =
|
|
1185
|
-
else t.deps = e =
|
|
1186
|
-
if (
|
|
1184
|
+
if (r || lt(t, j), e !== null && j > 0)
|
|
1185
|
+
for (e.length = j + F.length, n = 0; n < F.length; n++) e[j + n] = F[n];
|
|
1186
|
+
else t.deps = e = F;
|
|
1187
|
+
if (fr() && (t.f & 512) !== 0) for (n = j; n < e.length; n++) {
|
|
1187
1188
|
var i;
|
|
1188
1189
|
((i = e[n]).reactions ?? (i.reactions = [])).push(t);
|
|
1189
1190
|
}
|
|
1190
|
-
} else !r && e !== null &&
|
|
1191
|
+
} else !r && e !== null && j < e.length && (lt(t, j), e.length = j);
|
|
1191
1192
|
return e;
|
|
1192
1193
|
}
|
|
1193
|
-
function
|
|
1194
|
+
function ts(t, e) {
|
|
1194
1195
|
let r = e.reactions;
|
|
1195
1196
|
if (r !== null) {
|
|
1196
|
-
var n =
|
|
1197
|
+
var n = zn.call(r, t);
|
|
1197
1198
|
if (n !== -1) {
|
|
1198
1199
|
var i = r.length - 1;
|
|
1199
1200
|
i === 0 ? r = e.reactions = null : (r[n] = r[i], r.pop());
|
|
1200
1201
|
}
|
|
1201
1202
|
}
|
|
1202
|
-
if (r === null && (e.f & 2) !== 0 && (
|
|
1203
|
+
if (r === null && (e.f & 2) !== 0 && (F === null || !rt.call(F, e))) {
|
|
1203
1204
|
var s = e;
|
|
1204
|
-
(s.f & 512) !== 0 && (s.f ^= 512), s.v !==
|
|
1205
|
-
s.ac.abort(xt), s.ac = null,
|
|
1206
|
-
}),
|
|
1205
|
+
(s.f & 512) !== 0 && (s.f ^= 512), s.v !== x && ar(s), s.ac !== null && Pt(() => {
|
|
1206
|
+
s.ac.abort(xt), s.ac = null, O(s, z);
|
|
1207
|
+
}), Ii(s), lt(s, 0);
|
|
1207
1208
|
}
|
|
1208
1209
|
}
|
|
1209
1210
|
function lt(t, e) {
|
|
1210
1211
|
var r = t.deps;
|
|
1211
1212
|
if (r !== null)
|
|
1212
|
-
for (var n = e; n < r.length; n++)
|
|
1213
|
+
for (var n = e; n < r.length; n++) ts(t, r[n]);
|
|
1213
1214
|
}
|
|
1214
1215
|
function Ye(t) {
|
|
1215
1216
|
var e = t.f;
|
|
1216
1217
|
if ((e & 16384) === 0) {
|
|
1217
|
-
|
|
1218
|
+
O(t, re);
|
|
1218
1219
|
var r = T;
|
|
1219
1220
|
if (T = t, 0)
|
|
1220
1221
|
var n, i;
|
|
1221
1222
|
try {
|
|
1222
|
-
(e & 16777232) !== 0 ?
|
|
1223
|
-
var s =
|
|
1224
|
-
if (t.teardown = typeof s == "function" ? s : null, t.wv =
|
|
1223
|
+
(e & 16777232) !== 0 ? Ui(t) : dr(t), bn(t);
|
|
1224
|
+
var s = Cn(t);
|
|
1225
|
+
if (t.teardown = typeof s == "function" ? s : null, t.wv = En, 0)
|
|
1225
1226
|
for (var l of t.deps) ;
|
|
1226
1227
|
} finally {
|
|
1227
1228
|
T = r;
|
|
1228
1229
|
}
|
|
1229
1230
|
}
|
|
1230
1231
|
}
|
|
1231
|
-
function
|
|
1232
|
+
function S(t) {
|
|
1232
1233
|
var e = (t.f & 2) !== 0;
|
|
1233
|
-
if (
|
|
1234
|
+
if (Zi?.add(t), E !== null && !X && !(T !== null && (T.f & 16384) !== 0) && (Z === null || !Z.has(t))) {
|
|
1234
1235
|
var r = E.deps;
|
|
1235
1236
|
if ((E.f & 2097152) !== 0)
|
|
1236
|
-
t.rv <
|
|
1237
|
+
t.rv < Te && (t.rv = Te, F === null && r !== null && r[j] === t ? j++ : F === null ? F = [t] : F.push(t));
|
|
1237
1238
|
else {
|
|
1238
1239
|
var n;
|
|
1239
1240
|
(n = E).deps ?? (n.deps = []), rt.call(E.deps, t) || E.deps.push(t);
|
|
@@ -1242,9 +1243,9 @@ function A(t) {
|
|
|
1242
1243
|
}
|
|
1243
1244
|
}
|
|
1244
1245
|
if (0) {
|
|
1245
|
-
if (!
|
|
1246
|
+
if (!X && reactivity_loss_tracker && $ === null && qe === null && !reactivity_loss_tracker.warned && (reactivity_loss_tracker.effect.f & 2097152) === 0 && !reactivity_loss_tracker.effect_deps.has(t))
|
|
1246
1247
|
var s;
|
|
1247
|
-
if (tracing_mode_flag && !
|
|
1248
|
+
if (tracing_mode_flag && !X && tracing_expressions !== null && E !== null && tracing_expressions.reaction === E && !t.trace) {
|
|
1248
1249
|
if (s)
|
|
1249
1250
|
var l, o;
|
|
1250
1251
|
}
|
|
@@ -1253,54 +1254,54 @@ function A(t) {
|
|
|
1253
1254
|
if (e) {
|
|
1254
1255
|
var f = t;
|
|
1255
1256
|
if (fe) {
|
|
1256
|
-
var
|
|
1257
|
-
return ((f.f & 1024) === 0 && f.reactions !== null ||
|
|
1257
|
+
var b = f.v;
|
|
1258
|
+
return ((f.f & 1024) === 0 && f.reactions !== null || Rn(f)) && (b = lr(f)), ae.set(f, b), b;
|
|
1258
1259
|
}
|
|
1259
|
-
var v = (f.f & 512) === 0 && !
|
|
1260
|
-
ct(f) && (v && (f.f |= 512),
|
|
1260
|
+
var v = (f.f & 512) === 0 && !X && E !== null && (E.f & 512) !== 0, c = (f.f & Gr) === 0;
|
|
1261
|
+
ct(f) && (v && (f.f |= 512), Zr(f)), v && !c && (en(f), kn(f));
|
|
1261
1262
|
}
|
|
1262
|
-
if (
|
|
1263
|
+
if (K?.has(t)) return K.get(t);
|
|
1263
1264
|
if ((t.f & 8388608) !== 0) throw t.v;
|
|
1264
1265
|
return t.v;
|
|
1265
1266
|
}
|
|
1266
|
-
function
|
|
1267
|
+
function kn(t) {
|
|
1267
1268
|
if (t.f |= 512, t.deps !== null)
|
|
1268
1269
|
for (const r of t.deps) {
|
|
1269
1270
|
var e = r.reactions;
|
|
1270
|
-
e === null ? r.reactions = [t] : rt.call(e, t) || e.push(t), (r.f & 2) !== 0 && (r.f & 512) === 0 && (
|
|
1271
|
+
e === null ? r.reactions = [t] : rt.call(e, t) || e.push(t), (r.f & 2) !== 0 && (r.f & 512) === 0 && (en(r), kn(r));
|
|
1271
1272
|
}
|
|
1272
1273
|
}
|
|
1273
|
-
function
|
|
1274
|
-
if (t.v ===
|
|
1274
|
+
function Rn(t) {
|
|
1275
|
+
if (t.v === x) return !0;
|
|
1275
1276
|
if (t.deps === null) return !1;
|
|
1276
1277
|
for (const e of t.deps)
|
|
1277
|
-
if (ae.has(e) || (e.f & 2) !== 0 &&
|
|
1278
|
+
if (ae.has(e) || (e.f & 2) !== 0 && Rn(e)) return !0;
|
|
1278
1279
|
return !1;
|
|
1279
1280
|
}
|
|
1280
1281
|
function Ft(t) {
|
|
1281
|
-
var e =
|
|
1282
|
+
var e = X;
|
|
1282
1283
|
try {
|
|
1283
|
-
return
|
|
1284
|
+
return X = !0, t();
|
|
1284
1285
|
} finally {
|
|
1285
|
-
|
|
1286
|
+
X = e;
|
|
1286
1287
|
}
|
|
1287
1288
|
}
|
|
1288
|
-
var dt = /* @__PURE__ */ Symbol("events"),
|
|
1289
|
-
function
|
|
1289
|
+
var dt = /* @__PURE__ */ Symbol("events"), rs = /* @__PURE__ */ new Set(), kr = /* @__PURE__ */ new Set(), Wt = null, jt = !1;
|
|
1290
|
+
function Rr(t) {
|
|
1290
1291
|
var e = this, r = e.ownerDocument, n = t.type, i = t.composedPath?.() || [], s = i[0] || t.target;
|
|
1291
|
-
|
|
1292
|
-
|
|
1292
|
+
Wt = t, jt || (jt = !0, setTimeout(() => {
|
|
1293
|
+
jt = !1, Wt = null;
|
|
1293
1294
|
}));
|
|
1294
|
-
var l = 0, o =
|
|
1295
|
+
var l = 0, o = Wt === t && t[dt];
|
|
1295
1296
|
if (o) {
|
|
1296
1297
|
var f = i.indexOf(o);
|
|
1297
1298
|
if (f !== -1 && (e === document || e === window)) {
|
|
1298
1299
|
t[dt] = e;
|
|
1299
1300
|
return;
|
|
1300
1301
|
}
|
|
1301
|
-
var
|
|
1302
|
-
if (
|
|
1303
|
-
f <=
|
|
1302
|
+
var b = i.indexOf(e);
|
|
1303
|
+
if (b === -1) return;
|
|
1304
|
+
f <= b && (l = f);
|
|
1304
1305
|
}
|
|
1305
1306
|
if (s = i[l] || t.target, s !== e) {
|
|
1306
1307
|
nt(t, "currentTarget", {
|
|
@@ -1316,15 +1317,15 @@ function kr(t) {
|
|
|
1316
1317
|
try {
|
|
1317
1318
|
var _ = s[dt]?.[n];
|
|
1318
1319
|
_ != null && (!s.disabled || t.target === s) && _.call(s, t);
|
|
1319
|
-
} catch (
|
|
1320
|
-
d ? h.push(
|
|
1320
|
+
} catch (y) {
|
|
1321
|
+
d ? h.push(y) : d = y;
|
|
1321
1322
|
}
|
|
1322
1323
|
if (t.cancelBubble) break;
|
|
1323
1324
|
l++, s = l < i.length ? i[l] : null;
|
|
1324
1325
|
}
|
|
1325
1326
|
if (d) {
|
|
1326
|
-
for (let
|
|
1327
|
-
throw
|
|
1327
|
+
for (let y of h) queueMicrotask(() => {
|
|
1328
|
+
throw y;
|
|
1328
1329
|
});
|
|
1329
1330
|
throw d;
|
|
1330
1331
|
}
|
|
@@ -1333,13 +1334,13 @@ function kr(t) {
|
|
|
1333
1334
|
}
|
|
1334
1335
|
}
|
|
1335
1336
|
}
|
|
1336
|
-
var
|
|
1337
|
-
function
|
|
1338
|
-
return
|
|
1337
|
+
var ns = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
|
|
1338
|
+
function is(t) {
|
|
1339
|
+
return ns?.createHTML(t) ?? t;
|
|
1339
1340
|
}
|
|
1340
|
-
function
|
|
1341
|
-
var e =
|
|
1342
|
-
return e.innerHTML =
|
|
1341
|
+
function ss(t) {
|
|
1342
|
+
var e = gn("template");
|
|
1343
|
+
return e.innerHTML = is(t.replaceAll("<!>", "<!---->")), e.content;
|
|
1343
1344
|
}
|
|
1344
1345
|
function gt(t, e) {
|
|
1345
1346
|
var r = T;
|
|
@@ -1351,29 +1352,29 @@ function gt(t, e) {
|
|
|
1351
1352
|
});
|
|
1352
1353
|
}
|
|
1353
1354
|
// @__NO_SIDE_EFFECTS__
|
|
1354
|
-
function
|
|
1355
|
+
function as(t, e) {
|
|
1355
1356
|
var r = (e & 1) !== 0, n = (e & 2) !== 0, i, s = !t.startsWith("<!>");
|
|
1356
1357
|
return () => {
|
|
1357
|
-
if (
|
|
1358
|
-
return gt(
|
|
1359
|
-
i === void 0 && (i =
|
|
1360
|
-
var l = n ||
|
|
1358
|
+
if (Q)
|
|
1359
|
+
return gt(B, null), B;
|
|
1360
|
+
i === void 0 && (i = ss(s ? t : "<!>" + t), r || (i = /* @__PURE__ */ Zt(i)));
|
|
1361
|
+
var l = n || vn ? document.importNode(i, !0) : i.cloneNode(!0);
|
|
1361
1362
|
if (r) {
|
|
1362
|
-
var o = /* @__PURE__ */
|
|
1363
|
+
var o = /* @__PURE__ */ Zt(l), f = l.lastChild;
|
|
1363
1364
|
gt(o, f);
|
|
1364
1365
|
} else gt(l, l);
|
|
1365
1366
|
return l;
|
|
1366
1367
|
};
|
|
1367
1368
|
}
|
|
1368
|
-
function
|
|
1369
|
-
if (
|
|
1369
|
+
function Ln(t, e) {
|
|
1370
|
+
if (Q) {
|
|
1370
1371
|
var r = T;
|
|
1371
|
-
((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end =
|
|
1372
|
+
((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = B), Yr();
|
|
1372
1373
|
return;
|
|
1373
1374
|
}
|
|
1374
1375
|
t !== null && t.before(e);
|
|
1375
1376
|
}
|
|
1376
|
-
var
|
|
1377
|
+
var ls = [
|
|
1377
1378
|
"allowfullscreen",
|
|
1378
1379
|
"async",
|
|
1379
1380
|
"autofocus",
|
|
@@ -1402,8 +1403,8 @@ var ss = [
|
|
|
1402
1403
|
"defer",
|
|
1403
1404
|
"disablepictureinpicture",
|
|
1404
1405
|
"disableremoteplayback"
|
|
1405
|
-
],
|
|
1406
|
-
...
|
|
1406
|
+
], Js = [
|
|
1407
|
+
...ls,
|
|
1407
1408
|
"formNoValidate",
|
|
1408
1409
|
"isMap",
|
|
1409
1410
|
"noModule",
|
|
@@ -1418,17 +1419,17 @@ var ss = [
|
|
|
1418
1419
|
"allowFullscreen",
|
|
1419
1420
|
"disablePictureInPicture",
|
|
1420
1421
|
"disableRemotePlayback"
|
|
1421
|
-
],
|
|
1422
|
-
function
|
|
1423
|
-
return
|
|
1422
|
+
], os = ["touchstart", "touchmove"];
|
|
1423
|
+
function us(t) {
|
|
1424
|
+
return os.includes(t);
|
|
1424
1425
|
}
|
|
1425
|
-
var
|
|
1426
|
+
var cs = [
|
|
1426
1427
|
"$state",
|
|
1427
1428
|
"$state.raw",
|
|
1428
1429
|
"$derived",
|
|
1429
1430
|
"$derived.by"
|
|
1430
|
-
],
|
|
1431
|
-
...
|
|
1431
|
+
], Zs = [
|
|
1432
|
+
...cs,
|
|
1432
1433
|
"$state.eager",
|
|
1433
1434
|
"$state.snapshot",
|
|
1434
1435
|
"$props",
|
|
@@ -1444,41 +1445,41 @@ var os = [
|
|
|
1444
1445
|
"$inspect.trace",
|
|
1445
1446
|
"$host"
|
|
1446
1447
|
];
|
|
1447
|
-
function
|
|
1448
|
+
function fs(t) {
|
|
1448
1449
|
let e = 0, r = Kt(0), n;
|
|
1449
1450
|
return () => {
|
|
1450
|
-
|
|
1451
|
+
fr() && (S(r), hr(() => (e === 0 && (n = Ft(() => t(() => tt(r)))), e += 1, () => {
|
|
1451
1452
|
Oe(() => {
|
|
1452
1453
|
e -= 1, e === 0 && (n?.(), n = void 0, tt(r));
|
|
1453
1454
|
});
|
|
1454
1455
|
})));
|
|
1455
1456
|
};
|
|
1456
1457
|
}
|
|
1457
|
-
var
|
|
1458
|
-
function
|
|
1459
|
-
new
|
|
1458
|
+
var hs = Dr | ut;
|
|
1459
|
+
function ds(t, e, r, n) {
|
|
1460
|
+
new vs(t, e, r, n);
|
|
1460
1461
|
}
|
|
1461
|
-
var
|
|
1462
|
+
var ee = /* @__PURE__ */ new WeakMap(), er = /* @__PURE__ */ new WeakMap(), se = /* @__PURE__ */ new WeakMap(), ot = /* @__PURE__ */ new WeakMap(), G = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakMap(), U = /* @__PURE__ */ new WeakMap(), ve = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), tr = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), ge = /* @__PURE__ */ new WeakMap(), Lr = /* @__PURE__ */ new WeakMap(), C = /* @__PURE__ */ new WeakSet(), vs = class {
|
|
1462
1463
|
constructor(t, e, r, n) {
|
|
1463
|
-
|
|
1464
|
-
g(
|
|
1465
|
-
}))), g(
|
|
1464
|
+
or(this, C), u(this, "parent", void 0), u(this, "is_pending", !1), u(this, "transform_error", void 0), A(this, ee, void 0), A(this, er, Q ? B : null), A(this, se, void 0), A(this, ot, void 0), A(this, G, void 0), A(this, te, null), A(this, q, null), A(this, U, null), A(this, ve, null), A(this, De, 0), A(this, Re, 0), A(this, vt, !1), A(this, tr, /* @__PURE__ */ new Set()), A(this, rr, /* @__PURE__ */ new Set()), A(this, ge, null), A(this, Lr, fs(() => (g(ge, this, Kt(a(De, this))), () => {
|
|
1465
|
+
g(ge, this, null);
|
|
1466
|
+
}))), g(ee, this, t), g(se, this, e), g(ot, this, (i) => {
|
|
1466
1467
|
var s = T;
|
|
1467
1468
|
s.b = this, s.f |= 128, r(i);
|
|
1468
|
-
}), this.parent = T.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), g(
|
|
1469
|
-
if (
|
|
1470
|
-
const i =
|
|
1471
|
-
|
|
1469
|
+
}), this.parent = T.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), g(G, this, Xi(() => {
|
|
1470
|
+
if (Q) {
|
|
1471
|
+
const i = di(a(er, this));
|
|
1472
|
+
Yr();
|
|
1472
1473
|
const s = i === "[!";
|
|
1473
1474
|
if (i.startsWith("[?")) {
|
|
1474
1475
|
const l = JSON.parse(i.slice(2));
|
|
1475
|
-
p(
|
|
1476
|
-
} else s ? p(
|
|
1477
|
-
} else p(
|
|
1478
|
-
},
|
|
1476
|
+
p(C, this, ps).call(this, l);
|
|
1477
|
+
} else s ? p(C, this, ms).call(this) : p(C, this, _s).call(this);
|
|
1478
|
+
} else p(C, this, On).call(this);
|
|
1479
|
+
}, hs)), Q && g(ee, this, B);
|
|
1479
1480
|
}
|
|
1480
1481
|
defer_effect(t) {
|
|
1481
|
-
|
|
1482
|
+
Jr(t, a(tr, this), a(rr, this));
|
|
1482
1483
|
}
|
|
1483
1484
|
is_rendered() {
|
|
1484
1485
|
return !this.is_pending && (!this.parent || this.parent.is_rendered());
|
|
@@ -1487,169 +1488,169 @@ var te = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), se =
|
|
|
1487
1488
|
return !!a(se, this).pending;
|
|
1488
1489
|
}
|
|
1489
1490
|
update_pending_count(t, e) {
|
|
1490
|
-
p(
|
|
1491
|
-
g(vt, this, !1), a(
|
|
1491
|
+
p(C, this, Mn).call(this, t, e), g(De, this, a(De, this) + t), !(!a(ge, this) || a(vt, this)) && (g(vt, this, !0), Oe(() => {
|
|
1492
|
+
g(vt, this, !1), a(ge, this) && hn(a(ge, this), a(De, this));
|
|
1492
1493
|
}));
|
|
1493
1494
|
}
|
|
1494
1495
|
get_effect_pending() {
|
|
1495
|
-
return a(
|
|
1496
|
+
return a(Lr, this).call(this), S(a(ge, this));
|
|
1496
1497
|
}
|
|
1497
1498
|
error(t) {
|
|
1498
|
-
if (t ===
|
|
1499
|
-
$?.is_fork ? (a(
|
|
1500
|
-
p(
|
|
1501
|
-
})) : p(
|
|
1499
|
+
if (t === Ie || !a(se, this).onerror && !a(se, this).failed) throw t;
|
|
1500
|
+
$?.is_fork ? (a(te, this) && $.skip_effect(a(te, this)), a(q, this) && $.skip_effect(a(q, this)), a(U, this) && $.skip_effect(a(U, this)), $.oncommit(() => {
|
|
1501
|
+
p(C, this, Le).call(this) || p(C, this, Ir).call(this, t);
|
|
1502
|
+
})) : p(C, this, Ir).call(this, t);
|
|
1502
1503
|
}
|
|
1503
1504
|
};
|
|
1504
|
-
function
|
|
1505
|
+
function _s() {
|
|
1505
1506
|
try {
|
|
1506
|
-
g(
|
|
1507
|
+
g(te, this, xe(() => a(ot, this).call(this, a(ee, this))));
|
|
1507
1508
|
} catch (t) {
|
|
1508
1509
|
this.error(t);
|
|
1509
1510
|
}
|
|
1510
1511
|
}
|
|
1511
|
-
function
|
|
1512
|
-
const e = a(se, this).failed, { reset: r, invoke_onerror: n } = p(
|
|
1513
|
-
Oe(n), e && g(
|
|
1514
|
-
e(a(
|
|
1512
|
+
function ps(t) {
|
|
1513
|
+
const e = a(se, this).failed, { reset: r, invoke_onerror: n } = p(C, this, In).call(this, t);
|
|
1514
|
+
Oe(n), e && g(U, this, xe(() => {
|
|
1515
|
+
e(a(ee, this), () => t, () => r);
|
|
1515
1516
|
}));
|
|
1516
1517
|
}
|
|
1517
|
-
function
|
|
1518
|
+
function In(t) {
|
|
1518
1519
|
var e = !1, r = !1;
|
|
1519
1520
|
const n = () => {
|
|
1520
|
-
if (!p(
|
|
1521
|
+
if (!p(C, this, Le).call(this)) {
|
|
1521
1522
|
if (e) {
|
|
1522
|
-
|
|
1523
|
+
ci();
|
|
1523
1524
|
return;
|
|
1524
1525
|
}
|
|
1525
|
-
e = !0, r &&
|
|
1526
|
-
g(
|
|
1527
|
-
}), p(
|
|
1528
|
-
p(
|
|
1526
|
+
e = !0, r && Ei(), a(U, this) !== null && Bt(a(U, this), () => {
|
|
1527
|
+
g(U, this, null);
|
|
1528
|
+
}), p(C, this, vr).call(this, () => {
|
|
1529
|
+
p(C, this, On).call(this);
|
|
1529
1530
|
});
|
|
1530
1531
|
}
|
|
1531
1532
|
};
|
|
1532
1533
|
return {
|
|
1533
1534
|
reset: n,
|
|
1534
1535
|
invoke_onerror: () => {
|
|
1535
|
-
if (!p(
|
|
1536
|
+
if (!p(C, this, Le).call(this))
|
|
1536
1537
|
try {
|
|
1537
1538
|
r = !0, a(se, this).onerror?.(t, n), r = !1;
|
|
1538
1539
|
} catch (s) {
|
|
1539
|
-
de(s, a(
|
|
1540
|
+
de(s, a(G, this) && a(G, this).parent);
|
|
1540
1541
|
}
|
|
1541
1542
|
}
|
|
1542
1543
|
};
|
|
1543
1544
|
}
|
|
1544
|
-
function
|
|
1545
|
-
return (a(
|
|
1545
|
+
function Le() {
|
|
1546
|
+
return (a(G, this).f & (Fr | Vt)) !== 0;
|
|
1546
1547
|
}
|
|
1547
|
-
function
|
|
1548
|
+
function ms() {
|
|
1548
1549
|
const t = a(se, this).pending;
|
|
1549
|
-
t && (this.is_pending = !0, g(
|
|
1550
|
-
if (!p(
|
|
1551
|
-
var e = g(ve, this, document.createDocumentFragment()), r =
|
|
1552
|
-
if (e.append(r), g(
|
|
1550
|
+
t && (this.is_pending = !0, g(q, this, xe(() => t(a(ee, this)))), Oe(() => {
|
|
1551
|
+
if (!p(C, this, Le).call(this)) {
|
|
1552
|
+
var e = g(ve, this, document.createDocumentFragment()), r = mn(), n = !1;
|
|
1553
|
+
if (e.append(r), g(te, this, p(C, this, vr).call(this, () => {
|
|
1553
1554
|
try {
|
|
1554
|
-
return
|
|
1555
|
+
return xe(() => a(ot, this).call(this, r));
|
|
1555
1556
|
} catch (i) {
|
|
1556
1557
|
try {
|
|
1557
1558
|
this.error(i), n = !0;
|
|
1558
1559
|
} catch (s) {
|
|
1559
|
-
de(s, a(
|
|
1560
|
+
de(s, a(G, this).parent);
|
|
1560
1561
|
}
|
|
1561
1562
|
return null;
|
|
1562
1563
|
}
|
|
1563
|
-
})), a(
|
|
1564
|
-
g(ve, this, null), n && p(
|
|
1564
|
+
})), a(te, this) === null) {
|
|
1565
|
+
g(ve, this, null), n && p(C, this, Ot).call(this, $);
|
|
1565
1566
|
return;
|
|
1566
1567
|
}
|
|
1567
|
-
a(
|
|
1568
|
-
g(
|
|
1569
|
-
}), p(
|
|
1568
|
+
a(Re, this) === 0 && (a(ee, this).before(e), g(ve, this, null), Bt(a(q, this), () => {
|
|
1569
|
+
g(q, this, null);
|
|
1570
|
+
}), p(C, this, Ot).call(this, $));
|
|
1570
1571
|
}
|
|
1571
1572
|
}));
|
|
1572
1573
|
}
|
|
1573
|
-
function
|
|
1574
|
+
function On() {
|
|
1574
1575
|
try {
|
|
1575
|
-
if (this.is_pending = this.has_pending_snippet(), g(
|
|
1576
|
-
a(ot, this).call(this, a(
|
|
1577
|
-
})), a(
|
|
1576
|
+
if (this.is_pending = this.has_pending_snippet(), g(Re, this, 0), g(De, this, 0), g(te, this, xe(() => {
|
|
1577
|
+
a(ot, this).call(this, a(ee, this));
|
|
1578
|
+
})), a(Re, this) > 0) {
|
|
1578
1579
|
var t = g(ve, this, document.createDocumentFragment());
|
|
1579
|
-
|
|
1580
|
+
Ji(a(te, this), t);
|
|
1580
1581
|
const e = a(se, this).pending;
|
|
1581
|
-
g(
|
|
1582
|
-
} else p(
|
|
1582
|
+
g(q, this, xe(() => e(a(ee, this))));
|
|
1583
|
+
} else p(C, this, Ot).call(this, $);
|
|
1583
1584
|
} catch (e) {
|
|
1584
1585
|
this.error(e);
|
|
1585
1586
|
}
|
|
1586
1587
|
}
|
|
1587
|
-
function
|
|
1588
|
-
this.is_pending = !1, t.transfer_effects(a(
|
|
1588
|
+
function Ot(t) {
|
|
1589
|
+
this.is_pending = !1, t.transfer_effects(a(tr, this), a(rr, this));
|
|
1589
1590
|
}
|
|
1590
|
-
function
|
|
1591
|
-
var e = T, r = E, n =
|
|
1592
|
-
_e(a(
|
|
1591
|
+
function vr(t) {
|
|
1592
|
+
var e = T, r = E, n = M;
|
|
1593
|
+
_e(a(G, this)), le(a(G, this)), At(a(G, this).ctx);
|
|
1593
1594
|
try {
|
|
1594
1595
|
return ze.ensure(), t();
|
|
1595
1596
|
} finally {
|
|
1596
1597
|
_e(e), le(r), At(n);
|
|
1597
1598
|
}
|
|
1598
1599
|
}
|
|
1599
|
-
function
|
|
1600
|
+
function Mn(t, e) {
|
|
1600
1601
|
if (!this.has_pending_snippet()) {
|
|
1601
1602
|
if (this.parent) {
|
|
1602
1603
|
var r;
|
|
1603
|
-
p(
|
|
1604
|
+
p(C, r = this.parent, Mn).call(r, t, e);
|
|
1604
1605
|
}
|
|
1605
1606
|
return;
|
|
1606
1607
|
}
|
|
1607
|
-
g(
|
|
1608
|
-
g(
|
|
1609
|
-
}), a(ve, this) && (a(
|
|
1608
|
+
g(Re, this, a(Re, this) + t), a(Re, this) === 0 && (p(C, this, Ot).call(this, e), a(q, this) && Bt(a(q, this), () => {
|
|
1609
|
+
g(q, this, null);
|
|
1610
|
+
}), a(ve, this) && (a(ee, this).before(a(ve, this)), g(ve, this, null)));
|
|
1610
1611
|
}
|
|
1611
|
-
function
|
|
1612
|
-
a(
|
|
1612
|
+
function Ir(t) {
|
|
1613
|
+
a(te, this) && (J(a(te, this)), g(te, this, null)), a(q, this) && (J(a(q, this)), g(q, this, null)), a(U, this) && (J(a(U, this)), g(U, this, null)), Q && (st(a(er, this)), fi(), st(hi()));
|
|
1613
1614
|
let e = a(se, this).failed;
|
|
1614
1615
|
const r = (n) => {
|
|
1615
|
-
if (p(
|
|
1616
|
-
const { reset: i, invoke_onerror: s } = p(
|
|
1617
|
-
s(), e && !p(
|
|
1616
|
+
if (p(C, this, Le).call(this)) return;
|
|
1617
|
+
const { reset: i, invoke_onerror: s } = p(C, this, In).call(this, n);
|
|
1618
|
+
s(), e && !p(C, this, Le).call(this) && g(U, this, p(C, this, vr).call(this, () => {
|
|
1618
1619
|
try {
|
|
1619
|
-
return
|
|
1620
|
+
return xe(() => {
|
|
1620
1621
|
var l = T;
|
|
1621
|
-
l.b = this, l.f |= 128, e(a(
|
|
1622
|
+
l.b = this, l.f |= 128, e(a(ee, this), () => n, () => i);
|
|
1622
1623
|
});
|
|
1623
1624
|
} catch (l) {
|
|
1624
|
-
return de(l, a(
|
|
1625
|
+
return de(l, a(G, this).parent), null;
|
|
1625
1626
|
}
|
|
1626
1627
|
}));
|
|
1627
1628
|
};
|
|
1628
1629
|
Oe(() => {
|
|
1629
|
-
if (!p(
|
|
1630
|
+
if (!p(C, this, Le).call(this)) {
|
|
1630
1631
|
var n;
|
|
1631
1632
|
try {
|
|
1632
1633
|
n = this.transform_error(t);
|
|
1633
1634
|
} catch (i) {
|
|
1634
|
-
de(i, a(
|
|
1635
|
+
de(i, a(G, this) && a(G, this).parent);
|
|
1635
1636
|
return;
|
|
1636
1637
|
}
|
|
1637
|
-
n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => de(i, a(
|
|
1638
|
+
n !== null && typeof n == "object" && typeof n.then == "function" ? n.then(r, (i) => de(i, a(G, this) && a(G, this).parent)) : r(n);
|
|
1638
1639
|
}
|
|
1639
1640
|
});
|
|
1640
1641
|
}
|
|
1641
|
-
var
|
|
1642
|
-
function
|
|
1643
|
-
return
|
|
1642
|
+
var Or = !0;
|
|
1643
|
+
function xn(t, e) {
|
|
1644
|
+
return Hn(t, e);
|
|
1644
1645
|
}
|
|
1645
|
-
function
|
|
1646
|
-
|
|
1647
|
-
const r = e.target, n =
|
|
1646
|
+
function gs(t, e) {
|
|
1647
|
+
Jt(), e.intro = e.intro ?? !1;
|
|
1648
|
+
const r = e.target, n = Q, i = B;
|
|
1648
1649
|
try {
|
|
1649
|
-
for (var s = /* @__PURE__ */
|
|
1650
|
-
if (!s) throw
|
|
1650
|
+
for (var s = /* @__PURE__ */ Zt(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ Ve(s);
|
|
1651
|
+
if (!s) throw Ie;
|
|
1651
1652
|
ft(!0), st(s);
|
|
1652
|
-
const l =
|
|
1653
|
+
const l = Hn(t, {
|
|
1653
1654
|
...e,
|
|
1654
1655
|
anchor: s
|
|
1655
1656
|
});
|
|
@@ -1657,101 +1658,101 @@ function ps(t, e) {
|
|
|
1657
1658
|
} catch (l) {
|
|
1658
1659
|
if (l instanceof Error && l.message.split(`
|
|
1659
1660
|
`).some((o) => o.startsWith("https://svelte.dev/e/"))) throw l;
|
|
1660
|
-
return l !==
|
|
1661
|
+
return l !== Ie && console.warn("Failed to hydrate: ", l), e.recover === !1 && yi(), Jt(), Di(r), ft(!1), xn(t, e);
|
|
1661
1662
|
} finally {
|
|
1662
1663
|
ft(n), st(i);
|
|
1663
1664
|
}
|
|
1664
1665
|
}
|
|
1665
1666
|
var _t = /* @__PURE__ */ new Map();
|
|
1666
|
-
function
|
|
1667
|
-
|
|
1668
|
-
var f = void 0,
|
|
1669
|
-
var v = r ?? e.appendChild(
|
|
1670
|
-
|
|
1667
|
+
function Hn(t, { target: e, anchor: r, props: n = {}, events: i, context: s, intro: l = !0, transformError: o }) {
|
|
1668
|
+
Jt();
|
|
1669
|
+
var f = void 0, b = zi(() => {
|
|
1670
|
+
var v = r ?? e.appendChild(mn());
|
|
1671
|
+
ds(v, { pending: () => {
|
|
1671
1672
|
} }, (h) => {
|
|
1672
|
-
|
|
1673
|
-
var _ =
|
|
1674
|
-
if (s && (_.c = s), i && (n.$$events = i),
|
|
1675
|
-
throw
|
|
1676
|
-
|
|
1673
|
+
Xr({});
|
|
1674
|
+
var _ = M;
|
|
1675
|
+
if (s && (_.c = s), i && (n.$$events = i), Q && gt(h, null), Or = l, f = t(h, n) || sr(), Or = !0, Q && (T.nodes.end = B, B === null || B.nodeType !== 8 || B.data !== "]"))
|
|
1676
|
+
throw ir(), Ie;
|
|
1677
|
+
Ur();
|
|
1677
1678
|
}, o);
|
|
1678
1679
|
var c = /* @__PURE__ */ new Set(), d = (h) => {
|
|
1679
1680
|
for (var _ = 0; _ < h.length; _++) {
|
|
1680
|
-
var
|
|
1681
|
-
if (!c.has(
|
|
1682
|
-
c.add(
|
|
1683
|
-
var
|
|
1684
|
-
for (const
|
|
1685
|
-
var
|
|
1686
|
-
|
|
1687
|
-
var
|
|
1688
|
-
|
|
1681
|
+
var y = h[_];
|
|
1682
|
+
if (!c.has(y)) {
|
|
1683
|
+
c.add(y);
|
|
1684
|
+
var k = us(y);
|
|
1685
|
+
for (const ne of [e, document]) {
|
|
1686
|
+
var I = _t.get(ne);
|
|
1687
|
+
I === void 0 && (I = /* @__PURE__ */ new Map(), _t.set(ne, I));
|
|
1688
|
+
var H = I.get(y);
|
|
1689
|
+
H === void 0 ? (ne.addEventListener(y, Rr, { passive: k }), I.set(y, 1)) : I.set(y, H + 1);
|
|
1689
1690
|
}
|
|
1690
1691
|
}
|
|
1691
1692
|
}
|
|
1692
1693
|
};
|
|
1693
|
-
return d(
|
|
1694
|
-
for (var h of c) for (const
|
|
1695
|
-
var _ = _t.get(
|
|
1696
|
-
--
|
|
1694
|
+
return d(Vn(rs)), kr.add(d), () => {
|
|
1695
|
+
for (var h of c) for (const k of [e, document]) {
|
|
1696
|
+
var _ = _t.get(k), y = _.get(h);
|
|
1697
|
+
--y == 0 ? (k.removeEventListener(h, Rr), _.delete(h), _.size === 0 && _t.delete(k)) : _.set(h, y);
|
|
1697
1698
|
}
|
|
1698
|
-
|
|
1699
|
+
kr.delete(d), v !== r && v.parentNode?.removeChild(v);
|
|
1699
1700
|
};
|
|
1700
1701
|
});
|
|
1701
|
-
return
|
|
1702
|
+
return nr.set(f, b), f;
|
|
1702
1703
|
}
|
|
1703
|
-
var
|
|
1704
|
-
function
|
|
1705
|
-
const r =
|
|
1706
|
-
return r ? (
|
|
1704
|
+
var nr = /* @__PURE__ */ new WeakMap();
|
|
1705
|
+
function ys(t, e) {
|
|
1706
|
+
const r = nr.get(t);
|
|
1707
|
+
return r ? (nr.delete(t), r(e)) : Promise.resolve();
|
|
1707
1708
|
}
|
|
1708
|
-
var
|
|
1709
|
+
var Nn, We = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), Mr = /* @__PURE__ */ new WeakSet(), Pn = class {
|
|
1709
1710
|
constructor(t) {
|
|
1710
|
-
|
|
1711
|
+
or(this, Mr), A(this, We, /* @__PURE__ */ new WeakMap()), A(this, Mt, void 0), A(this, qt, void 0), g(qt, this, t);
|
|
1711
1712
|
}
|
|
1712
1713
|
observe(t, e) {
|
|
1713
1714
|
var r = a(We, this).get(t) || /* @__PURE__ */ new Set();
|
|
1714
|
-
return r.add(e), a(We, this).set(t, r), p(
|
|
1715
|
+
return r.add(e), a(We, this).set(t, r), p(Mr, this, bs).call(this).observe(t, a(qt, this)), () => {
|
|
1715
1716
|
var n = a(We, this).get(t);
|
|
1716
|
-
n.delete(e), n.size === 0 && (a(We, this).delete(t), a(
|
|
1717
|
+
n.delete(e), n.size === 0 && (a(We, this).delete(t), a(Mt, this).unobserve(t));
|
|
1717
1718
|
};
|
|
1718
1719
|
}
|
|
1719
1720
|
};
|
|
1720
|
-
|
|
1721
|
-
function
|
|
1722
|
-
return a(
|
|
1721
|
+
Nn = Pn;
|
|
1722
|
+
function bs() {
|
|
1723
|
+
return a(Mt, this) ?? g(Mt, this, new ResizeObserver((t) => {
|
|
1723
1724
|
for (var e of t) {
|
|
1724
|
-
|
|
1725
|
+
Nn.entries.set(e.target, e);
|
|
1725
1726
|
for (var r of a(We, this).get(e.target) || []) r(e);
|
|
1726
1727
|
}
|
|
1727
1728
|
}));
|
|
1728
1729
|
}
|
|
1729
|
-
u(
|
|
1730
|
-
function
|
|
1730
|
+
u(Pn, "entries", /* @__PURE__ */ new WeakMap());
|
|
1731
|
+
function Yt(t, e) {
|
|
1731
1732
|
return t === e || t?.[Ze] === e;
|
|
1732
1733
|
}
|
|
1733
|
-
function
|
|
1734
|
-
var i =
|
|
1735
|
-
return
|
|
1734
|
+
function ws(t = sr(), e, r, n) {
|
|
1735
|
+
var i = M.r, s = T;
|
|
1736
|
+
return Vi(() => {
|
|
1736
1737
|
var l, o;
|
|
1737
|
-
return
|
|
1738
|
+
return hr(() => {
|
|
1738
1739
|
l = o, o = n?.() || [], Ft(() => {
|
|
1739
|
-
|
|
1740
|
+
Yt(r(...o), t) || (e(t, ...o), l && Yt(r(...l), t) && e(null, ...l));
|
|
1740
1741
|
});
|
|
1741
1742
|
}), () => {
|
|
1742
1743
|
let f = s;
|
|
1743
1744
|
for (; f !== i && f.parent !== null && f.parent.f & 33554432; ) f = f.parent;
|
|
1744
|
-
const
|
|
1745
|
-
o &&
|
|
1745
|
+
const b = () => {
|
|
1746
|
+
o && Yt(r(...o), t) && e(null, ...o);
|
|
1746
1747
|
}, v = f.teardown;
|
|
1747
1748
|
f.teardown = () => {
|
|
1748
|
-
|
|
1749
|
+
b(), v?.();
|
|
1749
1750
|
};
|
|
1750
1751
|
};
|
|
1751
1752
|
}), t;
|
|
1752
1753
|
}
|
|
1753
1754
|
var pt = !1;
|
|
1754
|
-
function
|
|
1755
|
+
function Ss(t) {
|
|
1755
1756
|
var e = pt;
|
|
1756
1757
|
try {
|
|
1757
1758
|
return pt = !1, [t(), pt];
|
|
@@ -1760,47 +1761,47 @@ function bs(t) {
|
|
|
1760
1761
|
}
|
|
1761
1762
|
}
|
|
1762
1763
|
function Xe(t, e, r, n) {
|
|
1763
|
-
var i = !Ht || (r & 2) !== 0, s = (r & 8) !== 0, l = (r & 16) !== 0, o = n, f = !0,
|
|
1764
|
+
var i = !Ht || (r & 2) !== 0, s = (r & 8) !== 0, l = (r & 16) !== 0, o = n, f = !0, b = void 0, v = () => l && i ? (b ?? (b = /* @__PURE__ */ Et(n)), S(b)) : (f && (f = !1, o = l ? Ft(n) : n), o);
|
|
1764
1765
|
let c;
|
|
1765
1766
|
if (s) {
|
|
1766
|
-
var d = Ze in t ||
|
|
1767
|
-
c =
|
|
1767
|
+
var d = Ze in t || qr in t;
|
|
1768
|
+
c = $e(t, e)?.set ?? (d && e in t ? (m) => t[e] = m : void 0);
|
|
1768
1769
|
}
|
|
1769
1770
|
var h, _ = !1;
|
|
1770
|
-
s ? [h, _] =
|
|
1771
|
-
var
|
|
1772
|
-
if (i ?
|
|
1773
|
-
var
|
|
1774
|
-
return
|
|
1775
|
-
} :
|
|
1776
|
-
var
|
|
1777
|
-
return
|
|
1778
|
-
}, i && (r & 4) === 0) return
|
|
1771
|
+
s ? [h, _] = Ss(() => t[e]) : h = t[e], h === void 0 && n !== void 0 && (h = v(), c && (i && bi(e), c(h)));
|
|
1772
|
+
var y;
|
|
1773
|
+
if (i ? y = () => {
|
|
1774
|
+
var m = t[e];
|
|
1775
|
+
return m === void 0 ? v() : (f = !0, m);
|
|
1776
|
+
} : y = () => {
|
|
1777
|
+
var m = t[e];
|
|
1778
|
+
return m !== void 0 && (o = void 0), m === void 0 ? o : m;
|
|
1779
|
+
}, i && (r & 4) === 0) return y;
|
|
1779
1780
|
if (c) {
|
|
1780
|
-
var
|
|
1781
|
-
return (function(
|
|
1782
|
-
return arguments.length > 0 ? ((!i || !pe ||
|
|
1781
|
+
var k = t.$$legacy;
|
|
1782
|
+
return (function(m, pe) {
|
|
1783
|
+
return arguments.length > 0 ? ((!i || !pe || k || _) && c(pe ? y() : m), m) : y();
|
|
1783
1784
|
});
|
|
1784
1785
|
}
|
|
1785
|
-
var
|
|
1786
|
-
s &&
|
|
1787
|
-
var
|
|
1788
|
-
return (function(
|
|
1786
|
+
var I = !1, H = ((r & 1) !== 0 ? Et : Ri)(() => (I = !1, y()));
|
|
1787
|
+
s && S(H);
|
|
1788
|
+
var ne = T;
|
|
1789
|
+
return (function(m, pe) {
|
|
1789
1790
|
if (arguments.length > 0) {
|
|
1790
|
-
const
|
|
1791
|
-
return
|
|
1791
|
+
const Be = pe ? S(H) : i && s ? je(m) : m;
|
|
1792
|
+
return N(H, Be), I = !0, o !== void 0 && (o = Be), m;
|
|
1792
1793
|
}
|
|
1793
|
-
return fe &&
|
|
1794
|
+
return fe && I || (ne.f & 16384) !== 0 ? H.v : S(H);
|
|
1794
1795
|
});
|
|
1795
1796
|
}
|
|
1796
|
-
function
|
|
1797
|
-
return new
|
|
1797
|
+
function As(t) {
|
|
1798
|
+
return new Es(t);
|
|
1798
1799
|
}
|
|
1799
|
-
var
|
|
1800
|
+
var ye = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Es = class {
|
|
1800
1801
|
constructor(t) {
|
|
1801
|
-
|
|
1802
|
+
A(this, ye, void 0), A(this, ie, void 0);
|
|
1802
1803
|
var e = /* @__PURE__ */ new Map(), r = (i, s) => {
|
|
1803
|
-
var l = /* @__PURE__ */
|
|
1804
|
+
var l = /* @__PURE__ */ Pi(s, !1, !1);
|
|
1804
1805
|
return e.set(i, l), l;
|
|
1805
1806
|
};
|
|
1806
1807
|
const n = new Proxy({
|
|
@@ -1808,16 +1809,16 @@ var ge = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ss =
|
|
|
1808
1809
|
$$events: {}
|
|
1809
1810
|
}, {
|
|
1810
1811
|
get(i, s) {
|
|
1811
|
-
return
|
|
1812
|
+
return S(e.get(s) ?? r(s, Reflect.get(i, s)));
|
|
1812
1813
|
},
|
|
1813
1814
|
has(i, s) {
|
|
1814
|
-
return s ===
|
|
1815
|
+
return s === qr ? !0 : (S(e.get(s) ?? r(s, Reflect.get(i, s))), Reflect.has(i, s));
|
|
1815
1816
|
},
|
|
1816
1817
|
set(i, s, l) {
|
|
1817
|
-
return
|
|
1818
|
+
return N(e.get(s) ?? r(s, l), l), Reflect.set(i, s, l);
|
|
1818
1819
|
}
|
|
1819
1820
|
});
|
|
1820
|
-
g(ie, this, (t.hydrate ?
|
|
1821
|
+
g(ie, this, (t.hydrate ? gs : xn)(t.component, {
|
|
1821
1822
|
target: t.target,
|
|
1822
1823
|
anchor: t.anchor,
|
|
1823
1824
|
props: n,
|
|
@@ -1825,7 +1826,7 @@ var ge = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ss =
|
|
|
1825
1826
|
intro: t.intro ?? !1,
|
|
1826
1827
|
recover: t.recover,
|
|
1827
1828
|
transformError: t.transformError
|
|
1828
|
-
})), !
|
|
1829
|
+
})), !Ne && (!t?.props?.$$host || t.sync === !1) && we(), g(ye, this, n.$$events);
|
|
1829
1830
|
for (const i of Object.keys(a(ie, this)))
|
|
1830
1831
|
i === "$set" || i === "$destroy" || i === "$on" || nt(this, i, {
|
|
1831
1832
|
get() {
|
|
@@ -1839,24 +1840,24 @@ var ge = /* @__PURE__ */ new WeakMap(), ie = /* @__PURE__ */ new WeakMap(), Ss =
|
|
|
1839
1840
|
a(ie, this).$set = (i) => {
|
|
1840
1841
|
Object.assign(n, i);
|
|
1841
1842
|
}, a(ie, this).$destroy = () => {
|
|
1842
|
-
|
|
1843
|
+
ys(a(ie, this));
|
|
1843
1844
|
};
|
|
1844
1845
|
}
|
|
1845
1846
|
$set(t) {
|
|
1846
1847
|
a(ie, this).$set(t);
|
|
1847
1848
|
}
|
|
1848
1849
|
$on(t, e) {
|
|
1849
|
-
a(
|
|
1850
|
+
a(ye, this)[t] = a(ye, this)[t] || [];
|
|
1850
1851
|
const r = (...n) => e.call(this, ...n);
|
|
1851
|
-
return a(
|
|
1852
|
-
a(
|
|
1852
|
+
return a(ye, this)[t].push(r), () => {
|
|
1853
|
+
a(ye, this)[t] = a(ye, this)[t].filter((n) => n !== r);
|
|
1853
1854
|
};
|
|
1854
1855
|
}
|
|
1855
1856
|
$destroy() {
|
|
1856
1857
|
a(ie, this).$destroy();
|
|
1857
1858
|
}
|
|
1858
|
-
},
|
|
1859
|
-
typeof HTMLElement == "function" && (
|
|
1859
|
+
}, Kn;
|
|
1860
|
+
typeof HTMLElement == "function" && (Kn = class extends HTMLElement {
|
|
1860
1861
|
constructor(t, e, r) {
|
|
1861
1862
|
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 = t, this.$$s = e, r && (this.$$shadowRoot = this.attachShadow(r));
|
|
1862
1863
|
}
|
|
@@ -1877,19 +1878,19 @@ typeof HTMLElement == "function" && (Nn = class extends HTMLElement {
|
|
|
1877
1878
|
if (this.$$cn = !0, !this.$$c) {
|
|
1878
1879
|
let t = function(n) {
|
|
1879
1880
|
return (i) => {
|
|
1880
|
-
const s =
|
|
1881
|
-
n !== "default" && (s.name = n),
|
|
1881
|
+
const s = gn("slot");
|
|
1882
|
+
n !== "default" && (s.name = n), Ln(i, s);
|
|
1882
1883
|
};
|
|
1883
1884
|
};
|
|
1884
1885
|
if (await Promise.resolve(), !this.$$cn || this.$$c) return;
|
|
1885
|
-
const e = {}, r =
|
|
1886
|
+
const e = {}, r = Ts(this);
|
|
1886
1887
|
for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = t(n), e.default = !0) : e[n] = t(n));
|
|
1887
1888
|
for (const n of this.attributes) {
|
|
1888
1889
|
const i = this.$$g_p(n.name);
|
|
1889
1890
|
i in this.$$d || (this.$$d[i] = yt(i, n.value, this.$$p_d, "toProp"));
|
|
1890
1891
|
}
|
|
1891
1892
|
for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
|
|
1892
|
-
this.$$c =
|
|
1893
|
+
this.$$c = As({
|
|
1893
1894
|
component: this.$$ctor,
|
|
1894
1895
|
target: this.$$shadowRoot || this,
|
|
1895
1896
|
props: {
|
|
@@ -1897,8 +1898,8 @@ typeof HTMLElement == "function" && (Nn = class extends HTMLElement {
|
|
|
1897
1898
|
$$slots: e,
|
|
1898
1899
|
$$host: this
|
|
1899
1900
|
}
|
|
1900
|
-
}), this.$$me =
|
|
1901
|
-
|
|
1901
|
+
}), this.$$me = Yi(() => {
|
|
1902
|
+
hr(() => {
|
|
1902
1903
|
this.$$r = !0;
|
|
1903
1904
|
for (const n of St(this.$$c)) {
|
|
1904
1905
|
if (!this.$$p_d[n]?.reflect) continue;
|
|
@@ -1954,14 +1955,14 @@ function yt(t, e, r, n) {
|
|
|
1954
1955
|
return e;
|
|
1955
1956
|
}
|
|
1956
1957
|
}
|
|
1957
|
-
function
|
|
1958
|
+
function Ts(t) {
|
|
1958
1959
|
const e = {};
|
|
1959
1960
|
return t.childNodes.forEach((r) => {
|
|
1960
1961
|
e[r.slot || "default"] = !0;
|
|
1961
1962
|
}), e;
|
|
1962
1963
|
}
|
|
1963
|
-
function
|
|
1964
|
-
let l = class extends
|
|
1964
|
+
function $s(t, e, r, n, i, s) {
|
|
1965
|
+
let l = class extends Kn {
|
|
1965
1966
|
constructor() {
|
|
1966
1967
|
super(t, r, i), this.$$p_d = e;
|
|
1967
1968
|
}
|
|
@@ -1976,8 +1977,8 @@ function Es(t, e, r, n, i, s) {
|
|
|
1976
1977
|
},
|
|
1977
1978
|
set(f) {
|
|
1978
1979
|
f = yt(o, f, e), this.$$d[o] = f;
|
|
1979
|
-
var
|
|
1980
|
-
|
|
1980
|
+
var b = this.$$c;
|
|
1981
|
+
b && ($e(b, o)?.get ? b[o] = f : b.$set({ [o]: f }));
|
|
1981
1982
|
}
|
|
1982
1983
|
});
|
|
1983
1984
|
}), n.forEach((o) => {
|
|
@@ -1986,10 +1987,10 @@ function Es(t, e, r, n, i, s) {
|
|
|
1986
1987
|
} });
|
|
1987
1988
|
}), s && (l = s(l)), t.element = l, l;
|
|
1988
1989
|
}
|
|
1989
|
-
var
|
|
1990
|
+
var Bn, oe = class D {
|
|
1990
1991
|
findChoices(e) {
|
|
1991
|
-
e.setAttribute(
|
|
1992
|
-
const r = Array.from(e.querySelectorAll(
|
|
1992
|
+
e.setAttribute(D.ROOT_HOOK_ATTR, "true");
|
|
1993
|
+
const r = Array.from(e.querySelectorAll(D.CHOICE_SELECTOR));
|
|
1993
1994
|
for (const n of r) this.annotateChoice(n);
|
|
1994
1995
|
return this.annotateFeedbackTicks(e), r;
|
|
1995
1996
|
}
|
|
@@ -2004,7 +2005,7 @@ var Pn, oe = class W {
|
|
|
2004
2005
|
return r?.getAttribute("value") || r?.id || this.generateFallbackId(e);
|
|
2005
2006
|
}
|
|
2006
2007
|
getChoiceLabel(e) {
|
|
2007
|
-
return this.resolveLabelElement(e)?.textContent?.trim() || "
|
|
2008
|
+
return this.resolveLabelElement(e)?.textContent?.trim() || "";
|
|
2008
2009
|
}
|
|
2009
2010
|
isSelected(e) {
|
|
2010
2011
|
const r = e.querySelector('input[type="checkbox"], input[type="radio"]');
|
|
@@ -2012,59 +2013,59 @@ var Pn, oe = class W {
|
|
|
2012
2013
|
}
|
|
2013
2014
|
canEliminate(e) {
|
|
2014
2015
|
const r = e.querySelector('input[type="checkbox"], input[type="radio"]');
|
|
2015
|
-
return !(!r || this.isSelected(e) || r.disabled || (e.closest(`[${
|
|
2016
|
+
return !(!r || this.isSelected(e) || r.disabled || (e.closest(`[${D.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelector(`[${D.FEEDBACK_HOOK_ATTR}="true"]`));
|
|
2016
2017
|
}
|
|
2017
2018
|
setSelectable(e, r) {
|
|
2018
2019
|
const n = e.querySelector('input[type="checkbox"], input[type="radio"]');
|
|
2019
2020
|
if (!n) return;
|
|
2020
2021
|
n.disabled = !r, r ? n.removeAttribute("aria-disabled") : n.setAttribute("aria-disabled", "true");
|
|
2021
|
-
const i = n.closest(
|
|
2022
|
-
i && i.classList.toggle(
|
|
2022
|
+
const i = n.closest(D.MUI_BUTTON_SELECTOR);
|
|
2023
|
+
i && i.classList.toggle(D.MUI_DISABLED_CLASS, !r);
|
|
2023
2024
|
}
|
|
2024
2025
|
generateFallbackId(e) {
|
|
2025
|
-
const r = (e.closest(`[${
|
|
2026
|
+
const r = (e.closest(`[${D.ROOT_HOOK_ATTR}="true"]`) || e.closest("multiple-choice"))?.querySelectorAll(`[${D.CHOICE_HOOK_ATTR}="true"]`) || [];
|
|
2026
2027
|
return `choice-${Array.from(r).indexOf(e)}`;
|
|
2027
2028
|
}
|
|
2028
2029
|
annotateChoice(e) {
|
|
2029
|
-
e.setAttribute(
|
|
2030
|
+
e.setAttribute(D.CHOICE_HOOK_ATTR, "true");
|
|
2030
2031
|
const r = this.resolveLabelElement(e);
|
|
2031
|
-
r && r.setAttribute(
|
|
2032
|
+
r && r.setAttribute(D.LABEL_HOOK_ATTR, "true");
|
|
2032
2033
|
}
|
|
2033
2034
|
resolveLabelElement(e) {
|
|
2034
|
-
return e.querySelector(`[${
|
|
2035
|
+
return e.querySelector(`[${D.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label") || e.querySelector("span");
|
|
2035
2036
|
}
|
|
2036
2037
|
annotateFeedbackTicks(e) {
|
|
2037
|
-
for (const r of e.querySelectorAll(".feedback-tick")) r.setAttribute(
|
|
2038
|
+
for (const r of e.querySelectorAll(".feedback-tick")) r.setAttribute(D.FEEDBACK_HOOK_ATTR, "true");
|
|
2038
2039
|
}
|
|
2039
2040
|
};
|
|
2040
|
-
|
|
2041
|
+
Bn = oe;
|
|
2041
2042
|
u(oe, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
2042
2043
|
u(oe, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
|
|
2043
2044
|
u(oe, "ROOT_HOOK_ATTR", "data-pie-answer-eliminator-root");
|
|
2044
2045
|
u(oe, "FEEDBACK_HOOK_ATTR", "data-pie-answer-eliminator-feedback-tick");
|
|
2045
|
-
u(oe, "CHOICE_SELECTOR", `[${
|
|
2046
|
+
u(oe, "CHOICE_SELECTOR", `[${Bn.CHOICE_HOOK_ATTR}="true"], .corespring-checkbox, .corespring-radio-button`);
|
|
2046
2047
|
u(oe, "MUI_BUTTON_SELECTOR", ".MuiButtonBase-root, .MuiRadio-root, .MuiCheckbox-root");
|
|
2047
2048
|
u(oe, "MUI_DISABLED_CLASS", "Mui-disabled");
|
|
2048
|
-
var
|
|
2049
|
+
var Cs = "ebsr-multiple-choice", Fn = (t) => t instanceof HTMLElement && qn(t.tagName.toLowerCase()).baseName === Cs, xr = (t, e) => Array.from(t.querySelectorAll(`[id="${e}"]`)).find(Fn) ?? null, ks = (t) => {
|
|
2049
2050
|
let e = t.parentElement;
|
|
2050
2051
|
for (; e !== null; ) {
|
|
2051
|
-
if (
|
|
2052
|
+
if (Fn(e)) return e;
|
|
2052
2053
|
e = e.parentElement;
|
|
2053
2054
|
}
|
|
2054
2055
|
return null;
|
|
2055
|
-
},
|
|
2056
|
+
}, Rs = class {
|
|
2056
2057
|
constructor() {
|
|
2057
2058
|
u(this, "mcAdapter", new oe());
|
|
2058
2059
|
}
|
|
2059
2060
|
findChoices(t) {
|
|
2060
|
-
const e =
|
|
2061
|
+
const e = xr(t, "a"), r = xr(t, "b"), n = [];
|
|
2061
2062
|
return e && n.push(...this.mcAdapter.findChoices(e)), r && n.push(...this.mcAdapter.findChoices(r)), n;
|
|
2062
2063
|
}
|
|
2063
2064
|
createChoiceRange(t) {
|
|
2064
2065
|
return this.mcAdapter.createChoiceRange(t);
|
|
2065
2066
|
}
|
|
2066
2067
|
getChoiceId(t) {
|
|
2067
|
-
return `${
|
|
2068
|
+
return `${ks(t)?.id || "unknown"}-${this.mcAdapter.getChoiceId(t)}`;
|
|
2068
2069
|
}
|
|
2069
2070
|
getChoiceLabel(t) {
|
|
2070
2071
|
return this.mcAdapter.getChoiceLabel(t);
|
|
@@ -2078,8 +2079,8 @@ var Ts = "ebsr-multiple-choice", Kn = (t) => t instanceof HTMLElement && Wn(t.ta
|
|
|
2078
2079
|
setSelectable(t, e) {
|
|
2079
2080
|
this.mcAdapter.setSelectable(t, e);
|
|
2080
2081
|
}
|
|
2081
|
-
},
|
|
2082
|
-
function
|
|
2082
|
+
}, Hr = "answer-masking", Ls = "data-pie-answer-eliminator-choice", Is = "data-pie-answer-eliminator-label";
|
|
2083
|
+
function Gn(t) {
|
|
2083
2084
|
if (!t.localName.includes("-")) return null;
|
|
2084
2085
|
try {
|
|
2085
2086
|
const e = t.constructor.pieSupports;
|
|
@@ -2088,10 +2089,10 @@ function Bn(t) {
|
|
|
2088
2089
|
return null;
|
|
2089
2090
|
}
|
|
2090
2091
|
}
|
|
2091
|
-
function
|
|
2092
|
+
function Os(t) {
|
|
2092
2093
|
const e = [];
|
|
2093
2094
|
for (const r of [t, ...t.querySelectorAll("*")])
|
|
2094
|
-
|
|
2095
|
+
Gn(r) && (e.some((n) => n.contains(r)) || e.push(r));
|
|
2095
2096
|
return e;
|
|
2096
2097
|
}
|
|
2097
2098
|
function bt(t, e, r) {
|
|
@@ -2101,52 +2102,52 @@ function bt(t, e, r) {
|
|
|
2101
2102
|
return console.error(`[AnswerEliminator] ${r} threw:`, n), e;
|
|
2102
2103
|
}
|
|
2103
2104
|
}
|
|
2104
|
-
function
|
|
2105
|
+
function Ms(t) {
|
|
2105
2106
|
if (!t || typeof t != "object") return null;
|
|
2106
2107
|
const e = t, { id: r, label: n, container: i, content: s } = e, { isSelected: l, isEliminable: o, setEliminated: f } = e;
|
|
2107
2108
|
return typeof r != "string" || !r || typeof n != "string" || !(i instanceof HTMLElement) || !(s instanceof Element) || !i.contains(s) || typeof l != "function" || typeof o != "function" || typeof f != "function" ? null : {
|
|
2108
2109
|
target: {
|
|
2109
2110
|
id: r,
|
|
2110
|
-
label: n.trim() || s.textContent?.trim() || "
|
|
2111
|
+
label: n.trim() || s.textContent?.trim() || "",
|
|
2111
2112
|
container: i,
|
|
2112
2113
|
createRange() {
|
|
2113
|
-
const
|
|
2114
|
-
return
|
|
2114
|
+
const b = document.createRange();
|
|
2115
|
+
return b.selectNodeContents(s), b;
|
|
2115
2116
|
},
|
|
2116
2117
|
isSelected: () => bt(() => l.call(t) === !0, !1, "isSelected"),
|
|
2117
2118
|
canEliminate: () => bt(() => o.call(t) === !0, !1, "isEliminable"),
|
|
2118
|
-
setEliminated: (
|
|
2119
|
+
setEliminated: (b) => bt(() => f.call(t, b), void 0, "setEliminated")
|
|
2119
2120
|
},
|
|
2120
2121
|
content: s
|
|
2121
2122
|
};
|
|
2122
2123
|
}
|
|
2123
|
-
function
|
|
2124
|
+
function Nr(t, e) {
|
|
2124
2125
|
t.getAttribute(e) !== "true" && t.setAttribute(e, "true");
|
|
2125
2126
|
}
|
|
2126
|
-
function
|
|
2127
|
-
if (!
|
|
2127
|
+
function xs(t) {
|
|
2128
|
+
if (!Gn(t)?.includes("answer-masking")) return [];
|
|
2128
2129
|
const e = t.pieSupportTargets;
|
|
2129
2130
|
if (typeof e != "function")
|
|
2130
|
-
return console.warn(`[AnswerEliminator] <${t.localName}> declares ${
|
|
2131
|
-
const r = bt(() => e.call(t,
|
|
2131
|
+
return console.warn(`[AnswerEliminator] <${t.localName}> declares ${Hr} but has no pieSupportTargets()`), [];
|
|
2132
|
+
const r = bt(() => e.call(t, Hr), [], `<${t.localName}>.pieSupportTargets`);
|
|
2132
2133
|
if (!Array.isArray(r)) return [];
|
|
2133
2134
|
const n = [], i = /* @__PURE__ */ new Set();
|
|
2134
2135
|
for (const s of r) {
|
|
2135
|
-
const l =
|
|
2136
|
+
const l = Ms(s);
|
|
2136
2137
|
if (!l || i.has(l.target.id)) {
|
|
2137
2138
|
console.warn(`[AnswerEliminator] <${t.localName}> supplied a choice that is malformed or repeats an id`, s);
|
|
2138
2139
|
continue;
|
|
2139
2140
|
}
|
|
2140
2141
|
const { target: o, content: f } = l;
|
|
2141
|
-
i.add(o.id),
|
|
2142
|
+
i.add(o.id), Nr(o.container, Ls), Nr(f, Is), n.push({
|
|
2142
2143
|
target: o,
|
|
2143
2144
|
owner: t
|
|
2144
2145
|
});
|
|
2145
2146
|
}
|
|
2146
2147
|
return n;
|
|
2147
2148
|
}
|
|
2148
|
-
var
|
|
2149
|
-
function
|
|
2149
|
+
var Hs = [new Rs(), new oe()];
|
|
2150
|
+
function Ns(t, e) {
|
|
2150
2151
|
return {
|
|
2151
2152
|
id: e.getChoiceId(t),
|
|
2152
2153
|
label: e.getChoiceLabel(t),
|
|
@@ -2157,20 +2158,20 @@ function xs(t, e) {
|
|
|
2157
2158
|
setEliminated: (r) => e.setSelectable(t, !r)
|
|
2158
2159
|
};
|
|
2159
2160
|
}
|
|
2160
|
-
function
|
|
2161
|
+
function Ps(t, e, r) {
|
|
2161
2162
|
const n = [], i = new Set(r.map(({ target: s }) => s.container));
|
|
2162
|
-
for (const s of
|
|
2163
|
+
for (const s of Hs) for (const l of s.findChoices(t))
|
|
2163
2164
|
i.has(l) || (i.add(l), !e.some((o) => o.contains(l)) && n.push({
|
|
2164
|
-
target:
|
|
2165
|
+
target: Ns(l, s),
|
|
2165
2166
|
owner: null
|
|
2166
2167
|
}));
|
|
2167
2168
|
return n;
|
|
2168
2169
|
}
|
|
2169
|
-
function
|
|
2170
|
-
const e =
|
|
2171
|
-
return [...r, ...
|
|
2170
|
+
function Pr(t) {
|
|
2171
|
+
const e = Os(t), r = e.flatMap(xs);
|
|
2172
|
+
return [...r, ...Ps(t, e, r)];
|
|
2172
2173
|
}
|
|
2173
|
-
var
|
|
2174
|
+
var Ke = class P {
|
|
2174
2175
|
constructor() {
|
|
2175
2176
|
u(this, "name", "mask"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map());
|
|
2176
2177
|
}
|
|
@@ -2186,14 +2187,14 @@ var Pe = class K {
|
|
|
2186
2187
|
}
|
|
2187
2188
|
this.injectHighlightCSS(e);
|
|
2188
2189
|
const n = new Highlight(r);
|
|
2189
|
-
CSS.highlights.set(`${
|
|
2190
|
+
CSS.highlights.set(`${P.HIGHLIGHT_NAME_PREFIX}${e}`, n), this.highlights.set(e, n), this.ranges.set(e, r), this.addAriaAttributes(r);
|
|
2190
2191
|
}
|
|
2191
2192
|
remove(e) {
|
|
2192
2193
|
if (!this.isSupported()) {
|
|
2193
2194
|
this.removeFallback(e);
|
|
2194
2195
|
return;
|
|
2195
2196
|
}
|
|
2196
|
-
CSS.highlights.delete(`${
|
|
2197
|
+
CSS.highlights.delete(`${P.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
|
|
2197
2198
|
const r = this.ranges.get(e);
|
|
2198
2199
|
r && this.removeAriaAttributes(r), this.highlights.delete(e), this.ranges.delete(e), this.fallbackContainers.delete(e);
|
|
2199
2200
|
}
|
|
@@ -2211,56 +2212,60 @@ var Pe = class K {
|
|
|
2211
2212
|
return typeof CSS < "u" && "highlights" in CSS;
|
|
2212
2213
|
}
|
|
2213
2214
|
injectHighlightCSS(e) {
|
|
2214
|
-
const r = `${
|
|
2215
|
+
const r = `${P.HIGHLIGHT_STYLE_PREFIX}${e}`;
|
|
2215
2216
|
if (document.getElementById(r)) return;
|
|
2216
2217
|
const n = document.createElement("style");
|
|
2217
2218
|
n.id = r, n.textContent = `
|
|
2218
|
-
::highlight(${
|
|
2219
|
+
::highlight(${P.HIGHLIGHT_NAME_PREFIX}${e}) {
|
|
2219
2220
|
opacity: 0.2;
|
|
2220
2221
|
filter: blur(2px);
|
|
2221
2222
|
}
|
|
2222
2223
|
`, document.head.appendChild(n);
|
|
2223
2224
|
}
|
|
2224
2225
|
removeHighlightCSS(e) {
|
|
2225
|
-
document.getElementById(`${
|
|
2226
|
+
document.getElementById(`${P.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
|
|
2226
2227
|
}
|
|
2227
2228
|
addAriaAttributes(e) {
|
|
2228
2229
|
const r = this.findChoiceContainer(e);
|
|
2229
|
-
r && (r.setAttribute(
|
|
2230
|
+
r && (r.setAttribute(P.ELIMINATED_ATTR, "true"), r.setAttribute("aria-hidden", "true"));
|
|
2230
2231
|
}
|
|
2231
2232
|
removeAriaAttributes(e) {
|
|
2232
2233
|
const r = this.findChoiceContainer(e);
|
|
2233
|
-
r && (r.removeAttribute(
|
|
2234
|
+
r && (r.removeAttribute(P.ELIMINATED_ATTR), r.removeAttribute("aria-hidden"));
|
|
2234
2235
|
}
|
|
2235
2236
|
findChoiceContainer(e) {
|
|
2236
2237
|
let r = e.startContainer;
|
|
2237
2238
|
for (r.nodeType === Node.TEXT_NODE && (r = r.parentElement); r && r !== document.body; ) {
|
|
2238
|
-
if (r.getAttribute(
|
|
2239
|
+
if (r.getAttribute(P.CHOICE_HOOK_ATTR) === "true") return r;
|
|
2239
2240
|
r = r.parentElement;
|
|
2240
2241
|
}
|
|
2241
2242
|
return null;
|
|
2242
2243
|
}
|
|
2243
2244
|
applyFallback(e, r) {
|
|
2244
2245
|
const n = this.findChoiceContainer(r);
|
|
2245
|
-
n && (n.classList.add(
|
|
2246
|
+
n && (n.classList.add(P.FALLBACK_CLASS), n.setAttribute(P.ELIMINATED_ATTR, "true"), n.setAttribute(P.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(r));
|
|
2246
2247
|
}
|
|
2247
2248
|
removeFallback(e) {
|
|
2248
2249
|
const r = this.fallbackContainers.get(e);
|
|
2249
2250
|
if (!r) return;
|
|
2250
|
-
r.classList.remove(
|
|
2251
|
+
r.classList.remove(P.FALLBACK_CLASS), r.removeAttribute(P.ELIMINATED_ATTR), r.removeAttribute(P.ELIMINATED_ID_ATTR);
|
|
2251
2252
|
const n = document.createRange();
|
|
2252
2253
|
n.selectNodeContents(r), this.removeAriaAttributes(n), this.fallbackContainers.delete(e);
|
|
2253
2254
|
}
|
|
2254
2255
|
};
|
|
2255
|
-
u(
|
|
2256
|
-
u(
|
|
2257
|
-
u(
|
|
2258
|
-
u(
|
|
2259
|
-
u(
|
|
2260
|
-
u(
|
|
2261
|
-
var
|
|
2256
|
+
u(Ke, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-mask-highlight-");
|
|
2257
|
+
u(Ke, "HIGHLIGHT_NAME_PREFIX", "pie-answer-masked-");
|
|
2258
|
+
u(Ke, "FALLBACK_CLASS", "pie-answer-masked-fallback");
|
|
2259
|
+
u(Ke, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
2260
|
+
u(Ke, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
|
|
2261
|
+
u(Ke, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
2262
|
+
var L = class w {
|
|
2262
2263
|
constructor() {
|
|
2263
|
-
u(this, "name", "strikethrough"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map()), u(this, "imageWrappers", /* @__PURE__ */ new Map()), u(this, "mathTargets", /* @__PURE__ */ new Map())
|
|
2264
|
+
u(this, "name", "strikethrough"), u(this, "highlights", /* @__PURE__ */ new Map()), u(this, "ranges", /* @__PURE__ */ new Map()), u(this, "fallbackContainers", /* @__PURE__ */ new Map()), u(this, "imageWrappers", /* @__PURE__ */ new Map()), u(this, "mathTargets", /* @__PURE__ */ new Map()), u(this, "chrome", {
|
|
2265
|
+
eliminatedText: "(eliminated)",
|
|
2266
|
+
stamp: () => {
|
|
2267
|
+
}
|
|
2268
|
+
});
|
|
2264
2269
|
}
|
|
2265
2270
|
initialize() {
|
|
2266
2271
|
this.isSupported() || console.warn("CSS Custom Highlight API not supported, using fallback");
|
|
@@ -2268,11 +2273,22 @@ var R = class b {
|
|
|
2268
2273
|
destroy() {
|
|
2269
2274
|
this.clearAll();
|
|
2270
2275
|
}
|
|
2276
|
+
setChrome(e) {
|
|
2277
|
+
this.chrome = e;
|
|
2278
|
+
const r = [...Array.from(this.ranges.values(), (n) => this.findChoiceContainer(n)), ...this.fallbackContainers.values()];
|
|
2279
|
+
for (const n of r) {
|
|
2280
|
+
const i = n?.querySelector(`.${w.SR_CLASS}`);
|
|
2281
|
+
i && this.labelAnnouncement(i);
|
|
2282
|
+
}
|
|
2283
|
+
}
|
|
2284
|
+
labelAnnouncement(e) {
|
|
2285
|
+
e.textContent = ` ${this.chrome.eliminatedText}`, this.chrome.stamp(e);
|
|
2286
|
+
}
|
|
2271
2287
|
apply(e, r) {
|
|
2272
2288
|
if (this.isSupported()) {
|
|
2273
2289
|
this.injectHighlightCSS(e);
|
|
2274
2290
|
const n = new Highlight(r);
|
|
2275
|
-
CSS.highlights.set(`${
|
|
2291
|
+
CSS.highlights.set(`${w.HIGHLIGHT_NAME_PREFIX}${e}`, n), this.highlights.set(e, n), this.ranges.set(e, r), this.addAriaAttributes(r);
|
|
2276
2292
|
} else this.applyFallback(e, r);
|
|
2277
2293
|
this.strikeImages(e, r), this.strikeMath(e, r);
|
|
2278
2294
|
}
|
|
@@ -2281,7 +2297,7 @@ var R = class b {
|
|
|
2281
2297
|
this.removeFallback(e);
|
|
2282
2298
|
return;
|
|
2283
2299
|
}
|
|
2284
|
-
CSS.highlights.delete(`${
|
|
2300
|
+
CSS.highlights.delete(`${w.HIGHLIGHT_NAME_PREFIX}${e}`), this.removeHighlightCSS(e);
|
|
2285
2301
|
const r = this.ranges.get(e);
|
|
2286
2302
|
r && this.removeAriaAttributes(r), this.highlights.delete(e), this.ranges.delete(e), this.fallbackContainers.delete(e);
|
|
2287
2303
|
}
|
|
@@ -2305,11 +2321,11 @@ var R = class b {
|
|
|
2305
2321
|
return typeof CSS < "u" && "highlights" in CSS;
|
|
2306
2322
|
}
|
|
2307
2323
|
injectHighlightCSS(e) {
|
|
2308
|
-
const r = `${
|
|
2324
|
+
const r = `${w.HIGHLIGHT_STYLE_PREFIX}${e}`;
|
|
2309
2325
|
if (document.getElementById(r)) return;
|
|
2310
2326
|
const n = document.createElement("style");
|
|
2311
2327
|
n.id = r, n.textContent = `
|
|
2312
|
-
::highlight(${
|
|
2328
|
+
::highlight(${w.HIGHLIGHT_NAME_PREFIX}${e}) {
|
|
2313
2329
|
text-decoration: line-through;
|
|
2314
2330
|
text-decoration-thickness: 2px;
|
|
2315
2331
|
text-decoration-color: var(--pie-answer-eliminator-strike-color, var(--pie-incorrect, #ff9800));
|
|
@@ -2317,38 +2333,38 @@ var R = class b {
|
|
|
2317
2333
|
`, document.head.appendChild(n);
|
|
2318
2334
|
}
|
|
2319
2335
|
removeHighlightCSS(e) {
|
|
2320
|
-
document.getElementById(`${
|
|
2336
|
+
document.getElementById(`${w.HIGHLIGHT_STYLE_PREFIX}${e}`)?.remove();
|
|
2321
2337
|
}
|
|
2322
2338
|
addAriaAttributes(e) {
|
|
2323
2339
|
const r = this.findChoiceContainer(e);
|
|
2324
2340
|
if (!r) return;
|
|
2325
|
-
r.setAttribute(
|
|
2341
|
+
r.setAttribute(w.ELIMINATED_ATTR, "true"), r.setAttribute("aria-disabled", "true");
|
|
2326
2342
|
const n = this.resolveLabelElement(r);
|
|
2327
|
-
if (n && !n.querySelector(`.${
|
|
2343
|
+
if (n && !n.querySelector(`.${w.SR_CLASS}`)) {
|
|
2328
2344
|
const i = document.createElement("span");
|
|
2329
|
-
i.className =
|
|
2345
|
+
i.className = w.SR_CLASS, this.labelAnnouncement(i), n.appendChild(i);
|
|
2330
2346
|
}
|
|
2331
2347
|
}
|
|
2332
2348
|
removeAriaAttributes(e) {
|
|
2333
2349
|
const r = this.findChoiceContainer(e);
|
|
2334
|
-
r && (r.removeAttribute(
|
|
2350
|
+
r && (r.removeAttribute(w.ELIMINATED_ATTR), r.removeAttribute("aria-disabled"), r.querySelector(`.${w.SR_CLASS}`)?.remove());
|
|
2335
2351
|
}
|
|
2336
2352
|
findChoiceContainer(e) {
|
|
2337
2353
|
let r = e.startContainer;
|
|
2338
2354
|
for (r.nodeType === Node.TEXT_NODE && (r = r.parentElement); r && r !== document.body; ) {
|
|
2339
|
-
if (r.getAttribute(
|
|
2355
|
+
if (r.getAttribute(w.CHOICE_HOOK_ATTR) === "true") return r;
|
|
2340
2356
|
r = r.parentElement;
|
|
2341
2357
|
}
|
|
2342
2358
|
return null;
|
|
2343
2359
|
}
|
|
2344
2360
|
applyFallback(e, r) {
|
|
2345
2361
|
const n = this.findChoiceContainer(r);
|
|
2346
|
-
n && (n.classList.add(
|
|
2362
|
+
n && (n.classList.add(w.FALLBACK_CLASS), n.setAttribute(w.ELIMINATED_ATTR, "true"), n.setAttribute(w.ELIMINATED_ID_ATTR, e), this.fallbackContainers.set(e, n), this.addAriaAttributes(r));
|
|
2347
2363
|
}
|
|
2348
2364
|
removeFallback(e) {
|
|
2349
2365
|
const r = this.fallbackContainers.get(e);
|
|
2350
2366
|
if (!r) return;
|
|
2351
|
-
r.classList.remove(
|
|
2367
|
+
r.classList.remove(w.FALLBACK_CLASS), r.removeAttribute(w.ELIMINATED_ATTR), r.removeAttribute(w.ELIMINATED_ID_ATTR);
|
|
2352
2368
|
const n = document.createRange();
|
|
2353
2369
|
n.selectNodeContents(r), this.removeAriaAttributes(n), this.fallbackContainers.delete(e);
|
|
2354
2370
|
}
|
|
@@ -2373,9 +2389,9 @@ var R = class b {
|
|
|
2373
2389
|
const n = this.resolveImageScope(r);
|
|
2374
2390
|
if (!n) return;
|
|
2375
2391
|
const i = [];
|
|
2376
|
-
for (const s of n.querySelectorAll(
|
|
2377
|
-
const l = s.querySelector(
|
|
2378
|
-
l.classList.add(
|
|
2392
|
+
for (const s of n.querySelectorAll(w.MATH_SELECTOR)) {
|
|
2393
|
+
const l = s.querySelector(w.MATH_BOX_SELECTOR) ?? s, o = !!l.querySelector(w.MATH_STACKED_SELECTOR);
|
|
2394
|
+
l.classList.add(w.MATH_STRIKE_CLASS, o ? w.MATH_STRIKE_CROSS_CLASS : w.MATH_STRIKE_LINE_CLASS), l.setAttribute(w.MATH_STRIKE_ATTR, o ? "cross" : "line"), i.push(l);
|
|
2379
2395
|
}
|
|
2380
2396
|
i.length > 0 && this.mathTargets.set(e, i);
|
|
2381
2397
|
}
|
|
@@ -2383,7 +2399,7 @@ var R = class b {
|
|
|
2383
2399
|
const r = this.mathTargets.get(e);
|
|
2384
2400
|
if (r) {
|
|
2385
2401
|
for (const n of r)
|
|
2386
|
-
n.classList.remove(
|
|
2402
|
+
n.classList.remove(w.MATH_STRIKE_CLASS, w.MATH_STRIKE_LINE_CLASS, w.MATH_STRIKE_CROSS_CLASS), n.removeAttribute(w.MATH_STRIKE_ATTR);
|
|
2387
2403
|
this.mathTargets.delete(e);
|
|
2388
2404
|
}
|
|
2389
2405
|
}
|
|
@@ -2394,16 +2410,16 @@ var R = class b {
|
|
|
2394
2410
|
wrapImage(e) {
|
|
2395
2411
|
const r = e.parentElement;
|
|
2396
2412
|
if (!r) return null;
|
|
2397
|
-
if (r.classList.contains(
|
|
2413
|
+
if (r.classList.contains(w.IMAGE_WRAPPER_CLASS) || r.hasAttribute(w.IMAGE_WRAPPER_ATTR)) return r;
|
|
2398
2414
|
const n = document.createElement("span");
|
|
2399
|
-
return n.className =
|
|
2415
|
+
return n.className = w.IMAGE_WRAPPER_CLASS, n.setAttribute(w.IMAGE_WRAPPER_ATTR, "true"), this.fillsParentWidth(e, r) ? n.style.display = "block" : w.BLOCK_DISPLAYS.has(getComputedStyle(e).display) && (n.style.display = "block", n.style.width = "fit-content"), r.insertBefore(n, e), n.appendChild(e), n.appendChild(this.createImageStrikeOverlay()), n;
|
|
2400
2416
|
}
|
|
2401
2417
|
fillsParentWidth(e, r) {
|
|
2402
2418
|
const n = e.getBoundingClientRect().width, i = r.clientWidth;
|
|
2403
2419
|
return n === 0 || i === 0 ? !1 : n >= i - 1;
|
|
2404
2420
|
}
|
|
2405
2421
|
unwrapImage(e) {
|
|
2406
|
-
e.querySelector(`.${
|
|
2422
|
+
e.querySelector(`.${w.IMAGE_OVERLAY_CLASS}`)?.remove();
|
|
2407
2423
|
const r = e.parentElement;
|
|
2408
2424
|
if (r) {
|
|
2409
2425
|
for (; e.firstChild; ) r.insertBefore(e.firstChild, e);
|
|
@@ -2411,8 +2427,8 @@ var R = class b {
|
|
|
2411
2427
|
}
|
|
2412
2428
|
}
|
|
2413
2429
|
createImageStrikeOverlay() {
|
|
2414
|
-
const e = document.createElementNS(
|
|
2415
|
-
e.setAttribute("class",
|
|
2430
|
+
const e = document.createElementNS(w.SVG_NS, "svg");
|
|
2431
|
+
e.setAttribute("class", w.IMAGE_OVERLAY_CLASS), e.setAttribute("viewBox", "0 0 100 100"), e.setAttribute("preserveAspectRatio", "none"), e.setAttribute("aria-hidden", "true"), e.setAttribute("focusable", "false");
|
|
2416
2432
|
const r = [{
|
|
2417
2433
|
x1: "0",
|
|
2418
2434
|
y1: "0",
|
|
@@ -2424,38 +2440,38 @@ var R = class b {
|
|
|
2424
2440
|
x2: "100",
|
|
2425
2441
|
y2: "0"
|
|
2426
2442
|
}];
|
|
2427
|
-
for (const n of [
|
|
2428
|
-
const f = document.createElementNS(
|
|
2443
|
+
for (const n of [w.IMAGE_CASING_CLASS, w.IMAGE_LINE_CLASS]) for (const { x1: i, y1: s, x2: l, y2: o } of r) {
|
|
2444
|
+
const f = document.createElementNS(w.SVG_NS, "line");
|
|
2429
2445
|
f.setAttribute("class", n), f.setAttribute("x1", i), f.setAttribute("y1", s), f.setAttribute("x2", l), f.setAttribute("y2", o), f.setAttribute("vector-effect", "non-scaling-stroke"), e.appendChild(f);
|
|
2430
2446
|
}
|
|
2431
2447
|
return e;
|
|
2432
2448
|
}
|
|
2433
2449
|
resolveLabelElement(e) {
|
|
2434
|
-
return e.querySelector(`[${
|
|
2450
|
+
return e.querySelector(`[${w.LABEL_HOOK_ATTR}="true"]`) || e.querySelector("label");
|
|
2435
2451
|
}
|
|
2436
2452
|
};
|
|
2437
|
-
u(
|
|
2438
|
-
u(
|
|
2439
|
-
u(
|
|
2440
|
-
u(
|
|
2441
|
-
u(
|
|
2442
|
-
u(
|
|
2443
|
-
u(
|
|
2444
|
-
u(
|
|
2445
|
-
u(
|
|
2446
|
-
u(
|
|
2447
|
-
u(
|
|
2448
|
-
u(
|
|
2449
|
-
u(
|
|
2450
|
-
u(
|
|
2451
|
-
u(
|
|
2452
|
-
u(
|
|
2453
|
-
u(
|
|
2454
|
-
u(
|
|
2455
|
-
u(
|
|
2456
|
-
u(
|
|
2457
|
-
u(
|
|
2458
|
-
u(
|
|
2453
|
+
u(L, "HIGHLIGHT_STYLE_PREFIX", "pie-answer-eliminator-highlight-");
|
|
2454
|
+
u(L, "HIGHLIGHT_NAME_PREFIX", "pie-answer-eliminated-");
|
|
2455
|
+
u(L, "FALLBACK_CLASS", "pie-answer-eliminator-eliminated-fallback");
|
|
2456
|
+
u(L, "SR_CLASS", "pie-answer-eliminator-sr-announcement");
|
|
2457
|
+
u(L, "CHOICE_HOOK_ATTR", "data-pie-answer-eliminator-choice");
|
|
2458
|
+
u(L, "LABEL_HOOK_ATTR", "data-pie-answer-eliminator-label");
|
|
2459
|
+
u(L, "ELIMINATED_ATTR", "data-pie-answer-eliminated");
|
|
2460
|
+
u(L, "ELIMINATED_ID_ATTR", "data-pie-answer-eliminated-id");
|
|
2461
|
+
u(L, "IMAGE_WRAPPER_CLASS", "pie-answer-eliminator-image-strike");
|
|
2462
|
+
u(L, "IMAGE_WRAPPER_ATTR", "data-pie-answer-eliminator-image-strike");
|
|
2463
|
+
u(L, "IMAGE_OVERLAY_CLASS", "pie-answer-eliminator-image-strike-overlay");
|
|
2464
|
+
u(L, "IMAGE_LINE_CLASS", "pie-answer-eliminator-image-strike-line");
|
|
2465
|
+
u(L, "IMAGE_CASING_CLASS", "pie-answer-eliminator-image-strike-casing");
|
|
2466
|
+
u(L, "MATH_STRIKE_CLASS", "pie-answer-eliminator-math-strike");
|
|
2467
|
+
u(L, "MATH_STRIKE_LINE_CLASS", "pie-answer-eliminator-math-strike--line");
|
|
2468
|
+
u(L, "MATH_STRIKE_CROSS_CLASS", "pie-answer-eliminator-math-strike--cross");
|
|
2469
|
+
u(L, "MATH_STRIKE_ATTR", "data-pie-answer-eliminator-math-strike");
|
|
2470
|
+
u(L, "MATH_STACKED_SELECTOR", "mjx-mfrac, mjx-mtable");
|
|
2471
|
+
u(L, "MATH_BOX_SELECTOR", "mjx-math");
|
|
2472
|
+
u(L, "MATH_SELECTOR", "mjx-container");
|
|
2473
|
+
u(L, "SVG_NS", "http://www.w3.org/2000/svg");
|
|
2474
|
+
u(L, "BLOCK_DISPLAYS", /* @__PURE__ */ new Set([
|
|
2459
2475
|
"block",
|
|
2460
2476
|
"flex",
|
|
2461
2477
|
"grid",
|
|
@@ -2463,18 +2479,45 @@ u(R, "BLOCK_DISPLAYS", /* @__PURE__ */ new Set([
|
|
|
2463
2479
|
"flow-root",
|
|
2464
2480
|
"list-item"
|
|
2465
2481
|
]));
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2482
|
+
function Ks(t) {
|
|
2483
|
+
switch (t) {
|
|
2484
|
+
case "start":
|
|
2485
|
+
case "left":
|
|
2486
|
+
return "start";
|
|
2487
|
+
case "end":
|
|
2488
|
+
case "right":
|
|
2489
|
+
return "end";
|
|
2490
|
+
default:
|
|
2491
|
+
return "inline";
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
var Kr = "answerEliminator", _r = class wt {
|
|
2495
|
+
constructor(e = "strikethrough", r = "inline") {
|
|
2496
|
+
u(this, "strategy", void 0), u(this, "choices", /* @__PURE__ */ new Map()), u(this, "eliminated", /* @__PURE__ */ new Set()), u(this, "strategyKeys", /* @__PURE__ */ new Map()), u(this, "anonymousGroups", /* @__PURE__ */ new WeakMap()), u(this, "nextToken", 0), u(this, "buttonAlignment", "inline"), u(this, "i18n", zt(null)), u(this, "shouldRestoreState", !0), u(this, "active", !0), u(this, "questionRoot", null), u(this, "selectionChangeHandler", null), u(this, "selectionObserver", null), u(this, "selectionRefreshFrame", null), u(this, "focusedKey", null), u(this, "store", null), u(this, "elementStateKeys", {}), this.strategy = this.createStrategy(e), this.strategy.initialize(), this.applyStrategyChrome(), this.buttonAlignment = Ks(r);
|
|
2497
|
+
}
|
|
2498
|
+
setInterfaceI18n(e) {
|
|
2499
|
+
this.i18n = e ?? zt(null);
|
|
2500
|
+
for (const r of this.choices.values()) r.button && this.labelToggle(r.button, r);
|
|
2501
|
+
this.applyStrategyChrome();
|
|
2502
|
+
}
|
|
2503
|
+
applyStrategyChrome() {
|
|
2504
|
+
this.strategy.setChrome?.({
|
|
2505
|
+
eliminatedText: this.i18n.t("tools.answerEliminator.eliminatedA11y"),
|
|
2506
|
+
stamp: (e) => pr(e, this.i18n)
|
|
2507
|
+
});
|
|
2508
|
+
}
|
|
2509
|
+
labelToggle(e, r) {
|
|
2510
|
+
const n = r.target.label || this.i18n.t("tools.answerEliminator.unlabeledChoice");
|
|
2511
|
+
e.setAttribute("aria-label", this.i18n.t("tools.answerEliminator.toggleA11y", { choice: n })), pr(e, this.i18n);
|
|
2469
2512
|
}
|
|
2470
2513
|
createStrategy(e) {
|
|
2471
|
-
return e === "mask" ? new
|
|
2514
|
+
return e === "mask" ? new Ke() : new L();
|
|
2472
2515
|
}
|
|
2473
2516
|
initializeForQuestion(e) {
|
|
2474
2517
|
this.active = !0;
|
|
2475
2518
|
const r = new Set(this.eliminated);
|
|
2476
2519
|
this.restoreAllSelectable(), this.strategy.clearAll(), this.eliminated.clear(), this.cleanupButtons();
|
|
2477
|
-
for (const i of
|
|
2520
|
+
for (const i of Pr(e)) this.initializeChoice(i, e);
|
|
2478
2521
|
const n = this.readPersistedEliminations();
|
|
2479
2522
|
for (const [i, s] of this.choices) (n.has(s.group) ? n.get(s.group)?.has(s.choiceId) : r.has(i)) && this.applyElimination(i, s);
|
|
2480
2523
|
this.attachSelectionListener(e);
|
|
@@ -2506,25 +2549,25 @@ var Nr = "answerEliminator", dr = class wt {
|
|
|
2506
2549
|
button: null
|
|
2507
2550
|
};
|
|
2508
2551
|
this.choices.set(o, f);
|
|
2509
|
-
const
|
|
2510
|
-
f.button =
|
|
2552
|
+
const b = this.createToggleButton(o, f, this.alignmentFor(n.container));
|
|
2553
|
+
f.button = b, this.updateButtonVisibility(o), n.container.style.position = "relative", n.container.appendChild(b);
|
|
2511
2554
|
}
|
|
2512
2555
|
alignmentFor(e) {
|
|
2513
2556
|
return this.buttonAlignment === "inline" || getComputedStyle(e).display === "inline" ? "inline" : this.buttonAlignment;
|
|
2514
2557
|
}
|
|
2515
2558
|
createToggleButton(e, r, n) {
|
|
2516
|
-
const i =
|
|
2517
|
-
|
|
2518
|
-
const
|
|
2519
|
-
return
|
|
2520
|
-
|
|
2521
|
-
}),
|
|
2559
|
+
const i = document.createElement("button");
|
|
2560
|
+
i.type = "button", i.className = wt.TOGGLE_CLASS, this.labelToggle(i, r), i.setAttribute("aria-pressed", "false"), i.setAttribute("data-choice-id", r.choiceId);
|
|
2561
|
+
const s = document.createElement("span");
|
|
2562
|
+
return s.setAttribute("aria-hidden", "true"), s.textContent = "⊗", i.appendChild(s), this.applyButtonAlignment(i, n, r.target.container), i.dataset.pieShownDisplay = i.style.display, i.addEventListener("click", (l) => {
|
|
2563
|
+
l.preventDefault(), l.stopPropagation(), this.toggleElimination(e);
|
|
2564
|
+
}), i.addEventListener("focus", () => {
|
|
2522
2565
|
this.focusedKey = e;
|
|
2523
|
-
}),
|
|
2566
|
+
}), i.addEventListener("blur", () => {
|
|
2524
2567
|
queueMicrotask(() => {
|
|
2525
|
-
|
|
2568
|
+
i.isConnected && this.focusedKey === e && (this.focusedKey = null);
|
|
2526
2569
|
});
|
|
2527
|
-
}),
|
|
2570
|
+
}), i;
|
|
2528
2571
|
}
|
|
2529
2572
|
toggleElimination(e) {
|
|
2530
2573
|
const r = this.choices.get(e);
|
|
@@ -2574,7 +2617,7 @@ var Nr = "answerEliminator", dr = class wt {
|
|
|
2574
2617
|
const i = this.choices.get(n);
|
|
2575
2618
|
i?.group === e && r.push(i.choiceId);
|
|
2576
2619
|
}
|
|
2577
|
-
this.store.setState(this.elementStateKeys[e],
|
|
2620
|
+
this.store.setState(this.elementStateKeys[e], Kr, { eliminatedChoices: r });
|
|
2578
2621
|
}
|
|
2579
2622
|
readPersistedEliminations() {
|
|
2580
2623
|
const e = /* @__PURE__ */ new Map();
|
|
@@ -2582,7 +2625,7 @@ var Nr = "answerEliminator", dr = class wt {
|
|
|
2582
2625
|
for (const { group: r } of this.choices.values())
|
|
2583
2626
|
if (!(e.has(r) || !Object.hasOwn(this.elementStateKeys, r)))
|
|
2584
2627
|
try {
|
|
2585
|
-
const n = this.store.getState(this.elementStateKeys[r],
|
|
2628
|
+
const n = this.store.getState(this.elementStateKeys[r], Kr), i = Array.isArray(n?.eliminatedChoices) ? n.eliminatedChoices.filter((s) => typeof s == "string") : [];
|
|
2586
2629
|
e.set(r, new Set(i));
|
|
2587
2630
|
} catch (n) {
|
|
2588
2631
|
console.error("Failed to restore eliminator state:", n);
|
|
@@ -2617,7 +2660,7 @@ var Nr = "answerEliminator", dr = class wt {
|
|
|
2617
2660
|
this.strategy.clearAll(), this.eliminated.clear();
|
|
2618
2661
|
for (const { button: s } of n.values()) s?.remove();
|
|
2619
2662
|
this.choices = /* @__PURE__ */ new Map();
|
|
2620
|
-
for (const s of
|
|
2663
|
+
for (const s of Pr(e)) this.initializeChoice(s, e);
|
|
2621
2664
|
for (const s of i) {
|
|
2622
2665
|
const l = n.get(s), o = this.choices.get(s), f = !!l?.owner && o?.owner === l.owner;
|
|
2623
2666
|
o && this.applyElimination(s, o, !f) || (o ?? l)?.target.setEliminated(!1);
|
|
@@ -2648,24 +2691,19 @@ var Nr = "answerEliminator", dr = class wt {
|
|
|
2648
2691
|
for (const { button: e } of this.choices.values()) e?.remove();
|
|
2649
2692
|
this.choices.clear();
|
|
2650
2693
|
}
|
|
2651
|
-
applyButtonAlignment(e, r) {
|
|
2694
|
+
applyButtonAlignment(e, r, n) {
|
|
2652
2695
|
switch (r) {
|
|
2653
|
-
case "
|
|
2696
|
+
case "start":
|
|
2697
|
+
case "end": {
|
|
2698
|
+
const i = getComputedStyle(n).direction === "rtl", s = r === "end" === i ? "left" : "right";
|
|
2654
2699
|
Object.assign(e.style, {
|
|
2655
2700
|
position: "absolute",
|
|
2656
|
-
|
|
2657
|
-
top: "50%",
|
|
2658
|
-
transform: "translateY(-50%)"
|
|
2659
|
-
});
|
|
2660
|
-
break;
|
|
2661
|
-
case "left":
|
|
2662
|
-
Object.assign(e.style, {
|
|
2663
|
-
position: "absolute",
|
|
2664
|
-
left: "8px",
|
|
2701
|
+
[s]: "8px",
|
|
2665
2702
|
top: "50%",
|
|
2666
2703
|
transform: "translateY(-50%)"
|
|
2667
2704
|
});
|
|
2668
2705
|
break;
|
|
2706
|
+
}
|
|
2669
2707
|
case "inline":
|
|
2670
2708
|
Object.assign(e.style, {
|
|
2671
2709
|
position: "relative",
|
|
@@ -2689,100 +2727,104 @@ var Nr = "answerEliminator", dr = class wt {
|
|
|
2689
2727
|
this.restoreAllSelectable(), this.eliminated.clear(), this.cleanupButtons(), this.strategy.destroy();
|
|
2690
2728
|
}
|
|
2691
2729
|
};
|
|
2692
|
-
u(
|
|
2693
|
-
u(
|
|
2694
|
-
var
|
|
2695
|
-
function
|
|
2696
|
-
|
|
2697
|
-
let r = Xe(e, "visible", 7, !1), n = Xe(e, "strategy", 7, "strikethrough"), i = Xe(e, "alwaysOn", 7, !1), s = Xe(e, "buttonAlignment", 7, "
|
|
2698
|
-
const v = /* @__PURE__ */
|
|
2699
|
-
let c = /* @__PURE__ */
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2730
|
+
u(_r, "TOGGLE_CLASS", "pie-answer-eliminator-toggle");
|
|
2731
|
+
u(_r, "TOGGLE_ACTIVE_CLASS", "pie-answer-eliminator-toggle--active");
|
|
2732
|
+
var Bs = /* @__PURE__ */ as('<div style="display: none;" aria-hidden="true"></div>');
|
|
2733
|
+
function Fs(t, e) {
|
|
2734
|
+
Xr(e, !0);
|
|
2735
|
+
let r = Xe(e, "visible", 7, !1), n = Xe(e, "strategy", 7, "strikethrough"), i = Xe(e, "alwaysOn", 7, !1), s = Xe(e, "buttonAlignment", 7, "inline"), l = Xe(e, "elementStateKeys", 23, () => ({})), o = /* @__PURE__ */ W(null), f = /* @__PURE__ */ W(null), b = /* @__PURE__ */ W(null);
|
|
2736
|
+
const v = /* @__PURE__ */ Gt(() => S(f)?.elementToolStateStore ?? null);
|
|
2737
|
+
let c = /* @__PURE__ */ W(null);
|
|
2738
|
+
const d = /* @__PURE__ */ Gt(() => zt(S(f)));
|
|
2739
|
+
let h = /* @__PURE__ */ W(null), _ = /* @__PURE__ */ Gt(() => i() || r());
|
|
2740
|
+
me(() => {
|
|
2741
|
+
if (S(o))
|
|
2742
|
+
return Wn(S(o), (m) => {
|
|
2743
|
+
N(f, m, !0);
|
|
2704
2744
|
});
|
|
2705
|
-
}),
|
|
2706
|
-
if (
|
|
2707
|
-
return
|
|
2708
|
-
|
|
2745
|
+
}), me(() => {
|
|
2746
|
+
if (S(o))
|
|
2747
|
+
return jn(S(o), (m) => {
|
|
2748
|
+
N(b, m, !0);
|
|
2709
2749
|
});
|
|
2710
2750
|
});
|
|
2711
|
-
function
|
|
2712
|
-
return
|
|
2751
|
+
function y() {
|
|
2752
|
+
return S(b)?.scopeElement || null;
|
|
2713
2753
|
}
|
|
2714
|
-
function
|
|
2715
|
-
if (!
|
|
2716
|
-
const
|
|
2717
|
-
if (!
|
|
2754
|
+
function k() {
|
|
2755
|
+
if (!S(_) || !S(c)) return;
|
|
2756
|
+
const m = y();
|
|
2757
|
+
if (!m) {
|
|
2718
2758
|
console.warn("[AnswerEliminator] Missing shell scope context for question root");
|
|
2719
2759
|
return;
|
|
2720
2760
|
}
|
|
2721
|
-
|
|
2761
|
+
S(c).initializeForQuestion(m);
|
|
2722
2762
|
}
|
|
2723
|
-
function
|
|
2763
|
+
function I() {
|
|
2724
2764
|
requestAnimationFrame(() => {
|
|
2725
2765
|
requestAnimationFrame(() => {
|
|
2726
|
-
|
|
2766
|
+
k();
|
|
2727
2767
|
});
|
|
2728
2768
|
});
|
|
2729
2769
|
}
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
}),
|
|
2733
|
-
|
|
2770
|
+
me(() => {
|
|
2771
|
+
S(c)?.setInterfaceI18n(S(d));
|
|
2772
|
+
}), me(() => {
|
|
2773
|
+
S(c)?.setStoreIntegration(S(v), l() ?? {});
|
|
2774
|
+
}), me(() => {
|
|
2775
|
+
const m = new _r(n(), s());
|
|
2734
2776
|
return Ft(() => {
|
|
2735
|
-
|
|
2777
|
+
m.setStoreIntegration(S(v), l() ?? {}), m.setInterfaceI18n(S(d)), N(c, m, !0), S(_) ? k() : m.cleanup();
|
|
2736
2778
|
}), () => {
|
|
2737
|
-
|
|
2779
|
+
m.destroy(), S(c) === m && N(c, null);
|
|
2738
2780
|
};
|
|
2739
|
-
}),
|
|
2740
|
-
const
|
|
2741
|
-
if (
|
|
2742
|
-
if (
|
|
2743
|
-
|
|
2781
|
+
}), me(() => {
|
|
2782
|
+
const m = S(b)?.contextVersion ?? null;
|
|
2783
|
+
if (m !== null) {
|
|
2784
|
+
if (S(h) === null) {
|
|
2785
|
+
N(h, m, !0);
|
|
2744
2786
|
return;
|
|
2745
2787
|
}
|
|
2746
|
-
|
|
2788
|
+
m !== S(h) && (N(h, m, !0), I());
|
|
2747
2789
|
}
|
|
2748
|
-
}),
|
|
2749
|
-
|
|
2790
|
+
}), me(() => {
|
|
2791
|
+
S(c) && (S(_) ? (S(c).enableStateRestoration(), k()) : S(c).cleanup());
|
|
2750
2792
|
});
|
|
2751
|
-
var
|
|
2793
|
+
var H = {
|
|
2752
2794
|
get visible() {
|
|
2753
2795
|
return r();
|
|
2754
2796
|
},
|
|
2755
|
-
set visible(
|
|
2756
|
-
r(
|
|
2797
|
+
set visible(m = !1) {
|
|
2798
|
+
r(m), we();
|
|
2757
2799
|
},
|
|
2758
2800
|
get strategy() {
|
|
2759
2801
|
return n();
|
|
2760
2802
|
},
|
|
2761
|
-
set strategy(
|
|
2762
|
-
n(
|
|
2803
|
+
set strategy(m = "strikethrough") {
|
|
2804
|
+
n(m), we();
|
|
2763
2805
|
},
|
|
2764
2806
|
get alwaysOn() {
|
|
2765
2807
|
return i();
|
|
2766
2808
|
},
|
|
2767
|
-
set alwaysOn(
|
|
2768
|
-
i(
|
|
2809
|
+
set alwaysOn(m = !1) {
|
|
2810
|
+
i(m), we();
|
|
2769
2811
|
},
|
|
2770
2812
|
get buttonAlignment() {
|
|
2771
2813
|
return s();
|
|
2772
2814
|
},
|
|
2773
|
-
set buttonAlignment(
|
|
2774
|
-
s(
|
|
2815
|
+
set buttonAlignment(m = "inline") {
|
|
2816
|
+
s(m), we();
|
|
2775
2817
|
},
|
|
2776
2818
|
get elementStateKeys() {
|
|
2777
2819
|
return l();
|
|
2778
2820
|
},
|
|
2779
|
-
set elementStateKeys(
|
|
2780
|
-
l(
|
|
2821
|
+
set elementStateKeys(m = {}) {
|
|
2822
|
+
l(m), we();
|
|
2781
2823
|
}
|
|
2782
|
-
},
|
|
2783
|
-
return
|
|
2824
|
+
}, ne = Bs();
|
|
2825
|
+
return ws(ne, (m) => N(o, m), () => S(o)), Ln(t, ne), Ur(H);
|
|
2784
2826
|
}
|
|
2785
|
-
|
|
2827
|
+
Gs("pie-tool-answer-eliminator", $s(Fs, {
|
|
2786
2828
|
visible: {
|
|
2787
2829
|
attribute: "visible",
|
|
2788
2830
|
type: "Boolean"
|
|
@@ -2800,10 +2842,10 @@ Ks("pie-tool-answer-eliminator", Es(Ps, {
|
|
|
2800
2842
|
type: "String"
|
|
2801
2843
|
},
|
|
2802
2844
|
elementStateKeys: { type: "Object" }
|
|
2803
|
-
}, [], [], { mode: "open" },
|
|
2804
|
-
function
|
|
2845
|
+
}, [], [], { mode: "open" }, Dn));
|
|
2846
|
+
function Gs(t, e) {
|
|
2805
2847
|
customElements.get(t) || customElements.define(t, e);
|
|
2806
2848
|
}
|
|
2807
2849
|
export {
|
|
2808
|
-
|
|
2850
|
+
Fs as default
|
|
2809
2851
|
};
|