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

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