@pie-players/pie-section-player-tools-tts-settings 0.3.41 → 0.3.42

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.
@@ -4,13 +4,13 @@ if (typeof window < "u") {
4
4
  ((Ts = (ks = window).__svelte ?? (ks.__svelte = {})).v ?? (Ts.v = /* @__PURE__ */ new Set())).add("5");
5
5
  }
6
6
  var gr = {}, se = /* @__PURE__ */ Symbol();
7
- var mc = "http://www.w3.org/2000/svg";
8
- var Hi = Array.isArray, gc = Array.prototype.indexOf, _r = Array.prototype.includes, Gi = Array.from, Li = Object.keys, Ci = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, _c = Object.getOwnPropertyDescriptors, yc = Object.prototype, bc = Array.prototype, Xs = Object.getPrototypeOf, Ss = Object.isExtensible, wc = () => {
7
+ var _c = "http://www.w3.org/2000/svg";
8
+ var Hi = Array.isArray, yc = Array.prototype.indexOf, _r = Array.prototype.includes, Gi = Array.from, Li = Object.keys, Ci = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, bc = Object.getOwnPropertyDescriptors, wc = Object.prototype, Tc = Array.prototype, Zs = Object.getPrototypeOf, Ss = Object.isExtensible, kc = () => {
9
9
  };
10
- function Tc(e) {
10
+ function Sc(e) {
11
11
  for (var t = 0; t < e.length; t++) e[t]();
12
12
  }
13
- function Qs() {
13
+ function ea() {
14
14
  var e, t;
15
15
  return {
16
16
  promise: new Promise((r, i) => {
@@ -20,7 +20,7 @@ function Qs() {
20
20
  reject: t
21
21
  };
22
22
  }
23
- var kc = 1 << 24, Ce = 1024, Ge = 2048, rr = 4096, po = 8192, Sc = 16384, ho = 32768, As = 1 << 25, qi = 65536, Ff = 1 << 17, Wf = 1 << 18, Ar = 1 << 19, Ac = 1 << 20, Kr = 1 << 25, ri = 65536, Es = 1 << 21, Ec = 1 << 22, Ri = 1 << 23, Kt = /* @__PURE__ */ Symbol("$state"), Zs = /* @__PURE__ */ Symbol("legacy props"), Ic = /* @__PURE__ */ Symbol(""), $c = /* @__PURE__ */ Symbol("proxy path");
23
+ var Ac = 1 << 24, Ce = 1024, Ge = 2048, rr = 4096, po = 8192, Ec = 16384, ho = 32768, As = 1 << 25, qi = 65536, Uf = 1 << 17, Hf = 1 << 18, Ar = 1 << 19, Ic = 1 << 20, Kr = 1 << 25, ri = 65536, Es = 1 << 21, $c = 1 << 22, Ri = 1 << 23, Kt = /* @__PURE__ */ Symbol("$state"), ta = /* @__PURE__ */ Symbol("legacy props"), Pc = /* @__PURE__ */ Symbol(""), Mc = /* @__PURE__ */ Symbol("proxy path");
24
24
  var vt = new class extends Error {
25
25
  constructor(...t) {
26
26
  super(...t), x(this, "name", "StaleReactionError"), x(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
@@ -29,52 +29,52 @@ var vt = new class extends Error {
29
29
  function mo(e) {
30
30
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
31
31
  }
32
- function Pc() {
32
+ function xc() {
33
33
  throw new Error("https://svelte.dev/e/async_derived_orphan");
34
34
  }
35
- function Mc(e, t, r) {
35
+ function Oc(e, t, r) {
36
36
  throw new Error("https://svelte.dev/e/each_key_duplicate");
37
37
  }
38
- function xc(e) {
38
+ function Lc(e) {
39
39
  throw new Error("https://svelte.dev/e/effect_in_teardown");
40
40
  }
41
- function Oc() {
41
+ function Cc() {
42
42
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
43
43
  }
44
- function Lc(e) {
44
+ function Rc(e) {
45
45
  throw new Error("https://svelte.dev/e/effect_orphan");
46
46
  }
47
- function Cc() {
47
+ function Nc() {
48
48
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
49
49
  }
50
- function Rc() {
50
+ function jc() {
51
51
  throw new Error("https://svelte.dev/e/hydration_failed");
52
52
  }
53
- function Nc(e) {
53
+ function zc(e) {
54
54
  throw new Error("https://svelte.dev/e/props_invalid_value");
55
55
  }
56
- function jc() {
56
+ function Vc() {
57
57
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
58
58
  }
59
- function Vc() {
59
+ function Dc() {
60
60
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
61
61
  }
62
- function zc() {
62
+ function Fc() {
63
63
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
64
64
  }
65
- function Dc() {
65
+ function Wc() {
66
66
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
67
67
  }
68
- function Fc() {
68
+ function Bc() {
69
69
  console.warn("https://svelte.dev/e/derived_inert");
70
70
  }
71
71
  function Yi(e) {
72
72
  console.warn("https://svelte.dev/e/hydration_mismatch");
73
73
  }
74
- function Wc() {
74
+ function Uc() {
75
75
  console.warn("https://svelte.dev/e/select_multiple_invalid_value");
76
76
  }
77
- function Bc() {
77
+ function Hc() {
78
78
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
79
79
  }
80
80
  var N = !1;
@@ -97,7 +97,7 @@ function I(e) {
97
97
  Y = e;
98
98
  }
99
99
  }
100
- function ea(e = 1) {
100
+ function ra(e = 1) {
101
101
  if (N) {
102
102
  for (var t = e, r = Y; t--; ) r = /* @__PURE__ */ nt(r);
103
103
  Y = r;
@@ -116,32 +116,32 @@ function Ni(e = !0) {
116
116
  e && r.remove(), r = n;
117
117
  }
118
118
  }
119
- function ta(e) {
119
+ function ia(e) {
120
120
  if (!e || e.nodeType !== 8)
121
121
  throw Yi(), gr;
122
122
  return e.data;
123
123
  }
124
- function ra(e) {
124
+ function na(e) {
125
125
  return e === this.v;
126
126
  }
127
- function Uc(e, t) {
127
+ function Gc(e, t) {
128
128
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
129
129
  }
130
- function ia(e) {
131
- return !Uc(e, this.v);
130
+ function oa(e) {
131
+ return !Gc(e, this.v);
132
132
  }
133
133
  var Re = !1, ii = !1;
134
134
  function Is(e, t) {
135
- return e.label = t, Hc(e.v, t), e;
135
+ return e.label = t, qc(e.v, t), e;
136
136
  }
137
- function Hc(e, t) {
138
- return e?.[$c]?.(t), e;
137
+ function qc(e, t) {
138
+ return e?.[Mc]?.(t), e;
139
139
  }
140
140
  var re = null;
141
141
  function br(e) {
142
142
  re = e;
143
143
  }
144
- function na(e, t = !1, r) {
144
+ function sa(e, t = !1, r) {
145
145
  re = {
146
146
  p: re,
147
147
  i: !1,
@@ -157,11 +157,11 @@ function na(e, t = !1, r) {
157
157
  } : null
158
158
  };
159
159
  }
160
- function oa(e) {
160
+ function aa(e) {
161
161
  var t = re, r = t.e;
162
162
  if (r !== null) {
163
163
  t.e = null;
164
- for (var i of r) La(i);
164
+ for (var i of r) Ra(i);
165
165
  }
166
166
  return e !== void 0 && (t.x = e), t.i = !0, re = t.p, e ?? {};
167
167
  }
@@ -169,23 +169,23 @@ function ni() {
169
169
  return !ii || re !== null && re.l === null;
170
170
  }
171
171
  var Ht = [];
172
- function sa() {
172
+ function la() {
173
173
  var e = Ht;
174
- Ht = [], Tc(e);
174
+ Ht = [], Sc(e);
175
175
  }
176
176
  function rt(e) {
177
177
  if (Ht.length === 0 && !Yr) {
178
178
  var t = Ht;
179
179
  queueMicrotask(() => {
180
- t === Ht && sa();
180
+ t === Ht && la();
181
181
  });
182
182
  }
183
183
  Ht.push(e);
184
184
  }
185
- function Gc() {
186
- for (; Ht.length > 0; ) sa();
185
+ function Kc() {
186
+ for (; Ht.length > 0; ) la();
187
187
  }
188
- function aa(e) {
188
+ function ca(e) {
189
189
  var t = G;
190
190
  if (t === null)
191
191
  return J.f |= Ri, e;
@@ -208,23 +208,23 @@ function Ot(e, t) {
208
208
  }
209
209
  throw e;
210
210
  }
211
- var qc = ~(Ge | rr | Ce);
211
+ var Yc = ~(Ge | rr | Ce);
212
212
  function ne(e, t) {
213
- e.f = e.f & qc | t;
213
+ e.f = e.f & Yc | t;
214
214
  }
215
215
  function go(e) {
216
216
  (e.f & 512) !== 0 || e.deps === null ? ne(e, Ce) : ne(e, rr);
217
217
  }
218
- function la(e) {
218
+ function ua(e) {
219
219
  if (e !== null)
220
220
  for (const t of e)
221
- (t.f & 2) === 0 || (t.f & 65536) === 0 || (t.f ^= ri, la(t.deps));
221
+ (t.f & 2) === 0 || (t.f & 65536) === 0 || (t.f ^= ri, ua(t.deps));
222
222
  }
223
- function ca(e, t, r) {
224
- (e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), la(e.deps), ne(e, Ce);
223
+ function da(e, t, r) {
224
+ (e.f & 2048) !== 0 ? t.add(e) : (e.f & 4096) !== 0 && r.add(e), ua(e.deps), ne(e, Ce);
225
225
  }
226
- var Kc = !1, _i = !1;
227
- function Yc(e) {
226
+ var Jc = !1, _i = !1;
227
+ function Xc(e) {
228
228
  var t = _i;
229
229
  try {
230
230
  return _i = !1, [e(), _i];
@@ -232,14 +232,14 @@ function Yc(e) {
232
232
  _i = t;
233
233
  }
234
234
  }
235
- function ua(e, t) {
235
+ function fa(e, t) {
236
236
  if (t.has(e)) throw new TypeError("Cannot initialize the same private elements twice on an object");
237
237
  }
238
238
  function _o(e, t) {
239
- ua(e, t), t.add(e);
239
+ fa(e, t), t.add(e);
240
240
  }
241
241
  function B(e, t, r) {
242
- ua(e, t), t.set(e, r);
242
+ fa(e, t), t.set(e, r);
243
243
  }
244
244
  function Q(e, t, r) {
245
245
  if (typeof e == "function" ? e === t : e.has(t)) return arguments.length < 3 ? t : r;
@@ -251,10 +251,10 @@ function p(e, t) {
251
251
  function H(e, t, r) {
252
252
  return e.set(Q(e, t), r), r;
253
253
  }
254
- var da, et = /* @__PURE__ */ new Set(), z = null, ji = null, ge = null, Xn = null, Yr = !1, zn = !1, wr = null, Vi = null, fa = 0;
255
- var Jc = 1, zi = /* @__PURE__ */ new WeakMap(), yi = /* @__PURE__ */ new WeakMap(), Vr = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), Ei = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), Tr = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), bi = /* @__PURE__ */ new WeakMap(), mr = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakSet(), ir = class va {
254
+ var va, et = /* @__PURE__ */ new Set(), V = null, ji = null, ge = null, Xn = null, Yr = !1, Vn = !1, wr = null, zi = null, pa = 0;
255
+ var Qc = 1, Vi = /* @__PURE__ */ new WeakMap(), yi = /* @__PURE__ */ new WeakMap(), zr = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), Mt = /* @__PURE__ */ new WeakMap(), Ei = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), Tr = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), Ii = /* @__PURE__ */ new WeakMap(), bi = /* @__PURE__ */ new WeakMap(), mr = /* @__PURE__ */ new WeakMap(), we = /* @__PURE__ */ new WeakSet(), ir = class ha {
256
256
  constructor() {
257
- _o(this, we), x(this, "id", Jc++), x(this, "current", /* @__PURE__ */ new Map()), x(this, "previous", /* @__PURE__ */ new Map()), B(this, zi, /* @__PURE__ */ new Set()), B(this, yi, /* @__PURE__ */ new Set()), B(this, Vr, /* @__PURE__ */ new Set()), B(this, Bt, /* @__PURE__ */ new Map()), B(this, Mt, /* @__PURE__ */ new Map()), B(this, Ei, null), B(this, Be, []), B(this, Qn, []), B(this, Tr, /* @__PURE__ */ new Set()), B(this, Yt, /* @__PURE__ */ new Set()), B(this, xt, /* @__PURE__ */ new Map()), B(this, Ii, /* @__PURE__ */ new Set()), x(this, "is_fork", !1), B(this, bi, !1), B(this, mr, /* @__PURE__ */ new Set());
257
+ _o(this, we), x(this, "id", Qc++), x(this, "current", /* @__PURE__ */ new Map()), x(this, "previous", /* @__PURE__ */ new Map()), B(this, Vi, /* @__PURE__ */ new Set()), B(this, yi, /* @__PURE__ */ new Set()), B(this, zr, /* @__PURE__ */ new Set()), B(this, Bt, /* @__PURE__ */ new Map()), B(this, Mt, /* @__PURE__ */ new Map()), B(this, Ei, null), B(this, Be, []), B(this, Qn, []), B(this, Tr, /* @__PURE__ */ new Set()), B(this, Yt, /* @__PURE__ */ new Set()), B(this, xt, /* @__PURE__ */ new Map()), B(this, Ii, /* @__PURE__ */ new Set()), x(this, "is_fork", !1), B(this, bi, !1), B(this, mr, /* @__PURE__ */ new Set());
258
258
  }
259
259
  skip_effect(t) {
260
260
  p(xt, this).has(t) || p(xt, this).set(t, {
@@ -277,22 +277,22 @@ var Jc = 1, zi = /* @__PURE__ */ new WeakMap(), yi = /* @__PURE__ */ new WeakMap
277
277
  t.v !== se && !this.previous.has(t) && this.previous.set(t, t.v), (t.f & 8388608) === 0 && (this.current.set(t, [r, i]), ge?.set(t, r)), this.is_fork || (t.v = r);
278
278
  }
279
279
  activate() {
280
- z = this;
280
+ V = this;
281
281
  }
282
282
  deactivate() {
283
- z = null, ge = null;
283
+ V = null, ge = null;
284
284
  }
285
285
  flush() {
286
286
  var t = null;
287
287
  try {
288
- zn = !0, z = this, Q(we, this, yo).call(this);
288
+ Vn = !0, V = this, Q(we, this, yo).call(this);
289
289
  } finally {
290
- fa = 0, Xn = null, wr = null, Vi = null, zn = !1, z = null, ge = null, Qt.clear();
290
+ pa = 0, Xn = null, wr = null, zi = null, Vn = !1, V = null, ge = null, Qt.clear();
291
291
  }
292
292
  }
293
293
  discard() {
294
294
  for (const t of p(yi, this)) t(this);
295
- p(yi, this).clear(), p(Vr, this).clear(), et.delete(this);
295
+ p(yi, this).clear(), p(zr, this).clear(), et.delete(this);
296
296
  }
297
297
  register_created_effect(t) {
298
298
  p(Qn, this).push(t);
@@ -320,29 +320,29 @@ var Jc = 1, zi = /* @__PURE__ */ new WeakMap(), yi = /* @__PURE__ */ new WeakMap
320
320
  t.clear(), r.clear();
321
321
  }
322
322
  oncommit(t) {
323
- p(zi, this).add(t);
323
+ p(Vi, this).add(t);
324
324
  }
325
325
  ondiscard(t) {
326
326
  p(yi, this).add(t);
327
327
  }
328
328
  on_fork_commit(t) {
329
- p(Vr, this).add(t);
329
+ p(zr, this).add(t);
330
330
  }
331
331
  run_fork_commit_callbacks() {
332
- for (const t of p(Vr, this)) t(this);
333
- p(Vr, this).clear();
332
+ for (const t of p(zr, this)) t(this);
333
+ p(zr, this).clear();
334
334
  }
335
335
  settled() {
336
- return (p(Ei, this) ?? H(Ei, this, Qs())).promise;
336
+ return (p(Ei, this) ?? H(Ei, this, ea())).promise;
337
337
  }
338
338
  static ensure() {
339
- if (z === null) {
340
- const t = z = new va();
341
- zn || (et.add(z), Yr || rt(() => {
342
- z === t && t.flush();
339
+ if (V === null) {
340
+ const t = V = new ha();
341
+ Vn || (et.add(V), Yr || rt(() => {
342
+ V === t && t.flush();
343
343
  }));
344
344
  }
345
- return z;
345
+ return V;
346
346
  }
347
347
  apply() {
348
348
  if (!Re || !this.is_fork && et.size === 1) {
@@ -368,7 +368,7 @@ var Jc = 1, zi = /* @__PURE__ */ new WeakMap(), yi = /* @__PURE__ */ new WeakMap
368
368
  for (var r = t; r.parent !== null; ) {
369
369
  r = r.parent;
370
370
  var i = r.f;
371
- if (wr !== null && r === G && (Re || (J === null || (J.f & 2) === 0) && !Kc))
371
+ if (wr !== null && r === G && (Re || (J === null || (J.f & 2) === 0) && !Jc))
372
372
  return;
373
373
  if ((i & 96) !== 0) {
374
374
  if ((i & 1024) === 0) return;
@@ -378,11 +378,11 @@ var Jc = 1, zi = /* @__PURE__ */ new WeakMap(), yi = /* @__PURE__ */ new WeakMap
378
378
  p(Be, this).push(r);
379
379
  }
380
380
  };
381
- da = ir;
381
+ va = ir;
382
382
  function Zn() {
383
383
  return this.is_fork || p(Mt, this).size > 0;
384
384
  }
385
- function Xc() {
385
+ function Zc() {
386
386
  for (const r of p(mr, this)) for (const i of p(Mt, r).keys()) {
387
387
  for (var e = !1, t = i; t.parent !== null; ) {
388
388
  if (p(xt, this).has(t)) {
@@ -396,7 +396,7 @@ function Xc() {
396
396
  return !1;
397
397
  }
398
398
  function yo() {
399
- if (fa++ > 1e3 && (et.delete(this), Zc()), !Q(we, this, Zn).call(this)) {
399
+ if (pa++ > 1e3 && (et.delete(this), tu()), !Q(we, this, Zn).call(this)) {
400
400
  for (const l of p(Tr, this))
401
401
  p(Yt, this).delete(l), ne(l, Ge), this.schedule(l);
402
402
  for (const l of p(Yt, this))
@@ -404,32 +404,32 @@ function yo() {
404
404
  }
405
405
  const e = p(Be, this);
406
406
  H(Be, this, []), this.apply();
407
- var t = wr = [], r = [], i = Vi = [];
407
+ var t = wr = [], r = [], i = zi = [];
408
408
  for (const l of e) try {
409
- Q(we, this, pa).call(this, l, t, r);
409
+ Q(we, this, ma).call(this, l, t, r);
410
410
  } catch (c) {
411
- throw ga(l), c;
411
+ throw ya(l), c;
412
412
  }
413
- if (z = null, i.length > 0) {
414
- var n = da.ensure();
413
+ if (V = null, i.length > 0) {
414
+ var n = va.ensure();
415
415
  for (const l of i) n.schedule(l);
416
416
  }
417
- if (wr = null, Vi = null, Q(we, this, Zn).call(this) || Q(we, this, Xc).call(this)) {
417
+ if (wr = null, zi = null, Q(we, this, Zn).call(this) || Q(we, this, Zc).call(this)) {
418
418
  Q(we, this, eo).call(this, r), Q(we, this, eo).call(this, t);
419
- for (const [l, c] of p(xt, this)) ma(l, c);
419
+ for (const [l, c] of p(xt, this)) _a(l, c);
420
420
  } else {
421
421
  p(Bt, this).size === 0 && et.delete(this), p(Tr, this).clear(), p(Yt, this).clear();
422
- for (const l of p(zi, this)) l(this);
423
- p(zi, this).clear(), ji = this, $s(r), $s(t), ji = null, p(Ei, this)?.resolve();
422
+ for (const l of p(Vi, this)) l(this);
423
+ p(Vi, this).clear(), ji = this, $s(r), $s(t), ji = null, p(Ei, this)?.resolve();
424
424
  }
425
- var o = z;
425
+ var o = V;
426
426
  if (p(Be, this).length > 0) {
427
427
  const l = o ?? (o = this);
428
428
  p(Be, l).push(...p(Be, this).filter((c) => !p(Be, l).includes(c)));
429
429
  }
430
- o !== null && (et.add(o), Q(we, o, yo).call(o)), Re && !et.has(this) && Q(we, this, Qc).call(this);
430
+ o !== null && (et.add(o), Q(we, o, yo).call(o)), Re && !et.has(this) && Q(we, this, eu).call(this);
431
431
  }
432
- function pa(e, t, r) {
432
+ function ma(e, t, r) {
433
433
  e.f ^= Ce;
434
434
  for (var i = e.first; i !== null; ) {
435
435
  var n = i.f, o = (n & 96) !== 0;
@@ -452,35 +452,35 @@ function pa(e, t, r) {
452
452
  }
453
453
  }
454
454
  function eo(e) {
455
- for (var t = 0; t < e.length; t += 1) ca(e[t], p(Tr, this), p(Yt, this));
455
+ for (var t = 0; t < e.length; t += 1) da(e[t], p(Tr, this), p(Yt, this));
456
456
  }
457
- function Qc() {
457
+ function eu() {
458
458
  for (const h of et) {
459
459
  var e = h.id < this.id, t = [];
460
- for (const [v, [_, m]] of this.current) {
461
- if (h.current.has(v)) {
462
- var r = h.current.get(v)[0];
463
- if (e && _ !== r) h.current.set(v, [_, m]);
460
+ for (const [f, [_, m]] of this.current) {
461
+ if (h.current.has(f)) {
462
+ var r = h.current.get(f)[0];
463
+ if (e && _ !== r) h.current.set(f, [_, m]);
464
464
  else continue;
465
465
  }
466
- t.push(v);
466
+ t.push(f);
467
467
  }
468
- var i = [...h.current.keys()].filter((v) => !this.current.has(v));
468
+ var i = [...h.current.keys()].filter((f) => !this.current.has(f));
469
469
  if (i.length === 0)
470
470
  e && h.discard();
471
471
  else if (t.length > 0) {
472
- if (e) for (const v of p(Ii, this)) h.unskip_effect(v, (_) => {
472
+ if (e) for (const f of p(Ii, this)) h.unskip_effect(f, (_) => {
473
473
  (_.f & 4194320) !== 0 ? h.schedule(_) : Q(we, h, eo).call(h, [_]);
474
474
  });
475
475
  h.activate();
476
476
  var n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
477
- for (var l of t) ha(l, i, n, o);
477
+ for (var l of t) ga(l, i, n, o);
478
478
  o = /* @__PURE__ */ new Map();
479
- var c = [...h.current.keys()].filter((v) => this.current.has(v) ? this.current.get(v)[0] !== v : !0);
480
- for (const v of p(Qn, this)) (v.f & 155648) === 0 && bo(v, c, o) && ((v.f & 4194320) !== 0 ? (ne(v, Ge), h.schedule(v)) : p(Tr, h).add(v));
479
+ var c = [...h.current.keys()].filter((f) => this.current.has(f) ? this.current.get(f)[0] !== f : !0);
480
+ for (const f of p(Qn, this)) (f.f & 155648) === 0 && bo(f, c, o) && ((f.f & 4194320) !== 0 ? (ne(f, Ge), h.schedule(f)) : p(Tr, h).add(f));
481
481
  if (p(Be, h).length > 0) {
482
482
  h.apply();
483
- for (var d of p(Be, h)) Q(we, h, pa).call(h, d, [], []);
483
+ for (var d of p(Be, h)) Q(we, h, ma).call(h, d, [], []);
484
484
  H(Be, h, []);
485
485
  }
486
486
  h.deactivate();
@@ -493,22 +493,22 @@ function Ut(e) {
493
493
  Yr = !0;
494
494
  try {
495
495
  var r;
496
- for (e && (z !== null && !z.is_fork && z.flush(), r = e()); ; ) {
497
- if (Gc(), z === null) return r;
498
- z.flush();
496
+ for (e && (V !== null && !V.is_fork && V.flush(), r = e()); ; ) {
497
+ if (Kc(), V === null) return r;
498
+ V.flush();
499
499
  }
500
500
  } finally {
501
501
  Yr = t;
502
502
  }
503
503
  }
504
- function Zc() {
504
+ function tu() {
505
505
  if (0) {
506
506
  var e;
507
- for (const r of z.current.keys()) for (const [i, n] of r.updated ?? [])
507
+ for (const r of V.current.keys()) for (const [i, n] of r.updated ?? [])
508
508
  var t;
509
509
  }
510
510
  try {
511
- Cc();
511
+ Nc();
512
512
  } catch (r) {
513
513
  Ot(r, Xn);
514
514
  }
@@ -519,7 +519,7 @@ function $s(e) {
519
519
  if (t !== 0) {
520
520
  for (var r = 0; r < t; ) {
521
521
  var i = e[r++];
522
- if ((i.f & 24576) === 0 && si(i) && (Qe = /* @__PURE__ */ new Set(), Sr(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && Na(i), Qe?.size > 0)) {
522
+ if ((i.f & 24576) === 0 && si(i) && (Qe = /* @__PURE__ */ new Set(), Sr(i), i.deps === null && i.first === null && i.nodes === null && i.teardown === null && i.ac === null && za(i), Qe?.size > 0)) {
523
523
  Qt.clear();
524
524
  for (const n of Qe) {
525
525
  if ((n.f & 24576) !== 0) continue;
@@ -538,11 +538,11 @@ function $s(e) {
538
538
  Qe = null;
539
539
  }
540
540
  }
541
- function ha(e, t, r, i) {
541
+ function ga(e, t, r, i) {
542
542
  if (!r.has(e) && (r.add(e), e.reactions !== null))
543
543
  for (const n of e.reactions) {
544
544
  const o = n.f;
545
- (o & 2) !== 0 ? ha(n, t, r, i) : (o & 4194320) !== 0 && (o & 2048) === 0 && bo(n, t, i) && (ne(n, Ge), wo(n));
545
+ (o & 2) !== 0 ? ga(n, t, r, i) : (o & 4194320) !== 0 && (o & 2048) === 0 && bo(n, t, i) && (ne(n, Ge), wo(n));
546
546
  }
547
547
  }
548
548
  function bo(e, t, r) {
@@ -556,21 +556,21 @@ function bo(e, t, r) {
556
556
  return r.set(e, !1), !1;
557
557
  }
558
558
  function wo(e) {
559
- z.schedule(e);
559
+ V.schedule(e);
560
560
  }
561
- function ma(e, t) {
561
+ function _a(e, t) {
562
562
  if (!((e.f & 32) !== 0 && (e.f & 1024) !== 0)) {
563
563
  (e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), ne(e, Ce);
564
564
  for (var r = e.first; r !== null; )
565
- ma(r, t), r = r.next;
565
+ _a(r, t), r = r.next;
566
566
  }
567
567
  }
568
- function ga(e) {
568
+ function ya(e) {
569
569
  ne(e, Ce);
570
570
  for (var t = e.first; t !== null; )
571
- ga(t), t = t.next;
571
+ ya(t), t = t.next;
572
572
  }
573
- function eu(e) {
573
+ function ru(e) {
574
574
  let t = 0, r = tr(0), i;
575
575
  return () => {
576
576
  Eo() && (s(r), en(() => (t === 0 && (i = or(() => e(() => Jr(r)))), t += 1, () => {
@@ -580,13 +580,13 @@ function eu(e) {
580
580
  })));
581
581
  };
582
582
  }
583
- var tu = qi | Ar;
584
- function ru(e, t, r, i) {
585
- new iu(e, t, r, i);
583
+ var iu = qi | Ar;
584
+ function nu(e, t, r, i) {
585
+ new ou(e, t, r, i);
586
586
  }
587
- var He = /* @__PURE__ */ new WeakMap(), to = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), dr = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakMap(), ro = /* @__PURE__ */ new WeakMap(), io = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), Ps = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakSet(), iu = class {
587
+ var He = /* @__PURE__ */ new WeakMap(), to = /* @__PURE__ */ new WeakMap(), Ze = /* @__PURE__ */ new WeakMap(), Zr = /* @__PURE__ */ new WeakMap(), xe = /* @__PURE__ */ new WeakMap(), tt = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), We = /* @__PURE__ */ new WeakMap(), Jt = /* @__PURE__ */ new WeakMap(), dr = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), wi = /* @__PURE__ */ new WeakMap(), ro = /* @__PURE__ */ new WeakMap(), io = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), Ps = /* @__PURE__ */ new WeakMap(), he = /* @__PURE__ */ new WeakSet(), ou = class {
588
588
  constructor(e, t, r, i) {
589
- _o(this, he), x(this, "parent", void 0), x(this, "is_pending", !1), x(this, "transform_error", void 0), B(this, He, void 0), B(this, to, N ? Y : null), B(this, Ze, void 0), B(this, Zr, void 0), B(this, xe, void 0), B(this, tt, null), B(this, $e, null), B(this, We, null), B(this, Jt, null), B(this, dr, 0), B(this, Xt, 0), B(this, wi, !1), B(this, ro, /* @__PURE__ */ new Set()), B(this, io, /* @__PURE__ */ new Set()), B(this, Ft, null), B(this, Ps, eu(() => (H(Ft, this, tr(p(dr, this))), () => {
589
+ _o(this, he), x(this, "parent", void 0), x(this, "is_pending", !1), x(this, "transform_error", void 0), B(this, He, void 0), B(this, to, N ? Y : null), B(this, Ze, void 0), B(this, Zr, void 0), B(this, xe, void 0), B(this, tt, null), B(this, $e, null), B(this, We, null), B(this, Jt, null), B(this, dr, 0), B(this, Xt, 0), B(this, wi, !1), B(this, ro, /* @__PURE__ */ new Set()), B(this, io, /* @__PURE__ */ new Set()), B(this, Ft, null), B(this, Ps, ru(() => (H(Ft, this, tr(p(dr, this))), () => {
590
590
  H(Ft, this, null);
591
591
  }))), H(He, this, e), H(Ze, this, t), H(Zr, this, (n) => {
592
592
  var o = G;
@@ -598,13 +598,13 @@ var He = /* @__PURE__ */ new WeakMap(), to = /* @__PURE__ */ new WeakMap(), Ze =
598
598
  const o = n.data === "[!";
599
599
  if (n.data.startsWith("[?")) {
600
600
  const l = JSON.parse(n.data.slice(2));
601
- Q(he, this, ou).call(this, l);
602
- } else o ? Q(he, this, su).call(this) : Q(he, this, nu).call(this);
603
- } else Q(he, this, _a).call(this);
604
- }, tu)), N && H(He, this, Y);
601
+ Q(he, this, au).call(this, l);
602
+ } else o ? Q(he, this, lu).call(this) : Q(he, this, su).call(this);
603
+ } else Q(he, this, ba).call(this);
604
+ }, iu)), N && H(He, this, Y);
605
605
  }
606
606
  defer_effect(e) {
607
- ca(e, p(ro, this), p(io, this));
607
+ da(e, p(ro, this), p(io, this));
608
608
  }
609
609
  is_rendered() {
610
610
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
@@ -613,7 +613,7 @@ var He = /* @__PURE__ */ new WeakMap(), to = /* @__PURE__ */ new WeakMap(), Ze =
613
613
  return !!p(Ze, this).pending;
614
614
  }
615
615
  update_pending_count(e, t) {
616
- Q(he, this, ya).call(this, e, t), H(dr, this, p(dr, this) + e), !(!p(Ft, this) || p(wi, this)) && (H(wi, this, !0), rt(() => {
616
+ Q(he, this, wa).call(this, e, t), H(dr, this, p(dr, this) + e), !(!p(Ft, this) || p(wi, this)) && (H(wi, this, !0), rt(() => {
617
617
  H(wi, this, !1), p(Ft, this) && kr(p(Ft, this), p(dr, this));
618
618
  }));
619
619
  }
@@ -622,35 +622,35 @@ var He = /* @__PURE__ */ new WeakMap(), to = /* @__PURE__ */ new WeakMap(), Ze =
622
622
  }
623
623
  error(e) {
624
624
  if (!p(Ze, this).onerror && !p(Ze, this).failed) throw e;
625
- z?.is_fork ? (p(tt, this) && z.skip_effect(p(tt, this)), p($e, this) && z.skip_effect(p($e, this)), p(We, this) && z.skip_effect(p(We, this)), z.on_fork_commit(() => {
625
+ V?.is_fork ? (p(tt, this) && V.skip_effect(p(tt, this)), p($e, this) && V.skip_effect(p($e, this)), p(We, this) && V.skip_effect(p(We, this)), V.on_fork_commit(() => {
626
626
  Q(he, this, Ms).call(this, e);
627
627
  })) : Q(he, this, Ms).call(this, e);
628
628
  }
629
629
  };
630
- function nu() {
630
+ function su() {
631
631
  try {
632
632
  H(tt, this, ke(() => p(Zr, this).call(this, p(He, this))));
633
633
  } catch (e) {
634
634
  this.error(e);
635
635
  }
636
636
  }
637
- function ou(e) {
637
+ function au(e) {
638
638
  const t = p(Ze, this).failed;
639
639
  t && H(We, this, ke(() => {
640
640
  t(p(He, this), () => e, () => () => {
641
641
  });
642
642
  }));
643
643
  }
644
- function su() {
644
+ function lu() {
645
645
  const e = p(Ze, this).pending;
646
646
  e && (this.is_pending = !0, H($e, this, ke(() => e(p(He, this)))), rt(() => {
647
647
  var t = H(Jt, this, document.createDocumentFragment()), r = _e();
648
648
  t.append(r), H(tt, this, Q(he, this, no).call(this, () => ke(() => p(Zr, this).call(this, r)))), p(Xt, this) === 0 && (p(He, this).before(t), H(Jt, this, null), nr(p($e, this), () => {
649
649
  H($e, this, null);
650
- }), Q(he, this, To).call(this, z));
650
+ }), Q(he, this, To).call(this, V));
651
651
  }));
652
652
  }
653
- function _a() {
653
+ function ba() {
654
654
  try {
655
655
  if (this.is_pending = this.has_pending_snippet(), H(Xt, this, 0), H(dr, this, 0), H(tt, this, ke(() => {
656
656
  p(Zr, this).call(this, p(He, this));
@@ -659,7 +659,7 @@ function _a() {
659
659
  Mo(p(tt, this), e);
660
660
  const t = p(Ze, this).pending;
661
661
  H($e, this, ke(() => t(p(He, this))));
662
- } else Q(he, this, To).call(this, z);
662
+ } else Q(he, this, To).call(this, V);
663
663
  } catch (t) {
664
664
  this.error(t);
665
665
  }
@@ -673,16 +673,16 @@ function no(e) {
673
673
  try {
674
674
  return ir.ensure(), e();
675
675
  } catch (n) {
676
- return aa(n), null;
676
+ return ca(n), null;
677
677
  } finally {
678
678
  it(t), Ne(r), br(i);
679
679
  }
680
680
  }
681
- function ya(e, t) {
681
+ function wa(e, t) {
682
682
  if (!this.has_pending_snippet()) {
683
683
  if (this.parent) {
684
684
  var r;
685
- Q(he, r = this.parent, ya).call(r, e, t);
685
+ Q(he, r = this.parent, wa).call(r, e, t);
686
686
  }
687
687
  return;
688
688
  }
@@ -691,19 +691,19 @@ function ya(e, t) {
691
691
  }), p(Jt, this) && (p(He, this).before(p(Jt, this)), H(Jt, this, null)));
692
692
  }
693
693
  function Ms(e) {
694
- p(tt, this) && (ue(p(tt, this)), H(tt, this, null)), p($e, this) && (ue(p($e, this)), H($e, this, null)), p(We, this) && (ue(p(We, this)), H(We, this, null)), N && (ce(p(to, this)), ea(), ce(Ni()));
694
+ p(tt, this) && (ue(p(tt, this)), H(tt, this, null)), p($e, this) && (ue(p($e, this)), H($e, this, null)), p(We, this) && (ue(p(We, this)), H(We, this, null)), N && (ce(p(to, this)), ra(), ce(Ni()));
695
695
  var t = p(Ze, this).onerror;
696
696
  let r = p(Ze, this).failed;
697
697
  var i = !1, n = !1;
698
698
  const o = () => {
699
699
  if (i) {
700
- Bc();
700
+ Hc();
701
701
  return;
702
702
  }
703
- i = !0, n && Dc(), p(We, this) !== null && nr(p(We, this), () => {
703
+ i = !0, n && Wc(), p(We, this) !== null && nr(p(We, this), () => {
704
704
  H(We, this, null);
705
705
  }), Q(he, this, no).call(this, () => {
706
- Q(he, this, _a).call(this);
706
+ Q(he, this, ba).call(this);
707
707
  });
708
708
  }, l = (c) => {
709
709
  try {
@@ -733,14 +733,14 @@ function Ms(e) {
733
733
  c !== null && typeof c == "object" && typeof c.then == "function" ? c.then(l, (d) => Ot(d, p(xe, this) && p(xe, this).parent)) : l(c);
734
734
  });
735
735
  }
736
- function ba(e, t, r, i) {
736
+ function Ta(e, t, r, i) {
737
737
  const n = ni() ? Ji : ko;
738
738
  var o = e.filter((m) => !m.settled);
739
739
  if (r.length === 0 && o.length === 0) {
740
740
  i(t.map(n));
741
741
  return;
742
742
  }
743
- var l = G, c = au(), d = o.length === 1 ? o[0].promise : o.length > 1 ? Promise.all(o.map((m) => m.promise)) : null;
743
+ var l = G, c = cu(), d = o.length === 1 ? o[0].promise : o.length > 1 ? Promise.all(o.map((m) => m.promise)) : null;
744
744
  function h(m) {
745
745
  c();
746
746
  try {
@@ -754,26 +754,26 @@ function ba(e, t, r, i) {
754
754
  d.then(() => h(t.map(n)));
755
755
  return;
756
756
  }
757
- var v = wa();
757
+ var f = ka();
758
758
  function _() {
759
- Promise.all(r.map((m) => /* @__PURE__ */ lu(m))).then((m) => h([...t.map(n), ...m])).catch((m) => Ot(m, l)).finally(() => v());
759
+ Promise.all(r.map((m) => /* @__PURE__ */ uu(m))).then((m) => h([...t.map(n), ...m])).catch((m) => Ot(m, l)).finally(() => f());
760
760
  }
761
761
  d ? d.then(() => {
762
762
  c(), _(), Di();
763
763
  }) : _();
764
764
  }
765
- function au() {
766
- var e = G, t = J, r = re, i = z;
765
+ function cu() {
766
+ var e = G, t = J, r = re, i = V;
767
767
  if (0) var n;
768
768
  return function(l = !0) {
769
769
  it(e), Ne(t), br(r), l && (e.f & 16384) === 0 && (i?.activate(), i?.apply());
770
770
  };
771
771
  }
772
772
  function Di(e = !0) {
773
- it(null), Ne(null), br(null), e && z?.deactivate();
773
+ it(null), Ne(null), br(null), e && V?.deactivate();
774
774
  }
775
- function wa() {
776
- var e = G, t = e.b, r = z, i = t.is_rendered();
775
+ function ka() {
776
+ var e = G, t = e.b, r = V, i = t.is_rendered();
777
777
  return t.update_pending_count(1, r), r.increment(i, e), (n = !1) => {
778
778
  t.update_pending_count(-1, r), r.decrement(i, e, n);
779
779
  };
@@ -785,7 +785,7 @@ function Ji(e) {
785
785
  ctx: re,
786
786
  deps: null,
787
787
  effects: null,
788
- equals: ra,
788
+ equals: na,
789
789
  f: t,
790
790
  fn: e,
791
791
  reactions: null,
@@ -797,52 +797,52 @@ function Ji(e) {
797
797
  };
798
798
  }
799
799
  // @__NO_SIDE_EFFECTS__
800
- function lu(e, t, r) {
800
+ function uu(e, t, r) {
801
801
  let i = G;
802
- i === null && Pc();
802
+ i === null && xc();
803
803
  var n = void 0, o = tr(se), l = !J, c = /* @__PURE__ */ new Map();
804
- return ku(() => {
805
- var d = G, h = Qs();
804
+ return Au(() => {
805
+ var d = G, h = ea();
806
806
  n = h.promise;
807
807
  try {
808
808
  Promise.resolve(e()).then(h.resolve, h.reject).finally(Di);
809
809
  } catch (b) {
810
810
  h.reject(b), Di();
811
811
  }
812
- var v = z;
812
+ var f = V;
813
813
  if (l) {
814
- if ((d.f & 32768) !== 0) var _ = wa();
814
+ if ((d.f & 32768) !== 0) var _ = ka();
815
815
  if (i.b.is_rendered())
816
- c.get(v)?.reject(vt), c.delete(v);
816
+ c.get(f)?.reject(vt), c.delete(f);
817
817
  else {
818
818
  for (const b of c.values()) b.reject(vt);
819
819
  c.clear();
820
820
  }
821
- c.set(v, h);
821
+ c.set(f, h);
822
822
  }
823
823
  const m = (b, k = void 0) => {
824
824
  if (_ && _(k === vt), !(k === vt || (d.f & 16384) !== 0)) {
825
- if (v.activate(), k)
825
+ if (f.activate(), k)
826
826
  o.f |= Ri, kr(o, k);
827
827
  else {
828
828
  (o.f & 8388608) !== 0 && (o.f ^= Ri), kr(o, b);
829
829
  for (const [E, w] of c) {
830
- if (c.delete(E), E === v) break;
830
+ if (c.delete(E), E === f) break;
831
831
  w.reject(vt);
832
832
  }
833
833
  }
834
- v.deactivate();
834
+ f.deactivate();
835
835
  }
836
836
  };
837
837
  h.promise.then(m, (b) => m(null, b || "unknown"));
838
838
  }), Io(() => {
839
839
  for (const d of c.values()) d.reject(vt);
840
840
  }), new Promise((d) => {
841
- function h(v) {
841
+ function h(f) {
842
842
  function _() {
843
- v === n ? d(o) : h(n);
843
+ f === n ? d(o) : h(n);
844
844
  }
845
- v.then(_, _);
845
+ f.then(_, _);
846
846
  }
847
847
  h(n);
848
848
  });
@@ -850,14 +850,14 @@ function lu(e, t, r) {
850
850
  // @__NO_SIDE_EFFECTS__
851
851
  function At(e) {
852
852
  const t = /* @__PURE__ */ Ji(e);
853
- return Re || za(t), t;
853
+ return Re || Fa(t), t;
854
854
  }
855
855
  // @__NO_SIDE_EFFECTS__
856
856
  function ko(e) {
857
857
  const t = /* @__PURE__ */ Ji(e);
858
- return t.equals = ia, t;
858
+ return t.equals = oa, t;
859
859
  }
860
- function cu(e) {
860
+ function du(e) {
861
861
  var t = e.effects;
862
862
  if (t !== null) {
863
863
  e.effects = null;
@@ -867,39 +867,39 @@ function cu(e) {
867
867
  function So(e) {
868
868
  var t, r = G, i = e.parent;
869
869
  if (!mt && i !== null && (i.f & 24576) !== 0)
870
- return Fc(), e.v;
870
+ return Bc(), e.v;
871
871
  it(i);
872
872
  try {
873
- e.f &= ~ri, cu(e), t = Ba(e);
873
+ e.f &= ~ri, du(e), t = Ha(e);
874
874
  } finally {
875
875
  it(r);
876
876
  }
877
877
  return t;
878
878
  }
879
- function Ta(e) {
879
+ function Sa(e) {
880
880
  var t = So(e);
881
- if (!e.equals(t) && (e.wv = Fa(), (!z?.is_fork || e.deps === null) && (z !== null ? z.capture(e, t, !0) : e.v = t, e.deps === null))) {
881
+ if (!e.equals(t) && (e.wv = Ba(), (!V?.is_fork || e.deps === null) && (V !== null ? V.capture(e, t, !0) : e.v = t, e.deps === null))) {
882
882
  ne(e, Ce);
883
883
  return;
884
884
  }
885
- mt || (ge !== null ? (Eo() || z?.is_fork) && ge.set(e, t) : go(e));
885
+ mt || (ge !== null ? (Eo() || V?.is_fork) && ge.set(e, t) : go(e));
886
886
  }
887
- function uu(e) {
887
+ function fu(e) {
888
888
  if (e.effects !== null)
889
- for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(vt), t.teardown = wc, t.ac = null, ei(t, 0), $o(t));
889
+ for (const t of e.effects) (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(vt), t.teardown = kc, t.ac = null, ei(t, 0), $o(t));
890
890
  }
891
- function ka(e) {
891
+ function Aa(e) {
892
892
  if (e.effects !== null)
893
893
  for (const t of e.effects) t.teardown && Sr(t);
894
894
  }
895
895
  var oo = /* @__PURE__ */ new Set(), Qt = /* @__PURE__ */ new Map();
896
- var Sa = !1;
896
+ var Ea = !1;
897
897
  function tr(e, t) {
898
898
  var r = {
899
899
  f: 0,
900
900
  v: e,
901
901
  reactions: null,
902
- equals: ra,
902
+ equals: na,
903
903
  rv: 0,
904
904
  wv: 0
905
905
  };
@@ -908,21 +908,21 @@ function tr(e, t) {
908
908
  // @__NO_SIDE_EFFECTS__
909
909
  function C(e, t) {
910
910
  const r = tr(e, t);
911
- return za(r), r;
911
+ return Fa(r), r;
912
912
  }
913
913
  // @__NO_SIDE_EFFECTS__
914
- function Aa(e, t = !1, r = !0) {
914
+ function Ia(e, t = !1, r = !0) {
915
915
  const i = tr(e);
916
- if (t || (i.equals = ia), ii && r && re !== null && re.l !== null) {
916
+ if (t || (i.equals = oa), ii && r && re !== null && re.l !== null) {
917
917
  var n;
918
918
  ((n = re.l).s ?? (n.s = [])).push(i);
919
919
  }
920
920
  return i;
921
921
  }
922
922
  function y(e, t, r = !1) {
923
- J !== null && (!Ue || (J.f & 131072) !== 0) && ni() && (J.f & 4325394) !== 0 && (Le === null || !_r.call(Le, e)) && zc();
923
+ J !== null && (!Ue || (J.f & 131072) !== 0) && ni() && (J.f & 4325394) !== 0 && (Le === null || !_r.call(Le, e)) && Fc();
924
924
  let i = r ? Oe(t) : t;
925
- return kr(e, i, Vi);
925
+ return kr(e, i, zi);
926
926
  }
927
927
  function kr(e, t, r = null) {
928
928
  if (!e.equals(t)) {
@@ -932,12 +932,12 @@ function kr(e, t, r = null) {
932
932
  const n = e;
933
933
  (e.f & 2048) !== 0 && So(n), ge === null && go(n);
934
934
  }
935
- e.wv = Fa(), Ea(e, Ge, r), ni() && G !== null && (G.f & 1024) !== 0 && (G.f & 96) === 0 && (Me === null ? Iu([e]) : Me.push(e)), !i.is_fork && oo.size > 0 && !Sa && du();
935
+ e.wv = Ba(), $a(e, Ge, r), ni() && G !== null && (G.f & 1024) !== 0 && (G.f & 96) === 0 && (Me === null ? Pu([e]) : Me.push(e)), !i.is_fork && oo.size > 0 && !Ea && vu();
936
936
  }
937
937
  return t;
938
938
  }
939
- function du() {
940
- Sa = !1;
939
+ function vu() {
940
+ Ea = !1;
941
941
  for (const e of oo)
942
942
  (e.f & 1024) !== 0 && ne(e, rr), si(e) && Sr(e);
943
943
  oo.clear();
@@ -945,7 +945,7 @@ function du() {
945
945
  function Jr(e) {
946
946
  y(e, e.v + 1);
947
947
  }
948
- function Ea(e, t, r) {
948
+ function $a(e, t, r) {
949
949
  var i = e.reactions;
950
950
  if (i !== null)
951
951
  for (var n = ni(), o = i.length, l = 0; l < o; l++) {
@@ -953,8 +953,8 @@ function Ea(e, t, r) {
953
953
  if (!(!n && c === G)) {
954
954
  var h = (d & Ge) === 0;
955
955
  if (h && ne(c, t), (d & 2) !== 0) {
956
- var v = c;
957
- ge?.delete(v), (d & 65536) === 0 && (d & 512 && (c.f |= ri), Ea(v, rr, r));
956
+ var f = c;
957
+ ge?.delete(f), (d & 65536) === 0 && (d & 512 && (c.f |= ri), $a(f, rr, r));
958
958
  } else if (h) {
959
959
  var _ = c;
960
960
  (d & 16) !== 0 && Qe !== null && Qe.add(_), r !== null ? r.push(_) : wo(_);
@@ -962,11 +962,11 @@ function Ea(e, t, r) {
962
962
  }
963
963
  }
964
964
  }
965
- var fu = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
965
+ var pu = /^[a-zA-Z_$][a-zA-Z_$0-9]*$/;
966
966
  function Oe(e) {
967
967
  if (typeof e != "object" || e === null || Kt in e) return e;
968
- const t = Xs(e);
969
- if (t !== yc && t !== bc) return e;
968
+ const t = Zs(e);
969
+ if (t !== wc && t !== Tc) return e;
970
970
  var r = /* @__PURE__ */ new Map(), i = Hi(e), n = /* @__PURE__ */ C(0), o = null, l = Zt, c = (_) => {
971
971
  if (Zt === l) return _();
972
972
  var m = J, b = Zt;
@@ -977,16 +977,16 @@ function Oe(e) {
977
977
  i && r.set("length", /* @__PURE__ */ C(e.length, o));
978
978
  var d = "";
979
979
  let h = !1;
980
- function v(_) {
980
+ function f(_) {
981
981
  if (!h) {
982
982
  h = !0, d = _, Is(n, `${d} version`);
983
- for (const [m, b] of r) Is(b, vu(d, m));
983
+ for (const [m, b] of r) Is(b, hu(d, m));
984
984
  h = !1;
985
985
  }
986
986
  }
987
987
  return new Proxy(e, {
988
988
  defineProperty(_, m, b) {
989
- (!("value" in b) || b.configurable === !1 || b.enumerable === !1 || b.writable === !1) && jc();
989
+ (!("value" in b) || b.configurable === !1 || b.enumerable === !1 || b.writable === !1) && Vc();
990
990
  var k = r.get(m);
991
991
  return k === void 0 ? c(() => {
992
992
  var E = /* @__PURE__ */ C(b.value, o);
@@ -1073,12 +1073,12 @@ function Oe(e) {
1073
1073
  return m;
1074
1074
  },
1075
1075
  setPrototypeOf() {
1076
- Vc();
1076
+ Dc();
1077
1077
  }
1078
1078
  });
1079
1079
  }
1080
- function vu(e, t) {
1081
- return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : fu.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1080
+ function hu(e, t) {
1081
+ return typeof t == "symbol" ? `${e}[Symbol(${t.description ?? ""})]` : pu.test(t) ? `${e}.${t}` : /^\d+$/.test(t) ? `${e}[${t}]` : `${e}['${t}']`;
1082
1082
  }
1083
1083
  function xs(e) {
1084
1084
  try {
@@ -1087,15 +1087,15 @@ function xs(e) {
1087
1087
  }
1088
1088
  return e;
1089
1089
  }
1090
- function pu(e, t) {
1090
+ function mu(e, t) {
1091
1091
  return Object.is(xs(e), xs(t));
1092
1092
  }
1093
- var Os, hu, Ia, $a, Pa;
1093
+ var Os, gu, Pa, Ma, xa;
1094
1094
  function so() {
1095
1095
  if (Os === void 0) {
1096
- Os = window, hu = document, Ia = /Firefox/.test(navigator.userAgent);
1096
+ Os = window, gu = document, Pa = /Firefox/.test(navigator.userAgent);
1097
1097
  var e = Element.prototype, t = Node.prototype, r = Text.prototype;
1098
- $a = qt(t, "firstChild").get, Pa = qt(t, "nextSibling").get, Ss(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Ss(r) && (r.__t = void 0);
1098
+ Ma = qt(t, "firstChild").get, xa = qt(t, "nextSibling").get, Ss(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Ss(r) && (r.__t = void 0);
1099
1099
  }
1100
1100
  }
1101
1101
  function _e(e = "") {
@@ -1103,11 +1103,11 @@ function _e(e = "") {
1103
1103
  }
1104
1104
  // @__NO_SIDE_EFFECTS__
1105
1105
  function ht(e) {
1106
- return $a.call(e);
1106
+ return Ma.call(e);
1107
1107
  }
1108
1108
  // @__NO_SIDE_EFFECTS__
1109
1109
  function nt(e) {
1110
- return Pa.call(e);
1110
+ return xa.call(e);
1111
1111
  }
1112
1112
  function $(e, t) {
1113
1113
  if (!N) return /* @__PURE__ */ ht(e);
@@ -1119,7 +1119,7 @@ function $(e, t) {
1119
1119
  }
1120
1120
  return t && Qi(r), ce(r), r;
1121
1121
  }
1122
- function mu(e, t = !1) {
1122
+ function _u(e, t = !1) {
1123
1123
  if (!N) {
1124
1124
  var r = /* @__PURE__ */ ht(e);
1125
1125
  return r instanceof Comment && r.data === "" ? /* @__PURE__ */ nt(r) : r;
@@ -1150,7 +1150,7 @@ function A(e, t = 1, r = !1) {
1150
1150
  function Ao(e) {
1151
1151
  e.textContent = "";
1152
1152
  }
1153
- function Ma() {
1153
+ function Oa() {
1154
1154
  return !Re || Qe !== null ? !1 : (G.f & ho) !== 0;
1155
1155
  }
1156
1156
  function Xi(e, t, r) {
@@ -1163,7 +1163,7 @@ function Qi(e) {
1163
1163
  for (; t !== null && t.nodeType === 3; )
1164
1164
  t.remove(), e.nodeValue += t.nodeValue, t = e.nextSibling;
1165
1165
  }
1166
- function gu(e, t) {
1166
+ function yu(e, t) {
1167
1167
  if (t) {
1168
1168
  const r = document.body;
1169
1169
  e.autofocus = !0, rt(() => {
@@ -1171,11 +1171,11 @@ function gu(e, t) {
1171
1171
  });
1172
1172
  }
1173
1173
  }
1174
- function _u(e) {
1174
+ function bu(e) {
1175
1175
  N && /* @__PURE__ */ ht(e) !== null && Ao(e);
1176
1176
  }
1177
1177
  var Ls = !1;
1178
- function xa() {
1178
+ function La() {
1179
1179
  Ls || (Ls = !0, document.addEventListener("reset", (e) => {
1180
1180
  Promise.resolve().then(() => {
1181
1181
  if (!e.defaultPrevented) for (const t of e.target.elements) t.__on_r?.();
@@ -1191,17 +1191,17 @@ function Zi(e) {
1191
1191
  Ne(t), it(r);
1192
1192
  }
1193
1193
  }
1194
- function Oa(e, t, r, i = r) {
1194
+ function Ca(e, t, r, i = r) {
1195
1195
  e.addEventListener(t, () => Zi(r));
1196
1196
  const n = e.__on_r;
1197
1197
  n ? e.__on_r = () => {
1198
1198
  n(), i(!0);
1199
- } : e.__on_r = () => i(!0), xa();
1199
+ } : e.__on_r = () => i(!0), La();
1200
1200
  }
1201
- function yu(e) {
1202
- G === null && (J === null && Lc(e), Oc()), mt && xc(e);
1201
+ function wu(e) {
1202
+ G === null && (J === null && Rc(e), Cc()), mt && Lc(e);
1203
1203
  }
1204
- function bu(e, t) {
1204
+ function Tu(e, t) {
1205
1205
  var r = t.last;
1206
1206
  r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
1207
1207
  }
@@ -1224,7 +1224,7 @@ function qe(e, t) {
1224
1224
  wv: 0,
1225
1225
  ac: null
1226
1226
  };
1227
- z?.register_created_effect(i);
1227
+ V?.register_created_effect(i);
1228
1228
  var n = i;
1229
1229
  if ((e & 4) !== 0) wr !== null ? wr.push(i) : ir.ensure().schedule(i);
1230
1230
  else if (t !== null) {
@@ -1235,7 +1235,7 @@ function qe(e, t) {
1235
1235
  }
1236
1236
  n.deps === null && n.teardown === null && n.nodes === null && n.first === n.last && (n.f & 524288) === 0 && (n = n.first, (e & 16) !== 0 && (e & 65536) !== 0 && n !== null && (n.f |= qi));
1237
1237
  }
1238
- if (n !== null && (n.parent = r, r !== null && bu(n, r), J !== null && (J.f & 2) !== 0 && (e & 64) === 0)) {
1238
+ if (n !== null && (n.parent = r, r !== null && Tu(n, r), J !== null && (J.f & 2) !== 0 && (e & 64) === 0)) {
1239
1239
  var o = J;
1240
1240
  (o.effects ?? (o.effects = [])).push(n);
1241
1241
  }
@@ -1249,24 +1249,24 @@ function Io(e) {
1249
1249
  return ne(t, Ce), t.teardown = e, t;
1250
1250
  }
1251
1251
  function $i(e) {
1252
- yu("$effect");
1252
+ wu("$effect");
1253
1253
  var t = G.f;
1254
1254
  if (!J && (t & 32) !== 0 && (t & 32768) === 0) {
1255
1255
  var r = re;
1256
1256
  (r.e ?? (r.e = [])).push(e);
1257
- } else return La(e);
1257
+ } else return Ra(e);
1258
1258
  }
1259
- function La(e) {
1260
- return qe(4 | Ac, e);
1259
+ function Ra(e) {
1260
+ return qe(4 | Ic, e);
1261
1261
  }
1262
- function wu(e) {
1262
+ function ku(e) {
1263
1263
  ir.ensure();
1264
1264
  const t = qe(64 | Ar, e);
1265
1265
  return () => {
1266
1266
  ue(t);
1267
1267
  };
1268
1268
  }
1269
- function Tu(e) {
1269
+ function Su(e) {
1270
1270
  ir.ensure();
1271
1271
  const t = qe(64 | Ar, e);
1272
1272
  return (r = {}) => new Promise((i) => {
@@ -1278,14 +1278,14 @@ function Tu(e) {
1278
1278
  function oi(e) {
1279
1279
  return qe(4, e);
1280
1280
  }
1281
- function ku(e) {
1282
- return qe(Ec | Ar, e);
1281
+ function Au(e) {
1282
+ return qe($c | Ar, e);
1283
1283
  }
1284
1284
  function en(e, t = 0) {
1285
1285
  return qe(8 | t, e);
1286
1286
  }
1287
1287
  function fe(e, t = [], r = [], i = []) {
1288
- ba(i, t, r, (n) => {
1288
+ Ta(i, t, r, (n) => {
1289
1289
  qe(8, () => e(...n.map(s)));
1290
1290
  });
1291
1291
  }
@@ -1293,14 +1293,14 @@ function tn(e, t = 0) {
1293
1293
  var r = qe(16 | t, e);
1294
1294
  return r;
1295
1295
  }
1296
- function Ca(e, t = 0) {
1297
- var r = qe(kc | t, e);
1296
+ function Na(e, t = 0) {
1297
+ var r = qe(Ac | t, e);
1298
1298
  return r;
1299
1299
  }
1300
1300
  function ke(e) {
1301
1301
  return qe(32 | Ar, e);
1302
1302
  }
1303
- function Ra(e) {
1303
+ function ja(e) {
1304
1304
  var t = e.teardown;
1305
1305
  if (t !== null) {
1306
1306
  const r = mt, i = J;
@@ -1323,7 +1323,7 @@ function $o(e, t = !1) {
1323
1323
  (r.f & 64) !== 0 ? r.parent = null : ue(r, t), r = i;
1324
1324
  }
1325
1325
  }
1326
- function Su(e) {
1326
+ function Eu(e) {
1327
1327
  for (var t = e.first; t !== null; ) {
1328
1328
  var r = t.next;
1329
1329
  (t.f & 32) === 0 && ue(t), t = r;
@@ -1331,26 +1331,26 @@ function Su(e) {
1331
1331
  }
1332
1332
  function ue(e, t = !0) {
1333
1333
  var r = !1;
1334
- (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (Au(e.nodes.start, e.nodes.end), r = !0), ne(e, As), $o(e, t && !r), ei(e, 0);
1334
+ (t || (e.f & 262144) !== 0) && e.nodes !== null && e.nodes.end !== null && (Iu(e.nodes.start, e.nodes.end), r = !0), ne(e, As), $o(e, t && !r), ei(e, 0);
1335
1335
  var i = e.nodes && e.nodes.t;
1336
1336
  if (i !== null) for (const o of i) o.stop();
1337
- Ra(e), e.f ^= As, e.f |= Sc;
1337
+ ja(e), e.f ^= As, e.f |= Ec;
1338
1338
  var n = e.parent;
1339
- n !== null && n.first !== null && Na(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1339
+ n !== null && n.first !== null && za(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = e.b = null;
1340
1340
  }
1341
- function Au(e, t) {
1341
+ function Iu(e, t) {
1342
1342
  for (; e !== null; ) {
1343
1343
  var r = e === t ? null : /* @__PURE__ */ nt(e);
1344
1344
  e.remove(), e = r;
1345
1345
  }
1346
1346
  }
1347
- function Na(e) {
1347
+ function za(e) {
1348
1348
  var t = e.parent, r = e.prev, i = e.next;
1349
1349
  r !== null && (r.next = i), i !== null && (i.prev = r), t !== null && (t.first === e && (t.first = i), t.last === e && (t.last = r));
1350
1350
  }
1351
1351
  function nr(e, t, r = !0) {
1352
1352
  var i = [];
1353
- ja(e, i, !0);
1353
+ Va(e, i, !0);
1354
1354
  var n = () => {
1355
1355
  r && ue(e), t && t();
1356
1356
  }, o = i.length;
@@ -1359,7 +1359,7 @@ function nr(e, t, r = !0) {
1359
1359
  for (var c of i) c.out(l);
1360
1360
  } else n();
1361
1361
  }
1362
- function ja(e, t, r) {
1362
+ function Va(e, t, r) {
1363
1363
  if ((e.f & 8192) === 0) {
1364
1364
  e.f ^= po;
1365
1365
  var i = e.nodes && e.nodes.t;
@@ -1369,21 +1369,21 @@ function ja(e, t, r) {
1369
1369
  var o = n.next;
1370
1370
  if ((n.f & 64) === 0) {
1371
1371
  var l = (n.f & 65536) !== 0 || (n.f & 32) !== 0 && (e.f & 16) !== 0;
1372
- ja(n, t, l ? r : !1);
1372
+ Va(n, t, l ? r : !1);
1373
1373
  }
1374
1374
  n = o;
1375
1375
  }
1376
1376
  }
1377
1377
  }
1378
1378
  function Po(e) {
1379
- Va(e, !0);
1379
+ Da(e, !0);
1380
1380
  }
1381
- function Va(e, t) {
1381
+ function Da(e, t) {
1382
1382
  if ((e.f & 8192) !== 0) {
1383
1383
  e.f ^= po, (e.f & 1024) === 0 && (ne(e, Ge), ir.ensure().schedule(e));
1384
1384
  for (var r = e.first; r !== null; ) {
1385
1385
  var i = r.next, n = (r.f & 65536) !== 0 || (r.f & 32) !== 0;
1386
- Va(r, n ? t : !1), r = i;
1386
+ Da(r, n ? t : !1), r = i;
1387
1387
  }
1388
1388
  var o = e.nodes && e.nodes.t;
1389
1389
  if (o !== null)
@@ -1397,7 +1397,7 @@ function Mo(e, t) {
1397
1397
  t.append(r), r = n;
1398
1398
  }
1399
1399
  }
1400
- var Eu = null, Pi = !1, mt = !1;
1400
+ var $u = null, Pi = !1, mt = !1;
1401
1401
  function Cs(e) {
1402
1402
  mt = e;
1403
1403
  }
@@ -1410,19 +1410,19 @@ function it(e) {
1410
1410
  G = e;
1411
1411
  }
1412
1412
  var Le = null;
1413
- function za(e) {
1413
+ function Fa(e) {
1414
1414
  J !== null && (!Re || (J.f & 2) !== 0) && (Le === null ? Le = [e] : Le.push(e));
1415
1415
  }
1416
1416
  var Te = null, Ee = 0, Me = null;
1417
- function Iu(e) {
1417
+ function Pu(e) {
1418
1418
  Me = e;
1419
1419
  }
1420
- var Da = 1, Gt = 0, Zt = Gt;
1420
+ var Wa = 1, Gt = 0, Zt = Gt;
1421
1421
  function Rs(e) {
1422
1422
  Zt = e;
1423
1423
  }
1424
- function Fa() {
1425
- return ++Da;
1424
+ function Ba() {
1425
+ return ++Wa;
1426
1426
  }
1427
1427
  function si(e) {
1428
1428
  var t = e.f;
@@ -1430,30 +1430,30 @@ function si(e) {
1430
1430
  if (t & 2 && (e.f &= ~ri), (t & 4096) !== 0) {
1431
1431
  for (var r = e.deps, i = r.length, n = 0; n < i; n++) {
1432
1432
  var o = r[n];
1433
- if (si(o) && Ta(o), o.wv > e.wv) return !0;
1433
+ if (si(o) && Sa(o), o.wv > e.wv) return !0;
1434
1434
  }
1435
1435
  (t & 512) !== 0 && ge === null && ne(e, Ce);
1436
1436
  }
1437
1437
  return !1;
1438
1438
  }
1439
- function Wa(e, t, r = !0) {
1439
+ function Ua(e, t, r = !0) {
1440
1440
  var i = e.reactions;
1441
1441
  if (i !== null && !(!Re && Le !== null && _r.call(Le, e)))
1442
1442
  for (var n = 0; n < i.length; n++) {
1443
1443
  var o = i[n];
1444
- (o.f & 2) !== 0 ? Wa(o, t, !1) : t === o && (r ? ne(o, Ge) : (o.f & 1024) !== 0 && ne(o, rr), wo(o));
1444
+ (o.f & 2) !== 0 ? Ua(o, t, !1) : t === o && (r ? ne(o, Ge) : (o.f & 1024) !== 0 && ne(o, rr), wo(o));
1445
1445
  }
1446
1446
  }
1447
- function Ba(e) {
1447
+ function Ha(e) {
1448
1448
  var t = Te, r = Ee, i = Me, n = J, o = Le, l = re, c = Ue, d = Zt, h = e.f;
1449
1449
  Te = null, Ee = 0, Me = null, J = (h & 96) === 0 ? e : null, Le = null, br(e.ctx), Ue = !1, Zt = ++Gt, e.ac !== null && (Zi(() => {
1450
1450
  e.ac.abort(vt);
1451
1451
  }), e.ac = null);
1452
1452
  try {
1453
1453
  e.f |= Es;
1454
- var v = e.fn, _ = v();
1454
+ var f = e.fn, _ = f();
1455
1455
  e.f |= ho;
1456
- var m = e.deps, b = z?.is_fork;
1456
+ var m = e.deps, b = V?.is_fork;
1457
1457
  if (Te !== null) {
1458
1458
  var k;
1459
1459
  if (b || ei(e, Ee), m !== null && Ee > 0)
@@ -1464,7 +1464,7 @@ function Ba(e) {
1464
1464
  ((E = m[k]).reactions ?? (E.reactions = [])).push(e);
1465
1465
  }
1466
1466
  } else !b && m !== null && Ee < m.length && (ei(e, Ee), m.length = Ee);
1467
- if (ni() && Me !== null && !Ue && m !== null && (e.f & 6146) === 0) for (k = 0; k < Me.length; k++) Wa(Me[k], e);
1467
+ if (ni() && Me !== null && !Ue && m !== null && (e.f & 6146) === 0) for (k = 0; k < Me.length; k++) Ua(Me[k], e);
1468
1468
  if (n !== null && n !== e) {
1469
1469
  if (Gt++, n.deps !== null) for (let w = 0; w < r; w += 1) n.deps[w].rv = Gt;
1470
1470
  if (t !== null) for (const w of t) w.rv = Gt;
@@ -1472,15 +1472,15 @@ function Ba(e) {
1472
1472
  }
1473
1473
  return (e.f & 8388608) !== 0 && (e.f ^= Ri), _;
1474
1474
  } catch (w) {
1475
- return aa(w);
1475
+ return ca(w);
1476
1476
  } finally {
1477
1477
  e.f ^= Es, Te = t, Ee = r, Me = i, J = n, Le = o, br(l), Ue = c, Zt = d;
1478
1478
  }
1479
1479
  }
1480
- function $u(e, t) {
1480
+ function Mu(e, t) {
1481
1481
  let r = t.reactions;
1482
1482
  if (r !== null) {
1483
- var i = gc.call(r, e);
1483
+ var i = yc.call(r, e);
1484
1484
  if (i !== -1) {
1485
1485
  var n = r.length - 1;
1486
1486
  n === 0 ? r = t.reactions = null : (r[i] = r[n], r.pop());
@@ -1488,13 +1488,13 @@ function $u(e, t) {
1488
1488
  }
1489
1489
  if (r === null && (t.f & 2) !== 0 && (Te === null || !_r.call(Te, t))) {
1490
1490
  var o = t;
1491
- (o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~ri), o.v !== se && go(o), uu(o), ei(o, 0);
1491
+ (o.f & 512) !== 0 && (o.f ^= 512, o.f &= ~ri), o.v !== se && go(o), fu(o), ei(o, 0);
1492
1492
  }
1493
1493
  }
1494
1494
  function ei(e, t) {
1495
1495
  var r = e.deps;
1496
1496
  if (r !== null)
1497
- for (var i = t; i < r.length; i++) $u(e, r[i]);
1497
+ for (var i = t; i < r.length; i++) Mu(e, r[i]);
1498
1498
  }
1499
1499
  function Sr(e) {
1500
1500
  var t = e.f;
@@ -1504,16 +1504,16 @@ function Sr(e) {
1504
1504
  if (G = e, Pi = !0, 0)
1505
1505
  var n, o;
1506
1506
  try {
1507
- (t & 16777232) !== 0 ? Su(e) : $o(e), Ra(e);
1508
- var l = Ba(e);
1509
- if (e.teardown = typeof l == "function" ? l : null, e.wv = Da, 0)
1507
+ (t & 16777232) !== 0 ? Eu(e) : $o(e), ja(e);
1508
+ var l = Ha(e);
1509
+ if (e.teardown = typeof l == "function" ? l : null, e.wv = Wa, 0)
1510
1510
  for (var c of e.deps) ;
1511
1511
  } finally {
1512
1512
  Pi = i, G = r;
1513
1513
  }
1514
1514
  }
1515
1515
  }
1516
- async function Pu() {
1516
+ async function xu() {
1517
1517
  if (Re) return new Promise((e) => {
1518
1518
  requestAnimationFrame(() => e()), setTimeout(() => e());
1519
1519
  });
@@ -1521,7 +1521,7 @@ async function Pu() {
1521
1521
  }
1522
1522
  function s(e) {
1523
1523
  var t = (e.f & 2) !== 0;
1524
- if (Eu?.add(e), J !== null && !Ue && !(G !== null && (G.f & 16384) !== 0) && (Le === null || !_r.call(Le, e))) {
1524
+ if ($u?.add(e), J !== null && !Ue && !(G !== null && (G.f & 16384) !== 0) && (Le === null || !_r.call(Le, e))) {
1525
1525
  var r = J.deps;
1526
1526
  if ((J.f & 2097152) !== 0)
1527
1527
  e.rv < Gt && (e.rv = Gt, Te === null && r !== null && r[Ee] === e ? Ee++ : Te === null ? Te = [e] : Te.push(e));
@@ -1545,25 +1545,25 @@ function s(e) {
1545
1545
  var d = e;
1546
1546
  if (mt) {
1547
1547
  var h = d.v;
1548
- return ((d.f & 1024) === 0 && d.reactions !== null || Ha(d)) && (h = So(d)), Qt.set(d, h), h;
1548
+ return ((d.f & 1024) === 0 && d.reactions !== null || qa(d)) && (h = So(d)), Qt.set(d, h), h;
1549
1549
  }
1550
- var v = (d.f & 512) === 0 && !Ue && J !== null && (Pi || (J.f & 512) !== 0), _ = (d.f & ho) === 0;
1551
- si(d) && (v && (d.f |= 512), Ta(d)), v && !_ && (ka(d), Ua(d));
1550
+ var f = (d.f & 512) === 0 && !Ue && J !== null && (Pi || (J.f & 512) !== 0), _ = (d.f & ho) === 0;
1551
+ si(d) && (f && (d.f |= 512), Sa(d)), f && !_ && (Aa(d), Ga(d));
1552
1552
  }
1553
1553
  if (ge?.has(e)) return ge.get(e);
1554
1554
  if ((e.f & 8388608) !== 0) throw e.v;
1555
1555
  return e.v;
1556
1556
  }
1557
- function Ua(e) {
1557
+ function Ga(e) {
1558
1558
  if (e.f |= 512, e.deps !== null)
1559
1559
  for (const t of e.deps)
1560
- (t.reactions ?? (t.reactions = [])).push(e), (t.f & 2) !== 0 && (t.f & 512) === 0 && (ka(t), Ua(t));
1560
+ (t.reactions ?? (t.reactions = [])).push(e), (t.f & 2) !== 0 && (t.f & 512) === 0 && (Aa(t), Ga(t));
1561
1561
  }
1562
- function Ha(e) {
1562
+ function qa(e) {
1563
1563
  if (e.v === se) return !0;
1564
1564
  if (e.deps === null) return !1;
1565
1565
  for (const t of e.deps)
1566
- if (Qt.has(t) || (t.f & 2) !== 0 && Ha(t)) return !0;
1566
+ if (Qt.has(t) || (t.f & 2) !== 0 && qa(t)) return !0;
1567
1567
  return !1;
1568
1568
  }
1569
1569
  function or(e) {
@@ -1574,8 +1574,8 @@ function or(e) {
1574
1574
  Ue = t;
1575
1575
  }
1576
1576
  }
1577
- var hr = /* @__PURE__ */ Symbol("events"), Ga = /* @__PURE__ */ new Set(), ao = /* @__PURE__ */ new Set();
1578
- function Mu(e, t, r, i = {}) {
1577
+ var hr = /* @__PURE__ */ Symbol("events"), Ka = /* @__PURE__ */ new Set(), ao = /* @__PURE__ */ new Set();
1578
+ function Ou(e, t, r, i = {}) {
1579
1579
  function n(o) {
1580
1580
  if (i.capture || lo.call(t, o), !o.cancelBubble) return Zi(() => r?.call(this, o));
1581
1581
  }
@@ -1586,8 +1586,8 @@ function Mu(e, t, r, i = {}) {
1586
1586
  function ve(e, t, r) {
1587
1587
  (t[hr] ?? (t[hr] = {}))[e] = r;
1588
1588
  }
1589
- function qa(e) {
1590
- for (var t = 0; t < e.length; t++) Ga.add(e[t]);
1589
+ function Ya(e) {
1590
+ for (var t = 0; t < e.length; t++) Ka.add(e[t]);
1591
1591
  for (var r of ao) r(e);
1592
1592
  }
1593
1593
  var Ns = null;
@@ -1612,7 +1612,7 @@ function lo(e) {
1612
1612
  return o || r;
1613
1613
  }
1614
1614
  });
1615
- var v = J, _ = G;
1615
+ var f = J, _ = G;
1616
1616
  Ne(null), it(null);
1617
1617
  try {
1618
1618
  for (var m, b = []; o !== null; ) {
@@ -1633,17 +1633,17 @@ function lo(e) {
1633
1633
  throw m;
1634
1634
  }
1635
1635
  } finally {
1636
- e[hr] = t, delete e.currentTarget, Ne(v), it(_);
1636
+ e[hr] = t, delete e.currentTarget, Ne(f), it(_);
1637
1637
  }
1638
1638
  }
1639
1639
  }
1640
- var xu = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1641
- function Ou(e) {
1642
- return xu?.createHTML(e) ?? e;
1640
+ var Lu = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (e) => e });
1641
+ function Cu(e) {
1642
+ return Lu?.createHTML(e) ?? e;
1643
1643
  }
1644
- function Lu(e) {
1644
+ function Ru(e) {
1645
1645
  var t = Xi("template");
1646
- return t.innerHTML = Ou(e.replaceAll("<!>", "<!---->")), t.content;
1646
+ return t.innerHTML = Cu(e.replaceAll("<!>", "<!---->")), t.content;
1647
1647
  }
1648
1648
  function pt(e, t) {
1649
1649
  var r = G;
@@ -1660,8 +1660,8 @@ function ae(e, t) {
1660
1660
  return () => {
1661
1661
  if (N)
1662
1662
  return pt(Y, null), Y;
1663
- n === void 0 && (n = Lu(o ? e : "<!>" + e), r || (n = /* @__PURE__ */ ht(n)));
1664
- var l = i || Ia ? document.importNode(n, !0) : n.cloneNode(!0);
1663
+ n === void 0 && (n = Ru(o ? e : "<!>" + e), r || (n = /* @__PURE__ */ ht(n)));
1664
+ var l = i || Pa ? document.importNode(n, !0) : n.cloneNode(!0);
1665
1665
  if (r) {
1666
1666
  var c = /* @__PURE__ */ ht(l), d = l.lastChild;
1667
1667
  pt(c, d);
@@ -1677,7 +1677,7 @@ function Ti(e = "") {
1677
1677
  var r = Y;
1678
1678
  return r.nodeType !== 3 ? (r.before(r = _e()), ce(r)) : Qi(r), pt(r, r), r;
1679
1679
  }
1680
- function Cu() {
1680
+ function Nu() {
1681
1681
  if (N)
1682
1682
  return pt(Y, null), Y;
1683
1683
  var e = document.createDocumentFragment(), t = document.createComment(""), r = _e();
@@ -1691,10 +1691,10 @@ function ee(e, t) {
1691
1691
  }
1692
1692
  e !== null && e.before(t);
1693
1693
  }
1694
- function Ru(e) {
1694
+ function ju(e) {
1695
1695
  return e.endsWith("capture") && e !== "gotpointercapture" && e !== "lostpointercapture";
1696
1696
  }
1697
- var Nu = [
1697
+ var zu = [
1698
1698
  "beforeinput",
1699
1699
  "click",
1700
1700
  "change",
@@ -1719,10 +1719,10 @@ var Nu = [
1719
1719
  "touchmove",
1720
1720
  "touchstart"
1721
1721
  ];
1722
- function ju(e) {
1723
- return Nu.includes(e);
1722
+ function Vu(e) {
1723
+ return zu.includes(e);
1724
1724
  }
1725
- var Vu = [
1725
+ var Du = [
1726
1726
  "allowfullscreen",
1727
1727
  "async",
1728
1728
  "autofocus",
@@ -1751,7 +1751,7 @@ var Vu = [
1751
1751
  "defer",
1752
1752
  "disablepictureinpicture",
1753
1753
  "disableremoteplayback"
1754
- ], zu = {
1754
+ ], Fu = {
1755
1755
  formnovalidate: "formNoValidate",
1756
1756
  ismap: "isMap",
1757
1757
  nomodule: "noModule",
@@ -1765,11 +1765,11 @@ var Vu = [
1765
1765
  disablepictureinpicture: "disablePictureInPicture",
1766
1766
  disableremoteplayback: "disableRemotePlayback"
1767
1767
  };
1768
- function Du(e) {
1769
- return e = e.toLowerCase(), zu[e] ?? e;
1768
+ function Wu(e) {
1769
+ return e = e.toLowerCase(), Fu[e] ?? e;
1770
1770
  }
1771
- var Uf = [
1772
- ...Vu,
1771
+ var qf = [
1772
+ ...Du,
1773
1773
  "formNoValidate",
1774
1774
  "isMap",
1775
1775
  "noModule",
@@ -1784,17 +1784,17 @@ var Uf = [
1784
1784
  "allowFullscreen",
1785
1785
  "disablePictureInPicture",
1786
1786
  "disableRemotePlayback"
1787
- ], Fu = ["touchstart", "touchmove"];
1788
- function Wu(e) {
1789
- return Fu.includes(e);
1787
+ ], Bu = ["touchstart", "touchmove"];
1788
+ function Uu(e) {
1789
+ return Bu.includes(e);
1790
1790
  }
1791
- var Bu = [
1791
+ var Hu = [
1792
1792
  "$state",
1793
1793
  "$state.raw",
1794
1794
  "$derived",
1795
1795
  "$derived.by"
1796
- ], Hf = [
1797
- ...Bu,
1796
+ ], Kf = [
1797
+ ...Hu,
1798
1798
  "$state.eager",
1799
1799
  "$state.snapshot",
1800
1800
  "$props",
@@ -1809,14 +1809,14 @@ var Bu = [
1809
1809
  "$inspect().with",
1810
1810
  "$inspect.trace",
1811
1811
  "$host"
1812
- ], Uu = [
1812
+ ], Gu = [
1813
1813
  "textarea",
1814
1814
  "script",
1815
1815
  "style",
1816
1816
  "title"
1817
1817
  ];
1818
- function Hu(e) {
1819
- return Uu.includes(e);
1818
+ function qu(e) {
1819
+ return Gu.includes(e);
1820
1820
  }
1821
1821
  var co = !0;
1822
1822
  function ki(e) {
@@ -1826,17 +1826,17 @@ function pe(e, t) {
1826
1826
  var r = t == null ? "" : typeof t == "object" ? `${t}` : t;
1827
1827
  r !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = r, e.nodeValue = `${r}`);
1828
1828
  }
1829
- function Ka(e, t) {
1830
- return Ya(e, t);
1829
+ function Ja(e, t) {
1830
+ return Xa(e, t);
1831
1831
  }
1832
- function Gu(e, t) {
1832
+ function Ku(e, t) {
1833
1833
  so(), t.intro = t.intro ?? !1;
1834
1834
  const r = t.target, i = N, n = Y;
1835
1835
  try {
1836
1836
  for (var o = /* @__PURE__ */ ht(r); o && (o.nodeType !== 8 || o.data !== "["); ) o = /* @__PURE__ */ nt(o);
1837
1837
  if (!o) throw gr;
1838
1838
  Ie(!0), ce(o);
1839
- const l = Ya(e, {
1839
+ const l = Xa(e, {
1840
1840
  ...t,
1841
1841
  anchor: o
1842
1842
  });
@@ -1844,30 +1844,30 @@ function Gu(e, t) {
1844
1844
  } catch (l) {
1845
1845
  if (l instanceof Error && l.message.split(`
1846
1846
  `).some((c) => c.startsWith("https://svelte.dev/e/"))) throw l;
1847
- return l !== gr && console.warn("Failed to hydrate: ", l), t.recover === !1 && Rc(), so(), Ao(r), Ie(!1), Ka(e, t);
1847
+ return l !== gr && console.warn("Failed to hydrate: ", l), t.recover === !1 && jc(), so(), Ao(r), Ie(!1), Ja(e, t);
1848
1848
  } finally {
1849
1849
  Ie(i), ce(n);
1850
1850
  }
1851
1851
  }
1852
1852
  var Si = /* @__PURE__ */ new Map();
1853
- function Ya(e, { target: t, anchor: r, props: i = {}, events: n, context: o, intro: l = !0, transformError: c }) {
1853
+ function Xa(e, { target: t, anchor: r, props: i = {}, events: n, context: o, intro: l = !0, transformError: c }) {
1854
1854
  so();
1855
- var d = void 0, h = Tu(() => {
1856
- var v = r ?? t.appendChild(_e());
1857
- ru(v, { pending: () => {
1855
+ var d = void 0, h = Su(() => {
1856
+ var f = r ?? t.appendChild(_e());
1857
+ nu(f, { pending: () => {
1858
1858
  } }, (b) => {
1859
- na({});
1859
+ sa({});
1860
1860
  var k = re;
1861
1861
  if (o && (k.c = o), n && (i.$$events = n), N && pt(b, null), co = l, d = e(b, i) || {}, co = !0, N && (G.nodes.end = Y, Y === null || Y.nodeType !== 8 || Y.data !== "]"))
1862
1862
  throw Yi(), gr;
1863
- oa();
1863
+ aa();
1864
1864
  }, c);
1865
1865
  var _ = /* @__PURE__ */ new Set(), m = (b) => {
1866
1866
  for (var k = 0; k < b.length; k++) {
1867
1867
  var E = b[k];
1868
1868
  if (!_.has(E)) {
1869
1869
  _.add(E);
1870
- var w = Wu(E);
1870
+ var w = Uu(E);
1871
1871
  for (const D of [t, document]) {
1872
1872
  var S = Si.get(D);
1873
1873
  S === void 0 && (S = /* @__PURE__ */ new Map(), Si.set(D, S));
@@ -1877,28 +1877,28 @@ function Ya(e, { target: t, anchor: r, props: i = {}, events: n, context: o, int
1877
1877
  }
1878
1878
  }
1879
1879
  };
1880
- return m(Gi(Ga)), ao.add(m), () => {
1880
+ return m(Gi(Ka)), ao.add(m), () => {
1881
1881
  for (var b of _) for (const w of [t, document]) {
1882
1882
  var k = Si.get(w), E = k.get(b);
1883
1883
  --E == 0 ? (w.removeEventListener(b, lo), k.delete(b), k.size === 0 && Si.delete(w)) : k.set(b, E);
1884
1884
  }
1885
- ao.delete(m), v !== r && v.parentNode?.removeChild(v);
1885
+ ao.delete(m), f !== r && f.parentNode?.removeChild(f);
1886
1886
  };
1887
1887
  });
1888
1888
  return uo.set(d, h), d;
1889
1889
  }
1890
1890
  var uo = /* @__PURE__ */ new WeakMap();
1891
- function qu(e, t) {
1891
+ function Yu(e, t) {
1892
1892
  const r = uo.get(e);
1893
1893
  return r ? (uo.delete(e), r(t)) : Promise.resolve();
1894
1894
  }
1895
- var ft = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), zr = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), js = /* @__PURE__ */ new WeakMap(), Ja = class {
1895
+ var ft = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), De = /* @__PURE__ */ new WeakMap(), Vr = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), Fn = /* @__PURE__ */ new WeakMap(), js = /* @__PURE__ */ new WeakMap(), Qa = class {
1896
1896
  constructor(e, t = !0) {
1897
- x(this, "anchor", void 0), B(this, ft, /* @__PURE__ */ new Map()), B(this, Et, /* @__PURE__ */ new Map()), B(this, De, /* @__PURE__ */ new Map()), B(this, zr, /* @__PURE__ */ new Set()), B(this, Dn, !0), B(this, Fn, (r) => {
1897
+ x(this, "anchor", void 0), B(this, ft, /* @__PURE__ */ new Map()), B(this, Et, /* @__PURE__ */ new Map()), B(this, De, /* @__PURE__ */ new Map()), B(this, Vr, /* @__PURE__ */ new Set()), B(this, Dn, !0), B(this, Fn, (r) => {
1898
1898
  if (p(ft, this).has(r)) {
1899
1899
  var i = p(ft, this).get(r), n = p(Et, this).get(i);
1900
1900
  if (n)
1901
- Po(n), p(zr, this).delete(i);
1901
+ Po(n), p(Vr, this).delete(i);
1902
1902
  else {
1903
1903
  var o = p(De, this).get(i);
1904
1904
  o && (p(Et, this).set(i, o.effect), p(De, this).delete(i), o.fragment.lastChild.remove(), this.anchor.before(o.fragment), n = o.effect);
@@ -1909,7 +1909,7 @@ var ft = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), De =
1909
1909
  d && (ue(d.effect), p(De, this).delete(c));
1910
1910
  }
1911
1911
  for (const [l, c] of p(Et, this)) {
1912
- if (l === i || p(zr, this).has(l)) continue;
1912
+ if (l === i || p(Vr, this).has(l)) continue;
1913
1913
  const d = () => {
1914
1914
  if (Array.from(p(ft, this).values()).includes(l)) {
1915
1915
  var h = document.createDocumentFragment();
@@ -1918,9 +1918,9 @@ var ft = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), De =
1918
1918
  fragment: h
1919
1919
  });
1920
1920
  } else ue(c);
1921
- p(zr, this).delete(l), p(Et, this).delete(l);
1921
+ p(Vr, this).delete(l), p(Et, this).delete(l);
1922
1922
  };
1923
- p(Dn, this) || !n ? (p(zr, this).add(l), nr(c, d, !1)) : d();
1923
+ p(Dn, this) || !n ? (p(Vr, this).add(l), nr(c, d, !1)) : d();
1924
1924
  }
1925
1925
  }
1926
1926
  }), B(this, js, (r) => {
@@ -1930,7 +1930,7 @@ var ft = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), De =
1930
1930
  }), this.anchor = e, H(Dn, this, t);
1931
1931
  }
1932
1932
  ensure(e, t) {
1933
- var r = z, i = Ma();
1933
+ var r = V, i = Oa();
1934
1934
  if (t && !p(Et, this).has(e) && !p(De, this).has(e)) if (i) {
1935
1935
  var n = document.createDocumentFragment(), o = _e();
1936
1936
  n.append(o), p(De, this).set(e, {
@@ -1946,35 +1946,35 @@ var ft = /* @__PURE__ */ new WeakMap(), Et = /* @__PURE__ */ new WeakMap(), De =
1946
1946
  N && (this.anchor = Y), p(Fn, this).call(this, r);
1947
1947
  }
1948
1948
  };
1949
- function Xa(e) {
1950
- re === null && mo("onMount"), ii && re.l !== null ? Xu(re).m.push(e) : $i(() => {
1949
+ function Za(e) {
1950
+ re === null && mo("onMount"), ii && re.l !== null ? Zu(re).m.push(e) : $i(() => {
1951
1951
  const t = or(e);
1952
1952
  if (typeof t == "function") return t;
1953
1953
  });
1954
1954
  }
1955
- function Ku(e) {
1956
- re === null && mo("onDestroy"), Xa(() => () => or(e));
1955
+ function Ju(e) {
1956
+ re === null && mo("onDestroy"), Za(() => () => or(e));
1957
1957
  }
1958
- function Yu(e, t, { bubbles: r = !1, cancelable: i = !1 } = {}) {
1958
+ function Xu(e, t, { bubbles: r = !1, cancelable: i = !1 } = {}) {
1959
1959
  return new CustomEvent(e, {
1960
1960
  detail: t,
1961
1961
  bubbles: r,
1962
1962
  cancelable: i
1963
1963
  });
1964
1964
  }
1965
- function Ju() {
1965
+ function Qu() {
1966
1966
  const e = re;
1967
1967
  return e === null && mo("createEventDispatcher"), (t, r, i) => {
1968
1968
  const n = e.s.$$events?.[t];
1969
1969
  if (n) {
1970
- const o = Hi(n) ? n.slice() : [n], l = Yu(t, r, i);
1970
+ const o = Hi(n) ? n.slice() : [n], l = Xu(t, r, i);
1971
1971
  for (const c of o) c.call(e.x, l);
1972
1972
  return !l.defaultPrevented;
1973
1973
  }
1974
1974
  return !0;
1975
1975
  };
1976
1976
  }
1977
- function Xu(e) {
1977
+ function Zu(e) {
1978
1978
  var t = e.l;
1979
1979
  return t.u ?? (t.u = {
1980
1980
  a: [],
@@ -1985,13 +1985,13 @@ function Xu(e) {
1985
1985
  function Je(e, t, r = !1) {
1986
1986
  var i;
1987
1987
  N && (i = Y, yr());
1988
- var n = new Ja(e), o = r ? qi : 0;
1988
+ var n = new Qa(e), o = r ? qi : 0;
1989
1989
  function l(c, d) {
1990
1990
  if (N) {
1991
- var h = ta(i);
1991
+ var h = ia(i);
1992
1992
  if (c !== parseInt(h.substring(1))) {
1993
- var v = Ni();
1994
- ce(v), n.anchor = v, Ie(!1), n.ensure(c, d), Ie(!0);
1993
+ var f = Ni();
1994
+ ce(f), n.anchor = f, Ie(!1), n.ensure(c, d), Ie(!0);
1995
1995
  return;
1996
1996
  }
1997
1997
  }
@@ -2007,7 +2007,7 @@ function Je(e, t, r = !1) {
2007
2007
  function Dr(e, t) {
2008
2008
  return t;
2009
2009
  }
2010
- function Qu(e, t, r) {
2010
+ function ed(e, t, r) {
2011
2011
  for (var i = [], n = t.length, o, l = t.length, c = 0; c < n; c++) {
2012
2012
  let _ = t[c];
2013
2013
  nr(_, () => {
@@ -2022,8 +2022,8 @@ function Qu(e, t, r) {
2022
2022
  if (l === 0) {
2023
2023
  var d = i.length === 0 && r !== null;
2024
2024
  if (d) {
2025
- var h = r, v = h.parentNode;
2026
- Ao(v), v.append(h), e.items.clear();
2025
+ var h = r, f = h.parentNode;
2026
+ Ao(f), f.append(h), e.items.clear();
2027
2027
  }
2028
2028
  fo(e, t, !d);
2029
2029
  } else
@@ -2051,12 +2051,12 @@ function Fr(e, t, r, i, n, o = null) {
2051
2051
  l = N ? ce(/* @__PURE__ */ ht(d)) : d.appendChild(_e());
2052
2052
  }
2053
2053
  N && yr();
2054
- var h = null, v = /* @__PURE__ */ ko(() => {
2054
+ var h = null, f = /* @__PURE__ */ ko(() => {
2055
2055
  var S = r();
2056
2056
  return Hi(S) ? S : S == null ? [] : Gi(S);
2057
2057
  }), _, m = /* @__PURE__ */ new Map(), b = !0;
2058
2058
  function k(S) {
2059
- (w.effect.f & 16384) === 0 && (w.pending.delete(S), w.fallback = h, Zu(w, _, l, t, i), h !== null && (_.length === 0 ? (h.f & 33554432) === 0 ? Po(h) : (h.f ^= Kr, qr(h, null, l)) : nr(h, () => {
2059
+ (w.effect.f & 16384) === 0 && (w.pending.delete(S), w.fallback = h, td(w, _, l, t, i), h !== null && (_.length === 0 ? (h.f & 33554432) === 0 ? Po(h) : (h.f ^= Kr, qr(h, null, l)) : nr(h, () => {
2060
2060
  h = null;
2061
2061
  })));
2062
2062
  }
@@ -2065,24 +2065,24 @@ function Fr(e, t, r, i, n, o = null) {
2065
2065
  }
2066
2066
  var w = {
2067
2067
  effect: tn(() => {
2068
- _ = s(v);
2068
+ _ = s(f);
2069
2069
  var S = _.length;
2070
2070
  let O = !1;
2071
- N && ta(l) === "[!" != (S === 0) && (l = Ni(), ce(l), Ie(!1), O = !0);
2072
- for (var D = /* @__PURE__ */ new Set(), P = z, U = Ma(), q = 0; q < S; q += 1) {
2071
+ N && ia(l) === "[!" != (S === 0) && (l = Ni(), ce(l), Ie(!1), O = !0);
2072
+ for (var D = /* @__PURE__ */ new Set(), P = V, U = Oa(), q = 0; q < S; q += 1) {
2073
2073
  N && Y.nodeType === 8 && Y.data === "]" && (l = Y, O = !0, Ie(!1));
2074
2074
  var te = _[q], K = i(te, q);
2075
2075
  if (0)
2076
2076
  var ye;
2077
2077
  var ie = b ? null : c.get(K);
2078
- ie ? (ie.v && kr(ie.v, te), ie.i && kr(ie.i, q), U && P.unskip_effect(ie.e)) : (ie = ed(c, b ? l : Ai ?? (Ai = _e()), te, K, q, n, t, r), b || (ie.e.f |= Kr), c.set(K, ie)), D.add(K);
2078
+ ie ? (ie.v && kr(ie.v, te), ie.i && kr(ie.i, q), U && P.unskip_effect(ie.e)) : (ie = rd(c, b ? l : Ai ?? (Ai = _e()), te, K, q, n, t, r), b || (ie.e.f |= Kr), c.set(K, ie)), D.add(K);
2079
2079
  }
2080
- if (S === 0 && o && !h && (b ? h = ke(() => o(l)) : (h = ke(() => o(Ai ?? (Ai = _e()))), h.f |= Kr)), S > D.size && Mc("", "", ""), N && S > 0 && ce(Ni()), !b)
2080
+ if (S === 0 && o && !h && (b ? h = ke(() => o(l)) : (h = ke(() => o(Ai ?? (Ai = _e()))), h.f |= Kr)), S > D.size && Oc("", "", ""), N && S > 0 && ce(Ni()), !b)
2081
2081
  if (m.set(P, D), U) {
2082
2082
  for (const [Er, je] of c) D.has(Er) || P.skip_effect(je.e);
2083
2083
  P.oncommit(k), P.ondiscard(E);
2084
2084
  } else k(P);
2085
- O && Ie(!0), s(v);
2085
+ O && Ie(!0), s(f);
2086
2086
  }),
2087
2087
  flags: t,
2088
2088
  items: c,
@@ -2096,8 +2096,8 @@ function Wr(e) {
2096
2096
  for (; e !== null && (e.f & 32) === 0; ) e = e.next;
2097
2097
  return e;
2098
2098
  }
2099
- function Zu(e, t, r, i, n) {
2100
- var o = (i & 8) !== 0, l = t.length, c = e.items, d = Wr(e.effect.first), h, v = null, _, m = [], b = [], k, E, w, S;
2099
+ function td(e, t, r, i, n) {
2100
+ var o = (i & 8) !== 0, l = t.length, c = e.items, d = Wr(e.effect.first), h, f = null, _, m = [], b = [], k, E, w, S;
2101
2101
  if (o) for (S = 0; S < l; S += 1)
2102
2102
  k = t[S], E = n(k, S), w = c.get(E).e, (w.f & 33554432) === 0 && (w.nodes?.a?.measure(), (_ ?? (_ = /* @__PURE__ */ new Set())).add(w));
2103
2103
  for (S = 0; S < l; S += 1) {
@@ -2106,28 +2106,28 @@ function Zu(e, t, r, i, n) {
2106
2106
  if ((w.f & 8192) !== 0 && (Po(w), o && (w.nodes?.a?.unfix(), (_ ?? (_ = /* @__PURE__ */ new Set())).delete(w))), (w.f & 33554432) !== 0)
2107
2107
  if (w.f ^= Kr, w === d) qr(w, null, r);
2108
2108
  else {
2109
- var O = v ? v.next : d;
2110
- w === e.effect.last && (e.effect.last = w.prev), w.prev && (w.prev.next = w.next), w.next && (w.next.prev = w.prev), It(e, v, w), It(e, w, O), qr(w, O, r), v = w, m = [], b = [], d = Wr(v.next);
2109
+ var O = f ? f.next : d;
2110
+ w === e.effect.last && (e.effect.last = w.prev), w.prev && (w.prev.next = w.next), w.next && (w.next.prev = w.prev), It(e, f, w), It(e, w, O), qr(w, O, r), f = w, m = [], b = [], d = Wr(f.next);
2111
2111
  continue;
2112
2112
  }
2113
2113
  if (w !== d) {
2114
2114
  if (h !== void 0 && h.has(w)) {
2115
2115
  if (m.length < b.length) {
2116
2116
  var D = b[0], P;
2117
- v = D.prev;
2117
+ f = D.prev;
2118
2118
  var U = m[0], q = m[m.length - 1];
2119
2119
  for (P = 0; P < m.length; P += 1) qr(m[P], D, r);
2120
2120
  for (P = 0; P < b.length; P += 1) h.delete(b[P]);
2121
- It(e, U.prev, q.next), It(e, v, U), It(e, q, D), d = D, v = q, S -= 1, m = [], b = [];
2121
+ It(e, U.prev, q.next), It(e, f, U), It(e, q, D), d = D, f = q, S -= 1, m = [], b = [];
2122
2122
  } else
2123
- h.delete(w), qr(w, d, r), It(e, w.prev, w.next), It(e, w, v === null ? e.effect.first : v.next), It(e, v, w), v = w;
2123
+ h.delete(w), qr(w, d, r), It(e, w.prev, w.next), It(e, w, f === null ? e.effect.first : f.next), It(e, f, w), f = w;
2124
2124
  continue;
2125
2125
  }
2126
2126
  for (m = [], b = []; d !== null && d !== w; )
2127
2127
  (h ?? (h = /* @__PURE__ */ new Set())).add(d), b.push(d), d = Wr(d.next);
2128
2128
  if (d === null) continue;
2129
2129
  }
2130
- (w.f & 33554432) === 0 && m.push(w), v = w, d = Wr(w.next);
2130
+ (w.f & 33554432) === 0 && m.push(w), f = w, d = Wr(w.next);
2131
2131
  }
2132
2132
  if (e.outrogroups !== null) {
2133
2133
  for (const ie of e.outrogroups) ie.pending.size === 0 && (fo(e, Gi(ie.done)), e.outrogroups?.delete(ie));
@@ -2146,7 +2146,7 @@ function Zu(e, t, r, i, n) {
2146
2146
  for (S = 0; S < K; S += 1) te[S].nodes?.a?.measure();
2147
2147
  for (S = 0; S < K; S += 1) te[S].nodes?.a?.fix();
2148
2148
  }
2149
- Qu(e, te, ye);
2149
+ ed(e, te, ye);
2150
2150
  }
2151
2151
  }
2152
2152
  o && rt(() => {
@@ -2154,8 +2154,8 @@ function Zu(e, t, r, i, n) {
2154
2154
  for (w of _) w.nodes?.a?.apply();
2155
2155
  });
2156
2156
  }
2157
- function ed(e, t, r, i, n, o, l, c) {
2158
- var d = (l & 1) !== 0 ? (l & 16) === 0 ? /* @__PURE__ */ Aa(r, !1, !1) : tr(r) : null, h = (l & 2) !== 0 ? tr(n) : null;
2157
+ function rd(e, t, r, i, n, o, l, c) {
2158
+ var d = (l & 1) !== 0 ? (l & 16) === 0 ? /* @__PURE__ */ Ia(r, !1, !1) : tr(r) : null, h = (l & 2) !== 0 ? tr(n) : null;
2159
2159
  return {
2160
2160
  v: d,
2161
2161
  i: h,
@@ -2175,19 +2175,19 @@ function qr(e, t, r) {
2175
2175
  function It(e, t, r) {
2176
2176
  t === null ? e.effect.first = r : t.next = r, r === null ? e.effect.last = t : r.prev = t;
2177
2177
  }
2178
- var td = null;
2179
- function Vs(e) {
2180
- td = e;
2178
+ var id = null;
2179
+ function zs(e) {
2180
+ id = e;
2181
2181
  }
2182
- function rd(e, t, r, i, n, o) {
2182
+ function nd(e, t, r, i, n, o) {
2183
2183
  let l = N;
2184
2184
  N && yr();
2185
2185
  var c = !1, d = null;
2186
2186
  N && Y.nodeType === 1 && (d = Y, yr());
2187
- var h = N ? Y : e, v = G, _ = new Ja(h, !1);
2187
+ var h = N ? Y : e, f = G, _ = new Qa(h, !1);
2188
2188
  tn(() => {
2189
2189
  const m = t() || null;
2190
- var b = n ? n() : r || m === "svg" ? mc : void 0;
2190
+ var b = n ? n() : r || m === "svg" ? _c : void 0;
2191
2191
  if (m === null) {
2192
2192
  _.ensure(null, null), ki(!0);
2193
2193
  return;
@@ -2195,9 +2195,9 @@ function rd(e, t, r, i, n, o) {
2195
2195
  return _.ensure(m, (k) => {
2196
2196
  if (m) {
2197
2197
  if (d = N ? d : Xi(m, b), pt(d, d), i) {
2198
- N && Hu(m) && d.append(document.createComment(""));
2198
+ N && qu(m) && d.append(document.createComment(""));
2199
2199
  var E = N ? /* @__PURE__ */ ht(d) : d.appendChild(_e());
2200
- N && (E === null ? Ie(!1) : ce(E)), Vs(v), i(d, E), Vs(null);
2200
+ N && (E === null ? Ie(!1) : ce(E)), zs(f), i(d, E), zs(null);
2201
2201
  }
2202
2202
  G.nodes.end = d, k.before(d);
2203
2203
  }
@@ -2209,7 +2209,7 @@ function rd(e, t, r, i, n, o) {
2209
2209
  ki(!0);
2210
2210
  }), l && (Ie(!0), ce(h));
2211
2211
  }
2212
- function id(e, t) {
2212
+ function od(e, t) {
2213
2213
  oi(() => {
2214
2214
  var r = e.getRootNode(), i = r.host ? r : r.head ?? r.ownerDocument.head;
2215
2215
  if (!i.querySelector("#" + t.hash)) {
@@ -2218,40 +2218,40 @@ function id(e, t) {
2218
2218
  }
2219
2219
  });
2220
2220
  }
2221
- function nd(e, t) {
2221
+ function sd(e, t) {
2222
2222
  var r = void 0, i;
2223
- Ca(() => {
2223
+ Na(() => {
2224
2224
  r !== (r = t()) && (i && (ue(i), i = null), r && (i = ke(() => {
2225
2225
  oi(() => r(e));
2226
2226
  })));
2227
2227
  });
2228
2228
  }
2229
- function Qa(e) {
2229
+ function el(e) {
2230
2230
  var t, r, i = "";
2231
2231
  if (typeof e == "string" || typeof e == "number") i += e;
2232
2232
  else if (typeof e == "object") if (Array.isArray(e)) {
2233
2233
  var n = e.length;
2234
- for (t = 0; t < n; t++) e[t] && (r = Qa(e[t])) && (i && (i += " "), i += r);
2234
+ for (t = 0; t < n; t++) e[t] && (r = el(e[t])) && (i && (i += " "), i += r);
2235
2235
  } else for (r in e) e[r] && (i && (i += " "), i += r);
2236
2236
  return i;
2237
2237
  }
2238
- function od() {
2239
- for (var e, t, r = 0, i = "", n = arguments.length; r < n; r++) (e = arguments[r]) && (t = Qa(e)) && (i && (i += " "), i += t);
2238
+ function ad() {
2239
+ for (var e, t, r = 0, i = "", n = arguments.length; r < n; r++) (e = arguments[r]) && (t = el(e)) && (i && (i += " "), i += t);
2240
2240
  return i;
2241
2241
  }
2242
- function Za(e) {
2243
- return typeof e == "object" ? od(e) : e ?? "";
2242
+ function tl(e) {
2243
+ return typeof e == "object" ? ad(e) : e ?? "";
2244
2244
  }
2245
- var zs = [...`
2245
+ var Vs = [...`
2246
2246
  \r\f \v\uFEFF`];
2247
- function sd(e, t, r) {
2247
+ function ld(e, t, r) {
2248
2248
  var i = e == null ? "" : "" + e;
2249
2249
  if (t && (i = i ? i + " " + t : t), r) {
2250
2250
  for (var n of Object.keys(r)) if (r[n]) i = i ? i + " " + n : n;
2251
2251
  else if (i.length)
2252
2252
  for (var o = n.length, l = 0; (l = i.indexOf(n, l)) >= 0; ) {
2253
2253
  var c = l + o;
2254
- (l === 0 || zs.includes(i[l - 1])) && (c === i.length || zs.includes(i[c])) ? i = (l === 0 ? "" : i.substring(0, l)) + i.substring(c + 1) : l = c;
2254
+ (l === 0 || Vs.includes(i[l - 1])) && (c === i.length || Vs.includes(i[c])) ? i = (l === 0 ? "" : i.substring(0, l)) + i.substring(c + 1) : l = c;
2255
2255
  }
2256
2256
  }
2257
2257
  return i === "" ? null : i;
@@ -2267,29 +2267,29 @@ function Ds(e, t = !1) {
2267
2267
  function Wn(e) {
2268
2268
  return e[0] !== "-" || e[1] !== "-" ? e.toLowerCase() : e;
2269
2269
  }
2270
- function ad(e, t) {
2270
+ function cd(e, t) {
2271
2271
  if (t) {
2272
2272
  var r = "", i, n;
2273
2273
  if (Array.isArray(t) ? (i = t[0], n = t[1]) : i = t, e) {
2274
2274
  e = String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
2275
2275
  var o = !1, l = 0, c = !1, d = [];
2276
2276
  i && d.push(...Object.keys(i).map(Wn)), n && d.push(...Object.keys(n).map(Wn));
2277
- var h = 0, v = -1;
2277
+ var h = 0, f = -1;
2278
2278
  const E = e.length;
2279
2279
  for (var _ = 0; _ < E; _++) {
2280
2280
  var m = e[_];
2281
2281
  if (c ? m === "/" && e[_ - 1] === "*" && (c = !1) : o ? o === m && (o = !1) : m === "/" && e[_ + 1] === "*" ? c = !0 : m === '"' || m === "'" ? o = m : m === "(" ? l++ : m === ")" && l--, !c && o === !1 && l === 0) {
2282
- if (m === ":" && v === -1) v = _;
2282
+ if (m === ":" && f === -1) f = _;
2283
2283
  else if (m === ";" || _ === E - 1) {
2284
- if (v !== -1) {
2285
- var b = Wn(e.substring(h, v).trim());
2284
+ if (f !== -1) {
2285
+ var b = Wn(e.substring(h, f).trim());
2286
2286
  if (!d.includes(b)) {
2287
2287
  m !== ";" && _++;
2288
2288
  var k = e.substring(h, _).trim();
2289
2289
  r += " " + k + ";";
2290
2290
  }
2291
2291
  }
2292
- h = _ + 1, v = -1;
2292
+ h = _ + 1, f = -1;
2293
2293
  }
2294
2294
  }
2295
2295
  }
@@ -2301,7 +2301,7 @@ function ad(e, t) {
2301
2301
  function fr(e, t, r, i, n, o) {
2302
2302
  var l = e.__className;
2303
2303
  if (N || l !== r || l === void 0) {
2304
- var c = sd(r, i, o);
2304
+ var c = ld(r, i, o);
2305
2305
  (!N || c !== e.getAttribute("class")) && (c == null ? e.removeAttribute("class") : t ? e.className = c : e.setAttribute("class", c)), e.__className = r;
2306
2306
  } else if (o && n !== o) for (var d in o) {
2307
2307
  var h = !!o[d];
@@ -2315,10 +2315,10 @@ function Bn(e, t = {}, r, i) {
2315
2315
  t[n] !== o && (r[n] == null ? e.style.removeProperty(n) : e.style.setProperty(n, o, i));
2316
2316
  }
2317
2317
  }
2318
- function el(e, t, r, i) {
2318
+ function rl(e, t, r, i) {
2319
2319
  var n = e.__style;
2320
2320
  if (N || n !== t) {
2321
- var o = ad(t, i);
2321
+ var o = cd(t, i);
2322
2322
  (!N || o !== e.getAttribute("style")) && (o == null ? e.removeAttribute("style") : e.style.cssText = o), e.__style = t;
2323
2323
  } else i && (Array.isArray(i) ? (Bn(e, r?.[0], i[0]), Bn(e, r?.[1], i[1], "important")) : Bn(e, r, i));
2324
2324
  return i;
@@ -2326,17 +2326,17 @@ function el(e, t, r, i) {
2326
2326
  function Fi(e, t, r = !1) {
2327
2327
  if (e.multiple) {
2328
2328
  if (t == null) return;
2329
- if (!Hi(t)) return Wc();
2329
+ if (!Hi(t)) return Uc();
2330
2330
  for (var i of e.options) i.selected = t.includes(Xr(i));
2331
2331
  return;
2332
2332
  }
2333
- for (i of e.options) if (pu(Xr(i), t)) {
2333
+ for (i of e.options) if (mu(Xr(i), t)) {
2334
2334
  i.selected = !0;
2335
2335
  return;
2336
2336
  }
2337
2337
  (!r || t !== void 0) && (e.selectedIndex = -1);
2338
2338
  }
2339
- function tl(e) {
2339
+ function il(e) {
2340
2340
  var t = new MutationObserver(() => {
2341
2341
  Fi(e, e.__value);
2342
2342
  });
@@ -2351,18 +2351,18 @@ function tl(e) {
2351
2351
  }
2352
2352
  function Fe(e, t, r = t) {
2353
2353
  var i = /* @__PURE__ */ new WeakSet(), n = !0;
2354
- Oa(e, "change", (o) => {
2354
+ Ca(e, "change", (o) => {
2355
2355
  var l = o ? "[selected]" : ":checked", c;
2356
2356
  if (e.multiple) c = [].map.call(e.querySelectorAll(l), Xr);
2357
2357
  else {
2358
2358
  var d = e.querySelector(l) ?? e.querySelector("option:not([disabled])");
2359
2359
  c = d && Xr(d);
2360
2360
  }
2361
- r(c), e.__value = c, z !== null && i.add(z);
2361
+ r(c), e.__value = c, V !== null && i.add(V);
2362
2362
  }), oi(() => {
2363
2363
  var o = t();
2364
2364
  if (e === document.activeElement) {
2365
- var l = Re ? ji : z;
2365
+ var l = Re ? ji : V;
2366
2366
  if (i.has(l)) return;
2367
2367
  }
2368
2368
  if (Fi(e, o, n), n && o === void 0) {
@@ -2370,12 +2370,12 @@ function Fe(e, t, r = t) {
2370
2370
  c !== null && (o = Xr(c), r(o));
2371
2371
  }
2372
2372
  e.__value = o, n = !1;
2373
- }), tl(e);
2373
+ }), il(e);
2374
2374
  }
2375
2375
  function Xr(e) {
2376
2376
  return "__value" in e ? e.__value : e.value;
2377
2377
  }
2378
- var Br = /* @__PURE__ */ Symbol("class"), Ur = /* @__PURE__ */ Symbol("style"), rl = /* @__PURE__ */ Symbol("is custom element"), il = /* @__PURE__ */ Symbol("is html"), ld = Ki ? "link" : "LINK", cd = Ki ? "input" : "INPUT", ud = Ki ? "option" : "OPTION", dd = Ki ? "select" : "SELECT";
2378
+ var Br = /* @__PURE__ */ Symbol("class"), Ur = /* @__PURE__ */ Symbol("style"), nl = /* @__PURE__ */ Symbol("is custom element"), ol = /* @__PURE__ */ Symbol("is html"), ud = Ki ? "link" : "LINK", dd = Ki ? "input" : "INPUT", fd = Ki ? "option" : "OPTION", vd = Ki ? "select" : "SELECT";
2379
2379
  function vr(e) {
2380
2380
  if (N) {
2381
2381
  var t = !1, r = () => {
@@ -2390,32 +2390,32 @@ function vr(e) {
2390
2390
  }
2391
2391
  }
2392
2392
  };
2393
- e.__on_r = r, rt(r), xa();
2393
+ e.__on_r = r, rt(r), La();
2394
2394
  }
2395
2395
  }
2396
- function fd(e, t) {
2396
+ function pd(e, t) {
2397
2397
  t ? e.hasAttribute("selected") || e.setAttribute("selected", "") : e.removeAttribute("selected");
2398
2398
  }
2399
2399
  function Wi(e, t, r, i) {
2400
- var n = nl(e);
2401
- if (N && (n[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === ld)) {
2400
+ var n = sl(e);
2401
+ if (N && (n[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === ud)) {
2402
2402
  i || void 0;
2403
2403
  return;
2404
2404
  }
2405
- n[t] !== (n[t] = r) && (t === "loading" && (e[Ic] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && ol(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
2405
+ n[t] !== (n[t] = r) && (t === "loading" && (e[Pc] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && al(e).includes(t) ? e[t] = r : e.setAttribute(t, r));
2406
2406
  }
2407
- function vd(e, t, r, i, n = !1, o = !1) {
2408
- if (N && n && e.nodeName === cd) {
2407
+ function hd(e, t, r, i, n = !1, o = !1) {
2408
+ if (N && n && e.nodeName === dd) {
2409
2409
  var l = e;
2410
2410
  (l.type === "checkbox" ? "defaultChecked" : "defaultValue") in r || vr(l);
2411
2411
  }
2412
- var c = nl(e), d = c[rl], h = !c[il];
2413
- let v = N && d;
2414
- v && Ie(!1);
2415
- var _ = t || {}, m = e.nodeName === ud;
2412
+ var c = sl(e), d = c[nl], h = !c[ol];
2413
+ let f = N && d;
2414
+ f && Ie(!1);
2415
+ var _ = t || {}, m = e.nodeName === fd;
2416
2416
  for (var b in t) b in r || (r[b] = null);
2417
- r.class ? r.class = Za(r.class) : (i || r[Br]) && (r.class = null), r[Ur] && (r.style ?? (r.style = null));
2418
- var k = ol(e);
2417
+ r.class ? r.class = tl(r.class) : (i || r[Br]) && (r.class = null), r[Ur] && (r.style ?? (r.style = null));
2418
+ var k = al(e);
2419
2419
  for (const P in r) {
2420
2420
  let U = r[P];
2421
2421
  if (m && P === "value" && U == null) {
@@ -2427,7 +2427,7 @@ function vd(e, t, r, i, n = !1, o = !1) {
2427
2427
  continue;
2428
2428
  }
2429
2429
  if (P === "style") {
2430
- el(e, U, t?.[Ur], r[Ur]), _[P] = U, _[Ur] = r[Ur];
2430
+ rl(e, U, t?.[Ur], r[Ur]), _[P] = U, _[Ur] = r[Ur];
2431
2431
  continue;
2432
2432
  }
2433
2433
  var E = _[P];
@@ -2438,26 +2438,26 @@ function vd(e, t, r, i, n = !1, o = !1) {
2438
2438
  if (w === "on") {
2439
2439
  const q = {}, te = "$$" + P;
2440
2440
  let K = P.slice(2);
2441
- var S = ju(K);
2442
- if (Ru(K) && (K = K.slice(0, -7), q.capture = !0), !S && E) {
2441
+ var S = Vu(K);
2442
+ if (ju(K) && (K = K.slice(0, -7), q.capture = !0), !S && E) {
2443
2443
  if (U != null) continue;
2444
2444
  e.removeEventListener(K, _[te], q), _[te] = null;
2445
2445
  }
2446
2446
  if (S)
2447
- ve(K, e, U), qa([K]);
2447
+ ve(K, e, U), Ya([K]);
2448
2448
  else if (U != null) {
2449
2449
  let ye = function(ie) {
2450
2450
  _[P].call(this, ie);
2451
2451
  };
2452
- _[te] = Mu(K, e, ye, q);
2452
+ _[te] = Ou(K, e, ye, q);
2453
2453
  }
2454
2454
  } else if (P === "style") Wi(e, P, U);
2455
- else if (P === "autofocus") gu(e, !!U);
2455
+ else if (P === "autofocus") yu(e, !!U);
2456
2456
  else if (!d && (P === "__value" || P === "value" && U != null)) e.value = e.__value = U;
2457
- else if (P === "selected" && m) fd(e, U);
2457
+ else if (P === "selected" && m) pd(e, U);
2458
2458
  else {
2459
2459
  var O = P;
2460
- h || (O = Du(O));
2460
+ h || (O = Wu(O));
2461
2461
  var D = O === "defaultValue" || O === "defaultChecked";
2462
2462
  if (U == null && !d && !D)
2463
2463
  if (c[P] = null, O === "value" || O === "checked") {
@@ -2475,62 +2475,62 @@ function vd(e, t, r, i, n = !1, o = !1) {
2475
2475
  }
2476
2476
  }
2477
2477
  }
2478
- return v && Ie(!0), _;
2478
+ return f && Ie(!0), _;
2479
2479
  }
2480
- function pd(e, t, r = [], i = [], n = [], o, l = !1, c = !1) {
2481
- ba(n, r, i, (d) => {
2482
- var h = void 0, v = {}, _ = e.nodeName === dd, m = !1;
2483
- if (Ca(() => {
2484
- var k = t(...d.map(s)), E = vd(e, h, k, o, l, c);
2480
+ function md(e, t, r = [], i = [], n = [], o, l = !1, c = !1) {
2481
+ Ta(n, r, i, (d) => {
2482
+ var h = void 0, f = {}, _ = e.nodeName === vd, m = !1;
2483
+ if (Na(() => {
2484
+ var k = t(...d.map(s)), E = hd(e, h, k, o, l, c);
2485
2485
  m && _ && "value" in k && Fi(e, k.value);
2486
- for (let S of Object.getOwnPropertySymbols(v)) k[S] || ue(v[S]);
2486
+ for (let S of Object.getOwnPropertySymbols(f)) k[S] || ue(f[S]);
2487
2487
  for (let S of Object.getOwnPropertySymbols(k)) {
2488
2488
  var w = k[S];
2489
- S.description === "@attach" && (!h || w !== h[S]) && (v[S] && ue(v[S]), v[S] = ke(() => nd(e, () => w))), E[S] = w;
2489
+ S.description === "@attach" && (!h || w !== h[S]) && (f[S] && ue(f[S]), f[S] = ke(() => sd(e, () => w))), E[S] = w;
2490
2490
  }
2491
2491
  h = E;
2492
2492
  }), _) {
2493
2493
  var b = e;
2494
2494
  oi(() => {
2495
- Fi(b, h.value, !0), tl(b);
2495
+ Fi(b, h.value, !0), il(b);
2496
2496
  });
2497
2497
  }
2498
2498
  m = !0;
2499
2499
  });
2500
2500
  }
2501
- function nl(e) {
2501
+ function sl(e) {
2502
2502
  return e.__attributes ?? (e.__attributes = {
2503
- [rl]: e.nodeName.includes("-"),
2504
- [il]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
2503
+ [nl]: e.nodeName.includes("-"),
2504
+ [ol]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
2505
2505
  });
2506
2506
  }
2507
2507
  var Fs = /* @__PURE__ */ new Map();
2508
- function ol(e) {
2508
+ function al(e) {
2509
2509
  var t = e.getAttribute("is") || e.nodeName, r = Fs.get(t);
2510
2510
  if (r) return r;
2511
2511
  Fs.set(t, r = []);
2512
2512
  for (var i, n = e, o = Element.prototype; o !== n; ) {
2513
- i = _c(n);
2513
+ i = bc(n);
2514
2514
  for (var l in i) i[l].set && r.push(l);
2515
- n = Xs(n);
2515
+ n = Zs(n);
2516
2516
  }
2517
2517
  return r;
2518
2518
  }
2519
2519
  function ur(e, t, r = t) {
2520
2520
  var i = /* @__PURE__ */ new WeakSet();
2521
- Oa(e, "input", async (n) => {
2521
+ Ca(e, "input", async (n) => {
2522
2522
  var o = n ? e.defaultValue : e.value;
2523
- if (o = Un(e) ? Hn(o) : o, r(o), z !== null && i.add(z), await Pu(), o !== (o = t())) {
2523
+ if (o = Un(e) ? Hn(o) : o, r(o), V !== null && i.add(V), await xu(), o !== (o = t())) {
2524
2524
  var l = e.selectionStart, c = e.selectionEnd, d = e.value.length;
2525
2525
  if (e.value = o ?? "", c !== null) {
2526
2526
  var h = e.value.length;
2527
2527
  l === c && c === d && h > d ? (e.selectionStart = h, e.selectionEnd = h) : (e.selectionStart = l, e.selectionEnd = Math.min(c, h));
2528
2528
  }
2529
2529
  }
2530
- }), (N && e.defaultValue !== e.value || or(t) == null && e.value) && (r(Un(e) ? Hn(e.value) : e.value), z !== null && i.add(z)), en(() => {
2530
+ }), (N && e.defaultValue !== e.value || or(t) == null && e.value) && (r(Un(e) ? Hn(e.value) : e.value), V !== null && i.add(V)), en(() => {
2531
2531
  var n = t();
2532
2532
  if (e === document.activeElement) {
2533
- var o = Re ? ji : z;
2533
+ var o = Re ? ji : V;
2534
2534
  if (i.has(o)) return;
2535
2535
  }
2536
2536
  Un(e) && n === Hn(e.value) || e.type === "date" && !n && !e.value || n !== e.value && (e.value = n ?? "");
@@ -2543,28 +2543,28 @@ function Un(e) {
2543
2543
  function Hn(e) {
2544
2544
  return e === "" ? null : +e;
2545
2545
  }
2546
- var sl, pr = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Gn = /* @__PURE__ */ new WeakMap(), Ws = /* @__PURE__ */ new WeakSet(), al = class {
2546
+ var ll, pr = /* @__PURE__ */ new WeakMap(), Bi = /* @__PURE__ */ new WeakMap(), Gn = /* @__PURE__ */ new WeakMap(), Ws = /* @__PURE__ */ new WeakSet(), cl = class {
2547
2547
  constructor(e) {
2548
2548
  _o(this, Ws), B(this, pr, /* @__PURE__ */ new WeakMap()), B(this, Bi, void 0), B(this, Gn, void 0), H(Gn, this, e);
2549
2549
  }
2550
2550
  observe(e, t) {
2551
2551
  var r = p(pr, this).get(e) || /* @__PURE__ */ new Set();
2552
- return r.add(t), p(pr, this).set(e, r), Q(Ws, this, hd).call(this).observe(e, p(Gn, this)), () => {
2552
+ return r.add(t), p(pr, this).set(e, r), Q(Ws, this, gd).call(this).observe(e, p(Gn, this)), () => {
2553
2553
  var i = p(pr, this).get(e);
2554
2554
  i.delete(t), i.size === 0 && (p(pr, this).delete(e), p(Bi, this).unobserve(e));
2555
2555
  };
2556
2556
  }
2557
2557
  };
2558
- sl = al;
2559
- function hd() {
2558
+ ll = cl;
2559
+ function gd() {
2560
2560
  return p(Bi, this) ?? H(Bi, this, new ResizeObserver((e) => {
2561
2561
  for (var t of e) {
2562
- sl.entries.set(t.target, t);
2562
+ ll.entries.set(t.target, t);
2563
2563
  for (var r of p(pr, this).get(t.target) || []) r(t);
2564
2564
  }
2565
2565
  }));
2566
2566
  }
2567
- x(al, "entries", /* @__PURE__ */ new WeakMap());
2567
+ x(cl, "entries", /* @__PURE__ */ new WeakMap());
2568
2568
  function Bs(e, t) {
2569
2569
  return e === t || e?.[Kt] === t;
2570
2570
  }
@@ -2581,22 +2581,22 @@ function qn(e = {}, t, r, i) {
2581
2581
  for (; d !== n && d.parent !== null && d.parent.f & 33554432; ) d = d.parent;
2582
2582
  const h = () => {
2583
2583
  c && Bs(r(...c), e) && t(null, ...c);
2584
- }, v = d.teardown;
2584
+ }, f = d.teardown;
2585
2585
  d.teardown = () => {
2586
- h(), v?.();
2586
+ h(), f?.();
2587
2587
  };
2588
2588
  };
2589
2589
  }), e;
2590
2590
  }
2591
2591
  function Hr(e, t, r, i) {
2592
2592
  var n = !ii || (r & 2) !== 0, o = (r & 8) !== 0, l = (r & 16) !== 0, c = i, d = !0, h = () => (d && (d = !1, c = l ? or(i) : i), c);
2593
- let v;
2593
+ let f;
2594
2594
  if (o) {
2595
- var _ = Kt in e || Zs in e;
2596
- v = qt(e, t)?.set ?? (_ && t in e ? (D) => e[t] = D : void 0);
2595
+ var _ = Kt in e || ta in e;
2596
+ f = qt(e, t)?.set ?? (_ && t in e ? (D) => e[t] = D : void 0);
2597
2597
  }
2598
2598
  var m, b = !1;
2599
- o ? [m, b] = Yc(() => e[t]) : m = e[t], m === void 0 && i !== void 0 && (m = h(), v && (n && Nc(t), v(m)));
2599
+ o ? [m, b] = Xc(() => e[t]) : m = e[t], m === void 0 && i !== void 0 && (m = h(), f && (n && zc(t), f(m)));
2600
2600
  var k;
2601
2601
  if (n ? k = () => {
2602
2602
  var D = e[t];
@@ -2605,10 +2605,10 @@ function Hr(e, t, r, i) {
2605
2605
  var D = e[t];
2606
2606
  return D !== void 0 && (c = void 0), D === void 0 ? c : D;
2607
2607
  }, n && (r & 4) === 0) return k;
2608
- if (v) {
2608
+ if (f) {
2609
2609
  var E = e.$$legacy;
2610
2610
  return (function(D, P) {
2611
- return arguments.length > 0 ? ((!n || !P || E || b) && v(P ? k() : D), D) : k();
2611
+ return arguments.length > 0 ? ((!n || !P || E || b) && f(P ? k() : D), D) : k();
2612
2612
  });
2613
2613
  }
2614
2614
  var w = !1, S = ((r & 1) !== 0 ? Ji : ko)(() => (w = !1, k()));
@@ -2622,14 +2622,14 @@ function Hr(e, t, r, i) {
2622
2622
  return mt && w || (O.f & 16384) !== 0 ? S.v : s(S);
2623
2623
  });
2624
2624
  }
2625
- function md(e) {
2626
- return new gd(e);
2625
+ function _d(e) {
2626
+ return new yd(e);
2627
2627
  }
2628
- var Wt = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), gd = class {
2628
+ var Wt = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), yd = class {
2629
2629
  constructor(e) {
2630
2630
  B(this, Wt, void 0), B(this, Xe, void 0);
2631
2631
  var t = /* @__PURE__ */ new Map(), r = (n, o) => {
2632
- var l = /* @__PURE__ */ Aa(o, !1, !1);
2632
+ var l = /* @__PURE__ */ Ia(o, !1, !1);
2633
2633
  return t.set(n, l), l;
2634
2634
  };
2635
2635
  const i = new Proxy({
@@ -2640,13 +2640,13 @@ var Wt = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), gd =
2640
2640
  return s(t.get(o) ?? r(o, Reflect.get(n, o)));
2641
2641
  },
2642
2642
  has(n, o) {
2643
- return o === Zs ? !0 : (s(t.get(o) ?? r(o, Reflect.get(n, o))), Reflect.has(n, o));
2643
+ return o === ta ? !0 : (s(t.get(o) ?? r(o, Reflect.get(n, o))), Reflect.has(n, o));
2644
2644
  },
2645
2645
  set(n, o, l) {
2646
2646
  return y(t.get(o) ?? r(o, l), l), Reflect.set(n, o, l);
2647
2647
  }
2648
2648
  });
2649
- H(Xe, this, (e.hydrate ? Gu : Ka)(e.component, {
2649
+ H(Xe, this, (e.hydrate ? Ku : Ja)(e.component, {
2650
2650
  target: e.target,
2651
2651
  anchor: e.anchor,
2652
2652
  props: i,
@@ -2668,7 +2668,7 @@ var Wt = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), gd =
2668
2668
  p(Xe, this).$set = (n) => {
2669
2669
  Object.assign(i, n);
2670
2670
  }, p(Xe, this).$destroy = () => {
2671
- qu(p(Xe, this));
2671
+ Yu(p(Xe, this));
2672
2672
  };
2673
2673
  }
2674
2674
  $set(e) {
@@ -2684,8 +2684,8 @@ var Wt = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), gd =
2684
2684
  $destroy() {
2685
2685
  p(Xe, this).$destroy();
2686
2686
  }
2687
- }, ll;
2688
- typeof HTMLElement == "function" && (ll = class extends HTMLElement {
2687
+ }, ul;
2688
+ typeof HTMLElement == "function" && (ul = class extends HTMLElement {
2689
2689
  constructor(e, t, r) {
2690
2690
  super(), x(this, "$$ctor", void 0), x(this, "$$s", void 0), x(this, "$$c", void 0), x(this, "$$cn", !1), x(this, "$$d", {}), x(this, "$$r", !1), x(this, "$$p_d", {}), x(this, "$$l", {}), x(this, "$$l_u", /* @__PURE__ */ new Map()), x(this, "$$me", void 0), x(this, "$$shadowRoot", null), this.$$ctor = e, this.$$s = t, r && (this.$$shadowRoot = this.attachShadow(r));
2691
2691
  }
@@ -2711,14 +2711,14 @@ typeof HTMLElement == "function" && (ll = class extends HTMLElement {
2711
2711
  };
2712
2712
  };
2713
2713
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
2714
- const t = {}, r = _d(this);
2714
+ const t = {}, r = bd(this);
2715
2715
  for (const i of this.$$s) i in r && (i === "default" && !this.$$d.children ? (this.$$d.children = e(i), t.default = !0) : t[i] = e(i));
2716
2716
  for (const i of this.attributes) {
2717
2717
  const n = this.$$g_p(i.name);
2718
2718
  n in this.$$d || (this.$$d[n] = Mi(n, i.value, this.$$p_d, "toProp"));
2719
2719
  }
2720
2720
  for (const i in this.$$p_d) !(i in this.$$d) && this[i] !== void 0 && (this.$$d[i] = this[i], delete this[i]);
2721
- this.$$c = md({
2721
+ this.$$c = _d({
2722
2722
  component: this.$$ctor,
2723
2723
  target: this.$$shadowRoot || this,
2724
2724
  props: {
@@ -2726,7 +2726,7 @@ typeof HTMLElement == "function" && (ll = class extends HTMLElement {
2726
2726
  $$slots: t,
2727
2727
  $$host: this
2728
2728
  }
2729
- }), this.$$me = wu(() => {
2729
+ }), this.$$me = ku(() => {
2730
2730
  en(() => {
2731
2731
  this.$$r = !0;
2732
2732
  for (const i of Li(this.$$c)) {
@@ -2783,14 +2783,14 @@ function Mi(e, t, r, i) {
2783
2783
  return t;
2784
2784
  }
2785
2785
  }
2786
- function _d(e) {
2786
+ function bd(e) {
2787
2787
  const t = {};
2788
2788
  return e.childNodes.forEach((r) => {
2789
2789
  t[r.slot || "default"] = !0;
2790
2790
  }), t;
2791
2791
  }
2792
- function yd(e, t, r, i, n, o) {
2793
- let l = class extends ll {
2792
+ function wd(e, t, r, i, n, o) {
2793
+ let l = class extends ul {
2794
2794
  constructor() {
2795
2795
  super(e, r, n), this.$$p_d = t;
2796
2796
  }
@@ -2815,7 +2815,7 @@ function yd(e, t, r, i, n, o) {
2815
2815
  } });
2816
2816
  }), o && (l = o(l)), e.element = l, l;
2817
2817
  }
2818
- var rn = (e) => e, Gf = rn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), qf = rn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), Kf = rn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), Yf = rn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext")), Us;
2818
+ var rn = (e) => e, Yf = rn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), Jf = rn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), Xf = rn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), Qf = rn(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext")), Us;
2819
2819
  (function(e) {
2820
2820
  e.TTS_WORD = "tts-word", e.TTS_SENTENCE = "tts-sentence", e.ANNOTATION = "annotation";
2821
2821
  })(Us || (Us = {}));
@@ -2823,12 +2823,12 @@ var Hs;
2823
2823
  (function(e) {
2824
2824
  e.YELLOW = "yellow", e.GREEN = "green", e.BLUE = "blue", e.PINK = "pink", e.ORANGE = "orange", e.UNDERLINE = "underline";
2825
2825
  })(Hs || (Hs = {}));
2826
- function cl(e) {
2826
+ function dl(e) {
2827
2827
  return (...t) => {
2828
2828
  console.debug(`[${e}]`, ...t);
2829
2829
  };
2830
2830
  }
2831
- var Jf = cl("I18nService"), Kn = {
2831
+ var Zf = dl("I18nService"), Kn = {
2832
2832
  assessment: [],
2833
2833
  section: [],
2834
2834
  item: [],
@@ -2849,19 +2849,19 @@ function $t(e, t) {
2849
2849
  if (e.find((r) => typeof r != "string") !== void 0) throw new Error(`Invalid tools config at "${t}": all entries must be strings.`);
2850
2850
  return e;
2851
2851
  }
2852
- function bd(e) {
2852
+ function Td(e) {
2853
2853
  if (e != null) {
2854
2854
  if (!er(e)) throw new Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');
2855
2855
  return e;
2856
2856
  }
2857
2857
  }
2858
- function wd(e) {
2858
+ function kd(e) {
2859
2859
  if (e != null) {
2860
2860
  if (!er(e)) throw new Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');
2861
2861
  return e;
2862
2862
  }
2863
2863
  }
2864
- function Td(e, t) {
2864
+ function Sd(e, t) {
2865
2865
  if (t == null) return;
2866
2866
  if (!er(t)) throw new Error(`Invalid tools config at "providers.${e}": expected an object.`);
2867
2867
  const r = t;
@@ -2870,14 +2870,14 @@ function Td(e, t) {
2870
2870
  if ("provider" in r && r.provider !== void 0 && !er(r.provider)) throw new Error(`Invalid tools config at "providers.${e}.provider": expected an object.`);
2871
2871
  return r;
2872
2872
  }
2873
- function kd(e) {
2873
+ function Ad(e) {
2874
2874
  if (e == null) return {};
2875
2875
  if (!er(e)) throw new Error('Invalid tools config at "providers": expected an object keyed by tool id.');
2876
2876
  const t = {};
2877
- for (const [r, i] of Object.entries(e)) t[r] = Td(r, i);
2877
+ for (const [r, i] of Object.entries(e)) t[r] = Sd(r, i);
2878
2878
  return t;
2879
2879
  }
2880
- function ul(e) {
2880
+ function fl(e) {
2881
2881
  const t = e.trim();
2882
2882
  return t || "";
2883
2883
  }
@@ -2886,20 +2886,20 @@ function Pt(e) {
2886
2886
  const t = /* @__PURE__ */ new Set();
2887
2887
  for (const r of e) {
2888
2888
  if (typeof r != "string") throw new Error("Invalid tools config: tool list entries must be strings.");
2889
- const i = ul(r);
2889
+ const i = fl(r);
2890
2890
  i && t.add(i);
2891
2891
  }
2892
2892
  return Array.from(t);
2893
2893
  }
2894
- function Sd(e, t) {
2894
+ function Ed(e, t) {
2895
2895
  if (e != null) {
2896
2896
  if (e === "on" || e === "off") return e;
2897
2897
  throw new Error(`Invalid tools config at "${t}": expected "on" or "off", got ${JSON.stringify(e)}.`);
2898
2898
  }
2899
2899
  }
2900
- function Ad(e) {
2900
+ function Id(e) {
2901
2901
  if (e != null && !er(e)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
2902
- const t = wd(e?.policy), r = bd(e?.placement), i = kd(e?.providers), n = Sd(e?.pnpEnforcement, "pnpEnforcement"), o = {
2902
+ const t = kd(e?.policy), r = Td(e?.placement), i = Ad(e?.providers), n = Ed(e?.pnpEnforcement, "pnpEnforcement"), o = {
2903
2903
  policy: {
2904
2904
  allowed: Pt($t(t?.allowed, "policy.allowed")),
2905
2905
  blocked: Pt($t(t?.blocked, "policy.blocked"))
@@ -2913,7 +2913,7 @@ function Ad(e) {
2913
2913
  };
2914
2914
  return n && (o.pnpEnforcement = n), o;
2915
2915
  }
2916
- var Ed = [
2916
+ var $d = [
2917
2917
  "assessment",
2918
2918
  "section",
2919
2919
  "item",
@@ -2924,7 +2924,7 @@ var Ed = [
2924
2924
  function xi(e, t) {
2925
2925
  if (typeof e != "string" || e.trim().length === 0) throw new Error(`Invalid tool registration: "${t}" must be a non-empty string.`);
2926
2926
  }
2927
- var Id = [
2927
+ var Pd = [
2928
2928
  {
2929
2929
  pattern: /<script\b/i,
2930
2930
  reason: "contains a <script> tag"
@@ -2942,17 +2942,17 @@ var Id = [
2942
2942
  reason: "contains a <foreignObject> element"
2943
2943
  }
2944
2944
  ];
2945
- function $d(e, t, r) {
2945
+ function Md(e, t, r) {
2946
2946
  const i = t.trimStart(), n = i.toLowerCase().startsWith("<svg"), o = /^https?:/i.test(i);
2947
2947
  if (/^data:/i.test(i)) throw new Error(`Invalid tool registration "${e}": "${r}" may not be a data: URL.`);
2948
2948
  if (!(!n && !o)) {
2949
- for (const { pattern: l, reason: c } of Id) if (l.test(t)) throw new Error(`Invalid tool registration "${e}": "${r}" ${c}. Inline SVG icons must not include scriptable content.`);
2949
+ for (const { pattern: l, reason: c } of Pd) if (l.test(t)) throw new Error(`Invalid tool registration "${e}": "${r}" ${c}. Inline SVG icons must not include scriptable content.`);
2950
2950
  }
2951
2951
  }
2952
2952
  function Gs(e) {
2953
2953
  if (xi(e.toolId, "toolId"), xi(e.name, "name"), xi(e.description, "description"), typeof e.icon != "string" && typeof e.icon != "function") throw new Error(`Invalid tool registration "${e.toolId}": "icon" must be a string or function.`);
2954
- if (typeof e.icon == "string" && $d(e.toolId, e.icon, "icon"), !Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
2955
- const t = e.supportedLevels.find((r) => !Ed.includes(r));
2954
+ if (typeof e.icon == "string" && Md(e.toolId, e.icon, "icon"), !Array.isArray(e.supportedLevels) || e.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${e.toolId}": "supportedLevels" must be a non-empty array.`);
2955
+ const t = e.supportedLevels.find((r) => !$d.includes(r));
2956
2956
  if (t) throw new Error(`Invalid tool registration "${e.toolId}": unsupported level "${t}".`);
2957
2957
  if (e.activation !== void 0 && e.activation !== "toolbar-toggle" && e.activation !== "selection-gateway") throw new Error(`Invalid tool registration "${e.toolId}": unsupported activation "${String(e.activation)}".`);
2958
2958
  if (e.singletonScope !== void 0 && e.singletonScope !== "section") throw new Error(`Invalid tool registration "${e.toolId}": unsupported singletonScope "${String(e.singletonScope)}".`);
@@ -2961,12 +2961,12 @@ function Gs(e) {
2961
2961
  if (typeof e.isVisibleInContext != "function") throw new Error(`Invalid tool registration "${e.toolId}": "isVisibleInContext" must be a function.`);
2962
2962
  if (typeof e.renderToolbar != "function") throw new Error(`Invalid tool registration "${e.toolId}": "renderToolbar" must be a function.`);
2963
2963
  }
2964
- var Pd = class {
2964
+ var xd = class {
2965
2965
  constructor() {
2966
2966
  x(this, "tools", /* @__PURE__ */ new Map()), x(this, "pnpIndex", /* @__PURE__ */ new Map()), x(this, "componentOverrides", {}), x(this, "moduleLoaders", /* @__PURE__ */ new Map()), x(this, "loadedToolModules", /* @__PURE__ */ new Set()), x(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
2967
2967
  }
2968
2968
  normalizeToolId(e) {
2969
- return ul(e);
2969
+ return fl(e);
2970
2970
  }
2971
2971
  normalizeToolIds(e) {
2972
2972
  return e.map((t) => this.normalizeToolId(t));
@@ -3104,20 +3104,20 @@ var Pd = class {
3104
3104
  return i.renderToolbar(t, n);
3105
3105
  }
3106
3106
  };
3107
- function dl(e) {
3107
+ function vl(e) {
3108
3108
  return e.level === "item";
3109
3109
  }
3110
- function Md(e) {
3110
+ function Od(e) {
3111
3111
  return e.level === "passage";
3112
3112
  }
3113
- function xd(e) {
3113
+ function Ld(e) {
3114
3114
  return e.level === "rubric";
3115
3115
  }
3116
- function fl(e) {
3116
+ function pl(e) {
3117
3117
  return e.level === "element";
3118
3118
  }
3119
3119
  function xo(e) {
3120
- if (fl(e)) {
3120
+ if (pl(e)) {
3121
3121
  const t = e.item.config;
3122
3122
  if (!t) return "";
3123
3123
  const r = [], i = (c) => c.replace(/<[^>]*>/g, " ").trim(), n = t.elements?.[e.elementId];
@@ -3132,7 +3132,7 @@ function xo(e) {
3132
3132
  }
3133
3133
  return r.filter(Boolean).join(" ").trim();
3134
3134
  }
3135
- if (dl(e)) {
3135
+ if (vl(e)) {
3136
3136
  const t = e.item;
3137
3137
  if (!t?.config) return "";
3138
3138
  const r = t.config, i = [], n = (d) => d.replace(/<[^>]*>/g, " ").trim();
@@ -3145,13 +3145,13 @@ function xo(e) {
3145
3145
  if (!(!d || typeof d != "object")) {
3146
3146
  for (const h of Object.values(d))
3147
3147
  if (typeof h == "string" && i.push(n(h)), Array.isArray(h)) {
3148
- for (const v of h) if (v && typeof v == "object")
3149
- for (const _ of Object.values(v)) typeof _ == "string" && i.push(n(_));
3148
+ for (const f of h) if (f && typeof f == "object")
3149
+ for (const _ of Object.values(f)) typeof _ == "string" && i.push(n(_));
3150
3150
  }
3151
3151
  }
3152
3152
  return i.filter(Boolean).join(" ").trim();
3153
3153
  }
3154
- if (Md(e)) {
3154
+ if (Od(e)) {
3155
3155
  const t = e.passage;
3156
3156
  if (!t?.config) return "";
3157
3157
  const r = t.config, i = [], n = (d) => d.replace(/<[^>]*>/g, " ").trim();
@@ -3164,13 +3164,13 @@ function xo(e) {
3164
3164
  if (!(!d || typeof d != "object")) {
3165
3165
  for (const h of Object.values(d))
3166
3166
  if (typeof h == "string" && i.push(n(h)), Array.isArray(h)) {
3167
- for (const v of h) if (v && typeof v == "object")
3168
- for (const _ of Object.values(v)) typeof _ == "string" && i.push(n(_));
3167
+ for (const f of h) if (f && typeof f == "object")
3168
+ for (const _ of Object.values(f)) typeof _ == "string" && i.push(n(_));
3169
3169
  }
3170
3170
  }
3171
3171
  return i.filter(Boolean).join(" ").trim();
3172
3172
  }
3173
- if (xd(e)) {
3173
+ if (Ld(e)) {
3174
3174
  const t = e.rubricBlock;
3175
3175
  return t.passage?.config ? (t.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (t.content || "").replace(/<[^>]*>/g, " ").trim();
3176
3176
  }
@@ -3187,7 +3187,7 @@ function nn(e) {
3187
3187
  /\d+\s*[+\-*/=]\s*\d+/
3188
3188
  ].some((r) => r.test(t));
3189
3189
  }
3190
- function Od(e) {
3190
+ function Cd(e) {
3191
3191
  const t = [
3192
3192
  "pie-multiple-choice",
3193
3193
  "pie-inline-choice",
@@ -3196,7 +3196,7 @@ function Od(e) {
3196
3196
  "inline-choice",
3197
3197
  "select-text"
3198
3198
  ];
3199
- if (fl(e)) {
3199
+ if (pl(e)) {
3200
3200
  const r = e.item.config;
3201
3201
  if (!r?.models) return !1;
3202
3202
  const i = (Array.isArray(r.models) ? r.models : Object.values(r.models)).find((o) => o && typeof o == "object" && o.id === e.elementId);
@@ -3204,7 +3204,7 @@ function Od(e) {
3204
3204
  const n = i.element || "";
3205
3205
  return t.includes(n);
3206
3206
  }
3207
- if (dl(e)) {
3207
+ if (vl(e)) {
3208
3208
  const r = e.item.config?.models;
3209
3209
  return (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).some((i) => {
3210
3210
  if (!i || typeof i != "object") return !1;
@@ -3217,7 +3217,7 @@ function Od(e) {
3217
3217
  function on(e) {
3218
3218
  return xo(e).trim().length >= 10;
3219
3219
  }
3220
- function Ld(e) {
3220
+ function Rd(e) {
3221
3221
  const t = xo(e);
3222
3222
  return [
3223
3223
  /chemistry|chemical|element|atom|molecule|compound/i,
@@ -3228,23 +3228,23 @@ function Ld(e) {
3228
3228
  /physics|force|energy|velocity|acceleration/i
3229
3229
  ].some((r) => r.test(t));
3230
3230
  }
3231
- var Cd = [
3231
+ var Nd = [
3232
3232
  "assessment",
3233
3233
  "section",
3234
3234
  "item",
3235
3235
  "passage",
3236
3236
  "rubric"
3237
- ], Rd = new Set(Cd);
3238
- function Nd(e) {
3239
- return Rd.has(e);
3237
+ ], jd = new Set(Nd);
3238
+ function zd(e) {
3239
+ return jd.has(e);
3240
3240
  }
3241
3241
  function Oo(e, t, r) {
3242
3242
  const i = e.trim(), n = r.trim();
3243
3243
  if (!i || !n) throw new Error("Tool instance ids require non-empty tool and scope ids");
3244
- if (!Nd(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
3244
+ if (!zd(t)) throw new Error(`Unknown tool scope level '${t}'. Register custom levels with registerToolScopeLevel().`);
3245
3245
  return `${i}:${t}:${n}`;
3246
3246
  }
3247
- var jd = class {
3247
+ var Vd = class {
3248
3248
  constructor() {
3249
3249
  x(this, "providerId", "desmos-calculator"), x(this, "providerName", "Desmos Calculator"), x(this, "category", "calculator"), x(this, "version", "1.10"), x(this, "requiresAuth", !0), x(this, "desmosProvider", null), x(this, "config", null);
3250
3250
  }
@@ -3321,7 +3321,7 @@ var jd = class {
3321
3321
  destroy() {
3322
3322
  this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
3323
3323
  }
3324
- }, Vd = (e, t) => {
3324
+ }, Dd = (e, t) => {
3325
3325
  const r = t?.useSentenceSegmenter !== !1;
3326
3326
  try {
3327
3327
  if (!r) throw new Error("Segmenter disabled by policy");
@@ -3348,14 +3348,14 @@ var jd = class {
3348
3348
  text: e,
3349
3349
  offset: 0
3350
3350
  }];
3351
- }, zd = class {
3351
+ }, Fd = class {
3352
3352
  constructor() {
3353
3353
  x(this, "providerId", "browser"), x(this, "providerName", "Browser Speech Synthesis"), x(this, "version", "1.0.0");
3354
3354
  }
3355
3355
  async initialize(e) {
3356
3356
  if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
3357
3357
  if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
3358
- return new Dd(e);
3358
+ return new Wd(e);
3359
3359
  }
3360
3360
  supportsFeature(e) {
3361
3361
  return !0;
@@ -3372,7 +3372,7 @@ var jd = class {
3372
3372
  }
3373
3373
  destroy() {
3374
3374
  }
3375
- }, Dd = class {
3375
+ }, Wd = class {
3376
3376
  constructor(e) {
3377
3377
  x(this, "utterance", null), x(this, "config", null), x(this, "_isPlaying", !1), x(this, "_isPaused", !1), x(this, "speakRunId", 0), x(this, "onWordBoundary", void 0), this.config = e;
3378
3378
  }
@@ -3415,8 +3415,8 @@ var jd = class {
3415
3415
  n = c, o = h;
3416
3416
  continue;
3417
3417
  }
3418
- const v = `${n} ${c}`;
3419
- v.length <= 260 ? n = v : (i.push({
3418
+ const f = `${n} ${c}`;
3419
+ f.length <= 260 ? n = f : (i.push({
3420
3420
  text: n,
3421
3421
  offset: o
3422
3422
  }), n = c, o = h);
@@ -3442,7 +3442,7 @@ var jd = class {
3442
3442
  }
3443
3443
  segmentSentences(e) {
3444
3444
  const t = this.getSegmentationPolicy();
3445
- return Vd(e, {
3445
+ return Dd(e, {
3446
3446
  locale: t.locale,
3447
3447
  useSentenceSegmenter: t.useSentenceSegmenter
3448
3448
  });
@@ -3485,8 +3485,8 @@ var jd = class {
3485
3485
  r === this.speakRunId && (this._isPaused = !1);
3486
3486
  }, this.utterance.onboundary = (o) => {
3487
3487
  if (r !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", o.name, "charIndex:", o.charIndex, "charLength:", o.charLength), o.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence") return;
3488
- const l = Math.max(0, Math.min(o.charIndex, Math.max(0, e.length - 1))), c = Number(o.charLength || 0), d = this.inferWordLength(e, l), h = Number.isFinite(c) && c > 0 && c <= 80 && l + c <= e.length ? c : d, v = e.substring(l, Math.min(e.length, l + h)).trim(), _ = t + l;
3489
- console.log("[BrowserProvider] Calling onWordBoundary with word:", v, "at position:", _), this.onWordBoundary(v, _, h);
3488
+ const l = Math.max(0, Math.min(o.charIndex, Math.max(0, e.length - 1))), c = Number(o.charLength || 0), d = this.inferWordLength(e, l), h = Number.isFinite(c) && c > 0 && c <= 80 && l + c <= e.length ? c : d, f = e.substring(l, Math.min(e.length, l + h)).trim(), _ = t + l;
3489
+ console.log("[BrowserProvider] Calling onWordBoundary with word:", f, "at position:", _), this.onWordBoundary(f, _, h);
3490
3490
  }, speechSynthesis.speak(this.utterance);
3491
3491
  });
3492
3492
  }
@@ -3511,7 +3511,7 @@ var jd = class {
3511
3511
  ...e.providerOptions || {}
3512
3512
  });
3513
3513
  }
3514
- }, Fd = class {
3514
+ }, Bd = class {
3515
3515
  async emitTelemetry(e, t) {
3516
3516
  try {
3517
3517
  await this.config?.onTelemetry?.(e, t);
@@ -3543,7 +3543,7 @@ var jd = class {
3543
3543
  }
3544
3544
  async _initializeBrowserTTS(e) {
3545
3545
  if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
3546
- this.ttsProvider = new zd(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
3546
+ this.ttsProvider = new Fd(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
3547
3547
  }
3548
3548
  async _initializeServerTTS(e) {
3549
3549
  if (!e.apiEndpoint) throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
@@ -3601,7 +3601,7 @@ var jd = class {
3601
3601
  destroy() {
3602
3602
  this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
3603
3603
  }
3604
- }, Wd = /* @__PURE__ */ new Set([
3604
+ }, Ud = /* @__PURE__ */ new Set([
3605
3605
  "annotation-xml",
3606
3606
  "color-profile",
3607
3607
  "font-face",
@@ -3610,16 +3610,16 @@ var jd = class {
3610
3610
  "font-face-format",
3611
3611
  "font-face-name",
3612
3612
  "missing-glyph"
3613
- ]), Bd = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Ud = (e, t = "custom element tag") => {
3613
+ ]), Hd = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Gd = (e, t = "custom element tag") => {
3614
3614
  if (!e || typeof e != "string") throw new Error(`Invalid ${t}: expected a non-empty string`);
3615
3615
  const r = e.trim();
3616
3616
  if (!r) throw new Error(`Invalid ${t}: tag is empty`);
3617
3617
  if (r !== r.toLowerCase()) throw new Error(`Invalid ${t} "${r}": custom element names must be lowercase`);
3618
3618
  if (!r.includes("-")) throw new Error(`Invalid ${t} "${r}": custom element names must include a hyphen`);
3619
- if (Wd.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
3620
- if (!Bd.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
3619
+ if (Ud.has(r)) throw new Error(`Invalid ${t} "${r}": this name is reserved by the HTML spec`);
3620
+ if (!Hd.test(r)) throw new Error(`Invalid ${t} "${r}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
3621
3621
  return r;
3622
- }, vl = {
3622
+ }, hl = {
3623
3623
  calculator: "pie-tool-calculator",
3624
3624
  textToSpeech: "pie-tool-text-to-speech",
3625
3625
  ruler: "pie-tool-ruler",
@@ -3632,22 +3632,38 @@ var jd = class {
3632
3632
  annotationToolbar: "pie-tool-annotation-toolbar",
3633
3633
  graph: "pie-tool-graph",
3634
3634
  periodicTable: "pie-tool-periodic-table"
3635
- }, Hd = (e, t) => Ud(t?.toolTagMap?.[e] ?? vl[e] ?? e, `tool component tag for "${e}"`), Gd = (e) => document.createElement(e), ot = (e, t, r, i) => {
3636
- const n = Hd(e, i), o = i?.toolComponentFactories?.[e] ?? i?.toolComponentFactory;
3635
+ }, qd = (e, t) => Gd(t?.toolTagMap?.[e] ?? hl[e] ?? e, `tool component tag for "${e}"`), Kd = (e) => document.createElement(e), ot = (e, t, r, i) => {
3636
+ const n = qd(e, i), o = i?.toolComponentFactories?.[e] ?? i?.toolComponentFactory;
3637
3637
  return o ? o({
3638
3638
  toolId: e,
3639
3639
  tagName: n,
3640
3640
  context: t,
3641
3641
  toolbarContext: r
3642
- }) : Gd(n);
3643
- }, qd = {
3642
+ }) : Kd(n);
3643
+ };
3644
+ function qs(e) {
3645
+ return e === "basic" || e === "scientific" ? e : null;
3646
+ }
3647
+ function Yd(e) {
3648
+ const t = e.getToolRenderParams?.("calculator") ?? {}, r = qs(t.calculatorType), i = t.availableTypes;
3649
+ return {
3650
+ calculatorType: r,
3651
+ availableTypes: Array.isArray(i) ? i.map((n) => qs(n)).filter((n) => n !== null) : r ? [r] : null,
3652
+ displayName: r === "scientific" ? "Scientific Calculator" : r === "basic" ? "Basic Calculator" : "Calculator"
3653
+ };
3654
+ }
3655
+ function Ks(e, t, r) {
3656
+ const i = e;
3657
+ t ? (i.calculatorType = t, e.setAttribute("calculator-type", t)) : (delete i.calculatorType, e.removeAttribute("calculator-type")), r && r.length > 0 ? i.availableTypes = r : delete i.availableTypes;
3658
+ }
3659
+ var Jd = {
3644
3660
  toolId: "calculator",
3645
3661
  name: "Calculator",
3646
3662
  description: "Multi-type calculator (basic, scientific, graphing)",
3647
3663
  icon: "calculator",
3648
3664
  provider: {
3649
3665
  getProviderId: (e) => typeof e?.provider?.id == "string" && e.provider.id.length > 0 ? e.provider.id : "calculator-desmos",
3650
- createProvider: () => new jd(),
3666
+ createProvider: () => new Vd(),
3651
3667
  getInitConfig: (e) => e?.provider?.init ?? {},
3652
3668
  getAuthFetcher: (e) => {
3653
3669
  const t = e?.provider?.runtime?.authFetcher;
@@ -3673,23 +3689,23 @@ var jd = class {
3673
3689
  return nn(e);
3674
3690
  },
3675
3691
  renderToolbar(e, t) {
3676
- const r = Oo(this.toolId, t.scope.level, t.scope.scopeId), i = t.componentOverrides, n = ot(this.toolId, e, t, i);
3677
- n.setAttribute("tool-id", r), n.toolkitCoordinator = t.toolkitCoordinator;
3678
- const o = {
3692
+ const { calculatorType: r, availableTypes: i, displayName: n } = Yd(t), o = Oo(this.toolId, t.scope.level, t.scope.scopeId), l = t.componentOverrides, c = ot(this.toolId, e, t, l);
3693
+ c.setAttribute("tool-id", o), c.toolkitCoordinator = t.toolkitCoordinator, Ks(c, r, i);
3694
+ const d = r === null ? "Open scientific calculator" : `Open ${n.toLowerCase()}`, h = r === null ? "Close scientific calculator" : `Close ${n.toLowerCase()}`, f = {
3679
3695
  toolId: this.toolId,
3680
- label: this.name,
3696
+ label: n,
3681
3697
  icon: typeof this.icon == "function" ? this.icon(e) : this.icon,
3682
3698
  disabled: !1,
3683
- ariaLabel: "Open scientific calculator",
3684
- tooltip: "Calculator",
3699
+ ariaLabel: d,
3700
+ tooltip: n,
3685
3701
  onClick: () => t.toggleTool(this.toolId),
3686
- active: t.isToolVisible(r)
3702
+ active: t.isToolVisible(o)
3687
3703
  };
3688
- let l = o.active;
3689
- return n.visible = o.active, {
3704
+ let _ = f.active;
3705
+ return c.visible = f.active, {
3690
3706
  toolId: this.toolId,
3691
3707
  elements: [{
3692
- element: n,
3708
+ element: c,
3693
3709
  mount: "after-buttons",
3694
3710
  shell: {
3695
3711
  title: this.name,
@@ -3702,23 +3718,23 @@ var jd = class {
3702
3718
  minHeight: 420
3703
3719
  }
3704
3720
  }],
3705
- button: o,
3721
+ button: f,
3706
3722
  sync: () => {
3707
- const c = t.isToolVisible(r);
3708
- o.active = c, o.ariaLabel = c ? "Close scientific calculator" : "Open scientific calculator", o.tooltip = c ? "Close calculator" : "Calculator", l !== c && (n.visible = c, l = c), n.toolkitCoordinator !== t.toolkitCoordinator && (n.toolkitCoordinator = t.toolkitCoordinator);
3723
+ const m = t.isToolVisible(o);
3724
+ f.active = m, f.label = n, f.ariaLabel = m ? h : d, f.tooltip = m ? `Close ${n.toLowerCase()}` : n, _ !== m && (c.visible = m, _ = m), c.toolkitCoordinator !== t.toolkitCoordinator && (c.toolkitCoordinator = t.toolkitCoordinator), Ks(c, r, i);
3709
3725
  },
3710
- subscribeActive: (c) => t.subscribeVisibility ? t.subscribeVisibility(() => {
3711
- c(t.isToolVisible(r));
3726
+ subscribeActive: (m) => t.subscribeVisibility ? t.subscribeVisibility(() => {
3727
+ m(t.isToolVisible(o));
3712
3728
  }) : () => {
3713
3729
  }
3714
3730
  };
3715
3731
  }
3716
- }, Kd = /* @__PURE__ */ new Set([
3732
+ }, Xd = /* @__PURE__ */ new Set([
3717
3733
  "reserved-row",
3718
3734
  "expanding-row",
3719
3735
  "floating-overlay",
3720
3736
  "left-aligned"
3721
- ]), qs = (e) => e && typeof e == "object" ? e : {}, Yd = (e) => e === "polly" || e === "google" || e === "server", Pe = (e, t) => e === void 0 ? t : e, Ui = (e, t = "left-aligned") => typeof e == "string" && Kd.has(e) ? e : t, ti = Object.freeze([0.8, 1.25]), Qr = (e) => {
3737
+ ]), Ys = (e) => e && typeof e == "object" ? e : {}, Qd = (e) => e === "polly" || e === "google" || e === "server", Pe = (e, t) => e === void 0 ? t : e, Ui = (e, t = "left-aligned") => typeof e == "string" && Xd.has(e) ? e : t, ti = Object.freeze([0.8, 1.25]), Qr = (e) => {
3722
3738
  if (!Array.isArray(e)) return [...ti];
3723
3739
  if (e.length === 0) return [];
3724
3740
  const t = /* @__PURE__ */ new Set();
@@ -3728,17 +3744,17 @@ var jd = class {
3728
3744
  i !== 1 && t.add(i);
3729
3745
  }
3730
3746
  return t.size ? Array.from(t) : [...ti];
3731
- }, Jn = (e) => e.join(", "), Jd = (e) => {
3747
+ }, Jn = (e) => e.join(", "), Zd = (e) => {
3732
3748
  const t = e.trim();
3733
3749
  if (!t) return [];
3734
3750
  const r = t.split(/[,;]+/).map((i) => i.trim()).filter(Boolean).map((i) => Number.parseFloat(i)).filter((i) => Number.isFinite(i));
3735
3751
  return r.length ? Qr(r) : [...ti];
3736
- }, Xd = (e) => {
3752
+ }, ef = (e) => {
3737
3753
  const t = {
3738
3754
  ...e,
3739
3755
  layoutMode: Ui(e.layoutMode)
3740
3756
  }, r = e.backend || "browser";
3741
- if (!Yd(r)) return t;
3757
+ if (!Qd(r)) return t;
3742
3758
  const i = {
3743
3759
  ...t,
3744
3760
  apiEndpoint: Pe(t.apiEndpoint, "/api/tts"),
@@ -3760,13 +3776,13 @@ var jd = class {
3760
3776
  defaultVoice: Pe(i.defaultVoice, "en-US-Wavenet-A")
3761
3777
  } : i;
3762
3778
  }, Oi = (e) => {
3763
- const t = qs(e), r = qs(e?.settings);
3764
- return Xd({
3779
+ const t = Ys(e), r = Ys(e?.settings);
3780
+ return ef({
3765
3781
  ...t,
3766
3782
  ...r
3767
3783
  });
3768
- }, vo = (e) => e.backend || "browser", pl = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, hl = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), Qd = (e) => {
3769
- const t = vo(e), r = pl(e, t), i = hl(e, r);
3784
+ }, vo = (e) => e.backend || "browser", ml = (e, t) => t === "polly" || t === "google" ? t : e.serverProvider || e.provider, gl = (e, t) => e.transportMode || (t === "custom" ? "custom" : "pie"), tf = (e) => {
3785
+ const t = vo(e), r = ml(e, t), i = gl(e, r);
3770
3786
  return {
3771
3787
  voice: e.defaultVoice,
3772
3788
  rate: e.rate,
@@ -3790,8 +3806,8 @@ var jd = class {
3790
3806
  includeAuthOnAssetFetch: e.includeAuthOnAssetFetch,
3791
3807
  validateEndpoint: e.validateEndpoint
3792
3808
  };
3793
- }, ml = (e) => Ui(e.layoutMode), Zd = (e) => {
3794
- switch (ml(e)) {
3809
+ }, _l = (e) => Ui(e.layoutMode), rf = (e) => {
3810
+ switch (_l(e)) {
3795
3811
  case "reserved-row":
3796
3812
  return {
3797
3813
  mount: "before-buttons",
@@ -3817,21 +3833,21 @@ var jd = class {
3817
3833
  }
3818
3834
  };
3819
3835
  }
3820
- }, Gr = /* @__PURE__ */ new Map(), ef = "__pieToolElementUnmount", Ks = "pie-tool-active-change", tf = {
3836
+ }, Gr = /* @__PURE__ */ new Map(), nf = "__pieToolElementUnmount", Js = "pie-tool-active-change", of = {
3821
3837
  toolId: "textToSpeech",
3822
3838
  name: "Text to Speech",
3823
3839
  description: "Read content aloud",
3824
3840
  icon: "volume-up",
3825
3841
  provider: {
3826
3842
  getProviderId: () => "tts",
3827
- createProvider: (e) => new Fd(vo(Oi(e))),
3843
+ createProvider: (e) => new Bd(vo(Oi(e))),
3828
3844
  getInitConfig: (e) => {
3829
- const t = Oi(e), r = vo(t), i = pl(t, r);
3845
+ const t = Oi(e), r = vo(t), i = ml(t, r);
3830
3846
  return {
3831
3847
  backend: r,
3832
3848
  serverProvider: i,
3833
- transportMode: hl(t, i),
3834
- ...Qd(t)
3849
+ transportMode: gl(t, i),
3850
+ ...tf(t)
3835
3851
  };
3836
3852
  },
3837
3853
  getAuthFetcher: (e) => {
@@ -3857,14 +3873,14 @@ var jd = class {
3857
3873
  return on(e);
3858
3874
  },
3859
3875
  renderToolbar(e, t) {
3860
- const r = () => Oi(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), i = () => Qr(r().speedOptions), n = () => ml(r()), o = () => Zd(r()), l = Oo(this.toolId, t.scope.level, t.scope.scopeId), c = () => {
3861
- const v = t.ui?.size;
3862
- return v === "sm" || v === "lg" ? v : "md";
3876
+ const r = () => Oi(t.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), i = () => Qr(r().speedOptions), n = () => _l(r()), o = () => rf(r()), l = Oo(this.toolId, t.scope.level, t.scope.scopeId), c = () => {
3877
+ const f = t.ui?.size;
3878
+ return f === "sm" || f === "lg" ? f : "md";
3863
3879
  }, d = () => {
3864
- let v = Gr.get(l);
3865
- return v && typeof v.isConnected == "boolean" && !v.isConnected && (Gr.delete(l), v = void 0), v || (v = document.createElement("pie-tool-tts-inline"), v[ef] = () => {
3866
- Gr.get(l) === v && Gr.delete(l);
3867
- }, Gr.set(l, v)), v.setAttribute("tool-id", l), v.setAttribute("catalog-id", t.catalogId || t.itemId), v.setAttribute("language", t.language || "en-US"), v.setAttribute("size", c()), v.setAttribute("layout-mode", n()), v.speedOptions = i(), v;
3880
+ let f = Gr.get(l);
3881
+ return f && typeof f.isConnected == "boolean" && !f.isConnected && (Gr.delete(l), f = void 0), f || (f = document.createElement("pie-tool-tts-inline"), f[nf] = () => {
3882
+ Gr.get(l) === f && Gr.delete(l);
3883
+ }, Gr.set(l, f)), f.setAttribute("tool-id", l), f.setAttribute("catalog-id", t.catalogId || t.itemId), f.setAttribute("language", t.language || "en-US"), f.setAttribute("size", c()), f.setAttribute("layout-mode", n()), f.speedOptions = i(), f;
3868
3884
  }, h = o();
3869
3885
  return {
3870
3886
  toolId: this.toolId,
@@ -3877,18 +3893,18 @@ var jd = class {
3877
3893
  showWhenToolActive: h.controlsRow.expandWhenToolActive
3878
3894
  } }
3879
3895
  }],
3880
- subscribeActive: (v) => {
3896
+ subscribeActive: (f) => {
3881
3897
  const _ = d(), m = (b) => {
3882
3898
  const k = b.detail;
3883
- v(k?.active === !0);
3899
+ f(k?.active === !0);
3884
3900
  };
3885
- return _.addEventListener(Ks, m), () => {
3886
- _.removeEventListener(Ks, m);
3901
+ return _.addEventListener(Js, m), () => {
3902
+ _.removeEventListener(Js, m);
3887
3903
  };
3888
3904
  },
3889
3905
  sync: () => {
3890
- const v = d();
3891
- v.setAttribute("tool-id", l), v.setAttribute("catalog-id", t.catalogId || t.itemId), v.setAttribute("language", t.language || "en-US"), v.setAttribute("size", c()), v.setAttribute("layout-mode", n()), v.speedOptions = i();
3906
+ const f = d();
3907
+ f.setAttribute("tool-id", l), f.setAttribute("catalog-id", t.catalogId || t.itemId), f.setAttribute("language", t.language || "en-US"), f.setAttribute("size", c()), f.setAttribute("layout-mode", n()), f.speedOptions = i();
3892
3908
  }
3893
3909
  };
3894
3910
  }
@@ -3911,7 +3927,7 @@ function _t(e) {
3911
3927
  function Lo(e, t) {
3912
3928
  e.setAttribute("data-pie-tool-surface", t);
3913
3929
  }
3914
- var rf = {
3930
+ var sf = {
3915
3931
  toolId: "ruler",
3916
3932
  name: "Ruler",
3917
3933
  description: "On-screen ruler for measurements",
@@ -3953,7 +3969,7 @@ var rf = {
3953
3969
  subscribeActive: r.subscribeActive
3954
3970
  };
3955
3971
  }
3956
- }, nf = {
3972
+ }, af = {
3957
3973
  toolId: "protractor",
3958
3974
  name: "Protractor",
3959
3975
  description: "On-screen protractor for angle measurements",
@@ -3995,7 +4011,7 @@ var rf = {
3995
4011
  subscribeActive: r.subscribeActive
3996
4012
  };
3997
4013
  }
3998
- }, of = {
4014
+ }, lf = {
3999
4015
  toolId: "answerEliminator",
4000
4016
  name: "Answer Eliminator",
4001
4017
  description: "Strike through answer choices",
@@ -4008,7 +4024,7 @@ var rf = {
4008
4024
  "choiceMasking"
4009
4025
  ],
4010
4026
  isVisibleInContext(e) {
4011
- return Od(e);
4027
+ return Cd(e);
4012
4028
  },
4013
4029
  renderToolbar(e, t) {
4014
4030
  const r = gt(this.toolId, t), i = t.componentOverrides ?? {}, n = ot(this.toolId, e, t, i);
@@ -4042,7 +4058,7 @@ var rf = {
4042
4058
  subscribeActive: r.subscribeActive
4043
4059
  };
4044
4060
  }
4045
- }, sf = {
4061
+ }, cf = {
4046
4062
  toolId: "highlighter",
4047
4063
  name: "Highlighter",
4048
4064
  description: "Highlight text",
@@ -4093,7 +4109,7 @@ var rf = {
4093
4109
  subscribeActive: r.subscribeActive
4094
4110
  };
4095
4111
  }
4096
- }, af = {
4112
+ }, uf = {
4097
4113
  toolId: "lineReader",
4098
4114
  name: "Line Reader",
4099
4115
  description: "Reading guide overlay",
@@ -4142,7 +4158,7 @@ var rf = {
4142
4158
  subscribeActive: r.subscribeActive
4143
4159
  };
4144
4160
  }
4145
- }, lf = {
4161
+ }, df = {
4146
4162
  toolId: "theme",
4147
4163
  name: "Theme",
4148
4164
  description: "Accessible themes and contrast",
@@ -4198,7 +4214,7 @@ var rf = {
4198
4214
  subscribeActive: r.subscribeActive
4199
4215
  };
4200
4216
  }
4201
- }, cf = {
4217
+ }, ff = {
4202
4218
  toolId: "annotationToolbar",
4203
4219
  name: "Highlighter",
4204
4220
  description: "Highlight and annotate text",
@@ -4249,7 +4265,7 @@ var rf = {
4249
4265
  subscribeActive: r.subscribeActive
4250
4266
  };
4251
4267
  }
4252
- }, uf = {
4268
+ }, vf = {
4253
4269
  toolId: "graph",
4254
4270
  name: "Graph",
4255
4271
  description: "Graphing calculator and coordinate plane",
@@ -4302,7 +4318,7 @@ var rf = {
4302
4318
  subscribeActive: r.subscribeActive
4303
4319
  };
4304
4320
  }
4305
- }, df = {
4321
+ }, pf = {
4306
4322
  toolId: "periodicTable",
4307
4323
  name: "Periodic Table",
4308
4324
  description: "Chemistry periodic table reference",
@@ -4314,7 +4330,7 @@ var rf = {
4314
4330
  "elementReference"
4315
4331
  ],
4316
4332
  isVisibleInContext(e) {
4317
- return Ld(e);
4333
+ return Rd(e);
4318
4334
  },
4319
4335
  renderToolbar(e, t) {
4320
4336
  const r = gt(this.toolId, t), i = {
@@ -4354,54 +4370,54 @@ var rf = {
4354
4370
  subscribeActive: r.subscribeActive
4355
4371
  };
4356
4372
  }
4357
- }, ff = [
4358
- qd,
4359
- tf,
4360
- rf,
4361
- nf,
4373
+ }, hf = [
4374
+ Jd,
4362
4375
  of,
4363
4376
  sf,
4364
4377
  af,
4365
4378
  lf,
4366
4379
  cf,
4367
4380
  uf,
4368
- df
4381
+ df,
4382
+ ff,
4383
+ vf,
4384
+ pf
4369
4385
  ];
4370
- function vf(e = {}) {
4371
- const t = new Pd(), r = {
4386
+ function mf(e = {}) {
4387
+ const t = new xd(), r = {
4372
4388
  toolTagMap: {
4373
- ...vl,
4389
+ ...hl,
4374
4390
  ...e.toolTagMap || {}
4375
4391
  },
4376
4392
  toolComponentFactory: e.toolComponentFactory,
4377
4393
  toolComponentFactories: e.toolComponentFactories
4378
4394
  }, i = (n) => e.overrides?.[n.toolId] || n;
4379
- return e.includePackagedTools && pf(t, {
4395
+ return e.includePackagedTools && gf(t, {
4380
4396
  toolIds: e.toolIds,
4381
4397
  applyOverrides: i
4382
4398
  }), e.toolModuleLoaders && Object.keys(e.toolModuleLoaders).length > 0 && t.setToolModuleLoaders(e.toolModuleLoaders), t.setComponentOverrides(r), t;
4383
4399
  }
4384
- function pf(e, t = {}) {
4400
+ function gf(e, t = {}) {
4385
4401
  const r = t.toolIds && t.toolIds.length > 0 ? new Set(t.toolIds) : null, i = t.applyOverrides || ((n) => n);
4386
- for (const n of ff)
4402
+ for (const n of hf)
4387
4403
  r && !r.has(n.toolId) || e.register(i(n));
4388
4404
  }
4389
- function hf(e = {}) {
4390
- return vf({
4405
+ function _f(e = {}) {
4406
+ return mf({
4391
4407
  ...e,
4392
4408
  includePackagedTools: !0
4393
4409
  });
4394
4410
  }
4395
- function mf() {
4396
- const e = hf(), t = /* @__PURE__ */ new Set();
4411
+ function yf() {
4412
+ const e = _f(), t = /* @__PURE__ */ new Set();
4397
4413
  for (const r of e.getAllTools()) for (const i of r.pnpSupportIds || []) t.add(i);
4398
4414
  return [...t].sort();
4399
4415
  }
4400
- var gf = mf(), Xf = {
4401
- supports: [...gf],
4416
+ var bf = yf(), ev = {
4417
+ supports: [...bf],
4402
4418
  prohibitedSupports: [],
4403
4419
  activateAtInit: []
4404
- }, _f = {
4420
+ }, wf = {
4405
4421
  visual: {
4406
4422
  magnification: "magnification",
4407
4423
  screenMagnifier: "screenMagnifier",
@@ -4514,15 +4530,15 @@ var gf = mf(), Xf = {
4514
4530
  itemGlossary: "itemGlossary",
4515
4531
  tutorialAvailable: "tutorialAvailable"
4516
4532
  }
4517
- }, Qf = Object.values(_f).flatMap((e) => Object.values(e)), Zf = cl("ToolCoordinator"), Ys;
4533
+ }, tv = Object.values(wf).flatMap((e) => Object.values(e)), rv = dl("ToolCoordinator"), Xs;
4518
4534
  (function(e) {
4519
4535
  e[e.BASE = 0] = "BASE", e[e.TOOL = 1e3] = "TOOL", e[e.MODAL = 2e3] = "MODAL", e[e.CONTROL = 3e3] = "CONTROL", e[e.HIGHLIGHT = 4e3] = "HIGHLIGHT";
4520
- })(Ys || (Ys = {}));
4521
- var Js;
4536
+ })(Xs || (Xs = {}));
4537
+ var Qs;
4522
4538
  (function(e) {
4523
4539
  e.IDLE = "idle", e.LOADING = "loading", e.PLAYING = "playing", e.PAUSED = "paused", e.ERROR = "error";
4524
- })(Js || (Js = {}));
4525
- var ev = Ad({
4540
+ })(Qs || (Qs = {}));
4541
+ var iv = Id({
4526
4542
  policy: {
4527
4543
  allowed: [],
4528
4544
  blocked: []
@@ -4533,8 +4549,8 @@ var ev = Ad({
4533
4549
  passage: []
4534
4550
  },
4535
4551
  providers: {}
4536
- }), yf = /* @__PURE__ */ ae("<button> </button>"), bf = /* @__PURE__ */ ae('<span class="loading loading-spinner loading-xs svelte-3sm1sy"></span> <span class="svelte-3sm1sy">Checking availability...</span>', 1), wf = /* @__PURE__ */ ae("<span> </span>"), Tf = /* @__PURE__ */ ae('<div class="alert alert-warning text-xs"><span> </span></div>'), kf = /* @__PURE__ */ ae("<option> </option>"), Sf = /* @__PURE__ */ ae('<fieldset class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-browser-voice">Voice</label> <select id="tts-browser-voice" class="select select-sm select-bordered w-full"><option>Default browser voice</option><!></select></div></fieldset>'), Af = /* @__PURE__ */ ae("<option> </option>"), Ef = /* @__PURE__ */ ae('<fieldset class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-endpoint">API endpoint</label> <input id="tts-polly-endpoint" class="input input-sm input-bordered w-full" placeholder="/api/tts"/></div> <div class="pie-tts-grid-3 svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-language">Language</label> <input id="tts-polly-language" class="input input-sm input-bordered w-full" placeholder="en-US"/></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-gender">Gender</label> <select id="tts-polly-gender" class="select select-sm select-bordered w-full"><option>Any</option><option>Male</option><option>Female</option><option>Neutral</option></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-engine">Engine</label> <select id="tts-polly-engine" class="select select-sm select-bordered w-full"><option>Neural</option><option>Standard</option></select></div></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-voice">Voice</label> <select id="tts-polly-voice" class="select select-sm select-bordered w-full"><option>Provider default</option><!></select></div> <div class="pie-tts-grid-3 svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-format">Format</label> <select id="tts-polly-format" class="select select-sm select-bordered w-full"><option>MP3</option><option>OGG</option><option>PCM</option></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-sample-rate">Sample rate</label> <select id="tts-polly-sample-rate" class="select select-sm select-bordered w-full"><option>8000 Hz</option><option>16000 Hz</option><option>22050 Hz</option><option>24000 Hz</option></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-speech-marks">Speech marks</label> <select id="tts-polly-speech-marks" class="select select-sm select-bordered w-full"><option>Word</option><option>Word + sentence</option></select></div></div></fieldset>'), If = /* @__PURE__ */ ae("<option> </option>"), $f = /* @__PURE__ */ ae('<fieldset class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-endpoint">API endpoint</label> <input id="tts-google-endpoint" class="input input-sm input-bordered w-full" placeholder="/api/tts"/></div> <div class="pie-tts-grid-3 svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-language">Language</label> <input id="tts-google-language" class="input input-sm input-bordered w-full" placeholder="en-US"/></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-gender">Gender</label> <select id="tts-google-gender" class="select select-sm select-bordered w-full"><option>Any</option><option>Male</option><option>Female</option><option>Neutral</option></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-voice-type">Voice type</label> <select id="tts-google-voice-type" class="select select-sm select-bordered w-full"><option>WaveNet</option><option>Studio</option><option>Standard</option></select></div></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-voice">Voice</label> <select id="tts-google-voice" class="select select-sm select-bordered w-full"><option>Provider default</option><!></select></div></fieldset>'), Pf = /* @__PURE__ */ ae('<div class="text-xs opacity-75"> </div>'), Mf = /* @__PURE__ */ ae('<div class="text-xs opacity-75">This provider uses adapter mode. Configure provider state from your host app via\n `customProviders`.</div>'), xf = /* @__PURE__ */ ae('<fieldset class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-custom-provider-header svelte-3sm1sy"><div class="text-sm font-semibold"> </div> <!></div> <!></fieldset>'), Of = /* @__PURE__ */ ae("<span> </span>"), Lf = /* @__PURE__ */ ae('<div class="alert alert-success text-xs"><span> </span></div>'), Cf = /* @__PURE__ */ ae('<div class="alert alert-error text-xs"><span> </span></div>'), Rf = /* @__PURE__ */ ae('<div class="alert alert-error text-xs"><span> </span></div>'), Nf = /* @__PURE__ */ ae('<div class="alert alert-info text-xs"><span> </span></div>'), jf = /* @__PURE__ */ ae(`<div class="pie-tts-dialog-backdrop svelte-3sm1sy"><div class="pie-tts-dialog svelte-3sm1sy" role="dialog" aria-modal="true" aria-labelledby="pie-tts-dialog-title" tabindex="-1"><div class="pie-tts-dialog-header svelte-3sm1sy"><h3 id="pie-tts-dialog-title" class="pie-tts-dialog-title svelte-3sm1sy">TTS settings</h3> <button class="btn btn-xs btn-ghost btn-circle" type="button" aria-label="Close TTS settings"><svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <div class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-layout-mode">Toolbar layout mode</label> <select id="tts-layout-mode" class="select select-sm select-bordered w-full"><option>Reserved row</option><option>Expanding row</option><option>Floating overlay</option><option>Left-aligned controls</option></select> <div class="text-xs opacity-75"> </div></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-inline-speed-options">Inline speed buttons</label> <input id="tts-inline-speed-options" class="input input-sm input-bordered w-full" placeholder="0.8, 1.25" autocomplete="off"/> <div class="mt-1 flex flex-wrap items-center gap-2"><span class="text-xs opacity-75">Comma or semicolon-separated multipliers (1× is not shown as a button). Leave empty to
4537
- hide speed buttons.</span> <button type="button" class="btn btn-xs btn-ghost">Reset to defaults</button></div></div></div> <div class="join pie-tts-tabs svelte-3sm1sy"></div> <div class="pie-tts-status svelte-3sm1sy"><!> <button class="btn btn-xs btn-outline">Recheck</button></div> <!> <!> <div class="pie-tts-fieldset pie-tts-preview-block fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-preview-header svelte-3sm1sy"><h4 class="pie-tts-preview-title svelte-3sm1sy">Preview</h4> <div class="join"><button type="button">Plain text</button> <button type="button">SSML</button></div></div> <label class="pie-tts-label svelte-3sm1sy" for="tts-preview-text">Sample text</label> <textarea id="tts-preview-text" class="textarea textarea-sm textarea-bordered w-full pie-tts-preview-input svelte-3sm1sy"></textarea> <div class="pie-tts-preview-row svelte-3sm1sy"><button type="button" class="btn btn-xs btn-outline">Reset sample</button> <span class="text-xs opacity-70"><!></span></div> <div class="pie-tts-preview-track svelte-3sm1sy" aria-live="polite"></div></div> <!> <!> <!> <!> <div class="pie-tts-actions svelte-3sm1sy"><button class="btn btn-sm btn-outline">Close</button> <button class="btn btn-sm btn-outline"> </button> <button class="btn btn-sm btn-primary"> </button></div></div></div>`), Vf = {
4552
+ }), Tf = /* @__PURE__ */ ae("<button> </button>"), kf = /* @__PURE__ */ ae('<span class="loading loading-spinner loading-xs svelte-3sm1sy"></span> <span class="svelte-3sm1sy">Checking availability...</span>', 1), Sf = /* @__PURE__ */ ae("<span> </span>"), Af = /* @__PURE__ */ ae('<div class="alert alert-warning text-xs"><span> </span></div>'), Ef = /* @__PURE__ */ ae("<option> </option>"), If = /* @__PURE__ */ ae('<fieldset class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-browser-voice">Voice</label> <select id="tts-browser-voice" class="select select-sm select-bordered w-full"><option>Default browser voice</option><!></select></div></fieldset>'), $f = /* @__PURE__ */ ae("<option> </option>"), Pf = /* @__PURE__ */ ae('<fieldset class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-endpoint">API endpoint</label> <input id="tts-polly-endpoint" class="input input-sm input-bordered w-full" placeholder="/api/tts"/></div> <div class="pie-tts-grid-3 svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-language">Language</label> <input id="tts-polly-language" class="input input-sm input-bordered w-full" placeholder="en-US"/></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-gender">Gender</label> <select id="tts-polly-gender" class="select select-sm select-bordered w-full"><option>Any</option><option>Male</option><option>Female</option><option>Neutral</option></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-engine">Engine</label> <select id="tts-polly-engine" class="select select-sm select-bordered w-full"><option>Neural</option><option>Standard</option></select></div></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-voice">Voice</label> <select id="tts-polly-voice" class="select select-sm select-bordered w-full"><option>Provider default</option><!></select></div> <div class="pie-tts-grid-3 svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-format">Format</label> <select id="tts-polly-format" class="select select-sm select-bordered w-full"><option>MP3</option><option>OGG</option><option>PCM</option></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-sample-rate">Sample rate</label> <select id="tts-polly-sample-rate" class="select select-sm select-bordered w-full"><option>8000 Hz</option><option>16000 Hz</option><option>22050 Hz</option><option>24000 Hz</option></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-polly-speech-marks">Speech marks</label> <select id="tts-polly-speech-marks" class="select select-sm select-bordered w-full"><option>Word</option><option>Word + sentence</option></select></div></div></fieldset>'), Mf = /* @__PURE__ */ ae("<option> </option>"), xf = /* @__PURE__ */ ae('<fieldset class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-endpoint">API endpoint</label> <input id="tts-google-endpoint" class="input input-sm input-bordered w-full" placeholder="/api/tts"/></div> <div class="pie-tts-grid-3 svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-language">Language</label> <input id="tts-google-language" class="input input-sm input-bordered w-full" placeholder="en-US"/></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-gender">Gender</label> <select id="tts-google-gender" class="select select-sm select-bordered w-full"><option>Any</option><option>Male</option><option>Female</option><option>Neutral</option></select></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-voice-type">Voice type</label> <select id="tts-google-voice-type" class="select select-sm select-bordered w-full"><option>WaveNet</option><option>Studio</option><option>Standard</option></select></div></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-google-voice">Voice</label> <select id="tts-google-voice" class="select select-sm select-bordered w-full"><option>Provider default</option><!></select></div></fieldset>'), Of = /* @__PURE__ */ ae('<div class="text-xs opacity-75"> </div>'), Lf = /* @__PURE__ */ ae('<div class="text-xs opacity-75">This provider uses adapter mode. Configure provider state from your host app via\n `customProviders`.</div>'), Cf = /* @__PURE__ */ ae('<fieldset class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-custom-provider-header svelte-3sm1sy"><div class="text-sm font-semibold"> </div> <!></div> <!></fieldset>'), Rf = /* @__PURE__ */ ae("<span> </span>"), Nf = /* @__PURE__ */ ae('<div class="alert alert-success text-xs"><span> </span></div>'), jf = /* @__PURE__ */ ae('<div class="alert alert-error text-xs"><span> </span></div>'), zf = /* @__PURE__ */ ae('<div class="alert alert-error text-xs"><span> </span></div>'), Vf = /* @__PURE__ */ ae('<div class="alert alert-info text-xs"><span> </span></div>'), Df = /* @__PURE__ */ ae(`<div class="pie-tts-dialog-backdrop svelte-3sm1sy"><div class="pie-tts-dialog svelte-3sm1sy" role="dialog" aria-modal="true" aria-labelledby="pie-tts-dialog-title" tabindex="-1"><div class="pie-tts-dialog-header svelte-3sm1sy"><h3 id="pie-tts-dialog-title" class="pie-tts-dialog-title svelte-3sm1sy">TTS settings</h3> <button class="btn btn-xs btn-ghost btn-circle" type="button" aria-label="Close TTS settings"><svg xmlns="http://www.w3.org/2000/svg" class="h-3 w-3" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div> <div class="pie-tts-fieldset fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-layout-mode">Toolbar layout mode</label> <select id="tts-layout-mode" class="select select-sm select-bordered w-full"><option>Reserved row</option><option>Expanding row</option><option>Floating overlay</option><option>Left-aligned controls</option></select> <div class="text-xs opacity-75"> </div></div> <div class="pie-tts-field svelte-3sm1sy"><label class="pie-tts-label svelte-3sm1sy" for="tts-inline-speed-options">Inline speed buttons</label> <input id="tts-inline-speed-options" class="input input-sm input-bordered w-full" placeholder="0.8, 1.25" autocomplete="off"/> <div class="mt-1 flex flex-wrap items-center gap-2"><span class="text-xs opacity-75">Comma or semicolon-separated multipliers (1× is not shown as a button). Leave empty to
4553
+ hide speed buttons.</span> <button type="button" class="btn btn-xs btn-ghost">Reset to defaults</button></div></div></div> <div class="join pie-tts-tabs svelte-3sm1sy"></div> <div class="pie-tts-status svelte-3sm1sy"><!> <button class="btn btn-xs btn-outline">Recheck</button></div> <!> <!> <div class="pie-tts-fieldset pie-tts-preview-block fieldset bg-base-200 border border-base-300 rounded-box svelte-3sm1sy"><div class="pie-tts-preview-header svelte-3sm1sy"><h4 class="pie-tts-preview-title svelte-3sm1sy">Preview</h4> <div class="join"><button type="button">Plain text</button> <button type="button">SSML</button></div></div> <label class="pie-tts-label svelte-3sm1sy" for="tts-preview-text">Sample text</label> <textarea id="tts-preview-text" class="textarea textarea-sm textarea-bordered w-full pie-tts-preview-input svelte-3sm1sy"></textarea> <div class="pie-tts-preview-row svelte-3sm1sy"><button type="button" class="btn btn-xs btn-outline">Reset sample</button> <span class="text-xs opacity-70"><!></span></div> <div class="pie-tts-preview-track svelte-3sm1sy" aria-live="polite"></div></div> <!> <!> <!> <!> <div class="pie-tts-actions svelte-3sm1sy"><button class="btn btn-sm btn-outline">Close</button> <button class="btn btn-sm btn-outline"> </button> <button class="btn btn-sm btn-primary"> </button></div></div></div>`), Ff = {
4538
4554
  hash: "svelte-3sm1sy",
4539
4555
  code: `.pie-tts-dialog-backdrop.svelte-3sm1sy {position:fixed;inset:0;background:color-mix(in srgb, #000 30%, transparent);display:flex;align-items:center;justify-content:center;padding:1rem;}.pie-tts-dialog.svelte-3sm1sy {width:min(720px, calc(100vw - 2rem));max-height:calc(100vh - 2rem);overflow:auto;background:var(--color-base-100);border:1px solid var(--color-base-300);border-radius:0.75rem;box-shadow:0 24px 48px rgba(0, 0, 0, 0.22);padding:0.75rem;display:flex;flex-direction:column;gap:0.5rem;}.pie-tts-dialog-header.svelte-3sm1sy {display:flex;align-items:center;justify-content:space-between;}.pie-tts-dialog-title.svelte-3sm1sy {margin:0;font-size:0.95rem;font-weight:700;}.pie-tts-tabs.svelte-3sm1sy {width:100%;max-width:100%;flex-wrap:wrap;row-gap:0.25rem;}.pie-tts-status.svelte-3sm1sy {display:flex;align-items:flex-start;gap:0.5rem;justify-content:space-between;}.pie-tts-status.svelte-3sm1sy > span:where(.svelte-3sm1sy):not(.loading) {flex:1;min-width:0;font-size:0.75rem;line-height:1.35;}.pie-tts-ok.svelte-3sm1sy {color:var(--color-success);}.pie-tts-error.svelte-3sm1sy {color:var(--color-error);}.pie-tts-actions.svelte-3sm1sy {display:flex;justify-content:flex-end;gap:0.5rem;}.pie-tts-fieldset.svelte-3sm1sy {padding:0.5rem 0.65rem;display:flex;flex-direction:column;gap:0.45rem;}.pie-tts-field.svelte-3sm1sy {display:flex;flex-direction:column;gap:0.15rem;min-width:0;}.pie-tts-label.svelte-3sm1sy {display:block;font-size:0.7rem;font-weight:600;line-height:1.2;opacity:0.85;padding:0;}.pie-tts-grid-3.svelte-3sm1sy {display:grid;grid-template-columns:repeat(3, minmax(0, 1fr));gap:0.45rem 0.65rem;align-items:end;}
4540
4556
 
@@ -4542,10 +4558,10 @@ var ev = Ad({
4542
4558
  }.pie-tts-range.svelte-3sm1sy {--range-thumb-size: 0.85rem;height:1.35rem;min-height:1.35rem;}.pie-tts-range-value.svelte-3sm1sy {font-size:0.65rem;line-height:1.2;opacity:0.7;margin-top:-0.1rem;}.pie-tts-preview-block.svelte-3sm1sy {gap:0.35rem;}.pie-tts-custom-provider-header.svelte-3sm1sy {display:flex;flex-direction:column;gap:0.2rem;margin-bottom:0.25rem;}.pie-tts-custom-provider-element.svelte-3sm1sy {display:block;width:100%;}.pie-tts-preview-header.svelte-3sm1sy {display:flex;align-items:center;justify-content:space-between;gap:0.5rem;}.pie-tts-preview-title.svelte-3sm1sy {margin:0;font-size:0.85rem;font-weight:700;}.pie-tts-preview-input.svelte-3sm1sy {min-height:4.25rem;font-family:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono",
4543
4559
  "Courier New", monospace;}.pie-tts-preview-row.svelte-3sm1sy {display:flex;align-items:center;justify-content:space-between;gap:0.5rem;}.pie-tts-preview-track.svelte-3sm1sy {margin-top:0.15rem;border:1px dashed var(--color-base-300);border-radius:0.5rem;padding:0.4rem 0.5rem;min-height:2.6rem;white-space:pre-wrap;font-size:0.75rem;line-height:1.4;}.pie-tts-preview-active.svelte-3sm1sy {background:color-mix(in srgb, var(--color-warning) 40%, transparent);border-radius:0.15rem;}`
4544
4560
  };
4545
- function zf(e, t) {
4546
- na(t, !0), id(e, Vf);
4547
- const r = Ju(), i = "/api/tts", n = "pie:section-player-tools:tts-settings";
4548
- let o = Hr(t, "toolkitCoordinator", 7, null), l = Hr(t, "apiEndpoint", 7, "/api/tts"), c = Hr(t, "storageKey", 7, n), d = Hr(t, "adapters", 23, () => ({})), h = Hr(t, "customProviders", 23, () => []), v = /* @__PURE__ */ C("browser"), _ = /* @__PURE__ */ C(null), m = /* @__PURE__ */ C(null), b = /* @__PURE__ */ C(!1), k = /* @__PURE__ */ C(!1), E = /* @__PURE__ */ C(null), w = /* @__PURE__ */ C(null), S = /* @__PURE__ */ C("plain"), O = /* @__PURE__ */ C(""), D = /* @__PURE__ */ C(null), P = /* @__PURE__ */ C(-1), U = /* @__PURE__ */ C(0), q = /* @__PURE__ */ C(Oe({})), te = /* @__PURE__ */ C(Oe({})), K = /* @__PURE__ */ C(Oe({})), ye = /* @__PURE__ */ C(""), ie = /* @__PURE__ */ C(1), Er = /* @__PURE__ */ C(1), je = /* @__PURE__ */ C("left-aligned"), Lt = /* @__PURE__ */ C(""), Ct = /* @__PURE__ */ C(""), yt = /* @__PURE__ */ C("en-US"), Ir = /* @__PURE__ */ C(""), Ke = /* @__PURE__ */ C("neural"), sr = /* @__PURE__ */ C(24e3), ar = /* @__PURE__ */ C("mp3"), $r = /* @__PURE__ */ C("word"), st = /* @__PURE__ */ C(""), sn = /* @__PURE__ */ C(1), Rt = /* @__PURE__ */ C(""), bt = /* @__PURE__ */ C("en-US"), Nt = /* @__PURE__ */ C(""), jt = /* @__PURE__ */ C("wavenet"), at = /* @__PURE__ */ C(""), an = /* @__PURE__ */ C(1), Vt = /* @__PURE__ */ C(Oe({
4561
+ function Wf(e, t) {
4562
+ sa(t, !0), od(e, Ff);
4563
+ const r = Qu(), i = "/api/tts", n = "pie:section-player-tools:tts-settings";
4564
+ let o = Hr(t, "toolkitCoordinator", 7, null), l = Hr(t, "apiEndpoint", 7, "/api/tts"), c = Hr(t, "storageKey", 7, n), d = Hr(t, "adapters", 23, () => ({})), h = Hr(t, "customProviders", 23, () => []), f = /* @__PURE__ */ C("browser"), _ = /* @__PURE__ */ C(null), m = /* @__PURE__ */ C(null), b = /* @__PURE__ */ C(!1), k = /* @__PURE__ */ C(!1), E = /* @__PURE__ */ C(null), w = /* @__PURE__ */ C(null), S = /* @__PURE__ */ C("plain"), O = /* @__PURE__ */ C(""), D = /* @__PURE__ */ C(null), P = /* @__PURE__ */ C(-1), U = /* @__PURE__ */ C(0), q = /* @__PURE__ */ C(Oe({})), te = /* @__PURE__ */ C(Oe({})), K = /* @__PURE__ */ C(Oe({})), ye = /* @__PURE__ */ C(""), ie = /* @__PURE__ */ C(1), Er = /* @__PURE__ */ C(1), je = /* @__PURE__ */ C("left-aligned"), Lt = /* @__PURE__ */ C(""), Ct = /* @__PURE__ */ C(""), yt = /* @__PURE__ */ C("en-US"), Ir = /* @__PURE__ */ C(""), Ke = /* @__PURE__ */ C("neural"), sr = /* @__PURE__ */ C(24e3), ar = /* @__PURE__ */ C("mp3"), $r = /* @__PURE__ */ C("word"), st = /* @__PURE__ */ C(""), sn = /* @__PURE__ */ C(1), Rt = /* @__PURE__ */ C(""), bt = /* @__PURE__ */ C("en-US"), Nt = /* @__PURE__ */ C(""), jt = /* @__PURE__ */ C("wavenet"), at = /* @__PURE__ */ C(""), an = /* @__PURE__ */ C(1), zt = /* @__PURE__ */ C(Oe({
4549
4565
  checked: !1,
4550
4566
  loading: !1,
4551
4567
  available: !1,
@@ -4567,20 +4583,20 @@ function zf(e, t) {
4567
4583
  detail: null,
4568
4584
  voices: []
4569
4585
  })), Tt = null, le = null, ai = 0, ln = /* @__PURE__ */ C(null), li = /* @__PURE__ */ C(null), ci = /* @__PURE__ */ C(null), lr = null;
4570
- function gl(a, u = {}) {
4571
- const f = () => Array.from(a.querySelectorAll("button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])")).filter((M) => M.offsetParent !== null || M.getClientRects().length > 0), g = document.activeElement, T = (M) => {
4586
+ function yl(a, u = {}) {
4587
+ const v = () => Array.from(a.querySelectorAll("button:not([disabled]), [href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])")).filter((M) => M.offsetParent !== null || M.getClientRects().length > 0), g = document.activeElement, T = (M) => {
4572
4588
  if (M.key === "Escape") {
4573
4589
  u.onEscape?.();
4574
4590
  return;
4575
4591
  }
4576
4592
  if (M.key !== "Tab") return;
4577
- const L = f();
4593
+ const L = v();
4578
4594
  if (!L.length) return;
4579
4595
  const R = document.activeElement, F = L.indexOf(R || L[0]);
4580
4596
  M.shiftKey && F <= 0 ? (M.preventDefault(), L[L.length - 1].focus()) : !M.shiftKey && F === L.length - 1 && (M.preventDefault(), L[0].focus());
4581
4597
  };
4582
4598
  return a.addEventListener("keydown", T), queueMicrotask(() => {
4583
- (u.initialFocus || f()[0] || a)?.focus?.();
4599
+ (u.initialFocus || v()[0] || a)?.focus?.();
4584
4600
  }), () => {
4585
4601
  a.removeEventListener("keydown", T), g?.focus?.();
4586
4602
  };
@@ -4589,14 +4605,14 @@ function zf(e, t) {
4589
4605
  browser: "This is a browser voice sample. You should hear clear playback and see tracking updates.",
4590
4606
  polly: "This is an AWS Polly voice sample. You should hear this text and see tracking updates.",
4591
4607
  google: "This is a Google Cloud TTS voice sample. You should hear this text and see tracking updates."
4592
- }, _l = {
4608
+ }, bl = {
4593
4609
  polly: '<speak>This is an AWS Polly SSML sample. <break time="300ms"/> The voice should honor this markup.</speak>',
4594
4610
  google: '<speak>This is a <prosody rate="95%">Google Cloud SSML sample</prosody>. <break time="250ms"/> The preview preserves authored SSML.</speak>'
4595
- }, yl = [
4611
+ }, wl = [
4596
4612
  "browser",
4597
4613
  "polly",
4598
4614
  "google"
4599
- ], Ro = "[pie-tts-preview]", bl = [
4615
+ ], Ro = "[pie-tts-preview]", Tl = [
4600
4616
  "reserved-row",
4601
4617
  "expanding-row",
4602
4618
  "floating-overlay",
@@ -4611,21 +4627,21 @@ function zf(e, t) {
4611
4627
  console.debug(`${Ro} ${a}`);
4612
4628
  }
4613
4629
  }
4614
- function wl(a) {
4615
- return bl.includes(a) ? a : "left-aligned";
4630
+ function kl(a) {
4631
+ return Tl.includes(a) ? a : "left-aligned";
4616
4632
  }
4617
- function Tl() {
4633
+ function Sl() {
4618
4634
  y(Lt, Jn([...ti]), !0);
4619
4635
  }
4620
4636
  const Mr = /* @__PURE__ */ At(() => {
4621
- const a = new Set(yl), u = [], f = /* @__PURE__ */ new Set();
4637
+ const a = new Set(wl), u = [], v = /* @__PURE__ */ new Set();
4622
4638
  for (const g of h() || []) {
4623
4639
  if (!g || typeof g != "object") continue;
4624
4640
  const T = String(g.id || "").trim();
4625
- !T || a.has(T) || f.has(T) || (f.add(T), u.push(g));
4641
+ !T || a.has(T) || v.has(T) || (v.add(T), u.push(g));
4626
4642
  }
4627
4643
  return u;
4628
- }), kl = /* @__PURE__ */ At(() => [
4644
+ }), Al = /* @__PURE__ */ At(() => [
4629
4645
  {
4630
4646
  id: "browser",
4631
4647
  label: "Browser"
@@ -4642,7 +4658,7 @@ function zf(e, t) {
4642
4658
  id: a.id,
4643
4659
  label: a.label
4644
4660
  }))
4645
- ]), Se = /* @__PURE__ */ At(() => s(Mr).find((a) => a.id === s(v)) || null);
4661
+ ]), Se = /* @__PURE__ */ At(() => s(Mr).find((a) => a.id === s(f)) || null);
4646
4662
  function ui() {
4647
4663
  r("close");
4648
4664
  }
@@ -4670,12 +4686,12 @@ function zf(e, t) {
4670
4686
  };
4671
4687
  }
4672
4688
  function un(a) {
4673
- const u = s(Mr).find((f) => f.id === a);
4689
+ const u = s(Mr).find((v) => v.id === a);
4674
4690
  if (!u) throw new Error(`Custom provider '${a}' is not registered.`);
4675
4691
  return u;
4676
4692
  }
4677
- async function Sl(a) {
4678
- const u = un(a), f = {
4693
+ async function El(a) {
4694
+ const u = un(a), v = {
4679
4695
  checked: !0,
4680
4696
  loading: !0,
4681
4697
  available: !1,
@@ -4685,7 +4701,7 @@ function zf(e, t) {
4685
4701
  };
4686
4702
  y(K, {
4687
4703
  ...s(K),
4688
- [u.id]: f
4704
+ [u.id]: v
4689
4705
  }, !0);
4690
4706
  try {
4691
4707
  const g = await u.checkAvailability?.(cn(u.id));
@@ -4711,27 +4727,27 @@ function zf(e, t) {
4711
4727
  }
4712
4728
  }
4713
4729
  function jo(a, u) {
4714
- const f = s(q)[a] || {};
4730
+ const v = s(q)[a] || {};
4715
4731
  y(q, {
4716
4732
  ...s(q),
4717
4733
  [a]: {
4718
- ...f,
4734
+ ...v,
4719
4735
  ...u
4720
4736
  }
4721
4737
  }, !0);
4722
4738
  }
4723
- function Al(a, u) {
4724
- const f = u?.detail || {};
4725
- !f.state || typeof f.state != "object" || jo(a, f.state);
4739
+ function Il(a, u) {
4740
+ const v = u?.detail || {};
4741
+ !v.state || typeof v.state != "object" || jo(a, v.state);
4726
4742
  }
4727
- function El(a, u) {
4728
- const f = u?.detail || {};
4743
+ function $l(a, u) {
4744
+ const v = u?.detail || {};
4729
4745
  y(K, {
4730
4746
  ...s(K),
4731
- [a]: No(f)
4747
+ [a]: No(v)
4732
4748
  }, !0);
4733
4749
  }
4734
- function Il(a) {
4750
+ function Pl(a) {
4735
4751
  return {
4736
4752
  toolkitCoordinator: o(),
4737
4753
  apiEndpoint: Ye(),
@@ -4739,15 +4755,15 @@ function zf(e, t) {
4739
4755
  ...a.componentProps || {}
4740
4756
  };
4741
4757
  }
4742
- async function $l(a, u) {
4743
- const f = u?.detail || {};
4744
- !f || typeof f != "object" || !f.config || (y(te, {
4758
+ async function Ml(a, u) {
4759
+ const v = u?.detail || {};
4760
+ !v || typeof v != "object" || !v.config || (y(te, {
4745
4761
  ...s(te),
4746
- [a]: f
4762
+ [a]: v
4747
4763
  }, !0), await Jo());
4748
4764
  }
4749
- async function Pl(a) {
4750
- s(v) !== a && Bo(a), await Yo();
4765
+ async function xl(a) {
4766
+ s(f) !== a && Bo(a), await Yo();
4751
4767
  }
4752
4768
  function cr(a) {
4753
4769
  const u = Number(a);
@@ -4763,37 +4779,37 @@ function zf(e, t) {
4763
4779
  16e3,
4764
4780
  22050,
4765
4781
  24e3
4766
- ], f = Number(a);
4767
- return Number.isFinite(f) && u.includes(f) ? f : 24e3;
4782
+ ], v = Number(a);
4783
+ return Number.isFinite(v) && u.includes(v) ? v : 24e3;
4768
4784
  }
4769
- function Vo() {
4785
+ function zo() {
4770
4786
  return s($r) === "word+sentence" ? ["word", "sentence"] : ["word"];
4771
4787
  }
4772
- function zo() {
4788
+ function Vo() {
4773
4789
  return String(c() || "").trim() || n;
4774
4790
  }
4775
- function Ml() {
4776
- const a = o()?.getToolConfig?.("textToSpeech") || {}, u = Ol(), f = u ? {
4791
+ function Ol() {
4792
+ const a = o()?.getToolConfig?.("textToSpeech") || {}, u = Cl(), v = u ? {
4777
4793
  ...a,
4778
4794
  ...u
4779
- } : a, g = Ye(), T = f?.backend;
4780
- typeof T == "string" && T.trim().length > 0 && y(v, T, !0);
4781
- const M = typeof f?.defaultVoice == "string" ? f.defaultVoice : "", L = cr(Number(f?.rate ?? 1)), R = dn(Number(f?.pitch ?? 1)), F = typeof f?.apiEndpoint == "string" && f.apiEndpoint.trim().length > 0 ? f.apiEndpoint : g, j = T === "polly" ? F : g, V = T === "google" ? F : g, Z = typeof f?.language == "string" && f.language.trim().length > 0 ? f.language : "en-US", oe = f?.engine === "standard" ? "standard" : f?.engine === "neural" ? "neural" : f?.quality === "standard" ? "standard" : "neural", W = f?.providerOptions || {};
4782
- y(je, wl(f?.layoutMode), !0);
4783
- const X = Oi(f && typeof f == "object" ? f : void 0);
4795
+ } : a, g = Ye(), T = v?.backend;
4796
+ typeof T == "string" && T.trim().length > 0 && y(f, T, !0);
4797
+ const M = typeof v?.defaultVoice == "string" ? v.defaultVoice : "", L = cr(Number(v?.rate ?? 1)), R = dn(Number(v?.pitch ?? 1)), F = typeof v?.apiEndpoint == "string" && v.apiEndpoint.trim().length > 0 ? v.apiEndpoint : g, j = T === "polly" ? F : g, z = T === "google" ? F : g, Z = typeof v?.language == "string" && v.language.trim().length > 0 ? v.language : "en-US", oe = v?.engine === "standard" ? "standard" : v?.engine === "neural" ? "neural" : v?.quality === "standard" ? "standard" : "neural", W = v?.providerOptions || {};
4798
+ y(je, kl(v?.layoutMode), !0);
4799
+ const X = Oi(v && typeof v == "object" ? v : void 0);
4784
4800
  X.speedOptions === void 0 ? y(Lt, Jn([...ti]), !0) : Array.isArray(X.speedOptions) && X.speedOptions.length === 0 ? y(Lt, "") : y(Lt, Jn(Qr(X.speedOptions)), !0);
4785
- const Ae = di(Number(f?.sampleRate ?? W.sampleRate ?? 24e3)), be = f?.format === "ogg" || f?.format === "pcm" || f?.format === "mp3" ? f.format : W.format === "ogg" || W.format === "pcm" || W.format === "mp3" ? W.format : "mp3", St = (Array.isArray(W.speechMarkTypes) ? W.speechMarkTypes : []).includes("sentence") || f?.speechMarksMode === "word+sentence" ? "word+sentence" : "word";
4786
- if (y(ye, T === "browser" ? M : "", !0), y(ie, L, !0), y(Er, R, !0), y(Ct, j, !0), y(yt, Z, !0), y(Ke, oe, !0), y(sr, Ae, !0), y(ar, be, !0), y($r, St, !0), y(st, T === "polly" ? M : "", !0), y(sn, L, !0), y(Rt, V, !0), y(bt, Z, !0), y(Nt, typeof f?.googleGender == "string" ? f.googleGender : "", !0), y(jt, f?.googleVoiceType === "standard" || f?.googleVoiceType === "studio" || f?.googleVoiceType === "wavenet" ? f.googleVoiceType : "wavenet", !0), y(at, T === "google" ? M : "", !0), y(an, L, !0), !ct(s(v))) {
4801
+ const Ae = di(Number(v?.sampleRate ?? W.sampleRate ?? 24e3)), be = v?.format === "ogg" || v?.format === "pcm" || v?.format === "mp3" ? v.format : W.format === "ogg" || W.format === "pcm" || W.format === "mp3" ? W.format : "mp3", St = (Array.isArray(W.speechMarkTypes) ? W.speechMarkTypes : []).includes("sentence") || v?.speechMarksMode === "word+sentence" ? "word+sentence" : "word";
4802
+ if (y(ye, T === "browser" ? M : "", !0), y(ie, L, !0), y(Er, R, !0), y(Ct, j, !0), y(yt, Z, !0), y(Ke, oe, !0), y(sr, Ae, !0), y(ar, be, !0), y($r, St, !0), y(st, T === "polly" ? M : "", !0), y(sn, L, !0), y(Rt, z, !0), y(bt, Z, !0), y(Nt, typeof v?.googleGender == "string" ? v.googleGender : "", !0), y(jt, v?.googleVoiceType === "standard" || v?.googleVoiceType === "studio" || v?.googleVoiceType === "wavenet" ? v.googleVoiceType : "wavenet", !0), y(at, T === "google" ? M : "", !0), y(an, L, !0), !ct(s(f))) {
4787
4803
  const ut = W && typeof W == "object" ? W : {};
4788
- Object.keys(ut).length > 0 && jo(s(v), ut);
4804
+ Object.keys(ut).length > 0 && jo(s(f), ut);
4789
4805
  }
4790
4806
  vi();
4791
4807
  }
4792
- const xl = /* @__PURE__ */ At(() => s(je) === "reserved-row");
4808
+ const Ll = /* @__PURE__ */ At(() => s(je) === "reserved-row");
4793
4809
  function fn(a, u) {
4794
- const f = Object.keys(a), g = Object.keys(u);
4795
- if (f.length !== g.length) return !1;
4796
- for (const T of f)
4810
+ const v = Object.keys(a), g = Object.keys(u);
4811
+ if (v.length !== g.length) return !1;
4812
+ for (const T of v)
4797
4813
  if (!(T in u) || a[T] !== u[T]) return !1;
4798
4814
  return !0;
4799
4815
  }
@@ -4808,13 +4824,13 @@ function zf(e, t) {
4808
4824
  detail: null,
4809
4825
  voices: []
4810
4826
  };
4811
- const f = Object.fromEntries(Object.entries(s(te)).filter(([g]) => !!a[g]));
4812
- fn(s(q), a) || y(q, a, !0), fn(s(K), u) || y(K, u, !0), fn(s(te), f) || y(te, f, !0), !ct(s(v)) && !a[s(v)] && y(v, "browser");
4827
+ const v = Object.fromEntries(Object.entries(s(te)).filter(([g]) => !!a[g]));
4828
+ fn(s(q), a) || y(q, a, !0), fn(s(K), u) || y(K, u, !0), fn(s(te), v) || y(te, v, !0), !ct(s(f)) && !a[s(f)] && y(f, "browser");
4813
4829
  }
4814
- function Ol() {
4830
+ function Cl() {
4815
4831
  if (typeof window > "u") return null;
4816
4832
  try {
4817
- const a = window.localStorage.getItem(zo());
4833
+ const a = window.localStorage.getItem(Vo());
4818
4834
  if (!a) return null;
4819
4835
  const u = JSON.parse(a);
4820
4836
  return !u || typeof u != "object" ? null : u;
@@ -4825,13 +4841,13 @@ function zf(e, t) {
4825
4841
  function fi(a) {
4826
4842
  if (!(typeof window > "u"))
4827
4843
  try {
4828
- window.localStorage.setItem(zo(), JSON.stringify(a));
4844
+ window.localStorage.setItem(Vo(), JSON.stringify(a));
4829
4845
  } catch {
4830
4846
  }
4831
4847
  }
4832
- async function Ll() {
4833
- y(Vt, {
4834
- ...s(Vt),
4848
+ async function Rl() {
4849
+ y(zt, {
4850
+ ...s(zt),
4835
4851
  checked: !0,
4836
4852
  loading: !0,
4837
4853
  message: null,
@@ -4850,21 +4866,21 @@ function zf(e, t) {
4850
4866
  window.clearTimeout(L), M();
4851
4867
  }, { once: !0 });
4852
4868
  }), u = a.getVoices());
4853
- const f = u.map((g) => ({
4869
+ const v = u.map((g) => ({
4854
4870
  id: g.voiceURI || g.name,
4855
4871
  name: g.name,
4856
4872
  languageCode: g.lang
4857
4873
  }));
4858
- s(ye) && (f.some((g) => (g.name || "") === s(ye)) || y(ye, "")), y(Vt, {
4874
+ s(ye) && (v.some((g) => (g.name || "") === s(ye)) || y(ye, "")), y(zt, {
4859
4875
  checked: !0,
4860
4876
  loading: !1,
4861
4877
  available: !0,
4862
4878
  message: u.length ? `Browser TTS available (${u.length} voices detected).` : "Browser TTS is available, but no voices were returned yet.",
4863
4879
  detail: null,
4864
- voices: f
4880
+ voices: v
4865
4881
  }, !0);
4866
4882
  } catch (a) {
4867
- y(Vt, {
4883
+ y(zt, {
4868
4884
  checked: !0,
4869
4885
  loading: !1,
4870
4886
  available: !1,
@@ -4881,13 +4897,13 @@ function zf(e, t) {
4881
4897
  return {};
4882
4898
  }
4883
4899
  }
4884
- function Cl() {
4900
+ function Nl() {
4885
4901
  const a = new URL(kt(s(Ct), Ye()), window.location.origin);
4886
4902
  a.pathname = `${a.pathname.replace(/\/+$/, "")}/polly/voices`;
4887
4903
  const u = a;
4888
4904
  return s(yt) && u.searchParams.set("language", s(yt)), s(Ir) && u.searchParams.set("gender", s(Ir)), s(Ke) && u.searchParams.set("engine", s(Ke)), u;
4889
4905
  }
4890
- function Rl() {
4906
+ function jl() {
4891
4907
  const a = new URL(kt(s(Rt), Ye()), window.location.origin);
4892
4908
  a.pathname = `${a.pathname.replace(/\/+$/, "")}/google/voices`;
4893
4909
  const u = a;
@@ -4902,24 +4918,24 @@ function zf(e, t) {
4902
4918
  detail: null
4903
4919
  }, !0);
4904
4920
  try {
4905
- const a = Cl(), u = await d().fetchPollyVoices?.({
4921
+ const a = Nl(), u = await d().fetchPollyVoices?.({
4906
4922
  endpoint: kt(s(Ct), Ye()),
4907
4923
  language: s(yt),
4908
4924
  gender: s(Ir),
4909
4925
  engine: s(Ke),
4910
4926
  url: a
4911
- }), f = Array.isArray(u) ? u : await (async () => {
4927
+ }), v = Array.isArray(u) ? u : await (async () => {
4912
4928
  const g = await fetch(a.toString()), T = await vn(g);
4913
4929
  if (!g.ok) throw new Error(`HTTP ${g.status}: ${T?.error || T?.message || "Unknown error"}`);
4914
4930
  return Array.isArray(T?.voices) ? T.voices : [];
4915
4931
  })();
4916
- s(st) && (f.some((g) => (g.id || g.name || "") === s(st)) || y(st, "")), y(wt, {
4932
+ s(st) && (v.some((g) => (g.id || g.name || "") === s(st)) || y(st, "")), y(wt, {
4917
4933
  checked: !0,
4918
4934
  loading: !1,
4919
4935
  available: !0,
4920
- message: `AWS Polly available (${f.length} matching voices, ${s(Ke)} engine).`,
4936
+ message: `AWS Polly available (${v.length} matching voices, ${s(Ke)} engine).`,
4921
4937
  detail: null,
4922
- voices: f
4938
+ voices: v
4923
4939
  }, !0);
4924
4940
  } catch (a) {
4925
4941
  y(wt, {
@@ -4941,24 +4957,24 @@ function zf(e, t) {
4941
4957
  detail: null
4942
4958
  }, !0);
4943
4959
  try {
4944
- const a = Rl(), u = await d().fetchGoogleVoices?.({
4960
+ const a = jl(), u = await d().fetchGoogleVoices?.({
4945
4961
  endpoint: kt(s(Rt), Ye()),
4946
4962
  language: s(bt),
4947
4963
  gender: s(Nt),
4948
4964
  voiceType: s(jt),
4949
4965
  url: a
4950
- }), f = Array.isArray(u) ? u : await (async () => {
4966
+ }), v = Array.isArray(u) ? u : await (async () => {
4951
4967
  const g = await fetch(a.toString()), T = await vn(g);
4952
4968
  if (!g.ok) throw new Error(`HTTP ${g.status}: ${T?.error || T?.message || "Unknown error"}`);
4953
4969
  return Array.isArray(T?.voices) ? T.voices : [];
4954
4970
  })();
4955
- s(at) && (f.some((g) => (g.id || g.name || "") === s(at)) || y(at, "")), y(lt, {
4971
+ s(at) && (v.some((g) => (g.id || g.name || "") === s(at)) || y(at, "")), y(lt, {
4956
4972
  checked: !0,
4957
4973
  loading: !1,
4958
4974
  available: !0,
4959
- message: `Google Cloud TTS available (${f.length} matching voices).`,
4975
+ message: `Google Cloud TTS available (${v.length} matching voices).`,
4960
4976
  detail: null,
4961
- voices: f
4977
+ voices: v
4962
4978
  }, !0);
4963
4979
  } catch (a) {
4964
4980
  y(lt, {
@@ -4972,31 +4988,31 @@ function zf(e, t) {
4972
4988
  }
4973
4989
  }
4974
4990
  async function pn() {
4975
- if (s(v) === "browser") {
4976
- await Ll();
4991
+ if (s(f) === "browser") {
4992
+ await Rl();
4977
4993
  return;
4978
4994
  }
4979
- if (s(v) === "polly") {
4995
+ if (s(f) === "polly") {
4980
4996
  await Fo();
4981
4997
  return;
4982
4998
  }
4983
- if (s(v) === "google") {
4999
+ if (s(f) === "google") {
4984
5000
  await Wo();
4985
5001
  return;
4986
5002
  }
4987
- await Sl(s(v));
5003
+ await El(s(f));
4988
5004
  }
4989
5005
  function hn() {
4990
- s(v) === "polly" && Fo();
5006
+ s(f) === "polly" && Fo();
4991
5007
  }
4992
5008
  function mn() {
4993
- s(v) === "google" && Wo();
5009
+ s(f) === "google" && Wo();
4994
5010
  }
4995
5011
  function Bo(a) {
4996
- s(v) !== a && (Or(), y(v, a, !0), vi(), pn());
5012
+ s(f) !== a && (Or(), y(f, a, !0), vi(), pn());
4997
5013
  }
4998
- function Ve() {
4999
- return s(v) === "browser" ? s(Vt) : s(v) === "polly" ? s(wt) : s(v) === "google" ? s(lt) : s(K)[s(v)] || {
5014
+ function ze() {
5015
+ return s(f) === "browser" ? s(zt) : s(f) === "polly" ? s(wt) : s(f) === "google" ? s(lt) : s(K)[s(f)] || {
5000
5016
  checked: !1,
5001
5017
  loading: !1,
5002
5018
  available: !1,
@@ -5005,21 +5021,21 @@ function zf(e, t) {
5005
5021
  voices: []
5006
5022
  };
5007
5023
  }
5008
- function Nl() {
5009
- return ct(s(v)) ? !0 : s(Se) ? typeof s(Se).preview == "function" : !1;
5024
+ function zl() {
5025
+ return ct(s(f)) ? !0 : s(Se) ? typeof s(Se).preview == "function" : !1;
5010
5026
  }
5011
5027
  function xr(a) {
5012
5028
  if (a === "browser") return s(ye) || void 0;
5013
5029
  if (a === "polly")
5014
- return s(st) && s(wt).voices.some((f) => (f.id || f.name || "") === s(st)) ? s(st) : void 0;
5015
- if (s(at) && s(lt).voices.some((f) => (f.id || f.name || "") === s(at)))
5030
+ return s(st) && s(wt).voices.some((v) => (v.id || v.name || "") === s(st)) ? s(st) : void 0;
5031
+ if (s(at) && s(lt).voices.some((v) => (v.id || v.name || "") === s(at)))
5016
5032
  return s(at);
5017
5033
  const u = s(lt).voices[0];
5018
5034
  return u && (u.id || u.name) || void 0;
5019
5035
  }
5020
5036
  function kt(a, u = i) {
5021
- const f = a.trim();
5022
- return f ? f.replace(/\/synthesize\/?$/i, "") : u;
5037
+ const v = a.trim();
5038
+ return v ? v.replace(/\/synthesize\/?$/i, "") : u;
5023
5039
  }
5024
5040
  function Ye() {
5025
5041
  return kt(l() || i);
@@ -5030,16 +5046,16 @@ function zf(e, t) {
5030
5046
  function Ho() {
5031
5047
  le !== null && typeof window < "u" && window.clearInterval(le), le = null, y(P, -1), y(U, 0);
5032
5048
  }
5033
- function jl(a) {
5034
- const u = [], f = /\S+/g;
5049
+ function Vl(a) {
5050
+ const u = [], v = /\S+/g;
5035
5051
  let g;
5036
- for (; (g = f.exec(a)) !== null; ) u.push({
5052
+ for (; (g = v.exec(a)) !== null; ) u.push({
5037
5053
  start: g.index,
5038
5054
  end: g.index + g[0].length
5039
5055
  });
5040
5056
  return u;
5041
5057
  }
5042
- function Vl(a) {
5058
+ function Dl(a) {
5043
5059
  const u = typeof a == "string" ? a : "";
5044
5060
  if (!u.length) return [{
5045
5061
  text: "",
@@ -5049,14 +5065,14 @@ function zf(e, t) {
5049
5065
  text: u,
5050
5066
  active: !1
5051
5067
  }];
5052
- const f = Math.max(0, Math.min(s(P), u.length)), g = Math.max(f, Math.min(f + s(U), u.length));
5068
+ const v = Math.max(0, Math.min(s(P), u.length)), g = Math.max(v, Math.min(v + s(U), u.length));
5053
5069
  return [
5054
5070
  {
5055
- text: u.slice(0, f),
5071
+ text: u.slice(0, v),
5056
5072
  active: !1
5057
5073
  },
5058
5074
  {
5059
- text: u.slice(f, g),
5075
+ text: u.slice(v, g),
5060
5076
  active: !0
5061
5077
  },
5062
5078
  {
@@ -5066,32 +5082,32 @@ function zf(e, t) {
5066
5082
  ].filter((T) => T.text.length > 0);
5067
5083
  }
5068
5084
  function vi() {
5069
- if (!ct(s(v))) {
5085
+ if (!ct(s(f))) {
5070
5086
  const a = `This is a ${s(Se)?.label || "custom"} TTS provider sample.`;
5071
5087
  s(S) === "ssml" ? y(O, `<speak>${a}</speak>`) : y(O, a);
5072
5088
  return;
5073
5089
  }
5074
5090
  if (s(S) === "ssml") {
5075
- if (s(v) === "browser") {
5091
+ if (s(f) === "browser") {
5076
5092
  y(O, Co.browser, !0);
5077
5093
  return;
5078
5094
  }
5079
- y(O, _l[s(v)], !0);
5095
+ y(O, bl[s(f)], !0);
5080
5096
  return;
5081
5097
  }
5082
- y(O, Co[s(v)], !0);
5098
+ y(O, Co[s(f)], !0);
5083
5099
  }
5084
5100
  function Go(a) {
5085
5101
  s(S) !== a && (Or(), y(S, a, !0), y(E, null), y(D, null), vi());
5086
5102
  }
5087
5103
  function qo(a, u) {
5088
5104
  le !== null && window.clearInterval(le);
5089
- const f = [...u].sort((L, R) => L.time !== R.time ? L.time - R.time : L.start !== R.start ? L.start - R.start : L.end - R.end);
5090
- if (f.length === 0) return;
5091
- const g = f[0];
5105
+ const v = [...u].sort((L, R) => L.time !== R.time ? L.time - R.time : L.start !== R.start ? L.start - R.start : L.end - R.end);
5106
+ if (v.length === 0) return;
5107
+ const g = v[0];
5092
5108
  Pr("tracking:init", {
5093
5109
  audioCurrentMs: Math.round(a.currentTime * 1e3),
5094
- marks: f.length,
5110
+ marks: v.length,
5095
5111
  firstMark: g,
5096
5112
  firstSlice: s(O).slice(Math.max(0, g.start), Math.max(g.start, g.end))
5097
5113
  }), y(P, g.start, !0), y(U, Math.max(1, g.end - g.start), !0);
@@ -5099,10 +5115,10 @@ function zf(e, t) {
5099
5115
  le = window.setInterval(() => {
5100
5116
  const L = a.currentTime * 1e3;
5101
5117
  let R = T;
5102
- for (; R + 1 < f.length && L >= f[R + 1].time; ) R += 1;
5118
+ for (; R + 1 < v.length && L >= v[R + 1].time; ) R += 1;
5103
5119
  if (R !== T) {
5104
5120
  T = R;
5105
- const F = f[T];
5121
+ const F = v[T];
5106
5122
  y(P, F.start, !0), y(U, Math.max(1, F.end - F.start), !0), M < 12 && (M += 1, Pr("tracking:step", {
5107
5123
  audioCurrentMs: Math.round(L),
5108
5124
  index: T,
@@ -5115,26 +5131,26 @@ function zf(e, t) {
5115
5131
  function Or() {
5116
5132
  Ho(), y(E, null), y(D, null), typeof window < "u" && "speechSynthesis" in window && window.speechSynthesis.cancel(), Tt && (Tt.pause(), Tt.src = "", Tt = null), y(k, !1), y(w, null);
5117
5133
  }
5118
- function zl(a, u) {
5134
+ function Fl(a, u) {
5119
5135
  if (a.length === 0) return a;
5120
- const f = [...a].sort((j, V) => j.time !== V.time ? j.time - V.time : j.start !== V.start ? j.start - V.start : j.end - V.end), g = f.map((j) => Number(j.time) || 0).filter((j) => j >= 0), T = g.length ? Math.max(...g) : 0, M = [];
5136
+ const v = [...a].sort((j, z) => j.time !== z.time ? j.time - z.time : j.start !== z.start ? j.start - z.start : j.end - z.end), g = v.map((j) => Number(j.time) || 0).filter((j) => j >= 0), T = g.length ? Math.max(...g) : 0, M = [];
5121
5137
  for (let j = 1; j < g.length; j += 1) {
5122
- const V = g[j] - g[j - 1];
5123
- Number.isFinite(V) && V > 0 && M.push(V);
5138
+ const z = g[j] - g[j - 1];
5139
+ Number.isFinite(z) && z > 0 && M.push(z);
5124
5140
  }
5125
- const L = M.length > 0 ? [...M].sort((j, V) => j - V)[Math.floor(M.length / 2)] : 0, R = Number.isFinite(u) && u > 0 && T > 0 && T <= u * 1.5, F = T > 0 && T < 100 && f.length > 3 || L > 0 && L < 10;
5126
- return R || F ? f.map((j) => ({
5141
+ const L = M.length > 0 ? [...M].sort((j, z) => j - z)[Math.floor(M.length / 2)] : 0, R = Number.isFinite(u) && u > 0 && T > 0 && T <= u * 1.5, F = T > 0 && T < 100 && v.length > 3 || L > 0 && L < 10;
5142
+ return R || F ? v.map((j) => ({
5127
5143
  ...j,
5128
5144
  time: Number(j.time) * 1e3
5129
- })) : f;
5145
+ })) : v;
5130
5146
  }
5131
- function Dl(a, u) {
5147
+ function Wl(a, u) {
5132
5148
  if (a.length === 0) return a;
5133
- const f = [...a].sort((W, X) => W.time !== X.time ? W.time - X.time : W.start !== X.start ? W.start - X.start : W.end - X.end), g = typeof u == "string" ? u : "", T = g.length;
5134
- if (!T) return f;
5135
- const M = Math.max(...f.map((W) => Number(W.end) || 0)), L = f[0], R = typeof L.value == "string" ? L.value.trim() : "", F = R ? g.toLowerCase().indexOf(R.toLowerCase()) : -1, j = F >= 0 ? Number(L.start || 0) - F : 0, V = Number(L.start || 0);
5136
- if (!(M > T + 2 && (j > 0 || V > 0))) return f;
5137
- const Z = j > 0 ? j : V, oe = f.map((W) => {
5149
+ const v = [...a].sort((W, X) => W.time !== X.time ? W.time - X.time : W.start !== X.start ? W.start - X.start : W.end - X.end), g = typeof u == "string" ? u : "", T = g.length;
5150
+ if (!T) return v;
5151
+ const M = Math.max(...v.map((W) => Number(W.end) || 0)), L = v[0], R = typeof L.value == "string" ? L.value.trim() : "", F = R ? g.toLowerCase().indexOf(R.toLowerCase()) : -1, j = F >= 0 ? Number(L.start || 0) - F : 0, z = Number(L.start || 0);
5152
+ if (!(M > T + 2 && (j > 0 || z > 0))) return v;
5153
+ const Z = j > 0 ? j : z, oe = v.map((W) => {
5138
5154
  const X = Math.max(0, Number(W.start || 0) - Z), Ae = Math.max(X + 1, Number(W.end || 0) - Z);
5139
5155
  return {
5140
5156
  ...W,
@@ -5152,21 +5168,21 @@ function zf(e, t) {
5152
5168
  lastAfter: oe[oe.length - 1]
5153
5169
  }), oe;
5154
5170
  }
5155
- async function Fl(a, u = []) {
5156
- const f = new Audio(a);
5157
- if (Tt = f, u.length > 0) {
5171
+ async function Bl(a, u = []) {
5172
+ const v = new Audio(a);
5173
+ if (Tt = v, u.length > 0) {
5158
5174
  await new Promise((R) => {
5159
- if (Number.isFinite(f.duration) && f.duration > 0) {
5175
+ if (Number.isFinite(v.duration) && v.duration > 0) {
5160
5176
  R();
5161
5177
  return;
5162
5178
  }
5163
5179
  let F = !1;
5164
5180
  const j = () => {
5165
- F || (F = !0, f.removeEventListener("loadedmetadata", j), f.removeEventListener("error", j), R());
5181
+ F || (F = !0, v.removeEventListener("loadedmetadata", j), v.removeEventListener("error", j), R());
5166
5182
  };
5167
- f.addEventListener("loadedmetadata", j, { once: !0 }), f.addEventListener("error", j, { once: !0 }), typeof window < "u" && window.setTimeout(j, 1200);
5183
+ v.addEventListener("loadedmetadata", j, { once: !0 }), v.addEventListener("error", j, { once: !0 }), typeof window < "u" && window.setTimeout(j, 1200);
5168
5184
  });
5169
- const g = Number(f.duration), T = Dl(zl(u, g), s(O)), M = Math.max(...u.map((R) => Number(R.time) || 0)), L = Math.max(...T.map((R) => Number(R.time) || 0));
5185
+ const g = Number(v.duration), T = Wl(Fl(u, g), s(O)), M = Math.max(...u.map((R) => Number(R.time) || 0)), L = Math.max(...T.map((R) => Number(R.time) || 0));
5170
5186
  Pr("marks:normalize", {
5171
5187
  audioDurationSeconds: g,
5172
5188
  rawCount: u.length,
@@ -5177,26 +5193,26 @@ function zf(e, t) {
5177
5193
  normalizedFirst: T[0],
5178
5194
  rawLast: u[u.length - 1],
5179
5195
  normalizedLast: T[T.length - 1]
5180
- }), qo(f, T);
5196
+ }), qo(v, T);
5181
5197
  } else Pr("marks:missing", { audioUrl: a });
5182
5198
  await new Promise((g, T) => {
5183
- f.onended = () => {
5199
+ v.onended = () => {
5184
5200
  le !== null && (window.clearInterval(le), le = null), g();
5185
- }, f.onerror = () => {
5201
+ }, v.onerror = () => {
5186
5202
  le !== null && (window.clearInterval(le), le = null), T(/* @__PURE__ */ new Error("Failed to play preview audio."));
5187
- }, f.play().catch(T);
5203
+ }, v.play().catch(T);
5188
5204
  }), Tt = null;
5189
5205
  }
5190
5206
  async function Ko(a) {
5191
- const u = kt(s(a === "polly" ? Ct : Rt), Ye()), f = !(a === "google" && s(S) === "ssml"), g = {
5207
+ const u = kt(s(a === "polly" ? Ct : Rt), Ye()), v = !(a === "google" && s(S) === "ssml"), g = {
5192
5208
  text: s(O).trim() || Uo(a),
5193
5209
  provider: a,
5194
5210
  rate: cr(s(a === "polly" ? sn : an)),
5195
5211
  language: a === "polly" ? s(yt) || void 0 : s(bt) || void 0,
5196
5212
  voice: xr(a === "polly" ? "polly" : "google"),
5197
- includeSpeechMarks: f
5213
+ includeSpeechMarks: v
5198
5214
  };
5199
- a === "polly" && (g.engine = s(Ke), g.sampleRate = di(s(sr)), g.format = s(ar), g.speechMarkTypes = Vo());
5215
+ a === "polly" && (g.engine = s(Ke), g.sampleRate = di(s(sr)), g.format = s(ar), g.speechMarkTypes = zo());
5200
5216
  const T = d().synthesizeProbe ? await d().synthesizeProbe({
5201
5217
  endpoint: u,
5202
5218
  provider: a,
@@ -5213,66 +5229,66 @@ function zf(e, t) {
5213
5229
  if (!M || typeof M != "string") throw new Error("Preview response did not include audio content.");
5214
5230
  const R = atob(M), F = new Array(R.length);
5215
5231
  for (let W = 0; W < R.length; W += 1) F[W] = R.charCodeAt(W);
5216
- const j = new Blob([new Uint8Array(F)], { type: L }), V = URL.createObjectURL(j), Z = new Audio(V);
5232
+ const j = new Blob([new Uint8Array(F)], { type: L }), z = URL.createObjectURL(j), Z = new Audio(z);
5217
5233
  Tt = Z;
5218
5234
  const oe = Array.isArray(T?.speechMarks) ? T.speechMarks : [];
5219
- f && oe.length > 0 && qo(Z, oe), await new Promise((W, X) => {
5235
+ v && oe.length > 0 && qo(Z, oe), await new Promise((W, X) => {
5220
5236
  Z.onended = () => {
5221
- le !== null && (window.clearInterval(le), le = null), URL.revokeObjectURL(V), W();
5237
+ le !== null && (window.clearInterval(le), le = null), URL.revokeObjectURL(z), W();
5222
5238
  }, Z.onerror = () => {
5223
- le !== null && (window.clearInterval(le), le = null), URL.revokeObjectURL(V), X(/* @__PURE__ */ new Error("Failed to play preview audio."));
5239
+ le !== null && (window.clearInterval(le), le = null), URL.revokeObjectURL(z), X(/* @__PURE__ */ new Error("Failed to play preview audio."));
5224
5240
  }, Z.play().catch(X);
5225
5241
  }), Tt = null;
5226
5242
  }
5227
- async function Wl() {
5243
+ async function Ul() {
5228
5244
  if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("Browser speech synthesis is unavailable.");
5229
5245
  if (s(S) === "ssml") throw new Error("SSML preview is not supported in the Browser backend.");
5230
5246
  const a = window.speechSynthesis, u = new SpeechSynthesisUtterance(s(O).trim() || Uo("browser"));
5231
5247
  if (u.rate = cr(s(ie)), u.pitch = dn(s(Er)), s(ye)) {
5232
- const f = a.getVoices().find((g) => g.name === s(ye));
5233
- f && (u.voice = f);
5248
+ const v = a.getVoices().find((g) => g.name === s(ye));
5249
+ v && (u.voice = v);
5234
5250
  }
5235
- u.onboundary = (f) => {
5236
- if (f.name !== "word") return;
5237
- const g = Number(f.charIndex || 0), T = jl(s(O)).find((M) => g >= M.start && g < M.end);
5251
+ u.onboundary = (v) => {
5252
+ if (v.name !== "word") return;
5253
+ const g = Number(v.charIndex || 0), T = Vl(s(O)).find((M) => g >= M.start && g < M.end);
5238
5254
  T && (y(P, T.start, !0), y(U, Math.max(1, T.end - T.start), !0));
5239
- }, await new Promise((f, g) => {
5240
- u.onend = () => f(), u.onerror = () => g(/* @__PURE__ */ new Error("Failed to play browser voice preview.")), a.speak(u);
5255
+ }, await new Promise((v, g) => {
5256
+ u.onend = () => v(), u.onerror = () => g(/* @__PURE__ */ new Error("Failed to play browser voice preview.")), a.speak(u);
5241
5257
  });
5242
5258
  }
5243
5259
  async function Yo() {
5244
- if (y(E, null), y(D, null), !Ve().available) {
5260
+ if (y(E, null), y(D, null), !ze().available) {
5245
5261
  y(E, "Cannot preview while this TTS service is unavailable.");
5246
5262
  return;
5247
5263
  }
5248
- if (s(k) && s(w) === s(v)) {
5264
+ if (s(k) && s(w) === s(f)) {
5249
5265
  ai += 1, Or();
5250
5266
  return;
5251
5267
  }
5252
- if (!(typeof s(O) == "string" ? s(O) : "").trim() && ct(s(v))) {
5268
+ if (!(typeof s(O) == "string" ? s(O) : "").trim() && ct(s(f))) {
5253
5269
  y(E, "Enter preview text before starting playback.");
5254
5270
  return;
5255
5271
  }
5256
- if (s(v) === "browser" && s(S) === "ssml") {
5272
+ if (s(f) === "browser" && s(S) === "ssml") {
5257
5273
  y(E, "SSML preview is not supported in the Browser backend.");
5258
5274
  return;
5259
5275
  }
5260
5276
  Or();
5261
5277
  const a = ++ai;
5262
- y(k, !0), y(w, s(v), !0);
5278
+ y(k, !0), y(w, s(f), !0);
5263
5279
  try {
5264
- if (ct(s(v)))
5265
- s(v) === "browser" ? await Wl() : s(v) === "polly" ? (s(S) === "ssml" && y(D, "Some Polly neural voices reject certain SSML tags (for example emphasis). Use basic SSML tags if preview fails."), await Ko("polly")) : (s(S) === "ssml" && y(D, "Google SSML preview preserves authored SSML, so word tracking is disabled."), await Ko("google"));
5280
+ if (ct(s(f)))
5281
+ s(f) === "browser" ? await Ul() : s(f) === "polly" ? (s(S) === "ssml" && y(D, "Some Polly neural voices reject certain SSML tags (for example emphasis). Use basic SSML tags if preview fails."), await Ko("polly")) : (s(S) === "ssml" && y(D, "Google SSML preview preserves authored SSML, so word tracking is disabled."), await Ko("google"));
5266
5282
  else {
5267
- const u = un(s(v)), f = await u.preview?.(cn(u.id, {
5283
+ const u = un(s(f)), v = await u.preview?.(cn(u.id, {
5268
5284
  previewText: s(O),
5269
5285
  previewMode: s(S)
5270
- })), g = f || null;
5286
+ })), g = v || null;
5271
5287
  if (g?.audioUrl && typeof g.audioUrl == "string") {
5272
5288
  const T = Array.isArray(g.speechMarks) ? g.speechMarks : [], M = typeof g.trackingText == "string" ? g.trackingText : null;
5273
- M && y(O, M, !0), await Fl(g.audioUrl, T);
5289
+ M && y(O, M, !0), await Bl(g.audioUrl, T);
5274
5290
  }
5275
- y(D, f?.note || null, !0);
5291
+ y(D, v?.note || null, !0);
5276
5292
  }
5277
5293
  } catch (u) {
5278
5294
  a === ai && y(E, u instanceof Error ? u.message : String(u), !0);
@@ -5281,7 +5297,7 @@ function zf(e, t) {
5281
5297
  }
5282
5298
  }
5283
5299
  async function Jo() {
5284
- if (y(_, null), y(m, null), !Ve().available) {
5300
+ if (y(_, null), y(m, null), !ze().available) {
5285
5301
  y(m, "Cannot apply settings while this TTS service is unavailable.");
5286
5302
  return;
5287
5303
  }
@@ -5291,9 +5307,9 @@ function zf(e, t) {
5291
5307
  }
5292
5308
  y(b, !0);
5293
5309
  try {
5294
- const a = Jd(s(Lt));
5295
- if (ct(s(v)))
5296
- if (s(v) === "browser") {
5310
+ const a = Zd(s(Lt));
5311
+ if (ct(s(f)))
5312
+ if (s(f) === "browser") {
5297
5313
  const u = {
5298
5314
  backend: "browser",
5299
5315
  serverProvider: void 0,
@@ -5309,7 +5325,7 @@ function zf(e, t) {
5309
5325
  enabled: !0,
5310
5326
  ...u
5311
5327
  }), fi(u);
5312
- } else if (s(v) === "polly") {
5328
+ } else if (s(f) === "polly") {
5313
5329
  const u = {
5314
5330
  backend: "polly",
5315
5331
  serverProvider: "polly",
@@ -5328,7 +5344,7 @@ function zf(e, t) {
5328
5344
  engine: s(Ke),
5329
5345
  sampleRate: di(s(sr)),
5330
5346
  format: s(ar),
5331
- speechMarkTypes: Vo()
5347
+ speechMarkTypes: zo()
5332
5348
  },
5333
5349
  layoutMode: s(je),
5334
5350
  speedOptions: a
@@ -5359,33 +5375,33 @@ function zf(e, t) {
5359
5375
  }), fi(u);
5360
5376
  }
5361
5377
  else {
5362
- const u = un(s(v));
5363
- let f;
5364
- if (u.buildApplyConfig && (f = await u.buildApplyConfig(cn(u.id))), f?.config || (f = s(te)[u.id]), !f?.config) throw new Error(`Custom provider '${u.id}' did not return apply config.`);
5378
+ const u = un(s(f));
5379
+ let v;
5380
+ if (u.buildApplyConfig && (v = await u.buildApplyConfig(cn(u.id))), v?.config || (v = s(te)[u.id]), !v?.config) throw new Error(`Custom provider '${u.id}' did not return apply config.`);
5365
5381
  o().updateToolConfig("textToSpeech", {
5366
5382
  enabled: !0,
5367
- ...f.config,
5383
+ ...v.config,
5368
5384
  layoutMode: s(je),
5369
5385
  speedOptions: a
5370
5386
  }), fi({
5371
5387
  backend: u.id,
5372
- ...f.config || {},
5388
+ ...v.config || {},
5373
5389
  layoutMode: s(je),
5374
5390
  speedOptions: a
5375
- }), y(_, f.message || `Applied ${u.label} TTS settings.`, !0);
5391
+ }), y(_, v.message || `Applied ${u.label} TTS settings.`, !0);
5376
5392
  }
5377
- await o()?.ensureTTSReady?.(o()?.getToolConfig?.("textToSpeech")), ct(s(v)) && y(_, `Applied ${s(v)} TTS settings.`), ui();
5393
+ await o()?.ensureTTSReady?.(o()?.getToolConfig?.("textToSpeech")), ct(s(f)) && y(_, `Applied ${s(f)} TTS settings.`), ui();
5378
5394
  } catch (a) {
5379
5395
  y(m, a instanceof Error ? a.message : String(a), !0);
5380
5396
  } finally {
5381
5397
  y(b, !1);
5382
5398
  }
5383
5399
  }
5384
- Xa(() => {
5385
- Ml(), Do(), pn();
5400
+ Za(() => {
5401
+ Ol(), Do(), pn();
5386
5402
  }), $i(() => {
5387
5403
  if (s(li))
5388
- return lr?.(), lr = gl(s(li), {
5404
+ return lr?.(), lr = yl(s(li), {
5389
5405
  initialFocus: s(ci),
5390
5406
  onEscape: ui
5391
5407
  }), queueMicrotask(() => {
@@ -5401,18 +5417,18 @@ function zf(e, t) {
5401
5417
  s(Se);
5402
5418
  const a = s(Se), u = s(ln);
5403
5419
  if (!a || a.mode !== "component" || !u) return;
5404
- const f = (M) => El(a.id, M), g = (M) => {
5405
- $l(a.id, M);
5420
+ const v = (M) => $l(a.id, M), g = (M) => {
5421
+ Ml(a.id, M);
5406
5422
  }, T = () => {
5407
- Pl(a.id);
5423
+ xl(a.id);
5408
5424
  };
5409
- return u.addEventListener("availability", f), u.addEventListener("apply-request", g), u.addEventListener("preview-request", T), () => {
5410
- u.removeEventListener("availability", f), u.removeEventListener("apply-request", g), u.removeEventListener("preview-request", T);
5425
+ return u.addEventListener("availability", v), u.addEventListener("apply-request", g), u.addEventListener("preview-request", T), () => {
5426
+ u.removeEventListener("availability", v), u.removeEventListener("apply-request", g), u.removeEventListener("preview-request", T);
5411
5427
  };
5412
- }), Ku(() => {
5428
+ }), Ju(() => {
5413
5429
  lr?.(), lr = null, Or();
5414
5430
  });
5415
- var Bl = {
5431
+ var Hl = {
5416
5432
  get toolkitCoordinator() {
5417
5433
  return o();
5418
5434
  },
@@ -5443,8 +5459,8 @@ function zf(e, t) {
5443
5459
  set customProviders(a = []) {
5444
5460
  h(a), Ut();
5445
5461
  }
5446
- }, pi = jf();
5447
- el(pi, "z-index: 200000;");
5462
+ }, pi = Df();
5463
+ rl(pi, "z-index: 200000;");
5448
5464
  var gn = $(pi), _n = $(gn), Xo = A($(_n), 2);
5449
5465
  qn(Xo, (a) => y(ci, a), () => s(ci)), I(_n);
5450
5466
  var yn = A(_n, 2), bn = $(yn), hi = A($(bn), 2), wn = $(hi);
@@ -5455,64 +5471,64 @@ function zf(e, t) {
5455
5471
  kn.value = kn.__value = "floating-overlay";
5456
5472
  var Qo = A(kn);
5457
5473
  Qo.value = Qo.__value = "left-aligned", I(hi);
5458
- var Zo = A(hi, 2), Ul = $(Zo);
5474
+ var Zo = A(hi, 2), Gl = $(Zo);
5459
5475
  I(Zo), I(bn);
5460
5476
  var es = A(bn, 2), Sn = A($(es), 2);
5461
5477
  vr(Sn);
5462
- var ts = A(Sn, 2), Hl = A($(ts), 2);
5478
+ var ts = A(Sn, 2), ql = A($(ts), 2);
5463
5479
  I(ts), I(es), I(yn);
5464
5480
  var An = A(yn, 2);
5465
- Fr(An, 21, () => s(kl), Dr, (a, u) => {
5466
- var f = yf();
5481
+ Fr(An, 21, () => s(Al), Dr, (a, u) => {
5482
+ var v = Tf();
5467
5483
  let g;
5468
- var T = $(f, !0);
5469
- I(f), fe(() => {
5470
- g = fr(f, 1, "btn btn-sm join-item", null, g, { "btn-active": s(v) === s(u).id }), pe(T, s(u).label);
5471
- }), ve("click", f, () => Bo(s(u).id)), ee(a, f);
5484
+ var T = $(v, !0);
5485
+ I(v), fe(() => {
5486
+ g = fr(v, 1, "btn btn-sm join-item", null, g, { "btn-active": s(f) === s(u).id }), pe(T, s(u).label);
5487
+ }), ve("click", v, () => Bo(s(u).id)), ee(a, v);
5472
5488
  }), I(An);
5473
- var En = A(An, 2), rs = $(En), Gl = (a) => {
5474
- var u = bf();
5475
- ea(2), ee(a, u);
5476
- }, ql = /* @__PURE__ */ At(() => Ve().loading), Kl = (a) => {
5477
- var u = wf(), f = $(u, !0);
5489
+ var En = A(An, 2), rs = $(En), Kl = (a) => {
5490
+ var u = kf();
5491
+ ra(2), ee(a, u);
5492
+ }, Yl = /* @__PURE__ */ At(() => ze().loading), Jl = (a) => {
5493
+ var u = Sf(), v = $(u, !0);
5478
5494
  I(u), fe((g, T) => {
5479
- fr(u, 1, g, "svelte-3sm1sy"), pe(f, T);
5480
- }, [() => Za(Ve().available ? "pie-tts-ok" : "pie-tts-error"), () => Ve().message]), ee(a, u);
5481
- }, Yl = /* @__PURE__ */ At(() => Ve().checked);
5495
+ fr(u, 1, g, "svelte-3sm1sy"), pe(v, T);
5496
+ }, [() => tl(ze().available ? "pie-tts-ok" : "pie-tts-error"), () => ze().message]), ee(a, u);
5497
+ }, Xl = /* @__PURE__ */ At(() => ze().checked);
5482
5498
  Je(rs, (a) => {
5483
- s(ql) ? a(Gl) : s(Yl) && a(Kl, 1);
5499
+ s(Yl) ? a(Kl) : s(Xl) && a(Jl, 1);
5484
5500
  });
5485
- var Jl = A(rs, 2);
5501
+ var Ql = A(rs, 2);
5486
5502
  I(En);
5487
- var is = A(En, 2), Xl = (a) => {
5488
- var u = Tf(), f = $(u), g = $(f, !0);
5489
- I(f), I(u), fe((T) => pe(g, T), [() => Ve().detail]), ee(a, u);
5490
- }, Ql = /* @__PURE__ */ At(() => Ve().detail);
5503
+ var is = A(En, 2), Zl = (a) => {
5504
+ var u = Af(), v = $(u), g = $(v, !0);
5505
+ I(v), I(u), fe((T) => pe(g, T), [() => ze().detail]), ee(a, u);
5506
+ }, ec = /* @__PURE__ */ At(() => ze().detail);
5491
5507
  Je(is, (a) => {
5492
- s(Ql) && a(Xl);
5508
+ s(ec) && a(Zl);
5493
5509
  });
5494
- var ns = A(is, 2), Zl = (a) => {
5495
- var u = Sf(), f = $(u), g = A($(f), 2), T = $(g);
5510
+ var ns = A(is, 2), tc = (a) => {
5511
+ var u = If(), v = $(u), g = A($(v), 2), T = $(g);
5496
5512
  T.value = T.__value = "";
5497
5513
  var M = A(T);
5498
- Fr(M, 17, () => s(Vt).voices, Dr, (L, R) => {
5499
- var F = kf(), j = $(F);
5514
+ Fr(M, 17, () => s(zt).voices, Dr, (L, R) => {
5515
+ var F = Ef(), j = $(F);
5500
5516
  I(F);
5501
- var V = {};
5517
+ var z = {};
5502
5518
  fe(() => {
5503
- pe(j, `${s(R).name ?? ""} (${(s(R).languageCode || "n/a") ?? ""})`), V !== (V = s(R).name || "") && (F.value = (F.__value = s(R).name || "") ?? "");
5519
+ pe(j, `${s(R).name ?? ""} (${(s(R).languageCode || "n/a") ?? ""})`), z !== (z = s(R).name || "") && (F.value = (F.__value = s(R).name || "") ?? "");
5504
5520
  }), ee(L, F);
5505
- }), I(g), I(f), I(u), fe(() => u.disabled = !s(Vt).available), Fe(g, () => s(ye), (L) => y(ye, L)), ee(a, u);
5506
- }, ec = (a) => {
5507
- var u = Ef(), f = $(u), g = A($(f), 2);
5508
- vr(g), I(f);
5509
- var T = A(f, 2), M = $(T), L = A($(M), 2);
5521
+ }), I(g), I(v), I(u), fe(() => u.disabled = !s(zt).available), Fe(g, () => s(ye), (L) => y(ye, L)), ee(a, u);
5522
+ }, rc = (a) => {
5523
+ var u = Pf(), v = $(u), g = A($(v), 2);
5524
+ vr(g), I(v);
5525
+ var T = A(v, 2), M = $(T), L = A($(M), 2);
5510
5526
  vr(L), I(M);
5511
5527
  var R = A(M, 2), F = A($(R), 2), j = $(F);
5512
5528
  j.value = j.__value = "";
5513
- var V = A(j);
5514
- V.value = V.__value = "male";
5515
- var Z = A(V);
5529
+ var z = A(j);
5530
+ z.value = z.__value = "male";
5531
+ var Z = A(z);
5516
5532
  Z.value = Z.__value = "female";
5517
5533
  var oe = A(Z);
5518
5534
  oe.value = oe.__value = "neutral", I(F), I(R);
@@ -5520,23 +5536,23 @@ function zf(e, t) {
5520
5536
  Ae.value = Ae.__value = "neural";
5521
5537
  var be = A(Ae);
5522
5538
  be.value = be.__value = "standard", I(X), I(W), I(T);
5523
- var St = A(T, 2), ut = A($(St), 2), zt = $(ut);
5524
- zt.value = zt.__value = "";
5525
- var Cr = A(zt);
5539
+ var St = A(T, 2), ut = A($(St), 2), Vt = $(ut);
5540
+ Vt.value = Vt.__value = "";
5541
+ var Cr = A(Vt);
5526
5542
  Fr(Cr, 17, () => s(wt).voices, Dr, (de, Dt) => {
5527
- var jr = Af(), hc = $(jr);
5543
+ var jr = $f(), gc = $(jr);
5528
5544
  I(jr);
5529
5545
  var ws = {};
5530
5546
  fe(() => {
5531
- pe(hc, `${(s(Dt).name || s(Dt).id) ?? ""} (${(s(Dt).languageCode || "n/a") ?? ""})`), ws !== (ws = s(Dt).id || s(Dt).name || "") && (jr.value = (jr.__value = s(Dt).id || s(Dt).name || "") ?? "");
5547
+ pe(gc, `${(s(Dt).name || s(Dt).id) ?? ""} (${(s(Dt).languageCode || "n/a") ?? ""})`), ws !== (ws = s(Dt).id || s(Dt).name || "") && (jr.value = (jr.__value = s(Dt).id || s(Dt).name || "") ?? "");
5532
5548
  }), ee(de, jr);
5533
5549
  }), I(ut), I(St);
5534
- var gi = A(St, 2), me = $(gi), ze = A($(me), 2), dt = $(ze);
5550
+ var gi = A(St, 2), me = $(gi), Ve = A($(me), 2), dt = $(Ve);
5535
5551
  dt.value = dt.__value = "mp3";
5536
5552
  var Rr = A(dt);
5537
5553
  Rr.value = Rr.__value = "ogg";
5538
5554
  var Nr = A(Rr);
5539
- Nr.value = Nr.__value = "pcm", I(ze), I(me);
5555
+ Nr.value = Nr.__value = "pcm", I(Ve), I(me);
5540
5556
  var On = A(me, 2), Ln = A($(On), 2), Cn = $(Ln);
5541
5557
  Cn.value = Cn.__value = 8e3;
5542
5558
  var Rn = A(Cn);
@@ -5545,20 +5561,20 @@ function zf(e, t) {
5545
5561
  Nn.value = Nn.__value = 22050;
5546
5562
  var _s = A(Nn);
5547
5563
  _s.value = _s.__value = 24e3, I(Ln), I(On);
5548
- var ys = A(On, 2), jn = A($(ys), 2), Vn = $(jn);
5549
- Vn.value = Vn.__value = "word";
5550
- var bs = A(Vn);
5551
- bs.value = bs.__value = "word+sentence", I(jn), I(ys), I(gi), I(u), fe(() => u.disabled = !s(wt).available), ur(g, () => s(Ct), (de) => y(Ct, de)), ve("change", L, hn), ur(L, () => s(yt), (de) => y(yt, de)), ve("change", F, hn), Fe(F, () => s(Ir), (de) => y(Ir, de)), ve("change", X, hn), Fe(X, () => s(Ke), (de) => y(Ke, de)), Fe(ut, () => s(st), (de) => y(st, de)), Fe(ze, () => s(ar), (de) => y(ar, de)), Fe(Ln, () => s(sr), (de) => y(sr, de)), Fe(jn, () => s($r), (de) => y($r, de)), ee(a, u);
5552
- }, tc = (a) => {
5553
- var u = $f(), f = $(u), g = A($(f), 2);
5554
- vr(g), I(f);
5555
- var T = A(f, 2), M = $(T), L = A($(M), 2);
5564
+ var ys = A(On, 2), jn = A($(ys), 2), zn = $(jn);
5565
+ zn.value = zn.__value = "word";
5566
+ var bs = A(zn);
5567
+ bs.value = bs.__value = "word+sentence", I(jn), I(ys), I(gi), I(u), fe(() => u.disabled = !s(wt).available), ur(g, () => s(Ct), (de) => y(Ct, de)), ve("change", L, hn), ur(L, () => s(yt), (de) => y(yt, de)), ve("change", F, hn), Fe(F, () => s(Ir), (de) => y(Ir, de)), ve("change", X, hn), Fe(X, () => s(Ke), (de) => y(Ke, de)), Fe(ut, () => s(st), (de) => y(st, de)), Fe(Ve, () => s(ar), (de) => y(ar, de)), Fe(Ln, () => s(sr), (de) => y(sr, de)), Fe(jn, () => s($r), (de) => y($r, de)), ee(a, u);
5568
+ }, ic = (a) => {
5569
+ var u = xf(), v = $(u), g = A($(v), 2);
5570
+ vr(g), I(v);
5571
+ var T = A(v, 2), M = $(T), L = A($(M), 2);
5556
5572
  vr(L), I(M);
5557
5573
  var R = A(M, 2), F = A($(R), 2), j = $(F);
5558
5574
  j.value = j.__value = "";
5559
- var V = A(j);
5560
- V.value = V.__value = "male";
5561
- var Z = A(V);
5575
+ var z = A(j);
5576
+ z.value = z.__value = "male";
5577
+ var Z = A(z);
5562
5578
  Z.value = Z.__value = "female";
5563
5579
  var oe = A(Z);
5564
5580
  oe.value = oe.__value = "neutral", I(F), I(R);
@@ -5568,50 +5584,50 @@ function zf(e, t) {
5568
5584
  be.value = be.__value = "studio";
5569
5585
  var St = A(be);
5570
5586
  St.value = St.__value = "standard", I(X), I(W), I(T);
5571
- var ut = A(T, 2), zt = A($(ut), 2), Cr = $(zt);
5587
+ var ut = A(T, 2), Vt = A($(ut), 2), Cr = $(Vt);
5572
5588
  Cr.value = Cr.__value = "";
5573
5589
  var gi = A(Cr);
5574
- Fr(gi, 17, () => s(lt).voices, Dr, (me, ze) => {
5575
- var dt = If(), Rr = $(dt);
5590
+ Fr(gi, 17, () => s(lt).voices, Dr, (me, Ve) => {
5591
+ var dt = Mf(), Rr = $(dt);
5576
5592
  I(dt);
5577
5593
  var Nr = {};
5578
5594
  fe(() => {
5579
- pe(Rr, `${(s(ze).name || s(ze).id) ?? ""} (${(s(ze).languageCode || "n/a") ?? ""})`), Nr !== (Nr = s(ze).id || s(ze).name || "") && (dt.value = (dt.__value = s(ze).id || s(ze).name || "") ?? "");
5595
+ pe(Rr, `${(s(Ve).name || s(Ve).id) ?? ""} (${(s(Ve).languageCode || "n/a") ?? ""})`), Nr !== (Nr = s(Ve).id || s(Ve).name || "") && (dt.value = (dt.__value = s(Ve).id || s(Ve).name || "") ?? "");
5580
5596
  }), ee(me, dt);
5581
- }), I(zt), I(ut), I(u), fe(() => u.disabled = !s(lt).available), ur(g, () => s(Rt), (me) => y(Rt, me)), ve("change", L, mn), ur(L, () => s(bt), (me) => y(bt, me)), ve("change", F, mn), Fe(F, () => s(Nt), (me) => y(Nt, me)), ve("change", X, mn), Fe(X, () => s(jt), (me) => y(jt, me)), Fe(zt, () => s(at), (me) => y(at, me)), ee(a, u);
5582
- }, rc = (a) => {
5583
- var u = xf(), f = $(u), g = $(f), T = $(g, !0);
5597
+ }), I(Vt), I(ut), I(u), fe(() => u.disabled = !s(lt).available), ur(g, () => s(Rt), (me) => y(Rt, me)), ve("change", L, mn), ur(L, () => s(bt), (me) => y(bt, me)), ve("change", F, mn), Fe(F, () => s(Nt), (me) => y(Nt, me)), ve("change", X, mn), Fe(X, () => s(jt), (me) => y(jt, me)), Fe(Vt, () => s(at), (me) => y(at, me)), ee(a, u);
5598
+ }, nc = (a) => {
5599
+ var u = Cf(), v = $(u), g = $(v), T = $(g, !0);
5584
5600
  I(g);
5585
- var M = A(g, 2), L = (V) => {
5586
- var Z = Pf(), oe = $(Z, !0);
5587
- I(Z), fe(() => pe(oe, s(Se).description)), ee(V, Z);
5601
+ var M = A(g, 2), L = (z) => {
5602
+ var Z = Of(), oe = $(Z, !0);
5603
+ I(Z), fe(() => pe(oe, s(Se).description)), ee(z, Z);
5588
5604
  };
5589
- Je(M, (V) => {
5590
- s(Se).description && V(L);
5591
- }), I(f);
5592
- var R = A(f, 2), F = (V) => {
5593
- var Z = Cu(), oe = mu(Z);
5594
- rd(oe, () => s(Se).tagName, !1, (W, X) => {
5605
+ Je(M, (z) => {
5606
+ s(Se).description && z(L);
5607
+ }), I(v);
5608
+ var R = A(v, 2), F = (z) => {
5609
+ var Z = Nu(), oe = _u(Z);
5610
+ nd(oe, () => s(Se).tagName, !1, (W, X) => {
5595
5611
  qn(W, (be) => y(ln, be, !0), () => s(ln));
5596
- var Ae = (be) => Al(s(Se).id, be);
5597
- pd(W, (be) => ({
5612
+ var Ae = (be) => Il(s(Se).id, be);
5613
+ md(W, (be) => ({
5598
5614
  class: "pie-tts-custom-provider-element",
5599
5615
  ...be,
5600
5616
  onchange: Ae
5601
- }), [() => Il(s(Se))], void 0, void 0, "svelte-3sm1sy");
5602
- }), ee(V, Z);
5603
- }, j = (V) => {
5604
- var Z = Mf();
5605
- ee(V, Z);
5617
+ }), [() => Pl(s(Se))], void 0, void 0, "svelte-3sm1sy");
5618
+ }), ee(z, Z);
5619
+ }, j = (z) => {
5620
+ var Z = Lf();
5621
+ ee(z, Z);
5606
5622
  };
5607
- Je(R, (V) => {
5608
- s(Se).mode === "component" ? V(F) : V(j, -1);
5609
- }), I(u), fe((V) => {
5610
- u.disabled = V, pe(T, s(Se).label);
5611
- }, [() => !Ve().available]), ee(a, u);
5623
+ Je(R, (z) => {
5624
+ s(Se).mode === "component" ? z(F) : z(j, -1);
5625
+ }), I(u), fe((z) => {
5626
+ u.disabled = z, pe(T, s(Se).label);
5627
+ }, [() => !ze().available]), ee(a, u);
5612
5628
  };
5613
5629
  Je(ns, (a) => {
5614
- s(v) === "browser" ? a(Zl) : s(v) === "polly" ? a(ec, 1) : s(v) === "google" ? a(tc, 2) : s(Se) && a(rc, 3);
5630
+ s(f) === "browser" ? a(tc) : s(f) === "polly" ? a(rc, 1) : s(f) === "google" ? a(ic, 2) : s(Se) && a(nc, 3);
5615
5631
  });
5616
5632
  var In = A(ns, 2), $n = $(In), os = A($($n), 2), Pn = $(os);
5617
5633
  let ss;
@@ -5619,75 +5635,75 @@ function zf(e, t) {
5619
5635
  let ls;
5620
5636
  I(os), I($n);
5621
5637
  var Mn = A($n, 4);
5622
- _u(Mn);
5623
- var xn = A(Mn, 2), cs = $(xn), us = A(cs, 2), ic = $(us), nc = (a) => {
5638
+ bu(Mn);
5639
+ var xn = A(Mn, 2), cs = $(xn), us = A(cs, 2), oc = $(us), sc = (a) => {
5624
5640
  var u = Ti("SSML is unsupported in Browser preview.");
5625
5641
  ee(a, u);
5626
- }, oc = (a) => {
5642
+ }, ac = (a) => {
5627
5643
  var u = Ti("SSML preserved. Tracking disabled.");
5628
5644
  ee(a, u);
5629
- }, sc = (a) => {
5645
+ }, lc = (a) => {
5630
5646
  var u = Ti("Tracking enabled when provider returns speech marks.");
5631
5647
  ee(a, u);
5632
- }, ac = /* @__PURE__ */ At(() => !ct(s(v))), lc = (a) => {
5648
+ }, cc = /* @__PURE__ */ At(() => !ct(s(f))), uc = (a) => {
5633
5649
  var u = Ti("Tracking enabled while preview plays.");
5634
5650
  ee(a, u);
5635
5651
  };
5636
- Je(ic, (a) => {
5637
- s(v) === "browser" && s(S) === "ssml" ? a(nc) : s(v) === "google" && s(S) === "ssml" ? a(oc, 1) : s(ac) ? a(sc, 2) : a(lc, -1);
5652
+ Je(oc, (a) => {
5653
+ s(f) === "browser" && s(S) === "ssml" ? a(sc) : s(f) === "google" && s(S) === "ssml" ? a(ac, 1) : s(cc) ? a(lc, 2) : a(uc, -1);
5638
5654
  }), I(us), I(xn);
5639
5655
  var ds = A(xn, 2);
5640
- Fr(ds, 21, () => Vl(s(O)), Dr, (a, u) => {
5641
- var f = Of();
5656
+ Fr(ds, 21, () => Dl(s(O)), Dr, (a, u) => {
5657
+ var v = Rf();
5642
5658
  let g;
5643
- var T = $(f, !0);
5644
- I(f), fe(() => {
5645
- g = fr(f, 1, "svelte-3sm1sy", null, g, { "pie-tts-preview-active": s(u).active }), pe(T, s(u).text);
5646
- }), ee(a, f);
5659
+ var T = $(v, !0);
5660
+ I(v), fe(() => {
5661
+ g = fr(v, 1, "svelte-3sm1sy", null, g, { "pie-tts-preview-active": s(u).active }), pe(T, s(u).text);
5662
+ }), ee(a, v);
5647
5663
  }), I(ds), I(In);
5648
- var fs = A(In, 2), cc = (a) => {
5649
- var u = Lf(), f = $(u), g = $(f, !0);
5650
- I(f), I(u), fe(() => pe(g, s(_))), ee(a, u);
5664
+ var fs = A(In, 2), dc = (a) => {
5665
+ var u = Nf(), v = $(u), g = $(v, !0);
5666
+ I(v), I(u), fe(() => pe(g, s(_))), ee(a, u);
5651
5667
  };
5652
5668
  Je(fs, (a) => {
5653
- s(_) && a(cc);
5669
+ s(_) && a(dc);
5654
5670
  });
5655
- var vs = A(fs, 2), uc = (a) => {
5656
- var u = Cf(), f = $(u), g = $(f, !0);
5657
- I(f), I(u), fe(() => pe(g, s(m))), ee(a, u);
5671
+ var vs = A(fs, 2), fc = (a) => {
5672
+ var u = jf(), v = $(u), g = $(v, !0);
5673
+ I(v), I(u), fe(() => pe(g, s(m))), ee(a, u);
5658
5674
  };
5659
5675
  Je(vs, (a) => {
5660
- s(m) && a(uc);
5676
+ s(m) && a(fc);
5661
5677
  });
5662
- var ps = A(vs, 2), dc = (a) => {
5663
- var u = Rf(), f = $(u), g = $(f, !0);
5664
- I(f), I(u), fe(() => pe(g, s(E))), ee(a, u);
5678
+ var ps = A(vs, 2), vc = (a) => {
5679
+ var u = zf(), v = $(u), g = $(v, !0);
5680
+ I(v), I(u), fe(() => pe(g, s(E))), ee(a, u);
5665
5681
  };
5666
5682
  Je(ps, (a) => {
5667
- s(E) && a(dc);
5683
+ s(E) && a(vc);
5668
5684
  });
5669
- var hs = A(ps, 2), fc = (a) => {
5670
- var u = Nf(), f = $(u), g = $(f, !0);
5671
- I(f), I(u), fe(() => pe(g, s(D))), ee(a, u);
5685
+ var hs = A(ps, 2), pc = (a) => {
5686
+ var u = Vf(), v = $(u), g = $(v, !0);
5687
+ I(v), I(u), fe(() => pe(g, s(D))), ee(a, u);
5672
5688
  };
5673
5689
  Je(hs, (a) => {
5674
- s(D) && a(fc);
5690
+ s(D) && a(pc);
5675
5691
  });
5676
- var ms = A(hs, 2), gs = $(ms), Lr = A(gs, 2), vc = $(Lr, !0);
5692
+ var ms = A(hs, 2), gs = $(ms), Lr = A(gs, 2), hc = $(Lr, !0);
5677
5693
  I(Lr);
5678
- var mi = A(Lr, 2), pc = $(mi, !0);
5694
+ var mi = A(Lr, 2), mc = $(mi, !0);
5679
5695
  return I(mi), I(ms), I(gn), qn(gn, (a) => y(li, a), () => s(li)), I(pi), fe((a, u) => {
5680
- pe(Ul, `Item header row reservation: ${s(xl) ? "Enabled" : "Disabled"}`), ss = fr(Pn, 1, "btn btn-xs join-item", null, ss, { "btn-active": s(S) === "plain" }), ls = fr(as, 1, "btn btn-xs join-item", null, ls, { "btn-active": s(S) === "ssml" }), Lr.disabled = a, pe(vc, s(k) && s(w) === s(v) ? "Stop preview" : "Preview voice"), mi.disabled = u, pe(pc, s(b) ? "Applying..." : "Apply");
5681
- }, [() => !Ve().available || s(b) || !Nl(), () => s(b) || !Ve().available]), ve("click", Xo, ui), Fe(hi, () => s(je), (a) => y(je, a)), ur(Sn, () => s(Lt), (a) => y(Lt, a)), ve("click", Hl, Tl), ve("click", Jl, () => {
5696
+ pe(Gl, `Item header row reservation: ${s(Ll) ? "Enabled" : "Disabled"}`), ss = fr(Pn, 1, "btn btn-xs join-item", null, ss, { "btn-active": s(S) === "plain" }), ls = fr(as, 1, "btn btn-xs join-item", null, ls, { "btn-active": s(S) === "ssml" }), Lr.disabled = a, pe(hc, s(k) && s(w) === s(f) ? "Stop preview" : "Preview voice"), mi.disabled = u, pe(mc, s(b) ? "Applying..." : "Apply");
5697
+ }, [() => !ze().available || s(b) || !zl(), () => s(b) || !ze().available]), ve("click", Xo, ui), Fe(hi, () => s(je), (a) => y(je, a)), ur(Sn, () => s(Lt), (a) => y(Lt, a)), ve("click", ql, Sl), ve("click", Ql, () => {
5682
5698
  pn();
5683
5699
  }), ve("click", Pn, () => Go("plain")), ve("click", as, () => Go("ssml")), ur(Mn, () => s(O), (a) => y(O, a)), ve("click", cs, vi), ve("click", gs, ui), ve("click", Lr, () => {
5684
5700
  Yo();
5685
5701
  }), ve("click", mi, () => {
5686
5702
  Jo();
5687
- }), ee(e, pi), oa(Bl);
5703
+ }), ee(e, pi), aa(Hl);
5688
5704
  }
5689
- qa(["click", "change"]);
5690
- customElements.define("pie-section-player-tools-tts-settings", yd(zf, {
5705
+ Ya(["click", "change"]);
5706
+ customElements.define("pie-section-player-tools-tts-settings", wd(Wf, {
5691
5707
  toolkitCoordinator: {
5692
5708
  attribute: "toolkit-coordinator",
5693
5709
  type: "Object"
@@ -5710,5 +5726,5 @@ customElements.define("pie-section-player-tools-tts-settings", yd(zf, {
5710
5726
  }
5711
5727
  }, [], []));
5712
5728
  export {
5713
- zf as default
5729
+ Wf as default
5714
5730
  };