playlight-sdk 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,12 @@
1
+ var __typeError = (msg) => {
2
+ throw TypeError(msg);
3
+ };
4
+ var __accessCheck = (obj, member, msg) => member.has(obj) || __typeError("Cannot " + msg);
5
+ var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
6
+ var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
7
+ var _PlayLightAPI_instances, e_fn, _a;
1
8
  const e = false;
2
- var t = Array.isArray, n = Array.prototype.indexOf, o = Array.from, i = Object.defineProperty, s = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyDescriptors, l = Object.prototype, c = Array.prototype, u = Object.getPrototypeOf;
9
+ var t = Array.isArray, n = Array.prototype.indexOf, i = Array.from, o = Object.defineProperty, s = Object.getOwnPropertyDescriptor, a = Object.getOwnPropertyDescriptors, l = Object.prototype, c = Array.prototype, u = Object.getPrototypeOf;
3
10
  function is_function(e2) {
4
11
  return "function" == typeof e2;
5
12
  }
@@ -22,7 +29,7 @@ function safe_equals(e2) {
22
29
  return !safe_not_equal(e2, this.v);
23
30
  }
24
31
  let C = false;
25
- const M = Symbol(), S = "http://www.w3.org/2000/svg";
32
+ const M = Symbol(), q = "http://www.w3.org/2000/svg";
26
33
  function lifecycle_outside_component(e2) {
27
34
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
28
35
  }
@@ -51,15 +58,15 @@ function pop(e2) {
51
58
  if (null !== t2) {
52
59
  const e3 = t2.e;
53
60
  if (null !== e3) {
54
- var n2 = H, o2 = F;
61
+ var n2 = H, i2 = F;
55
62
  t2.e = null;
56
63
  try {
57
- for (var i2 = 0; i2 < e3.length; i2++) {
58
- var s2 = e3[i2];
64
+ for (var o2 = 0; o2 < e3.length; o2++) {
65
+ var s2 = e3[o2];
59
66
  set_active_effect(s2.effect), set_active_reaction(s2.reaction), effect(s2.fn);
60
67
  }
61
68
  } finally {
62
- set_active_effect(n2), set_active_reaction(o2);
69
+ set_active_effect(n2), set_active_reaction(i2);
63
70
  }
64
71
  }
65
72
  I = t2.p, t2.m = true;
@@ -85,11 +92,11 @@ function state(e2) {
85
92
  }
86
93
  // @__NO_SIDE_EFFECTS__
87
94
  function mutable_source(e2, t2 = false) {
88
- var _a;
95
+ var _a2;
89
96
  const n2 = source(e2);
90
97
  return t2 || (n2.equals = safe_equals), // bind the signal to the component context, in case we need to
91
98
  // track updates to trigger beforeUpdate/afterUpdate callbacks
92
- C && null !== I && null !== I.l && ((_a = I.l).s ?? (_a.s = [])).push(n2), n2;
99
+ C && null !== I && null !== I.l && ((_a2 = I.l).s ?? (_a2.s = [])).push(n2), n2;
93
100
  }
94
101
  function mutable_state(e2, t2 = false) {
95
102
  return /* @__PURE__ */ push_derived_source(/* @__PURE__ */ mutable_source(e2, t2));
@@ -129,15 +136,15 @@ function internal_set(e2, t2) {
129
136
  ) : U.push(e2))), t2;
130
137
  }
131
138
  function update(e2, t2 = 1) {
132
- var n2 = get$1(e2), o2 = 1 === t2 ? n2++ : n2--;
133
- return set(e2, n2), o2;
139
+ var n2 = get$1(e2), i2 = 1 === t2 ? n2++ : n2--;
140
+ return set(e2, n2), i2;
134
141
  }
135
142
  function mark_reactions(e2, t2) {
136
143
  var n2 = e2.reactions;
137
- if (null !== n2) for (var o2 = is_runes(), i2 = n2.length, s2 = 0; s2 < i2; s2++) {
144
+ if (null !== n2) for (var i2 = is_runes(), o2 = n2.length, s2 = 0; s2 < o2; s2++) {
138
145
  var a2 = n2[s2], l2 = a2.f;
139
146
  l2 & g || // In legacy mode, skip the current effect to prevent infinite loops
140
- (o2 || a2 !== H) && (set_signal_status(a2, t2), // If the signal a) was previously clean or b) is an unowned derived, then mark it
147
+ (i2 || a2 !== H) && (set_signal_status(a2, t2), // If the signal a) was previously clean or b) is an unowned derived, then mark it
141
148
  1280 & l2 && (2 & l2 ? mark_reactions(
142
149
  /** @type {Derived} */
143
150
  a2,
@@ -148,10 +155,10 @@ function mark_reactions(e2, t2) {
148
155
  )));
149
156
  }
150
157
  }
151
- function proxy(e2, n2 = null, o2) {
158
+ function proxy(e2, n2 = null, i2) {
152
159
  if ("object" != typeof e2 || null === e2 || w in e2) return e2;
153
- const i2 = u(e2);
154
- if (i2 !== l && i2 !== c) return e2;
160
+ const o2 = u(e2);
161
+ if (o2 !== l && o2 !== c) return e2;
155
162
  var a2, d2 = /* @__PURE__ */ new Map(), f2 = t(e2), p2 = source(0);
156
163
  return f2 && // We need to create the length source eagerly to ensure that
157
164
  // mutations to the array are properly synced with our proxy
@@ -174,45 +181,45 @@ function proxy(e2, n2 = null, o2) {
174
181
  function state_descriptors_fixed() {
175
182
  throw new Error("https://svelte.dev/e/state_descriptors_fixed");
176
183
  }();
177
- var o3 = d2.get(t2);
178
- return void 0 === o3 ? (o3 = source(n3.value), d2.set(t2, o3)) : set(o3, proxy(n3.value, a2)), true;
184
+ var i3 = d2.get(t2);
185
+ return void 0 === i3 ? (i3 = source(n3.value), d2.set(t2, i3)) : set(i3, proxy(n3.value, a2)), true;
179
186
  },
180
187
  deleteProperty(e3, t2) {
181
188
  var n3 = d2.get(t2);
182
189
  if (void 0 === n3) t2 in e3 && d2.set(t2, source(M));
183
190
  else {
184
191
  if (f2 && "string" == typeof t2) {
185
- var o3 = (
192
+ var i3 = (
186
193
  /** @type {Source<number>} */
187
194
  d2.get("length")
188
- ), i3 = Number(t2);
189
- Number.isInteger(i3) && i3 < o3.v && set(o3, i3);
195
+ ), o3 = Number(t2);
196
+ Number.isInteger(o3) && o3 < i3.v && set(i3, o3);
190
197
  }
191
198
  set(n3, M), update_version(p2);
192
199
  }
193
200
  return true;
194
201
  },
195
- get(t2, n3, o3) {
196
- var _a;
202
+ get(t2, n3, i3) {
203
+ var _a2;
197
204
  if (n3 === w) return e2;
198
- var i3 = d2.get(n3), l2 = n3 in t2;
205
+ var o3 = d2.get(n3), l2 = n3 in t2;
199
206
  if (
200
207
  // create a source, but only if it's an own property and not a prototype property
201
- void 0 !== i3 || l2 && !((_a = s(t2, n3)) == null ? void 0 : _a.writable) || (i3 = source(proxy(l2 ? t2[n3] : M, a2)), d2.set(n3, i3)), void 0 !== i3
208
+ void 0 !== o3 || l2 && !((_a2 = s(t2, n3)) == null ? void 0 : _a2.writable) || (o3 = source(proxy(l2 ? t2[n3] : M, a2)), d2.set(n3, o3)), void 0 !== o3
202
209
  ) {
203
- var c2 = get$1(i3);
210
+ var c2 = get$1(o3);
204
211
  return c2 === M ? void 0 : c2;
205
212
  }
206
- return Reflect.get(t2, n3, o3);
213
+ return Reflect.get(t2, n3, i3);
207
214
  },
208
215
  getOwnPropertyDescriptor(e3, t2) {
209
216
  var n3 = Reflect.getOwnPropertyDescriptor(e3, t2);
210
217
  if (n3 && "value" in n3) {
211
- var o3 = d2.get(t2);
212
- o3 && (n3.value = get$1(o3));
218
+ var i3 = d2.get(t2);
219
+ i3 && (n3.value = get$1(i3));
213
220
  } else if (void 0 === n3) {
214
- var i3 = d2.get(t2), s2 = i3 == null ? void 0 : i3.v;
215
- if (void 0 !== i3 && s2 !== M) return {
221
+ var o3 = d2.get(t2), s2 = o3 == null ? void 0 : o3.v;
222
+ if (void 0 !== o3 && s2 !== M) return {
216
223
  enumerable: true,
217
224
  configurable: true,
218
225
  value: s2,
@@ -222,26 +229,26 @@ function proxy(e2, n2 = null, o2) {
222
229
  return n3;
223
230
  },
224
231
  has(e3, t2) {
225
- var _a;
232
+ var _a2;
226
233
  if (t2 === w) return true;
227
- var n3 = d2.get(t2), o3 = void 0 !== n3 && n3.v !== M || Reflect.has(e3, t2);
228
- if ((void 0 !== n3 || null !== H && (!o3 || ((_a = s(e3, t2)) == null ? void 0 : _a.writable))) && (void 0 === n3 && (n3 = source(o3 ? proxy(e3[t2], a2) : M), d2.set(t2, n3)), get$1(n3) === M)) return false;
229
- return o3;
234
+ var n3 = d2.get(t2), i3 = void 0 !== n3 && n3.v !== M || Reflect.has(e3, t2);
235
+ if ((void 0 !== n3 || null !== H && (!i3 || ((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable))) && (void 0 === n3 && (n3 = source(i3 ? proxy(e3[t2], a2) : M), d2.set(t2, n3)), get$1(n3) === M)) return false;
236
+ return i3;
230
237
  },
231
- set(e3, t2, n3, o3) {
232
- var _a;
233
- var i3 = d2.get(t2), l2 = t2 in e3;
238
+ set(e3, t2, n3, i3) {
239
+ var _a2;
240
+ var o3 = d2.get(t2), l2 = t2 in e3;
234
241
  if (f2 && "length" === t2) for (var c2 = n3; c2 < /** @type {Source<number>} */
235
- i3.v; c2 += 1) {
242
+ o3.v; c2 += 1) {
236
243
  var u2 = d2.get(c2 + "");
237
244
  void 0 !== u2 ? set(u2, M) : c2 in e3 && // If the item exists in the original, we need to create a uninitialized source,
238
245
  // else a later read of the property would result in a source being created with
239
246
  // the value of the original item at that index.
240
247
  (u2 = source(M), d2.set(c2 + "", u2));
241
248
  }
242
- void 0 === i3 ? l2 && !((_a = s(e3, t2)) == null ? void 0 : _a.writable) || (set(i3 = source(void 0), proxy(n3, a2)), d2.set(t2, i3)) : (l2 = i3.v !== M, set(i3, proxy(n3, a2)));
249
+ void 0 === o3 ? l2 && !((_a2 = s(e3, t2)) == null ? void 0 : _a2.writable) || (set(o3 = source(void 0), proxy(n3, a2)), d2.set(t2, o3)) : (l2 = o3.v !== M, set(o3, proxy(n3, a2)));
243
250
  var _2 = Reflect.getOwnPropertyDescriptor(e3, t2);
244
- if ((_2 == null ? void 0 : _2.set) && _2.set.call(o3, n3), !l2) {
251
+ if ((_2 == null ? void 0 : _2.set) && _2.set.call(i3, n3), !l2) {
245
252
  if (f2 && "string" == typeof t2) {
246
253
  var v2 = (
247
254
  /** @type {Source<number>} */
@@ -259,7 +266,7 @@ function proxy(e2, n2 = null, o2) {
259
266
  var t3 = d2.get(e4);
260
267
  return void 0 === t3 || t3.v !== M;
261
268
  });
262
- for (var [n3, o3] of d2) o3.v === M || n3 in e3 || t2.push(n3);
269
+ for (var [n3, i3] of d2) i3.v === M || n3 in e3 || t2.push(n3);
263
270
  return t2;
264
271
  },
265
272
  setPrototypeOf() {
@@ -273,7 +280,7 @@ function proxy(e2, n2 = null, o2) {
273
280
  function update_version(e2, t2 = 1) {
274
281
  set(e2, e2.v + t2);
275
282
  }
276
- var T, q, P, O, E;
283
+ var S, T, P, O, E;
277
284
  function create_text(e2 = "") {
278
285
  return document.createTextNode(e2);
279
286
  }
@@ -299,10 +306,10 @@ function first_child(e2, t2) {
299
306
  return n2 instanceof Comment && "" === n2.data ? /* @__PURE__ */ get_next_sibling(n2) : n2;
300
307
  }
301
308
  function sibling(e2, t2 = 1, n2 = false) {
302
- let o2 = e2;
303
- for (; t2--; ) o2 = /** @type {TemplateNode} */
304
- /* @__PURE__ */ get_next_sibling(o2);
305
- return o2;
309
+ let i2 = e2;
310
+ for (; t2--; ) i2 = /** @type {TemplateNode} */
311
+ /* @__PURE__ */ get_next_sibling(i2);
312
+ return i2;
306
313
  }
307
314
  // @__NO_SIDE_EFFECTS__
308
315
  function derived(e2) {
@@ -388,12 +395,12 @@ function validate_effect(e2) {
388
395
  */
389
396
  function effect_in_unowned_derived() {
390
397
  throw new Error("https://svelte.dev/e/effect_in_unowned_derived");
391
- }(), L && function effect_in_teardown(e3) {
398
+ }(), A && function effect_in_teardown(e3) {
392
399
  throw new Error("https://svelte.dev/e/effect_in_teardown");
393
400
  }();
394
401
  }
395
- function create_effect(e2, t2, n2, o2 = true) {
396
- var i2 = !!(64 & e2), s2 = H, a2 = {
402
+ function create_effect(e2, t2, n2, i2 = true) {
403
+ var o2 = !!(64 & e2), s2 = H, a2 = {
397
404
  ctx: I,
398
405
  deps: null,
399
406
  nodes_start: null,
@@ -403,7 +410,7 @@ function create_effect(e2, t2, n2, o2 = true) {
403
410
  fn: t2,
404
411
  last: null,
405
412
  next: null,
406
- parent: i2 ? null : s2,
413
+ parent: o2 ? null : s2,
407
414
  prev: null,
408
415
  teardown: null,
409
416
  transitions: null,
@@ -415,7 +422,7 @@ function create_effect(e2, t2, n2, o2 = true) {
415
422
  throw destroy_effect(a2), e3;
416
423
  }
417
424
  else null !== t2 && schedule_effect(a2);
418
- if (!(n2 && null === a2.deps && null === a2.first && null === a2.nodes_start && null === a2.teardown && !(1048704 & a2.f)) && !i2 && o2 && (null !== s2 && function push_effect(e3, t3) {
425
+ if (!(n2 && null === a2.deps && null === a2.first && null === a2.nodes_start && null === a2.teardown && !(1048704 & a2.f)) && !o2 && i2 && (null !== s2 && function push_effect(e3, t3) {
419
426
  var n3 = t3.last;
420
427
  null === n3 ? t3.last = t3.first = e3 : (n3.next = e3, e3.prev = n3, t3.last = e3);
421
428
  }(a2, s2), null !== F && 2 & F.f)) {
@@ -450,14 +457,14 @@ function legacy_pre_effect(e2, t2) {
450
457
  var n2 = (
451
458
  /** @type {ComponentContextLegacy} */
452
459
  I
453
- ), o2 = {
460
+ ), i2 = {
454
461
  effect: null,
455
462
  ran: false
456
463
  };
457
- n2.l.r1.push(o2), o2.effect = render_effect(() => {
464
+ n2.l.r1.push(i2), i2.effect = render_effect(() => {
458
465
  e2(), // If this legacy pre effect has already run before the end of the reset, then
459
466
  // bail out to emulate the same behavior.
460
- o2.ran || (o2.ran = true, set(n2.l.r2, true), untrack(t2));
467
+ i2.ran || (i2.ran = true, set(n2.l.r2, true), untrack(t2));
461
468
  });
462
469
  }
463
470
  function legacy_pre_effect_reset() {
@@ -479,8 +486,8 @@ function render_effect(e2) {
479
486
  return create_effect(8, e2, true);
480
487
  }
481
488
  function template_effect(e2, t2 = [], n2 = derived) {
482
- const o2 = t2.map(n2);
483
- return block(() => e2(...o2.map(get$1)));
489
+ const i2 = t2.map(n2);
490
+ return block(() => e2(...i2.map(get$1)));
484
491
  }
485
492
  function block(e2, t2 = 0) {
486
493
  return create_effect(24 | t2, e2, true);
@@ -491,7 +498,7 @@ function branch(e2, t2 = true) {
491
498
  function execute_effect_teardown(e2) {
492
499
  var t2 = e2.teardown;
493
500
  if (null !== t2) {
494
- const e3 = L, n2 = F;
501
+ const e3 = A, n2 = F;
495
502
  set_is_destroying_effect(true), set_active_reaction(null);
496
503
  try {
497
504
  t2.call(null);
@@ -503,19 +510,19 @@ function execute_effect_teardown(e2) {
503
510
  function destroy_effect_children(e2, t2 = false) {
504
511
  var n2 = e2.first;
505
512
  for (e2.first = e2.last = null; null !== n2; ) {
506
- var o2 = n2.next;
507
- destroy_effect(n2, t2), n2 = o2;
513
+ var i2 = n2.next;
514
+ destroy_effect(n2, t2), n2 = i2;
508
515
  }
509
516
  }
510
517
  function destroy_effect(e2, t2 = true) {
511
518
  var n2 = false;
512
519
  if ((t2 || 524288 & e2.f) && null !== e2.nodes_start) {
513
- for (var o2 = e2.nodes_start, i2 = e2.nodes_end; null !== o2; ) {
514
- var s2 = o2 === i2 ? null : (
520
+ for (var i2 = e2.nodes_start, o2 = e2.nodes_end; null !== i2; ) {
521
+ var s2 = i2 === o2 ? null : (
515
522
  /** @type {TemplateNode} */
516
- /* @__PURE__ */ get_next_sibling(o2)
523
+ /* @__PURE__ */ get_next_sibling(i2)
517
524
  );
518
- o2.remove(), o2 = s2;
525
+ i2.remove(), i2 = s2;
519
526
  }
520
527
  n2 = true;
521
528
  }
@@ -529,8 +536,8 @@ function destroy_effect(e2, t2 = true) {
529
536
  e2.next = e2.prev = e2.teardown = e2.ctx = e2.deps = e2.fn = e2.nodes_start = e2.nodes_end = null;
530
537
  }
531
538
  function unlink_effect(e2) {
532
- var t2 = e2.parent, n2 = e2.prev, o2 = e2.next;
533
- null !== n2 && (n2.next = o2), null !== o2 && (o2.prev = n2), null !== t2 && (t2.first === e2 && (t2.first = o2), t2.last === e2 && (t2.last = n2));
539
+ var t2 = e2.parent, n2 = e2.prev, i2 = e2.next;
540
+ null !== n2 && (n2.next = i2), null !== i2 && (i2.prev = n2), null !== t2 && (t2.first === e2 && (t2.first = i2), t2.last === e2 && (t2.last = n2));
534
541
  }
535
542
  function pause_effect(e2, t2) {
536
543
  var n2 = [];
@@ -542,15 +549,15 @@ function run_out_transitions(e2, t2) {
542
549
  var n2 = e2.length;
543
550
  if (n2 > 0) {
544
551
  var check = () => --n2 || t2();
545
- for (var o2 of e2) o2.out(check);
552
+ for (var i2 of e2) i2.out(check);
546
553
  } else t2();
547
554
  }
548
555
  function pause_children(e2, t2, n2) {
549
556
  if (!(e2.f & m)) {
550
- if (e2.f ^= m, null !== e2.transitions) for (const o3 of e2.transitions) (o3.is_global || n2) && t2.push(o3);
551
- for (var o2 = e2.first; null !== o2; ) {
552
- var i2 = o2.next;
553
- pause_children(o2, t2, !!(!!(o2.f & y) || !!(o2.f & d)) && n2), o2 = i2;
557
+ if (e2.f ^= m, null !== e2.transitions) for (const i3 of e2.transitions) (i3.is_global || n2) && t2.push(i3);
558
+ for (var i2 = e2.first; null !== i2; ) {
559
+ var o2 = i2.next;
560
+ pause_children(i2, t2, !!(!!(i2.f & y) || !!(i2.f & d)) && n2), i2 = o2;
554
561
  }
555
562
  }
556
563
  }
@@ -565,8 +572,8 @@ function resume_children(e2, t2) {
565
572
  // schedule the effect to update
566
573
  check_dirtiness(e2) && (set_signal_status(e2, g), schedule_effect(e2));
567
574
  for (var n2 = e2.first; null !== n2; ) {
568
- var o2 = n2.next;
569
- resume_children(n2, !!(!!(n2.f & y) || !!(n2.f & d)) && t2), n2 = o2;
575
+ var i2 = n2.next;
576
+ resume_children(n2, !!(!!(n2.f & y) || !!(n2.f & d)) && t2), n2 = i2;
570
577
  }
571
578
  if (null !== e2.transitions) for (const n3 of e2.transitions) (n3.is_global || t2) && n3.in();
572
579
  }
@@ -585,11 +592,11 @@ function flush_tasks() {
585
592
  N = [], run_all(e2);
586
593
  }();
587
594
  }
588
- let B = false, z = false, D = null, A = false, L = false;
595
+ let B = false, D = false, W = null, z = false, A = false;
589
596
  function set_is_destroying_effect(e2) {
590
- L = e2;
597
+ A = e2;
591
598
  }
592
- let W = [], F = null, G = false;
599
+ let L = [], F = null, G = false;
593
600
  function set_active_reaction(e2) {
594
601
  F = e2;
595
602
  }
@@ -604,37 +611,37 @@ function increment_write_version() {
604
611
  return ++Z;
605
612
  }
606
613
  function check_dirtiness(e2) {
607
- var _a;
614
+ var _a2;
608
615
  var t2 = e2.f;
609
616
  if (t2 & g) return true;
610
617
  if (t2 & h) {
611
- var n2 = e2.deps, o2 = !!(t2 & p);
618
+ var n2 = e2.deps, i2 = !!(t2 & p);
612
619
  if (null !== n2) {
613
- var i2, s2, a2 = !!(t2 & _), l2 = o2 && null !== H && !J, c2 = n2.length;
620
+ var o2, s2, a2 = !!(t2 & _), l2 = i2 && null !== H && !J, c2 = n2.length;
614
621
  if (a2 || l2) {
615
622
  var u2 = (
616
623
  /** @type {Derived} */
617
624
  e2
618
625
  ), d2 = u2.parent;
619
- for (i2 = 0; i2 < c2; i2++) s2 = n2[i2], // We always re-add all reactions (even duplicates) if the derived was
626
+ for (o2 = 0; o2 < c2; o2++) s2 = n2[o2], // We always re-add all reactions (even duplicates) if the derived was
620
627
  // previously disconnected, however we don't if it was unowned as we
621
628
  // de-duplicate dependencies in that case
622
- !a2 && ((_a = s2 == null ? void 0 : s2.reactions) == null ? void 0 : _a.includes(u2)) || (s2.reactions ?? (s2.reactions = [])).push(u2);
629
+ !a2 && ((_a2 = s2 == null ? void 0 : s2.reactions) == null ? void 0 : _a2.includes(u2)) || (s2.reactions ?? (s2.reactions = [])).push(u2);
623
630
  a2 && (u2.f ^= _), // If the unowned derived is now fully connected to the graph again (it's unowned and reconnected, has a parent
624
631
  // and the parent is not unowned), then we can mark it as connected again, removing the need for the unowned
625
632
  // flag
626
633
  !l2 || null === d2 || d2.f & p || (u2.f ^= p);
627
634
  }
628
- for (i2 = 0; i2 < c2; i2++) if (check_dirtiness(s2 = n2[i2]) && update_derived(
635
+ for (o2 = 0; o2 < c2; o2++) if (check_dirtiness(s2 = n2[o2]) && update_derived(
629
636
  /** @type {Derived} */
630
637
  s2
631
638
  ), s2.wv > e2.wv) return true;
632
639
  }
633
- o2 && (null === H || J) || set_signal_status(e2, v);
640
+ i2 && (null === H || J) || set_signal_status(e2, v);
634
641
  }
635
642
  return false;
636
643
  }
637
- function handle_error(e2, t2, n2, o2) {
644
+ function handle_error(e2, t2, n2, i2) {
638
645
  if (B) {
639
646
  if (null === n2 && (B = false), /**
640
647
  * @param {Effect} effect
@@ -655,9 +662,9 @@ function handle_error(e2, t2, n2, o2) {
655
662
  }(e2, t2);
656
663
  }
657
664
  function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
658
- var o2 = e2.reactions;
659
- if (null !== o2) for (var i2 = 0; i2 < o2.length; i2++) {
660
- var s2 = o2[i2];
665
+ var i2 = e2.reactions;
666
+ if (null !== i2) for (var o2 = 0; o2 < i2.length; o2++) {
667
+ var s2 = i2[o2];
661
668
  2 & s2.f ? schedule_possible_effect_self_invalidation(
662
669
  /** @type {Derived} */
663
670
  s2,
@@ -670,10 +677,10 @@ function schedule_possible_effect_self_invalidation(e2, t2, n2 = true) {
670
677
  }
671
678
  }
672
679
  function update_reaction(e2) {
673
- var _a;
674
- var t2 = V, n2 = K, o2 = U, i2 = F, s2 = J, a2 = R, l2 = I, c2 = G, u2 = e2.f;
680
+ var _a2;
681
+ var t2 = V, n2 = K, i2 = U, o2 = F, s2 = J, a2 = R, l2 = I, c2 = G, u2 = e2.f;
675
682
  V = /** @type {null | Value[]} */
676
- null, K = 0, U = null, J = !!(u2 & p) && (G || !A || null === F), F = 96 & u2 ? null : e2, R = null, set_component_context(e2.ctx), G = false, Y++;
683
+ null, K = 0, U = null, J = !!(u2 & p) && (G || !z || null === F), F = 96 & u2 ? null : e2, R = null, set_component_context(e2.ctx), G = false, Y++;
677
684
  try {
678
685
  var d2 = (
679
686
  /** @type {Function} */
@@ -684,7 +691,7 @@ function update_reaction(e2) {
684
691
  var _2;
685
692
  if (remove_reactions(e2, K), null !== f2 && K > 0) for (f2.length = K + V.length, _2 = 0; _2 < V.length; _2++) f2[K + _2] = V[_2];
686
693
  else e2.deps = f2 = V;
687
- if (!J) for (_2 = K; _2 < f2.length; _2++) ((_a = f2[_2]).reactions ?? (_a.reactions = [])).push(e2);
694
+ if (!J) for (_2 = K; _2 < f2.length; _2++) ((_a2 = f2[_2]).reactions ?? (_a2.reactions = [])).push(e2);
688
695
  } else null !== f2 && K < f2.length && (remove_reactions(e2, K), f2.length = K);
689
696
  if (is_runes() && null !== U && !G && null !== f2 && !(6146 & e2.f)) for (_2 = 0; _2 < /** @type {Source[]} */
690
697
  U.length; _2++) schedule_possible_effect_self_invalidation(
@@ -692,24 +699,24 @@ function update_reaction(e2) {
692
699
  /** @type {Effect} */
693
700
  e2
694
701
  );
695
- return null !== i2 && Y++, d2;
702
+ return null !== o2 && Y++, d2;
696
703
  } finally {
697
- V = t2, K = n2, U = o2, F = i2, J = s2, R = a2, set_component_context(l2), G = c2;
704
+ V = t2, K = n2, U = i2, F = o2, J = s2, R = a2, set_component_context(l2), G = c2;
698
705
  }
699
706
  }
700
707
  function remove_reaction(e2, t2) {
701
- let o2 = t2.reactions;
702
- if (null !== o2) {
703
- var i2 = n.call(o2, e2);
704
- if (-1 !== i2) {
705
- var s2 = o2.length - 1;
706
- 0 === s2 ? o2 = t2.reactions = null : (
708
+ let i2 = t2.reactions;
709
+ if (null !== i2) {
710
+ var o2 = n.call(i2, e2);
711
+ if (-1 !== o2) {
712
+ var s2 = i2.length - 1;
713
+ 0 === s2 ? i2 = t2.reactions = null : (
707
714
  // Swap with last element and then remove.
708
- (o2[i2] = o2[s2], o2.pop())
715
+ (i2[o2] = i2[s2], i2.pop())
709
716
  );
710
717
  }
711
718
  }
712
- null === o2 && 2 & t2.f && // Destroying a child effect while updating a parent effect can cause a dependency to appear
719
+ null === i2 && 2 & t2.f && // Destroying a child effect while updating a parent effect can cause a dependency to appear
713
720
  // to be unused, when in fact it is used by the currently-updating parent. Checking `new_deps`
714
721
  // allows us to skip the expensive work of disconnecting and immediately reconnecting it
715
722
  (null === V || !V.includes(t2)) && (set_signal_status(t2, h), // If we are working with a derived that is owned by an effect, then mark it as being
@@ -726,14 +733,14 @@ function remove_reaction(e2, t2) {
726
733
  }
727
734
  function remove_reactions(e2, t2) {
728
735
  var n2 = e2.deps;
729
- if (null !== n2) for (var o2 = t2; o2 < n2.length; o2++) remove_reaction(e2, n2[o2]);
736
+ if (null !== n2) for (var i2 = t2; i2 < n2.length; i2++) remove_reaction(e2, n2[i2]);
730
737
  }
731
738
  function update_effect(t2) {
732
739
  var n2 = t2.f;
733
740
  if (!(n2 & b)) {
734
741
  set_signal_status(t2, v);
735
- var o2 = H, i2 = I, s2 = A;
736
- H = t2, A = true;
742
+ var i2 = H, o2 = I, s2 = z;
743
+ H = t2, z = true;
737
744
  try {
738
745
  16 & n2 ? function destroy_block_effect_children(e2) {
739
746
  for (var t3 = e2.first; null !== t3; ) {
@@ -746,9 +753,9 @@ function update_effect(t2) {
746
753
  t2.deps;
747
754
  e;
748
755
  } catch (e2) {
749
- handle_error(e2, t2, o2, i2 || t2.ctx);
756
+ handle_error(e2, t2, i2, o2 || t2.ctx);
750
757
  } finally {
751
- A = s2, H = o2;
758
+ z = s2, H = i2;
752
759
  }
753
760
  }
754
761
  }
@@ -758,64 +765,64 @@ function infinite_loop_guard() {
758
765
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
759
766
  }();
760
767
  } catch (e2) {
761
- if (null === D) throw e2;
762
- handle_error(e2, D, null);
768
+ if (null === W) throw e2;
769
+ handle_error(e2, W, null);
763
770
  }
764
771
  }
765
772
  function flush_queued_root_effects() {
766
773
  try {
767
- for (var e2 = 0; W.length > 0; ) {
774
+ for (var e2 = 0; L.length > 0; ) {
768
775
  e2++ > 1e3 && infinite_loop_guard();
769
- var t2 = W, n2 = t2.length;
770
- W = [];
771
- for (var o2 = 0; o2 < n2; o2++) {
772
- var i2 = t2[o2];
773
- i2.f & v || (i2.f ^= v), flush_queued_effects(process_effects(i2));
776
+ var t2 = L, n2 = t2.length;
777
+ L = [];
778
+ for (var i2 = 0; i2 < n2; i2++) {
779
+ var o2 = t2[i2];
780
+ o2.f & v || (o2.f ^= v), flush_queued_effects(process_effects(o2));
774
781
  }
775
782
  }
776
783
  } finally {
777
- z = false, D = null;
784
+ D = false, W = null;
778
785
  }
779
786
  }
780
787
  function flush_queued_effects(e2) {
781
788
  var t2 = e2.length;
782
789
  if (0 !== t2) for (var n2 = 0; n2 < t2; n2++) {
783
- var o2 = e2[n2];
784
- if (!(24576 & o2.f)) try {
785
- check_dirtiness(o2) && (update_effect(o2), // Effects with no dependencies or teardown do not get added to the effect tree.
790
+ var i2 = e2[n2];
791
+ if (!(24576 & i2.f)) try {
792
+ check_dirtiness(i2) && (update_effect(i2), // Effects with no dependencies or teardown do not get added to the effect tree.
786
793
  // Deferred effects (e.g. `$effect(...)`) _are_ added to the tree because we
787
794
  // don't know if we need to keep them until they are executed. Doing the check
788
795
  // here (rather than in `update_effect`) allows us to skip the work for
789
796
  // immediate effects.
790
- null === o2.deps && null === o2.first && null === o2.nodes_start && (null === o2.teardown ? (
797
+ null === i2.deps && null === i2.first && null === i2.nodes_start && (null === i2.teardown ? (
791
798
  // remove this effect from the graph
792
- unlink_effect(o2)
799
+ unlink_effect(i2)
793
800
  ) : (
794
801
  // keep the effect in the graph, but free up some memory
795
- o2.fn = null
802
+ i2.fn = null
796
803
  )));
797
804
  } catch (e3) {
798
- handle_error(e3, o2, null, o2.ctx);
805
+ handle_error(e3, i2, null, i2.ctx);
799
806
  }
800
807
  }
801
808
  }
802
809
  function schedule_effect(e2) {
803
- z || (z = true, queueMicrotask(flush_queued_root_effects));
804
- for (var t2 = D = e2; null !== t2.parent; ) {
810
+ D || (D = true, queueMicrotask(flush_queued_root_effects));
811
+ for (var t2 = W = e2; null !== t2.parent; ) {
805
812
  var n2 = (t2 = t2.parent).f;
806
813
  if (96 & n2) {
807
814
  if (!(n2 & v)) return;
808
815
  t2.f ^= v;
809
816
  }
810
817
  }
811
- W.push(t2);
818
+ L.push(t2);
812
819
  }
813
820
  function process_effects(e2) {
814
821
  for (var t2 = [], n2 = e2.first; null !== n2; ) {
815
- var o2 = n2.f, i2 = !!(o2 & d);
816
- if (!(i2 && !!(o2 & v) || o2 & m)) {
817
- if (4 & o2) t2.push(n2);
818
- else if (i2) n2.f ^= v;
822
+ var i2 = n2.f, o2 = !!(i2 & d);
823
+ if (!(o2 && !!(i2 & v) || i2 & m)) {
824
+ if (4 & i2) t2.push(n2);
825
+ else if (o2) n2.f ^= v;
819
826
  else {
820
827
  var s2 = F;
821
828
  try {
@@ -841,7 +848,7 @@ async function tick() {
841
848
  await Promise.resolve(), // By calling flushSync we guarantee that any pending state changes are applied after one tick.
842
849
  // TODO look into whether we can make flushing subsequent updates synchronously in the future.
843
850
  function flushSync(e2) {
844
- for (flush_tasks(); W.length > 0; ) z = true, flush_queued_root_effects(), flush_tasks();
851
+ for (flush_tasks(); L.length > 0; ) D = true, flush_queued_root_effects(), flush_tasks();
845
852
  }();
846
853
  }
847
854
  function get$1(e2) {
@@ -853,8 +860,8 @@ function get$1(e2) {
853
860
  var n2 = (
854
861
  /** @type {Derived} */
855
862
  e2
856
- ), o2 = n2.parent;
857
- null === o2 || o2.f & p || // If the derived is owned by another derived then mark it as unowned
863
+ ), i2 = n2.parent;
864
+ null === i2 || i2.f & p || // If the derived is owned by another derived then mark it as unowned
858
865
  // as the derived value might have been referenced in a different context
859
866
  // since and thus its parent might not be its true owner anymore
860
867
  (n2.f ^= p);
@@ -863,11 +870,11 @@ function get$1(e2) {
863
870
  null !== R && R.includes(e2) && function state_unsafe_local_read() {
864
871
  throw new Error("https://svelte.dev/e/state_unsafe_local_read");
865
872
  }();
866
- var i2 = F.deps;
873
+ var o2 = F.deps;
867
874
  e2.rv < Y && (e2.rv = Y, // If the signal is accessing the same dependencies in the same
868
875
  // order as it did last time, increment `skipped_deps`
869
876
  // rather than updating `new_deps`, which creates GC cost
870
- 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
877
+ null === V && null !== o2 && o2[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
871
878
  // an unowned derived because skip_reaction is true, then we need to ensure that
872
879
  // we don't have duplicates
873
880
  V.push(e2));
@@ -909,9 +916,9 @@ function deep_read(e2, t2 = /* @__PURE__ */ new Set()) {
909
916
  if (n2 !== Object.prototype && n2 !== Array.prototype && n2 !== Map.prototype && n2 !== Set.prototype && n2 !== Date.prototype) {
910
917
  const t3 = a(n2);
911
918
  for (let n3 in t3) {
912
- const o2 = t3[n3].get;
913
- if (o2) try {
914
- o2.call(e2);
919
+ const i2 = t3[n3].get;
920
+ if (i2) try {
921
+ i2.call(e2);
915
922
  } catch (e3) {
916
923
  }
917
924
  }
@@ -965,23 +972,23 @@ function without_reactive_context(e2) {
965
972
  set_active_reaction(t2), set_active_effect(n2);
966
973
  }
967
974
  }
968
- function listen_to_event_and_reset_event(e2, t2, n2, o2 = n2) {
975
+ function listen_to_event_and_reset_event(e2, t2, n2, i2 = n2) {
969
976
  e2.addEventListener(t2, () => without_reactive_context(n2));
970
- const i2 = e2.__on_r;
971
- e2.__on_r = i2 ? () => {
972
- i2(), o2(true);
973
- } : () => o2(true), function add_form_reset_listener() {
977
+ const o2 = e2.__on_r;
978
+ e2.__on_r = o2 ? () => {
979
+ o2(), i2(true);
980
+ } : () => i2(true), function add_form_reset_listener() {
974
981
  re || (re = true, document.addEventListener(
975
982
  "reset",
976
983
  (e3) => {
977
984
  Promise.resolve().then(() => {
978
- var _a;
985
+ var _a2;
979
986
  if (!e3.defaultPrevented) for (
980
987
  const t3 of
981
988
  /**@type {HTMLFormElement} */
982
989
  e3.target.elements
983
990
  )
984
- (_a = t3.__on_r) == null ? void 0 : _a.call(t3);
991
+ (_a2 = t3.__on_r) == null ? void 0 : _a2.call(t3);
985
992
  });
986
993
  },
987
994
  // In the capture phase to guarantee we get noticed of it (no possiblity of stopPropagation)
@@ -991,35 +998,35 @@ function listen_to_event_and_reset_event(e2, t2, n2, o2 = n2) {
991
998
  ));
992
999
  }();
993
1000
  }
994
- const oe = /* @__PURE__ */ new Set(), ie = /* @__PURE__ */ new Set();
995
- function create_event(e2, t2, n2, o2 = {}) {
1001
+ const ie = /* @__PURE__ */ new Set(), oe = /* @__PURE__ */ new Set();
1002
+ function create_event(e2, t2, n2, i2 = {}) {
996
1003
  function target_handler(e3) {
997
- if (o2.capture || // Only call in the bubble phase, else delegated events would be called before the capturing events
1004
+ if (i2.capture || // Only call in the bubble phase, else delegated events would be called before the capturing events
998
1005
  handle_event_propagation.call(t2, e3), !e3.cancelBubble) return without_reactive_context(() => n2 == null ? void 0 : n2.call(this, e3));
999
1006
  }
1000
1007
  return e2.startsWith("pointer") || e2.startsWith("touch") || "wheel" === e2 ? queue_micro_task(() => {
1001
- t2.addEventListener(e2, target_handler, o2);
1002
- }) : t2.addEventListener(e2, target_handler, o2), target_handler;
1008
+ t2.addEventListener(e2, target_handler, i2);
1009
+ }) : t2.addEventListener(e2, target_handler, i2), target_handler;
1003
1010
  }
1004
- function event(e2, t2, n2, o2, i2) {
1011
+ function event(e2, t2, n2, i2, o2) {
1005
1012
  var s2 = {
1006
- capture: o2,
1007
- passive: i2
1013
+ capture: i2,
1014
+ passive: o2
1008
1015
  }, a2 = create_event(e2, t2, n2, s2);
1009
1016
  t2 !== document.body && t2 !== window && t2 !== document || teardown(() => {
1010
1017
  t2.removeEventListener(e2, a2, s2);
1011
1018
  });
1012
1019
  }
1013
1020
  function delegate(e2) {
1014
- for (var t2 = 0; t2 < e2.length; t2++) oe.add(e2[t2]);
1015
- for (var n2 of ie) n2(e2);
1021
+ for (var t2 = 0; t2 < e2.length; t2++) ie.add(e2[t2]);
1022
+ for (var n2 of oe) n2(e2);
1016
1023
  }
1017
1024
  function handle_event_propagation(e2) {
1018
- var _a;
1019
- var n2 = this, o2 = (
1025
+ var _a2;
1026
+ var n2 = this, i2 = (
1020
1027
  /** @type {Node} */
1021
1028
  n2.ownerDocument
1022
- ), s2 = e2.type, a2 = ((_a = e2.composedPath) == null ? void 0 : _a.call(e2)) || [], l2 = (
1029
+ ), s2 = e2.type, a2 = ((_a2 = e2.composedPath) == null ? void 0 : _a2.call(e2)) || [], l2 = (
1023
1030
  /** @type {null | Element} */
1024
1031
  a2[0] || e2.target
1025
1032
  ), c2 = 0, u2 = e2.__root;
@@ -1035,9 +1042,9 @@ function handle_event_propagation(e2) {
1035
1042
  }
1036
1043
  if ((l2 = /** @type {Element} */
1037
1044
  a2[c2] || e2.target) !== n2) {
1038
- i(e2, "currentTarget", {
1045
+ o(e2, "currentTarget", {
1039
1046
  configurable: true,
1040
- get: () => l2 || o2
1047
+ get: () => l2 || i2
1041
1048
  });
1042
1049
  var p2 = F, _2 = H;
1043
1050
  set_active_reaction(null), set_active_effect(null);
@@ -1086,15 +1093,15 @@ function assign_nodes(e2, t2) {
1086
1093
  }
1087
1094
  // @__NO_SIDE_EFFECTS__
1088
1095
  function template(e2, t2) {
1089
- var n2, o2 = !!(1 & t2), i2 = !!(2 & t2), s2 = !e2.startsWith("<!>");
1096
+ var n2, i2 = !!(1 & t2), o2 = !!(2 & t2), s2 = !e2.startsWith("<!>");
1090
1097
  return () => {
1091
- void 0 === n2 && (n2 = create_fragment_from_html(s2 ? e2 : "<!>" + e2), o2 || (n2 = /** @type {Node} */
1098
+ void 0 === n2 && (n2 = create_fragment_from_html(s2 ? e2 : "<!>" + e2), i2 || (n2 = /** @type {Node} */
1092
1099
  /* @__PURE__ */ get_first_child(n2)));
1093
1100
  var t3 = (
1094
1101
  /** @type {TemplateNode} */
1095
- i2 || P ? document.importNode(n2, true) : n2.cloneNode(true)
1102
+ o2 || P ? document.importNode(n2, true) : n2.cloneNode(true)
1096
1103
  );
1097
- o2 ? assign_nodes(
1104
+ i2 ? assign_nodes(
1098
1105
  /** @type {TemplateNode} */
1099
1106
  /* @__PURE__ */ get_first_child(t3),
1100
1107
  /** @type {TemplateNode} */
@@ -1105,22 +1112,22 @@ function template(e2, t2) {
1105
1112
  }
1106
1113
  // @__NO_SIDE_EFFECTS__
1107
1114
  function ns_template(e2, t2, n2 = "svg") {
1108
- var o2, i2 = `<${n2}>${!e2.startsWith("<!>") ? e2 : "<!>" + e2}</${n2}>`;
1115
+ var i2, o2 = `<${n2}>${!e2.startsWith("<!>") ? e2 : "<!>" + e2}</${n2}>`;
1109
1116
  return () => {
1110
- if (!o2) {
1117
+ if (!i2) {
1111
1118
  var e3 = (
1112
1119
  /** @type {Element} */
1113
1120
  /* @__PURE__ */ get_first_child(
1114
1121
  /** @type {DocumentFragment} */
1115
- create_fragment_from_html(i2)
1122
+ create_fragment_from_html(o2)
1116
1123
  )
1117
1124
  );
1118
- o2 = /** @type {Element} */
1125
+ i2 = /** @type {Element} */
1119
1126
  /* @__PURE__ */ get_first_child(e3);
1120
1127
  }
1121
1128
  var t3 = (
1122
1129
  /** @type {TemplateNode} */
1123
- o2.cloneNode(true)
1130
+ i2.cloneNode(true)
1124
1131
  );
1125
1132
  return assign_nodes(t3, t3), t3;
1126
1133
  };
@@ -1149,14 +1156,14 @@ function set_text(e2, t2) {
1149
1156
  (e2.__t = n2, e2.nodeValue = n2 + "");
1150
1157
  }
1151
1158
  function mount(e2, t2) {
1152
- return function _mount(e3, { target: t3, anchor: n2, props: i2 = {}, events: a2, context: l2, intro: c2 = true }) {
1159
+ return function _mount(e3, { target: t3, anchor: n2, props: o2 = {}, events: a2, context: l2, intro: c2 = true }) {
1153
1160
  !/**
1154
1161
  * Initialize these lazily to avoid issues when using the runtime in a server context
1155
1162
  * where these globals are not available while avoiding a separate server entry point
1156
1163
  */
1157
1164
  function init_operations() {
1158
- if (void 0 === T) {
1159
- T = window, q = document, P = /Firefox/.test(navigator.userAgent);
1165
+ if (void 0 === S) {
1166
+ S = window, T = document, P = /Firefox/.test(navigator.userAgent);
1160
1167
  var e4 = Element.prototype, t4 = Node.prototype;
1161
1168
  O = s(t4, "firstChild").get, // @ts-ignore
1162
1169
  E = s(t4, "nextSibling").get, // the following assignments improve perf of lookups on DOM nodes
@@ -1171,25 +1178,25 @@ function mount(e2, t2) {
1171
1178
  }();
1172
1179
  var u2 = /* @__PURE__ */ new Set(), event_handle = (e4) => {
1173
1180
  for (var n3 = 0; n3 < e4.length; n3++) {
1174
- var o2 = e4[n3];
1175
- if (!u2.has(o2)) {
1176
- u2.add(o2);
1177
- var i3 = is_passive_event(o2);
1178
- t3.addEventListener(o2, handle_event_propagation, {
1179
- passive: i3
1181
+ var i2 = e4[n3];
1182
+ if (!u2.has(i2)) {
1183
+ u2.add(i2);
1184
+ var o3 = is_passive_event(i2);
1185
+ t3.addEventListener(i2, handle_event_propagation, {
1186
+ passive: o3
1180
1187
  });
1181
- var s2 = ae.get(o2);
1188
+ var s2 = ae.get(i2);
1182
1189
  void 0 === s2 ? (
1183
1190
  // The document listener ensures we catch events that originate from elements that were
1184
1191
  // manually moved outside of the container (e.g. via manual portals).
1185
- (document.addEventListener(o2, handle_event_propagation, {
1186
- passive: i3
1187
- }), ae.set(o2, 1))
1188
- ) : ae.set(o2, s2 + 1);
1192
+ (document.addEventListener(i2, handle_event_propagation, {
1193
+ passive: o3
1194
+ }), ae.set(i2, 1))
1195
+ ) : ae.set(i2, s2 + 1);
1189
1196
  }
1190
1197
  }
1191
1198
  };
1192
- event_handle(o(oe)), ie.add(event_handle);
1199
+ event_handle(i(ie)), oe.add(event_handle);
1193
1200
  var d2 = void 0, f2 = (
1194
1201
  /**
1195
1202
  * An effect root whose children can transition out
@@ -1204,25 +1211,25 @@ function mount(e2, t2) {
1204
1211
  }) : (destroy_effect(t4), n3(void 0));
1205
1212
  });
1206
1213
  }(() => {
1207
- var o2 = n2 ?? t3.appendChild(create_text());
1214
+ var i2 = n2 ?? t3.appendChild(create_text());
1208
1215
  return branch(() => {
1209
1216
  l2 && (push({}), /** @type {ComponentContext} */
1210
1217
  I.c = l2);
1211
1218
  a2 && // We can't spread the object or else we'd lose the state proxy stuff, if it is one
1212
1219
  /** @type {any} */
1213
- (i2.$$events = a2), se = c2, // @ts-expect-error the public typings are not what the actual function looks like
1214
- d2 = e3(o2, i2) || {}, se = true, l2 && pop();
1220
+ (o2.$$events = a2), se = c2, // @ts-expect-error the public typings are not what the actual function looks like
1221
+ d2 = e3(i2, o2) || {}, se = true, l2 && pop();
1215
1222
  }), () => {
1216
- var _a;
1223
+ var _a2;
1217
1224
  for (var e4 of u2) {
1218
1225
  t3.removeEventListener(e4, handle_event_propagation);
1219
- var i3 = (
1226
+ var o3 = (
1220
1227
  /** @type {number} */
1221
1228
  ae.get(e4)
1222
1229
  );
1223
- 0 == --i3 ? (document.removeEventListener(e4, handle_event_propagation), ae.delete(e4)) : ae.set(e4, i3);
1230
+ 0 == --o3 ? (document.removeEventListener(e4, handle_event_propagation), ae.delete(e4)) : ae.set(e4, o3);
1224
1231
  }
1225
- ie.delete(event_handle), o2 !== n2 && ((_a = o2.parentNode) == null ? void 0 : _a.removeChild(o2));
1232
+ oe.delete(event_handle), i2 !== n2 && ((_a2 = i2.parentNode) == null ? void 0 : _a2.removeChild(i2));
1226
1233
  };
1227
1234
  })
1228
1235
  );
@@ -1232,14 +1239,14 @@ function mount(e2, t2) {
1232
1239
  const ae = /* @__PURE__ */ new Map();
1233
1240
  let le = /* @__PURE__ */ new WeakMap();
1234
1241
  function if_block(e2, t2, n2 = false) {
1235
- var o2 = e2, i2 = null, s2 = null, a2 = M, l2 = false;
1242
+ var i2 = e2, o2 = null, s2 = null, a2 = M, l2 = false;
1236
1243
  const set_branch = (e3, t3 = true) => {
1237
1244
  l2 = true, update_branch(t3, e3);
1238
1245
  }, update_branch = (e3, t3) => {
1239
- a2 !== (a2 = e3) && (a2 ? (i2 ? resume_effect(i2) : t3 && (i2 = branch(() => t3(o2))), s2 && pause_effect(s2, () => {
1246
+ a2 !== (a2 = e3) && (a2 ? (o2 ? resume_effect(o2) : t3 && (o2 = branch(() => t3(i2))), s2 && pause_effect(s2, () => {
1240
1247
  s2 = null;
1241
- })) : (s2 ? resume_effect(s2) : t3 && (s2 = branch(() => t3(o2))), i2 && pause_effect(i2, () => {
1242
- i2 = null;
1248
+ })) : (s2 ? resume_effect(s2) : t3 && (s2 = branch(() => t3(i2))), o2 && pause_effect(o2, () => {
1249
+ o2 = null;
1243
1250
  })));
1244
1251
  };
1245
1252
  block(() => {
@@ -1253,7 +1260,7 @@ function set_current_each_item(e2) {
1253
1260
  function index(e2, t2) {
1254
1261
  return t2;
1255
1262
  }
1256
- function each(e2, n2, i2, s2, a2, l2 = null) {
1263
+ function each(e2, n2, o2, s2, a2, l2 = null) {
1257
1264
  var c2 = e2, u2 = {
1258
1265
  flags: n2,
1259
1266
  items: /* @__PURE__ */ new Map(),
@@ -1262,8 +1269,8 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
1262
1269
  !(4 & n2) || (c2 = /** @type {Element} */
1263
1270
  e2.appendChild(create_text()));
1264
1271
  var d2 = null, f2 = false, p2 = /* @__PURE__ */ derived_safe_equal(() => {
1265
- var e3 = i2();
1266
- return t(e3) ? e3 : null == e3 ? [] : o(e3);
1272
+ var e3 = o2();
1273
+ return t(e3) ? e3 : null == e3 ? [] : i(e3);
1267
1274
  });
1268
1275
  block(() => {
1269
1276
  var e3 = get$1(p2), t2 = e3.length;
@@ -1279,20 +1286,20 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
1279
1286
  * @param {() => V[]} get_collection
1280
1287
  * @returns {void}
1281
1288
  */
1282
- function reconcile(e4, t3, n3, i3, s3, a3, l3) {
1283
- var _a, _b, _c, _d;
1289
+ function reconcile(e4, t3, n3, o3, s3, a3, l3) {
1290
+ var _a2, _b, _c, _d;
1284
1291
  var c3, u3, d3, f3, p3, _2, v2 = !!(8 & s3), g2 = !!(3 & s3), h2 = e4.length, b2 = t3.items, y2 = t3.first, $2 = y2, w2 = null, x2 = [], k2 = [];
1285
- if (v2) for (_2 = 0; _2 < h2; _2 += 1) f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = b2.get(f3)) && ((_a = p3.a) == null ? void 0 : _a.measure(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).add(p3));
1292
+ if (v2) for (_2 = 0; _2 < h2; _2 += 1) f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = b2.get(f3)) && ((_a2 = p3.a) == null ? void 0 : _a2.measure(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).add(p3));
1286
1293
  for (_2 = 0; _2 < h2; _2 += 1) if (f3 = a3(d3 = e4[_2], _2), void 0 !== (p3 = b2.get(f3))) {
1287
1294
  if (g2 && update_item(p3, d3, _2, s3), p3.e.f & m && (resume_effect(p3.e), v2 && ((_b = p3.a) == null ? void 0 : _b.unfix(), (u3 ?? (u3 = /* @__PURE__ */ new Set())).delete(p3))), p3 !== $2) {
1288
1295
  if (void 0 !== c3 && c3.has(p3)) {
1289
1296
  if (x2.length < k2.length) {
1290
1297
  var C2, M2 = k2[0];
1291
1298
  w2 = M2.prev;
1292
- var S2 = x2[0], I2 = x2[x2.length - 1];
1299
+ var q2 = x2[0], I2 = x2[x2.length - 1];
1293
1300
  for (C2 = 0; C2 < x2.length; C2 += 1) move(x2[C2], M2, n3);
1294
1301
  for (C2 = 0; C2 < k2.length; C2 += 1) c3.delete(k2[C2]);
1295
- link(t3, S2.prev, I2.next), link(t3, w2, S2), link(t3, I2, M2), $2 = M2, w2 = I2, _2 -= 1, x2 = [], k2 = [];
1302
+ link(t3, q2.prev, I2.next), link(t3, w2, q2), link(t3, I2, M2), $2 = M2, w2 = I2, _2 -= 1, x2 = [], k2 = [];
1296
1303
  } else
1297
1304
  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;
1298
1305
  continue;
@@ -1307,21 +1314,21 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
1307
1314
  w2 = create_item($2 ? (
1308
1315
  /** @type {TemplateNode} */
1309
1316
  $2.e.nodes_start
1310
- ) : n3, t3, w2, null === w2 ? t3.first : w2.next, d3, f3, _2, i3, s3, l3), b2.set(f3, w2), x2 = [], k2 = [], $2 = w2.next;
1317
+ ) : n3, t3, w2, null === w2 ? t3.first : w2.next, d3, f3, _2, o3, s3, l3), b2.set(f3, w2), x2 = [], k2 = [], $2 = w2.next;
1311
1318
  }
1312
1319
  if (null !== $2 || void 0 !== c3) {
1313
- for (var T2 = void 0 === c3 ? [] : o(c3); null !== $2; )
1314
- $2.e.f & m || T2.push($2), $2 = $2.next;
1315
- var q2 = T2.length;
1316
- if (q2 > 0) {
1320
+ for (var S2 = void 0 === c3 ? [] : i(c3); null !== $2; )
1321
+ $2.e.f & m || S2.push($2), $2 = $2.next;
1322
+ var T2 = S2.length;
1323
+ if (T2 > 0) {
1317
1324
  var P2 = 4 & s3 && 0 === h2 ? n3 : null;
1318
1325
  if (v2) {
1319
- for (_2 = 0; _2 < q2; _2 += 1) (_c = T2[_2].a) == null ? void 0 : _c.measure();
1320
- for (_2 = 0; _2 < q2; _2 += 1) (_d = T2[_2].a) == null ? void 0 : _d.fix();
1326
+ for (_2 = 0; _2 < T2; _2 += 1) (_c = S2[_2].a) == null ? void 0 : _c.measure();
1327
+ for (_2 = 0; _2 < T2; _2 += 1) (_d = S2[_2].a) == null ? void 0 : _d.fix();
1321
1328
  }
1322
- !function pause_effects(e5, t4, n4, o2) {
1323
- for (var i4 = [], s4 = t4.length, a4 = 0; a4 < s4; a4++) pause_children(t4[a4].e, i4, true);
1324
- var l4 = s4 > 0 && 0 === i4.length && null !== n4;
1329
+ !function pause_effects(e5, t4, n4, i2) {
1330
+ for (var o4 = [], s4 = t4.length, a4 = 0; a4 < s4; a4++) pause_children(t4[a4].e, o4, true);
1331
+ var l4 = s4 > 0 && 0 === o4.length && null !== n4;
1325
1332
  if (l4) {
1326
1333
  var c4 = (
1327
1334
  /** @type {Element} */
@@ -1333,24 +1340,24 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
1333
1340
  }(c4), c4.append(
1334
1341
  /** @type {Element} */
1335
1342
  n4
1336
- ), o2.clear(), link(e5, t4[0].prev, t4[s4 - 1].next);
1343
+ ), i2.clear(), link(e5, t4[0].prev, t4[s4 - 1].next);
1337
1344
  }
1338
- run_out_transitions(i4, () => {
1345
+ run_out_transitions(o4, () => {
1339
1346
  for (var n5 = 0; n5 < s4; n5++) {
1340
- var i5 = t4[n5];
1341
- l4 || (o2.delete(i5.k), link(e5, i5.prev, i5.next)), destroy_effect(i5.e, !l4);
1347
+ var o5 = t4[n5];
1348
+ l4 || (i2.delete(o5.k), link(e5, o5.prev, o5.next)), destroy_effect(o5.e, !l4);
1342
1349
  }
1343
1350
  });
1344
- }(t3, T2, P2, b2);
1351
+ }(t3, S2, P2, b2);
1345
1352
  }
1346
1353
  }
1347
1354
  v2 && queue_micro_task(() => {
1348
- var _a2;
1349
- if (void 0 !== u3) for (p3 of u3) (_a2 = p3.a) == null ? void 0 : _a2.apply();
1355
+ var _a3;
1356
+ if (void 0 !== u3) for (p3 of u3) (_a3 = p3.a) == null ? void 0 : _a3.apply();
1350
1357
  });
1351
1358
  H.first = t3.first && t3.first.e, /** @type {Effect} */
1352
1359
  H.last = w2 && w2.e;
1353
- }(e3, u2, c2, a2, n2, s2, i2), null !== l2 && (0 === t2 ? d2 ? resume_effect(d2) : d2 = branch(() => l2(c2)) : null !== d2 && pause_effect(d2, () => {
1360
+ }(e3, u2, c2, a2, n2, s2, o2), null !== l2 && (0 === t2 ? d2 ? resume_effect(d2) : d2 = branch(() => l2(c2)) : null !== d2 && pause_effect(d2, () => {
1354
1361
  d2 = null;
1355
1362
  })), // When we mount the each block for the first time, the collection won't be
1356
1363
  // connected to this effect as the effect hasn't finished running yet and its deps
@@ -1361,15 +1368,15 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
1361
1368
  get$1(p2));
1362
1369
  });
1363
1370
  }
1364
- function update_item(e2, t2, n2, o2) {
1365
- 1 & o2 && internal_set(e2.v, t2), 2 & o2 ? internal_set(
1371
+ function update_item(e2, t2, n2, i2) {
1372
+ 1 & i2 && internal_set(e2.v, t2), 2 & i2 ? internal_set(
1366
1373
  /** @type {Value<number>} */
1367
1374
  e2.i,
1368
1375
  n2
1369
1376
  ) : e2.i = n2;
1370
1377
  }
1371
- function create_item(e2, t2, n2, o2, i2, s2, a2, l2, c2, u2) {
1372
- var d2 = ce, f2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(i2) : source(i2) : i2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
1378
+ function create_item(e2, t2, n2, i2, o2, s2, a2, l2, c2, u2) {
1379
+ var d2 = ce, f2 = !!(1 & c2) ? !(16 & c2) ? /* @__PURE__ */ mutable_source(o2) : source(o2) : o2, p2 = 2 & c2 ? source(a2) : a2, _2 = {
1373
1380
  i: p2,
1374
1381
  v: f2,
1375
1382
  k: s2,
@@ -1377,81 +1384,81 @@ function create_item(e2, t2, n2, o2, i2, s2, a2, l2, c2, u2) {
1377
1384
  // @ts-expect-error
1378
1385
  e: null,
1379
1386
  prev: n2,
1380
- next: o2
1387
+ next: i2
1381
1388
  };
1382
1389
  ce = _2;
1383
1390
  try {
1384
- 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;
1391
+ return _2.e = branch(() => l2(e2, f2, p2, u2), false), _2.e.prev = n2 && n2.e, _2.e.next = i2 && i2.e, null === n2 ? t2.first = _2 : (n2.next = _2, n2.e.next = _2.e), null !== i2 && (i2.prev = _2, i2.e.prev = _2.e), _2;
1385
1392
  } finally {
1386
1393
  ce = d2;
1387
1394
  }
1388
1395
  }
1389
1396
  function move(e2, t2, n2) {
1390
- for (var o2 = e2.next ? (
1397
+ for (var i2 = e2.next ? (
1391
1398
  /** @type {TemplateNode} */
1392
1399
  e2.next.e.nodes_start
1393
- ) : n2, i2 = t2 ? (
1400
+ ) : n2, o2 = t2 ? (
1394
1401
  /** @type {TemplateNode} */
1395
1402
  t2.e.nodes_start
1396
1403
  ) : n2, s2 = (
1397
1404
  /** @type {TemplateNode} */
1398
1405
  e2.e.nodes_start
1399
- ); s2 !== o2; ) {
1406
+ ); s2 !== i2; ) {
1400
1407
  var a2 = (
1401
1408
  /** @type {TemplateNode} */
1402
1409
  /* @__PURE__ */ get_next_sibling(s2)
1403
1410
  );
1404
- i2.before(s2), s2 = a2;
1411
+ o2.before(s2), s2 = a2;
1405
1412
  }
1406
1413
  }
1407
1414
  function link(e2, t2, n2) {
1408
1415
  null === t2 ? e2.first = n2 : (t2.next = n2, t2.e.next = n2 && n2.e), null !== n2 && (n2.prev = t2, n2.e.prev = t2 && t2.e);
1409
1416
  }
1410
- function slot(e2, t2, n2, o2, i2) {
1411
- var _a;
1412
- var s2 = (_a = t2.$$slots) == null ? void 0 : _a[n2], a2 = false;
1413
- true === s2 && (s2 = t2["default" === n2 ? "children" : n2], a2 = true), void 0 === s2 ? null !== i2 && i2(e2) : s2(e2, a2 ? () => o2 : o2);
1417
+ function slot(e2, t2, n2, i2, o2) {
1418
+ var _a2;
1419
+ var s2 = (_a2 = t2.$$slots) == null ? void 0 : _a2[n2], a2 = false;
1420
+ true === s2 && (s2 = t2["default" === n2 ? "children" : n2], a2 = true), void 0 === s2 ? null !== o2 && o2(e2) : s2(e2, a2 ? () => i2 : i2);
1414
1421
  }
1415
1422
  function component(e2, t2, n2) {
1416
- var o2, i2, s2 = e2;
1423
+ var i2, o2, s2 = e2;
1417
1424
  block(() => {
1418
- o2 !== (o2 = t2()) && (i2 && (pause_effect(i2), i2 = null), o2 && (i2 = branch(() => n2(s2, o2))));
1425
+ i2 !== (i2 = t2()) && (o2 && (pause_effect(o2), o2 = null), i2 && (o2 = branch(() => n2(s2, i2))));
1419
1426
  }, y);
1420
1427
  }
1421
1428
  function r(e2) {
1422
- var t2, n2, o2 = "";
1423
- if ("string" == typeof e2 || "number" == typeof e2) o2 += e2;
1429
+ var t2, n2, i2 = "";
1430
+ if ("string" == typeof e2 || "number" == typeof e2) i2 += e2;
1424
1431
  else if ("object" == typeof e2) if (Array.isArray(e2)) {
1425
- var i2 = e2.length;
1426
- for (t2 = 0; t2 < i2; t2++) e2[t2] && (n2 = r(e2[t2])) && (o2 && (o2 += " "), o2 += n2);
1427
- } else for (n2 in e2) e2[n2] && (o2 && (o2 += " "), o2 += n2);
1428
- return o2;
1432
+ var o2 = e2.length;
1433
+ for (t2 = 0; t2 < o2; t2++) e2[t2] && (n2 = r(e2[t2])) && (i2 && (i2 += " "), i2 += n2);
1434
+ } else for (n2 in e2) e2[n2] && (i2 && (i2 += " "), i2 += n2);
1435
+ return i2;
1429
1436
  }
1430
1437
  function clsx(e2) {
1431
1438
  return "object" == typeof e2 ? function clsx$1() {
1432
- for (var e3, t2, n2 = 0, o2 = "", i2 = arguments.length; n2 < i2; n2++) (e3 = arguments[n2]) && (t2 = r(e3)) && (o2 && (o2 += " "), o2 += t2);
1433
- return o2;
1439
+ for (var e3, t2, n2 = 0, i2 = "", o2 = arguments.length; n2 < o2; n2++) (e3 = arguments[n2]) && (t2 = r(e3)) && (i2 && (i2 += " "), i2 += t2);
1440
+ return i2;
1434
1441
  }(e2) : e2 ?? "";
1435
1442
  }
1436
1443
  const ue = [..." \n\r\f \v\uFEFF"];
1437
- function set_class(e2, t2, n2, o2, i2, s2) {
1444
+ function set_class(e2, t2, n2, i2, o2, s2) {
1438
1445
  if (e2.__className !== n2) {
1439
1446
  var a2 = function to_class(e3, t3, n3) {
1440
- var o3 = null == e3 ? "" : "" + e3;
1441
- if (t3 && (o3 = o3 ? o3 + " " + t3 : t3), n3) {
1442
- for (var i3 in n3) if (n3[i3]) o3 = o3 ? o3 + " " + i3 : i3;
1443
- else if (o3.length) for (var s3 = i3.length, a3 = 0; (a3 = o3.indexOf(i3, a3)) >= 0; ) {
1447
+ var i3 = null == e3 ? "" : "" + e3;
1448
+ if (t3 && (i3 = i3 ? i3 + " " + t3 : t3), n3) {
1449
+ for (var o3 in n3) if (n3[o3]) i3 = i3 ? i3 + " " + o3 : o3;
1450
+ else if (i3.length) for (var s3 = o3.length, a3 = 0; (a3 = i3.indexOf(o3, a3)) >= 0; ) {
1444
1451
  var l3 = a3 + s3;
1445
- 0 !== a3 && !ue.includes(o3[a3 - 1]) || l3 !== o3.length && !ue.includes(o3[l3]) ? a3 = l3 : o3 = (0 === a3 ? "" : o3.substring(0, a3)) + o3.substring(l3 + 1);
1452
+ 0 !== a3 && !ue.includes(i3[a3 - 1]) || l3 !== i3.length && !ue.includes(i3[l3]) ? a3 = l3 : i3 = (0 === a3 ? "" : i3.substring(0, a3)) + i3.substring(l3 + 1);
1446
1453
  }
1447
1454
  }
1448
- return "" === o3 ? null : o3;
1449
- }(n2, o2, s2);
1455
+ return "" === i3 ? null : i3;
1456
+ }(n2, i2, s2);
1450
1457
  null == a2 ? e2.removeAttribute("class") : t2 ? e2.className = a2 : e2.setAttribute("class", a2), // @ts-expect-error need to add __className to patched prototype
1451
1458
  e2.__className = n2;
1452
1459
  } else if (s2) for (var l2 in s2) {
1453
1460
  var c2 = !!s2[l2];
1454
- null != i2 && c2 === !!i2[l2] || e2.classList.toggle(l2, c2);
1461
+ null != o2 && c2 === !!o2[l2] || e2.classList.toggle(l2, c2);
1455
1462
  }
1456
1463
  return s2;
1457
1464
  }
@@ -1463,19 +1470,19 @@ function set_selected(e2, t2) {
1463
1470
  e2.hasAttribute("selected") || e2.setAttribute("selected", "")
1464
1471
  ) : e2.removeAttribute("selected");
1465
1472
  }
1466
- function set_attribute(e2, t2, n2, o2) {
1467
- var i2 = e2.__attributes ?? (e2.__attributes = {});
1468
- i2[t2] !== (i2[t2] = n2) && ("style" === t2 && "__styles" in e2 && // reset styles to force style: directive to update
1473
+ function set_attribute(e2, t2, n2, i2) {
1474
+ var o2 = e2.__attributes ?? (e2.__attributes = {});
1475
+ o2[t2] !== (o2[t2] = n2) && ("style" === t2 && "__styles" in e2 && // reset styles to force style: directive to update
1469
1476
  (e2.__styles = {}), "loading" === t2 && // @ts-expect-error
1470
1477
  (e2[k] = n2), null == n2 ? e2.removeAttribute(t2) : "string" != typeof n2 && get_setters(e2).includes(t2) ? (
1471
1478
  // @ts-ignore
1472
1479
  e2[t2] = n2
1473
1480
  ) : e2.setAttribute(t2, n2));
1474
1481
  }
1475
- function set_attributes(e2, t2, n2, o2, i2 = false, s2 = false, a2 = false) {
1482
+ function set_attributes(e2, t2, n2, i2, o2 = false, s2 = false, a2 = false) {
1476
1483
  var l2 = t2 || {}, c2 = "OPTION" === e2.tagName;
1477
1484
  for (var u2 in t2) u2 in n2 || (n2[u2] = null);
1478
- n2.class ? n2.class = clsx(n2.class) : (o2 || n2[de]) && (n2.class = null);
1485
+ n2.class ? n2.class = clsx(n2.class) : (i2 || n2[de]) && (n2.class = null);
1479
1486
  var d2 = get_setters(e2), f2 = (
1480
1487
  /** @type {Record<string, unknown>} **/
1481
1488
  e2.__attributes ?? (e2.__attributes = {})
@@ -1521,7 +1528,7 @@ function set_attributes(e2, t2, n2, o2, i2 = false, s2 = false, a2 = false) {
1521
1528
  );
1522
1529
  else {
1523
1530
  var g2 = m2;
1524
- i2 || (g2 = normalize_attribute(g2));
1531
+ o2 || (g2 = normalize_attribute(g2));
1525
1532
  var h2 = "defaultValue" === g2 || "defaultChecked" === g2;
1526
1533
  if (null != b2 || s2 || h2) h2 || d2.includes(g2) && (s2 || "string" != typeof b2) ? (
1527
1534
  // @ts-ignore
@@ -1550,7 +1557,7 @@ function set_attributes(e2, t2, n2, o2, i2 = false, s2 = false, a2 = false) {
1550
1557
  }
1551
1558
  }
1552
1559
  } else {
1553
- set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, o2, t2 == null ? void 0 : t2[de], n2[de]), l2[m2] = b2, l2[de] = n2[de];
1560
+ set_class(e2, "http://www.w3.org/1999/xhtml" === e2.namespaceURI, b2, i2, t2 == null ? void 0 : t2[de], n2[de]), l2[m2] = b2, l2[de] = n2[de];
1554
1561
  }
1555
1562
  }
1556
1563
  return l2;
@@ -1560,15 +1567,15 @@ function get_setters(e2) {
1560
1567
  var t2, n2 = fe.get(e2.nodeName);
1561
1568
  if (n2) return n2;
1562
1569
  fe.set(e2.nodeName, n2 = []);
1563
- for (var o2 = e2, i2 = Element.prototype; i2 !== o2; ) {
1564
- for (var s2 in t2 = a(o2)) t2[s2].set && n2.push(s2);
1565
- o2 = u(o2);
1570
+ for (var i2 = e2, o2 = Element.prototype; o2 !== i2; ) {
1571
+ for (var s2 in t2 = a(i2)) t2[s2].set && n2.push(s2);
1572
+ i2 = u(i2);
1566
1573
  }
1567
1574
  return n2;
1568
1575
  }
1569
- function set_style(e2, t2, n2, o2) {
1570
- var i2 = e2.__styles ?? (e2.__styles = {});
1571
- i2[t2] !== n2 && (i2[t2] = n2, null == n2 ? e2.style.removeProperty(t2) : e2.style.setProperty(t2, n2, ""));
1576
+ function set_style(e2, t2, n2, i2) {
1577
+ var o2 = e2.__styles ?? (e2.__styles = {});
1578
+ o2[t2] !== n2 && (o2[t2] = n2, null == n2 ? e2.style.removeProperty(t2) : e2.style.setProperty(t2, n2, ""));
1572
1579
  }
1573
1580
  const pe = {
1574
1581
  // don't access requestAnimationFrame eagerly outside method
@@ -1605,20 +1612,20 @@ function css_property_to_camelcase(e2) {
1605
1612
  function css_to_keyframe(e2) {
1606
1613
  const t2 = {}, n2 = e2.split(";");
1607
1614
  for (const e3 of n2) {
1608
- const [n3, o2] = e3.split(":");
1609
- if (!n3 || void 0 === o2) break;
1610
- t2[css_property_to_camelcase(n3.trim())] = o2.trim();
1615
+ const [n3, i2] = e3.split(":");
1616
+ if (!n3 || void 0 === i2) break;
1617
+ t2[css_property_to_camelcase(n3.trim())] = i2.trim();
1611
1618
  }
1612
1619
  return t2;
1613
1620
  }
1614
1621
  const linear = (e2) => e2;
1615
- function transition(e2, t2, n2, o2) {
1616
- var i2, s2, a2, l2 = !!(4 & e2), c2 = t2.inert, u2 = t2.style.overflow;
1622
+ function transition(e2, t2, n2, i2) {
1623
+ var o2, s2, a2, l2 = !!(4 & e2), c2 = t2.inert, u2 = t2.style.overflow;
1617
1624
  function get_options() {
1618
1625
  var e3 = F, s3 = H;
1619
1626
  set_active_reaction(null), set_active_effect(null);
1620
1627
  try {
1621
- return i2 ?? (i2 = n2()(t2, (o2 == null ? void 0 : o2()) ?? /** @type {P} */
1628
+ return o2 ?? (o2 = n2()(t2, (i2 == null ? void 0 : i2()) ?? /** @type {P} */
1622
1629
  {}, {
1623
1630
  direction: "both"
1624
1631
  }));
@@ -1631,7 +1638,7 @@ function transition(e2, t2, n2, o2) {
1631
1638
  in() {
1632
1639
  t2.inert = c2, dispatch_event(t2, "introstart"), s2 = animate(t2, get_options(), a2, 1, () => {
1633
1640
  dispatch_event(t2, "introend"), // Ensure we cancel the animation to prevent leaking
1634
- s2 == null ? void 0 : s2.abort(), s2 = i2 = void 0, t2.style.overflow = u2;
1641
+ s2 == null ? void 0 : s2.abort(), s2 = o2 = void 0, t2.style.overflow = u2;
1635
1642
  });
1636
1643
  },
1637
1644
  out(e3) {
@@ -1660,8 +1667,8 @@ function transition(e2, t2, n2, o2) {
1660
1667
  });
1661
1668
  }
1662
1669
  }
1663
- function animate(e2, t2, n2, o2, i2) {
1664
- var s2 = 1 === o2;
1670
+ function animate(e2, t2, n2, i2, o2) {
1671
+ var s2 = 1 === i2;
1665
1672
  if (is_function(t2)) {
1666
1673
  var a2, l2 = false;
1667
1674
  return queue_micro_task(() => {
@@ -1669,7 +1676,7 @@ function animate(e2, t2, n2, o2, i2) {
1669
1676
  var c3 = t2({
1670
1677
  direction: s2 ? "in" : "out"
1671
1678
  });
1672
- a2 = animate(e2, c3, n2, o2, i2);
1679
+ a2 = animate(e2, c3, n2, i2, o2);
1673
1680
  }
1674
1681
  }), {
1675
1682
  abort: () => {
@@ -1680,11 +1687,11 @@ function animate(e2, t2, n2, o2, i2) {
1680
1687
  t: () => a2.t()
1681
1688
  };
1682
1689
  }
1683
- if (n2 == null ? void 0 : n2.deactivate(), !(t2 == null ? void 0 : t2.duration)) return i2(), {
1690
+ if (n2 == null ? void 0 : n2.deactivate(), !(t2 == null ? void 0 : t2.duration)) return o2(), {
1684
1691
  abort: noop,
1685
1692
  deactivate: noop,
1686
1693
  reset: noop,
1687
- t: () => o2
1694
+ t: () => i2
1688
1695
  };
1689
1696
  const { delay: c2 = 0, css: u2, tick: d2, easing: f2 = linear } = t2;
1690
1697
  var p2 = [];
@@ -1692,13 +1699,13 @@ function animate(e2, t2, n2, o2, i2) {
1692
1699
  var _2 = css_to_keyframe(u2(0, 1));
1693
1700
  p2.push(_2, _2);
1694
1701
  }
1695
- var get_t = () => 1 - o2, v2 = e2.animate(p2, {
1702
+ var get_t = () => 1 - i2, v2 = e2.animate(p2, {
1696
1703
  duration: c2
1697
1704
  });
1698
1705
  return v2.onfinish = () => {
1699
- var s3 = (n2 == null ? void 0 : n2.t()) ?? 1 - o2;
1706
+ var s3 = (n2 == null ? void 0 : n2.t()) ?? 1 - i2;
1700
1707
  n2 == null ? void 0 : n2.abort();
1701
- var a3 = o2 - s3, l3 = (
1708
+ var a3 = i2 - s3, l3 = (
1702
1709
  /** @type {number} */
1703
1710
  t2.duration * Math.abs(a3)
1704
1711
  ), c3 = [];
@@ -1740,7 +1747,7 @@ function animate(e2, t2, n2, o2, i2) {
1740
1747
  duration: l3,
1741
1748
  fill: "forwards"
1742
1749
  })).onfinish = () => {
1743
- get_t = () => o2, d2 == null ? void 0 : d2(o2, 1 - o2), i2();
1750
+ get_t = () => i2, d2 == null ? void 0 : d2(i2, 1 - i2), o2();
1744
1751
  };
1745
1752
  }, {
1746
1753
  abort: () => {
@@ -1751,10 +1758,10 @@ function animate(e2, t2, n2, o2, i2) {
1751
1758
  v2.onfinish = noop);
1752
1759
  },
1753
1760
  deactivate: () => {
1754
- i2 = noop;
1761
+ o2 = noop;
1755
1762
  },
1756
1763
  reset: () => {
1757
- 0 === o2 && (d2 == null ? void 0 : d2(1, 0));
1764
+ 0 === i2 && (d2 == null ? void 0 : d2(1, 0));
1758
1765
  },
1759
1766
  t: () => get_t()
1760
1767
  };
@@ -1769,19 +1776,19 @@ function to_number(e2) {
1769
1776
  function is_bound_this(e2, t2) {
1770
1777
  return e2 === t2 || (e2 == null ? void 0 : e2[w]) === t2;
1771
1778
  }
1772
- function bind_this(e2 = {}, t2, n2, o2) {
1779
+ function bind_this(e2 = {}, t2, n2, i2) {
1773
1780
  return effect(() => {
1774
- var o3, i2;
1781
+ var i3, o2;
1775
1782
  return render_effect(() => {
1776
- o3 = i2, // We only track changes to the parts, not the value itself to avoid unnecessary reruns.
1777
- i2 = [], untrack(() => {
1778
- e2 !== n2(...i2) && (t2(e2, ...i2), // If this is an effect rerun (cause: each block context changes), then nullfiy the binding at
1783
+ i3 = o2, // We only track changes to the parts, not the value itself to avoid unnecessary reruns.
1784
+ o2 = [], untrack(() => {
1785
+ e2 !== n2(...o2) && (t2(e2, ...o2), // If this is an effect rerun (cause: each block context changes), then nullfiy the binding at
1779
1786
  // the previous position if it isn't already taken over by a different effect.
1780
- o3 && is_bound_this(n2(...o3), e2) && t2(null, ...o3));
1787
+ i3 && is_bound_this(n2(...i3), e2) && t2(null, ...i3));
1781
1788
  });
1782
1789
  }), () => {
1783
1790
  queue_micro_task(() => {
1784
- i2 && is_bound_this(n2(...i2), e2) && t2(null, ...i2);
1791
+ o2 && is_bound_this(n2(...o2), e2) && t2(null, ...o2);
1785
1792
  });
1786
1793
  };
1787
1794
  }), e2;
@@ -1798,13 +1805,13 @@ function init(e2 = false) {
1798
1805
  /** @type {Record<string, any>} */
1799
1806
  {}
1800
1807
  );
1801
- const o2 = /* @__PURE__ */ derived(() => {
1802
- let o3 = false;
1803
- const i2 = t2.s;
1804
- for (const e4 in i2) i2[e4] !== n3[e4] && (n3[e4] = i2[e4], o3 = true);
1805
- return o3 && e3++, e3;
1808
+ const i2 = /* @__PURE__ */ derived(() => {
1809
+ let i3 = false;
1810
+ const o2 = t2.s;
1811
+ for (const e4 in o2) o2[e4] !== n3[e4] && (n3[e4] = o2[e4], i3 = true);
1812
+ return i3 && e3++, e3;
1806
1813
  });
1807
- props = () => get$1(o2);
1814
+ props = () => get$1(i2);
1808
1815
  }
1809
1816
  n2.b.length && function user_pre_effect(e3) {
1810
1817
  return validate_effect(), render_effect(e3);
@@ -1828,21 +1835,21 @@ function observe_all(e2, t2) {
1828
1835
  function subscribe_to_store(e2, t2, n2) {
1829
1836
  if (null == e2)
1830
1837
  return t2(void 0), noop;
1831
- const o2 = untrack(() => e2.subscribe(
1838
+ const i2 = untrack(() => e2.subscribe(
1832
1839
  t2,
1833
1840
  // @ts-expect-error
1834
1841
  n2
1835
1842
  ));
1836
- return o2.unsubscribe ? () => o2.unsubscribe() : o2;
1843
+ return i2.unsubscribe ? () => i2.unsubscribe() : i2;
1837
1844
  }
1838
1845
  const _e = [];
1839
1846
  function writable(e2, t2 = noop) {
1840
1847
  let n2 = null;
1841
- const o2 = /* @__PURE__ */ new Set();
1848
+ const i2 = /* @__PURE__ */ new Set();
1842
1849
  function set2(t3) {
1843
1850
  if (safe_not_equal(e2, t3) && (e2 = t3, n2)) {
1844
1851
  const t4 = !_e.length;
1845
- for (const t5 of o2) t5[1](), _e.push(t5, e2);
1852
+ for (const t5 of i2) t5[1](), _e.push(t5, e2);
1846
1853
  if (t4) {
1847
1854
  for (let e3 = 0; e3 < _e.length; e3 += 2) _e[e3][0](_e[e3 + 1]);
1848
1855
  _e.length = 0;
@@ -1858,13 +1865,13 @@ function writable(e2, t2 = noop) {
1858
1865
  return {
1859
1866
  set: set2,
1860
1867
  update: update2,
1861
- subscribe: function subscribe(i2, s2 = noop) {
1862
- const a2 = [i2, s2];
1863
- return o2.add(a2), 1 === o2.size && (n2 = t2(set2, update2) || noop), i2(
1868
+ subscribe: function subscribe(o2, s2 = noop) {
1869
+ const a2 = [o2, s2];
1870
+ return i2.add(a2), 1 === i2.size && (n2 = t2(set2, update2) || noop), o2(
1864
1871
  /** @type {T} */
1865
1872
  e2
1866
1873
  ), () => {
1867
- o2.delete(a2), 0 === o2.size && n2 && (n2(), n2 = null);
1874
+ i2.delete(a2), 0 === i2.size && n2 && (n2(), n2 = null);
1868
1875
  };
1869
1876
  }
1870
1877
  };
@@ -1875,24 +1882,24 @@ function get(e2) {
1875
1882
  }
1876
1883
  let ve = false, ge = Symbol();
1877
1884
  function store_get(e2, t2, n2) {
1878
- const o2 = n2[t2] ?? (n2[t2] = {
1885
+ const i2 = n2[t2] ?? (n2[t2] = {
1879
1886
  store: null,
1880
1887
  source: /* @__PURE__ */ mutable_source(void 0),
1881
1888
  unsubscribe: noop
1882
1889
  });
1883
- if (o2.store !== e2 && !(ge in n2)) if (o2.unsubscribe(), o2.store = e2 ?? null, null == e2) o2.source.v = void 0, // see synchronous callback comment below
1884
- o2.unsubscribe = noop;
1890
+ if (i2.store !== e2 && !(ge in n2)) if (i2.unsubscribe(), i2.store = e2 ?? null, null == e2) i2.source.v = void 0, // see synchronous callback comment below
1891
+ i2.unsubscribe = noop;
1885
1892
  else {
1886
- var i2 = true;
1887
- o2.unsubscribe = subscribe_to_store(e2, (e3) => {
1888
- i2 ? (
1893
+ var o2 = true;
1894
+ i2.unsubscribe = subscribe_to_store(e2, (e3) => {
1895
+ o2 ? (
1889
1896
  // If the first updates to the store value (possibly multiple of them) are synchronously
1890
1897
  // inside a derived, we will hit the `state_unsafe_mutation` error if we `set` the value
1891
- o2.source.v = e3
1892
- ) : set(o2.source, e3);
1893
- }), i2 = false;
1898
+ i2.source.v = e3
1899
+ ) : set(i2.source, e3);
1900
+ }), o2 = false;
1894
1901
  }
1895
- return e2 && ge in n2 ? get(e2) : get$1(o2.source);
1902
+ return e2 && ge in n2 ? get(e2) : get$1(i2.source);
1896
1903
  }
1897
1904
  function store_set(e2, t2) {
1898
1905
  return e2.set(t2), t2;
@@ -1904,7 +1911,7 @@ function setup_stores() {
1904
1911
  for (var t2 in e2) {
1905
1912
  e2[t2].unsubscribe();
1906
1913
  }
1907
- i(e2, ge, {
1914
+ o(e2, ge, {
1908
1915
  enumerable: false,
1909
1916
  value: true
1910
1917
  });
@@ -1953,16 +1960,16 @@ const me = {
1953
1960
  get(e2, t2) {
1954
1961
  let n2 = e2.props.length;
1955
1962
  for (; n2--; ) {
1956
- let o2 = e2.props[n2];
1957
- if (is_function(o2) && (o2 = o2()), "object" == typeof o2 && null !== o2 && t2 in o2) return o2[t2];
1963
+ let i2 = e2.props[n2];
1964
+ if (is_function(i2) && (i2 = i2()), "object" == typeof i2 && null !== i2 && t2 in i2) return i2[t2];
1958
1965
  }
1959
1966
  },
1960
1967
  set(e2, t2, n2) {
1961
- let o2 = e2.props.length;
1962
- for (; o2--; ) {
1963
- let i2 = e2.props[o2];
1964
- is_function(i2) && (i2 = i2());
1965
- const a2 = s(i2, t2);
1968
+ let i2 = e2.props.length;
1969
+ for (; i2--; ) {
1970
+ let o2 = e2.props[i2];
1971
+ is_function(o2) && (o2 = o2());
1972
+ const a2 = s(o2, t2);
1966
1973
  if (a2 && a2.set) return a2.set(n2), true;
1967
1974
  }
1968
1975
  return false;
@@ -1970,9 +1977,9 @@ const me = {
1970
1977
  getOwnPropertyDescriptor(e2, t2) {
1971
1978
  let n2 = e2.props.length;
1972
1979
  for (; n2--; ) {
1973
- let o2 = e2.props[n2];
1974
- if (is_function(o2) && (o2 = o2()), "object" == typeof o2 && null !== o2 && t2 in o2) {
1975
- const e3 = s(o2, t2);
1980
+ let i2 = e2.props[n2];
1981
+ if (is_function(i2) && (i2 = i2()), "object" == typeof i2 && null !== i2 && t2 in i2) {
1982
+ const e3 = s(i2, t2);
1976
1983
  return e3 && !e3.configurable && // Prevent a "Non-configurability Report Error": The target is an array, it does
1977
1984
  // not actually contain this property. If it is now described as non-configurable,
1978
1985
  // the proxy throws a validation error. Setting it to true avoids that.
@@ -1999,10 +2006,10 @@ function spread_props(...e2) {
1999
2006
  props: e2
2000
2007
  }, me);
2001
2008
  }
2002
- function prop(e2, t2, n2, o2) {
2003
- var _a;
2004
- var i2, a2 = !!(1 & n2), l2 = !C || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = false;
2005
- c2 ? [i2, d2] = function capture_store_binding(e3) {
2009
+ function prop(e2, t2, n2, i2) {
2010
+ var _a2;
2011
+ var o2, a2 = !!(1 & n2), l2 = !C || !!(2 & n2), c2 = !!(8 & n2), u2 = !!(16 & n2), d2 = false;
2012
+ c2 ? [o2, d2] = function capture_store_binding(e3) {
2006
2013
  var t3 = ve;
2007
2014
  try {
2008
2015
  return ve = false, [e3(), ve];
@@ -2012,21 +2019,21 @@ function prop(e2, t2, n2, o2) {
2012
2019
  }(() => (
2013
2020
  /** @type {V} */
2014
2021
  e2[t2]
2015
- )) : i2 = /** @type {V} */
2022
+ )) : o2 = /** @type {V} */
2016
2023
  e2[t2];
2017
- var f2, p2 = w in e2 || x in e2, _2 = c2 && (((_a = s(e2, t2)) == null ? void 0 : _a.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, v2 = (
2024
+ var f2, p2 = w in e2 || x in e2, _2 = c2 && (((_a2 = s(e2, t2)) == null ? void 0 : _a2.set) ?? (p2 && t2 in e2 && ((n3) => e2[t2] = n3))) || void 0, v2 = (
2018
2025
  /** @type {V} */
2019
- o2
2026
+ i2
2020
2027
  ), g2 = true, h2 = false, get_fallback = () => (h2 = true, g2 && (g2 = false, v2 = u2 ? untrack(
2021
2028
  /** @type {() => V} */
2022
- o2
2029
+ i2
2023
2030
  ) : (
2024
2031
  /** @type {V} */
2025
- o2
2032
+ i2
2026
2033
  )), v2);
2027
- if (void 0 === i2 && void 0 !== o2 && (_2 && l2 && function props_invalid_value(e3) {
2034
+ if (void 0 === o2 && void 0 !== i2 && (_2 && l2 && function props_invalid_value(e3) {
2028
2035
  throw new Error("https://svelte.dev/e/props_invalid_value");
2029
- }(), i2 = get_fallback(), _2 && _2(i2)), l2) f2 = () => {
2036
+ }(), o2 = get_fallback(), _2 && _2(o2)), l2) f2 = () => {
2030
2037
  var n3 = (
2031
2038
  /** @type {V} */
2032
2039
  e2[t2]
@@ -2058,7 +2065,7 @@ function prop(e2, t2, n2, o2) {
2058
2065
  ) : f2();
2059
2066
  };
2060
2067
  }
2061
- var y2 = false, $2 = /* @__PURE__ */ mutable_source(i2), k2 = /* @__PURE__ */ derived(() => {
2068
+ var y2 = false, $2 = /* @__PURE__ */ mutable_source(o2), k2 = /* @__PURE__ */ derived(() => {
2062
2069
  var e3 = f2(), t3 = get$1($2);
2063
2070
  return y2 ? (y2 = false, t3) : $2.v = e3;
2064
2071
  });
@@ -2133,25 +2140,25 @@ const be = {
2133
2140
  };
2134
2141
  var ye = /* @__PURE__ */ ns_template("<svg><!><!></svg>");
2135
2142
  function Icon$1(e2, t2) {
2136
- const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), o2 = legacy_rest_props(n2, ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"]);
2143
+ const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), i2 = legacy_rest_props(n2, ["name", "color", "size", "strokeWidth", "absoluteStrokeWidth", "iconNode"]);
2137
2144
  push(t2, false);
2138
- 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, () => []);
2145
+ let o2 = 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, () => []);
2139
2146
  init();
2140
2147
  var d2 = ye();
2141
2148
  let f2;
2142
2149
  var p2 = child(d2);
2143
2150
  each(p2, 1, u2, index, (e3, t3) => {
2144
2151
  var n3 = comment();
2145
- !function element(e4, t4, n4, o3, i3, s3) {
2152
+ !function element(e4, t4, n4, i3, o3, s3) {
2146
2153
  var a3, l3, c3, u3 = null, d3 = (
2147
2154
  /** @type {TemplateNode} */
2148
2155
  e4
2149
2156
  ), f3 = ce;
2150
2157
  block(() => {
2151
2158
  const e5 = t4() || null;
2152
- var n5 = S;
2159
+ var n5 = q;
2153
2160
  if (e5 !== a3) {
2154
- var i4 = ce;
2161
+ var o4 = ce;
2155
2162
  set_current_each_item(f3), c3 && (null === e5 ? (
2156
2163
  // start outro
2157
2164
  pause_effect(c3, () => {
@@ -2164,32 +2171,32 @@ function Icon$1(e2, t2) {
2164
2171
  // tag is changing — destroy immediately, render contents without intro transitions
2165
2172
  (destroy_effect(c3), set_should_intro(false))
2166
2173
  )), e5 && e5 !== l3 && (c3 = branch(() => {
2167
- if (assign_nodes(u3 = document.createElementNS(n5, e5), u3), o3) {
2174
+ if (assign_nodes(u3 = document.createElementNS(n5, e5), u3), i3) {
2168
2175
  var t5 = (
2169
2176
  /** @type {TemplateNode} */
2170
2177
  u3.appendChild(create_text())
2171
2178
  );
2172
- o3(u3, t5);
2179
+ i3(u3, t5);
2173
2180
  }
2174
2181
  H.nodes_end = u3, d3.before(u3);
2175
- })), (a3 = e5) && (l3 = a3), set_should_intro(true), set_current_each_item(i4);
2182
+ })), (a3 = e5) && (l3 = a3), set_should_intro(true), set_current_each_item(o4);
2176
2183
  }
2177
2184
  }, y);
2178
2185
  }(first_child(n3), () => get$1(t3)[0], 0, (e4, n4) => {
2179
- let o3;
2180
- template_effect(() => o3 = set_attributes(e4, o3, {
2186
+ let i3;
2187
+ template_effect(() => i3 = set_attributes(e4, i3, {
2181
2188
  ...get$1(t3)[1]
2182
- }, void 0, e4.namespaceURI === S, e4.nodeName.includes("-")));
2189
+ }, void 0, e4.namespaceURI === q, e4.nodeName.includes("-")));
2183
2190
  }), append(e3, n3);
2184
2191
  }), slot(sibling(p2), t2, "default", {}, null), template_effect((e3, t3) => f2 = set_attributes(d2, f2, {
2185
2192
  ...be,
2186
- ...o2,
2193
+ ...i2,
2187
2194
  width: a2(),
2188
2195
  height: a2(),
2189
2196
  stroke: s2(),
2190
2197
  "stroke-width": e3,
2191
2198
  class: t3
2192
- }, void 0, true), [() => 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();
2199
+ }, void 0, true), [() => c2() ? 24 * Number(l2()) / Number(a2()) : l2(), () => ((...e3) => e3.filter((e4, t3, n3) => Boolean(e4) && n3.indexOf(e4) === t3).join(" "))("lucide-icon", "lucide", o2() ? `lucide-${o2()}` : "", n2.class)], derived_safe_equal), append(e2, d2), pop();
2193
2200
  }
2194
2201
  function Loader_circle(e2, t2) {
2195
2202
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
@@ -2200,8 +2207,8 @@ function Loader_circle(e2, t2) {
2200
2207
  d: "M21 12a9 9 0 1 1-6.219-8.56"
2201
2208
  }]],
2202
2209
  children: (e3, n3) => {
2203
- var o2 = comment();
2204
- slot(first_child(o2), t2, "default", {}, null), append(e3, o2);
2210
+ var i2 = comment();
2211
+ slot(first_child(i2), t2, "default", {}, null), append(e3, i2);
2205
2212
  },
2206
2213
  $$slots: {
2207
2214
  default: true
@@ -2209,16 +2216,16 @@ function Loader_circle(e2, t2) {
2209
2216
  }));
2210
2217
  }
2211
2218
  var on_click$2 = (e2, t2) => {
2212
- var _a;
2213
- (_a = t2.onClick) == null ? void 0 : _a.call(t2);
2219
+ var _a2;
2220
+ (_a2 = t2.onClick) == null ? void 0 : _a2.call(t2);
2214
2221
  }, $e = /* @__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>');
2215
2222
  function FloatingButton(e2, t2) {
2216
2223
  push(t2, true);
2217
- let n2 = prop(t2, "position", 3, "bottom-right"), o2 = prop(t2, "visible", 3, true);
2218
- var i2 = comment(), s2 = first_child(i2), consequent = (e3) => {
2219
- var o3 = $e();
2220
- o3.__click = [on_click$2, t2];
2221
- var i3 = child(o3);
2224
+ let n2 = prop(t2, "position", 3, "bottom-right"), i2 = prop(t2, "visible", 3, true);
2225
+ var o2 = comment(), s2 = first_child(o2), consequent = (e3) => {
2226
+ var i3 = $e();
2227
+ i3.__click = [on_click$2, t2];
2228
+ var o3 = child(i3);
2222
2229
  !function Gamepad(e4, t3) {
2223
2230
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
2224
2231
  Icon$1(e4, spread_props({
@@ -2252,22 +2259,22 @@ function FloatingButton(e2, t2) {
2252
2259
  rx: "2"
2253
2260
  }]],
2254
2261
  children: (e5, n4) => {
2255
- var o4 = comment();
2256
- slot(first_child(o4), t3, "default", {}, null), append(e5, o4);
2262
+ var i4 = comment();
2263
+ slot(first_child(i4), t3, "default", {}, null), append(e5, i4);
2257
2264
  },
2258
2265
  $$slots: {
2259
2266
  default: true
2260
2267
  }
2261
2268
  }));
2262
- }(child(i3), {
2269
+ }(child(o3), {
2263
2270
  size: 26,
2264
2271
  strokeWidth: 1.75,
2265
2272
  class: "z-2 mr-2 transform transition-all duration-300 group-hover:rotate-12"
2266
- }), 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);
2273
+ }), template_effect(() => set_class(i3, 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, i3);
2267
2274
  };
2268
2275
  if_block(s2, (e3) => {
2269
- o2() && e3(consequent);
2270
- }), append(e2, i2), pop();
2276
+ i2() && e3(consequent);
2277
+ }), append(e2, o2), pop();
2271
2278
  }
2272
2279
  function cubic_out(e2) {
2273
2280
  const t2 = e2 - 1;
@@ -2284,44 +2291,44 @@ function split_css_unit(e2) {
2284
2291
  "px"
2285
2292
  ];
2286
2293
  }
2287
- function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_in_out, amount: i2 = 5, opacity: s2 = 0 } = {}) {
2288
- const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - s2), [d2, f2] = split_css_unit(i2);
2294
+ function blur(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_in_out, amount: o2 = 5, opacity: s2 = 0 } = {}) {
2295
+ const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.filter ? "" : a2.filter, u2 = l2 * (1 - s2), [d2, f2] = split_css_unit(o2);
2289
2296
  return {
2290
2297
  delay: t2,
2291
2298
  duration: n2,
2292
- easing: o2,
2299
+ easing: i2,
2293
2300
  css: (e3, t3) => `opacity: ${l2 - u2 * t3}; filter: ${c2} blur(${t3 * d2}${f2});`
2294
2301
  };
2295
2302
  }
2296
- function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, x: i2 = 0, y: s2 = 0, opacity: a2 = 0 } = {}) {
2297
- const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, d2 = c2 * (1 - a2), [f2, p2] = split_css_unit(i2), [_2, v2] = split_css_unit(s2);
2303
+ function fly(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_out, x: o2 = 0, y: s2 = 0, opacity: a2 = 0 } = {}) {
2304
+ const l2 = getComputedStyle(e2), c2 = +l2.opacity, u2 = "none" === l2.transform ? "" : l2.transform, d2 = c2 * (1 - a2), [f2, p2] = split_css_unit(o2), [_2, v2] = split_css_unit(s2);
2298
2305
  return {
2299
2306
  delay: t2,
2300
2307
  duration: n2,
2301
- easing: o2,
2308
+ easing: i2,
2302
2309
  css: (e3, t3) => `
2303
2310
  transform: ${u2} translate(${(1 - e3) * f2}${p2}, ${(1 - e3) * _2}${v2});
2304
2311
  opacity: ${c2 - d2 * t3}`
2305
2312
  };
2306
2313
  }
2307
- function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, axis: i2 = "y" } = {}) {
2308
- 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) => (
2314
+ function slide(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_out, axis: o2 = "y" } = {}) {
2315
+ const s2 = getComputedStyle(e2), a2 = +s2.opacity, l2 = "y" === o2 ? "height" : "width", c2 = parseFloat(s2[l2]), u2 = "y" === o2 ? ["top", "bottom"] : ["left", "right"], d2 = u2.map((e3) => (
2309
2316
  /** @type {'Left' | 'Right' | 'Top' | 'Bottom'} */
2310
2317
  `${e3[0].toUpperCase()}${e3.slice(1)}`
2311
2318
  )), f2 = parseFloat(s2[`padding${d2[0]}`]), p2 = parseFloat(s2[`padding${d2[1]}`]), _2 = parseFloat(s2[`margin${d2[0]}`]), v2 = parseFloat(s2[`margin${d2[1]}`]), g2 = parseFloat(s2[`border${d2[0]}Width`]), h2 = parseFloat(s2[`border${d2[1]}Width`]);
2312
2319
  return {
2313
2320
  delay: t2,
2314
2321
  duration: n2,
2315
- easing: o2,
2322
+ easing: i2,
2316
2323
  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 * v2}px;border-${u2[0]}-width: ${e3 * g2}px;border-${u2[1]}-width: ${e3 * h2}px;min-${l2}: 0`
2317
2324
  };
2318
2325
  }
2319
- function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: o2 = cubic_out, start: i2 = 0, opacity: s2 = 0 } = {}) {
2320
- const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - i2, d2 = l2 * (1 - s2);
2326
+ function scale(e2, { delay: t2 = 0, duration: n2 = 400, easing: i2 = cubic_out, start: o2 = 0, opacity: s2 = 0 } = {}) {
2327
+ const a2 = getComputedStyle(e2), l2 = +a2.opacity, c2 = "none" === a2.transform ? "" : a2.transform, u2 = 1 - o2, d2 = l2 * (1 - s2);
2321
2328
  return {
2322
2329
  delay: t2,
2323
2330
  duration: n2,
2324
- easing: o2,
2331
+ easing: i2,
2325
2332
  css: (e3, t3) => `
2326
2333
  transform: ${c2} scale(${1 - u2 * t3});
2327
2334
  opacity: ${l2 - d2 * t3}
@@ -2332,45 +2339,45 @@ delegate(["click"]);
2332
2339
  var we = /* @__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>'), xe = /* @__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>'), ke = /* @__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>'), Ce = /* @__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>');
2333
2340
  function Icon(e2, t2) {
2334
2341
  let n2 = prop(t2, "type", 8, "success");
2335
- var o2 = comment(), i2 = first_child(o2), consequent = (e3) => {
2342
+ var i2 = comment(), o2 = first_child(i2), consequent = (e3) => {
2336
2343
  append(e3, we());
2337
2344
  }, alternate_3 = (e3) => {
2338
- var t3 = comment(), o3 = first_child(t3), consequent_1 = (e4) => {
2345
+ var t3 = comment(), i3 = first_child(t3), consequent_1 = (e4) => {
2339
2346
  append(e4, xe());
2340
2347
  }, alternate_2 = (e4) => {
2341
- var t4 = comment(), o4 = first_child(t4), consequent_2 = (e5) => {
2348
+ var t4 = comment(), i4 = first_child(t4), consequent_2 = (e5) => {
2342
2349
  append(e5, ke());
2343
2350
  }, alternate_1 = (e5) => {
2344
- var t5 = comment(), o5 = first_child(t5), consequent_3 = (e6) => {
2351
+ var t5 = comment(), i5 = first_child(t5), consequent_3 = (e6) => {
2345
2352
  append(e6, Ce());
2346
2353
  }, alternate = (e6) => {
2347
2354
  };
2348
- if_block(o5, (e6) => {
2355
+ if_block(i5, (e6) => {
2349
2356
  "warning" === n2() ? e6(consequent_3) : e6(alternate, false);
2350
2357
  }, true), append(e5, t5);
2351
2358
  };
2352
- if_block(o4, (e5) => {
2359
+ if_block(i4, (e5) => {
2353
2360
  "info" === n2() ? e5(consequent_2) : e5(alternate_1, false);
2354
2361
  }, true), append(e4, t4);
2355
2362
  };
2356
- if_block(o3, (e4) => {
2363
+ if_block(i3, (e4) => {
2357
2364
  "error" === n2() ? e4(consequent_1) : e4(alternate_2, false);
2358
2365
  }, true), append(e3, t3);
2359
2366
  };
2360
- if_block(i2, (e3) => {
2367
+ if_block(o2, (e3) => {
2361
2368
  "success" === n2() ? e3(consequent) : e3(alternate_3, false);
2362
- }), append(e2, o2);
2369
+ }), append(e2, i2);
2363
2370
  }
2364
- var Me = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), Se = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
2371
+ var Me = /* @__PURE__ */ template('<div class="sonner-loading-bar"></div>'), qe = /* @__PURE__ */ template('<div class="sonner-loading-wrapper"><div class="sonner-spinner"></div></div>');
2365
2372
  function Loader(e2, t2) {
2366
2373
  push(t2, false);
2367
2374
  let n2 = prop(t2, "visible", 8);
2368
- const o2 = Array(12).fill(0);
2375
+ const i2 = Array(12).fill(0);
2369
2376
  init();
2370
- var i2 = Se();
2371
- each(child(i2), 5, () => o2, index, (e3, t3) => {
2377
+ var o2 = qe();
2378
+ each(child(o2), 5, () => i2, index, (e3, t3) => {
2372
2379
  append(e3, Me());
2373
- }), template_effect(() => set_attribute(i2, "data-visible", n2())), append(e2, i2), pop();
2380
+ }), template_effect(() => set_attribute(o2, "data-visible", n2())), append(e2, o2), pop();
2374
2381
  }
2375
2382
  function cn(...e2) {
2376
2383
  return e2.filter(Boolean).join(" ");
@@ -2388,19 +2395,19 @@ function clientWritable(e2) {
2388
2395
  }
2389
2396
  };
2390
2397
  }
2391
- let Te = 0;
2392
- const qe = function createToastState() {
2398
+ let Se = 0;
2399
+ const Te = function createToastState() {
2393
2400
  const e2 = clientWritable([]), t2 = clientWritable([]);
2394
2401
  function addToast(t3) {
2395
2402
  e2.update((e3) => [t3, ...e3]);
2396
2403
  }
2397
2404
  function create(t3) {
2398
- var _a;
2399
- const { message: n2, ...o2 } = t3, i2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a = t3.id) == null ? void 0 : _a.length) > 0 ? t3.id : Te++, s2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === i2);
2400
- return l2 ? e2.update((e3) => e3.map((e4) => e4.id === i2 ? {
2405
+ var _a2;
2406
+ const { message: n2, ...i2 } = t3, o2 = "number" == typeof (t3 == null ? void 0 : t3.id) || t3.id && ((_a2 = t3.id) == null ? void 0 : _a2.length) > 0 ? t3.id : Se++, s2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === o2);
2407
+ return l2 ? e2.update((e3) => e3.map((e4) => e4.id === o2 ? {
2401
2408
  ...e4,
2402
2409
  ...t3,
2403
- id: i2,
2410
+ id: o2,
2404
2411
  title: n2,
2405
2412
  dismissable: s2,
2406
2413
  type: a2,
@@ -2409,12 +2416,12 @@ const qe = function createToastState() {
2409
2416
  ...e4,
2410
2417
  updated: false
2411
2418
  })) : addToast({
2412
- ...o2,
2413
- id: i2,
2419
+ ...i2,
2420
+ id: o2,
2414
2421
  title: n2,
2415
2422
  dismissable: s2,
2416
2423
  type: a2
2417
- }), i2;
2424
+ }), o2;
2418
2425
  }
2419
2426
  function dismiss(t3) {
2420
2427
  if (void 0 !== t3) return e2.update((e3) => e3.map((e4) => e4.id === t3 ? {
@@ -2487,53 +2494,53 @@ const qe = function createToastState() {
2487
2494
  type: "loading",
2488
2495
  message: t3.loading
2489
2496
  }));
2490
- const o2 = e3 instanceof Promise ? e3 : e3();
2491
- let i2 = void 0 !== n2;
2492
- return o2.then((e4) => {
2497
+ const i2 = e3 instanceof Promise ? e3 : e3();
2498
+ let o2 = void 0 !== n2;
2499
+ return i2.then((e4) => {
2493
2500
  if (e4 && "boolean" == typeof e4.ok && !e4.ok) {
2494
- i2 = false;
2495
- const o3 = "function" == typeof t3.error ? (
2501
+ o2 = false;
2502
+ const i3 = "function" == typeof t3.error ? (
2496
2503
  // @ts-expect-error: Incorrect response type
2497
2504
  t3.error(`HTTP error! status: ${e4.status}`)
2498
2505
  ) : t3.error;
2499
2506
  create({
2500
2507
  id: n2,
2501
2508
  type: "error",
2502
- message: o3
2509
+ message: i3
2503
2510
  });
2504
2511
  } else if (void 0 !== t3.success) {
2505
- i2 = false;
2506
- const o3 = (
2512
+ o2 = false;
2513
+ const i3 = (
2507
2514
  // @ts-expect-error: TODO: Better function checking
2508
2515
  "function" == typeof t3.success ? t3.success(e4) : t3.success
2509
2516
  );
2510
2517
  create({
2511
2518
  id: n2,
2512
2519
  type: "success",
2513
- message: o3
2520
+ message: i3
2514
2521
  });
2515
2522
  }
2516
2523
  }).catch((e4) => {
2517
2524
  if (void 0 !== t3.error) {
2518
- i2 = false;
2519
- const o3 = (
2525
+ o2 = false;
2526
+ const i3 = (
2520
2527
  // @ts-expect-error: TODO: Better function checking
2521
2528
  "function" == typeof t3.error ? t3.error(e4) : t3.error
2522
2529
  );
2523
2530
  create({
2524
2531
  id: n2,
2525
2532
  type: "error",
2526
- message: o3
2533
+ message: i3
2527
2534
  });
2528
2535
  }
2529
2536
  }).finally(() => {
2530
- var _a;
2531
- i2 && // Toast is still in load state (and will be indefinitely — dismiss it)
2532
- (dismiss(n2), n2 = void 0), (_a = t3.finally) == null ? void 0 : _a.call(t3);
2537
+ var _a2;
2538
+ o2 && // Toast is still in load state (and will be indefinitely — dismiss it)
2539
+ (dismiss(n2), n2 = void 0), (_a2 = t3.finally) == null ? void 0 : _a2.call(t3);
2533
2540
  }), n2;
2534
2541
  },
2535
2542
  custom: function custom(e3, t3) {
2536
- const n2 = (t3 == null ? void 0 : t3.id) || Te++;
2543
+ const n2 = (t3 == null ? void 0 : t3.id) || Se++;
2537
2544
  return create({
2538
2545
  component: e3,
2539
2546
  id: n2,
@@ -2555,26 +2562,26 @@ const qe = function createToastState() {
2555
2562
  };
2556
2563
  }();
2557
2564
  const Pe = function toastFunction(e2, t2) {
2558
- return qe.create({
2565
+ return Te.create({
2559
2566
  message: e2,
2560
2567
  ...t2
2561
2568
  });
2562
2569
  }, Oe = Object.assign(Pe, {
2563
- success: qe.success,
2564
- info: qe.info,
2565
- warning: qe.warning,
2566
- error: qe.error,
2567
- custom: qe.custom,
2568
- message: qe.message,
2569
- promise: qe.promise,
2570
- dismiss: qe.dismiss,
2571
- loading: qe.loading
2570
+ success: Te.success,
2571
+ info: Te.info,
2572
+ warning: Te.warning,
2573
+ error: Te.error,
2574
+ custom: Te.custom,
2575
+ message: Te.message,
2576
+ promise: Te.promise,
2577
+ dismiss: Te.dismiss,
2578
+ loading: Te.loading
2572
2579
  });
2573
- var Ee = /* @__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>'), je = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), Ne = /* @__PURE__ */ template('<div data-title=""><!></div>'), Be = /* @__PURE__ */ template('<div data-description=""><!></div>'), ze = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), De = /* @__PURE__ */ template('<button data-button=""> </button>'), Ae = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), Le = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
2580
+ var Ee = /* @__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>'), je = /* @__PURE__ */ template('<div data-icon=""><!> <!></div>'), Ne = /* @__PURE__ */ template('<div data-title=""><!></div>'), Be = /* @__PURE__ */ template('<div data-description=""><!></div>'), De = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), We = /* @__PURE__ */ template('<button data-button=""> </button>'), ze = /* @__PURE__ */ template('<!> <div data-content=""><!> <!></div> <!> <!>', 1), Ae = /* @__PURE__ */ template('<li aria-atomic="true" role="status" data-sonner-toast=""><!> <!></li>');
2574
2581
  function Toast(e2, t2) {
2575
2582
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
2576
2583
  push(t2, false);
2577
- 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), v2 = mutable_state(void 0, true), g2 = mutable_state(void 0, true), h2 = mutable_state(void 0, true), m2 = {
2584
+ const [i2, o2] = setup_stores(), $heights = () => store_get(y2, "$heights", i2), $effect = () => store_get(get$1(Q2), "$effect", i2), 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), v2 = mutable_state(void 0, true), g2 = mutable_state(void 0, true), h2 = mutable_state(void 0, true), m2 = {
2578
2585
  toast: "",
2579
2586
  title: "",
2580
2587
  description: "",
@@ -2589,10 +2596,10 @@ function Toast(e2, t2) {
2589
2596
  default: "",
2590
2597
  info: "",
2591
2598
  loading: ""
2592
- }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = qe;
2593
- let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), M2 = prop(t2, "expanded", 9), S2 = prop(t2, "invert", 13), I2 = prop(t2, "position", 9), T2 = prop(t2, "visibleToasts", 9), q2 = 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, ""), z2 = prop(t2, "classes", 29, () => ({})), D2 = prop(t2, "unstyled", 9, false), A2 = mutable_state(false, true), L2 = mutable_state(false, true), W2 = 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;
2599
+ }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = Te;
2600
+ let k2 = prop(t2, "toast", 9), C2 = prop(t2, "index", 9), M2 = prop(t2, "expanded", 9), q2 = prop(t2, "invert", 13), I2 = prop(t2, "position", 9), S2 = prop(t2, "visibleToasts", 9), T2 = 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, () => ({})), W2 = prop(t2, "unstyled", 9, false), z2 = mutable_state(false, true), A2 = 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;
2594
2601
  function deleteToast() {
2595
- set(L2, true), // Save the offset for the exit swipe animation
2602
+ set(A2, true), // Save the offset for the exit swipe animation
2596
2603
  set(G2, get$1(V2)), $2(k2().id), setTimeout(() => {
2597
2604
  x2(k2().id);
2598
2605
  }, 200);
@@ -2601,27 +2608,27 @@ function Toast(e2, t2) {
2601
2608
  function startTimer() {
2602
2609
  K2 = (/* @__PURE__ */ new Date()).getTime(), // Let the toast know it has started
2603
2610
  set(Y2, setTimeout(() => {
2604
- var _a, _b;
2605
- (_b = (_a = k2()).onAutoClose) == null ? void 0 : _b.call(_a, k2()), deleteToast();
2611
+ var _a2, _b;
2612
+ (_b = (_a2 = k2()).onAutoClose) == null ? void 0 : _b.call(_a2, k2()), deleteToast();
2606
2613
  }, get$1(J2)));
2607
2614
  }
2608
2615
  let Q2 = mutable_state(void 0, true);
2609
2616
  onMount(() => {
2610
- set(A2, true);
2617
+ set(z2, true);
2611
2618
  const e3 = get$1(R2).getBoundingClientRect().height;
2612
2619
  return set(H2, e3), w2({
2613
2620
  toastId: k2().id,
2614
2621
  height: e3
2615
2622
  }), () => $2(k2().id);
2616
- }), legacy_pre_effect(() => deep_read_state(z2()), () => {
2617
- z2({
2623
+ }), legacy_pre_effect(() => deep_read_state(D2()), () => {
2624
+ D2({
2618
2625
  ...m2,
2619
- ...z2()
2626
+ ...D2()
2620
2627
  });
2621
2628
  }), legacy_pre_effect(() => deep_read_state(C2()), () => {
2622
2629
  set(s2, 0 === C2());
2623
- }), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(T2())), () => {
2624
- set(a2, C2() + 1 <= T2());
2630
+ }), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(S2())), () => {
2631
+ set(a2, C2() + 1 <= S2());
2625
2632
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2626
2633
  set(l2, k2().title);
2627
2634
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
@@ -2641,8 +2648,8 @@ function Toast(e2, t2) {
2641
2648
  // Calculate offset up untill current toast
2642
2649
  n3 >= get$1(p2) ? e3 : e3 + t3.height
2643
2650
  ), 0));
2644
- }), legacy_pre_effect(() => (deep_read_state(S2()), deep_read_state(k2())), () => {
2645
- S2(k2().invert || S2());
2651
+ }), legacy_pre_effect(() => (deep_read_state(q2()), deep_read_state(k2())), () => {
2652
+ q2(k2().invert || q2());
2646
2653
  }), legacy_pre_effect(() => get$1(u2), () => {
2647
2654
  set(g2, "loading" === get$1(u2));
2648
2655
  }), legacy_pre_effect(() => (get$1(p2), get$1(v2)), () => {
@@ -2650,15 +2657,15 @@ function Toast(e2, t2) {
2650
2657
  }), legacy_pre_effect(() => (get$1(l2), get$1(c2)), () => {
2651
2658
  get$1(l2), get$1(c2), // Listen to height changes
2652
2659
  async function updateHeights() {
2653
- if (!get$1(A2)) return;
2660
+ if (!get$1(z2)) return;
2654
2661
  let e3;
2655
- await tick(), e3 = M2() || q2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2656
- const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, o3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
2657
- let i3;
2662
+ await tick(), e3 = M2() || T2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2663
+ const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, i3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
2664
+ let o3;
2658
2665
  get$1(R2).style.removeProperty("height"), // Use scaledRectHeight as it's more precise
2659
- i3 = Math.abs(o3 - t3) < 1 ? o3 : t3, set(H2, i3), w2({
2666
+ o3 = Math.abs(i3 - t3) < 1 ? i3 : t3, set(H2, o3), w2({
2660
2667
  toastId: k2().id,
2661
- height: i3
2668
+ height: o3
2662
2669
  });
2663
2670
  }();
2664
2671
  }), legacy_pre_effect(() => (deep_read_state(k2()), get$1(Y2), deep_read_state(N2())), () => {
@@ -2671,9 +2678,9 @@ function Toast(e2, t2) {
2671
2678
  }), legacy_pre_effect(() => (get$1(h2), deep_read_state(M2()), deep_read_state(O2()), get$1(Y2)), () => {
2672
2679
  var e3;
2673
2680
  !function store_unsub(e4, t3, n3) {
2674
- let o3 = n3[t3];
2675
- return o3 && o3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
2676
- (o3.unsubscribe(), o3.unsubscribe = noop), e4;
2681
+ let i3 = n3[t3];
2682
+ return i3 && i3.store !== e4 && // Don't reset store yet, so that store_get above can resubscribe to new store if necessary
2683
+ (i3.unsubscribe(), i3.unsubscribe = noop), e4;
2677
2684
  }(set(Q2, (e3 = () => (get$1(h2) || (M2() || O2() ? (
2678
2685
  // If toast's duration changes, it will be out of sync with the
2679
2686
  // remainingAtTimeout, so we know we need to restart the timer
@@ -2688,27 +2695,27 @@ function Toast(e2, t2) {
2688
2695
  }()
2689
2696
  ) : startTimer()), () => clearTimeout(get$1(Y2))), {
2690
2697
  subscribe: e3
2691
- })), "$effect", o2);
2698
+ })), "$effect", i2);
2692
2699
  }), legacy_pre_effect(() => $effect(), () => {
2693
2700
  $effect();
2694
2701
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2695
2702
  k2().delete && deleteToast();
2696
2703
  }), legacy_pre_effect_reset(), init(true);
2697
- var ee2 = Le();
2704
+ var ee2 = Ae();
2698
2705
  set_attribute(ee2, "tabindex", 0);
2699
2706
  var te2 = child(ee2), consequent = (e3) => {
2700
2707
  var t3 = Ee();
2701
2708
  template_effect((e4) => {
2702
2709
  set_attribute(t3, "data-disabled", get$1(g2)), set_class(t3, 1, clsx(e4));
2703
2710
  }, [() => {
2704
- var _a, _b, _c;
2705
- return cn((_a = z2()) == null ? void 0 : _a.closeButton, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.closeButton);
2711
+ var _a2, _b, _c;
2712
+ return cn((_a2 = D2()) == null ? void 0 : _a2.closeButton, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.closeButton);
2706
2713
  }], derived_safe_equal), event("click", t3, function(...e4) {
2707
- var _a;
2708
- (_a = get$1(g2) ? void 0 : () => {
2709
- var _a2, _b;
2710
- deleteToast(), (_b = (_a2 = k2()).onDismiss) == null ? void 0 : _b.call(_a2, k2());
2711
- }) == null ? void 0 : _a.apply(this, e4);
2714
+ var _a2;
2715
+ (_a2 = get$1(g2) ? void 0 : () => {
2716
+ var _a3, _b;
2717
+ deleteToast(), (_b = (_a3 = k2()).onDismiss) == null ? void 0 : _b.call(_a3, k2());
2718
+ }) == null ? void 0 : _a2.apply(this, e4);
2712
2719
  }), append(e3, t3);
2713
2720
  };
2714
2721
  if_block(te2, (e3) => {
@@ -2724,60 +2731,60 @@ function Toast(e2, t2) {
2724
2731
  }));
2725
2732
  }), append(e3, t3);
2726
2733
  }, alternate_6 = (e3) => {
2727
- var n3 = Ae(), o3 = first_child(n3), consequent_8 = (e4) => {
2728
- var n4 = je(), o4 = child(n4), consequent_2 = (e5) => {
2734
+ var n3 = ze(), i3 = first_child(n3), consequent_8 = (e4) => {
2735
+ var n4 = je(), i4 = child(n4), consequent_2 = (e5) => {
2729
2736
  var n5 = comment();
2730
2737
  slot(first_child(n5), t2, "loading-icon", {}, null), append(e5, n5);
2731
2738
  };
2732
- if_block(o4, (e5) => {
2739
+ if_block(i4, (e5) => {
2733
2740
  !k2().promise && "loading" !== get$1(u2) || k2().icon || e5(consequent_2);
2734
2741
  });
2735
- var i4 = sibling(o4, 2), consequent_3 = (e5) => {
2742
+ var o4 = sibling(i4, 2), consequent_3 = (e5) => {
2736
2743
  var t3 = comment();
2737
2744
  component(first_child(t3), () => k2().icon, (e6, t4) => {
2738
2745
  t4(e6, {});
2739
2746
  }), append(e5, t3);
2740
2747
  }, alternate_3 = (e5) => {
2741
- var n5 = comment(), o5 = first_child(n5), consequent_4 = (e6) => {
2748
+ var n5 = comment(), i5 = first_child(n5), consequent_4 = (e6) => {
2742
2749
  var n6 = comment();
2743
2750
  slot(first_child(n6), t2, "success-icon", {}, null), append(e6, n6);
2744
2751
  }, alternate_2 = (e6) => {
2745
- var n6 = comment(), o6 = first_child(n6), consequent_5 = (e7) => {
2752
+ var n6 = comment(), i6 = first_child(n6), consequent_5 = (e7) => {
2746
2753
  var n7 = comment();
2747
2754
  slot(first_child(n7), t2, "error-icon", {}, null), append(e7, n7);
2748
2755
  }, alternate_1 = (e7) => {
2749
- var n7 = comment(), o7 = first_child(n7), consequent_6 = (e8) => {
2756
+ var n7 = comment(), i7 = first_child(n7), consequent_6 = (e8) => {
2750
2757
  var n8 = comment();
2751
2758
  slot(first_child(n8), t2, "warning-icon", {}, null), append(e8, n8);
2752
2759
  }, alternate = (e8) => {
2753
- var n8 = comment(), o8 = first_child(n8), consequent_7 = (e9) => {
2760
+ var n8 = comment(), i8 = first_child(n8), consequent_7 = (e9) => {
2754
2761
  var n9 = comment();
2755
2762
  slot(first_child(n9), t2, "info-icon", {}, null), append(e9, n9);
2756
2763
  };
2757
- if_block(o8, (e9) => {
2764
+ if_block(i8, (e9) => {
2758
2765
  "info" === get$1(u2) && e9(consequent_7);
2759
2766
  }, true), append(e8, n8);
2760
2767
  };
2761
- if_block(o7, (e8) => {
2768
+ if_block(i7, (e8) => {
2762
2769
  "warning" === get$1(u2) ? e8(consequent_6) : e8(alternate, false);
2763
2770
  }, true), append(e7, n7);
2764
2771
  };
2765
- if_block(o6, (e7) => {
2772
+ if_block(i6, (e7) => {
2766
2773
  "error" === get$1(u2) ? e7(consequent_5) : e7(alternate_1, false);
2767
2774
  }, true), append(e6, n6);
2768
2775
  };
2769
- if_block(o5, (e6) => {
2776
+ if_block(i5, (e6) => {
2770
2777
  "success" === get$1(u2) ? e6(consequent_4) : e6(alternate_2, false);
2771
2778
  }, true), append(e5, n5);
2772
2779
  };
2773
- if_block(i4, (e5) => {
2780
+ if_block(o4, (e5) => {
2774
2781
  k2().icon ? e5(consequent_3) : e5(alternate_3, false);
2775
2782
  }), append(e4, n4);
2776
2783
  };
2777
- if_block(o3, (e4) => {
2784
+ if_block(i3, (e4) => {
2778
2785
  ("default" !== get$1(u2) || k2().icon || k2().promise) && e4(consequent_8);
2779
2786
  });
2780
- var i3 = sibling(o3, 2), s3 = child(i3), consequent_10 = (e4) => {
2787
+ var o3 = sibling(i3, 2), s3 = child(o3), consequent_10 = (e4) => {
2781
2788
  var t3 = Ne(), n4 = child(t3), consequent_9 = (e5) => {
2782
2789
  var t4 = comment();
2783
2790
  component(first_child(t4), () => k2().title, (e6, t5) => {
@@ -2790,8 +2797,8 @@ function Toast(e2, t2) {
2790
2797
  if_block(n4, (e5) => {
2791
2798
  "string" != typeof k2().title ? e5(consequent_9) : e5(alternate_4, false);
2792
2799
  }), template_effect((e5) => set_class(t3, 1, clsx(e5)), [() => {
2793
- var _a, _b, _c;
2794
- return cn((_a = z2()) == null ? void 0 : _a.title, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.title);
2800
+ var _a2, _b, _c;
2801
+ return cn((_a2 = D2()) == null ? void 0 : _a2.title, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.title);
2795
2802
  }], derived_safe_equal), append(e4, t3);
2796
2803
  };
2797
2804
  if_block(s3, (e4) => {
@@ -2810,38 +2817,38 @@ function Toast(e2, t2) {
2810
2817
  if_block(n4, (e5) => {
2811
2818
  "string" != typeof k2().description ? e5(consequent_11) : e5(alternate_5, false);
2812
2819
  }), template_effect((e5) => set_class(t3, 1, clsx(e5)), [() => {
2813
- var _a, _b;
2814
- return cn(B2(), get$1(f2), (_a = z2()) == null ? void 0 : _a.description, (_b = k2().classes) == null ? void 0 : _b.description);
2820
+ var _a2, _b;
2821
+ return cn(B2(), get$1(f2), (_a2 = D2()) == null ? void 0 : _a2.description, (_b = k2().classes) == null ? void 0 : _b.description);
2815
2822
  }], derived_safe_equal), append(e4, t3);
2816
2823
  };
2817
2824
  if_block(a3, (e4) => {
2818
2825
  k2().description && e4(consequent_12);
2819
2826
  });
2820
- var l3 = sibling(i3, 2), consequent_13 = (e4) => {
2821
- var t3 = ze(), n4 = child(t3);
2827
+ var l3 = sibling(o3, 2), consequent_13 = (e4) => {
2828
+ var t3 = De(), n4 = child(t3);
2822
2829
  template_effect((e5) => {
2823
2830
  set_attribute(t3, "style", E2()), set_class(t3, 1, clsx(e5)), set_text(n4, k2().cancel.label);
2824
2831
  }, [() => {
2825
- var _a, _b, _c;
2826
- return cn((_a = z2()) == null ? void 0 : _a.cancelButton, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.cancelButton);
2832
+ var _a2, _b, _c;
2833
+ return cn((_a2 = D2()) == null ? void 0 : _a2.cancelButton, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.cancelButton);
2827
2834
  }], derived_safe_equal), event("click", t3, () => {
2828
- var _a;
2829
- deleteToast(), ((_a = k2().cancel) == null ? void 0 : _a.onClick) && k2().cancel.onClick();
2835
+ var _a2;
2836
+ deleteToast(), ((_a2 = k2().cancel) == null ? void 0 : _a2.onClick) && k2().cancel.onClick();
2830
2837
  }), append(e4, t3);
2831
2838
  };
2832
2839
  if_block(l3, (e4) => {
2833
2840
  k2().cancel && e4(consequent_13);
2834
2841
  });
2835
2842
  var c3 = sibling(l3, 2), consequent_14 = (e4) => {
2836
- var t3 = De(), n4 = child(t3);
2843
+ var t3 = We(), n4 = child(t3);
2837
2844
  template_effect((e5) => {
2838
2845
  set_attribute(t3, "style", j2()), set_class(t3, 1, clsx(e5)), set_text(n4, k2().action.label);
2839
2846
  }, [() => {
2840
- var _a, _b, _c;
2841
- return cn((_a = z2()) == null ? void 0 : _a.actionButton, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.actionButton);
2847
+ var _a2, _b, _c;
2848
+ return cn((_a2 = D2()) == null ? void 0 : _a2.actionButton, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.actionButton);
2842
2849
  }], derived_safe_equal), event("click", t3, (e5) => {
2843
- var _a;
2844
- (_a = k2().action) == null ? void 0 : _a.onClick(e5), e5.defaultPrevented || deleteToast();
2850
+ var _a2;
2851
+ (_a2 = k2().action) == null ? void 0 : _a2.onClick(e5), e5.defaultPrevented || deleteToast();
2845
2852
  }), append(e4, t3);
2846
2853
  };
2847
2854
  if_block(c3, (e4) => {
@@ -2850,40 +2857,40 @@ function Toast(e2, t2) {
2850
2857
  };
2851
2858
  if_block(ne2, (e3) => {
2852
2859
  k2().component ? e3(consequent_1) : e3(alternate_6, false);
2853
- }), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, i3) => {
2854
- var _a;
2855
- set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, clsx(e3)), set_attribute(ee2, "data-styled", !(k2().component || ((_a = k2()) == null ? void 0 : _a.unstyled) || D2())), set_attribute(ee2, "data-mounted", get$1(A2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(L2)), 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(W2)), set_attribute(ee2, "data-type", get$1(u2)), set_attribute(ee2, "data-invert", S2()), set_attribute(ee2, "data-swipe-out", get$1(F2)), set_attribute(ee2, "data-expanded", i3), set_attribute(ee2, "style", `${n2.style} ${k2().style}`), set_style(ee2, "--index", C2()), set_style(ee2, "--toasts-before", C2()), set_style(ee2, "--z-index", store_get(b2, "$toasts", o2).length - C2()), set_style(ee2, "--offset", `${get$1(L2) ? get$1(G2) : get$1(V2)}px`), set_style(ee2, "--initial-height", `${get$1(H2)}px`);
2860
+ }), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, o3) => {
2861
+ var _a2;
2862
+ set_attribute(ee2, "aria-live", k2().important ? "assertive" : "polite"), set_class(ee2, 1, clsx(e3)), set_attribute(ee2, "data-styled", !(k2().component || ((_a2 = k2()) == null ? void 0 : _a2.unstyled) || W2())), set_attribute(ee2, "data-mounted", get$1(z2)), set_attribute(ee2, "data-promise", t3), set_attribute(ee2, "data-removed", get$1(A2)), 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", q2()), set_attribute(ee2, "data-swipe-out", get$1(F2)), set_attribute(ee2, "data-expanded", o3), set_attribute(ee2, "style", `${n2.style} ${k2().style}`), set_style(ee2, "--index", C2()), set_style(ee2, "--toasts-before", C2()), set_style(ee2, "--z-index", store_get(b2, "$toasts", i2).length - C2()), set_style(ee2, "--offset", `${get$1(A2) ? get$1(G2) : get$1(V2)}px`), set_style(ee2, "--initial-height", `${get$1(H2)}px`);
2856
2863
  }, [() => {
2857
- var _a, _b, _c, _d, _e2, _f;
2858
- return cn(n2.class, get$1(d2), (_a = z2()) == null ? void 0 : _a.toast, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.toast, (_d = z2()) == null ? void 0 : _d[get$1(u2)], (_f = (_e2 = k2()) == null ? void 0 : _e2.classes) == null ? void 0 : _f[get$1(u2)]);
2859
- }, () => Boolean(k2().promise), () => Boolean(M2() || q2() && get$1(A2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
2864
+ var _a2, _b, _c, _d, _e2, _f;
2865
+ return cn(n2.class, get$1(d2), (_a2 = D2()) == null ? void 0 : _a2.toast, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.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)]);
2866
+ }, () => Boolean(k2().promise), () => Boolean(M2() || T2() && get$1(z2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
2860
2867
  if (get$1(g2)) return;
2861
2868
  set(G2, get$1(V2));
2862
2869
  const t3 = e3.target;
2863
- t3.setPointerCapture(e3.pointerId), "BUTTON" !== t3.tagName && (set(W2, true), Z2 = {
2870
+ t3.setPointerCapture(e3.pointerId), "BUTTON" !== t3.tagName && (set(L2, true), Z2 = {
2864
2871
  x: e3.clientX,
2865
2872
  y: e3.clientY
2866
2873
  });
2867
2874
  }), event("pointerup", ee2, function onPointerUp() {
2868
- var _a, _b, _c;
2875
+ var _a2, _b, _c;
2869
2876
  if (get$1(F2)) return;
2870
2877
  Z2 = null;
2871
- const e3 = Number(((_a = get$1(R2)) == null ? void 0 : _a.style.getPropertyValue("--swipe-amount").replace("px", "")) || 0);
2878
+ const e3 = Number(((_a2 = get$1(R2)) == null ? void 0 : _a2.style.getPropertyValue("--swipe-amount").replace("px", "")) || 0);
2872
2879
  if (Math.abs(e3) >= 20) return set(G2, get$1(V2)), (_c = (_b = k2()).onDismiss) == null ? void 0 : _c.call(_b, k2()), deleteToast(), void set(F2, true);
2873
- get$1(R2).style.setProperty("--swipe-amount", "0px"), set(W2, false);
2880
+ get$1(R2).style.setProperty("--swipe-amount", "0px"), set(L2, false);
2874
2881
  }), event("pointermove", ee2, function onPointerMove(e3) {
2875
2882
  if (!Z2) return;
2876
- 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;
2877
- 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
2883
+ const t3 = e3.clientY - Z2.y, n3 = e3.clientX - Z2.x, i3 = ("top" === get$1(_2)[0] ? Math.min : Math.max)(0, t3), o3 = "touch" === e3.pointerType ? 10 : 2;
2884
+ Math.abs(i3) > o3 ? get$1(R2).style.setProperty("--swipe-amount", `${t3}px`) : Math.abs(n3) > o3 && // User is swiping in wrong direction so we disable swipe gesture
2878
2885
  // for the current pointer down interaction
2879
2886
  (Z2 = null);
2880
- }), append(e2, ee2), pop(), i2();
2887
+ }), append(e2, ee2), pop(), o2();
2881
2888
  }
2882
- var We = /* @__PURE__ */ template("<ol></ol>"), Fe = /* @__PURE__ */ template('<section class="svelte-1fo5d1m"></section>');
2889
+ var Le = /* @__PURE__ */ template("<ol></ol>"), Fe = /* @__PURE__ */ template('<section class="svelte-1fo5d1m"></section>');
2883
2890
  function Toaster(e2, t2) {
2884
- const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), o2 = legacy_rest_props(n2, ["invert", "theme", "position", "hotkey", "containerAriaLabel", "richColors", "expand", "duration", "visibleToasts", "closeButton", "toastOptions", "offset", "dir"]);
2891
+ const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]), i2 = legacy_rest_props(n2, ["invert", "theme", "position", "hotkey", "containerAriaLabel", "richColors", "expand", "duration", "visibleToasts", "closeButton", "toastOptions", "offset", "dir"]);
2885
2892
  push(t2, false);
2886
- const [i2, s2] = setup_stores(), $toasts = () => store_get(k2, "$toasts", i2), a2 = mutable_state(), l2 = mutable_state(), c2 = "dark", u2 = "light";
2893
+ const [o2, s2] = setup_stores(), $toasts = () => store_get(k2, "$toasts", o2), a2 = mutable_state(), l2 = mutable_state(), c2 = "dark", u2 = "light";
2887
2894
  function getDocumentDirection() {
2888
2895
  if ("undefined" == typeof window) return "ltr";
2889
2896
  if ("undefined" == typeof document) return "ltr";
@@ -2891,8 +2898,8 @@ function Toaster(e2, t2) {
2891
2898
  return "auto" !== e3 && e3 ? e3 : window.getComputedStyle(document.documentElement).direction;
2892
2899
  }
2893
2900
  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"]), 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);
2894
- const { toasts: k2, heights: C2, reset: M2 } = qe;
2895
- let S2 = mutable_state(false), T2 = mutable_state(false), q2 = mutable_state(function getInitialTheme(e3) {
2901
+ const { toasts: k2, heights: C2, reset: M2 } = Te;
2902
+ let q2 = mutable_state(false), S2 = mutable_state(false), T2 = mutable_state(function getInitialTheme(e3) {
2896
2903
  return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? c2 : u2;
2897
2904
  }(f2())), P2 = mutable_state(), O2 = null, E2 = false;
2898
2905
  function handleBlur(e3) {
@@ -2912,11 +2919,11 @@ function Toaster(e2, t2) {
2912
2919
  }), onMount(() => {
2913
2920
  M2();
2914
2921
  const handleKeydown = (e3) => {
2915
- var _a, _b;
2922
+ var _a2, _b;
2916
2923
  _2().every((t3) => (
2917
2924
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2918
2925
  e3[t3] || e3.code === t3
2919
- )) && (set(S2, true), (_a = get$1(P2)) == null ? void 0 : _a.focus()), "Escape" !== e3.code || document.activeElement !== get$1(P2) && !((_b = get$1(P2)) == null ? void 0 : _b.contains(document.activeElement)) || set(S2, false);
2926
+ )) && (set(q2, true), (_a2 = get$1(P2)) == null ? void 0 : _a2.focus()), "Escape" !== e3.code || document.activeElement !== get$1(P2) && !((_b = get$1(P2)) == null ? void 0 : _b.contains(document.activeElement)) || set(q2, false);
2920
2927
  };
2921
2928
  return document.addEventListener("keydown", handleKeydown), () => {
2922
2929
  document.removeEventListener("keydown", handleKeydown);
@@ -2926,7 +2933,7 @@ function Toaster(e2, t2) {
2926
2933
  }), legacy_pre_effect(() => deep_read_state(_2()), () => {
2927
2934
  set(l2, _2().join("+").replace(/Key/g, "").replace(/Digit/g, ""));
2928
2935
  }), legacy_pre_effect(() => $toasts(), () => {
2929
- $toasts().length <= 1 && set(S2, false);
2936
+ $toasts().length <= 1 && set(q2, false);
2930
2937
  }), legacy_pre_effect(() => $toasts(), () => {
2931
2938
  const e3 = $toasts().filter((e4) => e4.dismiss && !e4.delete);
2932
2939
  if (e3.length > 0) {
@@ -2937,17 +2944,17 @@ function Toaster(e2, t2) {
2937
2944
  k2.set(t3);
2938
2945
  }
2939
2946
  }), legacy_pre_effect(() => deep_read_state(f2()), () => {
2940
- if ("system" !== f2() && set(q2, f2()), "undefined" != typeof window) {
2947
+ if ("system" !== f2() && set(T2, f2()), "undefined" != typeof window) {
2941
2948
  "system" === f2() && // check if current preference is dark
2942
2949
  (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? (
2943
2950
  // it's currently dark
2944
- set(q2, c2)
2951
+ set(T2, c2)
2945
2952
  ) : (
2946
2953
  // it's not dark
2947
- set(q2, u2)
2954
+ set(T2, u2)
2948
2955
  ));
2949
2956
  const e3 = window.matchMedia("(prefers-color-scheme: dark)"), changeHandler = ({ matches: e4 }) => {
2950
- set(q2, e4 ? c2 : u2);
2957
+ set(T2, e4 ? c2 : u2);
2951
2958
  };
2952
2959
  "addEventListener" in e3 ? e3.addEventListener("change", changeHandler) : (
2953
2960
  // @ts-expect-error deprecated API
@@ -2958,28 +2965,28 @@ function Toaster(e2, t2) {
2958
2965
  var j2 = comment(), N2 = first_child(j2), consequent = (e3) => {
2959
2966
  var s3 = Fe();
2960
2967
  set_attribute(s3, "tabindex", -1), each(s3, 5, () => get$1(a2), index, (e4, s4, a3, l3) => {
2961
- var c3 = We();
2968
+ var c3 = Le();
2962
2969
  let u3;
2963
- each(c3, 7, () => $toasts().filter((e5) => !e5.position && 0 === a3 || e5.position === get$1(s4)), (e5) => e5.id, (e5, n3, o3, i3) => {
2970
+ each(c3, 7, () => $toasts().filter((e5) => !e5.position && 0 === a3 || e5.position === get$1(s4)), (e5) => e5.id, (e5, n3, i3, o3) => {
2964
2971
  const a4 = /* @__PURE__ */ derived_safe_equal(() => {
2965
- var _a;
2966
- return ((_a = $2()) == null ? void 0 : _a.actionButtonStyle) || "";
2972
+ var _a2;
2973
+ return ((_a2 = $2()) == null ? void 0 : _a2.actionButtonStyle) || "";
2967
2974
  }), l4 = /* @__PURE__ */ derived_safe_equal(() => {
2968
- var _a;
2969
- return ((_a = $2()) == null ? void 0 : _a.cancelButtonStyle) || "";
2975
+ var _a2;
2976
+ return ((_a2 = $2()) == null ? void 0 : _a2.cancelButtonStyle) || "";
2970
2977
  }), c4 = /* @__PURE__ */ derived_safe_equal(() => {
2971
- var _a;
2972
- return ((_a = $2()) == null ? void 0 : _a.class) || "";
2978
+ var _a2;
2979
+ return ((_a2 = $2()) == null ? void 0 : _a2.class) || "";
2973
2980
  }), u4 = /* @__PURE__ */ derived_safe_equal(() => {
2974
- var _a;
2975
- return ((_a = $2()) == null ? void 0 : _a.descriptionClass) || "";
2981
+ var _a2;
2982
+ return ((_a2 = $2()) == null ? void 0 : _a2.descriptionClass) || "";
2976
2983
  }), f3 = /* @__PURE__ */ derived_safe_equal(() => $2().classes || {}), p3 = /* @__PURE__ */ derived_safe_equal(() => {
2977
- var _a;
2978
- return ((_a = $2()) == null ? void 0 : _a.duration) ?? m2();
2984
+ var _a2;
2985
+ return ((_a2 = $2()) == null ? void 0 : _a2.duration) ?? m2();
2979
2986
  }), _3 = /* @__PURE__ */ derived_safe_equal(() => $2().unstyled || false);
2980
2987
  Toast(e5, {
2981
2988
  get index() {
2982
- return get$1(o3);
2989
+ return get$1(i3);
2983
2990
  },
2984
2991
  get toast() {
2985
2992
  return get$1(n3);
@@ -2994,7 +3001,7 @@ function Toaster(e2, t2) {
2994
3001
  return y2();
2995
3002
  },
2996
3003
  get interacting() {
2997
- return get$1(T2);
3004
+ return get$1(S2);
2998
3005
  },
2999
3006
  get position() {
3000
3007
  return get$1(s4);
@@ -3003,7 +3010,7 @@ function Toaster(e2, t2) {
3003
3010
  return h2();
3004
3011
  },
3005
3012
  get expanded() {
3006
- return get$1(S2);
3013
+ return get$1(q2);
3007
3014
  },
3008
3015
  get actionButtonStyle() {
3009
3016
  return get$1(a4);
@@ -3027,68 +3034,68 @@ function Toaster(e2, t2) {
3027
3034
  return get$1(_3);
3028
3035
  },
3029
3036
  $$slots: {
3030
- "loading-icon": (e6, o4) => {
3031
- var i4 = comment();
3032
- slot(first_child(i4), t2, "loading-icon", {}, (e7) => {
3037
+ "loading-icon": (e6, i4) => {
3038
+ var o4 = comment();
3039
+ slot(first_child(o4), t2, "loading-icon", {}, (e7) => {
3033
3040
  const t3 = /* @__PURE__ */ derived_safe_equal(() => "loading" === get$1(n3).type);
3034
3041
  Loader(e7, {
3035
3042
  get visible() {
3036
3043
  return get$1(t3);
3037
3044
  }
3038
3045
  });
3039
- }), append(e6, i4);
3046
+ }), append(e6, o4);
3040
3047
  },
3041
3048
  "success-icon": (e6, n4) => {
3042
- var o4 = comment();
3043
- slot(first_child(o4), t2, "success-icon", {}, (e7) => {
3049
+ var i4 = comment();
3050
+ slot(first_child(i4), t2, "success-icon", {}, (e7) => {
3044
3051
  Icon(e7, {
3045
3052
  type: "success"
3046
3053
  });
3047
- }), append(e6, o4);
3054
+ }), append(e6, i4);
3048
3055
  },
3049
3056
  "error-icon": (e6, n4) => {
3050
- var o4 = comment();
3051
- slot(first_child(o4), t2, "error-icon", {}, (e7) => {
3057
+ var i4 = comment();
3058
+ slot(first_child(i4), t2, "error-icon", {}, (e7) => {
3052
3059
  Icon(e7, {
3053
3060
  type: "error"
3054
3061
  });
3055
- }), append(e6, o4);
3062
+ }), append(e6, i4);
3056
3063
  },
3057
3064
  "warning-icon": (e6, n4) => {
3058
- var o4 = comment();
3059
- slot(first_child(o4), t2, "warning-icon", {}, (e7) => {
3065
+ var i4 = comment();
3066
+ slot(first_child(i4), t2, "warning-icon", {}, (e7) => {
3060
3067
  Icon(e7, {
3061
3068
  type: "warning"
3062
3069
  });
3063
- }), append(e6, o4);
3070
+ }), append(e6, i4);
3064
3071
  },
3065
3072
  "info-icon": (e6, n4) => {
3066
- var o4 = comment();
3067
- slot(first_child(o4), t2, "info-icon", {}, (e7) => {
3073
+ var i4 = comment();
3074
+ slot(first_child(i4), t2, "info-icon", {}, (e7) => {
3068
3075
  Icon(e7, {
3069
3076
  type: "info"
3070
3077
  });
3071
- }), append(e6, o4);
3078
+ }), append(e6, i4);
3072
3079
  }
3073
3080
  }
3074
3081
  });
3075
3082
  }), bind_this(c3, (e5) => set(P2, e5), () => get$1(P2)), template_effect((e5, t3, s5) => {
3076
- var _a;
3083
+ var _a2;
3077
3084
  u3 = set_attributes(c3, u3, {
3078
3085
  tabIndex: -1,
3079
3086
  class: n2.class,
3080
3087
  "data-sonner-toaster": true,
3081
- "data-theme": get$1(q2),
3088
+ "data-theme": get$1(T2),
3082
3089
  "data-rich-colors": g2(),
3083
3090
  dir: e5,
3084
3091
  "data-y-position": t3,
3085
3092
  "data-x-position": s5,
3086
3093
  style: n2.style,
3087
- ...o2
3088
- }, "svelte-1fo5d1m"), set_style(c3, "--front-toast-height", `${(_a = store_get(C2, "$heights", i2)[0]) == null ? void 0 : _a.height}px`), set_style(c3, "--offset", "number" == typeof w2() ? `${w2()}px` : w2() || "32px"), set_style(c3, "--width", "356px"), set_style(c3, "--gap", "14px"), c3.dir = c3.dir;
3089
- }, [() => "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(S2, true)), event("mousemove", c3, () => set(S2, true)), event("mouseleave", c3, () => {
3090
- get$1(T2) || set(S2, false);
3091
- }), event("pointerdown", c3, () => set(T2, true)), event("pointerup", c3, () => set(T2, false)), append(e4, c3);
3094
+ ...i2
3095
+ }, "svelte-1fo5d1m"), set_style(c3, "--front-toast-height", `${(_a2 = store_get(C2, "$heights", o2)[0]) == null ? void 0 : _a2.height}px`), set_style(c3, "--offset", "number" == typeof w2() ? `${w2()}px` : w2() || "32px"), set_style(c3, "--width", "356px"), set_style(c3, "--gap", "14px"), c3.dir = c3.dir;
3096
+ }, [() => "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(q2, true)), event("mousemove", c3, () => set(q2, true)), event("mouseleave", c3, () => {
3097
+ get$1(S2) || set(q2, false);
3098
+ }), event("pointerdown", c3, () => set(S2, true)), event("pointerup", c3, () => set(S2, false)), append(e4, c3);
3092
3099
  }), template_effect(() => set_attribute(s3, "aria-label", `${v2()} ${get$1(l2)}`)), append(e3, s3);
3093
3100
  };
3094
3101
  if_block(N2, (e3) => {
@@ -3096,111 +3103,128 @@ function Toaster(e2, t2) {
3096
3103
  }), append(e2, j2), pop(), s2();
3097
3104
  }
3098
3105
  const Ge = writable(false), He = writable("https://sdk.playlight.dev");
3099
- function handleClick(e2, t2) {
3100
- var _a;
3101
- (_a = t2.onClick) == null ? void 0 : _a.call(t2, t2.game.id), window.open("https://" + t2.game.domain, "_blank", "noopener");
3106
+ function handleClick(e2, t2, n2) {
3107
+ var _a2;
3108
+ get$1(t2) ? e2.preventDefault() : ((_a2 = n2.onClick) == null ? void 0 : _a2.call(n2, n2.game.id), window.open("https://" + n2.game.domain, "_blank", "noopener"));
3102
3109
  }
3103
- var Re = /* @__PURE__ */ template('<div><p class="uppercase font-bold">New</p></div>'), Ve = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), Ke = /* @__PURE__ */ template('<div id="overlay" 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-styo3v"><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-styo3v"></div></div>'), Ue = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <img alt="game logo" loading="eager"></div>');
3110
+ function playGame(e2, t2) {
3111
+ var _a2;
3112
+ e2.stopPropagation(), e2.preventDefault(), (_a2 = t2.onClick) == null ? void 0 : _a2.call(t2, t2.game.id), window.open("https://" + t2.game.domain, "_blank", "noopener");
3113
+ }
3114
+ var Re = /* @__PURE__ */ template('<div><p class="text-primary font-bold uppercase">New</p></div>'), Ve = /* @__PURE__ */ template('<video playsinline="" loop preload="auto"></video>', 2), Ke = /* @__PURE__ */ template("<button>Play</button>"), Ue = /* @__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>'), Ze = /* @__PURE__ */ template('<div role="button" tabindex="0"><!> <!> <img alt="cover" loading="eager"> <!> <!> <img alt="game logo" loading="eager"></div>');
3104
3115
  function GameCard(e2, t2) {
3105
3116
  push(t2, true);
3106
- const [n2, o2] = setup_stores();
3107
- let i2 = state(false), s2 = state(void 0), a2 = state(false), l2 = state(false), c2 = state(false), u2 = state(false);
3117
+ const [n2, i2] = setup_stores();
3118
+ let o2 = state(false), s2 = state(void 0), a2 = state(false), l2 = state(false), c2 = state(false), u2 = state(false), d2 = state(void 0);
3108
3119
  function handleMouseEnter() {
3109
- get$1(i2) || function playSound(e3, t3 = 1) {
3120
+ get$1(o2) || get$1(u2) || function playSound(e3, t3 = 1) {
3110
3121
  try {
3111
3122
  const n3 = new Audio(e3);
3112
3123
  n3.volume = t3, n3.play();
3113
3124
  } catch (e4) {
3114
3125
  console.error("Error playing sound:", e4);
3115
3126
  }
3116
- }(store_get(He, "$projectUrl", n2) + "/static/sounds/hover-selection.ogg", 0.25), // Original hover logic
3117
- set(i2, true), get$1(s2) && t2.game.cover_video_url && (set(u2, true), // Flag that we're attempting to load the video
3118
- get$1(s2).play().catch((e3) => console.error("Video play error:", e3)));
3127
+ }(store_get(He, "$projectUrl", n2) + "/static/sounds/hover-selection.ogg", 0.25), set(o2, true), get$1(s2) && t2.game.cover_video_url && get$1(s2).play().catch((e3) => console.error("Video play error:", e3));
3119
3128
  }
3120
3129
  function handleMouseLeave() {
3121
- set(i2, false), // Only pause if it's already loaded and playing
3122
- get$1(s2) && get$1(a2) && get$1(s2).pause();
3130
+ get$1(u2) || (set(o2, false), get$1(s2) && get$1(a2) && get$1(s2).pause());
3123
3131
  }
3124
- var d2 = Ue();
3125
- d2.__touchstart = handleMouseEnter, d2.__touchend = handleMouseLeave, d2.__click = [handleClick, t2];
3126
- var f2 = child(d2), consequent = (e3) => {
3132
+ user_effect(() => {
3133
+ set(u2, "ontouchstart" in window);
3134
+ });
3135
+ var f2 = Ze();
3136
+ event("touchstart", S, () => set(u2, true), void 0, true), event("touchstart", T, function handleDocumentTouch(e3) {
3137
+ get$1(d2) && !get$1(d2).contains(e3.target) && set(o2, false);
3138
+ }, void 0, true), f2.__touchstart = handleMouseEnter, f2.__click = [handleClick, u2, t2];
3139
+ var p2 = child(f2), consequent = (e3) => {
3127
3140
  var t3 = Re();
3128
3141
  let n3;
3129
- template_effect(() => n3 = set_class(t3, 1, "bg-foreground text-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity", null, n3, {
3130
- "opacity-0": get$1(i2)
3142
+ template_effect(() => n3 = set_class(t3, 1, "bg-background absolute top-4 right-4 z-13 px-2 py-0.5 transition-opacity", null, n3, {
3143
+ "opacity-0": get$1(o2)
3131
3144
  })), append(e3, t3);
3132
3145
  };
3133
- if_block(f2, (e3) => {
3134
- var _a;
3146
+ if_block(p2, (e3) => {
3147
+ var _a2;
3135
3148
  (function isNewGame(e4) {
3136
3149
  const t3 = /* @__PURE__ */ new Date();
3137
3150
  return t3.setDate(t3.getDate() - 7), new Date(e4) > t3;
3138
- })((_a = t2.game) == null ? void 0 : _a.created_at) && e3(consequent);
3151
+ })((_a2 = t2.game) == null ? void 0 : _a2.created_at) && e3(consequent);
3139
3152
  });
3140
- var p2 = sibling(f2, 2), consequent_1 = (e3) => {
3153
+ var _2 = sibling(p2, 2), consequent_1 = (e3) => {
3141
3154
  var n3 = Ve();
3142
- let o3;
3155
+ let i3;
3143
3156
  n3.muted = true, bind_this(n3, (e4) => set(s2, e4), () => get$1(s2)), template_effect(() => {
3144
- 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, {
3145
- "opacity-100": get$1(i2) && get$1(a2) && t2.game.cover_video_url
3157
+ set_attribute(n3, "src", t2.game.cover_video_url), i3 = set_class(n3, 1, "absolute top-0 left-0 z-5 h-full w-full object-cover opacity-0", null, i3, {
3158
+ "opacity-100": get$1(o2) && get$1(a2) && t2.game.cover_video_url
3146
3159
  });
3147
3160
  }), event("loadeddata", n3, () => {
3148
- set(a2, true), set(u2, false);
3161
+ set(a2, true);
3149
3162
  }), append(e3, n3);
3150
3163
  };
3151
- if_block(p2, (e3) => {
3164
+ if_block(_2, (e3) => {
3152
3165
  t2.game.cover_video_url && e3(consequent_1);
3153
3166
  });
3154
- var _2 = sibling(p2, 2);
3155
- let v2;
3156
- var g2 = sibling(_2, 2), consequent_2 = (e3) => {
3157
- var n3 = Ke(), o3 = child(n3), i3 = child(o3), s3 = child(i3), a3 = child(sibling(i3, 2));
3167
+ var v2 = sibling(_2, 2);
3168
+ let g2;
3169
+ var h2 = sibling(v2, 2), consequent_2 = (e3) => {
3170
+ var n3 = Ke();
3171
+ let i3;
3172
+ n3.__click = [playGame, t2], template_effect(() => i3 = 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, i3, {
3173
+ "opacity-0": get$1(o2)
3174
+ })), append(e3, n3);
3175
+ };
3176
+ if_block(h2, (e3) => {
3177
+ get$1(u2) && e3(consequent_2);
3178
+ });
3179
+ var m2 = sibling(h2, 2), consequent_3 = (e3) => {
3180
+ var n3 = Ue(), i3 = child(n3), o3 = child(i3), s3 = child(o3), a3 = child(sibling(o3, 2));
3158
3181
  template_effect(() => {
3159
3182
  set_text(s3, t2.game.name), set_text(a3, t2.game.description || "No description.");
3160
3183
  }), transition(3, n3, () => slide), append(e3, n3);
3161
3184
  };
3162
- if_block(g2, (e3) => {
3163
- get$1(i2) && e3(consequent_2);
3185
+ if_block(m2, (e3) => {
3186
+ get$1(o2) && e3(consequent_3);
3164
3187
  });
3165
- var h2 = sibling(g2, 2);
3166
- let m2;
3167
- template_effect(() => {
3168
- 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-styo3v"), set_attribute(_2, "src", t2.game.cover_image_url), v2 = set_class(_2, 1, "absolute top-0 left-0 z-10 h-full w-full object-cover opacity-0 transition svelte-styo3v", null, v2, {
3169
- "opacity-100": get$1(l2) && (!get$1(i2) || !get$1(a2) || !t2.game.cover_video_url)
3170
- }), set_attribute(h2, "src", t2.game.logo_url), m2 = set_class(h2, 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 svelte-styo3v", null, m2, {
3188
+ var b2 = sibling(m2, 2);
3189
+ let y2;
3190
+ bind_this(f2, (e3) => set(d2, e3), () => get$1(d2)), template_effect(() => {
3191
+ 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 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, {
3192
+ "opacity-100": get$1(l2) && (!get$1(o2) || !get$1(a2) || !t2.game.cover_video_url)
3193
+ }), 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, {
3171
3194
  "opacity-100": get$1(c2)
3172
3195
  });
3173
- }), event("mouseenter", d2, handleMouseEnter), event("focus", d2, handleMouseEnter), event("mouseleave", d2, handleMouseLeave), event("blur", d2, handleMouseLeave), event("touchcancel", d2, handleMouseLeave), event("load", _2, () => {
3196
+ }), event("mouseenter", f2, handleMouseEnter), event("focus", f2, handleMouseEnter), event("mouseleave", f2, handleMouseLeave), event("blur", f2, handleMouseLeave), event("load", v2, () => {
3174
3197
  set(l2, true);
3175
- }), event("load", h2, () => {
3198
+ }), event("load", b2, () => {
3176
3199
  set(c2, true);
3177
- }), append(e2, d2), pop(), o2();
3200
+ }), append(e2, f2), pop(), i2();
3178
3201
  }
3179
- delegate(["touchstart", "touchend", "click"]);
3180
- const Ze = new class PlayLightAPI {
3202
+ delegate(["touchstart", "click"]);
3203
+ const Ye = new (_a = class {
3181
3204
  constructor() {
3205
+ __privateAdd(this, _PlayLightAPI_instances);
3182
3206
  this.baseUrl = "https://api.playlight.dev/platform", this.cachedCategories = null, this.currentGame = null;
3183
3207
  }
3184
3208
  async request(e2, t2 = {}) {
3185
3209
  try {
3186
- const n2 = `${this.baseUrl}${e2}`, o2 = await fetch(n2, {
3210
+ const n2 = `${this.baseUrl}${e2}`, i2 = await fetch(n2, {
3187
3211
  ...t2,
3188
3212
  headers: {
3189
3213
  "Content-Type": "application/json",
3190
3214
  ...t2.headers
3191
3215
  }
3192
3216
  });
3193
- if (!o2.ok) {
3217
+ if (!i2.ok) {
3194
3218
  let e3;
3195
3219
  try {
3196
- e3 = await o2.json();
3220
+ e3 = await i2.json();
3197
3221
  } catch {
3198
3222
  } finally {
3199
- if (429 !== o2.status && 404 !== o2.status) throw new Error(`API request failed: ${(e3 == null ? void 0 : e3.error) || (e3 == null ? void 0 : e3.message) || o2.status}`);
3200
- return 429 === o2.status ? console.warn("Playlight request didn't go through due to rate limiting.") : console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production.");
3223
+ if (429 !== i2.status && 404 !== i2.status) throw new Error(`API request failed: ${(e3 == null ? void 0 : e3.error) || (e3 == null ? void 0 : e3.message) || i2.status}`);
3224
+ return 429 === i2.status ? console.warn("Playlight request didn't go through due to rate limiting.") : console.warn("Playlight game not found. This is normal in a test / local environment, but should not appear in production.");
3201
3225
  }
3202
3226
  }
3203
- return await o2.json();
3227
+ return await i2.json();
3204
3228
  } catch (e3) {
3205
3229
  Oe.error("Error: " + e3), console.error("Playlight API error:", e3);
3206
3230
  }
@@ -3212,21 +3236,21 @@ const Ze = new class PlayLightAPI {
3212
3236
  return this.cachedCategories = e2, e2;
3213
3237
  }
3214
3238
  // Get game suggestions, optionally filtered by category
3215
- async getSuggestions(e2 = null, t2 = 1, n2) {
3216
- let o2 = "/suggestions";
3217
- return e2 && (o2 += "/" + e2), t2 && (o2 += "?page=" + t2), n2 && (o2 += "&without=" + n2), await this.request(o2);
3239
+ async getSuggestions(e2 = null, t2 = 1) {
3240
+ let n2 = "/suggestions";
3241
+ return e2 && (n2 += "/" + e2), t2 && (n2 += "?page=" + t2), n2 += "&without=" + __privateMethod(this, _PlayLightAPI_instances, e_fn).call(this), await this.request(n2);
3218
3242
  }
3219
3243
  // Get game suggestions, optionally filtered by category
3220
3244
  async getCurrentGameInfo() {
3221
3245
  if (this.currentGame) return this.currentGame;
3222
- let e2 = "/game-by-domain/" + window.location.hostname;
3246
+ let e2 = "/game-by-domain/" + __privateMethod(this, _PlayLightAPI_instances, e_fn).call(this);
3223
3247
  return this.currentGame = await this.request(e2), {
3224
3248
  ...this.currentGame
3225
3249
  };
3226
3250
  }
3227
3251
  // Track discovery overlay open
3228
3252
  async trackOpen() {
3229
- const e2 = window.location.hostname;
3253
+ const e2 = __privateMethod(this, _PlayLightAPI_instances, e_fn).call(this);
3230
3254
  await this.request("/event/open", {
3231
3255
  method: "POST",
3232
3256
  body: JSON.stringify({
@@ -3236,7 +3260,7 @@ const Ze = new class PlayLightAPI {
3236
3260
  }
3237
3261
  // Track game click (pass id of the game that was clicked on)
3238
3262
  async trackClick(e2) {
3239
- const t2 = window.location.hostname;
3263
+ const t2 = __privateMethod(this, _PlayLightAPI_instances, e_fn).call(this);
3240
3264
  await this.request("/event/click", {
3241
3265
  method: "POST",
3242
3266
  body: JSON.stringify({
@@ -3245,7 +3269,10 @@ const Ze = new class PlayLightAPI {
3245
3269
  })
3246
3270
  });
3247
3271
  }
3248
- }();
3272
+ }, _PlayLightAPI_instances = new WeakSet(), e_fn = function() {
3273
+ const e2 = window.location.hostname;
3274
+ return e2.startsWith("www.") ? e2.substring(4) : e2;
3275
+ }, _a)();
3249
3276
  function cubicOut(e2) {
3250
3277
  const t2 = e2 - 1;
3251
3278
  return t2 * t2 * t2 + 1;
@@ -3253,8 +3280,8 @@ function cubicOut(e2) {
3253
3280
  function elasticOut(e2) {
3254
3281
  return Math.sin(-13 * (e2 + 1) * Math.PI / 2) * Math.pow(2, -10 * e2) + 1;
3255
3282
  }
3256
- function flip(e2, { from: t2, to: n2 }, o2 = {}) {
3257
- 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);
3283
+ function flip(e2, { from: t2, to: n2 }, i2 = {}) {
3284
+ var { delay: o2 = 0, duration: s2 = (e3) => 120 * Math.sqrt(e3), easing: a2 = cubicOut } = i2, l2 = getComputedStyle(e2), c2 = "none" === l2.transform ? "" : l2.transform, [u2, d2] = l2.transformOrigin.split(" ").map(parseFloat);
3258
3285
  u2 /= e2.clientWidth, d2 /= e2.clientHeight;
3259
3286
  var f2 = (
3260
3287
  /**
@@ -3270,7 +3297,7 @@ function flip(e2, { from: t2, to: n2 }, o2 = {}) {
3270
3297
  }(e2)
3271
3298
  ), p2 = e2.clientWidth / n2.width / f2, _2 = e2.clientHeight / n2.height / f2, v2 = t2.left + t2.width * u2, g2 = t2.top + t2.height * d2, h2 = n2.left + n2.width * u2, m2 = n2.top + n2.height * d2, b2 = (v2 - h2) * p2, y2 = (g2 - m2) * _2, $2 = t2.width / n2.width, w2 = t2.height / n2.height;
3272
3299
  return {
3273
- delay: i2,
3300
+ delay: o2,
3274
3301
  duration: "function" == typeof s2 ? s2(Math.sqrt(b2 * b2 + y2 * y2)) : s2,
3275
3302
  easing: a2,
3276
3303
  css: (e3, t3) => `transform: ${c2} translate(${t3 * b2}px, ${t3 * y2}px) scale(${e3 + t3 * $2}, ${e3 + t3 * w2});`
@@ -3278,12 +3305,12 @@ function flip(e2, { from: t2, to: n2 }, o2 = {}) {
3278
3305
  }
3279
3306
  var on_click$1 = (e2, t2, n2) => {
3280
3307
  set(t2, ""), set(n2, !get$1(n2));
3281
- }, Ye = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), Je = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, o2) => {
3282
- t2(n2), set(o2, false);
3283
- }, Xe = /* @__PURE__ */ template("<button> </button>"), Qe = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), et = /* @__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>'), tt = /* @__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>');
3308
+ }, Je = /* @__PURE__ */ template('<div class="text-muted-foreground animate-pulse p-4 text-center">Loading...</div>'), Xe = /* @__PURE__ */ template('<div class="text-muted-foreground p-4 text-center">No categories found.</div>'), on_click_1$1 = (e2, t2, n2, i2) => {
3309
+ t2(n2), set(i2, false);
3310
+ }, Qe = /* @__PURE__ */ template("<button> </button>"), et = /* @__PURE__ */ template('<div class="space-y-1 p-1"></div>'), tt = /* @__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>'), nt = /* @__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>');
3284
3311
  function Navigation(e2, t2) {
3285
3312
  push(t2, true);
3286
- 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());
3313
+ let n2, i2 = prop(t2, "categories", 19, () => []), o2 = prop(t2, "selectedCategory", 15), s2 = state(false), a2 = /* @__PURE__ */ derived(() => o2() || (i2().length > 0 ? i2()[0] : "...")), l2 = state(""), c2 = state(void 0), u2 = /* @__PURE__ */ derived(() => get$1(l2) ? i2().filter((e3) => e3.toLowerCase().includes(get$1(l2).toLowerCase())) : i2());
3287
3314
  const d2 = ["Looking for", "Interested in", "Searching for", "Fancy some", "What about these"];
3288
3315
  let f2, p2 = state(proxy(d2[0]));
3289
3316
  onMount(function updateRandomPhrase() {
@@ -3291,8 +3318,8 @@ function Navigation(e2, t2) {
3291
3318
  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));
3292
3319
  set(p2, proxy(d2[e3])), f2 = e3;
3293
3320
  });
3294
- var _2 = tt();
3295
- event("click", q, function handleClickOutside(e3) {
3321
+ var _2 = nt();
3322
+ event("click", T, function handleClickOutside(e3) {
3296
3323
  get$1(c2) && !get$1(c2).contains(e3.target) && n2 && !n2.contains(e3.target) && set(s2, false);
3297
3324
  });
3298
3325
  var v2 = child(_2), g2 = child(v2), h2 = child(g2), m2 = sibling(g2, 2);
@@ -3308,8 +3335,8 @@ function Navigation(e2, t2) {
3308
3335
  d: "m6 9 6 6 6-6"
3309
3336
  }]],
3310
3337
  children: (e4, n4) => {
3311
- var o3 = comment();
3312
- slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
3338
+ var i3 = comment();
3339
+ slot(first_child(i3), t3, "default", {}, null), append(e4, i3);
3313
3340
  },
3314
3341
  $$slots: {
3315
3342
  default: true
@@ -3323,7 +3350,7 @@ function Navigation(e2, t2) {
3323
3350
  }
3324
3351
  }), bind_this(m2, (e3) => n2 = e3, () => n2);
3325
3352
  var x2 = sibling(v2, 2), consequent_2 = (e3) => {
3326
- var t3 = et(), n3 = child(t3), a3 = child(n3), d3 = child(a3);
3353
+ var t3 = tt(), n3 = child(t3), a3 = child(n3), d3 = child(a3);
3327
3354
  !function Search(e4, t4) {
3328
3355
  const n4 = legacy_rest_props(t4, ["children", "$$slots", "$$events", "$$legacy"]);
3329
3356
  Icon$1(e4, spread_props({
@@ -3337,8 +3364,8 @@ function Navigation(e2, t2) {
3337
3364
  d: "m21 21-4.3-4.3"
3338
3365
  }]],
3339
3366
  children: (e5, n5) => {
3340
- var o3 = comment();
3341
- slot(first_child(o3), t4, "default", {}, null), append(e5, o3);
3367
+ var i3 = comment();
3368
+ slot(first_child(i3), t4, "default", {}, null), append(e5, i3);
3342
3369
  },
3343
3370
  $$slots: {
3344
3371
  default: true
@@ -3349,33 +3376,33 @@ function Navigation(e2, t2) {
3349
3376
  class: "text-muted-foreground"
3350
3377
  });
3351
3378
  var f3 = sibling(d3, 2), p3 = child(sibling(n3, 2)), consequent = (e4) => {
3352
- append(e4, Ye());
3379
+ append(e4, Je());
3353
3380
  }, alternate_1 = (e4) => {
3354
3381
  var t4 = comment(), n4 = first_child(t4), consequent_1 = (e5) => {
3355
- append(e5, Je());
3382
+ append(e5, Xe());
3356
3383
  }, alternate = (e5) => {
3357
- var t5 = Qe();
3384
+ var t5 = et();
3358
3385
  each(t5, 28, () => get$1(u2), (e6) => e6, (e6, t6) => {
3359
- var n5 = Xe();
3360
- n5.__click = [on_click_1$1, i2, t6, s2];
3361
- var o3 = child(n5);
3386
+ var n5 = Qe();
3387
+ n5.__click = [on_click_1$1, o2, t6, s2];
3388
+ var i3 = child(n5);
3362
3389
  template_effect(() => {
3363
- set_class(n5, 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);
3390
+ set_class(n5, 1, `w-full cursor-pointer px-4 py-2 text-left transition-colors ${(o2() != t6 ? "hover:bg-muted-foreground/20" : "") ?? ""} ${(o2() == t6 ? "bg-white text-black" : "text-white") ?? ""}`), set_text(i3, t6);
3364
3391
  }), function animation(e7, t7, n6) {
3365
- var o4, i3, s3, a4 = (
3392
+ var i4, o3, s3, a4 = (
3366
3393
  /** @type {EachItem} */
3367
3394
  ce
3368
3395
  ), l3 = null;
3369
3396
  a4.a ?? (a4.a = {
3370
3397
  element: e7,
3371
3398
  measure() {
3372
- o4 = this.element.getBoundingClientRect();
3399
+ i4 = this.element.getBoundingClientRect();
3373
3400
  },
3374
3401
  apply() {
3375
- if (s3 == null ? void 0 : s3.abort(), i3 = this.element.getBoundingClientRect(), o4.left !== i3.left || o4.right !== i3.right || o4.top !== i3.top || o4.bottom !== i3.bottom) {
3402
+ if (s3 == null ? void 0 : s3.abort(), o3 = this.element.getBoundingClientRect(), i4.left !== o3.left || i4.right !== o3.right || i4.top !== o3.top || i4.bottom !== o3.bottom) {
3376
3403
  const e8 = t7()(this.element, {
3377
- from: o4,
3378
- to: i3
3404
+ from: i4,
3405
+ to: o3
3379
3406
  }, n6 == null ? void 0 : n6());
3380
3407
  s3 = animate(this.element, e8, void 0, 1, () => {
3381
3408
  s3 == null ? void 0 : s3.abort(), s3 = void 0;
@@ -3384,7 +3411,7 @@ function Navigation(e2, t2) {
3384
3411
  },
3385
3412
  fix() {
3386
3413
  if (!e7.getAnimations().length) {
3387
- var { position: t8, width: n7, height: i4 } = getComputedStyle(e7);
3414
+ var { position: t8, width: n7, height: o4 } = getComputedStyle(e7);
3388
3415
  if ("absolute" !== t8 && "fixed" !== t8) {
3389
3416
  var s4 = (
3390
3417
  /** @type {HTMLElement | SVGElement} */
@@ -3395,10 +3422,10 @@ function Navigation(e2, t2) {
3395
3422
  width: s4.width,
3396
3423
  height: s4.height,
3397
3424
  transform: s4.transform
3398
- }, s4.position = "absolute", s4.width = n7, s4.height = i4;
3425
+ }, s4.position = "absolute", s4.width = n7, s4.height = o4;
3399
3426
  var a5 = e7.getBoundingClientRect();
3400
- if (o4.left !== a5.left || o4.top !== a5.top) {
3401
- var c3 = `translate(${o4.left - a5.left}px, ${o4.top - a5.top}px)`;
3427
+ if (i4.left !== a5.left || i4.top !== a5.top) {
3428
+ var c3 = `translate(${i4.left - a5.left}px, ${i4.top - a5.top}px)`;
3402
3429
  s4.transform = s4.transform ? `${s4.transform} ${c3}` : c3;
3403
3430
  }
3404
3431
  }
@@ -3428,12 +3455,12 @@ function Navigation(e2, t2) {
3428
3455
  }, true), append(e4, t4);
3429
3456
  };
3430
3457
  if_block(p3, (e4) => {
3431
- 0 === o2().length ? e4(consequent) : e4(alternate_1, false);
3458
+ 0 === i2().length ? e4(consequent) : e4(alternate_1, false);
3432
3459
  }), bind_this(t3, (e4) => set(c2, e4), () => get$1(c2)), function bind_value(e4, t4, n4 = t4) {
3433
- var o3 = is_runes();
3434
- listen_to_event_and_reset_event(e4, "input", (i3) => {
3435
- var s3 = i3 ? e4.defaultValue : e4.value;
3436
- if (s3 = is_numberlike_input(e4) ? to_number(s3) : s3, n4(s3), o3 && s3 !== (s3 = t4())) {
3460
+ var i3 = is_runes();
3461
+ listen_to_event_and_reset_event(e4, "input", (o3) => {
3462
+ var s3 = o3 ? e4.defaultValue : e4.value;
3463
+ if (s3 = is_numberlike_input(e4) ? to_number(s3) : s3, n4(s3), i3 && s3 !== (s3 = t4())) {
3437
3464
  var a4 = e4.selectionStart, l3 = e4.selectionEnd;
3438
3465
  e4.value = s3 ?? "", // Restore selection
3439
3466
  null !== l3 && (e4.selectionStart = a4, e4.selectionEnd = Math.min(l3, e4.value.length));
@@ -3466,58 +3493,65 @@ function Navigation(e2, t2) {
3466
3493
  delegate(["click"]);
3467
3494
  var on_click = (e2, t2) => {
3468
3495
  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));
3469
- }, on_click_1 = (e2, t2) => store_set(Ge, false), nt = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), rt = /* @__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>'), ot = /* @__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>'), it = /* @__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 truncate text-sm text-nowrap opacity-50 transition hover:opacity-25 max-md:hidden"><p class="bg-background/50 p-1 px-2 text-white"> </p></button> <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>');
3496
+ }, rt = /* @__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(Ge, false), it = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), ot = /* @__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>'), st = /* @__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>'), at = /* @__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>');
3470
3497
  function DiscoveryOverlay(e2, t2) {
3471
3498
  push(t2, true);
3472
- const [n2, o2] = setup_stores();
3473
- let i2, s2 = state(void 0), a2 = state(true), l2 = state(false), c2 = state(void 0), u2 = state(proxy([])), d2 = state(proxy([])), f2 = state(true), p2 = state(1), _2 = state(true), v2 = state(void 0), g2 = state(false);
3499
+ const [n2, i2] = setup_stores();
3500
+ let o2, s2 = prop(t2, "showIntentToggle", 3, true), a2 = state(void 0), l2 = state(true), c2 = state(false), u2 = state(void 0), d2 = state(proxy([])), f2 = state(proxy([])), p2 = state(true), _2 = state(1), v2 = state(true), g2 = state(void 0), h2 = state(false);
3474
3501
  async function fetchGames() {
3475
- if (!(get$1(a2) && get$1(p2) > 1 || get$1(l2))) try {
3476
- 1 === get$1(p2) ? set(a2, true) : set(l2, true);
3477
- const e3 = get$1(g2) ? null : get$1(s2), t3 = await Ze.getSuggestions(e3, get$1(p2), window.location.hostname), n3 = (t3 == null ? void 0 : t3.games) || [], o3 = n3.filter((e4) => !get$1(u2).some((t4) => t4.id === e4.id));
3478
- set(u2, proxy([...get$1(u2), ...o3])), n3.length < 10 ? !get$1(g2) && get$1(s2) ? (
3502
+ if (!(get$1(l2) && get$1(_2) > 1 || get$1(c2))) try {
3503
+ 1 === get$1(_2) ? set(l2, true) : set(c2, true);
3504
+ const e3 = get$1(h2) ? null : get$1(a2), t3 = await Ye.getSuggestions(e3, get$1(_2)), n3 = (t3 == null ? void 0 : t3.games) || [], i3 = n3.filter((e4) => !get$1(d2).some((t4) => t4.id === e4.id));
3505
+ set(d2, proxy([...get$1(d2), ...i3])), n3.length < 10 ? !get$1(h2) && get$1(a2) ? (
3479
3506
  // Try with all games
3480
- (set(g2, true), set(p2, 1), setTimeout(() => fetchGames(), 100))
3481
- ) : set(_2, false) : set(p2, get$1(p2) + 1);
3507
+ (set(h2, true), set(_2, 1), setTimeout(() => fetchGames(), 100))
3508
+ ) : set(v2, false) : set(_2, get$1(_2) + 1);
3482
3509
  } catch (e3) {
3483
3510
  console.error(e3), Oe.error("Failed to load games: " + e3);
3484
3511
  } finally {
3485
- set(a2, false), set(l2, false), // For Chrome: manually check if element is still in view and should trigger another load
3486
- get$1(_2) && get$1(v2) && setTimeout(() => {
3487
- const e3 = get$1(v2).getBoundingClientRect();
3512
+ set(l2, false), set(c2, false), // For Chrome: manually check if element is still in view and should trigger another load
3513
+ get$1(v2) && get$1(g2) && setTimeout(() => {
3514
+ const e3 = get$1(g2).getBoundingClientRect();
3488
3515
  !(e3.top >= -200 && // Include rootMargin
3489
3516
  e3.left >= 0 && e3.bottom <= window.innerHeight + 200 && // Include rootMargin
3490
- e3.right <= window.innerWidth) || get$1(a2) || get$1(l2) || fetchGames();
3517
+ e3.right <= window.innerWidth) || get$1(l2) || get$1(c2) || fetchGames();
3491
3518
  }, 150);
3492
3519
  }
3493
3520
  }
3494
- onMount(() => (set(f2, !Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))), // Setup scroll observer
3495
- i2 = new IntersectionObserver((e3) => {
3496
- e3[0].isIntersecting && get$1(_2) && !get$1(a2) && !get$1(l2) && fetchGames();
3521
+ onMount(() => (set(p2, !Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))), // Setup scroll observer
3522
+ o2 = new IntersectionObserver((e3) => {
3523
+ e3[0].isIntersecting && get$1(v2) && !get$1(l2) && !get$1(c2) && fetchGames();
3497
3524
  }, {
3498
3525
  rootMargin: "200px"
3499
- }), () => i2 == null ? void 0 : i2.disconnect())), onMount(async () => {
3500
- const e3 = await Ze.getCurrentGameInfo();
3501
- set(c2, proxy(e3 == null ? void 0 : e3.category)), await async function fetchCategories() {
3502
- var _a, _b, _c, _d;
3503
- set(d2, proxy(await Ze.getCategories())), !get$1(s2) && ((_a = get$1(d2)) == null ? void 0 : _a.length) > 0 && set(s2, proxy(get$1(c2) && ((_b = get$1(d2)) == null ? void 0 : _b.includes(get$1(c2))) ? get$1(c2) : (_d = get$1(d2)) == null ? void 0 : _d[((_c = get$1(d2)) == null ? void 0 : _c.length) - 1]));
3526
+ }), () => o2 == null ? void 0 : o2.disconnect())), onMount(async () => {
3527
+ const e3 = await Ye.getCurrentGameInfo();
3528
+ set(u2, proxy(e3 == null ? void 0 : e3.category)), await async function fetchCategories() {
3529
+ var _a2, _b, _c, _d;
3530
+ set(f2, proxy(await Ye.getCategories())), !get$1(a2) && ((_a2 = get$1(f2)) == null ? void 0 : _a2.length) > 0 && set(a2, proxy(get$1(u2) && ((_b = get$1(f2)) == null ? void 0 : _b.includes(get$1(u2))) ? get$1(u2) : (_d = get$1(f2)) == null ? void 0 : _d[((_c = get$1(f2)) == null ? void 0 : _c.length) - 1]));
3504
3531
  }();
3505
3532
  }), user_effect(() => {
3506
- get$1(s2) && (set(u2, proxy([])), set(p2, 1), set(_2, true), set(g2, false), set(a2, true), // Delay fetch to prevent rapid requests
3533
+ get$1(a2) && (set(d2, proxy([])), set(_2, 1), set(v2, true), set(h2, false), set(l2, true), // Delay fetch to prevent rapid requests
3507
3534
  setTimeout(async () => {
3508
- await fetchGames(), get$1(u2).length < 10 && await fetchGames();
3535
+ await fetchGames(), get$1(d2).length < 10 && await fetchGames();
3509
3536
  }, 100));
3510
3537
  }), user_effect(() => {
3511
- get$1(v2) && i2 && i2.observe(get$1(v2));
3538
+ get$1(g2) && o2 && o2.observe(get$1(g2));
3512
3539
  });
3513
- var h2 = it();
3514
- event("keydown", q, (e3) => {
3540
+ var m2 = at();
3541
+ event("keydown", T, (e3) => {
3515
3542
  "Escape" == e3.key && store_set(Ge, false);
3516
3543
  });
3517
- var m2 = child(h2), b2 = child(m2), y2 = child(b2), $2 = child(sibling(b2, 2));
3518
- $2.__click = [on_click, f2];
3519
- var w2 = child($2), x2 = child(w2), k2 = sibling($2, 2);
3520
- k2.__click = [on_click_1, () => store_get(Ge, "$discoveryOpen", n2)], function X(e3, t3) {
3544
+ var b2 = child(m2), y2 = child(b2), $2 = child(y2), w2 = child(sibling(y2, 2)), consequent = (e3) => {
3545
+ var t3 = rt();
3546
+ t3.__click = [on_click, p2];
3547
+ var n3 = child(t3), i3 = child(n3);
3548
+ template_effect(() => set_text(i3, get$1(p2) ? "Ignore exit intent" : "Trigger on exit intent")), append(e3, t3);
3549
+ };
3550
+ if_block(w2, (e3) => {
3551
+ s2() && e3(consequent);
3552
+ });
3553
+ var x2 = sibling(w2, 2);
3554
+ x2.__click = [on_click_1, () => store_get(Ge, "$discoveryOpen", n2)], function X(e3, t3) {
3521
3555
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3522
3556
  Icon$1(e3, spread_props({
3523
3557
  name: "x"
@@ -3528,67 +3562,67 @@ function DiscoveryOverlay(e2, t2) {
3528
3562
  d: "m6 6 12 12"
3529
3563
  }]],
3530
3564
  children: (e4, n4) => {
3531
- var o3 = comment();
3532
- slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
3565
+ var i3 = comment();
3566
+ slot(first_child(i3), t3, "default", {}, null), append(e4, i3);
3533
3567
  },
3534
3568
  $$slots: {
3535
3569
  default: true
3536
3570
  }
3537
3571
  }));
3538
- }(child(k2), {
3572
+ }(child(x2), {
3539
3573
  size: 24
3540
3574
  });
3541
- var C2 = sibling(m2, 2);
3542
- Navigation(child(C2), {
3575
+ var k2 = sibling(b2, 2);
3576
+ Navigation(child(k2), {
3543
3577
  get categories() {
3544
- return get$1(d2);
3578
+ return get$1(f2);
3545
3579
  },
3546
3580
  get selectedCategory() {
3547
- return get$1(s2);
3581
+ return get$1(a2);
3548
3582
  },
3549
3583
  set selectedCategory(e3) {
3550
- set(s2, proxy(e3));
3584
+ set(a2, proxy(e3));
3551
3585
  }
3552
3586
  });
3553
- var M2 = sibling(C2, 2), S2 = child(M2), consequent = (e3) => {
3554
- var t3 = nt();
3587
+ var C2 = sibling(k2, 2), M2 = child(C2), consequent_1 = (e3) => {
3588
+ var t3 = it();
3555
3589
  Loader_circle(child(t3), {
3556
3590
  class: "animate-spin opacity-75",
3557
3591
  size: 50,
3558
3592
  strokeWidth: 2.5
3559
3593
  }), append(e3, t3);
3560
3594
  }, alternate_1 = (e3) => {
3561
- var t3 = comment(), n3 = first_child(t3), consequent_1 = (e4) => {
3562
- append(e4, rt());
3595
+ var t3 = comment(), n3 = first_child(t3), consequent_2 = (e4) => {
3596
+ append(e4, ot());
3563
3597
  }, alternate = (e4) => {
3564
- var t4 = ot(), n4 = child(t4);
3565
- each(n4, 17, () => get$1(u2), index, (e5, t5) => {
3598
+ var t4 = st(), n4 = child(t4);
3599
+ each(n4, 17, () => get$1(d2), index, (e5, t5) => {
3566
3600
  GameCard(e5, {
3567
3601
  get game() {
3568
3602
  return get$1(t5);
3569
3603
  },
3570
- onClick: () => Ze.trackClick(get$1(t5).id)
3604
+ onClick: () => Ye.trackClick(get$1(t5).id)
3571
3605
  });
3572
3606
  });
3573
- var o3 = sibling(n4, 2), i3 = child(o3), consequent_2 = (e5) => {
3607
+ var i3 = sibling(n4, 2), o3 = child(i3), consequent_3 = (e5) => {
3574
3608
  Loader_circle(e5, {
3575
3609
  class: "animate-spin opacity-75",
3576
3610
  size: 30,
3577
3611
  strokeWidth: 2.5
3578
3612
  });
3579
3613
  };
3580
- if_block(i3, (e5) => {
3581
- get$1(l2) && e5(consequent_2);
3582
- }), bind_this(o3, (e5) => set(v2, e5), () => get$1(v2)), append(e4, t4);
3614
+ if_block(o3, (e5) => {
3615
+ get$1(c2) && e5(consequent_3);
3616
+ }), bind_this(i3, (e5) => set(g2, e5), () => get$1(g2)), append(e4, t4);
3583
3617
  };
3584
3618
  if_block(n3, (e4) => {
3585
- 0 !== get$1(u2).length || get$1(a2) ? e4(alternate, false) : e4(consequent_1);
3619
+ 0 !== get$1(d2).length || get$1(l2) ? e4(alternate, false) : e4(consequent_2);
3586
3620
  }, true), append(e3, t3);
3587
3621
  };
3588
- if_block(S2, (e3) => {
3589
- get$1(a2) && 0 === get$1(u2).length ? e3(consequent) : e3(alternate_1, false);
3622
+ if_block(M2, (e3) => {
3623
+ get$1(l2) && 0 === get$1(d2).length ? e3(consequent_1) : e3(alternate_1, false);
3590
3624
  });
3591
- var I2 = child(sibling(M2, 2));
3625
+ var q2 = child(sibling(C2, 2));
3592
3626
  !function External_link(e3, t3) {
3593
3627
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3594
3628
  Icon$1(e3, spread_props({
@@ -3602,38 +3636,36 @@ function DiscoveryOverlay(e2, t2) {
3602
3636
  d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
3603
3637
  }]],
3604
3638
  children: (e4, n4) => {
3605
- var o3 = comment();
3606
- slot(first_child(o3), t3, "default", {}, null), append(e4, o3);
3639
+ var i3 = comment();
3640
+ slot(first_child(i3), t3, "default", {}, null), append(e4, i3);
3607
3641
  },
3608
3642
  $$slots: {
3609
3643
  default: true
3610
3644
  }
3611
3645
  }));
3612
- }(sibling(child(I2)), {
3646
+ }(sibling(child(q2)), {
3613
3647
  size: 14,
3614
3648
  style: "margin-top: 1px;"
3615
- }), template_effect(() => {
3616
- set_attribute(y2, "src", store_get(He, "$projectUrl", n2) + "/static/images/logo-white-small.png"), set_text(x2, get$1(f2) ? "Ignore exit intent" : "Trigger on exit intent");
3617
- }), transition(3, h2, () => blur, () => ({
3649
+ }), template_effect(() => set_attribute($2, "src", store_get(He, "$projectUrl", n2) + "/static/images/logo-white-small.png")), transition(3, m2, () => blur, () => ({
3618
3650
  duration: 250
3619
- })), append(e2, h2), pop(), o2();
3651
+ })), append(e2, m2), pop(), i2();
3620
3652
  }
3621
3653
  delegate(["click"]);
3622
- var st = /* @__PURE__ */ template('<div class="fixed top-0 left-0 right-0 h-2 z-99990"></div>');
3654
+ var lt = /* @__PURE__ */ template('<div class="fixed top-0 left-0 right-0 h-2 z-99990"></div>');
3623
3655
  delegate(["mouseover"]);
3624
- var at = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3656
+ var ct = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3625
3657
  function App(e2, t2) {
3626
- var _a, _b, _c, _d;
3658
+ var _a2, _b, _c, _d;
3627
3659
  push(t2, true);
3628
- const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ge, "$discoveryOpen", n2);
3629
- let i2 = proxy((_b = (_a = t2.config) == null ? void 0 : _a.button) == null ? void 0 : _b.position), s2 = proxy((_d = (_c = t2.config) == null ? void 0 : _c.button) == null ? void 0 : _d.visible);
3660
+ const [n2, i2] = setup_stores(), $discoveryOpen = () => store_get(Ge, "$discoveryOpen", n2);
3661
+ let o2 = proxy((_b = (_a2 = t2.config) == null ? void 0 : _a2.button) == null ? void 0 : _b.position), s2 = proxy((_d = (_c = t2.config) == null ? void 0 : _c.button) == null ? void 0 : _d.visible);
3630
3662
  function openDiscovery() {
3631
- store_set(Ge, true), Ze.trackOpen();
3663
+ store_set(Ge, true), Ye.trackOpen();
3632
3664
  }
3633
- var a2 = at(), l2 = first_child(a2);
3665
+ var a2 = ct(), l2 = first_child(a2);
3634
3666
  FloatingButton(l2, {
3635
3667
  get position() {
3636
- return i2;
3668
+ return o2;
3637
3669
  },
3638
3670
  get visible() {
3639
3671
  return s2;
@@ -3641,33 +3673,41 @@ function App(e2, t2) {
3641
3673
  onClick: openDiscovery
3642
3674
  });
3643
3675
  var c2 = sibling(l2, 2), consequent = (e3) => {
3644
- DiscoveryOverlay(e3, {});
3676
+ const n3 = /* @__PURE__ */ derived(() => {
3677
+ var _a3, _b2;
3678
+ return (_b2 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b2.enabled;
3679
+ });
3680
+ DiscoveryOverlay(e3, {
3681
+ get showIntentToggle() {
3682
+ return get$1(n3);
3683
+ }
3684
+ });
3645
3685
  };
3646
3686
  if_block(c2, (e3) => {
3647
3687
  $discoveryOpen() && e3(consequent);
3648
3688
  });
3649
3689
  var u2 = sibling(c2, 2);
3650
3690
  const d2 = /* @__PURE__ */ derived(() => {
3651
- var _a2, _b2;
3652
- return (_b2 = (_a2 = t2.config) == null ? void 0 : _a2.exitIntent) == null ? void 0 : _b2.enabled;
3691
+ var _a3, _b2;
3692
+ return (_b2 = (_a3 = t2.config) == null ? void 0 : _a3.exitIntent) == null ? void 0 : _b2.enabled;
3653
3693
  });
3654
3694
  !function ExitIntentDetector(e3, t3) {
3655
3695
  push(t3, true);
3656
- let n3, o3 = prop(t3, "enabled", 3, true), i3 = false;
3696
+ let n3, i3 = prop(t3, "enabled", 3, true), o3 = false;
3657
3697
  onMount(() => {
3658
3698
  "undefined" != typeof window && (n3 = window.innerHeight);
3659
3699
  });
3660
- var s3 = st();
3661
- event("mouseleave", q, () => {
3662
- i3 = false;
3663
- }), event("mousemove", q, (e4) => {
3700
+ var s3 = lt();
3701
+ event("mouseleave", T, () => {
3702
+ o3 = false;
3703
+ }), event("mousemove", T, (e4) => {
3664
3704
  const t4 = e4.clientY;
3665
- if (!i3) return i3 = true, void (n3 = t4);
3705
+ if (!o3) return o3 = true, void (n3 = t4);
3666
3706
  n3 = t4;
3667
3707
  }), s3.__mouseover = (e4) => {
3668
- var _a2;
3708
+ var _a3;
3669
3709
  const s4 = e4.clientY;
3670
- s4 < n3 && i3 && o3() && !localStorage.getItem("playlight_exit_intent_disabled_by_user") && ((_a2 = t3.onIntent) == null ? void 0 : _a2.call(t3)), // Update lastMouseY after checking
3710
+ s4 < n3 && o3 && i3() && !localStorage.getItem("playlight_exit_intent_disabled_by_user") && ((_a3 = t3.onIntent) == null ? void 0 : _a3.call(t3)), // Update lastMouseY after checking
3671
3711
  n3 = s4;
3672
3712
  }, append(e3, s3), pop();
3673
3713
  }(u2, {
@@ -3677,9 +3717,9 @@ function App(e2, t2) {
3677
3717
  onIntent: () => {
3678
3718
  $discoveryOpen() || openDiscovery();
3679
3719
  }
3680
- }), Toaster(sibling(u2, 2), {}), append(e2, a2), pop(), o2();
3720
+ }), Toaster(sibling(u2, 2), {}), append(e2, a2), pop(), i2();
3681
3721
  }
3682
- const lt = {
3722
+ const ut = {
3683
3723
  button: {
3684
3724
  position: "bottom-right",
3685
3725
  visible: true
@@ -3688,30 +3728,30 @@ const lt = {
3688
3728
  enabled: true
3689
3729
  }
3690
3730
  };
3691
- let ct = {
3692
- ...lt
3731
+ let dt = {
3732
+ ...ut
3693
3733
  };
3694
3734
  function initializeConfig(e2 = {}) {
3695
- return ct = deepMerge(lt, e2), ct;
3735
+ return dt = deepMerge(ut, e2), dt;
3696
3736
  }
3697
3737
  function deepMerge(e2, t2) {
3698
3738
  const n2 = {
3699
3739
  ...e2
3700
3740
  };
3701
- return isObject(e2) && isObject(t2) && Object.keys(t2).forEach((o2) => {
3702
- isObject(t2[o2]) ? o2 in e2 ? n2[o2] = deepMerge(e2[o2], t2[o2]) : Object.assign(n2, {
3703
- [o2]: t2[o2]
3741
+ return isObject(e2) && isObject(t2) && Object.keys(t2).forEach((i2) => {
3742
+ isObject(t2[i2]) ? i2 in e2 ? n2[i2] = deepMerge(e2[i2], t2[i2]) : Object.assign(n2, {
3743
+ [i2]: t2[i2]
3704
3744
  }) : Object.assign(n2, {
3705
- [o2]: t2[o2]
3745
+ [i2]: t2[i2]
3706
3746
  });
3707
3747
  }), n2;
3708
3748
  }
3709
3749
  function isObject(e2) {
3710
3750
  return e2 && "object" == typeof e2 && !Array.isArray(e2);
3711
3751
  }
3712
- const ut = new class PlaylightSDK {
3752
+ const ft = new class PlaylightSDK {
3713
3753
  constructor() {
3714
- this.container = null, this.app = null, this.isInitialized = false, this.config = null, this.api = Ze;
3754
+ this.container = null, this.app = null, this.isInitialized = false, this.config = null, this.api = Ye;
3715
3755
  }
3716
3756
  async init(e2 = {}) {
3717
3757
  if (!this.isInitialized) return "undefined" == typeof window ? console.error("Playlight cannot run on the server, as it depends browser APIs.") : (
@@ -3729,11 +3769,11 @@ const ut = new class PlaylightSDK {
3729
3769
  }
3730
3770
  // Public methods
3731
3771
  setDiscovery(e2) {
3732
- this.isInitialized && (Ge.set(e2), get(Ge) && Ze.trackOpen());
3772
+ this.isInitialized && (Ge.set(e2), get(Ge) && Ye.trackOpen());
3733
3773
  }
3734
3774
  }();
3735
- "undefined" != typeof window && (window.playlightSDK = ut);
3775
+ "undefined" != typeof window && (window.playlightSDK = ft);
3736
3776
  export {
3737
- ut as default
3777
+ ft as default
3738
3778
  };
3739
3779
  //# sourceMappingURL=playlight-sdk.es.js.map