@pie-players/pie-tool-line-reader 0.3.70 → 0.3.71

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,7 +4,7 @@ if (typeof window < "u") {
4
4
  ((Oo = (Lo = window).__svelte ?? (Lo.__svelte = {})).v ?? (Oo.v = /* @__PURE__ */ new Set())).add("5");
5
5
  }
6
6
  var zr = {}, ye = /* @__PURE__ */ Symbol("uninitialized");
7
- var uu = Array.isArray, hu = Array.prototype.indexOf, ii = Array.prototype.includes, fu = Array.from, si = Object.keys, pn = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, du = Object.getOwnPropertyDescriptors, pu = Object.prototype, gu = Array.prototype, ja = Object.getPrototypeOf, Mo = Object.isExtensible, mu = () => {
7
+ var uu = Array.isArray, hu = Array.prototype.indexOf, ii = Array.prototype.includes, du = Array.from, si = Object.keys, pn = Object.defineProperty, sr = Object.getOwnPropertyDescriptor, fu = Object.getOwnPropertyDescriptors, pu = Object.prototype, gu = Array.prototype, ja = Object.getPrototypeOf, Mo = Object.isExtensible, mu = () => {
8
8
  };
9
9
  function vu(e) {
10
10
  for (var t = 0; t < e.length; t++) e[t]();
@@ -160,13 +160,13 @@ function Po(e, t) {
160
160
  function ju(e, t) {
161
161
  return e?.[Eu]?.(t), e;
162
162
  }
163
- var fe = null;
163
+ var de = null;
164
164
  function Ur(e) {
165
- fe = e;
165
+ de = e;
166
166
  }
167
167
  function Qa(e, t = !1, r) {
168
- fe = {
169
- p: fe,
168
+ de = {
169
+ p: de,
170
170
  i: !1,
171
171
  c: null,
172
172
  e: null,
@@ -181,18 +181,18 @@ function Qa(e, t = !1, r) {
181
181
  };
182
182
  }
183
183
  function Za(e) {
184
- var t = fe, r = t.e;
184
+ var t = de, r = t.e;
185
185
  if (r !== null) {
186
186
  t.e = null;
187
187
  for (var n of r) Tl(n);
188
188
  }
189
- return e !== void 0 && (t.x = e), t.i = !0, fe = t.p, Hs(e);
189
+ return e !== void 0 && (t.x = e), t.i = !0, de = t.p, Hs(e);
190
190
  }
191
191
  function Hs(e = {}) {
192
192
  return pn(e, qa, { value: !0 }), e;
193
193
  }
194
194
  function wn() {
195
- return !_n || fe !== null && fe.l === null;
195
+ return !_n || de !== null && de.l === null;
196
196
  }
197
197
  var tr = [];
198
198
  function el() {
@@ -200,7 +200,7 @@ function el() {
200
200
  tr = [], vu(e);
201
201
  }
202
202
  function hr(e) {
203
- if (tr.length === 0 && !fn) {
203
+ if (tr.length === 0 && !dn) {
204
204
  var t = tr;
205
205
  queueMicrotask(() => {
206
206
  t === tr && el();
@@ -263,20 +263,20 @@ function Xu(e, t, r, n) {
263
263
  ai();
264
264
  }
265
265
  }
266
- var d = nl();
266
+ var f = nl();
267
267
  if (r.length === 0) {
268
- c.then(() => u([])).finally(d);
268
+ c.then(() => u([])).finally(f);
269
269
  return;
270
270
  }
271
271
  function h() {
272
- Promise.all(r.map((p) => /* @__PURE__ */ Qu(p))).then(u).catch((p) => _t(p, a)).finally(d);
272
+ Promise.all(r.map((p) => /* @__PURE__ */ Qu(p))).then(u).catch((p) => _t(p, a)).finally(f);
273
273
  }
274
274
  c ? c.then(() => {
275
275
  l(), h(), ai();
276
276
  }) : h();
277
277
  }
278
278
  function Ku() {
279
- var e = V, t = Q, r = fe, n = X;
279
+ var e = V, t = Q, r = de, n = X;
280
280
  if (0) var i;
281
281
  return function(o = !0) {
282
282
  wt(e), Ke(t), Ur(r), o && (e.f & 16384) === 0 && (n?.activate(), n?.apply());
@@ -296,7 +296,7 @@ function nl() {
296
296
  function mn(e) {
297
297
  var t = 2 | Be;
298
298
  return V !== null && (V.f |= Gr), {
299
- ctx: fe,
299
+ ctx: de,
300
300
  deps: null,
301
301
  effects: null,
302
302
  equals: Ka,
@@ -328,23 +328,23 @@ function Qu(e, t, r) {
328
328
  }
329
329
  var u = X;
330
330
  if (o) {
331
- if ((l.f & 32768) !== 0) var d = nl();
331
+ if ((l.f & 32768) !== 0) var f = nl();
332
332
  if (n.b?.is_rendered()) u.async_deriveds.get(l)?.reject(sn);
333
333
  else for (const p of a.values()) p.reject(sn);
334
334
  a.add(c), u.async_deriveds.set(l, c);
335
335
  }
336
336
  const h = (p, g = void 0) => {
337
- d?.(), a.delete(c), g !== sn && (u.activate(), g ? (s.f |= oi, gi(s, g)) : ((s.f & 8388608) !== 0 && (s.f ^= oi), gi(s, p)), u.deactivate());
337
+ f?.(), a.delete(c), g !== sn && (u.activate(), g ? (s.f |= oi, gi(s, g)) : ((s.f & 8388608) !== 0 && (s.f ^= oi), gi(s, p)), u.deactivate());
338
338
  };
339
339
  c.promise.then(h, (p) => h(null, p || "unknown"));
340
340
  }), vh(() => {
341
341
  for (const l of a) l.reject(sn);
342
342
  }), new Promise((l) => {
343
343
  function c(u) {
344
- function d() {
344
+ function f() {
345
345
  u === i ? l(s) : c(i);
346
346
  }
347
- u.then(d, d);
347
+ u.then(f, f);
348
348
  }
349
349
  c(i);
350
350
  });
@@ -415,10 +415,10 @@ function z(e, t, r) {
415
415
  function v(e, t) {
416
416
  return e.get(q(e, t));
417
417
  }
418
- var ll, li = null, Cr = null, X = null, as = null, Ce = null, ls = null, fn = !1, Fi = !1, Wr = null, ci = null, cl = 0;
419
- var th = 1, ui = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), hi = /* @__PURE__ */ new WeakMap(), Gn = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), on = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), fr = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), an = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakSet(), vr = class ul {
418
+ var ll, li = null, Cr = null, X = null, as = null, Ce = null, ls = null, dn = !1, Fi = !1, Wr = null, ci = null, cl = 0;
419
+ var th = 1, ui = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap(), rr = /* @__PURE__ */ new WeakMap(), hi = /* @__PURE__ */ new WeakMap(), Gn = /* @__PURE__ */ new WeakMap(), Or = /* @__PURE__ */ new WeakMap(), Zt = /* @__PURE__ */ new WeakMap(), on = /* @__PURE__ */ new WeakMap(), Ye = /* @__PURE__ */ new WeakMap(), cs = /* @__PURE__ */ new WeakMap(), dr = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), Qn = /* @__PURE__ */ new WeakMap(), an = /* @__PURE__ */ new WeakMap(), me = /* @__PURE__ */ new WeakSet(), vr = class ul {
420
420
  constructor() {
421
- Ws(this, me), S(this, "id", th++), j(this, ui, !1), S(this, "linked", !0), j(this, or, null), j(this, rr, null), S(this, "async_deriveds", /* @__PURE__ */ new Map()), S(this, "current", /* @__PURE__ */ new Map()), S(this, "previous", /* @__PURE__ */ new Map()), j(this, hi, /* @__PURE__ */ new Set()), j(this, Gn, /* @__PURE__ */ new Set()), j(this, Or, 0), j(this, Zt, /* @__PURE__ */ new Map()), j(this, on, null), j(this, Ye, []), j(this, cs, []), j(this, fr, /* @__PURE__ */ new Set()), j(this, xt, /* @__PURE__ */ new Set()), j(this, jt, /* @__PURE__ */ new Map()), j(this, Qn, /* @__PURE__ */ new Set()), S(this, "is_fork", !1), j(this, an, !1), Cr === null ? li = Cr = this : (z(rr, Cr, this), z(or, this, Cr)), Cr = this;
421
+ Ws(this, me), S(this, "id", th++), j(this, ui, !1), S(this, "linked", !0), j(this, or, null), j(this, rr, null), S(this, "async_deriveds", /* @__PURE__ */ new Map()), S(this, "current", /* @__PURE__ */ new Map()), S(this, "previous", /* @__PURE__ */ new Map()), j(this, hi, /* @__PURE__ */ new Set()), j(this, Gn, /* @__PURE__ */ new Set()), j(this, Or, 0), j(this, Zt, /* @__PURE__ */ new Map()), j(this, on, null), j(this, Ye, []), j(this, cs, []), j(this, dr, /* @__PURE__ */ new Set()), j(this, xt, /* @__PURE__ */ new Set()), j(this, jt, /* @__PURE__ */ new Map()), j(this, Qn, /* @__PURE__ */ new Set()), S(this, "is_fork", !1), j(this, an, !1), Cr === null ? li = Cr = this : (z(rr, Cr, this), z(or, this, Cr)), Cr = this;
422
422
  }
423
423
  skip_effect(t) {
424
424
  v(jt, this).has(t) || v(jt, this).set(t, {
@@ -448,7 +448,7 @@ var th = 1, ui = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap
448
448
  }
449
449
  flush() {
450
450
  try {
451
- Fi = !0, X = this, q(me, this, fi).call(this);
451
+ Fi = !0, X = this, q(me, this, di).call(this);
452
452
  } finally {
453
453
  cl = 0, ls = null, Wr = null, ci = null, Fi = !1, X = null, Ce = null, Tt.clear();
454
454
  }
@@ -457,7 +457,7 @@ var th = 1, ui = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap
457
457
  for (const t of v(Gn, this)) t(this);
458
458
  v(Gn, this).clear();
459
459
  for (const t of this.async_deriveds.values()) t.reject(sn);
460
- q(me, this, di).call(this), v(on, this)?.resolve();
460
+ q(me, this, fi).call(this), v(on, this)?.resolve();
461
461
  }
462
462
  register_created_effect(t) {
463
463
  v(cs, this).push(t);
@@ -478,7 +478,7 @@ var th = 1, ui = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap
478
478
  }));
479
479
  }
480
480
  transfer_effects(t, r) {
481
- for (const n of t) v(fr, this).add(n);
481
+ for (const n of t) v(dr, this).add(n);
482
482
  for (const n of r) v(xt, this).add(n);
483
483
  t.clear(), r.clear();
484
484
  }
@@ -494,7 +494,7 @@ var th = 1, ui = /* @__PURE__ */ new WeakMap(), or = /* @__PURE__ */ new WeakMap
494
494
  static ensure() {
495
495
  if (X === null) {
496
496
  const t = X = new ul();
497
- !Fi && !fn && hr(() => {
497
+ !Fi && !dn && hr(() => {
498
498
  v(ui, t) || t.flush();
499
499
  });
500
500
  }
@@ -554,9 +554,9 @@ function $o() {
554
554
  }
555
555
  return !1;
556
556
  }
557
- function fi() {
558
- z(ui, this, !0), cl++ > 1e3 && (q(me, this, di).call(this), sh());
559
- for (const a of v(fr, this))
557
+ function di() {
558
+ z(ui, this, !0), cl++ > 1e3 && (q(me, this, fi).call(this), sh());
559
+ for (const a of v(dr, this))
560
560
  v(xt, this).delete(a), pe(a, Be), this.schedule(a);
561
561
  for (const a of v(xt, this))
562
562
  pe(a, mr), this.schedule(a);
@@ -574,8 +574,8 @@ function fi() {
574
574
  }
575
575
  if (Wr = null, ci = null, q(me, this, $o).call(this)) {
576
576
  q(me, this, ln).call(this, r), q(me, this, ln).call(this, t);
577
- for (const [a, l] of v(jt, this)) dl(a, l);
578
- n.length > 0 && q(me, X, fi).call(X);
577
+ for (const [a, l] of v(jt, this)) fl(a, l);
578
+ n.length > 0 && q(me, X, di).call(X);
579
579
  return;
580
580
  }
581
581
  const s = q(me, this, rh).call(this);
@@ -583,16 +583,16 @@ function fi() {
583
583
  q(me, this, ln).call(this, r), q(me, this, ln).call(this, t), q(me, s, nh).call(s, this);
584
584
  return;
585
585
  }
586
- v(fr, this).clear(), v(xt, this).clear();
586
+ v(dr, this).clear(), v(xt, this).clear();
587
587
  for (const a of v(hi, this)) a(this);
588
588
  v(hi, this).clear(), as = this, Do(r), Do(t), as = null, v(on, this)?.resolve();
589
589
  var o = X;
590
- if (v(Or, this) === 0 && (v(Ye, this).length === 0 || o !== null) && (q(me, this, di).call(this), At && (q(me, this, ih).call(this), X = o)), v(Ye, this).length > 0)
590
+ if (v(Or, this) === 0 && (v(Ye, this).length === 0 || o !== null) && (q(me, this, fi).call(this), At && (q(me, this, ih).call(this), X = o)), v(Ye, this).length > 0)
591
591
  if (o !== null) {
592
592
  const a = o;
593
593
  v(Ye, a).push(...v(Ye, this).filter((l) => !v(Ye, a).includes(l)));
594
594
  } else o = this;
595
- o !== null && (Tt.clear(), q(me, o, fi).call(o));
595
+ o !== null && (Tt.clear(), q(me, o, di).call(o));
596
596
  }
597
597
  function hl(e, t, r) {
598
598
  e.f ^= Xe;
@@ -632,7 +632,7 @@ function nh(e) {
632
632
  const i = this.async_deriveds.get(r);
633
633
  i && n.promise.then(i.resolve).catch(i.reject);
634
634
  }
635
- e.async_deriveds.clear(), this.transfer_effects(v(fr, e), v(xt, e));
635
+ e.async_deriveds.clear(), this.transfer_effects(v(dr, e), v(xt, e));
636
636
  const t = (r) => {
637
637
  var n = r.reactions;
638
638
  if (n !== null && !((r.f & 2) !== 0 && (r.f & 6144) === 0))
@@ -646,45 +646,45 @@ function nh(e) {
646
646
  }
647
647
  };
648
648
  for (const r of this.current.keys()) t(r);
649
- this.oncommit(() => e.discard()), q(me, e, di).call(e), X = this, q(me, this, fi).call(this);
649
+ this.oncommit(() => e.discard()), q(me, e, fi).call(e), X = this, q(me, this, di).call(this);
650
650
  }
651
651
  function ln(e) {
652
- for (var t = 0; t < e.length; t += 1) rl(e[t], v(fr, this), v(xt, this));
652
+ for (var t = 0; t < e.length; t += 1) rl(e[t], v(dr, this), v(xt, this));
653
653
  }
654
654
  function ih() {
655
655
  for (let u = li; u !== null; u = v(rr, u)) {
656
656
  var e = u.id < this.id, t = [];
657
- for (const [d, [h, p]] of this.current) {
658
- if (u.current.has(d)) {
659
- var r = u.current.get(d)[0];
660
- if (e && h !== r) u.current.set(d, [h, p]);
657
+ for (const [f, [h, p]] of this.current) {
658
+ if (u.current.has(f)) {
659
+ var r = u.current.get(f)[0];
660
+ if (e && h !== r) u.current.set(f, [h, p]);
661
661
  else continue;
662
662
  }
663
- t.push(d);
663
+ t.push(f);
664
664
  }
665
- if (e) for (const [d, h] of this.async_deriveds) {
666
- const p = u.async_deriveds.get(d);
665
+ if (e) for (const [f, h] of this.async_deriveds) {
666
+ const p = u.async_deriveds.get(f);
667
667
  p && h.promise.then(p.resolve).catch(p.reject);
668
668
  }
669
- var n = [...u.current.keys()].filter((d) => !u.current.get(d)[1]);
669
+ var n = [...u.current.keys()].filter((f) => !u.current.get(f)[1]);
670
670
  if (!(!v(ui, u) || n.length === 0)) {
671
- var i = n.filter((d) => !this.current.has(d));
671
+ var i = n.filter((f) => !this.current.has(f));
672
672
  if (i.length === 0)
673
673
  e && u.discard();
674
674
  else if (t.length > 0) {
675
- if (e) for (const d of v(Qn, this)) u.unskip_effect(d, (h) => {
675
+ if (e) for (const f of v(Qn, this)) u.unskip_effect(f, (h) => {
676
676
  (h.f & 4194320) !== 0 ? u.schedule(h) : q(me, u, ln).call(u, [h]);
677
677
  });
678
678
  u.activate();
679
679
  var s = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Map();
680
- for (var a of t) fl(a, i, s, o);
680
+ for (var a of t) dl(a, i, s, o);
681
681
  o = /* @__PURE__ */ new Map();
682
- var l = [...u.current].filter(([d, h]) => {
683
- const p = this.current.get(d);
682
+ var l = [...u.current].filter(([f, h]) => {
683
+ const p = this.current.get(f);
684
684
  return p ? p[0] !== h[0] || p[1] !== h[1] : !0;
685
- }).map(([d]) => d);
685
+ }).map(([f]) => f);
686
686
  if (l.length > 0)
687
- for (const d of v(cs, this)) (d.f & 155648) === 0 && Bs(d, l, o) && ((d.f & 4194320) !== 0 ? (pe(d, Be), u.schedule(d)) : v(fr, u).add(d));
687
+ for (const f of v(cs, this)) (f.f & 155648) === 0 && Bs(f, l, o) && ((f.f & 4194320) !== 0 ? (pe(f, Be), u.schedule(f)) : v(dr, u).add(f));
688
688
  if (v(Ye, u).length > 0 && !v(an, u)) {
689
689
  u.apply();
690
690
  for (var c of v(Ye, u)) q(me, u, hl).call(u, c, [], []);
@@ -695,15 +695,15 @@ function ih() {
695
695
  }
696
696
  }
697
697
  }
698
- function di() {
698
+ function fi() {
699
699
  if (this.linked) {
700
700
  var e = v(or, this), t = v(rr, this);
701
701
  e === null ? li = t : z(rr, e, t), t === null ? Cr = e : z(or, t, e), this.linked = !1;
702
702
  }
703
703
  }
704
704
  function us(e) {
705
- var t = fn;
706
- fn = !0;
705
+ var t = dn;
706
+ dn = !0;
707
707
  try {
708
708
  var r;
709
709
  for (e && (X !== null && !X.is_fork && X.flush(), r = e()); ; ) {
@@ -711,7 +711,7 @@ function us(e) {
711
711
  X.flush();
712
712
  }
713
713
  } finally {
714
- fn = t;
714
+ dn = t;
715
715
  }
716
716
  }
717
717
  function sh() {
@@ -751,11 +751,11 @@ function Do(e) {
751
751
  bt = null;
752
752
  }
753
753
  }
754
- function fl(e, t, r, n) {
754
+ function dl(e, t, r, n) {
755
755
  if (!r.has(e) && (r.add(e), e.reactions !== null))
756
756
  for (const i of e.reactions) {
757
757
  const s = i.f;
758
- (s & 2) !== 0 ? fl(i, t, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && Bs(i, t, n) && (pe(i, Be), js(i));
758
+ (s & 2) !== 0 ? dl(i, t, r, n) : (s & 4194320) !== 0 && (s & 2048) === 0 && Bs(i, t, n) && (pe(i, Be), js(i));
759
759
  }
760
760
  }
761
761
  function Bs(e, t, r) {
@@ -771,11 +771,11 @@ function Bs(e, t, r) {
771
771
  function js(e) {
772
772
  X.schedule(e);
773
773
  }
774
- function dl(e, t) {
774
+ function fl(e, t) {
775
775
  if (!((e.f & 32) !== 0 && (e.f & 1024) !== 0)) {
776
776
  (e.f & 2048) !== 0 ? t.d.push(e) : (e.f & 4096) !== 0 && t.m.push(e), pe(e, Xe);
777
777
  for (var r = e.first; r !== null; )
778
- dl(r, t), r = r.next;
778
+ fl(r, t), r = r.next;
779
779
  }
780
780
  }
781
781
  function pl(e) {
@@ -804,9 +804,9 @@ function _e(e, t) {
804
804
  // @__NO_SIDE_EFFECTS__
805
805
  function oh(e, t = !1, r = !0) {
806
806
  const n = En(e);
807
- if (t || (n.equals = Ja), _n && r && fe !== null && fe.l !== null) {
807
+ if (t || (n.equals = Ja), _n && r && de !== null && de.l !== null) {
808
808
  var i;
809
- ((i = fe.l).s ?? (i.s = [])).push(n);
809
+ ((i = de.l).s ?? (i.s = [])).push(n);
810
810
  }
811
811
  return n;
812
812
  }
@@ -841,7 +841,7 @@ function ah() {
841
841
  }
842
842
  pi.clear();
843
843
  }
844
- function dn(e) {
844
+ function fn(e) {
845
845
  ie(e, e.v + 1);
846
846
  }
847
847
  function ml(e, t, r) {
@@ -856,8 +856,8 @@ function ml(e, t, r) {
856
856
  var u = a;
857
857
  Ce?.delete(u), (l & 65536) === 0 && (l & 512 && (V === null || (V.f & 2097152) === 0) && (a.f |= Sn), ml(u, mr, r));
858
858
  } else if (c) {
859
- var d = a;
860
- (l & 16) !== 0 && bt !== null && bt.add(d), r !== null ? r.push(d) : js(d);
859
+ var f = a;
860
+ (l & 16) !== 0 && bt !== null && bt.add(f), r !== null ? r.push(f) : js(f);
861
861
  }
862
862
  }
863
863
  }
@@ -867,25 +867,25 @@ function Gt(e) {
867
867
  if (typeof e != "object" || e === null || hn in e || qa in e) return e;
868
868
  const t = ja(e);
869
869
  if (t !== pu && t !== gu) return e;
870
- var r = /* @__PURE__ */ new Map(), n = uu(e), i = /* @__PURE__ */ _e(0), s = null, o = ar, a = (d) => {
871
- if (ar === o) return d();
870
+ var r = /* @__PURE__ */ new Map(), n = uu(e), i = /* @__PURE__ */ _e(0), s = null, o = ar, a = (f) => {
871
+ if (ar === o) return f();
872
872
  var h = Q, p = ar;
873
873
  Ke(null), Wo(o);
874
- var g = d();
874
+ var g = f();
875
875
  return Ke(h), Wo(p), g;
876
876
  };
877
877
  n && r.set("length", /* @__PURE__ */ _e(e.length, s));
878
878
  var l = "";
879
879
  let c = !1;
880
- function u(d) {
880
+ function u(f) {
881
881
  if (!c) {
882
- c = !0, l = d, Po(i, `${l} version`);
882
+ c = !0, l = f, Po(i, `${l} version`);
883
883
  for (const [h, p] of r) Po(p, ch(l, h));
884
884
  c = !1;
885
885
  }
886
886
  }
887
887
  return new Proxy(e, {
888
- defineProperty(d, h, p) {
888
+ defineProperty(f, h, p) {
889
889
  (!("value" in p) || p.configurable === !1 || p.enumerable === !1 || p.writable === !1) && zu();
890
890
  var g = r.get(h);
891
891
  return g === void 0 ? a(() => {
@@ -893,31 +893,31 @@ function Gt(e) {
893
893
  return r.set(h, m), m;
894
894
  }) : ie(g, p.value, !0), !0;
895
895
  },
896
- deleteProperty(d, h) {
896
+ deleteProperty(f, h) {
897
897
  var p = r.get(h);
898
898
  if (p === void 0) {
899
- if (h in d) {
899
+ if (h in f) {
900
900
  const g = a(() => /* @__PURE__ */ _e(ye, s));
901
- r.set(h, g), dn(i);
901
+ r.set(h, g), fn(i);
902
902
  }
903
903
  } else
904
- ie(p, ye), dn(i);
904
+ ie(p, ye), fn(i);
905
905
  return !0;
906
906
  },
907
- get(d, h, p) {
907
+ get(f, h, p) {
908
908
  if (h === hn) return e;
909
- var g = r.get(h), m = h in d;
910
- if (g === void 0 && (!m || sr(d, h)?.writable) && (g = a(() => {
911
- var E = Gt(m ? d[h] : ye), R = /* @__PURE__ */ _e(E, s);
909
+ var g = r.get(h), m = h in f;
910
+ if (g === void 0 && (!m || sr(f, h)?.writable) && (g = a(() => {
911
+ var E = Gt(m ? f[h] : ye), R = /* @__PURE__ */ _e(E, s);
912
912
  return R;
913
913
  }), r.set(h, g)), g !== void 0) {
914
914
  var b = T(g);
915
915
  return b === ye ? void 0 : b;
916
916
  }
917
- return Reflect.get(d, h, p);
917
+ return Reflect.get(f, h, p);
918
918
  },
919
- getOwnPropertyDescriptor(d, h) {
920
- var p = Reflect.getOwnPropertyDescriptor(d, h);
919
+ getOwnPropertyDescriptor(f, h) {
920
+ var p = Reflect.getOwnPropertyDescriptor(f, h);
921
921
  if (p && "value" in p) {
922
922
  var g = r.get(h);
923
923
  g && (p.value = T(g));
@@ -932,44 +932,44 @@ function Gt(e) {
932
932
  }
933
933
  return p;
934
934
  },
935
- has(d, h) {
935
+ has(f, h) {
936
936
  if (h === hn) return !0;
937
- var p = r.get(h), g = p !== void 0 && p.v !== ye || Reflect.has(d, h);
938
- return (p !== void 0 || V !== null && (!g || sr(d, h)?.writable)) && (p === void 0 && (p = a(() => {
939
- var m = g ? Gt(d[h]) : ye, b = /* @__PURE__ */ _e(m, s);
937
+ var p = r.get(h), g = p !== void 0 && p.v !== ye || Reflect.has(f, h);
938
+ return (p !== void 0 || V !== null && (!g || sr(f, h)?.writable)) && (p === void 0 && (p = a(() => {
939
+ var m = g ? Gt(f[h]) : ye, b = /* @__PURE__ */ _e(m, s);
940
940
  return b;
941
941
  }), r.set(h, p)), T(p) === ye) ? !1 : g;
942
942
  },
943
- set(d, h, p, g) {
944
- var m = r.get(h), b = h in d;
943
+ set(f, h, p, g) {
944
+ var m = r.get(h), b = h in f;
945
945
  if (n && h === "length") for (var E = p; E < m.v; E += 1) {
946
946
  var R = r.get(E + "");
947
- R !== void 0 ? ie(R, ye) : E in d && (R = a(() => /* @__PURE__ */ _e(ye, s)), r.set(E + "", R));
947
+ R !== void 0 ? ie(R, ye) : E in f && (R = a(() => /* @__PURE__ */ _e(ye, s)), r.set(E + "", R));
948
948
  }
949
949
  if (m === void 0)
950
- (!b || sr(d, h)?.writable) && (m = a(() => /* @__PURE__ */ _e(void 0, s)), ie(m, Gt(p)), r.set(h, m));
950
+ (!b || sr(f, h)?.writable) && (m = a(() => /* @__PURE__ */ _e(void 0, s)), ie(m, Gt(p)), r.set(h, m));
951
951
  else {
952
952
  b = m.v !== ye;
953
953
  var $ = a(() => Gt(p));
954
954
  ie(m, $);
955
955
  }
956
- var L = Reflect.getOwnPropertyDescriptor(d, h);
956
+ var L = Reflect.getOwnPropertyDescriptor(f, h);
957
957
  if (L?.set && L.set.call(g, p), !b) {
958
958
  if (n && typeof h == "string") {
959
959
  var Z = r.get("length"), D = Number(h);
960
960
  Number.isInteger(D) && D >= Z.v && ie(Z, D + 1);
961
961
  }
962
- dn(i);
962
+ fn(i);
963
963
  }
964
964
  return !0;
965
965
  },
966
- ownKeys(d) {
966
+ ownKeys(f) {
967
967
  T(i);
968
- var h = Reflect.ownKeys(d).filter((m) => {
968
+ var h = Reflect.ownKeys(f).filter((m) => {
969
969
  var b = r.get(m);
970
970
  return b === void 0 || b.v !== ye;
971
971
  });
972
- for (var [p, g] of r) g.v !== ye && !(p in d) && h.push(p);
972
+ for (var [p, g] of r) g.v !== ye && !(p in f) && h.push(p);
973
973
  return h;
974
974
  },
975
975
  setPrototypeOf() {
@@ -992,7 +992,7 @@ function Rt(e = "") {
992
992
  return document.createTextNode(e);
993
993
  }
994
994
  // @__NO_SIDE_EFFECTS__
995
- function dr(e) {
995
+ function fr(e) {
996
996
  return yl.call(e);
997
997
  }
998
998
  // @__NO_SIDE_EFFECTS__
@@ -1000,8 +1000,8 @@ function It(e) {
1000
1000
  return bl.call(e);
1001
1001
  }
1002
1002
  function Sl(e, t) {
1003
- if (!ue) return /* @__PURE__ */ dr(e);
1004
- var r = /* @__PURE__ */ dr(oe);
1003
+ if (!ue) return /* @__PURE__ */ fr(e);
1004
+ var r = /* @__PURE__ */ fr(oe);
1005
1005
  if (r === null) r = oe.appendChild(Rt());
1006
1006
  else if (t && r.nodeType !== 3) {
1007
1007
  var n = Rt();
@@ -1011,7 +1011,7 @@ function Sl(e, t) {
1011
1011
  }
1012
1012
  function Ho(e, t = !1) {
1013
1013
  if (!ue) {
1014
- var r = /* @__PURE__ */ dr(e);
1014
+ var r = /* @__PURE__ */ fr(e);
1015
1015
  return r instanceof Comment && r.data === "" ? /* @__PURE__ */ It(r) : r;
1016
1016
  }
1017
1017
  if (t) {
@@ -1024,7 +1024,7 @@ function Ho(e, t = !1) {
1024
1024
  return oe;
1025
1025
  }
1026
1026
  function hh(e, t = !1) {
1027
- if (!ue) return /* @__PURE__ */ dr(e);
1027
+ if (!ue) return /* @__PURE__ */ fr(e);
1028
1028
  var r = Sl(e, t);
1029
1029
  return Ya(e), r;
1030
1030
  }
@@ -1042,10 +1042,10 @@ function qn(e, t = 1, r = !1) {
1042
1042
  }
1043
1043
  return ot(n), n;
1044
1044
  }
1045
- function fh(e) {
1045
+ function dh(e) {
1046
1046
  e.textContent = "";
1047
1047
  }
1048
- function dh() {
1048
+ function fh() {
1049
1049
  return !At || bt !== null ? !1 : (V.f & $s) !== 0;
1050
1050
  }
1051
1051
  function Gs(e, t, r) {
@@ -1093,7 +1093,7 @@ function Et(e, t) {
1093
1093
  var r = V;
1094
1094
  r !== null && (r.f & 8192) !== 0 && (e |= Ps);
1095
1095
  var n = {
1096
- ctx: fe,
1096
+ ctx: de,
1097
1097
  deps: null,
1098
1098
  nodes: null,
1099
1099
  f: e | Be | 512,
@@ -1136,8 +1136,8 @@ function vh(e) {
1136
1136
  function Lr(e) {
1137
1137
  gh("$effect");
1138
1138
  var t = V.f;
1139
- if (!Q && (t & 32) !== 0 && fe !== null && !fe.i) {
1140
- var r = fe;
1139
+ if (!Q && (t & 32) !== 0 && de !== null && !de.i) {
1140
+ var r = de;
1141
1141
  (r.e ?? (r.e = [])).push(e);
1142
1142
  } else return Tl(e);
1143
1143
  }
@@ -1330,13 +1330,13 @@ function Ml(e, t, r = !0) {
1330
1330
  }
1331
1331
  }
1332
1332
  function Il(e) {
1333
- var t = Me, r = ze, n = Ve, i = Q, s = nt, o = fe, a = tt, l = ar, c = e.f;
1333
+ var t = Me, r = ze, n = Ve, i = Q, s = nt, o = de, a = tt, l = ar, c = e.f;
1334
1334
  Me = null, ze = 0, Ve = null, Q = (c & 96) === 0 ? e : null, nt = null, Ur(e.ctx), tt = !1, ar = ++nr, e.ac !== null && (Ti(() => {
1335
1335
  e.ac.abort(Tn);
1336
1336
  }), e.ac = null);
1337
1337
  try {
1338
1338
  e.f |= No;
1339
- var u = e.fn, d = u();
1339
+ var u = e.fn, f = u();
1340
1340
  e.f |= $s;
1341
1341
  var h = Bo(e);
1342
1342
  if (wn() && Ve !== null && !tt && h !== null && (e.f & 6146) === 0) for (var p = 0; p < Ve.length; p++) Ml(Ve[p], e);
@@ -1345,7 +1345,7 @@ function Il(e) {
1345
1345
  if (t !== null) for (const g of t) g.rv = nr;
1346
1346
  Ve !== null && (n === null ? n = Ve : n.push(...Ve));
1347
1347
  }
1348
- return (e.f & 8388608) !== 0 && (e.f ^= oi), d;
1348
+ return (e.f & 8388608) !== 0 && (e.f ^= oi), f;
1349
1349
  } catch (g) {
1350
1350
  return Bo(e), ph(g);
1351
1351
  } finally {
@@ -1432,8 +1432,8 @@ function T(e) {
1432
1432
  var c = l.v;
1433
1433
  return ((l.f & 1024) === 0 && l.reactions !== null || Pl(l)) && (c = Us(l)), Tt.set(l, c), c;
1434
1434
  }
1435
- var u = (l.f & 512) === 0 && !tt && Q !== null && (Zn || (Q.f & 512) !== 0), d = (l.f & $s) === 0;
1436
- xn(l) && (u && (l.f |= 512), sl(l)), u && !d && (ol(l), Nl(l));
1435
+ var u = (l.f & 512) === 0 && !tt && Q !== null && (Zn || (Q.f & 512) !== 0), f = (l.f & $s) === 0;
1436
+ xn(l) && (u && (l.f |= 512), sl(l)), u && !f && (ol(l), Nl(l));
1437
1437
  }
1438
1438
  if (Ce?.has(e)) return Ce.get(e);
1439
1439
  if ((e.f & 8388608) !== 0) throw e.v;
@@ -1459,13 +1459,13 @@ function An(e) {
1459
1459
  tt = t;
1460
1460
  }
1461
1461
  }
1462
- var $r = /* @__PURE__ */ Symbol("events"), $l = /* @__PURE__ */ new Set(), fs = /* @__PURE__ */ new Set();
1462
+ var $r = /* @__PURE__ */ Symbol("events"), $l = /* @__PURE__ */ new Set(), ds = /* @__PURE__ */ new Set();
1463
1463
  function Zr(e, t, r) {
1464
1464
  (t[$r] ?? (t[$r] = {}))[e] = r;
1465
1465
  }
1466
1466
  function Ah(e) {
1467
1467
  for (var t = 0; t < e.length; t++) $l.add(e[t]);
1468
- for (var r of fs) r(e);
1468
+ for (var r of ds) r(e);
1469
1469
  }
1470
1470
  var Hi = null, zi = !1;
1471
1471
  function jo(e) {
@@ -1491,7 +1491,7 @@ function jo(e) {
1491
1491
  return s || r;
1492
1492
  }
1493
1493
  });
1494
- var u = Q, d = V;
1494
+ var u = Q, f = V;
1495
1495
  Ke(null), wt(null);
1496
1496
  try {
1497
1497
  for (var h, p = []; s !== null && s !== t; ) {
@@ -1511,7 +1511,7 @@ function jo(e) {
1511
1511
  throw h;
1512
1512
  }
1513
1513
  } finally {
1514
- e[$r] = t, delete e.currentTarget, Ke(u), wt(d);
1514
+ e[$r] = t, delete e.currentTarget, Ke(u), wt(f);
1515
1515
  }
1516
1516
  }
1517
1517
  }
@@ -1538,10 +1538,10 @@ function Lh(e, t) {
1538
1538
  return () => {
1539
1539
  if (ue)
1540
1540
  return Dr(oe, null), oe;
1541
- i === void 0 && (i = Oh(s ? e : "<!>" + e), r || (i = /* @__PURE__ */ dr(i)));
1541
+ i === void 0 && (i = Oh(s ? e : "<!>" + e), r || (i = /* @__PURE__ */ fr(i)));
1542
1542
  var o = n || vl ? document.importNode(i, !0) : i.cloneNode(!0);
1543
1543
  if (r) {
1544
- var a = /* @__PURE__ */ dr(o), l = o.lastChild;
1544
+ var a = /* @__PURE__ */ fr(o), l = o.lastChild;
1545
1545
  Dr(a, l);
1546
1546
  } else Dr(o, o);
1547
1547
  return o;
@@ -1553,7 +1553,7 @@ function Mh() {
1553
1553
  var e = document.createDocumentFragment(), t = document.createComment(""), r = Rt();
1554
1554
  return e.append(t, r), Dr(t, r), e;
1555
1555
  }
1556
- function ds(e, t) {
1556
+ function fs(e, t) {
1557
1557
  if (ue) {
1558
1558
  var r = V;
1559
1559
  ((r.f & 32768) === 0 || r.nodes.end === null) && (r.nodes.end = oe), Fs();
@@ -1635,9 +1635,9 @@ var $h = [
1635
1635
  function Dh(e) {
1636
1636
  let t = 0, r = En(0), n;
1637
1637
  return () => {
1638
- Vs() && (T(r), Ys(() => (t === 0 && (n = An(() => e(() => dn(r)))), t += 1, () => {
1638
+ Vs() && (T(r), Ys(() => (t === 0 && (n = An(() => e(() => fn(r)))), t += 1, () => {
1639
1639
  hr(() => {
1640
- t -= 1, t === 0 && (n?.(), n = void 0, dn(r));
1640
+ t -= 1, t === 0 && (n?.(), n = void 0, fn(r));
1641
1641
  });
1642
1642
  })));
1643
1643
  };
@@ -1768,7 +1768,7 @@ function mi(e) {
1768
1768
  this.is_pending = !1, e.transfer_effects(v(gs, this), v(ms, this));
1769
1769
  }
1770
1770
  function Ks(e) {
1771
- var t = V, r = Q, n = fe;
1771
+ var t = V, r = Q, n = de;
1772
1772
  wt(v(Ue, this)), Ke(v(Ue, this)), Ur(v(Ue, this).ctx);
1773
1773
  try {
1774
1774
  return vr.ensure(), e();
@@ -1827,7 +1827,7 @@ function Gh(e, t) {
1827
1827
  hs(), t.intro = t.intro ?? !1;
1828
1828
  const r = t.target, n = ue, i = oe;
1829
1829
  try {
1830
- for (var s = /* @__PURE__ */ dr(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ It(s);
1830
+ for (var s = /* @__PURE__ */ fr(r); s && (s.nodeType !== 8 || s.data !== "["); ) s = /* @__PURE__ */ It(s);
1831
1831
  if (!s) throw zr;
1832
1832
  Pr(!0), ot(s);
1833
1833
  const o = Ul(e, {
@@ -1838,7 +1838,7 @@ function Gh(e, t) {
1838
1838
  } catch (o) {
1839
1839
  if (o instanceof Error && o.message.split(`
1840
1840
  `).some((a) => a.startsWith("https://svelte.dev/e/"))) throw o;
1841
- return o !== zr && console.warn("Failed to hydrate: ", o), t.recover === !1 && Fu(), hs(), fh(r), Pr(!1), zl(e, t);
1841
+ return o !== zr && console.warn("Failed to hydrate: ", o), t.recover === !1 && Fu(), hs(), dh(r), Pr(!1), zl(e, t);
1842
1842
  } finally {
1843
1843
  Pr(n), ot(i);
1844
1844
  }
@@ -1851,16 +1851,16 @@ function Ul(e, { target: t, anchor: r, props: n = {}, events: i, context: s, int
1851
1851
  Hh(u, { pending: () => {
1852
1852
  } }, (p) => {
1853
1853
  Qa({});
1854
- var g = fe;
1854
+ var g = de;
1855
1855
  if (s && (g.c = s), i && (n.$$events = i), ue && Dr(p, null), Vo = o, l = e(p, n) || Hs(), Vo = !0, ue && (V.nodes.end = oe, oe === null || oe.nodeType !== 8 || oe.data !== "]"))
1856
1856
  throw Si(), zr;
1857
1857
  Za();
1858
1858
  }, a);
1859
- var d = /* @__PURE__ */ new Set(), h = (p) => {
1859
+ var f = /* @__PURE__ */ new Set(), h = (p) => {
1860
1860
  for (var g = 0; g < p.length; g++) {
1861
1861
  var m = p[g];
1862
- if (!d.has(m)) {
1863
- d.add(m);
1862
+ if (!f.has(m)) {
1863
+ f.add(m);
1864
1864
  var b = Ph(m);
1865
1865
  for (const $ of [t, document]) {
1866
1866
  var E = Yn.get($);
@@ -1871,12 +1871,12 @@ function Ul(e, { target: t, anchor: r, props: n = {}, events: i, context: s, int
1871
1871
  }
1872
1872
  }
1873
1873
  };
1874
- return h(fu($l)), fs.add(h), () => {
1875
- for (var p of d) for (const b of [t, document]) {
1874
+ return h(du($l)), ds.add(h), () => {
1875
+ for (var p of f) for (const b of [t, document]) {
1876
1876
  var g = Yn.get(b), m = g.get(p);
1877
1877
  --m == 0 ? (b.removeEventListener(p, jo), g.delete(p), g.size === 0 && Yn.delete(b)) : g.set(p, m);
1878
1878
  }
1879
- fs.delete(h), u !== r && u.parentNode?.removeChild(u);
1879
+ ds.delete(h), u !== r && u.parentNode?.removeChild(u);
1880
1880
  };
1881
1881
  });
1882
1882
  return vs.set(l, c), l;
@@ -1924,7 +1924,7 @@ var kt = /* @__PURE__ */ new WeakMap(), zt = /* @__PURE__ */ new WeakMap(), Ze =
1924
1924
  }), this.anchor = e, z(Ui, this, t);
1925
1925
  }
1926
1926
  ensure(e, t) {
1927
- var r = X, n = dh();
1927
+ var r = X, n = fh();
1928
1928
  if (t && !v(zt, this).has(e) && !v(Ze, this).has(e))
1929
1929
  if (n) {
1930
1930
  var i = document.createDocumentFragment(), s = Rt();
@@ -1942,7 +1942,7 @@ var kt = /* @__PURE__ */ new WeakMap(), zt = /* @__PURE__ */ new WeakMap(), Ze =
1942
1942
  }
1943
1943
  };
1944
1944
  function Yh(e) {
1945
- fe === null && Mu("onMount"), _n && fe.l !== null ? Xh(fe).m.push(e) : Lr(() => {
1945
+ de === null && Mu("onMount"), _n && de.l !== null ? Xh(de).m.push(e) : Lr(() => {
1946
1946
  const t = An(e);
1947
1947
  if (typeof t == "function") return t;
1948
1948
  });
@@ -2007,20 +2007,20 @@ function Qh(e, t) {
2007
2007
  n && l.push(...Object.keys(n).map(Bi)), i && l.push(...Object.keys(i).map(Bi));
2008
2008
  var c = 0, u = -1;
2009
2009
  const m = e.length;
2010
- for (var d = 0; d < m; d++) {
2011
- var h = e[d];
2012
- if (a ? h === "/" && e[d - 1] === "*" && (a = !1) : s ? s === h && (s = !1) : h === "/" && e[d + 1] === "*" ? a = !0 : h === '"' || h === "'" ? s = h : h === "(" ? o++ : h === ")" && o--, !a && s === !1 && o === 0) {
2013
- if (h === ":" && u === -1) u = d;
2014
- else if (h === ";" || d === m - 1) {
2010
+ for (var f = 0; f < m; f++) {
2011
+ var h = e[f];
2012
+ if (a ? h === "/" && e[f - 1] === "*" && (a = !1) : s ? s === h && (s = !1) : h === "/" && e[f + 1] === "*" ? a = !0 : h === '"' || h === "'" ? s = h : h === "(" ? o++ : h === ")" && o--, !a && s === !1 && o === 0) {
2013
+ if (h === ":" && u === -1) u = f;
2014
+ else if (h === ";" || f === m - 1) {
2015
2015
  if (u !== -1) {
2016
2016
  var p = Bi(e.substring(c, u).trim());
2017
2017
  if (!l.includes(p)) {
2018
- h !== ";" && d++;
2019
- var g = e.substring(c, d).trim();
2018
+ h !== ";" && f++;
2019
+ var g = e.substring(c, f).trim();
2020
2020
  r += " " + g + ";";
2021
2021
  }
2022
2022
  }
2023
- c = d + 1, u = -1;
2023
+ c = f + 1, u = -1;
2024
2024
  }
2025
2025
  }
2026
2026
  }
@@ -2043,28 +2043,28 @@ function Zh(e, t, r, n) {
2043
2043
  } else n && (Array.isArray(n) ? (ji(e, r?.[0], n[0]), ji(e, r?.[1], n[1], "important")) : ji(e, r, n));
2044
2044
  return n;
2045
2045
  }
2046
- var ef = /* @__PURE__ */ Symbol("is custom element"), tf = /* @__PURE__ */ Symbol("is html"), rf = xu ? "link" : "LINK";
2046
+ var ed = /* @__PURE__ */ Symbol("is custom element"), td = /* @__PURE__ */ Symbol("is html"), rd = xu ? "link" : "LINK";
2047
2047
  function mt(e, t, r, n) {
2048
- var i = nf(e);
2049
- if (ue && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === rf)) {
2048
+ var i = nd(e);
2049
+ if (ue && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === rd)) {
2050
2050
  n || void 0;
2051
2051
  return;
2052
2052
  }
2053
- i[t] !== (i[t] = r) && (t === "loading" && (e[wu] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && sf(e).has(t) ? e[t] = r : e.setAttribute(t, r));
2053
+ i[t] !== (i[t] = r) && (t === "loading" && (e[wu] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && id(e).has(t) ? e[t] = r : e.setAttribute(t, r));
2054
2054
  }
2055
- function nf(e) {
2055
+ function nd(e) {
2056
2056
  return e[ss] ?? (e[ss] = {
2057
- [ef]: e.nodeName.includes("-"),
2058
- [tf]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
2057
+ [ed]: e.nodeName.includes("-"),
2058
+ [td]: e.namespaceURI === "http://www.w3.org/1999/xhtml"
2059
2059
  });
2060
2060
  }
2061
2061
  var Ko = /* @__PURE__ */ new Map();
2062
- function sf(e) {
2062
+ function id(e) {
2063
2063
  var t = e.getAttribute("is") || e.nodeName, r = Ko.get(t);
2064
2064
  if (r) return r;
2065
2065
  Ko.set(t, r = /* @__PURE__ */ new Set());
2066
2066
  for (var n, i = e, s = Element.prototype; s !== i; ) {
2067
- n = du(i);
2067
+ n = fu(i);
2068
2068
  for (var o in n) n[o].set && o !== "innerHTML" && o !== "textContent" && o !== "innerText" && r.add(o);
2069
2069
  i = ja(i);
2070
2070
  }
@@ -2076,14 +2076,14 @@ var Wl, Ir = /* @__PURE__ */ new WeakMap(), vi = /* @__PURE__ */ new WeakMap(),
2076
2076
  }
2077
2077
  observe(e, t) {
2078
2078
  var r = v(Ir, this).get(e) || /* @__PURE__ */ new Set();
2079
- return r.add(t), v(Ir, this).set(e, r), q(Jo, this, of).call(this).observe(e, v(Gi, this)), () => {
2079
+ return r.add(t), v(Ir, this).set(e, r), q(Jo, this, sd).call(this).observe(e, v(Gi, this)), () => {
2080
2080
  var n = v(Ir, this).get(e);
2081
2081
  n.delete(t), n.size === 0 && (v(Ir, this).delete(e), v(vi, this).unobserve(e));
2082
2082
  };
2083
2083
  }
2084
2084
  };
2085
2085
  Wl = Bl;
2086
- function of() {
2086
+ function sd() {
2087
2087
  return v(vi, this) ?? z(vi, this, new ResizeObserver((e) => {
2088
2088
  for (var t of e) {
2089
2089
  Wl.entries.set(t.target, t);
@@ -2095,8 +2095,8 @@ S(Bl, "entries", /* @__PURE__ */ new WeakMap());
2095
2095
  function qi(e, t) {
2096
2096
  return e === t || e?.[hn] === t;
2097
2097
  }
2098
- function af(e = Hs(), t, r, n) {
2099
- var i = fe.r, s = V;
2098
+ function od(e = Hs(), t, r, n) {
2099
+ var i = de.r, s = V;
2100
2100
  return _l(() => {
2101
2101
  var o, a;
2102
2102
  return Ys(() => {
@@ -2117,13 +2117,13 @@ function af(e = Hs(), t, r, n) {
2117
2117
  }
2118
2118
  function Qo(e, t, r, n) {
2119
2119
  var i = !_n || (r & 2) !== 0, s = (r & 8) !== 0, o = (r & 16) !== 0, a = n, l = !0, c = void 0, u = () => o && i ? (c ?? (c = /* @__PURE__ */ mn(n)), T(c)) : (l && (l = !1, a = o ? An(n) : n), a);
2120
- let d;
2120
+ let f;
2121
2121
  if (s) {
2122
2122
  var h = hn in e || Va in e;
2123
- d = sr(e, t)?.set ?? (h && t in e ? (L) => e[t] = L : void 0);
2123
+ f = sr(e, t)?.set ?? (h && t in e ? (L) => e[t] = L : void 0);
2124
2124
  }
2125
2125
  var p, g = !1;
2126
- s ? [p, g] = Yu(() => e[t]) : p = e[t], p === void 0 && n !== void 0 && (p = u(), d && (i && Hu(t), d(p)));
2126
+ s ? [p, g] = Yu(() => e[t]) : p = e[t], p === void 0 && n !== void 0 && (p = u(), f && (i && Hu(t), f(p)));
2127
2127
  var m;
2128
2128
  if (i ? m = () => {
2129
2129
  var L = e[t];
@@ -2132,10 +2132,10 @@ function Qo(e, t, r, n) {
2132
2132
  var L = e[t];
2133
2133
  return L !== void 0 && (a = void 0), L === void 0 ? a : L;
2134
2134
  }, i && (r & 4) === 0) return m;
2135
- if (d) {
2135
+ if (f) {
2136
2136
  var b = e.$$legacy;
2137
2137
  return (function(L, Z) {
2138
- return arguments.length > 0 ? ((!i || !Z || b || g) && d(Z ? m() : L), L) : m();
2138
+ return arguments.length > 0 ? ((!i || !Z || b || g) && f(Z ? m() : L), L) : m();
2139
2139
  });
2140
2140
  }
2141
2141
  var E = !1, R = ((r & 1) !== 0 ? mn : il)(() => (E = !1, m()));
@@ -2149,10 +2149,10 @@ function Qo(e, t, r, n) {
2149
2149
  return Ot && E || ($.f & 16384) !== 0 ? R.v : T(R);
2150
2150
  });
2151
2151
  }
2152
- function lf(e) {
2153
- return new cf(e);
2152
+ function ad(e) {
2153
+ return new ld(e);
2154
2154
  }
2155
- var Jt = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), cf = class {
2155
+ var Jt = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), ld = class {
2156
2156
  constructor(e) {
2157
2157
  j(this, Jt, void 0), j(this, vt, void 0);
2158
2158
  var t = /* @__PURE__ */ new Map(), r = (i, s) => {
@@ -2234,18 +2234,18 @@ typeof HTMLElement == "function" && (jl = class extends HTMLElement {
2234
2234
  let e = function(n) {
2235
2235
  return (i) => {
2236
2236
  const s = Gs("slot");
2237
- n !== "default" && (s.name = n), ds(i, s);
2237
+ n !== "default" && (s.name = n), fs(i, s);
2238
2238
  };
2239
2239
  };
2240
2240
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
2241
- const t = {}, r = uf(this);
2241
+ const t = {}, r = cd(this);
2242
2242
  for (const n of this.$$s) n in r && (n === "default" && !this.$$d.children ? (this.$$d.children = e(n), t.default = !0) : t[n] = e(n));
2243
2243
  for (const n of this.attributes) {
2244
2244
  const i = this.$$g_p(n.name);
2245
2245
  i in this.$$d || (this.$$d[i] = ei(i, n.value, this.$$p_d, "toProp"));
2246
2246
  }
2247
2247
  for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
2248
- this.$$c = lf({
2248
+ this.$$c = ad({
2249
2249
  component: this.$$ctor,
2250
2250
  target: this.$$shadowRoot || this,
2251
2251
  props: {
@@ -2310,13 +2310,13 @@ function ei(e, t, r, n) {
2310
2310
  return t;
2311
2311
  }
2312
2312
  }
2313
- function uf(e) {
2313
+ function cd(e) {
2314
2314
  const t = {};
2315
2315
  return e.childNodes.forEach((r) => {
2316
2316
  t[r.slot || "default"] = !0;
2317
2317
  }), t;
2318
2318
  }
2319
- function hf(e, t, r, n, i, s) {
2319
+ function ud(e, t, r, n, i, s) {
2320
2320
  let o = class extends jl {
2321
2321
  constructor() {
2322
2322
  super(e, r, i), this.$$p_d = t;
@@ -2342,14 +2342,14 @@ function hf(e, t, r, n, i, s) {
2342
2342
  } });
2343
2343
  }), s && (o = s(o)), e.element = o, o;
2344
2344
  }
2345
- var ff = class extends Event {
2345
+ var hd = class extends Event {
2346
2346
  constructor(e, t, r, n) {
2347
2347
  super("context-request", {
2348
2348
  bubbles: !0,
2349
2349
  composed: !0
2350
2350
  }), S(this, "context", void 0), S(this, "contextTarget", void 0), S(this, "callback", void 0), S(this, "subscribe", void 0), this.context = e, this.contextTarget = t, this.callback = r, this.subscribe = n ?? !1;
2351
2351
  }
2352
- }, df = class {
2352
+ }, dd = class {
2353
2353
  constructor(e, t) {
2354
2354
  S(this, "host", void 0), S(this, "context", void 0), S(this, "subscribe", void 0), S(this, "onValue", void 0), S(this, "isConnected", !1), S(this, "unsubscribe", void 0), S(this, "currentValue", void 0), S(this, "handleValue", (r, n) => {
2355
2355
  n !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = n), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = r, this.onValue?.(r);
@@ -2365,12 +2365,12 @@ var ff = class extends Event {
2365
2365
  return this.currentValue;
2366
2366
  }
2367
2367
  requestValue() {
2368
- this.host.dispatchEvent(new ff(this.context, this.host, this.handleValue, this.subscribe));
2368
+ this.host.dispatchEvent(new hd(this.context, this.host, this.handleValue, this.subscribe));
2369
2369
  }
2370
- }, _i = (e) => e, pf = _i(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), km = _i(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), xm = _i(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), Am = _i(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2371
- function gf(e, t, r) {
2370
+ }, _i = (e) => e, fd = _i(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.runtimeContext")), km = _i(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.hostRuntimeContext")), xm = _i(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.shellContext")), Am = _i(/* @__PURE__ */ Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2371
+ function pd(e, t, r) {
2372
2372
  let n = !1;
2373
- const i = new df(e, {
2373
+ const i = new dd(e, {
2374
2374
  context: t,
2375
2375
  subscribe: !0,
2376
2376
  onValue: (c) => {
@@ -2394,16 +2394,16 @@ function gf(e, t, r) {
2394
2394
  globalThis.clearInterval(l), e.removeEventListener("context-provider", s), i.disconnect();
2395
2395
  };
2396
2396
  }
2397
- function mf(e, t) {
2398
- return gf(e, pf, t);
2397
+ function gd(e, t) {
2398
+ return pd(e, fd, t);
2399
2399
  }
2400
- function vf(e, t) {
2401
- return mf(e, t);
2400
+ function md(e, t) {
2401
+ return gd(e, t);
2402
2402
  }
2403
2403
  function bn(e) {
2404
2404
  return e ? e.trim().replace(/_/g, "-").split(/[.@]/)[0].toLowerCase() : "";
2405
2405
  }
2406
- function yf(e) {
2406
+ function vd(e) {
2407
2407
  const t = bn(e);
2408
2408
  if (!t) return [];
2409
2409
  const r = t.split("-"), n = [];
@@ -2413,13 +2413,13 @@ function yf(e) {
2413
2413
  }
2414
2414
  return n;
2415
2415
  }
2416
- function bf(e, t) {
2417
- for (const r of yf(e)) {
2416
+ function yd(e, t) {
2417
+ for (const r of vd(e)) {
2418
2418
  const n = t.find((i) => bn(i) === r);
2419
2419
  if (n != null) return n;
2420
2420
  }
2421
2421
  }
2422
- var Sf = class {
2422
+ var bd = class {
2423
2423
  serialize(e, t) {
2424
2424
  return {
2425
2425
  startContainer: this.getNodePath(e.startContainer, t),
@@ -2494,7 +2494,7 @@ var Fr;
2494
2494
  })(Fr || (Fr = {}));
2495
2495
  var Gl = class ys {
2496
2496
  constructor(t = {}) {
2497
- if (S(this, "config", void 0), S(this, "ttsWordHighlight", null), S(this, "ttsSentenceHighlight", null), S(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), S(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), S(this, "annotations", /* @__PURE__ */ new Map()), S(this, "colorHighlights", /* @__PURE__ */ new Map()), S(this, "nextAnnotationId", 1), S(this, "supported", !1), S(this, "rangeSerializer", void 0), S(this, "themeObserver", null), S(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new Sf(), typeof CSS > "u" || !("highlights" in CSS)) {
2497
+ if (S(this, "config", void 0), S(this, "ttsWordHighlight", null), S(this, "ttsSentenceHighlight", null), S(this, "ttsWordElementHighlights", /* @__PURE__ */ new Set()), S(this, "ttsSentenceElementHighlights", /* @__PURE__ */ new Set()), S(this, "annotations", /* @__PURE__ */ new Map()), S(this, "colorHighlights", /* @__PURE__ */ new Map()), S(this, "nextAnnotationId", 1), S(this, "supported", !1), S(this, "rangeSerializer", void 0), S(this, "themeObserver", null), S(this, "explicitTTSColorOverride", null), this.config = t, this.rangeSerializer = new bd(), typeof CSS > "u" || !("highlights" in CSS)) {
2498
2498
  console.warn("CSS Custom Highlight API not supported (SSR or unsupported browser)");
2499
2499
  return;
2500
2500
  }
@@ -2602,16 +2602,16 @@ var Gl = class ys {
2602
2602
  0.56,
2603
2603
  0.5
2604
2604
  ];
2605
- let d = u[u.length - 1], h = -1 / 0;
2605
+ let f = u[u.length - 1], h = -1 / 0;
2606
2606
  for (const Z of u) {
2607
2607
  const D = this.blend(c, a, Z), he = this.contrastRatio(D, a), W = this.contrastRatio(D, l), ee = he * 1.2 + W * 0.8;
2608
2608
  if (he >= 1.25 && W >= 2.4) {
2609
- d = Z;
2609
+ f = Z;
2610
2610
  break;
2611
2611
  }
2612
- ee > h && (h = ee, d = Z);
2612
+ ee > h && (h = ee, f = Z);
2613
2613
  }
2614
- const p = Math.max(0.24, Math.min(0.85, d * 0.55)), g = Math.max(0.55, Math.min(0.95, d + 0.2)), m = Math.max(0.22, Math.min(0.6, d * 0.45)), b = l, E = this.blend(b, a, g), R = this.contrastRatio(E, a), $ = this.relativeLuminance(a) > 0.45 ? [
2614
+ const p = Math.max(0.24, Math.min(0.85, f * 0.55)), g = Math.max(0.55, Math.min(0.95, f + 0.2)), m = Math.max(0.22, Math.min(0.6, f * 0.45)), b = l, E = this.blend(b, a, g), R = this.contrastRatio(E, a), $ = this.relativeLuminance(a) > 0.45 ? [
2615
2615
  0,
2616
2616
  0,
2617
2617
  0
@@ -2621,7 +2621,7 @@ var Gl = class ys {
2621
2621
  255
2622
2622
  ], L = R >= 1.35 ? b : $;
2623
2623
  return {
2624
- wordHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${d})`,
2624
+ wordHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${f})`,
2625
2625
  sentenceHighlight: `rgba(${c[0]}, ${c[1]}, ${c[2]}, ${p})`,
2626
2626
  wordUnderline: `rgba(${L[0]}, ${L[1]}, ${L[2]}, ${g})`,
2627
2627
  wordShadow: `rgba(${L[0]}, ${L[1]}, ${L[2]}, ${m})`
@@ -2891,9 +2891,9 @@ var Gl = class ys {
2891
2891
  if (!o) continue;
2892
2892
  const a = [], l = s.startContainer.nodeType === Node.ELEMENT_NODE ? s.startContainer : s.startContainer.parentElement, c = s.endContainer.nodeType === Node.ELEMENT_NODE ? s.endContainer : s.endContainer.parentElement;
2893
2893
  for (const u of [l, c]) {
2894
- let d = u;
2895
- for (; d; )
2896
- d.matches?.(i) && a.push(d), d = d.parentElement;
2894
+ let f = u;
2895
+ for (; f; )
2896
+ f.matches?.(i) && a.push(f), f = f.parentElement;
2897
2897
  }
2898
2898
  o.matches?.(i) && a.push(o), a.push(...Array.from(o.querySelectorAll(i)));
2899
2899
  for (const u of new Set(a)) {
@@ -3041,7 +3041,7 @@ var Gl = class ys {
3041
3041
  };
3042
3042
  S(Gl, "SENTENCE_FALLBACK_SELECTOR", "math, mjx-container, svg, img, canvas, [role='img']");
3043
3043
  S(Gl, "WORD_FALLBACK_SELECTOR", "svg, img, canvas, [role='img']");
3044
- var Tf = {
3044
+ var Sd = {
3045
3045
  common: {
3046
3046
  close: "Close",
3047
3047
  cancel: "Cancel",
@@ -3103,7 +3103,9 @@ var Tf = {
3103
3103
  resizePassageAndMediaA11y: "Resize passage and media panels",
3104
3104
  assessment: {
3105
3105
  sectionPosition: "Section {position} of {total}",
3106
- noSections: "No sections"
3106
+ noSections: "No sections",
3107
+ loadFailed: "The assessment could not be loaded. Try again.",
3108
+ restoreFailed: "Your saved answers for this section could not be restored. Try again."
3107
3109
  },
3108
3110
  formative: {
3109
3111
  checkAnswer: "Check answer",
@@ -3540,7 +3542,7 @@ var Tf = {
3540
3542
  coordinatorUnavailable: "Toolkit coordinator is not available for text-to-speech updates."
3541
3543
  }
3542
3544
  }
3543
- }, Vi = "en-US", _f = /* @__PURE__ */ new Set([
3545
+ }, Vi = "en-US", Td = /* @__PURE__ */ new Set([
3544
3546
  "ar",
3545
3547
  "ckb",
3546
3548
  "dv",
@@ -3556,7 +3558,7 @@ var Tf = {
3556
3558
  "ug",
3557
3559
  "ur",
3558
3560
  "yi"
3559
- ]), wf = /* @__PURE__ */ new Set([
3561
+ ]), _d = /* @__PURE__ */ new Set([
3560
3562
  "zero",
3561
3563
  "one",
3562
3564
  "two",
@@ -3567,7 +3569,7 @@ var Tf = {
3567
3569
  function Zo(e) {
3568
3570
  if (typeof e != "object" || e === null) return !1;
3569
3571
  const t = Object.keys(e);
3570
- return t.length > 0 && t.every((r) => wf.has(r));
3572
+ return t.length > 0 && t.every((r) => _d.has(r));
3571
3573
  }
3572
3574
  function ea(e) {
3573
3575
  try {
@@ -3576,11 +3578,11 @@ function ea(e) {
3576
3578
  } catch {
3577
3579
  }
3578
3580
  const t = bn(e).split("-")[0] ?? "";
3579
- return _f.has(t) ? "rtl" : "ltr";
3581
+ return Td.has(t) ? "rtl" : "ltr";
3580
3582
  }
3581
3583
  var ql = class ti {
3582
3584
  constructor(t = {}) {
3583
- S(this, "locale", void 0), S(this, "fallbackLocale", void 0), S(this, "catalogs", void 0), S(this, "customMessages", void 0), S(this, "loading", void 0), S(this, "listeners", /* @__PURE__ */ new Set()), S(this, "config", void 0), this.config = { ...t }, this.fallbackLocale = Xn(t.fallbackLocale) || "en-US", this.catalogs = /* @__PURE__ */ new Map([[Vi, Tf]]), this.customMessages = { ...t.customMessages ?? {} }, this.loading = /* @__PURE__ */ new Map(), this.locale = this.resolveLocaleTag(t.locale) ?? "en-US";
3585
+ S(this, "locale", void 0), S(this, "fallbackLocale", void 0), S(this, "catalogs", void 0), S(this, "customMessages", void 0), S(this, "loading", void 0), S(this, "listeners", /* @__PURE__ */ new Set()), S(this, "config", void 0), this.config = { ...t }, this.fallbackLocale = Xn(t.fallbackLocale) || "en-US", this.catalogs = /* @__PURE__ */ new Map([[Vi, Sd]]), this.customMessages = { ...t.customMessages ?? {} }, this.loading = /* @__PURE__ */ new Map(), this.locale = this.resolveLocaleTag(t.locale) ?? "en-US";
3584
3586
  }
3585
3587
  async initialize(t) {
3586
3588
  if (this.config = {
@@ -3683,7 +3685,7 @@ var ql = class ti {
3683
3685
  }
3684
3686
  resolveLocaleTag(t) {
3685
3687
  if (!t) return;
3686
- const r = this.getAvailableLocales(), n = bf(t, r);
3688
+ const r = this.getAvailableLocales(), n = yd(t, r);
3687
3689
  if (n) return n;
3688
3690
  const i = bn(t).split("-")[0];
3689
3691
  if (i)
@@ -3706,7 +3708,7 @@ var ql = class ti {
3706
3708
  this.catalogs.get(this.fallbackLocale)
3707
3709
  ];
3708
3710
  for (const n of r) {
3709
- const i = Ef(n, t);
3711
+ const i = wd(n, t);
3710
3712
  if (i !== void 0) return i;
3711
3713
  }
3712
3714
  }
@@ -3735,7 +3737,7 @@ S(ql, "pluralRules", /* @__PURE__ */ new Map());
3735
3737
  function Xn(e) {
3736
3738
  return e ? e.trim().replace(/_/g, "-") : "";
3737
3739
  }
3738
- function Ef(e, t) {
3740
+ function wd(e, t) {
3739
3741
  if (!e) return;
3740
3742
  let r = e;
3741
3743
  for (const n of t.split("."))
@@ -3757,11 +3759,11 @@ function Vl(e, t) {
3757
3759
  return r;
3758
3760
  }
3759
3761
  var Yi;
3760
- function kf() {
3762
+ function Ed() {
3761
3763
  return Yi || (Yi = new ql()), Yi;
3762
3764
  }
3763
- function xf(e) {
3764
- const t = e?.i18n ?? kf();
3765
+ function kd(e) {
3766
+ const t = e?.i18n ?? Ed();
3765
3767
  return {
3766
3768
  getLocale: () => t.getLocale(),
3767
3769
  setLocale: (r) => t.setLocale(r),
@@ -3799,19 +3801,19 @@ function Ut(e, t) {
3799
3801
  if (e.find((r) => typeof r != "string") !== void 0) throw new Error(`Invalid tools config at "${t}": all entries must be strings.`);
3800
3802
  return e;
3801
3803
  }
3802
- function Af(e) {
3804
+ function xd(e) {
3803
3805
  if (e != null) {
3804
3806
  if (!cr(e)) throw new Error('Invalid tools config at "placement": expected an object with section/item/passage arrays.');
3805
3807
  return e;
3806
3808
  }
3807
3809
  }
3808
- function Rf(e) {
3810
+ function Ad(e) {
3809
3811
  if (e != null) {
3810
3812
  if (!cr(e)) throw new Error('Invalid tools config at "policy": expected an object with allowed/blocked arrays.');
3811
3813
  return e;
3812
3814
  }
3813
3815
  }
3814
- function Cf(e, t) {
3816
+ function Rd(e, t) {
3815
3817
  if (t == null) return;
3816
3818
  if (!cr(t)) throw new Error(`Invalid tools config at "providers.${e}": expected an object.`);
3817
3819
  const r = t, n = (i) => i === "polly" || i === "google" || i === "custom";
@@ -3820,14 +3822,14 @@ function Cf(e, t) {
3820
3822
  if ("provider" in r && r.provider !== void 0 && !cr(r.provider) && !(e === "textToSpeech" && n(r.provider))) throw new Error(`Invalid tools config at "providers.${e}.provider": expected an object.`);
3821
3823
  return r;
3822
3824
  }
3823
- function Of(e) {
3825
+ function Cd(e) {
3824
3826
  if (e == null) return {};
3825
3827
  if (!cr(e)) throw new Error('Invalid tools config at "providers": expected an object keyed by tool id.');
3826
3828
  const t = {};
3827
- for (const [r, n] of Object.entries(e)) t[r] = Cf(r, n);
3829
+ for (const [r, n] of Object.entries(e)) t[r] = Rd(r, n);
3828
3830
  return t;
3829
3831
  }
3830
- function Lf(e) {
3832
+ function Od(e) {
3831
3833
  const t = e.trim();
3832
3834
  return t || "";
3833
3835
  }
@@ -3836,20 +3838,20 @@ function Wt(e) {
3836
3838
  const t = /* @__PURE__ */ new Set();
3837
3839
  for (const r of e) {
3838
3840
  if (typeof r != "string") throw new Error("Invalid tools config: tool list entries must be strings.");
3839
- const n = Lf(r);
3841
+ const n = Od(r);
3840
3842
  n && t.add(n);
3841
3843
  }
3842
3844
  return Array.from(t);
3843
3845
  }
3844
- function Mf(e, t) {
3846
+ function Ld(e, t) {
3845
3847
  if (e != null) {
3846
3848
  if (e === "on" || e === "off") return e;
3847
3849
  throw new Error(`Invalid tools config at "${t}": expected "on" or "off", got ${JSON.stringify(e)}.`);
3848
3850
  }
3849
3851
  }
3850
- function If(e) {
3852
+ function Md(e) {
3851
3853
  if (e != null && !cr(e)) throw new Error('Invalid tools config: expected an object with "policy", "placement", and "providers".');
3852
- const t = Rf(e?.policy), r = Af(e?.placement), n = Of(e?.providers), i = Mf(e?.pnpEnforcement, "pnpEnforcement"), s = {
3854
+ const t = Ad(e?.policy), r = xd(e?.placement), n = Cd(e?.providers), i = Ld(e?.pnpEnforcement, "pnpEnforcement"), s = {
3853
3855
  policy: {
3854
3856
  allowed: Wt(Ut(t?.allowed, "policy.allowed")),
3855
3857
  blocked: Wt(Ut(t?.blocked, "policy.blocked"))
@@ -3863,7 +3865,7 @@ function If(e) {
3863
3865
  };
3864
3866
  return i && (s.pnpEnforcement = i), s;
3865
3867
  }
3866
- var Nf = {
3868
+ var Id = {
3867
3869
  visual: {
3868
3870
  magnification: "magnification",
3869
3871
  screenMagnifier: "screenMagnifier",
@@ -3976,36 +3978,36 @@ var Nf = {
3976
3978
  itemGlossary: "itemGlossary",
3977
3979
  tutorialAvailable: "tutorialAvailable"
3978
3980
  }
3979
- }, Cm = Object.values(Nf).flatMap((e) => Object.values(e)), Pf = /^[a-z][a-z0-9+.-]*:/i, $f = /* @__PURE__ */ new Set([
3981
+ }, Cm = Object.values(Id).flatMap((e) => Object.values(e)), Nd = /^[a-z][a-z0-9+.-]*:/i, Pd = /* @__PURE__ */ new Set([
3980
3982
  "http:",
3981
3983
  "https:",
3982
3984
  "data:",
3983
3985
  "blob:"
3984
3986
  ]);
3985
- function Df(e) {
3987
+ function $d(e) {
3986
3988
  return e !== void 0 && e !== 1;
3987
3989
  }
3988
- function Ff(e) {
3990
+ function Dd(e) {
3989
3991
  if (typeof e != "string") return !1;
3990
3992
  const t = e.trim();
3991
3993
  if (!t) return !1;
3992
- if (t.startsWith("//") || !Pf.test(t)) return !0;
3994
+ if (t.startsWith("//") || !Nd.test(t)) return !0;
3993
3995
  const r = t.slice(0, t.indexOf(":") + 1).toLowerCase();
3994
- return $f.has(r);
3996
+ return Pd.has(r);
3995
3997
  }
3996
- function Hf(e) {
3998
+ function Fd(e) {
3997
3999
  if (!Array.isArray(e)) return [];
3998
4000
  const t = [];
3999
4001
  for (const r of e) {
4000
4002
  if (!r || typeof r != "object") continue;
4001
4003
  const n = r;
4002
- if (!Ff(n.src)) continue;
4004
+ if (!Dd(n.src)) continue;
4003
4005
  const i = { src: n.src.trim() };
4004
4006
  typeof n.type == "string" && n.type.trim() && (i.type = n.type.trim()), Number.isFinite(n.width) && (i.width = n.width), Number.isFinite(n.height) && (i.height = n.height), !t.some((s) => s.src === i.src) && t.push(i);
4005
4007
  }
4006
4008
  return t;
4007
4009
  }
4008
- function zf(e) {
4010
+ function Hd(e) {
4009
4011
  if (!e || typeof e != "object") return;
4010
4012
  const t = e, r = Number(t.startSeconds);
4011
4013
  if (!Number.isFinite(r) || r < 0) return;
@@ -4015,49 +4017,49 @@ function zf(e) {
4015
4017
  endSeconds: n
4016
4018
  };
4017
4019
  }
4018
- function Uf(e) {
4020
+ function zd(e) {
4019
4021
  if (typeof e == "string")
4020
4022
  return e.trim() || void 0;
4021
4023
  }
4022
- var Wf = 100, Bf = 1;
4023
- function jf(e, t, r) {
4024
+ var Ud = 100, Wd = 1;
4025
+ function Bd(e, t, r) {
4024
4026
  if (!t) return () => {
4025
4027
  };
4026
4028
  const { startSeconds: n, endSeconds: i } = t;
4027
4029
  let s;
4028
4030
  n > 0 && (s = () => {
4029
4031
  e.currentTime < n && (e.currentTime = n);
4030
- }, e.readyState >= Bf ? s() : e.addEventListener("loadedmetadata", s));
4032
+ }, e.readyState >= Wd ? s() : e.addEventListener("loadedmetadata", s));
4031
4033
  let o, a;
4032
4034
  return i !== void 0 && (o = () => {
4033
4035
  e.currentTime >= i && r();
4034
4036
  }, e.addEventListener("timeupdate", o), a = setInterval(() => {
4035
4037
  e.paused || o?.();
4036
- }, Wf)), () => {
4038
+ }, Ud)), () => {
4037
4039
  s && e.removeEventListener("loadedmetadata", s), o && e.removeEventListener("timeupdate", o), a !== void 0 && clearInterval(a);
4038
4040
  };
4039
4041
  }
4040
- function Gf(e, t) {
4042
+ function jd(e, t) {
4041
4043
  if (!t || e.includes("#")) return e;
4042
4044
  const r = t.endSeconds !== void 0 ? `,${t.endSeconds}` : "";
4043
4045
  return `${e}#t=${t.startSeconds}${r}`;
4044
4046
  }
4045
- function qf(e) {
4047
+ function Gd(e) {
4046
4048
  if (!e) return null;
4047
4049
  const t = e.payload;
4048
4050
  if (!t || typeof t != "object") return null;
4049
4051
  const r = t.media;
4050
4052
  if (!r || typeof r != "object")
4051
4053
  return console.warn("[spoken-audio] card carries a `payload` with no `media`; recorded speech needs `media.sources`, so this card is ignored and read-aloud falls back to the script or generated speech"), null;
4052
- if (Df(r.version))
4054
+ if ($d(r.version))
4053
4055
  return console.warn(`[spoken-audio] card's media declares version ${String(r.version)}, which this build does not render; the card is ignored and read-aloud falls back to the script or generated speech`), null;
4054
4056
  if (r.kind !== void 0 && r.kind !== "audio")
4055
4057
  return console.warn(`[spoken-audio] card's media is kind "${r.kind}", not "audio"; a spoken card carries recorded speech, so this card is ignored`), null;
4056
- const n = Hf(r.sources);
4058
+ const n = Fd(r.sources);
4057
4059
  return n.length === 0 ? (console.warn("[spoken-audio] card's `media.sources` yielded no usable URL; read-aloud falls back to the script or generated speech"), null) : {
4058
4060
  sources: n,
4059
- fragment: zf(t.fragment),
4060
- label: Uf(r.label)
4061
+ fragment: Hd(t.fragment),
4062
+ label: zd(r.label)
4061
4063
  };
4062
4064
  }
4063
4065
  var Om = Yl("ToolCoordinator"), bs;
@@ -4091,12 +4093,12 @@ var Js = (e, t) => {
4091
4093
  text: e,
4092
4094
  offset: 0
4093
4095
  }];
4094
- }, ra = 5e3, na = 2e3, Xl = (e) => String(e || "").trim().toLowerCase(), Vf = () => {
4096
+ }, ra = 5e3, na = 2e3, Xl = (e) => String(e || "").trim().toLowerCase(), qd = () => {
4095
4097
  const e = typeof navigator < "u" ? navigator.language || navigator.languages?.[0] : "";
4096
4098
  return Xl(e || "en-US");
4097
- }, Yf = (e, t) => {
4099
+ }, Vd = (e, t) => {
4098
4100
  if (t) return e.find((o) => o.voiceURI === t) || e.find((o) => o.name === t) || null;
4099
- const r = Vf(), n = r.split("-")[0] || "en", i = (o) => {
4101
+ const r = qd(), n = r.split("-")[0] || "en", i = (o) => {
4100
4102
  const a = Xl(o.lang);
4101
4103
  return a === r || a.startsWith(`${n}-`);
4102
4104
  }, s = [
@@ -4111,14 +4113,14 @@ var Js = (e, t) => {
4111
4113
  if (a) return a;
4112
4114
  }
4113
4115
  return e[0] || null;
4114
- }, Xf = (e) => !e.default, Kf = class {
4116
+ }, Yd = (e) => !e.default, Xd = class {
4115
4117
  constructor() {
4116
4118
  S(this, "providerId", "browser"), S(this, "providerName", "Browser Speech Synthesis"), S(this, "version", "1.0.0");
4117
4119
  }
4118
4120
  async initialize(e) {
4119
4121
  if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
4120
4122
  if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
4121
- return new Jf(e);
4123
+ return new Kd(e);
4122
4124
  }
4123
4125
  supportsFeature(e) {
4124
4126
  return !0;
@@ -4136,7 +4138,7 @@ var Js = (e, t) => {
4136
4138
  }
4137
4139
  destroy() {
4138
4140
  }
4139
- }, Jf = class {
4141
+ }, Kd = class {
4140
4142
  constructor(e) {
4141
4143
  S(this, "utterance", null), S(this, "config", null), S(this, "_isPlaying", !1), S(this, "_isPaused", !1), S(this, "speakRunId", 0), S(this, "settlePendingVoiceWait", null), S(this, "settlePendingChunk", null), S(this, "onPlaybackStart", void 0), S(this, "onWordBoundary", void 0), this.config = e;
4142
4144
  }
@@ -4146,14 +4148,14 @@ var Js = (e, t) => {
4146
4148
  let a = !1, l = null, c = null;
4147
4149
  const u = () => {
4148
4150
  l !== null && (clearTimeout(l), l = null), s ? i.removeEventListener("voiceschanged", p) : i.onvoiceschanged === g && (i.onvoiceschanged = o), c && this.settlePendingVoiceWait === c && (this.settlePendingVoiceWait = null);
4149
- }, d = (m, b) => {
4151
+ }, f = (m, b) => {
4150
4152
  a || (a = !0, u(), b ? n(b) : r(m));
4151
4153
  }, h = () => {
4152
4154
  if (e !== this.speakRunId) {
4153
- d(!1);
4155
+ f(!1);
4154
4156
  return;
4155
4157
  }
4156
- i.getVoices().length > 0 && d(!0);
4158
+ i.getVoices().length > 0 && f(!0);
4157
4159
  }, p = () => h(), g = (m) => {
4158
4160
  try {
4159
4161
  o?.call(i, m);
@@ -4161,7 +4163,7 @@ var Js = (e, t) => {
4161
4163
  h();
4162
4164
  }
4163
4165
  };
4164
- c = () => d(!1), this.settlePendingVoiceWait = c, l = setTimeout(() => d(!1, /* @__PURE__ */ new Error(`Configured browser voice "${t}" could not be resolved because the browser did not publish its voice inventory within ${na / 1e3} seconds.`)), na), s ? i.addEventListener("voiceschanged", p) : i.onvoiceschanged = g, h();
4166
+ c = () => f(!1), this.settlePendingVoiceWait = c, l = setTimeout(() => f(!1, /* @__PURE__ */ new Error(`Configured browser voice "${t}" could not be resolved because the browser did not publish its voice inventory within ${na / 1e3} seconds.`)), na), s ? i.addEventListener("voiceschanged", p) : i.onvoiceschanged = g, h();
4165
4167
  });
4166
4168
  }
4167
4169
  async resolveBrowserVoice(e) {
@@ -4178,7 +4180,7 @@ var Js = (e, t) => {
4178
4180
  shouldContinue: !1,
4179
4181
  voice: null
4180
4182
  };
4181
- const n = Yf(r, t || void 0);
4183
+ const n = Vd(r, t || void 0);
4182
4184
  if (t && !n) throw new Error(`Configured browser voice "${t}" is unavailable. Select a voice exposed by this browser using its voiceURI or name.`);
4183
4185
  return {
4184
4186
  shouldContinue: !0,
@@ -4270,16 +4272,16 @@ var Js = (e, t) => {
4270
4272
  return;
4271
4273
  }
4272
4274
  const o = new SpeechSynthesisUtterance(e);
4273
- this.utterance = o, n && Xf(n) && (o.voice = n), this.config?.rate && (o.rate = this.config.rate), this.config?.pitch && (o.pitch = this.config.pitch);
4275
+ this.utterance = o, n && Yd(n) && (o.voice = n), this.config?.rate && (o.rate = this.config.rate), this.config?.pitch && (o.pitch = this.config.pitch);
4274
4276
  let a = !1, l = !1, c = null, u = null;
4275
- const d = () => {
4277
+ const f = () => {
4276
4278
  this.utterance === o && (this.utterance = null);
4277
4279
  }, h = () => {
4278
4280
  c !== null && (clearTimeout(c), c = null);
4279
4281
  }, p = () => {
4280
4282
  o.onstart = null, o.onend = null, o.onerror = null, o.onpause = null, o.onresume = null, o.onboundary = null;
4281
4283
  }, g = (b, E) => {
4282
- l || (l = !0, h(), p(), d(), u && this.settlePendingChunk === u && (this.settlePendingChunk = null), r === this.speakRunId && (this._isPlaying = !1, this._isPaused = !1), E ? s(E) : i(b));
4284
+ l || (l = !0, h(), p(), f(), u && this.settlePendingChunk === u && (this.settlePendingChunk = null), r === this.speakRunId && (this._isPlaying = !1, this._isPaused = !1), E ? s(E) : i(b));
4283
4285
  }, m = (b) => /* @__PURE__ */ new Error(b === "ended" ? "Browser speech synthesis ended before audio started. The browser speech engine may be unavailable or stuck; try another voice or restart the browser." : `Browser speech synthesis did not start within ${ra / 1e3} seconds. The browser speech engine may be unavailable or stuck; try another voice or restart the browser.`);
4284
4286
  u = () => g(!1), this.settlePendingChunk = u, o.onstart = () => {
4285
4287
  if (r !== this.speakRunId) {
@@ -4352,7 +4354,7 @@ var Js = (e, t) => {
4352
4354
  ...e.providerOptions || {}
4353
4355
  });
4354
4356
  }
4355
- }, de = (e) => e.trim().replace(/\s+/g, " "), Kl = () => /[\p{L}]+|\d+(?:\.\d+)?|[±√=+\-*/()²³^×÷≤≥≠≈<>|%°'′\u2062]/gu, Jl = (e) => {
4357
+ }, fe = (e) => e.trim().replace(/\s+/g, " "), Kl = () => /[\p{L}]+|\d+(?:\.\d+)?|[±√=+\-*/()²³^×÷≤≥≠≈<>|%°'′\u2062]/gu, Jl = (e) => {
4356
4358
  if (e.hidden || e.tagName?.toLowerCase() === "mjx-assistive-mml" || e.getAttribute("aria-hidden") === "true" || e.hasAttribute("inert")) return !0;
4357
4359
  const t = e.classList;
4358
4360
  if (t?.contains("sr-only") || t?.contains("pie-sr-only") || t?.contains("visually-hidden")) return !0;
@@ -4371,7 +4373,7 @@ var Js = (e, t) => {
4371
4373
  r = r.parentElement;
4372
4374
  }
4373
4375
  return !1;
4374
- }, ia = "data-tts-suppress", Ql = /* @__PURE__ */ new Set(["computer-read-aloud", "all"]), sa = /* @__PURE__ */ new Set([...Ql, "screen-reader"]), oa = /* @__PURE__ */ new Set(), Qf = (e) => {
4376
+ }, ia = "data-tts-suppress", Ql = /* @__PURE__ */ new Set(["computer-read-aloud", "all"]), sa = /* @__PURE__ */ new Set([...Ql, "screen-reader"]), oa = /* @__PURE__ */ new Set(), Jd = (e) => {
4375
4377
  const t = e.getAttribute?.(ia);
4376
4378
  if (t == null) return !1;
4377
4379
  const r = t.trim().toLowerCase();
@@ -4379,7 +4381,7 @@ var Js = (e, t) => {
4379
4381
  }, Ss = (e, t) => {
4380
4382
  let r = e.nodeType === 1 ? e : e.parentElement;
4381
4383
  for (; r; ) {
4382
- if (Qf(r)) return !0;
4384
+ if (Jd(r)) return !0;
4383
4385
  if (t && r === t) break;
4384
4386
  r = r.parentElement;
4385
4387
  }
@@ -4461,13 +4463,13 @@ var Js = (e, t) => {
4461
4463
  }
4462
4464
  u = c.nextNode();
4463
4465
  }
4464
- const d = n.join("").trimEnd();
4465
- for (; r.has(d.length); ) r.delete(d.length);
4466
+ const f = n.join("").trimEnd();
4467
+ for (; r.has(f.length); ) r.delete(f.length);
4466
4468
  return {
4467
- text: d,
4469
+ text: f,
4468
4470
  map: r
4469
4471
  };
4470
- }, Zf = /* @__PURE__ */ new Set([
4472
+ }, Qd = /* @__PURE__ */ new Set([
4471
4473
  "speak",
4472
4474
  "p",
4473
4475
  "s",
@@ -4481,7 +4483,7 @@ var Js = (e, t) => {
4481
4483
  char: t[n],
4482
4484
  rawOffset: r === null ? null : r + n
4483
4485
  });
4484
- }, ed = (e, t, r) => {
4486
+ }, Zd = (e, t, r) => {
4485
4487
  const n = t.slice(r).match(/^&(quot|apos|lt|gt|nbsp|amp|#160);/i);
4486
4488
  return n ? (ri(e, ec(n[0]), r), n[0].length) : 0;
4487
4489
  }, ca = (e) => {
@@ -4489,7 +4491,7 @@ var Js = (e, t) => {
4489
4491
  char: " ",
4490
4492
  rawOffset: null
4491
4493
  });
4492
- }, td = (e) => {
4494
+ }, ef = (e) => {
4493
4495
  const t = /* @__PURE__ */ new Map(), r = [];
4494
4496
  let n = !0;
4495
4497
  for (const i of e) {
@@ -4505,7 +4507,7 @@ var Js = (e, t) => {
4505
4507
  text: r.join(""),
4506
4508
  rawToSpokenOffsetMap: t
4507
4509
  };
4508
- }, rd = (e) => e.match(/^<\/?\s*([A-Za-z0-9:-]+)/)?.[1]?.toLowerCase() || "", nd = (e, t) => {
4510
+ }, tf = (e) => e.match(/^<\/?\s*([A-Za-z0-9:-]+)/)?.[1]?.toLowerCase() || "", rf = (e, t) => {
4509
4511
  const r = new RegExp(`${t}\\s*=\\s*("([^"]*)"|'([^']*)')`, "i"), n = e.match(r);
4510
4512
  return ec(n?.[2] ?? n?.[3] ?? "") || null;
4511
4513
  }, tc = (e) => {
@@ -4515,7 +4517,7 @@ var Js = (e, t) => {
4515
4517
  const o = e[i];
4516
4518
  if (o !== "<") {
4517
4519
  if (o === "&") {
4518
- const h = ed(t, e, i);
4520
+ const h = Zd(t, e, i);
4519
4521
  if (h > 0) {
4520
4522
  i += h;
4521
4523
  continue;
@@ -4530,9 +4532,9 @@ var Js = (e, t) => {
4530
4532
  continue;
4531
4533
  }
4532
4534
  n = !0;
4533
- const l = e.slice(i, a + 1), c = rd(l), u = /^<\s*\//.test(l), d = /\/\s*>$/.test(l);
4535
+ const l = e.slice(i, a + 1), c = tf(l), u = /^<\s*\//.test(l), f = /\/\s*>$/.test(l);
4534
4536
  if (!u && c === "sub") {
4535
- const h = nd(l, "alias");
4537
+ const h = rf(l, "alias");
4536
4538
  if (!h) {
4537
4539
  r = !0, i = a + 1;
4538
4540
  continue;
@@ -4546,20 +4548,20 @@ var Js = (e, t) => {
4546
4548
  ca(t), i = a + 1;
4547
4549
  continue;
4548
4550
  }
4549
- if (!u && la.has(c) && (r = !0, d)) {
4551
+ if (!u && la.has(c) && (r = !0, f)) {
4550
4552
  i = a + 1;
4551
4553
  continue;
4552
4554
  }
4553
- c && !Zf.has(c) && !la.has(c) && c !== "break" && c !== "sub" && (r = !0), !u && (c === "p" || c === "s") && ca(t), i = a + 1;
4555
+ c && !Qd.has(c) && !la.has(c) && c !== "break" && c !== "sub" && (r = !0), !u && (c === "p" || c === "s") && ca(t), i = a + 1;
4554
4556
  }
4555
- const s = td(t);
4557
+ const s = ef(t);
4556
4558
  return {
4557
- spokenText: de(s.text),
4559
+ spokenText: fe(s.text),
4558
4560
  rawToSpokenOffsetMap: s.rawToSpokenOffsetMap,
4559
4561
  unsupportedSemantic: r,
4560
4562
  hasMarkup: n
4561
4563
  };
4562
- }, id = Kl(), rc = /* @__PURE__ */ new Map([
4564
+ }, nf = Kl(), rc = /* @__PURE__ */ new Map([
4563
4565
  ["zero", "0"],
4564
4566
  ["one", "1"],
4565
4567
  ["two", "2"],
@@ -4571,7 +4573,7 @@ var Js = (e, t) => {
4571
4573
  ["eight", "8"],
4572
4574
  ["nine", "9"],
4573
4575
  ["ten", "10"]
4574
- ]), sd = [
4576
+ ]), sf = [
4575
4577
  {
4576
4578
  phrase: [
4577
4579
  "plus",
@@ -4648,7 +4650,7 @@ var Js = (e, t) => {
4648
4650
  }
4649
4651
  ], Ts = (e) => {
4650
4652
  const t = [];
4651
- for (const r of e.matchAll(id)) {
4653
+ for (const r of e.matchAll(nf)) {
4652
4654
  const n = r[0], i = r.index ?? 0;
4653
4655
  t.push({
4654
4656
  text: n,
@@ -4658,7 +4660,7 @@ var Js = (e, t) => {
4658
4660
  });
4659
4661
  }
4660
4662
  return t;
4661
- }, _s = (e) => rc.get(e.normalized) || e.normalized, od = (e, t) => {
4663
+ }, _s = (e) => rc.get(e.normalized) || e.normalized, of = (e, t) => {
4662
4664
  const r = [];
4663
4665
  for (let n = 0; n < e.length; n++) {
4664
4666
  for (let i = 0; i < t.length; i++) _s(e[n]) === _s(t[i]) && r.push({
@@ -4667,7 +4669,7 @@ var Js = (e, t) => {
4667
4669
  visibleToken: i,
4668
4670
  score: 10
4669
4671
  });
4670
- for (const i of sd) {
4672
+ for (const i of sf) {
4671
4673
  const s = e.slice(n, n + i.phrase.length);
4672
4674
  if (s.length === i.phrase.length && s.every((o, a) => o.normalized === i.phrase[a]))
4673
4675
  for (let o = 0; o < t.length; o++)
@@ -4680,15 +4682,15 @@ var Js = (e, t) => {
4680
4682
  }
4681
4683
  }
4682
4684
  return r;
4683
- }, ad = (e, t) => {
4684
- const r = od(e, t).sort((l, c) => e[l.spokenStartToken].start - e[c.spokenStartToken].start || t[l.visibleToken].start - t[c.visibleToken].start), n = new Array(r.length).fill(0), i = new Array(r.length).fill(-1);
4685
+ }, af = (e, t) => {
4686
+ const r = of(e, t).sort((l, c) => e[l.spokenStartToken].start - e[c.spokenStartToken].start || t[l.visibleToken].start - t[c.visibleToken].start), n = new Array(r.length).fill(0), i = new Array(r.length).fill(-1);
4685
4687
  for (let l = 0; l < r.length; l++) {
4686
4688
  const c = r[l];
4687
4689
  n[l] = c.score;
4688
4690
  for (let u = 0; u < l; u++) {
4689
- const d = r[u];
4690
- if (d.spokenEndToken <= c.spokenStartToken && d.visibleToken < c.visibleToken) {
4691
- const h = c.spokenStartToken - d.spokenEndToken, p = c.visibleToken - d.visibleToken - 1, g = Math.max(0, Math.abs(h - p) - 2), m = n[u] + c.score - g;
4691
+ const f = r[u];
4692
+ if (f.spokenEndToken <= c.spokenStartToken && f.visibleToken < c.visibleToken) {
4693
+ const h = c.spokenStartToken - f.spokenEndToken, p = c.visibleToken - f.visibleToken - 1, g = Math.max(0, Math.abs(h - p) - 2), m = n[u] + c.score - g;
4692
4694
  m > n[l] && (n[l] = m, i[l] = u);
4693
4695
  }
4694
4696
  }
@@ -4701,27 +4703,27 @@ var Js = (e, t) => {
4701
4703
  for (; a >= 0; )
4702
4704
  o.unshift(r[a]), a = i[a];
4703
4705
  return o.map((l) => {
4704
- const c = e[l.spokenStartToken], u = e[l.spokenEndToken - 1], d = t[l.visibleToken];
4706
+ const c = e[l.spokenStartToken], u = e[l.spokenEndToken - 1], f = t[l.visibleToken];
4705
4707
  return {
4706
4708
  spokenStart: c.start,
4707
4709
  spokenEnd: u.end,
4708
- visibleStart: d.start,
4709
- visibleEnd: d.end,
4710
+ visibleStart: f.start,
4711
+ visibleEnd: f.end,
4710
4712
  score: l.score
4711
4713
  };
4712
4714
  });
4713
- }, ld = (e, t, r) => {
4715
+ }, lf = (e, t, r) => {
4714
4716
  if (e.length === 0) return 0;
4715
4717
  const n = e.length / Math.max(1, Math.min(t.length, r.length)), i = e.reduce((s, o) => s + o.score, 0) / e.length / 10;
4716
4718
  return Math.min(1, n * i);
4717
4719
  }, nc = (e) => {
4718
- const t = tc(e.speechText), r = de(e.visibleText), n = t.spokenText, i = Ts(n), s = Ts(r), o = t.unsupportedSemantic ? [] : ad(i, s), a = ld(o, i, s), l = n === r && n.length > 0, c = o.length === 1 && o[0].score === 10 && i.length <= 2 && s.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (o.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", d = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
4720
+ const t = tc(e.speechText), r = fe(e.visibleText), n = t.spokenText, i = Ts(n), s = Ts(r), o = t.unsupportedSemantic ? [] : af(i, s), a = lf(o, i, s), l = n === r && n.length > 0, c = o.length === 1 && o[0].score === 10 && i.length <= 2 && s.length <= 2, u = t.unsupportedSemantic ? "region-fallback" : l ? "exact-word" : (o.length >= 2 || c) && a >= 0.12 ? "anchor-span" : "region-fallback", f = t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text";
4719
4721
  return {
4720
4722
  speechText: e.speechText,
4721
4723
  spokenText: n,
4722
4724
  visibleText: r,
4723
4725
  playbackMode: u,
4724
- boundaryOffsetMode: d,
4726
+ boundaryOffsetMode: f,
4725
4727
  anchors: o,
4726
4728
  confidence: a,
4727
4729
  spokenTokens: i,
@@ -4746,7 +4748,7 @@ var Js = (e, t) => {
4746
4748
  if (e.speechText[n] === ">") break;
4747
4749
  }
4748
4750
  return null;
4749
- }, fa = (e, t, r) => {
4751
+ }, da = (e, t, r) => {
4750
4752
  const n = ha(e, t);
4751
4753
  if (n === null) return null;
4752
4754
  const i = ha(e, Math.max(t, t + r - 1)), s = Zs(e.spokenTokens, n), o = i !== null && i >= n ? i - n + 1 : s ? s.end - n : r;
@@ -4754,19 +4756,19 @@ var Js = (e, t) => {
4754
4756
  start: n,
4755
4757
  length: Math.max(1, o)
4756
4758
  };
4757
- }, da = (e, t, r) => {
4759
+ }, fa = (e, t, r) => {
4758
4760
  if (t < 0 || t >= e.spokenText.length) return null;
4759
4761
  const n = Zs(e.spokenTokens, t);
4760
4762
  return n ? {
4761
4763
  start: t,
4762
4764
  length: Math.min(r, n.end - t)
4763
4765
  } : null;
4764
- }, cd = (e, t, r = 1, n) => {
4766
+ }, cf = (e, t, r = 1, n) => {
4765
4767
  if (e.boundaryOffsetMode === "unsupported" || !Number.isFinite(t)) return null;
4766
4768
  const i = Math.max(1, Number.isFinite(r) ? r : 1);
4767
4769
  if (n && /^<[^>]+>$/.test(n.trim())) return null;
4768
4770
  if (e.boundaryOffsetMode === "raw-ssml") {
4769
- const s = fa(e, t, i), o = da(e, t, i);
4771
+ const s = da(e, t, i), o = fa(e, t, i);
4770
4772
  if (n) {
4771
4773
  if (ua(e, s, n)) return s;
4772
4774
  if (ua(e, o, n)) return o;
@@ -4774,8 +4776,8 @@ var Js = (e, t) => {
4774
4776
  }
4775
4777
  return s || o;
4776
4778
  }
4777
- return da(e, t, i) || fa(e, t, i);
4778
- }, ud = (e, t) => {
4779
+ return fa(e, t, i) || da(e, t, i);
4780
+ }, uf = (e, t) => {
4779
4781
  if (e.playbackMode === "region-fallback") return null;
4780
4782
  const r = e.anchors.find((s) => s.spokenStart <= t && t < s.spokenEnd);
4781
4783
  if (r) return {
@@ -4797,7 +4799,7 @@ var Js = (e, t) => {
4797
4799
  start: Math.min(n.visibleStart, i.visibleStart),
4798
4800
  end: Math.max(n.visibleEnd, i.visibleEnd)
4799
4801
  } : null;
4800
- }, hd = /* @__PURE__ */ new Map([
4802
+ }, hf = /* @__PURE__ */ new Map([
4801
4803
  ["+", ["plus"]],
4802
4804
  ["-", ["minus", "negative"]],
4803
4805
  ["−", ["minus", "negative"]],
@@ -4821,12 +4823,12 @@ var Js = (e, t) => {
4821
4823
  ["•", ["times"]],
4822
4824
  ["·", ["times"]],
4823
4825
  ["⁢", ["times", "multiplied by"]]
4824
- ]), fd = /* @__PURE__ */ new Map([
4826
+ ]), df = /* @__PURE__ */ new Map([
4825
4827
  ["⁡", "function-application"],
4826
4828
  ["⁢", "implicit-multiply"],
4827
4829
  ["⁣", "invisible-separator"],
4828
4830
  ["⁤", "invisible-plus"]
4829
- ]), sc = /* @__PURE__ */ new Map([["2", ["squared"]], ["3", ["cubed"]]]), dd = /* @__PURE__ */ new Map([
4831
+ ]), sc = /* @__PURE__ */ new Map([["2", ["squared"]], ["3", ["cubed"]]]), ff = /* @__PURE__ */ new Map([
4830
4832
  ["msqrt", "radical"],
4831
4833
  ["mroot", "radical"],
4832
4834
  ["msub", "subscript"],
@@ -4836,11 +4838,11 @@ var Js = (e, t) => {
4836
4838
  ["munderover", "underoverscript"],
4837
4839
  ["mmultiscripts", "multiscript"],
4838
4840
  ["menclose", "enclosure"]
4839
- ]), pd = (e) => e.replace(/\s+/g, " ").trim(), ur = (e) => (e.localName || e.tagName || "").toLowerCase(), gd = (e) => e.nodeType === Node.ELEMENT_NODE, jr = (e) => Array.from(e.childNodes).filter(gd), eo = (e) => pd(e.textContent || ""), Lt = (e, t) => ({
4841
+ ]), pf = (e) => e.replace(/\s+/g, " ").trim(), ur = (e) => (e.localName || e.tagName || "").toLowerCase(), gf = (e) => e.nodeType === Node.ELEMENT_NODE, jr = (e) => Array.from(e.childNodes).filter(gf), eo = (e) => pf(e.textContent || ""), Lt = (e, t) => ({
4840
4842
  type: "element-range",
4841
4843
  quality: t,
4842
4844
  element: e
4843
- }), md = (e) => {
4845
+ }), mf = (e) => {
4844
4846
  switch (e) {
4845
4847
  case "mi":
4846
4848
  return "identifier";
@@ -4856,15 +4858,15 @@ var Js = (e, t) => {
4856
4858
  default:
4857
4859
  return "unknown";
4858
4860
  }
4859
- }, vd = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), yd = (e, t, r) => r === "fraction" ? ["over", "divided by"] : r === "superscript" ? sc.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? hd.get(e) || [] : [], pr = (e) => {
4860
- const t = e.normalized ?? vd(e.text, e.kind || "unknown");
4861
+ }, vf = (e, t) => t === "operator" ? e === "−" ? "-" : e : e.toLowerCase(), yf = (e, t, r) => r === "fraction" ? ["over", "divided by"] : r === "superscript" ? sc.get(e) ?? [] : e === "|" ? ["absolute value"] : t === "operator" ? hf.get(e) || [] : [], pr = (e) => {
4862
+ const t = e.normalized ?? vf(e.text, e.kind || "unknown");
4861
4863
  return {
4862
4864
  id: `math-token-${e.state.nextId++}`,
4863
4865
  kind: e.kind,
4864
4866
  role: e.role,
4865
4867
  text: e.text,
4866
4868
  normalized: t,
4867
- spokenAliases: yd(e.text, e.kind, e.role),
4869
+ spokenAliases: yf(e.text, e.kind, e.role),
4868
4870
  sourceElement: e.sourceElement,
4869
4871
  path: e.path,
4870
4872
  target: e.target || Lt(e.sourceElement, "element-range"),
@@ -4874,7 +4876,7 @@ var Js = (e, t) => {
4874
4876
  e[r].push(t);
4875
4877
  }, oc = (e, t, r) => {
4876
4878
  jr(e).forEach((n, i) => Mt(n, t, `${r}/${ur(n)}[${i}]`));
4877
- }, bd = (e, t, r) => {
4879
+ }, bf = (e, t, r) => {
4878
4880
  const n = jr(e);
4879
4881
  n[0] && Mt(n[0], t, `${r}/numerator`), gr(t, pr({
4880
4882
  state: t,
@@ -4885,7 +4887,7 @@ var Js = (e, t) => {
4885
4887
  path: r,
4886
4888
  target: Lt(e, "element-range")
4887
4889
  })), n[1] && Mt(n[1], t, `${r}/denominator`);
4888
- }, Sd = (e, t, r) => {
4890
+ }, Sf = (e, t, r) => {
4889
4891
  const n = e.getAttribute("open") || "(", i = e.getAttribute("close") || ")";
4890
4892
  gr(t, pr({
4891
4893
  state: t,
@@ -4904,7 +4906,7 @@ var Js = (e, t) => {
4904
4906
  path: `${r}/close`,
4905
4907
  target: Lt(e, "element-range")
4906
4908
  }));
4907
- }, Td = (e, t, r) => {
4909
+ }, Tf = (e, t, r) => {
4908
4910
  const n = jr(e);
4909
4911
  n[0] && Mt(n[0], t, `${r}/base`);
4910
4912
  const i = n[1];
@@ -4924,7 +4926,7 @@ var Js = (e, t) => {
4924
4926
  return;
4925
4927
  }
4926
4928
  Mt(i, t, `${r}/exponent`);
4927
- }, _d = (e, t, r, n) => {
4929
+ }, _f = (e, t, r, n) => {
4928
4930
  gr(t, pr({
4929
4931
  state: t,
4930
4932
  kind: "structure",
@@ -4935,7 +4937,7 @@ var Js = (e, t) => {
4935
4937
  path: r,
4936
4938
  target: Lt(e, "element-range")
4937
4939
  }));
4938
- }, wd = (e, t, r) => {
4940
+ }, wf = (e, t, r) => {
4939
4941
  let n = 0;
4940
4942
  for (const i of jr(e))
4941
4943
  (ur(i) === "mtr" || ur(i) === "mlabeledtr") && (n++, gr(t, pr({
@@ -4948,10 +4950,10 @@ var Js = (e, t) => {
4948
4950
  path: `${r}/row[${n}]`,
4949
4951
  target: Lt(i, "region-fallback")
4950
4952
  }), "layoutTargets")), Mt(i, t, `${r}/${ur(i)}[${n}]`);
4951
- }, Ed = (e, t, r) => {
4953
+ }, Ef = (e, t, r) => {
4952
4954
  const n = eo(e);
4953
4955
  if (!n) return;
4954
- const i = md(ur(e)), s = i === "operator" ? fd.get(n) : void 0, o = s ?? (i === "operator" && (n === "(" || n === ")") ? "grouping-fence" : i);
4956
+ const i = mf(ur(e)), s = i === "operator" ? df.get(n) : void 0, o = s ?? (i === "operator" && (n === "(" || n === ")") ? "grouping-fence" : i);
4955
4957
  gr(t, pr({
4956
4958
  state: t,
4957
4959
  kind: i,
@@ -4982,19 +4984,19 @@ var Js = (e, t) => {
4982
4984
  case "mtext":
4983
4985
  case "ms":
4984
4986
  case "mspace":
4985
- Ed(e, t, r);
4987
+ Ef(e, t, r);
4986
4988
  return;
4987
4989
  case "mfrac":
4988
- bd(e, t, r);
4990
+ bf(e, t, r);
4989
4991
  return;
4990
4992
  case "msup":
4991
- Td(e, t, r);
4993
+ Tf(e, t, r);
4992
4994
  return;
4993
4995
  case "mfenced":
4994
- Sd(e, t, r);
4996
+ Sf(e, t, r);
4995
4997
  return;
4996
4998
  case "mtable":
4997
- wd(e, t, r);
4999
+ wf(e, t, r);
4998
5000
  return;
4999
5001
  case "mphantom":
5000
5002
  return;
@@ -5004,15 +5006,15 @@ var Js = (e, t) => {
5004
5006
  return;
5005
5007
  }
5006
5008
  default: {
5007
- const i = dd.get(n);
5009
+ const i = ff.get(n);
5008
5010
  if (i) {
5009
- _d(e, t, r, i);
5011
+ _f(e, t, r, i);
5010
5012
  return;
5011
5013
  }
5012
5014
  oc(e, t, r);
5013
5015
  }
5014
5016
  }
5015
- }, kd = (e) => {
5017
+ }, kf = (e) => {
5016
5018
  const t = {
5017
5019
  tokens: [],
5018
5020
  layoutTargets: [],
@@ -5023,7 +5025,7 @@ var Js = (e, t) => {
5023
5025
  layoutTargets: t.layoutTargets,
5024
5026
  expressionTarget: Lt(e, "region-fallback")
5025
5027
  };
5026
- }, xd = (e) => e.boundary && e.alignment.segments.find((t) => t.speechTokenIds.includes(e.boundary.token.id))?.target || null, Ad = 0.95, Rd = (e) => {
5028
+ }, xf = (e) => e.boundary && e.alignment.segments.find((t) => t.speechTokenIds.includes(e.boundary.token.id))?.target || null, Af = 0.95, Rf = (e) => {
5027
5029
  const t = [], r = /* @__PURE__ */ new Set(), n = (i) => {
5028
5030
  const s = i.toLowerCase().trim().split(/\s+/).filter(Boolean);
5029
5031
  if (s.length === 0) return;
@@ -5048,11 +5050,11 @@ var Js = (e, t) => {
5048
5050
  s && (n = i.length);
5049
5051
  }
5050
5052
  return n;
5051
- }, Cd = (e, t) => {
5053
+ }, Cf = (e, t) => {
5052
5054
  const r = [];
5053
5055
  let n = 0;
5054
5056
  for (const i of t) {
5055
- const s = Rd(i);
5057
+ const s = Rf(i);
5056
5058
  if (i.optional) {
5057
5059
  const o = pa(e, n, s);
5058
5060
  o > 0 && (r.push({
@@ -5074,23 +5076,23 @@ var Js = (e, t) => {
5074
5076
  }
5075
5077
  }
5076
5078
  return r;
5077
- }, Od = (e, t, r) => {
5079
+ }, Of = (e, t, r) => {
5078
5080
  const n = r.filter((o) => !o.optional).length, i = e.filter((o) => !o.math.optional).length, s = e.reduce((o, a) => o + a.speechTokens.length, 0);
5079
5081
  return n > 0 && i === n && s === t.length;
5080
- }, Ld = (e) => e.map(({ speechTokens: t, math: r }) => ({
5082
+ }, Lf = (e) => e.map(({ speechTokens: t, math: r }) => ({
5081
5083
  speechTokenIds: t.map((n) => n.id),
5082
5084
  mathTokenIds: [r.id],
5083
5085
  score: 1,
5084
5086
  confidence: 1,
5085
5087
  target: r.target
5086
- })), Md = (e) => {
5087
- const t = e.minExactWordConfidence ?? Ad, r = Cd(e.speech.tokens, e.math.tokens), n = Od(r, e.speech.tokens, e.math.tokens) ? 1 : 0;
5088
+ })), Mf = (e) => {
5089
+ const t = e.minExactWordConfidence ?? Af, r = Cf(e.speech.tokens, e.math.tokens), n = Of(r, e.speech.tokens, e.math.tokens) ? 1 : 0;
5088
5090
  return {
5089
- segments: n >= t ? Ld(r) : [],
5091
+ segments: n >= t ? Lf(r) : [],
5090
5092
  confidence: n,
5091
5093
  fallbackTarget: e.math.expressionTarget
5092
5094
  };
5093
- }, ac = Kl(), Id = /* @__PURE__ */ new Map([
5095
+ }, ac = Kl(), If = /* @__PURE__ */ new Map([
5094
5096
  ["zero", "0"],
5095
5097
  ["one", "1"],
5096
5098
  ["two", "2"],
@@ -5104,8 +5106,8 @@ var Js = (e, t) => {
5104
5106
  ["ten", "10"]
5105
5107
  ]), lc = (e) => {
5106
5108
  const t = e.toLowerCase();
5107
- return Id.get(t) || t;
5108
- }, Nd = (e) => {
5109
+ return If.get(t) || t;
5110
+ }, Nf = (e) => {
5109
5111
  const t = [];
5110
5112
  for (const r of e.matchAll(ac)) {
5111
5113
  const n = r[0], i = r.index ?? 0;
@@ -5126,7 +5128,7 @@ var Js = (e, t) => {
5126
5128
  return {
5127
5129
  speechText: e.speechText,
5128
5130
  spokenText: t.spokenText,
5129
- tokens: Nd(t.spokenText),
5131
+ tokens: Nf(t.spokenText),
5130
5132
  rawToSpokenOffsetMap: t.rawToSpokenOffsetMap,
5131
5133
  boundaryOffsetSpace: t.unsupportedSemantic ? "unsupported" : t.hasMarkup ? "raw-ssml" : "plain-spoken-text",
5132
5134
  unsupportedSemantic: t.unsupportedSemantic,
@@ -5136,7 +5138,7 @@ var Js = (e, t) => {
5136
5138
  if (!e || /^<[^>]+>$/.test(e.trim())) return null;
5137
5139
  const t = e.match(ac);
5138
5140
  return t?.[0] ? lc(t[0]) : null;
5139
- }, Pd = (e, t) => e.find((r) => r.start <= t && t < r.end) || null, $d = (e, t) => {
5141
+ }, Pf = (e, t) => e.find((r) => r.start <= t && t < r.end) || null, $f = (e, t) => {
5140
5142
  const r = e.rawToSpokenOffsetMap.get(t);
5141
5143
  if (r !== void 0) return r;
5142
5144
  for (let n = t; n < e.speechText.length; n++) {
@@ -5147,7 +5149,7 @@ var Js = (e, t) => {
5147
5149
  return null;
5148
5150
  }, ws = (e, t, r) => {
5149
5151
  if (t === null) return null;
5150
- const n = Pd(e.tokens, t);
5152
+ const n = Pf(e.tokens, t);
5151
5153
  return n ? {
5152
5154
  token: n,
5153
5155
  start: t,
@@ -5157,9 +5159,9 @@ var Js = (e, t) => {
5157
5159
  }, Es = (e, t) => {
5158
5160
  const r = to(t);
5159
5161
  return !!(e && r && e.token.normalized === r);
5160
- }, Dd = (e) => {
5162
+ }, Df = (e) => {
5161
5163
  if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
5162
- const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r = ws(e.tokenization, $d(e.tokenization, e.position), t), n = ws(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
5164
+ const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r = ws(e.tokenization, $f(e.tokenization, e.position), t), n = ws(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
5163
5165
  return Es(r, e.boundaryWord) ? {
5164
5166
  ...r,
5165
5167
  confidence: 1
@@ -5167,7 +5169,7 @@ var Js = (e, t) => {
5167
5169
  ...n,
5168
5170
  confidence: 1
5169
5171
  } : e.boundaryWord && to(e.boundaryWord) ? null : e.tokenization.boundaryOffsetSpace === "raw-ssml" ? r || n : n || r;
5170
- }, Fd = (e) => {
5172
+ }, Ff = (e) => {
5171
5173
  if (e.tokenization.boundaryOffsetSpace === "unsupported" || !Number.isFinite(e.position) || e.boundaryWord && /^<[^>]+>$/.test(e.boundaryWord.trim())) return null;
5172
5174
  const t = Math.max(1, Number.isFinite(e.length) ? e.length : 1), r = ws(e.tokenization, e.position >= 0 && e.position < e.tokenization.spokenText.length ? e.position : null, t);
5173
5175
  return Es(r, e.boundaryWord) ? {
@@ -5175,27 +5177,27 @@ var Js = (e, t) => {
5175
5177
  confidence: 1
5176
5178
  } : e.boundaryWord && to(e.boundaryWord) ? null : r;
5177
5179
  }, bi = (e) => {
5178
- const t = Cn({ speechText: e.speechText }), r = kd(e.mathElement);
5180
+ const t = Cn({ speechText: e.speechText }), r = kf(e.mathElement);
5179
5181
  return {
5180
5182
  speech: t,
5181
5183
  math: r,
5182
- result: Md({
5184
+ result: Mf({
5183
5185
  speech: t,
5184
5186
  math: r
5185
5187
  })
5186
5188
  };
5187
- }, Hd = (e, t) => {
5188
- const r = Fd({
5189
+ }, Hf = (e, t) => {
5190
+ const r = Ff({
5189
5191
  tokenization: e.speech,
5190
5192
  position: t.position,
5191
5193
  length: t.length,
5192
5194
  boundaryWord: t.boundaryWord
5193
5195
  });
5194
- return xd({
5196
+ return xf({
5195
5197
  alignment: e.result,
5196
5198
  boundary: r
5197
5199
  });
5198
- }, zd = (e, t) => {
5200
+ }, zf = (e, t) => {
5199
5201
  if (!t.boundaryWord || /^<[^>]+>$/.test(t.boundaryWord.trim())) return null;
5200
5202
  const r = Cn({ speechText: t.boundaryWord }).tokens[0];
5201
5203
  if (!r) return null;
@@ -5204,7 +5206,7 @@ var Js = (e, t) => {
5204
5206
  return i.normalized.toLowerCase() === s || i.spokenAliases.some((o) => o.toLowerCase() === s);
5205
5207
  });
5206
5208
  return n.length === 1 ? n[0].target : null;
5207
- }, ks = "http://www.w3.org/1998/Math/MathML", Ud = /* @__PURE__ */ new Set([
5209
+ }, ks = "http://www.w3.org/1998/Math/MathML", Uf = /* @__PURE__ */ new Set([
5208
5210
  "math",
5209
5211
  "maction",
5210
5212
  "menclose",
@@ -5238,7 +5240,7 @@ var Js = (e, t) => {
5238
5240
  "semantics",
5239
5241
  "annotation",
5240
5242
  "annotation-xml"
5241
- ]), Wd = /* @__PURE__ */ new Set([
5243
+ ]), Wf = /* @__PURE__ */ new Set([
5242
5244
  "accent",
5243
5245
  "accentunder",
5244
5246
  "align",
@@ -5290,12 +5292,12 @@ var Js = (e, t) => {
5290
5292
  "width",
5291
5293
  "xmlns",
5292
5294
  "xml:lang"
5293
- ]), cc = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Bd = (e) => cc(e).replace(/"/g, "&quot;"), jd = (e, t) => {
5295
+ ]), cc = (e) => e.replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), Bf = (e) => cc(e).replace(/"/g, "&quot;"), jf = (e, t) => {
5294
5296
  const r = e.toLowerCase(), n = t.trim().toLowerCase();
5295
- return !!(r.startsWith("on") || !Wd.has(r) || n.includes("javascript:") || n.includes("data:text/html"));
5296
- }, Gd = (e) => {
5297
+ return !!(r.startsWith("on") || !Wf.has(r) || n.includes("javascript:") || n.includes("data:text/html"));
5298
+ }, Gf = (e) => {
5297
5299
  const t = e.localName.toLowerCase();
5298
- if (!Ud.has(t)) return !1;
5300
+ if (!Uf.has(t)) return !1;
5299
5301
  const r = e.namespaceURI;
5300
5302
  return !r || r === ks || r === "http://www.w3.org/1999/xhtml";
5301
5303
  }, uc = (e) => {
@@ -5303,13 +5305,13 @@ var Js = (e, t) => {
5303
5305
  if (e.nodeType === Node.COMMENT_NODE) return "";
5304
5306
  if (e.nodeType !== Node.ELEMENT_NODE) return null;
5305
5307
  const t = e;
5306
- if (!Gd(t)) return null;
5308
+ if (!Gf(t)) return null;
5307
5309
  const r = t.localName.toLowerCase(), n = [];
5308
5310
  for (const s of Array.from(t.attributes)) {
5309
5311
  const o = s.name.toLowerCase();
5310
- if (!jd(o, s.value)) {
5312
+ if (!jf(o, s.value)) {
5311
5313
  if (o === "xmlns" && s.value !== ks) return null;
5312
- n.push(`${o}="${Bd(s.value)}"`);
5314
+ n.push(`${o}="${Bf(s.value)}"`);
5313
5315
  }
5314
5316
  }
5315
5317
  r === "math" && !n.some((s) => s.startsWith("xmlns=")) && n.unshift(`xmlns="${ks}"`);
@@ -5320,10 +5322,10 @@ var Js = (e, t) => {
5320
5322
  i.push(o);
5321
5323
  }
5322
5324
  return `<${r}${n.length > 0 ? ` ${n.join(" ")}` : ""}>${i.join("")}</${r}>`;
5323
- }, qd = (e) => typeof DOMParser < "u" ? new DOMParser().parseFromString(e, "application/xml") : null, Ji = (e) => {
5325
+ }, qf = (e) => typeof DOMParser < "u" ? new DOMParser().parseFromString(e, "application/xml") : null, Ji = (e) => {
5324
5326
  const t = String(e || "").trim();
5325
5327
  if (!t) return null;
5326
- const r = qd(t);
5328
+ const r = qf(t);
5327
5329
  if (!r || r.getElementsByTagName("parsererror").length > 0) return null;
5328
5330
  const n = r.documentElement;
5329
5331
  return !n || n.localName.toLowerCase() !== "math" ? null : uc(n);
@@ -5335,28 +5337,28 @@ var Js = (e, t) => {
5335
5337
  lastCharWasWhitespace: !1,
5336
5338
  lastMapped: null,
5337
5339
  options: e
5338
- }), fc = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", dc = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", pc = (e) => {
5340
+ }), dc = (e) => e.classList?.contains("MathJax") || e.tagName?.toLowerCase() === "mjx-container", fc = (e) => e.tagName?.toLowerCase() === "mjx-assistive-mml", pc = (e) => {
5339
5341
  const t = e.tagName?.toLowerCase();
5340
5342
  return t === "annotation" || t === "annotation-xml";
5341
- }, Vd = (e) => {
5343
+ }, Vf = (e) => {
5342
5344
  const t = e.getAttribute("data-mathml");
5343
5345
  return t && t.trim() ? t : null;
5344
- }, Yd = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, Xd = (e) => {
5346
+ }, Yf = (e) => e.querySelector("mjx-assistive-mml math")?.outerHTML || null, Xf = (e) => {
5345
5347
  if (e.tagName.toLowerCase() === "math") return Ji(e.outerHTML);
5346
- const t = Vd(e);
5348
+ const t = Vf(e);
5347
5349
  if (t) {
5348
5350
  const r = Ji(t);
5349
5351
  if (r) return r;
5350
5352
  }
5351
- if (fc(e)) {
5352
- const r = Yd(e);
5353
+ if (dc(e)) {
5354
+ const r = Yf(e);
5353
5355
  if (r) {
5354
5356
  const n = Ji(r);
5355
5357
  if (n) return n;
5356
5358
  }
5357
5359
  }
5358
5360
  return null;
5359
- }, Kd = /* @__PURE__ */ new Set([
5361
+ }, Kf = /* @__PURE__ */ new Set([
5360
5362
  "P",
5361
5363
  "H1",
5362
5364
  "H2",
@@ -5372,7 +5374,7 @@ var Js = (e, t) => {
5372
5374
  "FIGCAPTION",
5373
5375
  "LABEL",
5374
5376
  "BUTTON"
5375
- ]), Jd = /* @__PURE__ */ new Set([
5377
+ ]), Jf = /* @__PURE__ */ new Set([
5376
5378
  "heading",
5377
5379
  "listitem",
5378
5380
  "option",
@@ -5381,18 +5383,18 @@ var Js = (e, t) => {
5381
5383
  "cell",
5382
5384
  "columnheader",
5383
5385
  "rowheader"
5384
- ]), Qd = (e, t) => {
5386
+ ]), Qf = (e, t) => {
5385
5387
  let r = e.parentElement, n = null;
5386
5388
  for (; r && r !== t; ) {
5387
5389
  const i = (r.getAttribute("role") || "").toLowerCase(), s = r.tagName.toUpperCase();
5388
- if (Kd.has(s) || Jd.has(i)) {
5390
+ if (Kf.has(s) || Jf.has(i)) {
5389
5391
  n = r;
5390
5392
  break;
5391
5393
  }
5392
5394
  r = r.parentElement;
5393
5395
  }
5394
5396
  return n || t;
5395
- }, Zd = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || fc(e), ir = (e, t, r) => {
5397
+ }, Zf = (e) => !!(typeof e.querySelector == "function" && e.querySelector("math, [data-mathml], .MathJax, mjx-container, mjx-assistive-mml")) || e.tagName?.toLowerCase() === "math" || e.hasAttribute?.("data-mathml") || dc(e), ir = (e, t, r) => {
5396
5398
  /[.,;:!?]/.test(t) && e.chars.length > 0 && e.chars[e.chars.length - 1] === " " && (e.chars.pop(), e.position--, e.map.delete(e.position)), e.chars.push(t), r ? (e.map.set(e.position, r), e.lastMapped = r) : e.lastMapped && e.map.set(e.position, e.lastMapped), e.position++;
5397
5399
  }, gc = (e, t) => {
5398
5400
  if (e.inLeadingWhitespace || e.lastCharWasWhitespace || e.chars.length === 0) return !1;
@@ -5468,7 +5470,7 @@ var Js = (e, t) => {
5468
5470
  if (!pc(s))
5469
5471
  for (const o of Array.from(s.childNodes)) n(o);
5470
5472
  };
5471
- return n(t.documentElement), de(r.join(" "));
5473
+ return n(t.documentElement), fe(r.join(" "));
5472
5474
  }, rp = (e, t, r) => {
5473
5475
  const n = hc(r), i = (a) => {
5474
5476
  if (Rn(a, e)) return;
@@ -5478,11 +5480,11 @@ var Js = (e, t) => {
5478
5480
  }
5479
5481
  if (a.nodeType !== 1) return;
5480
5482
  const l = a;
5481
- if (!(dc(l) || pc(l)))
5483
+ if (!(fc(l) || pc(l)))
5482
5484
  for (const c of Array.from(l.childNodes)) i(c);
5483
5485
  };
5484
5486
  i(e), vc(n);
5485
- const s = de(n.chars.join(""));
5487
+ const s = fe(n.chars.join(""));
5486
5488
  if (s) return {
5487
5489
  text: s,
5488
5490
  map: n.map
@@ -5499,7 +5501,7 @@ var Js = (e, t) => {
5499
5501
  const r = hc(t), n = [];
5500
5502
  let i = 0, s, o = !1;
5501
5503
  const a = () => {
5502
- const u = de(r.chars.slice(i, r.chars.length).join(""));
5504
+ const u = fe(r.chars.slice(i, r.chars.length).join(""));
5503
5505
  u && n.push({
5504
5506
  type: "text",
5505
5507
  text: u,
@@ -5508,28 +5510,28 @@ var Js = (e, t) => {
5508
5510
  }, l = (u) => {
5509
5511
  if (Rn(u, e)) return;
5510
5512
  if (u.nodeType === Node.TEXT_NODE) {
5511
- const p = Qd(u, e);
5513
+ const p = Qf(u, e);
5512
5514
  s && p !== s && a(), s = p, mc(r, u);
5513
5515
  return;
5514
5516
  }
5515
5517
  if (u.nodeType !== Node.ELEMENT_NODE) return;
5516
- const d = u;
5517
- if (dc(d)) return;
5518
- const h = Xd(d);
5518
+ const f = u;
5519
+ if (fc(f)) return;
5520
+ const h = Xf(f);
5519
5521
  if (h) {
5520
5522
  a();
5521
- const p = rp(d, h, t);
5523
+ const p = rp(f, h, t);
5522
5524
  ep(r, p);
5523
- const g = de(p.text);
5525
+ const g = fe(p.text);
5524
5526
  n.push({
5525
5527
  type: "math",
5526
5528
  mathml: h,
5527
5529
  fallbackText: g,
5528
- sourceElement: d
5530
+ sourceElement: f
5529
5531
  }), i = r.chars.length, o = !0;
5530
5532
  return;
5531
5533
  }
5532
- for (const p of Array.from(d.childNodes)) l(p);
5534
+ for (const p of Array.from(f.childNodes)) l(p);
5533
5535
  };
5534
5536
  for (const u of Array.from(e.childNodes)) l(u);
5535
5537
  vc(r), a();
@@ -5542,7 +5544,7 @@ var Js = (e, t) => {
5542
5544
  containsMathMarkup: o
5543
5545
  };
5544
5546
  }, cn = (e, t) => {
5545
- if (!Zd(e)) {
5547
+ if (!Zf(e)) {
5546
5548
  const { text: r, map: n } = yi(e, t);
5547
5549
  return {
5548
5550
  visibleText: r,
@@ -5592,7 +5594,7 @@ var Js = (e, t) => {
5592
5594
  }
5593
5595
  }, bc = async (e, t = {}) => {
5594
5596
  if (!e.some((c) => c.type === "math")) return {
5595
- speechText: de(e.map((c) => c.type === "text" ? c.text : c.fallbackText).join(" ")),
5597
+ speechText: fe(e.map((c) => c.type === "text" ? c.text : c.fallbackText).join(" ")),
5596
5598
  usedMathSpeech: !1,
5597
5599
  usedFallback: !1
5598
5600
  };
@@ -5605,7 +5607,7 @@ var Js = (e, t) => {
5605
5607
  }
5606
5608
  try {
5607
5609
  r || (r = await s());
5608
- const u = de(await yc(r, c.mathml, t.language, "none", t.mathSpeech));
5610
+ const u = fe(await yc(r, c.mathml, t.language, "none", t.mathSpeech));
5609
5611
  if (u) {
5610
5612
  o.push(u), n = !0;
5611
5613
  continue;
@@ -5615,7 +5617,7 @@ var Js = (e, t) => {
5615
5617
  i = !0, console.debug("[TTSService] Math speech generation failed; using visible fallback", { message: u instanceof Error ? u.message : String(u) }), o.push(c.fallbackText);
5616
5618
  }
5617
5619
  }
5618
- const a = de(o.join(" "));
5620
+ const a = fe(o.join(" "));
5619
5621
  let l;
5620
5622
  return t.produceSsml && r && n && e.length === 1 && e[0].type === "math" && (l = await up(r, e[0].mathml, t.language, t.mathSpeech) ?? void 0), {
5621
5623
  speechText: a,
@@ -5623,7 +5625,7 @@ var Js = (e, t) => {
5623
5625
  usedFallback: i,
5624
5626
  ssml: l
5625
5627
  };
5626
- }, hp = (e, t) => bc([e], t), fp = (e) => (e || "en").split("-")[0].toLowerCase() || "en", dp = /* @__PURE__ */ new Set([
5628
+ }, hp = (e, t) => bc([e], t), dp = (e) => (e || "en").split("-")[0].toLowerCase() || "en", fp = /* @__PURE__ */ new Set([
5627
5629
  "H1",
5628
5630
  "H2",
5629
5631
  "H3",
@@ -5641,15 +5643,15 @@ var Js = (e, t) => {
5641
5643
  ]), gp = (e) => {
5642
5644
  if (e.type !== "text" || !e.sourceElement) return !1;
5643
5645
  const t = e.sourceElement.tagName.toUpperCase(), r = (e.sourceElement.getAttribute("role") || "").toLowerCase();
5644
- return dp.has(t) || pp.has(r);
5646
+ return fp.has(t) || pp.has(r);
5645
5647
  }, mp = async (e) => {
5646
5648
  const t = e.resolveMathSpeech ?? hp, { visibleText: r } = e, n = [];
5647
5649
  let i = 0;
5648
5650
  const s = (a) => {
5649
- const l = de(a), c = r.indexOf(l, i), u = c >= 0 ? c : i, d = u + l.length;
5650
- return i = d, {
5651
+ const l = fe(a), c = r.indexOf(l, i), u = c >= 0 ? c : i, f = u + l.length;
5652
+ return i = f, {
5651
5653
  start: u,
5652
- end: d
5654
+ end: f
5653
5655
  };
5654
5656
  }, o = [];
5655
5657
  for (let a = 0; a < e.chunks.length; a++) {
@@ -5660,7 +5662,7 @@ var Js = (e, t) => {
5660
5662
  offset: 0
5661
5663
  }] : Js(l.text, { locale: e.language });
5662
5664
  for (const g of p) {
5663
- const m = de(g.text);
5665
+ const m = fe(g.text);
5664
5666
  if (!m) continue;
5665
5667
  const b = s(m);
5666
5668
  n.push({
@@ -5679,7 +5681,7 @@ var Js = (e, t) => {
5679
5681
  language: e.language,
5680
5682
  produceSsml: e.produceSsml,
5681
5683
  mathSpeech: e.mathSpeech
5682
- }), d = !u.speechText, h = u.speechText || l.fallbackText;
5684
+ }), f = !u.speechText, h = u.speechText || l.fallbackText;
5683
5685
  n.push({
5684
5686
  sourceChunkIndex: a,
5685
5687
  segment: {
@@ -5688,16 +5690,16 @@ var Js = (e, t) => {
5688
5690
  mathml: l.mathml,
5689
5691
  fallbackText: l.fallbackText,
5690
5692
  visibleSpan: c,
5691
- usedFallback: d,
5693
+ usedFallback: f,
5692
5694
  ssml: u.ssml
5693
5695
  }
5694
5696
  }), o.push(h);
5695
5697
  }
5696
5698
  return {
5697
5699
  segments: n,
5698
- locale: fp(e.language),
5700
+ locale: dp(e.language),
5699
5701
  visibleText: r,
5700
- plainSpeechText: de(o.join(" "))
5702
+ plainSpeechText: fe(o.join(" "))
5701
5703
  };
5702
5704
  }, vp = (e) => (e || "en").split("-")[0].toLowerCase() || "en", yp = "sre-v1", bp = 256, xs = (e) => Array.isArray(e) ? `array:[${e.map(xs).join(",")}]` : e && typeof e == "object" ? `object:{${Object.entries(e).sort(([t], [r]) => t.localeCompare(r)).map(([t, r]) => `${JSON.stringify(t)}:${xs(r)}`).join(",")}}` : e === null ? "null:null" : typeof e > "u" ? "undefined:" : typeof e == "function" ? `function:${e.name || "anonymous"}` : typeof e == "symbol" ? `symbol:${String(e)}` : typeof e == "bigint" ? `bigint:${e.toString()}` : typeof e == "number" ? Number.isFinite(e) ? `number:${e}` : `number:${String(e)}` : `${typeof e}:${JSON.stringify(e)}`, ya = (e, t, r, n) => `${yp}\0${vp(e)}\0${t ? "ssml" : "plain"}\0${xs(r ?? null)}\0${n}`, Sp = (e = {}) => {
5703
5705
  const t = Math.max(1, e.maxEntries ?? bp), r = e.resolve ?? ((s, o) => bc([s], o)), n = /* @__PURE__ */ new Map(), i = (s, o) => {
@@ -5710,15 +5712,15 @@ var Js = (e, t) => {
5710
5712
  const a = ro(o.mathSpeech), l = o.produceSsml === !0, c = ya(o.language, l, a, s.mathml), u = n.get(c);
5711
5713
  if (u)
5712
5714
  return n.delete(c), n.set(c, u), u;
5713
- const d = await r(s, {
5715
+ const f = await r(s, {
5714
5716
  ...o,
5715
5717
  mathSpeech: a
5716
5718
  });
5717
- return l && d.ssml && t > 1 && i(ya(o.language, !1, a, s.mathml), {
5718
- speechText: d.speechText,
5719
- usedMathSpeech: d.usedMathSpeech,
5720
- usedFallback: d.usedFallback
5721
- }), i(c, d), d;
5719
+ return l && f.ssml && t > 1 && i(ya(o.language, !1, a, s.mathml), {
5720
+ speechText: f.speechText,
5721
+ usedMathSpeech: f.usedMathSpeech,
5722
+ usedFallback: f.usedFallback
5723
+ }), i(c, f), f;
5722
5724
  };
5723
5725
  }, Tp = (e) => !e || /^<[^>]+>$/.test(e.trim()) ? null : Cn({ speechText: e }).tokens[0]?.normalized || null, _p = (e, t) => {
5724
5726
  const r = Cn({ speechText: e.speechText });
@@ -5726,7 +5728,7 @@ var Js = (e, t) => {
5726
5728
  boundary: null,
5727
5729
  spokenText: r.spokenText
5728
5730
  };
5729
- const n = Dd({
5731
+ const n = Df({
5730
5732
  tokenization: r,
5731
5733
  position: t.position,
5732
5734
  length: t.length,
@@ -5759,7 +5761,7 @@ var Js = (e, t) => {
5759
5761
  };
5760
5762
  let n, i;
5761
5763
  if (e.catalogAlignment)
5762
- n = cd(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
5764
+ n = cf(e.catalogAlignment, t.position, t.length, t.word), i = e.catalogAlignment.spokenText;
5763
5765
  else {
5764
5766
  const s = _p(e, t);
5765
5767
  n = s.boundary, i = s.spokenText;
@@ -5900,11 +5902,11 @@ var Js = (e, t) => {
5900
5902
  if (t.chunkSpokenStart === null || t.chunkSpokenEnd === null) return null;
5901
5903
  let s = null;
5902
5904
  for (const o of n) {
5903
- const a = Hd(o.alignment, {
5905
+ const a = Hf(o.alignment, {
5904
5906
  position: t.chunkSpokenStart,
5905
5907
  length: Math.max(1, t.chunkSpokenEnd - t.chunkSpokenStart),
5906
5908
  boundaryWord: r.word
5907
- }) || zd(o.alignment, { boundaryWord: r.word });
5909
+ }) || zf(o.alignment, { boundaryWord: r.word });
5908
5910
  if (!a) continue;
5909
5911
  const l = i(a);
5910
5912
  if (l) {
@@ -5927,7 +5929,7 @@ var Js = (e, t) => {
5927
5929
  }
5928
5930
  }, Op = (e, t) => {
5929
5931
  if (!e.catalogAlignment || t.chunkSpokenStart === null) return null;
5930
- const r = ud(e.catalogAlignment, t.chunkSpokenStart);
5932
+ const r = uf(e.catalogAlignment, t.chunkSpokenStart);
5931
5933
  if (!r) return null;
5932
5934
  const n = xc(e.visibleMap, r.start, r.end);
5933
5935
  return n ? {
@@ -5994,7 +5996,7 @@ var Js = (e, t) => {
5994
5996
  resolveBoundary(n) {
5995
5997
  const i = r.get(n.chunkId);
5996
5998
  if (!i) return Ta();
5997
- const { chunk: s } = i, o = Ep(s, n), a = Op(s, o), l = Mp(a, s), c = (!a || l.length > 0 ? Cp(s, o, n, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, d = c && c.quality === "expression" ? c : null;
5999
+ const { chunk: s } = i, o = Ep(s, n), a = Op(s, o), l = Mp(a, s), c = (!a || l.length > 0 ? Cp(s, o, n, l, i.renderedMathTargetResolver) : null) || null, u = t && c && c.quality !== "expression" ? c : null, f = c && c.quality === "expression" ? c : null;
5998
6000
  if (u) {
5999
6001
  const h = _a(l);
6000
6002
  return h && i.heldTokenByElement.set(h, u), Rr({
@@ -6024,7 +6026,7 @@ var Js = (e, t) => {
6024
6026
  }
6025
6027
  return Rr({
6026
6028
  semanticTarget: null,
6027
- expressionTarget: d ?? Sa(i, l),
6029
+ expressionTarget: f ?? Sa(i, l),
6028
6030
  regionTarget: i.regionTarget,
6029
6031
  confidence: o.confidence,
6030
6032
  reason: o.reason
@@ -6506,8 +6508,8 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6506
6508
  for (; a; ) {
6507
6509
  const c = a, u = c.parentElement;
6508
6510
  if (u && !this.isElementHidden(u) && !Ss(c)) {
6509
- const d = this.getBoundaryAnchor(c, t), h = s.get(c);
6510
- d && h !== void 0 && d.anchor !== l && h > 0 && (n.set(h, Math.max(n.get(h) || 0, d.units)), l = d.anchor);
6511
+ const f = this.getBoundaryAnchor(c, t), h = s.get(c);
6512
+ f && h !== void 0 && f.anchor !== l && h > 0 && (n.set(h, Math.max(n.get(h) || 0, f.units)), l = f.anchor);
6511
6513
  }
6512
6514
  a = o.nextNode();
6513
6515
  }
@@ -6522,7 +6524,7 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6522
6524
  const n = Array.from(r.keys()).filter((l) => l > 0 && l < t.length).sort((l, c) => l - c), i = [];
6523
6525
  let s = 0;
6524
6526
  for (const l of n) {
6525
- const c = t.substring(s, l), u = c.match(/^\s*/)?.[0].length || 0, d = c.match(/\s*$/)?.[0].length || 0, h = s + u, p = l - d;
6527
+ const c = t.substring(s, l), u = c.match(/^\s*/)?.[0].length || 0, f = c.match(/\s*$/)?.[0].length || 0, h = s + u, p = l - f;
6526
6528
  if (p > h) {
6527
6529
  const g = t.substring(h, p);
6528
6530
  i.push({
@@ -6560,19 +6562,19 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6560
6562
  if (i.length === 0) return t;
6561
6563
  const s = [];
6562
6564
  for (const o of t) {
6563
- const a = o.startOffset, l = o.startOffset + o.text.length, c = i.filter((d) => d > a && d < l);
6565
+ const a = o.startOffset, l = o.startOffset + o.text.length, c = i.filter((f) => f > a && f < l);
6564
6566
  if (c.length === 0) {
6565
6567
  s.push(o);
6566
6568
  continue;
6567
6569
  }
6568
6570
  let u = a;
6569
- for (const d of [...c, l]) {
6570
- const h = n.substring(u, d), p = h.match(/^\s*/)?.[0].length || 0, g = h.match(/\s*$/)?.[0].length || 0, m = u + p, b = d - g;
6571
+ for (const f of [...c, l]) {
6572
+ const h = n.substring(u, f), p = h.match(/^\s*/)?.[0].length || 0, g = h.match(/\s*$/)?.[0].length || 0, m = u + p, b = f - g;
6571
6573
  b > m && s.push({
6572
6574
  text: n.substring(m, b),
6573
6575
  startOffset: m,
6574
6576
  pauseMsAfter: 0
6575
- }), u = d;
6577
+ }), u = f;
6576
6578
  }
6577
6579
  }
6578
6580
  return s;
@@ -6586,7 +6588,7 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6586
6588
  createSeekSegmentsFromSpeechChunks(t) {
6587
6589
  let r = 0;
6588
6590
  return t.map((n) => {
6589
- const i = n.plainFallback?.speechText || (this.hasExplicitBreakSemantics(n.speechText) ? n.visibleText : n.speechText) || n.visibleText, s = de(i) || n.visibleText || "", o = {
6591
+ const i = n.plainFallback?.speechText || (this.hasExplicitBreakSemantics(n.speechText) ? n.visibleText : n.speechText) || n.visibleText, s = fe(i) || n.visibleText || "", o = {
6590
6592
  text: s,
6591
6593
  startOffset: r,
6592
6594
  pauseMsAfter: 0
@@ -6688,10 +6690,10 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6688
6690
  if (await this.applyLanguageSettings(r), n !== this.speakRunId) return;
6689
6691
  const s = await this.resolveSpeechContent(t, r);
6690
6692
  if (n !== this.speakRunId) return;
6691
- const { contentToSpeak: o, speechText: a, highlightText: l, normalizedText: c, usedCatalogSpoken: u, speechSource: d, speechMatchesVisibleText: h, speechChunks: p } = s;
6693
+ const { contentToSpeak: o, speechText: a, highlightText: l, normalizedText: c, usedCatalogSpoken: u, speechSource: f, speechMatchesVisibleText: h, speechChunks: p } = s;
6692
6694
  this.logResolvedSpeechContent({
6693
6695
  contentToSpeak: o,
6694
- speechSource: d,
6696
+ speechSource: f,
6695
6697
  catalogId: r?.catalogId
6696
6698
  }), this.initializeSpeakTracking(l, r);
6697
6699
  const g = r?.highlightModeOverride || (h ? this.resolveHighlightMode() : "sentence");
@@ -6728,7 +6730,7 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6728
6730
  }
6729
6731
  async switchProviderToBrowser(t, r) {
6730
6732
  if (!this.currentProvider) return !1;
6731
- const n = new Kf(), i = this.currentProvider.providerId, s = {};
6733
+ const n = new Xd(), i = this.currentProvider.providerId, s = {};
6732
6734
  this.ttsConfig.rate !== void 0 && (s.rate = this.ttsConfig.rate), this.ttsConfig.pitch !== void 0 && (s.pitch = this.ttsConfig.pitch), this.ttsConfig.mathTokenHighlighting !== void 0 && (s.mathTokenHighlighting = this.ttsConfig.mathTokenHighlighting);
6733
6735
  const o = r?.operation || "tts-initialize", a = r?.contentToSpeak ?? "", l = a.replace(/\s+/g, " ").trim().slice(0, 120), c = a.length > 0 ? {
6734
6736
  textLength: a.length,
@@ -6781,7 +6783,7 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6781
6783
  }, "updateSettings" in this.provider && typeof this.provider.updateSettings == "function" && await this.provider.updateSettings({ providerOptions: s });
6782
6784
  }
6783
6785
  async resolveSpeechContent(t, r) {
6784
- const n = de(t);
6786
+ const n = fe(t);
6785
6787
  if (r?.ignoreCatalogs) return {
6786
6788
  contentToSpeak: n,
6787
6789
  speechText: n,
@@ -6802,7 +6804,7 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6802
6804
  form: "content"
6803
6805
  }), o = s?.content;
6804
6806
  if (s && o !== void 0) {
6805
- const a = r?.contentElement && cn(r.contentElement, this.getTextProcessingOptions(r.language)).visibleText || n, l = de(o);
6807
+ const a = r?.contentElement && cn(r.contentElement, this.getTextProcessingOptions(r.language)).visibleText || n, l = fe(o);
6806
6808
  return this.debugLog(`[TTSService] Using catalog content for "${r.catalogId}" (${s.language})`), {
6807
6809
  contentToSpeak: o,
6808
6810
  speechText: o,
@@ -6836,7 +6838,7 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6836
6838
  if (!this.catalogResolver) return null;
6837
6839
  const i = this.collectCatalogSpeechChunks(t, n);
6838
6840
  if (!i.some((a) => a.sourceElement)) return null;
6839
- const s = de(i.map((a) => a.speechText).join(" ")), o = cn(t, this.getTextProcessingOptions(n.language)).visibleText || r;
6841
+ const s = fe(i.map((a) => a.speechText).join(" ")), o = cn(t, this.getTextProcessingOptions(n.language)).visibleText || r;
6840
6842
  return {
6841
6843
  contentToSpeak: s,
6842
6844
  speechText: s,
@@ -6854,7 +6856,7 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6854
6856
  const n = [];
6855
6857
  let i = "";
6856
6858
  const s = () => {
6857
- const u = de(i);
6859
+ const u = fe(i);
6858
6860
  i = "", u && n.push({
6859
6861
  speechText: u,
6860
6862
  visibleText: u,
@@ -6862,17 +6864,17 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6862
6864
  speechMatchesVisibleText: !0
6863
6865
  });
6864
6866
  }, o = (u) => {
6865
- const d = u.getAttribute("data-catalog-idref");
6866
- if (!d) return null;
6867
+ const f = u.getAttribute("data-catalog-idref");
6868
+ if (!f) return null;
6867
6869
  const h = {
6868
6870
  type: "spoken",
6869
6871
  language: r.language || "en-US",
6870
6872
  useFallback: !0,
6871
6873
  context: r.catalogContext
6872
- }, p = this.catalogResolver.getAlternative(d, {
6874
+ }, p = this.catalogResolver.getAlternative(f, {
6873
6875
  ...h,
6874
6876
  form: "payload"
6875
- }), g = p?.payload ? qf({ payload: p.payload }) ?? void 0 : void 0, m = this.catalogResolver.getAlternative(d, {
6877
+ }), g = p?.payload ? Gd({ payload: p.payload }) ?? void 0 : void 0, m = this.catalogResolver.getAlternative(f, {
6876
6878
  ...h,
6877
6879
  form: "content"
6878
6880
  })?.content;
@@ -6880,14 +6882,14 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6880
6882
  script: m,
6881
6883
  audio: g
6882
6884
  };
6883
- }, a = (u, d) => {
6885
+ }, a = (u, f) => {
6884
6886
  const h = l(u);
6885
6887
  if (h.length !== 1) return null;
6886
- const p = h[0], g = cn(p, this.getTextProcessingOptions(r.language)).visibleText || de(p.textContent || ""), m = (b) => de(b).replace(/\s+/g, "");
6887
- return m(g) === m(d) ? p : null;
6888
+ const p = h[0], g = cn(p, this.getTextProcessingOptions(r.language)).visibleText || fe(p.textContent || ""), m = (b) => fe(b).replace(/\s+/g, "");
6889
+ return m(g) === m(f) ? p : null;
6888
6890
  }, l = (u) => {
6889
- const d = Array.from(u.querySelectorAll("math"));
6890
- return u.localName?.toLowerCase() === "math" ? [u, ...d] : d;
6891
+ const f = Array.from(u.querySelectorAll("math"));
6892
+ return u.localName?.toLowerCase() === "math" ? [u, ...f] : f;
6891
6893
  }, c = (u) => {
6892
6894
  if (Rn(u, t)) return;
6893
6895
  if (u.nodeType === Node.TEXT_NODE) {
@@ -6895,17 +6897,17 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6895
6897
  return;
6896
6898
  }
6897
6899
  if (u.nodeType !== Node.ELEMENT_NODE) return;
6898
- const d = u, h = o(d);
6900
+ const f = u, h = o(f);
6899
6901
  if (h) {
6900
6902
  s();
6901
- const p = cn(d, this.getTextProcessingOptions(r.language)), g = p.visibleText || de(d.textContent || ""), m = Ac(d, t), b = h.script !== void 0 ? (() => {
6903
+ const p = cn(f, this.getTextProcessingOptions(r.language)), g = p.visibleText || fe(f.textContent || ""), m = Ac(f, t), b = h.script !== void 0 ? (() => {
6902
6904
  const E = h.script, R = nc({
6903
6905
  speechText: E,
6904
6906
  visibleText: g
6905
- }), $ = a(d, g), L = $ ? bi({
6907
+ }), $ = a(f, g), L = $ ? bi({
6906
6908
  mathElement: $,
6907
6909
  speechText: E
6908
- }) : void 0, Z = L ? void 0 : l(d).map((D) => ({
6910
+ }) : void 0, Z = L ? void 0 : l(f).map((D) => ({
6909
6911
  element: D,
6910
6912
  alignment: bi({
6911
6913
  mathElement: D,
@@ -6915,9 +6917,9 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6915
6917
  return {
6916
6918
  speechText: E,
6917
6919
  visibleText: g,
6918
- sourceElement: d,
6920
+ sourceElement: f,
6919
6921
  regionElement: m,
6920
- speechMatchesVisibleText: de(E) === g,
6922
+ speechMatchesVisibleText: fe(E) === g,
6921
6923
  playbackMode: R.playbackMode,
6922
6924
  alignment: R,
6923
6925
  mathAlignment: L,
@@ -6933,7 +6935,7 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6933
6935
  } : {
6934
6936
  speechText: g,
6935
6937
  visibleText: g,
6936
- sourceElement: d,
6938
+ sourceElement: f,
6937
6939
  regionElement: m,
6938
6940
  speechMatchesVisibleText: !1,
6939
6941
  visibleMap: p.map,
@@ -6944,7 +6946,7 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
6944
6946
  b && n.push(b);
6945
6947
  return;
6946
6948
  }
6947
- for (const p of Array.from(d.childNodes)) c(p);
6949
+ for (const p of Array.from(f.childNodes)) c(p);
6948
6950
  };
6949
6951
  return c(t), s(), n;
6950
6952
  }
@@ -7100,23 +7102,23 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7100
7102
  async playRecordedAudio(t, r) {
7101
7103
  if (typeof document > "u") throw new Error("[tts] no document available to play recorded audio");
7102
7104
  const n = t.sources[0], i = document.createElement("audio");
7103
- i.preload = "auto", i.src = Gf(n.src, t.fragment), i.playbackRate = this.normalizePlaybackRate(Number(this.ttsConfig.rate || 1)), await new Promise((s, o) => {
7105
+ i.preload = "auto", i.src = jd(n.src, t.fragment), i.playbackRate = this.normalizePlaybackRate(Number(this.ttsConfig.rate || 1)), await new Promise((s, o) => {
7104
7106
  let a, l = !1, c = !1;
7105
7107
  const u = () => {
7106
7108
  c || l || (l = !0, r?.());
7107
- }, d = () => {
7109
+ }, f = () => {
7108
7110
  i.removeEventListener("ended", h), i.removeEventListener("error", p), i.removeEventListener("playing", u), a?.(), this.activeRecordedAudio?.element === i && (this.activeRecordedAudio = null);
7109
7111
  }, h = () => {
7110
- c || (c = !0, d(), s());
7112
+ c || (c = !0, f(), s());
7111
7113
  }, p = () => {
7112
- c || (c = !0, d(), o(/* @__PURE__ */ new Error(`[tts] recorded audio failed to play: ${n.src}`)));
7114
+ c || (c = !0, f(), o(/* @__PURE__ */ new Error(`[tts] recorded audio failed to play: ${n.src}`)));
7113
7115
  };
7114
7116
  this.activeRecordedAudio = {
7115
7117
  element: i,
7116
7118
  cancel: () => {
7117
- c || (c = !0, d(), i.pause(), s());
7119
+ c || (c = !0, f(), i.pause(), s());
7118
7120
  }
7119
- }, i.addEventListener("ended", h), i.addEventListener("error", p), i.addEventListener("playing", u), a = jf(i, t.fragment, h), Promise.resolve(i.play()).then(u).catch(p);
7121
+ }, i.addEventListener("ended", h), i.addEventListener("error", p), i.addEventListener("playing", u), a = Bd(i, t.fragment, h), Promise.resolve(i.play()).then(u).catch(p);
7120
7122
  }).finally(() => {
7121
7123
  this.activeRecordedAudio?.element === i && (this.activeRecordedAudio = null), i.pause(), i.removeAttribute("src");
7122
7124
  });
@@ -7145,22 +7147,22 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7145
7147
  if (this.runWhenPlaybackStarts(r, () => {
7146
7148
  o && i && t.mathAlignment ? this.renderHighlightDecision(o.resolveInitial(i.id)) : this.highlightCatalogRegion(t);
7147
7149
  }), !(t.sourceElement && (t.mathAlignment && t.mathAlignment.speech.tokens.length > 0 || t.mathAlignments && t.mathAlignments.length > 0 || t.alignment && t.visibleMap && (t.playbackMode === "exact-word" || t.playbackMode === "anchor-span")))) {
7148
- const u = this.provider, d = u.onWordBoundary;
7150
+ const u = this.provider, f = u.onWordBoundary;
7149
7151
  u.onWordBoundary = void 0;
7150
7152
  try {
7151
7153
  await u.speak(t.speechText);
7152
7154
  } finally {
7153
- this.provider === u && r === this.speakRunId && u.onWordBoundary === void 0 && (u.onWordBoundary = d);
7155
+ this.provider === u && r === this.speakRunId && u.onWordBoundary === void 0 && (u.onWordBoundary = f);
7154
7156
  }
7155
7157
  return;
7156
7158
  }
7157
- const a = this.provider, l = a.onWordBoundary, c = (u, d, h) => {
7159
+ const a = this.provider, l = a.onWordBoundary, c = (u, f, h) => {
7158
7160
  if (r === this.speakRunId && o && i) {
7159
7161
  const p = i.offsetSpace === "unsupported" ? "unknown" : i.offsetSpace;
7160
7162
  this.renderHighlightDecision(o.resolveBoundary({
7161
7163
  chunkId: i.id,
7162
7164
  word: u,
7163
- position: d,
7165
+ position: f,
7164
7166
  length: h,
7165
7167
  providerOffsetSpace: p
7166
7168
  }));
@@ -7215,7 +7217,7 @@ var Cc = (e, t) => e === t || e.startContainer === t.startContainer && e.startOf
7215
7217
  }
7216
7218
  const o = document.createRange();
7217
7219
  o.selectNodeContents(n), o.setEnd(t.startContainer, t.startOffset);
7218
- const a = aa(o, n).text, l = de(a), c = l.length + (/\s$/.test(a) && l ? 1 : 0);
7220
+ const a = aa(o, n).text, l = fe(a), c = l.length + (/\s$/.test(a) && l ? 1 : 0);
7219
7221
  this.debugLog("[TTSService] speakRange offset calculation:", {
7220
7222
  selectedText: s,
7221
7223
  textBeforeRange: a.substring(0, 100),
@@ -7425,7 +7427,7 @@ var Lm = Object.freeze([0.8, 1.25]), Mm = Object.freeze([
7425
7427
  0.8,
7426
7428
  1,
7427
7429
  1.25
7428
- ]), Nm = If({
7430
+ ]), Nm = Md({
7429
7431
  policy: {
7430
7432
  allowed: [],
7431
7433
  blocked: []
@@ -7515,7 +7517,7 @@ Ms || (Ms = function(t) {
7515
7517
  for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++) n[i - 1] = arguments[i];
7516
7518
  return new t(...n);
7517
7519
  });
7518
- var er = ve(Array.prototype.forEach), ag = ve(Array.prototype.lastIndexOf), ka = ve(Array.prototype.pop), tn = ve(Array.prototype.push), lg = ve(Array.prototype.splice), Hr = Array.isArray, un = ve(String.prototype.toLowerCase), Zi = ve(String.prototype.toString), xa = ve(String.prototype.match), rn = ve(String.prototype.replace), Aa = ve(String.prototype.indexOf), cg = ve(String.prototype.trim), ug = ve(Number.prototype.toString), hg = ve(Boolean.prototype.toString), Ra = typeof BigInt > "u" ? null : ve(BigInt.prototype.toString), Ca = typeof Symbol > "u" ? null : ve(Symbol.prototype.toString), Le = ve(Object.prototype.hasOwnProperty), nn = ve(Object.prototype.toString), Ee = ve(RegExp.prototype.test), Qt = fg(TypeError);
7520
+ var er = ve(Array.prototype.forEach), ag = ve(Array.prototype.lastIndexOf), ka = ve(Array.prototype.pop), tn = ve(Array.prototype.push), lg = ve(Array.prototype.splice), Hr = Array.isArray, un = ve(String.prototype.toLowerCase), Zi = ve(String.prototype.toString), xa = ve(String.prototype.match), rn = ve(String.prototype.replace), Aa = ve(String.prototype.indexOf), cg = ve(String.prototype.trim), ug = ve(Number.prototype.toString), hg = ve(Boolean.prototype.toString), Ra = typeof BigInt > "u" ? null : ve(BigInt.prototype.toString), Ca = typeof Symbol > "u" ? null : ve(Symbol.prototype.toString), Le = ve(Object.prototype.hasOwnProperty), nn = ve(Object.prototype.toString), Ee = ve(RegExp.prototype.test), Qt = dg(TypeError);
7519
7521
  function ve(e) {
7520
7522
  return function(t) {
7521
7523
  t instanceof RegExp && (t.lastIndex = 0);
@@ -7523,7 +7525,7 @@ function ve(e) {
7523
7525
  return Ls(e, t, n);
7524
7526
  };
7525
7527
  }
7526
- function fg(e) {
7528
+ function dg(e) {
7527
7529
  return function() {
7528
7530
  for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++) r[n] = arguments[n];
7529
7531
  return Ms(e, r);
@@ -7543,7 +7545,7 @@ function re(e, t) {
7543
7545
  }
7544
7546
  return e;
7545
7547
  }
7546
- function dg(e) {
7548
+ function fg(e) {
7547
7549
  for (let t = 0; t < e.length; t++) Le(e, t) || (e[t] = null);
7548
7550
  return e;
7549
7551
  }
@@ -7552,7 +7554,7 @@ function He(e) {
7552
7554
  for (const n of Ic(e)) {
7553
7555
  var r = rg(n, 2);
7554
7556
  const i = r[0], s = r[1];
7555
- Le(e, i) && (Hr(s) ? t[i] = dg(s) : s && typeof s == "object" && s.constructor === Object ? t[i] = He(s) : t[i] = s);
7557
+ Le(e, i) && (Hr(s) ? t[i] = fg(s) : s && typeof s == "object" && s.constructor === Object ? t[i] = He(s) : t[i] = s);
7556
7558
  }
7557
7559
  return t;
7558
7560
  }
@@ -8317,10 +8319,10 @@ function $c() {
8317
8319
  e.DocumentFragment;
8318
8320
  const s = e.HTMLTemplateElement, o = e.Node, a = e.Element, l = e.NodeFilter;
8319
8321
  e.NamedNodeMap === void 0 && (e.NamedNodeMap || e.MozNamedAttrMap), e.HTMLFormElement;
8320
- const c = e.DOMParser, u = e.trustedTypes, d = a.prototype, h = et(d, "cloneNode"), p = et(d, "remove"), g = et(d, "nextSibling"), m = et(d, "childNodes"), b = et(d, "parentNode"), E = et(d, "shadowRoot"), R = et(d, "attributes"), $ = o && o.prototype ? et(o.prototype, "nodeType") : null, L = o && o.prototype ? et(o.prototype, "nodeName") : null, Z = o && o.prototype ? et(o.prototype, "ownerDocument") : null, D = function(f) {
8321
- return $ ? $(f) : f.nodeType;
8322
- }, he = function(f) {
8323
- return L ? L(f) : f.nodeName;
8322
+ const c = e.DOMParser, u = e.trustedTypes, f = a.prototype, h = et(f, "cloneNode"), p = et(f, "remove"), g = et(f, "nextSibling"), m = et(f, "childNodes"), b = et(f, "parentNode"), E = et(f, "shadowRoot"), R = et(f, "attributes"), $ = o && o.prototype ? et(o.prototype, "nodeType") : null, L = o && o.prototype ? et(o.prototype, "nodeName") : null, Z = o && o.prototype ? et(o.prototype, "ownerDocument") : null, D = function(d) {
8323
+ return $ ? $(d) : d.nodeType;
8324
+ }, he = function(d) {
8325
+ return L ? L(d) : d.nodeName;
8324
8326
  };
8325
8327
  if (typeof s == "function") {
8326
8328
  const w = r.createElement("template");
@@ -8329,17 +8331,17 @@ function $c() {
8329
8331
  let W, ee = "", H, Ne = !1, Pe = 0;
8330
8332
  const Nt = function() {
8331
8333
  if (Pe > 0) throw Qt('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.');
8332
- }, $e = function(f) {
8334
+ }, $e = function(d) {
8333
8335
  Nt(), Pe++;
8334
8336
  try {
8335
- return W.createHTML(f);
8337
+ return W.createHTML(d);
8336
8338
  } finally {
8337
8339
  Pe--;
8338
8340
  }
8339
- }, De = function(f) {
8341
+ }, De = function(d) {
8340
8342
  Nt(), Pe++;
8341
8343
  try {
8342
- return W.createScriptURL(f);
8344
+ return W.createScriptURL(d);
8343
8345
  } finally {
8344
8346
  Pe--;
8345
8347
  }
@@ -8348,7 +8350,7 @@ function $c() {
8348
8350
  }, Je = r, O = Je.implementation, k = Je.createNodeIterator, M = Je.createDocumentFragment, I = Je.getElementsByTagName, F = n.importNode;
8349
8351
  let x = Da();
8350
8352
  t.isSupported = typeof Ic == "function" && typeof b == "function" && O && O.createHTMLDocument !== void 0;
8351
- const N = yg, K = bg, J = Sg, Y = Tg, se = _g, ht = wg, ft = Eg, qr = xg;
8353
+ const N = yg, K = bg, J = Sg, Y = Tg, se = _g, ht = wg, dt = Eg, qr = xg;
8352
8354
  let br = Na, ae = null;
8353
8355
  const Vr = re({}, [
8354
8356
  ...Oa,
@@ -8384,7 +8386,7 @@ function $c() {
8384
8386
  value: !1
8385
8387
  }
8386
8388
  })), $t = null, Mn = null;
8387
- const dt = Object.seal(Nr(null, {
8389
+ const ft = Object.seal(Nr(null, {
8388
8390
  tagCheck: {
8389
8391
  writable: !0,
8390
8392
  configurable: !1,
@@ -8480,72 +8482,72 @@ function $c() {
8480
8482
  let Jr = null;
8481
8483
  const Xc = ["application/xhtml+xml", "text/html"], Kc = "text/html";
8482
8484
  let ge = null, xr = null;
8483
- const Jc = r.createElement("form"), vo = function(f) {
8484
- return f instanceof RegExp || f instanceof Function;
8485
+ const Jc = r.createElement("form"), vo = function(d) {
8486
+ return d instanceof RegExp || d instanceof Function;
8485
8487
  }, Ii = function() {
8486
- let f = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
8487
- if (xr && xr === f) return;
8488
- (!f || typeof f != "object") && (f = {}), f = He(f), Jr = Xc.indexOf(f.PARSER_MEDIA_TYPE) === -1 ? Kc : f.PARSER_MEDIA_TYPE, ge = Jr === "application/xhtml+xml" ? Zi : un, ae = Bt(f, "ALLOWED_TAGS", Vr, { transform: ge }), le = Bt(f, "ALLOWED_ATTR", Yr, { transform: ge }), Oi = Bt(f, "ALLOWED_NAMESPACES", Vc, { transform: Zi }), fo = Bt(f, "ADD_URI_SAFE_ATTR", po, {
8488
+ let d = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
8489
+ if (xr && xr === d) return;
8490
+ (!d || typeof d != "object") && (d = {}), d = He(d), Jr = Xc.indexOf(d.PARSER_MEDIA_TYPE) === -1 ? Kc : d.PARSER_MEDIA_TYPE, ge = Jr === "application/xhtml+xml" ? Zi : un, ae = Bt(d, "ALLOWED_TAGS", Vr, { transform: ge }), le = Bt(d, "ALLOWED_ATTR", Yr, { transform: ge }), Oi = Bt(d, "ALLOWED_NAMESPACES", Vc, { transform: Zi }), fo = Bt(d, "ADD_URI_SAFE_ATTR", po, {
8489
8491
  transform: ge,
8490
8492
  base: po
8491
- }), uo = Bt(f, "ADD_DATA_URI_TAGS", ho, {
8493
+ }), uo = Bt(d, "ADD_DATA_URI_TAGS", ho, {
8492
8494
  transform: ge,
8493
8495
  base: ho
8494
- }), Er = Bt(f, "FORBID_CONTENTS", co, { transform: ge }), $t = Bt(f, "FORBID_TAGS", He({}), { transform: ge }), Mn = Bt(f, "FORBID_ATTR", He({}), { transform: ge }), wr = Le(f, "USE_PROFILES") ? f.USE_PROFILES && typeof f.USE_PROFILES == "object" ? He(f.USE_PROFILES) : f.USE_PROFILES : !1, A = f.ALLOW_ARIA_ATTR !== !1, G = f.ALLOW_DATA_ATTR !== !1, we = f.ALLOW_UNKNOWN_PROTOCOLS || !1, Vt = f.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ce = f.SAFE_FOR_TEMPLATES || !1, Ge = f.SAFE_FOR_XML !== !1, qe = f.WHOLE_DOCUMENT || !1, Ft = f.RETURN_DOM || !1, Tr = f.RETURN_DOM_FRAGMENT || !1, _r = f.RETURN_TRUSTED_TYPE || !1, Xr = f.FORCE_BODY || !1, In = f.SANITIZE_DOM !== !1, Nn = f.SANITIZE_NAMED_PROPS || !1, Kr = f.KEEP_CONTENT !== !1, Ri = f.IN_PLACE || !1, br = gg(f.ALLOWED_URI_REGEXP) ? f.ALLOWED_URI_REGEXP : Na, kr = typeof f.NAMESPACE == "string" ? f.NAMESPACE : pt, Li = is(f, "MATHML_TEXT_INTEGRATION_POINTS", () => re({}, go)), Mi = is(f, "HTML_INTEGRATION_POINTS", () => re({}, mo));
8495
- const y = is(f, "CUSTOM_ELEMENT_HANDLING", () => Nr(null));
8496
- if (je = Nr(null), Le(y, "tagNameCheck") && vo(y.tagNameCheck) && (je.tagNameCheck = y.tagNameCheck), Le(y, "attributeNameCheck") && vo(y.attributeNameCheck) && (je.attributeNameCheck = y.attributeNameCheck), Le(y, "allowCustomizedBuiltInElements") && typeof y.allowCustomizedBuiltInElements == "boolean" && (je.allowCustomizedBuiltInElements = y.allowCustomizedBuiltInElements), Te(je), ce && (G = !1), Tr && (Ft = !0), wr && (ae = re({}, La), le = Nr(null), wr.html === !0 && (re(ae, Oa), re(le, Ma)), wr.svg === !0 && (re(ae, es), re(le, ns), re(le, Kn)), wr.svgFilters === !0 && (re(ae, ts), re(le, ns), re(le, Kn)), wr.mathMl === !0 && (re(ae, rs), re(le, Ia), re(le, Kn))), dt.tagCheck = null, dt.attributeCheck = null, Le(f, "ADD_TAGS") && (typeof f.ADD_TAGS == "function" ? dt.tagCheck = f.ADD_TAGS : Hr(f.ADD_TAGS) && (ae === Vr && (ae = He(ae)), re(ae, f.ADD_TAGS, ge))), Le(f, "ADD_ATTR") && (typeof f.ADD_ATTR == "function" ? dt.attributeCheck = f.ADD_ATTR : Hr(f.ADD_ATTR) && (le === Yr && (le = He(le)), re(le, f.ADD_ATTR, ge))), Le(f, "ADD_FORBID_CONTENTS") && Hr(f.ADD_FORBID_CONTENTS) && (Er === co && (Er = He(Er)), re(Er, f.ADD_FORBID_CONTENTS, ge)), Kr && (ae["#text"] = !0), qe && re(ae, [
8496
+ }), Er = Bt(d, "FORBID_CONTENTS", co, { transform: ge }), $t = Bt(d, "FORBID_TAGS", He({}), { transform: ge }), Mn = Bt(d, "FORBID_ATTR", He({}), { transform: ge }), wr = Le(d, "USE_PROFILES") ? d.USE_PROFILES && typeof d.USE_PROFILES == "object" ? He(d.USE_PROFILES) : d.USE_PROFILES : !1, A = d.ALLOW_ARIA_ATTR !== !1, G = d.ALLOW_DATA_ATTR !== !1, we = d.ALLOW_UNKNOWN_PROTOCOLS || !1, Vt = d.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ce = d.SAFE_FOR_TEMPLATES || !1, Ge = d.SAFE_FOR_XML !== !1, qe = d.WHOLE_DOCUMENT || !1, Ft = d.RETURN_DOM || !1, Tr = d.RETURN_DOM_FRAGMENT || !1, _r = d.RETURN_TRUSTED_TYPE || !1, Xr = d.FORCE_BODY || !1, In = d.SANITIZE_DOM !== !1, Nn = d.SANITIZE_NAMED_PROPS || !1, Kr = d.KEEP_CONTENT !== !1, Ri = d.IN_PLACE || !1, br = gg(d.ALLOWED_URI_REGEXP) ? d.ALLOWED_URI_REGEXP : Na, kr = typeof d.NAMESPACE == "string" ? d.NAMESPACE : pt, Li = is(d, "MATHML_TEXT_INTEGRATION_POINTS", () => re({}, go)), Mi = is(d, "HTML_INTEGRATION_POINTS", () => re({}, mo));
8497
+ const y = is(d, "CUSTOM_ELEMENT_HANDLING", () => Nr(null));
8498
+ if (je = Nr(null), Le(y, "tagNameCheck") && vo(y.tagNameCheck) && (je.tagNameCheck = y.tagNameCheck), Le(y, "attributeNameCheck") && vo(y.attributeNameCheck) && (je.attributeNameCheck = y.attributeNameCheck), Le(y, "allowCustomizedBuiltInElements") && typeof y.allowCustomizedBuiltInElements == "boolean" && (je.allowCustomizedBuiltInElements = y.allowCustomizedBuiltInElements), Te(je), ce && (G = !1), Tr && (Ft = !0), wr && (ae = re({}, La), le = Nr(null), wr.html === !0 && (re(ae, Oa), re(le, Ma)), wr.svg === !0 && (re(ae, es), re(le, ns), re(le, Kn)), wr.svgFilters === !0 && (re(ae, ts), re(le, ns), re(le, Kn)), wr.mathMl === !0 && (re(ae, rs), re(le, Ia), re(le, Kn))), ft.tagCheck = null, ft.attributeCheck = null, Le(d, "ADD_TAGS") && (typeof d.ADD_TAGS == "function" ? ft.tagCheck = d.ADD_TAGS : Hr(d.ADD_TAGS) && (ae === Vr && (ae = He(ae)), re(ae, d.ADD_TAGS, ge))), Le(d, "ADD_ATTR") && (typeof d.ADD_ATTR == "function" ? ft.attributeCheck = d.ADD_ATTR : Hr(d.ADD_ATTR) && (le === Yr && (le = He(le)), re(le, d.ADD_ATTR, ge))), Le(d, "ADD_FORBID_CONTENTS") && Hr(d.ADD_FORBID_CONTENTS) && (Er === co && (Er = He(Er)), re(Er, d.ADD_FORBID_CONTENTS, ge)), Kr && (ae["#text"] = !0), qe && re(ae, [
8497
8499
  "html",
8498
8500
  "head",
8499
8501
  "body"
8500
- ]), ae.table && (re(ae, ["tbody"]), delete $t.tbody), f.TRUSTED_TYPES_POLICY) {
8501
- if (typeof f.TRUSTED_TYPES_POLICY.createHTML != "function") throw Qt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
8502
- if (typeof f.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Qt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
8502
+ ]), ae.table && (re(ae, ["tbody"]), delete $t.tbody), d.TRUSTED_TYPES_POLICY) {
8503
+ if (typeof d.TRUSTED_TYPES_POLICY.createHTML != "function") throw Qt('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
8504
+ if (typeof d.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw Qt('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
8503
8505
  const _ = W;
8504
- W = f.TRUSTED_TYPES_POLICY;
8506
+ W = d.TRUSTED_TYPES_POLICY;
8505
8507
  try {
8506
8508
  ee = $e("");
8507
8509
  } catch (C) {
8508
8510
  throw W = _, C;
8509
8511
  }
8510
- } else f.TRUSTED_TYPES_POLICY === null ? (W = void 0, ee = "") : (W === void 0 && (W = Pt()), W && typeof ee == "string" && (ee = $e("")));
8511
- Se && Se(f), xr = f;
8512
+ } else d.TRUSTED_TYPES_POLICY === null ? (W = void 0, ee = "") : (W === void 0 && (W = Pt()), W && typeof ee == "string" && (ee = $e("")));
8513
+ Se && Se(d), xr = d;
8512
8514
  }, yo = re({}, [
8513
8515
  ...es,
8514
8516
  ...ts,
8515
8517
  ...mg
8516
- ]), bo = re({}, [...rs, ...vg]), Qc = function(f, y, _) {
8517
- return y.namespaceURI === pt ? f === "svg" : y.namespaceURI === $n ? f === "svg" && (_ === "annotation-xml" || Li[_]) : !!yo[f];
8518
- }, Zc = function(f, y, _) {
8519
- return y.namespaceURI === pt ? f === "math" : y.namespaceURI === Dn ? f === "math" && Mi[_] : !!bo[f];
8520
- }, eu = function(f, y, _) {
8521
- return y.namespaceURI === Dn && !Mi[_] || y.namespaceURI === $n && !Li[_] ? !1 : !bo[f] && (Yc[f] || !yo[f]);
8522
- }, tu = function(f) {
8523
- let y = b(f);
8518
+ ]), bo = re({}, [...rs, ...vg]), Qc = function(d, y, _) {
8519
+ return y.namespaceURI === pt ? d === "svg" : y.namespaceURI === $n ? d === "svg" && (_ === "annotation-xml" || Li[_]) : !!yo[d];
8520
+ }, Zc = function(d, y, _) {
8521
+ return y.namespaceURI === pt ? d === "math" : y.namespaceURI === Dn ? d === "math" && Mi[_] : !!bo[d];
8522
+ }, eu = function(d, y, _) {
8523
+ return y.namespaceURI === Dn && !Mi[_] || y.namespaceURI === $n && !Li[_] ? !1 : !bo[d] && (Yc[d] || !yo[d]);
8524
+ }, tu = function(d) {
8525
+ let y = b(d);
8524
8526
  (!y || !y.tagName) && (y = {
8525
8527
  namespaceURI: kr,
8526
8528
  tagName: "template"
8527
8529
  });
8528
- const _ = un(f.tagName), C = un(y.tagName);
8529
- return Oi[f.namespaceURI] ? f.namespaceURI === Dn ? Qc(_, y, C) : f.namespaceURI === $n ? Zc(_, y, C) : f.namespaceURI === pt ? eu(_, y, C) : !!(Jr === "application/xhtml+xml" && Oi[f.namespaceURI]) : !1;
8530
- }, Ht = function(f) {
8531
- tn(t.removed, { element: f });
8530
+ const _ = un(d.tagName), C = un(y.tagName);
8531
+ return Oi[d.namespaceURI] ? d.namespaceURI === Dn ? Qc(_, y, C) : d.namespaceURI === $n ? Zc(_, y, C) : d.namespaceURI === pt ? eu(_, y, C) : !!(Jr === "application/xhtml+xml" && Oi[d.namespaceURI]) : !1;
8532
+ }, Ht = function(d) {
8533
+ tn(t.removed, { element: d });
8532
8534
  try {
8533
- b(f).removeChild(f);
8535
+ b(d).removeChild(d);
8534
8536
  } catch {
8535
- if (p(f), !b(f)) throw Qt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
8537
+ if (p(d), !b(d)) throw Qt("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place");
8536
8538
  }
8537
- }, So = function(f, y, _) {
8539
+ }, So = function(d, y, _) {
8538
8540
  try {
8539
- f.removeAttributeNode(y);
8541
+ d.removeAttributeNode(y);
8540
8542
  } catch {
8541
8543
  try {
8542
- f.removeAttribute(_);
8544
+ d.removeAttribute(_);
8543
8545
  } catch {
8544
8546
  }
8545
8547
  }
8546
- }, Fn = function(f) {
8547
- Hn(f);
8548
- const y = m(f);
8548
+ }, Fn = function(d) {
8549
+ Hn(d);
8550
+ const y = m(d);
8549
8551
  if (y) {
8550
8552
  const C = [];
8551
8553
  er(y, (P) => {
@@ -8557,14 +8559,14 @@ function $c() {
8557
8559
  }
8558
8560
  });
8559
8561
  }
8560
- const _ = R(f);
8562
+ const _ = R(d);
8561
8563
  if (_) for (let C = _.length - 1; C >= 0; --C) {
8562
8564
  const P = _[C], B = P && P.name;
8563
- typeof B == "string" && So(f, P, B);
8565
+ typeof B == "string" && So(d, P, B);
8564
8566
  }
8565
- }, Xt = function(f, y, _) {
8567
+ }, Xt = function(d, y, _) {
8566
8568
  if (!_) try {
8567
- _ = y.getAttributeNode(f);
8569
+ _ = y.getAttributeNode(d);
8568
8570
  } catch {
8569
8571
  _ = null;
8570
8572
  }
@@ -8573,42 +8575,42 @@ function $c() {
8573
8575
  from: y
8574
8576
  });
8575
8577
  try {
8576
- _ ? y.removeAttributeNode(_) : y.removeAttribute(f);
8578
+ _ ? y.removeAttributeNode(_) : y.removeAttribute(d);
8577
8579
  } catch {
8578
8580
  try {
8579
- y.removeAttribute(f);
8581
+ y.removeAttribute(d);
8580
8582
  } catch {
8581
8583
  }
8582
8584
  }
8583
- if (f === "is")
8585
+ if (d === "is")
8584
8586
  if (Ft || Tr) try {
8585
8587
  Ht(y);
8586
8588
  } catch {
8587
8589
  }
8588
8590
  else try {
8589
- y.setAttribute(f, "");
8591
+ y.setAttribute(d, "");
8590
8592
  } catch {
8591
8593
  }
8592
- }, ru = function(f) {
8593
- const y = R(f);
8594
+ }, ru = function(d) {
8595
+ const y = R(d);
8594
8596
  if (y)
8595
8597
  for (let _ = y.length - 1; _ >= 0; --_) {
8596
8598
  const C = y[_], P = C && C.name;
8597
- typeof P != "string" || le[ge(P)] || So(f, C, P);
8599
+ typeof P != "string" || le[ge(P)] || So(d, C, P);
8598
8600
  }
8599
- }, Hn = function(f) {
8600
- const y = [f];
8601
+ }, Hn = function(d) {
8602
+ const y = [d];
8601
8603
  for (; y.length > 0; ) {
8602
8604
  const _ = y.pop();
8603
8605
  D(_) === Fe.element && ru(_);
8604
8606
  const C = m(_);
8605
8607
  if (C) for (let P = C.length - 1; P >= 0; --P) y.push(C[P]);
8606
8608
  }
8607
- }, To = function(f, y) {
8608
- return Ge ? f === "patchsrc" ? !0 : f === "for" && y !== "label" && y !== "output" : !1;
8609
- }, nu = function(f) {
8609
+ }, To = function(d, y) {
8610
+ return Ge ? d === "patchsrc" ? !0 : d === "for" && y !== "label" && y !== "output" : !1;
8611
+ }, nu = function(d) {
8610
8612
  if (!Ge) return;
8611
- const y = [f];
8613
+ const y = [d];
8612
8614
  for (; y.length > 0; ) {
8613
8615
  const _ = y.pop(), C = D(_);
8614
8616
  if (C === Fe.processingInstruction || C === Fe.comment && Ee($a, _.data)) {
@@ -8628,15 +8630,15 @@ function $c() {
8628
8630
  const P = m(_);
8629
8631
  if (P) for (let B = P.length - 1; B >= 0; --B) y.push(P[B]);
8630
8632
  }
8631
- }, _o = function(f) {
8633
+ }, _o = function(d) {
8632
8634
  let y = null, _ = null;
8633
- if (Xr) f = "<remove></remove>" + f;
8635
+ if (Xr) d = "<remove></remove>" + d;
8634
8636
  else {
8635
- const B = xa(f, /^[\r\n\t ]+/);
8637
+ const B = xa(d, /^[\r\n\t ]+/);
8636
8638
  _ = B && B[0];
8637
8639
  }
8638
- Jr === "application/xhtml+xml" && kr === pt && (f = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + f + "</body></html>");
8639
- const C = W ? $e(f) : f;
8640
+ Jr === "application/xhtml+xml" && kr === pt && (d = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + d + "</body></html>");
8641
+ const C = W ? $e(d) : d;
8640
8642
  if (kr === pt) try {
8641
8643
  y = new c().parseFromString(C, Jr);
8642
8644
  } catch {
@@ -8649,98 +8651,98 @@ function $c() {
8649
8651
  }
8650
8652
  }
8651
8653
  const P = y.body || y.documentElement;
8652
- return f && _ && P.insertBefore(r.createTextNode(_), P.childNodes[0] || null), kr === pt ? I.call(y, qe ? "html" : "body")[0] : qe ? y.documentElement : P;
8653
- }, wo = function(f) {
8654
- const y = Z ? Z(f) : f.ownerDocument;
8655
- return k.call(y || f, f, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
8656
- }, zn = function(f) {
8657
- return f = rn(f, N, " "), f = rn(f, K, " "), f = rn(f, J, " "), f;
8658
- }, Ni = function(f) {
8654
+ return d && _ && P.insertBefore(r.createTextNode(_), P.childNodes[0] || null), kr === pt ? I.call(y, qe ? "html" : "body")[0] : qe ? y.documentElement : P;
8655
+ }, wo = function(d) {
8656
+ const y = Z ? Z(d) : d.ownerDocument;
8657
+ return k.call(y || d, d, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
8658
+ }, zn = function(d) {
8659
+ return d = rn(d, N, " "), d = rn(d, K, " "), d = rn(d, J, " "), d;
8660
+ }, Ni = function(d) {
8659
8661
  var y;
8660
- f.normalize();
8661
- const _ = Z ? Z(f) : f.ownerDocument, C = k.call(_ || f, f, l.SHOW_TEXT | l.SHOW_COMMENT | l.SHOW_CDATA_SECTION | l.SHOW_PROCESSING_INSTRUCTION, null);
8662
+ d.normalize();
8663
+ const _ = Z ? Z(d) : d.ownerDocument, C = k.call(_ || d, d, l.SHOW_TEXT | l.SHOW_COMMENT | l.SHOW_CDATA_SECTION | l.SHOW_PROCESSING_INSTRUCTION, null);
8662
8664
  let P = C.nextNode();
8663
8665
  for (; P; )
8664
8666
  P.data = zn(P.data), P = C.nextNode();
8665
- const B = (y = f.querySelectorAll) === null || y === void 0 ? void 0 : y.call(f, "template");
8667
+ const B = (y = d.querySelectorAll) === null || y === void 0 ? void 0 : y.call(d, "template");
8666
8668
  B && er(B, (te) => {
8667
8669
  Ar(te.content) && Ni(te.content);
8668
8670
  });
8669
- }, Un = function(f) {
8670
- const y = L ? L(f) : null;
8671
- return typeof y != "string" || ge(y) !== "form" ? !1 : typeof f.nodeName != "string" || typeof f.textContent != "string" || typeof f.removeChild != "function" || f.attributes !== R(f) || typeof f.removeAttribute != "function" || typeof f.setAttribute != "function" || typeof f.namespaceURI != "string" || typeof f.insertBefore != "function" || typeof f.hasChildNodes != "function" || f.nodeType !== $(f) || f.childNodes !== m(f);
8672
- }, Ar = function(f) {
8673
- if (!$ || typeof f != "object" || f === null) return !1;
8671
+ }, Un = function(d) {
8672
+ const y = L ? L(d) : null;
8673
+ return typeof y != "string" || ge(y) !== "form" ? !1 : typeof d.nodeName != "string" || typeof d.textContent != "string" || typeof d.removeChild != "function" || d.attributes !== R(d) || typeof d.removeAttribute != "function" || typeof d.setAttribute != "function" || typeof d.namespaceURI != "string" || typeof d.insertBefore != "function" || typeof d.hasChildNodes != "function" || d.nodeType !== $(d) || d.childNodes !== m(d);
8674
+ }, Ar = function(d) {
8675
+ if (!$ || typeof d != "object" || d === null) return !1;
8674
8676
  try {
8675
- return $(f) === Fe.documentFragment;
8677
+ return $(d) === Fe.documentFragment;
8676
8678
  } catch {
8677
8679
  return !1;
8678
8680
  }
8679
- }, Qr = function(f) {
8680
- if (!$ || typeof f != "object" || f === null) return !1;
8681
+ }, Qr = function(d) {
8682
+ if (!$ || typeof d != "object" || d === null) return !1;
8681
8683
  try {
8682
- return typeof $(f) == "number";
8684
+ return typeof $(d) == "number";
8683
8685
  } catch {
8684
8686
  return !1;
8685
8687
  }
8686
8688
  };
8687
- function gt(w, f, y) {
8689
+ function gt(w, d, y) {
8688
8690
  w.length !== 0 && er(w, (_) => {
8689
- _.call(t, f, y, xr);
8691
+ _.call(t, d, y, xr);
8690
8692
  });
8691
8693
  }
8692
- const iu = function(f, y) {
8693
- return !!(Ge && f.hasChildNodes() && !Qr(f.firstElementChild) && Ee(Pa, f.textContent) && Ee(Pa, f.innerHTML) || Ge && f.namespaceURI === pt && Cg[y] && (Qr(f.firstElementChild) || typeof f.textContent == "string" && Ee(Og[y], f.textContent)) || f.nodeType === Fe.processingInstruction || Ge && f.nodeType === Fe.comment && Ee($a, f.data));
8694
- }, Wn = function(f, y) {
8695
- if (f instanceof RegExp) return Ee(f, y);
8696
- if (f instanceof Function) {
8694
+ const iu = function(d, y) {
8695
+ return !!(Ge && d.hasChildNodes() && !Qr(d.firstElementChild) && Ee(Pa, d.textContent) && Ee(Pa, d.innerHTML) || Ge && d.namespaceURI === pt && Cg[y] && (Qr(d.firstElementChild) || typeof d.textContent == "string" && Ee(Og[y], d.textContent)) || d.nodeType === Fe.processingInstruction || Ge && d.nodeType === Fe.comment && Ee($a, d.data));
8696
+ }, Wn = function(d, y) {
8697
+ if (d instanceof RegExp) return Ee(d, y);
8698
+ if (d instanceof Function) {
8697
8699
  for (var _ = arguments.length, C = new Array(_ > 2 ? _ - 2 : 0), P = 2; P < _; P++) C[P - 2] = arguments[P];
8698
- return !!f(y, ...C);
8700
+ return !!d(y, ...C);
8699
8701
  }
8700
8702
  return !1;
8701
- }, su = function(f, y, _) {
8703
+ }, su = function(d, y, _) {
8702
8704
  if (!$t[y] && Ro(y) && Wn(je.tagNameCheck, y)) return !1;
8703
8705
  if (Kr && !Er[y]) {
8704
- const C = b(f), P = m(f);
8706
+ const C = b(d), P = m(d);
8705
8707
  if (P && C) {
8706
8708
  const B = P.length;
8707
8709
  for (let te = B - 1; te >= 0; --te) {
8708
- const xe = f === _ ? h(P[te], !0) : P[te];
8709
- C.insertBefore(xe, g(f));
8710
+ const xe = d === _ ? h(P[te], !0) : P[te];
8711
+ C.insertBefore(xe, g(d));
8710
8712
  }
8711
8713
  }
8712
8714
  }
8713
- return Ht(f), !0;
8714
- }, Eo = function(f, y, _, C) {
8715
- return f.length === 0 ? y : y === _ || y === C ? He(y) : y;
8716
- }, ko = function(f, y) {
8717
- return f === y || b(f) !== null ? !1 : (Ri && Hn(f), !0);
8718
- }, xo = function(f, y) {
8719
- if (gt(x.beforeSanitizeElements, f, null), ko(f, y)) return !0;
8720
- if (Un(f))
8721
- return Ht(f), !0;
8722
- const _ = ge(he(f));
8723
- if (ae = Eo(x.uponSanitizeElement, ae, Vr, Dt), gt(x.uponSanitizeElement, f, {
8715
+ return Ht(d), !0;
8716
+ }, Eo = function(d, y, _, C) {
8717
+ return d.length === 0 ? y : y === _ || y === C ? He(y) : y;
8718
+ }, ko = function(d, y) {
8719
+ return d === y || b(d) !== null ? !1 : (Ri && Hn(d), !0);
8720
+ }, xo = function(d, y) {
8721
+ if (gt(x.beforeSanitizeElements, d, null), ko(d, y)) return !0;
8722
+ if (Un(d))
8723
+ return Ht(d), !0;
8724
+ const _ = ge(he(d));
8725
+ if (ae = Eo(x.uponSanitizeElement, ae, Vr, Dt), gt(x.uponSanitizeElement, d, {
8724
8726
  tagName: _,
8725
8727
  allowedTags: ae
8726
- }), ko(f, y)) return !0;
8727
- if (iu(f, _))
8728
- return Ht(f), !0;
8729
- if ($t[_] || !(dt.tagCheck instanceof Function && dt.tagCheck(_)) && !ae[_]) {
8730
- const C = su(f, _, y);
8731
- return C === !1 && gt(x.afterSanitizeElements, f, null), C;
8732
- }
8733
- if (D(f) === Fe.element && !tu(f) || (_ === "noscript" || _ === "noembed" || _ === "noframes") && Ee(Ag, f.innerHTML))
8734
- return Ht(f), !0;
8735
- if (ce && f.nodeType === Fe.text) {
8736
- const C = zn(f.textContent);
8737
- f.textContent !== C && (tn(t.removed, { element: f.cloneNode() }), f.textContent = C);
8738
- }
8739
- return gt(x.afterSanitizeElements, f, null), !1;
8740
- }, Ao = function(f, y, _) {
8741
- if (Mn[y] || To(y, f) || In && (y === "id" || y === "name") && (_ in r || _ in Jc)) return !1;
8742
- const C = le[y] || dt.attributeCheck instanceof Function && dt.attributeCheck(y, f);
8743
- return G && Ee(Y, y) || A && Ee(se, y) ? !0 : C ? fo[y] || Ee(br, rn(_, ft, "")) || (y === "src" || y === "xlink:href" || y === "href") && f !== "script" && Aa(_, "data:") === 0 && uo[f] || we && !Ee(ht, rn(_, ft, "")) ? !0 : !_ : Ro(f) && Wn(je.tagNameCheck, f) && Wn(je.attributeNameCheck, y, f) || y === "is" && je.allowCustomizedBuiltInElements && Wn(je.tagNameCheck, _);
8728
+ }), ko(d, y)) return !0;
8729
+ if (iu(d, _))
8730
+ return Ht(d), !0;
8731
+ if ($t[_] || !(ft.tagCheck instanceof Function && ft.tagCheck(_)) && !ae[_]) {
8732
+ const C = su(d, _, y);
8733
+ return C === !1 && gt(x.afterSanitizeElements, d, null), C;
8734
+ }
8735
+ if (D(d) === Fe.element && !tu(d) || (_ === "noscript" || _ === "noembed" || _ === "noframes") && Ee(Ag, d.innerHTML))
8736
+ return Ht(d), !0;
8737
+ if (ce && d.nodeType === Fe.text) {
8738
+ const C = zn(d.textContent);
8739
+ d.textContent !== C && (tn(t.removed, { element: d.cloneNode() }), d.textContent = C);
8740
+ }
8741
+ return gt(x.afterSanitizeElements, d, null), !1;
8742
+ }, Ao = function(d, y, _) {
8743
+ if (Mn[y] || To(y, d) || In && (y === "id" || y === "name") && (_ in r || _ in Jc)) return !1;
8744
+ const C = le[y] || ft.attributeCheck instanceof Function && ft.attributeCheck(y, d);
8745
+ return G && Ee(Y, y) || A && Ee(se, y) ? !0 : C ? fo[y] || Ee(br, rn(_, dt, "")) || (y === "src" || y === "xlink:href" || y === "href") && d !== "script" && Aa(_, "data:") === 0 && uo[d] || we && !Ee(ht, rn(_, dt, "")) ? !0 : !_ : Ro(d) && Wn(je.tagNameCheck, d) && Wn(je.attributeNameCheck, y, d) || y === "is" && je.allowCustomizedBuiltInElements && Wn(je.tagNameCheck, _);
8744
8746
  }, ou = re({}, [
8745
8747
  "annotation-xml",
8746
8748
  "color-profile",
@@ -8750,26 +8752,26 @@ function $c() {
8750
8752
  "font-face-src",
8751
8753
  "font-face-uri",
8752
8754
  "missing-glyph"
8753
- ]), Ro = function(f) {
8754
- return !ou[un(f)] && Ee(qr, f);
8755
- }, au = function(f, y, _, C) {
8756
- if (W && typeof u == "object" && typeof u.getAttributeType == "function" && !_) switch (u.getAttributeType(f, y)) {
8755
+ ]), Ro = function(d) {
8756
+ return !ou[un(d)] && Ee(qr, d);
8757
+ }, au = function(d, y, _, C) {
8758
+ if (W && typeof u == "object" && typeof u.getAttributeType == "function" && !_) switch (u.getAttributeType(d, y)) {
8757
8759
  case "TrustedHTML":
8758
8760
  return $e(C);
8759
8761
  case "TrustedScriptURL":
8760
8762
  return De(C);
8761
8763
  }
8762
8764
  return C;
8763
- }, lu = function(f, y, _, C) {
8765
+ }, lu = function(d, y, _, C) {
8764
8766
  try {
8765
- _ ? f.setAttributeNS(_, y, C) : f.setAttribute(y, C), Un(f) ? Ht(f) : ka(t.removed);
8767
+ _ ? d.setAttributeNS(_, y, C) : d.setAttribute(y, C), Un(d) ? Ht(d) : ka(t.removed);
8766
8768
  } catch {
8767
- Xt(y, f);
8769
+ Xt(y, d);
8768
8770
  }
8769
- }, Co = function(f) {
8770
- gt(x.beforeSanitizeAttributes, f, null);
8771
- const y = f.attributes;
8772
- if (!y || Un(f)) return;
8771
+ }, Co = function(d) {
8772
+ gt(x.beforeSanitizeAttributes, d, null);
8773
+ const y = d.attributes;
8774
+ if (!y || Un(d)) return;
8773
8775
  le = Eo(x.uponSanitizeAttribute, le, Yr, Sr);
8774
8776
  const _ = {
8775
8777
  attrName: "",
@@ -8779,47 +8781,47 @@ function $c() {
8779
8781
  forceKeepAttr: void 0
8780
8782
  };
8781
8783
  let C = y.length;
8782
- const P = ge(f.nodeName);
8784
+ const P = ge(d.nodeName);
8783
8785
  for (; C--; ) {
8784
8786
  const B = y[C], te = B.name, xe = B.namespaceURI, Qe = B.value, Oe = ge(te), $i = Qe;
8785
8787
  let Ae = te === "value" ? $i : cg($i);
8786
- if (_.attrName = Oe, _.attrValue = Ae, _.keepAttr = !0, _.forceKeepAttr = void 0, gt(x.uponSanitizeAttribute, f, _), Ae = _.attrValue, Nn && (Oe === "id" || Oe === "name") && Aa(Ae, Pn) !== 0 && (Xt(te, f, B), Ae = Pn + Ae), Ge && Ee(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Ae)) {
8787
- Xt(te, f, B);
8788
+ if (_.attrName = Oe, _.attrValue = Ae, _.keepAttr = !0, _.forceKeepAttr = void 0, gt(x.uponSanitizeAttribute, d, _), Ae = _.attrValue, Nn && (Oe === "id" || Oe === "name") && Aa(Ae, Pn) !== 0 && (Xt(te, d, B), Ae = Pn + Ae), Ge && Ee(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i, Ae)) {
8789
+ Xt(te, d, B);
8788
8790
  continue;
8789
8791
  }
8790
8792
  if (Oe === "attributename" && xa(Ae, "href")) {
8791
- Xt(te, f, B);
8793
+ Xt(te, d, B);
8792
8794
  continue;
8793
8795
  }
8794
8796
  if (!_.forceKeepAttr) {
8795
8797
  if (!_.keepAttr) {
8796
- Xt(te, f, B);
8798
+ Xt(te, d, B);
8797
8799
  continue;
8798
8800
  }
8799
8801
  if (!Vt && Ee(Rg, Ae)) {
8800
- Xt(te, f, B);
8802
+ Xt(te, d, B);
8801
8803
  continue;
8802
8804
  }
8803
8805
  if (ce && (Ae = zn(Ae)), !Ao(P, Oe, Ae)) {
8804
- Xt(te, f, B);
8806
+ Xt(te, d, B);
8805
8807
  continue;
8806
8808
  }
8807
- Ae = au(P, Oe, xe, Ae), Ae !== $i && lu(f, te, xe, Ae);
8809
+ Ae = au(P, Oe, xe, Ae), Ae !== $i && lu(d, te, xe, Ae);
8808
8810
  }
8809
8811
  }
8810
- gt(x.afterSanitizeAttributes, f, null);
8811
- }, Bn = function(f) {
8812
+ gt(x.afterSanitizeAttributes, d, null);
8813
+ }, Bn = function(d) {
8812
8814
  let y = null;
8813
- const _ = wo(f);
8814
- for (gt(x.beforeSanitizeShadowDOM, f, null); y = _.nextNode(); )
8815
- if (gt(x.uponSanitizeShadowNode, y, null), xo(y, f), Co(y), Ar(y.content) && Bn(y.content), D(y) === Fe.element) {
8815
+ const _ = wo(d);
8816
+ for (gt(x.beforeSanitizeShadowDOM, d, null); y = _.nextNode(); )
8817
+ if (gt(x.uponSanitizeShadowNode, y, null), xo(y, d), Co(y), Ar(y.content) && Bn(y.content), D(y) === Fe.element) {
8816
8818
  const C = E(y);
8817
8819
  Ar(C) && (Pi(C), Bn(C));
8818
8820
  }
8819
- gt(x.afterSanitizeShadowDOM, f, null);
8820
- }, Pi = function(f) {
8821
+ gt(x.afterSanitizeShadowDOM, d, null);
8822
+ }, Pi = function(d) {
8821
8823
  const y = [{
8822
- node: f,
8824
+ node: d,
8823
8825
  shadow: null
8824
8826
  }];
8825
8827
  for (; y.length > 0; ) {
@@ -8856,11 +8858,11 @@ function $c() {
8856
8858
  }
8857
8859
  };
8858
8860
  return t.sanitize = function(w) {
8859
- let f = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, y = null, _ = null, C = null, P = null;
8861
+ let d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, y = null, _ = null, C = null, P = null;
8860
8862
  if (Ci = !w, Ci && (w = "<!-->"), typeof w != "string" && !Qr(w) && (w = pg(w), typeof w != "string"))
8861
8863
  throw Qt("dirty is not a string, aborting");
8862
8864
  if (!t.isSupported) return w;
8863
- Yt ? (ae = Dt, le = Sr) : Ii(f), (x.uponSanitizeElement.length > 0 || x.uponSanitizeAttribute.length > 0) && (ae = He(ae)), x.uponSanitizeAttribute.length > 0 && (le = He(le)), t.removed = [];
8865
+ Yt ? (ae = Dt, le = Sr) : Ii(d), (x.uponSanitizeElement.length > 0 || x.uponSanitizeAttribute.length > 0) && (ae = He(ae)), x.uponSanitizeAttribute.length > 0 && (le = He(le)), t.removed = [];
8864
8866
  const B = Ri && typeof w != "string" && Qr(w);
8865
8867
  if (B) {
8866
8868
  nu(w);
@@ -8912,16 +8914,16 @@ function $c() {
8912
8914
  Ii(w), Yt = !0, Dt = ae, Sr = le;
8913
8915
  }, t.clearConfig = function() {
8914
8916
  xr = null, Yt = !1, Dt = null, Sr = null, W = H, ee = "";
8915
- }, t.isValidAttribute = function(w, f, y) {
8917
+ }, t.isValidAttribute = function(w, d, y) {
8916
8918
  xr || Ii({});
8917
- const _ = ge(w), C = ge(f);
8919
+ const _ = ge(w), C = ge(d);
8918
8920
  return Ao(_, C, y);
8919
- }, t.addHook = function(w, f) {
8920
- typeof f == "function" && Le(x, w) && tn(x[w], f);
8921
- }, t.removeHook = function(w, f) {
8921
+ }, t.addHook = function(w, d) {
8922
+ typeof d == "function" && Le(x, w) && tn(x[w], d);
8923
+ }, t.removeHook = function(w, d) {
8922
8924
  if (Le(x, w)) {
8923
- if (f !== void 0) {
8924
- const y = ag(x[w], f);
8925
+ if (d !== void 0) {
8926
+ const y = ag(x[w], d);
8925
8927
  return y === -1 ? void 0 : lg(x[w], y, 1)[0];
8926
8928
  }
8927
8929
  return ka(x[w]);
@@ -8960,7 +8962,7 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
8960
8962
  })), Ln = /* @__PURE__ */ U(((e, t) => {
8961
8963
  var { MAX_SAFE_COMPONENT_LENGTH: r, MAX_SAFE_BUILD_LENGTH: n, MAX_LENGTH: i } = On(), s = Ei();
8962
8964
  e = t.exports = {};
8963
- var o = e.re = [], a = e.safeRe = [], l = e.src = [], c = e.safeSrc = [], u = e.t = {}, d = 0, h = "[a-zA-Z0-9-]", p = [
8965
+ var o = e.re = [], a = e.safeRe = [], l = e.src = [], c = e.safeSrc = [], u = e.t = {}, f = 0, h = "[a-zA-Z0-9-]", p = [
8964
8966
  ["\\s", 1],
8965
8967
  ["\\d", i],
8966
8968
  [h, n]
@@ -8968,7 +8970,7 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
8968
8970
  for (const [E, R] of p) b = b.split(`${E}*`).join(`${E}{0,${R}}`).split(`${E}+`).join(`${E}{1,${R}}`);
8969
8971
  return b;
8970
8972
  }, m = (b, E, R) => {
8971
- const $ = g(E), L = d++;
8973
+ const $ = g(E), L = f++;
8972
8974
  s(b, L, E), u[b] = L, l[L] = E, c[L] = $, o[L] = new RegExp(E, R ? "g" : void 0), a[L] = new RegExp($, R ? "g" : void 0);
8973
8975
  };
8974
8976
  m("NUMERICIDENTIFIER", "0|[1-9]\\d*"), m("NUMERICIDENTIFIERLOOSE", "\\d+"), m("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${h}*`), m("MAINVERSION", `(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`), m("MAINVERSIONLOOSE", `(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`), m("PRERELEASEIDENTIFIER", `(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`), m("PRERELEASEIDENTIFIERLOOSE", `(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`), m("PRERELEASE", `(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`), m("PRERELEASELOOSE", `(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`), m("BUILDIDENTIFIER", `${h}+`), m("BUILD", `(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`), m("FULLPLAIN", `v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`), m("FULL", `^${l[u.FULLPLAIN]}$`), m("LOOSEPLAIN", `[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`), m("LOOSE", `^${l[u.LOOSEPLAIN]}$`), m("GTLT", "((?:<|>)?=?)"), m("XRANGEIDENTIFIERLOOSE", `${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), m("XRANGEIDENTIFIER", `${l[u.NUMERICIDENTIFIER]}|x|X|\\*`), m("XRANGEPLAIN", `[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`), m("XRANGEPLAINLOOSE", `[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`), m("XRANGE", `^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`), m("XRANGELOOSE", `^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`), m("COERCEPLAIN", `(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`), m("COERCE", `${l[u.COERCEPLAIN]}(?:$|[^\\d])`), m("COERCEFULL", l[u.COERCEPLAIN] + `(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`), m("COERCERTL", l[u.COERCE], !0), m("COERCERTLFULL", l[u.COERCEFULL], !0), m("LONETILDE", "(?:~>?)"), m("TILDETRIM", `(\\s*)${l[u.LONETILDE]}\\s+`, !0), e.tildeTrimReplace = "$1~", m("TILDE", `^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`), m("TILDELOOSE", `^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`), m("LONECARET", "(?:\\^)"), m("CARETTRIM", `(\\s*)${l[u.LONECARET]}\\s+`, !0), e.caretTrimReplace = "$1^", m("CARET", `^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`), m("CARETLOOSE", `^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`), m("COMPARATORLOOSE", `^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`), m("COMPARATOR", `^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`), m("COMPARATORTRIM", `(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`, !0), e.comparatorTrimReplace = "$1$2$3", m("HYPHENRANGE", `^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`), m("HYPHENRANGELOOSE", `^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`), m("STAR", "(<|>)?=?\\s*\\*"), m("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), m("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
@@ -8986,10 +8988,10 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
8986
8988
  rcompareIdentifiers: i
8987
8989
  };
8988
8990
  })), ke = /* @__PURE__ */ U(((e, t) => {
8989
- var r = Ei(), { MAX_LENGTH: n, MAX_SAFE_INTEGER: i } = On(), { safeRe: s, t: o } = Ln(), a = no(), { compareIdentifiers: l } = Dc(), c = (d, h) => {
8991
+ var r = Ei(), { MAX_LENGTH: n, MAX_SAFE_INTEGER: i } = On(), { safeRe: s, t: o } = Ln(), a = no(), { compareIdentifiers: l } = Dc(), c = (f, h) => {
8990
8992
  const p = h.split(".");
8991
- if (p.length > d.length) return !1;
8992
- for (let g = 0; g < p.length; g++) if (l(d[g], p[g]) !== 0) return !1;
8993
+ if (p.length > f.length) return !1;
8994
+ for (let g = 0; g < p.length; g++) if (l(f[g], p[g]) !== 0) return !1;
8993
8995
  return !0;
8994
8996
  }, u = class yt {
8995
8997
  constructor(h, p) {
@@ -9152,11 +9154,11 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9152
9154
  var r = yr(), n = (i, s) => {
9153
9155
  const o = r(i, null, !0), a = r(s, null, !0), l = o.compare(a);
9154
9156
  if (l === 0) return null;
9155
- const c = l > 0, u = c ? o : a, d = c ? a : o, h = !!u.prerelease.length;
9156
- if (d.prerelease.length && !h) {
9157
- if (!d.patch && !d.minor) return "major";
9158
- if (d.compareMain(u) === 0)
9159
- return d.minor && !d.patch ? "minor" : "patch";
9157
+ const c = l > 0, u = c ? o : a, f = c ? a : o, h = !!u.prerelease.length;
9158
+ if (f.prerelease.length && !h) {
9159
+ if (!f.patch && !f.minor) return "major";
9160
+ if (f.compareMain(u) === 0)
9161
+ return f.minor && !f.patch ? "minor" : "patch";
9160
9162
  }
9161
9163
  const p = h ? "pre" : "";
9162
9164
  return o.major !== a.major ? p + "major" : o.minor !== a.minor ? p + "minor" : o.patch !== a.patch ? p + "patch" : "prerelease";
@@ -9217,26 +9219,26 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9217
9219
  var r = at(), n = (i, s, o) => r(i, s, o) <= 0;
9218
9220
  t.exports = n;
9219
9221
  })), zc = /* @__PURE__ */ U(((e, t) => {
9220
- var r = Fc(), n = Hc(), i = ki(), s = oo(), o = so(), a = ao(), l = (c, u, d, h) => {
9222
+ var r = Fc(), n = Hc(), i = ki(), s = oo(), o = so(), a = ao(), l = (c, u, f, h) => {
9221
9223
  switch (u) {
9222
9224
  case "===":
9223
- return typeof c == "object" && (c = c.version), typeof d == "object" && (d = d.version), c === d;
9225
+ return typeof c == "object" && (c = c.version), typeof f == "object" && (f = f.version), c === f;
9224
9226
  case "!==":
9225
- return typeof c == "object" && (c = c.version), typeof d == "object" && (d = d.version), c !== d;
9227
+ return typeof c == "object" && (c = c.version), typeof f == "object" && (f = f.version), c !== f;
9226
9228
  case "":
9227
9229
  case "=":
9228
9230
  case "==":
9229
- return r(c, d, h);
9231
+ return r(c, f, h);
9230
9232
  case "!=":
9231
- return n(c, d, h);
9233
+ return n(c, f, h);
9232
9234
  case ">":
9233
- return i(c, d, h);
9235
+ return i(c, f, h);
9234
9236
  case ">=":
9235
- return s(c, d, h);
9237
+ return s(c, f, h);
9236
9238
  case "<":
9237
- return o(c, d, h);
9239
+ return o(c, f, h);
9238
9240
  case "<=":
9239
- return a(c, d, h);
9241
+ return a(c, f, h);
9240
9242
  default:
9241
9243
  throw new TypeError(`Invalid operator: ${u}`);
9242
9244
  }
@@ -9257,18 +9259,18 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9257
9259
  m.lastIndex = -1;
9258
9260
  }
9259
9261
  if (c === null) return null;
9260
- const u = c[2], d = c[3] || "0", h = c[4] || "0", p = l.includePrerelease && c[5] ? `-${c[5]}` : "", g = l.includePrerelease && c[6] ? `+${c[6]}` : "";
9261
- return n(`${u}.${d}.${h}${p}${g}`, l);
9262
+ const u = c[2], f = c[3] || "0", h = c[4] || "0", p = l.includePrerelease && c[5] ? `-${c[5]}` : "", g = l.includePrerelease && c[6] ? `+${c[6]}` : "";
9263
+ return n(`${u}.${f}.${h}${p}${g}`, l);
9262
9264
  };
9263
9265
  t.exports = o;
9264
9266
  })), qg = /* @__PURE__ */ U(((e, t) => {
9265
- var r = yr(), n = On(), i = ke(), s = (c, u, d) => {
9267
+ var r = yr(), n = On(), i = ke(), s = (c, u, f) => {
9266
9268
  if (!n.RELEASE_TYPES.includes(u)) return null;
9267
- const h = o(c, d);
9269
+ const h = o(c, f);
9268
9270
  return h && a(h, u);
9269
9271
  }, o = (c, u) => {
9270
- const d = c instanceof i ? c.version : c;
9271
- return r(d, u);
9272
+ const f = c instanceof i ? c.version : c;
9273
+ return r(f, u);
9272
9274
  }, a = (c, u) => {
9273
9275
  if (l(u)) return c.version;
9274
9276
  switch (c.prerelease = [], u) {
@@ -9348,10 +9350,10 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9348
9350
  k = k.replace(E, "");
9349
9351
  const M = ((this.options.includePrerelease && m) | (this.options.loose && b)) + ":" + k, I = i.get(M);
9350
9352
  if (I) return I;
9351
- const F = this.options.loose, x = F ? c[d.HYPHENRANGELOOSE] : c[d.HYPHENRANGE];
9352
- k = k.replace(x, Pt(this.options.includePrerelease)), a("hyphen replace", k), k = k.replace(c[d.COMPARATORTRIM], h), a("comparator trim", k), k = k.replace(c[d.TILDETRIM], p), a("tilde trim", k), k = k.replace(c[d.CARETTRIM], g), a("caret trim", k);
9353
+ const F = this.options.loose, x = F ? c[f.HYPHENRANGELOOSE] : c[f.HYPHENRANGE];
9354
+ k = k.replace(x, Pt(this.options.includePrerelease)), a("hyphen replace", k), k = k.replace(c[f.COMPARATORTRIM], h), a("comparator trim", k), k = k.replace(c[f.TILDETRIM], p), a("tilde trim", k), k = k.replace(c[f.CARETTRIM], g), a("caret trim", k);
9353
9355
  let N = k.split(" ").map((se) => Z(se, this.options)).join(" ").split(/\s+/).map((se) => De(se, this.options));
9354
- F && (N = N.filter((se) => (a("loose invalid filter", se, this.options), !!se.match(c[d.COMPARATORLOOSE])))), a("range list", N);
9356
+ F && (N = N.filter((se) => (a("loose invalid filter", se, this.options), !!se.match(c[f.COMPARATORLOOSE])))), a("range list", N);
9355
9357
  const K = /* @__PURE__ */ new Map(), J = N.map((se) => new o(se, this.options));
9356
9358
  for (const se of J) {
9357
9359
  if (R(se)) return [se];
@@ -9377,15 +9379,15 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9377
9379
  }
9378
9380
  };
9379
9381
  t.exports = n;
9380
- var i = new (Vg())(), s = no(), o = xi(), a = Ei(), l = ke(), { safeRe: c, src: u, t: d, comparatorTrimReplace: h, tildeTrimReplace: p, caretTrimReplace: g } = Ln(), { FLAG_INCLUDE_PRERELEASE: m, FLAG_LOOSE: b } = On(), E = new RegExp(u[d.BUILD], "g"), R = (O) => O.value === "<0.0.0-0", $ = (O) => O.value === "", L = (O, k) => {
9382
+ var i = new (Vg())(), s = no(), o = xi(), a = Ei(), l = ke(), { safeRe: c, src: u, t: f, comparatorTrimReplace: h, tildeTrimReplace: p, caretTrimReplace: g } = Ln(), { FLAG_INCLUDE_PRERELEASE: m, FLAG_LOOSE: b } = On(), E = new RegExp(u[f.BUILD], "g"), R = (O) => O.value === "<0.0.0-0", $ = (O) => O.value === "", L = (O, k) => {
9381
9383
  let M = !0;
9382
9384
  const I = O.slice();
9383
9385
  let F = I.pop();
9384
9386
  for (; M && I.length; )
9385
9387
  M = I.every((x) => F.intersects(x, k)), F = I.pop();
9386
9388
  return M;
9387
- }, Z = (O, k) => (O = O.replace(c[d.BUILD], ""), a("comp", O, k), O = H(O, k), a("caret", O), O = W(O, k), a("tildes", O), O = Pe(O, k), a("xrange", O), O = $e(O, k), a("stars", O), O), D = (O) => !O || O.toLowerCase() === "x" || O === "*", he = (O, k, M) => D(O) && !D(k) || D(k) && M && !D(M), W = (O, k) => O.trim().split(/\s+/).map((M) => ee(M, k)).join(" "), ee = (O, k) => {
9388
- const M = k.loose ? c[d.TILDELOOSE] : c[d.TILDE], I = k.includePrerelease ? "-0" : "";
9389
+ }, Z = (O, k) => (O = O.replace(c[f.BUILD], ""), a("comp", O, k), O = H(O, k), a("caret", O), O = W(O, k), a("tildes", O), O = Pe(O, k), a("xrange", O), O = $e(O, k), a("stars", O), O), D = (O) => !O || O.toLowerCase() === "x" || O === "*", he = (O, k, M) => D(O) && !D(k) || D(k) && M && !D(M), W = (O, k) => O.trim().split(/\s+/).map((M) => ee(M, k)).join(" "), ee = (O, k) => {
9390
+ const M = k.loose ? c[f.TILDELOOSE] : c[f.TILDE], I = k.includePrerelease ? "-0" : "";
9389
9391
  return O.replace(M, (F, x, N, K, J) => {
9390
9392
  a("tilde", O, F, x, N, K, J);
9391
9393
  let Y;
@@ -9393,7 +9395,7 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9393
9395
  });
9394
9396
  }, H = (O, k) => O.trim().split(/\s+/).map((M) => Ne(M, k)).join(" "), Ne = (O, k) => {
9395
9397
  a("caret", O, k);
9396
- const M = k.loose ? c[d.CARETLOOSE] : c[d.CARET], I = k.includePrerelease ? "-0" : "";
9398
+ const M = k.loose ? c[f.CARETLOOSE] : c[f.CARET], I = k.includePrerelease ? "-0" : "";
9397
9399
  return O.replace(M, (F, x, N, K, J) => {
9398
9400
  a("caret", O, F, x, N, K, J);
9399
9401
  let Y;
@@ -9401,13 +9403,13 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9401
9403
  });
9402
9404
  }, Pe = (O, k) => (a("replaceXRanges", O, k), O.split(/\s+/).map((M) => Nt(M, k)).join(" ")), Nt = (O, k) => {
9403
9405
  O = O.trim();
9404
- const M = k.loose ? c[d.XRANGELOOSE] : c[d.XRANGE];
9406
+ const M = k.loose ? c[f.XRANGELOOSE] : c[f.XRANGE];
9405
9407
  return O.replace(M, (I, F, x, N, K, J) => {
9406
9408
  if (a("xRange", O, I, F, x, N, K, J), he(x, N, K)) return O;
9407
- const Y = D(x), se = Y || D(N), ht = se || D(K), ft = ht;
9408
- return F === "=" && ft && (F = ""), J = k.includePrerelease ? "-0" : "", Y ? F === ">" || F === "<" ? I = "<0.0.0-0" : I = "*" : F && ft ? (se && (N = 0), K = 0, F === ">" ? (F = ">=", se ? (x = +x + 1, N = 0, K = 0) : (N = +N + 1, K = 0)) : F === "<=" && (F = "<", se ? x = +x + 1 : N = +N + 1), F === "<" && (J = "-0"), I = `${F + x}.${N}.${K}${J}`) : se ? I = `>=${x}.0.0${J} <${+x + 1}.0.0-0` : ht && (I = `>=${x}.${N}.0${J} <${x}.${+N + 1}.0-0`), a("xRange return", I), I;
9409
+ const Y = D(x), se = Y || D(N), ht = se || D(K), dt = ht;
9410
+ return F === "=" && dt && (F = ""), J = k.includePrerelease ? "-0" : "", Y ? F === ">" || F === "<" ? I = "<0.0.0-0" : I = "*" : F && dt ? (se && (N = 0), K = 0, F === ">" ? (F = ">=", se ? (x = +x + 1, N = 0, K = 0) : (N = +N + 1, K = 0)) : F === "<=" && (F = "<", se ? x = +x + 1 : N = +N + 1), F === "<" && (J = "-0"), I = `${F + x}.${N}.${K}${J}`) : se ? I = `>=${x}.0.0${J} <${+x + 1}.0.0-0` : ht && (I = `>=${x}.${N}.0${J} <${x}.${+N + 1}.0-0`), a("xRange return", I), I;
9409
9411
  });
9410
- }, $e = (O, k) => (a("replaceStars", O, k), O.trim().replace(c[d.STAR], "")), De = (O, k) => (a("replaceGTE0", O, k), O.trim().replace(c[k.includePrerelease ? d.GTE0PRE : d.GTE0], "")), Pt = (O) => (k, M, I, F, x, N, K, J, Y, se, ht, ft) => (D(I) ? M = "" : D(F) ? M = `>=${I}.0.0${O ? "-0" : ""}` : D(x) ? M = `>=${I}.${F}.0${O ? "-0" : ""}` : N ? M = `>=${M}` : M = `>=${M}${O ? "-0" : ""}`, D(Y) ? J = "" : D(se) ? J = `<${+Y + 1}.0.0-0` : D(ht) ? J = `<${Y}.${+se + 1}.0-0` : ft ? J = `<=${Y}.${se}.${ht}-${ft}` : O ? J = `<${Y}.${se}.${+ht + 1}-0` : J = `<=${J}`, `${M} ${J}`.trim()), Je = (O, k, M) => {
9412
+ }, $e = (O, k) => (a("replaceStars", O, k), O.trim().replace(c[f.STAR], "")), De = (O, k) => (a("replaceGTE0", O, k), O.trim().replace(c[k.includePrerelease ? f.GTE0PRE : f.GTE0], "")), Pt = (O) => (k, M, I, F, x, N, K, J, Y, se, ht, dt) => (D(I) ? M = "" : D(F) ? M = `>=${I}.0.0${O ? "-0" : ""}` : D(x) ? M = `>=${I}.${F}.0${O ? "-0" : ""}` : N ? M = `>=${M}` : M = `>=${M}${O ? "-0" : ""}`, D(Y) ? J = "" : D(se) ? J = `<${+Y + 1}.0.0-0` : D(ht) ? J = `<${Y}.${+se + 1}.0-0` : dt ? J = `<=${Y}.${se}.${ht}-${dt}` : O ? J = `<${Y}.${se}.${+ht + 1}-0` : J = `<=${J}`, `${M} ${J}`.trim()), Je = (O, k, M) => {
9411
9413
  for (let I = 0; I < O.length; I++) if (!O[I].test(k)) return !1;
9412
9414
  if (k.prerelease.length && !M.includePrerelease) {
9413
9415
  for (let I = 0; I < O.length; I++)
@@ -9476,8 +9478,8 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9476
9478
  } catch {
9477
9479
  return null;
9478
9480
  }
9479
- return s.forEach((d) => {
9480
- u.test(d) && (!l || c.compare(d) === -1) && (l = d, c = new r(l, a));
9481
+ return s.forEach((f) => {
9482
+ u.test(f) && (!l || c.compare(f) === -1) && (l = f, c = new r(l, a));
9481
9483
  }), l;
9482
9484
  };
9483
9485
  t.exports = i;
@@ -9489,8 +9491,8 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9489
9491
  } catch {
9490
9492
  return null;
9491
9493
  }
9492
- return s.forEach((d) => {
9493
- u.test(d) && (!l || c.compare(d) === 1) && (l = d, c = new r(l, a));
9494
+ return s.forEach((f) => {
9495
+ u.test(f) && (!l || c.compare(f) === 1) && (l = f, c = new r(l, a));
9494
9496
  }), l;
9495
9497
  };
9496
9498
  t.exports = i;
@@ -9502,7 +9504,7 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9502
9504
  l = null;
9503
9505
  for (let c = 0; c < o.set.length; ++c) {
9504
9506
  const u = o.set[c];
9505
- let d = null;
9507
+ let f = null;
9506
9508
  u.forEach((h) => {
9507
9509
  const p = new r(h.semver.version);
9508
9510
  switch (h.operator) {
@@ -9510,7 +9512,7 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9510
9512
  p.prerelease.length === 0 ? p.patch++ : p.prerelease.push(0), p.raw = p.format();
9511
9513
  case "":
9512
9514
  case ">=":
9513
- (!d || i(p, d)) && (d = p);
9515
+ (!f || i(p, f)) && (f = p);
9514
9516
  break;
9515
9517
  case "<":
9516
9518
  case "<=":
@@ -9519,7 +9521,7 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9519
9521
  default:
9520
9522
  throw new Error(`Unexpected operation: ${h.operator}`);
9521
9523
  }
9522
- }), d && (!l || i(l, d)) && (l = d);
9524
+ }), f && (!l || i(l, f)) && (l = f);
9523
9525
  }
9524
9526
  return l && o.test(l) ? l : null;
9525
9527
  };
@@ -9534,7 +9536,7 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9534
9536
  };
9535
9537
  t.exports = n;
9536
9538
  })), lo = /* @__PURE__ */ U(((e, t) => {
9537
- var r = ke(), n = xi(), { ANY: i } = n, s = lt(), o = Ai(), a = ki(), l = so(), c = ao(), u = oo(), d = (h, p, g, m) => {
9539
+ var r = ke(), n = xi(), { ANY: i } = n, s = lt(), o = Ai(), a = ki(), l = so(), c = ao(), u = oo(), f = (h, p, g, m) => {
9538
9540
  h = new r(h, m), p = new s(p, m);
9539
9541
  let b, E, R, $, L;
9540
9542
  switch (g) {
@@ -9558,7 +9560,7 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9558
9560
  }
9559
9561
  return !0;
9560
9562
  };
9561
- t.exports = d;
9563
+ t.exports = f;
9562
9564
  })), Zg = /* @__PURE__ */ U(((e, t) => {
9563
9565
  var r = lo(), n = (i, s, o) => r(i, s, ">", o);
9564
9566
  t.exports = n;
@@ -9576,9 +9578,9 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9576
9578
  const u = i.sort((g, m) => n(g, m, o));
9577
9579
  for (const g of u) r(g, s, o) ? (c = g, l || (l = g)) : (c && a.push([l, c]), c = null, l = null);
9578
9580
  l && a.push([l, null]);
9579
- const d = [];
9580
- for (const [g, m] of a) g === m ? d.push(g) : !m && g === u[0] ? d.push("*") : m ? g === u[0] ? d.push(`<=${m}`) : d.push(`${g} - ${m}`) : d.push(`>=${g}`);
9581
- const h = d.join(" || "), p = typeof s.raw == "string" ? s.raw : String(s);
9581
+ const f = [];
9582
+ for (const [g, m] of a) g === m ? f.push(g) : !m && g === u[0] ? f.push("*") : m ? g === u[0] ? f.push(`<=${m}`) : f.push(`${g} - ${m}`) : f.push(`>=${g}`);
9583
+ const h = f.join(" || "), p = typeof s.raw == "string" ? s.raw : String(s);
9582
9584
  return h.length < p.length ? h : s;
9583
9585
  };
9584
9586
  })), nm = /* @__PURE__ */ U(((e, t) => {
@@ -9606,7 +9608,7 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9606
9608
  }
9607
9609
  const b = /* @__PURE__ */ new Set();
9608
9610
  let E, R;
9609
- for (const H of p) H.operator === ">" || H.operator === ">=" ? E = d(E, H, m) : H.operator === "<" || H.operator === "<=" ? R = h(R, H, m) : b.add(H.semver);
9611
+ for (const H of p) H.operator === ">" || H.operator === ">=" ? E = f(E, H, m) : H.operator === "<" || H.operator === "<=" ? R = h(R, H, m) : b.add(H.semver);
9610
9612
  if (b.size > 1) return null;
9611
9613
  let $;
9612
9614
  if (E && R) {
@@ -9623,7 +9625,7 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9623
9625
  for (const H of g) {
9624
9626
  if (he = he || H.operator === ">" || H.operator === ">=", D = D || H.operator === "<" || H.operator === "<=", E) {
9625
9627
  if (ee && H.semver.prerelease && H.semver.prerelease.length && H.semver.major === ee.major && H.semver.minor === ee.minor && H.semver.patch === ee.patch && (ee = !1), H.operator === ">" || H.operator === ">=") {
9626
- if (L = d(E, H, m), L === H && L !== E) return !1;
9628
+ if (L = f(E, H, m), L === H && L !== E) return !1;
9627
9629
  } else if (E.operator === ">=" && !H.test(E.semver)) return !1;
9628
9630
  }
9629
9631
  if (R) {
@@ -9634,7 +9636,7 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9634
9636
  if (!H.operator && (R || E) && $ !== 0) return !1;
9635
9637
  }
9636
9638
  return !(E && D && !R && $ !== 0 || R && he && !E && $ !== 0 || ee || W);
9637
- }, d = (p, g, m) => {
9639
+ }, f = (p, g, m) => {
9638
9640
  if (!p) return g;
9639
9641
  const b = o(p.semver, g.semver, m);
9640
9642
  return b > 0 ? p : b < 0 || g.operator === ">" && p.operator === ">=" ? g : p;
@@ -9645,14 +9647,14 @@ var Dm = $c(), On = /* @__PURE__ */ U(((e, t) => {
9645
9647
  };
9646
9648
  t.exports = a;
9647
9649
  })), im = /* @__PURE__ */ U(((e, t) => {
9648
- var r = Ln(), n = On(), i = ke(), s = Dc(), o = yr(), a = Ig(), l = Ng(), c = Pg(), u = $g(), d = Dg(), h = Fg(), p = Hg(), g = zg(), m = at(), b = Ug(), E = Wg(), R = io(), $ = Bg(), L = jg(), Z = ki(), D = so(), he = Fc(), W = Hc(), ee = oo(), H = ao(), Ne = zc(), Pe = Gg(), Nt = qg(), $e = xi(), De = lt(), Pt = Ai(), Je = Yg(), O = Xg(), k = Kg(), M = Jg(), I = Qg(), F = lo(), x = Zg(), N = em(), K = tm(), J = rm(), Y = nm();
9650
+ var r = Ln(), n = On(), i = ke(), s = Dc(), o = yr(), a = Ig(), l = Ng(), c = Pg(), u = $g(), f = Dg(), h = Fg(), p = Hg(), g = zg(), m = at(), b = Ug(), E = Wg(), R = io(), $ = Bg(), L = jg(), Z = ki(), D = so(), he = Fc(), W = Hc(), ee = oo(), H = ao(), Ne = zc(), Pe = Gg(), Nt = qg(), $e = xi(), De = lt(), Pt = Ai(), Je = Yg(), O = Xg(), k = Kg(), M = Jg(), I = Qg(), F = lo(), x = Zg(), N = em(), K = tm(), J = rm(), Y = nm();
9649
9651
  t.exports = {
9650
9652
  parse: o,
9651
9653
  valid: a,
9652
9654
  clean: l,
9653
9655
  inc: c,
9654
9656
  diff: u,
9655
- major: d,
9657
+ major: f,
9656
9658
  minor: h,
9657
9659
  patch: p,
9658
9660
  prerelease: g,
@@ -9851,7 +9853,7 @@ function hm(e) {
9851
9853
  }
9852
9854
  };
9853
9855
  }
9854
- function fm(e) {
9856
+ function dm(e) {
9855
9857
  if (typeof window > "u" || !e) return;
9856
9858
  const t = e.offsetParent;
9857
9859
  if (t instanceof HTMLElement) {
@@ -9860,7 +9862,7 @@ function fm(e) {
9860
9862
  }
9861
9863
  return new DOMRect(0, 0, window.innerWidth, window.innerHeight);
9862
9864
  }
9863
- function dm(e, t, r, n = 4) {
9865
+ function fm(e, t, r, n = 4) {
9864
9866
  const i = (s, o, a) => {
9865
9867
  const l = a / 2 - o / 2 - n;
9866
9868
  return l <= 0 ? 0 : Math.max(-l, Math.min(l, s));
@@ -9874,7 +9876,7 @@ function pm(e, t, r, n = 4) {
9874
9876
  const i = {
9875
9877
  x: r.width / 2,
9876
9878
  y: r.height / 2
9877
- }, s = dm({
9879
+ }, s = fm({
9878
9880
  x: e.x - i.x,
9879
9881
  y: e.y - i.y
9880
9882
  }, t, r, n);
@@ -9965,7 +9967,7 @@ function vm(e, t) {
9965
9967
  x: 0,
9966
9968
  y: 0
9967
9969
  })), u = !1;
9968
- const d = hm({
9970
+ const f = hm({
9969
9971
  getPosition: () => T(c),
9970
9972
  setPosition: (A) => {
9971
9973
  ie(c, F(A), !0);
@@ -9979,12 +9981,12 @@ function vm(e, t) {
9979
9981
  mouseX: 0,
9980
9982
  mouseY: 0
9981
9983
  }));
9982
- const b = /* @__PURE__ */ Di(() => xf(T(o)));
9984
+ const b = /* @__PURE__ */ Di(() => kd(T(o)));
9983
9985
  let E = /* @__PURE__ */ _e(""), R = null, $ = null;
9984
9986
  const L = 12, Z = 200, D = 32, he = 240, W = 200, ee = 2e3, H = 4, Ne = 10, Pe = 10, Nt = 20, $e = /* @__PURE__ */ Di(() => T(p) + T(g) * 2);
9985
9987
  Lr(() => {
9986
9988
  if (T(s))
9987
- return vf(T(s), (A) => {
9989
+ return md(T(s), (A) => {
9988
9990
  ie(o, A, !0);
9989
9991
  });
9990
9992
  });
@@ -10002,7 +10004,7 @@ function vm(e, t) {
10002
10004
  return Math.max(W, Math.min(Math.max(W, we), A));
10003
10005
  }
10004
10006
  function k() {
10005
- return fm(T(s));
10007
+ return dm(T(s));
10006
10008
  }
10007
10009
  function M() {
10008
10010
  const A = k();
@@ -10048,15 +10050,15 @@ function vm(e, t) {
10048
10050
  function se(A) {
10049
10051
  const G = A.target, we = G.closest(".pie-tool-line-reader__resize-handle");
10050
10052
  if (we) {
10051
- ft(A, we.classList.contains("pie-tool-line-reader__resize-handle--frame") ? "frame" : "pane", we);
10053
+ dt(A, we.classList.contains("pie-tool-line-reader__resize-handle--frame") ? "frame" : "pane", we);
10052
10054
  return;
10053
10055
  }
10054
10056
  G.closest("button") || ht(A);
10055
10057
  }
10056
10058
  function ht(A) {
10057
- T(s) && (T(s).focus({ preventScroll: !0 }), d.startDragging(A, T(s)), T(s).addEventListener("pointermove", qr), T(s).addEventListener("pointerup", br), A.preventDefault());
10059
+ T(s) && (T(s).focus({ preventScroll: !0 }), f.startDragging(A, T(s)), T(s).addEventListener("pointermove", qr), T(s).addEventListener("pointerup", br), A.preventDefault());
10058
10060
  }
10059
- function ft(A, G, we) {
10061
+ function dt(A, G, we) {
10060
10062
  T(s) && (T(s).setPointerCapture(A.pointerId), we.focus({ preventScroll: !0 }), ie(l, G, !0), ie(m, {
10061
10063
  paneHeight: T(p),
10062
10064
  frameBandHeight: T(g),
@@ -10066,8 +10068,8 @@ function vm(e, t) {
10066
10068
  }, !0), T(a)?.bringToFront(T(s)), T(s).addEventListener("pointermove", qr), T(s).addEventListener("pointerup", br), A.preventDefault(), A.stopPropagation());
10067
10069
  }
10068
10070
  function qr(A) {
10069
- if (d.isDragging()) {
10070
- d.handlePointerMove(A);
10071
+ if (f.isDragging()) {
10072
+ f.handlePointerMove(A);
10071
10073
  return;
10072
10074
  }
10073
10075
  if (!T(l)) return;
@@ -10079,7 +10081,7 @@ function vm(e, t) {
10079
10081
  ie(g, Je(T(m).frameBandHeight + G), !0), ie(h, O(T(m).width + (A.clientX - T(m).mouseX) * 2), !0), x();
10080
10082
  }
10081
10083
  function br(A) {
10082
- T(s) && (T(s).releasePointerCapture(A.pointerId), T(s).removeEventListener("pointermove", qr), T(s).removeEventListener("pointerup", br), d.endDragging(), ie(l, null));
10084
+ T(s) && (T(s).releasePointerCapture(A.pointerId), T(s).removeEventListener("pointermove", qr), T(s).removeEventListener("pointerup", br), f.endDragging(), ie(l, null));
10083
10085
  }
10084
10086
  function ae(A) {
10085
10087
  let G = !1;
@@ -10186,9 +10188,9 @@ function vm(e, t) {
10186
10188
  set toolId(A = "lineReader") {
10187
10189
  n(A), us();
10188
10190
  }
10189
- }, $t = Mh(), Mn = Ho($t), dt = (A) => {
10191
+ }, $t = Mh(), Mn = Ho($t), ft = (A) => {
10190
10192
  var G = gm(), we = Ho(G), Vt = hh(we, !0), ce = qn(we, 2), Ge = qn(Sl(ce), 4), qe = qn(Ge, 2), Yt = qn(qe, 2);
10191
- Ya(ce), af(ce, (Dt) => ie(s, Dt), () => T(s)), Th((Dt, Sr, Xr, Ft, Tr, _r, In, Nn, Pn, Kr) => {
10193
+ Ya(ce), od(ce, (Dt) => ie(s, Dt), () => T(s)), Th((Dt, Sr, Xr, Ft, Tr, _r, In, Nn, Pn, Kr) => {
10192
10194
  jh(Vt, T(E)), Zh(ce, `left: ${T(c).x ?? ""}px; top: ${T(c).y ?? ""}px; width: ${T(h) ?? ""}px; height: ${T($e) ?? ""}px; --pie-tool-line-reader-band-height: ${T(g) ?? ""}px; --pie-tool-line-reader-side-width: 12px;`), mt(ce, "lang", Dt), mt(ce, "dir", Sr), mt(ce, "aria-label", Xr), mt(ce, "aria-roledescription", Ft), mt(Ge, "title", Tr), mt(Ge, "aria-label", _r), mt(qe, "title", In), mt(qe, "aria-label", Nn), mt(Yt, "title", Pn), mt(Yt, "aria-label", Kr), ce.dir = ce.dir;
10193
10195
  }, [
10194
10196
  () => T(b).getLocale(),
@@ -10207,18 +10209,18 @@ function vm(e, t) {
10207
10209
  frameHeight: T(g),
10208
10210
  width: T(h)
10209
10211
  })
10210
- ]), Zr("pointerdown", ce, se), Zr("keydown", ce, ae), Zr("click", Ge, Y), Zr("keydown", qe, Vr), Zr("keydown", Yt, le), ds(A, G);
10212
+ ]), Zr("pointerdown", ce, se), Zr("keydown", ce, ae), Zr("click", Ge, Y), Zr("keydown", qe, Vr), Zr("keydown", Yt, le), fs(A, G);
10211
10213
  };
10212
10214
  return Kh(Mn, (A) => {
10213
- r() && A(dt);
10214
- }), ds(e, $t), Za(je);
10215
+ r() && A(ft);
10216
+ }), fs(e, $t), Za(je);
10215
10217
  }
10216
10218
  Ah([
10217
10219
  "pointerdown",
10218
10220
  "keydown",
10219
10221
  "click"
10220
10222
  ]);
10221
- customElements.define("pie-tool-line-reader", hf(vm, {
10223
+ customElements.define("pie-tool-line-reader", ud(vm, {
10222
10224
  visible: {
10223
10225
  attribute: "visible",
10224
10226
  type: "Boolean"