@pie-players/pie-tool-text-to-speech 0.3.0 → 0.3.2

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,36 +1,36 @@
1
1
  var Kr = Object.defineProperty;
2
- var rn = (t) => {
2
+ var ri = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var Xr = (t, e, i) => e in t ? Kr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i;
6
- var T = (t, e, i) => Xr(t, typeof e != "symbol" ? e + "" : e, i), _i = (t, e, i) => e.has(t) || rn("Cannot " + i);
7
- var c = (t, e, i) => (_i(t, e, "read from private field"), i ? i.call(t) : e.get(t)), w = (t, e, i) => e.has(t) ? rn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, i), y = (t, e, i, n) => (_i(t, e, "write to private field"), n ? n.call(t, i) : e.set(t, i), i), F = (t, e, i) => (_i(t, e, "access private method"), i);
8
- var wn;
9
- typeof window < "u" && ((wn = window.__svelte ?? (window.__svelte = {})).v ?? (wn.v = /* @__PURE__ */ new Set())).add("5");
10
- const Jr = 1, Qr = 2, Ni = "[", Vi = "[!", Tn = "]", _t = {}, P = /* @__PURE__ */ Symbol(), kn = "http://www.w3.org/1999/xhtml", bi = !1;
11
- var Zr = Array.isArray, es = Array.prototype.indexOf, bt = Array.prototype.includes, ts = Array.from, Zt = Object.keys, ei = Object.defineProperty, ut = Object.getOwnPropertyDescriptor, is = Object.getOwnPropertyDescriptors, ns = Object.prototype, rs = Array.prototype, In = Object.getPrototypeOf, sn = Object.isExtensible;
5
+ var Xr = (t, e, n) => e in t ? Kr(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
+ var T = (t, e, n) => Xr(t, typeof e != "symbol" ? e + "" : e, n), bn = (t, e, n) => e.has(t) || ri("Cannot " + n);
7
+ var c = (t, e, n) => (bn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), w = (t, e, n) => e.has(t) ? ri("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), y = (t, e, n, i) => (bn(t, e, "write to private field"), i ? i.call(t, n) : e.set(t, n), n), F = (t, e, n) => (bn(t, e, "access private method"), n);
8
+ var wi;
9
+ typeof window < "u" && ((wi = window.__svelte ?? (window.__svelte = {})).v ?? (wi.v = /* @__PURE__ */ new Set())).add("5");
10
+ const Jr = 1, Qr = 2, Vn = "[", Cn = "[!", Ti = "]", _t = {}, P = /* @__PURE__ */ Symbol(), ki = "http://www.w3.org/1999/xhtml", yn = !1;
11
+ var Zr = Array.isArray, es = Array.prototype.indexOf, bt = Array.prototype.includes, ts = Array.from, Zt = Object.keys, en = Object.defineProperty, ut = Object.getOwnPropertyDescriptor, ns = Object.getOwnPropertyDescriptors, is = Object.prototype, rs = Array.prototype, Ii = Object.getPrototypeOf, si = Object.isExtensible;
12
12
  const ss = () => {
13
13
  };
14
14
  function os(t) {
15
15
  for (var e = 0; e < t.length; e++)
16
16
  t[e]();
17
17
  }
18
- function Sn() {
19
- var t, e, i = new Promise((n, r) => {
20
- t = n, e = r;
18
+ function Si() {
19
+ var t, e, n = new Promise((i, r) => {
20
+ t = i, e = r;
21
21
  });
22
- return { promise: i, resolve: t, reject: e };
22
+ return { promise: n, resolve: t, reject: e };
23
23
  }
24
- const N = 2, Lt = 4, ri = 8, xn = 1 << 24, Le = 16, we = 32, He = 64, yi = 128, te = 512, L = 1024, V = 2048, ue = 4096, _e = 8192, ze = 16384, St = 32768, yt = 65536, on = 1 << 17, $n = 1 << 18, nt = 1 << 19, ls = 1 << 20, it = 65536, wi = 1 << 21, Ci = 1 << 22, Ce = 1 << 23, Kt = /* @__PURE__ */ Symbol("$state"), as = /* @__PURE__ */ Symbol("legacy props"), cs = /* @__PURE__ */ Symbol(""), Ue = new class extends Error {
24
+ const N = 2, Lt = 4, sn = 8, xi = 1 << 24, Le = 16, we = 32, He = 64, wn = 128, te = 512, L = 1024, V = 2048, ue = 4096, _e = 8192, Oe = 16384, St = 32768, yt = 65536, oi = 1 << 17, $i = 1 << 18, it = 1 << 19, ls = 1 << 20, nt = 65536, Tn = 1 << 21, Dn = 1 << 22, Ce = 1 << 23, Kt = /* @__PURE__ */ Symbol("$state"), as = /* @__PURE__ */ Symbol("legacy props"), cs = /* @__PURE__ */ Symbol(""), Ue = new class extends Error {
25
25
  constructor() {
26
26
  super(...arguments);
27
27
  T(this, "name", "StaleReactionError");
28
28
  T(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
29
29
  }
30
- }(), En = (
30
+ }(), Ei = (
31
31
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
32
32
  !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
33
- ), jt = 3, si = 8;
33
+ ), jt = 3, on = 8;
34
34
  function us(t) {
35
35
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
36
36
  }
@@ -64,7 +64,7 @@ function bs() {
64
64
  function ys() {
65
65
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
66
66
  }
67
- function oi(t) {
67
+ function ln(t) {
68
68
  console.warn("https://svelte.dev/e/hydration_mismatch");
69
69
  }
70
70
  function ws() {
@@ -75,58 +75,58 @@ function ct(t) {
75
75
  $ = t;
76
76
  }
77
77
  let x;
78
- function ne(t) {
78
+ function ie(t) {
79
79
  if (t === null)
80
- throw oi(), _t;
80
+ throw ln(), _t;
81
81
  return x = t;
82
82
  }
83
- function Di() {
84
- return ne(/* @__PURE__ */ Me(x));
83
+ function jn() {
84
+ return ie(/* @__PURE__ */ Me(x));
85
85
  }
86
86
  function C(t) {
87
87
  if ($) {
88
88
  if (/* @__PURE__ */ Me(x) !== null)
89
- throw oi(), _t;
89
+ throw ln(), _t;
90
90
  x = t;
91
91
  }
92
92
  }
93
- function Ti(t = 1) {
93
+ function kn(t = 1) {
94
94
  if ($) {
95
- for (var e = t, i = x; e--; )
96
- i = /** @type {TemplateNode} */
97
- /* @__PURE__ */ Me(i);
98
- x = i;
95
+ for (var e = t, n = x; e--; )
96
+ n = /** @type {TemplateNode} */
97
+ /* @__PURE__ */ Me(n);
98
+ x = n;
99
99
  }
100
100
  }
101
- function An(t = !0) {
102
- for (var e = 0, i = x; ; ) {
103
- if (i.nodeType === si) {
104
- var n = (
101
+ function Ai(t = !0) {
102
+ for (var e = 0, n = x; ; ) {
103
+ if (n.nodeType === on) {
104
+ var i = (
105
105
  /** @type {Comment} */
106
- i.data
106
+ n.data
107
107
  );
108
- if (n === Tn) {
109
- if (e === 0) return i;
108
+ if (i === Ti) {
109
+ if (e === 0) return n;
110
110
  e -= 1;
111
- } else (n === Ni || n === Vi || // "[1", "[2", etc. for if blocks
112
- n[0] === "[" && !isNaN(Number(n.slice(1)))) && (e += 1);
111
+ } else (i === Vn || i === Cn || // "[1", "[2", etc. for if blocks
112
+ i[0] === "[" && !isNaN(Number(i.slice(1)))) && (e += 1);
113
113
  }
114
114
  var r = (
115
115
  /** @type {TemplateNode} */
116
- /* @__PURE__ */ Me(i)
116
+ /* @__PURE__ */ Me(n)
117
117
  );
118
- t && i.remove(), i = r;
118
+ t && n.remove(), n = r;
119
119
  }
120
120
  }
121
121
  function Ts(t) {
122
- if (!t || t.nodeType !== si)
123
- throw oi(), _t;
122
+ if (!t || t.nodeType !== on)
123
+ throw ln(), _t;
124
124
  return (
125
125
  /** @type {Comment} */
126
126
  t.data
127
127
  );
128
128
  }
129
- function Rn(t) {
129
+ function Ri(t) {
130
130
  return t === this.v;
131
131
  }
132
132
  function ks(t, e) {
@@ -139,7 +139,7 @@ let Ss = !1, X = null;
139
139
  function wt(t) {
140
140
  X = t;
141
141
  }
142
- function zn(t, e = !1, i) {
142
+ function Oi(t, e = !1, n) {
143
143
  X = {
144
144
  p: X,
145
145
  i: !1,
@@ -150,24 +150,24 @@ function zn(t, e = !1, i) {
150
150
  l: null
151
151
  };
152
152
  }
153
- function On(t) {
153
+ function zi(t) {
154
154
  var e = (
155
155
  /** @type {ComponentContext} */
156
156
  X
157
- ), i = e.e;
158
- if (i !== null) {
157
+ ), n = e.e;
158
+ if (n !== null) {
159
159
  e.e = null;
160
- for (var n of i)
161
- Zn(n);
160
+ for (var i of n)
161
+ Zi(i);
162
162
  }
163
163
  return t !== void 0 && (e.x = t), e.i = !0, X = e.p, t ?? /** @type {T} */
164
164
  {};
165
165
  }
166
- function Ln() {
166
+ function Li() {
167
167
  return !0;
168
168
  }
169
169
  let Ye = [];
170
- function Mn() {
170
+ function Mi() {
171
171
  var t = Ye;
172
172
  Ye = [], os(t);
173
173
  }
@@ -175,16 +175,16 @@ function De(t) {
175
175
  if (Ye.length === 0 && !Rt) {
176
176
  var e = Ye;
177
177
  queueMicrotask(() => {
178
- e === Ye && Mn();
178
+ e === Ye && Mi();
179
179
  });
180
180
  }
181
181
  Ye.push(t);
182
182
  }
183
183
  function xs() {
184
184
  for (; Ye.length > 0; )
185
- Mn();
185
+ Mi();
186
186
  }
187
- function Pn(t) {
187
+ function Pi(t) {
188
188
  var e = S;
189
189
  if (e === null)
190
190
  return k.f |= Ce, t;
@@ -194,14 +194,14 @@ function Pn(t) {
194
194
  }
195
195
  function Tt(t, e) {
196
196
  for (; e !== null; ) {
197
- if ((e.f & yi) !== 0) {
197
+ if ((e.f & wn) !== 0) {
198
198
  if ((e.f & St) === 0)
199
199
  throw t;
200
200
  try {
201
201
  e.b.error(t);
202
202
  return;
203
- } catch (i) {
204
- t = i;
203
+ } catch (n) {
204
+ t = n;
205
205
  }
206
206
  }
207
207
  e = e.parent;
@@ -212,24 +212,24 @@ const $s = -7169;
212
212
  function R(t, e) {
213
213
  t.f = t.f & $s | e;
214
214
  }
215
- function ji(t) {
215
+ function Fn(t) {
216
216
  (t.f & te) !== 0 || t.deps === null ? R(t, L) : R(t, ue);
217
217
  }
218
- function Nn(t) {
218
+ function Ni(t) {
219
219
  if (t !== null)
220
220
  for (const e of t)
221
- (e.f & N) === 0 || (e.f & it) === 0 || (e.f ^= it, Nn(
221
+ (e.f & N) === 0 || (e.f & nt) === 0 || (e.f ^= nt, Ni(
222
222
  /** @type {Derived} */
223
223
  e.deps
224
224
  ));
225
225
  }
226
- function Vn(t, e, i) {
227
- (t.f & V) !== 0 ? e.add(t) : (t.f & ue) !== 0 && i.add(t), Nn(t.deps), R(t, L);
226
+ function Vi(t, e, n) {
227
+ (t.f & V) !== 0 ? e.add(t) : (t.f & ue) !== 0 && n.add(t), Ni(t.deps), R(t, L);
228
228
  }
229
229
  const Ut = /* @__PURE__ */ new Set();
230
- let E = null, le = null, H = [], li = null, ki = !1, Rt = !1;
231
- var ft, dt, Xe, pt, Pt, Nt, Je, xe, ht, ye, Ii, Si, Cn;
232
- const Ki = class Ki {
230
+ let E = null, le = null, H = [], an = null, In = !1, Rt = !1;
231
+ var ft, dt, Xe, pt, Pt, Nt, Je, xe, ht, ye, Sn, xn, Ci;
232
+ const Xn = class Xn {
233
233
  constructor() {
234
234
  w(this, ye);
235
235
  T(this, "committed", !1);
@@ -307,13 +307,13 @@ const Ki = class Ki {
307
307
  * @param {Effect} effect
308
308
  */
309
309
  unskip_effect(e) {
310
- var i = c(this, xe).get(e);
311
- if (i) {
310
+ var n = c(this, xe).get(e);
311
+ if (n) {
312
312
  c(this, xe).delete(e);
313
- for (var n of i.d)
314
- R(n, V), ae(n);
315
- for (n of i.m)
316
- R(n, ue), ae(n);
313
+ for (var i of n.d)
314
+ R(i, V), ae(i);
315
+ for (i of n.m)
316
+ R(i, ue), ae(i);
317
317
  }
318
318
  }
319
319
  /**
@@ -322,16 +322,16 @@ const Ki = class Ki {
322
322
  */
323
323
  process(e) {
324
324
  H = [], this.apply();
325
- var i = [], n = [];
325
+ var n = [], i = [];
326
326
  for (const r of e)
327
- F(this, ye, Ii).call(this, r, i, n);
327
+ F(this, ye, Sn).call(this, r, n, i);
328
328
  if (this.is_deferred()) {
329
- F(this, ye, Si).call(this, n), F(this, ye, Si).call(this, i);
329
+ F(this, ye, xn).call(this, i), F(this, ye, xn).call(this, n);
330
330
  for (const [r, s] of c(this, xe))
331
- Bn(r, s);
331
+ Bi(r, s);
332
332
  } else {
333
333
  for (const r of c(this, ft)) r();
334
- c(this, ft).clear(), c(this, Xe) === 0 && F(this, ye, Cn).call(this), E = null, ln(n), ln(i), c(this, Pt)?.resolve();
334
+ c(this, ft).clear(), c(this, Xe) === 0 && F(this, ye, Ci).call(this), E = null, li(i), li(n), c(this, Pt)?.resolve();
335
335
  }
336
336
  le = null;
337
337
  }
@@ -341,8 +341,8 @@ const Ki = class Ki {
341
341
  * @param {Source} source
342
342
  * @param {any} value
343
343
  */
344
- capture(e, i) {
345
- i !== P && !this.previous.has(e) && this.previous.set(e, i), (e.f & Ce) === 0 && (this.current.set(e, e.v), le?.set(e, e.v));
344
+ capture(e, n) {
345
+ n !== P && !this.previous.has(e) && this.previous.set(e, n), (e.f & Ce) === 0 && (this.current.set(e, e.v), le?.set(e, e.v));
346
346
  }
347
347
  activate() {
348
348
  E = this, this.apply();
@@ -352,7 +352,7 @@ const Ki = class Ki {
352
352
  }
353
353
  flush() {
354
354
  if (this.activate(), H.length > 0) {
355
- if (Dn(), E !== null && E !== this)
355
+ if (Di(), E !== null && E !== this)
356
356
  return;
357
357
  } else c(this, Xe) === 0 && this.process([]);
358
358
  this.deactivate();
@@ -393,11 +393,11 @@ const Ki = class Ki {
393
393
  c(this, dt).add(e);
394
394
  }
395
395
  settled() {
396
- return (c(this, Pt) ?? y(this, Pt, Sn())).promise;
396
+ return (c(this, Pt) ?? y(this, Pt, Si())).promise;
397
397
  }
398
398
  static ensure() {
399
399
  if (E === null) {
400
- const e = E = new Ki();
400
+ const e = E = new Xn();
401
401
  Ut.add(E), Rt || De(() => {
402
402
  E === e && e.flush();
403
403
  });
@@ -414,12 +414,12 @@ ft = new WeakMap(), dt = new WeakMap(), Xe = new WeakMap(), pt = new WeakMap(),
414
414
  * @param {Effect[]} effects
415
415
  * @param {Effect[]} render_effects
416
416
  */
417
- Ii = function(e, i, n) {
417
+ Sn = function(e, n, i) {
418
418
  e.f ^= L;
419
419
  for (var r = e.first, s = null; r !== null; ) {
420
420
  var o = r.f, l = (o & (we | He)) !== 0, a = l && (o & L) !== 0, u = a || (o & _e) !== 0 || c(this, xe).has(r);
421
421
  if (!u && r.fn !== null) {
422
- l ? r.f ^= L : s !== null && (o & (Lt | ri | xn)) !== 0 ? s.b.defer_effect(r) : (o & Lt) !== 0 ? i.push(r) : Bt(r) && ((o & Le) !== 0 && c(this, Je).add(r), It(r));
422
+ l ? r.f ^= L : s !== null && (o & (Lt | sn | xi)) !== 0 ? s.b.defer_effect(r) : (o & Lt) !== 0 ? n.push(r) : Bt(r) && ((o & Le) !== 0 && c(this, Je).add(r), It(r));
423
423
  var f = r.first;
424
424
  if (f !== null) {
425
425
  r = f;
@@ -439,23 +439,23 @@ Ii = function(e, i, n) {
439
439
  }, /**
440
440
  * @param {Effect[]} effects
441
441
  */
442
- Si = function(e) {
443
- for (var i = 0; i < e.length; i += 1)
444
- Vn(e[i], c(this, Nt), c(this, Je));
445
- }, Cn = function() {
442
+ xn = function(e) {
443
+ for (var n = 0; n < e.length; n += 1)
444
+ Vi(e[n], c(this, Nt), c(this, Je));
445
+ }, Ci = function() {
446
446
  var r;
447
447
  if (Ut.size > 1) {
448
448
  this.previous.clear();
449
- var e = le, i = !0;
449
+ var e = le, n = !0;
450
450
  for (const s of Ut) {
451
451
  if (s === this) {
452
- i = !1;
452
+ n = !1;
453
453
  continue;
454
454
  }
455
455
  const o = [];
456
456
  for (const [a, u] of this.current) {
457
457
  if (s.current.has(a))
458
- if (i && u !== s.current.get(a))
458
+ if (n && u !== s.current.get(a))
459
459
  s.current.set(a, u);
460
460
  else
461
461
  continue;
@@ -465,79 +465,79 @@ Si = function(e) {
465
465
  continue;
466
466
  const l = [...s.current.keys()].filter((a) => !this.current.has(a));
467
467
  if (l.length > 0) {
468
- var n = H;
468
+ var i = H;
469
469
  H = [];
470
470
  const a = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
471
471
  for (const f of o)
472
- jn(f, l, a, u);
472
+ ji(f, l, a, u);
473
473
  if (H.length > 0) {
474
474
  E = s, s.apply();
475
475
  for (const f of H)
476
- F(r = s, ye, Ii).call(r, f, [], []);
476
+ F(r = s, ye, Sn).call(r, f, [], []);
477
477
  s.deactivate();
478
478
  }
479
- H = n;
479
+ H = i;
480
480
  }
481
481
  }
482
482
  E = null, le = e;
483
483
  }
484
484
  this.committed = !0, Ut.delete(this);
485
485
  };
486
- let Oe = Ki;
486
+ let ze = Xn;
487
487
  function At(t) {
488
488
  var e = Rt;
489
489
  Rt = !0;
490
490
  try {
491
- for (var i; ; ) {
491
+ for (var n; ; ) {
492
492
  if (xs(), H.length === 0 && (E?.flush(), H.length === 0))
493
- return li = null, /** @type {T} */
494
- i;
495
- Dn();
493
+ return an = null, /** @type {T} */
494
+ n;
495
+ Di();
496
496
  }
497
497
  } finally {
498
498
  Rt = e;
499
499
  }
500
500
  }
501
- function Dn() {
502
- ki = !0;
501
+ function Di() {
502
+ In = !0;
503
503
  var t = null;
504
504
  try {
505
505
  for (var e = 0; H.length > 0; ) {
506
- var i = Oe.ensure();
506
+ var n = ze.ensure();
507
507
  if (e++ > 1e3) {
508
- var n, r;
508
+ var i, r;
509
509
  Es();
510
510
  }
511
- i.process(H), je.clear();
511
+ n.process(H), je.clear();
512
512
  }
513
513
  } finally {
514
- H = [], ki = !1, li = null;
514
+ H = [], In = !1, an = null;
515
515
  }
516
516
  }
517
517
  function Es() {
518
518
  try {
519
519
  vs();
520
520
  } catch (t) {
521
- Tt(t, li);
521
+ Tt(t, an);
522
522
  }
523
523
  }
524
524
  let Se = null;
525
- function ln(t) {
525
+ function li(t) {
526
526
  var e = t.length;
527
527
  if (e !== 0) {
528
- for (var i = 0; i < e; ) {
529
- var n = t[i++];
530
- if ((n.f & (ze | _e)) === 0 && Bt(n) && (Se = /* @__PURE__ */ new Set(), It(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && nr(n), Se?.size > 0)) {
528
+ for (var n = 0; n < e; ) {
529
+ var i = t[n++];
530
+ if ((i.f & (Oe | _e)) === 0 && Bt(i) && (Se = /* @__PURE__ */ new Set(), It(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && ir(i), Se?.size > 0)) {
531
531
  je.clear();
532
532
  for (const r of Se) {
533
- if ((r.f & (ze | _e)) !== 0) continue;
533
+ if ((r.f & (Oe | _e)) !== 0) continue;
534
534
  const s = [r];
535
535
  let o = r.parent;
536
536
  for (; o !== null; )
537
537
  Se.has(o) && (Se.delete(o), s.push(o)), o = o.parent;
538
538
  for (let l = s.length - 1; l >= 0; l--) {
539
539
  const a = s[l];
540
- (a.f & (ze | _e)) === 0 && It(a);
540
+ (a.f & (Oe | _e)) === 0 && It(a);
541
541
  }
542
542
  }
543
543
  Se.clear();
@@ -546,85 +546,85 @@ function ln(t) {
546
546
  Se = null;
547
547
  }
548
548
  }
549
- function jn(t, e, i, n) {
550
- if (!i.has(t) && (i.add(t), t.reactions !== null))
549
+ function ji(t, e, n, i) {
550
+ if (!n.has(t) && (n.add(t), t.reactions !== null))
551
551
  for (const r of t.reactions) {
552
552
  const s = r.f;
553
- (s & N) !== 0 ? jn(
553
+ (s & N) !== 0 ? ji(
554
554
  /** @type {Derived} */
555
555
  r,
556
556
  e,
557
- i,
558
- n
559
- ) : (s & (Ci | Le)) !== 0 && (s & V) === 0 && Fn(r, e, n) && (R(r, V), ae(
557
+ n,
558
+ i
559
+ ) : (s & (Dn | Le)) !== 0 && (s & V) === 0 && Fi(r, e, i) && (R(r, V), ae(
560
560
  /** @type {Effect} */
561
561
  r
562
562
  ));
563
563
  }
564
564
  }
565
- function Fn(t, e, i) {
566
- const n = i.get(t);
567
- if (n !== void 0) return n;
565
+ function Fi(t, e, n) {
566
+ const i = n.get(t);
567
+ if (i !== void 0) return i;
568
568
  if (t.deps !== null)
569
569
  for (const r of t.deps) {
570
570
  if (bt.call(e, r))
571
571
  return !0;
572
- if ((r.f & N) !== 0 && Fn(
572
+ if ((r.f & N) !== 0 && Fi(
573
573
  /** @type {Derived} */
574
574
  r,
575
575
  e,
576
- i
576
+ n
577
577
  ))
578
- return i.set(
578
+ return n.set(
579
579
  /** @type {Derived} */
580
580
  r,
581
581
  !0
582
582
  ), !0;
583
583
  }
584
- return i.set(t, !1), !1;
584
+ return n.set(t, !1), !1;
585
585
  }
586
586
  function ae(t) {
587
- for (var e = li = t; e.parent !== null; ) {
587
+ for (var e = an = t; e.parent !== null; ) {
588
588
  e = e.parent;
589
- var i = e.f;
590
- if (ki && e === S && (i & Le) !== 0 && (i & $n) === 0)
589
+ var n = e.f;
590
+ if (In && e === S && (n & Le) !== 0 && (n & $i) === 0)
591
591
  return;
592
- if ((i & (He | we)) !== 0) {
593
- if ((i & L) === 0) return;
592
+ if ((n & (He | we)) !== 0) {
593
+ if ((n & L) === 0) return;
594
594
  e.f ^= L;
595
595
  }
596
596
  }
597
597
  H.push(e);
598
598
  }
599
- function Bn(t, e) {
599
+ function Bi(t, e) {
600
600
  if (!((t.f & we) !== 0 && (t.f & L) !== 0)) {
601
601
  (t.f & V) !== 0 ? e.d.push(t) : (t.f & ue) !== 0 && e.m.push(t), R(t, L);
602
- for (var i = t.first; i !== null; )
603
- Bn(i, e), i = i.next;
602
+ for (var n = t.first; n !== null; )
603
+ Bi(n, e), n = n.next;
604
604
  }
605
605
  }
606
606
  function As(t) {
607
- let e = 0, i = Ft(0), n;
607
+ let e = 0, n = Ft(0), i;
608
608
  return () => {
609
- Gi() && (v(i), Ui(() => (e === 0 && (n = qi(() => t(() => zt(i)))), e += 1, () => {
609
+ Un() && (v(n), Yn(() => (e === 0 && (i = Wn(() => t(() => Ot(n)))), e += 1, () => {
610
610
  De(() => {
611
- e -= 1, e === 0 && (n?.(), n = void 0, zt(i));
611
+ e -= 1, e === 0 && (i?.(), i = void 0, Ot(n));
612
612
  });
613
613
  })));
614
614
  };
615
615
  }
616
- var Rs = yt | nt;
617
- function zs(t, e, i) {
618
- new Os(t, e, i);
616
+ var Rs = yt | it;
617
+ function Os(t, e, n) {
618
+ new zs(t, e, n);
619
619
  }
620
- var Z, Vt, $e, Qe, he, ve, W, ge, Ee, Ze, Ve, vt, gt, mt, Ae, ii, j, Hn, Gn, xi, Xt, $i;
621
- class Os {
620
+ var Z, Vt, $e, Qe, he, ve, W, ge, Ee, Ze, Ve, vt, gt, mt, Ae, nn, j, Hi, Gi, $n, Xt, En;
621
+ class zs {
622
622
  /**
623
623
  * @param {TemplateNode} node
624
624
  * @param {BoundaryProps} props
625
625
  * @param {((anchor: Node) => void)} children
626
626
  */
627
- constructor(e, i, n) {
627
+ constructor(e, n, i) {
628
628
  w(this, j);
629
629
  /** @type {Boundary | null} */
630
630
  T(this, "parent");
@@ -662,15 +662,15 @@ class Os {
662
662
  * @type {Source<number> | null}
663
663
  */
664
664
  w(this, Ae, null);
665
- w(this, ii, As(() => (y(this, Ae, Ft(c(this, Ze))), () => {
665
+ w(this, nn, As(() => (y(this, Ae, Ft(c(this, Ze))), () => {
666
666
  y(this, Ae, null);
667
667
  })));
668
- y(this, Z, e), y(this, $e, i), y(this, Qe, (r) => {
668
+ y(this, Z, e), y(this, $e, n), y(this, Qe, (r) => {
669
669
  var s = (
670
670
  /** @type {Effect} */
671
671
  S
672
672
  );
673
- s.b = this, s.f |= yi, n(r);
673
+ s.b = this, s.f |= wn, i(r);
674
674
  }), this.parent = /** @type {Effect} */
675
675
  S.b, y(this, he, tr(() => {
676
676
  if ($) {
@@ -678,9 +678,9 @@ class Os {
678
678
  /** @type {Comment} */
679
679
  c(this, Vt)
680
680
  );
681
- Di(), r.data === Vi ? F(this, j, Gn).call(this) : F(this, j, Hn).call(this);
681
+ jn(), r.data === Cn ? F(this, j, Gi).call(this) : F(this, j, Hi).call(this);
682
682
  } else
683
- F(this, j, xi).call(this);
683
+ F(this, j, $n).call(this);
684
684
  }, Rs)), $ && y(this, Z, x);
685
685
  }
686
686
  /**
@@ -688,7 +688,7 @@ class Os {
688
688
  * @param {Effect} effect
689
689
  */
690
690
  defer_effect(e) {
691
- Vn(e, c(this, gt), c(this, mt));
691
+ Vi(e, c(this, gt), c(this, mt));
692
692
  }
693
693
  /**
694
694
  * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
@@ -707,53 +707,53 @@ class Os {
707
707
  * @param {1 | -1} d
708
708
  */
709
709
  update_pending_count(e) {
710
- F(this, j, $i).call(this, e), y(this, Ze, c(this, Ze) + e), !(!c(this, Ae) || c(this, vt)) && (y(this, vt, !0), De(() => {
711
- y(this, vt, !1), c(this, Ae) && ti(c(this, Ae), c(this, Ze));
710
+ F(this, j, En).call(this, e), y(this, Ze, c(this, Ze) + e), !(!c(this, Ae) || c(this, vt)) && (y(this, vt, !0), De(() => {
711
+ y(this, vt, !1), c(this, Ae) && tn(c(this, Ae), c(this, Ze));
712
712
  }));
713
713
  }
714
714
  get_effect_pending() {
715
- return c(this, ii).call(this), v(
715
+ return c(this, nn).call(this), v(
716
716
  /** @type {Source<number>} */
717
717
  c(this, Ae)
718
718
  );
719
719
  }
720
720
  /** @param {unknown} error */
721
721
  error(e) {
722
- var i = c(this, $e).onerror;
723
- let n = c(this, $e).failed;
724
- if (!i && !n)
722
+ var n = c(this, $e).onerror;
723
+ let i = c(this, $e).failed;
724
+ if (!n && !i)
725
725
  throw e;
726
- c(this, ve) && (U(c(this, ve)), y(this, ve, null)), c(this, W) && (U(c(this, W)), y(this, W, null)), c(this, ge) && (U(c(this, ge)), y(this, ge, null)), $ && (ne(
726
+ c(this, ve) && (U(c(this, ve)), y(this, ve, null)), c(this, W) && (U(c(this, W)), y(this, W, null)), c(this, ge) && (U(c(this, ge)), y(this, ge, null)), $ && (ie(
727
727
  /** @type {TemplateNode} */
728
728
  c(this, Vt)
729
- ), Ti(), ne(An()));
729
+ ), kn(), ie(Ai()));
730
730
  var r = !1, s = !1;
731
731
  const o = () => {
732
732
  if (r) {
733
733
  ws();
734
734
  return;
735
735
  }
736
- r = !0, s && ys(), c(this, ge) !== null && Ot(c(this, ge), () => {
736
+ r = !0, s && ys(), c(this, ge) !== null && zt(c(this, ge), () => {
737
737
  y(this, ge, null);
738
738
  }), F(this, j, Xt).call(this, () => {
739
- Oe.ensure(), F(this, j, xi).call(this);
739
+ ze.ensure(), F(this, j, $n).call(this);
740
740
  });
741
741
  };
742
742
  De(() => {
743
743
  try {
744
- s = !0, i?.(e, o), s = !1;
744
+ s = !0, n?.(e, o), s = !1;
745
745
  } catch (l) {
746
746
  Tt(l, c(this, he) && c(this, he).parent);
747
747
  }
748
- n && y(this, ge, F(this, j, Xt).call(this, () => {
749
- Oe.ensure();
748
+ i && y(this, ge, F(this, j, Xt).call(this, () => {
749
+ ze.ensure();
750
750
  try {
751
751
  return Ne(() => {
752
752
  var l = (
753
753
  /** @type {Effect} */
754
754
  S
755
755
  );
756
- l.b = this, l.f |= yi, n(
756
+ l.b = this, l.f |= wn, i(
757
757
  c(this, Z),
758
758
  () => e,
759
759
  () => o
@@ -770,17 +770,17 @@ class Os {
770
770
  });
771
771
  }
772
772
  }
773
- Z = new WeakMap(), Vt = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), he = new WeakMap(), ve = new WeakMap(), W = new WeakMap(), ge = new WeakMap(), Ee = new WeakMap(), Ze = new WeakMap(), Ve = new WeakMap(), vt = new WeakMap(), gt = new WeakMap(), mt = new WeakMap(), Ae = new WeakMap(), ii = new WeakMap(), j = new WeakSet(), Hn = function() {
773
+ Z = new WeakMap(), Vt = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), he = new WeakMap(), ve = new WeakMap(), W = new WeakMap(), ge = new WeakMap(), Ee = new WeakMap(), Ze = new WeakMap(), Ve = new WeakMap(), vt = new WeakMap(), gt = new WeakMap(), mt = new WeakMap(), Ae = new WeakMap(), nn = new WeakMap(), j = new WeakSet(), Hi = function() {
774
774
  try {
775
775
  y(this, ve, Ne(() => c(this, Qe).call(this, c(this, Z))));
776
776
  } catch (e) {
777
777
  this.error(e);
778
778
  }
779
- }, Gn = function() {
779
+ }, Gi = function() {
780
780
  const e = c(this, $e).pending;
781
781
  e && (this.is_pending = !0, y(this, W, Ne(() => e(c(this, Z)))), De(() => {
782
- var i = y(this, Ee, document.createDocumentFragment()), n = fe();
783
- i.append(n), y(this, ve, F(this, j, Xt).call(this, () => (Oe.ensure(), Ne(() => c(this, Qe).call(this, n))))), c(this, Ve) === 0 && (c(this, Z).before(i), y(this, Ee, null), Ot(
782
+ var n = y(this, Ee, document.createDocumentFragment()), i = fe();
783
+ n.append(i), y(this, ve, F(this, j, Xt).call(this, () => (ze.ensure(), Ne(() => c(this, Qe).call(this, i))))), c(this, Ve) === 0 && (c(this, Z).before(n), y(this, Ee, null), zt(
784
784
  /** @type {Effect} */
785
785
  c(this, W),
786
786
  () => {
@@ -788,64 +788,64 @@ Z = new WeakMap(), Vt = new WeakMap(), $e = new WeakMap(), Qe = new WeakMap(), h
788
788
  }
789
789
  ), this.is_pending = !1);
790
790
  }));
791
- }, xi = function() {
791
+ }, $n = function() {
792
792
  try {
793
793
  if (this.is_pending = this.has_pending_snippet(), y(this, Ve, 0), y(this, Ze, 0), y(this, ve, Ne(() => {
794
794
  c(this, Qe).call(this, c(this, Z));
795
795
  })), c(this, Ve) > 0) {
796
796
  var e = y(this, Ee, document.createDocumentFragment());
797
797
  or(c(this, ve), e);
798
- const i = (
798
+ const n = (
799
799
  /** @type {(anchor: Node) => void} */
800
800
  c(this, $e).pending
801
801
  );
802
- y(this, W, Ne(() => i(c(this, Z))));
802
+ y(this, W, Ne(() => n(c(this, Z))));
803
803
  } else
804
804
  this.is_pending = !1;
805
- } catch (i) {
806
- this.error(i);
805
+ } catch (n) {
806
+ this.error(n);
807
807
  }
808
808
  }, /**
809
809
  * @template T
810
810
  * @param {() => T} fn
811
811
  */
812
812
  Xt = function(e) {
813
- var i = S, n = k, r = X;
813
+ var n = S, i = k, r = X;
814
814
  be(c(this, he)), re(c(this, he)), wt(c(this, he).ctx);
815
815
  try {
816
816
  return e();
817
817
  } catch (s) {
818
- return Pn(s), null;
818
+ return Pi(s), null;
819
819
  } finally {
820
- be(i), re(n), wt(r);
820
+ be(n), re(i), wt(r);
821
821
  }
822
822
  }, /**
823
823
  * Updates the pending count associated with the currently visible pending snippet,
824
824
  * if any, such that we can replace the snippet with content once work is done
825
825
  * @param {1 | -1} d
826
826
  */
827
- $i = function(e) {
828
- var i;
827
+ En = function(e) {
828
+ var n;
829
829
  if (!this.has_pending_snippet()) {
830
- this.parent && F(i = this.parent, j, $i).call(i, e);
830
+ this.parent && F(n = this.parent, j, En).call(n, e);
831
831
  return;
832
832
  }
833
833
  if (y(this, Ve, c(this, Ve) + e), c(this, Ve) === 0) {
834
834
  this.is_pending = !1;
835
- for (const n of c(this, gt))
836
- R(n, V), ae(n);
837
- for (const n of c(this, mt))
838
- R(n, ue), ae(n);
839
- c(this, gt).clear(), c(this, mt).clear(), c(this, W) && Ot(c(this, W), () => {
835
+ for (const i of c(this, gt))
836
+ R(i, V), ae(i);
837
+ for (const i of c(this, mt))
838
+ R(i, ue), ae(i);
839
+ c(this, gt).clear(), c(this, mt).clear(), c(this, W) && zt(c(this, W), () => {
840
840
  y(this, W, null);
841
841
  }), c(this, Ee) && (c(this, Z).before(c(this, Ee)), y(this, Ee, null));
842
842
  }
843
843
  };
844
- function Ls(t, e, i, n) {
845
- const r = Fi;
844
+ function Ls(t, e, n, i) {
845
+ const r = Bn;
846
846
  var s = t.filter((d) => !d.settled);
847
- if (i.length === 0 && s.length === 0) {
848
- n(e.map(r));
847
+ if (n.length === 0 && s.length === 0) {
848
+ i(e.map(r));
849
849
  return;
850
850
  }
851
851
  var o = E, l = (
@@ -855,41 +855,41 @@ function Ls(t, e, i, n) {
855
855
  function f(d) {
856
856
  a();
857
857
  try {
858
- n(d);
858
+ i(d);
859
859
  } catch (p) {
860
- (l.f & ze) === 0 && Tt(p, l);
860
+ (l.f & Oe) === 0 && Tt(p, l);
861
861
  }
862
- o?.deactivate(), Ei();
862
+ o?.deactivate(), An();
863
863
  }
864
- if (i.length === 0) {
864
+ if (n.length === 0) {
865
865
  u.then(() => f(e.map(r)));
866
866
  return;
867
867
  }
868
868
  function h() {
869
- a(), Promise.all(i.map((d) => /* @__PURE__ */ Ps(d))).then((d) => f([...e.map(r), ...d])).catch((d) => Tt(d, l));
869
+ a(), Promise.all(n.map((d) => /* @__PURE__ */ Ps(d))).then((d) => f([...e.map(r), ...d])).catch((d) => Tt(d, l));
870
870
  }
871
871
  u ? u.then(h) : h();
872
872
  }
873
873
  function Ms() {
874
- var t = S, e = k, i = X, n = E;
874
+ var t = S, e = k, n = X, i = E;
875
875
  return function(s = !0) {
876
- be(t), re(e), wt(i), s && n?.activate();
876
+ be(t), re(e), wt(n), s && i?.activate();
877
877
  };
878
878
  }
879
- function Ei() {
879
+ function An() {
880
880
  be(null), re(null), wt(null);
881
881
  }
882
882
  // @__NO_SIDE_EFFECTS__
883
- function Fi(t) {
884
- var e = N | V, i = k !== null && (k.f & N) !== 0 ? (
883
+ function Bn(t) {
884
+ var e = N | V, n = k !== null && (k.f & N) !== 0 ? (
885
885
  /** @type {Derived} */
886
886
  k
887
887
  ) : null;
888
- return S !== null && (S.f |= nt), {
888
+ return S !== null && (S.f |= it), {
889
889
  ctx: X,
890
890
  deps: null,
891
891
  effects: null,
892
- equals: Rn,
892
+ equals: Ri,
893
893
  f: e,
894
894
  fn: t,
895
895
  reactions: null,
@@ -899,20 +899,20 @@ function Fi(t) {
899
899
  P
900
900
  ),
901
901
  wv: 0,
902
- parent: i ?? S,
902
+ parent: n ?? S,
903
903
  ac: null
904
904
  };
905
905
  }
906
906
  // @__NO_SIDE_EFFECTS__
907
- function Ps(t, e, i) {
908
- let n = (
907
+ function Ps(t, e, n) {
908
+ let i = (
909
909
  /** @type {Effect | null} */
910
910
  S
911
911
  );
912
- n === null && fs();
912
+ i === null && fs();
913
913
  var r = (
914
914
  /** @type {Boundary} */
915
- n.b
915
+ i.b
916
916
  ), s = (
917
917
  /** @type {Promise<V>} */
918
918
  /** @type {unknown} */
@@ -922,14 +922,14 @@ function Ps(t, e, i) {
922
922
  P
923
923
  ), l = !k, a = /* @__PURE__ */ new Map();
924
924
  return Xs(() => {
925
- var u = Sn();
925
+ var u = Si();
926
926
  s = u.promise;
927
927
  try {
928
928
  Promise.resolve(t()).then(u.resolve, u.reject).then(() => {
929
- f === E && f.committed && f.deactivate(), Ei();
929
+ f === E && f.committed && f.deactivate(), An();
930
930
  });
931
931
  } catch (p) {
932
- u.reject(p), Ei();
932
+ u.reject(p), An();
933
933
  }
934
934
  var f = (
935
935
  /** @type {Batch} */
@@ -941,9 +941,9 @@ function Ps(t, e, i) {
941
941
  }
942
942
  const d = (p, g = void 0) => {
943
943
  if (f.activate(), g)
944
- g !== Ue && (o.f |= Ce, ti(o, g));
944
+ g !== Ue && (o.f |= Ce, tn(o, g));
945
945
  else {
946
- (o.f & Ce) !== 0 && (o.f ^= Ce), ti(o, p);
946
+ (o.f & Ce) !== 0 && (o.f ^= Ce), tn(o, p);
947
947
  for (const [_, b] of a) {
948
948
  if (a.delete(_), _ === f) break;
949
949
  b.reject(Ue);
@@ -967,24 +967,24 @@ function Ps(t, e, i) {
967
967
  }
968
968
  // @__NO_SIDE_EFFECTS__
969
969
  function Ns(t) {
970
- const e = /* @__PURE__ */ Fi(t);
970
+ const e = /* @__PURE__ */ Bn(t);
971
971
  return lr(e), e;
972
972
  }
973
973
  function Vs(t) {
974
974
  var e = t.effects;
975
975
  if (e !== null) {
976
976
  t.effects = null;
977
- for (var i = 0; i < e.length; i += 1)
977
+ for (var n = 0; n < e.length; n += 1)
978
978
  U(
979
979
  /** @type {Effect} */
980
- e[i]
980
+ e[n]
981
981
  );
982
982
  }
983
983
  }
984
984
  function Cs(t) {
985
985
  for (var e = t.parent; e !== null; ) {
986
986
  if ((e.f & N) === 0)
987
- return (e.f & ze) === 0 ? (
987
+ return (e.f & Oe) === 0 ? (
988
988
  /** @type {Effect} */
989
989
  e
990
990
  ) : null;
@@ -992,102 +992,102 @@ function Cs(t) {
992
992
  }
993
993
  return null;
994
994
  }
995
- function Bi(t) {
996
- var e, i = S;
995
+ function Hn(t) {
996
+ var e, n = S;
997
997
  be(Cs(t));
998
998
  try {
999
- t.f &= ~it, Vs(t), e = fr(t);
999
+ t.f &= ~nt, Vs(t), e = fr(t);
1000
1000
  } finally {
1001
- be(i);
1001
+ be(n);
1002
1002
  }
1003
1003
  return e;
1004
1004
  }
1005
- function Un(t) {
1006
- var e = Bi(t);
1005
+ function Ui(t) {
1006
+ var e = Hn(t);
1007
1007
  if (!t.equals(e) && (t.wv = cr(), (!E?.is_fork || t.deps === null) && (t.v = e, t.deps === null))) {
1008
1008
  R(t, L);
1009
1009
  return;
1010
1010
  }
1011
- Be || (le !== null ? (Gi() || E?.is_fork) && le.set(t, e) : ji(t));
1011
+ Be || (le !== null ? (Un() || E?.is_fork) && le.set(t, e) : Fn(t));
1012
1012
  }
1013
1013
  function Ds(t) {
1014
1014
  if (t.effects !== null)
1015
1015
  for (const e of t.effects)
1016
- (e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ue), e.teardown = ss, e.ac = null, Mt(e, 0), Yi(e));
1016
+ (e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Ue), e.teardown = ss, e.ac = null, Mt(e, 0), qn(e));
1017
1017
  }
1018
- function Yn(t) {
1018
+ function Yi(t) {
1019
1019
  if (t.effects !== null)
1020
1020
  for (const e of t.effects)
1021
1021
  e.teardown && It(e);
1022
1022
  }
1023
- let Ai = /* @__PURE__ */ new Set();
1023
+ let Rn = /* @__PURE__ */ new Set();
1024
1024
  const je = /* @__PURE__ */ new Map();
1025
- let qn = !1;
1025
+ let qi = !1;
1026
1026
  function Ft(t, e) {
1027
- var i = {
1027
+ var n = {
1028
1028
  f: 0,
1029
1029
  // TODO ideally we could skip this altogether, but it causes type errors
1030
1030
  v: t,
1031
1031
  reactions: null,
1032
- equals: Rn,
1032
+ equals: Ri,
1033
1033
  rv: 0,
1034
1034
  wv: 0
1035
1035
  };
1036
- return i;
1036
+ return n;
1037
1037
  }
1038
1038
  // @__NO_SIDE_EFFECTS__
1039
- function z(t, e) {
1040
- const i = Ft(t);
1041
- return lr(i), i;
1039
+ function O(t, e) {
1040
+ const n = Ft(t);
1041
+ return lr(n), n;
1042
1042
  }
1043
1043
  // @__NO_SIDE_EFFECTS__
1044
- function js(t, e = !1, i = !0) {
1045
- const n = Ft(t);
1046
- return e || (n.equals = Is), n;
1044
+ function js(t, e = !1, n = !0) {
1045
+ const i = Ft(t);
1046
+ return e || (i.equals = Is), i;
1047
1047
  }
1048
- function I(t, e, i = !1) {
1048
+ function I(t, e, n = !1) {
1049
1049
  k !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
1050
1050
  // to ensure we error if state is set inside an inspect effect
1051
- (!ce || (k.f & on) !== 0) && Ln() && (k.f & (N | Le | Ci | on)) !== 0 && (ie === null || !bt.call(ie, t)) && bs();
1052
- let n = i ? qe(e) : e;
1053
- return ti(t, n);
1051
+ (!ce || (k.f & oi) !== 0) && Li() && (k.f & (N | Le | Dn | oi)) !== 0 && (ne === null || !bt.call(ne, t)) && bs();
1052
+ let i = n ? qe(e) : e;
1053
+ return tn(t, i);
1054
1054
  }
1055
- function ti(t, e) {
1055
+ function tn(t, e) {
1056
1056
  if (!t.equals(e)) {
1057
- var i = t.v;
1058
- Be ? je.set(t, e) : je.set(t, i), t.v = e;
1059
- var n = Oe.ensure();
1060
- if (n.capture(t, i), (t.f & N) !== 0) {
1057
+ var n = t.v;
1058
+ Be ? je.set(t, e) : je.set(t, n), t.v = e;
1059
+ var i = ze.ensure();
1060
+ if (i.capture(t, n), (t.f & N) !== 0) {
1061
1061
  const r = (
1062
1062
  /** @type {Derived} */
1063
1063
  t
1064
1064
  );
1065
- (t.f & V) !== 0 && Bi(r), ji(r);
1065
+ (t.f & V) !== 0 && Hn(r), Fn(r);
1066
1066
  }
1067
- t.wv = cr(), Wn(t, V), S !== null && (S.f & L) !== 0 && (S.f & (we | He)) === 0 && (Q === null ? eo([t]) : Q.push(t)), !n.is_fork && Ai.size > 0 && !qn && Fs();
1067
+ t.wv = cr(), Wi(t, V), S !== null && (S.f & L) !== 0 && (S.f & (we | He)) === 0 && (Q === null ? eo([t]) : Q.push(t)), !i.is_fork && Rn.size > 0 && !qi && Fs();
1068
1068
  }
1069
1069
  return e;
1070
1070
  }
1071
1071
  function Fs() {
1072
- qn = !1;
1073
- for (const t of Ai)
1072
+ qi = !1;
1073
+ for (const t of Rn)
1074
1074
  (t.f & L) !== 0 && R(t, ue), Bt(t) && It(t);
1075
- Ai.clear();
1075
+ Rn.clear();
1076
1076
  }
1077
- function zt(t) {
1077
+ function Ot(t) {
1078
1078
  I(t, t.v + 1);
1079
1079
  }
1080
- function Wn(t, e) {
1081
- var i = t.reactions;
1082
- if (i !== null)
1083
- for (var n = i.length, r = 0; r < n; r++) {
1084
- var s = i[r], o = s.f, l = (o & V) === 0;
1080
+ function Wi(t, e) {
1081
+ var n = t.reactions;
1082
+ if (n !== null)
1083
+ for (var i = n.length, r = 0; r < i; r++) {
1084
+ var s = n[r], o = s.f, l = (o & V) === 0;
1085
1085
  if (l && R(s, e), (o & N) !== 0) {
1086
1086
  var a = (
1087
1087
  /** @type {Derived} */
1088
1088
  s
1089
1089
  );
1090
- le?.delete(a), (o & it) === 0 && (o & te && (s.f |= it), Wn(a, ue));
1090
+ le?.delete(a), (o & nt) === 0 && (o & te && (s.f |= nt), Wi(a, ue));
1091
1091
  } else l && ((o & Le) !== 0 && Se !== null && Se.add(
1092
1092
  /** @type {Effect} */
1093
1093
  s
@@ -1100,18 +1100,18 @@ function Wn(t, e) {
1100
1100
  function qe(t) {
1101
1101
  if (typeof t != "object" || t === null || Kt in t)
1102
1102
  return t;
1103
- const e = In(t);
1104
- if (e !== ns && e !== rs)
1103
+ const e = Ii(t);
1104
+ if (e !== is && e !== rs)
1105
1105
  return t;
1106
- var i = /* @__PURE__ */ new Map(), n = Zr(t), r = /* @__PURE__ */ z(0), s = tt, o = (l) => {
1106
+ var n = /* @__PURE__ */ new Map(), i = Zr(t), r = /* @__PURE__ */ O(0), s = tt, o = (l) => {
1107
1107
  if (tt === s)
1108
1108
  return l();
1109
1109
  var a = k, u = tt;
1110
- re(null), dn(s);
1110
+ re(null), di(s);
1111
1111
  var f = l();
1112
- return re(a), dn(u), f;
1112
+ return re(a), di(u), f;
1113
1113
  };
1114
- return n && i.set("length", /* @__PURE__ */ z(
1114
+ return i && n.set("length", /* @__PURE__ */ O(
1115
1115
  /** @type {any[]} */
1116
1116
  t.length
1117
1117
  )), new Proxy(
@@ -1120,31 +1120,31 @@ function qe(t) {
1120
1120
  {
1121
1121
  defineProperty(l, a, u) {
1122
1122
  (!("value" in u) || u.configurable === !1 || u.enumerable === !1 || u.writable === !1) && ms();
1123
- var f = i.get(a);
1123
+ var f = n.get(a);
1124
1124
  return f === void 0 ? o(() => {
1125
- var h = /* @__PURE__ */ z(u.value);
1126
- return i.set(a, h), h;
1125
+ var h = /* @__PURE__ */ O(u.value);
1126
+ return n.set(a, h), h;
1127
1127
  }) : I(f, u.value, !0), !0;
1128
1128
  },
1129
1129
  deleteProperty(l, a) {
1130
- var u = i.get(a);
1130
+ var u = n.get(a);
1131
1131
  if (u === void 0) {
1132
1132
  if (a in l) {
1133
- const f = o(() => /* @__PURE__ */ z(P));
1134
- i.set(a, f), zt(r);
1133
+ const f = o(() => /* @__PURE__ */ O(P));
1134
+ n.set(a, f), Ot(r);
1135
1135
  }
1136
1136
  } else
1137
- I(u, P), zt(r);
1137
+ I(u, P), Ot(r);
1138
1138
  return !0;
1139
1139
  },
1140
1140
  get(l, a, u) {
1141
1141
  if (a === Kt)
1142
1142
  return t;
1143
- var f = i.get(a), h = a in l;
1143
+ var f = n.get(a), h = a in l;
1144
1144
  if (f === void 0 && (!h || ut(l, a)?.writable) && (f = o(() => {
1145
- var p = qe(h ? l[a] : P), g = /* @__PURE__ */ z(p);
1145
+ var p = qe(h ? l[a] : P), g = /* @__PURE__ */ O(p);
1146
1146
  return g;
1147
- }), i.set(a, f)), f !== void 0) {
1147
+ }), n.set(a, f)), f !== void 0) {
1148
1148
  var d = v(f);
1149
1149
  return d === P ? void 0 : d;
1150
1150
  }
@@ -1153,10 +1153,10 @@ function qe(t) {
1153
1153
  getOwnPropertyDescriptor(l, a) {
1154
1154
  var u = Reflect.getOwnPropertyDescriptor(l, a);
1155
1155
  if (u && "value" in u) {
1156
- var f = i.get(a);
1156
+ var f = n.get(a);
1157
1157
  f && (u.value = v(f));
1158
1158
  } else if (u === void 0) {
1159
- var h = i.get(a), d = h?.v;
1159
+ var h = n.get(a), d = h?.v;
1160
1160
  if (h !== void 0 && d !== P)
1161
1161
  return {
1162
1162
  enumerable: !0,
@@ -1170,12 +1170,12 @@ function qe(t) {
1170
1170
  has(l, a) {
1171
1171
  if (a === Kt)
1172
1172
  return !0;
1173
- var u = i.get(a), f = u !== void 0 && u.v !== P || Reflect.has(l, a);
1173
+ var u = n.get(a), f = u !== void 0 && u.v !== P || Reflect.has(l, a);
1174
1174
  if (u !== void 0 || S !== null && (!f || ut(l, a)?.writable)) {
1175
1175
  u === void 0 && (u = o(() => {
1176
- var d = f ? qe(l[a]) : P, p = /* @__PURE__ */ z(d);
1176
+ var d = f ? qe(l[a]) : P, p = /* @__PURE__ */ O(d);
1177
1177
  return p;
1178
- }), i.set(a, u));
1178
+ }), n.set(a, u));
1179
1179
  var h = v(u);
1180
1180
  if (h === P)
1181
1181
  return !1;
@@ -1183,15 +1183,15 @@ function qe(t) {
1183
1183
  return f;
1184
1184
  },
1185
1185
  set(l, a, u, f) {
1186
- var h = i.get(a), d = a in l;
1187
- if (n && a === "length")
1186
+ var h = n.get(a), d = a in l;
1187
+ if (i && a === "length")
1188
1188
  for (var p = u; p < /** @type {Source<number>} */
1189
1189
  h.v; p += 1) {
1190
- var g = i.get(p + "");
1191
- g !== void 0 ? I(g, P) : p in l && (g = o(() => /* @__PURE__ */ z(P)), i.set(p + "", g));
1190
+ var g = n.get(p + "");
1191
+ g !== void 0 ? I(g, P) : p in l && (g = o(() => /* @__PURE__ */ O(P)), n.set(p + "", g));
1192
1192
  }
1193
1193
  if (h === void 0)
1194
- (!d || ut(l, a)?.writable) && (h = o(() => /* @__PURE__ */ z(void 0)), I(h, qe(u)), i.set(a, h));
1194
+ (!d || ut(l, a)?.writable) && (h = o(() => /* @__PURE__ */ O(void 0)), I(h, qe(u)), n.set(a, h));
1195
1195
  else {
1196
1196
  d = h.v !== P;
1197
1197
  var _ = o(() => qe(u));
@@ -1199,24 +1199,24 @@ function qe(t) {
1199
1199
  }
1200
1200
  var b = Reflect.getOwnPropertyDescriptor(l, a);
1201
1201
  if (b?.set && b.set.call(f, u), !d) {
1202
- if (n && typeof a == "string") {
1202
+ if (i && typeof a == "string") {
1203
1203
  var A = (
1204
1204
  /** @type {Source<number>} */
1205
- i.get("length")
1206
- ), O = Number(a);
1207
- Number.isInteger(O) && O >= A.v && I(A, O + 1);
1205
+ n.get("length")
1206
+ ), z = Number(a);
1207
+ Number.isInteger(z) && z >= A.v && I(A, z + 1);
1208
1208
  }
1209
- zt(r);
1209
+ Ot(r);
1210
1210
  }
1211
1211
  return !0;
1212
1212
  },
1213
1213
  ownKeys(l) {
1214
1214
  v(r);
1215
1215
  var a = Reflect.ownKeys(l).filter((h) => {
1216
- var d = i.get(h);
1216
+ var d = n.get(h);
1217
1217
  return d === void 0 || d.v !== P;
1218
1218
  });
1219
- for (var [u, f] of i)
1219
+ for (var [u, f] of n)
1220
1220
  f.v !== P && !(u in l) && a.push(u);
1221
1221
  return a;
1222
1222
  },
@@ -1226,12 +1226,12 @@ function qe(t) {
1226
1226
  }
1227
1227
  );
1228
1228
  }
1229
- var an, Kn, Xn, Jn;
1230
- function Ri() {
1231
- if (an === void 0) {
1232
- an = window, Kn = /Firefox/.test(navigator.userAgent);
1233
- var t = Element.prototype, e = Node.prototype, i = Text.prototype;
1234
- Xn = ut(e, "firstChild").get, Jn = ut(e, "nextSibling").get, sn(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), sn(i) && (i.__t = void 0);
1229
+ var ai, Ki, Xi, Ji;
1230
+ function On() {
1231
+ if (ai === void 0) {
1232
+ ai = window, Ki = /Firefox/.test(navigator.userAgent);
1233
+ var t = Element.prototype, e = Node.prototype, n = Text.prototype;
1234
+ Xi = ut(e, "firstChild").get, Ji = ut(e, "nextSibling").get, si(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), si(n) && (n.__t = void 0);
1235
1235
  }
1236
1236
  }
1237
1237
  function fe(t = "") {
@@ -1241,66 +1241,66 @@ function fe(t = "") {
1241
1241
  function kt(t) {
1242
1242
  return (
1243
1243
  /** @type {TemplateNode | null} */
1244
- Xn.call(t)
1244
+ Xi.call(t)
1245
1245
  );
1246
1246
  }
1247
1247
  // @__NO_SIDE_EFFECTS__
1248
1248
  function Me(t) {
1249
1249
  return (
1250
1250
  /** @type {TemplateNode | null} */
1251
- Jn.call(t)
1251
+ Ji.call(t)
1252
1252
  );
1253
1253
  }
1254
1254
  function D(t, e) {
1255
1255
  if (!$)
1256
1256
  return /* @__PURE__ */ kt(t);
1257
- var i = /* @__PURE__ */ kt(x);
1258
- if (i === null)
1259
- i = x.appendChild(fe());
1260
- else if (e && i.nodeType !== jt) {
1261
- var n = fe();
1262
- return i?.before(n), ne(n), n;
1263
- }
1264
- return e && ai(
1257
+ var n = /* @__PURE__ */ kt(x);
1258
+ if (n === null)
1259
+ n = x.appendChild(fe());
1260
+ else if (e && n.nodeType !== jt) {
1261
+ var i = fe();
1262
+ return n?.before(i), ie(i), i;
1263
+ }
1264
+ return e && cn(
1265
1265
  /** @type {Text} */
1266
- i
1267
- ), ne(i), i;
1266
+ n
1267
+ ), ie(n), n;
1268
1268
  }
1269
- function cn(t, e = !1) {
1269
+ function ci(t, e = !1) {
1270
1270
  if (!$) {
1271
- var i = /* @__PURE__ */ kt(t);
1272
- return i instanceof Comment && i.data === "" ? /* @__PURE__ */ Me(i) : i;
1271
+ var n = /* @__PURE__ */ kt(t);
1272
+ return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Me(n) : n;
1273
1273
  }
1274
1274
  if (e) {
1275
1275
  if (x?.nodeType !== jt) {
1276
- var n = fe();
1277
- return x?.before(n), ne(n), n;
1276
+ var i = fe();
1277
+ return x?.before(i), ie(i), i;
1278
1278
  }
1279
- ai(
1279
+ cn(
1280
1280
  /** @type {Text} */
1281
1281
  x
1282
1282
  );
1283
1283
  }
1284
1284
  return x;
1285
1285
  }
1286
- function J(t, e = 1, i = !1) {
1287
- let n = $ ? x : t;
1286
+ function J(t, e = 1, n = !1) {
1287
+ let i = $ ? x : t;
1288
1288
  for (var r; e--; )
1289
- r = n, n = /** @type {TemplateNode} */
1290
- /* @__PURE__ */ Me(n);
1289
+ r = i, i = /** @type {TemplateNode} */
1290
+ /* @__PURE__ */ Me(i);
1291
1291
  if (!$)
1292
- return n;
1293
- if (i) {
1294
- if (n?.nodeType !== jt) {
1292
+ return i;
1293
+ if (n) {
1294
+ if (i?.nodeType !== jt) {
1295
1295
  var s = fe();
1296
- return n === null ? r?.after(s) : n.before(s), ne(s), s;
1296
+ return i === null ? r?.after(s) : i.before(s), ie(s), s;
1297
1297
  }
1298
- ai(
1298
+ cn(
1299
1299
  /** @type {Text} */
1300
- n
1300
+ i
1301
1301
  );
1302
1302
  }
1303
- return ne(n), n;
1303
+ return ie(i), i;
1304
1304
  }
1305
1305
  function Bs(t) {
1306
1306
  t.textContent = "";
@@ -1308,13 +1308,13 @@ function Bs(t) {
1308
1308
  function Hs() {
1309
1309
  return !1;
1310
1310
  }
1311
- function Hi(t, e, i) {
1311
+ function Gn(t, e, n) {
1312
1312
  return (
1313
1313
  /** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
1314
- document.createElementNS(kn, t, void 0)
1314
+ document.createElementNS(ki, t, void 0)
1315
1315
  );
1316
1316
  }
1317
- function ai(t) {
1317
+ function cn(t) {
1318
1318
  if (
1319
1319
  /** @type {string} */
1320
1320
  t.nodeValue.length < 65536
@@ -1325,9 +1325,9 @@ function ai(t) {
1325
1325
  e.remove(), t.nodeValue += /** @type {string} */
1326
1326
  e.nodeValue, e = t.nextSibling;
1327
1327
  }
1328
- let un = !1;
1328
+ let ui = !1;
1329
1329
  function Gs() {
1330
- un || (un = !0, document.addEventListener(
1330
+ ui || (ui = !0, document.addEventListener(
1331
1331
  "reset",
1332
1332
  (t) => {
1333
1333
  Promise.resolve().then(() => {
@@ -1344,25 +1344,25 @@ function Gs() {
1344
1344
  { capture: !0 }
1345
1345
  ));
1346
1346
  }
1347
- function Qn(t) {
1348
- var e = k, i = S;
1347
+ function Qi(t) {
1348
+ var e = k, n = S;
1349
1349
  re(null), be(null);
1350
1350
  try {
1351
1351
  return t();
1352
1352
  } finally {
1353
- re(e), be(i);
1353
+ re(e), be(n);
1354
1354
  }
1355
1355
  }
1356
1356
  function Us(t) {
1357
1357
  S === null && (k === null && hs(), ps()), Be && ds();
1358
1358
  }
1359
1359
  function Ys(t, e) {
1360
- var i = e.last;
1361
- i === null ? e.last = e.first = t : (i.next = t, t.prev = i, e.last = t);
1360
+ var n = e.last;
1361
+ n === null ? e.last = e.first = t : (n.next = t, t.prev = n, e.last = t);
1362
1362
  }
1363
- function Te(t, e, i) {
1364
- var n = S;
1365
- n !== null && (n.f & _e) !== 0 && (t |= _e);
1363
+ function Te(t, e, n) {
1364
+ var i = S;
1365
+ i !== null && (i.f & _e) !== 0 && (t |= _e);
1366
1366
  var r = {
1367
1367
  ctx: X,
1368
1368
  deps: null,
@@ -1372,14 +1372,14 @@ function Te(t, e, i) {
1372
1372
  fn: e,
1373
1373
  last: null,
1374
1374
  next: null,
1375
- parent: n,
1376
- b: n && n.b,
1375
+ parent: i,
1376
+ b: i && i.b,
1377
1377
  prev: null,
1378
1378
  teardown: null,
1379
1379
  wv: 0,
1380
1380
  ac: null
1381
1381
  };
1382
- if (i)
1382
+ if (n)
1383
1383
  try {
1384
1384
  It(r);
1385
1385
  } catch (l) {
@@ -1387,8 +1387,8 @@ function Te(t, e, i) {
1387
1387
  }
1388
1388
  else e !== null && ae(r);
1389
1389
  var s = r;
1390
- if (i && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
1391
- (s.f & nt) === 0 && (s = s.first, (t & Le) !== 0 && (t & yt) !== 0 && s !== null && (s.f |= yt)), s !== null && (s.parent = n, n !== null && Ys(s, n), k !== null && (k.f & N) !== 0 && (t & He) === 0)) {
1390
+ if (n && s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
1391
+ (s.f & it) === 0 && (s = s.first, (t & Le) !== 0 && (t & yt) !== 0 && s !== null && (s.f |= yt)), s !== null && (s.parent = i, i !== null && Ys(s, i), k !== null && (k.f & N) !== 0 && (t & He) === 0)) {
1392
1392
  var o = (
1393
1393
  /** @type {Derived} */
1394
1394
  k
@@ -1397,148 +1397,148 @@ function Te(t, e, i) {
1397
1397
  }
1398
1398
  return r;
1399
1399
  }
1400
- function Gi() {
1400
+ function Un() {
1401
1401
  return k !== null && !ce;
1402
1402
  }
1403
1403
  function qs(t) {
1404
- const e = Te(ri, null, !1);
1404
+ const e = Te(sn, null, !1);
1405
1405
  return R(e, L), e.teardown = t, e;
1406
1406
  }
1407
- function zi(t) {
1407
+ function zn(t) {
1408
1408
  Us();
1409
1409
  var e = (
1410
1410
  /** @type {Effect} */
1411
1411
  S.f
1412
- ), i = !k && (e & we) !== 0 && (e & St) === 0;
1413
- if (i) {
1414
- var n = (
1412
+ ), n = !k && (e & we) !== 0 && (e & St) === 0;
1413
+ if (n) {
1414
+ var i = (
1415
1415
  /** @type {ComponentContext} */
1416
1416
  X
1417
1417
  );
1418
- (n.e ?? (n.e = [])).push(t);
1418
+ (i.e ?? (i.e = [])).push(t);
1419
1419
  } else
1420
- return Zn(t);
1420
+ return Zi(t);
1421
1421
  }
1422
- function Zn(t) {
1422
+ function Zi(t) {
1423
1423
  return Te(Lt | ls, t, !1);
1424
1424
  }
1425
1425
  function Ws(t) {
1426
- Oe.ensure();
1427
- const e = Te(He | nt, t, !0);
1426
+ ze.ensure();
1427
+ const e = Te(He | it, t, !0);
1428
1428
  return () => {
1429
1429
  U(e);
1430
1430
  };
1431
1431
  }
1432
1432
  function Ks(t) {
1433
- Oe.ensure();
1434
- const e = Te(He | nt, t, !0);
1435
- return (i = {}) => new Promise((n) => {
1436
- i.outro ? Ot(e, () => {
1437
- U(e), n(void 0);
1438
- }) : (U(e), n(void 0));
1433
+ ze.ensure();
1434
+ const e = Te(He | it, t, !0);
1435
+ return (n = {}) => new Promise((i) => {
1436
+ n.outro ? zt(e, () => {
1437
+ U(e), i(void 0);
1438
+ }) : (U(e), i(void 0));
1439
1439
  });
1440
1440
  }
1441
1441
  function er(t) {
1442
1442
  return Te(Lt, t, !1);
1443
1443
  }
1444
1444
  function Xs(t) {
1445
- return Te(Ci | nt, t, !0);
1445
+ return Te(Dn | it, t, !0);
1446
1446
  }
1447
- function Ui(t, e = 0) {
1448
- return Te(ri | e, t, !0);
1447
+ function Yn(t, e = 0) {
1448
+ return Te(sn | e, t, !0);
1449
1449
  }
1450
- function Et(t, e = [], i = [], n = []) {
1451
- Ls(n, e, i, (r) => {
1452
- Te(ri, () => t(...r.map(v)), !0);
1450
+ function Et(t, e = [], n = [], i = []) {
1451
+ Ls(i, e, n, (r) => {
1452
+ Te(sn, () => t(...r.map(v)), !0);
1453
1453
  });
1454
1454
  }
1455
1455
  function tr(t, e = 0) {
1456
- var i = Te(Le | e, t, !0);
1457
- return i;
1456
+ var n = Te(Le | e, t, !0);
1457
+ return n;
1458
1458
  }
1459
1459
  function Ne(t) {
1460
- return Te(we | nt, t, !0);
1460
+ return Te(we | it, t, !0);
1461
1461
  }
1462
- function ir(t) {
1462
+ function nr(t) {
1463
1463
  var e = t.teardown;
1464
1464
  if (e !== null) {
1465
- const i = Be, n = k;
1466
- fn(!0), re(null);
1465
+ const n = Be, i = k;
1466
+ fi(!0), re(null);
1467
1467
  try {
1468
1468
  e.call(null);
1469
1469
  } finally {
1470
- fn(i), re(n);
1470
+ fi(n), re(i);
1471
1471
  }
1472
1472
  }
1473
1473
  }
1474
- function Yi(t, e = !1) {
1475
- var i = t.first;
1476
- for (t.first = t.last = null; i !== null; ) {
1477
- const r = i.ac;
1478
- r !== null && Qn(() => {
1474
+ function qn(t, e = !1) {
1475
+ var n = t.first;
1476
+ for (t.first = t.last = null; n !== null; ) {
1477
+ const r = n.ac;
1478
+ r !== null && Qi(() => {
1479
1479
  r.abort(Ue);
1480
1480
  });
1481
- var n = i.next;
1482
- (i.f & He) !== 0 ? i.parent = null : U(i, e), i = n;
1481
+ var i = n.next;
1482
+ (n.f & He) !== 0 ? n.parent = null : U(n, e), n = i;
1483
1483
  }
1484
1484
  }
1485
1485
  function Js(t) {
1486
1486
  for (var e = t.first; e !== null; ) {
1487
- var i = e.next;
1488
- (e.f & we) === 0 && U(e), e = i;
1487
+ var n = e.next;
1488
+ (e.f & we) === 0 && U(e), e = n;
1489
1489
  }
1490
1490
  }
1491
1491
  function U(t, e = !0) {
1492
- var i = !1;
1493
- (e || (t.f & $n) !== 0) && t.nodes !== null && t.nodes.end !== null && (Qs(
1492
+ var n = !1;
1493
+ (e || (t.f & $i) !== 0) && t.nodes !== null && t.nodes.end !== null && (Qs(
1494
1494
  t.nodes.start,
1495
1495
  /** @type {TemplateNode} */
1496
1496
  t.nodes.end
1497
- ), i = !0), Yi(t, e && !i), Mt(t, 0), R(t, ze);
1498
- var n = t.nodes && t.nodes.t;
1499
- if (n !== null)
1500
- for (const s of n)
1497
+ ), n = !0), qn(t, e && !n), Mt(t, 0), R(t, Oe);
1498
+ var i = t.nodes && t.nodes.t;
1499
+ if (i !== null)
1500
+ for (const s of i)
1501
1501
  s.stop();
1502
- ir(t);
1502
+ nr(t);
1503
1503
  var r = t.parent;
1504
- r !== null && r.first !== null && nr(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
1504
+ r !== null && r.first !== null && ir(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
1505
1505
  }
1506
1506
  function Qs(t, e) {
1507
1507
  for (; t !== null; ) {
1508
- var i = t === e ? null : /* @__PURE__ */ Me(t);
1509
- t.remove(), t = i;
1508
+ var n = t === e ? null : /* @__PURE__ */ Me(t);
1509
+ t.remove(), t = n;
1510
1510
  }
1511
1511
  }
1512
- function nr(t) {
1513
- var e = t.parent, i = t.prev, n = t.next;
1514
- i !== null && (i.next = n), n !== null && (n.prev = i), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = i));
1512
+ function ir(t) {
1513
+ var e = t.parent, n = t.prev, i = t.next;
1514
+ n !== null && (n.next = i), i !== null && (i.prev = n), e !== null && (e.first === t && (e.first = i), e.last === t && (e.last = n));
1515
1515
  }
1516
- function Ot(t, e, i = !0) {
1517
- var n = [];
1518
- rr(t, n, !0);
1516
+ function zt(t, e, n = !0) {
1517
+ var i = [];
1518
+ rr(t, i, !0);
1519
1519
  var r = () => {
1520
- i && U(t), e && e();
1521
- }, s = n.length;
1520
+ n && U(t), e && e();
1521
+ }, s = i.length;
1522
1522
  if (s > 0) {
1523
1523
  var o = () => --s || r();
1524
- for (var l of n)
1524
+ for (var l of i)
1525
1525
  l.out(o);
1526
1526
  } else
1527
1527
  r();
1528
1528
  }
1529
- function rr(t, e, i) {
1529
+ function rr(t, e, n) {
1530
1530
  if ((t.f & _e) === 0) {
1531
1531
  t.f ^= _e;
1532
- var n = t.nodes && t.nodes.t;
1533
- if (n !== null)
1534
- for (const l of n)
1535
- (l.is_global || i) && e.push(l);
1532
+ var i = t.nodes && t.nodes.t;
1533
+ if (i !== null)
1534
+ for (const l of i)
1535
+ (l.is_global || n) && e.push(l);
1536
1536
  for (var r = t.first; r !== null; ) {
1537
1537
  var s = r.next, o = (r.f & yt) !== 0 || // If this is a branch effect without a block effect parent,
1538
1538
  // it means the parent block effect was pruned. In that case,
1539
1539
  // transparency information was transferred to the branch effect.
1540
1540
  (r.f & we) !== 0 && (t.f & Le) !== 0;
1541
- rr(r, e, o ? i : !1), r = s;
1541
+ rr(r, e, o ? n : !1), r = s;
1542
1542
  }
1543
1543
  }
1544
1544
  }
@@ -1548,9 +1548,9 @@ function Zs(t) {
1548
1548
  function sr(t, e) {
1549
1549
  if ((t.f & _e) !== 0) {
1550
1550
  t.f ^= _e, (t.f & L) === 0 && (R(t, V), ae(t));
1551
- for (var i = t.first; i !== null; ) {
1552
- var n = i.next, r = (i.f & yt) !== 0 || (i.f & we) !== 0;
1553
- sr(i, r ? e : !1), i = n;
1551
+ for (var n = t.first; n !== null; ) {
1552
+ var i = n.next, r = (n.f & yt) !== 0 || (n.f & we) !== 0;
1553
+ sr(n, r ? e : !1), n = i;
1554
1554
  }
1555
1555
  var s = t.nodes && t.nodes.t;
1556
1556
  if (s !== null)
@@ -1560,13 +1560,13 @@ function sr(t, e) {
1560
1560
  }
1561
1561
  function or(t, e) {
1562
1562
  if (t.nodes)
1563
- for (var i = t.nodes.start, n = t.nodes.end; i !== null; ) {
1564
- var r = i === n ? null : /* @__PURE__ */ Me(i);
1565
- e.append(i), i = r;
1563
+ for (var n = t.nodes.start, i = t.nodes.end; n !== null; ) {
1564
+ var r = n === i ? null : /* @__PURE__ */ Me(n);
1565
+ e.append(n), n = r;
1566
1566
  }
1567
1567
  }
1568
1568
  let Jt = !1, Be = !1;
1569
- function fn(t) {
1569
+ function fi(t) {
1570
1570
  Be = t;
1571
1571
  }
1572
1572
  let k = null, ce = !1;
@@ -1577,16 +1577,16 @@ let S = null;
1577
1577
  function be(t) {
1578
1578
  S = t;
1579
1579
  }
1580
- let ie = null;
1580
+ let ne = null;
1581
1581
  function lr(t) {
1582
- k !== null && (ie === null ? ie = [t] : ie.push(t));
1582
+ k !== null && (ne === null ? ne = [t] : ne.push(t));
1583
1583
  }
1584
1584
  let G = null, q = 0, Q = null;
1585
1585
  function eo(t) {
1586
1586
  Q = t;
1587
1587
  }
1588
1588
  let ar = 1, We = 0, tt = We;
1589
- function dn(t) {
1589
+ function di(t) {
1590
1590
  tt = t;
1591
1591
  }
1592
1592
  function cr() {
@@ -1596,16 +1596,16 @@ function Bt(t) {
1596
1596
  var e = t.f;
1597
1597
  if ((e & V) !== 0)
1598
1598
  return !0;
1599
- if (e & N && (t.f &= ~it), (e & ue) !== 0) {
1600
- for (var i = (
1599
+ if (e & N && (t.f &= ~nt), (e & ue) !== 0) {
1600
+ for (var n = (
1601
1601
  /** @type {Value[]} */
1602
1602
  t.deps
1603
- ), n = i.length, r = 0; r < n; r++) {
1604
- var s = i[r];
1603
+ ), i = n.length, r = 0; r < i; r++) {
1604
+ var s = n[r];
1605
1605
  if (Bt(
1606
1606
  /** @type {Derived} */
1607
1607
  s
1608
- ) && Un(
1608
+ ) && Ui(
1609
1609
  /** @type {Derived} */
1610
1610
  s
1611
1611
  ), s.wv > t.wv)
@@ -1617,17 +1617,17 @@ function Bt(t) {
1617
1617
  }
1618
1618
  return !1;
1619
1619
  }
1620
- function ur(t, e, i = !0) {
1621
- var n = t.reactions;
1622
- if (n !== null && !(ie !== null && bt.call(ie, t)))
1623
- for (var r = 0; r < n.length; r++) {
1624
- var s = n[r];
1620
+ function ur(t, e, n = !0) {
1621
+ var i = t.reactions;
1622
+ if (i !== null && !(ne !== null && bt.call(ne, t)))
1623
+ for (var r = 0; r < i.length; r++) {
1624
+ var s = i[r];
1625
1625
  (s.f & N) !== 0 ? ur(
1626
1626
  /** @type {Derived} */
1627
1627
  s,
1628
1628
  e,
1629
1629
  !1
1630
- ) : e === s && (i ? R(s, V) : (s.f & L) !== 0 && R(s, ue), ae(
1630
+ ) : e === s && (n ? R(s, V) : (s.f & L) !== 0 && R(s, ue), ae(
1631
1631
  /** @type {Effect} */
1632
1632
  s
1633
1633
  ));
@@ -1635,13 +1635,13 @@ function ur(t, e, i = !0) {
1635
1635
  }
1636
1636
  function fr(t) {
1637
1637
  var _;
1638
- var e = G, i = q, n = Q, r = k, s = ie, o = X, l = ce, a = tt, u = t.f;
1638
+ var e = G, n = q, i = Q, r = k, s = ne, o = X, l = ce, a = tt, u = t.f;
1639
1639
  G = /** @type {null | Value[]} */
1640
- null, q = 0, Q = null, k = (u & (we | He)) === 0 ? t : null, ie = null, wt(t.ctx), ce = !1, tt = ++We, t.ac !== null && (Qn(() => {
1640
+ null, q = 0, Q = null, k = (u & (we | He)) === 0 ? t : null, ne = null, wt(t.ctx), ce = !1, tt = ++We, t.ac !== null && (Qi(() => {
1641
1641
  t.ac.abort(Ue);
1642
1642
  }), t.ac = null);
1643
1643
  try {
1644
- t.f |= wi;
1644
+ t.f |= Tn;
1645
1645
  var f = (
1646
1646
  /** @type {Function} */
1647
1647
  t.fn
@@ -1655,11 +1655,11 @@ function fr(t) {
1655
1655
  d[q + g] = G[g];
1656
1656
  else
1657
1657
  t.deps = d = G;
1658
- if (Gi() && (t.f & te) !== 0)
1658
+ if (Un() && (t.f & te) !== 0)
1659
1659
  for (g = q; g < d.length; g++)
1660
1660
  ((_ = d[g]).reactions ?? (_.reactions = [])).push(t);
1661
1661
  } else !p && d !== null && q < d.length && (Mt(t, q), d.length = q);
1662
- if (Ln() && Q !== null && !ce && d !== null && (t.f & (N | ue | V)) === 0)
1662
+ if (Li() && Q !== null && !ce && d !== null && (t.f & (N | ue | V)) === 0)
1663
1663
  for (g = 0; g < /** @type {Source[]} */
1664
1664
  Q.length; g++)
1665
1665
  ur(
@@ -1669,31 +1669,31 @@ function fr(t) {
1669
1669
  );
1670
1670
  if (r !== null && r !== t) {
1671
1671
  if (We++, r.deps !== null)
1672
- for (let b = 0; b < i; b += 1)
1672
+ for (let b = 0; b < n; b += 1)
1673
1673
  r.deps[b].rv = We;
1674
1674
  if (e !== null)
1675
1675
  for (const b of e)
1676
1676
  b.rv = We;
1677
- Q !== null && (n === null ? n = Q : n.push(.../** @type {Source[]} */
1677
+ Q !== null && (i === null ? i = Q : i.push(.../** @type {Source[]} */
1678
1678
  Q));
1679
1679
  }
1680
1680
  return (t.f & Ce) !== 0 && (t.f ^= Ce), h;
1681
1681
  } catch (b) {
1682
- return Pn(b);
1682
+ return Pi(b);
1683
1683
  } finally {
1684
- t.f ^= wi, G = e, q = i, Q = n, k = r, ie = s, wt(o), ce = l, tt = a;
1684
+ t.f ^= Tn, G = e, q = n, Q = i, k = r, ne = s, wt(o), ce = l, tt = a;
1685
1685
  }
1686
1686
  }
1687
1687
  function to(t, e) {
1688
- let i = e.reactions;
1689
- if (i !== null) {
1690
- var n = es.call(i, t);
1691
- if (n !== -1) {
1692
- var r = i.length - 1;
1693
- r === 0 ? i = e.reactions = null : (i[n] = i[r], i.pop());
1688
+ let n = e.reactions;
1689
+ if (n !== null) {
1690
+ var i = es.call(n, t);
1691
+ if (i !== -1) {
1692
+ var r = n.length - 1;
1693
+ r === 0 ? n = e.reactions = null : (n[i] = n[r], n.pop());
1694
1694
  }
1695
1695
  }
1696
- if (i === null && (e.f & N) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1696
+ if (n === null && (e.f & N) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1697
1697
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1698
1698
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1699
1699
  (G === null || !bt.call(G, e))) {
@@ -1701,39 +1701,39 @@ function to(t, e) {
1701
1701
  /** @type {Derived} */
1702
1702
  e
1703
1703
  );
1704
- (s.f & te) !== 0 && (s.f ^= te, s.f &= ~it), ji(s), Ds(s), Mt(s, 0);
1704
+ (s.f & te) !== 0 && (s.f ^= te, s.f &= ~nt), Fn(s), Ds(s), Mt(s, 0);
1705
1705
  }
1706
1706
  }
1707
1707
  function Mt(t, e) {
1708
- var i = t.deps;
1709
- if (i !== null)
1710
- for (var n = e; n < i.length; n++)
1711
- to(t, i[n]);
1708
+ var n = t.deps;
1709
+ if (n !== null)
1710
+ for (var i = e; i < n.length; i++)
1711
+ to(t, n[i]);
1712
1712
  }
1713
1713
  function It(t) {
1714
1714
  var e = t.f;
1715
- if ((e & ze) === 0) {
1715
+ if ((e & Oe) === 0) {
1716
1716
  R(t, L);
1717
- var i = S, n = Jt;
1717
+ var n = S, i = Jt;
1718
1718
  S = t, Jt = !0;
1719
1719
  try {
1720
- (e & (Le | xn)) !== 0 ? Js(t) : Yi(t), ir(t);
1720
+ (e & (Le | xi)) !== 0 ? Js(t) : qn(t), nr(t);
1721
1721
  var r = fr(t);
1722
1722
  t.teardown = typeof r == "function" ? r : null, t.wv = ar;
1723
1723
  var s;
1724
- bi && Ss && (t.f & V) !== 0 && t.deps;
1724
+ yn && Ss && (t.f & V) !== 0 && t.deps;
1725
1725
  } finally {
1726
- Jt = n, S = i;
1726
+ Jt = i, S = n;
1727
1727
  }
1728
1728
  }
1729
1729
  }
1730
1730
  function v(t) {
1731
- var e = t.f, i = (e & N) !== 0;
1731
+ var e = t.f, n = (e & N) !== 0;
1732
1732
  if (k !== null && !ce) {
1733
- var n = S !== null && (S.f & ze) !== 0;
1734
- if (!n && (ie === null || !bt.call(ie, t))) {
1733
+ var i = S !== null && (S.f & Oe) !== 0;
1734
+ if (!i && (ne === null || !bt.call(ne, t))) {
1735
1735
  var r = k.deps;
1736
- if ((k.f & wi) !== 0)
1736
+ if ((k.f & Tn) !== 0)
1737
1737
  t.rv < We && (t.rv = We, G === null && r !== null && r[q] === t ? q++ : G === null ? G = [t] : G.push(t));
1738
1738
  else {
1739
1739
  (k.deps ?? (k.deps = [])).push(t);
@@ -1744,17 +1744,17 @@ function v(t) {
1744
1744
  }
1745
1745
  if (Be && je.has(t))
1746
1746
  return je.get(t);
1747
- if (i) {
1747
+ if (n) {
1748
1748
  var o = (
1749
1749
  /** @type {Derived} */
1750
1750
  t
1751
1751
  );
1752
1752
  if (Be) {
1753
1753
  var l = o.v;
1754
- return ((o.f & L) === 0 && o.reactions !== null || pr(o)) && (l = Bi(o)), je.set(o, l), l;
1754
+ return ((o.f & L) === 0 && o.reactions !== null || pr(o)) && (l = Hn(o)), je.set(o, l), l;
1755
1755
  }
1756
1756
  var a = (o.f & te) === 0 && !ce && k !== null && (Jt || (k.f & te) !== 0), u = (o.f & St) === 0;
1757
- Bt(o) && (a && (o.f |= te), Un(o)), a && !u && (Yn(o), dr(o));
1757
+ Bt(o) && (a && (o.f |= te), Ui(o)), a && !u && (Yi(o), dr(o));
1758
1758
  }
1759
1759
  if (le?.has(t))
1760
1760
  return le.get(t);
@@ -1765,7 +1765,7 @@ function v(t) {
1765
1765
  function dr(t) {
1766
1766
  if (t.f |= te, t.deps !== null)
1767
1767
  for (const e of t.deps)
1768
- (e.reactions ?? (e.reactions = [])).push(t), (e.f & N) !== 0 && (e.f & te) === 0 && (Yn(
1768
+ (e.reactions ?? (e.reactions = [])).push(t), (e.f & N) !== 0 && (e.f & te) === 0 && (Yi(
1769
1769
  /** @type {Derived} */
1770
1770
  e
1771
1771
  ), dr(
@@ -1784,7 +1784,7 @@ function pr(t) {
1784
1784
  return !0;
1785
1785
  return !1;
1786
1786
  }
1787
- function qi(t) {
1787
+ function Wn(t) {
1788
1788
  var e = ce;
1789
1789
  try {
1790
1790
  return ce = !0, t();
@@ -1792,27 +1792,27 @@ function qi(t) {
1792
1792
  ce = e;
1793
1793
  }
1794
1794
  }
1795
- const Ke = /* @__PURE__ */ Symbol("events"), hr = /* @__PURE__ */ new Set(), Oi = /* @__PURE__ */ new Set();
1796
- function lt(t, e, i) {
1797
- (e[Ke] ?? (e[Ke] = {}))[t] = i;
1795
+ const Ke = /* @__PURE__ */ Symbol("events"), hr = /* @__PURE__ */ new Set(), Ln = /* @__PURE__ */ new Set();
1796
+ function lt(t, e, n) {
1797
+ (e[Ke] ?? (e[Ke] = {}))[t] = n;
1798
1798
  }
1799
- function io(t) {
1799
+ function no(t) {
1800
1800
  for (var e = 0; e < t.length; e++)
1801
1801
  hr.add(t[e]);
1802
- for (var i of Oi)
1803
- i(t);
1802
+ for (var n of Ln)
1803
+ n(t);
1804
1804
  }
1805
- let pn = null;
1806
- function hn(t) {
1807
- var e = this, i = (
1805
+ let pi = null;
1806
+ function hi(t) {
1807
+ var e = this, n = (
1808
1808
  /** @type {Node} */
1809
1809
  e.ownerDocument
1810
- ), n = t.type, r = t.composedPath?.() || [], s = (
1810
+ ), i = t.type, r = t.composedPath?.() || [], s = (
1811
1811
  /** @type {null | Element} */
1812
1812
  r[0] || t.target
1813
1813
  );
1814
- pn = t;
1815
- var o = 0, l = pn === t && t[Ke];
1814
+ pi = t;
1815
+ var o = 0, l = pi === t && t[Ke];
1816
1816
  if (l) {
1817
1817
  var a = r.indexOf(l);
1818
1818
  if (a !== -1 && (e === document || e === /** @type {any} */
@@ -1827,10 +1827,10 @@ function hn(t) {
1827
1827
  }
1828
1828
  if (s = /** @type {Element} */
1829
1829
  r[o] || t.target, s !== e) {
1830
- ei(t, "currentTarget", {
1830
+ en(t, "currentTarget", {
1831
1831
  configurable: !0,
1832
1832
  get() {
1833
- return s || i;
1833
+ return s || n;
1834
1834
  }
1835
1835
  });
1836
1836
  var f = k, h = S;
@@ -1840,7 +1840,7 @@ function hn(t) {
1840
1840
  var g = s.assignedSlot || s.parentNode || /** @type {any} */
1841
1841
  s.host || null;
1842
1842
  try {
1843
- var _ = s[Ke]?.[n];
1843
+ var _ = s[Ke]?.[i];
1844
1844
  _ != null && (!/** @type {any} */
1845
1845
  s.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1846
1846
  // -> the target could not have been disabled because it emits the event in the first place
@@ -1864,7 +1864,7 @@ function hn(t) {
1864
1864
  }
1865
1865
  }
1866
1866
  }
1867
- const no = (
1867
+ const io = (
1868
1868
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
1869
1869
  globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
1870
1870
  /** @param {string} html */
@@ -1874,33 +1874,33 @@ const no = (
1874
1874
  function ro(t) {
1875
1875
  return (
1876
1876
  /** @type {string} */
1877
- no?.createHTML(t) ?? t
1877
+ io?.createHTML(t) ?? t
1878
1878
  );
1879
1879
  }
1880
1880
  function so(t, e = !1) {
1881
- var i = Hi("template");
1882
- return t = t.replaceAll("<!>", "<!---->"), i.innerHTML = e ? ro(t) : t, i.content;
1881
+ var n = Gn("template");
1882
+ return t = t.replaceAll("<!>", "<!---->"), n.innerHTML = e ? ro(t) : t, n.content;
1883
1883
  }
1884
1884
  function Fe(t, e) {
1885
- var i = (
1885
+ var n = (
1886
1886
  /** @type {Effect} */
1887
1887
  S
1888
1888
  );
1889
- i.nodes === null && (i.nodes = { start: t, end: e, a: null, t: null });
1889
+ n.nodes === null && (n.nodes = { start: t, end: e, a: null, t: null });
1890
1890
  }
1891
1891
  // @__NO_SIDE_EFFECTS__
1892
1892
  function ke(t, e) {
1893
- var i = (e & Jr) !== 0, n = (e & Qr) !== 0, r, s = !t.startsWith("<!>");
1893
+ var n = (e & Jr) !== 0, i = (e & Qr) !== 0, r, s = !t.startsWith("<!>");
1894
1894
  return () => {
1895
1895
  if ($)
1896
1896
  return Fe(x, null), x;
1897
- r === void 0 && (r = so(s ? t : "<!>" + t, !0), i || (r = /** @type {TemplateNode} */
1897
+ r === void 0 && (r = so(s ? t : "<!>" + t, !0), n || (r = /** @type {TemplateNode} */
1898
1898
  /* @__PURE__ */ kt(r)));
1899
1899
  var o = (
1900
1900
  /** @type {TemplateNode} */
1901
- n || Kn ? document.importNode(r, !0) : r.cloneNode(!0)
1901
+ i || Ki ? document.importNode(r, !0) : r.cloneNode(!0)
1902
1902
  );
1903
- if (i) {
1903
+ if (n) {
1904
1904
  var l = (
1905
1905
  /** @type {TemplateNode} */
1906
1906
  /* @__PURE__ */ kt(o)
@@ -1919,25 +1919,25 @@ function oo(t = "") {
1919
1919
  var e = fe(t + "");
1920
1920
  return Fe(e, e), e;
1921
1921
  }
1922
- var i = x;
1923
- return i.nodeType !== jt ? (i.before(i = fe()), ne(i)) : ai(
1922
+ var n = x;
1923
+ return n.nodeType !== jt ? (n.before(n = fe()), ie(n)) : cn(
1924
1924
  /** @type {Text} */
1925
- i
1926
- ), Fe(i, i), i;
1925
+ n
1926
+ ), Fe(n, n), n;
1927
1927
  }
1928
1928
  function lo() {
1929
1929
  if ($)
1930
1930
  return Fe(x, null), x;
1931
- var t = document.createDocumentFragment(), e = document.createComment(""), i = fe();
1932
- return t.append(e, i), Fe(e, i), t;
1931
+ var t = document.createDocumentFragment(), e = document.createComment(""), n = fe();
1932
+ return t.append(e, n), Fe(e, n), t;
1933
1933
  }
1934
1934
  function Y(t, e) {
1935
1935
  if ($) {
1936
- var i = (
1936
+ var n = (
1937
1937
  /** @type {Effect & { nodes: EffectNodes }} */
1938
1938
  S
1939
1939
  );
1940
- ((i.f & St) === 0 || i.nodes.end === null) && (i.nodes.end = x), Di();
1940
+ ((n.f & St) === 0 || n.nodes.end === null) && (n.nodes.end = x), jn();
1941
1941
  return;
1942
1942
  }
1943
1943
  t !== null && t.before(
@@ -1950,22 +1950,22 @@ function co(t) {
1950
1950
  return ao.includes(t);
1951
1951
  }
1952
1952
  function Yt(t, e) {
1953
- var i = e == null ? "" : typeof e == "object" ? e + "" : e;
1954
- i !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = i, t.nodeValue = i + "");
1953
+ var n = e == null ? "" : typeof e == "object" ? e + "" : e;
1954
+ n !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = n, t.nodeValue = n + "");
1955
1955
  }
1956
1956
  function vr(t, e) {
1957
1957
  return gr(t, e);
1958
1958
  }
1959
1959
  function uo(t, e) {
1960
- Ri(), e.intro = e.intro ?? !1;
1961
- const i = e.target, n = $, r = x;
1960
+ On(), e.intro = e.intro ?? !1;
1961
+ const n = e.target, i = $, r = x;
1962
1962
  try {
1963
- for (var s = /* @__PURE__ */ kt(i); s && (s.nodeType !== si || /** @type {Comment} */
1964
- s.data !== Ni); )
1963
+ for (var s = /* @__PURE__ */ kt(n); s && (s.nodeType !== on || /** @type {Comment} */
1964
+ s.data !== Vn); )
1965
1965
  s = /* @__PURE__ */ Me(s);
1966
1966
  if (!s)
1967
1967
  throw _t;
1968
- ct(!0), ne(
1968
+ ct(!0), ie(
1969
1969
  /** @type {Comment} */
1970
1970
  s
1971
1971
  );
@@ -1976,17 +1976,17 @@ function uo(t, e) {
1976
1976
  if (o instanceof Error && o.message.split(`
1977
1977
  `).some((l) => l.startsWith("https://svelte.dev/e/")))
1978
1978
  throw o;
1979
- return o !== _t && console.warn("Failed to hydrate: ", o), e.recover === !1 && gs(), Ri(), Bs(i), ct(!1), vr(t, e);
1979
+ return o !== _t && console.warn("Failed to hydrate: ", o), e.recover === !1 && gs(), On(), Bs(n), ct(!1), vr(t, e);
1980
1980
  } finally {
1981
- ct(n), ne(r);
1981
+ ct(i), ie(r);
1982
1982
  }
1983
1983
  }
1984
1984
  const qt = /* @__PURE__ */ new Map();
1985
- function gr(t, { target: e, anchor: i, props: n = {}, events: r, context: s, intro: o = !0 }) {
1986
- Ri();
1985
+ function gr(t, { target: e, anchor: n, props: i = {}, events: r, context: s, intro: o = !0 }) {
1986
+ On();
1987
1987
  var l = void 0, a = Ks(() => {
1988
- var u = i ?? e.appendChild(fe());
1989
- zs(
1988
+ var u = n ?? e.appendChild(fe());
1989
+ Os(
1990
1990
  /** @type {TemplateNode} */
1991
1991
  u,
1992
1992
  {
@@ -1994,19 +1994,19 @@ function gr(t, { target: e, anchor: i, props: n = {}, events: r, context: s, int
1994
1994
  }
1995
1995
  },
1996
1996
  (d) => {
1997
- zn({});
1997
+ Oi({});
1998
1998
  var p = (
1999
1999
  /** @type {ComponentContext} */
2000
2000
  X
2001
2001
  );
2002
- if (s && (p.c = s), r && (n.$$events = r), $ && Fe(
2002
+ if (s && (p.c = s), r && (i.$$events = r), $ && Fe(
2003
2003
  /** @type {TemplateNode} */
2004
2004
  d,
2005
2005
  null
2006
- ), l = t(d, n) || {}, $ && (S.nodes.end = x, x === null || x.nodeType !== si || /** @type {Comment} */
2007
- x.data !== Tn))
2008
- throw oi(), _t;
2009
- On();
2006
+ ), l = t(d, i) || {}, $ && (S.nodes.end = x, x === null || x.nodeType !== on || /** @type {Comment} */
2007
+ x.data !== Ti))
2008
+ throw ln(), _t;
2009
+ zi();
2010
2010
  }
2011
2011
  );
2012
2012
  var f = /* @__PURE__ */ new Set(), h = (d) => {
@@ -2015,16 +2015,16 @@ function gr(t, { target: e, anchor: i, props: n = {}, events: r, context: s, int
2015
2015
  if (!f.has(g)) {
2016
2016
  f.add(g);
2017
2017
  var _ = co(g);
2018
- for (const O of [e, document]) {
2019
- var b = qt.get(O);
2020
- b === void 0 && (b = /* @__PURE__ */ new Map(), qt.set(O, b));
2018
+ for (const z of [e, document]) {
2019
+ var b = qt.get(z);
2020
+ b === void 0 && (b = /* @__PURE__ */ new Map(), qt.set(z, b));
2021
2021
  var A = b.get(g);
2022
- A === void 0 ? (O.addEventListener(g, hn, { passive: _ }), b.set(g, 1)) : b.set(g, A + 1);
2022
+ A === void 0 ? (z.addEventListener(g, hi, { passive: _ }), b.set(g, 1)) : b.set(g, A + 1);
2023
2023
  }
2024
2024
  }
2025
2025
  }
2026
2026
  };
2027
- return h(ts(hr)), Oi.add(h), () => {
2027
+ return h(ts(hr)), Ln.add(h), () => {
2028
2028
  for (var d of f)
2029
2029
  for (const _ of [e, document]) {
2030
2030
  var p = (
@@ -2034,25 +2034,25 @@ function gr(t, { target: e, anchor: i, props: n = {}, events: r, context: s, int
2034
2034
  /** @type {number} */
2035
2035
  p.get(d)
2036
2036
  );
2037
- --g == 0 ? (_.removeEventListener(d, hn), p.delete(d), p.size === 0 && qt.delete(_)) : p.set(d, g);
2037
+ --g == 0 ? (_.removeEventListener(d, hi), p.delete(d), p.size === 0 && qt.delete(_)) : p.set(d, g);
2038
2038
  }
2039
- Oi.delete(h), u !== i && u.parentNode?.removeChild(u);
2039
+ Ln.delete(h), u !== n && u.parentNode?.removeChild(u);
2040
2040
  };
2041
2041
  });
2042
- return Li.set(l, a), l;
2042
+ return Mn.set(l, a), l;
2043
2043
  }
2044
- let Li = /* @__PURE__ */ new WeakMap();
2044
+ let Mn = /* @__PURE__ */ new WeakMap();
2045
2045
  function fo(t, e) {
2046
- const i = Li.get(t);
2047
- return i ? (Li.delete(t), i(e)) : Promise.resolve();
2046
+ const n = Mn.get(t);
2047
+ return n ? (Mn.delete(t), n(e)) : Promise.resolve();
2048
2048
  }
2049
- var oe, me, K, et, Ct, Dt, ni;
2049
+ var oe, me, K, et, Ct, Dt, rn;
2050
2050
  class po {
2051
2051
  /**
2052
2052
  * @param {TemplateNode} anchor
2053
2053
  * @param {boolean} transition
2054
2054
  */
2055
- constructor(e, i = !0) {
2055
+ constructor(e, n = !0) {
2056
2056
  /** @type {TemplateNode} */
2057
2057
  T(this, "anchor");
2058
2058
  /** @type {Map<Batch, Key>} */
@@ -2094,15 +2094,15 @@ class po {
2094
2094
  E
2095
2095
  );
2096
2096
  if (c(this, oe).has(e)) {
2097
- var i = (
2097
+ var n = (
2098
2098
  /** @type {Key} */
2099
2099
  c(this, oe).get(e)
2100
- ), n = c(this, me).get(i);
2101
- if (n)
2102
- Zs(n), c(this, et).delete(i);
2100
+ ), i = c(this, me).get(n);
2101
+ if (i)
2102
+ Zs(i), c(this, et).delete(n);
2103
2103
  else {
2104
- var r = c(this, K).get(i);
2105
- r && (c(this, me).set(i, r.effect), c(this, K).delete(i), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), n = r.effect);
2104
+ var r = c(this, K).get(n);
2105
+ r && (c(this, me).set(n, r.effect), c(this, K).delete(n), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), i = r.effect);
2106
2106
  }
2107
2107
  for (const [s, o] of c(this, oe)) {
2108
2108
  if (c(this, oe).delete(s), s === e)
@@ -2111,7 +2111,7 @@ class po {
2111
2111
  l && (U(l.effect), c(this, K).delete(o));
2112
2112
  }
2113
2113
  for (const [s, o] of c(this, me)) {
2114
- if (s === i || c(this, et).has(s)) continue;
2114
+ if (s === n || c(this, et).has(s)) continue;
2115
2115
  const l = () => {
2116
2116
  if (Array.from(c(this, oe).values()).includes(s)) {
2117
2117
  var u = document.createDocumentFragment();
@@ -2120,77 +2120,77 @@ class po {
2120
2120
  U(o);
2121
2121
  c(this, et).delete(s), c(this, me).delete(s);
2122
2122
  };
2123
- c(this, Ct) || !n ? (c(this, et).add(s), Ot(o, l, !1)) : l();
2123
+ c(this, Ct) || !i ? (c(this, et).add(s), zt(o, l, !1)) : l();
2124
2124
  }
2125
2125
  }
2126
2126
  });
2127
2127
  /**
2128
2128
  * @param {Batch} batch
2129
2129
  */
2130
- w(this, ni, (e) => {
2130
+ w(this, rn, (e) => {
2131
2131
  c(this, oe).delete(e);
2132
- const i = Array.from(c(this, oe).values());
2133
- for (const [n, r] of c(this, K))
2134
- i.includes(n) || (U(r.effect), c(this, K).delete(n));
2132
+ const n = Array.from(c(this, oe).values());
2133
+ for (const [i, r] of c(this, K))
2134
+ n.includes(i) || (U(r.effect), c(this, K).delete(i));
2135
2135
  });
2136
- this.anchor = e, y(this, Ct, i);
2136
+ this.anchor = e, y(this, Ct, n);
2137
2137
  }
2138
2138
  /**
2139
2139
  *
2140
2140
  * @param {any} key
2141
2141
  * @param {null | ((target: TemplateNode) => void)} fn
2142
2142
  */
2143
- ensure(e, i) {
2144
- var n = (
2143
+ ensure(e, n) {
2144
+ var i = (
2145
2145
  /** @type {Batch} */
2146
2146
  E
2147
2147
  ), r = Hs();
2148
- if (i && !c(this, me).has(e) && !c(this, K).has(e))
2148
+ if (n && !c(this, me).has(e) && !c(this, K).has(e))
2149
2149
  if (r) {
2150
2150
  var s = document.createDocumentFragment(), o = fe();
2151
2151
  s.append(o), c(this, K).set(e, {
2152
- effect: Ne(() => i(o)),
2152
+ effect: Ne(() => n(o)),
2153
2153
  fragment: s
2154
2154
  });
2155
2155
  } else
2156
2156
  c(this, me).set(
2157
2157
  e,
2158
- Ne(() => i(this.anchor))
2158
+ Ne(() => n(this.anchor))
2159
2159
  );
2160
- if (c(this, oe).set(n, e), r) {
2160
+ if (c(this, oe).set(i, e), r) {
2161
2161
  for (const [l, a] of c(this, me))
2162
- l === e ? n.unskip_effect(a) : n.skip_effect(a);
2162
+ l === e ? i.unskip_effect(a) : i.skip_effect(a);
2163
2163
  for (const [l, a] of c(this, K))
2164
- l === e ? n.unskip_effect(a.effect) : n.skip_effect(a.effect);
2165
- n.oncommit(c(this, Dt)), n.ondiscard(c(this, ni));
2164
+ l === e ? i.unskip_effect(a.effect) : i.skip_effect(a.effect);
2165
+ i.oncommit(c(this, Dt)), i.ondiscard(c(this, rn));
2166
2166
  } else
2167
2167
  $ && (this.anchor = x), c(this, Dt).call(this);
2168
2168
  }
2169
2169
  }
2170
- oe = new WeakMap(), me = new WeakMap(), K = new WeakMap(), et = new WeakMap(), Ct = new WeakMap(), Dt = new WeakMap(), ni = new WeakMap();
2170
+ oe = new WeakMap(), me = new WeakMap(), K = new WeakMap(), et = new WeakMap(), Ct = new WeakMap(), Dt = new WeakMap(), rn = new WeakMap();
2171
2171
  function ho(t) {
2172
- X === null && us(), zi(() => {
2173
- const e = qi(t);
2172
+ X === null && us(), zn(() => {
2173
+ const e = Wn(t);
2174
2174
  if (typeof e == "function") return (
2175
2175
  /** @type {() => void} */
2176
2176
  e
2177
2177
  );
2178
2178
  });
2179
2179
  }
2180
- function at(t, e, i = !1) {
2181
- $ && Di();
2182
- var n = new po(t), r = i ? yt : 0;
2180
+ function at(t, e, n = !1) {
2181
+ $ && jn();
2182
+ var i = new po(t), r = n ? yt : 0;
2183
2183
  function s(o, l) {
2184
2184
  if ($) {
2185
2185
  const f = Ts(t);
2186
2186
  var a;
2187
- if (f === Ni ? a = 0 : f === Vi ? a = !1 : a = parseInt(f.substring(1)), o !== a) {
2188
- var u = An();
2189
- ne(u), n.anchor = u, ct(!1), n.ensure(o, l), ct(!0);
2187
+ if (f === Vn ? a = 0 : f === Cn ? a = !1 : a = parseInt(f.substring(1)), o !== a) {
2188
+ var u = Ai();
2189
+ ie(u), i.anchor = u, ct(!1), i.ensure(o, l), ct(!0);
2190
2190
  return;
2191
2191
  }
2192
2192
  }
2193
- n.ensure(o, l);
2193
+ i.ensure(o, l);
2194
2194
  }
2195
2195
  tr(() => {
2196
2196
  var o = !1;
@@ -2201,47 +2201,47 @@ function at(t, e, i = !1) {
2201
2201
  }
2202
2202
  function vo(t, e) {
2203
2203
  er(() => {
2204
- var i = t.getRootNode(), n = (
2204
+ var n = t.getRootNode(), i = (
2205
2205
  /** @type {ShadowRoot} */
2206
- i.host ? (
2206
+ n.host ? (
2207
2207
  /** @type {ShadowRoot} */
2208
- i
2208
+ n
2209
2209
  ) : (
2210
2210
  /** @type {Document} */
2211
- i.head ?? /** @type {Document} */
2212
- i.ownerDocument.head
2211
+ n.head ?? /** @type {Document} */
2212
+ n.ownerDocument.head
2213
2213
  )
2214
2214
  );
2215
- if (!n.querySelector("#" + e.hash)) {
2216
- const r = Hi("style");
2217
- r.id = e.hash, r.textContent = e.code, n.appendChild(r);
2215
+ if (!i.querySelector("#" + e.hash)) {
2216
+ const r = Gn("style");
2217
+ r.id = e.hash, r.textContent = e.code, i.appendChild(r);
2218
2218
  }
2219
2219
  });
2220
2220
  }
2221
- const vn = [...`
2221
+ const vi = [...`
2222
2222
  \r\f \v\uFEFF`];
2223
- function go(t, e, i) {
2224
- var n = "" + t;
2225
- if (i) {
2226
- for (var r in i)
2227
- if (i[r])
2228
- n = n ? n + " " + r : r;
2229
- else if (n.length)
2230
- for (var s = r.length, o = 0; (o = n.indexOf(r, o)) >= 0; ) {
2223
+ function go(t, e, n) {
2224
+ var i = "" + t;
2225
+ if (n) {
2226
+ for (var r in n)
2227
+ if (n[r])
2228
+ i = i ? i + " " + r : r;
2229
+ else if (i.length)
2230
+ for (var s = r.length, o = 0; (o = i.indexOf(r, o)) >= 0; ) {
2231
2231
  var l = o + s;
2232
- (o === 0 || vn.includes(n[o - 1])) && (l === n.length || vn.includes(n[l])) ? n = (o === 0 ? "" : n.substring(0, o)) + n.substring(l + 1) : o = l;
2232
+ (o === 0 || vi.includes(i[o - 1])) && (l === i.length || vi.includes(i[l])) ? i = (o === 0 ? "" : i.substring(0, o)) + i.substring(l + 1) : o = l;
2233
2233
  }
2234
2234
  }
2235
- return n === "" ? null : n;
2235
+ return i === "" ? null : i;
2236
2236
  }
2237
2237
  function mo(t, e) {
2238
2238
  return t == null ? null : String(t);
2239
2239
  }
2240
- function _o(t, e, i, n, r, s) {
2240
+ function _o(t, e, n, i, r, s) {
2241
2241
  var o = t.__className;
2242
- if ($ || o !== i || o === void 0) {
2243
- var l = go(i, n, s);
2244
- (!$ || l !== t.getAttribute("class")) && (l == null ? t.removeAttribute("class") : t.className = l), t.__className = i;
2242
+ if ($ || o !== n || o === void 0) {
2243
+ var l = go(n, i, s);
2244
+ (!$ || l !== t.getAttribute("class")) && (l == null ? t.removeAttribute("class") : t.className = l), t.__className = n;
2245
2245
  } else if (s && r !== s)
2246
2246
  for (var a in s) {
2247
2247
  var u = !!s[a];
@@ -2249,42 +2249,42 @@ function _o(t, e, i, n, r, s) {
2249
2249
  }
2250
2250
  return s;
2251
2251
  }
2252
- function bo(t, e, i, n) {
2252
+ function bo(t, e, n, i) {
2253
2253
  var r = t.__style;
2254
2254
  if ($ || r !== e) {
2255
2255
  var s = mo(e);
2256
2256
  (!$ || s !== t.getAttribute("style")) && (s == null ? t.removeAttribute("style") : t.style.cssText = s), t.__style = e;
2257
2257
  }
2258
- return n;
2258
+ return i;
2259
2259
  }
2260
- const yo = /* @__PURE__ */ Symbol("is custom element"), wo = /* @__PURE__ */ Symbol("is html"), To = En ? "link" : "LINK", ko = En ? "progress" : "PROGRESS";
2260
+ const yo = /* @__PURE__ */ Symbol("is custom element"), wo = /* @__PURE__ */ Symbol("is html"), To = Ei ? "link" : "LINK", ko = Ei ? "progress" : "PROGRESS";
2261
2261
  function Io(t) {
2262
2262
  if ($) {
2263
- var e = !1, i = () => {
2263
+ var e = !1, n = () => {
2264
2264
  if (!e) {
2265
2265
  if (e = !0, t.hasAttribute("value")) {
2266
- var n = t.value;
2267
- Mi(t, "value", null), t.value = n;
2266
+ var i = t.value;
2267
+ Pn(t, "value", null), t.value = i;
2268
2268
  }
2269
2269
  if (t.hasAttribute("checked")) {
2270
2270
  var r = t.checked;
2271
- Mi(t, "checked", null), t.checked = r;
2271
+ Pn(t, "checked", null), t.checked = r;
2272
2272
  }
2273
2273
  }
2274
2274
  };
2275
- t.__on_r = i, De(i), Gs();
2275
+ t.__on_r = n, De(n), Gs();
2276
2276
  }
2277
2277
  }
2278
2278
  function So(t, e) {
2279
- var i = mr(t);
2280
- i.value === (i.value = // treat null and undefined the same for the initial value
2279
+ var n = mr(t);
2280
+ n.value === (n.value = // treat null and undefined the same for the initial value
2281
2281
  e ?? void 0) || // @ts-expect-error
2282
2282
  // `progress` elements always need their value set when it's `0`
2283
2283
  t.value === e && (e !== 0 || t.nodeName !== ko) || (t.value = e ?? "");
2284
2284
  }
2285
- function Mi(t, e, i, n) {
2285
+ function Pn(t, e, n, i) {
2286
2286
  var r = mr(t);
2287
- $ && (r[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === To) || r[e] !== (r[e] = i) && (e === "loading" && (t[cs] = i), i == null ? t.removeAttribute(e) : typeof i != "string" && xo(t).includes(e) ? t[e] = i : t.setAttribute(e, i));
2287
+ $ && (r[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === To) || r[e] !== (r[e] = n) && (e === "loading" && (t[cs] = n), n == null ? t.removeAttribute(e) : typeof n != "string" && xo(t).includes(e) ? t[e] = n : t.setAttribute(e, n));
2288
2288
  }
2289
2289
  function mr(t) {
2290
2290
  return (
@@ -2292,48 +2292,48 @@ function mr(t) {
2292
2292
  // @ts-expect-error
2293
2293
  t.__attributes ?? (t.__attributes = {
2294
2294
  [yo]: t.nodeName.includes("-"),
2295
- [wo]: t.namespaceURI === kn
2295
+ [wo]: t.namespaceURI === ki
2296
2296
  })
2297
2297
  );
2298
2298
  }
2299
- var gn = /* @__PURE__ */ new Map();
2299
+ var gi = /* @__PURE__ */ new Map();
2300
2300
  function xo(t) {
2301
- var e = t.getAttribute("is") || t.nodeName, i = gn.get(e);
2302
- if (i) return i;
2303
- gn.set(e, i = []);
2304
- for (var n, r = t, s = Element.prototype; s !== r; ) {
2305
- n = is(r);
2306
- for (var o in n)
2307
- n[o].set && i.push(o);
2308
- r = In(r);
2301
+ var e = t.getAttribute("is") || t.nodeName, n = gi.get(e);
2302
+ if (n) return n;
2303
+ gi.set(e, n = []);
2304
+ for (var i, r = t, s = Element.prototype; s !== r; ) {
2305
+ i = ns(r);
2306
+ for (var o in i)
2307
+ i[o].set && n.push(o);
2308
+ r = Ii(r);
2309
2309
  }
2310
- return i;
2310
+ return n;
2311
2311
  }
2312
- function mn(t, e) {
2312
+ function mi(t, e) {
2313
2313
  return t === e || t?.[Kt] === e;
2314
2314
  }
2315
- function $o(t = {}, e, i, n) {
2315
+ function $o(t = {}, e, n, i) {
2316
2316
  return er(() => {
2317
2317
  var r, s;
2318
- return Ui(() => {
2319
- r = s, s = [], qi(() => {
2320
- t !== i(...s) && (e(t, ...s), r && mn(i(...r), t) && e(null, ...r));
2318
+ return Yn(() => {
2319
+ r = s, s = [], Wn(() => {
2320
+ t !== n(...s) && (e(t, ...s), r && mi(n(...r), t) && e(null, ...r));
2321
2321
  });
2322
2322
  }), () => {
2323
2323
  De(() => {
2324
- s && mn(i(...s), t) && e(null, ...s);
2324
+ s && mi(n(...s), t) && e(null, ...s);
2325
2325
  });
2326
2326
  };
2327
2327
  }), t;
2328
2328
  }
2329
- function Wt(t, e, i, n) {
2329
+ function Wt(t, e, n, i) {
2330
2330
  var r = (
2331
2331
  /** @type {V} */
2332
- n
2332
+ i
2333
2333
  ), s = !0, o = () => (s && (s = !1, r = /** @type {V} */
2334
- n), r), l;
2334
+ i), r), l;
2335
2335
  l = /** @type {V} */
2336
- t[e], l === void 0 && n !== void 0 && (l = o());
2336
+ t[e], l === void 0 && i !== void 0 && (l = o());
2337
2337
  var a;
2338
2338
  a = () => {
2339
2339
  var d = (
@@ -2342,7 +2342,7 @@ function Wt(t, e, i, n) {
2342
2342
  );
2343
2343
  return d === void 0 ? o() : (s = !0, d);
2344
2344
  };
2345
- var u = !1, f = /* @__PURE__ */ Fi(() => (u = !1, a())), h = (
2345
+ var u = !1, f = /* @__PURE__ */ Bn(() => (u = !1, a())), h = (
2346
2346
  /** @type {Effect} */
2347
2347
  S
2348
2348
  );
@@ -2353,7 +2353,7 @@ function Wt(t, e, i, n) {
2353
2353
  const g = p ? v(f) : d;
2354
2354
  return I(f, g), u = !0, r !== void 0 && (r = g), d;
2355
2355
  }
2356
- return Be && u || (h.f & ze) !== 0 ? f.v : v(f);
2356
+ return Be && u || (h.f & Oe) !== 0 ? f.v : v(f);
2357
2357
  })
2358
2358
  );
2359
2359
  }
@@ -2372,21 +2372,21 @@ class Ao {
2372
2372
  w(this, Re);
2373
2373
  /** @type {Record<string, any>} */
2374
2374
  w(this, ee);
2375
- var i = /* @__PURE__ */ new Map(), n = (s, o) => {
2375
+ var n = /* @__PURE__ */ new Map(), i = (s, o) => {
2376
2376
  var l = /* @__PURE__ */ js(o, !1, !1);
2377
- return i.set(s, l), l;
2377
+ return n.set(s, l), l;
2378
2378
  };
2379
2379
  const r = new Proxy(
2380
2380
  { ...e.props || {}, $$events: {} },
2381
2381
  {
2382
2382
  get(s, o) {
2383
- return v(i.get(o) ?? n(o, Reflect.get(s, o)));
2383
+ return v(n.get(o) ?? i(o, Reflect.get(s, o)));
2384
2384
  },
2385
2385
  has(s, o) {
2386
- return o === as ? !0 : (v(i.get(o) ?? n(o, Reflect.get(s, o))), Reflect.has(s, o));
2386
+ return o === as ? !0 : (v(n.get(o) ?? i(o, Reflect.get(s, o))), Reflect.has(s, o));
2387
2387
  },
2388
2388
  set(s, o, l) {
2389
- return I(i.get(o) ?? n(o, l), l), Reflect.set(s, o, l);
2389
+ return I(n.get(o) ?? i(o, l), l), Reflect.set(s, o, l);
2390
2390
  }
2391
2391
  }
2392
2392
  );
@@ -2399,7 +2399,7 @@ class Ao {
2399
2399
  recover: e.recover
2400
2400
  })), (!e?.props?.$$host || e.sync === !1) && At(), y(this, Re, r.$$events);
2401
2401
  for (const s of Object.keys(c(this, ee)))
2402
- s === "$set" || s === "$destroy" || s === "$on" || ei(this, s, {
2402
+ s === "$set" || s === "$destroy" || s === "$on" || en(this, s, {
2403
2403
  get() {
2404
2404
  return c(this, ee)[s];
2405
2405
  },
@@ -2425,13 +2425,13 @@ class Ao {
2425
2425
  * @param {(...args: any[]) => any} callback
2426
2426
  * @returns {any}
2427
2427
  */
2428
- $on(e, i) {
2428
+ $on(e, n) {
2429
2429
  c(this, Re)[e] = c(this, Re)[e] || [];
2430
- const n = (...r) => i.call(this, ...r);
2431
- return c(this, Re)[e].push(n), () => {
2430
+ const i = (...r) => n.call(this, ...r);
2431
+ return c(this, Re)[e].push(i), () => {
2432
2432
  c(this, Re)[e] = c(this, Re)[e].filter(
2433
2433
  /** @param {any} fn */
2434
- (r) => r !== n
2434
+ (r) => r !== i
2435
2435
  );
2436
2436
  };
2437
2437
  }
@@ -2447,7 +2447,7 @@ typeof HTMLElement == "function" && (_r = class extends HTMLElement {
2447
2447
  * @param {*} $$slots
2448
2448
  * @param {ShadowRootInit | undefined} shadow_root_init
2449
2449
  */
2450
- constructor(e, i, n) {
2450
+ constructor(e, n, i) {
2451
2451
  super();
2452
2452
  /** The Svelte component constructor */
2453
2453
  T(this, "$$ctor");
@@ -2471,44 +2471,44 @@ typeof HTMLElement == "function" && (_r = class extends HTMLElement {
2471
2471
  T(this, "$$me");
2472
2472
  /** @type {ShadowRoot | null} The ShadowRoot of the custom element */
2473
2473
  T(this, "$$shadowRoot", null);
2474
- this.$$ctor = e, this.$$s = i, n && (this.$$shadowRoot = this.attachShadow(n));
2474
+ this.$$ctor = e, this.$$s = n, i && (this.$$shadowRoot = this.attachShadow(i));
2475
2475
  }
2476
2476
  /**
2477
2477
  * @param {string} type
2478
2478
  * @param {EventListenerOrEventListenerObject} listener
2479
2479
  * @param {boolean | AddEventListenerOptions} [options]
2480
2480
  */
2481
- addEventListener(e, i, n) {
2482
- if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(i), this.$$c) {
2483
- const r = this.$$c.$on(e, i);
2484
- this.$$l_u.set(i, r);
2481
+ addEventListener(e, n, i) {
2482
+ if (this.$$l[e] = this.$$l[e] || [], this.$$l[e].push(n), this.$$c) {
2483
+ const r = this.$$c.$on(e, n);
2484
+ this.$$l_u.set(n, r);
2485
2485
  }
2486
- super.addEventListener(e, i, n);
2486
+ super.addEventListener(e, n, i);
2487
2487
  }
2488
2488
  /**
2489
2489
  * @param {string} type
2490
2490
  * @param {EventListenerOrEventListenerObject} listener
2491
2491
  * @param {boolean | AddEventListenerOptions} [options]
2492
2492
  */
2493
- removeEventListener(e, i, n) {
2494
- if (super.removeEventListener(e, i, n), this.$$c) {
2495
- const r = this.$$l_u.get(i);
2496
- r && (r(), this.$$l_u.delete(i));
2493
+ removeEventListener(e, n, i) {
2494
+ if (super.removeEventListener(e, n, i), this.$$c) {
2495
+ const r = this.$$l_u.get(n);
2496
+ r && (r(), this.$$l_u.delete(n));
2497
2497
  }
2498
2498
  }
2499
2499
  async connectedCallback() {
2500
2500
  if (this.$$cn = !0, !this.$$c) {
2501
2501
  let e = function(r) {
2502
2502
  return (s) => {
2503
- const o = Hi("slot");
2503
+ const o = Gn("slot");
2504
2504
  r !== "default" && (o.name = r), Y(s, o);
2505
2505
  };
2506
2506
  };
2507
2507
  if (await Promise.resolve(), !this.$$cn || this.$$c)
2508
2508
  return;
2509
- const i = {}, n = Ro(this);
2509
+ const n = {}, i = Ro(this);
2510
2510
  for (const r of this.$$s)
2511
- r in n && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), i.default = !0) : i[r] = e(r));
2511
+ r in i && (r === "default" && !this.$$d.children ? (this.$$d.children = e(r), n.default = !0) : n[r] = e(r));
2512
2512
  for (const r of this.attributes) {
2513
2513
  const s = this.$$g_p(r.name);
2514
2514
  s in this.$$d || (this.$$d[s] = Qt(s, r.value, this.$$p_d, "toProp"));
@@ -2520,11 +2520,11 @@ typeof HTMLElement == "function" && (_r = class extends HTMLElement {
2520
2520
  target: this.$$shadowRoot || this,
2521
2521
  props: {
2522
2522
  ...this.$$d,
2523
- $$slots: i,
2523
+ $$slots: n,
2524
2524
  $$host: this
2525
2525
  }
2526
2526
  }), this.$$me = Ws(() => {
2527
- Ui(() => {
2527
+ Yn(() => {
2528
2528
  this.$$r = !0;
2529
2529
  for (const r of Zt(this.$$c)) {
2530
2530
  if (!this.$$p_d[r]?.reflect) continue;
@@ -2555,8 +2555,8 @@ typeof HTMLElement == "function" && (_r = class extends HTMLElement {
2555
2555
  * @param {string} _oldValue
2556
2556
  * @param {string} newValue
2557
2557
  */
2558
- attributeChangedCallback(e, i, n) {
2559
- this.$$r || (e = this.$$g_p(e), this.$$d[e] = Qt(e, n, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2558
+ attributeChangedCallback(e, n, i) {
2559
+ this.$$r || (e = this.$$g_p(e), this.$$d[e] = Qt(e, i, this.$$p_d, "toProp"), this.$$c?.$set({ [e]: this.$$d[e] }));
2560
2560
  }
2561
2561
  disconnectedCallback() {
2562
2562
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -2568,15 +2568,15 @@ typeof HTMLElement == "function" && (_r = class extends HTMLElement {
2568
2568
  */
2569
2569
  $$g_p(e) {
2570
2570
  return Zt(this.$$p_d).find(
2571
- (i) => this.$$p_d[i].attribute === e || !this.$$p_d[i].attribute && i.toLowerCase() === e
2571
+ (n) => this.$$p_d[n].attribute === e || !this.$$p_d[n].attribute && n.toLowerCase() === e
2572
2572
  ) || e;
2573
2573
  }
2574
2574
  });
2575
- function Qt(t, e, i, n) {
2576
- const r = i[t]?.type;
2577
- if (e = r === "Boolean" && typeof e != "boolean" ? e != null : e, !n || !i[t])
2575
+ function Qt(t, e, n, i) {
2576
+ const r = n[t]?.type;
2577
+ if (e = r === "Boolean" && typeof e != "boolean" ? e != null : e, !i || !n[t])
2578
2578
  return e;
2579
- if (n === "toAttribute")
2579
+ if (i === "toAttribute")
2580
2580
  switch (r) {
2581
2581
  case "Object":
2582
2582
  case "Array":
@@ -2604,17 +2604,17 @@ function Qt(t, e, i, n) {
2604
2604
  }
2605
2605
  function Ro(t) {
2606
2606
  const e = {};
2607
- return t.childNodes.forEach((i) => {
2607
+ return t.childNodes.forEach((n) => {
2608
2608
  e[
2609
2609
  /** @type {Element} node */
2610
- i.slot || "default"
2610
+ n.slot || "default"
2611
2611
  ] = !0;
2612
2612
  }), e;
2613
2613
  }
2614
- function zo(t, e, i, n, r, s) {
2614
+ function Oo(t, e, n, i, r, s) {
2615
2615
  let o = class extends _r {
2616
2616
  constructor() {
2617
- super(t, i, r), this.$$p_d = e;
2617
+ super(t, n, r), this.$$p_d = e;
2618
2618
  }
2619
2619
  static get observedAttributes() {
2620
2620
  return Zt(e).map(
@@ -2623,7 +2623,7 @@ function zo(t, e, i, n, r, s) {
2623
2623
  }
2624
2624
  };
2625
2625
  return Zt(e).forEach((l) => {
2626
- ei(o.prototype, l, {
2626
+ en(o.prototype, l, {
2627
2627
  get() {
2628
2628
  return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
2629
2629
  },
@@ -2636,8 +2636,8 @@ function zo(t, e, i, n, r, s) {
2636
2636
  }
2637
2637
  }
2638
2638
  });
2639
- }), n.forEach((l) => {
2640
- ei(o.prototype, l, {
2639
+ }), i.forEach((l) => {
2640
+ en(o.prototype, l, {
2641
2641
  get() {
2642
2642
  return this.$$c?.[l];
2643
2643
  }
@@ -2645,21 +2645,21 @@ function zo(t, e, i, n, r, s) {
2645
2645
  }), t.element = /** @type {any} */
2646
2646
  o, o;
2647
2647
  }
2648
- var _n;
2648
+ var _i;
2649
2649
  (function(t) {
2650
2650
  t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
2651
- })(_n || (_n = {}));
2652
- var bn;
2651
+ })(_i || (_i = {}));
2652
+ var bi;
2653
2653
  (function(t) {
2654
2654
  t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
2655
- })(bn || (bn = {}));
2656
- const Oo = {
2655
+ })(bi || (bi = {}));
2656
+ const zo = {
2657
2657
  tts: "textToSpeech",
2658
2658
  colorScheme: "theme"
2659
2659
  };
2660
2660
  function Lo(t) {
2661
2661
  const e = t.trim();
2662
- return e ? Oo[e] || e : "";
2662
+ return e ? zo[e] || e : "";
2663
2663
  }
2664
2664
  class Mo {
2665
2665
  constructor() {
@@ -2681,7 +2681,7 @@ class Mo {
2681
2681
  * Normalize a list of tool aliases to canonical toolIds.
2682
2682
  */
2683
2683
  normalizeToolIds(e) {
2684
- return e.map((i) => this.normalizeToolId(i));
2684
+ return e.map((n) => this.normalizeToolId(n));
2685
2685
  }
2686
2686
  /**
2687
2687
  * Register a tool
@@ -2693,8 +2693,8 @@ class Mo {
2693
2693
  if (this.tools.has(e.toolId))
2694
2694
  throw new Error(`Tool '${e.toolId}' is already registered`);
2695
2695
  if (this.tools.set(e.toolId, e), e.pnpSupportIds)
2696
- for (const i of e.pnpSupportIds)
2697
- this.pnpIndex.has(i) || this.pnpIndex.set(i, /* @__PURE__ */ new Set()), this.pnpIndex.get(i).add(e.toolId);
2696
+ for (const n of e.pnpSupportIds)
2697
+ this.pnpIndex.has(n) || this.pnpIndex.set(n, /* @__PURE__ */ new Set()), this.pnpIndex.get(n).add(e.toolId);
2698
2698
  }
2699
2699
  /**
2700
2700
  * Override an existing tool registration
@@ -2704,13 +2704,13 @@ class Mo {
2704
2704
  override(e) {
2705
2705
  if (!this.tools.has(e.toolId))
2706
2706
  throw new Error(`Cannot override non-existent tool '${e.toolId}'`);
2707
- const i = this.tools.get(e.toolId);
2708
- if (i.pnpSupportIds)
2709
- for (const n of i.pnpSupportIds)
2710
- this.pnpIndex.get(n)?.delete(e.toolId);
2707
+ const n = this.tools.get(e.toolId);
2708
+ if (n.pnpSupportIds)
2709
+ for (const i of n.pnpSupportIds)
2710
+ this.pnpIndex.get(i)?.delete(e.toolId);
2711
2711
  if (this.tools.set(e.toolId, e), e.pnpSupportIds)
2712
- for (const n of e.pnpSupportIds)
2713
- this.pnpIndex.has(n) || this.pnpIndex.set(n, /* @__PURE__ */ new Set()), this.pnpIndex.get(n).add(e.toolId);
2712
+ for (const i of e.pnpSupportIds)
2713
+ this.pnpIndex.has(i) || this.pnpIndex.set(i, /* @__PURE__ */ new Set()), this.pnpIndex.get(i).add(e.toolId);
2714
2714
  }
2715
2715
  /**
2716
2716
  * Unregister a tool
@@ -2718,11 +2718,11 @@ class Mo {
2718
2718
  * @param toolId - Tool ID to remove
2719
2719
  */
2720
2720
  unregister(e) {
2721
- const i = this.tools.get(e);
2722
- if (i) {
2723
- if (i.pnpSupportIds)
2724
- for (const n of i.pnpSupportIds)
2725
- this.pnpIndex.get(n)?.delete(e);
2721
+ const n = this.tools.get(e);
2722
+ if (n) {
2723
+ if (n.pnpSupportIds)
2724
+ for (const i of n.pnpSupportIds)
2725
+ this.pnpIndex.get(i)?.delete(e);
2726
2726
  this.tools.delete(e);
2727
2727
  }
2728
2728
  }
@@ -2776,7 +2776,7 @@ class Mo {
2776
2776
  * @returns Array of tool registrations that support this level
2777
2777
  */
2778
2778
  getToolsByLevel(e) {
2779
- return this.getAllTools().filter((i) => i.supportedLevels.includes(e));
2779
+ return this.getAllTools().filter((n) => n.supportedLevels.includes(e));
2780
2780
  }
2781
2781
  /**
2782
2782
  * Resolve tool activation with backward-compatible defaults.
@@ -2793,8 +2793,8 @@ class Mo {
2793
2793
  /**
2794
2794
  * Filter tool IDs by activation type.
2795
2795
  */
2796
- filterToolIdsByActivation(e, i) {
2797
- return e.filter((n) => this.getToolActivation(n) === i);
2796
+ filterToolIdsByActivation(e, n) {
2797
+ return e.filter((i) => this.getToolActivation(i) === n);
2798
2798
  }
2799
2799
  /**
2800
2800
  * Filter tools by visibility in a given context
@@ -2806,22 +2806,22 @@ class Mo {
2806
2806
  * @param context - Context to evaluate
2807
2807
  * @returns Array of visible tool registrations
2808
2808
  */
2809
- filterVisibleInContext(e, i) {
2810
- const n = [];
2809
+ filterVisibleInContext(e, n) {
2810
+ const i = [];
2811
2811
  for (const r of e) {
2812
2812
  const s = this.get(r);
2813
2813
  if (!s) {
2814
2814
  console.warn(`Tool '${r}' is allowed but not registered`);
2815
2815
  continue;
2816
2816
  }
2817
- if (s.supportedLevels.includes(i.level))
2817
+ if (s.supportedLevels.includes(n.level))
2818
2818
  try {
2819
- s.isVisibleInContext(i) && n.push(s);
2819
+ s.isVisibleInContext(n) && i.push(s);
2820
2820
  } catch (o) {
2821
2821
  console.error(`Error evaluating visibility for tool '${r}':`, o);
2822
2822
  }
2823
2823
  }
2824
- return n;
2824
+ return i;
2825
2825
  }
2826
2826
  /**
2827
2827
  * Get tool metadata for building UIs
@@ -2848,14 +2848,14 @@ class Mo {
2848
2848
  * @returns Array of unique PNP support IDs
2849
2849
  */
2850
2850
  generatePNPSupportsFromTools(e) {
2851
- const i = /* @__PURE__ */ new Set();
2852
- for (const n of e) {
2853
- const r = this.get(n);
2851
+ const n = /* @__PURE__ */ new Set();
2852
+ for (const i of e) {
2853
+ const r = this.get(i);
2854
2854
  if (r?.pnpSupportIds)
2855
2855
  for (const s of r.pnpSupportIds)
2856
- i.add(s);
2856
+ n.add(s);
2857
2857
  }
2858
- return Array.from(i);
2858
+ return Array.from(n);
2859
2859
  }
2860
2860
  /**
2861
2861
  * Clear all registrations (useful for testing)
@@ -2874,8 +2874,8 @@ class Mo {
2874
2874
  * Toolbars call ensureToolModuleLoaded(toolId) before instance creation.
2875
2875
  */
2876
2876
  setToolModuleLoaders(e) {
2877
- for (const [i, n] of Object.entries(e))
2878
- n && this.moduleLoaders.set(i, n);
2877
+ for (const [n, i] of Object.entries(e))
2878
+ i && this.moduleLoaders.set(n, i);
2879
2879
  }
2880
2880
  /**
2881
2881
  * Ensure tool module side-effects are loaded exactly once.
@@ -2884,16 +2884,16 @@ class Mo {
2884
2884
  async ensureToolModuleLoaded(e) {
2885
2885
  if (this.loadedToolModules.has(e))
2886
2886
  return;
2887
- const i = this.moduleLoadPromises.get(e);
2888
- if (i) {
2889
- await i;
2887
+ const n = this.moduleLoadPromises.get(e);
2888
+ if (n) {
2889
+ await n;
2890
2890
  return;
2891
2891
  }
2892
- const n = this.moduleLoaders.get(e);
2893
- if (!n)
2892
+ const i = this.moduleLoaders.get(e);
2893
+ if (!i)
2894
2894
  return;
2895
2895
  const r = (async () => {
2896
- await n(), this.loadedToolModules.add(e);
2896
+ await i(), this.loadedToolModules.add(e);
2897
2897
  })();
2898
2898
  this.moduleLoadPromises.set(e, r);
2899
2899
  try {
@@ -2906,7 +2906,7 @@ class Mo {
2906
2906
  * Ensure a set of tool modules are loaded.
2907
2907
  */
2908
2908
  async ensureToolModulesLoaded(e) {
2909
- await Promise.all(e.map((i) => this.ensureToolModuleLoaded(i)));
2909
+ await Promise.all(e.map((n) => this.ensureToolModuleLoaded(n)));
2910
2910
  }
2911
2911
  /**
2912
2912
  * Whether a tool module has already been loaded.
@@ -2917,18 +2917,18 @@ class Mo {
2917
2917
  /**
2918
2918
  * Render a tool for toolbar use with component overrides attached.
2919
2919
  */
2920
- renderForToolbar(e, i, n) {
2920
+ renderForToolbar(e, n, i) {
2921
2921
  const r = this.get(e);
2922
2922
  if (!r)
2923
2923
  throw new Error(`Tool '${e}' is not registered`);
2924
2924
  const s = {
2925
- ...n,
2925
+ ...i,
2926
2926
  componentOverrides: {
2927
2927
  ...this.componentOverrides || {},
2928
- ...n.componentOverrides || {}
2928
+ ...i.componentOverrides || {}
2929
2929
  }
2930
2930
  };
2931
- return r.renderToolbar(i, s);
2931
+ return r.renderToolbar(n, s);
2932
2932
  }
2933
2933
  }
2934
2934
  function br(t) {
@@ -2943,70 +2943,70 @@ function No(t) {
2943
2943
  function yr(t) {
2944
2944
  return t.level === "element";
2945
2945
  }
2946
- function Wi(t) {
2946
+ function Kn(t) {
2947
2947
  if (yr(t)) {
2948
2948
  const e = t.item.config;
2949
2949
  if (!e)
2950
2950
  return "";
2951
- const i = [], n = (a) => a.replace(/<[^>]*>/g, " ").trim(), r = e.elements?.[t.elementId];
2952
- r && typeof r == "string" && i.push(n(r));
2951
+ const n = [], i = (a) => a.replace(/<[^>]*>/g, " ").trim(), r = e.elements?.[t.elementId];
2952
+ r && typeof r == "string" && n.push(i(r));
2953
2953
  const s = e.models, l = (Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : []).find((a) => a && typeof a == "object" && a.id === t.elementId);
2954
2954
  if (l) {
2955
2955
  for (const a of Object.values(l))
2956
- if (typeof a == "string" && i.push(n(a)), Array.isArray(a)) {
2956
+ if (typeof a == "string" && n.push(i(a)), Array.isArray(a)) {
2957
2957
  for (const u of a)
2958
2958
  if (u && typeof u == "object")
2959
2959
  for (const f of Object.values(u))
2960
- typeof f == "string" && i.push(n(f));
2960
+ typeof f == "string" && n.push(i(f));
2961
2961
  }
2962
2962
  }
2963
- return i.filter(Boolean).join(" ").trim();
2963
+ return n.filter(Boolean).join(" ").trim();
2964
2964
  }
2965
2965
  if (br(t)) {
2966
2966
  const e = t.item;
2967
2967
  if (!e?.config)
2968
2968
  return "";
2969
- const i = e.config, n = [], r = (a) => a.replace(/<[^>]*>/g, " ").trim();
2970
- typeof i.markup == "string" && n.push(r(i.markup));
2971
- const s = i.elements;
2969
+ const n = e.config, i = [], r = (a) => a.replace(/<[^>]*>/g, " ").trim();
2970
+ typeof n.markup == "string" && i.push(r(n.markup));
2971
+ const s = n.elements;
2972
2972
  if (s && typeof s == "object")
2973
2973
  for (const a of Object.values(s))
2974
- typeof a == "string" && n.push(r(a));
2975
- const o = i.models, l = Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : [];
2974
+ typeof a == "string" && i.push(r(a));
2975
+ const o = n.models, l = Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : [];
2976
2976
  for (const a of l)
2977
2977
  if (!(!a || typeof a != "object")) {
2978
2978
  for (const u of Object.values(a))
2979
- if (typeof u == "string" && n.push(r(u)), Array.isArray(u)) {
2979
+ if (typeof u == "string" && i.push(r(u)), Array.isArray(u)) {
2980
2980
  for (const f of u)
2981
2981
  if (f && typeof f == "object")
2982
2982
  for (const h of Object.values(f))
2983
- typeof h == "string" && n.push(r(h));
2983
+ typeof h == "string" && i.push(r(h));
2984
2984
  }
2985
2985
  }
2986
- return n.filter(Boolean).join(" ").trim();
2986
+ return i.filter(Boolean).join(" ").trim();
2987
2987
  }
2988
2988
  if (Po(t)) {
2989
2989
  const e = t.passage;
2990
2990
  if (!e?.config)
2991
2991
  return "";
2992
- const i = e.config, n = [], r = (a) => a.replace(/<[^>]*>/g, " ").trim();
2993
- typeof i.markup == "string" && n.push(r(i.markup)), typeof i.content == "string" && n.push(r(i.content)), typeof i.prompt == "string" && n.push(r(i.prompt));
2994
- const s = i.elements;
2992
+ const n = e.config, i = [], r = (a) => a.replace(/<[^>]*>/g, " ").trim();
2993
+ typeof n.markup == "string" && i.push(r(n.markup)), typeof n.content == "string" && i.push(r(n.content)), typeof n.prompt == "string" && i.push(r(n.prompt));
2994
+ const s = n.elements;
2995
2995
  if (s && typeof s == "object")
2996
2996
  for (const a of Object.values(s))
2997
- typeof a == "string" && n.push(r(a));
2998
- const o = i.models, l = Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : [];
2997
+ typeof a == "string" && i.push(r(a));
2998
+ const o = n.models, l = Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : [];
2999
2999
  for (const a of l)
3000
3000
  if (!(!a || typeof a != "object")) {
3001
3001
  for (const u of Object.values(a))
3002
- if (typeof u == "string" && n.push(r(u)), Array.isArray(u)) {
3002
+ if (typeof u == "string" && i.push(r(u)), Array.isArray(u)) {
3003
3003
  for (const f of u)
3004
3004
  if (f && typeof f == "object")
3005
3005
  for (const h of Object.values(f))
3006
- typeof h == "string" && n.push(r(h));
3006
+ typeof h == "string" && i.push(r(h));
3007
3007
  }
3008
3008
  }
3009
- return n.filter(Boolean).join(" ").trim();
3009
+ return i.filter(Boolean).join(" ").trim();
3010
3010
  }
3011
3011
  if (No(t)) {
3012
3012
  const e = t.rubricBlock;
@@ -3014,8 +3014,8 @@ function Wi(t) {
3014
3014
  }
3015
3015
  return "";
3016
3016
  }
3017
- function ci(t) {
3018
- const e = Wi(t);
3017
+ function un(t) {
3018
+ const e = Kn(t);
3019
3019
  return [
3020
3020
  /<math[>\s]/i,
3021
3021
  // MathML
@@ -3029,7 +3029,7 @@ function ci(t) {
3029
3029
  // Math symbols
3030
3030
  /\d+\s*[+\-*/=]\s*\d+/
3031
3031
  // Simple arithmetic
3032
- ].some((n) => n.test(e));
3032
+ ].some((i) => i.test(e));
3033
3033
  }
3034
3034
  function Vo(t) {
3035
3035
  const e = [
@@ -3041,18 +3041,18 @@ function Vo(t) {
3041
3041
  "select-text"
3042
3042
  ];
3043
3043
  if (yr(t)) {
3044
- const i = t.item.config;
3045
- if (!i?.models)
3044
+ const n = t.item.config;
3045
+ if (!n?.models)
3046
3046
  return !1;
3047
- const r = (Array.isArray(i.models) ? i.models : Object.values(i.models)).find((o) => o && typeof o == "object" && o.id === t.elementId);
3047
+ const r = (Array.isArray(n.models) ? n.models : Object.values(n.models)).find((o) => o && typeof o == "object" && o.id === t.elementId);
3048
3048
  if (!r)
3049
3049
  return !1;
3050
3050
  const s = r.element || "";
3051
3051
  return e.includes(s);
3052
3052
  }
3053
3053
  if (br(t)) {
3054
- const i = t.item.config?.models;
3055
- return (Array.isArray(i) ? i : i && typeof i == "object" ? Object.values(i) : []).some((r) => {
3054
+ const n = t.item.config?.models;
3055
+ return (Array.isArray(n) ? n : n && typeof n == "object" ? Object.values(n) : []).some((r) => {
3056
3056
  if (!r || typeof r != "object")
3057
3057
  return !1;
3058
3058
  const s = r.element || "";
@@ -3061,11 +3061,11 @@ function Vo(t) {
3061
3061
  }
3062
3062
  return !1;
3063
3063
  }
3064
- function ui(t) {
3065
- return Wi(t).trim().length >= 10;
3064
+ function fn(t) {
3065
+ return Kn(t).trim().length >= 10;
3066
3066
  }
3067
3067
  function Co(t) {
3068
- const e = Wi(t);
3068
+ const e = Kn(t);
3069
3069
  return [
3070
3070
  /chemistry|chemical|element|atom|molecule|compound/i,
3071
3071
  /periodic\s+table/i,
@@ -3075,7 +3075,7 @@ function Co(t) {
3075
3075
  // Element symbols (H, He, Li, etc.)
3076
3076
  /biology|organism|cell|DNA|RNA|protein/i,
3077
3077
  /physics|force|energy|velocity|acceleration/i
3078
- ].some((n) => n.test(e));
3078
+ ].some((i) => i.test(e));
3079
3079
  }
3080
3080
  const Do = [
3081
3081
  "assessment",
@@ -3087,13 +3087,13 @@ const Do = [
3087
3087
  function Fo(t) {
3088
3088
  return jo.has(t);
3089
3089
  }
3090
- function de(t, e, i) {
3091
- const n = t.trim(), r = i.trim();
3092
- if (!n || !r)
3090
+ function de(t, e, n) {
3091
+ const i = t.trim(), r = n.trim();
3092
+ if (!i || !r)
3093
3093
  throw new Error("Tool instance ids require non-empty tool and scope ids");
3094
3094
  if (!Fo(e))
3095
3095
  throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
3096
- return `${n}:${e}:${r}`;
3096
+ return `${i}:${e}:${r}`;
3097
3097
  }
3098
3098
  const Bo = /* @__PURE__ */ new Set([
3099
3099
  "annotation-xml",
@@ -3107,18 +3107,18 @@ const Bo = /* @__PURE__ */ new Set([
3107
3107
  ]), Ho = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Go = (t, e = "custom element tag") => {
3108
3108
  if (!t || typeof t != "string")
3109
3109
  throw new Error(`Invalid ${e}: expected a non-empty string`);
3110
- const i = t.trim();
3111
- if (!i)
3110
+ const n = t.trim();
3111
+ if (!n)
3112
3112
  throw new Error(`Invalid ${e}: tag is empty`);
3113
- if (i !== i.toLowerCase())
3114
- throw new Error(`Invalid ${e} "${i}": custom element names must be lowercase`);
3115
- if (!i.includes("-"))
3116
- throw new Error(`Invalid ${e} "${i}": custom element names must include a hyphen`);
3117
- if (Bo.has(i))
3118
- throw new Error(`Invalid ${e} "${i}": this name is reserved by the HTML spec`);
3119
- if (!Ho.test(i))
3120
- throw new Error(`Invalid ${e} "${i}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
3121
- return i;
3113
+ if (n !== n.toLowerCase())
3114
+ throw new Error(`Invalid ${e} "${n}": custom element names must be lowercase`);
3115
+ if (!n.includes("-"))
3116
+ throw new Error(`Invalid ${e} "${n}": custom element names must include a hyphen`);
3117
+ if (Bo.has(n))
3118
+ throw new Error(`Invalid ${e} "${n}": this name is reserved by the HTML spec`);
3119
+ if (!Ho.test(n))
3120
+ throw new Error(`Invalid ${e} "${n}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
3121
+ return n;
3122
3122
  }, wr = {
3123
3123
  calculator: "pie-tool-calculator",
3124
3124
  textToSpeech: "pie-tool-text-to-speech",
@@ -3133,11 +3133,11 @@ const Bo = /* @__PURE__ */ new Set([
3133
3133
  graph: "pie-tool-graph",
3134
3134
  periodicTable: "pie-tool-periodic-table"
3135
3135
  }, Uo = (t, e) => {
3136
- const i = e?.toolTagMap?.[t] ?? wr[t] ?? t;
3137
- return Go(i, `tool component tag for "${t}"`);
3138
- }, Yo = (t) => document.createElement(t), Ie = (t, e, i, n) => {
3139
- const r = Uo(t, n), o = n?.toolComponentFactories?.[t] ?? n?.toolComponentFactory;
3140
- return o ? o({ toolId: t, tagName: r, context: e, toolbarContext: i }) : Yo(r);
3136
+ const n = e?.toolTagMap?.[t] ?? wr[t] ?? t;
3137
+ return Go(n, `tool component tag for "${t}"`);
3138
+ }, Yo = (t) => document.createElement(t), Ie = (t, e, n, i) => {
3139
+ const r = Uo(t, i), o = i?.toolComponentFactories?.[t] ?? i?.toolComponentFactory;
3140
+ return o ? o({ toolId: t, tagName: r, context: e, toolbarContext: n }) : Yo(r);
3141
3141
  }, qo = {
3142
3142
  toolId: "calculator",
3143
3143
  name: "Calculator",
@@ -3164,11 +3164,11 @@ const Bo = /* @__PURE__ */ new Set([
3164
3164
  * (MathML, LaTeX, arithmetic markers).
3165
3165
  */
3166
3166
  isVisibleInContext(t) {
3167
- return ci(t);
3167
+ return un(t);
3168
3168
  },
3169
3169
  renderToolbar(t, e) {
3170
- const i = de(this.toolId, e.scope.level, e.scope.scopeId), n = e.componentOverrides, r = Ie(this.toolId, t, e, n);
3171
- r.setAttribute("tool-id", i);
3170
+ const n = de(this.toolId, e.scope.level, e.scope.scopeId), i = e.componentOverrides, r = Ie(this.toolId, t, e, i);
3171
+ r.setAttribute("tool-id", n);
3172
3172
  const s = {
3173
3173
  toolId: this.toolId,
3174
3174
  label: this.name,
@@ -3177,18 +3177,18 @@ const Bo = /* @__PURE__ */ new Set([
3177
3177
  ariaLabel: "Open scientific calculator",
3178
3178
  tooltip: "Calculator",
3179
3179
  onClick: () => e.toggleTool(this.toolId),
3180
- active: e.isToolVisible(i)
3180
+ active: e.isToolVisible(n)
3181
3181
  };
3182
3182
  return {
3183
3183
  toolId: this.toolId,
3184
3184
  elements: [{ element: r, mount: "after-buttons" }],
3185
3185
  button: s,
3186
3186
  sync: () => {
3187
- const o = e.isToolVisible(i);
3187
+ const o = e.isToolVisible(n);
3188
3188
  s.active = o, s.ariaLabel = o ? "Close scientific calculator" : "Open scientific calculator", s.tooltip = o ? "Close calculator" : "Calculator", r.visible = o;
3189
3189
  },
3190
3190
  subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3191
- o(e.isToolVisible(i));
3191
+ o(e.isToolVisible(n));
3192
3192
  }) : () => {
3193
3193
  }
3194
3194
  };
@@ -3219,11 +3219,11 @@ const Bo = /* @__PURE__ */ new Set([
3219
3219
  * - Context contains readable text (at least 10 characters)
3220
3220
  */
3221
3221
  isVisibleInContext(t) {
3222
- return ui(t);
3222
+ return fn(t);
3223
3223
  },
3224
3224
  renderToolbar(t, e) {
3225
- let i = null;
3226
- const n = e.ttsService, r = de(this.toolId, e.scope.level, e.scope.scopeId), s = () => e.isToolVisible(r), o = {
3225
+ let n = null;
3226
+ const i = e.ttsService, r = de(this.toolId, e.scope.level, e.scope.scopeId), s = () => e.isToolVisible(r), o = {
3227
3227
  toolId: this.toolId,
3228
3228
  label: "Read aloud",
3229
3229
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3240,11 +3240,11 @@ const Bo = /* @__PURE__ */ new Set([
3240
3240
  }, a = (p) => {
3241
3241
  (p === "idle" || p === "error") && s() && (e.toggleTool(this.toolId), l());
3242
3242
  }, u = async () => {
3243
- e.ensureTTSReady && (i || (i = (async () => {
3244
- await e.ensureTTSReady?.(), e.toolkitCoordinator?.highlightCoordinator && n?.setHighlightCoordinator?.(e.toolkitCoordinator.highlightCoordinator);
3245
- })()), await i);
3243
+ e.ensureTTSReady && (n || (n = (async () => {
3244
+ await e.ensureTTSReady?.(), e.toolkitCoordinator?.highlightCoordinator && i?.setHighlightCoordinator?.(e.toolkitCoordinator.highlightCoordinator);
3245
+ })()), await n);
3246
3246
  }, f = () => {
3247
- n?.stop?.(), s() && e.toggleTool(this.toolId), l();
3247
+ i?.stop?.(), s() && e.toggleTool(this.toolId), l();
3248
3248
  }, h = () => {
3249
3249
  const p = e.getScopeElement?.();
3250
3250
  if (p)
@@ -3255,18 +3255,18 @@ const Bo = /* @__PURE__ */ new Set([
3255
3255
  e.scope.canonicalItemId
3256
3256
  ].filter((A) => typeof A == "string" && A.length > 0), b = [];
3257
3257
  for (const A of _) {
3258
- const O = g(A);
3259
- e.scope.level === "passage" && b.push(`pie-passage-shell[item-id="${O}"] [data-region="content"]`), b.push(`pie-item-shell[item-id="${O}"] [data-region="content"]`);
3258
+ const z = g(A);
3259
+ e.scope.level === "passage" && b.push(`pie-passage-shell[item-id="${z}"] [data-region="content"]`), b.push(`pie-item-shell[item-id="${z}"] [data-region="content"]`);
3260
3260
  }
3261
3261
  b.push("[data-region='content']");
3262
3262
  for (const A of b) {
3263
- const O = document.querySelector(A);
3264
- if (O instanceof HTMLElement)
3265
- return O;
3263
+ const z = document.querySelector(A);
3264
+ if (z instanceof HTMLElement)
3265
+ return z;
3266
3266
  }
3267
3267
  return null;
3268
3268
  }, d = async () => {
3269
- if (!n?.speak || !e.ttsService)
3269
+ if (!i?.speak || !e.ttsService)
3270
3270
  return;
3271
3271
  if (s()) {
3272
3272
  f();
@@ -3278,7 +3278,7 @@ const Bo = /* @__PURE__ */ new Set([
3278
3278
  const g = p.textContent || "";
3279
3279
  if (g.trim())
3280
3280
  try {
3281
- s() || e.toggleTool(this.toolId), l(), await u(), n.setRootElement?.(p), n.speak(g, {
3281
+ s() || e.toggleTool(this.toolId), l(), await u(), i.setRootElement?.(p), i.speak(g, {
3282
3282
  // For passage-level TTS, use rendered DOM text as the source of truth.
3283
3283
  // Catalog/SSML content can diverge from rendered text and break
3284
3284
  // word-boundary-to-DOM mapping for progressive yellow highlighting.
@@ -3312,8 +3312,8 @@ const Bo = /* @__PURE__ */ new Set([
3312
3312
  if (e.ttsService) {
3313
3313
  const _ = `tts-toolbar:${r}`, b = (A) => {
3314
3314
  a(String(A || ""));
3315
- const O = s();
3316
- l(), p(O);
3315
+ const z = s();
3316
+ l(), p(z);
3317
3317
  };
3318
3318
  e.ttsService.onStateChange(_, b), g.push(() => {
3319
3319
  e.ttsService?.offStateChange(_, b);
@@ -3346,10 +3346,10 @@ const Bo = /* @__PURE__ */ new Set([
3346
3346
  * Pass 2: Ruler is relevant when math content is present
3347
3347
  */
3348
3348
  isVisibleInContext(t) {
3349
- return ci(t);
3349
+ return un(t);
3350
3350
  },
3351
3351
  renderToolbar(t, e) {
3352
- const i = de(this.toolId, e.scope.level, e.scope.scopeId), n = {
3352
+ const n = de(this.toolId, e.scope.level, e.scope.scopeId), i = {
3353
3353
  toolId: this.toolId,
3354
3354
  label: this.name,
3355
3355
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3357,18 +3357,18 @@ const Bo = /* @__PURE__ */ new Set([
3357
3357
  ariaLabel: "Open ruler tool",
3358
3358
  tooltip: "Ruler",
3359
3359
  onClick: () => e.toggleTool(this.toolId),
3360
- active: e.isToolVisible(i)
3360
+ active: e.isToolVisible(n)
3361
3361
  }, r = e.componentOverrides ?? {}, s = Ie(this.toolId, t, e, r);
3362
- return s.setAttribute("tool-id", i), {
3362
+ return s.setAttribute("tool-id", n), {
3363
3363
  toolId: this.toolId,
3364
- button: n,
3364
+ button: i,
3365
3365
  elements: [{ element: s, mount: "after-buttons" }],
3366
3366
  sync: () => {
3367
- const o = e.isToolVisible(i);
3368
- n.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3367
+ const o = e.isToolVisible(n);
3368
+ i.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3369
3369
  },
3370
3370
  subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3371
- o(e.isToolVisible(i));
3371
+ o(e.isToolVisible(n));
3372
3372
  }) : () => {
3373
3373
  }
3374
3374
  };
@@ -3392,10 +3392,10 @@ const Bo = /* @__PURE__ */ new Set([
3392
3392
  * Pass 2: Protractor is relevant when math content is present
3393
3393
  */
3394
3394
  isVisibleInContext(t) {
3395
- return ci(t);
3395
+ return un(t);
3396
3396
  },
3397
3397
  renderToolbar(t, e) {
3398
- const i = de(this.toolId, e.scope.level, e.scope.scopeId), n = {
3398
+ const n = de(this.toolId, e.scope.level, e.scope.scopeId), i = {
3399
3399
  toolId: this.toolId,
3400
3400
  label: this.name,
3401
3401
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3403,18 +3403,18 @@ const Bo = /* @__PURE__ */ new Set([
3403
3403
  ariaLabel: "Open protractor tool",
3404
3404
  tooltip: "Protractor",
3405
3405
  onClick: () => e.toggleTool(this.toolId),
3406
- active: e.isToolVisible(i)
3406
+ active: e.isToolVisible(n)
3407
3407
  }, r = e.componentOverrides ?? {}, s = Ie(this.toolId, t, e, r);
3408
- return s.setAttribute("tool-id", i), {
3408
+ return s.setAttribute("tool-id", n), {
3409
3409
  toolId: this.toolId,
3410
- button: n,
3410
+ button: i,
3411
3411
  elements: [{ element: s, mount: "after-buttons" }],
3412
3412
  sync: () => {
3413
- const o = e.isToolVisible(i);
3414
- n.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3413
+ const o = e.isToolVisible(n);
3414
+ i.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3415
3415
  },
3416
3416
  subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3417
- o(e.isToolVisible(i));
3417
+ o(e.isToolVisible(n));
3418
3418
  }) : () => {
3419
3419
  }
3420
3420
  };
@@ -3445,8 +3445,8 @@ const Bo = /* @__PURE__ */ new Set([
3445
3445
  return Vo(t);
3446
3446
  },
3447
3447
  renderToolbar(t, e) {
3448
- const i = de(this.toolId, e.scope.level, e.scope.scopeId), n = e.componentOverrides ?? {}, r = Ie(this.toolId, t, e, n);
3449
- r.setAttribute("tool-id", i), r.setAttribute("strategy", "strikethrough"), r.setAttribute("button-alignment", "inline");
3448
+ const n = de(this.toolId, e.scope.level, e.scope.scopeId), i = e.componentOverrides ?? {}, r = Ie(this.toolId, t, e, i);
3449
+ r.setAttribute("tool-id", n), r.setAttribute("strategy", "strikethrough"), r.setAttribute("button-alignment", "inline");
3450
3450
  const s = {
3451
3451
  toolId: this.toolId,
3452
3452
  label: this.name,
@@ -3455,20 +3455,20 @@ const Bo = /* @__PURE__ */ new Set([
3455
3455
  ariaLabel: "Answer eliminator - Strike through choices",
3456
3456
  tooltip: "Strike Through",
3457
3457
  onClick: () => e.toggleTool(this.toolId),
3458
- active: e.isToolVisible(i)
3458
+ active: e.isToolVisible(n)
3459
3459
  };
3460
3460
  return {
3461
3461
  toolId: this.toolId,
3462
3462
  button: s,
3463
3463
  elements: [{ element: r, mount: "after-buttons" }],
3464
3464
  sync: () => {
3465
- const o = e.isToolVisible(i);
3465
+ const o = e.isToolVisible(n);
3466
3466
  s.active = o, r.visible = o, e.toolCoordinator && (r.coordinator = e.toolCoordinator), r.scopeElement = e.getScopeElement?.() || null, e.elementToolStateStore && (r.elementToolStateStore = e.elementToolStateStore);
3467
3467
  const l = e.getGlobalElementId?.();
3468
3468
  l && (r.globalElementId = l);
3469
3469
  },
3470
3470
  subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3471
- o(e.isToolVisible(i));
3471
+ o(e.isToolVisible(n));
3472
3472
  }) : () => {
3473
3473
  }
3474
3474
  };
@@ -3487,10 +3487,10 @@ const Bo = /* @__PURE__ */ new Set([
3487
3487
  * Pass 2: Highlighter is relevant when readable text is available
3488
3488
  */
3489
3489
  isVisibleInContext(t) {
3490
- return ui(t);
3490
+ return fn(t);
3491
3491
  },
3492
3492
  renderToolbar(t, e) {
3493
- const i = de(this.toolId, e.scope.level, e.scope.scopeId), n = {
3493
+ const n = de(this.toolId, e.scope.level, e.scope.scopeId), i = {
3494
3494
  toolId: this.toolId,
3495
3495
  label: this.name,
3496
3496
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3498,18 +3498,18 @@ const Bo = /* @__PURE__ */ new Set([
3498
3498
  ariaLabel: "Highlighter - Highlight text",
3499
3499
  tooltip: "Highlight",
3500
3500
  onClick: () => e.toggleTool(this.toolId),
3501
- active: e.isToolVisible(i)
3501
+ active: e.isToolVisible(n)
3502
3502
  }, r = e.componentOverrides ?? {}, s = Ie(this.toolId, t, e, r);
3503
- return s.setAttribute("tool-id", i), {
3503
+ return s.setAttribute("tool-id", n), {
3504
3504
  toolId: this.toolId,
3505
- button: n,
3505
+ button: i,
3506
3506
  elements: [{ element: s, mount: "after-buttons" }],
3507
3507
  sync: () => {
3508
- const o = e.isToolVisible(i);
3509
- n.active = o, s.enabled = o, s.visible = o, e.ttsService && (s.ttsService = e.ttsService);
3508
+ const o = e.isToolVisible(n);
3509
+ i.active = o, s.enabled = o, s.visible = o, e.ttsService && (s.ttsService = e.ttsService);
3510
3510
  },
3511
3511
  subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3512
- o(e.isToolVisible(i));
3512
+ o(e.isToolVisible(n));
3513
3513
  }) : () => {
3514
3514
  }
3515
3515
  };
@@ -3539,10 +3539,10 @@ const Bo = /* @__PURE__ */ new Set([
3539
3539
  * Pass 2: Line reader is relevant when readable text is present
3540
3540
  */
3541
3541
  isVisibleInContext(t) {
3542
- return ui(t);
3542
+ return fn(t);
3543
3543
  },
3544
3544
  renderToolbar(t, e) {
3545
- const i = de(this.toolId, e.scope.level, e.scope.scopeId), n = {
3545
+ const n = de(this.toolId, e.scope.level, e.scope.scopeId), i = {
3546
3546
  toolId: this.toolId,
3547
3547
  label: this.name,
3548
3548
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3550,18 +3550,18 @@ const Bo = /* @__PURE__ */ new Set([
3550
3550
  ariaLabel: "Line reader - Reading guide",
3551
3551
  tooltip: "Line Reader",
3552
3552
  onClick: () => e.toggleTool(this.toolId),
3553
- active: e.isToolVisible(i)
3553
+ active: e.isToolVisible(n)
3554
3554
  }, r = e.componentOverrides ?? {}, s = Ie(this.toolId, t, e, r);
3555
- return s.setAttribute("tool-id", i), {
3555
+ return s.setAttribute("tool-id", n), {
3556
3556
  toolId: this.toolId,
3557
- button: n,
3557
+ button: i,
3558
3558
  elements: [{ element: s, mount: "after-buttons" }],
3559
3559
  sync: () => {
3560
- const o = e.isToolVisible(i);
3561
- n.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3560
+ const o = e.isToolVisible(n);
3561
+ i.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3562
3562
  },
3563
3563
  subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3564
- o(e.isToolVisible(i));
3564
+ o(e.isToolVisible(n));
3565
3565
  }) : () => {
3566
3566
  }
3567
3567
  };
@@ -3598,7 +3598,7 @@ const Bo = /* @__PURE__ */ new Set([
3598
3598
  return !0;
3599
3599
  },
3600
3600
  renderToolbar(t, e) {
3601
- const i = de(this.toolId, e.scope.level, e.scope.scopeId), n = {
3601
+ const n = de(this.toolId, e.scope.level, e.scope.scopeId), i = {
3602
3602
  toolId: this.toolId,
3603
3603
  label: this.name,
3604
3604
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3606,23 +3606,23 @@ const Bo = /* @__PURE__ */ new Set([
3606
3606
  ariaLabel: "Theme - Change colors and contrast",
3607
3607
  tooltip: "Theme",
3608
3608
  onClick: () => e.toggleTool(this.toolId),
3609
- active: e.isToolVisible(i)
3609
+ active: e.isToolVisible(n)
3610
3610
  }, r = e.componentOverrides ?? {}, s = Ie(this.toolId, t, e, r);
3611
- return s.setAttribute("tool-id", i), {
3611
+ return s.setAttribute("tool-id", n), {
3612
3612
  toolId: this.toolId,
3613
- button: n,
3613
+ button: i,
3614
3614
  elements: [{ element: s, mount: "after-buttons" }],
3615
3615
  sync: () => {
3616
- const o = e.isToolVisible(i);
3617
- n.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3616
+ const o = e.isToolVisible(n);
3617
+ i.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3618
3618
  },
3619
3619
  subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3620
- o(e.isToolVisible(i));
3620
+ o(e.isToolVisible(n));
3621
3621
  }) : () => {
3622
3622
  }
3623
3623
  };
3624
3624
  }
3625
- }, tl = el, il = {
3625
+ }, tl = el, nl = {
3626
3626
  toolId: "annotationToolbar",
3627
3627
  name: "Highlighter",
3628
3628
  description: "Highlight and annotate text",
@@ -3649,10 +3649,10 @@ const Bo = /* @__PURE__ */ new Set([
3649
3649
  * Pass 2: Annotation is relevant when readable text is present
3650
3650
  */
3651
3651
  isVisibleInContext(t) {
3652
- return ui(t);
3652
+ return fn(t);
3653
3653
  },
3654
3654
  renderToolbar(t, e) {
3655
- const i = de(this.toolId, e.scope.level, e.scope.scopeId), n = {
3655
+ const n = de(this.toolId, e.scope.level, e.scope.scopeId), i = {
3656
3656
  toolId: this.toolId,
3657
3657
  label: this.name,
3658
3658
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3660,23 +3660,23 @@ const Bo = /* @__PURE__ */ new Set([
3660
3660
  ariaLabel: "Annotation toolbar - Highlight text",
3661
3661
  tooltip: "Highlight",
3662
3662
  onClick: () => e.toggleTool(this.toolId),
3663
- active: e.isToolVisible(i)
3663
+ active: e.isToolVisible(n)
3664
3664
  }, r = e.componentOverrides ?? {}, s = Ie(this.toolId, t, e, r);
3665
- return s.setAttribute("tool-id", i), {
3665
+ return s.setAttribute("tool-id", n), {
3666
3666
  toolId: this.toolId,
3667
- button: n,
3667
+ button: i,
3668
3668
  elements: [{ element: s, mount: "after-buttons" }],
3669
3669
  sync: () => {
3670
- const o = e.isToolVisible(i);
3671
- n.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3670
+ const o = e.isToolVisible(n);
3671
+ i.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3672
3672
  },
3673
3673
  subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3674
- o(e.isToolVisible(i));
3674
+ o(e.isToolVisible(n));
3675
3675
  }) : () => {
3676
3676
  }
3677
3677
  };
3678
3678
  }
3679
- }, nl = {
3679
+ }, il = {
3680
3680
  toolId: "graph",
3681
3681
  name: "Graph",
3682
3682
  description: "Graphing calculator and coordinate plane",
@@ -3699,10 +3699,10 @@ const Bo = /* @__PURE__ */ new Set([
3699
3699
  * Pass 2: Graph is relevant when math content is present
3700
3700
  */
3701
3701
  isVisibleInContext(t) {
3702
- return ci(t);
3702
+ return un(t);
3703
3703
  },
3704
3704
  renderToolbar(t, e) {
3705
- const i = de(this.toolId, e.scope.level, e.scope.scopeId), n = {
3705
+ const n = de(this.toolId, e.scope.level, e.scope.scopeId), i = {
3706
3706
  toolId: this.toolId,
3707
3707
  label: this.name,
3708
3708
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3710,18 +3710,18 @@ const Bo = /* @__PURE__ */ new Set([
3710
3710
  ariaLabel: "Graph - Graphing calculator",
3711
3711
  tooltip: "Graph",
3712
3712
  onClick: () => e.toggleTool(this.toolId),
3713
- active: e.isToolVisible(i)
3713
+ active: e.isToolVisible(n)
3714
3714
  }, r = e.componentOverrides ?? {}, s = Ie(this.toolId, t, e, r);
3715
- return s.setAttribute("tool-id", i), {
3715
+ return s.setAttribute("tool-id", n), {
3716
3716
  toolId: this.toolId,
3717
- button: n,
3717
+ button: i,
3718
3718
  elements: [{ element: s, mount: "after-buttons" }],
3719
3719
  sync: () => {
3720
- const o = e.isToolVisible(i);
3721
- n.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3720
+ const o = e.isToolVisible(n);
3721
+ i.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3722
3722
  },
3723
3723
  subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3724
- o(e.isToolVisible(i));
3724
+ o(e.isToolVisible(n));
3725
3725
  }) : () => {
3726
3726
  }
3727
3727
  };
@@ -3750,7 +3750,7 @@ const Bo = /* @__PURE__ */ new Set([
3750
3750
  return Co(t);
3751
3751
  },
3752
3752
  renderToolbar(t, e) {
3753
- const i = de(this.toolId, e.scope.level, e.scope.scopeId), n = {
3753
+ const n = de(this.toolId, e.scope.level, e.scope.scopeId), i = {
3754
3754
  toolId: this.toolId,
3755
3755
  label: this.name,
3756
3756
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3758,43 +3758,63 @@ const Bo = /* @__PURE__ */ new Set([
3758
3758
  ariaLabel: "Periodic table - Chemistry reference",
3759
3759
  tooltip: "Periodic Table",
3760
3760
  onClick: () => e.toggleTool(this.toolId),
3761
- active: e.isToolVisible(i)
3761
+ active: e.isToolVisible(n)
3762
3762
  }, r = e.componentOverrides ?? {}, s = Ie(this.toolId, t, e, r);
3763
- return s.setAttribute("tool-id", i), {
3763
+ return s.setAttribute("tool-id", n), {
3764
3764
  toolId: this.toolId,
3765
- button: n,
3765
+ button: i,
3766
3766
  elements: [{ element: s, mount: "after-buttons" }],
3767
3767
  sync: () => {
3768
- const o = e.isToolVisible(i);
3769
- n.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3768
+ const o = e.isToolVisible(n);
3769
+ i.active = o, s.visible = o, e.toolkitCoordinator && (s.toolkitCoordinator = e.toolkitCoordinator);
3770
3770
  },
3771
3771
  subscribeActive: (o) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3772
- o(e.isToolVisible(i));
3772
+ o(e.isToolVisible(n));
3773
3773
  }) : () => {
3774
3774
  }
3775
3775
  };
3776
3776
  }
3777
- };
3778
- function sl(t = {}) {
3779
- const e = new Mo(), i = {
3777
+ }, sl = [
3778
+ qo,
3779
+ Wo,
3780
+ Ko,
3781
+ Xo,
3782
+ Jo,
3783
+ Qo,
3784
+ Zo,
3785
+ tl,
3786
+ nl,
3787
+ il,
3788
+ rl
3789
+ ];
3790
+ function ol(t = {}) {
3791
+ const e = new Mo(), n = {
3780
3792
  toolTagMap: {
3781
3793
  ...wr,
3782
3794
  ...t.toolTagMap || {}
3783
3795
  },
3784
3796
  toolComponentFactory: t.toolComponentFactory,
3785
3797
  toolComponentFactories: t.toolComponentFactories
3786
- }, n = (r) => t.overrides?.[r.toolId] || r;
3787
- return e.register(n(qo)), e.register(n(Wo)), e.register(n(Ko)), e.register(n(Xo)), e.register(n(Jo)), e.register(n(Qo)), e.register(n(Zo)), e.register(n(tl)), e.register(n(il)), e.register(n(nl)), e.register(n(rl)), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(i), e;
3788
- }
3789
- function ol() {
3790
- const t = sl(), e = /* @__PURE__ */ new Set();
3791
- for (const i of t.getAllTools())
3792
- for (const n of i.pnpSupportIds || [])
3793
- e.add(n);
3798
+ }, i = (r) => t.overrides?.[r.toolId] || r;
3799
+ return t.includePackagedTools && ll(e, {
3800
+ toolIds: t.toolIds,
3801
+ applyOverrides: i
3802
+ }), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(n), e;
3803
+ }
3804
+ function ll(t, e = {}) {
3805
+ const n = e.toolIds && e.toolIds.length > 0 ? new Set(e.toolIds) : null, i = e.applyOverrides || ((r) => r);
3806
+ for (const r of sl)
3807
+ n && !n.has(r.toolId) || t.register(i(r));
3808
+ }
3809
+ function al() {
3810
+ const t = ol(), e = /* @__PURE__ */ new Set();
3811
+ for (const n of t.getAllTools())
3812
+ for (const i of n.pnpSupportIds || [])
3813
+ e.add(i);
3794
3814
  return [...e].sort();
3795
3815
  }
3796
- ol();
3797
- const ll = {
3816
+ al();
3817
+ const cl = {
3798
3818
  /**
3799
3819
  * Visual accessibility features
3800
3820
  * For students with low vision, color blindness, or visual processing needs
@@ -3965,16 +3985,16 @@ const ll = {
3965
3985
  tutorialAvailable: "tutorialAvailable"
3966
3986
  }
3967
3987
  };
3968
- Object.values(ll).flatMap((t) => Object.values(t));
3969
- var Pi;
3988
+ Object.values(cl).flatMap((t) => Object.values(t));
3989
+ var Nn;
3970
3990
  (function(t) {
3971
3991
  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";
3972
- })(Pi || (Pi = {}));
3973
- var yn;
3992
+ })(Nn || (Nn = {}));
3993
+ var yi;
3974
3994
  (function(t) {
3975
3995
  t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
3976
- })(yn || (yn = {}));
3977
- class al {
3996
+ })(yi || (yi = {}));
3997
+ class ul {
3978
3998
  constructor() {
3979
3999
  T(this, "providerId", "browser");
3980
4000
  T(this, "providerName", "Browser Speech Synthesis");
@@ -3985,7 +4005,7 @@ class al {
3985
4005
  throw new Error("BrowserTTSProvider requires browser environment");
3986
4006
  if (!("speechSynthesis" in window))
3987
4007
  throw new Error("Browser does not support Speech Synthesis API");
3988
- return new cl(e);
4008
+ return new fl(e);
3989
4009
  }
3990
4010
  supportsFeature(e) {
3991
4011
  return !0;
@@ -4003,7 +4023,7 @@ class al {
4003
4023
  destroy() {
4004
4024
  }
4005
4025
  }
4006
- class cl {
4026
+ class fl {
4007
4027
  constructor(e) {
4008
4028
  T(this, "utterance", null);
4009
4029
  T(this, "config", null);
@@ -4017,37 +4037,37 @@ class cl {
4017
4037
  if (!this.config)
4018
4038
  throw new Error("TTS not initialized");
4019
4039
  this.stop();
4020
- const i = this.speakRunId, n = this.splitIntoChunks(e);
4021
- for (const r of n)
4022
- if (i !== this.speakRunId || !await this.speakChunk(r.text, r.offset, i))
4040
+ const n = this.speakRunId, i = this.splitIntoChunks(e);
4041
+ for (const r of i)
4042
+ if (n !== this.speakRunId || !await this.speakChunk(r.text, r.offset, n))
4023
4043
  break;
4024
4044
  }
4025
4045
  async speakSegments(e) {
4026
4046
  if (!this.config)
4027
4047
  throw new Error("TTS not initialized");
4028
4048
  this.stop();
4029
- const i = this.speakRunId;
4030
- for (const n of e) {
4031
- if (i !== this.speakRunId)
4049
+ const n = this.speakRunId;
4050
+ for (const i of e) {
4051
+ if (n !== this.speakRunId)
4032
4052
  break;
4033
- const r = this.splitIntoChunks(n.text);
4053
+ const r = this.splitIntoChunks(i.text);
4034
4054
  for (const o of r)
4035
- if (i !== this.speakRunId || !await this.speakChunk(o.text, n.startOffset + o.offset, i))
4055
+ if (n !== this.speakRunId || !await this.speakChunk(o.text, i.startOffset + o.offset, n))
4036
4056
  break;
4037
- const s = Math.max(0, Number(n.pauseMsAfter || 0));
4038
- if (s > 0 && i === this.speakRunId && !await this.waitForPause(s, i))
4057
+ const s = Math.max(0, Number(i.pauseMsAfter || 0));
4058
+ if (s > 0 && n === this.speakRunId && !await this.waitForPause(s, n))
4039
4059
  break;
4040
4060
  }
4041
4061
  }
4042
- async waitForPause(e, i) {
4043
- return await new Promise((n) => setTimeout(n, e)), i === this.speakRunId;
4062
+ async waitForPause(e, n) {
4063
+ return await new Promise((i) => setTimeout(i, e)), n === this.speakRunId;
4044
4064
  }
4045
4065
  splitIntoChunks(e) {
4046
4066
  if (e.length <= 260)
4047
4067
  return [{ text: e, offset: 0 }];
4048
- const n = this.segmentSentences(e), r = [];
4068
+ const i = this.segmentSentences(e), r = [];
4049
4069
  let s = "", o = 0;
4050
- for (const l of n) {
4070
+ for (const l of i) {
4051
4071
  const a = l.text.trim();
4052
4072
  if (!a)
4053
4073
  continue;
@@ -4065,7 +4085,7 @@ class cl {
4065
4085
  return (this.config?.providerOptions || {}).highlightMode === "word" ? "word" : "sentence";
4066
4086
  }
4067
4087
  getSegmentationPolicy() {
4068
- const e = this.config?.providerOptions || {}, i = e.segmenter || {}, r = i.mode !== "regexOnly", s = typeof i.locale == "string" && i.locale.trim().length > 0 ? i.locale : typeof e.locale == "string" && e.locale.trim().length > 0 ? e.locale : void 0;
4088
+ const e = this.config?.providerOptions || {}, n = e.segmenter || {}, r = n.mode !== "regexOnly", s = typeof n.locale == "string" && n.locale.trim().length > 0 ? n.locale : typeof e.locale == "string" && e.locale.trim().length > 0 ? e.locale : void 0;
4069
4089
  return {
4070
4090
  useSentenceSegmenter: r,
4071
4091
  useWordSegmenter: r,
@@ -4090,21 +4110,21 @@ class cl {
4090
4110
  }
4091
4111
  } catch {
4092
4112
  }
4093
- const i = /[^.!?]+(?:[.!?]+|$)/g, n = e.match(i) || [e], r = [];
4113
+ const n = /[^.!?]+(?:[.!?]+|$)/g, i = e.match(n) || [e], r = [];
4094
4114
  let s = 0;
4095
- for (const o of n) {
4115
+ for (const o of i) {
4096
4116
  const l = e.indexOf(o, s);
4097
4117
  l !== -1 && (r.push({ text: o, offset: l }), s = l + o.length);
4098
4118
  }
4099
4119
  return r.length > 0 ? r : [{ text: e, offset: 0 }];
4100
4120
  }
4101
- inferWordLength(e, i) {
4102
- const n = Math.max(0, Math.min(i, Math.max(0, e.length - 1)));
4103
- return e.slice(n).match(/^\s*([^\s]+)/)?.[1]?.length || 1;
4121
+ inferWordLength(e, n) {
4122
+ const i = Math.max(0, Math.min(n, Math.max(0, e.length - 1)));
4123
+ return e.slice(i).match(/^\s*([^\s]+)/)?.[1]?.length || 1;
4104
4124
  }
4105
- async speakChunk(e, i, n) {
4125
+ async speakChunk(e, n, i) {
4106
4126
  return new Promise((r, s) => {
4107
- if (n !== this.speakRunId) {
4127
+ if (i !== this.speakRunId) {
4108
4128
  r(!1);
4109
4129
  return;
4110
4130
  }
@@ -4113,15 +4133,15 @@ class cl {
4113
4133
  l && (this.utterance.voice = l);
4114
4134
  }
4115
4135
  this.config?.rate && (this.utterance.rate = this.config.rate), this.config?.pitch && (this.utterance.pitch = this.config.pitch), this.utterance.onstart = () => {
4116
- n === this.speakRunId && (this._isPlaying = !0, this._isPaused = !1);
4136
+ i === this.speakRunId && (this._isPlaying = !0, this._isPaused = !1);
4117
4137
  }, this.utterance.onend = () => {
4118
- if (n !== this.speakRunId) {
4138
+ if (i !== this.speakRunId) {
4119
4139
  r(!1);
4120
4140
  return;
4121
4141
  }
4122
4142
  this._isPlaying = !1, this._isPaused = !1, r(!0);
4123
4143
  }, this.utterance.onerror = (o) => {
4124
- if (n !== this.speakRunId) {
4144
+ if (i !== this.speakRunId) {
4125
4145
  r(!1);
4126
4146
  return;
4127
4147
  }
@@ -4131,13 +4151,13 @@ class cl {
4131
4151
  }
4132
4152
  s(new Error(`Speech synthesis error: ${o.error}`));
4133
4153
  }, this.utterance.onpause = () => {
4134
- n === this.speakRunId && (this._isPaused = !0);
4154
+ i === this.speakRunId && (this._isPaused = !0);
4135
4155
  }, this.utterance.onresume = () => {
4136
- n === this.speakRunId && (this._isPaused = !1);
4156
+ i === this.speakRunId && (this._isPaused = !1);
4137
4157
  }, this.utterance.onboundary = (o) => {
4138
- 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")
4158
+ if (i !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", o.name, "charIndex:", o.charIndex, "charLength:", o.charLength), o.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence")
4139
4159
  return;
4140
- const l = Math.max(0, Math.min(o.charIndex, Math.max(0, e.length - 1))), a = Number(o.charLength || 0), u = this.inferWordLength(e, l), f = Number.isFinite(a) && a > 0 && a <= 80 && l + a <= e.length ? a : u, h = e.substring(l, Math.min(e.length, l + f)).trim(), d = i + l;
4160
+ const l = Math.max(0, Math.min(o.charIndex, Math.max(0, e.length - 1))), a = Number(o.charLength || 0), u = this.inferWordLength(e, l), f = Number.isFinite(a) && a > 0 && a <= 80 && l + a <= e.length ? a : u, h = e.substring(l, Math.min(e.length, l + f)).trim(), d = n + l;
4141
4161
  console.log("[BrowserProvider] Calling onWordBoundary with word:", h, "at position:", d), this.onWordBoundary(h, d, f);
4142
4162
  }, speechSynthesis.speak(this.utterance);
4143
4163
  });
@@ -4168,8 +4188,8 @@ class cl {
4168
4188
  });
4169
4189
  }
4170
4190
  }
4171
- var ul = /* @__PURE__ */ ke('<div class="pie-tool-text-to-speech__error-message svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z"> </span></div>'), fl = /* @__PURE__ */ ke('<div class="pie-tool-text-to-speech__loading-message svelte-xk676z"><span class="svelte-xk676z">Initializing...</span></div>'), dl = /* @__PURE__ */ ke('<div class="pie-tool-text-to-speech__selection-info svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 svelte-xk676z" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z"> </span></div>'), pl = /* @__PURE__ */ ke('<p class="svelte-xk676z">Select text on the page to read it aloud.</p>'), hl = /* @__PURE__ */ ke('<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Resume</span>', 1), vl = /* @__PURE__ */ ke('<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 012 0v4a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Pause</span>', 1), gl = /* @__PURE__ */ ke('<span class="pie-tool-text-to-speech__pulse svelte-xk676z"></span>'), ml = /* @__PURE__ */ ke('<div><div class="pie-tool-text-to-speech__status-icon svelte-xk676z"><!></div> <span class="svelte-xk676z"> </span></div>'), _l = /* @__PURE__ */ ke('<div class="pie-tool-text-to-speech__instructions svelte-xk676z"><!></div> <div class="pie-tool-text-to-speech__control-group svelte-xk676z"><label for="tts-speed" class="svelte-xk676z"><span class="svelte-xk676z">Speed:</span> <strong class="svelte-xk676z"> </strong></label> <input id="tts-speed" type="range" min="0.5" max="2.0" step="0.25" class="svelte-xk676z"/></div> <div class="pie-tool-text-to-speech__playback-controls svelte-xk676z"><button class="pie-tool-text-to-speech__button-primary svelte-xk676z" aria-label="Play" type="button"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Play</span></button> <button class="pie-tool-text-to-speech__button-secondary svelte-xk676z" type="button"><!></button> <button class="pie-tool-text-to-speech__button-secondary svelte-xk676z" aria-label="Stop" type="button"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1H8z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Stop</span></button></div> <!>', 1), bl = /* @__PURE__ */ ke('<div class="pie-tool-text-to-speech svelte-xk676z" role="dialog" aria-label="Text-to-Speech Tool" tabindex="-1"><div class="pie-tool-text-to-speech__header svelte-xk676z"><div class="pie-tool-text-to-speech__header-left svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 svelte-xk676z" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.858 18.142a3 3 0 104.243-4.242L12 12.142 7.757 7.899a3 3 0 000 4.242z" class="svelte-xk676z"></path></svg> <span class="pie-tool-text-to-speech__title svelte-xk676z">Text-to-Speech</span></div> <button class="pie-tool-text-to-speech__close-button svelte-xk676z" aria-label="Close" type="button">×</button></div> <div class="pie-tool-text-to-speech__content svelte-xk676z"><!></div></div>');
4172
- const yl = {
4191
+ var dl = /* @__PURE__ */ ke('<div class="pie-tool-text-to-speech__error-message svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7 4a1 1 0 11-2 0 1 1 0 012 0zm-1-9a1 1 0 00-1 1v4a1 1 0 102 0V6a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z"> </span></div>'), pl = /* @__PURE__ */ ke('<div class="pie-tool-text-to-speech__loading-message svelte-xk676z"><span class="svelte-xk676z">Initializing...</span></div>'), hl = /* @__PURE__ */ ke('<div class="pie-tool-text-to-speech__selection-info svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 svelte-xk676z" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z"> </span></div>'), vl = /* @__PURE__ */ ke('<p class="svelte-xk676z">Select text on the page to read it aloud.</p>'), gl = /* @__PURE__ */ ke('<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Resume</span>', 1), ml = /* @__PURE__ */ ke('<svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zM7 8a1 1 0 012 0v4a1 1 0 11-2 0V8zm5-1a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Pause</span>', 1), _l = /* @__PURE__ */ ke('<span class="pie-tool-text-to-speech__pulse svelte-xk676z"></span>'), bl = /* @__PURE__ */ ke('<div><div class="pie-tool-text-to-speech__status-icon svelte-xk676z"><!></div> <span class="svelte-xk676z"> </span></div>'), yl = /* @__PURE__ */ ke('<div class="pie-tool-text-to-speech__instructions svelte-xk676z"><!></div> <div class="pie-tool-text-to-speech__control-group svelte-xk676z"><label for="tts-speed" class="svelte-xk676z"><span class="svelte-xk676z">Speed:</span> <strong class="svelte-xk676z"> </strong></label> <input id="tts-speed" type="range" min="0.5" max="2.0" step="0.25" class="svelte-xk676z"/></div> <div class="pie-tool-text-to-speech__playback-controls svelte-xk676z"><button class="pie-tool-text-to-speech__button-primary svelte-xk676z" aria-label="Play" type="button"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM9.555 7.168A1 1 0 008 8v4a1 1 0 001.555.832l3-2a1 1 0 000-1.664l-3-2z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Play</span></button> <button class="pie-tool-text-to-speech__button-secondary svelte-xk676z" type="button"><!></button> <button class="pie-tool-text-to-speech__button-secondary svelte-xk676z" aria-label="Stop" type="button"><svg xmlns="http://www.w3.org/2000/svg" class="h-5 w-5 svelte-xk676z" viewBox="0 0 20 20" fill="currentColor"><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8 7a1 1 0 00-1 1v4a1 1 0 001 1h4a1 1 0 001-1V8a1 1 0 00-1-1H8z" clip-rule="evenodd" class="svelte-xk676z"></path></svg> <span class="svelte-xk676z">Stop</span></button></div> <!>', 1), wl = /* @__PURE__ */ ke('<div class="pie-tool-text-to-speech svelte-xk676z" role="dialog" aria-label="Text-to-Speech Tool" tabindex="-1"><div class="pie-tool-text-to-speech__header svelte-xk676z"><div class="pie-tool-text-to-speech__header-left svelte-xk676z"><svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4 svelte-xk676z" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.536 8.464a5 5 0 010 7.072m2.828-9.9a9 9 0 010 12.728M5.858 18.142a3 3 0 104.243-4.242L12 12.142 7.757 7.899a3 3 0 000 4.242z" class="svelte-xk676z"></path></svg> <span class="pie-tool-text-to-speech__title svelte-xk676z">Text-to-Speech</span></div> <button class="pie-tool-text-to-speech__close-button svelte-xk676z" aria-label="Close" type="button">×</button></div> <div class="pie-tool-text-to-speech__content svelte-xk676z"><!></div></div>');
4192
+ const Tl = {
4173
4193
  hash: "svelte-xk676z",
4174
4194
  code: `.pie-tool-text-to-speech.svelte-xk676z {position:fixed;width:300px;background:var(--pie-background, #fff);color:var(--pie-text, #111827);border:1px solid var(--pie-border-light, #cbd5e0);border-radius:8px;box-shadow:0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -2px rgb(0 0 0 / 0.05);cursor:move;user-select:none;font-family:system-ui, -apple-system, sans-serif;}.pie-tool-text-to-speech__header.svelte-xk676z {display:flex;justify-content:space-between;align-items:center;padding:12px 16px;background:var(--pie-primary-dark, #283593);color:var(--pie-white, #fff);border-radius:8px 8px 0 0;cursor:move;}.pie-tool-text-to-speech__header-left.svelte-xk676z {display:flex;align-items:center;gap:8px;}.pie-tool-text-to-speech__title.svelte-xk676z {font-weight:600;font-size:14px;}.pie-tool-text-to-speech__close-button.svelte-xk676z {background:rgb(255 255 255 / 0.2);border:none;color:var(--pie-white, #fff);width:24px;height:24px;border-radius:4px;cursor:pointer;font-size:20px;line-height:1;display:flex;align-items:center;justify-content:center;transition:background-color 0.2s;}.pie-tool-text-to-speech__close-button.svelte-xk676z:hover {background:rgb(255 255 255 / 0.3);}.pie-tool-text-to-speech__content.svelte-xk676z {padding:16px;}.pie-tool-text-to-speech__error-message.svelte-xk676z,
4175
4195
  .pie-tool-text-to-speech__loading-message.svelte-xk676z {display:flex;align-items:center;gap:8px;padding:12px;border-radius:6px;font-size:13px;}.pie-tool-text-to-speech__error-message.svelte-xk676z {background:color-mix(in srgb, var(--pie-incorrect, #c33) 12%, transparent);color:var(--pie-incorrect-icon, #c33);border:1px solid color-mix(in srgb, var(--pie-incorrect, #c33) 30%, transparent);}.pie-tool-text-to-speech__loading-message.svelte-xk676z {background:var(--pie-secondary-background, #f0f4f8);color:var(--pie-text, #4a5568);justify-content:center;}.pie-tool-text-to-speech__instructions.svelte-xk676z {margin-bottom:16px;font-size:13px;color:var(--pie-text, #4a5568);}.pie-tool-text-to-speech__instructions.svelte-xk676z p:where(.svelte-xk676z) {margin:0;line-height:1.5;}.pie-tool-text-to-speech__selection-info.svelte-xk676z {display:flex;align-items:center;gap:6px;padding:8px 12px;background:color-mix(in srgb, var(--pie-correct, #10b981) 12%, transparent);border:1px solid color-mix(in srgb, var(--pie-correct, #10b981) 35%, transparent);border-radius:6px;color:var(--pie-correct-icon, #234e52);font-size:12px;}.pie-tool-text-to-speech__selection-info.svelte-xk676z svg:where(.svelte-xk676z) {flex-shrink:0;}.pie-tool-text-to-speech__control-group.svelte-xk676z {margin-bottom:16px;}.pie-tool-text-to-speech__control-group.svelte-xk676z label:where(.svelte-xk676z) {display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;font-size:13px;color:var(--pie-text, #4a5568);}.pie-tool-text-to-speech__control-group.svelte-xk676z label:where(.svelte-xk676z) strong:where(.svelte-xk676z) {color:var(--pie-primary, #667eea);font-weight:600;}.pie-tool-text-to-speech__control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z) {width:100%;height:6px;border-radius:3px;background:var(--pie-secondary-background, #e2e8f0);outline:none;-webkit-appearance:none;}.pie-tool-text-to-speech__control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z)::-webkit-slider-thumb {-webkit-appearance:none;width:18px;height:18px;border-radius:50%;background:var(--pie-primary, #667eea);cursor:pointer;transition:all 0.2s;}.pie-tool-text-to-speech__control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z)::-webkit-slider-thumb:hover {background:var(--pie-primary-dark, #764ba2);transform:scale(1.1);}.pie-tool-text-to-speech__control-group.svelte-xk676z input[type="range"]:where(.svelte-xk676z):disabled {opacity:0.5;cursor:not-allowed;}.pie-tool-text-to-speech__playback-controls.svelte-xk676z {display:flex;gap:8px;margin-bottom:12px;}.pie-tool-text-to-speech__playback-controls.svelte-xk676z button:where(.svelte-xk676z) {flex:1;display:flex;align-items:center;justify-content:center;gap:6px;padding:10px 12px;border:none;border-radius:6px;font-size:13px;font-weight:500;cursor:pointer;transition:all 0.2s;}.pie-tool-text-to-speech__playback-controls.svelte-xk676z button:where(.svelte-xk676z) svg:where(.svelte-xk676z) {flex-shrink:0;}.pie-tool-text-to-speech__button-primary.svelte-xk676z {background:var(--pie-primary, #667eea);color:var(--pie-white, #fff);}.pie-tool-text-to-speech__button-primary.svelte-xk676z:hover:not(:disabled) {transform:translateY(-1px);box-shadow:0 4px 6px color-mix(in srgb, var(--pie-primary, #667eea) 35%, transparent);}.pie-tool-text-to-speech__button-secondary.svelte-xk676z {background:var(--pie-button-bg, #f7fafc);color:var(--pie-button-color, #4a5568);border:1px solid var(--pie-button-border, #e2e8f0);}.pie-tool-text-to-speech__button-secondary.svelte-xk676z:hover:not(:disabled) {background:var(--pie-button-hover-bg, #edf2f7);}.pie-tool-text-to-speech__playback-controls.svelte-xk676z button:where(.svelte-xk676z):disabled {opacity:0.5;cursor:not-allowed;transform:none !important;}.pie-tool-text-to-speech__status-indicator.svelte-xk676z {display:flex;align-items:center;gap:8px;padding:8px 12px;background:color-mix(in srgb, var(--pie-correct, #4caf50) 10%, transparent);border:1px solid color-mix(in srgb, var(--pie-correct, #4caf50) 30%, transparent);border-radius:6px;font-size:12px;color:var(--pie-correct-icon, #166534);
@@ -4206,32 +4226,32 @@ const yl = {
4206
4226
  animation: none !important;transition:none !important;}
4207
4227
  }`
4208
4228
  };
4209
- function wl(t, e) {
4210
- zn(e, !0), vo(t, yl);
4211
- let i = Wt(e, "visible", 7, !1), n = Wt(e, "toolId", 7, "textToSpeech"), r = Wt(e, "coordinator"), s = Wt(e, "ttsService");
4229
+ function kl(t, e) {
4230
+ Oi(e, !0), vo(t, Tl);
4231
+ let n = Wt(e, "visible", 7, !1), i = Wt(e, "toolId", 7, "textToSpeech"), r = Wt(e, "coordinator"), s = Wt(e, "ttsService");
4212
4232
  const o = typeof window < "u";
4213
- let l = /* @__PURE__ */ z(void 0), a = /* @__PURE__ */ z(!1), u = /* @__PURE__ */ z(qe({
4233
+ let l = /* @__PURE__ */ O(void 0), a = /* @__PURE__ */ O(!1), u = /* @__PURE__ */ O(qe({
4214
4234
  x: o ? window.innerWidth - 320 : 400,
4215
4235
  y: 100
4216
- })), f = /* @__PURE__ */ z(qe({ x: 0, y: 0 })), h = /* @__PURE__ */ z(!1), d = /* @__PURE__ */ z(!1), p = /* @__PURE__ */ z(!1), g = /* @__PURE__ */ z(""), _ = /* @__PURE__ */ z(1), b = /* @__PURE__ */ z(!1), A = /* @__PURE__ */ z(null), O = /* @__PURE__ */ z(!1);
4217
- zi(() => {
4218
- r() && n() && !v(O) && (r().registerTool(n(), "Text-to-Speech", void 0, Pi.MODAL), I(O, !0));
4236
+ })), f = /* @__PURE__ */ O(qe({ x: 0, y: 0 })), h = /* @__PURE__ */ O(!1), d = /* @__PURE__ */ O(!1), p = /* @__PURE__ */ O(!1), g = /* @__PURE__ */ O(""), _ = /* @__PURE__ */ O(1), b = /* @__PURE__ */ O(!1), A = /* @__PURE__ */ O(null), z = /* @__PURE__ */ O(!1);
4237
+ zn(() => {
4238
+ r() && i() && !v(z) && (r().registerTool(i(), "Text-to-Speech", void 0, Nn.MODAL), I(z, !0));
4219
4239
  }), ho(async () => {
4220
4240
  if (o) {
4221
4241
  try {
4222
- const m = new al();
4242
+ const m = new ul();
4223
4243
  await s().initialize(m), I(h, !0);
4224
4244
  } catch (m) {
4225
4245
  console.error("[TTSTool] Failed to initialize TTS:", m), I(A, m instanceof Error ? m.message : "Failed to initialize TTS", !0);
4226
4246
  }
4227
- return document.addEventListener("selectionchange", Xi), () => {
4228
- o && (document.removeEventListener("selectionchange", Xi), s().stop()), r() && n() && r().unregisterTool(n());
4247
+ return document.addEventListener("selectionchange", Jn), () => {
4248
+ o && (document.removeEventListener("selectionchange", Jn), s().stop()), r() && i() && r().unregisterTool(i());
4229
4249
  };
4230
4250
  }
4231
- }), zi(() => {
4232
- r() && v(l) && n() && r().updateToolElement(n(), v(l));
4251
+ }), zn(() => {
4252
+ r() && v(l) && i() && r().updateToolElement(i(), v(l));
4233
4253
  });
4234
- function Xi() {
4254
+ function Jn() {
4235
4255
  const m = window.getSelection();
4236
4256
  m && m.toString().trim().length > 0 ? (I(g, m.toString().trim(), !0), I(b, !0)) : I(b, !1);
4237
4257
  }
@@ -4243,11 +4263,11 @@ function wl(t, e) {
4243
4263
  const Ge = m.getRangeAt(0).commonAncestorContainer.parentElement;
4244
4264
  if (!Ge) return;
4245
4265
  I(d, !0), I(p, !1), s().setRootElement(Ge);
4246
- const fi = Ge.closest("[data-catalog-id]")?.getAttribute("data-catalog-id") || void 0;
4266
+ const dn = Ge.closest("[data-catalog-id]")?.getAttribute("data-catalog-id") || void 0;
4247
4267
  await s().speak(
4248
4268
  v(g),
4249
4269
  {
4250
- catalogId: fi,
4270
+ catalogId: dn,
4251
4271
  // Pass catalog ID for SSML resolution
4252
4272
  rate: v(_),
4253
4273
  highlightWords: !0
@@ -4286,9 +4306,9 @@ function wl(t, e) {
4286
4306
  y: m.clientY - v(u).y
4287
4307
  },
4288
4308
  !0
4289
- ), r()?.bringToFront(v(l)), v(l).addEventListener("pointermove", Ji), v(l).addEventListener("pointerup", Qi), m.preventDefault());
4309
+ ), r()?.bringToFront(v(l)), v(l).addEventListener("pointermove", Qn), v(l).addEventListener("pointerup", Zn), m.preventDefault());
4290
4310
  }
4291
- function Ji(m) {
4311
+ function Qn(m) {
4292
4312
  v(a) && (I(
4293
4313
  u,
4294
4314
  {
@@ -4298,25 +4318,25 @@ function wl(t, e) {
4298
4318
  !0
4299
4319
  ), m.preventDefault());
4300
4320
  }
4301
- function Qi(m) {
4302
- v(a) && v(l) && (v(l).releasePointerCapture(m.pointerId), I(a, !1), v(l).removeEventListener("pointermove", Ji), v(l).removeEventListener("pointerup", Qi));
4321
+ function Zn(m) {
4322
+ v(a) && v(l) && (v(l).releasePointerCapture(m.pointerId), I(a, !1), v(l).removeEventListener("pointermove", Qn), v(l).removeEventListener("pointerup", Zn));
4303
4323
  }
4304
4324
  function Er() {
4305
- r()?.hideTool(n());
4325
+ r()?.hideTool(i());
4306
4326
  }
4307
4327
  const Ar = /* @__PURE__ */ Ns(() => v(_) === 0.5 ? "Slow" : v(_) === 0.75 ? "Slower" : v(_) === 1 ? "Normal" : v(_) === 1.25 ? "Faster" : v(_) === 1.5 ? "Fast" : v(_) === 2 ? "Very Fast" : `${v(_)}x`);
4308
4328
  var Rr = {
4309
4329
  get visible() {
4310
- return i();
4330
+ return n();
4311
4331
  },
4312
4332
  set visible(m = !1) {
4313
- i(m), At();
4333
+ n(m), At();
4314
4334
  },
4315
4335
  get toolId() {
4316
- return n();
4336
+ return i();
4317
4337
  },
4318
4338
  set toolId(m = "textToSpeech") {
4319
- n(m), At();
4339
+ i(m), At();
4320
4340
  },
4321
4341
  get coordinator() {
4322
4342
  return r();
@@ -4330,75 +4350,75 @@ function wl(t, e) {
4330
4350
  set ttsService(m) {
4331
4351
  s(m), At();
4332
4352
  }
4333
- }, Zi = lo(), zr = cn(Zi);
4353
+ }, ei = lo(), Or = ci(ei);
4334
4354
  {
4335
- var Or = (m) => {
4336
- var pe = bl(), Ge = D(pe), fi = J(D(Ge), 2);
4355
+ var zr = (m) => {
4356
+ var pe = wl(), Ge = D(pe), dn = J(D(Ge), 2);
4337
4357
  C(Ge);
4338
4358
  var Ht = J(Ge, 2), Lr = D(Ht);
4339
4359
  {
4340
4360
  var Mr = (se) => {
4341
- var Pe = ul(), rt = J(D(Pe), 2), di = D(rt, !0);
4342
- C(rt), C(Pe), Et(() => Yt(di, v(A))), Y(se, Pe);
4361
+ var Pe = dl(), rt = J(D(Pe), 2), pn = D(rt, !0);
4362
+ C(rt), C(Pe), Et(() => Yt(pn, v(A))), Y(se, Pe);
4343
4363
  }, Pr = (se) => {
4344
- var Pe = fl();
4364
+ var Pe = pl();
4345
4365
  Y(se, Pe);
4346
4366
  }, Nr = (se) => {
4347
- var Pe = _l(), rt = cn(Pe), di = D(rt);
4367
+ var Pe = yl(), rt = ci(Pe), pn = D(rt);
4348
4368
  {
4349
4369
  var Vr = (M) => {
4350
- var B = dl(), xt = J(D(B), 2), $t = D(xt);
4370
+ var B = hl(), xt = J(D(B), 2), $t = D(xt);
4351
4371
  C(xt), C(B), Et(() => Yt($t, `${v(g).length ?? ""} characters selected`)), Y(M, B);
4352
4372
  }, Cr = (M) => {
4353
- var B = pl();
4373
+ var B = vl();
4354
4374
  Y(M, B);
4355
4375
  };
4356
- at(di, (M) => {
4376
+ at(pn, (M) => {
4357
4377
  v(b) ? M(Vr) : M(Cr, !1);
4358
4378
  });
4359
4379
  }
4360
4380
  C(rt);
4361
- var pi = J(rt, 2), hi = D(pi), en = J(D(hi), 2), Dr = D(en, !0);
4362
- C(en), C(hi);
4363
- var Gt = J(hi, 2);
4364
- Io(Gt), C(pi);
4365
- var vi = J(pi, 2), gi = D(vi), st = J(gi, 2), jr = D(st);
4381
+ var hn = J(rt, 2), vn = D(hn), ti = J(D(vn), 2), Dr = D(ti, !0);
4382
+ C(ti), C(vn);
4383
+ var Gt = J(vn, 2);
4384
+ Io(Gt), C(hn);
4385
+ var gn = J(hn, 2), mn = D(gn), st = J(mn, 2), jr = D(st);
4366
4386
  {
4367
4387
  var Fr = (M) => {
4368
- var B = hl();
4369
- Ti(2), Y(M, B);
4388
+ var B = gl();
4389
+ kn(2), Y(M, B);
4370
4390
  }, Br = (M) => {
4371
- var B = vl();
4372
- Ti(2), Y(M, B);
4391
+ var B = ml();
4392
+ kn(2), Y(M, B);
4373
4393
  };
4374
4394
  at(jr, (M) => {
4375
4395
  v(p) ? M(Fr) : M(Br, !1);
4376
4396
  });
4377
4397
  }
4378
4398
  C(st);
4379
- var tn = J(st, 2);
4380
- C(vi);
4381
- var Hr = J(vi, 2);
4399
+ var ni = J(st, 2);
4400
+ C(gn);
4401
+ var Hr = J(gn, 2);
4382
4402
  {
4383
4403
  var Gr = (M) => {
4384
- var B = ml();
4404
+ var B = bl();
4385
4405
  let xt;
4386
4406
  var $t = D(B), Ur = D($t);
4387
4407
  {
4388
4408
  var Yr = (ot) => {
4389
- var mi = oo("⏸");
4390
- Y(ot, mi);
4409
+ var _n = oo("⏸");
4410
+ Y(ot, _n);
4391
4411
  }, qr = (ot) => {
4392
- var mi = gl();
4393
- Y(ot, mi);
4412
+ var _n = _l();
4413
+ Y(ot, _n);
4394
4414
  };
4395
4415
  at(Ur, (ot) => {
4396
4416
  v(p) ? ot(Yr) : ot(qr, !1);
4397
4417
  });
4398
4418
  }
4399
4419
  C($t);
4400
- var nn = J($t, 2), Wr = D(nn, !0);
4401
- C(nn), C(B), Et(() => {
4420
+ var ii = J($t, 2), Wr = D(ii, !0);
4421
+ C(ii), C(B), Et(() => {
4402
4422
  xt = _o(B, 1, "pie-tool-text-to-speech__status-indicator svelte-xk676z", null, xt, {
4403
4423
  "pie-tool-text-to-speech__status-indicator--paused": v(p)
4404
4424
  }), Yt(Wr, v(p) ? "Paused" : "Speaking...");
@@ -4409,24 +4429,24 @@ function wl(t, e) {
4409
4429
  });
4410
4430
  }
4411
4431
  Et(() => {
4412
- Yt(Dr, v(Ar)), So(Gt, v(_)), Gt.disabled = v(d), gi.disabled = !v(b) || v(d), st.disabled = !v(d), Mi(st, "aria-label", v(p) ? "Resume" : "Pause"), tn.disabled = !v(d);
4413
- }), lt("input", Gt, Sr), lt("click", gi, Tr), lt("click", st, kr), lt("click", tn, Ir), Y(se, Pe);
4432
+ Yt(Dr, v(Ar)), So(Gt, v(_)), Gt.disabled = v(d), mn.disabled = !v(b) || v(d), st.disabled = !v(d), Pn(st, "aria-label", v(p) ? "Resume" : "Pause"), ni.disabled = !v(d);
4433
+ }), lt("input", Gt, Sr), lt("click", mn, Tr), lt("click", st, kr), lt("click", ni, Ir), Y(se, Pe);
4414
4434
  };
4415
4435
  at(Lr, (se) => {
4416
4436
  v(A) ? se(Mr) : v(h) ? se(Nr, !1) : se(Pr, 1);
4417
4437
  });
4418
4438
  }
4419
- C(Ht), C(pe), $o(pe, (se) => I(l, se), () => v(l)), Et(() => bo(pe, `left: ${v(u).x ?? ""}px; top: ${v(u).y ?? ""}px;`)), lt("pointerdown", pe, xr), lt("click", fi, Er), Y(m, pe);
4439
+ C(Ht), C(pe), $o(pe, (se) => I(l, se), () => v(l)), Et(() => bo(pe, `left: ${v(u).x ?? ""}px; top: ${v(u).y ?? ""}px;`)), lt("pointerdown", pe, xr), lt("click", dn, Er), Y(m, pe);
4420
4440
  };
4421
- at(zr, (m) => {
4422
- i() && o && m(Or);
4441
+ at(Or, (m) => {
4442
+ n() && o && m(zr);
4423
4443
  });
4424
4444
  }
4425
- return Y(t, Zi), On(Rr);
4445
+ return Y(t, ei), zi(Rr);
4426
4446
  }
4427
- io(["pointerdown", "click", "input"]);
4428
- customElements.define("pie-tool-text-to-speech", zo(
4429
- wl,
4447
+ no(["pointerdown", "click", "input"]);
4448
+ customElements.define("pie-tool-text-to-speech", Oo(
4449
+ kl,
4430
4450
  {
4431
4451
  visible: { attribute: "visible", type: "Boolean" },
4432
4452
  toolId: { attribute: "tool-id", type: "String" },
@@ -4438,5 +4458,5 @@ customElements.define("pie-tool-text-to-speech", zo(
4438
4458
  { mode: "open" }
4439
4459
  ));
4440
4460
  export {
4441
- wl as default
4461
+ kl as default
4442
4462
  };