@pie-players/pie-section-player 0.3.28 → 0.3.30

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.
Files changed (32) hide show
  1. package/README.md +192 -12
  2. package/dist/chunks/dist-24a90544.js +193 -138
  3. package/dist/chunks/{dist-Bud4G4lv-b2620662.js → dist-DIBQdekL-ec6db34a.js} +120 -66
  4. package/dist/chunks/dist-c4148994.js +14 -2
  5. package/dist/chunks/{dist-DwP27yIs-cfd207a3.js → dist-rF11IR1B-adc4857f.js} +13 -1
  6. package/dist/chunks/module-c1d68911.js +1819 -1835
  7. package/dist/chunks/player-preload-79b07366.js +6701 -3674
  8. package/dist/chunks/tool-annotation-toolbar-db5bfbec.js +1555 -1470
  9. package/dist/components/section-player-tabbed-element.d.ts +2 -0
  10. package/dist/components/section-player-tabbed-element.d.ts.map +1 -0
  11. package/dist/contracts/host-hooks.d.ts +5 -0
  12. package/dist/contracts/host-hooks.d.ts.map +1 -0
  13. package/dist/contracts/layout-contract.d.ts +3 -3
  14. package/dist/contracts/layout-contract.d.ts.map +1 -1
  15. package/dist/contracts/layout-parity-metadata.d.ts +1 -0
  16. package/dist/contracts/layout-parity-metadata.d.ts.map +1 -1
  17. package/dist/contracts/runtime-host-contract.d.ts +13 -0
  18. package/dist/contracts/runtime-host-contract.d.ts.map +1 -1
  19. package/dist/controllers/SectionController.d.ts.map +1 -1
  20. package/dist/controllers/SectionItemNavigationService.d.ts +0 -1
  21. package/dist/controllers/SectionItemNavigationService.d.ts.map +1 -1
  22. package/dist/controllers/types.d.ts +16 -0
  23. package/dist/controllers/types.d.ts.map +1 -1
  24. package/dist/pie-section-player.d.ts +4 -3
  25. package/dist/pie-section-player.d.ts.map +1 -1
  26. package/dist/pie-section-player.js +6251 -5036
  27. package/dist/policies/index.d.ts +9 -1
  28. package/dist/policies/index.d.ts.map +1 -1
  29. package/dist/policies/types.d.ts +23 -1
  30. package/dist/policies/types.d.ts.map +1 -1
  31. package/package.json +23 -14
  32. /package/dist/chunks/{defineProperty-318b8855.js → defineProperty-aab5a8e0.js} +0 -0
@@ -1,14 +1,14 @@
1
1
  import { t as y } from "./defineProperty-CyepwRr5-3800a70a.js";
2
2
  if (typeof window < "u") {
3
- var wn, Tn;
4
- ((wn = (Tn = window).__svelte ?? (Tn.__svelte = {})).v ?? (wn.v = /* @__PURE__ */ new Set())).add("5");
3
+ var _n, Cn;
4
+ ((_n = (Cn = window).__svelte ?? (Cn.__svelte = {})).v ?? (_n.v = /* @__PURE__ */ new Set())).add("5");
5
5
  }
6
- var fe = {}, j = Symbol(), Yn = Array.isArray, gr = Array.prototype.indexOf, pe = Array.prototype.includes, vo = Array.from, ro = Object.keys, so = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, mr = Object.getOwnPropertyDescriptors, br = Object.prototype, yr = Array.prototype, Qn = Object.getPrototypeOf, In = Object.isExtensible, wr = () => {
6
+ var pe = {}, W = Symbol(), ii = Array.isArray, Tr = Array.prototype.indexOf, ve = Array.prototype.includes, bo = Array.from, lo = Object.keys, co = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, Ir = Object.getOwnPropertyDescriptors, kr = Object.prototype, $r = Array.prototype, ri = Object.getPrototypeOf, En = Object.isExtensible, Sr = () => {
7
7
  };
8
- function Tr(t) {
8
+ function Ar(t) {
9
9
  for (var e = 0; e < t.length; e++) t[e]();
10
10
  }
11
- function ti() {
11
+ function si() {
12
12
  var t, e;
13
13
  return {
14
14
  promise: new Promise((o, n) => {
@@ -18,79 +18,82 @@ function ti() {
18
18
  reject: e
19
19
  };
20
20
  }
21
- var et = 1024, wt = 2048, ie = 4096, Uo = 8192, Ir = 16384, Ko = 32768, Sn = 1 << 25, Jo = 65536, ye = 1 << 19, Sr = 1 << 20, _e = 1 << 25, Re = 65536, $n = 1 << 21, $r = 1 << 22, lo = 1 << 23, Ce = Symbol("$state"), ei = Symbol("legacy props"), kr = Symbol(""), _t = new class extends Error {
21
+ var nt = 1024, vt = 2048, se = 4096, Qo = 8192, xr = 16384, tn = 32768, Mn = 1 << 25, en = 65536, Te = 1 << 19, _r = 1 << 20, Me = 1 << 25, We = 65536, Ln = 1 << 21, Cr = 1 << 22, uo = 1 << 23, Le = Symbol("$state"), ai = Symbol("legacy props"), Er = Symbol(""), Mt = new class extends Error {
22
22
  constructor(...t) {
23
23
  super(...t), y(this, "name", "StaleReactionError"), y(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
24
24
  }
25
- }(), Ar = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
26
- function xr() {
25
+ }(), Mr = !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml");
26
+ function Lr() {
27
27
  throw new Error("https://svelte.dev/e/async_derived_orphan");
28
28
  }
29
- function _r(t, e, o) {
29
+ function Pr(t, e, o) {
30
30
  throw new Error("https://svelte.dev/e/each_key_duplicate");
31
31
  }
32
- function Cr(t) {
32
+ function Or(t) {
33
33
  throw new Error("https://svelte.dev/e/effect_in_teardown");
34
34
  }
35
- function Er() {
35
+ function Rr() {
36
36
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
37
37
  }
38
- function Mr(t) {
38
+ function Nr(t) {
39
39
  throw new Error("https://svelte.dev/e/effect_orphan");
40
40
  }
41
- function Lr() {
41
+ function Wr() {
42
42
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
43
43
  }
44
- function Or() {
44
+ function Vr() {
45
45
  throw new Error("https://svelte.dev/e/hydration_failed");
46
46
  }
47
- function Pr(t) {
47
+ function jr(t) {
48
48
  throw new Error("https://svelte.dev/e/props_invalid_value");
49
49
  }
50
- function Rr() {
50
+ function zr() {
51
51
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
52
52
  }
53
- function Nr() {
53
+ function qr() {
54
54
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
55
55
  }
56
- function Vr() {
56
+ function Hr() {
57
57
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
58
58
  }
59
- function Wr() {
59
+ function Dr() {
60
60
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
61
61
  }
62
- function go(t) {
62
+ function Br() {
63
+ console.warn("https://svelte.dev/e/derived_inert");
64
+ }
65
+ function yo(t) {
63
66
  console.warn("https://svelte.dev/e/hydration_mismatch");
64
67
  }
65
- function jr() {
68
+ function Fr() {
66
69
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
67
70
  }
68
- var L = !1;
69
- function Ct(t) {
70
- L = t;
71
+ var P = !1;
72
+ function Lt(t) {
73
+ P = t;
71
74
  }
72
- var E;
73
- function G(t) {
74
- if (t === null) throw go(), fe;
75
- return E = t;
75
+ var L;
76
+ function U(t) {
77
+ if (t === null) throw yo(), pe;
78
+ return L = t;
76
79
  }
77
- function mo() {
78
- return G(/* @__PURE__ */ Tt(E));
80
+ function wo() {
81
+ return U(/* @__PURE__ */ St(L));
79
82
  }
80
- function De(t) {
81
- if (L) {
82
- if (/* @__PURE__ */ Tt(E) !== null) throw go(), fe;
83
- E = t;
83
+ function Be(t) {
84
+ if (P) {
85
+ if (/* @__PURE__ */ St(L) !== null) throw yo(), pe;
86
+ L = t;
84
87
  }
85
88
  }
86
- function zr(t = 1) {
87
- if (L) {
88
- for (var e = t, o = E; e--; ) o = /* @__PURE__ */ Tt(o);
89
- E = o;
89
+ function Gr(t = 1) {
90
+ if (P) {
91
+ for (var e = t, o = L; e--; ) o = /* @__PURE__ */ St(o);
92
+ L = o;
90
93
  }
91
94
  }
92
- function ao(t = !0) {
93
- for (var e = 0, o = E; ; ) {
95
+ function ho(t = !0) {
96
+ for (var e = 0, o = L; ; ) {
94
97
  if (o.nodeType === 8) {
95
98
  var n = o.data;
96
99
  if (n === "]") {
@@ -98,78 +101,78 @@ function ao(t = !0) {
98
101
  e -= 1;
99
102
  } else (n === "[" || n === "[!" || n[0] === "[" && !isNaN(Number(n.slice(1)))) && (e += 1);
100
103
  }
101
- var i = /* @__PURE__ */ Tt(o);
104
+ var i = /* @__PURE__ */ St(o);
102
105
  t && o.remove(), o = i;
103
106
  }
104
107
  }
105
- function oi(t) {
106
- if (!t || t.nodeType !== 8) throw go(), fe;
108
+ function li(t) {
109
+ if (!t || t.nodeType !== 8) throw yo(), pe;
107
110
  return t.data;
108
111
  }
109
- function ni(t) {
112
+ function ci(t) {
110
113
  return t === this.v;
111
114
  }
112
- function Hr(t, e) {
115
+ function Ur(t, e) {
113
116
  return t != t ? e == e : t !== e || t !== null && typeof t == "object" || typeof t == "function";
114
117
  }
115
- function ii(t) {
116
- return !Hr(t, this.v);
118
+ function ui(t) {
119
+ return !Ur(t, this.v);
117
120
  }
118
- var zt = !1, bo = !1, W = null;
119
- function ve(t) {
120
- W = t;
121
+ var Pt = !1, To = !1, j = null;
122
+ function ge(t) {
123
+ j = t;
121
124
  }
122
- function ri(t, e = !1, o) {
123
- W = {
124
- p: W,
125
+ function di(t, e = !1, o) {
126
+ j = {
127
+ p: j,
125
128
  i: !1,
126
129
  c: null,
127
130
  e: null,
128
131
  s: t,
129
132
  x: null,
130
- r: k,
131
- l: bo && !e ? {
133
+ r: S,
134
+ l: To && !e ? {
132
135
  s: null,
133
136
  u: null,
134
137
  $: []
135
138
  } : null
136
139
  };
137
140
  }
138
- function si(t) {
139
- var e = W, o = e.e;
141
+ function hi(t) {
142
+ var e = j, o = e.e;
140
143
  if (o !== null) {
141
144
  e.e = null;
142
- for (var n of o) Pi(n);
145
+ for (var n of o) ji(n);
143
146
  }
144
- return t !== void 0 && (e.x = t), e.i = !0, W = e.p, t ?? {};
147
+ return t !== void 0 && (e.x = t), e.i = !0, j = e.p, t ?? {};
145
148
  }
146
- function Ne() {
147
- return !bo || W !== null && W.l === null;
149
+ function Ve() {
150
+ return !To || j !== null && j.l === null;
148
151
  }
149
- var Ut = [];
150
- function li() {
151
- var t = Ut;
152
- Ut = [], Tr(t);
152
+ var Kt = [];
153
+ function fi() {
154
+ var t = Kt;
155
+ Kt = [], Ar(t);
153
156
  }
154
- function ee(t) {
155
- if (Ut.length === 0 && !Ee) {
156
- var e = Ut;
157
+ function ne(t) {
158
+ if (Kt.length === 0 && !Pe) {
159
+ var e = Kt;
157
160
  queueMicrotask(() => {
158
- e === Ut && li();
161
+ e === Kt && fi();
159
162
  });
160
163
  }
161
- Ut.push(t);
164
+ Kt.push(t);
162
165
  }
163
- function Dr() {
164
- for (; Ut.length > 0; ) li();
166
+ function Kr() {
167
+ for (; Kt.length > 0; ) fi();
165
168
  }
166
- function ai(t) {
167
- var e = k;
168
- if (e === null) return A.f |= lo, t;
169
+ function pi(t) {
170
+ var e = S;
171
+ if (e === null) return _.f |= uo, t;
169
172
  if (!(e.f & 32768) && !(e.f & 4)) throw t;
170
- Vt(t, e);
173
+ Ht(t, e);
171
174
  }
172
- function Vt(t, e) {
175
+ function Ht(t, e) {
173
176
  for (; e !== null; ) {
174
177
  if (e.f & 128) {
175
178
  if (!(e.f & 32768)) throw t;
@@ -184,183 +187,222 @@ function Vt(t, e) {
184
187
  }
185
188
  throw t;
186
189
  }
187
- var qr = ~(wt | ie | et);
190
+ var Jr = ~(vt | se | nt);
188
191
  function N(t, e) {
189
- t.f = t.f & qr | e;
192
+ t.f = t.f & Jr | e;
190
193
  }
191
- function Zo(t) {
192
- t.f & 512 || t.deps === null ? N(t, et) : N(t, ie);
194
+ function on(t) {
195
+ t.f & 512 || t.deps === null ? N(t, nt) : N(t, se);
193
196
  }
194
- function ci(t) {
195
- if (t !== null) for (const e of t) !(e.f & 2) || !(e.f & 65536) || (e.f ^= Re, ci(e.deps));
197
+ function vi(t) {
198
+ if (t !== null) for (const e of t) !(e.f & 2) || !(e.f & 65536) || (e.f ^= We, vi(e.deps));
196
199
  }
197
- function ui(t, e, o) {
198
- t.f & 2048 ? e.add(t) : t.f & 4096 && o.add(t), ci(t.deps), N(t, et);
200
+ function gi(t, e, o) {
201
+ t.f & 2048 ? e.add(t) : t.f & 4096 && o.add(t), vi(t.deps), N(t, nt);
199
202
  }
200
- var Br = !1, qe = !1;
201
- function Fr(t) {
202
- var e = qe;
203
+ var Zr = !1, Fe = !1;
204
+ function Yr(t) {
205
+ var e = Fe;
203
206
  try {
204
- return qe = !1, [t(), qe];
207
+ return Fe = !1, [t(), Fe];
205
208
  } finally {
206
- qe = e;
209
+ Fe = e;
207
210
  }
208
211
  }
209
- function di(t, e) {
212
+ function mi(t, e) {
210
213
  if (e.has(t)) throw new TypeError("Cannot initialize the same private elements twice on an object");
211
214
  }
212
- function Xo(t, e) {
213
- di(t, e), e.add(t);
215
+ function nn(t, e) {
216
+ mi(t, e), e.add(t);
214
217
  }
215
- function $(t, e, o) {
216
- di(t, e), e.set(t, o);
218
+ function I(t, e, o) {
219
+ mi(t, e), e.set(t, o);
217
220
  }
218
- function O(t, e, o) {
221
+ function E(t, e, o) {
219
222
  if (typeof t == "function" ? t === e : t.has(e)) return arguments.length < 3 ? e : o;
220
223
  throw new TypeError("Private element is not present on this object");
221
224
  }
222
- function u(t, e) {
223
- return t.get(O(t, e));
225
+ function c(t, e) {
226
+ return t.get(E(t, e));
224
227
  }
225
- function T(t, e, o) {
226
- return t.set(O(t, e), o), o;
228
+ function $(t, e, o) {
229
+ return t.set(E(t, e), o), o;
227
230
  }
228
- var hi, Et = /* @__PURE__ */ new Set(), M = null, F = null, Vo = null, Ee = !1, So = !1, ge = null, co = null, fi = 0, Gr = 1, uo = /* @__PURE__ */ new WeakMap(), Be = /* @__PURE__ */ new WeakMap(), ae = /* @__PURE__ */ new WeakMap(), ce = /* @__PURE__ */ new WeakMap(), Xe = /* @__PURE__ */ new WeakMap(), at = /* @__PURE__ */ new WeakMap(), Le = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), Gt = /* @__PURE__ */ new WeakMap(), Fe = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakSet(), re = class pi {
231
+ var bi, It = /* @__PURE__ */ new Set(), x = null, q = null, jo = null, Pe = !1, Ao = !1, me = null, fo = null, yi = 0, Xr = 1, po = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), $e = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap(), jt = /* @__PURE__ */ new WeakMap(), Qe = /* @__PURE__ */ new WeakMap(), dt = /* @__PURE__ */ new WeakMap(), zo = /* @__PURE__ */ new WeakMap(), be = /* @__PURE__ */ new WeakMap(), Xt = /* @__PURE__ */ new WeakMap(), qt = /* @__PURE__ */ new WeakMap(), to = /* @__PURE__ */ new WeakMap(), Ue = /* @__PURE__ */ new WeakMap(), fe = /* @__PURE__ */ new WeakMap(), F = /* @__PURE__ */ new WeakSet(), ae = class wi {
229
232
  constructor() {
230
- Xo(this, mt), y(this, "id", Gr++), y(this, "current", /* @__PURE__ */ new Map()), y(this, "previous", /* @__PURE__ */ new Map()), $(this, uo, /* @__PURE__ */ new Set()), $(this, Be, /* @__PURE__ */ new Set()), $(this, ae, 0), $(this, ce, 0), $(this, Xe, null), $(this, at, []), $(this, Le, /* @__PURE__ */ new Set()), $(this, Xt, /* @__PURE__ */ new Set()), $(this, Gt, /* @__PURE__ */ new Map()), y(this, "is_fork", !1), $(this, Fe, !1);
233
+ nn(this, F), y(this, "id", Xr++), y(this, "current", /* @__PURE__ */ new Map()), y(this, "previous", /* @__PURE__ */ new Map()), I(this, po, /* @__PURE__ */ new Set()), I(this, Ge, /* @__PURE__ */ new Set()), I(this, $e, /* @__PURE__ */ new Set()), I(this, Ut, /* @__PURE__ */ new Map()), I(this, jt, /* @__PURE__ */ new Map()), I(this, Qe, null), I(this, dt, []), I(this, zo, []), I(this, be, /* @__PURE__ */ new Set()), I(this, Xt, /* @__PURE__ */ new Set()), I(this, qt, /* @__PURE__ */ new Map()), I(this, to, /* @__PURE__ */ new Set()), y(this, "is_fork", !1), I(this, Ue, !1), I(this, fe, /* @__PURE__ */ new Set());
231
234
  }
232
235
  skip_effect(e) {
233
- u(Gt, this).has(e) || u(Gt, this).set(e, {
236
+ c(qt, this).has(e) || c(qt, this).set(e, {
234
237
  d: [],
235
238
  m: []
236
- });
237
- }
238
- unskip_effect(e) {
239
- var o = u(Gt, this).get(e);
240
- if (o) {
241
- u(Gt, this).delete(e);
242
- for (var n of o.d) N(n, wt), this.schedule(n);
243
- for (n of o.m) N(n, ie), this.schedule(n);
239
+ }), c(to, this).delete(e);
240
+ }
241
+ unskip_effect(e, o = (n) => this.schedule(n)) {
242
+ var n = c(qt, this).get(e);
243
+ if (n) {
244
+ c(qt, this).delete(e);
245
+ for (var i of n.d) N(i, vt), o(i);
246
+ for (i of n.m) N(i, se), o(i);
244
247
  }
248
+ c(to, this).add(e);
245
249
  }
246
- capture(e, o) {
247
- o !== j && !this.previous.has(e) && this.previous.set(e, o), e.f & 8388608 || (this.current.set(e, e.v), F?.set(e, e.v));
250
+ capture(e, o, n = !1) {
251
+ e.v !== W && !this.previous.has(e) && this.previous.set(e, e.v), e.f & 8388608 || (this.current.set(e, [o, n]), q?.set(e, o)), this.is_fork || (e.v = o);
248
252
  }
249
253
  activate() {
250
- M = this;
254
+ x = this;
251
255
  }
252
256
  deactivate() {
253
- M = null, F = null;
257
+ x = null, q = null;
254
258
  }
255
259
  flush() {
256
260
  try {
257
- So = !0, M = this, O(mt, this, vi).call(this);
261
+ Ao = !0, x = this, E(F, this, rn).call(this);
258
262
  } finally {
259
- fi = 0, Vo = null, ge = null, co = null, So = !1, M = null, F = null, jt.clear();
263
+ yi = 0, jo = null, me = null, fo = null, Ao = !1, x = null, q = null, ee.clear();
260
264
  }
261
265
  }
262
266
  discard() {
263
- for (const e of u(Be, this)) e(this);
264
- u(Be, this).clear(), Et.delete(this);
267
+ for (const e of c(Ge, this)) e(this);
268
+ c(Ge, this).clear(), c($e, this).clear(), It.delete(this);
269
+ }
270
+ register_created_effect(e) {
271
+ c(zo, this).push(e);
265
272
  }
266
- increment(e) {
267
- T(ae, this, u(ae, this) + 1), e && T(ce, this, u(ce, this) + 1);
273
+ increment(e, o) {
274
+ let n = c(Ut, this).get(o) ?? 0;
275
+ if (c(Ut, this).set(o, n + 1), e) {
276
+ let i = c(jt, this).get(o) ?? 0;
277
+ c(jt, this).set(o, i + 1);
278
+ }
268
279
  }
269
- decrement(e, o) {
270
- T(ae, this, u(ae, this) - 1), e && T(ce, this, u(ce, this) - 1), !(u(Fe, this) || o) && (T(Fe, this, !0), ee(() => {
271
- T(Fe, this, !1), this.flush();
280
+ decrement(e, o, n) {
281
+ let i = c(Ut, this).get(o) ?? 0;
282
+ if (i === 1 ? c(Ut, this).delete(o) : c(Ut, this).set(o, i - 1), e) {
283
+ let r = c(jt, this).get(o) ?? 0;
284
+ r === 1 ? c(jt, this).delete(o) : c(jt, this).set(o, r - 1);
285
+ }
286
+ c(Ue, this) || n || ($(Ue, this, !0), ne(() => {
287
+ $(Ue, this, !1), this.flush();
272
288
  }));
273
289
  }
274
290
  transfer_effects(e, o) {
275
- for (const n of e) u(Le, this).add(n);
276
- for (const n of o) u(Xt, this).add(n);
291
+ for (const n of e) c(be, this).add(n);
292
+ for (const n of o) c(Xt, this).add(n);
277
293
  e.clear(), o.clear();
278
294
  }
279
295
  oncommit(e) {
280
- u(uo, this).add(e);
296
+ c(po, this).add(e);
281
297
  }
282
298
  ondiscard(e) {
283
- u(Be, this).add(e);
299
+ c(Ge, this).add(e);
300
+ }
301
+ on_fork_commit(e) {
302
+ c($e, this).add(e);
303
+ }
304
+ run_fork_commit_callbacks() {
305
+ for (const e of c($e, this)) e(this);
306
+ c($e, this).clear();
284
307
  }
285
308
  settled() {
286
- return (u(Xe, this) ?? T(Xe, this, ti())).promise;
309
+ return (c(Qe, this) ?? $(Qe, this, si())).promise;
287
310
  }
288
311
  static ensure() {
289
- if (M === null) {
290
- const e = M = new pi();
291
- So || (Et.add(M), Ee || ee(() => {
292
- M === e && e.flush();
312
+ if (x === null) {
313
+ const e = x = new wi();
314
+ Ao || (It.add(x), Pe || ne(() => {
315
+ x === e && e.flush();
293
316
  }));
294
317
  }
295
- return M;
318
+ return x;
296
319
  }
297
320
  apply() {
298
- if (!zt || !this.is_fork && Et.size === 1) {
299
- F = null;
321
+ if (!Pt || !this.is_fork && It.size === 1) {
322
+ q = null;
300
323
  return;
301
324
  }
302
- F = new Map(this.current);
303
- for (const e of Et) if (!(e === this || e.is_fork)) for (const [o, n] of e.previous) F.has(o) || F.set(o, n);
325
+ q = /* @__PURE__ */ new Map();
326
+ for (const [n, [i]] of this.current) q.set(n, i);
327
+ for (const n of It) if (!(n === this || n.is_fork)) {
328
+ var e = !1, o = !1;
329
+ if (n.id < this.id) for (const [i, [, r]] of n.current) r || (e || (e = this.current.has(i)), o || (o = !this.current.has(i)));
330
+ if (e && o) c(fe, this).add(n);
331
+ else for (const [i, r] of n.previous) q.has(i) || q.set(i, r);
332
+ }
304
333
  }
305
334
  schedule(e) {
306
- if (Vo = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
335
+ if (jo = e, e.b?.is_pending && e.f & 16777228 && !(e.f & 32768)) {
307
336
  e.b.defer_effect(e);
308
337
  return;
309
338
  }
310
339
  for (var o = e; o.parent !== null; ) {
311
340
  o = o.parent;
312
341
  var n = o.f;
313
- if (ge !== null && o === k && (zt || (A === null || !(A.f & 2)) && !Br)) return;
342
+ if (me !== null && o === S && (Pt || (_ === null || !(_.f & 2)) && !Zr)) return;
314
343
  if (n & 96) {
315
344
  if (!(n & 1024)) return;
316
- o.f ^= et;
345
+ o.f ^= nt;
317
346
  }
318
347
  }
319
- u(at, this).push(o);
348
+ c(dt, this).push(o);
320
349
  }
321
350
  };
322
- hi = re;
323
- function kn() {
324
- return this.is_fork || u(ce, this) > 0;
325
- }
326
- function vi() {
327
- if (fi++ > 1e3 && (Et.delete(this), Kr()), !O(mt, this, kn).call(this)) {
328
- for (const s of u(Le, this)) u(Xt, this).delete(s), N(s, wt), this.schedule(s);
329
- for (const s of u(Xt, this)) N(s, ie), this.schedule(s);
330
- }
331
- const t = u(at, this);
332
- T(at, this, []), this.apply();
333
- var e = ge = [], o = [], n = co = [];
351
+ bi = ae;
352
+ function qo() {
353
+ return this.is_fork || c(jt, this).size > 0;
354
+ }
355
+ function Qr() {
356
+ for (const o of c(fe, this)) for (const n of c(jt, o).keys()) {
357
+ for (var t = !1, e = n; e.parent !== null; ) {
358
+ if (c(qt, this).has(e)) {
359
+ t = !0;
360
+ break;
361
+ }
362
+ e = e.parent;
363
+ }
364
+ if (!t) return !0;
365
+ }
366
+ return !1;
367
+ }
368
+ function rn() {
369
+ if (yi++ > 1e3 && (It.delete(this), es()), !E(F, this, qo).call(this)) {
370
+ for (const s of c(be, this)) c(Xt, this).delete(s), N(s, vt), this.schedule(s);
371
+ for (const s of c(Xt, this)) N(s, se), this.schedule(s);
372
+ }
373
+ const t = c(dt, this);
374
+ $(dt, this, []), this.apply();
375
+ var e = me = [], o = [], n = fo = [];
334
376
  for (const s of t) try {
335
- O(mt, this, gi).call(this, s, e, o);
336
- } catch (l) {
337
- throw wi(s), l;
377
+ E(F, this, Ti).call(this, s, e, o);
378
+ } catch (a) {
379
+ throw $i(s), a;
338
380
  }
339
- if (M = null, n.length > 0) {
340
- var i = hi.ensure();
381
+ if (x = null, n.length > 0) {
382
+ var i = bi.ensure();
341
383
  for (const s of n) i.schedule(s);
342
384
  }
343
- if (ge = null, co = null, O(mt, this, kn).call(this)) {
344
- O(mt, this, An).call(this, o), O(mt, this, An).call(this, e);
345
- for (const [s, l] of u(Gt, this)) yi(s, l);
385
+ if (me = null, fo = null, E(F, this, qo).call(this) || E(F, this, Qr).call(this)) {
386
+ E(F, this, Ho).call(this, o), E(F, this, Ho).call(this, e);
387
+ for (const [s, a] of c(qt, this)) ki(s, a);
346
388
  } else {
347
- u(ae, this) === 0 && Et.delete(this), u(Le, this).clear(), u(Xt, this).clear();
348
- for (const s of u(uo, this)) s(this);
349
- u(uo, this).clear(), xn(o), xn(e), u(Xe, this)?.resolve();
389
+ c(Ut, this).size === 0 && It.delete(this), c(be, this).clear(), c(Xt, this).clear();
390
+ for (const s of c(po, this)) s(this);
391
+ c(po, this).clear(), Pn(o), Pn(e), c(Qe, this)?.resolve();
350
392
  }
351
- var r = M;
352
- if (u(at, this).length > 0) {
393
+ var r = x;
394
+ if (c(dt, this).length > 0) {
353
395
  const s = r ?? (r = this);
354
- u(at, s).push(...u(at, this).filter((l) => !u(at, s).includes(l)));
396
+ c(dt, s).push(...c(dt, this).filter((a) => !c(dt, s).includes(a)));
355
397
  }
356
- r !== null && (Et.add(r), O(mt, r, vi).call(r)), Et.has(this) || O(mt, this, Ur).call(this);
398
+ r !== null && (It.add(r), E(F, r, rn).call(r)), Pt && !It.has(this) && E(F, this, ts).call(this);
357
399
  }
358
- function gi(t, e, o) {
359
- t.f ^= et;
400
+ function Ti(t, e, o) {
401
+ t.f ^= nt;
360
402
  for (var n = t.first; n !== null; ) {
361
403
  var i = n.f, r = (i & 96) !== 0;
362
- if (!(r && i & 1024 || i & 8192 || u(Gt, this).has(n)) && n.fn !== null) {
363
- r ? n.f ^= et : i & 4 ? e.push(n) : zt && i & 16777224 ? o.push(n) : Ve(n) && (i & 16 && u(Xt, this).add(n), be(n));
404
+ if (!(r && i & 1024 || i & 8192 || c(qt, this).has(n)) && n.fn !== null) {
405
+ r ? n.f ^= nt : i & 4 ? e.push(n) : Pt && i & 16777224 ? o.push(n) : je(n) && (i & 16 && c(Xt, this).add(n), we(n));
364
406
  var s = n.first;
365
407
  if (s !== null) {
366
408
  n = s;
@@ -368,542 +410,550 @@ function gi(t, e, o) {
368
410
  }
369
411
  }
370
412
  for (; n !== null; ) {
371
- var l = n.next;
372
- if (l !== null) {
373
- n = l;
413
+ var a = n.next;
414
+ if (a !== null) {
415
+ n = a;
374
416
  break;
375
417
  }
376
418
  n = n.parent;
377
419
  }
378
420
  }
379
421
  }
380
- function An(t) {
381
- for (var e = 0; e < t.length; e += 1) ui(t[e], u(Le, this), u(Xt, this));
422
+ function Ho(t) {
423
+ for (var e = 0; e < t.length; e += 1) gi(t[e], c(be, this), c(Xt, this));
382
424
  }
383
- function Ur() {
384
- for (const l of Et) {
425
+ function ts() {
426
+ for (const l of It) {
385
427
  var t = l.id < this.id, e = [];
386
- for (const [a, c] of this.current) {
387
- if (l.current.has(a)) if (t && c !== l.current.get(a)) l.current.set(a, c);
388
- else continue;
389
- e.push(a);
428
+ for (const [d, [h, f]] of this.current) {
429
+ if (l.current.has(d)) {
430
+ var o = l.current.get(d)[0];
431
+ if (t && h !== o) l.current.set(d, [h, f]);
432
+ else continue;
433
+ }
434
+ e.push(d);
390
435
  }
391
- var o = [...l.current.keys()].filter((a) => !this.current.has(a));
392
- if (o.length === 0) t && l.discard();
436
+ var n = [...l.current.keys()].filter((d) => !this.current.has(d));
437
+ if (n.length === 0) t && l.discard();
393
438
  else if (e.length > 0) {
439
+ if (t) for (const d of c(to, this)) l.unskip_effect(d, (h) => {
440
+ h.f & 4194320 ? l.schedule(h) : E(F, l, Ho).call(l, [h]);
441
+ });
394
442
  l.activate();
395
- var n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map();
396
- for (var r of e) mi(r, o, n, i);
397
- if (u(at, l).length > 0) {
443
+ var i = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Map();
444
+ for (var s of e) Ii(s, n, i, r);
445
+ r = /* @__PURE__ */ new Map();
446
+ var a = [...l.current.keys()].filter((d) => this.current.has(d) ? this.current.get(d)[0] !== d : !0);
447
+ for (const d of c(zo, this)) !(d.f & 155648) && sn(d, a, r) && (d.f & 4194320 ? (N(d, vt), l.schedule(d)) : c(be, l).add(d));
448
+ if (c(dt, l).length > 0) {
398
449
  l.apply();
399
- for (var s of u(at, l)) O(mt, l, gi).call(l, s, [], []);
400
- T(at, l, []);
450
+ for (var u of c(dt, l)) E(F, l, Ti).call(l, u, [], []);
451
+ $(dt, l, []);
401
452
  }
402
453
  l.deactivate();
403
454
  }
404
455
  }
456
+ for (const l of It) c(fe, l).has(this) && (c(fe, l).delete(this), c(fe, l).size === 0 && !E(F, l, qo).call(l) && (l.activate(), E(F, l, rn).call(l)));
405
457
  }
406
- function Ye(t) {
407
- var e = Ee;
408
- Ee = !0;
458
+ function eo(t) {
459
+ var e = Pe;
460
+ Pe = !0;
409
461
  try {
410
462
  var o;
411
- for (t && (M !== null && !M.is_fork && M.flush(), o = t()); ; ) {
412
- if (Dr(), M === null) return o;
413
- M.flush();
463
+ for (t && (x !== null && !x.is_fork && x.flush(), o = t()); ; ) {
464
+ if (Kr(), x === null) return o;
465
+ x.flush();
414
466
  }
415
467
  } finally {
416
- Ee = e;
468
+ Pe = e;
417
469
  }
418
470
  }
419
- function Kr() {
471
+ function es() {
420
472
  try {
421
- Lr();
473
+ Wr();
422
474
  } catch (t) {
423
- Vt(t, Vo);
475
+ Ht(t, jo);
424
476
  }
425
477
  }
426
- var bt = null;
427
- function xn(t) {
478
+ var wt = null;
479
+ function Pn(t) {
428
480
  var e = t.length;
429
481
  if (e !== 0) {
430
482
  for (var o = 0; o < e; ) {
431
483
  var n = t[o++];
432
- if (!(n.f & 24576) && Ve(n) && (bt = /* @__PURE__ */ new Set(), be(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Vi(n), bt?.size > 0)) {
433
- jt.clear();
434
- for (const i of bt) {
484
+ if (!(n.f & 24576) && je(n) && (wt = /* @__PURE__ */ new Set(), we(n), n.deps === null && n.first === null && n.nodes === null && n.teardown === null && n.ac === null && Hi(n), wt?.size > 0)) {
485
+ ee.clear();
486
+ for (const i of wt) {
435
487
  if (i.f & 24576) continue;
436
488
  const r = [i];
437
489
  let s = i.parent;
438
- for (; s !== null; ) bt.has(s) && (bt.delete(s), r.push(s)), s = s.parent;
439
- for (let l = r.length - 1; l >= 0; l--) {
440
- const a = r[l];
441
- a.f & 24576 || be(a);
490
+ for (; s !== null; ) wt.has(s) && (wt.delete(s), r.push(s)), s = s.parent;
491
+ for (let a = r.length - 1; a >= 0; a--) {
492
+ const u = r[a];
493
+ u.f & 24576 || we(u);
442
494
  }
443
495
  }
444
- bt.clear();
496
+ wt.clear();
445
497
  }
446
498
  }
447
- bt = null;
499
+ wt = null;
448
500
  }
449
501
  }
450
- function mi(t, e, o, n) {
502
+ function Ii(t, e, o, n) {
451
503
  if (!o.has(t) && (o.add(t), t.reactions !== null)) for (const i of t.reactions) {
452
504
  const r = i.f;
453
- r & 2 ? mi(i, e, o, n) : r & 4194320 && !(r & 2048) && bi(i, e, n) && (N(i, wt), Yo(i));
505
+ r & 2 ? Ii(i, e, o, n) : r & 4194320 && !(r & 2048) && sn(i, e, n) && (N(i, vt), an(i));
454
506
  }
455
507
  }
456
- function bi(t, e, o) {
508
+ function sn(t, e, o) {
457
509
  const n = o.get(t);
458
510
  if (n !== void 0) return n;
459
511
  if (t.deps !== null) for (const i of t.deps) {
460
- if (pe.call(e, i)) return !0;
461
- if (i.f & 2 && bi(i, e, o)) return o.set(i, !0), !0;
512
+ if (ve.call(e, i)) return !0;
513
+ if (i.f & 2 && sn(i, e, o)) return o.set(i, !0), !0;
462
514
  }
463
515
  return o.set(t, !1), !1;
464
516
  }
465
- function Yo(t) {
466
- M.schedule(t);
517
+ function an(t) {
518
+ x.schedule(t);
467
519
  }
468
- function yi(t, e) {
520
+ function ki(t, e) {
469
521
  if (!(t.f & 32 && t.f & 1024)) {
470
- t.f & 2048 ? e.d.push(t) : t.f & 4096 && e.m.push(t), N(t, et);
471
- for (var o = t.first; o !== null; ) yi(o, e), o = o.next;
522
+ t.f & 2048 ? e.d.push(t) : t.f & 4096 && e.m.push(t), N(t, nt);
523
+ for (var o = t.first; o !== null; ) ki(o, e), o = o.next;
472
524
  }
473
525
  }
474
- function wi(t) {
475
- N(t, et);
476
- for (var e = t.first; e !== null; ) wi(e), e = e.next;
526
+ function $i(t) {
527
+ N(t, nt);
528
+ for (var e = t.first; e !== null; ) $i(e), e = e.next;
477
529
  }
478
- function Jr(t) {
479
- let e = 0, o = oe(0), n;
530
+ function os(t) {
531
+ let e = 0, o = ie(0), n;
480
532
  return () => {
481
- rn() && (g(o), sn(() => (e === 0 && (n = dn(() => t(() => Me(o)))), e += 1, () => {
482
- ee(() => {
483
- e -= 1, e === 0 && (n?.(), n = void 0, Me(o));
533
+ fn() && (g(o), pn(() => (e === 0 && (n = yn(() => t(() => Oe(o)))), e += 1, () => {
534
+ ne(() => {
535
+ e -= 1, e === 0 && (n?.(), n = void 0, Oe(o));
484
536
  });
485
537
  })));
486
538
  };
487
539
  }
488
- var Zr = Jo | ye;
489
- function Xr(t, e, o, n) {
490
- new Yr(t, e, o, n);
540
+ var ns = en | Te;
541
+ function is(t, e, o, n) {
542
+ new rs(t, e, o, n);
491
543
  }
492
- var ct = /* @__PURE__ */ new WeakMap(), $o = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), Oe = /* @__PURE__ */ new WeakMap(), Y = /* @__PURE__ */ new WeakMap(), Wt = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), xt = /* @__PURE__ */ new WeakMap(), Yt = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), Ge = /* @__PURE__ */ new WeakMap(), Wo = /* @__PURE__ */ new WeakMap(), jo = /* @__PURE__ */ new WeakMap(), Bt = /* @__PURE__ */ new WeakMap(), _n = /* @__PURE__ */ new WeakMap(), q = /* @__PURE__ */ new WeakSet(), Yr = class {
544
+ var ft = /* @__PURE__ */ new WeakMap(), Do = /* @__PURE__ */ new WeakMap(), Tt = /* @__PURE__ */ new WeakMap(), Re = /* @__PURE__ */ new WeakMap(), et = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), X = /* @__PURE__ */ new WeakMap(), ut = /* @__PURE__ */ new WeakMap(), Qt = /* @__PURE__ */ new WeakMap(), ue = /* @__PURE__ */ new WeakMap(), te = /* @__PURE__ */ new WeakMap(), Ke = /* @__PURE__ */ new WeakMap(), Bo = /* @__PURE__ */ new WeakMap(), Fo = /* @__PURE__ */ new WeakMap(), Ft = /* @__PURE__ */ new WeakMap(), On = /* @__PURE__ */ new WeakMap(), z = /* @__PURE__ */ new WeakSet(), rs = class {
493
545
  constructor(t, e, o, n) {
494
- Xo(this, q), y(this, "parent", void 0), y(this, "is_pending", !1), y(this, "transform_error", void 0), $(this, ct, void 0), $(this, $o, L ? E : null), $(this, Nt, void 0), $(this, Oe, void 0), $(this, Y, void 0), $(this, Wt, null), $(this, ut, null), $(this, xt, null), $(this, Yt, null), $(this, ue, 0), $(this, Qt, 0), $(this, Ge, !1), $(this, Wo, /* @__PURE__ */ new Set()), $(this, jo, /* @__PURE__ */ new Set()), $(this, Bt, null), $(this, _n, Jr(() => (T(Bt, this, oe(u(ue, this))), () => {
495
- T(Bt, this, null);
496
- }))), T(ct, this, t), T(Nt, this, e), T(Oe, this, (i) => {
497
- var r = k;
546
+ nn(this, z), y(this, "parent", void 0), y(this, "is_pending", !1), y(this, "transform_error", void 0), I(this, ft, void 0), I(this, Do, P ? L : null), I(this, Tt, void 0), I(this, Re, void 0), I(this, et, void 0), I(this, kt, null), I(this, X, null), I(this, ut, null), I(this, Qt, null), I(this, ue, 0), I(this, te, 0), I(this, Ke, !1), I(this, Bo, /* @__PURE__ */ new Set()), I(this, Fo, /* @__PURE__ */ new Set()), I(this, Ft, null), I(this, On, os(() => ($(Ft, this, ie(c(ue, this))), () => {
547
+ $(Ft, this, null);
548
+ }))), $(ft, this, t), $(Tt, this, e), $(Re, this, (i) => {
549
+ var r = S;
498
550
  r.b = this, r.f |= 128, o(i);
499
- }), this.parent = k.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), T(Y, this, ln(() => {
500
- if (L) {
501
- const i = u($o, this);
502
- mo();
551
+ }), this.parent = S.b, this.transform_error = n ?? this.parent?.transform_error ?? ((i) => i), $(et, this, vn(() => {
552
+ if (P) {
553
+ const i = c(Do, this);
554
+ wo();
503
555
  const r = i.data === "[!";
504
556
  if (i.data.startsWith("[?")) {
505
557
  const s = JSON.parse(i.data.slice(2));
506
- O(q, this, ts).call(this, s);
507
- } else r ? O(q, this, es).call(this) : O(q, this, Qr).call(this);
508
- } else O(q, this, Cn).call(this);
509
- }, Zr)), L && T(ct, this, E);
558
+ E(z, this, as).call(this, s);
559
+ } else r ? E(z, this, ls).call(this) : E(z, this, ss).call(this);
560
+ } else E(z, this, Si).call(this);
561
+ }, ns)), P && $(ft, this, L);
510
562
  }
511
563
  defer_effect(t) {
512
- ui(t, u(Wo, this), u(jo, this));
564
+ gi(t, c(Bo, this), c(Fo, this));
513
565
  }
514
566
  is_rendered() {
515
567
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
516
568
  }
517
569
  has_pending_snippet() {
518
- return !!u(Nt, this).pending;
570
+ return !!c(Tt, this).pending;
519
571
  }
520
572
  update_pending_count(t, e) {
521
- O(q, this, Ti).call(this, t, e), T(ue, this, u(ue, this) + t), !(!u(Bt, this) || u(Ge, this)) && (T(Ge, this, !0), ee(() => {
522
- T(Ge, this, !1), u(Bt, this) && me(u(Bt, this), u(ue, this));
573
+ E(z, this, Ai).call(this, t, e), $(ue, this, c(ue, this) + t), !(!c(Ft, this) || c(Ke, this)) && ($(Ke, this, !0), ne(() => {
574
+ $(Ke, this, !1), c(Ft, this) && ye(c(Ft, this), c(ue, this));
523
575
  }));
524
576
  }
525
577
  get_effect_pending() {
526
- return u(_n, this).call(this), g(u(Bt, this));
578
+ return c(On, this).call(this), g(c(Ft, this));
527
579
  }
528
580
  error(t) {
529
- var e = u(Nt, this).onerror;
530
- let o = u(Nt, this).failed;
531
- if (!e && !o) throw t;
532
- u(Wt, this) && (z(u(Wt, this)), T(Wt, this, null)), u(ut, this) && (z(u(ut, this)), T(ut, this, null)), u(xt, this) && (z(u(xt, this)), T(xt, this, null)), L && (G(u($o, this)), zr(), G(ao()));
533
- var n = !1, i = !1;
534
- const r = () => {
535
- if (n) {
536
- jr();
537
- return;
538
- }
539
- n = !0, i && Wr(), u(xt, this) !== null && se(u(xt, this), () => {
540
- T(xt, this, null);
541
- }), O(q, this, zo).call(this, () => {
542
- O(q, this, Cn).call(this);
543
- });
544
- }, s = (l) => {
545
- try {
546
- i = !0, e?.(l, r), i = !1;
547
- } catch (a) {
548
- Vt(a, u(Y, this) && u(Y, this).parent);
549
- }
550
- o && T(xt, this, O(q, this, zo).call(this, () => {
551
- try {
552
- return ot(() => {
553
- var a = k;
554
- a.b = this, a.f |= 128, o(u(ct, this), () => l, () => r);
555
- });
556
- } catch (a) {
557
- return Vt(a, u(Y, this).parent), null;
558
- }
559
- }));
560
- };
561
- ee(() => {
562
- var l;
563
- try {
564
- l = this.transform_error(t);
565
- } catch (a) {
566
- Vt(a, u(Y, this) && u(Y, this).parent);
567
- return;
568
- }
569
- l !== null && typeof l == "object" && typeof l.then == "function" ? l.then(s, (a) => Vt(a, u(Y, this) && u(Y, this).parent)) : s(l);
570
- });
581
+ if (!c(Tt, this).onerror && !c(Tt, this).failed) throw t;
582
+ x?.is_fork ? (c(kt, this) && x.skip_effect(c(kt, this)), c(X, this) && x.skip_effect(c(X, this)), c(ut, this) && x.skip_effect(c(ut, this)), x.on_fork_commit(() => {
583
+ E(z, this, Rn).call(this, t);
584
+ })) : E(z, this, Rn).call(this, t);
571
585
  }
572
586
  };
573
- function Qr() {
587
+ function ss() {
574
588
  try {
575
- T(Wt, this, ot(() => u(Oe, this).call(this, u(ct, this))));
589
+ $(kt, this, it(() => c(Re, this).call(this, c(ft, this))));
576
590
  } catch (t) {
577
591
  this.error(t);
578
592
  }
579
593
  }
580
- function ts(t) {
581
- const e = u(Nt, this).failed;
582
- e && T(xt, this, ot(() => {
583
- e(u(ct, this), () => t, () => () => {
594
+ function as(t) {
595
+ const e = c(Tt, this).failed;
596
+ e && $(ut, this, it(() => {
597
+ e(c(ft, this), () => t, () => () => {
584
598
  });
585
599
  }));
586
600
  }
587
- function es() {
588
- const t = u(Nt, this).pending;
589
- t && (this.is_pending = !0, T(ut, this, ot(() => t(u(ct, this)))), ee(() => {
590
- var e = T(Yt, this, document.createDocumentFragment()), o = ht();
591
- e.append(o), T(Wt, this, O(q, this, zo).call(this, () => ot(() => u(Oe, this).call(this, o)))), u(Qt, this) === 0 && (u(ct, this).before(e), T(Yt, this, null), se(u(ut, this), () => {
592
- T(ut, this, null);
593
- }), O(q, this, Qo).call(this, M));
601
+ function ls() {
602
+ const t = c(Tt, this).pending;
603
+ t && (this.is_pending = !0, $(X, this, it(() => t(c(ft, this)))), ne(() => {
604
+ var e = $(Qt, this, document.createDocumentFragment()), o = pt();
605
+ e.append(o), $(kt, this, E(z, this, Go).call(this, () => it(() => c(Re, this).call(this, o)))), c(te, this) === 0 && (c(ft, this).before(e), $(Qt, this, null), le(c(X, this), () => {
606
+ $(X, this, null);
607
+ }), E(z, this, ln).call(this, x));
594
608
  }));
595
609
  }
596
- function Cn() {
610
+ function Si() {
597
611
  try {
598
- if (this.is_pending = this.has_pending_snippet(), T(Qt, this, 0), T(ue, this, 0), T(Wt, this, ot(() => {
599
- u(Oe, this).call(this, u(ct, this));
600
- })), u(Qt, this) > 0) {
601
- var t = T(Yt, this, document.createDocumentFragment());
602
- un(u(Wt, this), t);
603
- const e = u(Nt, this).pending;
604
- T(ut, this, ot(() => e(u(ct, this))));
605
- } else O(q, this, Qo).call(this, M);
612
+ if (this.is_pending = this.has_pending_snippet(), $(te, this, 0), $(ue, this, 0), $(kt, this, it(() => {
613
+ c(Re, this).call(this, c(ft, this));
614
+ })), c(te, this) > 0) {
615
+ var t = $(Qt, this, document.createDocumentFragment());
616
+ bn(c(kt, this), t);
617
+ const e = c(Tt, this).pending;
618
+ $(X, this, it(() => e(c(ft, this))));
619
+ } else E(z, this, ln).call(this, x);
606
620
  } catch (e) {
607
621
  this.error(e);
608
622
  }
609
623
  }
610
- function Qo(t) {
611
- this.is_pending = !1, t.transfer_effects(u(Wo, this), u(jo, this));
624
+ function ln(t) {
625
+ this.is_pending = !1, t.transfer_effects(c(Bo, this), c(Fo, this));
612
626
  }
613
- function zo(t) {
614
- var e = k, o = A, n = W;
615
- yt(u(Y, this)), nt(u(Y, this)), ve(u(Y, this).ctx);
627
+ function Go(t) {
628
+ var e = S, o = _, n = j;
629
+ $t(c(et, this)), rt(c(et, this)), ge(c(et, this).ctx);
616
630
  try {
617
- return re.ensure(), t();
631
+ return ae.ensure(), t();
618
632
  } catch (i) {
619
- return ai(i), null;
633
+ return pi(i), null;
620
634
  } finally {
621
- yt(e), nt(o), ve(n);
635
+ $t(e), rt(o), ge(n);
622
636
  }
623
637
  }
624
- function Ti(t, e) {
638
+ function Ai(t, e) {
625
639
  if (!this.has_pending_snippet()) {
626
640
  if (this.parent) {
627
641
  var o;
628
- O(q, o = this.parent, Ti).call(o, t, e);
642
+ E(z, o = this.parent, Ai).call(o, t, e);
629
643
  }
630
644
  return;
631
645
  }
632
- T(Qt, this, u(Qt, this) + t), u(Qt, this) === 0 && (O(q, this, Qo).call(this, e), u(ut, this) && se(u(ut, this), () => {
633
- T(ut, this, null);
634
- }), u(Yt, this) && (u(ct, this).before(u(Yt, this)), T(Yt, this, null)));
646
+ $(te, this, c(te, this) + t), c(te, this) === 0 && (E(z, this, ln).call(this, e), c(X, this) && le(c(X, this), () => {
647
+ $(X, this, null);
648
+ }), c(Qt, this) && (c(ft, this).before(c(Qt, this)), $(Qt, this, null)));
635
649
  }
636
- function os(t, e, o, n) {
637
- const i = Ne() ? yo : tn;
638
- var r = t.filter((h) => !h.settled);
650
+ function Rn(t) {
651
+ c(kt, this) && (H(c(kt, this)), $(kt, this, null)), c(X, this) && (H(c(X, this)), $(X, this, null)), c(ut, this) && (H(c(ut, this)), $(ut, this, null)), P && (U(c(Do, this)), Gr(), U(ho()));
652
+ var e = c(Tt, this).onerror;
653
+ let o = c(Tt, this).failed;
654
+ var n = !1, i = !1;
655
+ const r = () => {
656
+ if (n) {
657
+ Fr();
658
+ return;
659
+ }
660
+ n = !0, i && Dr(), c(ut, this) !== null && le(c(ut, this), () => {
661
+ $(ut, this, null);
662
+ }), E(z, this, Go).call(this, () => {
663
+ E(z, this, Si).call(this);
664
+ });
665
+ }, s = (a) => {
666
+ try {
667
+ i = !0, e?.(a, r), i = !1;
668
+ } catch (u) {
669
+ Ht(u, c(et, this) && c(et, this).parent);
670
+ }
671
+ o && $(ut, this, E(z, this, Go).call(this, () => {
672
+ try {
673
+ return it(() => {
674
+ var u = S;
675
+ u.b = this, u.f |= 128, o(c(ft, this), () => a, () => r);
676
+ });
677
+ } catch (u) {
678
+ return Ht(u, c(et, this).parent), null;
679
+ }
680
+ }));
681
+ };
682
+ ne(() => {
683
+ var a;
684
+ try {
685
+ a = this.transform_error(t);
686
+ } catch (u) {
687
+ Ht(u, c(et, this) && c(et, this).parent);
688
+ return;
689
+ }
690
+ a !== null && typeof a == "object" && typeof a.then == "function" ? a.then(s, (u) => Ht(u, c(et, this) && c(et, this).parent)) : s(a);
691
+ });
692
+ }
693
+ function cs(t, e, o, n) {
694
+ const i = Ve() ? Io : cn;
695
+ var r = t.filter((f) => !f.settled);
639
696
  if (o.length === 0 && r.length === 0) {
640
697
  n(e.map(i));
641
698
  return;
642
699
  }
643
- var s = k, l = ns(), a = r.length === 1 ? r[0].promise : r.length > 1 ? Promise.all(r.map((h) => h.promise)) : null;
644
- function c(h) {
645
- l();
700
+ var s = S, a = us(), u = r.length === 1 ? r[0].promise : r.length > 1 ? Promise.all(r.map((f) => f.promise)) : null;
701
+ function l(f) {
702
+ a();
646
703
  try {
647
- n(h);
704
+ n(f);
648
705
  } catch (v) {
649
- s.f & 16384 || Vt(v, s);
706
+ s.f & 16384 || Ht(v, s);
650
707
  }
651
- ho();
708
+ vo();
652
709
  }
653
710
  if (o.length === 0) {
654
- a.then(() => c(e.map(i)));
711
+ u.then(() => l(e.map(i)));
655
712
  return;
656
713
  }
657
- var d = Ii();
658
- function f() {
659
- Promise.all(o.map((h) => /* @__PURE__ */ is(h))).then((h) => c([...e.map(i), ...h])).catch((h) => Vt(h, s)).finally(() => d());
714
+ var d = xi();
715
+ function h() {
716
+ Promise.all(o.map((f) => /* @__PURE__ */ ds(f))).then((f) => l([...e.map(i), ...f])).catch((f) => Ht(f, s)).finally(() => d());
660
717
  }
661
- a ? a.then(() => {
662
- l(), f(), ho();
663
- }) : f();
718
+ u ? u.then(() => {
719
+ a(), h(), vo();
720
+ }) : h();
664
721
  }
665
- function ns() {
666
- var t = k, e = A, o = W, n = M;
722
+ function us() {
723
+ var t = S, e = _, o = j, n = x;
667
724
  return function(i = !0) {
668
- yt(t), nt(e), ve(o), i && !(t.f & 16384) && (n?.activate(), n?.apply());
725
+ $t(t), rt(e), ge(o), i && !(t.f & 16384) && (n?.activate(), n?.apply());
669
726
  };
670
727
  }
671
- function ho(t = !0) {
672
- yt(null), nt(null), ve(null), t && M?.deactivate();
728
+ function vo(t = !0) {
729
+ $t(null), rt(null), ge(null), t && x?.deactivate();
673
730
  }
674
- function Ii() {
675
- var t = k.b, e = M, o = t.is_rendered();
676
- return t.update_pending_count(1, e), e.increment(o), (n = !1) => {
677
- t.update_pending_count(-1, e), e.decrement(o, n);
731
+ function xi() {
732
+ var t = S, e = t.b, o = x, n = e.is_rendered();
733
+ return e.update_pending_count(1, o), o.increment(n, t), (i = !1) => {
734
+ e.update_pending_count(-1, o), o.decrement(n, t, i);
678
735
  };
679
736
  }
680
737
  // @__NO_SIDE_EFFECTS__
681
- function yo(t) {
682
- var e = 2 | wt, o = A !== null && A.f & 2 ? A : null;
683
- return k !== null && (k.f |= ye), {
684
- ctx: W,
738
+ function Io(t) {
739
+ var e = 2 | vt;
740
+ return S !== null && (S.f |= Te), {
741
+ ctx: j,
685
742
  deps: null,
686
743
  effects: null,
687
- equals: ni,
744
+ equals: ci,
688
745
  f: e,
689
746
  fn: t,
690
747
  reactions: null,
691
748
  rv: 0,
692
- v: j,
749
+ v: W,
693
750
  wv: 0,
694
- parent: o ?? k,
751
+ parent: S,
695
752
  ac: null
696
753
  };
697
754
  }
698
755
  // @__NO_SIDE_EFFECTS__
699
- function is(t, e, o) {
700
- let n = k;
701
- n === null && xr();
702
- var i = void 0, r = oe(j), s = !A, l = /* @__PURE__ */ new Map();
703
- return ps(() => {
704
- var a = k, c = ti();
705
- i = c.promise;
756
+ function ds(t, e, o) {
757
+ let n = S;
758
+ n === null && Lr();
759
+ var i = void 0, r = ie(W), s = !_, a = /* @__PURE__ */ new Map();
760
+ return ws(() => {
761
+ var u = S, l = si();
762
+ i = l.promise;
706
763
  try {
707
- Promise.resolve(t()).then(c.resolve, c.reject).finally(ho);
764
+ Promise.resolve(t()).then(l.resolve, l.reject).finally(vo);
708
765
  } catch (v) {
709
- c.reject(v), ho();
766
+ l.reject(v), vo();
710
767
  }
711
- var d = M;
768
+ var d = x;
712
769
  if (s) {
713
- if (a.f & 32768) var f = Ii();
714
- if (n.b.is_rendered()) l.get(d)?.reject(_t), l.delete(d);
770
+ if (u.f & 32768) var h = xi();
771
+ if (n.b.is_rendered()) a.get(d)?.reject(Mt), a.delete(d);
715
772
  else {
716
- for (const v of l.values()) v.reject(_t);
717
- l.clear();
773
+ for (const v of a.values()) v.reject(Mt);
774
+ a.clear();
718
775
  }
719
- l.set(d, c);
776
+ a.set(d, l);
720
777
  }
721
- const h = (v, m = void 0) => {
722
- if (f && f(m === _t), !(m === _t || a.f & 16384)) {
723
- if (d.activate(), m) r.f |= lo, me(r, m);
778
+ const f = (v, m = void 0) => {
779
+ if (h && h(m === Mt), !(m === Mt || u.f & 16384)) {
780
+ if (d.activate(), m) r.f |= uo, ye(r, m);
724
781
  else {
725
- r.f & 8388608 && (r.f ^= lo), me(r, v);
726
- for (const [S, p] of l) {
727
- if (l.delete(S), S === d) break;
728
- p.reject(_t);
782
+ r.f & 8388608 && (r.f ^= uo), ye(r, v);
783
+ for (const [k, p] of a) {
784
+ if (a.delete(k), k === d) break;
785
+ p.reject(Mt);
729
786
  }
730
787
  }
731
788
  d.deactivate();
732
789
  }
733
790
  };
734
- c.promise.then(h, (v) => h(null, v || "unknown"));
735
- }), ds(() => {
736
- for (const a of l.values()) a.reject(_t);
737
- }), new Promise((a) => {
738
- function c(d) {
739
- function f() {
740
- d === i ? a(r) : c(i);
791
+ l.promise.then(f, (v) => f(null, v || "unknown"));
792
+ }), ms(() => {
793
+ for (const u of a.values()) u.reject(Mt);
794
+ }), new Promise((u) => {
795
+ function l(d) {
796
+ function h() {
797
+ d === i ? u(r) : l(i);
741
798
  }
742
- d.then(f, f);
799
+ d.then(h, h);
743
800
  }
744
- c(i);
801
+ l(i);
745
802
  });
746
803
  }
747
804
  // @__NO_SIDE_EFFECTS__
748
- function ko(t) {
749
- const e = /* @__PURE__ */ yo(t);
750
- return zt || zi(e), e;
805
+ function xo(t) {
806
+ const e = /* @__PURE__ */ Io(t);
807
+ return Pt || Fi(e), e;
751
808
  }
752
809
  // @__NO_SIDE_EFFECTS__
753
- function tn(t) {
754
- const e = /* @__PURE__ */ yo(t);
755
- return e.equals = ii, e;
810
+ function cn(t) {
811
+ const e = /* @__PURE__ */ Io(t);
812
+ return e.equals = ui, e;
756
813
  }
757
- function rs(t) {
814
+ function hs(t) {
758
815
  var e = t.effects;
759
816
  if (e !== null) {
760
817
  t.effects = null;
761
- for (var o = 0; o < e.length; o += 1) z(e[o]);
818
+ for (var o = 0; o < e.length; o += 1) H(e[o]);
762
819
  }
763
820
  }
764
- function ss(t) {
765
- for (var e = t.parent; e !== null; ) {
766
- if (!(e.f & 2)) return e.f & 16384 ? null : e;
767
- e = e.parent;
768
- }
769
- return null;
770
- }
771
- function en(t) {
772
- var e, o = k;
773
- yt(ss(t));
821
+ function un(t) {
822
+ var e, o = S, n = t.parent;
823
+ if (!Ot && n !== null && n.f & 24576) return Br(), t.v;
824
+ $t(n);
774
825
  try {
775
- t.f &= ~Re, rs(t), e = Bi(t);
826
+ t.f &= ~We, hs(t), e = Ji(t);
776
827
  } finally {
777
- yt(o);
828
+ $t(o);
778
829
  }
779
830
  return e;
780
831
  }
781
- function Si(t) {
782
- var e = t.v, o = en(t);
783
- if (!t.equals(o) && (t.wv = Di(), (!M?.is_fork || t.deps === null) && (t.v = o, M?.capture(t, e), t.deps === null))) {
784
- N(t, et);
832
+ function _i(t) {
833
+ var e = un(t);
834
+ if (!t.equals(e) && (t.wv = Ui(), (!x?.is_fork || t.deps === null) && (x !== null ? x.capture(t, e, !0) : t.v = e, t.deps === null))) {
835
+ N(t, nt);
785
836
  return;
786
837
  }
787
- Ht || (F !== null ? (rn() || M?.is_fork) && F.set(t, o) : Zo(t));
838
+ Ot || (q !== null ? (fn() || x?.is_fork) && q.set(t, e) : on(t));
788
839
  }
789
- function ls(t) {
790
- if (t.effects !== null) for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(_t), e.teardown = wr, e.ac = null, Pe(e, 0), an(e));
840
+ function fs(t) {
841
+ if (t.effects !== null) for (const e of t.effects) (e.teardown || e.ac) && (e.teardown?.(), e.ac?.abort(Mt), e.teardown = Sr, e.ac = null, Ne(e, 0), gn(e));
791
842
  }
792
- function $i(t) {
793
- if (t.effects !== null) for (const e of t.effects) e.teardown && be(e);
843
+ function Ci(t) {
844
+ if (t.effects !== null) for (const e of t.effects) e.teardown && we(e);
794
845
  }
795
- var Ho = /* @__PURE__ */ new Set(), jt = /* @__PURE__ */ new Map(), ki = !1;
796
- function oe(t, e) {
846
+ var Uo = /* @__PURE__ */ new Set(), ee = /* @__PURE__ */ new Map(), Ei = !1;
847
+ function ie(t, e) {
797
848
  return {
798
849
  f: 0,
799
850
  v: t,
800
851
  reactions: null,
801
- equals: ni,
852
+ equals: ci,
802
853
  rv: 0,
803
854
  wv: 0
804
855
  };
805
856
  }
806
857
  // @__NO_SIDE_EFFECTS__
807
858
  function V(t, e) {
808
- const o = oe(t, e);
809
- return zi(o), o;
859
+ const o = ie(t, e);
860
+ return Fi(o), o;
810
861
  }
811
862
  // @__NO_SIDE_EFFECTS__
812
- function Ai(t, e = !1, o = !0) {
813
- const n = oe(t);
814
- if (e || (n.equals = ii), bo && o && W !== null && W.l !== null) {
863
+ function Mi(t, e = !1, o = !0) {
864
+ const n = ie(t);
865
+ if (e || (n.equals = ui), To && o && j !== null && j.l !== null) {
815
866
  var i;
816
- ((i = W.l).s ?? (i.s = [])).push(n);
867
+ ((i = j.l).s ?? (i.s = [])).push(n);
817
868
  }
818
869
  return n;
819
870
  }
820
- function _(t, e, o = !1) {
821
- return A !== null && (!dt || A.f & 131072) && Ne() && A.f & 4325394 && (tt === null || !pe.call(tt, t)) && Vr(), me(t, o ? Kt(e) : e, co);
871
+ function C(t, e, o = !1) {
872
+ return _ !== null && (!ht || _.f & 131072) && Ve() && _.f & 4325394 && (ot === null || !ve.call(ot, t)) && Hr(), ye(t, o ? Jt(e) : e, fo);
822
873
  }
823
- function me(t, e, o = null) {
874
+ function ye(t, e, o = null) {
824
875
  if (!t.equals(e)) {
825
- var n = t.v;
826
- Ht ? jt.set(t, e) : jt.set(t, n), t.v = e;
827
- var i = re.ensure();
828
- if (i.capture(t, n), t.f & 2) {
829
- const r = t;
830
- t.f & 2048 && en(r), F === null && Zo(r);
876
+ ee.set(t, Ot ? e : t.v);
877
+ var n = ae.ensure();
878
+ if (n.capture(t, e), t.f & 2) {
879
+ const i = t;
880
+ t.f & 2048 && un(i), q === null && on(i);
831
881
  }
832
- t.wv = Di(), xi(t, wt, o), Ne() && k !== null && k.f & 1024 && !(k.f & 96) && (Q === null ? bs([t]) : Q.push(t)), !i.is_fork && Ho.size > 0 && !ki && as();
882
+ t.wv = Ui(), Li(t, vt, o), Ve() && S !== null && S.f & 1024 && !(S.f & 96) && (tt === null ? $s([t]) : tt.push(t)), !n.is_fork && Uo.size > 0 && !Ei && ps();
833
883
  }
834
884
  return e;
835
885
  }
836
- function as() {
837
- ki = !1;
838
- for (const t of Ho) t.f & 1024 && N(t, ie), Ve(t) && be(t);
839
- Ho.clear();
886
+ function ps() {
887
+ Ei = !1;
888
+ for (const t of Uo) t.f & 1024 && N(t, se), je(t) && we(t);
889
+ Uo.clear();
840
890
  }
841
- function Me(t) {
842
- _(t, t.v + 1);
891
+ function Oe(t) {
892
+ C(t, t.v + 1);
843
893
  }
844
- function xi(t, e, o) {
894
+ function Li(t, e, o) {
845
895
  var n = t.reactions;
846
- if (n !== null) for (var i = Ne(), r = n.length, s = 0; s < r; s++) {
847
- var l = n[s], a = l.f;
848
- if (!(!i && l === k)) {
849
- var c = (a & wt) === 0;
850
- if (c && N(l, e), a & 2) {
851
- var d = l;
852
- F?.delete(d), a & 65536 || (a & 512 && (l.f |= Re), xi(d, ie, o));
853
- } else if (c) {
854
- var f = l;
855
- a & 16 && bt !== null && bt.add(f), o !== null ? o.push(f) : Yo(f);
896
+ if (n !== null) for (var i = Ve(), r = n.length, s = 0; s < r; s++) {
897
+ var a = n[s], u = a.f;
898
+ if (!(!i && a === S)) {
899
+ var l = (u & vt) === 0;
900
+ if (l && N(a, e), u & 2) {
901
+ var d = a;
902
+ q?.delete(d), u & 65536 || (u & 512 && (a.f |= We), Li(d, se, o));
903
+ } else if (l) {
904
+ var h = a;
905
+ u & 16 && wt !== null && wt.add(h), o !== null ? o.push(h) : an(h);
856
906
  }
857
907
  }
858
908
  }
859
909
  }
860
- function Kt(t) {
861
- if (typeof t != "object" || t === null || Ce in t) return t;
862
- const e = Qn(t);
863
- if (e !== br && e !== yr) return t;
864
- var o = /* @__PURE__ */ new Map(), n = Yn(t), i = /* @__PURE__ */ V(0), r = null, s = te, l = (a) => {
865
- if (te === s) return a();
866
- var c = A, d = te;
867
- nt(null), On(s);
868
- var f = a();
869
- return nt(c), On(d), f;
910
+ function Jt(t) {
911
+ if (typeof t != "object" || t === null || Le in t) return t;
912
+ const e = ri(t);
913
+ if (e !== kr && e !== $r) return t;
914
+ var o = /* @__PURE__ */ new Map(), n = ii(t), i = /* @__PURE__ */ V(0), r = null, s = oe, a = (u) => {
915
+ if (oe === s) return u();
916
+ var l = _, d = oe;
917
+ rt(null), jn(s);
918
+ var h = u();
919
+ return rt(l), jn(d), h;
870
920
  };
871
921
  return n && o.set("length", /* @__PURE__ */ V(t.length, r)), new Proxy(t, {
872
- defineProperty(a, c, d) {
873
- (!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && Rr();
874
- var f = o.get(c);
875
- return f === void 0 ? l(() => {
876
- var h = /* @__PURE__ */ V(d.value, r);
877
- return o.set(c, h), h;
878
- }) : _(f, d.value, !0), !0;
922
+ defineProperty(u, l, d) {
923
+ (!("value" in d) || d.configurable === !1 || d.enumerable === !1 || d.writable === !1) && zr();
924
+ var h = o.get(l);
925
+ return h === void 0 ? a(() => {
926
+ var f = /* @__PURE__ */ V(d.value, r);
927
+ return o.set(l, f), f;
928
+ }) : C(h, d.value, !0), !0;
879
929
  },
880
- deleteProperty(a, c) {
881
- var d = o.get(c);
930
+ deleteProperty(u, l) {
931
+ var d = o.get(l);
882
932
  if (d === void 0) {
883
- if (c in a) {
884
- const f = l(() => /* @__PURE__ */ V(j, r));
885
- o.set(c, f), Me(i);
933
+ if (l in u) {
934
+ const h = a(() => /* @__PURE__ */ V(W, r));
935
+ o.set(l, h), Oe(i);
886
936
  }
887
- } else _(d, j), Me(i);
937
+ } else C(d, W), Oe(i);
888
938
  return !0;
889
939
  },
890
- get(a, c, d) {
891
- if (c === Ce) return t;
892
- var f = o.get(c), h = c in a;
893
- if (f === void 0 && (!h || Zt(a, c)?.writable) && (f = l(() => /* @__PURE__ */ V(Kt(h ? a[c] : j), r)), o.set(c, f)), f !== void 0) {
894
- var v = g(f);
895
- return v === j ? void 0 : v;
940
+ get(u, l, d) {
941
+ if (l === Le) return t;
942
+ var h = o.get(l), f = l in u;
943
+ if (h === void 0 && (!f || Yt(u, l)?.writable) && (h = a(() => /* @__PURE__ */ V(Jt(f ? u[l] : W), r)), o.set(l, h)), h !== void 0) {
944
+ var v = g(h);
945
+ return v === W ? void 0 : v;
896
946
  }
897
- return Reflect.get(a, c, d);
947
+ return Reflect.get(u, l, d);
898
948
  },
899
- getOwnPropertyDescriptor(a, c) {
900
- var d = Reflect.getOwnPropertyDescriptor(a, c);
949
+ getOwnPropertyDescriptor(u, l) {
950
+ var d = Reflect.getOwnPropertyDescriptor(u, l);
901
951
  if (d && "value" in d) {
902
- var f = o.get(c);
903
- f && (d.value = g(f));
952
+ var h = o.get(l);
953
+ h && (d.value = g(h));
904
954
  } else if (d === void 0) {
905
- var h = o.get(c), v = h?.v;
906
- if (h !== void 0 && v !== j) return {
955
+ var f = o.get(l), v = f?.v;
956
+ if (f !== void 0 && v !== W) return {
907
957
  enumerable: !0,
908
958
  configurable: !0,
909
959
  value: v,
@@ -912,142 +962,142 @@ function Kt(t) {
912
962
  }
913
963
  return d;
914
964
  },
915
- has(a, c) {
916
- if (c === Ce) return !0;
917
- var d = o.get(c), f = d !== void 0 && d.v !== j || Reflect.has(a, c);
918
- return (d !== void 0 || k !== null && (!f || Zt(a, c)?.writable)) && (d === void 0 && (d = l(() => /* @__PURE__ */ V(f ? Kt(a[c]) : j, r)), o.set(c, d)), g(d) === j) ? !1 : f;
965
+ has(u, l) {
966
+ if (l === Le) return !0;
967
+ var d = o.get(l), h = d !== void 0 && d.v !== W || Reflect.has(u, l);
968
+ return (d !== void 0 || S !== null && (!h || Yt(u, l)?.writable)) && (d === void 0 && (d = a(() => /* @__PURE__ */ V(h ? Jt(u[l]) : W, r)), o.set(l, d)), g(d) === W) ? !1 : h;
919
969
  },
920
- set(a, c, d, f) {
921
- var h = o.get(c), v = c in a;
922
- if (n && c === "length") for (var m = d; m < h.v; m += 1) {
923
- var S = o.get(m + "");
924
- S !== void 0 ? _(S, j) : m in a && (S = l(() => /* @__PURE__ */ V(j, r)), o.set(m + "", S));
970
+ set(u, l, d, h) {
971
+ var f = o.get(l), v = l in u;
972
+ if (n && l === "length") for (var m = d; m < f.v; m += 1) {
973
+ var k = o.get(m + "");
974
+ k !== void 0 ? C(k, W) : m in u && (k = a(() => /* @__PURE__ */ V(W, r)), o.set(m + "", k));
925
975
  }
926
- if (h === void 0) (!v || Zt(a, c)?.writable) && (h = l(() => /* @__PURE__ */ V(void 0, r)), _(h, Kt(d)), o.set(c, h));
976
+ if (f === void 0) (!v || Yt(u, l)?.writable) && (f = a(() => /* @__PURE__ */ V(void 0, r)), C(f, Jt(d)), o.set(l, f));
927
977
  else {
928
- v = h.v !== j;
929
- var p = l(() => Kt(d));
930
- _(h, p);
978
+ v = f.v !== W;
979
+ var p = a(() => Jt(d));
980
+ C(f, p);
931
981
  }
932
- var w = Reflect.getOwnPropertyDescriptor(a, c);
933
- if (w?.set && w.set.call(f, d), !v) {
934
- if (n && typeof c == "string") {
935
- var R = o.get("length"), x = Number(c);
936
- Number.isInteger(x) && x >= R.v && _(R, x + 1);
982
+ var w = Reflect.getOwnPropertyDescriptor(u, l);
983
+ if (w?.set && w.set.call(h, d), !v) {
984
+ if (n && typeof l == "string") {
985
+ var R = o.get("length"), A = Number(l);
986
+ Number.isInteger(A) && A >= R.v && C(R, A + 1);
937
987
  }
938
- Me(i);
988
+ Oe(i);
939
989
  }
940
990
  return !0;
941
991
  },
942
- ownKeys(a) {
992
+ ownKeys(u) {
943
993
  g(i);
944
- var c = Reflect.ownKeys(a).filter((h) => {
945
- var v = o.get(h);
946
- return v === void 0 || v.v !== j;
994
+ var l = Reflect.ownKeys(u).filter((f) => {
995
+ var v = o.get(f);
996
+ return v === void 0 || v.v !== W;
947
997
  });
948
- for (var [d, f] of o) f.v !== j && !(d in a) && c.push(d);
949
- return c;
998
+ for (var [d, h] of o) h.v !== W && !(d in u) && l.push(d);
999
+ return l;
950
1000
  },
951
1001
  setPrototypeOf() {
952
- Nr();
1002
+ qr();
953
1003
  }
954
1004
  });
955
1005
  }
956
- var En, _i, Ci, Ei;
957
- function Do() {
958
- if (En === void 0) {
959
- En = window, _i = /Firefox/.test(navigator.userAgent);
1006
+ var Nn, Pi, Oi, Ri;
1007
+ function Ko() {
1008
+ if (Nn === void 0) {
1009
+ Nn = window, Pi = /Firefox/.test(navigator.userAgent);
960
1010
  var t = Element.prototype, e = Node.prototype, o = Text.prototype;
961
- Ci = Zt(e, "firstChild").get, Ei = Zt(e, "nextSibling").get, In(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), In(o) && (o.__t = void 0);
1011
+ Oi = Yt(e, "firstChild").get, Ri = Yt(e, "nextSibling").get, En(t) && (t.__click = void 0, t.__className = void 0, t.__attributes = null, t.__style = void 0, t.__e = void 0), En(o) && (o.__t = void 0);
962
1012
  }
963
1013
  }
964
- function ht(t = "") {
1014
+ function pt(t = "") {
965
1015
  return document.createTextNode(t);
966
1016
  }
967
1017
  // @__NO_SIDE_EFFECTS__
968
- function ne(t) {
969
- return Ci.call(t);
1018
+ function re(t) {
1019
+ return Oi.call(t);
970
1020
  }
971
1021
  // @__NO_SIDE_EFFECTS__
972
- function Tt(t) {
973
- return Ei.call(t);
1022
+ function St(t) {
1023
+ return Ri.call(t);
974
1024
  }
975
- function Ue(t, e) {
976
- if (!L) return /* @__PURE__ */ ne(t);
977
- var o = /* @__PURE__ */ ne(E);
978
- if (o === null) o = E.appendChild(ht());
1025
+ function Je(t, e) {
1026
+ if (!P) return /* @__PURE__ */ re(t);
1027
+ var o = /* @__PURE__ */ re(L);
1028
+ if (o === null) o = L.appendChild(pt());
979
1029
  else if (e && o.nodeType !== 3) {
980
- var n = ht();
981
- return o?.before(n), G(n), n;
1030
+ var n = pt();
1031
+ return o?.before(n), U(n), n;
982
1032
  }
983
- return e && nn(o), G(o), o;
1033
+ return e && hn(o), U(o), o;
984
1034
  }
985
- function Ao(t, e = !1) {
986
- if (!L) {
987
- var o = /* @__PURE__ */ ne(t);
988
- return o instanceof Comment && o.data === "" ? /* @__PURE__ */ Tt(o) : o;
1035
+ function _o(t, e = !1) {
1036
+ if (!P) {
1037
+ var o = /* @__PURE__ */ re(t);
1038
+ return o instanceof Comment && o.data === "" ? /* @__PURE__ */ St(o) : o;
989
1039
  }
990
1040
  if (e) {
991
- if (E?.nodeType !== 3) {
992
- var n = ht();
993
- return E?.before(n), G(n), n;
1041
+ if (L?.nodeType !== 3) {
1042
+ var n = pt();
1043
+ return L?.before(n), U(n), n;
994
1044
  }
995
- nn(E);
1045
+ hn(L);
996
1046
  }
997
- return E;
1047
+ return L;
998
1048
  }
999
- function Mt(t, e = 1, o = !1) {
1000
- let n = L ? E : t;
1001
- for (var i; e--; ) i = n, n = /* @__PURE__ */ Tt(n);
1002
- if (!L) return n;
1049
+ function Rt(t, e = 1, o = !1) {
1050
+ let n = P ? L : t;
1051
+ for (var i; e--; ) i = n, n = /* @__PURE__ */ St(n);
1052
+ if (!P) return n;
1003
1053
  if (o) {
1004
1054
  if (n?.nodeType !== 3) {
1005
- var r = ht();
1006
- return n === null ? i?.after(r) : n.before(r), G(r), r;
1055
+ var r = pt();
1056
+ return n === null ? i?.after(r) : n.before(r), U(r), r;
1007
1057
  }
1008
- nn(n);
1058
+ hn(n);
1009
1059
  }
1010
- return G(n), n;
1060
+ return U(n), n;
1011
1061
  }
1012
- function Mi(t) {
1062
+ function Ni(t) {
1013
1063
  t.textContent = "";
1014
1064
  }
1015
- function Li() {
1016
- return !zt || bt !== null ? !1 : (k.f & Ko) !== 0;
1065
+ function Wi() {
1066
+ return !Pt || wt !== null ? !1 : (S.f & tn) !== 0;
1017
1067
  }
1018
- function on(t, e, o) {
1068
+ function dn(t, e, o) {
1019
1069
  let n = o ? { is: o } : void 0;
1020
1070
  return document.createElementNS(e ?? "http://www.w3.org/1999/xhtml", t, n);
1021
1071
  }
1022
- function nn(t) {
1072
+ function hn(t) {
1023
1073
  if (t.nodeValue.length < 65536) return;
1024
1074
  let e = t.nextSibling;
1025
1075
  for (; e !== null && e.nodeType === 3; ) e.remove(), t.nodeValue += e.nodeValue, e = t.nextSibling;
1026
1076
  }
1027
- function Oi(t) {
1028
- var e = A, o = k;
1029
- nt(null), yt(null);
1077
+ function Vi(t) {
1078
+ var e = _, o = S;
1079
+ rt(null), $t(null);
1030
1080
  try {
1031
1081
  return t();
1032
1082
  } finally {
1033
- nt(e), yt(o);
1083
+ rt(e), $t(o);
1034
1084
  }
1035
1085
  }
1036
- function cs(t) {
1037
- k === null && (A === null && Mr(t), Er()), Ht && Cr(t);
1086
+ function vs(t) {
1087
+ S === null && (_ === null && Nr(t), Rr()), Ot && Or(t);
1038
1088
  }
1039
- function us(t, e) {
1089
+ function gs(t, e) {
1040
1090
  var o = e.last;
1041
1091
  o === null ? e.last = e.first = t : (o.next = t, t.prev = o, e.last = t);
1042
1092
  }
1043
- function It(t, e) {
1044
- var o = k;
1045
- o !== null && o.f & 8192 && (t |= Uo);
1093
+ function At(t, e) {
1094
+ var o = S;
1095
+ o !== null && o.f & 8192 && (t |= Qo);
1046
1096
  var n = {
1047
- ctx: W,
1097
+ ctx: j,
1048
1098
  deps: null,
1049
1099
  nodes: null,
1050
- f: t | wt | 512,
1100
+ f: t | vt | 512,
1051
1101
  first: null,
1052
1102
  fn: e,
1053
1103
  last: null,
@@ -1058,385 +1108,391 @@ function It(t, e) {
1058
1108
  teardown: null,
1059
1109
  wv: 0,
1060
1110
  ac: null
1061
- }, i = n;
1062
- if (t & 4) ge !== null ? ge.push(n) : re.ensure().schedule(n);
1111
+ };
1112
+ x?.register_created_effect(n);
1113
+ var i = n;
1114
+ if (t & 4) me !== null ? me.push(n) : ae.ensure().schedule(n);
1063
1115
  else if (e !== null) {
1064
1116
  try {
1065
- be(n);
1117
+ we(n);
1066
1118
  } catch (s) {
1067
- throw z(n), s;
1119
+ throw H(n), s;
1068
1120
  }
1069
- i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, t & 16 && t & 65536 && i !== null && (i.f |= Jo));
1121
+ i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && !(i.f & 524288) && (i = i.first, t & 16 && t & 65536 && i !== null && (i.f |= en));
1070
1122
  }
1071
- if (i !== null && (i.parent = o, o !== null && us(i, o), A !== null && A.f & 2 && !(t & 64))) {
1072
- var r = A;
1123
+ if (i !== null && (i.parent = o, o !== null && gs(i, o), _ !== null && _.f & 2 && !(t & 64))) {
1124
+ var r = _;
1073
1125
  (r.effects ?? (r.effects = [])).push(i);
1074
1126
  }
1075
1127
  return n;
1076
1128
  }
1077
- function rn() {
1078
- return A !== null && !dt;
1129
+ function fn() {
1130
+ return _ !== null && !ht;
1079
1131
  }
1080
- function ds(t) {
1081
- const e = It(8, null);
1082
- return N(e, et), e.teardown = t, e;
1132
+ function ms(t) {
1133
+ const e = At(8, null);
1134
+ return N(e, nt), e.teardown = t, e;
1083
1135
  }
1084
- function Mn(t) {
1085
- cs("$effect");
1086
- var e = k.f;
1087
- if (!A && e & 32 && !(e & 32768)) {
1088
- var o = W;
1136
+ function Wn(t) {
1137
+ vs("$effect");
1138
+ var e = S.f;
1139
+ if (!_ && e & 32 && !(e & 32768)) {
1140
+ var o = j;
1089
1141
  (o.e ?? (o.e = [])).push(t);
1090
- } else return Pi(t);
1142
+ } else return ji(t);
1091
1143
  }
1092
- function Pi(t) {
1093
- return It(4 | Sr, t);
1144
+ function ji(t) {
1145
+ return At(4 | _r, t);
1094
1146
  }
1095
- function hs(t) {
1096
- re.ensure();
1097
- const e = It(64 | ye, t);
1147
+ function bs(t) {
1148
+ ae.ensure();
1149
+ const e = At(64 | Te, t);
1098
1150
  return () => {
1099
- z(e);
1151
+ H(e);
1100
1152
  };
1101
1153
  }
1102
- function fs(t) {
1103
- re.ensure();
1104
- const e = It(64 | ye, t);
1154
+ function ys(t) {
1155
+ ae.ensure();
1156
+ const e = At(64 | Te, t);
1105
1157
  return (o = {}) => new Promise((n) => {
1106
- o.outro ? se(e, () => {
1107
- z(e), n(void 0);
1108
- }) : (z(e), n(void 0));
1158
+ o.outro ? le(e, () => {
1159
+ H(e), n(void 0);
1160
+ }) : (H(e), n(void 0));
1109
1161
  });
1110
1162
  }
1111
- function Ri(t) {
1112
- return It(4, t);
1163
+ function zi(t) {
1164
+ return At(4, t);
1113
1165
  }
1114
- function ps(t) {
1115
- return It($r | ye, t);
1166
+ function ws(t) {
1167
+ return At(Cr | Te, t);
1116
1168
  }
1117
- function sn(t, e = 0) {
1118
- return It(8 | e, t);
1169
+ function pn(t, e = 0) {
1170
+ return At(8 | e, t);
1119
1171
  }
1120
- function Ke(t, e = [], o = [], n = []) {
1121
- os(n, e, o, (i) => {
1122
- It(8, () => t(...i.map(g)));
1172
+ function Ze(t, e = [], o = [], n = []) {
1173
+ cs(n, e, o, (i) => {
1174
+ At(8, () => t(...i.map(g)));
1123
1175
  });
1124
1176
  }
1125
- function ln(t, e = 0) {
1126
- return It(16 | e, t);
1177
+ function vn(t, e = 0) {
1178
+ return At(16 | e, t);
1127
1179
  }
1128
- function ot(t) {
1129
- return It(32 | ye, t);
1180
+ function it(t) {
1181
+ return At(32 | Te, t);
1130
1182
  }
1131
- function Ni(t) {
1183
+ function qi(t) {
1132
1184
  var e = t.teardown;
1133
1185
  if (e !== null) {
1134
- const o = Ht, n = A;
1135
- Ln(!0), nt(null);
1186
+ const o = Ot, n = _;
1187
+ Vn(!0), rt(null);
1136
1188
  try {
1137
1189
  e.call(null);
1138
1190
  } finally {
1139
- Ln(o), nt(n);
1191
+ Vn(o), rt(n);
1140
1192
  }
1141
1193
  }
1142
1194
  }
1143
- function an(t, e = !1) {
1195
+ function gn(t, e = !1) {
1144
1196
  var o = t.first;
1145
1197
  for (t.first = t.last = null; o !== null; ) {
1146
1198
  const i = o.ac;
1147
- i !== null && Oi(() => {
1148
- i.abort(_t);
1199
+ i !== null && Vi(() => {
1200
+ i.abort(Mt);
1149
1201
  });
1150
1202
  var n = o.next;
1151
- o.f & 64 ? o.parent = null : z(o, e), o = n;
1203
+ o.f & 64 ? o.parent = null : H(o, e), o = n;
1152
1204
  }
1153
1205
  }
1154
- function vs(t) {
1206
+ function Ts(t) {
1155
1207
  for (var e = t.first; e !== null; ) {
1156
1208
  var o = e.next;
1157
- e.f & 32 || z(e), e = o;
1209
+ e.f & 32 || H(e), e = o;
1158
1210
  }
1159
1211
  }
1160
- function z(t, e = !0) {
1212
+ function H(t, e = !0) {
1161
1213
  var o = !1;
1162
- (e || t.f & 262144) && t.nodes !== null && t.nodes.end !== null && (gs(t.nodes.start, t.nodes.end), o = !0), N(t, Sn), an(t, e && !o), Pe(t, 0);
1214
+ (e || t.f & 262144) && t.nodes !== null && t.nodes.end !== null && (Is(t.nodes.start, t.nodes.end), o = !0), N(t, Mn), gn(t, e && !o), Ne(t, 0);
1163
1215
  var n = t.nodes && t.nodes.t;
1164
1216
  if (n !== null) for (const r of n) r.stop();
1165
- Ni(t), t.f ^= Sn, t.f |= Ir;
1217
+ qi(t), t.f ^= Mn, t.f |= xr;
1166
1218
  var i = t.parent;
1167
- i !== null && i.first !== null && Vi(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = null;
1219
+ i !== null && i.first !== null && Hi(t), t.next = t.prev = t.teardown = t.ctx = t.deps = t.fn = t.nodes = t.ac = t.b = null;
1168
1220
  }
1169
- function gs(t, e) {
1221
+ function Is(t, e) {
1170
1222
  for (; t !== null; ) {
1171
- var o = t === e ? null : /* @__PURE__ */ Tt(t);
1223
+ var o = t === e ? null : /* @__PURE__ */ St(t);
1172
1224
  t.remove(), t = o;
1173
1225
  }
1174
1226
  }
1175
- function Vi(t) {
1227
+ function Hi(t) {
1176
1228
  var e = t.parent, o = t.prev, n = t.next;
1177
1229
  o !== null && (o.next = n), n !== null && (n.prev = o), e !== null && (e.first === t && (e.first = n), e.last === t && (e.last = o));
1178
1230
  }
1179
- function se(t, e, o = !0) {
1231
+ function le(t, e, o = !0) {
1180
1232
  var n = [];
1181
- Wi(t, n, !0);
1233
+ Di(t, n, !0);
1182
1234
  var i = () => {
1183
- o && z(t), e && e();
1235
+ o && H(t), e && e();
1184
1236
  }, r = n.length;
1185
1237
  if (r > 0) {
1186
1238
  var s = () => --r || i();
1187
- for (var l of n) l.out(s);
1239
+ for (var a of n) a.out(s);
1188
1240
  } else i();
1189
1241
  }
1190
- function Wi(t, e, o) {
1242
+ function Di(t, e, o) {
1191
1243
  if (!(t.f & 8192)) {
1192
- t.f ^= Uo;
1244
+ t.f ^= Qo;
1193
1245
  var n = t.nodes && t.nodes.t;
1194
- if (n !== null) for (const l of n) (l.is_global || o) && e.push(l);
1246
+ if (n !== null) for (const a of n) (a.is_global || o) && e.push(a);
1195
1247
  for (var i = t.first; i !== null; ) {
1196
- var r = i.next, s = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (t.f & 16) !== 0;
1197
- Wi(i, e, s ? o : !1), i = r;
1248
+ var r = i.next;
1249
+ if (!(i.f & 64)) {
1250
+ var s = (i.f & 65536) !== 0 || (i.f & 32) !== 0 && (t.f & 16) !== 0;
1251
+ Di(i, e, s ? o : !1);
1252
+ }
1253
+ i = r;
1198
1254
  }
1199
1255
  }
1200
1256
  }
1201
- function cn(t) {
1202
- ji(t, !0);
1257
+ function mn(t) {
1258
+ Bi(t, !0);
1203
1259
  }
1204
- function ji(t, e) {
1260
+ function Bi(t, e) {
1205
1261
  if (t.f & 8192) {
1206
- t.f ^= Uo, t.f & 1024 || (N(t, wt), re.ensure().schedule(t));
1262
+ t.f ^= Qo, t.f & 1024 || (N(t, vt), ae.ensure().schedule(t));
1207
1263
  for (var o = t.first; o !== null; ) {
1208
1264
  var n = o.next, i = (o.f & 65536) !== 0 || (o.f & 32) !== 0;
1209
- ji(o, i ? e : !1), o = n;
1265
+ Bi(o, i ? e : !1), o = n;
1210
1266
  }
1211
1267
  var r = t.nodes && t.nodes.t;
1212
1268
  if (r !== null) for (const s of r) (s.is_global || e) && s.in();
1213
1269
  }
1214
1270
  }
1215
- function un(t, e) {
1271
+ function bn(t, e) {
1216
1272
  if (t.nodes) for (var o = t.nodes.start, n = t.nodes.end; o !== null; ) {
1217
- var i = o === n ? null : /* @__PURE__ */ Tt(o);
1273
+ var i = o === n ? null : /* @__PURE__ */ St(o);
1218
1274
  e.append(o), o = i;
1219
1275
  }
1220
1276
  }
1221
- var ms = null, Qe = !1, Ht = !1;
1222
- function Ln(t) {
1223
- Ht = t;
1277
+ var ks = null, oo = !1, Ot = !1;
1278
+ function Vn(t) {
1279
+ Ot = t;
1224
1280
  }
1225
- var A = null, dt = !1;
1226
- function nt(t) {
1227
- A = t;
1281
+ var _ = null, ht = !1;
1282
+ function rt(t) {
1283
+ _ = t;
1228
1284
  }
1229
- var k = null;
1230
- function yt(t) {
1231
- k = t;
1285
+ var S = null;
1286
+ function $t(t) {
1287
+ S = t;
1232
1288
  }
1233
- var tt = null;
1234
- function zi(t) {
1235
- A !== null && (!zt || A.f & 2) && (tt === null ? tt = [t] : tt.push(t));
1289
+ var ot = null;
1290
+ function Fi(t) {
1291
+ _ !== null && (!Pt || _.f & 2) && (ot === null ? ot = [t] : ot.push(t));
1236
1292
  }
1237
- var B = null, Z = 0, Q = null;
1238
- function bs(t) {
1239
- Q = t;
1293
+ var G = null, Y = 0, tt = null;
1294
+ function $s(t) {
1295
+ tt = t;
1240
1296
  }
1241
- var Hi = 1, Jt = 0, te = Jt;
1242
- function On(t) {
1243
- te = t;
1297
+ var Gi = 1, Zt = 0, oe = Zt;
1298
+ function jn(t) {
1299
+ oe = t;
1244
1300
  }
1245
- function Di() {
1246
- return ++Hi;
1301
+ function Ui() {
1302
+ return ++Gi;
1247
1303
  }
1248
- function Ve(t) {
1304
+ function je(t) {
1249
1305
  var e = t.f;
1250
1306
  if (e & 2048) return !0;
1251
- if (e & 2 && (t.f &= ~Re), e & 4096) {
1307
+ if (e & 2 && (t.f &= ~We), e & 4096) {
1252
1308
  for (var o = t.deps, n = o.length, i = 0; i < n; i++) {
1253
1309
  var r = o[i];
1254
- if (Ve(r) && Si(r), r.wv > t.wv) return !0;
1310
+ if (je(r) && _i(r), r.wv > t.wv) return !0;
1255
1311
  }
1256
- e & 512 && F === null && N(t, et);
1312
+ e & 512 && q === null && N(t, nt);
1257
1313
  }
1258
1314
  return !1;
1259
1315
  }
1260
- function qi(t, e, o = !0) {
1316
+ function Ki(t, e, o = !0) {
1261
1317
  var n = t.reactions;
1262
- if (n !== null && !(!zt && tt !== null && pe.call(tt, t))) for (var i = 0; i < n.length; i++) {
1318
+ if (n !== null && !(!Pt && ot !== null && ve.call(ot, t))) for (var i = 0; i < n.length; i++) {
1263
1319
  var r = n[i];
1264
- r.f & 2 ? qi(r, e, !1) : e === r && (o ? N(r, wt) : r.f & 1024 && N(r, ie), Yo(r));
1320
+ r.f & 2 ? Ki(r, e, !1) : e === r && (o ? N(r, vt) : r.f & 1024 && N(r, se), an(r));
1265
1321
  }
1266
1322
  }
1267
- function Bi(t) {
1268
- var e = B, o = Z, n = Q, i = A, r = tt, s = W, l = dt, a = te, c = t.f;
1269
- B = null, Z = 0, Q = null, A = c & 96 ? null : t, tt = null, ve(t.ctx), dt = !1, te = ++Jt, t.ac !== null && (Oi(() => {
1270
- t.ac.abort(_t);
1323
+ function Ji(t) {
1324
+ var e = G, o = Y, n = tt, i = _, r = ot, s = j, a = ht, u = oe, l = t.f;
1325
+ G = null, Y = 0, tt = null, _ = l & 96 ? null : t, ot = null, ge(t.ctx), ht = !1, oe = ++Zt, t.ac !== null && (Vi(() => {
1326
+ t.ac.abort(Mt);
1271
1327
  }), t.ac = null);
1272
1328
  try {
1273
- t.f |= $n;
1274
- var d = t.fn, f = d();
1275
- t.f |= Ko;
1276
- var h = t.deps, v = M?.is_fork;
1277
- if (B !== null) {
1329
+ t.f |= Ln;
1330
+ var d = t.fn, h = d();
1331
+ t.f |= tn;
1332
+ var f = t.deps, v = x?.is_fork;
1333
+ if (G !== null) {
1278
1334
  var m;
1279
- if (v || Pe(t, Z), h !== null && Z > 0) for (h.length = Z + B.length, m = 0; m < B.length; m++) h[Z + m] = B[m];
1280
- else t.deps = h = B;
1281
- if (rn() && t.f & 512) for (m = Z; m < h.length; m++) {
1282
- var S;
1283
- ((S = h[m]).reactions ?? (S.reactions = [])).push(t);
1335
+ if (v || Ne(t, Y), f !== null && Y > 0) for (f.length = Y + G.length, m = 0; m < G.length; m++) f[Y + m] = G[m];
1336
+ else t.deps = f = G;
1337
+ if (fn() && t.f & 512) for (m = Y; m < f.length; m++) {
1338
+ var k;
1339
+ ((k = f[m]).reactions ?? (k.reactions = [])).push(t);
1284
1340
  }
1285
- } else !v && h !== null && Z < h.length && (Pe(t, Z), h.length = Z);
1286
- if (Ne() && Q !== null && !dt && h !== null && !(t.f & 6146)) for (m = 0; m < Q.length; m++) qi(Q[m], t);
1341
+ } else !v && f !== null && Y < f.length && (Ne(t, Y), f.length = Y);
1342
+ if (Ve() && tt !== null && !ht && f !== null && !(t.f & 6146)) for (m = 0; m < tt.length; m++) Ki(tt[m], t);
1287
1343
  if (i !== null && i !== t) {
1288
- if (Jt++, i.deps !== null) for (let p = 0; p < o; p += 1) i.deps[p].rv = Jt;
1289
- if (e !== null) for (const p of e) p.rv = Jt;
1290
- Q !== null && (n === null ? n = Q : n.push(...Q));
1344
+ if (Zt++, i.deps !== null) for (let p = 0; p < o; p += 1) i.deps[p].rv = Zt;
1345
+ if (e !== null) for (const p of e) p.rv = Zt;
1346
+ tt !== null && (n === null ? n = tt : n.push(...tt));
1291
1347
  }
1292
- return t.f & 8388608 && (t.f ^= lo), f;
1348
+ return t.f & 8388608 && (t.f ^= uo), h;
1293
1349
  } catch (p) {
1294
- return ai(p);
1350
+ return pi(p);
1295
1351
  } finally {
1296
- t.f ^= $n, B = e, Z = o, Q = n, A = i, tt = r, ve(s), dt = l, te = a;
1352
+ t.f ^= Ln, G = e, Y = o, tt = n, _ = i, ot = r, ge(s), ht = a, oe = u;
1297
1353
  }
1298
1354
  }
1299
- function ys(t, e) {
1355
+ function Ss(t, e) {
1300
1356
  let o = e.reactions;
1301
1357
  if (o !== null) {
1302
- var n = gr.call(o, t);
1358
+ var n = Tr.call(o, t);
1303
1359
  if (n !== -1) {
1304
1360
  var i = o.length - 1;
1305
1361
  i === 0 ? o = e.reactions = null : (o[n] = o[i], o.pop());
1306
1362
  }
1307
1363
  }
1308
- if (o === null && e.f & 2 && (B === null || !pe.call(B, e))) {
1364
+ if (o === null && e.f & 2 && (G === null || !ve.call(G, e))) {
1309
1365
  var r = e;
1310
- r.f & 512 && (r.f ^= 512, r.f &= ~Re), Zo(r), ls(r), Pe(r, 0);
1366
+ r.f & 512 && (r.f ^= 512, r.f &= ~We), r.v !== W && on(r), fs(r), Ne(r, 0);
1311
1367
  }
1312
1368
  }
1313
- function Pe(t, e) {
1369
+ function Ne(t, e) {
1314
1370
  var o = t.deps;
1315
- if (o !== null) for (var n = e; n < o.length; n++) ys(t, o[n]);
1371
+ if (o !== null) for (var n = e; n < o.length; n++) Ss(t, o[n]);
1316
1372
  }
1317
- function be(t) {
1373
+ function we(t) {
1318
1374
  var e = t.f;
1319
1375
  if (!(e & 16384)) {
1320
- N(t, et);
1321
- var o = k, n = Qe;
1322
- k = t, Qe = !0;
1376
+ N(t, nt);
1377
+ var o = S, n = oo;
1378
+ S = t, oo = !0;
1323
1379
  try {
1324
- e & 16777232 ? vs(t) : an(t), Ni(t);
1325
- var i = Bi(t);
1326
- t.teardown = typeof i == "function" ? i : null, t.wv = Hi;
1380
+ e & 16777232 ? Ts(t) : gn(t), qi(t);
1381
+ var i = Ji(t);
1382
+ t.teardown = typeof i == "function" ? i : null, t.wv = Gi;
1327
1383
  } finally {
1328
- Qe = n, k = o;
1384
+ oo = n, S = o;
1329
1385
  }
1330
1386
  }
1331
1387
  }
1332
1388
  function g(t) {
1333
1389
  var e = (t.f & 2) !== 0;
1334
- if (ms?.add(t), A !== null && !dt && !(k !== null && k.f & 16384) && (tt === null || !pe.call(tt, t))) {
1335
- var o = A.deps;
1336
- if (A.f & 2097152) t.rv < Jt && (t.rv = Jt, B === null && o !== null && o[Z] === t ? Z++ : B === null ? B = [t] : B.push(t));
1390
+ if (ks?.add(t), _ !== null && !ht && !(S !== null && S.f & 16384) && (ot === null || !ve.call(ot, t))) {
1391
+ var o = _.deps;
1392
+ if (_.f & 2097152) t.rv < Zt && (t.rv = Zt, G === null && o !== null && o[Y] === t ? Y++ : G === null ? G = [t] : G.push(t));
1337
1393
  else {
1338
1394
  var n;
1339
- ((n = A).deps ?? (n.deps = [])).push(t);
1395
+ ((n = _).deps ?? (n.deps = [])).push(t);
1340
1396
  var i = t.reactions;
1341
- i === null ? t.reactions = [A] : pe.call(i, A) || i.push(A);
1397
+ i === null ? t.reactions = [_] : ve.call(i, _) || i.push(_);
1342
1398
  }
1343
1399
  }
1344
- if (Ht && jt.has(t)) return jt.get(t);
1400
+ if (Ot && ee.has(t)) return ee.get(t);
1345
1401
  if (e) {
1346
1402
  var r = t;
1347
- if (Ht) {
1403
+ if (Ot) {
1348
1404
  var s = r.v;
1349
- return (!(r.f & 1024) && r.reactions !== null || Gi(r)) && (s = en(r)), jt.set(r, s), s;
1405
+ return (!(r.f & 1024) && r.reactions !== null || Yi(r)) && (s = un(r)), ee.set(r, s), s;
1350
1406
  }
1351
- var l = (r.f & 512) === 0 && !dt && A !== null && (Qe || (A.f & 512) !== 0), a = (r.f & Ko) === 0;
1352
- Ve(r) && (l && (r.f |= 512), Si(r)), l && !a && ($i(r), Fi(r));
1407
+ var a = (r.f & 512) === 0 && !ht && _ !== null && (oo || (_.f & 512) !== 0), u = (r.f & tn) === 0;
1408
+ je(r) && (a && (r.f |= 512), _i(r)), a && !u && (Ci(r), Zi(r));
1353
1409
  }
1354
- if (F?.has(t)) return F.get(t);
1410
+ if (q?.has(t)) return q.get(t);
1355
1411
  if (t.f & 8388608) throw t.v;
1356
1412
  return t.v;
1357
1413
  }
1358
- function Fi(t) {
1359
- if (t.f |= 512, t.deps !== null) for (const e of t.deps) (e.reactions ?? (e.reactions = [])).push(t), e.f & 2 && !(e.f & 512) && ($i(e), Fi(e));
1414
+ function Zi(t) {
1415
+ if (t.f |= 512, t.deps !== null) for (const e of t.deps) (e.reactions ?? (e.reactions = [])).push(t), e.f & 2 && !(e.f & 512) && (Ci(e), Zi(e));
1360
1416
  }
1361
- function Gi(t) {
1362
- if (t.v === j) return !0;
1417
+ function Yi(t) {
1418
+ if (t.v === W) return !0;
1363
1419
  if (t.deps === null) return !1;
1364
- for (const e of t.deps) if (jt.has(e) || e.f & 2 && Gi(e)) return !0;
1420
+ for (const e of t.deps) if (ee.has(e) || e.f & 2 && Yi(e)) return !0;
1365
1421
  return !1;
1366
1422
  }
1367
- function dn(t) {
1368
- var e = dt;
1423
+ function yn(t) {
1424
+ var e = ht;
1369
1425
  try {
1370
- return dt = !0, t();
1426
+ return ht = !0, t();
1371
1427
  } finally {
1372
- dt = e;
1428
+ ht = e;
1373
1429
  }
1374
1430
  }
1375
- var he = Symbol("events"), Ui = /* @__PURE__ */ new Set(), qo = /* @__PURE__ */ new Set();
1376
- function Ie(t, e, o) {
1431
+ var he = Symbol("events"), Xi = /* @__PURE__ */ new Set(), Jo = /* @__PURE__ */ new Set();
1432
+ function Se(t, e, o) {
1377
1433
  (e[he] ?? (e[he] = {}))[t] = o;
1378
1434
  }
1379
- function ws(t) {
1380
- for (var e = 0; e < t.length; e++) Ui.add(t[e]);
1381
- for (var o of qo) o(t);
1435
+ function As(t) {
1436
+ for (var e = 0; e < t.length; e++) Xi.add(t[e]);
1437
+ for (var o of Jo) o(t);
1382
1438
  }
1383
- var Pn = null;
1384
- function Rn(t) {
1439
+ var zn = null;
1440
+ function qn(t) {
1385
1441
  var e = this, o = e.ownerDocument, n = t.type, i = t.composedPath?.() || [], r = i[0] || t.target;
1386
- Pn = t;
1387
- var s = 0, l = Pn === t && t[he];
1388
- if (l) {
1389
- var a = i.indexOf(l);
1390
- if (a !== -1 && (e === document || e === window)) {
1442
+ zn = t;
1443
+ var s = 0, a = zn === t && t[he];
1444
+ if (a) {
1445
+ var u = i.indexOf(a);
1446
+ if (u !== -1 && (e === document || e === window)) {
1391
1447
  t[he] = e;
1392
1448
  return;
1393
1449
  }
1394
- var c = i.indexOf(e);
1395
- if (c === -1) return;
1396
- a <= c && (s = a);
1450
+ var l = i.indexOf(e);
1451
+ if (l === -1) return;
1452
+ u <= l && (s = u);
1397
1453
  }
1398
1454
  if (r = i[s] || t.target, r !== e) {
1399
- so(t, "currentTarget", {
1455
+ co(t, "currentTarget", {
1400
1456
  configurable: !0,
1401
1457
  get() {
1402
1458
  return r || o;
1403
1459
  }
1404
1460
  });
1405
- var d = A, f = k;
1406
- nt(null), yt(null);
1461
+ var d = _, h = S;
1462
+ rt(null), $t(null);
1407
1463
  try {
1408
- for (var h, v = []; r !== null; ) {
1464
+ for (var f, v = []; r !== null; ) {
1409
1465
  var m = r.assignedSlot || r.parentNode || r.host || null;
1410
1466
  try {
1411
- var S = r[he]?.[n];
1412
- S != null && (!r.disabled || t.target === r) && S.call(r, t);
1467
+ var k = r[he]?.[n];
1468
+ k != null && (!r.disabled || t.target === r) && k.call(r, t);
1413
1469
  } catch (p) {
1414
- h ? v.push(p) : h = p;
1470
+ f ? v.push(p) : f = p;
1415
1471
  }
1416
1472
  if (t.cancelBubble || m === e || m === null) break;
1417
1473
  r = m;
1418
1474
  }
1419
- if (h) {
1475
+ if (f) {
1420
1476
  for (let p of v) queueMicrotask(() => {
1421
1477
  throw p;
1422
1478
  });
1423
- throw h;
1479
+ throw f;
1424
1480
  }
1425
1481
  } finally {
1426
- t[he] = e, delete t.currentTarget, nt(d), yt(f);
1482
+ t[he] = e, delete t.currentTarget, rt(d), $t(h);
1427
1483
  }
1428
1484
  }
1429
1485
  }
1430
- var Ts = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
1431
- function Is(t) {
1432
- return Ts?.createHTML(t) ?? t;
1486
+ var xs = globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", { createHTML: (t) => t });
1487
+ function _s(t) {
1488
+ return xs?.createHTML(t) ?? t;
1433
1489
  }
1434
- function Ss(t) {
1435
- var e = on("template");
1436
- return e.innerHTML = Is(t.replaceAll("<!>", "<!---->")), e.content;
1490
+ function Cs(t) {
1491
+ var e = dn("template");
1492
+ return e.innerHTML = _s(t.replaceAll("<!>", "<!---->")), e.content;
1437
1493
  }
1438
- function to(t, e) {
1439
- var o = k;
1494
+ function no(t, e) {
1495
+ var o = S;
1440
1496
  o.nodes === null && (o.nodes = {
1441
1497
  start: t,
1442
1498
  end: e,
@@ -1445,341 +1501,341 @@ function to(t, e) {
1445
1501
  });
1446
1502
  }
1447
1503
  // @__NO_SIDE_EFFECTS__
1448
- function le(t, e) {
1504
+ function ce(t, e) {
1449
1505
  var o = (e & 1) !== 0, n = (e & 2) !== 0, i, r = !t.startsWith("<!>");
1450
1506
  return () => {
1451
- if (L) return to(E, null), E;
1452
- i === void 0 && (i = Ss(r ? t : "<!>" + t), o || (i = /* @__PURE__ */ ne(i)));
1453
- var s = n || _i ? document.importNode(i, !0) : i.cloneNode(!0);
1507
+ if (P) return no(L, null), L;
1508
+ i === void 0 && (i = Cs(r ? t : "<!>" + t), o || (i = /* @__PURE__ */ re(i)));
1509
+ var s = n || Pi ? document.importNode(i, !0) : i.cloneNode(!0);
1454
1510
  if (o) {
1455
- var l = /* @__PURE__ */ ne(s), a = s.lastChild;
1456
- to(l, a);
1457
- } else to(s, s);
1511
+ var a = /* @__PURE__ */ re(s), u = s.lastChild;
1512
+ no(a, u);
1513
+ } else no(s, s);
1458
1514
  return s;
1459
1515
  };
1460
1516
  }
1461
- function Pt(t, e) {
1462
- if (L) {
1463
- var o = k;
1464
- (!(o.f & 32768) || o.nodes.end === null) && (o.nodes.end = E), mo();
1517
+ function Vt(t, e) {
1518
+ if (P) {
1519
+ var o = S;
1520
+ (!(o.f & 32768) || o.nodes.end === null) && (o.nodes.end = L), wo();
1465
1521
  return;
1466
1522
  }
1467
1523
  t !== null && t.before(e);
1468
1524
  }
1469
- var $s = ["touchstart", "touchmove"];
1470
- function ks(t) {
1471
- return $s.includes(t);
1525
+ var Es = ["touchstart", "touchmove"];
1526
+ function Ms(t) {
1527
+ return Es.includes(t);
1472
1528
  }
1473
- function Nn(t, e) {
1529
+ function Hn(t, e) {
1474
1530
  var o = e == null ? "" : typeof e == "object" ? `${e}` : e;
1475
1531
  o !== (t.__t ?? (t.__t = t.nodeValue)) && (t.__t = o, t.nodeValue = `${o}`);
1476
1532
  }
1477
- function Ki(t, e) {
1478
- return Ji(t, e);
1533
+ function Qi(t, e) {
1534
+ return tr(t, e);
1479
1535
  }
1480
- function As(t, e) {
1481
- Do(), e.intro = e.intro ?? !1;
1482
- const o = e.target, n = L, i = E;
1536
+ function Ls(t, e) {
1537
+ Ko(), e.intro = e.intro ?? !1;
1538
+ const o = e.target, n = P, i = L;
1483
1539
  try {
1484
- for (var r = /* @__PURE__ */ ne(o); r && (r.nodeType !== 8 || r.data !== "["); ) r = /* @__PURE__ */ Tt(r);
1485
- if (!r) throw fe;
1486
- Ct(!0), G(r);
1487
- const s = Ji(t, {
1540
+ for (var r = /* @__PURE__ */ re(o); r && (r.nodeType !== 8 || r.data !== "["); ) r = /* @__PURE__ */ St(r);
1541
+ if (!r) throw pe;
1542
+ Lt(!0), U(r);
1543
+ const s = tr(t, {
1488
1544
  ...e,
1489
1545
  anchor: r
1490
1546
  });
1491
- return Ct(!1), s;
1547
+ return Lt(!1), s;
1492
1548
  } catch (s) {
1493
1549
  if (s instanceof Error && s.message.split(`
1494
- `).some((l) => l.startsWith("https://svelte.dev/e/"))) throw s;
1495
- return s !== fe && console.warn("Failed to hydrate: ", s), e.recover === !1 && Or(), Do(), Mi(o), Ct(!1), Ki(t, e);
1550
+ `).some((a) => a.startsWith("https://svelte.dev/e/"))) throw s;
1551
+ return s !== pe && console.warn("Failed to hydrate: ", s), e.recover === !1 && Vr(), Ko(), Ni(o), Lt(!1), Qi(t, e);
1496
1552
  } finally {
1497
- Ct(n), G(i);
1553
+ Lt(n), U(i);
1498
1554
  }
1499
1555
  }
1500
- var Je = /* @__PURE__ */ new Map();
1501
- function Ji(t, { target: e, anchor: o, props: n = {}, events: i, context: r, intro: s = !0, transformError: l }) {
1502
- Do();
1503
- var a = void 0, c = fs(() => {
1504
- var d = o ?? e.appendChild(ht());
1505
- Xr(d, { pending: () => {
1556
+ var Ye = /* @__PURE__ */ new Map();
1557
+ function tr(t, { target: e, anchor: o, props: n = {}, events: i, context: r, intro: s = !0, transformError: a }) {
1558
+ Ko();
1559
+ var u = void 0, l = ys(() => {
1560
+ var d = o ?? e.appendChild(pt());
1561
+ is(d, { pending: () => {
1506
1562
  } }, (v) => {
1507
- ri({});
1508
- var m = W;
1509
- if (r && (m.c = r), i && (n.$$events = i), L && to(v, null), a = t(v, n) || {}, L && (k.nodes.end = E, E === null || E.nodeType !== 8 || E.data !== "]")) throw go(), fe;
1510
- si();
1511
- }, l);
1512
- var f = /* @__PURE__ */ new Set(), h = (v) => {
1563
+ di({});
1564
+ var m = j;
1565
+ if (r && (m.c = r), i && (n.$$events = i), P && no(v, null), u = t(v, n) || {}, P && (S.nodes.end = L, L === null || L.nodeType !== 8 || L.data !== "]")) throw yo(), pe;
1566
+ hi();
1567
+ }, a);
1568
+ var h = /* @__PURE__ */ new Set(), f = (v) => {
1513
1569
  for (var m = 0; m < v.length; m++) {
1514
- var S = v[m];
1515
- if (!f.has(S)) {
1516
- f.add(S);
1517
- var p = ks(S);
1518
- for (const x of [e, document]) {
1519
- var w = Je.get(x);
1520
- w === void 0 && (w = /* @__PURE__ */ new Map(), Je.set(x, w));
1521
- var R = w.get(S);
1522
- R === void 0 ? (x.addEventListener(S, Rn, { passive: p }), w.set(S, 1)) : w.set(S, R + 1);
1570
+ var k = v[m];
1571
+ if (!h.has(k)) {
1572
+ h.add(k);
1573
+ var p = Ms(k);
1574
+ for (const A of [e, document]) {
1575
+ var w = Ye.get(A);
1576
+ w === void 0 && (w = /* @__PURE__ */ new Map(), Ye.set(A, w));
1577
+ var R = w.get(k);
1578
+ R === void 0 ? (A.addEventListener(k, qn, { passive: p }), w.set(k, 1)) : w.set(k, R + 1);
1523
1579
  }
1524
1580
  }
1525
1581
  }
1526
1582
  };
1527
- return h(vo(Ui)), qo.add(h), () => {
1528
- for (var v of f) for (const p of [e, document]) {
1529
- var m = Je.get(p), S = m.get(v);
1530
- --S == 0 ? (p.removeEventListener(v, Rn), m.delete(v), m.size === 0 && Je.delete(p)) : m.set(v, S);
1583
+ return f(bo(Xi)), Jo.add(f), () => {
1584
+ for (var v of h) for (const p of [e, document]) {
1585
+ var m = Ye.get(p), k = m.get(v);
1586
+ --k == 0 ? (p.removeEventListener(v, qn), m.delete(v), m.size === 0 && Ye.delete(p)) : m.set(v, k);
1531
1587
  }
1532
- qo.delete(h), d !== o && d.parentNode?.removeChild(d);
1588
+ Jo.delete(f), d !== o && d.parentNode?.removeChild(d);
1533
1589
  };
1534
1590
  });
1535
- return Bo.set(a, c), a;
1591
+ return Zo.set(u, l), u;
1536
1592
  }
1537
- var Bo = /* @__PURE__ */ new WeakMap();
1538
- function xs(t, e) {
1539
- const o = Bo.get(t);
1540
- return o ? (Bo.delete(t), o(e)) : Promise.resolve();
1593
+ var Zo = /* @__PURE__ */ new WeakMap();
1594
+ function Ps(t, e) {
1595
+ const o = Zo.get(t);
1596
+ return o ? (Zo.delete(t), o(e)) : Promise.resolve();
1541
1597
  }
1542
- var $t = /* @__PURE__ */ new WeakMap(), Lt = /* @__PURE__ */ new WeakMap(), lt = /* @__PURE__ */ new WeakMap(), Se = /* @__PURE__ */ new WeakMap(), xo = /* @__PURE__ */ new WeakMap(), _o = /* @__PURE__ */ new WeakMap(), Vn = /* @__PURE__ */ new WeakMap(), _s = class {
1598
+ var _t = /* @__PURE__ */ new WeakMap(), Nt = /* @__PURE__ */ new WeakMap(), ct = /* @__PURE__ */ new WeakMap(), Ae = /* @__PURE__ */ new WeakMap(), Co = /* @__PURE__ */ new WeakMap(), Eo = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakMap(), Os = class {
1543
1599
  constructor(t, e = !0) {
1544
- y(this, "anchor", void 0), $(this, $t, /* @__PURE__ */ new Map()), $(this, Lt, /* @__PURE__ */ new Map()), $(this, lt, /* @__PURE__ */ new Map()), $(this, Se, /* @__PURE__ */ new Set()), $(this, xo, !0), $(this, _o, (o) => {
1545
- if (u($t, this).has(o)) {
1546
- var n = u($t, this).get(o), i = u(Lt, this).get(n);
1547
- if (i) cn(i), u(Se, this).delete(n);
1600
+ y(this, "anchor", void 0), I(this, _t, /* @__PURE__ */ new Map()), I(this, Nt, /* @__PURE__ */ new Map()), I(this, ct, /* @__PURE__ */ new Map()), I(this, Ae, /* @__PURE__ */ new Set()), I(this, Co, !0), I(this, Eo, (o) => {
1601
+ if (c(_t, this).has(o)) {
1602
+ var n = c(_t, this).get(o), i = c(Nt, this).get(n);
1603
+ if (i) mn(i), c(Ae, this).delete(n);
1548
1604
  else {
1549
- var r = u(lt, this).get(n);
1550
- r && (u(Lt, this).set(n, r.effect), u(lt, this).delete(n), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), i = r.effect);
1605
+ var r = c(ct, this).get(n);
1606
+ r && (c(Nt, this).set(n, r.effect), c(ct, this).delete(n), r.fragment.lastChild.remove(), this.anchor.before(r.fragment), i = r.effect);
1551
1607
  }
1552
- for (const [s, l] of u($t, this)) {
1553
- if (u($t, this).delete(s), s === o) break;
1554
- const a = u(lt, this).get(l);
1555
- a && (z(a.effect), u(lt, this).delete(l));
1608
+ for (const [s, a] of c(_t, this)) {
1609
+ if (c(_t, this).delete(s), s === o) break;
1610
+ const u = c(ct, this).get(a);
1611
+ u && (H(u.effect), c(ct, this).delete(a));
1556
1612
  }
1557
- for (const [s, l] of u(Lt, this)) {
1558
- if (s === n || u(Se, this).has(s)) continue;
1559
- const a = () => {
1560
- if (Array.from(u($t, this).values()).includes(s)) {
1561
- var c = document.createDocumentFragment();
1562
- un(l, c), c.append(ht()), u(lt, this).set(s, {
1563
- effect: l,
1564
- fragment: c
1613
+ for (const [s, a] of c(Nt, this)) {
1614
+ if (s === n || c(Ae, this).has(s)) continue;
1615
+ const u = () => {
1616
+ if (Array.from(c(_t, this).values()).includes(s)) {
1617
+ var l = document.createDocumentFragment();
1618
+ bn(a, l), l.append(pt()), c(ct, this).set(s, {
1619
+ effect: a,
1620
+ fragment: l
1565
1621
  });
1566
- } else z(l);
1567
- u(Se, this).delete(s), u(Lt, this).delete(s);
1622
+ } else H(a);
1623
+ c(Ae, this).delete(s), c(Nt, this).delete(s);
1568
1624
  };
1569
- u(xo, this) || !i ? (u(Se, this).add(s), se(l, a, !1)) : a();
1625
+ c(Co, this) || !i ? (c(Ae, this).add(s), le(a, u, !1)) : u();
1570
1626
  }
1571
1627
  }
1572
- }), $(this, Vn, (o) => {
1573
- u($t, this).delete(o);
1574
- const n = Array.from(u($t, this).values());
1575
- for (const [i, r] of u(lt, this)) n.includes(i) || (z(r.effect), u(lt, this).delete(i));
1576
- }), this.anchor = t, T(xo, this, e);
1628
+ }), I(this, Dn, (o) => {
1629
+ c(_t, this).delete(o);
1630
+ const n = Array.from(c(_t, this).values());
1631
+ for (const [i, r] of c(ct, this)) n.includes(i) || (H(r.effect), c(ct, this).delete(i));
1632
+ }), this.anchor = t, $(Co, this, e);
1577
1633
  }
1578
1634
  ensure(t, e) {
1579
- var o = M, n = Li();
1580
- if (e && !u(Lt, this).has(t) && !u(lt, this).has(t)) if (n) {
1581
- var i = document.createDocumentFragment(), r = ht();
1582
- i.append(r), u(lt, this).set(t, {
1583
- effect: ot(() => e(r)),
1635
+ var o = x, n = Wi();
1636
+ if (e && !c(Nt, this).has(t) && !c(ct, this).has(t)) if (n) {
1637
+ var i = document.createDocumentFragment(), r = pt();
1638
+ i.append(r), c(ct, this).set(t, {
1639
+ effect: it(() => e(r)),
1584
1640
  fragment: i
1585
1641
  });
1586
- } else u(Lt, this).set(t, ot(() => e(this.anchor)));
1587
- if (u($t, this).set(o, t), n) {
1588
- for (const [s, l] of u(Lt, this)) s === t ? o.unskip_effect(l) : o.skip_effect(l);
1589
- for (const [s, l] of u(lt, this)) s === t ? o.unskip_effect(l.effect) : o.skip_effect(l.effect);
1590
- o.oncommit(u(_o, this)), o.ondiscard(u(Vn, this));
1591
- } else L && (this.anchor = E), u(_o, this).call(this, o);
1642
+ } else c(Nt, this).set(t, it(() => e(this.anchor)));
1643
+ if (c(_t, this).set(o, t), n) {
1644
+ for (const [s, a] of c(Nt, this)) s === t ? o.unskip_effect(a) : o.skip_effect(a);
1645
+ for (const [s, a] of c(ct, this)) s === t ? o.unskip_effect(a.effect) : o.skip_effect(a.effect);
1646
+ o.oncommit(c(Eo, this)), o.ondiscard(c(Dn, this));
1647
+ } else P && (this.anchor = L), c(Eo, this).call(this, o);
1592
1648
  }
1593
1649
  };
1594
- function $e(t, e, o = !1) {
1650
+ function xe(t, e, o = !1) {
1595
1651
  var n;
1596
- L && (n = E, mo());
1597
- var i = new _s(t), r = o ? Jo : 0;
1598
- function s(l, a) {
1599
- if (L) {
1600
- var c = oi(n);
1601
- if (l !== parseInt(c.substring(1))) {
1602
- var d = ao();
1603
- G(d), i.anchor = d, Ct(!1), i.ensure(l, a), Ct(!0);
1652
+ P && (n = L, wo());
1653
+ var i = new Os(t), r = o ? en : 0;
1654
+ function s(a, u) {
1655
+ if (P) {
1656
+ var l = li(n);
1657
+ if (a !== parseInt(l.substring(1))) {
1658
+ var d = ho();
1659
+ U(d), i.anchor = d, Lt(!1), i.ensure(a, u), Lt(!0);
1604
1660
  return;
1605
1661
  }
1606
1662
  }
1607
- i.ensure(l, a);
1663
+ i.ensure(a, u);
1608
1664
  }
1609
- ln(() => {
1610
- var l = !1;
1611
- e((a, c = 0) => {
1612
- l = !0, s(c, a);
1613
- }), l || s(-1, null);
1665
+ vn(() => {
1666
+ var a = !1;
1667
+ e((u, l = 0) => {
1668
+ a = !0, s(l, u);
1669
+ }), a || s(-1, null);
1614
1670
  }, r);
1615
1671
  }
1616
- function Cs(t, e) {
1672
+ function Rs(t, e) {
1617
1673
  return e;
1618
1674
  }
1619
- function Es(t, e, o) {
1620
- for (var n = [], i = e.length, r, s = e.length, l = 0; l < i; l++) {
1621
- let f = e[l];
1622
- se(f, () => {
1675
+ function Ns(t, e, o) {
1676
+ for (var n = [], i = e.length, r, s = e.length, a = 0; a < i; a++) {
1677
+ let h = e[a];
1678
+ le(h, () => {
1623
1679
  if (r) {
1624
- if (r.pending.delete(f), r.done.add(f), r.pending.size === 0) {
1625
- var h = t.outrogroups;
1626
- Fo(t, vo(r.done)), h.delete(r), h.size === 0 && (t.outrogroups = null);
1680
+ if (r.pending.delete(h), r.done.add(h), r.pending.size === 0) {
1681
+ var f = t.outrogroups;
1682
+ Yo(t, bo(r.done)), f.delete(r), f.size === 0 && (t.outrogroups = null);
1627
1683
  }
1628
1684
  } else s -= 1;
1629
1685
  }, !1);
1630
1686
  }
1631
1687
  if (s === 0) {
1632
- var a = n.length === 0 && o !== null;
1633
- if (a) {
1634
- var c = o, d = c.parentNode;
1635
- Mi(d), d.append(c), t.items.clear();
1688
+ var u = n.length === 0 && o !== null;
1689
+ if (u) {
1690
+ var l = o, d = l.parentNode;
1691
+ Ni(d), d.append(l), t.items.clear();
1636
1692
  }
1637
- Fo(t, e, !a);
1693
+ Yo(t, e, !u);
1638
1694
  } else r = {
1639
1695
  pending: new Set(e),
1640
1696
  done: /* @__PURE__ */ new Set()
1641
1697
  }, (t.outrogroups ?? (t.outrogroups = /* @__PURE__ */ new Set())).add(r);
1642
1698
  }
1643
- function Fo(t, e, o = !0) {
1699
+ function Yo(t, e, o = !0) {
1644
1700
  var n;
1645
1701
  if (t.pending.size > 0) {
1646
1702
  n = /* @__PURE__ */ new Set();
1647
- for (const s of t.pending.values()) for (const l of s) n.add(t.items.get(l).e);
1703
+ for (const s of t.pending.values()) for (const a of s) n.add(t.items.get(a).e);
1648
1704
  }
1649
1705
  for (var i = 0; i < e.length; i++) {
1650
1706
  var r = e[i];
1651
- n?.has(r) ? (r.f |= _e, un(r, document.createDocumentFragment())) : z(e[i], o);
1707
+ n?.has(r) ? (r.f |= Me, bn(r, document.createDocumentFragment())) : H(e[i], o);
1652
1708
  }
1653
1709
  }
1654
- var Ze;
1655
- function Ms(t, e, o, n, i, r = null) {
1656
- var s = t, l = /* @__PURE__ */ new Map();
1710
+ var Xe;
1711
+ function Ws(t, e, o, n, i, r = null) {
1712
+ var s = t, a = /* @__PURE__ */ new Map();
1657
1713
  if (e & 4) {
1658
- var a = t;
1659
- s = L ? G(/* @__PURE__ */ ne(a)) : a.appendChild(ht());
1714
+ var u = t;
1715
+ s = P ? U(/* @__PURE__ */ re(u)) : u.appendChild(pt());
1660
1716
  }
1661
- L && mo();
1662
- var c = null, d = /* @__PURE__ */ tn(() => {
1717
+ P && wo();
1718
+ var l = null, d = /* @__PURE__ */ cn(() => {
1663
1719
  var w = o();
1664
- return Yn(w) ? w : w == null ? [] : vo(w);
1665
- }), f, h = /* @__PURE__ */ new Map(), v = !0;
1720
+ return ii(w) ? w : w == null ? [] : bo(w);
1721
+ }), h, f = /* @__PURE__ */ new Map(), v = !0;
1666
1722
  function m(w) {
1667
- p.effect.f & 16384 || (p.pending.delete(w), p.fallback = c, Ls(p, f, s, e, n), c !== null && (f.length === 0 ? c.f & 33554432 ? (c.f ^= _e, xe(c, null, s)) : cn(c) : se(c, () => {
1668
- c = null;
1723
+ p.effect.f & 16384 || (p.pending.delete(w), p.fallback = l, Vs(p, h, s, e, n), l !== null && (h.length === 0 ? l.f & 33554432 ? (l.f ^= Me, Ee(l, null, s)) : mn(l) : le(l, () => {
1724
+ l = null;
1669
1725
  })));
1670
1726
  }
1671
- function S(w) {
1727
+ function k(w) {
1672
1728
  p.pending.delete(w);
1673
1729
  }
1674
1730
  var p = {
1675
- effect: ln(() => {
1676
- f = g(d);
1677
- var w = f.length;
1731
+ effect: vn(() => {
1732
+ h = g(d);
1733
+ var w = h.length;
1678
1734
  let R = !1;
1679
- L && oi(s) === "[!" != (w === 0) && (s = ao(), G(s), Ct(!1), R = !0);
1680
- for (var x = /* @__PURE__ */ new Set(), P = M, U = Li(), H = 0; H < w; H += 1) {
1681
- L && E.nodeType === 8 && E.data === "]" && (s = E, R = !0, Ct(!1));
1682
- var D = f[H], ft = n(D, H), K = v ? null : l.get(ft);
1683
- K ? (K.v && me(K.v, D), K.i && me(K.i, H), U && P.unskip_effect(K.e)) : (K = Os(l, v ? s : Ze ?? (Ze = ht()), D, ft, H, i, e, o), v || (K.e.f |= _e), l.set(ft, K)), x.add(ft);
1735
+ P && li(s) === "[!" != (w === 0) && (s = ho(), U(s), Lt(!1), R = !0);
1736
+ for (var A = /* @__PURE__ */ new Set(), O = x, K = Wi(), D = 0; D < w; D += 1) {
1737
+ P && L.nodeType === 8 && L.data === "]" && (s = L, R = !0, Lt(!1));
1738
+ var B = h[D], gt = n(B, D), J = v ? null : a.get(gt);
1739
+ J ? (J.v && ye(J.v, B), J.i && ye(J.i, D), K && O.unskip_effect(J.e)) : (J = js(a, v ? s : Xe ?? (Xe = pt()), B, gt, D, i, e, o), v || (J.e.f |= Me), a.set(gt, J)), A.add(gt);
1684
1740
  }
1685
- if (w === 0 && r && !c && (v ? c = ot(() => r(s)) : (c = ot(() => r(Ze ?? (Ze = ht()))), c.f |= _e)), w > x.size && _r("", "", ""), L && w > 0 && G(ao()), !v) if (h.set(P, x), U) {
1686
- for (const [pt, We] of l) x.has(pt) || P.skip_effect(We.e);
1687
- P.oncommit(m), P.ondiscard(S);
1688
- } else m(P);
1689
- R && Ct(!0), g(d);
1741
+ if (w === 0 && r && !l && (v ? l = it(() => r(s)) : (l = it(() => r(Xe ?? (Xe = pt()))), l.f |= Me)), w > A.size && Pr("", "", ""), P && w > 0 && U(ho()), !v) if (f.set(O, A), K) {
1742
+ for (const [mt, ze] of a) A.has(mt) || O.skip_effect(ze.e);
1743
+ O.oncommit(m), O.ondiscard(k);
1744
+ } else m(O);
1745
+ R && Lt(!0), g(d);
1690
1746
  }),
1691
1747
  flags: e,
1692
- items: l,
1693
- pending: h,
1748
+ items: a,
1749
+ pending: f,
1694
1750
  outrogroups: null,
1695
- fallback: c
1751
+ fallback: l
1696
1752
  };
1697
- v = !1, L && (s = E);
1753
+ v = !1, P && (s = L);
1698
1754
  }
1699
- function ke(t) {
1755
+ function _e(t) {
1700
1756
  for (; t !== null && !(t.f & 32); ) t = t.next;
1701
1757
  return t;
1702
1758
  }
1703
- function Ls(t, e, o, n, i) {
1704
- var r = (n & 8) !== 0, s = e.length, l = t.items, a = ke(t.effect.first), c, d = null, f, h = [], v = [], m, S, p, w;
1705
- if (r) for (w = 0; w < s; w += 1) m = e[w], S = i(m, w), p = l.get(S).e, p.f & 33554432 || (p.nodes?.a?.measure(), (f ?? (f = /* @__PURE__ */ new Set())).add(p));
1759
+ function Vs(t, e, o, n, i) {
1760
+ var r = (n & 8) !== 0, s = e.length, a = t.items, u = _e(t.effect.first), l, d = null, h, f = [], v = [], m, k, p, w;
1761
+ if (r) for (w = 0; w < s; w += 1) m = e[w], k = i(m, w), p = a.get(k).e, p.f & 33554432 || (p.nodes?.a?.measure(), (h ?? (h = /* @__PURE__ */ new Set())).add(p));
1706
1762
  for (w = 0; w < s; w += 1) {
1707
- if (m = e[w], S = i(m, w), p = l.get(S).e, t.outrogroups !== null) for (const pt of t.outrogroups) pt.pending.delete(p), pt.done.delete(p);
1708
- if (p.f & 8192 && (cn(p), r && (p.nodes?.a?.unfix(), (f ?? (f = /* @__PURE__ */ new Set())).delete(p))), p.f & 33554432) if (p.f ^= _e, p === a) xe(p, null, o);
1763
+ if (m = e[w], k = i(m, w), p = a.get(k).e, t.outrogroups !== null) for (const mt of t.outrogroups) mt.pending.delete(p), mt.done.delete(p);
1764
+ if (p.f & 8192 && (mn(p), r && (p.nodes?.a?.unfix(), (h ?? (h = /* @__PURE__ */ new Set())).delete(p))), p.f & 33554432) if (p.f ^= Me, p === u) Ee(p, null, o);
1709
1765
  else {
1710
- var R = d ? d.next : a;
1711
- p === t.effect.last && (t.effect.last = p.prev), p.prev && (p.prev.next = p.next), p.next && (p.next.prev = p.prev), Ot(t, d, p), Ot(t, p, R), xe(p, R, o), d = p, h = [], v = [], a = ke(d.next);
1766
+ var R = d ? d.next : u;
1767
+ p === t.effect.last && (t.effect.last = p.prev), p.prev && (p.prev.next = p.next), p.next && (p.next.prev = p.prev), Wt(t, d, p), Wt(t, p, R), Ee(p, R, o), d = p, f = [], v = [], u = _e(d.next);
1712
1768
  continue;
1713
1769
  }
1714
- if (p !== a) {
1715
- if (c !== void 0 && c.has(p)) {
1716
- if (h.length < v.length) {
1717
- var x = v[0], P;
1718
- d = x.prev;
1719
- var U = h[0], H = h[h.length - 1];
1720
- for (P = 0; P < h.length; P += 1) xe(h[P], x, o);
1721
- for (P = 0; P < v.length; P += 1) c.delete(v[P]);
1722
- Ot(t, U.prev, H.next), Ot(t, d, U), Ot(t, H, x), a = x, d = H, w -= 1, h = [], v = [];
1723
- } else c.delete(p), xe(p, a, o), Ot(t, p.prev, p.next), Ot(t, p, d === null ? t.effect.first : d.next), Ot(t, d, p), d = p;
1770
+ if (p !== u) {
1771
+ if (l !== void 0 && l.has(p)) {
1772
+ if (f.length < v.length) {
1773
+ var A = v[0], O;
1774
+ d = A.prev;
1775
+ var K = f[0], D = f[f.length - 1];
1776
+ for (O = 0; O < f.length; O += 1) Ee(f[O], A, o);
1777
+ for (O = 0; O < v.length; O += 1) l.delete(v[O]);
1778
+ Wt(t, K.prev, D.next), Wt(t, d, K), Wt(t, D, A), u = A, d = D, w -= 1, f = [], v = [];
1779
+ } else l.delete(p), Ee(p, u, o), Wt(t, p.prev, p.next), Wt(t, p, d === null ? t.effect.first : d.next), Wt(t, d, p), d = p;
1724
1780
  continue;
1725
1781
  }
1726
- for (h = [], v = []; a !== null && a !== p; ) (c ?? (c = /* @__PURE__ */ new Set())).add(a), v.push(a), a = ke(a.next);
1727
- if (a === null) continue;
1782
+ for (f = [], v = []; u !== null && u !== p; ) (l ?? (l = /* @__PURE__ */ new Set())).add(u), v.push(u), u = _e(u.next);
1783
+ if (u === null) continue;
1728
1784
  }
1729
- p.f & 33554432 || h.push(p), d = p, a = ke(p.next);
1785
+ p.f & 33554432 || f.push(p), d = p, u = _e(p.next);
1730
1786
  }
1731
1787
  if (t.outrogroups !== null) {
1732
- for (const pt of t.outrogroups) pt.pending.size === 0 && (Fo(t, vo(pt.done)), t.outrogroups?.delete(pt));
1788
+ for (const mt of t.outrogroups) mt.pending.size === 0 && (Yo(t, bo(mt.done)), t.outrogroups?.delete(mt));
1733
1789
  t.outrogroups.size === 0 && (t.outrogroups = null);
1734
1790
  }
1735
- if (a !== null || c !== void 0) {
1736
- var D = [];
1737
- if (c !== void 0) for (p of c) p.f & 8192 || D.push(p);
1738
- for (; a !== null; ) !(a.f & 8192) && a !== t.fallback && D.push(a), a = ke(a.next);
1739
- var ft = D.length;
1740
- if (ft > 0) {
1741
- var K = n & 4 && s === 0 ? o : null;
1791
+ if (u !== null || l !== void 0) {
1792
+ var B = [];
1793
+ if (l !== void 0) for (p of l) p.f & 8192 || B.push(p);
1794
+ for (; u !== null; ) !(u.f & 8192) && u !== t.fallback && B.push(u), u = _e(u.next);
1795
+ var gt = B.length;
1796
+ if (gt > 0) {
1797
+ var J = n & 4 && s === 0 ? o : null;
1742
1798
  if (r) {
1743
- for (w = 0; w < ft; w += 1) D[w].nodes?.a?.measure();
1744
- for (w = 0; w < ft; w += 1) D[w].nodes?.a?.fix();
1799
+ for (w = 0; w < gt; w += 1) B[w].nodes?.a?.measure();
1800
+ for (w = 0; w < gt; w += 1) B[w].nodes?.a?.fix();
1745
1801
  }
1746
- Es(t, D, K);
1802
+ Ns(t, B, J);
1747
1803
  }
1748
1804
  }
1749
- r && ee(() => {
1750
- if (f !== void 0) for (p of f) p.nodes?.a?.apply();
1805
+ r && ne(() => {
1806
+ if (h !== void 0) for (p of h) p.nodes?.a?.apply();
1751
1807
  });
1752
1808
  }
1753
- function Os(t, e, o, n, i, r, s, l) {
1754
- var a = s & 1 ? s & 16 ? oe(o) : /* @__PURE__ */ Ai(o, !1, !1) : null, c = s & 2 ? oe(i) : null;
1809
+ function js(t, e, o, n, i, r, s, a) {
1810
+ var u = s & 1 ? s & 16 ? ie(o) : /* @__PURE__ */ Mi(o, !1, !1) : null, l = s & 2 ? ie(i) : null;
1755
1811
  return {
1756
- v: a,
1757
- i: c,
1758
- e: ot(() => (r(e, a ?? o, c ?? i, l), () => {
1812
+ v: u,
1813
+ i: l,
1814
+ e: it(() => (r(e, u ?? o, l ?? i, a), () => {
1759
1815
  t.delete(n);
1760
1816
  }))
1761
1817
  };
1762
1818
  }
1763
- function xe(t, e, o) {
1819
+ function Ee(t, e, o) {
1764
1820
  if (t.nodes) for (var n = t.nodes.start, i = t.nodes.end, r = e && !(e.f & 33554432) ? e.nodes.start : o; n !== null; ) {
1765
- var s = /* @__PURE__ */ Tt(n);
1821
+ var s = /* @__PURE__ */ St(n);
1766
1822
  if (r.before(n), n === i) return;
1767
1823
  n = s;
1768
1824
  }
1769
1825
  }
1770
- function Ot(t, e, o) {
1826
+ function Wt(t, e, o) {
1771
1827
  e === null ? t.effect.first = o : e.next = o, o === null ? t.effect.last = e : o.prev = e;
1772
1828
  }
1773
- function Ps(t, e) {
1774
- Ri(() => {
1829
+ function zs(t, e) {
1830
+ zi(() => {
1775
1831
  var o = t.getRootNode(), n = o.host ? o : o.head ?? o.ownerDocument.head;
1776
1832
  if (!n.querySelector("#" + e.hash)) {
1777
- const i = on("style");
1833
+ const i = dn("style");
1778
1834
  i.id = e.hash, i.textContent = e.code, n.appendChild(i);
1779
1835
  }
1780
1836
  });
1781
1837
  }
1782
- function Wn(t, e = !1) {
1838
+ function Bn(t, e = !1) {
1783
1839
  var o = e ? " !important;" : ";", n = "";
1784
1840
  for (var i of Object.keys(t)) {
1785
1841
  var r = t[i];
@@ -1787,164 +1843,164 @@ function Wn(t, e = !1) {
1787
1843
  }
1788
1844
  return n;
1789
1845
  }
1790
- function Co(t) {
1846
+ function Mo(t) {
1791
1847
  return t[0] !== "-" || t[1] !== "-" ? t.toLowerCase() : t;
1792
1848
  }
1793
- function Rs(t, e) {
1849
+ function qs(t, e) {
1794
1850
  if (e) {
1795
1851
  var o = "", n, i;
1796
1852
  if (Array.isArray(e) ? (n = e[0], i = e[1]) : n = e, t) {
1797
1853
  t = String(t).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1798
- var r = !1, s = 0, l = !1, a = [];
1799
- n && a.push(...Object.keys(n).map(Co)), i && a.push(...Object.keys(i).map(Co));
1800
- var c = 0, d = -1;
1801
- const S = t.length;
1802
- for (var f = 0; f < S; f++) {
1803
- var h = t[f];
1804
- if (l ? h === "/" && t[f - 1] === "*" && (l = !1) : r ? r === h && (r = !1) : h === "/" && t[f + 1] === "*" ? l = !0 : h === '"' || h === "'" ? r = h : h === "(" ? s++ : h === ")" && s--, !l && r === !1 && s === 0) {
1805
- if (h === ":" && d === -1) d = f;
1806
- else if (h === ";" || f === S - 1) {
1854
+ var r = !1, s = 0, a = !1, u = [];
1855
+ n && u.push(...Object.keys(n).map(Mo)), i && u.push(...Object.keys(i).map(Mo));
1856
+ var l = 0, d = -1;
1857
+ const k = t.length;
1858
+ for (var h = 0; h < k; h++) {
1859
+ var f = t[h];
1860
+ if (a ? f === "/" && t[h - 1] === "*" && (a = !1) : r ? r === f && (r = !1) : f === "/" && t[h + 1] === "*" ? a = !0 : f === '"' || f === "'" ? r = f : f === "(" ? s++ : f === ")" && s--, !a && r === !1 && s === 0) {
1861
+ if (f === ":" && d === -1) d = h;
1862
+ else if (f === ";" || h === k - 1) {
1807
1863
  if (d !== -1) {
1808
- var v = Co(t.substring(c, d).trim());
1809
- if (!a.includes(v)) {
1810
- h !== ";" && f++;
1811
- var m = t.substring(c, f).trim();
1864
+ var v = Mo(t.substring(l, d).trim());
1865
+ if (!u.includes(v)) {
1866
+ f !== ";" && h++;
1867
+ var m = t.substring(l, h).trim();
1812
1868
  o += " " + m + ";";
1813
1869
  }
1814
1870
  }
1815
- c = f + 1, d = -1;
1871
+ l = h + 1, d = -1;
1816
1872
  }
1817
1873
  }
1818
1874
  }
1819
1875
  }
1820
- return n && (o += Wn(n)), i && (o += Wn(i, !0)), o = o.trim(), o === "" ? null : o;
1876
+ return n && (o += Bn(n)), i && (o += Bn(i, !0)), o = o.trim(), o === "" ? null : o;
1821
1877
  }
1822
1878
  return t == null ? null : String(t);
1823
1879
  }
1824
- function Eo(t, e = {}, o, n) {
1880
+ function Lo(t, e = {}, o, n) {
1825
1881
  for (var i in o) {
1826
1882
  var r = o[i];
1827
1883
  e[i] !== r && (o[i] == null ? t.style.removeProperty(i) : t.style.setProperty(i, r, n));
1828
1884
  }
1829
1885
  }
1830
- function jn(t, e, o, n) {
1886
+ function Fn(t, e, o, n) {
1831
1887
  var i = t.__style;
1832
- if (L || i !== e) {
1833
- var r = Rs(e, n);
1834
- (!L || r !== t.getAttribute("style")) && (r == null ? t.removeAttribute("style") : t.style.cssText = r), t.__style = e;
1835
- } else n && (Array.isArray(n) ? (Eo(t, o?.[0], n[0]), Eo(t, o?.[1], n[1], "important")) : Eo(t, o, n));
1888
+ if (P || i !== e) {
1889
+ var r = qs(e, n);
1890
+ (!P || r !== t.getAttribute("style")) && (r == null ? t.removeAttribute("style") : t.style.cssText = r), t.__style = e;
1891
+ } else n && (Array.isArray(n) ? (Lo(t, o?.[0], n[0]), Lo(t, o?.[1], n[1], "important")) : Lo(t, o, n));
1836
1892
  return n;
1837
1893
  }
1838
- var Ns = Symbol("is custom element"), Vs = Symbol("is html"), Ws = Ar ? "link" : "LINK";
1839
- function zn(t, e, o, n) {
1840
- var i = js(t);
1841
- L && (i[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === Ws) || i[e] !== (i[e] = o) && (e === "loading" && (t[kr] = o), o == null ? t.removeAttribute(e) : typeof o != "string" && zs(t).includes(e) ? t[e] = o : t.setAttribute(e, o));
1894
+ var Hs = Symbol("is custom element"), Ds = Symbol("is html"), Bs = Mr ? "link" : "LINK";
1895
+ function Gn(t, e, o, n) {
1896
+ var i = Fs(t);
1897
+ P && (i[e] = t.getAttribute(e), e === "src" || e === "srcset" || e === "href" && t.nodeName === Bs) || i[e] !== (i[e] = o) && (e === "loading" && (t[Er] = o), o == null ? t.removeAttribute(e) : typeof o != "string" && Gs(t).includes(e) ? t[e] = o : t.setAttribute(e, o));
1842
1898
  }
1843
- function js(t) {
1899
+ function Fs(t) {
1844
1900
  return t.__attributes ?? (t.__attributes = {
1845
- [Ns]: t.nodeName.includes("-"),
1846
- [Vs]: t.namespaceURI === "http://www.w3.org/1999/xhtml"
1901
+ [Hs]: t.nodeName.includes("-"),
1902
+ [Ds]: t.namespaceURI === "http://www.w3.org/1999/xhtml"
1847
1903
  });
1848
1904
  }
1849
- var Hn = /* @__PURE__ */ new Map();
1850
- function zs(t) {
1851
- var e = t.getAttribute("is") || t.nodeName, o = Hn.get(e);
1905
+ var Un = /* @__PURE__ */ new Map();
1906
+ function Gs(t) {
1907
+ var e = t.getAttribute("is") || t.nodeName, o = Un.get(e);
1852
1908
  if (o) return o;
1853
- Hn.set(e, o = []);
1909
+ Un.set(e, o = []);
1854
1910
  for (var n, i = t, r = Element.prototype; r !== i; ) {
1855
- n = mr(i);
1911
+ n = Ir(i);
1856
1912
  for (var s in n) n[s].set && o.push(s);
1857
- i = Qn(i);
1913
+ i = ri(i);
1858
1914
  }
1859
1915
  return o;
1860
1916
  }
1861
- var Zi, de = /* @__PURE__ */ new WeakMap(), fo = /* @__PURE__ */ new WeakMap(), Mo = /* @__PURE__ */ new WeakMap(), Dn = /* @__PURE__ */ new WeakSet(), Xi = class {
1917
+ var er, de = /* @__PURE__ */ new WeakMap(), go = /* @__PURE__ */ new WeakMap(), Po = /* @__PURE__ */ new WeakMap(), Kn = /* @__PURE__ */ new WeakSet(), or = class {
1862
1918
  constructor(t) {
1863
- Xo(this, Dn), $(this, de, /* @__PURE__ */ new WeakMap()), $(this, fo, void 0), $(this, Mo, void 0), T(Mo, this, t);
1919
+ nn(this, Kn), I(this, de, /* @__PURE__ */ new WeakMap()), I(this, go, void 0), I(this, Po, void 0), $(Po, this, t);
1864
1920
  }
1865
1921
  observe(t, e) {
1866
- var o = u(de, this).get(t) || /* @__PURE__ */ new Set();
1867
- return o.add(e), u(de, this).set(t, o), O(Dn, this, Hs).call(this).observe(t, u(Mo, this)), () => {
1868
- var n = u(de, this).get(t);
1869
- n.delete(e), n.size === 0 && (u(de, this).delete(t), u(fo, this).unobserve(t));
1922
+ var o = c(de, this).get(t) || /* @__PURE__ */ new Set();
1923
+ return o.add(e), c(de, this).set(t, o), E(Kn, this, Us).call(this).observe(t, c(Po, this)), () => {
1924
+ var n = c(de, this).get(t);
1925
+ n.delete(e), n.size === 0 && (c(de, this).delete(t), c(go, this).unobserve(t));
1870
1926
  };
1871
1927
  }
1872
1928
  };
1873
- Zi = Xi;
1874
- function Hs() {
1875
- return u(fo, this) ?? T(fo, this, new ResizeObserver((t) => {
1929
+ er = or;
1930
+ function Us() {
1931
+ return c(go, this) ?? $(go, this, new ResizeObserver((t) => {
1876
1932
  for (var e of t) {
1877
- Zi.entries.set(e.target, e);
1878
- for (var o of u(de, this).get(e.target) || []) o(e);
1933
+ er.entries.set(e.target, e);
1934
+ for (var o of c(de, this).get(e.target) || []) o(e);
1879
1935
  }
1880
1936
  }));
1881
1937
  }
1882
- y(Xi, "entries", /* @__PURE__ */ new WeakMap());
1883
- function qn(t, e) {
1884
- return t === e || t?.[Ce] === e;
1885
- }
1886
- function Bn(t = {}, e, o, n) {
1887
- var i = W.r, r = k;
1888
- return Ri(() => {
1889
- var s, l;
1890
- return sn(() => {
1891
- s = l, l = n?.() || [], dn(() => {
1892
- t !== o(...l) && (e(t, ...l), s && qn(o(...s), t) && e(null, ...s));
1938
+ y(or, "entries", /* @__PURE__ */ new WeakMap());
1939
+ function Jn(t, e) {
1940
+ return t === e || t?.[Le] === e;
1941
+ }
1942
+ function Zn(t = {}, e, o, n) {
1943
+ var i = j.r, r = S;
1944
+ return zi(() => {
1945
+ var s, a;
1946
+ return pn(() => {
1947
+ s = a, a = n?.() || [], yn(() => {
1948
+ t !== o(...a) && (e(t, ...a), s && Jn(o(...s), t) && e(null, ...s));
1893
1949
  });
1894
1950
  }), () => {
1895
- let a = r;
1896
- for (; a !== i && a.parent !== null && a.parent.f & 33554432; ) a = a.parent;
1897
- const c = () => {
1898
- l && qn(o(...l), t) && e(null, ...l);
1899
- }, d = a.teardown;
1900
- a.teardown = () => {
1901
- c(), d?.();
1951
+ let u = r;
1952
+ for (; u !== i && u.parent !== null && u.parent.f & 33554432; ) u = u.parent;
1953
+ const l = () => {
1954
+ a && Jn(o(...a), t) && e(null, ...a);
1955
+ }, d = u.teardown;
1956
+ u.teardown = () => {
1957
+ l(), d?.();
1902
1958
  };
1903
1959
  };
1904
1960
  }), t;
1905
1961
  }
1906
- function Lo(t, e, o, n) {
1907
- var i = !bo || (o & 2) !== 0, r = (o & 8) !== 0, s = (o & 16) !== 0, l = n, a = !0, c = () => (a && (a = !1, l = s ? dn(n) : n), l);
1962
+ function Oo(t, e, o, n) {
1963
+ var i = !To || (o & 2) !== 0, r = (o & 8) !== 0, s = (o & 16) !== 0, a = n, u = !0, l = () => (u && (u = !1, a = s ? yn(n) : n), a);
1908
1964
  let d;
1909
1965
  if (r) {
1910
- var f = Ce in t || ei in t;
1911
- d = Zt(t, e)?.set ?? (f && e in t ? (x) => t[e] = x : void 0);
1966
+ var h = Le in t || ai in t;
1967
+ d = Yt(t, e)?.set ?? (h && e in t ? (A) => t[e] = A : void 0);
1912
1968
  }
1913
- var h, v = !1;
1914
- r ? [h, v] = Fr(() => t[e]) : h = t[e], h === void 0 && n !== void 0 && (h = c(), d && (i && Pr(e), d(h)));
1969
+ var f, v = !1;
1970
+ r ? [f, v] = Yr(() => t[e]) : f = t[e], f === void 0 && n !== void 0 && (f = l(), d && (i && jr(e), d(f)));
1915
1971
  var m;
1916
1972
  if (i ? m = () => {
1917
- var x = t[e];
1918
- return x === void 0 ? c() : (a = !0, x);
1973
+ var A = t[e];
1974
+ return A === void 0 ? l() : (u = !0, A);
1919
1975
  } : m = () => {
1920
- var x = t[e];
1921
- return x !== void 0 && (l = void 0), x === void 0 ? l : x;
1976
+ var A = t[e];
1977
+ return A !== void 0 && (a = void 0), A === void 0 ? a : A;
1922
1978
  }, i && !(o & 4)) return m;
1923
1979
  if (d) {
1924
- var S = t.$$legacy;
1925
- return function(x, P) {
1926
- return arguments.length > 0 ? ((!i || !P || S || v) && d(P ? m() : x), x) : m();
1980
+ var k = t.$$legacy;
1981
+ return function(A, O) {
1982
+ return arguments.length > 0 ? ((!i || !O || k || v) && d(O ? m() : A), A) : m();
1927
1983
  };
1928
1984
  }
1929
- var p = !1, w = (o & 1 ? yo : tn)(() => (p = !1, m()));
1985
+ var p = !1, w = (o & 1 ? Io : cn)(() => (p = !1, m()));
1930
1986
  r && g(w);
1931
- var R = k;
1932
- return function(x, P) {
1987
+ var R = S;
1988
+ return function(A, O) {
1933
1989
  if (arguments.length > 0) {
1934
- const U = P ? g(w) : i && r ? Kt(x) : x;
1935
- return _(w, U), p = !0, l !== void 0 && (l = U), x;
1990
+ const K = O ? g(w) : i && r ? Jt(A) : A;
1991
+ return C(w, K), p = !0, a !== void 0 && (a = K), A;
1936
1992
  }
1937
- return Ht && p || R.f & 16384 ? w.v : g(w);
1993
+ return Ot && p || R.f & 16384 ? w.v : g(w);
1938
1994
  };
1939
1995
  }
1940
- function Ds(t) {
1941
- return new qs(t);
1996
+ function Ks(t) {
1997
+ return new Js(t);
1942
1998
  }
1943
- var Ft = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), qs = class {
1999
+ var Gt = /* @__PURE__ */ new WeakMap(), bt = /* @__PURE__ */ new WeakMap(), Js = class {
1944
2000
  constructor(t) {
1945
- $(this, Ft, void 0), $(this, vt, void 0);
2001
+ I(this, Gt, void 0), I(this, bt, void 0);
1946
2002
  var e = /* @__PURE__ */ new Map(), o = (i, r) => {
1947
- var s = /* @__PURE__ */ Ai(r, !1, !1);
2003
+ var s = /* @__PURE__ */ Mi(r, !1, !1);
1948
2004
  return e.set(i, s), s;
1949
2005
  };
1950
2006
  const n = new Proxy({
@@ -1955,13 +2011,13 @@ var Ft = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), qs =
1955
2011
  return g(e.get(r) ?? o(r, Reflect.get(i, r)));
1956
2012
  },
1957
2013
  has(i, r) {
1958
- return r === ei ? !0 : (g(e.get(r) ?? o(r, Reflect.get(i, r))), Reflect.has(i, r));
2014
+ return r === ai ? !0 : (g(e.get(r) ?? o(r, Reflect.get(i, r))), Reflect.has(i, r));
1959
2015
  },
1960
2016
  set(i, r, s) {
1961
- return _(e.get(r) ?? o(r, s), s), Reflect.set(i, r, s);
2017
+ return C(e.get(r) ?? o(r, s), s), Reflect.set(i, r, s);
1962
2018
  }
1963
2019
  });
1964
- T(vt, this, (t.hydrate ? As : Ki)(t.component, {
2020
+ $(bt, this, (t.hydrate ? Ls : Qi)(t.component, {
1965
2021
  target: t.target,
1966
2022
  anchor: t.anchor,
1967
2023
  props: n,
@@ -1969,37 +2025,37 @@ var Ft = /* @__PURE__ */ new WeakMap(), vt = /* @__PURE__ */ new WeakMap(), qs =
1969
2025
  intro: t.intro ?? !1,
1970
2026
  recover: t.recover,
1971
2027
  transformError: t.transformError
1972
- })), !zt && (!t?.props?.$$host || t.sync === !1) && Ye(), T(Ft, this, n.$$events);
1973
- for (const i of Object.keys(u(vt, this))) i === "$set" || i === "$destroy" || i === "$on" || so(this, i, {
2028
+ })), !Pt && (!t?.props?.$$host || t.sync === !1) && eo(), $(Gt, this, n.$$events);
2029
+ for (const i of Object.keys(c(bt, this))) i === "$set" || i === "$destroy" || i === "$on" || co(this, i, {
1974
2030
  get() {
1975
- return u(vt, this)[i];
2031
+ return c(bt, this)[i];
1976
2032
  },
1977
2033
  set(r) {
1978
- u(vt, this)[i] = r;
2034
+ c(bt, this)[i] = r;
1979
2035
  },
1980
2036
  enumerable: !0
1981
2037
  });
1982
- u(vt, this).$set = (i) => {
2038
+ c(bt, this).$set = (i) => {
1983
2039
  Object.assign(n, i);
1984
- }, u(vt, this).$destroy = () => {
1985
- xs(u(vt, this));
2040
+ }, c(bt, this).$destroy = () => {
2041
+ Ps(c(bt, this));
1986
2042
  };
1987
2043
  }
1988
2044
  $set(t) {
1989
- u(vt, this).$set(t);
2045
+ c(bt, this).$set(t);
1990
2046
  }
1991
2047
  $on(t, e) {
1992
- u(Ft, this)[t] = u(Ft, this)[t] || [];
2048
+ c(Gt, this)[t] = c(Gt, this)[t] || [];
1993
2049
  const o = (...n) => e.call(this, ...n);
1994
- return u(Ft, this)[t].push(o), () => {
1995
- u(Ft, this)[t] = u(Ft, this)[t].filter((n) => n !== o);
2050
+ return c(Gt, this)[t].push(o), () => {
2051
+ c(Gt, this)[t] = c(Gt, this)[t].filter((n) => n !== o);
1996
2052
  };
1997
2053
  }
1998
2054
  $destroy() {
1999
- u(vt, this).$destroy();
2055
+ c(bt, this).$destroy();
2000
2056
  }
2001
- }, Yi;
2002
- typeof HTMLElement == "function" && (Yi = class extends HTMLElement {
2057
+ }, nr;
2058
+ typeof HTMLElement == "function" && (nr = class extends HTMLElement {
2003
2059
  constructor(t, e, o) {
2004
2060
  super(), y(this, "$$ctor", void 0), y(this, "$$s", void 0), y(this, "$$c", void 0), y(this, "$$cn", !1), y(this, "$$d", {}), y(this, "$$r", !1), y(this, "$$p_d", {}), y(this, "$$l", {}), y(this, "$$l_u", /* @__PURE__ */ new Map()), y(this, "$$me", void 0), y(this, "$$shadowRoot", null), this.$$ctor = t, this.$$s = e, o && (this.$$shadowRoot = this.attachShadow(o));
2005
2061
  }
@@ -2020,19 +2076,19 @@ typeof HTMLElement == "function" && (Yi = class extends HTMLElement {
2020
2076
  if (this.$$cn = !0, !this.$$c) {
2021
2077
  let t = function(n) {
2022
2078
  return (i) => {
2023
- const r = on("slot");
2024
- n !== "default" && (r.name = n), Pt(i, r);
2079
+ const r = dn("slot");
2080
+ n !== "default" && (r.name = n), Vt(i, r);
2025
2081
  };
2026
2082
  };
2027
2083
  if (await Promise.resolve(), !this.$$cn || this.$$c) return;
2028
- const e = {}, o = Bs(this);
2084
+ const e = {}, o = Zs(this);
2029
2085
  for (const n of this.$$s) n in o && (n === "default" && !this.$$d.children ? (this.$$d.children = t(n), e.default = !0) : e[n] = t(n));
2030
2086
  for (const n of this.attributes) {
2031
2087
  const i = this.$$g_p(n.name);
2032
- i in this.$$d || (this.$$d[i] = eo(i, n.value, this.$$p_d, "toProp"));
2088
+ i in this.$$d || (this.$$d[i] = io(i, n.value, this.$$p_d, "toProp"));
2033
2089
  }
2034
2090
  for (const n in this.$$p_d) !(n in this.$$d) && this[n] !== void 0 && (this.$$d[n] = this[n], delete this[n]);
2035
- this.$$c = Ds({
2091
+ this.$$c = Ks({
2036
2092
  component: this.$$ctor,
2037
2093
  target: this.$$shadowRoot || this,
2038
2094
  props: {
@@ -2040,13 +2096,13 @@ typeof HTMLElement == "function" && (Yi = class extends HTMLElement {
2040
2096
  $$slots: e,
2041
2097
  $$host: this
2042
2098
  }
2043
- }), this.$$me = hs(() => {
2044
- sn(() => {
2099
+ }), this.$$me = bs(() => {
2100
+ pn(() => {
2045
2101
  this.$$r = !0;
2046
- for (const n of ro(this.$$c)) {
2102
+ for (const n of lo(this.$$c)) {
2047
2103
  if (!this.$$p_d[n]?.reflect) continue;
2048
2104
  this.$$d[n] = this.$$c[n];
2049
- const i = eo(n, this.$$d[n], this.$$p_d, "toAttribute");
2105
+ const i = io(n, this.$$d[n], this.$$p_d, "toAttribute");
2050
2106
  i == null ? this.removeAttribute(this.$$p_d[n].attribute || n) : this.setAttribute(this.$$p_d[n].attribute || n, i);
2051
2107
  }
2052
2108
  this.$$r = !1;
@@ -2060,7 +2116,7 @@ typeof HTMLElement == "function" && (Yi = class extends HTMLElement {
2060
2116
  }
2061
2117
  }
2062
2118
  attributeChangedCallback(t, e, o) {
2063
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = eo(t, o, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
2119
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = io(t, o, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
2064
2120
  }
2065
2121
  disconnectedCallback() {
2066
2122
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -2068,10 +2124,10 @@ typeof HTMLElement == "function" && (Yi = class extends HTMLElement {
2068
2124
  });
2069
2125
  }
2070
2126
  $$g_p(t) {
2071
- return ro(this.$$p_d).find((e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t) || t;
2127
+ return lo(this.$$p_d).find((e) => this.$$p_d[e].attribute === t || !this.$$p_d[e].attribute && e.toLowerCase() === t) || t;
2072
2128
  }
2073
2129
  });
2074
- function eo(t, e, o, n) {
2130
+ function io(t, e, o, n) {
2075
2131
  const i = o[t]?.type;
2076
2132
  if (e = i === "Boolean" && typeof e != "boolean" ? e != null : e, !n || !o[t]) return e;
2077
2133
  if (n === "toAttribute") switch (i) {
@@ -2097,46 +2153,46 @@ function eo(t, e, o, n) {
2097
2153
  return e;
2098
2154
  }
2099
2155
  }
2100
- function Bs(t) {
2156
+ function Zs(t) {
2101
2157
  const e = {};
2102
2158
  return t.childNodes.forEach((o) => {
2103
2159
  e[o.slot || "default"] = !0;
2104
2160
  }), e;
2105
2161
  }
2106
- function Fs(t, e, o, n, i, r) {
2107
- let s = class extends Yi {
2162
+ function Ys(t, e, o, n, i, r) {
2163
+ let s = class extends nr {
2108
2164
  constructor() {
2109
2165
  super(t, o, i), this.$$p_d = e;
2110
2166
  }
2111
2167
  static get observedAttributes() {
2112
- return ro(e).map((l) => (e[l].attribute || l).toLowerCase());
2168
+ return lo(e).map((a) => (e[a].attribute || a).toLowerCase());
2113
2169
  }
2114
2170
  };
2115
- return ro(e).forEach((l) => {
2116
- so(s.prototype, l, {
2171
+ return lo(e).forEach((a) => {
2172
+ co(s.prototype, a, {
2117
2173
  get() {
2118
- return this.$$c && l in this.$$c ? this.$$c[l] : this.$$d[l];
2174
+ return this.$$c && a in this.$$c ? this.$$c[a] : this.$$d[a];
2119
2175
  },
2120
- set(a) {
2121
- a = eo(l, a, e), this.$$d[l] = a;
2122
- var c = this.$$c;
2123
- c && (Zt(c, l)?.get ? c[l] = a : c.$set({ [l]: a }));
2176
+ set(u) {
2177
+ u = io(a, u, e), this.$$d[a] = u;
2178
+ var l = this.$$c;
2179
+ l && (Yt(l, a)?.get ? l[a] = u : l.$set({ [a]: u }));
2124
2180
  }
2125
2181
  });
2126
- }), n.forEach((l) => {
2127
- so(s.prototype, l, { get() {
2128
- return this.$$c?.[l];
2182
+ }), n.forEach((a) => {
2183
+ co(s.prototype, a, { get() {
2184
+ return this.$$c?.[a];
2129
2185
  } });
2130
2186
  }), r && (s = r(s)), t.element = s, s;
2131
2187
  }
2132
- var Gs = class extends Event {
2188
+ var Xs = class extends Event {
2133
2189
  constructor(t, e, o, n) {
2134
2190
  super("context-request", {
2135
2191
  bubbles: !0,
2136
2192
  composed: !0
2137
2193
  }), y(this, "context", void 0), y(this, "contextTarget", void 0), y(this, "callback", void 0), y(this, "subscribe", void 0), this.context = t, this.contextTarget = e, this.callback = o, this.subscribe = n ?? !1;
2138
2194
  }
2139
- }, Us = class {
2195
+ }, Qs = class {
2140
2196
  constructor(t, e) {
2141
2197
  y(this, "host", void 0), y(this, "context", void 0), y(this, "subscribe", void 0), y(this, "onValue", void 0), y(this, "isConnected", !1), y(this, "unsubscribe", void 0), y(this, "currentValue", void 0), y(this, "handleValue", (o, n) => {
2142
2198
  n !== this.unsubscribe && (this.unsubscribe?.(), this.unsubscribe = n), !this.subscribe && this.unsubscribe && (this.unsubscribe(), this.unsubscribe = void 0), this.currentValue = o, this.onValue?.(o);
@@ -2152,59 +2208,59 @@ var Gs = class extends Event {
2152
2208
  return this.currentValue;
2153
2209
  }
2154
2210
  requestValue() {
2155
- this.host.dispatchEvent(new Gs(this.context, this.host, this.handleValue, this.subscribe));
2211
+ this.host.dispatchEvent(new Xs(this.context, this.host, this.handleValue, this.subscribe));
2156
2212
  }
2157
- }, wo = (t) => t;
2158
- wo(Symbol.for("pie.assessmentToolkit.runtimeContext"));
2159
- wo(Symbol.for("pie.assessmentToolkit.hostRuntimeContext"));
2160
- var Ks = wo(Symbol.for("pie.assessmentToolkit.shellContext")), Js = wo(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2161
- function Qi(t, e, o) {
2213
+ }, ko = (t) => t;
2214
+ ko(Symbol.for("pie.assessmentToolkit.runtimeContext"));
2215
+ ko(Symbol.for("pie.assessmentToolkit.hostRuntimeContext"));
2216
+ var ta = ko(Symbol.for("pie.assessmentToolkit.shellContext")), ea = ko(Symbol.for("pie.assessmentToolkit.regionScopeContext"));
2217
+ function ir(t, e, o) {
2162
2218
  let n = !1;
2163
- const i = new Us(t, {
2219
+ const i = new Qs(t, {
2164
2220
  context: e,
2165
2221
  subscribe: !0,
2166
- onValue: (c) => {
2167
- n = !0, o(c);
2222
+ onValue: (l) => {
2223
+ n = !0, o(l);
2168
2224
  }
2169
2225
  });
2170
2226
  i.connect();
2171
- const r = (c) => {
2172
- c.context === e && i.requestValue();
2227
+ const r = (l) => {
2228
+ l.context === e && i.requestValue();
2173
2229
  };
2174
2230
  t.addEventListener("context-provider", r);
2175
2231
  let s = 0;
2176
- const l = 200, a = globalThis.setInterval(() => {
2177
- if (n || s >= l) {
2178
- globalThis.clearInterval(a);
2232
+ const a = 200, u = globalThis.setInterval(() => {
2233
+ if (n || s >= a) {
2234
+ globalThis.clearInterval(u);
2179
2235
  return;
2180
2236
  }
2181
2237
  s += 1, i.requestValue();
2182
2238
  }, 50);
2183
2239
  return () => {
2184
- globalThis.clearInterval(a), t.removeEventListener("context-provider", r), i.disconnect();
2240
+ globalThis.clearInterval(u), t.removeEventListener("context-provider", r), i.disconnect();
2185
2241
  };
2186
2242
  }
2187
- function Zs(t, e) {
2188
- return Qi(t, Ks, e);
2243
+ function oa(t, e) {
2244
+ return ir(t, ta, e);
2189
2245
  }
2190
- function Xs(t, e) {
2191
- return Qi(t, Js, e);
2246
+ function na(t, e) {
2247
+ return ir(t, ea, e);
2192
2248
  }
2193
- var Fn;
2249
+ var Yn;
2194
2250
  (function(t) {
2195
2251
  t.TTS_WORD = "tts-word", t.TTS_SENTENCE = "tts-sentence", t.ANNOTATION = "annotation";
2196
- })(Fn || (Fn = {}));
2197
- var Rt;
2252
+ })(Yn || (Yn = {}));
2253
+ var zt;
2198
2254
  (function(t) {
2199
2255
  t.YELLOW = "yellow", t.GREEN = "green", t.BLUE = "blue", t.PINK = "pink", t.ORANGE = "orange", t.UNDERLINE = "underline";
2200
- })(Rt || (Rt = {}));
2201
- function tr(t) {
2256
+ })(zt || (zt = {}));
2257
+ function rr(t) {
2202
2258
  return (...e) => {
2203
2259
  console.debug(`[${t}]`, ...e);
2204
2260
  };
2205
2261
  }
2206
- tr("I18nService");
2207
- var Oo = {
2262
+ rr("I18nService");
2263
+ var Ro = {
2208
2264
  assessment: [],
2209
2265
  section: [],
2210
2266
  item: [],
@@ -2212,11 +2268,11 @@ var Oo = {
2212
2268
  rubric: [],
2213
2269
  element: []
2214
2270
  };
2215
- [...Oo.section], [...Oo.item], [...Oo.passage];
2216
- function Ys(t) {
2271
+ [...Ro.section], [...Ro.item], [...Ro.passage];
2272
+ function ia(t) {
2217
2273
  return t.trim() || "";
2218
2274
  }
2219
- var Qs = [
2275
+ var ra = [
2220
2276
  "assessment",
2221
2277
  "section",
2222
2278
  "item",
@@ -2224,13 +2280,38 @@ var Qs = [
2224
2280
  "rubric",
2225
2281
  "element"
2226
2282
  ];
2227
- function oo(t, e) {
2283
+ function ro(t, e) {
2228
2284
  if (typeof t != "string" || t.trim().length === 0) throw new Error(`Invalid tool registration: "${e}" must be a non-empty string.`);
2229
2285
  }
2230
- function Gn(t) {
2231
- if (oo(t.toolId, "toolId"), oo(t.name, "name"), oo(t.description, "description"), typeof t.icon != "string" && typeof t.icon != "function") throw new Error(`Invalid tool registration "${t.toolId}": "icon" must be a string or function.`);
2232
- if (!Array.isArray(t.supportedLevels) || t.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${t.toolId}": "supportedLevels" must be a non-empty array.`);
2233
- const e = t.supportedLevels.find((o) => !Qs.includes(o));
2286
+ var sa = [
2287
+ {
2288
+ pattern: /<script\b/i,
2289
+ reason: "contains a <script> tag"
2290
+ },
2291
+ {
2292
+ pattern: /\son[a-z]+\s*=/i,
2293
+ reason: "contains an inline event handler (on*=) attribute"
2294
+ },
2295
+ {
2296
+ pattern: /javascript:/i,
2297
+ reason: "contains a javascript: URL"
2298
+ },
2299
+ {
2300
+ pattern: /<foreignObject\b/i,
2301
+ reason: "contains a <foreignObject> element"
2302
+ }
2303
+ ];
2304
+ function aa(t, e, o) {
2305
+ const n = e.trimStart(), i = n.toLowerCase().startsWith("<svg"), r = /^https?:/i.test(n);
2306
+ if (/^data:/i.test(n)) throw new Error(`Invalid tool registration "${t}": "${o}" may not be a data: URL.`);
2307
+ if (!(!i && !r)) {
2308
+ for (const { pattern: s, reason: a } of sa) if (s.test(e)) throw new Error(`Invalid tool registration "${t}": "${o}" ${a}. Inline SVG icons must not include scriptable content.`);
2309
+ }
2310
+ }
2311
+ function Xn(t) {
2312
+ if (ro(t.toolId, "toolId"), ro(t.name, "name"), ro(t.description, "description"), typeof t.icon != "string" && typeof t.icon != "function") throw new Error(`Invalid tool registration "${t.toolId}": "icon" must be a string or function.`);
2313
+ if (typeof t.icon == "string" && aa(t.toolId, t.icon, "icon"), !Array.isArray(t.supportedLevels) || t.supportedLevels.length === 0) throw new Error(`Invalid tool registration "${t.toolId}": "supportedLevels" must be a non-empty array.`);
2314
+ const e = t.supportedLevels.find((o) => !ra.includes(o));
2234
2315
  if (e) throw new Error(`Invalid tool registration "${t.toolId}": unsupported level "${e}".`);
2235
2316
  if (t.activation !== void 0 && t.activation !== "toolbar-toggle" && t.activation !== "selection-gateway") throw new Error(`Invalid tool registration "${t.toolId}": unsupported activation "${String(t.activation)}".`);
2236
2317
  if (t.singletonScope !== void 0 && t.singletonScope !== "section") throw new Error(`Invalid tool registration "${t.toolId}": unsupported singletonScope "${String(t.singletonScope)}".`);
@@ -2239,22 +2320,22 @@ function Gn(t) {
2239
2320
  if (typeof t.isVisibleInContext != "function") throw new Error(`Invalid tool registration "${t.toolId}": "isVisibleInContext" must be a function.`);
2240
2321
  if (typeof t.renderToolbar != "function") throw new Error(`Invalid tool registration "${t.toolId}": "renderToolbar" must be a function.`);
2241
2322
  }
2242
- var tl = class {
2323
+ var la = class {
2243
2324
  constructor() {
2244
2325
  y(this, "tools", /* @__PURE__ */ new Map()), y(this, "pnpIndex", /* @__PURE__ */ new Map()), y(this, "componentOverrides", {}), y(this, "moduleLoaders", /* @__PURE__ */ new Map()), y(this, "loadedToolModules", /* @__PURE__ */ new Set()), y(this, "moduleLoadPromises", /* @__PURE__ */ new Map());
2245
2326
  }
2246
2327
  normalizeToolId(t) {
2247
- return Ys(t);
2328
+ return ia(t);
2248
2329
  }
2249
2330
  normalizeToolIds(t) {
2250
2331
  return t.map((e) => this.normalizeToolId(e));
2251
2332
  }
2252
2333
  register(t) {
2253
- if (Gn(t), this.tools.has(t.toolId)) throw new Error(`Tool '${t.toolId}' is already registered`);
2334
+ if (Xn(t), this.tools.has(t.toolId)) throw new Error(`Tool '${t.toolId}' is already registered`);
2254
2335
  if (this.tools.set(t.toolId, t), t.pnpSupportIds) for (const e of t.pnpSupportIds) this.pnpIndex.has(e) || this.pnpIndex.set(e, /* @__PURE__ */ new Set()), this.pnpIndex.get(e).add(t.toolId);
2255
2336
  }
2256
2337
  override(t) {
2257
- if (Gn(t), !this.tools.has(t.toolId)) throw new Error(`Cannot override non-existent tool '${t.toolId}'`);
2338
+ if (Xn(t), !this.tools.has(t.toolId)) throw new Error(`Cannot override non-existent tool '${t.toolId}'`);
2258
2339
  const e = this.tools.get(t.toolId);
2259
2340
  if (e.pnpSupportIds) for (const o of e.pnpSupportIds) this.pnpIndex.get(o)?.delete(t.toolId);
2260
2341
  if (this.tools.set(t.toolId, t), t.pnpSupportIds) for (const o of t.pnpSupportIds) this.pnpIndex.has(o) || this.pnpIndex.set(o, /* @__PURE__ */ new Set()), this.pnpIndex.get(o).add(t.toolId);
@@ -2336,7 +2417,7 @@ var tl = class {
2336
2417
  }
2337
2418
  setToolModuleLoaders(t) {
2338
2419
  for (const [e, o] of Object.entries(t)) if (o) {
2339
- if (oo(e, "tool module loader id"), typeof o != "function") throw new Error(`Invalid tool module loader for "${e}": expected a function.`);
2420
+ if (ro(e, "tool module loader id"), typeof o != "function") throw new Error(`Invalid tool module loader for "${e}": expected a function.`);
2340
2421
  this.moduleLoaders.set(e, o);
2341
2422
  }
2342
2423
  }
@@ -2378,70 +2459,70 @@ var tl = class {
2378
2459
  return n.renderToolbar(e, i);
2379
2460
  }
2380
2461
  };
2381
- function er(t) {
2462
+ function sr(t) {
2382
2463
  return t.level === "item";
2383
2464
  }
2384
- function el(t) {
2465
+ function ca(t) {
2385
2466
  return t.level === "passage";
2386
2467
  }
2387
- function ol(t) {
2468
+ function ua(t) {
2388
2469
  return t.level === "rubric";
2389
2470
  }
2390
- function or(t) {
2471
+ function ar(t) {
2391
2472
  return t.level === "element";
2392
2473
  }
2393
- function hn(t) {
2394
- if (or(t)) {
2474
+ function wn(t) {
2475
+ if (ar(t)) {
2395
2476
  const e = t.item.config;
2396
2477
  if (!e) return "";
2397
- const o = [], n = (l) => l.replace(/<[^>]*>/g, " ").trim(), i = e.elements?.[t.elementId];
2478
+ const o = [], n = (a) => a.replace(/<[^>]*>/g, " ").trim(), i = e.elements?.[t.elementId];
2398
2479
  i && typeof i == "string" && o.push(n(i));
2399
- const r = e.models, s = (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).find((l) => l && typeof l == "object" && l.id === t.elementId);
2480
+ const r = e.models, s = (Array.isArray(r) ? r : r && typeof r == "object" ? Object.values(r) : []).find((a) => a && typeof a == "object" && a.id === t.elementId);
2400
2481
  if (s) {
2401
- for (const l of Object.values(s)) if (typeof l == "string" && o.push(n(l)), Array.isArray(l)) {
2402
- for (const a of l) if (a && typeof a == "object") for (const c of Object.values(a)) typeof c == "string" && o.push(n(c));
2482
+ for (const a of Object.values(s)) if (typeof a == "string" && o.push(n(a)), Array.isArray(a)) {
2483
+ for (const u of a) if (u && typeof u == "object") for (const l of Object.values(u)) typeof l == "string" && o.push(n(l));
2403
2484
  }
2404
2485
  }
2405
2486
  return o.filter(Boolean).join(" ").trim();
2406
2487
  }
2407
- if (er(t)) {
2488
+ if (sr(t)) {
2408
2489
  const e = t.item;
2409
2490
  if (!e?.config) return "";
2410
- const o = e.config, n = [], i = (a) => a.replace(/<[^>]*>/g, " ").trim();
2491
+ const o = e.config, n = [], i = (u) => u.replace(/<[^>]*>/g, " ").trim();
2411
2492
  typeof o.markup == "string" && n.push(i(o.markup));
2412
2493
  const r = o.elements;
2413
- if (r && typeof r == "object") for (const a of Object.values(r)) typeof a == "string" && n.push(i(a));
2414
- const s = o.models, l = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
2415
- for (const a of l) if (!(!a || typeof a != "object")) {
2416
- for (const c of Object.values(a)) if (typeof c == "string" && n.push(i(c)), Array.isArray(c)) {
2417
- for (const d of c) if (d && typeof d == "object") for (const f of Object.values(d)) typeof f == "string" && n.push(i(f));
2494
+ if (r && typeof r == "object") for (const u of Object.values(r)) typeof u == "string" && n.push(i(u));
2495
+ const s = o.models, a = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
2496
+ for (const u of a) if (!(!u || typeof u != "object")) {
2497
+ for (const l of Object.values(u)) if (typeof l == "string" && n.push(i(l)), Array.isArray(l)) {
2498
+ for (const d of l) if (d && typeof d == "object") for (const h of Object.values(d)) typeof h == "string" && n.push(i(h));
2418
2499
  }
2419
2500
  }
2420
2501
  return n.filter(Boolean).join(" ").trim();
2421
2502
  }
2422
- if (el(t)) {
2503
+ if (ca(t)) {
2423
2504
  const e = t.passage;
2424
2505
  if (!e?.config) return "";
2425
- const o = e.config, n = [], i = (a) => a.replace(/<[^>]*>/g, " ").trim();
2506
+ const o = e.config, n = [], i = (u) => u.replace(/<[^>]*>/g, " ").trim();
2426
2507
  typeof o.markup == "string" && n.push(i(o.markup)), typeof o.content == "string" && n.push(i(o.content)), typeof o.prompt == "string" && n.push(i(o.prompt));
2427
2508
  const r = o.elements;
2428
- if (r && typeof r == "object") for (const a of Object.values(r)) typeof a == "string" && n.push(i(a));
2429
- const s = o.models, l = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
2430
- for (const a of l) if (!(!a || typeof a != "object")) {
2431
- for (const c of Object.values(a)) if (typeof c == "string" && n.push(i(c)), Array.isArray(c)) {
2432
- for (const d of c) if (d && typeof d == "object") for (const f of Object.values(d)) typeof f == "string" && n.push(i(f));
2509
+ if (r && typeof r == "object") for (const u of Object.values(r)) typeof u == "string" && n.push(i(u));
2510
+ const s = o.models, a = Array.isArray(s) ? s : s && typeof s == "object" ? Object.values(s) : [];
2511
+ for (const u of a) if (!(!u || typeof u != "object")) {
2512
+ for (const l of Object.values(u)) if (typeof l == "string" && n.push(i(l)), Array.isArray(l)) {
2513
+ for (const d of l) if (d && typeof d == "object") for (const h of Object.values(d)) typeof h == "string" && n.push(i(h));
2433
2514
  }
2434
2515
  }
2435
2516
  return n.filter(Boolean).join(" ").trim();
2436
2517
  }
2437
- if (ol(t)) {
2518
+ if (ua(t)) {
2438
2519
  const e = t.rubricBlock;
2439
2520
  return e.passage?.config ? (e.passage.config.markup || "").replace(/<[^>]*>/g, " ").trim() : (e.content || "").replace(/<[^>]*>/g, " ").trim();
2440
2521
  }
2441
2522
  return "";
2442
2523
  }
2443
- function no(t) {
2444
- const e = hn(t);
2524
+ function so(t) {
2525
+ const e = wn(t);
2445
2526
  return [
2446
2527
  /<math[>\s]/i,
2447
2528
  /\\\[([^\]]+)\\\]/,
@@ -2451,7 +2532,7 @@ function no(t) {
2451
2532
  /\d+\s*[+\-*/=]\s*\d+/
2452
2533
  ].some((o) => o.test(e));
2453
2534
  }
2454
- function nl(t) {
2535
+ function da(t) {
2455
2536
  const e = [
2456
2537
  "pie-multiple-choice",
2457
2538
  "pie-inline-choice",
@@ -2460,7 +2541,7 @@ function nl(t) {
2460
2541
  "inline-choice",
2461
2542
  "select-text"
2462
2543
  ];
2463
- if (or(t)) {
2544
+ if (ar(t)) {
2464
2545
  const o = t.item.config;
2465
2546
  if (!o?.models) return !1;
2466
2547
  const n = (Array.isArray(o.models) ? o.models : Object.values(o.models)).find((r) => r && typeof r == "object" && r.id === t.elementId);
@@ -2468,7 +2549,7 @@ function nl(t) {
2468
2549
  const i = n.element || "";
2469
2550
  return e.includes(i);
2470
2551
  }
2471
- if (er(t)) {
2552
+ if (sr(t)) {
2472
2553
  const o = t.item.config?.models;
2473
2554
  return (Array.isArray(o) ? o : o && typeof o == "object" ? Object.values(o) : []).some((n) => {
2474
2555
  if (!n || typeof n != "object") return !1;
@@ -2478,11 +2559,11 @@ function nl(t) {
2478
2559
  }
2479
2560
  return !1;
2480
2561
  }
2481
- function io(t) {
2482
- return hn(t).trim().length >= 10;
2562
+ function ao(t) {
2563
+ return wn(t).trim().length >= 10;
2483
2564
  }
2484
- function il(t) {
2485
- const e = hn(t);
2565
+ function ha(t) {
2566
+ const e = wn(t);
2486
2567
  return [
2487
2568
  /chemistry|chemical|element|atom|molecule|compound/i,
2488
2569
  /periodic\s+table/i,
@@ -2492,23 +2573,23 @@ function il(t) {
2492
2573
  /physics|force|energy|velocity|acceleration/i
2493
2574
  ].some((o) => o.test(e));
2494
2575
  }
2495
- var rl = /* @__PURE__ */ new Set([
2576
+ var fa = /* @__PURE__ */ new Set([
2496
2577
  "assessment",
2497
2578
  "section",
2498
2579
  "item",
2499
2580
  "passage",
2500
2581
  "rubric"
2501
2582
  ]);
2502
- function sl(t) {
2503
- return rl.has(t);
2583
+ function pa(t) {
2584
+ return fa.has(t);
2504
2585
  }
2505
- function fn(t, e, o) {
2586
+ function Tn(t, e, o) {
2506
2587
  const n = t.trim(), i = o.trim();
2507
2588
  if (!n || !i) throw new Error("Tool instance ids require non-empty tool and scope ids");
2508
- if (!sl(e)) throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
2589
+ if (!pa(e)) throw new Error(`Unknown tool scope level '${e}'. Register custom levels with registerToolScopeLevel().`);
2509
2590
  return `${n}:${e}:${i}`;
2510
2591
  }
2511
- var ll = class {
2592
+ var va = class {
2512
2593
  constructor() {
2513
2594
  y(this, "providerId", "desmos-calculator"), y(this, "providerName", "Desmos Calculator"), y(this, "category", "calculator"), y(this, "version", "1.10"), y(this, "requiresAuth", !0), y(this, "desmosProvider", null), y(this, "config", null);
2514
2595
  }
@@ -2530,34 +2611,36 @@ var ll = class {
2530
2611
  toolId: "calculator",
2531
2612
  operation: "desmos-provider-module-import",
2532
2613
  backend: "desmos"
2533
- }), this.desmosProvider = new (await (async () => {
2614
+ });
2615
+ const o = await (async () => {
2534
2616
  try {
2535
- const o = await import("./dist-DwP27yIs-cfd207a3.js");
2617
+ const n = await import("./dist-rF11IR1B-adc4857f.js");
2536
2618
  return await this.emitTelemetry("pie-tool-library-load-success", {
2537
2619
  toolId: "calculator",
2538
2620
  operation: "desmos-provider-module-import",
2539
2621
  backend: "desmos",
2540
2622
  duration: Date.now() - e
2541
- }), o;
2542
- } catch (o) {
2623
+ }), n;
2624
+ } catch (n) {
2543
2625
  throw await this.emitTelemetry("pie-tool-library-load-error", {
2544
2626
  toolId: "calculator",
2545
2627
  operation: "desmos-provider-module-import",
2546
2628
  backend: "desmos",
2547
2629
  duration: Date.now() - e,
2548
2630
  errorType: "ToolLibraryLoadError",
2549
- message: o instanceof Error ? o.message : String(o)
2550
- }), o;
2631
+ message: n instanceof Error ? n.message : String(n)
2632
+ }), n;
2551
2633
  }
2552
- })()).DesmosCalculatorProvider();
2634
+ })();
2635
+ this.desmosProvider = new o.DesmosCalculatorProvider();
2553
2636
  try {
2554
2637
  await this.desmosProvider.initialize({
2555
2638
  apiKey: t.apiKey,
2556
2639
  proxyEndpoint: t.proxyEndpoint,
2557
2640
  onTelemetry: t.onTelemetry
2558
2641
  }), console.log(`[DesmosToolProvider] Initialized successfully ${t.proxyEndpoint ? "(using proxy)" : t.apiKey ? "(direct API key)" : "(no auth)"}`);
2559
- } catch (o) {
2560
- throw console.error("[DesmosToolProvider] Initialization failed:", o), /* @__PURE__ */ new Error("Failed to initialize Desmos calculator provider. Check API key or proxy endpoint.");
2642
+ } catch (n) {
2643
+ throw console.error("[DesmosToolProvider] Initialization failed:", n), /* @__PURE__ */ new Error("Failed to initialize Desmos calculator provider. Check API key or proxy endpoint.");
2561
2644
  }
2562
2645
  }
2563
2646
  async createInstance(t) {
@@ -2583,41 +2666,41 @@ var ll = class {
2583
2666
  destroy() {
2584
2667
  this.desmosProvider && (this.desmosProvider.destroy(), this.desmosProvider = null), this.config = null, console.log("[DesmosToolProvider] Destroyed");
2585
2668
  }
2586
- }, al = (t, e) => {
2669
+ }, ga = (t, e) => {
2587
2670
  const o = e?.useSentenceSegmenter !== !1;
2588
2671
  try {
2589
2672
  if (!o) throw new Error("Segmenter disabled by policy");
2590
2673
  const s = globalThis.Intl?.Segmenter;
2591
2674
  if (typeof s == "function") {
2592
- const l = new s(e?.locale, { granularity: "sentence" }), a = Array.from(l.segment(t)).map((c) => ({
2593
- text: c.segment,
2594
- offset: c.index
2595
- })).filter((c) => c.text.trim().length > 0);
2596
- if (a.length > 0) return a;
2675
+ const a = new s(e?.locale, { granularity: "sentence" }), u = Array.from(a.segment(t)).map((l) => ({
2676
+ text: l.segment,
2677
+ offset: l.index
2678
+ })).filter((l) => l.text.trim().length > 0);
2679
+ if (u.length > 0) return u;
2597
2680
  }
2598
2681
  } catch {
2599
2682
  }
2600
2683
  const n = t.match(/[^.!?]+(?:[.!?]+|$)/g) || [t], i = [];
2601
2684
  let r = 0;
2602
2685
  for (const s of n) {
2603
- const l = t.indexOf(s, r);
2604
- l !== -1 && (i.push({
2686
+ const a = t.indexOf(s, r);
2687
+ a !== -1 && (i.push({
2605
2688
  text: s,
2606
- offset: l
2607
- }), r = l + s.length);
2689
+ offset: a
2690
+ }), r = a + s.length);
2608
2691
  }
2609
2692
  return i.length > 0 ? i : [{
2610
2693
  text: t,
2611
2694
  offset: 0
2612
2695
  }];
2613
- }, cl = class {
2696
+ }, ma = class {
2614
2697
  constructor() {
2615
2698
  y(this, "providerId", "browser"), y(this, "providerName", "Browser Speech Synthesis"), y(this, "version", "1.0.0");
2616
2699
  }
2617
2700
  async initialize(t) {
2618
2701
  if (typeof window > "u") throw new Error("BrowserTTSProvider requires browser environment");
2619
2702
  if (!("speechSynthesis" in window)) throw new Error("Browser does not support Speech Synthesis API");
2620
- return new ul(t);
2703
+ return new ba(t);
2621
2704
  }
2622
2705
  supportsFeature(t) {
2623
2706
  return !0;
@@ -2634,7 +2717,7 @@ var ll = class {
2634
2717
  }
2635
2718
  destroy() {
2636
2719
  }
2637
- }, ul = class {
2720
+ }, ba = class {
2638
2721
  constructor(t) {
2639
2722
  y(this, "utterance", null), y(this, "config", null), y(this, "_isPlaying", !1), y(this, "_isPaused", !1), y(this, "speakRunId", 0), y(this, "onWordBoundary", void 0), this.config = t;
2640
2723
  }
@@ -2669,16 +2752,16 @@ var ll = class {
2669
2752
  for (const r of e) {
2670
2753
  const s = r.text.trim();
2671
2754
  if (!s) continue;
2672
- const l = r.text.search(/\S/), a = r.offset + (l === -1 ? 0 : l);
2755
+ const a = r.text.search(/\S/), u = r.offset + (a === -1 ? 0 : a);
2673
2756
  if (!n) {
2674
- n = s, i = a;
2757
+ n = s, i = u;
2675
2758
  continue;
2676
2759
  }
2677
- const c = `${n} ${s}`;
2678
- c.length <= 260 ? n = c : (o.push({
2760
+ const l = `${n} ${s}`;
2761
+ l.length <= 260 ? n = l : (o.push({
2679
2762
  text: n,
2680
2763
  offset: i
2681
- }), n = s, i = a);
2764
+ }), n = s, i = u);
2682
2765
  }
2683
2766
  return n && o.push({
2684
2767
  text: n,
@@ -2701,7 +2784,7 @@ var ll = class {
2701
2784
  }
2702
2785
  segmentSentences(t) {
2703
2786
  const e = this.getSegmentationPolicy();
2704
- return al(t, {
2787
+ return ga(t, {
2705
2788
  locale: e.locale,
2706
2789
  useSentenceSegmenter: e.useSentenceSegmenter
2707
2790
  });
@@ -2744,8 +2827,8 @@ var ll = class {
2744
2827
  o === this.speakRunId && (this._isPaused = !1);
2745
2828
  }, this.utterance.onboundary = (r) => {
2746
2829
  if (o !== this.speakRunId || (console.log("[BrowserProvider] Boundary event:", r.name, "charIndex:", r.charIndex, "charLength:", r.charLength), r.name !== "word" || !this.onWordBoundary) || this.getHighlightMode() === "sentence") return;
2747
- const s = Math.max(0, Math.min(r.charIndex, Math.max(0, t.length - 1))), l = Number(r.charLength || 0), a = this.inferWordLength(t, s), c = Number.isFinite(l) && l > 0 && l <= 80 && s + l <= t.length ? l : a, d = t.substring(s, Math.min(t.length, s + c)).trim(), f = e + s;
2748
- console.log("[BrowserProvider] Calling onWordBoundary with word:", d, "at position:", f), this.onWordBoundary(d, f, c);
2830
+ const s = Math.max(0, Math.min(r.charIndex, Math.max(0, t.length - 1))), a = Number(r.charLength || 0), u = this.inferWordLength(t, s), l = Number.isFinite(a) && a > 0 && a <= 80 && s + a <= t.length ? a : u, d = t.substring(s, Math.min(t.length, s + l)).trim(), h = e + s;
2831
+ console.log("[BrowserProvider] Calling onWordBoundary with word:", d, "at position:", h), this.onWordBoundary(d, h, l);
2749
2832
  }, speechSynthesis.speak(this.utterance);
2750
2833
  });
2751
2834
  }
@@ -2770,7 +2853,7 @@ var ll = class {
2770
2853
  ...t.providerOptions || {}
2771
2854
  });
2772
2855
  }
2773
- }, dl = class {
2856
+ }, ya = class {
2774
2857
  async emitTelemetry(t, e) {
2775
2858
  try {
2776
2859
  await this.config?.onTelemetry?.(t, e);
@@ -2802,7 +2885,7 @@ var ll = class {
2802
2885
  }
2803
2886
  async _initializeBrowserTTS(t) {
2804
2887
  if (typeof window > "u" || !("speechSynthesis" in window)) throw new Error("[TTSToolProvider] Browser TTS not supported (Web Speech API not available)");
2805
- this.ttsProvider = new cl(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
2888
+ this.ttsProvider = new ma(), console.log("[TTSToolProvider] Browser TTS initialized (Web Speech API)");
2806
2889
  }
2807
2890
  async _initializeServerTTS(t) {
2808
2891
  if (!t.apiEndpoint) throw new Error("[TTSToolProvider] apiEndpoint required for server-based TTS backends");
@@ -2811,26 +2894,28 @@ var ll = class {
2811
2894
  toolId: "tts",
2812
2895
  operation: "server-provider-module-import",
2813
2896
  backend: t.serverProvider || t.backend
2814
- }), this.ttsProvider = new (await (async () => {
2897
+ });
2898
+ const o = await (async () => {
2815
2899
  try {
2816
- const o = await import("./dist-Bud4G4lv-b2620662.js");
2900
+ const n = await import("./dist-DIBQdekL-ec6db34a.js");
2817
2901
  return await this.emitTelemetry("pie-tool-library-load-success", {
2818
2902
  toolId: "tts",
2819
2903
  operation: "server-provider-module-import",
2820
2904
  backend: t.serverProvider || t.backend,
2821
2905
  duration: Date.now() - e
2822
- }), o;
2823
- } catch (o) {
2906
+ }), n;
2907
+ } catch (n) {
2824
2908
  throw await this.emitTelemetry("pie-tool-library-load-error", {
2825
2909
  toolId: "tts",
2826
2910
  operation: "server-provider-module-import",
2827
2911
  backend: t.serverProvider || t.backend,
2828
2912
  duration: Date.now() - e,
2829
2913
  errorType: "ToolLibraryLoadError",
2830
- message: o instanceof Error ? o.message : String(o)
2831
- }), o;
2914
+ message: n instanceof Error ? n.message : String(n)
2915
+ }), n;
2832
2916
  }
2833
- })()).ServerTTSProvider(), console.log(`[TTSToolProvider] Server TTS initialized (provider: ${t.serverProvider || t.backend})`);
2917
+ })();
2918
+ this.ttsProvider = new o.ServerTTSProvider(), console.log(`[TTSToolProvider] Server TTS initialized (provider: ${t.serverProvider || t.backend})`);
2834
2919
  }
2835
2920
  async createInstance(t) {
2836
2921
  if (!this.ttsProvider) throw new Error("[TTSToolProvider] Provider not initialized. Call initialize() first.");
@@ -2858,7 +2943,7 @@ var ll = class {
2858
2943
  destroy() {
2859
2944
  this.ttsProvider && (this.ttsProvider.destroy(), this.ttsProvider = null), this.config = null, console.log("[TTSToolProvider] Destroyed");
2860
2945
  }
2861
- }, hl = /* @__PURE__ */ new Set([
2946
+ }, wa = /* @__PURE__ */ new Set([
2862
2947
  "annotation-xml",
2863
2948
  "color-profile",
2864
2949
  "font-face",
@@ -2867,16 +2952,16 @@ var ll = class {
2867
2952
  "font-face-format",
2868
2953
  "font-face-name",
2869
2954
  "missing-glyph"
2870
- ]), fl = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, pl = (t, e = "custom element tag") => {
2955
+ ]), Ta = /^[a-z][a-z0-9._-]*-[a-z0-9._-]*$/, Ia = (t, e = "custom element tag") => {
2871
2956
  if (!t || typeof t != "string") throw new Error(`Invalid ${e}: expected a non-empty string`);
2872
2957
  const o = t.trim();
2873
2958
  if (!o) throw new Error(`Invalid ${e}: tag is empty`);
2874
2959
  if (o !== o.toLowerCase()) throw new Error(`Invalid ${e} "${o}": custom element names must be lowercase`);
2875
2960
  if (!o.includes("-")) throw new Error(`Invalid ${e} "${o}": custom element names must include a hyphen`);
2876
- if (hl.has(o)) throw new Error(`Invalid ${e} "${o}": this name is reserved by the HTML spec`);
2877
- if (!fl.test(o)) throw new Error(`Invalid ${e} "${o}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
2961
+ if (wa.has(o)) throw new Error(`Invalid ${e} "${o}": this name is reserved by the HTML spec`);
2962
+ if (!Ta.test(o)) throw new Error(`Invalid ${e} "${o}": allowed characters are lowercase letters, numbers, ".", "_" and "-"`);
2878
2963
  return o;
2879
- }, nr = {
2964
+ }, lr = {
2880
2965
  calculator: "pie-tool-calculator",
2881
2966
  textToSpeech: "pie-tool-text-to-speech",
2882
2967
  ruler: "pie-tool-ruler",
@@ -2889,22 +2974,22 @@ var ll = class {
2889
2974
  annotationToolbar: "pie-tool-annotation-toolbar",
2890
2975
  graph: "pie-tool-graph",
2891
2976
  periodicTable: "pie-tool-periodic-table"
2892
- }, vl = (t, e) => pl(e?.toolTagMap?.[t] ?? nr[t] ?? t, `tool component tag for "${t}"`), gl = (t) => document.createElement(t), gt = (t, e, o, n) => {
2893
- const i = vl(t, n), r = n?.toolComponentFactories?.[t] ?? n?.toolComponentFactory;
2977
+ }, ka = (t, e) => Ia(e?.toolTagMap?.[t] ?? lr[t] ?? t, `tool component tag for "${t}"`), $a = (t) => document.createElement(t), yt = (t, e, o, n) => {
2978
+ const i = ka(t, n), r = n?.toolComponentFactories?.[t] ?? n?.toolComponentFactory;
2894
2979
  return r ? r({
2895
2980
  toolId: t,
2896
2981
  tagName: i,
2897
2982
  context: e,
2898
2983
  toolbarContext: o
2899
- }) : gl(i);
2900
- }, ml = {
2984
+ }) : $a(i);
2985
+ }, Sa = {
2901
2986
  toolId: "calculator",
2902
2987
  name: "Calculator",
2903
2988
  description: "Multi-type calculator (basic, scientific, graphing)",
2904
2989
  icon: "calculator",
2905
2990
  provider: {
2906
2991
  getProviderId: (t) => typeof t?.provider?.id == "string" && t.provider.id.length > 0 ? t.provider.id : "calculator-desmos",
2907
- createProvider: () => new ll(),
2992
+ createProvider: () => new va(),
2908
2993
  getInitConfig: (t) => t?.provider?.init ?? {},
2909
2994
  getAuthFetcher: (t) => {
2910
2995
  const e = t?.provider?.runtime?.authFetcher;
@@ -2927,10 +3012,10 @@ var ll = class {
2927
3012
  "scientificCalculator"
2928
3013
  ],
2929
3014
  isVisibleInContext(t) {
2930
- return no(t);
3015
+ return so(t);
2931
3016
  },
2932
3017
  renderToolbar(t, e) {
2933
- const o = fn(this.toolId, e.scope.level, e.scope.scopeId), n = e.componentOverrides, i = gt(this.toolId, t, e, n);
3018
+ const o = Tn(this.toolId, e.scope.level, e.scope.scopeId), n = e.componentOverrides, i = yt(this.toolId, t, e, n);
2934
3019
  i.setAttribute("tool-id", o), i.toolkitCoordinator = e.toolkitCoordinator;
2935
3020
  const r = {
2936
3021
  toolId: this.toolId,
@@ -2961,22 +3046,22 @@ var ll = class {
2961
3046
  }],
2962
3047
  button: r,
2963
3048
  sync: () => {
2964
- const l = e.isToolVisible(o);
2965
- r.active = l, r.ariaLabel = l ? "Close scientific calculator" : "Open scientific calculator", r.tooltip = l ? "Close calculator" : "Calculator", s !== l && (i.visible = l, s = l), i.toolkitCoordinator !== e.toolkitCoordinator && (i.toolkitCoordinator = e.toolkitCoordinator);
3049
+ const a = e.isToolVisible(o);
3050
+ r.active = a, r.ariaLabel = a ? "Close scientific calculator" : "Open scientific calculator", r.tooltip = a ? "Close calculator" : "Calculator", s !== a && (i.visible = a, s = a), i.toolkitCoordinator !== e.toolkitCoordinator && (i.toolkitCoordinator = e.toolkitCoordinator);
2966
3051
  },
2967
- subscribeActive: (l) => e.subscribeVisibility ? e.subscribeVisibility(() => {
2968
- l(e.isToolVisible(o));
3052
+ subscribeActive: (a) => e.subscribeVisibility ? e.subscribeVisibility(() => {
3053
+ a(e.isToolVisible(o));
2969
3054
  }) : () => {
2970
3055
  }
2971
3056
  };
2972
3057
  }
2973
- }, bl = /* @__PURE__ */ new Set([
3058
+ }, Aa = /* @__PURE__ */ new Set([
2974
3059
  "reserved-row",
2975
3060
  "expanding-row",
2976
3061
  "floating-overlay",
2977
3062
  "left-aligned"
2978
- ]), Un = (t) => t && typeof t == "object" ? t : {}, yl = (t) => t === "polly" || t === "google" || t === "server", X = (t, e) => t === void 0 ? e : t, po = (t, e = "left-aligned") => typeof t == "string" && bl.has(t) ? t : e, Kn = Object.freeze([0.8, 1.25]), Po = (t) => {
2979
- if (!Array.isArray(t)) return [...Kn];
3063
+ ]), Qn = (t) => t && typeof t == "object" ? t : {}, xa = (t) => t === "polly" || t === "google" || t === "server", Q = (t, e) => t === void 0 ? e : t, mo = (t, e = "left-aligned") => typeof t == "string" && Aa.has(t) ? t : e, ti = Object.freeze([0.8, 1.25]), No = (t) => {
3064
+ if (!Array.isArray(t)) return [...ti];
2980
3065
  if (t.length === 0) return [];
2981
3066
  const e = /* @__PURE__ */ new Set();
2982
3067
  for (const o of t) {
@@ -2984,41 +3069,41 @@ var ll = class {
2984
3069
  const n = Math.round(o * 100) / 100;
2985
3070
  n !== 1 && e.add(n);
2986
3071
  }
2987
- return e.size ? Array.from(e) : [...Kn];
2988
- }, wl = (t) => {
3072
+ return e.size ? Array.from(e) : [...ti];
3073
+ }, _a = (t) => {
2989
3074
  const e = {
2990
3075
  ...t,
2991
- layoutMode: po(t.layoutMode)
3076
+ layoutMode: mo(t.layoutMode)
2992
3077
  }, o = t.backend || "browser";
2993
- if (!yl(o)) return e;
3078
+ if (!xa(o)) return e;
2994
3079
  const n = {
2995
3080
  ...e,
2996
- apiEndpoint: X(e.apiEndpoint, "/api/tts"),
2997
- transportMode: X(e.transportMode, "pie"),
2998
- endpointValidationMode: X(e.endpointValidationMode, "voices"),
2999
- validateEndpoint: X(e.validateEndpoint, !0),
3000
- includeAuthOnAssetFetch: X(e.includeAuthOnAssetFetch, !1),
3001
- rate: X(e.rate, 1),
3002
- language: X(e.language, "en-US")
3081
+ apiEndpoint: Q(e.apiEndpoint, "/api/tts"),
3082
+ transportMode: Q(e.transportMode, "pie"),
3083
+ endpointValidationMode: Q(e.endpointValidationMode, "voices"),
3084
+ validateEndpoint: Q(e.validateEndpoint, !0),
3085
+ includeAuthOnAssetFetch: Q(e.includeAuthOnAssetFetch, !1),
3086
+ rate: Q(e.rate, 1),
3087
+ language: Q(e.language, "en-US")
3003
3088
  };
3004
3089
  return o === "polly" ? {
3005
3090
  ...n,
3006
- defaultVoice: X(n.defaultVoice, "Joanna"),
3007
- engine: X(n.engine, "neural"),
3008
- format: X(n.format, "mp3"),
3009
- speechMarksMode: X(n.speechMarksMode, "word+sentence")
3091
+ defaultVoice: Q(n.defaultVoice, "Joanna"),
3092
+ engine: Q(n.engine, "neural"),
3093
+ format: Q(n.format, "mp3"),
3094
+ speechMarksMode: Q(n.speechMarksMode, "word+sentence")
3010
3095
  } : o === "google" ? {
3011
3096
  ...n,
3012
- defaultVoice: X(n.defaultVoice, "en-US-Wavenet-A")
3097
+ defaultVoice: Q(n.defaultVoice, "en-US-Wavenet-A")
3013
3098
  } : n;
3014
- }, Ro = (t) => {
3015
- const e = Un(t), o = Un(t?.settings);
3016
- return wl({
3099
+ }, Wo = (t) => {
3100
+ const e = Qn(t), o = Qn(t?.settings);
3101
+ return _a({
3017
3102
  ...e,
3018
3103
  ...o
3019
3104
  });
3020
- }, Go = (t) => t.backend || "browser", ir = (t, e) => e === "polly" || e === "google" ? e : t.serverProvider || t.provider, rr = (t, e) => t.transportMode || (e === "custom" ? "custom" : "pie"), Tl = (t) => {
3021
- const e = Go(t), o = ir(t, e), n = rr(t, o);
3105
+ }, Xo = (t) => t.backend || "browser", cr = (t, e) => e === "polly" || e === "google" ? e : t.serverProvider || t.provider, ur = (t, e) => t.transportMode || (e === "custom" ? "custom" : "pie"), Ca = (t) => {
3106
+ const e = Xo(t), o = cr(t, e), n = ur(t, o);
3022
3107
  return {
3023
3108
  voice: t.defaultVoice,
3024
3109
  rate: t.rate,
@@ -3042,8 +3127,8 @@ var ll = class {
3042
3127
  includeAuthOnAssetFetch: t.includeAuthOnAssetFetch,
3043
3128
  validateEndpoint: t.validateEndpoint
3044
3129
  };
3045
- }, sr = (t) => po(t.layoutMode), Il = (t) => {
3046
- switch (sr(t)) {
3130
+ }, dr = (t) => mo(t.layoutMode), Ea = (t) => {
3131
+ switch (dr(t)) {
3047
3132
  case "reserved-row":
3048
3133
  return {
3049
3134
  mount: "before-buttons",
@@ -3069,21 +3154,21 @@ var ll = class {
3069
3154
  }
3070
3155
  };
3071
3156
  }
3072
- }, Ae = /* @__PURE__ */ new Map(), Sl = "__pieToolElementUnmount", Jn = "pie-tool-active-change", $l = {
3157
+ }, Ce = /* @__PURE__ */ new Map(), Ma = "__pieToolElementUnmount", ei = "pie-tool-active-change", La = {
3073
3158
  toolId: "textToSpeech",
3074
3159
  name: "Text to Speech",
3075
3160
  description: "Read content aloud",
3076
3161
  icon: "volume-up",
3077
3162
  provider: {
3078
3163
  getProviderId: () => "tts",
3079
- createProvider: (t) => new dl(Go(Ro(t))),
3164
+ createProvider: (t) => new ya(Xo(Wo(t))),
3080
3165
  getInitConfig: (t) => {
3081
- const e = Ro(t), o = Go(e), n = ir(e, o);
3166
+ const e = Wo(t), o = Xo(e), n = cr(e, o);
3082
3167
  return {
3083
3168
  backend: o,
3084
3169
  serverProvider: n,
3085
- transportMode: rr(e, n),
3086
- ...Tl(e)
3170
+ transportMode: ur(e, n),
3171
+ ...Ca(e)
3087
3172
  };
3088
3173
  },
3089
3174
  getAuthFetcher: (t) => {
@@ -3092,9 +3177,9 @@ var ll = class {
3092
3177
  },
3093
3178
  sanitizeConfig: (t) => {
3094
3179
  const e = t.settings && typeof t.settings == "object" ? { ...t.settings } : void 0;
3095
- e && "layoutMode" in e && (e.layoutMode = po(e.layoutMode)), e && "speedOptions" in e && (e.speedOptions = Po(e.speedOptions));
3180
+ e && "layoutMode" in e && (e.layoutMode = mo(e.layoutMode)), e && "speedOptions" in e && (e.speedOptions = No(e.speedOptions));
3096
3181
  const o = { ...t };
3097
- return "layoutMode" in o && (o.layoutMode = po(o.layoutMode)), "speedOptions" in o && (o.speedOptions = Po(o.speedOptions)), e && (o.settings = e), o;
3182
+ return "layoutMode" in o && (o.layoutMode = mo(o.layoutMode)), "speedOptions" in o && (o.speedOptions = No(o.speedOptions)), e && (o.settings = e), o;
3098
3183
  },
3099
3184
  lazy: !0
3100
3185
  },
@@ -3106,47 +3191,47 @@ var ll = class {
3106
3191
  "speechOutput"
3107
3192
  ],
3108
3193
  isVisibleInContext(t) {
3109
- return io(t);
3194
+ return ao(t);
3110
3195
  },
3111
3196
  renderToolbar(t, e) {
3112
- const o = () => Ro(e.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), n = () => Po(o().speedOptions), i = () => sr(o()), r = () => Il(o()), s = fn(this.toolId, e.scope.level, e.scope.scopeId), l = () => {
3197
+ const o = () => Wo(e.toolkitCoordinator?.getToolConfig(this.toolId) || void 0), n = () => No(o().speedOptions), i = () => dr(o()), r = () => Ea(o()), s = Tn(this.toolId, e.scope.level, e.scope.scopeId), a = () => {
3113
3198
  const d = e.ui?.size;
3114
3199
  return d === "sm" || d === "lg" ? d : "md";
3115
- }, a = () => {
3116
- let d = Ae.get(s);
3117
- return d && typeof d.isConnected == "boolean" && !d.isConnected && (Ae.delete(s), d = void 0), d || (d = document.createElement("pie-tool-tts-inline"), d[Sl] = () => {
3118
- Ae.get(s) === d && Ae.delete(s);
3119
- }, Ae.set(s, d)), d.setAttribute("tool-id", s), d.setAttribute("catalog-id", e.catalogId || e.itemId), d.setAttribute("language", e.language || "en-US"), d.setAttribute("size", l()), d.setAttribute("layout-mode", i()), d.speedOptions = n(), d;
3120
- }, c = r();
3200
+ }, u = () => {
3201
+ let d = Ce.get(s);
3202
+ return d && typeof d.isConnected == "boolean" && !d.isConnected && (Ce.delete(s), d = void 0), d || (d = document.createElement("pie-tool-tts-inline"), d[Ma] = () => {
3203
+ Ce.get(s) === d && Ce.delete(s);
3204
+ }, Ce.set(s, d)), d.setAttribute("tool-id", s), d.setAttribute("catalog-id", e.catalogId || e.itemId), d.setAttribute("language", e.language || "en-US"), d.setAttribute("size", a()), d.setAttribute("layout-mode", i()), d.speedOptions = n(), d;
3205
+ }, l = r();
3121
3206
  return {
3122
3207
  toolId: this.toolId,
3123
3208
  button: null,
3124
3209
  elements: [{
3125
- element: a(),
3126
- mount: c.mount,
3210
+ element: u(),
3211
+ mount: l.mount,
3127
3212
  layoutHints: { controlsRow: {
3128
- reserveSpace: c.controlsRow.reserveSpace,
3129
- showWhenToolActive: c.controlsRow.expandWhenToolActive
3213
+ reserveSpace: l.controlsRow.reserveSpace,
3214
+ showWhenToolActive: l.controlsRow.expandWhenToolActive
3130
3215
  } }
3131
3216
  }],
3132
3217
  subscribeActive: (d) => {
3133
- const f = a(), h = (v) => {
3218
+ const h = u(), f = (v) => {
3134
3219
  const m = v.detail;
3135
3220
  d(m?.active === !0);
3136
3221
  };
3137
- return f.addEventListener(Jn, h), () => {
3138
- f.removeEventListener(Jn, h);
3222
+ return h.addEventListener(ei, f), () => {
3223
+ h.removeEventListener(ei, f);
3139
3224
  };
3140
3225
  },
3141
3226
  sync: () => {
3142
- const d = a();
3143
- d.setAttribute("tool-id", s), d.setAttribute("catalog-id", e.catalogId || e.itemId), d.setAttribute("language", e.language || "en-US"), d.setAttribute("size", l()), d.setAttribute("layout-mode", i()), d.speedOptions = n();
3227
+ const d = u();
3228
+ d.setAttribute("tool-id", s), d.setAttribute("catalog-id", e.catalogId || e.itemId), d.setAttribute("language", e.language || "en-US"), d.setAttribute("size", a()), d.setAttribute("layout-mode", i()), d.speedOptions = n();
3144
3229
  }
3145
3230
  };
3146
3231
  }
3147
3232
  };
3148
- function kt(t, e) {
3149
- const o = fn(t, e.scope.level, e.scope.scopeId);
3233
+ function Ct(t, e) {
3234
+ const o = Tn(t, e.scope.level, e.scope.scopeId);
3150
3235
  return {
3151
3236
  fullToolId: o,
3152
3237
  isActive: () => e.isToolVisible(o),
@@ -3156,16 +3241,16 @@ function kt(t, e) {
3156
3241
  }
3157
3242
  };
3158
3243
  }
3159
- function At(t) {
3244
+ function Et(t) {
3160
3245
  const e = t.isActive();
3161
3246
  t.button.active = e, t.overlay.visible = e, t.onActiveChange?.(e);
3162
3247
  }
3163
- function No(t, e) {
3248
+ function Vo(t, e) {
3164
3249
  t.setAttribute("data-pie-tool-surface", e);
3165
3250
  }
3166
- var kl = [
3167
- ml,
3168
- $l,
3251
+ var Pa = [
3252
+ Sa,
3253
+ La,
3169
3254
  {
3170
3255
  toolId: "ruler",
3171
3256
  name: "Ruler",
@@ -3178,10 +3263,10 @@ var kl = [
3178
3263
  ],
3179
3264
  pnpSupportIds: ["ruler", "measurement"],
3180
3265
  isVisibleInContext(t) {
3181
- return no(t);
3266
+ return so(t);
3182
3267
  },
3183
3268
  renderToolbar(t, e) {
3184
- const o = kt(this.toolId, e), n = {
3269
+ const o = Ct(this.toolId, e), n = {
3185
3270
  toolId: this.toolId,
3186
3271
  label: this.name,
3187
3272
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3190,8 +3275,8 @@ var kl = [
3190
3275
  tooltip: "Ruler",
3191
3276
  onClick: () => e.toggleTool(this.toolId),
3192
3277
  active: o.isActive()
3193
- }, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
3194
- return r.setAttribute("tool-id", o.fullToolId), No(r, "frameless"), {
3278
+ }, i = e.componentOverrides ?? {}, r = yt(this.toolId, t, e, i);
3279
+ return r.setAttribute("tool-id", o.fullToolId), Vo(r, "frameless"), {
3195
3280
  toolId: this.toolId,
3196
3281
  button: n,
3197
3282
  elements: [{
@@ -3199,7 +3284,7 @@ var kl = [
3199
3284
  mount: "after-buttons"
3200
3285
  }],
3201
3286
  sync: () => {
3202
- At({
3287
+ Et({
3203
3288
  button: n,
3204
3289
  overlay: r,
3205
3290
  isActive: o.isActive
@@ -3221,10 +3306,10 @@ var kl = [
3221
3306
  ],
3222
3307
  pnpSupportIds: ["protractor", "angleMeasurement"],
3223
3308
  isVisibleInContext(t) {
3224
- return no(t);
3309
+ return so(t);
3225
3310
  },
3226
3311
  renderToolbar(t, e) {
3227
- const o = kt(this.toolId, e), n = {
3312
+ const o = Ct(this.toolId, e), n = {
3228
3313
  toolId: this.toolId,
3229
3314
  label: this.name,
3230
3315
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3233,8 +3318,8 @@ var kl = [
3233
3318
  tooltip: "Protractor",
3234
3319
  onClick: () => e.toggleTool(this.toolId),
3235
3320
  active: o.isActive()
3236
- }, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
3237
- return r.setAttribute("tool-id", o.fullToolId), No(r, "frameless"), {
3321
+ }, i = e.componentOverrides ?? {}, r = yt(this.toolId, t, e, i);
3322
+ return r.setAttribute("tool-id", o.fullToolId), Vo(r, "frameless"), {
3238
3323
  toolId: this.toolId,
3239
3324
  button: n,
3240
3325
  elements: [{
@@ -3242,7 +3327,7 @@ var kl = [
3242
3327
  mount: "after-buttons"
3243
3328
  }],
3244
3329
  sync: () => {
3245
- At({
3330
+ Et({
3246
3331
  button: n,
3247
3332
  overlay: r,
3248
3333
  isActive: o.isActive
@@ -3265,10 +3350,10 @@ var kl = [
3265
3350
  "choiceMasking"
3266
3351
  ],
3267
3352
  isVisibleInContext(t) {
3268
- return nl(t);
3353
+ return da(t);
3269
3354
  },
3270
3355
  renderToolbar(t, e) {
3271
- const o = kt(this.toolId, e), n = e.componentOverrides ?? {}, i = gt(this.toolId, t, e, n);
3356
+ const o = Ct(this.toolId, e), n = e.componentOverrides ?? {}, i = yt(this.toolId, t, e, n);
3272
3357
  i.setAttribute("tool-id", o.fullToolId), i.setAttribute("strategy", "strikethrough"), i.setAttribute("button-alignment", "inline");
3273
3358
  const r = {
3274
3359
  toolId: this.toolId,
@@ -3288,7 +3373,7 @@ var kl = [
3288
3373
  mount: "after-buttons"
3289
3374
  }],
3290
3375
  sync: () => {
3291
- At({
3376
+ Et({
3292
3377
  button: r,
3293
3378
  overlay: i,
3294
3379
  isActive: o.isActive
@@ -3318,10 +3403,10 @@ var kl = [
3318
3403
  "annotation"
3319
3404
  ],
3320
3405
  isVisibleInContext(t) {
3321
- return io(t);
3406
+ return ao(t);
3322
3407
  },
3323
3408
  renderToolbar(t, e) {
3324
- const o = kt(this.toolId, e), n = {
3409
+ const o = Ct(this.toolId, e), n = {
3325
3410
  toolId: this.toolId,
3326
3411
  label: this.name,
3327
3412
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3330,7 +3415,7 @@ var kl = [
3330
3415
  tooltip: "Highlight",
3331
3416
  onClick: () => e.toggleTool(this.toolId),
3332
3417
  active: o.isActive()
3333
- }, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
3418
+ }, i = e.componentOverrides ?? {}, r = yt(this.toolId, t, e, i);
3334
3419
  return r.setAttribute("tool-id", o.fullToolId), {
3335
3420
  toolId: this.toolId,
3336
3421
  button: n,
@@ -3339,7 +3424,7 @@ var kl = [
3339
3424
  mount: "after-buttons"
3340
3425
  }],
3341
3426
  sync: () => {
3342
- At({
3427
+ Et({
3343
3428
  button: n,
3344
3429
  overlay: r,
3345
3430
  isActive: o.isActive,
@@ -3371,10 +3456,10 @@ var kl = [
3371
3456
  "trackingGuide"
3372
3457
  ],
3373
3458
  isVisibleInContext(t) {
3374
- return io(t);
3459
+ return ao(t);
3375
3460
  },
3376
3461
  renderToolbar(t, e) {
3377
- const o = kt(this.toolId, e), n = {
3462
+ const o = Ct(this.toolId, e), n = {
3378
3463
  toolId: this.toolId,
3379
3464
  label: this.name,
3380
3465
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3383,8 +3468,8 @@ var kl = [
3383
3468
  tooltip: "Line Reader",
3384
3469
  onClick: () => e.toggleTool(this.toolId),
3385
3470
  active: o.isActive()
3386
- }, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
3387
- return r.setAttribute("tool-id", o.fullToolId), No(r, "frameless"), {
3471
+ }, i = e.componentOverrides ?? {}, r = yt(this.toolId, t, e, i);
3472
+ return r.setAttribute("tool-id", o.fullToolId), Vo(r, "frameless"), {
3388
3473
  toolId: this.toolId,
3389
3474
  button: n,
3390
3475
  elements: [{
@@ -3392,7 +3477,7 @@ var kl = [
3392
3477
  mount: "after-buttons"
3393
3478
  }],
3394
3479
  sync: () => {
3395
- At({
3480
+ Et({
3396
3481
  button: n,
3397
3482
  overlay: r,
3398
3483
  isActive: o.isActive
@@ -3421,7 +3506,7 @@ var kl = [
3421
3506
  return !0;
3422
3507
  },
3423
3508
  renderToolbar(t, e) {
3424
- const o = kt(this.toolId, e), n = {
3509
+ const o = Ct(this.toolId, e), n = {
3425
3510
  toolId: this.toolId,
3426
3511
  label: this.name,
3427
3512
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3430,7 +3515,7 @@ var kl = [
3430
3515
  tooltip: "Theme",
3431
3516
  onClick: () => e.toggleTool(this.toolId),
3432
3517
  active: o.isActive()
3433
- }, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
3518
+ }, i = e.componentOverrides ?? {}, r = yt(this.toolId, t, e, i);
3434
3519
  return r.setAttribute("tool-id", o.fullToolId), {
3435
3520
  toolId: this.toolId,
3436
3521
  button: n,
@@ -3449,7 +3534,7 @@ var kl = [
3449
3534
  }
3450
3535
  }],
3451
3536
  sync: () => {
3452
- At({
3537
+ Et({
3453
3538
  button: n,
3454
3539
  overlay: r,
3455
3540
  isActive: o.isActive
@@ -3480,10 +3565,10 @@ var kl = [
3480
3565
  "annotation"
3481
3566
  ],
3482
3567
  isVisibleInContext(t) {
3483
- return io(t);
3568
+ return ao(t);
3484
3569
  },
3485
3570
  renderToolbar(t, e) {
3486
- const o = kt(this.toolId, e), n = {
3571
+ const o = Ct(this.toolId, e), n = {
3487
3572
  toolId: this.toolId,
3488
3573
  label: this.name,
3489
3574
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3492,7 +3577,7 @@ var kl = [
3492
3577
  tooltip: "Highlight",
3493
3578
  onClick: () => e.toggleTool(this.toolId),
3494
3579
  active: o.isActive()
3495
- }, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
3580
+ }, i = e.componentOverrides ?? {}, r = yt(this.toolId, t, e, i);
3496
3581
  return r.setAttribute("tool-id", o.fullToolId), {
3497
3582
  toolId: this.toolId,
3498
3583
  button: n,
@@ -3501,7 +3586,7 @@ var kl = [
3501
3586
  mount: "after-buttons"
3502
3587
  }],
3503
3588
  sync: () => {
3504
- At({
3589
+ Et({
3505
3590
  button: n,
3506
3591
  overlay: r,
3507
3592
  isActive: o.isActive
@@ -3524,10 +3609,10 @@ var kl = [
3524
3609
  "graphingTool"
3525
3610
  ],
3526
3611
  isVisibleInContext(t) {
3527
- return no(t);
3612
+ return so(t);
3528
3613
  },
3529
3614
  renderToolbar(t, e) {
3530
- const o = kt(this.toolId, e), n = {
3615
+ const o = Ct(this.toolId, e), n = {
3531
3616
  toolId: this.toolId,
3532
3617
  label: this.name,
3533
3618
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3536,7 +3621,7 @@ var kl = [
3536
3621
  tooltip: "Graph",
3537
3622
  onClick: () => e.toggleTool(this.toolId),
3538
3623
  active: o.isActive()
3539
- }, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
3624
+ }, i = e.componentOverrides ?? {}, r = yt(this.toolId, t, e, i);
3540
3625
  return r.setAttribute("tool-id", o.fullToolId), {
3541
3626
  toolId: this.toolId,
3542
3627
  button: n,
@@ -3555,7 +3640,7 @@ var kl = [
3555
3640
  }
3556
3641
  }],
3557
3642
  sync: () => {
3558
- At({
3643
+ Et({
3559
3644
  button: n,
3560
3645
  overlay: r,
3561
3646
  isActive: o.isActive
@@ -3577,10 +3662,10 @@ var kl = [
3577
3662
  "elementReference"
3578
3663
  ],
3579
3664
  isVisibleInContext(t) {
3580
- return il(t);
3665
+ return ha(t);
3581
3666
  },
3582
3667
  renderToolbar(t, e) {
3583
- const o = kt(this.toolId, e), n = {
3668
+ const o = Ct(this.toolId, e), n = {
3584
3669
  toolId: this.toolId,
3585
3670
  label: this.name,
3586
3671
  icon: typeof this.icon == "function" ? this.icon(t) : this.icon,
@@ -3589,7 +3674,7 @@ var kl = [
3589
3674
  tooltip: "Periodic Table",
3590
3675
  onClick: () => e.toggleTool(this.toolId),
3591
3676
  active: o.isActive()
3592
- }, i = e.componentOverrides ?? {}, r = gt(this.toolId, t, e, i);
3677
+ }, i = e.componentOverrides ?? {}, r = yt(this.toolId, t, e, i);
3593
3678
  return r.setAttribute("tool-id", o.fullToolId), {
3594
3679
  toolId: this.toolId,
3595
3680
  button: n,
@@ -3608,7 +3693,7 @@ var kl = [
3608
3693
  }
3609
3694
  }],
3610
3695
  sync: () => {
3611
- At({
3696
+ Et({
3612
3697
  button: n,
3613
3698
  overlay: r,
3614
3699
  isActive: o.isActive
@@ -3619,36 +3704,36 @@ var kl = [
3619
3704
  }
3620
3705
  }
3621
3706
  ];
3622
- function Al(t = {}) {
3623
- const e = new tl(), o = {
3707
+ function Oa(t = {}) {
3708
+ const e = new la(), o = {
3624
3709
  toolTagMap: {
3625
- ...nr,
3710
+ ...lr,
3626
3711
  ...t.toolTagMap || {}
3627
3712
  },
3628
3713
  toolComponentFactory: t.toolComponentFactory,
3629
3714
  toolComponentFactories: t.toolComponentFactories
3630
3715
  }, n = (i) => t.overrides?.[i.toolId] || i;
3631
- return t.includePackagedTools && xl(e, {
3716
+ return t.includePackagedTools && Ra(e, {
3632
3717
  toolIds: t.toolIds,
3633
3718
  applyOverrides: n
3634
3719
  }), t.toolModuleLoaders && Object.keys(t.toolModuleLoaders).length > 0 && e.setToolModuleLoaders(t.toolModuleLoaders), e.setComponentOverrides(o), e;
3635
3720
  }
3636
- function xl(t, e = {}) {
3721
+ function Ra(t, e = {}) {
3637
3722
  const o = e.toolIds && e.toolIds.length > 0 ? new Set(e.toolIds) : null, n = e.applyOverrides || ((i) => i);
3638
- for (const i of kl) o && !o.has(i.toolId) || t.register(n(i));
3723
+ for (const i of Pa) o && !o.has(i.toolId) || t.register(n(i));
3639
3724
  }
3640
- function _l(t = {}) {
3641
- return Al({
3725
+ function Na(t = {}) {
3726
+ return Oa({
3642
3727
  ...t,
3643
3728
  includePackagedTools: !0
3644
3729
  });
3645
3730
  }
3646
- function Cl() {
3647
- const t = _l(), e = /* @__PURE__ */ new Set();
3731
+ function Wa() {
3732
+ const t = Na(), e = /* @__PURE__ */ new Set();
3648
3733
  for (const o of t.getAllTools()) for (const n of o.pnpSupportIds || []) e.add(n);
3649
3734
  return [...e].sort();
3650
3735
  }
3651
- [...Cl()];
3736
+ [...Wa()];
3652
3737
  Object.values({
3653
3738
  visual: {
3654
3739
  magnification: "magnification",
@@ -3763,16 +3848,16 @@ Object.values({
3763
3848
  tutorialAvailable: "tutorialAvailable"
3764
3849
  }
3765
3850
  }).flatMap((t) => Object.values(t));
3766
- tr("ToolCoordinator");
3767
- var Zn;
3851
+ rr("ToolCoordinator");
3852
+ var oi;
3768
3853
  (function(t) {
3769
3854
  t[t.BASE = 0] = "BASE", t[t.TOOL = 1e3] = "TOOL", t[t.MODAL = 2e3] = "MODAL", t[t.CONTROL = 3e3] = "CONTROL", t[t.HIGHLIGHT = 4e3] = "HIGHLIGHT";
3770
- })(Zn || (Zn = {}));
3771
- var Xn;
3855
+ })(oi || (oi = {}));
3856
+ var ni;
3772
3857
  (function(t) {
3773
3858
  t.IDLE = "idle", t.LOADING = "loading", t.PLAYING = "playing", t.PAUSED = "paused", t.ERROR = "error";
3774
- })(Xn || (Xn = {}));
3775
- var El = /* @__PURE__ */ le('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), Ml = /* @__PURE__ */ le('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), Ll = /* @__PURE__ */ le('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), Ol = /* @__PURE__ */ le('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), Pl = /* @__PURE__ */ le('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), Rl = /* @__PURE__ */ le('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), Nl = /* @__PURE__ */ le('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1), Vl = {
3859
+ })(ni || (ni = {}));
3860
+ var Va = /* @__PURE__ */ ce('<button class="pie-tool-annotation-toolbar__highlight-swatch svelte-g8qu62"><span class="pie-sr-only svelte-g8qu62"> </span></button>'), ja = /* @__PURE__ */ ce('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Read selected text aloud" title="Read Aloud"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z"></path></svg></button>', 1), za = /* @__PURE__ */ ce('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--warning svelte-g8qu62" aria-label="Remove this annotation" title="Remove"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>'), qa = /* @__PURE__ */ ce('<button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--danger svelte-g8qu62" aria-label="Clear all annotations from document" title="Clear All">Clear All</button>'), Ha = /* @__PURE__ */ ce('<div class="divider divider-horizontal mx-0 w-px svelte-g8qu62"></div> <!> <!>', 1), Da = /* @__PURE__ */ ce('<div class="pie-tool-annotation-toolbar notranslate svelte-g8qu62" role="toolbar" aria-label="Text annotation toolbar" translate="no"><!> <button class="pie-tool-annotation-toolbar__button pie-tool-annotation-toolbar__button--icon svelte-g8qu62" aria-label="Underline selected text" title="Underline"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="18" height="18" fill="currentColor" aria-hidden="true" class="svelte-g8qu62"><path d="M5,21H19V19H5V21M12,17A6,6 0 0,0 18,11V3H15.5V11A3.5,3.5 0 0,1 12,14.5A3.5,3.5 0 0,1 8.5,11V3H6V11A6,6 0 0,0 12,17Z"></path></svg></button> <!> <!></div>'), Ba = /* @__PURE__ */ ce('<div style="display: none;" aria-hidden="true"></div> <!> <div role="status" aria-live="polite" aria-atomic="true" class="pie-sr-only svelte-g8qu62"> </div>', 1), Fa = {
3776
3861
  hash: "svelte-g8qu62",
3777
3862
  code: `.pie-tool-annotation-toolbar.svelte-g8qu62 {position:fixed;z-index:4200;display:flex;gap:0.25rem;padding:0.5rem;border-radius:0.5rem;background:var(--pie-background, #fff);color:var(--pie-text, #111827);border:1px solid var(--pie-border, #d1d5db);box-shadow:0 10px 25px -8px rgb(0 0 0 / 0.3);user-select:none;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62 {width:2.5rem;height:2rem;border:2px solid color-mix(in srgb, var(--pie-border-dark, #111827) 20%, transparent);border-radius:0.375rem;cursor:pointer;transition:all 0.15s ease;display:flex;align-items:center;justify-content:center;padding:0;}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:hover {transform:scale(1.1);border-color:color-mix(in srgb, var(--pie-border-dark, #111827) 45%, transparent);box-shadow:0 2px 8px rgb(0 0 0 / 0.15);}.pie-tool-annotation-toolbar__highlight-swatch.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar.svelte-g8qu62 .divider-horizontal:where(.svelte-g8qu62) {height:auto;width:1px;background-color:color-mix(in srgb, var(--pie-border, #d1d5db) 70%, transparent);}
3778
3863
 
@@ -3780,31 +3865,31 @@ var El = /* @__PURE__ */ le('<button class="pie-tool-annotation-toolbar__highlig
3780
3865
 
3781
3866
  /* Button styling */.pie-tool-annotation-toolbar__button.svelte-g8qu62 {display:inline-flex;align-items:center;justify-content:center;gap:0.35rem;padding:0.4rem 0.55rem;border:1px solid var(--pie-button-border, #d1d5db);border-radius:0.4rem;background:var(--pie-button-bg, #fff);color:var(--pie-button-color, var(--pie-text, #111827));cursor:pointer;}.pie-tool-annotation-toolbar__button--icon.svelte-g8qu62 {min-width:2rem;min-height:2rem;padding:0.45rem;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:hover {background:var(--pie-button-hover-bg, #f9fafb);color:var(--pie-button-hover-color, var(--pie-text, #111827));border-color:var(--pie-button-hover-border, #9ca3af);}.pie-tool-annotation-toolbar__button.svelte-g8qu62:focus-visible {outline:2px solid var(--pie-button-focus-outline, var(--pie-primary, #3f51b5));outline-offset:2px;}.pie-tool-annotation-toolbar__button.svelte-g8qu62:disabled {opacity:0.6;cursor:not-allowed;}.pie-tool-annotation-toolbar__button--warning.svelte-g8qu62 {color:var(--pie-missing-icon, #92400e);}.pie-tool-annotation-toolbar__button--danger.svelte-g8qu62 {color:var(--pie-incorrect-icon, #b91c1c);}.pie-tool-annotation-toolbar__button.svelte-g8qu62 svg:where(.svelte-g8qu62) {width:18px;height:18px;}`
3782
3867
  };
3783
- function Wl(t, e) {
3784
- ri(e, !0), Ps(t, Vl);
3785
- let o = Lo(e, "enabled", 7, !0), n = Lo(e, "highlightCoordinator", 7, null), i = Lo(e, "ttsService", 7, null);
3786
- const r = typeof window < "u", s = "pie-annotations", l = [
3868
+ function Ga(t, e) {
3869
+ di(e, !0), zs(t, Fa);
3870
+ let o = Oo(e, "enabled", 7, !0), n = Oo(e, "highlightCoordinator", 7, null), i = Oo(e, "ttsService", 7, null);
3871
+ const r = typeof window < "u", s = "pie-annotations", a = [
3787
3872
  {
3788
- name: Rt.YELLOW,
3873
+ name: zt.YELLOW,
3789
3874
  hex: "#fde995",
3790
3875
  label: "Yellow highlight"
3791
3876
  },
3792
3877
  {
3793
- name: Rt.PINK,
3878
+ name: zt.PINK,
3794
3879
  hex: "#ff9fae",
3795
3880
  label: "Pink highlight"
3796
3881
  },
3797
3882
  {
3798
- name: Rt.BLUE,
3883
+ name: zt.BLUE,
3799
3884
  hex: "#a7e0f6",
3800
3885
  label: "Blue highlight"
3801
3886
  },
3802
3887
  {
3803
- name: Rt.GREEN,
3888
+ name: zt.GREEN,
3804
3889
  hex: "#a6e1c5",
3805
3890
  label: "Green highlight"
3806
3891
  }
3807
- ], a = [
3892
+ ], u = [
3808
3893
  "button",
3809
3894
  "input",
3810
3895
  "select",
@@ -3815,7 +3900,7 @@ function Wl(t, e) {
3815
3900
  '[role="button"]',
3816
3901
  '[role="textbox"]'
3817
3902
  ];
3818
- let c = /* @__PURE__ */ V(null), d = /* @__PURE__ */ V(null), f = /* @__PURE__ */ V(null), h = /* @__PURE__ */ V(null), v = /* @__PURE__ */ V(Kt({
3903
+ let l = /* @__PURE__ */ V(null), d = /* @__PURE__ */ V(null), h = /* @__PURE__ */ V(null), f = /* @__PURE__ */ V(null), v = /* @__PURE__ */ V(Jt({
3819
3904
  isVisible: !1,
3820
3905
  selectedText: "",
3821
3906
  selectedRange: null,
@@ -3823,86 +3908,86 @@ function Wl(t, e) {
3823
3908
  x: 0,
3824
3909
  y: 0
3825
3910
  }
3826
- })), m = /* @__PURE__ */ V(!1), S = /* @__PURE__ */ V(!1), p = /* @__PURE__ */ V(""), w = /* @__PURE__ */ V(0), R = /* @__PURE__ */ V(null), x = /* @__PURE__ */ ko(() => g(w) > 0), P = /* @__PURE__ */ ko(() => g(R) !== null), U = /* @__PURE__ */ ko(() => g(h)?.scopeElement || g(f)?.scopeElement || null);
3827
- function H() {
3828
- const b = g(c)?.ownerDocument;
3829
- return g(U) || b?.documentElement || document.documentElement;
3830
- }
3911
+ })), m = /* @__PURE__ */ V(!1), k = /* @__PURE__ */ V(!1), p = /* @__PURE__ */ V(""), w = /* @__PURE__ */ V(0), R = /* @__PURE__ */ V(null), A = /* @__PURE__ */ xo(() => g(w) > 0), O = /* @__PURE__ */ xo(() => g(R) !== null), K = /* @__PURE__ */ xo(() => g(f)?.scopeElement || g(h)?.scopeElement || null);
3831
3912
  function D() {
3832
- return `${s}:${g(f)?.canonicalItemId || g(f)?.itemId || "global"}`;
3913
+ const b = g(l)?.ownerDocument;
3914
+ return g(K) || b?.documentElement || document.documentElement;
3833
3915
  }
3834
- function ft(b) {
3916
+ function B() {
3917
+ return `${s}:${g(h)?.canonicalItemId || g(h)?.itemId || "global"}`;
3918
+ }
3919
+ function gt(b) {
3835
3920
  if (!n()) return null;
3836
- const I = n().getAnnotations();
3837
- for (const C of I) {
3838
- const it = b.compareBoundaryPoints(Range.START_TO_START, C.range), Dt = b.compareBoundaryPoints(Range.END_TO_END, C.range), we = b.compareBoundaryPoints(Range.START_TO_END, C.range), To = b.compareBoundaryPoints(Range.END_TO_START, C.range);
3839
- if (it >= 0 && Dt <= 0 || it <= 0 && Dt >= 0 || we > 0 && To < 0) return C.id;
3921
+ const T = n().getAnnotations();
3922
+ for (const M of T) {
3923
+ const st = b.compareBoundaryPoints(Range.START_TO_START, M.range), Dt = b.compareBoundaryPoints(Range.END_TO_END, M.range), Ie = b.compareBoundaryPoints(Range.START_TO_END, M.range), $o = b.compareBoundaryPoints(Range.END_TO_START, M.range);
3924
+ if (st >= 0 && Dt <= 0 || st <= 0 && Dt >= 0 || Ie > 0 && $o < 0) return M.id;
3840
3925
  }
3841
3926
  return null;
3842
3927
  }
3843
- function K(b) {
3928
+ function J(b) {
3844
3929
  if (b.nodeType !== Node.ELEMENT_NODE && b.nodeType !== Node.TEXT_NODE) return !1;
3845
- const I = b.nodeType === Node.TEXT_NODE ? b.parentElement : b;
3846
- return I ? !a.some((C) => {
3930
+ const T = b.nodeType === Node.TEXT_NODE ? b.parentElement : b;
3931
+ return T ? !u.some((M) => {
3847
3932
  try {
3848
- return I.closest(C) !== null;
3933
+ return T.closest(M) !== null;
3849
3934
  } catch {
3850
3935
  return !1;
3851
3936
  }
3852
3937
  }) : !1;
3853
3938
  }
3854
- function pt(b) {
3855
- if (!g(U)) return !0;
3856
- const I = b.commonAncestorContainer, C = I.nodeType === Node.TEXT_NODE ? I.parentElement : I;
3857
- return !!C && g(U).contains(C);
3939
+ function mt(b) {
3940
+ if (!g(K)) return !0;
3941
+ const T = b.commonAncestorContainer, M = T.nodeType === Node.TEXT_NODE ? T.parentElement : T;
3942
+ return !!M && g(K).contains(M);
3858
3943
  }
3859
- function We() {
3944
+ function ze() {
3860
3945
  if (!(!r || !n())) try {
3861
- const b = H(), I = n().exportAnnotations(b);
3862
- sessionStorage.setItem(D(), JSON.stringify(I));
3946
+ const b = D(), T = n().exportAnnotations(b);
3947
+ sessionStorage.setItem(B(), JSON.stringify(T));
3863
3948
  } catch (b) {
3864
3949
  console.error("[AnnotationToolbar] Failed to save annotations:", b);
3865
3950
  }
3866
3951
  }
3867
- function lr() {
3952
+ function hr() {
3868
3953
  if (!(!r || !n())) try {
3869
- const b = sessionStorage.getItem(D());
3954
+ const b = sessionStorage.getItem(B());
3870
3955
  if (!b) return;
3871
- const I = JSON.parse(b), C = H(), it = n().importAnnotations(I, C);
3872
- console.log(`[AnnotationToolbar] Restored ${it} annotations`), _(w, n().getAnnotations().length, !0);
3956
+ const T = JSON.parse(b), M = D(), st = n().importAnnotations(T, M);
3957
+ console.log(`[AnnotationToolbar] Restored ${st} annotations`), C(w, n().getAnnotations().length, !0);
3873
3958
  } catch (b) {
3874
3959
  console.error("[AnnotationToolbar] Failed to load annotations:", b);
3875
3960
  }
3876
3961
  }
3877
- function je() {
3962
+ function qe() {
3878
3963
  if (!o() || !r) return;
3879
3964
  const b = window.getSelection();
3880
- if (!b || b.rangeCount === 0) return St();
3881
- const I = b.getRangeAt(0), C = b.toString().trim();
3882
- if (!C || !pt(I) || !K(I.commonAncestorContainer)) return St();
3883
- const it = I.getBoundingClientRect(), Dt = it.left + it.width / 2, we = it.top - 8;
3884
- _(R, ft(I), !0), g(v).isVisible = !0, g(v).selectedText = C, g(v).selectedRange = I.cloneRange(), g(v).toolbarPosition = {
3965
+ if (!b || b.rangeCount === 0) return xt();
3966
+ const T = b.getRangeAt(0), M = b.toString().trim();
3967
+ if (!M || !mt(T) || !J(T.commonAncestorContainer)) return xt();
3968
+ const st = T.getBoundingClientRect(), Dt = st.left + st.width / 2, Ie = st.top - 8;
3969
+ C(R, gt(T), !0), g(v).isVisible = !0, g(v).selectedText = M, g(v).selectedRange = T.cloneRange(), g(v).toolbarPosition = {
3885
3970
  x: Dt,
3886
- y: we
3887
- }, _(p, `Annotation toolbar opened for "${C.length > 30 ? C.substring(0, 30) + "..." : C}"`), setTimeout(() => {
3888
- _(p, "");
3889
- }, 2e3), _(S, !0), setTimeout(() => {
3890
- _(S, !1);
3971
+ y: Ie
3972
+ }, C(p, `Annotation toolbar opened for "${M.length > 30 ? M.substring(0, 30) + "..." : M}"`), setTimeout(() => {
3973
+ C(p, "");
3974
+ }, 2e3), C(k, !0), setTimeout(() => {
3975
+ C(k, !1);
3891
3976
  }, 100);
3892
3977
  }
3893
- function St() {
3894
- g(m) && i() && (i().stop(), _(m, !1)), g(v).isVisible = !1, g(v).selectedText = "", g(v).selectedRange = null;
3978
+ function xt() {
3979
+ g(m) && i() && (i().stop(), C(m, !1)), g(v).isVisible = !1, g(v).selectedText = "", g(v).selectedRange = null;
3895
3980
  }
3896
- function pn(b) {
3981
+ function In(b) {
3897
3982
  if (!g(v).selectedRange || !n()) return;
3898
- const I = g(v).selectedText;
3899
- n().addAnnotation(g(v).selectedRange, b), _(w, n().getAnnotations().length, !0), We();
3900
- const C = b === Rt.UNDERLINE ? "underlined" : `highlighted in ${b}`;
3901
- _(p, `"${I.length > 30 ? I.substring(0, 30) + "..." : I}" ${C}`), setTimeout(() => {
3902
- _(p, "");
3903
- }, 3e3), St();
3904
- }
3905
- function ar() {
3983
+ const T = g(v).selectedText;
3984
+ n().addAnnotation(g(v).selectedRange, b), C(w, n().getAnnotations().length, !0), ze();
3985
+ const M = b === zt.UNDERLINE ? "underlined" : `highlighted in ${b}`;
3986
+ C(p, `"${T.length > 30 ? T.substring(0, 30) + "..." : T}" ${M}`), setTimeout(() => {
3987
+ C(p, "");
3988
+ }, 3e3), xt();
3989
+ }
3990
+ function fr() {
3906
3991
  if (!g(R) || !n()) {
3907
3992
  console.warn("[AnnotationToolbar] No overlapping annotation to remove");
3908
3993
  return;
@@ -3913,120 +3998,120 @@ function Wl(t, e) {
3913
3998
  console.warn("[AnnotationToolbar] Annotation not found:", g(R));
3914
3999
  return;
3915
4000
  }
3916
- const I = b.range.toString();
4001
+ const T = b.range.toString();
3917
4002
  n().removeAnnotation(g(R));
3918
- const C = n().getAnnotations().length;
3919
- _(w, C, !0), console.log("[AnnotationToolbar] Annotations remaining:", C), We(), _(p, `Removed annotation from "${I.length > 30 ? I.substring(0, 30) + "..." : I}"`), setTimeout(() => {
3920
- _(p, "");
3921
- }, 3e3), St();
4003
+ const M = n().getAnnotations().length;
4004
+ C(w, M, !0), console.log("[AnnotationToolbar] Annotations remaining:", M), ze(), C(p, `Removed annotation from "${T.length > 30 ? T.substring(0, 30) + "..." : T}"`), setTimeout(() => {
4005
+ C(p, "");
4006
+ }, 3e3), xt();
3922
4007
  }
3923
- function cr() {
4008
+ function pr() {
3924
4009
  const b = g(w);
3925
- n()?.clearAnnotations(), _(w, 0), sessionStorage.removeItem(D()), _(p, `${b} annotation${b === 1 ? "" : "s"} cleared`), setTimeout(() => {
3926
- _(p, "");
3927
- }, 3e3), St();
4010
+ n()?.clearAnnotations(), C(w, 0), sessionStorage.removeItem(B()), C(p, `${b} annotation${b === 1 ? "" : "s"} cleared`), setTimeout(() => {
4011
+ C(p, "");
4012
+ }, 3e3), xt();
3928
4013
  }
3929
- async function ur() {
4014
+ async function vr() {
3930
4015
  if (!(!g(v).selectedRange || !i())) {
3931
- _(m, !0);
4016
+ C(m, !0);
3932
4017
  try {
3933
- console.log("[AnnotationToolbar] Speaking range:", g(v).selectedRange.toString().substring(0, 50)), await i().speakRange(g(v).selectedRange, { contentRoot: H() }), console.log("[AnnotationToolbar] TTS completed successfully");
4018
+ console.log("[AnnotationToolbar] Speaking range:", g(v).selectedRange.toString().substring(0, 50)), await i().speakRange(g(v).selectedRange, { contentRoot: D() }), console.log("[AnnotationToolbar] TTS completed successfully");
3934
4019
  } catch (b) {
3935
4020
  console.error("[AnnotationToolbar] TTS error:", b), alert(`TTS failed: ${b instanceof Error ? b.message : String(b)}`);
3936
4021
  } finally {
3937
- _(m, !1);
4022
+ C(m, !1);
3938
4023
  }
3939
4024
  }
3940
4025
  }
3941
- function vn(b) {
3942
- b.key === "Escape" && g(v).isVisible && (b.preventDefault(), St());
4026
+ function kn(b) {
4027
+ b.key === "Escape" && g(v).isVisible && (b.preventDefault(), xt());
3943
4028
  }
3944
- function ze(b) {
3945
- !g(v).isVisible || g(S) || g(d) && !g(d).contains(b.target) && St();
4029
+ function He(b) {
4030
+ !g(v).isVisible || g(k) || g(d) && !g(d).contains(b.target) && xt();
3946
4031
  }
3947
- Mn(() => {
4032
+ Wn(() => {
3948
4033
  if (!r) return;
3949
4034
  const b = setTimeout(() => {
3950
- lr();
3951
- }, 2e3), I = g(U) || document;
3952
- return I.addEventListener("mouseup", je), I.addEventListener("click", ze), I.addEventListener("touchend", je), I.addEventListener("touchstart", ze), document.addEventListener("keydown", vn), window.addEventListener("scroll", St, !0), () => {
3953
- clearTimeout(b), I.removeEventListener("mouseup", je), I.removeEventListener("click", ze), I.removeEventListener("touchend", je), I.removeEventListener("touchstart", ze), document.removeEventListener("keydown", vn), window.removeEventListener("scroll", St, !0);
4035
+ hr();
4036
+ }, 2e3), T = g(K) || document;
4037
+ return T.addEventListener("mouseup", qe), T.addEventListener("click", He), T.addEventListener("touchend", qe), T.addEventListener("touchstart", He), document.addEventListener("keydown", kn), window.addEventListener("scroll", xt, !0), () => {
4038
+ clearTimeout(b), T.removeEventListener("mouseup", qe), T.removeEventListener("click", He), T.removeEventListener("touchend", qe), T.removeEventListener("touchstart", He), document.removeEventListener("keydown", kn), window.removeEventListener("scroll", xt, !0);
3954
4039
  };
3955
- }), Mn(() => {
3956
- if (!g(c)) return;
3957
- const b = Zs(g(c), (C) => {
3958
- _(f, C, !0);
3959
- }), I = Xs(g(c), (C) => {
3960
- _(h, C, !0);
4040
+ }), Wn(() => {
4041
+ if (!g(l)) return;
4042
+ const b = oa(g(l), (M) => {
4043
+ C(h, M, !0);
4044
+ }), T = na(g(l), (M) => {
4045
+ C(f, M, !0);
3961
4046
  });
3962
4047
  return () => {
3963
- I(), b();
4048
+ T(), b();
3964
4049
  };
3965
4050
  });
3966
- var dr = {
4051
+ var gr = {
3967
4052
  get enabled() {
3968
4053
  return o();
3969
4054
  },
3970
4055
  set enabled(b = !0) {
3971
- o(b), Ye();
4056
+ o(b), eo();
3972
4057
  },
3973
4058
  get highlightCoordinator() {
3974
4059
  return n();
3975
4060
  },
3976
4061
  set highlightCoordinator(b = null) {
3977
- n(b), Ye();
4062
+ n(b), eo();
3978
4063
  },
3979
4064
  get ttsService() {
3980
4065
  return i();
3981
4066
  },
3982
4067
  set ttsService(b = null) {
3983
- i(b), Ye();
3984
- }
3985
- }, gn = Nl(), mn = Ao(gn);
3986
- Bn(mn, (b) => _(c, b), () => g(c));
3987
- var bn = Mt(mn, 2), hr = (b) => {
3988
- var I = Rl(), C = Ue(I);
3989
- Ms(C, 17, () => l, Cs, (rt, st) => {
3990
- var J = El(), He = Ue(J), Io = Ue(He, !0);
3991
- De(He), De(J), Ke(() => {
3992
- jn(J, `background-color: ${g(st).hex ?? ""};`), zn(J, "aria-label", g(st).label), zn(J, "title", g(st).label), Nn(Io, g(st).label);
3993
- }), Ie("click", J, () => pn(g(st).name)), Pt(rt, J);
4068
+ i(b), eo();
4069
+ }
4070
+ }, $n = Ba(), Sn = _o($n);
4071
+ Zn(Sn, (b) => C(l, b), () => g(l));
4072
+ var An = Rt(Sn, 2), mr = (b) => {
4073
+ var T = Da(), M = Je(T);
4074
+ Ws(M, 17, () => a, Rs, (at, lt) => {
4075
+ var Z = Va(), De = Je(Z), So = Je(De, !0);
4076
+ Be(De), Be(Z), Ze(() => {
4077
+ Fn(Z, `background-color: ${g(lt).hex ?? ""};`), Gn(Z, "aria-label", g(lt).label), Gn(Z, "title", g(lt).label), Hn(So, g(lt).label);
4078
+ }), Se("click", Z, () => In(g(lt).name)), Vt(at, Z);
3994
4079
  });
3995
- var it = Mt(C, 2), Dt = Mt(it, 2), we = (rt) => {
3996
- var st = Ml(), J = Mt(Ao(st), 2);
3997
- Ke(() => J.disabled = g(m)), Ie("click", J, ur), Pt(rt, st);
4080
+ var st = Rt(M, 2), Dt = Rt(st, 2), Ie = (at) => {
4081
+ var lt = ja(), Z = Rt(_o(lt), 2);
4082
+ Ze(() => Z.disabled = g(m)), Se("click", Z, vr), Vt(at, lt);
3998
4083
  };
3999
- $e(Dt, (rt) => {
4000
- i() && rt(we);
4084
+ xe(Dt, (at) => {
4085
+ i() && at(Ie);
4001
4086
  });
4002
- var To = Mt(Dt, 2), pr = (rt) => {
4003
- var st = Pl(), J = Mt(Ao(st), 2), He = (qt) => {
4004
- var Te = Ll();
4005
- Ie("click", Te, ar), Pt(qt, Te);
4087
+ var $o = Rt(Dt, 2), yr = (at) => {
4088
+ var lt = Ha(), Z = Rt(_o(lt), 2), De = (Bt) => {
4089
+ var ke = za();
4090
+ Se("click", ke, fr), Vt(Bt, ke);
4006
4091
  };
4007
- $e(J, (qt) => {
4008
- g(P) && qt(He);
4092
+ xe(Z, (Bt) => {
4093
+ g(O) && Bt(De);
4009
4094
  });
4010
- var Io = Mt(J, 2), vr = (qt) => {
4011
- var Te = Ol();
4012
- Ie("click", Te, cr), Pt(qt, Te);
4095
+ var So = Rt(Z, 2), wr = (Bt) => {
4096
+ var ke = qa();
4097
+ Se("click", ke, pr), Vt(Bt, ke);
4013
4098
  };
4014
- $e(Io, (qt) => {
4015
- g(x) && qt(vr);
4016
- }), Pt(rt, st);
4099
+ xe(So, (Bt) => {
4100
+ g(A) && Bt(wr);
4101
+ }), Vt(at, lt);
4017
4102
  };
4018
- $e(To, (rt) => {
4019
- (g(P) || g(x)) && rt(pr);
4020
- }), De(I), Bn(I, (rt) => _(d, rt), () => g(d)), Ke(() => jn(I, `left:${g(v).toolbarPosition.x}px; top:${g(v).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), Ie("click", it, () => pn(Rt.UNDERLINE)), Pt(b, I);
4103
+ xe($o, (at) => {
4104
+ (g(O) || g(A)) && at(yr);
4105
+ }), Be(T), Zn(T, (at) => C(d, at), () => g(d)), Ze(() => Fn(T, `left:${g(v).toolbarPosition.x}px; top:${g(v).toolbarPosition.y}px; transform: translate(-50%, -100%);`)), Se("click", st, () => In(zt.UNDERLINE)), Vt(b, T);
4021
4106
  };
4022
- $e(bn, (b) => {
4023
- g(v).isVisible && b(hr);
4107
+ xe(An, (b) => {
4108
+ g(v).isVisible && b(mr);
4024
4109
  });
4025
- var yn = Mt(bn, 2), fr = Ue(yn, !0);
4026
- return De(yn), Ke(() => Nn(fr, g(p))), Pt(t, gn), si(dr);
4110
+ var xn = Rt(An, 2), br = Je(xn, !0);
4111
+ return Be(xn), Ze(() => Hn(br, g(p))), Vt(t, $n), hi(gr);
4027
4112
  }
4028
- ws(["click"]);
4029
- customElements.define("pie-tool-annotation-toolbar", Fs(Wl, {
4113
+ As(["click"]);
4114
+ customElements.define("pie-tool-annotation-toolbar", Ys(Ga, {
4030
4115
  enabled: {
4031
4116
  attribute: "enabled",
4032
4117
  type: "Boolean"