@pie-players/pie-tool-answer-eliminator 0.3.10 → 0.3.12

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