@pie-players/pie-section-player-tools-session-debugger 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,123 +1,126 @@
1
- var xs = Object.defineProperty;
2
- var Gn = (e) => {
1
+ var Cs = Object.defineProperty;
2
+ var Un = (e) => {
3
3
  throw TypeError(e);
4
4
  };
5
- var ks = (e, t, n) => t in e ? xs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
- var A = (e, t, n) => ks(e, typeof t != "symbol" ? t + "" : t, n), cn = (e, t, n) => t.has(e) || Gn("Cannot " + n);
7
- var l = (e, t, n) => (cn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), w = (e, t, n) => t.has(e) ? Gn("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), p = (e, t, n, r) => (cn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), j = (e, t, n) => (cn(e, t, "access private method"), n);
8
- var ur;
9
- typeof window < "u" && ((ur = window.__svelte ?? (window.__svelte = {})).v ?? (ur.v = /* @__PURE__ */ new Set())).add("5");
10
- const Is = 2, Mn = "[", Tn = "[!", ar = "]", ut = {}, O = /* @__PURE__ */ Symbol(), fr = "http://www.w3.org/1999/xhtml", _n = !1;
11
- var cr = Array.isArray, As = Array.prototype.indexOf, at = Array.prototype.includes, Ms = Array.from, Vt = Object.keys, Yt = Object.defineProperty, Qe = Object.getOwnPropertyDescriptor, Ts = Object.getOwnPropertyDescriptors, Cs = Object.prototype, Rs = Array.prototype, dr = Object.getPrototypeOf, Zn = Object.isExtensible;
12
- const Ns = () => {
5
+ var Is = (e, t, n) => t in e ? Cs(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
6
+ var I = (e, t, n) => Is(e, typeof t != "symbol" ? t + "" : t, n), cn = (e, t, n) => t.has(e) || Un("Cannot " + n);
7
+ var l = (e, t, n) => (cn(e, t, "read from private field"), n ? n.call(e) : t.get(e)), w = (e, t, n) => t.has(e) ? Un("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(e) : t.set(e, n), m = (e, t, n, r) => (cn(e, t, "write to private field"), r ? r.call(e, n) : t.set(e, n), n), k = (e, t, n) => (cn(e, t, "access private method"), n);
8
+ var ar;
9
+ typeof window < "u" && ((ar = window.__svelte ?? (window.__svelte = {})).v ?? (ar.v = /* @__PURE__ */ new Set())).add("5");
10
+ const ks = 1, Ts = 2, ur = "[", fr = "[!", Xn = "[?", cr = "]", wt = {}, O = /* @__PURE__ */ Symbol(), dr = "http://www.w3.org/1999/xhtml", hn = !1;
11
+ var hr = Array.isArray, As = Array.prototype.indexOf, bt = Array.prototype.includes, Ms = Array.from, Xt = Object.keys, Kt = Object.defineProperty, at = Object.getOwnPropertyDescriptor, Rs = Object.getOwnPropertyDescriptors, Ns = Object.prototype, Os = Array.prototype, vr = Object.getPrototypeOf, Kn = Object.isExtensible;
12
+ const Ds = () => {
13
13
  };
14
- function Os(e) {
14
+ function Ls(e) {
15
15
  for (var t = 0; t < e.length; t++)
16
16
  e[t]();
17
17
  }
18
- function hr() {
18
+ function _r() {
19
19
  var e, t, n = new Promise((r, s) => {
20
20
  e = r, t = s;
21
21
  });
22
22
  return { promise: n, resolve: e, reject: t };
23
23
  }
24
- const L = 2, Bt = 4, Xt = 8, vr = 1 << 24, Se = 16, he = 32, Oe = 64, pn = 128, K = 512, C = 1024, P = 2048, re = 4096, ae = 8192, $e = 16384, _t = 32768, ft = 65536, Qn = 1 << 17, _r = 1 << 18, Je = 1 << 19, Ds = 1 << 20, Ue = 65536, gn = 1 << 21, Cn = 1 << 22, Ce = 1 << 23, dn = /* @__PURE__ */ Symbol("$state"), Ls = /* @__PURE__ */ Symbol("legacy props"), Pe = new class extends Error {
24
+ const P = 2, Ct = 4, yt = 8, kn = 1 << 24, He = 16, we = 32, Fe = 64, vn = 128, Q = 512, D = 1024, L = 2048, ue = 4096, ee = 8192, ke = 16384, tt = 32768, $t = 65536, Gn = 1 << 17, Ps = 1 << 18, nt = 1 << 19, zs = 1 << 20, et = 65536, _n = 1 << 21, Tn = 1 << 22, De = 1 << 23, dn = /* @__PURE__ */ Symbol("$state"), js = /* @__PURE__ */ Symbol("legacy props"), Hs = /* @__PURE__ */ Symbol(""), Ye = new class extends Error {
25
25
  constructor() {
26
26
  super(...arguments);
27
- A(this, "name", "StaleReactionError");
28
- A(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
27
+ I(this, "name", "StaleReactionError");
28
+ I(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
29
29
  }
30
- }(), Rn = 3, Jt = 8;
30
+ }(), Fs = (
31
+ // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
32
+ !!globalThis.document?.contentType && /* @__PURE__ */ globalThis.document.contentType.includes("xml")
33
+ ), nn = 3, rn = 8;
31
34
  function pr(e) {
32
35
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
33
36
  }
34
- function Ps() {
37
+ function Bs() {
35
38
  throw new Error("https://svelte.dev/e/async_derived_orphan");
36
39
  }
37
- function Fs(e) {
40
+ function Ws(e) {
38
41
  throw new Error("https://svelte.dev/e/effect_in_teardown");
39
42
  }
40
- function js() {
43
+ function Vs() {
41
44
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
42
45
  }
43
- function Hs(e) {
46
+ function Ys(e) {
44
47
  throw new Error("https://svelte.dev/e/effect_orphan");
45
48
  }
46
- function zs() {
49
+ function qs() {
47
50
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
48
51
  }
49
- function Vs() {
52
+ function Us() {
50
53
  throw new Error("https://svelte.dev/e/hydration_failed");
51
54
  }
52
- function Ys() {
55
+ function Xs() {
53
56
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
54
57
  }
55
- function Bs() {
58
+ function Ks() {
56
59
  throw new Error("https://svelte.dev/e/state_prototype_fixed");
57
60
  }
58
- function Ws() {
61
+ function Gs() {
59
62
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
60
63
  }
61
- function qs() {
64
+ function Js() {
62
65
  throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror");
63
66
  }
64
- function Kt(e) {
67
+ function sn(e) {
65
68
  console.warn("https://svelte.dev/e/hydration_mismatch");
66
69
  }
67
- function Us() {
70
+ function Zs() {
68
71
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
69
72
  }
70
- let I = !1;
71
- function Ge(e) {
72
- I = e;
73
+ let C = !1;
74
+ function ot(e) {
75
+ C = e;
73
76
  }
74
- let k;
77
+ let E;
75
78
  function fe(e) {
76
79
  if (e === null)
77
- throw Kt(), ut;
78
- return k = e;
80
+ throw sn(), wt;
81
+ return E = e;
79
82
  }
80
- function Nn() {
81
- return fe(/* @__PURE__ */ De(k));
83
+ function An() {
84
+ return fe(/* @__PURE__ */ Ae(E));
82
85
  }
83
- function Ie(e) {
84
- if (I) {
85
- if (/* @__PURE__ */ De(k) !== null)
86
- throw Kt(), ut;
87
- k = e;
86
+ function ye(e) {
87
+ if (C) {
88
+ if (/* @__PURE__ */ Ae(E) !== null)
89
+ throw sn(), wt;
90
+ E = e;
88
91
  }
89
92
  }
90
- function Xs(e = 1) {
91
- if (I) {
92
- for (var t = e, n = k; t--; )
93
+ function Qs(e = 1) {
94
+ if (C) {
95
+ for (var t = e, n = E; t--; )
93
96
  n = /** @type {TemplateNode} */
94
- /* @__PURE__ */ De(n);
95
- k = n;
97
+ /* @__PURE__ */ Ae(n);
98
+ E = n;
96
99
  }
97
100
  }
98
101
  function gr(e = !0) {
99
- for (var t = 0, n = k; ; ) {
100
- if (n.nodeType === Jt) {
102
+ for (var t = 0, n = E; ; ) {
103
+ if (n.nodeType === rn) {
101
104
  var r = (
102
105
  /** @type {Comment} */
103
106
  n.data
104
107
  );
105
- if (r === ar) {
108
+ if (r === cr) {
106
109
  if (t === 0) return n;
107
110
  t -= 1;
108
- } else (r === Mn || r === Tn || // "[1", "[2", etc. for if blocks
111
+ } else (r === ur || r === fr || // "[1", "[2", etc. for if blocks
109
112
  r[0] === "[" && !isNaN(Number(r.slice(1)))) && (t += 1);
110
113
  }
111
114
  var s = (
112
115
  /** @type {TemplateNode} */
113
- /* @__PURE__ */ De(n)
116
+ /* @__PURE__ */ Ae(n)
114
117
  );
115
118
  e && n.remove(), n = s;
116
119
  }
117
120
  }
118
- function Js(e) {
119
- if (!e || e.nodeType !== Jt)
120
- throw Kt(), ut;
121
+ function ei(e) {
122
+ if (!e || e.nodeType !== rn)
123
+ throw sn(), wt;
121
124
  return (
122
125
  /** @type {Comment} */
123
126
  e.data
@@ -126,19 +129,19 @@ function Js(e) {
126
129
  function mr(e) {
127
130
  return e === this.v;
128
131
  }
129
- function Ks(e, t) {
132
+ function ti(e, t) {
130
133
  return e != e ? t == t : e !== t || e !== null && typeof e == "object" || typeof e == "function";
131
134
  }
132
- function Gs(e) {
133
- return !Ks(e, this.v);
135
+ function ni(e) {
136
+ return !ti(e, this.v);
134
137
  }
135
- let Zs = !1, Y = null;
136
- function ct(e) {
137
- Y = e;
138
+ let ri = !1, W = null;
139
+ function xt(e) {
140
+ W = e;
138
141
  }
139
- function wr(e, t = !1, n) {
140
- Y = {
141
- p: Y,
142
+ function on(e, t = !1, n) {
143
+ W = {
144
+ p: W,
142
145
  i: !1,
143
146
  c: null,
144
147
  e: null,
@@ -147,52 +150,52 @@ function wr(e, t = !1, n) {
147
150
  l: null
148
151
  };
149
152
  }
150
- function br(e) {
153
+ function ln(e) {
151
154
  var t = (
152
155
  /** @type {ComponentContext} */
153
- Y
156
+ W
154
157
  ), n = t.e;
155
158
  if (n !== null) {
156
159
  t.e = null;
157
160
  for (var r of n)
158
- Yr(r);
161
+ Fr(r);
159
162
  }
160
- return e !== void 0 && (t.x = e), t.i = !0, Y = t.p, e ?? /** @type {T} */
163
+ return e !== void 0 && (t.x = e), t.i = !0, W = t.p, e ?? /** @type {T} */
161
164
  {};
162
165
  }
163
- function yr() {
166
+ function wr() {
164
167
  return !0;
165
168
  }
166
- let Fe = [];
167
- function $r() {
168
- var e = Fe;
169
- Fe = [], Os(e);
169
+ let qe = [];
170
+ function br() {
171
+ var e = qe;
172
+ qe = [], Ls(e);
170
173
  }
171
- function et(e) {
172
- if (Fe.length === 0 && !mt) {
173
- var t = Fe;
174
+ function ut(e) {
175
+ if (qe.length === 0 && !Tt) {
176
+ var t = qe;
174
177
  queueMicrotask(() => {
175
- t === Fe && $r();
178
+ t === qe && br();
176
179
  });
177
180
  }
178
- Fe.push(e);
181
+ qe.push(e);
179
182
  }
180
- function Qs() {
181
- for (; Fe.length > 0; )
182
- $r();
183
+ function si() {
184
+ for (; qe.length > 0; )
185
+ br();
183
186
  }
184
- function Er(e) {
187
+ function yr(e) {
185
188
  var t = y;
186
189
  if (t === null)
187
- return b.f |= Ce, e;
188
- if ((t.f & _t) === 0 && (t.f & Bt) === 0)
190
+ return b.f |= De, e;
191
+ if ((t.f & tt) === 0 && (t.f & Ct) === 0)
189
192
  throw e;
190
- dt(e, t);
193
+ Oe(e, t);
191
194
  }
192
- function dt(e, t) {
195
+ function Oe(e, t) {
193
196
  for (; t !== null; ) {
194
- if ((t.f & pn) !== 0) {
195
- if ((t.f & _t) === 0)
197
+ if ((t.f & vn) !== 0) {
198
+ if ((t.f & tt) === 0)
196
199
  throw e;
197
200
  try {
198
201
  t.b.error(e);
@@ -205,78 +208,79 @@ function dt(e, t) {
205
208
  }
206
209
  throw e;
207
210
  }
208
- const ei = -7169;
209
- function M(e, t) {
210
- e.f = e.f & ei | t;
211
+ const ii = -7169;
212
+ function R(e, t) {
213
+ e.f = e.f & ii | t;
211
214
  }
212
- function On(e) {
213
- (e.f & K) !== 0 || e.deps === null ? M(e, C) : M(e, re);
215
+ function Mn(e) {
216
+ (e.f & Q) !== 0 || e.deps === null ? R(e, D) : R(e, ue);
214
217
  }
215
- function Sr(e) {
218
+ function $r(e) {
216
219
  if (e !== null)
217
220
  for (const t of e)
218
- (t.f & L) === 0 || (t.f & Ue) === 0 || (t.f ^= Ue, Sr(
221
+ (t.f & P) === 0 || (t.f & et) === 0 || (t.f ^= et, $r(
219
222
  /** @type {Derived} */
220
223
  t.deps
221
224
  ));
222
225
  }
223
226
  function xr(e, t, n) {
224
- (e.f & P) !== 0 ? t.add(e) : (e.f & re) !== 0 && n.add(e), Sr(e.deps), M(e, C);
227
+ (e.f & L) !== 0 ? t.add(e) : (e.f & ue) !== 0 && n.add(e), $r(e.deps), R(e, D);
225
228
  }
226
- const Ot = /* @__PURE__ */ new Set();
227
- let x = null, ee = null, H = [], Gt = null, mn = !1, mt = !1;
228
- var tt, nt, ze, rt, Et, St, Ve, ge, st, de, wn, bn, kr;
229
- const jn = class jn {
229
+ const Bt = /* @__PURE__ */ new Set();
230
+ let T = null, oe = null, H = [], an = null, Tt = !1, Et = null, oi = 1;
231
+ var Me, ct, Ke, dt, ht, vt, Re, ce, _t, V, pn, gn, mn, wn;
232
+ const Hn = class Hn {
230
233
  constructor() {
231
- w(this, de);
232
- A(this, "committed", !1);
234
+ w(this, V);
235
+ // for debugging. TODO remove once async is stable
236
+ I(this, "id", oi++);
233
237
  /**
234
238
  * The current values of any sources that are updated in this batch
235
239
  * They keys of this map are identical to `this.#previous`
236
240
  * @type {Map<Source, any>}
237
241
  */
238
- A(this, "current", /* @__PURE__ */ new Map());
242
+ I(this, "current", /* @__PURE__ */ new Map());
239
243
  /**
240
244
  * The values of any sources that are updated in this batch _before_ those updates took place.
241
245
  * They keys of this map are identical to `this.#current`
242
246
  * @type {Map<Source, any>}
243
247
  */
244
- A(this, "previous", /* @__PURE__ */ new Map());
248
+ I(this, "previous", /* @__PURE__ */ new Map());
245
249
  /**
246
250
  * When the batch is committed (and the DOM is updated), we need to remove old branches
247
251
  * and append new ones by calling the functions added inside (if/each/key/etc) blocks
248
- * @type {Set<() => void>}
252
+ * @type {Set<(batch: Batch) => void>}
249
253
  */
250
- w(this, tt, /* @__PURE__ */ new Set());
254
+ w(this, Me, /* @__PURE__ */ new Set());
251
255
  /**
252
256
  * If a fork is discarded, we need to destroy any effects that are no longer needed
253
257
  * @type {Set<(batch: Batch) => void>}
254
258
  */
255
- w(this, nt, /* @__PURE__ */ new Set());
259
+ w(this, ct, /* @__PURE__ */ new Set());
256
260
  /**
257
261
  * The number of async effects that are currently in flight
258
262
  */
259
- w(this, ze, 0);
263
+ w(this, Ke, 0);
260
264
  /**
261
265
  * The number of async effects that are currently in flight, _not_ inside a pending boundary
262
266
  */
263
- w(this, rt, 0);
267
+ w(this, dt, 0);
264
268
  /**
265
269
  * A deferred that resolves when the batch is committed, used with `settled()`
266
270
  * TODO replace with Promise.withResolvers once supported widely enough
267
271
  * @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
268
272
  */
269
- w(this, Et, null);
273
+ w(this, ht, null);
270
274
  /**
271
275
  * Deferred effects (which run after async work has completed) that are DIRTY
272
276
  * @type {Set<Effect>}
273
277
  */
274
- w(this, St, /* @__PURE__ */ new Set());
278
+ w(this, vt, /* @__PURE__ */ new Set());
275
279
  /**
276
280
  * Deferred effects that are MAYBE_DIRTY
277
281
  * @type {Set<Effect>}
278
282
  */
279
- w(this, Ve, /* @__PURE__ */ new Set());
283
+ w(this, Re, /* @__PURE__ */ new Set());
280
284
  /**
281
285
  * A map of branches that still exist, but will be destroyed when this batch
282
286
  * is committed — we skip over these during `process`.
@@ -284,19 +288,16 @@ const jn = class jn {
284
288
  * so they can be rescheduled if the branch survives.
285
289
  * @type {Map<Effect, { d: Effect[], m: Effect[] }>}
286
290
  */
287
- w(this, ge, /* @__PURE__ */ new Map());
288
- A(this, "is_fork", !1);
289
- w(this, st, !1);
290
- }
291
- is_deferred() {
292
- return this.is_fork || l(this, rt) > 0;
291
+ w(this, ce, /* @__PURE__ */ new Map());
292
+ I(this, "is_fork", !1);
293
+ w(this, _t, !1);
293
294
  }
294
295
  /**
295
296
  * Add an effect to the #skipped_branches map and reset its children
296
297
  * @param {Effect} effect
297
298
  */
298
299
  skip_effect(t) {
299
- l(this, ge).has(t) || l(this, ge).set(t, { d: [], m: [] });
300
+ l(this, ce).has(t) || l(this, ce).set(t, { d: [], m: [] });
300
301
  }
301
302
  /**
302
303
  * Remove an effect from the #skipped_branches map and reschedule
@@ -304,13 +305,13 @@ const jn = class jn {
304
305
  * @param {Effect} effect
305
306
  */
306
307
  unskip_effect(t) {
307
- var n = l(this, ge).get(t);
308
+ var n = l(this, ce).get(t);
308
309
  if (n) {
309
- l(this, ge).delete(t);
310
+ l(this, ce).delete(t);
310
311
  for (var r of n.d)
311
- M(r, P), te(r);
312
+ R(r, L), pe(r);
312
313
  for (r of n.m)
313
- M(r, re), te(r);
314
+ R(r, ue), pe(r);
314
315
  }
315
316
  }
316
317
  /**
@@ -319,18 +320,19 @@ const jn = class jn {
319
320
  */
320
321
  process(t) {
321
322
  H = [], this.apply();
322
- var n = [], r = [];
323
+ var n = Et = [], r = [];
323
324
  for (const s of t)
324
- j(this, de, wn).call(this, s, n, r);
325
- if (this.is_deferred()) {
326
- j(this, de, bn).call(this, r), j(this, de, bn).call(this, n);
327
- for (const [s, i] of l(this, ge))
328
- Tr(s, i);
325
+ k(this, V, gn).call(this, s, n, r);
326
+ if (Et = null, k(this, V, pn).call(this)) {
327
+ k(this, V, mn).call(this, r), k(this, V, mn).call(this, n);
328
+ for (const [s, i] of l(this, ce))
329
+ Ir(s, i);
329
330
  } else {
330
- for (const s of l(this, tt)) s();
331
- l(this, tt).clear(), l(this, ze) === 0 && j(this, de, kr).call(this), x = null, er(r), er(n), l(this, Et)?.resolve();
331
+ T = null;
332
+ for (const s of l(this, Me)) s(this);
333
+ l(this, Me).clear(), l(this, Ke) === 0 && k(this, V, wn).call(this), Jn(r), Jn(n), l(this, vt).clear(), l(this, Re).clear(), l(this, ht)?.resolve();
332
334
  }
333
- ee = null;
335
+ oe = null;
334
336
  }
335
337
  /**
336
338
  * Associate a change to a given source with the current
@@ -339,84 +341,88 @@ const jn = class jn {
339
341
  * @param {any} value
340
342
  */
341
343
  capture(t, n) {
342
- n !== O && !this.previous.has(t) && this.previous.set(t, n), (t.f & Ce) === 0 && (this.current.set(t, t.v), ee?.set(t, t.v));
344
+ n !== O && !this.previous.has(t) && this.previous.set(t, n), (t.f & De) === 0 && (this.current.set(t, t.v), oe?.set(t, t.v));
343
345
  }
344
346
  activate() {
345
- x = this, this.apply();
347
+ T = this, this.apply();
346
348
  }
347
349
  deactivate() {
348
- x === this && (x = null, ee = null);
350
+ T === this && (T = null, oe = null);
349
351
  }
350
352
  flush() {
351
- if (this.activate(), H.length > 0) {
352
- if (Ir(), x !== null && x !== this)
353
- return;
354
- } else l(this, ze) === 0 && this.process([]);
353
+ if (H.length > 0)
354
+ T = this, Er();
355
+ else if (l(this, Ke) === 0 && !this.is_fork) {
356
+ for (const t of l(this, Me)) t(this);
357
+ l(this, Me).clear(), k(this, V, wn).call(this), l(this, ht)?.resolve();
358
+ }
355
359
  this.deactivate();
356
360
  }
357
361
  discard() {
358
- for (const t of l(this, nt)) t(this);
359
- l(this, nt).clear();
362
+ for (const t of l(this, ct)) t(this);
363
+ l(this, ct).clear();
360
364
  }
361
365
  /**
362
366
  *
363
367
  * @param {boolean} blocking
364
368
  */
365
369
  increment(t) {
366
- p(this, ze, l(this, ze) + 1), t && p(this, rt, l(this, rt) + 1);
370
+ m(this, Ke, l(this, Ke) + 1), t && m(this, dt, l(this, dt) + 1);
367
371
  }
368
372
  /**
369
373
  *
370
374
  * @param {boolean} blocking
371
375
  */
372
376
  decrement(t) {
373
- p(this, ze, l(this, ze) - 1), t && p(this, rt, l(this, rt) - 1), !l(this, st) && (p(this, st, !0), et(() => {
374
- p(this, st, !1), this.is_deferred() ? H.length > 0 && this.flush() : this.revive();
377
+ m(this, Ke, l(this, Ke) - 1), t && m(this, dt, l(this, dt) - 1), !l(this, _t) && (m(this, _t, !0), ut(() => {
378
+ m(this, _t, !1), k(this, V, pn).call(this) ? H.length > 0 && this.flush() : this.revive();
375
379
  }));
376
380
  }
377
381
  revive() {
378
- for (const t of l(this, St))
379
- l(this, Ve).delete(t), M(t, P), te(t);
380
- for (const t of l(this, Ve))
381
- M(t, re), te(t);
382
+ for (const t of l(this, vt))
383
+ l(this, Re).delete(t), R(t, L), pe(t);
384
+ for (const t of l(this, Re))
385
+ R(t, ue), pe(t);
382
386
  this.flush();
383
387
  }
384
- /** @param {() => void} fn */
388
+ /** @param {(batch: Batch) => void} fn */
385
389
  oncommit(t) {
386
- l(this, tt).add(t);
390
+ l(this, Me).add(t);
387
391
  }
388
392
  /** @param {(batch: Batch) => void} fn */
389
393
  ondiscard(t) {
390
- l(this, nt).add(t);
394
+ l(this, ct).add(t);
391
395
  }
392
396
  settled() {
393
- return (l(this, Et) ?? p(this, Et, hr())).promise;
397
+ return (l(this, ht) ?? m(this, ht, _r())).promise;
394
398
  }
395
399
  static ensure() {
396
- if (x === null) {
397
- const t = x = new jn();
398
- Ot.add(x), mt || et(() => {
399
- x === t && t.flush();
400
+ if (T === null) {
401
+ const t = T = new Hn();
402
+ Bt.add(T), Tt || ut(() => {
403
+ T === t && t.flush();
400
404
  });
401
405
  }
402
- return x;
406
+ return T;
403
407
  }
404
408
  apply() {
405
409
  }
406
410
  };
407
- tt = new WeakMap(), nt = new WeakMap(), ze = new WeakMap(), rt = new WeakMap(), Et = new WeakMap(), St = new WeakMap(), Ve = new WeakMap(), ge = new WeakMap(), st = new WeakMap(), de = new WeakSet(), /**
411
+ Me = new WeakMap(), ct = new WeakMap(), Ke = new WeakMap(), dt = new WeakMap(), ht = new WeakMap(), vt = new WeakMap(), Re = new WeakMap(), ce = new WeakMap(), _t = new WeakMap(), V = new WeakSet(), pn = function() {
412
+ return this.is_fork || l(this, dt) > 0;
413
+ }, /**
408
414
  * Traverse the effect tree, executing effects or stashing
409
415
  * them for later execution as appropriate
410
416
  * @param {Effect} root
411
417
  * @param {Effect[]} effects
412
418
  * @param {Effect[]} render_effects
413
419
  */
414
- wn = function(t, n, r) {
415
- t.f ^= C;
416
- for (var s = t.first, i = null; s !== null; ) {
417
- var o = s.f, u = (o & (he | Oe)) !== 0, a = u && (o & C) !== 0, f = a || (o & ae) !== 0 || l(this, ge).has(s);
420
+ gn = function(t, n, r) {
421
+ t.f ^= D;
422
+ for (var s = t.first; s !== null; ) {
423
+ var i = s.f, o = (i & (we | Fe)) !== 0, u = o && (i & D) !== 0, a = (i & ee) !== 0, f = u || l(this, ce).has(s);
418
424
  if (!f && s.fn !== null) {
419
- u ? s.f ^= C : i !== null && (o & (Bt | Xt | vr)) !== 0 ? i.b.defer_effect(s) : (o & Bt) !== 0 ? n.push(s) : Mt(s) && ((o & Se) !== 0 && l(this, Ve).add(s), vt(s));
425
+ o ? a || (s.f ^= D) : (i & Ct) !== 0 ? n.push(s) : (i & (yt | kn)) !== 0 && a ? r.push(s) : zt(s) && (St(s), (i & He) !== 0 && (l(this, Re).add(s), a && R(s, L)));
420
426
  var c = s.first;
421
427
  if (c !== null) {
422
428
  s = c;
@@ -424,10 +430,9 @@ wn = function(t, n, r) {
424
430
  }
425
431
  }
426
432
  for (; s !== null; ) {
427
- s === i && (i = null);
428
- var v = s.next;
429
- if (v !== null) {
430
- s = v;
433
+ var h = s.next;
434
+ if (h !== null) {
435
+ s = h;
431
436
  break;
432
437
  }
433
438
  s = s.parent;
@@ -436,137 +441,136 @@ wn = function(t, n, r) {
436
441
  }, /**
437
442
  * @param {Effect[]} effects
438
443
  */
439
- bn = function(t) {
444
+ mn = function(t) {
440
445
  for (var n = 0; n < t.length; n += 1)
441
- xr(t[n], l(this, St), l(this, Ve));
442
- }, kr = function() {
443
- var s;
444
- if (Ot.size > 1) {
446
+ xr(t[n], l(this, vt), l(this, Re));
447
+ }, wn = function() {
448
+ var i;
449
+ if (Bt.size > 1) {
445
450
  this.previous.clear();
446
- var t = ee, n = !0;
447
- for (const i of Ot) {
448
- if (i === this) {
449
- n = !1;
451
+ var t = T, n = oe, r = !0;
452
+ for (const o of Bt) {
453
+ if (o === this) {
454
+ r = !1;
450
455
  continue;
451
456
  }
452
- const o = [];
453
- for (const [a, f] of this.current) {
454
- if (i.current.has(a))
455
- if (n && f !== i.current.get(a))
456
- i.current.set(a, f);
457
+ const u = [];
458
+ for (const [f, c] of this.current) {
459
+ if (o.current.has(f))
460
+ if (r && c !== o.current.get(f))
461
+ o.current.set(f, c);
457
462
  else
458
463
  continue;
459
- o.push(a);
464
+ u.push(f);
460
465
  }
461
- if (o.length === 0)
466
+ if (u.length === 0)
462
467
  continue;
463
- const u = [...i.current.keys()].filter((a) => !this.current.has(a));
464
- if (u.length > 0) {
465
- var r = H;
468
+ const a = [...o.current.keys()].filter((f) => !this.current.has(f));
469
+ if (a.length > 0) {
470
+ var s = H;
466
471
  H = [];
467
- const a = /* @__PURE__ */ new Set(), f = /* @__PURE__ */ new Map();
468
- for (const c of o)
469
- Ar(c, u, a, f);
472
+ const f = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
473
+ for (const h of u)
474
+ Sr(h, a, f, c);
470
475
  if (H.length > 0) {
471
- x = i, i.apply();
472
- for (const c of H)
473
- j(s = i, de, wn).call(s, c, [], []);
474
- i.deactivate();
476
+ T = o, o.apply();
477
+ for (const h of H)
478
+ k(i = o, V, gn).call(i, h, [], []);
479
+ o.deactivate();
475
480
  }
476
- H = r;
481
+ H = s;
477
482
  }
478
483
  }
479
- x = null, ee = t;
484
+ T = t, oe = n;
480
485
  }
481
- this.committed = !0, Ot.delete(this);
486
+ l(this, ce).clear(), Bt.delete(this);
482
487
  };
483
- let Ee = jn;
484
- function Ft(e) {
485
- var t = mt;
486
- mt = !0;
488
+ let Te = Hn;
489
+ function le(e) {
490
+ var t = Tt;
491
+ Tt = !0;
487
492
  try {
488
493
  for (var n; ; ) {
489
- if (Qs(), H.length === 0 && (x?.flush(), H.length === 0))
490
- return Gt = null, /** @type {T} */
494
+ if (si(), H.length === 0 && (T?.flush(), H.length === 0))
495
+ return an = null, /** @type {T} */
491
496
  n;
492
- Ir();
497
+ Er();
493
498
  }
494
499
  } finally {
495
- mt = t;
500
+ Tt = t;
496
501
  }
497
502
  }
498
- function Ir() {
499
- mn = !0;
503
+ function Er() {
500
504
  var e = null;
501
505
  try {
502
506
  for (var t = 0; H.length > 0; ) {
503
- var n = Ee.ensure();
507
+ var n = Te.ensure();
504
508
  if (t++ > 1e3) {
505
509
  var r, s;
506
- ti();
510
+ li();
507
511
  }
508
- n.process(H), Re.clear();
512
+ n.process(H), Le.clear();
509
513
  }
510
514
  } finally {
511
- H = [], mn = !1, Gt = null;
515
+ H = [], an = null, Et = null;
512
516
  }
513
517
  }
514
- function ti() {
518
+ function li() {
515
519
  try {
516
- zs();
520
+ qs();
517
521
  } catch (e) {
518
- dt(e, Gt);
522
+ Oe(e, an);
519
523
  }
520
524
  }
521
- let pe = null;
522
- function er(e) {
525
+ let $e = null;
526
+ function Jn(e) {
523
527
  var t = e.length;
524
528
  if (t !== 0) {
525
529
  for (var n = 0; n < t; ) {
526
530
  var r = e[n++];
527
- if ((r.f & ($e | ae)) === 0 && Mt(r) && (pe = /* @__PURE__ */ new Set(), vt(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Ur(r), pe?.size > 0)) {
528
- Re.clear();
529
- for (const s of pe) {
530
- if ((s.f & ($e | ae)) !== 0) continue;
531
+ if ((r.f & (ke | ee)) === 0 && zt(r) && ($e = /* @__PURE__ */ new Set(), St(r), r.deps === null && r.first === null && r.nodes === null && r.teardown === null && r.ac === null && Yr(r), $e?.size > 0)) {
532
+ Le.clear();
533
+ for (const s of $e) {
534
+ if ((s.f & (ke | ee)) !== 0) continue;
531
535
  const i = [s];
532
536
  let o = s.parent;
533
537
  for (; o !== null; )
534
- pe.has(o) && (pe.delete(o), i.push(o)), o = o.parent;
538
+ $e.has(o) && ($e.delete(o), i.push(o)), o = o.parent;
535
539
  for (let u = i.length - 1; u >= 0; u--) {
536
540
  const a = i[u];
537
- (a.f & ($e | ae)) === 0 && vt(a);
541
+ (a.f & (ke | ee)) === 0 && St(a);
538
542
  }
539
543
  }
540
- pe.clear();
544
+ $e.clear();
541
545
  }
542
546
  }
543
- pe = null;
547
+ $e = null;
544
548
  }
545
549
  }
546
- function Ar(e, t, n, r) {
550
+ function Sr(e, t, n, r) {
547
551
  if (!n.has(e) && (n.add(e), e.reactions !== null))
548
552
  for (const s of e.reactions) {
549
553
  const i = s.f;
550
- (i & L) !== 0 ? Ar(
554
+ (i & P) !== 0 ? Sr(
551
555
  /** @type {Derived} */
552
556
  s,
553
557
  t,
554
558
  n,
555
559
  r
556
- ) : (i & (Cn | Se)) !== 0 && (i & P) === 0 && Mr(s, t, r) && (M(s, P), te(
560
+ ) : (i & (Tn | He)) !== 0 && (i & L) === 0 && Cr(s, t, r) && (R(s, L), pe(
557
561
  /** @type {Effect} */
558
562
  s
559
563
  ));
560
564
  }
561
565
  }
562
- function Mr(e, t, n) {
566
+ function Cr(e, t, n) {
563
567
  const r = n.get(e);
564
568
  if (r !== void 0) return r;
565
569
  if (e.deps !== null)
566
570
  for (const s of e.deps) {
567
- if (at.call(t, s))
571
+ if (bt.call(t, s))
568
572
  return !0;
569
- if ((s.f & L) !== 0 && Mr(
573
+ if ((s.f & P) !== 0 && Cr(
570
574
  /** @type {Derived} */
571
575
  s,
572
576
  t,
@@ -580,77 +584,90 @@ function Mr(e, t, n) {
580
584
  }
581
585
  return n.set(e, !1), !1;
582
586
  }
583
- function te(e) {
584
- for (var t = Gt = e; t.parent !== null; ) {
587
+ function pe(e) {
588
+ var t = an = e, n = t.b;
589
+ if (n?.is_pending && (e.f & (Ct | yt | kn)) !== 0 && (e.f & tt) === 0) {
590
+ n.defer_effect(e);
591
+ return;
592
+ }
593
+ for (; t.parent !== null; ) {
585
594
  t = t.parent;
586
- var n = t.f;
587
- if (mn && t === y && (n & Se) !== 0 && (n & _r) === 0)
595
+ var r = t.f;
596
+ if (Et !== null && t === y && (e.f & yt) === 0)
588
597
  return;
589
- if ((n & (Oe | he)) !== 0) {
590
- if ((n & C) === 0) return;
591
- t.f ^= C;
598
+ if ((r & (Fe | we)) !== 0) {
599
+ if ((r & D) === 0)
600
+ return;
601
+ t.f ^= D;
592
602
  }
593
603
  }
594
604
  H.push(t);
595
605
  }
596
- function Tr(e, t) {
597
- if (!((e.f & he) !== 0 && (e.f & C) !== 0)) {
598
- (e.f & P) !== 0 ? t.d.push(e) : (e.f & re) !== 0 && t.m.push(e), M(e, C);
606
+ function Ir(e, t) {
607
+ if (!((e.f & we) !== 0 && (e.f & D) !== 0)) {
608
+ (e.f & L) !== 0 ? t.d.push(e) : (e.f & ue) !== 0 && t.m.push(e), R(e, D);
599
609
  for (var n = e.first; n !== null; )
600
- Tr(n, t), n = n.next;
610
+ Ir(n, t), n = n.next;
601
611
  }
602
612
  }
603
- function ni(e) {
604
- let t = 0, n = At(0), r;
613
+ function ai(e) {
614
+ let t = 0, n = Pt(0), r;
605
615
  return () => {
606
- Pn() && (m(n), Br(() => (t === 0 && (r = ss(() => e(() => wt(n)))), t += 1, () => {
607
- et(() => {
608
- t -= 1, t === 0 && (r?.(), r = void 0, wt(n));
616
+ Ln() && (x(n), Br(() => (t === 0 && (r = ns(() => e(() => At(n)))), t += 1, () => {
617
+ ut(() => {
618
+ t -= 1, t === 0 && (r?.(), r = void 0, At(n));
609
619
  });
610
620
  })));
611
621
  };
612
622
  }
613
- var ri = ft | Je;
614
- function si(e, t, n) {
615
- new ii(e, t, n);
623
+ var ui = $t | nt;
624
+ function fi(e, t, n, r) {
625
+ new ci(e, t, n, r);
616
626
  }
617
- var X, xt, me, Ye, ie, oe, W, le, we, Be, Te, it, ot, lt, be, qt, F, Cr, Rr, yn, jt, $n;
618
- class ii {
627
+ var U, Ot, de, Ge, j, he, X, se, Se, Je, Ne, pt, gt, mt, Ce, en, M, kr, Tr, Ar, bn, Vt, Yt, yn;
628
+ class ci {
619
629
  /**
620
630
  * @param {TemplateNode} node
621
631
  * @param {BoundaryProps} props
622
632
  * @param {((anchor: Node) => void)} children
633
+ * @param {((error: unknown) => unknown) | undefined} [transform_error]
623
634
  */
624
- constructor(t, n, r) {
625
- w(this, F);
635
+ constructor(t, n, r, s) {
636
+ w(this, M);
626
637
  /** @type {Boundary | null} */
627
- A(this, "parent");
628
- A(this, "is_pending", !1);
638
+ I(this, "parent");
639
+ I(this, "is_pending", !1);
640
+ /**
641
+ * API-level transformError transform function. Transforms errors before they reach the `failed` snippet.
642
+ * Inherited from parent boundary, or defaults to identity.
643
+ * @type {(error: unknown) => unknown}
644
+ */
645
+ I(this, "transform_error");
629
646
  /** @type {TemplateNode} */
630
- w(this, X);
647
+ w(this, U);
631
648
  /** @type {TemplateNode | null} */
632
- w(this, xt, I ? k : null);
649
+ w(this, Ot, C ? E : null);
633
650
  /** @type {BoundaryProps} */
634
- w(this, me);
651
+ w(this, de);
635
652
  /** @type {((anchor: Node) => void)} */
636
- w(this, Ye);
653
+ w(this, Ge);
637
654
  /** @type {Effect} */
638
- w(this, ie);
655
+ w(this, j);
639
656
  /** @type {Effect | null} */
640
- w(this, oe, null);
657
+ w(this, he, null);
641
658
  /** @type {Effect | null} */
642
- w(this, W, null);
659
+ w(this, X, null);
643
660
  /** @type {Effect | null} */
644
- w(this, le, null);
661
+ w(this, se, null);
645
662
  /** @type {DocumentFragment | null} */
646
- w(this, we, null);
647
- w(this, Be, 0);
648
- w(this, Te, 0);
649
- w(this, it, !1);
663
+ w(this, Se, null);
664
+ w(this, Je, 0);
665
+ w(this, Ne, 0);
666
+ w(this, pt, !1);
650
667
  /** @type {Set<Effect>} */
651
- w(this, ot, /* @__PURE__ */ new Set());
668
+ w(this, gt, /* @__PURE__ */ new Set());
652
669
  /** @type {Set<Effect>} */
653
- w(this, lt, /* @__PURE__ */ new Set());
670
+ w(this, mt, /* @__PURE__ */ new Set());
654
671
  /**
655
672
  * A source containing the number of pending async deriveds/expressions.
656
673
  * Only created if `$effect.pending()` is used inside the boundary,
@@ -658,34 +675,39 @@ class ii {
658
675
  * calls followed by no-op flushes
659
676
  * @type {Source<number> | null}
660
677
  */
661
- w(this, be, null);
662
- w(this, qt, ni(() => (p(this, be, At(l(this, Be))), () => {
663
- p(this, be, null);
678
+ w(this, Ce, null);
679
+ w(this, en, ai(() => (m(this, Ce, Pt(l(this, Je))), () => {
680
+ m(this, Ce, null);
664
681
  })));
665
- p(this, X, t), p(this, me, n), p(this, Ye, (s) => {
666
- var i = (
682
+ m(this, U, t), m(this, de, n), m(this, Ge, (i) => {
683
+ var o = (
667
684
  /** @type {Effect} */
668
685
  y
669
686
  );
670
- i.b = this, i.f |= pn, r(s);
687
+ o.b = this, o.f |= vn, r(i);
671
688
  }), this.parent = /** @type {Effect} */
672
- y.b, p(this, ie, Wr(() => {
673
- if (I) {
674
- const s = (
689
+ y.b, this.transform_error = s ?? this.parent?.transform_error ?? ((i) => i), m(this, j, Wr(() => {
690
+ if (C) {
691
+ const i = (
675
692
  /** @type {Comment} */
676
- l(this, xt)
693
+ l(this, Ot)
677
694
  );
678
- Nn(), s.data === Tn ? j(this, F, Rr).call(this) : j(this, F, Cr).call(this);
695
+ An();
696
+ const o = i.data === fr;
697
+ if (i.data.startsWith(Xn)) {
698
+ const a = JSON.parse(i.data.slice(Xn.length));
699
+ k(this, M, Tr).call(this, a);
700
+ } else o ? k(this, M, Ar).call(this) : k(this, M, kr).call(this);
679
701
  } else
680
- j(this, F, yn).call(this);
681
- }, ri)), I && p(this, X, k);
702
+ k(this, M, bn).call(this);
703
+ }, ui)), C && m(this, U, E);
682
704
  }
683
705
  /**
684
706
  * Defer an effect inside a pending boundary until the boundary resolves
685
707
  * @param {Effect} effect
686
708
  */
687
709
  defer_effect(t) {
688
- xr(t, l(this, ot), l(this, lt));
710
+ xr(t, l(this, gt), l(this, mt));
689
711
  }
690
712
  /**
691
713
  * Returns `false` if the effect exists inside a boundary whose pending snippet is shown
@@ -695,7 +717,7 @@ class ii {
695
717
  return !this.is_pending && (!this.parent || this.parent.is_rendered());
696
718
  }
697
719
  has_pending_snippet() {
698
- return !!l(this, me).pending;
720
+ return !!l(this, de).pending;
699
721
  }
700
722
  /**
701
723
  * Update the source that powers `$effect.pending()` inside this boundary,
@@ -704,186 +726,226 @@ class ii {
704
726
  * @param {1 | -1} d
705
727
  */
706
728
  update_pending_count(t) {
707
- j(this, F, $n).call(this, t), p(this, Be, l(this, Be) + t), !(!l(this, be) || l(this, it)) && (p(this, it, !0), et(() => {
708
- p(this, it, !1), l(this, be) && Wt(l(this, be), l(this, Be));
729
+ k(this, M, yn).call(this, t), m(this, Je, l(this, Je) + t), !(!l(this, Ce) || l(this, pt)) && (m(this, pt, !0), ut(() => {
730
+ m(this, pt, !1), l(this, Ce) && Gt(l(this, Ce), l(this, Je));
709
731
  }));
710
732
  }
711
733
  get_effect_pending() {
712
- return l(this, qt).call(this), m(
734
+ return l(this, en).call(this), x(
713
735
  /** @type {Source<number>} */
714
- l(this, be)
736
+ l(this, Ce)
715
737
  );
716
738
  }
717
739
  /** @param {unknown} error */
718
740
  error(t) {
719
- var n = l(this, me).onerror;
720
- let r = l(this, me).failed;
741
+ var n = l(this, de).onerror;
742
+ let r = l(this, de).failed;
721
743
  if (!n && !r)
722
744
  throw t;
723
- l(this, oe) && (V(l(this, oe)), p(this, oe, null)), l(this, W) && (V(l(this, W)), p(this, W, null)), l(this, le) && (V(l(this, le)), p(this, le, null)), I && (fe(
745
+ l(this, he) && (B(l(this, he)), m(this, he, null)), l(this, X) && (B(l(this, X)), m(this, X, null)), l(this, se) && (B(l(this, se)), m(this, se, null)), C && (fe(
724
746
  /** @type {TemplateNode} */
725
- l(this, xt)
726
- ), Xs(), fe(gr()));
747
+ l(this, Ot)
748
+ ), Qs(), fe(gr()));
727
749
  var s = !1, i = !1;
728
750
  const o = () => {
729
751
  if (s) {
730
- Us();
752
+ Zs();
731
753
  return;
732
754
  }
733
- s = !0, i && qs(), l(this, le) !== null && bt(l(this, le), () => {
734
- p(this, le, null);
735
- }), j(this, F, jt).call(this, () => {
736
- Ee.ensure(), j(this, F, yn).call(this);
755
+ s = !0, i && Js(), l(this, se) !== null && Rt(l(this, se), () => {
756
+ m(this, se, null);
757
+ }), k(this, M, Yt).call(this, () => {
758
+ Te.ensure(), k(this, M, bn).call(this);
737
759
  });
738
- };
739
- et(() => {
760
+ }, u = (a) => {
740
761
  try {
741
- i = !0, n?.(t, o), i = !1;
742
- } catch (u) {
743
- dt(u, l(this, ie) && l(this, ie).parent);
762
+ i = !0, n?.(a, o), i = !1;
763
+ } catch (f) {
764
+ Oe(f, l(this, j) && l(this, j).parent);
744
765
  }
745
- r && p(this, le, j(this, F, jt).call(this, () => {
746
- Ee.ensure();
766
+ r && m(this, se, k(this, M, Yt).call(this, () => {
767
+ Te.ensure();
747
768
  try {
748
- return Me(() => {
749
- var u = (
769
+ return Ee(() => {
770
+ var f = (
750
771
  /** @type {Effect} */
751
772
  y
752
773
  );
753
- u.b = this, u.f |= pn, r(
754
- l(this, X),
755
- () => t,
774
+ f.b = this, f.f |= vn, r(
775
+ l(this, U),
776
+ () => a,
756
777
  () => o
757
778
  );
758
779
  });
759
- } catch (u) {
760
- return dt(
761
- u,
780
+ } catch (f) {
781
+ return Oe(
782
+ f,
762
783
  /** @type {Effect} */
763
- l(this, ie).parent
784
+ l(this, j).parent
764
785
  ), null;
765
786
  }
766
787
  }));
788
+ };
789
+ ut(() => {
790
+ var a;
791
+ try {
792
+ a = this.transform_error(t);
793
+ } catch (f) {
794
+ Oe(f, l(this, j) && l(this, j).parent);
795
+ return;
796
+ }
797
+ a !== null && typeof a == "object" && typeof /** @type {any} */
798
+ a.then == "function" ? a.then(
799
+ u,
800
+ /** @param {unknown} e */
801
+ (f) => Oe(f, l(this, j) && l(this, j).parent)
802
+ ) : u(a);
767
803
  });
768
804
  }
769
805
  }
770
- X = new WeakMap(), xt = new WeakMap(), me = new WeakMap(), Ye = new WeakMap(), ie = new WeakMap(), oe = new WeakMap(), W = new WeakMap(), le = new WeakMap(), we = new WeakMap(), Be = new WeakMap(), Te = new WeakMap(), it = new WeakMap(), ot = new WeakMap(), lt = new WeakMap(), be = new WeakMap(), qt = new WeakMap(), F = new WeakSet(), Cr = function() {
806
+ U = new WeakMap(), Ot = new WeakMap(), de = new WeakMap(), Ge = new WeakMap(), j = new WeakMap(), he = new WeakMap(), X = new WeakMap(), se = new WeakMap(), Se = new WeakMap(), Je = new WeakMap(), Ne = new WeakMap(), pt = new WeakMap(), gt = new WeakMap(), mt = new WeakMap(), Ce = new WeakMap(), en = new WeakMap(), M = new WeakSet(), kr = function() {
771
807
  try {
772
- p(this, oe, Me(() => l(this, Ye).call(this, l(this, X))));
808
+ m(this, he, Ee(() => l(this, Ge).call(this, l(this, U))));
773
809
  } catch (t) {
774
810
  this.error(t);
775
811
  }
776
- }, Rr = function() {
777
- const t = l(this, me).pending;
778
- t && (this.is_pending = !0, p(this, W, Me(() => t(l(this, X)))), et(() => {
779
- var n = p(this, we, document.createDocumentFragment()), r = Xe();
780
- n.append(r), p(this, oe, j(this, F, jt).call(this, () => (Ee.ensure(), Me(() => l(this, Ye).call(this, r))))), l(this, Te) === 0 && (l(this, X).before(n), p(this, we, null), bt(
812
+ }, /**
813
+ * @param {unknown} error The deserialized error from the server's hydration comment
814
+ */
815
+ Tr = function(t) {
816
+ const n = l(this, de).failed;
817
+ n && m(this, se, Ee(() => {
818
+ n(
819
+ l(this, U),
820
+ () => t,
821
+ () => () => {
822
+ }
823
+ );
824
+ }));
825
+ }, Ar = function() {
826
+ const t = l(this, de).pending;
827
+ t && (this.is_pending = !0, m(this, X, Ee(() => t(l(this, U)))), ut(() => {
828
+ var n = m(this, Se, document.createDocumentFragment()), r = Pe();
829
+ n.append(r), m(this, he, k(this, M, Yt).call(this, () => (Te.ensure(), Ee(() => l(this, Ge).call(this, r))))), l(this, Ne) === 0 && (l(this, U).before(n), m(this, Se, null), Rt(
781
830
  /** @type {Effect} */
782
- l(this, W),
831
+ l(this, X),
783
832
  () => {
784
- p(this, W, null);
833
+ m(this, X, null);
785
834
  }
786
- ), this.is_pending = !1);
835
+ ), k(this, M, Vt).call(this));
787
836
  }));
788
- }, yn = function() {
837
+ }, bn = function() {
789
838
  try {
790
- if (this.is_pending = this.has_pending_snippet(), p(this, Te, 0), p(this, Be, 0), p(this, oe, Me(() => {
791
- l(this, Ye).call(this, l(this, X));
792
- })), l(this, Te) > 0) {
793
- var t = p(this, we, document.createDocumentFragment());
794
- Kr(l(this, oe), t);
839
+ if (this.is_pending = this.has_pending_snippet(), m(this, Ne, 0), m(this, Je, 0), m(this, he, Ee(() => {
840
+ l(this, Ge).call(this, l(this, U));
841
+ })), l(this, Ne) > 0) {
842
+ var t = m(this, Se, document.createDocumentFragment());
843
+ Xr(l(this, he), t);
795
844
  const n = (
796
845
  /** @type {(anchor: Node) => void} */
797
- l(this, me).pending
846
+ l(this, de).pending
798
847
  );
799
- p(this, W, Me(() => n(l(this, X))));
848
+ m(this, X, Ee(() => n(l(this, U))));
800
849
  } else
801
- this.is_pending = !1;
850
+ k(this, M, Vt).call(this);
802
851
  } catch (n) {
803
852
  this.error(n);
804
853
  }
854
+ }, Vt = function() {
855
+ this.is_pending = !1;
856
+ for (const t of l(this, gt))
857
+ R(t, L), pe(t);
858
+ for (const t of l(this, mt))
859
+ R(t, ue), pe(t);
860
+ l(this, gt).clear(), l(this, mt).clear();
805
861
  }, /**
806
862
  * @template T
807
863
  * @param {() => T} fn
808
864
  */
809
- jt = function(t) {
810
- var n = y, r = b, s = Y;
811
- ce(l(this, ie)), Z(l(this, ie)), ct(l(this, ie).ctx);
865
+ Yt = function(t) {
866
+ var n = y, r = b, s = W;
867
+ me(l(this, j)), ne(l(this, j)), xt(l(this, j).ctx);
812
868
  try {
813
869
  return t();
814
870
  } catch (i) {
815
- return Er(i), null;
871
+ return yr(i), null;
816
872
  } finally {
817
- ce(n), Z(r), ct(s);
873
+ me(n), ne(r), xt(s);
818
874
  }
819
875
  }, /**
820
876
  * Updates the pending count associated with the currently visible pending snippet,
821
877
  * if any, such that we can replace the snippet with content once work is done
822
878
  * @param {1 | -1} d
823
879
  */
824
- $n = function(t) {
880
+ yn = function(t) {
825
881
  var n;
826
882
  if (!this.has_pending_snippet()) {
827
- this.parent && j(n = this.parent, F, $n).call(n, t);
883
+ this.parent && k(n = this.parent, M, yn).call(n, t);
828
884
  return;
829
885
  }
830
- if (p(this, Te, l(this, Te) + t), l(this, Te) === 0) {
831
- this.is_pending = !1;
832
- for (const r of l(this, ot))
833
- M(r, P), te(r);
834
- for (const r of l(this, lt))
835
- M(r, re), te(r);
836
- l(this, ot).clear(), l(this, lt).clear(), l(this, W) && bt(l(this, W), () => {
837
- p(this, W, null);
838
- }), l(this, we) && (l(this, X).before(l(this, we)), p(this, we, null));
839
- }
886
+ m(this, Ne, l(this, Ne) + t), l(this, Ne) === 0 && (k(this, M, Vt).call(this), l(this, X) && Rt(l(this, X), () => {
887
+ m(this, X, null);
888
+ }), l(this, Se) && (l(this, U).before(l(this, Se)), m(this, Se, null)));
840
889
  };
841
- function oi(e, t, n, r) {
842
- const s = Dn;
843
- var i = e.filter((d) => !d.settled);
890
+ function di(e, t, n, r) {
891
+ const s = Rn;
892
+ var i = e.filter((h) => !h.settled);
844
893
  if (n.length === 0 && i.length === 0) {
845
894
  r(t.map(s));
846
895
  return;
847
896
  }
848
- var o = x, u = (
897
+ var o = (
849
898
  /** @type {Effect} */
850
899
  y
851
- ), a = li(), f = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((d) => d.promise)) : null;
852
- function c(d) {
853
- a();
900
+ ), u = hi(), a = i.length === 1 ? i[0].promise : i.length > 1 ? Promise.all(i.map((h) => h.promise)) : null;
901
+ function f(h) {
902
+ u();
854
903
  try {
855
- r(d);
856
- } catch (g) {
857
- (u.f & $e) === 0 && dt(g, u);
904
+ r(h);
905
+ } catch (v) {
906
+ (o.f & ke) === 0 && Oe(v, o);
858
907
  }
859
- o?.deactivate(), En();
908
+ $n();
860
909
  }
861
910
  if (n.length === 0) {
862
- f.then(() => c(t.map(s)));
911
+ a.then(() => f(t.map(s)));
863
912
  return;
864
913
  }
865
- function v() {
866
- a(), Promise.all(n.map((d) => /* @__PURE__ */ ui(d))).then((d) => c([...t.map(s), ...d])).catch((d) => dt(d, u));
914
+ function c() {
915
+ u(), Promise.all(n.map((h) => /* @__PURE__ */ _i(h))).then((h) => f([...t.map(s), ...h])).catch((h) => Oe(h, o));
867
916
  }
868
- f ? f.then(v) : v();
917
+ a ? a.then(c) : c();
869
918
  }
870
- function li() {
871
- var e = y, t = b, n = Y, r = x;
919
+ function hi() {
920
+ var e = y, t = b, n = W, r = T;
872
921
  return function(i = !0) {
873
- ce(e), Z(t), ct(n), i && r?.activate();
922
+ me(e), ne(t), xt(n), i && r?.activate();
874
923
  };
875
924
  }
876
- function En() {
877
- ce(null), Z(null), ct(null);
925
+ function $n(e = !0) {
926
+ me(null), ne(null), xt(null), e && T?.deactivate();
927
+ }
928
+ function vi() {
929
+ var e = (
930
+ /** @type {Boundary} */
931
+ /** @type {Effect} */
932
+ y.b
933
+ ), t = (
934
+ /** @type {Batch} */
935
+ T
936
+ ), n = e.is_rendered();
937
+ return e.update_pending_count(1), t.increment(n), () => {
938
+ e.update_pending_count(-1), t.decrement(n);
939
+ };
878
940
  }
879
941
  // @__NO_SIDE_EFFECTS__
880
- function Dn(e) {
881
- var t = L | P, n = b !== null && (b.f & L) !== 0 ? (
942
+ function Rn(e) {
943
+ var t = P | L, n = b !== null && (b.f & P) !== 0 ? (
882
944
  /** @type {Derived} */
883
945
  b
884
946
  ) : null;
885
- return y !== null && (y.f |= Je), {
886
- ctx: Y,
947
+ return y !== null && (y.f |= nt), {
948
+ ctx: W,
887
949
  deps: null,
888
950
  effects: null,
889
951
  equals: mr,
@@ -901,87 +963,79 @@ function Dn(e) {
901
963
  };
902
964
  }
903
965
  // @__NO_SIDE_EFFECTS__
904
- function ui(e, t, n) {
905
- let r = (
906
- /** @type {Effect | null} */
907
- y
908
- );
909
- r === null && Ps();
966
+ function _i(e, t, n) {
967
+ /** @type {Effect | null} */
968
+ y === null && Bs();
910
969
  var s = (
911
- /** @type {Boundary} */
912
- r.b
913
- ), i = (
914
970
  /** @type {Promise<V>} */
915
971
  /** @type {unknown} */
916
972
  void 0
917
- ), o = At(
973
+ ), i = Pt(
918
974
  /** @type {V} */
919
975
  O
920
- ), u = !b, a = /* @__PURE__ */ new Map();
921
- return $i(() => {
922
- var f = hr();
923
- i = f.promise;
976
+ ), o = !b, u = /* @__PURE__ */ new Map();
977
+ return Ti(() => {
978
+ var a = _r();
979
+ s = a.promise;
924
980
  try {
925
- Promise.resolve(e()).then(f.resolve, f.reject).then(() => {
926
- c === x && c.committed && c.deactivate(), En();
927
- });
928
- } catch (g) {
929
- f.reject(g), En();
981
+ Promise.resolve(e()).then(a.resolve, a.reject).finally($n);
982
+ } catch (v) {
983
+ a.reject(v), $n();
930
984
  }
931
- var c = (
985
+ var f = (
932
986
  /** @type {Batch} */
933
- x
987
+ T
934
988
  );
935
- if (u) {
936
- var v = s.is_rendered();
937
- s.update_pending_count(1), c.increment(v), a.get(c)?.reject(Pe), a.delete(c), a.set(c, f);
989
+ if (o) {
990
+ var c = vi();
991
+ u.get(f)?.reject(Ye), u.delete(f), u.set(f, a);
938
992
  }
939
- const d = (g, _ = void 0) => {
940
- if (c.activate(), _)
941
- _ !== Pe && (o.f |= Ce, Wt(o, _));
993
+ const h = (v, g = void 0) => {
994
+ if (f.activate(), g)
995
+ g !== Ye && (i.f |= De, Gt(i, g));
942
996
  else {
943
- (o.f & Ce) !== 0 && (o.f ^= Ce), Wt(o, g);
944
- for (const [T, E] of a) {
945
- if (a.delete(T), T === c) break;
946
- E.reject(Pe);
997
+ (i.f & De) !== 0 && (i.f ^= De), Gt(i, v);
998
+ for (const [d, $] of u) {
999
+ if (u.delete(d), d === f) break;
1000
+ $.reject(Ye);
947
1001
  }
948
1002
  }
949
- u && (s.update_pending_count(-1), c.decrement(v));
1003
+ c && c();
950
1004
  };
951
- f.promise.then(d, (g) => d(null, g || "unknown"));
952
- }), wi(() => {
953
- for (const f of a.values())
954
- f.reject(Pe);
955
- }), new Promise((f) => {
956
- function c(v) {
957
- function d() {
958
- v === i ? f(o) : c(i);
1005
+ a.promise.then(h, (v) => h(null, v || "unknown"));
1006
+ }), Si(() => {
1007
+ for (const a of u.values())
1008
+ a.reject(Ye);
1009
+ }), new Promise((a) => {
1010
+ function f(c) {
1011
+ function h() {
1012
+ c === s ? a(i) : f(s);
959
1013
  }
960
- v.then(d, d);
1014
+ c.then(h, h);
961
1015
  }
962
- c(i);
1016
+ f(s);
963
1017
  });
964
1018
  }
965
1019
  // @__NO_SIDE_EFFECTS__
966
- function ai(e) {
967
- const t = /* @__PURE__ */ Dn(e);
968
- return Gr(t), t;
1020
+ function Mr(e) {
1021
+ const t = /* @__PURE__ */ Rn(e);
1022
+ return Kr(t), t;
969
1023
  }
970
- function fi(e) {
1024
+ function pi(e) {
971
1025
  var t = e.effects;
972
1026
  if (t !== null) {
973
1027
  e.effects = null;
974
1028
  for (var n = 0; n < t.length; n += 1)
975
- V(
1029
+ B(
976
1030
  /** @type {Effect} */
977
1031
  t[n]
978
1032
  );
979
1033
  }
980
1034
  }
981
- function ci(e) {
1035
+ function gi(e) {
982
1036
  for (var t = e.parent; t !== null; ) {
983
- if ((t.f & L) === 0)
984
- return (t.f & $e) === 0 ? (
1037
+ if ((t.f & P) === 0)
1038
+ return (t.f & ke) === 0 ? (
985
1039
  /** @type {Effect} */
986
1040
  t
987
1041
  ) : null;
@@ -989,38 +1043,38 @@ function ci(e) {
989
1043
  }
990
1044
  return null;
991
1045
  }
992
- function Ln(e) {
1046
+ function Nn(e) {
993
1047
  var t, n = y;
994
- ce(ci(e));
1048
+ me(gi(e));
995
1049
  try {
996
- e.f &= ~Ue, fi(e), t = ts(e);
1050
+ e.f &= ~et, pi(e), t = Qr(e);
997
1051
  } finally {
998
- ce(n);
1052
+ me(n);
999
1053
  }
1000
1054
  return t;
1001
1055
  }
1002
- function Nr(e) {
1003
- var t = Ln(e);
1004
- if (!e.equals(t) && (e.wv = Qr(), (!x?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
1005
- M(e, C);
1056
+ function Rr(e) {
1057
+ var t = Nn(e);
1058
+ if (!e.equals(t) && (e.wv = Jr(), (!T?.is_fork || e.deps === null) && (e.v = t, e.deps === null))) {
1059
+ R(e, D);
1006
1060
  return;
1007
1061
  }
1008
- Ne || (ee !== null ? (Pn() || x?.is_fork) && ee.set(e, t) : On(e));
1062
+ je || (oe !== null ? (Ln() || T?.is_fork) && oe.set(e, t) : Mn(e));
1009
1063
  }
1010
- function di(e) {
1064
+ function mi(e) {
1011
1065
  if (e.effects !== null)
1012
1066
  for (const t of e.effects)
1013
- (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Pe), t.teardown = Ns, t.ac = null, yt(t, 0), Fn(t));
1067
+ (t.teardown || t.ac) && (t.teardown?.(), t.ac?.abort(Ye), t.teardown = Ds, t.ac = null, Nt(t, 0), Pn(t));
1014
1068
  }
1015
- function Or(e) {
1069
+ function Nr(e) {
1016
1070
  if (e.effects !== null)
1017
1071
  for (const t of e.effects)
1018
- t.teardown && vt(t);
1072
+ t.teardown && St(t);
1019
1073
  }
1020
- let Sn = /* @__PURE__ */ new Set();
1021
- const Re = /* @__PURE__ */ new Map();
1022
- let Dr = !1;
1023
- function At(e, t) {
1074
+ let xn = /* @__PURE__ */ new Set();
1075
+ const Le = /* @__PURE__ */ new Map();
1076
+ let Or = !1;
1077
+ function Pt(e, t) {
1024
1078
  var n = {
1025
1079
  f: 0,
1026
1080
  // TODO ideally we could skip this altogether, but it causes type errors
@@ -1033,82 +1087,82 @@ function At(e, t) {
1033
1087
  return n;
1034
1088
  }
1035
1089
  // @__NO_SIDE_EFFECTS__
1036
- function D(e, t) {
1037
- const n = At(e);
1038
- return Gr(n), n;
1090
+ function z(e, t) {
1091
+ const n = Pt(e);
1092
+ return Kr(n), n;
1039
1093
  }
1040
1094
  // @__NO_SIDE_EFFECTS__
1041
- function hi(e, t = !1, n = !0) {
1042
- const r = At(e);
1043
- return t || (r.equals = Gs), r;
1095
+ function wi(e, t = !1, n = !0) {
1096
+ const r = Pt(e);
1097
+ return t || (r.equals = ni), r;
1044
1098
  }
1045
- function $(e, t, n = !1) {
1099
+ function A(e, t, n = !1) {
1046
1100
  b !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
1047
1101
  // to ensure we error if state is set inside an inspect effect
1048
- (!ne || (b.f & Qn) !== 0) && yr() && (b.f & (L | Se | Cn | Qn)) !== 0 && (G === null || !at.call(G, e)) && Ws();
1049
- let r = n ? Ze(t) : t;
1050
- return Wt(e, r);
1102
+ (!ae || (b.f & Gn) !== 0) && wr() && (b.f & (P | He | Tn | Gn)) !== 0 && (te === null || !bt.call(te, e)) && Gs();
1103
+ let r = n ? lt(t) : t;
1104
+ return Gt(e, r);
1051
1105
  }
1052
- function Wt(e, t) {
1106
+ function Gt(e, t) {
1053
1107
  if (!e.equals(t)) {
1054
1108
  var n = e.v;
1055
- Ne ? Re.set(e, t) : Re.set(e, n), e.v = t;
1056
- var r = Ee.ensure();
1057
- if (r.capture(e, n), (e.f & L) !== 0) {
1109
+ je ? Le.set(e, t) : Le.set(e, n), e.v = t;
1110
+ var r = Te.ensure();
1111
+ if (r.capture(e, n), (e.f & P) !== 0) {
1058
1112
  const s = (
1059
1113
  /** @type {Derived} */
1060
1114
  e
1061
1115
  );
1062
- (e.f & P) !== 0 && Ln(s), On(s);
1116
+ (e.f & L) !== 0 && Nn(s), Mn(s);
1063
1117
  }
1064
- e.wv = Qr(), Lr(e, P), y !== null && (y.f & C) !== 0 && (y.f & (he | Oe)) === 0 && (U === null ? ki([e]) : U.push(e)), !r.is_fork && Sn.size > 0 && !Dr && vi();
1118
+ e.wv = Jr(), Dr(e, L), y !== null && (y.f & D) !== 0 && (y.f & (we | Fe)) === 0 && (J === null ? Ni([e]) : J.push(e)), !r.is_fork && xn.size > 0 && !Or && bi();
1065
1119
  }
1066
1120
  return t;
1067
1121
  }
1068
- function vi() {
1069
- Dr = !1;
1070
- for (const e of Sn)
1071
- (e.f & C) !== 0 && M(e, re), Mt(e) && vt(e);
1072
- Sn.clear();
1122
+ function bi() {
1123
+ Or = !1;
1124
+ for (const e of xn)
1125
+ (e.f & D) !== 0 && R(e, ue), zt(e) && St(e);
1126
+ xn.clear();
1073
1127
  }
1074
- function wt(e) {
1075
- $(e, e.v + 1);
1128
+ function At(e) {
1129
+ A(e, e.v + 1);
1076
1130
  }
1077
- function Lr(e, t) {
1131
+ function Dr(e, t) {
1078
1132
  var n = e.reactions;
1079
1133
  if (n !== null)
1080
1134
  for (var r = n.length, s = 0; s < r; s++) {
1081
- var i = n[s], o = i.f, u = (o & P) === 0;
1082
- if (u && M(i, t), (o & L) !== 0) {
1135
+ var i = n[s], o = i.f, u = (o & L) === 0;
1136
+ if (u && R(i, t), (o & P) !== 0) {
1083
1137
  var a = (
1084
1138
  /** @type {Derived} */
1085
1139
  i
1086
1140
  );
1087
- ee?.delete(a), (o & Ue) === 0 && (o & K && (i.f |= Ue), Lr(a, re));
1088
- } else u && ((o & Se) !== 0 && pe !== null && pe.add(
1141
+ oe?.delete(a), (o & et) === 0 && (o & Q && (i.f |= et), Dr(a, ue));
1142
+ } else u && ((o & He) !== 0 && $e !== null && $e.add(
1089
1143
  /** @type {Effect} */
1090
1144
  i
1091
- ), te(
1145
+ ), pe(
1092
1146
  /** @type {Effect} */
1093
1147
  i
1094
1148
  ));
1095
1149
  }
1096
1150
  }
1097
- function Ze(e) {
1151
+ function lt(e) {
1098
1152
  if (typeof e != "object" || e === null || dn in e)
1099
1153
  return e;
1100
- const t = dr(e);
1101
- if (t !== Cs && t !== Rs)
1154
+ const t = vr(e);
1155
+ if (t !== Ns && t !== Os)
1102
1156
  return e;
1103
- var n = /* @__PURE__ */ new Map(), r = cr(e), s = /* @__PURE__ */ D(0), i = qe, o = (u) => {
1104
- if (qe === i)
1157
+ var n = /* @__PURE__ */ new Map(), r = hr(e), s = /* @__PURE__ */ z(0), i = Qe, o = (u) => {
1158
+ if (Qe === i)
1105
1159
  return u();
1106
- var a = b, f = qe;
1107
- Z(null), rr(i);
1160
+ var a = b, f = Qe;
1161
+ ne(null), er(i);
1108
1162
  var c = u();
1109
- return Z(a), rr(f), c;
1163
+ return ne(a), er(f), c;
1110
1164
  };
1111
- return r && n.set("length", /* @__PURE__ */ D(
1165
+ return r && n.set("length", /* @__PURE__ */ z(
1112
1166
  /** @type {any[]} */
1113
1167
  e.length
1114
1168
  )), new Proxy(
@@ -1116,34 +1170,34 @@ function Ze(e) {
1116
1170
  e,
1117
1171
  {
1118
1172
  defineProperty(u, a, f) {
1119
- (!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && Ys();
1173
+ (!("value" in f) || f.configurable === !1 || f.enumerable === !1 || f.writable === !1) && Xs();
1120
1174
  var c = n.get(a);
1121
1175
  return c === void 0 ? o(() => {
1122
- var v = /* @__PURE__ */ D(f.value);
1123
- return n.set(a, v), v;
1124
- }) : $(c, f.value, !0), !0;
1176
+ var h = /* @__PURE__ */ z(f.value);
1177
+ return n.set(a, h), h;
1178
+ }) : A(c, f.value, !0), !0;
1125
1179
  },
1126
1180
  deleteProperty(u, a) {
1127
1181
  var f = n.get(a);
1128
1182
  if (f === void 0) {
1129
1183
  if (a in u) {
1130
- const c = o(() => /* @__PURE__ */ D(O));
1131
- n.set(a, c), wt(s);
1184
+ const c = o(() => /* @__PURE__ */ z(O));
1185
+ n.set(a, c), At(s);
1132
1186
  }
1133
1187
  } else
1134
- $(f, O), wt(s);
1188
+ A(f, O), At(s);
1135
1189
  return !0;
1136
1190
  },
1137
1191
  get(u, a, f) {
1138
1192
  if (a === dn)
1139
1193
  return e;
1140
- var c = n.get(a), v = a in u;
1141
- if (c === void 0 && (!v || Qe(u, a)?.writable) && (c = o(() => {
1142
- var g = Ze(v ? u[a] : O), _ = /* @__PURE__ */ D(g);
1143
- return _;
1194
+ var c = n.get(a), h = a in u;
1195
+ if (c === void 0 && (!h || at(u, a)?.writable) && (c = o(() => {
1196
+ var g = lt(h ? u[a] : O), d = /* @__PURE__ */ z(g);
1197
+ return d;
1144
1198
  }), n.set(a, c)), c !== void 0) {
1145
- var d = m(c);
1146
- return d === O ? void 0 : d;
1199
+ var v = x(c);
1200
+ return v === O ? void 0 : v;
1147
1201
  }
1148
1202
  return Reflect.get(u, a, f);
1149
1203
  },
@@ -1151,14 +1205,14 @@ function Ze(e) {
1151
1205
  var f = Reflect.getOwnPropertyDescriptor(u, a);
1152
1206
  if (f && "value" in f) {
1153
1207
  var c = n.get(a);
1154
- c && (f.value = m(c));
1208
+ c && (f.value = x(c));
1155
1209
  } else if (f === void 0) {
1156
- var v = n.get(a), d = v?.v;
1157
- if (v !== void 0 && d !== O)
1210
+ var h = n.get(a), v = h?.v;
1211
+ if (h !== void 0 && v !== O)
1158
1212
  return {
1159
1213
  enumerable: !0,
1160
1214
  configurable: !0,
1161
- value: d,
1215
+ value: v,
1162
1216
  writable: !0
1163
1217
  };
1164
1218
  }
@@ -1168,314 +1222,336 @@ function Ze(e) {
1168
1222
  if (a === dn)
1169
1223
  return !0;
1170
1224
  var f = n.get(a), c = f !== void 0 && f.v !== O || Reflect.has(u, a);
1171
- if (f !== void 0 || y !== null && (!c || Qe(u, a)?.writable)) {
1225
+ if (f !== void 0 || y !== null && (!c || at(u, a)?.writable)) {
1172
1226
  f === void 0 && (f = o(() => {
1173
- var d = c ? Ze(u[a]) : O, g = /* @__PURE__ */ D(d);
1227
+ var v = c ? lt(u[a]) : O, g = /* @__PURE__ */ z(v);
1174
1228
  return g;
1175
1229
  }), n.set(a, f));
1176
- var v = m(f);
1177
- if (v === O)
1230
+ var h = x(f);
1231
+ if (h === O)
1178
1232
  return !1;
1179
1233
  }
1180
1234
  return c;
1181
1235
  },
1182
1236
  set(u, a, f, c) {
1183
- var v = n.get(a), d = a in u;
1237
+ var h = n.get(a), v = a in u;
1184
1238
  if (r && a === "length")
1185
1239
  for (var g = f; g < /** @type {Source<number>} */
1186
- v.v; g += 1) {
1187
- var _ = n.get(g + "");
1188
- _ !== void 0 ? $(_, O) : g in u && (_ = o(() => /* @__PURE__ */ D(O)), n.set(g + "", _));
1240
+ h.v; g += 1) {
1241
+ var d = n.get(g + "");
1242
+ d !== void 0 ? A(d, O) : g in u && (d = o(() => /* @__PURE__ */ z(O)), n.set(g + "", d));
1189
1243
  }
1190
- if (v === void 0)
1191
- (!d || Qe(u, a)?.writable) && (v = o(() => /* @__PURE__ */ D(void 0)), $(v, Ze(f)), n.set(a, v));
1244
+ if (h === void 0)
1245
+ (!v || at(u, a)?.writable) && (h = o(() => /* @__PURE__ */ z(void 0)), A(h, lt(f)), n.set(a, h));
1192
1246
  else {
1193
- d = v.v !== O;
1194
- var T = o(() => Ze(f));
1195
- $(v, T);
1247
+ v = h.v !== O;
1248
+ var $ = o(() => lt(f));
1249
+ A(h, $);
1196
1250
  }
1197
- var E = Reflect.getOwnPropertyDescriptor(u, a);
1198
- if (E?.set && E.set.call(c, f), !d) {
1251
+ var _ = Reflect.getOwnPropertyDescriptor(u, a);
1252
+ if (_?.set && _.set.call(c, f), !v) {
1199
1253
  if (r && typeof a == "string") {
1200
- var ke = (
1254
+ var S = (
1201
1255
  /** @type {Source<number>} */
1202
1256
  n.get("length")
1203
- ), se = Number(a);
1204
- Number.isInteger(se) && se >= ke.v && $(ke, se + 1);
1257
+ ), Y = Number(a);
1258
+ Number.isInteger(Y) && Y >= S.v && A(S, Y + 1);
1205
1259
  }
1206
- wt(s);
1260
+ At(s);
1207
1261
  }
1208
1262
  return !0;
1209
1263
  },
1210
1264
  ownKeys(u) {
1211
- m(s);
1212
- var a = Reflect.ownKeys(u).filter((v) => {
1213
- var d = n.get(v);
1214
- return d === void 0 || d.v !== O;
1265
+ x(s);
1266
+ var a = Reflect.ownKeys(u).filter((h) => {
1267
+ var v = n.get(h);
1268
+ return v === void 0 || v.v !== O;
1215
1269
  });
1216
1270
  for (var [f, c] of n)
1217
1271
  c.v !== O && !(f in u) && a.push(f);
1218
1272
  return a;
1219
1273
  },
1220
1274
  setPrototypeOf() {
1221
- Bs();
1275
+ Ks();
1222
1276
  }
1223
1277
  }
1224
1278
  );
1225
1279
  }
1226
- var tr, Pr, Fr, jr;
1227
- function xn() {
1228
- if (tr === void 0) {
1229
- tr = window, Pr = /Firefox/.test(navigator.userAgent);
1280
+ var Zn, Lr, Pr, zr;
1281
+ function En() {
1282
+ if (Zn === void 0) {
1283
+ Zn = window, Lr = /Firefox/.test(navigator.userAgent);
1230
1284
  var e = Element.prototype, t = Node.prototype, n = Text.prototype;
1231
- Fr = Qe(t, "firstChild").get, jr = Qe(t, "nextSibling").get, Zn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Zn(n) && (n.__t = void 0);
1285
+ Pr = at(t, "firstChild").get, zr = at(t, "nextSibling").get, Kn(e) && (e.__click = void 0, e.__className = void 0, e.__attributes = null, e.__style = void 0, e.__e = void 0), Kn(n) && (n.__t = void 0);
1232
1286
  }
1233
1287
  }
1234
- function Xe(e = "") {
1288
+ function Pe(e = "") {
1235
1289
  return document.createTextNode(e);
1236
1290
  }
1237
1291
  // @__NO_SIDE_EFFECTS__
1238
- function ht(e) {
1292
+ function ze(e) {
1239
1293
  return (
1240
1294
  /** @type {TemplateNode | null} */
1241
- Fr.call(e)
1295
+ Pr.call(e)
1242
1296
  );
1243
1297
  }
1244
1298
  // @__NO_SIDE_EFFECTS__
1245
- function De(e) {
1299
+ function Ae(e) {
1246
1300
  return (
1247
1301
  /** @type {TemplateNode | null} */
1248
- jr.call(e)
1302
+ zr.call(e)
1249
1303
  );
1250
1304
  }
1251
- function Ae(e, t) {
1252
- if (!I)
1253
- return /* @__PURE__ */ ht(e);
1254
- var n = /* @__PURE__ */ ht(k);
1305
+ function xe(e, t) {
1306
+ if (!C)
1307
+ return /* @__PURE__ */ ze(e);
1308
+ var n = /* @__PURE__ */ ze(E);
1255
1309
  if (n === null)
1256
- n = k.appendChild(Xe());
1257
- else if (t && n.nodeType !== Rn) {
1258
- var r = Xe();
1310
+ n = E.appendChild(Pe());
1311
+ else if (t && n.nodeType !== nn) {
1312
+ var r = Pe();
1259
1313
  return n?.before(r), fe(r), r;
1260
1314
  }
1261
- return t && zr(
1315
+ return t && Dn(
1262
1316
  /** @type {Text} */
1263
1317
  n
1264
1318
  ), fe(n), n;
1265
1319
  }
1266
- function Ke(e, t = 1, n = !1) {
1267
- let r = I ? k : e;
1320
+ function jr(e, t = !1) {
1321
+ if (!C) {
1322
+ var n = /* @__PURE__ */ ze(e);
1323
+ return n instanceof Comment && n.data === "" ? /* @__PURE__ */ Ae(n) : n;
1324
+ }
1325
+ if (t) {
1326
+ if (E?.nodeType !== nn) {
1327
+ var r = Pe();
1328
+ return E?.before(r), fe(r), r;
1329
+ }
1330
+ Dn(
1331
+ /** @type {Text} */
1332
+ E
1333
+ );
1334
+ }
1335
+ return E;
1336
+ }
1337
+ function Ve(e, t = 1, n = !1) {
1338
+ let r = C ? E : e;
1268
1339
  for (var s; t--; )
1269
1340
  s = r, r = /** @type {TemplateNode} */
1270
- /* @__PURE__ */ De(r);
1271
- if (!I)
1341
+ /* @__PURE__ */ Ae(r);
1342
+ if (!C)
1272
1343
  return r;
1273
1344
  if (n) {
1274
- if (r?.nodeType !== Rn) {
1275
- var i = Xe();
1345
+ if (r?.nodeType !== nn) {
1346
+ var i = Pe();
1276
1347
  return r === null ? s?.after(i) : r.before(i), fe(i), i;
1277
1348
  }
1278
- zr(
1349
+ Dn(
1279
1350
  /** @type {Text} */
1280
1351
  r
1281
1352
  );
1282
1353
  }
1283
1354
  return fe(r), r;
1284
1355
  }
1285
- function _i(e) {
1356
+ function yi(e) {
1286
1357
  e.textContent = "";
1287
1358
  }
1288
- function pi() {
1359
+ function $i() {
1289
1360
  return !1;
1290
1361
  }
1291
- function Hr(e, t, n) {
1362
+ function On(e, t, n) {
1292
1363
  return (
1293
1364
  /** @type {T extends keyof HTMLElementTagNameMap ? HTMLElementTagNameMap[T] : Element} */
1294
- document.createElementNS(fr, e, void 0)
1365
+ document.createElementNS(dr, e, void 0)
1295
1366
  );
1296
1367
  }
1297
- function zr(e) {
1368
+ function Dn(e) {
1298
1369
  if (
1299
1370
  /** @type {string} */
1300
1371
  e.nodeValue.length < 65536
1301
1372
  )
1302
1373
  return;
1303
1374
  let t = e.nextSibling;
1304
- for (; t !== null && t.nodeType === Rn; )
1375
+ for (; t !== null && t.nodeType === nn; )
1305
1376
  t.remove(), e.nodeValue += /** @type {string} */
1306
1377
  t.nodeValue, t = e.nextSibling;
1307
1378
  }
1308
- function Vr(e) {
1379
+ function Hr(e) {
1309
1380
  var t = b, n = y;
1310
- Z(null), ce(null);
1381
+ ne(null), me(null);
1311
1382
  try {
1312
1383
  return e();
1313
1384
  } finally {
1314
- Z(t), ce(n);
1385
+ ne(t), me(n);
1315
1386
  }
1316
1387
  }
1317
- function gi(e) {
1318
- y === null && (b === null && Hs(), js()), Ne && Fs();
1388
+ function xi(e) {
1389
+ y === null && (b === null && Ys(), Vs()), je && Ws();
1319
1390
  }
1320
- function mi(e, t) {
1391
+ function Ei(e, t) {
1321
1392
  var n = t.last;
1322
1393
  n === null ? t.last = t.first = e : (n.next = e, e.prev = n, t.last = e);
1323
1394
  }
1324
- function xe(e, t, n) {
1325
- var r = y;
1326
- r !== null && (r.f & ae) !== 0 && (e |= ae);
1327
- var s = {
1328
- ctx: Y,
1395
+ function be(e, t) {
1396
+ var n = y;
1397
+ n !== null && (n.f & ee) !== 0 && (e |= ee);
1398
+ var r = {
1399
+ ctx: W,
1329
1400
  deps: null,
1330
1401
  nodes: null,
1331
- f: e | P | K,
1402
+ f: e | L | Q,
1332
1403
  first: null,
1333
1404
  fn: t,
1334
1405
  last: null,
1335
1406
  next: null,
1336
- parent: r,
1337
- b: r && r.b,
1407
+ parent: n,
1408
+ b: n && n.b,
1338
1409
  prev: null,
1339
1410
  teardown: null,
1340
1411
  wv: 0,
1341
1412
  ac: null
1342
- };
1343
- if (n)
1413
+ }, s = r;
1414
+ if ((e & Ct) !== 0)
1415
+ Et !== null ? Et.push(r) : pe(r);
1416
+ else if (t !== null) {
1344
1417
  try {
1345
- vt(s);
1346
- } catch (u) {
1347
- throw V(s), u;
1418
+ St(r);
1419
+ } catch (o) {
1420
+ throw B(r), o;
1348
1421
  }
1349
- else t !== null && te(s);
1350
- var i = s;
1351
- if (n && i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
1352
- (i.f & Je) === 0 && (i = i.first, (e & Se) !== 0 && (e & ft) !== 0 && i !== null && (i.f |= ft)), i !== null && (i.parent = r, r !== null && mi(i, r), b !== null && (b.f & L) !== 0 && (e & Oe) === 0)) {
1353
- var o = (
1422
+ s.deps === null && s.teardown === null && s.nodes === null && s.first === s.last && // either `null`, or a singular child
1423
+ (s.f & nt) === 0 && (s = s.first, (e & He) !== 0 && (e & $t) !== 0 && s !== null && (s.f |= $t));
1424
+ }
1425
+ if (s !== null && (s.parent = n, n !== null && Ei(s, n), b !== null && (b.f & P) !== 0 && (e & Fe) === 0)) {
1426
+ var i = (
1354
1427
  /** @type {Derived} */
1355
1428
  b
1356
1429
  );
1357
- (o.effects ?? (o.effects = [])).push(i);
1430
+ (i.effects ?? (i.effects = [])).push(s);
1358
1431
  }
1359
- return s;
1432
+ return r;
1360
1433
  }
1361
- function Pn() {
1362
- return b !== null && !ne;
1434
+ function Ln() {
1435
+ return b !== null && !ae;
1363
1436
  }
1364
- function wi(e) {
1365
- const t = xe(Xt, null, !1);
1366
- return M(t, C), t.teardown = e, t;
1437
+ function Si(e) {
1438
+ const t = be(yt, null);
1439
+ return R(t, D), t.teardown = e, t;
1367
1440
  }
1368
- function kn(e) {
1369
- gi();
1441
+ function Sn(e) {
1442
+ xi();
1370
1443
  var t = (
1371
1444
  /** @type {Effect} */
1372
1445
  y.f
1373
- ), n = !b && (t & he) !== 0 && (t & _t) === 0;
1446
+ ), n = !b && (t & we) !== 0 && (t & tt) === 0;
1374
1447
  if (n) {
1375
1448
  var r = (
1376
1449
  /** @type {ComponentContext} */
1377
- Y
1450
+ W
1378
1451
  );
1379
1452
  (r.e ?? (r.e = [])).push(e);
1380
1453
  } else
1381
- return Yr(e);
1454
+ return Fr(e);
1382
1455
  }
1383
- function Yr(e) {
1384
- return xe(Bt | Ds, e, !1);
1456
+ function Fr(e) {
1457
+ return be(Ct | zs, e);
1385
1458
  }
1386
- function bi(e) {
1387
- Ee.ensure();
1388
- const t = xe(Oe | Je, e, !0);
1459
+ function Ci(e) {
1460
+ Te.ensure();
1461
+ const t = be(Fe | nt, e);
1389
1462
  return () => {
1390
- V(t);
1463
+ B(t);
1391
1464
  };
1392
1465
  }
1393
- function yi(e) {
1394
- Ee.ensure();
1395
- const t = xe(Oe | Je, e, !0);
1466
+ function Ii(e) {
1467
+ Te.ensure();
1468
+ const t = be(Fe | nt, e);
1396
1469
  return (n = {}) => new Promise((r) => {
1397
- n.outro ? bt(t, () => {
1398
- V(t), r(void 0);
1399
- }) : (V(t), r(void 0));
1470
+ n.outro ? Rt(t, () => {
1471
+ B(t), r(void 0);
1472
+ }) : (B(t), r(void 0));
1400
1473
  });
1401
1474
  }
1402
- function $i(e) {
1403
- return xe(Cn | Je, e, !0);
1475
+ function ki(e) {
1476
+ return be(Ct, e);
1477
+ }
1478
+ function Ti(e) {
1479
+ return be(Tn | nt, e);
1404
1480
  }
1405
1481
  function Br(e, t = 0) {
1406
- return xe(Xt | t, e, !0);
1482
+ return be(yt | t, e);
1407
1483
  }
1408
- function hn(e, t = [], n = [], r = []) {
1409
- oi(r, t, n, (s) => {
1410
- xe(Xt, () => e(...s.map(m)), !0);
1484
+ function Mt(e, t = [], n = [], r = []) {
1485
+ di(r, t, n, (s) => {
1486
+ be(yt, () => e(...s.map(x)));
1411
1487
  });
1412
1488
  }
1413
1489
  function Wr(e, t = 0) {
1414
- var n = xe(Se | t, e, !0);
1490
+ var n = be(He | t, e);
1415
1491
  return n;
1416
1492
  }
1417
- function Me(e) {
1418
- return xe(he | Je, e, !0);
1493
+ function Ee(e) {
1494
+ return be(we | nt, e);
1419
1495
  }
1420
- function qr(e) {
1496
+ function Vr(e) {
1421
1497
  var t = e.teardown;
1422
1498
  if (t !== null) {
1423
- const n = Ne, r = b;
1424
- nr(!0), Z(null);
1499
+ const n = je, r = b;
1500
+ Qn(!0), ne(null);
1425
1501
  try {
1426
1502
  t.call(null);
1427
1503
  } finally {
1428
- nr(n), Z(r);
1504
+ Qn(n), ne(r);
1429
1505
  }
1430
1506
  }
1431
1507
  }
1432
- function Fn(e, t = !1) {
1508
+ function Pn(e, t = !1) {
1433
1509
  var n = e.first;
1434
1510
  for (e.first = e.last = null; n !== null; ) {
1435
1511
  const s = n.ac;
1436
- s !== null && Vr(() => {
1437
- s.abort(Pe);
1512
+ s !== null && Hr(() => {
1513
+ s.abort(Ye);
1438
1514
  });
1439
1515
  var r = n.next;
1440
- (n.f & Oe) !== 0 ? n.parent = null : V(n, t), n = r;
1516
+ (n.f & Fe) !== 0 ? n.parent = null : B(n, t), n = r;
1441
1517
  }
1442
1518
  }
1443
- function Ei(e) {
1519
+ function Ai(e) {
1444
1520
  for (var t = e.first; t !== null; ) {
1445
1521
  var n = t.next;
1446
- (t.f & he) === 0 && V(t), t = n;
1522
+ (t.f & we) === 0 && B(t), t = n;
1447
1523
  }
1448
1524
  }
1449
- function V(e, t = !0) {
1525
+ function B(e, t = !0) {
1450
1526
  var n = !1;
1451
- (t || (e.f & _r) !== 0) && e.nodes !== null && e.nodes.end !== null && (Si(
1527
+ (t || (e.f & Ps) !== 0) && e.nodes !== null && e.nodes.end !== null && (Mi(
1452
1528
  e.nodes.start,
1453
1529
  /** @type {TemplateNode} */
1454
1530
  e.nodes.end
1455
- ), n = !0), Fn(e, t && !n), yt(e, 0), M(e, $e);
1531
+ ), n = !0), Pn(e, t && !n), Nt(e, 0), R(e, ke);
1456
1532
  var r = e.nodes && e.nodes.t;
1457
1533
  if (r !== null)
1458
1534
  for (const i of r)
1459
1535
  i.stop();
1460
- qr(e);
1536
+ Vr(e);
1461
1537
  var s = e.parent;
1462
- s !== null && s.first !== null && Ur(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1538
+ s !== null && s.first !== null && Yr(e), e.next = e.prev = e.teardown = e.ctx = e.deps = e.fn = e.nodes = e.ac = null;
1463
1539
  }
1464
- function Si(e, t) {
1540
+ function Mi(e, t) {
1465
1541
  for (; e !== null; ) {
1466
- var n = e === t ? null : /* @__PURE__ */ De(e);
1542
+ var n = e === t ? null : /* @__PURE__ */ Ae(e);
1467
1543
  e.remove(), e = n;
1468
1544
  }
1469
1545
  }
1470
- function Ur(e) {
1546
+ function Yr(e) {
1471
1547
  var t = e.parent, n = e.prev, r = e.next;
1472
1548
  n !== null && (n.next = r), r !== null && (r.prev = n), t !== null && (t.first === e && (t.first = r), t.last === e && (t.last = n));
1473
1549
  }
1474
- function bt(e, t, n = !0) {
1550
+ function Rt(e, t, n = !0) {
1475
1551
  var r = [];
1476
- Xr(e, r, !0);
1552
+ qr(e, r, !0);
1477
1553
  var s = () => {
1478
- n && V(e), t && t();
1554
+ n && B(e), t && t();
1479
1555
  }, i = r.length;
1480
1556
  if (i > 0) {
1481
1557
  var o = () => --i || s();
@@ -1484,31 +1560,31 @@ function bt(e, t, n = !0) {
1484
1560
  } else
1485
1561
  s();
1486
1562
  }
1487
- function Xr(e, t, n) {
1488
- if ((e.f & ae) === 0) {
1489
- e.f ^= ae;
1563
+ function qr(e, t, n) {
1564
+ if ((e.f & ee) === 0) {
1565
+ e.f ^= ee;
1490
1566
  var r = e.nodes && e.nodes.t;
1491
1567
  if (r !== null)
1492
1568
  for (const u of r)
1493
1569
  (u.is_global || n) && t.push(u);
1494
1570
  for (var s = e.first; s !== null; ) {
1495
- var i = s.next, o = (s.f & ft) !== 0 || // If this is a branch effect without a block effect parent,
1571
+ var i = s.next, o = (s.f & $t) !== 0 || // If this is a branch effect without a block effect parent,
1496
1572
  // it means the parent block effect was pruned. In that case,
1497
1573
  // transparency information was transferred to the branch effect.
1498
- (s.f & he) !== 0 && (e.f & Se) !== 0;
1499
- Xr(s, t, o ? n : !1), s = i;
1574
+ (s.f & we) !== 0 && (e.f & He) !== 0;
1575
+ qr(s, t, o ? n : !1), s = i;
1500
1576
  }
1501
1577
  }
1502
1578
  }
1503
- function xi(e) {
1504
- Jr(e, !0);
1579
+ function Ri(e) {
1580
+ Ur(e, !0);
1505
1581
  }
1506
- function Jr(e, t) {
1507
- if ((e.f & ae) !== 0) {
1508
- e.f ^= ae, (e.f & C) === 0 && (M(e, P), te(e));
1582
+ function Ur(e, t) {
1583
+ if ((e.f & ee) !== 0) {
1584
+ e.f ^= ee;
1509
1585
  for (var n = e.first; n !== null; ) {
1510
- var r = n.next, s = (n.f & ft) !== 0 || (n.f & he) !== 0;
1511
- Jr(n, s ? t : !1), n = r;
1586
+ var r = n.next, s = (n.f & $t) !== 0 || (n.f & we) !== 0;
1587
+ Ur(n, s ? t : !1), n = r;
1512
1588
  }
1513
1589
  var i = e.nodes && e.nodes.t;
1514
1590
  if (i !== null)
@@ -1516,133 +1592,133 @@ function Jr(e, t) {
1516
1592
  (o.is_global || t) && o.in();
1517
1593
  }
1518
1594
  }
1519
- function Kr(e, t) {
1595
+ function Xr(e, t) {
1520
1596
  if (e.nodes)
1521
1597
  for (var n = e.nodes.start, r = e.nodes.end; n !== null; ) {
1522
- var s = n === r ? null : /* @__PURE__ */ De(n);
1598
+ var s = n === r ? null : /* @__PURE__ */ Ae(n);
1523
1599
  t.append(n), n = s;
1524
1600
  }
1525
1601
  }
1526
- let Ht = !1, Ne = !1;
1527
- function nr(e) {
1528
- Ne = e;
1602
+ let qt = !1, je = !1;
1603
+ function Qn(e) {
1604
+ je = e;
1529
1605
  }
1530
- let b = null, ne = !1;
1531
- function Z(e) {
1606
+ let b = null, ae = !1;
1607
+ function ne(e) {
1532
1608
  b = e;
1533
1609
  }
1534
1610
  let y = null;
1535
- function ce(e) {
1611
+ function me(e) {
1536
1612
  y = e;
1537
1613
  }
1538
- let G = null;
1539
- function Gr(e) {
1540
- b !== null && (G === null ? G = [e] : G.push(e));
1614
+ let te = null;
1615
+ function Kr(e) {
1616
+ b !== null && (te === null ? te = [e] : te.push(e));
1541
1617
  }
1542
- let z = null, B = 0, U = null;
1543
- function ki(e) {
1544
- U = e;
1618
+ let F = null, q = 0, J = null;
1619
+ function Ni(e) {
1620
+ J = e;
1545
1621
  }
1546
- let Zr = 1, je = 0, qe = je;
1547
- function rr(e) {
1548
- qe = e;
1622
+ let Gr = 1, Ue = 0, Qe = Ue;
1623
+ function er(e) {
1624
+ Qe = e;
1549
1625
  }
1550
- function Qr() {
1551
- return ++Zr;
1626
+ function Jr() {
1627
+ return ++Gr;
1552
1628
  }
1553
- function Mt(e) {
1629
+ function zt(e) {
1554
1630
  var t = e.f;
1555
- if ((t & P) !== 0)
1631
+ if ((t & L) !== 0)
1556
1632
  return !0;
1557
- if (t & L && (e.f &= ~Ue), (t & re) !== 0) {
1633
+ if (t & P && (e.f &= ~et), (t & ue) !== 0) {
1558
1634
  for (var n = (
1559
1635
  /** @type {Value[]} */
1560
1636
  e.deps
1561
1637
  ), r = n.length, s = 0; s < r; s++) {
1562
1638
  var i = n[s];
1563
- if (Mt(
1639
+ if (zt(
1564
1640
  /** @type {Derived} */
1565
1641
  i
1566
- ) && Nr(
1642
+ ) && Rr(
1567
1643
  /** @type {Derived} */
1568
1644
  i
1569
1645
  ), i.wv > e.wv)
1570
1646
  return !0;
1571
1647
  }
1572
- (t & K) !== 0 && // During time traveling we don't want to reset the status so that
1648
+ (t & Q) !== 0 && // During time traveling we don't want to reset the status so that
1573
1649
  // traversal of the graph in the other batches still happens
1574
- ee === null && M(e, C);
1650
+ oe === null && R(e, D);
1575
1651
  }
1576
1652
  return !1;
1577
1653
  }
1578
- function es(e, t, n = !0) {
1654
+ function Zr(e, t, n = !0) {
1579
1655
  var r = e.reactions;
1580
- if (r !== null && !(G !== null && at.call(G, e)))
1656
+ if (r !== null && !(te !== null && bt.call(te, e)))
1581
1657
  for (var s = 0; s < r.length; s++) {
1582
1658
  var i = r[s];
1583
- (i.f & L) !== 0 ? es(
1659
+ (i.f & P) !== 0 ? Zr(
1584
1660
  /** @type {Derived} */
1585
1661
  i,
1586
1662
  t,
1587
1663
  !1
1588
- ) : t === i && (n ? M(i, P) : (i.f & C) !== 0 && M(i, re), te(
1664
+ ) : t === i && (n ? R(i, L) : (i.f & D) !== 0 && R(i, ue), pe(
1589
1665
  /** @type {Effect} */
1590
1666
  i
1591
1667
  ));
1592
1668
  }
1593
1669
  }
1594
- function ts(e) {
1595
- var T;
1596
- var t = z, n = B, r = U, s = b, i = G, o = Y, u = ne, a = qe, f = e.f;
1597
- z = /** @type {null | Value[]} */
1598
- null, B = 0, U = null, b = (f & (he | Oe)) === 0 ? e : null, G = null, ct(e.ctx), ne = !1, qe = ++je, e.ac !== null && (Vr(() => {
1599
- e.ac.abort(Pe);
1670
+ function Qr(e) {
1671
+ var $;
1672
+ var t = F, n = q, r = J, s = b, i = te, o = W, u = ae, a = Qe, f = e.f;
1673
+ F = /** @type {null | Value[]} */
1674
+ null, q = 0, J = null, b = (f & (we | Fe)) === 0 ? e : null, te = null, xt(e.ctx), ae = !1, Qe = ++Ue, e.ac !== null && (Hr(() => {
1675
+ e.ac.abort(Ye);
1600
1676
  }), e.ac = null);
1601
1677
  try {
1602
- e.f |= gn;
1678
+ e.f |= _n;
1603
1679
  var c = (
1604
1680
  /** @type {Function} */
1605
1681
  e.fn
1606
- ), v = c();
1607
- e.f |= _t;
1608
- var d = e.deps, g = x?.is_fork;
1609
- if (z !== null) {
1610
- var _;
1611
- if (g || yt(e, B), d !== null && B > 0)
1612
- for (d.length = B + z.length, _ = 0; _ < z.length; _++)
1613
- d[B + _] = z[_];
1682
+ ), h = c();
1683
+ e.f |= tt;
1684
+ var v = e.deps, g = T?.is_fork;
1685
+ if (F !== null) {
1686
+ var d;
1687
+ if (g || Nt(e, q), v !== null && q > 0)
1688
+ for (v.length = q + F.length, d = 0; d < F.length; d++)
1689
+ v[q + d] = F[d];
1614
1690
  else
1615
- e.deps = d = z;
1616
- if (Pn() && (e.f & K) !== 0)
1617
- for (_ = B; _ < d.length; _++)
1618
- ((T = d[_]).reactions ?? (T.reactions = [])).push(e);
1619
- } else !g && d !== null && B < d.length && (yt(e, B), d.length = B);
1620
- if (yr() && U !== null && !ne && d !== null && (e.f & (L | re | P)) === 0)
1621
- for (_ = 0; _ < /** @type {Source[]} */
1622
- U.length; _++)
1623
- es(
1624
- U[_],
1691
+ e.deps = v = F;
1692
+ if (Ln() && (e.f & Q) !== 0)
1693
+ for (d = q; d < v.length; d++)
1694
+ (($ = v[d]).reactions ?? ($.reactions = [])).push(e);
1695
+ } else !g && v !== null && q < v.length && (Nt(e, q), v.length = q);
1696
+ if (wr() && J !== null && !ae && v !== null && (e.f & (P | ue | L)) === 0)
1697
+ for (d = 0; d < /** @type {Source[]} */
1698
+ J.length; d++)
1699
+ Zr(
1700
+ J[d],
1625
1701
  /** @type {Effect} */
1626
1702
  e
1627
1703
  );
1628
1704
  if (s !== null && s !== e) {
1629
- if (je++, s.deps !== null)
1630
- for (let E = 0; E < n; E += 1)
1631
- s.deps[E].rv = je;
1705
+ if (Ue++, s.deps !== null)
1706
+ for (let _ = 0; _ < n; _ += 1)
1707
+ s.deps[_].rv = Ue;
1632
1708
  if (t !== null)
1633
- for (const E of t)
1634
- E.rv = je;
1635
- U !== null && (r === null ? r = U : r.push(.../** @type {Source[]} */
1636
- U));
1709
+ for (const _ of t)
1710
+ _.rv = Ue;
1711
+ J !== null && (r === null ? r = J : r.push(.../** @type {Source[]} */
1712
+ J));
1637
1713
  }
1638
- return (e.f & Ce) !== 0 && (e.f ^= Ce), v;
1639
- } catch (E) {
1640
- return Er(E);
1714
+ return (e.f & De) !== 0 && (e.f ^= De), h;
1715
+ } catch (_) {
1716
+ return yr(_);
1641
1717
  } finally {
1642
- e.f ^= gn, z = t, B = n, U = r, b = s, G = i, ct(o), ne = u, qe = a;
1718
+ e.f ^= _n, F = t, q = n, J = r, b = s, te = i, xt(o), ae = u, Qe = a;
1643
1719
  }
1644
1720
  }
1645
- function Ii(e, t) {
1721
+ function Oi(e, t) {
1646
1722
  let n = t.reactions;
1647
1723
  if (n !== null) {
1648
1724
  var r = As.call(n, e);
@@ -1651,117 +1727,117 @@ function Ii(e, t) {
1651
1727
  s === 0 ? n = t.reactions = null : (n[r] = n[s], n.pop());
1652
1728
  }
1653
1729
  }
1654
- if (n === null && (t.f & L) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1730
+ if (n === null && (t.f & P) !== 0 && // Destroying a child effect while updating a parent effect can cause a dependency to appear
1655
1731
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
1656
1732
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1657
- (z === null || !at.call(z, t))) {
1733
+ (F === null || !bt.call(F, t))) {
1658
1734
  var i = (
1659
1735
  /** @type {Derived} */
1660
1736
  t
1661
1737
  );
1662
- (i.f & K) !== 0 && (i.f ^= K, i.f &= ~Ue), On(i), di(i), yt(i, 0);
1738
+ (i.f & Q) !== 0 && (i.f ^= Q, i.f &= ~et), Mn(i), mi(i), Nt(i, 0);
1663
1739
  }
1664
1740
  }
1665
- function yt(e, t) {
1741
+ function Nt(e, t) {
1666
1742
  var n = e.deps;
1667
1743
  if (n !== null)
1668
1744
  for (var r = t; r < n.length; r++)
1669
- Ii(e, n[r]);
1745
+ Oi(e, n[r]);
1670
1746
  }
1671
- function vt(e) {
1747
+ function St(e) {
1672
1748
  var t = e.f;
1673
- if ((t & $e) === 0) {
1674
- M(e, C);
1675
- var n = y, r = Ht;
1676
- y = e, Ht = !0;
1749
+ if ((t & ke) === 0) {
1750
+ R(e, D);
1751
+ var n = y, r = qt;
1752
+ y = e, qt = !0;
1677
1753
  try {
1678
- (t & (Se | vr)) !== 0 ? Ei(e) : Fn(e), qr(e);
1679
- var s = ts(e);
1680
- e.teardown = typeof s == "function" ? s : null, e.wv = Zr;
1754
+ (t & (He | kn)) !== 0 ? Ai(e) : Pn(e), Vr(e);
1755
+ var s = Qr(e);
1756
+ e.teardown = typeof s == "function" ? s : null, e.wv = Gr;
1681
1757
  var i;
1682
- _n && Zs && (e.f & P) !== 0 && e.deps;
1758
+ hn && ri && (e.f & L) !== 0 && e.deps;
1683
1759
  } finally {
1684
- Ht = r, y = n;
1760
+ qt = r, y = n;
1685
1761
  }
1686
1762
  }
1687
1763
  }
1688
- function m(e) {
1689
- var t = e.f, n = (t & L) !== 0;
1690
- if (b !== null && !ne) {
1691
- var r = y !== null && (y.f & $e) !== 0;
1692
- if (!r && (G === null || !at.call(G, e))) {
1764
+ function x(e) {
1765
+ var t = e.f, n = (t & P) !== 0;
1766
+ if (b !== null && !ae) {
1767
+ var r = y !== null && (y.f & ke) !== 0;
1768
+ if (!r && (te === null || !bt.call(te, e))) {
1693
1769
  var s = b.deps;
1694
- if ((b.f & gn) !== 0)
1695
- e.rv < je && (e.rv = je, z === null && s !== null && s[B] === e ? B++ : z === null ? z = [e] : z.push(e));
1770
+ if ((b.f & _n) !== 0)
1771
+ e.rv < Ue && (e.rv = Ue, F === null && s !== null && s[q] === e ? q++ : F === null ? F = [e] : F.push(e));
1696
1772
  else {
1697
1773
  (b.deps ?? (b.deps = [])).push(e);
1698
1774
  var i = e.reactions;
1699
- i === null ? e.reactions = [b] : at.call(i, b) || i.push(b);
1775
+ i === null ? e.reactions = [b] : bt.call(i, b) || i.push(b);
1700
1776
  }
1701
1777
  }
1702
1778
  }
1703
- if (Ne && Re.has(e))
1704
- return Re.get(e);
1779
+ if (je && Le.has(e))
1780
+ return Le.get(e);
1705
1781
  if (n) {
1706
1782
  var o = (
1707
1783
  /** @type {Derived} */
1708
1784
  e
1709
1785
  );
1710
- if (Ne) {
1786
+ if (je) {
1711
1787
  var u = o.v;
1712
- return ((o.f & C) === 0 && o.reactions !== null || rs(o)) && (u = Ln(o)), Re.set(o, u), u;
1788
+ return ((o.f & D) === 0 && o.reactions !== null || ts(o)) && (u = Nn(o)), Le.set(o, u), u;
1713
1789
  }
1714
- var a = (o.f & K) === 0 && !ne && b !== null && (Ht || (b.f & K) !== 0), f = (o.f & _t) === 0;
1715
- Mt(o) && (a && (o.f |= K), Nr(o)), a && !f && (Or(o), ns(o));
1790
+ var a = (o.f & Q) === 0 && !ae && b !== null && (qt || (b.f & Q) !== 0), f = (o.f & tt) === 0;
1791
+ zt(o) && (a && (o.f |= Q), Rr(o)), a && !f && (Nr(o), es(o));
1716
1792
  }
1717
- if (ee?.has(e))
1718
- return ee.get(e);
1719
- if ((e.f & Ce) !== 0)
1793
+ if (oe?.has(e))
1794
+ return oe.get(e);
1795
+ if ((e.f & De) !== 0)
1720
1796
  throw e.v;
1721
1797
  return e.v;
1722
1798
  }
1723
- function ns(e) {
1724
- if (e.f |= K, e.deps !== null)
1799
+ function es(e) {
1800
+ if (e.f |= Q, e.deps !== null)
1725
1801
  for (const t of e.deps)
1726
- (t.reactions ?? (t.reactions = [])).push(e), (t.f & L) !== 0 && (t.f & K) === 0 && (Or(
1802
+ (t.reactions ?? (t.reactions = [])).push(e), (t.f & P) !== 0 && (t.f & Q) === 0 && (Nr(
1727
1803
  /** @type {Derived} */
1728
1804
  t
1729
- ), ns(
1805
+ ), es(
1730
1806
  /** @type {Derived} */
1731
1807
  t
1732
1808
  ));
1733
1809
  }
1734
- function rs(e) {
1810
+ function ts(e) {
1735
1811
  if (e.v === O) return !0;
1736
1812
  if (e.deps === null) return !1;
1737
1813
  for (const t of e.deps)
1738
- if (Re.has(t) || (t.f & L) !== 0 && rs(
1814
+ if (Le.has(t) || (t.f & P) !== 0 && ts(
1739
1815
  /** @type {Derived} */
1740
1816
  t
1741
1817
  ))
1742
1818
  return !0;
1743
1819
  return !1;
1744
1820
  }
1745
- function ss(e) {
1746
- var t = ne;
1821
+ function ns(e) {
1822
+ var t = ae;
1747
1823
  try {
1748
- return ne = !0, e();
1824
+ return ae = !0, e();
1749
1825
  } finally {
1750
- ne = t;
1826
+ ae = t;
1751
1827
  }
1752
1828
  }
1753
- const He = /* @__PURE__ */ Symbol("events"), is = /* @__PURE__ */ new Set(), In = /* @__PURE__ */ new Set();
1754
- function Dt(e, t, n) {
1755
- (t[He] ?? (t[He] = {}))[e] = n;
1829
+ const Xe = /* @__PURE__ */ Symbol("events"), rs = /* @__PURE__ */ new Set(), Cn = /* @__PURE__ */ new Set();
1830
+ function Jt(e, t, n) {
1831
+ (t[Xe] ?? (t[Xe] = {}))[e] = n;
1756
1832
  }
1757
- function Ai(e) {
1833
+ function zn(e) {
1758
1834
  for (var t = 0; t < e.length; t++)
1759
- is.add(e[t]);
1760
- for (var n of In)
1835
+ rs.add(e[t]);
1836
+ for (var n of Cn)
1761
1837
  n(e);
1762
1838
  }
1763
- let sr = null;
1764
- function ir(e) {
1839
+ let tr = null;
1840
+ function nr(e) {
1765
1841
  var t = this, n = (
1766
1842
  /** @type {Node} */
1767
1843
  t.ownerDocument
@@ -1769,13 +1845,13 @@ function ir(e) {
1769
1845
  /** @type {null | Element} */
1770
1846
  s[0] || e.target
1771
1847
  );
1772
- sr = e;
1773
- var o = 0, u = sr === e && e[He];
1848
+ tr = e;
1849
+ var o = 0, u = tr === e && e[Xe];
1774
1850
  if (u) {
1775
1851
  var a = s.indexOf(u);
1776
1852
  if (a !== -1 && (t === document || t === /** @type {any} */
1777
1853
  window)) {
1778
- e[He] = t;
1854
+ e[Xe] = t;
1779
1855
  return;
1780
1856
  }
1781
1857
  var f = s.indexOf(t);
@@ -1785,61 +1861,61 @@ function ir(e) {
1785
1861
  }
1786
1862
  if (i = /** @type {Element} */
1787
1863
  s[o] || e.target, i !== t) {
1788
- Yt(e, "currentTarget", {
1864
+ Kt(e, "currentTarget", {
1789
1865
  configurable: !0,
1790
1866
  get() {
1791
1867
  return i || n;
1792
1868
  }
1793
1869
  });
1794
- var c = b, v = y;
1795
- Z(null), ce(null);
1870
+ var c = b, h = y;
1871
+ ne(null), me(null);
1796
1872
  try {
1797
- for (var d, g = []; i !== null; ) {
1798
- var _ = i.assignedSlot || i.parentNode || /** @type {any} */
1873
+ for (var v, g = []; i !== null; ) {
1874
+ var d = i.assignedSlot || i.parentNode || /** @type {any} */
1799
1875
  i.host || null;
1800
1876
  try {
1801
- var T = i[He]?.[r];
1802
- T != null && (!/** @type {any} */
1877
+ var $ = i[Xe]?.[r];
1878
+ $ != null && (!/** @type {any} */
1803
1879
  i.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1804
1880
  // -> the target could not have been disabled because it emits the event in the first place
1805
- e.target === i) && T.call(i, e);
1806
- } catch (E) {
1807
- d ? g.push(E) : d = E;
1881
+ e.target === i) && $.call(i, e);
1882
+ } catch (_) {
1883
+ v ? g.push(_) : v = _;
1808
1884
  }
1809
- if (e.cancelBubble || _ === t || _ === null)
1885
+ if (e.cancelBubble || d === t || d === null)
1810
1886
  break;
1811
- i = _;
1887
+ i = d;
1812
1888
  }
1813
- if (d) {
1814
- for (let E of g)
1889
+ if (v) {
1890
+ for (let _ of g)
1815
1891
  queueMicrotask(() => {
1816
- throw E;
1892
+ throw _;
1817
1893
  });
1818
- throw d;
1894
+ throw v;
1819
1895
  }
1820
1896
  } finally {
1821
- e[He] = t, delete e.currentTarget, Z(c), ce(v);
1897
+ e[Xe] = t, delete e.currentTarget, ne(c), me(h);
1822
1898
  }
1823
1899
  }
1824
1900
  }
1825
- const Mi = (
1901
+ const Di = (
1826
1902
  // We gotta write it like this because after downleveling the pure comment may end up in the wrong location
1827
1903
  globalThis?.window?.trustedTypes && /* @__PURE__ */ globalThis.window.trustedTypes.createPolicy("svelte-trusted-html", {
1828
1904
  /** @param {string} html */
1829
1905
  createHTML: (e) => e
1830
1906
  })
1831
1907
  );
1832
- function Ti(e) {
1908
+ function Li(e) {
1833
1909
  return (
1834
1910
  /** @type {string} */
1835
- Mi?.createHTML(e) ?? e
1911
+ Di?.createHTML(e) ?? e
1836
1912
  );
1837
1913
  }
1838
- function os(e, t = !1) {
1839
- var n = Hr("template");
1840
- return e = e.replaceAll("<!>", "<!---->"), n.innerHTML = t ? Ti(e) : e, n.content;
1914
+ function ss(e) {
1915
+ var t = On("template");
1916
+ return t.innerHTML = Li(e.replaceAll("<!>", "<!---->")), t.content;
1841
1917
  }
1842
- function $t(e, t) {
1918
+ function ft(e, t) {
1843
1919
  var n = (
1844
1920
  /** @type {Effect} */
1845
1921
  y
@@ -1847,55 +1923,66 @@ function $t(e, t) {
1847
1923
  n.nodes === null && (n.nodes = { start: e, end: t, a: null, t: null });
1848
1924
  }
1849
1925
  // @__NO_SIDE_EFFECTS__
1850
- function pt(e, t) {
1851
- var n = (t & Is) !== 0, r, s = !e.startsWith("<!>");
1926
+ function rt(e, t) {
1927
+ var n = (t & ks) !== 0, r = (t & Ts) !== 0, s, i = !e.startsWith("<!>");
1852
1928
  return () => {
1853
- if (I)
1854
- return $t(k, null), k;
1855
- r === void 0 && (r = os(s ? e : "<!>" + e, !0), r = /** @type {TemplateNode} */
1856
- /* @__PURE__ */ ht(r));
1857
- var i = (
1929
+ if (C)
1930
+ return ft(E, null), E;
1931
+ s === void 0 && (s = ss(i ? e : "<!>" + e), n || (s = /** @type {TemplateNode} */
1932
+ /* @__PURE__ */ ze(s)));
1933
+ var o = (
1858
1934
  /** @type {TemplateNode} */
1859
- n || Pr ? document.importNode(r, !0) : r.cloneNode(!0)
1935
+ r || Lr ? document.importNode(s, !0) : s.cloneNode(!0)
1860
1936
  );
1861
- return $t(i, i), i;
1937
+ if (n) {
1938
+ var u = (
1939
+ /** @type {TemplateNode} */
1940
+ /* @__PURE__ */ ze(o)
1941
+ ), a = (
1942
+ /** @type {TemplateNode} */
1943
+ o.lastChild
1944
+ );
1945
+ ft(u, a);
1946
+ } else
1947
+ ft(o, o);
1948
+ return o;
1862
1949
  };
1863
1950
  }
1864
1951
  // @__NO_SIDE_EFFECTS__
1865
- function Ci(e, t, n = "svg") {
1952
+ function Pi(e, t, n = "svg") {
1866
1953
  var r = !e.startsWith("<!>"), s = `<${n}>${r ? e : "<!>" + e}</${n}>`, i;
1867
1954
  return () => {
1868
- if (I)
1869
- return $t(k, null), k;
1955
+ if (C)
1956
+ return ft(E, null), E;
1870
1957
  if (!i) {
1871
1958
  var o = (
1872
1959
  /** @type {DocumentFragment} */
1873
- os(s, !0)
1960
+ ss(s)
1874
1961
  ), u = (
1875
1962
  /** @type {Element} */
1876
- /* @__PURE__ */ ht(o)
1963
+ /* @__PURE__ */ ze(o)
1877
1964
  );
1878
1965
  i = /** @type {Element} */
1879
- /* @__PURE__ */ ht(u);
1966
+ /* @__PURE__ */ ze(u);
1880
1967
  }
1881
1968
  var a = (
1882
1969
  /** @type {TemplateNode} */
1883
1970
  i.cloneNode(!0)
1884
1971
  );
1885
- return $t(a, a), a;
1972
+ return ft(a, a), a;
1886
1973
  };
1887
1974
  }
1888
1975
  // @__NO_SIDE_EFFECTS__
1889
- function ls(e, t) {
1890
- return /* @__PURE__ */ Ci(e, t, "svg");
1976
+ function is(e, t) {
1977
+ return /* @__PURE__ */ Pi(e, t, "svg");
1891
1978
  }
1892
1979
  function _e(e, t) {
1893
- if (I) {
1980
+ if (C) {
1894
1981
  var n = (
1895
1982
  /** @type {Effect & { nodes: EffectNodes }} */
1896
1983
  y
1897
1984
  );
1898
- ((n.f & _t) === 0 || n.nodes.end === null) && (n.nodes.end = k), Nn();
1985
+ ((n.f & tt) === 0 || n.nodes.end === null) && (n.nodes.end = E), An();
1899
1986
  return;
1900
1987
  }
1901
1988
  e !== null && e.before(
@@ -1903,118 +1990,119 @@ function _e(e, t) {
1903
1990
  t
1904
1991
  );
1905
1992
  }
1906
- const Ri = ["touchstart", "touchmove"];
1907
- function Ni(e) {
1908
- return Ri.includes(e);
1993
+ const zi = ["touchstart", "touchmove"];
1994
+ function ji(e) {
1995
+ return zi.includes(e);
1909
1996
  }
1910
- function Oi(e, t) {
1911
- var n = t == null ? "" : typeof t == "object" ? t + "" : t;
1912
- n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = n + "");
1997
+ function Hi(e, t) {
1998
+ var n = t == null ? "" : typeof t == "object" ? `${t}` : t;
1999
+ n !== (e.__t ?? (e.__t = e.nodeValue)) && (e.__t = n, e.nodeValue = `${n}`);
1913
2000
  }
1914
- function us(e, t) {
1915
- return as(e, t);
2001
+ function os(e, t) {
2002
+ return ls(e, t);
1916
2003
  }
1917
- function Di(e, t) {
1918
- xn(), t.intro = t.intro ?? !1;
1919
- const n = t.target, r = I, s = k;
2004
+ function Fi(e, t) {
2005
+ En(), t.intro = t.intro ?? !1;
2006
+ const n = t.target, r = C, s = E;
1920
2007
  try {
1921
- for (var i = /* @__PURE__ */ ht(n); i && (i.nodeType !== Jt || /** @type {Comment} */
1922
- i.data !== Mn); )
1923
- i = /* @__PURE__ */ De(i);
2008
+ for (var i = /* @__PURE__ */ ze(n); i && (i.nodeType !== rn || /** @type {Comment} */
2009
+ i.data !== ur); )
2010
+ i = /* @__PURE__ */ Ae(i);
1924
2011
  if (!i)
1925
- throw ut;
1926
- Ge(!0), fe(
2012
+ throw wt;
2013
+ ot(!0), fe(
1927
2014
  /** @type {Comment} */
1928
2015
  i
1929
2016
  );
1930
- const o = as(e, { ...t, anchor: i });
1931
- return Ge(!1), /** @type {Exports} */
2017
+ const o = ls(e, { ...t, anchor: i });
2018
+ return ot(!1), /** @type {Exports} */
1932
2019
  o;
1933
2020
  } catch (o) {
1934
2021
  if (o instanceof Error && o.message.split(`
1935
2022
  `).some((u) => u.startsWith("https://svelte.dev/e/")))
1936
2023
  throw o;
1937
- return o !== ut && console.warn("Failed to hydrate: ", o), t.recover === !1 && Vs(), xn(), _i(n), Ge(!1), us(e, t);
2024
+ return o !== wt && console.warn("Failed to hydrate: ", o), t.recover === !1 && Us(), En(), yi(n), ot(!1), os(e, t);
1938
2025
  } finally {
1939
- Ge(r), fe(s);
2026
+ ot(r), fe(s);
1940
2027
  }
1941
2028
  }
1942
- const Lt = /* @__PURE__ */ new Map();
1943
- function as(e, { target: t, anchor: n, props: r = {}, events: s, context: i, intro: o = !0 }) {
1944
- xn();
1945
- var u = void 0, a = yi(() => {
1946
- var f = n ?? t.appendChild(Xe());
1947
- si(
2029
+ const Wt = /* @__PURE__ */ new Map();
2030
+ function ls(e, { target: t, anchor: n, props: r = {}, events: s, context: i, intro: o = !0, transformError: u }) {
2031
+ En();
2032
+ var a = void 0, f = Ii(() => {
2033
+ var c = n ?? t.appendChild(Pe());
2034
+ fi(
1948
2035
  /** @type {TemplateNode} */
1949
- f,
2036
+ c,
1950
2037
  {
1951
2038
  pending: () => {
1952
2039
  }
1953
2040
  },
1954
- (d) => {
1955
- wr({});
1956
- var g = (
2041
+ (g) => {
2042
+ on({});
2043
+ var d = (
1957
2044
  /** @type {ComponentContext} */
1958
- Y
2045
+ W
1959
2046
  );
1960
- if (i && (g.c = i), s && (r.$$events = s), I && $t(
2047
+ if (i && (d.c = i), s && (r.$$events = s), C && ft(
1961
2048
  /** @type {TemplateNode} */
1962
- d,
2049
+ g,
1963
2050
  null
1964
- ), u = e(d, r) || {}, I && (y.nodes.end = k, k === null || k.nodeType !== Jt || /** @type {Comment} */
1965
- k.data !== ar))
1966
- throw Kt(), ut;
1967
- br();
1968
- }
2051
+ ), a = e(g, r) || {}, C && (y.nodes.end = E, E === null || E.nodeType !== rn || /** @type {Comment} */
2052
+ E.data !== cr))
2053
+ throw sn(), wt;
2054
+ ln();
2055
+ },
2056
+ u
1969
2057
  );
1970
- var c = /* @__PURE__ */ new Set(), v = (d) => {
1971
- for (var g = 0; g < d.length; g++) {
1972
- var _ = d[g];
1973
- if (!c.has(_)) {
1974
- c.add(_);
1975
- var T = Ni(_);
1976
- for (const se of [t, document]) {
1977
- var E = Lt.get(se);
1978
- E === void 0 && (E = /* @__PURE__ */ new Map(), Lt.set(se, E));
1979
- var ke = E.get(_);
1980
- ke === void 0 ? (se.addEventListener(_, ir, { passive: T }), E.set(_, 1)) : E.set(_, ke + 1);
2058
+ var h = /* @__PURE__ */ new Set(), v = (g) => {
2059
+ for (var d = 0; d < g.length; d++) {
2060
+ var $ = g[d];
2061
+ if (!h.has($)) {
2062
+ h.add($);
2063
+ var _ = ji($);
2064
+ for (const G of [t, document]) {
2065
+ var S = Wt.get(G);
2066
+ S === void 0 && (S = /* @__PURE__ */ new Map(), Wt.set(G, S));
2067
+ var Y = S.get($);
2068
+ Y === void 0 ? (G.addEventListener($, nr, { passive: _ }), S.set($, 1)) : S.set($, Y + 1);
1981
2069
  }
1982
2070
  }
1983
2071
  }
1984
2072
  };
1985
- return v(Ms(is)), In.add(v), () => {
1986
- for (var d of c)
1987
- for (const T of [t, document]) {
1988
- var g = (
2073
+ return v(Ms(rs)), Cn.add(v), () => {
2074
+ for (var g of h)
2075
+ for (const _ of [t, document]) {
2076
+ var d = (
1989
2077
  /** @type {Map<string, number>} */
1990
- Lt.get(T)
1991
- ), _ = (
2078
+ Wt.get(_)
2079
+ ), $ = (
1992
2080
  /** @type {number} */
1993
- g.get(d)
2081
+ d.get(g)
1994
2082
  );
1995
- --_ == 0 ? (T.removeEventListener(d, ir), g.delete(d), g.size === 0 && Lt.delete(T)) : g.set(d, _);
2083
+ --$ == 0 ? (_.removeEventListener(g, nr), d.delete(g), d.size === 0 && Wt.delete(_)) : d.set(g, $);
1996
2084
  }
1997
- In.delete(v), f !== n && f.parentNode?.removeChild(f);
2085
+ Cn.delete(v), c !== n && c.parentNode?.removeChild(c);
1998
2086
  };
1999
2087
  });
2000
- return An.set(u, a), u;
2088
+ return In.set(a, f), a;
2001
2089
  }
2002
- let An = /* @__PURE__ */ new WeakMap();
2003
- function Li(e, t) {
2004
- const n = An.get(e);
2005
- return n ? (An.delete(e), n(t)) : Promise.resolve();
2090
+ let In = /* @__PURE__ */ new WeakMap();
2091
+ function Bi(e, t) {
2092
+ const n = In.get(e);
2093
+ return n ? (In.delete(e), n(t)) : Promise.resolve();
2006
2094
  }
2007
- var Q, ue, q, We, kt, It, Ut;
2008
- class Pi {
2095
+ var ie, ve, K, Ze, Dt, Lt, tn;
2096
+ class Wi {
2009
2097
  /**
2010
2098
  * @param {TemplateNode} anchor
2011
2099
  * @param {boolean} transition
2012
2100
  */
2013
2101
  constructor(t, n = !0) {
2014
2102
  /** @type {TemplateNode} */
2015
- A(this, "anchor");
2103
+ I(this, "anchor");
2016
2104
  /** @type {Map<Batch, Key>} */
2017
- w(this, Q, /* @__PURE__ */ new Map());
2105
+ w(this, ie, /* @__PURE__ */ new Map());
2018
2106
  /**
2019
2107
  * Map of keys to effects that are currently rendered in the DOM.
2020
2108
  * These effects are visible and actively part of the document tree.
@@ -2029,69 +2117,68 @@ class Pi {
2029
2117
  * Can result in the entries `true->Effect` and `false->Effect`
2030
2118
  * @type {Map<Key, Effect>}
2031
2119
  */
2032
- w(this, ue, /* @__PURE__ */ new Map());
2120
+ w(this, ve, /* @__PURE__ */ new Map());
2033
2121
  /**
2034
2122
  * Similar to #onscreen with respect to the keys, but contains branches that are not yet
2035
2123
  * in the DOM, because their insertion is deferred.
2036
2124
  * @type {Map<Key, Branch>}
2037
2125
  */
2038
- w(this, q, /* @__PURE__ */ new Map());
2126
+ w(this, K, /* @__PURE__ */ new Map());
2039
2127
  /**
2040
2128
  * Keys of effects that are currently outroing
2041
2129
  * @type {Set<Key>}
2042
2130
  */
2043
- w(this, We, /* @__PURE__ */ new Set());
2131
+ w(this, Ze, /* @__PURE__ */ new Set());
2044
2132
  /**
2045
2133
  * Whether to pause (i.e. outro) on change, or destroy immediately.
2046
2134
  * This is necessary for `<svelte:element>`
2047
2135
  */
2048
- w(this, kt, !0);
2049
- w(this, It, () => {
2050
- var t = (
2051
- /** @type {Batch} */
2052
- x
2053
- );
2054
- if (l(this, Q).has(t)) {
2136
+ w(this, Dt, !0);
2137
+ /**
2138
+ * @param {Batch} batch
2139
+ */
2140
+ w(this, Lt, (t) => {
2141
+ if (l(this, ie).has(t)) {
2055
2142
  var n = (
2056
2143
  /** @type {Key} */
2057
- l(this, Q).get(t)
2058
- ), r = l(this, ue).get(n);
2144
+ l(this, ie).get(t)
2145
+ ), r = l(this, ve).get(n);
2059
2146
  if (r)
2060
- xi(r), l(this, We).delete(n);
2147
+ Ri(r), l(this, Ze).delete(n);
2061
2148
  else {
2062
- var s = l(this, q).get(n);
2063
- s && (l(this, ue).set(n, s.effect), l(this, q).delete(n), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), r = s.effect);
2149
+ var s = l(this, K).get(n);
2150
+ s && (s.effect.f & ee) === 0 && (l(this, ve).set(n, s.effect), l(this, K).delete(n), s.fragment.lastChild.remove(), this.anchor.before(s.fragment), r = s.effect);
2064
2151
  }
2065
- for (const [i, o] of l(this, Q)) {
2066
- if (l(this, Q).delete(i), i === t)
2152
+ for (const [i, o] of l(this, ie)) {
2153
+ if (l(this, ie).delete(i), i === t)
2067
2154
  break;
2068
- const u = l(this, q).get(o);
2069
- u && (V(u.effect), l(this, q).delete(o));
2155
+ const u = l(this, K).get(o);
2156
+ u && (B(u.effect), l(this, K).delete(o));
2070
2157
  }
2071
- for (const [i, o] of l(this, ue)) {
2072
- if (i === n || l(this, We).has(i)) continue;
2158
+ for (const [i, o] of l(this, ve)) {
2159
+ if (i === n || l(this, Ze).has(i) || (o.f & ee) !== 0) continue;
2073
2160
  const u = () => {
2074
- if (Array.from(l(this, Q).values()).includes(i)) {
2161
+ if (Array.from(l(this, ie).values()).includes(i)) {
2075
2162
  var f = document.createDocumentFragment();
2076
- Kr(o, f), f.append(Xe()), l(this, q).set(i, { effect: o, fragment: f });
2163
+ Xr(o, f), f.append(Pe()), l(this, K).set(i, { effect: o, fragment: f });
2077
2164
  } else
2078
- V(o);
2079
- l(this, We).delete(i), l(this, ue).delete(i);
2165
+ B(o);
2166
+ l(this, Ze).delete(i), l(this, ve).delete(i);
2080
2167
  };
2081
- l(this, kt) || !r ? (l(this, We).add(i), bt(o, u, !1)) : u();
2168
+ l(this, Dt) || !r ? (l(this, Ze).add(i), Rt(o, u, !1)) : u();
2082
2169
  }
2083
2170
  }
2084
2171
  });
2085
2172
  /**
2086
2173
  * @param {Batch} batch
2087
2174
  */
2088
- w(this, Ut, (t) => {
2089
- l(this, Q).delete(t);
2090
- const n = Array.from(l(this, Q).values());
2091
- for (const [r, s] of l(this, q))
2092
- n.includes(r) || (V(s.effect), l(this, q).delete(r));
2175
+ w(this, tn, (t) => {
2176
+ l(this, ie).delete(t);
2177
+ const n = Array.from(l(this, ie).values());
2178
+ for (const [r, s] of l(this, K))
2179
+ n.includes(r) || (B(s.effect), l(this, K).delete(r));
2093
2180
  });
2094
- this.anchor = t, p(this, kt, n);
2181
+ this.anchor = t, m(this, Dt, n);
2095
2182
  }
2096
2183
  /**
2097
2184
  *
@@ -2101,45 +2188,45 @@ class Pi {
2101
2188
  ensure(t, n) {
2102
2189
  var r = (
2103
2190
  /** @type {Batch} */
2104
- x
2105
- ), s = pi();
2106
- if (n && !l(this, ue).has(t) && !l(this, q).has(t))
2191
+ T
2192
+ ), s = $i();
2193
+ if (n && !l(this, ve).has(t) && !l(this, K).has(t))
2107
2194
  if (s) {
2108
- var i = document.createDocumentFragment(), o = Xe();
2109
- i.append(o), l(this, q).set(t, {
2110
- effect: Me(() => n(o)),
2195
+ var i = document.createDocumentFragment(), o = Pe();
2196
+ i.append(o), l(this, K).set(t, {
2197
+ effect: Ee(() => n(o)),
2111
2198
  fragment: i
2112
2199
  });
2113
2200
  } else
2114
- l(this, ue).set(
2201
+ l(this, ve).set(
2115
2202
  t,
2116
- Me(() => n(this.anchor))
2203
+ Ee(() => n(this.anchor))
2117
2204
  );
2118
- if (l(this, Q).set(r, t), s) {
2119
- for (const [u, a] of l(this, ue))
2205
+ if (l(this, ie).set(r, t), s) {
2206
+ for (const [u, a] of l(this, ve))
2120
2207
  u === t ? r.unskip_effect(a) : r.skip_effect(a);
2121
- for (const [u, a] of l(this, q))
2208
+ for (const [u, a] of l(this, K))
2122
2209
  u === t ? r.unskip_effect(a.effect) : r.skip_effect(a.effect);
2123
- r.oncommit(l(this, It)), r.ondiscard(l(this, Ut));
2210
+ r.oncommit(l(this, Lt)), r.ondiscard(l(this, tn));
2124
2211
  } else
2125
- I && (this.anchor = k), l(this, It).call(this);
2212
+ C && (this.anchor = E), l(this, Lt).call(this, r);
2126
2213
  }
2127
2214
  }
2128
- Q = new WeakMap(), ue = new WeakMap(), q = new WeakMap(), We = new WeakMap(), kt = new WeakMap(), It = new WeakMap(), Ut = new WeakMap();
2129
- function Fi(e) {
2130
- Y === null && pr(), kn(() => {
2131
- const t = ss(e);
2215
+ ie = new WeakMap(), ve = new WeakMap(), K = new WeakMap(), Ze = new WeakMap(), Dt = new WeakMap(), Lt = new WeakMap(), tn = new WeakMap();
2216
+ function Vi(e) {
2217
+ W === null && pr(), Sn(() => {
2218
+ const t = ns(e);
2132
2219
  if (typeof t == "function") return (
2133
2220
  /** @type {() => void} */
2134
2221
  t
2135
2222
  );
2136
2223
  });
2137
2224
  }
2138
- function ji(e, t, { bubbles: n = !1, cancelable: r = !1 } = {}) {
2225
+ function Yi(e, t, { bubbles: n = !1, cancelable: r = !1 } = {}) {
2139
2226
  return new CustomEvent(e, { detail: t, bubbles: n, cancelable: r });
2140
2227
  }
2141
- function Hi() {
2142
- const e = Y;
2228
+ function qi() {
2229
+ const e = W;
2143
2230
  return e === null && pr(), (t, n, r) => {
2144
2231
  const s = (
2145
2232
  /** @type {Record<string, Function | Function[]>} */
@@ -2149,7 +2236,7 @@ function Hi() {
2149
2236
  ]
2150
2237
  );
2151
2238
  if (s) {
2152
- const i = cr(s) ? s.slice() : [s], o = ji(
2239
+ const i = hr(s) ? s.slice() : [s], o = Yi(
2153
2240
  /** @type {string} */
2154
2241
  t,
2155
2242
  n,
@@ -2162,68 +2249,118 @@ function Hi() {
2162
2249
  return !0;
2163
2250
  };
2164
2251
  }
2165
- function Pt(e, t, n = !1) {
2166
- I && Nn();
2167
- var r = new Pi(e), s = n ? ft : 0;
2168
- function i(o, u) {
2169
- if (I) {
2170
- const c = Js(e);
2171
- var a;
2172
- if (c === Mn ? a = 0 : c === Tn ? a = !1 : a = parseInt(c.substring(1)), o !== a) {
2173
- var f = gr();
2174
- fe(f), r.anchor = f, Ge(!1), r.ensure(o, u), Ge(!0);
2252
+ function kt(e, t, n = !1) {
2253
+ var r;
2254
+ C && (r = E, An());
2255
+ var s = new Wi(e), i = n ? $t : 0;
2256
+ function o(u, a) {
2257
+ if (C) {
2258
+ var f = ei(
2259
+ /** @type {TemplateNode} */
2260
+ r
2261
+ );
2262
+ if (u !== parseInt(f.substring(1))) {
2263
+ var c = gr();
2264
+ fe(c), s.anchor = c, ot(!1), s.ensure(u, a), ot(!0);
2175
2265
  return;
2176
2266
  }
2177
2267
  }
2178
- r.ensure(o, u);
2268
+ s.ensure(u, a);
2179
2269
  }
2180
2270
  Wr(() => {
2181
- var o = !1;
2182
- t((u, a = 0) => {
2183
- o = !0, i(a, u);
2184
- }), o || i(!1, null);
2185
- }, s);
2271
+ var u = !1;
2272
+ t((a, f = 0) => {
2273
+ u = !0, o(f, a);
2274
+ }), u || o(-1, null);
2275
+ }, i);
2276
+ }
2277
+ function as(e, t) {
2278
+ ki(() => {
2279
+ var n = e.getRootNode(), r = (
2280
+ /** @type {ShadowRoot} */
2281
+ n.host ? (
2282
+ /** @type {ShadowRoot} */
2283
+ n
2284
+ ) : (
2285
+ /** @type {Document} */
2286
+ n.head ?? /** @type {Document} */
2287
+ n.ownerDocument.head
2288
+ )
2289
+ );
2290
+ if (!r.querySelector("#" + t.hash)) {
2291
+ const s = On("style");
2292
+ s.id = t.hash, s.textContent = t.code, r.appendChild(s);
2293
+ }
2294
+ });
2295
+ }
2296
+ function us(e) {
2297
+ var t, n, r = "";
2298
+ if (typeof e == "string" || typeof e == "number") r += e;
2299
+ else if (typeof e == "object") if (Array.isArray(e)) {
2300
+ var s = e.length;
2301
+ for (t = 0; t < s; t++) e[t] && (n = us(e[t])) && (r && (r += " "), r += n);
2302
+ } else for (n in e) e[n] && (r && (r += " "), r += n);
2303
+ return r;
2304
+ }
2305
+ function Ui() {
2306
+ for (var e, t, n = 0, r = "", s = arguments.length; n < s; n++) (e = arguments[n]) && (t = us(e)) && (r && (r += " "), r += t);
2307
+ return r;
2186
2308
  }
2187
- function zi(e, t) {
2309
+ function Zt(e) {
2310
+ return typeof e == "object" ? Ui(e) : e ?? "";
2311
+ }
2312
+ function Xi(e, t, n) {
2313
+ var r = e == null ? "" : "" + e;
2314
+ return t && (r = r ? r + " " + t : t), r === "" ? null : r;
2315
+ }
2316
+ function Ki(e, t) {
2188
2317
  return e == null ? null : String(e);
2189
2318
  }
2190
- function or(e, t, n, r) {
2319
+ function Qt(e, t, n, r, s, i) {
2320
+ var o = e.__className;
2321
+ if (C || o !== n || o === void 0) {
2322
+ var u = Xi(n, r);
2323
+ (!C || u !== e.getAttribute("class")) && (u == null ? e.removeAttribute("class") : t ? e.className = u : e.setAttribute("class", u)), e.__className = n;
2324
+ }
2325
+ return i;
2326
+ }
2327
+ function rr(e, t, n, r) {
2191
2328
  var s = e.__style;
2192
- if (I || s !== t) {
2193
- var i = zi(t);
2194
- (!I || i !== e.getAttribute("style")) && (i == null ? e.removeAttribute("style") : e.style.cssText = i), e.__style = t;
2329
+ if (C || s !== t) {
2330
+ var i = Ki(t);
2331
+ (!C || i !== e.getAttribute("style")) && (i == null ? e.removeAttribute("style") : e.style.cssText = i), e.__style = t;
2195
2332
  }
2196
2333
  return r;
2197
2334
  }
2198
- const Vi = /* @__PURE__ */ Symbol("is custom element"), Yi = /* @__PURE__ */ Symbol("is html");
2199
- function Bi(e, t, n, r) {
2200
- var s = Wi(e);
2201
- I && (s[t] = e.getAttribute(t)), s[t] !== (s[t] = n) && (n == null ? e.removeAttribute(t) : typeof n != "string" && qi(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
2335
+ const Gi = /* @__PURE__ */ Symbol("is custom element"), Ji = /* @__PURE__ */ Symbol("is html"), Zi = Fs ? "link" : "LINK";
2336
+ function sr(e, t, n, r) {
2337
+ var s = Qi(e);
2338
+ C && (s[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === Zi) || s[t] !== (s[t] = n) && (t === "loading" && (e[Hs] = n), n == null ? e.removeAttribute(t) : typeof n != "string" && eo(e).includes(t) ? e[t] = n : e.setAttribute(t, n));
2202
2339
  }
2203
- function Wi(e) {
2340
+ function Qi(e) {
2204
2341
  return (
2205
2342
  /** @type {Record<string | symbol, unknown>} **/
2206
2343
  // @ts-expect-error
2207
2344
  e.__attributes ?? (e.__attributes = {
2208
- [Vi]: e.nodeName.includes("-"),
2209
- [Yi]: e.namespaceURI === fr
2345
+ [Gi]: e.nodeName.includes("-"),
2346
+ [Ji]: e.namespaceURI === dr
2210
2347
  })
2211
2348
  );
2212
2349
  }
2213
- var lr = /* @__PURE__ */ new Map();
2214
- function qi(e) {
2215
- var t = e.getAttribute("is") || e.nodeName, n = lr.get(t);
2350
+ var ir = /* @__PURE__ */ new Map();
2351
+ function eo(e) {
2352
+ var t = e.getAttribute("is") || e.nodeName, n = ir.get(t);
2216
2353
  if (n) return n;
2217
- lr.set(t, n = []);
2354
+ ir.set(t, n = []);
2218
2355
  for (var r, s = e, i = Element.prototype; i !== s; ) {
2219
- r = Ts(s);
2356
+ r = Rs(s);
2220
2357
  for (var o in r)
2221
2358
  r[o].set && n.push(o);
2222
- s = dr(s);
2359
+ s = vr(s);
2223
2360
  }
2224
2361
  return n;
2225
2362
  }
2226
- function vn(e, t, n, r) {
2363
+ function ge(e, t, n, r) {
2227
2364
  var s = (
2228
2365
  /** @type {V} */
2229
2366
  r
@@ -2233,32 +2370,32 @@ function vn(e, t, n, r) {
2233
2370
  e[t], u === void 0 && r !== void 0 && (u = o());
2234
2371
  var a;
2235
2372
  a = () => {
2236
- var d = (
2373
+ var v = (
2237
2374
  /** @type {V} */
2238
2375
  e[t]
2239
2376
  );
2240
- return d === void 0 ? o() : (i = !0, d);
2377
+ return v === void 0 ? o() : (i = !0, v);
2241
2378
  };
2242
- var f = !1, c = /* @__PURE__ */ Dn(() => (f = !1, a())), v = (
2379
+ var f = !1, c = /* @__PURE__ */ Rn(() => (f = !1, a())), h = (
2243
2380
  /** @type {Effect} */
2244
2381
  y
2245
2382
  );
2246
2383
  return (
2247
2384
  /** @type {() => V} */
2248
- (function(d, g) {
2385
+ (function(v, g) {
2249
2386
  if (arguments.length > 0) {
2250
- const _ = g ? m(c) : d;
2251
- return $(c, _), f = !0, s !== void 0 && (s = _), d;
2387
+ const d = g ? x(c) : v;
2388
+ return A(c, d), f = !0, s !== void 0 && (s = d), v;
2252
2389
  }
2253
- return Ne && f || (v.f & $e) !== 0 ? c.v : m(c);
2390
+ return je && f || (h.f & ke) !== 0 ? c.v : x(c);
2254
2391
  })
2255
2392
  );
2256
2393
  }
2257
- function Ui(e) {
2258
- return new Xi(e);
2394
+ function to(e) {
2395
+ return new no(e);
2259
2396
  }
2260
- var ye, J;
2261
- class Xi {
2397
+ var Ie, Z;
2398
+ class no {
2262
2399
  /**
2263
2400
  * @param {ComponentConstructorOptions & {
2264
2401
  * component: any;
@@ -2266,56 +2403,57 @@ class Xi {
2266
2403
  */
2267
2404
  constructor(t) {
2268
2405
  /** @type {any} */
2269
- w(this, ye);
2406
+ w(this, Ie);
2270
2407
  /** @type {Record<string, any>} */
2271
- w(this, J);
2408
+ w(this, Z);
2272
2409
  var n = /* @__PURE__ */ new Map(), r = (i, o) => {
2273
- var u = /* @__PURE__ */ hi(o, !1, !1);
2410
+ var u = /* @__PURE__ */ wi(o, !1, !1);
2274
2411
  return n.set(i, u), u;
2275
2412
  };
2276
2413
  const s = new Proxy(
2277
2414
  { ...t.props || {}, $$events: {} },
2278
2415
  {
2279
2416
  get(i, o) {
2280
- return m(n.get(o) ?? r(o, Reflect.get(i, o)));
2417
+ return x(n.get(o) ?? r(o, Reflect.get(i, o)));
2281
2418
  },
2282
2419
  has(i, o) {
2283
- return o === Ls ? !0 : (m(n.get(o) ?? r(o, Reflect.get(i, o))), Reflect.has(i, o));
2420
+ return o === js ? !0 : (x(n.get(o) ?? r(o, Reflect.get(i, o))), Reflect.has(i, o));
2284
2421
  },
2285
2422
  set(i, o, u) {
2286
- return $(n.get(o) ?? r(o, u), u), Reflect.set(i, o, u);
2423
+ return A(n.get(o) ?? r(o, u), u), Reflect.set(i, o, u);
2287
2424
  }
2288
2425
  }
2289
2426
  );
2290
- p(this, J, (t.hydrate ? Di : us)(t.component, {
2427
+ m(this, Z, (t.hydrate ? Fi : os)(t.component, {
2291
2428
  target: t.target,
2292
2429
  anchor: t.anchor,
2293
2430
  props: s,
2294
2431
  context: t.context,
2295
2432
  intro: t.intro ?? !1,
2296
- recover: t.recover
2297
- })), (!t?.props?.$$host || t.sync === !1) && Ft(), p(this, ye, s.$$events);
2298
- for (const i of Object.keys(l(this, J)))
2299
- i === "$set" || i === "$destroy" || i === "$on" || Yt(this, i, {
2433
+ recover: t.recover,
2434
+ transformError: t.transformError
2435
+ })), (!t?.props?.$$host || t.sync === !1) && le(), m(this, Ie, s.$$events);
2436
+ for (const i of Object.keys(l(this, Z)))
2437
+ i === "$set" || i === "$destroy" || i === "$on" || Kt(this, i, {
2300
2438
  get() {
2301
- return l(this, J)[i];
2439
+ return l(this, Z)[i];
2302
2440
  },
2303
2441
  /** @param {any} value */
2304
2442
  set(o) {
2305
- l(this, J)[i] = o;
2443
+ l(this, Z)[i] = o;
2306
2444
  },
2307
2445
  enumerable: !0
2308
2446
  });
2309
- l(this, J).$set = /** @param {Record<string, any>} next */
2447
+ l(this, Z).$set = /** @param {Record<string, any>} next */
2310
2448
  (i) => {
2311
2449
  Object.assign(s, i);
2312
- }, l(this, J).$destroy = () => {
2313
- Li(l(this, J));
2450
+ }, l(this, Z).$destroy = () => {
2451
+ Bi(l(this, Z));
2314
2452
  };
2315
2453
  }
2316
2454
  /** @param {Record<string, any>} props */
2317
2455
  $set(t) {
2318
- l(this, J).$set(t);
2456
+ l(this, Z).$set(t);
2319
2457
  }
2320
2458
  /**
2321
2459
  * @param {string} event
@@ -2323,20 +2461,20 @@ class Xi {
2323
2461
  * @returns {any}
2324
2462
  */
2325
2463
  $on(t, n) {
2326
- l(this, ye)[t] = l(this, ye)[t] || [];
2464
+ l(this, Ie)[t] = l(this, Ie)[t] || [];
2327
2465
  const r = (...s) => n.call(this, ...s);
2328
- return l(this, ye)[t].push(r), () => {
2329
- l(this, ye)[t] = l(this, ye)[t].filter(
2466
+ return l(this, Ie)[t].push(r), () => {
2467
+ l(this, Ie)[t] = l(this, Ie)[t].filter(
2330
2468
  /** @param {any} fn */
2331
2469
  (s) => s !== r
2332
2470
  );
2333
2471
  };
2334
2472
  }
2335
2473
  $destroy() {
2336
- l(this, J).$destroy();
2474
+ l(this, Z).$destroy();
2337
2475
  }
2338
2476
  }
2339
- ye = new WeakMap(), J = new WeakMap();
2477
+ Ie = new WeakMap(), Z = new WeakMap();
2340
2478
  let fs;
2341
2479
  typeof HTMLElement == "function" && (fs = class extends HTMLElement {
2342
2480
  /**
@@ -2347,27 +2485,27 @@ typeof HTMLElement == "function" && (fs = class extends HTMLElement {
2347
2485
  constructor(t, n, r) {
2348
2486
  super();
2349
2487
  /** The Svelte component constructor */
2350
- A(this, "$$ctor");
2488
+ I(this, "$$ctor");
2351
2489
  /** Slots */
2352
- A(this, "$$s");
2490
+ I(this, "$$s");
2353
2491
  /** @type {any} The Svelte component instance */
2354
- A(this, "$$c");
2492
+ I(this, "$$c");
2355
2493
  /** Whether or not the custom element is connected */
2356
- A(this, "$$cn", !1);
2494
+ I(this, "$$cn", !1);
2357
2495
  /** @type {Record<string, any>} Component props data */
2358
- A(this, "$$d", {});
2496
+ I(this, "$$d", {});
2359
2497
  /** `true` if currently in the process of reflecting component props back to attributes */
2360
- A(this, "$$r", !1);
2498
+ I(this, "$$r", !1);
2361
2499
  /** @type {Record<string, CustomElementPropDefinition>} Props definition (name, reflected, type etc) */
2362
- A(this, "$$p_d", {});
2500
+ I(this, "$$p_d", {});
2363
2501
  /** @type {Record<string, EventListenerOrEventListenerObject[]>} Event listeners */
2364
- A(this, "$$l", {});
2502
+ I(this, "$$l", {});
2365
2503
  /** @type {Map<EventListenerOrEventListenerObject, Function>} Event listener unsubscribe functions */
2366
- A(this, "$$l_u", /* @__PURE__ */ new Map());
2504
+ I(this, "$$l_u", /* @__PURE__ */ new Map());
2367
2505
  /** @type {any} The managed render effect for reflecting attributes */
2368
- A(this, "$$me");
2506
+ I(this, "$$me");
2369
2507
  /** @type {ShadowRoot | null} The ShadowRoot of the custom element */
2370
- A(this, "$$shadowRoot", null);
2508
+ I(this, "$$shadowRoot", null);
2371
2509
  this.$$ctor = t, this.$$s = n, r && (this.$$shadowRoot = this.attachShadow(r));
2372
2510
  }
2373
2511
  /**
@@ -2397,22 +2535,22 @@ typeof HTMLElement == "function" && (fs = class extends HTMLElement {
2397
2535
  if (this.$$cn = !0, !this.$$c) {
2398
2536
  let t = function(s) {
2399
2537
  return (i) => {
2400
- const o = Hr("slot");
2538
+ const o = On("slot");
2401
2539
  s !== "default" && (o.name = s), _e(i, o);
2402
2540
  };
2403
2541
  };
2404
2542
  if (await Promise.resolve(), !this.$$cn || this.$$c)
2405
2543
  return;
2406
- const n = {}, r = Ji(this);
2544
+ const n = {}, r = ro(this);
2407
2545
  for (const s of this.$$s)
2408
2546
  s in r && (s === "default" && !this.$$d.children ? (this.$$d.children = t(s), n.default = !0) : n[s] = t(s));
2409
2547
  for (const s of this.attributes) {
2410
2548
  const i = this.$$g_p(s.name);
2411
- i in this.$$d || (this.$$d[i] = zt(i, s.value, this.$$p_d, "toProp"));
2549
+ i in this.$$d || (this.$$d[i] = Ut(i, s.value, this.$$p_d, "toProp"));
2412
2550
  }
2413
2551
  for (const s in this.$$p_d)
2414
2552
  !(s in this.$$d) && this[s] !== void 0 && (this.$$d[s] = this[s], delete this[s]);
2415
- this.$$c = Ui({
2553
+ this.$$c = to({
2416
2554
  component: this.$$ctor,
2417
2555
  target: this.$$shadowRoot || this,
2418
2556
  props: {
@@ -2420,13 +2558,13 @@ typeof HTMLElement == "function" && (fs = class extends HTMLElement {
2420
2558
  $$slots: n,
2421
2559
  $$host: this
2422
2560
  }
2423
- }), this.$$me = bi(() => {
2561
+ }), this.$$me = Ci(() => {
2424
2562
  Br(() => {
2425
2563
  this.$$r = !0;
2426
- for (const s of Vt(this.$$c)) {
2564
+ for (const s of Xt(this.$$c)) {
2427
2565
  if (!this.$$p_d[s]?.reflect) continue;
2428
2566
  this.$$d[s] = this.$$c[s];
2429
- const i = zt(
2567
+ const i = Ut(
2430
2568
  s,
2431
2569
  this.$$d[s],
2432
2570
  this.$$p_d,
@@ -2453,7 +2591,7 @@ typeof HTMLElement == "function" && (fs = class extends HTMLElement {
2453
2591
  * @param {string} newValue
2454
2592
  */
2455
2593
  attributeChangedCallback(t, n, r) {
2456
- this.$$r || (t = this.$$g_p(t), this.$$d[t] = zt(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
2594
+ this.$$r || (t = this.$$g_p(t), this.$$d[t] = Ut(t, r, this.$$p_d, "toProp"), this.$$c?.$set({ [t]: this.$$d[t] }));
2457
2595
  }
2458
2596
  disconnectedCallback() {
2459
2597
  this.$$cn = !1, Promise.resolve().then(() => {
@@ -2464,12 +2602,12 @@ typeof HTMLElement == "function" && (fs = class extends HTMLElement {
2464
2602
  * @param {string} attribute_name
2465
2603
  */
2466
2604
  $$g_p(t) {
2467
- return Vt(this.$$p_d).find(
2605
+ return Xt(this.$$p_d).find(
2468
2606
  (n) => this.$$p_d[n].attribute === t || !this.$$p_d[n].attribute && n.toLowerCase() === t
2469
2607
  ) || t;
2470
2608
  }
2471
2609
  });
2472
- function zt(e, t, n, r) {
2610
+ function Ut(e, t, n, r) {
2473
2611
  const s = n[e]?.type;
2474
2612
  if (t = s === "Boolean" && typeof t != "boolean" ? t != null : t, !r || !n[e])
2475
2613
  return t;
@@ -2499,7 +2637,7 @@ function zt(e, t, n, r) {
2499
2637
  return t;
2500
2638
  }
2501
2639
  }
2502
- function Ji(e) {
2640
+ function ro(e) {
2503
2641
  const t = {};
2504
2642
  return e.childNodes.forEach((n) => {
2505
2643
  t[
@@ -2508,33 +2646,33 @@ function Ji(e) {
2508
2646
  ] = !0;
2509
2647
  }), t;
2510
2648
  }
2511
- function Ki(e, t, n, r, s, i) {
2649
+ function jn(e, t, n, r, s, i) {
2512
2650
  let o = class extends fs {
2513
2651
  constructor() {
2514
2652
  super(e, n, s), this.$$p_d = t;
2515
2653
  }
2516
2654
  static get observedAttributes() {
2517
- return Vt(t).map(
2655
+ return Xt(t).map(
2518
2656
  (u) => (t[u].attribute || u).toLowerCase()
2519
2657
  );
2520
2658
  }
2521
2659
  };
2522
- return Vt(t).forEach((u) => {
2523
- Yt(o.prototype, u, {
2660
+ return Xt(t).forEach((u) => {
2661
+ Kt(o.prototype, u, {
2524
2662
  get() {
2525
2663
  return this.$$c && u in this.$$c ? this.$$c[u] : this.$$d[u];
2526
2664
  },
2527
2665
  set(a) {
2528
- a = zt(u, a, t), this.$$d[u] = a;
2666
+ a = Ut(u, a, t), this.$$d[u] = a;
2529
2667
  var f = this.$$c;
2530
2668
  if (f) {
2531
- var c = Qe(f, u)?.get;
2669
+ var c = at(f, u)?.get;
2532
2670
  c ? f[u] = a : f.$set({ [u]: a });
2533
2671
  }
2534
2672
  }
2535
2673
  });
2536
2674
  }), r.forEach((u) => {
2537
- Yt(o.prototype, u, {
2675
+ Kt(o.prototype, u, {
2538
2676
  get() {
2539
2677
  return this.$$c?.[u];
2540
2678
  }
@@ -2542,68 +2680,275 @@ function Ki(e, t, n, r, s, i) {
2542
2680
  }), e.element = /** @type {any} */
2543
2681
  o, o;
2544
2682
  }
2545
- var Gi = /* @__PURE__ */ ls('<svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-xs" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path></svg>'), Zi = /* @__PURE__ */ ls('<svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-xs" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>'), Qi = /* @__PURE__ */ pt('<div class="pie-section-player-tools-session-debugger__alert pie-section-player-tools-session-debugger__alert--warning"><svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-md" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01M5.07 19h13.86c1.54 0 2.5-1.67 1.73-3L13.73 4c-.77-1.33-2.69-1.33-3.46 0L3.34 16c-.77 1.33.19 3 1.73 3z"></path></svg> <span class="pie-section-player-tools-session-debugger__text-xs">Section controller not available for this section yet.</span></div>'), eo = /* @__PURE__ */ pt('<div class="pie-section-player-tools-session-debugger__alert pie-section-player-tools-session-debugger__alert--info"><svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-md" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span class="pie-section-player-tools-session-debugger__text-xs">No section session data yet. Interact with the questions to see updates.</span></div>'), to = /* @__PURE__ */ pt('<div class="pie-section-player-tools-session-debugger__card"><div class="pie-section-player-tools-session-debugger__card-title">Item Sessions Snapshot</div> <pre class="pie-section-player-tools-session-debugger__card-pre"> </pre></div>'), no = /* @__PURE__ */ pt('<div class="pie-section-player-tools-session-debugger__content-shell"><div class="pie-section-player-tools-session-debugger__content"><div class="pie-section-player-tools-session-debugger__section-intro"><div class="pie-section-player-tools-session-debugger__heading">PIE Session Data (Persistent)</div></div> <!></div></div>'), ro = /* @__PURE__ */ pt('<div class="pie-section-player-tools-session-debugger__resize-handle" role="button" tabindex="0" title="Resize window"><svg class="pie-section-player-tools-session-debugger__resize-icon" viewBox="0 0 16 16" fill="currentColor"><path d="M16 16V14H14V16H16Z"></path><path d="M16 11V9H14V11H16Z"></path><path d="M13 16V14H11V16H13Z"></path></svg></div>'), so = /* @__PURE__ */ pt('<div class="pie-section-player-tools-session-debugger"><div class="pie-section-player-tools-session-debugger__header" role="button" tabindex="0" aria-label="Drag session panel"><div class="pie-section-player-tools-session-debugger__header-title"><svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-sm" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg> <h3 class="pie-section-player-tools-session-debugger__title">Session Data</h3></div> <div class="pie-section-player-tools-session-debugger__header-actions"><button class="pie-section-player-tools-session-debugger__icon-button"><!></button> <button class="pie-section-player-tools-session-debugger__icon-button" title="Close"><svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-xs" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button></div></div> <!> <!></div>');
2546
- function io(e, t) {
2547
- wr(t, !0);
2548
- const n = Hi();
2549
- let r = vn(t, "toolkitCoordinator", 7, null), s = vn(t, "sectionId", 7, ""), i = vn(t, "attemptId", 7, void 0), o = /* @__PURE__ */ D(!1), u = /* @__PURE__ */ D(24), a = /* @__PURE__ */ D(100), f = /* @__PURE__ */ D(220), c = /* @__PURE__ */ D(600), v = /* @__PURE__ */ D(!1), d = /* @__PURE__ */ D(!1), g = 0, _ = 0, T = 0, E = 0, ke = 0, se = 0, Hn = 0, zn = 0, Tt = /* @__PURE__ */ D(Ze({
2683
+ var so = /* @__PURE__ */ rt('<div role="button" tabindex="0" title="Resize window"><svg viewBox="0 0 16 16" fill="currentColor"><path d="M16 16V14H14V16H16Z"></path><path d="M16 11V9H14V11H16Z"></path><path d="M13 16V14H11V16H13Z"></path></svg></div>');
2684
+ function cs(e, t) {
2685
+ on(t, !0);
2686
+ let n = ge(t, "onPointerDown"), r = ge(t, "handleClass", 7, "absolute bottom-0 right-0 w-4 h-4 cursor-se-resize"), s = ge(t, "iconClass", 7, "w-full h-full text-base-content/30");
2687
+ var i = {
2688
+ get onPointerDown() {
2689
+ return n();
2690
+ },
2691
+ set onPointerDown(a) {
2692
+ n(a), le();
2693
+ },
2694
+ get handleClass() {
2695
+ return r();
2696
+ },
2697
+ set handleClass(a = "absolute bottom-0 right-0 w-4 h-4 cursor-se-resize") {
2698
+ r(a), le();
2699
+ },
2700
+ get iconClass() {
2701
+ return s();
2702
+ },
2703
+ set iconClass(a = "w-full h-full text-base-content/30") {
2704
+ s(a), le();
2705
+ }
2706
+ }, o = so(), u = xe(o);
2707
+ return ye(o), Mt(() => {
2708
+ Qt(o, 1, Zt(r())), Qt(u, 0, Zt(s()));
2709
+ }), Jt("mousedown", o, function(...a) {
2710
+ n()?.apply(this, a);
2711
+ }), _e(e, o), ln(i);
2712
+ }
2713
+ zn(["mousedown"]);
2714
+ jn(cs, { onPointerDown: {}, handleClass: {}, iconClass: {} }, [], [], { mode: "open" });
2715
+ var io = /* @__PURE__ */ is('<svg xmlns="http://www.w3.org/2000/svg" class="pie-window-controls__icon svelte-dx0z4a" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 15l7-7 7 7"></path></svg>'), oo = /* @__PURE__ */ is('<svg xmlns="http://www.w3.org/2000/svg" class="pie-window-controls__icon svelte-dx0z4a" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg>'), lo = /* @__PURE__ */ rt('<button><!></button> <button title="Close" aria-label="Close panel"><svg xmlns="http://www.w3.org/2000/svg" class="pie-window-controls__icon svelte-dx0z4a" width="12" height="12" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path></svg></button>', 1);
2716
+ const ao = {
2717
+ hash: "svelte-dx0z4a",
2718
+ code: ".pie-window-controls__button.svelte-dx0z4a {display:inline-flex;align-items:center;justify-content:center;width:1.35rem;height:1.35rem;padding:0;border:1px solid rgba(148, 163, 184, 0.7);border-radius:9999px;background:rgba(255, 255, 255, 0.65);color:#334155;cursor:pointer;}.pie-window-controls__button.svelte-dx0z4a:hover {background:rgba(241, 245, 249, 0.95);}.pie-window-controls__button.svelte-dx0z4a:focus-visible {outline:2px solid #3b82f6;outline-offset:1px;}.pie-window-controls__icon.svelte-dx0z4a {display:block;}"
2719
+ };
2720
+ function ds(e, t) {
2721
+ on(t, !0), as(e, ao);
2722
+ let n = ge(t, "minimized", 7, !1), r = ge(t, "onToggle"), s = ge(t, "onClose"), i = ge(t, "buttonClass", 7, "");
2723
+ const o = /* @__PURE__ */ Mr(() => (i() || "").trim() || "pie-window-controls__button");
2724
+ var u = {
2725
+ get minimized() {
2726
+ return n();
2727
+ },
2728
+ set minimized(d = !1) {
2729
+ n(d), le();
2730
+ },
2731
+ get onToggle() {
2732
+ return r();
2733
+ },
2734
+ set onToggle(d) {
2735
+ r(d), le();
2736
+ },
2737
+ get onClose() {
2738
+ return s();
2739
+ },
2740
+ set onClose(d) {
2741
+ s(d), le();
2742
+ },
2743
+ get buttonClass() {
2744
+ return i();
2745
+ },
2746
+ set buttonClass(d = "") {
2747
+ i(d), le();
2748
+ }
2749
+ }, a = lo(), f = jr(a), c = xe(f);
2750
+ {
2751
+ var h = (d) => {
2752
+ var $ = io();
2753
+ _e(d, $);
2754
+ }, v = (d) => {
2755
+ var $ = oo();
2756
+ _e(d, $);
2757
+ };
2758
+ kt(c, (d) => {
2759
+ n() ? d(h) : d(v, -1);
2760
+ });
2761
+ }
2762
+ ye(f);
2763
+ var g = Ve(f, 2);
2764
+ return Mt(() => {
2765
+ Qt(f, 1, Zt(x(o)), "svelte-dx0z4a"), sr(f, "title", n() ? "Maximize" : "Minimize"), sr(f, "aria-label", n() ? "Maximize panel" : "Minimize panel"), Qt(g, 1, Zt(x(o)), "svelte-dx0z4a");
2766
+ }), Jt("click", f, function(...d) {
2767
+ r()?.apply(this, d);
2768
+ }), Jt("click", g, function(...d) {
2769
+ s()?.apply(this, d);
2770
+ }), _e(e, a), ln(u);
2771
+ }
2772
+ zn(["click"]);
2773
+ jn(ds, { minimized: {}, onToggle: {}, onClose: {}, buttonClass: {} }, [], [], { mode: "open" });
2774
+ var uo = Object.defineProperty, fo = (e, t, n) => t in e ? uo(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, or = (e, t, n) => fo(e, typeof t != "symbol" ? t + "" : t, n), lr;
2775
+ typeof window < "u" && ((lr = window.__svelte ?? (window.__svelte = {})).v ?? (lr.v = /* @__PURE__ */ new Set())).add("5");
2776
+ new class extends Error {
2777
+ constructor() {
2778
+ super(...arguments), or(this, "name", "StaleReactionError"), or(this, "message", "The reaction that called `getAbortSignal()` was re-run or destroyed");
2779
+ }
2780
+ }();
2781
+ const co = /* @__PURE__ */ new Set(), ho = /* @__PURE__ */ new Set();
2782
+ function hs(e) {
2783
+ for (var t = 0; t < e.length; t++)
2784
+ co.add(e[t]);
2785
+ for (var n of ho)
2786
+ n(e);
2787
+ }
2788
+ hs(["click"]);
2789
+ hs(["mousedown"]);
2790
+ function vo(e, t) {
2791
+ const n = (f, c, h) => Math.max(c, Math.min(f, h)), r = n(
2792
+ Math.round(e.width * t.widthRatio),
2793
+ t.minWidth,
2794
+ t.maxWidth
2795
+ ), s = n(
2796
+ Math.round(e.height * t.heightRatio),
2797
+ t.minHeight,
2798
+ t.maxHeight
2799
+ ), i = t.paddingX ?? 16, o = t.paddingY, u = i, a = Math.max(o, Math.round((e.height - s) / 2));
2800
+ return { x: u, y: a, width: r, height: s };
2801
+ }
2802
+ function _o(e) {
2803
+ const t = e.padding ?? 0;
2804
+ let n = !1, r = !1, s = 0, i = 0, o = 0, u = 0, a = 0, f = 0, c = 0, h = 0;
2805
+ const v = (_) => {
2806
+ if (!n) return;
2807
+ const S = e.getState(), Y = _.clientX - s, G = _.clientY - i, Be = Math.max(t, window.innerWidth - S.width - t), st = Math.max(t, window.innerHeight - 100 - t);
2808
+ e.setState({
2809
+ ...S,
2810
+ x: Math.max(t, Math.min(o + Y, Be)),
2811
+ y: Math.max(t, Math.min(u + G, st))
2812
+ });
2813
+ }, g = (_) => {
2814
+ if (!r) return;
2815
+ const S = e.getState(), Y = _.clientX - a, G = _.clientY - f, Be = Math.max(
2816
+ e.minWidth,
2817
+ window.innerWidth - S.x - t
2818
+ ), st = Math.max(
2819
+ e.minHeight,
2820
+ window.innerHeight - S.y - t
2821
+ );
2822
+ e.setState({
2823
+ ...S,
2824
+ width: Math.max(
2825
+ e.minWidth,
2826
+ Math.min(c + Y, Be)
2827
+ ),
2828
+ height: Math.max(
2829
+ e.minHeight,
2830
+ Math.min(h + G, st)
2831
+ )
2832
+ });
2833
+ }, d = () => {
2834
+ n = !1, document.removeEventListener("mousemove", v), document.removeEventListener("mouseup", d);
2835
+ }, $ = () => {
2836
+ r = !1, document.removeEventListener("mousemove", g), document.removeEventListener("mouseup", $);
2837
+ };
2838
+ return {
2839
+ startDrag(_) {
2840
+ n = !0, s = _.clientX, i = _.clientY;
2841
+ const S = e.getState();
2842
+ o = S.x, u = S.y, document.addEventListener("mousemove", v), document.addEventListener("mouseup", d);
2843
+ },
2844
+ startResize(_) {
2845
+ r = !0, a = _.clientX, f = _.clientY;
2846
+ const S = e.getState();
2847
+ c = S.width, h = S.height, document.addEventListener("mousemove", g), document.addEventListener("mouseup", $), _.preventDefault(), _.stopPropagation();
2848
+ },
2849
+ stop() {
2850
+ d(), $();
2851
+ }
2852
+ };
2853
+ }
2854
+ function po(e, t) {
2855
+ return (e || void 0) === (t || void 0);
2856
+ }
2857
+ function go(e, t, n) {
2858
+ const r = e?.key?.sectionId || "", s = e?.key?.attemptId || void 0;
2859
+ return r !== t ? !1 : po(s, n);
2860
+ }
2861
+ function mo(e, t, n) {
2862
+ return !e?.getSectionController || !t ? null : e.getSectionController({
2863
+ sectionId: t,
2864
+ attemptId: n
2865
+ }) || null;
2866
+ }
2867
+ var wo = /* @__PURE__ */ rt('<div class="pie-section-player-tools-session-debugger__alert pie-section-player-tools-session-debugger__alert--warning"><svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-md" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01M5.07 19h13.86c1.54 0 2.5-1.67 1.73-3L13.73 4c-.77-1.33-2.69-1.33-3.46 0L3.34 16c-.77 1.33.19 3 1.73 3z"></path></svg> <span class="pie-section-player-tools-session-debugger__text-xs">Section controller not available for this section yet.</span></div>'), bo = /* @__PURE__ */ rt('<div class="pie-section-player-tools-session-debugger__alert pie-section-player-tools-session-debugger__alert--info"><svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-md" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg> <span class="pie-section-player-tools-session-debugger__text-xs">No section session data yet. Interact with the questions to see updates.</span></div>'), yo = /* @__PURE__ */ rt('<!> <div class="pie-section-player-tools-session-debugger__card"><div class="pie-section-player-tools-session-debugger__card-title">Item Sessions Snapshot</div> <pre class="pie-section-player-tools-session-debugger__card-pre"> </pre></div>', 1), $o = /* @__PURE__ */ rt('<div class="pie-section-player-tools-session-debugger__content-shell svelte-10oyp9b"><div class="pie-section-player-tools-session-debugger__content"><div class="pie-section-player-tools-session-debugger__section-intro"><div class="pie-section-player-tools-session-debugger__heading">PIE Session Data (Persistent)</div></div> <!></div></div>'), xo = /* @__PURE__ */ rt('<div class="pie-section-player-tools-session-debugger svelte-10oyp9b"><div class="pie-section-player-tools-session-debugger__header svelte-10oyp9b" role="button" tabindex="0" aria-label="Drag session panel"><div class="pie-section-player-tools-session-debugger__header-title svelte-10oyp9b"><svg xmlns="http://www.w3.org/2000/svg" class="pie-section-player-tools-session-debugger__icon-sm svelte-10oyp9b" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"></path></svg> <h3 class="pie-section-player-tools-session-debugger__title svelte-10oyp9b">Session Data</h3></div> <div class="pie-section-player-tools-session-debugger__header-actions svelte-10oyp9b"><!></div></div> <!> <!></div>');
2868
+ const Eo = {
2869
+ hash: "svelte-10oyp9b",
2870
+ code: ".pie-section-player-tools-session-debugger.svelte-10oyp9b {position:fixed;z-index:9999;background:var(--color-base-100, #fff);color:var(--color-base-content, #1f2937);border:2px solid var(--color-base-300, #d1d5db);border-radius:8px;box-shadow:0 25px 50px -12px rgba(0, 0, 0, 0.25);overflow:hidden;font-family:var(--pie-font-family, Inter, system-ui, sans-serif);}.pie-section-player-tools-session-debugger__header.svelte-10oyp9b {padding:8px 16px;display:flex;align-items:center;justify-content:space-between;background:var(--color-base-200, #f3f4f6);cursor:move;user-select:none;border-bottom:1px solid var(--color-base-300, #d1d5db);}.pie-section-player-tools-session-debugger__header-title.svelte-10oyp9b {display:flex;align-items:center;gap:8px;}.pie-section-player-tools-session-debugger__icon-sm.svelte-10oyp9b {width:1rem;height:1rem;}.pie-section-player-tools-session-debugger__title.svelte-10oyp9b {margin:0;font-size:0.95rem;font-weight:700;}.pie-section-player-tools-session-debugger__header-actions.svelte-10oyp9b {display:flex;gap:4px;}.pie-section-player-tools-session-debugger__content-shell.svelte-10oyp9b {display:flex;flex-direction:column;min-height:0;}"
2871
+ };
2872
+ function So(e, t) {
2873
+ on(t, !0), as(e, Eo);
2874
+ const n = qi();
2875
+ let r = ge(t, "toolkitCoordinator", 7, null), s = ge(t, "sectionId", 7, ""), i = ge(t, "attemptId", 7, void 0), o = /* @__PURE__ */ z(!1), u = /* @__PURE__ */ z(24), a = /* @__PURE__ */ z(100), f = /* @__PURE__ */ z(220), c = /* @__PURE__ */ z(600), h = /* @__PURE__ */ z(lt({
2550
2876
  currentItemIndex: null,
2551
2877
  currentItemId: null,
2552
2878
  visitedItemIdentifiers: [],
2879
+ loadingComplete: !1,
2880
+ totalRegistered: 0,
2881
+ totalLoaded: 0,
2882
+ itemsComplete: !1,
2883
+ completedCount: 0,
2884
+ totalItems: 0,
2553
2885
  updatedAt: null,
2554
2886
  lastChangedItemId: null,
2555
2887
  itemSessions: {}
2556
- })), Zt = null, Qt = null, en = null, tn = /* @__PURE__ */ D(!1), nn = !1;
2557
- function Vn(h) {
2888
+ })), v = null, g = null, d = /* @__PURE__ */ z(!1), $ = !1;
2889
+ const _ = { controller: null, sectionId: "", attemptId: void 0 };
2890
+ function S(p) {
2558
2891
  try {
2559
- return structuredClone(h);
2892
+ return structuredClone(p);
2560
2893
  } catch {
2561
2894
  try {
2562
- return JSON.parse(JSON.stringify(h));
2895
+ return JSON.parse(JSON.stringify(p));
2563
2896
  } catch {
2564
- return h;
2897
+ return p;
2565
2898
  }
2566
2899
  }
2567
2900
  }
2568
- function Yn() {
2569
- if (!(!r() || !s()))
2570
- return r().getSectionController?.({ sectionId: s(), attemptId: i() });
2901
+ function Y() {
2902
+ return mo(r(), s(), i()) || void 0;
2571
2903
  }
2572
- function Ct(h, S) {
2573
- const R = S || Yn(), N = R?.getCurrentSectionAttemptSlice?.() || null;
2574
- $(tn, !!R, !0), $(
2575
- Tt,
2904
+ function G(p, re) {
2905
+ const We = re || Y(), N = We?.getRuntimeState?.() || null, fn = We?.getSessionState?.() || null;
2906
+ A(d, !!We, !0), A(
2907
+ h,
2576
2908
  {
2577
2909
  currentItemIndex: typeof N?.currentItemIndex == "number" && N.currentItemIndex >= 0 ? N.currentItemIndex : null,
2578
2910
  currentItemId: typeof N?.currentItemId == "string" && N.currentItemId ? N.currentItemId : null,
2579
- visitedItemIdentifiers: Vn(N?.visitedItemIdentifiers || []),
2580
- updatedAt: h?.updatedAt || Date.now(),
2581
- lastChangedItemId: h?.itemId || null,
2582
- itemSessions: Vn(N?.itemSessions || {})
2911
+ visitedItemIdentifiers: S(N?.visitedItemIdentifiers || []),
2912
+ loadingComplete: N?.loadingComplete === !0,
2913
+ totalRegistered: typeof N?.totalRegistered == "number" ? N.totalRegistered : 0,
2914
+ totalLoaded: typeof N?.totalLoaded == "number" ? N.totalLoaded : 0,
2915
+ itemsComplete: N?.itemsComplete === !0,
2916
+ completedCount: typeof N?.completedCount == "number" ? N.completedCount : 0,
2917
+ totalItems: typeof N?.totalItems == "number" ? N.totalItems : 0,
2918
+ updatedAt: p?.updatedAt || Date.now(),
2919
+ lastChangedItemId: p?.itemId || null,
2920
+ itemSessions: S(N?.itemSessions || fn?.itemSessions || {})
2583
2921
  },
2584
2922
  !0
2585
2923
  );
2586
2924
  }
2587
- function Bn(h) {
2588
- nn || (nn = !0, queueMicrotask(() => {
2589
- nn = !1, sn(), Ct(h || { updatedAt: Date.now() });
2590
- }));
2925
+ function Be() {
2926
+ v?.(), v = null, _.controller = null, _.sectionId = "", _.attemptId = void 0;
2591
2927
  }
2592
- function rn() {
2593
- Qt?.(), Qt = null, Zt = null;
2928
+ function st() {
2929
+ g?.(), g = null;
2594
2930
  }
2595
- function Wn() {
2596
- en?.(), en = null;
2931
+ function vs(p) {
2932
+ G({
2933
+ itemId: p?.itemId,
2934
+ updatedAt: p?.timestamp || Date.now()
2935
+ });
2597
2936
  }
2598
- function sn() {
2599
- const h = Yn() || null;
2600
- if (!h) {
2601
- rn(), $(tn, !1), $(
2602
- Tt,
2937
+ function Fn() {
2938
+ const p = Y() || null;
2939
+ if (!p) {
2940
+ Be(), A(d, !1), A(
2941
+ h,
2603
2942
  {
2604
2943
  currentItemIndex: null,
2605
2944
  currentItemId: null,
2606
2945
  visitedItemIdentifiers: [],
2946
+ loadingComplete: !1,
2947
+ totalRegistered: 0,
2948
+ totalLoaded: 0,
2949
+ itemsComplete: !1,
2950
+ completedCount: 0,
2951
+ totalItems: 0,
2607
2952
  updatedAt: Date.now(),
2608
2953
  lastChangedItemId: null,
2609
2954
  itemSessions: {}
@@ -2612,149 +2957,141 @@ function io(e, t) {
2612
2957
  );
2613
2958
  return;
2614
2959
  }
2615
- if (h === Zt) return;
2616
- rn(), Zt = h, Qt = (typeof h.subscribe == "function" ? h.subscribe.bind(h) : null)?.((R) => {
2617
- Ct(
2618
- {
2619
- itemId: R?.itemId,
2620
- updatedAt: R?.timestamp || Date.now()
2621
- },
2622
- h
2623
- );
2624
- }) || null, Ct(void 0, h);
2625
- }
2626
- function cs() {
2627
- Bn({ updatedAt: Date.now() });
2960
+ const re = i() || void 0;
2961
+ if (_.controller === p && _.sectionId === s() && _.attemptId === re && v) {
2962
+ G(void 0, p);
2963
+ return;
2964
+ }
2965
+ Be(), v = r()?.subscribeSectionEvents({
2966
+ sectionId: s(),
2967
+ attemptId: i(),
2968
+ listener: vs
2969
+ }) || null, _.controller = p, _.sectionId = s(), _.attemptId = re, G(void 0, p);
2970
+ }
2971
+ function _s() {
2972
+ $ || ($ = !0, queueMicrotask(() => {
2973
+ $ = !1, Fn();
2974
+ }));
2628
2975
  }
2629
- kn(() => {
2976
+ Sn(() => {
2630
2977
  if (!(!r() || !s()))
2631
- return sn(), Wn(), en = r().onSectionControllerLifecycle?.((h) => {
2632
- const S = h?.key?.sectionId || "", R = h?.key?.attemptId || void 0;
2633
- S === s() && (R || void 0) === (i() || void 0) && (sn(), Ct({ updatedAt: Date.now() }));
2978
+ return Fn(), st(), g = r().onSectionControllerLifecycle?.((p) => {
2979
+ go(p, s(), i()) && (_s(), G({ updatedAt: Date.now() }));
2634
2980
  }) || null, () => {
2635
- rn(), Wn();
2981
+ Be(), st();
2636
2982
  };
2637
- }), Fi(() => {
2638
- const h = (un, an, fn) => Math.max(an, Math.min(un, fn)), S = window.innerWidth, R = window.innerHeight;
2639
- $(f, h(Math.round(S * 0.29), 280, 560), !0), $(c, h(Math.round(R * 0.72), 360, 860), !0), $(u, Math.max(16, Math.round(S * 0.08)), !0), $(a, Math.max(16, Math.round((R - m(c)) / 2)), !0);
2640
- const N = () => {
2641
- Bn({ updatedAt: Date.now() });
2642
- };
2643
- return document.addEventListener("session-changed", N, !0), document.addEventListener("item-session-changed", N, !0), document.addEventListener("composition-changed", N, !0), () => {
2644
- document.removeEventListener("session-changed", N, !0), document.removeEventListener("item-session-changed", N, !0), document.removeEventListener("composition-changed", N, !0);
2645
- };
2983
+ }), Vi(() => {
2984
+ const p = vo({ width: window.innerWidth, height: window.innerHeight }, {
2985
+ widthRatio: 0.29,
2986
+ heightRatio: 0.72,
2987
+ minWidth: 280,
2988
+ maxWidth: 560,
2989
+ minHeight: 360,
2990
+ maxHeight: 860,
2991
+ paddingX: 16,
2992
+ paddingY: 16
2993
+ });
2994
+ A(u, p.x, !0), A(a, p.y, !0), A(f, p.width, !0), A(c, p.height, !0);
2646
2995
  });
2647
- function ds(h) {
2648
- $(v, !0), g = h.clientX, _ = h.clientY, T = m(u), E = m(a), document.addEventListener("mousemove", qn), document.addEventListener("mouseup", on);
2649
- }
2650
- function qn(h) {
2651
- if (!m(v)) return;
2652
- const S = h.clientX - g, R = h.clientY - _;
2653
- $(u, T + S), $(a, E + R), $(u, Math.max(0, Math.min(m(u), window.innerWidth - m(f))), !0), $(a, Math.max(0, Math.min(m(a), window.innerHeight - 100)), !0);
2654
- }
2655
- function on() {
2656
- $(v, !1), document.removeEventListener("mousemove", qn), document.removeEventListener("mouseup", on);
2657
- }
2658
- function hs(h) {
2659
- $(d, !0), ke = h.clientX, se = h.clientY, Hn = m(f), zn = m(c), document.addEventListener("mousemove", Un), document.addEventListener("mouseup", ln), h.stopPropagation();
2660
- }
2661
- function Un(h) {
2662
- if (!m(d)) return;
2663
- const S = h.clientX - ke, R = h.clientY - se;
2664
- $(f, Math.max(300, Math.min(Hn + S, window.innerWidth - m(u))), !0), $(c, Math.max(200, Math.min(zn + R, window.innerHeight - m(a))), !0);
2665
- }
2666
- function ln() {
2667
- $(d, !1), document.removeEventListener("mousemove", Un), document.removeEventListener("mouseup", ln);
2668
- }
2669
- kn(() => () => {
2670
- on(), ln();
2996
+ const un = _o({
2997
+ getState: () => ({
2998
+ x: x(u),
2999
+ y: x(a),
3000
+ width: x(f),
3001
+ height: x(c)
3002
+ }),
3003
+ setState: (p) => {
3004
+ A(u, p.x, !0), A(a, p.y, !0), A(f, p.width, !0), A(c, p.height, !0);
3005
+ },
3006
+ minWidth: 300,
3007
+ minHeight: 200
3008
+ });
3009
+ Sn(() => () => {
3010
+ un.stop();
2671
3011
  });
2672
- var vs = {
2673
- refreshFromHost: cs,
3012
+ var ps = {
2674
3013
  get toolkitCoordinator() {
2675
3014
  return r();
2676
3015
  },
2677
- set toolkitCoordinator(h = null) {
2678
- r(h), Ft();
3016
+ set toolkitCoordinator(p = null) {
3017
+ r(p), le();
2679
3018
  },
2680
3019
  get sectionId() {
2681
3020
  return s();
2682
3021
  },
2683
- set sectionId(h = "") {
2684
- s(h), Ft();
3022
+ set sectionId(p = "") {
3023
+ s(p), le();
2685
3024
  },
2686
3025
  get attemptId() {
2687
3026
  return i();
2688
3027
  },
2689
- set attemptId(h = void 0) {
2690
- i(h), Ft();
3028
+ set attemptId(p = void 0) {
3029
+ i(p), le();
2691
3030
  }
2692
- }, Rt = so(), Nt = Ae(Rt), Xn = Ke(Ae(Nt), 2), gt = Ae(Xn), _s = Ae(gt);
2693
- {
2694
- var ps = (h) => {
2695
- var S = Gi();
2696
- _e(h, S);
2697
- }, gs = (h) => {
2698
- var S = Zi();
2699
- _e(h, S);
2700
- };
2701
- Pt(_s, (h) => {
2702
- m(o) ? h(ps) : h(gs, !1);
2703
- });
2704
- }
2705
- Ie(gt);
2706
- var ms = Ke(gt, 2);
2707
- Ie(Xn), Ie(Nt);
2708
- var Jn = Ke(Nt, 2);
3031
+ }, jt = xo(), Ht = xe(jt), Bn = Ve(xe(Ht), 2), gs = xe(Bn);
3032
+ ds(gs, {
3033
+ get minimized() {
3034
+ return x(o);
3035
+ },
3036
+ onToggle: () => A(o, !x(o)),
3037
+ onClose: () => n("close")
3038
+ }), ye(Bn), ye(Ht);
3039
+ var Wn = Ve(Ht, 2);
2709
3040
  {
2710
- var ws = (h) => {
2711
- var S = no(), R = Ae(S), N = Ke(Ae(R), 2);
3041
+ var ms = (p) => {
3042
+ var re = $o(), We = xe(re), N = Ve(xe(We), 2);
2712
3043
  {
2713
- var un = (ve) => {
2714
- var Le = Qi();
2715
- _e(ve, Le);
2716
- }, an = (ve) => {
2717
- var Le = eo();
2718
- _e(ve, Le);
2719
- }, fn = /* @__PURE__ */ ai(() => Object.keys(m(Tt).itemSessions || {}).length === 0), $s = (ve) => {
2720
- var Le = to(), Kn = Ke(Ae(Le), 2), Es = Ae(Kn, !0);
2721
- Ie(Kn), Ie(Le), hn((Ss) => Oi(Es, Ss), [() => JSON.stringify(m(Tt), null, 2)]), _e(ve, Le);
3044
+ var fn = (it) => {
3045
+ var Ft = wo();
3046
+ _e(it, Ft);
3047
+ }, ys = (it) => {
3048
+ var Ft = yo(), Vn = jr(Ft);
3049
+ {
3050
+ var $s = (It) => {
3051
+ var Ss = bo();
3052
+ _e(It, Ss);
3053
+ }, xs = /* @__PURE__ */ Mr(() => Object.keys(x(h).itemSessions || {}).length === 0);
3054
+ kt(Vn, (It) => {
3055
+ x(xs) && It($s);
3056
+ });
3057
+ }
3058
+ var Yn = Ve(Vn, 2), qn = Ve(xe(Yn), 2), Es = xe(qn, !0);
3059
+ ye(qn), ye(Yn), Mt((It) => Hi(Es, It), [() => JSON.stringify(x(h), null, 2)]), _e(it, Ft);
2722
3060
  };
2723
- Pt(N, (ve) => {
2724
- m(tn) ? m(fn) ? ve(an, 1) : ve($s, !1) : ve(un);
3061
+ kt(N, (it) => {
3062
+ x(d) ? it(ys, -1) : it(fn);
2725
3063
  });
2726
3064
  }
2727
- Ie(R), Ie(S), hn(() => or(S, `height: ${m(c) - 60}px;`)), _e(h, S);
3065
+ ye(We), ye(re), Mt(() => rr(re, `height: ${x(c) - 50}px;`)), _e(p, re);
2728
3066
  };
2729
- Pt(Jn, (h) => {
2730
- m(o) || h(ws);
3067
+ kt(Wn, (p) => {
3068
+ x(o) || p(ms);
2731
3069
  });
2732
3070
  }
2733
- var bs = Ke(Jn, 2);
3071
+ var ws = Ve(Wn, 2);
2734
3072
  {
2735
- var ys = (h) => {
2736
- var S = ro();
2737
- Dt("mousedown", S, hs), _e(h, S);
3073
+ var bs = (p) => {
3074
+ cs(p, {
3075
+ onPointerDown: (re) => un.startResize(re)
3076
+ });
2738
3077
  };
2739
- Pt(bs, (h) => {
2740
- m(o) || h(ys);
3078
+ kt(ws, (p) => {
3079
+ x(o) || p(bs);
2741
3080
  });
2742
3081
  }
2743
- return Ie(Rt), hn(() => {
2744
- or(Rt, `left: ${m(u) ?? ""}px; top: ${m(a) ?? ""}px; width: ${m(f) ?? ""}px; ${m(o) ? "height: auto;" : `height: ${m(c)}px;`}`), Bi(gt, "title", m(o) ? "Maximize" : "Minimize");
2745
- }), Dt("mousedown", Nt, ds), Dt("click", gt, () => $(o, !m(o))), Dt("click", ms, () => n("close")), _e(e, Rt), br(vs);
3082
+ return ye(jt), Mt(() => rr(jt, `left: ${x(u) ?? ""}px; top: ${x(a) ?? ""}px; width: ${x(f) ?? ""}px; ${x(o) ? "height: auto;" : `height: ${x(c)}px;`}`)), Jt("mousedown", Ht, (p) => un.startDrag(p)), _e(e, jt), ln(ps);
2746
3083
  }
2747
- Ai(["mousedown", "click"]);
2748
- customElements.define("pie-section-player-tools-session-debugger", Ki(
2749
- io,
3084
+ zn(["mousedown"]);
3085
+ customElements.define("pie-section-player-tools-session-debugger", jn(
3086
+ So,
2750
3087
  {
2751
3088
  sectionId: { attribute: "section-id", type: "String" },
2752
3089
  attemptId: { attribute: "attempt-id", type: "String" },
2753
3090
  toolkitCoordinator: { attribute: "toolkit-coordinator", type: "Object" }
2754
3091
  },
2755
3092
  [],
2756
- ["refreshFromHost"]
3093
+ []
2757
3094
  ));
2758
3095
  export {
2759
- io as default
3096
+ So as default
2760
3097
  };