playlight-sdk 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,7 +18,7 @@ function run(e2) {
18
18
  function run_all(e2) {
19
19
  for (var t2 = 0; t2 < e2.length; t2++) e2[t2]();
20
20
  }
21
- const f = 32, d = 64, p = 128, _ = 256, v = 512, g = 1024, h = 2048, m = 4096, b = 8192, y = 16384, $ = 65536, w = 1 << 20, x = Symbol("$state"), k = Symbol("legacy props"), C = Symbol("");
21
+ const d = 32, f = 64, p = 128, _ = 256, g = 512, v = 1024, h = 2048, m = 4096, b = 8192, y = 16384, $ = 65536, w = 1 << 20, x = Symbol("$state"), k = Symbol("legacy props"), C = Symbol("");
22
22
  function equals(e2) {
23
23
  return e2 === this.v;
24
24
  }
@@ -33,20 +33,20 @@ const M = Symbol();
33
33
  function lifecycle_outside_component(e2) {
34
34
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
35
35
  }
36
- let T = null;
36
+ let I = null;
37
37
  function set_component_context(e2) {
38
- T = e2;
38
+ I = e2;
39
39
  }
40
40
  function push(e2, t2 = false, n2) {
41
- T = {
42
- p: T,
41
+ I = {
42
+ p: I,
43
43
  c: null,
44
44
  e: null,
45
45
  m: false,
46
46
  s: e2,
47
47
  x: null,
48
48
  l: null
49
- }, S && !t2 && (T.l = {
49
+ }, S && !t2 && (I.l = {
50
50
  s: null,
51
51
  u: null,
52
52
  r1: [],
@@ -54,11 +54,11 @@ function push(e2, t2 = false, n2) {
54
54
  });
55
55
  }
56
56
  function pop(e2) {
57
- const t2 = T;
57
+ const t2 = I;
58
58
  if (null !== t2) {
59
59
  const e3 = t2.e;
60
60
  if (null !== e3) {
61
- var n2 = H, o2 = F;
61
+ var n2 = H, o2 = G;
62
62
  t2.e = null;
63
63
  try {
64
64
  for (var i2 = 0; i2 < e3.length; i2++) {
@@ -69,12 +69,12 @@ function pop(e2) {
69
69
  set_active_effect(n2), set_active_reaction(o2);
70
70
  }
71
71
  }
72
- T = t2.p, t2.m = true;
72
+ I = t2.p, t2.m = true;
73
73
  }
74
74
  return {};
75
75
  }
76
76
  function is_runes() {
77
- return !S || null !== T && null === T.l;
77
+ return !S || null !== I && null === I.l;
78
78
  }
79
79
  function source(e2, t2) {
80
80
  return {
@@ -96,14 +96,14 @@ function mutable_source(e2, t2 = false) {
96
96
  const n2 = source(e2);
97
97
  return t2 || (n2.equals = safe_equals), // bind the signal to the component context, in case we need to
98
98
  // track updates to trigger beforeUpdate/afterUpdate callbacks
99
- S && null !== T && null !== T.l && ((_a2 = T.l).s ?? (_a2.s = [])).push(n2), n2;
99
+ S && null !== I && null !== I.l && ((_a2 = I.l).s ?? (_a2.s = [])).push(n2), n2;
100
100
  }
101
101
  function mutable_state(e2, t2 = false) {
102
102
  return /* @__PURE__ */ push_derived_source(/* @__PURE__ */ mutable_source(e2, t2));
103
103
  }
104
104
  // @__NO_SIDE_EFFECTS__
105
105
  function push_derived_source(e2) {
106
- return null !== F && !G && 2 & F.f && (null === R ? (
106
+ return null !== G && !F && 2 & G.f && (null === R ? (
107
107
  /**
108
108
  * @param {Source[] | null} sources
109
109
  */
@@ -113,7 +113,7 @@ function push_derived_source(e2) {
113
113
  ) : R.push(e2)), e2;
114
114
  }
115
115
  function set(e2, t2) {
116
- return null !== F && !G && is_runes() && 18 & F.f && // If the source was created locally within the current derived, then
116
+ return null !== G && !F && is_runes() && 18 & G.f && // If the source was created locally within the current derived, then
117
117
  // we allow the mutation.
118
118
  (null === R || !R.includes(e2)) && /**
119
119
  * Updating state inside a derived or a template expression is forbidden. If the value should not be reactive, declare it without `$state`
@@ -128,7 +128,7 @@ function internal_set(e2, t2) {
128
128
  // whilst it's actively running. So in the case of ensuring it registers the reaction
129
129
  // properly for itself, we need to ensure the current effect actually gets
130
130
  // scheduled. i.e: `$effect(() => x++)`
131
- is_runes() && null !== H && H.f & g && !(96 & H.f) && (null === U ? (
131
+ is_runes() && null !== H && H.f & v && !(96 & H.f) && (null === U ? (
132
132
  /** @param {null | Source[]} value */
133
133
  function set_untracked_writes(e3) {
134
134
  U = e3;
@@ -159,10 +159,10 @@ function proxy(e2, n2 = null, o2) {
159
159
  if ("object" != typeof e2 || null === e2 || x in e2) return e2;
160
160
  const i2 = u(e2);
161
161
  if (i2 !== l && i2 !== c) return e2;
162
- var a2, f2 = /* @__PURE__ */ new Map(), d2 = t(e2), p2 = source(0);
163
- return d2 && // We need to create the length source eagerly to ensure that
162
+ var a2, d2 = /* @__PURE__ */ new Map(), f2 = t(e2), p2 = source(0);
163
+ return f2 && // We need to create the length source eagerly to ensure that
164
164
  // mutations to the array are properly synced with our proxy
165
- f2.set("length", source(
165
+ d2.set("length", source(
166
166
  /** @type {any[]} */
167
167
  e2.length
168
168
  )), new Proxy(
@@ -181,17 +181,17 @@ function proxy(e2, n2 = null, o2) {
181
181
  function state_descriptors_fixed() {
182
182
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
183
183
  }();
184
- var o3 = f2.get(t2);
185
- return void 0 === o3 ? (o3 = source(n3.value), f2.set(t2, o3)) : set(o3, proxy(n3.value, a2)), true;
184
+ var o3 = d2.get(t2);
185
+ return void 0 === o3 ? (o3 = source(n3.value), d2.set(t2, o3)) : set(o3, proxy(n3.value, a2)), true;
186
186
  },
187
187
  deleteProperty(e3, t2) {
188
- var n3 = f2.get(t2);
189
- if (void 0 === n3) t2 in e3 && f2.set(t2, source(M));
188
+ var n3 = d2.get(t2);
189
+ if (void 0 === n3) t2 in e3 && d2.set(t2, source(M));
190
190
  else {
191
- if (d2 && "string" == typeof t2) {
191
+ if (f2 && "string" == typeof t2) {
192
192
  var o3 = (
193
193
  /** @type {Source<number>} */
194
- f2.get("length")
194
+ d2.get("length")
195
195
  ), i3 = Number(t2);
196
196
  Number.isInteger(i3) && i3 < o3.v && set(o3, i3);
197
197
  }
@@ -202,10 +202,10 @@ function proxy(e2, n2 = null, o2) {
202
202
  get(t2, n3, o3) {
203
203
  var _a2;
204
204
  if (n3 === x) return e2;
205
- var i3 = f2.get(n3), l2 = n3 in t2;
205
+ var i3 = d2.get(n3), l2 = n3 in t2;
206
206
  if (
207
207
  // create a source, but only if it's an own property and not a prototype property
208
- void 0 !== i3 || l2 && !((_a2 = s(t2, n3)) == null ? void 0 : _a2.writable) || (i3 = source(proxy(l2 ? t2[n3] : M, a2)), f2.set(n3, i3)), void 0 !== i3
208
+ void 0 !== i3 || l2 && !((_a2 = s(t2, n3)) == null ? void 0 : _a2.writable) || (i3 = source(proxy(l2 ? t2[n3] : M, a2)), d2.set(n3, i3)), void 0 !== i3
209
209
  ) {
210
210
  var c2 = get$1(i3);
211
211
  return c2 === M ? void 0 : c2;
@@ -215,10 +215,10 @@ function proxy(e2, n2 = null, o2) {
215
215
  getOwnPropertyDescriptor(e3, t2) {
216
216
  var n3 = Reflect.getOwnPropertyDescriptor(e3, t2);
217
217
  if (n3 && "value" in n3) {
218
- var o3 = f2.get(t2);
218
+ var o3 = d2.get(t2);
219
219
  o3 && (n3.value = get$1(o3));
220
220
  } else if (void 0 === n3) {
221
- var i3 = f2.get(t2), s2 = i3 == null ? void 0 : i3.v;
221
+ var i3 = d2.get(t2), s2 = i3 == null ? void 0 : i3.v;
222
222
  if (void 0 !== i3 && s2 !== M) return {
223
223
  enumerable: true,
224
224
  configurable: true,
@@ -231,30 +231,30 @@ function proxy(e2, n2 = null, o2) {
231
231
  has(e3, t2) {
232
232
  var _a2;
233
233
  if (t2 === x) return true;
234
- var n3 = f2.get(t2), o3 = void 0 !== n3 && n3.v !== M || Reflect.has(e3, t2);
235
- if ((void 0 !== n3 || null !== H && (!o3 || ((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable))) && (void 0 === n3 && (n3 = source(o3 ? proxy(e3[t2], a2) : M), f2.set(t2, n3)), get$1(n3) === M)) return false;
234
+ var n3 = d2.get(t2), o3 = void 0 !== n3 && n3.v !== M || Reflect.has(e3, t2);
235
+ if ((void 0 !== n3 || null !== H && (!o3 || ((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable))) && (void 0 === n3 && (n3 = source(o3 ? proxy(e3[t2], a2) : M), d2.set(t2, n3)), get$1(n3) === M)) return false;
236
236
  return o3;
237
237
  },
238
238
  set(e3, t2, n3, o3) {
239
239
  var _a2;
240
- var i3 = f2.get(t2), l2 = t2 in e3;
241
- if (d2 && "length" === t2) for (var c2 = n3; c2 < /** @type {Source<number>} */
240
+ var i3 = d2.get(t2), l2 = t2 in e3;
241
+ if (f2 && "length" === t2) for (var c2 = n3; c2 < /** @type {Source<number>} */
242
242
  i3.v; c2 += 1) {
243
- var u2 = f2.get(c2 + "");
243
+ var u2 = d2.get(c2 + "");
244
244
  void 0 !== u2 ? set(u2, M) : c2 in e3 && // If the item exists in the original, we need to create a uninitialized source,
245
245
  // else a later read of the property would result in a source being created with
246
246
  // the value of the original item at that index.
247
- (u2 = source(M), f2.set(c2 + "", u2));
247
+ (u2 = source(M), d2.set(c2 + "", u2));
248
248
  }
249
- void 0 === i3 ? l2 && !((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable) || (set(i3 = source(void 0), proxy(n3, a2)), f2.set(t2, i3)) : (l2 = i3.v !== M, set(i3, proxy(n3, a2)));
249
+ void 0 === i3 ? l2 && !((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable) || (set(i3 = source(void 0), proxy(n3, a2)), d2.set(t2, i3)) : (l2 = i3.v !== M, set(i3, proxy(n3, a2)));
250
250
  var _2 = Reflect.getOwnPropertyDescriptor(e3, t2);
251
251
  if ((_2 == null ? void 0 : _2.set) && _2.set.call(o3, n3), !l2) {
252
- if (d2 && "string" == typeof t2) {
253
- var v2 = (
252
+ if (f2 && "string" == typeof t2) {
253
+ var g2 = (
254
254
  /** @type {Source<number>} */
255
- f2.get("length")
256
- ), g2 = Number(t2);
257
- Number.isInteger(g2) && g2 >= v2.v && set(v2, g2 + 1);
255
+ d2.get("length")
256
+ ), v2 = Number(t2);
257
+ Number.isInteger(v2) && v2 >= g2.v && set(g2, v2 + 1);
258
258
  }
259
259
  update_version(p2);
260
260
  }
@@ -263,10 +263,10 @@ function proxy(e2, n2 = null, o2) {
263
263
  ownKeys(e3) {
264
264
  get$1(p2);
265
265
  var t2 = Reflect.ownKeys(e3).filter((e4) => {
266
- var t3 = f2.get(e4);
266
+ var t3 = d2.get(e4);
267
267
  return void 0 === t3 || t3.v !== M;
268
268
  });
269
- for (var [n3, o3] of f2) o3.v === M || n3 in e3 || t2.push(n3);
269
+ for (var [n3, o3] of d2) o3.v === M || n3 in e3 || t2.push(n3);
270
270
  return t2;
271
271
  },
272
272
  setPrototypeOf() {
@@ -280,17 +280,17 @@ function proxy(e2, n2 = null, o2) {
280
280
  function update_version(e2, t2 = 1) {
281
281
  set(e2, e2.v + t2);
282
282
  }
283
- var q, I, P, O, E;
283
+ var T, q, P, D, O;
284
284
  function create_text(e2 = "") {
285
285
  return document.createTextNode(e2);
286
286
  }
287
287
  // @__NO_SIDE_EFFECTS__
288
288
  function get_first_child(e2) {
289
- return O.call(e2);
289
+ return D.call(e2);
290
290
  }
291
291
  // @__NO_SIDE_EFFECTS__
292
292
  function get_next_sibling(e2) {
293
- return E.call(e2);
293
+ return O.call(e2);
294
294
  }
295
295
  function child(e2, t2) {
296
296
  return /* @__PURE__ */ get_first_child(e2);
@@ -313,9 +313,9 @@ function sibling(e2, t2 = 1, n2 = false) {
313
313
  }
314
314
  // @__NO_SIDE_EFFECTS__
315
315
  function derived(e2) {
316
- var t2 = 2050, n2 = null !== F && 2 & F.f ? (
316
+ var t2 = 2050, n2 = null !== G && 2 & G.f ? (
317
317
  /** @type {Derived} */
318
- F
318
+ G
319
319
  ) : null;
320
320
  null === H || null !== n2 && n2.f & _ ? t2 |= _ : (
321
321
  // Since deriveds are evaluated lazily, any effects created inside them are
@@ -323,7 +323,7 @@ function derived(e2) {
323
323
  H.f |= w
324
324
  );
325
325
  return {
326
- ctx: T,
326
+ ctx: I,
327
327
  deps: null,
328
328
  effects: null,
329
329
  equals,
@@ -379,17 +379,17 @@ function update_derived(e2) {
379
379
  return t3;
380
380
  }(e2)
381
381
  );
382
- set_signal_status(e2, (Y || e2.f & _) && null !== e2.deps ? m : g), e2.equals(t2) || (e2.v = t2, e2.wv = increment_write_version());
382
+ set_signal_status(e2, (J || e2.f & _) && null !== e2.deps ? m : v), e2.equals(t2) || (e2.v = t2, e2.wv = increment_write_version());
383
383
  }
384
384
  function validate_effect(e2) {
385
- null === H && null === F && /**
385
+ null === H && null === G && /**
386
386
  * `%rune%` can only be used inside an effect (e.g. during component initialisation)
387
387
  * @param {string} rune
388
388
  * @returns {never}
389
389
  */
390
390
  function effect_orphan(e3) {
391
391
  throw new Error("https://svelte.dev/e/effect_orphan");
392
- }(), null !== F && F.f & _ && null === H && /**
392
+ }(), null !== G && G.f & _ && null === H && /**
393
393
  * Effect cannot be created inside a `$derived` value that was not itself created inside an effect
394
394
  * @returns {never}
395
395
  */
@@ -401,7 +401,7 @@ function validate_effect(e2) {
401
401
  }
402
402
  function create_effect(e2, t2, n2, o2 = true) {
403
403
  var i2 = H, s2 = {
404
- ctx: T,
404
+ ctx: I,
405
405
  deps: null,
406
406
  nodes_start: null,
407
407
  nodes_end: null,
@@ -425,10 +425,10 @@ function create_effect(e2, t2, n2, o2 = true) {
425
425
  if (!(n2 && null === s2.deps && null === s2.first && null === s2.nodes_start && null === s2.teardown && !(1048704 & s2.f)) && o2 && (null !== i2 && function push_effect(e3, t3) {
426
426
  var n3 = t3.last;
427
427
  null === n3 ? t3.last = t3.first = e3 : (n3.next = e3, e3.prev = n3, t3.last = e3);
428
- }(s2, i2), null !== F && 2 & F.f)) {
428
+ }(s2, i2), null !== G && 2 & G.f)) {
429
429
  var a2 = (
430
430
  /** @type {Derived} */
431
- F
431
+ G
432
432
  );
433
433
  (a2.effects ?? (a2.effects = [])).push(s2);
434
434
  }
@@ -436,18 +436,18 @@ function create_effect(e2, t2, n2, o2 = true) {
436
436
  }
437
437
  function teardown(e2) {
438
438
  const t2 = create_effect(8, null, false);
439
- return set_signal_status(t2, g), t2.teardown = e2, t2;
439
+ return set_signal_status(t2, v), t2.teardown = e2, t2;
440
440
  }
441
441
  function user_effect(e2) {
442
- if (validate_effect(), !(null !== H && !!(H.f & f) && null !== T && !T.m)) return effect(e2);
442
+ if (validate_effect(), !(null !== H && !!(H.f & d) && null !== I && !I.m)) return effect(e2);
443
443
  var t2 = (
444
444
  /** @type {ComponentContext} */
445
- T
445
+ I
446
446
  );
447
447
  (t2.e ?? (t2.e = [])).push({
448
448
  fn: e2,
449
449
  effect: H,
450
- reaction: F
450
+ reaction: G
451
451
  });
452
452
  }
453
453
  function effect(e2) {
@@ -456,7 +456,7 @@ function effect(e2) {
456
456
  function legacy_pre_effect(e2, t2) {
457
457
  var n2 = (
458
458
  /** @type {ComponentContextLegacy} */
459
- T
459
+ I
460
460
  ), o2 = {
461
461
  effect: null,
462
462
  ran: false
@@ -470,13 +470,13 @@ function legacy_pre_effect(e2, t2) {
470
470
  function legacy_pre_effect_reset() {
471
471
  var e2 = (
472
472
  /** @type {ComponentContextLegacy} */
473
- T
473
+ I
474
474
  );
475
475
  render_effect(() => {
476
476
  if (get$1(e2.l.r2)) {
477
477
  for (var t2 of e2.l.r1) {
478
478
  var n2 = t2.effect;
479
- n2.f & g && set_signal_status(n2, m), check_dirtiness(n2) && update_effect(n2), t2.ran = false;
479
+ n2.f & v && set_signal_status(n2, m), check_dirtiness(n2) && update_effect(n2), t2.ran = false;
480
480
  }
481
481
  e2.l.r2.v = false;
482
482
  }
@@ -498,7 +498,7 @@ function branch(e2, t2 = true) {
498
498
  function execute_effect_teardown(e2) {
499
499
  var t2 = e2.teardown;
500
500
  if (null !== t2) {
501
- const e3 = z, n2 = F;
501
+ const e3 = z, n2 = G;
502
502
  set_is_destroying_effect(true), set_active_reaction(null);
503
503
  try {
504
504
  t2.call(null);
@@ -511,7 +511,7 @@ function destroy_effect_children(e2, t2 = false) {
511
511
  var n2 = e2.first;
512
512
  for (e2.first = e2.last = null; null !== n2; ) {
513
513
  var o2 = n2.next;
514
- n2.f & d ? (
514
+ n2.f & f ? (
515
515
  // this is now an independent root
516
516
  n2.parent = null
517
517
  ) : destroy_effect(n2, t2), n2 = o2;
@@ -560,7 +560,7 @@ function pause_children(e2, t2, n2) {
560
560
  if (e2.f ^= b, null !== e2.transitions) for (const o3 of e2.transitions) (o3.is_global || n2) && t2.push(o3);
561
561
  for (var o2 = e2.first; null !== o2; ) {
562
562
  var i2 = o2.next;
563
- pause_children(o2, t2, !!(!!(o2.f & $) || !!(o2.f & f)) && n2), o2 = i2;
563
+ pause_children(o2, t2, !!(!!(o2.f & $) || !!(o2.f & d)) && n2), o2 = i2;
564
564
  }
565
565
  }
566
566
  }
@@ -571,17 +571,17 @@ function resume_children(e2, t2) {
571
571
  if (e2.f & b) {
572
572
  e2.f ^= b, // Ensure the effect is marked as clean again so that any dirty child
573
573
  // effects can schedule themselves for execution
574
- e2.f & g || (e2.f ^= g), // If a dependency of this effect changed while it was paused,
574
+ e2.f & v || (e2.f ^= v), // If a dependency of this effect changed while it was paused,
575
575
  // schedule the effect to update
576
576
  check_dirtiness(e2) && (set_signal_status(e2, h), schedule_effect(e2));
577
577
  for (var n2 = e2.first; null !== n2; ) {
578
578
  var o2 = n2.next;
579
- resume_children(n2, !!(!!(n2.f & $) || !!(n2.f & f)) && t2), n2 = o2;
579
+ resume_children(n2, !!(!!(n2.f & $) || !!(n2.f & d)) && t2), n2 = o2;
580
580
  }
581
581
  if (null !== e2.transitions) for (const n3 of e2.transitions) (n3.is_global || t2) && n3.in();
582
582
  }
583
583
  }
584
- let j = [], N = [];
584
+ let j = [], E = [];
585
585
  function run_micro_tasks() {
586
586
  var e2 = j;
587
587
  j = [], run_all(e2);
@@ -590,18 +590,18 @@ function queue_micro_task(e2) {
590
590
  0 === j.length && queueMicrotask(run_micro_tasks), j.push(e2);
591
591
  }
592
592
  function flush_tasks() {
593
- j.length > 0 && run_micro_tasks(), N.length > 0 && function run_idle_tasks() {
594
- var e2 = N;
595
- N = [], run_all(e2);
593
+ j.length > 0 && run_micro_tasks(), E.length > 0 && function run_idle_tasks() {
594
+ var e2 = E;
595
+ E = [], run_all(e2);
596
596
  }();
597
597
  }
598
- let B = false, D = false, A = null, W = false, z = false;
598
+ let N = false, B = false, A = null, W = false, z = false;
599
599
  function set_is_destroying_effect(e2) {
600
600
  z = e2;
601
601
  }
602
- let L = [], F = null, G = false;
602
+ let L = [], G = null, F = false;
603
603
  function set_active_reaction(e2) {
604
- F = e2;
604
+ G = e2;
605
605
  }
606
606
  let H = null;
607
607
  function set_active_effect(e2) {
@@ -609,9 +609,9 @@ function set_active_effect(e2) {
609
609
  }
610
610
  let R = null;
611
611
  let V = null, K = 0, U = null;
612
- let Z = 1, J = 0, Y = false;
612
+ let Y = 1, Z = 0, J = false;
613
613
  function increment_write_version() {
614
- return ++Z;
614
+ return ++Y;
615
615
  }
616
616
  function check_dirtiness(e2) {
617
617
  var _a2;
@@ -620,39 +620,39 @@ function check_dirtiness(e2) {
620
620
  if (t2 & m) {
621
621
  var n2 = e2.deps, o2 = !!(t2 & _);
622
622
  if (null !== n2) {
623
- var i2, s2, a2 = !!(t2 & v), l2 = o2 && null !== H && !Y, c2 = n2.length;
623
+ var i2, s2, a2 = !!(t2 & g), l2 = o2 && null !== H && !J, c2 = n2.length;
624
624
  if (a2 || l2) {
625
625
  var u2 = (
626
626
  /** @type {Derived} */
627
627
  e2
628
- ), f2 = u2.parent;
628
+ ), d2 = u2.parent;
629
629
  for (i2 = 0; i2 < c2; i2++) s2 = n2[i2], // We always re-add all reactions (even duplicates) if the derived was
630
630
  // previously disconnected, however we don't if it was unowned as we
631
631
  // de-duplicate dependencies in that case
632
632
  !a2 && ((_a2 = s2 == null ? void 0 : s2.reactions) == null ? void 0 : _a2.includes(u2)) || (s2.reactions ?? (s2.reactions = [])).push(u2);
633
- a2 && (u2.f ^= v), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
633
+ a2 && (u2.f ^= g), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
634
634
  // and the parent is not unowned), then we can mark it as connected again, removing the need for the unowned
635
635
  // flag
636
- !l2 || null === f2 || f2.f & _ || (u2.f ^= _);
636
+ !l2 || null === d2 || d2.f & _ || (u2.f ^= _);
637
637
  }
638
638
  for (i2 = 0; i2 < c2; i2++) if (check_dirtiness(s2 = n2[i2]) && update_derived(
639
639
  /** @type {Derived} */
640
640
  s2
641
641
  ), s2.wv > e2.wv) return true;
642
642
  }
643
- o2 && (null === H || Y) || set_signal_status(e2, g);
643
+ o2 && (null === H || J) || set_signal_status(e2, v);
644
644
  }
645
645
  return false;
646
646
  }
647
647
  function handle_error(e2, t2, n2, o2) {
648
- if (B) {
649
- if (null === n2 && (B = false), /**
648
+ if (N) {
649
+ if (null === n2 && (N = false), /**
650
650
  * @param {Effect} effect
651
651
  */
652
652
  function should_rethrow_error(e3) {
653
653
  return !(e3.f & y || null !== e3.parent && e3.parent.f & p);
654
654
  }(t2)) throw e2;
655
- } else null !== n2 && (B = true), function propagate_error(e3, t3) {
655
+ } else null !== n2 && (N = true), function propagate_error(e3, t3) {
656
656
  for (var n3 = t3; null !== n3; ) {
657
657
  if (n3.f & p) try {
658
658
  return void n3.fn(e3);
@@ -661,7 +661,7 @@ function handle_error(e2, t2, n2, o2) {
661
661
  }
662
662
  n3 = n3.parent;
663
663
  }
664
- throw B = false, e3;
664
+ throw N = false, e3;
665
665
  }(e2, t2);
666
666
  }
667
667
  function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
@@ -673,7 +673,7 @@ function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
673
673
  s2,
674
674
  t2,
675
675
  false
676
- ) : t2 === s2 && (n2 ? set_signal_status(s2, h) : s2.f & g && set_signal_status(s2, m), schedule_effect(
676
+ ) : t2 === s2 && (n2 ? set_signal_status(s2, h) : s2.f & v && set_signal_status(s2, m), schedule_effect(
677
677
  /** @type {Effect} */
678
678
  s2
679
679
  ));
@@ -681,30 +681,30 @@ function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
681
681
  }
682
682
  function update_reaction(e2) {
683
683
  var _a2;
684
- var t2 = V, n2 = K, o2 = U, i2 = F, s2 = Y, a2 = R, l2 = T, c2 = G, u2 = e2.f;
684
+ var t2 = V, n2 = K, o2 = U, i2 = G, s2 = J, a2 = R, l2 = I, c2 = F, u2 = e2.f;
685
685
  V = /** @type {null | Value[]} */
686
- null, K = 0, U = null, Y = !!(u2 & _) && (G || !W || null === F), F = 96 & u2 ? null : e2, R = null, set_component_context(e2.ctx), G = false, J++;
686
+ null, K = 0, U = null, J = !!(u2 & _) && (F || !W || null === G), G = 96 & u2 ? null : e2, R = null, set_component_context(e2.ctx), F = false, Z++;
687
687
  try {
688
- var f2 = (
688
+ var d2 = (
689
689
  /** @type {Function} */
690
690
  /** @type {Function} */
691
691
  (0, e2.fn)()
692
- ), d2 = e2.deps;
692
+ ), f2 = e2.deps;
693
693
  if (null !== V) {
694
694
  var p2;
695
- if (remove_reactions(e2, K), null !== d2 && K > 0) for (d2.length = K + V.length, p2 = 0; p2 < V.length; p2++) d2[K + p2] = V[p2];
696
- else e2.deps = d2 = V;
697
- if (!Y) for (p2 = K; p2 < d2.length; p2++) ((_a2 = d2[p2]).reactions ?? (_a2.reactions = [])).push(e2);
698
- } else null !== d2 && K < d2.length && (remove_reactions(e2, K), d2.length = K);
699
- if (is_runes() && null !== U && !G && null !== d2 && !(6146 & e2.f)) for (p2 = 0; p2 < /** @type {Source[]} */
695
+ if (remove_reactions(e2, K), null !== f2 && K > 0) for (f2.length = K + V.length, p2 = 0; p2 < V.length; p2++) f2[K + p2] = V[p2];
696
+ else e2.deps = f2 = V;
697
+ if (!J) for (p2 = K; p2 < f2.length; p2++) ((_a2 = f2[p2]).reactions ?? (_a2.reactions = [])).push(e2);
698
+ } else null !== f2 && K < f2.length && (remove_reactions(e2, K), f2.length = K);
699
+ if (is_runes() && null !== U && !F && null !== f2 && !(6146 & e2.f)) for (p2 = 0; p2 < /** @type {Source[]} */
700
700
  U.length; p2++) schedule_possible_effect_self_invalidation(
701
701
  U[p2],
702
702
  /** @type {Effect} */
703
703
  e2
704
704
  );
705
- return null !== i2 && J++, f2;
705
+ return null !== i2 && Z++, d2;
706
706
  } finally {
707
- V = t2, K = n2, U = o2, F = i2, Y = s2, R = a2, set_component_context(l2), G = c2;
707
+ V = t2, K = n2, U = o2, G = i2, J = s2, R = a2, set_component_context(l2), F = c2;
708
708
  }
709
709
  }
710
710
  function remove_reaction(e2, t2) {
@@ -724,7 +724,7 @@ function remove_reaction(e2, t2) {
724
724
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
725
725
  (null === V || !V.includes(t2)) && (set_signal_status(t2, m), // If we are working with a derived that is owned by an effect, then mark it as being
726
726
  // disconnected.
727
- 768 & t2.f || (t2.f ^= v), // Disconnect any reactions owned by this reaction
727
+ 768 & t2.f || (t2.f ^= g), // Disconnect any reactions owned by this reaction
728
728
  destroy_derived_effects(
729
729
  /** @type {Derived} **/
730
730
  t2
@@ -741,18 +741,18 @@ function remove_reactions(e2, t2) {
741
741
  function update_effect(t2) {
742
742
  var n2 = t2.f;
743
743
  if (!(n2 & y)) {
744
- set_signal_status(t2, g);
745
- var o2 = H, i2 = T, s2 = W;
744
+ set_signal_status(t2, v);
745
+ var o2 = H, i2 = I, s2 = W;
746
746
  H = t2, W = true;
747
747
  try {
748
748
  16 & n2 ? function destroy_block_effect_children(e2) {
749
749
  for (var t3 = e2.first; null !== t3; ) {
750
750
  var n3 = t3.next;
751
- t3.f & f || destroy_effect(t3), t3 = n3;
751
+ t3.f & d || destroy_effect(t3), t3 = n3;
752
752
  }
753
753
  }(t2) : destroy_effect_children(t2), execute_effect_teardown(t2);
754
754
  var a2 = update_reaction(t2);
755
- t2.teardown = "function" == typeof a2 ? a2 : null, t2.wv = Z;
755
+ t2.teardown = "function" == typeof a2 ? a2 : null, t2.wv = Y;
756
756
  t2.deps;
757
757
  e;
758
758
  } catch (e2) {
@@ -785,7 +785,7 @@ function flush_queued_root_effects() {
785
785
  }
786
786
  }
787
787
  } finally {
788
- D = false, W = e2, A = null;
788
+ B = false, W = e2, A = null;
789
789
  }
790
790
  }
791
791
  function flush_queued_effects(e2) {
@@ -811,12 +811,12 @@ function flush_queued_effects(e2) {
811
811
  }
812
812
  }
813
813
  function schedule_effect(e2) {
814
- D || (D = true, queueMicrotask(flush_queued_root_effects));
814
+ B || (B = true, queueMicrotask(flush_queued_root_effects));
815
815
  for (var t2 = A = e2; null !== t2.parent; ) {
816
816
  var n2 = (t2 = t2.parent).f;
817
817
  if (96 & n2) {
818
- if (!(n2 & g)) return;
819
- t2.f ^= g;
818
+ if (!(n2 & v)) return;
819
+ t2.f ^= v;
820
820
  }
821
821
  }
822
822
  L.push(t2);
@@ -824,17 +824,17 @@ function schedule_effect(e2) {
824
824
  function process_effects(e2) {
825
825
  for (var t2 = [], n2 = e2; null !== n2; ) {
826
826
  var o2 = n2.f, i2 = !!(96 & o2);
827
- if (!(i2 && !!(o2 & g) || o2 & b)) {
827
+ if (!(i2 && !!(o2 & v) || o2 & b)) {
828
828
  if (4 & o2) t2.push(n2);
829
- else if (i2) n2.f ^= g;
829
+ else if (i2) n2.f ^= v;
830
830
  else {
831
- var s2 = F;
831
+ var s2 = G;
832
832
  try {
833
- F = n2, check_dirtiness(n2) && update_effect(n2);
833
+ G = n2, check_dirtiness(n2) && update_effect(n2);
834
834
  } catch (e3) {
835
835
  handle_error(e3, n2, null, n2.ctx);
836
836
  } finally {
837
- F = s2;
837
+ G = s2;
838
838
  }
839
839
  }
840
840
  var a2 = n2.first;
@@ -852,12 +852,12 @@ async function tick() {
852
852
  await Promise.resolve(), // By calling flushSync we guarantee that any pending state changes are applied after one tick.
853
853
  // TODO look into whether we can make flushing subsequent updates synchronously in the future.
854
854
  function flushSync(e2) {
855
- for (flush_tasks(); L.length > 0; ) D = true, flush_queued_root_effects(), flush_tasks();
855
+ for (flush_tasks(); L.length > 0; ) B = true, flush_queued_root_effects(), flush_tasks();
856
856
  }();
857
857
  }
858
858
  function get$1(e2) {
859
859
  var t2 = !!(2 & e2.f);
860
- if (null === F || G) {
860
+ if (null === G || F) {
861
861
  if (t2 && /** @type {Derived} */
862
862
  null === e2.deps && /** @type {Derived} */
863
863
  null === e2.effects) {
@@ -874,11 +874,11 @@ function get$1(e2) {
874
874
  null !== R && R.includes(e2) && function state_unsafe_local_read() {
875
875
  throw new Error("https://svelte.dev/e/state_unsafe_local_read");
876
876
  }();
877
- var i2 = F.deps;
878
- e2.rv < J && (e2.rv = J, // If the signal is accessing the same dependencies in the same
877
+ var i2 = G.deps;
878
+ e2.rv < Z && (e2.rv = Z, // If the signal is accessing the same dependencies in the same
879
879
  // order as it did last time, increment `skipped_deps`
880
880
  // rather than updating `new_deps`, which creates GC cost
881
- null === V && null !== i2 && i2[K] === e2 ? K++ : null === V ? V = [e2] : Y && V.includes(e2) || // Normally we can push duplicated dependencies to `new_deps`, but if we're inside
881
+ null === V && null !== i2 && i2[K] === e2 ? K++ : null === V ? V = [e2] : J && V.includes(e2) || // Normally we can push duplicated dependencies to `new_deps`, but if we're inside
882
882
  // an unowned derived because skip_reaction is true, then we need to ensure that
883
883
  // we don't have duplicates
884
884
  V.push(e2));
@@ -887,11 +887,11 @@ function get$1(e2) {
887
887
  e2) && update_derived(n2), e2.v;
888
888
  }
889
889
  function untrack(e2) {
890
- var t2 = G;
890
+ var t2 = F;
891
891
  try {
892
- return G = true, e2();
892
+ return F = true, e2();
893
893
  } finally {
894
- G = t2;
894
+ F = t2;
895
895
  }
896
896
  }
897
897
  const Q = -7169;
@@ -968,7 +968,7 @@ function autofocus(e2, t2) {
968
968
  }
969
969
  let re = false;
970
970
  function without_reactive_context(e2) {
971
- var t2 = F, n2 = H;
971
+ var t2 = G, n2 = H;
972
972
  set_active_reaction(null), set_active_effect(null);
973
973
  try {
974
974
  return e2();
@@ -1035,14 +1035,14 @@ function handle_event_propagation(e2) {
1035
1035
  a2[0] || e2.target
1036
1036
  ), c2 = 0, u2 = e2.__root;
1037
1037
  if (u2) {
1038
- var f2 = a2.indexOf(u2);
1039
- if (-1 !== f2 && (n2 === document || n2 === /** @type {any} */
1038
+ var d2 = a2.indexOf(u2);
1039
+ if (-1 !== d2 && (n2 === document || n2 === /** @type {any} */
1040
1040
  window))
1041
1041
  return void (e2.__root = n2);
1042
- var d2 = a2.indexOf(n2);
1043
- if (-1 === d2)
1042
+ var f2 = a2.indexOf(n2);
1043
+ if (-1 === f2)
1044
1044
  return;
1045
- f2 <= d2 && (c2 = f2);
1045
+ d2 <= f2 && (c2 = d2);
1046
1046
  }
1047
1047
  if ((l2 = /** @type {Element} */
1048
1048
  a2[c2] || e2.target) !== n2) {
@@ -1050,10 +1050,10 @@ function handle_event_propagation(e2) {
1050
1050
  configurable: true,
1051
1051
  get: () => l2 || o2
1052
1052
  });
1053
- var p2 = F, _2 = H;
1053
+ var p2 = G, _2 = H;
1054
1054
  set_active_reaction(null), set_active_effect(null);
1055
1055
  try {
1056
- for (var v2, g2 = []; null !== l2; ) {
1056
+ for (var g2, v2 = []; null !== l2; ) {
1057
1057
  var h2 = l2.assignedSlot || l2.parentNode || /** @type {any} */
1058
1058
  l2.host || null;
1059
1059
  try {
@@ -1066,17 +1066,17 @@ function handle_event_propagation(e2) {
1066
1066
  b2.apply(l2, [e2, ...y2]);
1067
1067
  } else m2.call(l2, e2);
1068
1068
  } catch (e3) {
1069
- v2 ? g2.push(e3) : v2 = e3;
1069
+ g2 ? v2.push(e3) : g2 = e3;
1070
1070
  }
1071
1071
  if (e2.cancelBubble || h2 === n2 || null === h2) break;
1072
1072
  l2 = h2;
1073
1073
  }
1074
- if (v2) {
1075
- for (let e3 of g2)
1074
+ if (g2) {
1075
+ for (let e3 of v2)
1076
1076
  queueMicrotask(() => {
1077
1077
  throw e3;
1078
1078
  });
1079
- throw v2;
1079
+ throw g2;
1080
1080
  }
1081
1081
  } finally {
1082
1082
  e2.__root = n2, // @ts-ignore remove proxy on currentTarget
@@ -1166,11 +1166,11 @@ function mount(e2, t2) {
1166
1166
  * where these globals are not available while avoiding a separate server entry point
1167
1167
  */
1168
1168
  function init_operations() {
1169
- if (void 0 === q) {
1170
- q = window, I = document, P = /Firefox/.test(navigator.userAgent);
1169
+ if (void 0 === T) {
1170
+ T = window, q = document, P = /Firefox/.test(navigator.userAgent);
1171
1171
  var e4 = Element.prototype, t4 = Node.prototype;
1172
- O = s(t4, "firstChild").get, // @ts-ignore
1173
- E = s(t4, "nextSibling").get, // the following assignments improve perf of lookups on DOM nodes
1172
+ D = s(t4, "firstChild").get, // @ts-ignore
1173
+ O = s(t4, "nextSibling").get, // the following assignments improve perf of lookups on DOM nodes
1174
1174
  // @ts-expect-error
1175
1175
  e4.__click = void 0, // @ts-expect-error
1176
1176
  e4.__className = void 0, // @ts-expect-error
@@ -1201,14 +1201,14 @@ function mount(e2, t2) {
1201
1201
  }
1202
1202
  };
1203
1203
  event_handle(o(oe)), ie.add(event_handle);
1204
- var f2 = void 0, p2 = (
1204
+ var d2 = void 0, p2 = (
1205
1205
  /**
1206
1206
  * An effect root whose children can transition out
1207
1207
  * @param {() => void} fn
1208
1208
  * @returns {(options?: { outro?: boolean }) => Promise<void>}
1209
1209
  */
1210
1210
  function component_root(e4) {
1211
- const t4 = create_effect(d, e4, true);
1211
+ const t4 = create_effect(f, e4, true);
1212
1212
  return (e5 = {}) => new Promise((n3) => {
1213
1213
  e5.outro ? pause_effect(t4, () => {
1214
1214
  destroy_effect(t4), n3(void 0);
@@ -1218,11 +1218,11 @@ function mount(e2, t2) {
1218
1218
  var o2 = n2 ?? t3.appendChild(create_text());
1219
1219
  return branch(() => {
1220
1220
  l2 && (push({}), /** @type {ComponentContext} */
1221
- T.c = l2);
1221
+ I.c = l2);
1222
1222
  a2 && // We can't spread the object or else we'd lose the state proxy stuff, if it is one
1223
1223
  /** @type {any} */
1224
1224
  (i2.$$events = a2), se = c2, // @ts-expect-error the public typings are not what the actual function looks like
1225
- f2 = e3(o2, i2) || {}, se = true, l2 && pop();
1225
+ d2 = e3(o2, i2) || {}, se = true, l2 && pop();
1226
1226
  }), () => {
1227
1227
  var _a2;
1228
1228
  for (var e4 of u2) {
@@ -1237,7 +1237,7 @@ function mount(e2, t2) {
1237
1237
  };
1238
1238
  })
1239
1239
  );
1240
- return le.set(f2, p2), f2;
1240
+ return le.set(d2, p2), d2;
1241
1241
  }(e2, t2);
1242
1242
  }
1243
1243
  const ae = /* @__PURE__ */ new Map();
@@ -1272,13 +1272,13 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
1272
1272
  };
1273
1273
  !(4 & n2) || (c2 = /** @type {Element} */
1274
1274
  e2.appendChild(create_text()));
1275
- var f2 = null, d2 = false, p2 = /* @__PURE__ */ derived_safe_equal(() => {
1275
+ var d2 = null, f2 = false, p2 = /* @__PURE__ */ derived_safe_equal(() => {
1276
1276
  var e3 = i2();
1277
1277
  return t(e3) ? e3 : null == e3 ? [] : o(e3);
1278
1278
  });
1279
1279
  block(() => {
1280
1280
  var e3 = get$1(p2), t2 = e3.length;
1281
- d2 && 0 === t2 || (d2 = 0 === t2, /**
1281
+ f2 && 0 === t2 || (f2 = 0 === t2, /**
1282
1282
  * Add, remove, or reorder items output by an each block as its input changes
1283
1283
  * @template V
1284
1284
  * @param {Array<V>} array
@@ -1292,23 +1292,23 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
1292
1292
  */
1293
1293
  function reconcile(e4, t3, n3, i3, s3, a3, l3) {
1294
1294
  var _a2, _b2, _c2, _d;
1295
- var c3, u3, f3, d3, p3, _2, v2 = !!(8 & s3), g2 = !!(3 & s3), h2 = e4.length, m2 = t3.items, y2 = t3.first, $2 = y2, w2 = null, x2 = [], k2 = [];
1296
- if (v2) for (_2 = 0; _2 < h2; _2 += 1) d3 = a3(f3 = e4[_2], _2), void 0 !== (p3 = m2.get(d3)) && ((_a2 = p3.a) == null ? void 0 : _a2.measure(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).add(p3));
1297
- for (_2 = 0; _2 < h2; _2 += 1) if (d3 = a3(f3 = e4[_2], _2), void 0 !== (p3 = m2.get(d3))) {
1298
- if (g2 && update_item(p3, f3, _2, s3), p3.e.f & b && (resume_effect(p3.e), v2 && ((_b2 = p3.a) == null ? void 0 : _b2.unfix(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).delete(p3))), p3 !== $2) {
1295
+ var c3, u3, d3, f3, p3, _2, g2 = !!(8 & s3), v2 = !!(3 & s3), h2 = e4.length, m2 = t3.items, y2 = t3.first, $2 = y2, w2 = null, x2 = [], k2 = [];
1296
+ if (g2) for (_2 = 0; _2 < h2; _2 += 1) f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = m2.get(f3)) && ((_a2 = p3.a) == null ? void 0 : _a2.measure(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).add(p3));
1297
+ for (_2 = 0; _2 < h2; _2 += 1) if (f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = m2.get(f3))) {
1298
+ if (v2 && update_item(p3, d3, _2, s3), p3.e.f & b && (resume_effect(p3.e), g2 && ((_b2 = p3.a) == null ? void 0 : _b2.unfix(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).delete(p3))), p3 !== $2) {
1299
1299
  if (void 0 !== c3 && c3.has(p3)) {
1300
1300
  if (x2.length < k2.length) {
1301
1301
  var C2, S2 = k2[0];
1302
1302
  w2 = S2.prev;
1303
- var M2 = x2[0], T2 = x2[x2.length - 1];
1303
+ var M2 = x2[0], I2 = x2[x2.length - 1];
1304
1304
  for (C2 = 0; C2 < x2.length; C2 += 1) move(x2[C2], S2, n3);
1305
1305
  for (C2 = 0; C2 < k2.length; C2 += 1) c3.delete(k2[C2]);
1306
- link(t3, M2.prev, T2.next), link(t3, w2, M2), link(t3, T2, S2), $2 = S2, w2 = T2, _2 -= 1, x2 = [], k2 = [];
1306
+ link(t3, M2.prev, I2.next), link(t3, w2, M2), link(t3, I2, S2), $2 = S2, w2 = I2, _2 -= 1, x2 = [], k2 = [];
1307
1307
  } else
1308
1308
  c3.delete(p3), move(p3, $2, n3), link(t3, p3.prev, p3.next), link(t3, p3, null === w2 ? t3.first : w2.next), link(t3, w2, p3), w2 = p3;
1309
1309
  continue;
1310
1310
  }
1311
- for (x2 = [], k2 = []; null !== $2 && $2.k !== d3; )
1311
+ for (x2 = [], k2 = []; null !== $2 && $2.k !== f3; )
1312
1312
  $2.e.f & b || (c3 ?? (c3 = /* @__PURE__ */ new Set())).add($2), k2.push($2), $2 = $2.next;
1313
1313
  if (null === $2) continue;
1314
1314
  p3 = $2;
@@ -1318,17 +1318,17 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
1318
1318
  w2 = create_item($2 ? (
1319
1319
  /** @type {TemplateNode} */
1320
1320
  $2.e.nodes_start
1321
- ) : n3, t3, w2, null === w2 ? t3.first : w2.next, f3, d3, _2, i3, s3, l3), m2.set(d3, w2), x2 = [], k2 = [], $2 = w2.next;
1321
+ ) : n3, t3, w2, null === w2 ? t3.first : w2.next, d3, f3, _2, i3, s3, l3), m2.set(f3, w2), x2 = [], k2 = [], $2 = w2.next;
1322
1322
  }
1323
1323
  if (null !== $2 || void 0 !== c3) {
1324
- for (var q2 = void 0 === c3 ? [] : o(c3); null !== $2; )
1325
- $2.e.f & b || q2.push($2), $2 = $2.next;
1326
- var I2 = q2.length;
1327
- if (I2 > 0) {
1324
+ for (var T2 = void 0 === c3 ? [] : o(c3); null !== $2; )
1325
+ $2.e.f & b || T2.push($2), $2 = $2.next;
1326
+ var q2 = T2.length;
1327
+ if (q2 > 0) {
1328
1328
  var P2 = 4 & s3 && 0 === h2 ? n3 : null;
1329
- if (v2) {
1330
- for (_2 = 0; _2 < I2; _2 += 1) (_c2 = q2[_2].a) == null ? void 0 : _c2.measure();
1331
- for (_2 = 0; _2 < I2; _2 += 1) (_d = q2[_2].a) == null ? void 0 : _d.fix();
1329
+ if (g2) {
1330
+ for (_2 = 0; _2 < q2; _2 += 1) (_c2 = T2[_2].a) == null ? void 0 : _c2.measure();
1331
+ for (_2 = 0; _2 < q2; _2 += 1) (_d = T2[_2].a) == null ? void 0 : _d.fix();
1332
1332
  }
1333
1333
  !function pause_effects(e5, t4, n4, o2) {
1334
1334
  for (var i4 = [], s4 = t4.length, a4 = 0; a4 < s4; a4++) pause_children(t4[a4].e, i4, true);
@@ -1352,17 +1352,17 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
1352
1352
  l4 || (o2.delete(i5.k), link(e5, i5.prev, i5.next)), destroy_effect(i5.e, !l4);
1353
1353
  }
1354
1354
  });
1355
- }(t3, q2, P2, m2);
1355
+ }(t3, T2, P2, m2);
1356
1356
  }
1357
1357
  }
1358
- v2 && queue_micro_task(() => {
1358
+ g2 && queue_micro_task(() => {
1359
1359
  var _a3;
1360
1360
  if (void 0 !== u3) for (p3 of u3) (_a3 = p3.a) == null ? void 0 : _a3.apply();
1361
1361
  });
1362
1362
  H.first = t3.first && t3.first.e, /** @type {Effect} */
1363
1363
  H.last = w2 && w2.e;
1364
- }(e3, u2, c2, a2, n2, s2, i2), null !== l2 && (0 === t2 ? f2 ? resume_effect(f2) : f2 = branch(() => l2(c2)) : null !== f2 && pause_effect(f2, () => {
1365
- f2 = null;
1364
+ }(e3, u2, c2, a2, n2, s2, i2), null !== l2 && (0 === t2 ? d2 ? resume_effect(d2) : d2 = branch(() => l2(c2)) : null !== d2 && pause_effect(d2, () => {
1365
+ d2 = null;
1366
1366
  })), // When we mount the each block for the first time, the collection won't be
1367
1367
  // connected to this effect as the effect hasn't finished running yet and its deps
1368
1368
  // won't be assigned. However, it's possible that when reconciling the each block
@@ -1380,9 +1380,9 @@ function update_item(e2, t2, n2, o2) {
1380
1380
  ) : e2.i = n2;
1381
1381
  }
1382
1382
  function create_item(e2, t2, n2, o2, i2, s2, a2, l2, c2, u2) {
1383
- var f2 = ce, d2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(i2) : source(i2) : i2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
1383
+ var d2 = ce, f2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(i2) : source(i2) : i2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
1384
1384
  i: p2,
1385
- v: d2,
1385
+ v: f2,
1386
1386
  k: s2,
1387
1387
  a: null,
1388
1388
  // @ts-expect-error
@@ -1392,9 +1392,9 @@ function create_item(e2, t2, n2, o2, i2, s2, a2, l2, c2, u2) {
1392
1392
  };
1393
1393
  ce = _2;
1394
1394
  try {
1395
- return _2.e = branch(() => l2(e2, d2, p2, u2), false), _2.e.prev = n2 && n2.e, _2.e.next = o2 && o2.e, null === n2 ? t2.first = _2 : (n2.next = _2, n2.e.next = _2.e), null !== o2 && (o2.prev = _2, o2.e.prev = _2.e), _2;
1395
+ return _2.e = branch(() => l2(e2, f2, p2, u2), false), _2.e.prev = n2 && n2.e, _2.e.next = o2 && o2.e, null === n2 ? t2.first = _2 : (n2.next = _2, n2.e.next = _2.e), null !== o2 && (o2.prev = _2, o2.e.prev = _2.e), _2;
1396
1396
  } finally {
1397
- ce = f2;
1397
+ ce = d2;
1398
1398
  }
1399
1399
  }
1400
1400
  function move(e2, t2, n2) {
@@ -1492,18 +1492,18 @@ function set_style(e2, t2, n2, o2) {
1492
1492
  e3 = String(e3).replaceAll(/\s*\/\*.*?\*\/\s*/g, "").trim();
1493
1493
  var s2 = false, a2 = 0, l2 = false, c2 = [];
1494
1494
  n3 && c2.push(...Object.keys(n3).map(to_css_name)), o3 && c2.push(...Object.keys(o3).map(to_css_name));
1495
- var u2 = 0, f2 = -1;
1495
+ var u2 = 0, d2 = -1;
1496
1496
  const t4 = e3.length;
1497
- for (var d2 = 0; d2 < t4; d2++) {
1498
- var p2 = e3[d2];
1499
- if (l2 ? "/" === p2 && "*" === e3[d2 - 1] && (l2 = false) : s2 ? s2 === p2 && (s2 = false) : "/" === p2 && "*" === e3[d2 + 1] ? l2 = true : '"' === p2 || "'" === p2 ? s2 = p2 : "(" === p2 ? a2++ : ")" === p2 && a2--, !l2 && false === s2 && 0 === a2) {
1500
- if (":" === p2 && -1 === f2) f2 = d2;
1501
- else if (";" === p2 || d2 === t4 - 1) {
1502
- if (-1 !== f2) {
1503
- var _2 = to_css_name(e3.substring(u2, f2).trim());
1504
- c2.includes(_2) || (";" !== p2 && d2++, i3 += " " + e3.substring(u2, d2).trim() + ";");
1497
+ for (var f2 = 0; f2 < t4; f2++) {
1498
+ var p2 = e3[f2];
1499
+ if (l2 ? "/" === p2 && "*" === e3[f2 - 1] && (l2 = false) : s2 ? s2 === p2 && (s2 = false) : "/" === p2 && "*" === e3[f2 + 1] ? l2 = true : '"' === p2 || "'" === p2 ? s2 = p2 : "(" === p2 ? a2++ : ")" === p2 && a2--, !l2 && false === s2 && 0 === a2) {
1500
+ if (":" === p2 && -1 === d2) d2 = f2;
1501
+ else if (";" === p2 || f2 === t4 - 1) {
1502
+ if (-1 !== d2) {
1503
+ var _2 = to_css_name(e3.substring(u2, d2).trim());
1504
+ c2.includes(_2) || (";" !== p2 && f2++, i3 += " " + e3.substring(u2, f2).trim() + ";");
1505
1505
  }
1506
- u2 = d2 + 1, f2 = -1;
1506
+ u2 = f2 + 1, d2 = -1;
1507
1507
  }
1508
1508
  }
1509
1509
  }
@@ -1517,7 +1517,7 @@ function set_style(e2, t2, n2, o2) {
1517
1517
  } else o2 && (Array.isArray(o2) ? (update_styles(e2, n2 == null ? void 0 : n2[0], o2[0]), update_styles(e2, n2 == null ? void 0 : n2[1], o2[1], "important")) : update_styles(e2, n2, o2));
1518
1518
  return o2;
1519
1519
  }
1520
- const fe = Symbol("class"), de = Symbol("style"), pe = Symbol("is custom element"), _e = Symbol("is html");
1520
+ const de = Symbol("class"), fe = Symbol("style"), pe = Symbol("is custom element"), _e = Symbol("is html");
1521
1521
  function set_selected(e2, t2) {
1522
1522
  t2 ? (
1523
1523
  // The selected option could've changed via user selection, and
@@ -1535,9 +1535,9 @@ function set_attribute(e2, t2, n2, o2) {
1535
1535
  }
1536
1536
  function set_attributes(e2, t2, n2, o2, i2 = false) {
1537
1537
  var s2 = get_attributes(e2), a2 = s2[pe], l2 = !s2[_e], c2 = t2 || {}, u2 = "OPTION" === e2.tagName;
1538
- for (var f2 in t2) f2 in n2 || (n2[f2] = null);
1539
- n2.class ? n2.class = clsx(n2.class) : (o2 || n2[fe]) && (n2.class = null), n2[de] && (n2.style ?? (n2.style = null));
1540
- var d2 = get_setters(e2);
1538
+ for (var d2 in t2) d2 in n2 || (n2[d2] = null);
1539
+ n2.class ? n2.class = clsx(n2.class) : (o2 || n2[de]) && (n2.class = null), n2[fe] && (n2.style ?? (n2.style = null));
1540
+ var f2 = get_setters(e2);
1541
1541
  for (const m2 in n2) {
1542
1542
  let b2 = n2[m2];
1543
1543
  if (u2 && "value" === m2 && null == b2)
@@ -1550,12 +1550,12 @@ function set_attributes(e2, t2, n2, o2, i2 = false) {
1550
1550
  if ("$$" !== _2) if ("on" === _2) {
1551
1551
  const y2 = {}, $2 = "$$" + m2;
1552
1552
  let w2 = m2.slice(2);
1553
- var v2 = is_delegated(w2);
1554
- if (is_capture_event(w2) && (w2 = w2.slice(0, -7), y2.capture = true), !v2 && p2) {
1553
+ var g2 = is_delegated(w2);
1554
+ if (is_capture_event(w2) && (w2 = w2.slice(0, -7), y2.capture = true), !g2 && p2) {
1555
1555
  if (null != b2) continue;
1556
1556
  e2.removeEventListener(w2, c2[$2], y2), c2[$2] = null;
1557
1557
  }
1558
- if (null != b2) if (v2)
1558
+ if (null != b2) if (g2)
1559
1559
  e2[`__${w2}`] = b2, delegate([w2]);
1560
1560
  else {
1561
1561
  let handle = function(e3) {
@@ -1563,7 +1563,7 @@ function set_attributes(e2, t2, n2, o2, i2 = false) {
1563
1563
  };
1564
1564
  c2[$2] = create_event(w2, e2, handle, y2);
1565
1565
  }
1566
- else v2 && // @ts-ignore
1566
+ else g2 && // @ts-ignore
1567
1567
  (e2[`__${w2}`] = void 0);
1568
1568
  } else if ("style" === m2)
1569
1569
  set_attribute(e2, m2, b2);
@@ -1578,34 +1578,34 @@ function set_attributes(e2, t2, n2, o2, i2 = false) {
1578
1578
  b2
1579
1579
  );
1580
1580
  else {
1581
- var g2 = m2;
1582
- l2 || (g2 = normalize_attribute(g2));
1583
- var h2 = "defaultValue" === g2 || "defaultChecked" === g2;
1584
- if (null != b2 || a2 || h2) h2 || d2.includes(g2) && (a2 || "string" != typeof b2) ? (
1581
+ var v2 = m2;
1582
+ l2 || (v2 = normalize_attribute(v2));
1583
+ var h2 = "defaultValue" === v2 || "defaultChecked" === v2;
1584
+ if (null != b2 || a2 || h2) h2 || f2.includes(v2) && (a2 || "string" != typeof b2) ? (
1585
1585
  // @ts-ignore
1586
- e2[g2] = b2
1587
- ) : "function" != typeof b2 && set_attribute(e2, g2, b2);
1588
- else if (s2[m2] = null, "value" === g2 || "checked" === g2) {
1586
+ e2[v2] = b2
1587
+ ) : "function" != typeof b2 && set_attribute(e2, v2, b2);
1588
+ else if (s2[m2] = null, "value" === v2 || "checked" === v2) {
1589
1589
  let x2 = (
1590
1590
  /** @type {HTMLInputElement} */
1591
1591
  e2
1592
1592
  );
1593
1593
  const k2 = void 0 === t2;
1594
- if ("value" === g2) {
1594
+ if ("value" === v2) {
1595
1595
  let C2 = x2.defaultValue;
1596
- x2.removeAttribute(g2), x2.defaultValue = C2, // @ts-ignore
1596
+ x2.removeAttribute(v2), x2.defaultValue = C2, // @ts-ignore
1597
1597
  x2.value = x2.__value = k2 ? C2 : null;
1598
1598
  } else {
1599
1599
  let S2 = x2.defaultChecked;
1600
- x2.removeAttribute(g2), x2.defaultChecked = S2, x2.checked = !!k2 && S2;
1600
+ x2.removeAttribute(v2), x2.defaultChecked = S2, x2.checked = !!k2 && S2;
1601
1601
  }
1602
1602
  } else e2.removeAttribute(m2);
1603
1603
  }
1604
1604
  else
1605
1605
  e2.value = e2.__value = b2;
1606
1606
  }
1607
- } else set_style(e2, b2, t2 == null ? void 0 : t2[de], n2[de]), c2[m2] = b2, c2[de] = n2[de];
1608
- else set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, o2, t2 == null ? void 0 : t2[fe], n2[fe]), c2[m2] = b2, c2[fe] = n2[fe];
1607
+ } else set_style(e2, b2, t2 == null ? void 0 : t2[fe], n2[fe]), c2[m2] = b2, c2[fe] = n2[fe];
1608
+ else set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, o2, t2 == null ? void 0 : t2[de], n2[de]), c2[m2] = b2, c2[de] = n2[de];
1609
1609
  }
1610
1610
  return c2;
1611
1611
  }
@@ -1615,18 +1615,18 @@ function get_attributes(e2) {
1615
1615
  [_e]: "http://www.w3.org/1999/xhtml" === e2.namespaceURI
1616
1616
  });
1617
1617
  }
1618
- var ve = /* @__PURE__ */ new Map();
1618
+ var ge = /* @__PURE__ */ new Map();
1619
1619
  function get_setters(e2) {
1620
- var t2, n2 = ve.get(e2.nodeName);
1620
+ var t2, n2 = ge.get(e2.nodeName);
1621
1621
  if (n2) return n2;
1622
- ve.set(e2.nodeName, n2 = []);
1622
+ ge.set(e2.nodeName, n2 = []);
1623
1623
  for (var o2 = e2, i2 = Element.prototype; i2 !== o2; ) {
1624
1624
  for (var s2 in t2 = a(o2)) t2[s2].set && n2.push(s2);
1625
1625
  o2 = u(o2);
1626
1626
  }
1627
1627
  return n2;
1628
1628
  }
1629
- const ge = {
1629
+ const ve = {
1630
1630
  // don't access requestAnimationFrame eagerly outside method
1631
1631
  // this allows basic testing of user code without JSDOM
1632
1632
  // bunder will eval and remove ternary when the user's app is built
@@ -1638,10 +1638,10 @@ const ge = {
1638
1638
  tasks: /* @__PURE__ */ new Set()
1639
1639
  };
1640
1640
  function run_tasks() {
1641
- const e2 = ge.now();
1642
- ge.tasks.forEach((t2) => {
1643
- t2.c(e2) || (ge.tasks.delete(t2), t2.f());
1644
- }), 0 !== ge.tasks.size && ge.tick(run_tasks);
1641
+ const e2 = ve.now();
1642
+ ve.tasks.forEach((t2) => {
1643
+ t2.c(e2) || (ve.tasks.delete(t2), t2.f());
1644
+ }), 0 !== ve.tasks.size && ve.tick(run_tasks);
1645
1645
  }
1646
1646
  function dispatch_event(e2, t2) {
1647
1647
  without_reactive_context(() => {
@@ -1671,7 +1671,7 @@ const linear = (e2) => e2;
1671
1671
  function transition(e2, t2, n2, o2) {
1672
1672
  var i2, s2, a2, l2 = !!(4 & e2), c2 = t2.inert, u2 = t2.style.overflow;
1673
1673
  function get_options() {
1674
- var e3 = F, s3 = H;
1674
+ var e3 = G, s3 = H;
1675
1675
  set_active_reaction(null), set_active_effect(null);
1676
1676
  try {
1677
1677
  return i2 ?? (i2 = n2()(t2, (o2 == null ? void 0 : o2()) ?? /** @type {P} */
@@ -1682,7 +1682,7 @@ function transition(e2, t2, n2, o2) {
1682
1682
  set_active_reaction(e3), set_active_effect(s3);
1683
1683
  }
1684
1684
  }
1685
- var f2 = {
1685
+ var d2 = {
1686
1686
  is_global: l2,
1687
1687
  in() {
1688
1688
  t2.inert = c2, dispatch_event(t2, "introstart"), s2 = animate(t2, get_options(), a2, 1, () => {
@@ -1698,21 +1698,21 @@ function transition(e2, t2, n2, o2) {
1698
1698
  stop: () => {
1699
1699
  s2 == null ? void 0 : s2.abort(), a2 == null ? void 0 : a2.abort();
1700
1700
  }
1701
- }, d2 = (
1701
+ }, f2 = (
1702
1702
  /** @type {Effect} */
1703
1703
  H
1704
1704
  );
1705
- if ((d2.transitions ?? (d2.transitions = [])).push(f2), se) {
1705
+ if ((f2.transitions ?? (f2.transitions = [])).push(d2), se) {
1706
1706
  var p2 = l2;
1707
1707
  if (!p2) {
1708
1708
  for (var _2 = (
1709
1709
  /** @type {Effect | null} */
1710
- d2.parent
1710
+ f2.parent
1711
1711
  ); _2 && _2.f & $; ) for (; (_2 = _2.parent) && !(16 & _2.f); ) ;
1712
1712
  p2 = !_2 || !!(32768 & _2.f);
1713
1713
  }
1714
1714
  p2 && effect(() => {
1715
- untrack(() => f2.in());
1715
+ untrack(() => d2.in());
1716
1716
  });
1717
1717
  }
1718
1718
  }
@@ -1742,16 +1742,16 @@ function animate(e2, t2, n2, o2, i2) {
1742
1742
  reset: noop,
1743
1743
  t: () => o2
1744
1744
  };
1745
- const { delay: c2 = 0, css: u2, tick: f2, easing: d2 = linear } = t2;
1745
+ const { delay: c2 = 0, css: u2, tick: d2, easing: f2 = linear } = t2;
1746
1746
  var p2 = [];
1747
- if (s2 && void 0 === n2 && (f2 && f2(0, 1), u2)) {
1747
+ if (s2 && void 0 === n2 && (d2 && d2(0, 1), u2)) {
1748
1748
  var _2 = css_to_keyframe(u2(0, 1));
1749
1749
  p2.push(_2, _2);
1750
1750
  }
1751
- var get_t = () => 1 - o2, v2 = e2.animate(p2, {
1751
+ var get_t = () => 1 - o2, g2 = e2.animate(p2, {
1752
1752
  duration: c2
1753
1753
  });
1754
- return v2.onfinish = () => {
1754
+ return g2.onfinish = () => {
1755
1755
  var s3 = (n2 == null ? void 0 : n2.t()) ?? 1 - o2;
1756
1756
  n2 == null ? void 0 : n2.abort();
1757
1757
  var a3 = o2 - s3, l3 = (
@@ -1761,8 +1761,8 @@ function animate(e2, t2, n2, o2, i2) {
1761
1761
  if (l3 > 0) {
1762
1762
  var p3 = false;
1763
1763
  if (u2)
1764
- for (var _3 = Math.ceil(l3 / (1e3 / 60)), g2 = 0; g2 <= _3; g2 += 1) {
1765
- var h2 = s3 + a3 * d2(g2 / _3), m2 = css_to_keyframe(u2(h2, 1 - h2));
1764
+ for (var _3 = Math.ceil(l3 / (1e3 / 60)), v2 = 0; v2 <= _3; v2 += 1) {
1765
+ var h2 = s3 + a3 * f2(v2 / _3), m2 = css_to_keyframe(u2(h2, 1 - h2));
1766
1766
  c3.push(m2), p3 || (p3 = "hidden" === m2.overflow);
1767
1767
  }
1768
1768
  p3 && /** @type {HTMLElement} */
@@ -1770,47 +1770,47 @@ function animate(e2, t2, n2, o2, i2) {
1770
1770
  var e3 = (
1771
1771
  /** @type {number} */
1772
1772
  /** @type {globalThis.Animation} */
1773
- v2.currentTime
1773
+ g2.currentTime
1774
1774
  );
1775
- return s3 + a3 * d2(e3 / l3);
1776
- }, f2 && function loop(e3) {
1775
+ return s3 + a3 * f2(e3 / l3);
1776
+ }, d2 && function loop(e3) {
1777
1777
  let t3;
1778
- return 0 === ge.tasks.size && ge.tick(run_tasks), {
1778
+ return 0 === ve.tasks.size && ve.tick(run_tasks), {
1779
1779
  promise: new Promise((n3) => {
1780
- ge.tasks.add(t3 = {
1780
+ ve.tasks.add(t3 = {
1781
1781
  c: e3,
1782
1782
  f: n3
1783
1783
  });
1784
1784
  }),
1785
1785
  abort() {
1786
- ge.tasks.delete(t3);
1786
+ ve.tasks.delete(t3);
1787
1787
  }
1788
1788
  };
1789
1789
  }(() => {
1790
- if ("running" !== v2.playState) return false;
1790
+ if ("running" !== g2.playState) return false;
1791
1791
  var e3 = get_t();
1792
- return f2(e3, 1 - e3), true;
1792
+ return d2(e3, 1 - e3), true;
1793
1793
  });
1794
1794
  }
1795
- (v2 = e2.animate(c3, {
1795
+ (g2 = e2.animate(c3, {
1796
1796
  duration: l3,
1797
1797
  fill: "forwards"
1798
1798
  })).onfinish = () => {
1799
- get_t = () => o2, f2 == null ? void 0 : f2(o2, 1 - o2), i2();
1799
+ get_t = () => o2, d2 == null ? void 0 : d2(o2, 1 - o2), i2();
1800
1800
  };
1801
1801
  }, {
1802
1802
  abort: () => {
1803
- v2 && (v2.cancel(), // This prevents memory leaks in Chromium
1804
- v2.effect = null, // This prevents onfinish to be launched after cancel(),
1803
+ g2 && (g2.cancel(), // This prevents memory leaks in Chromium
1804
+ g2.effect = null, // This prevents onfinish to be launched after cancel(),
1805
1805
  // which can happen in some rare cases
1806
1806
  // see https://github.com/sveltejs/svelte/issues/13681
1807
- v2.onfinish = noop);
1807
+ g2.onfinish = noop);
1808
1808
  },
1809
1809
  deactivate: () => {
1810
1810
  i2 = noop;
1811
1811
  },
1812
1812
  reset: () => {
1813
- 0 === o2 && (f2 == null ? void 0 : f2(1, 0));
1813
+ 0 === o2 && (d2 == null ? void 0 : d2(1, 0));
1814
1814
  },
1815
1815
  t: () => get_t()
1816
1816
  };
@@ -1845,7 +1845,7 @@ function bind_this(e2 = {}, t2, n2, o2) {
1845
1845
  function init(e2 = false) {
1846
1846
  const t2 = (
1847
1847
  /** @type {ComponentContextLegacy} */
1848
- T
1848
+ I
1849
1849
  ), n2 = t2.l.u;
1850
1850
  if (!n2) return;
1851
1851
  let props = () => deep_read_state(t2.s);
@@ -2057,8 +2057,8 @@ function spread_props(...e2) {
2057
2057
  }
2058
2058
  function prop(e2, t2, n2, o2) {
2059
2059
  var _a2;
2060
- var i2, a2 = !!(1 & n2), l2 = !S || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), f2 = false;
2061
- c2 ? [i2, f2] = function capture_store_binding(e3) {
2060
+ var i2, a2 = !!(1 & n2), l2 = !S || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = false;
2061
+ c2 ? [i2, d2] = function capture_store_binding(e3) {
2062
2062
  var t3 = me;
2063
2063
  try {
2064
2064
  return me = false, [e3(), me];
@@ -2070,37 +2070,37 @@ function prop(e2, t2, n2, o2) {
2070
2070
  e2[t2]
2071
2071
  )) : i2 = /** @type {V} */
2072
2072
  e2[t2];
2073
- var d2, p2 = x in e2 || k in e2, _2 = c2 && (((_a2 = s(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, v2 = (
2073
+ var f2, p2 = x in e2 || k in e2, _2 = c2 && (((_a2 = s(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, g2 = (
2074
2074
  /** @type {V} */
2075
2075
  o2
2076
- ), g2 = true, h2 = false, get_fallback = () => (h2 = true, g2 && (g2 = false, v2 = u2 ? untrack(
2076
+ ), v2 = true, h2 = false, get_fallback = () => (h2 = true, v2 && (v2 = false, g2 = u2 ? untrack(
2077
2077
  /** @type {() => V} */
2078
2078
  o2
2079
2079
  ) : (
2080
2080
  /** @type {V} */
2081
2081
  o2
2082
- )), v2);
2082
+ )), g2);
2083
2083
  if (void 0 === i2 && void 0 !== o2 && (_2 && l2 && function props_invalid_value(e3) {
2084
2084
  throw new Error("https://svelte.dev/e/props_invalid_value");
2085
- }(), i2 = get_fallback(), _2 && _2(i2)), l2) d2 = () => {
2085
+ }(), i2 = get_fallback(), _2 && _2(i2)), l2) f2 = () => {
2086
2086
  var n3 = (
2087
2087
  /** @type {V} */
2088
2088
  e2[t2]
2089
2089
  );
2090
- return void 0 === n3 ? get_fallback() : (g2 = true, h2 = false, n3);
2090
+ return void 0 === n3 ? get_fallback() : (v2 = true, h2 = false, n3);
2091
2091
  };
2092
2092
  else {
2093
2093
  var m2 = (a2 ? derived : derived_safe_equal)(() => (
2094
2094
  /** @type {V} */
2095
2095
  e2[t2]
2096
2096
  ));
2097
- m2.f |= 131072, d2 = () => {
2097
+ m2.f |= 131072, f2 = () => {
2098
2098
  var e3 = get$1(m2);
2099
- return void 0 !== e3 && (v2 = /** @type {V} */
2100
- void 0), void 0 === e3 ? v2 : e3;
2099
+ return void 0 !== e3 && (g2 = /** @type {V} */
2100
+ void 0), void 0 === e3 ? g2 : e3;
2101
2101
  };
2102
2102
  }
2103
- if (!(4 & n2)) return d2;
2103
+ if (!(4 & n2)) return f2;
2104
2104
  if (_2) {
2105
2105
  var b2 = e2.$$legacy;
2106
2106
  return function(e3, t3) {
@@ -2109,13 +2109,13 @@ function prop(e2, t2, n2, o2) {
2109
2109
  // In that case the state proxy (if it exists) should take care of the notification.
2110
2110
  // If the parent is not in runes mode, we need to notify on mutation, too, that the prop
2111
2111
  // has changed because the parent will not be able to detect the change otherwise.
2112
- (l2 && t3 && !b2 && !f2 || /** @type {Function} */
2113
- _2(t3 ? d2() : e3), e3)
2114
- ) : d2();
2112
+ (l2 && t3 && !b2 && !d2 || /** @type {Function} */
2113
+ _2(t3 ? f2() : e3), e3)
2114
+ ) : f2();
2115
2115
  };
2116
2116
  }
2117
2117
  var y2 = false, $2 = /* @__PURE__ */ mutable_source(i2), w2 = /* @__PURE__ */ derived(() => {
2118
- var e3 = d2(), t3 = get$1($2);
2118
+ var e3 = f2(), t3 = get$1($2);
2119
2119
  return y2 ? (y2 = false, t3) : $2.v = e3;
2120
2120
  });
2121
2121
  return a2 || (w2.equals = safe_equals), function(e3, t3) {
@@ -2123,13 +2123,13 @@ function prop(e2, t2, n2, o2) {
2123
2123
  const n3 = t3 ? get$1(w2) : l2 && c2 ? proxy(e3) : e3;
2124
2124
  return w2.equals(n3) || (y2 = true, set($2, n3), // To ensure the fallback value is consistent when used with proxies, we
2125
2125
  // update the local fallback_value, but only if the fallback is actively used
2126
- h2 && void 0 !== v2 && (v2 = n3), untrack(() => get$1(w2))), e3;
2126
+ h2 && void 0 !== g2 && (g2 = n3), untrack(() => get$1(w2))), e3;
2127
2127
  }
2128
2128
  return get$1(w2);
2129
2129
  };
2130
2130
  }
2131
2131
  function onMount(e2) {
2132
- null === T && lifecycle_outside_component(), S && null !== T.l ? (
2132
+ null === I && lifecycle_outside_component(), S && null !== I.l ? (
2133
2133
  /**
2134
2134
  * Legacy-mode: Init callbacks object for onMount/beforeUpdate/afterUpdate
2135
2135
  * @param {ComponentContext} context
@@ -2144,7 +2144,7 @@ function onMount(e2) {
2144
2144
  b: [],
2145
2145
  m: []
2146
2146
  });
2147
- }(T).m.push(e2)
2147
+ }(I).m.push(e2)
2148
2148
  ) : user_effect(() => {
2149
2149
  const t2 = untrack(e2);
2150
2150
  if ("function" == typeof t2) return t2;
@@ -2191,21 +2191,21 @@ function Icon$1(e2, t2) {
2191
2191
  push(t2, false);
2192
2192
  let i2 = prop(t2, "name", 8, void 0), s2 = 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, () => []);
2193
2193
  init();
2194
- var f2 = xe();
2195
- let d2;
2196
- var p2 = child(f2);
2194
+ var d2 = xe();
2195
+ let f2;
2196
+ var p2 = child(d2);
2197
2197
  each(p2, 1, u2, index, (e3, t3) => {
2198
2198
  var n3 = comment();
2199
2199
  !function element(e4, t4, n4, o3, i3, s3) {
2200
- var a3, l3, c3, u3 = null, f3 = (
2200
+ var a3, l3, c3, u3 = null, d3 = (
2201
2201
  /** @type {TemplateNode} */
2202
2202
  e4
2203
- ), d3 = ce;
2203
+ ), f3 = ce;
2204
2204
  block(() => {
2205
2205
  const e5 = t4() || null;
2206
2206
  if (e5 !== a3) {
2207
2207
  var n5 = ce;
2208
- set_current_each_item(d3), c3 && (null === e5 ? (
2208
+ set_current_each_item(f3), c3 && (null === e5 ? (
2209
2209
  // start outro
2210
2210
  pause_effect(c3, () => {
2211
2211
  c3 = null, l3 = null;
@@ -2224,7 +2224,7 @@ function Icon$1(e2, t2) {
2224
2224
  );
2225
2225
  o3(u3, t5);
2226
2226
  }
2227
- H.nodes_end = u3, f3.before(u3);
2227
+ H.nodes_end = u3, d3.before(u3);
2228
2228
  })), (a3 = e5) && (l3 = a3), set_should_intro(true), set_current_each_item(n5);
2229
2229
  }
2230
2230
  }, $);
@@ -2234,7 +2234,7 @@ function Icon$1(e2, t2) {
2234
2234
  ...get$1(t3)[1]
2235
2235
  }));
2236
2236
  }), append(e3, n3);
2237
- }), slot(sibling(p2), t2, "default", {}, null), template_effect((e3, t3) => d2 = set_attributes(f2, d2, {
2237
+ }), slot(sibling(p2), t2, "default", {}, null), template_effect((e3, t3) => f2 = set_attributes(d2, f2, {
2238
2238
  ...we,
2239
2239
  ...o2,
2240
2240
  width: a2(),
@@ -2242,7 +2242,7 @@ function Icon$1(e2, t2) {
2242
2242
  stroke: s2(),
2243
2243
  "stroke-width": e3,
2244
2244
  class: t3
2245
- }), [() => c2() ? 24 * Number(l2()) / Number(a2()) : l2(), () => ((...e3) => e3.filter((e4, t3, n3) => Boolean(e4) && n3.indexOf(e4) === t3).join(" "))("lucide-icon", "lucide", i2() ? `lucide-${i2()}` : "", n2.class)], derived_safe_equal), append(e2, f2), pop();
2245
+ }), [() => c2() ? 24 * Number(l2()) / Number(a2()) : l2(), () => ((...e3) => e3.filter((e4, t3, n3) => Boolean(e4) && n3.indexOf(e4) === t3).join(" "))("lucide-icon", "lucide", i2() ? `lucide-${i2()}` : "", n2.class)], derived_safe_equal), append(e2, d2), pop();
2246
2246
  }
2247
2247
  function Loader_circle(e2, t2) {
2248
2248
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
@@ -2264,7 +2264,7 @@ function Loader_circle(e2, t2) {
2264
2264
  var on_click$2 = (e2, t2) => {
2265
2265
  var _a2;
2266
2266
  (_a2 = t2.onClick) == null ? void 0 : _a2.call(t2);
2267
- }, ke = /* @__PURE__ */ template('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="absolute bottom-0 left-0 h-full w-0 bg-black transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');
2267
+ }, ke = /* @__PURE__ */ template('<button id="floating playlight button" aria-label="Open Playlight Discovery"><p class="z-2 flex items-center overflow-hidden svelte-1j97rta"><!> <span class="mr-0.25 inline-block font-bold svelte-1j97rta">More Games</span></p> <div class="absolute bottom-0 left-0 h-full w-0 bg-background transition-all duration-300 group-hover:w-full svelte-1j97rta"></div></button>');
2268
2268
  function FloatingButton(e2, t2) {
2269
2269
  push(t2, true);
2270
2270
  let n2 = prop(t2, "position", 3, "bottom-right"), o2 = prop(t2, "visible", 3, true);
@@ -2316,7 +2316,7 @@ function FloatingButton(e2, t2) {
2316
2316
  size: 26,
2317
2317
  strokeWidth: 1.75,
2318
2318
  class: "z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"
2319
- }), template_effect(() => set_class(o3, 1, `fixed ${("bottom-left" == n2() ? "bottom-4 left-4" : "bottom-right" == n2() ? "right-4 bottom-4" : "") ?? ""} group children-text-white z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold text-black uppercase shadow-lg transition-all hover:scale-105`, "svelte-1j97rta")), append(e3, o3);
2319
+ }), template_effect(() => set_class(o3, 1, `fixed ${("bottom-left" == n2() ? "bottom-4 left-4" : "bottom-right" == n2() ? "right-4 bottom-4" : "") ?? ""} group children-text-white z-99990 flex cursor-pointer gap-2 rounded-md bg-white p-3 font-bold text-background uppercase shadow-lg transition-all hover:scale-105`, "svelte-1j97rta")), append(e3, o3);
2320
2320
  };
2321
2321
  if_block(s2, (e3) => {
2322
2322
  o2() && e3(consequent);
@@ -2338,51 +2338,51 @@ function split_css_unit(e2) {
2338
2338
  ];
2339
2339
  }
2340
2340
  function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_in_out, amount: i2 = 5, opacity: s2 = 0 } = {}) {
2341
- const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - s2), [f2, d2] = split_css_unit(i2);
2341
+ const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - s2), [d2, f2] = split_css_unit(i2);
2342
2342
  return {
2343
2343
  delay: t2,
2344
2344
  duration: n2,
2345
2345
  easing: o2,
2346
- css: (e3, t3) => `opacity: ${l2 - u2 * t3}; filter: ${c2} blur(${t3 * f2}${d2});`
2346
+ css: (e3, t3) => `opacity: ${l2 - u2 * t3}; filter: ${c2} blur(${t3 * d2}${f2});`
2347
2347
  };
2348
2348
  }
2349
2349
  function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, x: i2 = 0, y: s2 = 0, opacity: a2 = 0 } = {}) {
2350
- const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, f2 = c2 * (1 - a2), [d2, p2] = split_css_unit(i2), [_2, v2] = split_css_unit(s2);
2350
+ const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, d2 = c2 * (1 - a2), [f2, p2] = split_css_unit(i2), [_2, g2] = split_css_unit(s2);
2351
2351
  return {
2352
2352
  delay: t2,
2353
2353
  duration: n2,
2354
2354
  easing: o2,
2355
2355
  css: (e3, t3) => `
2356
- transform: ${u2} translate(${(1 - e3) * d2}${p2}, ${(1 - e3) * _2}${v2});
2357
- opacity: ${c2 - f2 * t3}`
2356
+ transform: ${u2} translate(${(1 - e3) * f2}${p2}, ${(1 - e3) * _2}${g2});
2357
+ opacity: ${c2 - d2 * t3}`
2358
2358
  };
2359
2359
  }
2360
2360
  function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, axis: i2 = "y" } = {}) {
2361
- const s2 = getComputedStyle(e2), a2 = +s2.opacity, l2 = "y" === i2 ? "height" : "width", c2 = parseFloat(s2[l2]), u2 = "y" === i2 ? ["top", "bottom"] : ["left", "right"], f2 = u2.map((e3) => (
2361
+ const s2 = getComputedStyle(e2), a2 = +s2.opacity, l2 = "y" === i2 ? "height" : "width", c2 = parseFloat(s2[l2]), u2 = "y" === i2 ? ["top", "bottom"] : ["left", "right"], d2 = u2.map((e3) => (
2362
2362
  /** @type {'Left' | 'Right' | 'Top' | 'Bottom'} */
2363
2363
  `${e3[0].toUpperCase()}${e3.slice(1)}`
2364
- )), d2 = parseFloat(s2[`padding${f2[0]}`]), p2 = parseFloat(s2[`padding${f2[1]}`]), _2 = parseFloat(s2[`margin${f2[0]}`]), v2 = parseFloat(s2[`margin${f2[1]}`]), g2 = parseFloat(s2[`border${f2[0]}Width`]), h2 = parseFloat(s2[`border${f2[1]}Width`]);
2364
+ )), f2 = parseFloat(s2[`padding${d2[0]}`]), p2 = parseFloat(s2[`padding${d2[1]}`]), _2 = parseFloat(s2[`margin${d2[0]}`]), g2 = parseFloat(s2[`margin${d2[1]}`]), v2 = parseFloat(s2[`border${d2[0]}Width`]), h2 = parseFloat(s2[`border${d2[1]}Width`]);
2365
2365
  return {
2366
2366
  delay: t2,
2367
2367
  duration: n2,
2368
2368
  easing: o2,
2369
- css: (e3) => `overflow: hidden;opacity: ${Math.min(20 * e3, 1) * a2};${l2}: ${e3 * c2}px;padding-${u2[0]}: ${e3 * d2}px;padding-${u2[1]}: ${e3 * p2}px;margin-${u2[0]}: ${e3 * _2}px;margin-${u2[1]}: ${e3 * v2}px;border-${u2[0]}-width: ${e3 * g2}px;border-${u2[1]}-width: ${e3 * h2}px;min-${l2}: 0`
2369
+ 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 * _2}px;margin-${u2[1]}: ${e3 * g2}px;border-${u2[0]}-width: ${e3 * v2}px;border-${u2[1]}-width: ${e3 * h2}px;min-${l2}: 0`
2370
2370
  };
2371
2371
  }
2372
2372
  function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, start: i2 = 0, opacity: s2 = 0 } = {}) {
2373
- const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - i2, f2 = l2 * (1 - s2);
2373
+ const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - i2, d2 = l2 * (1 - s2);
2374
2374
  return {
2375
2375
  delay: t2,
2376
2376
  duration: n2,
2377
2377
  easing: o2,
2378
2378
  css: (e3, t3) => `
2379
2379
  transform: ${c2} scale(${1 - u2 * t3});
2380
- opacity: ${l2 - f2 * t3}
2380
+ opacity: ${l2 - d2 * t3}
2381
2381
  `
2382
2382
  };
2383
2383
  }
2384
2384
  delegate(["click"]);
2385
- var Ce = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><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>'), Se = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><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>'), Me = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><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>'), Te = /* @__PURE__ */ ns_template('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" 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>');
2385
+ var Ce = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><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>'), Se = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><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>'), Me = /* @__PURE__ */ ns_template('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20"><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>'), Ie = /* @__PURE__ */ ns_template('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" 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>');
2386
2386
  function Icon(e2, t2) {
2387
2387
  let n2 = prop(t2, "type", 8, "success");
2388
2388
  var o2 = comment(), i2 = first_child(o2), consequent = (e3) => {
@@ -2395,7 +2395,7 @@ function Icon(e2, t2) {
2395
2395
  append(e5, Me());
2396
2396
  }, alternate_2 = (e5, t5) => {
2397
2397
  var consequent_3 = (e6) => {
2398
- append(e6, Te());
2398
+ append(e6, Ie());
2399
2399
  }, alternate_3 = (e6) => {
2400
2400
  };
2401
2401
  if_block(e5, (e6) => {
@@ -2414,15 +2414,15 @@ function Icon(e2, t2) {
2414
2414
  "success" === n2() ? e3(consequent) : e3(alternate, false);
2415
2415
  }), append(e2, o2);
2416
2416
  }
2417
- var qe = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), Ie = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
2417
+ var Te = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), qe = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
2418
2418
  function Loader(e2, t2) {
2419
2419
  push(t2, false);
2420
2420
  let n2 = prop(t2, "visible", 8);
2421
2421
  const o2 = Array(12).fill(0);
2422
2422
  init();
2423
- var i2 = Ie();
2423
+ var i2 = qe();
2424
2424
  each(child(i2), 5, () => o2, index, (e3, t3) => {
2425
- append(e3, qe());
2425
+ append(e3, Te());
2426
2426
  }), template_effect(() => set_attribute(i2, "data-visible", n2())), append(e2, i2), pop();
2427
2427
  }
2428
2428
  function cn(...e2) {
@@ -2441,15 +2441,15 @@ function clientWritable(e2) {
2441
2441
  }
2442
2442
  };
2443
2443
  }
2444
- let Oe = 0;
2445
- const Ee = function createToastState() {
2444
+ let De = 0;
2445
+ const Oe = function createToastState() {
2446
2446
  const e2 = clientWritable([]), t2 = clientWritable([]);
2447
2447
  function addToast(t3) {
2448
2448
  e2.update((e3) => [t3, ...e3]);
2449
2449
  }
2450
2450
  function create(t3) {
2451
2451
  var _a2;
2452
- const { message: n2, ...o2 } = t3, i2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a2 = t3.id) == null ? void 0 : _a2.length) > 0 ? t3.id : Oe++, s2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === i2);
2452
+ const { message: n2, ...o2 } = t3, i2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a2 = t3.id) == null ? void 0 : _a2.length) > 0 ? t3.id : De++, s2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === i2);
2453
2453
  return l2 ? e2.update((e3) => e3.map((e4) => e4.id === i2 ? {
2454
2454
  ...e4,
2455
2455
  ...t3,
@@ -2586,7 +2586,7 @@ const Ee = function createToastState() {
2586
2586
  }), n2;
2587
2587
  },
2588
2588
  custom: function custom(e3, t3) {
2589
- const n2 = (t3 == null ? void 0 : t3.id) || Oe++;
2589
+ const n2 = (t3 == null ? void 0 : t3.id) || De++;
2590
2590
  return create({
2591
2591
  component: e3,
2592
2592
  id: n2,
@@ -2608,26 +2608,26 @@ const Ee = function createToastState() {
2608
2608
  };
2609
2609
  }();
2610
2610
  const je = function toastFunction(e2, t2) {
2611
- return Ee.create({
2611
+ return Oe.create({
2612
2612
  message: e2,
2613
2613
  ...t2
2614
2614
  });
2615
- }, Ne = Object.assign(je, {
2616
- success: Ee.success,
2617
- info: Ee.info,
2618
- warning: Ee.warning,
2619
- error: Ee.error,
2620
- custom: Ee.custom,
2621
- message: Ee.message,
2622
- promise: Ee.promise,
2623
- dismiss: Ee.dismiss,
2624
- loading: Ee.loading
2615
+ }, Ee = Object.assign(je, {
2616
+ success: Oe.success,
2617
+ info: Oe.info,
2618
+ warning: Oe.warning,
2619
+ error: Oe.error,
2620
+ custom: Oe.custom,
2621
+ message: Oe.message,
2622
+ promise: Oe.promise,
2623
+ dismiss: Oe.dismiss,
2624
+ loading: Oe.loading
2625
2625
  });
2626
- var Be = /* @__PURE__ */ template('<button aria-label="Close toast" data-close-button=""><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'), De = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), Ae = /* @__PURE__ */ template('<div data-title=""><!></div>'), We = /* @__PURE__ */ template('<div data-description=""><!></div>'), ze = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), Le = /* @__PURE__ */ template('<button data-button=""> </button>'), Fe = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), Ge = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
2626
+ var Ne = /* @__PURE__ */ template('<button aria-label="Close toast" data-close-button=""><svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></button>'), Be = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), Ae = /* @__PURE__ */ template('<div data-title=""><!></div>'), We = /* @__PURE__ */ template('<div data-description=""><!></div>'), ze = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), Le = /* @__PURE__ */ template('<button data-button=""> </button>'), Ge = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), Fe = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
2627
2627
  function Toast(e2, t2) {
2628
2628
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
2629
2629
  push(t2, false);
2630
- const [o2, i2] = setup_stores(), $heights = () => store_get(y2, "$heights", o2), $effect = () => store_get(get$1(Q2), "$effect", o2), s2 = mutable_state(void 0, true), a2 = mutable_state(void 0, true), l2 = mutable_state(void 0, true), c2 = mutable_state(void 0, true), u2 = mutable_state(void 0, true), f2 = mutable_state(void 0, true), d2 = mutable_state(void 0, true), p2 = mutable_state(void 0, true), _2 = mutable_state(void 0, true), v2 = mutable_state(void 0, true), g2 = mutable_state(void 0, true), h2 = mutable_state(void 0, true), m2 = {
2630
+ const [o2, i2] = setup_stores(), $heights = () => store_get(y2, "$heights", o2), $effect = () => store_get(get$1(Q2), "$effect", o2), s2 = mutable_state(void 0, true), a2 = mutable_state(void 0, true), l2 = mutable_state(void 0, true), c2 = mutable_state(void 0, true), u2 = mutable_state(void 0, true), d2 = mutable_state(void 0, true), f2 = mutable_state(void 0, true), p2 = mutable_state(void 0, true), _2 = mutable_state(void 0, true), g2 = mutable_state(void 0, true), v2 = mutable_state(void 0, true), h2 = mutable_state(void 0, true), m2 = {
2631
2631
  toast: "",
2632
2632
  title: "",
2633
2633
  description: "",
@@ -2642,21 +2642,21 @@ function Toast(e2, t2) {
2642
2642
  default: "",
2643
2643
  info: "",
2644
2644
  loading: ""
2645
- }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = Ee;
2646
- let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), S2 = prop(t2, "expanded", 9), M2 = prop(t2, "invert", 13), T2 = prop(t2, "position", 9), q2 = prop(t2, "visibleToasts", 9), I2 = prop(t2, "expandByDefault", 9), P2 = prop(t2, "closeButton", 9), O2 = prop(t2, "interacting", 9), E2 = prop(t2, "cancelButtonStyle", 9, ""), j2 = prop(t2, "actionButtonStyle", 9, ""), N2 = prop(t2, "duration", 9, 4e3), B2 = prop(t2, "descriptionClass", 9, ""), D2 = prop(t2, "classes", 29, () => ({})), A2 = prop(t2, "unstyled", 9, false), W2 = mutable_state(false, true), z2 = mutable_state(false, true), L2 = mutable_state(false, true), F2 = mutable_state(false, true), G2 = mutable_state(0, true), H2 = mutable_state(0, true), R2 = mutable_state(void 0, true), V2 = mutable_state(0, true), K2 = 0, U2 = 0, Z2 = null;
2645
+ }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = Oe;
2646
+ let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), S2 = prop(t2, "expanded", 9), M2 = prop(t2, "invert", 13), I2 = prop(t2, "position", 9), T2 = prop(t2, "visibleToasts", 9), q2 = prop(t2, "expandByDefault", 9), P2 = prop(t2, "closeButton", 9), D2 = prop(t2, "interacting", 9), O2 = prop(t2, "cancelButtonStyle", 9, ""), j2 = prop(t2, "actionButtonStyle", 9, ""), E2 = prop(t2, "duration", 9, 4e3), N2 = prop(t2, "descriptionClass", 9, ""), B2 = prop(t2, "classes", 29, () => ({})), A2 = prop(t2, "unstyled", 9, false), W2 = mutable_state(false, true), z2 = mutable_state(false, true), L2 = mutable_state(false, true), G2 = mutable_state(false, true), F2 = mutable_state(0, true), H2 = mutable_state(0, true), R2 = mutable_state(void 0, true), V2 = mutable_state(0, true), K2 = 0, U2 = 0, Y2 = null;
2647
2647
  function deleteToast() {
2648
2648
  set(z2, true), // Save the offset for the exit swipe animation
2649
- set(G2, get$1(V2)), $2(k2().id), setTimeout(() => {
2649
+ set(F2, get$1(V2)), $2(k2().id), setTimeout(() => {
2650
2650
  x2(k2().id);
2651
2651
  }, 200);
2652
2652
  }
2653
- let J2 = mutable_state(void 0, true), Y2 = mutable_state(k2().duration || N2() || 4e3, true);
2653
+ let Z2 = mutable_state(void 0, true), J2 = mutable_state(k2().duration || E2() || 4e3, true);
2654
2654
  function startTimer() {
2655
2655
  K2 = (/* @__PURE__ */ new Date()).getTime(), // Let the toast know it has started
2656
- set(J2, setTimeout(() => {
2656
+ set(Z2, setTimeout(() => {
2657
2657
  var _a2, _b2;
2658
2658
  (_b2 = (_a2 = k2()).onAutoClose) == null ? void 0 : _b2.call(_a2, k2()), deleteToast();
2659
- }, get$1(Y2)));
2659
+ }, get$1(J2)));
2660
2660
  }
2661
2661
  let Q2 = mutable_state(void 0, true);
2662
2662
  onMount(() => {
@@ -2666,15 +2666,15 @@ function Toast(e2, t2) {
2666
2666
  toastId: k2().id,
2667
2667
  height: e3
2668
2668
  }), () => $2(k2().id);
2669
- }), legacy_pre_effect(() => deep_read_state(D2()), () => {
2670
- D2({
2669
+ }), legacy_pre_effect(() => deep_read_state(B2()), () => {
2670
+ B2({
2671
2671
  ...m2,
2672
- ...D2()
2672
+ ...B2()
2673
2673
  });
2674
2674
  }), legacy_pre_effect(() => deep_read_state(C2()), () => {
2675
2675
  set(s2, 0 === C2());
2676
- }), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(q2())), () => {
2677
- set(a2, C2() + 1 <= q2());
2676
+ }), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(T2())), () => {
2677
+ set(a2, C2() + 1 <= T2());
2678
2678
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2679
2679
  set(l2, k2().title);
2680
2680
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
@@ -2682,30 +2682,30 @@ function Toast(e2, t2) {
2682
2682
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2683
2683
  set(u2, k2().type);
2684
2684
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2685
- set(f2, k2().class || "");
2685
+ set(d2, k2().class || "");
2686
2686
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2687
- set(d2, k2().descriptionClass || "");
2687
+ set(f2, k2().descriptionClass || "");
2688
2688
  }), legacy_pre_effect(() => ($heights(), deep_read_state(k2())), () => {
2689
2689
  set(p2, $heights().findIndex((e3) => e3.toastId === k2().id) || 0);
2690
- }), legacy_pre_effect(() => deep_read_state(T2()), () => {
2691
- set(_2, T2().split("-"));
2690
+ }), legacy_pre_effect(() => deep_read_state(I2()), () => {
2691
+ set(_2, I2().split("-"));
2692
2692
  }), legacy_pre_effect(() => ($heights(), get$1(p2)), () => {
2693
- set(v2, $heights().reduce((e3, t3, n3) => (
2693
+ set(g2, $heights().reduce((e3, t3, n3) => (
2694
2694
  // Calculate offset up untill current toast
2695
2695
  n3 >= get$1(p2) ? e3 : e3 + t3.height
2696
2696
  ), 0));
2697
2697
  }), legacy_pre_effect(() => (deep_read_state(M2()), deep_read_state(k2())), () => {
2698
2698
  M2(k2().invert || M2());
2699
2699
  }), legacy_pre_effect(() => get$1(u2), () => {
2700
- set(g2, "loading" === get$1(u2));
2701
- }), legacy_pre_effect(() => (get$1(p2), get$1(v2)), () => {
2702
- set(V2, Math.round(14 * get$1(p2) + get$1(v2)));
2700
+ set(v2, "loading" === get$1(u2));
2701
+ }), legacy_pre_effect(() => (get$1(p2), get$1(g2)), () => {
2702
+ set(V2, Math.round(14 * get$1(p2) + get$1(g2)));
2703
2703
  }), legacy_pre_effect(() => (get$1(l2), get$1(c2)), () => {
2704
2704
  get$1(l2), get$1(c2), // Listen to height changes
2705
2705
  async function updateHeights() {
2706
2706
  if (!get$1(W2)) return;
2707
2707
  let e3;
2708
- await tick(), e3 = S2() || I2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2708
+ await tick(), e3 = S2() || q2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2709
2709
  const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, o3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
2710
2710
  let i3;
2711
2711
  get$1(R2).style.removeProperty("height"), // Use scaledRectHeight as it's more precise
@@ -2714,20 +2714,20 @@ function Toast(e2, t2) {
2714
2714
  height: i3
2715
2715
  });
2716
2716
  }();
2717
- }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(J2), deep_read_state(N2())), () => {
2717
+ }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(Z2), deep_read_state(E2())), () => {
2718
2718
  k2().updated && // if the toast has been updated after the initial render,
2719
2719
  // we want to reset the timer and set the remaining time to the
2720
2720
  // new duration
2721
- (clearTimeout(get$1(J2)), set(Y2, k2().duration || N2() || 4e3), startTimer());
2721
+ (clearTimeout(get$1(Z2)), set(J2, k2().duration || E2() || 4e3), startTimer());
2722
2722
  }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(u2)), () => {
2723
2723
  set(h2, k2().promise && "loading" === get$1(u2) || k2().duration === Number.POSITIVE_INFINITY);
2724
- }), legacy_pre_effect(() => (get$1(h2), deep_read_state(S2()), deep_read_state(O2()), get$1(J2)), () => {
2724
+ }), legacy_pre_effect(() => (get$1(h2), deep_read_state(S2()), deep_read_state(D2()), get$1(Z2)), () => {
2725
2725
  var e3;
2726
2726
  !function store_unsub(e4, t3, n3) {
2727
2727
  let o3 = n3[t3];
2728
2728
  return o3 && o3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
2729
2729
  (o3.unsubscribe(), o3.unsubscribe = noop), e4;
2730
- }(set(Q2, (e3 = () => (get$1(h2) || (S2() || O2() ? (
2730
+ }(set(Q2, (e3 = () => (get$1(h2) || (S2() || D2() ? (
2731
2731
  // If toast's duration changes, it will be out of sync with the
2732
2732
  // remainingAtTimeout, so we know we need to restart the timer
2733
2733
  // with the new duration
@@ -2735,11 +2735,11 @@ function Toast(e2, t2) {
2735
2735
  function pauseTimer() {
2736
2736
  if (U2 < K2) {
2737
2737
  const e4 = (/* @__PURE__ */ new Date()).getTime() - K2;
2738
- set(Y2, get$1(Y2) - e4);
2738
+ set(J2, get$1(J2) - e4);
2739
2739
  }
2740
2740
  U2 = (/* @__PURE__ */ new Date()).getTime();
2741
2741
  }()
2742
- ) : startTimer()), () => clearTimeout(get$1(J2))), {
2742
+ ) : startTimer()), () => clearTimeout(get$1(Z2))), {
2743
2743
  subscribe: e3
2744
2744
  })), "$effect", o2);
2745
2745
  }), legacy_pre_effect(() => $effect(), () => {
@@ -2747,19 +2747,19 @@ function Toast(e2, t2) {
2747
2747
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2748
2748
  k2().delete && deleteToast();
2749
2749
  }), legacy_pre_effect_reset(), init(true);
2750
- var ee2 = Ge();
2750
+ var ee2 = Fe();
2751
2751
  let te2;
2752
2752
  set_attribute(ee2, "tabindex", 0);
2753
2753
  var ne2 = child(ee2), consequent = (e3) => {
2754
- var t3 = Be();
2754
+ var t3 = Ne();
2755
2755
  template_effect((e4) => {
2756
- set_attribute(t3, "data-disabled", get$1(g2)), set_class(t3, 1, e4);
2756
+ set_attribute(t3, "data-disabled", get$1(v2)), set_class(t3, 1, e4);
2757
2757
  }, [() => {
2758
2758
  var _a2, _b2, _c2;
2759
- return clsx(cn((_a2 = D2()) == null ? void 0 : _a2.closeButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.closeButton));
2759
+ return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.closeButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.closeButton));
2760
2760
  }], derived_safe_equal), event("click", t3, function(...e4) {
2761
2761
  var _a2;
2762
- (_a2 = get$1(g2) ? void 0 : () => {
2762
+ (_a2 = get$1(v2) ? void 0 : () => {
2763
2763
  var _a3, _b2;
2764
2764
  deleteToast(), (_b2 = (_a3 = k2()).onDismiss) == null ? void 0 : _b2.call(_a3, k2());
2765
2765
  }) == null ? void 0 : _a2.apply(this, e4);
@@ -2778,8 +2778,8 @@ function Toast(e2, t2) {
2778
2778
  }));
2779
2779
  }), append(e3, t3);
2780
2780
  }, alternate = (e3) => {
2781
- var n3 = Fe(), o3 = first_child(n3), consequent_8 = (e4) => {
2782
- var n4 = De(), o4 = child(n4), consequent_2 = (e5) => {
2781
+ var n3 = Ge(), o3 = first_child(n3), consequent_8 = (e4) => {
2782
+ var n4 = Be(), o4 = child(n4), consequent_2 = (e5) => {
2783
2783
  var n5 = comment();
2784
2784
  slot(first_child(n5), t2, "loading-icon", {}, null), append(e5, n5);
2785
2785
  };
@@ -2845,7 +2845,7 @@ function Toast(e2, t2) {
2845
2845
  "string" != typeof k2().title ? e5(consequent_9) : e5(alternate_5, false);
2846
2846
  }), template_effect((e5) => set_class(t3, 1, e5), [() => {
2847
2847
  var _a2, _b2, _c2;
2848
- return clsx(cn((_a2 = D2()) == null ? void 0 : _a2.title, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.title));
2848
+ return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.title, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.title));
2849
2849
  }], derived_safe_equal), append(e4, t3);
2850
2850
  };
2851
2851
  if_block(s3, (e4) => {
@@ -2865,7 +2865,7 @@ function Toast(e2, t2) {
2865
2865
  "string" != typeof k2().description ? e5(consequent_11) : e5(alternate_6, false);
2866
2866
  }), template_effect((e5) => set_class(t3, 1, e5), [() => {
2867
2867
  var _a2, _b2;
2868
- return clsx(cn(B2(), get$1(d2), (_a2 = D2()) == null ? void 0 : _a2.description, (_b2 = k2().classes) == null ? void 0 : _b2.description));
2868
+ return clsx(cn(N2(), get$1(f2), (_a2 = B2()) == null ? void 0 : _a2.description, (_b2 = k2().classes) == null ? void 0 : _b2.description));
2869
2869
  }], derived_safe_equal), append(e4, t3);
2870
2870
  };
2871
2871
  if_block(a3, (e4) => {
@@ -2874,10 +2874,10 @@ function Toast(e2, t2) {
2874
2874
  var l3 = sibling(i3, 2), consequent_13 = (e4) => {
2875
2875
  var t3 = ze(), n4 = child(t3);
2876
2876
  template_effect((e5) => {
2877
- set_style(t3, E2()), set_class(t3, 1, e5), set_text(n4, k2().cancel.label);
2877
+ set_style(t3, O2()), set_class(t3, 1, e5), set_text(n4, k2().cancel.label);
2878
2878
  }, [() => {
2879
2879
  var _a2, _b2, _c2;
2880
- return clsx(cn((_a2 = D2()) == null ? void 0 : _a2.cancelButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.cancelButton));
2880
+ return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.cancelButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.cancelButton));
2881
2881
  }], derived_safe_equal), event("click", t3, () => {
2882
2882
  var _a2;
2883
2883
  deleteToast(), ((_a2 = k2().cancel) == null ? void 0 : _a2.onClick) && k2().cancel.onClick();
@@ -2892,7 +2892,7 @@ function Toast(e2, t2) {
2892
2892
  set_style(t3, j2()), set_class(t3, 1, e5), set_text(n4, k2().action.label);
2893
2893
  }, [() => {
2894
2894
  var _a2, _b2, _c2;
2895
- return clsx(cn((_a2 = D2()) == null ? void 0 : _a2.actionButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.actionButton));
2895
+ return clsx(cn((_a2 = B2()) == null ? void 0 : _a2.actionButton, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.actionButton));
2896
2896
  }], derived_safe_equal), event("click", t3, (e5) => {
2897
2897
  var _a2;
2898
2898
  (_a2 = k2().action) == null ? void 0 : _a2.onClick(e5), e5.defaultPrevented || deleteToast();
@@ -2906,37 +2906,37 @@ function Toast(e2, t2) {
2906
2906
  k2().component ? e3(consequent_1) : e3(alternate, false);
2907
2907
  }), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, i3) => {
2908
2908
  var _a2;
2909
- set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, e3), set_attribute(ee2, "data-styled", !(k2().component || ((_a2 = k2()) == null ? void 0 : _a2.unstyled) || A2())), set_attribute(ee2, "data-mounted", get$1(W2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(z2)), set_attribute(ee2, "data-visible", get$1(a2)), set_attribute(ee2, "data-y-position", get$1(_2)[0]), set_attribute(ee2, "data-x-position", get$1(_2)[1]), set_attribute(ee2, "data-index", C2()), set_attribute(ee2, "data-front", get$1(s2)), set_attribute(ee2, "data-swiping", get$1(L2)), set_attribute(ee2, "data-type", get$1(u2)), set_attribute(ee2, "data-invert", M2()), set_attribute(ee2, "data-swipe-out", get$1(F2)), set_attribute(ee2, "data-expanded", i3), te2 = set_style(ee2, `${n2.style} ${k2().style}`, te2, {
2909
+ set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, e3), set_attribute(ee2, "data-styled", !(k2().component || ((_a2 = k2()) == null ? void 0 : _a2.unstyled) || A2())), set_attribute(ee2, "data-mounted", get$1(W2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(z2)), set_attribute(ee2, "data-visible", get$1(a2)), set_attribute(ee2, "data-y-position", get$1(_2)[0]), set_attribute(ee2, "data-x-position", get$1(_2)[1]), set_attribute(ee2, "data-index", C2()), set_attribute(ee2, "data-front", get$1(s2)), set_attribute(ee2, "data-swiping", get$1(L2)), set_attribute(ee2, "data-type", get$1(u2)), set_attribute(ee2, "data-invert", M2()), set_attribute(ee2, "data-swipe-out", get$1(G2)), set_attribute(ee2, "data-expanded", i3), te2 = set_style(ee2, `${n2.style} ${k2().style}`, te2, {
2910
2910
  "--index": C2(),
2911
2911
  "--toasts-before": C2(),
2912
2912
  "--z-index": store_get(b2, "$toasts", o2).length - C2(),
2913
- "--offset": `${get$1(z2) ? get$1(G2) : get$1(V2)}px`,
2913
+ "--offset": `${get$1(z2) ? get$1(F2) : get$1(V2)}px`,
2914
2914
  "--initial-height": `${get$1(H2)}px`
2915
2915
  });
2916
2916
  }, [() => {
2917
2917
  var _a2, _b2, _c2, _d, _e2, _f;
2918
- return clsx(cn(n2.class, get$1(f2), (_a2 = D2()) == null ? void 0 : _a2.toast, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.toast, (_d = D2()) == null ? void 0 : _d[get$1(u2)], (_f = (_e2 = k2()) == null ? void 0 : _e2.classes) == null ? void 0 : _f[get$1(u2)]));
2919
- }, () => Boolean(k2().promise), () => Boolean(S2() || I2() && get$1(W2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
2920
- if (get$1(g2)) return;
2921
- set(G2, get$1(V2));
2918
+ return clsx(cn(n2.class, get$1(d2), (_a2 = B2()) == null ? void 0 : _a2.toast, (_c2 = (_b2 = k2()) == null ? void 0 : _b2.classes) == null ? void 0 : _c2.toast, (_d = B2()) == null ? void 0 : _d[get$1(u2)], (_f = (_e2 = k2()) == null ? void 0 : _e2.classes) == null ? void 0 : _f[get$1(u2)]));
2919
+ }, () => Boolean(k2().promise), () => Boolean(S2() || q2() && get$1(W2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
2920
+ if (get$1(v2)) return;
2921
+ set(F2, get$1(V2));
2922
2922
  const t3 = e3.target;
2923
- t3.setPointerCapture(e3.pointerId), "BUTTON" !== t3.tagName && (set(L2, true), Z2 = {
2923
+ t3.setPointerCapture(e3.pointerId), "BUTTON" !== t3.tagName && (set(L2, true), Y2 = {
2924
2924
  x: e3.clientX,
2925
2925
  y: e3.clientY
2926
2926
  });
2927
2927
  }), event("pointerup", ee2, function onPointerUp() {
2928
2928
  var _a2, _b2, _c2;
2929
- if (get$1(F2)) return;
2930
- Z2 = null;
2929
+ if (get$1(G2)) return;
2930
+ Y2 = null;
2931
2931
  const e3 = Number(((_a2 = get$1(R2)) == null ? void 0 : _a2.style.getPropertyValue("--swipe-amount").replace("px", "")) || 0);
2932
- if (Math.abs(e3) >= 20) return set(G2, get$1(V2)), (_c2 = (_b2 = k2()).onDismiss) == null ? void 0 : _c2.call(_b2, k2()), deleteToast(), void set(F2, true);
2932
+ if (Math.abs(e3) >= 20) return set(F2, get$1(V2)), (_c2 = (_b2 = k2()).onDismiss) == null ? void 0 : _c2.call(_b2, k2()), deleteToast(), void set(G2, true);
2933
2933
  get$1(R2).style.setProperty("--swipe-amount", "0px"), set(L2, false);
2934
2934
  }), event("pointermove", ee2, function onPointerMove(e3) {
2935
- if (!Z2) return;
2936
- const t3 = e3.clientY - Z2.y, n3 = e3.clientX - Z2.x, o3 = ("top" === get$1(_2)[0] ? Math.min : Math.max)(0, t3), i3 = "touch" === e3.pointerType ? 10 : 2;
2935
+ if (!Y2) return;
2936
+ const t3 = e3.clientY - Y2.y, n3 = e3.clientX - Y2.x, o3 = ("top" === get$1(_2)[0] ? Math.min : Math.max)(0, t3), i3 = "touch" === e3.pointerType ? 10 : 2;
2937
2937
  Math.abs(o3) > i3 ? get$1(R2).style.setProperty("--swipe-amount", `${t3}px`) : Math.abs(n3) > i3 && // User is swiping in wrong direction so we disable swipe gesture
2938
2938
  // for the current pointer down interaction
2939
- (Z2 = null);
2939
+ (Y2 = null);
2940
2940
  }), append(e2, ee2), pop(), i2();
2941
2941
  }
2942
2942
  var He = /* @__PURE__ */ template("<ol></ol>"), Re = /* @__PURE__ */ template('<section class="svelte-1fo5d1m"></section>');
@@ -2950,25 +2950,25 @@ function Toaster(e2, t2) {
2950
2950
  const e3 = document.documentElement.getAttribute("dir");
2951
2951
  return "auto" !== e3 && e3 ? e3 : window.getComputedStyle(document.documentElement).direction;
2952
2952
  }
2953
- let f2 = prop(t2, "invert", 8, false), d2 = prop(t2, "theme", 8, "light"), p2 = prop(t2, "position", 8, "bottom-right"), _2 = prop(t2, "hotkey", 24, () => ["altKey", "KeyT"]), v2 = prop(t2, "containerAriaLabel", 8, "Notifications"), g2 = prop(t2, "richColors", 8, false), h2 = prop(t2, "expand", 8, false), m2 = prop(t2, "duration", 8, 4e3), b2 = prop(t2, "visibleToasts", 8, 3), y2 = prop(t2, "closeButton", 8, false), $2 = prop(t2, "toastOptions", 24, () => ({})), w2 = prop(t2, "offset", 8, null), x2 = prop(t2, "dir", 24, getDocumentDirection);
2954
- const { toasts: k2, heights: C2, reset: S2 } = Ee;
2955
- let M2 = mutable_state(false), q2 = mutable_state(false), I2 = mutable_state(function getInitialTheme(e3) {
2953
+ let d2 = prop(t2, "invert", 8, false), f2 = prop(t2, "theme", 8, "light"), p2 = prop(t2, "position", 8, "bottom-right"), _2 = prop(t2, "hotkey", 24, () => ["altKey", "KeyT"]), g2 = prop(t2, "containerAriaLabel", 8, "Notifications"), v2 = prop(t2, "richColors", 8, false), h2 = prop(t2, "expand", 8, false), m2 = prop(t2, "duration", 8, 4e3), b2 = prop(t2, "visibleToasts", 8, 3), y2 = prop(t2, "closeButton", 8, false), $2 = prop(t2, "toastOptions", 24, () => ({})), w2 = prop(t2, "offset", 8, null), x2 = prop(t2, "dir", 24, getDocumentDirection);
2954
+ const { toasts: k2, heights: C2, reset: S2 } = Oe;
2955
+ let M2 = mutable_state(false), T2 = mutable_state(false), q2 = mutable_state(function getInitialTheme(e3) {
2956
2956
  return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? c2 : u2;
2957
- }(d2())), P2 = mutable_state(), O2 = null, E2 = false;
2957
+ }(f2())), P2 = mutable_state(), D2 = null, O2 = false;
2958
2958
  function handleBlur(e3) {
2959
- E2 && !e3.currentTarget.contains(e3.relatedTarget) && (E2 = false, O2 && (O2.focus({
2959
+ O2 && !e3.currentTarget.contains(e3.relatedTarget) && (O2 = false, D2 && (D2.focus({
2960
2960
  preventScroll: true
2961
- }), O2 = null));
2961
+ }), D2 = null));
2962
2962
  }
2963
2963
  function handleFocus(e3) {
2964
- E2 || (E2 = true, O2 = e3.relatedTarget);
2964
+ O2 || (O2 = true, D2 = e3.relatedTarget);
2965
2965
  }
2966
2966
  !function onDestroy(e3) {
2967
- null === T && lifecycle_outside_component(), onMount(() => () => untrack(e3));
2967
+ null === I && lifecycle_outside_component(), onMount(() => () => untrack(e3));
2968
2968
  }(() => {
2969
- get$1(P2) && O2 && (O2.focus({
2969
+ get$1(P2) && D2 && (D2.focus({
2970
2970
  preventScroll: true
2971
- }), O2 = null, E2 = false);
2971
+ }), D2 = null, O2 = false);
2972
2972
  }), onMount(() => {
2973
2973
  S2();
2974
2974
  const handleKeydown = (e3) => {
@@ -2996,18 +2996,18 @@ function Toaster(e2, t2) {
2996
2996
  } : t4);
2997
2997
  k2.set(t3);
2998
2998
  }
2999
- }), legacy_pre_effect(() => deep_read_state(d2()), () => {
3000
- if ("system" !== d2() && set(I2, d2()), "undefined" != typeof window) {
3001
- "system" === d2() && // check if current preference is dark
2999
+ }), legacy_pre_effect(() => deep_read_state(f2()), () => {
3000
+ if ("system" !== f2() && set(q2, f2()), "undefined" != typeof window) {
3001
+ "system" === f2() && // check if current preference is dark
3002
3002
  (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? (
3003
3003
  // it's currently dark
3004
- set(I2, c2)
3004
+ set(q2, c2)
3005
3005
  ) : (
3006
3006
  // it's not dark
3007
- set(I2, u2)
3007
+ set(q2, u2)
3008
3008
  ));
3009
3009
  const e3 = window.matchMedia("(prefers-color-scheme: dark)"), changeHandler = ({ matches: e4 }) => {
3010
- set(I2, e4 ? c2 : u2);
3010
+ set(q2, e4 ? c2 : u2);
3011
3011
  };
3012
3012
  "addEventListener" in e3 ? e3.addEventListener("change", changeHandler) : (
3013
3013
  // @ts-expect-error deprecated API
@@ -3015,7 +3015,7 @@ function Toaster(e2, t2) {
3015
3015
  );
3016
3016
  }
3017
3017
  }), legacy_pre_effect_reset(), init();
3018
- var j2 = comment(), N2 = first_child(j2), consequent = (e3) => {
3018
+ var j2 = comment(), E2 = first_child(j2), consequent = (e3) => {
3019
3019
  var s3 = Re();
3020
3020
  set_attribute(s3, "tabindex", -1), each(s3, 5, () => get$1(a2), index, (e4, s4, a3, l3) => {
3021
3021
  var c3 = He();
@@ -3033,7 +3033,7 @@ function Toaster(e2, t2) {
3033
3033
  }), u4 = /* @__PURE__ */ derived_safe_equal(() => {
3034
3034
  var _a2;
3035
3035
  return ((_a2 = $2()) == null ? void 0 : _a2.descriptionClass) || "";
3036
- }), d3 = /* @__PURE__ */ derived_safe_equal(() => $2().classes || {}), p3 = /* @__PURE__ */ derived_safe_equal(() => {
3036
+ }), f3 = /* @__PURE__ */ derived_safe_equal(() => $2().classes || {}), p3 = /* @__PURE__ */ derived_safe_equal(() => {
3037
3037
  var _a2;
3038
3038
  return ((_a2 = $2()) == null ? void 0 : _a2.duration) ?? m2();
3039
3039
  }), _3 = /* @__PURE__ */ derived_safe_equal(() => $2().unstyled || false);
@@ -3045,7 +3045,7 @@ function Toaster(e2, t2) {
3045
3045
  return get$1(n3);
3046
3046
  },
3047
3047
  get invert() {
3048
- return f2();
3048
+ return d2();
3049
3049
  },
3050
3050
  get visibleToasts() {
3051
3051
  return b2();
@@ -3054,7 +3054,7 @@ function Toaster(e2, t2) {
3054
3054
  return y2();
3055
3055
  },
3056
3056
  get interacting() {
3057
- return get$1(q2);
3057
+ return get$1(T2);
3058
3058
  },
3059
3059
  get position() {
3060
3060
  return get$1(s4);
@@ -3078,7 +3078,7 @@ function Toaster(e2, t2) {
3078
3078
  return get$1(u4);
3079
3079
  },
3080
3080
  get classes() {
3081
- return get$1(d3);
3081
+ return get$1(f3);
3082
3082
  },
3083
3083
  get duration() {
3084
3084
  return get$1(p3);
@@ -3138,14 +3138,14 @@ function Toaster(e2, t2) {
3138
3138
  tabIndex: -1,
3139
3139
  class: n2.class,
3140
3140
  "data-sonner-toaster": true,
3141
- "data-theme": get$1(I2),
3142
- "data-rich-colors": g2(),
3141
+ "data-theme": get$1(q2),
3142
+ "data-rich-colors": v2(),
3143
3143
  dir: e5,
3144
3144
  "data-y-position": t3,
3145
3145
  "data-x-position": s5,
3146
3146
  style: n2.style,
3147
3147
  ...o2,
3148
- [de]: {
3148
+ [fe]: {
3149
3149
  "--front-toast-height": `${(_a2 = store_get(C2, "$heights", i2)[0]) == null ? void 0 : _a2.height}px`,
3150
3150
  "--offset": "number" == typeof w2() ? `${w2()}px` : w2() || "32px",
3151
3151
  "--width": "356px",
@@ -3153,11 +3153,11 @@ function Toaster(e2, t2) {
3153
3153
  }
3154
3154
  }, "svelte-1fo5d1m"), c3.dir = c3.dir;
3155
3155
  }, [() => "auto" === x2() ? getDocumentDirection() : x2(), () => get$1(s4).split("-")[0], () => get$1(s4).split("-")[1]], derived_safe_equal), event("blur", c3, handleBlur), event("focus", c3, handleFocus), event("mouseenter", c3, () => set(M2, true)), event("mousemove", c3, () => set(M2, true)), event("mouseleave", c3, () => {
3156
- get$1(q2) || set(M2, false);
3157
- }), event("pointerdown", c3, () => set(q2, true)), event("pointerup", c3, () => set(q2, false)), append(e4, c3);
3158
- }), template_effect(() => set_attribute(s3, "aria-label", `${v2()} ${get$1(l2)}`)), append(e3, s3);
3156
+ get$1(T2) || set(M2, false);
3157
+ }), event("pointerdown", c3, () => set(T2, true)), event("pointerup", c3, () => set(T2, false)), append(e4, c3);
3158
+ }), template_effect(() => set_attribute(s3, "aria-label", `${g2()} ${get$1(l2)}`)), append(e3, s3);
3159
3159
  };
3160
- if_block(N2, (e3) => {
3160
+ if_block(E2, (e3) => {
3161
3161
  $toasts().length > 0 && e3(consequent);
3162
3162
  }), append(e2, j2), pop(), s2();
3163
3163
  }
@@ -3170,11 +3170,11 @@ function playGame(e2, t2) {
3170
3170
  var _a2;
3171
3171
  e2.stopPropagation(), e2.preventDefault(), (_a2 = t2.onClick) == null ? void 0 : _a2.call(t2, t2.game.id), window.open("https://" + t2.game.domain, "_blank", "noopener");
3172
3172
  }
3173
- var Ue = /* @__PURE__ */ template('<div><p class="text-primary font-bold uppercase">New</p></div>'), Ze = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), Je = /* @__PURE__ */ template("<button>Play</button>"), Xe = /* @__PURE__ */ template('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><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 class="fade-mask bg-background/75 pointer-events-none absolute right-0 bottom-0 left-0 h-8 svelte-rulnq9"></div></div>'), Ye = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <!> <img alt="game logo" loading="eager"></div>');
3173
+ var Ue = /* @__PURE__ */ template('<div><p class="text-primary font-bold uppercase">New</p></div>'), Ye = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), Ze = /* @__PURE__ */ template("<button>Play</button>"), Je = /* @__PURE__ */ template('<div class="bg-background/75 text-foreground absolute right-0 bottom-0 left-0 z-11 flex max-h-1/3 flex-col overflow-hidden backdrop-blur-xl"><div class="hide-scrollbar h-full w-full overflow-y-auto p-3 svelte-rulnq9"><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 class="fade-mask bg-background/75 pointer-events-none absolute right-0 bottom-0 left-0 h-8 svelte-rulnq9"></div></div>'), Xe = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <!> <img alt="game logo" loading="eager"></div>');
3174
3174
  function GameCard(e2, t2) {
3175
3175
  push(t2, true);
3176
3176
  const [n2, o2] = setup_stores();
3177
- let i2 = state(false), s2 = state(void 0), a2 = state(false), l2 = state(false), c2 = state(false), u2 = state(false), f2 = state(void 0);
3177
+ let i2 = state(false), s2 = state(void 0), a2 = state(false), l2 = state(false), c2 = state(false), u2 = state(false), d2 = state(void 0);
3178
3178
  function handleMouseEnter() {
3179
3179
  get$1(i2) || get$1(u2) || function playSound(e3, t3 = 1) {
3180
3180
  try {
@@ -3191,14 +3191,14 @@ function GameCard(e2, t2) {
3191
3191
  user_effect(() => {
3192
3192
  set(u2, "ontouchstart" in window);
3193
3193
  });
3194
- var d2 = Ye();
3195
- event("touchstart", q, () => set(u2, true), void 0, true), event("touchstart", I, function handleDocumentTouch(e3) {
3196
- get$1(f2) && !get$1(f2).contains(e3.target) && set(i2, false);
3197
- }, void 0, true), d2.__touchstart = handleMouseEnter, d2.__click = [handleClick, u2, t2];
3198
- var p2 = child(d2), consequent = (e3) => {
3194
+ var f2 = Xe();
3195
+ event("touchstart", T, () => set(u2, true), void 0, true), event("touchstart", q, function handleDocumentTouch(e3) {
3196
+ get$1(d2) && !get$1(d2).contains(e3.target) && set(i2, false);
3197
+ }, void 0, true), f2.__touchstart = handleMouseEnter, f2.__click = [handleClick, u2, t2];
3198
+ var p2 = child(f2), consequent = (e3) => {
3199
3199
  var t3 = Ue();
3200
3200
  let n3;
3201
- template_effect((e4) => n3 = set_class(t3, 1, "bg-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity", null, n3, e4), [() => ({
3201
+ template_effect((e4) => n3 = set_class(t3, 1, "bg-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity select-none", null, n3, e4), [() => ({
3202
3202
  "opacity-0": get$1(i2)
3203
3203
  })]), append(e3, t3);
3204
3204
  };
@@ -3210,7 +3210,7 @@ function GameCard(e2, t2) {
3210
3210
  })((_a2 = t2.game) == null ? void 0 : _a2.created_at) && e3(consequent);
3211
3211
  });
3212
3212
  var _2 = sibling(p2, 2), consequent_1 = (e3) => {
3213
- var n3 = Ze();
3213
+ var n3 = Ye();
3214
3214
  let o3;
3215
3215
  n3.muted = true, bind_this(n3, (e4) => set(s2, e4), () => get$1(s2)), template_effect((e4) => {
3216
3216
  set_attribute(n3, "src", t2.game.cover_video_url), o3 = set_class(n3, 1, "absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0", null, o3, e4);
@@ -3223,10 +3223,10 @@ function GameCard(e2, t2) {
3223
3223
  if_block(_2, (e3) => {
3224
3224
  t2.game.cover_video_url && e3(consequent_1);
3225
3225
  });
3226
- var v2 = sibling(_2, 2);
3227
- let g2;
3228
- var h2 = sibling(v2, 2), consequent_2 = (e3) => {
3229
- var n3 = Je();
3226
+ var g2 = sibling(_2, 2);
3227
+ let v2;
3228
+ var h2 = sibling(g2, 2), consequent_2 = (e3) => {
3229
+ var n3 = Ze();
3230
3230
  let o3;
3231
3231
  n3.__click = [playGame, t2], template_effect((e4) => o3 = set_class(n3, 1, "bg-foreground text-background hover:bg-foreground/90 absolute right-4 bottom-4 z-15 flex items-center justify-center rounded-sm px-3 py-1 font-bold uppercase transition-all", null, o3, e4), [() => ({
3232
3232
  "opacity-0": get$1(i2)
@@ -3236,7 +3236,7 @@ function GameCard(e2, t2) {
3236
3236
  get$1(u2) && e3(consequent_2);
3237
3237
  });
3238
3238
  var m2 = sibling(h2, 2), consequent_3 = (e3) => {
3239
- var n3 = Xe(), o3 = child(n3), i3 = child(o3), s3 = child(i3), a3 = child(sibling(i3, 2));
3239
+ var n3 = Je(), o3 = child(n3), i3 = child(o3), s3 = child(i3), a3 = child(sibling(i3, 2));
3240
3240
  template_effect(() => {
3241
3241
  set_text(s3, t2.game.name), set_text(a3, t2.game.description || "No description.");
3242
3242
  }), transition(3, n3, () => slide), append(e3, n3);
@@ -3246,17 +3246,17 @@ function GameCard(e2, t2) {
3246
3246
  });
3247
3247
  var b2 = sibling(m2, 2);
3248
3248
  let y2;
3249
- bind_this(d2, (e3) => set(f2, e3), () => get$1(f2)), template_effect((e3, n3) => {
3250
- set_class(d2, 1, `bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] min-h-92 cursor-pointer flex-col shadow-xl transition hover:outline-2 hover:brightness-105 lg:h-3/7 ${(get$1(l2) ? "" : "animate-pulse") ?? ""}`, "svelte-rulnq9"), set_attribute(v2, "src", t2.game.cover_image_url), g2 = set_class(v2, 1, "prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-rulnq9", null, g2, e3), set_attribute(b2, "src", t2.game.logo_url), y2 = set_class(b2, 1, "absolute right-0 -bottom-[18%] left-0 z-12 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 prevent-image-select svelte-rulnq9", null, y2, n3);
3249
+ bind_this(f2, (e3) => set(d2, e3), () => get$1(d2)), template_effect((e3, n3) => {
3250
+ set_class(f2, 1, `bg-background highlight-border group relative mt-5 mb-[calc(3dvh+1.5vw)] flex aspect-[2/3] h-1/2 max-h-[75vh] min-h-92 cursor-pointer flex-col shadow-xl transition hover:outline-2 lg:h-3/7 ${(get$1(l2) ? "" : "animate-pulse") ?? ""}`, "svelte-rulnq9"), set_attribute(g2, "src", t2.game.cover_image_url), v2 = set_class(g2, 1, "prevent-image-select absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-rulnq9", null, v2, e3), set_attribute(b2, "src", t2.game.logo_url), y2 = set_class(b2, 1, "absolute right-0 -bottom-[18%] left-0 z-12 mx-auto aspect-square w-1/5 rounded-full object-center opacity-0 transition group-hover:outline-2 prevent-image-select svelte-rulnq9", null, y2, n3);
3251
3251
  }, [() => ({
3252
3252
  "opacity-100": get$1(l2) && (!get$1(i2) || !get$1(a2) || !t2.game.cover_video_url)
3253
3253
  }), () => ({
3254
3254
  "opacity-100": get$1(c2)
3255
- })]), event("mouseenter", d2, handleMouseEnter), event("focus", d2, handleMouseEnter), event("mouseleave", d2, handleMouseLeave), event("blur", d2, handleMouseLeave), event("load", v2, () => {
3255
+ })]), event("mouseenter", f2, handleMouseEnter), event("focus", f2, handleMouseEnter), event("mouseleave", f2, handleMouseLeave), event("blur", f2, handleMouseLeave), event("load", g2, () => {
3256
3256
  set(l2, true);
3257
3257
  }), event("load", b2, () => {
3258
3258
  set(c2, true);
3259
- }), append(e2, d2), pop(), o2();
3259
+ }), append(e2, f2), pop(), o2();
3260
3260
  }
3261
3261
  delegate(["touchstart", "click"]);
3262
3262
  const Qe = new (_b = class {
@@ -3285,7 +3285,7 @@ const Qe = new (_b = class {
3285
3285
  }
3286
3286
  return await o2.json();
3287
3287
  } catch (e3) {
3288
- Ne.error("Error: " + e3), console.error("Playlight API error:", e3);
3288
+ Ee.error("Error: " + e3), console.error("Playlight API error:", e3);
3289
3289
  }
3290
3290
  }
3291
3291
  // Get all categories
@@ -3303,9 +3303,9 @@ const Qe = new (_b = class {
3303
3303
  async getCurrentGameInfo() {
3304
3304
  if (this.currentGame) return this.currentGame;
3305
3305
  let e2 = "/game-by-domain/" + __privateMethod(this, _PlayLightAPI_instances, e_fn).call(this);
3306
- return this.currentGame = await this.request(e2), {
3306
+ return this.currentGame = await this.request(e2), this.currentGame ? {
3307
3307
  ...this.currentGame
3308
- };
3308
+ } : void 0;
3309
3309
  }
3310
3310
  // Track discovery overlay open
3311
3311
  async trackOpen() {
@@ -3328,6 +3328,13 @@ const Qe = new (_b = class {
3328
3328
  })
3329
3329
  });
3330
3330
  }
3331
+ // Like or unlike a game (pass gameId and true to like, false to unlike)
3332
+ async toggleLike(e2, t2 = true) {
3333
+ const n2 = t2 ? "like" : "unlike", o2 = await this.request(`/rating/${e2}/${n2}`, {
3334
+ method: "POST"
3335
+ });
3336
+ return (o2 == null ? void 0 : o2.success) || false;
3337
+ }
3331
3338
  }, _PlayLightAPI_instances = new WeakSet(), e_fn = function() {
3332
3339
  const e2 = window.location.hostname;
3333
3340
  return e2.startsWith("www.") ? e2.substring(4) : e2;
@@ -3340,9 +3347,9 @@ function elasticOut(e2) {
3340
3347
  return Math.sin(-13 * (e2 + 1) * Math.PI / 2) * Math.pow(2, -10 * e2) + 1;
3341
3348
  }
3342
3349
  function flip(e2, { from: t2, to: n2 }, o2 = {}) {
3343
- var { delay: i2 = 0, duration: s2 = (e3) => 120 * Math.sqrt(e3), easing: a2 = cubicOut } = o2, l2 = getComputedStyle(e2), c2 = "none" === l2.transform ? "" : l2.transform, [u2, f2] = l2.transformOrigin.split(" ").map(parseFloat);
3344
- u2 /= e2.clientWidth, f2 /= e2.clientHeight;
3345
- var d2 = (
3350
+ var { delay: i2 = 0, duration: s2 = (e3) => 120 * Math.sqrt(e3), easing: a2 = cubicOut } = o2, l2 = getComputedStyle(e2), c2 = "none" === l2.transform ? "" : l2.transform, [u2, d2] = l2.transformOrigin.split(" ").map(parseFloat);
3351
+ u2 /= e2.clientWidth, d2 /= e2.clientHeight;
3352
+ var f2 = (
3346
3353
  /**
3347
3354
  * @param {Element} element
3348
3355
  */
@@ -3354,7 +3361,7 @@ function flip(e2, { from: t2, to: n2 }, o2 = {}) {
3354
3361
  t3.parentElement;
3355
3362
  return n3;
3356
3363
  }(e2)
3357
- ), p2 = e2.clientWidth / n2.width / d2, _2 = e2.clientHeight / n2.height / d2, v2 = t2.left + t2.width * u2, g2 = t2.top + t2.height * f2, h2 = n2.left + n2.width * u2, m2 = n2.top + n2.height * f2, b2 = (v2 - h2) * p2, y2 = (g2 - m2) * _2, $2 = t2.width / n2.width, w2 = t2.height / n2.height;
3364
+ ), p2 = e2.clientWidth / n2.width / f2, _2 = e2.clientHeight / n2.height / f2, g2 = t2.left + t2.width * u2, v2 = t2.top + t2.height * d2, h2 = n2.left + n2.width * u2, m2 = n2.top + n2.height * d2, b2 = (g2 - h2) * p2, y2 = (v2 - m2) * _2, $2 = t2.width / n2.width, w2 = t2.height / n2.height;
3358
3365
  return {
3359
3366
  delay: i2,
3360
3367
  duration: "function" == typeof s2 ? s2(Math.sqrt(b2 * b2 + y2 * y2)) : s2,
@@ -3366,22 +3373,22 @@ var on_click$1 = (e2, t2, n2) => {
3366
3373
  set(t2, ""), set(n2, !get$1(n2));
3367
3374
  }, et = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), tt = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, o2) => {
3368
3375
  t2(n2), set(o2, false);
3369
- }, nt = /* @__PURE__ */ template("<button> </button>"), rt = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), ot = /* @__PURE__ */ template('<div class="bg-background/85 fixed left-1/2 z-50 mt-24 w-30 w-full max-w-xs -translate-x-1/2 transform border shadow-lg backdrop-blur"><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>'), it = /* @__PURE__ */ template('<div class="flex w-full flex-col py-2"><h1 class="mb-0! py-2 text-center text-2xl font-bold text-white drop-shadow-xl lg: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="truncate max-w-[40vw] text-2xl font-bold text-black lg:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');
3376
+ }, nt = /* @__PURE__ */ template("<button> </button>"), rt = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), ot = /* @__PURE__ */ template('<div class="bg-background/85 fixed left-1/2 z-50 mt-24 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>'), it = /* @__PURE__ */ template('<div class="flex w-full flex-col py-2"><h1 class="mb-0! py-2 text-center text-2xl font-bold text-white drop-shadow-xl lg:text-4xl"><span> </span> <button class="group mx-1 inline-flex cursor-pointer items-center bg-white px-3 py-1 text-background transition hover:rotate-5"><span class="truncate max-w-[40vw] text-2xl font-bold text-background lg:text-4xl"> </span> <!></button> <span>games?</span></h1> <!></div>');
3370
3377
  function Navigation(e2, t2) {
3371
3378
  push(t2, true);
3372
3379
  let n2, o2 = prop(t2, "categories", 19, () => []), i2 = prop(t2, "selectedCategory", 15), s2 = state(false), a2 = /* @__PURE__ */ derived(() => i2() || (o2().length > 0 ? o2()[0] : "...")), l2 = state(""), c2 = state(void 0), u2 = /* @__PURE__ */ derived(() => get$1(l2) ? o2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : o2());
3373
- const f2 = ["Looking for", "Interested in", "Searching for", "Fancy some", "What about these"];
3374
- let d2, p2 = state(proxy(f2[0]));
3380
+ const d2 = ["Looking for", "Interested in", "Searching for", "Fancy some", "What about these"];
3381
+ let f2, p2 = state(proxy(d2[0]));
3375
3382
  onMount(function updateRandomPhrase() {
3376
3383
  let e3;
3377
- for (e3 = Math.floor(Math.random() * (f2 == null ? void 0 : f2.length)); e3 == d2; ) e3 = Math.floor(Math.random() * (f2 == null ? void 0 : f2.length));
3378
- set(p2, proxy(f2[e3])), d2 = e3;
3384
+ for (e3 = Math.floor(Math.random() * (d2 == null ? void 0 : d2.length)); e3 == f2; ) e3 = Math.floor(Math.random() * (d2 == null ? void 0 : d2.length));
3385
+ set(p2, proxy(d2[e3])), f2 = e3;
3379
3386
  });
3380
3387
  var _2 = it();
3381
- event("click", I, function handleClickOutside(e3) {
3388
+ event("click", q, function handleClickOutside(e3) {
3382
3389
  get$1(c2) && !get$1(c2).contains(e3.target) && n2 && !n2.contains(e3.target) && set(s2, false);
3383
3390
  });
3384
- var v2 = child(_2), g2 = child(v2), h2 = child(g2), m2 = sibling(g2, 2);
3391
+ var g2 = child(_2), v2 = child(g2), h2 = child(v2), m2 = sibling(v2, 2);
3385
3392
  m2.__click = [on_click$1, l2, s2];
3386
3393
  var b2 = child(m2), y2 = child(b2), $2 = sibling(b2, 2);
3387
3394
  const w2 = /* @__PURE__ */ derived(() => get$1(s2) ? "rotate-180 transform" : "");
@@ -3405,11 +3412,11 @@ function Navigation(e2, t2) {
3405
3412
  size: 25,
3406
3413
  strokeWidth: 3,
3407
3414
  get class() {
3408
- return `mt-1 ml-1 text-black ${get$1(w2) ?? ""} transition-transform duration-200`;
3415
+ return `mt-1 ml-1 text-background ${get$1(w2) ?? ""} transition-transform duration-200`;
3409
3416
  }
3410
3417
  }), bind_this(m2, (e3) => n2 = e3, () => n2);
3411
- var x2 = sibling(v2, 2), consequent_2 = (e3) => {
3412
- var t3 = ot(), n3 = child(t3), a3 = child(n3), f3 = child(a3);
3418
+ var x2 = sibling(g2, 2), consequent_2 = (e3) => {
3419
+ var t3 = ot(), n3 = child(t3), a3 = child(n3), d3 = child(a3);
3413
3420
  !function Search(e4, t4) {
3414
3421
  const n4 = legacy_rest_props(t4, ["children", "$$slots", "$$events", "$$legacy"]);
3415
3422
  Icon$1(e4, spread_props({
@@ -3430,12 +3437,12 @@ function Navigation(e2, t2) {
3430
3437
  default: true
3431
3438
  }
3432
3439
  }));
3433
- }(child(f3), {
3440
+ }(child(d3), {
3434
3441
  size: 18,
3435
3442
  strokeWidth: 2.5,
3436
3443
  class: "text-muted-foreground"
3437
3444
  });
3438
- var d3 = sibling(f3, 2), p3 = child(sibling(n3, 2)), consequent = (e4) => {
3445
+ var f3 = sibling(d3, 2), p3 = child(sibling(n3, 2)), consequent = (e4) => {
3439
3446
  append(e4, et());
3440
3447
  }, alternate = (e4, t4) => {
3441
3448
  var consequent_1 = (e5) => {
@@ -3447,7 +3454,7 @@ function Navigation(e2, t2) {
3447
3454
  n4.__click = [on_click_1$1, i2, t6, s2];
3448
3455
  var o3 = child(n4);
3449
3456
  template_effect(() => {
3450
- set_class(n4, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${(i2() != t6 ? "hover:bg-muted-foreground/20" : "") ?? ""} ${(i2() == t6 ? "bg-white text-black" : "text-white") ?? ""}`), set_text(o3, t6);
3457
+ set_class(n4, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${(i2() != t6 ? "hover:bg-muted-foreground/20" : "") ?? ""} ${(i2() == t6 ? "bg-white text-background" : "text-white") ?? ""}`), set_text(o3, t6);
3451
3458
  }), function animation(e7, t7, n5) {
3452
3459
  var o4, i3, s3, a4 = (
3453
3460
  /** @type {EachItem} */
@@ -3534,7 +3541,7 @@ function Navigation(e2, t2) {
3534
3541
  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
3535
3542
  (e4.value = n5 ?? "");
3536
3543
  });
3537
- }(d3, () => get$1(l2), (e4) => set(l2, e4)), transition(3, t3, () => fly, () => ({
3544
+ }(f3, () => get$1(l2), (e4) => set(l2, e4)), transition(3, t3, () => fly, () => ({
3538
3545
  y: -5,
3539
3546
  duration: 250
3540
3547
  })), append(e3, t3);
@@ -3551,61 +3558,167 @@ function Navigation(e2, t2) {
3551
3558
  })), append(e2, _2), pop();
3552
3559
  }
3553
3560
  delegate(["click"]);
3561
+ var st = /* @__PURE__ */ template('<div class="-mx-10 mt-5 flex h-1/2 max-h-[75vh] min-h-92 w-10 flex-col lg:h-3/7"><div class="flex h-full items-center justify-center"><div class="flex h-full w-full flex-col items-center justify-between py-6"><div class="bg-muted-foreground min-[1920px]:h-1/4 h-1/5 w-px"></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 min-[1920px]:h-1/4"></div></div></div></div>');
3562
+ function restore(e2, t2, n2, o2, i2, s2) {
3563
+ set(t2, false), set(n2, true), set(o2, 250), set(i2, 0), s2(250, 0, 250, (e3, t3, n3) => {
3564
+ set(o2, e3 * (1 - n3)), set(i2, proxy(n3));
3565
+ });
3566
+ }
3567
+ async function toggleLike(e2, t2, n2, o2) {
3568
+ var _a2;
3569
+ if (!((_a2 = t2.currentGame) == null ? void 0 : _a2.id)) return;
3570
+ const i2 = !get$1(n2);
3571
+ set(n2, !get$1(n2)), set(o2, get$1(o2) + (i2 ? 1 : -1)), // Save to localStorage
3572
+ i2 ? localStorage.setItem(`playlight_${t2.currentGame.id}_liked`, "true") : localStorage.removeItem(`playlight_${t2.currentGame.id}_liked`);
3573
+ await Qe.toggleLike(t2.currentGame.id, i2) || set(o2, get$1(o2) + (i2 ? -1 : 1));
3574
+ }
3575
+ var at = /* @__PURE__ */ template('<div class="bg-background/85 fixed bottom-4 left-4 z-2 flex touch-none flex-wrap items-center gap-1 border-1 p-4 text-start shadow-lg backdrop-blur-lg max-sm:right-4 sm:w-72" role="button" tabindex="0" aria-label="Currently playing game"><div class="w-full"><p class="text-muted-foreground text-sm select-none">Currently playing</p></div> <div class="flex w-full items-center gap-2"><img alt="current game logo"> <p class="text-foreground max-w-2/3 truncate text-lg font-bold"> </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>'), lt = /* @__PURE__ */ template('<button class="bg-background/85 hover:bg-background/95 fixed bottom-0 z-3 rounded-t-md border px-4 py-1.5 shadow-md backdrop-blur-sm transition max-sm:right-4 max-sm:left-4 sm:left-4 sm:w-72" aria-label="Show currently playing game"><div class="bg-muted-foreground mx-auto h-px w-16"></div></button>'), ct = /* @__PURE__ */ template("<!> <!>", 1);
3576
+ function CurrentGameDisplay(e2, t2) {
3577
+ var _a2;
3578
+ push(t2, true);
3579
+ let n2 = state(false), o2 = state(true), i2 = state(false), s2 = state(0), a2 = state(1), l2 = state(false), c2 = state(false), u2 = state(proxy(((_a2 = t2.currentGame) == null ? void 0 : _a2.likes) || 0)), d2 = 0;
3580
+ function startDrag(e3) {
3581
+ set(l2, true), d2 = e3.type.includes("touch") ? e3.touches[0].clientY : e3.clientY;
3582
+ }
3583
+ function drag(e3) {
3584
+ if (!get$1(l2)) return;
3585
+ const t3 = e3.type.includes("touch") ? e3.touches[0].clientY : e3.clientY, n3 = Math.max(0, t3 - d2);
3586
+ set(s2, proxy(n3)), set(a2, proxy(Math.max(0, 1 - n3 / 150))), n3 > 40 && function hide() {
3587
+ set(l2, false), animate2(get$1(s2), 250, 250, (e4, t4, n4) => {
3588
+ set(s2, e4 + (t4 - e4) * n4), set(a2, proxy(Math.max(0, 1 - 1.5 * n4))), 1 === n4 && (set(o2, false), set(i2, true));
3589
+ });
3590
+ }();
3591
+ }
3592
+ function endDrag() {
3593
+ get$1(l2) && (set(l2, false), get$1(s2) < 40 && function animateBack() {
3594
+ animate2(get$1(s2), 0, 250, (e3, t3, n3) => {
3595
+ set(s2, e3 * (1 - n3)), set(a2, 1);
3596
+ });
3597
+ }());
3598
+ }
3599
+ function animate2(e3, t3, n3, o3) {
3600
+ const i3 = Date.now();
3601
+ !function frame() {
3602
+ const s3 = Math.min((Date.now() - i3) / n3, 1);
3603
+ o3(e3, t3, s3), s3 < 1 && requestAnimationFrame(frame);
3604
+ }();
3605
+ }
3606
+ user_effect(() => {
3607
+ var _a3, _b2;
3608
+ ((_a3 = t2.currentGame) == null ? void 0 : _a3.id) && (set(c2, null !== localStorage.getItem(`playlight_${t2.currentGame.id}_liked`)), set(u2, proxy(((_b2 = t2.currentGame) == null ? void 0 : _b2.likes) || 0)));
3609
+ });
3610
+ var f2 = ct(), p2 = first_child(f2), consequent = (e3) => {
3611
+ var o3 = at();
3612
+ o3.__mousedown = startDrag, o3.__mousemove = drag, o3.__mouseup = endDrag, o3.__touchstart = startDrag, o3.__touchmove = drag, o3.__touchend = endDrag;
3613
+ var i3 = sibling(child(o3), 2), l3 = child(i3);
3614
+ let d3;
3615
+ var f3 = sibling(l3, 2), p3 = child(f3), _3 = child(sibling(f3, 2)), g2 = child(_3), v2 = sibling(_3, 2);
3616
+ v2.__click = [toggleLike, t2, c2, u2];
3617
+ var h2 = child(v2);
3618
+ const m2 = /* @__PURE__ */ derived(() => get$1(c2) ? "currentColor" : "none");
3619
+ !function Thumbs_up(e4, t3) {
3620
+ const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3621
+ Icon$1(e4, spread_props({
3622
+ name: "thumbs-up"
3623
+ }, () => n3, {
3624
+ iconNode: [["path", {
3625
+ d: "M7 10v12"
3626
+ }], ["path", {
3627
+ d: "M15 5.88 14 10h5.83a2 2 0 0 1 1.92 2.56l-2.33 8A2 2 0 0 1 17.5 22H4a2 2 0 0 1-2-2v-8a2 2 0 0 1 2-2h2.76a2 2 0 0 0 1.79-1.11L12 2a3.13 3.13 0 0 1 3 3.88Z"
3628
+ }]],
3629
+ children: (e5, n4) => {
3630
+ var o4 = comment();
3631
+ slot(first_child(o4), t3, "default", {}, null), append(e5, o4);
3632
+ },
3633
+ $$slots: {
3634
+ default: true
3635
+ }
3636
+ }));
3637
+ }(h2, {
3638
+ size: 18,
3639
+ strokeWidth: 2.5,
3640
+ get fill() {
3641
+ return get$1(m2);
3642
+ },
3643
+ style: "margin-top: -5px;"
3644
+ }), template_effect((e4) => {
3645
+ var _a3, _b2;
3646
+ set_style(o3, `transform: translateY(${get$1(s2) ?? ""}px); opacity: ${get$1(a2) ?? ""}; cursor: grab;`), set_attribute(l3, "src", (_a3 = t2.currentGame) == null ? void 0 : _a3.logo_url), d3 = set_class(l3, 1, "bg-muted h-5 w-5 select-none", null, d3, e4), set_text(p3, ((_b2 = t2.currentGame) == null ? void 0 : _b2.name) || "Default name"), set_text(g2, get$1(u2)), set_style(v2, `color: ${(get$1(c2) ? "white !important" : "") ?? ""};`), set_attribute(v2, "aria-label", get$1(c2) ? "Unlike game" : "Like game");
3647
+ }, [() => ({
3648
+ "animate-pulse": !get$1(n2)
3649
+ })]), event("mouseleave", o3, endDrag), event("load", l3, () => {
3650
+ set(n2, true);
3651
+ }), append(e3, o3);
3652
+ };
3653
+ if_block(p2, (e3) => {
3654
+ t2.currentGame && get$1(o2) && e3(consequent);
3655
+ });
3656
+ var _2 = sibling(p2, 2), consequent_1 = (e3) => {
3657
+ var t3 = lt();
3658
+ t3.__mousedown = [restore, i2, o2, s2, a2, animate2], t3.__touchstart = [restore, i2, o2, s2, a2, animate2], transition(3, t3, () => fly, () => ({
3659
+ delay: 150,
3660
+ y: 30
3661
+ })), append(e3, t3);
3662
+ };
3663
+ if_block(_2, (e3) => {
3664
+ t2.currentGame && get$1(i2) && e3(consequent_1);
3665
+ }), append(e2, f2), pop();
3666
+ }
3667
+ delegate(["mousedown", "mousemove", "mouseup", "touchstart", "touchmove", "touchend", "click"]);
3554
3668
  var on_click = (e2, t2) => {
3555
3669
  localStorage.getItem("playlight_exit_intent_disabled_by_user") ? localStorage.removeItem("playlight_exit_intent_disabled_by_user") : localStorage.setItem("playlight_exit_intent_disabled_by_user", true), set(t2, !get$1(t2));
3556
- }, st = /* @__PURE__ */ template('<button class="cursor-pointer truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-md:hidden"><p class="bg-background/50 text-primary p-1 px-2 text-sm"> </p></button>'), on_click_1 = (e2, t2) => store_set(Ve, false), at = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), lt = /* @__PURE__ */ template('<div class="text-muted-foreground flex h-4/5 items-center justify-center gap-4"><p>No games found that match the filter.</p></div>'), ct = /* @__PURE__ */ template('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'), ut = /* @__PURE__ */ template('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 z-99999 flex flex-col justify-center text-white backdrop-blur-md"><div class="ml-2 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank"><img alt="logo" class="w-50"></a> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden md:mr-4"><!> <button class="cursor-pointer text-white transition hover:opacity-50" aria-label="Close"><!></button></div></div> <div class="mx-auto p-2 px-5"><!></div> <div class="mask-fade no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></div> <div class="fixed right-0 bottom-0 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank" class="text-muted-foreground flex items-center gap-1 text-sm transition hover:text-white">Game Developer? Join Playlight <!></a></div></div>');
3670
+ }, ut = /* @__PURE__ */ template('<button class="cursor-pointer truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-md:hidden"><p class="bg-background/50 text-primary p-1 px-2 text-sm"> </p></button>'), on_click_1 = (e2, t2) => store_set(Ve, false), dt = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), ft = /* @__PURE__ */ template('<div class="text-muted-foreground flex h-4/5 items-center justify-center gap-4"><p>No games found that match the filter.</p></div>'), pt = /* @__PURE__ */ template("<!> <!>", 1), _t = /* @__PURE__ */ template('<div class="mx-auto flex h-full flex-wrap content-start justify-center gap-10 lg:max-w-4/5"><!> <div class="flex h-10 w-full justify-center"><!></div></div>'), gt = /* @__PURE__ */ template('<div class="bg-background/75 fixed inset-0 top-0 right-0 bottom-0 left-0 z-99999 flex flex-col justify-center text-white backdrop-blur-md"><div class="ml-2 flex items-center justify-between p-4"><a href="https://playlight.dev" target="_blank"><img alt="logo" class="w-50"></a> <div class="mt-4 mr-2 flex items-center justify-evenly gap-8 overflow-hidden md:mr-4"><!> <button class="cursor-pointer text-white transition hover:opacity-50" aria-label="Close"><!></button></div></div> <div class="mx-auto p-2 px-5"><!></div> <!> <div class="mask-fade no-scrollbar relative h-full w-full overflow-y-auto p-4 svelte-12skmk8"><!></div> <div class="fixed right-4 bottom-4 flex items-center justify-between"><a href="https://playlight.dev" target="_blank" class="text-muted-foreground flex items-center gap-1 text-sm transition hover:text-white">Join Playlight <!></a></div></div>');
3557
3671
  function DiscoveryOverlay(e2, t2) {
3558
3672
  push(t2, true);
3559
3673
  const [n2, o2] = setup_stores();
3560
- let i2, s2 = prop(t2, "showIntentToggle", 3, true), a2 = state(void 0), l2 = state(true), c2 = state(false), u2 = state(void 0), f2 = state(proxy([])), d2 = state(proxy([])), p2 = state(true), _2 = state(1), v2 = state(true), g2 = state(void 0), h2 = state(false);
3674
+ let i2, s2 = prop(t2, "showIntentToggle", 3, true), a2 = state(true), l2 = state(void 0), c2 = state(true), u2 = state(false), d2 = state(void 0), f2 = state(proxy([])), p2 = state(proxy([])), _2 = state(1), g2 = state(true), v2 = state(void 0), h2 = state(false);
3561
3675
  async function fetchGames() {
3562
- if (!(get$1(l2) && get$1(_2) > 1 || get$1(c2))) try {
3563
- 1 === get$1(_2) ? set(l2, true) : set(c2, true);
3564
- const e3 = get$1(h2) ? null : get$1(a2), t3 = await Qe.getSuggestions(e3, get$1(_2)), n3 = (t3 == null ? void 0 : t3.games) || [], o3 = n3.filter((e4) => !get$1(f2).some((t4) => t4.id === e4.id));
3565
- set(f2, proxy([...get$1(f2), ...o3])), n3.length < 10 ? !get$1(h2) && get$1(a2) ? (
3676
+ if (!(get$1(c2) && get$1(_2) > 1 || get$1(u2))) try {
3677
+ 1 === get$1(_2) ? set(c2, true) : set(u2, true);
3678
+ const e3 = get$1(h2) ? null : get$1(l2), t3 = await Qe.getSuggestions(e3, get$1(_2)), n3 = (t3 == null ? void 0 : t3.games) || [], o3 = n3.filter((e4) => !get$1(f2).some((t4) => t4.id === e4.id));
3679
+ set(f2, proxy([...get$1(f2), ...o3])), n3.length < 10 ? !get$1(h2) && get$1(l2) ? (
3566
3680
  // Try with all games
3567
3681
  (set(h2, true), set(_2, 1), setTimeout(() => fetchGames(), 100))
3568
- ) : set(v2, false) : set(_2, get$1(_2) + 1);
3682
+ ) : set(g2, false) : set(_2, get$1(_2) + 1);
3569
3683
  } catch (e3) {
3570
- console.error(e3), Ne.error("Failed to load games: " + e3);
3684
+ console.error(e3), Ee.error("Failed to load games: " + e3);
3571
3685
  } finally {
3572
- set(l2, false), set(c2, false), // For Chrome: manually check if element is still in view and should trigger another load
3573
- get$1(v2) && get$1(g2) && setTimeout(() => {
3574
- const e3 = get$1(g2).getBoundingClientRect();
3686
+ set(c2, false), set(u2, false), // For Chrome: manually check if element is still in view and should trigger another load
3687
+ get$1(g2) && get$1(v2) && setTimeout(() => {
3688
+ const e3 = get$1(v2).getBoundingClientRect();
3575
3689
  !(e3.top >= -200 && // Include rootMargin
3576
3690
  e3.left >= 0 && e3.bottom <= window.innerHeight + 200 && // Include rootMargin
3577
- e3.right <= window.innerWidth) || get$1(l2) || get$1(c2) || fetchGames();
3691
+ e3.right <= window.innerWidth) || get$1(c2) || get$1(u2) || fetchGames();
3578
3692
  }, 150);
3579
3693
  }
3580
3694
  }
3581
- onMount(() => (set(p2, !Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))), // Setup scroll observer
3695
+ onMount(() => (set(a2, !Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))), // Setup scroll observer
3582
3696
  i2 = new IntersectionObserver((e3) => {
3583
- e3[0].isIntersecting && get$1(v2) && !get$1(l2) && !get$1(c2) && fetchGames();
3697
+ e3[0].isIntersecting && get$1(g2) && !get$1(c2) && !get$1(u2) && fetchGames();
3584
3698
  }, {
3585
3699
  rootMargin: "200px"
3586
3700
  }), () => i2 == null ? void 0 : i2.disconnect())), onMount(async () => {
3587
- const e3 = await Qe.getCurrentGameInfo();
3588
- set(u2, proxy(e3 == null ? void 0 : e3.category)), await async function fetchCategories() {
3589
- var _a2, _b2, _c2, _d;
3590
- set(d2, proxy(await Qe.getCategories())), !get$1(a2) && ((_a2 = get$1(d2)) == null ? void 0 : _a2.length) > 0 && set(a2, proxy(get$1(u2) && ((_b2 = get$1(d2)) == null ? void 0 : _b2.includes(get$1(u2))) ? get$1(u2) : (_d = get$1(d2)) == null ? void 0 : _d[((_c2 = get$1(d2)) == null ? void 0 : _c2.length) - 1]));
3701
+ set(d2, proxy(await Qe.getCurrentGameInfo())), await async function fetchCategories() {
3702
+ var _a2, _b2, _c2, _d, _e2, _f, _g;
3703
+ set(p2, proxy(await Qe.getCategories())), !get$1(l2) && ((_a2 = get$1(p2)) == null ? void 0 : _a2.length) > 0 && set(l2, proxy(((_b2 = get$1(d2)) == null ? void 0 : _b2.category) && ((_d = get$1(p2)) == null ? void 0 : _d.includes((_c2 = get$1(d2)) == null ? void 0 : _c2.category)) ? (_e2 = get$1(d2)) == null ? void 0 : _e2.category : (_g = get$1(p2)) == null ? void 0 : _g[((_f = get$1(p2)) == null ? void 0 : _f.length) - 1]));
3591
3704
  }();
3592
3705
  }), user_effect(() => {
3593
- get$1(a2) && (set(f2, proxy([])), set(_2, 1), set(v2, true), set(h2, false), set(l2, true), // Delay fetch to prevent rapid requests
3706
+ get$1(l2) && (set(f2, proxy([])), set(_2, 1), set(g2, true), set(h2, false), set(c2, true), // Delay fetch to prevent rapid requests
3594
3707
  setTimeout(async () => {
3595
3708
  await fetchGames(), get$1(f2).length < 10 && await fetchGames();
3596
3709
  }, 100));
3597
3710
  }), user_effect(() => {
3598
- get$1(g2) && i2 && i2.observe(get$1(g2));
3711
+ get$1(v2) && i2 && i2.observe(get$1(v2));
3599
3712
  });
3600
- var m2 = ut();
3601
- event("keydown", I, (e3) => {
3713
+ var m2 = gt();
3714
+ event("keydown", q, (e3) => {
3602
3715
  "Escape" == e3.key && store_set(Ve, false);
3603
3716
  });
3604
3717
  var b2 = child(m2), y2 = child(b2), $2 = child(y2), w2 = child(sibling(y2, 2)), consequent = (e3) => {
3605
- var t3 = st();
3606
- t3.__click = [on_click, p2];
3718
+ var t3 = ut();
3719
+ t3.__click = [on_click, a2];
3607
3720
  var n3 = child(t3), o3 = child(n3);
3608
- template_effect(() => set_text(o3, get$1(p2) ? "Ignore exit intent" : "Trigger on exit intent")), append(e3, t3);
3721
+ template_effect(() => set_text(o3, get$1(a2) ? "Ignore exit intent" : "Trigger on exit intent")), append(e3, t3);
3609
3722
  };
3610
3723
  if_block(w2, (e3) => {
3611
3724
  s2() && e3(consequent);
@@ -3636,17 +3749,23 @@ function DiscoveryOverlay(e2, t2) {
3636
3749
  var k2 = sibling(b2, 2);
3637
3750
  Navigation(child(k2), {
3638
3751
  get categories() {
3639
- return get$1(d2);
3752
+ return get$1(p2);
3640
3753
  },
3641
3754
  get selectedCategory() {
3642
- return get$1(a2);
3755
+ return get$1(l2);
3643
3756
  },
3644
3757
  set selectedCategory(e3) {
3645
- set(a2, proxy(e3));
3758
+ set(l2, proxy(e3));
3646
3759
  }
3647
3760
  });
3648
- var C2 = sibling(k2, 2), S2 = child(C2), consequent_1 = (e3) => {
3649
- var t3 = at();
3761
+ var C2 = sibling(k2, 2);
3762
+ CurrentGameDisplay(C2, {
3763
+ get currentGame() {
3764
+ return get$1(d2);
3765
+ }
3766
+ });
3767
+ var S2 = sibling(C2, 2), M2 = child(S2), consequent_1 = (e3) => {
3768
+ var t3 = dt();
3650
3769
  Loader_circle(child(t3), {
3651
3770
  class: "animate-spin opacity-75",
3652
3771
  size: 50,
@@ -3654,18 +3773,27 @@ function DiscoveryOverlay(e2, t2) {
3654
3773
  }), append(e3, t3);
3655
3774
  }, alternate = (e3, t3) => {
3656
3775
  var consequent_2 = (e4) => {
3657
- append(e4, lt());
3776
+ append(e4, ft());
3658
3777
  }, alternate_1 = (e4) => {
3659
- var t4 = ct(), n3 = child(t4);
3660
- each(n3, 17, () => get$1(f2), index, (e5, t5) => {
3661
- GameCard(e5, {
3778
+ var t4 = _t(), n3 = child(t4);
3779
+ each(n3, 17, () => get$1(f2), index, (e5, t5, n4) => {
3780
+ var o4 = pt();
3781
+ const i4 = /* @__PURE__ */ derived(() => get$1(f2).findIndex((e6) => e6.category !== get$1(l2)));
3782
+ var s3 = first_child(o4), consequent_3 = (e6) => {
3783
+ !function GameCategorySeperator(e7) {
3784
+ append(e7, st());
3785
+ }(e6);
3786
+ };
3787
+ if_block(s3, (e6) => {
3788
+ n4 == get$1(i4) && e6(consequent_3);
3789
+ }), GameCard(sibling(s3, 2), {
3662
3790
  get game() {
3663
3791
  return get$1(t5);
3664
3792
  },
3665
3793
  onClick: () => Qe.trackClick(get$1(t5).id)
3666
- });
3794
+ }), append(e5, o4);
3667
3795
  });
3668
- var o3 = sibling(n3, 2), i3 = child(o3), consequent_3 = (e5) => {
3796
+ var o3 = sibling(n3, 2), i3 = child(o3), consequent_4 = (e5) => {
3669
3797
  Loader_circle(e5, {
3670
3798
  class: "animate-spin opacity-75",
3671
3799
  size: 30,
@@ -3673,17 +3801,17 @@ function DiscoveryOverlay(e2, t2) {
3673
3801
  });
3674
3802
  };
3675
3803
  if_block(i3, (e5) => {
3676
- get$1(c2) && e5(consequent_3);
3677
- }), bind_this(o3, (e5) => set(g2, e5), () => get$1(g2)), append(e4, t4);
3804
+ get$1(u2) && e5(consequent_4);
3805
+ }), bind_this(o3, (e5) => set(v2, e5), () => get$1(v2)), append(e4, t4);
3678
3806
  };
3679
3807
  if_block(e3, (e4) => {
3680
- 0 !== get$1(f2).length || get$1(l2) ? e4(alternate_1, false) : e4(consequent_2);
3808
+ 0 !== get$1(f2).length || get$1(c2) ? e4(alternate_1, false) : e4(consequent_2);
3681
3809
  }, t3);
3682
3810
  };
3683
- if_block(S2, (e3) => {
3684
- get$1(l2) && 0 === get$1(f2).length ? e3(consequent_1) : e3(alternate, false);
3811
+ if_block(M2, (e3) => {
3812
+ get$1(c2) && 0 === get$1(f2).length ? e3(consequent_1) : e3(alternate, false);
3685
3813
  });
3686
- var M2 = child(sibling(C2, 2));
3814
+ var I2 = child(sibling(S2, 2));
3687
3815
  !function External_link(e3, t3) {
3688
3816
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3689
3817
  Icon$1(e3, spread_props({
@@ -3704,16 +3832,16 @@ function DiscoveryOverlay(e2, t2) {
3704
3832
  default: true
3705
3833
  }
3706
3834
  }));
3707
- }(sibling(child(M2)), {
3835
+ }(sibling(child(I2)), {
3708
3836
  size: 14
3709
3837
  }), template_effect(() => set_attribute($2, "src", store_get(Ke, "$projectUrl", n2) + "/static/images/logo-white-small.png")), transition(3, m2, () => blur, () => ({
3710
3838
  duration: 250
3711
3839
  })), append(e2, m2), pop(), o2();
3712
3840
  }
3713
3841
  delegate(["click"]);
3714
- var ft = /* @__PURE__ */ template('<div class="fixed top-0 right-0 left-0 h-2"></div> <div class="fixed top-2 right-0 left-0 h-2"></div>', 1);
3842
+ var vt = /* @__PURE__ */ template('<div class="fixed top-0 right-0 left-0 h-2"></div> <div class="fixed top-2 right-0 left-0 h-2"></div>', 1);
3715
3843
  delegate(["mouseover"]);
3716
- var dt = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3844
+ var ht = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3717
3845
  function App(e2, t2) {
3718
3846
  var _a2, _b2, _c2, _d;
3719
3847
  push(t2, true);
@@ -3722,7 +3850,7 @@ function App(e2, t2) {
3722
3850
  function openDiscovery() {
3723
3851
  store_set(Ve, true), Qe.trackOpen();
3724
3852
  }
3725
- var a2 = dt(), l2 = first_child(a2);
3853
+ var a2 = ht(), l2 = first_child(a2);
3726
3854
  FloatingButton(l2, {
3727
3855
  get position() {
3728
3856
  return i2;
@@ -3747,14 +3875,14 @@ function App(e2, t2) {
3747
3875
  $discoveryOpen() && e3(consequent);
3748
3876
  });
3749
3877
  var u2 = sibling(c2, 2);
3750
- const f2 = /* @__PURE__ */ derived(() => {
3878
+ const d2 = /* @__PURE__ */ derived(() => {
3751
3879
  var _a3, _b3;
3752
3880
  return (_b3 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b3.enabled;
3753
3881
  });
3754
3882
  !function ExitIntentDetector(e3, t3) {
3755
3883
  push(t3, true);
3756
3884
  let n3 = prop(t3, "enabled", 3, true), o3 = null, i3 = 0;
3757
- var s3 = ft(), a3 = first_child(s3);
3885
+ var s3 = vt(), a3 = first_child(s3);
3758
3886
  a3.__mouseover = // Time threshold in milliseconds between bar triggers
3759
3887
  function handleTopBarTrigger() {
3760
3888
  var _a3;
@@ -3765,14 +3893,14 @@ function App(e2, t2) {
3765
3893
  }, append(e3, s3), pop();
3766
3894
  }(u2, {
3767
3895
  get enabled() {
3768
- return get$1(f2);
3896
+ return get$1(d2);
3769
3897
  },
3770
3898
  onIntent: () => {
3771
3899
  $discoveryOpen() || openDiscovery();
3772
3900
  }
3773
3901
  }), Toaster(sibling(u2, 2), {}), append(e2, a2), pop(), o2();
3774
3902
  }
3775
- const pt = {
3903
+ const mt = {
3776
3904
  button: {
3777
3905
  position: "bottom-right",
3778
3906
  visible: true
@@ -3781,11 +3909,11 @@ const pt = {
3781
3909
  enabled: true
3782
3910
  }
3783
3911
  };
3784
- let _t = {
3785
- ...pt
3912
+ let bt = {
3913
+ ...mt
3786
3914
  };
3787
3915
  function initializeConfig(e2 = {}) {
3788
- return _t = deepMerge(pt, e2), _t;
3916
+ return bt = deepMerge(mt, e2), bt;
3789
3917
  }
3790
3918
  function deepMerge(e2, t2) {
3791
3919
  const n2 = {
@@ -3802,7 +3930,7 @@ function deepMerge(e2, t2) {
3802
3930
  function isObject(e2) {
3803
3931
  return e2 && "object" == typeof e2 && !Array.isArray(e2);
3804
3932
  }
3805
- const vt = new (_c = class {
3933
+ const yt = new (_c = class {
3806
3934
  constructor() {
3807
3935
  __privateAdd(this, _PlaylightSDK_instances);
3808
3936
  this.container = null, this.app = null, this.isInitialized = false, this.config = null, this.api = Qe;
@@ -3843,8 +3971,8 @@ t_fn = function() {
3843
3971
  console.error("Playlight error occured during mount:", e2);
3844
3972
  }
3845
3973
  }, _c)();
3846
- "undefined" != typeof window && (window.playlightSDK = vt);
3974
+ "undefined" != typeof window && (window.playlightSDK = yt);
3847
3975
  export {
3848
- vt as default
3976
+ yt as default
3849
3977
  };
3850
3978
  //# sourceMappingURL=playlight-sdk.es.js.map