playlight-sdk 0.0.5 → 0.0.6

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.
@@ -22,7 +22,7 @@ function safe_equals(e2) {
22
22
  return !safe_not_equal(e2, this.v);
23
23
  }
24
24
  let C = false;
25
- const M = Symbol(), S = "http://www.w3.org/2000/svg";
25
+ const M = Symbol(), q = "http://www.w3.org/2000/svg";
26
26
  function lifecycle_outside_component(e2) {
27
27
  throw new Error("https://svelte.dev/e/lifecycle_outside_component");
28
28
  }
@@ -273,7 +273,7 @@ function proxy(e2, n2 = null, o2) {
273
273
  function update_version(e2, t2 = 1) {
274
274
  set(e2, e2.v + t2);
275
275
  }
276
- var T, q, P, O, E;
276
+ var S, T, P, O, E;
277
277
  function create_text(e2 = "") {
278
278
  return document.createTextNode(e2);
279
279
  }
@@ -585,7 +585,7 @@ function flush_tasks() {
585
585
  N = [], run_all(e2);
586
586
  }();
587
587
  }
588
- let B = false, z = false, D = null, A = false, L = false;
588
+ let B = false, D = false, z = null, A = false, L = false;
589
589
  function set_is_destroying_effect(e2) {
590
590
  L = e2;
591
591
  }
@@ -758,8 +758,8 @@ function infinite_loop_guard() {
758
758
  throw new Error("https://svelte.dev/e/effect_update_depth_exceeded");
759
759
  }();
760
760
  } catch (e2) {
761
- if (null === D) throw e2;
762
- handle_error(e2, D, null);
761
+ if (null === z) throw e2;
762
+ handle_error(e2, z, null);
763
763
  }
764
764
  }
765
765
  function flush_queued_root_effects() {
@@ -774,7 +774,7 @@ function flush_queued_root_effects() {
774
774
  }
775
775
  }
776
776
  } finally {
777
- z = false, D = null;
777
+ D = false, z = null;
778
778
  }
779
779
  }
780
780
  function flush_queued_effects(e2) {
@@ -800,8 +800,8 @@ function flush_queued_effects(e2) {
800
800
  }
801
801
  }
802
802
  function schedule_effect(e2) {
803
- z || (z = true, queueMicrotask(flush_queued_root_effects));
804
- for (var t2 = D = e2; null !== t2.parent; ) {
803
+ D || (D = true, queueMicrotask(flush_queued_root_effects));
804
+ for (var t2 = z = e2; null !== t2.parent; ) {
805
805
  var n2 = (t2 = t2.parent).f;
806
806
  if (96 & n2) {
807
807
  if (!(n2 & v)) return;
@@ -841,7 +841,7 @@ async function tick() {
841
841
  await Promise.resolve(), // By calling flushSync we guarantee that any pending state changes are applied after one tick.
842
842
  // TODO look into whether we can make flushing subsequent updates synchronously in the future.
843
843
  function flushSync(e2) {
844
- for (flush_tasks(); W.length > 0; ) z = true, flush_queued_root_effects(), flush_tasks();
844
+ for (flush_tasks(); W.length > 0; ) D = true, flush_queued_root_effects(), flush_tasks();
845
845
  }();
846
846
  }
847
847
  function get$1(e2) {
@@ -1155,8 +1155,8 @@ function mount(e2, t2) {
1155
1155
  * where these globals are not available while avoiding a separate server entry point
1156
1156
  */
1157
1157
  function init_operations() {
1158
- if (void 0 === T) {
1159
- T = window, q = document, P = /Firefox/.test(navigator.userAgent);
1158
+ if (void 0 === S) {
1159
+ S = window, T = document, P = /Firefox/.test(navigator.userAgent);
1160
1160
  var e4 = Element.prototype, t4 = Node.prototype;
1161
1161
  O = s(t4, "firstChild").get, // @ts-ignore
1162
1162
  E = s(t4, "nextSibling").get, // the following assignments improve perf of lookups on DOM nodes
@@ -1289,10 +1289,10 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
1289
1289
  if (x2.length < k2.length) {
1290
1290
  var C2, M2 = k2[0];
1291
1291
  w2 = M2.prev;
1292
- var S2 = x2[0], I2 = x2[x2.length - 1];
1292
+ var q2 = x2[0], I2 = x2[x2.length - 1];
1293
1293
  for (C2 = 0; C2 < x2.length; C2 += 1) move(x2[C2], M2, n3);
1294
1294
  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 = [];
1295
+ link(t3, q2.prev, I2.next), link(t3, w2, q2), link(t3, I2, M2), $2 = M2, w2 = I2, _2 -= 1, x2 = [], k2 = [];
1296
1296
  } else
1297
1297
  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
1298
  continue;
@@ -1310,14 +1310,14 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
1310
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;
1311
1311
  }
1312
1312
  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) {
1313
+ for (var S2 = void 0 === c3 ? [] : o(c3); null !== $2; )
1314
+ $2.e.f & m || S2.push($2), $2 = $2.next;
1315
+ var T2 = S2.length;
1316
+ if (T2 > 0) {
1317
1317
  var P2 = 4 & s3 && 0 === h2 ? n3 : null;
1318
1318
  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();
1319
+ for (_2 = 0; _2 < T2; _2 += 1) (_c = S2[_2].a) == null ? void 0 : _c.measure();
1320
+ for (_2 = 0; _2 < T2; _2 += 1) (_d = S2[_2].a) == null ? void 0 : _d.fix();
1321
1321
  }
1322
1322
  !function pause_effects(e5, t4, n4, o2) {
1323
1323
  for (var i4 = [], s4 = t4.length, a4 = 0; a4 < s4; a4++) pause_children(t4[a4].e, i4, true);
@@ -1341,7 +1341,7 @@ function each(e2, n2, i2, s2, a2, l2 = null) {
1341
1341
  l4 || (o2.delete(i5.k), link(e5, i5.prev, i5.next)), destroy_effect(i5.e, !l4);
1342
1342
  }
1343
1343
  });
1344
- }(t3, T2, P2, b2);
1344
+ }(t3, S2, P2, b2);
1345
1345
  }
1346
1346
  }
1347
1347
  v2 && queue_micro_task(() => {
@@ -2149,7 +2149,7 @@ function Icon$1(e2, t2) {
2149
2149
  ), f3 = ce;
2150
2150
  block(() => {
2151
2151
  const e5 = t4() || null;
2152
- var n5 = S;
2152
+ var n5 = q;
2153
2153
  if (e5 !== a3) {
2154
2154
  var i4 = ce;
2155
2155
  set_current_each_item(f3), c3 && (null === e5 ? (
@@ -2179,7 +2179,7 @@ function Icon$1(e2, t2) {
2179
2179
  let o3;
2180
2180
  template_effect(() => o3 = set_attributes(e4, o3, {
2181
2181
  ...get$1(t3)[1]
2182
- }, void 0, e4.namespaceURI === S, e4.nodeName.includes("-")));
2182
+ }, void 0, e4.namespaceURI === q, e4.nodeName.includes("-")));
2183
2183
  }), append(e3, n3);
2184
2184
  }), slot(sibling(p2), t2, "default", {}, null), template_effect((e3, t3) => f2 = set_attributes(d2, f2, {
2185
2185
  ...be,
@@ -2361,13 +2361,13 @@ function Icon(e2, t2) {
2361
2361
  "success" === n2() ? e3(consequent) : e3(alternate_3, false);
2362
2362
  }), append(e2, o2);
2363
2363
  }
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>');
2364
+ 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
2365
  function Loader(e2, t2) {
2366
2366
  push(t2, false);
2367
2367
  let n2 = prop(t2, "visible", 8);
2368
2368
  const o2 = Array(12).fill(0);
2369
2369
  init();
2370
- var i2 = Se();
2370
+ var i2 = qe();
2371
2371
  each(child(i2), 5, () => o2, index, (e3, t3) => {
2372
2372
  append(e3, Me());
2373
2373
  }), template_effect(() => set_attribute(i2, "data-visible", n2())), append(e2, i2), pop();
@@ -2388,15 +2388,15 @@ function clientWritable(e2) {
2388
2388
  }
2389
2389
  };
2390
2390
  }
2391
- let Te = 0;
2392
- const qe = function createToastState() {
2391
+ let Se = 0;
2392
+ const Te = function createToastState() {
2393
2393
  const e2 = clientWritable([]), t2 = clientWritable([]);
2394
2394
  function addToast(t3) {
2395
2395
  e2.update((e3) => [t3, ...e3]);
2396
2396
  }
2397
2397
  function create(t3) {
2398
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);
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 : Se++, s2 = void 0 === t3.dismissable || t3.dismissable, a2 = void 0 === t3.type ? "default" : t3.type, l2 = get(e2).find((e3) => e3.id === i2);
2400
2400
  return l2 ? e2.update((e3) => e3.map((e4) => e4.id === i2 ? {
2401
2401
  ...e4,
2402
2402
  ...t3,
@@ -2533,7 +2533,7 @@ const qe = function createToastState() {
2533
2533
  }), n2;
2534
2534
  },
2535
2535
  custom: function custom(e3, t3) {
2536
- const n2 = (t3 == null ? void 0 : t3.id) || Te++;
2536
+ const n2 = (t3 == null ? void 0 : t3.id) || Se++;
2537
2537
  return create({
2538
2538
  component: e3,
2539
2539
  id: n2,
@@ -2555,22 +2555,22 @@ const qe = function createToastState() {
2555
2555
  };
2556
2556
  }();
2557
2557
  const Pe = function toastFunction(e2, t2) {
2558
- return qe.create({
2558
+ return Te.create({
2559
2559
  message: e2,
2560
2560
  ...t2
2561
2561
  });
2562
2562
  }, 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
2563
+ success: Te.success,
2564
+ info: Te.info,
2565
+ warning: Te.warning,
2566
+ error: Te.error,
2567
+ custom: Te.custom,
2568
+ message: Te.message,
2569
+ promise: Te.promise,
2570
+ dismiss: Te.dismiss,
2571
+ loading: Te.loading
2572
2572
  });
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>');
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>'), De = /* @__PURE__ */ template('<button data-button="" data-cancel=""> </button>'), ze = /* @__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>');
2574
2574
  function Toast(e2, t2) {
2575
2575
  const n2 = legacy_rest_props(t2, ["children", "$$slots", "$$events", "$$legacy"]);
2576
2576
  push(t2, false);
@@ -2589,8 +2589,8 @@ function Toast(e2, t2) {
2589
2589
  default: "",
2590
2590
  info: "",
2591
2591
  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;
2592
+ }, { toasts: b2, heights: y2, removeHeight: $2, setHeight: w2, remove: x2 } = Te;
2593
+ 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, () => ({})), z2 = 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;
2594
2594
  function deleteToast() {
2595
2595
  set(L2, true), // Save the offset for the exit swipe animation
2596
2596
  set(G2, get$1(V2)), $2(k2().id), setTimeout(() => {
@@ -2613,15 +2613,15 @@ function Toast(e2, t2) {
2613
2613
  toastId: k2().id,
2614
2614
  height: e3
2615
2615
  }), () => $2(k2().id);
2616
- }), legacy_pre_effect(() => deep_read_state(z2()), () => {
2617
- z2({
2616
+ }), legacy_pre_effect(() => deep_read_state(D2()), () => {
2617
+ D2({
2618
2618
  ...m2,
2619
- ...z2()
2619
+ ...D2()
2620
2620
  });
2621
2621
  }), legacy_pre_effect(() => deep_read_state(C2()), () => {
2622
2622
  set(s2, 0 === C2());
2623
- }), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(T2())), () => {
2624
- set(a2, C2() + 1 <= T2());
2623
+ }), legacy_pre_effect(() => (deep_read_state(C2()), deep_read_state(S2())), () => {
2624
+ set(a2, C2() + 1 <= S2());
2625
2625
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
2626
2626
  set(l2, k2().title);
2627
2627
  }), legacy_pre_effect(() => deep_read_state(k2()), () => {
@@ -2641,8 +2641,8 @@ function Toast(e2, t2) {
2641
2641
  // Calculate offset up untill current toast
2642
2642
  n3 >= get$1(p2) ? e3 : e3 + t3.height
2643
2643
  ), 0));
2644
- }), legacy_pre_effect(() => (deep_read_state(S2()), deep_read_state(k2())), () => {
2645
- S2(k2().invert || S2());
2644
+ }), legacy_pre_effect(() => (deep_read_state(q2()), deep_read_state(k2())), () => {
2645
+ q2(k2().invert || q2());
2646
2646
  }), legacy_pre_effect(() => get$1(u2), () => {
2647
2647
  set(g2, "loading" === get$1(u2));
2648
2648
  }), legacy_pre_effect(() => (get$1(p2), get$1(v2)), () => {
@@ -2652,7 +2652,7 @@ function Toast(e2, t2) {
2652
2652
  async function updateHeights() {
2653
2653
  if (!get$1(A2)) return;
2654
2654
  let e3;
2655
- await tick(), e3 = M2() || q2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2655
+ await tick(), e3 = M2() || T2() ? 1 : 1 - 0.05 * C2(), get$1(R2).style.setProperty("height", "auto");
2656
2656
  const t3 = get$1(R2).offsetHeight, n3 = get$1(R2).getBoundingClientRect().height, o3 = Math.round(100 * (n3 / e3 + Number.EPSILON)) / 100;
2657
2657
  let i3;
2658
2658
  get$1(R2).style.removeProperty("height"), // Use scaledRectHeight as it's more precise
@@ -2702,7 +2702,7 @@ function Toast(e2, t2) {
2702
2702
  set_attribute(t3, "data-disabled", get$1(g2)), set_class(t3, 1, clsx(e4));
2703
2703
  }, [() => {
2704
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);
2705
+ return cn((_a = D2()) == null ? void 0 : _a.closeButton, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.closeButton);
2706
2706
  }], derived_safe_equal), event("click", t3, function(...e4) {
2707
2707
  var _a;
2708
2708
  (_a = get$1(g2) ? void 0 : () => {
@@ -2791,7 +2791,7 @@ function Toast(e2, t2) {
2791
2791
  "string" != typeof k2().title ? e5(consequent_9) : e5(alternate_4, false);
2792
2792
  }), template_effect((e5) => set_class(t3, 1, clsx(e5)), [() => {
2793
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);
2794
+ return cn((_a = D2()) == null ? void 0 : _a.title, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.title);
2795
2795
  }], derived_safe_equal), append(e4, t3);
2796
2796
  };
2797
2797
  if_block(s3, (e4) => {
@@ -2811,19 +2811,19 @@ function Toast(e2, t2) {
2811
2811
  "string" != typeof k2().description ? e5(consequent_11) : e5(alternate_5, false);
2812
2812
  }), template_effect((e5) => set_class(t3, 1, clsx(e5)), [() => {
2813
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);
2814
+ return cn(B2(), get$1(f2), (_a = D2()) == null ? void 0 : _a.description, (_b = k2().classes) == null ? void 0 : _b.description);
2815
2815
  }], derived_safe_equal), append(e4, t3);
2816
2816
  };
2817
2817
  if_block(a3, (e4) => {
2818
2818
  k2().description && e4(consequent_12);
2819
2819
  });
2820
2820
  var l3 = sibling(i3, 2), consequent_13 = (e4) => {
2821
- var t3 = ze(), n4 = child(t3);
2821
+ var t3 = De(), n4 = child(t3);
2822
2822
  template_effect((e5) => {
2823
2823
  set_attribute(t3, "style", E2()), set_class(t3, 1, clsx(e5)), set_text(n4, k2().cancel.label);
2824
2824
  }, [() => {
2825
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);
2826
+ return cn((_a = D2()) == null ? void 0 : _a.cancelButton, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.cancelButton);
2827
2827
  }], derived_safe_equal), event("click", t3, () => {
2828
2828
  var _a;
2829
2829
  deleteToast(), ((_a = k2().cancel) == null ? void 0 : _a.onClick) && k2().cancel.onClick();
@@ -2833,12 +2833,12 @@ function Toast(e2, t2) {
2833
2833
  k2().cancel && e4(consequent_13);
2834
2834
  });
2835
2835
  var c3 = sibling(l3, 2), consequent_14 = (e4) => {
2836
- var t3 = De(), n4 = child(t3);
2836
+ var t3 = ze(), n4 = child(t3);
2837
2837
  template_effect((e5) => {
2838
2838
  set_attribute(t3, "style", j2()), set_class(t3, 1, clsx(e5)), set_text(n4, k2().action.label);
2839
2839
  }, [() => {
2840
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);
2841
+ return cn((_a = D2()) == null ? void 0 : _a.actionButton, (_c = (_b = k2()) == null ? void 0 : _b.classes) == null ? void 0 : _c.actionButton);
2842
2842
  }], derived_safe_equal), event("click", t3, (e5) => {
2843
2843
  var _a;
2844
2844
  (_a = k2().action) == null ? void 0 : _a.onClick(e5), e5.defaultPrevented || deleteToast();
@@ -2852,11 +2852,11 @@ function Toast(e2, t2) {
2852
2852
  k2().component ? e3(consequent_1) : e3(alternate_6, false);
2853
2853
  }), bind_this(ee2, (e3) => set(R2, e3), () => get$1(R2)), template_effect((e3, t3, i3) => {
2854
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`);
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) || z2())), 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", q2()), 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`);
2856
2856
  }, [() => {
2857
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) {
2858
+ return cn(n2.class, get$1(d2), (_a = D2()) == null ? void 0 : _a.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)]);
2859
+ }, () => Boolean(k2().promise), () => Boolean(M2() || T2() && get$1(A2))], derived_safe_equal), event("pointerdown", ee2, function onPointerDown(e3) {
2860
2860
  if (get$1(g2)) return;
2861
2861
  set(G2, get$1(V2));
2862
2862
  const t3 = e3.target;
@@ -2891,8 +2891,8 @@ function Toaster(e2, t2) {
2891
2891
  return "auto" !== e3 && e3 ? e3 : window.getComputedStyle(document.documentElement).direction;
2892
2892
  }
2893
2893
  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) {
2894
+ const { toasts: k2, heights: C2, reset: M2 } = Te;
2895
+ let q2 = mutable_state(false), S2 = mutable_state(false), T2 = mutable_state(function getInitialTheme(e3) {
2896
2896
  return "system" !== e3 ? e3 : "undefined" != typeof window && window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? c2 : u2;
2897
2897
  }(f2())), P2 = mutable_state(), O2 = null, E2 = false;
2898
2898
  function handleBlur(e3) {
@@ -2916,7 +2916,7 @@ function Toaster(e2, t2) {
2916
2916
  _2().every((t3) => (
2917
2917
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
2918
2918
  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);
2919
+ )) && (set(q2, 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(q2, false);
2920
2920
  };
2921
2921
  return document.addEventListener("keydown", handleKeydown), () => {
2922
2922
  document.removeEventListener("keydown", handleKeydown);
@@ -2926,7 +2926,7 @@ function Toaster(e2, t2) {
2926
2926
  }), legacy_pre_effect(() => deep_read_state(_2()), () => {
2927
2927
  set(l2, _2().join("+").replace(/Key/g, "").replace(/Digit/g, ""));
2928
2928
  }), legacy_pre_effect(() => $toasts(), () => {
2929
- $toasts().length <= 1 && set(S2, false);
2929
+ $toasts().length <= 1 && set(q2, false);
2930
2930
  }), legacy_pre_effect(() => $toasts(), () => {
2931
2931
  const e3 = $toasts().filter((e4) => e4.dismiss && !e4.delete);
2932
2932
  if (e3.length > 0) {
@@ -2937,17 +2937,17 @@ function Toaster(e2, t2) {
2937
2937
  k2.set(t3);
2938
2938
  }
2939
2939
  }), legacy_pre_effect(() => deep_read_state(f2()), () => {
2940
- if ("system" !== f2() && set(q2, f2()), "undefined" != typeof window) {
2940
+ if ("system" !== f2() && set(T2, f2()), "undefined" != typeof window) {
2941
2941
  "system" === f2() && // check if current preference is dark
2942
2942
  (window.matchMedia && window.matchMedia("(prefers-color-scheme: dark)").matches ? (
2943
2943
  // it's currently dark
2944
- set(q2, c2)
2944
+ set(T2, c2)
2945
2945
  ) : (
2946
2946
  // it's not dark
2947
- set(q2, u2)
2947
+ set(T2, u2)
2948
2948
  ));
2949
2949
  const e3 = window.matchMedia("(prefers-color-scheme: dark)"), changeHandler = ({ matches: e4 }) => {
2950
- set(q2, e4 ? c2 : u2);
2950
+ set(T2, e4 ? c2 : u2);
2951
2951
  };
2952
2952
  "addEventListener" in e3 ? e3.addEventListener("change", changeHandler) : (
2953
2953
  // @ts-expect-error deprecated API
@@ -2994,7 +2994,7 @@ function Toaster(e2, t2) {
2994
2994
  return y2();
2995
2995
  },
2996
2996
  get interacting() {
2997
- return get$1(T2);
2997
+ return get$1(S2);
2998
2998
  },
2999
2999
  get position() {
3000
3000
  return get$1(s4);
@@ -3003,7 +3003,7 @@ function Toaster(e2, t2) {
3003
3003
  return h2();
3004
3004
  },
3005
3005
  get expanded() {
3006
- return get$1(S2);
3006
+ return get$1(q2);
3007
3007
  },
3008
3008
  get actionButtonStyle() {
3009
3009
  return get$1(a4);
@@ -3078,7 +3078,7 @@ function Toaster(e2, t2) {
3078
3078
  tabIndex: -1,
3079
3079
  class: n2.class,
3080
3080
  "data-sonner-toaster": true,
3081
- "data-theme": get$1(q2),
3081
+ "data-theme": get$1(T2),
3082
3082
  "data-rich-colors": g2(),
3083
3083
  dir: e5,
3084
3084
  "data-y-position": t3,
@@ -3086,9 +3086,9 @@ function Toaster(e2, t2) {
3086
3086
  style: n2.style,
3087
3087
  ...o2
3088
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);
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(q2, true)), event("mousemove", c3, () => set(q2, true)), event("mouseleave", c3, () => {
3090
+ get$1(S2) || set(q2, false);
3091
+ }), event("pointerdown", c3, () => set(S2, true)), event("pointerup", c3, () => set(S2, false)), append(e4, c3);
3092
3092
  }), template_effect(() => set_attribute(s3, "aria-label", `${v2()} ${get$1(l2)}`)), append(e3, s3);
3093
3093
  };
3094
3094
  if_block(N2, (e3) => {
@@ -3096,48 +3096,54 @@ function Toaster(e2, t2) {
3096
3096
  }), append(e2, j2), pop(), s2();
3097
3097
  }
3098
3098
  const Ge = writable(false), He = writable("https://sdk.playlight.dev");
3099
- function handleClick(e2, t2) {
3099
+ function handleClick(e2, t2, n2) {
3100
3100
  var _a;
3101
- (_a = t2.onClick) == null ? void 0 : _a.call(t2, t2.game.id), window.open("https://" + t2.game.domain, "_blank", "noopener");
3101
+ get$1(t2) ? e2.preventDefault() : ((_a = n2.onClick) == null ? void 0 : _a.call(n2, n2.game.id), window.open("https://" + n2.game.domain, "_blank", "noopener"));
3102
3102
  }
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>');
3103
+ function playGame(e2, t2) {
3104
+ var _a;
3105
+ e2.stopPropagation(), e2.preventDefault(), (_a = t2.onClick) == null ? void 0 : _a.call(t2, t2.game.id), window.open("https://" + t2.game.domain, "_blank", "noopener");
3106
+ }
3107
+ 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
3108
  function GameCard(e2, t2) {
3105
3109
  push(t2, true);
3106
3110
  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);
3111
+ let i2 = state(false), s2 = state(void 0), a2 = state(false), l2 = state(false), c2 = state(false), u2 = state(false), d2 = state(void 0);
3108
3112
  function handleMouseEnter() {
3109
- get$1(i2) || function playSound(e3, t3 = 1) {
3113
+ get$1(i2) || get$1(u2) || function playSound(e3, t3 = 1) {
3110
3114
  try {
3111
3115
  const n3 = new Audio(e3);
3112
3116
  n3.volume = t3, n3.play();
3113
3117
  } catch (e4) {
3114
3118
  console.error("Error playing sound:", e4);
3115
3119
  }
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)));
3120
+ }(store_get(He, "$projectUrl", n2) + "/static/sounds/hover-selection.ogg", 0.25), set(i2, true), get$1(s2) && t2.game.cover_video_url && get$1(s2).play().catch((e3) => console.error("Video play error:", e3));
3119
3121
  }
3120
3122
  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();
3123
+ get$1(u2) || (set(i2, false), get$1(s2) && get$1(a2) && get$1(s2).pause());
3123
3124
  }
3124
- var d2 = Ue();
3125
- d2.__touchstart = handleMouseEnter, d2.__touchend = handleMouseLeave, d2.__click = [handleClick, t2];
3126
- var f2 = child(d2), consequent = (e3) => {
3125
+ user_effect(() => {
3126
+ set(u2, "ontouchstart" in window);
3127
+ });
3128
+ var f2 = Ze();
3129
+ event("touchstart", S, () => set(u2, true), void 0, true), event("touchstart", T, function handleDocumentTouch(e3) {
3130
+ get$1(d2) && !get$1(d2).contains(e3.target) && set(i2, false);
3131
+ }, void 0, true), f2.__touchstart = handleMouseEnter, f2.__click = [handleClick, u2, t2];
3132
+ var p2 = child(f2), consequent = (e3) => {
3127
3133
  var t3 = Re();
3128
3134
  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, {
3135
+ 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, {
3130
3136
  "opacity-0": get$1(i2)
3131
3137
  })), append(e3, t3);
3132
3138
  };
3133
- if_block(f2, (e3) => {
3139
+ if_block(p2, (e3) => {
3134
3140
  var _a;
3135
3141
  (function isNewGame(e4) {
3136
3142
  const t3 = /* @__PURE__ */ new Date();
3137
3143
  return t3.setDate(t3.getDate() - 7), new Date(e4) > t3;
3138
3144
  })((_a = t2.game) == null ? void 0 : _a.created_at) && e3(consequent);
3139
3145
  });
3140
- var p2 = sibling(f2, 2), consequent_1 = (e3) => {
3146
+ var _2 = sibling(p2, 2), consequent_1 = (e3) => {
3141
3147
  var n3 = Ve();
3142
3148
  let o3;
3143
3149
  n3.muted = true, bind_this(n3, (e4) => set(s2, e4), () => get$1(s2)), template_effect(() => {
@@ -3145,39 +3151,49 @@ function GameCard(e2, t2) {
3145
3151
  "opacity-100": get$1(i2) && get$1(a2) && t2.game.cover_video_url
3146
3152
  });
3147
3153
  }), event("loadeddata", n3, () => {
3148
- set(a2, true), set(u2, false);
3154
+ set(a2, true);
3149
3155
  }), append(e3, n3);
3150
3156
  };
3151
- if_block(p2, (e3) => {
3157
+ if_block(_2, (e3) => {
3152
3158
  t2.game.cover_video_url && e3(consequent_1);
3153
3159
  });
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));
3160
+ var v2 = sibling(_2, 2);
3161
+ let g2;
3162
+ var h2 = sibling(v2, 2), consequent_2 = (e3) => {
3163
+ var n3 = Ke();
3164
+ let o3;
3165
+ n3.__click = [playGame, t2], template_effect(() => o3 = set_class(n3, 1, "bg-foreground text-background hover:bg-foreground/90 absolute right-4 bottom-4 z-15 flex items-center justify-center rounded-sm px-3 py-1 font-bold uppercase transition-all", null, o3, {
3166
+ "opacity-0": get$1(i2)
3167
+ })), append(e3, n3);
3168
+ };
3169
+ if_block(h2, (e3) => {
3170
+ get$1(u2) && e3(consequent_2);
3171
+ });
3172
+ var m2 = sibling(h2, 2), consequent_3 = (e3) => {
3173
+ var n3 = Ue(), o3 = child(n3), i3 = child(o3), s3 = child(i3), a3 = child(sibling(i3, 2));
3158
3174
  template_effect(() => {
3159
3175
  set_text(s3, t2.game.name), set_text(a3, t2.game.description || "No description.");
3160
3176
  }), transition(3, n3, () => slide), append(e3, n3);
3161
3177
  };
3162
- if_block(g2, (e3) => {
3163
- get$1(i2) && e3(consequent_2);
3178
+ if_block(m2, (e3) => {
3179
+ get$1(i2) && e3(consequent_3);
3164
3180
  });
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, {
3181
+ var b2 = sibling(m2, 2);
3182
+ let y2;
3183
+ bind_this(f2, (e3) => set(d2, e3), () => get$1(d2)), template_effect(() => {
3184
+ 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, {
3169
3185
  "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, {
3186
+ }), 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
3187
  "opacity-100": get$1(c2)
3172
3188
  });
3173
- }), event("mouseenter", d2, handleMouseEnter), event("focus", d2, handleMouseEnter), event("mouseleave", d2, handleMouseLeave), event("blur", d2, handleMouseLeave), event("touchcancel", d2, handleMouseLeave), event("load", _2, () => {
3189
+ }), event("mouseenter", f2, handleMouseEnter), event("focus", f2, handleMouseEnter), event("mouseleave", f2, handleMouseLeave), event("blur", f2, handleMouseLeave), event("load", v2, () => {
3174
3190
  set(l2, true);
3175
- }), event("load", h2, () => {
3191
+ }), event("load", b2, () => {
3176
3192
  set(c2, true);
3177
- }), append(e2, d2), pop(), o2();
3193
+ }), append(e2, f2), pop(), o2();
3178
3194
  }
3179
- delegate(["touchstart", "touchend", "click"]);
3180
- const Ze = new class PlayLightAPI {
3195
+ delegate(["touchstart", "click"]);
3196
+ const Ye = new class PlayLightAPI {
3181
3197
  constructor() {
3182
3198
  this.baseUrl = "https://api.playlight.dev/platform", this.cachedCategories = null, this.currentGame = null;
3183
3199
  }
@@ -3278,9 +3294,9 @@ function flip(e2, { from: t2, to: n2 }, o2 = {}) {
3278
3294
  }
3279
3295
  var on_click$1 = (e2, t2, n2) => {
3280
3296
  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) => {
3297
+ }, 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, o2) => {
3282
3298
  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>');
3299
+ }, 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
3300
  function Navigation(e2, t2) {
3285
3301
  push(t2, true);
3286
3302
  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());
@@ -3291,8 +3307,8 @@ function Navigation(e2, t2) {
3291
3307
  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
3308
  set(p2, proxy(d2[e3])), f2 = e3;
3293
3309
  });
3294
- var _2 = tt();
3295
- event("click", q, function handleClickOutside(e3) {
3310
+ var _2 = nt();
3311
+ event("click", T, function handleClickOutside(e3) {
3296
3312
  get$1(c2) && !get$1(c2).contains(e3.target) && n2 && !n2.contains(e3.target) && set(s2, false);
3297
3313
  });
3298
3314
  var v2 = child(_2), g2 = child(v2), h2 = child(g2), m2 = sibling(g2, 2);
@@ -3323,7 +3339,7 @@ function Navigation(e2, t2) {
3323
3339
  }
3324
3340
  }), bind_this(m2, (e3) => n2 = e3, () => n2);
3325
3341
  var x2 = sibling(v2, 2), consequent_2 = (e3) => {
3326
- var t3 = et(), n3 = child(t3), a3 = child(n3), d3 = child(a3);
3342
+ var t3 = tt(), n3 = child(t3), a3 = child(n3), d3 = child(a3);
3327
3343
  !function Search(e4, t4) {
3328
3344
  const n4 = legacy_rest_props(t4, ["children", "$$slots", "$$events", "$$legacy"]);
3329
3345
  Icon$1(e4, spread_props({
@@ -3349,14 +3365,14 @@ function Navigation(e2, t2) {
3349
3365
  class: "text-muted-foreground"
3350
3366
  });
3351
3367
  var f3 = sibling(d3, 2), p3 = child(sibling(n3, 2)), consequent = (e4) => {
3352
- append(e4, Ye());
3368
+ append(e4, Je());
3353
3369
  }, alternate_1 = (e4) => {
3354
3370
  var t4 = comment(), n4 = first_child(t4), consequent_1 = (e5) => {
3355
- append(e5, Je());
3371
+ append(e5, Xe());
3356
3372
  }, alternate = (e5) => {
3357
- var t5 = Qe();
3373
+ var t5 = et();
3358
3374
  each(t5, 28, () => get$1(u2), (e6) => e6, (e6, t6) => {
3359
- var n5 = Xe();
3375
+ var n5 = Qe();
3360
3376
  n5.__click = [on_click_1$1, i2, t6, s2];
3361
3377
  var o3 = child(n5);
3362
3378
  template_effect(() => {
@@ -3466,58 +3482,65 @@ function Navigation(e2, t2) {
3466
3482
  delegate(["click"]);
3467
3483
  var on_click = (e2, t2) => {
3468
3484
  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>');
3485
+ }, 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 p-1 px-2 text-primary text-sm"> </p></button>'), on_click_1 = (e2, t2) => store_set(Ge, false), ot = /* @__PURE__ */ template('<div class="flex h-4/5 items-center justify-center gap-4"><!></div>'), it = /* @__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
3486
  function DiscoveryOverlay(e2, t2) {
3471
3487
  push(t2, true);
3472
3488
  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);
3489
+ let i2, 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
3490
  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) ? (
3491
+ if (!(get$1(l2) && get$1(_2) > 1 || get$1(c2))) try {
3492
+ 1 === get$1(_2) ? set(l2, true) : set(c2, true);
3493
+ const e3 = get$1(h2) ? null : get$1(a2), t3 = await Ye.getSuggestions(e3, get$1(_2), window.location.hostname), n3 = (t3 == null ? void 0 : t3.games) || [], o3 = n3.filter((e4) => !get$1(d2).some((t4) => t4.id === e4.id));
3494
+ set(d2, proxy([...get$1(d2), ...o3])), n3.length < 10 ? !get$1(h2) && get$1(a2) ? (
3479
3495
  // Try with all games
3480
- (set(g2, true), set(p2, 1), setTimeout(() => fetchGames(), 100))
3481
- ) : set(_2, false) : set(p2, get$1(p2) + 1);
3496
+ (set(h2, true), set(_2, 1), setTimeout(() => fetchGames(), 100))
3497
+ ) : set(v2, false) : set(_2, get$1(_2) + 1);
3482
3498
  } catch (e3) {
3483
3499
  console.error(e3), Oe.error("Failed to load games: " + e3);
3484
3500
  } 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();
3501
+ set(l2, false), set(c2, false), // For Chrome: manually check if element is still in view and should trigger another load
3502
+ get$1(v2) && get$1(g2) && setTimeout(() => {
3503
+ const e3 = get$1(g2).getBoundingClientRect();
3488
3504
  !(e3.top >= -200 && // Include rootMargin
3489
3505
  e3.left >= 0 && e3.bottom <= window.innerHeight + 200 && // Include rootMargin
3490
- e3.right <= window.innerWidth) || get$1(a2) || get$1(l2) || fetchGames();
3506
+ e3.right <= window.innerWidth) || get$1(l2) || get$1(c2) || fetchGames();
3491
3507
  }, 150);
3492
3508
  }
3493
3509
  }
3494
- onMount(() => (set(f2, !Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))), // Setup scroll observer
3510
+ onMount(() => (set(p2, !Boolean(localStorage.getItem("playlight_exit_intent_disabled_by_user"))), // Setup scroll observer
3495
3511
  i2 = new IntersectionObserver((e3) => {
3496
- e3[0].isIntersecting && get$1(_2) && !get$1(a2) && !get$1(l2) && fetchGames();
3512
+ e3[0].isIntersecting && get$1(v2) && !get$1(l2) && !get$1(c2) && fetchGames();
3497
3513
  }, {
3498
3514
  rootMargin: "200px"
3499
3515
  }), () => 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() {
3516
+ const e3 = await Ye.getCurrentGameInfo();
3517
+ set(u2, proxy(e3 == null ? void 0 : e3.category)), await async function fetchCategories() {
3502
3518
  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]));
3519
+ set(f2, proxy(await Ye.getCategories())), !get$1(a2) && ((_a = get$1(f2)) == null ? void 0 : _a.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
3520
  }();
3505
3521
  }), 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
3522
+ 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
3523
  setTimeout(async () => {
3508
- await fetchGames(), get$1(u2).length < 10 && await fetchGames();
3524
+ await fetchGames(), get$1(d2).length < 10 && await fetchGames();
3509
3525
  }, 100));
3510
3526
  }), user_effect(() => {
3511
- get$1(v2) && i2 && i2.observe(get$1(v2));
3527
+ get$1(g2) && i2 && i2.observe(get$1(g2));
3512
3528
  });
3513
- var h2 = it();
3514
- event("keydown", q, (e3) => {
3529
+ var m2 = at();
3530
+ event("keydown", T, (e3) => {
3515
3531
  "Escape" == e3.key && store_set(Ge, false);
3516
3532
  });
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) {
3533
+ var b2 = child(m2), y2 = child(b2), $2 = child(y2), w2 = child(sibling(y2, 2)), consequent = (e3) => {
3534
+ var t3 = rt();
3535
+ t3.__click = [on_click, p2];
3536
+ var n3 = child(t3), o3 = child(n3);
3537
+ template_effect(() => set_text(o3, get$1(p2) ? "Ignore exit intent" : "Trigger on exit intent")), append(e3, t3);
3538
+ };
3539
+ if_block(w2, (e3) => {
3540
+ s2() && e3(consequent);
3541
+ });
3542
+ var x2 = sibling(w2, 2);
3543
+ x2.__click = [on_click_1, () => store_get(Ge, "$discoveryOpen", n2)], function X(e3, t3) {
3521
3544
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3522
3545
  Icon$1(e3, spread_props({
3523
3546
  name: "x"
@@ -3535,42 +3558,42 @@ function DiscoveryOverlay(e2, t2) {
3535
3558
  default: true
3536
3559
  }
3537
3560
  }));
3538
- }(child(k2), {
3561
+ }(child(x2), {
3539
3562
  size: 24
3540
3563
  });
3541
- var C2 = sibling(m2, 2);
3542
- Navigation(child(C2), {
3564
+ var k2 = sibling(b2, 2);
3565
+ Navigation(child(k2), {
3543
3566
  get categories() {
3544
- return get$1(d2);
3567
+ return get$1(f2);
3545
3568
  },
3546
3569
  get selectedCategory() {
3547
- return get$1(s2);
3570
+ return get$1(a2);
3548
3571
  },
3549
3572
  set selectedCategory(e3) {
3550
- set(s2, proxy(e3));
3573
+ set(a2, proxy(e3));
3551
3574
  }
3552
3575
  });
3553
- var M2 = sibling(C2, 2), S2 = child(M2), consequent = (e3) => {
3554
- var t3 = nt();
3576
+ var C2 = sibling(k2, 2), M2 = child(C2), consequent_1 = (e3) => {
3577
+ var t3 = ot();
3555
3578
  Loader_circle(child(t3), {
3556
3579
  class: "animate-spin opacity-75",
3557
3580
  size: 50,
3558
3581
  strokeWidth: 2.5
3559
3582
  }), append(e3, t3);
3560
3583
  }, alternate_1 = (e3) => {
3561
- var t3 = comment(), n3 = first_child(t3), consequent_1 = (e4) => {
3562
- append(e4, rt());
3584
+ var t3 = comment(), n3 = first_child(t3), consequent_2 = (e4) => {
3585
+ append(e4, it());
3563
3586
  }, alternate = (e4) => {
3564
- var t4 = ot(), n4 = child(t4);
3565
- each(n4, 17, () => get$1(u2), index, (e5, t5) => {
3587
+ var t4 = st(), n4 = child(t4);
3588
+ each(n4, 17, () => get$1(d2), index, (e5, t5) => {
3566
3589
  GameCard(e5, {
3567
3590
  get game() {
3568
3591
  return get$1(t5);
3569
3592
  },
3570
- onClick: () => Ze.trackClick(get$1(t5).id)
3593
+ onClick: () => Ye.trackClick(get$1(t5).id)
3571
3594
  });
3572
3595
  });
3573
- var o3 = sibling(n4, 2), i3 = child(o3), consequent_2 = (e5) => {
3596
+ var o3 = sibling(n4, 2), i3 = child(o3), consequent_3 = (e5) => {
3574
3597
  Loader_circle(e5, {
3575
3598
  class: "animate-spin opacity-75",
3576
3599
  size: 30,
@@ -3578,17 +3601,17 @@ function DiscoveryOverlay(e2, t2) {
3578
3601
  });
3579
3602
  };
3580
3603
  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);
3604
+ get$1(c2) && e5(consequent_3);
3605
+ }), bind_this(o3, (e5) => set(g2, e5), () => get$1(g2)), append(e4, t4);
3583
3606
  };
3584
3607
  if_block(n3, (e4) => {
3585
- 0 !== get$1(u2).length || get$1(a2) ? e4(alternate, false) : e4(consequent_1);
3608
+ 0 !== get$1(d2).length || get$1(l2) ? e4(alternate, false) : e4(consequent_2);
3586
3609
  }, true), append(e3, t3);
3587
3610
  };
3588
- if_block(S2, (e3) => {
3589
- get$1(a2) && 0 === get$1(u2).length ? e3(consequent) : e3(alternate_1, false);
3611
+ if_block(M2, (e3) => {
3612
+ get$1(l2) && 0 === get$1(d2).length ? e3(consequent_1) : e3(alternate_1, false);
3590
3613
  });
3591
- var I2 = child(sibling(M2, 2));
3614
+ var q2 = child(sibling(C2, 2));
3592
3615
  !function External_link(e3, t3) {
3593
3616
  const n3 = legacy_rest_props(t3, ["children", "$$slots", "$$events", "$$legacy"]);
3594
3617
  Icon$1(e3, spread_props({
@@ -3609,28 +3632,26 @@ function DiscoveryOverlay(e2, t2) {
3609
3632
  default: true
3610
3633
  }
3611
3634
  }));
3612
- }(sibling(child(I2)), {
3635
+ }(sibling(child(q2)), {
3613
3636
  size: 14,
3614
3637
  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, () => ({
3638
+ }), template_effect(() => set_attribute($2, "src", store_get(He, "$projectUrl", n2) + "/static/images/logo-white-small.png")), transition(3, m2, () => blur, () => ({
3618
3639
  duration: 250
3619
- })), append(e2, h2), pop(), o2();
3640
+ })), append(e2, m2), pop(), o2();
3620
3641
  }
3621
3642
  delegate(["click"]);
3622
- var st = /* @__PURE__ */ template('<div class="fixed top-0 left-0 right-0 h-2 z-99990"></div>');
3643
+ var lt = /* @__PURE__ */ template('<div class="fixed top-0 left-0 right-0 h-2 z-99990"></div>');
3623
3644
  delegate(["mouseover"]);
3624
- var at = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3645
+ var ct = /* @__PURE__ */ template("<!> <!> <!> <!>", 1);
3625
3646
  function App(e2, t2) {
3626
3647
  var _a, _b, _c, _d;
3627
3648
  push(t2, true);
3628
3649
  const [n2, o2] = setup_stores(), $discoveryOpen = () => store_get(Ge, "$discoveryOpen", n2);
3629
3650
  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);
3630
3651
  function openDiscovery() {
3631
- store_set(Ge, true), Ze.trackOpen();
3652
+ store_set(Ge, true), Ye.trackOpen();
3632
3653
  }
3633
- var a2 = at(), l2 = first_child(a2);
3654
+ var a2 = ct(), l2 = first_child(a2);
3634
3655
  FloatingButton(l2, {
3635
3656
  get position() {
3636
3657
  return i2;
@@ -3641,7 +3662,15 @@ function App(e2, t2) {
3641
3662
  onClick: openDiscovery
3642
3663
  });
3643
3664
  var c2 = sibling(l2, 2), consequent = (e3) => {
3644
- DiscoveryOverlay(e3, {});
3665
+ const n3 = /* @__PURE__ */ derived(() => {
3666
+ var _a2, _b2;
3667
+ return (_b2 = (_a2 = t2.config) == null ? void 0 : _a2.exitIntent) == null ? void 0 : _b2.enabled;
3668
+ });
3669
+ DiscoveryOverlay(e3, {
3670
+ get showIntentToggle() {
3671
+ return get$1(n3);
3672
+ }
3673
+ });
3645
3674
  };
3646
3675
  if_block(c2, (e3) => {
3647
3676
  $discoveryOpen() && e3(consequent);
@@ -3657,10 +3686,10 @@ function App(e2, t2) {
3657
3686
  onMount(() => {
3658
3687
  "undefined" != typeof window && (n3 = window.innerHeight);
3659
3688
  });
3660
- var s3 = st();
3661
- event("mouseleave", q, () => {
3689
+ var s3 = lt();
3690
+ event("mouseleave", T, () => {
3662
3691
  i3 = false;
3663
- }), event("mousemove", q, (e4) => {
3692
+ }), event("mousemove", T, (e4) => {
3664
3693
  const t4 = e4.clientY;
3665
3694
  if (!i3) return i3 = true, void (n3 = t4);
3666
3695
  n3 = t4;
@@ -3679,7 +3708,7 @@ function App(e2, t2) {
3679
3708
  }
3680
3709
  }), Toaster(sibling(u2, 2), {}), append(e2, a2), pop(), o2();
3681
3710
  }
3682
- const lt = {
3711
+ const ut = {
3683
3712
  button: {
3684
3713
  position: "bottom-right",
3685
3714
  visible: true
@@ -3688,11 +3717,11 @@ const lt = {
3688
3717
  enabled: true
3689
3718
  }
3690
3719
  };
3691
- let ct = {
3692
- ...lt
3720
+ let dt = {
3721
+ ...ut
3693
3722
  };
3694
3723
  function initializeConfig(e2 = {}) {
3695
- return ct = deepMerge(lt, e2), ct;
3724
+ return dt = deepMerge(ut, e2), dt;
3696
3725
  }
3697
3726
  function deepMerge(e2, t2) {
3698
3727
  const n2 = {
@@ -3709,9 +3738,9 @@ function deepMerge(e2, t2) {
3709
3738
  function isObject(e2) {
3710
3739
  return e2 && "object" == typeof e2 && !Array.isArray(e2);
3711
3740
  }
3712
- const ut = new class PlaylightSDK {
3741
+ const ft = new class PlaylightSDK {
3713
3742
  constructor() {
3714
- this.container = null, this.app = null, this.isInitialized = false, this.config = null, this.api = Ze;
3743
+ this.container = null, this.app = null, this.isInitialized = false, this.config = null, this.api = Ye;
3715
3744
  }
3716
3745
  async init(e2 = {}) {
3717
3746
  if (!this.isInitialized) return "undefined" == typeof window ? console.error("Playlight cannot run on the server, as it depends browser APIs.") : (
@@ -3729,11 +3758,11 @@ const ut = new class PlaylightSDK {
3729
3758
  }
3730
3759
  // Public methods
3731
3760
  setDiscovery(e2) {
3732
- this.isInitialized && (Ge.set(e2), get(Ge) && Ze.trackOpen());
3761
+ this.isInitialized && (Ge.set(e2), get(Ge) && Ye.trackOpen());
3733
3762
  }
3734
3763
  }();
3735
- "undefined" != typeof window && (window.playlightSDK = ut);
3764
+ "undefined" != typeof window && (window.playlightSDK = ft);
3736
3765
  export {
3737
- ut as default
3766
+ ft as default
3738
3767
  };
3739
3768
  //# sourceMappingURL=playlight-sdk.es.js.map