playlight-sdk 0.3.1 → 0.3.2

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.
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
- var _e3, _t2, _n2, _r, _s, _i, _o, _Batch_instances, a_fn, c_fn, l_fn, u_fn, _n3, _d2, _f, _p, _h, _g, __, _v, _m, _b2, _y, _w, _$, _x, _k, _S, _C, _Boundary_instances, E_fn, I_fn, O_fn, T_fn, M_fn, P_fn, _L, _j, _A, _D, _u, _W, _B, _N, _ResizeObserverSingleton_instances, q_fn, _a, _z, _R, _b, _G, _F, _c, _H, _Y, _U, _d, _V, _PlayLightAPI_instances, K_fn, _e2;
12
+ var _e3, _t2, _n2, _r, _s, _o, _i, _Batch_instances, a_fn, c_fn, l_fn, u_fn, _n3, _d2, _f, _p, _h, _g, __, _v, _m, _b2, _y, _w, _$, _x, _k, _S, _C, _Boundary_instances, E_fn, I_fn, M_fn, T_fn, O_fn, P_fn, _L, _j, _A, _D, _u, _W, _B, _N, _ResizeObserverSingleton_instances, q_fn, _a, _z, _R, _b, _G, _F, _c, _H, _Y, _V, _d, _U, _PlayLightAPI_instances, K_fn, _e2;
13
13
  const e = {
14
14
  exitIntent: {
15
15
  enabled: true,
@@ -39,7 +39,7 @@ function isObject(e2) {
39
39
  return e2 && "object" == typeof e2 && !Array.isArray(e2);
40
40
  }
41
41
  const t = false;
42
- var n = Array.isArray, s = Array.prototype.indexOf, i = Array.from, o = Object.defineProperty, a = Object.getOwnPropertyDescriptor, l = Object.getOwnPropertyDescriptors, c = Object.prototype, u = Array.prototype, d = Object.getPrototypeOf, f = Object.isExtensible;
42
+ var n = Array.isArray, s = Array.prototype.indexOf, o = Array.from, i = Object.defineProperty, a = Object.getOwnPropertyDescriptor, l = Object.getOwnPropertyDescriptors, c = Object.prototype, u = Array.prototype, d = Object.getPrototypeOf, f = Object.isExtensible;
43
43
  function is_function(e2) {
44
44
  return "function" == typeof e2;
45
45
  }
@@ -68,7 +68,7 @@ function to_array(e2, t2) {
68
68
  for (const s2 of e2) if (n2.push(s2), n2.length === t2) break;
69
69
  return n2;
70
70
  }
71
- const p = 16, h = 32, g = 64, _ = 128, v = 1024, m = 2048, b = 4096, y = 8192, w = 16384, $ = 32768, x = 65536, k = 1 << 17, S = 1 << 19, C = 256, O = 512, M = 32768, E = 1 << 21, I = 1 << 23, T = Symbol("$state"), P = Symbol("legacy props"), L = Symbol(""), j = new class StaleReactionError extends Error {
71
+ const p = 16, h = 32, g = 64, _ = 128, v = 1024, m = 2048, b = 4096, y = 8192, w = 16384, $ = 32768, x = 65536, k = 1 << 17, S = 1 << 19, C = 256, M = 512, O = 32768, E = 1 << 21, I = 1 << 23, T = Symbol("$state"), P = Symbol("legacy props"), L = Symbol(""), j = new class StaleReactionError extends Error {
72
72
  constructor() {
73
73
  super(...arguments);
74
74
  __publicField(this, "name", "StaleReactionError");
@@ -160,14 +160,14 @@ function proxy(e2) {
160
160
  if ("object" != typeof e2 || null === e2 || T in e2) return e2;
161
161
  const t2 = d(e2);
162
162
  if (t2 !== c && t2 !== u) return e2;
163
- var s2 = /* @__PURE__ */ new Map(), i2 = n(e2), o2 = /* @__PURE__ */ state(0), l2 = he, with_parent = (e3) => {
163
+ var s2 = /* @__PURE__ */ new Map(), o2 = n(e2), i2 = /* @__PURE__ */ state(0), l2 = he, with_parent = (e3) => {
164
164
  if (he === l2) return e3();
165
- var t3 = ie, n2 = he;
165
+ var t3 = oe, n2 = he;
166
166
  set_active_reaction(null), set_update_version(l2);
167
167
  var s3 = e3();
168
168
  return set_active_reaction(t3), set_update_version(n2), s3;
169
169
  };
170
- return i2 && // We need to create the length source eagerly to ensure that
170
+ return o2 && // We need to create the length source eagerly to ensure that
171
171
  // mutations to the array are properly synced with our proxy
172
172
  s2.set("length", /* @__PURE__ */ state(
173
173
  /** @type {any[]} */
@@ -188,43 +188,43 @@ function proxy(e2) {
188
188
  (function state_descriptors_fixed() {
189
189
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
190
190
  })();
191
- var i3 = s2.get(t3);
192
- return void 0 === i3 ? i3 = with_parent(() => {
191
+ var o3 = s2.get(t3);
192
+ return void 0 === o3 ? o3 = with_parent(() => {
193
193
  var e4 = /* @__PURE__ */ state(n2.value);
194
194
  return s2.set(t3, e4), e4;
195
- }) : set(i3, n2.value, true), true;
195
+ }) : set(o3, n2.value, true), true;
196
196
  },
197
197
  deleteProperty(e3, t3) {
198
198
  var n2 = s2.get(t3);
199
199
  if (void 0 === n2) {
200
200
  if (t3 in e3) {
201
201
  const e4 = with_parent(() => /* @__PURE__ */ state(D));
202
- s2.set(t3, e4), increment(o2);
202
+ s2.set(t3, e4), increment(i2);
203
203
  }
204
- } else set(n2, D), increment(o2);
204
+ } else set(n2, D), increment(i2);
205
205
  return true;
206
206
  },
207
- get(t3, n2, i3) {
207
+ get(t3, n2, o3) {
208
208
  var _a2;
209
209
  if (n2 === T) return e2;
210
- var o3 = s2.get(n2), l3 = n2 in t3;
210
+ var i3 = s2.get(n2), l3 = n2 in t3;
211
211
  if (
212
212
  // create a source, but only if it's an own property and not a prototype property
213
- void 0 !== o3 || l3 && !((_a2 = a(t3, n2)) == null ? void 0 : _a2.writable) || (o3 = with_parent(() => /* @__PURE__ */ state(proxy(l3 ? t3[n2] : D))), s2.set(n2, o3)), void 0 !== o3
213
+ void 0 !== i3 || l3 && !((_a2 = a(t3, n2)) == null ? void 0 : _a2.writable) || (i3 = with_parent(() => /* @__PURE__ */ state(proxy(l3 ? t3[n2] : D))), s2.set(n2, i3)), void 0 !== i3
214
214
  ) {
215
- var c2 = get$1(o3);
215
+ var c2 = get$1(i3);
216
216
  return c2 === D ? void 0 : c2;
217
217
  }
218
- return Reflect.get(t3, n2, i3);
218
+ return Reflect.get(t3, n2, o3);
219
219
  },
220
220
  getOwnPropertyDescriptor(e3, t3) {
221
221
  var n2 = Reflect.getOwnPropertyDescriptor(e3, t3);
222
222
  if (n2 && "value" in n2) {
223
- var i3 = s2.get(t3);
224
- i3 && (n2.value = get$1(i3));
223
+ var o3 = s2.get(t3);
224
+ o3 && (n2.value = get$1(o3));
225
225
  } else if (void 0 === n2) {
226
- var o3 = s2.get(t3), a2 = o3 == null ? void 0 : o3.v;
227
- if (void 0 !== o3 && a2 !== D) return {
226
+ var i3 = s2.get(t3), a2 = i3 == null ? void 0 : i3.v;
227
+ if (void 0 !== i3 && a2 !== D) return {
228
228
  enumerable: true,
229
229
  configurable: true,
230
230
  value: a2,
@@ -236,14 +236,14 @@ function proxy(e2) {
236
236
  has(e3, t3) {
237
237
  var _a2;
238
238
  if (t3 === T) return true;
239
- var n2 = s2.get(t3), i3 = void 0 !== n2 && n2.v !== D || Reflect.has(e3, t3);
240
- if ((void 0 !== n2 || null !== ae && (!i3 || ((_a2 = a(e3, t3)) == null ? void 0 : _a2.writable))) && (void 0 === n2 && (n2 = with_parent(() => /* @__PURE__ */ state(i3 ? proxy(e3[t3]) : D)), s2.set(t3, n2)), get$1(n2) === D)) return false;
241
- return i3;
239
+ var n2 = s2.get(t3), o3 = void 0 !== n2 && n2.v !== D || Reflect.has(e3, t3);
240
+ if ((void 0 !== n2 || null !== ae && (!o3 || ((_a2 = a(e3, t3)) == null ? void 0 : _a2.writable))) && (void 0 === n2 && (n2 = with_parent(() => /* @__PURE__ */ state(o3 ? proxy(e3[t3]) : D)), s2.set(t3, n2)), get$1(n2) === D)) return false;
241
+ return o3;
242
242
  },
243
243
  set(e3, t3, n2, l3) {
244
244
  var _a2;
245
245
  var c2 = s2.get(t3), u2 = t3 in e3;
246
- if (i2 && "length" === t3) for (var d2 = n2; d2 < /** @type {Source<number>} */
246
+ if (o2 && "length" === t3) for (var d2 = n2; d2 < /** @type {Source<number>} */
247
247
  c2.v; d2 += 1) {
248
248
  var f2 = s2.get(d2 + "");
249
249
  void 0 !== f2 ? set(f2, D) : d2 in e3 && // If the item exists in the original, we need to create a uninitialized source,
@@ -254,24 +254,24 @@ function proxy(e2) {
254
254
  void 0 === c2 ? u2 && !((_a2 = a(e3, t3)) == null ? void 0 : _a2.writable) || (set(c2 = with_parent(() => /* @__PURE__ */ state(void 0)), proxy(n2)), s2.set(t3, c2)) : (u2 = c2.v !== D, set(c2, with_parent(() => proxy(n2))));
255
255
  var p2 = Reflect.getOwnPropertyDescriptor(e3, t3);
256
256
  if ((p2 == null ? void 0 : p2.set) && p2.set.call(l3, n2), !u2) {
257
- if (i2 && "string" == typeof t3) {
257
+ if (o2 && "string" == typeof t3) {
258
258
  var h2 = (
259
259
  /** @type {Source<number>} */
260
260
  s2.get("length")
261
261
  ), g2 = Number(t3);
262
262
  Number.isInteger(g2) && g2 >= h2.v && set(h2, g2 + 1);
263
263
  }
264
- increment(o2);
264
+ increment(i2);
265
265
  }
266
266
  return true;
267
267
  },
268
268
  ownKeys(e3) {
269
- get$1(o2);
269
+ get$1(i2);
270
270
  var t3 = Reflect.ownKeys(e3).filter((e4) => {
271
271
  var t4 = s2.get(e4);
272
272
  return void 0 === t4 || t4.v !== D;
273
273
  });
274
- for (var [n2, i3] of s2) i3.v === D || n2 in e3 || t3.push(n2);
274
+ for (var [n2, o3] of s2) o3.v === D || n2 in e3 || t3.push(n2);
275
275
  return t3;
276
276
  },
277
277
  setPrototypeOf() {
@@ -327,7 +327,7 @@ const G = /* @__PURE__ */ new WeakMap();
327
327
  function handle_error(e2) {
328
328
  var t2 = ae;
329
329
  if (null === t2)
330
- return ie.f |= I, e2;
330
+ return oe.f |= I, e2;
331
331
  if (0 === (t2.f & $)) {
332
332
  if (0 === (t2.f & _)) throw !t2.parent && e2 instanceof Error && apply_adjustments(e2), e2;
333
333
  t2.b.error(e2);
@@ -347,14 +347,14 @@ function invoke_error_boundary(e2, t2) {
347
347
  }
348
348
  function apply_adjustments(e2) {
349
349
  const t2 = G.get(e2);
350
- t2 && (o(e2, "message", {
350
+ t2 && (i(e2, "message", {
351
351
  value: t2.message
352
- }), o(e2, "stack", {
352
+ }), i(e2, "stack", {
353
353
  value: t2.stack
354
354
  }));
355
355
  }
356
356
  const F = /* @__PURE__ */ new Set();
357
- let H = null, Y = null, U = null, V = /* @__PURE__ */ new Set(), K = [], Z = null, J = false, Q = false;
357
+ let H = null, Y = null, V = null, U = /* @__PURE__ */ new Set(), K = [], Z = null, J = false, Q = false;
358
358
  const _Batch = class _Batch {
359
359
  constructor() {
360
360
  __privateAdd(this, _Batch_instances);
@@ -395,12 +395,12 @@ const _Batch = class _Batch {
395
395
  * Deferred effects (which run after async work has completed) that are DIRTY
396
396
  * @type {Effect[]}
397
397
  */
398
- __privateAdd(this, _i, []);
398
+ __privateAdd(this, _o, []);
399
399
  /**
400
400
  * Deferred effects that are MAYBE_DIRTY
401
401
  * @type {Effect[]}
402
402
  */
403
- __privateAdd(this, _o, []);
403
+ __privateAdd(this, _i, []);
404
404
  /**
405
405
  * A set of branches that still exist, but will be destroyed when this batch
406
406
  * is committed — we skip over these during `process`
@@ -427,7 +427,7 @@ const _Batch = class _Batch {
427
427
  // If sources are written to, then work needs to happen in a separate batch, else prior sources would be mixed with
428
428
  // newly updated sources, which could lead to infinite loops when effects run over and over again.
429
429
  (Y = this, H = null, flush_queued_effects(t2.render_effects), flush_queued_effects(t2.effects), Y = null)
430
- ), U = null;
430
+ ), V = null;
431
431
  }
432
432
  /**
433
433
  * Associate a change to a given source with the current
@@ -436,13 +436,13 @@ const _Batch = class _Batch {
436
436
  * @param {any} value
437
437
  */
438
438
  capture(e2, t2) {
439
- __privateGet(this, _e3).has(e2) || __privateGet(this, _e3).set(e2, t2), this.current.set(e2, e2.v), U == null ? void 0 : U.set(e2, e2.v);
439
+ __privateGet(this, _e3).has(e2) || __privateGet(this, _e3).set(e2, t2), this.current.set(e2, e2.v), V == null ? void 0 : V.set(e2, e2.v);
440
440
  }
441
441
  activate() {
442
442
  H = this;
443
443
  }
444
444
  deactivate() {
445
- H = null, U = null;
445
+ H = null, V = null;
446
446
  }
447
447
  flush() {
448
448
  if (K.length > 0) {
@@ -450,7 +450,7 @@ const _Batch = class _Batch {
450
450
  return;
451
451
  } else __privateMethod(this, _Batch_instances, l_fn).call(this);
452
452
  this.deactivate();
453
- for (const e2 of V) if (V.delete(e2), e2(), null !== H)
453
+ for (const e2 of U) if (U.delete(e2), e2(), null !== H)
454
454
  break;
455
455
  }
456
456
  /**
@@ -466,9 +466,9 @@ const _Batch = class _Batch {
466
466
  */
467
467
  decrement(e2) {
468
468
  __privateSet(this, _n2, __privateGet(this, _n2) - 1), e2 && __privateSet(this, _r, __privateGet(this, _r) - 1);
469
- for (const e3 of __privateGet(this, _i)) set_signal_status(e3, m), schedule_effect(e3);
470
- for (const e3 of __privateGet(this, _o)) set_signal_status(e3, b), schedule_effect(e3);
471
- __privateSet(this, _i, []), __privateSet(this, _o, []), this.flush();
469
+ for (const e3 of __privateGet(this, _o)) set_signal_status(e3, m), schedule_effect(e3);
470
+ for (const e3 of __privateGet(this, _i)) set_signal_status(e3, b), schedule_effect(e3);
471
+ __privateSet(this, _o, []), __privateSet(this, _i, []), this.flush();
472
472
  }
473
473
  /** @param {() => void} fn */
474
474
  add_callback(e2) {
@@ -498,8 +498,8 @@ _t2 = new WeakMap();
498
498
  _n2 = new WeakMap();
499
499
  _r = new WeakMap();
500
500
  _s = new WeakMap();
501
- _i = new WeakMap();
502
501
  _o = new WeakMap();
502
+ _i = new WeakMap();
503
503
  _Batch_instances = new WeakSet();
504
504
  /**
505
505
  * Traverse the effect tree, executing effects or stashing
@@ -511,15 +511,15 @@ a_fn = function(e2, t2) {
511
511
  var _a2;
512
512
  e2.f ^= v;
513
513
  for (var n2 = e2.first; null !== n2; ) {
514
- var s2 = n2.f, i2 = !!(96 & s2), o2 = i2 && 0 !== (s2 & v) || 0 !== (s2 & y) || this.skipped_effects.has(n2);
514
+ var s2 = n2.f, o2 = !!(96 & s2), i2 = o2 && 0 !== (s2 & v) || 0 !== (s2 & y) || this.skipped_effects.has(n2);
515
515
  if (0 !== (n2.f & _) && ((_a2 = n2.b) == null ? void 0 : _a2.is_pending()) && (t2 = {
516
516
  parent: t2,
517
517
  effect: n2,
518
518
  effects: [],
519
519
  render_effects: [],
520
520
  block_effects: []
521
- }), !o2 && null !== n2.fn) {
522
- i2 ? n2.f ^= v : 4 & s2 ? t2.effects.push(n2) : is_dirty(n2) && (0 !== (n2.f & p) && t2.block_effects.push(n2), update_effect(n2));
521
+ }), !i2 && null !== n2.fn) {
522
+ o2 ? n2.f ^= v : 4 & s2 ? t2.effects.push(n2) : is_dirty(n2) && (0 !== (n2.f & p) && t2.block_effects.push(n2), update_effect(n2));
523
523
  var a2 = n2.first;
524
524
  if (null !== a2) {
525
525
  n2 = a2;
@@ -539,7 +539,7 @@ a_fn = function(e2, t2) {
539
539
  */
540
540
  c_fn = function(e2) {
541
541
  for (const t2 of e2) {
542
- (0 !== (t2.f & m) ? __privateGet(this, _i) : __privateGet(this, _o)).push(t2), // mark as clean so they get scheduled if they depend on pending async state
542
+ (0 !== (t2.f & m) ? __privateGet(this, _o) : __privateGet(this, _i)).push(t2), // mark as clean so they get scheduled if they depend on pending async state
543
543
  set_signal_status(t2, v);
544
544
  }
545
545
  };
@@ -554,7 +554,7 @@ u_fn = function() {
554
554
  var _a2, _b3;
555
555
  if (F.size > 1) {
556
556
  __privateGet(this, _e3).clear();
557
- var e2 = U, t2 = true, n2 = {
557
+ var e2 = V, t2 = true, n2 = {
558
558
  parent: null,
559
559
  effect: null,
560
560
  effects: [],
@@ -567,19 +567,19 @@ u_fn = function() {
567
567
  continue;
568
568
  }
569
569
  const s2 = [];
570
- for (const [n3, i3] of this.current) {
570
+ for (const [n3, o3] of this.current) {
571
571
  if (e3.current.has(n3)) {
572
- if (!t2 || i3 === e3.current.get(n3))
572
+ if (!t2 || o3 === e3.current.get(n3))
573
573
  continue;
574
- e3.current.set(n3, i3);
574
+ e3.current.set(n3, o3);
575
575
  }
576
576
  s2.push(n3);
577
577
  }
578
578
  if (0 === s2.length) continue;
579
- const i2 = [...e3.current.keys()].filter((e4) => !this.current.has(e4));
580
- if (i2.length > 0) {
581
- const t3 = /* @__PURE__ */ new Set(), o2 = /* @__PURE__ */ new Map();
582
- for (const e4 of s2) mark_effects(e4, i2, t3, o2);
579
+ const o2 = [...e3.current.keys()].filter((e4) => !this.current.has(e4));
580
+ if (o2.length > 0) {
581
+ const t3 = /* @__PURE__ */ new Set(), i2 = /* @__PURE__ */ new Map();
582
+ for (const e4 of s2) mark_effects(e4, o2, t3, i2);
583
583
  if (K.length > 0) {
584
584
  H = e3, e3.apply();
585
585
  for (const t4 of K) __privateMethod(_a2 = e3, _Batch_instances, a_fn).call(_a2, t4, n2);
@@ -587,7 +587,7 @@ u_fn = function() {
587
587
  }
588
588
  }
589
589
  }
590
- H = null, U = e2;
590
+ H = null, V = e2;
591
591
  }
592
592
  this.committed = true, F.delete(this), (_b3 = __privateGet(this, _s)) == null ? void 0 : _b3.resolve();
593
593
  };
@@ -657,18 +657,18 @@ function flush_queued_effects(e2) {
657
657
  }
658
658
  }
659
659
  function mark_effects(e2, t2, n2, s2) {
660
- if (!n2.has(e2) && (n2.add(e2), null !== e2.reactions)) for (const i2 of e2.reactions) {
661
- const e3 = i2.f;
660
+ if (!n2.has(e2) && (n2.add(e2), null !== e2.reactions)) for (const o2 of e2.reactions) {
661
+ const e3 = o2.f;
662
662
  2 & e3 ? mark_effects(
663
663
  /** @type {Derived} */
664
- i2,
664
+ o2,
665
665
  t2,
666
666
  n2,
667
667
  s2
668
668
  ) : 4194320 & e3 && 0 === (e3 & m) && // we may have scheduled this one already
669
- depends_on(i2, t2, s2) && (set_signal_status(i2, m), schedule_effect(
669
+ depends_on(o2, t2, s2) && (set_signal_status(o2, m), schedule_effect(
670
670
  /** @type {Effect} */
671
- i2
671
+ o2
672
672
  ));
673
673
  }
674
674
  }
@@ -709,7 +709,7 @@ function createSubscriber(e2) {
709
709
  * @returns {boolean}
710
710
  */
711
711
  /* @__PURE__ */ (function effect_tracking() {
712
- return null !== ie && !oe;
712
+ return null !== oe && !ie;
713
713
  })() && (get$1(s2), render_effect(() => (0 === n2 && (t2 = untrack(() => e2(() => increment(s2)))), n2 += 1, () => {
714
714
  queue_micro_task(() => {
715
715
  n2 -= 1, 0 === n2 && (t2 == null ? void 0 : t2(), t2 = void 0, // Increment the version to ensure any dependent deriveds are marked dirty when the subscription is picked up again later.
@@ -771,13 +771,13 @@ class Boundary {
771
771
  __privateSet(this, _d2, e2), __privateSet(this, _p, t2), __privateSet(this, _h, n2), this.parent = /** @type {Effect} */
772
772
  ae.b, __privateSet(this, _n3, !!__privateGet(this, _p).pending), __privateSet(this, _g, block(() => {
773
773
  ae.b = this;
774
- var e3 = __privateMethod(this, _Boundary_instances, O_fn).call(this);
774
+ var e3 = __privateMethod(this, _Boundary_instances, M_fn).call(this);
775
775
  try {
776
776
  __privateSet(this, __, branch(() => n2(e3)));
777
777
  } catch (e4) {
778
778
  this.error(e4);
779
779
  }
780
- return __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, M_fn).call(this) : __privateSet(this, _n3, false), () => {
780
+ return __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, O_fn).call(this) : __privateSet(this, _n3, false), () => {
781
781
  var _a2;
782
782
  (_a2 = __privateGet(this, _y)) == null ? void 0 : _a2.remove();
783
783
  };
@@ -800,7 +800,7 @@ class Boundary {
800
800
  * @param {1 | -1} d
801
801
  */
802
802
  update_pending_count(e2) {
803
- __privateMethod(this, _Boundary_instances, P_fn).call(this, e2), __privateSet(this, _w, __privateGet(this, _w) + e2), V.add(__privateGet(this, _S));
803
+ __privateMethod(this, _Boundary_instances, P_fn).call(this, e2), __privateSet(this, _w, __privateGet(this, _w) + e2), U.add(__privateGet(this, _S));
804
804
  }
805
805
  get_effect_pending() {
806
806
  return __privateGet(this, _C).call(this), get$1(
@@ -814,7 +814,7 @@ class Boundary {
814
814
  let n2 = __privateGet(this, _p).failed;
815
815
  if (__privateGet(this, _x) || !t2 && !n2) throw e2;
816
816
  __privateGet(this, __) && (destroy_effect(__privateGet(this, __)), __privateSet(this, __, null)), __privateGet(this, _v) && (destroy_effect(__privateGet(this, _v)), __privateSet(this, _v, null)), __privateGet(this, _m) && (destroy_effect(__privateGet(this, _m)), __privateSet(this, _m, null));
817
- var s2 = false, i2 = false;
817
+ var s2 = false, o2 = false;
818
818
  const reset = () => {
819
819
  s2 ? (
820
820
  /**
@@ -823,7 +823,7 @@ class Boundary {
823
823
  (function svelte_boundary_reset_noop() {
824
824
  console.warn("https://svelte.dev/e/svelte_boundary_reset_noop");
825
825
  })()
826
- ) : (s2 = true, i2 && /**
826
+ ) : (s2 = true, o2 && /**
827
827
  * A `<svelte:boundary>` `reset` function cannot be called while an error is still being handled
828
828
  * @returns {never}
829
829
  */
@@ -834,15 +834,15 @@ class Boundary {
834
834
  __privateSet(this, _m, null);
835
835
  }), // we intentionally do not try to find the nearest pending boundary. If this boundary has one, we'll render it on reset
836
836
  // but it would be really weird to show the parent's boundary on a child reset.
837
- __privateSet(this, _n3, this.has_pending_snippet()), __privateSet(this, __, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => (__privateSet(this, _x, false), branch(() => __privateGet(this, _h).call(this, __privateGet(this, _d2)))))), __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, M_fn).call(this) : __privateSet(this, _n3, false));
837
+ __privateSet(this, _n3, this.has_pending_snippet()), __privateSet(this, __, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => (__privateSet(this, _x, false), branch(() => __privateGet(this, _h).call(this, __privateGet(this, _d2)))))), __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, O_fn).call(this) : __privateSet(this, _n3, false));
838
838
  };
839
- var o2 = ie;
839
+ var i2 = oe;
840
840
  try {
841
- set_active_reaction(null), i2 = true, t2 == null ? void 0 : t2(e2, reset), i2 = false;
841
+ set_active_reaction(null), o2 = true, t2 == null ? void 0 : t2(e2, reset), o2 = false;
842
842
  } catch (e3) {
843
843
  invoke_error_boundary(e3, __privateGet(this, _g) && __privateGet(this, _g).parent);
844
844
  } finally {
845
- set_active_reaction(o2);
845
+ set_active_reaction(i2);
846
846
  }
847
847
  n2 && queue_micro_task(() => {
848
848
  __privateSet(this, _m, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => {
@@ -893,8 +893,8 @@ E_fn = function() {
893
893
  I_fn = function() {
894
894
  const e2 = __privateGet(this, _p).pending;
895
895
  e2 && (__privateSet(this, _v, branch(() => e2(__privateGet(this, _d2)))), Batch.enqueue(() => {
896
- var e3 = __privateMethod(this, _Boundary_instances, O_fn).call(this);
897
- __privateSet(this, __, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => (Batch.ensure(), branch(() => __privateGet(this, _h).call(this, e3))))), __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, M_fn).call(this) : (pause_effect(
896
+ var e3 = __privateMethod(this, _Boundary_instances, M_fn).call(this);
897
+ __privateSet(this, __, __privateMethod(this, _Boundary_instances, T_fn).call(this, () => (Batch.ensure(), branch(() => __privateGet(this, _h).call(this, e3))))), __privateGet(this, _$) > 0 ? __privateMethod(this, _Boundary_instances, O_fn).call(this) : (pause_effect(
898
898
  /** @type {Effect} */
899
899
  __privateGet(this, _v),
900
900
  () => {
@@ -903,7 +903,7 @@ I_fn = function() {
903
903
  ), __privateSet(this, _n3, false));
904
904
  }));
905
905
  };
906
- O_fn = function() {
906
+ M_fn = function() {
907
907
  var e2 = __privateGet(this, _d2);
908
908
  return __privateGet(this, _n3) && (__privateSet(this, _y, create_text()), __privateGet(this, _d2).before(__privateGet(this, _y)), e2 = __privateGet(this, _y)), e2;
909
909
  };
@@ -911,7 +911,7 @@ O_fn = function() {
911
911
  * @param {() => Effect | null} fn
912
912
  */
913
913
  T_fn = function(e2) {
914
- var t2 = ae, n2 = ie, s2 = W;
914
+ var t2 = ae, n2 = oe, s2 = W;
915
915
  set_active_effect(__privateGet(this, _g)), set_active_reaction(__privateGet(this, _g)), set_component_context(__privateGet(this, _g).ctx);
916
916
  try {
917
917
  return e2();
@@ -921,7 +921,7 @@ T_fn = function(e2) {
921
921
  set_active_effect(t2), set_active_reaction(n2), set_component_context(s2);
922
922
  }
923
923
  };
924
- M_fn = function() {
924
+ O_fn = function() {
925
925
  const e2 = (
926
926
  /** @type {(anchor: Node) => void} */
927
927
  __privateGet(this, _p).pending
@@ -945,7 +945,7 @@ P_fn = function(e2) {
945
945
  function flatten(e2, t2, n2) {
946
946
  const s2 = is_runes() ? derived : derived_safe_equal;
947
947
  if (0 !== t2.length) {
948
- var i2 = H, o2 = (
948
+ var o2 = H, i2 = (
949
949
  /** @type {Effect} */
950
950
  ae
951
951
  ), a2 = (
@@ -955,7 +955,7 @@ function flatten(e2, t2, n2) {
955
955
  * causes `b` to be registered as a dependency).
956
956
  */
957
957
  /* @__PURE__ */ (function capture() {
958
- var e3 = ae, t3 = ie, n3 = W, s3 = H;
958
+ var e3 = ae, t3 = oe, n3 = W, s3 = H;
959
959
  return function restore2() {
960
960
  set_active_effect(e3), set_active_reaction(t3), set_component_context(n3), s3 == null ? void 0 : s3.activate();
961
961
  };
@@ -979,20 +979,20 @@ function flatten(e2, t2, n2) {
979
979
  var s3 = (
980
980
  /** @type {Boundary} */
981
981
  n3.b
982
- ), i3 = (
982
+ ), o3 = (
983
983
  /** @type {Promise<V>} */
984
984
  /** @type {unknown} */
985
985
  void 0
986
- ), o3 = source(
986
+ ), i3 = source(
987
987
  /** @type {V} */
988
988
  D
989
- ), a3 = !ie, l2 = /* @__PURE__ */ new Map();
989
+ ), a3 = !oe, l2 = /* @__PURE__ */ new Map();
990
990
  return (function async_effect(e5) {
991
991
  return create_effect(4718592, e5, true);
992
992
  })(() => {
993
993
  var _a2;
994
994
  var t4 = deferred();
995
- i3 = t4.promise;
995
+ o3 = t4.promise;
996
996
  try {
997
997
  Promise.resolve(e4()).then(t4.resolve, t4.reject).then(() => {
998
998
  n4 === H && n4.committed && // if the batch was rejected as stale, we need to cleanup
@@ -1012,10 +1012,10 @@ function flatten(e2, t2, n2) {
1012
1012
  l2.set(n4, t4);
1013
1013
  }
1014
1014
  const handler = (e5, t5 = void 0) => {
1015
- if (n4.activate(), t5) t5 !== j && (o3.f |= I, // @ts-expect-error the error is the wrong type, but we don't care
1016
- internal_set(o3, t5));
1015
+ if (n4.activate(), t5) t5 !== j && (i3.f |= I, // @ts-expect-error the error is the wrong type, but we don't care
1016
+ internal_set(i3, t5));
1017
1017
  else {
1018
- 0 !== (o3.f & I) && (o3.f ^= I), internal_set(o3, e5);
1018
+ 0 !== (i3.f & I) && (i3.f ^= I), internal_set(i3, e5);
1019
1019
  for (const [e6, t6] of l2) {
1020
1020
  if (l2.delete(e6), e6 === n4) break;
1021
1021
  t6.reject(j);
@@ -1029,15 +1029,15 @@ function flatten(e2, t2, n2) {
1029
1029
  }), new Promise((e5) => {
1030
1030
  function next(t4) {
1031
1031
  function go() {
1032
- t4 === i3 ? e5(o3) : (
1032
+ t4 === o3 ? e5(i3) : (
1033
1033
  // if the effect re-runs before the initial promise
1034
1034
  // resolves, delay resolution until we have a value
1035
- next(i3)
1035
+ next(o3)
1036
1036
  );
1037
1037
  }
1038
1038
  t4.then(go, go);
1039
1039
  }
1040
- next(i3);
1040
+ next(o3);
1041
1041
  });
1042
1042
  })(e3)
1043
1043
  ))).then((t3) => {
@@ -1045,11 +1045,11 @@ function flatten(e2, t2, n2) {
1045
1045
  try {
1046
1046
  n2([...e2.map(s2), ...t3]);
1047
1047
  } catch (e3) {
1048
- 0 === (o2.f & w) && invoke_error_boundary(e3, o2);
1048
+ 0 === (i2.f & w) && invoke_error_boundary(e3, i2);
1049
1049
  }
1050
- i2 == null ? void 0 : i2.deactivate(), unset_context();
1050
+ o2 == null ? void 0 : o2.deactivate(), unset_context();
1051
1051
  }).catch((e3) => {
1052
- invoke_error_boundary(e3, o2);
1052
+ invoke_error_boundary(e3, i2);
1053
1053
  });
1054
1054
  } else n2(e2.map(s2));
1055
1055
  }
@@ -1058,9 +1058,9 @@ function unset_context() {
1058
1058
  }
1059
1059
  // @__NO_SIDE_EFFECTS__
1060
1060
  function derived(e2) {
1061
- var t2 = 2050, n2 = null !== ie && 2 & ie.f ? (
1061
+ var t2 = 2050, n2 = null !== oe && 2 & oe.f ? (
1062
1062
  /** @type {Derived} */
1063
- ie
1063
+ oe
1064
1064
  ) : null;
1065
1065
  null === ae || null !== n2 && 0 !== (n2.f & C) ? t2 |= C : (
1066
1066
  // Since deriveds are evaluated lazily, any effects created inside them are
@@ -1125,7 +1125,7 @@ function update_derived(e2) {
1125
1125
  var t2 = execute_derived(e2);
1126
1126
  (e2.equals(t2) || // TODO can we avoid setting `derived.v` when `batch_values !== null`,
1127
1127
  // without causing the value to be stale later?
1128
- (e2.v = t2, e2.wv = increment_write_version()), se) || (null !== U ? U.set(e2, e2.v) : set_signal_status(e2, !ge && 0 === (e2.f & C) || null === e2.deps ? v : b));
1128
+ (e2.v = t2, e2.wv = increment_write_version()), se) || (null !== V ? V.set(e2, e2.v) : set_signal_status(e2, !ge && 0 === (e2.f & C) || null === e2.deps ? v : b));
1129
1129
  }
1130
1130
  const te = /* @__PURE__ */ new Map();
1131
1131
  function source(e2, t2) {
@@ -1153,9 +1153,9 @@ function mutable_source(e2, t2 = false, n2 = true) {
1153
1153
  A && n2 && null !== W && null !== W.l && ((_a2 = W.l).s ?? (_a2.s = [])).push(s2), s2;
1154
1154
  }
1155
1155
  function set(e2, t2, n2 = false) {
1156
- return null !== ie && // since we are untracking the function inside `$inspect.with` we need to add this check
1156
+ return null !== oe && // since we are untracking the function inside `$inspect.with` we need to add this check
1157
1157
  // to ensure we error if state is set inside an inspect effect
1158
- (!oe || 0 !== (ie.f & k)) && is_runes() && 4325394 & ie.f && !(le == null ? void 0 : le.includes(e2)) && (function state_unsafe_mutation() {
1158
+ (!ie || 0 !== (oe.f & k)) && is_runes() && 4325394 & oe.f && !(le == null ? void 0 : le.includes(e2)) && (function state_unsafe_mutation() {
1159
1159
  throw new Error("https://svelte.dev/e/state_unsafe_mutation");
1160
1160
  })(), internal_set(e2, n2 ? proxy(t2) : t2);
1161
1161
  }
@@ -1188,11 +1188,11 @@ function increment(e2) {
1188
1188
  }
1189
1189
  function mark_reactions(e2, t2) {
1190
1190
  var n2 = e2.reactions;
1191
- if (null !== n2) for (var s2 = is_runes(), i2 = n2.length, o2 = 0; o2 < i2; o2++) {
1192
- var a2 = n2[o2], l2 = a2.f;
1191
+ if (null !== n2) for (var s2 = is_runes(), o2 = n2.length, i2 = 0; i2 < o2; i2++) {
1192
+ var a2 = n2[i2], l2 = a2.f;
1193
1193
  if (s2 || a2 !== ae) {
1194
1194
  var c2 = 0 === (l2 & m);
1195
- c2 && set_signal_status(a2, t2), 2 & l2 ? 0 === (l2 & M) && (a2.f |= M, mark_reactions(
1195
+ c2 && set_signal_status(a2, t2), 2 & l2 ? 0 === (l2 & O) && (a2.f |= O, mark_reactions(
1196
1196
  /** @type {Derived} */
1197
1197
  a2,
1198
1198
  b
@@ -1216,7 +1216,7 @@ function autofocus(e2, t2) {
1216
1216
  }
1217
1217
  let ne = false;
1218
1218
  function without_reactive_context(e2) {
1219
- var t2 = ie, n2 = ae;
1219
+ var t2 = oe, n2 = ae;
1220
1220
  set_active_reaction(null), set_active_effect(null);
1221
1221
  try {
1222
1222
  return e2();
@@ -1226,9 +1226,9 @@ function without_reactive_context(e2) {
1226
1226
  }
1227
1227
  function listen_to_event_and_reset_event(e2, t2, n2, s2 = n2) {
1228
1228
  e2.addEventListener(t2, () => without_reactive_context(n2));
1229
- const i2 = e2.__on_r;
1230
- e2.__on_r = i2 ? () => {
1231
- i2(), s2(true);
1229
+ const o2 = e2.__on_r;
1230
+ e2.__on_r = o2 ? () => {
1231
+ o2(), s2(true);
1232
1232
  } : () => s2(true), (function add_form_reset_listener() {
1233
1233
  ne || (ne = true, document.addEventListener(
1234
1234
  "reset",
@@ -1258,9 +1258,9 @@ let se = false;
1258
1258
  function set_is_destroying_effect(e2) {
1259
1259
  se = e2;
1260
1260
  }
1261
- let ie = null, oe = false;
1261
+ let oe = null, ie = false;
1262
1262
  function set_active_reaction(e2) {
1263
- ie = e2;
1263
+ oe = e2;
1264
1264
  }
1265
1265
  let ae = null;
1266
1266
  function set_active_effect(e2) {
@@ -1268,7 +1268,7 @@ function set_active_effect(e2) {
1268
1268
  }
1269
1269
  let le = null;
1270
1270
  function push_reaction_value(e2) {
1271
- null !== ie && (null === le ? le = [e2] : le.push(e2));
1271
+ null !== oe && (null === le ? le = [e2] : le.push(e2));
1272
1272
  }
1273
1273
  let ce = null, ue = 0, de = null;
1274
1274
  let fe = 1, pe = 0, he = pe;
@@ -1286,25 +1286,25 @@ function is_dirty(e2) {
1286
1286
  if (0 !== (t2 & b)) {
1287
1287
  var n2 = e2.deps, s2 = 0 !== (t2 & C);
1288
1288
  if (2 & t2 && (e2.f &= -32769), null !== n2) {
1289
- var i2, o2, a2 = 0 !== (t2 & O), l2 = s2 && null !== ae && !ge, c2 = n2.length;
1289
+ var o2, i2, a2 = 0 !== (t2 & M), l2 = s2 && null !== ae && !ge, c2 = n2.length;
1290
1290
  if ((a2 || l2) && (null === ae || 0 === (ae.f & w))) {
1291
1291
  var u2 = (
1292
1292
  /** @type {Derived} */
1293
1293
  e2
1294
1294
  ), d2 = u2.parent;
1295
- for (i2 = 0; i2 < c2; i2++) o2 = n2[i2], // We always re-add all reactions (even duplicates) if the derived was
1295
+ for (o2 = 0; o2 < c2; o2++) i2 = n2[o2], // We always re-add all reactions (even duplicates) if the derived was
1296
1296
  // previously disconnected, however we don't if it was unowned as we
1297
1297
  // de-duplicate dependencies in that case
1298
- !a2 && ((_a2 = o2 == null ? void 0 : o2.reactions) == null ? void 0 : _a2.includes(u2)) || (o2.reactions ?? (o2.reactions = [])).push(u2);
1299
- a2 && (u2.f ^= O), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
1298
+ !a2 && ((_a2 = i2 == null ? void 0 : i2.reactions) == null ? void 0 : _a2.includes(u2)) || (i2.reactions ?? (i2.reactions = [])).push(u2);
1299
+ a2 && (u2.f ^= M), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
1300
1300
  // and the parent is not unowned), then we can mark it as connected again, removing the need for the unowned
1301
1301
  // flag
1302
1302
  l2 && null !== d2 && 0 === (d2.f & C) && (u2.f ^= C);
1303
1303
  }
1304
- for (i2 = 0; i2 < c2; i2++) if (is_dirty(o2 = n2[i2]) && update_derived(
1304
+ for (o2 = 0; o2 < c2; o2++) if (is_dirty(i2 = n2[o2]) && update_derived(
1305
1305
  /** @type {Derived} */
1306
- o2
1307
- ), o2.wv > e2.wv) return true;
1306
+ i2
1307
+ ), i2.wv > e2.wv) return true;
1308
1308
  }
1309
1309
  s2 && (null === ae || ge) || set_signal_status(e2, v);
1310
1310
  }
@@ -1312,24 +1312,24 @@ function is_dirty(e2) {
1312
1312
  }
1313
1313
  function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
1314
1314
  var s2 = e2.reactions;
1315
- if (null !== s2 && !(le == null ? void 0 : le.includes(e2))) for (var i2 = 0; i2 < s2.length; i2++) {
1316
- var o2 = s2[i2];
1317
- 2 & o2.f ? schedule_possible_effect_self_invalidation(
1315
+ if (null !== s2 && !(le == null ? void 0 : le.includes(e2))) for (var o2 = 0; o2 < s2.length; o2++) {
1316
+ var i2 = s2[o2];
1317
+ 2 & i2.f ? schedule_possible_effect_self_invalidation(
1318
1318
  /** @type {Derived} */
1319
- o2,
1319
+ i2,
1320
1320
  t2,
1321
1321
  false
1322
- ) : t2 === o2 && (n2 ? set_signal_status(o2, m) : 0 !== (o2.f & v) && set_signal_status(o2, b), schedule_effect(
1322
+ ) : t2 === i2 && (n2 ? set_signal_status(i2, m) : 0 !== (i2.f & v) && set_signal_status(i2, b), schedule_effect(
1323
1323
  /** @type {Effect} */
1324
- o2
1324
+ i2
1325
1325
  ));
1326
1326
  }
1327
1327
  }
1328
1328
  function update_reaction(e2) {
1329
1329
  var _a2;
1330
- var t2 = ce, n2 = ue, s2 = de, i2 = ie, o2 = ge, a2 = le, l2 = W, c2 = oe, u2 = he, d2 = e2.f;
1330
+ var t2 = ce, n2 = ue, s2 = de, o2 = oe, i2 = ge, a2 = le, l2 = W, c2 = ie, u2 = he, d2 = e2.f;
1331
1331
  ce = /** @type {null | Value[]} */
1332
- null, ue = 0, de = null, ge = 0 !== (d2 & C) && (oe || !re || null === ie), ie = 96 & d2 ? null : e2, le = null, set_component_context(e2.ctx), oe = false, he = ++pe, null !== e2.ac && (without_reactive_context(() => {
1332
+ null, ue = 0, de = null, ge = 0 !== (d2 & C) && (ie || !re || null === oe), oe = 96 & d2 ? null : e2, le = null, set_component_context(e2.ctx), ie = false, he = ++pe, null !== e2.ac && (without_reactive_context(() => {
1333
1333
  e2.ac.abort(j);
1334
1334
  }), e2.ac = null);
1335
1335
  try {
@@ -1344,29 +1344,29 @@ function update_reaction(e2) {
1344
1344
  2 & d2 && /** @type {import('#client').Derived} */
1345
1345
  null !== e2.reactions) for (h2 = ue; h2 < p2.length; h2++) ((_a2 = p2[h2]).reactions ?? (_a2.reactions = [])).push(e2);
1346
1346
  } else null !== p2 && ue < p2.length && (remove_reactions(e2, ue), p2.length = ue);
1347
- if (is_runes() && null !== de && !oe && null !== p2 && !(6146 & e2.f)) for (h2 = 0; h2 < /** @type {Source[]} */
1347
+ if (is_runes() && null !== de && !ie && null !== p2 && !(6146 & e2.f)) for (h2 = 0; h2 < /** @type {Source[]} */
1348
1348
  de.length; h2++) schedule_possible_effect_self_invalidation(
1349
1349
  de[h2],
1350
1350
  /** @type {Effect} */
1351
1351
  e2
1352
1352
  );
1353
- return null !== i2 && i2 !== e2 && (pe++, null !== de && (null === s2 ? s2 = de : s2.push(.../** @type {Source[]} */
1353
+ return null !== o2 && o2 !== e2 && (pe++, null !== de && (null === s2 ? s2 = de : s2.push(.../** @type {Source[]} */
1354
1354
  de))), 0 !== (e2.f & I) && (e2.f ^= I), f2;
1355
1355
  } catch (e3) {
1356
1356
  return handle_error(e3);
1357
1357
  } finally {
1358
- e2.f ^= E, ce = t2, ue = n2, de = s2, ie = i2, ge = o2, le = a2, set_component_context(l2), oe = c2, he = u2;
1358
+ e2.f ^= E, ce = t2, ue = n2, de = s2, oe = o2, ge = i2, le = a2, set_component_context(l2), ie = c2, he = u2;
1359
1359
  }
1360
1360
  }
1361
1361
  function remove_reaction(e2, t2) {
1362
1362
  let n2 = t2.reactions;
1363
1363
  if (null !== n2) {
1364
- var i2 = s.call(n2, e2);
1365
- if (-1 !== i2) {
1366
- var o2 = n2.length - 1;
1367
- 0 === o2 ? n2 = t2.reactions = null : (
1364
+ var o2 = s.call(n2, e2);
1365
+ if (-1 !== o2) {
1366
+ var i2 = n2.length - 1;
1367
+ 0 === i2 ? n2 = t2.reactions = null : (
1368
1368
  // Swap with last element and then remove.
1369
- (n2[i2] = n2[o2], n2.pop())
1369
+ (n2[o2] = n2[i2], n2.pop())
1370
1370
  );
1371
1371
  }
1372
1372
  }
@@ -1375,7 +1375,7 @@ function remove_reaction(e2, t2) {
1375
1375
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
1376
1376
  (null === ce || !ce.includes(t2)) && (set_signal_status(t2, b), // If we are working with a derived that is owned by an effect, then mark it as being
1377
1377
  // disconnected.
1378
- 768 & t2.f || (t2.f ^= O), // Disconnect any reactions owned by this reaction
1378
+ 768 & t2.f || (t2.f ^= M), // Disconnect any reactions owned by this reaction
1379
1379
  destroy_derived_effects(
1380
1380
  /** @type {Derived} **/
1381
1381
  t2
@@ -1409,8 +1409,8 @@ function update_effect(e2) {
1409
1409
  }
1410
1410
  })(e2)
1411
1411
  ) : destroy_effect_children(e2), execute_effect_teardown(e2);
1412
- var i2 = update_reaction(e2);
1413
- e2.teardown = "function" == typeof i2 ? i2 : null, e2.wv = fe;
1412
+ var o2 = update_reaction(e2);
1413
+ e2.teardown = "function" == typeof o2 ? o2 : null, e2.wv = fe;
1414
1414
  } finally {
1415
1415
  re = s2, ae = n2;
1416
1416
  }
@@ -1435,7 +1435,7 @@ async function tick() {
1435
1435
  }
1436
1436
  function get$1(e2) {
1437
1437
  var t2 = !!(2 & e2.f);
1438
- if (null === ie || oe) {
1438
+ if (null === oe || ie) {
1439
1439
  if (t2 && /** @type {Derived} */
1440
1440
  null === e2.deps && /** @type {Derived} */
1441
1441
  null === e2.effects) {
@@ -1449,19 +1449,19 @@ function get$1(e2) {
1449
1449
  (n2.f ^= C);
1450
1450
  }
1451
1451
  } else if (!(null !== ae && 0 !== (ae.f & w)) && !(le == null ? void 0 : le.includes(e2))) {
1452
- var i2 = ie.deps;
1453
- if (0 !== (ie.f & E))
1452
+ var o2 = oe.deps;
1453
+ if (0 !== (oe.f & E))
1454
1454
  e2.rv < pe && (e2.rv = pe, // If the signal is accessing the same dependencies in the same
1455
1455
  // order as it did last time, increment `skipped_deps`
1456
1456
  // rather than updating `new_deps`, which creates GC cost
1457
- null === ce && null !== i2 && i2[ue] === e2 ? ue++ : null === ce ? ce = [e2] : ge && ce.includes(e2) || // Normally we can push duplicated dependencies to `new_deps`, but if we're inside
1457
+ null === ce && null !== o2 && o2[ue] === e2 ? ue++ : null === ce ? ce = [e2] : ge && ce.includes(e2) || // Normally we can push duplicated dependencies to `new_deps`, but if we're inside
1458
1458
  // an unowned derived because skip_reaction is true, then we need to ensure that
1459
1459
  // we don't have duplicates
1460
1460
  ce.push(e2));
1461
1461
  else {
1462
- (ie.deps ?? (ie.deps = [])).push(e2);
1463
- var o2 = e2.reactions;
1464
- null === o2 ? e2.reactions = [ie] : o2.includes(ie) || o2.push(ie);
1462
+ (oe.deps ?? (oe.deps = [])).push(e2);
1463
+ var i2 = e2.reactions;
1464
+ null === i2 ? e2.reactions = [oe] : i2.includes(oe) || i2.push(oe);
1465
1465
  }
1466
1466
  }
1467
1467
  if (se) {
@@ -1473,10 +1473,10 @@ function get$1(e2) {
1473
1473
  }
1474
1474
  } else if (t2) {
1475
1475
  if (n2 = /** @type {Derived} */
1476
- e2, U == null ? void 0 : U.has(n2)) return U.get(n2);
1476
+ e2, V == null ? void 0 : V.has(n2)) return V.get(n2);
1477
1477
  is_dirty(n2) && update_derived(n2);
1478
1478
  }
1479
- if (U == null ? void 0 : U.has(e2)) return U.get(e2);
1479
+ if (V == null ? void 0 : V.has(e2)) return V.get(e2);
1480
1480
  if (0 !== (e2.f & I)) throw e2.v;
1481
1481
  return e2.v;
1482
1482
  }
@@ -1493,11 +1493,11 @@ function depends_on_old_values(e2) {
1493
1493
  return false;
1494
1494
  }
1495
1495
  function untrack(e2) {
1496
- var t2 = oe;
1496
+ var t2 = ie;
1497
1497
  try {
1498
- return oe = true, e2();
1498
+ return ie = true, e2();
1499
1499
  } finally {
1500
- oe = t2;
1500
+ ie = t2;
1501
1501
  }
1502
1502
  }
1503
1503
  const _e = -7169;
@@ -1536,14 +1536,14 @@ function deep_read(e2, t2 = /* @__PURE__ */ new Set()) {
1536
1536
  }
1537
1537
  }
1538
1538
  function validate_effect(e2) {
1539
- null === ae && null === ie && /**
1539
+ null === ae && null === oe && /**
1540
1540
  * `%rune%` can only be used inside an effect (e.g. during component initialisation)
1541
1541
  * @param {string} rune
1542
1542
  * @returns {never}
1543
1543
  */
1544
1544
  (function effect_orphan(e3) {
1545
1545
  throw new Error("https://svelte.dev/e/effect_orphan");
1546
- })(), null !== ie && 0 !== (ie.f & C) && null === ae && /**
1546
+ })(), null !== oe && 0 !== (oe.f & C) && null === ae && /**
1547
1547
  * Effect cannot be created inside a `$derived` value that was not itself created inside an effect
1548
1548
  * @returns {never}
1549
1549
  */
@@ -1554,9 +1554,9 @@ function validate_effect(e2) {
1554
1554
  })();
1555
1555
  }
1556
1556
  function create_effect(e2, t2, n2, s2 = true) {
1557
- var i2 = ae;
1558
- null !== i2 && 0 !== (i2.f & y) && (e2 |= y);
1559
- var o2 = {
1557
+ var o2 = ae;
1558
+ null !== o2 && 0 !== (o2.f & y) && (e2 |= y);
1559
+ var i2 = {
1560
1560
  ctx: W,
1561
1561
  deps: null,
1562
1562
  nodes_start: null,
@@ -1566,8 +1566,8 @@ function create_effect(e2, t2, n2, s2 = true) {
1566
1566
  fn: t2,
1567
1567
  last: null,
1568
1568
  next: null,
1569
- parent: i2,
1570
- b: i2 && i2.b,
1569
+ parent: o2,
1570
+ b: o2 && o2.b,
1571
1571
  prev: null,
1572
1572
  teardown: null,
1573
1573
  transitions: null,
@@ -1575,26 +1575,26 @@ function create_effect(e2, t2, n2, s2 = true) {
1575
1575
  ac: null
1576
1576
  };
1577
1577
  if (n2) try {
1578
- update_effect(o2), o2.f |= $;
1578
+ update_effect(i2), i2.f |= $;
1579
1579
  } catch (a3) {
1580
- throw destroy_effect(o2), a3;
1580
+ throw destroy_effect(i2), a3;
1581
1581
  }
1582
- else null !== t2 && schedule_effect(o2);
1582
+ else null !== t2 && schedule_effect(i2);
1583
1583
  if (s2) {
1584
- var a2 = o2;
1584
+ var a2 = i2;
1585
1585
  if (n2 && null === a2.deps && null === a2.teardown && null === a2.nodes_start && a2.first === a2.last && // either `null`, or a singular child
1586
- 0 === (a2.f & S) && (a2 = a2.first, 0 !== (e2 & p) && 0 !== (e2 & x) && null !== a2 && (a2.f |= x)), null !== a2 && (a2.parent = i2, null !== i2 && (function push_effect(e3, t3) {
1586
+ 0 === (a2.f & S) && (a2 = a2.first, 0 !== (e2 & p) && 0 !== (e2 & x) && null !== a2 && (a2.f |= x)), null !== a2 && (a2.parent = o2, null !== o2 && (function push_effect(e3, t3) {
1587
1587
  var n3 = t3.last;
1588
1588
  null === n3 ? t3.last = t3.first = e3 : (n3.next = e3, e3.prev = n3, t3.last = e3);
1589
- })(a2, i2), null !== ie && 2 & ie.f && 0 === (e2 & g))) {
1589
+ })(a2, o2), null !== oe && 2 & oe.f && 0 === (e2 & g))) {
1590
1590
  var l2 = (
1591
1591
  /** @type {Derived} */
1592
- ie
1592
+ oe
1593
1593
  );
1594
1594
  (l2.effects ?? (l2.effects = [])).push(a2);
1595
1595
  }
1596
1596
  }
1597
- return o2;
1597
+ return i2;
1598
1598
  }
1599
1599
  function teardown(e2) {
1600
1600
  const t2 = create_effect(8, null, false);
@@ -1606,7 +1606,7 @@ function user_effect(e2) {
1606
1606
  /** @type {Effect} */
1607
1607
  ae.f
1608
1608
  );
1609
- if (!(!ie && 0 !== (t2 & h) && 0 === (t2 & $)))
1609
+ if (!(!oe && 0 !== (t2 & h) && 0 === (t2 & $)))
1610
1610
  return create_user_effect(e2);
1611
1611
  var n2 = (
1612
1612
  /** @type {ComponentContext} */
@@ -1640,7 +1640,7 @@ function branch(e2, t2 = true) {
1640
1640
  function execute_effect_teardown(e2) {
1641
1641
  var t2 = e2.teardown;
1642
1642
  if (null !== t2) {
1643
- const e3 = se, n2 = ie;
1643
+ const e3 = se, n2 = oe;
1644
1644
  set_is_destroying_effect(true), set_active_reaction(null);
1645
1645
  try {
1646
1646
  t2.call(null);
@@ -1686,8 +1686,8 @@ function destroy_effect(e2, t2 = true) {
1686
1686
  var s2 = e2.transitions;
1687
1687
  if (null !== s2) for (const e3 of s2) e3.stop();
1688
1688
  execute_effect_teardown(e2);
1689
- var i2 = e2.parent;
1690
- null !== i2 && null !== i2.first && unlink_effect(e2), // `first` and `child` are nulled out in destroy_effect_children
1689
+ var o2 = e2.parent;
1690
+ null !== o2 && null !== o2.first && unlink_effect(e2), // `first` and `child` are nulled out in destroy_effect_children
1691
1691
  // we don't null out `parent` so that error propagation can work correctly
1692
1692
  e2.next = e2.prev = e2.teardown = e2.ctx = e2.deps = e2.fn = e2.nodes_start = e2.nodes_end = e2.ac = null;
1693
1693
  }
@@ -1712,11 +1712,11 @@ function pause_children(e2, t2, n2) {
1712
1712
  if (0 === (e2.f & y)) {
1713
1713
  if (e2.f ^= y, null !== e2.transitions) for (const s3 of e2.transitions) (s3.is_global || n2) && t2.push(s3);
1714
1714
  for (var s2 = e2.first; null !== s2; ) {
1715
- var i2 = s2.next;
1715
+ var o2 = s2.next;
1716
1716
  pause_children(s2, t2, !!(0 !== (s2.f & x) || // If this is a branch effect without a block effect parent,
1717
1717
  // it means the parent block effect was pruned. In that case,
1718
1718
  // transparency information was transferred to the branch effect.
1719
- 0 !== (s2.f & h) && 0 !== (e2.f & p)) && n2), s2 = i2;
1719
+ 0 !== (s2.f & h) && 0 !== (e2.f & p)) && n2), s2 = o2;
1720
1720
  }
1721
1721
  }
1722
1722
  }
@@ -1739,11 +1739,11 @@ function resume_children(e2, t2) {
1739
1739
  }
1740
1740
  function move_effect(e2, t2) {
1741
1741
  for (var n2 = e2.nodes_start, s2 = e2.nodes_end; null !== n2; ) {
1742
- var i2 = n2 === s2 ? null : (
1742
+ var o2 = n2 === s2 ? null : (
1743
1743
  /** @type {TemplateNode} */
1744
1744
  /* @__PURE__ */ get_next_sibling(n2)
1745
1745
  );
1746
- t2.append(n2), n2 = i2;
1746
+ t2.append(n2), n2 = o2;
1747
1747
  }
1748
1748
  }
1749
1749
  function is_capture_event(e2) {
@@ -1786,21 +1786,21 @@ function create_event(e2, t2, n2, s2 = {}) {
1786
1786
  }) : t2.addEventListener(e2, target_handler, s2), target_handler;
1787
1787
  }
1788
1788
  function on(e2, t2, n2, s2 = {}) {
1789
- var i2 = create_event(t2, e2, n2, s2);
1789
+ var o2 = create_event(t2, e2, n2, s2);
1790
1790
  return () => {
1791
- e2.removeEventListener(t2, i2, s2);
1791
+ e2.removeEventListener(t2, o2, s2);
1792
1792
  };
1793
1793
  }
1794
- function event(e2, t2, n2, s2, i2) {
1795
- var o2 = {
1794
+ function event(e2, t2, n2, s2, o2) {
1795
+ var i2 = {
1796
1796
  capture: s2,
1797
- passive: i2
1798
- }, a2 = create_event(e2, t2, n2, o2);
1797
+ passive: o2
1798
+ }, a2 = create_event(e2, t2, n2, i2);
1799
1799
  (t2 === document.body || // @ts-ignore
1800
1800
  t2 === window || // @ts-ignore
1801
1801
  t2 === document || // Firefox has quirky behavior, it can happen that we still get "canplay" events when the element is already removed
1802
1802
  t2 instanceof HTMLMediaElement) && teardown(() => {
1803
- t2.removeEventListener(e2, a2, o2);
1803
+ t2.removeEventListener(e2, a2, i2);
1804
1804
  });
1805
1805
  }
1806
1806
  function delegate(e2) {
@@ -1813,7 +1813,7 @@ function handle_event_propagation(e2) {
1813
1813
  var t2 = this, s2 = (
1814
1814
  /** @type {Node} */
1815
1815
  t2.ownerDocument
1816
- ), i2 = e2.type, a2 = ((_a2 = e2.composedPath) == null ? void 0 : _a2.call(e2)) || [], l2 = (
1816
+ ), o2 = e2.type, a2 = ((_a2 = e2.composedPath) == null ? void 0 : _a2.call(e2)) || [], l2 = (
1817
1817
  /** @type {null | Element} */
1818
1818
  a2[0] || e2.target
1819
1819
  );
@@ -1831,18 +1831,18 @@ function handle_event_propagation(e2) {
1831
1831
  }
1832
1832
  if ((l2 = /** @type {Element} */
1833
1833
  a2[c2] || e2.target) !== t2) {
1834
- o(e2, "currentTarget", {
1834
+ i(e2, "currentTarget", {
1835
1835
  configurable: true,
1836
1836
  get: () => l2 || s2
1837
1837
  });
1838
- var p2 = ie, h2 = ae;
1838
+ var p2 = oe, h2 = ae;
1839
1839
  set_active_reaction(null), set_active_effect(null);
1840
1840
  try {
1841
1841
  for (var g2, _2 = []; null !== l2; ) {
1842
1842
  var v2 = l2.assignedSlot || l2.parentNode || /** @type {any} */
1843
1843
  l2.host || null;
1844
1844
  try {
1845
- var m2 = l2["__" + i2];
1845
+ var m2 = l2["__" + o2];
1846
1846
  if (null != m2 && (!/** @type {any} */
1847
1847
  l2.disabled || // DOM could've been updated already by the time this is reached, so we check this as well
1848
1848
  // -> the target could not have been disabled because it emits the event in the first place
@@ -1882,13 +1882,13 @@ function assign_nodes(e2, t2) {
1882
1882
  }
1883
1883
  // @__NO_SIDE_EFFECTS__
1884
1884
  function from_html(e2, t2) {
1885
- var n2, s2 = !!(1 & t2), i2 = !!(2 & t2), o2 = !e2.startsWith("<!>");
1885
+ var n2, s2 = !!(1 & t2), o2 = !!(2 & t2), i2 = !e2.startsWith("<!>");
1886
1886
  return () => {
1887
- void 0 === n2 && (n2 = create_fragment_from_html(o2 ? e2 : "<!>" + e2), s2 || (n2 = /** @type {Node} */
1887
+ void 0 === n2 && (n2 = create_fragment_from_html(i2 ? e2 : "<!>" + e2), s2 || (n2 = /** @type {Node} */
1888
1888
  /* @__PURE__ */ get_first_child(n2)));
1889
1889
  var t3 = (
1890
1890
  /** @type {TemplateNode} */
1891
- i2 || q ? document.importNode(n2, true) : n2.cloneNode(true)
1891
+ o2 || q ? document.importNode(n2, true) : n2.cloneNode(true)
1892
1892
  );
1893
1893
  s2 ? assign_nodes(
1894
1894
  /** @type {TemplateNode} */
@@ -1902,14 +1902,14 @@ function from_html(e2, t2) {
1902
1902
  // @__NO_SIDE_EFFECTS__
1903
1903
  function from_svg(e2, t2) {
1904
1904
  return (function from_namespace(e3, t3, n2 = "svg") {
1905
- var s2, i2 = `<${n2}>${e3.startsWith("<!>") ? "<!>" + e3 : e3}</${n2}>`;
1905
+ var s2, o2 = `<${n2}>${e3.startsWith("<!>") ? "<!>" + e3 : e3}</${n2}>`;
1906
1906
  return () => {
1907
1907
  if (!s2) {
1908
1908
  var e4 = (
1909
1909
  /** @type {Element} */
1910
1910
  /* @__PURE__ */ get_first_child(
1911
1911
  /** @type {DocumentFragment} */
1912
- create_fragment_from_html(i2)
1912
+ create_fragment_from_html(o2)
1913
1913
  )
1914
1914
  );
1915
1915
  s2 = /** @type {Element} */
@@ -1947,7 +1947,7 @@ function set_text(e2, t2) {
1947
1947
  (e2.__t = n2, e2.nodeValue = n2 + "");
1948
1948
  }
1949
1949
  function mount(e2, t2) {
1950
- return (function _mount(e3, { target: t3, anchor: n2, props: s2 = {}, events: o2, context: l2, intro: c2 = true }) {
1950
+ return (function _mount(e3, { target: t3, anchor: n2, props: s2 = {}, events: i2, context: l2, intro: c2 = true }) {
1951
1951
  !/**
1952
1952
  * Initialize these lazily to avoid issues when using the runtime in a server context
1953
1953
  * where these globals are not available while avoiding a separate server entry point
@@ -1972,22 +1972,22 @@ function mount(e2, t2) {
1972
1972
  var s3 = e4[n3];
1973
1973
  if (!u2.has(s3)) {
1974
1974
  u2.add(s3);
1975
- var i2 = is_passive_event(s3);
1975
+ var o2 = is_passive_event(s3);
1976
1976
  t3.addEventListener(s3, handle_event_propagation, {
1977
- passive: i2
1977
+ passive: o2
1978
1978
  });
1979
- var o3 = ke.get(s3);
1980
- void 0 === o3 ? (
1979
+ var i3 = ke.get(s3);
1980
+ void 0 === i3 ? (
1981
1981
  // The document listener ensures we catch events that originate from elements that were
1982
1982
  // manually moved outside of the container (e.g. via manual portals).
1983
1983
  (document.addEventListener(s3, handle_event_propagation, {
1984
- passive: i2
1984
+ passive: o2
1985
1985
  }), ke.set(s3, 1))
1986
- ) : ke.set(s3, o3 + 1);
1986
+ ) : ke.set(s3, i3 + 1);
1987
1987
  }
1988
1988
  }
1989
1989
  };
1990
- event_handle(i(ye)), we.add(event_handle);
1990
+ event_handle(o(ye)), we.add(event_handle);
1991
1991
  var d2 = void 0, p2 = (function component_root(e4) {
1992
1992
  Batch.ensure();
1993
1993
  const t4 = create_effect(524352, e4, true);
@@ -1997,12 +1997,12 @@ function mount(e2, t2) {
1997
1997
  }) : (destroy_effect(t4), n3(void 0));
1998
1998
  });
1999
1999
  })(() => {
2000
- var i2 = n2 ?? t3.appendChild(create_text());
2000
+ var o2 = n2 ?? t3.appendChild(create_text());
2001
2001
  return (function boundary(e4, t4, n3) {
2002
2002
  new Boundary(e4, t4, n3);
2003
2003
  })(
2004
2004
  /** @type {TemplateNode} */
2005
- i2,
2005
+ o2,
2006
2006
  {
2007
2007
  pending: () => {
2008
2008
  }
@@ -2010,9 +2010,9 @@ function mount(e2, t2) {
2010
2010
  (t4) => {
2011
2011
  l2 && (push({}), /** @type {ComponentContext} */
2012
2012
  W.c = l2);
2013
- o2 && // We can't spread the object or else we'd lose the state proxy stuff, if it is one
2013
+ i2 && // We can't spread the object or else we'd lose the state proxy stuff, if it is one
2014
2014
  /** @type {any} */
2015
- (s2.$$events = o2), xe = c2, // @ts-expect-error the public typings are not what the actual function looks like
2015
+ (s2.$$events = i2), xe = c2, // @ts-expect-error the public typings are not what the actual function looks like
2016
2016
  d2 = e3(t4, s2) || {}, xe = true, l2 && pop();
2017
2017
  }
2018
2018
  ), () => {
@@ -2025,7 +2025,7 @@ function mount(e2, t2) {
2025
2025
  );
2026
2026
  0 === --s3 ? (document.removeEventListener(e4, handle_event_propagation), ke.delete(e4)) : ke.set(e4, s3);
2027
2027
  }
2028
- we.delete(event_handle), i2 !== n2 && ((_a2 = i2.parentNode) == null ? void 0 : _a2.removeChild(i2));
2028
+ we.delete(event_handle), o2 !== n2 && ((_a2 = o2.parentNode) == null ? void 0 : _a2.removeChild(o2));
2029
2029
  };
2030
2030
  });
2031
2031
  return Se.set(d2, p2), d2;
@@ -2140,7 +2140,7 @@ function set_current_each_item(e2) {
2140
2140
  function index(e2, t2) {
2141
2141
  return t2;
2142
2142
  }
2143
- function each(e2, t2, s2, o2, a2, l2 = null) {
2143
+ function each(e2, t2, s2, i2, a2, l2 = null) {
2144
2144
  var c2 = e2, u2 = {
2145
2145
  flags: t2,
2146
2146
  items: /* @__PURE__ */ new Map(),
@@ -2150,7 +2150,7 @@ function each(e2, t2, s2, o2, a2, l2 = null) {
2150
2150
  e2.appendChild(create_text()));
2151
2151
  var d2, f2, p2 = null, h2 = false, g2 = /* @__PURE__ */ new Map(), _2 = /* @__PURE__ */ derived_safe_equal(() => {
2152
2152
  var e3 = s2();
2153
- return n(e3) ? e3 : null == e3 ? [] : i(e3);
2153
+ return n(e3) ? e3 : null == e3 ? [] : o(e3);
2154
2154
  });
2155
2155
  function commit() {
2156
2156
  !/**
@@ -2167,7 +2167,7 @@ function each(e2, t2, s2, o2, a2, l2 = null) {
2167
2167
  * @param {() => V[]} get_collection
2168
2168
  * @returns {void}
2169
2169
  */
2170
- (function reconcile(e3, t3, n2, s3, o3, a3, l3, c3, u3) {
2170
+ (function reconcile(e3, t3, n2, s3, i3, a3, l3, c3, u3) {
2171
2171
  var _a2, _b3, _c2, _d3;
2172
2172
  var d3, f3, p3, h3, g3, _3, v2 = !!(8 & l3), m2 = !!(3 & l3), b2 = t3.length, w2 = n2.items, $2 = n2.first, x2 = $2, k2 = null, S2 = [], C2 = [];
2173
2173
  if (v2) for (_3 = 0; _3 < b2; _3 += 1) h3 = c3(p3 = t3[_3], _3), void 0 !== (g3 = w2.get(h3)) && ((_a2 = g3.a) == null ? void 0 : _a2.measure(), (f3 ?? (f3 = /* @__PURE__ */ new Set())).add(g3));
@@ -2175,14 +2175,14 @@ function each(e2, t2, s2, o2, a2, l2 = null) {
2175
2175
  if (m2 && update_item(g3, p3, _3, l3), 0 !== (g3.e.f & y) && (resume_effect(g3.e), v2 && ((_b3 = g3.a) == null ? void 0 : _b3.unfix(), (f3 ?? (f3 = /* @__PURE__ */ new Set())).delete(g3))), g3 !== x2) {
2176
2176
  if (void 0 !== d3 && d3.has(g3)) {
2177
2177
  if (S2.length < C2.length) {
2178
- var O2, M2 = C2[0];
2179
- k2 = M2.prev;
2178
+ var M2, O2 = C2[0];
2179
+ k2 = O2.prev;
2180
2180
  var E2 = S2[0], I2 = S2[S2.length - 1];
2181
- for (O2 = 0; O2 < S2.length; O2 += 1) move(S2[O2], M2, o3);
2182
- for (O2 = 0; O2 < C2.length; O2 += 1) d3.delete(C2[O2]);
2183
- link(n2, E2.prev, I2.next), link(n2, k2, E2), link(n2, I2, M2), x2 = M2, k2 = I2, _3 -= 1, S2 = [], C2 = [];
2181
+ for (M2 = 0; M2 < S2.length; M2 += 1) move(S2[M2], O2, i3);
2182
+ for (M2 = 0; M2 < C2.length; M2 += 1) d3.delete(C2[M2]);
2183
+ link(n2, E2.prev, I2.next), link(n2, k2, E2), link(n2, I2, O2), x2 = O2, k2 = I2, _3 -= 1, S2 = [], C2 = [];
2184
2184
  } else
2185
- d3.delete(g3), move(g3, x2, o3), link(n2, g3.prev, g3.next), link(n2, g3, null === k2 ? n2.first : k2.next), link(n2, k2, g3), k2 = g3;
2185
+ d3.delete(g3), move(g3, x2, i3), link(n2, g3.prev, g3.next), link(n2, g3, null === k2 ? n2.first : k2.next), link(n2, k2, g3), k2 = g3;
2186
2186
  continue;
2187
2187
  }
2188
2188
  for (S2 = [], C2 = []; null !== x2 && x2.k !== h3; )
@@ -2196,28 +2196,28 @@ function each(e2, t2, s2, o2, a2, l2 = null) {
2196
2196
  if (void 0 !== T2) {
2197
2197
  s3.delete(h3), w2.set(h3, T2);
2198
2198
  var P2 = k2 ? k2.next : x2;
2199
- link(n2, k2, T2), link(n2, T2, P2), move(T2, P2, o3), k2 = T2;
2199
+ link(n2, k2, T2), link(n2, T2, P2), move(T2, P2, i3), k2 = T2;
2200
2200
  } else {
2201
2201
  k2 = create_item(x2 ? (
2202
2202
  /** @type {TemplateNode} */
2203
2203
  x2.e.nodes_start
2204
- ) : o3, n2, k2, null === k2 ? n2.first : k2.next, p3, h3, _3, a3, l3, u3);
2204
+ ) : i3, n2, k2, null === k2 ? n2.first : k2.next, p3, h3, _3, a3, l3, u3);
2205
2205
  }
2206
2206
  w2.set(h3, k2), S2 = [], C2 = [], x2 = k2.next;
2207
2207
  }
2208
2208
  if (null !== x2 || void 0 !== d3) {
2209
- for (var L2 = void 0 === d3 ? [] : i(d3); null !== x2; )
2209
+ for (var L2 = void 0 === d3 ? [] : o(d3); null !== x2; )
2210
2210
  0 === (x2.e.f & y) && L2.push(x2), x2 = x2.next;
2211
2211
  var j2 = L2.length;
2212
2212
  if (j2 > 0) {
2213
- var A2 = 4 & l3 && 0 === b2 ? o3 : null;
2213
+ var A2 = 4 & l3 && 0 === b2 ? i3 : null;
2214
2214
  if (v2) {
2215
2215
  for (_3 = 0; _3 < j2; _3 += 1) (_c2 = L2[_3].a) == null ? void 0 : _c2.measure();
2216
2216
  for (_3 = 0; _3 < j2; _3 += 1) (_d3 = L2[_3].a) == null ? void 0 : _d3.fix();
2217
2217
  }
2218
2218
  !(function pause_effects(e4, t4, n3) {
2219
- for (var s4 = e4.items, i2 = [], o4 = t4.length, a4 = 0; a4 < o4; a4++) pause_children(t4[a4].e, i2, true);
2220
- var l4 = o4 > 0 && 0 === i2.length && null !== n3;
2219
+ for (var s4 = e4.items, o2 = [], i4 = t4.length, a4 = 0; a4 < i4; a4++) pause_children(t4[a4].e, o2, true);
2220
+ var l4 = i4 > 0 && 0 === o2.length && null !== n3;
2221
2221
  if (l4) {
2222
2222
  var c4 = (
2223
2223
  /** @type {Element} */
@@ -2229,12 +2229,12 @@ function each(e2, t2, s2, o2, a2, l2 = null) {
2229
2229
  })(c4), c4.append(
2230
2230
  /** @type {Element} */
2231
2231
  n3
2232
- ), s4.clear(), link(e4, t4[0].prev, t4[o4 - 1].next);
2232
+ ), s4.clear(), link(e4, t4[0].prev, t4[i4 - 1].next);
2233
2233
  }
2234
- run_out_transitions(i2, () => {
2235
- for (var n4 = 0; n4 < o4; n4++) {
2236
- var i3 = t4[n4];
2237
- l4 || (s4.delete(i3.k), link(e4, i3.prev, i3.next)), destroy_effect(i3.e, !l4);
2234
+ run_out_transitions(o2, () => {
2235
+ for (var n4 = 0; n4 < i4; n4++) {
2236
+ var o3 = t4[n4];
2237
+ l4 || (s4.delete(o3.k), link(e4, o3.prev, o3.next)), destroy_effect(o3.e, !l4);
2238
2238
  }
2239
2239
  });
2240
2240
  })(n2, L2, A2);
@@ -2246,7 +2246,7 @@ function each(e2, t2, s2, o2, a2, l2 = null) {
2246
2246
  });
2247
2247
  for (var D2 of (e3.first = n2.first && n2.first.e, e3.last = k2 && k2.e, s3.values())) destroy_effect(D2.e);
2248
2248
  s3.clear();
2249
- })(f2, d2, u2, g2, c2, a2, t2, o2, s2), null !== l2 && (0 === d2.length ? p2 ? resume_effect(p2) : p2 = branch(() => l2(c2)) : null !== p2 && pause_effect(p2, () => {
2249
+ })(f2, d2, u2, g2, c2, a2, t2, i2, s2), null !== l2 && (0 === d2.length ? p2 ? resume_effect(p2) : p2 = branch(() => l2(c2)) : null !== p2 && pause_effect(p2, () => {
2250
2250
  p2 = null;
2251
2251
  }));
2252
2252
  }
@@ -2271,11 +2271,11 @@ function update_item(e2, t2, n2, s2) {
2271
2271
  n2
2272
2272
  ) : e2.i = n2;
2273
2273
  }
2274
- function create_item(e2, t2, n2, s2, i2, o2, a2, l2, c2, u2, d2) {
2275
- var f2 = Ce, p2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(i2, false, false) : source(i2) : i2, h2 = 2 & c2 ? source(a2) : a2, g2 = {
2274
+ function create_item(e2, t2, n2, s2, o2, i2, a2, l2, c2, u2, d2) {
2275
+ var f2 = Ce, p2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(o2, false, false) : source(o2) : o2, h2 = 2 & c2 ? source(a2) : a2, g2 = {
2276
2276
  i: h2,
2277
2277
  v: p2,
2278
- k: o2,
2278
+ k: i2,
2279
2279
  a: null,
2280
2280
  // @ts-expect-error
2281
2281
  e: null,
@@ -2300,27 +2300,27 @@ function move(e2, t2, n2) {
2300
2300
  for (var s2 = e2.next ? (
2301
2301
  /** @type {TemplateNode} */
2302
2302
  e2.next.e.nodes_start
2303
- ) : n2, i2 = t2 ? (
2303
+ ) : n2, o2 = t2 ? (
2304
2304
  /** @type {TemplateNode} */
2305
2305
  t2.e.nodes_start
2306
- ) : n2, o2 = (
2306
+ ) : n2, i2 = (
2307
2307
  /** @type {TemplateNode} */
2308
2308
  e2.e.nodes_start
2309
- ); null !== o2 && o2 !== s2; ) {
2309
+ ); null !== i2 && i2 !== s2; ) {
2310
2310
  var a2 = (
2311
2311
  /** @type {TemplateNode} */
2312
- /* @__PURE__ */ get_next_sibling(o2)
2312
+ /* @__PURE__ */ get_next_sibling(i2)
2313
2313
  );
2314
- i2.before(o2), o2 = a2;
2314
+ o2.before(i2), i2 = a2;
2315
2315
  }
2316
2316
  }
2317
2317
  function link(e2, t2, n2) {
2318
2318
  null === t2 ? e2.first = n2 : (t2.next = n2, t2.e.next = n2 && n2.e), null !== n2 && (n2.prev = t2, n2.e.prev = t2 && t2.e);
2319
2319
  }
2320
- function slot(e2, t2, n2, s2, i2) {
2320
+ function slot(e2, t2, n2, s2, o2) {
2321
2321
  var _a2;
2322
- var o2 = (_a2 = t2.$$slots) == null ? void 0 : _a2[n2], a2 = false;
2323
- true === o2 && (o2 = t2.children, a2 = true), void 0 === o2 || o2(e2, a2 ? () => s2 : s2);
2322
+ var i2 = (_a2 = t2.$$slots) == null ? void 0 : _a2[n2], a2 = false;
2323
+ true === i2 && (i2 = t2.children, a2 = true), void 0 === i2 || i2(e2, a2 ? () => s2 : s2);
2324
2324
  }
2325
2325
  function snippet(e2, t2, ...n2) {
2326
2326
  var s2 = new BranchManager(e2);
@@ -2351,87 +2351,87 @@ function r(e2) {
2351
2351
  var t2, n2, s2 = "";
2352
2352
  if ("string" == typeof e2 || "number" == typeof e2) s2 += e2;
2353
2353
  else if ("object" == typeof e2) if (Array.isArray(e2)) {
2354
- var i2 = e2.length;
2355
- for (t2 = 0; t2 < i2; t2++) e2[t2] && (n2 = r(e2[t2])) && (s2 && (s2 += " "), s2 += n2);
2354
+ var o2 = e2.length;
2355
+ for (t2 = 0; t2 < o2; t2++) e2[t2] && (n2 = r(e2[t2])) && (s2 && (s2 += " "), s2 += n2);
2356
2356
  } else for (n2 in e2) e2[n2] && (s2 && (s2 += " "), s2 += n2);
2357
2357
  return s2;
2358
2358
  }
2359
2359
  function clsx(e2) {
2360
2360
  return "object" == typeof e2 ? (function clsx$1() {
2361
- for (var e3, t2, n2 = 0, s2 = "", i2 = arguments.length; n2 < i2; n2++) (e3 = arguments[n2]) && (t2 = r(e3)) && (s2 && (s2 += " "), s2 += t2);
2361
+ for (var e3, t2, n2 = 0, s2 = "", o2 = arguments.length; n2 < o2; n2++) (e3 = arguments[n2]) && (t2 = r(e3)) && (s2 && (s2 += " "), s2 += t2);
2362
2362
  return s2;
2363
2363
  })(e2) : e2 ?? "";
2364
2364
  }
2365
- const Oe = [..." \n\r\f \v\uFEFF"];
2365
+ const Me = [..." \n\r\f \v\uFEFF"];
2366
2366
  function append_styles(e2, t2 = false) {
2367
2367
  var n2 = t2 ? " !important;" : ";", s2 = "";
2368
- for (var i2 in e2) {
2369
- var o2 = e2[i2];
2370
- null != o2 && "" !== o2 && (s2 += " " + i2 + ": " + o2 + n2);
2368
+ for (var o2 in e2) {
2369
+ var i2 = e2[o2];
2370
+ null != i2 && "" !== i2 && (s2 += " " + o2 + ": " + i2 + n2);
2371
2371
  }
2372
2372
  return s2;
2373
2373
  }
2374
2374
  function to_css_name(e2) {
2375
2375
  return "-" !== e2[0] || "-" !== e2[1] ? e2.toLowerCase() : e2;
2376
2376
  }
2377
- function set_class(e2, t2, n2, s2, i2, o2) {
2377
+ function set_class(e2, t2, n2, s2, o2, i2) {
2378
2378
  var a2 = e2.__className;
2379
2379
  if (a2 !== n2 || void 0 === a2) {
2380
2380
  var l2 = (function to_class(e3, t3, n3) {
2381
2381
  var s3 = null == e3 ? "" : "" + e3;
2382
2382
  if (t3 && (s3 = s3 ? s3 + " " + t3 : t3), n3) {
2383
- for (var i3 in n3) if (n3[i3]) s3 = s3 ? s3 + " " + i3 : i3;
2384
- else if (s3.length) for (var o3 = i3.length, a3 = 0; (a3 = s3.indexOf(i3, a3)) >= 0; ) {
2385
- var l3 = a3 + o3;
2386
- 0 !== a3 && !Oe.includes(s3[a3 - 1]) || l3 !== s3.length && !Oe.includes(s3[l3]) ? a3 = l3 : s3 = (0 === a3 ? "" : s3.substring(0, a3)) + s3.substring(l3 + 1);
2383
+ for (var o3 in n3) if (n3[o3]) s3 = s3 ? s3 + " " + o3 : o3;
2384
+ else if (s3.length) for (var i3 = o3.length, a3 = 0; (a3 = s3.indexOf(o3, a3)) >= 0; ) {
2385
+ var l3 = a3 + i3;
2386
+ 0 !== a3 && !Me.includes(s3[a3 - 1]) || l3 !== s3.length && !Me.includes(s3[l3]) ? a3 = l3 : s3 = (0 === a3 ? "" : s3.substring(0, a3)) + s3.substring(l3 + 1);
2387
2387
  }
2388
2388
  }
2389
2389
  return "" === s3 ? null : s3;
2390
- })(n2, s2, o2);
2390
+ })(n2, s2, i2);
2391
2391
  null == l2 ? e2.removeAttribute("class") : t2 ? e2.className = l2 : e2.setAttribute("class", l2), // @ts-expect-error need to add __className to patched prototype
2392
2392
  e2.__className = n2;
2393
- } else if (o2 && i2 !== o2) for (var c2 in o2) {
2394
- var u2 = !!o2[c2];
2395
- null != i2 && u2 === !!i2[c2] || e2.classList.toggle(c2, u2);
2393
+ } else if (i2 && o2 !== i2) for (var c2 in i2) {
2394
+ var u2 = !!i2[c2];
2395
+ null != o2 && u2 === !!o2[c2] || e2.classList.toggle(c2, u2);
2396
2396
  }
2397
- return o2;
2397
+ return i2;
2398
2398
  }
2399
2399
  function update_styles(e2, t2 = {}, n2, s2) {
2400
- for (var i2 in n2) {
2401
- var o2 = n2[i2];
2402
- t2[i2] !== o2 && (null == n2[i2] ? e2.style.removeProperty(i2) : e2.style.setProperty(i2, o2, s2));
2400
+ for (var o2 in n2) {
2401
+ var i2 = n2[o2];
2402
+ t2[o2] !== i2 && (null == n2[o2] ? e2.style.removeProperty(o2) : e2.style.setProperty(o2, i2, s2));
2403
2403
  }
2404
2404
  }
2405
2405
  function set_style(e2, t2, n2, s2) {
2406
2406
  if (e2.__style !== t2) {
2407
- var i2 = (function to_style(e3, t3) {
2407
+ var o2 = (function to_style(e3, t3) {
2408
2408
  if (t3) {
2409
- var n3, s3, i3 = "";
2409
+ var n3, s3, o3 = "";
2410
2410
  if (Array.isArray(t3) ? (n3 = t3[0], s3 = t3[1]) : n3 = t3, e3) {
2411
2411
  e3 = String(e3).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
2412
- var o2 = false, a2 = 0, l2 = false, c2 = [];
2412
+ var i2 = false, a2 = 0, l2 = false, c2 = [];
2413
2413
  n3 && c2.push(...Object.keys(n3).map(to_css_name)), s3 && c2.push(...Object.keys(s3).map(to_css_name));
2414
2414
  var u2 = 0, d2 = -1;
2415
2415
  const t4 = e3.length;
2416
2416
  for (var f2 = 0; f2 < t4; f2++) {
2417
2417
  var p2 = e3[f2];
2418
- if (l2 ? "/" === p2 && "*" === e3[f2 - 1] && (l2 = false) : o2 ? o2 === p2 && (o2 = false) : "/" === p2 && "*" === e3[f2 + 1] ? l2 = true : '"' === p2 || "'" === p2 ? o2 = p2 : "(" === p2 ? a2++ : ")" === p2 && a2--, !l2 && false === o2 && 0 === a2) {
2418
+ if (l2 ? "/" === p2 && "*" === e3[f2 - 1] && (l2 = false) : i2 ? i2 === p2 && (i2 = false) : "/" === p2 && "*" === e3[f2 + 1] ? l2 = true : '"' === p2 || "'" === p2 ? i2 = p2 : "(" === p2 ? a2++ : ")" === p2 && a2--, !l2 && false === i2 && 0 === a2) {
2419
2419
  if (":" === p2 && -1 === d2) d2 = f2;
2420
2420
  else if (";" === p2 || f2 === t4 - 1) {
2421
2421
  if (-1 !== d2) {
2422
2422
  var h2 = to_css_name(e3.substring(u2, d2).trim());
2423
- c2.includes(h2) || (";" !== p2 && f2++, i3 += " " + e3.substring(u2, f2).trim() + ";");
2423
+ c2.includes(h2) || (";" !== p2 && f2++, o3 += " " + e3.substring(u2, f2).trim() + ";");
2424
2424
  }
2425
2425
  u2 = f2 + 1, d2 = -1;
2426
2426
  }
2427
2427
  }
2428
2428
  }
2429
2429
  }
2430
- return n3 && (i3 += append_styles(n3)), s3 && (i3 += append_styles(s3, true)), "" === (i3 = i3.trim()) ? null : i3;
2430
+ return n3 && (o3 += append_styles(n3)), s3 && (o3 += append_styles(s3, true)), "" === (o3 = o3.trim()) ? null : o3;
2431
2431
  }
2432
2432
  return null == e3 ? null : String(e3);
2433
2433
  })(t2, s2);
2434
- null == i2 ? e2.removeAttribute("style") : e2.style.cssText = i2, // @ts-expect-error
2434
+ null == o2 ? e2.removeAttribute("style") : e2.style.cssText = o2, // @ts-expect-error
2435
2435
  e2.__style = t2;
2436
2436
  } else s2 && (Array.isArray(s2) ? (update_styles(e2, n2 == null ? void 0 : n2[0], s2[0]), update_styles(e2, n2 == null ? void 0 : n2[1], s2[1], "important")) : update_styles(e2, n2, s2));
2437
2437
  return s2;
@@ -2442,10 +2442,10 @@ function select_option(e2, t2, s2 = false) {
2442
2442
  if (!n(t2)) return (function select_multiple_invalid_value() {
2443
2443
  console.warn("https://svelte.dev/e/select_multiple_invalid_value");
2444
2444
  })();
2445
- for (var i2 of e2.options) i2.selected = t2.includes(get_option_value(i2));
2445
+ for (var o2 of e2.options) o2.selected = t2.includes(get_option_value(o2));
2446
2446
  } else {
2447
- for (i2 of e2.options) {
2448
- if (is(get_option_value(i2), t2)) return void (i2.selected = true);
2447
+ for (o2 of e2.options) {
2448
+ if (is(get_option_value(o2), t2)) return void (o2.selected = true);
2449
2449
  }
2450
2450
  s2 && void 0 === t2 || (e2.selectedIndex = -1);
2451
2451
  }
@@ -2453,7 +2453,7 @@ function select_option(e2, t2, s2 = false) {
2453
2453
  function get_option_value(e2) {
2454
2454
  return "__value" in e2 ? e2.__value : e2.value;
2455
2455
  }
2456
- const Me = Symbol("class"), Ee = Symbol("style"), Ie = Symbol("is custom element"), Te = Symbol("is html");
2456
+ const Oe = Symbol("class"), Ee = Symbol("style"), Ie = Symbol("is custom element"), Te = Symbol("is html");
2457
2457
  function set_selected(e2, t2) {
2458
2458
  t2 ? (
2459
2459
  // The selected option could've changed via user selection, and
@@ -2462,21 +2462,21 @@ function set_selected(e2, t2) {
2462
2462
  ) : e2.removeAttribute("selected");
2463
2463
  }
2464
2464
  function set_attribute(e2, t2, n2, s2) {
2465
- var i2 = get_attributes(e2);
2466
- i2[t2] !== (i2[t2] = n2) && ("loading" === t2 && // @ts-expect-error
2465
+ var o2 = get_attributes(e2);
2466
+ o2[t2] !== (o2[t2] = n2) && ("loading" === t2 && // @ts-expect-error
2467
2467
  (e2[L] = n2), null == n2 ? e2.removeAttribute(t2) : "string" != typeof n2 && get_setters(e2).includes(t2) ? (
2468
2468
  // @ts-ignore
2469
2469
  e2[t2] = n2
2470
2470
  ) : e2.setAttribute(t2, n2));
2471
2471
  }
2472
- function attribute_effect(e2, t2, n2 = [], s2 = [], i2, o2 = false, a2 = false) {
2472
+ function attribute_effect(e2, t2, n2 = [], s2 = [], o2, i2 = false, a2 = false) {
2473
2473
  flatten(n2, s2, (n3) => {
2474
2474
  var s3 = void 0, l2 = {}, c2 = "SELECT" === e2.nodeName, u2 = false;
2475
2475
  if (block(() => {
2476
- var d3 = t2(...n3.map(get$1)), f2 = (function set_attributes(e3, t3, n4, s4, i3 = false, o3 = false) {
2476
+ var d3 = t2(...n3.map(get$1)), f2 = (function set_attributes(e3, t3, n4, s4, o3 = false, i3 = false) {
2477
2477
  var a3 = get_attributes(e3), l3 = a3[Ie], c3 = !a3[Te], u3 = t3 || {}, d4 = "OPTION" === e3.tagName;
2478
2478
  for (var f3 in t3) f3 in n4 || (n4[f3] = null);
2479
- n4.class ? n4.class = clsx(n4.class) : (s4 || n4[Me]) && (n4.class = null), n4[Ee] && (n4.style ?? (n4.style = null));
2479
+ n4.class ? n4.class = clsx(n4.class) : (s4 || n4[Oe]) && (n4.class = null), n4[Ee] && (n4.style ?? (n4.style = null));
2480
2480
  var p3 = get_setters(e3);
2481
2481
  for (const b2 in n4) {
2482
2482
  let y2 = n4[b2];
@@ -2537,8 +2537,8 @@ function attribute_effect(e2, t2, n2 = [], s2 = [], i2, o2 = false, a2 = false)
2537
2537
  k2.removeAttribute(v2), k2.defaultValue = C2, // @ts-ignore
2538
2538
  k2.value = k2.__value = S2 ? C2 : null;
2539
2539
  } else {
2540
- let O2 = k2.defaultChecked;
2541
- k2.removeAttribute(v2), k2.defaultChecked = O2, k2.checked = !!S2 && O2;
2540
+ let M2 = k2.defaultChecked;
2541
+ k2.removeAttribute(v2), k2.defaultChecked = M2, k2.checked = !!S2 && M2;
2542
2542
  }
2543
2543
  } else e3.removeAttribute(b2);
2544
2544
  }
@@ -2546,10 +2546,10 @@ function attribute_effect(e2, t2, n2 = [], s2 = [], i2, o2 = false, a2 = false)
2546
2546
  e3.value = e3.__value = y2;
2547
2547
  }
2548
2548
  } else set_style(e3, y2, t3 == null ? void 0 : t3[Ee], n4[Ee]), u3[b2] = y2, u3[Ee] = n4[Ee];
2549
- else set_class(e3, "http://www.w3.org/1999/xhtml" === e3.namespaceURI, y2, s4, t3 == null ? void 0 : t3[Me], n4[Me]), u3[b2] = y2, u3[Me] = n4[Me];
2549
+ else set_class(e3, "http://www.w3.org/1999/xhtml" === e3.namespaceURI, y2, s4, t3 == null ? void 0 : t3[Oe], n4[Oe]), u3[b2] = y2, u3[Oe] = n4[Oe];
2550
2550
  }
2551
2551
  return u3;
2552
- })(e2, s3, d3, i2, o2, a2);
2552
+ })(e2, s3, d3, o2, i2, a2);
2553
2553
  u2 && c2 && "value" in d3 && select_option(
2554
2554
  /** @type {HTMLSelectElement} */
2555
2555
  e2,
@@ -2606,9 +2606,9 @@ function get_setters(e2) {
2606
2606
  var t2, n2 = e2.getAttribute("is") || e2.nodeName, s2 = Pe.get(n2);
2607
2607
  if (s2) return s2;
2608
2608
  Pe.set(n2, s2 = []);
2609
- for (var i2 = e2, o2 = Element.prototype; o2 !== i2; ) {
2610
- for (var a2 in t2 = l(i2)) t2[a2].set && s2.push(a2);
2611
- i2 = d(i2);
2609
+ for (var o2 = e2, i2 = Element.prototype; i2 !== o2; ) {
2610
+ for (var a2 in t2 = l(o2)) t2[a2].set && s2.push(a2);
2611
+ o2 = d(o2);
2612
2612
  }
2613
2613
  return s2;
2614
2614
  }
@@ -2655,9 +2655,9 @@ function css_to_keyframe(e2) {
2655
2655
  }
2656
2656
  const linear$1 = (e2) => e2;
2657
2657
  function transition(e2, t2, n2, s2) {
2658
- var i2, o2, a2, l2 = !!(1 & e2), c2 = !!(2 & e2), u2 = !!(4 & e2), d2 = l2 && c2 ? "both" : l2 ? "in" : "out", f2 = t2.inert, h2 = t2.style.overflow;
2658
+ var o2, i2, a2, l2 = !!(1 & e2), c2 = !!(2 & e2), u2 = !!(4 & e2), d2 = l2 && c2 ? "both" : l2 ? "in" : "out", f2 = t2.inert, h2 = t2.style.overflow;
2659
2659
  function get_options() {
2660
- return without_reactive_context(() => i2 ?? (i2 = n2()(t2, (s2 == null ? void 0 : s2()) ?? /** @type {P} */
2660
+ return without_reactive_context(() => o2 ?? (o2 = n2()(t2, (s2 == null ? void 0 : s2()) ?? /** @type {P} */
2661
2661
  {}, {
2662
2662
  direction: d2
2663
2663
  })));
@@ -2669,19 +2669,19 @@ function transition(e2, t2, n2, s2) {
2669
2669
  if (t2.inert = f2, !l2) return a2 == null ? void 0 : a2.abort(), void ((_a2 = a2 == null ? void 0 : a2.reset) == null ? void 0 : _a2.call(a2));
2670
2670
  c2 || // if we intro then outro then intro again, we want to abort the first intro,
2671
2671
  // if it's not a bidirectional transition
2672
- (o2 == null ? void 0 : o2.abort()), dispatch_event(t2, "introstart"), o2 = animate(t2, get_options(), a2, 1, () => {
2672
+ (i2 == null ? void 0 : i2.abort()), dispatch_event(t2, "introstart"), i2 = animate(t2, get_options(), a2, 1, () => {
2673
2673
  dispatch_event(t2, "introend"), // Ensure we cancel the animation to prevent leaking
2674
- o2 == null ? void 0 : o2.abort(), o2 = i2 = void 0, t2.style.overflow = h2;
2674
+ i2 == null ? void 0 : i2.abort(), i2 = o2 = void 0, t2.style.overflow = h2;
2675
2675
  });
2676
2676
  },
2677
2677
  out(e3) {
2678
- if (!c2) return e3 == null ? void 0 : e3(), void (i2 = void 0);
2679
- t2.inert = true, dispatch_event(t2, "outrostart"), a2 = animate(t2, get_options(), o2, 0, () => {
2678
+ if (!c2) return e3 == null ? void 0 : e3(), void (o2 = void 0);
2679
+ t2.inert = true, dispatch_event(t2, "outrostart"), a2 = animate(t2, get_options(), i2, 0, () => {
2680
2680
  dispatch_event(t2, "outroend"), e3 == null ? void 0 : e3();
2681
2681
  });
2682
2682
  },
2683
2683
  stop: () => {
2684
- o2 == null ? void 0 : o2.abort(), a2 == null ? void 0 : a2.abort();
2684
+ i2 == null ? void 0 : i2.abort(), a2 == null ? void 0 : a2.abort();
2685
2685
  }
2686
2686
  }, _2 = (
2687
2687
  /** @type {Effect} */
@@ -2701,16 +2701,16 @@ function transition(e2, t2, n2, s2) {
2701
2701
  });
2702
2702
  }
2703
2703
  }
2704
- function animate(e2, t2, n2, s2, i2) {
2705
- var o2 = 1 === s2;
2704
+ function animate(e2, t2, n2, s2, o2) {
2705
+ var i2 = 1 === s2;
2706
2706
  if (is_function(t2)) {
2707
2707
  var a2, l2 = false;
2708
2708
  return queue_micro_task(() => {
2709
2709
  if (!l2) {
2710
2710
  var c3 = t2({
2711
- direction: o2 ? "in" : "out"
2711
+ direction: i2 ? "in" : "out"
2712
2712
  });
2713
- a2 = animate(e2, c3, n2, s2, i2);
2713
+ a2 = animate(e2, c3, n2, s2, o2);
2714
2714
  }
2715
2715
  }), {
2716
2716
  abort: () => {
@@ -2721,7 +2721,7 @@ function animate(e2, t2, n2, s2, i2) {
2721
2721
  t: () => a2.t()
2722
2722
  };
2723
2723
  }
2724
- if (n2 == null ? void 0 : n2.deactivate(), !(t2 == null ? void 0 : t2.duration)) return i2(), {
2724
+ if (n2 == null ? void 0 : n2.deactivate(), !(t2 == null ? void 0 : t2.duration)) return o2(), {
2725
2725
  abort: noop,
2726
2726
  deactivate: noop,
2727
2727
  reset: noop,
@@ -2729,7 +2729,7 @@ function animate(e2, t2, n2, s2, i2) {
2729
2729
  };
2730
2730
  const { delay: c2 = 0, css: u2, tick: d2, easing: f2 = linear$1 } = t2;
2731
2731
  var p2 = [];
2732
- if (o2 && void 0 === n2 && (d2 && d2(0, 1), u2)) {
2732
+ if (i2 && void 0 === n2 && (d2 && d2(0, 1), u2)) {
2733
2733
  var h2 = css_to_keyframe(u2(0, 1));
2734
2734
  p2.push(h2, h2);
2735
2735
  }
@@ -2739,9 +2739,9 @@ function animate(e2, t2, n2, s2, i2) {
2739
2739
  });
2740
2740
  return g2.onfinish = () => {
2741
2741
  g2.cancel();
2742
- var o3 = (n2 == null ? void 0 : n2.t()) ?? 1 - s2;
2742
+ var i3 = (n2 == null ? void 0 : n2.t()) ?? 1 - s2;
2743
2743
  n2 == null ? void 0 : n2.abort();
2744
- var a3 = s2 - o3, l3 = (
2744
+ var a3 = s2 - i3, l3 = (
2745
2745
  /** @type {number} */
2746
2746
  t2.duration * Math.abs(a3)
2747
2747
  ), c3 = [];
@@ -2749,7 +2749,7 @@ function animate(e2, t2, n2, s2, i2) {
2749
2749
  var p3 = false;
2750
2750
  if (u2)
2751
2751
  for (var h3 = Math.ceil(l3 / (1e3 / 60)), _2 = 0; _2 <= h3; _2 += 1) {
2752
- var v2 = o3 + a3 * f2(_2 / h3), m2 = css_to_keyframe(u2(v2, 1 - v2));
2752
+ var v2 = i3 + a3 * f2(_2 / h3), m2 = css_to_keyframe(u2(v2, 1 - v2));
2753
2753
  c3.push(m2), p3 || (p3 = "hidden" === m2.overflow);
2754
2754
  }
2755
2755
  p3 && /** @type {HTMLElement} */
@@ -2759,7 +2759,7 @@ function animate(e2, t2, n2, s2, i2) {
2759
2759
  /** @type {globalThis.Animation} */
2760
2760
  g2.currentTime
2761
2761
  );
2762
- return o3 + a3 * f2(e3 / l3);
2762
+ return i3 + a3 * f2(e3 / l3);
2763
2763
  }, d2 && (function loop(e3) {
2764
2764
  let t3;
2765
2765
  return 0 === Le.tasks.size && Le.tick(run_tasks), {
@@ -2783,7 +2783,7 @@ function animate(e2, t2, n2, s2, i2) {
2783
2783
  duration: l3,
2784
2784
  fill: "forwards"
2785
2785
  })).onfinish = () => {
2786
- get_t = () => s2, d2 == null ? void 0 : d2(s2, 1 - s2), i2();
2786
+ get_t = () => s2, d2 == null ? void 0 : d2(s2, 1 - s2), o2();
2787
2787
  };
2788
2788
  }, {
2789
2789
  abort: () => {
@@ -2794,7 +2794,7 @@ function animate(e2, t2, n2, s2, i2) {
2794
2794
  g2.onfinish = noop);
2795
2795
  },
2796
2796
  deactivate: () => {
2797
- i2 = noop;
2797
+ o2 = noop;
2798
2798
  },
2799
2799
  reset: () => {
2800
2800
  0 === s2 && (d2 == null ? void 0 : d2(1, 0));
@@ -2857,17 +2857,17 @@ function is_bound_this(e2, t2) {
2857
2857
  }
2858
2858
  function bind_this(e2 = {}, t2, n2, s2) {
2859
2859
  return effect(() => {
2860
- var s3, i2;
2860
+ var s3, o2;
2861
2861
  return render_effect(() => {
2862
- s3 = i2, // We only track changes to the parts, not the value itself to avoid unnecessary reruns.
2863
- i2 = [], untrack(() => {
2864
- e2 !== n2(...i2) && (t2(e2, ...i2), // If this is an effect rerun (cause: each block context changes), then nullfiy the binding at
2862
+ s3 = o2, // We only track changes to the parts, not the value itself to avoid unnecessary reruns.
2863
+ o2 = [], untrack(() => {
2864
+ e2 !== n2(...o2) && (t2(e2, ...o2), // If this is an effect rerun (cause: each block context changes), then nullfiy the binding at
2865
2865
  // the previous position if it isn't already taken over by a different effect.
2866
2866
  s3 && is_bound_this(n2(...s3), e2) && t2(null, ...s3));
2867
2867
  });
2868
2868
  }), () => {
2869
2869
  queue_micro_task(() => {
2870
- i2 && is_bound_this(n2(...i2), e2) && t2(null, ...i2);
2870
+ o2 && is_bound_this(n2(...o2), e2) && t2(null, ...o2);
2871
2871
  });
2872
2872
  };
2873
2873
  }), e2;
@@ -2886,8 +2886,8 @@ function init(e2 = false) {
2886
2886
  );
2887
2887
  const s2 = /* @__PURE__ */ derived(() => {
2888
2888
  let s3 = false;
2889
- const i2 = t2.s;
2890
- for (const e4 in i2) i2[e4] !== n3[e4] && (n3[e4] = i2[e4], s3 = true);
2889
+ const o2 = t2.s;
2890
+ for (const e4 in o2) o2[e4] !== n3[e4] && (n3[e4] = o2[e4], s3 = true);
2891
2891
  return s3 && e3++, e3;
2892
2892
  });
2893
2893
  props = () => get$1(s2);
@@ -2919,14 +2919,14 @@ function store_get(e2, t2, n2) {
2919
2919
  if (s2.store !== e2 && !(De in n2)) if (s2.unsubscribe(), s2.store = e2 ?? null, null == e2) s2.source.v = void 0, // see synchronous callback comment below
2920
2920
  s2.unsubscribe = noop;
2921
2921
  else {
2922
- var i2 = true;
2922
+ var o2 = true;
2923
2923
  s2.unsubscribe = subscribe_to_store(e2, (e3) => {
2924
- i2 ? (
2924
+ o2 ? (
2925
2925
  // If the first updates to the store value (possibly multiple of them) are synchronously
2926
2926
  // inside a derived, we will hit the `state_unsafe_mutation` error if we `set` the value
2927
2927
  s2.source.v = e3
2928
2928
  ) : set(s2.source, e3);
2929
- }), i2 = false;
2929
+ }), o2 = false;
2930
2930
  }
2931
2931
  return e2 && De in n2 ? get(e2) : get$1(s2.source);
2932
2932
  }
@@ -2940,7 +2940,7 @@ function setup_stores() {
2940
2940
  for (var t2 in e2) {
2941
2941
  e2[t2].unsubscribe();
2942
2942
  }
2943
- o(e2, De, {
2943
+ i(e2, De, {
2944
2944
  enumerable: false,
2945
2945
  value: true
2946
2946
  });
@@ -3028,10 +3028,10 @@ const Ne = {
3028
3028
  set(e2, t2, n2) {
3029
3029
  let s2 = e2.props.length;
3030
3030
  for (; s2--; ) {
3031
- let i2 = e2.props[s2];
3032
- is_function(i2) && (i2 = i2());
3033
- const o2 = a(i2, t2);
3034
- if (o2 && o2.set) return o2.set(n2), true;
3031
+ let o2 = e2.props[s2];
3032
+ is_function(o2) && (o2 = o2());
3033
+ const i2 = a(o2, t2);
3034
+ if (i2 && i2.set) return i2.set(n2), true;
3035
3035
  }
3036
3036
  return false;
3037
3037
  },
@@ -3069,7 +3069,7 @@ function spread_props(...e2) {
3069
3069
  }
3070
3070
  function prop(e2, t2, n2, s2) {
3071
3071
  var _a2;
3072
- var i2, o2, l2 = !A || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = (
3072
+ var o2, i2, l2 = !A || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = (
3073
3073
  /** @type {V} */
3074
3074
  s2
3075
3075
  ), f2 = true, get_fallback = () => (f2 && (f2 = false, d2 = u2 ? untrack(
@@ -3081,10 +3081,10 @@ function prop(e2, t2, n2, s2) {
3081
3081
  )), d2);
3082
3082
  if (c2) {
3083
3083
  var p2 = T in e2 || P in e2;
3084
- i2 = ((_a2 = a(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 ? (n3) => e2[t2] = n3 : void 0);
3084
+ o2 = ((_a2 = a(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 ? (n3) => e2[t2] = n3 : void 0);
3085
3085
  }
3086
3086
  var h2, g2 = false;
3087
- if (c2 ? [o2, g2] = (function capture_store_binding(e3) {
3087
+ if (c2 ? [i2, g2] = (function capture_store_binding(e3) {
3088
3088
  var t3 = Ae;
3089
3089
  try {
3090
3090
  return Ae = false, [e3(), Ae];
@@ -3094,10 +3094,10 @@ function prop(e2, t2, n2, s2) {
3094
3094
  })(() => (
3095
3095
  /** @type {V} */
3096
3096
  e2[t2]
3097
- )) : o2 = /** @type {V} */
3098
- e2[t2], void 0 === o2 && void 0 !== s2 && (o2 = get_fallback(), i2 && (l2 && (function props_invalid_value(e3) {
3097
+ )) : i2 = /** @type {V} */
3098
+ e2[t2], void 0 === i2 && void 0 !== s2 && (i2 = get_fallback(), o2 && (l2 && (function props_invalid_value(e3) {
3099
3099
  throw new Error("https://svelte.dev/e/props_invalid_value");
3100
- })(), i2(o2))), h2 = l2 ? () => {
3100
+ })(), o2(i2))), h2 = l2 ? () => {
3101
3101
  var n3 = (
3102
3102
  /** @type {V} */
3103
3103
  e2[t2]
@@ -3115,7 +3115,7 @@ function prop(e2, t2, n2, s2) {
3115
3115
  (d2 = /** @type {V} */
3116
3116
  void 0), void 0 === n3 ? d2 : n3;
3117
3117
  }, l2 && !(4 & n2)) return h2;
3118
- if (i2) {
3118
+ if (o2) {
3119
3119
  var _2 = e2.$$legacy;
3120
3120
  return function(e3, t3) {
3121
3121
  return arguments.length > 0 ? (
@@ -3124,7 +3124,7 @@ function prop(e2, t2, n2, s2) {
3124
3124
  // If the parent is not in runes mode, we need to notify on mutation, too, that the prop
3125
3125
  // has changed because the parent will not be able to detect the change otherwise.
3126
3126
  (l2 && t3 && !_2 && !g2 || /** @type {Function} */
3127
- i2(t3 ? h2() : e3), e3)
3127
+ o2(t3 ? h2() : e3), e3)
3128
3128
  ) : h2();
3129
3129
  };
3130
3130
  }
@@ -3197,9 +3197,9 @@ function writable(e2, t2 = noop) {
3197
3197
  return {
3198
3198
  set: set2,
3199
3199
  update: update2,
3200
- subscribe: function subscribe(i2, o2 = noop) {
3201
- const a2 = [i2, o2];
3202
- return s2.add(a2), 1 === s2.size && (n2 = t2(set2, update2) || noop), i2(
3200
+ subscribe: function subscribe(o2, i2 = noop) {
3201
+ const a2 = [o2, i2];
3202
+ return s2.add(a2), 1 === s2.size && (n2 = t2(set2, update2) || noop), o2(
3203
3203
  /** @type {T} */
3204
3204
  e2
3205
3205
  ), () => {
@@ -3319,12 +3319,12 @@ const Ye = new (_c = class {
3319
3319
  })(__privateGet(this, _F), e2);
3320
3320
  }
3321
3321
  }, _G = new WeakMap(), _F = new WeakMap(), _c)("<Toaster/>");
3322
- let Ue = 0;
3323
- const Ve = new (_d = class {
3322
+ let Ve = 0;
3323
+ const Ue = new (_d = class {
3324
3324
  constructor() {
3325
3325
  __privateAdd(this, _H, /* @__PURE__ */ state(proxy([])));
3326
3326
  __privateAdd(this, _Y, /* @__PURE__ */ state(proxy([])));
3327
- __privateAdd(this, _U, (e2) => {
3327
+ __privateAdd(this, _V, (e2) => {
3328
3328
  const t2 = this.toasts.findIndex((t3) => t3.id === e2);
3329
3329
  return -1 === t2 ? null : t2;
3330
3330
  });
@@ -3332,9 +3332,9 @@ const Ve = new (_d = class {
3332
3332
  Fe && this.toasts.unshift(e2);
3333
3333
  });
3334
3334
  __publicField(this, "updateToast", ({ id: e2, data: t2, type: n2, message: s2 }) => {
3335
- const i2 = this.toasts.findIndex((t3) => t3.id === e2), o2 = this.toasts[i2];
3336
- this.toasts[i2] = {
3337
- ...o2,
3335
+ const o2 = this.toasts.findIndex((t3) => t3.id === e2), i2 = this.toasts[o2];
3336
+ this.toasts[o2] = {
3337
+ ...i2,
3338
3338
  ...t2,
3339
3339
  id: e2,
3340
3340
  title: s2,
@@ -3344,21 +3344,21 @@ const Ve = new (_d = class {
3344
3344
  });
3345
3345
  __publicField(this, "create", (e2) => {
3346
3346
  var _a2;
3347
- const { message: t2, ...n2 } = e2, s2 = "number" == typeof (e2 == null ? void 0 : e2.id) || e2.id && ((_a2 = e2.id) == null ? void 0 : _a2.length) > 0 ? e2.id : Ue++, i2 = void 0 === e2.dismissable || e2.dismissable, o2 = void 0 === e2.type ? "default" : e2.type;
3347
+ const { message: t2, ...n2 } = e2, s2 = "number" == typeof (e2 == null ? void 0 : e2.id) || e2.id && ((_a2 = e2.id) == null ? void 0 : _a2.length) > 0 ? e2.id : Ve++, o2 = void 0 === e2.dismissable || e2.dismissable, i2 = void 0 === e2.type ? "default" : e2.type;
3348
3348
  return untrack(() => {
3349
3349
  const a2 = this.toasts.find((e3) => e3.id === s2);
3350
3350
  a2 ? this.updateToast({
3351
3351
  id: s2,
3352
3352
  data: e2,
3353
- type: o2,
3353
+ type: i2,
3354
3354
  message: t2,
3355
- dismissable: i2
3355
+ dismissable: o2
3356
3356
  }) : this.addToast({
3357
3357
  ...n2,
3358
3358
  id: s2,
3359
3359
  title: t2,
3360
- dismissable: i2,
3361
- type: o2
3360
+ dismissable: o2,
3361
+ type: i2
3362
3362
  });
3363
3363
  }), s2;
3364
3364
  });
@@ -3377,7 +3377,7 @@ const Ve = new (_d = class {
3377
3377
  __publicField(this, "remove", (e2) => {
3378
3378
  if (void 0 === e2)
3379
3379
  return void (this.toasts = []);
3380
- const t2 = __privateGet(this, _U).call(this, e2);
3380
+ const t2 = __privateGet(this, _V).call(this, e2);
3381
3381
  return null !== t2 ? (this.toasts.splice(t2, 1), e2) : void 0;
3382
3382
  });
3383
3383
  __publicField(this, "message", (e2, t2) => this.create({
@@ -3421,10 +3421,10 @@ const Ve = new (_d = class {
3421
3421
  message: "string" == typeof t2.loading ? t2.loading : t2.loading()
3422
3422
  }));
3423
3423
  const s2 = e2 instanceof Promise ? e2 : e2();
3424
- let i2 = void 0 !== n2;
3424
+ let o2 = void 0 !== n2;
3425
3425
  return s2.then((e3) => {
3426
3426
  if ("object" == typeof e3 && e3 && "ok" in e3 && "boolean" == typeof e3.ok && !e3.ok) {
3427
- i2 = false;
3427
+ o2 = false;
3428
3428
  const t3 = (function constructPromiseErrorMessage(e4) {
3429
3429
  if (e4 && "object" == typeof e4 && "status" in e4) return `HTTP error! Status: ${e4.status}`;
3430
3430
  return `Error! ${e4}`;
@@ -3435,7 +3435,7 @@ const Ve = new (_d = class {
3435
3435
  message: t3
3436
3436
  });
3437
3437
  } else if (void 0 !== t2.success) {
3438
- i2 = false;
3438
+ o2 = false;
3439
3439
  const s3 = "function" == typeof t2.success ? t2.success(e3) : t2.success;
3440
3440
  this.create({
3441
3441
  id: n2,
@@ -3445,7 +3445,7 @@ const Ve = new (_d = class {
3445
3445
  }
3446
3446
  }).catch((e3) => {
3447
3447
  if (void 0 !== t2.error) {
3448
- i2 = false;
3448
+ o2 = false;
3449
3449
  const s3 = "function" == typeof t2.error ? t2.error(e3) : t2.error;
3450
3450
  this.create({
3451
3451
  id: n2,
@@ -3455,12 +3455,12 @@ const Ve = new (_d = class {
3455
3455
  }
3456
3456
  }).finally(() => {
3457
3457
  var _a2;
3458
- i2 && // Toast is still in load state (and will be indefinitely — dismiss it)
3458
+ o2 && // Toast is still in load state (and will be indefinitely — dismiss it)
3459
3459
  (this.dismiss(n2), n2 = void 0), (_a2 = t2.finally) == null ? void 0 : _a2.call(t2);
3460
3460
  }), n2;
3461
3461
  });
3462
3462
  __publicField(this, "custom", (e2, t2) => {
3463
- const n2 = (t2 == null ? void 0 : t2.id) || Ue++;
3463
+ const n2 = (t2 == null ? void 0 : t2.id) || Ve++;
3464
3464
  return this.create({
3465
3465
  component: e2,
3466
3466
  id: n2,
@@ -3471,7 +3471,7 @@ const Ve = new (_d = class {
3471
3471
  this.heights = this.heights.filter((t2) => t2.toastId !== e2);
3472
3472
  });
3473
3473
  __publicField(this, "setHeight", (e2) => {
3474
- const t2 = __privateGet(this, _U).call(this, e2.toastId);
3474
+ const t2 = __privateGet(this, _V).call(this, e2.toastId);
3475
3475
  null !== t2 ? this.heights[t2] = e2 : this.heights.push(e2);
3476
3476
  });
3477
3477
  __publicField(this, "reset", () => {
@@ -3490,35 +3490,35 @@ const Ve = new (_d = class {
3490
3490
  set heights(e2) {
3491
3491
  set(__privateGet(this, _Y), e2, true);
3492
3492
  }
3493
- }, _H = new WeakMap(), _Y = new WeakMap(), _U = new WeakMap(), _d)();
3493
+ }, _H = new WeakMap(), _Y = new WeakMap(), _V = new WeakMap(), _d)();
3494
3494
  class SonnerState {
3495
3495
  constructor() {
3496
3496
  /**
3497
3497
  * A derived state of the toasts that are not dismissed.
3498
3498
  */
3499
- __privateAdd(this, _V, user_derived(() => Ve.toasts.filter((e2) => !e2.dismiss)));
3499
+ __privateAdd(this, _U, user_derived(() => Ue.toasts.filter((e2) => !e2.dismiss)));
3500
3500
  }
3501
3501
  get toasts() {
3502
- return get$1(__privateGet(this, _V));
3502
+ return get$1(__privateGet(this, _U));
3503
3503
  }
3504
3504
  }
3505
- _V = new WeakMap();
3505
+ _U = new WeakMap();
3506
3506
  const Ke = function toastFunction(e2, t2) {
3507
- return Ve.create({
3507
+ return Ue.create({
3508
3508
  message: e2,
3509
3509
  ...t2
3510
3510
  });
3511
3511
  }, Xe = Object.assign(Ke, {
3512
- success: Ve.success,
3513
- info: Ve.info,
3514
- warning: Ve.warning,
3515
- error: Ve.error,
3516
- custom: Ve.custom,
3517
- message: Ve.message,
3518
- promise: Ve.promise,
3519
- dismiss: Ve.dismiss,
3520
- loading: Ve.loading,
3521
- getActiveToasts: () => Ve.toasts.filter((e2) => !e2.dismiss)
3512
+ success: Ue.success,
3513
+ info: Ue.info,
3514
+ warning: Ue.warning,
3515
+ error: Ue.error,
3516
+ custom: Ue.custom,
3517
+ message: Ue.message,
3518
+ promise: Ue.promise,
3519
+ dismiss: Ue.dismiss,
3520
+ loading: Ue.loading,
3521
+ getActiveToasts: () => Ue.toasts.filter((e2) => !e2.dismiss)
3522
3522
  });
3523
3523
  function isAction(e2) {
3524
3524
  return void 0 !== e2.label;
@@ -3564,9 +3564,9 @@ var Je = /* @__PURE__ */ from_html("<div><!></div>"), on_click$4 = (
3564
3564
  // handle horizontal swipes
3565
3565
  // Smoothly transition to dampened movement
3566
3566
  // Ensure we don't jump when transitioning to dampened movement
3567
- (e2, t2, n2, s2, i2) => {
3567
+ (e2, t2, n2, s2, o2) => {
3568
3568
  var _a2, _b3;
3569
- !get$1(t2) && get$1(n2) && (s2(), (_b3 = (_a2 = i2.toast).onDismiss) == null ? void 0 : _b3.call(_a2, i2.toast));
3569
+ !get$1(t2) && get$1(n2) && (s2(), (_b3 = (_a2 = o2.toast).onDismiss) == null ? void 0 : _b3.call(_a2, o2.toast));
3570
3570
  }
3571
3571
  ), Qe = /* @__PURE__ */ from_html('<button data-close-button=""><!></button>'), et = /* @__PURE__ */ from_html('<div data-icon=""><!> <!></div>'), tt = /* @__PURE__ */ from_html('<div data-description=""><!></div>'), on_click_1$2 = (e2, t2, n2, s2) => {
3572
3572
  var _a2, _b3;
@@ -3574,7 +3574,7 @@ var Je = /* @__PURE__ */ from_html("<div><!></div>"), on_click$4 = (
3574
3574
  }, nt = /* @__PURE__ */ from_html('<button data-button="" data-cancel=""> </button>'), on_click_2 = (e2, t2, n2) => {
3575
3575
  var _a2;
3576
3576
  isAction(t2.toast.action) && ((_a2 = t2.toast.action) == null ? void 0 : _a2.onClick(e2), e2.defaultPrevented || n2());
3577
- }, rt = /* @__PURE__ */ from_html('<button data-button=""> </button>'), st = /* @__PURE__ */ from_html('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>', 1), it = /* @__PURE__ */ from_html('<li data-sonner-toast=""><!> <!></li>');
3577
+ }, rt = /* @__PURE__ */ from_html('<button data-button=""> </button>'), st = /* @__PURE__ */ from_html('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>', 1), ot = /* @__PURE__ */ from_html('<li data-sonner-toast=""><!> <!></li>');
3578
3578
  function Toast(e2, t2) {
3579
3579
  push(t2, true);
3580
3580
  const LoadingIcon = (e3) => {
@@ -3614,14 +3614,14 @@ function Toast(e2, t2) {
3614
3614
  t2.loadingIcon ? e4(consequent) : e4(alternate, false);
3615
3615
  }), append(e3, n3);
3616
3616
  };
3617
- let n2 = prop(t2, "cancelButtonStyle", 3, ""), s2 = prop(t2, "actionButtonStyle", 3, ""), i2 = prop(t2, "descriptionClass", 3, ""), o2 = prop(t2, "unstyled", 3, false), a2 = prop(t2, "defaultRichColors", 3, false);
3617
+ let n2 = prop(t2, "cancelButtonStyle", 3, ""), s2 = prop(t2, "actionButtonStyle", 3, ""), o2 = prop(t2, "descriptionClass", 3, ""), i2 = prop(t2, "unstyled", 3, false), a2 = prop(t2, "defaultRichColors", 3, false);
3618
3618
  const l2 = {
3619
3619
  ...Ze
3620
3620
  };
3621
3621
  let c2 = /* @__PURE__ */ state(false), u2 = /* @__PURE__ */ state(false), d2 = /* @__PURE__ */ state(false), f2 = /* @__PURE__ */ state(false), p2 = /* @__PURE__ */ state(false), h2 = /* @__PURE__ */ state(0), g2 = /* @__PURE__ */ state(0), _2 = t2.toast.duration || t2.duration || 4e3, v2 = /* @__PURE__ */ state(void 0), m2 = /* @__PURE__ */ state(null), b2 = /* @__PURE__ */ state(null);
3622
- const y2 = user_derived(() => 0 === t2.index), w2 = user_derived(() => t2.index + 1 <= t2.visibleToasts), $2 = user_derived(() => t2.toast.type), x2 = user_derived(() => false !== t2.toast.dismissable), k2 = user_derived(() => t2.toast.class || ""), S2 = user_derived(() => t2.toast.descriptionClass || ""), C2 = user_derived(() => Ve.heights.findIndex((e3) => e3.toastId === t2.toast.id) || 0), O2 = user_derived(() => t2.toast.closeButton ?? t2.closeButton), M2 = user_derived(() => t2.toast.duration ?? t2.duration ?? 4e3);
3622
+ const y2 = user_derived(() => 0 === t2.index), w2 = user_derived(() => t2.index + 1 <= t2.visibleToasts), $2 = user_derived(() => t2.toast.type), x2 = user_derived(() => false !== t2.toast.dismissable), k2 = user_derived(() => t2.toast.class || ""), S2 = user_derived(() => t2.toast.descriptionClass || ""), C2 = user_derived(() => Ue.heights.findIndex((e3) => e3.toastId === t2.toast.id) || 0), M2 = user_derived(() => t2.toast.closeButton ?? t2.closeButton), O2 = user_derived(() => t2.toast.duration ?? t2.duration ?? 4e3);
3623
3623
  let E2 = null;
3624
- const I2 = user_derived(() => t2.position.split("-")), T2 = user_derived(() => Ve.heights.reduce((e3, t3, n3) => n3 >= get$1(C2) ? e3 : e3 + t3.height, 0)), P2 = (function useDocumentHidden() {
3624
+ const I2 = user_derived(() => t2.position.split("-")), T2 = user_derived(() => Ue.heights.reduce((e3, t3, n3) => n3 >= get$1(C2) ? e3 : e3 + t3.height, 0)), P2 = (function useDocumentHidden() {
3625
3625
  let e3 = /* @__PURE__ */ state(proxy("undefined" != typeof document && document.hidden));
3626
3626
  return user_effect(() => on(document, "visibilitychange", () => {
3627
3627
  set(e3, document.hidden, true);
@@ -3638,8 +3638,8 @@ function Toast(e2, t2) {
3638
3638
  const q2 = user_derived(() => Math.round(14 * get$1(C2) + get$1(T2)));
3639
3639
  function deleteToast() {
3640
3640
  set(u2, true), // save the offset for the exit swipe animation
3641
- set(h2, get$1(q2), true), Ve.removeHeight(t2.toast.id), setTimeout(() => {
3642
- Ve.remove(t2.toast.id);
3641
+ set(h2, get$1(q2), true), Ue.removeHeight(t2.toast.id), setTimeout(() => {
3642
+ Ue.remove(t2.toast.id);
3643
3643
  }, 200);
3644
3644
  }
3645
3645
  let z2;
@@ -3649,14 +3649,14 @@ function Toast(e2, t2) {
3649
3649
  const n3 = untrack(() => get$1(v2));
3650
3650
  if (void 0 === n3) return;
3651
3651
  n3.style.setProperty("height", "auto");
3652
- const s3 = n3.offsetHeight, i3 = n3.getBoundingClientRect().height, o3 = Math.round(i3 / e3 + Number.EPSILON & 100) / 100;
3652
+ const s3 = n3.offsetHeight, o3 = n3.getBoundingClientRect().height, i3 = Math.round(o3 / e3 + Number.EPSILON & 100) / 100;
3653
3653
  let a3;
3654
3654
  n3.style.removeProperty("height"), // use scaledRectHeight as it's more precise
3655
- a3 = Math.abs(o3 - s3) < 1 ? o3 : s3, set(g2, a3, true), // setHeight reads heights and toasts state. Untrack the call
3655
+ a3 = Math.abs(i3 - s3) < 1 ? i3 : s3, set(g2, a3, true), // setHeight reads heights and toasts state. Untrack the call
3656
3656
  // to avoid triggering this effect when those are modified. e.g. toasts
3657
3657
  // added and removed.
3658
3658
  untrack(() => {
3659
- Ve.setHeight({
3659
+ Ue.setHeight({
3660
3660
  toastId: t2.toast.id,
3661
3661
  height: a3
3662
3662
  });
@@ -3674,7 +3674,7 @@ function Toast(e2, t2) {
3674
3674
  t2.toast.updated && // if the toast has been updated after the initial render,
3675
3675
  // we want to reset the timer and set the remaining time to the
3676
3676
  // new duration
3677
- (clearTimeout(z2), _2 = get$1(M2), startTimer());
3677
+ (clearTimeout(z2), _2 = get$1(O2), startTimer());
3678
3678
  }), user_effect(() => (get$1(R2) || (t2.expanded || t2.interacting || P2.current ? (function pauseTimer() {
3679
3679
  if (get$1(N2) < get$1(B2)) {
3680
3680
  const e3 = (/* @__PURE__ */ new Date()).getTime() - get$1(B2);
@@ -3685,11 +3685,11 @@ function Toast(e2, t2) {
3685
3685
  var _a2;
3686
3686
  set(c2, true);
3687
3687
  const e3 = (_a2 = get$1(v2)) == null ? void 0 : _a2.getBoundingClientRect().height;
3688
- return set(g2, e3, true), Ve.setHeight({
3688
+ return set(g2, e3, true), Ue.setHeight({
3689
3689
  toastId: t2.toast.id,
3690
3690
  height: e3
3691
3691
  }), () => {
3692
- Ve.removeHeight(t2.toast.id);
3692
+ Ue.removeHeight(t2.toast.id);
3693
3693
  };
3694
3694
  }), user_effect(() => {
3695
3695
  t2.toast.delete && untrack(() => {
@@ -3698,39 +3698,39 @@ function Toast(e2, t2) {
3698
3698
  });
3699
3699
  });
3700
3700
  const G2 = user_derived(() => t2.toast.icon ? t2.toast.icon : "success" === get$1($2) ? t2.successIcon : "error" === get$1($2) ? t2.errorIcon : "warning" === get$1($2) ? t2.warningIcon : "info" === get$1($2) ? t2.infoIcon : "loading" === get$1($2) ? t2.loadingIcon : null);
3701
- var F2 = it();
3701
+ var F2 = ot();
3702
3702
  let H2;
3703
3703
  set_attribute(F2, "tabindex", 0), F2.__pointermove = (e3) => {
3704
3704
  var _a2, _b3, _c2;
3705
3705
  if (!E2 || !get$1(x2)) return;
3706
3706
  if ((((_a2 = window.getSelection()) == null ? void 0 : _a2.toString().length) ?? -1) > 0) return;
3707
- const n3 = e3.clientY - E2.y, s3 = e3.clientX - E2.x, i3 = t2.swipeDirections ?? (function getDefaultSwipeDirections(e4) {
3707
+ const n3 = e3.clientY - E2.y, s3 = e3.clientX - E2.x, o3 = t2.swipeDirections ?? (function getDefaultSwipeDirections(e4) {
3708
3708
  const [t3, n4] = e4.split("-"), s4 = [];
3709
3709
  return t3 && s4.push(t3), n4 && s4.push(n4), s4;
3710
3710
  })(t2.position);
3711
3711
  !get$1(m2) && (Math.abs(s3) > 1 || Math.abs(n3) > 1) && set(m2, Math.abs(s3) > Math.abs(n3) ? "x" : "y", true);
3712
- let o3 = {
3712
+ let i3 = {
3713
3713
  x: 0,
3714
3714
  y: 0
3715
3715
  };
3716
3716
  if ("y" === get$1(m2)) {
3717
- if (i3.includes("top") || i3.includes("bottom")) if (i3.includes("top") && n3 < 0 || i3.includes("bottom") && n3 > 0) o3.y = n3;
3717
+ if (o3.includes("top") || o3.includes("bottom")) if (o3.includes("top") && n3 < 0 || o3.includes("bottom") && n3 > 0) i3.y = n3;
3718
3718
  else {
3719
3719
  const e4 = n3 * getDampening(n3);
3720
- o3.y = Math.abs(e4) < Math.abs(n3) ? e4 : n3;
3720
+ i3.y = Math.abs(e4) < Math.abs(n3) ? e4 : n3;
3721
3721
  }
3722
- } else if ("x" === get$1(m2) && (i3.includes("left") || i3.includes("right"))) if (i3.includes("left") && s3 < 0 || i3.includes("right") && s3 > 0) o3.x = s3;
3722
+ } else if ("x" === get$1(m2) && (o3.includes("left") || o3.includes("right"))) if (o3.includes("left") && s3 < 0 || o3.includes("right") && s3 > 0) i3.x = s3;
3723
3723
  else {
3724
3724
  const e4 = s3 * getDampening(s3);
3725
- o3.x = Math.abs(e4) < Math.abs(s3) ? e4 : s3;
3725
+ i3.x = Math.abs(e4) < Math.abs(s3) ? e4 : s3;
3726
3726
  }
3727
- (Math.abs(o3.x) > 0 || Math.abs(o3.y) > 0) && set(p2, true), (_b3 = get$1(v2)) == null ? void 0 : _b3.style.setProperty("--swipe-amount-x", `${o3.x}px`), (_c2 = get$1(v2)) == null ? void 0 : _c2.style.setProperty("--swipe-amount-y", `${o3.y}px`);
3727
+ (Math.abs(i3.x) > 0 || Math.abs(i3.y) > 0) && set(p2, true), (_b3 = get$1(v2)) == null ? void 0 : _b3.style.setProperty("--swipe-amount-x", `${i3.x}px`), (_c2 = get$1(v2)) == null ? void 0 : _c2.style.setProperty("--swipe-amount-y", `${i3.y}px`);
3728
3728
  }, F2.__pointerup = () => {
3729
3729
  var _a2, _b3, _c2, _d3, _e4, _f2;
3730
3730
  if (get$1(f2) || !get$1(x2)) return;
3731
3731
  E2 = null;
3732
- const e3 = Number(((_a2 = get$1(v2)) == null ? void 0 : _a2.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), n3 = Number(((_b3 = get$1(v2)) == null ? void 0 : _b3.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), s3 = (/* @__PURE__ */ new Date()).getTime() - 0, i3 = "x" === get$1(m2) ? e3 : n3, o3 = Math.abs(i3) / s3;
3733
- if (Math.abs(i3) >= 45 || o3 > 0.11) return set(h2, get$1(q2), true), (_d3 = (_c2 = t2.toast).onDismiss) == null ? void 0 : _d3.call(_c2, t2.toast), "x" === get$1(m2) ? set(b2, e3 > 0 ? "right" : "left", true) : set(b2, n3 > 0 ? "down" : "up", true), deleteToast(), void set(f2, true);
3732
+ const e3 = Number(((_a2 = get$1(v2)) == null ? void 0 : _a2.style.getPropertyValue("--swipe-amount-x").replace("px", "")) || 0), n3 = Number(((_b3 = get$1(v2)) == null ? void 0 : _b3.style.getPropertyValue("--swipe-amount-y").replace("px", "")) || 0), s3 = (/* @__PURE__ */ new Date()).getTime() - 0, o3 = "x" === get$1(m2) ? e3 : n3, i3 = Math.abs(o3) / s3;
3733
+ if (Math.abs(o3) >= 45 || i3 > 0.11) return set(h2, get$1(q2), true), (_d3 = (_c2 = t2.toast).onDismiss) == null ? void 0 : _d3.call(_c2, t2.toast), "x" === get$1(m2) ? set(b2, e3 > 0 ? "right" : "left", true) : set(b2, n3 > 0 ? "down" : "up", true), deleteToast(), void set(f2, true);
3734
3734
  (_e4 = get$1(v2)) == null ? void 0 : _e4.style.setProperty("--swipe-amount-x", "0px"), (_f2 = get$1(v2)) == null ? void 0 : _f2.style.setProperty("--swipe-amount-y", "0px"), set(p2, false), set(d2, false), set(m2, null);
3735
3735
  }, F2.__pointerdown = (e3) => {
3736
3736
  if (get$1(j2)) return;
@@ -3751,9 +3751,9 @@ function Toast(e2, t2) {
3751
3751
  }]), append(e3, n3);
3752
3752
  };
3753
3753
  if_block(Y2, (e3) => {
3754
- get$1(O2) && !t2.toast.component && "loading" !== get$1($2) && null !== t2.closeIcon && e3(consequent_1);
3754
+ get$1(M2) && !t2.toast.component && "loading" !== get$1($2) && null !== t2.closeIcon && e3(consequent_1);
3755
3755
  });
3756
- var U2 = sibling(Y2, 2), consequent_2 = (e3) => {
3756
+ var V2 = sibling(Y2, 2), consequent_2 = (e3) => {
3757
3757
  const n3 = user_derived(() => t2.toast.component);
3758
3758
  var s3 = comment();
3759
3759
  component(first_child(s3), () => get$1(n3), (e4, n4) => {
@@ -3762,7 +3762,7 @@ function Toast(e2, t2) {
3762
3762
  }));
3763
3763
  }), append(e3, s3);
3764
3764
  }, alternate_10 = (e3) => {
3765
- var o3 = st(), a3 = first_child(o3), consequent_11 = (e4) => {
3765
+ var i3 = st(), a3 = first_child(i3), consequent_11 = (e4) => {
3766
3766
  var n3 = et(), s3 = child(n3), consequent_4 = (e5) => {
3767
3767
  var n4 = comment(), s4 = first_child(n4), consequent_3 = (e6) => {
3768
3768
  var n5 = comment();
@@ -3779,7 +3779,7 @@ function Toast(e2, t2) {
3779
3779
  if_block(s3, (e5) => {
3780
3780
  (t2.toast.promise || "loading" === get$1($2)) && e5(consequent_4);
3781
3781
  });
3782
- var i3 = sibling(s3, 2), consequent_10 = (e5) => {
3782
+ var o3 = sibling(s3, 2), consequent_10 = (e5) => {
3783
3783
  var n4 = comment(), s4 = first_child(n4), consequent_5 = (e6) => {
3784
3784
  var n5 = comment();
3785
3785
  component(first_child(n5), () => t2.toast.icon, (e7, t3) => {
@@ -3822,7 +3822,7 @@ function Toast(e2, t2) {
3822
3822
  t2.toast.icon ? e6(consequent_5) : e6(alternate_5, false);
3823
3823
  }), append(e5, n4);
3824
3824
  };
3825
- if_block(i3, (e5) => {
3825
+ if_block(o3, (e5) => {
3826
3826
  "loading" !== t2.toast.type && e5(consequent_10);
3827
3827
  }), template_effect((e5) => set_class(n3, 1, e5), [() => {
3828
3828
  var _a2, _b3, _c2;
@@ -3865,35 +3865,35 @@ function Toast(e2, t2) {
3865
3865
  "string" != typeof t2.toast.description ? e5(consequent_14) : e5(alternate_7, false);
3866
3866
  }), template_effect((e5) => set_class(n3, 1, e5), [() => {
3867
3867
  var _a2, _b3;
3868
- return clsx(cn(i2(), get$1(S2), (_a2 = get$1(A2)) == null ? void 0 : _a2.description, (_b3 = t2.toast.classes) == null ? void 0 : _b3.description));
3868
+ return clsx(cn(o2(), get$1(S2), (_a2 = get$1(A2)) == null ? void 0 : _a2.description, (_b3 = t2.toast.classes) == null ? void 0 : _b3.description));
3869
3869
  }]), append(e4, n3);
3870
3870
  };
3871
3871
  if_block(d3, (e4) => {
3872
3872
  t2.toast.description && e4(consequent_15);
3873
3873
  });
3874
3874
  var f3 = sibling(l3, 2), consequent_18 = (e4) => {
3875
- var s3 = comment(), i3 = first_child(s3), consequent_16 = (e5) => {
3875
+ var s3 = comment(), o3 = first_child(s3), consequent_16 = (e5) => {
3876
3876
  var n3 = comment();
3877
3877
  component(first_child(n3), () => t2.toast.cancel, (e6, t3) => {
3878
3878
  t3(e6, {});
3879
3879
  }), append(e5, n3);
3880
3880
  }, alternate_8 = (e5) => {
3881
- var s4 = comment(), i4 = first_child(s4), consequent_17 = (e6) => {
3881
+ var s4 = comment(), o4 = first_child(s4), consequent_17 = (e6) => {
3882
3882
  var s5 = nt();
3883
3883
  s5.__click = [on_click_1$2, t2, x2, deleteToast];
3884
- var i5 = child(s5);
3884
+ var o5 = child(s5);
3885
3885
  template_effect((e7) => {
3886
- set_style(s5, t2.toast.cancelButtonStyle ?? n2()), set_class(s5, 1, e7), set_text(i5, t2.toast.cancel.label);
3886
+ set_style(s5, t2.toast.cancelButtonStyle ?? n2()), set_class(s5, 1, e7), set_text(o5, t2.toast.cancel.label);
3887
3887
  }, [() => {
3888
3888
  var _a2, _b3, _c2;
3889
3889
  return clsx(cn((_a2 = get$1(A2)) == null ? void 0 : _a2.cancelButton, (_c2 = (_b3 = t2.toast) == null ? void 0 : _b3.classes) == null ? void 0 : _c2.cancelButton));
3890
3890
  }]), append(e6, s5);
3891
3891
  };
3892
- if_block(i4, (e6) => {
3892
+ if_block(o4, (e6) => {
3893
3893
  isAction(t2.toast.cancel) && e6(consequent_17);
3894
3894
  }, true), append(e5, s4);
3895
3895
  };
3896
- if_block(i3, (e5) => {
3896
+ if_block(o3, (e5) => {
3897
3897
  "function" == typeof t2.toast.cancel ? e5(consequent_16) : e5(alternate_8, false);
3898
3898
  }), append(e4, s3);
3899
3899
  };
@@ -3901,28 +3901,28 @@ function Toast(e2, t2) {
3901
3901
  t2.toast.cancel && e4(consequent_18);
3902
3902
  });
3903
3903
  var p3 = sibling(f3, 2), consequent_21 = (e4) => {
3904
- var n3 = comment(), i3 = first_child(n3), consequent_19 = (e5) => {
3904
+ var n3 = comment(), o3 = first_child(n3), consequent_19 = (e5) => {
3905
3905
  var n4 = comment();
3906
3906
  component(first_child(n4), () => t2.toast.action, (e6, t3) => {
3907
3907
  t3(e6, {});
3908
3908
  }), append(e5, n4);
3909
3909
  }, alternate_9 = (e5) => {
3910
- var n4 = comment(), i4 = first_child(n4), consequent_20 = (e6) => {
3910
+ var n4 = comment(), o4 = first_child(n4), consequent_20 = (e6) => {
3911
3911
  var n5 = rt();
3912
3912
  n5.__click = [on_click_2, t2, deleteToast];
3913
- var i5 = child(n5);
3913
+ var o5 = child(n5);
3914
3914
  template_effect((e7) => {
3915
- set_style(n5, t2.toast.actionButtonStyle ?? s2()), set_class(n5, 1, e7), set_text(i5, t2.toast.action.label);
3915
+ set_style(n5, t2.toast.actionButtonStyle ?? s2()), set_class(n5, 1, e7), set_text(o5, t2.toast.action.label);
3916
3916
  }, [() => {
3917
3917
  var _a2, _b3, _c2;
3918
3918
  return clsx(cn((_a2 = get$1(A2)) == null ? void 0 : _a2.actionButton, (_c2 = (_b3 = t2.toast) == null ? void 0 : _b3.classes) == null ? void 0 : _c2.actionButton));
3919
3919
  }]), append(e6, n5);
3920
3920
  };
3921
- if_block(i4, (e6) => {
3921
+ if_block(o4, (e6) => {
3922
3922
  isAction(t2.toast.action) && e6(consequent_20);
3923
3923
  }, true), append(e5, n4);
3924
3924
  };
3925
- if_block(i3, (e5) => {
3925
+ if_block(o3, (e5) => {
3926
3926
  "function" == typeof t2.toast.action ? e5(consequent_19) : e5(alternate_9, false);
3927
3927
  }), append(e4, n3);
3928
3928
  };
@@ -3931,19 +3931,19 @@ function Toast(e2, t2) {
3931
3931
  }), template_effect((e4) => set_class(c3, 1, e4), [() => {
3932
3932
  var _a2, _b3, _c2;
3933
3933
  return clsx(cn((_a2 = get$1(A2)) == null ? void 0 : _a2.title, (_c2 = (_b3 = t2.toast) == null ? void 0 : _b3.classes) == null ? void 0 : _c2.title));
3934
- }]), append(e3, o3);
3934
+ }]), append(e3, i3);
3935
3935
  };
3936
- if_block(U2, (e3) => {
3936
+ if_block(V2, (e3) => {
3937
3937
  t2.toast.component ? e3(consequent_2) : e3(alternate_10, false);
3938
- }), bind_this(F2, (e3) => set(v2, e3), () => get$1(v2)), template_effect((e3, n3, s3, i3) => {
3939
- set_class(F2, 1, e3), set_attribute(F2, "data-rich-colors", t2.toast.richColors ?? a2()), set_attribute(F2, "data-styled", !(t2.toast.component || t2.toast.unstyled || o2())), set_attribute(F2, "data-mounted", get$1(c2)), set_attribute(F2, "data-promise", n3), set_attribute(F2, "data-swiped", get$1(p2)), set_attribute(F2, "data-removed", get$1(u2)), set_attribute(F2, "data-visible", get$1(w2)), set_attribute(F2, "data-y-position", get$1(I2)[0]), set_attribute(F2, "data-x-position", get$1(I2)[1]), set_attribute(F2, "data-index", t2.index), set_attribute(F2, "data-front", get$1(y2)), set_attribute(F2, "data-swiping", get$1(d2)), set_attribute(F2, "data-dismissable", get$1(x2)), set_attribute(F2, "data-type", get$1($2)), set_attribute(F2, "data-invert", get$1(L2)), set_attribute(F2, "data-swipe-out", get$1(f2)), set_attribute(F2, "data-swipe-direction", get$1(b2)), set_attribute(F2, "data-expanded", s3), H2 = set_style(F2, `${t2.style} ${t2.toast.style}`, H2, i3);
3938
+ }), bind_this(F2, (e3) => set(v2, e3), () => get$1(v2)), template_effect((e3, n3, s3, o3) => {
3939
+ set_class(F2, 1, e3), set_attribute(F2, "data-rich-colors", t2.toast.richColors ?? a2()), set_attribute(F2, "data-styled", !(t2.toast.component || t2.toast.unstyled || i2())), set_attribute(F2, "data-mounted", get$1(c2)), set_attribute(F2, "data-promise", n3), set_attribute(F2, "data-swiped", get$1(p2)), set_attribute(F2, "data-removed", get$1(u2)), set_attribute(F2, "data-visible", get$1(w2)), set_attribute(F2, "data-y-position", get$1(I2)[0]), set_attribute(F2, "data-x-position", get$1(I2)[1]), set_attribute(F2, "data-index", t2.index), set_attribute(F2, "data-front", get$1(y2)), set_attribute(F2, "data-swiping", get$1(d2)), set_attribute(F2, "data-dismissable", get$1(x2)), set_attribute(F2, "data-type", get$1($2)), set_attribute(F2, "data-invert", get$1(L2)), set_attribute(F2, "data-swipe-out", get$1(f2)), set_attribute(F2, "data-swipe-direction", get$1(b2)), set_attribute(F2, "data-expanded", s3), H2 = set_style(F2, `${t2.style} ${t2.toast.style}`, H2, o3);
3940
3940
  }, [() => {
3941
3941
  var _a2, _b3, _c2, _d3, _e4, _f2;
3942
3942
  return clsx(cn(t2.class, get$1(k2), (_a2 = get$1(A2)) == null ? void 0 : _a2.toast, (_c2 = (_b3 = t2.toast) == null ? void 0 : _b3.classes) == null ? void 0 : _c2.toast, (_d3 = get$1(A2)) == null ? void 0 : _d3[get$1($2)], (_f2 = (_e4 = t2.toast) == null ? void 0 : _e4.classes) == null ? void 0 : _f2[get$1($2)]));
3943
3943
  }, () => Boolean(t2.toast.promise), () => Boolean(t2.expanded || t2.expandByDefault && get$1(c2)), () => ({
3944
3944
  "--index": t2.index,
3945
3945
  "--toasts-before": t2.index,
3946
- "--z-index": Ve.toasts.length - t2.index,
3946
+ "--z-index": Ue.toasts.length - t2.index,
3947
3947
  "--offset": `${get$1(u2) ? get$1(h2) : get$1(q2)}px`,
3948
3948
  "--initial-height": t2.expandByDefault ? "auto" : `${get$1(g2)}px`
3949
3949
  })]), event("dragend", F2, () => {
@@ -3953,7 +3953,7 @@ function Toast(e2, t2) {
3953
3953
  delegate(["pointermove", "pointerup", "pointerdown", "click"]), (function enable_legacy_mode_flag() {
3954
3954
  A = true;
3955
3955
  })();
3956
- var ot = /* @__PURE__ */ from_svg('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');
3956
+ var it = /* @__PURE__ */ from_svg('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');
3957
3957
  var at = /* @__PURE__ */ from_svg('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>');
3958
3958
  var lt = /* @__PURE__ */ from_svg('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.042 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');
3959
3959
  var ct = /* @__PURE__ */ from_svg('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>');
@@ -3962,7 +3962,7 @@ const dt = "24px", ft = "16px", pt = "dark", ht = "light";
3962
3962
  var gt = /* @__PURE__ */ from_html("<ol></ol>"), _t = /* @__PURE__ */ from_html('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');
3963
3963
  function Toaster(e2, t2) {
3964
3964
  push(t2, true);
3965
- let n2 = prop(t2, "invert", 3, false), s2 = prop(t2, "position", 3, "bottom-right"), i2 = prop(t2, "hotkey", 19, () => ["altKey", "KeyT"]), o2 = prop(t2, "expand", 3, false), a2 = prop(t2, "closeButton", 3, false), l2 = prop(t2, "offset", 3, dt), c2 = prop(t2, "mobileOffset", 3, ft), u2 = prop(t2, "theme", 3, "light"), d2 = prop(t2, "richColors", 3, false), f2 = prop(t2, "duration", 3, 4e3), p2 = prop(t2, "visibleToasts", 3, 3), h2 = prop(t2, "toastOptions", 19, () => ({})), g2 = prop(t2, "dir", 7, "auto"), _2 = prop(t2, "gap", 3, 14), v2 = prop(t2, "containerAriaLabel", 3, "Notifications"), m2 = prop(t2, "closeButtonAriaLabel", 3, "Close toast"), b2 = (function rest_props(e3, t3, n3) {
3965
+ let n2 = prop(t2, "invert", 3, false), s2 = prop(t2, "position", 3, "bottom-right"), o2 = prop(t2, "hotkey", 19, () => ["altKey", "KeyT"]), i2 = prop(t2, "expand", 3, false), a2 = prop(t2, "closeButton", 3, false), l2 = prop(t2, "offset", 3, dt), c2 = prop(t2, "mobileOffset", 3, ft), u2 = prop(t2, "theme", 3, "light"), d2 = prop(t2, "richColors", 3, false), f2 = prop(t2, "duration", 3, 4e3), p2 = prop(t2, "visibleToasts", 3, 3), h2 = prop(t2, "toastOptions", 19, () => ({})), g2 = prop(t2, "dir", 7, "auto"), _2 = prop(t2, "gap", 3, 14), v2 = prop(t2, "containerAriaLabel", 3, "Notifications"), m2 = prop(t2, "closeButtonAriaLabel", 3, "Close toast"), b2 = (function rest_props(e3, t3, n3) {
3966
3966
  return new Proxy({
3967
3967
  props: e3,
3968
3968
  exclude: t3
@@ -3975,7 +3975,7 @@ function Toaster(e2, t2) {
3975
3975
  const e3 = document.documentElement.getAttribute("dir");
3976
3976
  return "auto" !== e3 && e3 ? (untrack(() => g2(e3)), e3) : (untrack(() => g2(window.getComputedStyle(document.documentElement).direction ?? "ltr")), g2());
3977
3977
  }
3978
- const y2 = user_derived(() => Array.from(new Set([s2(), ...Ve.toasts.filter((e3) => e3.position).map((e3) => e3.position)].filter(Boolean))));
3978
+ const y2 = user_derived(() => Array.from(new Set([s2(), ...Ue.toasts.filter((e3) => e3.position).map((e3) => e3.position)].filter(Boolean))));
3979
3979
  let w2 = /* @__PURE__ */ state(false), $2 = /* @__PURE__ */ state(false), x2 = /* @__PURE__ */ state(proxy(
3980
3980
  // visible toasts amount
3981
3981
  // Viewport padding
@@ -3987,28 +3987,28 @@ function Toaster(e2, t2) {
3987
3987
  return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? pt : ht;
3988
3988
  })(u2())
3989
3989
  )), k2 = /* @__PURE__ */ state(void 0), S2 = /* @__PURE__ */ state(null), C2 = /* @__PURE__ */ state(false);
3990
- const O2 = user_derived(() => i2().join("+").replace(/Key/g, "").replace(/Digit/g, ""));
3990
+ const M2 = user_derived(() => o2().join("+").replace(/Key/g, "").replace(/Digit/g, ""));
3991
3991
  user_effect(() => {
3992
- Ve.toasts.length <= 1 && set(w2, false);
3992
+ Ue.toasts.length <= 1 && set(w2, false);
3993
3993
  }), // Check for dismissed toasts and remove them. We need to do this to have dismiss animation.
3994
3994
  user_effect(() => {
3995
- const e3 = Ve.toasts.filter((e4) => e4.dismiss && !e4.delete);
3995
+ const e3 = Ue.toasts.filter((e4) => e4.dismiss && !e4.delete);
3996
3996
  if (e3.length > 0) {
3997
- const t3 = Ve.toasts.map((t4) => e3.find((e4) => e4.id === t4.id) ? {
3997
+ const t3 = Ue.toasts.map((t4) => e3.find((e4) => e4.id === t4.id) ? {
3998
3998
  ...t4,
3999
3999
  delete: true
4000
4000
  } : t4);
4001
- Ve.toasts = t3;
4001
+ Ue.toasts = t3;
4002
4002
  }
4003
4003
  }), user_effect(() => () => {
4004
4004
  get$1(k2) && get$1(S2) && (get$1(S2).focus({
4005
4005
  preventScroll: true
4006
4006
  }), set(S2, null), set(C2, false));
4007
4007
  }), onMount(() => {
4008
- Ve.reset();
4008
+ Ue.reset();
4009
4009
  return on(document, "keydown", (e3) => {
4010
4010
  var _a2, _b3;
4011
- i2().every((t3) => e3[t3] || e3.code === t3) && (set(w2, true), (_a2 = get$1(k2)) == null ? void 0 : _a2.focus()), "Escape" !== e3.code || document.activeElement !== get$1(k2) && !((_b3 = get$1(k2)) == null ? void 0 : _b3.contains(document.activeElement)) || set(w2, false);
4011
+ o2().every((t3) => e3[t3] || e3.code === t3) && (set(w2, true), (_a2 = get$1(k2)) == null ? void 0 : _a2.focus()), "Escape" !== e3.code || document.activeElement !== get$1(k2) && !((_b3 = get$1(k2)) == null ? void 0 : _b3.contains(document.activeElement)) || set(w2, false);
4012
4012
  });
4013
4013
  }), user_effect(() => {
4014
4014
  if ("system" !== u2() && set(x2, u2()), "undefined" != typeof window) {
@@ -4052,11 +4052,11 @@ function Toaster(e2, t2) {
4052
4052
  (_a2 = t2.onpointerup) == null ? void 0 : _a2.call(t2, e3), set($2, false);
4053
4053
  };
4054
4054
  Ye.set(new SonnerState());
4055
- var M2 = _t();
4056
- set_attribute(M2, "tabindex", -1);
4057
- var E2 = child(M2), consequent_10 = (e3) => {
4055
+ var O2 = _t();
4056
+ set_attribute(O2, "tabindex", -1);
4057
+ var E2 = child(O2), consequent_10 = (e3) => {
4058
4058
  var s3 = comment();
4059
- each(first_child(s3), 18, () => get$1(y2), (e4) => e4, (e4, s4, i3, u3) => {
4059
+ each(first_child(s3), 18, () => get$1(y2), (e4) => e4, (e4, s4, o3, u3) => {
4060
4060
  const g3 = user_derived(() => {
4061
4061
  const [e5, t3] = s4.split("-");
4062
4062
  return {
@@ -4066,16 +4066,16 @@ function Toaster(e2, t2) {
4066
4066
  }), v3 = user_derived(() => (function getOffsetObject(e5, t3) {
4067
4067
  const n3 = {};
4068
4068
  return [e5, t3].forEach((e6, t4) => {
4069
- const s5 = 1 === t4, i4 = s5 ? "--mobile-offset" : "--offset", o3 = s5 ? ft : dt;
4069
+ const s5 = 1 === t4, o4 = s5 ? "--mobile-offset" : "--offset", i3 = s5 ? ft : dt;
4070
4070
  function assignAll(e7) {
4071
4071
  ["top", "right", "bottom", "left"].forEach((t5) => {
4072
- n3[`${i4}-${t5}`] = "number" == typeof e7 ? `${e7}px` : e7;
4072
+ n3[`${o4}-${t5}`] = "number" == typeof e7 ? `${e7}px` : e7;
4073
4073
  });
4074
4074
  }
4075
4075
  "number" == typeof e6 || "string" == typeof e6 ? assignAll(e6) : "object" == typeof e6 ? ["top", "right", "bottom", "left"].forEach((t5) => {
4076
4076
  const s6 = e6[t5];
4077
- n3[`${i4}-${t5}`] = void 0 === s6 ? o3 : "number" == typeof s6 ? `${s6}px` : s6;
4078
- }) : assignAll(o3);
4077
+ n3[`${o4}-${t5}`] = void 0 === s6 ? i3 : "number" == typeof s6 ? `${s6}px` : s6;
4078
+ }) : assignAll(i3);
4079
4079
  }), n3;
4080
4080
  })(l2(), c2()));
4081
4081
  var y3 = gt();
@@ -4101,7 +4101,7 @@ function Toaster(e2, t2) {
4101
4101
  }), [getDocumentDirection, () => {
4102
4102
  var _a2;
4103
4103
  return {
4104
- "--front-toast-height": `${(_a2 = Ve.heights[0]) == null ? void 0 : _a2.height}px`,
4104
+ "--front-toast-height": `${(_a2 = Ue.heights[0]) == null ? void 0 : _a2.height}px`,
4105
4105
  "--width": "356px",
4106
4106
  "--gap": `${_2()}px`,
4107
4107
  "--offset-top": get$1(v3)["--offset-top"],
@@ -4113,7 +4113,7 @@ function Toaster(e2, t2) {
4113
4113
  "--mobile-offset-bottom": get$1(v3)["--mobile-offset-bottom"],
4114
4114
  "--mobile-offset-left": get$1(v3)["--mobile-offset-left"]
4115
4115
  };
4116
- }], void 0, "svelte-nbs0zk"), each(y3, 23, () => Ve.toasts.filter((e5) => !e5.position && 0 === get$1(i3) || e5.position === s4), (e5) => e5.id, (e5, i4, l3, c3) => {
4116
+ }], void 0, "svelte-nbs0zk"), each(y3, 23, () => Ue.toasts.filter((e5) => !e5.position && 0 === get$1(o3) || e5.position === s4), (e5) => e5.id, (e5, o4, l3, c3) => {
4117
4117
  {
4118
4118
  const successIcon = (e6) => {
4119
4119
  var n3 = comment(), s5 = first_child(n3), consequent = (e7) => {
@@ -4122,7 +4122,7 @@ function Toaster(e2, t2) {
4122
4122
  }, alternate = (e7) => {
4123
4123
  var n4 = comment(), s6 = first_child(n4), consequent_1 = (e8) => {
4124
4124
  !(function SuccessIcon(e9) {
4125
- append(e9, ot());
4125
+ append(e9, it());
4126
4126
  })(e8);
4127
4127
  };
4128
4128
  if_block(s6, (e8) => {
@@ -4228,7 +4228,7 @@ function Toaster(e2, t2) {
4228
4228
  return get$1(l3);
4229
4229
  },
4230
4230
  get toast() {
4231
- return get$1(i4);
4231
+ return get$1(o4);
4232
4232
  },
4233
4233
  get defaultRichColors() {
4234
4234
  return d2();
@@ -4276,7 +4276,7 @@ function Toaster(e2, t2) {
4276
4276
  return get$1(k3);
4277
4277
  },
4278
4278
  get expandByDefault() {
4279
- return o2();
4279
+ return i2();
4280
4280
  },
4281
4281
  get expanded() {
4282
4282
  return get$1(w2);
@@ -4302,8 +4302,8 @@ function Toaster(e2, t2) {
4302
4302
  }), append(e3, s3);
4303
4303
  };
4304
4304
  if_block(E2, (e3) => {
4305
- Ve.toasts.length > 0 && e3(consequent_10);
4306
- }), template_effect(() => set_attribute(M2, "aria-label", `${v2() ?? ""} ${get$1(O2) ?? ""}`)), append(e2, M2), pop();
4305
+ Ue.toasts.length > 0 && e3(consequent_10);
4306
+ }), template_effect(() => set_attribute(O2, "aria-label", `${v2() ?? ""} ${get$1(M2) ?? ""}`)), append(e2, O2), pop();
4307
4307
  }
4308
4308
  const vt = new (_e2 = class {
4309
4309
  constructor() {
@@ -4431,8 +4431,8 @@ function split_css_unit(e2) {
4431
4431
  "px"
4432
4432
  ];
4433
4433
  }
4434
- function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_in_out, amount: i2 = 5, opacity: o2 = 0 } = {}) {
4435
- const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - o2), [d2, f2] = split_css_unit(i2);
4434
+ function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_in_out, amount: o2 = 5, opacity: i2 = 0 } = {}) {
4435
+ const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - i2), [d2, f2] = split_css_unit(o2);
4436
4436
  return {
4437
4437
  delay: t2,
4438
4438
  duration: n2,
@@ -4441,16 +4441,16 @@ function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_in_out
4441
4441
  };
4442
4442
  }
4443
4443
  function fade(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = linear } = {}) {
4444
- const i2 = +getComputedStyle(e2).opacity;
4444
+ const o2 = +getComputedStyle(e2).opacity;
4445
4445
  return {
4446
4446
  delay: t2,
4447
4447
  duration: n2,
4448
4448
  easing: s2,
4449
- css: (e3) => "opacity: " + e3 * i2
4449
+ css: (e3) => "opacity: " + e3 * o2
4450
4450
  };
4451
4451
  }
4452
- function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out, x: i2 = 0, y: o2 = 0, opacity: a2 = 0 } = {}) {
4453
- const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, d2 = c2 * (1 - a2), [f2, p2] = split_css_unit(i2), [h2, g2] = split_css_unit(o2);
4452
+ function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out, x: o2 = 0, y: i2 = 0, opacity: a2 = 0 } = {}) {
4453
+ const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, d2 = c2 * (1 - a2), [f2, p2] = split_css_unit(o2), [h2, g2] = split_css_unit(i2);
4454
4454
  return {
4455
4455
  delay: t2,
4456
4456
  duration: n2,
@@ -4460,11 +4460,11 @@ function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out, x:
4460
4460
  opacity: ${c2 - d2 * t3}`
4461
4461
  };
4462
4462
  }
4463
- function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out, axis: i2 = "y" } = {}) {
4464
- const o2 = getComputedStyle(e2), a2 = +o2.opacity, l2 = "y" === i2 ? "height" : "width", c2 = parseFloat(o2[l2]), u2 = "y" === i2 ? ["top", "bottom"] : ["left", "right"], d2 = u2.map((e3) => (
4463
+ function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out, axis: o2 = "y" } = {}) {
4464
+ const i2 = getComputedStyle(e2), a2 = +i2.opacity, l2 = "y" === o2 ? "height" : "width", c2 = parseFloat(i2[l2]), u2 = "y" === o2 ? ["top", "bottom"] : ["left", "right"], d2 = u2.map((e3) => (
4465
4465
  /** @type {'Left' | 'Right' | 'Top' | 'Bottom'} */
4466
4466
  `${e3[0].toUpperCase()}${e3.slice(1)}`
4467
- )), f2 = parseFloat(o2[`padding${d2[0]}`]), p2 = parseFloat(o2[`padding${d2[1]}`]), h2 = parseFloat(o2[`margin${d2[0]}`]), g2 = parseFloat(o2[`margin${d2[1]}`]), _2 = parseFloat(o2[`border${d2[0]}Width`]), v2 = parseFloat(o2[`border${d2[1]}Width`]);
4467
+ )), f2 = parseFloat(i2[`padding${d2[0]}`]), p2 = parseFloat(i2[`padding${d2[1]}`]), h2 = parseFloat(i2[`margin${d2[0]}`]), g2 = parseFloat(i2[`margin${d2[1]}`]), _2 = parseFloat(i2[`border${d2[0]}Width`]), v2 = parseFloat(i2[`border${d2[1]}Width`]);
4468
4468
  return {
4469
4469
  delay: t2,
4470
4470
  duration: n2,
@@ -4472,8 +4472,8 @@ function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out,
4472
4472
  css: (e3) => `overflow: hidden;opacity: ${Math.min(20 * e3, 1) * a2};${l2}: ${e3 * c2}px;padding-${u2[0]}: ${e3 * f2}px;padding-${u2[1]}: ${e3 * p2}px;margin-${u2[0]}: ${e3 * h2}px;margin-${u2[1]}: ${e3 * g2}px;border-${u2[0]}-width: ${e3 * _2}px;border-${u2[1]}-width: ${e3 * v2}px;min-${l2}: 0`
4473
4473
  };
4474
4474
  }
4475
- function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out, start: i2 = 0, opacity: o2 = 0 } = {}) {
4476
- const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - i2, d2 = l2 * (1 - o2);
4475
+ function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: s2 = cubic_out, start: o2 = 0, opacity: i2 = 0 } = {}) {
4476
+ const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - o2, d2 = l2 * (1 - i2);
4477
4477
  return {
4478
4478
  delay: t2,
4479
4479
  duration: n2,
@@ -4519,7 +4519,7 @@ var yt = /* @__PURE__ */ from_svg("<svg><!><!></svg>");
4519
4519
  function Icon(e2, t2) {
4520
4520
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), s2 = legacy_rest_props(n2, ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"]);
4521
4521
  push(t2, false);
4522
- let i2 = prop(t2, "name", 8, void 0), o2 = prop(t2, "color", 8, "currentColor"), a2 = prop(t2, "size", 8, 24), l2 = prop(t2, "strokeWidth", 8, 2), c2 = prop(t2, "absoluteStrokeWidth", 8, false), u2 = prop(t2, "iconNode", 24, () => []);
4522
+ let o2 = prop(t2, "name", 8, void 0), i2 = prop(t2, "color", 8, "currentColor"), a2 = prop(t2, "size", 8, 24), l2 = prop(t2, "strokeWidth", 8, 2), c2 = prop(t2, "absoluteStrokeWidth", 8, false), u2 = prop(t2, "iconNode", 24, () => []);
4523
4523
  init();
4524
4524
  var d2 = yt();
4525
4525
  attribute_effect(d2, (e3, t3) => ({
@@ -4527,15 +4527,15 @@ function Icon(e2, t2) {
4527
4527
  ...s2,
4528
4528
  width: a2(),
4529
4529
  height: a2(),
4530
- stroke: o2(),
4530
+ stroke: i2(),
4531
4531
  "stroke-width": e3,
4532
4532
  class: t3
4533
- }), [() => (deep_read_state(c2()), deep_read_state(l2()), deep_read_state(a2()), untrack(() => c2() ? 24 * Number(l2()) / Number(a2()) : l2())), () => (deep_read_state(i2()), deep_read_state(n2), untrack(() => ((...e3) => e3.filter((e4, t3, n3) => Boolean(e4) && n3.indexOf(e4) === t3).join(" "))("lucide-icon", "lucide", i2() ? `lucide-${i2()}` : "", n2.class)))]);
4533
+ }), [() => (deep_read_state(c2()), deep_read_state(l2()), deep_read_state(a2()), untrack(() => c2() ? 24 * Number(l2()) / Number(a2()) : l2())), () => (deep_read_state(o2()), deep_read_state(n2), untrack(() => ((...e3) => e3.filter((e4, t3, n3) => Boolean(e4) && n3.indexOf(e4) === t3).join(" "))("lucide-icon", "lucide", o2() ? `lucide-${o2()}` : "", n2.class)))]);
4534
4534
  var f2 = child(d2);
4535
4535
  each(f2, 1, u2, index, (e3, t3) => {
4536
4536
  var n3 = user_derived(() => to_array(get$1(t3), 2));
4537
4537
  var s3 = comment();
4538
- !(function element(e4, t4, n4, s4, i3, o3) {
4538
+ !(function element(e4, t4, n4, s4, o3, i3) {
4539
4539
  var a3 = null, l3 = Ce, c3 = new BranchManager(
4540
4540
  /** @type {TemplateNode} */
4541
4541
  e4,
@@ -4547,11 +4547,11 @@ function Icon(e2, t2) {
4547
4547
  var n5 = Ce;
4548
4548
  if (set_current_each_item(l3), e5) {
4549
4549
  if (assign_nodes(a3 = document.createElementNS("http://www.w3.org/2000/svg", e5), a3), s4) {
4550
- var i4 = (
4550
+ var o4 = (
4551
4551
  /** @type {TemplateNode} */
4552
4552
  a3.appendChild(create_text())
4553
4553
  );
4554
- s4(a3, i4);
4554
+ s4(a3, o4);
4555
4555
  }
4556
4556
  ae.nodes_end = a3, t5.before(a3);
4557
4557
  }
@@ -4617,21 +4617,21 @@ function openGame(e2, t2) {
4617
4617
  }
4618
4618
  const gameBadge = (e2, t2 = noop, n2 = noop) => {
4619
4619
  var s2 = wt();
4620
- let i2;
4621
- var o2 = child(s2), a2 = child(o2);
4620
+ let o2;
4621
+ var i2 = child(s2), a2 = child(i2);
4622
4622
  template_effect((e3) => {
4623
- i2 = set_class(s2, 1, "bg-background absolute top-4 right-4 z-3 px-2 py-0.5 transition-opacity select-none", null, i2, e3), set_text(a2, n2());
4623
+ o2 = set_class(s2, 1, "bg-background absolute top-4 right-4 z-3 px-2 py-0.5 transition-opacity select-none", null, o2, e3), set_text(a2, n2());
4624
4624
  }, [() => ({
4625
4625
  "opacity-0": t2()
4626
4626
  })]), append(e2, s2);
4627
4627
  };
4628
- var wt = /* @__PURE__ */ from_html('<div><p class="font-bold text-white uppercase"> </p></div>'), on_click$3 = (e2, t2, n2, s2, i2, o2) => {
4629
- !get$1(t2) || get$1(n2) || s2() ? openGame(o2.game.domain, o2.game.id) : i2();
4628
+ var wt = /* @__PURE__ */ from_html('<div><p class="font-bold text-white uppercase"> </p></div>'), on_click$3 = (e2, t2, n2, s2, o2, i2) => {
4629
+ !get$1(t2) || get$1(n2) || s2() ? openGame(i2.game.domain, i2.game.id) : o2();
4630
4630
  }, $t = /* @__PURE__ */ from_html('<video playsinline="" loop fetchpriority="low"></video>', 2), xt = /* @__PURE__ */ from_html('<div class="bg-background/25 text-muted-foreground flex items-center justify-center gap-1 border-t p-1 px-2 text-sm"><!> <p class="text-muted-foreground text-sm">Tap again to open</p></div>'), kt = /* @__PURE__ */ from_html('<div class="bg-background/75 absolute right-0 bottom-0 left-0 flex max-h-1/3 z-2 flex-col overflow-hidden text-white backdrop-blur-xl"><div class="h-full w-full overflow-y-auto p-3"><h3 class="mb-2 truncate text-center text-lg font-bold"> </h3> <p class="text-muted-foreground mb-4 text-center text-sm text-balance"> </p></div> <!> <div></div></div>'), St = /* @__PURE__ */ from_html('<div class="prevent-image-select bg-background absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 animate-pulse rounded-full shadow-xl svelte-n3ft5o"></div> <img alt="game logo" fetchpriority="high"/>', 1), Ct = /* @__PURE__ */ from_html('<div role="button" tabindex="0"><!> <!> <img alt="cover" fetchpriority="high"/> <!> <!></div>');
4631
4631
  function GameCard(e2, t2) {
4632
4632
  push(t2, true);
4633
4633
  const [n2, s2] = setup_stores();
4634
- let i2, o2 = prop(t2, "compact", 3, false), a2 = prop(t2, "small", 3, false), l2 = /* @__PURE__ */ state(false), c2 = /* @__PURE__ */ state(false), u2 = /* @__PURE__ */ state(false), d2 = /* @__PURE__ */ state(false), f2 = /* @__PURE__ */ state(false), p2 = /* @__PURE__ */ state(void 0), h2 = /* @__PURE__ */ state(false), g2 = /* @__PURE__ */ state(void 0);
4634
+ let o2, i2 = prop(t2, "compact", 3, false), a2 = prop(t2, "small", 3, false), l2 = /* @__PURE__ */ state(false), c2 = /* @__PURE__ */ state(false), u2 = /* @__PURE__ */ state(false), d2 = /* @__PURE__ */ state(false), f2 = /* @__PURE__ */ state(false), p2 = /* @__PURE__ */ state(void 0), h2 = /* @__PURE__ */ state(false), g2 = /* @__PURE__ */ state(void 0);
4635
4635
  function handleHover() {
4636
4636
  get$1(l2) || get$1(u2) || (function playSound(e3, t3 = 1) {
4637
4637
  try {
@@ -4640,10 +4640,10 @@ function GameCard(e2, t2) {
4640
4640
  } catch (e4) {
4641
4641
  console.error("Error playing sound:", e4);
4642
4642
  }
4643
- })(store_get(Yn, "$projectUrl", n2) + "/assets/sounds/hover-selection.ogg", 0.25), set(l2, true), clearTimeout(i2), i2 = setTimeout(() => set(c2, true), 300), get$1(p2) && t2.game.cover_video_url && get$1(p2).play().catch((e3) => console.error("Video error:", e3));
4643
+ })(store_get(Hn, "$projectUrl", n2) + "/assets/sounds/hover-selection.ogg", 0.25), set(l2, true), clearTimeout(o2), o2 = setTimeout(() => set(c2, true), 300), get$1(p2) && t2.game.cover_video_url && get$1(p2).play().catch((e3) => console.error("Video error:", e3));
4644
4644
  }
4645
4645
  function handleUnhover() {
4646
- get$1(p2) && get$1(h2) && get$1(p2).pause(), set(l2, false), clearTimeout(i2), set(c2, false);
4646
+ get$1(p2) && get$1(h2) && get$1(p2).pause(), set(l2, false), clearTimeout(o2), set(c2, false);
4647
4647
  }
4648
4648
  var _2 = Ct();
4649
4649
  event("touchstart", N, (e3) => {
@@ -4684,7 +4684,7 @@ function GameCard(e2, t2) {
4684
4684
  var b2 = sibling(m2, 2);
4685
4685
  let y2;
4686
4686
  var w2 = sibling(b2, 2), consequent_4 = (e3) => {
4687
- var n3 = kt(), s3 = child(n3), i3 = child(s3), o3 = child(i3), a3 = child(sibling(i3, 2)), l3 = sibling(s3, 2), consequent_3 = (e4) => {
4687
+ var n3 = kt(), s3 = child(n3), o3 = child(s3), i3 = child(o3), a3 = child(sibling(o3, 2)), l3 = sibling(s3, 2), consequent_3 = (e4) => {
4688
4688
  var t3 = xt();
4689
4689
  !(function Info(e5, t4) {
4690
4690
  const n4 = legacy_rest_props(t4, ["children", "$$slots", "$$events", "$$legacy"]), s4 = [["circle", {
@@ -4739,7 +4739,7 @@ function GameCard(e2, t2) {
4739
4739
  });
4740
4740
  var c3 = sibling(l3, 2);
4741
4741
  template_effect(() => {
4742
- set_text(o3, t2.game.name), set_text(a3, t2.game.description || "No description."), set_class(c3, 1, `bg-background/75 pointer-events-none absolute right-0 mask-t-from-0% mask-t-to-100% ${get$1(u2) ? "bottom-7" : "bottom-0"} left-0 h-8`);
4742
+ set_text(i3, t2.game.name), set_text(a3, t2.game.description || "No description."), set_class(c3, 1, `bg-background/75 pointer-events-none absolute right-0 mask-t-from-0% mask-t-to-100% ${get$1(u2) ? "bottom-7" : "bottom-0"} left-0 h-8`);
4743
4743
  }), transition(3, n3, () => slide), append(e3, n3);
4744
4744
  };
4745
4745
  if_block(w2, (e3) => {
@@ -4747,9 +4747,9 @@ function GameCard(e2, t2) {
4747
4747
  });
4748
4748
  var $2 = sibling(w2, 2), consequent_5 = (e3) => {
4749
4749
  var n3 = St(), s3 = sibling(first_child(n3), 2);
4750
- let i3;
4750
+ let o3;
4751
4751
  template_effect((e4) => {
4752
- set_attribute(s3, "src", t2.game.logo_url), i3 = set_class(s3, 1, "prevent-image-select absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 overflow-hidden rounded-full object-center opacity-0 transition group-hover:outline-2 svelte-n3ft5o", null, i3, e4);
4752
+ set_attribute(s3, "src", t2.game.logo_url), o3 = set_class(s3, 1, "prevent-image-select absolute right-0 -bottom-[18%] left-0 mx-auto aspect-square w-1/5 overflow-hidden rounded-full object-center opacity-0 transition group-hover:outline-2 svelte-n3ft5o", null, o3, e4);
4753
4753
  }, [() => ({
4754
4754
  "opacity-100": get$1(f2)
4755
4755
  })]), event("load", s3, () => {
@@ -4759,7 +4759,7 @@ function GameCard(e2, t2) {
4759
4759
  if_block($2, (e3) => {
4760
4760
  a2() || e3(consequent_5);
4761
4761
  }), bind_this(_2, (e3) => set(g2, e3), () => get$1(g2)), template_effect((e3) => {
4762
- set_class(_2, 1, `highlight-border group relative flex aspect-[2/3] cursor-pointer flex-col shadow-xl transition hover:outline-2 ${get$1(d2) ? "" : "animate-pulse"} ${a2() ? "h-42" : o2() ? "h-62" : "h-92"} ${a2() ? "bg-muted" : "bg-background mt-5 mb-[calc(3dvh+1.5vw)]"}`, "svelte-n3ft5o"), set_attribute(b2, "src", t2.game.cover_image_url), y2 = set_class(b2, 1, "prevent-image-select absolute top-0 left-0 aspect-[2/3] w-full object-cover opacity-0 transition svelte-n3ft5o", null, y2, e3);
4762
+ set_class(_2, 1, `highlight-border group relative flex aspect-[2/3] cursor-pointer flex-col shadow-xl transition hover:outline-2 ${get$1(d2) ? "" : "animate-pulse"} ${a2() ? "h-42" : i2() ? "h-62" : "h-92"} ${a2() ? "bg-muted" : "bg-background mt-5 mb-[calc(3dvh+1.5vw)]"}`, "svelte-n3ft5o"), set_attribute(b2, "src", t2.game.cover_image_url), y2 = set_class(b2, 1, "prevent-image-select absolute top-0 left-0 aspect-[2/3] w-full object-cover opacity-0 transition svelte-n3ft5o", null, y2, e3);
4763
4763
  }, [() => ({
4764
4764
  "opacity-100": get$1(d2) && (!get$1(l2) || !get$1(h2) || !t2.game.cover_video_url)
4765
4765
  })]), event("mouseenter", _2, handleHover), event("mouseleave", _2, handleUnhover), event("load", b2, () => {
@@ -4782,7 +4782,7 @@ function sineOut(e2) {
4782
4782
  return Math.sin(e2 * Math.PI / 2);
4783
4783
  }
4784
4784
  function flip(e2, { from: t2, to: n2 }, s2 = {}) {
4785
- var { delay: i2 = 0, duration: o2 = (e3) => 120 * Math.sqrt(e3), easing: a2 = cubicOut } = s2, l2 = getComputedStyle(e2), c2 = "none" === l2.transform ? "" : l2.transform, [u2, d2] = l2.transformOrigin.split(" ").map(parseFloat);
4785
+ var { delay: o2 = 0, duration: i2 = (e3) => 120 * Math.sqrt(e3), easing: a2 = cubicOut } = s2, l2 = getComputedStyle(e2), c2 = "none" === l2.transform ? "" : l2.transform, [u2, d2] = l2.transformOrigin.split(" ").map(parseFloat);
4786
4786
  u2 /= e2.clientWidth, d2 /= e2.clientHeight;
4787
4787
  var f2 = (
4788
4788
  /**
@@ -4798,8 +4798,8 @@ function flip(e2, { from: t2, to: n2 }, s2 = {}) {
4798
4798
  })(e2)
4799
4799
  ), p2 = e2.clientWidth / n2.width / f2, h2 = e2.clientHeight / n2.height / f2, g2 = t2.left + t2.width * u2, _2 = t2.top + t2.height * d2, v2 = n2.left + n2.width * u2, m2 = n2.top + n2.height * d2, b2 = (g2 - v2) * p2, y2 = (_2 - m2) * h2, w2 = t2.width / n2.width, $2 = t2.height / n2.height;
4800
4800
  return {
4801
- delay: i2,
4802
- duration: "function" == typeof o2 ? o2(Math.sqrt(b2 * b2 + y2 * y2)) : o2,
4801
+ delay: o2,
4802
+ duration: "function" == typeof i2 ? i2(Math.sqrt(b2 * b2 + y2 * y2)) : i2,
4803
4803
  easing: a2,
4804
4804
  css: (e3, t3) => `transform: ${c2} translate(${t3 * b2}px, ${t3 * y2}px) scale(${e3 + t3 * w2}, ${e3 + t3 * $2});`
4805
4805
  };
@@ -4807,13 +4807,13 @@ function flip(e2, { from: t2, to: n2 }, s2 = {}) {
4807
4807
  delegate(["click"]);
4808
4808
  var on_click$2 = (e2, t2, n2) => {
4809
4809
  set(t2, ""), set(n2, !get$1(n2));
4810
- }, Ot = /* @__PURE__ */ from_html('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), Mt = /* @__PURE__ */ from_html('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, s2, i2) => {
4810
+ }, Mt = /* @__PURE__ */ from_html('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), Ot = /* @__PURE__ */ from_html('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, s2, o2) => {
4811
4811
  var _a2;
4812
- t2(n2), set(s2, false), (_a2 = i2.onCategoryChange) == null ? void 0 : _a2.call(i2);
4812
+ t2(n2), set(s2, false), (_a2 = o2.onCategoryChange) == null ? void 0 : _a2.call(o2);
4813
4813
  }, Et = /* @__PURE__ */ from_html("<button> </button>"), It = /* @__PURE__ */ from_html('<div class="space-y-1 p-1"></div>'), Tt = /* @__PURE__ */ from_html('<div class="bg-background/85 fixed left-1/2 z-50 mt-22 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur-xl"><div class="border-b p-3"><div class="relative"><div class="pointer-events-none absolute inset-y-0 left-0 flex items-center pl-1"><!></div> <input type="text" placeholder="Search categories..." class="w-full border-0 p-1 pl-10 text-white focus:ring-0 focus:outline-none"/></div></div> <div class="max-h-60 overflow-y-auto"><!></div></div>'), Pt = /* @__PURE__ */ from_html('<div class="flex w-full flex-col"><h1 class="mb-0! text-center text-2xl font-bold text-white drop-shadow-xl sm:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-black transition hover:rotate-5"><span class="max-w-[40vw] truncate text-2xl font-bold text-black sm:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');
4814
4814
  function Navigation(e2, t2) {
4815
4815
  push(t2, true);
4816
- let n2, s2 = prop(t2, "categories", 19, () => []), i2 = prop(t2, "selectedCategory", 15), o2 = /* @__PURE__ */ state(false), a2 = user_derived(() => i2() || (s2().length > 0 ? s2()[0] : "...")), l2 = /* @__PURE__ */ state(""), c2 = /* @__PURE__ */ state(void 0), u2 = user_derived(() => get$1(l2) ? s2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : s2());
4816
+ let n2, s2 = prop(t2, "categories", 19, () => []), o2 = prop(t2, "selectedCategory", 15), i2 = /* @__PURE__ */ state(false), a2 = user_derived(() => o2() || (s2().length > 0 ? s2()[0] : "...")), l2 = /* @__PURE__ */ state(""), c2 = /* @__PURE__ */ state(void 0), u2 = user_derived(() => get$1(l2) ? s2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : s2());
4817
4817
  const d2 = ["Looking for", "Interested in", "Searching for", "Fancy some", "What about these"];
4818
4818
  let f2 = /* @__PURE__ */ state(proxy(d2[0]));
4819
4819
  onMount(() => {
@@ -4827,13 +4827,13 @@ function Navigation(e2, t2) {
4827
4827
  var p2 = Pt();
4828
4828
  event("click", N, (e3) => {
4829
4829
  var _a2;
4830
- !get$1(c2) || ((_a2 = get$1(c2)) == null ? void 0 : _a2.contains(e3.target)) || (n2 == null ? void 0 : n2.contains(e3.target)) || set(o2, false);
4830
+ !get$1(c2) || ((_a2 = get$1(c2)) == null ? void 0 : _a2.contains(e3.target)) || (n2 == null ? void 0 : n2.contains(e3.target)) || set(i2, false);
4831
4831
  });
4832
4832
  var h2 = child(p2), g2 = child(h2), _2 = child(g2), v2 = sibling(g2, 2);
4833
- v2.__click = [on_click$2, l2, o2];
4833
+ v2.__click = [on_click$2, l2, i2];
4834
4834
  var m2 = child(v2), b2 = child(m2), y2 = sibling(m2, 2);
4835
4835
  {
4836
- let e3 = user_derived(() => get$1(o2) ? "rotate-180 transform" : "");
4836
+ let e3 = user_derived(() => get$1(i2) ? "rotate-180 transform" : "");
4837
4837
  !(function Chevron_down(e4, t3) {
4838
4838
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]), s3 = [["path", {
4839
4839
  d: "m6 9 6 6 6-6"
@@ -4931,20 +4931,20 @@ function Navigation(e2, t2) {
4931
4931
  class: "text-muted-foreground"
4932
4932
  });
4933
4933
  var p3 = sibling(f3, 2), h3 = child(sibling(a3, 2)), consequent = (e4) => {
4934
- append(e4, Ot());
4934
+ append(e4, Mt());
4935
4935
  }, alternate_1 = (e4) => {
4936
4936
  var n4 = comment(), s3 = first_child(n4), consequent_1 = (e5) => {
4937
- append(e5, Mt());
4937
+ append(e5, Ot());
4938
4938
  }, alternate = (e5) => {
4939
4939
  var n5 = It();
4940
4940
  each(n5, 28, () => get$1(u2), (e6) => e6, (e6, n6) => {
4941
4941
  var s4 = Et();
4942
- s4.__click = [on_click_1$1, i2, n6, o2, t2];
4942
+ s4.__click = [on_click_1$1, o2, n6, i2, t2];
4943
4943
  var a4 = child(s4);
4944
4944
  template_effect(() => {
4945
- set_class(s4, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${i2() != n6 ? "hover:bg-muted-foreground/20" : ""} ${i2() == n6 ? "bg-white text-black" : "text-white"}`), set_text(a4, n6);
4945
+ set_class(s4, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${o2() != n6 ? "hover:bg-muted-foreground/20" : ""} ${o2() == n6 ? "bg-white text-black" : "text-white"}`), set_text(a4, n6);
4946
4946
  }), (function animation(e7, t3, n7) {
4947
- var s5, i3, o3, a5 = (
4947
+ var s5, o3, i3, a5 = (
4948
4948
  /** @type {EachItem} */
4949
4949
  Ce
4950
4950
  ), l3 = null;
@@ -4954,34 +4954,34 @@ function Navigation(e2, t2) {
4954
4954
  s5 = this.element.getBoundingClientRect();
4955
4955
  },
4956
4956
  apply() {
4957
- if (o3 == null ? void 0 : o3.abort(), i3 = this.element.getBoundingClientRect(), s5.left !== i3.left || s5.right !== i3.right || s5.top !== i3.top || s5.bottom !== i3.bottom) {
4957
+ if (i3 == null ? void 0 : i3.abort(), o3 = this.element.getBoundingClientRect(), s5.left !== o3.left || s5.right !== o3.right || s5.top !== o3.top || s5.bottom !== o3.bottom) {
4958
4958
  const e8 = t3()(this.element, {
4959
4959
  from: s5,
4960
- to: i3
4960
+ to: o3
4961
4961
  }, n7 == null ? void 0 : n7());
4962
- o3 = animate(this.element, e8, void 0, 1, () => {
4963
- o3 == null ? void 0 : o3.abort(), o3 = void 0;
4962
+ i3 = animate(this.element, e8, void 0, 1, () => {
4963
+ i3 == null ? void 0 : i3.abort(), i3 = void 0;
4964
4964
  });
4965
4965
  }
4966
4966
  },
4967
4967
  fix() {
4968
4968
  if (!e7.getAnimations().length) {
4969
- var { position: t4, width: n8, height: i4 } = getComputedStyle(e7);
4969
+ var { position: t4, width: n8, height: o4 } = getComputedStyle(e7);
4970
4970
  if ("absolute" !== t4 && "fixed" !== t4) {
4971
- var o4 = (
4971
+ var i4 = (
4972
4972
  /** @type {HTMLElement | SVGElement} */
4973
4973
  e7.style
4974
4974
  );
4975
4975
  l3 = {
4976
- position: o4.position,
4977
- width: o4.width,
4978
- height: o4.height,
4979
- transform: o4.transform
4980
- }, o4.position = "absolute", o4.width = n8, o4.height = i4;
4976
+ position: i4.position,
4977
+ width: i4.width,
4978
+ height: i4.height,
4979
+ transform: i4.transform
4980
+ }, i4.position = "absolute", i4.width = n8, i4.height = o4;
4981
4981
  var a6 = e7.getBoundingClientRect();
4982
4982
  if (s5.left !== a6.left || s5.top !== a6.top) {
4983
4983
  var c3 = `translate(${s5.left - a6.left}px, ${s5.top - a6.top}px)`;
4984
- o4.transform = o4.transform ? `${o4.transform} ${c3}` : c3;
4984
+ i4.transform = i4.transform ? `${i4.transform} ${c3}` : c3;
4985
4985
  }
4986
4986
  }
4987
4987
  }
@@ -5013,16 +5013,16 @@ function Navigation(e2, t2) {
5013
5013
  0 === s2().length ? e4(consequent) : e4(alternate_1, false);
5014
5014
  }), bind_this(n3, (e4) => set(c2, e4), () => get$1(c2)), (function bind_value(e4, t3, n4 = t3) {
5015
5015
  var s3 = /* @__PURE__ */ new WeakSet();
5016
- listen_to_event_and_reset_event(e4, "input", async (i3) => {
5017
- var o3 = i3 ? e4.defaultValue : e4.value;
5018
- if (o3 = is_numberlike_input(e4) ? to_number(o3) : o3, n4(o3), null !== H && s3.add(H), // Because `{#each ...}` blocks work by updating sources inside the flush,
5016
+ listen_to_event_and_reset_event(e4, "input", async (o3) => {
5017
+ var i3 = o3 ? e4.defaultValue : e4.value;
5018
+ if (i3 = is_numberlike_input(e4) ? to_number(i3) : i3, n4(i3), null !== H && s3.add(H), // Because `{#each ...}` blocks work by updating sources inside the flush,
5019
5019
  // we need to wait a tick before checking to see if we should forcibly
5020
5020
  // update the input and reset the selection state
5021
- await tick(), o3 !== (o3 = t3())) {
5021
+ await tick(), i3 !== (i3 = t3())) {
5022
5022
  var a4 = e4.selectionStart, l3 = e4.selectionEnd, c3 = e4.value.length;
5023
5023
  if (
5024
5024
  // the value is coerced on assignment
5025
- e4.value = o3 ?? "", null !== l3
5025
+ e4.value = i3 ?? "", null !== l3
5026
5026
  ) {
5027
5027
  var u3 = e4.value.length;
5028
5028
  a4 === l3 && l3 === c3 && u3 > c3 ? (e4.selectionStart = u3, e4.selectionEnd = u3) : (e4.selectionStart = a4, e4.selectionEnd = Math.min(l3, u3));
@@ -5035,11 +5035,11 @@ function Navigation(e2, t2) {
5035
5035
  null == untrack(t3) && e4.value && (n4(is_numberlike_input(e4) ? to_number(e4.value) : e4.value), null !== H && s3.add(H)), render_effect(() => {
5036
5036
  var n5 = t3();
5037
5037
  if (e4 === document.activeElement) {
5038
- var i3 = (
5038
+ var o3 = (
5039
5039
  /** @type {Batch} */
5040
5040
  Y ?? H
5041
5041
  );
5042
- if (s3.has(i3)) return;
5042
+ if (s3.has(o3)) return;
5043
5043
  }
5044
5044
  is_numberlike_input(e4) && n5 === to_number(e4.value) || ("date" !== e4.type || n5 || e4.value) && n5 !== e4.value && // @ts-expect-error the value is coerced on assignment
5045
5045
  (e4.value = n5 ?? "");
@@ -5053,7 +5053,7 @@ function Navigation(e2, t2) {
5053
5053
  })), append(e3, n3);
5054
5054
  };
5055
5055
  if_block(w2, (e3) => {
5056
- get$1(o2) && e3(consequent_2);
5056
+ get$1(i2) && e3(consequent_2);
5057
5057
  }), template_effect(() => {
5058
5058
  set_text(_2, get$1(f2)), set_text(b2, get$1(a2));
5059
5059
  }), transition(3, p2, () => scale, () => ({
@@ -5064,30 +5064,30 @@ function Navigation(e2, t2) {
5064
5064
  async function toggleLike(e2, t2, n2, s2) {
5065
5065
  var _a2;
5066
5066
  if (!((_a2 = t2.currentGame) == null ? void 0 : _a2.id)) return;
5067
- store_set(Rn, !n2()), store_set(Gn, s2() + (n2() ? 1 : -1)), // Save to localStorage
5067
+ store_set(zn, !n2()), store_set(Rn, s2() + (n2() ? 1 : -1)), // Save to localStorage
5068
5068
  n2() ? localStorage.setItem(`playlight_${t2.currentGame.id}_liked`, "true") : localStorage.removeItem(`playlight_${t2.currentGame.id}_liked`);
5069
- await vt.toggleLike(t2.currentGame.id, n2()) || store_set(Gn, s2() + (n2() ? -1 : 1));
5069
+ await vt.toggleLike(t2.currentGame.id, n2()) || store_set(Rn, s2() + (n2() ? -1 : 1));
5070
5070
  }
5071
5071
  delegate(["click"]);
5072
5072
  var Lt = /* @__PURE__ */ from_html('<img alt="logo"/>'), jt = /* @__PURE__ */ from_html('<div class="bg-muted size-5"></div>'), At = /* @__PURE__ */ from_html('<div class="flex flex-wrap gap-1 text-start"><div class="w-full"><p class="text-muted-foreground text-sm text-nowrap select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><!> <p> </p> <div class="mt-0.5 ml-auto flex items-center gap-2"><p class="text-muted-foreground text-sm"> </p> <button class="text-muted-foreground cursor-pointer transition hover:text-white"><!></button></div></div></div>');
5073
5073
  function CurrentGameDisplay(e2, t2) {
5074
5074
  push(t2, true);
5075
- const $currentGameIsLiked = () => store_get(Rn, "$currentGameIsLiked", n2), $currentGameLikeCount = () => store_get(Gn, "$currentGameLikeCount", n2), [n2, s2] = setup_stores();
5076
- let i2 = /* @__PURE__ */ state(false);
5075
+ const $currentGameIsLiked = () => store_get(zn, "$currentGameIsLiked", n2), $currentGameLikeCount = () => store_get(Rn, "$currentGameLikeCount", n2), [n2, s2] = setup_stores();
5076
+ let o2 = /* @__PURE__ */ state(false);
5077
5077
  user_effect(() => {
5078
5078
  var _a2, _b3;
5079
- null != ((_a2 = t2.currentGame) == null ? void 0 : _a2.id) && (store_set(Rn, null !== localStorage.getItem(`playlight_${t2.currentGame.id}_liked`)), store_set(Gn, ((_b3 = t2.currentGame) == null ? void 0 : _b3.likes) || 0));
5079
+ null != ((_a2 = t2.currentGame) == null ? void 0 : _a2.id) && (store_set(zn, null !== localStorage.getItem(`playlight_${t2.currentGame.id}_liked`)), store_set(Rn, ((_b3 = t2.currentGame) == null ? void 0 : _b3.likes) || 0));
5080
5080
  });
5081
- var o2 = At(), a2 = sibling(child(o2), 2), l2 = child(a2), consequent = (e3) => {
5081
+ var i2 = At(), a2 = sibling(child(i2), 2), l2 = child(a2), consequent = (e3) => {
5082
5082
  var n3 = Lt();
5083
5083
  let s3;
5084
5084
  template_effect((e4) => {
5085
5085
  var _a2;
5086
5086
  set_attribute(n3, "src", (_a2 = t2.currentGame) == null ? void 0 : _a2.logo_url), s3 = set_class(n3, 1, "bg-muted-foreground/50 size-5 text-[0px]! select-none", null, s3, e4);
5087
5087
  }, [() => ({
5088
- "animate-pulse": !get$1(i2)
5088
+ "animate-pulse": !get$1(o2)
5089
5089
  })]), event("load", n3, () => {
5090
- set(i2, true);
5090
+ set(o2, true);
5091
5091
  }), append(e3, n3);
5092
5092
  }, alternate = (e3) => {
5093
5093
  append(e3, jt());
@@ -5160,10 +5160,10 @@ function CurrentGameDisplay(e2, t2) {
5160
5160
  return {
5161
5161
  "opacity-50": !((_a2 = t2.currentGame) == null ? void 0 : _a2.name)
5162
5162
  };
5163
- }]), append(e2, o2), pop(), s2();
5163
+ }]), append(e2, i2), pop(), s2();
5164
5164
  }
5165
- function restore(e2, t2, n2, s2, i2) {
5166
- set(t2, false), set(n2, 250), set(s2, 0), i2(250, (e3) => {
5165
+ function restore(e2, t2, n2, s2, o2) {
5166
+ set(t2, false), set(n2, 250), set(s2, 0), o2(250, (e3) => {
5167
5167
  set(n2, 250 * (1 - e3)), set(s2, e3, true);
5168
5168
  });
5169
5169
  }
@@ -5171,7 +5171,7 @@ delegate(["click"]);
5171
5171
  var Dt = /* @__PURE__ */ from_html('<div class="bg-background/85 fixed bottom-4 left-4 z-2 touch-none border-1 p-4 shadow-lg backdrop-blur-xl max-sm:right-4 sm:w-72" role="button" tabindex="0"><!></div>'), Wt = /* @__PURE__ */ from_html('<div class="fixed bottom-0 z-3 shadow-xl max-sm:right-4 max-sm:left-4 sm:left-4 sm:w-72"><button class="bg-background/85 hover:bg-background/95 w-full rounded-t-md border px-4 py-1.5 backdrop-blur-sm transition" aria-label="Show game display"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button></div>'), Bt = /* @__PURE__ */ from_html("<!> <!>", 1);
5172
5172
  function DiscoveryDrawer(e2, t2) {
5173
5173
  push(t2, true);
5174
- let n2 = /* @__PURE__ */ state(false), s2 = /* @__PURE__ */ state(0), i2 = /* @__PURE__ */ state(1), o2 = /* @__PURE__ */ state(false), a2 = 0;
5174
+ let n2 = /* @__PURE__ */ state(false), s2 = /* @__PURE__ */ state(0), o2 = /* @__PURE__ */ state(1), i2 = /* @__PURE__ */ state(false), a2 = 0;
5175
5175
  function animate2(e3, t3) {
5176
5176
  const n3 = Date.now();
5177
5177
  !(function frame() {
@@ -5180,42 +5180,42 @@ function DiscoveryDrawer(e2, t2) {
5180
5180
  })();
5181
5181
  }
5182
5182
  function startDrag(e3) {
5183
- set(o2, true), a2 = e3.type.includes("touch") ? e3.touches[0].clientY : e3.clientY;
5183
+ set(i2, true), a2 = e3.type.includes("touch") ? e3.touches[0].clientY : e3.clientY;
5184
5184
  }
5185
5185
  function drag(e3) {
5186
- if (!get$1(o2)) return;
5186
+ if (!get$1(i2)) return;
5187
5187
  const t3 = Math.max(0, (e3.type.includes("touch") ? e3.touches[0].clientY : e3.clientY) - a2);
5188
- set(s2, t3, true), set(i2, Math.max(0, 1 - t3 / 150), true), t3 > 40 && (function hide() {
5189
- set(o2, false);
5188
+ set(s2, t3, true), set(o2, Math.max(0, 1 - t3 / 150), true), t3 > 40 && (function hide() {
5189
+ set(i2, false);
5190
5190
  const e4 = get$1(s2);
5191
5191
  animate2(250, (t4) => {
5192
- set(s2, e4 + (250 - e4) * t4), set(i2, Math.max(0, 1 - 1.5 * t4), true), 1 === t4 && set(n2, true);
5192
+ set(s2, e4 + (250 - e4) * t4), set(o2, Math.max(0, 1 - 1.5 * t4), true), 1 === t4 && set(n2, true);
5193
5193
  });
5194
5194
  })();
5195
5195
  }
5196
5196
  function endDrag() {
5197
- if (get$1(o2) && (set(o2, false), get$1(s2) < 40)) {
5197
+ if (get$1(i2) && (set(i2, false), get$1(s2) < 40)) {
5198
5198
  const e3 = get$1(s2);
5199
5199
  animate2(250, (t3) => {
5200
- set(s2, e3 * (1 - t3)), set(i2, 1);
5200
+ set(s2, e3 * (1 - t3)), set(o2, 1);
5201
5201
  });
5202
5202
  }
5203
5203
  }
5204
- onMount(() => animate2(250, (e3) => set(i2, e3, true)));
5204
+ onMount(() => animate2(250, (e3) => set(o2, e3, true)));
5205
5205
  var l2 = Bt(), c2 = first_child(l2), consequent = (e3) => {
5206
5206
  var n3 = Dt();
5207
5207
  n3.__mousedown = startDrag, n3.__mousemove = drag, n3.__mouseup = endDrag, n3.__touchstart = startDrag, n3.__touchmove = drag, n3.__touchend = endDrag, CurrentGameDisplay(child(n3), {
5208
5208
  get currentGame() {
5209
5209
  return t2.currentGame;
5210
5210
  }
5211
- }), template_effect(() => set_style(n3, `transform: translateY(${get$1(s2) ?? ""}px); opacity: ${get$1(i2) ?? ""}; cursor: grab;`)), event("mouseleave", n3, endDrag), append(e3, n3);
5211
+ }), template_effect(() => set_style(n3, `transform: translateY(${get$1(s2) ?? ""}px); opacity: ${get$1(o2) ?? ""}; cursor: grab;`)), event("mouseleave", n3, endDrag), append(e3, n3);
5212
5212
  };
5213
5213
  if_block(c2, (e3) => {
5214
5214
  t2.currentGame && !get$1(n2) && e3(consequent);
5215
5215
  });
5216
5216
  var u2 = sibling(c2, 2), consequent_1 = (e3) => {
5217
- var t3 = Wt(), o3 = child(t3);
5218
- o3.__mousedown = [restore, n2, s2, i2, animate2], o3.__touchstart = [restore, n2, s2, i2, animate2], transition(3, o3, () => fly, () => ({
5217
+ var t3 = Wt(), i3 = child(t3);
5218
+ i3.__mousedown = [restore, n2, s2, o2, animate2], i3.__touchstart = [restore, n2, s2, o2, animate2], transition(3, i3, () => fly, () => ({
5219
5219
  delay: 150,
5220
5220
  y: 30
5221
5221
  })), append(e3, t3);
@@ -5226,13 +5226,13 @@ function DiscoveryDrawer(e2, t2) {
5226
5226
  }
5227
5227
  delegate(["mousedown", "mousemove", "mouseup", "touchstart", "touchmove", "touchend"]);
5228
5228
  function closeDiscoveryOnEmptyClick(e2, t2) {
5229
- e2.target === e2.currentTarget && "touch" !== e2.pointerType && store_set(zn, false);
5229
+ e2.target === e2.currentTarget && "touch" !== e2.pointerType && store_set(qn, false);
5230
5230
  }
5231
- var Nt = /* @__PURE__ */ from_html('<div class="-mx-10 mt-5 flex h-92 w-10 flex-col"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between"><div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></div> <div class="text-muted-foreground origin-center -rotate-90 transform text-sm whitespace-nowrap select-none">From other categories</div> <div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></div></div></div></div>'), on_click$1 = (e2, t2) => store_set(zn, false), qt = /* @__PURE__ */ from_html('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), zt = /* @__PURE__ */ from_html('<div class="pointer-events-none flex h-4/5 items-center justify-center gap-4"><p class="text-white">No games found that match the filter.</p></div>'), Rt = /* @__PURE__ */ from_html("<!> <!>", 1), Gt = /* @__PURE__ */ from_html('<div class="flex h-30 items-center"><!></div>'), Ft = /* @__PURE__ */ from_html('<div class="pointer-events-none mx-auto flex h-fit flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="pointer-events-none flex min-h-10 w-full justify-center"><!></div></div>'), Ht = /* @__PURE__ */ from_html('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 flex flex-col justify-center text-white backdrop-blur-md" id="playlight-discovery"><div class="pointer-events-none flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none ml-3 w-50 select-none max-sm:w-40"/> <div class="mt-3.5 mr-4 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3"><button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-6 max-sm:py-1 sm:pt-2 sm:pb-6"><!></div> <!> <div class="mask-fade show-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-1so2hji"><!></div> <a href="https://playlight.dev" target="_blank" class="text-muted-foreground fixed right-4 bottom-4 flex items-center gap-1 text-sm transition hover:text-white">Game dev? Join Playlight <!></a></div>');
5231
+ var Nt = /* @__PURE__ */ from_html('<div class="-mx-10 mt-5 flex h-92 w-10 flex-col"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between"><div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></div> <div class="text-muted-foreground origin-center -rotate-90 transform text-sm whitespace-nowrap select-none">From other categories</div> <div class="bg-muted-foreground h-1/5 w-px opacity-60 min-[1920px]:h-1/4"></div></div></div></div>'), on_click$1 = (e2, t2) => store_set(qn, false), qt = /* @__PURE__ */ from_html('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), zt = /* @__PURE__ */ from_html('<div class="pointer-events-none flex h-4/5 items-center justify-center gap-4"><p class="text-white">No games found that match the filter.</p></div>'), Rt = /* @__PURE__ */ from_html("<!> <!>", 1), Gt = /* @__PURE__ */ from_html('<div class="flex h-30 items-center"><!></div>'), Ft = /* @__PURE__ */ from_html('<div class="pointer-events-none mx-auto flex h-fit flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="pointer-events-none flex min-h-10 w-full justify-center"><!></div></div>'), Ht = /* @__PURE__ */ from_html('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 flex flex-col justify-center text-white backdrop-blur-md" id="playlight-discovery"><div class="pointer-events-none flex items-center justify-between p-4"><img alt="logo" class="pointer-events-none ml-3 w-50 select-none max-sm:w-40"/> <div class="mt-3.5 mr-4 flex items-center justify-evenly gap-8 overflow-hidden max-sm:mt-3"><button class="cursor-pointer text-white transition hover:opacity-50"><!></button></div></div> <div class="mx-auto px-6 max-sm:py-1 sm:pt-2 sm:pb-6"><!></div> <!> <div class="mask-fade show-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-1so2hji"><!></div> <a href="https://playlight.dev" target="_blank" class="text-muted-foreground fixed right-4 bottom-4 flex items-center gap-1 text-sm transition hover:text-white">Game dev? Join Playlight <!></a></div>');
5232
5232
  function Discovery(e2, t2) {
5233
5233
  push(t2, true);
5234
- const $discoveryOpen = () => store_get(zn, "$discoveryOpen", n2), [n2, s2] = setup_stores();
5235
- let i2, o2 = /* @__PURE__ */ state(true), a2 = /* @__PURE__ */ state(false), l2 = /* @__PURE__ */ state(void 0), c2 = /* @__PURE__ */ state(proxy([])), u2 = /* @__PURE__ */ state(void 0), d2 = /* @__PURE__ */ state(proxy([])), f2 = /* @__PURE__ */ state(1), p2 = /* @__PURE__ */ state(true), h2 = /* @__PURE__ */ state(false), g2 = /* @__PURE__ */ state(void 0), _2 = /* @__PURE__ */ state(void 0);
5234
+ const $discoveryOpen = () => store_get(qn, "$discoveryOpen", n2), [n2, s2] = setup_stores();
5235
+ let o2, i2 = /* @__PURE__ */ state(true), a2 = /* @__PURE__ */ state(false), l2 = /* @__PURE__ */ state(void 0), c2 = /* @__PURE__ */ state(proxy([])), u2 = /* @__PURE__ */ state(void 0), d2 = /* @__PURE__ */ state(proxy([])), f2 = /* @__PURE__ */ state(1), p2 = /* @__PURE__ */ state(true), h2 = /* @__PURE__ */ state(false), g2 = /* @__PURE__ */ state(void 0), _2 = /* @__PURE__ */ state(void 0);
5236
5236
  async function loadNewFeed() {
5237
5237
  var _a2, _b3;
5238
5238
  set(d2, [], true), set(f2, 1), set(p2, true), set(h2, false), ((_a2 = get$1(l2)) == null ? void 0 : _a2.featured_game) && get$1(u2) == ((_b3 = get$1(l2)) == null ? void 0 : _b3.category) && get$1(d2).push({
@@ -5241,32 +5241,32 @@ function Discovery(e2, t2) {
5241
5241
  }), await fetchGames();
5242
5242
  }
5243
5243
  async function fetchGames() {
5244
- if (get$1(o2) || get$1(a2)) return;
5245
- 1 === get$1(f2) ? set(o2, true) : set(a2, true);
5246
- const e3 = get$1(h2) ? null : get$1(u2), t3 = await vt.getSuggestions(e3, get$1(f2)), n3 = (t3 == null ? void 0 : t3.games) || [], s3 = (t3 == null ? void 0 : t3.pageSize) || 15, i3 = n3.filter((e4) => !get$1(d2).some((t4) => t4.id === e4.id));
5247
- if (set(d2, [...get$1(d2), ...i3], true), n3.length < s3 ? !get$1(h2) && get$1(u2) ? (set(h2, true), set(f2, 1)) : set(p2, false) : set(f2, get$1(f2) + 1), // Disable loading state
5248
- set(o2, false), set(a2, false), get$1(p2) && get$1(g2)) {
5244
+ if (get$1(i2) || get$1(a2)) return;
5245
+ 1 === get$1(f2) ? set(i2, true) : set(a2, true);
5246
+ const e3 = get$1(h2) ? null : get$1(u2), t3 = await vt.getSuggestions(e3, get$1(f2)), n3 = (t3 == null ? void 0 : t3.games) || [], s3 = (t3 == null ? void 0 : t3.pageSize) || 15, o3 = n3.filter((e4) => !get$1(d2).some((t4) => t4.id === e4.id));
5247
+ if (set(d2, [...get$1(d2), ...o3], true), n3.length < s3 ? !get$1(h2) && get$1(u2) ? (set(h2, true), set(f2, 1)) : set(p2, false) : set(f2, get$1(f2) + 1), // Disable loading state
5248
+ set(i2, false), set(a2, false), get$1(p2) && get$1(g2)) {
5249
5249
  get$1(g2).getBoundingClientRect().bottom <= window.innerHeight + 300 && fetchGames();
5250
5250
  }
5251
5251
  }
5252
- onMount(() => (i2 = new IntersectionObserver((e3) => {
5252
+ onMount(() => (o2 = new IntersectionObserver((e3) => {
5253
5253
  e3[0].isIntersecting && get$1(p2) && fetchGames();
5254
5254
  }, {
5255
5255
  rootMargin: "300px",
5256
5256
  root: get$1(_2)
5257
- }), () => i2 == null ? void 0 : i2.disconnect())), // Observe bottom detector element when it becomes available
5257
+ }), () => o2 == null ? void 0 : o2.disconnect())), // Observe bottom detector element when it becomes available
5258
5258
  user_effect(() => {
5259
- get$1(g2) && i2 && i2.observe(get$1(g2));
5259
+ get$1(g2) && o2 && o2.observe(get$1(g2));
5260
5260
  }), onMount(async () => {
5261
5261
  var _a2, _b3, _c2;
5262
5262
  await (async (e3) => {
5263
5263
  var t3 = to_array(e3, 2);
5264
5264
  set(l2, t3[0], true), set(c2, t3[1], true);
5265
- })(await Promise.all([vt.getCurrentGameInfo(), vt.getCategories()])), set(u2, ((_a2 = get$1(l2)) == null ? void 0 : _a2.category) || ((_c2 = get$1(c2)) == null ? void 0 : _c2[((_b3 = get$1(c2)) == null ? void 0 : _b3.length) - 1]), true), set(o2, false), await loadNewFeed();
5265
+ })(await Promise.all([vt.getCurrentGameInfo(), vt.getCategories()])), set(u2, ((_a2 = get$1(l2)) == null ? void 0 : _a2.category) || ((_c2 = get$1(c2)) == null ? void 0 : _c2[((_b3 = get$1(c2)) == null ? void 0 : _b3.length) - 1]), true), set(i2, false), await loadNewFeed();
5266
5266
  });
5267
5267
  var v2 = Ht();
5268
5268
  event("keydown", N, (e3) => {
5269
- "Escape" == e3.key && store_set(zn, false);
5269
+ "Escape" == e3.key && store_set(qn, false);
5270
5270
  }), v2.__pointerup = [closeDiscoveryOnEmptyClick, $discoveryOpen];
5271
5271
  var m2 = child(v2), b2 = child(m2), y2 = child(sibling(b2, 2));
5272
5272
  y2.__click = [on_click$1, $discoveryOpen], (function X(e3, t3) {
@@ -5334,7 +5334,7 @@ function Discovery(e2, t2) {
5334
5334
  });
5335
5335
  };
5336
5336
  if_block($2, (e3) => {
5337
- store_get(Fn, "$sidebarEnabled", n2) && !store_get(Hn, "$sidebarCollapsed", n2) || e3(consequent);
5337
+ store_get(Gn, "$sidebarEnabled", n2) && !store_get(Fn, "$sidebarCollapsed", n2) || e3(consequent);
5338
5338
  });
5339
5339
  var x2 = sibling($2, 2);
5340
5340
  x2.__pointerup = [closeDiscoveryOnEmptyClick, $discoveryOpen];
@@ -5352,20 +5352,20 @@ function Discovery(e2, t2) {
5352
5352
  var t4 = Ft(), n4 = child(t4);
5353
5353
  each(n4, 17, () => get$1(d2), index, (e5, t5, n5) => {
5354
5354
  const s4 = user_derived(() => get$1(d2).findIndex((e6) => e6.category !== get$1(u2) && !e6.featured));
5355
- var i4 = Rt(), o3 = first_child(i4), consequent_3 = (e6) => {
5355
+ var o4 = Rt(), i3 = first_child(o4), consequent_3 = (e6) => {
5356
5356
  ((e7) => {
5357
5357
  append(e7, Nt());
5358
5358
  })(e6);
5359
5359
  };
5360
- if_block(o3, (e6) => {
5360
+ if_block(i3, (e6) => {
5361
5361
  n5 == get$1(s4) && e6(consequent_3);
5362
- }), GameCard(sibling(o3, 2), {
5362
+ }), GameCard(sibling(i3, 2), {
5363
5363
  get game() {
5364
5364
  return get$1(t5);
5365
5365
  }
5366
- }), append(e5, i4);
5366
+ }), append(e5, o4);
5367
5367
  });
5368
- var s3 = sibling(n4, 2), i3 = child(s3), consequent_4 = (e5) => {
5368
+ var s3 = sibling(n4, 2), o3 = child(s3), consequent_4 = (e5) => {
5369
5369
  var t5 = Gt();
5370
5370
  Loader_circle(child(t5), {
5371
5371
  class: "animate-spin opacity-75",
@@ -5373,16 +5373,16 @@ function Discovery(e2, t2) {
5373
5373
  strokeWidth: 2.5
5374
5374
  }), append(e5, t5);
5375
5375
  };
5376
- if_block(i3, (e5) => {
5376
+ if_block(o3, (e5) => {
5377
5377
  get$1(a2) && e5(consequent_4);
5378
5378
  }), bind_this(s3, (e5) => set(g2, e5), () => get$1(g2)), append(e4, t4);
5379
5379
  };
5380
5380
  if_block(n3, (e4) => {
5381
- 0 !== get$1(d2).length || get$1(o2) ? e4(alternate, false) : e4(consequent_2);
5381
+ 0 !== get$1(d2).length || get$1(i2) ? e4(alternate, false) : e4(consequent_2);
5382
5382
  }, true), append(e3, t3);
5383
5383
  };
5384
5384
  if_block(k2, (e3) => {
5385
- get$1(o2) && 0 === get$1(d2).length ? e3(consequent_1) : e3(alternate_1, false);
5385
+ get$1(i2) && 0 === get$1(d2).length ? e3(consequent_1) : e3(alternate_1, false);
5386
5386
  }), bind_this(x2, (e3) => set(_2, e3), () => get$1(_2));
5387
5387
  var S2 = sibling(x2, 2);
5388
5388
  !(function External_link(e3, t3) {
@@ -5429,7 +5429,7 @@ function Discovery(e2, t2) {
5429
5429
  }));
5430
5430
  })(sibling(child(S2)), {
5431
5431
  size: 14
5432
- }), template_effect(() => set_attribute(b2, "src", store_get(Yn, "$projectUrl", n2) + "/assets/images/logo-white-small.png")), transition(3, v2, () => blur, () => ({
5432
+ }), template_effect(() => set_attribute(b2, "src", store_get(Hn, "$projectUrl", n2) + "/assets/images/logo-white-small.png")), transition(3, v2, () => blur, () => ({
5433
5433
  duration: 250
5434
5434
  })), append(e2, v2), pop(), s2();
5435
5435
  }
@@ -5437,18 +5437,18 @@ delegate(["pointerup", "click"]);
5437
5437
  var Yt = /* @__PURE__ */ from_html("<button><!></button>");
5438
5438
  function Button(e2, t2) {
5439
5439
  let n2 = prop(t2, "disabled", 3, false), s2 = prop(t2, "variant", 3, "primary");
5440
- var i2 = Yt();
5441
- i2.__click = function(...e3) {
5440
+ var o2 = Yt();
5441
+ o2.__click = function(...e3) {
5442
5442
  var _a2;
5443
5443
  (_a2 = t2.onclick) == null ? void 0 : _a2.apply(this, e3);
5444
- }, snippet(child(i2), () => t2.children ?? noop), template_effect(() => {
5445
- i2.disabled = n2(), set_class(i2, 1, `${"primary" == s2() ? "outline-muted bg-white text-black hover:outline" : "secondary" == s2() ? "bg-background hover:bg-muted outline-muted outline" : "ghost" == s2() ? "hover:opacity-50" : ""} text-md inline-flex cursor-pointer items-center justify-center gap-2 ${"ghost" !== s2() ? "hover:bg-background px-3 py-2" : ""} font-bold text-nowrap uppercase transition hover:text-white ${n2() ? "pointer-events-none opacity-50" : ""} ${t2.class ?? ""}`);
5446
- }), append(e2, i2);
5444
+ }, snippet(child(o2), () => t2.children ?? noop), template_effect(() => {
5445
+ o2.disabled = n2(), set_class(o2, 1, `${"primary" == s2() ? "outline-muted bg-white text-black hover:outline" : "secondary" == s2() ? "bg-background hover:bg-muted outline-muted outline" : "ghost" == s2() ? "hover:opacity-50" : ""} text-md inline-flex cursor-pointer items-center justify-center gap-2 ${"ghost" !== s2() ? "hover:bg-background px-3 py-2" : ""} font-bold text-nowrap uppercase transition hover:text-white ${n2() ? "pointer-events-none opacity-50" : ""} ${t2.class ?? ""}`);
5446
+ }), append(e2, o2);
5447
5447
  }
5448
5448
  async function fetchQuickSuggestions(e2 = 10, t2 = false) {
5449
- const [n2, s2] = await Promise.all([vt.getCategories(), vt.getCurrentGameInfo()]), i2 = (s2 == null ? void 0 : s2.category) || (n2 == null ? void 0 : n2[(n2 == null ? void 0 : n2.length) - 1]), o2 = await vt.getSuggestions(i2, 1);
5450
- (o2 == null ? void 0 : o2.pageSize) < e2 && console.error("Threshold must be <= than page size to avoid always triggering a re-fetch!");
5451
- let a2 = (o2 == null ? void 0 : o2.games) || [];
5449
+ const [n2, s2] = await Promise.all([vt.getCategories(), vt.getCurrentGameInfo()]), o2 = (s2 == null ? void 0 : s2.category) || (n2 == null ? void 0 : n2[(n2 == null ? void 0 : n2.length) - 1]), i2 = await vt.getSuggestions(o2, 1);
5450
+ (i2 == null ? void 0 : i2.pageSize) < e2 && console.error("Threshold must be <= than page size to avoid always triggering a re-fetch!");
5451
+ let a2 = (i2 == null ? void 0 : i2.games) || [];
5452
5452
  if (t2 && (a2 = a2.slice(0, Math.ceil(e2 / 2))), a2.length < e2 || t2) {
5453
5453
  const e3 = await vt.getSuggestions(null, 1), t3 = ((e3 == null ? void 0 : e3.games) || []).filter((e4) => !a2.some((t4) => t4.id === e4.id));
5454
5454
  a2 = [...a2, ...t3];
@@ -5458,20 +5458,20 @@ async function fetchQuickSuggestions(e2 = 10, t2 = false) {
5458
5458
  delegate(["click"]);
5459
5459
  var on_pointerover = (e2, t2) => {
5460
5460
  "touch" !== e2.pointerType && t2();
5461
- }, Ut = /* @__PURE__ */ from_html('<div class="fixed top-0 right-0 left-0 h-4 max-lg:hidden"></div>'), Vt = /* @__PURE__ */ from_html('<div class="relative"><img alt="" class="group-hover:outline-background relative h-7 w-7 bg-stone-200 outline outline-4 outline-white transition-colors select-none"/></div>'), Kt = /* @__PURE__ */ from_html('<div class="ml-3 flex items-center -space-x-2"></div>'), Xt = /* @__PURE__ */ from_html("More games <!>", 1), Zt = /* @__PURE__ */ from_html('<div role="menu" tabindex="0" class="bg-background/85 fixed top-4 right-4 left-4 mx-auto flex w-fit max-w-[calc(100%-2rem)] flex-wrap items-center gap-4 overflow-hidden border-1 p-4 shadow-lg backdrop-blur-xl"><p class="truncate text-lg font-semibold text-nowrap text-white"> </p> <!></div>'), Jt = /* @__PURE__ */ from_html("<!> <!>", 1);
5461
+ }, Vt = /* @__PURE__ */ from_html('<div class="fixed top-0 right-0 left-0 h-4 max-lg:hidden"></div>'), Ut = /* @__PURE__ */ from_html('<div class="relative"><img alt="" class="group-hover:outline-background relative h-7 w-7 bg-stone-200 outline outline-4 outline-white transition-colors select-none"/></div>'), Kt = /* @__PURE__ */ from_html('<div class="ml-3 flex items-center -space-x-2"></div>'), Xt = /* @__PURE__ */ from_html("More games <!>", 1), Zt = /* @__PURE__ */ from_html('<div role="menu" tabindex="0" class="bg-background/85 fixed top-4 right-4 left-4 mx-auto flex w-fit max-w-[calc(100%-2rem)] flex-wrap items-center gap-4 overflow-hidden border-1 p-4 shadow-lg backdrop-blur-xl"><p class="truncate text-lg font-semibold text-nowrap text-white"> </p> <!></div>'), Jt = /* @__PURE__ */ from_html("<!> <!>", 1);
5462
5462
  delegate(["pointerover"]);
5463
5463
  var Qt = /* @__PURE__ */ from_html("<!> <!> <!>", 1);
5464
5464
  function App(e2, t2) {
5465
5465
  push(t2, false);
5466
- const $discoveryOpen = () => store_get(zn, "$discoveryOpen", n2), $config = () => store_get(Nn, "$config", n2), [n2, s2] = setup_stores();
5466
+ const $discoveryOpen = () => store_get(qn, "$discoveryOpen", n2), $config = () => store_get(Bn, "$config", n2), [n2, s2] = setup_stores();
5467
5467
  init();
5468
- var i2 = Qt(), o2 = first_child(i2), consequent = (e3) => {
5468
+ var o2 = Qt(), i2 = first_child(o2), consequent = (e3) => {
5469
5469
  Discovery(e3, {});
5470
5470
  };
5471
- if_block(o2, (e3) => {
5471
+ if_block(i2, (e3) => {
5472
5472
  $discoveryOpen() && e3(consequent);
5473
5473
  });
5474
- var a2 = sibling(o2, 2);
5474
+ var a2 = sibling(i2, 2);
5475
5475
  {
5476
5476
  let e3 = /* @__PURE__ */ derived_safe_equal(() => {
5477
5477
  var _a2, _b3;
@@ -5482,28 +5482,28 @@ function App(e2, t2) {
5482
5482
  });
5483
5483
  !(function ExitIntent(e4, t4) {
5484
5484
  push(t4, true);
5485
- let n3, s3 = prop(t4, "enabled", 3, true), i3 = prop(t4, "immediate", 3, false), o3 = /* @__PURE__ */ state(void 0), a3 = /* @__PURE__ */ state(void 0), l3 = /* @__PURE__ */ state(proxy([])), c2 = /* @__PURE__ */ state(false), u2 = /* @__PURE__ */ state(void 0);
5485
+ let n3, s3 = prop(t4, "enabled", 3, true), o3 = prop(t4, "immediate", 3, false), i3 = /* @__PURE__ */ state(void 0), a3 = /* @__PURE__ */ state(void 0), l3 = /* @__PURE__ */ state(proxy([])), c2 = /* @__PURE__ */ state(false), u2 = /* @__PURE__ */ state(void 0);
5486
5486
  function handleBarTrigger() {
5487
5487
  setTimeout(async () => {
5488
5488
  var _a2, _b3;
5489
- n3 < Date.now() - 50 && (clearTimeout(get$1(u2)), set(u2, null), i3() ? (triggerEvent("exitIntent"), (_a2 = t4.onIntent) == null ? void 0 : _a2.call(t4)) : (triggerEvent("exitIntent"), set(c2, true), ((_b3 = get$1(l3)) == null ? void 0 : _b3.length) || set(l3, await fetchQuickSuggestions(3), true)));
5489
+ n3 < Date.now() - 50 && (clearTimeout(get$1(u2)), set(u2, null), o3() ? (triggerEvent("exitIntent"), (_a2 = t4.onIntent) == null ? void 0 : _a2.call(t4)) : (triggerEvent("exitIntent"), set(c2, true), ((_b3 = get$1(l3)) == null ? void 0 : _b3.length) || set(l3, await fetchQuickSuggestions(3), true)));
5490
5490
  }, 150);
5491
5491
  }
5492
5492
  let d2 = ["The cure for boredom.", "Ready for what’s next?", "Why stop the fun now?", "Games don’t play themselves.", "A new adventure awaits.", "There’s always time for one more."];
5493
5493
  var f2 = Jt();
5494
5494
  event("mousemove", N, function trackMouse(e5) {
5495
5495
  var _a2, _b3;
5496
- !s3() || ((_a2 = get$1(o3)) == null ? void 0 : _a2.contains(e5.target)) || ((_b3 = get$1(a3)) == null ? void 0 : _b3.contains(e5.target)) || (!get$1(u2) && get$1(c2) && set(u2, setTimeout(() => set(c2, false), 1500), true), n3 = Date.now());
5496
+ !s3() || ((_a2 = get$1(i3)) == null ? void 0 : _a2.contains(e5.target)) || ((_b3 = get$1(a3)) == null ? void 0 : _b3.contains(e5.target)) || (!get$1(u2) && get$1(c2) && set(u2, setTimeout(() => set(c2, false), 1500), true), n3 = Date.now());
5497
5497
  });
5498
5498
  var p2 = first_child(f2), consequent2 = (e5) => {
5499
- var t5 = Ut();
5500
- t5.__pointerover = [on_pointerover, handleBarTrigger], bind_this(t5, (e6) => set(o3, e6), () => get$1(o3)), append(e5, t5);
5499
+ var t5 = Vt();
5500
+ t5.__pointerover = [on_pointerover, handleBarTrigger], bind_this(t5, (e6) => set(i3, e6), () => get$1(i3)), append(e5, t5);
5501
5501
  };
5502
5502
  if_block(p2, (e5) => {
5503
5503
  s3() && e5(consequent2);
5504
5504
  });
5505
5505
  var h2 = sibling(p2, 2), consequent_2 = (e5) => {
5506
- var n4 = Zt(), s4 = child(n4), i4 = child(s4);
5506
+ var n4 = Zt(), s4 = child(n4), o4 = child(s4);
5507
5507
  Button(sibling(s4, 2), {
5508
5508
  class: "group",
5509
5509
  onclick: () => {
@@ -5514,11 +5514,11 @@ function App(e2, t2) {
5514
5514
  var n5 = Xt(), s5 = sibling(first_child(n5)), consequent_12 = (e7) => {
5515
5515
  var t6 = Kt();
5516
5516
  each(t6, 21, () => get$1(l3), index, (e8, t7, n6) => {
5517
- var s6 = Vt();
5518
- let i5;
5519
- var o4 = child(s6);
5517
+ var s6 = Ut();
5518
+ let o5;
5519
+ var i4 = child(s6);
5520
5520
  template_effect((e9) => {
5521
- i5 = set_style(s6, "", i5, e9), set_attribute(o4, "src", get$1(t7).logo_url);
5521
+ o5 = set_style(s6, "", o5, e9), set_attribute(i4, "src", get$1(t7).logo_url);
5522
5522
  }, [() => ({
5523
5523
  "z-index": get$1(l3).length - n6
5524
5524
  })]), append(e8, s6);
@@ -5535,7 +5535,7 @@ function App(e2, t2) {
5535
5535
  $$slots: {
5536
5536
  default: true
5537
5537
  }
5538
- }), bind_this(n4, (e6) => set(a3, e6), () => get$1(a3)), template_effect((e6) => set_text(i4, e6), [() => d2[Math.floor(Math.random() * d2.length)]]), event("mouseenter", n4, () => {
5538
+ }), bind_this(n4, (e6) => set(a3, e6), () => get$1(a3)), template_effect((e6) => set_text(o4, e6), [() => d2[Math.floor(Math.random() * d2.length)]]), event("mouseenter", n4, () => {
5539
5539
  clearTimeout(get$1(u2)), set(u2, null);
5540
5540
  }), transition(3, n4, () => fly, () => ({
5541
5541
  y: -100,
@@ -5554,7 +5554,7 @@ function App(e2, t2) {
5554
5554
  return get$1(t3);
5555
5555
  },
5556
5556
  onIntent: () => {
5557
- $discoveryOpen() || store_set(zn, true);
5557
+ $discoveryOpen() || store_set(qn, true);
5558
5558
  }
5559
5559
  });
5560
5560
  }
@@ -5562,14 +5562,14 @@ function App(e2, t2) {
5562
5562
  Toaster(e3, {});
5563
5563
  };
5564
5564
  if_block(l2, (e3) => {
5565
- ($discoveryOpen() || store_get(Fn, "$sidebarEnabled", n2)) && e3(consequent_1);
5566
- }), append(e2, i2), pop(), s2();
5565
+ ($discoveryOpen() || store_get(Gn, "$sidebarEnabled", n2)) && e3(consequent_1);
5566
+ }), append(e2, o2), pop(), s2();
5567
5567
  }
5568
5568
  var en = /* @__PURE__ */ from_html('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><!></div>'), tn = /* @__PURE__ */ from_html('<div class="scroll-container grid grid-cols-2 gap-6 svelte-129hoe0"><div class="flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column flex flex-col gap-6 svelte-129hoe0"></div></div> <div class="mt-15 flex flex-col gap-6 svelte-129hoe0"><div class="animate-scroll-column-offset flex flex-col gap-6 svelte-129hoe0"></div></div></div>'), nn = /* @__PURE__ */ from_html('<div class="flex h-full w-full items-center justify-center svelte-129hoe0"><p class="text-muted-foreground svelte-129hoe0">Error – See console</p></div>'), rn = /* @__PURE__ */ from_html("View all games <!>", 1), sn = /* @__PURE__ */ from_html("Random game <!>", 1), on_mousedown = (e2, t2) => t2(e2.clientY), on_touchstart = (e2, t2) => t2(e2.touches[0].clientY), an = /* @__PURE__ */ from_html('<img alt="icon" class="pointer-events-none aspect-square w-8 svelte-129hoe0"/>'), ln = /* @__PURE__ */ from_html('<div role="button" tabindex="0"><!> <!></div>'), un = /* @__PURE__ */ from_html('<div><img alt="logo" class="pointer-events-none mx-auto mt-4 -mb-1 w-50 select-none svelte-129hoe0"/> <div class="grow-1 overflow-hidden mask-y-from-90% mask-y-to-100% p-6 py-12 transition-opacity not-hover:opacity-75 svelte-129hoe0"><!></div> <div class="flex w-full flex-col items-center gap-4 px-4 svelte-129hoe0"><!> <!></div> <div class="w-full svelte-129hoe0"><div class="mt-auto border-y p-6 py-4 svelte-129hoe0"><!></div> <div class="flex justify-end p-0 svelte-129hoe0"><!></div></div></div> <!>', 1);
5569
5569
  function Sidebar(e2, t2) {
5570
5570
  push(t2, true);
5571
- const $sidebarCollapsed = () => store_get(Hn, "$sidebarCollapsed", n2), $projectUrl = () => store_get(Yn, "$projectUrl", n2), $discoveryOpen = () => store_get(zn, "$discoveryOpen", n2), [n2, s2] = setup_stores();
5572
- let i2 = /* @__PURE__ */ state(false), o2 = /* @__PURE__ */ state(void 0), a2 = /* @__PURE__ */ state(0), l2 = /* @__PURE__ */ state(null), c2 = /* @__PURE__ */ state(proxy([])), u2 = user_derived(() => {
5571
+ const $sidebarCollapsed = () => store_get(Fn, "$sidebarCollapsed", n2), $projectUrl = () => store_get(Hn, "$projectUrl", n2), $discoveryOpen = () => store_get(qn, "$discoveryOpen", n2), [n2, s2] = setup_stores();
5572
+ let o2 = /* @__PURE__ */ state(false), i2 = /* @__PURE__ */ state(void 0), a2 = /* @__PURE__ */ state(0), l2 = /* @__PURE__ */ state(null), c2 = /* @__PURE__ */ state(proxy([])), u2 = user_derived(() => {
5573
5573
  var _a2;
5574
5574
  return ((_a2 = get$1(c2)) == null ? void 0 : _a2.filter((e3, t3) => t3 % 2 == 0)) || [];
5575
5575
  }), d2 = user_derived(() => {
@@ -5591,11 +5591,11 @@ function Sidebar(e2, t2) {
5591
5591
  user_pre_effect(() => {
5592
5592
  var _a2;
5593
5593
  const e3 = document.documentElement.clientWidth <= 768;
5594
- store_set(Hn, e3 || Boolean((_a2 = getSidebarState()) == null ? void 0 : _a2.collapsed));
5594
+ store_set(Fn, e3 || Boolean((_a2 = getSidebarState()) == null ? void 0 : _a2.collapsed));
5595
5595
  }), onMount(async () => {
5596
5596
  var _a2;
5597
5597
  return set(p2, ((_a2 = getSidebarState()) == null ? void 0 : _a2.buttonY) ?? get$1(p2), true), // Fetch data
5598
- set(i2, true), set(c2, await fetchQuickSuggestions(14, true), true), set(o2, await vt.getCurrentGameInfo(), true), set(i2, false), on(window, "touchmove", handleTouchMove, {
5598
+ set(o2, true), set(c2, await fetchQuickSuggestions(14, true), true), set(i2, await vt.getCurrentGameInfo(), true), set(o2, false), on(window, "touchmove", handleTouchMove, {
5599
5599
  passive: false
5600
5600
  });
5601
5601
  });
@@ -5627,7 +5627,7 @@ function Sidebar(e2, t2) {
5627
5627
  event("mousemove", N, function handleMouseMove(e3) {
5628
5628
  get$1(h2) && handleDragMove(e3.clientY);
5629
5629
  }), event("mouseup", N, () => set(h2, false)), event("touchend", N, () => set(h2, false)), event("resize", N, () => {
5630
- document.documentElement.clientWidth <= 768 && store_set(Hn, true);
5630
+ document.documentElement.clientWidth <= 768 && store_set(Fn, true);
5631
5631
  });
5632
5632
  var b2 = first_child(m2), y2 = child(b2), w2 = sibling(y2, 2), $2 = child(w2), consequent = (e3) => {
5633
5633
  var t3 = en();
@@ -5639,7 +5639,7 @@ function Sidebar(e2, t2) {
5639
5639
  }, alternate_1 = (e3) => {
5640
5640
  var t3 = comment(), n3 = first_child(t3), consequent_1 = (e4) => {
5641
5641
  var t4 = tn(), n4 = child(t4), s3 = child(n4);
5642
- let i3;
5642
+ let o3;
5643
5643
  each(s3, 21, () => [...get$1(u2), ...get$1(u2), ...get$1(u2)], index, (e5, t5) => {
5644
5644
  GameCard(e5, {
5645
5645
  get game() {
@@ -5648,9 +5648,9 @@ function Sidebar(e2, t2) {
5648
5648
  small: true
5649
5649
  });
5650
5650
  }), bind_this(s3, (e5) => set(l2, e5), () => get$1(l2));
5651
- var o3 = child(sibling(n4, 2));
5651
+ var i3 = child(sibling(n4, 2));
5652
5652
  let c3;
5653
- each(o3, 21, () => [...get$1(d2), ...get$1(d2), ...get$1(d2)], index, (e5, t5) => {
5653
+ each(i3, 21, () => [...get$1(d2), ...get$1(d2), ...get$1(d2)], index, (e5, t5) => {
5654
5654
  GameCard(e5, {
5655
5655
  get game() {
5656
5656
  return get$1(t5);
@@ -5658,7 +5658,7 @@ function Sidebar(e2, t2) {
5658
5658
  small: true
5659
5659
  });
5660
5660
  }), template_effect((e5, t5) => {
5661
- i3 = set_style(s3, "", i3, e5), c3 = set_style(o3, "", c3, t5);
5661
+ o3 = set_style(s3, "", o3, e5), c3 = set_style(i3, "", c3, t5);
5662
5662
  }, [() => ({
5663
5663
  transform: `translateY(calc(-33.333% + ${get$1(a2) ?? ""}px))`
5664
5664
  }), () => ({
@@ -5673,12 +5673,12 @@ function Sidebar(e2, t2) {
5673
5673
  }, true), append(e3, t3);
5674
5674
  };
5675
5675
  if_block($2, (e3) => {
5676
- get$1(i2) ? e3(consequent) : e3(alternate_1, false);
5676
+ get$1(o2) ? e3(consequent) : e3(alternate_1, false);
5677
5677
  });
5678
5678
  var x2 = sibling(w2, 2), k2 = child(x2);
5679
5679
  Button(k2, {
5680
5680
  class: "w-full",
5681
- onclick: () => store_set(zn, true),
5681
+ onclick: () => store_set(qn, true),
5682
5682
  get disabled() {
5683
5683
  return $discoveryOpen();
5684
5684
  },
@@ -5823,13 +5823,13 @@ function Sidebar(e2, t2) {
5823
5823
  var S2 = child(sibling(x2, 2));
5824
5824
  CurrentGameDisplay(child(S2), {
5825
5825
  get currentGame() {
5826
- return get$1(o2);
5826
+ return get$1(i2);
5827
5827
  }
5828
5828
  }), Button(child(sibling(S2, 2)), {
5829
5829
  variant: "secondary",
5830
5830
  class: "text-muted-foreground border-l outline-none!",
5831
5831
  onclick: () => {
5832
- store_set(Hn, true), saveSidebarState();
5832
+ store_set(Fn, true), saveSidebarState();
5833
5833
  },
5834
5834
  children: (e3, t3) => {
5835
5835
  !(function Chevrons_right(e4, t4) {
@@ -5948,7 +5948,7 @@ function Sidebar(e2, t2) {
5948
5948
  }), Button(sibling(s3, 2), {
5949
5949
  variant: "ghost",
5950
5950
  onclick: () => {
5951
- document.documentElement.clientWidth > 768 ? (store_set(Hn, false), saveSidebarState()) : store_set(zn, true);
5951
+ document.documentElement.clientWidth > 768 ? (store_set(Fn, false), saveSidebarState()) : store_set(qn, true);
5952
5952
  },
5953
5953
  children: (e4, t4) => {
5954
5954
  var n4 = an();
@@ -5976,24 +5976,24 @@ function activateCSSViewportOverride(e2) {
5976
5976
  const t2 = e2.clientWidth, n2 = document.documentElement.clientWidth - t2;
5977
5977
  Array.from(document.styleSheets).forEach((e3) => (function replaceStylesheet(e4, t3, n3, s2) {
5978
5978
  var _a2;
5979
- const i2 = e4.ownerNode;
5980
- if (!i2 || e4.href && /playlight/i.test(e4.href)) return;
5979
+ const o2 = e4.ownerNode;
5980
+ if (!o2 || e4.href && /playlight/i.test(e4.href)) return;
5981
5981
  try {
5982
- if (gn.has(i2))
5983
- transformStylesheet(i2, gn.get(i2).originalCSS, t3, n3, s2);
5982
+ if (gn.has(o2))
5983
+ transformStylesheet(o2, gn.get(o2).originalCSS, t3, n3, s2);
5984
5984
  else {
5985
5985
  if (!((_a2 = e4.cssRules) == null ? void 0 : _a2.length)) return;
5986
- const o2 = Array.from(e4.cssRules).map((e5) => e5.cssText).join("\n");
5987
- if ("LINK" === i2.tagName) {
5986
+ const i2 = Array.from(e4.cssRules).map((e5) => e5.cssText).join("\n");
5987
+ if ("LINK" === o2.tagName) {
5988
5988
  const e5 = document.createElement("style");
5989
- e5.setAttribute("data-playlight-original-href", i2.href), gn.set(e5, {
5990
- originalCSS: o2,
5991
- originalElement: i2
5992
- }), i2.replaceWith(e5), transformStylesheet(e5, o2, t3, n3, s2);
5993
- } else gn.set(i2, {
5994
- originalCSS: o2,
5989
+ e5.setAttribute("data-playlight-original-href", o2.href), gn.set(e5, {
5990
+ originalCSS: i2,
5991
+ originalElement: o2
5992
+ }), o2.replaceWith(e5), transformStylesheet(e5, i2, t3, n3, s2);
5993
+ } else gn.set(o2, {
5994
+ originalCSS: i2,
5995
5995
  originalElement: null
5996
- }), transformStylesheet(i2, o2, t3, n3, s2);
5996
+ }), transformStylesheet(o2, i2, t3, n3, s2);
5997
5997
  }
5998
5998
  } catch (t4) {
5999
5999
  console.warn(`Playlight cannot process stylesheet ${e4.href || "inline"} due to CORS restrictions.`);
@@ -6026,35 +6026,35 @@ function activateCSSViewportOverride(e2) {
6026
6026
  attributeFilter: ["rel"]
6027
6027
  }), update2();
6028
6028
  }
6029
- function transformStylesheet(e2, t2, n2, s2, i2) {
6030
- const o2 = e2.getAttribute("data-playlight-original-href");
6031
- let a2 = o2 ? (function makeURLsAbsolute(e3, t3) {
6029
+ function transformStylesheet(e2, t2, n2, s2, o2) {
6030
+ const i2 = e2.getAttribute("data-playlight-original-href");
6031
+ let a2 = i2 ? (function makeURLsAbsolute(e3, t3) {
6032
6032
  try {
6033
6033
  const n3 = new URL(t3, document.baseURI);
6034
6034
  return e3.replace(/url\(\s*(['"]?)([^)'"]+)\1\s*\)/gi, (e4, t4, s3) => !(s3 = s3.trim()) || /^(data:|https?:|\/\/|\/|#)/.test(s3) ? e4 : `url(${t4}${new URL(s3, n3).href}${t4})`);
6035
6035
  } catch {
6036
6036
  return e3;
6037
6037
  }
6038
- })(t2, o2) : t2;
6039
- a2 = applyCSSOverrides(a2, n2, s2, i2), // Apply all CSS overrides
6038
+ })(t2, i2) : t2;
6039
+ a2 = applyCSSOverrides(a2, n2, s2, o2), // Apply all CSS overrides
6040
6040
  e2.textContent = a2, e2.setAttribute("data-playlight-modified", "true");
6041
6041
  }
6042
6042
  function applyCSSOverrides(e2, t2, n2, s2) {
6043
- const i2 = t2 / (t2 + s2), o2 = n2 + s2;
6044
- return e2 = (e2 = e2.replace(/(\d+(?:\.\d+)?)(vw|svw|lvw|dvw)/gi, (t3, n3, s3, o3) => {
6045
- const a2 = e2.substring(0, o3), l2 = a2.lastIndexOf("{"), c2 = a2.lastIndexOf("}");
6043
+ const o2 = t2 / (t2 + s2), i2 = n2 + s2;
6044
+ return e2 = (e2 = e2.replace(/(\d+(?:\.\d+)?)(vw|svw|lvw|dvw)/gi, (t3, n3, s3, i3) => {
6045
+ const a2 = e2.substring(0, i3), l2 = a2.lastIndexOf("{"), c2 = a2.lastIndexOf("}");
6046
6046
  if (l2 > c2) {
6047
6047
  const e3 = a2.substring(c2 + 1, l2).trim();
6048
6048
  if (/^html[.\s,:[]/.test(e3)) return t3;
6049
6049
  }
6050
- return `${(parseFloat(n3) * i2).toFixed(2)}${s3}`;
6050
+ return `${(parseFloat(n3) * o2).toFixed(2)}${s3}`;
6051
6051
  })).replace(/\((min-width|max-width):\s*([\d.]+[a-z]+)\)/gi, (e3, t3, n3) => `(${t3}: calc(${n3} + ${s2}px))`), // Rewrite body selectors to inner wrapper (remove !important so SDK can override)
6052
6052
  e2 = (e2 = // Convert orientation queries
6053
6053
  (e2 = (e2 = // Handle single-sided range: (width < value) or (value < width)
6054
6054
  (e2 = // Handle double-sided range: (value < width < value)
6055
- (e2 = e2.replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi, (e3, t3, n3, i3, o3) => `(calc(${t3} + ${s2}px) ${n3} width ${i3} calc(${o3} + ${s2}px))`)).replace(/\(width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi, (e3, t3, n3) => `(width ${t3} calc(${n3} + ${s2}px))`)).replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\)/gi, (e3, t3, n3) => `(calc(${t3} + ${s2}px) ${n3} width)`)).replace(/\(\s*orientation:\s*portrait\s*\)/gi, `(max-width: ${o2}px)`)).replace(/\(\s*orientation:\s*landscape\s*\)/gi, `(min-width: ${o2 + 1}px)`)).replace(/\bbody\s*\{([^}]*)\}/gi, (e3, t3) => `.playlight-sdk-inner-wrapper {${t3.replace(/\s*!important\s*/gi, "")}}`);
6055
+ (e2 = e2.replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi, (e3, t3, n3, o3, i3) => `(calc(${t3} + ${s2}px) ${n3} width ${o3} calc(${i3} + ${s2}px))`)).replace(/\(width\s*([<>=]+)\s*([\d.]+[a-z]+)\)/gi, (e3, t3, n3) => `(width ${t3} calc(${n3} + ${s2}px))`)).replace(/\(([\d.]+[a-z]+)\s*([<>=]+)\s*width\)/gi, (e3, t3, n3) => `(calc(${t3} + ${s2}px) ${n3} width)`)).replace(/\(\s*orientation:\s*portrait\s*\)/gi, `(max-width: ${i2}px)`)).replace(/\(\s*orientation:\s*landscape\s*\)/gi, `(min-width: ${i2 + 1}px)`)).replace(/\bbody\s*\{([^}]*)\}/gi, (e3, t3) => `.playlight-sdk-inner-wrapper {${t3.replace(/\s*!important\s*/gi, "")}}`);
6056
6056
  }
6057
- let vn, mn = null, bn = null, yn = null, wn = null, $n = null, xn = null, kn = null, Sn = null, Cn = null, On = null, Mn = /* @__PURE__ */ new Map();
6057
+ let vn, mn = null, bn = null, yn = null, wn = null, $n = null, xn = null, kn = null, Sn = null, Cn = null, Mn = null, On = /* @__PURE__ */ new Map();
6058
6058
  let En = null, In = null, Tn = null, Pn = false, Ln = false, jn = [], An = null, Dn = null, Wn = null;
6059
6059
  function mountPlaylight() {
6060
6060
  try {
@@ -6087,10 +6087,10 @@ function setupSidebarLayout() {
6087
6087
  return !["SCRIPT", "STYLE"].includes(e3.tagName) && !((_a3 = e3.id) == null ? void 0 : _a3.includes("playlight"));
6088
6088
  }).forEach((e3) => t3.appendChild(e3)), e2.appendChild(t3), Ln = true, t3;
6089
6089
  };
6090
- if (false !== ((_b3 = (_a2 = get(Nn)) == null ? void 0 : _a2.sidebar) == null ? void 0 : _b3.hasFrameworkRoot) && s2.length > 0) {
6090
+ if (false !== ((_b3 = (_a2 = get(Bn)) == null ? void 0 : _a2.sidebar) == null ? void 0 : _b3.hasFrameworkRoot) && s2.length > 0) {
6091
6091
  if (1 === s2.length)
6092
6092
  In = s2[0], Ln = false;
6093
- else if (true === ((_d3 = (_c2 = get(Nn)) == null ? void 0 : _c2.sidebar) == null ? void 0 : _d3.hasFrameworkRoot)) {
6093
+ else if (true === ((_d3 = (_c2 = get(Bn)) == null ? void 0 : _c2.sidebar) == null ? void 0 : _d3.hasFrameworkRoot)) {
6094
6094
  const e3 = s2.map((e4) => e4.querySelectorAll("*").length), t3 = Math.max(...e3);
6095
6095
  In = s2[e3.indexOf(t3)], Ln = false;
6096
6096
  }
@@ -6121,40 +6121,40 @@ function setupSidebarLayout() {
6121
6121
  configurable: true
6122
6122
  }), // Scroll methods
6123
6123
  kn = window.scrollTo, Sn = window.scroll, Cn = window.scrollBy, window.scrollTo = (...e4) => t3.scrollTo(...e4), window.scroll = (...e4) => t3.scrollTo(...e4), window.scrollBy = (...e4) => t3.scrollBy(...e4), // Redirect scroll events from innerWrapper to window
6124
- On = () => {
6124
+ Mn = () => {
6125
6125
  window.dispatchEvent(new Event("scroll"));
6126
- }, t3.addEventListener("scroll", On), // Window.matchMedia & window.matchMedia.addEventListener/removeEventListener
6126
+ }, t3.addEventListener("scroll", Mn), // Window.matchMedia & window.matchMedia.addEventListener/removeEventListener
6127
6127
  bn = window.matchMedia, window.matchMedia = function(t4) {
6128
6128
  const getAdjustedMQL = () => {
6129
- const n4 = bn || window.matchMedia, s4 = e3.clientWidth, i3 = document.documentElement.clientWidth - s4, o2 = applyCSSOverrides(t4, s4, window.innerHeight, i3);
6130
- return n4.call(window, o2);
6129
+ const n4 = bn || window.matchMedia, s4 = e3.clientWidth, o3 = document.documentElement.clientWidth - s4, i2 = applyCSSOverrides(t4, s4, window.innerHeight, o3);
6130
+ return n4.call(window, i2);
6131
6131
  }, n3 = getAdjustedMQL();
6132
- Mn.has(t4) || Mn.set(t4, {
6132
+ On.has(t4) || On.set(t4, {
6133
6133
  listeners: /* @__PURE__ */ new Set(),
6134
6134
  lastMatches: n3.matches
6135
6135
  });
6136
- const s3 = Mn.get(t4);
6136
+ const s3 = On.get(t4);
6137
6137
  return new Proxy(n3, {
6138
6138
  get(e4, n4) {
6139
6139
  if ("media" === n4) return t4;
6140
6140
  if ("matches" === n4) return getAdjustedMQL().matches;
6141
- if ("addEventListener" === n4) return (t5, n5, ...i4) => {
6142
- "change" === t5 ? s3.listeners.add(n5) : e4.addEventListener(t5, n5, ...i4);
6141
+ if ("addEventListener" === n4) return (t5, n5, ...o4) => {
6142
+ "change" === t5 ? s3.listeners.add(n5) : e4.addEventListener(t5, n5, ...o4);
6143
6143
  };
6144
- if ("removeEventListener" === n4) return (t5, n5, ...i4) => {
6145
- "change" === t5 ? s3.listeners.delete(n5) : e4.removeEventListener(t5, n5, ...i4);
6144
+ if ("removeEventListener" === n4) return (t5, n5, ...o4) => {
6145
+ "change" === t5 ? s3.listeners.delete(n5) : e4.removeEventListener(t5, n5, ...o4);
6146
6146
  };
6147
- const i3 = e4[n4];
6148
- return "function" == typeof i3 ? i3.bind(e4) : i3;
6147
+ const o3 = e4[n4];
6148
+ return "function" == typeof o3 ? o3.bind(e4) : o3;
6149
6149
  }
6150
6150
  });
6151
6151
  }, // Trigger on resize (we dispatch resize events for sidebar resize in a different file)
6152
6152
  // Only maintain one listenter that persists when the sidebar gets unmounted to preserve functionality!
6153
6153
  vn || (vn = window.addEventListener("resize", () => {
6154
- for (const [e4, { listeners: t4, lastMatches: n3 }] of Mn.entries()) {
6154
+ for (const [e4, { listeners: t4, lastMatches: n3 }] of On.entries()) {
6155
6155
  const s3 = window.matchMedia(e4);
6156
6156
  if (s3.matches !== n3) {
6157
- Mn.get(e4).lastMatches = s3.matches;
6157
+ On.get(e4).lastMatches = s3.matches;
6158
6158
  const n4 = new MediaQueryListEvent("change", {
6159
6159
  matches: s3.matches,
6160
6160
  media: s3.media
@@ -6170,8 +6170,8 @@ function setupSidebarLayout() {
6170
6170
  jn = Array.from(e2.classList).filter((e3) => !e3.startsWith("playlight")), jn.forEach((t3) => {
6171
6171
  In.classList.add(t3), e2.classList.remove(t3);
6172
6172
  });
6173
- const i2 = window.getComputedStyle(In);
6174
- "contents" === i2.display && In.style.setProperty("display", "block", "important"), "visible" === i2.overflow && In.style.setProperty("overflow", "auto", "important"), // Mount sidebar as child of <html>
6173
+ const o2 = window.getComputedStyle(In);
6174
+ "contents" === o2.display && In.style.setProperty("display", "block", "important"), "visible" === o2.overflow && In.style.setProperty("overflow", "auto", "important"), // Mount sidebar as child of <html>
6175
6175
  En = document.createElement("div"), En.className = "playlight-sdk playlight-sdk-container-sidebar", t2.appendChild(En), Tn = mount(Sidebar, {
6176
6176
  target: En
6177
6177
  }), // Monitor the sidebar structure and remount when needed
@@ -6206,7 +6206,7 @@ function removeSidebarLayout() {
6206
6206
  }), // Restore polyfills and clean up (has to happen after the unmount)
6207
6207
  (function restoreWindowPolyfills(e3) {
6208
6208
  try {
6209
- Object.defineProperty(window, "innerWidth", mn), Object.defineProperty(window, "scrollY", yn), Object.defineProperty(window, "pageYOffset", wn), Object.defineProperty(window, "scrollX", $n), Object.defineProperty(window, "pageXOffset", xn), window.scrollTo = kn, window.scroll = Sn, window.scrollBy = Cn, e3.removeEventListener("scroll", On), window.matchMedia = bn, mn = null, yn = null, wn = null, $n = null, xn = null, kn = null, Sn = null, Cn = null, On = null, bn = null;
6209
+ Object.defineProperty(window, "innerWidth", mn), Object.defineProperty(window, "scrollY", yn), Object.defineProperty(window, "pageYOffset", wn), Object.defineProperty(window, "scrollX", $n), Object.defineProperty(window, "pageXOffset", xn), window.scrollTo = kn, window.scroll = Sn, window.scrollBy = Cn, e3.removeEventListener("scroll", Mn), window.matchMedia = bn, mn = null, yn = null, wn = null, $n = null, xn = null, kn = null, Sn = null, Cn = null, Mn = null, bn = null;
6210
6210
  } catch (e4) {
6211
6211
  console.warn("Could not restore window polyfills:", e4);
6212
6212
  }
@@ -6221,39 +6221,33 @@ function removeSidebarLayout() {
6221
6221
  console.error("Error during sidebar removal:", e2);
6222
6222
  }
6223
6223
  }
6224
- const Bn = "sdk.playlight.dev";
6225
- const Nn = writable(null), qn = writable(false), zn = writable(false), Rn = writable(false), Gn = writable(0), Fn = writable(false), Hn = writable(false), Yn = writable((function getAssetBaseUrl() {
6226
- const e2 = import.meta.url;
6227
- if (e2.includes(Bn) || e2.startsWith("file://")) return "https://" + Bn;
6228
- const t2 = new URL(e2);
6229
- return t2.origin + t2.pathname.substring(0, t2.pathname.lastIndexOf("/"));
6230
- })());
6231
- let Un;
6232
- zn.subscribe((e2) => {
6224
+ const Bn = writable(null), Nn = writable(false), qn = writable(false), zn = writable(false), Rn = writable(0), Gn = writable(false), Fn = writable(false), Hn = writable("https://sdk.playlight.dev");
6225
+ let Yn;
6226
+ qn.subscribe((e2) => {
6233
6227
  try {
6234
- e2 ? (vt.trackOpen(), triggerEvent("discoveryOpen"), Un = document.body.style.overflow, document.body.style.setProperty("overflow", "hidden", "important")) : (triggerEvent("discoveryClose"), document.body.style.overflow = Un);
6228
+ e2 ? (vt.trackOpen(), triggerEvent("discoveryOpen"), Yn = document.body.style.overflow, document.body.style.setProperty("overflow", "hidden", "important")) : (triggerEvent("discoveryClose"), document.body.style.overflow = Yn);
6235
6229
  } catch (e3) {
6236
6230
  console.error("Error in discoveryOpen store subscription:", e3);
6237
6231
  }
6238
- }), Nn.subscribe((e2) => {
6232
+ }), Bn.subscribe((e2) => {
6239
6233
  var _a2;
6240
- ((_a2 = e2 == null ? void 0 : e2.sidebar) == null ? void 0 : _a2.forceVisible) || get(qn) ? Fn.set(true) : Fn.set(false);
6241
- }), qn.subscribe((e2) => {
6242
- e2 && Fn.set(true);
6243
- }), Fn.subscribe((e2) => {
6234
+ ((_a2 = e2 == null ? void 0 : e2.sidebar) == null ? void 0 : _a2.forceVisible) || get(Nn) ? Gn.set(true) : Gn.set(false);
6235
+ }), Nn.subscribe((e2) => {
6236
+ e2 && Gn.set(true);
6237
+ }), Gn.subscribe((e2) => {
6244
6238
  e2 ? (setupSidebarLayout(), triggerEvent("sidebarEnable")) : (removeSidebarLayout(), triggerEvent("sidebarDisable"));
6245
6239
  });
6246
- var Vn = /* @__PURE__ */ from_html('<div class="flex h-62 w-full items-center justify-center"><!></div>'), Kn = /* @__PURE__ */ from_html('<div class="snap-center px-2"><!></div>'), Xn = /* @__PURE__ */ from_html('<!> <div class="bg-background/85 my-auto mr-3 mb-30 ml-2 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-lg backdrop-blur-xl"><p class="w-full text-center text-lg font-semibold text-white">Fancy more?</p> <!></div>', 1), on_click = (e2, t2, n2) => get$1(t2).scrollBy({
6240
+ var Vn = /* @__PURE__ */ from_html('<div class="flex h-62 w-full items-center justify-center"><!></div>'), Un = /* @__PURE__ */ from_html('<div class="snap-center px-2"><!></div>'), Kn = /* @__PURE__ */ from_html('<!> <div class="bg-background/85 my-auto mr-3 mb-30 ml-2 flex min-w-40 snap-center flex-wrap items-center justify-center gap-4 p-4 pb-6 shadow-lg backdrop-blur-xl"><p class="w-full text-center text-lg font-semibold text-white">Fancy more?</p> <!></div>', 1), on_click = (e2, t2, n2) => get$1(t2).scrollBy({
6247
6241
  left: 2 * -get$1(n2),
6248
6242
  behavior: "smooth"
6249
- }), Zn = /* @__PURE__ */ from_html('<button class="bg-background/85 absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'), on_click_1 = (e2, t2, n2) => get$1(t2).scrollBy({
6243
+ }), Xn = /* @__PURE__ */ from_html('<button class="bg-background/85 absolute top-4/9 left-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'), on_click_1 = (e2, t2, n2) => get$1(t2).scrollBy({
6250
6244
  left: 2 * get$1(n2),
6251
6245
  behavior: "smooth"
6252
- }), Jn = /* @__PURE__ */ from_html('<button class="bg-background/85 absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'), Qn = /* @__PURE__ */ from_html("<!> <!>", 1), er = /* @__PURE__ */ from_html('<div class="playlight-sdk playlight-sdk-widget"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');
6246
+ }), Zn = /* @__PURE__ */ from_html('<button class="bg-background/85 absolute top-4/9 right-2 z-20 -translate-y-1/2 transform border p-1 py-4 text-white shadow-lg backdrop-blur-xl transition hover:bg-white hover:text-black max-sm:hidden"><!></button>'), Jn = /* @__PURE__ */ from_html("<!> <!>", 1), Qn = /* @__PURE__ */ from_html('<div class="playlight-sdk playlight-sdk-widget"><div class="relative flex h-full w-full snap-x gap-2 overflow-x-auto"><!></div> <!></div>');
6253
6247
  function WidgetCarousel(e2, t2) {
6254
6248
  push(t2, true);
6255
6249
  const [n2, s2] = setup_stores();
6256
- let i2 = /* @__PURE__ */ state(true), o2 = /* @__PURE__ */ state(proxy([])), a2 = /* @__PURE__ */ state(void 0), l2 = /* @__PURE__ */ state(0), c2 = /* @__PURE__ */ state(false), u2 = /* @__PURE__ */ state(true), d2 = /* @__PURE__ */ state("");
6250
+ let o2 = /* @__PURE__ */ state(true), i2 = /* @__PURE__ */ state(proxy([])), a2 = /* @__PURE__ */ state(void 0), l2 = /* @__PURE__ */ state(0), c2 = /* @__PURE__ */ state(false), u2 = /* @__PURE__ */ state(true), d2 = /* @__PURE__ */ state("");
6257
6251
  function updateMask(e3, t3) {
6258
6252
  const n3 = Math.min(e3 / 50, 1), s3 = Math.min(t3 / 50, 1);
6259
6253
  set(d2, `mask-image: linear-gradient(
@@ -6275,7 +6269,7 @@ function WidgetCarousel(e2, t2) {
6275
6269
  )`);
6276
6270
  }
6277
6271
  onMount(async () => {
6278
- set(i2, true), set(o2, await fetchQuickSuggestions(10, true), true), set(i2, false), // Wait for games to be rendered, then adjust mask image
6272
+ set(o2, true), set(i2, await fetchQuickSuggestions(10, true), true), set(o2, false), // Wait for games to be rendered, then adjust mask image
6279
6273
  requestAnimationFrame(() => {
6280
6274
  if (get$1(a2)) {
6281
6275
  const e3 = get$1(a2).scrollWidth - get$1(a2).clientWidth;
@@ -6283,7 +6277,7 @@ function WidgetCarousel(e2, t2) {
6283
6277
  }
6284
6278
  });
6285
6279
  });
6286
- var f2 = er(), p2 = child(f2), h2 = child(p2), consequent = (e3) => {
6280
+ var f2 = Qn(), p2 = child(f2), h2 = child(p2), consequent = (e3) => {
6287
6281
  var t3 = Vn();
6288
6282
  Loader_circle(child(t3), {
6289
6283
  class: "animate-spin opacity-75",
@@ -6291,9 +6285,9 @@ function WidgetCarousel(e2, t2) {
6291
6285
  strokeWidth: 2.5
6292
6286
  }), append(e3, t3);
6293
6287
  }, alternate = (e3) => {
6294
- var t3 = Xn(), n3 = first_child(t3);
6295
- each(n3, 17, () => get$1(o2), index, (e4, t4) => {
6296
- var n4 = Kn();
6288
+ var t3 = Kn(), n3 = first_child(t3);
6289
+ each(n3, 17, () => get$1(i2), index, (e4, t4) => {
6290
+ var n4 = Un();
6297
6291
  GameCard(child(n4), {
6298
6292
  get game() {
6299
6293
  return get$1(t4);
@@ -6309,7 +6303,7 @@ function WidgetCarousel(e2, t2) {
6309
6303
  });
6310
6304
  var s3 = sibling(n3, 2);
6311
6305
  Button(sibling(child(s3), 2), {
6312
- onclick: () => store_set(zn, true),
6306
+ onclick: () => store_set(qn, true),
6313
6307
  children: (e4, t4) => {
6314
6308
  append(e4, text("See all"));
6315
6309
  },
@@ -6319,11 +6313,11 @@ function WidgetCarousel(e2, t2) {
6319
6313
  }), append(e3, t3);
6320
6314
  };
6321
6315
  if_block(h2, (e3) => {
6322
- get$1(i2) ? e3(consequent) : e3(alternate, false);
6316
+ get$1(o2) ? e3(consequent) : e3(alternate, false);
6323
6317
  }), bind_this(p2, (e3) => set(a2, e3), () => get$1(a2));
6324
6318
  var g2 = sibling(p2, 2), consequent_3 = (e3) => {
6325
- var t3 = Qn(), n3 = first_child(t3), consequent_1 = (e4) => {
6326
- var t4 = Zn();
6319
+ var t3 = Jn(), n3 = first_child(t3), consequent_1 = (e4) => {
6320
+ var t4 = Xn();
6327
6321
  t4.__click = [on_click, a2, l2], (function Chevron_left(e5, t5) {
6328
6322
  const n4 = legacy_rest_props(t5, ["children", "$$slots", "$$events", "$$legacy"]), s4 = [["path", {
6329
6323
  d: "m15 18-6-6 6-6"
@@ -6371,7 +6365,7 @@ function WidgetCarousel(e2, t2) {
6371
6365
  get$1(c2) && e4(consequent_1);
6372
6366
  });
6373
6367
  var s3 = sibling(n3, 2), consequent_2 = (e4) => {
6374
- var t4 = Jn();
6368
+ var t4 = Zn();
6375
6369
  t4.__click = [on_click_1, a2, l2], (function Chevron_right(e5, t5) {
6376
6370
  const n4 = legacy_rest_props(t5, ["children", "$$slots", "$$events", "$$legacy"]), s4 = [["path", {
6377
6371
  d: "m9 18 6-6-6-6"
@@ -6420,7 +6414,7 @@ function WidgetCarousel(e2, t2) {
6420
6414
  }), append(e3, t3);
6421
6415
  };
6422
6416
  if_block(g2, (e3) => {
6423
- get$1(o2).length > 0 && e3(consequent_3);
6417
+ get$1(i2).length > 0 && e3(consequent_3);
6424
6418
  }), template_effect(() => set_style(p2, get$1(d2))), event("scroll", p2, (e3) => {
6425
6419
  const t3 = e3.target;
6426
6420
  set(c2, t3.scrollLeft > 20), set(u2, t3.scrollLeft < t3.scrollWidth - t3.clientWidth - 20), updateMask(t3.scrollLeft, t3.scrollWidth - t3.clientWidth - t3.scrollLeft);
@@ -6440,7 +6434,7 @@ function initWidgets() {
6440
6434
  }
6441
6435
  }
6442
6436
  delegate(["click"]);
6443
- const tr = new /**
6437
+ const er = new /**
6444
6438
  * The PlaylightSDK class
6445
6439
  */
6446
6440
  class PlaylightSDK {
@@ -6467,7 +6461,7 @@ class PlaylightSDK {
6467
6461
  })();
6468
6462
  const t2 = "true" === sessionStorage.getItem("fromPlaylight"), n2 = "playlight" === new URLSearchParams(window.location.search).get("utm_source");
6469
6463
  n2 && sessionStorage.setItem("fromPlaylight", "true"), // Save in session storage to persist on MPAs
6470
- qn.set(t2 || n2), // Set initialized
6464
+ Nn.set(t2 || n2), // Set initialized
6471
6465
  window.playlightInitialized = true;
6472
6466
  }
6473
6467
  /**
@@ -6475,7 +6469,7 @@ class PlaylightSDK {
6475
6469
  * @param {boolean} [value=true] - Whether to show the discovery
6476
6470
  */
6477
6471
  setDiscovery(e2 = true) {
6478
- zn.set(e2);
6472
+ qn.set(e2);
6479
6473
  }
6480
6474
  /**
6481
6475
  * Register an event callback
@@ -6491,11 +6485,11 @@ class PlaylightSDK {
6491
6485
  * @param {object} [configParam] - Playlight configuration object
6492
6486
  */
6493
6487
  setConfig(e2 = {}) {
6494
- Nn.set(createConfig(e2));
6488
+ Bn.set(createConfig(e2));
6495
6489
  }
6496
6490
  }();
6497
- "undefined" != typeof window && (window.playlightSDK = tr);
6491
+ "undefined" != typeof window && (window.playlightSDK = er);
6498
6492
  export {
6499
- tr as default
6493
+ er as default
6500
6494
  };
6501
6495
  //# sourceMappingURL=playlight-sdk.es.js.map